@cube-dev/ui-kit 0.12.1 → 0.12.4
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/_internal/hooks/index.js +1 -1
- package/cjs/_internal/hooks/use-chained-callback.js +1 -1
- package/cjs/_internal/hooks/use-deprecation-warning.js +1 -1
- package/cjs/_internal/hooks/use-event.js +1 -1
- package/cjs/_internal/hooks/use-sync-ref.js +1 -1
- package/cjs/_internal/hooks/use-timer/index.js +1 -1
- package/cjs/_internal/hooks/use-timer/timer.js +1 -1
- package/cjs/_internal/hooks/use-timer/use-timer.js +1 -1
- package/cjs/_internal/index.js +1 -1
- package/cjs/components/Base.js +4 -4
- package/cjs/components/Block.js +3 -3
- package/cjs/components/GlobalStyles.js +4 -4
- package/cjs/components/GridProvider.js +4 -4
- package/cjs/components/HiddenInput.js +1 -1
- package/cjs/components/OpenTrasition.js +1 -1
- package/cjs/components/Root.js +7 -7
- package/cjs/components/actions/Action.js +7 -7
- package/cjs/components/actions/Button/Button.js +16 -16
- package/cjs/components/actions/Button/Submit.js +2 -2
- package/cjs/components/actions/Button/index.js +1 -1
- package/cjs/components/actions/ButtonGroup/ButtonGroup.js +2 -2
- package/cjs/components/actions/index.js +1 -1
- package/cjs/components/content/ActiveZone/ActiveZone.js +6 -6
- package/cjs/components/content/Alert/Alert.js +3 -3
- 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 -3
- package/cjs/components/content/Badge/Badge.js +4 -4
- package/cjs/components/content/Card/Card.js +3 -3
- package/cjs/components/content/Content.js +3 -3
- package/cjs/components/content/CopySnippet/CopySnippet.js +1 -1
- package/cjs/components/content/CopySnippet/index.js +1 -1
- package/cjs/components/content/Divider.js +3 -3
- package/cjs/components/content/Footer.js +3 -3
- package/cjs/components/content/Header.js +3 -3
- package/cjs/components/content/Paragraph.js +4 -4
- package/cjs/components/content/Placeholder/Placeholder.js +5 -5
- package/cjs/components/content/PrismCode/PrismCode.js +1 -1
- 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 +5 -5
- package/cjs/components/content/Text.js +5 -5
- package/cjs/components/content/Title.js +4 -4
- package/cjs/components/forms/Checkbox/Checkbox.js +10 -5
- package/cjs/components/forms/Checkbox/CheckboxGroup.js +5 -4
- package/cjs/components/forms/Checkbox/context.js +1 -1
- package/cjs/components/forms/FieldWrapper.js +6 -6
- package/cjs/components/forms/FileInput/FileInput.js +22 -13
- package/cjs/components/forms/Form/Field.js +13 -10
- package/cjs/components/forms/Form/Form.js +4 -4
- package/cjs/components/forms/Form/index.js +1 -1
- package/cjs/components/forms/Form/types.js +1 -1
- package/cjs/components/forms/Form/useForm.js +19 -8
- 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 +3 -5
- package/cjs/components/forms/NumberInput/NumberInput.js +6 -6
- package/cjs/components/forms/NumberInput/StepButton.js +4 -4
- package/cjs/components/forms/PasswordInput/PasswordInput.js +5 -5
- package/cjs/components/forms/RadioGroup/Radio.js +5 -5
- package/cjs/components/forms/RadioGroup/RadioGroup.js +6 -5
- package/cjs/components/forms/RadioGroup/context.js +1 -1
- package/cjs/components/forms/SearchInput/SearchInput.js +15 -8
- package/cjs/components/forms/Switch/Switch.js +4 -3
- package/cjs/components/forms/TextArea/TextArea.js +4 -4
- package/cjs/components/forms/TextInput/TextInput.js +4 -4
- package/cjs/components/forms/TextInput/TextInputBase.js +135 -64
- package/cjs/components/forms/index.js +1 -1
- package/cjs/components/layout/Flex.js +3 -3
- package/cjs/components/layout/Flow.js +3 -3
- package/cjs/components/layout/Grid.js +3 -3
- package/cjs/components/layout/Prefix.js +4 -4
- package/cjs/components/layout/Space.js +3 -3
- package/cjs/components/layout/Suffix.js +3 -3
- package/cjs/components/navigation/LegacyTabs/LegacyTabs.js +5 -5
- package/cjs/components/navigation/Link/Link.js +2 -2
- package/cjs/components/organisms/FileTabs/FileTabs.js +5 -5
- package/cjs/components/organisms/Modal/Modal.js +7 -7
- package/cjs/components/organisms/StatsCard/StatsCard.js +2 -2
- package/cjs/components/other/Base64Upload/Base64Upload.js +4 -4
- package/cjs/components/other/CloudLogo/CloudLogo.js +2 -2
- package/cjs/components/overlays/AlertDialog/AlertDialog.js +2 -2
- 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 +3 -3
- package/cjs/components/overlays/Dialog/DialogContainer.js +4 -4
- package/cjs/components/overlays/Dialog/DialogForm.js +6 -6
- package/cjs/components/overlays/Dialog/DialogTrigger.js +10 -10
- 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 +4 -4
- package/cjs/components/overlays/Modal/OpenTransition.js +1 -1
- package/cjs/components/overlays/Modal/Overlay.js +4 -4
- package/cjs/components/overlays/Modal/Popover.js +8 -8
- package/cjs/components/overlays/Modal/Tray.js +6 -6
- package/cjs/components/overlays/Modal/Underlay.js +3 -3
- package/cjs/components/overlays/Modal/index.js +1 -1
- package/cjs/components/overlays/NewNotifications/Bar/FloatingNotification.js +2 -2
- package/cjs/components/overlays/NewNotifications/Bar/NotificationsBar.js +4 -4
- package/cjs/components/overlays/NewNotifications/Bar/TransitionComponent.js +1 -1
- package/cjs/components/overlays/NewNotifications/Bar/index.js +1 -1
- package/cjs/components/overlays/NewNotifications/Dialog/NotificationsDialogTrigger.js +1 -1
- package/cjs/components/overlays/NewNotifications/Dialog/index.js +1 -1
- package/cjs/components/overlays/NewNotifications/Notification.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationAction.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationCloseButton.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationDescription.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationFooter.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationHeader.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationIcon.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationProvider.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationView.js +3 -3
- package/cjs/components/overlays/NewNotifications/NotificationView/index.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationView/types.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationsContext/NotificationsProvider.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationsContext/index.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationsContext/use-notifications.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationsList.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/index.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/types.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/use-notification-list-item.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/use-notifications-api.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/use-notifications-list.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/use-notifications-observer.js +1 -1
- package/cjs/components/overlays/NewNotifications/index.js +1 -1
- package/cjs/components/overlays/NewNotifications/types.js +1 -1
- package/cjs/components/overlays/Notification/Notification.js +2 -2
- package/cjs/components/overlays/OverlayWrapper.js +2 -2
- package/cjs/components/overlays/Toasts/Toast.js +2 -2
- package/cjs/components/overlays/Toasts/index.js +1 -1
- package/cjs/components/overlays/Toasts/types.js +1 -1
- package/cjs/components/overlays/Toasts/use-toasts-api.js +1 -1
- package/cjs/components/overlays/Tooltip/Tooltip.js +7 -7
- package/cjs/components/overlays/Tooltip/TooltipProvider.js +2 -2
- package/cjs/components/overlays/Tooltip/TooltipTrigger.js +2 -2
- package/cjs/components/overlays/Tooltip/context.js +1 -1
- package/cjs/components/pickers/ComboBox/ComboBox.js +39 -31
- package/cjs/components/pickers/Menu/Menu.js +4 -3
- package/cjs/components/pickers/Menu/MenuButton.js +3 -3
- package/cjs/components/pickers/Menu/MenuItem.js +1 -1
- package/cjs/components/pickers/Menu/MenuSection.js +2 -2
- package/cjs/components/pickers/Menu/MenuTrigger.js +2 -2
- package/cjs/components/pickers/Menu/context.js +1 -1
- package/cjs/components/pickers/Menu/styled.js +1 -1
- package/cjs/components/pickers/Select/Select.js +101 -69
- 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 +2 -2
- 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/LoadingAnimation/index.js +1 -1
- package/cjs/components/status/Spin/Cube.js +1 -1
- package/cjs/components/status/Spin/InternalSpinner.js +1 -1
- package/cjs/components/status/Spin/Spin.js +2 -2
- package/cjs/components/status/Spin/SpinsContainer.js +1 -1
- package/cjs/components/status/Spin/index.js +1 -1
- package/cjs/components/status/Spin/types.js +1 -1
- package/cjs/components/status/index.js +1 -1
- package/cjs/data/themes.js +1 -1
- package/cjs/icons/Attention.js +1 -1
- package/cjs/icons/Cross.js +1 -1
- package/cjs/icons/Danger.js +1 -1
- package/cjs/icons/Success.js +1 -1
- package/cjs/icons/index.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 +2 -2
- package/cjs/shared/form.js +1 -1
- package/cjs/shared/index.js +1 -1
- package/cjs/stories/FormFieldArgs.js +15 -2
- package/cjs/stories/components/ConfirmDeletionDialogForm.js +3 -3
- 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 +1 -1
- 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 +1 -1
- 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 -1
- package/cjs/tasty/utils/get-display-name.js +1 -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 +2 -2
- 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 -1
- package/cjs/type-checks.js +1 -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 +13 -8
- 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 +1 -1
- package/cjs/utils/react/nullableValue.js +1 -1
- package/cjs/utils/react/useCombinedRefs.js +1 -1
- package/cjs/utils/react/useId.js +4 -3
- package/cjs/utils/react/useLayoutEffect.js +2 -2
- 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 +1 -1
- package/es/_internal/hooks/index.js +1 -1
- package/es/_internal/hooks/use-chained-callback.js +1 -1
- package/es/_internal/hooks/use-deprecation-warning.js +1 -1
- package/es/_internal/hooks/use-event.js +1 -1
- package/es/_internal/hooks/use-sync-ref.js +1 -1
- package/es/_internal/hooks/use-timer/index.js +1 -1
- package/es/_internal/hooks/use-timer/timer.js +1 -1
- package/es/_internal/hooks/use-timer/use-timer.js +1 -1
- package/es/_internal/index.js +1 -1
- package/es/components/Base.js +4 -4
- package/es/components/Block.js +3 -3
- package/es/components/GlobalStyles.js +4 -4
- package/es/components/GridProvider.js +4 -4
- package/es/components/HiddenInput.js +1 -1
- package/es/components/OpenTrasition.js +1 -1
- package/es/components/Root.js +7 -7
- package/es/components/actions/Action.js +7 -7
- package/es/components/actions/Button/Button.js +14 -14
- package/es/components/actions/Button/Submit.js +2 -2
- package/es/components/actions/Button/index.js +1 -1
- package/es/components/actions/ButtonGroup/ButtonGroup.js +2 -2
- package/es/components/actions/index.js +1 -1
- package/es/components/content/ActiveZone/ActiveZone.js +6 -6
- package/es/components/content/Alert/Alert.js +3 -3
- 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 -3
- package/es/components/content/Badge/Badge.js +4 -4
- package/es/components/content/Card/Card.js +3 -3
- package/es/components/content/Content.js +3 -3
- package/es/components/content/CopySnippet/CopySnippet.js +1 -1
- package/es/components/content/CopySnippet/index.js +1 -1
- package/es/components/content/Divider.js +3 -3
- package/es/components/content/Footer.js +3 -3
- package/es/components/content/Header.js +3 -3
- package/es/components/content/Paragraph.js +4 -4
- package/es/components/content/Placeholder/Placeholder.js +5 -5
- package/es/components/content/PrismCode/PrismCode.js +1 -1
- 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 +5 -5
- package/es/components/content/Text.js +5 -5
- package/es/components/content/Title.js +4 -4
- package/es/components/forms/Checkbox/Checkbox.js +10 -5
- package/es/components/forms/Checkbox/CheckboxGroup.js +5 -4
- package/es/components/forms/Checkbox/context.js +1 -1
- package/es/components/forms/FieldWrapper.js +6 -6
- package/es/components/forms/FileInput/FileInput.js +22 -13
- package/es/components/forms/Form/Field.js +13 -10
- package/es/components/forms/Form/Form.js +4 -4
- package/es/components/forms/Form/index.js +1 -1
- package/es/components/forms/Form/types.js +1 -1
- package/es/components/forms/Form/useForm.js +19 -8
- 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 +3 -5
- package/es/components/forms/NumberInput/NumberInput.js +6 -6
- package/es/components/forms/NumberInput/StepButton.js +4 -4
- package/es/components/forms/PasswordInput/PasswordInput.js +5 -5
- package/es/components/forms/RadioGroup/Radio.js +5 -5
- package/es/components/forms/RadioGroup/RadioGroup.js +6 -5
- package/es/components/forms/RadioGroup/context.js +1 -1
- package/es/components/forms/SearchInput/SearchInput.js +15 -8
- package/es/components/forms/Switch/Switch.js +4 -3
- package/es/components/forms/TextArea/TextArea.js +4 -4
- package/es/components/forms/TextInput/TextInput.js +4 -4
- package/es/components/forms/TextInput/TextInputBase.js +136 -65
- package/es/components/forms/index.js +1 -1
- package/es/components/layout/Flex.js +3 -3
- package/es/components/layout/Flow.js +3 -3
- package/es/components/layout/Grid.js +3 -3
- package/es/components/layout/Prefix.js +6 -6
- package/es/components/layout/Space.js +3 -3
- package/es/components/layout/Suffix.js +3 -3
- package/es/components/navigation/LegacyTabs/LegacyTabs.js +5 -5
- package/es/components/navigation/Link/Link.js +2 -2
- package/es/components/organisms/FileTabs/FileTabs.js +5 -5
- package/es/components/organisms/Modal/Modal.js +7 -7
- package/es/components/organisms/StatsCard/StatsCard.js +2 -2
- package/es/components/other/Base64Upload/Base64Upload.js +4 -4
- package/es/components/other/CloudLogo/CloudLogo.js +2 -2
- package/es/components/overlays/AlertDialog/AlertDialog.js +2 -2
- 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 +3 -3
- package/es/components/overlays/Dialog/DialogContainer.js +4 -4
- package/es/components/overlays/Dialog/DialogForm.js +6 -6
- package/es/components/overlays/Dialog/DialogTrigger.js +10 -10
- 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 +4 -4
- package/es/components/overlays/Modal/OpenTransition.js +1 -1
- package/es/components/overlays/Modal/Overlay.js +4 -4
- package/es/components/overlays/Modal/Popover.js +5 -5
- package/es/components/overlays/Modal/Tray.js +6 -6
- package/es/components/overlays/Modal/Underlay.js +3 -3
- package/es/components/overlays/Modal/index.js +1 -1
- package/es/components/overlays/NewNotifications/Bar/FloatingNotification.js +2 -2
- package/es/components/overlays/NewNotifications/Bar/NotificationsBar.js +4 -4
- package/es/components/overlays/NewNotifications/Bar/TransitionComponent.js +1 -1
- package/es/components/overlays/NewNotifications/Bar/index.js +1 -1
- package/es/components/overlays/NewNotifications/Dialog/NotificationsDialogTrigger.js +1 -1
- package/es/components/overlays/NewNotifications/Dialog/index.js +1 -1
- package/es/components/overlays/NewNotifications/Notification.js +2 -2
- package/es/components/overlays/NewNotifications/NotificationView/NotificationAction.js +2 -2
- package/es/components/overlays/NewNotifications/NotificationView/NotificationCloseButton.js +2 -2
- package/es/components/overlays/NewNotifications/NotificationView/NotificationDescription.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationFooter.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationHeader.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationIcon.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationProvider.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationView.js +3 -3
- package/es/components/overlays/NewNotifications/NotificationView/index.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/types.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsContext/NotificationsProvider.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsContext/index.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsContext/use-notifications.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsList.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/index.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/types.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/use-notification-list-item.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/use-notifications-api.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/use-notifications-list.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/use-notifications-observer.js +1 -1
- package/es/components/overlays/NewNotifications/index.js +1 -1
- package/es/components/overlays/NewNotifications/types.js +1 -1
- package/es/components/overlays/Notification/Notification.js +2 -2
- package/es/components/overlays/OverlayWrapper.js +2 -2
- package/es/components/overlays/Toasts/Toast.js +2 -2
- package/es/components/overlays/Toasts/index.js +1 -1
- package/es/components/overlays/Toasts/types.js +1 -1
- package/es/components/overlays/Toasts/use-toasts-api.js +1 -1
- package/es/components/overlays/Tooltip/Tooltip.js +7 -7
- package/es/components/overlays/Tooltip/TooltipProvider.js +2 -2
- package/es/components/overlays/Tooltip/TooltipTrigger.js +2 -2
- package/es/components/overlays/Tooltip/context.js +1 -1
- package/es/components/pickers/ComboBox/ComboBox.js +42 -34
- package/es/components/pickers/Menu/Menu.js +4 -3
- package/es/components/pickers/Menu/MenuButton.js +3 -3
- package/es/components/pickers/Menu/MenuItem.js +1 -1
- package/es/components/pickers/Menu/MenuSection.js +2 -2
- package/es/components/pickers/Menu/MenuTrigger.js +2 -2
- package/es/components/pickers/Menu/context.js +1 -1
- package/es/components/pickers/Menu/styled.js +1 -1
- package/es/components/pickers/Select/Select.js +93 -61
- 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 +2 -2
- 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/LoadingAnimation/index.js +1 -1
- package/es/components/status/Spin/Cube.js +1 -1
- package/es/components/status/Spin/InternalSpinner.js +1 -1
- package/es/components/status/Spin/Spin.js +2 -2
- package/es/components/status/Spin/SpinsContainer.js +1 -1
- package/es/components/status/Spin/index.js +1 -1
- package/es/components/status/Spin/types.js +1 -1
- package/es/components/status/index.js +1 -1
- package/es/data/themes.js +1 -1
- package/es/icons/Attention.js +1 -1
- package/es/icons/Cross.js +1 -1
- package/es/icons/Danger.js +1 -1
- package/es/icons/Success.js +1 -1
- package/es/icons/index.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 +2 -2
- package/es/shared/form.js +1 -1
- package/es/shared/index.js +1 -1
- package/es/stories/FormFieldArgs.js +14 -1
- package/es/stories/components/ConfirmDeletionDialogForm.js +3 -3
- 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 +1 -1
- 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 +1 -1
- 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 -1
- package/es/tasty/utils/get-display-name.js +1 -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 +2 -2
- 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 -1
- package/es/type-checks.js +1 -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 +13 -8
- 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 +1 -1
- package/es/utils/react/nullableValue.js +1 -1
- package/es/utils/react/useCombinedRefs.js +1 -1
- package/es/utils/react/useId.js +4 -3
- package/es/utils/react/useLayoutEffect.js +2 -2
- 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 +1 -1
- package/package.json +6 -1
- package/types/components/Root.d.ts +1 -1
- package/types/components/actions/Action.d.ts +1 -1
- package/types/components/actions/Button/Button.d.ts +3 -1
- package/types/components/content/ActiveZone/ActiveZone.d.ts +1 -1
- package/types/components/content/Paragraph.d.ts +1 -1
- package/types/components/content/Title.d.ts +1 -1
- package/types/components/forms/Checkbox/Checkbox.d.ts +2 -2
- package/types/components/forms/Checkbox/CheckboxGroup.d.ts +1 -1
- package/types/components/forms/FileInput/FileInput.d.ts +1 -1
- package/types/components/forms/Form/Field.d.ts +2 -2
- package/types/components/forms/Form/Form.d.ts +2 -2
- package/types/components/forms/Form/types.d.ts +1 -0
- package/types/components/forms/Form/useForm.d.ts +6 -6
- package/types/components/forms/RadioGroup/Radio.d.ts +1 -1
- package/types/components/forms/RadioGroup/RadioGroup.d.ts +1 -1
- package/types/components/forms/Switch/Switch.d.ts +1 -1
- package/types/components/forms/TextInput/TextInput.d.ts +1 -1
- package/types/components/forms/TextInput/TextInputBase.d.ts +4 -1
- package/types/components/organisms/StatsCard/StatsCard.d.ts +1 -1
- package/types/components/overlays/AlertDialog/types.d.ts +1 -1
- package/types/components/overlays/Dialog/DialogForm.d.ts +2 -2
- package/types/components/overlays/Modal/Popover.d.ts +1 -1
- package/types/components/overlays/NewNotifications/NotificationView/types.d.ts +2 -2
- package/types/components/overlays/NewNotifications/NotificationsList.d.ts +1 -1
- package/types/components/overlays/NewNotifications/hooks/use-notification-list-item.d.ts +1 -1
- package/types/components/overlays/NewNotifications/hooks/use-notifications-list.d.ts +1 -1
- package/types/components/overlays/Tooltip/Tooltip.d.ts +2 -2
- package/types/components/overlays/Tooltip/TooltipProvider.d.ts +2 -2
- package/types/components/pickers/ComboBox/ComboBox.d.ts +5 -2
- package/types/components/pickers/Menu/Menu.d.ts +3 -2
- package/types/components/pickers/Select/Select.d.ts +7 -3
- package/types/shared/form.d.ts +2 -1
- package/types/stories/FormFieldArgs.d.ts +16 -0
- package/types/utils/react/mapProps.d.ts +1 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.12.
|
4
|
+
* @cube-dev/ui-kit v0.12.4
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -10,9 +10,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.Notification = void 0;
|
11
11
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
12
12
|
const react_1 = require("react");
|
13
|
-
const hooks_1 = require("./hooks");
|
14
13
|
const _internal_1 = require("../../../_internal");
|
15
14
|
const useId_1 = require("../../../utils/react/useId");
|
15
|
+
const hooks_1 = require("./hooks");
|
16
16
|
function Notification(props) {
|
17
17
|
const { id: propsId, disableRemoveOnUnmount = false } = props;
|
18
18
|
const defaultId = (0, useId_1.useId)();
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.12.
|
4
|
+
* @cube-dev/ui-kit v0.12.4
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -35,7 +35,7 @@ function NotificationAction(props) {
|
|
35
35
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
36
36
|
}
|
37
37
|
});
|
38
|
-
return ((0, jsx_runtime_1.jsx)(Action, { ...buttonProps,
|
38
|
+
return ((0, jsx_runtime_1.jsx)(Action, { ...buttonProps, type: "link", size: "small", mods: { primary: type === 'primary', secondary: type === 'secondary' }, onPress: onPressEvent, children: children }, void 0));
|
39
39
|
}
|
40
40
|
exports.NotificationAction = NotificationAction;
|
41
41
|
|
package/cjs/components/overlays/NewNotifications/NotificationView/NotificationCloseButton.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.12.
|
4
|
+
* @cube-dev/ui-kit v0.12.4
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -34,7 +34,7 @@ const CloseButton = (0, tasty_1.tasty)(actions_1.Button, {
|
|
34
34
|
});
|
35
35
|
exports.NotificationCloseButton = (0, react_1.memo)(function NotificationCloseButton(props) {
|
36
36
|
const { onPress, isHovered, isFocused } = props;
|
37
|
-
return ((0, jsx_runtime_1.jsx)(CloseButton, { qa: "
|
37
|
+
return ((0, jsx_runtime_1.jsx)(CloseButton, { qa: "NotificationCloseButton", type: "neutral", mods: { show: isHovered || isFocused }, icon: (0, jsx_runtime_1.jsx)(icons_1.Cross, {}, void 0), label: "Close the notification", onPress: onPress }, void 0));
|
38
38
|
});
|
39
39
|
|
40
40
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.12.
|
4
|
+
* @cube-dev/ui-kit v0.12.4
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -15,13 +15,13 @@ const focus_1 = require("@react-aria/focus");
|
|
15
15
|
const tasty_1 = require("../../../../tasty");
|
16
16
|
const _internal_1 = require("../../../../_internal");
|
17
17
|
const react_2 = require("../../../../utils/react");
|
18
|
+
const useId_1 = require("../../../../utils/react/useId");
|
18
19
|
const NotificationIcon_1 = require("./NotificationIcon");
|
19
20
|
const NotificationHeader_1 = require("./NotificationHeader");
|
20
21
|
const NotificationDescription_1 = require("./NotificationDescription");
|
21
22
|
const NotificationFooter_1 = require("./NotificationFooter");
|
22
23
|
const NotificationCloseButton_1 = require("./NotificationCloseButton");
|
23
24
|
const NotificationProvider_1 = require("./NotificationProvider");
|
24
|
-
const useId_1 = require("../../../../utils/react/useId");
|
25
25
|
const NotificationContainer = (0, tasty_1.tasty)({
|
26
26
|
styles: {
|
27
27
|
boxSizing: 'border-box',
|
@@ -64,7 +64,7 @@ exports.NotificationView = (0, react_1.forwardRef)(function NotificationView(pro
|
|
64
64
|
callback: onDismissEvent,
|
65
65
|
isDisabled: isFocusVisible || isHovered || !isDismissible,
|
66
66
|
});
|
67
|
-
return ((0, jsx_runtime_1.jsx)(react_2.ClearSlots, { children: (0, jsx_runtime_1.jsx)(NotificationProvider_1.NotificationProvider, { onClose: onClose, children: (0, jsx_runtime_1.jsxs)(NotificationContainer, { ...(0, react_2.mergeProps)(attributes, hoverProps, focusProps),
|
67
|
+
return ((0, jsx_runtime_1.jsx)(react_2.ClearSlots, { children: (0, jsx_runtime_1.jsx)(NotificationProvider_1.NotificationProvider, { onClose: onClose, children: (0, jsx_runtime_1.jsxs)(NotificationContainer, { ...(0, react_2.mergeProps)(attributes, hoverProps, focusProps), ref: ref, styles: styles, "data-id": id, "data-qa": qa, "aria-labelledby": labelID, "aria-describedby": descriptionID, mods: { focused: isFocusVisible, 'is-dismissible': isDismissible }, children: [(0, jsx_runtime_1.jsx)(NotificationIcon_1.NotificationIcon, { icon: icon, type: type }, void 0), (0, jsx_runtime_1.jsx)(NotificationHeader_1.NotificationHeader, { header: header, id: labelID }, void 0), description && ((0, jsx_runtime_1.jsx)(NotificationDescription_1.NotificationDescription, { description: description, id: descriptionID }, void 0)), (0, jsx_runtime_1.jsx)(NotificationFooter_1.NotificationFooter, { hasDescription: !!description, actions: actions, onClose: onCloseEvent, onDismiss: onDismissEvent }, void 0), isDismissible && ((0, jsx_runtime_1.jsx)(NotificationCloseButton_1.NotificationCloseButton, { isHovered: isHovered, isFocused: isFocusVisible, onPress: onDismissEvent }, void 0))] }, void 0) }, void 0) }, void 0));
|
68
68
|
});
|
69
69
|
|
70
70
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.12.
|
4
|
+
* @cube-dev/ui-kit v0.12.4
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -12,11 +12,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13
13
|
exports.Notification = void 0;
|
14
14
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
15
|
+
const icons_1 = require("@ant-design/icons");
|
15
16
|
const Action_1 = require("../../actions/Action");
|
16
17
|
const Card_1 = require("../../content/Card/Card");
|
17
18
|
const Block_1 = require("../../Block");
|
18
19
|
const themes_1 = __importDefault(require("../../../data/themes"));
|
19
|
-
const icons_1 = require("@ant-design/icons");
|
20
20
|
const tasty_1 = require("../../../tasty");
|
21
21
|
const NotificationElement = (0, tasty_1.tasty)(Card_1.Card, {
|
22
22
|
role: 'region',
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.12.
|
4
|
+
* @cube-dev/ui-kit v0.12.4
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -27,7 +27,7 @@ function OverlayWrapper({ isOpen, placement, minOffset, minScale, children, cont
|
|
27
27
|
if (minOffset != null) {
|
28
28
|
options.minOffset = minOffset;
|
29
29
|
}
|
30
|
-
const contents = ((0, jsx_runtime_1.jsx)(react_transition_group_1.CSSTransition, {
|
30
|
+
const contents = ((0, jsx_runtime_1.jsx)(react_transition_group_1.CSSTransition, { unmountOnExit: true, in: isOpen, timeout: 180, classNames: "cube-overlay-transition", children: children }, void 0));
|
31
31
|
return (0, jsx_runtime_1.jsx)(portal_1.Portal, { root: containerRef, children: contents }, void 0);
|
32
32
|
}
|
33
33
|
exports.OverlayWrapper = OverlayWrapper;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.12.
|
4
|
+
* @cube-dev/ui-kit v0.12.4
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -10,9 +10,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.Toast = void 0;
|
11
11
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
12
12
|
const react_1 = require("react");
|
13
|
-
const use_toasts_api_1 = require("./use-toasts-api");
|
14
13
|
const _internal_1 = require("../../../_internal");
|
15
14
|
const useId_1 = require("../../../utils/react/useId");
|
15
|
+
const use_toasts_api_1 = require("./use-toasts-api");
|
16
16
|
function Toast(props) {
|
17
17
|
const { id: propsId, disableRemoveOnUnmount } = props;
|
18
18
|
const defaultId = (0, useId_1.useId)();
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.12.
|
4
|
+
* @cube-dev/ui-kit v0.12.4
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -13,13 +13,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.Tooltip = void 0;
|
14
14
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
15
15
|
const react_1 = require("react");
|
16
|
-
const react_2 = require("../../../utils/react");
|
17
16
|
const utils_1 = require("@react-spectrum/utils");
|
18
|
-
const context_1 = require("./context");
|
19
17
|
const tooltip_1 = require("@react-aria/tooltip");
|
20
|
-
const tasty_1 = require("../../../tasty");
|
21
|
-
const transitions_1 = require("../../../utils/transitions");
|
22
18
|
const styled_components_1 = __importDefault(require("styled-components"));
|
19
|
+
const transitions_1 = require("../../../utils/transitions");
|
20
|
+
const tasty_1 = require("../../../tasty");
|
21
|
+
const react_2 = require("../../../utils/react");
|
22
|
+
const context_1 = require("./context");
|
23
23
|
const TooltipElement = (0, tasty_1.tasty)({
|
24
24
|
styles: {
|
25
25
|
display: 'block',
|
@@ -96,10 +96,10 @@ function Tooltip(props, ref) {
|
|
96
96
|
if (typeof minScale === 'number') {
|
97
97
|
minScale = String(minScale);
|
98
98
|
}
|
99
|
-
return ((0, jsx_runtime_1.jsxs)(StyledTooltipElement, { ...tooltipProps, ...overlayProps, styles: styles, mods: {
|
99
|
+
return ((0, jsx_runtime_1.jsxs)(StyledTooltipElement, { ...tooltipProps, ...overlayProps, ref: overlayRef, styles: styles, mods: {
|
100
100
|
open: isOpen,
|
101
101
|
material: isMaterial,
|
102
|
-
}, "data-min-offset": minOffset, "data-min-slale": minScale, "data-placement": placement,
|
102
|
+
}, "data-min-offset": minOffset, "data-min-slale": minScale, "data-placement": placement, children: [props.children, (0, jsx_runtime_1.jsx)(TooltipTipElement, { "data-placement": placement, styles: tipStyles, ...arrowProps }, void 0)] }, void 0));
|
103
103
|
}
|
104
104
|
/**
|
105
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.12.
|
4
|
+
* @cube-dev/ui-kit v0.12.4
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -9,9 +9,9 @@
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
10
|
exports.TooltipProvider = void 0;
|
11
11
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
12
|
+
const react_1 = require("react");
|
12
13
|
const TooltipTrigger_1 = require("./TooltipTrigger");
|
13
14
|
const Tooltip_1 = require("./Tooltip");
|
14
|
-
const react_1 = require("react");
|
15
15
|
function TooltipProvider(props) {
|
16
16
|
const [rendered, setRendered] = (0, react_1.useState)(false);
|
17
17
|
const { title, children, tooltipStyles, width, ...otherProps } = props;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.12.
|
4
|
+
* @cube-dev/ui-kit v0.12.4
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -11,13 +11,13 @@ exports.TooltipTrigger = void 0;
|
|
11
11
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
12
12
|
const focus_1 = require("@react-aria/focus");
|
13
13
|
const react_1 = require("react");
|
14
|
-
const context_1 = require("./context");
|
15
14
|
const overlays_1 = require("@react-aria/overlays");
|
16
15
|
const tooltip_1 = require("@react-aria/tooltip");
|
17
16
|
const tooltip_2 = require("@react-stately/tooltip");
|
18
17
|
const OverlayWrapper_1 = require("../OverlayWrapper");
|
19
18
|
const ActiveZone_1 = require("../../content/ActiveZone/ActiveZone");
|
20
19
|
const Block_1 = require("../../Block");
|
20
|
+
const context_1 = require("./context");
|
21
21
|
const DEFAULT_OFFSET = 8; // Offset needed to reach 4px/5px (med/large) distance between tooltip and trigger button
|
22
22
|
const DEFAULT_CROSS_OFFSET = 0;
|
23
23
|
function TooltipTrigger(props) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.12.
|
4
|
+
* @cube-dev/ui-kit v0.12.4
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -14,38 +14,31 @@ const react_1 = require("react");
|
|
14
14
|
const combobox_1 = require("@react-stately/combobox");
|
15
15
|
const combobox_2 = require("@react-aria/combobox");
|
16
16
|
const button_1 = require("@react-aria/button");
|
17
|
-
const Form_1 = require("../../forms/Form");
|
18
17
|
const interactions_1 = require("@react-aria/interactions");
|
19
|
-
const provider_1 = require("../../../provider");
|
20
18
|
const i18n_1 = require("@react-aria/i18n");
|
19
|
+
const collections_1 = require("@react-stately/collections");
|
20
|
+
const overlays_1 = require("@react-aria/overlays");
|
21
|
+
const Form_1 = require("../../forms/Form");
|
22
|
+
const provider_1 = require("../../../provider");
|
21
23
|
const tasty_1 = require("../../../tasty");
|
22
24
|
const interactions_2 = require("../../../utils/react/interactions");
|
23
25
|
const react_2 = require("../../../utils/react");
|
24
26
|
const FieldWrapper_1 = require("../../forms/FieldWrapper");
|
25
27
|
const Select_1 = require("../Select/Select");
|
26
|
-
const Prefix_1 = require("../../layout/Prefix");
|
27
|
-
const Suffix_1 = require("../../layout/Suffix");
|
28
|
-
const Space_1 = require("../../layout/Space");
|
29
|
-
const collections_1 = require("@react-stately/collections");
|
30
28
|
const TextInputBase_1 = require("../../forms/TextInput/TextInputBase");
|
31
|
-
const overlays_1 = require("@react-aria/overlays");
|
32
29
|
const OverlayWrapper_1 = require("../../overlays/OverlayWrapper");
|
33
|
-
|
30
|
+
function CaretDownIcon() {
|
31
|
+
return ((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));
|
32
|
+
}
|
34
33
|
const ComboBoxWrapperElement = (0, tasty_1.tasty)({
|
35
34
|
styles: {
|
36
|
-
|
37
|
-
display: 'grid',
|
38
|
-
zIndex: {
|
39
|
-
'': 'initial',
|
40
|
-
focused: 1,
|
41
|
-
},
|
35
|
+
...TextInputBase_1.INPUT_WRAPPER_STYLES,
|
42
36
|
},
|
43
37
|
});
|
44
38
|
const InputElement = (0, tasty_1.tasty)({
|
45
39
|
as: 'input',
|
46
40
|
styles: {
|
47
41
|
...TextInputBase_1.DEFAULT_INPUT_STYLES,
|
48
|
-
width: '100%',
|
49
42
|
},
|
50
43
|
});
|
51
44
|
const TriggerElement = (0, tasty_1.tasty)({
|
@@ -56,7 +49,7 @@ const TriggerElement = (0, tasty_1.tasty)({
|
|
56
49
|
placeContent: 'center',
|
57
50
|
placeSelf: 'stretch',
|
58
51
|
radius: 'right',
|
59
|
-
|
52
|
+
width: '4x',
|
60
53
|
color: {
|
61
54
|
'': '#dark.75',
|
62
55
|
hovered: '#dark.75',
|
@@ -79,11 +72,9 @@ function ComboBox(props, ref) {
|
|
79
72
|
var _a;
|
80
73
|
props = (0, provider_1.useProviderProps)(props);
|
81
74
|
props = (0, Form_1.useFormProps)(props);
|
82
|
-
let { qa, label, extra, labelPosition = 'top', labelStyles, isRequired, necessityIndicator, validationState, prefix, isDisabled, multiLine, autoFocus, inputRef, triggerRef, popoverRef, listBoxRef, isLoading, loadingIndicator, overlayOffset = 8, inputStyles, optionStyles, triggerStyles, suffix, listBoxStyles, overlayStyles, hideTrigger, message, description, size, autoComplete = 'off', direction = 'bottom', shouldFlip = true, requiredMark = true, menuTrigger = 'input', loadingState, filter, styles, ...otherProps } = props;
|
75
|
+
let { qa, label, extra, labelPosition = 'top', labelStyles, isRequired, necessityIndicator, validationState, icon, prefix, isDisabled, multiLine, autoFocus, wrapperRef, inputRef, triggerRef, popoverRef, listBoxRef, isLoading, loadingIndicator, overlayOffset = 8, inputStyles, optionStyles, triggerStyles, suffix, listBoxStyles, overlayStyles, hideTrigger, message, description, size, autoComplete = 'off', direction = 'bottom', shouldFlip = true, requiredMark = true, menuTrigger = 'input', suffixPosition = 'before', loadingState, filter, styles, labelSuffix, ...otherProps } = props;
|
83
76
|
let isAsync = loadingState != null;
|
84
77
|
let { contains } = (0, i18n_1.useFilter)({ sensitivity: 'base' });
|
85
|
-
let [suffixWidth, setSuffixWidth] = (0, react_1.useState)(0);
|
86
|
-
let [prefixWidth, setPrefixWidth] = (0, react_1.useState)(0);
|
87
78
|
let state = (0, combobox_1.useComboBoxState)({
|
88
79
|
...props,
|
89
80
|
defaultFilter: filter || contains,
|
@@ -92,6 +83,7 @@ function ComboBox(props, ref) {
|
|
92
83
|
const outerStyles = (0, tasty_1.extractStyles)(otherProps, tasty_1.OUTER_STYLES, styles);
|
93
84
|
inputStyles = (0, tasty_1.extractStyles)(otherProps, tasty_1.BLOCK_STYLES, inputStyles);
|
94
85
|
ref = (0, react_2.useCombinedRefs)(ref);
|
86
|
+
wrapperRef = (0, react_2.useCombinedRefs)(wrapperRef);
|
95
87
|
inputRef = (0, react_2.useCombinedRefs)(inputRef);
|
96
88
|
triggerRef = (0, react_2.useCombinedRefs)(triggerRef);
|
97
89
|
popoverRef = (0, react_2.useCombinedRefs)(popoverRef);
|
@@ -114,10 +106,6 @@ function ComboBox(props, ref) {
|
|
114
106
|
onClose: state.close,
|
115
107
|
offset: overlayOffset,
|
116
108
|
});
|
117
|
-
if (prefix) {
|
118
|
-
inputStyles.paddingLeft = `${prefixWidth}px`;
|
119
|
-
}
|
120
|
-
inputStyles.paddingRight = `${suffixWidth}px`;
|
121
109
|
let { isFocused, focusProps } = (0, interactions_2.useFocus)({ isDisabled });
|
122
110
|
let { hoverProps, isHovered } = (0, interactions_1.useHover)({ isDisabled });
|
123
111
|
// Get props for the button based on the trigger props from useComboBox
|
@@ -125,26 +113,45 @@ function ComboBox(props, ref) {
|
|
125
113
|
let { hoverProps: triggerHoverProps, isHovered: isTriggerHovered } = (0, interactions_1.useHover)({ isDisabled });
|
126
114
|
let { focusProps: triggerFocusProps, isFocused: isTriggerFocused } = (0, interactions_2.useFocus)({ isDisabled }, true);
|
127
115
|
let isInvalid = validationState === 'invalid';
|
128
|
-
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));
|
116
|
+
let validationIcon = isInvalid ? ((0, jsx_runtime_1.jsx)(icons_1.WarningOutlined, { "data-element": "ValidationIcon", style: { color: 'var(--danger-color)' } }, void 0)) : ((0, jsx_runtime_1.jsx)(icons_1.CheckOutlined, { "data-element": "ValidationIcon", style: { color: 'var(--success-color)' } }, void 0));
|
129
117
|
let validation = (0, react_1.cloneElement)(validationIcon);
|
130
|
-
let comboBoxWidth = (_a =
|
131
|
-
|
118
|
+
let comboBoxWidth = (_a = wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth;
|
119
|
+
if (icon) {
|
120
|
+
icon = (0, jsx_runtime_1.jsx)("div", { "data-element": "InputIcon", children: icon }, void 0);
|
121
|
+
if (prefix) {
|
122
|
+
prefix = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [icon, prefix] }, void 0));
|
123
|
+
}
|
124
|
+
else {
|
125
|
+
prefix = icon;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
let mods = (0, react_1.useMemo)(() => ({
|
132
129
|
invalid: isInvalid,
|
133
130
|
valid: validationState === 'valid',
|
134
131
|
disabled: isDisabled,
|
135
132
|
hovered: isHovered,
|
136
133
|
focused: isFocused,
|
137
134
|
loading: isLoading,
|
138
|
-
|
139
|
-
|
135
|
+
prefix: !!prefix,
|
136
|
+
suffix: true,
|
137
|
+
}), [
|
138
|
+
isInvalid,
|
139
|
+
validationState,
|
140
|
+
isDisabled,
|
141
|
+
isHovered,
|
142
|
+
isFocused,
|
143
|
+
isLoading,
|
144
|
+
prefix,
|
145
|
+
]);
|
146
|
+
let comboBoxField = ((0, jsx_runtime_1.jsxs)(ComboBoxWrapperElement, { ref: wrapperRef, qa: qa || 'ComboBox', ...(0, react_2.modAttrs)(mods), styles: outerStyles, style: {
|
140
147
|
zIndex: isFocused ? 1 : 'initial',
|
141
|
-
}, "data-size": size, children: [(0, jsx_runtime_1.jsx)(InputElement, { qa: "Input", ...(0, react_2.mergeProps)(inputProps, hoverProps, focusProps), ref: inputRef, autoComplete: autoComplete, styles: inputStyles, ...(0, react_2.modAttrs)(mods), "data-size": size }, void 0), prefix ? (
|
148
|
+
}, "data-size": size, children: [(0, jsx_runtime_1.jsx)(InputElement, { qa: "Input", ...(0, react_2.mergeProps)(inputProps, hoverProps, focusProps), ref: inputRef, autoComplete: autoComplete, styles: inputStyles, ...(0, react_2.modAttrs)(mods), "data-size": size }, void 0), prefix ? (0, jsx_runtime_1.jsx)("div", { "data-element": "Prefix", children: prefix }, void 0) : null, (0, jsx_runtime_1.jsxs)("div", { "data-element": "Suffix", children: [suffixPosition === 'before' ? suffix : null, validationState || isLoading ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [validationState && !isLoading ? validation : null, isLoading ? (0, jsx_runtime_1.jsx)(icons_1.LoadingOutlined, {}, void 0) : null] }, void 0)) : null, suffixPosition === 'after' ? suffix : null, !hideTrigger ? ((0, jsx_runtime_1.jsx)(TriggerElement, { qa: "ComboBoxTrigger", ...(0, react_2.mergeProps)(buttonProps, triggerFocusProps, triggerHoverProps), ...(0, react_2.modAttrs)({
|
142
149
|
pressed: isTriggerPressed,
|
143
150
|
focused: isTriggerFocused,
|
144
151
|
hovered: isTriggerHovered,
|
145
152
|
disabled: isDisabled,
|
146
153
|
loading: isLoading,
|
147
|
-
}), "data-size": size, isDisabled: isDisabled,
|
154
|
+
}), ref: triggerRef, "data-size": size, isDisabled: isDisabled, styles: triggerStyles, children: (0, jsx_runtime_1.jsx)(CaretDownIcon, {}, void 0) }, void 0)) : null] }, void 0), (0, jsx_runtime_1.jsx)(OverlayWrapper_1.OverlayWrapper, { isOpen: state.isOpen && !isDisabled, children: (0, jsx_runtime_1.jsx)(Select_1.ListBoxPopup, { ...listBoxProps, shouldUseVirtualFocus: true, listBoxRef: listBoxRef, popoverRef: popoverRef, overlayProps: overlayProps, placement: placement, state: state, listBoxStyles: listBoxStyles, overlayStyles: overlayStyles, optionStyles: optionStyles, minWidth: comboBoxWidth }, void 0) }, void 0)] }, void 0));
|
148
155
|
return ((0, jsx_runtime_1.jsx)(FieldWrapper_1.FieldWrapper, { ...{
|
149
156
|
labelPosition,
|
150
157
|
label,
|
@@ -159,6 +166,7 @@ function ComboBox(props, ref) {
|
|
159
166
|
message,
|
160
167
|
description,
|
161
168
|
requiredMark,
|
169
|
+
labelSuffix,
|
162
170
|
Component: comboBoxField,
|
163
171
|
ref: ref,
|
164
172
|
} }, void 0));
|