@cube-dev/ui-kit 0.0.0-canary-b1b0bd2 → 0.0.0-canary-da3b218
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 +1 -1
- package/cjs/_internal/hooks/use-chained-callback.js +1 -1
- package/cjs/_internal/hooks/use-deprecation-warning.js +1 -1
- package/cjs/_internal/hooks/use-event.js +1 -1
- package/cjs/_internal/hooks/use-sync-ref.js +1 -1
- package/cjs/_internal/hooks/use-timer/index.js +1 -1
- package/cjs/_internal/hooks/use-timer/timer.js +1 -1
- package/cjs/_internal/hooks/use-timer/use-timer.js +7 -7
- package/cjs/_internal/index.js +1 -1
- package/cjs/components/Base.js +2 -2
- package/cjs/components/Block.js +1 -1
- package/cjs/components/GlobalStyles.js +1 -1
- package/cjs/components/GridProvider.js +3 -2
- package/cjs/components/HiddenInput.js +1 -1
- package/cjs/components/OpenTrasition.js +1 -1
- package/cjs/components/Root.js +2 -2
- package/cjs/components/actions/Action.js +2 -2
- package/cjs/components/actions/Button/Button.js +3 -3
- package/cjs/components/actions/Button/Submit.js +1 -1
- package/cjs/components/actions/Button/index.js +1 -1
- package/cjs/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/cjs/components/actions/index.js +1 -1
- package/cjs/components/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 +3 -2
- 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 +2 -2
- package/cjs/components/content/Skeleton/Skeleton.js +1 -1
- package/cjs/components/content/Tag/Tag.js +1 -1
- package/cjs/components/content/Text.js +1 -1
- package/cjs/components/content/Title.js +1 -1
- package/cjs/components/forms/Checkbox/Checkbox.js +1 -1
- package/cjs/components/forms/Checkbox/CheckboxGroup.js +1 -1
- package/cjs/components/forms/Checkbox/context.js +1 -1
- package/cjs/components/forms/FieldWrapper.js +1 -1
- package/cjs/components/forms/FileInput/FileInput.js +7 -6
- package/cjs/components/forms/Form/Field.js +5 -5
- package/cjs/components/forms/Form/Form.js +8 -8
- package/cjs/components/forms/Form/index.js +1 -1
- package/cjs/components/forms/Form/types.js +1 -1
- package/cjs/components/forms/Form/useForm.js +7 -4
- package/cjs/components/forms/Form/validation.js +2 -2
- package/cjs/components/forms/Input/Input.js +1 -1
- package/cjs/components/forms/Input/index.js +1 -1
- package/cjs/components/forms/Label.js +1 -1
- package/cjs/components/forms/NumberInput/NumberInput.js +1 -1
- package/cjs/components/forms/NumberInput/StepButton.js +1 -1
- package/cjs/components/forms/PasswordInput/PasswordInput.js +1 -1
- package/cjs/components/forms/RadioGroup/Radio.js +1 -1
- package/cjs/components/forms/RadioGroup/RadioGroup.js +1 -1
- package/cjs/components/forms/RadioGroup/context.js +1 -1
- package/cjs/components/forms/SearchInput/SearchInput.js +1 -1
- package/cjs/components/forms/Switch/Switch.js +1 -1
- package/cjs/components/forms/TextArea/TextArea.js +1 -1
- package/cjs/components/forms/TextInput/TextInput.js +1 -1
- package/cjs/components/forms/TextInput/TextInputBase.js +4 -4
- 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 +2 -2
- 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 +9 -3
- package/cjs/components/overlays/AlertDialog/AlertDialogApiProvider.js +7 -6
- package/cjs/components/overlays/AlertDialog/AlertDialogZone.js +2 -2
- 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 +7 -7
- 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 +3 -3
- 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 +10 -10
- 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 +2 -2
- package/cjs/components/overlays/NewNotifications/Dialog/index.js +1 -1
- package/cjs/components/overlays/NewNotifications/Notification.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationAction.js +3 -3
- 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 +3 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationHeader.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationIcon.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationProvider.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationView.js +3 -3
- package/cjs/components/overlays/NewNotifications/NotificationView/index.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationView/types.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationsContext/NotificationsProvider.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationsContext/index.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationsContext/use-notifications.js +8 -6
- package/cjs/components/overlays/NewNotifications/NotificationsList.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/index.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/types.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/use-notification-list-item.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/use-notifications-api.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/use-notifications-list.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/use-notifications-observer.js +4 -3
- 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 +2 -2
- package/cjs/components/overlays/Toasts/index.js +1 -1
- package/cjs/components/overlays/Toasts/types.js +1 -1
- package/cjs/components/overlays/Toasts/use-toasts-api.js +1 -1
- package/cjs/components/overlays/Tooltip/Tooltip.js +5 -5
- package/cjs/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/cjs/components/overlays/Tooltip/TooltipTrigger.js +3 -2
- package/cjs/components/overlays/Tooltip/context.js +1 -1
- package/cjs/components/pickers/ComboBox/ComboBox.js +3 -2
- 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 +6 -5
- 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 +7 -5
- package/cjs/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- package/cjs/components/status/LoadingAnimation/index.js +1 -1
- package/cjs/components/status/Spin/Cube.js +1 -1
- package/cjs/components/status/Spin/InternalSpinner.js +1 -1
- package/cjs/components/status/Spin/Spin.js +1 -1
- package/cjs/components/status/Spin/SpinsContainer.js +1 -1
- package/cjs/components/status/Spin/index.js +1 -1
- package/cjs/components/status/Spin/types.js +1 -1
- package/cjs/components/status/index.js +1 -1
- package/cjs/data/themes.js +1 -1
- package/cjs/icons/Attention.js +1 -1
- package/cjs/icons/Cross.js +1 -1
- package/cjs/icons/Danger.js +1 -1
- package/cjs/icons/Success.js +1 -1
- package/cjs/icons/index.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/provider.js +1 -1
- package/cjs/providers/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/stories/FormFieldArgs.js +1 -1
- package/cjs/stories/components/ConfirmDeletionDialogForm.js +1 -1
- package/cjs/stories/components/DialogFormApp.js +1 -1
- package/cjs/stories/components/StyledButton.js +1 -1
- package/cjs/stories/lists/baseProps.js +1 -1
- package/cjs/styled/index.js +1 -1
- package/cjs/styled/styled.js +12 -11
- 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 +2 -2
- 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 +9 -8
- 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 +2 -2
- package/cjs/tasty/utils/get-display-name.js +3 -2
- package/cjs/tasty/utils/index.js +1 -1
- package/cjs/tasty/utils/mergeStyles.js +3 -3
- 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 +1 -1
- package/cjs/test/render.js +1 -1
- package/cjs/test/setup.js +1 -1
- package/cjs/test/utils/index.js +1 -1
- package/cjs/test/utils/wait.js +1 -1
- package/cjs/tokens.js +1 -1
- package/cjs/type-checks.js +1 -1
- package/cjs/utils/ResizeSensor.js +19 -19
- package/cjs/utils/modules.js +1 -1
- package/cjs/utils/promise.js +1 -1
- package/cjs/utils/random.js +18 -0
- package/cjs/utils/range.js +16 -0
- package/cjs/utils/react/Slots.js +12 -7
- 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 +3 -3
- 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/wrapNodeIfPlain.js +1 -1
- package/cjs/utils/transitions.js +1 -1
- package/cjs/utils/tree.js +1 -1
- package/cjs/utils/warnings.js +1 -1
- package/es/_internal/hooks/index.js +1 -1
- package/es/_internal/hooks/use-chained-callback.js +1 -1
- package/es/_internal/hooks/use-deprecation-warning.js +1 -1
- package/es/_internal/hooks/use-event.js +1 -1
- package/es/_internal/hooks/use-sync-ref.js +1 -1
- package/es/_internal/hooks/use-timer/index.js +1 -1
- package/es/_internal/hooks/use-timer/timer.js +1 -1
- package/es/_internal/hooks/use-timer/use-timer.js +7 -7
- package/es/_internal/index.js +1 -1
- package/es/components/Base.js +2 -2
- package/es/components/Block.js +1 -1
- package/es/components/GlobalStyles.js +1 -1
- package/es/components/GridProvider.js +3 -2
- package/es/components/HiddenInput.js +1 -1
- package/es/components/OpenTrasition.js +1 -1
- package/es/components/Root.js +2 -2
- package/es/components/actions/Action.js +2 -2
- package/es/components/actions/Button/Button.js +3 -3
- package/es/components/actions/Button/Submit.js +1 -1
- package/es/components/actions/Button/index.js +1 -1
- package/es/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/es/components/actions/index.js +1 -1
- package/es/components/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 +3 -2
- 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 +2 -2
- package/es/components/content/Skeleton/Skeleton.js +1 -1
- package/es/components/content/Tag/Tag.js +1 -1
- package/es/components/content/Text.js +1 -1
- package/es/components/content/Title.js +1 -1
- package/es/components/forms/Checkbox/Checkbox.js +1 -1
- package/es/components/forms/Checkbox/CheckboxGroup.js +1 -1
- package/es/components/forms/Checkbox/context.js +1 -1
- package/es/components/forms/FieldWrapper.js +1 -1
- package/es/components/forms/FileInput/FileInput.js +7 -6
- package/es/components/forms/Form/Field.js +5 -5
- package/es/components/forms/Form/Form.js +8 -8
- package/es/components/forms/Form/index.js +1 -1
- package/es/components/forms/Form/types.js +1 -1
- package/es/components/forms/Form/useForm.js +7 -4
- package/es/components/forms/Form/validation.js +2 -2
- package/es/components/forms/Input/Input.js +1 -1
- package/es/components/forms/Input/index.js +1 -1
- package/es/components/forms/Label.js +1 -1
- package/es/components/forms/NumberInput/NumberInput.js +1 -1
- package/es/components/forms/NumberInput/StepButton.js +1 -1
- package/es/components/forms/PasswordInput/PasswordInput.js +1 -1
- package/es/components/forms/RadioGroup/Radio.js +1 -1
- package/es/components/forms/RadioGroup/RadioGroup.js +1 -1
- package/es/components/forms/RadioGroup/context.js +1 -1
- package/es/components/forms/SearchInput/SearchInput.js +1 -1
- package/es/components/forms/Switch/Switch.js +1 -1
- package/es/components/forms/TextArea/TextArea.js +1 -1
- package/es/components/forms/TextInput/TextInput.js +1 -1
- package/es/components/forms/TextInput/TextInputBase.js +4 -4
- 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 +2 -2
- 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 +9 -3
- package/es/components/overlays/AlertDialog/AlertDialogApiProvider.js +7 -6
- 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 +1 -1
- package/es/components/overlays/Dialog/DialogContainer.js +1 -1
- package/es/components/overlays/Dialog/DialogForm.js +7 -7
- 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 +3 -3
- 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 +11 -11
- package/es/components/overlays/NewNotifications/Bar/TransitionComponent.js +1 -1
- package/es/components/overlays/NewNotifications/Bar/index.js +1 -1
- package/es/components/overlays/NewNotifications/Dialog/NotificationsDialogTrigger.js +2 -2
- package/es/components/overlays/NewNotifications/Dialog/index.js +1 -1
- package/es/components/overlays/NewNotifications/Notification.js +2 -2
- package/es/components/overlays/NewNotifications/NotificationView/NotificationAction.js +3 -3
- 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 +3 -2
- package/es/components/overlays/NewNotifications/NotificationView/NotificationHeader.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationIcon.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationProvider.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationView.js +3 -3
- package/es/components/overlays/NewNotifications/NotificationView/index.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/types.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsContext/NotificationsProvider.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsContext/index.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsContext/use-notifications.js +8 -6
- package/es/components/overlays/NewNotifications/NotificationsList.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/index.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/types.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/use-notification-list-item.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/use-notifications-api.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/use-notifications-list.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/use-notifications-observer.js +4 -3
- 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 +2 -2
- package/es/components/overlays/Toasts/index.js +1 -1
- package/es/components/overlays/Toasts/types.js +1 -1
- package/es/components/overlays/Toasts/use-toasts-api.js +1 -1
- package/es/components/overlays/Tooltip/Tooltip.js +5 -5
- package/es/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/es/components/overlays/Tooltip/TooltipTrigger.js +3 -2
- package/es/components/overlays/Tooltip/context.js +1 -1
- package/es/components/pickers/ComboBox/ComboBox.js +3 -2
- package/es/components/pickers/Menu/Menu.js +1 -1
- package/es/components/pickers/Menu/MenuButton.js +1 -1
- package/es/components/pickers/Menu/MenuItem.js +1 -1
- package/es/components/pickers/Menu/MenuSection.js +1 -1
- package/es/components/pickers/Menu/MenuTrigger.js +1 -1
- package/es/components/pickers/Menu/context.js +1 -1
- package/es/components/pickers/Menu/styled.js +1 -1
- package/es/components/pickers/Select/Select.js +6 -5
- 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 +7 -5
- package/es/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- package/es/components/status/LoadingAnimation/index.js +1 -1
- package/es/components/status/Spin/Cube.js +1 -1
- package/es/components/status/Spin/InternalSpinner.js +1 -1
- package/es/components/status/Spin/Spin.js +1 -1
- package/es/components/status/Spin/SpinsContainer.js +1 -1
- package/es/components/status/Spin/index.js +1 -1
- package/es/components/status/Spin/types.js +1 -1
- package/es/components/status/index.js +1 -1
- package/es/data/themes.js +1 -1
- package/es/icons/Attention.js +1 -1
- package/es/icons/Cross.js +1 -1
- package/es/icons/Danger.js +1 -1
- package/es/icons/Success.js +1 -1
- package/es/icons/index.js +1 -1
- package/es/index.js +1 -1
- package/es/provider.js +1 -1
- package/es/providers/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/stories/FormFieldArgs.js +1 -1
- package/es/stories/components/ConfirmDeletionDialogForm.js +1 -1
- package/es/stories/components/DialogFormApp.js +1 -1
- package/es/stories/components/StyledButton.js +1 -1
- package/es/stories/lists/baseProps.js +1 -1
- package/es/styled/index.js +1 -1
- package/es/styled/styled.js +12 -11
- 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 +2 -2
- 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 +9 -8
- 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 +2 -2
- package/es/tasty/utils/get-display-name.js +3 -2
- package/es/tasty/utils/index.js +1 -1
- package/es/tasty/utils/mergeStyles.js +3 -3
- 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 +1 -1
- package/es/test/render.js +1 -1
- package/es/test/setup.js +1 -1
- package/es/test/utils/index.js +1 -1
- package/es/test/utils/wait.js +1 -1
- package/es/tokens.js +1 -1
- package/es/type-checks.js +1 -1
- package/es/utils/ResizeSensor.js +19 -19
- package/es/utils/modules.js +1 -1
- package/es/utils/promise.js +1 -1
- package/es/utils/random.js +14 -0
- package/es/utils/range.js +12 -0
- package/es/utils/react/Slots.js +12 -7
- 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 +3 -3
- 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/wrapNodeIfPlain.js +1 -1
- package/es/utils/transitions.js +1 -1
- package/es/utils/tree.js +1 -1
- package/es/utils/warnings.js +1 -1
- package/package.json +1 -1
- package/types/components/overlays/NewNotifications/Bar/NotificationsBar.d.ts +5 -0
- package/types/stories/components/StyledButton.d.ts +3 -3
- package/types/utils/random.d.ts +1 -0
- package/types/utils/range.d.ts +1 -0
- package/types/utils/react/interactions.d.ts +2 -1
- package/CHANGELOG.md +0 -270
|
@@ -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-da3b218
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -108,7 +108,7 @@ function Field(allProps) {
|
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
110
|
}, []);
|
|
111
|
-
let field = form
|
|
111
|
+
let field = form === null || form === void 0 ? void 0 : form.getFieldInstance(fieldName);
|
|
112
112
|
if (field) {
|
|
113
113
|
field.rules = rules;
|
|
114
114
|
}
|
|
@@ -143,9 +143,9 @@ function Field(allProps) {
|
|
|
143
143
|
if (!field) {
|
|
144
144
|
form.createField(fieldName, true);
|
|
145
145
|
}
|
|
146
|
-
if (field
|
|
146
|
+
if ((field === null || field === void 0 ? void 0 : field.value) == null) {
|
|
147
147
|
form.setFieldValue(fieldName, defaultValue, false, true);
|
|
148
|
-
field = form
|
|
148
|
+
field = form === null || form === void 0 ? void 0 : form.getFieldInstance(fieldName);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
firstRunRef.current = false;
|
|
@@ -235,7 +235,7 @@ function Field(allProps) {
|
|
|
235
235
|
newProps.message = field.errors[0];
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
Object.assign(newProps, getValueProps(inputType, field
|
|
238
|
+
Object.assign(newProps, getValueProps(inputType, field === null || field === void 0 ? void 0 : field.inputValue, onChangeHandler, child.props.allowsCustomValue));
|
|
239
239
|
const { onChange, onSelectionChange, ...childProps } = child.props;
|
|
240
240
|
// onChange event passed to the child should be executed after Form onChange logic
|
|
241
241
|
return (0, react_1.cloneElement)(child, (0, react_2.mergeProps)(childProps, newProps, onChange ? { onChange } : {}, onSelectionChange ? { onSelectionChange } : {}));
|
|
@@ -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-da3b218
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -47,9 +47,9 @@ function Form(props, ref) {
|
|
|
47
47
|
let onSubmitCallback;
|
|
48
48
|
if ((onSubmit || onSubmitFailed) && !otherProps.action) {
|
|
49
49
|
onSubmitCallback = async (e) => {
|
|
50
|
-
if (e && e
|
|
51
|
-
e && e
|
|
52
|
-
e && e
|
|
50
|
+
if (e && (e === null || e === void 0 ? void 0 : e.preventDefault)) {
|
|
51
|
+
e && (e === null || e === void 0 ? void 0 : e.preventDefault) && (e === null || e === void 0 ? void 0 : e.preventDefault());
|
|
52
|
+
e && (e === null || e === void 0 ? void 0 : e.stopPropagation) && (e === null || e === void 0 ? void 0 : e.stopPropagation());
|
|
53
53
|
if (e.nativeEvent) {
|
|
54
54
|
const evt = e.nativeEvent;
|
|
55
55
|
if (evt.submitter &&
|
|
@@ -64,7 +64,7 @@ function Form(props, ref) {
|
|
|
64
64
|
try {
|
|
65
65
|
await form.validateFields();
|
|
66
66
|
await (0, promise_1.timeout)();
|
|
67
|
-
await onSubmit
|
|
67
|
+
await (onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(form.getFormData()));
|
|
68
68
|
}
|
|
69
69
|
catch (e) {
|
|
70
70
|
await (0, promise_1.timeout)();
|
|
@@ -73,10 +73,10 @@ function Form(props, ref) {
|
|
|
73
73
|
}
|
|
74
74
|
// errors are shown
|
|
75
75
|
// transfer errors to the callback
|
|
76
|
-
onSubmitFailed
|
|
76
|
+
onSubmitFailed === null || onSubmitFailed === void 0 ? void 0 : onSubmitFailed(e);
|
|
77
77
|
}
|
|
78
78
|
finally {
|
|
79
|
-
form
|
|
79
|
+
form === null || form === void 0 ? void 0 : form.setSubmitting(false);
|
|
80
80
|
}
|
|
81
81
|
// output data from form directly
|
|
82
82
|
// onSubmit(Object.fromEntries(new FormData(e.target).entries()));
|
|
@@ -109,7 +109,7 @@ function Form(props, ref) {
|
|
|
109
109
|
}
|
|
110
110
|
(0, react_1.useEffect)(() => {
|
|
111
111
|
if (defaultValues) {
|
|
112
|
-
form
|
|
112
|
+
form === null || form === void 0 ? void 0 : form.setInitialFieldsValue(defaultValues);
|
|
113
113
|
}
|
|
114
114
|
}, [defaultValues]);
|
|
115
115
|
return ((0, jsx_runtime_1.jsx)(FormElement, { ...(0, tasty_1.filterBaseProps)(otherProps, { propNames: formPropNames }), ref: domRef, noValidate: true, styles: styles, mods: { 'has-sider': labelPosition === 'side' }, onSubmit: onSubmitCallback, children: (0, jsx_runtime_1.jsx)(exports.FormContext.Provider, { value: ctx, children: (0, jsx_runtime_1.jsx)(provider_1.Provider, { insideForm: true, isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, validationState: validationState, children: children }, void 0) }, void 0) }, void 0));
|
|
@@ -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-da3b218
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -85,10 +85,12 @@ class CubeFormInstance {
|
|
|
85
85
|
this.setFields = this.setFields.bind(this);
|
|
86
86
|
}
|
|
87
87
|
async submit() {
|
|
88
|
-
|
|
88
|
+
var _a;
|
|
89
|
+
return (_a = this.onSubmit) === null || _a === void 0 ? void 0 : _a.call(this, this.getFormData());
|
|
89
90
|
}
|
|
90
91
|
getFieldValue(name) {
|
|
91
|
-
|
|
92
|
+
var _a;
|
|
93
|
+
return (_a = this.fields[name]) === null || _a === void 0 ? void 0 : _a.value;
|
|
92
94
|
}
|
|
93
95
|
getFieldsValue() {
|
|
94
96
|
return Object.values(this.fields).reduce((map, field) => {
|
|
@@ -133,7 +135,8 @@ class CubeFormInstance {
|
|
|
133
135
|
return this.fields[name];
|
|
134
136
|
}
|
|
135
137
|
setInitialFieldsValue(values) {
|
|
136
|
-
|
|
138
|
+
var _a;
|
|
139
|
+
this.initialFields = (_a = tasty_1.dotize.convert(values)) !== null && _a !== void 0 ? _a : {};
|
|
137
140
|
}
|
|
138
141
|
resetFields(names, skipRender) {
|
|
139
142
|
const fieldsValue = this.getFieldsValue();
|
|
@@ -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-da3b218
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -138,7 +138,7 @@ async function applyRules(value, rules, form) {
|
|
|
138
138
|
for (let rule of rules) {
|
|
139
139
|
await applyRule(value, rule, form).catch((err) => {
|
|
140
140
|
if (err instanceof Error) {
|
|
141
|
-
err = err
|
|
141
|
+
err = (err === null || err === void 0 ? void 0 : err.message) || rule.message;
|
|
142
142
|
}
|
|
143
143
|
throw err || rule.message;
|
|
144
144
|
});
|
|
@@ -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-da3b218
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -155,19 +155,19 @@ function TextInputBase(props, ref) {
|
|
|
155
155
|
(0, react_1.useImperativeHandle)(ref, () => ({
|
|
156
156
|
...(0, utils_1.createFocusableRef)(domRef, inputRef),
|
|
157
157
|
select() {
|
|
158
|
-
if (inputRef
|
|
158
|
+
if (inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) {
|
|
159
159
|
inputRef.current.select();
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
162
|
getInputElement() {
|
|
163
|
-
return inputRef
|
|
163
|
+
return inputRef === null || inputRef === void 0 ? void 0 : inputRef.current;
|
|
164
164
|
},
|
|
165
165
|
}));
|
|
166
166
|
let isInvalid = validationState === 'invalid';
|
|
167
167
|
let validationIcon = isInvalid ? ((0, jsx_runtime_1.jsx)(icons_1.WarningOutlined, { "data-element": "ValidationIcon", style: { color: 'var(--danger-color)' } }, void 0)) : ((0, jsx_runtime_1.jsx)(icons_1.CheckOutlined, { "data-element": "ValidationIcon", style: { color: 'var(--success-color)' } }, void 0));
|
|
168
168
|
let validation = (0, react_1.cloneElement)(validationIcon);
|
|
169
169
|
// Fix safari bug: https://github.com/philipwalton/flexbugs/issues/270
|
|
170
|
-
if (!inputProps
|
|
170
|
+
if (!(inputProps === null || inputProps === void 0 ? void 0 : inputProps.placeholder)) {
|
|
171
171
|
if (!inputProps) {
|
|
172
172
|
inputProps = {};
|
|
173
173
|
}
|
|
@@ -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-da3b218
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -33,7 +33,7 @@ exports.Prefix = (0, react_1.forwardRef)(function Prefix(allProps, outerRef) {
|
|
|
33
33
|
const styles = (0, tasty_1.extractStyles)(props, tasty_1.CONTAINER_STYLES);
|
|
34
34
|
const ref = (0, react_2.useCombinedRefs)(outerRef);
|
|
35
35
|
(0, react_2.useLayoutEffect)(() => {
|
|
36
|
-
if (ref
|
|
36
|
+
if ((ref === null || ref === void 0 ? void 0 : ref.current) && onWidthChange) {
|
|
37
37
|
onWidthChange(ref.current.offsetWidth);
|
|
38
38
|
}
|
|
39
39
|
}, [children, ref, onWidthChange]);
|
|
@@ -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-da3b218
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -32,7 +32,7 @@ const DEFAULT_CANCEL_PROPS = {
|
|
|
32
32
|
function AlertDialog(props, ref) {
|
|
33
33
|
const { onClose } = (0, context_1.useDialogContext)();
|
|
34
34
|
const { danger, actions, title, styles, noActions, content, ...otherProps } = props;
|
|
35
|
-
let { confirm: confirmProps, secondary: secondaryProps, cancel: cancelProps, } = actions
|
|
35
|
+
let { confirm: confirmProps, secondary: secondaryProps, cancel: cancelProps, } = actions !== null && actions !== void 0 ? actions : {};
|
|
36
36
|
// the confirm button is present by default
|
|
37
37
|
confirmProps =
|
|
38
38
|
confirmProps !== false
|
|
@@ -48,7 +48,13 @@ function AlertDialog(props, ref) {
|
|
|
48
48
|
...(typeof cancelProps === 'object' ? cancelProps : null),
|
|
49
49
|
}
|
|
50
50
|
: undefined;
|
|
51
|
-
return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { ref: ref, role: "alertdialog", isDismissable: false, ...otherProps, children: [title ? ((0, jsx_runtime_1.jsx)(Header_1.Header, { children: (0, jsx_runtime_1.jsx)(Title_1.Title, { children: title }, void 0) }, void 0)) : null, content ? ((0, jsx_runtime_1.jsx)(Content_1.Content, { children: typeof content === 'string' ? ((0, jsx_runtime_1.jsx)(Paragraph_1.Paragraph, { children: content }, void 0)) : (content) }, void 0)) : null, !noActions ? ((0, jsx_runtime_1.jsx)(Footer_1.Footer, { children: (0, jsx_runtime_1.jsxs)(actions_1.ButtonGroup, { align: "end", children: [(0, jsx_runtime_1.jsx)(actions_1.Button, { autoFocus: true, theme: danger ? 'danger' : undefined, ...confirmProps, onPress: (e) =>
|
|
51
|
+
return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { ref: ref, role: "alertdialog", isDismissable: false, ...otherProps, children: [title ? ((0, jsx_runtime_1.jsx)(Header_1.Header, { children: (0, jsx_runtime_1.jsx)(Title_1.Title, { children: title }, void 0) }, void 0)) : null, content ? ((0, jsx_runtime_1.jsx)(Content_1.Content, { children: typeof content === 'string' ? ((0, jsx_runtime_1.jsx)(Paragraph_1.Paragraph, { children: content }, void 0)) : (content) }, void 0)) : null, !noActions ? ((0, jsx_runtime_1.jsx)(Footer_1.Footer, { children: (0, jsx_runtime_1.jsxs)(actions_1.ButtonGroup, { align: "end", children: [(0, jsx_runtime_1.jsx)(actions_1.Button, { autoFocus: true, theme: danger ? 'danger' : undefined, ...confirmProps, onPress: (e) => {
|
|
52
|
+
var _a, _b;
|
|
53
|
+
return (0, react_2.chain)((_b = (_a = confirmProps) === null || _a === void 0 ? void 0 : _a.onPress) === null || _b === void 0 ? void 0 : _b.call(_a, e), onClose === null || onClose === void 0 ? void 0 : onClose('confirm'));
|
|
54
|
+
} }, void 0), secondaryProps && ((0, jsx_runtime_1.jsx)(actions_1.Button, { ...secondaryProps, onPress: (e) => { var _a; return (0, react_2.chain)((_a = secondaryProps === null || secondaryProps === void 0 ? void 0 : secondaryProps.onPress) === null || _a === void 0 ? void 0 : _a.call(secondaryProps, e), onClose === null || onClose === void 0 ? void 0 : onClose('secondary')); } }, void 0)), cancelProps && ((0, jsx_runtime_1.jsx)(actions_1.Button, { ...cancelProps, onPress: (e) => {
|
|
55
|
+
var _a, _b;
|
|
56
|
+
return (0, react_2.chain)((_b = (_a = cancelProps) === null || _a === void 0 ? void 0 : _a.onPress) === null || _b === void 0 ? void 0 : _b.call(_a, e), onClose === null || onClose === void 0 ? void 0 : onClose('cancel'));
|
|
57
|
+
} }, void 0))] }, void 0) }, void 0)) : null] }, void 0));
|
|
52
58
|
}
|
|
53
59
|
/**
|
|
54
60
|
* AlertDialogs are a specific type of Dialog. They display important information that users need to acknowledge.
|
|
@@ -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-da3b218
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -31,21 +31,22 @@ function AlertDialogApiProvider(props) {
|
|
|
31
31
|
meta: { id: currentId, isClosed: false, isVisible: true },
|
|
32
32
|
};
|
|
33
33
|
const close = () => {
|
|
34
|
+
var _a;
|
|
34
35
|
if (currentDialog.meta.isClosed)
|
|
35
36
|
return;
|
|
36
37
|
currentDialog.meta.isClosed = true;
|
|
37
|
-
params.cancelToken
|
|
38
|
-
setOpenedDialog((currentState) => currentState
|
|
38
|
+
(_a = params.cancelToken) === null || _a === void 0 ? void 0 : _a.removeEventListener('abort', close);
|
|
39
|
+
setOpenedDialog((currentState) => (currentState === null || currentState === void 0 ? void 0 : currentState.meta.id) !== currentId
|
|
39
40
|
? currentState
|
|
40
41
|
: {
|
|
41
42
|
props: currentState.props,
|
|
42
43
|
meta: { ...currentState.meta, isVisible: false },
|
|
43
44
|
});
|
|
44
|
-
setTimeout(() => setOpenedDialog((currentState) => currentState
|
|
45
|
+
setTimeout(() => setOpenedDialog((currentState) => (currentState === null || currentState === void 0 ? void 0 : currentState.meta.id) !== currentId ? currentState : null), 300);
|
|
45
46
|
};
|
|
46
|
-
if (cancelToken
|
|
47
|
+
if (cancelToken === null || cancelToken === void 0 ? void 0 : cancelToken.aborted)
|
|
47
48
|
return new Promise(() => { });
|
|
48
|
-
cancelToken
|
|
49
|
+
cancelToken === null || cancelToken === void 0 ? void 0 : cancelToken.addEventListener('abort', close, { once: true });
|
|
49
50
|
currentDialog.meta.promise = new Promise((resolve, reject) => {
|
|
50
51
|
currentDialog.meta.resolve = (status) => {
|
|
51
52
|
close();
|
|
@@ -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-da3b218
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -36,7 +36,7 @@ function AlertDialogZone(props) {
|
|
|
36
36
|
return {
|
|
37
37
|
...action,
|
|
38
38
|
onPress: (e) => {
|
|
39
|
-
onPress
|
|
39
|
+
onPress === null || onPress === void 0 ? void 0 : onPress(e);
|
|
40
40
|
resolve(status);
|
|
41
41
|
},
|
|
42
42
|
};
|
|
@@ -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-da3b218
|
|
5
5
|
* Released under the MIT license.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -27,17 +27,17 @@ function DialogForm(props) {
|
|
|
27
27
|
[form] = (0, forms_1.useForm)(form);
|
|
28
28
|
const { onClose } = (0, context_1.useDialogContext)();
|
|
29
29
|
function onLocalDismiss() {
|
|
30
|
-
onClose
|
|
31
|
-
onDismiss
|
|
30
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
31
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
32
32
|
if (!preserve) {
|
|
33
|
-
form
|
|
33
|
+
form === null || form === void 0 ? void 0 : form.resetFields();
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { qa: `${qa || ''}Dialog`, size: size, closeIcon: closeIcon, ...dialogProps, children: [(0, jsx_runtime_1.jsx)(Header_1.Header, { children: (0, jsx_runtime_1.jsx)(Title_1.Title, { children: title }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(Content_1.Content, { children: (0, jsx_runtime_1.jsxs)(Form_1.Form, { qa: qa || 'DialogForm', form: form, name: name, defaultValues: defaultValues, labelStyles: labelStyles, labelPosition: labelPosition, requiredMark: requiredMark, isRequired: isRequired, necessityIndicator: necessityIndicator, necessityLabel: necessityLabel, isReadOnly: isReadOnly, validationState: validationState, validateTrigger: validateTrigger, onSubmit: async (data) => {
|
|
37
|
-
await onSubmit
|
|
38
|
-
onClose
|
|
37
|
+
await (onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(data));
|
|
38
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
39
39
|
if (!preserve) {
|
|
40
|
-
form
|
|
40
|
+
form === null || form === void 0 ? void 0 : form.resetFields();
|
|
41
41
|
}
|
|
42
42
|
}, onSubmitFailed: onSubmitFailed, onValuesChange: onValuesChange, children: [typeof children === 'function' ? children(onLocalDismiss) : children, !noActions ? ((0, jsx_runtime_1.jsxs)(actions_2.ButtonGroup, { children: [(0, jsx_runtime_1.jsx)(Submit_1.Submit, { qa: `${qa || ''}SubmitButton`, theme: danger ? 'danger' : undefined, label: "Submit", ...(submitProps || {}) }, void 0), (0, jsx_runtime_1.jsx)(actions_1.Button, { qa: `${qa || ''}CancelButton`, label: "Cancel", onPress: onLocalDismiss, ...(cancelProps || {}) }, void 0)] }, void 0)) : undefined] }, void 0) }, void 0)] }, void 0));
|
|
43
43
|
}
|