@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,9 +1,9 @@
|
|
|
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';
|
|
1
|
+
import React__default, { createContext, useContext, useMemo, useEffect, useLayoutEffect, forwardRef, useRef, useImperativeHandle, Children } from 'react';
|
|
2
|
+
import { jsx, Fragment, jsxs } from '@emotion/react/jsx-runtime';
|
|
3
|
+
import { useTheme, ThemeProvider, css, keyframes } from '@emotion/react';
|
|
4
|
+
import { notification, ConfigProvider, Button as Button$1, Tooltip as Tooltip$1, Input as Input$1, Typography as Typography$1 } from 'antd';
|
|
5
|
+
import * as DropdownMenu$1 from '@radix-ui/react-dropdown-menu';
|
|
5
6
|
import chroma from 'chroma-js';
|
|
6
|
-
import AntDIcon from '@ant-design/icons';
|
|
7
7
|
import _isNil from 'lodash/isNil';
|
|
8
8
|
import _endsWith from 'lodash/endsWith';
|
|
9
9
|
import _isBoolean from 'lodash/isBoolean';
|
|
@@ -11,6 +11,131 @@ import _isNumber from 'lodash/isNumber';
|
|
|
11
11
|
import _isString from 'lodash/isString';
|
|
12
12
|
import _mapValues from 'lodash/mapValues';
|
|
13
13
|
import unitless from '@emotion/unitless';
|
|
14
|
+
import AntDIcon from '@ant-design/icons';
|
|
15
|
+
import _uniqueId from 'lodash/uniqueId';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Used to hide text visually, but still be readable by screen-readers
|
|
19
|
+
* and other assistive devices.
|
|
20
|
+
*
|
|
21
|
+
* https://www.tpgi.com/the-anatomy-of-visually-hidden/
|
|
22
|
+
*/
|
|
23
|
+
const visuallyHidden = {
|
|
24
|
+
'&:not(:focus):not(:active)': {
|
|
25
|
+
clip: 'rect(0 0 0 0)',
|
|
26
|
+
clipPath: 'inset(50%)',
|
|
27
|
+
height: '1px',
|
|
28
|
+
overflow: 'hidden',
|
|
29
|
+
position: 'absolute',
|
|
30
|
+
whiteSpace: 'nowrap',
|
|
31
|
+
width: '1px'
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const ColorVars = {
|
|
36
|
+
primary: 'textPrimary',
|
|
37
|
+
secondary: 'textSecondary',
|
|
38
|
+
info: 'textValidationInfo',
|
|
39
|
+
error: 'textValidationDanger',
|
|
40
|
+
success: 'textValidationSuccess',
|
|
41
|
+
warning: 'textValidationWarning'
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Recursively appends `!important` to all CSS properties in an Emotion `CSSObject`.
|
|
46
|
+
* Used to ensure that we always override Ant styles, without worrying about selector precedence.
|
|
47
|
+
*/
|
|
48
|
+
function importantify(obj) {
|
|
49
|
+
return _mapValues(obj, (value, key) => {
|
|
50
|
+
if (_isString(value) || _isNumber(value) || _isBoolean(value)) {
|
|
51
|
+
// Make sure we don't double-append important
|
|
52
|
+
if (_isString(value) && _endsWith(value, '!important')) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
if (_isNumber(value)) {
|
|
56
|
+
if (unitless[key]) {
|
|
57
|
+
return `${value}!important`;
|
|
58
|
+
}
|
|
59
|
+
return `${value}px!important`;
|
|
60
|
+
}
|
|
61
|
+
return `${value}!important`;
|
|
62
|
+
}
|
|
63
|
+
if (_isNil(value)) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
return importantify(value);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Returns a text color, in case of invalid/missing key and missing fallback color it will return textPrimary
|
|
72
|
+
* @param theme
|
|
73
|
+
* @param key - key of TypographyColor
|
|
74
|
+
* @param fallbackColor - color to return as fallback -- used to remove tertiary check inline
|
|
75
|
+
*/
|
|
76
|
+
function getTypographyColor(theme, key, fallbackColor) {
|
|
77
|
+
if (theme && key && Object(theme.colors).hasOwnProperty(ColorVars[key])) {
|
|
78
|
+
return theme.colors[ColorVars[key]];
|
|
79
|
+
}
|
|
80
|
+
return fallbackColor !== null && fallbackColor !== void 0 ? fallbackColor : theme.colors.textPrimary;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Returns validation color based on state, has default validation colors if params are not provided
|
|
85
|
+
* @param theme
|
|
86
|
+
* @param validationState
|
|
87
|
+
* @param errorColor
|
|
88
|
+
* @param warningColor
|
|
89
|
+
* @param successColor
|
|
90
|
+
*/
|
|
91
|
+
function getValidationStateColor(theme, validationState) {
|
|
92
|
+
let {
|
|
93
|
+
errorColor,
|
|
94
|
+
warningColor,
|
|
95
|
+
successColor
|
|
96
|
+
} = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
97
|
+
switch (validationState) {
|
|
98
|
+
case 'error':
|
|
99
|
+
return errorColor || theme.colors.actionDangerPrimaryBackgroundDefault;
|
|
100
|
+
case 'warning':
|
|
101
|
+
return warningColor || theme.colors.textValidationWarning;
|
|
102
|
+
case 'success':
|
|
103
|
+
return successColor || theme.colors.textValidationSuccess;
|
|
104
|
+
default:
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
110
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
111
|
+
name: "g8zzui",
|
|
112
|
+
styles: "cursor:progress"
|
|
113
|
+
} : {
|
|
114
|
+
name: "4y1qki-AccessibleContainer",
|
|
115
|
+
styles: "cursor:progress;label:AccessibleContainer;",
|
|
116
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
117
|
+
};
|
|
118
|
+
function AccessibleContainer(_ref) {
|
|
119
|
+
let {
|
|
120
|
+
children,
|
|
121
|
+
label
|
|
122
|
+
} = _ref;
|
|
123
|
+
if (!label) {
|
|
124
|
+
return jsx(Fragment, {
|
|
125
|
+
children: children
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
return jsxs("div", {
|
|
129
|
+
css: _ref2,
|
|
130
|
+
children: [jsx("span", {
|
|
131
|
+
css: visuallyHidden,
|
|
132
|
+
children: label
|
|
133
|
+
}), jsx("div", {
|
|
134
|
+
"aria-hidden": true,
|
|
135
|
+
children: children
|
|
136
|
+
})]
|
|
137
|
+
});
|
|
138
|
+
}
|
|
14
139
|
|
|
15
140
|
// Border variables
|
|
16
141
|
const borders = {
|
|
@@ -51,6 +176,24 @@ const responsive = {
|
|
|
51
176
|
};
|
|
52
177
|
var responsive$1 = responsive;
|
|
53
178
|
|
|
179
|
+
/**
|
|
180
|
+
* Provides access to http://go/safex flags from the frontend. Note that this is a temporary
|
|
181
|
+
* workaround until direct `safex` imports are available.
|
|
182
|
+
* @param flag The name of the flag to check
|
|
183
|
+
* @param defaultValue The default value to return if the flag is not set
|
|
184
|
+
* @returns
|
|
185
|
+
*/
|
|
186
|
+
const safex = (flag, defaultValue) => {
|
|
187
|
+
// Catching errors here, because we don't have type-safety to ensure
|
|
188
|
+
// that `__debug__safex`'s API hasn't changed.
|
|
189
|
+
try {
|
|
190
|
+
const globalSafex = window.__debug__safex;
|
|
191
|
+
return globalSafex ? globalSafex(flag, defaultValue) : defaultValue;
|
|
192
|
+
} catch (e) {
|
|
193
|
+
return defaultValue;
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
|
|
54
197
|
// Exported from go/designsystem/colorsheet
|
|
55
198
|
const colorPalettePrimary = {
|
|
56
199
|
primary: '#2272B4',
|
|
@@ -96,10 +239,20 @@ const colorPalettePrimary = {
|
|
|
96
239
|
yellow700: '#93320B',
|
|
97
240
|
yellow800: '#5F1B02'
|
|
98
241
|
};
|
|
242
|
+
const newGreys = {
|
|
243
|
+
grey100: '#F8F8F8',
|
|
244
|
+
grey200: '#E8E8E8',
|
|
245
|
+
grey300: '#D0D0D0',
|
|
246
|
+
grey400: '#AFAFAF',
|
|
247
|
+
grey500: '#969696',
|
|
248
|
+
grey600: '#727272',
|
|
249
|
+
grey700: '#403F3F',
|
|
250
|
+
grey800: '#181818'
|
|
251
|
+
};
|
|
99
252
|
const colorPaletteSecondary = {
|
|
100
253
|
brown: '#A6630C',
|
|
101
254
|
coral: '#C83243',
|
|
102
|
-
charcoal:
|
|
255
|
+
charcoal: colorPalettePrimary.grey600,
|
|
103
256
|
indigo: '#434A93',
|
|
104
257
|
lemon: '#FACB66',
|
|
105
258
|
lime: '#308613',
|
|
@@ -168,7 +321,7 @@ const lightColorList = {
|
|
|
168
321
|
tagDefault: chroma(colorPalettePrimary.grey600).alpha(0.08).hex(),
|
|
169
322
|
tagBrown: colorPaletteSecondary.brown,
|
|
170
323
|
tagCoral: colorPaletteSecondary.coral,
|
|
171
|
-
tagCharcoal:
|
|
324
|
+
tagCharcoal: colorPaletteSecondary.charcoal,
|
|
172
325
|
tagIndigo: colorPaletteSecondary.indigo,
|
|
173
326
|
tagLemon: colorPaletteSecondary.lemon,
|
|
174
327
|
tagLime: colorPaletteSecondary.lime,
|
|
@@ -245,7 +398,7 @@ const darkColorList = {
|
|
|
245
398
|
tagDefault: chroma(colorPalettePrimary.white).alpha(0.16).hex(),
|
|
246
399
|
tagBrown: chroma(colorPaletteSecondary.brown).alpha(0.84).hex(),
|
|
247
400
|
tagCoral: chroma(colorPaletteSecondary.coral).alpha(0.84).hex(),
|
|
248
|
-
tagCharcoal: chroma(
|
|
401
|
+
tagCharcoal: chroma(colorPaletteSecondary.charcoal).alpha(0.84).hex(),
|
|
249
402
|
tagIndigo: chroma(colorPaletteSecondary.indigo).alpha(0.84).hex(),
|
|
250
403
|
tagLemon: chroma(colorPaletteSecondary.lemon).alpha(0.84).hex(),
|
|
251
404
|
tagLime: chroma(colorPaletteSecondary.lime).alpha(0.84).hex(),
|
|
@@ -267,6 +420,38 @@ const darkColorList = {
|
|
|
267
420
|
backgroundDanger: 'rgba(200,45,76,0.08)',
|
|
268
421
|
backgroundWarning: 'rgba(222,121,33,0.08)'
|
|
269
422
|
};
|
|
423
|
+
const secondaryColorsUsingNewGreys = {
|
|
424
|
+
charcoal: newGreys.grey600
|
|
425
|
+
};
|
|
426
|
+
const lightColorsUsingNewGreys = {
|
|
427
|
+
actionDefaultBorderDefault: newGreys.grey300,
|
|
428
|
+
actionDefaultTextDefault: newGreys.grey800,
|
|
429
|
+
actionDisabledBackground: newGreys.grey200,
|
|
430
|
+
actionDisabledText: newGreys.grey400,
|
|
431
|
+
backgroundSecondary: newGreys.grey100,
|
|
432
|
+
border: newGreys.grey300,
|
|
433
|
+
borderDecorative: newGreys.grey200,
|
|
434
|
+
textPrimary: newGreys.grey800,
|
|
435
|
+
textSecondary: newGreys.grey600,
|
|
436
|
+
textPlaceholder: newGreys.grey400,
|
|
437
|
+
textValidationInfo: newGreys.grey600,
|
|
438
|
+
overlayOverlay: chroma(newGreys.grey100).alpha(0.72).hex(),
|
|
439
|
+
tagDefault: chroma(newGreys.grey600).alpha(0.08).hex(),
|
|
440
|
+
tagCharcoal: newGreys.grey600,
|
|
441
|
+
typographyCodeBg: chroma(newGreys.grey600).alpha(0.08).hex(),
|
|
442
|
+
tableRowHover: chroma(newGreys.grey600).alpha(0.04).hex(),
|
|
443
|
+
tooltipBackgroundTooltip: newGreys.grey800
|
|
444
|
+
};
|
|
445
|
+
const darkColorsUsingNewGreys = {
|
|
446
|
+
actionPrimaryTextDefault: newGreys.grey800,
|
|
447
|
+
actionPrimaryTextHover: newGreys.grey800,
|
|
448
|
+
actionPrimaryTextPress: newGreys.grey800,
|
|
449
|
+
backgroundPrimary: newGreys.grey800,
|
|
450
|
+
backgroundSecondary: newGreys.grey700,
|
|
451
|
+
textPlaceholder: chroma(newGreys.grey400).alpha(0.84).hex(),
|
|
452
|
+
overlayOverlay: chroma(newGreys.grey800).alpha(0.72).hex(),
|
|
453
|
+
tagCharcoal: chroma(newGreys.grey600).alpha(0.84).hex()
|
|
454
|
+
};
|
|
270
455
|
|
|
271
456
|
const darkColors = {
|
|
272
457
|
...darkColorList,
|
|
@@ -279,7 +464,18 @@ const lightColors = {
|
|
|
279
464
|
...colorPaletteSecondary
|
|
280
465
|
};
|
|
281
466
|
function getSemanticColors(isDarkMode) {
|
|
282
|
-
|
|
467
|
+
const enableNewGreys = safex('databricks.fe.designsystem.enableNewGreys', false);
|
|
468
|
+
const colorList = isDarkMode ? darkColors : lightColors;
|
|
469
|
+
if (enableNewGreys) {
|
|
470
|
+
return {
|
|
471
|
+
...colorList,
|
|
472
|
+
...newGreys,
|
|
473
|
+
...secondaryColorsUsingNewGreys,
|
|
474
|
+
...(isDarkMode ? darkColorsUsingNewGreys : lightColorsUsingNewGreys)
|
|
475
|
+
};
|
|
476
|
+
} else {
|
|
477
|
+
return colorList;
|
|
478
|
+
}
|
|
283
479
|
}
|
|
284
480
|
|
|
285
481
|
// TODO (FEINF-1674): Remove when removing USE_NEW_RADIO_STYLES
|
|
@@ -526,7 +722,9 @@ const DesignSystemProvider = _ref2 => {
|
|
|
526
722
|
enableAnimation = false,
|
|
527
723
|
zIndexBase = 1000,
|
|
528
724
|
getPopupContainer,
|
|
529
|
-
flags = {}
|
|
725
|
+
flags = {},
|
|
726
|
+
// Disable virtualization of legacy AntD components when running tests so that all items are rendered
|
|
727
|
+
disableLegacyAntVirtualization = process.env.NODE_ENV === 'test' ? true : undefined
|
|
530
728
|
} = _ref2;
|
|
531
729
|
const {
|
|
532
730
|
isDarkMode: contextDarkModeVal
|
|
@@ -569,7 +767,8 @@ const DesignSystemProvider = _ref2 => {
|
|
|
569
767
|
children: jsx(AntDConfigProviderPropsContext.Provider, {
|
|
570
768
|
value: {
|
|
571
769
|
prefixCls: classNamePrefix,
|
|
572
|
-
getPopupContainer
|
|
770
|
+
getPopupContainer,
|
|
771
|
+
virtual: !disableLegacyAntVirtualization
|
|
573
772
|
},
|
|
574
773
|
children: jsx(DesignSystemContext.Provider, {
|
|
575
774
|
value: value,
|
|
@@ -716,6 +915,7 @@ const Icon = props => {
|
|
|
716
915
|
} : undefined, [Component]);
|
|
717
916
|
return jsx(DesignSystemAntDConfigProvider, {
|
|
718
917
|
children: jsx(AntDIcon, {
|
|
918
|
+
"aria-hidden": "true",
|
|
719
919
|
css: getIconEmotionStyles(theme),
|
|
720
920
|
component: MemoizedComponent,
|
|
721
921
|
style: {
|
|
@@ -730,17 +930,17 @@ const Icon = props => {
|
|
|
730
930
|
|
|
731
931
|
function SvgCheckIcon(props) {
|
|
732
932
|
return jsx("svg", {
|
|
933
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
733
934
|
width: "1em",
|
|
734
935
|
height: "1em",
|
|
735
|
-
viewBox: "0 0 16 16",
|
|
736
936
|
fill: "none",
|
|
737
|
-
|
|
937
|
+
viewBox: "0 0 16 16",
|
|
738
938
|
...props,
|
|
739
939
|
children: jsx("path", {
|
|
940
|
+
fill: "currentColor",
|
|
740
941
|
fillRule: "evenodd",
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
fill: "currentColor"
|
|
942
|
+
d: "m15.06 3.56-9.53 9.531L1 8.561 2.06 7.5l3.47 3.47L14 2.5l1.06 1.06Z",
|
|
943
|
+
clipRule: "evenodd"
|
|
744
944
|
})
|
|
745
945
|
});
|
|
746
946
|
}
|
|
@@ -753,17 +953,17 @@ function CheckIcon(props) {
|
|
|
753
953
|
|
|
754
954
|
function SvgChevronLeftIcon(props) {
|
|
755
955
|
return jsx("svg", {
|
|
956
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
756
957
|
width: "1em",
|
|
757
958
|
height: "1em",
|
|
758
|
-
viewBox: "0 0 16 16",
|
|
759
959
|
fill: "none",
|
|
760
|
-
|
|
960
|
+
viewBox: "0 0 16 16",
|
|
761
961
|
...props,
|
|
762
962
|
children: jsx("path", {
|
|
963
|
+
fill: "currentColor",
|
|
763
964
|
fillRule: "evenodd",
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
fill: "currentColor"
|
|
965
|
+
d: "M7.083 8 10 10.947 8.958 12 5 8l3.958-4L10 5.053 7.083 8Z",
|
|
966
|
+
clipRule: "evenodd"
|
|
767
967
|
})
|
|
768
968
|
});
|
|
769
969
|
}
|
|
@@ -776,17 +976,17 @@ function ChevronLeftIcon(props) {
|
|
|
776
976
|
|
|
777
977
|
function SvgChevronRightIcon(props) {
|
|
778
978
|
return jsx("svg", {
|
|
979
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
779
980
|
width: "1em",
|
|
780
981
|
height: "1em",
|
|
781
|
-
viewBox: "0 0 16 16",
|
|
782
982
|
fill: "none",
|
|
783
|
-
|
|
983
|
+
viewBox: "0 0 16 16",
|
|
784
984
|
...props,
|
|
785
985
|
children: jsx("path", {
|
|
986
|
+
fill: "currentColor",
|
|
786
987
|
fillRule: "evenodd",
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
fill: "currentColor"
|
|
988
|
+
d: "M8.917 8 6 5.053 7.042 4 11 8l-3.958 4L6 10.947 8.917 8Z",
|
|
989
|
+
clipRule: "evenodd"
|
|
790
990
|
})
|
|
791
991
|
});
|
|
792
992
|
}
|
|
@@ -799,17 +999,17 @@ function ChevronRightIcon(props) {
|
|
|
799
999
|
|
|
800
1000
|
function SvgCloseIcon(props) {
|
|
801
1001
|
return jsx("svg", {
|
|
1002
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
802
1003
|
width: "1em",
|
|
803
1004
|
height: "1em",
|
|
804
|
-
viewBox: "0 0 16 16",
|
|
805
1005
|
fill: "none",
|
|
806
|
-
|
|
1006
|
+
viewBox: "0 0 16 16",
|
|
807
1007
|
...props,
|
|
808
1008
|
children: jsx("path", {
|
|
1009
|
+
fill: "currentColor",
|
|
809
1010
|
fillRule: "evenodd",
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
fill: "currentColor"
|
|
1011
|
+
d: "M6.97 8.03 2 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",
|
|
1012
|
+
clipRule: "evenodd"
|
|
813
1013
|
})
|
|
814
1014
|
});
|
|
815
1015
|
}
|
|
@@ -822,27 +1022,26 @@ function CloseIcon(props) {
|
|
|
822
1022
|
|
|
823
1023
|
function SvgCursorIcon(props) {
|
|
824
1024
|
return jsxs("svg", {
|
|
1025
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
825
1026
|
width: "1em",
|
|
826
1027
|
height: "1em",
|
|
827
|
-
viewBox: "0 0 16 16",
|
|
828
1028
|
fill: "none",
|
|
829
|
-
|
|
1029
|
+
viewBox: "0 0 16 16",
|
|
830
1030
|
...props,
|
|
831
1031
|
children: [jsx("g", {
|
|
832
|
-
clipPath: "url(#
|
|
1032
|
+
clipPath: "url(#CursorIcon_svg__a)",
|
|
833
1033
|
children: jsx("path", {
|
|
1034
|
+
fill: "currentColor",
|
|
834
1035
|
fillRule: "evenodd",
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
fill: "currentColor"
|
|
1036
|
+
d: "M1.22 1.22a.75.75 0 0 1 .802-.169l13.5 5.25a.75.75 0 0 1-.043 1.413L9.597 9.597l-1.883 5.882a.75.75 0 0 1-1.413.043l-5.25-13.5a.75.75 0 0 1 .169-.802Zm1.847 1.847 3.864 9.937 1.355-4.233a.75.75 0 0 1 .485-.485l4.233-1.355-9.937-3.864Z",
|
|
1037
|
+
clipRule: "evenodd"
|
|
838
1038
|
})
|
|
839
1039
|
}), jsx("defs", {
|
|
840
1040
|
children: jsx("clipPath", {
|
|
841
|
-
id: "
|
|
1041
|
+
id: "CursorIcon_svg__a",
|
|
842
1042
|
children: jsx("path", {
|
|
843
1043
|
fill: "#fff",
|
|
844
|
-
|
|
845
|
-
d: "M0 0h16v16H0z"
|
|
1044
|
+
d: "M16 0H0v16h16z"
|
|
846
1045
|
})
|
|
847
1046
|
})
|
|
848
1047
|
})]
|
|
@@ -857,25 +1056,25 @@ function CursorIcon(props) {
|
|
|
857
1056
|
|
|
858
1057
|
function SvgFaceFrownIcon(props) {
|
|
859
1058
|
return jsxs("svg", {
|
|
1059
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
860
1060
|
width: "1em",
|
|
861
1061
|
height: "1em",
|
|
862
|
-
viewBox: "0 0 16 16",
|
|
863
1062
|
fill: "none",
|
|
864
|
-
|
|
1063
|
+
viewBox: "0 0 16 16",
|
|
865
1064
|
...props,
|
|
866
1065
|
children: [jsxs("g", {
|
|
867
|
-
clipPath: "url(#FaceFrownIcon_svg__clip0_16320_32311)",
|
|
868
1066
|
fill: "currentColor",
|
|
1067
|
+
clipPath: "url(#FaceFrownIcon_svg__a)",
|
|
869
1068
|
children: [jsx("path", {
|
|
870
|
-
d: "M6 5.25a.75.75 0
|
|
1069
|
+
d: "M6 5.25a.75.75 0 0 0 0 1.5h.007a.75.75 0 0 0 0-1.5H6ZM9.25 6a.75.75 0 0 1 .75-.75h.007a.75.75 0 0 1 0 1.5H10A.75.75 0 0 1 9.25 6ZM10.07 11.12a.75.75 0 0 0 1.197-.903l-.001-.001v-.001l-.003-.003-.005-.006-.015-.02a2.95 2.95 0 0 0-.217-.246 4.717 4.717 0 0 0-.627-.546C9.86 9 9.04 8.584 8 8.584s-1.858.416-2.4.81a4.716 4.716 0 0 0-.795.733 2.87 2.87 0 0 0-.048.06l-.015.019-.005.006-.002.003-.031.044.03-.042a.75.75 0 1 0 1.22.875 3.219 3.219 0 0 1 .529-.485c.375-.273.89-.523 1.517-.523.627 0 1.142.25 1.517.523a3.219 3.219 0 0 1 .529.485l.021.025.002.003Z"
|
|
871
1070
|
}), jsx("path", {
|
|
872
1071
|
fillRule: "evenodd",
|
|
873
|
-
|
|
874
|
-
|
|
1072
|
+
d: "M8 .583a7.417 7.417 0 1 0 0 14.834A7.417 7.417 0 0 0 8 .583ZM2.083 8a5.917 5.917 0 1 1 11.834 0A5.917 5.917 0 0 1 2.083 8Z",
|
|
1073
|
+
clipRule: "evenodd"
|
|
875
1074
|
})]
|
|
876
1075
|
}), jsx("defs", {
|
|
877
1076
|
children: jsx("clipPath", {
|
|
878
|
-
id: "
|
|
1077
|
+
id: "FaceFrownIcon_svg__a",
|
|
879
1078
|
children: jsx("path", {
|
|
880
1079
|
fill: "#fff",
|
|
881
1080
|
d: "M0 0h16v16H0z"
|
|
@@ -893,25 +1092,25 @@ function FaceFrownIcon(props) {
|
|
|
893
1092
|
|
|
894
1093
|
function SvgFaceNeutralIcon(props) {
|
|
895
1094
|
return jsxs("svg", {
|
|
1095
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
896
1096
|
width: "1em",
|
|
897
1097
|
height: "1em",
|
|
898
|
-
viewBox: "0 0 16 16",
|
|
899
1098
|
fill: "none",
|
|
900
|
-
|
|
1099
|
+
viewBox: "0 0 16 16",
|
|
901
1100
|
...props,
|
|
902
1101
|
children: [jsxs("g", {
|
|
903
|
-
|
|
1102
|
+
fill: "currentColor",
|
|
904
1103
|
fillRule: "evenodd",
|
|
1104
|
+
clipPath: "url(#FaceNeutralIcon_svg__a)",
|
|
905
1105
|
clipRule: "evenodd",
|
|
906
|
-
fill: "currentColor",
|
|
907
1106
|
children: [jsx("path", {
|
|
908
|
-
d: "M8 2.083a5.917 5.917 0
|
|
1107
|
+
d: "M8 2.083a5.917 5.917 0 1 0 0 11.834A5.917 5.917 0 0 0 8 2.084ZM.583 8a7.417 7.417 0 1 1 14.834 0A7.417 7.417 0 0 1 .583 8Z"
|
|
909
1108
|
}), jsx("path", {
|
|
910
|
-
d: "M4.583 10a.75.75 0
|
|
1109
|
+
d: "M4.583 10a.75.75 0 0 1 .75-.75h5.334a.75.75 0 1 1 0 1.5H5.333a.75.75 0 0 1-.75-.75ZM5.25 6A.75.75 0 0 1 6 5.25h.007a.75.75 0 0 1 0 1.5H6A.75.75 0 0 1 5.25 6ZM9.25 6a.75.75 0 0 1 .75-.75h.007a.75.75 0 1 1 0 1.5H10A.75.75 0 0 1 9.25 6Z"
|
|
911
1110
|
})]
|
|
912
1111
|
}), jsx("defs", {
|
|
913
1112
|
children: jsx("clipPath", {
|
|
914
|
-
id: "
|
|
1113
|
+
id: "FaceNeutralIcon_svg__a",
|
|
915
1114
|
children: jsx("path", {
|
|
916
1115
|
fill: "#fff",
|
|
917
1116
|
d: "M0 0h16v16H0z"
|
|
@@ -929,29 +1128,29 @@ function FaceNeutralIcon(props) {
|
|
|
929
1128
|
|
|
930
1129
|
function SvgFaceSmileIcon(props) {
|
|
931
1130
|
return jsxs("svg", {
|
|
1131
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
932
1132
|
width: "1em",
|
|
933
1133
|
height: "1em",
|
|
934
|
-
viewBox: "0 0 16 16",
|
|
935
1134
|
fill: "none",
|
|
936
|
-
|
|
1135
|
+
viewBox: "0 0 16 16",
|
|
937
1136
|
...props,
|
|
938
1137
|
children: [jsxs("g", {
|
|
939
|
-
clipPath: "url(#FaceSmileIcon_svg__clip0_16320_32307)",
|
|
940
1138
|
fill: "currentColor",
|
|
1139
|
+
clipPath: "url(#FaceSmileIcon_svg__a)",
|
|
941
1140
|
children: [jsx("path", {
|
|
942
1141
|
fillRule: "evenodd",
|
|
943
|
-
|
|
944
|
-
|
|
1142
|
+
d: "M8 2.083a5.917 5.917 0 1 0 0 11.834A5.917 5.917 0 0 0 8 2.084ZM.583 8a7.417 7.417 0 1 1 14.834 0A7.417 7.417 0 0 1 .583 8Z",
|
|
1143
|
+
clipRule: "evenodd"
|
|
945
1144
|
}), jsx("path", {
|
|
946
|
-
d: "M4.883 8.733a.75.75 0
|
|
1145
|
+
d: "M4.883 8.733a.75.75 0 0 1 1.048.147l.002.003.021.026a3.216 3.216 0 0 0 .529.485c.375.273.89.523 1.517.523.627 0 1.142-.25 1.517-.523a3.215 3.215 0 0 0 .55-.511.75.75 0 0 1 1.2.9l.029-.042-.03.043-.001.002-.002.002-.005.007-.015.019a3.878 3.878 0 0 1-.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 0 1-.795-.734 2.643 2.643 0 0 1-.048-.059l-.015-.02-.005-.006-.002-.002v-.002h-.002a.75.75 0 0 1 .15-1.05Z"
|
|
947
1146
|
}), jsx("path", {
|
|
948
1147
|
fillRule: "evenodd",
|
|
949
|
-
|
|
950
|
-
|
|
1148
|
+
d: "M5.25 6A.75.75 0 0 1 6 5.25h.007a.75.75 0 0 1 0 1.5H6A.75.75 0 0 1 5.25 6ZM9.25 6a.75.75 0 0 1 .75-.75h.007a.75.75 0 1 1 0 1.5H10A.75.75 0 0 1 9.25 6Z",
|
|
1149
|
+
clipRule: "evenodd"
|
|
951
1150
|
})]
|
|
952
1151
|
}), jsx("defs", {
|
|
953
1152
|
children: jsx("clipPath", {
|
|
954
|
-
id: "
|
|
1153
|
+
id: "FaceSmileIcon_svg__a",
|
|
955
1154
|
children: jsx("path", {
|
|
956
1155
|
fill: "#fff",
|
|
957
1156
|
d: "M0 0h16v16H0z"
|
|
@@ -967,20 +1166,69 @@ function FaceSmileIcon(props) {
|
|
|
967
1166
|
});
|
|
968
1167
|
}
|
|
969
1168
|
|
|
970
|
-
function
|
|
1169
|
+
function SvgInfoIcon(props) {
|
|
971
1170
|
return jsxs("svg", {
|
|
1171
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
972
1172
|
width: "1em",
|
|
973
1173
|
height: "1em",
|
|
1174
|
+
fill: "none",
|
|
974
1175
|
viewBox: "0 0 16 16",
|
|
1176
|
+
...props,
|
|
1177
|
+
children: [jsx("path", {
|
|
1178
|
+
fill: "currentColor",
|
|
1179
|
+
d: "M7.25 11V7h1.5v4h-1.5ZM8 4.5A.75.75 0 1 1 8 6a.75.75 0 0 1 0-1.5Z"
|
|
1180
|
+
}), jsx("path", {
|
|
1181
|
+
fill: "currentColor",
|
|
1182
|
+
fillRule: "evenodd",
|
|
1183
|
+
d: "M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z",
|
|
1184
|
+
clipRule: "evenodd"
|
|
1185
|
+
})]
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
function InfoIcon(props) {
|
|
1189
|
+
return jsx(Icon, {
|
|
1190
|
+
...props,
|
|
1191
|
+
component: SvgInfoIcon
|
|
1192
|
+
});
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
function SvgLoadingIcon(props) {
|
|
1196
|
+
return jsx("svg", {
|
|
1197
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1198
|
+
width: "1em",
|
|
1199
|
+
height: "1em",
|
|
975
1200
|
fill: "none",
|
|
1201
|
+
viewBox: "0 0 24 24",
|
|
1202
|
+
...props,
|
|
1203
|
+
children: jsx("path", {
|
|
1204
|
+
fill: "currentColor",
|
|
1205
|
+
fillRule: "evenodd",
|
|
1206
|
+
d: "M23.212 12a.788.788 0 0 1-.789-.788 9.57 9.57 0 0 0-.757-3.751 9.662 9.662 0 0 0-5.129-5.129 9.587 9.587 0 0 0-3.749-.755.788.788 0 0 1 0-1.577c1.513 0 2.983.296 4.365.882a11.128 11.128 0 0 1 3.562 2.403 11.157 11.157 0 0 1 3.283 7.927.785.785 0 0 1-.786.788Z",
|
|
1207
|
+
clipRule: "evenodd"
|
|
1208
|
+
})
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
function LoadingIcon(props) {
|
|
1212
|
+
return jsx(Icon, {
|
|
1213
|
+
...props,
|
|
1214
|
+
component: SvgLoadingIcon
|
|
1215
|
+
});
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
function SvgNewWindowIcon(props) {
|
|
1219
|
+
return jsxs("svg", {
|
|
976
1220
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1221
|
+
width: "1em",
|
|
1222
|
+
height: "1em",
|
|
1223
|
+
fill: "none",
|
|
1224
|
+
viewBox: "0 0 16 16",
|
|
977
1225
|
...props,
|
|
978
1226
|
children: [jsx("path", {
|
|
979
|
-
|
|
980
|
-
|
|
1227
|
+
fill: "currentColor",
|
|
1228
|
+
d: "M10 1h5v5h-1.5V3.56L8.53 8.53 7.47 7.47l4.97-4.97H10V1Z"
|
|
981
1229
|
}), jsx("path", {
|
|
982
|
-
|
|
983
|
-
|
|
1230
|
+
fill: "currentColor",
|
|
1231
|
+
d: "M1 2.75A.75.75 0 0 1 1.75 2H8v1.5H2.5v10h10V8H14v6.25a.75.75 0 0 1-.75.75H1.75a.75.75 0 0 1-.75-.75V2.75Z"
|
|
984
1232
|
})]
|
|
985
1233
|
});
|
|
986
1234
|
}
|
|
@@ -991,85 +1239,132 @@ function NewWindowIcon(props) {
|
|
|
991
1239
|
});
|
|
992
1240
|
}
|
|
993
1241
|
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
info: 'textValidationInfo',
|
|
998
|
-
error: 'textValidationDanger',
|
|
999
|
-
success: 'textValidationSuccess',
|
|
1000
|
-
warning: 'textValidationWarning'
|
|
1001
|
-
};
|
|
1002
|
-
|
|
1003
|
-
/**
|
|
1004
|
-
* Recursively appends `!important` to all CSS properties in an Emotion `CSSObject`.
|
|
1005
|
-
* Used to ensure that we always override Ant styles, without worrying about selector precedence.
|
|
1006
|
-
*/
|
|
1007
|
-
function importantify(obj) {
|
|
1008
|
-
return _mapValues(obj, (value, key) => {
|
|
1009
|
-
if (_isString(value) || _isNumber(value) || _isBoolean(value)) {
|
|
1010
|
-
// Make sure we don't double-append important
|
|
1011
|
-
if (_isString(value) && _endsWith(value, '!important')) {
|
|
1012
|
-
return value;
|
|
1013
|
-
}
|
|
1014
|
-
if (_isNumber(value)) {
|
|
1015
|
-
if (unitless[key]) {
|
|
1016
|
-
return `${value}!important`;
|
|
1017
|
-
}
|
|
1018
|
-
return `${value}px!important`;
|
|
1019
|
-
}
|
|
1020
|
-
return `${value}!important`;
|
|
1021
|
-
}
|
|
1022
|
-
if (_isNil(value)) {
|
|
1023
|
-
return value;
|
|
1024
|
-
}
|
|
1025
|
-
return importantify(value);
|
|
1026
|
-
});
|
|
1242
|
+
let sequentialCounter = 0;
|
|
1243
|
+
function useStableUid() {
|
|
1244
|
+
return useMemo(() => sequentialCounter++, []);
|
|
1027
1245
|
}
|
|
1028
1246
|
|
|
1247
|
+
/** Props for UI components that support a "loading" state. */
|
|
1248
|
+
|
|
1029
1249
|
/**
|
|
1030
|
-
*
|
|
1031
|
-
*
|
|
1032
|
-
*
|
|
1033
|
-
* @param fallbackColor - color to return as fallback -- used to remove tertiary check inline
|
|
1250
|
+
* A handler for integrating UI components with external latency instrumentation.
|
|
1251
|
+
* If provided via `LoadingStateContext`, hooks will be called whenever child
|
|
1252
|
+
* components in a "loading" state are mounted and unmounted.
|
|
1034
1253
|
*/
|
|
1035
|
-
function getTypographyColor(theme, key, fallbackColor) {
|
|
1036
|
-
if (theme && key && Object(theme.colors).hasOwnProperty(ColorVars[key])) {
|
|
1037
|
-
return theme.colors[ColorVars[key]];
|
|
1038
|
-
}
|
|
1039
|
-
return fallbackColor !== null && fallbackColor !== void 0 ? fallbackColor : theme.colors.textPrimary;
|
|
1040
|
-
}
|
|
1041
1254
|
|
|
1255
|
+
const LoadingStateContext = /*#__PURE__*/createContext(null);
|
|
1042
1256
|
/**
|
|
1043
|
-
*
|
|
1044
|
-
*
|
|
1045
|
-
*
|
|
1046
|
-
*
|
|
1047
|
-
*
|
|
1048
|
-
*
|
|
1257
|
+
* Indicates that the containing component is in a "loading" state, i.e. that the UI
|
|
1258
|
+
* displayed to the user is semantically equivalent to them seeing a spinner or a
|
|
1259
|
+
* loading indicator. This means that the UI is not in its final settled state yet.
|
|
1260
|
+
*
|
|
1261
|
+
* All components that are in a "loading" state should render a `<LoadingState>`
|
|
1262
|
+
* component, preferrably with an appropriate description.
|
|
1263
|
+
*
|
|
1264
|
+
* By itself, `<LoadingState>` doesn't do anything, but if used within `LoadingStateContext`,
|
|
1265
|
+
* it will call the provided `startLoading()`/`endLoading()` hooks when the component
|
|
1266
|
+
* is mounted/unmounted, which can be used to integrate existing latency instrumentation.
|
|
1049
1267
|
*/
|
|
1050
|
-
|
|
1268
|
+
const LoadingState = _ref => {
|
|
1051
1269
|
let {
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1270
|
+
description = 'Generic UI loading state'
|
|
1271
|
+
} = _ref;
|
|
1272
|
+
const uid = useStableUid();
|
|
1273
|
+
const loadingStateContext = useContext(LoadingStateContext);
|
|
1274
|
+
useLayoutEffect(() => {
|
|
1275
|
+
// mount
|
|
1276
|
+
if (loadingStateContext) {
|
|
1277
|
+
loadingStateContext.startLoading(uid, description);
|
|
1278
|
+
}
|
|
1279
|
+
return () => {
|
|
1280
|
+
// unmount
|
|
1281
|
+
if (loadingStateContext) {
|
|
1282
|
+
loadingStateContext.endLoading(uid);
|
|
1283
|
+
}
|
|
1284
|
+
};
|
|
1285
|
+
}, [uid, description, loadingStateContext]);
|
|
1286
|
+
return null;
|
|
1287
|
+
};
|
|
1288
|
+
|
|
1289
|
+
const rotate = keyframes({
|
|
1290
|
+
'0%': {
|
|
1291
|
+
transform: 'rotate(0deg) translate3d(0, 0, 0)'
|
|
1292
|
+
},
|
|
1293
|
+
'100%': {
|
|
1294
|
+
transform: 'rotate(360deg) translate3d(0, 0, 0)'
|
|
1065
1295
|
}
|
|
1066
|
-
}
|
|
1296
|
+
});
|
|
1297
|
+
const cssSpinner = function (theme) {
|
|
1298
|
+
let frameRate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
|
|
1299
|
+
let delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1300
|
+
let animationDuration = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
1301
|
+
let inheritColor = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
1302
|
+
const styles = {
|
|
1303
|
+
animation: `${rotate} ${animationDuration}s steps(${frameRate}, end) infinite`,
|
|
1304
|
+
...(inheritColor ? {
|
|
1305
|
+
color: 'inherit'
|
|
1306
|
+
} : {
|
|
1307
|
+
color: theme.colors.textSecondary
|
|
1308
|
+
}),
|
|
1309
|
+
animationDelay: `${delay}s`,
|
|
1310
|
+
'@media only percy': {
|
|
1311
|
+
animation: 'none'
|
|
1312
|
+
}
|
|
1313
|
+
};
|
|
1314
|
+
return /*#__PURE__*/css(importantify(styles), process.env.NODE_ENV === "production" ? "" : ";label:cssSpinner;");
|
|
1315
|
+
};
|
|
1316
|
+
const Spinner = _ref => {
|
|
1317
|
+
let {
|
|
1318
|
+
frameRate,
|
|
1319
|
+
size = 'default',
|
|
1320
|
+
delay,
|
|
1321
|
+
className: propClass,
|
|
1322
|
+
label,
|
|
1323
|
+
animationDuration,
|
|
1324
|
+
inheritColor,
|
|
1325
|
+
loading = true,
|
|
1326
|
+
loadingDescription = 'Spinner',
|
|
1327
|
+
...props
|
|
1328
|
+
} = _ref;
|
|
1329
|
+
const {
|
|
1330
|
+
classNamePrefix,
|
|
1331
|
+
theme
|
|
1332
|
+
} = useDesignSystemTheme();
|
|
1333
|
+
|
|
1334
|
+
// We use Antd classes to keep styling unchanged
|
|
1335
|
+
// TODO(FEINF-1407): We want to move away from Antd classes and use Emotion for styling in the future
|
|
1336
|
+
const sizeSuffix = size === 'small' ? '-sm' : size === 'large' ? '-lg' : '';
|
|
1337
|
+
const sizeClass = sizeSuffix ? `${classNamePrefix}-spin${sizeSuffix}` : '';
|
|
1338
|
+
const wrapperClass = `${propClass || ''} ${classNamePrefix}-spin ${sizeClass} ${classNamePrefix}-spin-spinning ${DU_BOIS_ENABLE_ANIMATION_CLASSNAME}`.trim();
|
|
1339
|
+
const className = `${classNamePrefix}-spin-dot ${DU_BOIS_ENABLE_ANIMATION_CLASSNAME}`.trim();
|
|
1340
|
+
return (
|
|
1341
|
+
// className has to follow {...props}, otherwise is `css` prop is passed down it will overwrite our className
|
|
1342
|
+
jsxs("div", {
|
|
1343
|
+
...props,
|
|
1344
|
+
className: wrapperClass,
|
|
1345
|
+
children: [loading && jsx(LoadingState, {
|
|
1346
|
+
description: loadingDescription
|
|
1347
|
+
}), jsx(AccessibleContainer, {
|
|
1348
|
+
label: label,
|
|
1349
|
+
children: jsx(LoadingIcon, {
|
|
1350
|
+
"aria-hidden": "false",
|
|
1351
|
+
css: cssSpinner(theme, frameRate, delay, animationDuration, inheritColor),
|
|
1352
|
+
className: className
|
|
1353
|
+
})
|
|
1354
|
+
})]
|
|
1355
|
+
})
|
|
1356
|
+
);
|
|
1357
|
+
};
|
|
1067
1358
|
|
|
1068
1359
|
function getDefaultStyles(theme) {
|
|
1069
|
-
|
|
1360
|
+
let loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1361
|
+
const defaultStyles = {
|
|
1070
1362
|
backgroundColor: theme.colors.actionDefaultBackgroundDefault,
|
|
1071
1363
|
borderColor: theme.colors.actionDefaultBorderDefault,
|
|
1072
|
-
color: theme.colors.actionDefaultTextDefault
|
|
1364
|
+
color: theme.colors.actionDefaultTextDefault
|
|
1365
|
+
};
|
|
1366
|
+
return {
|
|
1367
|
+
...defaultStyles,
|
|
1073
1368
|
lineHeight: theme.typography.lineHeightBase,
|
|
1074
1369
|
textDecoration: 'none',
|
|
1075
1370
|
'&:hover': {
|
|
@@ -1078,17 +1373,20 @@ function getDefaultStyles(theme) {
|
|
|
1078
1373
|
color: theme.colors.actionDefaultTextHover
|
|
1079
1374
|
},
|
|
1080
1375
|
'&:active': {
|
|
1081
|
-
backgroundColor: theme.colors.actionDefaultBackgroundPress,
|
|
1376
|
+
backgroundColor: loading ? theme.colors.actionDefaultBackgroundDefault : theme.colors.actionDefaultBackgroundPress,
|
|
1082
1377
|
borderColor: theme.colors.actionDefaultBorderPress,
|
|
1083
1378
|
color: theme.colors.actionDefaultTextPress
|
|
1084
1379
|
}
|
|
1085
1380
|
};
|
|
1086
1381
|
}
|
|
1087
1382
|
function getPrimaryStyles(theme) {
|
|
1088
|
-
|
|
1383
|
+
const defaultStyles = {
|
|
1089
1384
|
backgroundColor: theme.colors.actionPrimaryBackgroundDefault,
|
|
1090
1385
|
borderColor: 'transparent',
|
|
1091
|
-
color: theme.colors.actionPrimaryTextDefault
|
|
1386
|
+
color: theme.colors.actionPrimaryTextDefault
|
|
1387
|
+
};
|
|
1388
|
+
return {
|
|
1389
|
+
...defaultStyles,
|
|
1092
1390
|
textShadow: 'none',
|
|
1093
1391
|
'&:hover': {
|
|
1094
1392
|
backgroundColor: theme.colors.actionPrimaryBackgroundHover,
|
|
@@ -1103,10 +1401,13 @@ function getPrimaryStyles(theme) {
|
|
|
1103
1401
|
};
|
|
1104
1402
|
}
|
|
1105
1403
|
function getLinkStyles$1(theme) {
|
|
1106
|
-
|
|
1404
|
+
const defaultStyles = {
|
|
1107
1405
|
backgroundColor: theme.colors.actionTertiaryBackgroundDefault,
|
|
1108
1406
|
borderColor: theme.colors.actionTertiaryBackgroundDefault,
|
|
1109
|
-
color: theme.colors.actionTertiaryTextDefault
|
|
1407
|
+
color: theme.colors.actionTertiaryTextDefault
|
|
1408
|
+
};
|
|
1409
|
+
return {
|
|
1410
|
+
...defaultStyles,
|
|
1110
1411
|
'&:hover': {
|
|
1111
1412
|
backgroundColor: theme.colors.actionTertiaryBackgroundHover,
|
|
1112
1413
|
borderColor: 'transparent',
|
|
@@ -1124,10 +1425,13 @@ function getLinkStyles$1(theme) {
|
|
|
1124
1425
|
};
|
|
1125
1426
|
}
|
|
1126
1427
|
function getPrimaryDangerStyles(theme) {
|
|
1127
|
-
|
|
1428
|
+
const defaultStyles = {
|
|
1128
1429
|
backgroundColor: theme.colors.actionDangerPrimaryBackgroundDefault,
|
|
1129
1430
|
borderColor: 'transparent',
|
|
1130
|
-
color: theme.colors.white
|
|
1431
|
+
color: theme.colors.white
|
|
1432
|
+
};
|
|
1433
|
+
return {
|
|
1434
|
+
...defaultStyles,
|
|
1131
1435
|
'&:hover': {
|
|
1132
1436
|
backgroundColor: theme.colors.actionDangerPrimaryBackgroundHover,
|
|
1133
1437
|
borderColor: 'transparent',
|
|
@@ -1144,10 +1448,13 @@ function getPrimaryDangerStyles(theme) {
|
|
|
1144
1448
|
};
|
|
1145
1449
|
}
|
|
1146
1450
|
function getSecondaryDangerStyles(theme) {
|
|
1147
|
-
|
|
1451
|
+
const defaultStyles = {
|
|
1148
1452
|
backgroundColor: theme.colors.actionDangerDefaultBackgroundDefault,
|
|
1149
1453
|
borderColor: theme.colors.actionDangerDefaultBorderDefault,
|
|
1150
|
-
color: theme.colors.actionDangerDefaultTextDefault
|
|
1454
|
+
color: theme.colors.actionDangerDefaultTextDefault
|
|
1455
|
+
};
|
|
1456
|
+
return {
|
|
1457
|
+
...defaultStyles,
|
|
1151
1458
|
'&:hover': {
|
|
1152
1459
|
backgroundColor: theme.colors.actionDangerDefaultBackgroundHover,
|
|
1153
1460
|
borderColor: theme.colors.actionDangerDefaultBorderHover,
|
|
@@ -1164,10 +1471,13 @@ function getSecondaryDangerStyles(theme) {
|
|
|
1164
1471
|
};
|
|
1165
1472
|
}
|
|
1166
1473
|
function getDisabledStyles(theme) {
|
|
1167
|
-
|
|
1474
|
+
const defaultStyles = {
|
|
1168
1475
|
backgroundColor: theme.colors.actionDisabledBackground,
|
|
1169
1476
|
borderColor: 'transparent',
|
|
1170
|
-
color: theme.colors.actionDisabledText
|
|
1477
|
+
color: theme.colors.actionDisabledText
|
|
1478
|
+
};
|
|
1479
|
+
return {
|
|
1480
|
+
...defaultStyles,
|
|
1171
1481
|
'&:hover': {
|
|
1172
1482
|
backgroundColor: theme.colors.actionDisabledBackground,
|
|
1173
1483
|
borderColor: 'transparent',
|
|
@@ -1181,10 +1491,13 @@ function getDisabledStyles(theme) {
|
|
|
1181
1491
|
};
|
|
1182
1492
|
}
|
|
1183
1493
|
function getDisabledTertiaryStyles(theme) {
|
|
1184
|
-
|
|
1494
|
+
const defaultStyles = {
|
|
1185
1495
|
backgroundColor: theme.colors.actionTertiaryBackgroundDefault,
|
|
1186
1496
|
borderColor: 'transparent',
|
|
1187
|
-
color: theme.colors.actionDisabledText
|
|
1497
|
+
color: theme.colors.actionDisabledText
|
|
1498
|
+
};
|
|
1499
|
+
return {
|
|
1500
|
+
...defaultStyles,
|
|
1188
1501
|
'&:hover': {
|
|
1189
1502
|
backgroundColor: theme.colors.actionTertiaryBackgroundDefault,
|
|
1190
1503
|
borderColor: 'transparent',
|
|
@@ -1266,7 +1579,7 @@ const getButtonEmotionStyles = _ref => {
|
|
|
1266
1579
|
})
|
|
1267
1580
|
};
|
|
1268
1581
|
const inactiveIconCss = {
|
|
1269
|
-
color: theme.colors.
|
|
1582
|
+
color: theme.colors.textSecondary
|
|
1270
1583
|
};
|
|
1271
1584
|
const endIconCssSelector = `span > ${clsEndIcon} > ${clsIcon}`;
|
|
1272
1585
|
const styles = {
|
|
@@ -1306,7 +1619,7 @@ const getButtonEmotionStyles = _ref => {
|
|
|
1306
1619
|
outlineOffset: '1px',
|
|
1307
1620
|
outlineColor: theme.isDarkMode ? theme.colors.actionDefaultBorderFocus : theme.colors.primary
|
|
1308
1621
|
},
|
|
1309
|
-
...getDefaultStyles(theme),
|
|
1622
|
+
...getDefaultStyles(theme, loading),
|
|
1310
1623
|
[`&${classPrimary}`]: {
|
|
1311
1624
|
...getPrimaryStyles(theme)
|
|
1312
1625
|
},
|
|
@@ -1340,11 +1653,15 @@ const getButtonEmotionStyles = _ref => {
|
|
|
1340
1653
|
}
|
|
1341
1654
|
})
|
|
1342
1655
|
},
|
|
1656
|
+
[clsLoadingIcon]: {
|
|
1657
|
+
display: 'none'
|
|
1658
|
+
},
|
|
1343
1659
|
// Loading styles
|
|
1344
1660
|
...(loading && {
|
|
1345
1661
|
'::before': {
|
|
1346
1662
|
opacity: 0
|
|
1347
1663
|
},
|
|
1664
|
+
cursor: 'default',
|
|
1348
1665
|
[`${clsLoadingIcon}`]: {
|
|
1349
1666
|
...(onlyIcon ? {
|
|
1350
1667
|
// In case of only icon, the icon is already centered but vertically not aligned, this fixes that
|
|
@@ -1373,7 +1690,7 @@ const getButtonEmotionStyles = _ref => {
|
|
|
1373
1690
|
visibility: 'hidden',
|
|
1374
1691
|
// Add horizontal space for icon
|
|
1375
1692
|
...(withIcon && {
|
|
1376
|
-
paddingLeft: theme.
|
|
1693
|
+
paddingLeft: theme.general.iconFontSize + theme.spacing.xs
|
|
1377
1694
|
})
|
|
1378
1695
|
}
|
|
1379
1696
|
}),
|
|
@@ -1407,7 +1724,12 @@ const getButtonEmotionStyles = _ref => {
|
|
|
1407
1724
|
},
|
|
1408
1725
|
'&:active > .anticon': {
|
|
1409
1726
|
color: tertiaryColors['&:active'].color
|
|
1410
|
-
}
|
|
1727
|
+
},
|
|
1728
|
+
...(loading && {
|
|
1729
|
+
'&&, &:hover, &:active': {
|
|
1730
|
+
backgroundColor: 'transparent'
|
|
1731
|
+
}
|
|
1732
|
+
})
|
|
1411
1733
|
},
|
|
1412
1734
|
[`&:enabled:not(${classLink}) > .anticon`]: {
|
|
1413
1735
|
color: theme.colors.textSecondary
|
|
@@ -1419,6 +1741,11 @@ const getButtonEmotionStyles = _ref => {
|
|
|
1419
1741
|
color: theme.colors.actionDisabledText
|
|
1420
1742
|
}
|
|
1421
1743
|
}),
|
|
1744
|
+
...(loading && {
|
|
1745
|
+
'&&, &:hover, &:active': {
|
|
1746
|
+
backgroundColor: 'transparent'
|
|
1747
|
+
}
|
|
1748
|
+
}),
|
|
1422
1749
|
'&[disabled]:hover': {
|
|
1423
1750
|
backgroundColor: 'transparent'
|
|
1424
1751
|
}
|
|
@@ -1441,6 +1768,16 @@ const getButtonEmotionStyles = _ref => {
|
|
|
1441
1768
|
padding: '0 6px',
|
|
1442
1769
|
lineHeight: theme.typography.lineHeightSm,
|
|
1443
1770
|
color: theme.colors.textSecondary,
|
|
1771
|
+
...(loading && {
|
|
1772
|
+
'&&, &:hover, &:active': {
|
|
1773
|
+
backgroundColor: 'transparent',
|
|
1774
|
+
borderColor: theme.colors.actionDefaultBorderDefault
|
|
1775
|
+
},
|
|
1776
|
+
'&[disabled], &[disabled]:hover, &[disabled]:active': {
|
|
1777
|
+
backgroundColor: 'transparent',
|
|
1778
|
+
borderColor: 'transparent'
|
|
1779
|
+
}
|
|
1780
|
+
}),
|
|
1444
1781
|
'& > span': {
|
|
1445
1782
|
verticalAlign: -1,
|
|
1446
1783
|
height: theme.general.heightSm / 2,
|
|
@@ -1477,9 +1814,13 @@ const Button = /* #__PURE__ */(() => {
|
|
|
1477
1814
|
children,
|
|
1478
1815
|
size,
|
|
1479
1816
|
type,
|
|
1817
|
+
loading,
|
|
1818
|
+
loadingDescription = 'Button',
|
|
1480
1819
|
endIcon,
|
|
1820
|
+
onClick,
|
|
1481
1821
|
dangerouslySetForceIconStyles,
|
|
1482
1822
|
dangerouslyUseFocusPseudoClass,
|
|
1823
|
+
dangerouslyAppendWrapperCss,
|
|
1483
1824
|
...props
|
|
1484
1825
|
} = _ref2;
|
|
1485
1826
|
const {
|
|
@@ -1490,15 +1831,58 @@ const Button = /* #__PURE__ */(() => {
|
|
|
1490
1831
|
USE_FLEX_BUTTON: isFlex
|
|
1491
1832
|
} = useDesignSystemFlags();
|
|
1492
1833
|
const clsEndIcon = getEndIconClsName(theme);
|
|
1834
|
+
const loadingCls = `${classNamePrefix}-btn-loading-icon`;
|
|
1835
|
+
const buttonRef = useRef(null);
|
|
1836
|
+
useImperativeHandle(ref, () => buttonRef.current);
|
|
1837
|
+
|
|
1838
|
+
// Needed to keep backwards compatibility and support existing unit tests
|
|
1839
|
+
useEffect(() => {
|
|
1840
|
+
if (buttonRef.current) {
|
|
1841
|
+
if (loading) {
|
|
1842
|
+
buttonRef.current.setAttribute('loading', 'true');
|
|
1843
|
+
buttonRef.current.classList.add(`${classNamePrefix}-btn-loading`);
|
|
1844
|
+
} else {
|
|
1845
|
+
buttonRef.current.setAttribute('loading', 'false');
|
|
1846
|
+
buttonRef.current.classList.remove(`${classNamePrefix}-btn-loading`);
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
}, [loading, classNamePrefix]);
|
|
1850
|
+
const iconOnly = Boolean((props.icon || endIcon) && !children);
|
|
1851
|
+
const handleClick = event => {
|
|
1852
|
+
if (loading) {
|
|
1853
|
+
return;
|
|
1854
|
+
}
|
|
1855
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
1856
|
+
};
|
|
1857
|
+
const loadingSpinner = jsx(Spinner, {
|
|
1858
|
+
className: loadingCls,
|
|
1859
|
+
animationDuration: 8,
|
|
1860
|
+
inheritColor: true,
|
|
1861
|
+
label: "loading",
|
|
1862
|
+
"aria-label": "loading",
|
|
1863
|
+
loadingDescription: loadingDescription,
|
|
1864
|
+
css: /*#__PURE__*/css({
|
|
1865
|
+
color: 'inherit !important',
|
|
1866
|
+
pointerEvents: 'none',
|
|
1867
|
+
...(!iconOnly && !dangerouslySetForceIconStyles && {
|
|
1868
|
+
'.anticon': {
|
|
1869
|
+
verticalAlign: '-0.2em'
|
|
1870
|
+
}
|
|
1871
|
+
}),
|
|
1872
|
+
'[aria-hidden="true"]': {
|
|
1873
|
+
display: 'inline'
|
|
1874
|
+
}
|
|
1875
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:loadingSpinner;")
|
|
1876
|
+
});
|
|
1493
1877
|
return jsx(DesignSystemAntDConfigProvider, {
|
|
1494
1878
|
children: jsx(Button$1, {
|
|
1495
1879
|
...props,
|
|
1496
1880
|
css: getButtonEmotionStyles({
|
|
1497
1881
|
theme,
|
|
1498
1882
|
classNamePrefix,
|
|
1499
|
-
loading: Boolean(
|
|
1883
|
+
loading: Boolean(loading),
|
|
1500
1884
|
withIcon: Boolean(props.icon),
|
|
1501
|
-
onlyIcon:
|
|
1885
|
+
onlyIcon: iconOnly,
|
|
1502
1886
|
isAnchor: Boolean(props.href && !type),
|
|
1503
1887
|
danger: Boolean(props.danger),
|
|
1504
1888
|
enableAnimation: theme.options.enableAnimation,
|
|
@@ -1510,15 +1894,18 @@ const Button = /* #__PURE__ */(() => {
|
|
|
1510
1894
|
}),
|
|
1511
1895
|
href: props.disabled ? undefined : props.href,
|
|
1512
1896
|
...dangerouslySetAntdProps,
|
|
1513
|
-
|
|
1897
|
+
onClick: handleClick,
|
|
1898
|
+
icon: loading ? loadingSpinner : props.icon,
|
|
1899
|
+
ref: buttonRef,
|
|
1514
1900
|
type: type === 'tertiary' ? 'link' : type,
|
|
1515
1901
|
children: children && jsxs("span", {
|
|
1516
1902
|
style: {
|
|
1517
|
-
visibility:
|
|
1903
|
+
visibility: loading ? 'hidden' : 'visible',
|
|
1518
1904
|
...(isFlex && {
|
|
1519
1905
|
display: 'inline-flex',
|
|
1520
1906
|
alignItems: 'center'
|
|
1521
|
-
})
|
|
1907
|
+
}),
|
|
1908
|
+
...dangerouslyAppendWrapperCss
|
|
1522
1909
|
},
|
|
1523
1910
|
children: [children, endIcon && jsx("span", {
|
|
1524
1911
|
className: clsEndIcon,
|
|
@@ -1543,6 +1930,87 @@ const Button = /* #__PURE__ */(() => {
|
|
|
1543
1930
|
return Button;
|
|
1544
1931
|
})();
|
|
1545
1932
|
|
|
1933
|
+
function useUniqueId(prefix) {
|
|
1934
|
+
return useMemo(() => _uniqueId(prefix), [prefix]);
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
const Tooltip = _ref => {
|
|
1938
|
+
let {
|
|
1939
|
+
children,
|
|
1940
|
+
title,
|
|
1941
|
+
placement = 'top',
|
|
1942
|
+
dataTestId,
|
|
1943
|
+
dangerouslySetAntdProps,
|
|
1944
|
+
silenceScreenReader = false,
|
|
1945
|
+
useAsLabel = false,
|
|
1946
|
+
...props
|
|
1947
|
+
} = _ref;
|
|
1948
|
+
const {
|
|
1949
|
+
theme
|
|
1950
|
+
} = useDesignSystemTheme();
|
|
1951
|
+
const id = useUniqueId('dubois-tooltip-component-');
|
|
1952
|
+
if (!title) {
|
|
1953
|
+
return jsx(React__default.Fragment, {
|
|
1954
|
+
children: children
|
|
1955
|
+
});
|
|
1956
|
+
}
|
|
1957
|
+
const titleProps = silenceScreenReader ? {} : {
|
|
1958
|
+
'aria-live': 'polite',
|
|
1959
|
+
'aria-relevant': 'additions'
|
|
1960
|
+
};
|
|
1961
|
+
if (dataTestId) {
|
|
1962
|
+
// TODO FEINF-1337 - this should turn into data-testid
|
|
1963
|
+
titleProps['data-test-id'] = dataTestId;
|
|
1964
|
+
}
|
|
1965
|
+
const liveTitle = title && /*#__PURE__*/React__default.isValidElement(title) ? /*#__PURE__*/React__default.cloneElement(title, titleProps) : jsx("span", {
|
|
1966
|
+
...titleProps,
|
|
1967
|
+
children: title
|
|
1968
|
+
});
|
|
1969
|
+
const ariaProps = {
|
|
1970
|
+
[useAsLabel ? 'aria-labelledby' : 'aria-describedby']: id,
|
|
1971
|
+
'aria-hidden': false
|
|
1972
|
+
};
|
|
1973
|
+
const childWithProps = /*#__PURE__*/React__default.isValidElement(children) ? /*#__PURE__*/React__default.cloneElement(children, {
|
|
1974
|
+
...ariaProps,
|
|
1975
|
+
...children.props
|
|
1976
|
+
}) : _isNil(children) ? children : jsx("span", {
|
|
1977
|
+
...ariaProps,
|
|
1978
|
+
children: children
|
|
1979
|
+
});
|
|
1980
|
+
const {
|
|
1981
|
+
overlayInnerStyle,
|
|
1982
|
+
overlayStyle,
|
|
1983
|
+
...delegatedDangerouslySetAntdProps
|
|
1984
|
+
} = dangerouslySetAntdProps || {};
|
|
1985
|
+
return jsx(DesignSystemAntDConfigProvider, {
|
|
1986
|
+
children: jsx(Tooltip$1, {
|
|
1987
|
+
id: id,
|
|
1988
|
+
title: liveTitle,
|
|
1989
|
+
placement: placement
|
|
1990
|
+
// Always trigger on hover and focus
|
|
1991
|
+
,
|
|
1992
|
+
trigger: ['hover', 'focus'],
|
|
1993
|
+
overlayInnerStyle: {
|
|
1994
|
+
backgroundColor: '#2F3941',
|
|
1995
|
+
lineHeight: '22px',
|
|
1996
|
+
padding: '4px 8px',
|
|
1997
|
+
boxShadow: theme.general.shadowLow,
|
|
1998
|
+
...overlayInnerStyle
|
|
1999
|
+
},
|
|
2000
|
+
overlayStyle: {
|
|
2001
|
+
zIndex: theme.options.zIndexBase + 70,
|
|
2002
|
+
...overlayStyle
|
|
2003
|
+
},
|
|
2004
|
+
css: /*#__PURE__*/css({
|
|
2005
|
+
...getAnimationCss(theme.options.enableAnimation)
|
|
2006
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:Tooltip;"),
|
|
2007
|
+
...delegatedDangerouslySetAntdProps,
|
|
2008
|
+
...props,
|
|
2009
|
+
children: childWithProps
|
|
2010
|
+
})
|
|
2011
|
+
});
|
|
2012
|
+
};
|
|
2013
|
+
|
|
1546
2014
|
const getInputEmotionStyles = (clsPrefix, theme, _ref, useTransparent) => {
|
|
1547
2015
|
let {
|
|
1548
2016
|
validationState
|
|
@@ -1575,6 +2043,9 @@ const getInputEmotionStyles = (clsPrefix, theme, _ref, useTransparent) => {
|
|
|
1575
2043
|
'&:disabled': {
|
|
1576
2044
|
backgroundColor: theme.colors.actionDisabledBackground,
|
|
1577
2045
|
color: theme.colors.actionDisabledText
|
|
2046
|
+
},
|
|
2047
|
+
'&::placeholder': {
|
|
2048
|
+
color: theme.colors.textPlaceholder
|
|
1578
2049
|
}
|
|
1579
2050
|
},
|
|
1580
2051
|
[`&${inputClass}, ${inputClass}`]: {
|
|
@@ -1744,7 +2215,7 @@ const DuboisInput = /*#__PURE__*/forwardRef(function Input(_ref4, ref) {
|
|
|
1744
2215
|
})
|
|
1745
2216
|
});
|
|
1746
2217
|
});
|
|
1747
|
-
const Group = _ref5 => {
|
|
2218
|
+
const Group$1 = _ref5 => {
|
|
1748
2219
|
let {
|
|
1749
2220
|
dangerouslySetAntdProps,
|
|
1750
2221
|
dangerouslyAppendEmotionCSS,
|
|
@@ -1769,7 +2240,7 @@ const Group = _ref5 => {
|
|
|
1769
2240
|
const InputNamespace = /* #__PURE__ */Object.assign(DuboisInput, {
|
|
1770
2241
|
TextArea,
|
|
1771
2242
|
Password,
|
|
1772
|
-
Group
|
|
2243
|
+
Group: Group$1
|
|
1773
2244
|
});
|
|
1774
2245
|
const Input = InputNamespace;
|
|
1775
2246
|
|
|
@@ -1778,9 +2249,49 @@ const Input = InputNamespace;
|
|
|
1778
2249
|
// since these will be exposed in the library's exports.
|
|
1779
2250
|
const __INTERNAL_DO_NOT_USE__TextArea = TextArea;
|
|
1780
2251
|
const __INTERNAL_DO_NOT_USE__Password = Password;
|
|
1781
|
-
const __INTERNAL_DO_NOT_USE_DEDUPE__Group = Group;
|
|
2252
|
+
const __INTERNAL_DO_NOT_USE_DEDUPE__Group = Group$1;
|
|
2253
|
+
|
|
2254
|
+
const {
|
|
2255
|
+
Text: AntDText$1
|
|
2256
|
+
} = Typography$1;
|
|
2257
|
+
function getTextEmotionStyles$1(theme, props) {
|
|
2258
|
+
return /*#__PURE__*/css({
|
|
2259
|
+
'&&': {
|
|
2260
|
+
display: 'block',
|
|
2261
|
+
fontSize: theme.typography.fontSizeSm,
|
|
2262
|
+
lineHeight: theme.typography.lineHeightSm,
|
|
2263
|
+
color: theme.colors.textSecondary,
|
|
2264
|
+
...(props.withoutMargins && {
|
|
2265
|
+
'&&': {
|
|
2266
|
+
marginTop: 0,
|
|
2267
|
+
marginBottom: 0
|
|
2268
|
+
}
|
|
2269
|
+
})
|
|
2270
|
+
}
|
|
2271
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:getTextEmotionStyles;");
|
|
2272
|
+
}
|
|
2273
|
+
function Hint(userProps) {
|
|
2274
|
+
const {
|
|
2275
|
+
dangerouslySetAntdProps,
|
|
2276
|
+
bold,
|
|
2277
|
+
withoutMargins,
|
|
2278
|
+
color,
|
|
2279
|
+
...props
|
|
2280
|
+
} = userProps;
|
|
2281
|
+
const {
|
|
2282
|
+
theme
|
|
2283
|
+
} = useDesignSystemTheme();
|
|
2284
|
+
return jsx(DesignSystemAntDConfigProvider, {
|
|
2285
|
+
children: jsx(AntDText$1, {
|
|
2286
|
+
...props,
|
|
2287
|
+
css: getTextEmotionStyles$1(theme, userProps),
|
|
2288
|
+
...dangerouslySetAntdProps
|
|
2289
|
+
})
|
|
2290
|
+
});
|
|
2291
|
+
}
|
|
1782
2292
|
|
|
1783
2293
|
const getLinkStyles = (theme, clsPrefix) => {
|
|
2294
|
+
const centerIcons = safex('databricks.fe.designsystem.centerIconsInText', false);
|
|
1784
2295
|
const classTypography = `.${clsPrefix}-typography`;
|
|
1785
2296
|
const styles = {
|
|
1786
2297
|
[`&${classTypography}, &${classTypography}:focus`]: {
|
|
@@ -1798,7 +2309,10 @@ const getLinkStyles = (theme, clsPrefix) => {
|
|
|
1798
2309
|
textDecoration: 'underline'
|
|
1799
2310
|
},
|
|
1800
2311
|
'.anticon': {
|
|
1801
|
-
fontSize: 12
|
|
2312
|
+
fontSize: 12,
|
|
2313
|
+
...(centerIcons ? {
|
|
2314
|
+
verticalAlign: 'baseline'
|
|
2315
|
+
} : {})
|
|
1802
2316
|
}
|
|
1803
2317
|
};
|
|
1804
2318
|
return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getLinkStyles;");
|
|
@@ -1876,12 +2390,18 @@ const {
|
|
|
1876
2390
|
Paragraph: AntDParagraph
|
|
1877
2391
|
} = Typography$1;
|
|
1878
2392
|
function getParagraphEmotionStyles(theme, props) {
|
|
2393
|
+
const centerIcons = safex('databricks.fe.designsystem.centerIconsInText', false);
|
|
1879
2394
|
return /*#__PURE__*/css({
|
|
1880
2395
|
'&&': {
|
|
1881
2396
|
fontSize: theme.typography.fontSizeBase,
|
|
1882
2397
|
lineHeight: theme.typography.lineHeightBase,
|
|
1883
2398
|
color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
|
|
1884
|
-
}
|
|
2399
|
+
},
|
|
2400
|
+
...(centerIcons && {
|
|
2401
|
+
'& .anticon': {
|
|
2402
|
+
verticalAlign: 'text-bottom'
|
|
2403
|
+
}
|
|
2404
|
+
})
|
|
1885
2405
|
}, props.disabled && {
|
|
1886
2406
|
'&&': {
|
|
1887
2407
|
color: theme.colors.actionDisabledText
|
|
@@ -1917,6 +2437,7 @@ const {
|
|
|
1917
2437
|
Text: AntDText
|
|
1918
2438
|
} = Typography$1;
|
|
1919
2439
|
function getTextEmotionStyles(theme, props) {
|
|
2440
|
+
const centerIcons = safex('databricks.fe.designsystem.centerIconsInText', false);
|
|
1920
2441
|
return /*#__PURE__*/css({
|
|
1921
2442
|
'&&': {
|
|
1922
2443
|
fontSize: theme.typography.fontSizeBase,
|
|
@@ -1955,28 +2476,48 @@ function getTextEmotionStyles(theme, props) {
|
|
|
1955
2476
|
case 'xxl':
|
|
1956
2477
|
return {
|
|
1957
2478
|
fontSize: theme.typography.fontSizeXxl,
|
|
1958
|
-
lineHeight: theme.typography.lineHeightXxl
|
|
2479
|
+
lineHeight: theme.typography.lineHeightXxl,
|
|
2480
|
+
...(centerIcons && {
|
|
2481
|
+
'& .anticon': {
|
|
2482
|
+
lineHeight: theme.typography.lineHeightXxl,
|
|
2483
|
+
verticalAlign: 'middle'
|
|
2484
|
+
}
|
|
2485
|
+
})
|
|
1959
2486
|
};
|
|
1960
2487
|
case 'xl':
|
|
1961
2488
|
return {
|
|
1962
2489
|
fontSize: theme.typography.fontSizeXl,
|
|
1963
|
-
lineHeight: theme.typography.lineHeightXl
|
|
2490
|
+
lineHeight: theme.typography.lineHeightXl,
|
|
2491
|
+
...(centerIcons && {
|
|
2492
|
+
'& .anticon': {
|
|
2493
|
+
lineHeight: theme.typography.lineHeightXl,
|
|
2494
|
+
verticalAlign: 'middle'
|
|
2495
|
+
}
|
|
2496
|
+
})
|
|
1964
2497
|
};
|
|
1965
2498
|
case 'lg':
|
|
1966
2499
|
return {
|
|
1967
2500
|
fontSize: theme.typography.fontSizeLg,
|
|
1968
|
-
lineHeight: theme.typography.lineHeightLg
|
|
2501
|
+
lineHeight: theme.typography.lineHeightLg,
|
|
2502
|
+
...(centerIcons && {
|
|
2503
|
+
'& .anticon': {
|
|
2504
|
+
lineHeight: theme.typography.lineHeightLg,
|
|
2505
|
+
verticalAlign: 'middle'
|
|
2506
|
+
}
|
|
2507
|
+
})
|
|
1969
2508
|
};
|
|
1970
2509
|
case 'sm':
|
|
1971
2510
|
return {
|
|
1972
2511
|
fontSize: theme.typography.fontSizeSm,
|
|
1973
|
-
lineHeight: theme.typography.lineHeightSm
|
|
2512
|
+
lineHeight: theme.typography.lineHeightSm,
|
|
2513
|
+
...(centerIcons && {
|
|
2514
|
+
'& .anticon': {
|
|
2515
|
+
verticalAlign: '-0.219em'
|
|
2516
|
+
}
|
|
2517
|
+
})
|
|
1974
2518
|
};
|
|
1975
2519
|
default:
|
|
1976
|
-
return {
|
|
1977
|
-
fontSize: theme.typography.fontSizeMd,
|
|
1978
|
-
lineHeight: theme.typography.lineHeightMd
|
|
1979
|
-
};
|
|
2520
|
+
return {};
|
|
1980
2521
|
}
|
|
1981
2522
|
})()
|
|
1982
2523
|
}, props.withoutMargins && {
|
|
@@ -2013,6 +2554,7 @@ const {
|
|
|
2013
2554
|
Title: AntDTitle
|
|
2014
2555
|
} = Typography$1;
|
|
2015
2556
|
function getLevelStyles(theme, props) {
|
|
2557
|
+
const centerIcons = safex('databricks.fe.designsystem.centerIconsInText', false);
|
|
2016
2558
|
switch (props.level) {
|
|
2017
2559
|
case 1:
|
|
2018
2560
|
return /*#__PURE__*/css({
|
|
@@ -2020,7 +2562,12 @@ function getLevelStyles(theme, props) {
|
|
|
2020
2562
|
fontSize: theme.typography.fontSizeXxl,
|
|
2021
2563
|
lineHeight: theme.typography.lineHeightXxl,
|
|
2022
2564
|
fontWeight: theme.typography.typographyBoldFontWeight
|
|
2023
|
-
}
|
|
2565
|
+
},
|
|
2566
|
+
...(centerIcons && {
|
|
2567
|
+
'& > .anticon': {
|
|
2568
|
+
lineHeight: theme.typography.lineHeightXxl
|
|
2569
|
+
}
|
|
2570
|
+
})
|
|
2024
2571
|
}, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
|
|
2025
2572
|
case 2:
|
|
2026
2573
|
return /*#__PURE__*/css({
|
|
@@ -2028,7 +2575,12 @@ function getLevelStyles(theme, props) {
|
|
|
2028
2575
|
fontSize: theme.typography.fontSizeXl,
|
|
2029
2576
|
lineHeight: theme.typography.lineHeightXl,
|
|
2030
2577
|
fontWeight: theme.typography.typographyBoldFontWeight
|
|
2031
|
-
}
|
|
2578
|
+
},
|
|
2579
|
+
...(centerIcons && {
|
|
2580
|
+
'& > .anticon': {
|
|
2581
|
+
lineHeight: theme.typography.lineHeightXl
|
|
2582
|
+
}
|
|
2583
|
+
})
|
|
2032
2584
|
}, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
|
|
2033
2585
|
case 3:
|
|
2034
2586
|
return /*#__PURE__*/css({
|
|
@@ -2036,7 +2588,12 @@ function getLevelStyles(theme, props) {
|
|
|
2036
2588
|
fontSize: theme.typography.fontSizeLg,
|
|
2037
2589
|
lineHeight: theme.typography.lineHeightLg,
|
|
2038
2590
|
fontWeight: theme.typography.typographyBoldFontWeight
|
|
2039
|
-
}
|
|
2591
|
+
},
|
|
2592
|
+
...(centerIcons && {
|
|
2593
|
+
'& > .anticon': {
|
|
2594
|
+
lineHeight: theme.typography.lineHeightLg
|
|
2595
|
+
}
|
|
2596
|
+
})
|
|
2040
2597
|
}, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
|
|
2041
2598
|
case 4:
|
|
2042
2599
|
default:
|
|
@@ -2045,15 +2602,26 @@ function getLevelStyles(theme, props) {
|
|
|
2045
2602
|
fontSize: theme.typography.fontSizeMd,
|
|
2046
2603
|
lineHeight: theme.typography.lineHeightMd,
|
|
2047
2604
|
fontWeight: theme.typography.typographyBoldFontWeight
|
|
2048
|
-
}
|
|
2605
|
+
},
|
|
2606
|
+
...(centerIcons && {
|
|
2607
|
+
'& > .anticon': {
|
|
2608
|
+
lineHeight: theme.typography.lineHeightMd
|
|
2609
|
+
}
|
|
2610
|
+
})
|
|
2049
2611
|
}, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
|
|
2050
2612
|
}
|
|
2051
2613
|
}
|
|
2052
2614
|
function getTitleEmotionStyles(theme, props) {
|
|
2615
|
+
const centerIcons = safex('databricks.fe.designsystem.centerIconsInText', false);
|
|
2053
2616
|
return /*#__PURE__*/css(getLevelStyles(theme, props), {
|
|
2054
2617
|
'&&': {
|
|
2055
2618
|
color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
|
|
2056
|
-
}
|
|
2619
|
+
},
|
|
2620
|
+
...(centerIcons && {
|
|
2621
|
+
'& > .anticon': {
|
|
2622
|
+
verticalAlign: 'middle'
|
|
2623
|
+
}
|
|
2624
|
+
})
|
|
2057
2625
|
}, props.withoutMargins && {
|
|
2058
2626
|
'&&': {
|
|
2059
2627
|
marginTop: '0 !important',
|
|
@@ -2099,8 +2667,465 @@ const Typography = /* #__PURE__ */(() => {
|
|
|
2099
2667
|
Typography.Title = Title;
|
|
2100
2668
|
Typography.Paragraph = Paragraph;
|
|
2101
2669
|
Typography.Link = Link;
|
|
2670
|
+
Typography.Hint = Hint;
|
|
2102
2671
|
return Typography;
|
|
2103
2672
|
})();
|
|
2104
2673
|
|
|
2105
|
-
|
|
2106
|
-
|
|
2674
|
+
const Root = DropdownMenu$1.Root; // Behavioral component only
|
|
2675
|
+
|
|
2676
|
+
const Content = /*#__PURE__*/forwardRef(function Content(_ref, ref) {
|
|
2677
|
+
let {
|
|
2678
|
+
children,
|
|
2679
|
+
minWidth = 220,
|
|
2680
|
+
...props
|
|
2681
|
+
} = _ref;
|
|
2682
|
+
const {
|
|
2683
|
+
getPopupContainer
|
|
2684
|
+
} = useDesignSystemContext();
|
|
2685
|
+
return jsx(DropdownMenu$1.Portal, {
|
|
2686
|
+
container: getPopupContainer && getPopupContainer(),
|
|
2687
|
+
children: jsx(DropdownMenu$1.Content, {
|
|
2688
|
+
ref: ref,
|
|
2689
|
+
loop: true,
|
|
2690
|
+
css: [contentStyles, {
|
|
2691
|
+
minWidth
|
|
2692
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:Content;"],
|
|
2693
|
+
sideOffset: 4,
|
|
2694
|
+
align: "start",
|
|
2695
|
+
...props,
|
|
2696
|
+
children: children
|
|
2697
|
+
})
|
|
2698
|
+
});
|
|
2699
|
+
});
|
|
2700
|
+
const SubContent = /*#__PURE__*/forwardRef(function Content(_ref2, ref) {
|
|
2701
|
+
let {
|
|
2702
|
+
children,
|
|
2703
|
+
minWidth = 220,
|
|
2704
|
+
...props
|
|
2705
|
+
} = _ref2;
|
|
2706
|
+
const {
|
|
2707
|
+
getPopupContainer
|
|
2708
|
+
} = useDesignSystemContext();
|
|
2709
|
+
return jsx(DropdownMenu$1.Portal, {
|
|
2710
|
+
container: getPopupContainer && getPopupContainer(),
|
|
2711
|
+
children: jsx(DropdownMenu$1.SubContent, {
|
|
2712
|
+
ref: ref,
|
|
2713
|
+
loop: true,
|
|
2714
|
+
css: [contentStyles, {
|
|
2715
|
+
minWidth
|
|
2716
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:SubContent;"],
|
|
2717
|
+
sideOffset: -2,
|
|
2718
|
+
alignOffset: -5,
|
|
2719
|
+
...props,
|
|
2720
|
+
children: children
|
|
2721
|
+
})
|
|
2722
|
+
});
|
|
2723
|
+
});
|
|
2724
|
+
const Trigger = /*#__PURE__*/forwardRef(function Trigger(_ref3, ref) {
|
|
2725
|
+
let {
|
|
2726
|
+
children,
|
|
2727
|
+
...props
|
|
2728
|
+
} = _ref3;
|
|
2729
|
+
return jsx(DropdownMenu$1.Trigger, {
|
|
2730
|
+
ref: ref,
|
|
2731
|
+
...props,
|
|
2732
|
+
children: children
|
|
2733
|
+
});
|
|
2734
|
+
});
|
|
2735
|
+
const Item = /*#__PURE__*/forwardRef(function Item(_ref4, ref) {
|
|
2736
|
+
let {
|
|
2737
|
+
children,
|
|
2738
|
+
disabledReason,
|
|
2739
|
+
danger,
|
|
2740
|
+
onClick,
|
|
2741
|
+
...props
|
|
2742
|
+
} = _ref4;
|
|
2743
|
+
const itemRef = useRef(null);
|
|
2744
|
+
useImperativeHandle(ref, () => itemRef.current);
|
|
2745
|
+
return jsx(DropdownMenu$1.Item, {
|
|
2746
|
+
css: theme => [dropdownItemStyles, danger && dangerItemStyles(theme)],
|
|
2747
|
+
ref: itemRef,
|
|
2748
|
+
onClick: e => {
|
|
2749
|
+
if (props.disabled) {
|
|
2750
|
+
e.preventDefault();
|
|
2751
|
+
} else {
|
|
2752
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
2753
|
+
}
|
|
2754
|
+
},
|
|
2755
|
+
...props,
|
|
2756
|
+
children: getNewChildren(children, props, disabledReason, itemRef)
|
|
2757
|
+
});
|
|
2758
|
+
});
|
|
2759
|
+
const Label = /*#__PURE__*/forwardRef(function Label(_ref5, ref) {
|
|
2760
|
+
let {
|
|
2761
|
+
children,
|
|
2762
|
+
...props
|
|
2763
|
+
} = _ref5;
|
|
2764
|
+
return jsx(DropdownMenu$1.Label, {
|
|
2765
|
+
ref: ref,
|
|
2766
|
+
css: [dropdownItemStyles, theme => ({
|
|
2767
|
+
color: theme.colors.textSecondary,
|
|
2768
|
+
'&:hover': {
|
|
2769
|
+
cursor: 'default'
|
|
2770
|
+
}
|
|
2771
|
+
}), process.env.NODE_ENV === "production" ? "" : ";label:Label;"],
|
|
2772
|
+
...props,
|
|
2773
|
+
children: children
|
|
2774
|
+
});
|
|
2775
|
+
});
|
|
2776
|
+
const Separator = /*#__PURE__*/forwardRef(function Separator(_ref6, ref) {
|
|
2777
|
+
let {
|
|
2778
|
+
children,
|
|
2779
|
+
...props
|
|
2780
|
+
} = _ref6;
|
|
2781
|
+
return jsx(DropdownMenu$1.Separator, {
|
|
2782
|
+
ref: ref,
|
|
2783
|
+
css: dropdownSeparatorStyles,
|
|
2784
|
+
...props,
|
|
2785
|
+
children: children
|
|
2786
|
+
});
|
|
2787
|
+
});
|
|
2788
|
+
const SubTrigger = /*#__PURE__*/forwardRef(function TriggerItem(_ref7, ref) {
|
|
2789
|
+
let {
|
|
2790
|
+
children,
|
|
2791
|
+
disabledReason,
|
|
2792
|
+
...props
|
|
2793
|
+
} = _ref7;
|
|
2794
|
+
const subTriggerRef = useRef(null);
|
|
2795
|
+
useImperativeHandle(ref, () => subTriggerRef.current);
|
|
2796
|
+
return jsxs(DropdownMenu$1.SubTrigger, {
|
|
2797
|
+
ref: subTriggerRef,
|
|
2798
|
+
css: [dropdownItemStyles, theme => ({
|
|
2799
|
+
'&[data-state="open"]': {
|
|
2800
|
+
backgroundColor: theme.colors.actionTertiaryBackgroundHover
|
|
2801
|
+
}
|
|
2802
|
+
}), process.env.NODE_ENV === "production" ? "" : ";label:SubTrigger;"],
|
|
2803
|
+
...props,
|
|
2804
|
+
children: [getNewChildren(children, props, disabledReason, subTriggerRef), jsx(HintColumn, {
|
|
2805
|
+
css: theme => ({
|
|
2806
|
+
margin: CONSTANTS.subMenuIconMargin(theme),
|
|
2807
|
+
display: 'flex',
|
|
2808
|
+
alignSelf: 'stretch',
|
|
2809
|
+
alignItems: 'center'
|
|
2810
|
+
}),
|
|
2811
|
+
children: jsx(ChevronRightIcon, {
|
|
2812
|
+
css: theme => ({
|
|
2813
|
+
fontSize: CONSTANTS.subMenuIconSize(theme)
|
|
2814
|
+
})
|
|
2815
|
+
})
|
|
2816
|
+
})]
|
|
2817
|
+
});
|
|
2818
|
+
});
|
|
2819
|
+
|
|
2820
|
+
/**
|
|
2821
|
+
* Deprecated. Use `SubTrigger` instead.
|
|
2822
|
+
* @deprecated
|
|
2823
|
+
*/
|
|
2824
|
+
const TriggerItem = SubTrigger;
|
|
2825
|
+
const CheckboxItem = /*#__PURE__*/forwardRef(function CheckboxItem(_ref8, ref) {
|
|
2826
|
+
let {
|
|
2827
|
+
children,
|
|
2828
|
+
disabledReason,
|
|
2829
|
+
...props
|
|
2830
|
+
} = _ref8;
|
|
2831
|
+
const checkboxItemRef = useRef(null);
|
|
2832
|
+
useImperativeHandle(ref, () => checkboxItemRef.current);
|
|
2833
|
+
return jsx(DropdownMenu$1.CheckboxItem, {
|
|
2834
|
+
ref: checkboxItemRef,
|
|
2835
|
+
css: theme => [dropdownItemStyles, checkboxItemStyles(theme)],
|
|
2836
|
+
...props,
|
|
2837
|
+
children: getNewChildren(children, props, disabledReason, checkboxItemRef)
|
|
2838
|
+
});
|
|
2839
|
+
});
|
|
2840
|
+
const ItemIndicator = /*#__PURE__*/forwardRef(function ItemIndicator(_ref9, ref) {
|
|
2841
|
+
let {
|
|
2842
|
+
children,
|
|
2843
|
+
...props
|
|
2844
|
+
} = _ref9;
|
|
2845
|
+
return jsx(DropdownMenu$1.ItemIndicator, {
|
|
2846
|
+
ref: ref,
|
|
2847
|
+
css: theme => ({
|
|
2848
|
+
marginLeft: -(CONSTANTS.checkboxIconWidth(theme) + CONSTANTS.checkboxPaddingRight(theme)),
|
|
2849
|
+
position: 'absolute',
|
|
2850
|
+
fontSize: theme.general.iconFontSize
|
|
2851
|
+
}),
|
|
2852
|
+
...props,
|
|
2853
|
+
children: children !== null && children !== void 0 ? children : jsx(CheckIcon, {
|
|
2854
|
+
css: theme => ({
|
|
2855
|
+
color: theme.colors.textSecondary
|
|
2856
|
+
})
|
|
2857
|
+
})
|
|
2858
|
+
});
|
|
2859
|
+
});
|
|
2860
|
+
const Arrow = /*#__PURE__*/forwardRef(function Arrow(_ref10, ref) {
|
|
2861
|
+
let {
|
|
2862
|
+
children,
|
|
2863
|
+
...props
|
|
2864
|
+
} = _ref10;
|
|
2865
|
+
const {
|
|
2866
|
+
theme
|
|
2867
|
+
} = useDesignSystemTheme();
|
|
2868
|
+
return jsx(DropdownMenu$1.Arrow, {
|
|
2869
|
+
css: /*#__PURE__*/css({
|
|
2870
|
+
fill: theme.colors.backgroundPrimary,
|
|
2871
|
+
stroke: theme.colors.borderDecorative,
|
|
2872
|
+
strokeDashoffset: -CONSTANTS.arrowBottomLength(),
|
|
2873
|
+
strokeDasharray: CONSTANTS.arrowBottomLength() + 2 * CONSTANTS.arrowSide(),
|
|
2874
|
+
strokeWidth: CONSTANTS.arrowStrokeWidth(),
|
|
2875
|
+
// TODO: This is a temporary fix for the alignment of the Arrow;
|
|
2876
|
+
// Radix has changed the implementation for v1.0.0 (uses floating-ui)
|
|
2877
|
+
// which has new behaviors for alignment that we don't want. Generally
|
|
2878
|
+
// we need to fix the arrow to always be aligned to the left of the menu (with
|
|
2879
|
+
// offset equal to border radius)
|
|
2880
|
+
position: 'relative',
|
|
2881
|
+
top: -1
|
|
2882
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:Arrow;"),
|
|
2883
|
+
ref: ref,
|
|
2884
|
+
width: 12,
|
|
2885
|
+
height: 6,
|
|
2886
|
+
...props,
|
|
2887
|
+
children: children
|
|
2888
|
+
});
|
|
2889
|
+
});
|
|
2890
|
+
const RadioItem = /*#__PURE__*/forwardRef(function RadioItem(_ref11, ref) {
|
|
2891
|
+
let {
|
|
2892
|
+
children,
|
|
2893
|
+
disabledReason,
|
|
2894
|
+
...props
|
|
2895
|
+
} = _ref11;
|
|
2896
|
+
const radioItemRef = useRef(null);
|
|
2897
|
+
useImperativeHandle(ref, () => radioItemRef.current);
|
|
2898
|
+
return jsx(DropdownMenu$1.RadioItem, {
|
|
2899
|
+
ref: radioItemRef,
|
|
2900
|
+
css: theme => [dropdownItemStyles, checkboxItemStyles(theme)],
|
|
2901
|
+
...props,
|
|
2902
|
+
children: getNewChildren(children, props, disabledReason, radioItemRef)
|
|
2903
|
+
});
|
|
2904
|
+
});
|
|
2905
|
+
|
|
2906
|
+
// UNWRAPPED RADIX-UI-COMPONENTS
|
|
2907
|
+
const Group = DropdownMenu$1.Group;
|
|
2908
|
+
const RadioGroup = DropdownMenu$1.RadioGroup;
|
|
2909
|
+
const Sub = DropdownMenu$1.Sub;
|
|
2910
|
+
|
|
2911
|
+
// EXTRA COMPONENTS
|
|
2912
|
+
const HintColumn = /*#__PURE__*/forwardRef(function HintColumn(_ref12, ref) {
|
|
2913
|
+
let {
|
|
2914
|
+
children,
|
|
2915
|
+
...props
|
|
2916
|
+
} = _ref12;
|
|
2917
|
+
return jsx("div", {
|
|
2918
|
+
ref: ref,
|
|
2919
|
+
css: [metaTextStyles, "margin-left:auto;" + (process.env.NODE_ENV === "production" ? "" : ";label:HintColumn;")],
|
|
2920
|
+
...props,
|
|
2921
|
+
children: children
|
|
2922
|
+
});
|
|
2923
|
+
});
|
|
2924
|
+
const HintRow = /*#__PURE__*/forwardRef(function HintRow(_ref13, ref) {
|
|
2925
|
+
let {
|
|
2926
|
+
children,
|
|
2927
|
+
...props
|
|
2928
|
+
} = _ref13;
|
|
2929
|
+
return jsx("div", {
|
|
2930
|
+
ref: ref,
|
|
2931
|
+
css: [metaTextStyles, "min-width:100%;" + (process.env.NODE_ENV === "production" ? "" : ";label:HintRow;")],
|
|
2932
|
+
...props,
|
|
2933
|
+
children: children
|
|
2934
|
+
});
|
|
2935
|
+
});
|
|
2936
|
+
const IconWrapper = /*#__PURE__*/forwardRef(function IconWrapper(_ref14, ref) {
|
|
2937
|
+
let {
|
|
2938
|
+
children,
|
|
2939
|
+
...props
|
|
2940
|
+
} = _ref14;
|
|
2941
|
+
return jsx("div", {
|
|
2942
|
+
ref: ref,
|
|
2943
|
+
css: theme => ({
|
|
2944
|
+
fontSize: 16,
|
|
2945
|
+
color: theme.colors.textSecondary,
|
|
2946
|
+
paddingRight: theme.spacing.sm
|
|
2947
|
+
}),
|
|
2948
|
+
...props,
|
|
2949
|
+
children: children
|
|
2950
|
+
});
|
|
2951
|
+
});
|
|
2952
|
+
const getNewChildren = (children, props, disabledReason, ref) => {
|
|
2953
|
+
const childCount = Children.count(children);
|
|
2954
|
+
const tooltip = jsx(Tooltip, {
|
|
2955
|
+
title: disabledReason,
|
|
2956
|
+
placement: "right",
|
|
2957
|
+
dangerouslySetAntdProps: {
|
|
2958
|
+
getPopupContainer: () => ref.current || document.body
|
|
2959
|
+
},
|
|
2960
|
+
children: jsx("span", {
|
|
2961
|
+
css: theme => infoIconStyles(theme),
|
|
2962
|
+
children: jsx(InfoIcon, {
|
|
2963
|
+
"aria-hidden": "false"
|
|
2964
|
+
})
|
|
2965
|
+
})
|
|
2966
|
+
});
|
|
2967
|
+
if (childCount === 1) {
|
|
2968
|
+
return getChild(children, Boolean(props['disabled']), disabledReason, tooltip, 0, childCount);
|
|
2969
|
+
}
|
|
2970
|
+
return Children.map(children, (child, idx) => {
|
|
2971
|
+
return getChild(child, Boolean(props['disabled']), disabledReason, tooltip, idx, childCount);
|
|
2972
|
+
});
|
|
2973
|
+
};
|
|
2974
|
+
const getChild = (child, isDisabled, disabledReason, tooltip, index, siblingCount) => {
|
|
2975
|
+
const HintColumnType = jsx(HintColumn, {}).type;
|
|
2976
|
+
const isHintColumnType = Boolean(child && typeof child !== 'string' && typeof child !== 'number' && typeof child !== 'boolean' && 'type' in child && (child === null || child === void 0 ? void 0 : child.type) === HintColumnType);
|
|
2977
|
+
if (isDisabled && disabledReason && child && isHintColumnType) {
|
|
2978
|
+
return jsxs(Fragment, {
|
|
2979
|
+
children: [tooltip, child]
|
|
2980
|
+
});
|
|
2981
|
+
} else if (index === siblingCount - 1 && isDisabled && disabledReason) {
|
|
2982
|
+
return jsxs(Fragment, {
|
|
2983
|
+
children: [child, tooltip]
|
|
2984
|
+
});
|
|
2985
|
+
}
|
|
2986
|
+
return child;
|
|
2987
|
+
};
|
|
2988
|
+
|
|
2989
|
+
// CONSTANTS
|
|
2990
|
+
const CONSTANTS = {
|
|
2991
|
+
itemPaddingVertical(theme) {
|
|
2992
|
+
// The number from the mocks is the midpoint between constants
|
|
2993
|
+
return 0.5 * theme.spacing.xs + 0.5 * theme.spacing.sm;
|
|
2994
|
+
},
|
|
2995
|
+
itemPaddingHorizontal(theme) {
|
|
2996
|
+
return theme.spacing.sm;
|
|
2997
|
+
},
|
|
2998
|
+
checkboxIconWidth(theme) {
|
|
2999
|
+
return theme.general.iconFontSize;
|
|
3000
|
+
},
|
|
3001
|
+
checkboxPaddingLeft(theme) {
|
|
3002
|
+
return theme.spacing.sm + theme.spacing.xs;
|
|
3003
|
+
},
|
|
3004
|
+
checkboxPaddingRight(theme) {
|
|
3005
|
+
return theme.spacing.sm;
|
|
3006
|
+
},
|
|
3007
|
+
subMenuIconMargin(theme) {
|
|
3008
|
+
// Negative margin so the icons can be larger without increasing the overall item height
|
|
3009
|
+
const iconMarginVertical = this.itemPaddingVertical(theme) / 2;
|
|
3010
|
+
const iconMarginRight = -this.itemPaddingVertical(theme) + theme.spacing.sm * 1.5;
|
|
3011
|
+
return `${-iconMarginVertical}px ${-iconMarginRight}px ${-iconMarginVertical}px auto`;
|
|
3012
|
+
},
|
|
3013
|
+
subMenuIconSize(theme) {
|
|
3014
|
+
return theme.spacing.lg;
|
|
3015
|
+
},
|
|
3016
|
+
arrowBottomLength() {
|
|
3017
|
+
// The built in arrow is a polygon: 0,0 30,0 15,10
|
|
3018
|
+
return 30;
|
|
3019
|
+
},
|
|
3020
|
+
arrowHeight() {
|
|
3021
|
+
return 10;
|
|
3022
|
+
},
|
|
3023
|
+
arrowSide() {
|
|
3024
|
+
return 2 * (this.arrowHeight() ** 2 * 2) ** 0.5;
|
|
3025
|
+
},
|
|
3026
|
+
arrowStrokeWidth() {
|
|
3027
|
+
// This is eyeballed b/c relative to the svg viewbox coordinate system
|
|
3028
|
+
return 2;
|
|
3029
|
+
}
|
|
3030
|
+
};
|
|
3031
|
+
const dropdownContentStyles = theme => ({
|
|
3032
|
+
backgroundColor: theme.colors.backgroundPrimary,
|
|
3033
|
+
color: theme.colors.textPrimary,
|
|
3034
|
+
lineHeight: theme.typography.lineHeightBase,
|
|
3035
|
+
border: `1px solid ${theme.colors.borderDecorative}`,
|
|
3036
|
+
borderRadius: theme.borders.borderRadiusMd,
|
|
3037
|
+
padding: `${theme.spacing.xs}px 0`,
|
|
3038
|
+
boxShadow: theme.general.shadowLow,
|
|
3039
|
+
userSelect: 'none',
|
|
3040
|
+
// Ant Design uses 1000s for their zIndex space; this ensures Radix works with that, but
|
|
3041
|
+
// we'll likely need to be sure that all Radix components are using the same zIndex going forward.
|
|
3042
|
+
//
|
|
3043
|
+
// Additionally, there is an issue where macOS overlay scrollbars in Chrome and Safari (sometimes!)
|
|
3044
|
+
// overlap other elements with higher zIndex, because the scrollbars themselves have zIndex 9999,
|
|
3045
|
+
// so we have to use a higher value than that: https://github.com/databricks/universe/pull/232825
|
|
3046
|
+
zIndex: 10000,
|
|
3047
|
+
a: importantify({
|
|
3048
|
+
color: theme.colors.textPrimary,
|
|
3049
|
+
'&:hover, &:focus': {
|
|
3050
|
+
color: theme.colors.textPrimary,
|
|
3051
|
+
textDecoration: 'none'
|
|
3052
|
+
}
|
|
3053
|
+
})
|
|
3054
|
+
});
|
|
3055
|
+
const contentStyles = theme => ({
|
|
3056
|
+
...dropdownContentStyles(theme)
|
|
3057
|
+
});
|
|
3058
|
+
const dropdownItemStyles = theme => ({
|
|
3059
|
+
padding: `${CONSTANTS.itemPaddingVertical(theme)}px ${CONSTANTS.itemPaddingHorizontal(theme)}px`,
|
|
3060
|
+
display: 'flex',
|
|
3061
|
+
flexWrap: 'wrap',
|
|
3062
|
+
alignItems: 'center',
|
|
3063
|
+
outline: 'unset',
|
|
3064
|
+
'&:hover': {
|
|
3065
|
+
cursor: 'pointer'
|
|
3066
|
+
},
|
|
3067
|
+
'&:focus': {
|
|
3068
|
+
backgroundColor: theme.colors.actionTertiaryBackgroundHover
|
|
3069
|
+
},
|
|
3070
|
+
'&[data-disabled]': {
|
|
3071
|
+
pointerEvents: 'none',
|
|
3072
|
+
color: theme.colors.actionDisabledText
|
|
3073
|
+
}
|
|
3074
|
+
});
|
|
3075
|
+
const dangerItemStyles = theme => ({
|
|
3076
|
+
color: theme.colors.textValidationDanger,
|
|
3077
|
+
'&:hover, &:focus': {
|
|
3078
|
+
backgroundColor: theme.colors.actionDangerDefaultBackgroundHover
|
|
3079
|
+
}
|
|
3080
|
+
});
|
|
3081
|
+
const infoIconStyles = theme => ({
|
|
3082
|
+
display: 'inline-flex',
|
|
3083
|
+
paddingLeft: theme.spacing.xs,
|
|
3084
|
+
color: theme.colors.textSecondary,
|
|
3085
|
+
pointerEvents: 'all'
|
|
3086
|
+
});
|
|
3087
|
+
const checkboxItemStyles = theme => ({
|
|
3088
|
+
position: 'relative',
|
|
3089
|
+
paddingLeft: CONSTANTS.checkboxIconWidth(theme) + CONSTANTS.checkboxPaddingLeft(theme) + CONSTANTS.checkboxPaddingRight(theme)
|
|
3090
|
+
});
|
|
3091
|
+
const metaTextStyles = theme => ({
|
|
3092
|
+
color: theme.colors.textSecondary,
|
|
3093
|
+
fontSize: theme.typography.fontSizeSm,
|
|
3094
|
+
'[data-disabled] &': {
|
|
3095
|
+
color: theme.colors.actionDisabledText
|
|
3096
|
+
}
|
|
3097
|
+
});
|
|
3098
|
+
const dropdownSeparatorStyles = theme => ({
|
|
3099
|
+
height: 1,
|
|
3100
|
+
margin: `${theme.spacing.xs}px ${theme.spacing.sm}px`,
|
|
3101
|
+
backgroundColor: theme.colors.borderDecorative
|
|
3102
|
+
});
|
|
3103
|
+
|
|
3104
|
+
var DropdownMenu = /*#__PURE__*/Object.freeze({
|
|
3105
|
+
__proto__: null,
|
|
3106
|
+
Arrow: Arrow,
|
|
3107
|
+
CheckboxItem: CheckboxItem,
|
|
3108
|
+
Content: Content,
|
|
3109
|
+
Group: Group,
|
|
3110
|
+
HintColumn: HintColumn,
|
|
3111
|
+
HintRow: HintRow,
|
|
3112
|
+
IconWrapper: IconWrapper,
|
|
3113
|
+
Item: Item,
|
|
3114
|
+
ItemIndicator: ItemIndicator,
|
|
3115
|
+
Label: Label,
|
|
3116
|
+
RadioGroup: RadioGroup,
|
|
3117
|
+
RadioItem: RadioItem,
|
|
3118
|
+
Root: Root,
|
|
3119
|
+
Separator: Separator,
|
|
3120
|
+
Sub: Sub,
|
|
3121
|
+
SubContent: SubContent,
|
|
3122
|
+
SubTrigger: SubTrigger,
|
|
3123
|
+
Trigger: Trigger,
|
|
3124
|
+
TriggerItem: TriggerItem,
|
|
3125
|
+
dropdownContentStyles: dropdownContentStyles,
|
|
3126
|
+
dropdownItemStyles: dropdownItemStyles,
|
|
3127
|
+
dropdownSeparatorStyles: dropdownSeparatorStyles
|
|
3128
|
+
});
|
|
3129
|
+
|
|
3130
|
+
export { dropdownItemStyles as $, ApplyDesignSystemContextOverrides as A, Button as B, CloseIcon as C, DesignSystemAntDConfigProvider as D, DesignSystemThemeContext as E, DesignSystemContext as F, DesignSystemThemeProvider as G, DesignSystemProvider as H, Icon as I, ApplyDesignSystemFlags as J, useAntDConfigProviderContext as K, LoadingState as L, DropdownMenu as M, CursorIcon as N, FaceFrownIcon as O, FaceNeutralIcon as P, FaceSmileIcon as Q, RestoreAntDDefaultClsPrefix as R, Spinner as S, Tooltip as T, NewWindowIcon as U, __INTERNAL_DO_NOT_USE__Password as V, WithDesignSystemThemeHoc as W, __INTERNAL_DO_NOT_USE_DEDUPE__Group as X, LoadingStateContext as Y, getTypographyColor as Z, __INTERNAL_DO_NOT_USE__TextArea as _, ChevronRightIcon as a, dropdownSeparatorStyles as a0, useDesignSystemFlags as b, useDesignSystemContext as c, InfoIcon as d, Input as e, CheckIcon as f, getAnimationCss as g, getValidationStateColor as h, importantify as i, Typography as j, LoadingIcon as k, dropdownContentStyles as l, Title as m, AccessibleContainer as n, ChevronLeftIcon as o, DU_BOIS_ENABLE_ANIMATION_CLASSNAME as p, Root as q, Trigger as r, safex as s, getDefaultStyles as t, useDesignSystemTheme as u, visuallyHidden as v, getPrimaryStyles as w, getDisabledStyles as x, lightColorList as y, getButtonEmotionStyles as z };
|
|
3131
|
+
//# sourceMappingURL=DropdownMenu-eb8788e5.js.map
|