@cube-dev/ui-kit 0.56.3 → 0.58.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 +30 -0
- package/es/_internal/hooks/index.js +1 -1
- package/es/_internal/hooks/use-chained-callback.js +1 -1
- package/es/_internal/hooks/use-debounced-value.js +1 -1
- package/es/_internal/hooks/use-deprecation-warning.js +1 -1
- package/es/_internal/hooks/use-effect-once.js +1 -1
- package/es/_internal/hooks/use-event.js +1 -1
- package/es/_internal/hooks/use-is-first-render.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 -4
- package/es/_internal/hooks/use-timer/use-timer.js +1 -1
- package/es/_internal/hooks/use-update-effect.js +1 -1
- package/es/_internal/hooks/use-warn.js +1 -1
- package/es/_internal/index.js +1 -1
- package/es/components/Block.js +1 -1
- package/es/components/GlobalStyles.js +1 -1
- package/es/components/GridProvider.js +1 -1
- package/es/components/HiddenInput.js +1 -1
- package/es/components/OpenTrasition.js +1 -1
- package/es/components/Root.js +1 -1
- package/es/components/actions/Action/Action.js +1 -1
- package/es/components/actions/Button/Button.js +1 -1
- package/es/components/actions/Button/index.js +1 -1
- package/es/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/es/components/actions/index.js +1 -1
- package/es/components/actions/use-action.js +1 -1
- package/es/components/content/ActiveZone/ActiveZone.js +2 -1
- package/es/components/content/Alert/Alert.js +1 -1
- package/es/components/content/Alert/index.js +1 -1
- package/es/components/content/Alert/types.js +1 -1
- package/es/components/content/Alert/use-alert.js +1 -1
- package/es/components/content/Avatar/Avatar.js +1 -1
- package/es/components/content/Badge/Badge.js +1 -1
- package/es/components/content/Card/Card.js +1 -1
- package/es/components/content/Content.js +1 -1
- package/es/components/content/CopyPasteBlock/CopyPasteBlock.js +2 -1
- package/es/components/content/CopyPasteBlock/index.js +1 -1
- package/es/components/content/CopySnippet/CopySnippet.js +2 -1
- package/es/components/content/CopySnippet/index.js +1 -1
- package/es/components/content/Divider.js +1 -1
- package/es/components/content/Footer.js +1 -1
- package/es/components/content/Header.js +2 -1
- package/es/components/content/Paragraph.js +1 -1
- package/es/components/content/Placeholder/Placeholder.js +1 -1
- package/es/components/content/PrismCode/PrismCode.js +2 -1
- package/es/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/es/components/content/Result/Result.js +2 -1
- package/es/components/content/Skeleton/Skeleton.js +1 -1
- package/es/components/content/Tag/Tag.js +2 -1
- package/es/components/content/Text.js +2 -1
- package/es/components/content/Title.js +4 -3
- package/es/components/fields/Checkbox/Checkbox.js +2 -1
- package/es/components/fields/Checkbox/CheckboxGroup.js +2 -1
- package/es/components/fields/Checkbox/context.js +1 -1
- package/es/components/fields/Checkbox/index.js +1 -1
- package/es/components/fields/ComboBox/ComboBox.js +50 -14
- package/es/components/fields/ComboBox/index.js +1 -1
- package/es/components/fields/DatePicker/DateInput.js +2 -1
- package/es/components/fields/DatePicker/DateInputBase.js +2 -1
- package/es/components/fields/DatePicker/DatePicker.js +2 -1
- package/es/components/fields/DatePicker/DatePickerButton.js +1 -1
- package/es/components/fields/DatePicker/DatePickerElement.js +1 -1
- package/es/components/fields/DatePicker/DatePickerInput.js +1 -1
- package/es/components/fields/DatePicker/DatePickerSegment.js +1 -1
- package/es/components/fields/DatePicker/DateRangePicker.js +2 -1
- package/es/components/fields/DatePicker/DateRangeSeparatedPicker.js +2 -1
- package/es/components/fields/DatePicker/TimeInput.js +2 -1
- package/es/components/fields/DatePicker/index.js +1 -1
- package/es/components/fields/DatePicker/intl.js +1 -1
- package/es/components/fields/DatePicker/parseDate.js +1 -1
- package/es/components/fields/DatePicker/props.js +1 -1
- package/es/components/fields/DatePicker/types.js +1 -1
- package/es/components/fields/DatePicker/utils.js +1 -1
- package/es/components/fields/FileInput/FileInput.js +2 -1
- package/es/components/fields/Input/Input.js +1 -1
- package/es/components/fields/Input/index.js +1 -1
- package/es/components/fields/NumberInput/NumberInput.js +2 -1
- package/es/components/fields/NumberInput/StepButton.js +1 -1
- package/es/components/fields/PasswordInput/PasswordInput.js +2 -1
- package/es/components/fields/RadioGroup/Radio.js +3 -1
- package/es/components/fields/RadioGroup/RadioGroup.js +2 -1
- package/es/components/fields/RadioGroup/context.js +1 -1
- package/es/components/fields/RadioGroup/index.js +1 -1
- package/es/components/fields/SearchInput/SearchInput.js +1 -1
- package/es/components/fields/SearchInput/index.js +1 -1
- package/es/components/fields/Select/Select.js +2 -1
- package/es/components/fields/Select/index.js +1 -1
- package/es/components/fields/Slider/Gradation.js +1 -1
- package/es/components/fields/Slider/Header.js +1 -1
- package/es/components/fields/Slider/RangeSlider.js +2 -1
- package/es/components/fields/Slider/Slider.js +2 -1
- package/es/components/fields/Slider/SliderBase.js +2 -1
- package/es/components/fields/Slider/SliderInput.js +1 -1
- package/es/components/fields/Slider/SliderThumb.js +1 -1
- package/es/components/fields/Slider/SliderTrack.js +1 -1
- package/es/components/fields/Slider/elements.js +1 -1
- package/es/components/fields/Slider/index.js +1 -1
- package/es/components/fields/Slider/types.js +1 -1
- package/es/components/fields/Switch/Switch.js +2 -1
- package/es/components/fields/Switch/index.js +1 -1
- package/es/components/fields/TextArea/TextArea.js +2 -1
- package/es/components/fields/TextArea/index.js +1 -1
- package/es/components/fields/TextInput/TextInput.js +1 -1
- package/es/components/fields/TextInput/TextInputBase.js +5 -5
- package/es/components/fields/TextInput/index.js +1 -1
- package/es/components/fields/TextInputMapper/TextInputMapper.js +30 -8
- package/es/components/fields/TextInputMapper/index.js +1 -1
- package/es/components/fields/index.js +1 -1
- package/es/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/es/components/form/FieldWrapper/extract-field-wrapper-props.js +1 -1
- package/es/components/form/FieldWrapper/index.js +1 -1
- package/es/components/form/FieldWrapper/types.js +1 -1
- package/es/components/form/Form/Field.js +17 -6
- package/es/components/form/Form/Form.js +2 -1
- package/es/components/form/Form/ResetButton/ResetButton.js +2 -1
- package/es/components/form/Form/ResetButton/index.js +1 -1
- package/es/components/form/Form/SubmitButton/SubmitButton.js +2 -1
- package/es/components/form/Form/SubmitButton/index.js +1 -1
- package/es/components/form/Form/SubmitError.js +2 -1
- package/es/components/form/Form/index.js +1 -1
- package/es/components/form/Form/types.js +1 -1
- package/es/components/form/Form/use-field/index.js +1 -1
- package/es/components/form/Form/use-field/types.js +1 -1
- package/es/components/form/Form/use-field/use-field-props.js +14 -7
- package/es/components/form/Form/use-field/use-field.js +6 -6
- package/es/components/form/Form/use-form.js +55 -67
- package/es/components/form/Form/validation.js +1 -1
- package/es/components/form/Label.js +2 -1
- package/es/components/form/index.js +1 -1
- package/es/components/form/wrapper.js +1 -1
- package/es/components/layout/Flex.js +1 -1
- package/es/components/layout/Flow.js +1 -1
- package/es/components/layout/Grid.js +1 -1
- package/es/components/layout/Panel.js +1 -1
- package/es/components/layout/Prefix.js +1 -1
- package/es/components/layout/ResizablePanel.js +1 -1
- package/es/components/layout/Space.js +1 -1
- package/es/components/layout/Suffix.js +1 -1
- package/es/components/navigation/LegacyTabs/LegacyTabs.js +1 -1
- package/es/components/navigation/Link/Link.js +1 -1
- package/es/components/organisms/FileTabs/FileTabs.js +1 -1
- package/es/components/organisms/Modal/Modal.js +1 -1
- package/es/components/organisms/StatsCard/StatsCard.js +1 -1
- package/es/components/other/Base64Upload/Base64Upload.js +1 -1
- package/es/components/other/Calendar/Calendar.js +2 -1
- package/es/components/other/Calendar/CalendarCell.js +1 -1
- package/es/components/other/Calendar/CalendarGrid.js +1 -1
- package/es/components/other/Calendar/RangeCalendar.js +2 -1
- package/es/components/other/CloudLogo/CloudLogo.js +2 -1
- package/es/components/overlays/AlertDialog/AlertDialog.js +2 -1
- package/es/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/es/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
- package/es/components/overlays/AlertDialog/index.js +1 -1
- package/es/components/overlays/AlertDialog/types.js +1 -1
- package/es/components/overlays/Dialog/Dialog.js +22 -15
- package/es/components/overlays/Dialog/DialogContainer.js +4 -4
- package/es/components/overlays/Dialog/DialogForm.js +1 -1
- package/es/components/overlays/Dialog/DialogTrigger.js +13 -15
- package/es/components/overlays/Dialog/context.js +1 -1
- package/es/components/overlays/Dialog/dialog-container.js +1 -1
- package/es/components/overlays/Dialog/index.js +1 -1
- package/es/components/overlays/Modal/Modal.js +2 -1
- package/es/components/overlays/Modal/OpenTransition.js +1 -1
- package/es/components/overlays/Modal/Overlay.js +2 -1
- package/es/components/overlays/Modal/Popover.js +3 -2
- package/es/components/overlays/Modal/Tray.js +2 -1
- package/es/components/overlays/Modal/Underlay.js +2 -1
- 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 +1 -1
- package/es/components/overlays/NewNotifications/Bar/NotificationsBar.js +1 -1
- package/es/components/overlays/NewNotifications/Bar/TransitionComponent.js +1 -1
- package/es/components/overlays/NewNotifications/Bar/index.js +1 -1
- package/es/components/overlays/NewNotifications/Dialog/NotificationsDialogTrigger.js +1 -1
- package/es/components/overlays/NewNotifications/Dialog/index.js +1 -1
- package/es/components/overlays/NewNotifications/Notification.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationAction.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationCloseButton.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationDescription.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationFooter.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationHeader.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationIcon.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationProvider.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/NotificationView.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/index.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationView/types.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsContext/NotificationsProvider.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsContext/index.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsContext/use-notifications.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsList/NotificationsList.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsList/NotificationsListItem.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsList/index.js +1 -1
- package/es/components/overlays/NewNotifications/NotificationsList/types.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/index.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/types.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/use-notification-list-item.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/use-notifications-api.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/use-notifications-list.js +1 -1
- package/es/components/overlays/NewNotifications/hooks/use-notifications-observer.js +1 -1
- package/es/components/overlays/NewNotifications/index.js +1 -1
- package/es/components/overlays/NewNotifications/types.js +1 -1
- package/es/components/overlays/Notification/Notification.js +1 -1
- package/es/components/overlays/OverlayWrapper.js +1 -1
- package/es/components/overlays/Toasts/Toast.js +1 -1
- package/es/components/overlays/Toasts/index.js +1 -1
- package/es/components/overlays/Toasts/types.js +1 -1
- package/es/components/overlays/Toasts/use-toasts-api.js +1 -1
- package/es/components/overlays/Tooltip/Tooltip.js +2 -1
- package/es/components/overlays/Tooltip/TooltipProvider.js +2 -4
- package/es/components/overlays/Tooltip/TooltipTrigger.js +7 -9
- package/es/components/overlays/Tooltip/context.js +1 -1
- package/es/components/overlays/Tooltip/index.js +1 -1
- package/es/components/pickers/Menu/Menu.js +1 -1
- package/es/components/pickers/Menu/MenuButton.js +1 -1
- package/es/components/pickers/Menu/MenuItem.js +1 -1
- package/es/components/pickers/Menu/MenuSection.js +1 -1
- package/es/components/pickers/Menu/MenuTrigger.js +1 -1
- package/es/components/pickers/Menu/context.js +1 -1
- package/es/components/pickers/Menu/styled.js +1 -1
- package/es/components/portal/Portal.js +1 -1
- package/es/components/portal/PortalProvider.js +1 -1
- package/es/components/portal/index.js +1 -1
- package/es/components/portal/storybook/templates/CustomRoot.js +1 -1
- package/es/components/portal/storybook/templates/PortalOrder.js +1 -1
- package/es/components/portal/storybook/templates/basic.js +1 -1
- package/es/components/portal/storybook/templates/index.js +1 -1
- package/es/components/portal/types.js +1 -1
- package/es/components/portal/usePortal.js +1 -1
- package/es/components/shared/InvalidIcon.js +1 -1
- package/es/components/shared/ValidIcon.js +1 -1
- package/es/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- package/es/components/status/LoadingAnimation/index.js +1 -1
- package/es/components/status/Spin/Cube.js +1 -1
- package/es/components/status/Spin/InternalSpinner.js +1 -1
- package/es/components/status/Spin/Spin.js +1 -1
- package/es/components/status/Spin/SpinsContainer.js +1 -1
- package/es/components/status/Spin/index.js +1 -1
- package/es/components/status/Spin/types.js +1 -1
- package/es/components/status/index.js +1 -1
- package/es/data/themes.js +1 -1
- package/es/icons/AiIcon.js +1 -1
- package/es/icons/AreaChartIcon.js +1 -1
- package/es/icons/BackwardIcon.js +1 -1
- package/es/icons/BarChartIcon.js +1 -1
- package/es/icons/BellFilledIcon.js +1 -1
- package/es/icons/BellIcon.js +1 -1
- package/es/icons/BooleanIcon.js +1 -1
- package/es/icons/CalendarEditIcon.js +1 -1
- package/es/icons/CalendarIcon.js +1 -1
- package/es/icons/CaretDownIcon.js +1 -1
- package/es/icons/CaretUpIcon.js +1 -1
- package/es/icons/CheckCircleFilledIcon.js +1 -1
- package/es/icons/CheckCircleIcon.js +1 -1
- package/es/icons/CheckIcon.js +1 -1
- package/es/icons/CircleFilledIcon.js +1 -1
- package/es/icons/ClearIcon.js +1 -1
- package/es/icons/CloseCircleFilledIcon.js +1 -1
- package/es/icons/CloseCircleIcon.js +1 -1
- package/es/icons/CloseIcon.js +1 -1
- package/es/icons/CodeIcon.js +1 -1
- package/es/icons/CopyIcon.js +1 -1
- package/es/icons/CountIcon.js +1 -1
- package/es/icons/CubeIcon.js +1 -1
- package/es/icons/DangerIcon.js +1 -1
- package/es/icons/DashboardIcon.js +1 -1
- package/es/icons/DatabaseIcon.js +1 -1
- package/es/icons/DirectionIcon.js +1 -1
- package/es/icons/DonutIcon.js +1 -1
- package/es/icons/DownIcon.js +1 -1
- package/es/icons/EditIcon.js +1 -1
- package/es/icons/ExclamationCircleFilledIcon.js +1 -1
- package/es/icons/ExclamationCircleIcon.js +1 -1
- package/es/icons/ExclamationIcon.js +1 -1
- package/es/icons/EyeIcon.js +1 -1
- package/es/icons/EyeInvisibleIcon.js +1 -1
- package/es/icons/FilterIcon.js +1 -1
- package/es/icons/FolderFilledIcon.js +1 -1
- package/es/icons/FolderIcon.js +1 -1
- package/es/icons/FolderOpenFilledIcon.js +1 -1
- package/es/icons/FolderOpenIcon.js +1 -1
- package/es/icons/ForwardIcon.js +1 -1
- package/es/icons/HierarchyIcon.js +1 -1
- package/es/icons/Icon.js +1 -1
- package/es/icons/InfoCircleIcon.js +1 -1
- package/es/icons/InfoIcon.js +1 -1
- package/es/icons/KeyIcon.js +1 -1
- package/es/icons/LeftIcon.js +1 -1
- package/es/icons/LineChartIcon.js +1 -1
- package/es/icons/LoadingIcon.js +1 -1
- package/es/icons/LockFilledIcon.js +1 -1
- package/es/icons/LockIcon.js +1 -1
- package/es/icons/MoreIcon.js +1 -1
- package/es/icons/NotAllowedIcon.js +1 -1
- package/es/icons/NumberIcon.js +1 -1
- package/es/icons/PauseCircleFilledIcon.js +1 -1
- package/es/icons/PauseCircleIcon.js +1 -1
- package/es/icons/PauseIcon.js +1 -1
- package/es/icons/PieChartIcon.js +1 -1
- package/es/icons/PlayCircleIcon.js +1 -1
- package/es/icons/PlayIcon.js +1 -1
- package/es/icons/PlusIcon.js +1 -1
- package/es/icons/ReloadIcon.js +1 -1
- package/es/icons/ReportIcon.js +1 -1
- package/es/icons/ReturnIcon.js +1 -1
- package/es/icons/RightIcon.js +1 -1
- package/es/icons/SchemeIcon.js +1 -1
- package/es/icons/SearchIcon.js +1 -1
- package/es/icons/SettingsIcon.js +1 -1
- package/es/icons/ShieldFilledIcon.js +1 -1
- package/es/icons/ShieldIcon.js +1 -1
- package/es/icons/SlashIcon.js +1 -1
- package/es/icons/SparklesIcon.js +1 -1
- package/es/icons/SqlIcon.js +1 -1
- package/es/icons/StatsIcon.js +1 -1
- package/es/icons/StopIcon.js +1 -1
- package/es/icons/StringIcon.js +1 -1
- package/es/icons/SwitchIcon.js +1 -1
- package/es/icons/TableIcon.js +1 -1
- package/es/icons/ThumbsDownIcon.js +1 -1
- package/es/icons/ThumbsUpIcon.js +1 -1
- package/es/icons/ThunderboltCrossedIcon.js +1 -1
- package/es/icons/ThunderboltFilledIcon.js +1 -1
- package/es/icons/ThunderboltIcon.js +1 -1
- package/es/icons/TimeIcon.js +1 -1
- package/es/icons/UnlockIcon.js +1 -1
- package/es/icons/UpIcon.js +1 -1
- package/es/icons/UserGroupIcon.js +1 -1
- package/es/icons/UserIcon.js +1 -1
- package/es/icons/UserLockIcon.js +1 -1
- package/es/icons/ViewIcon.js +1 -1
- package/es/icons/WarningFilledIcon.js +1 -1
- package/es/icons/WarningIcon.js +1 -1
- package/es/icons/add-new-icon.js +1 -1
- package/es/icons/index.js +1 -1
- package/es/icons/wrap-icon.js +1 -1
- package/es/index.js +1 -1
- package/es/provider.js +1 -1
- package/es/providers/TrackingProvider.js +1 -1
- package/es/services/notification.js +1 -1
- package/es/shared/form.js +1 -1
- package/es/shared/index.js +1 -1
- package/es/stories/Form.stories.js +3 -3
- package/es/stories/FormFieldArgs.js +1 -1
- package/es/stories/Layout.stories.js +1 -1
- package/es/stories/Tasty.stories.js +1 -1
- package/es/stories/components/ConfirmDeletionDialogForm.js +1 -1
- package/es/stories/components/DialogFormApp.js +1 -1
- package/es/stories/components/StyledButton.js +1 -1
- package/es/stories/lists/baseProps.js +1 -1
- package/es/tasty/index.js +1 -1
- package/es/tasty/providers/BreakpointsProvider.js +1 -1
- package/es/tasty/styles/align.js +1 -1
- package/es/tasty/styles/border.js +1 -1
- package/es/tasty/styles/boxShadow.combinator.js +1 -1
- package/es/tasty/styles/color.js +1 -1
- package/es/tasty/styles/createStyle.js +1 -1
- package/es/tasty/styles/dimension.js +1 -1
- package/es/tasty/styles/display.js +1 -1
- package/es/tasty/styles/fade.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/inset.js +1 -1
- package/es/tasty/styles/justify.js +1 -1
- package/es/tasty/styles/list.js +1 -1
- package/es/tasty/styles/margin.js +1 -1
- package/es/tasty/styles/marginBlock.js +1 -1
- package/es/tasty/styles/marginInline.js +1 -1
- package/es/tasty/styles/outline.js +1 -1
- package/es/tasty/styles/padding.js +1 -1
- package/es/tasty/styles/paddingBlock.js +1 -1
- package/es/tasty/styles/paddingInline.js +1 -1
- package/es/tasty/styles/predefined.js +1 -1
- package/es/tasty/styles/preset.js +1 -1
- package/es/tasty/styles/radius.js +1 -1
- package/es/tasty/styles/reset.js +1 -1
- package/es/tasty/styles/shadow.js +1 -1
- package/es/tasty/styles/styledScrollbar.js +1 -1
- package/es/tasty/styles/transition.js +1 -1
- package/es/tasty/styles/types.js +1 -1
- package/es/tasty/styles/width.js +1 -1
- package/es/tasty/tasty.js +1 -1
- package/es/tasty/types.js +1 -1
- package/es/tasty/utils/cache-wrapper.js +1 -1
- package/es/tasty/utils/case-converter.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/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 +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/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 +1 -1
- package/es/utils/react/chain.js +1 -1
- package/es/utils/react/index.js +1 -1
- package/es/utils/react/interactions.js +1 -1
- package/es/utils/react/isTextOnly.js +1 -1
- package/es/utils/react/mapProps.js +1 -1
- package/es/utils/react/mergeProps.js +1 -1
- package/es/utils/react/nullableValue.js +1 -1
- package/es/utils/react/useCombinedRefs.js +1 -1
- package/es/utils/react/useId.js +1 -1
- package/es/utils/react/useLayoutEffect.js +1 -1
- package/es/utils/react/useViewportSize.js +1 -1
- package/es/utils/react/wrapNodeIfPlain.js +1 -1
- package/es/utils/transitions.js +1 -1
- package/es/utils/tree.js +1 -1
- package/es/utils/warnings.js +1 -1
- package/es/version.js +2 -2
- package/package.json +3 -2
- package/types/components/fields/ComboBox/ComboBox.d.ts +6 -0
- package/types/components/fields/DatePicker/DateInput.d.ts +2 -4
- package/types/components/fields/DatePicker/DatePicker.d.ts +1 -5
- package/types/components/fields/DatePicker/DateRangePicker.d.ts +2 -4
- package/types/components/fields/DatePicker/TimeInput.d.ts +1 -5
- package/types/components/fields/RadioGroup/Radio.d.ts +60 -0
- package/types/components/fields/RadioGroup/RadioGroup.d.ts +2 -2
- package/types/components/fields/Slider/RangeSlider.d.ts +1 -0
- package/types/components/fields/Slider/Slider.d.ts +1 -0
- package/types/components/fields/TextInput/TextInputBase.d.ts +1 -0
- package/types/components/fields/TextInputMapper/TextInputMapper.d.ts +6 -1
- package/types/components/form/Form/Form.d.ts +2 -3
- package/types/components/form/Form/index.d.ts +1 -3
- package/types/components/form/Form/types.d.ts +0 -1
- package/types/components/form/Form/use-field/types.d.ts +1 -1
- package/types/components/form/Form/use-form.d.ts +2 -2
- package/types/components/overlays/Dialog/DialogContainer.d.ts +2 -1
- package/types/components/overlays/Dialog/DialogTrigger.d.ts +1 -3
- package/types/components/overlays/Modal/Popover.d.ts +1 -1
- package/types/components/overlays/Tooltip/TooltipProvider.d.ts +1 -3
- package/types/components/overlays/Tooltip/TooltipTrigger.d.ts +1 -3
- package/cjs/_internal/hooks/index.js +0 -34
- package/cjs/_internal/hooks/use-chained-callback.js +0 -22
- package/cjs/_internal/hooks/use-debounced-value.js +0 -56
- package/cjs/_internal/hooks/use-deprecation-warning.js +0 -46
- package/cjs/_internal/hooks/use-effect-once.js +0 -17
- package/cjs/_internal/hooks/use-event.js +0 -25
- package/cjs/_internal/hooks/use-is-first-render.js +0 -21
- package/cjs/_internal/hooks/use-sync-ref.js +0 -21
- package/cjs/_internal/hooks/use-timer/index.js +0 -27
- package/cjs/_internal/hooks/use-timer/timer.js +0 -61
- package/cjs/_internal/hooks/use-timer/use-timer.js +0 -48
- package/cjs/_internal/hooks/use-update-effect.js +0 -23
- package/cjs/_internal/hooks/use-warn.js +0 -42
- package/cjs/_internal/index.js +0 -26
- package/cjs/components/Block.js +0 -24
- package/cjs/components/GlobalStyles.js +0 -385
- package/cjs/components/GridProvider.js +0 -89
- package/cjs/components/HiddenInput.js +0 -38
- package/cjs/components/OpenTrasition.js +0 -34
- package/cjs/components/Root.js +0 -92
- package/cjs/components/actions/Action/Action.js +0 -42
- package/cjs/components/actions/Button/Button.js +0 -260
- package/cjs/components/actions/Button/index.js +0 -26
- package/cjs/components/actions/ButtonGroup/ButtonGroup.js +0 -26
- package/cjs/components/actions/index.js +0 -34
- package/cjs/components/actions/use-action.js +0 -142
- package/cjs/components/content/ActiveZone/ActiveZone.js +0 -40
- package/cjs/components/content/Alert/Alert.js +0 -54
- package/cjs/components/content/Alert/index.js +0 -26
- package/cjs/components/content/Alert/types.js +0 -11
- package/cjs/components/content/Alert/use-alert.js +0 -30
- package/cjs/components/content/Avatar/Avatar.js +0 -36
- package/cjs/components/content/Badge/Badge.js +0 -53
- package/cjs/components/content/Card/Card.js +0 -32
- package/cjs/components/content/Content.js +0 -36
- package/cjs/components/content/CopyPasteBlock/CopyPasteBlock.js +0 -164
- package/cjs/components/content/CopyPasteBlock/index.js +0 -26
- package/cjs/components/content/CopySnippet/CopySnippet.js +0 -186
- package/cjs/components/content/CopySnippet/index.js +0 -26
- package/cjs/components/content/Divider.js +0 -51
- package/cjs/components/content/Footer.js +0 -31
- package/cjs/components/content/Header.js +0 -31
- package/cjs/components/content/Paragraph.js +0 -26
- package/cjs/components/content/Placeholder/Placeholder.js +0 -74
- package/cjs/components/content/PrismCode/PrismCode.js +0 -70
- package/cjs/components/content/PrismDiffCode/PrismDiffCode.js +0 -47
- package/cjs/components/content/Result/Result.js +0 -131
- package/cjs/components/content/Skeleton/Skeleton.js +0 -78
- package/cjs/components/content/Tag/Tag.js +0 -96
- package/cjs/components/content/Text.js +0 -80
- package/cjs/components/content/Title.js +0 -71
- package/cjs/components/fields/Checkbox/Checkbox.js +0 -175
- package/cjs/components/fields/Checkbox/CheckboxGroup.js +0 -76
- package/cjs/components/fields/Checkbox/context.js +0 -14
- package/cjs/components/fields/Checkbox/index.js +0 -27
- package/cjs/components/fields/ComboBox/ComboBox.js +0 -173
- package/cjs/components/fields/ComboBox/index.js +0 -26
- package/cjs/components/fields/DatePicker/DateInput.js +0 -64
- package/cjs/components/fields/DatePicker/DateInputBase.js +0 -81
- package/cjs/components/fields/DatePicker/DatePicker.js +0 -78
- package/cjs/components/fields/DatePicker/DatePickerButton.js +0 -24
- package/cjs/components/fields/DatePicker/DatePickerElement.js +0 -24
- package/cjs/components/fields/DatePicker/DatePickerInput.js +0 -54
- package/cjs/components/fields/DatePicker/DatePickerSegment.js +0 -69
- package/cjs/components/fields/DatePicker/DateRangePicker.js +0 -87
- package/cjs/components/fields/DatePicker/DateRangeSeparatedPicker.js +0 -133
- package/cjs/components/fields/DatePicker/TimeInput.js +0 -53
- package/cjs/components/fields/DatePicker/index.js +0 -32
- package/cjs/components/fields/DatePicker/intl.js +0 -17
- package/cjs/components/fields/DatePicker/parseDate.js +0 -33
- package/cjs/components/fields/DatePicker/props.js +0 -23
- package/cjs/components/fields/DatePicker/types.js +0 -11
- package/cjs/components/fields/DatePicker/utils.js +0 -108
- package/cjs/components/fields/FileInput/FileInput.js +0 -164
- package/cjs/components/fields/Input/Input.js +0 -28
- package/cjs/components/fields/Input/index.js +0 -26
- package/cjs/components/fields/NumberInput/NumberInput.js +0 -56
- package/cjs/components/fields/NumberInput/StepButton.js +0 -44
- package/cjs/components/fields/PasswordInput/PasswordInput.js +0 -52
- package/cjs/components/fields/RadioGroup/Radio.js +0 -221
- package/cjs/components/fields/RadioGroup/RadioGroup.js +0 -84
- package/cjs/components/fields/RadioGroup/context.js +0 -18
- package/cjs/components/fields/RadioGroup/index.js +0 -27
- package/cjs/components/fields/SearchInput/SearchInput.js +0 -44
- package/cjs/components/fields/SearchInput/index.js +0 -26
- package/cjs/components/fields/Select/Select.js +0 -321
- package/cjs/components/fields/Select/index.js +0 -26
- package/cjs/components/fields/Slider/Gradation.js +0 -27
- package/cjs/components/fields/Slider/Header.js +0 -15
- package/cjs/components/fields/Slider/RangeSlider.js +0 -33
- package/cjs/components/fields/Slider/Slider.js +0 -45
- package/cjs/components/fields/Slider/SliderBase.js +0 -129
- package/cjs/components/fields/Slider/SliderInput.js +0 -37
- package/cjs/components/fields/Slider/SliderThumb.js +0 -41
- package/cjs/components/fields/Slider/SliderTrack.js +0 -31
- package/cjs/components/fields/Slider/elements.js +0 -145
- package/cjs/components/fields/Slider/index.js +0 -31
- package/cjs/components/fields/Slider/types.js +0 -11
- package/cjs/components/fields/Switch/Switch.js +0 -152
- package/cjs/components/fields/Switch/index.js +0 -26
- package/cjs/components/fields/TextArea/TextArea.js +0 -71
- package/cjs/components/fields/TextArea/index.js +0 -26
- package/cjs/components/fields/TextInput/TextInput.js +0 -40
- package/cjs/components/fields/TextInput/TextInputBase.js +0 -229
- package/cjs/components/fields/TextInput/index.js +0 -27
- package/cjs/components/fields/TextInputMapper/TextInputMapper.js +0 -169
- package/cjs/components/fields/TextInputMapper/index.js +0 -26
- package/cjs/components/fields/index.js +0 -40
- package/cjs/components/form/FieldWrapper/FieldWrapper.js +0 -91
- package/cjs/components/form/FieldWrapper/extract-field-wrapper-props.js +0 -49
- package/cjs/components/form/FieldWrapper/index.js +0 -28
- package/cjs/components/form/FieldWrapper/types.js +0 -11
- package/cjs/components/form/Form/Field.js +0 -167
- package/cjs/components/form/Form/Form.js +0 -154
- package/cjs/components/form/Form/ResetButton/ResetButton.js +0 -40
- package/cjs/components/form/Form/ResetButton/index.js +0 -26
- package/cjs/components/form/Form/SubmitButton/SubmitButton.js +0 -28
- package/cjs/components/form/Form/SubmitButton/index.js +0 -26
- package/cjs/components/form/Form/SubmitError.js +0 -32
- package/cjs/components/form/Form/index.js +0 -48
- package/cjs/components/form/Form/types.js +0 -11
- package/cjs/components/form/Form/use-field/index.js +0 -28
- package/cjs/components/form/Form/use-field/types.js +0 -11
- package/cjs/components/form/Form/use-field/use-field-props.js +0 -82
- package/cjs/components/form/Form/use-field/use-field.js +0 -162
- package/cjs/components/form/Form/use-form.js +0 -412
- package/cjs/components/form/Form/validation.js +0 -171
- package/cjs/components/form/Label.js +0 -79
- package/cjs/components/form/index.js +0 -29
- package/cjs/components/form/wrapper.js +0 -38
- package/cjs/components/layout/Flex.js +0 -25
- package/cjs/components/layout/Flow.js +0 -26
- package/cjs/components/layout/Grid.js +0 -31
- package/cjs/components/layout/Panel.js +0 -110
- package/cjs/components/layout/Prefix.js +0 -46
- package/cjs/components/layout/ResizablePanel.js +0 -286
- package/cjs/components/layout/Space.js +0 -37
- package/cjs/components/layout/Suffix.js +0 -45
- package/cjs/components/navigation/LegacyTabs/LegacyTabs.js +0 -282
- package/cjs/components/navigation/Link/Link.js +0 -18
- package/cjs/components/organisms/FileTabs/FileTabs.js +0 -267
- package/cjs/components/organisms/Modal/Modal.js +0 -261
- package/cjs/components/organisms/StatsCard/StatsCard.js +0 -19
- package/cjs/components/other/Base64Upload/Base64Upload.js +0 -108
- package/cjs/components/other/Calendar/Calendar.js +0 -58
- package/cjs/components/other/Calendar/CalendarCell.js +0 -72
- package/cjs/components/other/Calendar/CalendarGrid.js +0 -35
- package/cjs/components/other/Calendar/RangeCalendar.js +0 -58
- package/cjs/components/other/CloudLogo/CloudLogo.js +0 -35
- package/cjs/components/overlays/AlertDialog/AlertDialog.js +0 -59
- package/cjs/components/overlays/AlertDialog/AlertDialogApiProvider.js +0 -121
- package/cjs/components/overlays/AlertDialog/AlertDialogZone.js +0 -57
- package/cjs/components/overlays/AlertDialog/index.js +0 -28
- package/cjs/components/overlays/AlertDialog/types.js +0 -11
- package/cjs/components/overlays/Dialog/Dialog.js +0 -200
- package/cjs/components/overlays/Dialog/DialogContainer.js +0 -42
- package/cjs/components/overlays/Dialog/DialogForm.js +0 -49
- package/cjs/components/overlays/Dialog/DialogTrigger.js +0 -133
- package/cjs/components/overlays/Dialog/context.js +0 -24
- package/cjs/components/overlays/Dialog/dialog-container.js +0 -63
- package/cjs/components/overlays/Dialog/index.js +0 -30
- package/cjs/components/overlays/Modal/Modal.js +0 -97
- package/cjs/components/overlays/Modal/OpenTransition.js +0 -31
- package/cjs/components/overlays/Modal/Overlay.js +0 -42
- package/cjs/components/overlays/Modal/Popover.js +0 -71
- package/cjs/components/overlays/Modal/Tray.js +0 -74
- package/cjs/components/overlays/Modal/Underlay.js +0 -46
- package/cjs/components/overlays/Modal/index.js +0 -37
- package/cjs/components/overlays/Modal/types.js +0 -11
- package/cjs/components/overlays/NewNotifications/Bar/FloatingNotification.js +0 -57
- package/cjs/components/overlays/NewNotifications/Bar/NotificationsBar.js +0 -98
- package/cjs/components/overlays/NewNotifications/Bar/TransitionComponent.js +0 -60
- package/cjs/components/overlays/NewNotifications/Bar/index.js +0 -26
- package/cjs/components/overlays/NewNotifications/Dialog/NotificationsDialogTrigger.js +0 -42
- package/cjs/components/overlays/NewNotifications/Dialog/index.js +0 -26
- package/cjs/components/overlays/NewNotifications/Notification.js +0 -45
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationAction.js +0 -44
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationCloseButton.js +0 -29
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationDescription.js +0 -39
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationFooter.js +0 -72
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationHeader.js +0 -34
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationIcon.js +0 -72
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationProvider.js +0 -32
- package/cjs/components/overlays/NewNotifications/NotificationView/NotificationView.js +0 -72
- package/cjs/components/overlays/NewNotifications/NotificationView/index.js +0 -27
- package/cjs/components/overlays/NewNotifications/NotificationView/types.js +0 -11
- package/cjs/components/overlays/NewNotifications/NotificationsContext/NotificationsProvider.js +0 -25
- package/cjs/components/overlays/NewNotifications/NotificationsContext/index.js +0 -15
- package/cjs/components/overlays/NewNotifications/NotificationsContext/use-notifications.js +0 -95
- package/cjs/components/overlays/NewNotifications/NotificationsList/NotificationsList.js +0 -47
- package/cjs/components/overlays/NewNotifications/NotificationsList/NotificationsListItem.js +0 -32
- package/cjs/components/overlays/NewNotifications/NotificationsList/index.js +0 -26
- package/cjs/components/overlays/NewNotifications/NotificationsList/types.js +0 -11
- package/cjs/components/overlays/NewNotifications/hooks/index.js +0 -30
- package/cjs/components/overlays/NewNotifications/hooks/types.js +0 -11
- package/cjs/components/overlays/NewNotifications/hooks/use-notification-list-item.js +0 -18
- package/cjs/components/overlays/NewNotifications/hooks/use-notifications-api.js +0 -23
- package/cjs/components/overlays/NewNotifications/hooks/use-notifications-list.js +0 -32
- package/cjs/components/overlays/NewNotifications/hooks/use-notifications-observer.js +0 -20
- package/cjs/components/overlays/NewNotifications/index.js +0 -34
- package/cjs/components/overlays/NewNotifications/types.js +0 -11
- package/cjs/components/overlays/Notification/Notification.js +0 -86
- package/cjs/components/overlays/OverlayWrapper.js +0 -34
- package/cjs/components/overlays/Toasts/Toast.js +0 -40
- package/cjs/components/overlays/Toasts/index.js +0 -27
- package/cjs/components/overlays/Toasts/types.js +0 -11
- package/cjs/components/overlays/Toasts/use-toasts-api.js +0 -45
- package/cjs/components/overlays/Tooltip/Tooltip.js +0 -111
- package/cjs/components/overlays/Tooltip/TooltipProvider.js +0 -26
- package/cjs/components/overlays/Tooltip/TooltipTrigger.js +0 -71
- package/cjs/components/overlays/Tooltip/context.js +0 -17
- package/cjs/components/overlays/Tooltip/index.js +0 -27
- package/cjs/components/pickers/Menu/Menu.js +0 -96
- package/cjs/components/pickers/Menu/MenuButton.js +0 -114
- package/cjs/components/pickers/Menu/MenuItem.js +0 -62
- package/cjs/components/pickers/Menu/MenuSection.js +0 -32
- package/cjs/components/pickers/Menu/MenuTrigger.js +0 -97
- package/cjs/components/pickers/Menu/context.js +0 -41
- package/cjs/components/pickers/Menu/styled.js +0 -113
- package/cjs/components/portal/Portal.js +0 -47
- package/cjs/components/portal/PortalProvider.js +0 -28
- package/cjs/components/portal/index.js +0 -29
- package/cjs/components/portal/storybook/templates/CustomRoot.js +0 -20
- package/cjs/components/portal/storybook/templates/PortalOrder.js +0 -17
- package/cjs/components/portal/storybook/templates/basic.js +0 -17
- package/cjs/components/portal/storybook/templates/index.js +0 -28
- package/cjs/components/portal/types.js +0 -11
- package/cjs/components/portal/usePortal.js +0 -47
- package/cjs/components/shared/InvalidIcon.js +0 -15
- package/cjs/components/shared/ValidIcon.js +0 -15
- package/cjs/components/status/LoadingAnimation/LoadingAnimation.js +0 -138
- package/cjs/components/status/LoadingAnimation/index.js +0 -14
- package/cjs/components/status/Spin/Cube.js +0 -196
- package/cjs/components/status/Spin/InternalSpinner.js +0 -29
- package/cjs/components/status/Spin/Spin.js +0 -24
- package/cjs/components/status/Spin/SpinsContainer.js +0 -45
- package/cjs/components/status/Spin/index.js +0 -26
- package/cjs/components/status/Spin/types.js +0 -11
- package/cjs/components/status/index.js +0 -27
- package/cjs/data/themes.js +0 -33
- package/cjs/icons/AiIcon.js +0 -15
- package/cjs/icons/AreaChartIcon.js +0 -15
- package/cjs/icons/BackwardIcon.js +0 -15
- package/cjs/icons/BarChartIcon.js +0 -15
- package/cjs/icons/BellFilledIcon.js +0 -15
- package/cjs/icons/BellIcon.js +0 -15
- package/cjs/icons/BooleanIcon.js +0 -15
- package/cjs/icons/CalendarEditIcon.js +0 -15
- package/cjs/icons/CalendarIcon.js +0 -15
- package/cjs/icons/CaretDownIcon.js +0 -15
- package/cjs/icons/CaretUpIcon.js +0 -15
- package/cjs/icons/CheckCircleFilledIcon.js +0 -15
- package/cjs/icons/CheckCircleIcon.js +0 -15
- package/cjs/icons/CheckIcon.js +0 -15
- package/cjs/icons/CircleFilledIcon.js +0 -15
- package/cjs/icons/ClearIcon.js +0 -15
- package/cjs/icons/CloseCircleFilledIcon.js +0 -15
- package/cjs/icons/CloseCircleIcon.js +0 -15
- package/cjs/icons/CloseIcon.js +0 -15
- package/cjs/icons/CodeIcon.js +0 -15
- package/cjs/icons/CopyIcon.js +0 -15
- package/cjs/icons/CountIcon.js +0 -15
- package/cjs/icons/CubeIcon.js +0 -15
- package/cjs/icons/DangerIcon.js +0 -15
- package/cjs/icons/DashboardIcon.js +0 -15
- package/cjs/icons/DatabaseIcon.js +0 -15
- package/cjs/icons/DirectionIcon.js +0 -70
- package/cjs/icons/DonutIcon.js +0 -15
- package/cjs/icons/DownIcon.js +0 -15
- package/cjs/icons/EditIcon.js +0 -15
- package/cjs/icons/ExclamationCircleFilledIcon.js +0 -15
- package/cjs/icons/ExclamationCircleIcon.js +0 -15
- package/cjs/icons/ExclamationIcon.js +0 -15
- package/cjs/icons/EyeIcon.js +0 -15
- package/cjs/icons/EyeInvisibleIcon.js +0 -15
- package/cjs/icons/FilterIcon.js +0 -15
- package/cjs/icons/FolderFilledIcon.js +0 -15
- package/cjs/icons/FolderIcon.js +0 -15
- package/cjs/icons/FolderOpenFilledIcon.js +0 -15
- package/cjs/icons/FolderOpenIcon.js +0 -15
- package/cjs/icons/ForwardIcon.js +0 -15
- package/cjs/icons/HierarchyIcon.js +0 -15
- package/cjs/icons/Icon.js +0 -39
- package/cjs/icons/InfoCircleIcon.js +0 -15
- package/cjs/icons/InfoIcon.js +0 -15
- package/cjs/icons/KeyIcon.js +0 -15
- package/cjs/icons/LeftIcon.js +0 -15
- package/cjs/icons/LineChartIcon.js +0 -15
- package/cjs/icons/LoadingIcon.js +0 -15
- package/cjs/icons/LockFilledIcon.js +0 -15
- package/cjs/icons/LockIcon.js +0 -15
- package/cjs/icons/MoreIcon.js +0 -15
- package/cjs/icons/NotAllowedIcon.js +0 -15
- package/cjs/icons/NumberIcon.js +0 -15
- package/cjs/icons/PauseCircleFilledIcon.js +0 -15
- package/cjs/icons/PauseCircleIcon.js +0 -15
- package/cjs/icons/PauseIcon.js +0 -15
- package/cjs/icons/PieChartIcon.js +0 -15
- package/cjs/icons/PlayCircleIcon.js +0 -15
- package/cjs/icons/PlayIcon.js +0 -15
- package/cjs/icons/PlusIcon.js +0 -15
- package/cjs/icons/ReloadIcon.js +0 -15
- package/cjs/icons/ReportIcon.js +0 -15
- package/cjs/icons/ReturnIcon.js +0 -15
- package/cjs/icons/RightIcon.js +0 -15
- package/cjs/icons/SchemeIcon.js +0 -15
- package/cjs/icons/SearchIcon.js +0 -15
- package/cjs/icons/SettingsIcon.js +0 -15
- package/cjs/icons/ShieldFilledIcon.js +0 -15
- package/cjs/icons/ShieldIcon.js +0 -15
- package/cjs/icons/SlashIcon.js +0 -15
- package/cjs/icons/SparklesIcon.js +0 -15
- package/cjs/icons/SqlIcon.js +0 -15
- package/cjs/icons/StatsIcon.js +0 -15
- package/cjs/icons/StopIcon.js +0 -15
- package/cjs/icons/StringIcon.js +0 -15
- package/cjs/icons/SwitchIcon.js +0 -15
- package/cjs/icons/TableIcon.js +0 -15
- package/cjs/icons/ThumbsDownIcon.js +0 -15
- package/cjs/icons/ThumbsUpIcon.js +0 -15
- package/cjs/icons/ThunderboltCrossedIcon.js +0 -15
- package/cjs/icons/ThunderboltFilledIcon.js +0 -15
- package/cjs/icons/ThunderboltIcon.js +0 -15
- package/cjs/icons/TimeIcon.js +0 -15
- package/cjs/icons/UnlockIcon.js +0 -15
- package/cjs/icons/UpIcon.js +0 -15
- package/cjs/icons/UserGroupIcon.js +0 -15
- package/cjs/icons/UserIcon.js +0 -15
- package/cjs/icons/UserLockIcon.js +0 -15
- package/cjs/icons/ViewIcon.js +0 -15
- package/cjs/icons/WarningFilledIcon.js +0 -15
- package/cjs/icons/WarningIcon.js +0 -15
- package/cjs/icons/add-new-icon.js +0 -130
- package/cjs/icons/index.js +0 -199
- package/cjs/icons/wrap-icon.js +0 -21
- package/cjs/index.js +0 -160
- package/cjs/provider.js +0 -60
- package/cjs/providers/TrackingProvider.js +0 -31
- package/cjs/services/notification.js +0 -70
- package/cjs/shared/form.js +0 -11
- package/cjs/shared/index.js +0 -26
- package/cjs/stories/Form.stories.js +0 -92
- package/cjs/stories/FormFieldArgs.js +0 -360
- package/cjs/stories/Layout.stories.js +0 -29
- package/cjs/stories/Tasty.stories.js +0 -23
- package/cjs/stories/components/ConfirmDeletionDialogForm.js +0 -35
- package/cjs/stories/components/DialogFormApp.js +0 -18
- package/cjs/stories/components/StyledButton.js +0 -37
- package/cjs/stories/lists/baseProps.js +0 -42
- package/cjs/tasty/index.js +0 -41
- package/cjs/tasty/providers/BreakpointsProvider.js +0 -20
- package/cjs/tasty/styles/align.js +0 -23
- package/cjs/tasty/styles/border.js +0 -57
- package/cjs/tasty/styles/boxShadow.combinator.js +0 -25
- package/cjs/tasty/styles/color.js +0 -42
- package/cjs/tasty/styles/createStyle.js +0 -71
- package/cjs/tasty/styles/dimension.js +0 -88
- package/cjs/tasty/styles/display.js +0 -16
- package/cjs/tasty/styles/fade.js +0 -41
- package/cjs/tasty/styles/fill.js +0 -41
- package/cjs/tasty/styles/flow.js +0 -23
- package/cjs/tasty/styles/font.js +0 -26
- package/cjs/tasty/styles/fontStyle.js +0 -22
- package/cjs/tasty/styles/gap.js +0 -55
- package/cjs/tasty/styles/groupRadius.js +0 -63
- package/cjs/tasty/styles/height.js +0 -18
- package/cjs/tasty/styles/index.js +0 -32
- package/cjs/tasty/styles/inset.js +0 -35
- package/cjs/tasty/styles/justify.js +0 -23
- package/cjs/tasty/styles/list.js +0 -89
- package/cjs/tasty/styles/margin.js +0 -49
- package/cjs/tasty/styles/marginBlock.js +0 -35
- package/cjs/tasty/styles/marginInline.js +0 -39
- package/cjs/tasty/styles/outline.js +0 -27
- package/cjs/tasty/styles/padding.js +0 -50
- package/cjs/tasty/styles/paddingBlock.js +0 -39
- package/cjs/tasty/styles/paddingInline.js +0 -39
- package/cjs/tasty/styles/predefined.js +0 -171
- package/cjs/tasty/styles/preset.js +0 -76
- package/cjs/tasty/styles/radius.js +0 -75
- package/cjs/tasty/styles/reset.js +0 -91
- package/cjs/tasty/styles/shadow.js +0 -29
- package/cjs/tasty/styles/styledScrollbar.js +0 -56
- package/cjs/tasty/styles/transition.js +0 -89
- package/cjs/tasty/styles/types.js +0 -11
- package/cjs/tasty/styles/width.js +0 -18
- package/cjs/tasty/tasty.js +0 -183
- package/cjs/tasty/types.js +0 -11
- package/cjs/tasty/utils/cache-wrapper.js +0 -34
- package/cjs/tasty/utils/case-converter.js +0 -15
- package/cjs/tasty/utils/colors.js +0 -18
- package/cjs/tasty/utils/dotize.js +0 -200
- package/cjs/tasty/utils/filterBaseProps.js +0 -70
- package/cjs/tasty/utils/getDisplayName.js +0 -19
- package/cjs/tasty/utils/index.js +0 -45
- package/cjs/tasty/utils/mergeStyles.js +0 -35
- package/cjs/tasty/utils/modAttrs.js +0 -26
- package/cjs/tasty/utils/renderStyles.js +0 -133
- package/cjs/tasty/utils/responsive.js +0 -71
- package/cjs/tasty/utils/string.js +0 -15
- package/cjs/tasty/utils/styles.js +0 -854
- package/cjs/tasty/utils/warnings.js +0 -36
- package/cjs/tokens.js +0 -255
- package/cjs/type-checks.js +0 -19
- package/cjs/utils/ResizeSensor.js +0 -324
- package/cjs/utils/modules.js +0 -15
- package/cjs/utils/promise.js +0 -17
- package/cjs/utils/random.js +0 -17
- package/cjs/utils/range.js +0 -15
- package/cjs/utils/react/Slots.js +0 -48
- package/cjs/utils/react/chain.js +0 -24
- package/cjs/utils/react/index.js +0 -32
- package/cjs/utils/react/interactions.js +0 -30
- package/cjs/utils/react/isTextOnly.js +0 -16
- package/cjs/utils/react/mapProps.js +0 -29
- package/cjs/utils/react/mergeProps.js +0 -71
- package/cjs/utils/react/nullableValue.js +0 -45
- package/cjs/utils/react/useCombinedRefs.js +0 -29
- package/cjs/utils/react/useId.js +0 -87
- package/cjs/utils/react/useLayoutEffect.js +0 -40
- package/cjs/utils/react/useViewportSize.js +0 -56
- package/cjs/utils/react/wrapNodeIfPlain.js +0 -21
- package/cjs/utils/transitions.js +0 -67
- package/cjs/utils/tree.js +0 -27
- package/cjs/utils/warnings.js +0 -57
- package/cjs/version.js +0 -25
@@ -1,854 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @license MIT
|
3
|
-
* author: Cube Dev Team
|
4
|
-
* @cube-dev/ui-kit v0.56.3
|
5
|
-
* Released under the MIT license.
|
6
|
-
*/
|
7
|
-
|
8
|
-
"use strict";
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.COMPUTE_FUNC_MAP = exports.parseStateNotation = exports.STATE_OPERATOR_LIST = exports.STATE_OPERATORS = exports.DIRECTIONS = exports.CUSTOM_UNITS = void 0;
|
11
|
-
exports.createRule = createRule;
|
12
|
-
exports.parseStyle = parseStyle;
|
13
|
-
exports.parseColor = parseColor;
|
14
|
-
exports.rgbColorProp = rgbColorProp;
|
15
|
-
exports.colorProp = colorProp;
|
16
|
-
exports.strToRgb = strToRgb;
|
17
|
-
exports.getRgbValuesFromRgbaString = getRgbValuesFromRgbaString;
|
18
|
-
exports.hexToRgb = hexToRgb;
|
19
|
-
exports.transferMods = transferMods;
|
20
|
-
exports.filterMods = filterMods;
|
21
|
-
exports.customUnit = customUnit;
|
22
|
-
exports.extendStyles = extendStyles;
|
23
|
-
exports.extractStyles = extractStyles;
|
24
|
-
exports.renderStylesToSC = renderStylesToSC;
|
25
|
-
exports.applyStates = applyStates;
|
26
|
-
exports.styleHandlerCacheWrapper = styleHandlerCacheWrapper;
|
27
|
-
exports.replaceStateValues = replaceStateValues;
|
28
|
-
exports.getModesFromStyleStateList = getModesFromStyleStateList;
|
29
|
-
exports.getModesFromStyleStateListMap = getModesFromStyleStateListMap;
|
30
|
-
exports.styleMapToStyleMapStateList = styleMapToStyleMapStateList;
|
31
|
-
exports.styleStateMapToStyleStateDataList = styleStateMapToStyleStateDataList;
|
32
|
-
exports.computeState = computeState;
|
33
|
-
const case_converter_1 = require("./case-converter");
|
34
|
-
const cache_wrapper_1 = require("./cache-wrapper");
|
35
|
-
const index_1 = require("./index");
|
36
|
-
const devMode = process.env.NODE_ENV !== 'production';
|
37
|
-
const IS_DVH_SUPPORTED = typeof CSS !== 'undefined' && typeof CSS?.supports === 'function'
|
38
|
-
? CSS.supports('height: 100dvh')
|
39
|
-
: false;
|
40
|
-
exports.CUSTOM_UNITS = {
|
41
|
-
r: 'var(--radius)',
|
42
|
-
bw: 'var(--border-width)',
|
43
|
-
ow: 'var(--outline-width)',
|
44
|
-
x: 'var(--gap)',
|
45
|
-
fs: 'var(--font-size)',
|
46
|
-
lh: 'var(--line-height)',
|
47
|
-
rp: 'var(--rem-pixel)',
|
48
|
-
gp: 'var(--column-gap)',
|
49
|
-
// global setting
|
50
|
-
dvh: function dvh(num) {
|
51
|
-
return IS_DVH_SUPPORTED
|
52
|
-
? `${num}dvh`
|
53
|
-
: `calc(var(--cube-dynamic-viewport-height, 100dvh) / 100 * ${num})`;
|
54
|
-
},
|
55
|
-
// span unit for GridProvider
|
56
|
-
sp: function spanWidth(num) {
|
57
|
-
return `((${num} * var(--column-width)) + (${num - 1} * var(--column-gap)))`;
|
58
|
-
},
|
59
|
-
};
|
60
|
-
exports.DIRECTIONS = ['top', 'right', 'bottom', 'left'];
|
61
|
-
const COLOR_FUNCS = ['rgb', 'rgba'];
|
62
|
-
const IGNORE_MODS = [
|
63
|
-
'auto',
|
64
|
-
'max-content',
|
65
|
-
'min-content',
|
66
|
-
'none',
|
67
|
-
'subgrid',
|
68
|
-
'initial',
|
69
|
-
];
|
70
|
-
const ATTR_REGEXP = /("[^"]*")|('[^']*')|([a-z-]+\()|(#[a-z0-9.-]{2,}(?![a-f0-9[-]))|(--[a-z0-9-]+|@[a-z0-9-]+)|([a-z][a-z0-9-]*)|(([0-9]+(?![0-9.])|[0-9-.]{2,}|[0-9-]{2,}|[0-9.-]{3,})([a-z%]{0,3}))|([*/+-])|([()])|(,)/gi;
|
71
|
-
const ATTR_CACHE = new Map();
|
72
|
-
const ATTR_CACHE_AUTOCALC = new Map();
|
73
|
-
const ATTR_CACHE_IGNORE_COLOR = new Map();
|
74
|
-
const MAX_CACHE = 10000;
|
75
|
-
const ATTR_CACHE_MODE_MAP = [
|
76
|
-
ATTR_CACHE_AUTOCALC,
|
77
|
-
ATTR_CACHE,
|
78
|
-
ATTR_CACHE_IGNORE_COLOR,
|
79
|
-
];
|
80
|
-
const PREPARE_REGEXP = /calc\((\d*)\)/gi;
|
81
|
-
function createRule(prop, value, selector) {
|
82
|
-
if (value == null)
|
83
|
-
return '';
|
84
|
-
if (selector) {
|
85
|
-
return `${selector} { ${prop}: ${value}; }\n`;
|
86
|
-
}
|
87
|
-
return `${prop}: ${value};\n`;
|
88
|
-
}
|
89
|
-
const MOD_NAME_CACHE = new Map();
|
90
|
-
function getModSelector(modName) {
|
91
|
-
if (!MOD_NAME_CACHE.has(modName)) {
|
92
|
-
MOD_NAME_CACHE.set(modName, modName.match(/^[a-z]/) ? `[data-is-${(0, case_converter_1.camelToKebab)(modName)}]` : modName);
|
93
|
-
}
|
94
|
-
return MOD_NAME_CACHE.get(modName);
|
95
|
-
}
|
96
|
-
/**
|
97
|
-
*
|
98
|
-
* @param {String} value
|
99
|
-
* @param {Number} mode
|
100
|
-
* @returns {Object<String,String|Array>}
|
101
|
-
*/
|
102
|
-
function parseStyle(value, mode = 0) {
|
103
|
-
if (typeof value === 'number') {
|
104
|
-
value = String(value);
|
105
|
-
}
|
106
|
-
if (typeof value !== 'string') {
|
107
|
-
return {
|
108
|
-
values: [],
|
109
|
-
mods: [],
|
110
|
-
all: [],
|
111
|
-
value: '',
|
112
|
-
};
|
113
|
-
}
|
114
|
-
const CACHE = ATTR_CACHE_MODE_MAP[mode];
|
115
|
-
if (!CACHE.has(value)) {
|
116
|
-
if (CACHE.size > MAX_CACHE) {
|
117
|
-
CACHE.clear();
|
118
|
-
}
|
119
|
-
const mods = [];
|
120
|
-
const all = [];
|
121
|
-
const values = [];
|
122
|
-
const autoCalc = mode !== 1;
|
123
|
-
let currentValue = '';
|
124
|
-
let calc = -1;
|
125
|
-
let counter = 0;
|
126
|
-
let parsedValue = '';
|
127
|
-
let color = '';
|
128
|
-
let currentFunc = '';
|
129
|
-
let usedFunc = '';
|
130
|
-
let token;
|
131
|
-
ATTR_REGEXP.lastIndex = 0;
|
132
|
-
value = value.replace(/@\(/g, 'var(--');
|
133
|
-
while ((token = ATTR_REGEXP.exec(value))) {
|
134
|
-
let [, quotedDouble, quotedSingle, func, hashColor, prop, mod, unit, unitVal, unitMetric, operator, bracket, comma,] = token;
|
135
|
-
if (quotedSingle || quotedDouble) {
|
136
|
-
currentValue += `${quotedSingle || quotedDouble} `;
|
137
|
-
}
|
138
|
-
else if (func) {
|
139
|
-
currentFunc = func.slice(0, -1);
|
140
|
-
currentValue += func;
|
141
|
-
counter++;
|
142
|
-
}
|
143
|
-
else if (hashColor) {
|
144
|
-
// currentValue += `${hashColor} `;
|
145
|
-
if (mode === 2) {
|
146
|
-
color = hashColor;
|
147
|
-
}
|
148
|
-
else {
|
149
|
-
color = parseColor(hashColor, false).color;
|
150
|
-
}
|
151
|
-
}
|
152
|
-
else if (mod) {
|
153
|
-
// ignore mods inside brackets
|
154
|
-
if (counter || IGNORE_MODS.includes(mod)) {
|
155
|
-
currentValue += `${mod} `;
|
156
|
-
}
|
157
|
-
else {
|
158
|
-
mods.push(mod);
|
159
|
-
all.push(mod);
|
160
|
-
parsedValue += `${mod} `;
|
161
|
-
}
|
162
|
-
}
|
163
|
-
else if (bracket) {
|
164
|
-
if (bracket === '(') {
|
165
|
-
if (!~calc) {
|
166
|
-
calc = counter;
|
167
|
-
currentValue += 'calc';
|
168
|
-
}
|
169
|
-
counter++;
|
170
|
-
}
|
171
|
-
if (bracket === ')' && counter) {
|
172
|
-
currentValue = currentValue.trim();
|
173
|
-
if (counter > 0) {
|
174
|
-
counter--;
|
175
|
-
}
|
176
|
-
if (counter === calc) {
|
177
|
-
calc = -1;
|
178
|
-
}
|
179
|
-
}
|
180
|
-
if (bracket === ')' && !counter) {
|
181
|
-
usedFunc = currentFunc;
|
182
|
-
currentFunc = '';
|
183
|
-
}
|
184
|
-
currentValue += `${bracket}${bracket === ')' ? ' ' : ''}`;
|
185
|
-
}
|
186
|
-
else if (operator) {
|
187
|
-
if (!~calc && autoCalc) {
|
188
|
-
if (currentValue) {
|
189
|
-
if (currentValue.includes('(')) {
|
190
|
-
const index = currentValue.lastIndexOf('(');
|
191
|
-
currentValue = `${currentValue.slice(0, index)}(calc(${currentValue.slice(index + 1)}`;
|
192
|
-
calc = counter;
|
193
|
-
counter++;
|
194
|
-
}
|
195
|
-
}
|
196
|
-
else if (values.length) {
|
197
|
-
parsedValue = parsedValue.slice(0, parsedValue.length - values[values.length - 1].length - 1);
|
198
|
-
let tmp = values.splice(values.length - 1, 1)[0];
|
199
|
-
all.splice(values.length - 1, 1);
|
200
|
-
if (tmp) {
|
201
|
-
if (tmp.startsWith('calc(')) {
|
202
|
-
tmp = tmp.slice(4);
|
203
|
-
}
|
204
|
-
calc = counter;
|
205
|
-
counter++;
|
206
|
-
currentValue = `calc((${tmp}) `;
|
207
|
-
}
|
208
|
-
}
|
209
|
-
}
|
210
|
-
currentValue += `${operator} `;
|
211
|
-
}
|
212
|
-
else if (unit) {
|
213
|
-
if (unitMetric && exports.CUSTOM_UNITS[unitMetric]) {
|
214
|
-
let add = customUnit(unitVal, unitMetric);
|
215
|
-
if (!~calc && add.startsWith('(')) {
|
216
|
-
currentValue += 'calc';
|
217
|
-
}
|
218
|
-
currentValue += `${add} `;
|
219
|
-
}
|
220
|
-
else {
|
221
|
-
currentValue += `${unit} `;
|
222
|
-
}
|
223
|
-
}
|
224
|
-
else if (prop) {
|
225
|
-
prop = prop.replace('@', '--');
|
226
|
-
if (currentFunc !== 'var') {
|
227
|
-
currentValue += `var(${prop}) `;
|
228
|
-
}
|
229
|
-
else {
|
230
|
-
currentValue += `${prop} `;
|
231
|
-
}
|
232
|
-
}
|
233
|
-
else if (comma) {
|
234
|
-
if (~calc) {
|
235
|
-
calc = -1;
|
236
|
-
counter--;
|
237
|
-
currentValue = `${currentValue.trim()}), `;
|
238
|
-
}
|
239
|
-
else {
|
240
|
-
currentValue = `${currentValue.trim()}, `;
|
241
|
-
}
|
242
|
-
if (!counter) {
|
243
|
-
all.push(',');
|
244
|
-
}
|
245
|
-
}
|
246
|
-
if (currentValue && !counter) {
|
247
|
-
let prepared = prepareParsedValue(currentValue);
|
248
|
-
if (COLOR_FUNCS.includes(usedFunc)) {
|
249
|
-
color = prepared;
|
250
|
-
}
|
251
|
-
else if (prepared.startsWith('color(')) {
|
252
|
-
prepared = prepared.slice(6, -1);
|
253
|
-
color = parseColor(prepared).color;
|
254
|
-
}
|
255
|
-
else {
|
256
|
-
if (prepared !== ',') {
|
257
|
-
values.push(prepared);
|
258
|
-
all.push(prepared);
|
259
|
-
}
|
260
|
-
parsedValue += `${prepared} `;
|
261
|
-
}
|
262
|
-
currentValue = '';
|
263
|
-
}
|
264
|
-
}
|
265
|
-
if (counter) {
|
266
|
-
let prepared = prepareParsedValue(`${currentValue.trim()}${')'.repeat(counter)}`);
|
267
|
-
if (prepared.startsWith('color(')) {
|
268
|
-
prepared = prepared.slice(6, -1);
|
269
|
-
color = parseColor(prepared).color;
|
270
|
-
}
|
271
|
-
else {
|
272
|
-
if (prepared !== ',') {
|
273
|
-
values.push(prepared);
|
274
|
-
all.push(prepared);
|
275
|
-
}
|
276
|
-
parsedValue += prepared;
|
277
|
-
}
|
278
|
-
}
|
279
|
-
CACHE.set(value, {
|
280
|
-
values,
|
281
|
-
mods,
|
282
|
-
all,
|
283
|
-
value: `${parsedValue} ${color}`.trim(),
|
284
|
-
color,
|
285
|
-
});
|
286
|
-
}
|
287
|
-
return CACHE.get(value);
|
288
|
-
}
|
289
|
-
/**
|
290
|
-
* Parse color. Find it value, name and opacity.
|
291
|
-
*/
|
292
|
-
function parseColor(val, ignoreError = false) {
|
293
|
-
val = val.trim();
|
294
|
-
if (!val)
|
295
|
-
return {};
|
296
|
-
if (val.startsWith('#')) {
|
297
|
-
val = val.slice(1);
|
298
|
-
const tmp = val.split('.');
|
299
|
-
let opacity = 100;
|
300
|
-
if (tmp.length > 1) {
|
301
|
-
if (tmp[1].length === 1) {
|
302
|
-
opacity = Number(tmp[1]) * 10;
|
303
|
-
}
|
304
|
-
else {
|
305
|
-
opacity = Number(tmp[1]);
|
306
|
-
}
|
307
|
-
if (Number.isNaN(opacity)) {
|
308
|
-
opacity = 100;
|
309
|
-
}
|
310
|
-
}
|
311
|
-
const name = tmp[0];
|
312
|
-
let color;
|
313
|
-
if (name === 'current') {
|
314
|
-
color = 'currentColor';
|
315
|
-
}
|
316
|
-
else {
|
317
|
-
if (opacity > 100) {
|
318
|
-
opacity = 100;
|
319
|
-
}
|
320
|
-
else if (opacity < 0) {
|
321
|
-
opacity = 0;
|
322
|
-
}
|
323
|
-
}
|
324
|
-
if (!color) {
|
325
|
-
color =
|
326
|
-
opacity !== 100
|
327
|
-
? rgbColorProp(name, Math.round(opacity) / 100)
|
328
|
-
: colorProp(name, null, strToRgb(`#${name}`));
|
329
|
-
}
|
330
|
-
return {
|
331
|
-
color,
|
332
|
-
name,
|
333
|
-
opacity: opacity != null ? opacity : 100,
|
334
|
-
};
|
335
|
-
}
|
336
|
-
let { values, mods, color } = parseStyle(val);
|
337
|
-
let name, opacity;
|
338
|
-
if (color) {
|
339
|
-
return {
|
340
|
-
color: (!color.startsWith('var(') ? strToRgb(color) : color) || color,
|
341
|
-
};
|
342
|
-
}
|
343
|
-
values.forEach((token) => {
|
344
|
-
if (token.match(/^((var|rgb|rgba|hsl|hsla)\(|#[0-9a-f]{3,6})/)) {
|
345
|
-
color = !token.startsWith('var') ? strToRgb(token) : token;
|
346
|
-
}
|
347
|
-
else if (token.endsWith('%')) {
|
348
|
-
opacity = parseInt(token);
|
349
|
-
}
|
350
|
-
});
|
351
|
-
if (color) {
|
352
|
-
return { color };
|
353
|
-
}
|
354
|
-
name = name || mods[0];
|
355
|
-
if (!name) {
|
356
|
-
if (!ignoreError && devMode) {
|
357
|
-
console.warn('CubeUIKit: incorrect color value:', val);
|
358
|
-
}
|
359
|
-
return {};
|
360
|
-
}
|
361
|
-
if (!opacity) {
|
362
|
-
let color;
|
363
|
-
if (name === 'current') {
|
364
|
-
color = 'currentColor';
|
365
|
-
}
|
366
|
-
else if (name === 'inherit') {
|
367
|
-
color = 'inherit';
|
368
|
-
}
|
369
|
-
else if (name !== 'transparent' && name !== 'currentColor') {
|
370
|
-
color = `var(--${name}-color, ${name})`;
|
371
|
-
}
|
372
|
-
else {
|
373
|
-
color = name;
|
374
|
-
}
|
375
|
-
return {
|
376
|
-
name,
|
377
|
-
color,
|
378
|
-
};
|
379
|
-
}
|
380
|
-
return {
|
381
|
-
color: rgbColorProp(name, Math.round(opacity) / 100),
|
382
|
-
name,
|
383
|
-
opacity,
|
384
|
-
};
|
385
|
-
}
|
386
|
-
function rgbColorProp(colorName, opacity, fallbackColorName, fallbackValue) {
|
387
|
-
const fallbackValuePart = fallbackValue ? `, ${fallbackValue}` : '';
|
388
|
-
return `rgba(var(--${colorName}-color-rgb${fallbackColorName
|
389
|
-
? `, var(--${fallbackColorName}-color-rgb, ${fallbackValuePart})`
|
390
|
-
: fallbackValuePart}), ${opacity})`;
|
391
|
-
}
|
392
|
-
function colorProp(colorName, fallbackColorName, fallbackValue) {
|
393
|
-
const fallbackValuePart = fallbackValue ? `, ${fallbackValue}` : '';
|
394
|
-
return `var(--${colorName}-color${fallbackColorName
|
395
|
-
? `, var(--${fallbackColorName}${fallbackValuePart})`
|
396
|
-
: fallbackValuePart})`;
|
397
|
-
}
|
398
|
-
function strToRgb(color, ignoreAlpha = false) {
|
399
|
-
if (!color)
|
400
|
-
return undefined;
|
401
|
-
if (color.startsWith('rgb'))
|
402
|
-
return color;
|
403
|
-
if (color.startsWith('#'))
|
404
|
-
return hexToRgb(color);
|
405
|
-
return null;
|
406
|
-
}
|
407
|
-
function getRgbValuesFromRgbaString(str) {
|
408
|
-
return str
|
409
|
-
.match(/\d+/g)
|
410
|
-
.map((s) => parseInt(s))
|
411
|
-
.slice(0, 3);
|
412
|
-
}
|
413
|
-
function hexToRgb(hex) {
|
414
|
-
const rgba = hex
|
415
|
-
.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (m, r, g, b) => '#' + r + r + g + g + b + b)
|
416
|
-
.substring(1)
|
417
|
-
.match(/.{2}/g)
|
418
|
-
.map((x, i) => parseInt(x, 16) * (i === 3 ? 1 / 255 : 1));
|
419
|
-
if (Number.isNaN(rgba[0])) {
|
420
|
-
return 'rgba(0, 0, 0, 1)';
|
421
|
-
}
|
422
|
-
if (rgba.length === 3) {
|
423
|
-
return `rgb(${rgba.join(', ')})`;
|
424
|
-
}
|
425
|
-
else if (rgba.length === 4) {
|
426
|
-
return `rgba(${rgba.join(', ')})`;
|
427
|
-
}
|
428
|
-
return null;
|
429
|
-
}
|
430
|
-
function transferMods(mods, from, to) {
|
431
|
-
mods.forEach((mod) => {
|
432
|
-
if (from.includes(mod)) {
|
433
|
-
to.push(mod);
|
434
|
-
from.splice(from.indexOf(mod), 1);
|
435
|
-
}
|
436
|
-
});
|
437
|
-
}
|
438
|
-
function prepareParsedValue(val) {
|
439
|
-
return val.trim().replace(PREPARE_REGEXP, (s, inner) => inner);
|
440
|
-
}
|
441
|
-
function filterMods(mods, allowedMods) {
|
442
|
-
return mods.filter((mod) => allowedMods.includes(mod));
|
443
|
-
}
|
444
|
-
function customUnit(value, unit) {
|
445
|
-
const converter = exports.CUSTOM_UNITS[unit];
|
446
|
-
if (typeof converter === 'function') {
|
447
|
-
return converter(value);
|
448
|
-
}
|
449
|
-
if (value === '1' || value === 1) {
|
450
|
-
return converter;
|
451
|
-
}
|
452
|
-
return `(${value} * ${converter})`;
|
453
|
-
}
|
454
|
-
function extendStyles(defaultStyles, newStyles) {
|
455
|
-
let styles = {};
|
456
|
-
if (!defaultStyles) {
|
457
|
-
if (!newStyles) {
|
458
|
-
return styles;
|
459
|
-
}
|
460
|
-
}
|
461
|
-
else {
|
462
|
-
styles = Object.assign({}, defaultStyles);
|
463
|
-
}
|
464
|
-
if (newStyles) {
|
465
|
-
Object.keys(newStyles).forEach((key) => {
|
466
|
-
if (newStyles[key] != null) {
|
467
|
-
styles[key] = newStyles[key];
|
468
|
-
}
|
469
|
-
});
|
470
|
-
}
|
471
|
-
return styles;
|
472
|
-
}
|
473
|
-
/**
|
474
|
-
* Split properties into style and non-style properties.
|
475
|
-
* @param props - Component prop map.
|
476
|
-
* @param [styleList] - List of all style properties.
|
477
|
-
* @param [defaultStyles] - Default style map of the component.
|
478
|
-
* @param [propMap] - Props to style alias map.
|
479
|
-
* @param [ignoreList] - A list of properties to ignore.
|
480
|
-
*/
|
481
|
-
function extractStyles(props, styleList = [], defaultStyles, propMap, ignoreList = []) {
|
482
|
-
const styles = {
|
483
|
-
...defaultStyles,
|
484
|
-
...props.styles,
|
485
|
-
};
|
486
|
-
Object.keys(props).forEach((prop) => {
|
487
|
-
const propName = propMap ? propMap[prop] || prop : prop;
|
488
|
-
const value = props[prop];
|
489
|
-
if (ignoreList && ignoreList.includes(prop)) {
|
490
|
-
// do nothing
|
491
|
-
}
|
492
|
-
else if (styleList.includes(propName)) {
|
493
|
-
styles[propName] = value;
|
494
|
-
}
|
495
|
-
}, {});
|
496
|
-
return styles;
|
497
|
-
}
|
498
|
-
/**
|
499
|
-
* Render CSSMap to Styled Components CSS
|
500
|
-
* @param styles
|
501
|
-
* @param [selector]
|
502
|
-
*/
|
503
|
-
function renderStylesToSC(styles, selector = '') {
|
504
|
-
if (!styles)
|
505
|
-
return '';
|
506
|
-
if (Array.isArray(styles)) {
|
507
|
-
return styles.reduce((css, stls) => {
|
508
|
-
return css + renderStylesToSC(stls, selector);
|
509
|
-
}, '');
|
510
|
-
}
|
511
|
-
const { $, css, ...styleProps } = styles;
|
512
|
-
let renderedStyles = Object.keys(styleProps).reduce((styleList, styleName) => {
|
513
|
-
const value = styleProps[styleName];
|
514
|
-
if (Array.isArray(value)) {
|
515
|
-
return (styleList +
|
516
|
-
value.reduce((css, val) => {
|
517
|
-
if (val) {
|
518
|
-
return css + `${styleName}:${val};\n`;
|
519
|
-
}
|
520
|
-
return css;
|
521
|
-
}, ''));
|
522
|
-
}
|
523
|
-
if (value) {
|
524
|
-
return `${styleList}${styleName}:${value};\n`;
|
525
|
-
}
|
526
|
-
return styleList;
|
527
|
-
}, '');
|
528
|
-
if (css) {
|
529
|
-
renderedStyles = css + '\n' + renderedStyles;
|
530
|
-
}
|
531
|
-
if (!renderedStyles) {
|
532
|
-
return '';
|
533
|
-
}
|
534
|
-
if (Array.isArray($)) {
|
535
|
-
return `${selector ? `${selector}{\n` : ''}${$.reduce((rend, suffix) => {
|
536
|
-
return (rend +
|
537
|
-
`${suffix ? `&${suffix}{\n` : ''}${renderedStyles}${suffix ? '}\n' : ''}`);
|
538
|
-
}, '')}${selector ? '}\n' : ''}`;
|
539
|
-
}
|
540
|
-
return `${selector ? `${selector}{\n` : ''}${$ ? `&${$}{\n` : ''}${renderedStyles}${$ ? '}\n' : ''}${selector ? '}\n' : ''}`;
|
541
|
-
}
|
542
|
-
/**
|
543
|
-
* Compile states to finite CSS with selectors.
|
544
|
-
* State values should contain a string value with CSS style list.
|
545
|
-
* @param {string} selector
|
546
|
-
* @param {StyleStateList|StyleStateMapList} states
|
547
|
-
* @param {string} suffix
|
548
|
-
*/
|
549
|
-
function applyStates(selector, states, suffix = '') {
|
550
|
-
return states.reduce((css, state) => {
|
551
|
-
if (!state.value)
|
552
|
-
return css;
|
553
|
-
const modifiers = `${(state.mods || []).map(getModSelector).join('')}${(state.notMods || [])
|
554
|
-
.map((mod) => {
|
555
|
-
let selector = getModSelector(mod);
|
556
|
-
if (selector.startsWith(':not(')) {
|
557
|
-
return selector.slice(5, -1);
|
558
|
-
}
|
559
|
-
else {
|
560
|
-
return `:not(${selector})`;
|
561
|
-
}
|
562
|
-
})
|
563
|
-
.join('')}`;
|
564
|
-
// TODO: replace `replace()` a REAL hotfix
|
565
|
-
return `${css}${selector}${modifiers}${suffix}{\n${state.value.replace(/^&&/, '&')}}\n`;
|
566
|
-
}, '');
|
567
|
-
}
|
568
|
-
function styleHandlerCacheWrapper(styleHandler, limit = 1000) {
|
569
|
-
const wrappedStyleHandler = (0, cache_wrapper_1.cacheWrapper)((styleMap) => {
|
570
|
-
return renderStylesToSC(styleHandler(styleMap));
|
571
|
-
}, limit);
|
572
|
-
const wrappedMapHandler = (0, cache_wrapper_1.cacheWrapper)((styleMap, suffix = '') => {
|
573
|
-
if (styleMap == null || styleMap === false)
|
574
|
-
return null;
|
575
|
-
const stateMapList = styleMapToStyleMapStateList(styleMap);
|
576
|
-
replaceStateValues(stateMapList, wrappedStyleHandler);
|
577
|
-
return applyStates('&&', stateMapList, suffix);
|
578
|
-
}, limit);
|
579
|
-
return Object.assign(wrappedMapHandler, {
|
580
|
-
__lookupStyles: styleHandler.__lookupStyles,
|
581
|
-
});
|
582
|
-
}
|
583
|
-
/**
|
584
|
-
* Replace state values with new ones.
|
585
|
-
* For example, if you want to replace initial values with finite CSS code.
|
586
|
-
*/
|
587
|
-
function replaceStateValues(states, replaceFn) {
|
588
|
-
const cache = new Map();
|
589
|
-
states.forEach((state) => {
|
590
|
-
if (!cache.get(state.value)) {
|
591
|
-
cache.set(state.value, replaceFn(state.value));
|
592
|
-
}
|
593
|
-
state.value = cache.get(state.value);
|
594
|
-
});
|
595
|
-
return states;
|
596
|
-
}
|
597
|
-
/**
|
598
|
-
* Get all presented modes from the style state list.
|
599
|
-
*/
|
600
|
-
function getModesFromStyleStateList(stateList) {
|
601
|
-
return stateList.reduce((list, state) => {
|
602
|
-
state.mods.forEach((mod) => {
|
603
|
-
if (!list.includes(mod)) {
|
604
|
-
list.push(mod);
|
605
|
-
}
|
606
|
-
});
|
607
|
-
return list;
|
608
|
-
}, []);
|
609
|
-
}
|
610
|
-
/**
|
611
|
-
* Get all presented modes from the style state map list.
|
612
|
-
*/
|
613
|
-
function getModesFromStyleStateListMap(stateListMap) {
|
614
|
-
return Object.keys(stateListMap).reduce((list, style) => {
|
615
|
-
const stateList = stateListMap[style];
|
616
|
-
getModesFromStyleStateList(stateList).forEach((mod) => {
|
617
|
-
if (!list.includes(mod)) {
|
618
|
-
list.push(mod);
|
619
|
-
}
|
620
|
-
});
|
621
|
-
return list;
|
622
|
-
}, []);
|
623
|
-
}
|
624
|
-
/**
|
625
|
-
* Convert the style map to the normalized style state list.
|
626
|
-
*/
|
627
|
-
function styleMapToStyleMapStateList(styleMap, filterKeys) {
|
628
|
-
const keys = filterKeys || Object.keys(styleMap);
|
629
|
-
if (!keys.length)
|
630
|
-
return [];
|
631
|
-
const stateDataListMap = {};
|
632
|
-
let allModsSet = new Set();
|
633
|
-
keys.forEach((style) => {
|
634
|
-
stateDataListMap[style] = styleStateMapToStyleStateDataList(styleMap[style]);
|
635
|
-
stateDataListMap[style].mods.forEach(allModsSet.add, allModsSet);
|
636
|
-
});
|
637
|
-
const allModsArr = Array.from(allModsSet);
|
638
|
-
const styleStateList = [];
|
639
|
-
(0, index_1.getModCombinations)(allModsArr, true).forEach((combination) => {
|
640
|
-
styleStateList.push({
|
641
|
-
mods: combination,
|
642
|
-
notMods: allModsArr.filter((mod) => !combination.includes(mod)),
|
643
|
-
value: keys.reduce((map, key) => {
|
644
|
-
map[key] = stateDataListMap[key].states.find((state) => {
|
645
|
-
return computeState(state.model, (mod) => combination.includes(mod));
|
646
|
-
}).value;
|
647
|
-
return map;
|
648
|
-
}, {}),
|
649
|
-
});
|
650
|
-
});
|
651
|
-
return styleStateList;
|
652
|
-
}
|
653
|
-
const STATES_REGEXP = /([&|!^])|([()])|([a-z][a-z0-9-]+)|(:[a-z][a-z0-9-]+\([^)]+\)|:[a-z][a-z0-9-]+)|(\.[a-z][a-z0-9-]+)|(\[[^\]]+])/gi;
|
654
|
-
exports.STATE_OPERATORS = {
|
655
|
-
NOT: '!',
|
656
|
-
AND: '&',
|
657
|
-
OR: '|',
|
658
|
-
XOR: '^',
|
659
|
-
};
|
660
|
-
exports.STATE_OPERATOR_LIST = ['!', '&', '|', '^'];
|
661
|
-
/**
|
662
|
-
*
|
663
|
-
*/
|
664
|
-
function convertTokensToComputeUnits(tokens) {
|
665
|
-
if (tokens.length === 1) {
|
666
|
-
return tokens[0];
|
667
|
-
}
|
668
|
-
exports.STATE_OPERATOR_LIST.forEach((operator) => {
|
669
|
-
let i;
|
670
|
-
while ((i = tokens.indexOf(operator)) !== -1) {
|
671
|
-
const token = tokens[i];
|
672
|
-
if (token === '!') {
|
673
|
-
if (tokens[i + 1] && tokens[i + 1].length !== 1) {
|
674
|
-
tokens.splice(i, 2, ['!', tokens[i + 1]]);
|
675
|
-
}
|
676
|
-
else {
|
677
|
-
tokens.splice(i, 1);
|
678
|
-
}
|
679
|
-
}
|
680
|
-
else {
|
681
|
-
if (tokens[i - 1] &&
|
682
|
-
tokens[i + 1] &&
|
683
|
-
tokens[i - 1].length !== 1 &&
|
684
|
-
tokens[i + 1].length !== 1) {
|
685
|
-
tokens.splice(i - 1, 3, [token, tokens[i - 1], tokens[i + 1]]);
|
686
|
-
}
|
687
|
-
else {
|
688
|
-
tokens.splice(i, 1);
|
689
|
-
}
|
690
|
-
}
|
691
|
-
}
|
692
|
-
});
|
693
|
-
return tokens.length === 1 ? tokens[0] : tokens;
|
694
|
-
}
|
695
|
-
/**
|
696
|
-
* Parse state notation and return tokens, modifiers and compute model.
|
697
|
-
*/
|
698
|
-
function parseStateNotationInner(notation, value) {
|
699
|
-
const tokens = notation.replace(/,/g, '|').match(STATES_REGEXP);
|
700
|
-
if (!tokens || !tokens.length) {
|
701
|
-
return {
|
702
|
-
model: undefined,
|
703
|
-
mods: [],
|
704
|
-
notMods: [],
|
705
|
-
tokens: [],
|
706
|
-
value,
|
707
|
-
};
|
708
|
-
}
|
709
|
-
else if (tokens.length === 1) {
|
710
|
-
return {
|
711
|
-
model: tokens[0],
|
712
|
-
mods: tokens.slice(0),
|
713
|
-
notMods: [],
|
714
|
-
tokens,
|
715
|
-
value,
|
716
|
-
};
|
717
|
-
}
|
718
|
-
const mods = [];
|
719
|
-
let operations = [[]];
|
720
|
-
let list = operations[0];
|
721
|
-
let position = 0;
|
722
|
-
tokens.forEach((token) => {
|
723
|
-
switch (token) {
|
724
|
-
case '(':
|
725
|
-
const operation = [];
|
726
|
-
position++;
|
727
|
-
list = operations[position] = operation;
|
728
|
-
break;
|
729
|
-
case ')':
|
730
|
-
position--;
|
731
|
-
operations[position].push(convertTokensToComputeUnits(list));
|
732
|
-
list = operations[position];
|
733
|
-
break;
|
734
|
-
default:
|
735
|
-
if (token.length > 1) {
|
736
|
-
if (!mods.includes(token)) {
|
737
|
-
mods.push(token);
|
738
|
-
}
|
739
|
-
}
|
740
|
-
list.push(token);
|
741
|
-
}
|
742
|
-
});
|
743
|
-
while (position) {
|
744
|
-
position--;
|
745
|
-
operations[position].push(convertTokensToComputeUnits(list));
|
746
|
-
list = operations[position];
|
747
|
-
}
|
748
|
-
return {
|
749
|
-
tokens,
|
750
|
-
mods,
|
751
|
-
notMods: [],
|
752
|
-
model: convertTokensToComputeUnits(operations[0]),
|
753
|
-
value,
|
754
|
-
};
|
755
|
-
}
|
756
|
-
exports.parseStateNotation = (0, cache_wrapper_1.cacheWrapper)(parseStateNotationInner);
|
757
|
-
/**
|
758
|
-
* Parse state notation and return tokens, modifiers and compute model.
|
759
|
-
*/
|
760
|
-
function styleStateMapToStyleStateDataList(styleStateMap) {
|
761
|
-
if (typeof styleStateMap !== 'object' || !styleStateMap) {
|
762
|
-
return {
|
763
|
-
states: [
|
764
|
-
{
|
765
|
-
model: undefined,
|
766
|
-
mods: [],
|
767
|
-
notMods: [],
|
768
|
-
value: styleStateMap,
|
769
|
-
},
|
770
|
-
],
|
771
|
-
mods: [],
|
772
|
-
};
|
773
|
-
}
|
774
|
-
const stateDataList = [];
|
775
|
-
Object.keys(styleStateMap).forEach((stateNotation) => {
|
776
|
-
const state = (0, exports.parseStateNotation)(stateNotation, styleStateMap[stateNotation]);
|
777
|
-
stateDataList.push(state);
|
778
|
-
});
|
779
|
-
stateDataList.reverse();
|
780
|
-
let initialState;
|
781
|
-
const allMods = stateDataList.reduce((all, state) => {
|
782
|
-
if (!state.mods.length) {
|
783
|
-
initialState = state;
|
784
|
-
}
|
785
|
-
else {
|
786
|
-
state.mods.forEach((mod) => {
|
787
|
-
if (!all.includes(mod)) {
|
788
|
-
all.push(mod);
|
789
|
-
}
|
790
|
-
});
|
791
|
-
}
|
792
|
-
return all;
|
793
|
-
}, []);
|
794
|
-
if (!initialState) {
|
795
|
-
stateDataList.push({
|
796
|
-
mods: [],
|
797
|
-
notMods: allMods,
|
798
|
-
value: true,
|
799
|
-
});
|
800
|
-
}
|
801
|
-
return { states: stateDataList, mods: allMods };
|
802
|
-
}
|
803
|
-
exports.COMPUTE_FUNC_MAP = {
|
804
|
-
'!': (a) => !a,
|
805
|
-
'^': (a, b) => a ^ b,
|
806
|
-
'|': (a, b) => a | b,
|
807
|
-
'&': (a, b) => a & b,
|
808
|
-
};
|
809
|
-
/**
|
810
|
-
* Compute a result based on a model and incoming map.
|
811
|
-
*/
|
812
|
-
function computeState(computeModel, valueMap) {
|
813
|
-
if (!computeModel)
|
814
|
-
return true;
|
815
|
-
if (!Array.isArray(computeModel)) {
|
816
|
-
if (typeof valueMap === 'function') {
|
817
|
-
return !!valueMap(computeModel);
|
818
|
-
}
|
819
|
-
else {
|
820
|
-
return !!valueMap[computeModel];
|
821
|
-
}
|
822
|
-
}
|
823
|
-
const func = exports.COMPUTE_FUNC_MAP[computeModel[0]];
|
824
|
-
if (!func) {
|
825
|
-
console.warn('CubeUIKit: unexpected compute method in the model', computeModel);
|
826
|
-
// return false;
|
827
|
-
}
|
828
|
-
let a = computeModel[1];
|
829
|
-
if (typeof a === 'object') {
|
830
|
-
a = !!computeState(a, valueMap);
|
831
|
-
}
|
832
|
-
else if (typeof valueMap === 'function') {
|
833
|
-
a = !!valueMap(a);
|
834
|
-
}
|
835
|
-
else {
|
836
|
-
a = !!valueMap[a];
|
837
|
-
}
|
838
|
-
if (computeModel.length === 2) {
|
839
|
-
return func(a);
|
840
|
-
}
|
841
|
-
let b = computeModel[2];
|
842
|
-
if (typeof b === 'object') {
|
843
|
-
b = !!computeState(b, valueMap);
|
844
|
-
}
|
845
|
-
else if (typeof valueMap === 'function') {
|
846
|
-
b = !!valueMap(b);
|
847
|
-
}
|
848
|
-
else {
|
849
|
-
b = !!valueMap[b];
|
850
|
-
}
|
851
|
-
return !!func(a, b);
|
852
|
-
}
|
853
|
-
|
854
|
-
|