@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.
Files changed (228) hide show
  1. package/dist/cjs/Calendar/CalendarRange/CalendarRange.cjs +0 -2
  2. package/dist/cjs/Calendar/CalendarSingle/CalendarSingle.cjs +3 -5
  3. package/dist/cjs/DatePicker/DatePicker.cjs +8 -1
  4. package/dist/cjs/DatePicker/utils/getLocale.cjs +96 -3
  5. package/dist/cjs/DatePicker/utils/validateDate.cjs +28 -2
  6. package/dist/cjs/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.cjs +8 -1
  7. package/dist/cjs/Filter/FilterBar/subcomponents/ClearAllButton/ClearAllButton.cjs +14 -2
  8. package/dist/cjs/Filter/FilterBar/subcomponents/FilterBarDatePicker/FilterBarDatePicker.cjs +1 -0
  9. package/dist/cjs/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.cjs +10 -1
  10. package/dist/cjs/Filter/FilterDatePicker/subcomponents/DateInputField/DateInputField.cjs +8 -1
  11. package/dist/cjs/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/FilterDateRangePickerField.cjs +5 -1
  12. package/dist/cjs/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/useEndDateValidation.cjs +1 -0
  13. package/dist/cjs/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/useStartDateValidation.cjs +1 -0
  14. package/dist/cjs/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/validateEndDateBeforeStartDate.cjs +16 -1
  15. package/dist/esm/Calendar/CalendarRange/CalendarRange.mjs +0 -2
  16. package/dist/esm/Calendar/CalendarSingle/CalendarSingle.mjs +3 -5
  17. package/dist/esm/DatePicker/DatePicker.mjs +8 -1
  18. package/dist/esm/DatePicker/utils/getLocale.mjs +97 -4
  19. package/dist/esm/DatePicker/utils/validateDate.mjs +22 -2
  20. package/dist/esm/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.mjs +8 -1
  21. package/dist/esm/Filter/FilterBar/subcomponents/ClearAllButton/ClearAllButton.mjs +14 -2
  22. package/dist/esm/Filter/FilterBar/subcomponents/FilterBarDatePicker/FilterBarDatePicker.mjs +1 -0
  23. package/dist/esm/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.mjs +10 -1
  24. package/dist/esm/Filter/FilterDatePicker/subcomponents/DateInputField/DateInputField.mjs +8 -1
  25. package/dist/esm/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/FilterDateRangePickerField.mjs +5 -1
  26. package/dist/esm/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/useEndDateValidation.mjs +1 -0
  27. package/dist/esm/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/useStartDateValidation.mjs +1 -0
  28. package/dist/esm/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/validateEndDateBeforeStartDate.mjs +10 -1
  29. package/dist/styles.css +2 -2
  30. package/dist/types/AvatarGroup/_docs/example-data.d.ts +8 -0
  31. package/dist/types/BrandMoment/_docs/ExampleHeaders.d.ts +3 -0
  32. package/dist/types/Calendar/_docs/controls/defaultMonthControls.d.ts +2 -0
  33. package/dist/types/Calendar/_docs/controls/weekStartsOnControls.d.ts +2 -0
  34. package/dist/types/Container/Container.d.ts +1 -1
  35. package/dist/types/Content/Content.d.ts +1 -1
  36. package/dist/types/DateInput/DateInput/DateInput.d.ts +1 -1
  37. package/dist/types/DatePicker/DatePicker.d.ts +3 -3
  38. package/dist/types/DatePicker/_docs/controls/datePickerLocaleControls.d.ts +2 -0
  39. package/dist/types/DatePicker/_docs/controls/disabledDayMatchersControls.d.ts +2 -0
  40. package/dist/types/DatePicker/subcomponents/DateInputField/DateInputField.d.ts +1 -1
  41. package/dist/types/DatePicker/types.d.ts +2 -1
  42. package/dist/types/DatePicker/utils/getLocale.d.ts +1 -2
  43. package/dist/types/DateRangePicker/DateRangePicker.d.ts +2 -2
  44. package/dist/types/Filter/FilterBar/context/types.d.ts +28 -0
  45. package/dist/types/Filter/FilterButton/subcomponents/FilterButtonBase/FilterButtonBase.d.ts +1 -1
  46. package/dist/types/Filter/FilterDatePicker/_docs/controls/disabledDaysControls.d.ts +2 -0
  47. package/dist/types/Filter/FilterDatePicker/_docs/controls/validationControls.d.ts +2 -0
  48. package/dist/types/Filter/FilterDatePicker/subcomponents/DateInputField/DateInputField.d.ts +1 -1
  49. package/dist/types/Filter/FilterDateRangePicker/_docs/controls/disabledDaysControls.d.ts +2 -0
  50. package/dist/types/Filter/FilterDateRangePicker/_docs/controls/validationControls.d.ts +2 -0
  51. package/dist/types/Filter/FilterMultiSelect/_docs/MockData.d.ts +10 -0
  52. package/dist/types/Filter/FilterSelect/_docs/mockData.d.ts +6 -0
  53. package/dist/types/Filter/_docs/controls/renderTriggerControls.d.ts +2 -0
  54. package/dist/types/Menu/_docs/MenuContentExample.d.ts +8 -0
  55. package/dist/types/Menu/_docs/examples.d.ts +11 -0
  56. package/dist/types/Modal/_docs/controls.d.ts +11 -0
  57. package/dist/types/MultiSelect/MultiSelect.d.ts +23 -0
  58. package/dist/types/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.d.ts +13 -0
  59. package/dist/types/Select/Select.d.ts +3 -3
  60. package/dist/types/Workflow/_docs/controls/controls.d.ts +2 -0
  61. package/dist/types/Workflow/_docs/controls/index.d.ts +1 -0
  62. package/dist/types/__future__/Select/Select.d.ts +2 -2
  63. package/dist/types/__future__/Select/_docs/mockData.d.ts +6 -0
  64. package/dist/types/__future__/Select/subcomponents/SelectToggle/SelectToggle.d.ts +2 -2
  65. package/dist/types/__future__/Select/types.d.ts +22 -0
  66. package/dist/types/__future__/Workflow/_docs/controls/controls.d.ts +2 -0
  67. package/dist/types/__future__/Workflow/_docs/controls/index.d.ts +1 -0
  68. package/dist/types/__overlays__/Tooltip/v1/utils/isSemanticElement.d.ts +2 -2
  69. package/dist/types/utils/getNodeText.d.ts +2 -1
  70. package/locales/en.json +40 -0
  71. package/package.json +3 -3
  72. package/src/Avatar/_docs/Avatar.mdx +1 -1
  73. package/src/AvatarGroup/_docs/AvatarGroup.mdx +1 -1
  74. package/src/Badge/_docs/Badge.mdx +1 -1
  75. package/src/Brand/_docs/Brand.mdx +1 -1
  76. package/src/BrandMoment/_docs/BrandMoment.mdx +1 -1
  77. package/src/Button/Button/_docs/Button.mdx +1 -1
  78. package/src/Button/IconButton/_docs/IconButton.mdx +1 -1
  79. package/src/ButtonGroup/_docs/ButtonGroup.mdx +1 -1
  80. package/src/Calendar/CalendarRange/CalendarRange.tsx +0 -2
  81. package/src/Calendar/CalendarRange/_docs/CalendarRange.mdx +1 -1
  82. package/src/Calendar/CalendarSingle/CalendarSingle.tsx +1 -2
  83. package/src/Calendar/CalendarSingle/_docs/CalendarSingle.mdx +1 -1
  84. package/src/Card/_docs/Card.mdx +1 -1
  85. package/src/Checkbox/Checkbox/_docs/Checkbox.mdx +1 -1
  86. package/src/Checkbox/CheckboxField/_docs/CheckboxField.mdx +1 -1
  87. package/src/Checkbox/CheckboxGroup/_docs/CheckboxGroup.mdx +1 -1
  88. package/src/Collapsible/Collapsible/_docs/Collapsible.mdx +1 -1
  89. package/src/Collapsible/CollapsibleGroup/_docs/CollapsibleGroup.mdx +1 -1
  90. package/src/Collapsible/ExpertAdviceCollapsible/_docs/ExpertAdviceCollapsible.mdx +1 -1
  91. package/src/Container/_docs/Container.mdx +1 -1
  92. package/src/Content/_docs/Content.mdx +1 -1
  93. package/src/DateInput/DateInputDescription/DateInputDescription.spec.tsx +26 -18
  94. package/src/DatePicker/DatePicker.spec.tsx +100 -69
  95. package/src/DatePicker/DatePicker.tsx +15 -7
  96. package/src/DatePicker/_docs/DatePicker.mdx +1 -3
  97. package/src/DatePicker/_docs/DatePicker.stickersheet.stories.tsx +57 -21
  98. package/src/DatePicker/_docs/DatePicker.stories.tsx +2 -3
  99. package/src/DatePicker/_docs/controls/datePickerLocaleControls.ts +8 -2
  100. package/src/DatePicker/_docs/getLocale.stickersheet.stories.tsx +49 -0
  101. package/src/DatePicker/subcomponents/DateInputField/DateInputField.spec.tsx +49 -36
  102. package/src/DatePicker/types.ts +2 -1
  103. package/src/DatePicker/utils/getLocale.spec.ts +2 -2
  104. package/src/DatePicker/utils/getLocale.ts +141 -6
  105. package/src/DatePicker/utils/validateDate.spec.ts +40 -16
  106. package/src/DatePicker/utils/{validateDate.ts → validateDate.tsx} +24 -4
  107. package/src/DateRangePicker/DateRangePicker.tsx +2 -2
  108. package/src/DateRangePicker/_docs/DateRangePicker.mdx +1 -1
  109. package/src/Divider/_docs/Divider.mdx +1 -1
  110. package/src/EmptyState/_docs/EmptyState.mdx +1 -1
  111. package/src/ErrorPage/_docs/ErrorPage.mdx +1 -1
  112. package/src/FieldGroup/_docs/FieldGroup.mdx +1 -1
  113. package/src/FieldMessage/_docs/FieldMessage.mdx +1 -1
  114. package/src/Filter/Filter/_docs/Filter.mdx +1 -1
  115. package/src/Filter/FilterBar/FilterBar.spec.tsx +56 -25
  116. package/src/Filter/FilterBar/_docs/FilterBar.mdx +1 -1
  117. package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.spec.tsx +21 -13
  118. package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx +11 -1
  119. package/src/Filter/FilterBar/subcomponents/ClearAllButton/ClearAllButton.tsx +17 -2
  120. package/src/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.spec.tsx +17 -8
  121. package/src/Filter/FilterBar/subcomponents/FilterBarDatePicker/FilterBarDatePicker.spec.tsx +37 -23
  122. package/src/Filter/FilterBar/subcomponents/FilterBarDateRangePicker/FilterBarDateRangePicker.spec.tsx +35 -23
  123. package/src/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.spec.tsx +42 -26
  124. package/src/Filter/FilterBar/subcomponents/FilterBarSelect/FilterBarSelect.spec.tsx +37 -24
  125. package/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.spec.tsx +12 -12
  126. package/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.tsx +15 -2
  127. package/src/Filter/FilterButton/_docs/filter-buttons.mdx +1 -1
  128. package/src/Filter/FilterDatePicker/FilterDatePicker.spec.tsx +21 -16
  129. package/src/Filter/FilterDatePicker/_docs/FilterDatePicker.mdx +1 -1
  130. package/src/Filter/FilterDatePicker/_docs/FilterDatePicker.stickersheet.stories.tsx +56 -1
  131. package/src/Filter/FilterDatePicker/hooks/useDateInputHandlers.spec.ts +3 -3
  132. package/src/Filter/FilterDatePicker/hooks/{useDateValidation.spec.tsx → useDateValidation.spec.ts} +13 -12
  133. package/src/Filter/FilterDatePicker/subcomponents/DateInputField/DateInputField.tsx +10 -1
  134. package/src/Filter/FilterDatePicker/subcomponents/FilterDatePickerField/FilterDatePickerField.spec.tsx +57 -36
  135. package/src/Filter/FilterDatePicker/utils/validateDate.spec.ts +52 -28
  136. package/src/Filter/FilterDateRangePicker/FilterDateRangePicker.spec.tsx +3 -2
  137. package/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.mdx +1 -1
  138. package/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.stickersheet.stories.tsx +55 -24
  139. package/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.spec.tsx +43 -28
  140. package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/FilterDateRangePickerField.spec.tsx +82 -48
  141. package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/FilterDateRangePickerField.tsx +6 -1
  142. package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/{useEndDateValidation.spec.tsx → useEndDateValidation.spec.ts} +23 -20
  143. package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/{useStartDateValidation.spec.tsx → useStartDateValidation.spec.ts} +13 -11
  144. package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/validateEndDateBeforeStartDate.spec.ts +17 -6
  145. package/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/{validateEndDateBeforeStartDate.ts → validateEndDateBeforeStartDate.tsx} +9 -3
  146. package/src/Filter/FilterMultiSelect/FilterMultiSelect.spec.tsx +10 -14
  147. package/src/Filter/FilterMultiSelect/_docs/FilterMultiSelect.mdx +1 -1
  148. package/src/Filter/FilterMultiSelect/context/SelectionProvider/SelectionProvider.spec.tsx +392 -372
  149. package/src/Filter/FilterMultiSelect/subcomponents/SearchInput/SearchInput.spec.tsx +9 -6
  150. package/src/Filter/FilterSelect/_docs/FilterSelect.mdx +1 -1
  151. package/src/GuidanceBlock/_docs/GuidanceBlock.mdx +1 -1
  152. package/src/Heading/_docs/Heading.mdx +1 -1
  153. package/src/Icon/_docs/Icon.mdx +1 -1
  154. package/src/Illustration/Scene/BrandMomentCaptureIntro/_docs/BrandMomentCaptureIntro.mdx +1 -1
  155. package/src/Illustration/Scene/_docs/Scene.mdx +1 -1
  156. package/src/Illustration/Spot/_docs/Spot.mdx +1 -1
  157. package/src/Input/Input/_docs/Input.mdx +1 -1
  158. package/src/Input/InputRange/_docs/InputRange.mdx +1 -1
  159. package/src/Input/InputSearch/InputSearch.spec.tsx +15 -14
  160. package/src/Input/InputSearch/_docs/InputSearch.mdx +1 -1
  161. package/src/Label/_docs/Label.mdx +1 -1
  162. package/src/LabelledMessage/_docs/LabelledMessage.mdx +1 -1
  163. package/src/LikertScaleLegacy/_docs/LikertScaleLegacy.mdx +1 -1
  164. package/src/Loading/LoadingGraphic/_docs/LoadingGraphic.mdx +1 -1
  165. package/src/Loading/LoadingHeading/_docs/LoadingHeading.mdx +1 -1
  166. package/src/Loading/LoadingInput/_docs/LoadingInput.mdx +1 -1
  167. package/src/Loading/LoadingParagraph/_docs/LoadingParagraph.mdx +1 -1
  168. package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.mdx +1 -1
  169. package/src/Menu/_docs/Menu.mdx +1 -1
  170. package/src/Modal/ConfirmationModal/_docs/ConfirmationModal.mdx +1 -1
  171. package/src/Modal/ContextModal/_docs/ContextModal.mdx +1 -1
  172. package/src/Modal/GenericModal/_docs/GenericModal.mdx +1 -1
  173. package/src/Modal/InputEditModal/_docs/InputEditModal.mdx +1 -1
  174. package/src/MultiSelect/_docs/MultiSelect.mdx +1 -1
  175. package/src/Notification/GlobalNotification/_docs/GlobalNotification.mdx +1 -1
  176. package/src/Notification/InlineNotification/_docs/InlineNotification.mdx +1 -1
  177. package/src/Notification/ToastNotification/_docs/ToastNotification.mdx +1 -1
  178. package/src/Pagination/_docs/Pagination.mdx +1 -1
  179. package/src/Pagination/subcomponents/DirectionalLink/_docs/DirectionalLink.mdx +1 -1
  180. package/src/Pagination/subcomponents/PaginationLink/_docs/PaginationLink.mdx +1 -1
  181. package/src/Popover/_docs/Popover.mdx +1 -1
  182. package/src/ProgressBar/_docs/ProgressBar.mdx +1 -1
  183. package/src/Radio/Radio/_docs/Radio.mdx +1 -1
  184. package/src/Radio/RadioField/_docs/RadioField.mdx +1 -1
  185. package/src/Radio/RadioGroup/_docs/RadioGroup.mdx +1 -1
  186. package/src/RichTextEditor/EditableRichTextContent/_docs/EditableRichTextContent.mdx +1 -1
  187. package/src/RichTextEditor/RichTextContent/_docs/RichTextContent.mdx +1 -1
  188. package/src/RichTextEditor/RichTextEditor/_docs/RichTextEditor.mdx +1 -1
  189. package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.mdx +1 -1
  190. package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/_docs/Toolbar.mdx +1 -1
  191. package/src/SearchField/_docs/SearchField.mdx +1 -1
  192. package/src/Select/_docs/Select.mdx +1 -1
  193. package/src/Skirt/_docs/Skirt.mdx +1 -1
  194. package/src/Slider/_docs/Slider.mdx +1 -1
  195. package/src/SplitButton/SplitButton.spec.tsx +11 -6
  196. package/src/SplitButton/_docs/SplitButton.mdx +1 -1
  197. package/src/SplitButton/subcomponents/DropdownButton/DropdownButton.spec.tsx +15 -10
  198. package/src/Table/_docs/Table.mdx +1 -1
  199. package/src/Tabs/_docs/Tabs.mdx +1 -1
  200. package/src/Tag/_docs/Tag.mdx +1 -1
  201. package/src/Text/_docs/Text.mdx +1 -1
  202. package/src/TextArea/_docs/TextArea.mdx +1 -1
  203. package/src/TextAreaField/_docs/TextAreaField.mdx +1 -1
  204. package/src/TextField/_docs/TextField.mdx +1 -1
  205. package/src/Tile/InformationTile/_docs/InformationTile.mdx +1 -1
  206. package/src/Tile/MultiActionTile/_docs/MultiActionTile.mdx +1 -1
  207. package/src/Tile/TileGrid/_docs/TileGrid.mdx +1 -1
  208. package/src/TimeField/_docs/TimeField.mdx +1 -1
  209. package/src/TitleBlockZen/_docs/TitleBlockZen.mdx +1 -1
  210. package/src/ToggleSwitch/ToggleSwitch/_docs/ToggleSwitch.mdx +1 -1
  211. package/src/ToggleSwitch/ToggleSwitchField/_docs/ToggleSwitchField.mdx +1 -1
  212. package/src/VisuallyHidden/_docs/VisuallyHidden.mdx +1 -1
  213. package/src/Well/_docs/Well.mdx +1 -1
  214. package/src/Workflow/_docs/ProgressStepper.mdx +1 -1
  215. package/src/Workflow/_docs/Workflow.mdx +1 -1
  216. package/src/Workflow/_docs/WorkflowFooter.mdx +1 -1
  217. package/src/Workflow/_docs/WorkflowHeader.mdx +1 -1
  218. package/src/__future__/Select/_docs/Select.mdx +1 -1
  219. package/src/__future__/Tag/Tag/_docs/Tag.mdx +1 -1
  220. package/src/__future__/Workflow/_docs/ProgressStepper.mdx +1 -1
  221. package/src/__future__/Workflow/_docs/Workflow.mdx +1 -1
  222. package/src/__future__/Workflow/_docs/WorkflowFooter.mdx +1 -1
  223. package/src/__future__/Workflow/_docs/WorkflowHeader.mdx +1 -1
  224. package/src/__overlays__/Tooltip/v1/_docs/Tooltip.mdx +1 -1
  225. package/src/__overlays__/Tooltip/v3/_docs/ApiSpecification.mdx +0 -1
  226. package/src/__overlays__/Tooltip/v3/_docs/Tooltip.docs.stories.tsx +52 -0
  227. package/src/__overlays__/Tooltip/v3/_docs/Tooltip.mdx +40 -61
  228. 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,2 @@
1
+ import { ArgTypes } from "@storybook/react";
2
+ export declare const WorkflowControls: Partial<ArgTypes>;
@@ -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: any) => element is React.ReactElement<any, string | React.JSXElementConstructor<any>>;
6
+ export declare const isSemanticElement: (element: ReactNode) => element is React.ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -1 +1,2 @@
1
- export declare const getNodeText: (node: any) => string | number;
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.52.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/design-tokens": "10.4.1",
104
- "@kaizen/package-bundler": "1.1.2"
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
- className="!mb-8"
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
- className="!mb-8"
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
- className="!mb-8"
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
- className="!mb-8"
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
- className="!mb-8"
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
- className="!mb-8"
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
- className="!mb-8"
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
- className="!mb-8"
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
- className="!mb-8"
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 = DayOfWeek.Mon,
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
- className="!mb-8"
13
+
14
14
  />
15
15
 
16
16
  <KAIOInstallation exportNames="CalendarSingle" />
@@ -8,7 +8,7 @@ import * as CardStories from "./Card.stories"
8
8
 
9
9
  <ResourceLinks
10
10
  sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Card"
11
- className="!mb-8"
11
+
12
12
  />
13
13
 
14
14
  <KAIOInstallation exportNames="Card" />
@@ -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
- className="!mb-8"
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
- className="!mb-8"
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
- className="!mb-8"
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
- className="!mb-8"
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
- className="!mb-8"
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
- className="!mb-8"
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
- className="!mb-8"
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
- className="!mb-8"
13
+
14
14
  />
15
15
 
16
16
  <KAIOInstallation exportNames="Content" />
@@ -1,43 +1,51 @@
1
1
  import React from "react"
2
- import { render } from "@testing-library/react"
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 } = render(<DateInputDescription locale={enUS} />)
9
- expect(container).toHaveTextContent("Input format:mm/dd/yyyy")
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 } = render(
15
+ it("returns template string when description is empty string", async () => {
16
+ const { container } = renderWithIntl(
14
17
  <DateInputDescription description="" locale={enUS} />
15
18
  )
16
- expect(container).toHaveTextContent("Input format:mm/dd/yyyy")
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 } = render(
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
- expect(container).toHaveTextContent(
27
- "Custom description here(Input format:mm/dd/yyyy)"
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 } = render(
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
- expect(container).toHaveTextContent(
40
- "Custom description span(Input format:mm/dd/yyyy)"
41
- )
45
+ await waitFor(() => {
46
+ expect(container).toHaveTextContent(
47
+ "Custom description span(Input format:mm/dd/yyyy)"
48
+ )
49
+ })
42
50
  })
43
51
  })