@cube-dev/ui-kit 0.0.0-canary-b916e8d → 0.0.0-canary-5cc6499
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/cjs/_internal/hooks/index.js +1 -1
- package/cjs/_internal/hooks/use-deprecation-warning.js +1 -1
- package/cjs/_internal/index.js +1 -1
- package/cjs/components/Base.js +1 -1
- package/cjs/components/Block.js +3 -3
- package/cjs/components/GlobalStyles.js +1 -1
- package/cjs/components/GridProvider.js +7 -8
- package/cjs/components/HiddenInput.js +1 -1
- package/cjs/components/OpenTrasition.js +1 -1
- package/cjs/components/Root.js +3 -6
- package/cjs/components/actions/Action.js +3 -2
- package/cjs/components/actions/Button/Button.js +5 -2
- package/cjs/components/actions/Button/Submit.js +1 -1
- package/cjs/components/actions/Button/index.js +1 -1
- package/cjs/components/actions/ButtonGroup/ButtonGroup.js +11 -9
- package/cjs/components/actions/index.js +1 -1
- package/cjs/components/content/ActiveZone/ActiveZone.js +3 -2
- package/cjs/components/content/Alert/Alert.js +8 -6
- package/cjs/components/content/Alert/index.js +1 -1
- package/cjs/components/content/Alert/types.js +1 -1
- package/cjs/components/content/Alert/use-alert.js +1 -1
- package/cjs/components/content/Avatar/Avatar.js +3 -2
- package/cjs/components/content/Badge/Badge.js +3 -3
- package/cjs/components/content/Card/Card.js +13 -15
- package/cjs/components/content/Content.js +3 -3
- package/cjs/components/content/CopySnippet/CopySnippet.js +21 -57
- package/cjs/components/content/CopySnippet/index.js +1 -1
- package/cjs/components/content/Divider.js +31 -31
- package/cjs/components/content/Footer.js +3 -3
- package/cjs/components/content/Header.js +3 -3
- package/cjs/components/content/Paragraph.js +1 -1
- package/cjs/components/content/Placeholder/Placeholder.js +18 -36
- package/cjs/components/content/PrismCode/PrismCode.js +3 -3
- package/cjs/components/content/Result/Result.js +1 -1
- package/cjs/components/content/Skeleton/Skeleton.js +1 -1
- package/cjs/components/content/Tag/Tag.js +13 -11
- package/cjs/components/content/Text.js +3 -3
- package/cjs/components/content/Title.js +3 -3
- package/cjs/components/forms/Checkbox/Checkbox.js +61 -57
- package/cjs/components/forms/Checkbox/CheckboxGroup.js +35 -21
- package/cjs/components/forms/Checkbox/context.js +1 -1
- package/cjs/components/forms/FieldWrapper.js +4 -4
- package/cjs/components/forms/FileInput/FileInput.js +49 -45
- package/cjs/components/forms/Form/Field.js +1 -1
- package/cjs/components/forms/Form/Form.js +11 -13
- package/cjs/components/forms/Form/index.js +1 -1
- package/cjs/components/forms/Form/useForm.js +1 -1
- package/cjs/components/forms/Form/validation.js +1 -1
- package/cjs/components/forms/Input/Input.js +1 -1
- package/cjs/components/forms/Input/index.js +1 -1
- package/cjs/components/forms/Label.js +6 -4
- package/cjs/components/forms/NumberInput/NumberInput.js +1 -1
- package/cjs/components/forms/NumberInput/StepButton.js +1 -1
- package/cjs/components/forms/PasswordInput/PasswordInput.js +1 -1
- package/cjs/components/forms/RadioGroup/Radio.js +92 -95
- package/cjs/components/forms/RadioGroup/RadioGroup.js +35 -20
- package/cjs/components/forms/RadioGroup/context.js +1 -1
- package/cjs/components/forms/SearchInput/SearchInput.js +1 -1
- package/cjs/components/forms/Switch/Switch.js +76 -72
- package/cjs/components/forms/TextArea/TextArea.js +1 -1
- package/cjs/components/forms/TextInput/TextInput.js +1 -1
- package/cjs/components/forms/TextInput/TextInputBase.js +20 -24
- package/cjs/components/forms/index.js +1 -1
- package/cjs/components/layout/Flex.js +8 -9
- package/cjs/components/layout/Flow.js +8 -9
- package/cjs/components/layout/Grid.js +9 -9
- package/cjs/components/layout/Prefix.js +17 -19
- package/cjs/components/layout/Space.js +17 -21
- package/cjs/components/layout/Suffix.js +17 -19
- package/cjs/components/navigation/LegacyTabs/LegacyTabs.js +41 -64
- package/cjs/components/navigation/Link/Link.js +1 -1
- package/cjs/components/organisms/FileTabs/FileTabs.js +50 -73
- package/cjs/components/organisms/Modal/Modal.js +1 -1
- package/cjs/components/organisms/StatsCard/StatsCard.js +1 -1
- package/cjs/components/other/Base64Upload/Base64Upload.js +1 -1
- package/cjs/components/other/CloudLogo/CloudLogo.js +1 -1
- package/cjs/components/overlays/AlertDialog/AlertDialog.js +1 -1
- package/cjs/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/cjs/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
- package/cjs/components/overlays/AlertDialog/index.js +1 -1
- package/cjs/components/overlays/AlertDialog/types.js +1 -1
- package/cjs/components/overlays/Dialog/Dialog.js +62 -60
- package/cjs/components/overlays/Dialog/DialogContainer.js +1 -1
- package/cjs/components/overlays/Dialog/DialogForm.js +1 -1
- package/cjs/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/cjs/components/overlays/Dialog/context.js +1 -1
- package/cjs/components/overlays/Dialog/index.js +1 -1
- package/cjs/components/overlays/Modal/Modal.js +32 -32
- package/cjs/components/overlays/Modal/OpenTransition.js +1 -1
- package/cjs/components/overlays/Modal/Overlay.js +1 -1
- package/cjs/components/overlays/Modal/Popover.js +26 -23
- package/cjs/components/overlays/Modal/Tray.js +24 -24
- package/cjs/components/overlays/Modal/Underlay.js +31 -25
- package/cjs/components/overlays/Modal/index.js +1 -1
- package/cjs/components/overlays/Notification/Notification.js +10 -53
- package/cjs/components/overlays/OverlayWrapper.js +1 -1
- package/cjs/components/overlays/Tooltip/Tooltip.js +56 -67
- package/cjs/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/cjs/components/overlays/Tooltip/TooltipTrigger.js +1 -1
- package/cjs/components/overlays/Tooltip/context.js +1 -1
- package/cjs/components/pickers/ComboBox/ComboBox.js +45 -44
- package/cjs/components/pickers/Menu/Menu.js +10 -4
- package/cjs/components/pickers/Menu/MenuButton.js +1 -1
- package/cjs/components/pickers/Menu/MenuItem.js +1 -1
- package/cjs/components/pickers/Menu/MenuSection.js +6 -6
- package/cjs/components/pickers/Menu/MenuTrigger.js +1 -1
- package/cjs/components/pickers/Menu/context.js +1 -1
- package/cjs/components/pickers/Menu/styled.js +14 -13
- package/cjs/components/pickers/Select/Select.js +113 -117
- package/cjs/components/portal/Portal.js +1 -1
- package/cjs/components/portal/PortalProvider.js +1 -1
- package/cjs/components/portal/index.js +1 -1
- package/cjs/components/portal/storybook/templates/CustomRoot.js +1 -1
- package/cjs/components/portal/storybook/templates/PortalOrder.js +1 -1
- package/cjs/components/portal/storybook/templates/basic.js +1 -1
- package/cjs/components/portal/storybook/templates/index.js +1 -1
- package/cjs/components/portal/types.js +1 -1
- package/cjs/components/portal/usePortal.js +1 -1
- package/cjs/components/status/LoadingAnimation/LoadingAnimation.js +4 -4
- package/cjs/components/status/Spin/Spin.js +2 -2
- package/cjs/data/themes.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/provider.js +1 -1
- package/cjs/providers/StyleProvider.js +1 -1
- package/cjs/services/notification.js +1 -1
- package/cjs/shared/form.js +1 -1
- package/cjs/shared/index.js +1 -1
- package/cjs/stories/FormFieldArgs.js +1 -1
- package/cjs/stories/components/ConfirmDeletionDialogForm.js +1 -1
- package/cjs/stories/components/DialogFormApp.js +1 -1
- package/cjs/stories/components/StyledButton.js +1 -1
- package/cjs/stories/lists/baseProps.js +1 -1
- package/cjs/styled/index.js +1 -1
- package/cjs/styled/styled.js +1 -1
- package/cjs/tasty/index.js +2 -3
- package/cjs/tasty/providers/BreakpointsProvider.js +1 -1
- package/cjs/tasty/styles/align.js +1 -1
- package/cjs/tasty/styles/border.js +1 -1
- package/cjs/tasty/styles/boxShadow.combinator.js +1 -1
- package/cjs/tasty/styles/color.js +1 -1
- package/cjs/tasty/styles/createStyle.js +1 -1
- package/cjs/tasty/styles/dimension.js +1 -1
- package/cjs/tasty/styles/display.js +1 -1
- package/cjs/tasty/styles/fill.js +1 -1
- package/cjs/tasty/styles/flow.js +1 -1
- package/cjs/tasty/styles/font.js +1 -1
- package/cjs/tasty/styles/fontStyle.js +1 -1
- package/cjs/tasty/styles/gap.js +1 -1
- package/cjs/tasty/styles/groupRadius.js +1 -1
- package/cjs/tasty/styles/height.js +1 -1
- package/cjs/tasty/styles/index.js +1 -1
- package/cjs/tasty/styles/justify.js +1 -1
- package/cjs/tasty/styles/list.js +1 -1
- package/cjs/tasty/styles/margin.js +1 -1
- package/cjs/tasty/styles/marginBlock.js +1 -1
- package/cjs/tasty/styles/marginInline.js +1 -1
- package/cjs/tasty/styles/outline.js +1 -1
- package/cjs/tasty/styles/padding.js +1 -1
- package/cjs/tasty/styles/paddingBlock.js +1 -1
- package/cjs/tasty/styles/paddingInline.js +1 -1
- package/cjs/tasty/styles/predefined.js +1 -1
- package/cjs/tasty/styles/preset.js +1 -1
- package/cjs/tasty/styles/radius.js +1 -1
- package/cjs/tasty/styles/reset.js +1 -1
- package/cjs/tasty/styles/shadow.js +1 -1
- package/cjs/tasty/styles/styledScrollbar.js +1 -1
- package/cjs/tasty/styles/transition.js +1 -1
- package/cjs/tasty/styles/types.js +1 -1
- package/cjs/tasty/styles/width.js +1 -1
- package/cjs/tasty/tasty.js +3 -8
- package/cjs/tasty/types.js +1 -1
- package/cjs/tasty/utils/colors.js +1 -1
- package/cjs/tasty/utils/dotize.js +1 -1
- package/cjs/tasty/utils/filterBaseProps.js +1 -2
- package/cjs/tasty/utils/index.js +1 -1
- package/cjs/tasty/utils/mergeStyles.js +1 -1
- package/cjs/tasty/utils/modAttrs.js +1 -1
- package/cjs/tasty/utils/renderStyles.js +1 -1
- package/cjs/tasty/utils/responsive.js +1 -1
- package/cjs/tasty/utils/string.js +1 -1
- package/cjs/tasty/utils/styles.js +1 -1
- package/cjs/tasty/utils/warnings.js +1 -1
- package/cjs/test/index.js +1 -1
- package/cjs/test/render.js +1 -1
- package/cjs/test/setup.js +1 -1
- package/cjs/test/utils/index.js +1 -1
- package/cjs/test/utils/wait.js +1 -1
- package/cjs/tokens.js +1 -6
- package/cjs/utils/ResizeSensor.js +1 -1
- package/cjs/utils/modules.js +1 -1
- package/cjs/utils/promise.js +1 -1
- package/cjs/utils/react/Slots.js +1 -1
- package/cjs/utils/react/chain.js +1 -1
- package/cjs/utils/react/index.js +1 -1
- package/cjs/utils/react/interactions.js +1 -1
- package/cjs/utils/react/isTextOnly.js +1 -1
- package/cjs/utils/react/mapProps.js +1 -1
- package/cjs/utils/react/mergeProps.js +3 -4
- package/cjs/utils/react/nullableValue.js +1 -1
- package/cjs/utils/react/useCombinedRefs.js +1 -1
- package/cjs/utils/react/useId.js +1 -1
- package/cjs/utils/react/useLayoutEffect.js +1 -1
- package/cjs/utils/react/wrapNodeIfPlain.js +1 -1
- package/cjs/utils/transitions.js +1 -1
- package/cjs/utils/tree.js +1 -1
- package/cjs/utils/warnings.js +9 -13
- package/es/_internal/hooks/index.js +1 -1
- package/es/_internal/hooks/use-deprecation-warning.js +1 -1
- package/es/_internal/index.js +1 -1
- package/es/components/Base.js +1 -1
- package/es/components/Block.js +3 -3
- package/es/components/GlobalStyles.js +1 -1
- package/es/components/GridProvider.js +7 -8
- package/es/components/HiddenInput.js +1 -1
- package/es/components/OpenTrasition.js +1 -1
- package/es/components/Root.js +4 -7
- package/es/components/actions/Action.js +4 -3
- package/es/components/actions/Button/Button.js +5 -2
- package/es/components/actions/Button/Submit.js +1 -1
- package/es/components/actions/Button/index.js +1 -1
- package/es/components/actions/ButtonGroup/ButtonGroup.js +11 -9
- package/es/components/actions/index.js +1 -1
- package/es/components/content/ActiveZone/ActiveZone.js +4 -3
- package/es/components/content/Alert/Alert.js +8 -6
- package/es/components/content/Alert/index.js +1 -1
- package/es/components/content/Alert/types.js +1 -1
- package/es/components/content/Alert/use-alert.js +1 -1
- package/es/components/content/Avatar/Avatar.js +4 -3
- package/es/components/content/Badge/Badge.js +3 -3
- package/es/components/content/Card/Card.js +14 -16
- package/es/components/content/Content.js +3 -3
- package/es/components/content/CopySnippet/CopySnippet.js +21 -57
- package/es/components/content/CopySnippet/index.js +1 -1
- package/es/components/content/Divider.js +32 -32
- package/es/components/content/Footer.js +3 -3
- package/es/components/content/Header.js +3 -3
- package/es/components/content/Paragraph.js +1 -1
- package/es/components/content/Placeholder/Placeholder.js +19 -34
- package/es/components/content/PrismCode/PrismCode.js +3 -3
- package/es/components/content/Result/Result.js +1 -1
- package/es/components/content/Skeleton/Skeleton.js +1 -1
- package/es/components/content/Tag/Tag.js +13 -11
- package/es/components/content/Text.js +3 -3
- package/es/components/content/Title.js +3 -3
- package/es/components/forms/Checkbox/Checkbox.js +62 -58
- package/es/components/forms/Checkbox/CheckboxGroup.js +36 -22
- package/es/components/forms/Checkbox/context.js +1 -1
- package/es/components/forms/FieldWrapper.js +4 -4
- package/es/components/forms/FileInput/FileInput.js +50 -46
- package/es/components/forms/Form/Field.js +1 -1
- package/es/components/forms/Form/Form.js +12 -14
- package/es/components/forms/Form/index.js +1 -1
- package/es/components/forms/Form/useForm.js +1 -1
- package/es/components/forms/Form/validation.js +1 -1
- package/es/components/forms/Input/Input.js +1 -1
- package/es/components/forms/Input/index.js +1 -1
- package/es/components/forms/Label.js +6 -4
- package/es/components/forms/NumberInput/NumberInput.js +1 -1
- package/es/components/forms/NumberInput/StepButton.js +1 -1
- package/es/components/forms/PasswordInput/PasswordInput.js +1 -1
- package/es/components/forms/RadioGroup/Radio.js +93 -96
- package/es/components/forms/RadioGroup/RadioGroup.js +36 -21
- package/es/components/forms/RadioGroup/context.js +1 -1
- package/es/components/forms/SearchInput/SearchInput.js +1 -1
- package/es/components/forms/Switch/Switch.js +78 -74
- package/es/components/forms/TextArea/TextArea.js +1 -1
- package/es/components/forms/TextInput/TextInput.js +1 -1
- package/es/components/forms/TextInput/TextInputBase.js +21 -25
- package/es/components/forms/index.js +1 -1
- package/es/components/layout/Flex.js +9 -10
- package/es/components/layout/Flow.js +9 -10
- package/es/components/layout/Grid.js +10 -10
- package/es/components/layout/Prefix.js +18 -20
- package/es/components/layout/Space.js +18 -22
- package/es/components/layout/Suffix.js +18 -20
- package/es/components/navigation/LegacyTabs/LegacyTabs.js +41 -61
- package/es/components/navigation/Link/Link.js +1 -1
- package/es/components/organisms/FileTabs/FileTabs.js +50 -70
- package/es/components/organisms/Modal/Modal.js +1 -1
- package/es/components/organisms/StatsCard/StatsCard.js +1 -1
- package/es/components/other/Base64Upload/Base64Upload.js +1 -1
- package/es/components/other/CloudLogo/CloudLogo.js +1 -1
- package/es/components/overlays/AlertDialog/AlertDialog.js +1 -1
- package/es/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/es/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
- package/es/components/overlays/AlertDialog/index.js +1 -1
- package/es/components/overlays/AlertDialog/types.js +1 -1
- package/es/components/overlays/Dialog/Dialog.js +63 -61
- package/es/components/overlays/Dialog/DialogContainer.js +1 -1
- package/es/components/overlays/Dialog/DialogForm.js +1 -1
- package/es/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/es/components/overlays/Dialog/context.js +1 -1
- package/es/components/overlays/Dialog/index.js +1 -1
- package/es/components/overlays/Modal/Modal.js +32 -32
- package/es/components/overlays/Modal/OpenTransition.js +1 -1
- package/es/components/overlays/Modal/Overlay.js +1 -1
- package/es/components/overlays/Modal/Popover.js +26 -23
- package/es/components/overlays/Modal/Tray.js +24 -24
- package/es/components/overlays/Modal/Underlay.js +31 -25
- package/es/components/overlays/Modal/index.js +1 -1
- package/es/components/overlays/Notification/Notification.js +10 -53
- package/es/components/overlays/OverlayWrapper.js +1 -1
- package/es/components/overlays/Tooltip/Tooltip.js +57 -65
- package/es/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/es/components/overlays/Tooltip/TooltipTrigger.js +1 -1
- package/es/components/overlays/Tooltip/context.js +1 -1
- package/es/components/pickers/ComboBox/ComboBox.js +46 -45
- package/es/components/pickers/Menu/Menu.js +10 -4
- package/es/components/pickers/Menu/MenuButton.js +1 -1
- package/es/components/pickers/Menu/MenuItem.js +1 -1
- package/es/components/pickers/Menu/MenuSection.js +7 -7
- package/es/components/pickers/Menu/MenuTrigger.js +1 -1
- package/es/components/pickers/Menu/context.js +1 -1
- package/es/components/pickers/Menu/styled.js +14 -13
- package/es/components/pickers/Select/Select.js +115 -116
- package/es/components/portal/Portal.js +1 -1
- package/es/components/portal/PortalProvider.js +1 -1
- package/es/components/portal/index.js +1 -1
- package/es/components/portal/storybook/templates/CustomRoot.js +1 -1
- package/es/components/portal/storybook/templates/PortalOrder.js +1 -1
- package/es/components/portal/storybook/templates/basic.js +1 -1
- package/es/components/portal/storybook/templates/index.js +1 -1
- package/es/components/portal/types.js +1 -1
- package/es/components/portal/usePortal.js +1 -1
- package/es/components/status/LoadingAnimation/LoadingAnimation.js +4 -4
- package/es/components/status/Spin/Spin.js +2 -2
- package/es/data/themes.js +1 -1
- package/es/index.js +1 -1
- package/es/provider.js +1 -1
- package/es/providers/StyleProvider.js +1 -1
- package/es/services/notification.js +1 -1
- package/es/shared/form.js +1 -1
- package/es/shared/index.js +1 -1
- package/es/stories/FormFieldArgs.js +1 -1
- package/es/stories/components/ConfirmDeletionDialogForm.js +1 -1
- package/es/stories/components/DialogFormApp.js +1 -1
- package/es/stories/components/StyledButton.js +1 -1
- package/es/stories/lists/baseProps.js +1 -1
- package/es/styled/index.js +1 -1
- package/es/styled/styled.js +1 -1
- package/es/tasty/index.js +2 -2
- package/es/tasty/providers/BreakpointsProvider.js +1 -1
- package/es/tasty/styles/align.js +1 -1
- package/es/tasty/styles/border.js +1 -1
- package/es/tasty/styles/boxShadow.combinator.js +1 -1
- package/es/tasty/styles/color.js +1 -1
- package/es/tasty/styles/createStyle.js +1 -1
- package/es/tasty/styles/dimension.js +1 -1
- package/es/tasty/styles/display.js +1 -1
- package/es/tasty/styles/fill.js +1 -1
- package/es/tasty/styles/flow.js +1 -1
- package/es/tasty/styles/font.js +1 -1
- package/es/tasty/styles/fontStyle.js +1 -1
- package/es/tasty/styles/gap.js +1 -1
- package/es/tasty/styles/groupRadius.js +1 -1
- package/es/tasty/styles/height.js +1 -1
- package/es/tasty/styles/index.js +1 -1
- package/es/tasty/styles/justify.js +1 -1
- package/es/tasty/styles/list.js +1 -1
- package/es/tasty/styles/margin.js +1 -1
- package/es/tasty/styles/marginBlock.js +1 -1
- package/es/tasty/styles/marginInline.js +1 -1
- package/es/tasty/styles/outline.js +1 -1
- package/es/tasty/styles/padding.js +1 -1
- package/es/tasty/styles/paddingBlock.js +1 -1
- package/es/tasty/styles/paddingInline.js +1 -1
- package/es/tasty/styles/predefined.js +1 -1
- package/es/tasty/styles/preset.js +1 -1
- package/es/tasty/styles/radius.js +1 -1
- package/es/tasty/styles/reset.js +1 -1
- package/es/tasty/styles/shadow.js +1 -1
- package/es/tasty/styles/styledScrollbar.js +1 -1
- package/es/tasty/styles/transition.js +1 -1
- package/es/tasty/styles/types.js +1 -1
- package/es/tasty/styles/width.js +1 -1
- package/es/tasty/tasty.js +3 -7
- package/es/tasty/types.js +1 -1
- package/es/tasty/utils/colors.js +1 -1
- package/es/tasty/utils/dotize.js +1 -1
- package/es/tasty/utils/filterBaseProps.js +1 -2
- package/es/tasty/utils/index.js +1 -1
- package/es/tasty/utils/mergeStyles.js +1 -1
- package/es/tasty/utils/modAttrs.js +1 -1
- package/es/tasty/utils/renderStyles.js +1 -1
- package/es/tasty/utils/responsive.js +1 -1
- package/es/tasty/utils/string.js +1 -1
- package/es/tasty/utils/styles.js +1 -1
- package/es/tasty/utils/warnings.js +1 -1
- package/es/test/index.js +1 -1
- package/es/test/render.js +1 -1
- package/es/test/setup.js +1 -1
- package/es/test/utils/index.js +1 -1
- package/es/test/utils/wait.js +1 -1
- package/es/tokens.js +1 -6
- package/es/utils/ResizeSensor.js +1 -1
- package/es/utils/modules.js +1 -1
- package/es/utils/promise.js +1 -1
- package/es/utils/react/Slots.js +1 -1
- package/es/utils/react/chain.js +1 -1
- package/es/utils/react/index.js +1 -1
- package/es/utils/react/interactions.js +1 -1
- package/es/utils/react/isTextOnly.js +1 -1
- package/es/utils/react/mapProps.js +1 -1
- package/es/utils/react/mergeProps.js +3 -4
- package/es/utils/react/nullableValue.js +1 -1
- package/es/utils/react/useCombinedRefs.js +1 -1
- package/es/utils/react/useId.js +1 -1
- package/es/utils/react/useLayoutEffect.js +1 -1
- package/es/utils/react/wrapNodeIfPlain.js +1 -1
- package/es/utils/transitions.js +1 -1
- package/es/utils/tree.js +1 -1
- package/es/utils/warnings.js +9 -13
- package/package.json +4 -4
- package/types/components/content/Tag/Tag.d.ts +1 -2
- package/types/components/overlays/Dialog/Dialog.d.ts +1 -2
- package/types/components/pickers/Menu/MenuItem.d.ts +1 -2
- package/types/components/pickers/Menu/MenuSection.d.ts +3 -8
- package/types/tasty/index.d.ts +1 -1
- package/types/tasty/tasty.d.ts +4 -8
- package/types/tokens.d.ts +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-5cc6499
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -10,27 +10,25 @@ import { mergeProps } from '../../../utils/react';
|
|
|
10
10
|
import { Overlay } from './Overlay';
|
|
11
11
|
import { forwardRef } from 'react';
|
|
12
12
|
import { useModal, useOverlay } from '@react-aria/overlays';
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
open: 'scale(1, 1)',
|
|
23
|
-
},
|
|
24
|
-
opacity: {
|
|
25
|
-
'': 0,
|
|
26
|
-
open: '.9999',
|
|
27
|
-
},
|
|
28
|
-
transformOrigin: {
|
|
29
|
-
'': 'top center',
|
|
30
|
-
'[data-placement="top"]': 'bottom center',
|
|
31
|
-
},
|
|
13
|
+
import { Base } from '../../Base';
|
|
14
|
+
import { useContextStyles } from '../../../providers/StyleProvider';
|
|
15
|
+
const POPOVER_STYLES = {
|
|
16
|
+
pointerEvents: 'auto',
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
transition: 'opacity .120s linear, visibility 0ms linear, transform .120s ease-in-out',
|
|
19
|
+
transform: {
|
|
20
|
+
'': 'scale(1, .9)',
|
|
21
|
+
open: 'scale(1, 1)',
|
|
32
22
|
},
|
|
33
|
-
|
|
23
|
+
opacity: {
|
|
24
|
+
'': 0,
|
|
25
|
+
open: '.9999',
|
|
26
|
+
},
|
|
27
|
+
transformOrigin: {
|
|
28
|
+
'': 'top center',
|
|
29
|
+
'[data-placement="top"]': 'bottom center',
|
|
30
|
+
},
|
|
31
|
+
};
|
|
34
32
|
function Popover(props, ref) {
|
|
35
33
|
let { qa, style, styles, children, placement, arrowProps, onClose, shouldCloseOnBlur, isKeyboardDismissDisabled, isNonModal, isDismissable = true, ...otherProps } = props;
|
|
36
34
|
return (_jsx(Overlay, { ...otherProps, children: _jsx(PopoverWrapper, { qa: qa, ref: ref, style: style, styles: styles, placement: placement, arrowProps: arrowProps, onClose: onClose, shouldCloseOnBlur: shouldCloseOnBlur, isKeyboardDismissDisabled: isKeyboardDismissDisabled, isNonModal: isNonModal, isDismissable: isDismissable, children: children }, void 0) }, void 0));
|
|
@@ -43,9 +41,14 @@ const PopoverWrapper = forwardRef(function PopoverWrapper(props, ref) {
|
|
|
43
41
|
let { modalProps } = useModal({
|
|
44
42
|
isDisabled: isNonModal,
|
|
45
43
|
});
|
|
46
|
-
|
|
44
|
+
styles = {
|
|
45
|
+
...POPOVER_STYLES,
|
|
46
|
+
...useContextStyles('Popover', props),
|
|
47
|
+
...styles,
|
|
48
|
+
};
|
|
49
|
+
return (_jsx(Base, { qa: qa || 'Popover', ...mergeProps(otherProps, overlayProps, modalProps), styles: styles, ref: ref, mods: {
|
|
47
50
|
open: isOpen,
|
|
48
|
-
}, "data-placement": placement, style: style, children: children }, void 0));
|
|
51
|
+
}, "data-placement": placement, role: "presentation", style: style, children: children }, void 0));
|
|
49
52
|
});
|
|
50
53
|
let _Popover = forwardRef(Popover);
|
|
51
54
|
export { _Popover as Popover };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-5cc6499
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -13,29 +13,20 @@ import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
|
13
13
|
import { Underlay } from './Underlay';
|
|
14
14
|
import { useModal, useOverlay, usePreventScroll } from '@react-aria/overlays';
|
|
15
15
|
import { OVERLAY_WRAPPER_STYLES } from './Modal';
|
|
16
|
-
import {
|
|
16
|
+
import { Base } from '../../Base';
|
|
17
17
|
import { mergeProps } from '../../../utils/react';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
import { useContextStyles } from '../../../providers/StyleProvider';
|
|
19
|
+
const TRAY_STYLES = {
|
|
20
|
+
zIndex: 2,
|
|
21
|
+
height: 'max (@cube-visual-viewport-height * .9)',
|
|
22
|
+
width: '288px 90vw',
|
|
23
|
+
pointerEvents: 'auto',
|
|
24
|
+
transition: 'transform .25s ease-in-out, opacity .25s linear, visibility 0ms linear',
|
|
25
|
+
opacity: {
|
|
26
|
+
'': 0,
|
|
27
|
+
open: '.9999',
|
|
24
28
|
},
|
|
25
|
-
}
|
|
26
|
-
const TrayElement = tasty({
|
|
27
|
-
styles: {
|
|
28
|
-
zIndex: 2,
|
|
29
|
-
height: 'max (@cube-visual-viewport-height * .9)',
|
|
30
|
-
width: '288px 90vw',
|
|
31
|
-
pointerEvents: 'auto',
|
|
32
|
-
transition: 'transform .25s ease-in-out, opacity .25s linear, visibility 0ms linear',
|
|
33
|
-
opacity: {
|
|
34
|
-
'': 0,
|
|
35
|
-
open: '.9999',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
});
|
|
29
|
+
};
|
|
39
30
|
function Tray(props, ref) {
|
|
40
31
|
let { qa, children, onClose, isFixedHeight, isNonModal, styles, ...otherProps } = props;
|
|
41
32
|
let domRef = useDOMRef(ref);
|
|
@@ -48,6 +39,11 @@ let TrayWrapper = forwardRef(function (props, ref) {
|
|
|
48
39
|
let { modalProps } = useModal({
|
|
49
40
|
isDisabled: isNonModal,
|
|
50
41
|
});
|
|
42
|
+
styles = {
|
|
43
|
+
...TRAY_STYLES,
|
|
44
|
+
...useContextStyles('Tray', props),
|
|
45
|
+
...styles,
|
|
46
|
+
};
|
|
51
47
|
// We need to measure the window's height in JS rather than using percentages in CSS
|
|
52
48
|
// so that contents (e.g. menu) can inherit the max-height properly. Using percentages
|
|
53
49
|
// does not work properly because there is nothing to base the percentage on.
|
|
@@ -79,9 +75,13 @@ let TrayWrapper = forwardRef(function (props, ref) {
|
|
|
79
75
|
'--cube-visual-viewport-height': height + 'px',
|
|
80
76
|
};
|
|
81
77
|
let domProps = mergeProps(otherProps, overlayProps);
|
|
82
|
-
return (_jsx(
|
|
78
|
+
return (_jsx(Base, { qa: "TrayWrapper", mods: {
|
|
83
79
|
open: isOpen,
|
|
84
|
-
},
|
|
80
|
+
}, styles: {
|
|
81
|
+
...OVERLAY_WRAPPER_STYLES,
|
|
82
|
+
placeContent: 'end center',
|
|
83
|
+
placeItems: 'end center',
|
|
84
|
+
}, style: wrapperStyle, children: _jsx(Base, { qa: qa || 'Tray', styles: styles, mods: {
|
|
85
85
|
open: isOpen,
|
|
86
86
|
'fixed-height': isFixedHeight,
|
|
87
87
|
}, ...domProps, ...modalProps, ref: ref, children: children }, void 0) }, void 0));
|
|
@@ -1,38 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-5cc6499
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
import { forwardRef } from 'react';
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
open: 'auto',
|
|
28
|
-
},
|
|
29
|
-
fill: '#dark.30',
|
|
30
|
-
overflow: 'hidden',
|
|
31
|
-
transition: 'transform .25s ease-in-out, opacity .25s linear, visibility 0ms linear',
|
|
10
|
+
import { Base } from '../../Base';
|
|
11
|
+
import { useContextStyles } from '../../../providers/StyleProvider';
|
|
12
|
+
const UNDERLAY_STYLES = {
|
|
13
|
+
position: 'fixed',
|
|
14
|
+
top: 0,
|
|
15
|
+
right: 0,
|
|
16
|
+
bottom: 0,
|
|
17
|
+
left: 0,
|
|
18
|
+
zIndex: 1,
|
|
19
|
+
transitionDelay: '0ms',
|
|
20
|
+
// visibility: {
|
|
21
|
+
// '': 'hidden',
|
|
22
|
+
// open: 'visible',
|
|
23
|
+
// },
|
|
24
|
+
opacity: {
|
|
25
|
+
'': 0,
|
|
26
|
+
open: 0.9999,
|
|
32
27
|
},
|
|
33
|
-
|
|
28
|
+
pointerEvents: {
|
|
29
|
+
'': 'none',
|
|
30
|
+
open: 'auto',
|
|
31
|
+
},
|
|
32
|
+
fill: '#dark.30',
|
|
33
|
+
overflow: 'hidden',
|
|
34
|
+
transition: 'transform .25s ease-in-out, opacity .25s linear, visibility 0ms linear',
|
|
35
|
+
};
|
|
34
36
|
const Underlay = ({ isOpen, ...otherProps }, ref) => {
|
|
35
|
-
|
|
37
|
+
const styles = {
|
|
38
|
+
...UNDERLAY_STYLES,
|
|
39
|
+
...useContextStyles('Underlay'),
|
|
40
|
+
};
|
|
41
|
+
return (_jsx(Base, { ref: ref, "data-qa": "Underlay", styles: styles, mods: {
|
|
36
42
|
open: isOpen,
|
|
37
43
|
}, ...otherProps }, void 0));
|
|
38
44
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-5cc6499
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -9,61 +9,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
import { Action } from '../../actions/Action';
|
|
10
10
|
import { Card } from '../../content/Card/Card';
|
|
11
11
|
import { Block } from '../../Block';
|
|
12
|
+
import { Flex } from '../../layout/Flex';
|
|
12
13
|
import THEMES from '../../../data/themes';
|
|
13
14
|
import { CheckOutlined, CloseOutlined, ExclamationOutlined, InfoOutlined, } from '@ant-design/icons';
|
|
14
|
-
import { tasty } from '../../../tasty';
|
|
15
|
-
const NotificationElement = tasty(Card, {
|
|
16
|
-
role: 'region',
|
|
17
|
-
styles: {
|
|
18
|
-
display: 'grid',
|
|
19
|
-
color: '#dark',
|
|
20
|
-
padding: '.5x',
|
|
21
|
-
shadow: '0 5px 15px #dark.10',
|
|
22
|
-
border: false,
|
|
23
|
-
margin: '1x bottom',
|
|
24
|
-
radius: '1.5r',
|
|
25
|
-
gridColumns: 'auto 1fr auto',
|
|
26
|
-
placeItems: 'center start',
|
|
27
|
-
gap: '2x',
|
|
28
|
-
preset: 't3',
|
|
29
|
-
Icon: {
|
|
30
|
-
display: 'flex',
|
|
31
|
-
radius: '1r',
|
|
32
|
-
width: '5x',
|
|
33
|
-
height: '5x',
|
|
34
|
-
placeContent: 'center',
|
|
35
|
-
placeItems: 'center',
|
|
36
|
-
preset: 't2',
|
|
37
|
-
color: {
|
|
38
|
-
'': '#dark.75',
|
|
39
|
-
...Object.keys(THEMES).reduce((map, theme) => {
|
|
40
|
-
map[`[data-theme="${theme}"]`] = THEMES[theme].color;
|
|
41
|
-
return map;
|
|
42
|
-
}, {}),
|
|
43
|
-
},
|
|
44
|
-
fill: {
|
|
45
|
-
'': '#clear',
|
|
46
|
-
...Object.keys(THEMES).reduce((map, theme) => {
|
|
47
|
-
map[`[data-theme="${theme}"]`] = THEMES[theme].fill;
|
|
48
|
-
return map;
|
|
49
|
-
}, {}),
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
const CloseButton = tasty(Action, {
|
|
55
|
-
styles: {
|
|
56
|
-
color: { '': '#dark.75', hovered: '#purple' },
|
|
57
|
-
width: '5x',
|
|
58
|
-
height: '5x',
|
|
59
|
-
label: 'Close',
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
15
|
export function Notification(allProps) {
|
|
63
|
-
let {
|
|
64
|
-
|
|
16
|
+
let { type, children, onClose, ...props } = allProps;
|
|
17
|
+
type = type || 'note';
|
|
65
18
|
let Icon;
|
|
66
|
-
switch (
|
|
19
|
+
switch (type) {
|
|
67
20
|
case 'success':
|
|
68
21
|
Icon = CheckOutlined;
|
|
69
22
|
break;
|
|
@@ -74,7 +27,11 @@ export function Notification(allProps) {
|
|
|
74
27
|
Icon = InfoOutlined;
|
|
75
28
|
break;
|
|
76
29
|
}
|
|
77
|
-
return (_jsxs(
|
|
30
|
+
return (_jsxs(Card, { display: "grid", role: "region", color: "#dark", padding: ".5x", shadow: "0 5px 15px #dark.10", border: false, margin: "1x bottom", radius: "1.5r", styles: {
|
|
31
|
+
gridColumns: 'auto 1fr auto',
|
|
32
|
+
placeItems: 'center start',
|
|
33
|
+
gap: '2x',
|
|
34
|
+
}, ...props, children: [_jsx(Flex, { radius: "1r", width: "5x", height: "5x", placeContent: "center", placeItems: "center", fill: THEMES[type] ? THEMES[type].fill : '#clear', color: THEMES[type] ? THEMES[type].color : '#dark.75', children: _jsx(Icon, { style: { fontSize: 16 } }, void 0) }, void 0), _jsx(Block, { children: children }, void 0), _jsx(Action, { color: { '': '#dark.75', hovered: '#purple' }, width: "5x", height: "5x", onPress: onClose, label: "Close", children: _jsx(CloseOutlined, {}, void 0) }, void 0)] }, void 0));
|
|
78
35
|
}
|
|
79
36
|
|
|
80
37
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-5cc6499
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -11,76 +11,69 @@ import { mergeProps } from '../../../utils/react';
|
|
|
11
11
|
import { createDOMRef } from '@react-spectrum/utils';
|
|
12
12
|
import { TooltipContext } from './context';
|
|
13
13
|
import { useTooltip } from '@react-aria/tooltip';
|
|
14
|
-
import {
|
|
14
|
+
import { Base } from '../../Base';
|
|
15
|
+
import { CONTAINER_STYLES, extractStyles, } from '../../../tasty';
|
|
15
16
|
import { getOverlayTransitionCSS } from '../../../utils/transitions';
|
|
16
|
-
import
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
import { useContextStyles } from '../../../providers/StyleProvider';
|
|
18
|
+
const TOOLTIP_STYLES = {
|
|
19
|
+
display: 'block',
|
|
20
|
+
fill: '#dark.85',
|
|
21
|
+
color: '#white',
|
|
22
|
+
width: 'initial 36x max-content',
|
|
23
|
+
radius: true,
|
|
24
|
+
padding: '.75x 1x',
|
|
25
|
+
preset: 't3',
|
|
26
|
+
backdropFilter: 'blur(.5x)',
|
|
27
|
+
whiteSpace: 'pre-line',
|
|
28
|
+
};
|
|
29
|
+
const TIP_STYLES = {
|
|
30
|
+
position: 'absolute',
|
|
31
|
+
width: '1px',
|
|
32
|
+
height: '1px',
|
|
33
|
+
border: '.5x #clear',
|
|
34
|
+
borderTop: '.5x solid #dark.85',
|
|
35
|
+
borderBottom: '0',
|
|
36
|
+
top: {
|
|
37
|
+
'': 'initial',
|
|
38
|
+
'[data-placement="left"] | [data-placement="right"]': '50%',
|
|
39
|
+
'[data-placement="top"]': '100%',
|
|
32
40
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
width: '1px',
|
|
38
|
-
height: '1px',
|
|
39
|
-
border: '.5x #clear',
|
|
40
|
-
borderTop: '.5x solid #dark.85',
|
|
41
|
-
borderBottom: '0',
|
|
42
|
-
top: {
|
|
43
|
-
'': 'initial',
|
|
44
|
-
'[data-placement="left"] | [data-placement="right"]': '50%',
|
|
45
|
-
'[data-placement="top"]': '100%',
|
|
46
|
-
},
|
|
47
|
-
left: {
|
|
48
|
-
'': 'initial',
|
|
49
|
-
'[data-placement="top"] | [data-placement="bottom"]': '50%',
|
|
50
|
-
'[data-placement="left"]': '100%',
|
|
51
|
-
},
|
|
52
|
-
right: {
|
|
53
|
-
'': 'initial',
|
|
54
|
-
'[data-placement="right"]': '100%',
|
|
55
|
-
},
|
|
56
|
-
bottom: {
|
|
57
|
-
'': 'initial',
|
|
58
|
-
'[data-placement="bottom"]': '100%',
|
|
59
|
-
},
|
|
60
|
-
transform: {
|
|
61
|
-
'': 'translate((-.375x - 1px), 0)',
|
|
62
|
-
'[data-placement="bottom"]': 'translate((-.375x - 1px), 0) rotate(180deg)',
|
|
63
|
-
'[data-placement="left"]': 'translate(-.375x, (-.375x - 1px)) rotate(270deg)',
|
|
64
|
-
'[data-placement="right"]': 'translate(.375x, (-.375x - 1px)) rotate(90deg)',
|
|
65
|
-
},
|
|
41
|
+
left: {
|
|
42
|
+
'': 'initial',
|
|
43
|
+
'[data-placement="top"] | [data-placement="bottom"]': '50%',
|
|
44
|
+
'[data-placement="left"]': '100%',
|
|
66
45
|
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
46
|
+
right: {
|
|
47
|
+
'': 'initial',
|
|
48
|
+
'[data-placement="right"]': '100%',
|
|
49
|
+
},
|
|
50
|
+
bottom: {
|
|
51
|
+
'': 'initial',
|
|
52
|
+
'[data-placement="bottom"]': '100%',
|
|
53
|
+
},
|
|
54
|
+
transform: {
|
|
55
|
+
'': 'translate((-.375x - 1px), 0)',
|
|
56
|
+
'[data-placement="bottom"]': 'translate((-.375x - 1px), 0) rotate(180deg)',
|
|
57
|
+
'[data-placement="left"]': 'translate(-.375x, (-.375x - 1px)) rotate(270deg)',
|
|
58
|
+
'[data-placement="right"]': 'translate(.375x, (-.375x - 1px)) rotate(90deg)',
|
|
59
|
+
},
|
|
60
|
+
};
|
|
77
61
|
function Tooltip(props, ref) {
|
|
78
62
|
let { ref: overlayRef, arrowProps, state, overlayProps, minOffset, minScale, ...tooltipProviderProps } = useContext(TooltipContext);
|
|
79
63
|
let defaultRef = useRef(null);
|
|
80
64
|
overlayRef = overlayRef || defaultRef;
|
|
81
65
|
props = mergeProps(props, tooltipProviderProps);
|
|
82
66
|
let { placement = 'top', isOpen, tipStyles, showIcon, isMaterial, ...otherProps } = props;
|
|
83
|
-
const styles = extractStyles(otherProps, CONTAINER_STYLES
|
|
67
|
+
const styles = extractStyles(otherProps, CONTAINER_STYLES, {
|
|
68
|
+
...TOOLTIP_STYLES,
|
|
69
|
+
pointerEvents: isMaterial ? 'auto' : 'none',
|
|
70
|
+
...useContextStyles('Tooltip', props),
|
|
71
|
+
});
|
|
72
|
+
tipStyles = {
|
|
73
|
+
...TIP_STYLES,
|
|
74
|
+
...useContextStyles('Tooltip_Tip'),
|
|
75
|
+
...tipStyles,
|
|
76
|
+
};
|
|
84
77
|
let { tooltipProps } = useTooltip(props, state);
|
|
85
78
|
// Sync ref with overlayRef from context.
|
|
86
79
|
useImperativeHandle(ref, () => overlayRef ? createDOMRef(overlayRef) : null);
|
|
@@ -90,10 +83,9 @@ function Tooltip(props, ref) {
|
|
|
90
83
|
if (typeof minScale === 'number') {
|
|
91
84
|
minScale = String(minScale);
|
|
92
85
|
}
|
|
93
|
-
return (_jsxs(
|
|
86
|
+
return (_jsxs(Base, { ...tooltipProps, ...overlayProps, css: getOverlayTransitionCSS({ placement, minOffset, minScale }), styles: styles, mods: {
|
|
94
87
|
open: isOpen,
|
|
95
|
-
|
|
96
|
-
}, "data-min-offset": minOffset, "data-min-slale": minScale, "data-placement": placement, ref: overlayRef, children: [props.children, _jsx(TooltipTipElement, { "data-placement": placement, styles: tipStyles, ...arrowProps }, void 0)] }, void 0));
|
|
88
|
+
}, "data-placement": placement, ref: overlayRef, children: [props.children, _jsx(Base, { "data-placement": placement, styles: tipStyles, ...arrowProps }, void 0)] }, void 0));
|
|
97
89
|
}
|
|
98
90
|
/**
|
|
99
91
|
* Display container for Tooltip content. Has a directional arrow dependent on its placement.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-5cc6499
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -16,7 +16,8 @@ import { useFormProps } from '../../forms/Form';
|
|
|
16
16
|
import { useHover } from '@react-aria/interactions';
|
|
17
17
|
import { useProviderProps } from '../../../provider';
|
|
18
18
|
import { useFilter } from '@react-aria/i18n';
|
|
19
|
-
import {
|
|
19
|
+
import { Base } from '../../Base';
|
|
20
|
+
import { BLOCK_STYLES, extractStyles, OUTER_STYLES, } from '../../../tasty';
|
|
20
21
|
import { useFocus } from '../../../utils/react/interactions';
|
|
21
22
|
import { modAttrs, useCombinedRefs } from '../../../utils/react';
|
|
22
23
|
import { FieldWrapper } from '../../forms/FieldWrapper';
|
|
@@ -28,46 +29,33 @@ import { Item } from '@react-stately/collections';
|
|
|
28
29
|
import { DEFAULT_INPUT_STYLES } from '../../forms/TextInput/TextInputBase';
|
|
29
30
|
import { useOverlayPosition } from '@react-aria/overlays';
|
|
30
31
|
import { OverlayWrapper } from '../../overlays/OverlayWrapper';
|
|
32
|
+
import { useContextStyles } from '../../../providers/StyleProvider';
|
|
31
33
|
const CaretDownIcon = () => (_jsx("svg", { "aria-hidden": "true", width: "14", height: "14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M11.49 4.102H2.51c-.269 0-.42.284-.253.478l4.49 5.206a.342.342 0 00.506 0l4.49-5.206c.167-.194.016-.478-.253-.478z", fill: "currentColor" }, void 0) }, void 0));
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
const COMBOBOX_STYLES = {
|
|
35
|
+
position: 'relative',
|
|
36
|
+
display: 'grid',
|
|
37
|
+
};
|
|
38
|
+
const INPUT_STYLES = {
|
|
39
|
+
...DEFAULT_INPUT_STYLES,
|
|
40
|
+
width: '100%',
|
|
41
|
+
};
|
|
42
|
+
const TRIGGER_STYLES = {
|
|
43
|
+
display: 'grid',
|
|
44
|
+
placeItems: 'center',
|
|
45
|
+
placeContent: 'center',
|
|
46
|
+
placeSelf: 'stretch',
|
|
47
|
+
radius: 'right',
|
|
48
|
+
padding: '0 1x',
|
|
49
|
+
color: 'inherit',
|
|
50
|
+
border: 0,
|
|
51
|
+
fill: {
|
|
52
|
+
'': '#purple.0',
|
|
53
|
+
hovered: '#dark.04',
|
|
54
|
+
pressed: '#dark.08',
|
|
55
|
+
disabled: '#clear',
|
|
40
56
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
as: 'input',
|
|
44
|
-
styles: {
|
|
45
|
-
...DEFAULT_INPUT_STYLES,
|
|
46
|
-
width: '100%',
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
const TriggerElement = tasty({
|
|
50
|
-
as: 'button',
|
|
51
|
-
styles: {
|
|
52
|
-
display: 'grid',
|
|
53
|
-
placeItems: 'center',
|
|
54
|
-
placeContent: 'center',
|
|
55
|
-
placeSelf: 'stretch',
|
|
56
|
-
radius: 'right',
|
|
57
|
-
padding: '0 1x',
|
|
58
|
-
color: 'inherit',
|
|
59
|
-
border: 0,
|
|
60
|
-
reset: 'button',
|
|
61
|
-
margin: 0,
|
|
62
|
-
fill: {
|
|
63
|
-
'': '#purple.0',
|
|
64
|
-
hovered: '#dark.04',
|
|
65
|
-
pressed: '#dark.08',
|
|
66
|
-
disabled: '#clear',
|
|
67
|
-
},
|
|
68
|
-
cursor: 'pointer',
|
|
69
|
-
},
|
|
70
|
-
});
|
|
57
|
+
cursor: 'pointer',
|
|
58
|
+
};
|
|
71
59
|
function ComboBox(props, ref) {
|
|
72
60
|
var _a;
|
|
73
61
|
props = useProviderProps(props);
|
|
@@ -82,8 +70,21 @@ function ComboBox(props, ref) {
|
|
|
82
70
|
defaultFilter: filter || contains,
|
|
83
71
|
allowsEmptyCollection: isAsync,
|
|
84
72
|
});
|
|
85
|
-
const outerStyles = extractStyles(otherProps, OUTER_STYLES,
|
|
86
|
-
|
|
73
|
+
const outerStyles = extractStyles(otherProps, OUTER_STYLES, {
|
|
74
|
+
...COMBOBOX_STYLES,
|
|
75
|
+
...useContextStyles('ComboBox_Wrapper', props),
|
|
76
|
+
...styles,
|
|
77
|
+
});
|
|
78
|
+
inputStyles = extractStyles(otherProps, BLOCK_STYLES, {
|
|
79
|
+
...INPUT_STYLES,
|
|
80
|
+
...useContextStyles('ComboBox', props),
|
|
81
|
+
...inputStyles,
|
|
82
|
+
});
|
|
83
|
+
triggerStyles = {
|
|
84
|
+
...TRIGGER_STYLES,
|
|
85
|
+
...useContextStyles('ComboBox_Trigger', props),
|
|
86
|
+
...triggerStyles,
|
|
87
|
+
};
|
|
87
88
|
ref = useCombinedRefs(ref);
|
|
88
89
|
inputRef = useCombinedRefs(inputRef);
|
|
89
90
|
triggerRef = useCombinedRefs(triggerRef);
|
|
@@ -121,7 +122,7 @@ function ComboBox(props, ref) {
|
|
|
121
122
|
let validationIcon = isInvalid ? (_jsx(WarningOutlined, { style: { color: 'var(--danger-color)' } }, void 0)) : (_jsx(CheckOutlined, { style: { color: 'var(--success-color)' } }, void 0));
|
|
122
123
|
let validation = cloneElement(validationIcon);
|
|
123
124
|
let comboBoxWidth = (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth;
|
|
124
|
-
let comboBoxField = (_jsxs(
|
|
125
|
+
let comboBoxField = (_jsxs(Base, { ref: ref, qa: "ComboBoxWrapper", ...modAttrs({
|
|
125
126
|
invalid: isInvalid,
|
|
126
127
|
valid: validationState === 'valid',
|
|
127
128
|
disabled: isDisabled,
|
|
@@ -129,13 +130,13 @@ function ComboBox(props, ref) {
|
|
|
129
130
|
focused: isFocused,
|
|
130
131
|
}), styles: outerStyles, style: {
|
|
131
132
|
zIndex: isFocused ? 1 : 'initial',
|
|
132
|
-
}, "data-size": size, children: [_jsx(
|
|
133
|
+
}, "data-size": size, children: [_jsx(Base, { qa: qa || 'ComboBox', as: "input", ...mergeProps(inputProps, hoverProps, focusProps), ref: inputRef, autoComplete: autoComplete, styles: inputStyles, ...modAttrs({
|
|
133
134
|
invalid: isInvalid,
|
|
134
135
|
valid: validationState === 'valid',
|
|
135
136
|
disabled: isDisabled,
|
|
136
137
|
hovered: isHovered,
|
|
137
138
|
focused: isFocused,
|
|
138
|
-
}), "data-size": size }, void 0), prefix ? (_jsx(Prefix, { onWidthChange: setPrefixWidth, padding: "0 1x 0 1.5x", opacity: isDisabled ? '@disabled-opacity' : false, placeItems: "center", outerGap: 0, children: prefix }, void 0)) : null, _jsxs(Suffix, { onWidthChange: setSuffixWidth, opacity: isDisabled ? '@disabled-opacity' : false, children: [validationState || isLoading ? (_jsxs(Space, { gap: false, padding: "0 1x", children: [validationState && !isLoading ? validation : null, isLoading && _jsx(LoadingOutlined, {}, void 0)] }, void 0)) : null, suffix, !hideTrigger ? (_jsx(
|
|
139
|
+
}), "data-size": size }, void 0), prefix ? (_jsx(Prefix, { onWidthChange: setPrefixWidth, padding: "0 1x 0 1.5x", opacity: isDisabled ? '@disabled-opacity' : false, placeItems: "center", outerGap: 0, children: prefix }, void 0)) : null, _jsxs(Suffix, { onWidthChange: setSuffixWidth, opacity: isDisabled ? '@disabled-opacity' : false, children: [validationState || isLoading ? (_jsxs(Space, { gap: false, padding: "0 1x", children: [validationState && !isLoading ? validation : null, isLoading && _jsx(LoadingOutlined, {}, void 0)] }, void 0)) : null, suffix, !hideTrigger ? (_jsx(Base, { as: "button", ...mergeProps(buttonProps, triggerFocusProps, triggerHoverProps), ...modAttrs({
|
|
139
140
|
pressed: isTriggerPressed,
|
|
140
141
|
focused: isTriggerFocused,
|
|
141
142
|
hovered: isTriggerHovered,
|