@innovaccer/design-system 2.5.0 → 2.7.0-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.json +54 -0
- package/.github/workflows/chromatic.yml +5 -0
- package/.github/workflows/main.yml +2 -2
- package/.github/workflows/pull_request.yml +2 -2
- package/.github/workflows/test.yml +1 -1
- package/.husky/commit-msg +4 -0
- package/.prettierrc +2 -2
- package/.storybook/main.js +4 -0
- package/.vscode/settings.json +11 -0
- package/CHANGELOG.md +78 -0
- package/CONTRIBUTING.md +180 -98
- package/commitlint.config.js +1 -0
- package/core/accessibility/utils/index.ts +5 -0
- package/core/accessibility/utils/isEnterKey.ts +5 -0
- package/core/accessibility/utils/isSpaceKey.ts +5 -0
- package/core/accessibility/utils/useAccessibilityProps.ts +33 -0
- package/core/common.type.tsx +22 -0
- package/core/components/atoms/_chip/__tests__/__snapshots__/_chip.test.tsx.snap +17 -9
- package/core/components/atoms/_chip/index.tsx +19 -3
- package/core/components/atoms/avatar/Avatar.tsx +4 -14
- package/core/components/atoms/avatar/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/avatar/__tests__/Avatar.test.tsx +14 -9
- package/core/components/atoms/avatarGroup/AvatarGroup.tsx +3 -5
- package/core/components/atoms/badge/Badge.tsx +2 -12
- package/core/components/atoms/badge/__tests__/Badge.test.tsx +22 -7
- package/core/components/atoms/badge/_stories_/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/badge/_stories_/variants/Subtle.story.tsx +3 -2
- package/core/components/atoms/button/Button.tsx +10 -7
- package/core/components/atoms/button/__stories__/Alert.story.tsx +8 -1
- package/core/components/atoms/button/__stories__/Cancel.story.tsx +4 -1
- package/core/components/atoms/button/__stories__/IconButtonGroup.story.tsx +12 -3
- package/core/components/atoms/button/__stories__/IconButtonSecondary.story.tsx +6 -1
- package/core/components/atoms/button/__stories__/IconLeftSecondary.story.tsx +4 -1
- package/core/components/atoms/button/__stories__/IconRightSecondary.story.tsx +4 -1
- package/core/components/atoms/button/__stories__/IconTransparent.story.tsx +4 -1
- package/core/components/atoms/button/__stories__/LabelButtonGroup.story.tsx +14 -3
- package/core/components/atoms/button/__stories__/LargeIconExpanded.story.tsx +4 -1
- package/core/components/atoms/button/__stories__/LoadingPrimary.story.tsx +4 -1
- package/core/components/atoms/button/__stories__/Primary.story.tsx +5 -2
- package/core/components/atoms/button/__stories__/SplitButton.story.tsx +6 -1
- package/core/components/atoms/button/__stories__/Transparent.story.tsx +8 -1
- package/core/components/atoms/button/__stories__/index.story.tsx +12 -2
- package/core/components/atoms/button/__stories__/variants/Appearance.story.tsx +6 -2
- package/core/components/atoms/button/__stories__/variants/Expanded.story.tsx +6 -2
- package/core/components/atoms/button/__stories__/variants/Size.story.tsx +4 -0
- package/core/components/atoms/button/__stories__/variants/icon/Icon.story.tsx +15 -0
- package/core/components/atoms/button/__stories__/variants/icon/IconLeft.story.tsx +6 -2
- package/core/components/atoms/button/__stories__/variants/icon/IconRight.story.tsx +6 -2
- package/core/components/atoms/button/__stories__/variants/state/Alert.story.tsx +7 -17
- package/core/components/atoms/button/__stories__/variants/state/Basic.story.tsx +9 -17
- package/core/components/atoms/button/__stories__/variants/state/Primary.story.tsx +7 -17
- package/core/components/atoms/button/__stories__/variants/state/Transparent.story.tsx +13 -17
- package/core/components/atoms/button/__tests__/Button.test.tsx +1 -1
- package/core/components/atoms/button/__tests__/__snapshots__/Button.test.tsx.snap +0 -137
- package/core/components/atoms/card/__stories__/empty.story.tsx +1 -1
- package/core/components/atoms/card/__stories__/nested.story.tsx +1 -1
- package/core/components/atoms/card/__stories__/scroll.story.tsx +1 -1
- package/core/components/atoms/checkbox/Checkbox.tsx +8 -9
- package/core/components/atoms/checkbox/__stories__/variants/Size.story.tsx +2 -2
- package/core/components/atoms/chip/Chip.tsx +3 -2
- package/core/components/atoms/chip/__stories__/variants/Selection.story.tsx +17 -0
- package/core/components/atoms/chip/__stories__/variants/Type.story.tsx +2 -2
- package/core/components/atoms/chip/__tests__/Chip.test.tsx +7 -0
- package/core/components/atoms/chipGroup/__tests__/__snapshots__/chipGroup.test.tsx.snap +11 -5
- package/core/components/atoms/chipGroup/__tests__/chipGroup.test.tsx +2 -2
- package/core/components/atoms/chipGroup/_stories_/index.story.tsx +2 -2
- package/core/components/atoms/collapsible/__tests__/__snapshots__/Collapsible.test.tsx.snap +8 -0
- package/core/components/atoms/divider/Divider.tsx +44 -0
- package/core/components/atoms/divider/__stories__/BasicDividerInCard.story.tsx +74 -0
- package/core/components/atoms/divider/__stories__/HeaderDividerInCard.story.tsx +35 -0
- package/core/components/atoms/divider/__stories__/IndentedDivider.story.tsx +49 -0
- package/core/components/atoms/divider/__stories__/Vertical.story.tsx +51 -0
- package/core/components/atoms/divider/__stories__/index.story.tsx +91 -0
- package/core/components/atoms/divider/__stories__/variants/HorizontalDivider.story.tsx +27 -0
- package/core/components/atoms/divider/__tests__/Divider.test.tsx +50 -0
- package/core/components/atoms/divider/__tests__/__snapshots__/Divider.test.tsx.snap +53 -0
- package/core/components/atoms/divider/index.tsx +2 -0
- package/core/components/atoms/dropdown/Dropdown.tsx +18 -17
- package/core/components/atoms/dropdown/DropdownButton.tsx +2 -2
- package/core/components/atoms/dropdown/DropdownList.tsx +18 -7
- package/core/components/atoms/dropdown/Loading.tsx +1 -1
- package/core/components/atoms/dropdown/__stories__/CustomSearchPlaceholder.story.tsx +45 -0
- package/core/components/atoms/dropdown/__stories__/_common_/types.tsx +3 -0
- package/core/components/atoms/dropdown/__stories__/variants/Size.story.tsx +2 -2
- package/core/components/atoms/dropdown/__stories__/variants/controlledDropdown/MultiSelect.story.tsx +28 -18
- package/core/components/atoms/dropdown/__tests__/Dropdown.test.tsx +12 -1
- package/core/components/atoms/dropdown/__tests__/Loading.test.tsx +0 -1
- package/core/components/atoms/dropdown/option/DefaultOption.tsx +3 -0
- package/core/components/atoms/dropdown/option/IconOption.tsx +3 -0
- package/core/components/atoms/dropdown/option/IconWithMetaOption.tsx +3 -0
- package/core/components/atoms/dropdown/option/MetaOption.tsx +3 -0
- package/core/components/atoms/dropdown/option/index.tsx +1 -1
- package/core/components/atoms/editable/Editable.tsx +3 -0
- package/core/components/atoms/heading/Heading.tsx +4 -4
- package/core/components/atoms/heading/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/heading/__tests__/Heading.test.tsx +4 -3
- package/core/components/atoms/icon/Icon.tsx +16 -5
- package/core/components/atoms/icon/__stories__/variants/Image.story.tsx +6 -1
- package/core/components/atoms/icon/__tests__/__snapshots__/Icon.test.tsx.snap +74 -0
- package/core/components/atoms/input/Input.tsx +17 -7
- package/core/components/atoms/input/__stories__/BasicInput.story.tsx +2 -1
- package/core/components/atoms/input/__stories__/InputWithCaption.story.tsx +91 -9
- package/core/components/atoms/input/__stories__/InputWithLabel.story.tsx +11 -3
- package/core/components/atoms/input/__stories__/LabelPosition.story.tsx +46 -4
- package/core/components/atoms/input/__stories__/RequiredVsOptional.story.tsx +12 -8
- package/core/components/atoms/input/__stories__/variants/controlledInput.story.tsx +46 -0
- package/core/components/atoms/input/__stories__/variants/types/BasicInput.story.tsx +2 -2
- package/core/components/atoms/input/__stories__/variants/types/IconLeft.story.tsx +2 -10
- package/core/components/atoms/input/__stories__/variants/types/WithLabel.story.tsx +1 -9
- package/core/components/atoms/input/__tests__/__snapshots__/Input.test.tsx.snap +19 -0
- package/core/components/atoms/label/Label.tsx +1 -1
- package/core/components/atoms/legend/Legend.tsx +5 -2
- package/core/components/atoms/legend/__stories__/variants/labelAppearance.story.tsx +2 -2
- package/core/components/atoms/link/Link.tsx +4 -4
- package/core/components/atoms/message/Message.tsx +12 -12
- package/core/components/atoms/message/__stories__/index.story.tsx +1 -1
- package/core/components/atoms/message/__stories__/variants/Appearance.story.tsx +1 -1
- package/core/components/atoms/message/__stories__/variants/AppearanceTitle.story.tsx +1 -1
- package/core/components/atoms/message/__tests__/Message.test.tsx +1 -6
- package/core/components/atoms/message/__tests__/__snapshots__/Message.test.tsx.snap +0 -45
- package/core/components/atoms/metaList/__tests__/MetaList.test.tsx +2 -2
- package/core/components/atoms/metricInput/MetricInput.tsx +17 -7
- package/core/components/atoms/metricInput/__stories__/DefaultMetric.story.tsx +8 -2
- package/core/components/atoms/metricInput/__stories__/WithPrefix.story.tsx +6 -2
- package/core/components/atoms/metricInput/__stories__/index.story.tsx +1 -0
- package/core/components/atoms/metricInput/__stories__/variants/Controlled.story.tsx +2 -0
- package/core/components/atoms/metricInput/__stories__/variants/Size.story.tsx +2 -2
- package/core/components/atoms/metricInput/__stories__/withSuffix.story.tsx +6 -2
- package/core/components/atoms/metricInput/__tests__/__snapshots__/MetricInput.test.tsx.snap +20 -4
- package/core/components/atoms/multiSlider/Handle.tsx +3 -0
- package/core/components/atoms/multiSlider/SliderUtils.tsx +1 -4
- package/core/components/atoms/multiSlider/index.tsx +9 -4
- package/core/components/atoms/outsideClick/OutsideClick.tsx +1 -2
- package/core/components/atoms/paragraph/Paragraph.tsx +2 -2
- package/core/components/atoms/paragraph/__stories__/variants/Appearance.story.tsx +2 -2
- package/core/components/atoms/paragraph/__tests__/Paragraph.test.tsx +2 -2
- package/core/components/atoms/pills/Pills.tsx +2 -12
- package/core/components/atoms/pills/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/pills/__stories__/variants/Subtle.story.tsx +3 -2
- package/core/components/atoms/pills/__tests__/Pills.test.tsx +3 -2
- package/core/components/atoms/placeholderImage/PlaceholderImage.tsx +2 -2
- package/core/components/atoms/placeholderImage/__stories__/variants/Size.story.tsx +2 -2
- package/core/components/atoms/placeholderParagraph/PlaceholderParagraph.tsx +2 -2
- package/core/components/atoms/placeholderParagraph/__stories__/variants/Size.story.tsx +2 -2
- package/core/components/atoms/popperWrapper/PopperWrapper.tsx +2 -6
- package/core/components/atoms/progressRing/ProgressRing.tsx +2 -2
- package/core/components/atoms/progressRing/__stories__/variants/Size.story.tsx +1 -1
- package/core/components/atoms/radio/Radio.tsx +4 -5
- package/core/components/atoms/rangeSlider/RangeSlider.tsx +1 -2
- package/core/components/atoms/rangeSlider/__stories__/index.story.tsx +1 -2
- package/core/components/atoms/rangeSlider/__stories__/variants/Controlled.story.tsx +1 -2
- package/core/components/atoms/rangeSlider/__stories__/variants/CustomLabels.story.tsx +1 -2
- package/core/components/atoms/spinner/Spinner.tsx +4 -4
- package/core/components/atoms/spinner/__stories__/variants/Appearance.story.tsx +2 -2
- package/core/components/atoms/spinner/__stories__/variants/Size.story.tsx +1 -1
- package/core/components/atoms/statusHint/StatusHint.tsx +5 -3
- package/core/components/atoms/statusHint/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/statusHint/__tests__/StatusHint.test.tsx +3 -2
- package/core/components/atoms/subheading/Subheading.tsx +2 -2
- package/core/components/atoms/subheading/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/subheading/__tests__/Subheading.test.tsx +3 -2
- package/core/components/atoms/switchInput/Switch.tsx +14 -9
- package/core/components/atoms/switchInput/__stories__/DefaultSwitch.story.tsx +4 -1
- package/core/components/atoms/switchInput/__stories__/OffState.story.tsx +4 -1
- package/core/components/atoms/switchInput/__stories__/index.story.tsx +26 -3
- package/core/components/atoms/switchInput/__stories__/variants/Size.story.tsx +10 -1
- package/core/components/atoms/switchInput/__stories__/variants/State.story.tsx +9 -2
- package/core/components/atoms/text/Text.tsx +4 -4
- package/core/components/atoms/text/__stories__/variants/Appearance.story.tsx +2 -2
- package/core/components/atoms/text/__tests__/Text.test.tsx +2 -3
- package/core/components/atoms/textarea/__stories__/TextareaWithCaption.story.tsx +9 -3
- package/core/components/atoms/textarea/__stories__/defaultTextarea.story.tsx +10 -2
- package/core/components/atoms/textarea/__stories__/index.story.tsx +1 -0
- package/core/components/atoms/textarea/__stories__/variants/Disable.story.tsx +1 -0
- package/core/components/atoms/toast/ActionButton.tsx +2 -2
- package/core/components/atoms/toast/Toast.tsx +11 -6
- package/core/components/atoms/toast/__stories__/index.story.tsx +2 -6
- package/core/components/atoms/toast/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/toast/__stories__/variants/ToastMessage.story.tsx +3 -2
- package/core/components/atoms/toast/__stories__/variants/ToastWithAction.story.tsx +3 -2
- package/core/components/atoms/toast/__tests__/Toast.test.tsx +1 -1
- package/core/components/atoms/toast/__tests__/__snapshots__/Toast.test.tsx.snap +24 -125
- package/core/components/css-utilities/Schema.tsx +1 -1
- package/core/components/css-utilities/Spacing/Schema.tsx +1 -1
- package/core/components/molecules/chatMessage/Box.tsx +3 -0
- package/core/components/molecules/chipInput/ChipInput.tsx +3 -0
- package/core/components/molecules/chipInput/__tests__/__snapshots__/ChipInput.test.tsx.snap +14 -2
- package/core/components/molecules/dropzone/Dropzone.tsx +6 -3
- package/core/components/molecules/dropzone/DropzoneBase.tsx +22 -38
- package/core/components/molecules/dropzone/FileSelectorUtils.tsx +1 -1
- package/core/components/molecules/dropzone/__stories__/index.story.tsx +151 -41
- package/core/components/molecules/dropzone/__tests__/Dropzone.test.tsx +2 -2
- package/core/components/molecules/dropzone/utils.tsx +6 -4
- package/core/components/molecules/editableChipInput/EditableChipInput.tsx +9 -5
- package/core/components/molecules/editableChipInput/__stories__/Uncontrolled.story.tsx +1 -1
- package/core/components/molecules/editableChipInput/__tests__/__snapshots__/EditableChipInput.test.tsx.snap +12 -4
- package/core/components/molecules/editableDropdown/EditableDropdown.tsx +2 -2
- package/core/components/molecules/editableInput/EditableInput.tsx +13 -4
- package/core/components/molecules/emptyState/EmptyState.tsx +9 -5
- package/core/components/molecules/emptyState/__stories__/pageNotLoadedWithSVG.story.tsx +26 -26
- package/core/components/molecules/fileList/FileListItem.tsx +3 -2
- package/core/components/molecules/fileUploader/FileUploaderItem.tsx +3 -2
- package/core/components/molecules/fileUploader/FileUploaderStatus.tsx +1 -1
- package/core/components/molecules/fileUploader/__stories__/_common_/types.tsx +3 -0
- package/core/components/molecules/fileUploader/__stories__/index.story.tsx +3 -222
- package/core/components/molecules/fullscreenModal/FullscreenModal.tsx +5 -7
- package/core/components/molecules/inputMask/InputMask.tsx +212 -146
- package/core/components/molecules/inputMask/__stories__/index.story.tsx +24 -0
- package/core/components/molecules/inputMask/__tests__/__snapshots__/InputMask.test.tsx.snap +1 -0
- package/core/components/molecules/modal/Modal.tsx +4 -6
- package/core/components/molecules/modal/__stories__/Confirmation.story.tsx +1 -1
- package/core/components/molecules/pagination/__tests__/__snapshots__/Pagination.test.tsx.snap +5 -1
- package/core/components/molecules/placeholder/Placeholder.tsx +2 -2
- package/core/components/molecules/popover/Popover.tsx +2 -9
- package/core/components/molecules/sidesheet/Sidesheet.tsx +5 -7
- package/core/components/molecules/sidesheet/__stories__/variants/CustomHeader.story.tsx +172 -0
- package/core/components/molecules/stepper/Step.tsx +2 -0
- package/core/components/molecules/tabs/Tabs.tsx +2 -0
- package/core/components/molecules/tabs/TabsWrapper.tsx +2 -0
- package/core/components/molecules/tabs/__stories__/CustomLabels.story.tsx +1 -1
- package/core/components/molecules/tooltip/Tooltip.tsx +4 -4
- package/core/components/molecules/verificationCodeInput/VerificationCodeInput.tsx +8 -4
- package/core/components/molecules/verificationCodeInput/__stories__/index.story.tsx +3 -1
- package/core/components/molecules/verificationCodeInput/__tests__/__snapshots__/VerificationCodeInput.test.tsx.snap +1 -0
- package/core/components/organisms/calendar/Calendar.tsx +130 -8
- package/core/components/organisms/calendar/__stories__/variants/firstDayOfWeek.story.tsx +2 -2
- package/core/components/organisms/calendar/__tests__/Calendar.test.tsx +27 -0
- package/core/components/organisms/calendar/utility.ts +3 -3
- package/core/components/organisms/choiceList/ChoiceList.tsx +12 -12
- package/core/components/organisms/datePicker/DatePicker.tsx +31 -16
- package/core/components/organisms/datePicker/Trigger.tsx +1 -5
- package/core/components/organisms/datePicker/__tests__/__snapshots__/DatePicker.test.tsx.snap +4518 -4479
- package/core/components/organisms/dateRangePicker/DateRangePicker.tsx +9 -10
- package/core/components/organisms/dateRangePicker/SingleInputTrigger.tsx +0 -1
- package/core/components/organisms/dateRangePicker/Trigger.tsx +2 -2
- package/core/components/organisms/dateRangePicker/__stories__/variants/monthsInView.story.tsx +2 -2
- package/core/components/organisms/dateRangePicker/__tests__/__snapshots__/DateRangePicker.test.tsx.snap +112 -40
- package/core/components/organisms/grid/Cell.tsx +23 -19
- package/core/components/organisms/grid/Grid.tsx +3 -4
- package/core/components/organisms/grid/GridBody.tsx +0 -1
- package/core/components/organisms/grid/GridContext.ts +1 -1
- package/core/components/organisms/grid/GridRow.tsx +4 -0
- package/core/components/organisms/grid/__stories__/_common_/editableSchema.tsx +1 -3
- package/core/components/organisms/grid/__stories__/_common_/fetchData.ts +3 -3
- package/core/components/organisms/grid/__stories__/_common_/loaderSchema.ts +0 -2
- package/core/components/organisms/grid/__stories__/_common_/schema.tsx +1 -3
- package/core/components/organisms/grid/__stories__/_common_/simpleLoaderSchema.ts +0 -2
- package/core/components/organisms/grid/__stories__/_common_/statusSchema.ts +0 -2
- package/core/components/organisms/horizontalNav/HorizontalNav.tsx +2 -0
- package/core/components/organisms/inlineMessage/InlineMessage.tsx +5 -7
- package/core/components/organisms/inlineMessage/__tests__/InlineMessage.test.tsx +3 -2
- package/core/components/organisms/inlineMessage/__tests__/__snapshots__/InlineMessage.test.tsx.snap +30 -40
- package/core/components/organisms/list/__stories__/_common_/types.tsx +3 -0
- package/core/components/organisms/list/__stories__/index.story.tsx +0 -16
- package/core/components/organisms/navigation/VerticalNavigation.tsx +4 -0
- package/core/components/organisms/table/Table.tsx +3 -2
- package/core/components/organisms/table/__stories__/CompressedTable.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/DataTable.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/NestedTableWithNestedCard.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/PinnedColumn.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/ResourceTable.story.tsx +4 -3
- package/core/components/organisms/table/__stories__/Selection.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/StandardTable.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/TableAsDescriptionList.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/TableAsOptionList.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/TightStory.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/_common_/types.tsx +3 -0
- package/core/components/organisms/table/__stories__/syncTable.story.tsx +14 -6
- package/core/components/organisms/table/__stories__/variants/showHead.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/showMenu.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/size.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/type.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/withCheckbox.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/withHeader.story.tsx +0 -2
- package/core/components/organisms/table/__stories__/variants/withPagination.story.tsx +2 -2
- package/core/components/organisms/timePicker/TimePicker.tsx +4 -8
- package/core/components/organisms/timePicker/__tests__/__snapshots__/TimePicker.test.tsx.snap +14 -2
- package/core/components/organisms/verticalNav/MenuItem.tsx +2 -0
- package/core/components/organisms/verticalNav/__stories__/schema.tsx +0 -2
- package/core/components/organisms/verticalNav/__tests__/VerticalNav.test.tsx +1 -2
- package/core/components/patterns/datePicker/datePickerWithPresets.story.tsx +126 -0
- package/core/components/patterns/dateRangePicker/withCustomPopover.story.tsx +8 -8
- package/core/components/patterns/forms/CreatePassword.story.tsx +1 -1
- package/core/components/patterns/forms/VerificationCodeInput.story.tsx +2 -2
- package/core/components/patterns/table/Table with Header/tableWithHeader.story.jsx +7 -7
- package/core/global.d.ts +9 -0
- package/core/index.tsx +2 -1
- package/core/index.type.tsx +1 -0
- package/core/utils/Keys.ts +4 -0
- package/core/utils/__tests__/__snapshots__/TS.test.tsx.snap +562 -541
- package/core/utils/docPage/generateImports.tsx +2 -3
- package/core/utils/docPage/index.tsx +52 -37
- package/core/utils/docPage/sandbox.tsx +14 -7
- package/core/utils/overlayHelper.ts +7 -3
- package/core/utils/testHelper.ts +2 -2
- package/core/utils/types.tsx +1 -1
- package/core/utils/validators.ts +37 -34
- package/css/dist/index.css +1550 -1415
- package/css/dist/index.css.map +1 -1
- package/css/src/components/Legend.css +7 -7
- package/css/src/components/ProgressBar.css +1 -1
- package/css/src/components/avatarGroup.css +1 -1
- package/css/src/components/backdrop.css +12 -6
- package/css/src/components/badge.css +52 -52
- package/css/src/components/button.css +95 -94
- package/css/src/components/calendar.css +137 -126
- package/css/src/components/card.css +0 -1
- package/css/src/components/cardSubdued.css +3 -5
- package/css/src/components/chat.css +1 -1
- package/css/src/components/checkbox.css +71 -70
- package/css/src/components/chip.css +20 -17
- package/css/src/components/chipGroup.css +5 -5
- package/css/src/components/chipInput.css +1 -1
- package/css/src/components/choiceList.css +4 -4
- package/css/src/components/dateRangePicker.css +13 -13
- package/css/src/components/divider.css +20 -0
- package/css/src/components/dropdown.css +61 -61
- package/css/src/components/dropdownButton.css +36 -36
- package/css/src/components/dropzone.css +16 -20
- package/css/src/components/editableChipInput.css +10 -9
- package/css/src/components/editableDropdown.css +1 -1
- package/css/src/components/editableInput.css +1 -1
- package/css/src/components/emptyState.css +15 -15
- package/css/src/components/fileList.css +44 -45
- package/css/src/components/fullscreenModal.css +4 -3
- package/css/src/components/grid.css +217 -199
- package/css/src/components/horizontalNav.css +0 -1
- package/css/src/components/icon.css +1 -7
- package/css/src/components/inlineMessage.css +2 -1
- package/css/src/components/input.css +62 -62
- package/css/src/components/link.css +1 -1
- package/css/src/components/list.css +10 -10
- package/css/src/components/message.css +64 -70
- package/css/src/components/metaList.css +26 -26
- package/css/src/components/metricInput.css +3 -4
- package/css/src/components/modal.css +1 -1
- package/css/src/components/navigation.css +3 -3
- package/css/src/components/pageHeader.css +1 -2
- package/css/src/components/pagination.css +36 -36
- package/css/src/components/pills.css +19 -19
- package/css/src/components/placeholder.css +10 -5
- package/css/src/components/popover.css +2 -2
- package/css/src/components/progressRing.css +1 -1
- package/css/src/components/radio.css +74 -74
- package/css/src/components/slider.css +5 -5
- package/css/src/components/statusHints.css +15 -15
- package/css/src/components/switch.css +66 -41
- package/css/src/components/table.css +15 -15
- package/css/src/components/tabs.css +53 -53
- package/css/src/components/textarea.css +1 -1
- package/css/src/components/toast.css +51 -56
- package/css/src/components/verificationCodeInput.css +5 -6
- package/css/src/components/verticalNav.css +1 -2
- package/css/src/core/base.css +3 -0
- package/css/src/core/typography.css +1 -1
- package/css/src/core/utilities.css +1 -1
- package/css/src/tokens/index.css +63 -63
- package/css/src/utils/align.css +1 -1
- package/css/src/utils/background.css +1 -1
- package/css/src/utils/cursor.css +1 -1
- package/css/src/utils/display.css +1 -1
- package/css/src/utils/flex.css +1 -1
- package/css/src/utils/grid.css +1 -1
- package/css/src/utils/overflow.css +1 -1
- package/css/src/utils/position.css +1 -1
- package/css/src/utils/spacing.css +1 -1
- package/css/src/utils/utility.css +13 -13
- package/css/src/variables/index.css +6 -3
- package/dist/core/accessibility/utils/index.d.ts +4 -0
- package/dist/core/accessibility/utils/isEnterKey.d.ts +3 -0
- package/dist/core/accessibility/utils/isSpaceKey.d.ts +3 -0
- package/dist/core/accessibility/utils/useAccessibilityProps.d.ts +18 -0
- package/dist/core/common.type.d.ts +12 -0
- package/dist/core/components/atoms/avatar/Avatar.d.ts +4 -4
- package/dist/core/components/atoms/avatarGroup/AvatarGroup.d.ts +2 -3
- package/dist/core/components/atoms/badge/Badge.d.ts +2 -2
- package/dist/core/components/atoms/button/Button.d.ts +6 -6
- package/dist/core/components/atoms/checkbox/Checkbox.d.ts +3 -3
- package/dist/core/components/atoms/chip/Chip.d.ts +2 -2
- package/dist/core/components/atoms/divider/Divider.d.ts +15 -0
- package/dist/core/components/atoms/divider/index.d.ts +2 -0
- package/dist/core/components/atoms/dropdown/Dropdown.d.ts +18 -17
- package/dist/core/components/atoms/dropdown/DropdownButton.d.ts +2 -2
- package/dist/core/components/atoms/dropdown/DropdownList.d.ts +4 -3
- package/dist/core/components/atoms/dropdown/option/index.d.ts +1 -1
- package/dist/core/components/atoms/heading/Heading.d.ts +4 -4
- package/dist/core/components/atoms/icon/Icon.d.ts +5 -3
- package/dist/core/components/atoms/input/Input.d.ts +4 -4
- package/dist/core/components/atoms/legend/Legend.d.ts +2 -2
- package/dist/core/components/atoms/link/Link.d.ts +4 -4
- package/dist/core/components/atoms/message/Message.d.ts +2 -2
- package/dist/core/components/atoms/metricInput/MetricInput.d.ts +3 -3
- package/dist/core/components/atoms/multiSlider/SliderUtils.d.ts +1 -1
- package/dist/core/components/atoms/multiSlider/index.d.ts +3 -3
- package/dist/core/components/atoms/paragraph/Paragraph.d.ts +2 -2
- package/dist/core/components/atoms/pills/Pills.d.ts +2 -2
- package/dist/core/components/atoms/placeholderImage/PlaceholderImage.d.ts +2 -2
- package/dist/core/components/atoms/placeholderParagraph/PlaceholderParagraph.d.ts +2 -2
- package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +51 -51
- package/dist/core/components/atoms/progressRing/ProgressRing.d.ts +2 -2
- package/dist/core/components/atoms/radio/Radio.d.ts +4 -4
- package/dist/core/components/atoms/rangeSlider/RangeSlider.d.ts +1 -1
- package/dist/core/components/atoms/spinner/Spinner.d.ts +4 -4
- package/dist/core/components/atoms/statusHint/StatusHint.d.ts +2 -2
- package/dist/core/components/atoms/subheading/Subheading.d.ts +2 -2
- package/dist/core/components/atoms/switchInput/Switch.d.ts +7 -6
- package/dist/core/components/atoms/text/Text.d.ts +4 -4
- package/dist/core/components/atoms/toast/ActionButton.d.ts +2 -2
- package/dist/core/components/atoms/toast/Toast.d.ts +2 -2
- package/dist/core/components/molecules/dropzone/Dropzone.d.ts +3 -3
- package/dist/core/components/molecules/dropzone/DropzoneBase.d.ts +1 -1
- package/dist/core/components/molecules/dropzone/utils.d.ts +5 -3
- package/dist/core/components/molecules/emptyState/EmptyState.d.ts +4 -4
- package/dist/core/components/molecules/fileList/FileListItem.d.ts +1 -1
- package/dist/core/components/molecules/fileUploader/FileUploaderItem.d.ts +1 -1
- package/dist/core/components/molecules/fileUploader/FileUploaderStatus.d.ts +1 -1
- package/dist/core/components/molecules/fullscreenModal/FullscreenModal.d.ts +4 -7
- package/dist/core/components/molecules/inputMask/InputMask.d.ts +10 -2
- package/dist/core/components/molecules/modal/Modal.d.ts +3 -6
- package/dist/core/components/molecules/placeholder/Placeholder.d.ts +2 -2
- package/dist/core/components/molecules/popover/Popover.d.ts +0 -1
- package/dist/core/components/molecules/sidesheet/Sidesheet.d.ts +3 -6
- package/dist/core/components/molecules/tooltip/Tooltip.d.ts +3 -3
- package/dist/core/components/organisms/calendar/Calendar.d.ts +31 -0
- package/dist/core/components/organisms/choiceList/ChoiceList.d.ts +5 -6
- package/dist/core/components/organisms/datePicker/DatePicker.d.ts +2 -0
- package/dist/core/components/organisms/dateRangePicker/DateRangePicker.d.ts +24 -0
- package/dist/core/components/organisms/grid/Cell.d.ts +1 -1
- package/dist/core/components/organisms/grid/Grid.d.ts +3 -3
- package/dist/core/components/organisms/grid/GridContext.d.ts +1 -1
- package/dist/core/components/organisms/inlineMessage/InlineMessage.d.ts +2 -2
- package/dist/core/components/organisms/table/Table.d.ts +2 -2
- package/dist/core/components/patterns/datePicker/datePickerWithPresets.story.d.ts +15 -0
- package/dist/core/components/patterns/dateRangePicker/withCustomPopover.story.d.ts +5 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.type.d.ts +1 -0
- package/dist/core/utils/docPage/generateImports.d.ts +1 -1
- package/dist/core/utils/overlayHelper.d.ts +1 -1
- package/dist/core/utils/types.d.ts +1 -1
- package/dist/index.esm.js +1039 -729
- package/dist/index.js +532 -371
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.br +0 -0
- package/dist/index.umd.js.gz +0 -0
- package/dts.config.js +11 -2
- package/package.json +32 -27
- package/tsconfig.json +3 -16
- package/tsconfig.type.json +2 -1
- package/types/index.d.ts +2217 -0
- package/types/{innovaccer-design-system/tsconfig.json → tsconfig.json} +1 -1
- package/types/{innovaccer-design-system/tslint.json → tslint.json} +0 -0
- package/types/types-tests.tsx +936 -0
- package/.husky/prepare-commit-msg +0 -6
- package/core/components/atoms/button/__stories__/variants/state/Success.story.tsx +0 -99
- package/core/components/atoms/message/__stories__/default.story.tsx +0 -16
- package/core/components/atoms/toast/__stories__/DefaultToast.story.tsx +0 -16
- package/core/components/molecules/dropzone/__stories__/variants/DropzoneWithFileList.story.tsx +0 -176
- package/core/components/molecules/fileUploader/__stories__/variants/FileUploaderList.story.tsx +0 -80
- package/tslint.json +0 -30
- package/types/innovaccer-design-system/index.d.ts +0 -39
- package/types/innovaccer-design-system/innovaccer-design-system-tests.ts +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
|
-
* Generated on:
|
|
3
|
+
* Generated on: 1639051084574
|
|
4
4
|
* Package: @innovaccer/design-system
|
|
5
|
-
* Version: v2.
|
|
5
|
+
* Version: v2.7.0-0
|
|
6
6
|
* License: MIT
|
|
7
7
|
* Docs: https://innovaccer.github.io/design-system
|
|
8
8
|
*/
|
|
@@ -569,46 +569,80 @@ var date$1 = function date(val, format) {
|
|
|
569
569
|
|
|
570
570
|
switch (format) {
|
|
571
571
|
case 'dd/mm/yyyy':
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
572
|
+
{
|
|
573
|
+
var p = val.split('/');
|
|
574
|
+
|
|
575
|
+
var _date = +p[0] || 1;
|
|
576
|
+
|
|
577
|
+
var month = +p[1] || 1;
|
|
578
|
+
var year = +p[2] || 1900;
|
|
579
|
+
return validate(_date, month, year);
|
|
580
|
+
}
|
|
577
581
|
|
|
578
582
|
case 'mm/dd/yyyy':
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
583
|
+
{
|
|
584
|
+
var _p = val.split('/');
|
|
585
|
+
|
|
586
|
+
var _date2 = +_p[1] || 1;
|
|
587
|
+
|
|
588
|
+
var _month = +_p[0] || 1;
|
|
589
|
+
|
|
590
|
+
var _year = +_p[2] || 1900;
|
|
591
|
+
|
|
592
|
+
return validate(_date2, _month, _year);
|
|
593
|
+
}
|
|
584
594
|
|
|
585
595
|
case 'yyyy/mm/dd':
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
596
|
+
{
|
|
597
|
+
var _p2 = val.split('/');
|
|
598
|
+
|
|
599
|
+
var _date3 = +_p2[2] || 1;
|
|
600
|
+
|
|
601
|
+
var _month2 = +_p2[1] || 1;
|
|
602
|
+
|
|
603
|
+
var _year2 = +_p2[0] || 1900;
|
|
604
|
+
|
|
605
|
+
return validate(_date3, _month2, _year2);
|
|
606
|
+
}
|
|
591
607
|
|
|
592
608
|
case 'dd-mm-yyyy':
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
609
|
+
{
|
|
610
|
+
var _p3 = val.split('-');
|
|
611
|
+
|
|
612
|
+
var _date4 = +_p3[0] || 1;
|
|
613
|
+
|
|
614
|
+
var _month3 = +_p3[1] || 1;
|
|
615
|
+
|
|
616
|
+
var _year3 = +_p3[2] || 1900;
|
|
617
|
+
|
|
618
|
+
return validate(_date4, _month3, _year3);
|
|
619
|
+
}
|
|
598
620
|
|
|
599
621
|
case 'mm-dd-yyyy':
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
622
|
+
{
|
|
623
|
+
var _p4 = val.split('-');
|
|
624
|
+
|
|
625
|
+
var _date5 = +_p4[1] || 1;
|
|
626
|
+
|
|
627
|
+
var _month4 = +_p4[0] || 1;
|
|
628
|
+
|
|
629
|
+
var _year4 = +_p4[2] || 1900;
|
|
630
|
+
|
|
631
|
+
return validate(_date5, _month4, _year4);
|
|
632
|
+
}
|
|
605
633
|
|
|
606
634
|
case 'yyyy-mm-dd':
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
635
|
+
{
|
|
636
|
+
var _p5 = val.split('-');
|
|
637
|
+
|
|
638
|
+
var _date6 = +_p5[2] || 1;
|
|
639
|
+
|
|
640
|
+
var _month5 = +_p5[1] || 1;
|
|
641
|
+
|
|
642
|
+
var _year5 = +_p5[0] || 1900;
|
|
643
|
+
|
|
644
|
+
return validate(_date6, _month5, _year5);
|
|
645
|
+
}
|
|
612
646
|
|
|
613
647
|
default:
|
|
614
648
|
return false;
|
|
@@ -1216,7 +1250,7 @@ var getSelectAll$1 = function getSelectAll(selected, optionsLength, disabledOpti
|
|
|
1216
1250
|
};
|
|
1217
1251
|
};
|
|
1218
1252
|
|
|
1219
|
-
var _excluded$
|
|
1253
|
+
var _excluded$A = ["triggerSize", "placeholder", "menu", "children", "icon", "disabled", "open", "inlineLabel", "error"];
|
|
1220
1254
|
var DropdownButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
1221
1255
|
var _classNames, _classNames2;
|
|
1222
1256
|
|
|
@@ -1232,7 +1266,7 @@ var DropdownButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
1232
1266
|
open = props.open,
|
|
1233
1267
|
inlineLabel = props.inlineLabel,
|
|
1234
1268
|
error = props.error,
|
|
1235
|
-
rest = _objectWithoutProperties$1(props, _excluded$
|
|
1269
|
+
rest = _objectWithoutProperties$1(props, _excluded$A);
|
|
1236
1270
|
|
|
1237
1271
|
var buttonDisabled = disabled ? 'disabled' : 'default';
|
|
1238
1272
|
var trimmedPlaceholder = placeholder.trim();
|
|
@@ -1266,21 +1300,21 @@ var DropdownButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
1266
1300
|
});
|
|
1267
1301
|
DropdownButton.displayName = 'DropdownButton';
|
|
1268
1302
|
|
|
1269
|
-
var _excluded$
|
|
1303
|
+
var _excluded$z = ["children", "componentType", "className"];
|
|
1270
1304
|
|
|
1271
1305
|
var GenericText = function GenericText(_ref) {
|
|
1272
1306
|
var children = _ref.children,
|
|
1273
1307
|
_ref$componentType = _ref.componentType,
|
|
1274
1308
|
componentType = _ref$componentType === void 0 ? 'span' : _ref$componentType,
|
|
1275
1309
|
className = _ref.className,
|
|
1276
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
1310
|
+
props = _objectWithoutProperties$1(_ref, _excluded$z);
|
|
1277
1311
|
|
|
1278
1312
|
return /*#__PURE__*/React.createElement(componentType, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1279
1313
|
className: className
|
|
1280
1314
|
}), children);
|
|
1281
1315
|
};
|
|
1282
1316
|
|
|
1283
|
-
var _excluded$
|
|
1317
|
+
var _excluded$y = ["appearance", "size", "children", "weight", "small", "className"];
|
|
1284
1318
|
var Text = function Text(props) {
|
|
1285
1319
|
var _classNames;
|
|
1286
1320
|
|
|
@@ -1290,7 +1324,7 @@ var Text = function Text(props) {
|
|
|
1290
1324
|
weight = props.weight,
|
|
1291
1325
|
small = props.small,
|
|
1292
1326
|
className = props.className,
|
|
1293
|
-
rest = _objectWithoutProperties$1(props, _excluded$
|
|
1327
|
+
rest = _objectWithoutProperties$1(props, _excluded$y);
|
|
1294
1328
|
|
|
1295
1329
|
var classes = classnames((_classNames = {
|
|
1296
1330
|
Text: true
|
|
@@ -1308,6 +1342,44 @@ Text.defaultProps = {
|
|
|
1308
1342
|
size: 'regular'
|
|
1309
1343
|
};
|
|
1310
1344
|
|
|
1345
|
+
var isEnterKey = function isEnterKey(e) {
|
|
1346
|
+
return e.key === 'Enter';
|
|
1347
|
+
};
|
|
1348
|
+
|
|
1349
|
+
var isSpaceKey = function isSpaceKey(e) {
|
|
1350
|
+
return e.key === 'Space';
|
|
1351
|
+
};
|
|
1352
|
+
|
|
1353
|
+
var _excluded$x = ["onClick", "onKeyDown", "role"];
|
|
1354
|
+
|
|
1355
|
+
var useAccessibilityProps = function useAccessibilityProps(_ref) {
|
|
1356
|
+
var onClick = _ref.onClick,
|
|
1357
|
+
_onKeyDown = _ref.onKeyDown,
|
|
1358
|
+
role = _ref.role,
|
|
1359
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$x);
|
|
1360
|
+
|
|
1361
|
+
return _objectSpread2({}, onClick ? {
|
|
1362
|
+
onClick: onClick,
|
|
1363
|
+
role: role || 'button',
|
|
1364
|
+
tabIndex: 0,
|
|
1365
|
+
'aria-label': rest['aria-label'],
|
|
1366
|
+
onKeyDown: function onKeyDown(e) {
|
|
1367
|
+
if (_onKeyDown) {
|
|
1368
|
+
_onKeyDown(e);
|
|
1369
|
+
|
|
1370
|
+
return;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
if (isEnterKey(e) && onClick) {
|
|
1374
|
+
onClick(e);
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
} : {
|
|
1378
|
+
role: role,
|
|
1379
|
+
'aria-label': rest['aria-label']
|
|
1380
|
+
});
|
|
1381
|
+
};
|
|
1382
|
+
|
|
1311
1383
|
var Icon = function Icon(props) {
|
|
1312
1384
|
var _classNames;
|
|
1313
1385
|
|
|
@@ -1315,8 +1387,8 @@ var Icon = function Icon(props) {
|
|
|
1315
1387
|
className = props.className,
|
|
1316
1388
|
name = props.name,
|
|
1317
1389
|
size = props.size,
|
|
1318
|
-
onClick = props.onClick,
|
|
1319
1390
|
children = props.children;
|
|
1391
|
+
var accessibilityProps = useAccessibilityProps(props);
|
|
1320
1392
|
var baseProps = extractBaseProps(props);
|
|
1321
1393
|
|
|
1322
1394
|
var mapper = function mapper(val) {
|
|
@@ -1347,9 +1419,8 @@ var Icon = function Icon(props) {
|
|
|
1347
1419
|
|
|
1348
1420
|
return /*#__PURE__*/React.createElement("i", _extends$3({}, baseProps, {
|
|
1349
1421
|
className: iconClass,
|
|
1350
|
-
style: styles
|
|
1351
|
-
|
|
1352
|
-
}), type ? "".concat(name, "_").concat(type) : name);
|
|
1422
|
+
style: styles
|
|
1423
|
+
}, accessibilityProps), type ? "".concat(name, "_").concat(type) : name);
|
|
1353
1424
|
};
|
|
1354
1425
|
Icon.displayName = 'Icon';
|
|
1355
1426
|
Icon.defaultProps = {
|
|
@@ -1389,9 +1460,9 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
|
|
|
1389
1460
|
onChange = props.onChange,
|
|
1390
1461
|
name = props.name,
|
|
1391
1462
|
value = props.value,
|
|
1392
|
-
className = props.className
|
|
1393
|
-
props.checked
|
|
1394
|
-
|
|
1463
|
+
className = props.className,
|
|
1464
|
+
checkedProp = props.checked,
|
|
1465
|
+
helpText = props.helpText,
|
|
1395
1466
|
rest = _objectWithoutProperties$1(props, _excluded$w);
|
|
1396
1467
|
|
|
1397
1468
|
var ref = React.useRef(null);
|
|
@@ -1399,7 +1470,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
|
|
|
1399
1470
|
return ref.current;
|
|
1400
1471
|
});
|
|
1401
1472
|
|
|
1402
|
-
var _React$useState = React.useState(
|
|
1473
|
+
var _React$useState = React.useState(checkedProp === undefined ? defaultChecked : checkedProp),
|
|
1403
1474
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1404
1475
|
checked = _React$useState2[0],
|
|
1405
1476
|
setChecked = _React$useState2[1];
|
|
@@ -1408,10 +1479,10 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
|
|
|
1408
1479
|
setIndeterminate(indeterminate);
|
|
1409
1480
|
}, [indeterminate]);
|
|
1410
1481
|
React.useEffect(function () {
|
|
1411
|
-
if (
|
|
1412
|
-
setChecked(
|
|
1482
|
+
if (checkedProp !== undefined) {
|
|
1483
|
+
setChecked(checkedProp);
|
|
1413
1484
|
}
|
|
1414
|
-
}, [
|
|
1485
|
+
}, [checkedProp]);
|
|
1415
1486
|
var CheckboxClass = classnames((_classNames = {}, _defineProperty$2(_classNames, 'Checkbox', true), _defineProperty$2(_classNames, 'Checkbox--disabled', disabled), _classNames), className);
|
|
1416
1487
|
var CheckboxOuterWrapper = classnames((_classNames2 = {}, _defineProperty$2(_classNames2, 'Checkbox-outerWrapper', true), _defineProperty$2(_classNames2, "Checkbox-outerWrapper--".concat(size), size), _classNames2));
|
|
1417
1488
|
var CheckboxInputWrapper = classnames((_classNames3 = {}, _defineProperty$2(_classNames3, 'Checkbox-input', true), _defineProperty$2(_classNames3, 'Checkbox-input--checked', checked), _defineProperty$2(_classNames3, 'Checkbox-input--indeterminate', props.indeterminate), _classNames3));
|
|
@@ -1423,7 +1494,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
|
|
|
1423
1494
|
};
|
|
1424
1495
|
|
|
1425
1496
|
var onChangeHandler = function onChangeHandler(e) {
|
|
1426
|
-
if (
|
|
1497
|
+
if (checkedProp === undefined) {
|
|
1427
1498
|
setChecked(e.target.checked);
|
|
1428
1499
|
setIndeterminate(e.target.indeterminate);
|
|
1429
1500
|
}
|
|
@@ -1512,18 +1583,24 @@ var DefaultOption = function DefaultOption(props) {
|
|
|
1512
1583
|
dataTest = props.dataTest;
|
|
1513
1584
|
var label = optionData.label,
|
|
1514
1585
|
disabled = optionData.disabled;
|
|
1515
|
-
return
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
"
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1586
|
+
return (
|
|
1587
|
+
/*#__PURE__*/
|
|
1588
|
+
// TODO(a11y): fix accessibility
|
|
1589
|
+
|
|
1590
|
+
/* eslint-disable */
|
|
1591
|
+
React.createElement("div", {
|
|
1592
|
+
className: className,
|
|
1593
|
+
onClick: onClickHandler,
|
|
1594
|
+
onMouseEnter: onUpdateActiveOption,
|
|
1595
|
+
"data-test": dataTest,
|
|
1596
|
+
"data-disabled": disabled
|
|
1597
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1598
|
+
className: 'Option-label'
|
|
1599
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
1600
|
+
className: textClassName,
|
|
1601
|
+
appearance: appearance
|
|
1602
|
+
}, label)))
|
|
1603
|
+
);
|
|
1527
1604
|
};
|
|
1528
1605
|
|
|
1529
1606
|
var MetaOption = function MetaOption(props) {
|
|
@@ -1538,18 +1615,24 @@ var MetaOption = function MetaOption(props) {
|
|
|
1538
1615
|
var subInfo = optionData.subInfo,
|
|
1539
1616
|
label = optionData.label,
|
|
1540
1617
|
disabled = optionData.disabled;
|
|
1541
|
-
return
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
"
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1618
|
+
return (
|
|
1619
|
+
/*#__PURE__*/
|
|
1620
|
+
// TODO(a11y): fix accessibility
|
|
1621
|
+
|
|
1622
|
+
/* eslint-disable */
|
|
1623
|
+
React.createElement("div", {
|
|
1624
|
+
className: className,
|
|
1625
|
+
onClick: onClickHandler,
|
|
1626
|
+
onMouseEnter: onUpdateActiveOption,
|
|
1627
|
+
"data-test": dataTest,
|
|
1628
|
+
"data-disabled": disabled
|
|
1629
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1630
|
+
className: 'Option-label'
|
|
1631
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
1632
|
+
className: textClassName,
|
|
1633
|
+
appearance: appearance
|
|
1634
|
+
}, label), subInfo && renderSubInfo(subInfo)))
|
|
1635
|
+
);
|
|
1553
1636
|
};
|
|
1554
1637
|
|
|
1555
1638
|
var IconOption = function IconOption(props) {
|
|
@@ -1566,23 +1649,29 @@ var IconOption = function IconOption(props) {
|
|
|
1566
1649
|
icon = optionData.icon,
|
|
1567
1650
|
disabled = optionData.disabled;
|
|
1568
1651
|
var OptionClass = classnames((_classNames = {}, _defineProperty$2(_classNames, "".concat(className), true), _defineProperty$2(_classNames, 'Option--icon', icon), _classNames));
|
|
1569
|
-
return
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
"
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1652
|
+
return (
|
|
1653
|
+
/*#__PURE__*/
|
|
1654
|
+
// TODO(a11y): fix accessibility
|
|
1655
|
+
|
|
1656
|
+
/* eslint-disable */
|
|
1657
|
+
React.createElement("div", {
|
|
1658
|
+
className: OptionClass,
|
|
1659
|
+
onClick: onClickHandler,
|
|
1660
|
+
onMouseEnter: onUpdateActiveOption,
|
|
1661
|
+
"data-test": dataTest,
|
|
1662
|
+
"data-disabled": disabled
|
|
1663
|
+
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
1664
|
+
className: "Option-icon mr-4",
|
|
1665
|
+
"data-test": "".concat(dataTest, "--Icon"),
|
|
1666
|
+
name: icon,
|
|
1667
|
+
appearance: appearance
|
|
1668
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1669
|
+
className: 'Option-label'
|
|
1670
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
1671
|
+
className: textClassName,
|
|
1672
|
+
appearance: appearance
|
|
1673
|
+
}, label)))
|
|
1674
|
+
);
|
|
1586
1675
|
};
|
|
1587
1676
|
|
|
1588
1677
|
var IconWithMetaOption = function IconWithMetaOption(props) {
|
|
@@ -1601,23 +1690,29 @@ var IconWithMetaOption = function IconWithMetaOption(props) {
|
|
|
1601
1690
|
icon = optionData.icon,
|
|
1602
1691
|
disabled = optionData.disabled;
|
|
1603
1692
|
var OptionClass = classnames((_classNames = {}, _defineProperty$2(_classNames, "".concat(className), true), _defineProperty$2(_classNames, 'Option--icon', icon), _classNames));
|
|
1604
|
-
return
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
"
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1693
|
+
return (
|
|
1694
|
+
/*#__PURE__*/
|
|
1695
|
+
// TODO(a11y): fix accessibility
|
|
1696
|
+
|
|
1697
|
+
/* eslint-disable */
|
|
1698
|
+
React.createElement("div", {
|
|
1699
|
+
className: OptionClass,
|
|
1700
|
+
onClick: onClickHandler,
|
|
1701
|
+
onMouseEnter: onUpdateActiveOption,
|
|
1702
|
+
"data-test": dataTest,
|
|
1703
|
+
"data-disabled": disabled
|
|
1704
|
+
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
1705
|
+
"data-test": "".concat(dataTest, "--Icon"),
|
|
1706
|
+
className: "Option-icon mr-4",
|
|
1707
|
+
name: icon,
|
|
1708
|
+
appearance: appearance
|
|
1709
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1710
|
+
className: 'Option-label'
|
|
1711
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
1712
|
+
className: textClassName,
|
|
1713
|
+
appearance: appearance
|
|
1714
|
+
}, label), subInfo && renderSubInfo(subInfo)))
|
|
1715
|
+
);
|
|
1621
1716
|
};
|
|
1622
1717
|
|
|
1623
1718
|
var _OptionTypeMapping;
|
|
@@ -1803,51 +1898,51 @@ var Loading = function Loading(props) {
|
|
|
1803
1898
|
|
|
1804
1899
|
switch (loadingType) {
|
|
1805
1900
|
case 'DEFAULT':
|
|
1806
|
-
return /*#__PURE__*/
|
|
1901
|
+
return /*#__PURE__*/React.createElement(PlaceholderParagraph, {
|
|
1807
1902
|
length: 'large',
|
|
1808
1903
|
"data-test": "DesignSystem-Dropdown--PlaceholderParagraph"
|
|
1809
1904
|
});
|
|
1810
1905
|
|
|
1811
1906
|
case 'WITH_ICON':
|
|
1812
|
-
return /*#__PURE__*/
|
|
1907
|
+
return /*#__PURE__*/React.createElement(Placeholder, {
|
|
1813
1908
|
withImage: true,
|
|
1814
1909
|
round: true,
|
|
1815
1910
|
"data-test": "DesignSystem-Dropdown--Placeholder"
|
|
1816
|
-
}, /*#__PURE__*/
|
|
1911
|
+
}, /*#__PURE__*/React.createElement(PlaceholderParagraph, {
|
|
1817
1912
|
length: "large"
|
|
1818
1913
|
}));
|
|
1819
1914
|
|
|
1820
1915
|
case 'WITH_META':
|
|
1821
|
-
return /*#__PURE__*/
|
|
1916
|
+
return /*#__PURE__*/React.createElement(Placeholder, {
|
|
1822
1917
|
withImage: false,
|
|
1823
1918
|
"data-test": "DesignSystem-Dropdown--Placeholder"
|
|
1824
|
-
}, /*#__PURE__*/
|
|
1919
|
+
}, /*#__PURE__*/React.createElement(PlaceholderParagraph, {
|
|
1825
1920
|
length: "large",
|
|
1826
1921
|
"data-test": "DesignSystem-Dropdown--PlaceholderParagraph"
|
|
1827
|
-
}), /*#__PURE__*/
|
|
1922
|
+
}), /*#__PURE__*/React.createElement(PlaceholderParagraph, {
|
|
1828
1923
|
length: "medium",
|
|
1829
1924
|
size: "xxs",
|
|
1830
1925
|
"data-test": "DesignSystem-Dropdown--PlaceholderParagraph"
|
|
1831
1926
|
}));
|
|
1832
1927
|
|
|
1833
1928
|
case 'WITH_CHECKBOX':
|
|
1834
|
-
return /*#__PURE__*/
|
|
1929
|
+
return /*#__PURE__*/React.createElement(Placeholder, {
|
|
1835
1930
|
withImage: true,
|
|
1836
1931
|
"data-test": "DesignSystem-Dropdown--Placeholder"
|
|
1837
|
-
}, /*#__PURE__*/
|
|
1932
|
+
}, /*#__PURE__*/React.createElement(PlaceholderParagraph, {
|
|
1838
1933
|
length: "large"
|
|
1839
1934
|
}));
|
|
1840
1935
|
|
|
1841
1936
|
case 'ICON_WITH_META':
|
|
1842
|
-
return /*#__PURE__*/
|
|
1937
|
+
return /*#__PURE__*/React.createElement(Placeholder, {
|
|
1843
1938
|
withImage: true,
|
|
1844
1939
|
round: true,
|
|
1845
1940
|
imageSize: 'medium',
|
|
1846
1941
|
"data-test": "DesignSystem-Dropdown--Placeholder"
|
|
1847
|
-
}, /*#__PURE__*/
|
|
1942
|
+
}, /*#__PURE__*/React.createElement(PlaceholderParagraph, {
|
|
1848
1943
|
length: "large",
|
|
1849
1944
|
"data-test": "DesignSystem-Dropdown--PlaceholderParagraph"
|
|
1850
|
-
}), /*#__PURE__*/
|
|
1945
|
+
}), /*#__PURE__*/React.createElement(PlaceholderParagraph, {
|
|
1851
1946
|
length: "medium",
|
|
1852
1947
|
size: "xxs",
|
|
1853
1948
|
"data-test": "DesignSystem-Dropdown--PlaceholderParagraph"
|
|
@@ -1900,7 +1995,9 @@ var DropdownList = function DropdownList(props) {
|
|
|
1900
1995
|
applyOptions = props.applyOptions,
|
|
1901
1996
|
cancelOptions = props.cancelOptions,
|
|
1902
1997
|
toggleDropdown = props.toggleDropdown,
|
|
1903
|
-
className = props.className
|
|
1998
|
+
className = props.className,
|
|
1999
|
+
_props$searchPlacehol = props.searchPlaceholder,
|
|
2000
|
+
searchPlaceholder = _props$searchPlacehol === void 0 ? 'Search..' : _props$searchPlacehol;
|
|
1904
2001
|
var baseProps = extractBaseProps(props);
|
|
1905
2002
|
var dropdownRef = /*#__PURE__*/React.createRef();
|
|
1906
2003
|
var triggerRef = /*#__PURE__*/React.createRef();
|
|
@@ -2088,7 +2185,9 @@ var DropdownList = function DropdownList(props) {
|
|
|
2088
2185
|
name: "Dropdown-search",
|
|
2089
2186
|
icon: 'search',
|
|
2090
2187
|
value: searchTerm,
|
|
2091
|
-
placeholder:
|
|
2188
|
+
placeholder: searchPlaceholder // TODO(a11y): research more on this.
|
|
2189
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
2190
|
+
,
|
|
2092
2191
|
autoFocus: true,
|
|
2093
2192
|
onChange: searchHandler,
|
|
2094
2193
|
onClear: searchClearHandler,
|
|
@@ -2119,7 +2218,7 @@ var DropdownList = function DropdownList(props) {
|
|
|
2119
2218
|
var label = selectAllLabel.trim() ? selectAllLabel.trim() : 'Select All';
|
|
2120
2219
|
return /*#__PURE__*/React.createElement("div", {
|
|
2121
2220
|
className: SelectAllClass,
|
|
2122
|
-
onMouseEnter: function onMouseEnter(
|
|
2221
|
+
onMouseEnter: function onMouseEnter() {
|
|
2123
2222
|
return updateActiveOption(0, true);
|
|
2124
2223
|
}
|
|
2125
2224
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
@@ -2237,8 +2336,6 @@ var DropdownList = function DropdownList(props) {
|
|
|
2237
2336
|
};
|
|
2238
2337
|
|
|
2239
2338
|
var onkeydown = function onkeydown(event) {
|
|
2240
|
-
var _dropdownApplyButtonR;
|
|
2241
|
-
|
|
2242
2339
|
var optionClass = '.OptionWrapper';
|
|
2243
2340
|
|
|
2244
2341
|
switch (event.key) {
|
|
@@ -2253,67 +2350,78 @@ var DropdownList = function DropdownList(props) {
|
|
|
2253
2350
|
break;
|
|
2254
2351
|
|
|
2255
2352
|
case 'Enter':
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2353
|
+
{
|
|
2354
|
+
var activeElement = document.activeElement;
|
|
2355
|
+
|
|
2356
|
+
if (dropdownOpen && (inputRef.current === activeElement || dropdownTriggerRef.current === activeElement)) {
|
|
2357
|
+
event.preventDefault();
|
|
2358
|
+
var classes = withCheckbox ? "".concat(optionClass, " .Checkbox-input") : optionClass;
|
|
2359
|
+
var elements = document.querySelectorAll(classes);
|
|
2360
|
+
var element = elements[cursor];
|
|
2361
|
+
if (element) element.click();
|
|
2362
|
+
}
|
|
2265
2363
|
|
|
2266
|
-
|
|
2267
|
-
|
|
2364
|
+
if (!dropdownOpen) onToggleDropdown(!dropdownOpen);
|
|
2365
|
+
break;
|
|
2366
|
+
}
|
|
2268
2367
|
|
|
2269
2368
|
case 'Tab':
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
onToggleDropdown(false, 'onClick');
|
|
2273
|
-
return;
|
|
2274
|
-
}
|
|
2369
|
+
{
|
|
2370
|
+
var _dropdownApplyButtonR;
|
|
2275
2371
|
|
|
2276
|
-
|
|
2277
|
-
|
|
2372
|
+
if (!showApplyButton && dropdownOpen) {
|
|
2373
|
+
event.preventDefault();
|
|
2374
|
+
onToggleDropdown(false, 'onClick');
|
|
2375
|
+
return;
|
|
2376
|
+
}
|
|
2278
2377
|
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
onToggleDropdown(false, 'onClick');
|
|
2282
|
-
return;
|
|
2283
|
-
}
|
|
2378
|
+
var currentElement = document.activeElement;
|
|
2379
|
+
var disabledApplyButton = (_dropdownApplyButtonR = dropdownApplyButtonRef.current) === null || _dropdownApplyButtonR === void 0 ? void 0 : _dropdownApplyButtonR.disabled;
|
|
2284
2380
|
|
|
2285
|
-
|
|
2286
|
-
|
|
2381
|
+
if ((currentElement === dropdownCancelButtonRef.current && disabledApplyButton || currentElement === dropdownApplyButtonRef.current) && dropdownOpen) {
|
|
2382
|
+
event.preventDefault();
|
|
2383
|
+
onToggleDropdown(false, 'onClick');
|
|
2384
|
+
return;
|
|
2385
|
+
}
|
|
2287
2386
|
|
|
2288
|
-
if (
|
|
2289
|
-
|
|
2387
|
+
if (showApplyButton && dropdownOpen) {
|
|
2388
|
+
event.preventDefault();
|
|
2290
2389
|
|
|
2291
|
-
(
|
|
2292
|
-
|
|
2293
|
-
|
|
2390
|
+
if (currentElement === dropdownCancelButtonRef.current) {
|
|
2391
|
+
var _dropdownApplyButtonR2;
|
|
2392
|
+
|
|
2393
|
+
(_dropdownApplyButtonR2 = dropdownApplyButtonRef.current) === null || _dropdownApplyButtonR2 === void 0 ? void 0 : _dropdownApplyButtonR2.focus();
|
|
2394
|
+
} else {
|
|
2395
|
+
var _dropdownCancelButton;
|
|
2294
2396
|
|
|
2295
|
-
|
|
2397
|
+
(_dropdownCancelButton = dropdownCancelButtonRef.current) === null || _dropdownCancelButton === void 0 ? void 0 : _dropdownCancelButton.focus();
|
|
2398
|
+
}
|
|
2296
2399
|
}
|
|
2297
|
-
}
|
|
2298
2400
|
|
|
2299
|
-
|
|
2401
|
+
break;
|
|
2402
|
+
}
|
|
2300
2403
|
}
|
|
2301
2404
|
};
|
|
2302
2405
|
|
|
2303
|
-
return
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2406
|
+
return (
|
|
2407
|
+
/*#__PURE__*/
|
|
2408
|
+
//TODO(a11y)
|
|
2409
|
+
//eslint-disable-next-line
|
|
2410
|
+
React.createElement("div", _extends$3({}, baseProps, {
|
|
2411
|
+
className: dropdownClass,
|
|
2412
|
+
ref: triggerRef,
|
|
2413
|
+
onKeyDown: onkeydown
|
|
2414
|
+
}), /*#__PURE__*/React.createElement(Popover, _extends$3({
|
|
2415
|
+
onToggle: onToggleDropdown,
|
|
2416
|
+
trigger: trigger,
|
|
2417
|
+
triggerClass: !menu ? 'w-100' : '',
|
|
2418
|
+
open: dropdownOpen,
|
|
2419
|
+
customStyle: popoverStyle,
|
|
2420
|
+
position: alignmentMapping[align]
|
|
2421
|
+
}, popoverOptions, {
|
|
2422
|
+
"data-test": "DesignSystem-Dropdown--Popover"
|
|
2423
|
+
}), (withSearch || props.async) && renderSearch(), renderDropdownSection(), showApplyButton && withCheckbox && renderApplyButton()))
|
|
2424
|
+
);
|
|
2317
2425
|
};
|
|
2318
2426
|
|
|
2319
2427
|
DropdownList.displayName = 'DropdownList';
|
|
@@ -3422,6 +3530,17 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
3422
3530
|
};
|
|
3423
3531
|
});
|
|
3424
3532
|
|
|
3533
|
+
_defineProperty$2(_assertThisInitialized$2(_this), "yearMouseOverHandler", function (year, isCurrentYear, isDisabled, ev) {
|
|
3534
|
+
var onYearHover = _this.props.onYearHover;
|
|
3535
|
+
var yearData = {
|
|
3536
|
+
value: year,
|
|
3537
|
+
year: year,
|
|
3538
|
+
isCurrentYear: isCurrentYear,
|
|
3539
|
+
isDisabled: isDisabled
|
|
3540
|
+
};
|
|
3541
|
+
if (onYearHover) onYearHover(yearData, ev);
|
|
3542
|
+
});
|
|
3543
|
+
|
|
3425
3544
|
_defineProperty$2(_assertThisInitialized$2(_this), "selectMonth", function (month) {
|
|
3426
3545
|
return function () {
|
|
3427
3546
|
_this.updateState(_this.state.yearNav, month);
|
|
@@ -3432,7 +3551,28 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
3432
3551
|
};
|
|
3433
3552
|
});
|
|
3434
3553
|
|
|
3554
|
+
_defineProperty$2(_assertThisInitialized$2(_this), "monthMouseOverHandler", function (month, isCurrentMonth, isDisabled, ev) {
|
|
3555
|
+
var months = config.months;
|
|
3556
|
+
var onMonthHover = _this.props.onMonthHover;
|
|
3557
|
+
var monthData = {
|
|
3558
|
+
value: months[month],
|
|
3559
|
+
month: months[month],
|
|
3560
|
+
year: _this.state.year,
|
|
3561
|
+
isCurrentMonth: isCurrentMonth,
|
|
3562
|
+
isDisabled: isDisabled
|
|
3563
|
+
};
|
|
3564
|
+
if (onMonthHover) onMonthHover(monthData, ev);
|
|
3565
|
+
});
|
|
3566
|
+
|
|
3435
3567
|
_defineProperty$2(_assertThisInitialized$2(_this), "selectDate", function (index, date, prevMonthDayRange, dayRange) {
|
|
3568
|
+
var d = _this.calculateDate(index, date, prevMonthDayRange, dayRange, false);
|
|
3569
|
+
|
|
3570
|
+
_this.setState({
|
|
3571
|
+
currDate: d
|
|
3572
|
+
});
|
|
3573
|
+
});
|
|
3574
|
+
|
|
3575
|
+
_defineProperty$2(_assertThisInitialized$2(_this), "calculateDate", function (index, date, prevMonthDayRange, dayRange, isDateHovered) {
|
|
3436
3576
|
var neighbouringMonthIndex;
|
|
3437
3577
|
var neighbouringMonthDate;
|
|
3438
3578
|
var type = '';
|
|
@@ -3454,15 +3594,15 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
3454
3594
|
year = _this$getNavDateInfo.year,
|
|
3455
3595
|
month = _this$getNavDateInfo.month;
|
|
3456
3596
|
|
|
3457
|
-
|
|
3597
|
+
if (isDateHovered === false) {
|
|
3598
|
+
_this.updateState(year, month, neighbouringMonthDate);
|
|
3458
3599
|
|
|
3459
|
-
|
|
3600
|
+
_this.onNavIconClickHandler(type)();
|
|
3601
|
+
}
|
|
3460
3602
|
|
|
3461
3603
|
var d = _this.getDateValue(year, month, neighbouringMonthDate);
|
|
3462
3604
|
|
|
3463
|
-
|
|
3464
|
-
currDate: d
|
|
3465
|
-
});
|
|
3605
|
+
return d;
|
|
3466
3606
|
});
|
|
3467
3607
|
|
|
3468
3608
|
_defineProperty$2(_assertThisInitialized$2(_this), "onNavIconClickHandler", function (type) {
|
|
@@ -3649,7 +3789,11 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
3649
3789
|
|
|
3650
3790
|
return /*#__PURE__*/React.createElement("div", {
|
|
3651
3791
|
className: headerContentClass
|
|
3652
|
-
}, view !== 'date' &&
|
|
3792
|
+
}, view !== 'date' &&
|
|
3793
|
+
/*#__PURE__*/
|
|
3794
|
+
// TODO(a11y)
|
|
3795
|
+
// eslint-disable-next-line
|
|
3796
|
+
React.createElement("div", {
|
|
3653
3797
|
className: "d-flex justify-content-center align-items-center",
|
|
3654
3798
|
onClick: _this.onNavHeadingClickHandler(view)
|
|
3655
3799
|
}, renderHeading(headerContent)), view === 'date' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -3700,15 +3844,21 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
3700
3844
|
'Calendar-value--disabled': disabled,
|
|
3701
3845
|
'Calendar-yearValue': true
|
|
3702
3846
|
}, _defineProperty$2(_classNames2, "Calendar-yearValue--".concat(size), size), _defineProperty$2(_classNames2, 'Calendar-value--currDateMonthYear', isCurrentYear()), _classNames2));
|
|
3703
|
-
return
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3847
|
+
return (
|
|
3848
|
+
/*#__PURE__*/
|
|
3849
|
+
// TODO(a11y)
|
|
3850
|
+
// eslint-disable-next-line
|
|
3851
|
+
React.createElement("div", {
|
|
3852
|
+
key: "".concat(row, "-").concat(col),
|
|
3853
|
+
"data-test": "DesignSystem-Calendar--yearValue",
|
|
3854
|
+
className: valueClass,
|
|
3855
|
+
onClick: _this.selectYear(year),
|
|
3856
|
+
onMouseOver: _this.yearMouseOverHandler.bind(_assertThisInitialized$2(_this), year, isCurrentYear(), disabled)
|
|
3857
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
3858
|
+
size: size === 'small' ? 'small' : 'regular',
|
|
3859
|
+
appearance: active ? 'white' : disabled ? 'disabled' : isCurrentYear() ? 'link' : 'default'
|
|
3860
|
+
}, year))
|
|
3861
|
+
);
|
|
3712
3862
|
}));
|
|
3713
3863
|
});
|
|
3714
3864
|
});
|
|
@@ -3752,15 +3902,21 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
3752
3902
|
'Calendar-value--dummy': disabled,
|
|
3753
3903
|
'Calendar-monthValue': true
|
|
3754
3904
|
}, _defineProperty$2(_classNames3, "Calendar-monthValue--".concat(size), size), _defineProperty$2(_classNames3, 'Calendar-value--currDateMonthYear', isCurrentMonth()), _classNames3));
|
|
3755
|
-
return
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3905
|
+
return (
|
|
3906
|
+
/*#__PURE__*/
|
|
3907
|
+
//TODO(a11y)
|
|
3908
|
+
//eslint-disable-next-line
|
|
3909
|
+
React.createElement("div", {
|
|
3910
|
+
key: "".concat(row, "-").concat(col),
|
|
3911
|
+
"data-test": "DesignSystem-Calendar--monthValue",
|
|
3912
|
+
className: valueClass,
|
|
3913
|
+
onClick: _this.selectMonth(month),
|
|
3914
|
+
onMouseOver: _this.monthMouseOverHandler.bind(_assertThisInitialized$2(_this), month, isCurrentMonth(), disabled)
|
|
3915
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
3916
|
+
size: size === 'small' ? 'small' : 'regular',
|
|
3917
|
+
appearance: active ? 'white' : disabled ? 'disabled' : isCurrentMonth() ? 'link' : 'default'
|
|
3918
|
+
}, months[month]))
|
|
3919
|
+
);
|
|
3764
3920
|
}));
|
|
3765
3921
|
});
|
|
3766
3922
|
});
|
|
@@ -3813,7 +3969,8 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
3813
3969
|
firstDayOfWeek = _this$props7.firstDayOfWeek,
|
|
3814
3970
|
disabledBefore = _this$props7.disabledBefore,
|
|
3815
3971
|
disabledAfter = _this$props7.disabledAfter,
|
|
3816
|
-
monthsInView = _this$props7.monthsInView
|
|
3972
|
+
monthsInView = _this$props7.monthsInView,
|
|
3973
|
+
onDateHover = _this$props7.onDateHover;
|
|
3817
3974
|
var _this$state8 = _this.state,
|
|
3818
3975
|
startDate = _this$state8.startDate,
|
|
3819
3976
|
endDate = _this$state8.endDate,
|
|
@@ -3835,13 +3992,10 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
3835
3992
|
var dayRange = getDaysInMonth(yearNavVal, monthNavVal);
|
|
3836
3993
|
var dayDiff = getFirstDayOfMonth(yearNavVal, monthNavVal) - getIndexOfDay(firstDayOfWeek);
|
|
3837
3994
|
var dummyDays = Math.abs(dayDiff);
|
|
3838
|
-
var noOfRows = Math.ceil((dayRange + dummyDays) / daysInRow);
|
|
3995
|
+
var noOfRows = Math.ceil((dayRange + dummyDays) / daysInRow); // TODO: @veekays
|
|
3996
|
+
// if(noOfRows !== 6 && monthsInView <= 1) ?
|
|
3839
3997
|
|
|
3840
|
-
if (noOfRows === 6) {
|
|
3841
|
-
noOfRows = noOfRows;
|
|
3842
|
-
} else if (monthsInView > 1) {
|
|
3843
|
-
noOfRows = noOfRows;
|
|
3844
|
-
} else {
|
|
3998
|
+
if (noOfRows === 6) ; else if (monthsInView > 1) ; else {
|
|
3845
3999
|
noOfRows = noOfRows + 1;
|
|
3846
4000
|
}
|
|
3847
4001
|
|
|
@@ -3877,6 +4031,25 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
3877
4031
|
};
|
|
3878
4032
|
};
|
|
3879
4033
|
|
|
4034
|
+
var onMouseEnterHandler = function onMouseEnterHandler(date, isToday, isDisabled, ev) {
|
|
4035
|
+
var d = _this.calculateDate(index, date, prevMonthDayRange, dayRange, true) || new Date();
|
|
4036
|
+
var months = config.months,
|
|
4037
|
+
days = config.days;
|
|
4038
|
+
var dayName = days.large[d.getDay()];
|
|
4039
|
+
var dateData = {
|
|
4040
|
+
value: d.getDate(),
|
|
4041
|
+
isToday: isToday,
|
|
4042
|
+
isDisabled: isDisabled,
|
|
4043
|
+
todayDate: _this.state.currDate,
|
|
4044
|
+
fullDate: d,
|
|
4045
|
+
date: d.getDate(),
|
|
4046
|
+
month: months[d.getMonth()],
|
|
4047
|
+
year: d.getFullYear(),
|
|
4048
|
+
dayName: dayName
|
|
4049
|
+
};
|
|
4050
|
+
if (onDateHover) onDateHover(dateData, ev);
|
|
4051
|
+
};
|
|
4052
|
+
|
|
3880
4053
|
return Array.from({
|
|
3881
4054
|
length: noOfRows
|
|
3882
4055
|
}, function (_y, row) {
|
|
@@ -3976,14 +4149,16 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
3976
4149
|
"data-test": "DesignSystem-Calendar--dateValue",
|
|
3977
4150
|
className: valueClass,
|
|
3978
4151
|
onClick: onClickHandler(date),
|
|
3979
|
-
onMouseOver: onMouseOverHandler(date)
|
|
4152
|
+
onMouseOver: onMouseOverHandler(date),
|
|
4153
|
+
onMouseEnter: onMouseEnterHandler.bind(_assertThisInitialized$2(_this), date, today(), disabled)
|
|
3980
4154
|
}, date), isEventExist && _this.renderEventsIndicator(size, active)), (dummy && date > 0 && index === monthsInView - 1 || dummy && date <= 0 && index === 0) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
|
|
3981
4155
|
appearance: active ? 'white' : disabled ? 'disabled' : today() ? 'link' : 'default',
|
|
3982
4156
|
size: size === 'small' ? 'small' : 'regular',
|
|
3983
4157
|
"data-test": "DesignSystem-Calendar--dateValue",
|
|
3984
4158
|
className: valueClass,
|
|
3985
4159
|
onClick: onClickHandler(date),
|
|
3986
|
-
onMouseOver: onMouseOverHandler(date)
|
|
4160
|
+
onMouseOver: onMouseOverHandler(date),
|
|
4161
|
+
onMouseEnter: onMouseEnterHandler.bind(_assertThisInitialized$2(_this), date, today(), disabled)
|
|
3987
4162
|
}, date <= 0 ? prevMonthDayRange + date : date - dayRange), isEventExist && _this.renderEventsIndicator(size, active)));
|
|
3988
4163
|
}));
|
|
3989
4164
|
});
|
|
@@ -4340,6 +4515,8 @@ CardFooter.defaultProps = {
|
|
|
4340
4515
|
};
|
|
4341
4516
|
|
|
4342
4517
|
var GenericChip = function GenericChip(props) {
|
|
4518
|
+
var _classNames2, _classNames3;
|
|
4519
|
+
|
|
4343
4520
|
var label = props.label,
|
|
4344
4521
|
icon = props.icon,
|
|
4345
4522
|
clearButton = props.clearButton,
|
|
@@ -4365,26 +4542,33 @@ var GenericChip = function GenericChip(props) {
|
|
|
4365
4542
|
if (onClick) onClick();
|
|
4366
4543
|
};
|
|
4367
4544
|
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
"
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4545
|
+
var iconAppearance = classnames((_classNames2 = {}, _defineProperty$2(_classNames2, 'disabled', disabled && !selected), _defineProperty$2(_classNames2, 'info', selected), _defineProperty$2(_classNames2, 'subtle', !disabled && !selected && !clearButton && !icon), _defineProperty$2(_classNames2, 'default', !disabled && !selected && !clearButton && icon), _classNames2));
|
|
4546
|
+
var textAppearance = classnames((_classNames3 = {}, _defineProperty$2(_classNames3, 'disabled', disabled && !selected), _defineProperty$2(_classNames3, 'link', selected), _defineProperty$2(_classNames3, 'default', !disabled && !selected), _classNames3));
|
|
4547
|
+
return (
|
|
4548
|
+
/*#__PURE__*/
|
|
4549
|
+
// TODO(a11y)
|
|
4550
|
+
// eslint-disable-next-line
|
|
4551
|
+
React.createElement("div", _extends$3({
|
|
4552
|
+
"data-test": "DesignSystem-GenericChip--GenericChipWrapper"
|
|
4553
|
+
}, baseProps, {
|
|
4554
|
+
className: "Chip-wrapper ".concat(className),
|
|
4555
|
+
onClick: onClickHandler
|
|
4556
|
+
}), icon && /*#__PURE__*/React.createElement(Icon, {
|
|
4557
|
+
"data-test": "DesignSystem-GenericChip--Icon",
|
|
4558
|
+
name: icon,
|
|
4559
|
+
appearance: iconAppearance,
|
|
4560
|
+
className: iconClass('left')
|
|
4561
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
4562
|
+
"data-test": "DesignSystem-GenericChip--Text",
|
|
4563
|
+
appearance: textAppearance
|
|
4564
|
+
}, label), clearButton && /*#__PURE__*/React.createElement(Icon, {
|
|
4565
|
+
"data-test": "DesignSystem-GenericChip--clearButton",
|
|
4566
|
+
name: "clear",
|
|
4567
|
+
appearance: iconAppearance,
|
|
4568
|
+
className: iconClass('right'),
|
|
4569
|
+
onClick: onCloseHandler
|
|
4570
|
+
}))
|
|
4571
|
+
);
|
|
4388
4572
|
};
|
|
4389
4573
|
GenericChip.displayName = 'GenericChip';
|
|
4390
4574
|
|
|
@@ -4413,7 +4597,7 @@ var Chip = function Chip(props) {
|
|
|
4413
4597
|
|
|
4414
4598
|
var chipClass = classnames((_classNames = {
|
|
4415
4599
|
Chip: true
|
|
4416
|
-
}, _defineProperty$2(_classNames, "Chip-".concat(type, "--disabled"), disabled), _defineProperty$2(_classNames, "Chip--".concat(type), type && !disabled), _defineProperty$2(_classNames, "Chip-".concat(type, "--selected"), selected && !disabled), _classNames), className);
|
|
4600
|
+
}, _defineProperty$2(_classNames, "Chip-".concat(type, "--disabled"), disabled), _defineProperty$2(_classNames, "Chip--".concat(type), type && !disabled), _defineProperty$2(_classNames, "Chip-".concat(type, "--selected"), selected && !disabled), _defineProperty$2(_classNames, "Chip-selection--selectedDisabled", type === 'selection' && selected && disabled), _classNames), className);
|
|
4417
4601
|
var clearbutton = type === 'action' ? false : clearButton;
|
|
4418
4602
|
var select = type === 'selection' && selected ? true : false;
|
|
4419
4603
|
return /*#__PURE__*/React.createElement(GenericChip, _extends$3({
|
|
@@ -4563,14 +4747,13 @@ var Trigger$1 = function Trigger(props) {
|
|
|
4563
4747
|
};
|
|
4564
4748
|
|
|
4565
4749
|
var mask = date[inputFormat];
|
|
4566
|
-
return /*#__PURE__*/React.createElement(
|
|
4750
|
+
return /*#__PURE__*/React.createElement(X, _extends$3({
|
|
4567
4751
|
icon: "events",
|
|
4568
4752
|
placeholder: inputFormat
|
|
4569
4753
|
}, inputOptions, {
|
|
4570
4754
|
error: showError,
|
|
4571
4755
|
mask: mask,
|
|
4572
|
-
value: date$1 ? translateToString(inputFormat, date$1) : init
|
|
4573
|
-
? InputMask.utils.getDefaultValue(mask, placeholderChar) : '',
|
|
4756
|
+
value: date$1 ? translateToString(inputFormat, date$1) : init ? X.utils.getDefaultValue(mask, placeholderChar) : '',
|
|
4574
4757
|
onChange: onChangeHandler,
|
|
4575
4758
|
onBlur: onBlurHandler,
|
|
4576
4759
|
onClear: onClearHandler,
|
|
@@ -4580,7 +4763,7 @@ var Trigger$1 = function Trigger(props) {
|
|
|
4580
4763
|
}));
|
|
4581
4764
|
};
|
|
4582
4765
|
|
|
4583
|
-
var _excluded$q = ["date", "open", "position", "inputFormat", "outputFormat", "inputOptions", "validators", "withInput", "disabledBefore", "disabledAfter", "onDateChange", "closeOnSelect", "size"];
|
|
4766
|
+
var _excluded$q = ["date", "open", "position", "inputFormat", "outputFormat", "inputOptions", "validators", "withInput", "disabledBefore", "disabledAfter", "onDateChange", "closeOnSelect", "size", "showTodayDate", "children"];
|
|
4584
4767
|
var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
4585
4768
|
_inherits$1(DatePicker, _React$Component);
|
|
4586
4769
|
|
|
@@ -4718,6 +4901,10 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
4718
4901
|
_this$props4.onDateChange;
|
|
4719
4902
|
_this$props4.closeOnSelect;
|
|
4720
4903
|
var size = _this$props4.size,
|
|
4904
|
+
_this$props4$showToda = _this$props4.showTodayDate,
|
|
4905
|
+
showTodayDate = _this$props4$showToda === void 0 ? true : _this$props4$showToda,
|
|
4906
|
+
_this$props4$children = _this$props4.children,
|
|
4907
|
+
children = _this$props4$children === void 0 ? /*#__PURE__*/React.createElement(React.Fragment, null) : _this$props4$children,
|
|
4721
4908
|
rest = _objectWithoutProperties$1(_this$props4, _excluded$q);
|
|
4722
4909
|
|
|
4723
4910
|
var date = this.state.date;
|
|
@@ -4742,13 +4929,15 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
4742
4929
|
return !isTodayDateDisabled;
|
|
4743
4930
|
};
|
|
4744
4931
|
|
|
4745
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(
|
|
4932
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
4933
|
+
className: "d-flex"
|
|
4934
|
+
}, children, /*#__PURE__*/React.createElement(Calendar, _extends$3({}, rest, {
|
|
4746
4935
|
size: size,
|
|
4747
4936
|
date: currDate,
|
|
4748
4937
|
disabledBefore: dateDisabledBefore,
|
|
4749
4938
|
disabledAfter: dateDisabledAfter,
|
|
4750
4939
|
onDateChange: this.onDateChangeHandler
|
|
4751
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
4940
|
+
}))), showTodayDate && /*#__PURE__*/React.createElement("div", {
|
|
4752
4941
|
className: "d-flex justify-content-center pb-6",
|
|
4753
4942
|
"data-test": "DesignSystem-Select--TodaysDate-wrapper"
|
|
4754
4943
|
}, /*#__PURE__*/React.createElement(Chip, {
|
|
@@ -4866,13 +5055,12 @@ var TimePicker = function TimePicker(props) {
|
|
|
4866
5055
|
};
|
|
4867
5056
|
|
|
4868
5057
|
var mask = time[inputFormat];
|
|
4869
|
-
return /*#__PURE__*/React.createElement(
|
|
5058
|
+
return /*#__PURE__*/React.createElement(X, _extends$3({
|
|
4870
5059
|
placeholder: placeholders[inputFormat],
|
|
4871
5060
|
placeholderChar: placeholderChar
|
|
4872
5061
|
}, inputOptions, {
|
|
4873
5062
|
mask: mask,
|
|
4874
|
-
value: time$1 ? translateToTime(inputFormat, time$1) : init
|
|
4875
|
-
? InputMask.utils.getDefaultValue(mask, placeholderChar) : '',
|
|
5063
|
+
value: time$1 ? translateToTime(inputFormat, time$1) : init ? X.utils.getDefaultValue(mask, placeholderChar) : '',
|
|
4876
5064
|
validators: inputValidator,
|
|
4877
5065
|
onChange: onChangeHandler,
|
|
4878
5066
|
onClear: onClearHandler,
|
|
@@ -4994,7 +5182,8 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
|
|
|
4994
5182
|
var _ref$current2;
|
|
4995
5183
|
|
|
4996
5184
|
return (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.focus();
|
|
4997
|
-
}
|
|
5185
|
+
},
|
|
5186
|
+
role: "presentation"
|
|
4998
5187
|
}, inlineLabel && /*#__PURE__*/React.createElement("div", {
|
|
4999
5188
|
className: "Input-inlineLabel"
|
|
5000
5189
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
@@ -5025,12 +5214,17 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
|
|
|
5025
5214
|
position: "top",
|
|
5026
5215
|
tooltip: info
|
|
5027
5216
|
}, trigger) : actionIcon && (value || defaultValue) ? actionIcon : onClear && (value || defaultValue) && /*#__PURE__*/React.createElement("div", {
|
|
5028
|
-
className: rightIconClass
|
|
5217
|
+
className: rightIconClass
|
|
5218
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
5219
|
+
"data-test": "DesignSystem-Input--closeIcon",
|
|
5029
5220
|
onClick: function onClick(e) {
|
|
5030
|
-
|
|
5221
|
+
var _ref$current3;
|
|
5222
|
+
|
|
5223
|
+
(_ref$current3 = ref.current) === null || _ref$current3 === void 0 ? void 0 : _ref$current3.focus({
|
|
5224
|
+
preventScroll: true
|
|
5225
|
+
});
|
|
5226
|
+
onClear(e);
|
|
5031
5227
|
},
|
|
5032
|
-
"data-test": "DesignSystem-Input--closeIcon"
|
|
5033
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
5034
5228
|
name: 'close',
|
|
5035
5229
|
size: sizeMapping$1[size]
|
|
5036
5230
|
})));
|
|
@@ -5175,7 +5369,14 @@ var MetricInput = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
|
|
|
5175
5369
|
var _ref$current2;
|
|
5176
5370
|
|
|
5177
5371
|
return (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.focus();
|
|
5178
|
-
}
|
|
5372
|
+
},
|
|
5373
|
+
onFocus: function onFocus() {
|
|
5374
|
+
var _ref$current3;
|
|
5375
|
+
|
|
5376
|
+
return (_ref$current3 = ref.current) === null || _ref$current3 === void 0 ? void 0 : _ref$current3.focus();
|
|
5377
|
+
},
|
|
5378
|
+
onKeyDown: function onKeyDown() {},
|
|
5379
|
+
role: "presentation"
|
|
5179
5380
|
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
5180
5381
|
"data-test": "DesignSystem-MetricInput--icon",
|
|
5181
5382
|
name: icon,
|
|
@@ -5210,9 +5411,9 @@ var MetricInput = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
|
|
|
5210
5411
|
size: size,
|
|
5211
5412
|
appearance: "subtle"
|
|
5212
5413
|
}, suffix), /*#__PURE__*/React.createElement("div", {
|
|
5213
|
-
className: "MetricInput-arrowIcons"
|
|
5214
|
-
tabIndex: 0
|
|
5414
|
+
className: "MetricInput-arrowIcons"
|
|
5215
5415
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
5416
|
+
tabIndex: -1,
|
|
5216
5417
|
className: getArrowClass('up'),
|
|
5217
5418
|
size: iconSize,
|
|
5218
5419
|
name: "keyboard_arrow_up",
|
|
@@ -5221,6 +5422,7 @@ var MetricInput = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
|
|
|
5221
5422
|
},
|
|
5222
5423
|
"data-test": "DesignSystem-MetricInput--upIcon"
|
|
5223
5424
|
}), /*#__PURE__*/React.createElement(Icon, {
|
|
5425
|
+
tabIndex: -1,
|
|
5224
5426
|
className: getArrowClass('down'),
|
|
5225
5427
|
size: iconSize,
|
|
5226
5428
|
name: "keyboard_arrow_down",
|
|
@@ -5273,7 +5475,10 @@ var InputMask = /*#__PURE__*/React.forwardRef(function (props, forwardRef) {
|
|
|
5273
5475
|
className = props.className,
|
|
5274
5476
|
rest = _objectWithoutProperties$1(props, _excluded$m);
|
|
5275
5477
|
|
|
5276
|
-
var
|
|
5478
|
+
var isEditable = React.useCallback(function (pos) {
|
|
5479
|
+
return _typeof(mask[pos]) === 'object';
|
|
5480
|
+
}, [mask]);
|
|
5481
|
+
var getNewCursorPosition = React.useCallback(function (type, position) {
|
|
5277
5482
|
if (type === 'right') {
|
|
5278
5483
|
for (var i = position; i < mask.length; i++) {
|
|
5279
5484
|
if (isEditable(i)) return i;
|
|
@@ -5291,82 +5496,70 @@ var InputMask = /*#__PURE__*/React.forwardRef(function (props, forwardRef) {
|
|
|
5291
5496
|
}
|
|
5292
5497
|
|
|
5293
5498
|
return position;
|
|
5294
|
-
};
|
|
5295
|
-
|
|
5296
|
-
var getDefaultSelection = function getDefaultSelection() {
|
|
5499
|
+
}, [mask, isEditable]);
|
|
5500
|
+
var getDefaultSelection = React.useCallback(function () {
|
|
5297
5501
|
var pos = getNewCursorPosition('right', 0);
|
|
5298
5502
|
return {
|
|
5299
5503
|
start: pos,
|
|
5300
5504
|
end: pos
|
|
5301
5505
|
};
|
|
5302
|
-
};
|
|
5303
|
-
|
|
5304
|
-
var getPlaceholderValue = function getPlaceholderValue() {
|
|
5506
|
+
}, [getNewCursorPosition]);
|
|
5507
|
+
var getPlaceholderValue = React.useCallback(function () {
|
|
5305
5508
|
var start = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
5306
5509
|
var end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : mask.length - 1;
|
|
5307
5510
|
return getDefaultValue(mask, placeholderChar).slice(start, end + 1);
|
|
5308
|
-
};
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
};
|
|
5317
|
-
|
|
5511
|
+
}, [mask, placeholderChar]);
|
|
5512
|
+
var defaultPlaceholderValue = React.useMemo(function () {
|
|
5513
|
+
return getPlaceholderValue();
|
|
5514
|
+
}, [getPlaceholderValue]);
|
|
5515
|
+
var defaultSelection = React.useMemo(function () {
|
|
5516
|
+
return getDefaultSelection();
|
|
5517
|
+
}, [getDefaultSelection]);
|
|
5518
|
+
var ref = React.useRef(null);
|
|
5318
5519
|
var deferId = React.useRef();
|
|
5319
|
-
var
|
|
5520
|
+
var selectionPos = React.useRef(defaultSelection);
|
|
5521
|
+
var newSelectionPos = React.useRef(0);
|
|
5320
5522
|
|
|
5321
5523
|
var _React$useState = React.useState(defaultValue || valueProp || ''),
|
|
5322
5524
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
5323
5525
|
value = _React$useState2[0],
|
|
5324
5526
|
setValue = _React$useState2[1];
|
|
5325
5527
|
|
|
5326
|
-
var _React$useState3 = React.useState(getDefaultSelection()),
|
|
5327
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
5328
|
-
selection = _React$useState4[0],
|
|
5329
|
-
setSelection = _React$useState4[1];
|
|
5330
|
-
|
|
5331
|
-
var ref = React.useRef(null);
|
|
5332
5528
|
React.useImperativeHandle(forwardRef, function () {
|
|
5333
5529
|
return ref.current;
|
|
5334
5530
|
});
|
|
5335
5531
|
React.useEffect(function () {
|
|
5336
5532
|
setValue(valueProp || '');
|
|
5337
5533
|
}, [valueProp]);
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
var getCurrSelection = function getCurrSelection() {
|
|
5534
|
+
React.useEffect(function () {
|
|
5535
|
+
setCursorPosition(newSelectionPos.current);
|
|
5536
|
+
}, [value]);
|
|
5537
|
+
var getSelectionLength = React.useCallback(function (val) {
|
|
5538
|
+
return Math.abs(val.end - val.start);
|
|
5539
|
+
}, []);
|
|
5540
|
+
var getCurrSelection = React.useCallback(function () {
|
|
5347
5541
|
var _ref$current, _ref$current2;
|
|
5348
5542
|
|
|
5349
5543
|
return {
|
|
5350
5544
|
start: ((_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.selectionStart) || 0,
|
|
5351
5545
|
end: ((_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.selectionEnd) || 0
|
|
5352
5546
|
};
|
|
5353
|
-
};
|
|
5354
|
-
|
|
5355
|
-
var setSelectionPos = function setSelectionPos(pos) {
|
|
5547
|
+
}, [ref.current]);
|
|
5548
|
+
var setSelectionPos = React.useCallback(function (pos) {
|
|
5356
5549
|
if (ref.current) {
|
|
5357
5550
|
var el = ref.current;
|
|
5358
5551
|
var start = Math.min(pos.start, pos.end);
|
|
5359
5552
|
var end = Math.max(pos.start, pos.end);
|
|
5360
5553
|
el.setSelectionRange(start, end);
|
|
5361
5554
|
}
|
|
5362
|
-
};
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
var insertAtIndex = function
|
|
5555
|
+
}, [ref.current]);
|
|
5556
|
+
var setCursorPosition = React.useCallback(function (val) {
|
|
5557
|
+
return setSelectionPos({
|
|
5558
|
+
start: val,
|
|
5559
|
+
end: val
|
|
5560
|
+
});
|
|
5561
|
+
}, [setSelectionPos]);
|
|
5562
|
+
var insertAtIndex = React.useCallback(function (currValue, index) {
|
|
5370
5563
|
var iterator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
5371
5564
|
var newValue = '';
|
|
5372
5565
|
var newIndex = index + 1;
|
|
@@ -5377,7 +5570,10 @@ var InputMask = /*#__PURE__*/React.forwardRef(function (props, forwardRef) {
|
|
|
5377
5570
|
}
|
|
5378
5571
|
|
|
5379
5572
|
if (iterator >= currValue.length) {
|
|
5380
|
-
|
|
5573
|
+
selectionPos.current = {
|
|
5574
|
+
start: index,
|
|
5575
|
+
end: index
|
|
5576
|
+
};
|
|
5381
5577
|
return newValue;
|
|
5382
5578
|
}
|
|
5383
5579
|
|
|
@@ -5397,12 +5593,15 @@ var InputMask = /*#__PURE__*/React.forwardRef(function (props, forwardRef) {
|
|
|
5397
5593
|
|
|
5398
5594
|
newValue += insertAtIndex(currValue, newIndex, newIterator);
|
|
5399
5595
|
return newValue;
|
|
5400
|
-
};
|
|
5401
|
-
|
|
5402
|
-
|
|
5596
|
+
}, [mask, placeholderChar, isEditable]);
|
|
5597
|
+
var updateSelection = React.useCallback(function () {
|
|
5598
|
+
selectionPos.current = getCurrSelection();
|
|
5599
|
+
deferId.current = window.requestAnimationFrame(updateSelection);
|
|
5600
|
+
}, [selectionPos.current, getCurrSelection]);
|
|
5601
|
+
var onChangeHandler = React.useCallback(function (e) {
|
|
5403
5602
|
var inputVal = e.currentTarget.value;
|
|
5404
5603
|
var currSelection = getCurrSelection();
|
|
5405
|
-
var start = Math.min(
|
|
5604
|
+
var start = Math.min(selectionPos.current.start, currSelection.start);
|
|
5406
5605
|
var end = currSelection.end;
|
|
5407
5606
|
var cursorPosition = start;
|
|
5408
5607
|
var enteredVal = '';
|
|
@@ -5413,8 +5612,8 @@ var InputMask = /*#__PURE__*/React.forwardRef(function (props, forwardRef) {
|
|
|
5413
5612
|
updatedVal = insertAtIndex(enteredVal, start);
|
|
5414
5613
|
insertedStringLength = updatedVal.length;
|
|
5415
5614
|
|
|
5416
|
-
if (currSelection.end >
|
|
5417
|
-
removedLength = insertedStringLength ? getSelectionLength(
|
|
5615
|
+
if (currSelection.end > selectionPos.current.end) {
|
|
5616
|
+
removedLength = insertedStringLength ? getSelectionLength(selectionPos.current) : 0;
|
|
5418
5617
|
} else if (inputVal.length < value.length) {
|
|
5419
5618
|
removedLength = value.length - inputVal.length;
|
|
5420
5619
|
}
|
|
@@ -5442,56 +5641,50 @@ var InputMask = /*#__PURE__*/React.forwardRef(function (props, forwardRef) {
|
|
|
5442
5641
|
}
|
|
5443
5642
|
|
|
5444
5643
|
var newValue = maskedVal.slice(0, mask.length).join('');
|
|
5445
|
-
|
|
5446
|
-
return setCursorPosition(cursorPosition);
|
|
5447
|
-
});
|
|
5644
|
+
newSelectionPos.current = cursorPosition;
|
|
5448
5645
|
|
|
5449
|
-
if (isValid(validators, newValue)
|
|
5646
|
+
if (newValue !== value && isValid(validators, newValue)) {
|
|
5450
5647
|
setValue(newValue);
|
|
5451
|
-
|
|
5648
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e, newValue);
|
|
5649
|
+
} else {
|
|
5650
|
+
window.requestAnimationFrame(function () {
|
|
5651
|
+
return setCursorPosition(newSelectionPos.current);
|
|
5652
|
+
});
|
|
5452
5653
|
}
|
|
5453
|
-
};
|
|
5454
|
-
|
|
5455
|
-
var onBlurHandler = function onBlurHandler(e) {
|
|
5654
|
+
}, [selectionPos.current, validators, getCurrSelection, insertAtIndex, getSelectionLength, getPlaceholderValue, getNewCursorPosition, isEditable, setCursorPosition, setValue, onChange]);
|
|
5655
|
+
var onBlurHandler = React.useCallback(function (e) {
|
|
5456
5656
|
var inputVal = e.currentTarget.value;
|
|
5457
5657
|
|
|
5458
5658
|
if (clearOnEmptyBlur) {
|
|
5459
|
-
if (inputVal ===
|
|
5659
|
+
if (inputVal === defaultPlaceholderValue) {
|
|
5460
5660
|
setValue('');
|
|
5461
5661
|
inputVal = '';
|
|
5462
5662
|
}
|
|
5463
5663
|
}
|
|
5464
5664
|
|
|
5465
|
-
|
|
5665
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e, inputVal);
|
|
5466
5666
|
if (deferId.current) window.cancelAnimationFrame(deferId.current);
|
|
5467
|
-
};
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
return setCursorPosition(getDefaultSelection().start);
|
|
5475
|
-
});
|
|
5476
|
-
if (onClear) onClear(e);
|
|
5477
|
-
};
|
|
5478
|
-
|
|
5479
|
-
var onFocusHandler = function onFocusHandler(e) {
|
|
5667
|
+
}, [clearOnEmptyBlur, deferId.current, getPlaceholderValue, setValue, onBlur]);
|
|
5668
|
+
var onClearHandler = React.useCallback(function (e) {
|
|
5669
|
+
newSelectionPos.current = defaultSelection.start;
|
|
5670
|
+
setValue(defaultPlaceholderValue);
|
|
5671
|
+
onClear === null || onClear === void 0 ? void 0 : onClear(e);
|
|
5672
|
+
}, [setValue, getPlaceholderValue, setCursorPosition, getDefaultSelection, onClear]);
|
|
5673
|
+
var onFocusHandler = React.useCallback(function (e) {
|
|
5480
5674
|
deferId.current = window.requestAnimationFrame(updateSelection);
|
|
5481
5675
|
|
|
5482
5676
|
if (!value) {
|
|
5677
|
+
newSelectionPos.current = defaultSelection.start;
|
|
5483
5678
|
setValue(getPlaceholderValue());
|
|
5484
|
-
window.requestAnimationFrame(function () {
|
|
5485
|
-
return setSelectionPos(getDefaultSelection());
|
|
5486
|
-
});
|
|
5487
5679
|
}
|
|
5488
5680
|
|
|
5489
|
-
|
|
5490
|
-
};
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5681
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
5682
|
+
}, [deferId.current, value, updateSelection, setValue, setSelectionPos, onFocus]);
|
|
5683
|
+
var classes = React.useMemo(function () {
|
|
5684
|
+
return classnames({
|
|
5685
|
+
'd-flex flex-column flex-grow-1': true
|
|
5686
|
+
}, className);
|
|
5687
|
+
}, [className]);
|
|
5495
5688
|
return /*#__PURE__*/React.createElement("div", {
|
|
5496
5689
|
className: classes,
|
|
5497
5690
|
"data-test": "DesignSystem-InputMask--Wrapper"
|
|
@@ -5511,11 +5704,16 @@ var InputMask = /*#__PURE__*/React.forwardRef(function (props, forwardRef) {
|
|
|
5511
5704
|
hide: !caption
|
|
5512
5705
|
}, caption));
|
|
5513
5706
|
});
|
|
5514
|
-
InputMask.displayName = 'InputMask'; //
|
|
5707
|
+
InputMask.displayName = 'InputMask'; // we are adding a new property which is not present in default interface
|
|
5708
|
+
// we could have explicitly added the interface above with definition
|
|
5709
|
+
// but then it would force us to marks utils as optional
|
|
5710
|
+
// as we cannot add new properties by defining the InputMask
|
|
5711
|
+
// that would cause user to use `!` everywhere or check for utils
|
|
5515
5712
|
|
|
5516
5713
|
InputMask.utils = {
|
|
5517
5714
|
getDefaultValue: getDefaultValue
|
|
5518
5715
|
};
|
|
5716
|
+
var X = InputMask;
|
|
5519
5717
|
|
|
5520
5718
|
var _excluded$l = ["required", "optional", "withInput", "disabled", "children", "className"];
|
|
5521
5719
|
|
|
@@ -5622,7 +5820,10 @@ var Legend = function Legend(props) {
|
|
|
5622
5820
|
background: "var(--".concat(iconAppearance, ")"),
|
|
5623
5821
|
height: "".concat(iconSize, "px"),
|
|
5624
5822
|
width: "".concat(iconSize, "px")
|
|
5625
|
-
};
|
|
5823
|
+
}; // TODO(a11y): fix accessibility
|
|
5824
|
+
|
|
5825
|
+
/* eslint-disable */
|
|
5826
|
+
|
|
5626
5827
|
return /*#__PURE__*/React.createElement("div", _extends$3({}, baseProps, {
|
|
5627
5828
|
className: legendClass,
|
|
5628
5829
|
onClick: function onClick(e) {
|
|
@@ -5715,14 +5916,14 @@ var EditableDropdown = function EditableDropdown(props) {
|
|
|
5715
5916
|
switch (eventType) {
|
|
5716
5917
|
case 'edit':
|
|
5717
5918
|
setEditing(true);
|
|
5919
|
+
break;
|
|
5718
5920
|
|
|
5719
5921
|
case 'hover':
|
|
5720
5922
|
setShowComponent(true);
|
|
5721
|
-
|
|
5923
|
+
break;
|
|
5722
5924
|
|
|
5723
5925
|
case 'default':
|
|
5724
5926
|
setShowComponent(false);
|
|
5725
|
-
return;
|
|
5726
5927
|
}
|
|
5727
5928
|
};
|
|
5728
5929
|
|
|
@@ -5803,10 +6004,11 @@ var IconMapping$2 = {
|
|
|
5803
6004
|
var Message = function Message(props) {
|
|
5804
6005
|
var _classNames, _classNames2, _classNames3, _classNames4;
|
|
5805
6006
|
|
|
5806
|
-
var
|
|
5807
|
-
actions = props.actions,
|
|
6007
|
+
var actions = props.actions,
|
|
5808
6008
|
title = props.title,
|
|
5809
6009
|
className = props.className;
|
|
6010
|
+
var appearance = props.appearance;
|
|
6011
|
+
appearance = appearance === 'default' ? 'info' : appearance;
|
|
5810
6012
|
var baseProps = extractBaseProps(props);
|
|
5811
6013
|
var MessageClass = classnames((_classNames = {}, _defineProperty$2(_classNames, 'Message', true), _defineProperty$2(_classNames, "Message--".concat(appearance), appearance), _classNames), className);
|
|
5812
6014
|
var IconClass = classnames((_classNames2 = {}, _defineProperty$2(_classNames2, 'Message-icon', true), _defineProperty$2(_classNames2, "Message-icon--".concat(appearance), appearance), _defineProperty$2(_classNames2, 'Message-icon--withTitle', title), _classNames2));
|
|
@@ -5835,7 +6037,7 @@ var Message = function Message(props) {
|
|
|
5835
6037
|
"data-test": "DesignSystem-Message"
|
|
5836
6038
|
}, baseProps, {
|
|
5837
6039
|
className: MessageClass
|
|
5838
|
-
}),
|
|
6040
|
+
}), /*#__PURE__*/React.createElement(Icon, {
|
|
5839
6041
|
"data-test": "DesignSystem-Message--Icon",
|
|
5840
6042
|
name: IconMapping$2[appearance],
|
|
5841
6043
|
appearance: appearance,
|
|
@@ -5851,7 +6053,7 @@ var Message = function Message(props) {
|
|
|
5851
6053
|
};
|
|
5852
6054
|
Message.displayName = 'Message';
|
|
5853
6055
|
Message.defaultProps = {
|
|
5854
|
-
appearance: '
|
|
6056
|
+
appearance: 'info',
|
|
5855
6057
|
description: ''
|
|
5856
6058
|
};
|
|
5857
6059
|
|
|
@@ -5927,6 +6129,9 @@ MetaList.defaultProps = {
|
|
|
5927
6129
|
labelAppearance: 'subtle'
|
|
5928
6130
|
};
|
|
5929
6131
|
|
|
6132
|
+
/**
|
|
6133
|
+
* Key codes are deprecated, soon major browser support will end.
|
|
6134
|
+
*/
|
|
5930
6135
|
var ARROW_LEFT = 37;
|
|
5931
6136
|
var ARROW_RIGHT = 39;
|
|
5932
6137
|
|
|
@@ -5987,7 +6192,7 @@ function fillValues(values, startIndex, endIndex, fillValue) {
|
|
|
5987
6192
|
values[index] = fillValue;
|
|
5988
6193
|
}
|
|
5989
6194
|
}
|
|
5990
|
-
function isElementOfType(element
|
|
6195
|
+
function isElementOfType(element) {
|
|
5991
6196
|
return element != null && element.type != null;
|
|
5992
6197
|
}
|
|
5993
6198
|
|
|
@@ -6206,21 +6411,27 @@ var Handle = /*#__PURE__*/function (_React$Component) {
|
|
|
6206
6411
|
};
|
|
6207
6412
|
var className = classnames((_classNames = {}, _defineProperty$2(_classNames, 'Slider-handle', true), _defineProperty$2(_classNames, 'Slider-handle--disabled', disabled), _defineProperty$2(_classNames, 'Slider-handle--active', isHandleMoving), _classNames));
|
|
6208
6413
|
var TooltipClass = classnames((_classNames2 = {}, _defineProperty$2(_classNames2, 'Slider-tooltip', true), _defineProperty$2(_classNames2, 'Tooltip', true), _defineProperty$2(_classNames2, 'd-none', !showTootlip), _classNames2));
|
|
6209
|
-
return
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6414
|
+
return (
|
|
6415
|
+
/*#__PURE__*/
|
|
6416
|
+
// TODO(a11y): fix accessibility
|
|
6417
|
+
|
|
6418
|
+
/* eslint-disable */
|
|
6419
|
+
React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
6420
|
+
className: className,
|
|
6421
|
+
onMouseOver: this.handleMouseOver,
|
|
6422
|
+
onMouseLeave: this.handleMouseLeave,
|
|
6423
|
+
onMouseDown: this.beginHandleMovement,
|
|
6424
|
+
onKeyDown: this.handleKeyDown,
|
|
6425
|
+
onKeyUp: this.handleKeyUp,
|
|
6426
|
+
ref: this.refHandlers.handle,
|
|
6427
|
+
style: style,
|
|
6428
|
+
tabIndex: 1,
|
|
6429
|
+
"data-test": "DesignSystem-MultiSlider-Handle"
|
|
6430
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
6431
|
+
className: TooltipClass,
|
|
6432
|
+
style: style
|
|
6433
|
+
}, label))
|
|
6434
|
+
);
|
|
6224
6435
|
}
|
|
6225
6436
|
}]);
|
|
6226
6437
|
|
|
@@ -6478,7 +6689,10 @@ var MultiSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
6478
6689
|
foundHandle.changeValue(i);
|
|
6479
6690
|
}
|
|
6480
6691
|
}
|
|
6481
|
-
};
|
|
6692
|
+
}; // TODO(a11y): fix accessibility
|
|
6693
|
+
|
|
6694
|
+
/* eslint-disable */
|
|
6695
|
+
|
|
6482
6696
|
|
|
6483
6697
|
labels.push( /*#__PURE__*/React.createElement("div", {
|
|
6484
6698
|
onClick: onClickHandler,
|
|
@@ -6675,7 +6889,7 @@ var OutsideClick = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
6675
6889
|
return;
|
|
6676
6890
|
}
|
|
6677
6891
|
|
|
6678
|
-
if (!
|
|
6892
|
+
if (!element.current.contains(event.target)) {
|
|
6679
6893
|
onOutsideClick(event);
|
|
6680
6894
|
}
|
|
6681
6895
|
}, []);
|
|
@@ -6828,26 +7042,32 @@ var StatusHint = function StatusHint(props) {
|
|
|
6828
7042
|
var baseProps = extractBaseProps(props);
|
|
6829
7043
|
var StatusHintClass = classnames(_defineProperty$2({}, 'StatusHint', true), className);
|
|
6830
7044
|
var StatusHintIconClass = classnames((_classNames2 = {}, _defineProperty$2(_classNames2, 'StatusHint-icon', true), _defineProperty$2(_classNames2, "StatusHint--".concat(appearance), appearance), _classNames2));
|
|
6831
|
-
return
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
7045
|
+
return (
|
|
7046
|
+
/*#__PURE__*/
|
|
7047
|
+
// TODO(a11y): fix accessibility
|
|
7048
|
+
|
|
7049
|
+
/* eslint-disable */
|
|
7050
|
+
React.createElement("div", _extends$3({
|
|
7051
|
+
"data-test": "DesignSystem-StatusHint"
|
|
7052
|
+
}, baseProps, {
|
|
7053
|
+
className: StatusHintClass,
|
|
7054
|
+
onClick: function onClick(e) {
|
|
7055
|
+
return _onClick && _onClick(e);
|
|
7056
|
+
},
|
|
7057
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
7058
|
+
return _onMouseEnter && _onMouseEnter(e);
|
|
7059
|
+
},
|
|
7060
|
+
onMouseLeave: function onMouseLeave(e) {
|
|
7061
|
+
return _onMouseLeave && _onMouseLeave(e);
|
|
7062
|
+
}
|
|
7063
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
7064
|
+
"data-test": "DesignSystem-StatusHint--Icon",
|
|
7065
|
+
className: StatusHintIconClass
|
|
7066
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
7067
|
+
"data-test": "DesignSystem-StatusHint--Text",
|
|
7068
|
+
weight: 'medium'
|
|
7069
|
+
}, children))
|
|
7070
|
+
);
|
|
6851
7071
|
};
|
|
6852
7072
|
StatusHint.displayName = 'StatusHint';
|
|
6853
7073
|
StatusHint.defaultProps = {
|
|
@@ -7054,8 +7274,10 @@ var Switch = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
7054
7274
|
var SwitchWrapper = classnames((_classNames2 = {}, _defineProperty$2(_classNames2, 'Switch-wrapper', true), _defineProperty$2(_classNames2, 'Switch-wrapper--disabled', disabled), _defineProperty$2(_classNames2, "Switch-wrapper--".concat(size), size), _defineProperty$2(_classNames2, 'Switch-wrapper--checked', checked), _defineProperty$2(_classNames2, 'Switch-wrapper--checkedDisabled', checked && disabled), _classNames2));
|
|
7055
7275
|
|
|
7056
7276
|
var onChangeHandler = function onChangeHandler(event) {
|
|
7057
|
-
if (
|
|
7058
|
-
|
|
7277
|
+
if (event.type == 'change' || isSpaceKey(event)) {
|
|
7278
|
+
if (checkedProp === undefined) setChecked(!checked);
|
|
7279
|
+
if (onChange) onChange(event, !checked);
|
|
7280
|
+
}
|
|
7059
7281
|
};
|
|
7060
7282
|
|
|
7061
7283
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -7069,7 +7291,8 @@ var Switch = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
7069
7291
|
ref: ref,
|
|
7070
7292
|
name: name,
|
|
7071
7293
|
value: value,
|
|
7072
|
-
className: "Switch-input"
|
|
7294
|
+
className: "Switch-input",
|
|
7295
|
+
onKeyUp: onChangeHandler
|
|
7073
7296
|
})), /*#__PURE__*/React.createElement("span", {
|
|
7074
7297
|
className: SwitchWrapper
|
|
7075
7298
|
}));
|
|
@@ -7148,12 +7371,13 @@ ActionButton.defaultProps = {
|
|
|
7148
7371
|
var Toast = function Toast(props) {
|
|
7149
7372
|
var _classNames, _classNames2, _classNames4, _classNames5;
|
|
7150
7373
|
|
|
7151
|
-
var
|
|
7152
|
-
title = props.title,
|
|
7374
|
+
var title = props.title,
|
|
7153
7375
|
message = props.message,
|
|
7154
7376
|
actions = props.actions,
|
|
7155
7377
|
onClose = props.onClose,
|
|
7156
7378
|
className = props.className;
|
|
7379
|
+
var appearance = props.appearance;
|
|
7380
|
+
appearance = appearance === 'default' ? 'info' : appearance;
|
|
7157
7381
|
var baseProps = extractBaseProps(props);
|
|
7158
7382
|
var wrapperClass = classnames((_classNames = {}, _defineProperty$2(_classNames, 'Toast', true), _defineProperty$2(_classNames, 'Toast--withMessage', message), _defineProperty$2(_classNames, "Toast--".concat(appearance), appearance), _classNames), className);
|
|
7159
7383
|
var IconMapping = {
|
|
@@ -7212,7 +7436,7 @@ var Toast = function Toast(props) {
|
|
|
7212
7436
|
};
|
|
7213
7437
|
Toast.displayName = 'Toast';
|
|
7214
7438
|
Toast.defaultProps = {
|
|
7215
|
-
appearance: '
|
|
7439
|
+
appearance: 'info'
|
|
7216
7440
|
};
|
|
7217
7441
|
|
|
7218
7442
|
var objectWithoutPropertiesLoose = createCommonjsModule(function (module) {
|
|
@@ -11841,13 +12065,8 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
|
|
|
11841
12065
|
onToggle(newValue === undefined ? !open : newValue, type);
|
|
11842
12066
|
});
|
|
11843
12067
|
|
|
11844
|
-
_defineProperty$2(_assertThisInitialized$2(_this), "findDOMNode", function (ref) {
|
|
11845
|
-
return ReactDOM.findDOMNode(ref.current);
|
|
11846
|
-
});
|
|
11847
|
-
|
|
11848
12068
|
_defineProperty$2(_assertThisInitialized$2(_this), "doesEventContainsElement", function (event, ref) {
|
|
11849
|
-
var el =
|
|
11850
|
-
|
|
12069
|
+
var el = ref.current;
|
|
11851
12070
|
return el && el.contains(event.target);
|
|
11852
12071
|
});
|
|
11853
12072
|
|
|
@@ -11913,7 +12132,7 @@ var PopperWrapper = /*#__PURE__*/function (_React$Component) {
|
|
|
11913
12132
|
this._throttleWait = false;
|
|
11914
12133
|
|
|
11915
12134
|
if (this.props.open) {
|
|
11916
|
-
var triggerElement = this.
|
|
12135
|
+
var triggerElement = this.triggerRef.current;
|
|
11917
12136
|
var zIndex = this.getZIndexForLayer(triggerElement);
|
|
11918
12137
|
this.setState({
|
|
11919
12138
|
zIndex: zIndex === undefined ? zIndex : zIndex + 1
|
|
@@ -12118,7 +12337,7 @@ _defineProperty$2(PopperWrapper, "defaultProps", {
|
|
|
12118
12337
|
});
|
|
12119
12338
|
|
|
12120
12339
|
var _excluded$9 = ["position", "customStyle", "dark", "children", "onToggle", "className", "hideOnReferenceEscape", "boundaryElement"];
|
|
12121
|
-
var propsList
|
|
12340
|
+
var propsList = ['appendToBody', 'trigger', 'hoverable', 'on', 'open', 'closeOnBackdropClick', 'offset', 'closeOnScroll'];
|
|
12122
12341
|
var Popover = function Popover(props) {
|
|
12123
12342
|
var position = props.position,
|
|
12124
12343
|
customStyle = props.customStyle,
|
|
@@ -12127,7 +12346,8 @@ var Popover = function Popover(props) {
|
|
|
12127
12346
|
onToggle = props.onToggle,
|
|
12128
12347
|
className = props.className,
|
|
12129
12348
|
hideOnReferenceEscape = props.hideOnReferenceEscape,
|
|
12130
|
-
|
|
12349
|
+
_props$boundaryElemen = props.boundaryElement,
|
|
12350
|
+
boundaryElement = _props$boundaryElemen === void 0 ? document.body : _props$boundaryElemen,
|
|
12131
12351
|
rest = _objectWithoutProperties$1(props, _excluded$9);
|
|
12132
12352
|
|
|
12133
12353
|
var _React$useState = React.useState(!!props.open),
|
|
@@ -12171,20 +12391,12 @@ var Popover = function Popover(props) {
|
|
|
12171
12391
|
placement: position
|
|
12172
12392
|
}), PopoverWrapper);
|
|
12173
12393
|
};
|
|
12174
|
-
Popover.displayName = 'Popover';
|
|
12175
|
-
|
|
12176
|
-
// offset: 'large',
|
|
12177
|
-
// position: 'bottom',
|
|
12178
|
-
// hideOnReferenceEscape: true,
|
|
12179
|
-
// customStyle: {},
|
|
12180
|
-
// }
|
|
12181
|
-
|
|
12182
|
-
Popover.defaultProps = Object.assign({}, filterProps(PopperWrapper.defaultProps, propsList$1, true), {
|
|
12394
|
+
Popover.displayName = 'Popover';
|
|
12395
|
+
Popover.defaultProps = Object.assign({}, filterProps(PopperWrapper.defaultProps, propsList, true), {
|
|
12183
12396
|
offset: 'large',
|
|
12184
12397
|
position: 'bottom',
|
|
12185
12398
|
hideOnReferenceEscape: true,
|
|
12186
|
-
customStyle: {}
|
|
12187
|
-
boundaryElement: document.body
|
|
12399
|
+
customStyle: {}
|
|
12188
12400
|
});
|
|
12189
12401
|
|
|
12190
12402
|
var _excluded$8 = ["type", "onClick"];
|
|
@@ -12322,32 +12534,39 @@ var ChipInput = function ChipInput(props) {
|
|
|
12322
12534
|
}
|
|
12323
12535
|
}, rest));
|
|
12324
12536
|
});
|
|
12325
|
-
return
|
|
12326
|
-
|
|
12327
|
-
|
|
12328
|
-
|
|
12329
|
-
|
|
12330
|
-
|
|
12331
|
-
|
|
12332
|
-
|
|
12333
|
-
|
|
12334
|
-
|
|
12335
|
-
|
|
12336
|
-
|
|
12337
|
-
|
|
12338
|
-
|
|
12339
|
-
|
|
12340
|
-
|
|
12341
|
-
|
|
12342
|
-
|
|
12343
|
-
|
|
12344
|
-
|
|
12345
|
-
|
|
12346
|
-
|
|
12347
|
-
|
|
12348
|
-
|
|
12349
|
-
|
|
12350
|
-
|
|
12537
|
+
return (
|
|
12538
|
+
/*#__PURE__*/
|
|
12539
|
+
|
|
12540
|
+
/* TODO(a11y): fix accessibility */
|
|
12541
|
+
|
|
12542
|
+
/* eslint-disable */
|
|
12543
|
+
React.createElement("div", _extends$3({
|
|
12544
|
+
"data-test": "DesignSystem-ChipInput"
|
|
12545
|
+
}, baseProps, {
|
|
12546
|
+
className: ChipInputClass,
|
|
12547
|
+
onClick: onClickHandler
|
|
12548
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
12549
|
+
className: "ChipInput-wrapper"
|
|
12550
|
+
}, chips && chips.length > 0 && chipComponents, /*#__PURE__*/React.createElement("input", {
|
|
12551
|
+
"data-test": "DesignSystem-ChipInput--Input",
|
|
12552
|
+
ref: inputRef,
|
|
12553
|
+
className: "ChipInput-input",
|
|
12554
|
+
autoFocus: autoFocus,
|
|
12555
|
+
placeholder: placeholder,
|
|
12556
|
+
disabled: disabled,
|
|
12557
|
+
value: inputValue,
|
|
12558
|
+
onBlur: onBlur,
|
|
12559
|
+
onFocus: onFocus,
|
|
12560
|
+
onChange: onInputChangeHandler,
|
|
12561
|
+
onKeyDown: onKeyDownHandler
|
|
12562
|
+
})), chips.length > 0 && /*#__PURE__*/React.createElement(Icon, {
|
|
12563
|
+
"data-test": "DesignSystem-ChipInput--Icon",
|
|
12564
|
+
name: "close",
|
|
12565
|
+
appearance: "subtle",
|
|
12566
|
+
className: "ChipInput-icon",
|
|
12567
|
+
onClick: onDeleteAllHandler
|
|
12568
|
+
}))
|
|
12569
|
+
);
|
|
12351
12570
|
};
|
|
12352
12571
|
ChipInput.displayName = 'ChipInput';
|
|
12353
12572
|
ChipInput.defaultProps = {
|
|
@@ -12447,21 +12666,26 @@ var MenuItem = function MenuItem(props) {
|
|
|
12447
12666
|
};
|
|
12448
12667
|
|
|
12449
12668
|
if (!expanded && !menu.icon) return null;
|
|
12450
|
-
return
|
|
12451
|
-
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
|
|
12455
|
-
|
|
12456
|
-
|
|
12457
|
-
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12669
|
+
return (
|
|
12670
|
+
/*#__PURE__*/
|
|
12671
|
+
// TODO(a11y)
|
|
12672
|
+
// eslint-disable-next-line
|
|
12673
|
+
React.createElement("div", _extends$3({
|
|
12674
|
+
className: ItemClass
|
|
12675
|
+
}, baseProps, {
|
|
12676
|
+
onClick: onClickHandler
|
|
12677
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
12678
|
+
className: "d-flex align-items-center overflow-hidden"
|
|
12679
|
+
}, menu.icon && /*#__PURE__*/React.createElement(Icon, {
|
|
12680
|
+
"data-test": "DesignSystem-VerticalNav--Icon",
|
|
12681
|
+
className: expanded ? 'mr-4' : '',
|
|
12682
|
+
name: menu.icon,
|
|
12683
|
+
appearance: getIconAppearance(isActive, menu.disabled)
|
|
12684
|
+
}), expanded && /*#__PURE__*/React.createElement(Text, {
|
|
12685
|
+
"data-test": "DesignSystem-VerticalNav--Text",
|
|
12686
|
+
appearance: getTextAppearance(isActive, menu.disabled)
|
|
12687
|
+
}, menu.label)), expanded && renderSubMenu())
|
|
12688
|
+
);
|
|
12465
12689
|
};
|
|
12466
12690
|
MenuItem.defaultProps = {
|
|
12467
12691
|
isActive: false
|
|
@@ -12634,16 +12858,21 @@ var HorizontalNav = function HorizontalNav(props) {
|
|
|
12634
12858
|
var menuClasses = classnames((_classNames3 = {
|
|
12635
12859
|
'HorizontalNav-menu': true
|
|
12636
12860
|
}, _defineProperty$2(_classNames3, 'HorizontalNav-menu--active', isActive), _defineProperty$2(_classNames3, 'HorizontalNav-menu--disabled', menu.disabled), _classNames3));
|
|
12637
|
-
return
|
|
12638
|
-
|
|
12639
|
-
|
|
12640
|
-
|
|
12641
|
-
|
|
12642
|
-
|
|
12643
|
-
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12861
|
+
return (
|
|
12862
|
+
/*#__PURE__*/
|
|
12863
|
+
// TODO(a11y)
|
|
12864
|
+
// eslint-disable-next-line
|
|
12865
|
+
React.createElement("div", {
|
|
12866
|
+
"data-test": "DesignSystem-HorizontalNav",
|
|
12867
|
+
key: index,
|
|
12868
|
+
className: menuClasses,
|
|
12869
|
+
onClick: onClickHandler(menu)
|
|
12870
|
+
}, renderIcon(menu, isActive), /*#__PURE__*/React.createElement(Text, {
|
|
12871
|
+
appearance: getTextAppearance(isActive, menu.disabled),
|
|
12872
|
+
"data-test": "DesignSystem-HorizontalNav--Text",
|
|
12873
|
+
className: "HorizontalNav-menuText"
|
|
12874
|
+
}, menu.label))
|
|
12875
|
+
);
|
|
12647
12876
|
});
|
|
12648
12877
|
return /*#__PURE__*/React.createElement("div", _extends$3({}, baseProps, {
|
|
12649
12878
|
className: classes
|
|
@@ -12651,7 +12880,7 @@ var HorizontalNav = function HorizontalNav(props) {
|
|
|
12651
12880
|
};
|
|
12652
12881
|
|
|
12653
12882
|
var _excluded$7 = ["children", "tooltip"];
|
|
12654
|
-
var
|
|
12883
|
+
var tooltipPropsList = ['trigger', 'on', 'open', 'offset', 'onToggle', 'dark', 'customStyle', 'closeOnBackdropClick', 'hideOnReferenceEscape', 'closeOnScroll'];
|
|
12655
12884
|
var Tooltip = function Tooltip(props) {
|
|
12656
12885
|
var children = props.children,
|
|
12657
12886
|
tooltip = props.tooltip,
|
|
@@ -12673,7 +12902,7 @@ var Tooltip = function Tooltip(props) {
|
|
|
12673
12902
|
// hoverable: false
|
|
12674
12903
|
// }, propsList);
|
|
12675
12904
|
|
|
12676
|
-
Tooltip.defaultProps = Object.assign({}, filterProps(Popover.defaultProps,
|
|
12905
|
+
Tooltip.defaultProps = Object.assign({}, filterProps(Popover.defaultProps, tooltipPropsList), {
|
|
12677
12906
|
hoverable: false
|
|
12678
12907
|
});
|
|
12679
12908
|
|
|
@@ -12864,7 +13093,8 @@ var getUpdatedZIndex = function getUpdatedZIndex(ele) {
|
|
|
12864
13093
|
zIndex = Math.max(zIndex, prevZIndex + 10);
|
|
12865
13094
|
});
|
|
12866
13095
|
return zIndex > 0 ? zIndex : undefined;
|
|
12867
|
-
};
|
|
13096
|
+
}; // keyboard event, boolean?, (event: Event) => void
|
|
13097
|
+
|
|
12868
13098
|
var closeOnEscapeKeypress = function closeOnEscapeKeypress(event, isTopOverlay, onClose) {
|
|
12869
13099
|
if (event.key === 'Escape' && isTopOverlay) {
|
|
12870
13100
|
onClose(event); // prevent browser-specific escape key behavior (Safari exits fullscreen)
|
|
@@ -13760,11 +13990,16 @@ var Box = function Box(props) {
|
|
|
13760
13990
|
className = props.className;
|
|
13761
13991
|
var baseProps = extractBaseProps(props);
|
|
13762
13992
|
var MessageClass = classnames((_classNames = {}, _defineProperty$2(_classNames, 'Box', true), _defineProperty$2(_classNames, "Box--".concat(type), type), _defineProperty$2(_classNames, 'Box--typing', isTyping), _defineProperty$2(_classNames, 'Box--urgent', statusType === 'urgent'), _defineProperty$2(_classNames, "Box-".concat(type, "--withStatus"), withStatus || isTyping), _classNames), className);
|
|
13993
|
+
/* TODO(a11y): fix accessibility */
|
|
13994
|
+
|
|
13995
|
+
/* eslint-disable */
|
|
13996
|
+
|
|
13763
13997
|
return /*#__PURE__*/React.createElement("div", _extends$3({}, baseProps, {
|
|
13764
13998
|
className: MessageClass,
|
|
13765
13999
|
onClick: onClick,
|
|
13766
14000
|
"data-test": "DesignSystem-ChatMessage--Box"
|
|
13767
14001
|
}), children);
|
|
14002
|
+
/* eslint-enable */
|
|
13768
14003
|
};
|
|
13769
14004
|
Box.displayName = 'Box';
|
|
13770
14005
|
|
|
@@ -13860,7 +14095,11 @@ var EmptyState = function EmptyState(props) {
|
|
|
13860
14095
|
style: {
|
|
13861
14096
|
height: imageHeight[size]
|
|
13862
14097
|
}
|
|
13863
|
-
}, image), imageSrc && !image &&
|
|
14098
|
+
}, image), imageSrc && !image &&
|
|
14099
|
+
/*#__PURE__*/
|
|
14100
|
+
//TODO(a11y)
|
|
14101
|
+
//eslint-disable-next-line
|
|
14102
|
+
React.createElement("img", {
|
|
13864
14103
|
src: imageSrc,
|
|
13865
14104
|
height: imageHeight[size],
|
|
13866
14105
|
"data-test": "DesignSystem-EmptyState--Img"
|
|
@@ -14083,26 +14322,36 @@ var EditableInput = function EditableInput(props) {
|
|
|
14083
14322
|
};
|
|
14084
14323
|
|
|
14085
14324
|
var onChangeHandler = function onChangeHandler(eventType) {
|
|
14086
|
-
var _inputRef$current;
|
|
14087
|
-
|
|
14088
14325
|
switch (eventType) {
|
|
14089
14326
|
case 'edit':
|
|
14090
|
-
|
|
14091
|
-
|
|
14327
|
+
{
|
|
14328
|
+
var _inputRef$current;
|
|
14329
|
+
|
|
14330
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
14331
|
+
setEditing(true);
|
|
14332
|
+
setShowComponent(true);
|
|
14333
|
+
break;
|
|
14334
|
+
}
|
|
14092
14335
|
|
|
14093
14336
|
case 'hover':
|
|
14094
|
-
|
|
14095
|
-
|
|
14337
|
+
{
|
|
14338
|
+
setShowComponent(true);
|
|
14339
|
+
break;
|
|
14340
|
+
}
|
|
14096
14341
|
|
|
14097
14342
|
case 'default':
|
|
14098
|
-
|
|
14343
|
+
{
|
|
14344
|
+
setShowComponent(false);
|
|
14345
|
+
}
|
|
14099
14346
|
}
|
|
14100
14347
|
};
|
|
14101
14348
|
|
|
14102
14349
|
var inputComponent = /*#__PURE__*/React.createElement(Input, _extends$3({
|
|
14103
14350
|
defaultValue: inputValue,
|
|
14104
14351
|
placeholder: placeholder,
|
|
14105
|
-
className: InputClass
|
|
14352
|
+
className: InputClass // TODO(a11y)
|
|
14353
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
14354
|
+
,
|
|
14106
14355
|
autoFocus: editing,
|
|
14107
14356
|
size: size,
|
|
14108
14357
|
onChange: onInputChangeHandler,
|
|
@@ -14149,33 +14398,38 @@ var EditableInput = function EditableInput(props) {
|
|
|
14149
14398
|
}, value || placeholder);
|
|
14150
14399
|
};
|
|
14151
14400
|
|
|
14152
|
-
return
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
|
|
14160
|
-
|
|
14161
|
-
|
|
14162
|
-
|
|
14163
|
-
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
|
|
14168
|
-
|
|
14169
|
-
|
|
14170
|
-
|
|
14171
|
-
|
|
14172
|
-
|
|
14173
|
-
|
|
14174
|
-
|
|
14175
|
-
|
|
14176
|
-
|
|
14177
|
-
|
|
14178
|
-
|
|
14401
|
+
return (
|
|
14402
|
+
/*#__PURE__*/
|
|
14403
|
+
// TODO(a11y)
|
|
14404
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
14405
|
+
React.createElement("div", _extends$3({
|
|
14406
|
+
"data-test": "DesignSystem-EditableInput"
|
|
14407
|
+
}, baseProps, {
|
|
14408
|
+
className: EditableInputClass,
|
|
14409
|
+
onKeyDown: onKeyDown
|
|
14410
|
+
}), /*#__PURE__*/React.createElement(Editable, {
|
|
14411
|
+
onChange: onChangeHandler,
|
|
14412
|
+
editing: editing
|
|
14413
|
+
}, renderChildren()), editing && /*#__PURE__*/React.createElement("div", {
|
|
14414
|
+
className: ActionClass,
|
|
14415
|
+
"data-test": "DesignSystem-EditableInput--Actions"
|
|
14416
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
14417
|
+
icon: "clear",
|
|
14418
|
+
className: "mr-3",
|
|
14419
|
+
size: "tiny",
|
|
14420
|
+
onClick: function onClick() {
|
|
14421
|
+
setDefaultComponent(value);
|
|
14422
|
+
},
|
|
14423
|
+
"data-test": "DesignSystem-EditableInput--Discard"
|
|
14424
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
14425
|
+
icon: "check",
|
|
14426
|
+
appearance: "primary",
|
|
14427
|
+
size: "tiny",
|
|
14428
|
+
disabled: disableSaveAction,
|
|
14429
|
+
onClick: onSaveChanges,
|
|
14430
|
+
"data-test": "DesignSystem-EditableInput--Save"
|
|
14431
|
+
})))
|
|
14432
|
+
);
|
|
14179
14433
|
};
|
|
14180
14434
|
EditableInput.defaultProps = {
|
|
14181
14435
|
size: 'regular',
|
|
@@ -14250,14 +14504,21 @@ var EditableChipInput = function EditableChipInput(props) {
|
|
|
14250
14504
|
var onChangeHandler = function onChangeHandler(eventType) {
|
|
14251
14505
|
switch (eventType) {
|
|
14252
14506
|
case 'edit':
|
|
14253
|
-
|
|
14507
|
+
{
|
|
14508
|
+
setShowComponent(true);
|
|
14509
|
+
break;
|
|
14510
|
+
}
|
|
14254
14511
|
|
|
14255
14512
|
case 'hover':
|
|
14256
|
-
|
|
14513
|
+
{
|
|
14514
|
+
break;
|
|
14515
|
+
}
|
|
14257
14516
|
|
|
14258
14517
|
case 'default':
|
|
14259
|
-
|
|
14260
|
-
|
|
14518
|
+
{
|
|
14519
|
+
setShowComponent(false);
|
|
14520
|
+
break;
|
|
14521
|
+
}
|
|
14261
14522
|
}
|
|
14262
14523
|
};
|
|
14263
14524
|
|
|
@@ -14413,19 +14674,24 @@ var Step = function Step(props) {
|
|
|
14413
14674
|
|
|
14414
14675
|
var iconAppearance = completed ? 'info' : disabled ? 'disabled' : active ? 'info' : 'default';
|
|
14415
14676
|
var appearance = active ? 'link' : disabled ? 'disabled' : 'default';
|
|
14416
|
-
return
|
|
14417
|
-
|
|
14418
|
-
|
|
14419
|
-
|
|
14420
|
-
|
|
14421
|
-
|
|
14422
|
-
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
|
|
14427
|
-
|
|
14428
|
-
|
|
14677
|
+
return (
|
|
14678
|
+
/*#__PURE__*/
|
|
14679
|
+
// TODO(a11y)
|
|
14680
|
+
// eslint-disable-next-line
|
|
14681
|
+
React.createElement("div", {
|
|
14682
|
+
"data-test": "DesignSystem-Step",
|
|
14683
|
+
className: StepClass,
|
|
14684
|
+
onClick: onClickHandle
|
|
14685
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
14686
|
+
"data-test": "DesignSystem-Step--Icon",
|
|
14687
|
+
name: completed ? 'check_circle' : 'radio_button_unchecked',
|
|
14688
|
+
appearance: iconAppearance,
|
|
14689
|
+
className: "mr-3 my-4"
|
|
14690
|
+
}), label && /*#__PURE__*/React.createElement(Text, {
|
|
14691
|
+
weight: "medium",
|
|
14692
|
+
appearance: appearance
|
|
14693
|
+
}, label))
|
|
14694
|
+
);
|
|
14429
14695
|
};
|
|
14430
14696
|
Step.displayName = 'Step';
|
|
14431
14697
|
|
|
@@ -14630,13 +14896,12 @@ var Trigger = function Trigger(props) {
|
|
|
14630
14896
|
}, startLabel && /*#__PURE__*/React.createElement(Label, {
|
|
14631
14897
|
required: startInputOptions.required,
|
|
14632
14898
|
withInput: true
|
|
14633
|
-
}, startLabel), /*#__PURE__*/React.createElement(
|
|
14899
|
+
}, startLabel), /*#__PURE__*/React.createElement(X, _extends$3({
|
|
14634
14900
|
icon: "events",
|
|
14635
14901
|
placeholder: inputFormat
|
|
14636
14902
|
}, startInputOptions, {
|
|
14637
14903
|
mask: mask,
|
|
14638
|
-
value: startDate ? translateToString(inputFormat, startDate) : init
|
|
14639
|
-
? InputMask.utils.getDefaultValue(mask, startPlaceholderChar) : '',
|
|
14904
|
+
value: startDate ? translateToString(inputFormat, startDate) : init ? X.utils.getDefaultValue(mask, startPlaceholderChar) : '',
|
|
14640
14905
|
onChange: function onChange(e, val) {
|
|
14641
14906
|
onChangeHandler(e, val || '', 'start');
|
|
14642
14907
|
},
|
|
@@ -14660,13 +14925,12 @@ var Trigger = function Trigger(props) {
|
|
|
14660
14925
|
}, endLabel && /*#__PURE__*/React.createElement(Label, {
|
|
14661
14926
|
required: endInputOptions.required,
|
|
14662
14927
|
withInput: true
|
|
14663
|
-
}, endLabel), /*#__PURE__*/React.createElement(
|
|
14928
|
+
}, endLabel), /*#__PURE__*/React.createElement(X, _extends$3({
|
|
14664
14929
|
icon: "events",
|
|
14665
14930
|
placeholder: inputFormat
|
|
14666
14931
|
}, endInputOptions, {
|
|
14667
14932
|
mask: mask,
|
|
14668
|
-
value: endDate ? translateToString(inputFormat, endDate) : init
|
|
14669
|
-
? InputMask.utils.getDefaultValue(mask, endPlaceholderChar) : '',
|
|
14933
|
+
value: endDate ? translateToString(inputFormat, endDate) : init ? X.utils.getDefaultValue(mask, endPlaceholderChar) : '',
|
|
14670
14934
|
onChange: function onChange(e, val) {
|
|
14671
14935
|
onChangeHandler(e, val || '', 'end');
|
|
14672
14936
|
},
|
|
@@ -14704,9 +14968,8 @@ var SingleInputTrigger = function SingleInputTrigger(props) {
|
|
|
14704
14968
|
var errorMessage = inputOptions.caption === undefined ? 'Invalid value' : inputOptions.caption;
|
|
14705
14969
|
var label = inputOptions.label;
|
|
14706
14970
|
var _inputOptions$placeho = inputOptions.placeholderChar,
|
|
14707
|
-
placeholderChar = _inputOptions$placeho === void 0 ? '_' : _inputOptions$placeho;
|
|
14708
|
-
|
|
14709
|
-
var defaultValue = InputMask.utils.getDefaultValue(mask, placeholderChar).split(' - ');
|
|
14971
|
+
placeholderChar = _inputOptions$placeho === void 0 ? '_' : _inputOptions$placeho;
|
|
14972
|
+
var defaultValue = X.utils.getDefaultValue(mask, placeholderChar).split(' - ');
|
|
14710
14973
|
var sValue = startValue || defaultValue[0];
|
|
14711
14974
|
var eValue = endValue || defaultValue[1];
|
|
14712
14975
|
|
|
@@ -14797,7 +15060,7 @@ var SingleInputTrigger = function SingleInputTrigger(props) {
|
|
|
14797
15060
|
}, /*#__PURE__*/React.createElement(Column, null, label && /*#__PURE__*/React.createElement(Label, {
|
|
14798
15061
|
required: inputOptions.required,
|
|
14799
15062
|
withInput: true
|
|
14800
|
-
}, label), /*#__PURE__*/React.createElement(
|
|
15063
|
+
}, label), /*#__PURE__*/React.createElement(X, _extends$3({
|
|
14801
15064
|
icon: "events",
|
|
14802
15065
|
placeholder: "".concat(inputFormat, " - ").concat(inputFormat)
|
|
14803
15066
|
}, inputOptions, {
|
|
@@ -15214,7 +15477,17 @@ var DateRangePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
15214
15477
|
}]);
|
|
15215
15478
|
|
|
15216
15479
|
return DateRangePicker;
|
|
15217
|
-
}(React.Component);
|
|
15480
|
+
}(React.Component);
|
|
15481
|
+
|
|
15482
|
+
_defineProperty$2(DateRangePicker, "utils", {
|
|
15483
|
+
getCurrentWeek: getCurrentWeek,
|
|
15484
|
+
getPreviousWeek: getPreviousWeek,
|
|
15485
|
+
getPreviousMonth: getPreviousMonth,
|
|
15486
|
+
getPrevious90Days: getPrevious90Days,
|
|
15487
|
+
getCustomDates: getCustomDates,
|
|
15488
|
+
getCurrentYear: getCurrentYear,
|
|
15489
|
+
getCurrentMonth: getCurrentMonth
|
|
15490
|
+
});
|
|
15218
15491
|
|
|
15219
15492
|
_defineProperty$2(DateRangePicker, "defaultProps", _objectSpread2(_objectSpread2({}, Calendar.defaultProps), {}, {
|
|
15220
15493
|
children: /*#__PURE__*/React.createElement(React.Fragment, null),
|
|
@@ -15235,16 +15508,6 @@ _defineProperty$2(DateRangePicker, "defaultProps", _objectSpread2(_objectSpread2
|
|
|
15235
15508
|
}
|
|
15236
15509
|
}));
|
|
15237
15510
|
|
|
15238
|
-
DateRangePicker.utils = {
|
|
15239
|
-
getCurrentWeek: getCurrentWeek,
|
|
15240
|
-
getPreviousWeek: getPreviousWeek,
|
|
15241
|
-
getPreviousMonth: getPreviousMonth,
|
|
15242
|
-
getPrevious90Days: getPrevious90Days,
|
|
15243
|
-
getCustomDates: getCustomDates,
|
|
15244
|
-
getCurrentYear: getCurrentYear,
|
|
15245
|
-
getCurrentMonth: getCurrentMonth
|
|
15246
|
-
};
|
|
15247
|
-
|
|
15248
15511
|
var TabsWrapper = function TabsWrapper(props) {
|
|
15249
15512
|
var children = props.children,
|
|
15250
15513
|
onTabChange = props.onTabChange,
|
|
@@ -15275,14 +15538,19 @@ var TabsWrapper = function TabsWrapper(props) {
|
|
|
15275
15538
|
label = _child$props.label,
|
|
15276
15539
|
disabled = _child$props.disabled;
|
|
15277
15540
|
var tabHeaderClass = classnames((_classNames2 = {}, _defineProperty$2(_classNames2, 'Tab', true), _defineProperty$2(_classNames2, 'Tab--disabled', disabled), _defineProperty$2(_classNames2, 'Tab--active', !disabled && active === index), _classNames2));
|
|
15278
|
-
return
|
|
15279
|
-
|
|
15280
|
-
|
|
15281
|
-
|
|
15282
|
-
|
|
15283
|
-
|
|
15284
|
-
|
|
15285
|
-
|
|
15541
|
+
return (
|
|
15542
|
+
/*#__PURE__*/
|
|
15543
|
+
// TODO(a11y)
|
|
15544
|
+
// eslint-disable-next-line
|
|
15545
|
+
React.createElement("div", {
|
|
15546
|
+
"data-test": "DesignSystem-Tabs--Header",
|
|
15547
|
+
key: index,
|
|
15548
|
+
className: tabHeaderClass,
|
|
15549
|
+
onClick: function onClick() {
|
|
15550
|
+
return !disabled && tabClickHandler(index);
|
|
15551
|
+
}
|
|
15552
|
+
}, label)
|
|
15553
|
+
);
|
|
15286
15554
|
});
|
|
15287
15555
|
return /*#__PURE__*/React.createElement("div", _extends$3({
|
|
15288
15556
|
"data-test": "DesignSystem-TabsWrapper"
|
|
@@ -15432,21 +15700,26 @@ var Tabs = function Tabs(props) {
|
|
|
15432
15700
|
var currentTabProp = children && 'props' in tab ? tab.props : tab;
|
|
15433
15701
|
var disabled = currentTabProp.disabled;
|
|
15434
15702
|
var tabHeaderClass = classnames((_classNames4 = {}, _defineProperty$2(_classNames4, 'Tab', true), _defineProperty$2(_classNames4, 'Tab--disabled', disabled), _defineProperty$2(_classNames4, 'Tab--active', !disabled && activeIndex === index), _classNames4));
|
|
15435
|
-
return
|
|
15436
|
-
|
|
15437
|
-
|
|
15438
|
-
|
|
15439
|
-
"
|
|
15440
|
-
|
|
15441
|
-
|
|
15442
|
-
|
|
15443
|
-
|
|
15444
|
-
|
|
15445
|
-
|
|
15446
|
-
|
|
15447
|
-
|
|
15448
|
-
|
|
15449
|
-
|
|
15703
|
+
return (
|
|
15704
|
+
/*#__PURE__*/
|
|
15705
|
+
// TODO(a11y)
|
|
15706
|
+
// eslint-disable-next-line
|
|
15707
|
+
React.createElement("div", {
|
|
15708
|
+
ref: function ref(element) {
|
|
15709
|
+
return element && !disabled && tabRefs.push(element);
|
|
15710
|
+
},
|
|
15711
|
+
"data-test": "DesignSystem-Tabs--Tab",
|
|
15712
|
+
key: index,
|
|
15713
|
+
className: tabHeaderClass,
|
|
15714
|
+
onClick: function onClick() {
|
|
15715
|
+
return !disabled && tabClickHandler(index);
|
|
15716
|
+
},
|
|
15717
|
+
onKeyDown: function onKeyDown(event) {
|
|
15718
|
+
return tabKeyDownHandler(event, index);
|
|
15719
|
+
},
|
|
15720
|
+
tabIndex: activeIndex === index ? 0 : -1
|
|
15721
|
+
}, renderTab(currentTabProp, index))
|
|
15722
|
+
);
|
|
15450
15723
|
});
|
|
15451
15724
|
return /*#__PURE__*/React.createElement("div", _extends$3({
|
|
15452
15725
|
"data-test": "DesignSystem-Tabs"
|
|
@@ -16013,10 +16286,8 @@ var DropzoneBase = function DropzoneBase(props) {
|
|
|
16013
16286
|
if (inputRef.current) {
|
|
16014
16287
|
dispatch({
|
|
16015
16288
|
type: 'openDialog'
|
|
16016
|
-
});
|
|
16017
|
-
|
|
16018
|
-
inputRef.current.value = null; // @ts-ignore
|
|
16019
|
-
|
|
16289
|
+
});
|
|
16290
|
+
inputRef.current.value = '';
|
|
16020
16291
|
inputRef.current.click();
|
|
16021
16292
|
}
|
|
16022
16293
|
}, [dispatch]);
|
|
@@ -16025,10 +16296,9 @@ var DropzoneBase = function DropzoneBase(props) {
|
|
|
16025
16296
|
if (isFileDialogActive) {
|
|
16026
16297
|
setTimeout(function () {
|
|
16027
16298
|
if (inputRef.current) {
|
|
16028
|
-
// @ts-ignore
|
|
16029
16299
|
var _files = inputRef.current.files;
|
|
16030
16300
|
|
|
16031
|
-
if (!_files.length) {
|
|
16301
|
+
if (!_files || !_files.length) {
|
|
16032
16302
|
dispatch({
|
|
16033
16303
|
type: 'closeDialog'
|
|
16034
16304
|
});
|
|
@@ -16050,7 +16320,6 @@ var DropzoneBase = function DropzoneBase(props) {
|
|
|
16050
16320
|
}, [inputRef, isFileDialogActive, onFileDialogCancel]); // Cb to open the file dialog when SPACE/ENTER occurs on the dropzone
|
|
16051
16321
|
|
|
16052
16322
|
var onKeyDownCb = useCallback(function (event) {
|
|
16053
|
-
// @ts-ignore
|
|
16054
16323
|
if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {
|
|
16055
16324
|
return;
|
|
16056
16325
|
}
|
|
@@ -16074,8 +16343,8 @@ var DropzoneBase = function DropzoneBase(props) {
|
|
|
16074
16343
|
var dragTargetsRef = useRef([]);
|
|
16075
16344
|
|
|
16076
16345
|
var onDocumentDrop = function onDocumentDrop(event) {
|
|
16077
|
-
//
|
|
16078
|
-
if (rootRef.current && rootRef.current.contains(event.target)) {
|
|
16346
|
+
// Not every event target type is element so we have to check if it is.
|
|
16347
|
+
if (event.target instanceof HTMLDivElement && rootRef.current && rootRef.current.contains(event.target)) {
|
|
16079
16348
|
return;
|
|
16080
16349
|
}
|
|
16081
16350
|
|
|
@@ -16098,8 +16367,7 @@ var DropzoneBase = function DropzoneBase(props) {
|
|
|
16098
16367
|
}, [rootRef, preventDropOnDocument]);
|
|
16099
16368
|
var onDragEnterCb = useCallback(function (event) {
|
|
16100
16369
|
event.preventDefault();
|
|
16101
|
-
event.persist();
|
|
16102
|
-
|
|
16370
|
+
event.persist();
|
|
16103
16371
|
dragTargetsRef.current = [].concat(_toConsumableArray(dragTargetsRef.current), [event.target]);
|
|
16104
16372
|
|
|
16105
16373
|
if (isEvtWithFiles(event)) {
|
|
@@ -16141,11 +16409,9 @@ var DropzoneBase = function DropzoneBase(props) {
|
|
|
16141
16409
|
var onDragLeaveCb = useCallback(function (event) {
|
|
16142
16410
|
event.preventDefault();
|
|
16143
16411
|
event.persist();
|
|
16144
|
-
var targets = dragTargetsRef.current.filter(
|
|
16145
|
-
function (target) {
|
|
16412
|
+
var targets = dragTargetsRef.current.filter(function (target) {
|
|
16146
16413
|
return rootRef.current && rootRef.current.contains(target);
|
|
16147
|
-
});
|
|
16148
|
-
|
|
16414
|
+
});
|
|
16149
16415
|
var targetIdx = targets.indexOf(event.target);
|
|
16150
16416
|
|
|
16151
16417
|
if (targetIdx !== -1) {
|
|
@@ -16204,11 +16470,12 @@ var DropzoneBase = function DropzoneBase(props) {
|
|
|
16204
16470
|
errors = errors.concat(customErrors);
|
|
16205
16471
|
}
|
|
16206
16472
|
|
|
16473
|
+
var filteredErrors = errors.filter(function (e) {
|
|
16474
|
+
return e;
|
|
16475
|
+
});
|
|
16207
16476
|
fileRejections.push({
|
|
16208
16477
|
file: file,
|
|
16209
|
-
errors:
|
|
16210
|
-
return e;
|
|
16211
|
-
})
|
|
16478
|
+
errors: filteredErrors
|
|
16212
16479
|
});
|
|
16213
16480
|
}
|
|
16214
16481
|
});
|
|
@@ -16237,26 +16504,18 @@ var DropzoneBase = function DropzoneBase(props) {
|
|
|
16237
16504
|
});
|
|
16238
16505
|
}, [multiple, accept, minSize, maxSize, getFilesFromEvent, onDrop, onDropAccepted, onDropRejected]);
|
|
16239
16506
|
|
|
16240
|
-
var composeHandler = function composeHandler(fn) {
|
|
16241
|
-
return disabled ? null : fn;
|
|
16242
|
-
};
|
|
16243
|
-
|
|
16244
|
-
var composeKeyboardHandler = function composeKeyboardHandler(_fn) {
|
|
16245
|
-
return null;
|
|
16246
|
-
};
|
|
16247
|
-
|
|
16248
16507
|
var composeDragHandler = function composeDragHandler(fn) {
|
|
16249
|
-
return
|
|
16508
|
+
return disabled ? null : fn;
|
|
16250
16509
|
};
|
|
16251
16510
|
|
|
16252
16511
|
var getRootProps = useMemo(function () {
|
|
16253
16512
|
return function () {
|
|
16254
16513
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
16255
16514
|
_ref$refKey = _ref.refKey,
|
|
16256
|
-
refKey = _ref$refKey === void 0 ? 'ref' : _ref$refKey
|
|
16257
|
-
|
|
16258
|
-
|
|
16259
|
-
|
|
16515
|
+
refKey = _ref$refKey === void 0 ? 'ref' : _ref$refKey;
|
|
16516
|
+
_ref.onKeyDown;
|
|
16517
|
+
_ref.onFocus;
|
|
16518
|
+
_ref.onBlur;
|
|
16260
16519
|
_ref.onClick;
|
|
16261
16520
|
var onDragEnterCallback = _ref.onDragEnterCallback,
|
|
16262
16521
|
onDragOverCallback = _ref.onDragOverCallback,
|
|
@@ -16265,10 +16524,6 @@ var DropzoneBase = function DropzoneBase(props) {
|
|
|
16265
16524
|
rest = _objectWithoutProperties$1(_ref, _excluded$2);
|
|
16266
16525
|
|
|
16267
16526
|
return _objectSpread2(_defineProperty$2({
|
|
16268
|
-
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
16269
|
-
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
16270
|
-
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
16271
|
-
// onClick: composeHandler(composeEventHandlers(onClick, onClickCb)),
|
|
16272
16527
|
onDragEnter: composeDragHandler(composeEventHandlers(onDragEnterCallback, onDragEnterCb)),
|
|
16273
16528
|
onDragOver: composeDragHandler(composeEventHandlers(onDragOverCallback, onDragOverCb)),
|
|
16274
16529
|
onDragLeave: composeDragHandler(composeEventHandlers(onDragLeaveCallback, onDragLeaveCb)),
|
|
@@ -16295,8 +16550,8 @@ var DropzoneBase = function DropzoneBase(props) {
|
|
|
16295
16550
|
style: {
|
|
16296
16551
|
display: 'none'
|
|
16297
16552
|
},
|
|
16298
|
-
onChange:
|
|
16299
|
-
onClick:
|
|
16553
|
+
onChange: composeDragHandler(composeEventHandlers(onChange, onDropCb)),
|
|
16554
|
+
onClick: composeDragHandler(composeEventHandlers(onClick, onInputElementClick)),
|
|
16300
16555
|
autoComplete: 'off',
|
|
16301
16556
|
tabIndex: -1
|
|
16302
16557
|
}, refKey, inputRef);
|
|
@@ -16330,7 +16585,7 @@ var DropzoneBase = function DropzoneBase(props) {
|
|
|
16330
16585
|
draggedFiles: draggedFiles,
|
|
16331
16586
|
fileError: fileError,
|
|
16332
16587
|
isFocused: isFocused && !disabled,
|
|
16333
|
-
open:
|
|
16588
|
+
open: composeDragHandler(openFileDialog)
|
|
16334
16589
|
});
|
|
16335
16590
|
};
|
|
16336
16591
|
DropzoneBase.displayName = 'DropzoneBase';
|
|
@@ -16407,42 +16662,42 @@ var Dropzone = function Dropzone(props) {
|
|
|
16407
16662
|
var WrapperClass = classnames((_classNames3 = {}, _defineProperty$2(_classNames3, 'DropzoneWrapper', true), _defineProperty$2(_classNames3, "DropzoneWrapper--".concat(type), true), _classNames3));
|
|
16408
16663
|
|
|
16409
16664
|
var renderDropzone = function renderDropzone() {
|
|
16410
|
-
if (isDragReject) return /*#__PURE__*/
|
|
16665
|
+
if (isDragReject) return /*#__PURE__*/React.createElement(DropzoneError, {
|
|
16411
16666
|
type: type,
|
|
16412
16667
|
error: fileErrorMessages[fileError]
|
|
16413
16668
|
});
|
|
16414
|
-
if (isDragActive) return /*#__PURE__*/
|
|
16669
|
+
if (isDragActive) return /*#__PURE__*/React.createElement(DropzoneActive, {
|
|
16415
16670
|
type: type
|
|
16416
16671
|
});
|
|
16417
|
-
return /*#__PURE__*/
|
|
16672
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, type !== 'tight' && /*#__PURE__*/React.createElement(Icon, {
|
|
16418
16673
|
name: "backup",
|
|
16419
16674
|
size: 64,
|
|
16420
16675
|
className: IconClass
|
|
16421
|
-
}), /*#__PURE__*/
|
|
16676
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
16422
16677
|
className: WrapperClass,
|
|
16423
16678
|
"data-test": "DesignSystem-Dropzone-Wrapper"
|
|
16424
|
-
}, /*#__PURE__*/
|
|
16679
|
+
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Text, {
|
|
16425
16680
|
size: "large",
|
|
16426
16681
|
weight: "strong",
|
|
16427
16682
|
className: "mr-2",
|
|
16428
16683
|
appearance: disabled ? 'disabled' : 'default'
|
|
16429
|
-
}, "Drag your files here or"), /*#__PURE__*/
|
|
16684
|
+
}, "Drag your files here or"), /*#__PURE__*/React.createElement("span", {
|
|
16430
16685
|
className: "cursor-pointer",
|
|
16431
16686
|
onClick: open
|
|
16432
|
-
}, /*#__PURE__*/
|
|
16687
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
16433
16688
|
size: "large",
|
|
16434
16689
|
weight: "strong",
|
|
16435
16690
|
appearance: disabled ? 'disabled' : 'link'
|
|
16436
|
-
}, "browse files")), /*#__PURE__*/
|
|
16691
|
+
}, "browse files")), /*#__PURE__*/React.createElement("input", getInputProps())), formatLabel && /*#__PURE__*/React.createElement(Text, {
|
|
16437
16692
|
appearance: disabled ? 'disabled' : 'subtle'
|
|
16438
|
-
}, formatLabel), sizeLabel && /*#__PURE__*/
|
|
16693
|
+
}, formatLabel), sizeLabel && /*#__PURE__*/React.createElement(Text, {
|
|
16439
16694
|
appearance: disabled ? 'disabled' : 'subtle'
|
|
16440
|
-
}, sizeLabel), sampleFileLink && /*#__PURE__*/
|
|
16695
|
+
}, sizeLabel), sampleFileLink && /*#__PURE__*/React.createElement("div", {
|
|
16441
16696
|
className: "mt-5"
|
|
16442
16697
|
}, sampleFileLink)));
|
|
16443
16698
|
};
|
|
16444
16699
|
|
|
16445
|
-
return /*#__PURE__*/
|
|
16700
|
+
return /*#__PURE__*/React.createElement("div", _extends$3({}, getRootProps(), baseProps, {
|
|
16446
16701
|
className: DropzoneClass,
|
|
16447
16702
|
"data-test": "DesignSystem-Dropzone"
|
|
16448
16703
|
}), renderDropzone());
|
|
@@ -16597,38 +16852,43 @@ var FileUploaderItem = function FileUploaderItem(props) {
|
|
|
16597
16852
|
var name = file.name;
|
|
16598
16853
|
var baseProps = extractBaseProps(props);
|
|
16599
16854
|
var FileItemClass = classnames(_defineProperty$2({}, 'FileUploaderItem', true), className);
|
|
16600
|
-
return
|
|
16601
|
-
|
|
16602
|
-
|
|
16603
|
-
|
|
16604
|
-
|
|
16605
|
-
|
|
16606
|
-
|
|
16607
|
-
|
|
16608
|
-
|
|
16609
|
-
|
|
16610
|
-
|
|
16611
|
-
|
|
16612
|
-
|
|
16613
|
-
|
|
16614
|
-
|
|
16615
|
-
|
|
16616
|
-
|
|
16617
|
-
|
|
16618
|
-
|
|
16619
|
-
|
|
16620
|
-
|
|
16621
|
-
|
|
16622
|
-
|
|
16623
|
-
|
|
16624
|
-
|
|
16625
|
-
|
|
16626
|
-
|
|
16627
|
-
|
|
16628
|
-
|
|
16629
|
-
|
|
16630
|
-
|
|
16631
|
-
|
|
16855
|
+
return (
|
|
16856
|
+
/*#__PURE__*/
|
|
16857
|
+
// TODO(a11y)
|
|
16858
|
+
// eslint-disable-next-line
|
|
16859
|
+
React.createElement("div", _extends$3({}, baseProps, {
|
|
16860
|
+
"data-test": "DesignSystem-FileUploader--Item",
|
|
16861
|
+
className: FileItemClass,
|
|
16862
|
+
onClick: function onClick() {
|
|
16863
|
+
return _onClick && _onClick(file, id);
|
|
16864
|
+
}
|
|
16865
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
16866
|
+
className: "FileUploaderItem-file"
|
|
16867
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
16868
|
+
className: "FileUploaderItem-text",
|
|
16869
|
+
appearance: status === 'completed' ? 'default' : 'subtle'
|
|
16870
|
+
}, name), /*#__PURE__*/React.createElement("div", {
|
|
16871
|
+
className: "d-flex align-items-center"
|
|
16872
|
+
}, /*#__PURE__*/React.createElement(FileUploaderStatus, {
|
|
16873
|
+
file: file,
|
|
16874
|
+
id: id,
|
|
16875
|
+
status: status,
|
|
16876
|
+
progress: progress,
|
|
16877
|
+
onRetry: function onRetry() {
|
|
16878
|
+
return _onRetry && _onRetry(file, id);
|
|
16879
|
+
}
|
|
16880
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
16881
|
+
"data-test": "DesignSystem-FileUploader--CancelButton",
|
|
16882
|
+
appearance: "transparent",
|
|
16883
|
+
size: "regular",
|
|
16884
|
+
onClick: function onClick() {
|
|
16885
|
+
return onDelete && onDelete(file, id);
|
|
16886
|
+
},
|
|
16887
|
+
icon: "close"
|
|
16888
|
+
}))), status === 'error' && /*#__PURE__*/React.createElement(Caption, {
|
|
16889
|
+
error: true
|
|
16890
|
+
}, errorMessage))
|
|
16891
|
+
);
|
|
16632
16892
|
};
|
|
16633
16893
|
FileUploaderItem.defaultProps = {
|
|
16634
16894
|
status: 'completed',
|
|
@@ -16922,7 +17182,7 @@ var defaultProps$1 = {
|
|
|
16922
17182
|
showFilters: true
|
|
16923
17183
|
};
|
|
16924
17184
|
|
|
16925
|
-
var context = /*#__PURE__*/
|
|
17185
|
+
var context = /*#__PURE__*/React.createContext(_objectSpread2(_objectSpread2({}, defaultProps$1), {}, {
|
|
16926
17186
|
ref: null
|
|
16927
17187
|
}));
|
|
16928
17188
|
var GridProvider = context.Provider;
|
|
@@ -17124,7 +17384,11 @@ var HeaderCell = function HeaderCell(props) {
|
|
|
17124
17384
|
return onMenuChange(name, selected);
|
|
17125
17385
|
},
|
|
17126
17386
|
minWidth: 176
|
|
17127
|
-
}))), schema.resizable &&
|
|
17387
|
+
}))), schema.resizable &&
|
|
17388
|
+
/*#__PURE__*/
|
|
17389
|
+
//TODO(a11y)
|
|
17390
|
+
//eslint-disable-next-line
|
|
17391
|
+
React.createElement("span", {
|
|
17128
17392
|
className: "Grid-cellResize",
|
|
17129
17393
|
onMouseDown: function onMouseDown() {
|
|
17130
17394
|
resizeCol({
|
|
@@ -17185,18 +17449,19 @@ var BodyCell = function BodyCell(props) {
|
|
|
17185
17449
|
|
|
17186
17450
|
var Cell = function Cell(props) {
|
|
17187
17451
|
var context$1 = React.useContext(context);
|
|
17188
|
-
var
|
|
17189
|
-
|
|
17190
|
-
|
|
17191
|
-
|
|
17192
|
-
|
|
17193
|
-
|
|
17194
|
-
|
|
17195
|
-
|
|
17196
|
-
|
|
17197
|
-
|
|
17198
|
-
|
|
17199
|
-
|
|
17452
|
+
var _ref = props,
|
|
17453
|
+
isHead = _ref.isHead,
|
|
17454
|
+
firstCell = _ref.firstCell,
|
|
17455
|
+
schema = _ref.schema,
|
|
17456
|
+
data = _ref.data,
|
|
17457
|
+
rowIndex = _ref.rowIndex,
|
|
17458
|
+
colIndex = _ref.colIndex,
|
|
17459
|
+
expandedState = _ref.expandedState,
|
|
17460
|
+
onSelectAll = _ref.onSelectAll,
|
|
17461
|
+
onMenuChange = _ref.onMenuChange,
|
|
17462
|
+
onFilterChange = _ref.onFilterChange,
|
|
17463
|
+
updateColumnSchema = _ref.updateColumnSchema,
|
|
17464
|
+
reorderColumn = _ref.reorderColumn;
|
|
17200
17465
|
var draggable = context$1.draggable,
|
|
17201
17466
|
separator = context$1.separator,
|
|
17202
17467
|
nestedRows = context$1.nestedRows,
|
|
@@ -17246,7 +17511,7 @@ var Cell = function Cell(props) {
|
|
|
17246
17511
|
name: name,
|
|
17247
17512
|
type: pinned || ''
|
|
17248
17513
|
};
|
|
17249
|
-
if (from.type === to.type) reorderColumn(from.name, to.name);
|
|
17514
|
+
if (from.type === to.type && reorderColumn) reorderColumn(from.name, to.name);
|
|
17250
17515
|
}
|
|
17251
17516
|
},
|
|
17252
17517
|
style: {
|
|
@@ -17699,10 +17964,10 @@ var VirtualScroll = /*#__PURE__*/function (_React$Component) {
|
|
|
17699
17964
|
length = _this$props2.length,
|
|
17700
17965
|
buffer = _this$props2.buffer;
|
|
17701
17966
|
_this$props2.offset;
|
|
17702
|
-
_this$props2.
|
|
17967
|
+
_this$props2.renderItems;
|
|
17703
17968
|
_this$props2.minItemHeight;
|
|
17704
17969
|
var forwardRef = _this$props2.forwardRef,
|
|
17705
|
-
rest = _objectWithoutProperties(_this$props2, ["totalLength", "length", "buffer", "offset", "
|
|
17970
|
+
rest = _objectWithoutProperties(_this$props2, ["totalLength", "length", "buffer", "offset", "renderItems", "minItemHeight", "forwardRef"]);
|
|
17706
17971
|
|
|
17707
17972
|
var _this$state = this.state,
|
|
17708
17973
|
init = _this$state.init,
|
|
@@ -17746,6 +18011,7 @@ _defineProperty(VirtualScroll, "defaultProps", {
|
|
|
17746
18011
|
|
|
17747
18012
|
var index = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
17748
18013
|
return /*#__PURE__*/React.createElement(VirtualScroll, _extends({
|
|
18014
|
+
key: props.totalLength,
|
|
17749
18015
|
forwardRef: ref
|
|
17750
18016
|
}, props));
|
|
17751
18017
|
});
|
|
@@ -17794,17 +18060,22 @@ var GridRow = function GridRow(props) {
|
|
|
17794
18060
|
|
|
17795
18061
|
var renderCheckbox = function renderCheckbox(show) {
|
|
17796
18062
|
if (!show || !withCheckbox) return null;
|
|
17797
|
-
return
|
|
17798
|
-
|
|
17799
|
-
|
|
17800
|
-
|
|
17801
|
-
|
|
17802
|
-
|
|
17803
|
-
|
|
17804
|
-
|
|
17805
|
-
|
|
17806
|
-
}
|
|
17807
|
-
|
|
18063
|
+
return (
|
|
18064
|
+
/*#__PURE__*/
|
|
18065
|
+
// TODO(a11y)
|
|
18066
|
+
// eslint-disable-next-line
|
|
18067
|
+
React.createElement("div", {
|
|
18068
|
+
className: "Grid-cell Grid-cell--body Grid-cell--checkbox",
|
|
18069
|
+
onClick: function onClick(e) {
|
|
18070
|
+
return e.stopPropagation();
|
|
18071
|
+
}
|
|
18072
|
+
}, loading ? /*#__PURE__*/React.createElement(Placeholder, null) : /*#__PURE__*/React.createElement(Checkbox, {
|
|
18073
|
+
checked: !!data._selected,
|
|
18074
|
+
onChange: function onChange(event) {
|
|
18075
|
+
onSelect(rI, event.target.checked);
|
|
18076
|
+
}
|
|
18077
|
+
}))
|
|
18078
|
+
);
|
|
17808
18079
|
};
|
|
17809
18080
|
|
|
17810
18081
|
var renderSchema = function renderSchema(currSchema, shouldRenderCheckbox, pinned) {
|
|
@@ -19174,6 +19445,7 @@ var Table = /*#__PURE__*/function (_React$Component) {
|
|
|
19174
19445
|
}, headerAttr), headerChildren)), /*#__PURE__*/React.createElement("div", {
|
|
19175
19446
|
className: "Table-grid"
|
|
19176
19447
|
}, /*#__PURE__*/React.createElement(Grid, _extends$3({}, this.state, {
|
|
19448
|
+
key: this.state.searchTerm,
|
|
19177
19449
|
updateData: this.updateData,
|
|
19178
19450
|
updateSchema: this.updateSchema,
|
|
19179
19451
|
updateSortingList: this.updateSortingList,
|
|
@@ -19331,16 +19603,21 @@ var VerticalNavigation = function VerticalNavigation(props) {
|
|
|
19331
19603
|
|
|
19332
19604
|
var isActive = isMenuActive(menus, subMenu, active);
|
|
19333
19605
|
var subMenuClasses = classnames(menuClasses, (_classNames2 = {}, _defineProperty$2(_classNames2, 'Navigation-menu--subMenu', true), _defineProperty$2(_classNames2, 'Navigation-menu--active', isActive), _classNames2));
|
|
19334
|
-
return
|
|
19335
|
-
|
|
19336
|
-
|
|
19337
|
-
|
|
19338
|
-
|
|
19339
|
-
|
|
19340
|
-
|
|
19341
|
-
|
|
19342
|
-
|
|
19343
|
-
|
|
19606
|
+
return (
|
|
19607
|
+
/*#__PURE__*/
|
|
19608
|
+
// TODO(a11y)
|
|
19609
|
+
// eslint-disable-next-line
|
|
19610
|
+
React.createElement("div", {
|
|
19611
|
+
"data-test": "DesignSystem-Navigation-VerticalNavigation--subMenu",
|
|
19612
|
+
key: ind,
|
|
19613
|
+
className: subMenuClasses,
|
|
19614
|
+
onClick: function onClick() {
|
|
19615
|
+
return onClickHandler(subMenu);
|
|
19616
|
+
}
|
|
19617
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
19618
|
+
appearance: getTextAppearance(isActive, subMenu.disabled)
|
|
19619
|
+
}, subMenu.label))
|
|
19620
|
+
);
|
|
19344
19621
|
})));
|
|
19345
19622
|
});
|
|
19346
19623
|
var footerClasses = classnames(_defineProperty$2({
|
|
@@ -19550,32 +19827,37 @@ var FileListItem = function FileListItem(props) {
|
|
|
19550
19827
|
}
|
|
19551
19828
|
};
|
|
19552
19829
|
|
|
19553
|
-
return
|
|
19554
|
-
|
|
19555
|
-
|
|
19556
|
-
|
|
19557
|
-
|
|
19558
|
-
|
|
19559
|
-
|
|
19560
|
-
|
|
19561
|
-
|
|
19562
|
-
|
|
19563
|
-
|
|
19564
|
-
|
|
19565
|
-
|
|
19566
|
-
|
|
19567
|
-
|
|
19568
|
-
|
|
19569
|
-
|
|
19570
|
-
|
|
19571
|
-
|
|
19572
|
-
|
|
19573
|
-
|
|
19574
|
-
|
|
19575
|
-
|
|
19576
|
-
|
|
19577
|
-
|
|
19578
|
-
|
|
19830
|
+
return (
|
|
19831
|
+
/*#__PURE__*/
|
|
19832
|
+
// TODO(a11y)
|
|
19833
|
+
// eslint-disable-next-line
|
|
19834
|
+
React.createElement("div", _extends$3({}, baseProps, {
|
|
19835
|
+
className: FileItemClass,
|
|
19836
|
+
onClick: onClickHandler,
|
|
19837
|
+
"data-test": "DesignSystem-FileListItem"
|
|
19838
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
19839
|
+
className: "FileItem-file"
|
|
19840
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19841
|
+
className: "FileItem-fileContent"
|
|
19842
|
+
}, /*#__PURE__*/React.createElement(FileIcon, {
|
|
19843
|
+
file: file,
|
|
19844
|
+
status: status,
|
|
19845
|
+
progress: progress
|
|
19846
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
19847
|
+
"data-test": "DesignSystem-FileListItem--Name",
|
|
19848
|
+
className: "FileItem-text",
|
|
19849
|
+
appearance: status === 'completed' ? 'default' : 'subtle'
|
|
19850
|
+
}, name)), /*#__PURE__*/React.createElement("div", {
|
|
19851
|
+
className: "FileItem-actions"
|
|
19852
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
19853
|
+
className: "FileItem-size",
|
|
19854
|
+
appearance: 'subtle',
|
|
19855
|
+
"data-test": "DesignSystem-FileListItem--Size"
|
|
19856
|
+
}, fileSize || file.size), !!actions && actions)), status === 'error' && /*#__PURE__*/React.createElement(Caption, {
|
|
19857
|
+
className: 'FileItem-error',
|
|
19858
|
+
error: true
|
|
19859
|
+
}, errorMessage))
|
|
19860
|
+
);
|
|
19579
19861
|
};
|
|
19580
19862
|
FileListItem.defaultProps = {
|
|
19581
19863
|
progress: 0,
|
|
@@ -19739,54 +20021,62 @@ var VerificationCodeInput = function VerificationCodeInput(props) {
|
|
|
19739
20021
|
|
|
19740
20022
|
switch (e.key) {
|
|
19741
20023
|
case KEY_CODE.backspace:
|
|
19742
|
-
|
|
20024
|
+
{
|
|
20025
|
+
e.preventDefault();
|
|
19743
20026
|
|
|
19744
|
-
|
|
20027
|
+
var vals = _toConsumableArray(values);
|
|
19745
20028
|
|
|
19746
|
-
|
|
19747
|
-
|
|
19748
|
-
|
|
19749
|
-
|
|
19750
|
-
|
|
19751
|
-
|
|
19752
|
-
|
|
19753
|
-
|
|
19754
|
-
|
|
19755
|
-
|
|
20029
|
+
if (values[index]) {
|
|
20030
|
+
vals[index] = '';
|
|
20031
|
+
setValues(vals);
|
|
20032
|
+
} else if (prev && prev.current) {
|
|
20033
|
+
vals[prevIndex] = '';
|
|
20034
|
+
prev.current.focus({
|
|
20035
|
+
preventScroll: true
|
|
20036
|
+
});
|
|
20037
|
+
setValues(vals);
|
|
20038
|
+
}
|
|
19756
20039
|
|
|
19757
|
-
|
|
20040
|
+
break;
|
|
20041
|
+
}
|
|
19758
20042
|
|
|
19759
20043
|
case KEY_CODE.left:
|
|
19760
|
-
|
|
20044
|
+
{
|
|
20045
|
+
e.preventDefault();
|
|
19761
20046
|
|
|
19762
|
-
|
|
19763
|
-
|
|
19764
|
-
|
|
19765
|
-
|
|
19766
|
-
|
|
20047
|
+
if (prev && prev.current) {
|
|
20048
|
+
prev.current.focus({
|
|
20049
|
+
preventScroll: true
|
|
20050
|
+
});
|
|
20051
|
+
}
|
|
19767
20052
|
|
|
19768
|
-
|
|
20053
|
+
break;
|
|
20054
|
+
}
|
|
19769
20055
|
|
|
19770
20056
|
case KEY_CODE.right:
|
|
19771
|
-
|
|
20057
|
+
{
|
|
20058
|
+
e.preventDefault();
|
|
19772
20059
|
|
|
19773
|
-
|
|
19774
|
-
|
|
19775
|
-
|
|
19776
|
-
|
|
19777
|
-
|
|
20060
|
+
if (nextRef && nextRef.current) {
|
|
20061
|
+
nextRef.current.focus({
|
|
20062
|
+
preventScroll: true
|
|
20063
|
+
});
|
|
20064
|
+
}
|
|
19778
20065
|
|
|
19779
|
-
|
|
20066
|
+
break;
|
|
20067
|
+
}
|
|
19780
20068
|
|
|
19781
20069
|
case KEY_CODE.up:
|
|
19782
20070
|
case KEY_CODE.down:
|
|
19783
20071
|
case KEY_CODE.e:
|
|
19784
20072
|
case KEY_CODE.E:
|
|
19785
|
-
|
|
19786
|
-
|
|
19787
|
-
|
|
20073
|
+
{
|
|
20074
|
+
if (type === 'number') {
|
|
20075
|
+
e.preventDefault();
|
|
20076
|
+
}
|
|
19788
20077
|
|
|
19789
|
-
|
|
20078
|
+
break;
|
|
20079
|
+
}
|
|
19790
20080
|
}
|
|
19791
20081
|
};
|
|
19792
20082
|
|
|
@@ -19845,10 +20135,10 @@ var InlineMessage = function InlineMessage(props) {
|
|
|
19845
20135
|
name: IconMapping[appearance],
|
|
19846
20136
|
appearance: appearance,
|
|
19847
20137
|
className: IconClass
|
|
19848
|
-
}), /*#__PURE__*/React.createElement(
|
|
20138
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
19849
20139
|
"data-test": "DesignSystem-InlineMessage--Description",
|
|
19850
20140
|
className: DescriptionClass
|
|
19851
|
-
}, description))
|
|
20141
|
+
}, description));
|
|
19852
20142
|
};
|
|
19853
20143
|
InlineMessage.displayName = 'InlineMessage';
|
|
19854
20144
|
InlineMessage.defaultProps = {
|
|
@@ -19957,7 +20247,7 @@ var ChoiceList = function ChoiceList(props) {
|
|
|
19957
20247
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("fieldset", {
|
|
19958
20248
|
className: ChoiceListClass,
|
|
19959
20249
|
"data-test": "DesignSystem-ChoiceList-Wrapper"
|
|
19960
|
-
}, title && title.trim() && /*#__PURE__*/React.createElement(Label, null, title.trim()),
|
|
20250
|
+
}, title && title.trim() && /*#__PURE__*/React.createElement(Label, null, title.trim()), allowMultiple ? /*#__PURE__*/React.createElement("div", {
|
|
19961
20251
|
className: "".concat(alignment === 'horizontal' ? ChoiceHorizontalClass : ChoiceListVerticalClass)
|
|
19962
20252
|
}, renderCheckbox(choices, handleOnChange, disabled, size, alignment, selected)) : /*#__PURE__*/React.createElement("div", {
|
|
19963
20253
|
className: "".concat(alignment === 'horizontal' ? ChoiceHorizontalClass : ChoiceListVerticalClass)
|
|
@@ -19971,6 +20261,26 @@ ChoiceList.defaultProps = {
|
|
|
19971
20261
|
disabled: false
|
|
19972
20262
|
};
|
|
19973
20263
|
|
|
19974
|
-
var
|
|
20264
|
+
var Divider = function Divider(props) {
|
|
20265
|
+
var _classNames;
|
|
20266
|
+
|
|
20267
|
+
var vertical = props.vertical,
|
|
20268
|
+
appearance = props.appearance,
|
|
20269
|
+
className = props.className;
|
|
20270
|
+
var baseProps = extractBaseProps(props);
|
|
20271
|
+
var DividerClass = classnames((_classNames = {}, _defineProperty$2(_classNames, 'Divider', true), _defineProperty$2(_classNames, 'Divider--horizontal', !vertical), _defineProperty$2(_classNames, 'Divider--vertical', vertical), _defineProperty$2(_classNames, 'Divider--basic', appearance !== 'header'), _defineProperty$2(_classNames, 'Divider--header', !vertical && appearance === 'header'), _classNames), className);
|
|
20272
|
+
return /*#__PURE__*/React.createElement("hr", _extends$3({
|
|
20273
|
+
"data-test": "DesignSystem-Divider"
|
|
20274
|
+
}, baseProps, {
|
|
20275
|
+
className: DividerClass
|
|
20276
|
+
}));
|
|
20277
|
+
};
|
|
20278
|
+
Divider.displayName = 'Divider';
|
|
20279
|
+
Divider.defaultProps = {
|
|
20280
|
+
appearance: 'basic',
|
|
20281
|
+
vertical: false
|
|
20282
|
+
};
|
|
20283
|
+
|
|
20284
|
+
var version = "2.7.0-0";
|
|
19975
20285
|
|
|
19976
|
-
export { Avatar, AvatarGroup, Backdrop, Badge, Breadcrumbs, Button, Calendar, Caption, Card, CardBody, CardFooter, CardHeader, CardSubdued, ChatMessage, Checkbox, Chip, ChipGroup, ChipInput, ChoiceList, Collapsible, Column, DatePicker, DateRangePicker, Dialog, Dropdown, Dropzone, EditableChipInput, EditableDropdown, EditableInput, EmptyState, FileList, FileUploader, FileUploaderList, FullscreenModal, Grid, GridCell, Heading, HorizontalNav, Icon, InlineMessage, Input, InputMask, Label, Legend, Link, List, Message, MetaList, MetricInput, Modal, ModalBody, ModalDescription, ModalFooter, ModalHeader, MultiSlider, Navigation, OutsideClick, PageHeader, Pagination, Paragraph, Pills, Placeholder, PlaceholderParagraph, Popover, ProgressBar, ProgressRing, Radio, RangeSlider, Row, Sidesheet, Slider, Spinner, StatusHint, Stepper, Subheading, Switch, Tab, Table, Tabs, TabsWrapper, Text, Textarea, TimePicker, Toast, Tooltip, index$1 as Utils, VerificationCodeInput, VerticalNav, version };
|
|
20286
|
+
export { Avatar, AvatarGroup, Backdrop, Badge, Breadcrumbs, Button, Calendar, Caption, Card, CardBody, CardFooter, CardHeader, CardSubdued, ChatMessage, Checkbox, Chip, ChipGroup, ChipInput, ChoiceList, Collapsible, Column, DatePicker, DateRangePicker, Dialog, Divider, Dropdown, Dropzone, EditableChipInput, EditableDropdown, EditableInput, EmptyState, FileList, FileUploader, FileUploaderList, FullscreenModal, Grid, GridCell, Heading, HorizontalNav, Icon, InlineMessage, Input, X as InputMask, Label, Legend, Link, List, Message, MetaList, MetricInput, Modal, ModalBody, ModalDescription, ModalFooter, ModalHeader, MultiSlider, Navigation, OutsideClick, PageHeader, Pagination, Paragraph, Pills, Placeholder, PlaceholderParagraph, Popover, ProgressBar, ProgressRing, Radio, RangeSlider, Row, Sidesheet, Slider, Spinner, StatusHint, Stepper, Subheading, Switch, Tab, Table, Tabs, TabsWrapper, Text, Textarea, TimePicker, Toast, Tooltip, index$1 as Utils, VerificationCodeInput, VerticalNav, version };
|