@cube-dev/ui-kit 0.19.0 → 0.20.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +21 -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 +1 -1
- 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 +1 -1
- package/cjs/components/content/ActiveZone/ActiveZone.js +1 -1
- 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/CopySnippet/CopySnippet.js +58 -17
- 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 +14 -5
- package/cjs/components/forms/Checkbox/CheckboxGroup.js +12 -24
- package/cjs/components/forms/Checkbox/context.js +1 -1
- 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 +1 -1
- 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 +4 -2
- 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 +8 -13
- package/cjs/components/forms/Form/use-field/use-field.js +2 -1
- package/cjs/components/forms/Form/useForm.js +1 -1
- package/cjs/components/forms/Form/validation.js +1 -1
- package/cjs/components/forms/Input/Input.js +1 -1
- package/cjs/components/forms/Input/index.js +1 -1
- package/cjs/components/forms/Label.js +1 -1
- package/cjs/components/forms/NumberInput/NumberInput.js +2 -2
- package/cjs/components/forms/NumberInput/StepButton.js +1 -1
- package/cjs/components/forms/PasswordInput/PasswordInput.js +14 -5
- package/cjs/components/forms/RadioGroup/Radio.js +2 -1
- package/cjs/components/forms/RadioGroup/RadioGroup.js +2 -1
- package/cjs/components/forms/RadioGroup/context.js +1 -1
- package/cjs/components/forms/SearchInput/SearchInput.js +3 -4
- 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 +5 -5
- package/cjs/components/forms/Slider/SliderBase.js +10 -3
- package/cjs/components/forms/Slider/SliderInput.js +1 -1
- package/cjs/components/forms/Slider/SliderThumb.js +1 -1
- package/cjs/components/forms/Slider/SliderTrack.js +12 -4
- package/cjs/components/forms/Slider/elements.js +14 -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 +11 -3
- package/cjs/components/forms/TextArea/TextArea.js +13 -5
- package/cjs/components/forms/TextInput/TextInput.js +10 -2
- package/cjs/components/forms/TextInput/TextInputBase.js +10 -1
- package/cjs/components/forms/index.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/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 +1 -1
- package/cjs/components/overlays/Dialog/DialogContainer.js +1 -1
- package/cjs/components/overlays/Dialog/DialogForm.js +1 -1
- package/cjs/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/cjs/components/overlays/Dialog/context.js +1 -1
- package/cjs/components/overlays/Dialog/index.js +1 -1
- package/cjs/components/overlays/Modal/Modal.js +1 -1
- 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 +1 -1
- package/cjs/components/overlays/Modal/Tray.js +1 -1
- 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 +1 -1
- 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 +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 +1 -1
- 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 +1 -1
- 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 +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 +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 +1 -1
- package/cjs/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/cjs/components/overlays/Tooltip/TooltipTrigger.js +1 -1
- package/cjs/components/overlays/Tooltip/context.js +1 -1
- package/cjs/components/pickers/ComboBox/ComboBox.js +10 -3
- package/cjs/components/pickers/Menu/Menu.js +1 -1
- package/cjs/components/pickers/Menu/MenuButton.js +1 -1
- package/cjs/components/pickers/Menu/MenuItem.js +1 -1
- package/cjs/components/pickers/Menu/MenuSection.js +1 -1
- package/cjs/components/pickers/Menu/MenuTrigger.js +1 -1
- package/cjs/components/pickers/Menu/context.js +1 -1
- package/cjs/components/pickers/Menu/styled.js +1 -1
- package/cjs/components/pickers/Select/Select.js +8 -1
- package/cjs/components/portal/Portal.js +1 -1
- package/cjs/components/portal/PortalProvider.js +1 -1
- package/cjs/components/portal/index.js +1 -1
- package/cjs/components/portal/storybook/templates/CustomRoot.js +1 -1
- package/cjs/components/portal/storybook/templates/PortalOrder.js +1 -1
- package/cjs/components/portal/storybook/templates/basic.js +1 -1
- package/cjs/components/portal/storybook/templates/index.js +1 -1
- package/cjs/components/portal/types.js +1 -1
- package/cjs/components/portal/usePortal.js +1 -1
- package/cjs/components/status/LoadingAnimation/LoadingAnimation.js +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 +1 -1
- 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 +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 +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 +1 -1
- 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 +1 -1
- package/es/components/content/ActiveZone/ActiveZone.js +1 -1
- 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/CopySnippet/CopySnippet.js +60 -18
- 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 +15 -6
- package/es/components/forms/Checkbox/CheckboxGroup.js +13 -25
- package/es/components/forms/Checkbox/context.js +1 -1
- 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 +1 -1
- 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 +2 -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 +8 -13
- package/es/components/forms/Form/use-field/use-field.js +2 -1
- package/es/components/forms/Form/useForm.js +1 -1
- package/es/components/forms/Form/validation.js +1 -1
- package/es/components/forms/Input/Input.js +1 -1
- package/es/components/forms/Input/index.js +1 -1
- package/es/components/forms/Label.js +1 -1
- package/es/components/forms/NumberInput/NumberInput.js +3 -3
- package/es/components/forms/NumberInput/StepButton.js +1 -1
- package/es/components/forms/PasswordInput/PasswordInput.js +14 -5
- package/es/components/forms/RadioGroup/Radio.js +3 -2
- package/es/components/forms/RadioGroup/RadioGroup.js +3 -2
- package/es/components/forms/RadioGroup/context.js +1 -1
- package/es/components/forms/SearchInput/SearchInput.js +4 -5
- 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 +5 -5
- package/es/components/forms/Slider/SliderBase.js +11 -4
- package/es/components/forms/Slider/SliderInput.js +1 -1
- package/es/components/forms/Slider/SliderThumb.js +1 -1
- package/es/components/forms/Slider/SliderTrack.js +12 -4
- package/es/components/forms/Slider/elements.js +14 -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 +11 -3
- package/es/components/forms/TextArea/TextArea.js +14 -6
- package/es/components/forms/TextInput/TextInput.js +10 -2
- package/es/components/forms/TextInput/TextInputBase.js +11 -2
- package/es/components/forms/index.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/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 +1 -1
- package/es/components/overlays/Dialog/DialogContainer.js +1 -1
- package/es/components/overlays/Dialog/DialogForm.js +1 -1
- package/es/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/es/components/overlays/Dialog/context.js +1 -1
- package/es/components/overlays/Dialog/index.js +1 -1
- package/es/components/overlays/Modal/Modal.js +1 -1
- 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 +1 -1
- package/es/components/overlays/Modal/Tray.js +1 -1
- 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 +1 -1
- 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 +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 +1 -1
- 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 +1 -1
- 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 +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 +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 +1 -1
- package/es/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/es/components/overlays/Tooltip/TooltipTrigger.js +1 -1
- package/es/components/overlays/Tooltip/context.js +1 -1
- package/es/components/pickers/ComboBox/ComboBox.js +9 -2
- package/es/components/pickers/Menu/Menu.js +1 -1
- package/es/components/pickers/Menu/MenuButton.js +1 -1
- package/es/components/pickers/Menu/MenuItem.js +1 -1
- package/es/components/pickers/Menu/MenuSection.js +1 -1
- package/es/components/pickers/Menu/MenuTrigger.js +1 -1
- package/es/components/pickers/Menu/context.js +1 -1
- package/es/components/pickers/Menu/styled.js +1 -1
- package/es/components/pickers/Select/Select.js +9 -2
- package/es/components/portal/Portal.js +1 -1
- package/es/components/portal/PortalProvider.js +1 -1
- package/es/components/portal/index.js +1 -1
- package/es/components/portal/storybook/templates/CustomRoot.js +1 -1
- package/es/components/portal/storybook/templates/PortalOrder.js +1 -1
- package/es/components/portal/storybook/templates/basic.js +1 -1
- package/es/components/portal/storybook/templates/index.js +1 -1
- package/es/components/portal/types.js +1 -1
- package/es/components/portal/usePortal.js +1 -1
- package/es/components/status/LoadingAnimation/LoadingAnimation.js +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 +1 -1
- 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 +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 +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 +1 -1
- package/types/components/content/CopySnippet/CopySnippet.d.ts +241 -2
- package/types/components/forms/Form/index.d.ts +2 -0
- package/types/components/forms/Slider/Slider.d.ts +1 -1
- package/types/components/forms/Slider/types.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.
|
4
|
+
* @cube-dev/ui-kit v0.20.1
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -10,7 +10,7 @@ import { forwardRef, useRef } from 'react';
|
|
10
10
|
import { useLocale } from '@react-aria/i18n';
|
11
11
|
import { useNumberFieldState } from '@react-stately/numberfield';
|
12
12
|
import { useNumberField } from '@react-aria/numberfield';
|
13
|
-
import {
|
13
|
+
import { useFieldProps } from '../Form';
|
14
14
|
import { useProviderProps } from '../../../provider';
|
15
15
|
import { TextInputBase, } from '../TextInput/TextInputBase';
|
16
16
|
import { tasty } from '../../../tasty';
|
@@ -33,7 +33,7 @@ const StepperContainer = tasty({
|
|
33
33
|
function NumberInput(props, ref) {
|
34
34
|
props = castNullableNumberValue(props);
|
35
35
|
props = useProviderProps(props);
|
36
|
-
props =
|
36
|
+
props = useFieldProps(props);
|
37
37
|
let { hideStepper, suffix, value, defaultValue, onChange, ...otherProps } = props;
|
38
38
|
let showStepper = !hideStepper;
|
39
39
|
let { locale } = useLocale();
|
@@ -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.20.1
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -13,20 +13,29 @@ import { TextInputBase, } from '../TextInput/TextInputBase';
|
|
13
13
|
import { useProviderProps } from '../../../provider';
|
14
14
|
import { Button } from '../../actions';
|
15
15
|
import { castNullableStringValue, } from '../../../utils/react/nullableValue';
|
16
|
+
import { useFieldProps } from '../Form';
|
16
17
|
function PasswordInput(props, ref) {
|
17
18
|
props = castNullableStringValue(props);
|
18
|
-
|
19
|
+
props = useProviderProps(props);
|
20
|
+
props = useFieldProps(props, {
|
21
|
+
defaultValidationTrigger: 'onBlur',
|
22
|
+
valuePropsMapper: ({ value, onChange }) => ({
|
23
|
+
value: value?.toString() ?? '',
|
24
|
+
onChange,
|
25
|
+
}),
|
26
|
+
});
|
19
27
|
let [type, setType] = useState('password');
|
20
28
|
let inputRef = useRef(null);
|
21
29
|
let { labelProps, inputProps } = useTextField({
|
22
|
-
...
|
30
|
+
...props,
|
23
31
|
type,
|
24
32
|
}, inputRef);
|
25
|
-
const
|
33
|
+
const { suffix, multiLine, ...rest } = props;
|
34
|
+
const toggleType = useCallback(() => {
|
26
35
|
setType((type) => (type === 'password' ? 'text' : 'password'));
|
27
36
|
}, []);
|
28
37
|
const wrappedSuffix = (_jsxs(_Fragment, { children: [suffix, _jsx(Button, { excludeFromTabOrder: true, type: "neutral", htmlType: "button", placeSelf: "stretch", height: "auto", radius: "right", width: "4x", label: "Toggle masking", icon: type === 'password' ? _jsx(EyeInvisibleOutlined, {}) : _jsx(EyeOutlined, {}), onPress: toggleType })] }));
|
29
|
-
return (_jsx(TextInputBase, { ref: ref, labelProps: labelProps, inputProps: inputProps, inputRef: inputRef, inputStyles: { paddingRight: '4x' }, type: type, suffixPosition: "after", suffix: wrappedSuffix, multiLine: multiLine, ...
|
38
|
+
return (_jsx(TextInputBase, { ref: ref, labelProps: labelProps, inputProps: inputProps, inputRef: inputRef, inputStyles: { paddingRight: '4x' }, type: type, suffixPosition: "after", suffix: wrappedSuffix, multiLine: multiLine, ...rest }));
|
30
39
|
}
|
31
40
|
/**
|
32
41
|
* PasswordInputs are password inputs that allow users to input passwords or code entries
|
@@ -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.20.1
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -16,7 +16,7 @@ import { mergeProps } from '../../../utils/react';
|
|
16
16
|
import { useProviderProps } from '../../../provider';
|
17
17
|
import { INLINE_LABEL_STYLES } from '../Label';
|
18
18
|
import { HiddenInput } from '../../HiddenInput';
|
19
|
-
import { useFormProps } from '../Form';
|
19
|
+
import { useFieldProps, useFormProps } from '../Form';
|
20
20
|
import { RadioGroup } from './RadioGroup';
|
21
21
|
import { useRadioProvider } from './context';
|
22
22
|
const RadioWrapperElement = tasty({
|
@@ -115,6 +115,7 @@ const RadioLabelElement = tasty({
|
|
115
115
|
function Radio(props, ref) {
|
116
116
|
props = useProviderProps(props);
|
117
117
|
props = useFormProps(props);
|
118
|
+
props = useFieldProps(props, { defaultValidationTrigger: 'onChange' });
|
118
119
|
let { qa, isDisabled, validationState, children, label, autoFocus, labelStyles, labelProps, inputStyles, type = 'radio', 'aria-label': ariaLabel, ...otherProps } = props;
|
119
120
|
let isButton = type === 'button';
|
120
121
|
label = label || children;
|
@@ -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.20.1
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -11,7 +11,7 @@ import { useDOMRef } from '@react-spectrum/utils';
|
|
11
11
|
import { useRadioGroup } from '@react-aria/radio';
|
12
12
|
import { useRadioGroupState } from '@react-stately/radio';
|
13
13
|
import { useProviderProps } from '../../../provider';
|
14
|
-
import { FormContext, useFormProps } from '../Form';
|
14
|
+
import { FormContext, useFieldProps, useFormProps } from '../Form';
|
15
15
|
import { BLOCK_STYLES, extractStyles, OUTER_STYLES, tasty, } from '../../../tasty';
|
16
16
|
import { FieldWrapper } from '../FieldWrapper';
|
17
17
|
import { castNullableStringValue, } from '../../../utils/react/nullableValue';
|
@@ -33,6 +33,7 @@ function RadioGroup(props, ref) {
|
|
33
33
|
props = castNullableStringValue(props);
|
34
34
|
props = useProviderProps(props);
|
35
35
|
props = useFormProps(props);
|
36
|
+
props = useFieldProps(props, { defaultValidationTrigger: 'onChange' });
|
36
37
|
let { isDisabled, isRequired, necessityIndicator, label, extra, labelPosition = 'top', validationState, children, orientation = 'vertical', message, description, labelStyles, requiredMark = true, tooltip, isHidden, styles, groupStyles, insideForm, labelSuffix, ...otherProps } = props;
|
37
38
|
let domRef = useDOMRef(ref);
|
38
39
|
styles = extractStyles(otherProps, OUTER_STYLES, styles);
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.
|
4
|
+
* @cube-dev/ui-kit v0.20.1
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
8
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
9
9
|
import { forwardRef, useRef } from 'react';
|
10
10
|
import { CloseOutlined, SearchOutlined } from '@ant-design/icons';
|
11
11
|
import { useSearchFieldState } from '@react-stately/searchfield';
|
@@ -32,9 +32,8 @@ export const SearchInput = forwardRef(function SearchInput(props, ref) {
|
|
32
32
|
let inputRef = useRef(null);
|
33
33
|
let state = useSearchFieldState(props);
|
34
34
|
let { inputProps, clearButtonProps } = useSearchField(props, state, inputRef);
|
35
|
-
|
36
|
-
|
37
|
-
!props.isReadOnly && (_jsx(ClearButton, { type: validationState === 'invalid' ? 'clear' : 'neutral', theme: validationState === 'invalid' ? 'danger' : undefined, ...ariaToCubeButtonProps(clearButtonProps) })), ...props }));
|
35
|
+
let showClearButton = isClearable && state.value !== '' && !props.isReadOnly;
|
36
|
+
return (_jsx(TextInputBase, { ref: ref, inputProps: inputProps, inputRef: inputRef, type: "search", icon: _jsx(SearchOutlined, {}), suffixPosition: "after", ...props, suffix: props.suffix || showClearButton ? (_jsxs(_Fragment, { children: [props.suffix, showClearButton && (_jsx(ClearButton, { type: validationState === 'invalid' ? 'clear' : 'neutral', theme: validationState === 'invalid' ? 'danger' : undefined, ...ariaToCubeButtonProps(clearButtonProps) }))] })) : undefined }));
|
38
37
|
});
|
39
38
|
|
40
39
|
|
@@ -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.20.1
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -13,7 +13,7 @@ import { SliderTrack } from './SliderTrack';
|
|
13
13
|
import { SliderBase, } from './SliderBase';
|
14
14
|
import { Gradation } from './Gradation';
|
15
15
|
function Slider(props, ref) {
|
16
|
-
|
16
|
+
const { onChange, onChangeEnd, value, defaultValue, getValueLabel, isDisabled, styles, gradation, orientation, ...otherProps } = props;
|
17
17
|
let baseProps = {
|
18
18
|
...otherProps,
|
19
19
|
// Normalize `value: number[]` to `value: number`
|
@@ -25,10 +25,10 @@ function Slider(props, ref) {
|
|
25
25
|
onChangeEnd: (v) => {
|
26
26
|
onChangeEnd?.(v[0]);
|
27
27
|
},
|
28
|
-
getValueLabel: getValueLabel ? ([v]) => getValueLabel
|
28
|
+
getValueLabel: getValueLabel ? ([v]) => getValueLabel(v) : undefined,
|
29
29
|
};
|
30
|
-
|
31
|
-
return (_jsx(SliderBase, { ...otherProps, ...baseProps, orientation: orientation, styles:
|
30
|
+
const extractedStyles = extractStyles(otherProps, OUTER_STYLES, styles);
|
31
|
+
return (_jsx(SliderBase, { ...otherProps, ...baseProps, ref: ref, orientation: orientation, styles: extractedStyles, children: ({ trackRef, inputRef, state }) => {
|
32
32
|
return (_jsxs(_Fragment, { children: [_jsx(Gradation, { state: state, ranges: [0, 1], values: gradation }), _jsx(SliderTrack, { state: state, isDisabled: isDisabled, orientation: orientation }), _jsx(SliderThumb, { index: 0, state: state, inputRef: inputRef, trackRef: trackRef, isDisabled: isDisabled })] }));
|
33
33
|
} }));
|
34
34
|
}
|
@@ -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.20.1
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -11,9 +11,9 @@ import { useFocusableRef } from '@react-spectrum/utils';
|
|
11
11
|
import { useSliderState } from '@react-stately/slider';
|
12
12
|
import { useSlider } from '@react-aria/slider';
|
13
13
|
import { useNumberFormatter } from '@react-aria/i18n';
|
14
|
-
import { FieldWrapper } from '
|
14
|
+
import { FieldWrapper } from '../FieldWrapper';
|
15
15
|
import { extractStyles, OUTER_STYLES, tasty } from '../../../tasty';
|
16
|
-
import { useFormProps } from '../Form';
|
16
|
+
import { useFieldProps, useFormProps } from '../Form';
|
17
17
|
import { Text } from '../../content/Text';
|
18
18
|
import { SliderControlsElement, SliderElement } from './elements';
|
19
19
|
const LabelValueElement = tasty(Text, {
|
@@ -23,7 +23,14 @@ const LabelValueElement = tasty(Text, {
|
|
23
23
|
},
|
24
24
|
});
|
25
25
|
function SliderBase(allProps, ref) {
|
26
|
-
|
26
|
+
let props = useFormProps(allProps);
|
27
|
+
props = useFieldProps(props, {
|
28
|
+
defaultValidationTrigger: 'onChange',
|
29
|
+
valuePropsMapper: ({ value, onChange }) => ({
|
30
|
+
value: value != null ? value : undefined,
|
31
|
+
onChange: onChange,
|
32
|
+
}),
|
33
|
+
});
|
27
34
|
let { labelPosition, label, extra, styles, isRequired, validationState, message, description, requiredMark, labelSuffix, labelStyles, necessityIndicator, gradation, isDisabled, inputStyles, minValue = 0, maxValue = 100, inputWidth, formatOptions, getValueLabel, onChange, onChangeEnd, children, showValueLabel = true, orientation: formOrientation, ...otherProps } = props;
|
28
35
|
let orientation = allProps.orientation || 'horizontal';
|
29
36
|
// `Math.abs(Math.sign(a) - Math.sign(b)) === 2` is true if the values have a different sign.
|
@@ -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.20.1
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -9,12 +9,20 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
import { useMemo } from 'react';
|
10
10
|
import { SliderTrackContainerElement } from './elements';
|
11
11
|
export function SliderTrack(props) {
|
12
|
-
const { isDisabled, orientation = 'horizontal' } = props;
|
12
|
+
const { isDisabled, state, orientation = 'horizontal' } = props;
|
13
|
+
const selectedTrack = [state.getThumbPercent(0), state.getThumbPercent(1)];
|
14
|
+
const showRangeTrack = !Number.isNaN(selectedTrack[1]);
|
13
15
|
const mods = useMemo(() => ({
|
14
16
|
disabled: isDisabled,
|
15
17
|
horizontal: orientation === 'horizontal',
|
16
|
-
|
17
|
-
|
18
|
+
range: showRangeTrack,
|
19
|
+
}), [isDisabled, showRangeTrack]);
|
20
|
+
return (_jsx(SliderTrackContainerElement, { mods: mods, style: showRangeTrack
|
21
|
+
? {
|
22
|
+
'--slider-range-start': `${selectedTrack[0] * 100}%`,
|
23
|
+
'--slider-range-end': `${selectedTrack[1] * 100}%`,
|
24
|
+
}
|
25
|
+
: {} }));
|
18
26
|
}
|
19
27
|
|
20
28
|
|
@@ -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.20.1
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -54,6 +54,19 @@ export const SliderTrackContainerElement = tasty({
|
|
54
54
|
horizontal: '100%',
|
55
55
|
},
|
56
56
|
radius: true,
|
57
|
+
'&::before': {
|
58
|
+
content: '""',
|
59
|
+
display: {
|
60
|
+
'': 'none',
|
61
|
+
range: 'block',
|
62
|
+
},
|
63
|
+
position: 'absolute',
|
64
|
+
top: 0,
|
65
|
+
bottom: 0,
|
66
|
+
fill: '#purple',
|
67
|
+
left: '@slider-range-start',
|
68
|
+
width: '(@slider-range-end - @slider-range-start)',
|
69
|
+
},
|
57
70
|
},
|
58
71
|
});
|
59
72
|
export const SliderGradationElement = tasty({
|
@@ -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.20.1
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -18,10 +18,10 @@ import { useFocus } from '../../../utils/react/interactions';
|
|
18
18
|
import { mergeProps } from '../../../utils/react';
|
19
19
|
import { HiddenInput } from '../../HiddenInput';
|
20
20
|
import { INLINE_LABEL_STYLES, LABEL_STYLES } from '../Label';
|
21
|
-
import { useFormProps } from '../Form/Form';
|
22
21
|
import { Text } from '../../content/Text';
|
23
22
|
import { FieldWrapper } from '../FieldWrapper';
|
24
23
|
import { castNullableIsSelected, } from '../../../utils/react/nullableValue';
|
24
|
+
import { useFieldProps, useFormProps } from '../Form';
|
25
25
|
const SwitchWrapperElement = tasty({
|
26
26
|
qa: 'SwitchWrapper',
|
27
27
|
styles: {
|
@@ -113,6 +113,14 @@ function Switch(props, ref) {
|
|
113
113
|
props = castNullableIsSelected(props);
|
114
114
|
props = useProviderProps(props);
|
115
115
|
props = useFormProps(props);
|
116
|
+
props = useFieldProps(props, {
|
117
|
+
defaultValidationTrigger: 'onChange',
|
118
|
+
valuePropsMapper: ({ value, onChange }) => ({
|
119
|
+
isSelected: value != null ? value : false,
|
120
|
+
isIndeterminate: false,
|
121
|
+
onChange: onChange,
|
122
|
+
}),
|
123
|
+
});
|
116
124
|
let { qa, isDisabled = false, autoFocus, children, label, extra, labelProps, labelStyles, isLoading, insideForm, validationState, message, description, labelPosition, inputStyles, requiredMark = true, tooltip, labelSuffix, size = 'large', ...otherProps } = props;
|
117
125
|
let styles = extractStyles(props, OUTER_STYLES);
|
118
126
|
inputStyles = extractStyles(props, BLOCK_STYLES, inputStyles);
|
@@ -134,7 +142,7 @@ function Switch(props, ref) {
|
|
134
142
|
hovered: isHovered,
|
135
143
|
focused: isFocused,
|
136
144
|
};
|
137
|
-
const switchField = (_jsxs(SwitchWrapperElement, { mods: mods, "data-size": size, children: [_jsx(HiddenInput, { "data-qa": "HiddenInput", ...mergeProps(inputProps, focusProps), ref: inputRef }), _jsx(SwitchElement, { qa: qa || 'Switch', mods: mods, "data-size": size, styles: inputStyles, children: _jsx("div", { "data-element": "Thumb", "aria-hidden": "true" }) }), children ? _jsx(Text, { children: children }) : null] }));
|
145
|
+
const switchField = (_jsxs(SwitchWrapperElement, { mods: mods, "data-size": size, children: [_jsx(HiddenInput, { "data-qa": "HiddenInput", ...mergeProps(inputProps, focusProps), ref: inputRef }), _jsx(SwitchElement, { qa: qa || 'Switch', mods: mods, "data-size": size, styles: inputStyles, children: _jsx("div", { "data-element": "Thumb", "aria-hidden": "true" }) }), children ? _jsx(Text, { nowrap: true, children: children }) : null] }));
|
138
146
|
if (insideForm) {
|
139
147
|
return (_jsx(FieldWrapper, { ...{
|
140
148
|
as: 'label',
|
@@ -1,26 +1,34 @@
|
|
1
1
|
/**
|
2
2
|
* @license MIT
|
3
3
|
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.
|
4
|
+
* @cube-dev/ui-kit v0.20.1
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
|
-
import { forwardRef,
|
9
|
+
import { forwardRef, useRef } from 'react';
|
10
10
|
import { useControlledState } from '@react-stately/utils';
|
11
11
|
import { useTextField } from '@react-aria/textfield';
|
12
12
|
import { TextInputBase, } from '../TextInput/TextInputBase';
|
13
13
|
import { useProviderProps } from '../../../provider';
|
14
14
|
import { castNullableStringValue, } from '../../../utils/react/nullableValue';
|
15
15
|
import { chain, useLayoutEffect } from '../../../utils/react';
|
16
|
+
import { useFieldProps } from '../Form';
|
17
|
+
import { useEvent } from '../../../_internal';
|
16
18
|
function TextArea(props, ref) {
|
17
19
|
props = castNullableStringValue(props);
|
18
20
|
props = useProviderProps(props);
|
19
|
-
|
20
|
-
|
21
|
+
props = useFieldProps(props, {
|
22
|
+
defaultValidationTrigger: 'onBlur',
|
23
|
+
valuePropsMapper: ({ value, onChange }) => ({
|
24
|
+
onChange,
|
25
|
+
value: value?.toString() ?? '',
|
26
|
+
}),
|
27
|
+
});
|
28
|
+
let { autoSize = false, isDisabled = false, isReadOnly = false, isRequired = false, onChange, rows = 3, ...otherProps } = props;
|
21
29
|
let [inputValue, setInputValue] = useControlledState(props.value, props.defaultValue, () => { });
|
22
30
|
let inputRef = useRef(null);
|
23
|
-
let onHeightChange =
|
31
|
+
let onHeightChange = useEvent(() => {
|
24
32
|
if (autoSize && inputRef.current) {
|
25
33
|
let input = inputRef.current;
|
26
34
|
let prevAlignment = input.style.alignSelf;
|
@@ -35,7 +43,7 @@ function TextArea(props, ref) {
|
|
35
43
|
2}px`;
|
36
44
|
input.style.alignSelf = prevAlignment;
|
37
45
|
}
|
38
|
-
}
|
46
|
+
});
|
39
47
|
useLayoutEffect(() => {
|
40
48
|
if (inputRef.current) {
|
41
49
|
onHeightChange();
|
@@ -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.20.1
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -10,10 +10,18 @@ import { forwardRef, useRef } from 'react';
|
|
10
10
|
import { useTextField } from '@react-aria/textfield';
|
11
11
|
import { useProviderProps } from '../../../provider';
|
12
12
|
import { castNullableStringValue, } from '../../../utils/react/nullableValue';
|
13
|
+
import { useFieldProps } from '../Form';
|
13
14
|
import { TextInputBase } from './TextInputBase';
|
14
15
|
export const TextInput = forwardRef(function TextInput(props, ref) {
|
15
|
-
castNullableStringValue(props);
|
16
|
+
props = castNullableStringValue(props);
|
16
17
|
props = useProviderProps(props);
|
18
|
+
props = useFieldProps(props, {
|
19
|
+
defaultValidationTrigger: 'onBlur',
|
20
|
+
valuePropsMapper: ({ value, onChange }) => ({
|
21
|
+
onChange,
|
22
|
+
value: value?.toString() ?? '',
|
23
|
+
}),
|
24
|
+
});
|
17
25
|
let inputRef = useRef(null);
|
18
26
|
let { labelProps, inputProps } = useTextField(props, inputRef);
|
19
27
|
return (_jsx(TextInputBase, { ...props, ref: ref, labelProps: labelProps, inputProps: inputProps, inputRef: inputRef }));
|
@@ -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.20.1
|
5
5
|
* Released under the MIT license.
|
6
6
|
*/
|
7
7
|
|
@@ -10,7 +10,7 @@ import { CheckOutlined, LoadingOutlined, WarningOutlined, } from '@ant-design/ic
|
|
10
10
|
import { createFocusableRef } from '@react-spectrum/utils';
|
11
11
|
import { cloneElement, forwardRef, useImperativeHandle, useMemo, useRef, } from 'react';
|
12
12
|
import { useHover } from '@react-aria/interactions';
|
13
|
-
import { useFormProps } from '../Form';
|
13
|
+
import { useFieldProps, useFormProps } from '../Form';
|
14
14
|
import { useProviderProps } from '../../../provider';
|
15
15
|
import { BLOCK_STYLES, DIMENSION_STYLES, extractStyles, POSITION_STYLES, tasty, } from '../../../tasty';
|
16
16
|
import { useFocus } from '../../../utils/react/interactions';
|
@@ -132,6 +132,15 @@ const InputElement = tasty({ qa: 'Input', styles: DEFAULT_INPUT_STYLES });
|
|
132
132
|
function TextInputBase(props, ref) {
|
133
133
|
props = useProviderProps(props);
|
134
134
|
props = useFormProps(props);
|
135
|
+
props = useFieldProps(props, {
|
136
|
+
defaultValidationTrigger: 'onBlur',
|
137
|
+
valuePropsMapper: ({ value, onChange }) => ({
|
138
|
+
value: typeof value === 'string' || typeof value === 'number'
|
139
|
+
? String(value)
|
140
|
+
: '',
|
141
|
+
onChange,
|
142
|
+
}),
|
143
|
+
});
|
135
144
|
let { qa, label, extra, mods, labelPosition = 'top', labelStyles, isRequired, necessityIndicator, necessityLabel, validationState, message, description, prefix, isDisabled, multiLine, autoFocus, labelProps, inputProps, wrapperProps, inputRef, isLoading, loadingIndicator, value, inputStyles = {}, wrapperStyles = {}, suffix, suffixPosition = 'before', wrapperRef, requiredMark = true, tooltip, isHidden, rows = 1, size, icon, labelSuffix, maxLength, minLength, ...otherProps } = props;
|
136
145
|
let styles = extractStyles(otherProps, STYLE_LIST);
|
137
146
|
let type = otherProps.type;
|