@cube-dev/ui-kit 0.27.2 → 0.28.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +10 -0
- 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-effect-once.js +1 -1
- package/cjs/_internal/hooks/use-event.js +1 -1
- package/cjs/_internal/hooks/use-is-first-render.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/hooks/use-update-effect.js +1 -1
- package/cjs/_internal/hooks/use-warn.js +1 -1
- package/cjs/_internal/index.js +1 -1
- package/cjs/components/Base.js +1 -1
- package/cjs/components/Block.js +1 -1
- package/cjs/components/GlobalStyles.js +1 -1
- package/cjs/components/GridProvider.js +1 -1
- package/cjs/components/HiddenInput.js +1 -1
- package/cjs/components/OpenTrasition.js +1 -1
- package/cjs/components/Root.js +3 -3
- package/cjs/components/actions/Action.js +1 -1
- package/cjs/components/actions/Button/Button.js +1 -1
- 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 +1 -1
- package/cjs/components/actions/index.js +1 -1
- package/cjs/components/actions/use-action.js +6 -7
- package/cjs/components/content/ActiveZone/ActiveZone.js +6 -7
- package/cjs/components/content/Alert/Alert.js +1 -1
- 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 +1 -1
- package/cjs/components/content/Badge/Badge.js +1 -1
- package/cjs/components/content/Card/Card.js +1 -1
- package/cjs/components/content/Content.js +1 -1
- package/cjs/components/content/CopyPasteBlock/CopyPasteBlock.js +3 -3
- package/cjs/components/content/CopyPasteBlock/index.js +1 -1
- package/cjs/components/content/CopySnippet/CopySnippet.js +1 -1
- package/cjs/components/content/CopySnippet/index.js +1 -1
- package/cjs/components/content/Divider.js +1 -1
- package/cjs/components/content/Footer.js +1 -1
- package/cjs/components/content/Header.js +1 -1
- package/cjs/components/content/Paragraph.js +1 -1
- package/cjs/components/content/Placeholder/Placeholder.js +1 -1
- 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 +1 -1
- package/cjs/components/content/Text.js +1 -1
- package/cjs/components/content/Title.js +1 -1
- package/cjs/components/forms/Checkbox/Checkbox.js +25 -40
- package/cjs/components/forms/Checkbox/CheckboxGroup.js +15 -9
- package/cjs/components/forms/Checkbox/context.js +1 -1
- package/cjs/components/forms/DatePicker/DateInput.js +6 -7
- package/cjs/components/forms/DatePicker/DateInputBase.js +6 -5
- package/cjs/components/forms/DatePicker/DatePicker.js +7 -8
- package/cjs/components/forms/DatePicker/DatePickerButton.js +1 -1
- package/cjs/components/forms/DatePicker/DatePickerElement.js +1 -1
- package/cjs/components/forms/DatePicker/DatePickerInput.js +6 -7
- package/cjs/components/forms/DatePicker/DatePickerSegment.js +3 -3
- package/cjs/components/forms/DatePicker/DateRangePicker.js +7 -8
- package/cjs/components/forms/DatePicker/TimeInput.js +6 -7
- package/cjs/components/forms/DatePicker/index.js +1 -1
- package/cjs/components/forms/DatePicker/intl.js +1 -1
- package/cjs/components/forms/DatePicker/parseDate.js +1 -1
- package/cjs/components/forms/DatePicker/props.js +1 -1
- package/cjs/components/forms/DatePicker/utils.js +53 -49
- package/cjs/components/forms/FieldWrapper/FieldWrapper.js +1 -1
- package/cjs/components/forms/FieldWrapper/extract-field-wrapper-props.js +1 -1
- package/cjs/components/forms/FieldWrapper/index.js +1 -1
- package/cjs/components/forms/FieldWrapper/types.js +1 -1
- package/cjs/components/forms/FileInput/FileInput.js +1 -1
- package/cjs/components/forms/Form/Field.js +9 -3
- package/cjs/components/forms/Form/Form.js +1 -1
- package/cjs/components/forms/Form/Submit/Submit.js +1 -1
- package/cjs/components/forms/Form/Submit/index.js +1 -1
- package/cjs/components/forms/Form/SubmitError.js +1 -1
- package/cjs/components/forms/Form/index.js +1 -1
- package/cjs/components/forms/Form/types.js +1 -1
- package/cjs/components/forms/Form/use-field/index.js +1 -1
- package/cjs/components/forms/Form/use-field/types.js +1 -1
- package/cjs/components/forms/Form/use-field/use-field-props.js +2 -4
- package/cjs/components/forms/Form/use-field/use-field.js +1 -1
- package/cjs/components/forms/Form/use-form.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 +1 -1
- package/cjs/components/forms/NumberInput/NumberInput.js +6 -7
- package/cjs/components/forms/NumberInput/StepButton.js +1 -1
- package/cjs/components/forms/PasswordInput/PasswordInput.js +3 -3
- package/cjs/components/forms/RadioGroup/Radio.js +6 -7
- package/cjs/components/forms/RadioGroup/RadioGroup.js +15 -29
- package/cjs/components/forms/RadioGroup/context.js +1 -1
- package/cjs/components/forms/SearchInput/SearchInput.js +5 -5
- package/cjs/components/forms/Slider/Gradation.js +1 -1
- package/cjs/components/forms/Slider/Header.js +1 -1
- package/cjs/components/forms/Slider/RangeSlider.js +1 -1
- package/cjs/components/forms/Slider/Slider.js +1 -1
- package/cjs/components/forms/Slider/SliderBase.js +6 -7
- package/cjs/components/forms/Slider/SliderInput.js +1 -1
- package/cjs/components/forms/Slider/SliderThumb.js +5 -7
- package/cjs/components/forms/Slider/SliderTrack.js +1 -1
- package/cjs/components/forms/Slider/elements.js +1 -1
- package/cjs/components/forms/Slider/index.js +1 -1
- package/cjs/components/forms/Slider/types.js +1 -1
- package/cjs/components/forms/Switch/Switch.js +23 -37
- package/cjs/components/forms/TextArea/TextArea.js +3 -3
- package/cjs/components/forms/TextInput/TextInput.js +3 -3
- package/cjs/components/forms/TextInput/TextInputBase.js +5 -5
- package/cjs/components/forms/index.js +1 -1
- package/cjs/components/forms/wrapper.js +1 -1
- package/cjs/components/layout/Flex.js +1 -1
- package/cjs/components/layout/Flow.js +1 -1
- package/cjs/components/layout/Grid.js +1 -1
- package/cjs/components/layout/Prefix.js +1 -1
- package/cjs/components/layout/Space.js +1 -1
- package/cjs/components/layout/Suffix.js +1 -1
- package/cjs/components/navigation/LegacyTabs/LegacyTabs.js +1 -1
- package/cjs/components/navigation/Link/Link.js +1 -1
- package/cjs/components/organisms/FileTabs/FileTabs.js +1 -1
- 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/Calendar/Calendar.js +6 -7
- package/cjs/components/other/Calendar/CalendarCell.js +3 -3
- package/cjs/components/other/Calendar/CalendarGrid.js +4 -5
- package/cjs/components/other/Calendar/RangeCalendar.js +6 -7
- 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 +6 -7
- 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 +6 -6
- 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 +5 -5
- 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 +4 -4
- package/cjs/components/overlays/Modal/Tray.js +5 -5
- package/cjs/components/overlays/Modal/Underlay.js +1 -1
- package/cjs/components/overlays/Modal/index.js +1 -1
- package/cjs/components/overlays/Modal/types.js +1 -1
- package/cjs/components/overlays/NewNotifications/Bar/FloatingNotification.js +1 -1
- package/cjs/components/overlays/NewNotifications/Bar/NotificationsBar.js +6 -6
- 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 +3 -3
- package/cjs/components/overlays/NewNotifications/Dialog/index.js +1 -1
- package/cjs/components/overlays/NewNotifications/Notification.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationAction.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationCloseButton.js +1 -1
- 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 +4 -5
- 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/NotificationsList.js +3 -3
- package/cjs/components/overlays/NewNotifications/NotificationsList/NotificationsListItem.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationsList/index.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationsList/types.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 +3 -3
- 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 +1 -1
- package/cjs/components/overlays/OverlayWrapper.js +1 -1
- package/cjs/components/overlays/Toasts/Toast.js +1 -1
- 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 +3 -3
- package/cjs/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/cjs/components/overlays/Tooltip/TooltipTrigger.js +6 -7
- package/cjs/components/overlays/Tooltip/context.js +1 -1
- package/cjs/components/pickers/ComboBox/ComboBox.js +14 -19
- package/cjs/components/pickers/Menu/Menu.js +7 -8
- package/cjs/components/pickers/Menu/MenuButton.js +1 -1
- package/cjs/components/pickers/Menu/MenuItem.js +5 -7
- package/cjs/components/pickers/Menu/MenuSection.js +3 -3
- package/cjs/components/pickers/Menu/MenuTrigger.js +7 -8
- 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 +17 -24
- 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/shared/InvalidIcon.js +1 -1
- package/cjs/components/shared/ValidIcon.js +1 -1
- package/cjs/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- 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 +1 -1
- 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 +6 -6
- package/cjs/provider.js +1 -1
- package/cjs/providers/TrackingProvider.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/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/cache-wrapper.js +1 -1
- package/cjs/tasty/utils/case-converter.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/getDisplayName.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 +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/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/random.js +1 -1
- package/cjs/utils/range.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 +6 -4
- 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 +1 -1
- package/cjs/utils/react/useLayoutEffect.js +1 -1
- package/cjs/utils/react/useViewportSize.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 +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-effect-once.js +1 -1
- package/es/_internal/hooks/use-event.js +1 -1
- package/es/_internal/hooks/use-is-first-render.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/hooks/use-update-effect.js +1 -1
- package/es/_internal/hooks/use-warn.js +1 -1
- package/es/_internal/index.js +1 -1
- package/es/components/Base.js +1 -1
- package/es/components/Block.js +1 -1
- package/es/components/GlobalStyles.js +1 -1
- package/es/components/GridProvider.js +1 -1
- package/es/components/HiddenInput.js +1 -1
- package/es/components/OpenTrasition.js +1 -1
- package/es/components/Root.js +2 -2
- package/es/components/actions/Action.js +1 -1
- package/es/components/actions/Button/Button.js +1 -1
- 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 +1 -1
- package/es/components/actions/index.js +1 -1
- package/es/components/actions/use-action.js +2 -3
- package/es/components/content/ActiveZone/ActiveZone.js +2 -3
- package/es/components/content/Alert/Alert.js +1 -1
- 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 +1 -1
- package/es/components/content/Badge/Badge.js +1 -1
- package/es/components/content/Card/Card.js +1 -1
- package/es/components/content/Content.js +1 -1
- package/es/components/content/CopyPasteBlock/CopyPasteBlock.js +2 -2
- package/es/components/content/CopyPasteBlock/index.js +1 -1
- package/es/components/content/CopySnippet/CopySnippet.js +1 -1
- package/es/components/content/CopySnippet/index.js +1 -1
- package/es/components/content/Divider.js +1 -1
- package/es/components/content/Footer.js +1 -1
- package/es/components/content/Header.js +1 -1
- package/es/components/content/Paragraph.js +1 -1
- package/es/components/content/Placeholder/Placeholder.js +1 -1
- 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 +1 -1
- package/es/components/content/Text.js +1 -1
- package/es/components/content/Title.js +1 -1
- package/es/components/forms/Checkbox/Checkbox.js +20 -35
- package/es/components/forms/Checkbox/CheckboxGroup.js +13 -7
- package/es/components/forms/Checkbox/context.js +1 -1
- package/es/components/forms/DatePicker/DateInput.js +3 -4
- package/es/components/forms/DatePicker/DateInputBase.js +4 -3
- package/es/components/forms/DatePicker/DatePicker.js +3 -4
- package/es/components/forms/DatePicker/DatePickerButton.js +1 -1
- package/es/components/forms/DatePicker/DatePickerElement.js +1 -1
- package/es/components/forms/DatePicker/DatePickerInput.js +3 -4
- package/es/components/forms/DatePicker/DatePickerSegment.js +2 -2
- package/es/components/forms/DatePicker/DateRangePicker.js +3 -4
- package/es/components/forms/DatePicker/TimeInput.js +3 -4
- package/es/components/forms/DatePicker/index.js +1 -1
- package/es/components/forms/DatePicker/intl.js +1 -1
- package/es/components/forms/DatePicker/parseDate.js +1 -1
- package/es/components/forms/DatePicker/props.js +1 -1
- package/es/components/forms/DatePicker/utils.js +53 -47
- package/es/components/forms/FieldWrapper/FieldWrapper.js +1 -1
- package/es/components/forms/FieldWrapper/extract-field-wrapper-props.js +1 -1
- package/es/components/forms/FieldWrapper/index.js +1 -1
- package/es/components/forms/FieldWrapper/types.js +1 -1
- package/es/components/forms/FileInput/FileInput.js +1 -1
- package/es/components/forms/Form/Field.js +9 -3
- package/es/components/forms/Form/Form.js +1 -1
- package/es/components/forms/Form/Submit/Submit.js +1 -1
- package/es/components/forms/Form/Submit/index.js +1 -1
- package/es/components/forms/Form/SubmitError.js +1 -1
- package/es/components/forms/Form/index.js +1 -1
- package/es/components/forms/Form/types.js +1 -1
- package/es/components/forms/Form/use-field/index.js +1 -1
- package/es/components/forms/Form/use-field/types.js +1 -1
- package/es/components/forms/Form/use-field/use-field-props.js +2 -4
- package/es/components/forms/Form/use-field/use-field.js +1 -1
- package/es/components/forms/Form/use-form.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 +1 -1
- package/es/components/forms/NumberInput/NumberInput.js +3 -4
- package/es/components/forms/NumberInput/StepButton.js +1 -1
- package/es/components/forms/PasswordInput/PasswordInput.js +2 -2
- package/es/components/forms/RadioGroup/Radio.js +2 -3
- package/es/components/forms/RadioGroup/RadioGroup.js +13 -27
- package/es/components/forms/RadioGroup/context.js +1 -1
- package/es/components/forms/SearchInput/SearchInput.js +3 -3
- package/es/components/forms/Slider/Gradation.js +1 -1
- package/es/components/forms/Slider/Header.js +1 -1
- package/es/components/forms/Slider/RangeSlider.js +1 -1
- package/es/components/forms/Slider/Slider.js +1 -1
- package/es/components/forms/Slider/SliderBase.js +3 -4
- package/es/components/forms/Slider/SliderInput.js +1 -1
- package/es/components/forms/Slider/SliderThumb.js +2 -4
- package/es/components/forms/Slider/SliderTrack.js +1 -1
- package/es/components/forms/Slider/elements.js +1 -1
- package/es/components/forms/Slider/index.js +1 -1
- package/es/components/forms/Slider/types.js +1 -1
- package/es/components/forms/Switch/Switch.js +18 -32
- package/es/components/forms/TextArea/TextArea.js +2 -2
- package/es/components/forms/TextInput/TextInput.js +2 -2
- package/es/components/forms/TextInput/TextInputBase.js +2 -2
- package/es/components/forms/index.js +1 -1
- package/es/components/forms/wrapper.js +1 -1
- package/es/components/layout/Flex.js +1 -1
- package/es/components/layout/Flow.js +1 -1
- package/es/components/layout/Grid.js +1 -1
- package/es/components/layout/Prefix.js +1 -1
- package/es/components/layout/Space.js +1 -1
- package/es/components/layout/Suffix.js +1 -1
- package/es/components/navigation/LegacyTabs/LegacyTabs.js +1 -1
- package/es/components/navigation/Link/Link.js +1 -1
- package/es/components/organisms/FileTabs/FileTabs.js +1 -1
- 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/Calendar/Calendar.js +3 -4
- package/es/components/other/Calendar/CalendarCell.js +2 -2
- package/es/components/other/Calendar/CalendarGrid.js +2 -3
- package/es/components/other/Calendar/RangeCalendar.js +3 -4
- 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 +3 -4
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- package/es/components/overlays/Modal/Tray.js +2 -2
- package/es/components/overlays/Modal/Underlay.js +1 -1
- package/es/components/overlays/Modal/index.js +1 -1
- package/es/components/overlays/Modal/types.js +1 -1
- package/es/components/overlays/NewNotifications/Bar/FloatingNotification.js +1 -1
- 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 +2 -2
- package/es/components/overlays/NewNotifications/Dialog/index.js +1 -1
- package/es/components/overlays/NewNotifications/Notification.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationAction.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationCloseButton.js +1 -1
- 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 +2 -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/NotificationsList.js +2 -2
- package/es/components/overlays/NewNotifications/NotificationsList/NotificationsListItem.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsList/index.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsList/types.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 +2 -2
- 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 +1 -1
- package/es/components/overlays/OverlayWrapper.js +1 -1
- package/es/components/overlays/Toasts/Toast.js +1 -1
- 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 +2 -2
- package/es/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/es/components/overlays/Tooltip/TooltipTrigger.js +3 -4
- package/es/components/overlays/Tooltip/context.js +1 -1
- package/es/components/pickers/ComboBox/ComboBox.js +3 -8
- package/es/components/pickers/Menu/Menu.js +3 -4
- package/es/components/pickers/Menu/MenuButton.js +1 -1
- package/es/components/pickers/Menu/MenuItem.js +2 -4
- package/es/components/pickers/Menu/MenuSection.js +2 -2
- package/es/components/pickers/Menu/MenuTrigger.js +3 -4
- 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 +5 -12
- 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/shared/InvalidIcon.js +1 -1
- package/es/components/shared/ValidIcon.js +1 -1
- package/es/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- 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 +1 -1
- 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 +3 -3
- package/es/provider.js +1 -1
- package/es/providers/TrackingProvider.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/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/cache-wrapper.js +1 -1
- package/es/tasty/utils/case-converter.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/getDisplayName.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 +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/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/random.js +1 -1
- package/es/utils/range.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 +4 -2
- 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 +1 -1
- package/es/utils/react/useLayoutEffect.js +1 -1
- package/es/utils/react/useViewportSize.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 +1 -1
- package/package.json +29 -63
- package/types/components/actions/use-action.d.ts +2 -2
- package/types/components/content/ActiveZone/ActiveZone.d.ts +1 -1
- package/types/components/content/CopySnippet/CopySnippet.d.ts +8 -8
- package/types/components/forms/Checkbox/Checkbox.d.ts +2 -1
- package/types/components/forms/Checkbox/context.d.ts +1 -2
- package/types/components/forms/DatePicker/DatePickerButton.d.ts +4 -4
- package/types/components/forms/DatePicker/DatePickerSegment.d.ts +1 -1
- package/types/components/forms/DatePicker/TimeInput.d.ts +21 -2
- package/types/components/forms/DatePicker/props.d.ts +1 -1
- package/types/components/forms/DatePicker/utils.d.ts +1 -4
- package/types/components/forms/NumberInput/NumberInput.d.ts +1 -1
- package/types/components/forms/RadioGroup/Radio.d.ts +12 -6
- package/types/components/forms/RadioGroup/context.d.ts +1 -1
- package/types/components/forms/Slider/Gradation.d.ts +1 -1
- package/types/components/forms/Slider/SliderBase.d.ts +1 -1
- package/types/components/forms/Slider/SliderInput.d.ts +1 -1
- package/types/components/forms/Slider/SliderThumb.d.ts +3 -2
- package/types/components/forms/Slider/SliderTrack.d.ts +1 -1
- package/types/components/forms/TextInput/TextInputBase.d.ts +3 -1
- package/types/components/overlays/Modal/Modal.d.ts +1 -1
- package/types/components/overlays/Modal/Overlay.d.ts +1 -1
- package/types/components/overlays/Modal/Popover.d.ts +1 -1
- package/types/components/overlays/NewNotifications/hooks/types.d.ts +1 -1
- package/types/components/overlays/NewNotifications/hooks/use-notification-list-item.d.ts +1 -1
- package/types/components/overlays/Tooltip/context.d.ts +1 -1
- package/types/components/pickers/ComboBox/ComboBox.d.ts +5 -4
- package/types/components/pickers/Menu/Menu.d.ts +2 -3
- package/types/components/pickers/Menu/MenuItem.d.ts +1 -1
- package/types/components/pickers/Menu/MenuTrigger.d.ts +7 -3
- package/types/components/pickers/Select/Select.d.ts +2 -3
- package/types/index.d.ts +2 -2
- package/types/stories/components/StyledButton.d.ts +4 -4
- package/types/utils/react/interactions.d.ts +3 -2
@@ -1,18 +1,18 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.
|
4
|
+
* @cube-dev/ui-kit v0.28.0
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
8
8
|
"use strict";
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
10
|
exports.useNotificationsList = void 0;
|
11
|
-
const
|
11
|
+
const react_stately_1 = require("react-stately");
|
12
12
|
const selection_1 = require("@react-aria/selection");
|
13
13
|
function useNotificationsList(props) {
|
14
14
|
const { ref, children, items } = props;
|
15
|
-
const state = (0,
|
15
|
+
const state = (0, react_stately_1.useListState)({
|
16
16
|
selectionMode: 'none',
|
17
17
|
children: children,
|
18
18
|
items: items,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.
|
4
|
+
* @cube-dev/ui-kit v0.28.0
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -14,7 +14,7 @@ exports.Tooltip = void 0;
|
|
14
14
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
15
15
|
const react_1 = require("react");
|
16
16
|
const utils_1 = require("@react-spectrum/utils");
|
17
|
-
const
|
17
|
+
const react_aria_1 = require("react-aria");
|
18
18
|
const styled_components_1 = __importDefault(require("styled-components"));
|
19
19
|
const transitions_1 = require("../../../utils/transitions");
|
20
20
|
const tasty_1 = require("../../../tasty");
|
@@ -87,7 +87,7 @@ function Tooltip(props, ref) {
|
|
87
87
|
props = (0, react_2.mergeProps)(props, tooltipProviderProps);
|
88
88
|
let { placement = 'top', isOpen, tipStyles, showIcon, isMaterial, ...otherProps } = props;
|
89
89
|
const styles = (0, tasty_1.extractStyles)(otherProps, tasty_1.CONTAINER_STYLES);
|
90
|
-
let { tooltipProps } = (0,
|
90
|
+
let { tooltipProps } = (0, react_aria_1.useTooltip)(props, state);
|
91
91
|
// Sync ref with overlayRef from context.
|
92
92
|
(0, react_1.useImperativeHandle)(ref, () => (0, utils_1.createDOMRef)(finalOverlayRef));
|
93
93
|
if (typeof minOffset === 'number') {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.
|
4
|
+
* @cube-dev/ui-kit v0.28.0
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -11,9 +11,8 @@ 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
|
15
|
-
const
|
16
|
-
const tooltip_2 = require("@react-stately/tooltip");
|
14
|
+
const react_aria_1 = require("react-aria");
|
15
|
+
const react_stately_1 = require("react-stately");
|
17
16
|
const OverlayWrapper_1 = require("../OverlayWrapper");
|
18
17
|
const ActiveZone_1 = require("../../content/ActiveZone/ActiveZone");
|
19
18
|
const Block_1 = require("../../Block");
|
@@ -23,10 +22,10 @@ const DEFAULT_CROSS_OFFSET = 0;
|
|
23
22
|
function TooltipTrigger(props) {
|
24
23
|
let { children, activeWrap, crossOffset = DEFAULT_CROSS_OFFSET, isDisabled, isMaterial, offset = DEFAULT_OFFSET, trigger: triggerAction, delay = 250, isOpen, onOpenChange, defaultOpen, } = props;
|
25
24
|
let [trigger, tooltip] = react_1.Children.toArray(children);
|
26
|
-
let state = (0,
|
25
|
+
let state = (0, react_stately_1.useTooltipTriggerState)({ delay, ...props });
|
27
26
|
let tooltipTriggerRef = (0, react_1.useRef)(null);
|
28
27
|
let overlayRef = (0, react_1.useRef)(null);
|
29
|
-
let { triggerProps, tooltipProps } = (0,
|
28
|
+
let { triggerProps, tooltipProps } = (0, react_aria_1.useTooltipTrigger)({
|
30
29
|
isDisabled,
|
31
30
|
trigger: triggerAction,
|
32
31
|
delay,
|
@@ -34,7 +33,7 @@ function TooltipTrigger(props) {
|
|
34
33
|
onOpenChange,
|
35
34
|
defaultOpen,
|
36
35
|
}, state, tooltipTriggerRef);
|
37
|
-
let { overlayProps, arrowProps, placement } = (0,
|
36
|
+
let { overlayProps, arrowProps, placement } = (0, react_aria_1.useOverlayPosition)({
|
38
37
|
placement: props.placement || 'top',
|
39
38
|
targetRef: tooltipTriggerRef,
|
40
39
|
overlayRef,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.
|
4
|
+
* @cube-dev/ui-kit v0.28.0
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -11,17 +11,12 @@ exports.ComboBox = void 0;
|
|
11
11
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
12
12
|
const icons_1 = require("@ant-design/icons");
|
13
13
|
const react_1 = require("react");
|
14
|
-
const
|
15
|
-
const
|
16
|
-
const button_1 = require("@react-aria/button");
|
17
|
-
const interactions_1 = require("@react-aria/interactions");
|
18
|
-
const i18n_1 = require("@react-aria/i18n");
|
19
|
-
const collections_1 = require("@react-stately/collections");
|
20
|
-
const overlays_1 = require("@react-aria/overlays");
|
14
|
+
const react_aria_1 = require("react-aria");
|
15
|
+
const react_stately_1 = require("react-stately");
|
21
16
|
const forms_1 = require("../../forms");
|
22
17
|
const provider_1 = require("../../../provider");
|
23
18
|
const tasty_1 = require("../../../tasty");
|
24
|
-
const
|
19
|
+
const interactions_1 = require("../../../utils/react/interactions");
|
25
20
|
const react_2 = require("../../../utils/react");
|
26
21
|
const FieldWrapper_1 = require("../../forms/FieldWrapper");
|
27
22
|
const Select_1 = require("../Select/Select");
|
@@ -76,7 +71,7 @@ exports.ComboBox = (0, react_1.forwardRef)(function ComboBox(props, ref) {
|
|
76
71
|
});
|
77
72
|
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;
|
78
73
|
let isAsync = loadingState != null;
|
79
|
-
let { contains } = (0,
|
74
|
+
let { contains } = (0, react_aria_1.useFilter)({ sensitivity: 'base' });
|
80
75
|
const comboboxProps = {
|
81
76
|
...otherProps,
|
82
77
|
inputValue: props.inputValue,
|
@@ -110,7 +105,7 @@ exports.ComboBox = (0, react_1.forwardRef)(function ComboBox(props, ref) {
|
|
110
105
|
defaultFilter: filter || contains,
|
111
106
|
allowsEmptyCollection: isAsync,
|
112
107
|
};
|
113
|
-
let state = (0,
|
108
|
+
let state = (0, react_stately_1.useComboBoxState)({
|
114
109
|
...comboboxProps,
|
115
110
|
defaultFilter: filter || contains,
|
116
111
|
allowsEmptyCollection: isAsync,
|
@@ -123,7 +118,7 @@ exports.ComboBox = (0, react_1.forwardRef)(function ComboBox(props, ref) {
|
|
123
118
|
triggerRef = (0, react_2.useCombinedRefs)(triggerRef);
|
124
119
|
popoverRef = (0, react_2.useCombinedRefs)(popoverRef);
|
125
120
|
listBoxRef = (0, react_2.useCombinedRefs)(listBoxRef);
|
126
|
-
let { overlayProps, placement, updatePosition } = (0,
|
121
|
+
let { overlayProps, placement, updatePosition } = (0, react_aria_1.useOverlayPosition)({
|
127
122
|
targetRef: triggerRef,
|
128
123
|
overlayRef: popoverRef,
|
129
124
|
scrollRef: listBoxRef,
|
@@ -133,7 +128,7 @@ exports.ComboBox = (0, react_1.forwardRef)(function ComboBox(props, ref) {
|
|
133
128
|
onClose: state.close,
|
134
129
|
offset: overlayOffset,
|
135
130
|
});
|
136
|
-
let { labelProps, inputProps, listBoxProps, buttonProps: triggerProps, } = (0,
|
131
|
+
let { labelProps, inputProps, listBoxProps, buttonProps: triggerProps, } = (0, react_aria_1.useComboBox)({
|
137
132
|
...comboboxProps,
|
138
133
|
inputRef,
|
139
134
|
buttonRef: triggerRef,
|
@@ -141,12 +136,12 @@ exports.ComboBox = (0, react_1.forwardRef)(function ComboBox(props, ref) {
|
|
141
136
|
popoverRef,
|
142
137
|
menuTrigger,
|
143
138
|
}, state);
|
144
|
-
let { isFocused, focusProps } = (0,
|
145
|
-
let { hoverProps, isHovered } = (0,
|
139
|
+
let { isFocused, focusProps } = (0, interactions_1.useFocus)({ isDisabled });
|
140
|
+
let { hoverProps, isHovered } = (0, react_aria_1.useHover)({ isDisabled });
|
146
141
|
// Get props for the button based on the trigger props from useComboBox
|
147
|
-
let { buttonProps, isPressed: isTriggerPressed } = (0,
|
148
|
-
let { hoverProps: triggerHoverProps, isHovered: isTriggerHovered } = (0,
|
149
|
-
let { focusProps: triggerFocusProps, isFocused: isTriggerFocused } = (0,
|
142
|
+
let { buttonProps, isPressed: isTriggerPressed } = (0, react_aria_1.useButton)(triggerProps, triggerRef);
|
143
|
+
let { hoverProps: triggerHoverProps, isHovered: isTriggerHovered } = (0, react_aria_1.useHover)({ isDisabled });
|
144
|
+
let { focusProps: triggerFocusProps, isFocused: isTriggerFocused } = (0, interactions_1.useFocus)({ isDisabled }, true);
|
150
145
|
(0, react_2.useLayoutEffect)(() => {
|
151
146
|
if (state.isOpen) {
|
152
147
|
updatePosition();
|
@@ -211,7 +206,7 @@ exports.ComboBox = (0, react_1.forwardRef)(function ComboBox(props, ref) {
|
|
211
206
|
ref: ref,
|
212
207
|
} }));
|
213
208
|
});
|
214
|
-
exports.ComboBox.Item =
|
209
|
+
exports.ComboBox.Item = react_stately_1.Item;
|
215
210
|
Object.defineProperty(exports.ComboBox, 'cubeInputType', {
|
216
211
|
value: 'ComboBox',
|
217
212
|
enumerable: false,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.
|
4
|
+
* @cube-dev/ui-kit v0.28.0
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -33,11 +33,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
33
|
exports.Menu = void 0;
|
34
34
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
35
35
|
const react_1 = __importStar(require("react"));
|
36
|
-
const
|
37
|
-
const
|
36
|
+
const react_stately_1 = require("react-stately");
|
37
|
+
const react_aria_1 = require("react-aria");
|
38
38
|
const utils_1 = require("@react-aria/utils");
|
39
39
|
const utils_2 = require("@react-spectrum/utils");
|
40
|
-
const tree_1 = require("@react-stately/tree");
|
41
40
|
const tasty_1 = require("../../../tasty");
|
42
41
|
const react_2 = require("../../../utils/react");
|
43
42
|
const styled_1 = require("./styled");
|
@@ -49,10 +48,10 @@ function Menu(props, ref) {
|
|
49
48
|
const domRef = (0, utils_2.useDOMRef)(ref);
|
50
49
|
const contextProps = (0, context_1.useMenuContext)();
|
51
50
|
const completeProps = (0, react_2.mergeProps)(contextProps, props);
|
52
|
-
const state = (0,
|
51
|
+
const state = (0, react_stately_1.useTreeState)(completeProps);
|
53
52
|
const items = [...state.collection];
|
54
53
|
const hasSections = items.some((item) => item.type === 'section');
|
55
|
-
const { menuProps } = (0,
|
54
|
+
const { menuProps } = (0, react_aria_1.useMenu)(completeProps, state, domRef);
|
56
55
|
const styles = (0, tasty_1.extractStyles)(completeProps, tasty_1.CONTAINER_STYLES);
|
57
56
|
const defaultProps = {
|
58
57
|
qa,
|
@@ -80,10 +79,10 @@ function Menu(props, ref) {
|
|
80
79
|
// forwardRef doesn't support generic parameters, so cast the result to the correct type
|
81
80
|
// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
|
82
81
|
const _Menu = react_1.default.forwardRef(Menu);
|
83
|
-
const Item = Object.assign(
|
82
|
+
const Item = Object.assign(react_stately_1.Item, {
|
84
83
|
displayName: 'Item',
|
85
84
|
});
|
86
|
-
const Section = Object.assign(
|
85
|
+
const Section = Object.assign(react_stately_1.Section, {
|
87
86
|
displayName: 'Section',
|
88
87
|
});
|
89
88
|
const __Menu = Object.assign(_Menu, {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.
|
4
|
+
* @cube-dev/ui-kit v0.28.0
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -10,9 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.MenuItem = void 0;
|
11
11
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
12
12
|
const react_1 = require("react");
|
13
|
-
const
|
14
|
-
const focus_1 = require("@react-aria/focus");
|
15
|
-
const menu_1 = require("@react-aria/menu");
|
13
|
+
const react_aria_1 = require("react-aria");
|
16
14
|
const react_2 = require("../../../utils/react");
|
17
15
|
const context_1 = require("./context");
|
18
16
|
const styled_1 = require("./styled");
|
@@ -25,8 +23,8 @@ function MenuItem(props) {
|
|
25
23
|
const isSelectable = state.selectionManager.selectionMode !== 'none';
|
26
24
|
const isDisabledKey = state.disabledKeys.has(key);
|
27
25
|
const ref = (0, react_1.useRef)(null);
|
28
|
-
const { hoverProps, isHovered } = (0,
|
29
|
-
const { menuItemProps, labelProps, descriptionProps, keyboardShortcutProps, isFocused, isSelected, isPressed, isDisabled, } = (0,
|
26
|
+
const { hoverProps, isHovered } = (0, react_aria_1.useHover)({ isDisabled: isDisabledKey });
|
27
|
+
const { menuItemProps, labelProps, descriptionProps, keyboardShortcutProps, isFocused, isSelected, isPressed, isDisabled, } = (0, react_aria_1.useMenuItem)({
|
30
28
|
isSelected: state.selectionManager.isSelected(key),
|
31
29
|
isDisabled: isDisabledKey,
|
32
30
|
'aria-label': item['aria-label'],
|
@@ -46,7 +44,7 @@ function MenuItem(props) {
|
|
46
44
|
},
|
47
45
|
};
|
48
46
|
const contents = ((0, jsx_runtime_1.jsx)(MenuButton_1.MenuButton, { ...(0, react_2.mergeProps)(itemProps, buttonProps), styles: styles, selectionIcon: selectionIcon, isSelectable: isSelectable, isSelected: isSelected, isDisabled: isDisabled, children: rendered }));
|
49
|
-
return ((0, jsx_runtime_1.jsx)(
|
47
|
+
return ((0, jsx_runtime_1.jsx)(react_aria_1.FocusRing, { children: (0, jsx_runtime_1.jsx)(styled_1.StyledMenuItem, { ...(0, react_2.mergeProps)(menuItemProps, hoverProps), ref: ref, "data-qa": itemProps.qa ? `MenuItem-${itemProps.qa}` : `MenuItem-${key}`, mods: {
|
50
48
|
disabled: isDisabled,
|
51
49
|
selected: isSelected,
|
52
50
|
selectable: isSelectable,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.
|
4
|
+
* @cube-dev/ui-kit v0.28.0
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -9,14 +9,14 @@
|
|
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
|
12
|
+
const react_aria_1 = require("react-aria");
|
13
13
|
const MenuItem_1 = require("./MenuItem");
|
14
14
|
const styled_1 = require("./styled");
|
15
15
|
/** @private */
|
16
16
|
function MenuSection(props) {
|
17
17
|
const { item, state, styles, itemStyles, headingStyles, onAction } = props;
|
18
18
|
const heading = item.rendered;
|
19
|
-
const { itemProps, headingProps, groupProps } = (0,
|
19
|
+
const { itemProps, headingProps, groupProps } = (0, react_aria_1.useMenuSection)({
|
20
20
|
heading,
|
21
21
|
'aria-label': item['aria-label'],
|
22
22
|
});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.
|
4
|
+
* @cube-dev/ui-kit v0.28.0
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -34,10 +34,9 @@ exports.MenuTrigger = void 0;
|
|
34
34
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
35
35
|
const react_1 = __importStar(require("react"));
|
36
36
|
const utils_1 = require("@react-spectrum/utils");
|
37
|
-
const
|
37
|
+
const react_aria_1 = require("react-aria");
|
38
38
|
const interactions_1 = require("@react-aria/interactions");
|
39
|
-
const
|
40
|
-
const menu_2 = require("@react-stately/menu");
|
39
|
+
const react_stately_1 = require("react-stately");
|
41
40
|
const Modal_1 = require("../../overlays/Modal");
|
42
41
|
const react_2 = require("../../../utils/react");
|
43
42
|
const context_1 = require("./context");
|
@@ -49,8 +48,8 @@ function MenuTrigger(props, ref) {
|
|
49
48
|
const menuRef = (0, react_1.useRef)(null);
|
50
49
|
const { children, align = 'start', shouldFlip = true, direction = 'bottom', closeOnSelect, trigger = 'press', isDisabled, } = props;
|
51
50
|
const [menuTrigger, menu] = react_1.default.Children.toArray(children);
|
52
|
-
const state = (0,
|
53
|
-
const { menuTriggerProps, menuProps } = (0,
|
51
|
+
const state = (0, react_stately_1.useMenuTriggerState)(props);
|
52
|
+
const { menuTriggerProps, menuProps } = (0, react_aria_1.useMenuTrigger)({ isDisabled }, state, menuTriggerRef);
|
54
53
|
let initialPlacement;
|
55
54
|
switch (direction) {
|
56
55
|
case 'left':
|
@@ -65,7 +64,7 @@ function MenuTrigger(props, ref) {
|
|
65
64
|
initialPlacement = `${direction} ${align}`;
|
66
65
|
}
|
67
66
|
const isMobile = (0, utils_1.useIsMobileDevice)();
|
68
|
-
const { overlayProps: positionProps, placement } = (0,
|
67
|
+
const { overlayProps: positionProps, placement } = (0, react_aria_1.useOverlayPosition)({
|
69
68
|
targetRef: menuTriggerRef,
|
70
69
|
overlayRef: menuPopoverRef,
|
71
70
|
scrollRef: menuRef,
|
@@ -93,7 +92,7 @@ function MenuTrigger(props, ref) {
|
|
93
92
|
popover: !isMobile,
|
94
93
|
},
|
95
94
|
};
|
96
|
-
const contents = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(
|
95
|
+
const contents = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_aria_1.DismissButton, { onDismiss: state.close }), menu, (0, jsx_runtime_1.jsx)(react_aria_1.DismissButton, { onDismiss: state.close })] }));
|
97
96
|
// On small screen devices, the menu is rendered in a tray, otherwise a popover.
|
98
97
|
let overlay;
|
99
98
|
if (isMobile) {
|