@cube-dev/ui-kit 0.16.3 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +4 -4
- package/cjs/_internal/hooks/index.js +6 -2
- package/cjs/_internal/hooks/use-chained-callback.js +1 -1
- package/cjs/_internal/hooks/use-deprecation-warning.js +6 -2
- 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 +6 -2
- 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 +6 -2
- package/cjs/components/Base.js +2 -2
- package/cjs/components/Block.js +2 -2
- package/cjs/components/GlobalStyles.js +1 -1
- package/cjs/components/GridProvider.js +7 -3
- package/cjs/components/HiddenInput.js +1 -1
- package/cjs/components/OpenTrasition.js +2 -2
- package/cjs/components/Root.js +2 -2
- package/cjs/components/actions/Action.js +2 -2
- package/cjs/components/actions/Button/Button.js +140 -155
- package/cjs/components/actions/Button/Submit.js +2 -2
- package/cjs/components/actions/Button/index.js +6 -2
- package/cjs/components/actions/ButtonGroup/ButtonGroup.js +2 -2
- package/cjs/components/actions/index.js +6 -2
- package/cjs/components/actions/use-action.js +1 -1
- package/cjs/components/content/ActiveZone/ActiveZone.js +2 -2
- package/cjs/components/content/Alert/Alert.js +2 -2
- package/cjs/components/content/Alert/index.js +6 -2
- package/cjs/components/content/Alert/types.js +1 -1
- package/cjs/components/content/Alert/use-alert.js +1 -1
- package/cjs/components/content/Avatar/Avatar.js +2 -2
- package/cjs/components/content/Badge/Badge.js +2 -2
- package/cjs/components/content/Card/Card.js +2 -2
- package/cjs/components/content/Content.js +2 -2
- package/cjs/components/content/CopySnippet/CopySnippet.js +4 -4
- package/cjs/components/content/CopySnippet/index.js +6 -2
- package/cjs/components/content/Divider.js +2 -2
- package/cjs/components/content/Footer.js +2 -2
- package/cjs/components/content/Header.js +2 -2
- package/cjs/components/content/Paragraph.js +2 -2
- package/cjs/components/content/Placeholder/Placeholder.js +2 -2
- package/cjs/components/content/PrismCode/PrismCode.js +2 -2
- package/cjs/components/content/Result/Result.js +3 -3
- package/cjs/components/content/Skeleton/Skeleton.js +12 -12
- package/cjs/components/content/Tag/Tag.js +3 -3
- package/cjs/components/content/Text.js +8 -8
- package/cjs/components/content/Title.js +4 -4
- package/cjs/components/forms/Checkbox/Checkbox.js +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 +6 -2
- 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 +5 -14
- 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 +6 -2
- 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 +6 -2
- package/cjs/components/layout/Flex.js +2 -2
- package/cjs/components/layout/Flow.js +2 -2
- package/cjs/components/layout/Grid.js +2 -2
- package/cjs/components/layout/Prefix.js +2 -2
- package/cjs/components/layout/Space.js +2 -2
- package/cjs/components/layout/Suffix.js +2 -2
- package/cjs/components/navigation/LegacyTabs/LegacyTabs.js +4 -4
- package/cjs/components/navigation/Link/Link.js +2 -2
- package/cjs/components/organisms/FileTabs/FileTabs.js +4 -4
- package/cjs/components/organisms/Modal/Modal.js +3 -3
- package/cjs/components/organisms/StatsCard/StatsCard.js +2 -2
- package/cjs/components/other/Base64Upload/Base64Upload.js +2 -2
- package/cjs/components/other/CloudLogo/CloudLogo.js +2 -2
- package/cjs/components/overlays/AlertDialog/AlertDialog.js +2 -2
- package/cjs/components/overlays/AlertDialog/AlertDialogApiProvider.js +2 -2
- package/cjs/components/overlays/AlertDialog/AlertDialogZone.js +2 -2
- package/cjs/components/overlays/AlertDialog/index.js +6 -2
- package/cjs/components/overlays/AlertDialog/types.js +1 -1
- package/cjs/components/overlays/Dialog/Dialog.js +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 +6 -2
- 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 +6 -2
- 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 +6 -2
- package/cjs/components/overlays/NewNotifications/Dialog/NotificationsDialogTrigger.js +3 -3
- package/cjs/components/overlays/NewNotifications/Dialog/index.js +6 -2
- package/cjs/components/overlays/NewNotifications/Notification.js +4 -4
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationAction.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationCloseButton.js +3 -3
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationDescription.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationFooter.js +7 -3
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationHeader.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationIcon.js +5 -5
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationProvider.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationView.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/index.js +6 -2
- package/cjs/components/overlays/NewNotifications/NotificationView/types.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationsContext/NotificationsProvider.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationsContext/index.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationsContext/use-notifications.js +1 -1
- package/cjs/components/overlays/NewNotifications/NotificationsList/NotificationsList.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationsList/NotificationsListItem.js +2 -2
- package/cjs/components/overlays/NewNotifications/NotificationsList/index.js +6 -2
- package/cjs/components/overlays/NewNotifications/NotificationsList/types.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/index.js +6 -2
- package/cjs/components/overlays/NewNotifications/hooks/types.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/use-notification-list-item.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/use-notifications-api.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/use-notifications-list.js +1 -1
- package/cjs/components/overlays/NewNotifications/hooks/use-notifications-observer.js +1 -1
- package/cjs/components/overlays/NewNotifications/index.js +6 -2
- package/cjs/components/overlays/NewNotifications/types.js +1 -1
- package/cjs/components/overlays/Notification/Notification.js +2 -2
- package/cjs/components/overlays/OverlayWrapper.js +3 -3
- package/cjs/components/overlays/Toasts/Toast.js +4 -4
- package/cjs/components/overlays/Toasts/index.js +6 -2
- package/cjs/components/overlays/Toasts/types.js +1 -1
- package/cjs/components/overlays/Toasts/use-toasts-api.js +1 -1
- package/cjs/components/overlays/Tooltip/Tooltip.js +2 -2
- package/cjs/components/overlays/Tooltip/TooltipProvider.js +2 -2
- package/cjs/components/overlays/Tooltip/TooltipTrigger.js +4 -4
- package/cjs/components/overlays/Tooltip/context.js +1 -1
- package/cjs/components/pickers/ComboBox/ComboBox.js +8 -8
- package/cjs/components/pickers/Menu/Menu.js +3 -3
- package/cjs/components/pickers/Menu/MenuButton.js +5 -5
- package/cjs/components/pickers/Menu/MenuItem.js +3 -3
- package/cjs/components/pickers/Menu/MenuSection.js +3 -3
- package/cjs/components/pickers/Menu/MenuTrigger.js +10 -6
- package/cjs/components/pickers/Menu/context.js +6 -2
- package/cjs/components/pickers/Menu/styled.js +1 -1
- package/cjs/components/pickers/Select/Select.js +10 -10
- package/cjs/components/portal/Portal.js +2 -2
- package/cjs/components/portal/PortalProvider.js +1 -1
- package/cjs/components/portal/index.js +6 -2
- package/cjs/components/portal/storybook/templates/CustomRoot.js +2 -2
- package/cjs/components/portal/storybook/templates/PortalOrder.js +2 -2
- package/cjs/components/portal/storybook/templates/basic.js +2 -2
- package/cjs/components/portal/storybook/templates/index.js +6 -2
- package/cjs/components/portal/types.js +1 -1
- package/cjs/components/portal/usePortal.js +1 -1
- package/cjs/components/status/LoadingAnimation/LoadingAnimation.js +3 -3
- package/cjs/components/status/LoadingAnimation/index.js +1 -1
- package/cjs/components/status/Spin/Cube.js +1 -1
- package/cjs/components/status/Spin/InternalSpinner.js +2 -2
- package/cjs/components/status/Spin/Spin.js +3 -3
- package/cjs/components/status/Spin/SpinsContainer.js +1 -1
- package/cjs/components/status/Spin/index.js +6 -2
- package/cjs/components/status/Spin/types.js +1 -1
- package/cjs/components/status/index.js +6 -2
- package/cjs/data/themes.js +1 -1
- package/cjs/icons/Attention.js +2 -2
- package/cjs/icons/Cross.js +2 -2
- package/cjs/icons/Danger.js +2 -2
- package/cjs/icons/Success.js +2 -2
- package/cjs/icons/index.js +6 -2
- package/cjs/index.js +6 -2
- package/cjs/provider.js +3 -3
- package/cjs/providers/StyleProvider.js +2 -2
- package/cjs/services/notification.js +2 -2
- package/cjs/shared/form.js +1 -1
- package/cjs/shared/index.js +6 -2
- package/cjs/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 +6 -2
- package/cjs/styled/styled.js +9 -5
- package/cjs/tasty/index.js +7 -3
- package/cjs/tasty/providers/BreakpointsProvider.js +2 -2
- package/cjs/tasty/styles/align.js +1 -1
- package/cjs/tasty/styles/border.js +1 -1
- package/cjs/tasty/styles/boxShadow.combinator.js +1 -1
- package/cjs/tasty/styles/color.js +1 -1
- package/cjs/tasty/styles/createStyle.js +1 -1
- package/cjs/tasty/styles/dimension.js +1 -1
- package/cjs/tasty/styles/display.js +1 -1
- package/cjs/tasty/styles/fill.js +1 -1
- package/cjs/tasty/styles/flow.js +1 -1
- package/cjs/tasty/styles/font.js +1 -1
- package/cjs/tasty/styles/fontStyle.js +1 -1
- package/cjs/tasty/styles/gap.js +1 -1
- package/cjs/tasty/styles/groupRadius.js +1 -1
- package/cjs/tasty/styles/height.js +1 -1
- package/cjs/tasty/styles/index.js +6 -2
- package/cjs/tasty/styles/justify.js +1 -1
- package/cjs/tasty/styles/list.js +1 -1
- package/cjs/tasty/styles/margin.js +1 -1
- package/cjs/tasty/styles/marginBlock.js +1 -1
- package/cjs/tasty/styles/marginInline.js +1 -1
- package/cjs/tasty/styles/outline.js +1 -1
- package/cjs/tasty/styles/padding.js +1 -1
- package/cjs/tasty/styles/paddingBlock.js +1 -1
- package/cjs/tasty/styles/paddingInline.js +1 -1
- package/cjs/tasty/styles/predefined.js +1 -1
- package/cjs/tasty/styles/preset.js +1 -1
- package/cjs/tasty/styles/radius.js +1 -1
- package/cjs/tasty/styles/reset.js +1 -1
- package/cjs/tasty/styles/shadow.js +1 -1
- package/cjs/tasty/styles/styledScrollbar.js +1 -1
- package/cjs/tasty/styles/transition.js +1 -1
- package/cjs/tasty/styles/types.js +1 -1
- package/cjs/tasty/styles/width.js +1 -1
- package/cjs/tasty/tasty.js +94 -55
- package/cjs/tasty/types.js +1 -1
- package/cjs/tasty/utils/cache-wrapper.js +35 -0
- package/cjs/tasty/utils/case-converter.js +16 -0
- 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 → getDisplayName.js} +1 -1
- package/cjs/tasty/utils/index.js +1 -1
- package/cjs/tasty/utils/mergeStyles.js +1 -1
- package/cjs/tasty/utils/modAttrs.js +6 -3
- package/cjs/tasty/utils/renderStyles.js +4 -4
- package/cjs/tasty/utils/responsive.js +1 -1
- package/cjs/tasty/utils/string.js +1 -1
- package/cjs/tasty/utils/styles.js +22 -31
- package/cjs/tasty/utils/warnings.js +1 -1
- package/cjs/tokens.js +1 -1
- package/cjs/type-checks.js +1 -1
- package/cjs/utils/ResizeSensor.js +1 -1
- package/cjs/utils/modules.js +1 -1
- package/cjs/utils/promise.js +1 -1
- package/cjs/utils/random.js +1 -1
- package/cjs/utils/range.js +1 -1
- package/cjs/utils/react/Slots.js +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 +4 -1
- package/cjs/utils/react/nullableValue.js +1 -1
- package/cjs/utils/react/useCombinedRefs.js +1 -1
- package/cjs/utils/react/useId.js +1 -1
- package/cjs/utils/react/useLayoutEffect.js +6 -2
- package/cjs/utils/react/useViewportSize.js +1 -1
- package/cjs/utils/react/wrapNodeIfPlain.js +1 -1
- package/cjs/utils/transitions.js +1 -1
- package/cjs/utils/tree.js +1 -1
- package/cjs/utils/warnings.js +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 +140 -155
- 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 +6 -15
- 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 +3 -3
- package/es/components/pickers/Menu/MenuButton.js +5 -5
- package/es/components/pickers/Menu/MenuItem.js +3 -3
- package/es/components/pickers/Menu/MenuSection.js +3 -3
- package/es/components/pickers/Menu/MenuTrigger.js +5 -5
- package/es/components/pickers/Menu/context.js +1 -1
- package/es/components/pickers/Menu/styled.js +1 -1
- package/es/components/pickers/Select/Select.js +10 -10
- 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 +2 -2
- 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 +88 -53
- package/es/tasty/types.js +1 -1
- package/es/tasty/utils/cache-wrapper.js +31 -0
- package/es/tasty/utils/case-converter.js +12 -0
- 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 → getDisplayName.js} +1 -1
- package/es/tasty/utils/index.js +1 -1
- package/es/tasty/utils/mergeStyles.js +1 -1
- package/es/tasty/utils/modAttrs.js +7 -3
- package/es/tasty/utils/renderStyles.js +4 -4
- package/es/tasty/utils/responsive.js +1 -1
- package/es/tasty/utils/string.js +1 -1
- package/es/tasty/utils/styles.js +18 -26
- package/es/tasty/utils/warnings.js +1 -1
- package/es/tokens.js +1 -1
- package/es/type-checks.js +1 -1
- package/es/utils/ResizeSensor.js +1 -1
- package/es/utils/modules.js +1 -1
- package/es/utils/promise.js +1 -1
- package/es/utils/random.js +1 -1
- package/es/utils/range.js +1 -1
- package/es/utils/react/Slots.js +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 +4 -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 +4 -3
- 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/Slider/elements.d.ts +7 -6
- 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 +10 -10
- 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/index.d.ts +1 -1
- package/types/tasty/styles/predefined.d.ts +2 -2
- package/types/tasty/styles/types.d.ts +9 -9
- package/types/tasty/tasty.d.ts +16 -12
- package/types/tasty/types.d.ts +12 -12
- package/types/tasty/utils/cache-wrapper.d.ts +4 -0
- package/types/tasty/utils/case-converter.d.ts +1 -0
- package/types/tasty/utils/modAttrs.d.ts +3 -1
- package/types/tasty/utils/renderStyles.d.ts +1 -1
- package/types/tasty/utils/styles.d.ts +19 -23
- package/types/utils/react/mergeProps.d.ts +2 -7
- package/types/utils/react/nullableValue.d.ts +3 -3
- package/cjs/test/index.js +0 -23
- package/cjs/test/render.js +0 -49
- package/cjs/test/setup.js +0 -20
- package/cjs/test/utils/index.js +0 -22
- package/cjs/test/utils/wait.js +0 -16
- package/es/test/index.js +0 -11
- package/es/test/render.js +0 -34
- package/es/test/setup.js +0 -18
- package/es/test/utils/index.js +0 -10
- package/es/test/utils/wait.js +0 -12
- package/types/test/index.d.ts +0 -2
- package/types/test/render.d.ts +0 -64
- package/types/test/setup.d.ts +0 -3
- package/types/test/utils/index.d.ts +0 -1
- package/types/test/utils/wait.d.ts +0 -1
- /package/types/tasty/utils/{get-display-name.d.ts → getDisplayName.d.ts} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Key, ReactChild, ReactElement, ReactFragment, ReactNode } from 'react';
|
|
2
2
|
import { NotificationAction, NotificationActionProps } from './NotificationView';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export type CubeNotificationType = 'success' | 'danger' | 'attention';
|
|
4
|
+
export type NotificationActionComponent = ReactElement<NotificationActionProps, typeof NotificationAction>;
|
|
5
|
+
type NotificationActionType = NotificationActionComponent | [NotificationActionComponent] | [NotificationActionComponent, NotificationActionComponent];
|
|
6
|
+
type NotificationActionCallbackArg = {
|
|
7
7
|
onClose: () => void;
|
|
8
8
|
onDismiss: () => void;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type BaseNotificationProps = {
|
|
11
11
|
/**
|
|
12
12
|
* @default 'attention'
|
|
13
13
|
*/
|
|
@@ -54,23 +54,23 @@ export declare type BaseNotificationProps = {
|
|
|
54
54
|
*/
|
|
55
55
|
actions?: ((arg: NotificationActionCallbackArg) => NotificationActionType) | NotificationActionType;
|
|
56
56
|
};
|
|
57
|
-
export
|
|
58
|
-
export
|
|
57
|
+
export type CubeNotificationProps = BaseNotificationProps;
|
|
58
|
+
export type CubeNotifyApiProps = {
|
|
59
59
|
meta?: CubeNotificationMeta;
|
|
60
60
|
} & CubeNotificationProps;
|
|
61
|
-
export
|
|
61
|
+
export type CubeNotifyApiPropsWithID = {
|
|
62
62
|
id: NonNullable<CubeNotificationProps['id']>;
|
|
63
63
|
} & CubeNotifyApiProps;
|
|
64
|
-
export
|
|
64
|
+
export type CubeNotificationsApiNotifyCallback = (props: CubeNotifyApiProps) => {
|
|
65
65
|
id: Key;
|
|
66
66
|
update: (props: Partial<CubeNotifyApiProps>) => void;
|
|
67
67
|
remove: () => void;
|
|
68
68
|
};
|
|
69
|
-
export
|
|
70
|
-
export
|
|
69
|
+
export type CubeNotificationsApiNotifyAction = CubeNotificationsApiNotifyCallback & Record<CubeNotificationType, CubeNotificationsApiNotifyCallback>;
|
|
70
|
+
export type CubeNotificationsApi = {
|
|
71
71
|
notify: CubeNotificationsApiNotifyAction;
|
|
72
72
|
update: (id: Key, props: Partial<CubeNotifyApiProps>) => void;
|
|
73
73
|
remove: (id: Key) => void;
|
|
74
74
|
};
|
|
75
|
-
export
|
|
75
|
+
export type CubeNotificationMeta = Record<string, unknown>;
|
|
76
76
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Key, ReactChild, ReactFragment, ReactNode } from 'react';
|
|
2
2
|
import type { CubeNotificationType, CubeNotifyApiProps } from '../NewNotifications';
|
|
3
|
-
export
|
|
3
|
+
export type CubeToastsApiProps = {
|
|
4
4
|
description: ReactChild | ReactFragment;
|
|
5
5
|
header?: ReactChild | ReactFragment;
|
|
6
6
|
id?: Key;
|
|
@@ -9,15 +9,15 @@ export declare type CubeToastsApiProps = {
|
|
|
9
9
|
icon?: ReactNode;
|
|
10
10
|
type?: CubeNotificationType;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type CubeToastsApi = {
|
|
13
13
|
toast: CubeToastsApiToastAction;
|
|
14
14
|
update: (id: Key, props: Partial<CubeToastsApiProps>) => void;
|
|
15
15
|
remove: (id: Key) => void;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type CubeToastsApiToastCallback = (props: CubeToastsApiProps | ReactChild | ReactFragment) => {
|
|
18
18
|
id: Key;
|
|
19
19
|
update: (props: Partial<CubeNotifyApiProps>) => void;
|
|
20
20
|
remove: () => void;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
23
|
-
export
|
|
22
|
+
export type CubeToastsApiToastShortcuts = Record<CubeNotificationType, CubeToastsApiToastCallback>;
|
|
23
|
+
export type CubeToastsApiToastAction = CubeToastsApiToastCallback & CubeToastsApiToastShortcuts;
|
|
@@ -10,8 +10,8 @@ export interface CubeMenuProps<T> extends ContainerStyleProps, AriaMenuProps<T>
|
|
|
10
10
|
styles?: Styles;
|
|
11
11
|
qa?: BaseProps['qa'];
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
type PartialMenuButton = Partial<MenuButtonProps>;
|
|
14
|
+
type ItemComponent = <T>(props: ItemProps<T> & PartialMenuButton & {
|
|
15
15
|
wrapper?: (item: ReactElement) => ReactElement;
|
|
16
16
|
}) => JSX.Element;
|
|
17
17
|
declare const Item: ItemComponent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { CubeButtonProps } from '../../actions';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type MenuSelectionType = 'checkbox' | 'radio';
|
|
4
|
+
export type MenuButtonProps = {
|
|
5
5
|
postfix: ReactNode;
|
|
6
6
|
selectionIcon?: MenuSelectionType;
|
|
7
7
|
isSelectable?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { MenuItemProps } from './MenuItem';
|
|
3
|
-
export
|
|
3
|
+
export type CubeMenuSectionProps<T> = MenuItemProps<T>;
|
|
4
4
|
/** @private */
|
|
5
5
|
export declare function MenuSection<T>(props: CubeMenuSectionProps<T>): JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { PositionProps } from '@react-types/overlays';
|
|
3
3
|
import { MenuTriggerProps as BaseTriggerProps } from '@react-types/menu';
|
|
4
|
-
export
|
|
4
|
+
export type CubeMenuTriggerProps = BaseTriggerProps & PositionProps & {
|
|
5
5
|
trigger?: string;
|
|
6
6
|
isDisabled?: boolean;
|
|
7
7
|
children: ReactNode[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledMenu:
|
|
3
|
-
export declare const StyledDivider:
|
|
2
|
+
export declare const StyledMenu: import("react").ComponentType<Omit<import("../../../tasty").Props, "variant"> & import("../../../tasty/tasty").WithVariant<import("../../../tasty/tasty").VariantMap>>;
|
|
3
|
+
export declare const StyledDivider: import("react").ComponentType<Omit<import("../../../tasty").Props, "variant"> & import("../../../tasty/tasty").WithVariant<import("../../../tasty/tasty").VariantMap>>;
|
|
4
4
|
export declare const StyledMenuHeader: import("react").ComponentType<{
|
|
5
5
|
children?: import("react").ReactNode;
|
|
6
6
|
ref?: import("react").Ref<unknown> | undefined;
|
|
@@ -54,13 +54,13 @@ export declare const StyledMenuHeader: import("react").ComponentType<{
|
|
|
54
54
|
hide?: import("../../../tasty").ResponsiveStyleValue<boolean | undefined>;
|
|
55
55
|
shadow?: import("../../../tasty").ResponsiveStyleValue<string | undefined>;
|
|
56
56
|
radius?: import("../../../tasty").ResponsiveStyleValue<string | true | undefined>;
|
|
57
|
-
flow?: import("../../../tasty").ResponsiveStyleValue<"initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "unset" | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | "dense" | undefined>;
|
|
57
|
+
flow?: import("../../../tasty").ResponsiveStyleValue<"initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | "dense" | undefined>;
|
|
58
58
|
gridAreas?: import("../../../tasty").ResponsiveStyleValue<import("csstype").Property.GridTemplateAreas | undefined>;
|
|
59
59
|
gridColumns?: import("../../../tasty").ResponsiveStyleValue<import("csstype").Property.GridTemplateColumns<string | number> | undefined>;
|
|
60
60
|
gridRows?: import("../../../tasty").ResponsiveStyleValue<import("csstype").Property.GridTemplateRows<string | number> | undefined>;
|
|
61
61
|
preset?: import("../../../tasty").ResponsiveStyleValue<string | undefined>;
|
|
62
|
-
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>;
|
|
63
|
-
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>;
|
|
62
|
+
align?: import("../../../tasty").ResponsiveStyleValue<"initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "center" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start" | "baseline" | "normal" | "stretch" | "space-around" | "space-between" | "space-evenly" | undefined>;
|
|
63
|
+
justify?: import("../../../tasty").ResponsiveStyleValue<"right" | "left" | "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "center" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start" | "baseline" | "normal" | "stretch" | "space-around" | "space-between" | "space-evenly" | "legacy" | undefined>;
|
|
64
64
|
block?: boolean | undefined;
|
|
65
65
|
inline?: boolean | undefined;
|
|
66
66
|
element?: `A${string}` | `B${string}` | `C${string}` | `D${string}` | `E${string}` | `F${string}` | `G${string}` | `H${string}` | `I${string}` | `J${string}` | `K${string}` | `L${string}` | `M${string}` | `N${string}` | `O${string}` | `P${string}` | `Q${string}` | `R${string}` | `S${string}` | `T${string}` | `U${string}` | `V${string}` | `W${string}` | `X${string}` | `Y${string}` | `Z${string}` | undefined;
|
|
@@ -78,8 +78,8 @@ export declare const StyledMenuHeader: import("react").ComponentType<{
|
|
|
78
78
|
theme?: (string & {}) | "danger" | "default" | "special" | undefined;
|
|
79
79
|
key?: import("react").Key | null | undefined;
|
|
80
80
|
} & {}>;
|
|
81
|
-
export declare const StyledMenuSection:
|
|
82
|
-
export declare const StyledMenuItem:
|
|
81
|
+
export declare const StyledMenuSection: import("react").ComponentType<Omit<import("../../../tasty").Props, "variant"> & import("../../../tasty/tasty").WithVariant<import("../../../tasty/tasty").VariantMap>>;
|
|
82
|
+
export declare const StyledMenuItem: import("react").ComponentType<Omit<import("../../../tasty").Props, "variant"> & import("../../../tasty/tasty").WithVariant<import("../../../tasty/tasty").VariantMap>>;
|
|
83
83
|
export declare const StyledMenuSectionHeading: import("react").ComponentType<{
|
|
84
84
|
children?: import("react").ReactNode;
|
|
85
85
|
ref?: import("react").Ref<unknown> | undefined;
|
|
@@ -133,13 +133,13 @@ export declare const StyledMenuSectionHeading: import("react").ComponentType<{
|
|
|
133
133
|
hide?: import("../../../tasty").ResponsiveStyleValue<boolean | undefined>;
|
|
134
134
|
shadow?: import("../../../tasty").ResponsiveStyleValue<string | undefined>;
|
|
135
135
|
radius?: import("../../../tasty").ResponsiveStyleValue<string | true | undefined>;
|
|
136
|
-
flow?: import("../../../tasty").ResponsiveStyleValue<"initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "unset" | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | "dense" | undefined>;
|
|
136
|
+
flow?: import("../../../tasty").ResponsiveStyleValue<"initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | "dense" | undefined>;
|
|
137
137
|
gridAreas?: import("../../../tasty").ResponsiveStyleValue<import("csstype").Property.GridTemplateAreas | undefined>;
|
|
138
138
|
gridColumns?: import("../../../tasty").ResponsiveStyleValue<import("csstype").Property.GridTemplateColumns<string | number> | undefined>;
|
|
139
139
|
gridRows?: import("../../../tasty").ResponsiveStyleValue<import("csstype").Property.GridTemplateRows<string | number> | undefined>;
|
|
140
140
|
preset?: import("../../../tasty").ResponsiveStyleValue<string | undefined>;
|
|
141
|
-
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>;
|
|
142
|
-
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>;
|
|
141
|
+
align?: import("../../../tasty").ResponsiveStyleValue<"initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "center" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start" | "baseline" | "normal" | "stretch" | "space-around" | "space-between" | "space-evenly" | undefined>;
|
|
142
|
+
justify?: import("../../../tasty").ResponsiveStyleValue<"right" | "left" | "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "center" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start" | "baseline" | "normal" | "stretch" | "space-around" | "space-between" | "space-evenly" | "legacy" | undefined>;
|
|
143
143
|
block?: boolean | undefined;
|
|
144
144
|
inline?: boolean | undefined;
|
|
145
145
|
element?: `A${string}` | `B${string}` | `C${string}` | `D${string}` | `E${string}` | `F${string}` | `G${string}` | `H${string}` | `I${string}` | `J${string}` | `K${string}` | `L${string}` | `M${string}` | `N${string}` | `O${string}` | `P${string}` | `Q${string}` | `R${string}` | `S${string}` | `T${string}` | `U${string}` | `V${string}` | `W${string}` | `X${string}` | `Y${string}` | `Z${string}` | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Styles } from '../../../tasty';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type SpinSize = 'small' | 'default' | 'large';
|
|
4
|
+
export type CubeSpinProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Size of the spin.
|
|
7
7
|
* @default 'default'
|
|
@@ -15,9 +15,9 @@ export declare type CubeSpinProps = {
|
|
|
15
15
|
children?: ReactNode;
|
|
16
16
|
styles?: Styles;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type SpinCubeProps = {
|
|
19
19
|
position: 'top' | 'right' | 'bottom';
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type InternalSpinnerProps = {
|
|
22
22
|
size: SpinSize;
|
|
23
23
|
};
|
package/types/provider.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface ProviderProps extends Props {
|
|
|
11
11
|
ref?: JSX.Element;
|
|
12
12
|
root?: ForwardedRef<any>;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type ProviderInsideProps = Omit<ProviderProps, 'styles' | 'breakpoints'>;
|
|
15
15
|
export declare const UIKitContext: import("react").Context<ProviderInsideProps>;
|
|
16
16
|
export declare function Provider(allProps: PropsWithChildren<ProviderProps>): JSX.Element;
|
|
17
17
|
export declare function useProviderProps<T extends Props = Props>(props: T): T;
|
package/types/shared/form.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Props, Styles } from '../tasty';
|
|
3
3
|
/** Where to place label relative to input */
|
|
4
|
-
export
|
|
4
|
+
export type LabelPosition = 'side' | 'top';
|
|
5
5
|
/** The type of necessity indicator */
|
|
6
|
-
export
|
|
6
|
+
export type NecessityIndicator = 'icon' | 'label';
|
|
7
7
|
/** The validation state of the field */
|
|
8
|
-
export
|
|
8
|
+
export type ValidationState = 'invalid' | 'valid';
|
|
9
9
|
/** On which event perform the validation for the field */
|
|
10
|
-
export
|
|
10
|
+
export type ValidateTrigger = 'onBlur' | 'onChange' | 'onSubmit';
|
|
11
11
|
export interface OptionalFieldBaseProps {
|
|
12
12
|
/** The label of the field */
|
|
13
13
|
label?: string;
|
|
@@ -63,12 +63,12 @@ export interface FormFieldProps extends FormBaseProps {
|
|
|
63
63
|
/** Whether the element should receive focus on render */
|
|
64
64
|
autoFocus?: boolean;
|
|
65
65
|
}
|
|
66
|
-
export
|
|
66
|
+
export type ValidationRuleBase = {
|
|
67
67
|
[key: string]: any;
|
|
68
68
|
} & {
|
|
69
69
|
required?: boolean;
|
|
70
70
|
message?: string;
|
|
71
71
|
};
|
|
72
|
-
export
|
|
72
|
+
export type ValidationRule = ValidationRuleBase & {
|
|
73
73
|
validator?: (ValidationRule: any, any: any) => Promise<string | void>;
|
|
74
74
|
};
|
package/types/shared/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * from './form';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type Axis = 'top' | 'right' | 'bottom' | 'left';
|
|
3
|
+
export type PlacementAxis = Axis | 'center';
|
|
4
|
+
export 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" | "unset" | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | "dense" | undefined>;
|
|
59
|
+
flow?: import("../../tasty").ResponsiveStyleValue<"initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "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" | "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>;
|
|
64
|
+
align?: import("../../tasty").ResponsiveStyleValue<"initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "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" | "revert-layer" | "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
|
|
3
|
+
export 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 declare type StyledProps<K extends (keyof StylesInterface)[], DefaultProp
|
|
|
13
13
|
/** The list of styles that can be provided by props */
|
|
14
14
|
styleProps?: K;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
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
|
-
|
|
23
|
+
type EitherLegacyPropsOrInlined<K extends (keyof StylesInterface)[], DefaultProps> = ((Pick<StyledProps<K, DefaultProps>, 'name' | 'tag' | 'styles'> & {
|
|
24
24
|
/**
|
|
25
25
|
* @deprecated
|
|
26
26
|
*/
|
package/types/tasty/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export * from './styles/list';
|
|
|
10
10
|
export * from './providers/BreakpointsProvider';
|
|
11
11
|
export * from './utils/mergeStyles';
|
|
12
12
|
export * from './utils/warnings';
|
|
13
|
-
export * from './utils/
|
|
13
|
+
export * from './utils/getDisplayName';
|
|
14
14
|
export type { TastyProps, GlobalTastyProps, AllBasePropsWithMods, } from './tasty';
|
|
15
15
|
export type { AllBaseProps, BaseProps, BaseStyleProps, DimensionStyleProps, ColorStyleProps, OuterStyleProps, PositionStyleProps, TextStyleProps, BlockStyleProps, ContainerStyleProps, BasePropsWithoutChildren, Props, FlowStyleProps, ShortGridStyles, GlobalStyledProps, TagNameProps, TagName, } from './types';
|
|
16
16
|
export type { StylesInterface, Styles, StylesWithoutSelectors, NoType, Selector, SuffixForSelector, NotSelector, } from './styles/types';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RawStyleHandler, StyleHandler } from '../utils/styles';
|
|
2
|
-
|
|
2
|
+
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
|
-
|
|
5
|
+
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
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;
|
|
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
|
|
107
|
-
export
|
|
108
|
-
export
|
|
109
|
-
export
|
|
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 = {
|
|
110
110
|
[key in keyof StylesInterface]?: ResponsiveStyleValue<StylesInterface[key]>;
|
|
111
111
|
};
|
|
112
|
-
export
|
|
112
|
+
export 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,17 @@ 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
|
-
|
|
5
|
+
type StyleList = readonly (keyof {
|
|
6
6
|
[key in keyof StylesInterface]: StylesInterface[key];
|
|
7
7
|
})[];
|
|
8
|
-
export
|
|
8
|
+
export type PropsWithStyles = {
|
|
9
|
+
styles?: Styles;
|
|
10
|
+
} & Omit<Props, 'styles'>;
|
|
11
|
+
export type VariantMap = Record<string, Styles>;
|
|
12
|
+
export type WithVariant<V extends VariantMap> = {
|
|
13
|
+
variant?: keyof V;
|
|
14
|
+
};
|
|
15
|
+
export type TastyProps<K extends StyleList, V extends VariantMap, DefaultProps = Props> = {
|
|
9
16
|
/** The tag name of the element. */
|
|
10
17
|
as?: string;
|
|
11
18
|
/** Default styles of the element. */
|
|
@@ -13,24 +20,21 @@ export declare type TastyProps<K extends StyleList, DefaultProps = Props> = {
|
|
|
13
20
|
/** The list of styles that can be provided by props */
|
|
14
21
|
styleProps?: K;
|
|
15
22
|
element?: BaseProps['element'];
|
|
16
|
-
|
|
23
|
+
variants?: V;
|
|
24
|
+
} & Partial<Omit<DefaultProps, 'as' | 'styles' | 'styleProps'>> & Pick<BaseProps, 'qa' | 'qaVal'> & WithVariant<V>;
|
|
17
25
|
export interface GlobalTastyProps {
|
|
18
26
|
breakpoints?: number[];
|
|
19
27
|
}
|
|
20
|
-
export
|
|
28
|
+
export type AllBasePropsWithMods<K extends StyleList> = AllBaseProps & {
|
|
21
29
|
[key in K[number]]?: ResponsiveStyleValue<StylesInterface[key]>;
|
|
22
30
|
} & BaseStyleProps;
|
|
23
|
-
|
|
24
|
-
styles?: Styles;
|
|
25
|
-
}, DefaultProps extends Partial<Props>> = keyof DefaultProps extends never ? Props : {
|
|
31
|
+
type TastyComponentPropsWithDefaults<Props extends PropsWithStyles, DefaultProps extends Partial<Props>> = keyof DefaultProps extends never ? Props : {
|
|
26
32
|
[key in Extract<keyof Props, keyof DefaultProps>]?: Props[key];
|
|
27
33
|
} & {
|
|
28
34
|
[key in keyof Omit<Props, keyof DefaultProps>]: Props[key];
|
|
29
35
|
};
|
|
30
|
-
declare function tasty<K extends StyleList>(options: TastyProps<K>, secondArg?: never):
|
|
36
|
+
declare function tasty<K extends StyleList, V extends VariantMap>(options: TastyProps<K, V>, secondArg?: never): ComponentType<Omit<Props, 'variant'> & WithVariant<V>>;
|
|
31
37
|
declare function tasty(selector: string, styles?: Styles): any;
|
|
32
|
-
declare function tasty<Props extends
|
|
33
|
-
|
|
34
|
-
}, DefaultProps extends Partial<Props> = Partial<Props>>(Component: ComponentType<Props>, options?: TastyProps<never, Props>): ComponentType<TastyPropsWithDefaults<Props, DefaultProps>>;
|
|
35
|
-
declare const Element: any;
|
|
38
|
+
declare function tasty<Props extends PropsWithStyles, DefaultProps extends Partial<Props> = Partial<Props>>(Component: ComponentType<Props>, options?: TastyProps<never, never, Props>): ComponentType<TastyComponentPropsWithDefaults<Props, DefaultProps>>;
|
|
39
|
+
declare const Element: ComponentType<Omit<Props, "variant"> & WithVariant<VariantMap>>;
|
|
36
40
|
export { tasty, Element };
|
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
|
-
|
|
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';
|
|
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
|
|
48
|
-
export
|
|
49
|
-
export
|
|
50
|
-
export
|
|
51
|
-
export
|
|
52
|
-
export
|
|
53
|
-
export
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
export
|
|
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 = {
|
|
57
57
|
template?: Styles['gridTemplate'];
|
|
58
58
|
columns?: Styles['gridColumns'];
|
|
59
59
|
rows?: Styles['gridRows'];
|
|
@@ -62,7 +62,7 @@ export declare type ShortGridStyles = {
|
|
|
62
62
|
export interface Props {
|
|
63
63
|
[key: string]: any;
|
|
64
64
|
}
|
|
65
|
-
export
|
|
65
|
+
export 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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function camelToKebab(str: string): string;
|
|
@@ -2,4 +2,6 @@
|
|
|
2
2
|
* Generate data DOM attributes from modifier map.
|
|
3
3
|
*/
|
|
4
4
|
import { AllBaseProps } from '../types';
|
|
5
|
-
|
|
5
|
+
declare function modAttrs(map: AllBaseProps['mods']): Record<string, string> | null;
|
|
6
|
+
declare const _modAttrs: typeof modAttrs;
|
|
7
|
+
export { _modAttrs as modAttrs };
|
|
@@ -7,4 +7,4 @@ export declare function isSelector(key: any): any;
|
|
|
7
7
|
* @param {string} [suffix]
|
|
8
8
|
* @return {string}
|
|
9
9
|
*/
|
|
10
|
-
export declare function renderStyles(styles
|
|
10
|
+
export declare function renderStyles(styles?: Styles, responsive?: number[], suffix?: string): any;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Styles } from '../styles/types';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type StyleValue<T = string> = T | boolean | number | null | undefined;
|
|
3
|
+
export type StyleValueStateMap<T = string> = {
|
|
4
4
|
[key: string]: StyleValue<T>;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
6
|
+
export type ResponsiveStyleValue<T = string> = StyleValue<T> | StyleValue<T>[] | StyleValueStateMap<T> | StyleValueStateMap<T>[];
|
|
7
|
+
export type ComputeModel = string | number;
|
|
8
|
+
export type CSSMap = {
|
|
9
9
|
$?: string | string[];
|
|
10
10
|
} & {
|
|
11
11
|
[key: string]: string | string[];
|
|
12
12
|
};
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
13
|
+
export type StyleHandlerResult = CSSMap | CSSMap[] | void;
|
|
14
|
+
export type RawStyleHandler = (value: StyleValueStateMap, suffix?: string) => StyleHandlerResult;
|
|
15
|
+
export 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
|
|
41
|
-
export
|
|
40
|
+
export type StyleStateDataList = StyleStateData[];
|
|
41
|
+
export 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
|
|
62
|
-
export
|
|
63
|
-
export
|
|
64
|
-
export
|
|
61
|
+
export type ComputeUnit = string | (string | string[])[];
|
|
62
|
+
export type StyleStateList = StyleState[];
|
|
63
|
+
export type RenderedStyleStateList = RenderedStyleState[];
|
|
64
|
+
export type StyleMap = {
|
|
65
65
|
[key: string]: ResponsiveStyleValue;
|
|
66
66
|
};
|
|
67
|
-
export
|
|
67
|
+
export type StyleStateMap = {
|
|
68
68
|
[key: string]: StyleState;
|
|
69
69
|
};
|
|
70
|
-
export
|
|
70
|
+
export type RenderedStyleStateMap = {
|
|
71
71
|
[key: string]: RenderedStyleState;
|
|
72
72
|
};
|
|
73
|
-
export
|
|
74
|
-
export
|
|
73
|
+
export type StyleStateMapList = StyleStateMap[];
|
|
74
|
+
export type RenderedStyleStateMapList = {
|
|
75
75
|
[key: string]: RenderedStyleStateMap;
|
|
76
76
|
};
|
|
77
|
-
export
|
|
77
|
+
export type StyleStateListMap = {
|
|
78
78
|
[key: string]: StyleStateList;
|
|
79
79
|
};
|
|
80
80
|
export declare const CUSTOM_UNITS: {
|
|
@@ -189,8 +189,4 @@ export declare const COMPUTE_FUNC_MAP: {
|
|
|
189
189
|
export declare function computeState(computeModel: ComputeModel, valueMap: (number | boolean)[] | {
|
|
190
190
|
[key: string]: boolean;
|
|
191
191
|
} | Function): any;
|
|
192
|
-
/**
|
|
193
|
-
* Create a function that caches the result up to the limit.
|
|
194
|
-
*/
|
|
195
|
-
export declare function cacheWrapper<T extends (firstArg: any, secondArg?: string) => any>(handler: T, limit?: number): T;
|
|
196
192
|
export {};
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { Props } from '../../tasty';
|
|
2
|
-
|
|
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;
|
|
2
|
+
type Merge<T> = T extends [infer F, ...infer R] ? F extends undefined ? Merge<R> : F & Merge<R> : T extends [infer L] ? L : unknown;
|
|
8
3
|
/**
|
|
9
4
|
* Merges multiple props objects together. Event handlers are chained,
|
|
10
5
|
* classNames are combined, and ids are deduplicated - different ids
|
|
@@ -12,5 +7,5 @@ declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) e
|
|
|
12
7
|
* For all other props, the last prop object overrides all previous ones.
|
|
13
8
|
* @param args - Multiple sets of props to merge together.
|
|
14
9
|
*/
|
|
15
|
-
export declare function mergeProps<T extends (Props | undefined)[], K =
|
|
10
|
+
export declare function mergeProps<T extends (Props | undefined)[], K = Merge<T>>(...args: T): K;
|
|
16
11
|
export {};
|