@kaizen/components 0.0.0-canary-kz-components-css-layer-pre-release-20250527021003 → 0.0.0-canary-fix-fms-popover-20250603003244
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/Calendar/CalendarRange/CalendarRange.cjs +13 -12
- package/dist/cjs/src/Calendar/CalendarRange/CalendarRange.module.scss.cjs +3 -2
- package/dist/cjs/src/Calendar/CalendarSingle/CalendarSingle.cjs +8 -8
- package/dist/cjs/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.cjs +12 -11
- package/dist/cjs/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.module.scss.cjs +1 -0
- package/dist/cjs/src/Calendar/baseCalendarClassNames.cjs +13 -11
- package/dist/cjs/src/Calendar/baseCalendarClassNames.module.scss.cjs +2 -1
- package/dist/cjs/src/Calendar/utils/setFocusInCalendar.cjs +6 -7
- package/dist/cjs/src/Filter/FilterBar/subcomponents/FilterBarSelect/FilterBarSelect.cjs +1 -1
- package/dist/cjs/src/Filter/FilterMultiSelect/FilterMultiSelect.cjs +7 -3
- package/dist/cjs/src/Filter/FilterMultiSelect/subcomponents/MenuPopup/MenuPopup.cjs +67 -37
- package/dist/cjs/src/RichTextEditor/utils/schema/marks.cjs +5 -6
- package/dist/esm/src/Calendar/CalendarRange/CalendarRange.mjs +13 -12
- package/dist/esm/src/Calendar/CalendarRange/CalendarRange.module.scss.mjs +3 -2
- package/dist/esm/src/Calendar/CalendarSingle/CalendarSingle.mjs +8 -8
- package/dist/esm/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.mjs +12 -11
- package/dist/esm/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.module.scss.mjs +1 -0
- package/dist/esm/src/Calendar/baseCalendarClassNames.mjs +13 -11
- package/dist/esm/src/Calendar/baseCalendarClassNames.module.scss.mjs +2 -1
- package/dist/esm/src/Calendar/utils/setFocusInCalendar.mjs +6 -7
- package/dist/esm/src/Filter/FilterBar/subcomponents/FilterBarSelect/FilterBarSelect.mjs +1 -1
- package/dist/esm/src/Filter/FilterMultiSelect/FilterMultiSelect.mjs +7 -3
- package/dist/esm/src/Filter/FilterMultiSelect/subcomponents/MenuPopup/MenuPopup.mjs +68 -40
- package/dist/esm/src/RichTextEditor/utils/schema/marks.mjs +5 -6
- package/dist/styles.css +10102 -9903
- package/dist/types/Calendar/CalendarRange/CalendarRange.d.ts +2 -2
- package/dist/types/Calendar/CalendarSingle/CalendarSingle.d.ts +2 -2
- package/dist/types/Calendar/LegacyCalendarRange/LegacyCalendarRange.d.ts +2 -3
- package/dist/types/Calendar/baseCalendarClassNames.d.ts +2 -2
- package/dist/types/Filter/FilterMultiSelect/FilterMultiSelect.d.ts +1 -1
- package/dist/types/Filter/FilterMultiSelect/subcomponents/MenuPopup/MenuPopup.d.ts +7 -4
- package/dist/types/RichTextEditor/utils/schema/marks.d.ts +1 -1
- package/package.json +43 -44
- package/src/Avatar/Avatar.module.css +135 -137
- package/src/AvatarGroup/AvatarGroup.module.css +56 -58
- package/src/Badge/Badge.module.css +96 -98
- package/src/Brand/Brand.module.css +3 -5
- package/src/BrandMoment/BrandMoment.module.css +145 -147
- package/src/BrandMoment/_docs/ExampleHeaders.module.scss +66 -68
- package/src/Button/Button/Button.module.scss +133 -135
- package/src/Button/GenericButton/GenericButton.module.scss +79 -81
- package/src/Button/IconButton/IconButton.module.scss +18 -20
- package/src/ButtonGroup/ButtonGroup.module.css +36 -38
- package/src/ButtonGroup/ButtonGroup.module.scss +39 -41
- package/src/Calendar/CalendarPopover/CalendarPopover.module.scss +17 -19
- package/src/Calendar/CalendarRange/CalendarRange.module.scss +45 -47
- package/src/Calendar/CalendarRange/CalendarRange.tsx +11 -15
- package/src/Calendar/CalendarRange/_docs/CalendarRange.stickersheet.stories.tsx +1 -2
- package/src/Calendar/CalendarSingle/CalendarSingle.module.scss +9 -12
- package/src/Calendar/CalendarSingle/CalendarSingle.tsx +6 -11
- package/src/Calendar/CalendarSingle/_docs/CalendarSingle.stickersheet.stories.tsx +3 -8
- package/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.module.scss +18 -21
- package/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.tsx +11 -15
- package/src/Calendar/baseCalendarClassNames.module.scss +156 -151
- package/src/Calendar/baseCalendarClassNames.ts +15 -13
- package/src/Calendar/utils/isSelectingDayInCalendar.spec.tsx +1 -2
- package/src/Calendar/utils/setFocusInCalendar.spec.tsx +4 -8
- package/src/Calendar/utils/setFocusInCalendar.ts +10 -10
- package/src/Card/Card.module.css +89 -91
- package/src/Checkbox/Checkbox/Checkbox.module.scss +87 -89
- package/src/Checkbox/CheckboxField/CheckboxField.module.scss +30 -32
- package/src/Checkbox/CheckboxGroup/CheckboxGroup.module.scss +9 -11
- package/src/ClearButton/ClearButton.module.scss +30 -32
- package/src/Collapsible/Collapsible/Collapsible.module.scss +85 -87
- package/src/Collapsible/CollapsibleGroup/CollapsibleGroup.module.scss +7 -9
- package/src/Collapsible/ExpertAdviceCollapsible/ExpertAdviceCollapsible.module.scss +33 -35
- package/src/Container/Container.module.scss +9 -11
- package/src/Content/Content.module.scss +8 -10
- package/src/DateInput/DateInput/DateInput.module.scss +5 -7
- package/src/DateInput/DateInputDescription/DateInputDescription.module.scss +13 -15
- package/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.module.scss +30 -32
- package/src/DatePicker/DatePicker.module.scss +5 -7
- package/src/DatePicker/DatePicker.spec.tsx +9 -10
- package/src/DatePicker/DatePicker.tsx +2 -2
- package/src/DatePicker/subcomponents/DateInputField/DateInputField.module.scss +3 -5
- package/src/DateRangePicker/DateRangePicker.module.scss +73 -75
- package/src/Divider/Divider.module.scss +33 -35
- package/src/EmptyState/EmptyState.module.css +93 -95
- package/src/ErrorPage/ErrorPage.module.scss +2 -4
- package/src/FieldGroup/FieldGroup.module.scss +6 -8
- package/src/FieldMessage/FieldMessage.module.scss +51 -53
- package/src/Filter/Filter/Filter.module.css +3 -5
- package/src/Filter/Filter/subcomponents/FilterContents/FilterContents.module.css +2 -4
- package/src/Filter/Filter/subcomponents/FilterPopover/FilterPopover.module.css +6 -8
- package/src/Filter/FilterBar/FilterBar.module.css +15 -17
- package/src/Filter/FilterBar/subcomponents/ClearAllButton/ClearAllButton.module.css +5 -7
- package/src/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.module.css +2 -4
- package/src/Filter/FilterBar/subcomponents/FilterBarDatePicker/FilterBarDatePicker.spec.tsx +2 -4
- package/src/Filter/FilterBar/subcomponents/FilterBarDateRangePicker/FilterBarDateRangePicker.spec.tsx +2 -6
- package/src/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.module.css +3 -5
- package/src/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.spec.tsx +1 -0
- package/src/Filter/FilterBar/subcomponents/FilterBarSelect/FilterBarSelect.tsx +1 -1
- package/src/Filter/FilterButton/FilterButton/FilterButton.module.css +17 -19
- package/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.module.css +2 -4
- package/src/Filter/FilterButton/subcomponents/FilterButtonBase/FilterButtonBase.module.scss +40 -42
- package/src/Filter/FilterDatePicker/FilterDatePicker.spec.tsx +2 -3
- package/src/Filter/FilterDatePicker/subcomponents/DateInputField/DateInputField.module.scss +2 -4
- package/src/Filter/FilterDatePicker/subcomponents/FilterDatePickerField/FilterDatePickerField.module.scss +4 -6
- package/src/Filter/FilterDatePicker/subcomponents/FilterDatePickerField/FilterDatePickerField.spec.tsx +4 -8
- package/src/Filter/FilterDateRangePicker/FilterDateRangePicker.module.css +5 -7
- package/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.stories.tsx +2 -2
- package/src/Filter/FilterDateRangePicker/subcomponents/DateRangeDisplayLabel/DateRangeDisplayLabel.module.scss +3 -5
- package/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.module.scss +34 -36
- package/src/Filter/FilterDateRangePicker/subcomponents/DateRangeValidationMessage/DateRangeValidationMessage.module.scss +3 -5
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/FilterDateRangePickerField.module.scss +5 -7
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/FilterDateRangePickerField.spec.tsx +8 -14
- package/src/Filter/FilterMultiSelect/FilterMultiSelect.tsx +3 -2
- package/src/Filter/FilterMultiSelect/_docs/FilterMultiSelect.mdx +8 -0
- package/src/Filter/FilterMultiSelect/_docs/FilterMultiSelect.stories.tsx +88 -0
- package/src/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.spec.tsx +2 -18
- package/src/Filter/FilterMultiSelect/subcomponents/ListBox/ListBox.module.scss +17 -19
- package/src/Filter/FilterMultiSelect/subcomponents/ListBoxSection/ListBoxSection.module.scss +12 -14
- package/src/Filter/FilterMultiSelect/subcomponents/LoadMoreButton/LoadMoreButton.module.scss +2 -4
- package/src/Filter/FilterMultiSelect/subcomponents/MenuLayout/MenuFooter/MenuFooter.module.scss +5 -7
- package/src/Filter/FilterMultiSelect/subcomponents/MenuLayout/MenuLoadingSkeleton/MenuLoadingSkeleton.module.scss +6 -8
- package/src/Filter/FilterMultiSelect/subcomponents/MenuPopup/MenuPopup.module.scss +21 -17
- package/src/Filter/FilterMultiSelect/subcomponents/MenuPopup/MenuPopup.tsx +81 -41
- package/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.module.scss +88 -90
- package/src/Filter/FilterMultiSelect/subcomponents/NoResults/NoResults.module.scss +2 -4
- package/src/Filter/FilterMultiSelect/subcomponents/SearchInput/SearchInput.module.scss +3 -5
- package/src/Filter/FilterMultiSelect/subcomponents/SectionDivider/SectionDivider.module.scss +2 -4
- package/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/SelectionControlButton.module.scss +50 -52
- package/src/Filter/FilterMultiSelect/subcomponents/Trigger/RemovableFilterTrigger/RemovableFilterTrigger.module.css +2 -4
- package/src/Filter/FilterSelect/FilterSelect.module.css +7 -9
- package/src/Focusable/Focusable.module.scss +2 -4
- package/src/GuidanceBlock/GuidanceBlock.module.css +210 -212
- package/src/Heading/Heading.module.scss +85 -87
- package/src/Icon/_docs/icon.module.scss +33 -35
- package/src/Icon/subcomponents/SVG/SVG.module.scss +24 -26
- package/src/Illustration/subcomponents/Base/Base.module.scss +98 -100
- package/src/Input/Input/Input.module.scss +215 -217
- package/src/Input/InputRange/InputRange.module.scss +136 -138
- package/src/Input/InputSearch/InputSearch.module.scss +152 -155
- package/src/Label/Label.module.scss +80 -82
- package/src/LabelledMessage/LabelledMessage.module.scss +6 -8
- package/src/LikertScaleLegacy/LikertScaleLegacy.module.scss +264 -266
- package/src/Link/Link.module.css +113 -115
- package/src/LinkButton/LinkButton.module.css +3 -5
- package/src/Loading/LoadingGraphic/LoadingGraphic.module.scss +10 -12
- package/src/Loading/LoadingHeading/LoadingHeading.module.scss +42 -44
- package/src/Loading/LoadingInput/LoadingInput.module.scss +9 -11
- package/src/Loading/LoadingParagraph/LoadingParagraph.module.scss +45 -47
- package/src/Loading/LoadingSpinner/LoadingSpinner.module.css +20 -22
- package/src/Loading/_mixins.scss +9 -11
- package/src/Menu/subcomponents/MenuDropdown/MenuDropdown.module.scss +16 -18
- package/src/Menu/subcomponents/MenuHeading/MenuHeading.module.scss +6 -8
- package/src/Menu/subcomponents/MenuItem/MenuItem.module.scss +72 -74
- package/src/Menu/subcomponents/MenuList/MenuList.module.scss +12 -14
- package/src/Menu/subcomponents/StatelessMenu/StatelessMenu.module.scss +2 -4
- package/src/Modal/ConfirmationModal/ConfirmationModal.module.scss +124 -126
- package/src/Modal/ContextModal/ContextModal.module.scss +70 -72
- package/src/Modal/GenericModal/GenericModal.module.scss +90 -92
- package/src/Modal/GenericModal/subcomponents/ModalAccessibleDescription/ModalAccessibleDescription.module.scss +2 -4
- package/src/Modal/GenericModal/subcomponents/ModalAccessibleLabel/ModalAccessibleLabel.module.scss +23 -25
- package/src/Modal/GenericModal/subcomponents/ModalBody/ModalBody.module.scss +3 -5
- package/src/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.module.scss +53 -55
- package/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.module.scss +15 -17
- package/src/Modal/InputEditModal/InputEditModal.module.scss +30 -32
- package/src/MultiSelect/MultiSelect.module.scss +5 -7
- package/src/MultiSelect/subcomponents/Checkbox/Checkbox.module.scss +57 -59
- package/src/MultiSelect/subcomponents/MultiSelectOptionField/MultiSelectOptionField.module.scss +53 -55
- package/src/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.module.scss +6 -8
- package/src/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.module.scss +64 -66
- package/src/MultiSelect/subcomponents/Popover/Popover.module.scss +13 -15
- package/src/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.module.scss +19 -21
- package/src/Notification/subcomponents/GenericNotification/GenericNotification.module.scss +110 -112
- package/src/Notification/subcomponents/GenericNotification/_mixins.scss +276 -278
- package/src/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css +2 -4
- package/src/Pagination/Pagination.module.scss +37 -39
- package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.module.scss +9 -11
- package/src/Pagination/subcomponents/PaginationLink/PaginationLink.module.scss +51 -53
- package/src/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.module.css +8 -10
- package/src/Popover/Popover.module.scss +185 -187
- package/src/ProgressBar/ProgressBar.module.scss +73 -75
- package/src/ProgressBar/subcomponents/Label/Label.module.scss +4 -6
- package/src/Radio/Radio/Radio.module.scss +58 -60
- package/src/Radio/RadioField/RadioField.module.scss +32 -33
- package/src/Radio/RadioGroup/RadioGroup.module.scss +16 -18
- package/src/RichTextEditor/EditableRichTextContent/EditableRichTextContent.module.scss +30 -32
- package/src/RichTextEditor/RichTextContent/RichTextContent.module.scss +2 -4
- package/src/RichTextEditor/RichTextEditor/RichTextEditor.module.scss +74 -76
- package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/ToggleIconButton.module.scss +90 -92
- package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/Toolbar.module.scss +3 -5
- package/src/RichTextEditor/RichTextEditor/subcomponents/ToolbarSection/ToolbarSection.module.scss +10 -12
- package/src/RichTextEditor/_mixins.scss +1 -2
- package/src/RichTextEditor/utils/plugins/LinkManager/components/LinkModal/LinkModal.module.scss +3 -5
- package/src/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.module.scss +20 -22
- package/src/RichTextEditor/utils/schema/marks.ts +8 -9
- package/src/SearchField/SearchField.module.scss +3 -5
- package/src/Select/Select.module.scss +0 -17
- package/src/Skirt/Skirt.module.scss +22 -24
- package/src/Skirt/subcomponents/SkirtCard/SkirtCard.module.scss +11 -13
- package/src/Slider/Slider.module.scss +32 -34
- package/src/SplitButton/SplitButton.module.scss +3 -5
- package/src/SplitButton/subcomponents/ActionButton/ActionButton.module.scss +5 -7
- package/src/SplitButton/subcomponents/BaseButton/BaseButton.module.scss +63 -65
- package/src/SplitButton/subcomponents/DropdownButton/DropdownButton.module.scss +17 -19
- package/src/Table/Table.module.scss +249 -251
- package/src/Tabs/subcomponents/Tab.module.scss +79 -81
- package/src/Tabs/subcomponents/TabList.module.scss +6 -8
- package/src/Tabs/subcomponents/TabPanel.module.scss +8 -10
- package/src/Tag/Tag.module.scss +164 -166
- package/src/Tag/subcomponents/LiveIcon/LiveIcon.module.css +40 -42
- package/src/Text/Text.module.scss +55 -57
- package/src/TextArea/TextArea.module.css +100 -103
- package/src/TextAreaField/TextAreaField.module.scss +12 -14
- package/src/TextField/TextField.module.scss +14 -16
- package/src/Tile/MultiActionTile/MultiActionTile.module.scss +5 -7
- package/src/Tile/TileGrid/TileGrid.module.scss +16 -18
- package/src/Tile/subcomponents/GenericTile/GenericTile.module.scss +121 -123
- package/src/TimeField/TimeField.module.scss +55 -57
- package/src/TimeField/subcomponents/TimeSegment/TimeSegment.module.scss +35 -37
- package/src/TitleBlockZen/TitleBlockZen.module.scss +505 -507
- package/src/TitleBlockZen/subcomponents/MainActions.module.scss +9 -11
- package/src/TitleBlockZen/subcomponents/MobileActions.module.scss +144 -146
- package/src/TitleBlockZen/subcomponents/NavigationTabs.module.scss +103 -105
- package/src/TitleBlockZen/subcomponents/TitleBlockMenuItem.module.scss +72 -74
- package/src/TitleBlockZen/subcomponents/Toolbar.module.scss +26 -28
- package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss +103 -105
- package/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.module.scss +9 -11
- package/src/Tooltip/Tooltip.module.scss +137 -139
- package/src/VisuallyHidden/VisuallyHidden.module.scss +8 -10
- package/src/Well/Well.module.css +102 -104
- package/src/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.module.css +12 -14
- package/src/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.css +99 -101
- package/src/Workflow/subcomponents/Footer/components/Root/FooterRoot.module.css +17 -19
- package/src/Workflow/subcomponents/Header/components/Actions/Actions.module.css +12 -14
- package/src/Workflow/subcomponents/Header/components/Branding/Branding.module.css +10 -12
- package/src/Workflow/subcomponents/Header/components/Root/Root.module.css +17 -19
- package/src/Workflow/subcomponents/Header/components/Titles/Titles.module.css +17 -19
- package/src/Workflow/subcomponents/Main/Main.module.css +3 -5
- package/src/Workflow/subcomponents/Wrapper/Wrapper.module.css +6 -8
- package/src/__next__/Button/Button.module.css +218 -220
- package/src/__next__/Button/subcomponents/ButtonContent/ButtonContent.module.css +15 -17
- package/src/__next__/Button/subcomponents/PendingContent/PendingContent.module.css +13 -15
- package/src/__next__/Icon/Icon.module.css +38 -40
- package/src/__next__/Icon/_docs/Icon.docs.module.css +11 -13
- package/src/__next__/Menu/Menu.module.css +28 -30
- package/src/__next__/Menu/MenuItem.module.css +39 -41
- package/src/__next__/Select/Select.module.scss +6 -8
- package/src/__next__/Select/subcomponents/ListBox/ListBox.module.scss +10 -12
- package/src/__next__/Select/subcomponents/ListBoxSection/ListBoxSection.module.scss +13 -15
- package/src/__next__/Select/subcomponents/Option/Option.module.scss +51 -53
- package/src/__next__/Select/subcomponents/SectionDivider/SectionDivider.module.scss +6 -8
- package/src/__next__/Select/subcomponents/SelectPopoverContents/SelectPopoverContents.module.scss +2 -4
- package/src/__next__/Select/subcomponents/SelectToggle/SelectToggle.module.scss +103 -105
- package/src/__next__/Tabs/subcomponents/Tab/Tab.module.css +79 -81
- package/src/__next__/Tabs/subcomponents/TabList/TabList.module.css +54 -56
- package/src/__next__/Tabs/subcomponents/TabPanel/TabPanel.module.css +8 -10
- package/src/__next__/Tag/RemovableTag/RemovableTag.module.scss +4 -6
- package/src/__next__/Tag/RemovableTag/subcomponents/RemoveButton.module.scss +24 -26
- package/src/__next__/Tag/Tag/Tag.module.scss +54 -56
- package/src/__next__/Tooltip/OverlayArrow.module.scss +38 -40
- package/src/__next__/Tooltip/Tooltip.module.scss +37 -39
- package/src/__next__/Tooltip/_docs/ApiSpecification.mdx +2 -2
- package/src/__next__/Tooltip/_docs/Tooltip.docs.stories.tsx +30 -15
- package/src/__next__/Tooltip/_docs/Tooltip.mdx +1 -1
- package/src/__next__/Tooltip/_docs/Tooltip.spec.stories.tsx +58 -21
- package/src/__next__/Tooltip/_docs/Tooltip.stories.tsx +2 -2
- package/src/utils/AppearanceAnim.module.scss +12 -14
|
@@ -3,9 +3,9 @@ import type { Locale } from 'date-fns'
|
|
|
3
3
|
import {
|
|
4
4
|
DayPicker,
|
|
5
5
|
type DateRange,
|
|
6
|
-
type
|
|
6
|
+
type DayClickEventHandler,
|
|
7
|
+
type DayPickerRangeProps,
|
|
7
8
|
type Matcher,
|
|
8
|
-
type PropsBase,
|
|
9
9
|
} from 'react-day-picker'
|
|
10
10
|
import { Icon } from '~components/__next__/Icon'
|
|
11
11
|
import { baseCalendarClassNames } from '../baseCalendarClassNames'
|
|
@@ -22,7 +22,7 @@ export type LegacyCalendarRangeProps = {
|
|
|
22
22
|
disabledDays?: Matcher[]
|
|
23
23
|
selectedRange?: DateRange
|
|
24
24
|
locale: Locale
|
|
25
|
-
onDayChange:
|
|
25
|
+
onDayChange: DayClickEventHandler
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export const LegacyCalendarRange = ({
|
|
@@ -38,13 +38,14 @@ export const LegacyCalendarRange = ({
|
|
|
38
38
|
const selectedMonth = monthToShow && isInvalidDate(monthToShow) ? undefined : monthToShow
|
|
39
39
|
|
|
40
40
|
/* eslint-disable camelcase */
|
|
41
|
-
const classNames
|
|
41
|
+
const classNames = {
|
|
42
42
|
...baseCalendarClassNames,
|
|
43
43
|
nav: styles.nav,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
nav_button_next: styles.navButtonNext,
|
|
45
|
+
day_range_start: styles.dayRangeStart,
|
|
46
|
+
day_range_end: styles.dayRangeEnd,
|
|
47
|
+
day_range_middle: styles.dayRangeMiddle,
|
|
48
|
+
} satisfies DayPickerRangeProps['classNames']
|
|
48
49
|
/* eslint-enable camelcase */
|
|
49
50
|
|
|
50
51
|
return (
|
|
@@ -58,13 +59,8 @@ export const LegacyCalendarRange = ({
|
|
|
58
59
|
onDayClick={onDayChange}
|
|
59
60
|
classNames={classNames}
|
|
60
61
|
components={{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return <Icon name="arrow_back" isPresentational shouldMirrorInRTL />
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return <Icon name="arrow_forward" isPresentational shouldMirrorInRTL />
|
|
67
|
-
},
|
|
62
|
+
IconRight: () => <Icon name="arrow_forward" isPresentational shouldMirrorInRTL />,
|
|
63
|
+
IconLeft: () => <Icon name="arrow_back" isPresentational shouldMirrorInRTL />,
|
|
68
64
|
}}
|
|
69
65
|
locale={locale}
|
|
70
66
|
/>
|
|
@@ -4,193 +4,198 @@
|
|
|
4
4
|
@import '~@kaizen/design-tokens/sass/border';
|
|
5
5
|
@import '../../styles/utils/button-reset';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
$rdp-cell-size: 40px;
|
|
7
|
+
$button-border-radius: 3px;
|
|
8
|
+
$rdp-cell-size: 40px;
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
%focus-ring {
|
|
11
|
+
position: relative;
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
&:focus {
|
|
14
|
+
outline: none;
|
|
15
|
+
}
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
&:focus-visible {
|
|
18
|
+
outline: none;
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
&::after {
|
|
21
|
+
$focus-ring-offset: calc(-1 * calc((#{$border-focus-ring-border-width} * 2) + 1px));
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
23
|
+
z-index: 2;
|
|
24
|
+
content: '';
|
|
25
|
+
position: absolute;
|
|
26
|
+
inset: $focus-ring-offset;
|
|
27
|
+
border-radius: $button-border-radius;
|
|
30
28
|
}
|
|
31
29
|
}
|
|
30
|
+
}
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
%focus-ring--enabled {
|
|
33
|
+
@extend %focus-ring;
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
35
|
+
&:focus-visible {
|
|
36
|
+
&::after {
|
|
37
|
+
border: $border-focus-ring-border-width $border-focus-ring-border-style $color-blue-500;
|
|
40
38
|
}
|
|
41
39
|
}
|
|
40
|
+
}
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.months {
|
|
49
|
-
display: flex;
|
|
50
|
-
}
|
|
42
|
+
.root {
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
}
|
|
51
45
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
.months {
|
|
47
|
+
display: flex;
|
|
48
|
+
}
|
|
55
49
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
.buttonReset {
|
|
51
|
+
@include button-reset;
|
|
52
|
+
}
|
|
59
53
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
justify-content: center;
|
|
64
|
-
margin: 0 0 $spacing-xs;
|
|
65
|
-
}
|
|
54
|
+
.button {
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
}
|
|
66
57
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
white-space: nowrap;
|
|
75
|
-
font-family: $typography-heading-4-font-family;
|
|
76
|
-
font-size: $typography-heading-4-font-size;
|
|
77
|
-
font-weight: $typography-heading-5-font-weight;
|
|
78
|
-
line-height: $typography-heading-4-line-height;
|
|
79
|
-
letter-spacing: $typography-heading-4-letter-spacing;
|
|
80
|
-
color: $color-purple-800;
|
|
81
|
-
}
|
|
58
|
+
.caption {
|
|
59
|
+
position: relative;
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
margin: 0 0 $spacing-xs;
|
|
64
|
+
}
|
|
82
65
|
|
|
83
|
-
|
|
84
|
-
|
|
66
|
+
.captionLabel {
|
|
67
|
+
position: relative;
|
|
68
|
+
z-index: 1;
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
margin: 0;
|
|
72
|
+
padding: 0 0.25em;
|
|
73
|
+
white-space: nowrap;
|
|
74
|
+
font-family: $typography-heading-4-font-family;
|
|
75
|
+
font-size: $typography-heading-4-font-size;
|
|
76
|
+
font-weight: $typography-heading-5-font-weight;
|
|
77
|
+
line-height: $typography-heading-4-line-height;
|
|
78
|
+
letter-spacing: $typography-heading-4-letter-spacing;
|
|
79
|
+
color: $color-purple-800;
|
|
80
|
+
}
|
|
85
81
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
border: $border-solid-border-width $border-solid-border-style transparent;
|
|
89
|
-
border-radius: $button-border-radius;
|
|
82
|
+
.navButton {
|
|
83
|
+
@extend %focus-ring--enabled;
|
|
90
84
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
85
|
+
display: inherit;
|
|
86
|
+
padding: 0.25rem $spacing-xs;
|
|
87
|
+
border: $border-solid-border-width $border-solid-border-style transparent;
|
|
88
|
+
border-radius: $button-border-radius;
|
|
95
89
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
90
|
+
&:hover {
|
|
91
|
+
background-color: $color-blue-100;
|
|
92
|
+
color: $color-blue-500;
|
|
100
93
|
}
|
|
101
94
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
margin: 0;
|
|
106
|
-
max-width: calc(#{$rdp-cell-size} * 7);
|
|
95
|
+
&:focus-visible {
|
|
96
|
+
background-color: $color-blue-100;
|
|
97
|
+
color: $color-blue-500;
|
|
107
98
|
}
|
|
99
|
+
}
|
|
108
100
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
line-height: $typography-paragraph-body-line-height;
|
|
116
|
-
}
|
|
101
|
+
.table {
|
|
102
|
+
border-collapse: separate;
|
|
103
|
+
border-spacing: 1px;
|
|
104
|
+
margin: 0;
|
|
105
|
+
max-width: calc(#{$rdp-cell-size} * 7);
|
|
106
|
+
}
|
|
117
107
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
108
|
+
.tbody {
|
|
109
|
+
border: 0;
|
|
110
|
+
font-family: $typography-paragraph-body-font-family;
|
|
111
|
+
font-size: $typography-paragraph-body-font-size;
|
|
112
|
+
letter-spacing: $typography-paragraph-body-letter-spacing;
|
|
113
|
+
font-weight: $typography-paragraph-body-font-weight;
|
|
114
|
+
line-height: $typography-paragraph-body-line-height;
|
|
115
|
+
}
|
|
127
116
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
117
|
+
.weekday {
|
|
118
|
+
padding: 0.5rem 0;
|
|
119
|
+
font-family: $typography-paragraph-body-font-family;
|
|
120
|
+
font-size: $typography-paragraph-body-font-size;
|
|
121
|
+
letter-spacing: $typography-paragraph-body-letter-spacing;
|
|
122
|
+
font-weight: $typography-paragraph-body-font-weight;
|
|
123
|
+
line-height: $typography-paragraph-body-line-height;
|
|
124
|
+
color: $color-purple-800;
|
|
125
|
+
}
|
|
134
126
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
box-sizing: border-box;
|
|
142
|
-
width: $rdp-cell-size;
|
|
143
|
-
max-width: $rdp-cell-size;
|
|
144
|
-
height: $rdp-cell-size;
|
|
145
|
-
margin: 0;
|
|
146
|
-
border: $border-borderless-border-width $border-borderless-border-style
|
|
147
|
-
$border-borderless-border-color;
|
|
148
|
-
border-radius: $button-border-radius;
|
|
149
|
-
padding: calc(#{$spacing-md} / 3) 0.625rem;
|
|
150
|
-
color: $color-purple-800;
|
|
151
|
-
|
|
152
|
-
&:hover {
|
|
153
|
-
background-color: $color-blue-100;
|
|
154
|
-
color: $color-blue-500;
|
|
155
|
-
}
|
|
127
|
+
.cell {
|
|
128
|
+
width: $rdp-cell-size;
|
|
129
|
+
height: $rdp-cell-size;
|
|
130
|
+
padding: 0;
|
|
131
|
+
text-align: center;
|
|
132
|
+
}
|
|
156
133
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
134
|
+
.day {
|
|
135
|
+
@extend %focus-ring--enabled;
|
|
136
|
+
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
justify-content: center;
|
|
140
|
+
box-sizing: border-box;
|
|
141
|
+
width: $rdp-cell-size;
|
|
142
|
+
max-width: $rdp-cell-size;
|
|
143
|
+
height: $rdp-cell-size;
|
|
144
|
+
margin: 0;
|
|
145
|
+
border: $border-borderless-border-width $border-borderless-border-style
|
|
146
|
+
$border-borderless-border-color;
|
|
147
|
+
border-radius: $button-border-radius;
|
|
148
|
+
padding: calc(#{$spacing-md} / 3) 0.625rem;
|
|
149
|
+
color: $color-purple-800;
|
|
150
|
+
|
|
151
|
+
&:hover {
|
|
152
|
+
background-color: $color-blue-100;
|
|
153
|
+
color: $color-blue-500;
|
|
161
154
|
}
|
|
162
155
|
|
|
163
|
-
|
|
156
|
+
&:focus-visible {
|
|
157
|
+
background-color: $color-blue-100;
|
|
164
158
|
color: $color-blue-500;
|
|
165
|
-
font-weight: bold;
|
|
166
159
|
}
|
|
160
|
+
}
|
|
167
161
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
162
|
+
.dayToday {
|
|
163
|
+
color: $color-blue-500;
|
|
164
|
+
font-weight: bold;
|
|
165
|
+
}
|
|
172
166
|
|
|
173
|
-
|
|
174
|
-
|
|
167
|
+
.daySelected {
|
|
168
|
+
background-color: $color-blue-500;
|
|
169
|
+
color: $color-white;
|
|
175
170
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
}
|
|
171
|
+
&:hover,
|
|
172
|
+
&:focus-visible {
|
|
173
|
+
background-color: $color-blue-400;
|
|
174
|
+
color: $color-white;
|
|
182
175
|
}
|
|
176
|
+
}
|
|
183
177
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
178
|
+
.dayDisabled {
|
|
179
|
+
// Focus ring styles have been removed as react-day-picker has been updated such that
|
|
180
|
+
// disabled days do not receive focus, and keyboard navigation only lands on available days.
|
|
181
|
+
// https://github.com/gpbl/react-day-picker/pull/1519
|
|
182
|
+
// https://github.com/gpbl/react-day-picker/issues/1449#issuecomment-1149942033
|
|
183
|
+
background: none;
|
|
184
|
+
pointer-events: none;
|
|
185
|
+
color: rgba($color-purple-800-rgb, 0.3);
|
|
186
|
+
}
|
|
191
187
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
188
|
+
// We can't use <VisuallyHidden />, so copied the styles here.
|
|
189
|
+
%visually-hidden {
|
|
190
|
+
clip: rect(0 0 0 0);
|
|
191
|
+
clip-path: inset(50%);
|
|
192
|
+
height: 1px;
|
|
193
|
+
overflow: hidden;
|
|
194
|
+
position: absolute;
|
|
195
|
+
white-space: nowrap;
|
|
196
|
+
width: 1px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.vHidden {
|
|
200
|
+
@extend %visually-hidden;
|
|
196
201
|
}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import { type
|
|
2
|
+
import { type ClassNames } from 'react-day-picker'
|
|
3
3
|
import styles from './baseCalendarClassNames.module.scss'
|
|
4
4
|
|
|
5
|
-
export const baseCalendarClassNames:
|
|
5
|
+
export const baseCalendarClassNames: ClassNames = {
|
|
6
|
+
vhidden: styles.vHidden,
|
|
6
7
|
root: styles.root,
|
|
7
8
|
months: styles.months,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
day: styles.cell,
|
|
12
|
-
month_caption: styles.caption,
|
|
9
|
+
button_reset: styles.buttonReset,
|
|
10
|
+
button: styles.button,
|
|
11
|
+
caption: styles.caption,
|
|
13
12
|
caption_label: styles.captionLabel,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
nav_button: styles.navButton,
|
|
14
|
+
table: styles.table,
|
|
15
|
+
head_cell: styles.weekday,
|
|
16
|
+
cell: styles.cell,
|
|
17
|
+
day: styles.day,
|
|
18
|
+
tbody: styles.tbody,
|
|
19
|
+
day_selected: styles.daySelected,
|
|
20
|
+
day_today: styles.dayToday,
|
|
21
|
+
day_disabled: styles.dayDisabled,
|
|
20
22
|
}
|
|
@@ -8,8 +8,7 @@ describe('isSelectingDayInCalendar', () => {
|
|
|
8
8
|
render(<CalendarSingle defaultMonth={new Date('2022-02-01')} />)
|
|
9
9
|
const targetMonth = screen.getByRole('grid', { name: 'February 2022' })
|
|
10
10
|
const targetDay = within(targetMonth).getByRole('gridcell', { name: '1' })
|
|
11
|
-
|
|
12
|
-
expect(isSelectingDayInCalendar(targetBtn)).toBe(true)
|
|
11
|
+
expect(isSelectingDayInCalendar(targetDay)).toBe(true)
|
|
13
12
|
})
|
|
14
13
|
|
|
15
14
|
it('returns false when target is not a Calendar day', () => {
|
|
@@ -27,8 +27,7 @@ describe('setFocusInCalendar', () => {
|
|
|
27
27
|
const targetDay = within(targetMonth).getByRole('gridcell', {
|
|
28
28
|
name: todayDay,
|
|
29
29
|
})
|
|
30
|
-
|
|
31
|
-
expect(targetBtn).toHaveFocus()
|
|
30
|
+
expect(targetDay).toHaveFocus()
|
|
32
31
|
})
|
|
33
32
|
|
|
34
33
|
it('should focus on the selected day', () => {
|
|
@@ -36,8 +35,7 @@ describe('setFocusInCalendar', () => {
|
|
|
36
35
|
|
|
37
36
|
const targetMonth = screen.getByRole('grid', { name: 'August 2022' })
|
|
38
37
|
const targetDay = within(targetMonth).getByRole('gridcell', { name: '15' })
|
|
39
|
-
|
|
40
|
-
expect(targetBtn).toHaveFocus()
|
|
38
|
+
expect(targetDay).toHaveFocus()
|
|
41
39
|
})
|
|
42
40
|
|
|
43
41
|
it('should focus on today when selected date is invalid', () => {
|
|
@@ -47,8 +45,7 @@ describe('setFocusInCalendar', () => {
|
|
|
47
45
|
const targetDay = within(targetMonth).getByRole('gridcell', {
|
|
48
46
|
name: todayDay,
|
|
49
47
|
})
|
|
50
|
-
|
|
51
|
-
expect(targetBtn).toHaveFocus()
|
|
48
|
+
expect(targetDay).toHaveFocus()
|
|
52
49
|
})
|
|
53
50
|
|
|
54
51
|
it('should focus on the first of the month when there is no selected day nor in the current month', () => {
|
|
@@ -56,7 +53,6 @@ describe('setFocusInCalendar', () => {
|
|
|
56
53
|
|
|
57
54
|
const targetMonth = screen.getByRole('grid', { name: 'May 2022' })
|
|
58
55
|
const targetDay = within(targetMonth).getByRole('gridcell', { name: '1' })
|
|
59
|
-
|
|
60
|
-
expect(targetBtn).toHaveFocus()
|
|
56
|
+
expect(targetDay).toHaveFocus()
|
|
61
57
|
})
|
|
62
58
|
})
|
|
@@ -3,21 +3,21 @@ import { type CalendarSingleElement } from '../CalendarSingle'
|
|
|
3
3
|
import calendarStyles from '../baseCalendarClassNames.module.scss'
|
|
4
4
|
import { isInvalidDate } from './isInvalidDate'
|
|
5
5
|
|
|
6
|
+
const isHTMLElement = (element: Element | undefined): element is HTMLElement =>
|
|
7
|
+
element instanceof HTMLElement
|
|
8
|
+
|
|
6
9
|
export const setFocusInCalendar = (
|
|
7
10
|
calendarElement: CalendarSingleElement | CalendarRangeElement,
|
|
8
11
|
selectedDay: Date | undefined,
|
|
9
12
|
): void => {
|
|
10
|
-
const
|
|
13
|
+
const daySelectedOrToday = calendarElement.getElementsByClassName(
|
|
11
14
|
selectedDay && !isInvalidDate(selectedDay)
|
|
12
|
-
?
|
|
13
|
-
:
|
|
14
|
-
|
|
15
|
-
let dayToFocus = calendarElement.querySelector(`${dayClass} button`)
|
|
15
|
+
? calendarStyles.daySelected
|
|
16
|
+
: calendarStyles.dayToday,
|
|
17
|
+
)[0]
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
const dayToFocus =
|
|
20
|
+
daySelectedOrToday ?? calendarElement.getElementsByClassName(calendarStyles.day)[0]
|
|
19
21
|
|
|
20
|
-
if (dayToFocus
|
|
21
|
-
dayToFocus.focus()
|
|
22
|
-
}
|
|
22
|
+
if (isHTMLElement(dayToFocus)) dayToFocus.focus()
|
|
23
23
|
}
|