@cube-dev/ui-kit 0.0.0-canary-e9c7690 → 0.0.0-canary-a804266
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/_internal/hooks/index.js +7 -3
- package/cjs/_internal/hooks/use-chained-callback.js +2 -1
- package/cjs/_internal/hooks/use-deprecation-warning.js +1 -1
- package/cjs/_internal/hooks/use-effect-once.js +18 -0
- package/cjs/_internal/hooks/use-event.js +1 -1
- package/cjs/_internal/hooks/use-is-first-render.js +22 -0
- 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 +24 -0
- package/cjs/_internal/hooks/use-warn.js +46 -0
- 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/index.js +1 -2
- package/cjs/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/cjs/components/actions/index.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 +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 +2 -2
- package/cjs/components/content/Title.js +1 -1
- package/cjs/components/forms/Checkbox/Checkbox.js +25 -9
- package/cjs/components/forms/Checkbox/CheckboxGroup.js +29 -24
- package/cjs/components/forms/Checkbox/context.js +1 -1
- package/cjs/components/forms/{FieldWrapper.js → FieldWrapper/FieldWrapper.js} +19 -17
- package/cjs/components/forms/FieldWrapper/extract-field-wrapper-props.js +50 -0
- package/cjs/components/forms/FieldWrapper/index.js +24 -0
- package/cjs/components/forms/FieldWrapper/types.js +11 -0
- package/cjs/components/forms/FileInput/FileInput.js +3 -3
- package/cjs/components/forms/Form/{Field.js → Field/LegacyField.js} +42 -27
- package/cjs/components/forms/Form/Field/index.js +25 -0
- package/cjs/components/forms/Form/Field/types.js +11 -0
- package/cjs/components/forms/Form/Field/use-field-props.js +54 -0
- package/cjs/components/forms/Form/Field/use-field.js +133 -0
- package/cjs/components/forms/Form/Form.js +2 -2
- package/cjs/components/forms/Form/Submit/Submit.js +25 -0
- package/cjs/components/forms/Form/Submit/index.js +22 -0
- package/cjs/components/forms/Form/SubmitError.js +1 -1
- package/cjs/components/forms/Form/index.js +16 -3
- package/cjs/components/forms/Form/types.js +1 -1
- package/cjs/components/forms/Form/useForm.js +2 -1
- package/cjs/components/forms/Form/validation.js +1 -1
- package/cjs/components/forms/Input/Input.js +3 -7
- package/cjs/components/forms/Input/index.js +1 -1
- package/cjs/components/forms/Label.js +1 -1
- package/cjs/components/forms/NumberInput/NumberInput.js +16 -10
- package/cjs/components/forms/NumberInput/StepButton.js +1 -1
- package/cjs/components/forms/PasswordInput/PasswordInput.js +22 -5
- package/cjs/components/forms/RadioGroup/Radio.js +12 -3
- package/cjs/components/forms/RadioGroup/RadioGroup.js +11 -3
- package/cjs/components/forms/RadioGroup/context.js +1 -1
- package/cjs/components/forms/RangeSlider/Gradation.js +1 -1
- package/cjs/components/forms/RangeSlider/Header.js +1 -1
- package/cjs/components/forms/RangeSlider/RangeInput.js +1 -1
- package/cjs/components/forms/RangeSlider/RangeSlider.js +13 -7
- package/cjs/components/forms/RangeSlider/Slide.js +1 -1
- package/cjs/components/forms/RangeSlider/Thumb.js +1 -1
- package/cjs/components/forms/RangeSlider/helpers.js +1 -1
- package/cjs/components/forms/RangeSlider/styled.js +1 -1
- package/cjs/components/forms/SearchInput/SearchInput.js +1 -1
- package/cjs/components/forms/Switch/Switch.js +15 -12
- package/cjs/components/forms/TextArea/TextArea.js +30 -27
- package/cjs/components/forms/TextInput/TextInput.js +16 -9
- package/cjs/components/forms/TextInput/TextInputBase.js +8 -36
- package/cjs/components/forms/TextInput/index.js +23 -0
- 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 +4 -6
- 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/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 +24 -12
- 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 +18 -3
- 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 +4 -6
- package/cjs/provider.js +1 -1
- package/cjs/providers/StyleProvider.js +1 -1
- package/cjs/services/notification.js +1 -1
- package/cjs/shared/form.js +1 -1
- package/cjs/shared/index.js +1 -1
- package/cjs/styled/index.js +1 -1
- package/cjs/styled/styled.js +1 -1
- package/cjs/tasty/index.js +1 -1
- package/cjs/tasty/providers/BreakpointsProvider.js +1 -1
- package/cjs/tasty/styles/align.js +1 -1
- package/cjs/tasty/styles/border.js +1 -1
- package/cjs/tasty/styles/boxShadow.combinator.js +1 -1
- package/cjs/tasty/styles/color.js +1 -1
- package/cjs/tasty/styles/createStyle.js +1 -1
- package/cjs/tasty/styles/dimension.js +1 -1
- package/cjs/tasty/styles/display.js +1 -1
- package/cjs/tasty/styles/fill.js +1 -1
- package/cjs/tasty/styles/flow.js +1 -1
- package/cjs/tasty/styles/font.js +1 -1
- package/cjs/tasty/styles/fontStyle.js +1 -1
- package/cjs/tasty/styles/gap.js +1 -1
- package/cjs/tasty/styles/groupRadius.js +1 -1
- package/cjs/tasty/styles/height.js +1 -1
- package/cjs/tasty/styles/index.js +1 -1
- package/cjs/tasty/styles/justify.js +1 -1
- package/cjs/tasty/styles/list.js +1 -1
- package/cjs/tasty/styles/margin.js +1 -1
- package/cjs/tasty/styles/marginBlock.js +1 -1
- package/cjs/tasty/styles/marginInline.js +1 -1
- package/cjs/tasty/styles/outline.js +1 -1
- package/cjs/tasty/styles/padding.js +1 -1
- package/cjs/tasty/styles/paddingBlock.js +1 -1
- package/cjs/tasty/styles/paddingInline.js +1 -1
- package/cjs/tasty/styles/predefined.js +1 -1
- package/cjs/tasty/styles/preset.js +1 -1
- package/cjs/tasty/styles/radius.js +1 -1
- package/cjs/tasty/styles/reset.js +1 -1
- package/cjs/tasty/styles/shadow.js +1 -1
- package/cjs/tasty/styles/styledScrollbar.js +1 -1
- package/cjs/tasty/styles/transition.js +1 -1
- package/cjs/tasty/styles/types.js +1 -1
- package/cjs/tasty/styles/width.js +1 -1
- package/cjs/tasty/tasty.js +1 -1
- package/cjs/tasty/types.js +1 -1
- package/cjs/tasty/utils/colors.js +1 -1
- package/cjs/tasty/utils/dotize.js +1 -1
- package/cjs/tasty/utils/filterBaseProps.js +1 -1
- package/cjs/tasty/utils/get-display-name.js +1 -1
- package/cjs/tasty/utils/index.js +1 -1
- package/cjs/tasty/utils/mergeStyles.js +1 -1
- package/cjs/tasty/utils/modAttrs.js +1 -1
- package/cjs/tasty/utils/renderStyles.js +1 -1
- package/cjs/tasty/utils/responsive.js +1 -1
- package/cjs/tasty/utils/string.js +1 -1
- package/cjs/tasty/utils/styles.js +1 -1
- package/cjs/tasty/utils/warnings.js +1 -1
- package/cjs/test/index.js +9 -1
- package/cjs/test/render.js +1 -1
- package/cjs/test/setup.js +41 -4
- package/cjs/test/utils/index.js +1 -1
- package/cjs/test/utils/wait.js +1 -1
- package/cjs/tokens.js +1 -2
- 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 +2 -2
- package/es/_internal/hooks/index.js +7 -3
- package/es/_internal/hooks/use-chained-callback.js +2 -1
- package/es/_internal/hooks/use-deprecation-warning.js +1 -1
- package/es/_internal/hooks/use-effect-once.js +14 -0
- package/es/_internal/hooks/use-event.js +1 -1
- package/es/_internal/hooks/use-is-first-render.js +18 -0
- 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 +20 -0
- package/es/_internal/hooks/use-warn.js +23 -0
- 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/index.js +1 -2
- package/es/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/es/components/actions/index.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 +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 +2 -2
- package/es/components/content/Title.js +1 -1
- package/es/components/forms/Checkbox/Checkbox.js +26 -10
- package/es/components/forms/Checkbox/CheckboxGroup.js +29 -24
- package/es/components/forms/Checkbox/context.js +1 -1
- package/es/components/forms/{FieldWrapper.js → FieldWrapper/FieldWrapper.js} +19 -17
- package/es/components/forms/FieldWrapper/extract-field-wrapper-props.js +46 -0
- package/es/components/forms/FieldWrapper/index.js +12 -0
- package/es/components/forms/FieldWrapper/types.js +10 -0
- package/es/components/forms/FileInput/FileInput.js +2 -2
- package/es/components/forms/Form/{Field.js → Field/LegacyField.js} +41 -27
- package/es/components/forms/Form/Field/index.js +13 -0
- package/es/components/forms/Form/Field/types.js +10 -0
- package/es/components/forms/Form/Field/use-field-props.js +50 -0
- package/es/components/forms/Form/Field/use-field.js +129 -0
- package/es/components/forms/Form/Form.js +2 -2
- package/es/components/forms/Form/Submit/Submit.js +22 -0
- package/es/components/forms/Form/Submit/index.js +10 -0
- package/es/components/forms/Form/SubmitError.js +1 -1
- package/es/components/forms/Form/index.js +5 -3
- package/es/components/forms/Form/types.js +1 -1
- package/es/components/forms/Form/useForm.js +2 -1
- package/es/components/forms/Form/validation.js +1 -1
- package/es/components/forms/Input/Input.js +3 -7
- package/es/components/forms/Input/index.js +1 -1
- package/es/components/forms/Label.js +1 -1
- package/es/components/forms/NumberInput/NumberInput.js +16 -10
- package/es/components/forms/NumberInput/StepButton.js +1 -1
- package/es/components/forms/PasswordInput/PasswordInput.js +21 -4
- package/es/components/forms/RadioGroup/Radio.js +13 -4
- package/es/components/forms/RadioGroup/RadioGroup.js +12 -4
- package/es/components/forms/RadioGroup/context.js +1 -1
- package/es/components/forms/RangeSlider/Gradation.js +1 -1
- package/es/components/forms/RangeSlider/Header.js +1 -1
- package/es/components/forms/RangeSlider/RangeInput.js +1 -1
- package/es/components/forms/RangeSlider/RangeSlider.js +13 -7
- package/es/components/forms/RangeSlider/Slide.js +1 -1
- package/es/components/forms/RangeSlider/Thumb.js +1 -1
- package/es/components/forms/RangeSlider/helpers.js +1 -1
- package/es/components/forms/RangeSlider/styled.js +1 -1
- package/es/components/forms/SearchInput/SearchInput.js +1 -1
- package/es/components/forms/Switch/Switch.js +15 -12
- package/es/components/forms/TextArea/TextArea.js +30 -27
- package/es/components/forms/TextInput/TextInput.js +16 -9
- package/es/components/forms/TextInput/TextInputBase.js +9 -37
- package/es/components/forms/TextInput/index.js +11 -0
- 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 +4 -6
- 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/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 +22 -10
- 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 +19 -4
- 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 +2 -3
- package/es/provider.js +1 -1
- package/es/providers/StyleProvider.js +1 -1
- package/es/services/notification.js +1 -1
- package/es/shared/form.js +1 -1
- package/es/shared/index.js +1 -1
- package/es/styled/index.js +1 -1
- package/es/styled/styled.js +1 -1
- package/es/tasty/index.js +1 -1
- package/es/tasty/providers/BreakpointsProvider.js +1 -1
- package/es/tasty/styles/align.js +1 -1
- package/es/tasty/styles/border.js +1 -1
- package/es/tasty/styles/boxShadow.combinator.js +1 -1
- package/es/tasty/styles/color.js +1 -1
- package/es/tasty/styles/createStyle.js +1 -1
- package/es/tasty/styles/dimension.js +1 -1
- package/es/tasty/styles/display.js +1 -1
- package/es/tasty/styles/fill.js +1 -1
- package/es/tasty/styles/flow.js +1 -1
- package/es/tasty/styles/font.js +1 -1
- package/es/tasty/styles/fontStyle.js +1 -1
- package/es/tasty/styles/gap.js +1 -1
- package/es/tasty/styles/groupRadius.js +1 -1
- package/es/tasty/styles/height.js +1 -1
- package/es/tasty/styles/index.js +1 -1
- package/es/tasty/styles/justify.js +1 -1
- package/es/tasty/styles/list.js +1 -1
- package/es/tasty/styles/margin.js +1 -1
- package/es/tasty/styles/marginBlock.js +1 -1
- package/es/tasty/styles/marginInline.js +1 -1
- package/es/tasty/styles/outline.js +1 -1
- package/es/tasty/styles/padding.js +1 -1
- package/es/tasty/styles/paddingBlock.js +1 -1
- package/es/tasty/styles/paddingInline.js +1 -1
- package/es/tasty/styles/predefined.js +1 -1
- package/es/tasty/styles/preset.js +1 -1
- package/es/tasty/styles/radius.js +1 -1
- package/es/tasty/styles/reset.js +1 -1
- package/es/tasty/styles/shadow.js +1 -1
- package/es/tasty/styles/styledScrollbar.js +1 -1
- package/es/tasty/styles/transition.js +1 -1
- package/es/tasty/styles/types.js +1 -1
- package/es/tasty/styles/width.js +1 -1
- package/es/tasty/tasty.js +1 -1
- package/es/tasty/types.js +1 -1
- package/es/tasty/utils/colors.js +1 -1
- package/es/tasty/utils/dotize.js +1 -1
- package/es/tasty/utils/filterBaseProps.js +1 -1
- package/es/tasty/utils/get-display-name.js +1 -1
- package/es/tasty/utils/index.js +1 -1
- package/es/tasty/utils/mergeStyles.js +1 -1
- package/es/tasty/utils/modAttrs.js +1 -1
- package/es/tasty/utils/renderStyles.js +1 -1
- package/es/tasty/utils/responsive.js +1 -1
- package/es/tasty/utils/string.js +1 -1
- package/es/tasty/utils/styles.js +1 -1
- package/es/tasty/utils/warnings.js +1 -1
- package/es/test/index.js +5 -1
- package/es/test/render.js +1 -1
- package/es/test/setup.js +36 -2
- package/es/test/utils/index.js +1 -1
- package/es/test/utils/wait.js +1 -1
- package/es/tokens.js +1 -2
- 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 +2 -2
- package/package.json +1 -1
- package/types/_internal/hooks/index.d.ts +6 -2
- package/types/_internal/hooks/use-effect-once.d.ts +2 -0
- package/types/_internal/hooks/use-is-first-render.d.ts +1 -0
- package/types/_internal/hooks/use-update-effect.d.ts +2 -0
- package/types/_internal/hooks/use-warn.d.ts +2 -0
- package/types/components/actions/Button/index.d.ts +0 -1
- package/types/components/forms/Checkbox/CheckboxGroup.d.ts +1 -2
- package/types/components/forms/FieldWrapper/FieldWrapper.d.ts +7 -0
- package/types/components/forms/FieldWrapper/extract-field-wrapper-props.d.ts +9 -0
- package/types/components/forms/FieldWrapper/index.d.ts +3 -0
- package/types/components/forms/{FieldWrapper.d.ts → FieldWrapper/types.d.ts} +15 -20
- package/types/components/forms/Form/Field/LegacyField.d.ts +14 -0
- package/types/components/forms/Form/Field/index.d.ts +4 -0
- package/types/components/forms/Form/Field/types.d.ts +72 -0
- package/types/components/forms/Form/Field/use-field-props.d.ts +19 -0
- package/types/components/forms/Form/Field/use-field.d.ts +3 -0
- package/types/components/forms/Form/Form.d.ts +3 -1
- package/types/components/forms/Form/Submit/Submit.d.ts +8 -0
- package/types/components/forms/Form/Submit/index.d.ts +1 -0
- package/types/components/forms/Form/index.d.ts +5 -1
- package/types/components/forms/Form/useForm.d.ts +1 -1
- package/types/components/forms/Input/Input.d.ts +1 -1
- package/types/components/forms/NumberInput/NumberInput.d.ts +2 -3
- package/types/components/forms/PasswordInput/PasswordInput.d.ts +3 -1
- package/types/components/forms/RangeSlider/RangeSlider.d.ts +1 -4
- package/types/components/forms/RangeSlider/helpers.d.ts +2 -2
- package/types/components/forms/Switch/Switch.d.ts +2 -3
- package/types/components/forms/TextArea/TextArea.d.ts +3 -4
- package/types/components/forms/TextInput/TextInput.d.ts +5 -0
- package/types/components/forms/TextInput/TextInputBase.d.ts +1 -2
- package/types/components/forms/TextInput/index.d.ts +2 -0
- package/types/components/other/Base64Upload/Base64Upload.d.ts +4 -1
- package/types/components/overlays/Dialog/DialogForm.d.ts +1 -2
- package/types/components/pickers/ComboBox/ComboBox.d.ts +5 -5
- package/types/components/pickers/Select/Select.d.ts +5 -2
- package/types/index.d.ts +1 -2
- package/types/test/index.d.ts +4 -0
- package/types/test/setup.d.ts +0 -1
- package/cjs/components/actions/Button/Submit.js +0 -29
- package/cjs/stories/FormFieldArgs.js +0 -324
- package/cjs/stories/components/ConfirmDeletionDialogForm.js +0 -36
- package/cjs/stories/components/DialogFormApp.js +0 -19
- package/cjs/stories/components/StyledButton.js +0 -37
- package/cjs/stories/lists/baseProps.js +0 -42
- package/es/components/actions/Button/Submit.js +0 -26
- package/es/stories/FormFieldArgs.js +0 -321
- package/es/stories/components/ConfirmDeletionDialogForm.js +0 -32
- package/es/stories/components/DialogFormApp.js +0 -15
- package/es/stories/components/StyledButton.js +0 -33
- package/es/stories/lists/baseProps.js +0 -39
- package/types/components/actions/Button/Submit.d.ts +0 -3
- package/types/components/forms/Form/Field.d.ts +0 -41
- package/types/stories/FormFieldArgs.d.ts +0 -369
- package/types/stories/components/ConfirmDeletionDialogForm.d.ts +0 -8
- package/types/stories/components/DialogFormApp.d.ts +0 -2
- package/types/stories/components/StyledButton.d.ts +0 -119
- package/types/stories/lists/baseProps.d.ts +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* author: Cube Dev Team
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-a804266
|
|
5
|
+
* Released under the MIT license.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.Submit = void 0;
|
|
11
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
12
|
+
const react_1 = require("react");
|
|
13
|
+
const provider_1 = require("../../../../provider");
|
|
14
|
+
const Form_1 = require("../Form");
|
|
15
|
+
const actions_1 = require("../../../actions");
|
|
16
|
+
exports.Submit = (0, react_1.forwardRef)(function Submit(props, ref) {
|
|
17
|
+
props = (0, provider_1.useProviderProps)(props);
|
|
18
|
+
props = (0, Form_1.useFormProps)(props);
|
|
19
|
+
const { form, ...otherProps } = props;
|
|
20
|
+
const formData = form?.getFieldsValue() ?? {};
|
|
21
|
+
const isInvalid = Object.keys(formData).some((name) => form?.isFieldInvalid(name) ?? false);
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(actions_1.Button, { ref: ref, type: "primary", htmlType: "submit", isLoading: form?.isSubmitting, isDisabled: isInvalid, ...otherProps }, void 0));
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* author: Cube Dev Team
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-a804266
|
|
5
|
+
* Released under the MIT license.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./Submit"), exports);
|
|
21
|
+
|
|
22
|
+
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-a804266
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
"use strict";
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
9
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.SubmitError = exports.FormContext = exports.useForm = exports.Field = exports.Form = exports.useFormProps = void 0;
|
|
20
|
+
exports.SubmitError = exports.Submit = exports.FormContext = exports.useForm = exports.Field = exports.Form = exports.useFormProps = void 0;
|
|
21
|
+
const Submit_1 = require("./Submit");
|
|
22
|
+
Object.defineProperty(exports, "Submit", { enumerable: true, get: function () { return Submit_1.Submit; } });
|
|
11
23
|
const Field_1 = require("./Field");
|
|
12
24
|
Object.defineProperty(exports, "Field", { enumerable: true, get: function () { return Field_1.Field; } });
|
|
13
25
|
const SubmitError_1 = require("./SubmitError");
|
|
@@ -17,7 +29,8 @@ Object.defineProperty(exports, "useForm", { enumerable: true, get: function () {
|
|
|
17
29
|
const Form_1 = require("./Form");
|
|
18
30
|
Object.defineProperty(exports, "useFormProps", { enumerable: true, get: function () { return Form_1.useFormProps; } });
|
|
19
31
|
Object.defineProperty(exports, "FormContext", { enumerable: true, get: function () { return Form_1.FormContext; } });
|
|
20
|
-
const Form = Object.assign(Form_1.Form, { Item: Field_1.Field, useForm: useForm_1.useForm, SubmitError: SubmitError_1.SubmitError });
|
|
32
|
+
const Form = Object.assign(Form_1.Form, { Item: Field_1.Field, useForm: useForm_1.useForm, Submit: Submit_1.Submit, SubmitError: SubmitError_1.SubmitError });
|
|
21
33
|
exports.Form = Form;
|
|
34
|
+
__exportStar(require("./Field"), exports);
|
|
22
35
|
|
|
23
36
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-a804266
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -220,6 +220,7 @@ class CubeFormInstance {
|
|
|
220
220
|
if (!skipRender) {
|
|
221
221
|
this.forceReRender();
|
|
222
222
|
}
|
|
223
|
+
return this.fields[name];
|
|
223
224
|
}
|
|
224
225
|
removeField(name, skipRender) {
|
|
225
226
|
if (this.fields[name]) {
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-a804266
|
|
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.Input = void 0;
|
|
11
|
-
const
|
|
12
|
-
const react_1 = require("react");
|
|
13
|
-
const TextInput_1 = require("../TextInput/TextInput");
|
|
11
|
+
const TextInput_1 = require("../TextInput");
|
|
14
12
|
const PasswordInput_1 = require("../PasswordInput/PasswordInput");
|
|
15
13
|
const NumberInput_1 = require("../NumberInput/NumberInput");
|
|
16
14
|
const FileInput_1 = require("../FileInput/FileInput");
|
|
17
15
|
const TextArea_1 = require("../TextArea/TextArea");
|
|
18
|
-
exports.Input = Object.assign(
|
|
19
|
-
return (0, jsx_runtime_1.jsx)(TextInput_1.TextInput, { ref: ref, ...props }, void 0);
|
|
20
|
-
}), {
|
|
16
|
+
exports.Input = Object.assign(TextInput_1.TextInput, {
|
|
21
17
|
Text: TextInput_1.TextInput,
|
|
22
18
|
Password: PasswordInput_1.PasswordInput,
|
|
23
19
|
Number: NumberInput_1.NumberInput,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-a804266
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -15,7 +15,7 @@ const numberfield_1 = require("@react-stately/numberfield");
|
|
|
15
15
|
const numberfield_2 = require("@react-aria/numberfield");
|
|
16
16
|
const Form_1 = require("../Form");
|
|
17
17
|
const provider_1 = require("../../../provider");
|
|
18
|
-
const
|
|
18
|
+
const TextInput_1 = require("../TextInput");
|
|
19
19
|
const tasty_1 = require("../../../tasty");
|
|
20
20
|
const nullableValue_1 = require("../../../utils/react/nullableValue");
|
|
21
21
|
const StepButton_1 = require("./StepButton");
|
|
@@ -28,23 +28,29 @@ const StepperContainer = (0, tasty_1.tasty)({
|
|
|
28
28
|
placeSelf: 'stretch',
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
|
-
|
|
31
|
+
/**
|
|
32
|
+
* NumberFields allow users to enter a number, and increment or decrement the value using stepper buttons.
|
|
33
|
+
*/
|
|
34
|
+
exports.NumberInput = (0, react_1.forwardRef)(function NumberInput(props, ref) {
|
|
32
35
|
props = (0, nullableValue_1.castNullableNumberValue)(props);
|
|
33
36
|
props = (0, provider_1.useProviderProps)(props);
|
|
34
|
-
props = (0, Form_1.
|
|
37
|
+
props = (0, Form_1.useFieldProps)(props);
|
|
35
38
|
let { hideStepper, suffix, value, defaultValue, onChange, ...otherProps } = props;
|
|
36
39
|
let showStepper = !hideStepper;
|
|
37
40
|
let { locale } = (0, i18n_1.useLocale)();
|
|
38
41
|
let state = (0, numberfield_1.useNumberFieldState)({ ...props, locale });
|
|
39
42
|
let inputRef = (0, react_1.useRef)(null);
|
|
40
43
|
let { groupProps, labelProps, inputProps, incrementButtonProps, decrementButtonProps, } = (0, numberfield_2.useNumberField)(props, state, inputRef);
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
42
|
-
}
|
|
44
|
+
return ((0, jsx_runtime_1.jsx)(TextInput_1.TextInputBase, { ...otherProps, ref: ref, labelProps: labelProps, inputProps: inputProps, inputRef: inputRef, wrapperProps: groupProps, suffixPosition: "after", suffix: showStepper ? ((0, jsx_runtime_1.jsxs)(StepperContainer, { children: [(0, jsx_runtime_1.jsx)(StepButton_1.StepButton, { isDisabled: props.isDisabled, direction: "up", ...incrementButtonProps, size: otherProps.size }, void 0), (0, jsx_runtime_1.jsx)(StepButton_1.StepButton, { isDisabled: props.isDisabled, direction: "down", ...decrementButtonProps, size: otherProps.size }, void 0)] }, void 0)) : (suffix) }, void 0));
|
|
45
|
+
});
|
|
43
46
|
/**
|
|
44
|
-
*
|
|
47
|
+
* @legacy should be removed with legacy <Field />
|
|
45
48
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
Object.defineProperty(exports.NumberInput, 'cubeInputType', {
|
|
50
|
+
enumerable: false,
|
|
51
|
+
configurable: false,
|
|
52
|
+
writable: false,
|
|
53
|
+
value: 'Number',
|
|
54
|
+
});
|
|
49
55
|
|
|
50
56
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-a804266
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -12,13 +12,22 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
12
12
|
const react_1 = require("react");
|
|
13
13
|
const textfield_1 = require("@react-aria/textfield");
|
|
14
14
|
const icons_1 = require("@ant-design/icons");
|
|
15
|
-
const
|
|
15
|
+
const TextInput_1 = require("../TextInput");
|
|
16
16
|
const provider_1 = require("../../../provider");
|
|
17
17
|
const actions_1 = require("../../actions");
|
|
18
18
|
const nullableValue_1 = require("../../../utils/react/nullableValue");
|
|
19
|
+
const Form_1 = require("../Form");
|
|
19
20
|
function PasswordInput(props, ref) {
|
|
20
21
|
props = (0, nullableValue_1.castNullableStringValue)(props);
|
|
21
|
-
|
|
22
|
+
props = (0, provider_1.useProviderProps)(props);
|
|
23
|
+
props = (0, Form_1.useFieldProps)(props, {
|
|
24
|
+
defaultValidationTrigger: 'onBlur',
|
|
25
|
+
valuePropsMapper: ({ value, onChange }) => ({
|
|
26
|
+
value: value?.toString() ?? '',
|
|
27
|
+
onChange,
|
|
28
|
+
}),
|
|
29
|
+
});
|
|
30
|
+
const { suffix, multiLine, ...otherProps } = props;
|
|
22
31
|
let [type, setType] = (0, react_1.useState)('password');
|
|
23
32
|
let inputRef = (0, react_1.useRef)(null);
|
|
24
33
|
let { labelProps, inputProps } = (0, textfield_1.useTextField)({
|
|
@@ -29,7 +38,7 @@ function PasswordInput(props, ref) {
|
|
|
29
38
|
setType((type) => (type === 'password' ? 'text' : 'password'));
|
|
30
39
|
}, []);
|
|
31
40
|
const wrappedSuffix = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [suffix, (0, jsx_runtime_1.jsx)(actions_1.Button, { excludeFromTabOrder: true, type: "neutral", htmlType: "button", placeSelf: "stretch", height: "auto", radius: "right", width: "4x", label: "Toggle masking", icon: type === 'password' ? (0, jsx_runtime_1.jsx)(icons_1.EyeInvisibleOutlined, {}, void 0) : (0, jsx_runtime_1.jsx)(icons_1.EyeOutlined, {}, void 0), onPress: toggleType }, void 0)] }, void 0));
|
|
32
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(TextInput_1.TextInputBase, { ref: ref, labelProps: labelProps, inputProps: inputProps, inputRef: inputRef, inputStyles: { paddingRight: '4x' }, type: type, suffixPosition: "after", suffix: wrappedSuffix, multiLine: multiLine, ...otherProps }, void 0));
|
|
33
42
|
}
|
|
34
43
|
/**
|
|
35
44
|
* PasswordInputs are password inputs that allow users to input passwords or code entries
|
|
@@ -38,6 +47,14 @@ function PasswordInput(props, ref) {
|
|
|
38
47
|
*/
|
|
39
48
|
const _PasswordInput = (0, react_1.forwardRef)(PasswordInput);
|
|
40
49
|
exports.PasswordInput = _PasswordInput;
|
|
41
|
-
|
|
50
|
+
/**
|
|
51
|
+
* @legacy should be removed with legacy <Field />
|
|
52
|
+
*/
|
|
53
|
+
Object.defineProperty(_PasswordInput, 'cubeInputType', {
|
|
54
|
+
enumerable: false,
|
|
55
|
+
configurable: false,
|
|
56
|
+
writable: false,
|
|
57
|
+
value: 'Text',
|
|
58
|
+
});
|
|
42
59
|
|
|
43
60
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-a804266
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -117,10 +117,10 @@ const RadioLabelElement = (0, tasty_1.tasty)({
|
|
|
117
117
|
});
|
|
118
118
|
function Radio(props, ref) {
|
|
119
119
|
props = (0, provider_1.useProviderProps)(props);
|
|
120
|
-
props = (0, Form_1.
|
|
120
|
+
props = (0, Form_1.useFieldProps)(props, { defaultValidationTrigger: 'onChange' });
|
|
121
121
|
let { qa, isDisabled, validationState, children, label, autoFocus, labelStyles, labelProps, inputStyles, type = 'radio', 'aria-label': ariaLabel, ...otherProps } = props;
|
|
122
122
|
let isButton = type === 'button';
|
|
123
|
-
label = label
|
|
123
|
+
label = label ?? children;
|
|
124
124
|
let styles = (0, tasty_1.extractStyles)(otherProps, tasty_1.OUTER_STYLES);
|
|
125
125
|
const RadioElement = isButton ? RadioButtonElement : RadioNormalElement;
|
|
126
126
|
labelStyles = {
|
|
@@ -177,5 +177,14 @@ const __Radio = Object.assign(_Radio, {
|
|
|
177
177
|
Button: _RadioButton,
|
|
178
178
|
});
|
|
179
179
|
exports.Radio = __Radio;
|
|
180
|
+
/**
|
|
181
|
+
* @legacy should be removed with legacy <Field />
|
|
182
|
+
*/
|
|
183
|
+
Object.defineProperty(_Radio, 'cubeInputType', {
|
|
184
|
+
enumerable: false,
|
|
185
|
+
configurable: false,
|
|
186
|
+
writable: false,
|
|
187
|
+
value: 'Radio',
|
|
188
|
+
});
|
|
180
189
|
|
|
181
190
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-a804266
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -39,7 +39,7 @@ const RadioGroupElement = (0, tasty_1.tasty)({
|
|
|
39
39
|
function RadioGroup(props, ref) {
|
|
40
40
|
props = (0, nullableValue_1.castNullableStringValue)(props);
|
|
41
41
|
props = (0, provider_1.useProviderProps)(props);
|
|
42
|
-
props = (0, Form_1.
|
|
42
|
+
props = (0, Form_1.useFieldProps)(props, { defaultValidationTrigger: 'onChange' });
|
|
43
43
|
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;
|
|
44
44
|
let domRef = (0, utils_1.useDOMRef)(ref);
|
|
45
45
|
styles = (0, tasty_1.extractStyles)(otherProps, tasty_1.OUTER_STYLES, styles);
|
|
@@ -83,6 +83,14 @@ function RadioGroup(props, ref) {
|
|
|
83
83
|
*/
|
|
84
84
|
const _RadioGroup = (0, react_1.forwardRef)(RadioGroup);
|
|
85
85
|
exports.RadioGroup = _RadioGroup;
|
|
86
|
-
|
|
86
|
+
/**
|
|
87
|
+
* @legacy should be removed with legacy <Field />
|
|
88
|
+
*/
|
|
89
|
+
Object.defineProperty(_RadioGroup, 'cubeInputType', {
|
|
90
|
+
enumerable: false,
|
|
91
|
+
configurable: false,
|
|
92
|
+
writable: false,
|
|
93
|
+
value: 'RadioGroup',
|
|
94
|
+
});
|
|
87
95
|
|
|
88
96
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-a804266
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -14,13 +14,15 @@ const slider_1 = require("@react-aria/slider");
|
|
|
14
14
|
const slider_2 = require("@react-stately/slider");
|
|
15
15
|
const FieldWrapper_1 = require("../../forms/FieldWrapper");
|
|
16
16
|
const tasty_1 = require("../../../tasty");
|
|
17
|
+
const __1 = require("..");
|
|
17
18
|
const Slide_1 = require("./Slide");
|
|
18
19
|
const Gradation_1 = require("./Gradation");
|
|
19
20
|
const Thumb_1 = require("./Thumb");
|
|
20
21
|
const RangeInput_1 = require("./RangeInput");
|
|
21
22
|
const styled_1 = require("./styled");
|
|
22
23
|
const helpers_1 = require("./helpers");
|
|
23
|
-
function RangeSlider(props, ref) {
|
|
24
|
+
exports.RangeSlider = (0, react_1.forwardRef)(function RangeSlider(props, ref) {
|
|
25
|
+
props = (0, __1.useFieldProps)(props, { defaultValidationTrigger: 'onChange' });
|
|
24
26
|
let { labelPosition, label, extra, styles, isRequired, validationState, message, description, requiredMark, labelSuffix, labelStyles, necessityIndicator, defaultValue, value, gradation, step = 1, isDisabled, orientation = 'horizontal', showInput, inputStyles, inputSuffix, minValue, maxValue, onChange, onChangeEnd, ...otherProps } = props;
|
|
25
27
|
const [min, max] = (0, helpers_1.getMinMaxValue)(minValue, maxValue, value || defaultValue);
|
|
26
28
|
const ranges = (0, helpers_1.getRanges)(defaultValue || value || [0, 1]);
|
|
@@ -88,11 +90,15 @@ function RangeSlider(props, ref) {
|
|
|
88
90
|
Component: sliderField,
|
|
89
91
|
ref: ref,
|
|
90
92
|
} }, void 0));
|
|
91
|
-
}
|
|
92
|
-
const _RangeSlider = (0, react_1.forwardRef)(RangeSlider);
|
|
93
|
-
const __RangeSlider = Object.assign(_RangeSlider, {
|
|
94
|
-
cubeInputType: 'CheckboxGroup',
|
|
95
93
|
});
|
|
96
|
-
|
|
94
|
+
/**
|
|
95
|
+
* @legacy should be removed with legacy <Field />
|
|
96
|
+
*/
|
|
97
|
+
Object.defineProperty(exports.RangeSlider, 'cubeInputType', {
|
|
98
|
+
enumerable: false,
|
|
99
|
+
configurable: false,
|
|
100
|
+
writable: false,
|
|
101
|
+
value: 'CheckboxGroup',
|
|
102
|
+
});
|
|
97
103
|
|
|
98
104
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-
|
|
4
|
+
* @cube-dev/ui-kit v0.0.0-canary-a804266
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -21,9 +21,9 @@ const interactions_2 = require("../../../utils/react/interactions");
|
|
|
21
21
|
const react_2 = require("../../../utils/react");
|
|
22
22
|
const HiddenInput_1 = require("../../HiddenInput");
|
|
23
23
|
const Label_1 = require("../Label");
|
|
24
|
-
const Form_1 = require("../Form/Form");
|
|
25
24
|
const FieldWrapper_1 = require("../FieldWrapper");
|
|
26
25
|
const nullableValue_1 = require("../../../utils/react/nullableValue");
|
|
26
|
+
const Form_1 = require("../Form");
|
|
27
27
|
const SwitchWrapperElement = (0, tasty_1.tasty)({
|
|
28
28
|
qa: 'SwitchWrapper',
|
|
29
29
|
styles: {
|
|
@@ -93,10 +93,20 @@ const SwitchElement = (0, tasty_1.tasty)({
|
|
|
93
93
|
},
|
|
94
94
|
},
|
|
95
95
|
});
|
|
96
|
-
|
|
96
|
+
/**
|
|
97
|
+
* Switches allow users to turn an individual option on or off.
|
|
98
|
+
* They are usually used to activate or deactivate a specific setting.
|
|
99
|
+
*/
|
|
100
|
+
exports.Switch = (0, react_1.forwardRef)(function Switch(props, ref) {
|
|
97
101
|
props = (0, nullableValue_1.castNullableIsSelected)(props);
|
|
98
102
|
props = (0, provider_1.useProviderProps)(props);
|
|
99
|
-
props = (0, Form_1.
|
|
103
|
+
props = (0, Form_1.useFieldProps)(props, {
|
|
104
|
+
valuePropsMapper: ({ value, onChange }) => ({
|
|
105
|
+
isSelected: value != null ? value : false,
|
|
106
|
+
isIndeterminate: false,
|
|
107
|
+
onChange: onChange,
|
|
108
|
+
}),
|
|
109
|
+
});
|
|
100
110
|
let { qa, isDisabled = false, autoFocus, children, label, extra, labelProps, labelStyles, isLoading, insideForm, validationState, message, description, labelPosition, inputStyles, requiredMark = true, tooltip, labelSuffix, ...otherProps } = props;
|
|
101
111
|
label = label || children;
|
|
102
112
|
let styles = (0, tasty_1.extractStyles)(props, tasty_1.OUTER_STYLES);
|
|
@@ -143,13 +153,6 @@ function Switch(props, ref) {
|
|
|
143
153
|
return ((0, jsx_runtime_1.jsxs)(SwitchLabelElement, { styles: styles, mods: mods, ...hoverProps, ...(0, tasty_1.filterBaseProps)(otherProps), ref: domRef, children: [switchField, label && ((0, jsx_runtime_1.jsxs)(tasty_1.Element, { styles: labelStyles, mods: {
|
|
144
154
|
disabled: isDisabled,
|
|
145
155
|
}, ...(0, tasty_1.filterBaseProps)(labelProps), children: [label, isLoading ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [label ? (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "\u00A0" }, void 0) : null, (0, jsx_runtime_1.jsx)(icons_1.LoadingOutlined, {}, void 0)] }, void 0)) : null] }, void 0))] }, void 0));
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Switches allow users to turn an individual option on or off.
|
|
149
|
-
* They are usually used to activate or deactivate a specific setting.
|
|
150
|
-
*/
|
|
151
|
-
let _Switch = (0, react_1.forwardRef)(Switch);
|
|
152
|
-
exports.Switch = _Switch;
|
|
153
|
-
_Switch.cubeInputType = 'Checkbox';
|
|
156
|
+
});
|
|
154
157
|
|
|
155
158
|
|