@cube-dev/ui-kit 0.0.0-canary-2aa9c92 → 0.0.0-canary-7507f00
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/README.md +4 -4
- package/cjs/_internal/hooks/index.js +2 -6
- package/cjs/_internal/hooks/use-chained-callback.js +1 -1
- package/cjs/_internal/hooks/use-deprecation-warning.js +2 -6
- 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 +2 -6
- package/cjs/_internal/hooks/use-timer/timer.js +7 -7
- package/cjs/_internal/hooks/use-timer/use-timer.js +1 -1
- package/cjs/_internal/index.js +2 -6
- 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 +3 -7
- 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/Submit.js +2 -2
- package/cjs/components/actions/Button/index.js +2 -6
- package/cjs/components/actions/ButtonGroup/ButtonGroup.js +2 -2
- package/cjs/components/actions/index.js +2 -6
- 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 +2 -6
- 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 +2 -6
- 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 +7 -7
- package/cjs/components/forms/Checkbox/CheckboxGroup.js +3 -3
- package/cjs/components/forms/Checkbox/context.js +1 -1
- package/cjs/components/forms/FieldWrapper.js +5 -5
- package/cjs/components/forms/FileInput/FileInput.js +3 -3
- package/cjs/components/forms/Form/Field.js +2 -2
- package/cjs/components/forms/Form/Form.js +2 -2
- package/cjs/components/forms/Form/SubmitError.js +2 -2
- 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 +1 -1
- package/cjs/components/forms/Form/validation.js +1 -1
- package/cjs/components/forms/Input/Input.js +2 -2
- package/cjs/components/forms/Input/index.js +2 -6
- package/cjs/components/forms/Label.js +4 -4
- package/cjs/components/forms/NumberInput/NumberInput.js +2 -2
- package/cjs/components/forms/NumberInput/StepButton.js +3 -3
- package/cjs/components/forms/PasswordInput/PasswordInput.js +3 -3
- package/cjs/components/forms/RadioGroup/Radio.js +6 -6
- package/cjs/components/forms/RadioGroup/RadioGroup.js +3 -3
- 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 +3 -3
- package/cjs/components/forms/Slider/SliderBase.js +4 -4
- 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 +2 -6
- package/cjs/components/forms/Slider/types.js +1 -1
- package/cjs/components/forms/Switch/Switch.js +4 -4
- package/cjs/components/forms/TextArea/TextArea.js +2 -2
- package/cjs/components/forms/TextInput/TextInput.js +2 -2
- package/cjs/components/forms/TextInput/TextInputBase.js +6 -6
- package/cjs/components/forms/index.js +2 -6
- 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 +2 -6
- package/cjs/components/overlays/AlertDialog/types.js +1 -1
- package/cjs/components/overlays/Dialog/Dialog.js +4 -4
- package/cjs/components/overlays/Dialog/DialogContainer.js +2 -2
- package/cjs/components/overlays/Dialog/DialogForm.js +3 -3
- package/cjs/components/overlays/Dialog/DialogTrigger.js +8 -8
- package/cjs/components/overlays/Dialog/context.js +1 -1
- package/cjs/components/overlays/Dialog/index.js +2 -6
- package/cjs/components/overlays/Modal/Modal.js +3 -3
- package/cjs/components/overlays/Modal/OpenTransition.js +2 -2
- package/cjs/components/overlays/Modal/Overlay.js +2 -2
- package/cjs/components/overlays/Modal/Popover.js +3 -3
- package/cjs/components/overlays/Modal/Tray.js +3 -3
- package/cjs/components/overlays/Modal/Underlay.js +2 -2
- package/cjs/components/overlays/Modal/index.js +2 -6
- package/cjs/components/overlays/Modal/types.js +1 -1
- 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 +2 -6
- package/cjs/components/overlays/NewNotifications/Dialog/NotificationsDialogTrigger.js +3 -3
- package/cjs/components/overlays/NewNotifications/Dialog/index.js +2 -6
- 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 +3 -7
- 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 +2 -6
- 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 +2 -6
- package/cjs/components/overlays/NewNotifications/NotificationsList/types.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/index.js +2 -6
- 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 +2 -6
- 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 +2 -6
- 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 +8 -8
- package/cjs/components/pickers/Menu/Menu.js +4 -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 +6 -10
- package/cjs/components/pickers/Menu/context.js +2 -6
- package/cjs/components/pickers/Menu/styled.js +1 -1
- package/cjs/components/pickers/Select/Select.js +9 -9
- package/cjs/components/portal/Portal.js +2 -2
- package/cjs/components/portal/PortalProvider.js +1 -1
- package/cjs/components/portal/index.js +2 -6
- 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 +2 -6
- 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 +2 -6
- package/cjs/components/status/Spin/types.js +1 -1
- package/cjs/components/status/index.js +2 -6
- 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 +2 -6
- package/cjs/index.js +2 -6
- 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 +2 -6
- package/cjs/stories/FormFieldArgs.js +1 -1
- package/cjs/stories/components/ConfirmDeletionDialogForm.js +3 -3
- package/cjs/stories/components/DialogFormApp.js +2 -2
- package/cjs/stories/components/StyledButton.js +2 -2
- package/cjs/stories/lists/baseProps.js +1 -1
- package/cjs/styled/index.js +2 -6
- package/cjs/styled/styled.js +5 -9
- package/cjs/tasty/index.js +2 -6
- 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 +2 -6
- 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 +5 -9
- 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 +23 -0
- package/cjs/test/render.js +49 -0
- package/cjs/test/setup.js +20 -0
- package/cjs/test/utils/index.js +22 -0
- package/cjs/test/utils/wait.js +16 -0
- 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 +2 -6
- package/cjs/utils/react/useViewportSize.js +1 -1
- package/cjs/utils/react/wrapNodeIfPlain.js +1 -1
- package/cjs/utils/transitions.js +1 -1
- package/cjs/utils/tree.js +1 -1
- package/cjs/utils/warnings.js +1 -1
- package/es/_internal/hooks/index.js +1 -1
- package/es/_internal/hooks/use-chained-callback.js +1 -1
- package/es/_internal/hooks/use-deprecation-warning.js +1 -1
- package/es/_internal/hooks/use-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 +7 -7
- package/es/_internal/hooks/use-timer/use-timer.js +1 -1
- 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/Submit.js +2 -2
- package/es/components/actions/Button/index.js +1 -1
- 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 +7 -7
- package/es/components/forms/Checkbox/CheckboxGroup.js +3 -3
- package/es/components/forms/Checkbox/context.js +1 -1
- package/es/components/forms/FieldWrapper.js +5 -5
- package/es/components/forms/FileInput/FileInput.js +3 -3
- package/es/components/forms/Form/Field.js +2 -2
- package/es/components/forms/Form/Form.js +2 -2
- package/es/components/forms/Form/SubmitError.js +2 -2
- 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 +1 -1
- package/es/components/forms/Form/validation.js +1 -1
- package/es/components/forms/Input/Input.js +2 -2
- package/es/components/forms/Input/index.js +1 -1
- package/es/components/forms/Label.js +4 -4
- package/es/components/forms/NumberInput/NumberInput.js +2 -2
- package/es/components/forms/NumberInput/StepButton.js +3 -3
- package/es/components/forms/PasswordInput/PasswordInput.js +3 -3
- package/es/components/forms/RadioGroup/Radio.js +6 -6
- package/es/components/forms/RadioGroup/RadioGroup.js +3 -3
- 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 +3 -3
- package/es/components/forms/Slider/SliderBase.js +4 -4
- 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 +4 -4
- package/es/components/forms/TextArea/TextArea.js +2 -2
- package/es/components/forms/TextInput/TextInput.js +2 -2
- package/es/components/forms/TextInput/TextInputBase.js +6 -6
- 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 +4 -4
- package/es/components/overlays/Dialog/DialogContainer.js +2 -2
- package/es/components/overlays/Dialog/DialogForm.js +3 -3
- package/es/components/overlays/Dialog/DialogTrigger.js +8 -8
- 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 +3 -3
- package/es/components/overlays/Modal/OpenTransition.js +2 -2
- package/es/components/overlays/Modal/Overlay.js +2 -2
- package/es/components/overlays/Modal/Popover.js +3 -3
- package/es/components/overlays/Modal/Tray.js +3 -3
- package/es/components/overlays/Modal/Underlay.js +2 -2
- package/es/components/overlays/Modal/index.js +1 -1
- package/es/components/overlays/Modal/types.js +1 -1
- package/es/components/overlays/NewNotifications/Bar/FloatingNotification.js +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 +8 -8
- package/es/components/pickers/Menu/Menu.js +4 -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 +9 -9
- 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 +1 -1
- 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/stories/FormFieldArgs.js +1 -1
- package/es/stories/components/ConfirmDeletionDialogForm.js +3 -3
- package/es/stories/components/DialogFormApp.js +2 -2
- package/es/stories/components/StyledButton.js +2 -2
- package/es/stories/lists/baseProps.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 +11 -0
- package/es/test/render.js +34 -0
- package/es/test/setup.js +18 -0
- package/es/test/utils/index.js +10 -0
- package/es/test/utils/wait.js +12 -0
- 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 +1 -1
- package/package.json +1 -2
- package/types/_internal/hooks/use-timer/use-timer.d.ts +1 -1
- package/types/components/actions/use-action.d.ts +1 -1
- package/types/components/content/Result/Result.d.ts +1 -1
- package/types/components/forms/FieldWrapper.d.ts +1 -1
- package/types/components/forms/Form/types.d.ts +4 -4
- package/types/components/forms/Form/useForm.d.ts +2 -2
- package/types/components/forms/Input/Input.d.ts +1 -1
- package/types/components/forms/Slider/Gradation.d.ts +1 -1
- package/types/components/forms/Slider/SliderTrack.d.ts +1 -1
- package/types/components/forms/TextInput/TextInput.d.ts +1 -1
- package/types/components/overlays/AlertDialog/types.d.ts +1 -1
- package/types/components/overlays/Dialog/DialogTrigger.d.ts +1 -1
- package/types/components/overlays/Modal/OpenTransition.d.ts +1 -1
- package/types/components/overlays/Modal/types.d.ts +2 -2
- package/types/components/overlays/NewNotifications/Bar/FloatingNotification.d.ts +1 -1
- package/types/components/overlays/NewNotifications/Bar/NotificationsBar.d.ts +1 -1
- package/types/components/overlays/NewNotifications/Bar/TransitionComponent.d.ts +1 -1
- package/types/components/overlays/NewNotifications/Dialog/NotificationsDialogTrigger.d.ts +2 -2
- package/types/components/overlays/NewNotifications/Notification.d.ts +1 -1
- package/types/components/overlays/NewNotifications/NotificationView/NotificationAction.d.ts +1 -1
- package/types/components/overlays/NewNotifications/NotificationView/NotificationCloseButton.d.ts +1 -1
- package/types/components/overlays/NewNotifications/NotificationView/NotificationDescription.d.ts +1 -1
- package/types/components/overlays/NewNotifications/NotificationView/NotificationHeader.d.ts +1 -1
- package/types/components/overlays/NewNotifications/NotificationView/types.d.ts +2 -2
- package/types/components/overlays/NewNotifications/NotificationsList/types.d.ts +4 -4
- package/types/components/overlays/NewNotifications/hooks/types.d.ts +3 -3
- package/types/components/overlays/NewNotifications/hooks/use-notification-list-item.d.ts +1 -1
- package/types/components/overlays/NewNotifications/hooks/use-notifications-list.d.ts +2 -2
- package/types/components/overlays/NewNotifications/types.d.ts +12 -12
- package/types/components/overlays/Toasts/Toast.d.ts +1 -1
- package/types/components/overlays/Toasts/types.d.ts +5 -5
- package/types/components/pickers/Menu/Menu.d.ts +2 -2
- package/types/components/pickers/Menu/MenuButton.d.ts +2 -2
- package/types/components/pickers/Menu/MenuSection.d.ts +1 -1
- package/types/components/pickers/Menu/MenuTrigger.d.ts +1 -1
- package/types/components/pickers/Menu/styled.d.ts +6 -6
- package/types/components/status/Spin/types.d.ts +4 -4
- package/types/provider.d.ts +1 -1
- package/types/shared/form.d.ts +6 -6
- package/types/shared/index.d.ts +3 -3
- package/types/stories/components/StyledButton.d.ts +3 -3
- package/types/styled/styled.d.ts +3 -3
- package/types/tasty/styles/predefined.d.ts +2 -2
- package/types/tasty/styles/types.d.ts +9 -9
- package/types/tasty/tasty.d.ts +4 -4
- package/types/tasty/types.d.ts +12 -12
- package/types/tasty/utils/styles.d.ts +19 -19
- package/types/test/index.d.ts +2 -0
- package/types/test/render.d.ts +64 -0
- package/types/test/setup.d.ts +3 -0
- package/types/test/utils/index.d.ts +1 -0
- package/types/test/utils/wait.d.ts +1 -0
- package/types/utils/react/mergeProps.d.ts +7 -2
- package/types/utils/react/nullableValue.d.ts +3 -3
package/types/shared/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * from './form';
|
|
2
|
-
export type Axis = 'top' | 'right' | 'bottom' | 'left';
|
|
3
|
-
export type PlacementAxis = Axis | 'center';
|
|
4
|
-
export type RangeValue<T> = [T, T];
|
|
2
|
+
export declare type Axis = 'top' | 'right' | 'bottom' | 'left';
|
|
3
|
+
export declare type PlacementAxis = Axis | 'center';
|
|
4
|
+
export declare type RangeValue<T> = [T, T];
|
|
@@ -56,13 +56,13 @@ export declare const StyledButton: import("react").ComponentType<{
|
|
|
56
56
|
hide?: import("../../tasty").ResponsiveStyleValue<boolean | undefined>;
|
|
57
57
|
shadow?: import("../../tasty").ResponsiveStyleValue<string | undefined>;
|
|
58
58
|
radius?: import("../../tasty").ResponsiveStyleValue<string | true | undefined>;
|
|
59
|
-
flow?: import("../../tasty").ResponsiveStyleValue<"initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "
|
|
59
|
+
flow?: import("../../tasty").ResponsiveStyleValue<"initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "unset" | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | "dense" | undefined>;
|
|
60
60
|
gridAreas?: import("../../tasty").ResponsiveStyleValue<import("csstype").Property.GridTemplateAreas | undefined>;
|
|
61
61
|
gridColumns?: import("../../tasty").ResponsiveStyleValue<import("csstype").Property.GridTemplateColumns<string | number> | undefined>;
|
|
62
62
|
gridRows?: import("../../tasty").ResponsiveStyleValue<import("csstype").Property.GridTemplateRows<string | number> | undefined>;
|
|
63
63
|
preset?: import("../../tasty").ResponsiveStyleValue<string | undefined>;
|
|
64
|
-
align?: import("../../tasty").ResponsiveStyleValue<"initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "
|
|
65
|
-
justify?: import("../../tasty").ResponsiveStyleValue<"right" | "left" | "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "
|
|
64
|
+
align?: import("../../tasty").ResponsiveStyleValue<"initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "unset" | "center" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start" | "baseline" | "normal" | "stretch" | "space-around" | "space-between" | "space-evenly" | undefined>;
|
|
65
|
+
justify?: import("../../tasty").ResponsiveStyleValue<"right" | "left" | "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "unset" | "center" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start" | "baseline" | "normal" | "stretch" | "space-around" | "space-between" | "space-evenly" | "legacy" | undefined>;
|
|
66
66
|
size?: "small" | (string & {}) | "medium" | "large" | undefined;
|
|
67
67
|
block?: boolean | undefined;
|
|
68
68
|
inline?: boolean | undefined;
|
package/types/styled/styled.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
import { Styles, StylesInterface } from '../tasty';
|
|
3
|
-
export type StyledProps<K extends (keyof StylesInterface)[], DefaultProps> = {
|
|
3
|
+
export declare type StyledProps<K extends (keyof StylesInterface)[], DefaultProps> = {
|
|
4
4
|
/** The name of the element. It can be used to override styles in context. */
|
|
5
5
|
name?: string;
|
|
6
6
|
/** The tag name of the element. */
|
|
@@ -13,14 +13,14 @@ export type StyledProps<K extends (keyof StylesInterface)[], DefaultProps> = {
|
|
|
13
13
|
/** The list of styles that can be provided by props */
|
|
14
14
|
styleProps?: K;
|
|
15
15
|
};
|
|
16
|
-
type StyledPropsWithDefaults<Props extends {
|
|
16
|
+
declare type StyledPropsWithDefaults<Props extends {
|
|
17
17
|
styles?: Styles;
|
|
18
18
|
}, DefaultProps extends Partial<Props>> = keyof DefaultProps extends never ? Props : {
|
|
19
19
|
[key in Extract<keyof Props, keyof DefaultProps>]?: Props[key];
|
|
20
20
|
} & {
|
|
21
21
|
[key in keyof Omit<Props, keyof DefaultProps>]: Props[key];
|
|
22
22
|
};
|
|
23
|
-
type EitherLegacyPropsOrInlined<K extends (keyof StylesInterface)[], DefaultProps> = ((Pick<StyledProps<K, DefaultProps>, 'name' | 'tag' | 'styles'> & {
|
|
23
|
+
declare type EitherLegacyPropsOrInlined<K extends (keyof StylesInterface)[], DefaultProps> = ((Pick<StyledProps<K, DefaultProps>, 'name' | 'tag' | 'styles'> & {
|
|
24
24
|
/**
|
|
25
25
|
* @deprecated
|
|
26
26
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RawStyleHandler, StyleHandler } from '../utils/styles';
|
|
2
|
-
type StyleHandlerMap = Record<string, StyleHandler[]>;
|
|
2
|
+
declare type StyleHandlerMap = Record<string, StyleHandler[]>;
|
|
3
3
|
export declare const STYLE_HANDLER_MAP: StyleHandlerMap;
|
|
4
4
|
export declare function defineCustomStyle(names: string[] | StyleHandler, handler?: RawStyleHandler): void;
|
|
5
|
-
type ConverterHandler = (s: string | boolean | number | undefined) => string | undefined;
|
|
5
|
+
declare type ConverterHandler = (s: string | boolean | number | undefined) => string | undefined;
|
|
6
6
|
export declare function defineStyleAlias(styleName: string, cssStyleName?: string, converter?: ConverterHandler): void;
|
|
7
7
|
export declare function predefine(): {
|
|
8
8
|
STYLE_HANDLER_MAP: StyleHandlerMap;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { ResponsiveStyleValue } from '../utils/styles';
|
|
3
|
-
type NamedColor = 'purple' | 'purple-text' | 'purple-01' | 'purple-02' | 'purple-03' | 'purple-04' | 'dark' | 'dark-01' | 'dark-02' | 'dark-03' | 'dark-04' | 'dark-05' | 'text' | 'primary' | 'disabled' | 'disabled-bg' | 'disabled-text' | 'danger' | 'danger-bg' | 'danger-text' | 'success' | 'success-bg' | 'success-text' | 'note' | 'note-bg' | 'note-text' | 'white' | 'light' | 'light-grey' | 'black' | 'pink' | 'pink-01' | 'pink-02' | 'border' | 'clear' | 'shadow' | 'draft' | 'minor';
|
|
4
|
-
type Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
5
|
-
type OpaquePercentage = '' | `.${Digit}` | `.${Digit}${Digit}` | '.100';
|
|
6
|
-
export type NoType = false | null | undefined;
|
|
3
|
+
declare type NamedColor = 'purple' | 'purple-text' | 'purple-01' | 'purple-02' | 'purple-03' | 'purple-04' | 'dark' | 'dark-01' | 'dark-02' | 'dark-03' | 'dark-04' | 'dark-05' | 'text' | 'primary' | 'disabled' | 'disabled-bg' | 'disabled-text' | 'danger' | 'danger-bg' | 'danger-text' | 'success' | 'success-bg' | 'success-text' | 'note' | 'note-bg' | 'note-text' | 'white' | 'light' | 'light-grey' | 'black' | 'pink' | 'pink-01' | 'pink-02' | 'border' | 'clear' | 'shadow' | 'draft' | 'minor';
|
|
4
|
+
declare type Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
5
|
+
declare type OpaquePercentage = '' | `.${Digit}` | `.${Digit}${Digit}` | '.100';
|
|
6
|
+
export declare type NoType = false | null | undefined;
|
|
7
7
|
export interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font' | 'outline' | 'type'> {
|
|
8
8
|
/** Set the background color of the element.
|
|
9
9
|
* ```
|
|
@@ -103,13 +103,13 @@ export interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' |
|
|
|
103
103
|
*/
|
|
104
104
|
justify?: CSSProperties['justifyItems'] | CSSProperties['justifyContent'];
|
|
105
105
|
}
|
|
106
|
-
export type SuffixForSelector = '&' | '.' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';
|
|
107
|
-
export type Selector = `${SuffixForSelector}${string}`;
|
|
108
|
-
export type NotSelector = Exclude<string, Selector | keyof StylesInterface>;
|
|
109
|
-
export type StylesWithoutSelectors = {
|
|
106
|
+
export declare type SuffixForSelector = '&' | '.' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';
|
|
107
|
+
export declare type Selector = `${SuffixForSelector}${string}`;
|
|
108
|
+
export declare type NotSelector = Exclude<string, Selector | keyof StylesInterface>;
|
|
109
|
+
export declare type StylesWithoutSelectors = {
|
|
110
110
|
[key in keyof StylesInterface]?: ResponsiveStyleValue<StylesInterface[key]>;
|
|
111
111
|
};
|
|
112
|
-
export type Styles = StylesWithoutSelectors & {
|
|
112
|
+
export declare type Styles = StylesWithoutSelectors & {
|
|
113
113
|
[key: string]: ResponsiveStyleValue<string | number | boolean | undefined> | StylesWithoutSelectors;
|
|
114
114
|
};
|
|
115
115
|
export {};
|
package/types/tasty/tasty.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { ComponentType } from 'react';
|
|
|
2
2
|
import { AllBaseProps, BaseProps, BaseStyleProps, Props } from './types';
|
|
3
3
|
import { Styles, StylesInterface } from './styles/types';
|
|
4
4
|
import { ResponsiveStyleValue } from './utils/styles';
|
|
5
|
-
type StyleList = readonly (keyof {
|
|
5
|
+
declare type StyleList = readonly (keyof {
|
|
6
6
|
[key in keyof StylesInterface]: StylesInterface[key];
|
|
7
7
|
})[];
|
|
8
|
-
export type TastyProps<K extends StyleList, DefaultProps = Props> = {
|
|
8
|
+
export declare type TastyProps<K extends StyleList, DefaultProps = Props> = {
|
|
9
9
|
/** The tag name of the element. */
|
|
10
10
|
as?: string;
|
|
11
11
|
/** Default styles of the element. */
|
|
@@ -17,10 +17,10 @@ export type TastyProps<K extends StyleList, DefaultProps = Props> = {
|
|
|
17
17
|
export interface GlobalTastyProps {
|
|
18
18
|
breakpoints?: number[];
|
|
19
19
|
}
|
|
20
|
-
export type AllBasePropsWithMods<K extends StyleList> = AllBaseProps & {
|
|
20
|
+
export declare type AllBasePropsWithMods<K extends StyleList> = AllBaseProps & {
|
|
21
21
|
[key in K[number]]?: ResponsiveStyleValue<StylesInterface[key]>;
|
|
22
22
|
} & BaseStyleProps;
|
|
23
|
-
type TastyPropsWithDefaults<Props extends {
|
|
23
|
+
declare type TastyPropsWithDefaults<Props extends {
|
|
24
24
|
styles?: Styles;
|
|
25
25
|
}, DefaultProps extends Partial<Props>> = keyof DefaultProps extends never ? Props : {
|
|
26
26
|
[key in Extract<keyof Props, keyof DefaultProps>]?: Props[key];
|
package/types/tasty/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { BASE_STYLES, BLOCK_STYLES, COLOR_STYLES, CONTAINER_STYLES, DIMENSION_ST
|
|
|
4
4
|
export interface GlobalStyledProps {
|
|
5
5
|
breakpoints?: number[];
|
|
6
6
|
}
|
|
7
|
-
type Caps = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';
|
|
7
|
+
declare type Caps = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';
|
|
8
8
|
export interface BasePropsWithoutChildren extends Pick<AllHTMLAttributes<HTMLElement>, 'className' | 'role' | 'id'> {
|
|
9
9
|
/** QA ID for e2e testing. An alias for `data-qa` attribute. */
|
|
10
10
|
qa?: string;
|
|
@@ -44,16 +44,16 @@ export interface BaseProps extends BasePropsWithoutChildren, Pick<AllHTMLAttribu
|
|
|
44
44
|
export interface AllBaseProps<K extends keyof HTMLElementTagNameMap = 'div'> extends BaseProps, Omit<AllHTMLAttributes<HTMLElementTagNameMap[K]>, 'style' | 'size' | 'disabled' | 'hidden' | 'css' | 'color' | 'height' | 'width'> {
|
|
45
45
|
as?: string;
|
|
46
46
|
}
|
|
47
|
-
export type BaseStyleProps = Pick<Styles, typeof BASE_STYLES[number]>;
|
|
48
|
-
export type PositionStyleProps = Pick<Styles, typeof POSITION_STYLES[number]>;
|
|
49
|
-
export type BlockStyleProps = Pick<Styles, typeof BLOCK_STYLES[number]>;
|
|
50
|
-
export type ColorStyleProps = Pick<Styles, typeof COLOR_STYLES[number]>;
|
|
51
|
-
export type TextStyleProps = Pick<Styles, typeof TEXT_STYLES[number]>;
|
|
52
|
-
export type DimensionStyleProps = Pick<Styles, typeof DIMENSION_STYLES[number]>;
|
|
53
|
-
export type FlowStyleProps = Pick<Styles, typeof FLOW_STYLES[number]>;
|
|
54
|
-
export type ContainerStyleProps = Pick<Styles, typeof CONTAINER_STYLES[number]>;
|
|
55
|
-
export type OuterStyleProps = Pick<Styles, typeof OUTER_STYLES[number]>;
|
|
56
|
-
export type ShortGridStyles = {
|
|
47
|
+
export declare type BaseStyleProps = Pick<Styles, typeof BASE_STYLES[number]>;
|
|
48
|
+
export declare type PositionStyleProps = Pick<Styles, typeof POSITION_STYLES[number]>;
|
|
49
|
+
export declare type BlockStyleProps = Pick<Styles, typeof BLOCK_STYLES[number]>;
|
|
50
|
+
export declare type ColorStyleProps = Pick<Styles, typeof COLOR_STYLES[number]>;
|
|
51
|
+
export declare type TextStyleProps = Pick<Styles, typeof TEXT_STYLES[number]>;
|
|
52
|
+
export declare type DimensionStyleProps = Pick<Styles, typeof DIMENSION_STYLES[number]>;
|
|
53
|
+
export declare type FlowStyleProps = Pick<Styles, typeof FLOW_STYLES[number]>;
|
|
54
|
+
export declare type ContainerStyleProps = Pick<Styles, typeof CONTAINER_STYLES[number]>;
|
|
55
|
+
export declare type OuterStyleProps = Pick<Styles, typeof OUTER_STYLES[number]>;
|
|
56
|
+
export declare type ShortGridStyles = {
|
|
57
57
|
template?: Styles['gridTemplate'];
|
|
58
58
|
columns?: Styles['gridColumns'];
|
|
59
59
|
rows?: Styles['gridRows'];
|
|
@@ -62,7 +62,7 @@ export type ShortGridStyles = {
|
|
|
62
62
|
export interface Props {
|
|
63
63
|
[key: string]: any;
|
|
64
64
|
}
|
|
65
|
-
export type TagName = keyof HTMLElementTagNameMap;
|
|
65
|
+
export declare type TagName = keyof HTMLElementTagNameMap;
|
|
66
66
|
export interface TagNameProps {
|
|
67
67
|
/** The tag name you want to use for the element */
|
|
68
68
|
as?: TagName;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Styles } from '../styles/types';
|
|
2
|
-
export type StyleValue<T = string> = T | boolean | number | null | undefined;
|
|
3
|
-
export type StyleValueStateMap<T = string> = {
|
|
2
|
+
export declare type StyleValue<T = string> = T | boolean | number | null | undefined;
|
|
3
|
+
export declare type StyleValueStateMap<T = string> = {
|
|
4
4
|
[key: string]: StyleValue<T>;
|
|
5
5
|
};
|
|
6
|
-
export type ResponsiveStyleValue<T = string> = StyleValue<T> | StyleValue<T>[] | StyleValueStateMap<T> | StyleValueStateMap<T>[];
|
|
7
|
-
export type ComputeModel = string | number;
|
|
8
|
-
export type CSSMap = {
|
|
6
|
+
export declare type ResponsiveStyleValue<T = string> = StyleValue<T> | StyleValue<T>[] | StyleValueStateMap<T> | StyleValueStateMap<T>[];
|
|
7
|
+
export declare type ComputeModel = string | number;
|
|
8
|
+
export declare type CSSMap = {
|
|
9
9
|
$?: string | string[];
|
|
10
10
|
} & {
|
|
11
11
|
[key: string]: string | string[];
|
|
12
12
|
};
|
|
13
|
-
export type StyleHandlerResult = CSSMap | CSSMap[] | void;
|
|
14
|
-
export type RawStyleHandler = (value: StyleValueStateMap, suffix?: string) => StyleHandlerResult;
|
|
15
|
-
export type StyleHandler = RawStyleHandler & {
|
|
13
|
+
export declare type StyleHandlerResult = CSSMap | CSSMap[] | void;
|
|
14
|
+
export declare type RawStyleHandler = (value: StyleValueStateMap, suffix?: string) => StyleHandlerResult;
|
|
15
|
+
export declare type StyleHandler = RawStyleHandler & {
|
|
16
16
|
__lookupStyles: string[];
|
|
17
17
|
};
|
|
18
18
|
export interface StyleStateData {
|
|
@@ -37,8 +37,8 @@ export interface ParsedColor {
|
|
|
37
37
|
name?: string;
|
|
38
38
|
opacity?: number;
|
|
39
39
|
}
|
|
40
|
-
export type StyleStateDataList = StyleStateData[];
|
|
41
|
-
export type StyleStateDataListMap = {
|
|
40
|
+
export declare type StyleStateDataList = StyleStateData[];
|
|
41
|
+
export declare type StyleStateDataListMap = {
|
|
42
42
|
[key: string]: StyleStateDataList;
|
|
43
43
|
};
|
|
44
44
|
/** An object that describes a relation between specific modifiers and style value. **/
|
|
@@ -58,23 +58,23 @@ export interface RenderedStyleState {
|
|
|
58
58
|
/** The value to apply */
|
|
59
59
|
value: string;
|
|
60
60
|
}
|
|
61
|
-
export type ComputeUnit = string | (string | string[])[];
|
|
62
|
-
export type StyleStateList = StyleState[];
|
|
63
|
-
export type RenderedStyleStateList = RenderedStyleState[];
|
|
64
|
-
export type StyleMap = {
|
|
61
|
+
export declare type ComputeUnit = string | (string | string[])[];
|
|
62
|
+
export declare type StyleStateList = StyleState[];
|
|
63
|
+
export declare type RenderedStyleStateList = RenderedStyleState[];
|
|
64
|
+
export declare type StyleMap = {
|
|
65
65
|
[key: string]: ResponsiveStyleValue;
|
|
66
66
|
};
|
|
67
|
-
export type StyleStateMap = {
|
|
67
|
+
export declare type StyleStateMap = {
|
|
68
68
|
[key: string]: StyleState;
|
|
69
69
|
};
|
|
70
|
-
export type RenderedStyleStateMap = {
|
|
70
|
+
export declare type RenderedStyleStateMap = {
|
|
71
71
|
[key: string]: RenderedStyleState;
|
|
72
72
|
};
|
|
73
|
-
export type StyleStateMapList = StyleStateMap[];
|
|
74
|
-
export type RenderedStyleStateMapList = {
|
|
73
|
+
export declare type StyleStateMapList = StyleStateMap[];
|
|
74
|
+
export declare type RenderedStyleStateMapList = {
|
|
75
75
|
[key: string]: RenderedStyleStateMap;
|
|
76
76
|
};
|
|
77
|
-
export type StyleStateListMap = {
|
|
77
|
+
export declare type StyleStateListMap = {
|
|
78
78
|
[key: string]: StyleStateList;
|
|
79
79
|
};
|
|
80
80
|
export declare const CUSTOM_UNITS: {
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RenderOptions } from '@testing-library/react';
|
|
3
|
+
import { CubeFormInstance, CubeFormProps } from '../components/forms';
|
|
4
|
+
export declare function renderWithRoot(ui: React.ReactElement, options?: Omit<RenderOptions, 'queries' | 'wrapper'>): import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement>;
|
|
5
|
+
export declare function renderWithForm(ui: React.ReactElement, options?: Omit<RenderOptions, 'queries' | 'wrapper'> & {
|
|
6
|
+
formProps?: Partial<Omit<CubeFormProps, 'form'>>;
|
|
7
|
+
}): {
|
|
8
|
+
readonly formInstance: CubeFormInstance<any, import("../components/forms/Form/useForm").CubeFormData<any>>;
|
|
9
|
+
readonly container: HTMLElement;
|
|
10
|
+
readonly baseElement: Element;
|
|
11
|
+
readonly debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format").PrettyFormatOptions | undefined) => void;
|
|
12
|
+
readonly rerender: (ui: React.ReactElement<any, string | React.JSXElementConstructor<any>>) => void;
|
|
13
|
+
readonly unmount: () => void;
|
|
14
|
+
readonly asFragment: () => DocumentFragment;
|
|
15
|
+
readonly getByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
16
|
+
readonly getAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
17
|
+
readonly queryByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
18
|
+
readonly queryAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
19
|
+
readonly findByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
20
|
+
readonly findAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
21
|
+
readonly getByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
22
|
+
readonly getAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
23
|
+
readonly queryByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
24
|
+
readonly queryAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
25
|
+
readonly findByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
26
|
+
readonly findAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
27
|
+
readonly getByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
28
|
+
readonly getAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
29
|
+
readonly queryByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
30
|
+
readonly queryAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
31
|
+
readonly findByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
32
|
+
readonly findAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
33
|
+
readonly getByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
34
|
+
readonly getAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
35
|
+
readonly queryByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
36
|
+
readonly queryAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
37
|
+
readonly findByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
38
|
+
readonly findAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
39
|
+
readonly getByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
40
|
+
readonly getAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
41
|
+
readonly queryByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
42
|
+
readonly queryAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
43
|
+
readonly findByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
44
|
+
readonly findAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
45
|
+
readonly getByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
46
|
+
readonly getAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
47
|
+
readonly queryByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
48
|
+
readonly queryAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
49
|
+
readonly findByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
50
|
+
readonly findAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
51
|
+
readonly getByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement;
|
|
52
|
+
readonly getAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement[];
|
|
53
|
+
readonly queryByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement | null;
|
|
54
|
+
readonly queryAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement[];
|
|
55
|
+
readonly findByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
56
|
+
readonly findAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
57
|
+
readonly getByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
58
|
+
readonly getAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
59
|
+
readonly queryByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
60
|
+
readonly queryAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
61
|
+
readonly findByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
62
|
+
readonly findAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
63
|
+
};
|
|
64
|
+
export * from '@testing-library/react';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './wait';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function wait(timeout?: number): Promise<void>;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Props } from '../../tasty';
|
|
2
|
-
type
|
|
2
|
+
declare type TupleTypes<T> = {
|
|
3
|
+
[P in keyof T]: T[P];
|
|
4
|
+
} extends {
|
|
5
|
+
[key: number]: infer V;
|
|
6
|
+
} ? V : never;
|
|
7
|
+
declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
3
8
|
/**
|
|
4
9
|
* Merges multiple props objects together. Event handlers are chained,
|
|
5
10
|
* classNames are combined, and ids are deduplicated - different ids
|
|
@@ -7,5 +12,5 @@ type Merge<T> = T extends [infer F, ...infer R] ? F extends undefined ? Merge<R>
|
|
|
7
12
|
* For all other props, the last prop object overrides all previous ones.
|
|
8
13
|
* @param args - Multiple sets of props to merge together.
|
|
9
14
|
*/
|
|
10
|
-
export declare function mergeProps<T extends (Props | undefined)[], K =
|
|
15
|
+
export declare function mergeProps<T extends (Props | undefined)[], K = UnionToIntersection<TupleTypes<T>>>(...args: T): K;
|
|
11
16
|
export {};
|
|
@@ -5,15 +5,15 @@ export declare function castNullableArrayValue<T>(props: T): T;
|
|
|
5
5
|
export declare function castNullableIsSelected<T>(props: T): T;
|
|
6
6
|
export declare function castNullableSelectedKey<T>(props: T): T;
|
|
7
7
|
export declare function castNullableField<T>(props: T, keys: string[], type?: string, cast?: (k: any) => any): T;
|
|
8
|
-
export type WithNullableValue<T extends Props> = Omit<T, 'value' | 'defaultValue'> & {
|
|
8
|
+
export declare type WithNullableValue<T extends Props> = Omit<T, 'value' | 'defaultValue'> & {
|
|
9
9
|
value?: T['value'] | any;
|
|
10
10
|
defaultValue?: T['defaultValue'] | any;
|
|
11
11
|
};
|
|
12
|
-
export type WithNullableSelected<T extends Props> = Omit<T, 'isSelected' | 'defaultSelected'> & {
|
|
12
|
+
export declare type WithNullableSelected<T extends Props> = Omit<T, 'isSelected' | 'defaultSelected'> & {
|
|
13
13
|
isSelected?: T['isSelected'] | any;
|
|
14
14
|
defaultSelected?: T['defaultSelected'] | any;
|
|
15
15
|
};
|
|
16
|
-
export type WithNullableSelectedKey<T extends Props> = Omit<T, 'selectedKey' | 'defaultSelectedKey'> & {
|
|
16
|
+
export declare type WithNullableSelectedKey<T extends Props> = Omit<T, 'selectedKey' | 'defaultSelectedKey'> & {
|
|
17
17
|
selectedKey?: T['selectedKey'] | any;
|
|
18
18
|
defaultSelectedKey?: T['defaultSelectedKey'] | any;
|
|
19
19
|
};
|