@cube-dev/ui-kit 0.0.0-canary-423c3d2 → 0.0.0-canary-ed2a55b
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 +8 -7
- package/cjs/components/HiddenInput.js +1 -1
- package/cjs/components/OpenTrasition.js +1 -1
- package/cjs/components/Root.js +6 -3
- package/cjs/components/actions/Action.js +2 -3
- package/cjs/components/actions/Button/Button.js +2 -5
- 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 +9 -11
- package/cjs/components/actions/index.js +1 -1
- package/cjs/components/content/ActiveZone/ActiveZone.js +2 -3
- package/cjs/components/content/Alert/Alert.js +6 -8
- 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 +2 -3
- package/cjs/components/content/Badge/Badge.js +3 -3
- package/cjs/components/content/Card/Card.js +15 -13
- package/cjs/components/content/Content.js +3 -3
- package/cjs/components/content/CopySnippet/CopySnippet.js +57 -21
- 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 +36 -18
- 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 +11 -13
- package/cjs/components/content/Text.js +3 -3
- package/cjs/components/content/Title.js +3 -3
- package/cjs/components/forms/Checkbox/Checkbox.js +57 -61
- package/cjs/components/forms/Checkbox/CheckboxGroup.js +21 -35
- package/cjs/components/forms/Checkbox/context.js +1 -1
- package/cjs/components/forms/FieldWrapper.js +4 -4
- package/cjs/components/forms/FileInput/FileInput.js +45 -49
- package/cjs/components/forms/Form/Field.js +1 -1
- package/cjs/components/forms/Form/Form.js +13 -11
- 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 +4 -6
- 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 +95 -92
- package/cjs/components/forms/RadioGroup/RadioGroup.js +20 -35
- 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 +72 -76
- 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 +24 -20
- package/cjs/components/forms/index.js +1 -1
- package/cjs/components/layout/Flex.js +9 -8
- package/cjs/components/layout/Flow.js +9 -8
- package/cjs/components/layout/Grid.js +9 -9
- package/cjs/components/layout/Prefix.js +19 -17
- package/cjs/components/layout/Space.js +21 -17
- package/cjs/components/layout/Suffix.js +19 -17
- package/cjs/components/navigation/LegacyTabs/LegacyTabs.js +64 -41
- package/cjs/components/navigation/Link/Link.js +1 -1
- package/cjs/components/organisms/FileTabs/FileTabs.js +73 -50
- 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 +60 -62
- 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 +23 -26
- package/cjs/components/overlays/Modal/Tray.js +24 -24
- package/cjs/components/overlays/Modal/Underlay.js +25 -31
- package/cjs/components/overlays/Modal/index.js +1 -1
- package/cjs/components/overlays/Notification/Notification.js +53 -10
- package/cjs/components/overlays/OverlayWrapper.js +1 -1
- package/cjs/components/overlays/Tooltip/Tooltip.js +69 -58
- 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 +44 -45
- package/cjs/components/pickers/Menu/Menu.js +4 -10
- 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 +10 -11
- package/cjs/components/pickers/Select/Select.js +117 -113
- 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 +3 -2
- 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 +8 -3
- 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 +2 -1
- 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 +6 -1
- 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 +4 -3
- 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 +13 -9
- 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 +8 -7
- package/es/components/HiddenInput.js +1 -1
- package/es/components/OpenTrasition.js +1 -1
- package/es/components/Root.js +7 -4
- package/es/components/actions/Action.js +3 -4
- package/es/components/actions/Button/Button.js +2 -5
- 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 +9 -11
- package/es/components/actions/index.js +1 -1
- package/es/components/content/ActiveZone/ActiveZone.js +3 -4
- package/es/components/content/Alert/Alert.js +6 -8
- 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 +3 -4
- package/es/components/content/Badge/Badge.js +3 -3
- package/es/components/content/Card/Card.js +16 -14
- package/es/components/content/Content.js +3 -3
- package/es/components/content/CopySnippet/CopySnippet.js +57 -21
- 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 +34 -19
- 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 +11 -13
- package/es/components/content/Text.js +3 -3
- package/es/components/content/Title.js +3 -3
- package/es/components/forms/Checkbox/Checkbox.js +58 -62
- package/es/components/forms/Checkbox/CheckboxGroup.js +22 -36
- package/es/components/forms/Checkbox/context.js +1 -1
- package/es/components/forms/FieldWrapper.js +4 -4
- package/es/components/forms/FileInput/FileInput.js +46 -50
- package/es/components/forms/Form/Field.js +1 -1
- package/es/components/forms/Form/Form.js +14 -12
- 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 +4 -6
- 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 +96 -93
- package/es/components/forms/RadioGroup/RadioGroup.js +21 -36
- 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 +74 -78
- 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 +25 -21
- package/es/components/forms/index.js +1 -1
- package/es/components/layout/Flex.js +10 -9
- package/es/components/layout/Flow.js +10 -9
- package/es/components/layout/Grid.js +10 -10
- package/es/components/layout/Prefix.js +20 -18
- package/es/components/layout/Space.js +22 -18
- package/es/components/layout/Suffix.js +20 -18
- package/es/components/navigation/LegacyTabs/LegacyTabs.js +61 -41
- package/es/components/navigation/Link/Link.js +1 -1
- package/es/components/organisms/FileTabs/FileTabs.js +70 -50
- 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 +61 -63
- 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 +23 -26
- package/es/components/overlays/Modal/Tray.js +24 -24
- package/es/components/overlays/Modal/Underlay.js +25 -31
- package/es/components/overlays/Modal/index.js +1 -1
- package/es/components/overlays/Notification/Notification.js +53 -10
- package/es/components/overlays/OverlayWrapper.js +1 -1
- package/es/components/overlays/Tooltip/Tooltip.js +68 -60
- 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 +45 -46
- package/es/components/pickers/Menu/Menu.js +4 -10
- 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 +10 -11
- package/es/components/pickers/Select/Select.js +116 -115
- 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 +7 -3
- 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 +2 -1
- 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 +6 -1
- 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 +4 -3
- 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 +13 -9
- package/package.json +4 -4
- package/types/components/content/Tag/Tag.d.ts +2 -1
- package/types/components/overlays/Dialog/Dialog.d.ts +2 -1
- package/types/components/overlays/Tooltip/Tooltip.d.ts +2 -1
- package/types/components/pickers/Menu/MenuItem.d.ts +2 -1
- package/types/components/pickers/Menu/MenuSection.d.ts +8 -3
- package/types/tasty/index.d.ts +1 -1
- package/types/tasty/tasty.d.ts +8 -4
- package/types/tokens.d.ts +4 -0
|
@@ -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-ed2a55b
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -15,14 +15,61 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
15
15
|
const Action_1 = require("../../actions/Action");
|
|
16
16
|
const Card_1 = require("../../content/Card/Card");
|
|
17
17
|
const Block_1 = require("../../Block");
|
|
18
|
-
const Flex_1 = require("../../layout/Flex");
|
|
19
18
|
const themes_1 = __importDefault(require("../../../data/themes"));
|
|
20
19
|
const icons_1 = require("@ant-design/icons");
|
|
20
|
+
const tasty_1 = require("../../../tasty");
|
|
21
|
+
const NotificationElement = (0, tasty_1.tasty)(Card_1.Card, {
|
|
22
|
+
role: 'region',
|
|
23
|
+
styles: {
|
|
24
|
+
display: 'grid',
|
|
25
|
+
color: '#dark',
|
|
26
|
+
padding: '.5x',
|
|
27
|
+
shadow: '0 5px 15px #dark.10',
|
|
28
|
+
border: false,
|
|
29
|
+
margin: '1x bottom',
|
|
30
|
+
radius: '1.5r',
|
|
31
|
+
gridColumns: 'auto 1fr auto',
|
|
32
|
+
placeItems: 'center start',
|
|
33
|
+
gap: '2x',
|
|
34
|
+
preset: 't3',
|
|
35
|
+
Icon: {
|
|
36
|
+
display: 'flex',
|
|
37
|
+
radius: '1r',
|
|
38
|
+
width: '5x',
|
|
39
|
+
height: '5x',
|
|
40
|
+
placeContent: 'center',
|
|
41
|
+
placeItems: 'center',
|
|
42
|
+
preset: 't2',
|
|
43
|
+
color: {
|
|
44
|
+
'': '#dark.75',
|
|
45
|
+
...Object.keys(themes_1.default).reduce((map, theme) => {
|
|
46
|
+
map[`[data-theme="${theme}"]`] = themes_1.default[theme].color;
|
|
47
|
+
return map;
|
|
48
|
+
}, {}),
|
|
49
|
+
},
|
|
50
|
+
fill: {
|
|
51
|
+
'': '#clear',
|
|
52
|
+
...Object.keys(themes_1.default).reduce((map, theme) => {
|
|
53
|
+
map[`[data-theme="${theme}"]`] = themes_1.default[theme].fill;
|
|
54
|
+
return map;
|
|
55
|
+
}, {}),
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
const CloseButton = (0, tasty_1.tasty)(Action_1.Action, {
|
|
61
|
+
styles: {
|
|
62
|
+
color: { '': '#dark.75', hovered: '#purple' },
|
|
63
|
+
width: '5x',
|
|
64
|
+
height: '5x',
|
|
65
|
+
label: 'Close',
|
|
66
|
+
},
|
|
67
|
+
});
|
|
21
68
|
function Notification(allProps) {
|
|
22
|
-
let { type, children, onClose, ...props } = allProps;
|
|
23
|
-
|
|
69
|
+
let { theme, type, children, onClose, ...props } = allProps;
|
|
70
|
+
theme = theme || type || 'note';
|
|
24
71
|
let Icon;
|
|
25
|
-
switch (
|
|
72
|
+
switch (theme) {
|
|
26
73
|
case 'success':
|
|
27
74
|
Icon = icons_1.CheckOutlined;
|
|
28
75
|
break;
|
|
@@ -33,11 +80,7 @@ function Notification(allProps) {
|
|
|
33
80
|
Icon = icons_1.InfoOutlined;
|
|
34
81
|
break;
|
|
35
82
|
}
|
|
36
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
37
|
-
gridColumns: 'auto 1fr auto',
|
|
38
|
-
placeItems: 'center start',
|
|
39
|
-
gap: '2x',
|
|
40
|
-
}, ...props, children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { radius: "1r", width: "5x", height: "5x", placeContent: "center", placeItems: "center", fill: themes_1.default[type] ? themes_1.default[type].fill : '#clear', color: themes_1.default[type] ? themes_1.default[type].color : '#dark.75', children: (0, jsx_runtime_1.jsx)(Icon, { style: { fontSize: 16 } }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(Block_1.Block, { children: children }, void 0), (0, jsx_runtime_1.jsx)(Action_1.Action, { color: { '': '#dark.75', hovered: '#purple' }, width: "5x", height: "5x", onPress: onClose, label: "Close", children: (0, jsx_runtime_1.jsx)(icons_1.CloseOutlined, {}, void 0) }, void 0)] }, void 0));
|
|
83
|
+
return ((0, jsx_runtime_1.jsxs)(NotificationElement, { ...props, "data-theme": theme, children: [(0, jsx_runtime_1.jsx)("div", { "data-element": "Icon", children: (0, jsx_runtime_1.jsx)(Icon, {}, void 0) }, void 0), (0, jsx_runtime_1.jsx)(Block_1.Block, { children: children }, void 0), (0, jsx_runtime_1.jsx)(CloseButton, { onPress: onClose, children: (0, jsx_runtime_1.jsx)(icons_1.CloseOutlined, {}, void 0) }, void 0)] }, void 0));
|
|
41
84
|
}
|
|
42
85
|
exports.Notification = Notification;
|
|
43
86
|
|
|
@@ -1,11 +1,14 @@
|
|
|
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-ed2a55b
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
"use strict";
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
9
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
13
|
exports.Tooltip = void 0;
|
|
11
14
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -14,81 +17,89 @@ const react_2 = require("../../../utils/react");
|
|
|
14
17
|
const utils_1 = require("@react-spectrum/utils");
|
|
15
18
|
const context_1 = require("./context");
|
|
16
19
|
const tooltip_1 = require("@react-aria/tooltip");
|
|
17
|
-
const Base_1 = require("../../Base");
|
|
18
20
|
const tasty_1 = require("../../../tasty");
|
|
19
21
|
const transitions_1 = require("../../../utils/transitions");
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
border: '.5x #clear',
|
|
37
|
-
borderTop: '.5x solid #dark.85',
|
|
38
|
-
borderBottom: '0',
|
|
39
|
-
top: {
|
|
40
|
-
'': 'initial',
|
|
41
|
-
'[data-placement="left"] | [data-placement="right"]': '50%',
|
|
42
|
-
'[data-placement="top"]': '100%',
|
|
43
|
-
},
|
|
44
|
-
left: {
|
|
45
|
-
'': 'initial',
|
|
46
|
-
'[data-placement="top"] | [data-placement="bottom"]': '50%',
|
|
47
|
-
'[data-placement="left"]': '100%',
|
|
48
|
-
},
|
|
49
|
-
right: {
|
|
50
|
-
'': 'initial',
|
|
51
|
-
'[data-placement="right"]': '100%',
|
|
22
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
23
|
+
const TooltipElement = (0, tasty_1.tasty)({
|
|
24
|
+
styles: {
|
|
25
|
+
display: 'block',
|
|
26
|
+
fill: '#dark.85',
|
|
27
|
+
color: '#white',
|
|
28
|
+
width: 'initial 36x max-content',
|
|
29
|
+
radius: true,
|
|
30
|
+
padding: '.75x 1x',
|
|
31
|
+
preset: 't3',
|
|
32
|
+
backdropFilter: 'blur(.5x)',
|
|
33
|
+
whiteSpace: 'pre-line',
|
|
34
|
+
pointerEvents: {
|
|
35
|
+
'': 'none',
|
|
36
|
+
material: 'auto',
|
|
37
|
+
},
|
|
52
38
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
39
|
+
});
|
|
40
|
+
const TooltipTipElement = (0, tasty_1.tasty)({
|
|
41
|
+
styles: {
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
width: '1px',
|
|
44
|
+
height: '1px',
|
|
45
|
+
border: '.5x #clear',
|
|
46
|
+
borderTop: '.5x solid #dark.85',
|
|
47
|
+
borderBottom: '0',
|
|
48
|
+
top: {
|
|
49
|
+
'': 'initial',
|
|
50
|
+
'[data-placement="left"] | [data-placement="right"]': '50%',
|
|
51
|
+
'[data-placement="top"]': '100%',
|
|
52
|
+
},
|
|
53
|
+
left: {
|
|
54
|
+
'': 'initial',
|
|
55
|
+
'[data-placement="top"] | [data-placement="bottom"]': '50%',
|
|
56
|
+
'[data-placement="left"]': '100%',
|
|
57
|
+
},
|
|
58
|
+
right: {
|
|
59
|
+
'': 'initial',
|
|
60
|
+
'[data-placement="right"]': '100%',
|
|
61
|
+
},
|
|
62
|
+
bottom: {
|
|
63
|
+
'': 'initial',
|
|
64
|
+
'[data-placement="bottom"]': '100%',
|
|
65
|
+
},
|
|
66
|
+
transform: {
|
|
67
|
+
'': 'translate((-.375x - 1px), 0)',
|
|
68
|
+
'[data-placement="bottom"]': 'translate((-.375x - 1px), 0) rotate(180deg)',
|
|
69
|
+
'[data-placement="left"]': 'translate(-.375x, (-.375x - 1px)) rotate(270deg)',
|
|
70
|
+
'[data-placement="right"]': 'translate(.375x, (-.375x - 1px)) rotate(90deg)',
|
|
71
|
+
},
|
|
56
72
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
73
|
+
});
|
|
74
|
+
const StyledTooltipElement = (0, styled_components_1.default)(TooltipElement) `
|
|
75
|
+
${(props) => {
|
|
76
|
+
return (0, transitions_1.getOverlayTransitionCSS)({
|
|
77
|
+
placement: props === null || props === void 0 ? void 0 : props['data-position'],
|
|
78
|
+
minOffset: props === null || props === void 0 ? void 0 : props['data-min-offset'],
|
|
79
|
+
minScale: props === null || props === void 0 ? void 0 : props['data-min-scale'],
|
|
80
|
+
});
|
|
81
|
+
}}
|
|
82
|
+
`;
|
|
64
83
|
function Tooltip(props, ref) {
|
|
65
84
|
let { ref: overlayRef, arrowProps, state, overlayProps, minOffset, minScale, ...tooltipProviderProps } = (0, react_1.useContext)(context_1.TooltipContext);
|
|
66
85
|
let defaultRef = (0, react_1.useRef)(null);
|
|
67
|
-
|
|
86
|
+
const finalOverlayRef = overlayRef !== null && overlayRef !== void 0 ? overlayRef : defaultRef;
|
|
68
87
|
props = (0, react_2.mergeProps)(props, tooltipProviderProps);
|
|
69
88
|
let { placement = 'top', isOpen, tipStyles, showIcon, isMaterial, ...otherProps } = props;
|
|
70
|
-
const styles = (0, tasty_1.extractStyles)(otherProps, tasty_1.CONTAINER_STYLES
|
|
71
|
-
...TOOLTIP_STYLES,
|
|
72
|
-
pointerEvents: isMaterial ? 'auto' : 'none',
|
|
73
|
-
...(0, StyleProvider_1.useContextStyles)('Tooltip', props),
|
|
74
|
-
});
|
|
75
|
-
tipStyles = {
|
|
76
|
-
...TIP_STYLES,
|
|
77
|
-
...(0, StyleProvider_1.useContextStyles)('Tooltip_Tip'),
|
|
78
|
-
...tipStyles,
|
|
79
|
-
};
|
|
89
|
+
const styles = (0, tasty_1.extractStyles)(otherProps, tasty_1.CONTAINER_STYLES);
|
|
80
90
|
let { tooltipProps } = (0, tooltip_1.useTooltip)(props, state);
|
|
81
91
|
// Sync ref with overlayRef from context.
|
|
82
|
-
(0, react_1.useImperativeHandle)(ref, () =>
|
|
92
|
+
(0, react_1.useImperativeHandle)(ref, () => (0, utils_1.createDOMRef)(finalOverlayRef));
|
|
83
93
|
if (typeof minOffset === 'number') {
|
|
84
94
|
minOffset = `${minOffset}px`;
|
|
85
95
|
}
|
|
86
96
|
if (typeof minScale === 'number') {
|
|
87
97
|
minScale = String(minScale);
|
|
88
98
|
}
|
|
89
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
99
|
+
return ((0, jsx_runtime_1.jsxs)(StyledTooltipElement, { ...tooltipProps, ...overlayProps, styles: styles, mods: {
|
|
90
100
|
open: isOpen,
|
|
91
|
-
|
|
101
|
+
material: isMaterial,
|
|
102
|
+
}, "data-min-offset": minOffset, "data-min-slale": minScale, "data-placement": placement, ref: overlayRef, children: [props.children, (0, jsx_runtime_1.jsx)(TooltipTipElement, { "data-placement": placement, styles: tipStyles, ...arrowProps }, void 0)] }, void 0));
|
|
92
103
|
}
|
|
93
104
|
/**
|
|
94
105
|
* 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-ed2a55b
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -19,7 +19,6 @@ const Form_1 = require("../../forms/Form");
|
|
|
19
19
|
const interactions_1 = require("@react-aria/interactions");
|
|
20
20
|
const provider_1 = require("../../../provider");
|
|
21
21
|
const i18n_1 = require("@react-aria/i18n");
|
|
22
|
-
const Base_1 = require("../../Base");
|
|
23
22
|
const tasty_1 = require("../../../tasty");
|
|
24
23
|
const interactions_2 = require("../../../utils/react/interactions");
|
|
25
24
|
const react_2 = require("../../../utils/react");
|
|
@@ -32,33 +31,46 @@ const collections_1 = require("@react-stately/collections");
|
|
|
32
31
|
const TextInputBase_1 = require("../../forms/TextInput/TextInputBase");
|
|
33
32
|
const overlays_1 = require("@react-aria/overlays");
|
|
34
33
|
const OverlayWrapper_1 = require("../../overlays/OverlayWrapper");
|
|
35
|
-
const StyleProvider_1 = require("../../../providers/StyleProvider");
|
|
36
34
|
const CaretDownIcon = () => ((0, jsx_runtime_1.jsx)("svg", { "aria-hidden": "true", width: "14", height: "14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.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));
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
const TRIGGER_STYLES = {
|
|
46
|
-
display: 'grid',
|
|
47
|
-
placeItems: 'center',
|
|
48
|
-
placeContent: 'center',
|
|
49
|
-
placeSelf: 'stretch',
|
|
50
|
-
radius: 'right',
|
|
51
|
-
padding: '0 1x',
|
|
52
|
-
color: 'inherit',
|
|
53
|
-
border: 0,
|
|
54
|
-
fill: {
|
|
55
|
-
'': '#purple.0',
|
|
56
|
-
hovered: '#dark.04',
|
|
57
|
-
pressed: '#dark.08',
|
|
58
|
-
disabled: '#clear',
|
|
35
|
+
const ComboBoxWrapperElement = (0, tasty_1.tasty)({
|
|
36
|
+
styles: {
|
|
37
|
+
position: 'relative',
|
|
38
|
+
display: 'grid',
|
|
39
|
+
zIndex: {
|
|
40
|
+
'': 'initial',
|
|
41
|
+
focused: 1,
|
|
42
|
+
},
|
|
59
43
|
},
|
|
60
|
-
|
|
61
|
-
|
|
44
|
+
});
|
|
45
|
+
const InputElement = (0, tasty_1.tasty)({
|
|
46
|
+
as: 'input',
|
|
47
|
+
styles: {
|
|
48
|
+
...TextInputBase_1.DEFAULT_INPUT_STYLES,
|
|
49
|
+
width: '100%',
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
const TriggerElement = (0, tasty_1.tasty)({
|
|
53
|
+
as: 'button',
|
|
54
|
+
styles: {
|
|
55
|
+
display: 'grid',
|
|
56
|
+
placeItems: 'center',
|
|
57
|
+
placeContent: 'center',
|
|
58
|
+
placeSelf: 'stretch',
|
|
59
|
+
radius: 'right',
|
|
60
|
+
padding: '0 1x',
|
|
61
|
+
color: 'inherit',
|
|
62
|
+
border: 0,
|
|
63
|
+
reset: 'button',
|
|
64
|
+
margin: 0,
|
|
65
|
+
fill: {
|
|
66
|
+
'': '#purple.0',
|
|
67
|
+
hovered: '#dark.04',
|
|
68
|
+
pressed: '#dark.08',
|
|
69
|
+
disabled: '#clear',
|
|
70
|
+
},
|
|
71
|
+
cursor: 'pointer',
|
|
72
|
+
},
|
|
73
|
+
});
|
|
62
74
|
function ComboBox(props, ref) {
|
|
63
75
|
var _a;
|
|
64
76
|
props = (0, provider_1.useProviderProps)(props);
|
|
@@ -73,21 +85,8 @@ function ComboBox(props, ref) {
|
|
|
73
85
|
defaultFilter: filter || contains,
|
|
74
86
|
allowsEmptyCollection: isAsync,
|
|
75
87
|
});
|
|
76
|
-
const outerStyles = (0, tasty_1.extractStyles)(otherProps, tasty_1.OUTER_STYLES,
|
|
77
|
-
|
|
78
|
-
...(0, StyleProvider_1.useContextStyles)('ComboBox_Wrapper', props),
|
|
79
|
-
...styles,
|
|
80
|
-
});
|
|
81
|
-
inputStyles = (0, tasty_1.extractStyles)(otherProps, tasty_1.BLOCK_STYLES, {
|
|
82
|
-
...INPUT_STYLES,
|
|
83
|
-
...(0, StyleProvider_1.useContextStyles)('ComboBox', props),
|
|
84
|
-
...inputStyles,
|
|
85
|
-
});
|
|
86
|
-
triggerStyles = {
|
|
87
|
-
...TRIGGER_STYLES,
|
|
88
|
-
...(0, StyleProvider_1.useContextStyles)('ComboBox_Trigger', props),
|
|
89
|
-
...triggerStyles,
|
|
90
|
-
};
|
|
88
|
+
const outerStyles = (0, tasty_1.extractStyles)(otherProps, tasty_1.OUTER_STYLES, styles);
|
|
89
|
+
inputStyles = (0, tasty_1.extractStyles)(otherProps, tasty_1.BLOCK_STYLES, inputStyles);
|
|
91
90
|
ref = (0, react_2.useCombinedRefs)(ref);
|
|
92
91
|
inputRef = (0, react_2.useCombinedRefs)(inputRef);
|
|
93
92
|
triggerRef = (0, react_2.useCombinedRefs)(triggerRef);
|
|
@@ -125,7 +124,7 @@ function ComboBox(props, ref) {
|
|
|
125
124
|
let validationIcon = isInvalid ? ((0, jsx_runtime_1.jsx)(icons_1.WarningOutlined, { style: { color: 'var(--danger-color)' } }, void 0)) : ((0, jsx_runtime_1.jsx)(icons_1.CheckOutlined, { style: { color: 'var(--success-color)' } }, void 0));
|
|
126
125
|
let validation = (0, react_1.cloneElement)(validationIcon);
|
|
127
126
|
let comboBoxWidth = (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth;
|
|
128
|
-
let comboBoxField = ((0, jsx_runtime_1.jsxs)(
|
|
127
|
+
let comboBoxField = ((0, jsx_runtime_1.jsxs)(ComboBoxWrapperElement, { ref: ref, qa: qa || 'ComboBox', ...(0, react_2.modAttrs)({
|
|
129
128
|
invalid: isInvalid,
|
|
130
129
|
valid: validationState === 'valid',
|
|
131
130
|
disabled: isDisabled,
|
|
@@ -133,13 +132,13 @@ function ComboBox(props, ref) {
|
|
|
133
132
|
focused: isFocused,
|
|
134
133
|
}), styles: outerStyles, style: {
|
|
135
134
|
zIndex: isFocused ? 1 : 'initial',
|
|
136
|
-
}, "data-size": size, children: [(0, jsx_runtime_1.jsx)(
|
|
135
|
+
}, "data-size": size, children: [(0, jsx_runtime_1.jsx)(InputElement, { qa: "Input", ...(0, utils_1.mergeProps)(inputProps, hoverProps, focusProps), ref: inputRef, autoComplete: autoComplete, styles: inputStyles, ...(0, react_2.modAttrs)({
|
|
137
136
|
invalid: isInvalid,
|
|
138
137
|
valid: validationState === 'valid',
|
|
139
138
|
disabled: isDisabled,
|
|
140
139
|
hovered: isHovered,
|
|
141
140
|
focused: isFocused,
|
|
142
|
-
}), "data-size": size }, void 0), prefix ? ((0, jsx_runtime_1.jsx)(Prefix_1.Prefix, { onWidthChange: setPrefixWidth, padding: "0 1x 0 1.5x", opacity: isDisabled ? '@disabled-opacity' : false, placeItems: "center", outerGap: 0, children: prefix }, void 0)) : null, (0, jsx_runtime_1.jsxs)(Suffix_1.Suffix, { onWidthChange: setSuffixWidth, opacity: isDisabled ? '@disabled-opacity' : false, children: [validationState || isLoading ? ((0, jsx_runtime_1.jsxs)(Space_1.Space, { gap: false, padding: "0 1x", children: [validationState && !isLoading ? validation : null, isLoading && (0, jsx_runtime_1.jsx)(icons_1.LoadingOutlined, {}, void 0)] }, void 0)) : null, suffix, !hideTrigger ? ((0, jsx_runtime_1.jsx)(
|
|
141
|
+
}), "data-size": size }, void 0), prefix ? ((0, jsx_runtime_1.jsx)(Prefix_1.Prefix, { onWidthChange: setPrefixWidth, padding: "0 1x 0 1.5x", opacity: isDisabled ? '@disabled-opacity' : false, placeItems: "center", outerGap: 0, children: prefix }, void 0)) : null, (0, jsx_runtime_1.jsxs)(Suffix_1.Suffix, { onWidthChange: setSuffixWidth, opacity: isDisabled ? '@disabled-opacity' : false, children: [validationState || isLoading ? ((0, jsx_runtime_1.jsxs)(Space_1.Space, { gap: false, padding: "0 1x", children: [validationState && !isLoading ? validation : null, isLoading && (0, jsx_runtime_1.jsx)(icons_1.LoadingOutlined, {}, void 0)] }, void 0)) : null, suffix, !hideTrigger ? ((0, jsx_runtime_1.jsx)(TriggerElement, { ...(0, utils_1.mergeProps)(buttonProps, triggerFocusProps, triggerHoverProps), ...(0, react_2.modAttrs)({
|
|
143
142
|
pressed: isTriggerPressed,
|
|
144
143
|
focused: isTriggerFocused,
|
|
145
144
|
hovered: isTriggerHovered,
|
|
@@ -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-ed2a55b
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -23,9 +23,8 @@ const styled_1 = require("./styled");
|
|
|
23
23
|
const MenuItem_1 = require("./MenuItem");
|
|
24
24
|
const MenuSection_1 = require("./MenuSection");
|
|
25
25
|
const context_1 = require("./context");
|
|
26
|
-
const StyleProvider_1 = require("../../../providers/StyleProvider");
|
|
27
26
|
function Menu(props, ref) {
|
|
28
|
-
const { header, footer
|
|
27
|
+
const { header, footer } = props;
|
|
29
28
|
const domRef = (0, utils_2.useDOMRef)(ref);
|
|
30
29
|
const contextProps = (0, context_1.useMenuContext)();
|
|
31
30
|
const completeProps = (0, utils_1.mergeProps)(contextProps, props);
|
|
@@ -33,14 +32,9 @@ function Menu(props, ref) {
|
|
|
33
32
|
const items = [...state.collection];
|
|
34
33
|
const hasSections = items.some((item) => item.type === 'section');
|
|
35
34
|
const { menuProps } = (0, menu_1.useMenu)(completeProps, state, domRef);
|
|
36
|
-
const
|
|
37
|
-
const containerStyles = (0, tasty_1.extractStyles)(completeProps, tasty_1.CONTAINER_STYLES);
|
|
35
|
+
const styles = (0, tasty_1.extractStyles)(completeProps, tasty_1.CONTAINER_STYLES);
|
|
38
36
|
const baseProps = {
|
|
39
|
-
styles
|
|
40
|
-
...menuStyles,
|
|
41
|
-
...containerStyles,
|
|
42
|
-
...styles,
|
|
43
|
-
},
|
|
37
|
+
styles,
|
|
44
38
|
mods: {
|
|
45
39
|
sections: hasSections,
|
|
46
40
|
footer: !!footer,
|
|
@@ -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-ed2a55b
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -9,18 +9,18 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.MenuSection = void 0;
|
|
11
11
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
12
|
+
const react_1 = require("react");
|
|
12
13
|
const MenuItem_1 = require("./MenuItem");
|
|
13
14
|
const menu_1 = require("@react-aria/menu");
|
|
14
15
|
const styled_1 = require("./styled");
|
|
15
16
|
/** @private */
|
|
16
17
|
function MenuSection(props) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
heading,
|
|
18
|
+
let { item, state, onAction } = props;
|
|
19
|
+
let { itemProps, headingProps, groupProps } = (0, menu_1.useMenuSection)({
|
|
20
|
+
heading: item.rendered,
|
|
21
21
|
'aria-label': item['aria-label'],
|
|
22
22
|
});
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(styled_1.StyledMenuSection, { ...itemProps, children: [item.rendered && ((0, jsx_runtime_1.jsx)(styled_1.StyledMenuSectionHeading, { ...headingProps, children: item.rendered }, void 0)), (0, jsx_runtime_1.jsx)(styled_1.StyledMenu, { ...groupProps, mods: { section: true }, children: [...item.childNodes].map((node) => {
|
|
24
24
|
let item = ((0, jsx_runtime_1.jsx)(MenuItem_1.MenuItem, { item: node, state: state, onAction: onAction }, node.key));
|
|
25
25
|
if (node.wrapper) {
|
|
26
26
|
item = node.wrapper(item);
|
|
@@ -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-ed2a55b
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -24,12 +24,7 @@ exports.StyledMenu = (0, tasty_1.tasty)({
|
|
|
24
24
|
margin: '0',
|
|
25
25
|
padding: {
|
|
26
26
|
'': '0.5x',
|
|
27
|
-
section: '0
|
|
28
|
-
sections: '0', // has sections inside
|
|
29
|
-
},
|
|
30
|
-
overflow: {
|
|
31
|
-
'': 'hidden',
|
|
32
|
-
section: '',
|
|
27
|
+
section: '0',
|
|
33
28
|
},
|
|
34
29
|
border: {
|
|
35
30
|
'': '#dark-05',
|
|
@@ -74,8 +69,13 @@ exports.StyledMenuSection = (0, tasty_1.tasty)({
|
|
|
74
69
|
styles: {
|
|
75
70
|
display: 'flex',
|
|
76
71
|
flow: 'column',
|
|
72
|
+
gap: '1px',
|
|
77
73
|
margin: '0',
|
|
78
|
-
padding:
|
|
74
|
+
padding: {
|
|
75
|
+
'': '0.5x 0',
|
|
76
|
+
':first-of-type': '0 0 0.5x 0',
|
|
77
|
+
':last-of-type': '0.5x 0 0 0',
|
|
78
|
+
},
|
|
79
79
|
listStyle: 'none',
|
|
80
80
|
fill: '#white',
|
|
81
81
|
},
|
|
@@ -100,9 +100,8 @@ exports.StyledMenuSectionHeading = (0, tasty_1.tasty)(Space_1.Space, {
|
|
|
100
100
|
as: 'header',
|
|
101
101
|
styles: {
|
|
102
102
|
color: '#dark-03',
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
padding: '(1x - 1bw) 2x',
|
|
103
|
+
preset: 'c1',
|
|
104
|
+
padding: '(0.75x - 1bw) (1.5x - 1bw)',
|
|
106
105
|
placeContent: 'space-between',
|
|
107
106
|
align: 'start',
|
|
108
107
|
},
|