@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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useIntl } from '@cultureamp/i18n-react-intl';
|
|
2
3
|
import { Button } from '../../../../Button/Button/Button.mjs';
|
|
3
4
|
import '../../../../Button/IconButton/IconButton.mjs';
|
|
4
5
|
import 'tslib';
|
|
@@ -12,13 +13,19 @@ import '../../../../Menu/subcomponents/StatelessMenu/StatelessMenu.mjs';
|
|
|
12
13
|
import { useFilterBarContext } from '../../context/FilterBarContext.mjs';
|
|
13
14
|
const AddFiltersMenu = /*#__PURE__*/function () {
|
|
14
15
|
const AddFiltersMenu = function () {
|
|
16
|
+
var formatMessage = useIntl().formatMessage;
|
|
17
|
+
var menuButtonLabel = formatMessage({
|
|
18
|
+
id: "filterBar.addFiltersMenu.buttonLabel",
|
|
19
|
+
defaultMessage: "Add Filters",
|
|
20
|
+
description: "Menu button label to show additional available filter options"
|
|
21
|
+
});
|
|
15
22
|
var _a = useFilterBarContext(),
|
|
16
23
|
getInactiveFilters = _a.getInactiveFilters,
|
|
17
24
|
showFilter = _a.showFilter;
|
|
18
25
|
var inactiveFilters = getInactiveFilters();
|
|
19
26
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
20
27
|
button: /*#__PURE__*/React.createElement(Button, {
|
|
21
|
-
label:
|
|
28
|
+
label: menuButtonLabel,
|
|
22
29
|
secondary: true,
|
|
23
30
|
disabled: inactiveFilters.length === 0,
|
|
24
31
|
icon: /*#__PURE__*/React.createElement(AddIcon, {
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useIntl } from '@cultureamp/i18n-react-intl';
|
|
2
3
|
import { Button } from '../../../../Button/Button/Button.mjs';
|
|
3
4
|
import '../../../../Button/IconButton/IconButton.mjs';
|
|
4
5
|
import { useFilterBarContext } from '../../context/FilterBarContext.mjs';
|
|
5
6
|
import styles from './ClearAllButton.module.scss.mjs';
|
|
6
7
|
const ClearAllButton = /*#__PURE__*/function () {
|
|
7
8
|
const ClearAllButton = function () {
|
|
9
|
+
var formatMessage = useIntl().formatMessage;
|
|
10
|
+
var clearButtonLabel = formatMessage({
|
|
11
|
+
id: "filterBar.clearAllButton.label",
|
|
12
|
+
defaultMessage: "Clear all",
|
|
13
|
+
description: "Button label to clear all values within the filter bar"
|
|
14
|
+
});
|
|
15
|
+
var clearButtonAriaLabel = formatMessage({
|
|
16
|
+
id: "filterBar.clearAllButton.ariaLabel",
|
|
17
|
+
defaultMessage: "Clear all filters",
|
|
18
|
+
description: "Button aria-label to clear all values within the filter bar"
|
|
19
|
+
});
|
|
8
20
|
var clearAllFilters = useFilterBarContext().clearAllFilters;
|
|
9
21
|
return /*#__PURE__*/React.createElement(Button, {
|
|
10
|
-
label:
|
|
11
|
-
"aria-label":
|
|
22
|
+
label: clearButtonLabel,
|
|
23
|
+
"aria-label": clearButtonAriaLabel,
|
|
12
24
|
classNameOverride: styles.clearAllButton,
|
|
13
25
|
secondary: true,
|
|
14
26
|
onClick: clearAllFilters
|
|
@@ -8,6 +8,7 @@ import 'date-fns';
|
|
|
8
8
|
import 'react-day-picker';
|
|
9
9
|
import 'date-fns/locale';
|
|
10
10
|
import '../../../../LabelledMessage/LabelledMessage.mjs';
|
|
11
|
+
import '@cultureamp/i18n-react-intl';
|
|
11
12
|
import '../../../FilterDatePicker/subcomponents/DateInputField/DateInputField.mjs';
|
|
12
13
|
import { useFilterBarContext } from '../../context/FilterBarContext.mjs';
|
|
13
14
|
import { FilterBarButton } from '../FilterBarButton/FilterBarButton.mjs';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
|
+
import { useIntl } from '@cultureamp/i18n-react-intl';
|
|
3
4
|
import { ButtonGroup } from '../../../ButtonGroup/ButtonGroup.mjs';
|
|
4
5
|
import '../../../Icon/subcomponents/SVG/SVG.mjs';
|
|
5
6
|
import { ClearIcon } from '../../../Icon/ClearIcon.mjs';
|
|
@@ -13,9 +14,17 @@ const FilterButtonRemovable = /*#__PURE__*/function () {
|
|
|
13
14
|
var triggerButtonProps = _a.triggerButtonProps,
|
|
14
15
|
removeButtonProps = _a.removeButtonProps,
|
|
15
16
|
restProps = __rest(_a, ["triggerButtonProps", "removeButtonProps"]);
|
|
17
|
+
var formatMessage = useIntl().formatMessage;
|
|
18
|
+
var removeButtonLabelFallback = formatMessage({
|
|
19
|
+
id: "filterButton.removable.removeButtonLabel",
|
|
20
|
+
defaultMessage: "Remove filter - {filterLabel}",
|
|
21
|
+
description: "Button label to remove a single filter from the filter bar"
|
|
22
|
+
}, {
|
|
23
|
+
filterLabel: triggerButtonProps === null || triggerButtonProps === void 0 ? void 0 : triggerButtonProps.label
|
|
24
|
+
});
|
|
16
25
|
var customRefObject = isRefObject(ref) ? ref.current : null;
|
|
17
26
|
var removeButtonRef = customRefObject === null || customRefObject === void 0 ? void 0 : customRefObject.removeButtonRef;
|
|
18
|
-
var removeButtonLabel = (_b = removeButtonProps === null || removeButtonProps === void 0 ? void 0 : removeButtonProps.tooltipText) !== null && _b !== void 0 ? _b :
|
|
27
|
+
var removeButtonLabel = (_b = removeButtonProps === null || removeButtonProps === void 0 ? void 0 : removeButtonProps.tooltipText) !== null && _b !== void 0 ? _b : removeButtonLabelFallback;
|
|
19
28
|
return /*#__PURE__*/React.createElement(ButtonGroup, __assign({}, restProps), /*#__PURE__*/React.createElement(FilterButton, __assign({
|
|
20
29
|
ref: ref
|
|
21
30
|
}, triggerButtonProps)), /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { useIntl } from '@cultureamp/i18n-react-intl';
|
|
3
4
|
import { DateInput } from '../../../../DateInput/DateInput/DateInput.mjs';
|
|
4
5
|
import { DateInputDescription } from '../../../../DateInput/DateInputDescription/DateInputDescription.mjs';
|
|
5
6
|
import '../../../../DateInput/DateInputWithIconButton/DateInputWithIconButton.mjs';
|
|
@@ -17,6 +18,12 @@ const DateInputField = /*#__PURE__*/function () {
|
|
|
17
18
|
locale = _a.locale,
|
|
18
19
|
classNameOverride = _a.classNameOverride,
|
|
19
20
|
restProps = __rest(_a, ["id", "labelText", "description", "disabled", "isReversed", "validationMessage", "locale", "classNameOverride"]);
|
|
21
|
+
var formatMessage = useIntl().formatMessage;
|
|
22
|
+
var dateInputLabelFallback = formatMessage({
|
|
23
|
+
id: "filterDatePickerDateInputField.dateInputLabelFallback",
|
|
24
|
+
defaultMessage: "Date",
|
|
25
|
+
description: "Default label for date input field"
|
|
26
|
+
});
|
|
20
27
|
var descriptionId = "".concat(id, "--field-message");
|
|
21
28
|
var errorMessageId = validationMessage ? "".concat(id, "--date-error-message") : undefined;
|
|
22
29
|
var inputDescribedBy = errorMessageId ? "".concat(errorMessageId, " ").concat(descriptionId) : descriptionId;
|
|
@@ -24,7 +31,7 @@ const DateInputField = /*#__PURE__*/function () {
|
|
|
24
31
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(DateInput, __assign({
|
|
25
32
|
ref: ref,
|
|
26
33
|
id: id,
|
|
27
|
-
labelText: labelText ||
|
|
34
|
+
labelText: labelText || dateInputLabelFallback,
|
|
28
35
|
"aria-describedby": inputDescribedBy,
|
|
29
36
|
"aria-errormessage": errorMessageId,
|
|
30
37
|
"aria-invalid": dateIsInvalid,
|
|
@@ -172,6 +172,10 @@ const FilterDateRangePickerField = /*#__PURE__*/function () {
|
|
|
172
172
|
});
|
|
173
173
|
};
|
|
174
174
|
useEffect(function () {
|
|
175
|
+
if (inputStartDateLabel === " " || inputEndDateLabel === " ") {
|
|
176
|
+
// Translations are loading
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
175
179
|
var newStartDate = validateStartDate(selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.from, state.inputStartValue);
|
|
176
180
|
var newEndDate = validateEndDate(selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.to, state.inputEndValue);
|
|
177
181
|
if (newStartDate && !isValidRange(newStartDate, newEndDate)) {
|
|
@@ -184,7 +188,7 @@ const FilterDateRangePickerField = /*#__PURE__*/function () {
|
|
|
184
188
|
from: newStartDate,
|
|
185
189
|
to: newEndDate
|
|
186
190
|
});
|
|
187
|
-
}, []);
|
|
191
|
+
}, [inputStartDateLabel, inputEndDateLabel]);
|
|
188
192
|
return /*#__PURE__*/React.createElement("div", __assign({
|
|
189
193
|
className: classnames(styles.filterDateRangePickerField, classNameOverride)
|
|
190
194
|
}, restProps), /*#__PURE__*/React.createElement(DateRangeInputField, {
|
|
@@ -10,6 +10,7 @@ import 'date-fns/locale';
|
|
|
10
10
|
import { useDateValidation } from '../../../../FilterDatePicker/hooks/useDateValidation.mjs';
|
|
11
11
|
import '../../../../FilterDatePicker/subcomponents/DateInputField/DateInputField.mjs';
|
|
12
12
|
import '../../../../../LabelledMessage/LabelledMessage.mjs';
|
|
13
|
+
import '@cultureamp/i18n-react-intl';
|
|
13
14
|
import { validateEndDateBeforeStartDate } from '../utils/validateEndDateBeforeStartDate.mjs';
|
|
14
15
|
var useEndDateValidation = function (args) {
|
|
15
16
|
var _a = useDateValidation(args),
|
|
@@ -10,6 +10,7 @@ import 'date-fns/locale';
|
|
|
10
10
|
import { useDateValidation } from '../../../../FilterDatePicker/hooks/useDateValidation.mjs';
|
|
11
11
|
import '../../../../FilterDatePicker/subcomponents/DateInputField/DateInputField.mjs';
|
|
12
12
|
import '../../../../../LabelledMessage/LabelledMessage.mjs';
|
|
13
|
+
import '@cultureamp/i18n-react-intl';
|
|
13
14
|
var useStartDateValidation = function (args) {
|
|
14
15
|
var _a = useDateValidation(args),
|
|
15
16
|
validationMessage = _a.validationMessage,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { FormattedMessage } from '@cultureamp/i18n-react-intl';
|
|
2
4
|
import { getNodeText } from '../../../../../utils/getNodeText.mjs';
|
|
3
5
|
import { isValidRange } from './isValidRange.mjs';
|
|
4
6
|
var validateEndDateBeforeStartDate = function (_a) {
|
|
@@ -20,7 +22,14 @@ var validateEndDateBeforeStartDate = function (_a) {
|
|
|
20
22
|
validationResponse: __assign(__assign({}, baseResponse), {
|
|
21
23
|
validationMessage: {
|
|
22
24
|
status: "error",
|
|
23
|
-
message:
|
|
25
|
+
message: ( /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
26
|
+
id: "date.validation.rangeEndBeforeRangeStart",
|
|
27
|
+
defaultMessage: 'Cannot be earlier than the selection in "{startDateFieldLabel}"',
|
|
28
|
+
description: "Error message when the user tries to select an end date earlier than the start date",
|
|
29
|
+
values: {
|
|
30
|
+
startDateFieldLabel: getNodeText(startDateFieldLabel)
|
|
31
|
+
}
|
|
32
|
+
}))
|
|
24
33
|
}
|
|
25
34
|
}),
|
|
26
35
|
newDate: endDate
|
package/dist/styles.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@layer tokens, normalize, reset;@layer tokens{:root{--theme-key:heart;--animation-easing-function-ease-in-out:cubic-bezier(0.455,0.03,0.515,0.955);--animation-easing-function-ease-in:cubic-bezier(0.55,0.085,0.68,0.53);--animation-easing-function-ease-out:cubic-bezier(0.25,0.46,0.45,0.94);--animation-easing-function-linear:linear;--animation-easing-function-bounce-in:cubic-bezier(0.485,0.155,0.24,1.245);--animation-easing-function-bounce-out:cubic-bezier(0.485,0.155,0.515,0.845);--animation-easing-function-bounce-in-out:cubic-bezier(0.76,-0.245,0.24,1.245);--animation-duration-instant:0ms;--animation-duration-immediate:100ms;--animation-duration-rapid:200ms;--animation-duration-fast:300ms;--animation-duration-slow:400ms;--animation-duration-deliberate:700ms;--border-solid-border-width:2px;--border-solid-border-radius:7px;--border-solid-border-style:solid;--border-solid-border-color:#e1e2ea;--border-solid-border-color-rgb:225,226,234;--border-dashed-border-width:2px;--border-dashed-border-radius:7px;--border-dashed-border-style:dashed;--border-borderless-border-width:2px;--border-borderless-border-radius:7px;--border-borderless-border-style:solid;--border-borderless-border-color:transparent;--border-borderless-border-color-rgb:0,0,0;--border-focus-ring-border-width:2px;--border-focus-ring-border-radius:10px;--border-focus-ring-border-style:solid;--color-purple-100:#f4edf8;--color-purple-100-rgb:244,237,248;--color-purple-200:#dfc9ea;--color-purple-200-rgb:223,201,234;--color-purple-300:#c9a5dd;--color-purple-300-rgb:201,165,221;--color-purple-400:#ae67b1;--color-purple-400-rgb:174,103,177;--color-purple-500:#844587;--color-purple-500-rgb:132,69,135;--color-purple-600:#5f3361;--color-purple-600-rgb:95,51,97;--color-purple-700:#4a234d;--color-purple-700-rgb:74,35,77;--color-purple-800:#2f2438;--color-purple-800-rgb:47,36,56;--color-blue-100:#e6f6ff;--color-blue-100-rgb:230,246,255;--color-blue-200:#bde2f5;--color-blue-200-rgb:189,226,245;--color-blue-300:#73c0e8;--color-blue-300-rgb:115,192,232;--color-blue-400:#008bd6;--color-blue-400-rgb:0,139,214;--color-blue-500:#0168b3;--color-blue-500-rgb:1,104,179;--color-blue-600:#004970;--color-blue-600-rgb:0,73,112;--color-blue-700:#003157;--color-blue-700-rgb:0,49,87;--color-green-100:#e8f8f4;--color-green-100-rgb:232,248,244;--color-green-200:#c4ede2;--color-green-200-rgb:196,237,226;--color-green-300:#8fdbc7;--color-green-300-rgb:143,219,199;--color-green-400:#5dcaad;--color-green-400-rgb:93,202,173;--color-green-500:#44a289;--color-green-500-rgb:68,162,137;--color-green-600:#2c7d67;--color-green-600-rgb:44,125,103;--color-green-700:#22594a;--color-green-700-rgb:34,89,74;--color-yellow-100:#fff9e4;--color-yellow-100-rgb:255,249,228;--color-yellow-200:#ffeeb3;--color-yellow-200-rgb:255,238,179;--color-yellow-300:#ffe36e;--color-yellow-300-rgb:255,227,110;--color-yellow-400:#ffca4d;--color-yellow-400-rgb:255,202,77;--color-yellow-500:#ffb600;--color-yellow-500-rgb:255,182,0;--color-yellow-600:#c68600;--color-yellow-600-rgb:198,134,0;--color-yellow-700:#876400;--color-yellow-700-rgb:135,100,0;--color-red-100:#fdeaee;--color-red-100-rgb:253,234,238;--color-red-200:#f9c2cb;--color-red-200-rgb:249,194,203;--color-red-300:#f597a8;--color-red-300-rgb:245,151,168;--color-red-400:#e0707d;--color-red-400-rgb:224,112,125;--color-red-500:#c93b55;--color-red-500-rgb:201,59,85;--color-red-600:#a82433;--color-red-600-rgb:168,36,51;--color-red-700:#6c1e20;--color-red-700-rgb:108,30,32;--color-orange-100:#fff0e8;--color-orange-100-rgb:255,240,232;--color-orange-200:#ffd1b9;--color-orange-200-rgb:255,209,185;--color-orange-300:#ffb08a;--color-orange-300-rgb:255,176,138;--color-orange-400:#ff9461;--color-orange-400-rgb:255,148,97;--color-orange-500:#e96c2f;--color-orange-500-rgb:233,108,47;--color-orange-600:#b74302;--color-orange-600-rgb:183,67,2;--color-orange-700:#903c00;--color-orange-700-rgb:144,60,0;--color-gray-100:#f9f9f9;--color-gray-100-rgb:249,249,249;--color-gray-200:#f4f4f5;--color-gray-200-rgb:244,244,245;--color-gray-300:#eaeaec;--color-gray-300-rgb:234,234,236;--color-gray-400:#cdcdd0;--color-gray-400-rgb:205,205,208;--color-gray-500:#878792;--color-gray-500-rgb:135,135,146;--color-gray-600:#524e56;--color-gray-600-rgb:82,78,86;--color-white:#fff;--color-white-rgb:255,255,255;--data-viz-favorable:#7dd5bd;--data-viz-favorable-rgb:125,213,189;--data-viz-unfavorable:#e68d97;--data-viz-unfavorable-rgb:230,141,151;--layout-content-max-width:1392px;--layout-content-max-width-with-sidebar:1080px;--layout-content-side-margin:72px;--layout-mobile-actions-drawer-height:60px;--layout-navigation-bar-height:72px;--layout-breakpoints-medium:768px;--layout-breakpoints-large:1080px;--shadow-small-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 3px 16px 0 rgba(0,0,0,.06);--shadow-large-box-shadow:0 3px 9px 0 rgba(0,0,0,.1),0 8px 40px 0 rgba(0,0,0,.08);--spacing-0:0;--spacing-1:.0625rem;--spacing-2:.125rem;--spacing-4:.25rem;--spacing-6:.375rem;--spacing-8:.5rem;--spacing-12:.75rem;--spacing-16:1rem;--spacing-24:1.5rem;--spacing-32:2rem;--spacing-40:2.5rem;--spacing-48:3rem;--spacing-56:3.5rem;--spacing-64:4rem;--spacing-72:4.5rem;--spacing-80:5rem;--spacing-96:6rem;--spacing-112:7rem;--spacing-128:8rem;--spacing-160:10rem;--spacing-200:12.5rem;--spacing-240:15rem;--spacing-280:17.5rem;--spacing-320:20rem;--spacing-xs:0.375rem;--spacing-sm:0.75rem;--spacing-md:1.5rem;--spacing-lg:2.25rem;--spacing-xl:3rem;--spacing-xxl:3.75rem;--spacing-xxxl:4.5rem;--spacing-xxxxl:5.25rem;--spacing-xxxxxl:6rem;--typography-data-large-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-data-large-font-weight:700;--typography-data-large-font-size:5.25rem;--typography-data-large-line-height:5.25rem;--typography-data-large-letter-spacing:normal;--typography-data-large-units-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-data-large-units-font-weight:700;--typography-data-large-units-font-size:2.625rem;--typography-data-large-units-line-height:5.25rem;--typography-data-large-units-letter-spacing:normal;--typography-data-medium-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-data-medium-font-weight:700;--typography-data-medium-font-size:3rem;--typography-data-medium-line-height:5rem;--typography-data-medium-letter-spacing:normal;--typography-data-medium-units-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-data-medium-units-font-weight:700;--typography-data-medium-units-font-size:1.5rem;--typography-data-medium-units-line-height:5rem;--typography-data-medium-units-letter-spacing:normal;--typography-data-small-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-data-small-font-weight:700;--typography-data-small-font-size:1.5rem;--typography-data-small-line-height:1.5rem;--typography-data-small-letter-spacing:normal;--typography-data-small-units-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-data-small-units-font-weight:700;--typography-data-small-units-font-size:1.125rem;--typography-data-small-units-line-height:1.5rem;--typography-data-small-units-letter-spacing:normal;--typography-display-0-font-family:"Tiempos Headline",Georgia,serif;--typography-display-0-font-weight:800;--typography-display-0-font-size:4.5rem;--typography-display-0-line-height:5.25rem;--typography-display-0-letter-spacing:0em;--typography-heading-1-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-heading-1-font-weight:700;--typography-heading-1-font-size:2.125rem;--typography-heading-1-line-height:2.625rem;--typography-heading-1-letter-spacing:normal;--typography-heading-2-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-heading-2-font-weight:700;--typography-heading-2-font-size:1.75rem;--typography-heading-2-line-height:2.25rem;--typography-heading-2-letter-spacing:normal;--typography-heading-3-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-heading-3-font-weight:700;--typography-heading-3-font-size:1.375rem;--typography-heading-3-line-height:1.875rem;--typography-heading-3-letter-spacing:normal;--typography-heading-4-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-heading-4-font-weight:600;--typography-heading-4-font-size:1.125rem;--typography-heading-4-line-height:1.5rem;--typography-heading-4-letter-spacing:normal;--typography-heading-5-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-heading-5-font-weight:600;--typography-heading-5-font-size:1rem;--typography-heading-5-line-height:1.5rem;--typography-heading-5-letter-spacing:normal;--typography-heading-6-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-heading-6-font-weight:700;--typography-heading-6-font-size:0.875rem;--typography-heading-6-line-height:1.5rem;--typography-heading-6-letter-spacing:normal;--typography-paragraph-intro-lede-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-paragraph-intro-lede-font-weight:400;--typography-paragraph-intro-lede-font-size:1.25rem;--typography-paragraph-intro-lede-line-height:1.875rem;--typography-paragraph-intro-lede-letter-spacing:0;--typography-paragraph-intro-lede-max-width:975px;--typography-paragraph-body-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-paragraph-body-font-weight:400;--typography-paragraph-body-font-size:1rem;--typography-paragraph-body-line-height:1.5rem;--typography-paragraph-body-letter-spacing:normal;--typography-paragraph-body-max-width:780px;--typography-paragraph-small-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-paragraph-small-font-weight:400;--typography-paragraph-small-font-size:0.875rem;--typography-paragraph-small-line-height:1.125rem;--typography-paragraph-small-letter-spacing:normal;--typography-paragraph-small-max-width:680px;--typography-paragraph-extra-small-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-paragraph-extra-small-font-weight:400;--typography-paragraph-extra-small-font-size:0.75rem;--typography-paragraph-extra-small-line-height:1.125rem;--typography-paragraph-extra-small-letter-spacing:normal;--typography-paragraph-extra-small-max-width:600px;--typography-paragraph-bold-font-weight:600;--typography-button-primary-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-button-primary-font-weight:700;--typography-button-primary-font-size:1.125rem;--typography-button-primary-line-height:1.5rem;--typography-button-primary-letter-spacing:normal;--typography-button-secondary-font-family:"Inter","Noto Sans",Helvetica,Arial,sans-serif;--typography-button-secondary-font-weight:500;--typography-button-secondary-font-size:1rem;--typography-button-secondary-line-height:1.5rem;--typography-button-secondary-letter-spacing:normal}}@layer normalize{html{-webkit-text-size-adjust:100%;line-height:1.15}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}}@layer reset{@font-face{font-family:Tiempos Headline;font-weight:800;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/tiempos/tiempos-headline-bold.woff2),url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/tiempos/tiempos-headline-bold.woff)}@font-face{font-family:Tiempos Headline;font-weight:500;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/tiempos/tiempos-headline-medium.woff2),url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/tiempos/tiempos-headline-medium.woff)}@font-face{font-family:Greycliff CF;font-weight:300;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/greycliff/greycliff-cf-light.woff) format("woff")}@font-face{font-family:Greycliff CF;font-weight:400;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/greycliff/greycliff-cf-regular.woff) format("woff")}@font-face{font-family:Greycliff CF;font-weight:500;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/greycliff/greycliff-cf-medium.woff) format("woff")}@font-face{font-family:Greycliff CF;font-weight:600;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/greycliff/greycliff-cf-demi-bold.woff) format("woff")}@font-face{font-family:Greycliff CF;font-weight:700;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/greycliff/greycliff-cf-bold.woff) format("woff")}@font-face{font-family:Greycliff CF;font-weight:800;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/greycliff/greycliff-cf-extra-bold.woff) format("woff")}@font-face{font-family:Inter;font-weight:300;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-light.woff2),url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-light.woff)}@font-face{font-family:Inter;font-weight:400;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-regular.woff2),url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-regular.woff)}@font-face{font-family:Inter;font-weight:500;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-medium.woff2),url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-medium.woff)}@font-face{font-family:Inter;font-weight:600;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-demi-bold.woff2),url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-demi-bold.woff)}@font-face{font-family:Inter;font-weight:700;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-bold.woff2),url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-bold.woff)}@font-face{font-family:Inter;font-weight:800;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-extra-bold.woff2),url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-extra-bold.woff)}@font-face{font-family:IBM Plex Mono;src:url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/ibm-plex-mono/ibm-plex-mono-regular.woff2),url(https://d1e7r7b0lb8p4d.cloudfront.net/fonts/ibm-plex-mono/ibm-plex-mono-regular.woff)}}@layer reset{*,:after,:before{border-color:var(--border-solid-border-color,"currentColor");border-style:solid;border-width:0}}
|
|
2
|
-
.Tooltip-module_tooltip__efL1m{text-wrap:pretty;background-color:var(--color-purple-800,#2f2438);border-radius:var(--border-solid-border-radius,7px);box-shadow:var(--shadow-small-box-shadow,0 1px 3px 0 rgba(0,0,0,.1),0 3px 16px 0 rgba(0,0,0,.06));color:var(--color-white,#fff);font-family:var(--typography-paragraph-extra-small-font-family,"Inter","Noto Sans",Helvetica,Arial,sans-serif);font-size:var(--typography-paragraph-extra-small-font-size,.75rem);font-weight:var(--typography-paragraph-extra-small-font-weight,400);letter-spacing:var(--typography-paragraph-extra-small-letter-spacing,normal);line-height:var(--typography-paragraph-extra-small-line-height,1.125rem);max-width:200px;padding:var(--spacing-8,.5rem) var(--spacing-12,.75rem);text-align:center;transform:translateZ(0)}.Tooltip-module_tooltip__efL1m.Tooltip-module_reversed__NnCbZ{background-color:var(--color-white,#fff);color:var(--color-purple-800,#2f2438)}.Tooltip-module_tooltip__efL1m[data-placement=top]{--origin:translateY(4px)}.Tooltip-module_tooltip__efL1m[data-placement=bottom]{--origin:translateY(-4px)}.Tooltip-module_tooltip__efL1m[data-placement=right]{--origin:translateX(-4px)}.Tooltip-module_tooltip__efL1m[data-placement=left]{--origin:translateX(4px)}.Tooltip-module_tooltip__efL1m[data-entering]{animation:Tooltip-module_slide__lFdGA var(--animation-duration-fast,.3s)}.Tooltip-module_tooltip__efL1m[data-exiting]{animation:Tooltip-module_slide__lFdGA var(--animation-duration-fast,.3s) reverse var(--animation-easing-function-ease-in,cubic-bezier(.55,.085,.68,.53))}@keyframes Tooltip-module_slide__lFdGA{0%{opacity:0;transform:var(--origin)}to{opacity:1;transform:translateY(0)}}
|
|
3
|
-
.Focusable-module_focusableWrapper__NfuIi{display:inline-flex}
|
|
4
2
|
.OverlayArrow-module_overlayArrow__hoDyK{display:flex;padding:8px}.OverlayArrow-module_overlayArrow__hoDyK[data-placement=bottom],.OverlayArrow-module_overlayArrow__hoDyK[data-placement=top]{padding:0 8px}.OverlayArrow-module_overlayArrow__hoDyK[data-placement=left],.OverlayArrow-module_overlayArrow__hoDyK[data-placement=right]{padding:8px 0}.OverlayArrow-module_overlayArrow__hoDyK path{fill:var(--color-purple-800,#2f2438);box-shadow:var(--shadow-small-box-shadow,0 1px 3px 0 rgba(0,0,0,.1),0 3px 16px 0 rgba(0,0,0,.06))}.OverlayArrow-module_overlayArrow__hoDyK[data-placement=right] svg{transform:rotate(90deg)}.OverlayArrow-module_overlayArrow__hoDyK[data-placement=bottom] svg{transform:rotate(180deg)}.OverlayArrow-module_overlayArrow__hoDyK[data-placement=left] svg{transform:rotate(270deg)}.OverlayArrow-module_overlayArrow__hoDyK.OverlayArrow-module_reversed__-WGcR path{fill:var(--color-white,#fff)}
|
|
3
|
+
.Focusable-module_focusableWrapper__NfuIi{display:inline-flex}
|
|
4
|
+
.Tooltip-module_tooltip__efL1m{text-wrap:pretty;background-color:var(--color-purple-800,#2f2438);border-radius:var(--border-solid-border-radius,7px);box-shadow:var(--shadow-small-box-shadow,0 1px 3px 0 rgba(0,0,0,.1),0 3px 16px 0 rgba(0,0,0,.06));color:var(--color-white,#fff);font-family:var(--typography-paragraph-extra-small-font-family,"Inter","Noto Sans",Helvetica,Arial,sans-serif);font-size:var(--typography-paragraph-extra-small-font-size,.75rem);font-weight:var(--typography-paragraph-extra-small-font-weight,400);letter-spacing:var(--typography-paragraph-extra-small-letter-spacing,normal);line-height:var(--typography-paragraph-extra-small-line-height,1.125rem);max-width:200px;padding:var(--spacing-8,.5rem) var(--spacing-12,.75rem);text-align:center;transform:translateZ(0)}.Tooltip-module_tooltip__efL1m.Tooltip-module_reversed__NnCbZ{background-color:var(--color-white,#fff);color:var(--color-purple-800,#2f2438)}.Tooltip-module_tooltip__efL1m[data-placement=top]{--origin:translateY(4px)}.Tooltip-module_tooltip__efL1m[data-placement=bottom]{--origin:translateY(-4px)}.Tooltip-module_tooltip__efL1m[data-placement=right]{--origin:translateX(-4px)}.Tooltip-module_tooltip__efL1m[data-placement=left]{--origin:translateX(4px)}.Tooltip-module_tooltip__efL1m[data-entering]{animation:Tooltip-module_slide__lFdGA var(--animation-duration-fast,.3s)}.Tooltip-module_tooltip__efL1m[data-exiting]{animation:Tooltip-module_slide__lFdGA var(--animation-duration-fast,.3s) reverse var(--animation-easing-function-ease-in,cubic-bezier(.55,.085,.68,.53))}@keyframes Tooltip-module_slide__lFdGA{0%{opacity:0;transform:var(--origin)}to{opacity:1;transform:translateY(0)}}
|
|
5
5
|
.SVG-module_icon__8J5Ev{display:inline-block;height:20px;width:20px}.SVG-module_icon__8J5Ev>use{pointer-events:none}@media screen and (-ms-high-contrast:active){.SVG-module_icon__8J5Ev{color:#000}}@media screen and (-ms-high-contrast:white-on-black){.SVG-module_icon__8J5Ev{color:#fff}}@media screen and (-ms-high-contrast:black-on-white){.SVG-module_icon__8J5Ev{color:#000}}.SVG-module_inheritSize__Q8iam{display:block;height:inherit;width:inherit}
|
|
6
6
|
.Avatar-module_wrapper__LY2q2{align-items:center;background:var(--color-gray-300,#eaeaec);border-radius:100%;box-sizing:border-box;display:flex;justify-content:center;overflow:hidden}.Avatar-module_wrapper__LY2q2:not(.Avatar-module_small__PeksS){border:3px solid var(--color-white,#fff);box-shadow:var(--shadow-small-box-shadow,0 1px 3px 0 rgba(0,0,0,.1),0 3px 16px 0 rgba(0,0,0,.06))}.Avatar-module_wrapper__LY2q2.Avatar-module_personal__2U7--{background:var(--color-orange-100,#fff0e8)}.Avatar-module_wrapper__LY2q2.Avatar-module_otherUser__b-drl{background:var(--color-gray-300,#eaeaec)}.Avatar-module_wrapper__LY2q2.Avatar-module_company__2qtJE{background:var(--color-white,#fff);border:0;border-radius:var(--border-solid-border-radius,7px);padding:6px}.Avatar-module_wrapper__LY2q2.Avatar-module_small__PeksS{height:1.25rem;width:1.25rem}.Avatar-module_wrapper__LY2q2.Avatar-module_small__PeksS .Avatar-module_initials__VDY2Q{margin-bottom:-1px}.Avatar-module_wrapper__LY2q2.Avatar-module_small__PeksS.Avatar-module_company__2qtJE{padding:0}.Avatar-module_wrapper__LY2q2.Avatar-module_medium__Vy3V8{height:3rem;width:3rem}.Avatar-module_wrapper__LY2q2.Avatar-module_medium__Vy3V8 .Avatar-module_initials__VDY2Q{margin-bottom:-1px}.Avatar-module_wrapper__LY2q2.Avatar-module_large__qiNWs{height:4.5rem;width:4.5rem}.Avatar-module_wrapper__LY2q2.Avatar-module_xlarge__Vx4IG{height:6rem;width:6rem}.Avatar-module_wrapper__LY2q2.Avatar-module_xxlarge__oOoGq{height:7.75rem;width:7.75rem}.Avatar-module_wrapper__LY2q2 .Avatar-module_initials__VDY2Q{speak-as:spell-out;border-bottom:none;text-decoration:none}.Avatar-module_avatarImage__FuULy{height:100%;object-fit:cover;width:100%}.Avatar-module_loading__i9V-D .Avatar-module_avatarImage__FuULy{display:none}.Avatar-module_companyAvatarImage__7rlfG{border-radius:4px;box-sizing:border-box;object-fit:contain}.Avatar-module_fallbackIcon__MPWxq{color:rgba(var(--color-purple-800-rgb,47,36,56),.7);width:28px}.Avatar-module_xxlarge__oOoGq .Avatar-module_fallbackIcon__MPWxq{width:75px}.Avatar-module_xlarge__Vx4IG .Avatar-module_fallbackIcon__MPWxq{width:60px}.Avatar-module_large__qiNWs .Avatar-module_fallbackIcon__MPWxq{width:35px}.Avatar-module_medium__Vy3V8 .Avatar-module_fallbackIcon__MPWxq{margin-bottom:-1px;width:25px}.Avatar-module_small__PeksS .Avatar-module_fallbackIcon__MPWxq{margin-bottom:-1px;width:10px}.Avatar-module_initials__VDY2Q{box-sizing:border-box;color:var(--color-purple-800,#2f2438);font-family:var(--typography-heading-1-font-family,"Inter","Noto Sans",Helvetica,Arial,sans-serif);font-size:22px;font-weight:var(--typography-heading-1-font-weight,700);letter-spacing:var(--typography-heading-3-letter-spacing,normal);padding-left:5px;padding-right:5px;text-align:center;width:100%}.Avatar-module_initials__VDY2Q:not(.Avatar-module_longName__31Yuf):before{content:"";display:block;margin-top:-.001em}.Avatar-module_xlarge__Vx4IG .Avatar-module_initials__VDY2Q,.Avatar-module_xxlarge__oOoGq .Avatar-module_initials__VDY2Q{font-size:34px;letter-spacing:var(--typography-heading-1-letter-spacing,normal)}.Avatar-module_medium__Vy3V8 .Avatar-module_initials__VDY2Q{font-size:16px}.Avatar-module_medium__Vy3V8 .Avatar-module_initials__VDY2Q,.Avatar-module_small__PeksS .Avatar-module_initials__VDY2Q{font-weight:var(--typography-heading-5-font-weight,600);letter-spacing:var(--typography-heading-5-letter-spacing,normal)}.Avatar-module_small__PeksS .Avatar-module_initials__VDY2Q{font-size:8px}
|
|
7
7
|
.AvatarGroup-module_AvatarGroup__bdL0o{display:inline-flex;list-style:none;margin:0;padding:0}.AvatarGroup-module_AvatarCounter__PKFzl{align-items:center;background:var(--color-gray-300,#eaeaec);border:3px solid var(--color-white,#fff);border-radius:100%;box-shadow:var(--shadow-small-box-shadow,0 1px 3px 0 rgba(0,0,0,.1),0 3px 16px 0 rgba(0,0,0,.06));box-sizing:border-box;display:flex;justify-content:center;overflow:hidden}[dir=rtl] .AvatarGroup-module_AvatarCounter__PKFzl{direction:ltr}.AvatarGroup-module_small__7uv8k .AvatarGroup-module_AvatarGroupItem__xQol-+.AvatarGroup-module_AvatarGroupItem__xQol-{margin-inline-start:-.625rem}.AvatarGroup-module_small__7uv8k .AvatarGroup-module_AvatarCounter__PKFzl{border:none;box-shadow:none;font-family:var(--typography-heading-5-font-family,"Inter","Noto Sans",Helvetica,Arial,sans-serif);font-size:.5rem;font-weight:var(--typography-heading-5-font-weight,600);height:1.25rem;letter-spacing:var(--typography-heading-5-letter-spacing,normal);width:1.25rem}.AvatarGroup-module_medium__af52y .AvatarGroup-module_AvatarGroupItem__xQol-+.AvatarGroup-module_AvatarGroupItem__xQol-{margin-inline-start:-1.5rem}.AvatarGroup-module_medium__af52y .AvatarGroup-module_AvatarCounter__PKFzl{font-family:var(--typography-heading-5-font-family,"Inter","Noto Sans",Helvetica,Arial,sans-serif);font-size:var(--typography-heading-5-font-size,1rem);font-weight:var(--typography-heading-5-font-weight,600);height:3rem;letter-spacing:var(--typography-heading-5-letter-spacing,normal);width:3rem}.AvatarGroup-module_large__HN9Yy .AvatarGroup-module_AvatarGroupItem__xQol-+.AvatarGroup-module_AvatarGroupItem__xQol-{margin-inline-start:-2.25rem}.AvatarGroup-module_large__HN9Yy .AvatarGroup-module_AvatarCounter__PKFzl{font-family:var(--typography-heading-3-font-family,"Inter","Noto Sans",Helvetica,Arial,sans-serif);font-size:var(--typography-heading-3-font-size,1.375rem);font-weight:var(--typography-heading-3-font-weight,700);height:4.5rem;letter-spacing:var(--typography-heading-3-letter-spacing,normal);width:4.5rem}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AvatarGroupAvatarProps, AvatarList } from "../AvatarGroup";
|
|
2
|
+
export declare const EXAMPLE_USER_1: AvatarGroupAvatarProps;
|
|
3
|
+
export declare const EXAMPLE_USER_2: AvatarGroupAvatarProps;
|
|
4
|
+
export declare const EXAMPLE_USER_3: AvatarGroupAvatarProps;
|
|
5
|
+
export declare const EXAMPLE_USER_4: AvatarGroupAvatarProps;
|
|
6
|
+
export declare const EXAMPLE_USER_5: AvatarGroupAvatarProps;
|
|
7
|
+
export declare const EXAMPLE_USER_6: AvatarGroupAvatarProps;
|
|
8
|
+
export declare const AVATARS: AvatarList;
|
|
@@ -4,7 +4,7 @@ import React from "react";
|
|
|
4
4
|
* {@link https://cultureamp.design/?path=/docs/components-content--docs Storybook}
|
|
5
5
|
*/
|
|
6
6
|
export declare const Container: React.ForwardRefExoticComponent<{
|
|
7
|
-
children?:
|
|
7
|
+
children?: React.ReactNode;
|
|
8
8
|
style?: Pick<React.CSSProperties, "transform" | "left" | "right" | "bottom" | "top" | "position" | "padding" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "transformBox" | "transformOrigin" | "transformStyle"> | undefined;
|
|
9
9
|
} & Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
|
|
10
10
|
classNameOverride?: string | undefined;
|
|
@@ -12,7 +12,7 @@ export type ContentProps = {
|
|
|
12
12
|
* {@link https://cultureamp.design/?path=/docs/components-content--docs Storybook}
|
|
13
13
|
*/
|
|
14
14
|
export declare const Content: React.ForwardRefExoticComponent<{
|
|
15
|
-
children?:
|
|
15
|
+
children?: React.ReactNode;
|
|
16
16
|
/**
|
|
17
17
|
* Not recommended. A short-circuit for dynamically overriding layout in a pinch
|
|
18
18
|
*/
|
|
@@ -6,7 +6,7 @@ export type DateInputProps = {
|
|
|
6
6
|
isReversed?: boolean;
|
|
7
7
|
} & Omit<InputProps, OmittedInputProps>;
|
|
8
8
|
export declare const DateInput: React.ForwardRefExoticComponent<{
|
|
9
|
-
labelText:
|
|
9
|
+
labelText: React.ReactNode;
|
|
10
10
|
isReversed?: boolean | undefined;
|
|
11
11
|
} & Omit<InputProps, OmittedInputProps> & React.RefAttributes<HTMLInputElement>>;
|
|
12
12
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
2
|
import { CalendarSingleProps, DisabledDayMatchers } from "../Calendar";
|
|
3
3
|
import { DateInputFieldProps } from "./subcomponents/DateInputField";
|
|
4
|
-
import { ValidationResponse } from "./types";
|
|
4
|
+
import type { ValidationResponse } from "./types";
|
|
5
5
|
import { DatePickerSupportedLocales } from "./utils/getLocale";
|
|
6
6
|
type OmittedDateInputFieldProps = "onClick" | "onFocus" | "onChange" | "onBlur" | "onButtonClick" | "value" | "locale" | "id";
|
|
7
7
|
export type DatePickerProps = {
|
|
@@ -14,8 +14,8 @@ export type DatePickerProps = {
|
|
|
14
14
|
onButtonClick?: DateInputFieldProps["onButtonClick"];
|
|
15
15
|
locale?: DatePickerSupportedLocales;
|
|
16
16
|
/**
|
|
17
|
-
* Accepts a DayOfWeek value to start the week on that day.
|
|
18
|
-
* it
|
|
17
|
+
* Accepts a DayOfWeek value to start the week on that day.
|
|
18
|
+
* By default it adapts to the provided locale.
|
|
19
19
|
*/
|
|
20
20
|
weekStartsOn?: CalendarSingleProps["weekStartsOn"];
|
|
21
21
|
/**
|
|
@@ -29,7 +29,7 @@ export declare const DateInputField: React.ForwardRefExoticComponent<{
|
|
|
29
29
|
/**
|
|
30
30
|
* A descriptive message for `status` states
|
|
31
31
|
*/
|
|
32
|
-
validationMessage?:
|
|
32
|
+
validationMessage?: React.ReactNode;
|
|
33
33
|
locale?: Locale | undefined;
|
|
34
34
|
} & {
|
|
35
35
|
onButtonClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { FieldMessageStatus } from "../FieldMessage";
|
|
2
3
|
export type ValidationResponse = {
|
|
3
4
|
date: Date | undefined;
|
|
4
5
|
inputValue: string | undefined;
|
|
5
6
|
status: FieldMessageStatus | undefined;
|
|
6
|
-
validationMessage: string | undefined;
|
|
7
|
+
validationMessage: string | ReactElement | undefined;
|
|
7
8
|
isDisabled: boolean;
|
|
8
9
|
isInvalid: boolean;
|
|
9
10
|
isEmpty: boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { Locale } from "date-fns";
|
|
2
|
-
|
|
3
|
-
export type DatePickerSupportedLocales = StringSuggestions<"en-US" | "en-AU">;
|
|
2
|
+
export type DatePickerSupportedLocales = string;
|
|
4
3
|
export declare const getLocale: (locale: DatePickerSupportedLocales) => Locale;
|
|
@@ -21,8 +21,8 @@ export type DateRangePickerProps = {
|
|
|
21
21
|
*/
|
|
22
22
|
value?: string;
|
|
23
23
|
/**
|
|
24
|
-
* Accepts a DayOfWeek value to start the week on that day.
|
|
25
|
-
* it
|
|
24
|
+
* Accepts a DayOfWeek value to start the week on that day.
|
|
25
|
+
* By default it adapts to the provided locale.
|
|
26
26
|
*/
|
|
27
27
|
weekStartsOn?: LegacyCalendarRangeProps["weekStartsOn"];
|
|
28
28
|
/**
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FilterAttributes, FilterIsUsableWhen, FiltersValues } from "../types";
|
|
2
|
+
export type MappedFilters<ValuesMap extends FiltersValues> = {
|
|
3
|
+
[K in keyof ValuesMap]: FilterAttributes<ValuesMap, K>;
|
|
4
|
+
};
|
|
5
|
+
export type FilterStateEditableAttributes = {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type InternalFilterState<ValuesMap extends FiltersValues, Id extends keyof ValuesMap> = {
|
|
9
|
+
id: Id;
|
|
10
|
+
name: string;
|
|
11
|
+
isRemovable: boolean;
|
|
12
|
+
isUsableWhen?: FilterIsUsableWhen<ValuesMap>;
|
|
13
|
+
isUsable: boolean;
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
value?: never;
|
|
16
|
+
isActive?: never;
|
|
17
|
+
};
|
|
18
|
+
export type FilterBarStateFilters<ValuesMap extends FiltersValues> = {
|
|
19
|
+
[K in keyof ValuesMap]: InternalFilterState<ValuesMap, K>;
|
|
20
|
+
};
|
|
21
|
+
export type FilterBarState<ValuesMap extends FiltersValues> = {
|
|
22
|
+
hasUpdatedValues: boolean;
|
|
23
|
+
filters: FilterBarStateFilters<ValuesMap>;
|
|
24
|
+
activeFilterIds: Set<keyof ValuesMap>;
|
|
25
|
+
values: Partial<ValuesMap>;
|
|
26
|
+
dependentFilterIds: Set<keyof ValuesMap>;
|
|
27
|
+
};
|
|
28
|
+
export type ActiveFiltersArray<ValuesMap extends FiltersValues> = Array<FilterAttributes<ValuesMap>>;
|
|
@@ -4,7 +4,7 @@ export type FilterButtonBaseProps = {
|
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
} & OverrideClassName<ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
6
6
|
export declare const FilterButtonBase: React.ForwardRefExoticComponent<{
|
|
7
|
-
children:
|
|
7
|
+
children: React.ReactNode;
|
|
8
8
|
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className"> & {
|
|
9
9
|
classNameOverride?: string | undefined;
|
|
10
10
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -24,5 +24,5 @@ export declare const DateInputField: React.ForwardRefExoticComponent<{
|
|
|
24
24
|
isReversed?: boolean | undefined;
|
|
25
25
|
validationMessage?: ValidationMessage | undefined;
|
|
26
26
|
disabled?: boolean | undefined;
|
|
27
|
-
labelText?:
|
|
27
|
+
labelText?: DateInputProps["labelText"];
|
|
28
28
|
} & Omit<DateInputProps, "id" | "labelText"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ItemType } from "../types";
|
|
2
|
+
export declare const mockItems: ItemType[];
|
|
3
|
+
export declare const departmentDemographicValues: {
|
|
4
|
+
demographicValueId: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}[];
|
|
7
|
+
export declare const locationDemographicValues: {
|
|
8
|
+
demographicValueId: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SelectItem } from "../types";
|
|
2
|
+
export declare const singleMockItems: SelectItem[];
|
|
3
|
+
export declare const groupedMockItems: SelectItem[];
|
|
4
|
+
export declare const mixedMockItemsDisabled: SelectItem[];
|
|
5
|
+
export declare const mixedMockItemsUngroupedFirst: SelectItem[];
|
|
6
|
+
export declare const mixedMockItemsUnordered: SelectItem[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type MenuContentExampleProps = {
|
|
2
|
+
isShortList?: boolean;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* This is an mocked example of a Menu's children using all of the subcomponents.
|
|
6
|
+
*/
|
|
7
|
+
export declare const MenuContentExample: ({ isShortList, }: MenuContentExampleProps) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const exampleActionButtonPropsButton: {
|
|
3
|
+
label: string;
|
|
4
|
+
onClick: import("@storybook/addon-actions/*").HandlerFunction;
|
|
5
|
+
};
|
|
6
|
+
export declare const exampleActionButtonPropsAnchor: {
|
|
7
|
+
label: string;
|
|
8
|
+
href: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const exampleDropdownContentEnabled: React.JSX.Element;
|
|
11
|
+
export declare const exampleDropdownContentOneDisabled: React.JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
import { FieldMessageProps } from "../FieldMessage";
|
|
3
|
+
import { OverrideClassName } from "../types/OverrideClassName";
|
|
4
|
+
import { MultiSelectOptionsProps } from "./subcomponents/MultiSelectOptions";
|
|
5
|
+
import { MultiSelectOption, ValidationMessage } from "./types";
|
|
6
|
+
export type MultiSelectProps = {
|
|
7
|
+
label: string;
|
|
8
|
+
items: MultiSelectOptionsProps["options"];
|
|
9
|
+
selectedValues: Set<MultiSelectOption["value"]>;
|
|
10
|
+
/**
|
|
11
|
+
* A description that provides context for the field
|
|
12
|
+
*/
|
|
13
|
+
description?: FieldMessageProps["message"];
|
|
14
|
+
onSelectedValuesChange: MultiSelectOptionsProps["onChange"];
|
|
15
|
+
isOpen: boolean;
|
|
16
|
+
onOpenChange: (isOpen: boolean) => void;
|
|
17
|
+
/** A status and message to provide context to the validation issue */
|
|
18
|
+
validationMessage?: ValidationMessage;
|
|
19
|
+
} & OverrideClassName<HTMLAttributes<HTMLDivElement>>;
|
|
20
|
+
export declare const MultiSelect: {
|
|
21
|
+
({ id: propsId, label, items, selectedValues, description, onSelectedValuesChange, isOpen, onOpenChange, classNameOverride, validationMessage, ...restProps }: MultiSelectProps): JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
import { OverrideClassName } from "../../../types/OverrideClassName";
|
|
3
|
+
import { MultiSelectOption } from "../../types";
|
|
4
|
+
export type MultiSelectOptionsProps = {
|
|
5
|
+
id: string;
|
|
6
|
+
options: MultiSelectOption[];
|
|
7
|
+
selectedValues: Set<MultiSelectOption["value"]>;
|
|
8
|
+
onChange: (selectedValues: Set<MultiSelectOption["value"]>) => void;
|
|
9
|
+
} & OverrideClassName<Omit<HTMLAttributes<HTMLFieldSetElement>, "onChange">>;
|
|
10
|
+
export declare const MultiSelectOptions: {
|
|
11
|
+
({ id, options, selectedValues, onChange, classNameOverride, ...restProps }: MultiSelectOptionsProps): JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
@@ -42,9 +42,9 @@ export declare const Select: React.ForwardRefExoticComponent<{
|
|
|
42
42
|
*/
|
|
43
43
|
variant?: "default" | "secondary" | "secondary-small" | undefined;
|
|
44
44
|
status?: "error" | "default" | undefined;
|
|
45
|
-
label?:
|
|
46
|
-
validationMessage?:
|
|
47
|
-
description?:
|
|
45
|
+
label?: React.ReactNode;
|
|
46
|
+
validationMessage?: React.ReactNode;
|
|
47
|
+
description?: React.ReactNode;
|
|
48
48
|
/**
|
|
49
49
|
* Use a reversed colour scheme
|
|
50
50
|
* @default false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./controls";
|
|
@@ -70,9 +70,9 @@ export declare const Select: {
|
|
|
70
70
|
displayName: string;
|
|
71
71
|
};
|
|
72
72
|
TriggerButton: React.ForwardRefExoticComponent<{
|
|
73
|
-
label:
|
|
73
|
+
label: React.ReactNode;
|
|
74
74
|
labelProps: import("@react-types/shared").DOMAttributes<import("@react-types/shared").FocusableElement>;
|
|
75
|
-
value:
|
|
75
|
+
value: React.ReactNode;
|
|
76
76
|
valueProps: import("@react-types/shared").DOMAttributes<import("@react-types/shared").FocusableElement>;
|
|
77
77
|
isOpen?: boolean | undefined;
|
|
78
78
|
placeholder?: string | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SelectItem } from "../types";
|
|
2
|
+
export declare const singleMockItems: SelectItem[];
|
|
3
|
+
export declare const groupedMockItems: SelectItem[];
|
|
4
|
+
export declare const mixedMockItemsDisabled: SelectItem[];
|
|
5
|
+
export declare const mixedMockItemsUngroupedFirst: SelectItem[];
|
|
6
|
+
export declare const mixedMockItemsUnordered: SelectItem[];
|
|
@@ -20,9 +20,9 @@ export type SelectToggleProps = {
|
|
|
20
20
|
isReversed?: boolean;
|
|
21
21
|
} & OverrideClassName<HTMLAttributes<HTMLButtonElement>>;
|
|
22
22
|
export declare const SelectToggle: React.ForwardRefExoticComponent<{
|
|
23
|
-
label:
|
|
23
|
+
label: React.ReactNode;
|
|
24
24
|
labelProps: DOMAttributes<FocusableElement>;
|
|
25
|
-
value:
|
|
25
|
+
value: React.ReactNode;
|
|
26
26
|
/** Props for the element representing the selected value. */
|
|
27
27
|
valueProps: DOMAttributes<FocusableElement>;
|
|
28
28
|
isOpen?: boolean | undefined;
|