@cube-dev/ui-kit 0.0.0-canary-9917823 → 0.0.0-canary-2a1d026
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/CHANGELOG.md +12 -0
- package/cjs/_internal/hooks/index.js +12 -4
- package/cjs/_internal/hooks/use-chained-callback.js +2 -1
- package/cjs/_internal/hooks/use-deprecation-warning.js +6 -2
- 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 +6 -2
- 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 +50 -0
- package/cjs/_internal/index.js +6 -2
- package/cjs/components/Base.js +2 -2
- package/cjs/components/Block.js +2 -2
- package/cjs/components/GlobalStyles.js +1 -1
- package/cjs/components/GridProvider.js +7 -3
- package/cjs/components/HiddenInput.js +1 -1
- package/cjs/components/OpenTrasition.js +2 -2
- package/cjs/components/Root.js +2 -2
- package/cjs/components/actions/Action.js +2 -2
- package/cjs/components/actions/Button/Button.js +2 -2
- package/cjs/components/actions/Button/index.js +6 -3
- package/cjs/components/actions/ButtonGroup/ButtonGroup.js +2 -2
- package/cjs/components/actions/index.js +6 -2
- package/cjs/components/actions/use-action.js +1 -1
- package/cjs/components/content/ActiveZone/ActiveZone.js +2 -2
- package/cjs/components/content/Alert/Alert.js +2 -2
- package/cjs/components/content/Alert/index.js +6 -2
- package/cjs/components/content/Alert/types.js +1 -1
- package/cjs/components/content/Alert/use-alert.js +1 -1
- package/cjs/components/content/Avatar/Avatar.js +2 -2
- package/cjs/components/content/Badge/Badge.js +2 -2
- package/cjs/components/content/Card/Card.js +2 -2
- package/cjs/components/content/Content.js +2 -2
- package/cjs/components/content/CopySnippet/CopySnippet.js +4 -4
- package/cjs/components/content/CopySnippet/index.js +6 -2
- package/cjs/components/content/Divider.js +2 -2
- package/cjs/components/content/Footer.js +2 -2
- package/cjs/components/content/Header.js +2 -2
- package/cjs/components/content/Paragraph.js +2 -2
- package/cjs/components/content/Placeholder/Placeholder.js +2 -2
- package/cjs/components/content/PrismCode/PrismCode.js +2 -2
- package/cjs/components/content/Result/Result.js +3 -3
- package/cjs/components/content/Skeleton/Skeleton.js +12 -12
- package/cjs/components/content/Tag/Tag.js +3 -3
- package/cjs/components/content/Text.js +8 -8
- package/cjs/components/content/Title.js +4 -4
- package/cjs/components/forms/Checkbox/Checkbox.js +31 -14
- package/cjs/components/forms/Checkbox/CheckboxGroup.js +30 -25
- package/cjs/components/forms/Checkbox/context.js +1 -1
- package/cjs/components/forms/{FieldWrapper.js → FieldWrapper/FieldWrapper.js} +22 -20
- package/cjs/components/forms/FieldWrapper/extract-field-wrapper-props.js +50 -0
- package/cjs/components/forms/FieldWrapper/index.js +28 -0
- package/cjs/components/forms/FieldWrapper/types.js +11 -0
- package/cjs/components/forms/FileInput/FileInput.js +5 -5
- package/cjs/components/forms/Form/{Field.js → Field/LegacyField.js} +48 -27
- package/cjs/components/forms/Form/Field/index.js +29 -0
- package/cjs/components/forms/Form/Field/types.js +11 -0
- package/cjs/components/forms/Form/Field/use-field-props.js +61 -0
- package/cjs/components/forms/Form/Field/use-field.js +133 -0
- package/cjs/components/forms/Form/Form.js +3 -3
- package/cjs/components/forms/Form/Submit/Submit.js +25 -0
- package/cjs/components/forms/Form/Submit/index.js +26 -0
- package/cjs/components/forms/Form/SubmitError.js +2 -2
- package/cjs/components/forms/Form/index.js +20 -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 +6 -2
- package/cjs/components/forms/Label.js +4 -4
- package/cjs/components/forms/NumberInput/NumberInput.js +17 -11
- package/cjs/components/forms/NumberInput/StepButton.js +3 -3
- package/cjs/components/forms/PasswordInput/PasswordInput.js +23 -6
- package/cjs/components/forms/RadioGroup/Radio.js +17 -8
- package/cjs/components/forms/RadioGroup/RadioGroup.js +13 -5
- package/cjs/components/forms/RadioGroup/context.js +1 -1
- package/cjs/components/forms/SearchInput/SearchInput.js +4 -4
- package/cjs/components/forms/Slider/Gradation.js +2 -2
- package/cjs/components/forms/Slider/Header.js +1 -1
- package/cjs/components/forms/Slider/RangeSlider.js +3 -3
- package/cjs/components/forms/Slider/Slider.js +5 -4
- package/cjs/components/forms/Slider/SliderBase.js +5 -5
- package/cjs/components/forms/Slider/SliderInput.js +2 -2
- package/cjs/components/forms/Slider/SliderThumb.js +2 -2
- package/cjs/components/forms/Slider/SliderTrack.js +2 -2
- package/cjs/components/forms/Slider/elements.js +1 -1
- package/cjs/components/forms/Slider/index.js +6 -2
- package/cjs/components/forms/Slider/types.js +1 -1
- package/cjs/components/forms/Switch/Switch.js +19 -15
- 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 +12 -40
- package/cjs/components/forms/TextInput/index.js +27 -0
- package/cjs/components/forms/index.js +6 -2
- package/cjs/components/layout/Flex.js +2 -2
- package/cjs/components/layout/Flow.js +2 -2
- package/cjs/components/layout/Grid.js +2 -2
- package/cjs/components/layout/Prefix.js +2 -2
- package/cjs/components/layout/Space.js +2 -2
- package/cjs/components/layout/Suffix.js +2 -2
- package/cjs/components/navigation/LegacyTabs/LegacyTabs.js +4 -4
- package/cjs/components/navigation/Link/Link.js +2 -2
- package/cjs/components/organisms/FileTabs/FileTabs.js +4 -4
- package/cjs/components/organisms/Modal/Modal.js +3 -3
- package/cjs/components/organisms/StatsCard/StatsCard.js +2 -2
- package/cjs/components/other/Base64Upload/Base64Upload.js +2 -2
- package/cjs/components/other/CloudLogo/CloudLogo.js +2 -2
- package/cjs/components/overlays/AlertDialog/AlertDialog.js +2 -2
- package/cjs/components/overlays/AlertDialog/AlertDialogApiProvider.js +2 -2
- package/cjs/components/overlays/AlertDialog/AlertDialogZone.js +2 -2
- package/cjs/components/overlays/AlertDialog/index.js +6 -2
- package/cjs/components/overlays/AlertDialog/types.js +1 -1
- package/cjs/components/overlays/Dialog/Dialog.js +17 -5
- package/cjs/components/overlays/Dialog/DialogContainer.js +2 -2
- package/cjs/components/overlays/Dialog/DialogForm.js +4 -6
- package/cjs/components/overlays/Dialog/DialogTrigger.js +11 -11
- package/cjs/components/overlays/Dialog/context.js +1 -1
- package/cjs/components/overlays/Dialog/index.js +6 -2
- package/cjs/components/overlays/Modal/Modal.js +23 -9
- package/cjs/components/overlays/Modal/OpenTransition.js +12 -3
- package/cjs/components/overlays/Modal/Overlay.js +6 -4
- package/cjs/components/overlays/Modal/Popover.js +20 -5
- package/cjs/components/overlays/Modal/Tray.js +14 -4
- package/cjs/components/overlays/Modal/Underlay.js +2 -2
- package/cjs/components/overlays/Modal/index.js +16 -1
- package/cjs/components/overlays/Modal/types.js +11 -0
- package/cjs/components/overlays/NewNotifications/Bar/FloatingNotification.js +2 -2
- package/cjs/components/overlays/NewNotifications/Bar/NotificationsBar.js +2 -2
- package/cjs/components/overlays/NewNotifications/Bar/TransitionComponent.js +2 -2
- package/cjs/components/overlays/NewNotifications/Bar/index.js +6 -2
- package/cjs/components/overlays/NewNotifications/Dialog/NotificationsDialogTrigger.js +3 -3
- package/cjs/components/overlays/NewNotifications/Dialog/index.js +6 -2
- package/cjs/components/overlays/NewNotifications/Notification.js +4 -4
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationAction.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationCloseButton.js +3 -3
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationDescription.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationFooter.js +7 -3
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationHeader.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationIcon.js +5 -5
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationProvider.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationView.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/index.js +6 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/types.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationsContext/NotificationsProvider.js +2 -2
- 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 +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationsList/NotificationsListItem.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationsList/index.js +6 -2
- package/cjs/components/overlays/NewNotifications/NotificationsList/types.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/index.js +6 -2
- 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 +6 -2
- package/cjs/components/overlays/NewNotifications/types.js +1 -1
- package/cjs/components/overlays/Notification/Notification.js +2 -2
- package/cjs/components/overlays/OverlayWrapper.js +3 -3
- package/cjs/components/overlays/Toasts/Toast.js +4 -4
- package/cjs/components/overlays/Toasts/index.js +6 -2
- 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 +2 -2
- package/cjs/components/overlays/Tooltip/TooltipProvider.js +2 -2
- package/cjs/components/overlays/Tooltip/TooltipTrigger.js +4 -4
- package/cjs/components/overlays/Tooltip/context.js +1 -1
- package/cjs/components/pickers/ComboBox/ComboBox.js +31 -19
- package/cjs/components/pickers/Menu/Menu.js +3 -3
- package/cjs/components/pickers/Menu/MenuButton.js +5 -5
- package/cjs/components/pickers/Menu/MenuItem.js +3 -3
- package/cjs/components/pickers/Menu/MenuSection.js +3 -3
- package/cjs/components/pickers/Menu/MenuTrigger.js +10 -6
- package/cjs/components/pickers/Menu/context.js +6 -2
- package/cjs/components/pickers/Menu/styled.js +1 -1
- package/cjs/components/pickers/Select/Select.js +26 -11
- package/cjs/components/portal/Portal.js +2 -2
- package/cjs/components/portal/PortalProvider.js +1 -1
- package/cjs/components/portal/index.js +6 -2
- package/cjs/components/portal/storybook/templates/CustomRoot.js +2 -2
- package/cjs/components/portal/storybook/templates/PortalOrder.js +2 -2
- package/cjs/components/portal/storybook/templates/basic.js +2 -2
- package/cjs/components/portal/storybook/templates/index.js +6 -2
- package/cjs/components/portal/types.js +1 -1
- package/cjs/components/portal/usePortal.js +1 -1
- package/cjs/components/status/LoadingAnimation/LoadingAnimation.js +3 -3
- 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 +2 -2
- package/cjs/components/status/Spin/Spin.js +3 -3
- package/cjs/components/status/Spin/SpinsContainer.js +1 -1
- package/cjs/components/status/Spin/index.js +6 -2
- package/cjs/components/status/Spin/types.js +1 -1
- package/cjs/components/status/index.js +6 -2
- package/cjs/data/themes.js +1 -1
- package/cjs/icons/Attention.js +2 -2
- package/cjs/icons/Cross.js +2 -2
- package/cjs/icons/Danger.js +2 -2
- package/cjs/icons/Success.js +2 -2
- package/cjs/icons/index.js +6 -2
- package/cjs/index.js +9 -7
- package/cjs/provider.js +3 -3
- package/cjs/providers/StyleProvider.js +2 -2
- package/cjs/services/notification.js +2 -2
- package/cjs/shared/form.js +1 -1
- package/cjs/shared/index.js +6 -2
- package/cjs/styled/index.js +6 -2
- package/cjs/styled/styled.js +9 -5
- package/cjs/tasty/index.js +6 -2
- package/cjs/tasty/providers/BreakpointsProvider.js +2 -2
- 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 +6 -2
- 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 +9 -5
- 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 +14 -2
- package/cjs/test/render.js +7 -3
- package/cjs/test/setup.js +48 -4
- package/cjs/test/utils/index.js +6 -2
- package/cjs/test/utils/wait.js +1 -1
- package/cjs/tokens.js +1 -1
- package/cjs/type-checks.js +1 -1
- package/cjs/utils/ResizeSensor.js +1 -1
- package/cjs/utils/modules.js +1 -1
- package/cjs/utils/promise.js +1 -1
- package/cjs/utils/random.js +1 -1
- package/cjs/utils/range.js +1 -1
- package/cjs/utils/react/Slots.js +3 -3
- 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 +6 -2
- 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 +2 -2
- package/es/components/Block.js +2 -2
- package/es/components/GlobalStyles.js +1 -1
- package/es/components/GridProvider.js +2 -2
- package/es/components/HiddenInput.js +1 -1
- package/es/components/OpenTrasition.js +2 -2
- package/es/components/Root.js +2 -2
- package/es/components/actions/Action.js +2 -2
- package/es/components/actions/Button/Button.js +2 -2
- package/es/components/actions/Button/index.js +1 -2
- package/es/components/actions/ButtonGroup/ButtonGroup.js +2 -2
- package/es/components/actions/index.js +1 -1
- package/es/components/actions/use-action.js +1 -1
- package/es/components/content/ActiveZone/ActiveZone.js +2 -2
- package/es/components/content/Alert/Alert.js +2 -2
- 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 +2 -2
- package/es/components/content/Badge/Badge.js +2 -2
- package/es/components/content/Card/Card.js +2 -2
- package/es/components/content/Content.js +2 -2
- package/es/components/content/CopySnippet/CopySnippet.js +4 -4
- package/es/components/content/CopySnippet/index.js +1 -1
- package/es/components/content/Divider.js +2 -2
- package/es/components/content/Footer.js +2 -2
- package/es/components/content/Header.js +2 -2
- package/es/components/content/Paragraph.js +2 -2
- package/es/components/content/Placeholder/Placeholder.js +2 -2
- package/es/components/content/PrismCode/PrismCode.js +2 -2
- package/es/components/content/Result/Result.js +3 -3
- package/es/components/content/Skeleton/Skeleton.js +12 -12
- package/es/components/content/Tag/Tag.js +3 -3
- package/es/components/content/Text.js +8 -8
- package/es/components/content/Title.js +4 -4
- package/es/components/forms/Checkbox/Checkbox.js +32 -15
- package/es/components/forms/Checkbox/CheckboxGroup.js +30 -25
- package/es/components/forms/Checkbox/context.js +1 -1
- package/es/components/forms/{FieldWrapper.js → FieldWrapper/FieldWrapper.js} +22 -20
- 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 +4 -4
- package/es/components/forms/Form/{Field.js → Field/LegacyField.js} +47 -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 +57 -0
- package/es/components/forms/Form/Field/use-field.js +129 -0
- package/es/components/forms/Form/Form.js +3 -3
- 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 +2 -2
- 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 +4 -4
- package/es/components/forms/NumberInput/NumberInput.js +17 -11
- package/es/components/forms/NumberInput/StepButton.js +3 -3
- package/es/components/forms/PasswordInput/PasswordInput.js +23 -6
- package/es/components/forms/RadioGroup/Radio.js +18 -9
- package/es/components/forms/RadioGroup/RadioGroup.js +14 -6
- package/es/components/forms/RadioGroup/context.js +1 -1
- package/es/components/forms/SearchInput/SearchInput.js +4 -4
- package/es/components/forms/Slider/Gradation.js +2 -2
- package/es/components/forms/Slider/Header.js +1 -1
- package/es/components/forms/Slider/RangeSlider.js +3 -3
- package/es/components/forms/Slider/Slider.js +5 -4
- package/es/components/forms/Slider/SliderBase.js +5 -5
- package/es/components/forms/Slider/SliderInput.js +2 -2
- package/es/components/forms/Slider/SliderThumb.js +2 -2
- package/es/components/forms/Slider/SliderTrack.js +2 -2
- package/es/components/forms/Slider/elements.js +1 -1
- package/es/components/forms/Slider/index.js +1 -1
- package/es/components/forms/Slider/types.js +1 -1
- package/es/components/forms/Switch/Switch.js +19 -15
- package/es/components/forms/TextArea/TextArea.js +31 -28
- package/es/components/forms/TextInput/TextInput.js +16 -9
- package/es/components/forms/TextInput/TextInputBase.js +13 -41
- package/es/components/forms/TextInput/index.js +11 -0
- package/es/components/forms/index.js +1 -1
- package/es/components/layout/Flex.js +2 -2
- package/es/components/layout/Flow.js +2 -2
- package/es/components/layout/Grid.js +2 -2
- package/es/components/layout/Prefix.js +2 -2
- package/es/components/layout/Space.js +2 -2
- package/es/components/layout/Suffix.js +2 -2
- package/es/components/navigation/LegacyTabs/LegacyTabs.js +4 -4
- package/es/components/navigation/Link/Link.js +2 -2
- package/es/components/organisms/FileTabs/FileTabs.js +4 -4
- package/es/components/organisms/Modal/Modal.js +3 -3
- package/es/components/organisms/StatsCard/StatsCard.js +2 -2
- package/es/components/other/Base64Upload/Base64Upload.js +2 -2
- package/es/components/other/CloudLogo/CloudLogo.js +2 -2
- package/es/components/overlays/AlertDialog/AlertDialog.js +2 -2
- package/es/components/overlays/AlertDialog/AlertDialogApiProvider.js +2 -2
- package/es/components/overlays/AlertDialog/AlertDialogZone.js +2 -2
- 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 +14 -5
- package/es/components/overlays/Dialog/DialogContainer.js +2 -2
- package/es/components/overlays/Dialog/DialogForm.js +5 -7
- package/es/components/overlays/Dialog/DialogTrigger.js +11 -11
- 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 +23 -9
- package/es/components/overlays/Modal/OpenTransition.js +11 -3
- package/es/components/overlays/Modal/Overlay.js +6 -4
- package/es/components/overlays/Modal/Popover.js +21 -6
- package/es/components/overlays/Modal/Tray.js +14 -4
- package/es/components/overlays/Modal/Underlay.js +2 -2
- package/es/components/overlays/Modal/index.js +2 -1
- package/es/components/overlays/Modal/types.js +10 -0
- package/es/components/overlays/NewNotifications/Bar/FloatingNotification.js +2 -2
- package/es/components/overlays/NewNotifications/Bar/NotificationsBar.js +2 -2
- package/es/components/overlays/NewNotifications/Bar/TransitionComponent.js +2 -2
- package/es/components/overlays/NewNotifications/Bar/index.js +1 -1
- package/es/components/overlays/NewNotifications/Dialog/NotificationsDialogTrigger.js +3 -3
- package/es/components/overlays/NewNotifications/Dialog/index.js +1 -1
- package/es/components/overlays/NewNotifications/Notification.js +4 -4
- package/es/components/overlays/NewNotifications/NotificationView/NotificationAction.js +2 -2
- package/es/components/overlays/NewNotifications/NotificationView/NotificationCloseButton.js +3 -3
- package/es/components/overlays/NewNotifications/NotificationView/NotificationDescription.js +2 -2
- package/es/components/overlays/NewNotifications/NotificationView/NotificationFooter.js +2 -2
- package/es/components/overlays/NewNotifications/NotificationView/NotificationHeader.js +2 -2
- package/es/components/overlays/NewNotifications/NotificationView/NotificationIcon.js +5 -5
- package/es/components/overlays/NewNotifications/NotificationView/NotificationProvider.js +2 -2
- package/es/components/overlays/NewNotifications/NotificationView/NotificationView.js +2 -2
- 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 +2 -2
- package/es/components/overlays/NewNotifications/NotificationsContext/index.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsContext/use-notifications.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsList/NotificationsList.js +2 -2
- package/es/components/overlays/NewNotifications/NotificationsList/NotificationsListItem.js +2 -2
- 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 +2 -2
- package/es/components/overlays/OverlayWrapper.js +3 -3
- package/es/components/overlays/Toasts/Toast.js +4 -4
- package/es/components/overlays/Toasts/index.js +1 -1
- package/es/components/overlays/Toasts/types.js +1 -1
- package/es/components/overlays/Toasts/use-toasts-api.js +1 -1
- package/es/components/overlays/Tooltip/Tooltip.js +2 -2
- package/es/components/overlays/Tooltip/TooltipProvider.js +2 -2
- package/es/components/overlays/Tooltip/TooltipTrigger.js +4 -4
- package/es/components/overlays/Tooltip/context.js +1 -1
- package/es/components/pickers/ComboBox/ComboBox.js +29 -17
- package/es/components/pickers/Menu/Menu.js +3 -3
- package/es/components/pickers/Menu/MenuButton.js +5 -5
- package/es/components/pickers/Menu/MenuItem.js +3 -3
- package/es/components/pickers/Menu/MenuSection.js +3 -3
- package/es/components/pickers/Menu/MenuTrigger.js +5 -5
- 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 +27 -12
- package/es/components/portal/Portal.js +2 -2
- package/es/components/portal/PortalProvider.js +1 -1
- package/es/components/portal/index.js +1 -1
- package/es/components/portal/storybook/templates/CustomRoot.js +2 -2
- package/es/components/portal/storybook/templates/PortalOrder.js +2 -2
- package/es/components/portal/storybook/templates/basic.js +2 -2
- package/es/components/portal/storybook/templates/index.js +1 -1
- package/es/components/portal/types.js +1 -1
- package/es/components/portal/usePortal.js +1 -1
- package/es/components/status/LoadingAnimation/LoadingAnimation.js +3 -3
- 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 +2 -2
- package/es/components/status/Spin/Spin.js +3 -3
- 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 +2 -2
- package/es/icons/Cross.js +2 -2
- package/es/icons/Danger.js +2 -2
- package/es/icons/Success.js +2 -2
- package/es/icons/index.js +1 -1
- package/es/index.js +2 -3
- package/es/provider.js +3 -3
- package/es/providers/StyleProvider.js +2 -2
- package/es/services/notification.js +2 -2
- 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 +4 -4
- package/es/tasty/index.js +1 -1
- package/es/tasty/providers/BreakpointsProvider.js +2 -2
- 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 +4 -4
- 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 +2 -2
- package/es/test/setup.js +43 -2
- package/es/test/utils/index.js +1 -1
- package/es/test/utils/wait.js +1 -1
- package/es/tokens.js +1 -1
- package/es/type-checks.js +1 -1
- package/es/utils/ResizeSensor.js +1 -1
- package/es/utils/modules.js +1 -1
- package/es/utils/promise.js +1 -1
- package/es/utils/random.js +1 -1
- package/es/utils/range.js +1 -1
- package/es/utils/react/Slots.js +3 -3
- 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 +2 -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 +7 -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/Slider/types.d.ts +1 -1
- 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/overlays/Dialog/DialogTrigger.d.ts +2 -1
- package/types/components/overlays/Modal/Modal.d.ts +2 -1
- package/types/components/overlays/Modal/OpenTransition.d.ts +6 -1
- package/types/components/overlays/Modal/Overlay.d.ts +2 -1
- package/types/components/overlays/Modal/Popover.d.ts +3 -1
- package/types/components/overlays/Modal/Tray.d.ts +2 -1
- package/types/components/overlays/Modal/index.d.ts +1 -0
- package/types/components/overlays/Modal/types.d.ts +9 -0
- 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/shared/form.d.ts +10 -0
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { CubeTextInputBaseProps } from '../TextInput
|
|
2
|
+
import { CubeTextInputBaseProps } from '../TextInput';
|
|
3
3
|
export interface CubeTextAreaProps extends CubeTextInputBaseProps {
|
|
4
4
|
/** Whether the textarea should change its size depends on content */
|
|
5
5
|
autoSize?: boolean;
|
|
@@ -12,8 +12,7 @@ export interface CubeTextAreaProps extends CubeTextInputBaseProps {
|
|
|
12
12
|
* with a keyboard. Various decorations can be displayed around the field to
|
|
13
13
|
* communicate the entry requirements.
|
|
14
14
|
*/
|
|
15
|
-
declare const
|
|
15
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<CubeTextAreaProps, "value" | "defaultValue"> & {
|
|
16
16
|
value?: any;
|
|
17
17
|
defaultValue?: any;
|
|
18
|
-
} & import("react").RefAttributes<
|
|
19
|
-
export { _TextArea as TextArea };
|
|
18
|
+
} & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
import { WithNullableValue } from '../../../utils/react/nullableValue';
|
|
3
3
|
import { CubeTextInputBaseProps } from './TextInputBase';
|
|
4
4
|
export declare type CubeTextInputProps = WithNullableValue<CubeTextInputBaseProps>;
|
|
5
|
+
/**
|
|
6
|
+
* TextInputs are text inputs that allow users to input custom text entries
|
|
7
|
+
* with a keyboard. Various decorations can be displayed around the field to
|
|
8
|
+
* communicate the entry requirements.
|
|
9
|
+
*/
|
|
5
10
|
export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<CubeTextInputBaseProps, "value" | "defaultValue"> & {
|
|
6
11
|
value?: any;
|
|
7
12
|
defaultValue?: any;
|
|
@@ -40,5 +40,4 @@ export interface CubeTextInputBaseProps extends BaseProps, PositionStyleProps, D
|
|
|
40
40
|
/** The size of the input */
|
|
41
41
|
size?: 'small' | 'default' | 'large' | string;
|
|
42
42
|
}
|
|
43
|
-
declare const
|
|
44
|
-
export { _TextInputBase as TextInputBase };
|
|
43
|
+
export declare const TextInputBase: import("react").ForwardRefExoticComponent<CubeTextInputBaseProps & import("react").RefAttributes<unknown>>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { BaseProps, PositionStyleProps } from '../../../tasty';
|
|
2
2
|
export interface CubeBase64UploadProps extends BaseProps, PositionStyleProps {
|
|
3
|
-
onInput?:
|
|
3
|
+
onInput?: (params: {
|
|
4
|
+
encoded: string;
|
|
5
|
+
raw: any;
|
|
6
|
+
}) => void;
|
|
4
7
|
}
|
|
5
8
|
export declare const Base64Upload: any;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { CubeFormProps } from '../../forms
|
|
2
|
+
import { CubeFormProps, FieldTypes } from '../../forms';
|
|
3
3
|
import { CubeButtonProps } from '../../actions';
|
|
4
|
-
import { FieldTypes } from '../../forms';
|
|
5
4
|
import { CubeDialogProps } from './Dialog';
|
|
6
5
|
export interface CubeDialogFormProps<T extends FieldTypes = FieldTypes> extends CubeDialogProps, Omit<CubeFormProps<T>, 'role'> {
|
|
7
6
|
/** Whether the submit button has a `danger` theme */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ReactElement, RefObject } from 'react';
|
|
2
|
+
import { WithCloseBehavior } from '../Modal';
|
|
2
3
|
import { Styles } from '../../../tasty';
|
|
3
4
|
export declare type CubeDialogClose = (close: () => void) => ReactElement;
|
|
4
|
-
export interface CubeDialogTriggerProps {
|
|
5
|
+
export interface CubeDialogTriggerProps extends WithCloseBehavior {
|
|
5
6
|
/** The Dialog and its trigger element. See the DialogTrigger [Content section](#content) for more information on what to provide as children. */
|
|
6
7
|
children: [ReactElement, CubeDialogClose | ReactElement];
|
|
7
8
|
/**
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseProps, Styles } from '../../../tasty';
|
|
3
|
+
import { WithCloseBehavior } from './types';
|
|
3
4
|
import type { ModalProps } from '@react-types/overlays';
|
|
4
5
|
export declare const OVERLAY_WRAPPER_STYLES: Styles;
|
|
5
|
-
export interface CubeModalProps extends Omit<ModalProps, 'container'
|
|
6
|
+
export interface CubeModalProps extends Omit<ModalProps, 'container'>, WithCloseBehavior {
|
|
6
7
|
container?: HTMLElement;
|
|
7
8
|
qa?: BaseProps['qa'];
|
|
8
9
|
onClose?: (action?: string) => void;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import type { TimeoutProps } from 'react-transition-group/Transition';
|
|
3
|
+
export declare type OpenTransitionProps = Omit<TimeoutProps<undefined>, 'timeout'>;
|
|
4
|
+
export declare function useOpenTransitionContext(): {
|
|
5
|
+
transitionState: import("react-transition-group").TransitionStatus;
|
|
6
|
+
} | null;
|
|
7
|
+
export declare function OpenTransition(props: OpenTransitionProps): JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { WithCloseBehavior } from './types';
|
|
2
3
|
import type { OverlayProps } from '@react-types/overlays';
|
|
3
|
-
export interface CubeOverlayProps extends Omit<OverlayProps, 'container'
|
|
4
|
+
export interface CubeOverlayProps extends Omit<OverlayProps, 'container'>, WithCloseBehavior {
|
|
4
5
|
container?: HTMLElement | null;
|
|
5
6
|
}
|
|
6
7
|
declare let _Overlay: import("react").ForwardRefExoticComponent<CubeOverlayProps & import("react").RefAttributes<unknown>>;
|
|
@@ -2,7 +2,8 @@ import { HTMLAttributes } from 'react';
|
|
|
2
2
|
import { OverlayProps } from '@react-types/overlays';
|
|
3
3
|
import { BaseProps } from '../../../tasty';
|
|
4
4
|
import { PlacementAxis } from '../../../shared';
|
|
5
|
-
|
|
5
|
+
import { TransitionState, WithCloseBehavior } from './types';
|
|
6
|
+
export interface CubePopoverProps extends BaseProps, Omit<OverlayProps, 'children'>, WithCloseBehavior, TransitionState {
|
|
6
7
|
container?: HTMLElement;
|
|
7
8
|
placement?: PlacementAxis;
|
|
8
9
|
arrowProps?: HTMLAttributes<HTMLElement>;
|
|
@@ -12,6 +13,7 @@ export interface CubePopoverProps extends BaseProps, Omit<OverlayProps, 'childre
|
|
|
12
13
|
shouldCloseOnBlur?: boolean;
|
|
13
14
|
isNonModal?: boolean;
|
|
14
15
|
isDismissable?: boolean;
|
|
16
|
+
updatePosition?: () => void;
|
|
15
17
|
}
|
|
16
18
|
declare let _Popover: import("react").ForwardRefExoticComponent<CubePopoverProps & import("react").RefAttributes<unknown>>;
|
|
17
19
|
export { _Popover as Popover };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseProps, Styles } from '../../../tasty';
|
|
3
|
+
import { WithCloseBehavior } from './types';
|
|
3
4
|
import type { TrayProps } from '@react-types/overlays';
|
|
4
|
-
export interface CubeTrayProps extends TrayProps {
|
|
5
|
+
export interface CubeTrayProps extends TrayProps, WithCloseBehavior {
|
|
5
6
|
container?: HTMLElement;
|
|
6
7
|
qa?: BaseProps['qa'];
|
|
7
8
|
onClose?: (action?: string) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TransitionStatus as ReactTransitionStatus } from 'react-transition-group';
|
|
2
|
+
export declare type CloseBehavior = 'remove' | 'hide';
|
|
3
|
+
export declare type TransitionStatus = ReactTransitionStatus;
|
|
4
|
+
export interface WithCloseBehavior {
|
|
5
|
+
hideOnClose?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface TransitionState {
|
|
8
|
+
transitionState?: TransitionStatus;
|
|
9
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ReactElement, RefObject } from 'react';
|
|
1
|
+
import { ForwardedRef, ReactElement, RefObject } from 'react';
|
|
2
2
|
import { Item } from '@react-stately/collections';
|
|
3
|
+
import { FieldTypes } from '../../forms';
|
|
3
4
|
import { CubeSelectBaseProps } from '../Select/Select';
|
|
4
5
|
import type { CollectionBase, KeyboardDelegate, LoadingState } from '@react-types/shared';
|
|
5
6
|
import type { ComboBoxProps } from '@react-types/combobox';
|
|
@@ -20,9 +21,8 @@ export interface CubeComboBoxProps<T> extends Omit<CubeSelectBaseProps<T>, 'onOp
|
|
|
20
21
|
size?: 'small' | 'default' | 'large' | string;
|
|
21
22
|
suffixPosition?: 'before' | 'after';
|
|
22
23
|
}
|
|
23
|
-
declare const
|
|
24
|
+
export declare const ComboBox: (<T extends FieldTypes>(props: CubeComboBoxProps<T> & {
|
|
25
|
+
ref?: ForwardedRef<unknown> | undefined;
|
|
26
|
+
}) => JSX.Element) & {
|
|
24
27
|
Item: typeof Item;
|
|
25
|
-
} & {
|
|
26
|
-
Item: <T>(props: import("@react-types/shared").ItemProps<T>) => JSX.Element;
|
|
27
28
|
};
|
|
28
|
-
export { __ComboBox as ComboBox };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactElement, ReactNode, RefObject } from 'react';
|
|
2
2
|
import { Item } from '@react-stately/collections';
|
|
3
|
+
import { DOMRef } from '@react-types/shared';
|
|
3
4
|
import { BasePropsWithoutChildren, BlockStyleProps, OuterStyleProps, Props, Styles } from '../../../tasty';
|
|
4
5
|
import { FormFieldProps } from '../../../shared';
|
|
5
6
|
import type { AriaSelectProps } from '@react-types/select';
|
|
@@ -43,9 +44,11 @@ export declare function ListBoxPopup({ state, popoverRef, listBoxRef, listBoxSty
|
|
|
43
44
|
placement: any;
|
|
44
45
|
minWidth: any;
|
|
45
46
|
}): JSX.Element;
|
|
46
|
-
declare const __Select:
|
|
47
|
+
declare const __Select: (<T extends object>(props: CubeSelectProps<T> & {
|
|
48
|
+
ref?: DOMRef<HTMLDivElement> | undefined;
|
|
49
|
+
}) => JSX.Element) & {
|
|
47
50
|
Item: typeof Item;
|
|
48
51
|
} & {
|
|
49
|
-
Item: <
|
|
52
|
+
Item: <T_1>(props: import("@react-types/shared").ItemProps<T_1>) => JSX.Element;
|
|
50
53
|
};
|
|
51
54
|
export { __Select as Select };
|
package/types/index.d.ts
CHANGED
|
@@ -57,7 +57,6 @@ export { Tag } from './components/content/Tag/Tag';
|
|
|
57
57
|
export type { CubeTagProps } from './components/content/Tag/Tag';
|
|
58
58
|
export { SearchInput } from './components/forms/SearchInput/SearchInput';
|
|
59
59
|
export type { CubeSearchInputProps } from './components/forms/SearchInput/SearchInput';
|
|
60
|
-
export { Submit } from './components/actions/Button/Submit';
|
|
61
60
|
export type { CubeTextInputBaseProps } from './components/forms/TextInput/TextInputBase';
|
|
62
61
|
export type { CubeTextInputBaseProps as CubeTextInputProps } from './components/forms/TextInput/TextInputBase';
|
|
63
62
|
export { TextInput } from './components/forms/TextInput/TextInput';
|
|
@@ -145,6 +144,6 @@ export * from './styled';
|
|
|
145
144
|
export * from './tasty';
|
|
146
145
|
export { default as copy } from 'clipboard-copy';
|
|
147
146
|
export * from '@react-aria/ssr';
|
|
148
|
-
export * from './components/forms
|
|
147
|
+
export * from './components/forms';
|
|
149
148
|
export * from './components/overlays/NewNotifications';
|
|
150
149
|
export * from './components/overlays/Toasts';
|
package/types/shared/form.d.ts
CHANGED
|
@@ -43,6 +43,14 @@ export interface FormBaseProps {
|
|
|
43
43
|
validationState?: ValidationState;
|
|
44
44
|
/** On which event perform validation for the field */
|
|
45
45
|
validateTrigger?: ValidateTrigger;
|
|
46
|
+
/** The unique ID of the field */
|
|
47
|
+
id?: string;
|
|
48
|
+
/** The id prefix for the field to avoid collisions between forms */
|
|
49
|
+
idPrefix?: string;
|
|
50
|
+
/** Function that checks whether to perform update of the form state. */
|
|
51
|
+
shouldUpdate?: boolean | ((prevValues: any, nextValues: any) => boolean);
|
|
52
|
+
/** Validation rules */
|
|
53
|
+
rules?: ValidationRule[];
|
|
46
54
|
}
|
|
47
55
|
export interface FormFieldProps extends FormBaseProps {
|
|
48
56
|
/** Whether the field is inside the form. Private field. */
|
|
@@ -62,6 +70,8 @@ export interface FormFieldProps extends FormBaseProps {
|
|
|
62
70
|
tooltip?: ReactNode;
|
|
63
71
|
/** Whether the element should receive focus on render */
|
|
64
72
|
autoFocus?: boolean;
|
|
73
|
+
/** The field name */
|
|
74
|
+
name?: `${string}.${string}` | `${string}`;
|
|
65
75
|
}
|
|
66
76
|
export declare type ValidationRuleBase = {
|
|
67
77
|
[key: string]: any;
|
package/types/test/index.d.ts
CHANGED
package/types/test/setup.d.ts
CHANGED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-9917823
|
|
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("../../forms/Form/Form");
|
|
15
|
-
const Button_1 = require("./Button");
|
|
16
|
-
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 isValid = !Object.keys(formData).find((name) => {
|
|
22
|
-
return form.isFieldInvalid(name);
|
|
23
|
-
});
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)(Button_1.Button, { ref: ref, type: "primary", htmlType: "submit", isLoading: form.isSubmitting, isDisabled: !isValid, ...otherProps }, void 0));
|
|
25
|
-
}
|
|
26
|
-
const _Submit = (0, react_1.forwardRef)(Submit);
|
|
27
|
-
exports.Submit = _Submit;
|
|
28
|
-
|
|
29
|
-
|
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-9917823
|
|
5
|
-
* Released under the MIT license.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
"use strict";
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.ICON_ARG = exports.SELECTED_KEY_ARG = exports.IS_INDETERMINATE_ARG = exports.IS_SELECTED_ARG = exports.MULTIPLE_NUMBER_VALUE_ARG = exports.MULTIPLE_VALUE_ARG = exports.NUMBER_VALUE_ARG = exports.TEXT_VALUE_ARG = exports.REQUIRED_MARK_ARG = exports.MULTILINE_ARG = exports.SIZE_ARG = exports.IS_DISABLED_ARG = exports.IS_READ_ONLY_ARG = exports.IS_REQUIRED_ARG = exports.AUTO_FOCUS_ARG = exports.IS_LOADING_ARG = exports.VALIDATION_STATE_ARG = exports.PLACEHOLDER_ARG = exports.MESSAGE_ARG = exports.NECESSITY_INDICATOR_ARG = exports.DESCRIPTION_ARG = exports.EXTRA_ARG = exports.LABEL_ARG = exports.LABEL_POSITION_ARG = exports.DISABLE_BASE_ARGS = void 0;
|
|
11
|
-
const baseProps_1 = require("./lists/baseProps");
|
|
12
|
-
exports.DISABLE_BASE_ARGS = baseProps_1.baseProps.reduce((map, prop) => {
|
|
13
|
-
map[prop] = { table: { disable: true } };
|
|
14
|
-
return map;
|
|
15
|
-
}, {});
|
|
16
|
-
exports.LABEL_POSITION_ARG = {
|
|
17
|
-
labelPosition: {
|
|
18
|
-
description: 'The position of labels for each field.',
|
|
19
|
-
options: ['top', 'side'],
|
|
20
|
-
control: 'radio',
|
|
21
|
-
table: {
|
|
22
|
-
type: { summary: 'string' },
|
|
23
|
-
defaultValue: { summary: 'top' },
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
exports.LABEL_ARG = {
|
|
28
|
-
label: {
|
|
29
|
-
control: 'text',
|
|
30
|
-
description: 'The content to display as the label.',
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
exports.EXTRA_ARG = {
|
|
34
|
-
extra: {
|
|
35
|
-
control: 'text',
|
|
36
|
-
description: 'The extra content to display next to the label.',
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
exports.DESCRIPTION_ARG = {
|
|
40
|
-
description: {
|
|
41
|
-
control: 'text',
|
|
42
|
-
description: 'The description for the field.',
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
exports.NECESSITY_INDICATOR_ARG = {
|
|
46
|
-
necessityIndicator: {
|
|
47
|
-
// defaultValue: 'icon',
|
|
48
|
-
description: 'Type of the necessity indicator',
|
|
49
|
-
options: ['icon', 'label', false],
|
|
50
|
-
control: 'radio',
|
|
51
|
-
table: {
|
|
52
|
-
type: { summary: 'string' },
|
|
53
|
-
defaultValue: { summary: 'icon' },
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
exports.MESSAGE_ARG = {
|
|
58
|
-
message: {
|
|
59
|
-
// defaultValue: '',
|
|
60
|
-
description: 'Validation error message',
|
|
61
|
-
control: 'text',
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
exports.PLACEHOLDER_ARG = {
|
|
65
|
-
placeholder: {
|
|
66
|
-
// defaultValue: 'Placeholder',
|
|
67
|
-
control: 'text',
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
exports.VALIDATION_STATE_ARG = {
|
|
71
|
-
validationState: {
|
|
72
|
-
// defaultValue: undefined,
|
|
73
|
-
description: 'Whether the input should display its "valid" or "invalid" visual styling.',
|
|
74
|
-
options: [undefined, 'valid', 'invalid'],
|
|
75
|
-
control: 'radio',
|
|
76
|
-
table: {
|
|
77
|
-
type: { summary: 'string' },
|
|
78
|
-
defaultValue: { summary: 'top' },
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
exports.IS_LOADING_ARG = {
|
|
83
|
-
isLoading: {
|
|
84
|
-
control: 'boolean',
|
|
85
|
-
description: 'Loading state with spinner. Also works as disabled',
|
|
86
|
-
// defaultValue: false,
|
|
87
|
-
table: {
|
|
88
|
-
type: { summary: 'boolean' },
|
|
89
|
-
defaultValue: { summary: false },
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
exports.AUTO_FOCUS_ARG = {
|
|
94
|
-
autoFocus: {
|
|
95
|
-
// defaultValue: false,
|
|
96
|
-
description: 'Whether the element should receive focus on render.',
|
|
97
|
-
control: {
|
|
98
|
-
type: 'boolean',
|
|
99
|
-
},
|
|
100
|
-
table: {
|
|
101
|
-
type: { summary: 'boolean' },
|
|
102
|
-
defaultValue: { summary: false },
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
exports.IS_REQUIRED_ARG = {
|
|
107
|
-
isRequired: {
|
|
108
|
-
// defaultValue: false,
|
|
109
|
-
description: 'Whether user input is required on the input before form submission. Often paired with the necessityIndicator prop to add a visual indicator to the input.',
|
|
110
|
-
control: {
|
|
111
|
-
type: 'boolean',
|
|
112
|
-
},
|
|
113
|
-
table: {
|
|
114
|
-
type: { summary: 'boolean' },
|
|
115
|
-
defaultValue: { summary: false },
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
exports.IS_READ_ONLY_ARG = {
|
|
120
|
-
isReadOnly: {
|
|
121
|
-
// defaultValue: false,
|
|
122
|
-
description: 'Whether the input can be selected but not changed by the user.',
|
|
123
|
-
control: {
|
|
124
|
-
type: 'boolean',
|
|
125
|
-
},
|
|
126
|
-
table: {
|
|
127
|
-
type: { summary: 'boolean' },
|
|
128
|
-
defaultValue: { summary: false },
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
};
|
|
132
|
-
exports.IS_DISABLED_ARG = {
|
|
133
|
-
isDisabled: {
|
|
134
|
-
// defaultValue: false,
|
|
135
|
-
description: 'Whether the input is disabled.',
|
|
136
|
-
control: {
|
|
137
|
-
type: 'boolean',
|
|
138
|
-
},
|
|
139
|
-
table: {
|
|
140
|
-
type: { summary: 'boolean' },
|
|
141
|
-
defaultValue: { summary: false },
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
};
|
|
145
|
-
exports.SIZE_ARG = {
|
|
146
|
-
size: {
|
|
147
|
-
// defaultValue: undefined,
|
|
148
|
-
description: 'The size of the button',
|
|
149
|
-
options: [undefined, 'default', 'small'],
|
|
150
|
-
control: 'radio',
|
|
151
|
-
table: {
|
|
152
|
-
type: { summary: 'string' },
|
|
153
|
-
defaultValue: { summary: 'default' },
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
};
|
|
157
|
-
exports.MULTILINE_ARG = {
|
|
158
|
-
multiLine: {
|
|
159
|
-
// defaultValue: false,
|
|
160
|
-
description: 'Whether the input is multiline.',
|
|
161
|
-
control: {
|
|
162
|
-
type: 'boolean',
|
|
163
|
-
},
|
|
164
|
-
table: {
|
|
165
|
-
type: { summary: 'boolean' },
|
|
166
|
-
defaultValue: { summary: false },
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
};
|
|
170
|
-
exports.REQUIRED_MARK_ARG = {
|
|
171
|
-
requiredMark: {
|
|
172
|
-
// defaultValue: true,
|
|
173
|
-
description: 'Whether to show the required mark on labels.',
|
|
174
|
-
control: {
|
|
175
|
-
type: 'boolean',
|
|
176
|
-
},
|
|
177
|
-
table: {
|
|
178
|
-
type: { summary: 'boolean' },
|
|
179
|
-
defaultValue: { summary: true },
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
};
|
|
183
|
-
exports.TEXT_VALUE_ARG = {
|
|
184
|
-
value: {
|
|
185
|
-
defaultValue: undefined,
|
|
186
|
-
description: 'The text value in controlled mode',
|
|
187
|
-
control: 'text',
|
|
188
|
-
table: {
|
|
189
|
-
type: { summary: 'string' },
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
defaultValue: {
|
|
193
|
-
defaultValue: undefined,
|
|
194
|
-
description: 'The default text value in uncontrolled mode',
|
|
195
|
-
control: 'text',
|
|
196
|
-
table: {
|
|
197
|
-
type: { summary: 'string' },
|
|
198
|
-
},
|
|
199
|
-
},
|
|
200
|
-
};
|
|
201
|
-
exports.NUMBER_VALUE_ARG = {
|
|
202
|
-
value: {
|
|
203
|
-
defaultValue: undefined,
|
|
204
|
-
description: 'The number value in controlled mode',
|
|
205
|
-
control: 'text',
|
|
206
|
-
table: {
|
|
207
|
-
type: { summary: 'number' },
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
defaultValue: {
|
|
211
|
-
defaultValue: undefined,
|
|
212
|
-
description: 'The default number value in uncontrolled mode',
|
|
213
|
-
control: 'text',
|
|
214
|
-
table: {
|
|
215
|
-
type: { summary: 'number' },
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
};
|
|
219
|
-
exports.MULTIPLE_VALUE_ARG = {
|
|
220
|
-
value: {
|
|
221
|
-
defaultValue: undefined,
|
|
222
|
-
description: 'The multiple value in controlled mode',
|
|
223
|
-
control: 'object',
|
|
224
|
-
table: {
|
|
225
|
-
type: { summary: 'string[]' },
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
|
-
defaultValue: {
|
|
229
|
-
defaultValue: undefined,
|
|
230
|
-
description: 'The default multiple value in uncontrolled mode',
|
|
231
|
-
control: 'object',
|
|
232
|
-
table: {
|
|
233
|
-
type: { summary: 'string[]' },
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
};
|
|
237
|
-
exports.MULTIPLE_NUMBER_VALUE_ARG = {
|
|
238
|
-
value: {
|
|
239
|
-
defaultValue: undefined,
|
|
240
|
-
description: 'The multiple value in controlled mode',
|
|
241
|
-
control: 'object',
|
|
242
|
-
table: {
|
|
243
|
-
type: { summary: 'number[]' },
|
|
244
|
-
},
|
|
245
|
-
},
|
|
246
|
-
defaultValue: {
|
|
247
|
-
defaultValue: undefined,
|
|
248
|
-
description: 'The default multiple value in uncontrolled mode',
|
|
249
|
-
control: 'object',
|
|
250
|
-
table: {
|
|
251
|
-
type: { summary: 'number[]' },
|
|
252
|
-
},
|
|
253
|
-
},
|
|
254
|
-
};
|
|
255
|
-
exports.IS_SELECTED_ARG = {
|
|
256
|
-
isSelected: {
|
|
257
|
-
defaultValue: undefined,
|
|
258
|
-
description: 'Whether the input is selected in controlled mode',
|
|
259
|
-
control: {
|
|
260
|
-
type: 'radio',
|
|
261
|
-
options: [undefined, true, false],
|
|
262
|
-
},
|
|
263
|
-
table: {
|
|
264
|
-
type: { summary: 'boolean' },
|
|
265
|
-
},
|
|
266
|
-
},
|
|
267
|
-
defaultSelected: {
|
|
268
|
-
defaultValue: undefined,
|
|
269
|
-
description: 'Whether the input is selected by default in uncontrolled mode',
|
|
270
|
-
control: {
|
|
271
|
-
type: 'radio',
|
|
272
|
-
options: [undefined, true, false],
|
|
273
|
-
},
|
|
274
|
-
table: {
|
|
275
|
-
type: { summary: 'boolean' },
|
|
276
|
-
},
|
|
277
|
-
},
|
|
278
|
-
};
|
|
279
|
-
exports.IS_INDETERMINATE_ARG = {
|
|
280
|
-
isIndeterminate: {
|
|
281
|
-
defaultValue: undefined,
|
|
282
|
-
description: 'Whether the input is indeterminate in controlled mode',
|
|
283
|
-
control: {
|
|
284
|
-
type: 'radio',
|
|
285
|
-
options: [undefined, true, false],
|
|
286
|
-
},
|
|
287
|
-
table: {
|
|
288
|
-
type: { summary: 'boolean' },
|
|
289
|
-
},
|
|
290
|
-
},
|
|
291
|
-
};
|
|
292
|
-
exports.SELECTED_KEY_ARG = {
|
|
293
|
-
selectedKey: {
|
|
294
|
-
defaultValue: undefined,
|
|
295
|
-
description: 'The selected value in controlled mode',
|
|
296
|
-
control: 'text',
|
|
297
|
-
table: {
|
|
298
|
-
type: { summary: 'string' },
|
|
299
|
-
},
|
|
300
|
-
},
|
|
301
|
-
defaultSelectedKey: {
|
|
302
|
-
defaultValue: undefined,
|
|
303
|
-
description: 'The default selected value in uncontrolled mode',
|
|
304
|
-
control: 'text',
|
|
305
|
-
table: {
|
|
306
|
-
type: { summary: 'string' },
|
|
307
|
-
},
|
|
308
|
-
},
|
|
309
|
-
};
|
|
310
|
-
exports.ICON_ARG = {
|
|
311
|
-
icon: {
|
|
312
|
-
// defaultValue: true,
|
|
313
|
-
description: 'Whether to show an icon on the element',
|
|
314
|
-
control: {
|
|
315
|
-
type: 'boolean',
|
|
316
|
-
},
|
|
317
|
-
table: {
|
|
318
|
-
type: { summary: 'boolean' },
|
|
319
|
-
defaultValue: { summary: true },
|
|
320
|
-
},
|
|
321
|
-
},
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-9917823
|
|
5
|
-
* Released under the MIT license.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
"use strict";
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.ConfirmDeletionDialogForm = void 0;
|
|
11
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
12
|
-
const index_1 = require("../../index");
|
|
13
|
-
function ConfirmDeletionDialogForm(props) {
|
|
14
|
-
let { name, onSubmit, onDismiss } = props;
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)(index_1.DialogForm, { title: "Delete Deployment", submitProps: {
|
|
16
|
-
label: 'Delete',
|
|
17
|
-
theme: 'danger',
|
|
18
|
-
}, cancelProps: {
|
|
19
|
-
label: 'I changed my mind',
|
|
20
|
-
}, onSubmit: onSubmit, onDismiss: onDismiss, children: [(0, jsx_runtime_1.jsxs)(index_1.Paragraph, { children: ["To delete the instance, please, enter its full name:", ' ', (0, jsx_runtime_1.jsx)(index_1.Text.Strong, { children: name }, void 0)] }, void 0), (0, jsx_runtime_1.jsx)(index_1.Field, { name: "name", rules: [
|
|
21
|
-
{
|
|
22
|
-
required: true,
|
|
23
|
-
message: 'This field is required',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
async validator(rule, value) {
|
|
27
|
-
if (value !== name) {
|
|
28
|
-
throw new Error('Incorrect name');
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
], children: (0, jsx_runtime_1.jsx)(index_1.Input.Text, { placeholder: "Enter the name of the instance" }, void 0) }, void 0)] }, void 0));
|
|
33
|
-
}
|
|
34
|
-
exports.ConfirmDeletionDialogForm = ConfirmDeletionDialogForm;
|
|
35
|
-
|
|
36
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* author: Cube Dev Team
|
|
4
|
-
* @cube-dev/ui-kit v0.0.0-canary-9917823
|
|
5
|
-
* Released under the MIT license.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
"use strict";
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.DialogFormApp = void 0;
|
|
11
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
12
|
-
const index_1 = require("../../index");
|
|
13
|
-
const ConfirmDeletionDialogForm_1 = require("./ConfirmDeletionDialogForm");
|
|
14
|
-
function DialogFormApp() {
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)(index_1.DialogTrigger, { children: [(0, jsx_runtime_1.jsx)(index_1.Button, { children: "Delete the instance" }, void 0), (0, jsx_runtime_1.jsx)(ConfirmDeletionDialogForm_1.ConfirmDeletionDialogForm, { name: "instanceName" }, void 0)] }, void 0));
|
|
16
|
-
}
|
|
17
|
-
exports.DialogFormApp = DialogFormApp;
|
|
18
|
-
|
|
19
|
-
|