-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1074 add DatePicker & DateRangePicker components (first-cut) #1106
#1074 add DatePicker & DateRangePicker components (first-cut) #1106
Conversation
✅ Deploy Preview for papaya-valkyrie-395400 canceled.
|
9b1ba4e
to
2253648
Compare
2253648
to
3973e99
Compare
a929495
to
8f0838a
Compare
How the components look: Next plan is to
|
e9386ad
to
6c1e250
Compare
Squashed commits from salt-ds: Initial Commit [WIP] Characteristics design tokens (#salt-ds4) Css design tokens (#salt-ds8) include 'color' in color foundation token (#salt-ds13) Miscellaneous css fixes update package names to reflect temporary name (#salt-ds53) Characteristic/Foundations story docs and design updates (#salt-ds35) Refactor layer components (#salt-ds48) Apply CharPalette (#salt-ds46) characteristics updates (#salt-ds118) Move Tooltip, Portal and Window to core (#salt-ds198) Move FormField and FormFieldContext to Core (#salt-ds204) List refactor, Dropdown refactor, ComboBox refactor, Tabs refactor, Toolbar refactor, Tree component (#salt-ds10) Migrate from dayjs to @internationalized/date, change initial Calendar props and fix React18 focus bugs (#salt-ds320) Update Calendar stories, unselectable states, year traversal logic and add tooltips to the next and previous buttons (#salt-ds70) Characteristics: text font size token updates (#salt-ds323) Remove component name classes when tokens are density dependent (#salt-ds376) Move layer and deck layout components to core (#salt-ds391) Rename props and types in components related to StatusIcon (#salt-ds410) Rename import from src to fix TS error when using `skipLibCheck` false (#salt-ds362) Backwards compat styling standardisation 2 (#salt-ds441) Update react monorepo to v18 (major) (#salt-ds444) Remove backwards compatibility and some custom style stories (#salt-ds631) Rename caption to label variant; move help text token to editable (#salt-ds683) Characteristic changes to align with data grid (#salt-ds674) Removal of emphasis concept (#salt-ds757) Remove selectable default and primary foreground tokens (#salt-ds844) Move components we aren't publishing out of core (#salt-ds895) Rename packages (#salt-ds877) Big rename (#salt-ds916) Replace classnames with clsx (#salt-ds1031) Tooltip refactor (#salt-ds1080) Move Tooltip to core (#salt-ds1084) Update custom-property-no-foundations lint rule (#salt-ds1319) Add Style injection system (#salt-ds1697) Theme 1.0 updates (#salt-ds2571)
- fixes imports that were no longer valid - adds missing `salt-ds/icons` package to vuu-ui-controls - fixes linting errors - fixes an alignment issue with the calendar - fixes issues with css module imports -> I've reverted to importing css directly and relying on classes for the styles to take effect. Same as what we do elsewhere in VUU.
6c1e250
to
cbb6e3b
Compare
- first-cut since we still need improvements around theme and subtleties of UX (focus management, keyboard nav, close on click away) etc.
cbb6e3b
to
cb17225
Compare
@@ -11,6 +11,7 @@ | |||
}, | |||
"dependencies": { | |||
"@salt-ds/core": "1.13.2", | |||
"@salt-ds/icons": "1.9.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to specify this as a dependency. It's already a dependency of salt core.
We never want to user these directly ourselves.
In fact, these icons are a bit of a headache, we don't really want to use Salt icons, we would rather use our own. Thats easy with the way we specify icons (in css) but not easy with salt componnets as they ship them as react components.
In our theme CSS you will finsd this
.saltIcon {
display: none;
}
import { useCalendarContext } from "./CalendarContext"; | ||
|
||
import "./CalendarNavigation.css"; | ||
import { DateValue, isSameMonth, isSameYear } from "@internationalized/date"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting. I assumed there would probably be a third party library for date manipulation. I didn't know this one , but I'm sure there was good reason for choosing it. I'll have to famikliarise myself with it
|
||
export interface BaseDatePickerProps<T = PickerSelectionType> | ||
extends Pick<CalendarProps, "hideOutOfRangeDates" | "hideYearDropdown"> { | ||
onSelectedDateChange: (selected: T) => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably good to keep APIs as similar as possible across form controls, so this could be just onSelectionChange to match list, dropdown, combobox etc
Summary of changes:
salt-ds/icons
package to vuu-ui-controls