@indico-data/design-system 3.18.0 → 3.20.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/.eslintrc.js +87 -2
- package/.husky/pre-commit +2 -0
- package/.vscode/settings.json +10 -1
- package/lib/components/badge/Badge.d.ts +1 -1
- package/lib/components/badge/Badge.stories.d.ts +1 -1
- package/lib/components/button/Button.d.ts +2 -2
- package/lib/components/button/Button.stories.d.ts +1 -1
- package/lib/components/button/types.d.ts +1 -1
- package/lib/components/card/Card.d.ts +1 -1
- package/lib/components/card/Card.stories.d.ts +1 -1
- package/lib/components/floatUI/FloatUI.d.ts +1 -1
- package/lib/components/floatUI/FloatUI.stories.d.ts +2 -2
- package/lib/components/floatUI/types.d.ts +2 -2
- package/lib/components/forms/checkbox/Checkbox.stories.d.ts +1 -1
- package/lib/components/forms/date/datePicker/DatePicker.d.ts +1 -1
- package/lib/components/forms/date/datePicker/DatePicker.stories.d.ts +1 -1
- package/lib/components/forms/date/datePicker/contants.d.ts +1 -1
- package/lib/components/forms/date/datePicker/types.d.ts +8 -1
- package/lib/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.d.ts +7 -4
- package/lib/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.stories.d.ts +1 -1
- package/lib/components/forms/date/iconTriggerDatePicker/types.d.ts +5 -0
- package/lib/components/forms/date/inputDatePicker/SingleInputDatePicker.d.ts +4 -3
- package/lib/components/forms/date/inputDatePicker/SingleInputDatePicker.stories.d.ts +1 -1
- package/lib/components/forms/date/inputDateRangePicker/InputDateRangePicker.d.ts +7 -4
- package/lib/components/forms/date/inputDateRangePicker/InputDateRangePicker.stories.d.ts +1 -1
- package/lib/components/forms/date/inputDateRangePicker/types.d.ts +7 -0
- package/lib/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.d.ts +4 -3
- package/lib/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.stories.d.ts +1 -1
- package/lib/components/forms/form/Form.d.ts +1 -1
- package/lib/components/forms/form/Form.stories.d.ts +1 -1
- package/lib/components/forms/input/Input.d.ts +2 -2
- package/lib/components/forms/input/Input.stories.d.ts +1 -1
- package/lib/components/forms/numberInput/NumberInput.d.ts +2 -2
- package/lib/components/forms/numberInput/NumberInput.stories.d.ts +1 -1
- package/lib/components/forms/passwordInput/PasswordInput.d.ts +1 -1
- package/lib/components/forms/passwordInput/PasswordInput.stories.d.ts +1 -1
- package/lib/components/forms/radio/Radio.stories.d.ts +1 -1
- package/lib/components/forms/select/Select.d.ts +4 -2
- package/lib/components/forms/select/Select.stories.d.ts +4 -4
- package/lib/components/forms/select/types.d.ts +11 -1
- package/lib/components/forms/subcomponents/Label.d.ts +5 -1
- package/lib/components/forms/subcomponents/types.d.ts +5 -0
- package/lib/components/forms/textarea/Textarea.d.ts +1 -1
- package/lib/components/forms/textarea/Textarea.stories.d.ts +1 -1
- package/lib/components/forms/timePicker/TimePicker.d.ts +4 -1
- package/lib/components/forms/timePicker/types.d.ts +5 -0
- package/lib/components/forms/toggle/Toggle.stories.d.ts +1 -1
- package/lib/components/grid/col/Col.d.ts +1 -1
- package/lib/components/grid/col/Col.stories.d.ts +1 -1
- package/lib/components/grid/container/Container.d.ts +1 -1
- package/lib/components/grid/container/Container.stories.d.ts +1 -1
- package/lib/components/grid/row/Row.d.ts +1 -1
- package/lib/components/grid/row/Row.stories.d.ts +1 -1
- package/lib/components/icons/Icon.d.ts +1 -1
- package/lib/components/icons/Icon.stories.d.ts +2 -2
- package/lib/components/icons/indicons.d.ts +1 -1
- package/lib/components/icons/types.d.ts +4 -4
- package/lib/components/loading-indicators/BarSpinner/BarSpinner.stories.d.ts +1 -1
- package/lib/components/loading-indicators/CirclePulse/CirclePulse.stories.d.ts +1 -1
- package/lib/components/menu/Menu.stories.d.ts +2 -2
- package/lib/components/modal/ConfirmationModal.d.ts +2 -2
- package/lib/components/modal/Modal.d.ts +2 -2
- package/lib/components/modal/Modal.stories.d.ts +6 -2
- package/lib/components/modal/types.d.ts +21 -7
- package/lib/components/pagination/Pagination.d.ts +2 -2
- package/lib/components/pagination/Pagination.stories.d.ts +1 -1
- package/lib/components/pagination/index.d.ts +1 -0
- package/lib/components/pagination/types.d.ts +13 -0
- package/lib/components/pill/Pill.d.ts +1 -1
- package/lib/components/pill/Pill.stories.d.ts +1 -1
- package/lib/components/pill/types.d.ts +2 -2
- package/lib/components/skeleton/Skeleton.stories.d.ts +1 -1
- package/lib/components/stepper/Stepper.d.ts +2 -2
- package/lib/components/stepper/Stepper.stories.d.ts +1 -1
- package/lib/components/stepper/components/BackNavigation.d.ts +2 -1
- package/lib/components/stepper/components/Legend.d.ts +1 -1
- package/lib/components/stepper/components/NextNavigation.d.ts +3 -1
- package/lib/components/stepper/types.d.ts +12 -1
- package/lib/components/table/LoadingComponent.d.ts +5 -1
- package/lib/components/table/Table.d.ts +1 -1
- package/lib/components/table/Table.stories.d.ts +2 -2
- package/lib/components/table/components/HorizontalStickyHeader.d.ts +4 -1
- package/lib/components/table/components/helpers.d.ts +1 -1
- package/lib/components/table/hooks/usePinnedColumnsManager.d.ts +2 -2
- package/lib/components/table/sampleData.d.ts +1 -1
- package/lib/components/table/types.d.ts +20 -2
- package/lib/components/table/utils/processColumns.d.ts +2 -2
- package/lib/components/tanstackTable/TankstackTable.types.d.ts +20 -3
- package/lib/components/tanstackTable/TanstackTable.d.ts +2 -2
- package/lib/components/tanstackTable/TanstackTable.stories.d.ts +2 -2
- package/lib/components/tanstackTable/__tests__/__mocks__/test-mock-data.d.ts +1 -1
- package/lib/components/tanstackTable/components/ActionBar/ActionBar.d.ts +2 -2
- package/lib/components/tanstackTable/components/ActionBar/ActionBar.stories.d.ts +1 -1
- package/lib/components/tanstackTable/components/NoResults/NoResults.d.ts +2 -1
- package/lib/components/tanstackTable/components/TableBody/TableBody.d.ts +1 -1
- package/lib/components/tanstackTable/components/TableHeader/TableHeader.d.ts +1 -1
- package/lib/components/tanstackTable/components/TableLoading/TableLoading.d.ts +1 -1
- package/lib/components/tanstackTable/components/TablePagination/TablePagination.d.ts +3 -1
- package/lib/components/tanstackTable/docs/internalSorting/InternalClientSideSorting.stories.d.ts +2 -2
- package/lib/components/tanstackTable/docs/pinnedColumns/PinnedColumn.stories.d.ts +2 -2
- package/lib/components/tanstackTable/docs/withRowClick/WithRowClick.stories.d.ts +2 -2
- package/lib/components/tanstackTable/helpers.d.ts +2 -2
- package/lib/components/tanstackTable/mock-data/table-configuration.d.ts +2 -2
- package/lib/components/tanstackTable/useTanstackTable.d.ts +1 -1
- package/lib/components/toast/Toast.stories.d.ts +1 -1
- package/lib/components/tooltip/Tooltip.d.ts +2 -2
- package/lib/components/tooltip/Tooltip.stories.d.ts +1 -1
- package/lib/components/truncate/Truncate.d.ts +1 -1
- package/lib/components/truncate/Truncate.stories.d.ts +2 -2
- package/lib/components/truncate/types.d.ts +1 -1
- package/lib/docs/BaseColorPalette/BaseColorsPalette.stories.d.ts +1 -1
- package/lib/docs/SemanticTokens/ColorSwatch.d.ts +1 -1
- package/lib/docs/SemanticTokens/SemanticTokens.stories.d.ts +1 -1
- package/lib/index.d.ts +165 -45
- package/lib/index.esm.js +253 -170
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +253 -170
- package/lib/index.js.map +1 -1
- package/lib/setup/setupIcons.d.ts +1 -1
- package/lib/storybook/formArgTypes.d.ts +1 -1
- package/lib/stylesAndAnimations/borders/BorderColor.stories.d.ts +1 -1
- package/lib/stylesAndAnimations/borders/BorderRadius.stories.d.ts +1 -1
- package/lib/stylesAndAnimations/borders/BorderStyles.stories.d.ts +1 -1
- package/lib/stylesAndAnimations/borders/BorderThickness.stories.d.ts +1 -1
- package/lib/stylesAndAnimations/colors/UtilityClasses.stories.d.ts +1 -1
- package/lib/stylesAndAnimations/sizing/Sizing.stories.d.ts +1 -1
- package/lib/stylesAndAnimations/typography/Typography.stories.d.ts +1 -1
- package/lib/stylesAndAnimations/utilityClasses/UtilityClassesTable.stories.d.ts +1 -1
- package/lib/types.d.ts +4 -4
- package/package.json +8 -2
- package/src/components/badge/Badge.stories.tsx +4 -3
- package/src/components/badge/Badge.tsx +2 -1
- package/src/components/badge/__tests__/Badge.test.tsx +1 -0
- package/src/components/button/Button.stories.tsx +5 -4
- package/src/components/button/Button.tsx +12 -22
- package/src/components/button/__tests__/Button.test.tsx +31 -28
- package/src/components/button/types.ts +1 -1
- package/src/components/card/Card.stories.tsx +2 -1
- package/src/components/card/Card.tsx +2 -1
- package/src/components/card/__tests__/Card.test.tsx +1 -0
- package/src/components/floatUI/FloatUI.stories.tsx +3 -2
- package/src/components/floatUI/FloatUI.tsx +6 -7
- package/src/components/floatUI/__tests__/FloatUI.test.tsx +5 -3
- package/src/components/floatUI/types.ts +2 -2
- package/src/components/forms/checkbox/Checkbox.stories.tsx +3 -2
- package/src/components/forms/checkbox/Checkbox.tsx +1 -1
- package/src/components/forms/checkbox/__tests__/Checkbox.test.tsx +2 -1
- package/src/components/forms/date/datePicker/DatePicker.stories.tsx +12 -1
- package/src/components/forms/date/datePicker/DatePicker.tsx +35 -25
- package/src/components/forms/date/datePicker/__tests__/DatePicker.test.tsx +1 -0
- package/src/components/forms/date/datePicker/contants.ts +1 -1
- package/src/components/forms/date/datePicker/types.ts +16 -8
- package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.stories.tsx +16 -2
- package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.tsx +21 -8
- package/src/components/forms/date/iconTriggerDatePicker/__tests__/IconTriggerDatePicker.test.tsx +2 -1
- package/src/components/forms/date/iconTriggerDatePicker/types.ts +5 -0
- package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.stories.tsx +4 -2
- package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.tsx +18 -13
- package/src/components/forms/date/inputDatePicker/__tests__/SingleInputDatePicker.test.tsx +4 -2
- package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.stories.tsx +15 -4
- package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.tsx +29 -23
- package/src/components/forms/date/inputDateRangePicker/__tests__/InputDateRangePicker.test.tsx +2 -2
- package/src/components/forms/date/inputDateRangePicker/types.ts +7 -0
- package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.stories.tsx +9 -5
- package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.tsx +18 -13
- package/src/components/forms/form/Form.stories.tsx +7 -6
- package/src/components/forms/form/Form.tsx +1 -1
- package/src/components/forms/form/__tests__/Form.test.tsx +7 -4
- package/src/components/forms/input/Input.stories.tsx +6 -3
- package/src/components/forms/input/Input.tsx +4 -3
- package/src/components/forms/input/__tests__/Input.test.tsx +5 -3
- package/src/components/forms/numberInput/NumberInput.stories.tsx +5 -2
- package/src/components/forms/numberInput/NumberInput.tsx +6 -3
- package/src/components/forms/numberInput/__tests__/NumberInput.test.tsx +2 -1
- package/src/components/forms/passwordInput/PasswordInput.stories.tsx +6 -3
- package/src/components/forms/passwordInput/PasswordInput.tsx +12 -3
- package/src/components/forms/passwordInput/__tests__/PasswordInput.test.tsx +3 -4
- package/src/components/forms/radio/Radio.stories.tsx +5 -2
- package/src/components/forms/radio/__tests__/Radio.test.tsx +3 -2
- package/src/components/forms/select/Select.stories.tsx +11 -9
- package/src/components/forms/select/Select.tsx +21 -6
- package/src/components/forms/select/__tests__/Select.test.tsx +2 -2
- package/src/components/forms/select/types.ts +13 -1
- package/src/components/forms/subcomponents/Label.tsx +24 -4
- package/src/components/forms/subcomponents/__tests__/Label.test.tsx +1 -0
- package/src/components/forms/subcomponents/types.ts +5 -0
- package/src/components/forms/textarea/Textarea.stories.tsx +5 -2
- package/src/components/forms/textarea/Textarea.tsx +5 -4
- package/src/components/forms/textarea/__tests__/Textarea.test.tsx +3 -3
- package/src/components/forms/timePicker/TimePicker.stories.tsx +14 -2
- package/src/components/forms/timePicker/TimePicker.tsx +15 -5
- package/src/components/forms/timePicker/__tests__/TimePicker.test.tsx +2 -1
- package/src/components/forms/timePicker/types.ts +5 -0
- package/src/components/forms/toggle/Toggle.stories.tsx +3 -2
- package/src/components/forms/toggle/__tests__/Toggle.test.tsx +3 -2
- package/src/components/grid/col/Col.stories.tsx +2 -1
- package/src/components/grid/col/Col.tsx +1 -1
- package/src/components/grid/container/Container.stories.tsx +2 -1
- package/src/components/grid/container/Container.tsx +1 -1
- package/src/components/grid/row/Row.stories.tsx +2 -1
- package/src/components/grid/row/Row.tsx +1 -1
- package/src/components/icons/Icon.stories.tsx +11 -4
- package/src/components/icons/Icon.tsx +4 -3
- package/src/components/icons/__tests__/Icon.test.tsx +1 -0
- package/src/components/icons/indicons.tsx +3 -3
- package/src/components/icons/types.ts +5 -4
- package/src/components/loading-indicators/BarSpinner/BarSpinner.stories.tsx +2 -1
- package/src/components/loading-indicators/BarSpinner/__tests__/BarSpinner.test.tsx +1 -0
- package/src/components/loading-indicators/CirclePulse/CirclePulse.stories.tsx +2 -1
- package/src/components/menu/Menu.stories.tsx +3 -2
- package/src/components/menu/Menu.test.tsx +1 -1
- package/src/components/menu/Menu.tsx +1 -1
- package/src/components/modal/ConfirmationModal.tsx +25 -18
- package/src/components/modal/Modal.stories.tsx +62 -28
- package/src/components/modal/Modal.tsx +9 -2
- package/src/components/modal/__tests__/Modal.test.tsx +1 -0
- package/src/components/modal/types.ts +23 -7
- package/src/components/pagination/Pagination.stories.tsx +14 -2
- package/src/components/pagination/Pagination.tsx +18 -8
- package/src/components/pagination/__tests__/Pagination.test.tsx +1 -0
- package/src/components/pagination/index.ts +1 -0
- package/src/components/pagination/types.ts +14 -0
- package/src/components/pill/Pill.stories.tsx +10 -6
- package/src/components/pill/Pill.tsx +2 -1
- package/src/components/pill/__tests__/Pill.test.tsx +4 -1
- package/src/components/pill/types.ts +4 -2
- package/src/components/skeleton/Skeleton.stories.tsx +2 -1
- package/src/components/skeleton/__tests__/Skeleton.test.tsx +1 -0
- package/src/components/stepper/Stepper.stories.tsx +20 -7
- package/src/components/stepper/Stepper.tsx +18 -3
- package/src/components/stepper/__tests__/Stepper.tests.tsx +5 -4
- package/src/components/stepper/components/BackNavigation.tsx +5 -3
- package/src/components/stepper/components/Legend.tsx +4 -3
- package/src/components/stepper/components/NextNavigation.tsx +15 -5
- package/src/components/stepper/examples/MixedExample.tsx +4 -3
- package/src/components/stepper/examples/OptionalStepsExample.tsx +4 -3
- package/src/components/stepper/examples/RequiredStepsExample.tsx +4 -3
- package/src/components/stepper/examples/commonExample/CommonExample.tsx +4 -3
- package/src/components/stepper/examples/commonExample/steps/StepOne.tsx +1 -0
- package/src/components/stepper/examples/commonExample/steps/StepThree.tsx +1 -0
- package/src/components/stepper/examples/commonExample/steps/StepTwo.tsx +1 -0
- package/src/components/stepper/types.ts +13 -1
- package/src/components/table/LoadingComponent.tsx +6 -2
- package/src/components/table/Table.stories.tsx +19 -5
- package/src/components/table/Table.tsx +16 -5
- package/src/components/table/__tests__/Table.test.tsx +2 -1
- package/src/components/table/components/HorizontalStickyHeader.tsx +14 -2
- package/src/components/table/components/TablePagination.tsx +1 -1
- package/src/components/table/components/__tests__/HorizontalStickyHeader.test.tsx +3 -3
- package/src/components/table/components/__tests__/TablePagination.test.tsx +1 -0
- package/src/components/table/components/helpers.ts +1 -1
- package/src/components/table/hooks/usePinnedColumnsManager.ts +7 -2
- package/src/components/table/sampleData.tsx +1 -3
- package/src/components/table/types.ts +25 -6
- package/src/components/table/utils/processColumns.tsx +4 -2
- package/src/components/tanstackTable/TankstackTable.types.ts +21 -3
- package/src/components/tanstackTable/TanstackTable.stories.tsx +14 -11
- package/src/components/tanstackTable/TanstackTable.tsx +28 -18
- package/src/components/tanstackTable/__tests__/TanstackTable.test.tsx +2 -1
- package/src/components/tanstackTable/__tests__/__mocks__/test-mock-data.tsx +2 -1
- package/src/components/tanstackTable/components/ActionBar/ActionBar.stories.tsx +6 -3
- package/src/components/tanstackTable/components/ActionBar/ActionBar.tsx +7 -3
- package/src/components/tanstackTable/components/ActionBar/__tests__/ActionBar.test.tsx +4 -1
- package/src/components/tanstackTable/components/NoResults/NoResults.tsx +9 -3
- package/src/components/tanstackTable/components/NoResults/__tests__/NoResult.test.tsx +1 -0
- package/src/components/tanstackTable/components/TableBody/TableBody.tsx +2 -1
- package/src/components/tanstackTable/components/TableHeader/TableHeader.tsx +3 -2
- package/src/components/tanstackTable/components/TableLoading/TableLoading.tsx +2 -1
- package/src/components/tanstackTable/components/TablePagination/TablePagination.tsx +4 -1
- package/src/components/tanstackTable/components/TablePagination/__tests__/TablePagination.test.tsx +1 -0
- package/src/components/tanstackTable/docs/internalSorting/InternalClientSideSorting.stories.tsx +5 -5
- package/src/components/tanstackTable/docs/pinnedColumns/PinnedColumn.stories.tsx +5 -4
- package/src/components/tanstackTable/docs/withRowClick/WithRowClick.stories.tsx +5 -4
- package/src/components/tanstackTable/helpers.ts +2 -2
- package/src/components/tanstackTable/mock-data/table-configuration.tsx +7 -4
- package/src/components/tanstackTable/useTanstackTable.tsx +1 -2
- package/src/components/toast/Toast.stories.tsx +2 -1
- package/src/components/tooltip/Tooltip.stories.tsx +3 -2
- package/src/components/tooltip/Tooltip.tsx +2 -2
- package/src/components/truncate/Truncate.stories.tsx +3 -2
- package/src/components/truncate/Truncate.tsx +5 -4
- package/src/components/truncate/__tests__/Truncate.test.tsx +1 -0
- package/src/components/truncate/types.ts +1 -1
- package/src/docs/BaseColorPalette/BaseColorPalette.tsx +1 -0
- package/src/docs/BaseColorPalette/BaseColorsPalette.stories.tsx +2 -1
- package/src/docs/BaseColorPalette/Swatch.tsx +2 -1
- package/src/docs/SemanticTokens/ColorSwatch.tsx +1 -1
- package/src/docs/SemanticTokens/SemanticTokens.stories.tsx +2 -2
- package/src/index.ts +1 -1
- package/src/setup/setupIcons.ts +2 -2
- package/src/storybook/formArgTypes.ts +12 -1
- package/src/storybook/iconNames.ts +1 -0
- package/src/storybookDocs/Permafrost.mdx +8 -0
- package/src/stylesAndAnimations/borders/BorderColor.stories.tsx +2 -1
- package/src/stylesAndAnimations/borders/BorderColor.tsx +0 -1
- package/src/stylesAndAnimations/borders/BorderRadius.stories.tsx +2 -1
- package/src/stylesAndAnimations/borders/BorderRadius.tsx +0 -1
- package/src/stylesAndAnimations/borders/BorderStyles.stories.tsx +2 -1
- package/src/stylesAndAnimations/borders/BorderStyles.tsx +0 -1
- package/src/stylesAndAnimations/borders/BorderThickness.stories.tsx +2 -1
- package/src/stylesAndAnimations/borders/BorderThickness.tsx +0 -1
- package/src/stylesAndAnimations/colors/UtilityClasses.stories.tsx +2 -1
- package/src/stylesAndAnimations/colors/UtilityClasses.tsx +1 -2
- package/src/stylesAndAnimations/sizing/Sizing.stories.tsx +2 -1
- package/src/stylesAndAnimations/sizing/Sizing.tsx +0 -1
- package/src/stylesAndAnimations/typography/Typography.stories.tsx +2 -1
- package/src/stylesAndAnimations/typography/Typography.tsx +0 -1
- package/src/stylesAndAnimations/utilityClasses/UtilityClassesTable.stories.tsx +2 -1
- package/src/stylesAndAnimations/utilityClasses/UtilityClassesTable.tsx +6 -3
- package/src/types.ts +12 -6
package/lib/index.js
CHANGED
|
@@ -200,7 +200,7 @@ function indiconToIconDef([name, customIcon]) {
|
|
|
200
200
|
if (pathElements.length === 1 && !pathElements[0].props.d)
|
|
201
201
|
throw new Error(`Monotone indicon '${name}' must have a 'd' attribute.`);
|
|
202
202
|
if (pathElements.length === 2) {
|
|
203
|
-
|
|
203
|
+
const [primary, secondary] = pathElements;
|
|
204
204
|
if (!primary.props.d || !secondary.props.d)
|
|
205
205
|
throw new Error(`Duotone indicon '${name}' must have 'd' attributes on both paths.`);
|
|
206
206
|
const op1 = parseFloat(primary.props.opacity);
|
|
@@ -5067,7 +5067,9 @@ const Icon = (_a) => {
|
|
|
5067
5067
|
};
|
|
5068
5068
|
|
|
5069
5069
|
const Button$1 = React.forwardRef((props, ref) => {
|
|
5070
|
-
const { ariaLabel, children, isLoading, isDisabled, variant = 'solid', isPill, iconLeft, iconRight, onClick, type = 'button', size = 'md', onMouseExit, className,
|
|
5070
|
+
const { ariaLabel, children, isLoading, isDisabled, variant = 'solid', isPill, iconLeft, iconRight, onClick, type = 'button', size = 'md', onMouseExit, className,
|
|
5071
|
+
// Destructure unused prop to prevent leaking to DOM
|
|
5072
|
+
href: _href } = props, rest = __rest(props, ["ariaLabel", "children", "isLoading", "isDisabled", "variant", "isPill", "iconLeft", "iconRight", "onClick", "type", "size", "onMouseExit", "className", "href"]);
|
|
5071
5073
|
const buttonClasses = classNames('btn', {
|
|
5072
5074
|
[`btn--${variant}`]: variant,
|
|
5073
5075
|
[`btn--${size}`]: size,
|
|
@@ -5099,7 +5101,7 @@ const Button$1 = React.forwardRef((props, ref) => {
|
|
|
5099
5101
|
onClick(event);
|
|
5100
5102
|
}
|
|
5101
5103
|
};
|
|
5102
|
-
return (jsxRuntime.jsxs("button", Object.assign({ ref: ref, disabled: isLoading || isDisabled, className: buttonClasses, role: "button", onClick: handleOnClick, "aria-label": ariaLabel || 'button', "aria-disabled": isLoading || isDisabled, "aria-busy": isLoading, type: type, onMouseLeave: onMouseExit }, rest, { children: [isLoading && !iconRight && (jsxRuntime.jsx(Icon, { name: "indico-o", style: { animation: 'spin 1s linear infinite' },
|
|
5104
|
+
return (jsxRuntime.jsxs("button", Object.assign({ ref: ref, disabled: isLoading || isDisabled, className: buttonClasses, role: "button", onClick: handleOnClick, "aria-label": ariaLabel || 'button', "aria-disabled": isLoading || isDisabled, "aria-busy": isLoading, type: type, onMouseLeave: onMouseExit }, rest, { children: [isLoading && !iconRight && (jsxRuntime.jsx(Icon, { name: "indico-o", style: { animation: 'spin 1s linear infinite' }, size: iconSize })), iconLeft && !isLoading && jsxRuntime.jsx(Icon, { name: iconLeft, ariaLabel: iconLeft, size: iconSize }), children, iconRight && !isLoading && jsxRuntime.jsx(Icon, { name: iconRight, ariaLabel: iconRight, size: iconSize }), isLoading && iconRight && (jsxRuntime.jsx(Icon, { name: "indico-o", style: { animation: 'spin 1s linear infinite' }, size: iconSize }))] })));
|
|
5103
5105
|
});
|
|
5104
5106
|
|
|
5105
5107
|
var l;function r$1(e,t){return e[t]}function i(e=[],t,n=0){return [...e.slice(0,n),t,...e.slice(n)]}function s(e=[],t,n="id"){const o=e.slice(),a=r$1(t,n);return a?o.splice(o.findIndex((e=>r$1(e,n)===a)),1):o.splice(o.findIndex((e=>e===t)),1),o}function d(e){return e.map(((e,t)=>{const n=Object.assign(Object.assign({},e),{sortable:e.sortable||!!e.sortFunction||void 0});return e.id||(n.id=t+1),n}))}function c(e,t){return Math.ceil(e/t)}function g(e,t){return Math.min(e,t)}!function(e){e.ASC="asc",e.DESC="desc";}(l||(l={}));const u=()=>null;function p(e,t=[],n=[]){let o={},a=[...n];return t.length&&t.forEach((t=>{if(!t.when||"function"!=typeof t.when)throw new Error('"when" must be defined in the conditional style object and must be function');t.when(e)&&(o=t.style||{},t.classNames&&(a=[...a,...t.classNames]),"function"==typeof t.style&&(o=t.style(e)||{}));})),{conditionalStyle:o,classNames:a.join(" ")}}function b$1(e,t=[],n="id"){const o=r$1(e,n);return o?t.some((e=>r$1(e,n)===o)):t.some((t=>t===e))}function m(e,t){return t?e.findIndex((e=>h$1(e.id,t))):-1}function h$1(e,t){return e==t}function w$1(e,t){const n=!e.toggleOnSelectedRowsChange;switch(t.type){case"SELECT_ALL_ROWS":{const{keyField:n,rows:o,rowCount:a,mergeSelections:l}=t,r=!e.allSelected,i=!e.toggleOnSelectedRowsChange;if(l){const t=r?[...e.selectedRows,...o.filter((t=>!b$1(t,e.selectedRows,n)))]:e.selectedRows.filter((e=>!b$1(e,o,n)));return Object.assign(Object.assign({},e),{allSelected:r,selectedCount:t.length,selectedRows:t,toggleOnSelectedRowsChange:i})}return Object.assign(Object.assign({},e),{allSelected:r,selectedCount:r?a:0,selectedRows:r?o:[],toggleOnSelectedRowsChange:i})}case"SELECT_SINGLE_ROW":{const{keyField:o,row:a,isSelected:l,rowCount:r,singleSelect:d}=t;return d?l?Object.assign(Object.assign({},e),{selectedCount:0,allSelected:!1,selectedRows:[],toggleOnSelectedRowsChange:n}):Object.assign(Object.assign({},e),{selectedCount:1,allSelected:!1,selectedRows:[a],toggleOnSelectedRowsChange:n}):l?Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length>0?e.selectedRows.length-1:0,allSelected:!1,selectedRows:s(e.selectedRows,a,o),toggleOnSelectedRowsChange:n}):Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length+1,allSelected:e.selectedRows.length+1===r,selectedRows:i(e.selectedRows,a),toggleOnSelectedRowsChange:n})}case"SELECT_MULTIPLE_ROWS":{const{keyField:o,selectedRows:a,totalRows:l,mergeSelections:r}=t;if(r){const t=[...e.selectedRows,...a.filter((t=>!b$1(t,e.selectedRows,o)))];return Object.assign(Object.assign({},e),{selectedCount:t.length,allSelected:!1,selectedRows:t,toggleOnSelectedRowsChange:n})}return Object.assign(Object.assign({},e),{selectedCount:a.length,allSelected:a.length===l,selectedRows:a,toggleOnSelectedRowsChange:n})}case"CLEAR_SELECTED_ROWS":{const{selectedRowsFlag:n}=t;return Object.assign(Object.assign({},e),{allSelected:!1,selectedCount:0,selectedRows:[],selectedRowsFlag:n})}case"SORT_CHANGE":{const{sortDirection:o,selectedColumn:a,clearSelectedOnSort:l}=t;return Object.assign(Object.assign(Object.assign({},e),{selectedColumn:a,sortDirection:o,currentPage:1}),l&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:n})}case"CHANGE_PAGE":{const{page:o,paginationServer:a,visibleOnly:l,persistSelectedOnPageChange:r}=t,i=a&&r,s=a&&!r||l;return Object.assign(Object.assign(Object.assign(Object.assign({},e),{currentPage:o}),i&&{allSelected:!1}),s&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:n})}case"CHANGE_ROWS_PER_PAGE":{const{rowsPerPage:n,page:o}=t;return Object.assign(Object.assign({},e),{currentPage:o,rowsPerPage:n})}}}const f=n.css`
|
|
@@ -5486,32 +5488,32 @@ var l;function r$1(e,t){return e[t]}function i(e=[],t,n=0){return [...e.slice(0,
|
|
|
5486
5488
|
margin: 0 4px;
|
|
5487
5489
|
`;var Me=React__namespace.memo((function({rowsPerPage:t,rowCount:n,currentPage:o,direction:a=ke.direction,paginationRowsPerPageOptions:l=ke.paginationRowsPerPageOptions,paginationIconLastPage:r=ke.paginationIconLastPage,paginationIconFirstPage:i=ke.paginationIconFirstPage,paginationIconNext:s=ke.paginationIconNext,paginationIconPrevious:d=ke.paginationIconPrevious,paginationComponentOptions:g=ke.paginationComponentOptions,onChangeRowsPerPage:u=ke.onChangeRowsPerPage,onChangePage:p=ke.onChangePage}){const b=(()=>{const t="object"==typeof window;function n(){return {width:t?window.innerWidth:void 0,height:t?window.innerHeight:void 0}}const[o,a]=React__namespace.useState(n);return React__namespace.useEffect((()=>{if(!t)return ()=>null;function e(){a(n());}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),o})(),m=le(a),h=b.width&&b.width>599,w=c(n,t),f=o*t,x=f-t+1,C=1===o,y=o===w,R=Object.assign(Object.assign({},Pe),g),v=o===w?`${x}-${n} ${R.rangeSeparatorText} ${n}`:`${x}-${f} ${R.rangeSeparatorText} ${n}`,S=React__namespace.useCallback((()=>p(o-1)),[o,p]),E=React__namespace.useCallback((()=>p(o+1)),[o,p]),O=React__namespace.useCallback((()=>p(1)),[p]),$=React__namespace.useCallback((()=>p(c(n,t))),[p,n,t]),k=React__namespace.useCallback((e=>u(Number(e.target.value),o)),[o,u]),P=l.map((t=>React__namespace.createElement("option",{key:t,value:t},t)));R.selectAllRowsItem&&P.push(React__namespace.createElement("option",{key:-1,value:n},R.selectAllRowsItemText));const D=React__namespace.createElement($e,{onChange:k,defaultValue:t,"aria-label":R.rowsPerPageText},P);return React__namespace.createElement(De,{className:"rdt_Pagination"},!R.noRowsPerPage&&h&&React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Te,null,R.rowsPerPageText),D),h&&React__namespace.createElement(Ie,null,v),React__namespace.createElement(Fe,null,React__namespace.createElement(He,{id:"pagination-first-page",type:"button","aria-label":"First Page","aria-disabled":C,onClick:O,disabled:C,$isRTL:m},i),React__namespace.createElement(He,{id:"pagination-previous-page",type:"button","aria-label":"Previous Page","aria-disabled":C,onClick:S,disabled:C,$isRTL:m},d),!R.noRowsPerPage&&!h&&D,React__namespace.createElement(He,{id:"pagination-next-page",type:"button","aria-label":"Next Page","aria-disabled":y,onClick:E,disabled:y,$isRTL:m},s),React__namespace.createElement(He,{id:"pagination-last-page",type:"button","aria-label":"Last Page","aria-disabled":y,onClick:$,disabled:y,$isRTL:m},r)))}));const Le=(t,n)=>{const o=React__namespace.useRef(!0);React__namespace.useEffect((()=>{o.current?o.current=!1:t();}),n);};function Ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _e=function(e){return function(e){return !!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return "[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Ne}(e)}(e)};var Ne="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function ze(e,t){return !1!==t.clone&&t.isMergeableObject(e)?Ue((n=e,Array.isArray(n)?[]:{}),e,t):e;var n;}function We(e,t,n){return e.concat(t).map((function(e){return ze(e,n)}))}function Be(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function Ge(e,t){try{return t in e}catch(e){return !1}}function Ve(e,t,n){var o={};return n.isMergeableObject(e)&&Be(e).forEach((function(t){o[t]=ze(e[t],n);})),Be(t).forEach((function(a){(function(e,t){return Ge(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(Ge(e,a)&&n.isMergeableObject(t[a])?o[a]=function(e,t){if(!t.customMerge)return Ue;var n=t.customMerge(e);return "function"==typeof n?n:Ue}(a,n)(e[a],t[a],n):o[a]=ze(t[a],n));})),o}function Ue(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||We,n.isMergeableObject=n.isMergeableObject||_e,n.cloneUnlessOtherwiseSpecified=ze;var o=Array.isArray(t);return o===Array.isArray(e)?o?n.arrayMerge(e,t,n):Ve(e,t,n):ze(t,n)}Ue.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return Ue(e,n,t)}),{})};var Ye=Ae(Ue);const Ke={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)"},background:{default:"#FFFFFF"},context:{background:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},divider:{default:"rgba(0,0,0,.12)"},button:{default:"rgba(0,0,0,.54)",focus:"rgba(0,0,0,.12)",hover:"rgba(0,0,0,.12)",disabled:"rgba(0, 0, 0, .18)"},selected:{default:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},highlightOnHover:{default:"#EEEEEE",text:"rgba(0, 0, 0, 0.87)"},striped:{default:"#FAFAFA",text:"rgba(0, 0, 0, 0.87)"}},qe={default:Ke,light:Ke,dark:{text:{primary:"#FFFFFF",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(0,0,0,.12)"},background:{default:"#424242"},context:{background:"#E91E63",text:"#FFFFFF"},divider:{default:"rgba(81, 81, 81, 1)"},button:{default:"#FFFFFF",focus:"rgba(255, 255, 255, .54)",hover:"rgba(255, 255, 255, .12)",disabled:"rgba(255, 255, 255, .18)"},selected:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},highlightOnHover:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},striped:{default:"rgba(0, 0, 0, .87)",text:"#FFFFFF"}}};function Qe(t,n,o,a){const[r,i]=React__namespace.useState((()=>d(t))),[s,c]=React__namespace.useState(""),g=React__namespace.useRef("");Le((()=>{i(d(t));}),[t]);const u=React__namespace.useCallback((e=>{var t,n,o;const{attributes:a}=e.target,l=null===(t=a.getNamedItem("data-column-id"))||void 0===t?void 0:t.value;l&&(g.current=(null===(o=null===(n=r[m(r,l)])||void 0===n?void 0:n.id)||void 0===o?void 0:o.toString())||"",c(g.current));}),[r]),p=React__namespace.useCallback((e=>{var t;const{attributes:o}=e.target,a=null===(t=o.getNamedItem("data-column-id"))||void 0===t?void 0:t.value;if(a&&g.current&&a!==g.current){const e=m(r,g.current),t=m(r,a),o=[...r];o[e]=r[t],o[t]=r[e],i(o),n(o);}}),[n,r]),b=React__namespace.useCallback((e=>{e.preventDefault();}),[]),h=React__namespace.useCallback((e=>{e.preventDefault();}),[]),w=React__namespace.useCallback((e=>{e.preventDefault(),g.current="",c("");}),[]),f=function(e=!1){return e?l.ASC:l.DESC}(a),x=React__namespace.useMemo((()=>r[m(r,null==o?void 0:o.toString())]||{}),[o,r]);return {tableColumns:r,draggingColumnId:s,handleDragStart:u,handleDragEnter:p,handleDragOver:b,handleDragLeave:h,handleDragEnd:w,defaultSortDirection:f,defaultSortColumn:x}}var Xe=React__namespace.memo((function(t){const{data:n$1=ke.data,columns:o=ke.columns,title:i=ke.title,actions:s=ke.actions,keyField:d=ke.keyField,striped:u=ke.striped,highlightOnHover:p=ke.highlightOnHover,pointerOnHover:m=ke.pointerOnHover,dense:h=ke.dense,selectableRows:f=ke.selectableRows,selectableRowsSingle:C=ke.selectableRowsSingle,selectableRowsHighlight:v=ke.selectableRowsHighlight,selectableRowsNoSelectAll:S=ke.selectableRowsNoSelectAll,selectableRowsVisibleOnly:E=ke.selectableRowsVisibleOnly,selectableRowSelected:O=ke.selectableRowSelected,selectableRowDisabled:k=ke.selectableRowDisabled,selectableRowsComponent:P=ke.selectableRowsComponent,selectableRowsComponentProps:D=ke.selectableRowsComponentProps,onRowExpandToggled:H=ke.onRowExpandToggled,onSelectedRowsChange:F=ke.onSelectedRowsChange,expandableIcon:j=ke.expandableIcon,onChangeRowsPerPage:I=ke.onChangeRowsPerPage,onChangePage:T=ke.onChangePage,paginationServer:M=ke.paginationServer,paginationServerOptions:L=ke.paginationServerOptions,paginationTotalRows:A=ke.paginationTotalRows,paginationDefaultPage:_=ke.paginationDefaultPage,paginationResetDefaultPage:N=ke.paginationResetDefaultPage,paginationPerPage:z=ke.paginationPerPage,paginationRowsPerPageOptions:W=ke.paginationRowsPerPageOptions,paginationIconLastPage:B=ke.paginationIconLastPage,paginationIconFirstPage:G=ke.paginationIconFirstPage,paginationIconNext:V=ke.paginationIconNext,paginationIconPrevious:U=ke.paginationIconPrevious,paginationComponent:Y=ke.paginationComponent,paginationComponentOptions:K=ke.paginationComponentOptions,responsive:J=ke.responsive,progressPending:Q=ke.progressPending,progressComponent:X=ke.progressComponent,persistTableHead:Z=ke.persistTableHead,noDataComponent:ee=ke.noDataComponent,disabled:te=ke.disabled,noTableHead:oe=ke.noTableHead,noHeader:le=ke.noHeader,fixedHeader:re=ke.fixedHeader,fixedHeaderScrollHeight:ie=ke.fixedHeaderScrollHeight,pagination:se=ke.pagination,subHeader:de=ke.subHeader,subHeaderAlign:ce=ke.subHeaderAlign,subHeaderWrap:ge=ke.subHeaderWrap,subHeaderComponent:ue=ke.subHeaderComponent,noContextMenu:be=ke.noContextMenu,contextMessage:me=ke.contextMessage,contextActions:he=ke.contextActions,contextComponent:Se=ke.contextComponent,expandableRows:Ee=ke.expandableRows,onRowClicked:Oe=ke.onRowClicked,onRowDoubleClicked:$e=ke.onRowDoubleClicked,onRowMouseEnter:Pe=ke.onRowMouseEnter,onRowMouseLeave:De=ke.onRowMouseLeave,sortIcon:He=ke.sortIcon,onSort:Fe=ke.onSort,sortFunction:je=ke.sortFunction,sortServer:Ie=ke.sortServer,expandableRowsComponent:Te=ke.expandableRowsComponent,expandableRowsComponentProps:Ae=ke.expandableRowsComponentProps,expandableRowDisabled:_e=ke.expandableRowDisabled,expandableRowsHideExpander:Ne=ke.expandableRowsHideExpander,expandOnRowClicked:ze=ke.expandOnRowClicked,expandOnRowDoubleClicked:We=ke.expandOnRowDoubleClicked,expandableRowExpanded:Be=ke.expandableRowExpanded,expandableInheritConditionalStyles:Ge=ke.expandableInheritConditionalStyles,defaultSortFieldId:Ve=ke.defaultSortFieldId,defaultSortAsc:Ue=ke.defaultSortAsc,clearSelectedRows:Ke=ke.clearSelectedRows,conditionalRowStyles:Je=ke.conditionalRowStyles,theme:Xe=ke.theme,customStyles:Ze=ke.customStyles,direction:et=ke.direction,onColumnOrderChange:tt=ke.onColumnOrderChange,className:nt}=t,{tableColumns:ot,draggingColumnId:at,handleDragStart:lt,handleDragEnter:rt,handleDragOver:it,handleDragLeave:st,handleDragEnd:dt,defaultSortDirection:ct,defaultSortColumn:gt}=Qe(o,tt,Ve,Ue),[{rowsPerPage:ut,currentPage:pt,selectedRows:bt,allSelected:mt,selectedCount:ht,selectedColumn:wt,sortDirection:ft,toggleOnSelectedRowsChange:xt},Ct]=React__namespace.useReducer(w$1,{allSelected:!1,selectedCount:0,selectedRows:[],selectedColumn:gt,toggleOnSelectedRowsChange:!1,sortDirection:ct,currentPage:_,rowsPerPage:z,selectedRowsFlag:!1,contextMessage:ke.contextMessage}),{persistSelectedOnSort:yt=!1,persistSelectedOnPageChange:Rt=!1}=L,vt=!(!M||!Rt&&!yt),St=se&&!Q&&n$1.length>0,Et=Y||Me,Ot=React__namespace.useMemo((()=>((e={},t="default",n="default")=>{const o=qe[t]?t:n;return Ye({table:{style:{color:(a=qe[o]).text.primary,backgroundColor:a.background.default}},tableWrapper:{style:{display:"table"}},responsiveWrapper:{style:{}},header:{style:{fontSize:"22px",color:a.text.primary,backgroundColor:a.background.default,minHeight:"56px",paddingLeft:"16px",paddingRight:"8px"}},subHeader:{style:{backgroundColor:a.background.default,minHeight:"52px"}},head:{style:{color:a.text.primary,fontSize:"12px",fontWeight:500}},headRow:{style:{backgroundColor:a.background.default,minHeight:"52px",borderBottomWidth:"1px",borderBottomColor:a.divider.default,borderBottomStyle:"solid"},denseStyle:{minHeight:"32px"}},headCells:{style:{paddingLeft:"16px",paddingRight:"16px"},draggingStyle:{cursor:"move"}},contextMenu:{style:{backgroundColor:a.context.background,fontSize:"18px",fontWeight:400,color:a.context.text,paddingLeft:"16px",paddingRight:"8px",transform:"translate3d(0, -100%, 0)",transitionDuration:"125ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",willChange:"transform"},activeStyle:{transform:"translate3d(0, 0, 0)"}},cells:{style:{paddingLeft:"16px",paddingRight:"16px",wordBreak:"break-word"},draggingStyle:{}},rows:{style:{fontSize:"13px",fontWeight:400,color:a.text.primary,backgroundColor:a.background.default,minHeight:"48px","&:not(:last-of-type)":{borderBottomStyle:"solid",borderBottomWidth:"1px",borderBottomColor:a.divider.default}},denseStyle:{minHeight:"32px"},selectedHighlightStyle:{"&:nth-of-type(n)":{color:a.selected.text,backgroundColor:a.selected.default,borderBottomColor:a.background.default}},highlightOnHoverStyle:{color:a.highlightOnHover.text,backgroundColor:a.highlightOnHover.default,transitionDuration:"0.15s",transitionProperty:"background-color",borderBottomColor:a.background.default,outlineStyle:"solid",outlineWidth:"1px",outlineColor:a.background.default},stripedStyle:{color:a.striped.text,backgroundColor:a.striped.default}},expanderRow:{style:{color:a.text.primary,backgroundColor:a.background.default}},expanderCell:{style:{flex:"0 0 48px"}},expanderButton:{style:{color:a.button.default,fill:a.button.default,backgroundColor:"transparent",borderRadius:"2px",transition:"0.25s",height:"100%",width:"100%","&:hover:enabled":{cursor:"pointer"},"&:disabled":{color:a.button.disabled},"&:hover:not(:disabled)":{cursor:"pointer",backgroundColor:a.button.hover},"&:focus":{outline:"none",backgroundColor:a.button.focus},svg:{margin:"auto"}}},pagination:{style:{color:a.text.secondary,fontSize:"13px",minHeight:"56px",backgroundColor:a.background.default,borderTopStyle:"solid",borderTopWidth:"1px",borderTopColor:a.divider.default},pageButtonsStyle:{borderRadius:"50%",height:"40px",width:"40px",padding:"8px",margin:"px",cursor:"pointer",transition:"0.4s",color:a.button.default,fill:a.button.default,backgroundColor:"transparent","&:disabled":{cursor:"unset",color:a.button.disabled,fill:a.button.disabled},"&:hover:not(:disabled)":{backgroundColor:a.button.hover},"&:focus":{outline:"none",backgroundColor:a.button.focus}}},noData:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:a.text.primary,backgroundColor:a.background.default}},progress:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:a.text.primary,backgroundColor:a.background.default}}},e);var a;})(Ze,Xe)),[Ze,Xe]),$t=React__namespace.useMemo((()=>Object.assign({},"auto"!==et&&{dir:et})),[et]),kt=React__namespace.useMemo((()=>{if(Ie)return n$1;if((null==wt?void 0:wt.sortFunction)&&"function"==typeof wt.sortFunction){const e=wt.sortFunction,t=ft===l.ASC?e:(t,n)=>-1*e(t,n);return [...n$1].sort(t)}return function(e,t,n,o){return t?o&&"function"==typeof o?o(e.slice(0),t,n):e.slice(0).sort(((e,o)=>{const a=t(e),l=t(o);if("asc"===n){if(a<l)return -1;if(a>l)return 1}if("desc"===n){if(a>l)return -1;if(a<l)return 1}return 0})):e}(n$1,null==wt?void 0:wt.selector,ft,je)}),[Ie,wt,ft,n$1,je]),Pt=React__namespace.useMemo((()=>{if(se&&!M){const e=pt*ut,t=e-ut;return kt.slice(t,e)}return kt}),[pt,se,M,ut,kt]),Dt=React__namespace.useCallback((e=>{Ct(e);}),[]),Ht=React__namespace.useCallback((e=>{Ct(e);}),[]),Ft=React__namespace.useCallback((e=>{Ct(e);}),[]),jt=React__namespace.useCallback(((e,t)=>Oe(e,t)),[Oe]),It=React__namespace.useCallback(((e,t)=>$e(e,t)),[$e]),Tt=React__namespace.useCallback(((e,t)=>Pe(e,t)),[Pe]),Mt=React__namespace.useCallback(((e,t)=>De(e,t)),[De]),Lt=React__namespace.useCallback((e=>Ct({type:"CHANGE_PAGE",page:e,paginationServer:M,visibleOnly:E,persistSelectedOnPageChange:Rt})),[M,Rt,E]),At=React__namespace.useCallback((e=>{const t=c(A||Pt.length,e),n=g(pt,t);M||Lt(n),Ct({type:"CHANGE_ROWS_PER_PAGE",page:n,rowsPerPage:e});}),[pt,Lt,M,A,Pt.length]);if(se&&!M&&kt.length>0&&0===Pt.length){const e=c(kt.length,ut),t=g(pt,e);Lt(t);}Le((()=>{F({allSelected:mt,selectedCount:ht,selectedRows:bt.slice(0)});}),[xt]),Le((()=>{Fe(wt,ft,kt.slice(0));}),[wt,ft]),Le((()=>{T(pt,A||kt.length);}),[pt]),Le((()=>{I(ut,pt);}),[ut]),Le((()=>{Lt(_);}),[_,N]),Le((()=>{if(se&&M&&A>0){const e=c(A,ut),t=g(pt,e);pt!==t&&Lt(t);}}),[A]),React__namespace.useEffect((()=>{Ct({type:"CLEAR_SELECTED_ROWS",selectedRowsFlag:Ke});}),[C,Ke]),React__namespace.useEffect((()=>{if(!O)return;const e=kt.filter((e=>O(e))),t=C?e.slice(0,1):e;Ct({type:"SELECT_MULTIPLE_ROWS",keyField:d,selectedRows:t,totalRows:kt.length,mergeSelections:vt});}),[n$1,O]);const _t=E?Pt:kt,Nt=Rt||C||S;return React__namespace.createElement(n.ThemeProvider,{theme:Ot},!le&&(!!i||!!s)&&React__namespace.createElement(pe,{title:i,actions:s,showMenu:!be,selectedCount:ht,direction:et,contextActions:he,contextComponent:Se,contextMessage:me}),de&&React__namespace.createElement(we,{align:ce,wrapContent:ge},ue),React__namespace.createElement(xe,Object.assign({$responsive:J,$fixedHeader:re,$fixedHeaderScrollHeight:ie,className:nt},$t),React__namespace.createElement(ye,null,Q&&!Z&&React__namespace.createElement(Ce,null,X),React__namespace.createElement(x$1,{disabled:te,className:"rdt_Table",role:"table"},!oe&&(!!Z||kt.length>0&&!Q)&&React__namespace.createElement(y$1,{className:"rdt_TableHead",role:"rowgroup",$fixedHeader:re},React__namespace.createElement(R$1,{className:"rdt_TableHeadRow",role:"row",$dense:h},f&&(Nt?React__namespace.createElement($$2,{style:{flex:"0 0 48px"}}):React__namespace.createElement(ae,{allSelected:mt,selectedRows:bt,selectableRowsComponent:P,selectableRowsComponentProps:D,selectableRowDisabled:k,rowData:_t,keyField:d,mergeSelections:vt,onSelectAllRows:Ht})),Ee&&!Ne&&React__namespace.createElement(Re,null),ot.map((t=>React__namespace.createElement(ne,{key:t.id,column:t,selectedColumn:wt,disabled:Q||0===kt.length,pagination:se,paginationServer:M,persistSelectedOnSort:yt,selectableRowsVisibleOnly:E,sortDirection:ft,sortIcon:He,sortServer:Ie,onSort:Dt,onDragStart:lt,onDragOver:it,onDragEnd:dt,onDragEnter:rt,onDragLeave:st,draggingColumnId:at}))))),!kt.length&&!Q&&React__namespace.createElement(ve,null,ee),Q&&Z&&React__namespace.createElement(Ce,null,X),!Q&&kt.length>0&&React__namespace.createElement(fe,{className:"rdt_TableBody",role:"rowgroup"},Pt.map(((t,n)=>{const o=r$1(t,d),a=function(e=""){return "number"!=typeof e&&(!e||0===e.length)}(o)?n:o,l=b$1(t,bt,d),i=!!(Ee&&Be&&Be(t)),s=!!(Ee&&_e&&_e(t));return React__namespace.createElement(q$1,{id:a,key:a,keyField:d,"data-row-id":a,columns:ot,row:t,rowCount:kt.length,rowIndex:n,selectableRows:f,expandableRows:Ee,expandableIcon:j,highlightOnHover:p,pointerOnHover:m,dense:h,expandOnRowClicked:ze,expandOnRowDoubleClicked:We,expandableRowsComponent:Te,expandableRowsComponentProps:Ae,expandableRowsHideExpander:Ne,defaultExpanderDisabled:s,defaultExpanded:i,expandableInheritConditionalStyles:Ge,conditionalRowStyles:Je,selected:l,selectableRowsHighlight:v,selectableRowsComponent:P,selectableRowsComponentProps:D,selectableRowDisabled:k,selectableRowsSingle:C,striped:u,onRowExpandToggled:H,onRowClicked:jt,onRowDoubleClicked:It,onRowMouseEnter:Tt,onRowMouseLeave:Mt,onSelectedRow:Ft,draggingColumnId:at,onDragStart:lt,onDragOver:it,onDragEnd:dt,onDragEnter:rt,onDragLeave:st})})))))),St&&React__namespace.createElement("div",null,React__namespace.createElement(Et,{onChangePage:Lt,onChangeRowsPerPage:At,rowCount:A||kt.length,currentPage:pt,rowsPerPage:ut,direction:et,paginationRowsPerPageOptions:W,paginationIconLastPage:B,paginationIconFirstPage:G,paginationIconNext:V,paginationIconPrevious:U,paginationComponentOptions:K})))}));
|
|
5488
5490
|
|
|
5489
|
-
const
|
|
5490
|
-
|
|
5491
|
+
const DisplayFormError = (_a) => {
|
|
5492
|
+
var { message } = _a, rest = __rest(_a, ["message"]);
|
|
5493
|
+
return (jsxRuntime.jsx("p", Object.assign({ className: "form-errors" }, rest, { children: message })));
|
|
5491
5494
|
};
|
|
5492
5495
|
|
|
5496
|
+
const DEFAULT_TEXT$c = {
|
|
5497
|
+
required: '(required)',
|
|
5498
|
+
};
|
|
5493
5499
|
const Label = ({ label, name, isRequired }) => {
|
|
5494
5500
|
return (jsxRuntime.jsx("div", { "data-testid": `${name}-testId`, className: `form-label`, children: jsxRuntime.jsxs("label", { htmlFor: `${name}`, children: [label, isRequired ? jsxRuntime.jsx("span", { className: "text-error", children: " *" }) : ''] }) }));
|
|
5495
5501
|
};
|
|
5496
5502
|
// HOC to add common label functionality to components
|
|
5497
5503
|
function withLabel(WrappedComponent) {
|
|
5498
5504
|
const WithLabelComponent = (_a, ref) => {
|
|
5499
|
-
var { label, hasHiddenLabel = false, name, isRequired } = _a, rest = __rest(_a, ["label", "hasHiddenLabel", "name", "isRequired"]);
|
|
5505
|
+
var { label, hasHiddenLabel = false, name, isRequired, text: textProp } = _a, rest = __rest(_a, ["label", "hasHiddenLabel", "name", "isRequired", "text"]);
|
|
5506
|
+
const text = Object.assign(Object.assign({}, DEFAULT_TEXT$c), textProp);
|
|
5500
5507
|
const ariaLabel = hasHiddenLabel
|
|
5501
|
-
? { 'aria-label': isRequired ? `${label}
|
|
5508
|
+
? { 'aria-label': isRequired ? `${label} ${text.required}` : label }
|
|
5502
5509
|
: {};
|
|
5503
|
-
return (jsxRuntime.jsxs("div", { className: "form-control", children: [!hasHiddenLabel && jsxRuntime.jsx(Label, { label: label, name: name, isRequired: isRequired }), jsxRuntime.jsx(WrappedComponent, Object.assign({}, rest, { id: name, name: name }, ariaLabel, { ref: ref }))] }));
|
|
5510
|
+
return (jsxRuntime.jsxs("div", { className: "form-control", children: [!hasHiddenLabel && jsxRuntime.jsx(Label, { label: label, name: name, isRequired: isRequired }), jsxRuntime.jsx(WrappedComponent, Object.assign({}, rest, { id: name, name: name }, ariaLabel, { text: textProp, ref: ref }))] }));
|
|
5504
5511
|
};
|
|
5505
5512
|
return React.forwardRef(WithLabelComponent);
|
|
5506
5513
|
}
|
|
5507
5514
|
|
|
5508
|
-
const DisplayFormError = (_a) => {
|
|
5509
|
-
var { message } = _a, rest = __rest(_a, ["message"]);
|
|
5510
|
-
return (jsxRuntime.jsx("p", Object.assign({ className: "form-errors" }, rest, { children: message })));
|
|
5511
|
-
};
|
|
5512
|
-
|
|
5513
5515
|
const Input = React__namespace.default.forwardRef((_a, ref) => {
|
|
5514
|
-
var { id, name, placeholder, isRequired, isDisabled, readonly, isClearable, errorMessage, helpText, maxLength, iconName, tabIndex, onChange, onBlur, onKeyDown, className } = _a, rest = __rest(_a, ["id", "name", "placeholder", "isRequired", "isDisabled", "readonly", "isClearable", "errorMessage", "helpText", "maxLength", "iconName", "tabIndex", "onChange", "onBlur", "onKeyDown", "className"]);
|
|
5516
|
+
var { id, name, placeholder, isRequired, isDisabled, readonly, isClearable, errorMessage, helpText, maxLength, iconName, tabIndex, onChange, onBlur, onKeyDown, className, text: _text } = _a, rest = __rest(_a, ["id", "name", "placeholder", "isRequired", "isDisabled", "readonly", "isClearable", "errorMessage", "helpText", "maxLength", "iconName", "tabIndex", "onChange", "onBlur", "onKeyDown", "className", "text"]);
|
|
5515
5517
|
const hasErrors = errorMessage && errorMessage.length > 0;
|
|
5516
5518
|
const handleClear = () => {
|
|
5517
5519
|
onChange === null || onChange === void 0 ? void 0 : onChange({ target: { value: '' } });
|
|
@@ -5525,10 +5527,17 @@ const Input = React__namespace.default.forwardRef((_a, ref) => {
|
|
|
5525
5527
|
});
|
|
5526
5528
|
const LabeledInput = withLabel(Input);
|
|
5527
5529
|
|
|
5530
|
+
const DEFAULT_TEXT$b = {
|
|
5531
|
+
previousPage: 'Previous Page',
|
|
5532
|
+
nextPage: 'Next Page',
|
|
5533
|
+
currentPage: 'Current Page',
|
|
5534
|
+
of: 'of',
|
|
5535
|
+
};
|
|
5528
5536
|
const Pagination = (_a) => {
|
|
5529
|
-
var { totalPages, currentPage = 1, onChange, className } = _a, rest = __rest(_a, ["totalPages", "currentPage", "onChange", "className"]);
|
|
5537
|
+
var { totalPages, currentPage = 1, onChange, className, text: textProp } = _a, rest = __rest(_a, ["totalPages", "currentPage", "onChange", "className", "text"]);
|
|
5538
|
+
const text = Object.assign(Object.assign({}, DEFAULT_TEXT$b), textProp);
|
|
5530
5539
|
const [inputValue, setInputValue] = React.useState(currentPage.toString());
|
|
5531
|
-
const totalPagesText =
|
|
5540
|
+
const totalPagesText = `${text.of} ${totalPages}`;
|
|
5532
5541
|
const classes = classNames('pagination', className);
|
|
5533
5542
|
React.useEffect(() => {
|
|
5534
5543
|
setInputValue(currentPage.toString());
|
|
@@ -5560,9 +5569,9 @@ const Pagination = (_a) => {
|
|
|
5560
5569
|
const isNextButtonDisabled = currentPage === totalPages;
|
|
5561
5570
|
const isPreviousButtonDisabled = currentPage === 1;
|
|
5562
5571
|
const hasError = Number(inputValue) > totalPages || Number(inputValue) < 1;
|
|
5563
|
-
return (jsxRuntime.jsx("div", Object.assign({ className: classes }, rest, { children: jsxRuntime.jsx(Container, { children: jsxRuntime.jsxs(Row, { gutterWidth: 12, align: "center", children: [jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("div", { className: "pagination__previous", children: jsxRuntime.jsx(Button$1, { "data-testid": "pagination-previous-button", ariaLabel:
|
|
5572
|
+
return (jsxRuntime.jsx("div", Object.assign({ className: classes }, rest, { children: jsxRuntime.jsx(Container, { children: jsxRuntime.jsxs(Row, { gutterWidth: 12, align: "center", children: [jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("div", { className: "pagination__previous", children: jsxRuntime.jsx(Button$1, { "data-testid": "pagination-previous-button", ariaLabel: text.previousPage, variant: "link", onClick: handlePreviousPage, iconLeft: "chevron-left", size: "sm", isDisabled: isPreviousButtonDisabled || totalPages === 0 }) }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("div", { className: "pagination__current-page", children: jsxRuntime.jsx(LabeledInput, { "data-testid": "pagination-current-page-input", className: classNames('pagination__current-page-input', {
|
|
5564
5573
|
'has-error': hasError,
|
|
5565
|
-
}), value: totalPages === 0 ? '0' : inputValue, name: "currentPage", label:
|
|
5574
|
+
}), value: totalPages === 0 ? '0' : inputValue, name: "currentPage", label: text.currentPage, hasHiddenLabel: true, onKeyDown: (e) => {
|
|
5566
5575
|
if (e.key === 'Enter') {
|
|
5567
5576
|
validateAndUpdatePage(e.currentTarget.value);
|
|
5568
5577
|
}
|
|
@@ -5572,7 +5581,7 @@ const Pagination = (_a) => {
|
|
|
5572
5581
|
if (value === '' || /^\d*$/.test(value)) {
|
|
5573
5582
|
setInputValue(value);
|
|
5574
5583
|
}
|
|
5575
|
-
}, onBlur: (e) => validateAndUpdatePage(e.currentTarget.value) }) }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("p", { className: "pagination__page-total", children: totalPagesText }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("div", { className: "pagination__next", children: jsxRuntime.jsx(Button$1, { "data-testid": "pagination-next-button", ariaLabel:
|
|
5584
|
+
}, onBlur: (e) => validateAndUpdatePage(e.currentTarget.value) }) }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("p", { className: "pagination__page-total", children: totalPagesText }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("div", { className: "pagination__next", children: jsxRuntime.jsx(Button$1, { "data-testid": "pagination-next-button", ariaLabel: text.nextPage, variant: "link", onClick: handleNextPage, iconLeft: "chevron-right", isDisabled: isNextButtonDisabled || totalPages === 0, size: "sm" }) }) })] }) }) })));
|
|
5576
5585
|
};
|
|
5577
5586
|
|
|
5578
5587
|
const TablePagination$1 = ({ rowsPerPage, rowCount, onChangePage, currentPage, totalEntriesText, }) => {
|
|
@@ -5657,7 +5666,12 @@ const clearStickyStyles = (header) => {
|
|
|
5657
5666
|
header.style.backgroundColor = '';
|
|
5658
5667
|
};
|
|
5659
5668
|
|
|
5660
|
-
const
|
|
5669
|
+
const DEFAULT_TEXT$a = {
|
|
5670
|
+
unpinColumn: 'Unpin column',
|
|
5671
|
+
pinColumn: 'Pin column',
|
|
5672
|
+
};
|
|
5673
|
+
const HorizontalStickyHeader = ({ children, position, onPinColumn, isPinned = false, pinnedColumnIds, text: textProp, }) => {
|
|
5674
|
+
const text = Object.assign(Object.assign({}, DEFAULT_TEXT$a), textProp);
|
|
5661
5675
|
React.useEffect(() => {
|
|
5662
5676
|
const calculateWidth = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
5663
5677
|
yield new Promise((resolve) => setTimeout(resolve, 0));
|
|
@@ -5674,14 +5688,14 @@ const HorizontalStickyHeader = ({ children, position, onPinColumn, isPinned = fa
|
|
|
5674
5688
|
});
|
|
5675
5689
|
calculateWidth();
|
|
5676
5690
|
}, [position, isPinned, pinnedColumnIds]);
|
|
5677
|
-
return (jsxRuntime.jsxs("div", { className: "table__header-cell", "data-testid": `sticky-column-${position}`, children: [jsxRuntime.jsx(Button$1, { "data-testid": `sticky-header-pin-button-${position}`, variant: "link", size: "sm", iconLeft: "pin", onClick: () => onPinColumn === null || onPinColumn === void 0 ? void 0 : onPinColumn(`sticky-column-${position}`), ariaLabel: isPinned ?
|
|
5691
|
+
return (jsxRuntime.jsxs("div", { className: "table__header-cell", "data-testid": `sticky-column-${position}`, children: [jsxRuntime.jsx(Button$1, { "data-testid": `sticky-header-pin-button-${position}`, variant: "link", size: "sm", iconLeft: "pin", onClick: () => onPinColumn === null || onPinColumn === void 0 ? void 0 : onPinColumn(`sticky-column-${position}`), ariaLabel: isPinned ? text.unpinColumn : text.pinColumn, className: `table__column--${isPinned ? 'is-pinned' : 'is-not-pinned'} table__column__pin-action` }), jsxRuntime.jsx("div", { className: "table__header-content", children: children })] }));
|
|
5678
5692
|
};
|
|
5679
5693
|
|
|
5680
|
-
const processColumns = (columns, pinnedColumnIds, togglePinnedColumn) => {
|
|
5694
|
+
const processColumns = (columns, pinnedColumnIds, togglePinnedColumn, text) => {
|
|
5681
5695
|
return columns.map((column, index) => {
|
|
5682
5696
|
const dataColumnId = `sticky-column-${index}`;
|
|
5683
5697
|
const isPinned = pinnedColumnIds.includes(dataColumnId);
|
|
5684
|
-
const headerContent = column.isPinned !== undefined ? (jsxRuntime.jsx(HorizontalStickyHeader, { position: index, isPinned: isPinned, onPinColumn: () => togglePinnedColumn(column.id), pinnedColumnIds: pinnedColumnIds, children: column.name })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: column.name }));
|
|
5698
|
+
const headerContent = column.isPinned !== undefined ? (jsxRuntime.jsx(HorizontalStickyHeader, { position: index, isPinned: isPinned, onPinColumn: () => togglePinnedColumn(column.id), pinnedColumnIds: pinnedColumnIds, text: text, children: column.name })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: column.name }));
|
|
5685
5699
|
return Object.assign(Object.assign({}, column), { name: headerContent, id: dataColumnId, style: getPinnedColumnStyles(isPinned, index, pinnedColumnIds) });
|
|
5686
5700
|
});
|
|
5687
5701
|
};
|
|
@@ -5690,7 +5704,7 @@ const processColumns = (columns, pinnedColumnIds, togglePinnedColumn) => {
|
|
|
5690
5704
|
* Hook to manage pinned columns in a table
|
|
5691
5705
|
* Handles initialization, toggling, positioning and resizing of pinned columns
|
|
5692
5706
|
*/
|
|
5693
|
-
const usePinnedColumnsManager = (columns, canPinColumns, onPinnedColumnsChange) => {
|
|
5707
|
+
const usePinnedColumnsManager = (columns, canPinColumns, onPinnedColumnsChange, text) => {
|
|
5694
5708
|
const pinnedColumnIds = columns.filter((column) => column.isPinned).map((column) => column.id);
|
|
5695
5709
|
// `dataColumnIds` is the list of IDs used as `data-column-id` attributes on the table headers and cells
|
|
5696
5710
|
const dataColumnIds = React.useMemo(() => {
|
|
@@ -5797,17 +5811,27 @@ const usePinnedColumnsManager = (columns, canPinColumns, onPinnedColumnsChange)
|
|
|
5797
5811
|
}, [canPinColumns, dataColumnIds]);
|
|
5798
5812
|
// Process columns for rendering with pin state
|
|
5799
5813
|
const columnsWithPinning = canPinColumns
|
|
5800
|
-
? sortPinnedColumns(processColumns(columns, dataColumnIds, togglePinnedColumn), dataColumnIds)
|
|
5814
|
+
? sortPinnedColumns(processColumns(columns, dataColumnIds, togglePinnedColumn, text), dataColumnIds)
|
|
5801
5815
|
: columns;
|
|
5802
5816
|
return {
|
|
5803
5817
|
columnsWithPinning, // Columns with pin state and handlers applied
|
|
5804
5818
|
};
|
|
5805
5819
|
};
|
|
5806
5820
|
|
|
5821
|
+
const LoadingComponent = ({ loadingText }) => {
|
|
5822
|
+
return jsxRuntime.jsx("div", { className: "table-loading", children: loadingText });
|
|
5823
|
+
};
|
|
5824
|
+
|
|
5825
|
+
const DEFAULT_TEXT$9 = {
|
|
5826
|
+
loading: 'Loading...',
|
|
5827
|
+
unpinColumn: 'Unpin column',
|
|
5828
|
+
pinColumn: 'Pin column',
|
|
5829
|
+
};
|
|
5807
5830
|
const Table = (props) => {
|
|
5808
|
-
const { responsive = true, direction = 'auto', keyField = 'id', striped = false, noDataComponent = 'built-in', isDisabled, isLoading, isFullHeight = false, subHeaderAlign = 'left', className, paginationTotalRows, totalEntriesText, data, columns: initialColumns, canPinColumns = false, onPinnedColumnsChange } = props, rest = __rest(props, ["responsive", "direction", "keyField", "striped", "noDataComponent", "isDisabled", "isLoading", "isFullHeight", "subHeaderAlign", "className", "paginationTotalRows", "totalEntriesText", "data", "columns", "canPinColumns", "onPinnedColumnsChange"]);
|
|
5831
|
+
const { responsive = true, direction = 'auto', keyField = 'id', striped = false, noDataComponent = 'built-in', isDisabled, isLoading, isFullHeight = false, subHeaderAlign = 'left', className, paginationTotalRows, totalEntriesText, data, columns: initialColumns, canPinColumns = false, onPinnedColumnsChange, text: textProp } = props, rest = __rest(props, ["responsive", "direction", "keyField", "striped", "noDataComponent", "isDisabled", "isLoading", "isFullHeight", "subHeaderAlign", "className", "paginationTotalRows", "totalEntriesText", "data", "columns", "canPinColumns", "onPinnedColumnsChange", "text"]);
|
|
5832
|
+
const text = Object.assign(Object.assign({}, DEFAULT_TEXT$9), textProp);
|
|
5809
5833
|
// Turns on/off column pinning.
|
|
5810
|
-
const { columnsWithPinning } = usePinnedColumnsManager(initialColumns, canPinColumns, onPinnedColumnsChange);
|
|
5834
|
+
const { columnsWithPinning } = usePinnedColumnsManager(initialColumns, canPinColumns, onPinnedColumnsChange, { unpinColumn: text.unpinColumn, pinColumn: text.pinColumn });
|
|
5811
5835
|
const combinedClassName = classNames(className, {
|
|
5812
5836
|
'table--striped': striped,
|
|
5813
5837
|
'table-body': true,
|
|
@@ -5815,7 +5839,7 @@ const Table = (props) => {
|
|
|
5815
5839
|
const tableWrapperClassName = classNames('table', {
|
|
5816
5840
|
'table--full-height': isFullHeight,
|
|
5817
5841
|
});
|
|
5818
|
-
return (jsxRuntime.jsx("div", { className: tableWrapperClassName, "data-testid": "table", children: jsxRuntime.jsx(Xe, Object.assign({ data: data, columns: columnsWithPinning, responsive: responsive, direction: direction, subHeaderAlign: subHeaderAlign, keyField: keyField, striped: striped, className: combinedClassName, disabled: isDisabled, noDataComponent: noDataComponent, progressPending: isLoading, progressComponent: jsxRuntime.jsx(LoadingComponent, {}), pagination: true, paginationComponent: (props) => (jsxRuntime.jsx(TablePagination$1, Object.assign({}, props, { totalEntriesText: totalEntriesText }))), paginationTotalRows: paginationTotalRows, highlightOnHover: true, pointerOnHover: true }, rest)) }));
|
|
5842
|
+
return (jsxRuntime.jsx("div", { className: tableWrapperClassName, "data-testid": "table", children: jsxRuntime.jsx(Xe, Object.assign({ data: data, columns: columnsWithPinning, responsive: responsive, direction: direction, subHeaderAlign: subHeaderAlign, keyField: keyField, striped: striped, className: combinedClassName, disabled: isDisabled, noDataComponent: noDataComponent, progressPending: isLoading, progressComponent: jsxRuntime.jsx(LoadingComponent, { loadingText: text.loading }), pagination: true, paginationComponent: (props) => (jsxRuntime.jsx(TablePagination$1, Object.assign({}, props, { totalEntriesText: totalEntriesText }))), paginationTotalRows: paginationTotalRows, highlightOnHover: true, pointerOnHover: true }, rest)) }));
|
|
5819
5843
|
};
|
|
5820
5844
|
|
|
5821
5845
|
const Radio = React__namespace.default.forwardRef((_a, ref) => {
|
|
@@ -5834,7 +5858,7 @@ const Toggle = React__namespace.default.forwardRef((_a, ref) => {
|
|
|
5834
5858
|
});
|
|
5835
5859
|
|
|
5836
5860
|
const Textarea = React__namespace.default.forwardRef((_a, ref) => {
|
|
5837
|
-
var { label, name, placeholder, value, onChange, onKeyDown, isRequired, isDisabled, errorMessage, helpText, hasHiddenLabel, rows, cols, readonly, wrap, form, maxLength, autofocus, defaultValue, tabIndex } = _a, rest = __rest(_a, ["label", "name", "placeholder", "value", "onChange", "onKeyDown", "isRequired", "isDisabled", "errorMessage", "helpText", "hasHiddenLabel", "rows", "cols", "readonly", "wrap", "form", "maxLength", "autofocus", "defaultValue", "tabIndex"]);
|
|
5861
|
+
var { label: _label, name, placeholder, value, onChange, onKeyDown, isRequired, isDisabled, errorMessage, helpText, hasHiddenLabel: _hasHiddenLabel, rows, cols, readonly, wrap, form, maxLength, autofocus, defaultValue, tabIndex, text: _text } = _a, rest = __rest(_a, ["label", "name", "placeholder", "value", "onChange", "onKeyDown", "isRequired", "isDisabled", "errorMessage", "helpText", "hasHiddenLabel", "rows", "cols", "readonly", "wrap", "form", "maxLength", "autofocus", "defaultValue", "tabIndex", "text"]);
|
|
5838
5862
|
const hasErrors = errorMessage && errorMessage.length > 0;
|
|
5839
5863
|
const textareaClasses = classNames('textarea', { error: hasErrors });
|
|
5840
5864
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "textarea-wrapper", children: jsxRuntime.jsx("textarea", Object.assign({ ref: ref, rows: rows, cols: cols, autoFocus: autofocus, wrap: wrap, form: form, maxLength: maxLength, readOnly: readonly, "data-testid": `form-textarea-${name}`, name: name, disabled: isDisabled, placeholder: placeholder, onChange: onChange, onKeyDown: onKeyDown, className: textareaClasses, "aria-invalid": hasErrors ? true : undefined, "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired, value: value, defaultValue: defaultValue, tabIndex: tabIndex }, rest)) }), hasErrors && jsxRuntime.jsx(DisplayFormError, { message: errorMessage }), helpText && (jsxRuntime.jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
|
|
@@ -5842,7 +5866,7 @@ const Textarea = React__namespace.default.forwardRef((_a, ref) => {
|
|
|
5842
5866
|
const LabeledTextarea = withLabel(Textarea);
|
|
5843
5867
|
|
|
5844
5868
|
const PasswordInput = React__namespace.default.forwardRef((_a, ref) => {
|
|
5845
|
-
var { name, placeholder, onChange, onBlur, onKeyDown, isRequired, isDisabled, errorMessage, helpText, hasShowPassword = true } = _a, rest = __rest(_a, ["name", "placeholder", "onChange", "onBlur", "onKeyDown", "isRequired", "isDisabled", "errorMessage", "helpText", "hasShowPassword"]);
|
|
5869
|
+
var { name, placeholder, onChange, onBlur, onKeyDown, isRequired, isDisabled, errorMessage, helpText, hasShowPassword = true, text: _text } = _a, rest = __rest(_a, ["name", "placeholder", "onChange", "onBlur", "onKeyDown", "isRequired", "isDisabled", "errorMessage", "helpText", "hasShowPassword", "text"]);
|
|
5846
5870
|
const hasErrors = errorMessage && errorMessage.length > 0;
|
|
5847
5871
|
const [showPassword, setShowPassword] = React.useState(false);
|
|
5848
5872
|
const handleShowPassword = () => {
|
|
@@ -5855,18 +5879,25 @@ const PasswordInput = React__namespace.default.forwardRef((_a, ref) => {
|
|
|
5855
5879
|
});
|
|
5856
5880
|
const LabeledPasswordInput = withLabel(PasswordInput);
|
|
5857
5881
|
|
|
5882
|
+
const DEFAULT_TEXT$8 = {
|
|
5883
|
+
placeholder: 'Select...',
|
|
5884
|
+
noOptions: 'No options',
|
|
5885
|
+
loading: 'Loading...',
|
|
5886
|
+
required: '(required)',
|
|
5887
|
+
};
|
|
5858
5888
|
const OptionComponent = (_a) => {
|
|
5859
5889
|
var _b, _c, _d;
|
|
5860
5890
|
var props = __rest(_a, []);
|
|
5861
5891
|
return (jsxRuntime.jsx(ReactSelect.components.Option, Object.assign({}, props, { children: jsxRuntime.jsxs("div", { className: "select__items", children: [jsxRuntime.jsx("div", { className: "select__item-value", children: (_b = props === null || props === void 0 ? void 0 : props.data) === null || _b === void 0 ? void 0 : _b.label }), ((_c = props === null || props === void 0 ? void 0 : props.data) === null || _c === void 0 ? void 0 : _c.detail) && jsxRuntime.jsx("div", { className: "select__item-detail", children: (_d = props === null || props === void 0 ? void 0 : props.data) === null || _d === void 0 ? void 0 : _d.detail })] }) })));
|
|
5862
5892
|
};
|
|
5863
5893
|
const Select$1 = React__namespace.default.forwardRef((_a, ref) => {
|
|
5864
|
-
var { classNamePrefix = 'select', className, components: customComponents, label, hasHiddenLabel, name } = _a, props = __rest(_a, ["classNamePrefix", "className", "components", "label", "hasHiddenLabel", "name"]);
|
|
5894
|
+
var { classNamePrefix = 'select', className, components: customComponents, label: _label, hasHiddenLabel: _hasHiddenLabel, name: _name, text: textProp } = _a, props = __rest(_a, ["classNamePrefix", "className", "components", "label", "hasHiddenLabel", "name", "text"]);
|
|
5895
|
+
const text = Object.assign(Object.assign({}, DEFAULT_TEXT$8), textProp);
|
|
5865
5896
|
const defaultComponents = {
|
|
5866
5897
|
Option: OptionComponent,
|
|
5867
5898
|
};
|
|
5868
5899
|
const mergedComponents = Object.assign(Object.assign({}, defaultComponents), customComponents);
|
|
5869
|
-
return (jsxRuntime.jsx(ReactSelect__default.default, Object.assign({ ref: ref, classNamePrefix: classNamePrefix, className: classNames('select-wrapper', className), components: mergedComponents }, props)));
|
|
5900
|
+
return (jsxRuntime.jsx(ReactSelect__default.default, Object.assign({ ref: ref, classNamePrefix: classNamePrefix, className: classNames('select-wrapper', className), components: mergedComponents, placeholder: text.placeholder, noOptionsMessage: () => text.noOptions, loadingMessage: () => text.loading }, props)));
|
|
5870
5901
|
});
|
|
5871
5902
|
const LabeledSelect = withLabel(Select$1);
|
|
5872
5903
|
|
|
@@ -13866,48 +13897,6 @@ function useInteractions(propsList) {
|
|
|
13866
13897
|
}), [getReferenceProps, getFloatingProps, getItemProps]);
|
|
13867
13898
|
}
|
|
13868
13899
|
|
|
13869
|
-
const defaultOptions$1 = {
|
|
13870
|
-
placement: 'bottom-start',
|
|
13871
|
-
middleware: [offset$2(5), flip$2(), shift$2()],
|
|
13872
|
-
};
|
|
13873
|
-
function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsOpen: controlledSetIsOpen, isPortal = false, portalOptions = {}, floatingOptions = defaultOptions$1, className, hover = false, onOpenChange, disableAutoUpdate = false, }) {
|
|
13874
|
-
var _a, _b;
|
|
13875
|
-
const [internalIsOpen, setInternalIsOpen] = React.useState(false);
|
|
13876
|
-
// Determine whether the component is controlled or uncontrolled
|
|
13877
|
-
const isControlled = controlledIsOpen !== undefined && controlledSetIsOpen !== undefined;
|
|
13878
|
-
const isOpen = isControlled ? controlledIsOpen : internalIsOpen;
|
|
13879
|
-
const setIsOpen = isControlled ? controlledSetIsOpen : setInternalIsOpen;
|
|
13880
|
-
const floatUIContentRef = React.useRef();
|
|
13881
|
-
const referenceElementRef = React.useRef(null);
|
|
13882
|
-
const childrenArray = React__namespace.default.Children.toArray(children);
|
|
13883
|
-
if (childrenArray.length !== 2) {
|
|
13884
|
-
throw new Error('FloatUI requires exactly two children: a trigger element and a content element.');
|
|
13885
|
-
}
|
|
13886
|
-
const [trigger, content] = childrenArray;
|
|
13887
|
-
if (!React.isValidElement(trigger) || !React.isValidElement(content)) {
|
|
13888
|
-
throw new Error('Both children of FloatUI must be valid React elements.');
|
|
13889
|
-
}
|
|
13890
|
-
const referenceElement = ((_a = floatingOptions.elements) === null || _a === void 0 ? void 0 : _a.reference) || referenceElementRef.current;
|
|
13891
|
-
const { refs, floatingStyles, context } = useFloating(Object.assign(Object.assign({}, floatingOptions), { open: isOpen, onOpenChange: (isOpen) => {
|
|
13892
|
-
setIsOpen(isOpen);
|
|
13893
|
-
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(isOpen);
|
|
13894
|
-
}, whileElementsMounted: disableAutoUpdate
|
|
13895
|
-
? undefined
|
|
13896
|
-
: ((_b = floatingOptions.whileElementsMounted) !== null && _b !== void 0 ? _b : autoUpdate$1), elements: {
|
|
13897
|
-
reference: referenceElement,
|
|
13898
|
-
} }));
|
|
13899
|
-
// Can't call hooks conditionally so this enabled option is needed.
|
|
13900
|
-
const click = useClick(context, { enabled: !hover });
|
|
13901
|
-
const hoverHook = useHover(context, { enabled: hover });
|
|
13902
|
-
const dismiss = useDismiss(context, {
|
|
13903
|
-
bubbles: true,
|
|
13904
|
-
});
|
|
13905
|
-
const { getReferenceProps, getFloatingProps } = useInteractions([click, hoverHook, dismiss]);
|
|
13906
|
-
const tooltipContent = (jsxRuntime.jsx("div", Object.assign({ ref: refs.setFloating }, getFloatingProps(), { style: floatingStyles, role: "dialog", "aria-label": ariaLabel, className: `floatui-container ${className}`, children: jsxRuntime.jsx("div", { ref: floatUIContentRef, className: "floatui-content", children: content }) })));
|
|
13907
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", Object.assign({ ref: refs.setReference }, getReferenceProps(), { children: trigger })), isOpen &&
|
|
13908
|
-
(isPortal ? (jsxRuntime.jsx(FloatingPortal, { id: portalOptions === null || portalOptions === void 0 ? void 0 : portalOptions.rootId, children: tooltipContent })) : (tooltipContent))] }));
|
|
13909
|
-
}
|
|
13910
|
-
|
|
13911
13900
|
const formatTimeValue = (value) => {
|
|
13912
13901
|
if (!value || value.trim() === '') {
|
|
13913
13902
|
return '';
|
|
@@ -13957,8 +13946,54 @@ const validateInputValue = (value) => {
|
|
|
13957
13946
|
return ''; // Valid time format
|
|
13958
13947
|
};
|
|
13959
13948
|
|
|
13949
|
+
const defaultOptions$1 = {
|
|
13950
|
+
placement: 'bottom-start',
|
|
13951
|
+
middleware: [offset$2(5), flip$2(), shift$2()],
|
|
13952
|
+
};
|
|
13953
|
+
function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsOpen: controlledSetIsOpen, isPortal = false, portalOptions = {}, floatingOptions = defaultOptions$1, className, hover = false, onOpenChange, disableAutoUpdate = false, }) {
|
|
13954
|
+
var _a, _b;
|
|
13955
|
+
const [internalIsOpen, setInternalIsOpen] = React.useState(false);
|
|
13956
|
+
// Determine whether the component is controlled or uncontrolled
|
|
13957
|
+
const isControlled = controlledIsOpen !== undefined && controlledSetIsOpen !== undefined;
|
|
13958
|
+
const isOpen = isControlled ? controlledIsOpen : internalIsOpen;
|
|
13959
|
+
const setIsOpen = isControlled ? controlledSetIsOpen : setInternalIsOpen;
|
|
13960
|
+
const floatUIContentRef = React.useRef();
|
|
13961
|
+
const referenceElementRef = React.useRef(null);
|
|
13962
|
+
const childrenArray = React__namespace.default.Children.toArray(children);
|
|
13963
|
+
if (childrenArray.length !== 2) {
|
|
13964
|
+
throw new Error('FloatUI requires exactly two children: a trigger element and a content element.');
|
|
13965
|
+
}
|
|
13966
|
+
const [trigger, content] = childrenArray;
|
|
13967
|
+
if (!React.isValidElement(trigger) || !React.isValidElement(content)) {
|
|
13968
|
+
throw new Error('Both children of FloatUI must be valid React elements.');
|
|
13969
|
+
}
|
|
13970
|
+
const referenceElement = ((_a = floatingOptions.elements) === null || _a === void 0 ? void 0 : _a.reference) || referenceElementRef.current;
|
|
13971
|
+
const { refs, floatingStyles, context } = useFloating(Object.assign(Object.assign({}, floatingOptions), { open: isOpen, onOpenChange: (isOpen) => {
|
|
13972
|
+
setIsOpen(isOpen);
|
|
13973
|
+
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(isOpen);
|
|
13974
|
+
}, whileElementsMounted: disableAutoUpdate
|
|
13975
|
+
? undefined
|
|
13976
|
+
: (_b = floatingOptions.whileElementsMounted) !== null && _b !== void 0 ? _b : autoUpdate$1, elements: {
|
|
13977
|
+
reference: referenceElement,
|
|
13978
|
+
} }));
|
|
13979
|
+
// Can't call hooks conditionally so this enabled option is needed.
|
|
13980
|
+
const click = useClick(context, { enabled: !hover });
|
|
13981
|
+
const hoverHook = useHover(context, { enabled: hover });
|
|
13982
|
+
const dismiss = useDismiss(context, {
|
|
13983
|
+
bubbles: true,
|
|
13984
|
+
});
|
|
13985
|
+
const { getReferenceProps, getFloatingProps } = useInteractions([click, hoverHook, dismiss]);
|
|
13986
|
+
const tooltipContent = (jsxRuntime.jsx("div", Object.assign({ ref: refs.setFloating }, getFloatingProps(), { style: floatingStyles, role: "dialog", "aria-label": ariaLabel, className: `floatui-container ${className}`, children: jsxRuntime.jsx("div", { ref: floatUIContentRef, className: "floatui-content", children: content }) })));
|
|
13987
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", Object.assign({ ref: refs.setReference }, getReferenceProps(), { children: trigger })), isOpen &&
|
|
13988
|
+
(isPortal ? (jsxRuntime.jsx(FloatingPortal, { id: portalOptions === null || portalOptions === void 0 ? void 0 : portalOptions.rootId, children: tooltipContent })) : (tooltipContent))] }));
|
|
13989
|
+
}
|
|
13990
|
+
|
|
13991
|
+
const DEFAULT_TEXT$7 = {
|
|
13992
|
+
validationError: 'Time validation error',
|
|
13993
|
+
};
|
|
13960
13994
|
const TimePicker = (_a) => {
|
|
13961
|
-
var { ref, timeValue = '', label = 'Time Picker', name = 'time-picker', hasHiddenLabel = false, onTimeChange, className, isDisabled, isReadOnly, tabIndex } = _a, rest = __rest(_a, ["ref", "timeValue", "label", "name", "hasHiddenLabel", "onTimeChange", "className", "isDisabled", "isReadOnly", "tabIndex"]);
|
|
13995
|
+
var { ref, timeValue = '', label = 'Time Picker', name = 'time-picker', hasHiddenLabel = false, onTimeChange, className, isDisabled, isReadOnly, tabIndex, text: textProp } = _a, rest = __rest(_a, ["ref", "timeValue", "label", "name", "hasHiddenLabel", "onTimeChange", "className", "isDisabled", "isReadOnly", "tabIndex", "text"]);
|
|
13996
|
+
const text = Object.assign(Object.assign({}, DEFAULT_TEXT$7), textProp);
|
|
13962
13997
|
const [validationError, setValidationError] = React.useState('');
|
|
13963
13998
|
const [inputValue, setInputValue] = React.useState(timeValue);
|
|
13964
13999
|
const handleTimeChange = (e) => {
|
|
@@ -13980,7 +14015,7 @@ const TimePicker = (_a) => {
|
|
|
13980
14015
|
onTimeChange === null || onTimeChange === void 0 ? void 0 : onTimeChange(formattedValue);
|
|
13981
14016
|
}
|
|
13982
14017
|
};
|
|
13983
|
-
return (jsxRuntime.jsxs("div", { className: "time-input-wrapper", children: [jsxRuntime.jsx(LabeledInput, Object.assign({ ref: ref, tabIndex: tabIndex, className: className, "data-testid": `${name}-input`, label: label, hasHiddenLabel: hasHiddenLabel, value: inputValue, maxLength: 8, onChange: handleTimeChange, onBlur: handleBlur, name: name, readonly: isReadOnly, isDisabled: isDisabled }, rest)), jsxRuntime.jsxs(FloatUI, { ariaLabel:
|
|
14018
|
+
return (jsxRuntime.jsxs("div", { className: "time-input-wrapper", children: [jsxRuntime.jsx(LabeledInput, Object.assign({ ref: ref, tabIndex: tabIndex, className: className, "data-testid": `${name}-input`, label: label, hasHiddenLabel: hasHiddenLabel, value: inputValue, maxLength: 8, onChange: handleTimeChange, onBlur: handleBlur, name: name, readonly: isReadOnly, isDisabled: isDisabled }, rest)), jsxRuntime.jsxs(FloatUI, { ariaLabel: text.validationError, isOpen: !!validationError, setIsOpen: () => { }, isPortal: true, portalOptions: {
|
|
13984
14019
|
rootId: 'theme-root' ,
|
|
13985
14020
|
}, floatingOptions: {
|
|
13986
14021
|
placement: 'bottom-start',
|
|
@@ -13988,8 +14023,15 @@ const TimePicker = (_a) => {
|
|
|
13988
14023
|
}, children: [jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", { className: "time-validation-error", children: validationError && jsxRuntime.jsx("div", { className: "error-message", children: validationError }) })] })] }));
|
|
13989
14024
|
};
|
|
13990
14025
|
|
|
14026
|
+
const DEFAULT_TEXT$6 = {
|
|
14027
|
+
selectTime: 'Select Time',
|
|
14028
|
+
};
|
|
13991
14029
|
const DatePicker = (props) => {
|
|
13992
|
-
const { mode = 'single',
|
|
14030
|
+
const { mode = 'single', selected, hasTimePicker = false, endMonth, numberOfMonths, timeValue, onTimeChange, onSelect, isReadOnly, ref, timeTabIndex, text: textProp,
|
|
14031
|
+
// Destructure props handled by getCommonProps to prevent them from
|
|
14032
|
+
// leaking through ...rest and overriding the transformed values
|
|
14033
|
+
className: _className, captionLayout: _captionLayout, id: _id, month: _month, defaultMonth: _defaultMonth, startMonth: _startMonth, components: _components, isDisabled: _isDisabled, formatters: _formatters, weekStartsOn: _weekStartsOn, firstWeekContainsDate: _firstWeekContainsDate, today: _today, isRequired: _isRequired, min: _min, max: _max, onMonthChange: _onMonthChange, onNextClick: _onNextClick, onPrevClick: _onPrevClick, onDayClick: _onDayClick, dateTabIndex: _dateTabIndex } = props, rest = __rest(props, ["mode", "selected", "hasTimePicker", "endMonth", "numberOfMonths", "timeValue", "onTimeChange", "onSelect", "isReadOnly", "ref", "timeTabIndex", "text", "className", "captionLayout", "id", "month", "defaultMonth", "startMonth", "components", "isDisabled", "formatters", "weekStartsOn", "firstWeekContainsDate", "today", "isRequired", "min", "max", "onMonthChange", "onNextClick", "onPrevClick", "onDayClick", "dateTabIndex"]);
|
|
14034
|
+
const text = Object.assign(Object.assign({}, DEFAULT_TEXT$6), textProp);
|
|
13993
14035
|
const futureDateByYear = (year) => new Date(new Date().getFullYear() + year, 11, 31);
|
|
13994
14036
|
const endMonthDefault = endMonth !== null && endMonth !== void 0 ? endMonth : futureDateByYear(5);
|
|
13995
14037
|
const modeMap = {
|
|
@@ -14040,11 +14082,17 @@ const DatePicker = (props) => {
|
|
|
14040
14082
|
}
|
|
14041
14083
|
return () => observer.disconnect();
|
|
14042
14084
|
}, []);
|
|
14043
|
-
return (jsxRuntime.jsxs("div", { className: "date-picker-wrapper", tabIndex: -1, ref: wrapperRef, children: [hasTimePicker && (jsxRuntime.jsx("div", { className: "time-picker-wrapper", children: jsxRuntime.jsxs(Row, { align: "center", children: [jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("p", { className: "ma-0", children:
|
|
14085
|
+
return (jsxRuntime.jsxs("div", { className: "date-picker-wrapper", tabIndex: -1, ref: wrapperRef, children: [hasTimePicker && (jsxRuntime.jsx("div", { className: "time-picker-wrapper", children: jsxRuntime.jsxs(Row, { align: "center", children: [jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx("p", { className: "ma-0", children: text.selectTime }) }), jsxRuntime.jsx(Col, { children: jsxRuntime.jsx(TimePicker, { ref: ref, timeValue: timeValue !== null && timeValue !== void 0 ? timeValue : '', onTimeChange: handleTimeChange, readonly: isReadOnly, tabIndex: timeTabIndex }) })] }) })), jsxRuntime.jsx(DayPicker, Object.assign({}, finalProps))] }));
|
|
14044
14086
|
};
|
|
14045
14087
|
|
|
14088
|
+
const DEFAULT_TEXT$5 = {
|
|
14089
|
+
triggerIcon: 'Open date picker',
|
|
14090
|
+
};
|
|
14046
14091
|
const IconTriggerDatePicker = (props) => {
|
|
14047
|
-
const { ariaLabel,
|
|
14092
|
+
const { ariaLabel, isDisabled, disableBeforeDate, disableAfterDate, id,
|
|
14093
|
+
// Destructure unused props to prevent leaking into ...rest
|
|
14094
|
+
className: _className, label: _label, onSelect, selected, triggerIcon, triggerIconSize, mode, isOpen, clearOnClose, initialMonth, portalOptions, floatingOptions, isPortal, text: textProp } = props, rest = __rest(props, ["ariaLabel", "isDisabled", "disableBeforeDate", "disableAfterDate", "id", "className", "label", "onSelect", "selected", "triggerIcon", "triggerIconSize", "mode", "isOpen", "clearOnClose", "initialMonth", "portalOptions", "floatingOptions", "isPortal", "text"]);
|
|
14095
|
+
const text = Object.assign(Object.assign({}, DEFAULT_TEXT$5), textProp);
|
|
14048
14096
|
const [localMonth, setLocalMonth] = React.useState(initialMonth !== null && initialMonth !== void 0 ? initialMonth : new Date());
|
|
14049
14097
|
const handleSelect = (date) => {
|
|
14050
14098
|
if (!date) {
|
|
@@ -14060,7 +14108,7 @@ const IconTriggerDatePicker = (props) => {
|
|
|
14060
14108
|
onSelect && onSelect(undefined);
|
|
14061
14109
|
}
|
|
14062
14110
|
}, [isOpen, clearOnClose]);
|
|
14063
|
-
return (jsxRuntime.jsxs(FloatUI, { isOpen: isOpen, ariaLabel: ariaLabel, isPortal: isPortal, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsxRuntime.jsx(Icon, { "aria-label":
|
|
14111
|
+
return (jsxRuntime.jsxs(FloatUI, { isOpen: isOpen, ariaLabel: ariaLabel, isPortal: isPortal, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsxRuntime.jsx(Icon, { "aria-label": text.triggerIcon, name: triggerIcon, size: triggerIconSize, className: "date__picker__trigger", "data-testid": `datepicker-trigger-for-${id}` }), jsxRuntime.jsx(DatePicker, Object.assign({ isDisabled: isDisabled, mode: mode, selected: selected, onSelect: handleSelect, month: localMonth, startMonth: disableBeforeDate, endMonth: disableAfterDate, onMonthChange: setLocalMonth }, rest))] }));
|
|
14064
14112
|
};
|
|
14065
14113
|
|
|
14066
14114
|
/**
|
|
@@ -19453,7 +19501,9 @@ const formatDateAsString$1 = (date) => format(date, 'MM/dd/yyyy');
|
|
|
19453
19501
|
|
|
19454
19502
|
function SingleInputDatePicker(props) {
|
|
19455
19503
|
var _a;
|
|
19456
|
-
const { ariaLabel,
|
|
19504
|
+
const { ariaLabel, isDisabled, captionLayout, initialMonth, label, selected, isOpen, inputPlaceholder, clearOnClose, inputIconName, isClearable, errorMessage, onSelect, hasHiddenLabel, ref, isReadOnly, tabIndex, portalOptions, floatingOptions, isPortal,
|
|
19505
|
+
// Destructure unused props to prevent leaking into ...rest
|
|
19506
|
+
className: _className, disableBeforeDate: _disableBeforeDate, disableAfterDate: _disableAfterDate, id: _id } = props, rest = __rest(props, ["ariaLabel", "isDisabled", "captionLayout", "initialMonth", "label", "selected", "isOpen", "inputPlaceholder", "clearOnClose", "inputIconName", "isClearable", "errorMessage", "onSelect", "hasHiddenLabel", "ref", "isReadOnly", "tabIndex", "portalOptions", "floatingOptions", "isPortal", "className", "disableBeforeDate", "disableAfterDate", "id"]);
|
|
19457
19507
|
const inputId = React.useId();
|
|
19458
19508
|
// The text value is assumed to be unneeded by the consumer.
|
|
19459
19509
|
const [localTextValue, setLocalTextValue] = React.useState(selected ? formatDateAsString$1(selected) : '');
|
|
@@ -19487,11 +19537,18 @@ function SingleInputDatePicker(props) {
|
|
|
19487
19537
|
setLocalTextValue('');
|
|
19488
19538
|
}
|
|
19489
19539
|
}, [isOpen, clearOnClose]);
|
|
19490
|
-
return (jsxRuntime.jsxs(FloatUI, { isOpen: isOpen, ariaLabel: ariaLabel, isPortal: isPortal, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsxRuntime.jsx(LabeledInput, { id: inputId, value: localTextValue, placeholder: inputPlaceholder, isDisabled: isDisabled, hasHiddenLabel: hasHiddenLabel, iconName: inputIconName, isClearable: isClearable, onChange: handleInputChange, errorMessage: errorMessage, label:
|
|
19540
|
+
return (jsxRuntime.jsxs(FloatUI, { isOpen: isOpen, ariaLabel: ariaLabel, isPortal: isPortal, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsxRuntime.jsx(LabeledInput, { id: inputId, value: localTextValue, placeholder: inputPlaceholder, isDisabled: isDisabled, hasHiddenLabel: hasHiddenLabel, iconName: inputIconName, isClearable: isClearable, onChange: handleInputChange, errorMessage: errorMessage, label: label, tabIndex: tabIndex, name: label, ref: ref, readonly: isReadOnly }), jsxRuntime.jsx(DatePicker, Object.assign({ captionLayout: captionLayout, mode: "single", selected: selected, onSelect: handleDayPickerSelect, month: localMonth, onMonthChange: setLocalMonth }, rest))] }));
|
|
19491
19541
|
}
|
|
19492
19542
|
|
|
19543
|
+
const DEFAULT_TEXT$4 = {
|
|
19544
|
+
fromDate: 'From Date',
|
|
19545
|
+
toDate: 'To Date',
|
|
19546
|
+
};
|
|
19493
19547
|
function InputDateRangePicker(props) {
|
|
19494
|
-
const { ariaLabel,
|
|
19548
|
+
const { ariaLabel, isDisabled, captionLayout,
|
|
19549
|
+
// Destructure unused props to prevent leaking into ...rest
|
|
19550
|
+
className: _className, disableBeforeDate: _disableBeforeDate, disableAfterDate: _disableAfterDate, month: _month, id: _id, isPortal: _isPortal, onSelect, selected, isOpen, setIsOpen, inputPlaceholder, inputIconName, toErrorMessage, fromErrorMessage, gutterWidth, fromLabel, toLabel, closeOnSelect, clearOnClose, hasHiddenLabel, ref, isFromReadOnly, isToReadOnly, toTabIndex, fromTabIndex, portalOptions, floatingOptions, text: textProp } = props, rest = __rest(props, ["ariaLabel", "isDisabled", "captionLayout", "className", "disableBeforeDate", "disableAfterDate", "month", "id", "isPortal", "onSelect", "selected", "isOpen", "setIsOpen", "inputPlaceholder", "inputIconName", "toErrorMessage", "fromErrorMessage", "gutterWidth", "fromLabel", "toLabel", "closeOnSelect", "clearOnClose", "hasHiddenLabel", "ref", "isFromReadOnly", "isToReadOnly", "toTabIndex", "fromTabIndex", "portalOptions", "floatingOptions", "text"]);
|
|
19551
|
+
const text = Object.assign(Object.assign({}, DEFAULT_TEXT$4), textProp);
|
|
19495
19552
|
const inputId = React.useId();
|
|
19496
19553
|
// Hold the input values in state
|
|
19497
19554
|
const [localTextValueFrom, setLocalTextValueFrom] = React.useState((selected === null || selected === void 0 ? void 0 : selected.from) ? formatDateAsString$1(selected.from) : '');
|
|
@@ -19550,14 +19607,16 @@ function InputDateRangePicker(props) {
|
|
|
19550
19607
|
setLocalTextValueTo('');
|
|
19551
19608
|
}
|
|
19552
19609
|
}, [isOpen, clearOnClose]);
|
|
19553
|
-
return (jsxRuntime.jsxs(FloatUI, { isOpen: isOpen, setIsOpen: setIsOpen, ariaLabel: ariaLabel, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsxRuntime.jsxs(Row, { gutterWidth: gutterWidth, children: [jsxRuntime.jsx(Col, { children: jsxRuntime.jsx(LabeledInput, { id: `${inputId}-from`, value: localTextValueFrom, placeholder: inputPlaceholder, isDisabled: isDisabled, iconName: inputIconName, onChange: (e) => handleInputChange(e, 'from'), errorMessage: fromErrorMessage, label: fromLabel, name:
|
|
19610
|
+
return (jsxRuntime.jsxs(FloatUI, { isOpen: isOpen, setIsOpen: setIsOpen, ariaLabel: ariaLabel, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsxRuntime.jsxs(Row, { gutterWidth: gutterWidth, children: [jsxRuntime.jsx(Col, { children: jsxRuntime.jsx(LabeledInput, { id: `${inputId}-from`, value: localTextValueFrom, placeholder: inputPlaceholder, isDisabled: isDisabled, iconName: inputIconName, onChange: (e) => handleInputChange(e, 'from'), errorMessage: fromErrorMessage, label: fromLabel, name: text.fromDate, "data-testid": "date-picker-from", hasHiddenLabel: hasHiddenLabel, ref: ref, readonly: isFromReadOnly, tabIndex: fromTabIndex }) }), jsxRuntime.jsx(Col, { children: jsxRuntime.jsx(LabeledInput, { id: `${inputId}-to`, value: localTextValueTo, placeholder: inputPlaceholder, isDisabled: isDisabled, iconName: inputIconName, onChange: (e) => handleInputChange(e, 'to'), errorMessage: toErrorMessage, label: toLabel, name: text.toDate, "data-testid": "date-picker-to", hasHiddenLabel: hasHiddenLabel, ref: ref, readonly: isToReadOnly, tabIndex: toTabIndex }) })] }), jsxRuntime.jsx(DatePicker, Object.assign({ captionLayout: captionLayout, month: localMonth, onMonthChange: (date) => setLocalMonth(date), mode: "range", selected: selected, onSelect: handleDayPickerSelect }, rest))] }));
|
|
19554
19611
|
}
|
|
19555
19612
|
|
|
19556
19613
|
const formatDateAsString = (date) => format(date, 'MM/dd/yyyy');
|
|
19557
19614
|
|
|
19558
19615
|
function SingleInputDateTimePicker(props) {
|
|
19559
19616
|
var _a;
|
|
19560
|
-
const { ariaLabel,
|
|
19617
|
+
const { ariaLabel, isDisabled, captionLayout, initialMonth, id, label, selected, isOpen, inputPlaceholder, clearOnClose, inputIconName, isClearable, errorMessage, onSelect, timeValue, onTimeChange, hasHiddenLabel, isReadOnly, timePickerRef, dateTabIndex, timeTabIndex, ref, portalOptions, floatingOptions, isPortal,
|
|
19618
|
+
// Destructure unused props to prevent leaking into ...rest
|
|
19619
|
+
className: _className, disableBeforeDate: _disableBeforeDate, disableAfterDate: _disableAfterDate } = props, rest = __rest(props, ["ariaLabel", "isDisabled", "captionLayout", "initialMonth", "id", "label", "selected", "isOpen", "inputPlaceholder", "clearOnClose", "inputIconName", "isClearable", "errorMessage", "onSelect", "timeValue", "onTimeChange", "hasHiddenLabel", "isReadOnly", "timePickerRef", "dateTabIndex", "timeTabIndex", "ref", "portalOptions", "floatingOptions", "isPortal", "className", "disableBeforeDate", "disableAfterDate"]);
|
|
19561
19620
|
const inputId = React.useId();
|
|
19562
19621
|
// The text value is assumed to be unneeded by the consumer.
|
|
19563
19622
|
const [localTextValue, setLocalTextValue] = React.useState(selected ? formatDateAsString(selected) : '');
|
|
@@ -19594,7 +19653,7 @@ function SingleInputDateTimePicker(props) {
|
|
|
19594
19653
|
const handleTimeChange = (time) => {
|
|
19595
19654
|
onTimeChange === null || onTimeChange === void 0 ? void 0 : onTimeChange(time);
|
|
19596
19655
|
};
|
|
19597
|
-
return (jsxRuntime.jsxs(Row, { className: "date-time-picker-row", children: [jsxRuntime.jsx(Col, { className: "date-picker-col", children: jsxRuntime.jsxs(FloatUI, { className: "date-picker-float-ui", isOpen: isOpen, ariaLabel: ariaLabel, isPortal: isPortal, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsxRuntime.jsx(LabeledInput, { ref: ref, className: `date-picker-input`, id: inputId, value: localTextValue, placeholder: inputPlaceholder, isDisabled: isReadOnly || isDisabled, readonly: isReadOnly, iconName: inputIconName, isClearable: isClearable, onChange: handleInputChange, errorMessage: errorMessage, hasHiddenLabel: hasHiddenLabel, label:
|
|
19656
|
+
return (jsxRuntime.jsxs(Row, { className: "date-time-picker-row", children: [jsxRuntime.jsx(Col, { className: "date-picker-col", children: jsxRuntime.jsxs(FloatUI, { className: "date-picker-float-ui", isOpen: isOpen, ariaLabel: ariaLabel, isPortal: isPortal, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsxRuntime.jsx(LabeledInput, { ref: ref, className: `date-picker-input`, id: inputId, value: localTextValue, placeholder: inputPlaceholder, isDisabled: isReadOnly || isDisabled, readonly: isReadOnly, iconName: inputIconName, isClearable: isClearable, onChange: handleInputChange, errorMessage: errorMessage, hasHiddenLabel: hasHiddenLabel, label: label, name: `${id}-date-picker`, tabIndex: dateTabIndex }), jsxRuntime.jsx(DatePicker, Object.assign({ captionLayout: captionLayout, mode: "single", selected: selected, onSelect: handleDayPickerSelect, month: localMonth, onMonthChange: setLocalMonth, isReadOnly: isReadOnly }, rest))] }) }), jsxRuntime.jsx(Col, { xs: "content", className: "time-picker-col", children: jsxRuntime.jsx(TimePicker, { ref: timePickerRef, className: `time-picker-input`, timeValue: timeValue, name: `${id}-time-picker`, hasHiddenLabel: true, onTimeChange: handleTimeChange, isReadOnly: isReadOnly, isDisabled: isDisabled, tabIndex: timeTabIndex }) })] }));
|
|
19598
19657
|
}
|
|
19599
19658
|
|
|
19600
19659
|
const Form = (_a) => {
|
|
@@ -21476,32 +21535,42 @@ Modal$2.default = Modal$1;
|
|
|
21476
21535
|
var libExports = lib.exports;
|
|
21477
21536
|
var ReactModal = /*@__PURE__*/getDefaultExportFromCjs(libExports);
|
|
21478
21537
|
|
|
21538
|
+
const DEFAULT_TEXT$3 = {
|
|
21539
|
+
closeButton: 'Close',
|
|
21540
|
+
};
|
|
21479
21541
|
const Modal = (_a) => {
|
|
21480
21542
|
var { className = '', children, isOpen, onRequestClose, portalClassName, overlayClassName, appElement = document.getElementById('theme-root') ||
|
|
21481
21543
|
document.getElementById('root') ||
|
|
21482
21544
|
document.body, shouldCloseOnOverlayClick, shouldCloseOnEsc, testId, contentElement, overlayElement, position = 'center', parentSelector = () => document.getElementById('theme-root') || document.getElementById('root'), // default for our apps, storybook needs a different one
|
|
21483
|
-
title, subtitle, footer, maxWidthInPixels } = _a, rest = __rest(_a, ["className", "children", "isOpen", "onRequestClose", "portalClassName", "overlayClassName", "appElement", "shouldCloseOnOverlayClick", "shouldCloseOnEsc", "testId", "contentElement", "overlayElement", "position", "parentSelector", "title", "subtitle", "footer", "maxWidthInPixels"]);
|
|
21545
|
+
title, subtitle, footer, maxWidthInPixels, text: textProp } = _a, rest = __rest(_a, ["className", "children", "isOpen", "onRequestClose", "portalClassName", "overlayClassName", "appElement", "shouldCloseOnOverlayClick", "shouldCloseOnEsc", "testId", "contentElement", "overlayElement", "position", "parentSelector", "title", "subtitle", "footer", "maxWidthInPixels", "text"]);
|
|
21546
|
+
const text = Object.assign(Object.assign({}, DEFAULT_TEXT$3), textProp);
|
|
21484
21547
|
const modalClasses = classNames('modal', `modal--${position}`, className);
|
|
21485
21548
|
const overlayClasses = classNames('modal-overlay', overlayClassName);
|
|
21486
21549
|
const hasHeader = title || subtitle;
|
|
21487
|
-
return (jsxRuntime.jsx(ReactModal, Object.assign({ className: modalClasses, overlayClassName: overlayClasses, testId: testId, isOpen: isOpen, onRequestClose: onRequestClose, portalClassName: portalClassName, appElement: appElement, parentSelector: parentSelector, shouldCloseOnOverlayClick: shouldCloseOnOverlayClick, shouldCloseOnEsc: shouldCloseOnEsc, contentElement: contentElement, overlayElement: overlayElement }, rest, { children: jsxRuntime.jsxs("div", { className: "modal-content", style: { maxWidth: `${maxWidthInPixels}px` }, children: [jsxRuntime.jsx(Button$1, { className: "modal-close-button", onClick: onRequestClose, variant: "link", size: "md", iconLeft: "x-close", ariaLabel:
|
|
21550
|
+
return (jsxRuntime.jsx(ReactModal, Object.assign({ className: modalClasses, overlayClassName: overlayClasses, testId: testId, isOpen: isOpen, onRequestClose: onRequestClose, portalClassName: portalClassName, appElement: appElement, parentSelector: parentSelector, shouldCloseOnOverlayClick: shouldCloseOnOverlayClick, shouldCloseOnEsc: shouldCloseOnEsc, contentElement: contentElement, overlayElement: overlayElement }, rest, { children: jsxRuntime.jsxs("div", { className: "modal-content", style: { maxWidth: `${maxWidthInPixels}px` }, children: [jsxRuntime.jsx(Button$1, { className: "modal-close-button", onClick: onRequestClose, variant: "link", size: "md", iconLeft: "x-close", ariaLabel: text.closeButton }), hasHeader && (jsxRuntime.jsx("div", { className: "modal-header", children: jsxRuntime.jsx(Row, { justify: "between", align: "center", children: jsxRuntime.jsxs(Col, { children: [title && jsxRuntime.jsx("h2", { className: "modal-title", children: title }), subtitle && jsxRuntime.jsx("p", { className: "modal-subtitle", children: subtitle })] }) }) })), jsxRuntime.jsx("div", { className: "modal-body", children: children }), footer && jsxRuntime.jsx("div", { className: "modal-footer", children: footer })] }) })));
|
|
21488
21551
|
};
|
|
21489
21552
|
|
|
21490
|
-
const
|
|
21491
|
-
|
|
21553
|
+
const DEFAULT_TEXT$2 = {
|
|
21554
|
+
closeButton: 'Close',
|
|
21555
|
+
dontShowAgain: "Don't display this again.",
|
|
21556
|
+
confirm: 'Confirm',
|
|
21557
|
+
cancel: 'Cancel',
|
|
21558
|
+
};
|
|
21559
|
+
const defaultFooter = ({ onCancelRequest, onConfirmRequest, text, confirmationButtonVariant, hasDontShowAgainCheckbox, isChecked, onDontShowAgainChange, }) => (jsxRuntime.jsxs(Row, { gutterWidth: 12, justify: "end", align: "center", children: [hasDontShowAgainCheckbox && (jsxRuntime.jsx(Col, { children: jsxRuntime.jsx(Checkbox, { label: text.dontShowAgain, onChange: (e) => onDontShowAgainChange === null || onDontShowAgainChange === void 0 ? void 0 : onDontShowAgainChange(e.target.checked), isChecked: isChecked, id: "dont-show-again", name: "dont-show-again" }) })), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx(Button$1, { onClick: onCancelRequest, ariaLabel: text.cancel, variant: "outline", children: text.cancel }) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx(Button$1, { onClick: () => onConfirmRequest === null || onConfirmRequest === void 0 ? void 0 : onConfirmRequest({ dontShowAgain: isChecked }), ariaLabel: text.confirm, variant: confirmationButtonVariant, children: text.confirm }) })] }));
|
|
21560
|
+
const ConfirmationModal = ({ className, overlayClassName, testId, isOpen, onRequestClose, portalClassName, appElement, parentSelector, shouldCloseOnOverlayClick, shouldCloseOnEsc, contentElement, overlayElement, footer, children, onConfirmRequest, onCancelRequest, confirmationButtonVariant = 'solid', icon, title, status = 'info', maxWidthInPixels, hasDontShowAgainCheckbox, text: textProp, }) => {
|
|
21561
|
+
const text = Object.assign(Object.assign({}, DEFAULT_TEXT$2), textProp);
|
|
21492
21562
|
const [dontShowAgain, setDontShowAgain] = React.useState(false);
|
|
21493
21563
|
const modalFooter = footer ||
|
|
21494
21564
|
defaultFooter({
|
|
21495
21565
|
onCancelRequest,
|
|
21496
21566
|
onConfirmRequest,
|
|
21497
|
-
|
|
21498
|
-
cancelButtonText,
|
|
21567
|
+
text,
|
|
21499
21568
|
confirmationButtonVariant,
|
|
21500
21569
|
hasDontShowAgainCheckbox,
|
|
21501
21570
|
isChecked: dontShowAgain,
|
|
21502
21571
|
onDontShowAgainChange: setDontShowAgain,
|
|
21503
21572
|
});
|
|
21504
|
-
return (jsxRuntime.jsxs(Modal, { className: classNames('confirmation-modal', className), overlayClassName: overlayClassName, testId: testId, isOpen: isOpen, onRequestClose: onRequestClose, portalClassName: portalClassName, appElement: appElement, parentSelector: parentSelector, shouldCloseOnOverlayClick: shouldCloseOnOverlayClick, shouldCloseOnEsc: shouldCloseOnEsc, contentElement: contentElement, overlayElement: overlayElement, footer: modalFooter, maxWidthInPixels: maxWidthInPixels, children: [icon && (jsxRuntime.jsx(Icon, { name: icon, className: classNames('confirmation-modal-icon', `color-${status}`), size: "xl" })), title && jsxRuntime.jsx("h2", { className: "confirmation-modal-title", children: title }), children] }));
|
|
21573
|
+
return (jsxRuntime.jsxs(Modal, { className: classNames('confirmation-modal', className), overlayClassName: overlayClassName, testId: testId, isOpen: isOpen, onRequestClose: onRequestClose, portalClassName: portalClassName, appElement: appElement, parentSelector: parentSelector, shouldCloseOnOverlayClick: shouldCloseOnOverlayClick, shouldCloseOnEsc: shouldCloseOnEsc, contentElement: contentElement, overlayElement: overlayElement, footer: modalFooter, maxWidthInPixels: maxWidthInPixels, text: { closeButton: text.closeButton }, children: [icon && (jsxRuntime.jsx(Icon, { name: icon, className: classNames('confirmation-modal-icon', `color-${status}`), size: "xl" })), title && jsxRuntime.jsx("h2", { className: "confirmation-modal-title", children: title }), children] }));
|
|
21505
21574
|
};
|
|
21506
21575
|
|
|
21507
21576
|
/**
|
|
@@ -24595,20 +24664,6 @@ function useReactTable(options) {
|
|
|
24595
24664
|
return tableRef.current;
|
|
24596
24665
|
}
|
|
24597
24666
|
|
|
24598
|
-
function ActionBar({ table, TableActions, className, children, }) {
|
|
24599
|
-
const selectedItems = table.getRowModel().rows.filter((row) => row.getIsSelected());
|
|
24600
|
-
const unselectRows = () => {
|
|
24601
|
-
table.getRowModel().rows.forEach((row) => {
|
|
24602
|
-
row.toggleSelected(false);
|
|
24603
|
-
});
|
|
24604
|
-
};
|
|
24605
|
-
return (jsxRuntime.jsx(Card, { className: classNames('tanstack-table__action-bar', className), children: children !== null && children !== void 0 ? children : (jsxRuntime.jsx("div", { className: "tanstack-table__action-bar__container", children: TableActions && (jsxRuntime.jsx("div", { className: "tanstack-table__action-bar__button-container", children: jsxRuntime.jsx(TableActions, { selectedItems: selectedItems, unselectRows: unselectRows }) })) })) }));
|
|
24606
|
-
}
|
|
24607
|
-
|
|
24608
|
-
function NoResults({ clearFilters, hasFilters, message }) {
|
|
24609
|
-
return (jsxRuntime.jsxs("div", { className: "tanstack-table__no-results", "data-testid": "tanstack-table-no-results", children: [jsxRuntime.jsx("p", { className: "tanstack-table__no-results__text", children: message }), hasFilters && (jsxRuntime.jsx("p", { className: "tanstack-table__no-results__text", children: jsxRuntime.jsx(Button$1, { ariaLabel: "Reset filters", variant: "link", onClick: clearFilters, children: "Reset filters" }) }))] }));
|
|
24610
|
-
}
|
|
24611
|
-
|
|
24612
24667
|
var lodash = {exports: {}};
|
|
24613
24668
|
|
|
24614
24669
|
/**
|
|
@@ -41813,36 +41868,18 @@ lodash.exports;
|
|
|
41813
41868
|
|
|
41814
41869
|
var lodashExports = lodash.exports;
|
|
41815
41870
|
|
|
41816
|
-
|
|
41817
|
-
const
|
|
41818
|
-
|
|
41819
|
-
|
|
41820
|
-
|
|
41821
|
-
|
|
41822
|
-
const columns = React.useMemo(() => defaultColumns, []);
|
|
41823
|
-
const defaultData = React.useMemo(() => [], []);
|
|
41824
|
-
const [windowWidth, setWindowWidth] = React.useState(window.innerWidth);
|
|
41825
|
-
const [rowSelection, setRowSelection] = React.useState({});
|
|
41826
|
-
const [formattedColumns, setFormattedColumns] = React.useState(columns);
|
|
41827
|
-
// Tracks changes to browser width to allow for updating of column widths
|
|
41828
|
-
React.useEffect(() => {
|
|
41829
|
-
const handleResize = () => {
|
|
41830
|
-
setWindowWidth(window.innerWidth);
|
|
41831
|
-
};
|
|
41832
|
-
window.addEventListener('resize', handleResize);
|
|
41833
|
-
return () => {
|
|
41834
|
-
window.removeEventListener('resize', handleResize);
|
|
41835
|
-
};
|
|
41836
|
-
}, []);
|
|
41837
|
-
return {
|
|
41838
|
-
columns,
|
|
41839
|
-
defaultData,
|
|
41840
|
-
rowSelection,
|
|
41841
|
-
setRowSelection,
|
|
41842
|
-
windowWidth,
|
|
41843
|
-
formattedColumns,
|
|
41844
|
-
setFormattedColumns,
|
|
41871
|
+
function ActionBar({ table, TableActions, className, children, }) {
|
|
41872
|
+
const selectedItems = table.getRowModel().rows.filter((row) => row.getIsSelected());
|
|
41873
|
+
const unselectRows = () => {
|
|
41874
|
+
table.getRowModel().rows.forEach((row) => {
|
|
41875
|
+
row.toggleSelected(false);
|
|
41876
|
+
});
|
|
41845
41877
|
};
|
|
41878
|
+
return (jsxRuntime.jsx(Card, { className: classNames('tanstack-table__action-bar', className), children: children !== null && children !== void 0 ? children : (jsxRuntime.jsx("div", { className: "tanstack-table__action-bar__container", children: TableActions && (jsxRuntime.jsx("div", { className: "tanstack-table__action-bar__button-container", children: jsxRuntime.jsx(TableActions, { selectedItems: selectedItems, unselectRows: unselectRows }) })) })) }));
|
|
41879
|
+
}
|
|
41880
|
+
|
|
41881
|
+
function NoResults({ clearFilters, hasFilters, message, resetFiltersText = 'Reset filters', }) {
|
|
41882
|
+
return (jsxRuntime.jsxs("div", { className: "tanstack-table__no-results", "data-testid": "tanstack-table-no-results", children: [jsxRuntime.jsx("p", { className: "tanstack-table__no-results__text", children: message }), hasFilters && (jsxRuntime.jsx("p", { className: "tanstack-table__no-results__text", children: jsxRuntime.jsx(Button$1, { ariaLabel: resetFiltersText, variant: "link", onClick: clearFilters, children: resetFiltersText }) }))] }));
|
|
41846
41883
|
}
|
|
41847
41884
|
|
|
41848
41885
|
// Sets style attributes for pinned columns
|
|
@@ -41877,25 +41914,6 @@ const getTdStyles = (column, textAlign, hasDefinedColumnSize, width) => {
|
|
|
41877
41914
|
return styles;
|
|
41878
41915
|
};
|
|
41879
41916
|
|
|
41880
|
-
const TableHeader = React.forwardRef(({ table }, ref) => {
|
|
41881
|
-
const getStyles = (column, header) => {
|
|
41882
|
-
var _a, _b, _c, _d, _e, _f;
|
|
41883
|
-
return Object.assign(Object.assign({}, getThStyles(column)), (((_c = (_b = (_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.styles) === null || _b === void 0 ? void 0 : _b.header) === null || _c === void 0 ? void 0 : _c.textAlign)
|
|
41884
|
-
? { textAlign: (_f = (_e = (_d = header.column.columnDef.meta) === null || _d === void 0 ? void 0 : _d.styles) === null || _e === void 0 ? void 0 : _e.header) === null || _f === void 0 ? void 0 : _f.textAlign }
|
|
41885
|
-
: {}));
|
|
41886
|
-
};
|
|
41887
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: table.getHeaderGroups().map((headerGroup) => (jsxRuntime.jsx("tr", { children: headerGroup.headers.map((header) => {
|
|
41888
|
-
var _a, _b, _c;
|
|
41889
|
-
const { column } = header;
|
|
41890
|
-
return (jsxRuntime.jsx("th", { className: classNames('tanstack-table__thead__th', {
|
|
41891
|
-
'pa-0': !!((_c = (_b = (_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.styles) === null || _b === void 0 ? void 0 : _b.header) === null || _c === void 0 ? void 0 : _c.hasNoPadding),
|
|
41892
|
-
}), ref: (el) => {
|
|
41893
|
-
if (el)
|
|
41894
|
-
ref.current[column.id] = el;
|
|
41895
|
-
}, colSpan: header.colSpan, style: Object.assign({}, getStyles(column, header)), children: flexRender(header.column.columnDef.header, header.getContext()) }, header.id));
|
|
41896
|
-
}) }, headerGroup.id))) }));
|
|
41897
|
-
});
|
|
41898
|
-
|
|
41899
41917
|
const TableBody = ({ table, onRowClick, activeRows }) => {
|
|
41900
41918
|
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: table.getRowModel().rows.map((row) => (jsxRuntime.jsx("tr", { className: classNames('tanstack-table__tbody__tr', {
|
|
41901
41919
|
'is-selected': row.getIsSelected(),
|
|
@@ -41916,6 +41934,25 @@ const TableBody = ({ table, onRowClick, activeRows }) => {
|
|
|
41916
41934
|
}) }, row.id))) }));
|
|
41917
41935
|
};
|
|
41918
41936
|
|
|
41937
|
+
const TableHeader = React.forwardRef(({ table }, ref) => {
|
|
41938
|
+
const getStyles = (column, header) => {
|
|
41939
|
+
var _a, _b, _c, _d, _e, _f;
|
|
41940
|
+
return Object.assign(Object.assign({}, getThStyles(column)), (((_c = (_b = (_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.styles) === null || _b === void 0 ? void 0 : _b.header) === null || _c === void 0 ? void 0 : _c.textAlign)
|
|
41941
|
+
? { textAlign: (_f = (_e = (_d = header.column.columnDef.meta) === null || _d === void 0 ? void 0 : _d.styles) === null || _e === void 0 ? void 0 : _e.header) === null || _f === void 0 ? void 0 : _f.textAlign }
|
|
41942
|
+
: {}));
|
|
41943
|
+
};
|
|
41944
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: table.getHeaderGroups().map((headerGroup) => (jsxRuntime.jsx("tr", { children: headerGroup.headers.map((header) => {
|
|
41945
|
+
var _a, _b, _c;
|
|
41946
|
+
const { column } = header;
|
|
41947
|
+
return (jsxRuntime.jsx("th", { className: classNames('tanstack-table__thead__th', {
|
|
41948
|
+
'pa-0': !!((_c = (_b = (_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.styles) === null || _b === void 0 ? void 0 : _b.header) === null || _c === void 0 ? void 0 : _c.hasNoPadding),
|
|
41949
|
+
}), ref: (el) => {
|
|
41950
|
+
if (el)
|
|
41951
|
+
ref.current[column.id] = el;
|
|
41952
|
+
}, colSpan: header.colSpan, style: Object.assign({}, getStyles(column, header)), children: flexRender(header.column.columnDef.header, header.getContext()) }, header.id));
|
|
41953
|
+
}) }, headerGroup.id))) }));
|
|
41954
|
+
});
|
|
41955
|
+
|
|
41919
41956
|
function CirclePulse(_a) {
|
|
41920
41957
|
var { size = 'md', className } = _a, rest = __rest(_a, ["size", "className"]);
|
|
41921
41958
|
return (jsxRuntime.jsx("div", Object.assign({ className: `circle-pulse circle-pulse-${size} ${className}`, "aria-hidden": true }, rest)));
|
|
@@ -41925,8 +41962,50 @@ const TableLoading = ({ columns, message }) => {
|
|
|
41925
41962
|
return (jsxRuntime.jsx("tr", { className: "tanstack-table__tbody__tr ", children: jsxRuntime.jsxs("td", { className: "tanstack-table__centered-row pa-6", colSpan: columns.length, children: [jsxRuntime.jsx("h2", { className: "my-12", children: message }), jsxRuntime.jsx(CirclePulse, { "data-testid": "loading-indicator", className: "mb-14" })] }) }));
|
|
41926
41963
|
};
|
|
41927
41964
|
|
|
41965
|
+
const TablePagination = ({ rowsPerPage, rowCount, onChangePage, currentPage, totalEntriesText, text, }) => {
|
|
41966
|
+
const totalPages = Math.ceil(rowCount / rowsPerPage);
|
|
41967
|
+
return (jsxRuntime.jsx("div", { className: "table__pagination", "data-testid": "tanstack-table-pagination", children: jsxRuntime.jsxs(Row, { align: "center", justify: "between", children: [jsxRuntime.jsx(Col, { xs: "content", children: totalEntriesText && (jsxRuntime.jsx("span", { "data-testid": "table-pagination-total-entries", className: "table__pagination-total-entries", children: totalEntriesText })) }), jsxRuntime.jsx(Col, { xs: "content", children: jsxRuntime.jsx(Pagination, { "data-testid": "table-pagination-component", totalPages: totalPages, currentPage: currentPage, onChange: (page) => onChangePage(page), text: text }) })] }) }));
|
|
41968
|
+
};
|
|
41969
|
+
|
|
41970
|
+
function useTanstackTable({ defaultColumns }) {
|
|
41971
|
+
const columns = React.useMemo(() => defaultColumns, []);
|
|
41972
|
+
const defaultData = React.useMemo(() => [], []);
|
|
41973
|
+
const [windowWidth, setWindowWidth] = React.useState(window.innerWidth);
|
|
41974
|
+
const [rowSelection, setRowSelection] = React.useState({});
|
|
41975
|
+
const [formattedColumns, setFormattedColumns] = React.useState(columns);
|
|
41976
|
+
// Tracks changes to browser width to allow for updating of column widths
|
|
41977
|
+
React.useEffect(() => {
|
|
41978
|
+
const handleResize = () => {
|
|
41979
|
+
setWindowWidth(window.innerWidth);
|
|
41980
|
+
};
|
|
41981
|
+
window.addEventListener('resize', handleResize);
|
|
41982
|
+
return () => {
|
|
41983
|
+
window.removeEventListener('resize', handleResize);
|
|
41984
|
+
};
|
|
41985
|
+
}, []);
|
|
41986
|
+
return {
|
|
41987
|
+
columns,
|
|
41988
|
+
defaultData,
|
|
41989
|
+
rowSelection,
|
|
41990
|
+
setRowSelection,
|
|
41991
|
+
windowWidth,
|
|
41992
|
+
formattedColumns,
|
|
41993
|
+
setFormattedColumns,
|
|
41994
|
+
};
|
|
41995
|
+
}
|
|
41996
|
+
|
|
41997
|
+
const DEFAULT_TEXT$1 = {
|
|
41998
|
+
loading: 'Table is loading...',
|
|
41999
|
+
noResults: 'No results found.',
|
|
42000
|
+
error: 'There was an error loading the data.',
|
|
42001
|
+
resetFilters: 'Reset filters',
|
|
42002
|
+
entry: 'entry',
|
|
42003
|
+
entries: 'entries',
|
|
42004
|
+
of: 'of',
|
|
42005
|
+
};
|
|
41928
42006
|
function TanstackTable(_a) {
|
|
41929
|
-
var { columns: defaultColumns, data, className, currentPage, rowCount, rowsPerPage = 1000, onChangePage, totalEntriesText, TableActions, error, enableRowSelection = true, clearFilters, hasFilters, showPagination = true, isLoading = false,
|
|
42007
|
+
var { columns: defaultColumns, data, className, currentPage, rowCount, rowsPerPage = 1000, onChangePage, totalEntriesText, TableActions, error, enableRowSelection = true, clearFilters, hasFilters, showPagination = true, isLoading = false, defaultPinnedColumns, onRowClick, activeRows = [], isStriped = true, actionBarClassName, defaultSorting, text: textProp } = _a, rest = __rest(_a, ["columns", "data", "className", "currentPage", "rowCount", "rowsPerPage", "onChangePage", "totalEntriesText", "TableActions", "error", "enableRowSelection", "clearFilters", "hasFilters", "showPagination", "isLoading", "defaultPinnedColumns", "onRowClick", "activeRows", "isStriped", "actionBarClassName", "defaultSorting", "text"]);
|
|
42008
|
+
const text = Object.assign(Object.assign({}, DEFAULT_TEXT$1), textProp);
|
|
41930
42009
|
const { columns, defaultData, windowWidth, rowSelection, // This refers to the checkboxes.
|
|
41931
42010
|
setRowSelection, formattedColumns, setFormattedColumns, } = useTanstackTable({
|
|
41932
42011
|
defaultColumns,
|
|
@@ -41965,20 +42044,18 @@ function TanstackTable(_a) {
|
|
|
41965
42044
|
const renderBody = () => {
|
|
41966
42045
|
var _a;
|
|
41967
42046
|
if (hasErrorAndIsNotLoading || hasNoResults) {
|
|
41968
|
-
return (jsxRuntime.jsx("tr", { className: "tanstack-table__tbody__tr", children: jsxRuntime.jsx("td", { className: "tanstack-table__centered-row", colSpan: columns.length, children: jsxRuntime.jsx(NoResults, { clearFilters: clearFilters, hasFilters: hasFilters, message: hasErrorAndIsNotLoading
|
|
41969
|
-
? (_a = error === null || error === void 0 ? void 0 : error.errorMessage) !== null && _a !== void 0 ? _a : 'There was an error isLoading the data.'
|
|
41970
|
-
: 'No results found.' }) }) }));
|
|
42047
|
+
return (jsxRuntime.jsx("tr", { className: "tanstack-table__tbody__tr", children: jsxRuntime.jsx("td", { className: "tanstack-table__centered-row", colSpan: columns.length, children: jsxRuntime.jsx(NoResults, { clearFilters: clearFilters, hasFilters: hasFilters, resetFiltersText: text.resetFilters, message: hasErrorAndIsNotLoading ? (_a = error === null || error === void 0 ? void 0 : error.errorMessage) !== null && _a !== void 0 ? _a : text.error : text.noResults }) }) }));
|
|
41971
42048
|
}
|
|
41972
42049
|
if (isLoading) {
|
|
41973
|
-
return jsxRuntime.jsx(TableLoading, { columns: columns, message:
|
|
42050
|
+
return jsxRuntime.jsx(TableLoading, { columns: columns, message: text.loading });
|
|
41974
42051
|
}
|
|
41975
42052
|
return (jsxRuntime.jsx(TableBody, { table: table, onRowClick: onRowClick, activeRows: activeRows }));
|
|
41976
42053
|
};
|
|
41977
42054
|
return (jsxRuntime.jsxs("div", { className: "tanstack-table__outer-container", children: [jsxRuntime.jsxs("div", { className: "tanstack-table__container", children: [jsxRuntime.jsxs("table", { className: classNames('tanstack-table', className, {
|
|
41978
42055
|
'is-striped': isStriped,
|
|
41979
|
-
}), children: [jsxRuntime.jsx("thead", { className: "tanstack-table__thead", children: jsxRuntime.jsx(TableHeader, { table: table, ref: thRefs }) }), jsxRuntime.jsx("tbody", { className: "tanstack-table__tbody", children: renderBody() })] }), hasSelectedRows && (jsxRuntime.jsx(ActionBar, { table: table, TableActions: TableActions, className: actionBarClassName }))] }), shouldRenderPagination ? (jsxRuntime.jsx(TablePagination, { currentPage: currentPage, rowCount: rowCount, onChangePage: onChangePage, rowsPerPage: rowsPerPage, totalEntriesText:
|
|
41980
|
-
?
|
|
41981
|
-
: `${totalRowsOnPage} of ${rowCount} entries` })) : null] }));
|
|
42056
|
+
}), children: [jsxRuntime.jsx("thead", { className: "tanstack-table__thead", children: jsxRuntime.jsx(TableHeader, { table: table, ref: thRefs }) }), jsxRuntime.jsx("tbody", { className: "tanstack-table__tbody", children: renderBody() })] }), hasSelectedRows && (jsxRuntime.jsx(ActionBar, { table: table, TableActions: TableActions, className: actionBarClassName }))] }), shouldRenderPagination ? (jsxRuntime.jsx(TablePagination, { currentPage: currentPage, rowCount: rowCount, onChangePage: onChangePage, rowsPerPage: rowsPerPage, totalEntriesText: totalEntriesText !== null && totalEntriesText !== void 0 ? totalEntriesText : (rowCount === 1
|
|
42057
|
+
? `1 ${text.entry}`
|
|
42058
|
+
: `${totalRowsOnPage} ${text.of} ${rowCount} ${text.entries}`), text: { of: text.of } })) : null] }));
|
|
41982
42059
|
}
|
|
41983
42060
|
|
|
41984
42061
|
/**
|
|
@@ -43507,6 +43584,10 @@ function BarSpinner(_a) {
|
|
|
43507
43584
|
return (jsxRuntime.jsx("div", Object.assign({ className: `bar-spinner ${className}`, id: id, style: style }, rest, { children: jsxRuntime.jsx("span", {}) })));
|
|
43508
43585
|
}
|
|
43509
43586
|
|
|
43587
|
+
const BackNavigation = ({ isDisabled, onBackClick, label }) => {
|
|
43588
|
+
return (jsxRuntime.jsx("div", { className: "stepper-navigation-back", children: jsxRuntime.jsx(Button$1, { "data-testid": "stepper-back-button", ariaLabel: label, iconLeft: "fa-arrow-left", onClick: onBackClick, variant: "outline", isDisabled: isDisabled, children: label }) }));
|
|
43589
|
+
};
|
|
43590
|
+
|
|
43510
43591
|
const Legend = ({ currentStep, steps, onStepClick }) => {
|
|
43511
43592
|
const totalSteps = (steps === null || steps === void 0 ? void 0 : steps.length) || 0;
|
|
43512
43593
|
return (jsxRuntime.jsx("div", { className: "stepper-legend", children: steps === null || steps === void 0 ? void 0 : steps.map((step, index) => {
|
|
@@ -43526,15 +43607,17 @@ const Legend = ({ currentStep, steps, onStepClick }) => {
|
|
|
43526
43607
|
}) }));
|
|
43527
43608
|
};
|
|
43528
43609
|
|
|
43529
|
-
const
|
|
43530
|
-
return (jsxRuntime.jsx("div", { className: "stepper-navigation-
|
|
43610
|
+
const NextNavigation = ({ isLastStep, onNextClick, onFinishClick, isDisabled, nextLabel, finishLabel, }) => {
|
|
43611
|
+
return (jsxRuntime.jsx("div", { className: "stepper-navigation", children: !isLastStep ? (jsxRuntime.jsx("div", { className: "stepper-navigation-next", children: jsxRuntime.jsx(Button$1, { "data-testid": "stepper-next-button", iconRight: "fa-arrow-right", ariaLabel: nextLabel, onClick: onNextClick, isDisabled: isDisabled, children: nextLabel }) })) : (jsxRuntime.jsx("div", { className: "stepper-navigation-finish", children: jsxRuntime.jsx(Button$1, { "data-testid": "stepper-finish-button", ariaLabel: finishLabel, onClick: onFinishClick, isDisabled: isDisabled, children: finishLabel }) })) }));
|
|
43531
43612
|
};
|
|
43532
43613
|
|
|
43533
|
-
const
|
|
43534
|
-
|
|
43614
|
+
const DEFAULT_TEXT = {
|
|
43615
|
+
previousStep: 'Previous Step',
|
|
43616
|
+
nextStep: 'Next Step',
|
|
43617
|
+
finish: 'Finish',
|
|
43535
43618
|
};
|
|
43536
|
-
|
|
43537
|
-
const
|
|
43619
|
+
const Stepper = ({ currentStep: externalCurrentStep, legendHeader, legendFooter, steps, onBackClick, onNextClick, onFinishClick, children, onStepClick, text: textProp, }) => {
|
|
43620
|
+
const text = Object.assign(Object.assign({}, DEFAULT_TEXT), textProp);
|
|
43538
43621
|
const [internalCurrentStep, setInternalCurrentStep] = React.useState(0);
|
|
43539
43622
|
const currentStep = externalCurrentStep !== undefined ? externalCurrentStep : internalCurrentStep;
|
|
43540
43623
|
// Convert children to array to access by index
|
|
@@ -43570,7 +43653,7 @@ const Stepper = ({ currentStep: externalCurrentStep, legendHeader, legendFooter,
|
|
|
43570
43653
|
const disableNextButton = (step) => {
|
|
43571
43654
|
return steps[step].isOptional || !steps[step].isCompleted;
|
|
43572
43655
|
};
|
|
43573
|
-
return (jsxRuntime.jsxs("div", { className: "stepper", children: [jsxRuntime.jsxs("div", { className: "legend", children: [jsxRuntime.jsx("div", { className: "legend-header", children: legendHeader }), jsxRuntime.jsx("div", { className: "legend-body", children: jsxRuntime.jsx(Legend, { currentStep: currentStep, steps: steps, onStepClick: handleStepClick }) }), jsxRuntime.jsx("div", { className: "legend-footer", children: legendFooter })] }), jsxRuntime.jsxs("div", { className: "stepper-body", children: [jsxRuntime.jsx("div", { className: "stepper-content", children: jsxRuntime.jsx("div", { className: "stepper-steps", children: childrenArray[currentStep] }) }), jsxRuntime.jsxs("div", { className: "stepper-actions", children: [jsxRuntime.jsx(BackNavigation, { isDisabled: isFirstStep, onBackClick: handleBackClick }), jsxRuntime.jsx(NextNavigation, { isLastStep: isLastStep, onNextClick: handleNextClick, onFinishClick: handleFinishClick, isDisabled: disableNextButton(currentStep) })] })] })] }));
|
|
43656
|
+
return (jsxRuntime.jsxs("div", { className: "stepper", children: [jsxRuntime.jsxs("div", { className: "legend", children: [jsxRuntime.jsx("div", { className: "legend-header", children: legendHeader }), jsxRuntime.jsx("div", { className: "legend-body", children: jsxRuntime.jsx(Legend, { currentStep: currentStep, steps: steps, onStepClick: handleStepClick }) }), jsxRuntime.jsx("div", { className: "legend-footer", children: legendFooter })] }), jsxRuntime.jsxs("div", { className: "stepper-body", children: [jsxRuntime.jsx("div", { className: "stepper-content", children: jsxRuntime.jsx("div", { className: "stepper-steps", children: childrenArray[currentStep] }) }), jsxRuntime.jsxs("div", { className: "stepper-actions", children: [jsxRuntime.jsx(BackNavigation, { isDisabled: isFirstStep, onBackClick: handleBackClick, label: text.previousStep }), jsxRuntime.jsx(NextNavigation, { isLastStep: isLastStep, onNextClick: handleNextClick, onFinishClick: handleFinishClick, isDisabled: disableNextButton(currentStep), nextLabel: text.nextStep, finishLabel: text.finish })] })] })] }));
|
|
43574
43657
|
};
|
|
43575
43658
|
|
|
43576
43659
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|