@databricks/design-system 1.12.9 → 1.12.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Typography-91d3d591.js → DropdownMenu-eb8788e5.js} +1201 -176
- package/dist/DropdownMenu-eb8788e5.js.map +1 -0
- package/dist/{common-1fb3eeb9.js → common-5b60d682.js} +3 -1
- package/dist/common-5b60d682.js.map +1 -0
- package/dist/design-system/AccessibleContainer/index.d.ts +7 -0
- package/dist/design-system/AccessibleContainer/index.d.ts.map +1 -0
- package/dist/design-system/Alert/Alert.d.ts.map +1 -1
- package/dist/design-system/ApplyGlobalStyles/ApplyGlobalStyles.d.ts +6 -0
- package/dist/design-system/ApplyGlobalStyles/ApplyGlobalStyles.d.ts.map +1 -0
- package/dist/design-system/ApplyGlobalStyles/index.d.ts +2 -0
- package/dist/design-system/ApplyGlobalStyles/index.d.ts.map +1 -0
- package/dist/design-system/Button/Button.d.ts +3 -1
- package/dist/design-system/Button/Button.d.ts.map +1 -1
- package/dist/design-system/Button/styles.d.ts +1 -1
- package/dist/design-system/Button/styles.d.ts.map +1 -1
- package/dist/design-system/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/design-system/DesignSystemProvider/DesignSystemProvider.d.ts +4 -7
- package/dist/design-system/DesignSystemProvider/DesignSystemProvider.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogCombobox.d.ts +3 -1
- package/dist/design-system/DialogCombobox/DialogCombobox.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxAddButton.d.ts +2 -0
- package/dist/design-system/DialogCombobox/DialogComboboxAddButton.d.ts.map +1 -0
- package/dist/design-system/DialogCombobox/DialogComboboxContent.d.ts +4 -1
- package/dist/design-system/DialogCombobox/DialogComboboxContent.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxFooter.d.ts +2 -0
- package/dist/design-system/DialogCombobox/DialogComboboxFooter.d.ts.map +1 -0
- package/dist/design-system/DialogCombobox/DialogComboboxHintRow.d.ts +7 -0
- package/dist/design-system/DialogCombobox/DialogComboboxHintRow.d.ts.map +1 -0
- package/dist/design-system/DialogCombobox/DialogComboboxOptionControlledList.d.ts +4 -2
- package/dist/design-system/DialogCombobox/DialogComboboxOptionControlledList.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionList.d.ts +2 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionList.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListCheckboxItem.d.ts +1 -0
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListCheckboxItem.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListSearch.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts +1 -0
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxSectionHeader.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxSeparator.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts +1 -0
- package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/index.d.ts +4 -1
- package/dist/design-system/DialogCombobox/index.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/providers/DialogComboboxContext.d.ts +7 -0
- package/dist/design-system/DialogCombobox/providers/DialogComboboxContext.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/shared.d.ts +6 -3
- package/dist/design-system/DialogCombobox/shared.d.ts.map +1 -1
- package/dist/design-system/Drawer/Drawer.d.ts +7 -2
- package/dist/design-system/Drawer/Drawer.d.ts.map +1 -1
- package/dist/design-system/DropdownMenu/DropdownMenu.d.ts +7 -0
- package/dist/design-system/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/design-system/Empty/Empty.d.ts.map +1 -1
- package/dist/design-system/FormV2/RHFAdapters.d.ts +10 -4
- package/dist/design-system/FormV2/RHFAdapters.d.ts.map +1 -1
- package/dist/design-system/FormV2/index.d.ts +6 -0
- package/dist/design-system/FormV2/index.d.ts.map +1 -1
- package/dist/design-system/Header/Header.d.ts +2 -2
- package/dist/design-system/Header/Header.d.ts.map +1 -1
- package/dist/design-system/Icon/Icon.d.ts +1 -1
- package/dist/design-system/Icon/Icon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/BarGroupedIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/BarGroupedIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/BarStackedIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/BarStackedIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/CalendarClockIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/CalendarClockIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/CatalogOffIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/CatalogOffIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/CheckboxIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/CheckboxIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/ClockKeyIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/ClockKeyIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/ColumnsIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/ColumnsIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/FaceNeutralIcon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/FloatIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/FloatIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/FolderCloudFilledIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/FolderCloudFilledIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/FolderCloudIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/FolderCloudIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/IngestionIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/IngestionIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/LibrariesIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/LibrariesIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/QuestionMarkSpeechBubbleIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/QuestionMarkSpeechBubbleIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/RobotIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/RobotIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/SortAlphabeticalAscendingIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/SortAlphabeticalAscendingIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/SortAlphabeticalDescendingIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/SortAlphabeticalDescendingIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/SortAlphabeticalLeftIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/SortAlphabeticalLeftIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/SortAlphabeticalRightIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/SortAlphabeticalRightIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/StopIcon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/WorkflowsIcon.d.ts +4 -0
- package/dist/design-system/Icon/__generated/icons/WorkflowsIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/index.d.ts +19 -0
- package/dist/design-system/Icon/__generated/icons/index.d.ts.map +1 -1
- package/dist/design-system/Input/Input.d.ts +1 -0
- package/dist/design-system/Input/Input.d.ts.map +1 -1
- package/dist/design-system/Layout/Layout.d.ts +3 -0
- package/dist/design-system/Layout/Layout.d.ts.map +1 -1
- package/dist/design-system/LegacyNotification/LegacyNotification.d.ts.map +1 -1
- package/dist/design-system/LegacySkeleton/LegacySkeleton.d.ts +17 -0
- package/dist/design-system/LegacySkeleton/LegacySkeleton.d.ts.map +1 -0
- package/dist/design-system/LegacySkeleton/index.d.ts +2 -0
- package/dist/design-system/LegacySkeleton/index.d.ts.map +1 -0
- package/dist/design-system/LoadingState/LoadingState.d.ts +45 -0
- package/dist/design-system/LoadingState/LoadingState.d.ts.map +1 -0
- package/dist/design-system/LoadingState/index.d.ts +2 -0
- package/dist/design-system/LoadingState/index.d.ts.map +1 -0
- package/dist/design-system/Modal/Modal.d.ts +3 -1
- package/dist/design-system/Modal/Modal.d.ts.map +1 -1
- package/dist/design-system/Radio/Radio.d.ts.map +1 -1
- package/dist/design-system/Select/Select.d.ts +4 -3
- package/dist/design-system/Select/Select.d.ts.map +1 -1
- package/dist/design-system/SelectV2/SelectContent.d.ts.map +1 -1
- package/dist/design-system/Sidebar/Sidebar.d.ts +2 -1
- package/dist/design-system/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/design-system/Skeleton/GenericSkeleton.d.ts +15 -0
- package/dist/design-system/Skeleton/GenericSkeleton.d.ts.map +1 -0
- package/dist/design-system/Skeleton/ParagraphSkeleton.d.ts +18 -0
- package/dist/design-system/Skeleton/ParagraphSkeleton.d.ts.map +1 -0
- package/dist/design-system/{TableUI → Skeleton}/TableSkeleton.d.ts +5 -2
- package/dist/design-system/Skeleton/TableSkeleton.d.ts.map +1 -0
- package/dist/design-system/Skeleton/TitleSkeleton.d.ts +15 -0
- package/dist/design-system/Skeleton/TitleSkeleton.d.ts.map +1 -0
- package/dist/design-system/Skeleton/index.d.ts +4 -1
- package/dist/design-system/Skeleton/index.d.ts.map +1 -1
- package/dist/design-system/Skeleton/utils.d.ts +7 -0
- package/dist/design-system/Skeleton/utils.d.ts.map +1 -0
- package/dist/design-system/Spinner/Spinner.d.ts +5 -1
- package/dist/design-system/Spinner/Spinner.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableCell.d.ts +4 -2
- package/dist/design-system/TableUI/TableCell.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableFilterInput.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableFilterLayout.d.ts +1 -1
- package/dist/design-system/TableUI/TableFilterLayout.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableHeader.d.ts +4 -2
- package/dist/design-system/TableUI/TableHeader.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableRow.d.ts +1 -1
- package/dist/design-system/TableUI/TableRow.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableRowAction.d.ts +1 -1
- package/dist/design-system/TableUI/TableRowAction.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableRowSelectCell.d.ts +1 -1
- package/dist/design-system/TableUI/TableRowSelectCell.d.ts.map +1 -1
- package/dist/design-system/TableUI/index.d.ts +0 -1
- package/dist/design-system/TableUI/index.d.ts.map +1 -1
- package/dist/design-system/TableUI/tableStyles.d.ts +2 -1
- package/dist/design-system/TableUI/tableStyles.d.ts.map +1 -1
- package/dist/design-system/Tabs/index.d.ts +1 -0
- package/dist/design-system/Tabs/index.d.ts.map +1 -1
- package/dist/design-system/Tag/index.d.ts.map +1 -1
- package/dist/design-system/Tooltip/InfoTooltip.d.ts +9 -0
- package/dist/design-system/Tooltip/InfoTooltip.d.ts.map +1 -0
- package/dist/design-system/Tooltip/Tooltip.d.ts +8 -0
- package/dist/design-system/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/design-system/Tooltip/index.d.ts +1 -0
- package/dist/design-system/Tooltip/index.d.ts.map +1 -1
- package/dist/design-system/Tree/Tree.d.ts +2 -2
- package/dist/design-system/Tree/Tree.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/CountBadge.d.ts +7 -0
- package/dist/design-system/TypeaheadCombobox/CountBadge.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxCheckboxItem.d.ts +11 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxCheckboxItem.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxControls.d.ts +11 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxControls.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxFooter.d.ts +17 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxFooter.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxInput.d.ts +9 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxInput.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenu.d.ts +17 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenu.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenuItem.d.ts +19 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenuItem.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMultiSelectInput.d.ts +16 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMultiSelectInput.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxRoot.d.ts +13 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxRoot.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSectionHeader.d.ts +2 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSectionHeader.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSelectedItem.d.ts +13 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSelectedItem.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSeparator.d.ts +2 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSeparator.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxToggleButton.d.ts +12 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxToggleButton.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts +24 -0
- package/dist/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/hooks/index.d.ts +3 -0
- package/dist/design-system/TypeaheadCombobox/hooks/index.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/hooks/useTypeaheadComboboxContext.d.ts +2 -0
- package/dist/design-system/TypeaheadCombobox/hooks/useTypeaheadComboboxContext.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/index.d.ts +13 -0
- package/dist/design-system/TypeaheadCombobox/index.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/providers/TypeaheadComboboxContext.d.ts +14 -0
- package/dist/design-system/TypeaheadCombobox/providers/TypeaheadComboboxContext.d.ts.map +1 -0
- package/dist/design-system/Typography/Hint.d.ts +14 -0
- package/dist/design-system/Typography/Hint.d.ts.map +1 -0
- package/dist/design-system/Typography/Link.d.ts.map +1 -1
- package/dist/design-system/Typography/Paragraph.d.ts.map +1 -1
- package/dist/design-system/Typography/Text.d.ts +3 -0
- package/dist/design-system/Typography/Text.d.ts.map +1 -1
- package/dist/design-system/Typography/Title.d.ts.map +1 -1
- package/dist/design-system/Typography/Typography.d.ts +2 -0
- package/dist/design-system/Typography/Typography.d.ts.map +1 -1
- package/dist/design-system/_shared_/Combobox/ClearSelectionButton.d.ts +5 -0
- package/dist/design-system/_shared_/Combobox/ClearSelectionButton.d.ts.map +1 -0
- package/dist/design-system/_shared_/Combobox/EmptyResults.d.ts +2 -0
- package/dist/design-system/_shared_/Combobox/EmptyResults.d.ts.map +1 -0
- package/dist/design-system/_shared_/Combobox/HintRow.d.ts +8 -0
- package/dist/design-system/_shared_/Combobox/HintRow.d.ts.map +1 -0
- package/dist/design-system/_shared_/Combobox/LoadingSpinner.d.ts +2 -0
- package/dist/design-system/_shared_/Combobox/LoadingSpinner.d.ts.map +1 -0
- package/dist/design-system/_shared_/Combobox/SectionHeader.d.ts +2 -0
- package/dist/design-system/_shared_/Combobox/SectionHeader.d.ts.map +1 -0
- package/dist/design-system/_shared_/Combobox/Separator.d.ts +2 -0
- package/dist/design-system/_shared_/Combobox/Separator.d.ts.map +1 -0
- package/dist/design-system/_shared_/Combobox/index.d.ts +8 -0
- package/dist/design-system/_shared_/Combobox/index.d.ts.map +1 -0
- package/dist/design-system/_shared_/Combobox/styles.d.ts +14 -0
- package/dist/design-system/_shared_/Combobox/styles.d.ts.map +1 -0
- package/dist/design-system/_shared_/index.d.ts +2 -0
- package/dist/design-system/_shared_/index.d.ts.map +1 -0
- package/dist/design-system/index.d.ts +5 -0
- package/dist/design-system/index.d.ts.map +1 -1
- package/dist/design-system/types.d.ts +3 -2
- package/dist/design-system/types.d.ts.map +1 -1
- package/dist/design-system/utils/index.d.ts +1 -0
- package/dist/design-system/utils/index.d.ts.map +1 -1
- package/dist/design-system/utils/useStableUid.d.ts +2 -0
- package/dist/design-system/utils/useStableUid.d.ts.map +1 -0
- package/dist/design-system/utils/useUniqueId.d.ts +2 -0
- package/dist/design-system/utils/useUniqueId.d.ts.map +1 -0
- package/dist/development/ChatUI/MessageHeader.d.ts.map +1 -1
- package/dist/development/ContextMenu/ContextMenu.d.ts +58 -0
- package/dist/development/ContextMenu/ContextMenu.d.ts.map +1 -0
- package/dist/development/ContextMenu/index.d.ts +2 -0
- package/dist/development/ContextMenu/index.d.ts.map +1 -0
- package/dist/development/index.d.ts +2 -1
- package/dist/development/index.d.ts.map +1 -1
- package/dist/development.js +323 -133
- package/dist/development.js.map +1 -1
- package/dist/flags.d.ts +0 -1
- package/dist/flags.d.ts.map +1 -1
- package/dist/index-dark.css +230 -3520
- package/dist/index.css +230 -3520
- package/dist/index.js +5866 -4112
- package/dist/index.js.map +1 -1
- package/dist/rollup/less.d.ts +2 -0
- package/dist/rollup/less.d.ts.map +1 -0
- package/dist/styles.js +1 -0
- package/dist/styles.js.map +1 -0
- package/dist/test-utils/common.d.ts +2 -0
- package/dist/test-utils/common.d.ts.map +1 -1
- package/dist/test-utils/enzyme/index.d.ts +1 -1
- package/dist/test-utils/enzyme/index.d.ts.map +1 -1
- package/dist/test-utils/enzyme/selectEvent.d.ts +13 -7
- package/dist/test-utils/enzyme/selectEvent.d.ts.map +1 -1
- package/dist/test-utils/enzyme/table.d.ts +3 -3
- package/dist/test-utils/enzyme/table.d.ts.map +1 -1
- package/dist/test-utils/enzyme/utils.d.ts +1 -1
- package/dist/test-utils/enzyme/utils.d.ts.map +1 -1
- package/dist/test-utils/enzyme.js +39 -15
- package/dist/test-utils/enzyme.js.map +1 -1
- package/dist/test-utils/rtl/selectEvent.d.ts +6 -0
- package/dist/test-utils/rtl/selectEvent.d.ts.map +1 -1
- package/dist/test-utils/rtl.js +66 -18
- package/dist/test-utils/rtl.js.map +1 -1
- package/dist/theme/colorList.d.ts +42 -0
- package/dist/theme/colorList.d.ts.map +1 -1
- package/dist/theme/colors.d.ts.map +1 -1
- package/package.json +30 -33
- package/dist/Spinner-140f57ac.js +0 -2525
- package/dist/Spinner-140f57ac.js.map +0 -1
- package/dist/Typography-1b037412.js +0 -2074
- package/dist/Typography-1b037412.js.map +0 -1
- package/dist/Typography-91d3d591.js.map +0 -1
- package/dist/Typography-e3d5ff23.js +0 -2083
- package/dist/Typography-e3d5ff23.js.map +0 -1
- package/dist/common-1fb3eeb9.js.map +0 -1
- package/dist/common-3ab0e300.js +0 -15
- package/dist/common-3ab0e300.js.map +0 -1
- package/dist/common-819b45d4.js +0 -15
- package/dist/common-819b45d4.js.map +0 -1
- package/dist/design-system/Button/Button.test.d.ts +0 -2
- package/dist/design-system/Button/Button.test.d.ts.map +0 -1
- package/dist/design-system/Checkbox/Checkbox.test.d.ts +0 -2
- package/dist/design-system/Checkbox/Checkbox.test.d.ts.map +0 -1
- package/dist/design-system/DesignSystemProvider/DesignSystemProvider.test.d.ts +0 -2
- package/dist/design-system/DesignSystemProvider/DesignSystemProvider.test.d.ts.map +0 -1
- package/dist/design-system/DesignSystemProvider/DesignSystemThemeProvider.test.d.ts +0 -2
- package/dist/design-system/DesignSystemProvider/DesignSystemThemeProvider.test.d.ts.map +0 -1
- package/dist/design-system/DialogCombobox/DialogComboboxEmpty.d.ts +0 -2
- package/dist/design-system/DialogCombobox/DialogComboboxEmpty.d.ts.map +0 -1
- package/dist/design-system/DialogCombobox/DialogComboboxLoadingSpinner.d.ts +0 -2
- package/dist/design-system/DialogCombobox/DialogComboboxLoadingSpinner.d.ts.map +0 -1
- package/dist/design-system/DialogCombobox/tests/DialogCombobox.test.d.ts +0 -2
- package/dist/design-system/DialogCombobox/tests/DialogCombobox.test.d.ts.map +0 -1
- package/dist/design-system/DialogCombobox/tests/DialogComboboxButtonContainer.test.d.ts +0 -2
- package/dist/design-system/DialogCombobox/tests/DialogComboboxButtonContainer.test.d.ts.map +0 -1
- package/dist/design-system/DialogCombobox/tests/DialogComboboxContent.test.d.ts +0 -2
- package/dist/design-system/DialogCombobox/tests/DialogComboboxContent.test.d.ts.map +0 -1
- package/dist/design-system/DialogCombobox/tests/DialogComboboxOptionList.test.d.ts +0 -2
- package/dist/design-system/DialogCombobox/tests/DialogComboboxOptionList.test.d.ts.map +0 -1
- package/dist/design-system/DialogCombobox/tests/DialogComboboxOptionListCheckboxItem.test.d.ts +0 -2
- package/dist/design-system/DialogCombobox/tests/DialogComboboxOptionListCheckboxItem.test.d.ts.map +0 -1
- package/dist/design-system/DialogCombobox/tests/DialogComboboxOptionListSelectItem.test.d.ts +0 -2
- package/dist/design-system/DialogCombobox/tests/DialogComboboxOptionListSelectItem.test.d.ts.map +0 -1
- package/dist/design-system/DialogCombobox/tests/DialogComboboxTrigger.test.d.ts +0 -2
- package/dist/design-system/DialogCombobox/tests/DialogComboboxTrigger.test.d.ts.map +0 -1
- package/dist/design-system/DropdownMenu/DropdownMenu.test.d.ts +0 -2
- package/dist/design-system/DropdownMenu/DropdownMenu.test.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/AppIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/AppIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/BinaryIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/BinaryIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/BoldIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/BoldIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/BracketsCurlyIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/BracketsCurlyIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/BracketsSquareIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/BracketsSquareIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/BracketsXIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/BracketsXIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/CatalogIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/CatalogIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/ChartLineIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/ChartLineIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/CheckCircleBadgeIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/CheckCircleBadgeIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/CloudKeyIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/CloudKeyIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/CloudModelIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/CloudModelIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/ColorFillIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/ColorFillIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/ConnectIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/ConnectIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/CursorIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/CursorIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/DagIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/DagIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/DecimalIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/DecimalIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/DotsCircleIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/DotsCircleIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/FontIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/FontIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/FunctionIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/FunctionIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/GiftIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/GiftIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/ItalicIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/ItalicIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/LettersIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/LettersIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/MenuIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/MenuIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/NotificationOffIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/NotificationOffIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/NumbersIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/NumbersIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/PipelineIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/PipelineIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/PlugIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/PlugIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/ReposIcon.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/ReposIcon.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/SaveIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/SaveIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/SlidersIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/SlidersIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/SortAscendingIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/SortAscendingIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/SortDescendingIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/SortDescendingIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/SortUnsortedIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/SortUnsortedIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/StorefrontIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/StorefrontIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/TextBoxIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/TextBoxIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/UnderlineIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/UnderlineIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/VariableIcon.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/VariableIcon.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/VariableIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/VariableIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/WorkspacesIcon.v2.d.ts +0 -4
- package/dist/design-system/Icon/__generated/icons/WorkspacesIcon.v2.d.ts.map +0 -1
- package/dist/design-system/Input/Input.test.d.ts +0 -2
- package/dist/design-system/Input/Input.test.d.ts.map +0 -1
- package/dist/design-system/LegacyNotification/LegacyNotification.test.d.ts +0 -2
- package/dist/design-system/LegacyNotification/LegacyNotification.test.d.ts.map +0 -1
- package/dist/design-system/Modal/Modal.test.d.ts +0 -2
- package/dist/design-system/Modal/Modal.test.d.ts.map +0 -1
- package/dist/design-system/Notification/Notification.test.d.ts +0 -2
- package/dist/design-system/Notification/Notification.test.d.ts.map +0 -1
- package/dist/design-system/NotificationV2/NotificationV2.d.ts +0 -24
- package/dist/design-system/NotificationV2/NotificationV2.d.ts.map +0 -1
- package/dist/design-system/NotificationV2/index.d.ts +0 -2
- package/dist/design-system/NotificationV2/index.d.ts.map +0 -1
- package/dist/design-system/Popover/Popover.test.d.ts +0 -2
- package/dist/design-system/Popover/Popover.test.d.ts.map +0 -1
- package/dist/design-system/PopoverV2/PopoverV2.d.ts +0 -11
- package/dist/design-system/PopoverV2/PopoverV2.d.ts.map +0 -1
- package/dist/design-system/PopoverV2/PopoverV2.test.d.ts +0 -2
- package/dist/design-system/PopoverV2/PopoverV2.test.d.ts.map +0 -1
- package/dist/design-system/PopoverV2/index.d.ts +0 -2
- package/dist/design-system/PopoverV2/index.d.ts.map +0 -1
- package/dist/design-system/Sidebar/Sidebar.test.d.ts +0 -2
- package/dist/design-system/Sidebar/Sidebar.test.d.ts.map +0 -1
- package/dist/design-system/Skeleton/Skeleton.d.ts +0 -15
- package/dist/design-system/Skeleton/Skeleton.d.ts.map +0 -1
- package/dist/design-system/Table/Table.d.ts +0 -17
- package/dist/design-system/Table/Table.d.ts.map +0 -1
- package/dist/design-system/Table/index.d.ts +0 -2
- package/dist/design-system/Table/index.d.ts.map +0 -1
- package/dist/design-system/TableUI/TableSkeleton.d.ts.map +0 -1
- package/dist/design-system/TableUI/TableUI.test.d.ts +0 -2
- package/dist/design-system/TableUI/TableUI.test.d.ts.map +0 -1
- package/dist/design-system/utils/accessibility.test.d.ts +0 -2
- package/dist/design-system/utils/accessibility.test.d.ts.map +0 -1
- package/dist/design-system/utils/safex.test.d.ts +0 -2
- package/dist/design-system/utils/safex.test.d.ts.map +0 -1
- package/dist/development/Filter/Filter.d.ts +0 -10
- package/dist/development/Filter/Filter.d.ts.map +0 -1
- package/dist/development/Filter/Filter.test.d.ts +0 -2
- package/dist/development/Filter/Filter.test.d.ts.map +0 -1
- package/dist/development/Filter/FilterButtonContainer.d.ts +0 -2
- package/dist/development/Filter/FilterButtonContainer.d.ts.map +0 -1
- package/dist/development/Filter/FilterContent.d.ts +0 -14
- package/dist/development/Filter/FilterContent.d.ts.map +0 -1
- package/dist/development/Filter/FilterCountBadge.d.ts +0 -2
- package/dist/development/Filter/FilterCountBadge.d.ts.map +0 -1
- package/dist/development/Filter/FilterLoadingSpinner.d.ts +0 -2
- package/dist/development/Filter/FilterLoadingSpinner.d.ts.map +0 -1
- package/dist/development/Filter/FilterOptionControlledList.d.ts +0 -9
- package/dist/development/Filter/FilterOptionControlledList.d.ts.map +0 -1
- package/dist/development/Filter/FilterOptionList.d.ts +0 -10
- package/dist/development/Filter/FilterOptionList.d.ts.map +0 -1
- package/dist/development/Filter/FilterOptionListCheckboxItem.d.ts +0 -11
- package/dist/development/Filter/FilterOptionListCheckboxItem.d.ts.map +0 -1
- package/dist/development/Filter/FilterOptionListSearch.d.ts +0 -7
- package/dist/development/Filter/FilterOptionListSearch.d.ts.map +0 -1
- package/dist/development/Filter/FilterOptionListSelectItem.d.ts +0 -10
- package/dist/development/Filter/FilterOptionListSelectItem.d.ts.map +0 -1
- package/dist/development/Filter/FilterSectionHeader.d.ts +0 -2
- package/dist/development/Filter/FilterSectionHeader.d.ts.map +0 -1
- package/dist/development/Filter/FilterSeparator.d.ts +0 -2
- package/dist/development/Filter/FilterSeparator.d.ts.map +0 -1
- package/dist/development/Filter/FilterTrigger.d.ts +0 -15
- package/dist/development/Filter/FilterTrigger.d.ts.map +0 -1
- package/dist/development/Filter/hooks/useFilterContext.d.ts +0 -2
- package/dist/development/Filter/hooks/useFilterContext.d.ts.map +0 -1
- package/dist/development/Filter/hooks/useFilterOptionListContext.d.ts +0 -2
- package/dist/development/Filter/hooks/useFilterOptionListContext.d.ts.map +0 -1
- package/dist/development/Filter/index.d.ts +0 -14
- package/dist/development/Filter/index.d.ts.map +0 -1
- package/dist/development/Filter/providers/FilterContext.d.ts +0 -15
- package/dist/development/Filter/providers/FilterContext.d.ts.map +0 -1
- package/dist/development/Filter/providers/FilterOptionListContext.d.ts +0 -10
- package/dist/development/Filter/providers/FilterOptionListContext.d.ts.map +0 -1
- package/dist/development/Filter/shared.d.ts +0 -3
- package/dist/development/Filter/shared.d.ts.map +0 -1
- package/dist/development/ListPagePattern/index.d.ts +0 -1
- package/dist/development/ListPagePattern/index.d.ts.map +0 -1
- package/dist/development/SelectV2/Select.d.ts +0 -7
- package/dist/development/SelectV2/Select.d.ts.map +0 -1
- package/dist/development/SelectV2/SelectContent.d.ts +0 -6
- package/dist/development/SelectV2/SelectContent.d.ts.map +0 -1
- package/dist/development/SelectV2/SelectOption.d.ts +0 -6
- package/dist/development/SelectV2/SelectOption.d.ts.map +0 -1
- package/dist/development/SelectV2/SelectOptionGroup.d.ts +0 -7
- package/dist/development/SelectV2/SelectOptionGroup.d.ts.map +0 -1
- package/dist/development/SelectV2/SelectTrigger.d.ts +0 -6
- package/dist/development/SelectV2/SelectTrigger.d.ts.map +0 -1
- package/dist/development/SelectV2/hooks/useSelectContext.d.ts +0 -2
- package/dist/development/SelectV2/hooks/useSelectContext.d.ts.map +0 -1
- package/dist/development/SelectV2/index.d.ts +0 -6
- package/dist/development/SelectV2/index.d.ts.map +0 -1
- package/dist/development/SelectV2/providers/SelectContext.d.ts +0 -11
- package/dist/development/SelectV2/providers/SelectContext.d.ts.map +0 -1
- package/dist/development/TableUI/TableUI.test.d.ts +0 -2
- package/dist/development/TableUI/TableUI.test.d.ts.map +0 -1
- package/dist/development/TableUI/index.d.ts +0 -75
- package/dist/development/TableUI/index.d.ts.map +0 -1
- package/dist/index-mfe-dark.css +0 -17525
- package/dist/index-mfe.css +0 -17184
- package/dist/rollup-less-tilde-importer.d.ts +0 -3
- package/dist/rollup-less-tilde-importer.d.ts.map +0 -1
- package/dist/test-utils/enzyme/selectEvent.test.d.ts +0 -2
- package/dist/test-utils/enzyme/selectEvent.test.d.ts.map +0 -1
- package/dist/test-utils/enzyme/table.test.d.ts +0 -2
- package/dist/test-utils/enzyme/table.test.d.ts.map +0 -1
- package/dist/test-utils/rtl/selectEvent.test.d.ts +0 -2
- package/dist/test-utils/rtl/selectEvent.test.d.ts.map +0 -1
- package/dist/test-utils/rtl/table.test.d.ts +0 -2
- package/dist/test-utils/rtl/table.test.d.ts.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/useDesignSystemTheme-1e16bcf5.js +0 -441
- package/dist/useDesignSystemTheme-1e16bcf5.js.map +0 -1
- package/dist/useDesignSystemTheme-3d2c1acb.js +0 -440
- package/dist/useDesignSystemTheme-3d2c1acb.js.map +0 -1
- package/dist/useDesignSystemTheme-6e6f5867.js +0 -441
- package/dist/useDesignSystemTheme-6e6f5867.js.map +0 -1
- package/dist/useDesignSystemTheme-ac536b0f.js +0 -443
- package/dist/useDesignSystemTheme-ac536b0f.js.map +0 -1
- package/dist/useDesignSystemTheme-c859571c.js +0 -468
- package/dist/useDesignSystemTheme-c859571c.js.map +0 -1
- package/dist/useDesignSystemTheme-c867a35d.js +0 -470
- package/dist/useDesignSystemTheme-c867a35d.js.map +0 -1
- package/dist/useDesignSystemTheme-ef39204e.js +0 -468
- package/dist/useDesignSystemTheme-ef39204e.js.map +0 -1
|
@@ -1,2083 +0,0 @@
|
|
|
1
|
-
import React__default, { createContext, useContext, useMemo, useEffect, forwardRef } from 'react';
|
|
2
|
-
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
3
|
-
import { useTheme, ThemeProvider, css } from '@emotion/react';
|
|
4
|
-
import { notification, ConfigProvider, Button as Button$1, Input as Input$1, Typography as Typography$1 } from 'antd';
|
|
5
|
-
import chroma from 'chroma-js';
|
|
6
|
-
import AntDIcon from '@ant-design/icons';
|
|
7
|
-
import _isNil from 'lodash/isNil';
|
|
8
|
-
import _endsWith from 'lodash/endsWith';
|
|
9
|
-
import _isBoolean from 'lodash/isBoolean';
|
|
10
|
-
import _isNumber from 'lodash/isNumber';
|
|
11
|
-
import _isString from 'lodash/isString';
|
|
12
|
-
import _mapValues from 'lodash/mapValues';
|
|
13
|
-
import unitless from '@emotion/unitless';
|
|
14
|
-
|
|
15
|
-
// Border variables
|
|
16
|
-
const borders = {
|
|
17
|
-
borderRadiusMd: 4
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
// eslint-disable-next-line import/no-anonymous-default-export
|
|
21
|
-
var borders$1 = {
|
|
22
|
-
...borders
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* These values are based on AntD's breakpoints which follow BootStrap 4 media query rules.
|
|
27
|
-
* The numerical values represent the min-width of the given size.
|
|
28
|
-
* AntD values: https://ant.design/components/grid#col
|
|
29
|
-
* Bootstrap: https://getbootstrap.com/docs/4.0/layout/overview/#responsive-breakpoints
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
const breakpoints = {
|
|
33
|
-
xs: 0,
|
|
34
|
-
sm: 576,
|
|
35
|
-
md: 768,
|
|
36
|
-
lg: 992,
|
|
37
|
-
xl: 1200,
|
|
38
|
-
xxl: 1600
|
|
39
|
-
};
|
|
40
|
-
const mediaQueries = {
|
|
41
|
-
xs: '@media (max-width: 575.98px)',
|
|
42
|
-
sm: `@media (min-width: ${breakpoints.sm}px)`,
|
|
43
|
-
md: `@media (min-width: ${breakpoints.md}px)`,
|
|
44
|
-
lg: `@media (min-width: ${breakpoints.lg}px)`,
|
|
45
|
-
xl: `@media (min-width: ${breakpoints.xl}px)`,
|
|
46
|
-
xxl: `@media (min-width: ${breakpoints.xxl}px)`
|
|
47
|
-
};
|
|
48
|
-
const responsive = {
|
|
49
|
-
breakpoints,
|
|
50
|
-
mediaQueries
|
|
51
|
-
};
|
|
52
|
-
var responsive$1 = responsive;
|
|
53
|
-
|
|
54
|
-
// Exported from go/designsystem/colorsheet
|
|
55
|
-
const colorPalettePrimary = {
|
|
56
|
-
primary: '#2272B4',
|
|
57
|
-
blue100: '#F0F8FF',
|
|
58
|
-
blue200: '#D7EDFE',
|
|
59
|
-
blue300: '#BAE1FC',
|
|
60
|
-
blue400: '#8FCDFF',
|
|
61
|
-
blue500: '#4299E0',
|
|
62
|
-
blue600: '#2272B4',
|
|
63
|
-
blue700: '#0E538B',
|
|
64
|
-
blue800: '#04355D',
|
|
65
|
-
green100: '#F3FCF6',
|
|
66
|
-
green200: '#D4F7DF',
|
|
67
|
-
green300: '#B1ECC5',
|
|
68
|
-
green400: '#8DDDA8',
|
|
69
|
-
green500: '#3CAA60',
|
|
70
|
-
green600: '#277C43',
|
|
71
|
-
green700: '#115026',
|
|
72
|
-
green800: '#093919',
|
|
73
|
-
white: '#FFFFFF',
|
|
74
|
-
grey100: '#F2F5F7',
|
|
75
|
-
grey200: '#E4ECF1',
|
|
76
|
-
grey300: '#CDDAE5',
|
|
77
|
-
grey400: '#BDCDDB',
|
|
78
|
-
grey500: '#8196A7',
|
|
79
|
-
grey600: '#5D7283',
|
|
80
|
-
grey700: '#44535F',
|
|
81
|
-
grey800: '#1F272D',
|
|
82
|
-
red100: '#FFF5F7',
|
|
83
|
-
red200: '#FDE2E8',
|
|
84
|
-
red300: '#FBD0D8',
|
|
85
|
-
red400: '#F792A6',
|
|
86
|
-
red500: '#E65B77',
|
|
87
|
-
red600: '#C82D4C',
|
|
88
|
-
red700: '#9E102C',
|
|
89
|
-
red800: '#630316',
|
|
90
|
-
yellow100: '#FFF9EB',
|
|
91
|
-
yellow200: '#FCEACA',
|
|
92
|
-
yellow300: '#F8D4A5',
|
|
93
|
-
yellow400: '#F2BE88',
|
|
94
|
-
yellow500: '#DE7921',
|
|
95
|
-
yellow600: '#BE501E',
|
|
96
|
-
yellow700: '#93320B',
|
|
97
|
-
yellow800: '#5F1B02'
|
|
98
|
-
};
|
|
99
|
-
const colorPaletteSecondary = {
|
|
100
|
-
brown: '#A6630C',
|
|
101
|
-
coral: '#C83243',
|
|
102
|
-
charcoal: '#5D7283',
|
|
103
|
-
indigo: '#434A93',
|
|
104
|
-
lemon: '#FACB66',
|
|
105
|
-
lime: '#308613',
|
|
106
|
-
pink: '#B45091',
|
|
107
|
-
purple: '#8A63BF',
|
|
108
|
-
teal: '#04867D',
|
|
109
|
-
turquoise: '#157CBC'
|
|
110
|
-
};
|
|
111
|
-
const lightColorList = {
|
|
112
|
-
backgroundPrimary: colorPalettePrimary.white,
|
|
113
|
-
actionDangerPrimaryBackgroundDefault: colorPalettePrimary.red600,
|
|
114
|
-
actionDangerPrimaryBackgroundHover: colorPalettePrimary.red700,
|
|
115
|
-
actionDangerPrimaryBackgroundPress: colorPalettePrimary.red800,
|
|
116
|
-
actionDangerDefaultBackgroundDefault: chroma(colorPalettePrimary.red600).alpha(0).hex(),
|
|
117
|
-
actionDangerDefaultBackgroundHover: chroma(colorPalettePrimary.red600).alpha(0.08).hex(),
|
|
118
|
-
actionDangerDefaultBackgroundPress: chroma(colorPalettePrimary.red600).alpha(0.16).hex(),
|
|
119
|
-
actionDangerDefaultBorderDefault: colorPalettePrimary.red600,
|
|
120
|
-
actionDangerDefaultBorderHover: colorPalettePrimary.red700,
|
|
121
|
-
actionDangerDefaultBorderPress: colorPalettePrimary.red800,
|
|
122
|
-
actionDangerDefaultTextDefault: colorPalettePrimary.red600,
|
|
123
|
-
actionDangerDefaultTextHover: colorPalettePrimary.red700,
|
|
124
|
-
actionDangerDefaultTextPress: colorPalettePrimary.red800,
|
|
125
|
-
actionDefaultBackgroundDefault: chroma(colorPalettePrimary.blue800).alpha(0).hex(),
|
|
126
|
-
actionDefaultBackgroundHover: chroma(colorPalettePrimary.blue600).alpha(0.08).hex(),
|
|
127
|
-
actionDefaultBackgroundPress: chroma(colorPalettePrimary.blue600).alpha(0.16).hex(),
|
|
128
|
-
actionDefaultBorderDefault: colorPalettePrimary.grey300,
|
|
129
|
-
actionDefaultBorderFocus: colorPalettePrimary.blue600,
|
|
130
|
-
actionDefaultBorderHover: colorPalettePrimary.blue700,
|
|
131
|
-
actionDefaultBorderPress: colorPalettePrimary.blue800,
|
|
132
|
-
actionDefaultTextDefault: colorPalettePrimary.grey800,
|
|
133
|
-
actionDefaultTextHover: colorPalettePrimary.blue700,
|
|
134
|
-
actionDefaultTextPress: colorPalettePrimary.blue800,
|
|
135
|
-
actionDisabledBackground: colorPalettePrimary.grey200,
|
|
136
|
-
actionDisabledText: colorPalettePrimary.grey400,
|
|
137
|
-
actionPrimaryBackgroundDefault: colorPalettePrimary.blue600,
|
|
138
|
-
actionPrimaryBackgroundHover: colorPalettePrimary.blue700,
|
|
139
|
-
actionPrimaryBackgroundPress: colorPalettePrimary.blue800,
|
|
140
|
-
actionPrimaryTextDefault: colorPalettePrimary.white,
|
|
141
|
-
actionPrimaryTextHover: colorPalettePrimary.white,
|
|
142
|
-
actionPrimaryTextPress: colorPalettePrimary.white,
|
|
143
|
-
actionTertiaryBackgroundDefault: chroma(colorPalettePrimary.blue600).alpha(0).hex(),
|
|
144
|
-
actionTertiaryBackgroundHover: chroma(colorPalettePrimary.blue600).alpha(0.08).hex(),
|
|
145
|
-
actionTertiaryBackgroundPress: chroma(colorPalettePrimary.blue600).alpha(0.16).hex(),
|
|
146
|
-
actionTertiaryTextDefault: colorPalettePrimary.blue600,
|
|
147
|
-
actionTertiaryTextHover: colorPalettePrimary.blue700,
|
|
148
|
-
actionTertiaryTextPress: colorPalettePrimary.blue800,
|
|
149
|
-
backgroundDanger: chroma(colorPalettePrimary.red100).alpha(0.08).hex(),
|
|
150
|
-
backgroundSecondary: colorPalettePrimary.grey100,
|
|
151
|
-
backgroundWarning: chroma(colorPalettePrimary.yellow100).alpha(0.08).hex(),
|
|
152
|
-
backgroundValidationDanger: colorPalettePrimary.red100,
|
|
153
|
-
backgroundValidationSuccess: colorPalettePrimary.blue100,
|
|
154
|
-
backgroundValidationWarning: colorPalettePrimary.yellow100,
|
|
155
|
-
border: colorPalettePrimary.grey300,
|
|
156
|
-
borderDecorative: colorPalettePrimary.grey200,
|
|
157
|
-
borderValidationDanger: colorPalettePrimary.red300,
|
|
158
|
-
borderValidationWarning: colorPalettePrimary.yellow300,
|
|
159
|
-
textPrimary: colorPalettePrimary.grey800,
|
|
160
|
-
textSecondary: colorPalettePrimary.grey600,
|
|
161
|
-
textPlaceholder: colorPalettePrimary.grey400,
|
|
162
|
-
textValidationDanger: colorPalettePrimary.red600,
|
|
163
|
-
textValidationSuccess: colorPalettePrimary.green600,
|
|
164
|
-
textValidationWarning: colorPalettePrimary.yellow600,
|
|
165
|
-
textValidationInfo: colorPalettePrimary.grey600,
|
|
166
|
-
overlayOverlay: chroma(colorPalettePrimary.grey100).alpha(0.72).hex(),
|
|
167
|
-
// Tags
|
|
168
|
-
tagDefault: chroma(colorPalettePrimary.grey600).alpha(0.08).hex(),
|
|
169
|
-
tagBrown: colorPaletteSecondary.brown,
|
|
170
|
-
tagCoral: colorPaletteSecondary.coral,
|
|
171
|
-
tagCharcoal: colorPalettePrimary.grey600,
|
|
172
|
-
tagIndigo: colorPaletteSecondary.indigo,
|
|
173
|
-
tagLemon: colorPaletteSecondary.lemon,
|
|
174
|
-
tagLime: colorPaletteSecondary.lime,
|
|
175
|
-
tagPink: colorPaletteSecondary.pink,
|
|
176
|
-
tagPurple: colorPaletteSecondary.purple,
|
|
177
|
-
tagTeal: colorPaletteSecondary.teal,
|
|
178
|
-
tagTurquoise: colorPaletteSecondary.turquoise,
|
|
179
|
-
tagText: colorPalettePrimary.white,
|
|
180
|
-
tagHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
|
|
181
|
-
tagPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
|
|
182
|
-
tagIconHover: chroma(colorPalettePrimary.white).alpha(0.8).hex(),
|
|
183
|
-
tagIconPress: chroma(colorPalettePrimary.white).alpha(0.76).hex(),
|
|
184
|
-
// Typography
|
|
185
|
-
typographyCodeBg: chroma(colorPalettePrimary.grey600).alpha(0.08).hex(),
|
|
186
|
-
// Table
|
|
187
|
-
tableRowHover: chroma(colorPalettePrimary.grey600).alpha(0.04).hex(),
|
|
188
|
-
tooltipBackgroundTooltip: colorPalettePrimary.grey800
|
|
189
|
-
};
|
|
190
|
-
const darkColorList = {
|
|
191
|
-
actionDangerPrimaryBackgroundDefault: chroma(colorPalettePrimary.red400).alpha(0.84).hex(),
|
|
192
|
-
actionDangerPrimaryBackgroundHover: chroma(colorPalettePrimary.red400).alpha(0.72).hex(),
|
|
193
|
-
actionDangerPrimaryBackgroundPress: chroma(colorPalettePrimary.red400).alpha(0.6).hex(),
|
|
194
|
-
actionDangerDefaultBackgroundDefault: chroma(colorPalettePrimary.red400).alpha(0).hex(),
|
|
195
|
-
actionDangerDefaultBackgroundHover: chroma(colorPalettePrimary.red400).alpha(0.08).hex(),
|
|
196
|
-
actionDangerDefaultBackgroundPress: chroma(colorPalettePrimary.red400).alpha(0.16).hex(),
|
|
197
|
-
actionDangerDefaultBorderDefault: colorPalettePrimary.red400,
|
|
198
|
-
actionDangerDefaultBorderHover: chroma(colorPalettePrimary.red400).alpha(0.72).hex(),
|
|
199
|
-
actionDangerDefaultBorderPress: chroma(colorPalettePrimary.red400).alpha(0.6).hex(),
|
|
200
|
-
actionDangerDefaultTextDefault: colorPalettePrimary.red400,
|
|
201
|
-
actionDangerDefaultTextHover: chroma(colorPalettePrimary.red400).alpha(0.72).hex(),
|
|
202
|
-
actionDangerDefaultTextPress: chroma(colorPalettePrimary.red400).alpha(0.6).hex(),
|
|
203
|
-
actionDefaultBackgroundDefault: chroma(colorPalettePrimary.blue400).alpha(0).hex(),
|
|
204
|
-
actionDefaultBackgroundHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
|
|
205
|
-
actionDefaultBackgroundPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
|
|
206
|
-
actionDefaultBorderDefault: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
|
|
207
|
-
actionDefaultBorderFocus: chroma(colorPalettePrimary.blue400).alpha(0.84).hex(),
|
|
208
|
-
actionDefaultBorderHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
|
|
209
|
-
actionDefaultBorderPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
|
|
210
|
-
actionDefaultTextDefault: chroma(colorPalettePrimary.white).alpha(0.84).hex(),
|
|
211
|
-
actionDefaultTextHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
|
|
212
|
-
actionDefaultTextPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
|
|
213
|
-
actionDisabledBackground: chroma(colorPalettePrimary.white).alpha(0.24).hex(),
|
|
214
|
-
actionDisabledText: chroma(colorPalettePrimary.white).alpha(0.4).hex(),
|
|
215
|
-
actionPrimaryBackgroundDefault: chroma(colorPalettePrimary.blue400).alpha(0.84).hex(),
|
|
216
|
-
actionPrimaryBackgroundHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
|
|
217
|
-
actionPrimaryBackgroundPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
|
|
218
|
-
actionPrimaryTextDefault: colorPalettePrimary.grey800,
|
|
219
|
-
actionPrimaryTextHover: colorPalettePrimary.grey800,
|
|
220
|
-
actionPrimaryTextPress: colorPalettePrimary.grey800,
|
|
221
|
-
actionTertiaryBackgroundDefault: chroma(colorPalettePrimary.blue400).alpha(0).hex(),
|
|
222
|
-
actionTertiaryBackgroundHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
|
|
223
|
-
actionTertiaryBackgroundPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
|
|
224
|
-
actionTertiaryTextDefault: chroma(colorPalettePrimary.blue400).alpha(0.84).hex(),
|
|
225
|
-
actionTertiaryTextHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
|
|
226
|
-
actionTertiaryTextPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
|
|
227
|
-
backgroundPrimary: colorPalettePrimary.grey800,
|
|
228
|
-
backgroundSecondary: '#283035',
|
|
229
|
-
backgroundValidationDanger: 'transparent',
|
|
230
|
-
backgroundValidationSuccess: 'transparent',
|
|
231
|
-
backgroundValidationWarning: 'transparent',
|
|
232
|
-
border: chroma(colorPalettePrimary.white).alpha(0.48).hex(),
|
|
233
|
-
borderDecorative: chroma(colorPalettePrimary.white).alpha(0.24).hex(),
|
|
234
|
-
borderValidationDanger: colorPalettePrimary.red300,
|
|
235
|
-
borderValidationWarning: colorPalettePrimary.yellow300,
|
|
236
|
-
textPrimary: chroma(colorPalettePrimary.white).alpha(0.84).hex(),
|
|
237
|
-
textSecondary: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
|
|
238
|
-
textPlaceholder: chroma(colorPalettePrimary.grey400).alpha(0.84).hex(),
|
|
239
|
-
textValidationDanger: chroma(colorPalettePrimary.red400).alpha(0.84).hex(),
|
|
240
|
-
textValidationSuccess: chroma(colorPalettePrimary.green400).alpha(0.84).hex(),
|
|
241
|
-
textValidationWarning: chroma(colorPalettePrimary.yellow400).alpha(0.84).hex(),
|
|
242
|
-
textValidationInfo: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
|
|
243
|
-
overlayOverlay: chroma(colorPalettePrimary.grey800).alpha(0.72).hex(),
|
|
244
|
-
// Tags
|
|
245
|
-
tagDefault: chroma(colorPalettePrimary.white).alpha(0.16).hex(),
|
|
246
|
-
tagBrown: chroma(colorPaletteSecondary.brown).alpha(0.84).hex(),
|
|
247
|
-
tagCoral: chroma(colorPaletteSecondary.coral).alpha(0.84).hex(),
|
|
248
|
-
tagCharcoal: chroma(colorPalettePrimary.grey600).alpha(0.84).hex(),
|
|
249
|
-
tagIndigo: chroma(colorPaletteSecondary.indigo).alpha(0.84).hex(),
|
|
250
|
-
tagLemon: chroma(colorPaletteSecondary.lemon).alpha(0.84).hex(),
|
|
251
|
-
tagLime: chroma(colorPaletteSecondary.lime).alpha(0.84).hex(),
|
|
252
|
-
tagPink: chroma(colorPaletteSecondary.pink).alpha(0.84).hex(),
|
|
253
|
-
tagPurple: chroma(colorPaletteSecondary.purple).alpha(0.84).hex(),
|
|
254
|
-
tagTeal: chroma(colorPaletteSecondary.teal).alpha(0.84).hex(),
|
|
255
|
-
tagTurquoise: chroma(colorPaletteSecondary.turquoise).alpha(0.84).hex(),
|
|
256
|
-
tagText: chroma(colorPalettePrimary.white).alpha(0.84).hex(),
|
|
257
|
-
tagHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
|
|
258
|
-
tagPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
|
|
259
|
-
tagIconHover: chroma(colorPalettePrimary.white).alpha(0.8).hex(),
|
|
260
|
-
tagIconPress: chroma(colorPalettePrimary.white).alpha(0.76).hex(),
|
|
261
|
-
// Typography
|
|
262
|
-
typographyCodeBg: chroma(colorPalettePrimary.white).alpha(0.16).hex(),
|
|
263
|
-
// Table
|
|
264
|
-
tableRowHover: chroma(colorPalettePrimary.white).alpha(0.16).hex(),
|
|
265
|
-
tooltipBackgroundTooltip: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
|
|
266
|
-
// Missing in list
|
|
267
|
-
backgroundDanger: 'rgba(200,45,76,0.08)',
|
|
268
|
-
backgroundWarning: 'rgba(222,121,33,0.08)'
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
const darkColors = {
|
|
272
|
-
...darkColorList,
|
|
273
|
-
...colorPalettePrimary,
|
|
274
|
-
...colorPaletteSecondary
|
|
275
|
-
};
|
|
276
|
-
const lightColors = {
|
|
277
|
-
...lightColorList,
|
|
278
|
-
...colorPalettePrimary,
|
|
279
|
-
...colorPaletteSecondary
|
|
280
|
-
};
|
|
281
|
-
function getSemanticColors(isDarkMode) {
|
|
282
|
-
return isDarkMode ? darkColors : lightColors;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
// TODO (FEINF-1674): Remove when removing USE_NEW_RADIO_STYLES
|
|
286
|
-
/*
|
|
287
|
-
Colors that need to be replaced by semantic colors.
|
|
288
|
-
*/
|
|
289
|
-
const deprecatedColors = {
|
|
290
|
-
// Radio Colors
|
|
291
|
-
radioInteractiveAvailable: colorPalettePrimary.primary,
|
|
292
|
-
radioInteractiveHover: '#186099',
|
|
293
|
-
radioInteractivePress: '#0D4F85',
|
|
294
|
-
radioDisabled: '#A2AEB8',
|
|
295
|
-
radioDefaultBorder: '#64727D',
|
|
296
|
-
radioDefaultBackground: '#FFFFFF',
|
|
297
|
-
radioInteractiveHoverSecondary: 'rgba(34, 115, 181, 0.08)',
|
|
298
|
-
// Fade of Interactive Available
|
|
299
|
-
radioInteractivePressSecondary: 'rgba(34, 115, 181, 0.16)' // Fade of Interactive Available
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
function getColors(isDarkMode) {
|
|
303
|
-
return {
|
|
304
|
-
...deprecatedColors,
|
|
305
|
-
...getSemanticColors(isDarkMode)
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
// eslint-disable-next-line import/no-anonymous-default-export
|
|
310
|
-
var antdVars = {
|
|
311
|
-
// IMPORTANT: Do not read this directly from components. Use `React.useContext`.
|
|
312
|
-
'ant-prefix': 'du-bois'
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
const DEFAULT_SPACING_UNIT = 8;
|
|
316
|
-
const MODAL_PADDING = 40;
|
|
317
|
-
const spacing = {
|
|
318
|
-
xs: DEFAULT_SPACING_UNIT / 2,
|
|
319
|
-
sm: DEFAULT_SPACING_UNIT,
|
|
320
|
-
md: DEFAULT_SPACING_UNIT * 2,
|
|
321
|
-
lg: DEFAULT_SPACING_UNIT * 3
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
// Less variables that are used by AntD
|
|
325
|
-
({
|
|
326
|
-
defaultPaddingLg: spacing.lg,
|
|
327
|
-
defaultPaddingMd: spacing.md,
|
|
328
|
-
defaultPaddingSm: spacing.sm,
|
|
329
|
-
defaultPaddingXs: spacing.sm,
|
|
330
|
-
defaultPaddingXss: spacing.xs,
|
|
331
|
-
paddingLg: spacing.md,
|
|
332
|
-
// TODO: Check if there is a better alternative with team
|
|
333
|
-
paddingMd: spacing.sm,
|
|
334
|
-
paddingSm: spacing.sm,
|
|
335
|
-
paddingXs: spacing.xs,
|
|
336
|
-
paddingXss: 0,
|
|
337
|
-
marginSm: 12,
|
|
338
|
-
marginLg: spacing.lg,
|
|
339
|
-
// Button
|
|
340
|
-
btnPaddingHorizontalBase: DEFAULT_SPACING_UNIT * 2,
|
|
341
|
-
btnPaddingHorizontalLg: DEFAULT_SPACING_UNIT * 2,
|
|
342
|
-
btnPaddingHorizontalSm: DEFAULT_SPACING_UNIT * 2,
|
|
343
|
-
// Input
|
|
344
|
-
inputPaddingHorizontal: DEFAULT_SPACING_UNIT * 1.5,
|
|
345
|
-
inputPaddingHorizontalBase: DEFAULT_SPACING_UNIT * 1.5,
|
|
346
|
-
inputPaddingHorizontalSm: DEFAULT_SPACING_UNIT * 1.5,
|
|
347
|
-
inputPaddingHorizontalLg: DEFAULT_SPACING_UNIT * 1.5,
|
|
348
|
-
inputPaddingVertical: spacing.xs + 1,
|
|
349
|
-
inputPaddingVerticalBase: spacing.xs + 1,
|
|
350
|
-
inputPaddingVerticalSm: spacing.xs + 1,
|
|
351
|
-
inputPaddingVerticalLg: spacing.xs + 1,
|
|
352
|
-
// Modal
|
|
353
|
-
modalPadding: MODAL_PADDING,
|
|
354
|
-
modalLessPadding: MODAL_PADDING - 20,
|
|
355
|
-
modalHeaderPadding: `${MODAL_PADDING}px ${MODAL_PADDING}px ${MODAL_PADDING - 20}px`,
|
|
356
|
-
modalHeaderCloseSize: MODAL_PADDING * 2 + 22,
|
|
357
|
-
modalHeaderBorderWidth: 0,
|
|
358
|
-
modalBodyPadding: `0 ${MODAL_PADDING}px`,
|
|
359
|
-
modalFooterPaddingVertical: 0,
|
|
360
|
-
modalFooterPaddingHorizontal: 0,
|
|
361
|
-
modalFooterBorderWidth: 0,
|
|
362
|
-
// Switch
|
|
363
|
-
switchPadding: 0,
|
|
364
|
-
switchHeight: 16,
|
|
365
|
-
switchMinWidth: 28,
|
|
366
|
-
switchPinSize: 14
|
|
367
|
-
});
|
|
368
|
-
var spacing$1 = spacing;
|
|
369
|
-
|
|
370
|
-
const heightBase = 40;
|
|
371
|
-
const borderWidth = 1;
|
|
372
|
-
const antdGeneralVariables = {
|
|
373
|
-
classnamePrefix: antdVars['ant-prefix'],
|
|
374
|
-
iconfontCssPrefix: 'anticon',
|
|
375
|
-
borderRadiusBase: 4,
|
|
376
|
-
borderWidth: borderWidth,
|
|
377
|
-
heightSm: 32,
|
|
378
|
-
heightBase: heightBase,
|
|
379
|
-
iconSize: 24,
|
|
380
|
-
iconFontSize: 16,
|
|
381
|
-
buttonHeight: heightBase,
|
|
382
|
-
// Height available within button (for label and icon). Same for middle and small buttons.
|
|
383
|
-
buttonInnerHeight: heightBase - spacing$1.sm * 2 - borderWidth * 2
|
|
384
|
-
};
|
|
385
|
-
const getShadowVariables = isDarkMode => {
|
|
386
|
-
if (isDarkMode) {
|
|
387
|
-
return {
|
|
388
|
-
shadowLow: '0px 4px 16px rgba(0, 0, 0, 0.12)',
|
|
389
|
-
shadowHigh: '0px 8px 24px rgba(0, 0, 0, 0.2);'
|
|
390
|
-
};
|
|
391
|
-
} else {
|
|
392
|
-
return {
|
|
393
|
-
shadowLow: '0px 4px 16px rgba(31, 39, 45, 0.12)',
|
|
394
|
-
shadowHigh: '0px 8px 24px rgba(31, 39, 45, 0.2)'
|
|
395
|
-
};
|
|
396
|
-
}
|
|
397
|
-
};
|
|
398
|
-
var generalVariables = antdGeneralVariables;
|
|
399
|
-
|
|
400
|
-
const FONT_SIZE_BASE = 13;
|
|
401
|
-
|
|
402
|
-
// Less variables that are used by AntD
|
|
403
|
-
const antdTypography = {
|
|
404
|
-
fontSizeSm: 12,
|
|
405
|
-
fontSizeBase: FONT_SIZE_BASE,
|
|
406
|
-
fontSizeMd: FONT_SIZE_BASE,
|
|
407
|
-
fontSizeLg: 18,
|
|
408
|
-
fontSizeXl: 22,
|
|
409
|
-
fontSizeXxl: 32,
|
|
410
|
-
lineHeightSm: '16px',
|
|
411
|
-
lineHeightBase: '20px',
|
|
412
|
-
lineHeightMd: '20px',
|
|
413
|
-
lineHeightLg: '24px',
|
|
414
|
-
lineHeightXl: '28px',
|
|
415
|
-
lineHeightXxl: '40px',
|
|
416
|
-
typographyBoldFontWeight: 600
|
|
417
|
-
};
|
|
418
|
-
|
|
419
|
-
// eslint-disable-next-line import/no-anonymous-default-export
|
|
420
|
-
var typography = {
|
|
421
|
-
...antdTypography
|
|
422
|
-
};
|
|
423
|
-
|
|
424
|
-
const defaultOptions = {
|
|
425
|
-
enableAnimation: false,
|
|
426
|
-
zIndexBase: 1000
|
|
427
|
-
};
|
|
428
|
-
|
|
429
|
-
// Function to get variables for a certain theme.
|
|
430
|
-
// End users should use useDesignSystemTheme instead.
|
|
431
|
-
function getTheme(isDarkMode) {
|
|
432
|
-
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOptions;
|
|
433
|
-
return {
|
|
434
|
-
colors: getColors(isDarkMode),
|
|
435
|
-
spacing: spacing$1,
|
|
436
|
-
general: {
|
|
437
|
-
...generalVariables,
|
|
438
|
-
...getShadowVariables(isDarkMode)
|
|
439
|
-
},
|
|
440
|
-
typography,
|
|
441
|
-
borders: borders$1,
|
|
442
|
-
responsive: responsive$1,
|
|
443
|
-
isDarkMode,
|
|
444
|
-
options
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
function getClassNamePrefix(theme) {
|
|
449
|
-
const antdThemeName = theme.isDarkMode ? 'dark' : 'light';
|
|
450
|
-
return `${theme.general.classnamePrefix}-${antdThemeName}`;
|
|
451
|
-
}
|
|
452
|
-
function getPrefixedClassNameFromTheme(theme, className) {
|
|
453
|
-
return [getClassNamePrefix(theme), className].filter(Boolean).join('-');
|
|
454
|
-
}
|
|
455
|
-
function useDesignSystemTheme() {
|
|
456
|
-
const emotionTheme = useTheme();
|
|
457
|
-
// Graceful fallback to default theme in case a test or developer forgot context.
|
|
458
|
-
const theme = emotionTheme && emotionTheme.general ? emotionTheme : getTheme(false);
|
|
459
|
-
return {
|
|
460
|
-
theme: theme,
|
|
461
|
-
classNamePrefix: getClassNamePrefix(theme),
|
|
462
|
-
getPrefixedClassName: className => getPrefixedClassNameFromTheme(theme, className)
|
|
463
|
-
};
|
|
464
|
-
}
|
|
465
|
-
// This is a simple typed HOC wrapper around the useDesignSystemTheme hook, for use in older react components.
|
|
466
|
-
function WithDesignSystemThemeHoc(Component) {
|
|
467
|
-
return function WrappedWithDesignSystemTheme(props) {
|
|
468
|
-
const themeValues = useDesignSystemTheme();
|
|
469
|
-
return jsx(Component, {
|
|
470
|
-
...props,
|
|
471
|
-
designSystemThemeApi: themeValues
|
|
472
|
-
});
|
|
473
|
-
};
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
const DuboisContextDefaults = {
|
|
477
|
-
enableAnimation: false,
|
|
478
|
-
// Prefer to use useDesignSystemTheme.getPrefixedClassName instead
|
|
479
|
-
getPrefixCls: suffix => suffix ? `du-bois-${suffix}` : 'du-bois',
|
|
480
|
-
flags: {}
|
|
481
|
-
};
|
|
482
|
-
const DesignSystemThemeContext = /*#__PURE__*/createContext({
|
|
483
|
-
isDarkMode: false
|
|
484
|
-
});
|
|
485
|
-
const DesignSystemContext = /*#__PURE__*/createContext(DuboisContextDefaults);
|
|
486
|
-
const DU_BOIS_ENABLE_ANIMATION_CLASSNAME = 'du-bois-enable-animation';
|
|
487
|
-
function getAnimationCss(enableAnimation) {
|
|
488
|
-
const disableAnimationCss = {
|
|
489
|
-
animationDuration: '0s !important',
|
|
490
|
-
transition: 'none !important'
|
|
491
|
-
};
|
|
492
|
-
return enableAnimation ? {} : {
|
|
493
|
-
// Apply to the current element
|
|
494
|
-
...disableAnimationCss,
|
|
495
|
-
'&::before': disableAnimationCss,
|
|
496
|
-
'&::after': disableAnimationCss,
|
|
497
|
-
// Also apply to all child elements with a class that starts with our prefix
|
|
498
|
-
[`[class*=du-bois]:not(.${DU_BOIS_ENABLE_ANIMATION_CLASSNAME}, .${DU_BOIS_ENABLE_ANIMATION_CLASSNAME} *)`]: {
|
|
499
|
-
...disableAnimationCss,
|
|
500
|
-
// Also target any pseudo-elements associated with those elements, since these can also be animated.
|
|
501
|
-
'&::before': disableAnimationCss,
|
|
502
|
-
'&::after': disableAnimationCss
|
|
503
|
-
}
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
const DesignSystemProviderPropsContext = /*#__PURE__*/React__default.createContext(null);
|
|
507
|
-
const AntDConfigProviderPropsContext = /*#__PURE__*/React__default.createContext(null);
|
|
508
|
-
|
|
509
|
-
/** Only to be accessed by SupportsDuBoisThemes, except for special exceptions like tests and storybook. Ask in #dubois first if you need to use it. */
|
|
510
|
-
const DesignSystemThemeProvider = _ref => {
|
|
511
|
-
let {
|
|
512
|
-
isDarkMode = false,
|
|
513
|
-
children
|
|
514
|
-
} = _ref;
|
|
515
|
-
return jsx(DesignSystemThemeContext.Provider, {
|
|
516
|
-
value: {
|
|
517
|
-
isDarkMode
|
|
518
|
-
},
|
|
519
|
-
children: children
|
|
520
|
-
});
|
|
521
|
-
};
|
|
522
|
-
const DesignSystemProvider = _ref2 => {
|
|
523
|
-
let {
|
|
524
|
-
isDarkMode: deprecatedDarkModeProp,
|
|
525
|
-
children,
|
|
526
|
-
enableAnimation = false,
|
|
527
|
-
zIndexBase = 1000,
|
|
528
|
-
getPopupContainer,
|
|
529
|
-
flags = {}
|
|
530
|
-
} = _ref2;
|
|
531
|
-
const {
|
|
532
|
-
isDarkMode: contextDarkModeVal
|
|
533
|
-
} = useContext(DesignSystemThemeContext);
|
|
534
|
-
const isDarkMode = deprecatedDarkModeProp !== null && deprecatedDarkModeProp !== void 0 ? deprecatedDarkModeProp : contextDarkModeVal;
|
|
535
|
-
const theme = useMemo(() => getTheme(isDarkMode, {
|
|
536
|
-
enableAnimation,
|
|
537
|
-
zIndexBase
|
|
538
|
-
}),
|
|
539
|
-
// TODO: revisit this
|
|
540
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
541
|
-
[isDarkMode, zIndexBase]);
|
|
542
|
-
const providerPropsContext = useMemo(() => ({
|
|
543
|
-
isDarkMode,
|
|
544
|
-
enableAnimation,
|
|
545
|
-
zIndexBase,
|
|
546
|
-
getPopupContainer,
|
|
547
|
-
flags
|
|
548
|
-
}), [isDarkMode, enableAnimation, zIndexBase, getPopupContainer, flags]);
|
|
549
|
-
const classNamePrefix = getClassNamePrefix(theme);
|
|
550
|
-
const value = useMemo(() => {
|
|
551
|
-
return {
|
|
552
|
-
enableAnimation,
|
|
553
|
-
isDarkMode,
|
|
554
|
-
getPrefixCls: suffix => getPrefixedClassNameFromTheme(theme, suffix),
|
|
555
|
-
getPopupContainer,
|
|
556
|
-
flags
|
|
557
|
-
};
|
|
558
|
-
}, [enableAnimation, theme, isDarkMode, getPopupContainer, flags]);
|
|
559
|
-
useEffect(() => {
|
|
560
|
-
return () => {
|
|
561
|
-
// when the design system context is unmounted, make sure the notification cache is also cleaned up
|
|
562
|
-
notification.destroy();
|
|
563
|
-
};
|
|
564
|
-
}, []);
|
|
565
|
-
return jsx(DesignSystemProviderPropsContext.Provider, {
|
|
566
|
-
value: providerPropsContext,
|
|
567
|
-
children: jsx(ThemeProvider, {
|
|
568
|
-
theme: theme,
|
|
569
|
-
children: jsx(AntDConfigProviderPropsContext.Provider, {
|
|
570
|
-
value: {
|
|
571
|
-
prefixCls: classNamePrefix,
|
|
572
|
-
getPopupContainer
|
|
573
|
-
},
|
|
574
|
-
children: jsx(DesignSystemContext.Provider, {
|
|
575
|
-
value: value,
|
|
576
|
-
children: children
|
|
577
|
-
})
|
|
578
|
-
})
|
|
579
|
-
})
|
|
580
|
-
});
|
|
581
|
-
};
|
|
582
|
-
const ApplyDesignSystemContextOverrides = _ref3 => {
|
|
583
|
-
let {
|
|
584
|
-
enableAnimation,
|
|
585
|
-
zIndexBase,
|
|
586
|
-
getPopupContainer,
|
|
587
|
-
flags,
|
|
588
|
-
children
|
|
589
|
-
} = _ref3;
|
|
590
|
-
const parentDesignSystemProviderProps = useContext(DesignSystemProviderPropsContext);
|
|
591
|
-
if (parentDesignSystemProviderProps === null) {
|
|
592
|
-
throw new Error(`ApplyDesignSystemContextOverrides cannot be used standalone - DesignSystemProvider must exist in the React context`);
|
|
593
|
-
}
|
|
594
|
-
const newProps = useMemo(() => ({
|
|
595
|
-
...parentDesignSystemProviderProps,
|
|
596
|
-
enableAnimation: enableAnimation !== null && enableAnimation !== void 0 ? enableAnimation : parentDesignSystemProviderProps.enableAnimation,
|
|
597
|
-
zIndexBase: zIndexBase !== null && zIndexBase !== void 0 ? zIndexBase : parentDesignSystemProviderProps.zIndexBase,
|
|
598
|
-
getPopupContainer: getPopupContainer !== null && getPopupContainer !== void 0 ? getPopupContainer : parentDesignSystemProviderProps.getPopupContainer,
|
|
599
|
-
flags: {
|
|
600
|
-
...parentDesignSystemProviderProps.flags,
|
|
601
|
-
...flags
|
|
602
|
-
}
|
|
603
|
-
}), [parentDesignSystemProviderProps, enableAnimation, zIndexBase, getPopupContainer, flags]);
|
|
604
|
-
return jsx(DesignSystemProvider, {
|
|
605
|
-
...newProps,
|
|
606
|
-
children: children
|
|
607
|
-
});
|
|
608
|
-
};
|
|
609
|
-
|
|
610
|
-
// This is a more-specific version of `ApplyDesignSystemContextOverrides` that only allows overriding the flags.
|
|
611
|
-
const ApplyDesignSystemFlags = _ref4 => {
|
|
612
|
-
let {
|
|
613
|
-
flags,
|
|
614
|
-
children
|
|
615
|
-
} = _ref4;
|
|
616
|
-
const parentDesignSystemProviderProps = useContext(DesignSystemProviderPropsContext);
|
|
617
|
-
if (parentDesignSystemProviderProps === null) {
|
|
618
|
-
throw new Error(`ApplyDesignSystemFlags cannot be used standalone - DesignSystemProvider must exist in the React context`);
|
|
619
|
-
}
|
|
620
|
-
const newProps = useMemo(() => ({
|
|
621
|
-
...parentDesignSystemProviderProps,
|
|
622
|
-
flags: {
|
|
623
|
-
...parentDesignSystemProviderProps.flags,
|
|
624
|
-
...flags
|
|
625
|
-
}
|
|
626
|
-
}), [parentDesignSystemProviderProps, flags]);
|
|
627
|
-
return jsx(DesignSystemProvider, {
|
|
628
|
-
...newProps,
|
|
629
|
-
children: children
|
|
630
|
-
});
|
|
631
|
-
};
|
|
632
|
-
const DesignSystemAntDConfigProvider = _ref5 => {
|
|
633
|
-
let {
|
|
634
|
-
children
|
|
635
|
-
} = _ref5;
|
|
636
|
-
const antdContext = useAntDConfigProviderContext();
|
|
637
|
-
return jsx(ConfigProvider, {
|
|
638
|
-
...antdContext,
|
|
639
|
-
children: children
|
|
640
|
-
});
|
|
641
|
-
};
|
|
642
|
-
const useAntDConfigProviderContext = () => {
|
|
643
|
-
var _useContext;
|
|
644
|
-
return (_useContext = useContext(AntDConfigProviderPropsContext)) !== null && _useContext !== void 0 ? _useContext : {
|
|
645
|
-
prefixCls: undefined
|
|
646
|
-
};
|
|
647
|
-
};
|
|
648
|
-
|
|
649
|
-
/**
|
|
650
|
-
* When using AntD components inside Design System wrapper components (e.g. Modal, Collapse etc),
|
|
651
|
-
* we don't want Design System's prefix class to override them.
|
|
652
|
-
*
|
|
653
|
-
* Since all Design System's components have are wrapped with DesignSystemAntDConfigProvider,
|
|
654
|
-
* this won't affect their own prefixCls, but just allow nested antd components to keep their ant prefix.
|
|
655
|
-
*/
|
|
656
|
-
const RestoreAntDDefaultClsPrefix = _ref6 => {
|
|
657
|
-
let {
|
|
658
|
-
children
|
|
659
|
-
} = _ref6;
|
|
660
|
-
return jsx(ConfigProvider, {
|
|
661
|
-
prefixCls: "ant",
|
|
662
|
-
children: children
|
|
663
|
-
});
|
|
664
|
-
};
|
|
665
|
-
|
|
666
|
-
function useDesignSystemContext() {
|
|
667
|
-
return useContext(DesignSystemContext);
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
function useDesignSystemFlags() {
|
|
671
|
-
const context = useDesignSystemContext();
|
|
672
|
-
return context.flags;
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
const getIconEmotionStyles = theme => {
|
|
676
|
-
return /*#__PURE__*/css({
|
|
677
|
-
fontSize: theme.general.iconFontSize
|
|
678
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:getIconEmotionStyles;");
|
|
679
|
-
};
|
|
680
|
-
const getIconValidationColor = (theme, color) => {
|
|
681
|
-
switch (color) {
|
|
682
|
-
case 'success':
|
|
683
|
-
return theme.colors.textValidationSuccess;
|
|
684
|
-
case 'warning':
|
|
685
|
-
return theme.colors.textValidationWarning;
|
|
686
|
-
case 'danger':
|
|
687
|
-
return theme.colors.textValidationDanger;
|
|
688
|
-
default:
|
|
689
|
-
return color;
|
|
690
|
-
}
|
|
691
|
-
};
|
|
692
|
-
const Icon = props => {
|
|
693
|
-
const {
|
|
694
|
-
component: Component,
|
|
695
|
-
dangerouslySetAntdProps,
|
|
696
|
-
color,
|
|
697
|
-
style,
|
|
698
|
-
...otherProps
|
|
699
|
-
} = props;
|
|
700
|
-
const {
|
|
701
|
-
theme
|
|
702
|
-
} = useDesignSystemTheme();
|
|
703
|
-
const MemoizedComponent = useMemo(() => Component ? _ref => {
|
|
704
|
-
let {
|
|
705
|
-
fill,
|
|
706
|
-
...iconProps
|
|
707
|
-
} = _ref;
|
|
708
|
-
return (
|
|
709
|
-
// We don't rely on top-level fills for our colors. Fills are specified
|
|
710
|
-
// with "currentColor" on children of the top-most svg.
|
|
711
|
-
jsx(Component, {
|
|
712
|
-
fill: "none",
|
|
713
|
-
...iconProps
|
|
714
|
-
})
|
|
715
|
-
);
|
|
716
|
-
} : undefined, [Component]);
|
|
717
|
-
return jsx(DesignSystemAntDConfigProvider, {
|
|
718
|
-
children: jsx(AntDIcon, {
|
|
719
|
-
css: getIconEmotionStyles(theme),
|
|
720
|
-
component: MemoizedComponent,
|
|
721
|
-
style: {
|
|
722
|
-
color: getIconValidationColor(theme, color),
|
|
723
|
-
...style
|
|
724
|
-
},
|
|
725
|
-
...otherProps,
|
|
726
|
-
...dangerouslySetAntdProps
|
|
727
|
-
})
|
|
728
|
-
});
|
|
729
|
-
};
|
|
730
|
-
|
|
731
|
-
function SvgChevronLeftIcon(props) {
|
|
732
|
-
return jsx("svg", {
|
|
733
|
-
width: "1em",
|
|
734
|
-
height: "1em",
|
|
735
|
-
viewBox: "0 0 16 16",
|
|
736
|
-
fill: "none",
|
|
737
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
738
|
-
...props,
|
|
739
|
-
children: jsx("path", {
|
|
740
|
-
fillRule: "evenodd",
|
|
741
|
-
clipRule: "evenodd",
|
|
742
|
-
d: "M7.083 8L10 10.947 8.958 12 5 8l3.958-4L10 5.053 7.083 8z",
|
|
743
|
-
fill: "currentColor"
|
|
744
|
-
})
|
|
745
|
-
});
|
|
746
|
-
}
|
|
747
|
-
function ChevronLeftIcon(props) {
|
|
748
|
-
return jsx(Icon, {
|
|
749
|
-
...props,
|
|
750
|
-
component: SvgChevronLeftIcon
|
|
751
|
-
});
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
function SvgChevronRightIcon(props) {
|
|
755
|
-
return jsx("svg", {
|
|
756
|
-
width: "1em",
|
|
757
|
-
height: "1em",
|
|
758
|
-
viewBox: "0 0 16 16",
|
|
759
|
-
fill: "none",
|
|
760
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
761
|
-
...props,
|
|
762
|
-
children: jsx("path", {
|
|
763
|
-
fillRule: "evenodd",
|
|
764
|
-
clipRule: "evenodd",
|
|
765
|
-
d: "M8.917 8L6 5.053 7.042 4 11 8l-3.958 4L6 10.947 8.917 8z",
|
|
766
|
-
fill: "currentColor"
|
|
767
|
-
})
|
|
768
|
-
});
|
|
769
|
-
}
|
|
770
|
-
function ChevronRightIcon(props) {
|
|
771
|
-
return jsx(Icon, {
|
|
772
|
-
...props,
|
|
773
|
-
component: SvgChevronRightIcon
|
|
774
|
-
});
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
function SvgCloseIcon(props) {
|
|
778
|
-
return jsx("svg", {
|
|
779
|
-
width: "1em",
|
|
780
|
-
height: "1em",
|
|
781
|
-
viewBox: "0 0 16 16",
|
|
782
|
-
fill: "none",
|
|
783
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
784
|
-
...props,
|
|
785
|
-
children: jsx("path", {
|
|
786
|
-
fillRule: "evenodd",
|
|
787
|
-
clipRule: "evenodd",
|
|
788
|
-
d: "M6.97 8.03L2 3.06 3.06 2l4.97 4.97L13 2l1.06 1.06-4.969 4.97 4.97 4.97L13 14.06 8.03 9.092l-4.97 4.97L2 13l4.97-4.97z",
|
|
789
|
-
fill: "currentColor"
|
|
790
|
-
})
|
|
791
|
-
});
|
|
792
|
-
}
|
|
793
|
-
function CloseIcon(props) {
|
|
794
|
-
return jsx(Icon, {
|
|
795
|
-
...props,
|
|
796
|
-
component: SvgCloseIcon
|
|
797
|
-
});
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
function SvgCursorIcon(props) {
|
|
801
|
-
return jsxs("svg", {
|
|
802
|
-
width: "1em",
|
|
803
|
-
height: "1em",
|
|
804
|
-
viewBox: "0 0 16 16",
|
|
805
|
-
fill: "none",
|
|
806
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
807
|
-
...props,
|
|
808
|
-
children: [jsx("g", {
|
|
809
|
-
clipPath: "url(#CursorIcon_svg__clip0_14914_35410)",
|
|
810
|
-
children: jsx("path", {
|
|
811
|
-
fillRule: "evenodd",
|
|
812
|
-
clipRule: "evenodd",
|
|
813
|
-
d: "M1.22 1.22a.75.75 0 01.802-.169l13.5 5.25a.75.75 0 01-.043 1.413L9.597 9.597l-1.883 5.882a.75.75 0 01-1.413.043l-5.25-13.5a.75.75 0 01.169-.802zm1.847 1.847l3.864 9.937 1.355-4.233a.75.75 0 01.485-.485l4.233-1.355-9.937-3.864z",
|
|
814
|
-
fill: "currentColor"
|
|
815
|
-
})
|
|
816
|
-
}), jsx("defs", {
|
|
817
|
-
children: jsx("clipPath", {
|
|
818
|
-
id: "CursorIcon_svg__clip0_14914_35410",
|
|
819
|
-
children: jsx("path", {
|
|
820
|
-
fill: "#fff",
|
|
821
|
-
transform: "matrix(-1 0 0 1 16 0)",
|
|
822
|
-
d: "M0 0h16v16H0z"
|
|
823
|
-
})
|
|
824
|
-
})
|
|
825
|
-
})]
|
|
826
|
-
});
|
|
827
|
-
}
|
|
828
|
-
function CursorIcon(props) {
|
|
829
|
-
return jsx(Icon, {
|
|
830
|
-
...props,
|
|
831
|
-
component: SvgCursorIcon
|
|
832
|
-
});
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
function SvgFaceFrownIcon(props) {
|
|
836
|
-
return jsxs("svg", {
|
|
837
|
-
width: "1em",
|
|
838
|
-
height: "1em",
|
|
839
|
-
viewBox: "0 0 16 16",
|
|
840
|
-
fill: "none",
|
|
841
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
842
|
-
...props,
|
|
843
|
-
children: [jsxs("g", {
|
|
844
|
-
clipPath: "url(#FaceFrownIcon_svg__clip0_16320_32311)",
|
|
845
|
-
fill: "currentColor",
|
|
846
|
-
children: [jsx("path", {
|
|
847
|
-
d: "M6 5.25a.75.75 0 000 1.5h.007a.75.75 0 000-1.5H6zM9.25 6a.75.75 0 01.75-.75h.007a.75.75 0 010 1.5H10A.75.75 0 019.25 6zM10.07 11.12a.75.75 0 001.197-.903l-.001-.001v-.001l-.003-.003-.005-.006-.015-.02a2.95 2.95 0 00-.217-.246 4.717 4.717 0 00-.627-.546C9.86 9 9.04 8.584 8 8.584s-1.858.416-2.4.81a4.716 4.716 0 00-.795.733 2.87 2.87 0 00-.048.06l-.015.019-.005.006-.002.003-.031.044.03-.042a.75.75 0 101.22.875 3.219 3.219 0 01.529-.485c.375-.273.89-.523 1.517-.523.627 0 1.142.25 1.517.523a3.219 3.219 0 01.529.485l.021.025.002.003z"
|
|
848
|
-
}), jsx("path", {
|
|
849
|
-
fillRule: "evenodd",
|
|
850
|
-
clipRule: "evenodd",
|
|
851
|
-
d: "M8 .583a7.417 7.417 0 100 14.834A7.417 7.417 0 008 .583zM2.083 8a5.917 5.917 0 1111.834 0A5.917 5.917 0 012.083 8z"
|
|
852
|
-
})]
|
|
853
|
-
}), jsx("defs", {
|
|
854
|
-
children: jsx("clipPath", {
|
|
855
|
-
id: "FaceFrownIcon_svg__clip0_16320_32311",
|
|
856
|
-
children: jsx("path", {
|
|
857
|
-
fill: "#fff",
|
|
858
|
-
d: "M0 0h16v16H0z"
|
|
859
|
-
})
|
|
860
|
-
})
|
|
861
|
-
})]
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
function FaceFrownIcon(props) {
|
|
865
|
-
return jsx(Icon, {
|
|
866
|
-
...props,
|
|
867
|
-
component: SvgFaceFrownIcon
|
|
868
|
-
});
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
function SvgFaceNeutralIcon(props) {
|
|
872
|
-
return jsxs("svg", {
|
|
873
|
-
width: "1em",
|
|
874
|
-
height: "1em",
|
|
875
|
-
viewBox: "0 0 16 16",
|
|
876
|
-
fill: "none",
|
|
877
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
878
|
-
...props,
|
|
879
|
-
children: [jsxs("g", {
|
|
880
|
-
clipPath: "url(#FaceNeutralIcon_svg__clip0_16320_32309)",
|
|
881
|
-
fillRule: "evenodd",
|
|
882
|
-
clipRule: "evenodd",
|
|
883
|
-
fill: "currentColor",
|
|
884
|
-
children: [jsx("path", {
|
|
885
|
-
d: "M8 2.083a5.917 5.917 0 100 11.834A5.917 5.917 0 008 2.084zM.583 8a7.417 7.417 0 1114.834 0A7.417 7.417 0 01.583 8z"
|
|
886
|
-
}), jsx("path", {
|
|
887
|
-
d: "M4.583 10a.75.75 0 01.75-.75h5.334a.75.75 0 110 1.5H5.333a.75.75 0 01-.75-.75zM5.25 6A.75.75 0 016 5.25h.007a.75.75 0 010 1.5H6A.75.75 0 015.25 6zM9.25 6a.75.75 0 01.75-.75h.007a.75.75 0 110 1.5H10A.75.75 0 019.25 6z"
|
|
888
|
-
})]
|
|
889
|
-
}), jsx("defs", {
|
|
890
|
-
children: jsx("clipPath", {
|
|
891
|
-
id: "FaceNeutralIcon_svg__clip0_16320_32309",
|
|
892
|
-
children: jsx("path", {
|
|
893
|
-
fill: "#fff",
|
|
894
|
-
d: "M0 0h16v16H0z"
|
|
895
|
-
})
|
|
896
|
-
})
|
|
897
|
-
})]
|
|
898
|
-
});
|
|
899
|
-
}
|
|
900
|
-
function FaceNeutralIcon(props) {
|
|
901
|
-
return jsx(Icon, {
|
|
902
|
-
...props,
|
|
903
|
-
component: SvgFaceNeutralIcon
|
|
904
|
-
});
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
function SvgFaceSmileIcon(props) {
|
|
908
|
-
return jsxs("svg", {
|
|
909
|
-
width: "1em",
|
|
910
|
-
height: "1em",
|
|
911
|
-
viewBox: "0 0 16 16",
|
|
912
|
-
fill: "none",
|
|
913
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
914
|
-
...props,
|
|
915
|
-
children: [jsxs("g", {
|
|
916
|
-
clipPath: "url(#FaceSmileIcon_svg__clip0_16320_32307)",
|
|
917
|
-
fill: "currentColor",
|
|
918
|
-
children: [jsx("path", {
|
|
919
|
-
fillRule: "evenodd",
|
|
920
|
-
clipRule: "evenodd",
|
|
921
|
-
d: "M8 2.083a5.917 5.917 0 100 11.834A5.917 5.917 0 008 2.084zM.583 8a7.417 7.417 0 1114.834 0A7.417 7.417 0 01.583 8z"
|
|
922
|
-
}), jsx("path", {
|
|
923
|
-
d: "M4.883 8.733a.75.75 0 011.048.147l.002.003.021.026a3.216 3.216 0 00.529.485c.375.273.89.523 1.517.523.627 0 1.142-.25 1.517-.523a3.215 3.215 0 00.55-.511.75.75 0 011.2.9l.029-.042-.03.043-.001.002-.002.002-.005.007-.015.019a3.878 3.878 0 01-.217.247c-.144.15-.354.348-.627.546-.54.393-1.359.81-2.399.81s-1.858-.417-2.4-.81a4.716 4.716 0 01-.795-.734 2.643 2.643 0 01-.048-.059l-.015-.02-.005-.006-.002-.002v-.002h-.002a.75.75 0 01.15-1.05z"
|
|
924
|
-
}), jsx("path", {
|
|
925
|
-
fillRule: "evenodd",
|
|
926
|
-
clipRule: "evenodd",
|
|
927
|
-
d: "M5.25 6A.75.75 0 016 5.25h.007a.75.75 0 010 1.5H6A.75.75 0 015.25 6zM9.25 6a.75.75 0 01.75-.75h.007a.75.75 0 110 1.5H10A.75.75 0 019.25 6z"
|
|
928
|
-
})]
|
|
929
|
-
}), jsx("defs", {
|
|
930
|
-
children: jsx("clipPath", {
|
|
931
|
-
id: "FaceSmileIcon_svg__clip0_16320_32307",
|
|
932
|
-
children: jsx("path", {
|
|
933
|
-
fill: "#fff",
|
|
934
|
-
d: "M0 0h16v16H0z"
|
|
935
|
-
})
|
|
936
|
-
})
|
|
937
|
-
})]
|
|
938
|
-
});
|
|
939
|
-
}
|
|
940
|
-
function FaceSmileIcon(props) {
|
|
941
|
-
return jsx(Icon, {
|
|
942
|
-
...props,
|
|
943
|
-
component: SvgFaceSmileIcon
|
|
944
|
-
});
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
function SvgNewWindowIcon(props) {
|
|
948
|
-
return jsxs("svg", {
|
|
949
|
-
width: "1em",
|
|
950
|
-
height: "1em",
|
|
951
|
-
viewBox: "0 0 16 16",
|
|
952
|
-
fill: "none",
|
|
953
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
954
|
-
...props,
|
|
955
|
-
children: [jsx("path", {
|
|
956
|
-
d: "M10 1h5v5h-1.5V3.56L8.53 8.53 7.47 7.47l4.97-4.97H10V1z",
|
|
957
|
-
fill: "currentColor"
|
|
958
|
-
}), jsx("path", {
|
|
959
|
-
d: "M1 2.75A.75.75 0 011.75 2H8v1.5H2.5v10h10V8H14v6.25a.75.75 0 01-.75.75H1.75a.75.75 0 01-.75-.75V2.75z",
|
|
960
|
-
fill: "currentColor"
|
|
961
|
-
})]
|
|
962
|
-
});
|
|
963
|
-
}
|
|
964
|
-
function NewWindowIcon(props) {
|
|
965
|
-
return jsx(Icon, {
|
|
966
|
-
...props,
|
|
967
|
-
component: SvgNewWindowIcon
|
|
968
|
-
});
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
const ColorVars = {
|
|
972
|
-
primary: 'textPrimary',
|
|
973
|
-
secondary: 'textSecondary',
|
|
974
|
-
info: 'textValidationInfo',
|
|
975
|
-
error: 'textValidationDanger',
|
|
976
|
-
success: 'textValidationSuccess',
|
|
977
|
-
warning: 'textValidationWarning'
|
|
978
|
-
};
|
|
979
|
-
|
|
980
|
-
/**
|
|
981
|
-
* Recursively appends `!important` to all CSS properties in an Emotion `CSSObject`.
|
|
982
|
-
* Used to ensure that we always override Ant styles, without worrying about selector precedence.
|
|
983
|
-
*/
|
|
984
|
-
function importantify(obj) {
|
|
985
|
-
return _mapValues(obj, (value, key) => {
|
|
986
|
-
if (_isString(value) || _isNumber(value) || _isBoolean(value)) {
|
|
987
|
-
// Make sure we don't double-append important
|
|
988
|
-
if (_isString(value) && _endsWith(value, '!important')) {
|
|
989
|
-
return value;
|
|
990
|
-
}
|
|
991
|
-
if (_isNumber(value)) {
|
|
992
|
-
if (unitless[key]) {
|
|
993
|
-
return `${value}!important`;
|
|
994
|
-
}
|
|
995
|
-
return `${value}px!important`;
|
|
996
|
-
}
|
|
997
|
-
return `${value}!important`;
|
|
998
|
-
}
|
|
999
|
-
if (_isNil(value)) {
|
|
1000
|
-
return value;
|
|
1001
|
-
}
|
|
1002
|
-
return importantify(value);
|
|
1003
|
-
});
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
/**
|
|
1007
|
-
* Returns a text color, in case of invalid/missing key and missing fallback color it will return textPrimary
|
|
1008
|
-
* @param theme
|
|
1009
|
-
* @param key - key of TypographyColor
|
|
1010
|
-
* @param fallbackColor - color to return as fallback -- used to remove tertiary check inline
|
|
1011
|
-
*/
|
|
1012
|
-
function getTypographyColor(theme, key, fallbackColor) {
|
|
1013
|
-
if (theme && key && Object(theme.colors).hasOwnProperty(ColorVars[key])) {
|
|
1014
|
-
return theme.colors[ColorVars[key]];
|
|
1015
|
-
}
|
|
1016
|
-
return fallbackColor !== null && fallbackColor !== void 0 ? fallbackColor : theme.colors.textPrimary;
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
/**
|
|
1020
|
-
* Returns validation color based on state, has default validation colors if params are not provided
|
|
1021
|
-
* @param theme
|
|
1022
|
-
* @param validationState
|
|
1023
|
-
* @param errorColor
|
|
1024
|
-
* @param warningColor
|
|
1025
|
-
* @param successColor
|
|
1026
|
-
*/
|
|
1027
|
-
function getValidationStateColor(theme, validationState) {
|
|
1028
|
-
let {
|
|
1029
|
-
errorColor,
|
|
1030
|
-
warningColor,
|
|
1031
|
-
successColor
|
|
1032
|
-
} = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1033
|
-
switch (validationState) {
|
|
1034
|
-
case 'error':
|
|
1035
|
-
return errorColor || theme.colors.actionDangerPrimaryBackgroundDefault;
|
|
1036
|
-
case 'warning':
|
|
1037
|
-
return warningColor || theme.colors.textValidationWarning;
|
|
1038
|
-
case 'success':
|
|
1039
|
-
return successColor || theme.colors.textValidationSuccess;
|
|
1040
|
-
default:
|
|
1041
|
-
return undefined;
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
function getDefaultStyles(theme) {
|
|
1046
|
-
return {
|
|
1047
|
-
backgroundColor: theme.colors.actionDefaultBackgroundDefault,
|
|
1048
|
-
borderColor: theme.colors.actionDefaultBorderDefault,
|
|
1049
|
-
color: theme.colors.actionDefaultTextDefault,
|
|
1050
|
-
lineHeight: theme.typography.lineHeightBase,
|
|
1051
|
-
textDecoration: 'none',
|
|
1052
|
-
'&:hover': {
|
|
1053
|
-
backgroundColor: theme.colors.actionDefaultBackgroundHover,
|
|
1054
|
-
borderColor: theme.colors.actionDefaultBorderHover,
|
|
1055
|
-
color: theme.colors.actionDefaultTextHover
|
|
1056
|
-
},
|
|
1057
|
-
'&:active': {
|
|
1058
|
-
backgroundColor: theme.colors.actionDefaultBackgroundPress,
|
|
1059
|
-
borderColor: theme.colors.actionDefaultBorderPress,
|
|
1060
|
-
color: theme.colors.actionDefaultTextPress
|
|
1061
|
-
}
|
|
1062
|
-
};
|
|
1063
|
-
}
|
|
1064
|
-
function getPrimaryStyles(theme) {
|
|
1065
|
-
return {
|
|
1066
|
-
backgroundColor: theme.colors.actionPrimaryBackgroundDefault,
|
|
1067
|
-
borderColor: 'transparent',
|
|
1068
|
-
color: theme.colors.actionPrimaryTextDefault,
|
|
1069
|
-
textShadow: 'none',
|
|
1070
|
-
'&:hover': {
|
|
1071
|
-
backgroundColor: theme.colors.actionPrimaryBackgroundHover,
|
|
1072
|
-
borderColor: 'transparent',
|
|
1073
|
-
color: theme.colors.actionPrimaryTextHover
|
|
1074
|
-
},
|
|
1075
|
-
'&:active': {
|
|
1076
|
-
backgroundColor: theme.colors.actionPrimaryBackgroundPress,
|
|
1077
|
-
borderColor: 'transparent',
|
|
1078
|
-
color: theme.colors.actionPrimaryTextPress
|
|
1079
|
-
}
|
|
1080
|
-
};
|
|
1081
|
-
}
|
|
1082
|
-
function getLinkStyles$1(theme) {
|
|
1083
|
-
return {
|
|
1084
|
-
backgroundColor: theme.colors.actionTertiaryBackgroundDefault,
|
|
1085
|
-
borderColor: theme.colors.actionTertiaryBackgroundDefault,
|
|
1086
|
-
color: theme.colors.actionTertiaryTextDefault,
|
|
1087
|
-
'&:hover': {
|
|
1088
|
-
backgroundColor: theme.colors.actionTertiaryBackgroundHover,
|
|
1089
|
-
borderColor: 'transparent',
|
|
1090
|
-
color: theme.colors.actionTertiaryTextHover
|
|
1091
|
-
},
|
|
1092
|
-
'&:active': {
|
|
1093
|
-
backgroundColor: theme.colors.actionTertiaryBackgroundPress,
|
|
1094
|
-
borderColor: 'transparent',
|
|
1095
|
-
color: theme.colors.actionTertiaryTextPress
|
|
1096
|
-
},
|
|
1097
|
-
'&[disabled]:hover': {
|
|
1098
|
-
background: 'none',
|
|
1099
|
-
color: theme.colors.actionDisabledText
|
|
1100
|
-
}
|
|
1101
|
-
};
|
|
1102
|
-
}
|
|
1103
|
-
function getPrimaryDangerStyles(theme) {
|
|
1104
|
-
return {
|
|
1105
|
-
backgroundColor: theme.colors.actionDangerPrimaryBackgroundDefault,
|
|
1106
|
-
borderColor: 'transparent',
|
|
1107
|
-
color: theme.colors.white,
|
|
1108
|
-
'&:hover': {
|
|
1109
|
-
backgroundColor: theme.colors.actionDangerPrimaryBackgroundHover,
|
|
1110
|
-
borderColor: 'transparent',
|
|
1111
|
-
color: theme.colors.white
|
|
1112
|
-
},
|
|
1113
|
-
'&:active': {
|
|
1114
|
-
backgroundColor: theme.colors.actionDangerPrimaryBackgroundPress,
|
|
1115
|
-
borderColor: 'transparent',
|
|
1116
|
-
color: theme.colors.white
|
|
1117
|
-
},
|
|
1118
|
-
'&:focus-visible': {
|
|
1119
|
-
outlineColor: theme.colors.actionDangerPrimaryBackgroundDefault
|
|
1120
|
-
}
|
|
1121
|
-
};
|
|
1122
|
-
}
|
|
1123
|
-
function getSecondaryDangerStyles(theme) {
|
|
1124
|
-
return {
|
|
1125
|
-
backgroundColor: theme.colors.actionDangerDefaultBackgroundDefault,
|
|
1126
|
-
borderColor: theme.colors.actionDangerDefaultBorderDefault,
|
|
1127
|
-
color: theme.colors.actionDangerDefaultTextDefault,
|
|
1128
|
-
'&:hover': {
|
|
1129
|
-
backgroundColor: theme.colors.actionDangerDefaultBackgroundHover,
|
|
1130
|
-
borderColor: theme.colors.actionDangerDefaultBorderHover,
|
|
1131
|
-
color: theme.colors.actionDangerDefaultTextHover
|
|
1132
|
-
},
|
|
1133
|
-
'&:active': {
|
|
1134
|
-
backgroundColor: theme.colors.actionDangerDefaultBackgroundPress,
|
|
1135
|
-
borderColor: theme.colors.actionDangerDefaultBorderPress,
|
|
1136
|
-
color: theme.colors.actionDangerDefaultTextPress
|
|
1137
|
-
},
|
|
1138
|
-
'&:focus-visible': {
|
|
1139
|
-
outlineColor: theme.colors.actionDangerPrimaryBackgroundDefault
|
|
1140
|
-
}
|
|
1141
|
-
};
|
|
1142
|
-
}
|
|
1143
|
-
function getDisabledStyles(theme) {
|
|
1144
|
-
return {
|
|
1145
|
-
backgroundColor: theme.colors.actionDisabledBackground,
|
|
1146
|
-
borderColor: 'transparent',
|
|
1147
|
-
color: theme.colors.actionDisabledText,
|
|
1148
|
-
'&:hover': {
|
|
1149
|
-
backgroundColor: theme.colors.actionDisabledBackground,
|
|
1150
|
-
borderColor: 'transparent',
|
|
1151
|
-
color: theme.colors.actionDisabledText
|
|
1152
|
-
},
|
|
1153
|
-
'&:active': {
|
|
1154
|
-
backgroundColor: theme.colors.actionDisabledBackground,
|
|
1155
|
-
borderColor: 'transparent',
|
|
1156
|
-
color: theme.colors.actionDisabledText
|
|
1157
|
-
}
|
|
1158
|
-
};
|
|
1159
|
-
}
|
|
1160
|
-
function getDisabledTertiaryStyles(theme) {
|
|
1161
|
-
return {
|
|
1162
|
-
backgroundColor: theme.colors.actionTertiaryBackgroundDefault,
|
|
1163
|
-
borderColor: 'transparent',
|
|
1164
|
-
color: theme.colors.actionDisabledText,
|
|
1165
|
-
'&:hover': {
|
|
1166
|
-
backgroundColor: theme.colors.actionTertiaryBackgroundDefault,
|
|
1167
|
-
borderColor: 'transparent',
|
|
1168
|
-
color: theme.colors.actionDisabledText
|
|
1169
|
-
},
|
|
1170
|
-
'&:active': {
|
|
1171
|
-
backgroundColor: theme.colors.actionTertiaryBackgroundDefault,
|
|
1172
|
-
borderColor: 'transparent',
|
|
1173
|
-
color: theme.colors.actionDisabledText
|
|
1174
|
-
}
|
|
1175
|
-
};
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
function getEndIconClsName(theme) {
|
|
1179
|
-
return `${theme.general.iconfontCssPrefix}-btn-end-icon`;
|
|
1180
|
-
}
|
|
1181
|
-
const getButtonEmotionStyles = _ref => {
|
|
1182
|
-
let {
|
|
1183
|
-
theme,
|
|
1184
|
-
classNamePrefix,
|
|
1185
|
-
loading,
|
|
1186
|
-
withIcon,
|
|
1187
|
-
onlyIcon,
|
|
1188
|
-
isAnchor,
|
|
1189
|
-
enableAnimation,
|
|
1190
|
-
size,
|
|
1191
|
-
type,
|
|
1192
|
-
isFlex,
|
|
1193
|
-
useFocusPseudoClass,
|
|
1194
|
-
forceIconStyles
|
|
1195
|
-
} = _ref;
|
|
1196
|
-
const clsIcon = `.${theme.general.iconfontCssPrefix}`;
|
|
1197
|
-
const clsEndIcon = `.${getEndIconClsName(theme)}`;
|
|
1198
|
-
const clsLoadingIcon = `.${classNamePrefix}-btn-loading-icon`;
|
|
1199
|
-
const clsIconOnly = `.${classNamePrefix}-btn-icon-only`;
|
|
1200
|
-
const classPrimary = `.${classNamePrefix}-btn-primary`;
|
|
1201
|
-
const classLink = `.${classNamePrefix}-btn-link`;
|
|
1202
|
-
const classDangerous = `.${classNamePrefix}-btn-dangerous`;
|
|
1203
|
-
const SMALL_BUTTON_HEIGHT = 24;
|
|
1204
|
-
const tertiaryColors = {
|
|
1205
|
-
background: theme.colors.actionTertiaryBackgroundDefault,
|
|
1206
|
-
color: theme.colors.actionTertiaryTextDefault,
|
|
1207
|
-
'&:hover': {
|
|
1208
|
-
background: theme.colors.actionTertiaryBackgroundHover,
|
|
1209
|
-
color: theme.colors.actionTertiaryTextHover
|
|
1210
|
-
},
|
|
1211
|
-
'&:active': {
|
|
1212
|
-
background: theme.colors.actionTertiaryBackgroundPress,
|
|
1213
|
-
color: theme.colors.actionTertiaryTextPress
|
|
1214
|
-
}
|
|
1215
|
-
};
|
|
1216
|
-
const iconCss = {
|
|
1217
|
-
fontSize: theme.general.iconFontSize,
|
|
1218
|
-
...(!isFlex && {
|
|
1219
|
-
// verticalAlign used by AntD to move icon and label to center
|
|
1220
|
-
// TODO(schs): Try to move buttons to flexbox to solve this. Main problem is that flex-inline and inline-block
|
|
1221
|
-
// behave differently (vertically align of multiple buttons is off). See https://codepen.io/qfactor/pen/JXVzBe
|
|
1222
|
-
verticalAlign: -4,
|
|
1223
|
-
...(onlyIcon && {
|
|
1224
|
-
verticalAlign: -3
|
|
1225
|
-
}),
|
|
1226
|
-
// verticalAlign used by AntD to move icon and label to center
|
|
1227
|
-
// TODO(schs): Try to move buttons to flexbox to solve this. Main problem is that flex-inline and inline-block
|
|
1228
|
-
// behave differently (vertically align of multiple buttons is off). See https://codepen.io/qfactor/pen/JXVzBe
|
|
1229
|
-
// Need to make sure not to apply this to regular buttons as it will offset the icons
|
|
1230
|
-
...(!onlyIcon && {
|
|
1231
|
-
verticalAlign: -3
|
|
1232
|
-
})
|
|
1233
|
-
}),
|
|
1234
|
-
lineHeight: 0,
|
|
1235
|
-
...(size === 'small' && {
|
|
1236
|
-
lineHeight: theme.typography.lineHeightSm,
|
|
1237
|
-
...((onlyIcon || forceIconStyles) && {
|
|
1238
|
-
fontSize: 16,
|
|
1239
|
-
...(isFlex && {
|
|
1240
|
-
height: 16
|
|
1241
|
-
})
|
|
1242
|
-
})
|
|
1243
|
-
})
|
|
1244
|
-
};
|
|
1245
|
-
const inactiveIconCss = {
|
|
1246
|
-
color: theme.colors.grey600
|
|
1247
|
-
};
|
|
1248
|
-
const endIconCssSelector = `span > ${clsEndIcon} > ${clsIcon}`;
|
|
1249
|
-
const styles = {
|
|
1250
|
-
lineHeight: theme.typography.lineHeightBase,
|
|
1251
|
-
boxShadow: 'none',
|
|
1252
|
-
height: theme.general.heightSm,
|
|
1253
|
-
...(isFlex && {
|
|
1254
|
-
display: 'inline-flex',
|
|
1255
|
-
alignItems: 'center',
|
|
1256
|
-
justifyContent: 'center',
|
|
1257
|
-
verticalAlign: 'middle'
|
|
1258
|
-
}),
|
|
1259
|
-
...(!onlyIcon && !forceIconStyles && {
|
|
1260
|
-
'&&': {
|
|
1261
|
-
padding: '4px 12px',
|
|
1262
|
-
...(size === 'small' && {
|
|
1263
|
-
padding: '0 8px'
|
|
1264
|
-
})
|
|
1265
|
-
}
|
|
1266
|
-
}),
|
|
1267
|
-
...((onlyIcon || forceIconStyles) && {
|
|
1268
|
-
width: theme.general.heightSm
|
|
1269
|
-
}),
|
|
1270
|
-
...(size === 'small' && {
|
|
1271
|
-
height: SMALL_BUTTON_HEIGHT,
|
|
1272
|
-
lineHeight: theme.typography.lineHeightBase,
|
|
1273
|
-
...((onlyIcon || forceIconStyles) && {
|
|
1274
|
-
width: SMALL_BUTTON_HEIGHT,
|
|
1275
|
-
paddingTop: 0,
|
|
1276
|
-
paddingBottom: 0,
|
|
1277
|
-
verticalAlign: 'middle'
|
|
1278
|
-
})
|
|
1279
|
-
}),
|
|
1280
|
-
'&:focus-visible': {
|
|
1281
|
-
outlineStyle: 'solid',
|
|
1282
|
-
outlineWidth: '2px',
|
|
1283
|
-
outlineOffset: '1px',
|
|
1284
|
-
outlineColor: theme.isDarkMode ? theme.colors.actionDefaultBorderFocus : theme.colors.primary
|
|
1285
|
-
},
|
|
1286
|
-
...getDefaultStyles(theme),
|
|
1287
|
-
[`&${classPrimary}`]: {
|
|
1288
|
-
...getPrimaryStyles(theme)
|
|
1289
|
-
},
|
|
1290
|
-
[`&${classLink}`]: {
|
|
1291
|
-
...getLinkStyles$1(theme),
|
|
1292
|
-
...(type === 'link' && {
|
|
1293
|
-
padding: 'unset',
|
|
1294
|
-
height: 'auto',
|
|
1295
|
-
border: 'none',
|
|
1296
|
-
boxShadow: 'none',
|
|
1297
|
-
'&[disabled],&:hover': {
|
|
1298
|
-
background: 'none'
|
|
1299
|
-
}
|
|
1300
|
-
})
|
|
1301
|
-
},
|
|
1302
|
-
[`&${classDangerous}${classPrimary}`]: {
|
|
1303
|
-
...getPrimaryDangerStyles(theme)
|
|
1304
|
-
},
|
|
1305
|
-
[`&${classDangerous}`]: {
|
|
1306
|
-
...getSecondaryDangerStyles(theme)
|
|
1307
|
-
},
|
|
1308
|
-
[`&[disabled], &${classDangerous}:disabled`]: {
|
|
1309
|
-
...getDisabledStyles(theme),
|
|
1310
|
-
...((onlyIcon || forceIconStyles) && {
|
|
1311
|
-
backgroundColor: 'transparent',
|
|
1312
|
-
'&:hover': {
|
|
1313
|
-
backgroundColor: 'transparent'
|
|
1314
|
-
},
|
|
1315
|
-
'&:active': {
|
|
1316
|
-
backgroundColor: 'transparent'
|
|
1317
|
-
}
|
|
1318
|
-
})
|
|
1319
|
-
},
|
|
1320
|
-
// Loading styles
|
|
1321
|
-
...(loading && {
|
|
1322
|
-
'::before': {
|
|
1323
|
-
opacity: 0
|
|
1324
|
-
},
|
|
1325
|
-
[`${clsLoadingIcon}`]: {
|
|
1326
|
-
...(onlyIcon ? {
|
|
1327
|
-
// In case of only icon, the icon is already centered but vertically not aligned, this fixes that
|
|
1328
|
-
verticalAlign: 'middle'
|
|
1329
|
-
} : {
|
|
1330
|
-
// Position loading indicator in center
|
|
1331
|
-
// This would break vertical centering of loading circle when onlyIcon is true
|
|
1332
|
-
position: 'absolute'
|
|
1333
|
-
}),
|
|
1334
|
-
...(!isFlex && !forceIconStyles && {
|
|
1335
|
-
// Normally we'd do `transform: translateX(-50%)` but `antd` crushes that with injected inline `style`.
|
|
1336
|
-
left: 'calc(50% - 7px)'
|
|
1337
|
-
}),
|
|
1338
|
-
// Re-enable animation for the loading spinner, since it can be disabled by the global animation CSS.
|
|
1339
|
-
svg: {
|
|
1340
|
-
animationDuration: '1s !important'
|
|
1341
|
-
}
|
|
1342
|
-
},
|
|
1343
|
-
[`& > ${clsLoadingIcon} .anticon`]: {
|
|
1344
|
-
paddingRight: 0 // to horizontally center icon
|
|
1345
|
-
},
|
|
1346
|
-
|
|
1347
|
-
[`> :not(${clsLoadingIcon})`]: {
|
|
1348
|
-
// Hide all content except loading icon
|
|
1349
|
-
opacity: 0,
|
|
1350
|
-
visibility: 'hidden',
|
|
1351
|
-
// Add horizontal space for icon
|
|
1352
|
-
...(withIcon && {
|
|
1353
|
-
paddingLeft: theme.spacing.sm * 2 + 14
|
|
1354
|
-
})
|
|
1355
|
-
}
|
|
1356
|
-
}),
|
|
1357
|
-
// Icon styles
|
|
1358
|
-
[`> ${clsIcon} + span, > span + ${clsIcon}`]: {
|
|
1359
|
-
marginRight: 0,
|
|
1360
|
-
marginLeft: theme.spacing.xs
|
|
1361
|
-
},
|
|
1362
|
-
[`> ${clsIcon}`]: iconCss,
|
|
1363
|
-
[`> ${endIconCssSelector}`]: {
|
|
1364
|
-
...iconCss,
|
|
1365
|
-
marginLeft: theme.spacing.sm
|
|
1366
|
-
},
|
|
1367
|
-
...(!type && {
|
|
1368
|
-
[`&:enabled:not(:hover):not(:active) > ${clsIcon}`]: inactiveIconCss
|
|
1369
|
-
}),
|
|
1370
|
-
...(!type && {
|
|
1371
|
-
[`&:enabled:not(:hover):not(:active) > ${endIconCssSelector}`]: inactiveIconCss
|
|
1372
|
-
}),
|
|
1373
|
-
// Disable animations
|
|
1374
|
-
[`&[${classNamePrefix}-click-animating-without-extra-node='true']::after`]: {
|
|
1375
|
-
display: 'none'
|
|
1376
|
-
},
|
|
1377
|
-
[`&${clsIconOnly}`]: {
|
|
1378
|
-
border: 'none',
|
|
1379
|
-
[`&:enabled:not(${classLink})`]: {
|
|
1380
|
-
...tertiaryColors,
|
|
1381
|
-
color: theme.colors.textSecondary,
|
|
1382
|
-
'&:hover > .anticon': {
|
|
1383
|
-
color: tertiaryColors['&:hover'].color
|
|
1384
|
-
},
|
|
1385
|
-
'&:active > .anticon': {
|
|
1386
|
-
color: tertiaryColors['&:active'].color
|
|
1387
|
-
}
|
|
1388
|
-
},
|
|
1389
|
-
[`&:enabled:not(${classLink}) > .anticon`]: {
|
|
1390
|
-
color: theme.colors.textSecondary
|
|
1391
|
-
},
|
|
1392
|
-
...(isAnchor && {
|
|
1393
|
-
lineHeight: `${theme.general.heightSm}px`,
|
|
1394
|
-
...getLinkStyles$1(theme),
|
|
1395
|
-
'&:disabled': {
|
|
1396
|
-
color: theme.colors.actionDisabledText
|
|
1397
|
-
}
|
|
1398
|
-
}),
|
|
1399
|
-
'&[disabled]:hover': {
|
|
1400
|
-
backgroundColor: 'transparent'
|
|
1401
|
-
}
|
|
1402
|
-
},
|
|
1403
|
-
[`&:focus`]: {
|
|
1404
|
-
...(useFocusPseudoClass && {
|
|
1405
|
-
outlineStyle: 'solid',
|
|
1406
|
-
outlineWidth: '2px',
|
|
1407
|
-
outlineOffset: '1px',
|
|
1408
|
-
outlineColor: theme.isDarkMode ? theme.colors.actionDefaultBorderFocus : theme.colors.primary
|
|
1409
|
-
}),
|
|
1410
|
-
[`${clsLoadingIcon}`]: {
|
|
1411
|
-
...(onlyIcon && {
|
|
1412
|
-
// Mitigate wrong left offset for loading state with onlyIcon
|
|
1413
|
-
left: 0
|
|
1414
|
-
})
|
|
1415
|
-
}
|
|
1416
|
-
},
|
|
1417
|
-
...(forceIconStyles && {
|
|
1418
|
-
padding: '0 6px',
|
|
1419
|
-
lineHeight: theme.typography.lineHeightSm,
|
|
1420
|
-
color: theme.colors.textSecondary,
|
|
1421
|
-
'& > span': {
|
|
1422
|
-
verticalAlign: -1,
|
|
1423
|
-
height: theme.general.heightSm / 2,
|
|
1424
|
-
width: theme.general.heightSm / 2
|
|
1425
|
-
},
|
|
1426
|
-
[`& > ${clsLoadingIcon} .anticon`]: {
|
|
1427
|
-
// left: `calc(50% - 6px)!important`,
|
|
1428
|
-
height: theme.general.heightSm / 2,
|
|
1429
|
-
width: theme.general.heightSm / 2,
|
|
1430
|
-
padding: 0
|
|
1431
|
-
}
|
|
1432
|
-
}),
|
|
1433
|
-
...getAnimationCss(enableAnimation)
|
|
1434
|
-
};
|
|
1435
|
-
|
|
1436
|
-
// Moved outside main style object because state & selector matching in the already existing object keys can create bugs and unwanted overwrites
|
|
1437
|
-
const typeStyles = {
|
|
1438
|
-
...(type === 'tertiary' && {
|
|
1439
|
-
[`&:enabled:not(${clsIconOnly})`]: tertiaryColors,
|
|
1440
|
-
[`&${classLink}[disabled]`]: {
|
|
1441
|
-
...getDisabledTertiaryStyles(theme)
|
|
1442
|
-
}
|
|
1443
|
-
})
|
|
1444
|
-
};
|
|
1445
|
-
const importantStyles = importantify(styles);
|
|
1446
|
-
const importantTypeStyles = importantify(typeStyles);
|
|
1447
|
-
return /*#__PURE__*/css(importantStyles, importantTypeStyles, process.env.NODE_ENV === "production" ? "" : ";label:getButtonEmotionStyles;");
|
|
1448
|
-
};
|
|
1449
|
-
const Button = /* #__PURE__ */(() => {
|
|
1450
|
-
const Button = /*#__PURE__*/forwardRef(function Button( // Keep size out of props passed to AntD to make deprecation and eventual removal have 0 impact
|
|
1451
|
-
_ref2, ref) {
|
|
1452
|
-
let {
|
|
1453
|
-
dangerouslySetAntdProps,
|
|
1454
|
-
children,
|
|
1455
|
-
size,
|
|
1456
|
-
type,
|
|
1457
|
-
endIcon,
|
|
1458
|
-
dangerouslySetForceIconStyles,
|
|
1459
|
-
dangerouslyUseFocusPseudoClass,
|
|
1460
|
-
...props
|
|
1461
|
-
} = _ref2;
|
|
1462
|
-
const {
|
|
1463
|
-
theme,
|
|
1464
|
-
classNamePrefix
|
|
1465
|
-
} = useDesignSystemTheme();
|
|
1466
|
-
const {
|
|
1467
|
-
USE_FLEX_BUTTON: isFlex
|
|
1468
|
-
} = useDesignSystemFlags();
|
|
1469
|
-
const clsEndIcon = getEndIconClsName(theme);
|
|
1470
|
-
return jsx(DesignSystemAntDConfigProvider, {
|
|
1471
|
-
children: jsx(Button$1, {
|
|
1472
|
-
...props,
|
|
1473
|
-
css: getButtonEmotionStyles({
|
|
1474
|
-
theme,
|
|
1475
|
-
classNamePrefix,
|
|
1476
|
-
loading: Boolean(props.loading),
|
|
1477
|
-
withIcon: Boolean(props.icon),
|
|
1478
|
-
onlyIcon: Boolean((props.icon || endIcon) && !children),
|
|
1479
|
-
isAnchor: Boolean(props.href && !type),
|
|
1480
|
-
danger: Boolean(props.danger),
|
|
1481
|
-
enableAnimation: theme.options.enableAnimation,
|
|
1482
|
-
size: size || 'middle',
|
|
1483
|
-
type,
|
|
1484
|
-
isFlex,
|
|
1485
|
-
forceIconStyles: Boolean(dangerouslySetForceIconStyles),
|
|
1486
|
-
useFocusPseudoClass: Boolean(dangerouslyUseFocusPseudoClass)
|
|
1487
|
-
}),
|
|
1488
|
-
href: props.disabled ? undefined : props.href,
|
|
1489
|
-
...dangerouslySetAntdProps,
|
|
1490
|
-
ref: ref,
|
|
1491
|
-
type: type === 'tertiary' ? 'link' : type,
|
|
1492
|
-
children: children && jsxs("span", {
|
|
1493
|
-
style: {
|
|
1494
|
-
visibility: props !== null && props !== void 0 && props.loading ? 'hidden' : 'visible',
|
|
1495
|
-
...(isFlex && {
|
|
1496
|
-
display: 'inline-flex',
|
|
1497
|
-
alignItems: 'center'
|
|
1498
|
-
})
|
|
1499
|
-
},
|
|
1500
|
-
children: [children, endIcon && jsx("span", {
|
|
1501
|
-
className: clsEndIcon,
|
|
1502
|
-
style: {
|
|
1503
|
-
...(isFlex && {
|
|
1504
|
-
display: 'inline-flex',
|
|
1505
|
-
alignItems: 'center'
|
|
1506
|
-
})
|
|
1507
|
-
},
|
|
1508
|
-
children: endIcon
|
|
1509
|
-
})]
|
|
1510
|
-
})
|
|
1511
|
-
})
|
|
1512
|
-
});
|
|
1513
|
-
});
|
|
1514
|
-
|
|
1515
|
-
// This is needed for other Ant components that wrap Button, such as Tooltip, to correctly
|
|
1516
|
-
// identify it as an Ant button.
|
|
1517
|
-
// This should be removed if the component is rewritten to no longer be a wrapper around Ant.
|
|
1518
|
-
// See: https://github.com/ant-design/ant-design/blob/6dd39c1f89b4d6632e6ed022ff1bc275ca1e0f1f/components/button/button.tsx#L291
|
|
1519
|
-
Button.__ANT_BUTTON = true;
|
|
1520
|
-
return Button;
|
|
1521
|
-
})();
|
|
1522
|
-
|
|
1523
|
-
const getInputEmotionStyles = (clsPrefix, theme, _ref, useTransparent) => {
|
|
1524
|
-
let {
|
|
1525
|
-
validationState
|
|
1526
|
-
} = _ref;
|
|
1527
|
-
const inputClass = `.${clsPrefix}-input`;
|
|
1528
|
-
const affixClass = `.${clsPrefix}-input-affix-wrapper`;
|
|
1529
|
-
const affixClassFocused = `.${clsPrefix}-input-affix-wrapper-focused`;
|
|
1530
|
-
const clearIcon = `.${clsPrefix}-input-clear-icon`;
|
|
1531
|
-
const prefixIcon = `.${clsPrefix}-input-prefix`;
|
|
1532
|
-
const suffixIcon = `.${clsPrefix}-input-suffix`;
|
|
1533
|
-
const validationColor = getValidationStateColor(theme, validationState);
|
|
1534
|
-
const styles = {
|
|
1535
|
-
'&&': {
|
|
1536
|
-
lineHeight: theme.typography.lineHeightBase,
|
|
1537
|
-
minHeight: theme.general.heightSm,
|
|
1538
|
-
...(validationState && {
|
|
1539
|
-
borderColor: validationColor
|
|
1540
|
-
}),
|
|
1541
|
-
'&:hover': {
|
|
1542
|
-
borderColor: validationState ? validationColor : theme.colors.actionPrimaryBackgroundHover
|
|
1543
|
-
},
|
|
1544
|
-
'&:focus': {
|
|
1545
|
-
outlineColor: validationState ? validationColor : theme.colors.actionPrimaryBackgroundDefault,
|
|
1546
|
-
outlineWidth: 2,
|
|
1547
|
-
outlineOffset: -2,
|
|
1548
|
-
outlineStyle: 'solid',
|
|
1549
|
-
boxShadow: 'none',
|
|
1550
|
-
borderColor: 'transparent'
|
|
1551
|
-
},
|
|
1552
|
-
'&:disabled': {
|
|
1553
|
-
backgroundColor: theme.colors.actionDisabledBackground,
|
|
1554
|
-
color: theme.colors.actionDisabledText
|
|
1555
|
-
}
|
|
1556
|
-
},
|
|
1557
|
-
[`&${inputClass}, ${inputClass}`]: {
|
|
1558
|
-
...(useTransparent && {
|
|
1559
|
-
backgroundColor: 'transparent'
|
|
1560
|
-
})
|
|
1561
|
-
},
|
|
1562
|
-
[`&${affixClass}`]: {
|
|
1563
|
-
...(useTransparent && {
|
|
1564
|
-
backgroundColor: 'transparent'
|
|
1565
|
-
}),
|
|
1566
|
-
lineHeight: theme.typography.lineHeightBase,
|
|
1567
|
-
paddingTop: 5,
|
|
1568
|
-
paddingBottom: 5,
|
|
1569
|
-
minHeight: theme.general.heightSm,
|
|
1570
|
-
'::before': {
|
|
1571
|
-
lineHeight: theme.typography.lineHeightBase
|
|
1572
|
-
},
|
|
1573
|
-
'&:hover': {
|
|
1574
|
-
borderColor: theme.colors.actionPrimaryBackgroundHover
|
|
1575
|
-
},
|
|
1576
|
-
[`input.${clsPrefix}-input`]: {
|
|
1577
|
-
borderRadius: 0
|
|
1578
|
-
}
|
|
1579
|
-
},
|
|
1580
|
-
[`&${affixClassFocused}`]: {
|
|
1581
|
-
boxShadow: 'none',
|
|
1582
|
-
'&&, &:focus': {
|
|
1583
|
-
outlineColor: theme.colors.actionPrimaryBackgroundDefault,
|
|
1584
|
-
outlineWidth: 2,
|
|
1585
|
-
outlineOffset: -2,
|
|
1586
|
-
outlineStyle: 'solid',
|
|
1587
|
-
boxShadow: 'none',
|
|
1588
|
-
borderColor: 'transparent'
|
|
1589
|
-
}
|
|
1590
|
-
},
|
|
1591
|
-
[clearIcon]: {
|
|
1592
|
-
fontSize: theme.general.iconFontSize
|
|
1593
|
-
},
|
|
1594
|
-
[prefixIcon]: {
|
|
1595
|
-
marginRight: theme.spacing.sm,
|
|
1596
|
-
color: theme.colors.textSecondary
|
|
1597
|
-
},
|
|
1598
|
-
[suffixIcon]: {
|
|
1599
|
-
marginLeft: theme.spacing.sm,
|
|
1600
|
-
color: theme.colors.textSecondary
|
|
1601
|
-
},
|
|
1602
|
-
...getAnimationCss(theme.options.enableAnimation)
|
|
1603
|
-
};
|
|
1604
|
-
return /*#__PURE__*/css(importantify(styles), process.env.NODE_ENV === "production" ? "" : ";label:getInputEmotionStyles;");
|
|
1605
|
-
};
|
|
1606
|
-
const getInputGroupStyling = (clsPrefix, theme) => {
|
|
1607
|
-
const inputClass = `.${clsPrefix}-input`;
|
|
1608
|
-
const buttonClass = `.${clsPrefix}-btn`;
|
|
1609
|
-
return /*#__PURE__*/css({
|
|
1610
|
-
display: 'inline-flex !important',
|
|
1611
|
-
width: 'auto',
|
|
1612
|
-
[`& > ${inputClass}`]: {
|
|
1613
|
-
flexGrow: 1,
|
|
1614
|
-
'&:disabled': {
|
|
1615
|
-
border: 'none',
|
|
1616
|
-
'&:hover': {
|
|
1617
|
-
borderRight: `1px solid ${theme.colors.actionDisabledText} !important`
|
|
1618
|
-
}
|
|
1619
|
-
}
|
|
1620
|
-
},
|
|
1621
|
-
[`& > ${buttonClass} > span`]: {
|
|
1622
|
-
verticalAlign: 'middle'
|
|
1623
|
-
},
|
|
1624
|
-
[`& > ${buttonClass}:disabled, & > ${buttonClass}:disabled:hover`]: {
|
|
1625
|
-
borderLeft: `1px solid ${theme.colors.actionDisabledText} !important`
|
|
1626
|
-
}
|
|
1627
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:getInputGroupStyling;");
|
|
1628
|
-
};
|
|
1629
|
-
const TextArea = /*#__PURE__*/forwardRef(function TextArea(_ref2, ref) {
|
|
1630
|
-
let {
|
|
1631
|
-
validationState,
|
|
1632
|
-
autoComplete = 'off',
|
|
1633
|
-
dangerouslySetAntdProps,
|
|
1634
|
-
dangerouslyAppendEmotionCSS,
|
|
1635
|
-
...props
|
|
1636
|
-
} = _ref2;
|
|
1637
|
-
const {
|
|
1638
|
-
classNamePrefix,
|
|
1639
|
-
theme
|
|
1640
|
-
} = useDesignSystemTheme();
|
|
1641
|
-
const {
|
|
1642
|
-
USE_TRANSPARENT_INPUT: useTransparent
|
|
1643
|
-
} = useDesignSystemFlags();
|
|
1644
|
-
return jsx(DesignSystemAntDConfigProvider, {
|
|
1645
|
-
children: jsx(Input$1.TextArea, {
|
|
1646
|
-
ref: ref,
|
|
1647
|
-
autoComplete: autoComplete,
|
|
1648
|
-
css: [getInputEmotionStyles(classNamePrefix, theme, {
|
|
1649
|
-
validationState
|
|
1650
|
-
}, useTransparent), dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:TextArea;"],
|
|
1651
|
-
...props,
|
|
1652
|
-
...dangerouslySetAntdProps
|
|
1653
|
-
})
|
|
1654
|
-
});
|
|
1655
|
-
});
|
|
1656
|
-
const Password = /*#__PURE__*/forwardRef(function Password(_ref3, ref) {
|
|
1657
|
-
let {
|
|
1658
|
-
validationState,
|
|
1659
|
-
autoComplete = 'off',
|
|
1660
|
-
dangerouslySetAntdProps,
|
|
1661
|
-
dangerouslyAppendEmotionCSS,
|
|
1662
|
-
...props
|
|
1663
|
-
} = _ref3;
|
|
1664
|
-
const {
|
|
1665
|
-
classNamePrefix,
|
|
1666
|
-
theme
|
|
1667
|
-
} = useDesignSystemTheme();
|
|
1668
|
-
const {
|
|
1669
|
-
USE_TRANSPARENT_INPUT: useTransparent
|
|
1670
|
-
} = useDesignSystemFlags();
|
|
1671
|
-
return jsx(DesignSystemAntDConfigProvider, {
|
|
1672
|
-
children: jsx(Input$1.Password, {
|
|
1673
|
-
visibilityToggle: false,
|
|
1674
|
-
ref: ref,
|
|
1675
|
-
autoComplete: autoComplete,
|
|
1676
|
-
css: [getInputEmotionStyles(classNamePrefix, theme, {
|
|
1677
|
-
validationState
|
|
1678
|
-
}, useTransparent), dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:Password;"],
|
|
1679
|
-
...props,
|
|
1680
|
-
...dangerouslySetAntdProps
|
|
1681
|
-
})
|
|
1682
|
-
});
|
|
1683
|
-
});
|
|
1684
|
-
const DuboisInput = /*#__PURE__*/forwardRef(function Input(_ref4, ref) {
|
|
1685
|
-
let {
|
|
1686
|
-
validationState,
|
|
1687
|
-
autoComplete = 'off',
|
|
1688
|
-
dangerouslySetAntdProps,
|
|
1689
|
-
dangerouslyAppendEmotionCSS,
|
|
1690
|
-
onChange,
|
|
1691
|
-
onClear,
|
|
1692
|
-
...props
|
|
1693
|
-
} = _ref4;
|
|
1694
|
-
const {
|
|
1695
|
-
classNamePrefix,
|
|
1696
|
-
theme
|
|
1697
|
-
} = useDesignSystemTheme();
|
|
1698
|
-
const {
|
|
1699
|
-
USE_TRANSPARENT_INPUT: useTransparent
|
|
1700
|
-
} = useDesignSystemFlags();
|
|
1701
|
-
const handleChange = e => {
|
|
1702
|
-
// If the input is cleared, call the onClear handler, but only
|
|
1703
|
-
// if the event is not an input event -- which is the case when you click the
|
|
1704
|
-
// ant-provided (X) button.
|
|
1705
|
-
if (!e.target.value && e.nativeEvent instanceof InputEvent === false && onClear) {
|
|
1706
|
-
onClear === null || onClear === void 0 ? void 0 : onClear();
|
|
1707
|
-
} else {
|
|
1708
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
1709
|
-
}
|
|
1710
|
-
};
|
|
1711
|
-
return jsx(DesignSystemAntDConfigProvider, {
|
|
1712
|
-
children: jsx(Input$1, {
|
|
1713
|
-
autoComplete: autoComplete,
|
|
1714
|
-
ref: ref,
|
|
1715
|
-
css: [getInputEmotionStyles(classNamePrefix, theme, {
|
|
1716
|
-
validationState
|
|
1717
|
-
}, useTransparent), dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:DuboisInput;"],
|
|
1718
|
-
onChange: handleChange,
|
|
1719
|
-
...props,
|
|
1720
|
-
...dangerouslySetAntdProps
|
|
1721
|
-
})
|
|
1722
|
-
});
|
|
1723
|
-
});
|
|
1724
|
-
const Group = _ref5 => {
|
|
1725
|
-
let {
|
|
1726
|
-
dangerouslySetAntdProps,
|
|
1727
|
-
dangerouslyAppendEmotionCSS,
|
|
1728
|
-
compact = true,
|
|
1729
|
-
...props
|
|
1730
|
-
} = _ref5;
|
|
1731
|
-
const {
|
|
1732
|
-
classNamePrefix,
|
|
1733
|
-
theme
|
|
1734
|
-
} = useDesignSystemTheme();
|
|
1735
|
-
return jsx(DesignSystemAntDConfigProvider, {
|
|
1736
|
-
children: jsx(Input$1.Group, {
|
|
1737
|
-
css: [getInputGroupStyling(classNamePrefix, theme), dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:Group;"],
|
|
1738
|
-
compact: compact,
|
|
1739
|
-
...props,
|
|
1740
|
-
...dangerouslySetAntdProps
|
|
1741
|
-
})
|
|
1742
|
-
});
|
|
1743
|
-
};
|
|
1744
|
-
|
|
1745
|
-
// Properly creates the namespace and dot-notation components with correct types.
|
|
1746
|
-
const InputNamespace = /* #__PURE__ */Object.assign(DuboisInput, {
|
|
1747
|
-
TextArea,
|
|
1748
|
-
Password,
|
|
1749
|
-
Group
|
|
1750
|
-
});
|
|
1751
|
-
const Input = InputNamespace;
|
|
1752
|
-
|
|
1753
|
-
// TODO: I'm doing this to support storybook's docgen;
|
|
1754
|
-
// We should remove this once we have a better storybook integration,
|
|
1755
|
-
// since these will be exposed in the library's exports.
|
|
1756
|
-
const __INTERNAL_DO_NOT_USE__TextArea = TextArea;
|
|
1757
|
-
const __INTERNAL_DO_NOT_USE__Password = Password;
|
|
1758
|
-
const __INTERNAL_DO_NOT_USE_DEDUPE__Group = Group;
|
|
1759
|
-
|
|
1760
|
-
const getLinkStyles = (theme, clsPrefix) => {
|
|
1761
|
-
const classTypography = `.${clsPrefix}-typography`;
|
|
1762
|
-
const styles = {
|
|
1763
|
-
[`&${classTypography}, &${classTypography}:focus`]: {
|
|
1764
|
-
color: theme.colors.actionTertiaryTextDefault
|
|
1765
|
-
},
|
|
1766
|
-
[`&${classTypography}:hover, &${classTypography}:hover .anticon`]: {
|
|
1767
|
-
color: theme.colors.actionTertiaryTextHover,
|
|
1768
|
-
textDecoration: 'underline'
|
|
1769
|
-
},
|
|
1770
|
-
[`&${classTypography}:active, &${classTypography}:active .anticon`]: {
|
|
1771
|
-
color: theme.colors.actionTertiaryTextPress,
|
|
1772
|
-
textDecoration: 'underline'
|
|
1773
|
-
},
|
|
1774
|
-
[`&${classTypography}:focus-visible`]: {
|
|
1775
|
-
textDecoration: 'underline'
|
|
1776
|
-
},
|
|
1777
|
-
'.anticon': {
|
|
1778
|
-
fontSize: 12
|
|
1779
|
-
}
|
|
1780
|
-
};
|
|
1781
|
-
return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getLinkStyles;");
|
|
1782
|
-
};
|
|
1783
|
-
const getEllipsisNewTabLinkStyles = () => {
|
|
1784
|
-
const styles = {
|
|
1785
|
-
paddingRight: 'calc(2px + 1em)',
|
|
1786
|
-
// 1em for icon
|
|
1787
|
-
position: 'relative'
|
|
1788
|
-
};
|
|
1789
|
-
return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getEllipsisNewTabLinkStyles;");
|
|
1790
|
-
};
|
|
1791
|
-
const getIconStyles = theme => {
|
|
1792
|
-
const styles = {
|
|
1793
|
-
marginLeft: 2,
|
|
1794
|
-
color: theme.colors.actionTertiaryTextDefault
|
|
1795
|
-
};
|
|
1796
|
-
return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getIconStyles;");
|
|
1797
|
-
};
|
|
1798
|
-
const getEllipsisIconStyles = useNewIcons => {
|
|
1799
|
-
const styles = {
|
|
1800
|
-
position: 'absolute',
|
|
1801
|
-
right: 0,
|
|
1802
|
-
bottom: 0,
|
|
1803
|
-
top: 0,
|
|
1804
|
-
display: 'flex',
|
|
1805
|
-
alignItems: 'center',
|
|
1806
|
-
...(useNewIcons && {
|
|
1807
|
-
fontSize: 12
|
|
1808
|
-
})
|
|
1809
|
-
};
|
|
1810
|
-
return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getEllipsisIconStyles;");
|
|
1811
|
-
};
|
|
1812
|
-
function Link(_ref) {
|
|
1813
|
-
let {
|
|
1814
|
-
dangerouslySetAntdProps,
|
|
1815
|
-
...props
|
|
1816
|
-
} = _ref;
|
|
1817
|
-
const {
|
|
1818
|
-
children,
|
|
1819
|
-
openInNewTab,
|
|
1820
|
-
...restProps
|
|
1821
|
-
} = props;
|
|
1822
|
-
const {
|
|
1823
|
-
theme,
|
|
1824
|
-
classNamePrefix
|
|
1825
|
-
} = useDesignSystemTheme();
|
|
1826
|
-
const newTabProps = {
|
|
1827
|
-
rel: 'noopener noreferrer',
|
|
1828
|
-
target: '_blank'
|
|
1829
|
-
};
|
|
1830
|
-
const linkProps = openInNewTab ? {
|
|
1831
|
-
...restProps,
|
|
1832
|
-
...newTabProps
|
|
1833
|
-
} : {
|
|
1834
|
-
...restProps
|
|
1835
|
-
};
|
|
1836
|
-
const linkStyles = props.ellipsis && openInNewTab ? [getLinkStyles(theme, classNamePrefix), getEllipsisNewTabLinkStyles()] : getLinkStyles(theme, classNamePrefix);
|
|
1837
|
-
const iconStyles = props.ellipsis ? [getIconStyles(theme), getEllipsisIconStyles()] : getIconStyles(theme);
|
|
1838
|
-
return jsx(DesignSystemAntDConfigProvider, {
|
|
1839
|
-
children: jsxs(Typography$1.Link, {
|
|
1840
|
-
"aria-disabled": linkProps.disabled,
|
|
1841
|
-
css: linkStyles,
|
|
1842
|
-
...linkProps,
|
|
1843
|
-
...dangerouslySetAntdProps,
|
|
1844
|
-
children: [children, openInNewTab ? jsx(NewWindowIcon, {
|
|
1845
|
-
css: iconStyles,
|
|
1846
|
-
...newTabProps
|
|
1847
|
-
}) : null]
|
|
1848
|
-
})
|
|
1849
|
-
});
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
-
const {
|
|
1853
|
-
Paragraph: AntDParagraph
|
|
1854
|
-
} = Typography$1;
|
|
1855
|
-
function getParagraphEmotionStyles(theme, props) {
|
|
1856
|
-
return /*#__PURE__*/css({
|
|
1857
|
-
'&&': {
|
|
1858
|
-
fontSize: theme.typography.fontSizeBase,
|
|
1859
|
-
lineHeight: theme.typography.lineHeightBase,
|
|
1860
|
-
color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
|
|
1861
|
-
}
|
|
1862
|
-
}, props.disabled && {
|
|
1863
|
-
'&&': {
|
|
1864
|
-
color: theme.colors.actionDisabledText
|
|
1865
|
-
}
|
|
1866
|
-
}, props.withoutMargins && {
|
|
1867
|
-
'&&': {
|
|
1868
|
-
marginTop: 0,
|
|
1869
|
-
marginBottom: 0
|
|
1870
|
-
}
|
|
1871
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:getParagraphEmotionStyles;");
|
|
1872
|
-
}
|
|
1873
|
-
function Paragraph(userProps) {
|
|
1874
|
-
const {
|
|
1875
|
-
dangerouslySetAntdProps,
|
|
1876
|
-
withoutMargins,
|
|
1877
|
-
color,
|
|
1878
|
-
...props
|
|
1879
|
-
} = userProps;
|
|
1880
|
-
const {
|
|
1881
|
-
theme
|
|
1882
|
-
} = useDesignSystemTheme();
|
|
1883
|
-
return jsx(DesignSystemAntDConfigProvider, {
|
|
1884
|
-
children: jsx(AntDParagraph, {
|
|
1885
|
-
...props,
|
|
1886
|
-
className: props.className,
|
|
1887
|
-
css: getParagraphEmotionStyles(theme, userProps),
|
|
1888
|
-
...dangerouslySetAntdProps
|
|
1889
|
-
})
|
|
1890
|
-
});
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
|
-
const {
|
|
1894
|
-
Text: AntDText
|
|
1895
|
-
} = Typography$1;
|
|
1896
|
-
function getTextEmotionStyles(theme, props) {
|
|
1897
|
-
return /*#__PURE__*/css({
|
|
1898
|
-
'&&': {
|
|
1899
|
-
fontSize: theme.typography.fontSizeBase,
|
|
1900
|
-
lineHeight: theme.typography.lineHeightBase,
|
|
1901
|
-
color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
|
|
1902
|
-
}
|
|
1903
|
-
}, props.disabled && {
|
|
1904
|
-
'&&': {
|
|
1905
|
-
color: theme.colors.actionDisabledText
|
|
1906
|
-
}
|
|
1907
|
-
}, props.hint && {
|
|
1908
|
-
'&&': {
|
|
1909
|
-
fontSize: theme.typography.fontSizeSm,
|
|
1910
|
-
lineHeight: theme.typography.lineHeightSm
|
|
1911
|
-
}
|
|
1912
|
-
}, props.bold && {
|
|
1913
|
-
'&&': {
|
|
1914
|
-
fontSize: theme.typography.fontSizeBase,
|
|
1915
|
-
fontWeight: theme.typography.typographyBoldFontWeight,
|
|
1916
|
-
lineHeight: theme.typography.lineHeightBase
|
|
1917
|
-
}
|
|
1918
|
-
}, props.code && {
|
|
1919
|
-
'&& > code': {
|
|
1920
|
-
fontSize: theme.typography.fontSizeBase,
|
|
1921
|
-
lineHeight: theme.typography.lineHeightBase,
|
|
1922
|
-
background: theme.colors.typographyCodeBg,
|
|
1923
|
-
fontFamily: 'monospace',
|
|
1924
|
-
borderRadius: theme.borders.borderRadiusMd,
|
|
1925
|
-
padding: '2px 4px',
|
|
1926
|
-
border: 'unset',
|
|
1927
|
-
margin: 0
|
|
1928
|
-
}
|
|
1929
|
-
}, props.size && {
|
|
1930
|
-
'&&': (() => {
|
|
1931
|
-
switch (props.size) {
|
|
1932
|
-
case 'xxl':
|
|
1933
|
-
return {
|
|
1934
|
-
fontSize: theme.typography.fontSizeXxl,
|
|
1935
|
-
lineHeight: theme.typography.lineHeightXxl
|
|
1936
|
-
};
|
|
1937
|
-
case 'xl':
|
|
1938
|
-
return {
|
|
1939
|
-
fontSize: theme.typography.fontSizeXl,
|
|
1940
|
-
lineHeight: theme.typography.lineHeightXl
|
|
1941
|
-
};
|
|
1942
|
-
case 'lg':
|
|
1943
|
-
return {
|
|
1944
|
-
fontSize: theme.typography.fontSizeLg,
|
|
1945
|
-
lineHeight: theme.typography.lineHeightLg
|
|
1946
|
-
};
|
|
1947
|
-
case 'sm':
|
|
1948
|
-
return {
|
|
1949
|
-
fontSize: theme.typography.fontSizeSm,
|
|
1950
|
-
lineHeight: theme.typography.lineHeightSm
|
|
1951
|
-
};
|
|
1952
|
-
default:
|
|
1953
|
-
return {
|
|
1954
|
-
fontSize: theme.typography.fontSizeMd,
|
|
1955
|
-
lineHeight: theme.typography.lineHeightMd
|
|
1956
|
-
};
|
|
1957
|
-
}
|
|
1958
|
-
})()
|
|
1959
|
-
}, props.withoutMargins && {
|
|
1960
|
-
'&&': {
|
|
1961
|
-
marginTop: 0,
|
|
1962
|
-
marginBottom: 0
|
|
1963
|
-
}
|
|
1964
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:getTextEmotionStyles;");
|
|
1965
|
-
}
|
|
1966
|
-
function Text(userProps) {
|
|
1967
|
-
// Omit props that are not supported by `antd`
|
|
1968
|
-
const {
|
|
1969
|
-
dangerouslySetAntdProps,
|
|
1970
|
-
bold,
|
|
1971
|
-
hint,
|
|
1972
|
-
withoutMargins,
|
|
1973
|
-
color,
|
|
1974
|
-
...props
|
|
1975
|
-
} = userProps;
|
|
1976
|
-
const {
|
|
1977
|
-
theme
|
|
1978
|
-
} = useDesignSystemTheme();
|
|
1979
|
-
return jsx(DesignSystemAntDConfigProvider, {
|
|
1980
|
-
children: jsx(AntDText, {
|
|
1981
|
-
...props,
|
|
1982
|
-
className: props.className,
|
|
1983
|
-
css: getTextEmotionStyles(theme, userProps),
|
|
1984
|
-
...dangerouslySetAntdProps
|
|
1985
|
-
})
|
|
1986
|
-
});
|
|
1987
|
-
}
|
|
1988
|
-
|
|
1989
|
-
const {
|
|
1990
|
-
Title: AntDTitle
|
|
1991
|
-
} = Typography$1;
|
|
1992
|
-
function getLevelStyles(theme, props) {
|
|
1993
|
-
switch (props.level) {
|
|
1994
|
-
case 1:
|
|
1995
|
-
return /*#__PURE__*/css({
|
|
1996
|
-
'&&': {
|
|
1997
|
-
fontSize: theme.typography.fontSizeXxl,
|
|
1998
|
-
lineHeight: theme.typography.lineHeightXxl,
|
|
1999
|
-
fontWeight: theme.typography.typographyBoldFontWeight
|
|
2000
|
-
}
|
|
2001
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
|
|
2002
|
-
case 2:
|
|
2003
|
-
return /*#__PURE__*/css({
|
|
2004
|
-
'&&': {
|
|
2005
|
-
fontSize: theme.typography.fontSizeXl,
|
|
2006
|
-
lineHeight: theme.typography.lineHeightXl,
|
|
2007
|
-
fontWeight: theme.typography.typographyBoldFontWeight
|
|
2008
|
-
}
|
|
2009
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
|
|
2010
|
-
case 3:
|
|
2011
|
-
return /*#__PURE__*/css({
|
|
2012
|
-
'&&': {
|
|
2013
|
-
fontSize: theme.typography.fontSizeLg,
|
|
2014
|
-
lineHeight: theme.typography.lineHeightLg,
|
|
2015
|
-
fontWeight: theme.typography.typographyBoldFontWeight
|
|
2016
|
-
}
|
|
2017
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
|
|
2018
|
-
case 4:
|
|
2019
|
-
default:
|
|
2020
|
-
return /*#__PURE__*/css({
|
|
2021
|
-
'&&': {
|
|
2022
|
-
fontSize: theme.typography.fontSizeMd,
|
|
2023
|
-
lineHeight: theme.typography.lineHeightMd,
|
|
2024
|
-
fontWeight: theme.typography.typographyBoldFontWeight
|
|
2025
|
-
}
|
|
2026
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
|
|
2027
|
-
}
|
|
2028
|
-
}
|
|
2029
|
-
function getTitleEmotionStyles(theme, props) {
|
|
2030
|
-
return /*#__PURE__*/css(getLevelStyles(theme, props), {
|
|
2031
|
-
'&&': {
|
|
2032
|
-
color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
|
|
2033
|
-
}
|
|
2034
|
-
}, props.withoutMargins && {
|
|
2035
|
-
'&&': {
|
|
2036
|
-
marginTop: '0 !important',
|
|
2037
|
-
// override general styling
|
|
2038
|
-
marginBottom: '0 !important' // override general styling
|
|
2039
|
-
}
|
|
2040
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:getTitleEmotionStyles;");
|
|
2041
|
-
}
|
|
2042
|
-
function Title(userProps) {
|
|
2043
|
-
const {
|
|
2044
|
-
dangerouslySetAntdProps,
|
|
2045
|
-
withoutMargins,
|
|
2046
|
-
color,
|
|
2047
|
-
...props
|
|
2048
|
-
} = userProps;
|
|
2049
|
-
const {
|
|
2050
|
-
theme
|
|
2051
|
-
} = useDesignSystemTheme();
|
|
2052
|
-
return jsx(DesignSystemAntDConfigProvider, {
|
|
2053
|
-
children: jsx(AntDTitle, {
|
|
2054
|
-
...props,
|
|
2055
|
-
className: props.className,
|
|
2056
|
-
css: getTitleEmotionStyles(theme, userProps),
|
|
2057
|
-
...dangerouslySetAntdProps
|
|
2058
|
-
})
|
|
2059
|
-
});
|
|
2060
|
-
}
|
|
2061
|
-
|
|
2062
|
-
const Typography = /* #__PURE__ */(() => {
|
|
2063
|
-
function Typography(_ref) {
|
|
2064
|
-
let {
|
|
2065
|
-
dangerouslySetAntdProps,
|
|
2066
|
-
...props
|
|
2067
|
-
} = _ref;
|
|
2068
|
-
return jsx(DesignSystemAntDConfigProvider, {
|
|
2069
|
-
children: jsx(Typography$1, {
|
|
2070
|
-
...props,
|
|
2071
|
-
...dangerouslySetAntdProps
|
|
2072
|
-
})
|
|
2073
|
-
});
|
|
2074
|
-
}
|
|
2075
|
-
Typography.Text = Text;
|
|
2076
|
-
Typography.Title = Title;
|
|
2077
|
-
Typography.Paragraph = Paragraph;
|
|
2078
|
-
Typography.Link = Link;
|
|
2079
|
-
return Typography;
|
|
2080
|
-
})();
|
|
2081
|
-
|
|
2082
|
-
export { ApplyDesignSystemContextOverrides as A, Button as B, CloseIcon as C, DesignSystemAntDConfigProvider as D, __INTERNAL_DO_NOT_USE_DEDUPE__Group as E, FaceFrownIcon as F, Icon as I, NewWindowIcon as N, RestoreAntDDefaultClsPrefix as R, Typography as T, WithDesignSystemThemeHoc as W, __INTERNAL_DO_NOT_USE__TextArea as _, ChevronRightIcon as a, useDesignSystemFlags as b, DU_BOIS_ENABLE_ANIMATION_CLASSNAME as c, useDesignSystemContext as d, Input as e, getValidationStateColor as f, getAnimationCss as g, Title as h, importantify as i, ChevronLeftIcon as j, getDefaultStyles as k, getPrimaryStyles as l, getDisabledStyles as m, lightColorList as n, getButtonEmotionStyles as o, DesignSystemThemeContext as p, DesignSystemContext as q, DesignSystemThemeProvider as r, DesignSystemProvider as s, ApplyDesignSystemFlags as t, useDesignSystemTheme as u, useAntDConfigProviderContext as v, CursorIcon as w, FaceNeutralIcon as x, FaceSmileIcon as y, __INTERNAL_DO_NOT_USE__Password as z };
|
|
2083
|
-
//# sourceMappingURL=Typography-e3d5ff23.js.map
|