@cube-dev/ui-kit 0.8.8 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/README.md +26 -0
- package/dist/cjs/components/Base.js +58 -0
- package/dist/cjs/components/Block.js +25 -0
- package/dist/cjs/components/GlobalStyles.js +322 -0
- package/dist/cjs/components/GridProvider.js +84 -0
- package/dist/cjs/components/HiddenInput.js +39 -0
- package/dist/cjs/components/OpenTrasition.js +38 -0
- package/dist/cjs/components/Root.js +50 -0
- package/dist/cjs/components/actions/Action.js +136 -0
- package/dist/cjs/components/actions/Button/Button.js +313 -0
- package/dist/cjs/components/actions/Button/Submit.js +29 -0
- package/dist/cjs/components/actions/Button/index.js +23 -0
- package/dist/cjs/components/actions/ButtonGroup/ButtonGroup.js +28 -0
- package/dist/cjs/components/actions/index.js +28 -0
- package/dist/cjs/components/content/ActiveZone/ActiveZone.js +44 -0
- package/dist/cjs/components/content/Avatar/Avatar.js +39 -0
- package/dist/cjs/components/content/Badge/Badge.js +58 -0
- package/dist/cjs/components/content/Card/Card.js +30 -0
- package/dist/cjs/components/content/Content.js +42 -0
- package/dist/cjs/components/content/Divider.js +53 -0
- package/dist/cjs/components/content/Footer.js +36 -0
- package/dist/cjs/components/content/Header.js +35 -0
- package/dist/cjs/components/content/Paragraph.js +27 -0
- package/dist/cjs/components/content/Placeholder/Placeholder.js +51 -0
- package/dist/cjs/components/content/PrismCode/PrismCode.js +44 -0
- package/dist/cjs/components/content/Result/Result.js +105 -0
- package/dist/cjs/components/content/Skeleton/Skeleton.js +79 -0
- package/dist/cjs/components/content/Tag/Tag.js +94 -0
- package/dist/cjs/components/content/Text.js +81 -0
- package/dist/cjs/components/content/Title.js +69 -0
- package/dist/cjs/components/forms/Checkbox/Checkbox.js +177 -0
- package/dist/cjs/components/forms/Checkbox/CheckboxGroup.js +110 -0
- package/dist/cjs/components/forms/Checkbox/context.js +14 -0
- package/dist/cjs/components/forms/FieldWrapper.js +82 -0
- package/dist/cjs/components/forms/FileInput/FileInput.js +151 -0
- package/dist/cjs/components/forms/Form/Field.js +234 -0
- package/dist/cjs/components/forms/Form/Form.js +125 -0
- package/dist/cjs/components/forms/Form/index.js +20 -0
- package/dist/cjs/components/forms/Form/useForm.js +280 -0
- package/dist/cjs/components/forms/Form/validation.js +149 -0
- package/dist/cjs/components/forms/Label.js +90 -0
- package/dist/cjs/components/forms/NumberInput/NumberInput.js +50 -0
- package/dist/cjs/components/forms/NumberInput/StepButton.js +35 -0
- package/dist/cjs/components/forms/PasswordInput/PasswordInput.js +43 -0
- package/dist/cjs/components/forms/RadioGroup/Radio.js +181 -0
- package/dist/cjs/components/forms/RadioGroup/RadioGroup.js +113 -0
- package/dist/cjs/components/forms/RadioGroup/context.js +18 -0
- package/dist/cjs/components/forms/SearchInput/SearchInput.js +45 -0
- package/dist/cjs/components/forms/Switch/Switch.js +156 -0
- package/dist/cjs/components/forms/TextArea/TextArea.js +63 -0
- package/dist/cjs/components/forms/TextInput/TextInput.js +33 -0
- package/dist/cjs/components/forms/TextInput/TextInputBase.js +167 -0
- package/dist/cjs/components/forms/index.js +30 -0
- package/dist/cjs/components/layout/Flex.js +26 -0
- package/dist/cjs/components/layout/Flow.js +27 -0
- package/dist/cjs/components/layout/Grid.js +33 -0
- package/dist/cjs/components/layout/Prefix.js +46 -0
- package/dist/cjs/components/layout/Space.js +35 -0
- package/dist/cjs/components/layout/Suffix.js +45 -0
- package/dist/cjs/components/navigation/LegacyTabs/LegacyTabs.js +255 -0
- package/dist/cjs/components/navigation/Link/Link.js +18 -0
- package/dist/cjs/components/organisms/Alert/Alert.js +41 -0
- package/dist/cjs/components/organisms/CopySnippet/CopySnippet.js +112 -0
- package/dist/cjs/components/organisms/DirectoryTree/DirectoryTree.js +166 -0
- package/dist/cjs/components/organisms/FileTabs/FileTabs.js +300 -0
- package/dist/cjs/components/organisms/Modal/Modal.js +258 -0
- package/dist/cjs/components/organisms/SearchResults/SearchResults.js +108 -0
- package/dist/cjs/components/organisms/StatsCard/StatsCard.js +20 -0
- package/dist/cjs/components/organisms/TopBar/TopBar.js +33 -0
- package/dist/cjs/components/other/Base64Upload/Base64Upload.js +110 -0
- package/dist/cjs/components/other/CloudLogo/CloudLogo.js +43 -0
- package/dist/cjs/components/overlays/AlertDialog/AlertDialog.js +59 -0
- package/dist/cjs/components/overlays/AlertDialog/AlertDialogApiProvider.js +114 -0
- package/dist/cjs/components/overlays/AlertDialog/AlertDialogZone.js +58 -0
- package/dist/cjs/components/overlays/AlertDialog/index.js +24 -0
- package/dist/cjs/components/overlays/AlertDialog/types.js +11 -0
- package/dist/cjs/components/overlays/Dialog/Dialog.js +181 -0
- package/dist/cjs/components/overlays/Dialog/DialogContainer.js +42 -0
- package/dist/cjs/components/overlays/Dialog/DialogForm.js +56 -0
- package/dist/cjs/components/overlays/Dialog/DialogTrigger.js +116 -0
- package/dist/cjs/components/overlays/Dialog/context.js +14 -0
- package/dist/cjs/components/overlays/Dialog/index.js +25 -0
- package/dist/cjs/components/overlays/Modal/Modal.js +86 -0
- package/dist/cjs/components/overlays/Modal/OpenTransition.js +26 -0
- package/dist/cjs/components/overlays/Modal/Overlay.js +40 -0
- package/dist/cjs/components/overlays/Modal/Popover.js +59 -0
- package/dist/cjs/components/overlays/Modal/Tray.js +95 -0
- package/dist/cjs/components/overlays/Modal/Underlay.js +51 -0
- package/dist/cjs/components/overlays/Modal/index.js +22 -0
- package/dist/cjs/components/overlays/Notification/Notification.js +44 -0
- package/dist/cjs/components/overlays/OverlayWrapper.js +35 -0
- package/dist/cjs/components/overlays/Tooltip/Tooltip.js +100 -0
- package/dist/cjs/components/overlays/Tooltip/TooltipProvider.js +26 -0
- package/dist/cjs/components/overlays/Tooltip/TooltipTrigger.js +71 -0
- package/dist/cjs/components/overlays/Tooltip/context.js +17 -0
- package/dist/cjs/components/pickers/ComboBox/ComboBox.js +170 -0
- package/dist/cjs/components/pickers/Select/Select.js +257 -0
- package/dist/cjs/components/portal/Portal.js +48 -0
- package/dist/cjs/components/portal/PortalProvider.js +28 -0
- package/dist/cjs/components/portal/index.js +25 -0
- package/dist/cjs/components/portal/storybook/templates/basic.js +17 -0
- package/dist/cjs/components/portal/storybook/templates/index.js +22 -0
- package/dist/cjs/components/portal/types.js +11 -0
- package/dist/cjs/components/portal/usePortal.js +48 -0
- package/dist/cjs/components/status/LoadingAnimation/LoadingAnimation.js +139 -0
- package/dist/cjs/components/status/Spin/Spin.js +38 -0
- package/dist/cjs/components/types.js +11 -0
- package/dist/cjs/data/themes.js +33 -0
- package/dist/cjs/index.js +182 -30
- package/dist/cjs/provider.js +51 -0
- package/dist/cjs/providers/BreakpointsProvider.js +20 -0
- package/dist/cjs/providers/StylesProvider.js +42 -0
- package/dist/cjs/services/notification.js +67 -0
- package/dist/cjs/shared/form.js +11 -0
- package/dist/cjs/shared/index.js +22 -0
- package/dist/cjs/stories/FormFieldArgs.js +288 -0
- package/dist/cjs/stories/components/ConfirmDeletionDialogForm.js +36 -0
- package/dist/cjs/stories/components/DialogFormApp.js +27 -0
- package/dist/cjs/stories/components/StyledButton.js +37 -0
- package/dist/cjs/stories/lists/baseProps.js +42 -0
- package/dist/cjs/styled/index.js +22 -0
- package/dist/cjs/styled/styled.js +106 -0
- package/dist/cjs/styles/align.js +24 -0
- package/dist/cjs/styles/border.js +52 -0
- package/dist/cjs/styles/boxShadow.combinator.js +26 -0
- package/dist/cjs/styles/color.js +43 -0
- package/dist/cjs/styles/dimension.js +89 -0
- package/dist/cjs/styles/display.js +17 -0
- package/dist/cjs/styles/fill.js +42 -0
- package/dist/cjs/styles/flow.js +24 -0
- package/dist/cjs/styles/font.js +27 -0
- package/dist/cjs/styles/fontStyle.js +23 -0
- package/dist/cjs/styles/gap.js +67 -0
- package/dist/cjs/styles/groupRadius.js +64 -0
- package/dist/cjs/styles/height.js +19 -0
- package/dist/cjs/styles/index.js +105 -0
- package/dist/cjs/styles/justify.js +24 -0
- package/dist/cjs/styles/list.js +87 -0
- package/dist/cjs/styles/margin.js +50 -0
- package/dist/cjs/styles/marginBlock.js +36 -0
- package/dist/cjs/styles/marginInline.js +40 -0
- package/dist/cjs/styles/outline.js +28 -0
- package/dist/cjs/styles/padding.js +51 -0
- package/dist/cjs/styles/paddingBlock.js +40 -0
- package/dist/cjs/styles/paddingInline.js +40 -0
- package/dist/cjs/styles/predefined.js +122 -0
- package/dist/cjs/styles/preset.js +55 -0
- package/dist/cjs/styles/radius.js +76 -0
- package/dist/cjs/styles/reset.js +104 -0
- package/dist/cjs/styles/shadow.js +27 -0
- package/dist/cjs/styles/styledScrollbar.js +55 -0
- package/dist/cjs/styles/transition.js +88 -0
- package/dist/cjs/styles/types.js +11 -0
- package/dist/cjs/styles/width.js +19 -0
- package/dist/cjs/test/setup.js +14 -0
- package/dist/cjs/tokens.js +233 -0
- package/dist/cjs/utils/ResizeSensor.js +324 -0
- package/dist/cjs/utils/colors.js +19 -0
- package/dist/cjs/utils/dotize.js +194 -0
- package/dist/cjs/utils/escape-string.js +21 -0
- package/dist/cjs/utils/filterBaseProps.js +69 -0
- package/dist/cjs/utils/index.js +46 -0
- package/dist/cjs/utils/interactions.js +29 -0
- package/dist/cjs/utils/mergeStyles.js +36 -0
- package/dist/cjs/utils/modules.js +16 -0
- package/dist/cjs/utils/promise.js +18 -0
- package/dist/cjs/utils/react/Slots.js +48 -0
- package/dist/cjs/utils/react/chain.js +25 -0
- package/dist/cjs/utils/react/index.js +30 -0
- package/dist/cjs/utils/react/isTextOnly.js +17 -0
- package/dist/cjs/utils/react/mapProps.js +30 -0
- package/dist/cjs/utils/react/mergeProps.js +67 -0
- package/dist/cjs/utils/react/modAttrs.js +26 -0
- package/dist/cjs/utils/react/nullableValue.js +46 -0
- package/dist/cjs/utils/react/useCombinedRefs.js +30 -0
- package/dist/cjs/utils/react/useId.js +87 -0
- package/dist/cjs/utils/react/useLayoutEffect.js +36 -0
- package/dist/cjs/utils/react/wrapNodeIfPlain.js +22 -0
- package/dist/cjs/utils/renderStyles.js +132 -0
- package/dist/cjs/utils/responsive.js +72 -0
- package/dist/cjs/utils/string.js +16 -0
- package/dist/cjs/utils/styles.js +870 -0
- package/dist/cjs/utils/transitions.js +67 -0
- package/dist/cjs/utils/tree.js +28 -0
- package/dist/cjs/utils/warnings.js +55 -0
- package/dist/es/components/Base.js +52 -0
- package/dist/es/components/Block.js +22 -0
- package/dist/es/components/GlobalStyles.js +319 -0
- package/dist/es/components/GridProvider.js +63 -0
- package/dist/es/components/HiddenInput.js +33 -0
- package/dist/es/components/OpenTrasition.js +31 -0
- package/dist/es/components/Root.js +46 -0
- package/dist/es/components/actions/Action.js +130 -0
- package/dist/es/components/actions/Button/Button.js +309 -0
- package/dist/es/components/actions/Button/Submit.js +26 -0
- package/dist/es/components/actions/Button/index.js +11 -0
- package/dist/es/components/actions/ButtonGroup/ButtonGroup.js +25 -0
- package/dist/es/components/actions/index.js +15 -0
- package/dist/es/components/content/ActiveZone/ActiveZone.js +41 -0
- package/dist/es/components/content/Avatar/Avatar.js +36 -0
- package/dist/es/components/content/Badge/Badge.js +52 -0
- package/dist/es/components/content/Card/Card.js +27 -0
- package/dist/es/components/content/Content.js +39 -0
- package/dist/es/components/content/Divider.js +50 -0
- package/dist/es/components/content/Footer.js +33 -0
- package/dist/es/components/content/Header.js +32 -0
- package/dist/es/components/content/Paragraph.js +24 -0
- package/dist/es/components/content/Placeholder/Placeholder.js +48 -0
- package/dist/es/components/content/PrismCode/PrismCode.js +38 -0
- package/dist/es/components/content/Result/Result.js +102 -0
- package/dist/es/components/content/Skeleton/Skeleton.js +75 -0
- package/dist/es/components/content/Tag/Tag.js +88 -0
- package/dist/es/components/content/Text.js +78 -0
- package/dist/es/components/content/Title.js +66 -0
- package/dist/es/components/forms/Checkbox/Checkbox.js +174 -0
- package/dist/es/components/forms/Checkbox/CheckboxGroup.js +107 -0
- package/dist/es/components/forms/Checkbox/context.js +11 -0
- package/dist/es/components/forms/FieldWrapper.js +79 -0
- package/dist/es/components/forms/FileInput/FileInput.js +148 -0
- package/dist/es/components/forms/Form/Field.js +230 -0
- package/dist/es/components/forms/Form/Form.js +121 -0
- package/dist/es/components/forms/Form/index.js +14 -0
- package/dist/es/components/forms/Form/useForm.js +275 -0
- package/dist/es/components/forms/Form/validation.js +141 -0
- package/dist/es/components/forms/Label.js +87 -0
- package/dist/es/components/forms/NumberInput/NumberInput.js +47 -0
- package/dist/es/components/forms/NumberInput/StepButton.js +31 -0
- package/dist/es/components/forms/PasswordInput/PasswordInput.js +40 -0
- package/dist/es/components/forms/RadioGroup/Radio.js +178 -0
- package/dist/es/components/forms/RadioGroup/RadioGroup.js +110 -0
- package/dist/es/components/forms/RadioGroup/context.js +14 -0
- package/dist/es/components/forms/SearchInput/SearchInput.js +42 -0
- package/dist/es/components/forms/Switch/Switch.js +153 -0
- package/dist/es/components/forms/TextArea/TextArea.js +60 -0
- package/dist/es/components/forms/TextInput/TextInput.js +30 -0
- package/dist/es/components/forms/TextInput/TextInputBase.js +164 -0
- package/dist/es/components/forms/index.js +22 -0
- package/dist/es/components/layout/Flex.js +23 -0
- package/dist/es/components/layout/Flow.js +24 -0
- package/dist/es/components/layout/Grid.js +30 -0
- package/dist/es/components/layout/Prefix.js +43 -0
- package/dist/es/components/layout/Space.js +32 -0
- package/dist/es/components/layout/Suffix.js +42 -0
- package/dist/es/components/navigation/LegacyTabs/LegacyTabs.js +251 -0
- package/dist/es/components/navigation/Link/Link.js +15 -0
- package/dist/es/components/organisms/Alert/Alert.js +35 -0
- package/dist/es/components/organisms/CopySnippet/CopySnippet.js +105 -0
- package/dist/es/components/organisms/DirectoryTree/DirectoryTree.js +162 -0
- package/dist/es/components/organisms/FileTabs/FileTabs.js +296 -0
- package/dist/es/components/organisms/Modal/Modal.js +251 -0
- package/dist/es/components/organisms/SearchResults/SearchResults.js +104 -0
- package/dist/es/components/organisms/StatsCard/StatsCard.js +16 -0
- package/dist/es/components/organisms/TopBar/TopBar.js +29 -0
- package/dist/es/components/other/Base64Upload/Base64Upload.js +104 -0
- package/dist/es/components/other/CloudLogo/CloudLogo.js +37 -0
- package/dist/es/components/overlays/AlertDialog/AlertDialog.js +56 -0
- package/dist/es/components/overlays/AlertDialog/AlertDialogApiProvider.js +106 -0
- package/dist/es/components/overlays/AlertDialog/AlertDialogZone.js +54 -0
- package/dist/es/components/overlays/AlertDialog/index.js +12 -0
- package/dist/es/components/overlays/AlertDialog/types.js +10 -0
- package/dist/es/components/overlays/Dialog/Dialog.js +178 -0
- package/dist/es/components/overlays/Dialog/DialogContainer.js +38 -0
- package/dist/es/components/overlays/Dialog/DialogForm.js +53 -0
- package/dist/es/components/overlays/Dialog/DialogTrigger.js +113 -0
- package/dist/es/components/overlays/Dialog/context.js +11 -0
- package/dist/es/components/overlays/Dialog/index.js +13 -0
- package/dist/es/components/overlays/Modal/Modal.js +83 -0
- package/dist/es/components/overlays/Modal/OpenTransition.js +19 -0
- package/dist/es/components/overlays/Modal/Overlay.js +37 -0
- package/dist/es/components/overlays/Modal/Popover.js +56 -0
- package/dist/es/components/overlays/Modal/Tray.js +92 -0
- package/dist/es/components/overlays/Modal/Underlay.js +48 -0
- package/dist/{mjs/components/overlays/Modal/index.d.ts → es/components/overlays/Modal/index.js} +9 -0
- package/dist/es/components/overlays/Notification/Notification.js +37 -0
- package/dist/es/components/overlays/OverlayWrapper.js +31 -0
- package/dist/es/components/overlays/Tooltip/Tooltip.js +97 -0
- package/dist/es/components/overlays/Tooltip/TooltipProvider.js +23 -0
- package/dist/es/components/overlays/Tooltip/TooltipTrigger.js +68 -0
- package/dist/es/components/overlays/Tooltip/context.js +11 -0
- package/dist/es/components/pickers/ComboBox/ComboBox.js +167 -0
- package/dist/es/components/pickers/Select/Select.js +253 -0
- package/dist/es/components/portal/Portal.js +41 -0
- package/dist/es/components/portal/PortalProvider.js +24 -0
- package/dist/es/components/portal/index.js +11 -0
- package/dist/es/components/portal/storybook/templates/basic.js +13 -0
- package/dist/es/components/portal/storybook/templates/index.js +10 -0
- package/dist/es/components/portal/types.js +10 -0
- package/dist/es/components/portal/usePortal.js +41 -0
- package/dist/es/components/status/LoadingAnimation/LoadingAnimation.js +132 -0
- package/dist/es/components/status/Spin/Spin.js +35 -0
- package/dist/es/components/types.js +10 -0
- package/dist/es/data/themes.js +31 -0
- package/dist/es/index.js +96 -0
- package/dist/es/provider.js +46 -0
- package/dist/es/providers/BreakpointsProvider.js +16 -0
- package/dist/es/providers/StylesProvider.js +37 -0
- package/dist/es/services/notification.js +61 -0
- package/dist/es/shared/form.js +10 -0
- package/dist/es/shared/index.js +10 -0
- package/dist/es/stories/FormFieldArgs.js +285 -0
- package/dist/es/stories/components/ConfirmDeletionDialogForm.js +33 -0
- package/dist/es/stories/components/DialogFormApp.js +23 -0
- package/dist/es/stories/components/StyledButton.js +33 -0
- package/dist/es/stories/lists/baseProps.js +39 -0
- package/dist/es/styled/index.js +10 -0
- package/dist/es/styled/styled.js +84 -0
- package/dist/es/styles/align.js +20 -0
- package/dist/es/styles/border.js +48 -0
- package/dist/es/styles/boxShadow.combinator.js +22 -0
- package/dist/es/styles/color.js +39 -0
- package/dist/es/styles/dimension.js +85 -0
- package/dist/es/styles/display.js +13 -0
- package/dist/es/styles/fill.js +38 -0
- package/dist/es/styles/flow.js +20 -0
- package/dist/es/styles/font.js +23 -0
- package/dist/es/styles/fontStyle.js +19 -0
- package/dist/es/styles/gap.js +63 -0
- package/dist/es/styles/groupRadius.js +60 -0
- package/dist/es/styles/height.js +15 -0
- package/dist/es/styles/index.js +99 -0
- package/dist/es/styles/justify.js +20 -0
- package/dist/es/styles/list.js +84 -0
- package/dist/es/styles/margin.js +46 -0
- package/dist/es/styles/marginBlock.js +32 -0
- package/dist/es/styles/marginInline.js +36 -0
- package/dist/es/styles/outline.js +24 -0
- package/dist/es/styles/padding.js +47 -0
- package/dist/es/styles/paddingBlock.js +36 -0
- package/dist/es/styles/paddingInline.js +36 -0
- package/dist/es/styles/predefined.js +120 -0
- package/dist/es/styles/preset.js +51 -0
- package/dist/es/styles/radius.js +72 -0
- package/dist/es/styles/reset.js +100 -0
- package/dist/es/styles/shadow.js +23 -0
- package/dist/es/styles/styledScrollbar.js +51 -0
- package/dist/es/styles/transition.js +84 -0
- package/dist/es/styles/types.js +10 -0
- package/dist/es/styles/width.js +15 -0
- package/dist/es/test/setup.js +12 -0
- package/dist/es/tokens.js +230 -0
- package/dist/es/utils/ResizeSensor.js +320 -0
- package/dist/es/utils/colors.js +15 -0
- package/dist/es/utils/dotize.js +191 -0
- package/dist/es/utils/escape-string.js +18 -0
- package/dist/es/utils/filterBaseProps.js +65 -0
- package/dist/es/utils/index.js +42 -0
- package/dist/es/utils/interactions.js +25 -0
- package/dist/es/utils/mergeStyles.js +32 -0
- package/dist/es/utils/modules.js +12 -0
- package/dist/es/utils/promise.js +14 -0
- package/dist/es/utils/react/Slots.js +42 -0
- package/dist/es/utils/react/chain.js +21 -0
- package/dist/{mjs/utils/react/index.d.ts → es/utils/react/index.js} +9 -0
- package/dist/es/utils/react/isTextOnly.js +13 -0
- package/dist/es/utils/react/mapProps.js +25 -0
- package/dist/es/utils/react/mergeProps.js +60 -0
- package/dist/es/utils/react/modAttrs.js +22 -0
- package/dist/es/utils/react/nullableValue.js +37 -0
- package/dist/es/utils/react/useCombinedRefs.js +26 -0
- package/dist/es/utils/react/useId.js +81 -0
- package/dist/es/utils/react/useLayoutEffect.js +14 -0
- package/dist/es/utils/react/wrapNodeIfPlain.js +18 -0
- package/dist/es/utils/renderStyles.js +127 -0
- package/dist/es/utils/responsive.js +66 -0
- package/dist/es/utils/string.js +12 -0
- package/dist/es/utils/styles.js +844 -0
- package/dist/es/utils/transitions.js +63 -0
- package/dist/es/utils/tree.js +24 -0
- package/dist/es/utils/warnings.js +48 -0
- package/dist/package.json +79 -0
- package/dist/{cjs → types}/components/Base.d.ts +0 -0
- package/dist/{cjs → types}/components/Block.d.ts +0 -0
- package/dist/{cjs → types}/components/GlobalStyles.d.ts +0 -0
- package/dist/{cjs → types}/components/GridProvider.d.ts +0 -0
- package/dist/{cjs → types}/components/HiddenInput.d.ts +0 -0
- package/dist/{cjs → types}/components/OpenTrasition.d.ts +0 -0
- package/dist/{cjs → types}/components/Root.d.ts +0 -0
- package/dist/{cjs → types}/components/actions/Action.d.ts +0 -0
- package/dist/{cjs → types}/components/actions/Button/Button.d.ts +1 -1
- package/dist/{cjs → types}/components/actions/Button/Submit.d.ts +0 -0
- package/dist/types/components/actions/Button/index.d.ts +2 -0
- package/dist/{cjs → types}/components/actions/ButtonGroup/ButtonGroup.d.ts +0 -0
- package/dist/types/components/actions/index.d.ts +10 -0
- package/dist/{cjs → types}/components/content/ActiveZone/ActiveZone.d.ts +0 -0
- package/dist/{cjs → types}/components/content/Avatar/Avatar.d.ts +0 -0
- package/dist/{cjs → types}/components/content/Badge/Badge.d.ts +0 -0
- package/dist/{cjs → types}/components/content/Card/Card.d.ts +0 -0
- package/dist/{cjs → types}/components/content/Content.d.ts +0 -0
- package/dist/{cjs → types}/components/content/Divider.d.ts +0 -0
- package/dist/{cjs → types}/components/content/Footer.d.ts +0 -0
- package/dist/{cjs → types}/components/content/Header.d.ts +0 -0
- package/dist/{cjs → types}/components/content/Paragraph.d.ts +0 -0
- package/dist/{cjs → types}/components/content/Placeholder/Placeholder.d.ts +0 -0
- package/dist/{cjs → types}/components/content/PrismCode/PrismCode.d.ts +0 -0
- package/dist/{cjs → types}/components/content/Result/Result.d.ts +0 -0
- package/dist/{cjs → types}/components/content/Skeleton/Skeleton.d.ts +0 -0
- package/dist/{cjs → types}/components/content/Tag/Tag.d.ts +0 -0
- package/dist/{cjs → types}/components/content/Text.d.ts +0 -0
- package/dist/{cjs → types}/components/content/Title.d.ts +0 -0
- package/dist/{mjs → types}/components/forms/Checkbox/Checkbox.d.ts +1 -1
- package/dist/{mjs → types}/components/forms/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/{cjs → types}/components/forms/Checkbox/context.d.ts +0 -0
- package/dist/{cjs → types}/components/forms/FieldWrapper.d.ts +0 -0
- package/dist/{cjs → types}/components/forms/FileInput/FileInput.d.ts +1 -1
- package/dist/{cjs → types}/components/forms/Form/Field.d.ts +0 -0
- package/dist/{cjs → types}/components/forms/Form/Form.d.ts +0 -0
- package/dist/types/components/forms/Form/index.d.ts +14 -0
- package/dist/{cjs → types}/components/forms/Form/useForm.d.ts +0 -0
- package/dist/{cjs → types}/components/forms/Form/validation.d.ts +0 -0
- package/dist/{cjs → types}/components/forms/Label.d.ts +0 -0
- package/dist/{mjs → types}/components/forms/NumberInput/NumberInput.d.ts +1 -1
- package/dist/{cjs → types}/components/forms/NumberInput/StepButton.d.ts +0 -0
- package/dist/{cjs → types}/components/forms/PasswordInput/PasswordInput.d.ts +0 -0
- package/dist/{mjs → types}/components/forms/RadioGroup/Radio.d.ts +1 -1
- package/dist/{mjs → types}/components/forms/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/{cjs → types}/components/forms/RadioGroup/context.d.ts +0 -0
- package/dist/{cjs → types}/components/forms/SearchInput/SearchInput.d.ts +0 -0
- package/dist/{cjs → types}/components/forms/Switch/Switch.d.ts +1 -1
- package/dist/{cjs → types}/components/forms/TextArea/TextArea.d.ts +0 -0
- package/dist/{cjs → types}/components/forms/TextInput/TextInput.d.ts +0 -0
- package/dist/{cjs → types}/components/forms/TextInput/TextInputBase.d.ts +1 -1
- package/dist/types/components/forms/index.d.ts +35 -0
- package/dist/{cjs → types}/components/layout/Flex.d.ts +0 -0
- package/dist/{cjs → types}/components/layout/Flow.d.ts +0 -0
- package/dist/{cjs → types}/components/layout/Grid.d.ts +0 -0
- package/dist/{cjs → types}/components/layout/Prefix.d.ts +0 -0
- package/dist/{cjs → types}/components/layout/Space.d.ts +0 -0
- package/dist/{cjs → types}/components/layout/Suffix.d.ts +0 -0
- package/dist/{cjs → types}/components/navigation/LegacyTabs/LegacyTabs.d.ts +0 -0
- package/dist/{cjs → types}/components/navigation/Link/Link.d.ts +0 -0
- package/dist/{cjs → types}/components/organisms/Alert/Alert.d.ts +0 -0
- package/dist/{cjs → types}/components/organisms/CopySnippet/CopySnippet.d.ts +0 -0
- package/dist/{cjs → types}/components/organisms/DirectoryTree/DirectoryTree.d.ts +0 -0
- package/dist/{cjs → types}/components/organisms/FileTabs/FileTabs.d.ts +0 -0
- package/dist/{mjs → types}/components/organisms/Modal/Modal.d.ts +2 -0
- package/dist/{cjs → types}/components/organisms/SearchResults/SearchResults.d.ts +0 -0
- package/dist/{cjs → types}/components/organisms/StatsCard/StatsCard.d.ts +0 -0
- package/dist/{cjs → types}/components/organisms/TopBar/TopBar.d.ts +0 -0
- package/dist/{cjs → types}/components/other/Base64Upload/Base64Upload.d.ts +0 -0
- package/dist/{cjs → types}/components/other/CloudLogo/CloudLogo.d.ts +0 -0
- package/dist/{mjs → types}/components/overlays/AlertDialog/AlertDialog.d.ts +3 -2
- package/dist/types/components/overlays/AlertDialog/AlertDialogApiProvider.d.ts +48 -0
- package/dist/types/components/overlays/AlertDialog/AlertDialogZone.d.ts +9 -0
- package/dist/types/components/overlays/AlertDialog/index.d.ts +3 -0
- package/dist/types/components/overlays/AlertDialog/types.d.ts +39 -0
- package/dist/{mjs → types}/components/overlays/Dialog/Dialog.d.ts +1 -1
- package/dist/{mjs → types}/components/overlays/Dialog/DialogContainer.d.ts +9 -4
- package/dist/{cjs → types}/components/overlays/Dialog/DialogForm.d.ts +0 -0
- package/dist/{cjs → types}/components/overlays/Dialog/DialogTrigger.d.ts +0 -0
- package/dist/{cjs → types}/components/overlays/Dialog/context.d.ts +0 -0
- package/dist/types/components/overlays/Dialog/index.d.ts +4 -0
- package/dist/{cjs → types}/components/overlays/Modal/Modal.d.ts +3 -2
- package/dist/{cjs → types}/components/overlays/Modal/OpenTransition.d.ts +0 -0
- package/dist/{cjs → types}/components/overlays/Modal/Overlay.d.ts +3 -2
- package/dist/{mjs → types}/components/overlays/Modal/Popover.d.ts +1 -0
- package/dist/{mjs → types}/components/overlays/Modal/Tray.d.ts +2 -1
- package/dist/{cjs → types}/components/overlays/Modal/Underlay.d.ts +0 -0
- package/dist/{cjs → types}/components/overlays/Modal/index.d.ts +0 -0
- package/dist/{cjs → types}/components/overlays/Notification/Notification.d.ts +0 -0
- package/dist/{mjs → types}/components/overlays/OverlayWrapper.d.ts +2 -2
- package/dist/{cjs → types}/components/overlays/Tooltip/Tooltip.d.ts +1 -1
- package/dist/{cjs → types}/components/overlays/Tooltip/TooltipProvider.d.ts +0 -0
- package/dist/{cjs → types}/components/overlays/Tooltip/TooltipTrigger.d.ts +1 -1
- package/dist/{cjs → types}/components/overlays/Tooltip/context.d.ts +0 -0
- package/dist/{mjs → types}/components/pickers/ComboBox/ComboBox.d.ts +2 -2
- package/dist/{mjs → types}/components/pickers/Select/Select.d.ts +1 -1
- package/dist/types/components/portal/Portal.d.ts +26 -0
- package/dist/types/components/portal/PortalProvider.d.ts +13 -0
- package/dist/types/components/portal/index.d.ts +3 -0
- package/dist/types/components/portal/storybook/templates/basic.d.ts +3 -0
- package/dist/types/components/portal/storybook/templates/index.d.ts +1 -0
- package/dist/types/components/portal/types.d.ts +21 -0
- package/dist/types/components/portal/usePortal.d.ts +10 -0
- package/dist/{cjs → types}/components/status/LoadingAnimation/LoadingAnimation.d.ts +0 -0
- package/dist/{cjs → types}/components/status/Spin/Spin.d.ts +0 -0
- package/dist/{mjs → types}/components/types.d.ts +3 -4
- package/dist/{cjs → types}/data/themes.d.ts +0 -0
- package/dist/{mjs → types}/index.d.ts +7 -56
- package/dist/{mjs → types}/provider.d.ts +1 -2
- package/dist/{cjs → types}/providers/BreakpointsProvider.d.ts +0 -0
- package/dist/{cjs → types}/providers/StylesProvider.d.ts +0 -0
- package/dist/{cjs → types}/services/notification.d.ts +0 -0
- package/dist/{cjs → types}/shared/form.d.ts +0 -0
- package/dist/{cjs → types}/shared/index.d.ts +0 -0
- package/dist/{cjs → types}/stories/FormFieldArgs.d.ts +0 -0
- package/dist/{cjs → types}/stories/components/ConfirmDeletionDialogForm.d.ts +0 -0
- package/dist/{cjs → types}/stories/components/DialogFormApp.d.ts +0 -0
- package/dist/types/stories/components/StyledButton.d.ts +119 -0
- package/dist/{cjs → types}/stories/lists/baseProps.d.ts +0 -0
- package/dist/types/styled/index.d.ts +1 -0
- package/dist/types/styled/styled.d.ts +30 -0
- package/dist/{cjs → types}/styles/align.d.ts +0 -0
- package/dist/{cjs → types}/styles/border.d.ts +0 -0
- package/dist/{cjs → types}/styles/boxShadow.combinator.d.ts +0 -0
- package/dist/{cjs → types}/styles/color.d.ts +0 -0
- package/dist/{cjs → types}/styles/dimension.d.ts +0 -0
- package/dist/{cjs → types}/styles/display.d.ts +0 -0
- package/dist/{cjs → types}/styles/fill.d.ts +0 -0
- package/dist/{cjs → types}/styles/flow.d.ts +0 -0
- package/dist/{cjs → types}/styles/font.d.ts +0 -0
- package/dist/{cjs → types}/styles/fontStyle.d.ts +0 -0
- package/dist/{cjs → types}/styles/gap.d.ts +0 -0
- package/dist/{cjs → types}/styles/groupRadius.d.ts +0 -0
- package/dist/{cjs → types}/styles/height.d.ts +0 -0
- package/dist/{cjs → types}/styles/index.d.ts +0 -0
- package/dist/{cjs → types}/styles/justify.d.ts +0 -0
- package/dist/{cjs → types}/styles/list.d.ts +0 -0
- package/dist/{cjs → types}/styles/margin.d.ts +0 -0
- package/dist/{cjs → types}/styles/marginBlock.d.ts +0 -0
- package/dist/{cjs → types}/styles/marginInline.d.ts +0 -0
- package/dist/{cjs → types}/styles/outline.d.ts +0 -0
- package/dist/{cjs → types}/styles/padding.d.ts +0 -0
- package/dist/{cjs → types}/styles/paddingBlock.d.ts +0 -0
- package/dist/{cjs → types}/styles/paddingInline.d.ts +0 -0
- package/dist/{cjs → types}/styles/predefined.d.ts +0 -0
- package/dist/{cjs → types}/styles/preset.d.ts +0 -0
- package/dist/{cjs → types}/styles/radius.d.ts +0 -0
- package/dist/{cjs → types}/styles/reset.d.ts +0 -0
- package/dist/{cjs → types}/styles/shadow.d.ts +0 -0
- package/dist/{cjs → types}/styles/styledScrollbar.d.ts +0 -0
- package/dist/{cjs → types}/styles/transition.d.ts +0 -0
- package/dist/{cjs → types}/styles/types.d.ts +0 -0
- package/dist/{cjs → types}/styles/width.d.ts +0 -0
- package/dist/types/test/setup.d.ts +3 -0
- package/dist/{cjs → types}/tokens.d.ts +0 -0
- package/dist/{cjs → types}/utils/ResizeSensor.d.ts +0 -0
- package/dist/{cjs → types}/utils/colors.d.ts +0 -0
- package/dist/{cjs → types}/utils/dotize.d.ts +0 -0
- package/dist/{cjs → types}/utils/escape-string.d.ts +0 -0
- package/dist/{cjs → types}/utils/filterBaseProps.d.ts +0 -0
- package/dist/{cjs → types}/utils/index.d.ts +0 -0
- package/dist/{cjs → types}/utils/interactions.d.ts +0 -0
- package/dist/{cjs → types}/utils/mergeStyles.d.ts +0 -0
- package/dist/{cjs → types}/utils/modules.d.ts +0 -0
- package/dist/{cjs → types}/utils/promise.d.ts +0 -0
- package/dist/{cjs → types}/utils/react/Slots.d.ts +0 -0
- package/dist/{cjs → types}/utils/react/chain.d.ts +0 -0
- package/dist/{cjs → types}/utils/react/index.d.ts +0 -0
- package/dist/{cjs → types}/utils/react/isTextOnly.d.ts +0 -0
- package/dist/{cjs → types}/utils/react/mapProps.d.ts +0 -0
- package/dist/{cjs → types}/utils/react/mergeProps.d.ts +0 -0
- package/dist/{cjs → types}/utils/react/modAttrs.d.ts +0 -0
- package/dist/{cjs → types}/utils/react/nullableValue.d.ts +0 -0
- package/dist/{cjs → types}/utils/react/useCombinedRefs.d.ts +0 -0
- package/dist/{cjs → types}/utils/react/useId.d.ts +0 -0
- package/dist/{cjs → types}/utils/react/useLayoutEffect.d.ts +0 -0
- package/dist/{cjs → types}/utils/react/wrapNodeIfPlain.d.ts +0 -0
- package/dist/{cjs → types}/utils/renderStyles.d.ts +0 -0
- package/dist/{cjs → types}/utils/responsive.d.ts +0 -0
- package/dist/{cjs → types}/utils/string.d.ts +0 -0
- package/dist/{cjs → types}/utils/styles.d.ts +0 -0
- package/dist/{cjs → types}/utils/transitions.d.ts +0 -0
- package/dist/{cjs → types}/utils/tree.d.ts +0 -0
- package/dist/types/utils/warnings.d.ts +9 -0
- package/package.json +70 -59
- package/dist/cjs/App.d.ts +0 -3
- package/dist/cjs/components/forms/Checkbox/Checkbox.d.ts +0 -19
- package/dist/cjs/components/forms/Checkbox/CheckboxGroup.d.ts +0 -16
- package/dist/cjs/components/forms/Form/index.d.ts +0 -5
- package/dist/cjs/components/forms/NumberInput/NumberInput.d.ts +0 -15
- package/dist/cjs/components/forms/RadioGroup/Radio.d.ts +0 -27
- package/dist/cjs/components/forms/RadioGroup/RadioGroup.d.ts +0 -17
- package/dist/cjs/components/organisms/Modal/Modal.d.ts +0 -26
- package/dist/cjs/components/overlays/AlertDialog/AlertDialog.d.ts +0 -20
- package/dist/cjs/components/overlays/Dialog/Dialog.d.ts +0 -21
- package/dist/cjs/components/overlays/Dialog/DialogContainer.d.ts +0 -22
- package/dist/cjs/components/overlays/Dialog/api.d.ts +0 -24
- package/dist/cjs/components/overlays/Dialog/index.d.ts +0 -12
- package/dist/cjs/components/overlays/Modal/Popover.d.ts +0 -16
- package/dist/cjs/components/overlays/Modal/Tray.d.ts +0 -13
- package/dist/cjs/components/overlays/OverlayWrapper.d.ts +0 -10
- package/dist/cjs/components/pickers/ComboBox/ComboBox.d.ts +0 -25
- package/dist/cjs/components/pickers/Select/Select.d.ts +0 -48
- package/dist/cjs/components/types.d.ts +0 -82
- package/dist/cjs/index.d.ts +0 -200
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/provider.d.ts +0 -24
- package/dist/cjs/stories/components/StyledButton.d.ts +0 -4
- package/dist/cjs/styled.d.ts +0 -11
- package/dist/cjs/utils/warnings.d.ts +0 -3
- package/dist/mjs/App.d.ts +0 -3
- package/dist/mjs/components/Base.d.ts +0 -4
- package/dist/mjs/components/Block.d.ts +0 -8
- package/dist/mjs/components/GlobalStyles.d.ts +0 -1
- package/dist/mjs/components/GridProvider.d.ts +0 -10
- package/dist/mjs/components/HiddenInput.d.ts +0 -1
- package/dist/mjs/components/OpenTrasition.d.ts +0 -14
- package/dist/mjs/components/Root.d.ts +0 -17
- package/dist/mjs/components/actions/Action.d.ts +0 -24
- package/dist/mjs/components/actions/Button/Button.d.ts +0 -19
- package/dist/mjs/components/actions/Button/Submit.d.ts +0 -3
- package/dist/mjs/components/actions/ButtonGroup/ButtonGroup.d.ts +0 -3
- package/dist/mjs/components/content/ActiveZone/ActiveZone.d.ts +0 -9
- package/dist/mjs/components/content/Avatar/Avatar.d.ts +0 -8
- package/dist/mjs/components/content/Badge/Badge.d.ts +0 -7
- package/dist/mjs/components/content/Card/Card.d.ts +0 -5
- package/dist/mjs/components/content/Content.d.ts +0 -5
- package/dist/mjs/components/content/Divider.d.ts +0 -5
- package/dist/mjs/components/content/Footer.d.ts +0 -5
- package/dist/mjs/components/content/Header.d.ts +0 -5
- package/dist/mjs/components/content/Paragraph.d.ts +0 -6
- package/dist/mjs/components/content/Placeholder/Placeholder.d.ts +0 -8
- package/dist/mjs/components/content/PrismCode/PrismCode.d.ts +0 -17
- package/dist/mjs/components/content/Result/Result.d.ts +0 -20
- package/dist/mjs/components/content/Skeleton/Skeleton.d.ts +0 -56
- package/dist/mjs/components/content/Tag/Tag.d.ts +0 -10
- package/dist/mjs/components/content/Text.d.ts +0 -37
- package/dist/mjs/components/content/Title.d.ts +0 -12
- package/dist/mjs/components/forms/Checkbox/context.d.ts +0 -3
- package/dist/mjs/components/forms/FieldWrapper.d.ts +0 -32
- package/dist/mjs/components/forms/FileInput/FileInput.d.ts +0 -27
- package/dist/mjs/components/forms/Form/Field.d.ts +0 -31
- package/dist/mjs/components/forms/Form/Form.d.ts +0 -30
- package/dist/mjs/components/forms/Form/index.d.ts +0 -5
- package/dist/mjs/components/forms/Form/useForm.d.ts +0 -52
- package/dist/mjs/components/forms/Form/validation.d.ts +0 -2
- package/dist/mjs/components/forms/Label.d.ts +0 -18
- package/dist/mjs/components/forms/NumberInput/StepButton.d.ts +0 -5
- package/dist/mjs/components/forms/PasswordInput/PasswordInput.d.ts +0 -12
- package/dist/mjs/components/forms/RadioGroup/context.d.ts +0 -4
- package/dist/mjs/components/forms/SearchInput/SearchInput.d.ts +0 -10
- package/dist/mjs/components/forms/Switch/Switch.d.ts +0 -19
- package/dist/mjs/components/forms/TextArea/TextArea.d.ts +0 -19
- package/dist/mjs/components/forms/TextInput/TextInput.d.ts +0 -12
- package/dist/mjs/components/forms/TextInput/TextInputBase.d.ts +0 -42
- package/dist/mjs/components/layout/Flex.d.ts +0 -5
- package/dist/mjs/components/layout/Flow.d.ts +0 -5
- package/dist/mjs/components/layout/Grid.d.ts +0 -5
- package/dist/mjs/components/layout/Prefix.d.ts +0 -7
- package/dist/mjs/components/layout/Space.d.ts +0 -6
- package/dist/mjs/components/layout/Suffix.d.ts +0 -7
- package/dist/mjs/components/navigation/LegacyTabs/LegacyTabs.d.ts +0 -43
- package/dist/mjs/components/navigation/Link/Link.d.ts +0 -3
- package/dist/mjs/components/organisms/Alert/Alert.d.ts +0 -8
- package/dist/mjs/components/organisms/CopySnippet/CopySnippet.d.ts +0 -26
- package/dist/mjs/components/organisms/DirectoryTree/DirectoryTree.d.ts +0 -44
- package/dist/mjs/components/organisms/FileTabs/FileTabs.d.ts +0 -34
- package/dist/mjs/components/organisms/SearchResults/SearchResults.d.ts +0 -31
- package/dist/mjs/components/organisms/StatsCard/StatsCard.d.ts +0 -8
- package/dist/mjs/components/organisms/TopBar/TopBar.d.ts +0 -6
- package/dist/mjs/components/other/Base64Upload/Base64Upload.d.ts +0 -5
- package/dist/mjs/components/other/CloudLogo/CloudLogo.d.ts +0 -4
- package/dist/mjs/components/overlays/Dialog/DialogForm.d.ts +0 -27
- package/dist/mjs/components/overlays/Dialog/DialogTrigger.d.ts +0 -36
- package/dist/mjs/components/overlays/Dialog/api.d.ts +0 -24
- package/dist/mjs/components/overlays/Dialog/context.d.ts +0 -7
- package/dist/mjs/components/overlays/Dialog/index.d.ts +0 -12
- package/dist/mjs/components/overlays/Modal/Modal.d.ts +0 -13
- package/dist/mjs/components/overlays/Modal/OpenTransition.d.ts +0 -2
- package/dist/mjs/components/overlays/Modal/Overlay.d.ts +0 -6
- package/dist/mjs/components/overlays/Modal/Underlay.d.ts +0 -9
- package/dist/mjs/components/overlays/Notification/Notification.d.ts +0 -7
- package/dist/mjs/components/overlays/Tooltip/Tooltip.d.ts +0 -16
- package/dist/mjs/components/overlays/Tooltip/TooltipProvider.d.ts +0 -13
- package/dist/mjs/components/overlays/Tooltip/TooltipTrigger.d.ts +0 -20
- package/dist/mjs/components/overlays/Tooltip/context.d.ts +0 -16
- package/dist/mjs/components/status/LoadingAnimation/LoadingAnimation.d.ts +0 -6
- package/dist/mjs/components/status/Spin/Spin.d.ts +0 -8
- package/dist/mjs/data/themes.d.ts +0 -23
- package/dist/mjs/index.js +0 -46
- package/dist/mjs/index.js.map +0 -1
- package/dist/mjs/providers/BreakpointsProvider.d.ts +0 -8
- package/dist/mjs/providers/StylesProvider.d.ts +0 -10
- package/dist/mjs/services/notification.d.ts +0 -25
- package/dist/mjs/shared/form.d.ts +0 -70
- package/dist/mjs/shared/index.d.ts +0 -3
- package/dist/mjs/stories/FormFieldArgs.d.ts +0 -325
- package/dist/mjs/stories/components/ConfirmDeletionDialogForm.d.ts +0 -7
- package/dist/mjs/stories/components/DialogFormApp.d.ts +0 -2
- package/dist/mjs/stories/components/StyledButton.d.ts +0 -4
- package/dist/mjs/stories/lists/baseProps.d.ts +0 -1
- package/dist/mjs/styled.d.ts +0 -11
- package/dist/mjs/styles/align.d.ts +0 -9
- package/dist/mjs/styles/border.d.ts +0 -11
- package/dist/mjs/styles/boxShadow.combinator.d.ts +0 -6
- package/dist/mjs/styles/color.d.ts +0 -6
- package/dist/mjs/styles/dimension.d.ts +0 -4
- package/dist/mjs/styles/display.d.ts +0 -9
- package/dist/mjs/styles/fill.d.ts +0 -6
- package/dist/mjs/styles/flow.d.ts +0 -9
- package/dist/mjs/styles/font.d.ts +0 -9
- package/dist/mjs/styles/fontStyle.d.ts +0 -8
- package/dist/mjs/styles/gap.d.ts +0 -21
- package/dist/mjs/styles/groupRadius.d.ts +0 -11
- package/dist/mjs/styles/height.d.ts +0 -9
- package/dist/mjs/styles/index.d.ts +0 -8
- package/dist/mjs/styles/justify.d.ts +0 -9
- package/dist/mjs/styles/list.d.ts +0 -9
- package/dist/mjs/styles/margin.d.ts +0 -12
- package/dist/mjs/styles/marginBlock.d.ts +0 -8
- package/dist/mjs/styles/marginInline.d.ts +0 -8
- package/dist/mjs/styles/outline.d.ts +0 -8
- package/dist/mjs/styles/padding.d.ts +0 -12
- package/dist/mjs/styles/paddingBlock.d.ts +0 -8
- package/dist/mjs/styles/paddingInline.d.ts +0 -8
- package/dist/mjs/styles/predefined.d.ts +0 -1
- package/dist/mjs/styles/preset.d.ts +0 -13
- package/dist/mjs/styles/radius.d.ts +0 -16
- package/dist/mjs/styles/reset.d.ts +0 -6
- package/dist/mjs/styles/shadow.d.ts +0 -8
- package/dist/mjs/styles/styledScrollbar.d.ts +0 -54
- package/dist/mjs/styles/transition.d.ts +0 -9
- package/dist/mjs/styles/types.d.ts +0 -111
- package/dist/mjs/styles/width.d.ts +0 -9
- package/dist/mjs/tokens.d.ts +0 -159
- package/dist/mjs/utils/ResizeSensor.d.ts +0 -9
- package/dist/mjs/utils/colors.d.ts +0 -1
- package/dist/mjs/utils/dotize.d.ts +0 -21
- package/dist/mjs/utils/escape-string.d.ts +0 -1
- package/dist/mjs/utils/filterBaseProps.d.ts +0 -12
- package/dist/mjs/utils/index.d.ts +0 -1
- package/dist/mjs/utils/interactions.d.ts +0 -6
- package/dist/mjs/utils/mergeStyles.d.ts +0 -2
- package/dist/mjs/utils/modules.d.ts +0 -1
- package/dist/mjs/utils/promise.d.ts +0 -1
- package/dist/mjs/utils/react/Slots.d.ts +0 -4
- package/dist/mjs/utils/react/chain.d.ts +0 -4
- package/dist/mjs/utils/react/isTextOnly.d.ts +0 -1
- package/dist/mjs/utils/react/mapProps.d.ts +0 -6
- package/dist/mjs/utils/react/mergeProps.d.ts +0 -9
- package/dist/mjs/utils/react/modAttrs.d.ts +0 -6
- package/dist/mjs/utils/react/nullableValue.d.ts +0 -19
- package/dist/mjs/utils/react/useCombinedRefs.d.ts +0 -2
- package/dist/mjs/utils/react/useId.d.ts +0 -15
- package/dist/mjs/utils/react/useLayoutEffect.d.ts +0 -2
- package/dist/mjs/utils/react/wrapNodeIfPlain.d.ts +0 -2
- package/dist/mjs/utils/renderStyles.d.ts +0 -10
- package/dist/mjs/utils/responsive.d.ts +0 -9
- package/dist/mjs/utils/string.d.ts +0 -1
- package/dist/mjs/utils/styles.d.ts +0 -198
- package/dist/mjs/utils/transitions.d.ts +0 -8
- package/dist/mjs/utils/tree.d.ts +0 -1
- package/dist/mjs/utils/warnings.d.ts +0 -3
@@ -0,0 +1,296 @@
|
|
1
|
+
/**
|
2
|
+
* @license MIT
|
3
|
+
* author: Cube Dev Team
|
4
|
+
* @cube-dev/ui-kit v0.9.0
|
5
|
+
* Released under the MIT license.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
9
|
+
import { createContext, useContext, useEffect, useLayoutEffect, useRef, useState, } from 'react';
|
10
|
+
import { CloseOutlined } from '@ant-design/icons';
|
11
|
+
import { Block } from '../../Block';
|
12
|
+
import { Action } from '../../actions/Action';
|
13
|
+
import { Space } from '../../layout/Space';
|
14
|
+
import { Flex } from '../../layout/Flex';
|
15
|
+
const FileTabsContext = createContext({
|
16
|
+
addTab() { },
|
17
|
+
removeTab() { },
|
18
|
+
setTab() { },
|
19
|
+
setDirtyTab() { },
|
20
|
+
});
|
21
|
+
const TABS_PANEL_CSS = `
|
22
|
+
position: relative;
|
23
|
+
overflow: auto hidden;
|
24
|
+
top: 1px;
|
25
|
+
white-space: nowrap;
|
26
|
+
|
27
|
+
::-webkit-scrollbar-track {
|
28
|
+
background: var(--grey-light-color);
|
29
|
+
}
|
30
|
+
|
31
|
+
::-webkit-scrollbar-thumb {
|
32
|
+
border-radius: 1px;
|
33
|
+
background: var(--dark-04-color);
|
34
|
+
background-clip: padding-box;
|
35
|
+
}
|
36
|
+
|
37
|
+
::-webkit-scrollbar-corner {
|
38
|
+
background-color: transparent;
|
39
|
+
}
|
40
|
+
|
41
|
+
::-webkit-scrollbar {
|
42
|
+
width: 3px;
|
43
|
+
height: 3px;
|
44
|
+
}
|
45
|
+
`;
|
46
|
+
const TABS_CONTAINER_CSS = `
|
47
|
+
position: relative;
|
48
|
+
|
49
|
+
&::before {
|
50
|
+
content: '';
|
51
|
+
display: block;
|
52
|
+
opacity: 0;
|
53
|
+
position: absolute;
|
54
|
+
top: 0;
|
55
|
+
left: 0;
|
56
|
+
pointer-events: none;
|
57
|
+
width: 32px;
|
58
|
+
height: 37px;
|
59
|
+
transition: all .15s linear;
|
60
|
+
background-image: linear-gradient(
|
61
|
+
to left,
|
62
|
+
rgba(255, 255, 255, 0),
|
63
|
+
rgba(255, 255, 255, 1)
|
64
|
+
);
|
65
|
+
z-index: 10;
|
66
|
+
}
|
67
|
+
|
68
|
+
&::after {
|
69
|
+
content: '';
|
70
|
+
display: block;
|
71
|
+
opacity: 0;
|
72
|
+
position: absolute;
|
73
|
+
top: 0;
|
74
|
+
right: 0;
|
75
|
+
width: 32px;
|
76
|
+
height: 37px;
|
77
|
+
pointer-events: none;
|
78
|
+
transition: all .15s linear;
|
79
|
+
background-image: linear-gradient(
|
80
|
+
to right,
|
81
|
+
rgba(255, 255, 255, 0),
|
82
|
+
rgba(255, 255, 255, 1)
|
83
|
+
);
|
84
|
+
z-index: 10;
|
85
|
+
}
|
86
|
+
|
87
|
+
&[data-is-left-fade]::before, &[data-is-right-fade]::after {
|
88
|
+
opacity: 1;
|
89
|
+
}
|
90
|
+
`;
|
91
|
+
const DIRTY_BADGE_CSS = `
|
92
|
+
position: absolute;
|
93
|
+
top: 50%;
|
94
|
+
left: 50%;
|
95
|
+
transform: translate(-50%, -50%);
|
96
|
+
transition: all .2s linear;
|
97
|
+
`;
|
98
|
+
const TAB_STYLES = {
|
99
|
+
radius: '1r 1r 0 0',
|
100
|
+
padding: '1x 1.5x',
|
101
|
+
border: {
|
102
|
+
'': 'left top right #clear',
|
103
|
+
disabled: 'left top right rgb(227, 227, 233)',
|
104
|
+
},
|
105
|
+
fill: {
|
106
|
+
'': '#dark.04',
|
107
|
+
hovered: '#dark.08',
|
108
|
+
'disabled, disabled & hover': '#white',
|
109
|
+
},
|
110
|
+
color: {
|
111
|
+
'': '#dark.75',
|
112
|
+
'disabled, hovered, hovered & disabled': '#dark',
|
113
|
+
},
|
114
|
+
cursor: {
|
115
|
+
'': 'pointer',
|
116
|
+
disabled: 'default',
|
117
|
+
},
|
118
|
+
fontWeight: 500,
|
119
|
+
opacity: 1,
|
120
|
+
preset: 'default',
|
121
|
+
outline: {
|
122
|
+
'': 'inset #purple-03.0',
|
123
|
+
'focused & focus-visible': 'inset #purple-03',
|
124
|
+
},
|
125
|
+
};
|
126
|
+
const CLOSE_STYLES = {
|
127
|
+
color: {
|
128
|
+
'': '#dark.50',
|
129
|
+
hovered: '#dark',
|
130
|
+
},
|
131
|
+
padding: '0 .25x',
|
132
|
+
outline: {
|
133
|
+
'': '#purple-03.0',
|
134
|
+
'focused & focus-visible': '#purple-03',
|
135
|
+
},
|
136
|
+
radius: '1r',
|
137
|
+
};
|
138
|
+
const TAB_CSS = `
|
139
|
+
margin-bottom: var(--border-width);
|
140
|
+
transform: translate(0, 0);
|
141
|
+
transition: color .2s linear, background-color .2s linear;
|
142
|
+
|
143
|
+
&[disabled] {
|
144
|
+
transform: translate(0, var(--border-width));
|
145
|
+
}
|
146
|
+
|
147
|
+
&.file-tab--dirty {
|
148
|
+
&:hover {
|
149
|
+
& .file-tab-dirty-badge {
|
150
|
+
opacity: 0;
|
151
|
+
pointer-events: none;
|
152
|
+
}
|
153
|
+
|
154
|
+
& .file-tab-close {
|
155
|
+
opacity: 1;
|
156
|
+
}
|
157
|
+
}
|
158
|
+
|
159
|
+
&:not(:hover) {
|
160
|
+
& .file-tab-dirty-badge {
|
161
|
+
opacity: 1;
|
162
|
+
}
|
163
|
+
|
164
|
+
& .file-tab-close {
|
165
|
+
opacity: 0;
|
166
|
+
}
|
167
|
+
}
|
168
|
+
}
|
169
|
+
`;
|
170
|
+
const Tab = ({ isDirty, isDisabled, children, isClosable, onClose, ...props }) => {
|
171
|
+
return (_jsx(Action, { className: isDirty ? 'file-tab--dirty' : '', css: TAB_CSS, styles: TAB_STYLES, isDisabled: isDisabled, ...props, children: _jsxs(Space, { gap: ".75x", children: [_jsx(Block, { children: children }, void 0), (isClosable || isDirty) && (_jsxs(Flex, { placeItems: "center", style: { position: 'relative' }, children: [isClosable ? (_jsx(Action, { onPress: onClose, className: "file-tab-close", styles: CLOSE_STYLES, children: _jsx(CloseOutlined, {}, void 0) }, void 0)) : (_jsx("div", {}, void 0)), isDirty ? (_jsx(Block, { className: "file-tab-dirty-badge", css: DIRTY_BADGE_CSS, width: "1x", height: "1x", fill: "#dark.30", radius: "round" }, void 0)) : null] }, void 0))] }, void 0) }, void 0));
|
172
|
+
};
|
173
|
+
export function FileTabs({ defaultActiveKey, activeKey: activeKeyProp, onTabClick, onTabClose, paneStyles, isClosable = true, children, ...props }) {
|
174
|
+
const tabsRef = useRef(null);
|
175
|
+
const [tabs, setTabs] = useState([]);
|
176
|
+
const [activeKey, setActiveKey] = useState(activeKeyProp || defaultActiveKey);
|
177
|
+
const [leftFade, setLeftFade] = useState(false);
|
178
|
+
const [rightFade, setRightFade] = useState(false);
|
179
|
+
function updateScroll() {
|
180
|
+
const el = tabsRef && tabsRef.current;
|
181
|
+
if (!el)
|
182
|
+
return;
|
183
|
+
setLeftFade(!!el.scrollLeft);
|
184
|
+
setRightFade(el.scrollWidth !== el.offsetWidth
|
185
|
+
&& !!(el.scrollWidth - el.offsetWidth - el.scrollLeft));
|
186
|
+
}
|
187
|
+
useLayoutEffect(updateScroll, [tabs]);
|
188
|
+
function scrollCurrentIntoView() {
|
189
|
+
const el = tabsRef && tabsRef.current;
|
190
|
+
if (!el)
|
191
|
+
return;
|
192
|
+
const current = el.querySelector('button[disabled]');
|
193
|
+
if (!current)
|
194
|
+
return;
|
195
|
+
current.scrollIntoView({ behavior: 'smooth', inline: 'end', block: 'end' });
|
196
|
+
}
|
197
|
+
useEffect(() => {
|
198
|
+
function update() {
|
199
|
+
updateScroll();
|
200
|
+
}
|
201
|
+
if (tabsRef && tabsRef.current) {
|
202
|
+
tabsRef.current.addEventListener('scroll', update);
|
203
|
+
tabsRef.current.addEventListener('mousewheel', update);
|
204
|
+
window.addEventListener('resize', update);
|
205
|
+
}
|
206
|
+
return () => {
|
207
|
+
if (tabsRef && tabsRef.current) {
|
208
|
+
tabsRef.current.removeEventListener('scroll', update);
|
209
|
+
tabsRef.current.removeEventListener('mousewheel', update);
|
210
|
+
}
|
211
|
+
window.removeEventListener('resize', update);
|
212
|
+
};
|
213
|
+
}, [tabsRef]);
|
214
|
+
useEffect(scrollCurrentIntoView, [activeKey]);
|
215
|
+
useEffect(() => {
|
216
|
+
setActiveKey(activeKeyProp);
|
217
|
+
}, [activeKeyProp]);
|
218
|
+
function getTab(tabs, key) {
|
219
|
+
return tabs.find((tab) => tab.id === key);
|
220
|
+
}
|
221
|
+
function setTab(key) {
|
222
|
+
if (getTab(tabs, key)) {
|
223
|
+
setActiveKey(key);
|
224
|
+
}
|
225
|
+
}
|
226
|
+
function addTab(tab) {
|
227
|
+
setTabs((tabs) => {
|
228
|
+
if (!getTab(tabs, tab.id)) {
|
229
|
+
return [...tabs, tab];
|
230
|
+
}
|
231
|
+
return tabs;
|
232
|
+
});
|
233
|
+
}
|
234
|
+
function setDirtyTab(id, isDirty) {
|
235
|
+
setTabs((tabs) => {
|
236
|
+
const tab = getTab(tabs, id);
|
237
|
+
if (tab) {
|
238
|
+
tab.isDirty = isDirty;
|
239
|
+
return [...tabs];
|
240
|
+
}
|
241
|
+
return tabs;
|
242
|
+
});
|
243
|
+
}
|
244
|
+
function handleClose(tab) {
|
245
|
+
if (getTab(tabs, tab.id)) {
|
246
|
+
onTabClose && onTabClose(tab.id);
|
247
|
+
}
|
248
|
+
}
|
249
|
+
function removeTab(tab) {
|
250
|
+
setTabs((tabs) => {
|
251
|
+
const _tabs = tabs.filter((_tab) => _tab.id !== tab.id);
|
252
|
+
setActiveKey((prevActiveKey) => {
|
253
|
+
if (prevActiveKey === tab.id) {
|
254
|
+
return _tabs[0] && _tabs[0].id;
|
255
|
+
}
|
256
|
+
return prevActiveKey;
|
257
|
+
});
|
258
|
+
return _tabs;
|
259
|
+
});
|
260
|
+
}
|
261
|
+
function onPress(tab) {
|
262
|
+
setTab(tab.id);
|
263
|
+
onTabClick && onTabClick(tab.id);
|
264
|
+
}
|
265
|
+
return (_jsx(Flex, { flow: "column", height: "max 100%", width: "max 100%", "data-is-left-fade": leftFade || null, "data-is-right-fade": rightFade || null, css: TABS_CONTAINER_CSS, ...props, children: _jsxs(FileTabsContext.Provider, { value: {
|
266
|
+
addTab,
|
267
|
+
setTab,
|
268
|
+
removeTab,
|
269
|
+
setDirtyTab,
|
270
|
+
currentTab: activeKey,
|
271
|
+
}, children: [_jsx(Space, { ref: tabsRef, gap: ".5x", flexShrink: 0, css: TABS_PANEL_CSS, children: tabs.map((tab) => {
|
272
|
+
return (_jsx(Tab, { onPress: () => onPress(tab), onClose: () => isClosable && handleClose(tab), isClosable: isClosable, isDisabled: tab.id === activeKey || false, isDirty: tab.isDirty, children: tab.title }, tab.id));
|
273
|
+
}) }, void 0), _jsx(Flex, { flexGrow: 1, border: "top rgb(227, 227, 233)", ...(paneStyles || {}), children: children }, void 0)] }, void 0) }, void 0));
|
274
|
+
}
|
275
|
+
FileTabs.TabPane = function FileTabPane(allProps) {
|
276
|
+
let { id, title, isDirty, children, ...props } = allProps;
|
277
|
+
const { addTab, removeTab, currentTab, setDirtyTab } = useContext(FileTabsContext);
|
278
|
+
useEffect(() => {
|
279
|
+
const tabData = {
|
280
|
+
id,
|
281
|
+
title,
|
282
|
+
isDirty,
|
283
|
+
};
|
284
|
+
addTab(tabData);
|
285
|
+
return () => {
|
286
|
+
removeTab(tabData);
|
287
|
+
};
|
288
|
+
}, [id, title]);
|
289
|
+
useEffect(() => {
|
290
|
+
setDirtyTab(id, isDirty || false);
|
291
|
+
}, [isDirty]);
|
292
|
+
const isCurrent = id === currentTab;
|
293
|
+
return (_jsx(Block, { style: { display: isCurrent ? 'block' : 'none' }, flexGrow: 1, ...props, children: children }, void 0));
|
294
|
+
};
|
295
|
+
|
296
|
+
|
@@ -0,0 +1,251 @@
|
|
1
|
+
/**
|
2
|
+
* @license MIT
|
3
|
+
* author: Cube Dev Team
|
4
|
+
* @cube-dev/ui-kit v0.9.0
|
5
|
+
* Released under the MIT license.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { createElement as _createElement } from "react";
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
10
|
+
import { useCallback, useEffect, useState } from 'react';
|
11
|
+
import ReactDOM from 'react-dom';
|
12
|
+
import { Action } from '../../actions/Action';
|
13
|
+
import { Card } from '../../content/Card/Card';
|
14
|
+
import { Flow } from '../../layout/Flow';
|
15
|
+
import { Flex } from '../../layout/Flex';
|
16
|
+
import { Block } from '../../Block';
|
17
|
+
import { Button } from '../../actions/Button/Button';
|
18
|
+
import { Space } from '../../layout/Space';
|
19
|
+
import { Title } from '../../content/Title';
|
20
|
+
import styled from 'styled-components';
|
21
|
+
import { CloseOutlined } from '@ant-design/icons';
|
22
|
+
import { CSSTransition } from 'react-transition-group';
|
23
|
+
const Overlay = styled.div `
|
24
|
+
position: fixed;
|
25
|
+
top: 0;
|
26
|
+
right: 0;
|
27
|
+
bottom: 0;
|
28
|
+
left: 0;
|
29
|
+
background: rgba(0, 0, 0, 0.4);
|
30
|
+
place-content: center;
|
31
|
+
place-items: center;
|
32
|
+
z-index: 1000;
|
33
|
+
display: none;
|
34
|
+
white-space: normal;
|
35
|
+
|
36
|
+
.cube-modal {
|
37
|
+
--enter-transition-time: 250ms;
|
38
|
+
--leave-transition-time: 160ms;
|
39
|
+
--base-translate: ((50vh - 50%) / -3);
|
40
|
+
transform: translate(0, calc(var(--base-translate)));
|
41
|
+
}
|
42
|
+
|
43
|
+
&.cube-modal-transition-enter {
|
44
|
+
opacity: 0;
|
45
|
+
display: flex;
|
46
|
+
|
47
|
+
& .cube-modal {
|
48
|
+
transform: translate(0, calc(-32px + var(--base-translate))) scale(0.5);
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
&.cube-modal-transition-enter-active {
|
53
|
+
opacity: 1;
|
54
|
+
transition: all var(--enter-transition-time) cubic-bezier(0, 0.5, 0, 1);
|
55
|
+
|
56
|
+
& .cube-modal {
|
57
|
+
transform: translate(0, calc(var(--base-translate))) scale(1);
|
58
|
+
transition: all var(--enter-transition-time) cubic-bezier(0.5, 0.5, 0, 1);
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
&.cube-modal-transition-enter-done {
|
63
|
+
display: flex;
|
64
|
+
}
|
65
|
+
|
66
|
+
&.cube-modal-transition-exit {
|
67
|
+
opacity: 1;
|
68
|
+
display: flex;
|
69
|
+
|
70
|
+
& .cube-modal {
|
71
|
+
transform: translate(0, calc(var(--base-translate))) scale(1);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
&.cube-modal-transition-exit-active {
|
76
|
+
opacity: 0;
|
77
|
+
transition: all var(--leave-transition-time) ease-in;
|
78
|
+
|
79
|
+
& .cube-modal {
|
80
|
+
transform: translate(0, calc(-32px + var(--base-translate))) scale(0.5);
|
81
|
+
transition: all var(--leave-transition-time) ease-in;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
&.cube-modal-transition-exit-done {
|
86
|
+
display: none;
|
87
|
+
}
|
88
|
+
`;
|
89
|
+
/**
|
90
|
+
* @deprecated Prefer using Dialog instead
|
91
|
+
*
|
92
|
+
* DEPRECATED Modal component
|
93
|
+
* Designed after AntD Modal component and almost duplicate its API.
|
94
|
+
* Use Dialog component instead
|
95
|
+
*/
|
96
|
+
export function Modal(allProps) {
|
97
|
+
let { title, isVisible, type, okType, isClosable, isLoading, children, okText, cancelText, width, onOk, onCancel, onClose, qa, isDisabled, ...props } = allProps;
|
98
|
+
isClosable = !!isClosable;
|
99
|
+
const [inProp, setInProp] = useState(false);
|
100
|
+
const [localLoading, setLocalLoading] = useState(false);
|
101
|
+
useEffect(() => {
|
102
|
+
setInProp(isVisible || false);
|
103
|
+
}, [isVisible]);
|
104
|
+
function cancel() {
|
105
|
+
if (onCancel) {
|
106
|
+
onCancel();
|
107
|
+
}
|
108
|
+
else if (onClose) {
|
109
|
+
onClose();
|
110
|
+
}
|
111
|
+
}
|
112
|
+
function close() {
|
113
|
+
if (!isVisible)
|
114
|
+
return;
|
115
|
+
if (onClose || onCancel) {
|
116
|
+
if (isClosable) {
|
117
|
+
// @ts-ignore
|
118
|
+
(onClose || onCancel)();
|
119
|
+
}
|
120
|
+
else if (onCancel) {
|
121
|
+
onCancel();
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
const onOverlayClick = (evt) => {
|
126
|
+
if (!evt || !evt.target)
|
127
|
+
return;
|
128
|
+
if (evt.target.classList.contains('cube-modal-overlay') && !isLoading) {
|
129
|
+
close();
|
130
|
+
}
|
131
|
+
};
|
132
|
+
useEffect(() => {
|
133
|
+
function handleKeyDown(evt) {
|
134
|
+
if (evt.key === 'Escape' && !isLoading) {
|
135
|
+
close();
|
136
|
+
}
|
137
|
+
}
|
138
|
+
window.addEventListener('keydown', handleKeyDown);
|
139
|
+
return () => {
|
140
|
+
window.removeEventListener('keydown', handleKeyDown);
|
141
|
+
};
|
142
|
+
}, []);
|
143
|
+
const handleOk = useCallback((arg) => {
|
144
|
+
setLocalLoading(true);
|
145
|
+
(async () => {
|
146
|
+
if (onOk) {
|
147
|
+
try {
|
148
|
+
if ((await onOk(arg)) === false && (onClose || onCancel)) {
|
149
|
+
// @ts-ignore
|
150
|
+
(onClose || onCancel)();
|
151
|
+
}
|
152
|
+
}
|
153
|
+
catch (e) {
|
154
|
+
}
|
155
|
+
finally {
|
156
|
+
setLocalLoading(false);
|
157
|
+
}
|
158
|
+
}
|
159
|
+
})();
|
160
|
+
}, [onOk]);
|
161
|
+
return (_jsx(CSSTransition, { in: inProp, timeout: 250, classNames: "cube-modal-transition", children: _jsx(Overlay, { className: "cube-modal-overlay", onClick: onOverlayClick, children: _jsxs(Card, { "data-qa": qa || 'Modal', className: "cube-modal", display: "flex", role: "region", color: "#dark.85", padding: "0", shadow: true, border: false, radius: "1.5r", width: `288px (100% - 32px) ${typeof width === 'number' ? `${width}px` : width || '360px'}`, style: { textAlign: 'left' }, ...props, children: [_jsxs(Flex, { placeContent: "space-between", padding: "2x 3x", border: "bottom", children: [typeof title === 'object' ? (title) : (_jsx(Title, { level: 4, flexGrow: 1, children: title }, void 0)), isClosable ? (_jsx(Action, { qa: "ModalCloseButton", width: "3x", height: "3x", onPress: onClose || onCancel, color: { '': '#dark.75', hovered: '#purple' }, outline: {
|
162
|
+
'': '#purple-03.0',
|
163
|
+
'focused & focus-visible': '#purple-03',
|
164
|
+
}, label: "Close", children: _jsx(CloseOutlined, { style: { fontSize: 16 } }, void 0) }, void 0)) : null] }, void 0), _jsxs(Flow, { padding: "3x", gap: "3x", height: "max (100vh - 90px)", style: { overflow: 'auto' }, children: [typeof children === 'string' ? (_jsx(Block, { children: children }, void 0)) : (children), type !== 'info' && (onOk || onCancel) ? (_jsxs(Space, { gap: "1.5x", children: [_jsx(Button, { "data-qa": 'ConfirmButton', isDisabled: isDisabled, type: okType === 'danger' ? 'danger' : 'primary', isLoading: isLoading || localLoading, onPress: handleOk, children: okText || 'OK' }, void 0), _jsx(Button, { "data-qa": 'CancelButton', onPress: cancel, isDisabled: isLoading, children: cancelText || (okText === 'Yes' ? 'No' : 'Cancel') }, void 0)] }, void 0)) : null, type === 'info' ? (_jsx(Space, { children: _jsx(Button, { "data-qa": 'OkButton', isDisabled: isDisabled, type: okType === 'danger' ? 'danger' : 'primary', onPress: close, children: okText || 'OK' }, void 0) }, void 0)) : null] }, void 0)] }, void 0) }, void 0) }, void 0));
|
165
|
+
}
|
166
|
+
let ID = 0;
|
167
|
+
const modal = {
|
168
|
+
root: null,
|
169
|
+
items: [],
|
170
|
+
init() {
|
171
|
+
if (this.root)
|
172
|
+
return;
|
173
|
+
this.root = document.createElement('div');
|
174
|
+
this.root.classList.add('cube-modal-container');
|
175
|
+
document.body.appendChild(this.root);
|
176
|
+
this._render([]);
|
177
|
+
},
|
178
|
+
render() {
|
179
|
+
this.init();
|
180
|
+
this._render();
|
181
|
+
},
|
182
|
+
_render(items) {
|
183
|
+
if (!items) {
|
184
|
+
items = this.items;
|
185
|
+
}
|
186
|
+
ReactDOM.render(items.map((item) => {
|
187
|
+
const { id, onOk, onCancel, onClose, content, ...options } = item;
|
188
|
+
const wrapOnOk = async (arg) => {
|
189
|
+
onOk && (await onOk(arg));
|
190
|
+
this.resolve(item, arg);
|
191
|
+
};
|
192
|
+
const wrapOnCancel = () => {
|
193
|
+
onCancel && onCancel();
|
194
|
+
if (item.type === 'info') {
|
195
|
+
this.resolve(item);
|
196
|
+
}
|
197
|
+
else {
|
198
|
+
this.reject(item);
|
199
|
+
}
|
200
|
+
};
|
201
|
+
const wrapOnClose = () => {
|
202
|
+
onClose && onClose();
|
203
|
+
if (item.type === 'info') {
|
204
|
+
this.resolve(item);
|
205
|
+
}
|
206
|
+
else {
|
207
|
+
this.reject(item);
|
208
|
+
}
|
209
|
+
};
|
210
|
+
return (_createElement(Modal, { ...options, onOk: wrapOnOk, onCancel: wrapOnCancel, onClose: wrapOnClose, key: id }, content));
|
211
|
+
}), this.root);
|
212
|
+
},
|
213
|
+
open(item) {
|
214
|
+
item.isVisible = false;
|
215
|
+
item.id = ++ID;
|
216
|
+
this.items.push(item);
|
217
|
+
this.render();
|
218
|
+
setTimeout(() => {
|
219
|
+
item.isVisible = true;
|
220
|
+
this.render();
|
221
|
+
});
|
222
|
+
return new Promise((resolve, reject) => {
|
223
|
+
item.resolve = resolve;
|
224
|
+
item.reject = reject;
|
225
|
+
});
|
226
|
+
},
|
227
|
+
close(item) {
|
228
|
+
item.isVisible = false;
|
229
|
+
this.render();
|
230
|
+
setTimeout(() => {
|
231
|
+
this.items = this.items.filter((modal) => item.id !== modal.id);
|
232
|
+
this.render();
|
233
|
+
}, 1000);
|
234
|
+
},
|
235
|
+
resolve(item, arg) {
|
236
|
+
item.resolve(arg);
|
237
|
+
this.close(item);
|
238
|
+
},
|
239
|
+
reject(item, arg) {
|
240
|
+
item.reject(arg);
|
241
|
+
this.close(item);
|
242
|
+
},
|
243
|
+
};
|
244
|
+
Modal.confirm = (options) => {
|
245
|
+
return modal.open({ type: 'confirm', ...options });
|
246
|
+
};
|
247
|
+
Modal.info = (options) => {
|
248
|
+
return modal.open({ type: 'info', ...options });
|
249
|
+
};
|
250
|
+
|
251
|
+
|
@@ -0,0 +1,104 @@
|
|
1
|
+
/**
|
2
|
+
* @license MIT
|
3
|
+
* author: Cube Dev Team
|
4
|
+
* @cube-dev/ui-kit v0.9.0
|
5
|
+
* Released under the MIT license.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
9
|
+
import { useEffect, useState, Fragment } from 'react';
|
10
|
+
import { CaretDownOutlined, CaretUpOutlined, FileOutlined, } from '@ant-design/icons';
|
11
|
+
import { Flex } from '../../layout/Flex';
|
12
|
+
import { Action } from '../../actions/Action';
|
13
|
+
import { Button } from '../../actions/Button/Button';
|
14
|
+
import { Space } from '../../layout/Space';
|
15
|
+
import { Block } from '../../Block';
|
16
|
+
import { Paragraph } from '../../content/Paragraph';
|
17
|
+
import { Text } from '../../content/Text';
|
18
|
+
const TEXT_OVERFLOW_STYLES = {
|
19
|
+
whiteSpace: 'nowrap',
|
20
|
+
textOverflow: 'ellipsis',
|
21
|
+
maxWidth: '100%',
|
22
|
+
overflow: 'hidden',
|
23
|
+
};
|
24
|
+
function getItemStyles({ indent, isSelected, }) {
|
25
|
+
return {
|
26
|
+
width: 'max 100%',
|
27
|
+
radius: true,
|
28
|
+
textAlign: 'left',
|
29
|
+
fill: isSelected
|
30
|
+
? '#purple.05'
|
31
|
+
: {
|
32
|
+
'': '#clear',
|
33
|
+
hovered: '#dark.04',
|
34
|
+
},
|
35
|
+
color: isSelected ? '#purple-text' : '#dark.75',
|
36
|
+
outline: {
|
37
|
+
'': '#purple-03.0',
|
38
|
+
'focused & focus-visible': '#purple-03',
|
39
|
+
},
|
40
|
+
fontWeight: 400,
|
41
|
+
padding: `.75x .5x .75x ${indent || 0.5}x`,
|
42
|
+
};
|
43
|
+
}
|
44
|
+
function Item({ children, indent, onPress, isSelected, }) {
|
45
|
+
return (_jsx(Action, { onPress: onPress, styles: getItemStyles({ indent, isSelected }), style: { whiteSpace: 'nowrap' }, children: children }, void 0));
|
46
|
+
}
|
47
|
+
const HOVER_CSS = `
|
48
|
+
&:hover .actions {
|
49
|
+
opacity: 1;
|
50
|
+
}
|
51
|
+
&:not(:hover) .actions {
|
52
|
+
opacity: 0;
|
53
|
+
}
|
54
|
+
`;
|
55
|
+
export function SearchResults({ onSelect, files, selectedKey, defaultExpandAll, ...otherProps }) {
|
56
|
+
const [expanded, setExpanded] = useState([]);
|
57
|
+
const [selected, setSelected] = useState(selectedKey);
|
58
|
+
useEffect(() => {
|
59
|
+
setSelected(selectedKey);
|
60
|
+
}, [selectedKey]);
|
61
|
+
useEffect(() => {
|
62
|
+
if (defaultExpandAll) {
|
63
|
+
setExpanded(files.map((file) => file.key));
|
64
|
+
}
|
65
|
+
}, []);
|
66
|
+
useEffect(() => {
|
67
|
+
if (defaultExpandAll) {
|
68
|
+
setExpanded(files.map((file) => file.key));
|
69
|
+
}
|
70
|
+
}, [files]);
|
71
|
+
function toggle(item) {
|
72
|
+
if (expanded.includes(item.key)) {
|
73
|
+
setExpanded(expanded.filter((key) => key !== item.key));
|
74
|
+
}
|
75
|
+
else {
|
76
|
+
setExpanded([...expanded, item.key]);
|
77
|
+
}
|
78
|
+
}
|
79
|
+
function select(item, position) {
|
80
|
+
const key = typeof item === 'string' ? item : item.key;
|
81
|
+
onSelect && onSelect(key.split('|')[0], position);
|
82
|
+
setSelected(key);
|
83
|
+
}
|
84
|
+
const resultsNumber = files.reduce((sum, file) => sum + file.items.length, 0);
|
85
|
+
return (_jsxs(Flex, { styles: {
|
86
|
+
flow: 'column',
|
87
|
+
width: '100%',
|
88
|
+
gap: '1bw',
|
89
|
+
padding: '2x bottom',
|
90
|
+
}, ...otherProps, children: [_jsx(Paragraph, { color: "#dark.50", padding: "1x 0", children: resultsNumber
|
91
|
+
? `${resultsNumber} result${resultsNumber > 1 ? 's' : ''} in ${files.length} file${files.length > 1 ? 's' : ''}`
|
92
|
+
: 'No results found' }, void 0), files.map((file) => {
|
93
|
+
return (_jsxs(Fragment, { children: [_jsx(Item, { isSelected: selected === file.key, onPress: () => select(file), indent: file.items.length ? null : 2.25, children: _jsxs(Space, { gap: ".5x", css: HOVER_CSS, children: [_jsx(Button, { type: "clear", margin: "-.5x", padding: ".25x", color: {
|
94
|
+
'': '#dark.60',
|
95
|
+
hovered: '#purple',
|
96
|
+
}, onPress: () => toggle(file), label: expanded.includes(file.key) ? 'Collapse' : 'Expand', children: file.items.length ? (expanded.includes(file.key) ? (_jsx(CaretUpOutlined, {}, void 0)) : (_jsx(CaretDownOutlined, {}, void 0))) : null }, void 0), _jsxs(Space, { gap: "1x", flexGrow: 1, color: selected === file.key ? '#purple' : '#dark.50', children: [expanded.includes(file.key) ? (_jsx(FileOutlined, {}, void 0)) : (_jsx(FileOutlined, {}, void 0)), _jsx(Block, { style: TEXT_OVERFLOW_STYLES, color: selected === file.key ? '#purple-text' : '#dark.75', children: file.entry ? (_jsxs(_Fragment, { children: [file.before || '', _jsx(Text.Selection, { children: file.entry }, void 0), file.after || ''] }, void 0)) : (file.title) }, void 0)] }, void 0)] }, void 0) }, file.key), (expanded.includes(file.key) ? file.items || [] : []).map((item, i) => {
|
97
|
+
const key = `${file.key}|${i}`;
|
98
|
+
const isSelected = selected === key;
|
99
|
+
return (_jsx(Item, { indent: 3.5, isSelected: isSelected, onPress: () => select(key, [item.row, item.column]), children: _jsx(Space, { gap: "1x", css: HOVER_CSS, color: isSelected ? '#purple' : '#dark.50', children: _jsxs(Block, { style: TEXT_OVERFLOW_STYLES, flexGrow: 1, color: isSelected ? '#purple-text' : '#dark.75', children: [item.before || '', _jsx(Text.Selection, { children: item.entry }, void 0), item.after || ''] }, void 0) }, void 0) }, key));
|
100
|
+
})] }, file.key));
|
101
|
+
})] }, void 0));
|
102
|
+
}
|
103
|
+
|
104
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/**
|
2
|
+
* @license MIT
|
3
|
+
* author: Cube Dev Team
|
4
|
+
* @cube-dev/ui-kit v0.9.0
|
5
|
+
* Released under the MIT license.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
9
|
+
import { Card } from '../../content/Card/Card';
|
10
|
+
import { Title } from '../../content/Title';
|
11
|
+
import { Text } from '../../content/Text';
|
12
|
+
export function StatsCard({ title, value, suffix, ...props }) {
|
13
|
+
return (_jsxs(Card, { display: "flex", placeContent: "space-between", gap: "1x", border: false, shadow: "0 2px 6px #dark.10", padding: "2.5x", ...props, children: [_jsx(Title, { level: 4, color: "#minor", preset: "default", nowrap: true, children: title }, void 0), _jsxs(Text.Strong, { preset: "h3", children: [value, " ", suffix] }, void 0)] }, void 0));
|
14
|
+
}
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/**
|
2
|
+
* @license MIT
|
3
|
+
* author: Cube Dev Team
|
4
|
+
* @cube-dev/ui-kit v0.9.0
|
5
|
+
* Released under the MIT license.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
9
|
+
import { Base } from '../../Base';
|
10
|
+
import { CloudLogo } from '../../other/CloudLogo/CloudLogo';
|
11
|
+
import { Space } from '../../layout/Space';
|
12
|
+
import { CONTAINER_STYLES } from '../../../styles/list';
|
13
|
+
import { extractStyles } from '../../../utils/styles';
|
14
|
+
import { filterBaseProps } from '../../../utils/filterBaseProps';
|
15
|
+
const DEFAULT_STYLES = {
|
16
|
+
display: 'flex',
|
17
|
+
flow: 'row',
|
18
|
+
gap: '1x',
|
19
|
+
placeContent: 'space-between',
|
20
|
+
placeItems: 'center',
|
21
|
+
padding: '1x 1.5x',
|
22
|
+
fill: '#white',
|
23
|
+
};
|
24
|
+
export function TopBar({ children, onLogoPress, ...props }) {
|
25
|
+
const styles = extractStyles(props, CONTAINER_STYLES, DEFAULT_STYLES);
|
26
|
+
return (_jsxs(Base, { role: "banner", styles: styles, ...filterBaseProps(props), children: [_jsx(CloudLogo, { onPress: onLogoPress }, void 0), _jsx(Space, { flexGrow: 1, placeContent: "space-between", children: children }, void 0)] }, void 0));
|
27
|
+
}
|
28
|
+
|
29
|
+
|