@kaizen/components 1.52.1 → 1.54.0
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/Calendar/CalendarRange/CalendarRange.cjs +0 -2
- package/dist/cjs/Calendar/CalendarSingle/CalendarSingle.cjs +3 -5
- package/dist/cjs/DatePicker/DatePicker.cjs +8 -1
- package/dist/cjs/DatePicker/utils/getLocale.cjs +96 -3
- package/dist/cjs/DatePicker/utils/validateDate.cjs +28 -2
- package/dist/cjs/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.cjs +8 -1
- package/dist/cjs/Filter/FilterBar/subcomponents/ClearAllButton/ClearAllButton.cjs +14 -2
- package/dist/cjs/Filter/FilterBar/subcomponents/FilterBarDatePicker/FilterBarDatePicker.cjs +1 -0
- package/dist/cjs/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.cjs +10 -1
- package/dist/cjs/Filter/FilterDatePicker/subcomponents/DateInputField/DateInputField.cjs +8 -1
- package/dist/cjs/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/FilterDateRangePickerField.cjs +5 -1
- package/dist/cjs/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/useEndDateValidation.cjs +1 -0
- package/dist/cjs/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/useStartDateValidation.cjs +1 -0
- package/dist/cjs/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/validateEndDateBeforeStartDate.cjs +16 -1
- package/dist/esm/Calendar/CalendarRange/CalendarRange.mjs +0 -2
- package/dist/esm/Calendar/CalendarSingle/CalendarSingle.mjs +3 -5
- package/dist/esm/DatePicker/DatePicker.mjs +8 -1
- package/dist/esm/DatePicker/utils/getLocale.mjs +97 -4
- package/dist/esm/DatePicker/utils/validateDate.mjs +22 -2
- package/dist/esm/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.mjs +8 -1
- package/dist/esm/Filter/FilterBar/subcomponents/ClearAllButton/ClearAllButton.mjs +14 -2
- package/dist/esm/Filter/FilterBar/subcomponents/FilterBarDatePicker/FilterBarDatePicker.mjs +1 -0
- package/dist/esm/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.mjs +10 -1
- package/dist/esm/Filter/FilterDatePicker/subcomponents/DateInputField/DateInputField.mjs +8 -1
- package/dist/esm/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/FilterDateRangePickerField.mjs +5 -1
- package/dist/esm/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/useEndDateValidation.mjs +1 -0
- package/dist/esm/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/useStartDateValidation.mjs +1 -0
- package/dist/esm/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/validateEndDateBeforeStartDate.mjs +10 -1
- package/dist/styles.css +2 -2
- package/dist/types/AvatarGroup/_docs/example-data.d.ts +8 -0
- package/dist/types/BrandMoment/_docs/ExampleHeaders.d.ts +3 -0
- package/dist/types/Calendar/_docs/controls/defaultMonthControls.d.ts +2 -0
- package/dist/types/Calendar/_docs/controls/weekStartsOnControls.d.ts +2 -0
- package/dist/types/Container/Container.d.ts +1 -1
- package/dist/types/Content/Content.d.ts +1 -1
- package/dist/types/DateInput/DateInput/DateInput.d.ts +1 -1
- package/dist/types/DatePicker/DatePicker.d.ts +3 -3
- package/dist/types/DatePicker/_docs/controls/datePickerLocaleControls.d.ts +2 -0
- package/dist/types/DatePicker/_docs/controls/disabledDayMatchersControls.d.ts +2 -0
- package/dist/types/DatePicker/subcomponents/DateInputField/DateInputField.d.ts +1 -1
- package/dist/types/DatePicker/types.d.ts +2 -1
- package/dist/types/DatePicker/utils/getLocale.d.ts +1 -2
- package/dist/types/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/types/Filter/FilterBar/context/types.d.ts +28 -0
- package/dist/types/Filter/FilterButton/subcomponents/FilterButtonBase/FilterButtonBase.d.ts +1 -1
- package/dist/types/Filter/FilterDatePicker/_docs/controls/disabledDaysControls.d.ts +2 -0
- package/dist/types/Filter/FilterDatePicker/_docs/controls/validationControls.d.ts +2 -0
- package/dist/types/Filter/FilterDatePicker/subcomponents/DateInputField/DateInputField.d.ts +1 -1
- package/dist/types/Filter/FilterDateRangePicker/_docs/controls/disabledDaysControls.d.ts +2 -0
- package/dist/types/Filter/FilterDateRangePicker/_docs/controls/validationControls.d.ts +2 -0
- package/dist/types/Filter/FilterMultiSelect/_docs/MockData.d.ts +10 -0
- package/dist/types/Filter/FilterSelect/_docs/mockData.d.ts +6 -0
- package/dist/types/Filter/_docs/controls/renderTriggerControls.d.ts +2 -0
- package/dist/types/Menu/_docs/MenuContentExample.d.ts +8 -0
- package/dist/types/Menu/_docs/examples.d.ts +11 -0
- package/dist/types/Modal/_docs/controls.d.ts +11 -0
- package/dist/types/MultiSelect/MultiSelect.d.ts +23 -0
- package/dist/types/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.d.ts +13 -0
- package/dist/types/Select/Select.d.ts +3 -3
- package/dist/types/Workflow/_docs/controls/controls.d.ts +2 -0
- package/dist/types/Workflow/_docs/controls/index.d.ts +1 -0
- package/dist/types/__future__/Select/Select.d.ts +2 -2
- package/dist/types/__future__/Select/_docs/mockData.d.ts +6 -0
- package/dist/types/__future__/Select/subcomponents/SelectToggle/SelectToggle.d.ts +2 -2
- package/dist/types/__future__/Select/types.d.ts +22 -0
- package/dist/types/__future__/Workflow/_docs/controls/controls.d.ts +2 -0
- package/dist/types/__future__/Workflow/_docs/controls/index.d.ts +1 -0
- package/dist/types/__overlays__/Tooltip/v1/utils/isSemanticElement.d.ts +2 -2
- package/dist/types/utils/getNodeText.d.ts +2 -1
- package/locales/en.json +40 -0
- package/package.json +3 -3
- package/src/Avatar/_docs/Avatar.mdx +1 -1
- package/src/AvatarGroup/_docs/AvatarGroup.mdx +1 -1
- package/src/Badge/_docs/Badge.mdx +1 -1
- package/src/Brand/_docs/Brand.mdx +1 -1
- package/src/BrandMoment/_docs/BrandMoment.mdx +1 -1
- package/src/Button/Button/_docs/Button.mdx +1 -1
- package/src/Button/IconButton/_docs/IconButton.mdx +1 -1
- package/src/ButtonGroup/_docs/ButtonGroup.mdx +1 -1
- package/src/Calendar/CalendarRange/CalendarRange.tsx +0 -2
- package/src/Calendar/CalendarRange/_docs/CalendarRange.mdx +1 -1
- package/src/Calendar/CalendarSingle/CalendarSingle.tsx +1 -2
- package/src/Calendar/CalendarSingle/_docs/CalendarSingle.mdx +1 -1
- package/src/Card/_docs/Card.mdx +1 -1
- package/src/Checkbox/Checkbox/_docs/Checkbox.mdx +1 -1
- package/src/Checkbox/CheckboxField/_docs/CheckboxField.mdx +1 -1
- package/src/Checkbox/CheckboxGroup/_docs/CheckboxGroup.mdx +1 -1
- package/src/Collapsible/Collapsible/_docs/Collapsible.mdx +1 -1
- package/src/Collapsible/CollapsibleGroup/_docs/CollapsibleGroup.mdx +1 -1
- package/src/Collapsible/ExpertAdviceCollapsible/_docs/ExpertAdviceCollapsible.mdx +1 -1
- package/src/Container/_docs/Container.mdx +1 -1
- package/src/Content/_docs/Content.mdx +1 -1
- package/src/DateInput/DateInputDescription/DateInputDescription.spec.tsx +26 -18
- package/src/DatePicker/DatePicker.spec.tsx +100 -69
- package/src/DatePicker/DatePicker.tsx +15 -7
- package/src/DatePicker/_docs/DatePicker.mdx +1 -3
- package/src/DatePicker/_docs/DatePicker.stickersheet.stories.tsx +57 -21
- package/src/DatePicker/_docs/DatePicker.stories.tsx +2 -3
- package/src/DatePicker/_docs/controls/datePickerLocaleControls.ts +8 -2
- package/src/DatePicker/_docs/getLocale.stickersheet.stories.tsx +49 -0
- package/src/DatePicker/subcomponents/DateInputField/DateInputField.spec.tsx +49 -36
- package/src/DatePicker/types.ts +2 -1
- package/src/DatePicker/utils/getLocale.spec.ts +2 -2
- package/src/DatePicker/utils/getLocale.ts +141 -6
- package/src/DatePicker/utils/validateDate.spec.ts +40 -16
- package/src/DatePicker/utils/{validateDate.ts → validateDate.tsx} +24 -4
- package/src/DateRangePicker/DateRangePicker.tsx +2 -2
- package/src/DateRangePicker/_docs/DateRangePicker.mdx +1 -1
- package/src/Divider/_docs/Divider.mdx +1 -1
- package/src/EmptyState/_docs/EmptyState.mdx +1 -1
- package/src/ErrorPage/_docs/ErrorPage.mdx +1 -1
- package/src/FieldGroup/_docs/FieldGroup.mdx +1 -1
- package/src/FieldMessage/_docs/FieldMessage.mdx +1 -1
- package/src/Filter/Filter/_docs/Filter.mdx +1 -1
- package/src/Filter/FilterBar/FilterBar.spec.tsx +56 -25
- package/src/Filter/FilterBar/_docs/FilterBar.mdx +1 -1
- package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.spec.tsx +21 -13
- package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx +11 -1
- package/src/Filter/FilterBar/subcomponents/ClearAllButton/ClearAllButton.tsx +17 -2
- package/src/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.spec.tsx +17 -8
- package/src/Filter/FilterBar/subcomponents/FilterBarDatePicker/FilterBarDatePicker.spec.tsx +37 -23
- package/src/Filter/FilterBar/subcomponents/FilterBarDateRangePicker/FilterBarDateRangePicker.spec.tsx +35 -23
- package/src/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.spec.tsx +42 -26
- package/src/Filter/FilterBar/subcomponents/FilterBarSelect/FilterBarSelect.spec.tsx +37 -24
- package/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.spec.tsx +12 -12
- package/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.tsx +15 -2
- package/src/Filter/FilterButton/_docs/filter-buttons.mdx +1 -1
- package/src/Filter/FilterDatePicker/FilterDatePicker.spec.tsx +21 -16
- package/src/Filter/FilterDatePicker/_docs/FilterDatePicker.mdx +1 -1
- package/src/Filter/FilterDatePicker/_docs/FilterDatePicker.stickersheet.stories.tsx +56 -1
- package/src/Filter/FilterDatePicker/hooks/useDateInputHandlers.spec.ts +3 -3
- package/src/Filter/FilterDatePicker/hooks/{useDateValidation.spec.tsx → useDateValidation.spec.ts} +13 -12
- package/src/Filter/FilterDatePicker/subcomponents/DateInputField/DateInputField.tsx +10 -1
- package/src/Filter/FilterDatePicker/subcomponents/FilterDatePickerField/FilterDatePickerField.spec.tsx +57 -36
- package/src/Filter/FilterDatePicker/utils/validateDate.spec.ts +52 -28
- package/src/Filter/FilterDateRangePicker/FilterDateRangePicker.spec.tsx +3 -2
- package/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.mdx +1 -1
- package/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.stickersheet.stories.tsx +55 -24
- package/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.spec.tsx +43 -28
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/FilterDateRangePickerField.spec.tsx +82 -48
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/FilterDateRangePickerField.tsx +6 -1
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/{useEndDateValidation.spec.tsx → useEndDateValidation.spec.ts} +23 -20
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/{useStartDateValidation.spec.tsx → useStartDateValidation.spec.ts} +13 -11
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/validateEndDateBeforeStartDate.spec.ts +17 -6
- package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/{validateEndDateBeforeStartDate.ts → validateEndDateBeforeStartDate.tsx} +9 -3
- package/src/Filter/FilterMultiSelect/FilterMultiSelect.spec.tsx +10 -14
- package/src/Filter/FilterMultiSelect/_docs/FilterMultiSelect.mdx +1 -1
- package/src/Filter/FilterMultiSelect/context/SelectionProvider/SelectionProvider.spec.tsx +392 -372
- package/src/Filter/FilterMultiSelect/subcomponents/SearchInput/SearchInput.spec.tsx +9 -6
- package/src/Filter/FilterSelect/_docs/FilterSelect.mdx +1 -1
- package/src/GuidanceBlock/_docs/GuidanceBlock.mdx +1 -1
- package/src/Heading/_docs/Heading.mdx +1 -1
- package/src/Icon/_docs/Icon.mdx +1 -1
- package/src/Illustration/Scene/BrandMomentCaptureIntro/_docs/BrandMomentCaptureIntro.mdx +1 -1
- package/src/Illustration/Scene/_docs/Scene.mdx +1 -1
- package/src/Illustration/Spot/_docs/Spot.mdx +1 -1
- package/src/Input/Input/_docs/Input.mdx +1 -1
- package/src/Input/InputRange/_docs/InputRange.mdx +1 -1
- package/src/Input/InputSearch/InputSearch.spec.tsx +15 -14
- package/src/Input/InputSearch/_docs/InputSearch.mdx +1 -1
- package/src/Label/_docs/Label.mdx +1 -1
- package/src/LabelledMessage/_docs/LabelledMessage.mdx +1 -1
- package/src/LikertScaleLegacy/_docs/LikertScaleLegacy.mdx +1 -1
- package/src/Loading/LoadingGraphic/_docs/LoadingGraphic.mdx +1 -1
- package/src/Loading/LoadingHeading/_docs/LoadingHeading.mdx +1 -1
- package/src/Loading/LoadingInput/_docs/LoadingInput.mdx +1 -1
- package/src/Loading/LoadingParagraph/_docs/LoadingParagraph.mdx +1 -1
- package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.mdx +1 -1
- package/src/Menu/_docs/Menu.mdx +1 -1
- package/src/Modal/ConfirmationModal/_docs/ConfirmationModal.mdx +1 -1
- package/src/Modal/ContextModal/_docs/ContextModal.mdx +1 -1
- package/src/Modal/GenericModal/_docs/GenericModal.mdx +1 -1
- package/src/Modal/InputEditModal/_docs/InputEditModal.mdx +1 -1
- package/src/MultiSelect/_docs/MultiSelect.mdx +1 -1
- package/src/Notification/GlobalNotification/_docs/GlobalNotification.mdx +1 -1
- package/src/Notification/InlineNotification/_docs/InlineNotification.mdx +1 -1
- package/src/Notification/ToastNotification/_docs/ToastNotification.mdx +1 -1
- package/src/Pagination/_docs/Pagination.mdx +1 -1
- package/src/Pagination/subcomponents/DirectionalLink/_docs/DirectionalLink.mdx +1 -1
- package/src/Pagination/subcomponents/PaginationLink/_docs/PaginationLink.mdx +1 -1
- package/src/Popover/_docs/Popover.mdx +1 -1
- package/src/ProgressBar/_docs/ProgressBar.mdx +1 -1
- package/src/Radio/Radio/_docs/Radio.mdx +1 -1
- package/src/Radio/RadioField/_docs/RadioField.mdx +1 -1
- package/src/Radio/RadioGroup/_docs/RadioGroup.mdx +1 -1
- package/src/RichTextEditor/EditableRichTextContent/_docs/EditableRichTextContent.mdx +1 -1
- package/src/RichTextEditor/RichTextContent/_docs/RichTextContent.mdx +1 -1
- package/src/RichTextEditor/RichTextEditor/_docs/RichTextEditor.mdx +1 -1
- package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.mdx +1 -1
- package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/_docs/Toolbar.mdx +1 -1
- package/src/SearchField/_docs/SearchField.mdx +1 -1
- package/src/Select/_docs/Select.mdx +1 -1
- package/src/Skirt/_docs/Skirt.mdx +1 -1
- package/src/Slider/_docs/Slider.mdx +1 -1
- package/src/SplitButton/SplitButton.spec.tsx +11 -6
- package/src/SplitButton/_docs/SplitButton.mdx +1 -1
- package/src/SplitButton/subcomponents/DropdownButton/DropdownButton.spec.tsx +15 -10
- package/src/Table/_docs/Table.mdx +1 -1
- package/src/Tabs/_docs/Tabs.mdx +1 -1
- package/src/Tag/_docs/Tag.mdx +1 -1
- package/src/Text/_docs/Text.mdx +1 -1
- package/src/TextArea/_docs/TextArea.mdx +1 -1
- package/src/TextAreaField/_docs/TextAreaField.mdx +1 -1
- package/src/TextField/_docs/TextField.mdx +1 -1
- package/src/Tile/InformationTile/_docs/InformationTile.mdx +1 -1
- package/src/Tile/MultiActionTile/_docs/MultiActionTile.mdx +1 -1
- package/src/Tile/TileGrid/_docs/TileGrid.mdx +1 -1
- package/src/TimeField/_docs/TimeField.mdx +1 -1
- package/src/TitleBlockZen/_docs/TitleBlockZen.mdx +1 -1
- package/src/ToggleSwitch/ToggleSwitch/_docs/ToggleSwitch.mdx +1 -1
- package/src/ToggleSwitch/ToggleSwitchField/_docs/ToggleSwitchField.mdx +1 -1
- package/src/VisuallyHidden/_docs/VisuallyHidden.mdx +1 -1
- package/src/Well/_docs/Well.mdx +1 -1
- package/src/Workflow/_docs/ProgressStepper.mdx +1 -1
- package/src/Workflow/_docs/Workflow.mdx +1 -1
- package/src/Workflow/_docs/WorkflowFooter.mdx +1 -1
- package/src/Workflow/_docs/WorkflowHeader.mdx +1 -1
- package/src/__future__/Select/_docs/Select.mdx +1 -1
- package/src/__future__/Tag/Tag/_docs/Tag.mdx +1 -1
- package/src/__future__/Workflow/_docs/ProgressStepper.mdx +1 -1
- package/src/__future__/Workflow/_docs/Workflow.mdx +1 -1
- package/src/__future__/Workflow/_docs/WorkflowFooter.mdx +1 -1
- package/src/__future__/Workflow/_docs/WorkflowHeader.mdx +1 -1
- package/src/__overlays__/Tooltip/v1/_docs/Tooltip.mdx +1 -1
- package/src/__overlays__/Tooltip/v3/_docs/ApiSpecification.mdx +0 -1
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.docs.stories.tsx +52 -0
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.mdx +40 -61
- package/src/__overlays__/Tooltip/v3/_docs/assets/tooltip_spec.png +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Node, Key } from "@react-types/shared";
|
|
2
|
+
export type SelectOption = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: Key;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
options?: never;
|
|
7
|
+
};
|
|
8
|
+
export type SelectOptionGroup<Option extends SelectOption> = {
|
|
9
|
+
label: string;
|
|
10
|
+
options: Iterable<Option>;
|
|
11
|
+
};
|
|
12
|
+
export type SelectItem<Option extends SelectOption = SelectOption> = Option | SelectOptionGroup<Option>;
|
|
13
|
+
export type SelectOptionNode<Option extends SelectOption = SelectOption> = Node<Option> & {
|
|
14
|
+
type: "item";
|
|
15
|
+
hasChildNodes: false;
|
|
16
|
+
};
|
|
17
|
+
export type SelectOptionGroupNode<Option extends SelectOption = SelectOption> = Omit<Node<SelectOptionGroup<Option>>, "childNodes"> & {
|
|
18
|
+
type: "section";
|
|
19
|
+
hasChildNodes: true;
|
|
20
|
+
childNodes: Array<SelectOptionNode<Option>>;
|
|
21
|
+
};
|
|
22
|
+
export type SelectItemNode<Option extends SelectOption = SelectOption> = SelectOptionNode<Option> | SelectOptionGroupNode<Option>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./controls";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
export declare function extractDisplayName(type: React.FunctionComponent): string;
|
|
3
3
|
/**
|
|
4
4
|
* Validates implicit or explicitly semantic roles required to make `aria-describedby` announce predictably with screen readers
|
|
5
5
|
*/
|
|
6
|
-
export declare const isSemanticElement: (element:
|
|
6
|
+
export declare const isSemanticElement: (element: ReactNode) => element is React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const getNodeText: (node: React.ReactNode) => string | number;
|
package/locales/en.json
CHANGED
|
@@ -10,10 +10,50 @@
|
|
|
10
10
|
],
|
|
11
11
|
"variants_enabled": true
|
|
12
12
|
},
|
|
13
|
+
"date.validation.invalidDate": {
|
|
14
|
+
"description": "Error message when the user enters an invalid date and we do not know their input value",
|
|
15
|
+
"message": "Date is invalid"
|
|
16
|
+
},
|
|
17
|
+
"date.validation.invalidDateWithValue": {
|
|
18
|
+
"description": "Error message when the user enters an invalid date and we know their input value",
|
|
19
|
+
"message": "{inputValue} is an invalid date"
|
|
20
|
+
},
|
|
21
|
+
"date.validation.rangeEndBeforeRangeStart": {
|
|
22
|
+
"description": "Error message when the user tries to select an end date earlier than the start date",
|
|
23
|
+
"message": "Cannot be earlier than the selection in \"{startDateFieldLabel}\""
|
|
24
|
+
},
|
|
25
|
+
"date.validation.unavailableDate": {
|
|
26
|
+
"description": "Error message when the user tries to select a date that is unavailable",
|
|
27
|
+
"message": "{inputValue} is not available, try another date"
|
|
28
|
+
},
|
|
13
29
|
"dateInputDescription.inputFormat": {
|
|
14
30
|
"description": "Label for the 'Input format' field",
|
|
15
31
|
"message": "Input format"
|
|
16
32
|
},
|
|
33
|
+
"datePicker.calendarLabelDescription": {
|
|
34
|
+
"description": "Label for the search input",
|
|
35
|
+
"message": "Select date from calendar for:"
|
|
36
|
+
},
|
|
37
|
+
"filterBar.addFiltersMenu.buttonLabel": {
|
|
38
|
+
"description": "Menu button label to show additional available filter options",
|
|
39
|
+
"message": "Add Filters"
|
|
40
|
+
},
|
|
41
|
+
"filterBar.clearAllButton.ariaLabel": {
|
|
42
|
+
"description": "Button aria-label to clear all values within the filter bar",
|
|
43
|
+
"message": "Clear all filters"
|
|
44
|
+
},
|
|
45
|
+
"filterBar.clearAllButton.label": {
|
|
46
|
+
"description": "Button label to clear all values within the filter bar",
|
|
47
|
+
"message": "Clear all"
|
|
48
|
+
},
|
|
49
|
+
"filterButton.removable.removeButtonLabel": {
|
|
50
|
+
"description": "Button label to remove a single filter from the filter bar",
|
|
51
|
+
"message": "Remove filter - {filterLabel}"
|
|
52
|
+
},
|
|
53
|
+
"filterDatePickerDateInputField.dateInputLabelFallback": {
|
|
54
|
+
"description": "Default label for date input field",
|
|
55
|
+
"message": "Date"
|
|
56
|
+
},
|
|
17
57
|
"filterDateRangePicker.dateFrom": {
|
|
18
58
|
"description": "Label for the 'Date from' field",
|
|
19
59
|
"message": "Date from"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaizen/components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.54.0",
|
|
4
4
|
"description": "Kaizen component library",
|
|
5
5
|
"author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
|
|
6
6
|
"homepage": "https://cultureamp.design",
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
"ts-jest": "^29.1.4",
|
|
101
101
|
"tslib": "^2.6.3",
|
|
102
102
|
"tsx": "^4.15.1",
|
|
103
|
-
"@kaizen/
|
|
104
|
-
"@kaizen/
|
|
103
|
+
"@kaizen/package-bundler": "1.1.2",
|
|
104
|
+
"@kaizen/design-tokens": "10.4.1"
|
|
105
105
|
},
|
|
106
106
|
"devDependenciesComments": {
|
|
107
107
|
"postcss": "Installed in root",
|
|
@@ -10,7 +10,7 @@ import * as AvatarStories from "./Avatar.stories"
|
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Avatar"
|
|
11
11
|
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%F0%9F%96%BC%EF%B8%8F-Component-Gallery?type=design&node-id=0-1&mode=design&t=ITSkv2Fu67xK6kBC-0"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3064857475/Avatar"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
|
|
@@ -10,7 +10,7 @@ import * as AvatarGroupStories from "./AvatarGroup.stories"
|
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/AvatarGroup"
|
|
11
11
|
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%F0%9F%96%BC%EF%B8%8F-Component-Gallery?type=design&node-id=0-1&mode=design&t=ITSkv2Fu67xK6kBC-0"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3065021264/Avatar+Group"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
<KAIOInstallation exportNames="AvatarGroup" />
|
|
@@ -10,7 +10,7 @@ import * as BadgeStories from "./Badge.stories"
|
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Badge"
|
|
11
11
|
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%F0%9F%96%BC%EF%B8%8F-Component-Gallery?type=design&node-id=5-242&mode=design&t=ITSkv2Fu67xK6kBC-0"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3064857333/Badge"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
<KAIOInstallation exportNames="Badge" />
|
|
@@ -10,7 +10,7 @@ import * as BrandStories from "./Brand.stories"
|
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Brand"
|
|
11
11
|
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%F0%9F%96%BC%EF%B8%8F-Component-Gallery?type=design&node-id=5-353&mode=design&t=VzrsL0wR4yiimjBa-0"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3065021567/Brand"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
|
|
@@ -11,7 +11,7 @@ import * as BrandMoment from "./BrandMoment.stories"
|
|
|
11
11
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/BrandMoment"
|
|
12
12
|
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%F0%9F%96%BC%EF%B8%8F-Component-Gallery?type=design&node-id=9-132873&mode=design&t=ITSkv2Fu67xK6kBC-0"
|
|
13
13
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082061589/Brand+Moment"
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
/>
|
|
16
16
|
|
|
17
17
|
<KAIOInstallation exportNames="BrandMoment" />
|
|
@@ -10,7 +10,7 @@ import * as ButtonStories from "./Button.stories"
|
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Button/Button"
|
|
11
11
|
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%F0%9F%96%BC%EF%B8%8F-Component-Gallery"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3062890984/Button"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
|
|
@@ -10,7 +10,7 @@ import * as IconButtonStories from "./IconButton.stories"
|
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Button/IconButton"
|
|
11
11
|
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%F0%9F%96%BC%EF%B8%8F-Component-Gallery?type=design&node-id=5-539&mode=design&t=HKGcnRVyIDipQ2OI-0"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3062890984/Button"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
<KAIOInstallation exportNames="IconButton" />
|
|
@@ -10,7 +10,7 @@ import * as ButtonGroupStories from "./ButtonGroup.stories"
|
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/ButtonGroup"
|
|
11
11
|
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%F0%9F%96%BC%EF%B8%8F-Component-Gallery?type=design&node-id=6-28579&t=bowQ0LWOQKOd0UYS-0"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082093959/Filters"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
<KAIOInstallation exportNames="ButtonGroup" />
|
|
@@ -4,7 +4,6 @@ import { DayPicker, DayPickerRangeProps } from "react-day-picker"
|
|
|
4
4
|
import { ArrowBackwardIcon, ArrowForwardIcon } from "~components/Icon"
|
|
5
5
|
import { OverrideClassName } from "~types/OverrideClassName"
|
|
6
6
|
import { baseCalendarClassNames } from "../baseCalendarClassNames"
|
|
7
|
-
import { DayOfWeek } from "../enums"
|
|
8
7
|
import { isInvalidDate } from "../utils"
|
|
9
8
|
import styles from "./CalendarRange.module.scss"
|
|
10
9
|
|
|
@@ -54,7 +53,6 @@ export const CalendarRange = ({
|
|
|
54
53
|
mode="range"
|
|
55
54
|
selected={selected}
|
|
56
55
|
defaultMonth={selectedMonth}
|
|
57
|
-
weekStartsOn={DayOfWeek.Mon}
|
|
58
56
|
classNames={classNames}
|
|
59
57
|
components={{
|
|
60
58
|
IconRight: () => <ArrowForwardIcon role="presentation" />,
|
|
@@ -10,7 +10,7 @@ import * as CalendarRangeStories from "./CalendarRange.stories"
|
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Calendar/CalendarRange"
|
|
11
11
|
figma="https://www.figma.com/file/eZKEE5kXbEMY3lx84oz8iN/%F0%9F%92%9C-UI-Kit%3A-Heart?type=design&node-id=10458%3A45652&mode=design&t=WD0ZquIVDw92Hu2N-1"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082094237/Date+Range+Picker"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
<KAIOInstallation exportNames="CalendarRange" />
|
|
@@ -4,7 +4,6 @@ import { DayPicker, DayPickerSingleProps } from "react-day-picker"
|
|
|
4
4
|
import { ArrowBackwardIcon, ArrowForwardIcon } from "~components/Icon"
|
|
5
5
|
import { OverrideClassName } from "~types/OverrideClassName"
|
|
6
6
|
import { baseCalendarClassNames } from "../baseCalendarClassNames"
|
|
7
|
-
import { DayOfWeek } from "../enums"
|
|
8
7
|
import { isInvalidDate, isValidWeekStartsOn } from "../utils"
|
|
9
8
|
import styles from "./CalendarSingle.module.scss"
|
|
10
9
|
|
|
@@ -21,7 +20,7 @@ export const CalendarSingle = ({
|
|
|
21
20
|
classNameOverride,
|
|
22
21
|
selected,
|
|
23
22
|
defaultMonth,
|
|
24
|
-
weekStartsOn
|
|
23
|
+
weekStartsOn,
|
|
25
24
|
locale = enAU,
|
|
26
25
|
...restProps
|
|
27
26
|
}: CalendarSingleProps): JSX.Element => {
|
|
@@ -10,7 +10,7 @@ import * as CalendarSingleStories from "./CalendarSingle.stories"
|
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Calendar/CalendarSingle"
|
|
11
11
|
figma="https://www.figma.com/file/eZKEE5kXbEMY3lx84oz8iN/%F0%9F%92%9C-UI-Kit%3A-Heart?type=design&node-id=10458%3A45652&mode=design&t=WD0ZquIVDw92Hu2N-1"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082061174/Date+Picker"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
<KAIOInstallation exportNames="CalendarSingle" />
|
package/src/Card/_docs/Card.mdx
CHANGED
|
@@ -9,7 +9,7 @@ import * as CheckboxStories from "./Checkbox.stories"
|
|
|
9
9
|
|
|
10
10
|
<ResourceLinks
|
|
11
11
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Checkbox/Checkbox"
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
/>
|
|
14
14
|
|
|
15
15
|
<KAIOInstallation exportNames="Checkbox" />
|
|
@@ -10,7 +10,7 @@ import * as CheckboxFieldStories from "./CheckboxField.stories"
|
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/CheckboxField"
|
|
11
11
|
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%EF%B8%8F%F0%9F%96%BC%EF%B8%8F-Component-Gallery?node-id=5%3A4170&t=P1w10jr2cpPuaayw-1"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082094661/Checkbox+Field"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
<KAIOInstallation exportNames="CheckboxField" />
|
|
@@ -10,7 +10,7 @@ import * as CheckboxGroupStories from "./CheckboxGroup.stories"
|
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/CheckboxGroup"
|
|
11
11
|
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%EF%B8%8F%F0%9F%96%BC%EF%B8%8F-Component-Gallery?node-id=6%3A4586&t=P1w10jr2cpPuaayw-1"
|
|
12
12
|
designGuidelines="@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082094522/Checkbox+Group Guidance"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
<KAIOInstallation exportNames="CheckboxGroup" />
|
|
@@ -10,7 +10,7 @@ import * as CollapsibleStories from "./Collapsible.stories"
|
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Collapsible"
|
|
11
11
|
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%EF%B8%8F%F0%9F%96%BC%EF%B8%8F-Component-Gallery?node-id=6%3A5001&t=P1w10jr2cpPuaayw-1"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082094383/Collapsible"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
<KAIOInstallation exportNames="Collapsible" />
|
|
@@ -10,7 +10,7 @@ import * as CollapsibleGroupStories from "./CollapsibleGroup.stories"
|
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/CollapsibleGroup"
|
|
11
11
|
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%EF%B8%8F%F0%9F%96%BC%EF%B8%8F-Component-Gallery?node-id=6%3A5001&t=P1w10jr2cpPuaayw-1"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082094383/Collapsible"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
<KAIOInstallation exportNames="CollapsibleGroup" />
|
|
@@ -10,7 +10,7 @@ import * as ExpertAdviceCollapsibleStories from "./ExpertAdviceCollapsible.stori
|
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/ExpertAdviceCollapsible"
|
|
11
11
|
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%F0%9F%96%BC%EF%B8%8F-Component-Gallery?type=design&node-id=6-5001&mode=design&t=VzrsL0wR4yiimjBa-0"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082094383/Collapsible"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
<KAIOInstallation exportNames="ExpertAdviceCollapsible" />
|
|
@@ -10,7 +10,7 @@ import * as ContainerStories from "./Container.stories"
|
|
|
10
10
|
<ResourceLinks
|
|
11
11
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Container"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3086156812/Layout"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
<KAIOInstallation exportNames="Container" />
|
|
@@ -10,7 +10,7 @@ import * as ContentStories from "./Content.stories"
|
|
|
10
10
|
<ResourceLinks
|
|
11
11
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Content"
|
|
12
12
|
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3086156812/Layout"
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
<KAIOInstallation exportNames="Content" />
|
|
@@ -1,43 +1,51 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import {
|
|
2
|
+
import { waitFor } from "@testing-library/react"
|
|
3
3
|
import { enUS } from "date-fns/locale"
|
|
4
|
+
import { renderWithIntl } from "~tests"
|
|
4
5
|
import { DateInputDescription } from "./DateInputDescription"
|
|
5
6
|
|
|
6
7
|
describe("DateInputDescription", () => {
|
|
7
|
-
it("returns template string when description is undefined", () => {
|
|
8
|
-
const { container } =
|
|
9
|
-
|
|
8
|
+
it("returns template string when description is undefined", async () => {
|
|
9
|
+
const { container } = renderWithIntl(<DateInputDescription locale={enUS} />)
|
|
10
|
+
await waitFor(() => {
|
|
11
|
+
expect(container).toHaveTextContent("Input format:mm/dd/yyyy")
|
|
12
|
+
})
|
|
10
13
|
})
|
|
11
14
|
|
|
12
|
-
it("returns template string when description is empty string", () => {
|
|
13
|
-
const { container } =
|
|
15
|
+
it("returns template string when description is empty string", async () => {
|
|
16
|
+
const { container } = renderWithIntl(
|
|
14
17
|
<DateInputDescription description="" locale={enUS} />
|
|
15
18
|
)
|
|
16
|
-
|
|
19
|
+
await waitFor(() => {
|
|
20
|
+
expect(container).toHaveTextContent("Input format:mm/dd/yyyy")
|
|
21
|
+
})
|
|
17
22
|
})
|
|
18
23
|
|
|
19
|
-
it("returns template string when description is a string", () => {
|
|
20
|
-
const { container } =
|
|
24
|
+
it("returns template string when description is a string", async () => {
|
|
25
|
+
const { container } = renderWithIntl(
|
|
21
26
|
<DateInputDescription
|
|
22
27
|
description="Custom description here"
|
|
23
28
|
locale={enUS}
|
|
24
29
|
/>
|
|
25
30
|
)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
await waitFor(() => {
|
|
32
|
+
expect(container).toHaveTextContent(
|
|
33
|
+
"Custom description here(Input format:mm/dd/yyyy)"
|
|
34
|
+
)
|
|
35
|
+
})
|
|
29
36
|
})
|
|
30
37
|
|
|
31
|
-
it("returns template string when description is an element", () => {
|
|
32
|
-
const { container } =
|
|
38
|
+
it("returns template string when description is an element", async () => {
|
|
39
|
+
const { container } = renderWithIntl(
|
|
33
40
|
<DateInputDescription
|
|
34
41
|
description={<span>Custom description span</span>}
|
|
35
42
|
locale={enUS}
|
|
36
43
|
/>
|
|
37
44
|
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
await waitFor(() => {
|
|
46
|
+
expect(container).toHaveTextContent(
|
|
47
|
+
"Custom description span(Input format:mm/dd/yyyy)"
|
|
48
|
+
)
|
|
49
|
+
})
|
|
42
50
|
})
|
|
43
51
|
})
|