@luxonis/common-fe-components 1.9.5
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/LICENSE.md +1 -0
- package/README.md +4 -0
- package/dist/components/custom/Alert.d.ts +11 -0
- package/dist/components/custom/Alert.d.ts.map +1 -0
- package/dist/components/custom/Alert.js +11 -0
- package/dist/components/custom/Alert.js.map +1 -0
- package/dist/components/custom/Badge.d.ts +71 -0
- package/dist/components/custom/Badge.d.ts.map +1 -0
- package/dist/components/custom/Badge.js +82 -0
- package/dist/components/custom/Badge.js.map +1 -0
- package/dist/components/custom/BadgeLine.d.ts +11 -0
- package/dist/components/custom/BadgeLine.d.ts.map +1 -0
- package/dist/components/custom/BadgeLine.js +25 -0
- package/dist/components/custom/BadgeLine.js.map +1 -0
- package/dist/components/custom/Button.d.ts +51 -0
- package/dist/components/custom/Button.d.ts.map +1 -0
- package/dist/components/custom/Button.js +71 -0
- package/dist/components/custom/Button.js.map +1 -0
- package/dist/components/custom/Card.d.ts +17 -0
- package/dist/components/custom/Card.d.ts.map +1 -0
- package/dist/components/custom/Card.js +19 -0
- package/dist/components/custom/Card.js.map +1 -0
- package/dist/components/custom/CardList.d.ts +68 -0
- package/dist/components/custom/CardList.d.ts.map +1 -0
- package/dist/components/custom/CardList.js +72 -0
- package/dist/components/custom/CardList.js.map +1 -0
- package/dist/components/custom/Checkbox.d.ts +17 -0
- package/dist/components/custom/Checkbox.d.ts.map +1 -0
- package/dist/components/custom/Checkbox.js +31 -0
- package/dist/components/custom/Checkbox.js.map +1 -0
- package/dist/components/custom/Circle.d.ts +56 -0
- package/dist/components/custom/Circle.d.ts.map +1 -0
- package/dist/components/custom/Circle.js +73 -0
- package/dist/components/custom/Circle.js.map +1 -0
- package/dist/components/custom/Command.d.ts +4 -0
- package/dist/components/custom/Command.d.ts.map +1 -0
- package/dist/components/custom/Command.js +6 -0
- package/dist/components/custom/Command.js.map +1 -0
- package/dist/components/custom/DropdownMenu.d.ts +1111 -0
- package/dist/components/custom/DropdownMenu.d.ts.map +1 -0
- package/dist/components/custom/DropdownMenu.js +12 -0
- package/dist/components/custom/DropdownMenu.js.map +1 -0
- package/dist/components/custom/Dropzone.d.ts +16 -0
- package/dist/components/custom/Dropzone.d.ts.map +1 -0
- package/dist/components/custom/Dropzone.js +158 -0
- package/dist/components/custom/Dropzone.js.map +1 -0
- package/dist/components/custom/EmptyView.d.ts +10 -0
- package/dist/components/custom/EmptyView.d.ts.map +1 -0
- package/dist/components/custom/EmptyView.js +10 -0
- package/dist/components/custom/EmptyView.js.map +1 -0
- package/dist/components/custom/ErrorView.d.ts +11 -0
- package/dist/components/custom/ErrorView.d.ts.map +1 -0
- package/dist/components/custom/ErrorView.js +55 -0
- package/dist/components/custom/ErrorView.js.map +1 -0
- package/dist/components/custom/ExternalLink.d.ts +12 -0
- package/dist/components/custom/ExternalLink.d.ts.map +1 -0
- package/dist/components/custom/ExternalLink.js +26 -0
- package/dist/components/custom/ExternalLink.js.map +1 -0
- package/dist/components/custom/FilterDropdown.d.ts +21 -0
- package/dist/components/custom/FilterDropdown.d.ts.map +1 -0
- package/dist/components/custom/FilterDropdown.js +81 -0
- package/dist/components/custom/FilterDropdown.js.map +1 -0
- package/dist/components/custom/Flex.d.ts +15 -0
- package/dist/components/custom/Flex.d.ts.map +1 -0
- package/dist/components/custom/Flex.js +19 -0
- package/dist/components/custom/Flex.js.map +1 -0
- package/dist/components/custom/Form.d.ts +39 -0
- package/dist/components/custom/Form.d.ts.map +1 -0
- package/dist/components/custom/Form.js +91 -0
- package/dist/components/custom/Form.js.map +1 -0
- package/dist/components/custom/Grid.d.ts +16 -0
- package/dist/components/custom/Grid.d.ts.map +1 -0
- package/dist/components/custom/Grid.js +29 -0
- package/dist/components/custom/Grid.js.map +1 -0
- package/dist/components/custom/Icon.d.ts +92 -0
- package/dist/components/custom/Icon.d.ts.map +1 -0
- package/dist/components/custom/Icon.js +77 -0
- package/dist/components/custom/Icon.js.map +1 -0
- package/dist/components/custom/Input.d.ts +9 -0
- package/dist/components/custom/Input.d.ts.map +1 -0
- package/dist/components/custom/Input.js +41 -0
- package/dist/components/custom/Input.js.map +1 -0
- package/dist/components/custom/KpiDisplay.d.ts +11 -0
- package/dist/components/custom/KpiDisplay.d.ts.map +1 -0
- package/dist/components/custom/KpiDisplay.js +10 -0
- package/dist/components/custom/KpiDisplay.js.map +1 -0
- package/dist/components/custom/LabelledProgress.d.ts +11 -0
- package/dist/components/custom/LabelledProgress.d.ts.map +1 -0
- package/dist/components/custom/LabelledProgress.js +44 -0
- package/dist/components/custom/LabelledProgress.js.map +1 -0
- package/dist/components/custom/Markdown.d.ts +9 -0
- package/dist/components/custom/Markdown.d.ts.map +1 -0
- package/dist/components/custom/Markdown.js +36 -0
- package/dist/components/custom/Markdown.js.map +1 -0
- package/dist/components/custom/Modal.d.ts +50 -0
- package/dist/components/custom/Modal.d.ts.map +1 -0
- package/dist/components/custom/Modal.js +83 -0
- package/dist/components/custom/Modal.js.map +1 -0
- package/dist/components/custom/MonospaceBlock.d.ts +9 -0
- package/dist/components/custom/MonospaceBlock.d.ts.map +1 -0
- package/dist/components/custom/MonospaceBlock.js +23 -0
- package/dist/components/custom/MonospaceBlock.js.map +1 -0
- package/dist/components/custom/PasswordInput.d.ts +9 -0
- package/dist/components/custom/PasswordInput.d.ts.map +1 -0
- package/dist/components/custom/PasswordInput.js +15 -0
- package/dist/components/custom/PasswordInput.js.map +1 -0
- package/dist/components/custom/ProgressTicker.d.ts +9 -0
- package/dist/components/custom/ProgressTicker.d.ts.map +1 -0
- package/dist/components/custom/ProgressTicker.js +32 -0
- package/dist/components/custom/ProgressTicker.js.map +1 -0
- package/dist/components/custom/RadioGroup.d.ts +2178 -0
- package/dist/components/custom/RadioGroup.d.ts.map +1 -0
- package/dist/components/custom/RadioGroup.js +128 -0
- package/dist/components/custom/RadioGroup.js.map +1 -0
- package/dist/components/custom/Select.d.ts +20 -0
- package/dist/components/custom/Select.d.ts.map +1 -0
- package/dist/components/custom/Select.js +10 -0
- package/dist/components/custom/Select.js.map +1 -0
- package/dist/components/custom/SelectCards.d.ts +16 -0
- package/dist/components/custom/SelectCards.d.ts.map +1 -0
- package/dist/components/custom/SelectCards.js +25 -0
- package/dist/components/custom/SelectCards.js.map +1 -0
- package/dist/components/custom/Slider.d.ts +2189 -0
- package/dist/components/custom/Slider.d.ts.map +1 -0
- package/dist/components/custom/Slider.js +12 -0
- package/dist/components/custom/Slider.js.map +1 -0
- package/dist/components/custom/SourceCode.d.ts +18 -0
- package/dist/components/custom/SourceCode.d.ts.map +1 -0
- package/dist/components/custom/SourceCode.js +29 -0
- package/dist/components/custom/SourceCode.js.map +1 -0
- package/dist/components/custom/StatusBar.d.ts +8 -0
- package/dist/components/custom/StatusBar.d.ts.map +1 -0
- package/dist/components/custom/StatusBar.js +10 -0
- package/dist/components/custom/StatusBar.js.map +1 -0
- package/dist/components/custom/Stepper.d.ts +20 -0
- package/dist/components/custom/Stepper.d.ts.map +1 -0
- package/dist/components/custom/Stepper.js +33 -0
- package/dist/components/custom/Stepper.js.map +1 -0
- package/dist/components/custom/Switch.d.ts +12 -0
- package/dist/components/custom/Switch.d.ts.map +1 -0
- package/dist/components/custom/Switch.js +9 -0
- package/dist/components/custom/Switch.js.map +1 -0
- package/dist/components/custom/Table.d.ts +18 -0
- package/dist/components/custom/Table.d.ts.map +1 -0
- package/dist/components/custom/Table.js +29 -0
- package/dist/components/custom/Table.js.map +1 -0
- package/dist/components/custom/Text.d.ts +143 -0
- package/dist/components/custom/Text.d.ts.map +1 -0
- package/dist/components/custom/Text.js +84 -0
- package/dist/components/custom/Text.js.map +1 -0
- package/dist/components/custom/TimePicker.d.ts +15 -0
- package/dist/components/custom/TimePicker.d.ts.map +1 -0
- package/dist/components/custom/TimePicker.js +37 -0
- package/dist/components/custom/TimePicker.js.map +1 -0
- package/dist/components/custom/Toast.d.ts +18 -0
- package/dist/components/custom/Toast.d.ts.map +1 -0
- package/dist/components/custom/Toast.js +26 -0
- package/dist/components/custom/Toast.js.map +1 -0
- package/dist/components/custom/Tooltip.d.ts +10 -0
- package/dist/components/custom/Tooltip.d.ts.map +1 -0
- package/dist/components/custom/Tooltip.js +16 -0
- package/dist/components/custom/Tooltip.js.map +1 -0
- package/dist/components/custom/TurnstileWidget.d.ts +26 -0
- package/dist/components/custom/TurnstileWidget.d.ts.map +1 -0
- package/dist/components/custom/TurnstileWidget.js +37 -0
- package/dist/components/custom/TurnstileWidget.js.map +1 -0
- package/dist/components/custom/VideoPlayer.d.ts +71 -0
- package/dist/components/custom/VideoPlayer.d.ts.map +1 -0
- package/dist/components/custom/VideoPlayer.js +287 -0
- package/dist/components/custom/VideoPlayer.js.map +1 -0
- package/dist/components/custom/index.d.ts +43 -0
- package/dist/components/custom/index.d.ts.map +1 -0
- package/dist/components/custom/index.js +43 -0
- package/dist/components/custom/index.js.map +1 -0
- package/dist/components/shadow-panda/Accordion.d.ts +14 -0
- package/dist/components/shadow-panda/Accordion.d.ts.map +1 -0
- package/dist/components/shadow-panda/Accordion.js +23 -0
- package/dist/components/shadow-panda/Accordion.js.map +1 -0
- package/dist/components/shadow-panda/Avatar.d.ts +11 -0
- package/dist/components/shadow-panda/Avatar.d.ts.map +1 -0
- package/dist/components/shadow-panda/Avatar.js +14 -0
- package/dist/components/shadow-panda/Avatar.js.map +1 -0
- package/dist/components/shadow-panda/DropdownMenu.d.ts +42 -0
- package/dist/components/shadow-panda/DropdownMenu.d.ts.map +1 -0
- package/dist/components/shadow-panda/DropdownMenu.js +56 -0
- package/dist/components/shadow-panda/DropdownMenu.js.map +1 -0
- package/dist/components/shadow-panda/Form.d.ts +22 -0
- package/dist/components/shadow-panda/Form.d.ts.map +1 -0
- package/dist/components/shadow-panda/Form.js +72 -0
- package/dist/components/shadow-panda/Form.js.map +1 -0
- package/dist/components/shadow-panda/Progress.d.ts +4 -0
- package/dist/components/shadow-panda/Progress.d.ts.map +1 -0
- package/dist/components/shadow-panda/Progress.js +14 -0
- package/dist/components/shadow-panda/Progress.js.map +1 -0
- package/dist/components/shadow-panda/Separator.d.ts +4 -0
- package/dist/components/shadow-panda/Separator.d.ts.map +1 -0
- package/dist/components/shadow-panda/Separator.js +11 -0
- package/dist/components/shadow-panda/Separator.js.map +1 -0
- package/dist/components/shadow-panda/Skeleton.d.ts +2 -0
- package/dist/components/shadow-panda/Skeleton.d.ts.map +1 -0
- package/dist/components/shadow-panda/Skeleton.js +4 -0
- package/dist/components/shadow-panda/Skeleton.js.map +1 -0
- package/dist/components/shadow-panda/Table.d.ts +11 -0
- package/dist/components/shadow-panda/Table.d.ts.map +1 -0
- package/dist/components/shadow-panda/Table.js +24 -0
- package/dist/components/shadow-panda/Table.js.map +1 -0
- package/dist/components/shadow-panda/Tabs.d.ts +13 -0
- package/dist/components/shadow-panda/Tabs.d.ts.map +1 -0
- package/dist/components/shadow-panda/Tabs.js +16 -0
- package/dist/components/shadow-panda/Tabs.js.map +1 -0
- package/dist/components/shadow-panda/Textarea.d.ts +9 -0
- package/dist/components/shadow-panda/Textarea.d.ts.map +1 -0
- package/dist/components/shadow-panda/Textarea.js +18 -0
- package/dist/components/shadow-panda/Textarea.js.map +1 -0
- package/dist/components/shadow-panda/Toaster.d.ts +2 -0
- package/dist/components/shadow-panda/Toaster.d.ts.map +1 -0
- package/dist/components/shadow-panda/Toaster.js +15 -0
- package/dist/components/shadow-panda/Toaster.js.map +1 -0
- package/dist/components/shadow-panda/Wrap.d.ts +2 -0
- package/dist/components/shadow-panda/Wrap.d.ts.map +1 -0
- package/dist/components/shadow-panda/Wrap.js +2 -0
- package/dist/components/shadow-panda/Wrap.js.map +1 -0
- package/dist/components/shadow-panda/_Alert.d.ts +6 -0
- package/dist/components/shadow-panda/_Alert.d.ts.map +1 -0
- package/dist/components/shadow-panda/_Alert.js +9 -0
- package/dist/components/shadow-panda/_Alert.js.map +1 -0
- package/dist/components/shadow-panda/_Badge.d.ts +4 -0
- package/dist/components/shadow-panda/_Badge.d.ts.map +1 -0
- package/dist/components/shadow-panda/_Badge.js +4 -0
- package/dist/components/shadow-panda/_Badge.js.map +1 -0
- package/dist/components/shadow-panda/_Button.d.ts +6 -0
- package/dist/components/shadow-panda/_Button.d.ts.map +1 -0
- package/dist/components/shadow-panda/_Button.js +12 -0
- package/dist/components/shadow-panda/_Button.js.map +1 -0
- package/dist/components/shadow-panda/_Card.d.ts +7 -0
- package/dist/components/shadow-panda/_Card.d.ts.map +1 -0
- package/dist/components/shadow-panda/_Card.js +14 -0
- package/dist/components/shadow-panda/_Card.js.map +1 -0
- package/dist/components/shadow-panda/_Checkbox.d.ts +4 -0
- package/dist/components/shadow-panda/_Checkbox.d.ts.map +1 -0
- package/dist/components/shadow-panda/_Checkbox.js +16 -0
- package/dist/components/shadow-panda/_Checkbox.js.map +1 -0
- package/dist/components/shadow-panda/_Command.d.ts +80 -0
- package/dist/components/shadow-panda/_Command.d.ts.map +1 -0
- package/dist/components/shadow-panda/_Command.js +38 -0
- package/dist/components/shadow-panda/_Command.js.map +1 -0
- package/dist/components/shadow-panda/_Dialog.d.ts +20 -0
- package/dist/components/shadow-panda/_Dialog.d.ts.map +1 -0
- package/dist/components/shadow-panda/_Dialog.js +27 -0
- package/dist/components/shadow-panda/_Dialog.js.map +1 -0
- package/dist/components/shadow-panda/_Input.d.ts +4 -0
- package/dist/components/shadow-panda/_Input.d.ts.map +1 -0
- package/dist/components/shadow-panda/_Input.js +4 -0
- package/dist/components/shadow-panda/_Input.js.map +1 -0
- package/dist/components/shadow-panda/_Label.d.ts +4 -0
- package/dist/components/shadow-panda/_Label.d.ts.map +1 -0
- package/dist/components/shadow-panda/_Label.js +4 -0
- package/dist/components/shadow-panda/_Label.js.map +1 -0
- package/dist/components/shadow-panda/_RadioGroup.d.ts +10 -0
- package/dist/components/shadow-panda/_RadioGroup.d.ts.map +1 -0
- package/dist/components/shadow-panda/_RadioGroup.js +20 -0
- package/dist/components/shadow-panda/_RadioGroup.js.map +1 -0
- package/dist/components/shadow-panda/_Select.d.ts +22 -0
- package/dist/components/shadow-panda/_Select.d.ts.map +1 -0
- package/dist/components/shadow-panda/_Select.js +35 -0
- package/dist/components/shadow-panda/_Select.js.map +1 -0
- package/dist/components/shadow-panda/_Slider.d.ts +12 -0
- package/dist/components/shadow-panda/_Slider.d.ts.map +1 -0
- package/dist/components/shadow-panda/_Slider.js +41 -0
- package/dist/components/shadow-panda/_Slider.js.map +1 -0
- package/dist/components/shadow-panda/_Toast.d.ts +7 -0
- package/dist/components/shadow-panda/_Toast.d.ts.map +1 -0
- package/dist/components/shadow-panda/_Toast.js +9 -0
- package/dist/components/shadow-panda/_Toast.js.map +1 -0
- package/dist/components/shadow-panda/_Tooltip.d.ts +12 -0
- package/dist/components/shadow-panda/_Tooltip.d.ts.map +1 -0
- package/dist/components/shadow-panda/_Tooltip.js +16 -0
- package/dist/components/shadow-panda/_Tooltip.js.map +1 -0
- package/dist/components/shadow-panda/index.d.ts +12 -0
- package/dist/components/shadow-panda/index.d.ts.map +1 -0
- package/dist/components/shadow-panda/index.js +12 -0
- package/dist/components/shadow-panda/index.js.map +1 -0
- package/dist/components/skeletons/Button.d.ts +3 -0
- package/dist/components/skeletons/Button.d.ts.map +1 -0
- package/dist/components/skeletons/Button.js +13 -0
- package/dist/components/skeletons/Button.js.map +1 -0
- package/dist/components/skeletons/Grid.d.ts +30 -0
- package/dist/components/skeletons/Grid.d.ts.map +1 -0
- package/dist/components/skeletons/Grid.js +29 -0
- package/dist/components/skeletons/Grid.js.map +1 -0
- package/dist/components/skeletons/Input.d.ts +3 -0
- package/dist/components/skeletons/Input.d.ts.map +1 -0
- package/dist/components/skeletons/Input.js +13 -0
- package/dist/components/skeletons/Input.js.map +1 -0
- package/dist/components/skeletons/Table.d.ts +7 -0
- package/dist/components/skeletons/Table.d.ts.map +1 -0
- package/dist/components/skeletons/Table.js +16 -0
- package/dist/components/skeletons/Table.js.map +1 -0
- package/dist/components/skeletons/Textarea.d.ts +3 -0
- package/dist/components/skeletons/Textarea.d.ts.map +1 -0
- package/dist/components/skeletons/Textarea.js +13 -0
- package/dist/components/skeletons/Textarea.js.map +1 -0
- package/dist/components/skeletons/index.d.ts +6 -0
- package/dist/components/skeletons/index.d.ts.map +1 -0
- package/dist/components/skeletons/index.js +6 -0
- package/dist/components/skeletons/index.js.map +1 -0
- package/dist/helpers.d.ts +38 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +20 -0
- package/dist/helpers.js.map +1 -0
- package/dist/hooks/copy.d.ts +8 -0
- package/dist/hooks/copy.d.ts.map +1 -0
- package/dist/hooks/copy.js +14 -0
- package/dist/hooks/copy.js.map +1 -0
- package/dist/hooks/dropzone.d.ts +16 -0
- package/dist/hooks/dropzone.d.ts.map +1 -0
- package/dist/hooks/dropzone.js +23 -0
- package/dist/hooks/dropzone.js.map +1 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +6 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/modal.d.ts +25 -0
- package/dist/hooks/modal.d.ts.map +1 -0
- package/dist/hooks/modal.js +50 -0
- package/dist/hooks/modal.js.map +1 -0
- package/dist/hooks/use-toast.d.ts +51 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/use-toast.js +153 -0
- package/dist/hooks/use-toast.js.map +1 -0
- package/dist/hooks/use-translations.d.ts +10 -0
- package/dist/hooks/use-translations.d.ts.map +1 -0
- package/dist/hooks/use-translations.js +14 -0
- package/dist/hooks/use-translations.js.map +1 -0
- package/dist/hooks/use-window-width.d.ts +2 -0
- package/dist/hooks/use-window-width.d.ts.map +1 -0
- package/dist/hooks/use-window-width.js +11 -0
- package/dist/hooks/use-window-width.js.map +1 -0
- package/dist/icons/index.d.ts +6 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +5 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/icons/react-icons.d.ts +12 -0
- package/dist/icons/react-icons.d.ts.map +1 -0
- package/dist/icons/react-icons.js +12 -0
- package/dist/icons/react-icons.js.map +1 -0
- package/dist/icons/style-provider.d.ts +3 -0
- package/dist/icons/style-provider.d.ts.map +1 -0
- package/dist/icons/style-provider.js +10 -0
- package/dist/icons/style-provider.js.map +1 -0
- package/dist/icons/svg/AccessDenied.d.ts +3 -0
- package/dist/icons/svg/AccessDenied.d.ts.map +1 -0
- package/dist/icons/svg/AccessDenied.js +6 -0
- package/dist/icons/svg/AccessDenied.js.map +1 -0
- package/dist/icons/svg/Empty.d.ts +3 -0
- package/dist/icons/svg/Empty.d.ts.map +1 -0
- package/dist/icons/svg/Empty.js +6 -0
- package/dist/icons/svg/Empty.js.map +1 -0
- package/dist/icons/svg/Error.d.ts +5 -0
- package/dist/icons/svg/Error.d.ts.map +1 -0
- package/dist/icons/svg/Error.js +6 -0
- package/dist/icons/svg/Error.js.map +1 -0
- package/dist/icons/svg/Logo.d.ts +9 -0
- package/dist/icons/svg/Logo.d.ts.map +1 -0
- package/dist/icons/svg/Logo.js +7 -0
- package/dist/icons/svg/Logo.js.map +1 -0
- package/dist/icons/svg/index.d.ts +5 -0
- package/dist/icons/svg/index.d.ts.map +1 -0
- package/dist/icons/svg/index.js +5 -0
- package/dist/icons/svg/index.js.map +1 -0
- package/dist/index.css +2 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/panda.buildinfo.json +371 -0
- package/dist/panda.css +3400 -0
- package/dist/panda.d.ts +2 -0
- package/dist/panda.d.ts.map +1 -0
- package/dist/panda.js +289 -0
- package/dist/panda.js.map +1 -0
- package/dist/recipes/colors.d.ts +44 -0
- package/dist/recipes/colors.d.ts.map +1 -0
- package/dist/recipes/colors.js +228 -0
- package/dist/recipes/colors.js.map +1 -0
- package/dist/recipes/hover.d.ts +30 -0
- package/dist/recipes/hover.d.ts.map +1 -0
- package/dist/recipes/hover.js +177 -0
- package/dist/recipes/hover.js.map +1 -0
- package/dist/recipes/index.d.ts +3 -0
- package/dist/recipes/index.d.ts.map +1 -0
- package/dist/recipes/index.js +3 -0
- package/dist/recipes/index.js.map +1 -0
- package/dist/styled-system/css/conditions.mjs +34 -0
- package/dist/styled-system/css/css.d.mts +9 -0
- package/dist/styled-system/css/css.mjs +44 -0
- package/dist/styled-system/css/cva.d.mts +6 -0
- package/dist/styled-system/css/cva.mjs +85 -0
- package/dist/styled-system/css/cx.d.mts +5 -0
- package/dist/styled-system/css/cx.mjs +15 -0
- package/dist/styled-system/css/index.d.mts +5 -0
- package/dist/styled-system/css/index.mjs +4 -0
- package/dist/styled-system/css/sva.d.mts +4 -0
- package/dist/styled-system/css/sva.mjs +35 -0
- package/dist/styled-system/helpers.mjs +300 -0
- package/dist/styled-system/jsx/aspect-ratio.d.mts +10 -0
- package/dist/styled-system/jsx/aspect-ratio.mjs +14 -0
- package/dist/styled-system/jsx/bleed.d.mts +10 -0
- package/dist/styled-system/jsx/bleed.mjs +14 -0
- package/dist/styled-system/jsx/box.d.mts +10 -0
- package/dist/styled-system/jsx/box.mjs +14 -0
- package/dist/styled-system/jsx/center.d.mts +10 -0
- package/dist/styled-system/jsx/center.mjs +14 -0
- package/dist/styled-system/jsx/circle.d.mts +10 -0
- package/dist/styled-system/jsx/circle.mjs +14 -0
- package/dist/styled-system/jsx/container.d.mts +10 -0
- package/dist/styled-system/jsx/container.mjs +14 -0
- package/dist/styled-system/jsx/divider.d.mts +10 -0
- package/dist/styled-system/jsx/divider.mjs +14 -0
- package/dist/styled-system/jsx/factory-helper.mjs +22 -0
- package/dist/styled-system/jsx/factory.d.mts +3 -0
- package/dist/styled-system/jsx/factory.mjs +79 -0
- package/dist/styled-system/jsx/flex.d.mts +10 -0
- package/dist/styled-system/jsx/flex.mjs +14 -0
- package/dist/styled-system/jsx/float.d.mts +10 -0
- package/dist/styled-system/jsx/float.mjs +14 -0
- package/dist/styled-system/jsx/grid-item.d.mts +10 -0
- package/dist/styled-system/jsx/grid-item.mjs +14 -0
- package/dist/styled-system/jsx/grid.d.mts +10 -0
- package/dist/styled-system/jsx/grid.mjs +14 -0
- package/dist/styled-system/jsx/hstack.d.mts +10 -0
- package/dist/styled-system/jsx/hstack.mjs +14 -0
- package/dist/styled-system/jsx/index.d.mts +24 -0
- package/dist/styled-system/jsx/index.mjs +22 -0
- package/dist/styled-system/jsx/is-valid-prop.d.mts +5 -0
- package/dist/styled-system/jsx/is-valid-prop.mjs +17 -0
- package/dist/styled-system/jsx/link-box.d.mts +10 -0
- package/dist/styled-system/jsx/link-box.mjs +14 -0
- package/dist/styled-system/jsx/link-overlay.d.mts +10 -0
- package/dist/styled-system/jsx/link-overlay.mjs +14 -0
- package/dist/styled-system/jsx/spacer.d.mts +10 -0
- package/dist/styled-system/jsx/spacer.mjs +14 -0
- package/dist/styled-system/jsx/square.d.mts +10 -0
- package/dist/styled-system/jsx/square.mjs +14 -0
- package/dist/styled-system/jsx/stack.d.mts +10 -0
- package/dist/styled-system/jsx/stack.mjs +14 -0
- package/dist/styled-system/jsx/visually-hidden.d.mts +10 -0
- package/dist/styled-system/jsx/visually-hidden.mjs +14 -0
- package/dist/styled-system/jsx/vstack.d.mts +10 -0
- package/dist/styled-system/jsx/vstack.mjs +14 -0
- package/dist/styled-system/jsx/wrap.d.mts +10 -0
- package/dist/styled-system/jsx/wrap.mjs +14 -0
- package/dist/styled-system/patterns/aspect-ratio.d.mts +21 -0
- package/dist/styled-system/patterns/aspect-ratio.mjs +35 -0
- package/dist/styled-system/patterns/bleed.d.mts +22 -0
- package/dist/styled-system/patterns/bleed.mjs +19 -0
- package/dist/styled-system/patterns/box.d.mts +21 -0
- package/dist/styled-system/patterns/box.mjs +12 -0
- package/dist/styled-system/patterns/center.d.mts +21 -0
- package/dist/styled-system/patterns/center.mjs +18 -0
- package/dist/styled-system/patterns/circle.d.mts +21 -0
- package/dist/styled-system/patterns/circle.mjs +22 -0
- package/dist/styled-system/patterns/container.d.mts +21 -0
- package/dist/styled-system/patterns/container.mjs +18 -0
- package/dist/styled-system/patterns/divider.d.mts +23 -0
- package/dist/styled-system/patterns/divider.mjs +21 -0
- package/dist/styled-system/patterns/flex.d.mts +27 -0
- package/dist/styled-system/patterns/flex.mjs +23 -0
- package/dist/styled-system/patterns/float.d.mts +24 -0
- package/dist/styled-system/patterns/float.mjs +45 -0
- package/dist/styled-system/patterns/grid-item.d.mts +26 -0
- package/dist/styled-system/patterns/grid-item.mjs +22 -0
- package/dist/styled-system/patterns/grid.d.mts +25 -0
- package/dist/styled-system/patterns/grid.mjs +22 -0
- package/dist/styled-system/patterns/hstack.d.mts +22 -0
- package/dist/styled-system/patterns/hstack.mjs +20 -0
- package/dist/styled-system/patterns/index.d.mts +21 -0
- package/dist/styled-system/patterns/index.mjs +20 -0
- package/dist/styled-system/patterns/link-box.d.mts +21 -0
- package/dist/styled-system/patterns/link-box.mjs +19 -0
- package/dist/styled-system/patterns/link-overlay.d.mts +21 -0
- package/dist/styled-system/patterns/link-overlay.mjs +24 -0
- package/dist/styled-system/patterns/spacer.d.mts +21 -0
- package/dist/styled-system/patterns/spacer.mjs +18 -0
- package/dist/styled-system/patterns/square.d.mts +21 -0
- package/dist/styled-system/patterns/square.mjs +21 -0
- package/dist/styled-system/patterns/stack.d.mts +24 -0
- package/dist/styled-system/patterns/stack.mjs +20 -0
- package/dist/styled-system/patterns/visually-hidden.d.mts +21 -0
- package/dist/styled-system/patterns/visually-hidden.mjs +15 -0
- package/dist/styled-system/patterns/vstack.d.mts +22 -0
- package/dist/styled-system/patterns/vstack.mjs +20 -0
- package/dist/styled-system/patterns/wrap.d.mts +25 -0
- package/dist/styled-system/patterns/wrap.mjs +22 -0
- package/dist/styled-system/recipes/accordion.d.mts +27 -0
- package/dist/styled-system/recipes/accordion.mjs +66 -0
- package/dist/styled-system/recipes/alert-description.d.mts +27 -0
- package/dist/styled-system/recipes/alert-description.mjs +22 -0
- package/dist/styled-system/recipes/alert-dialog.d.mts +27 -0
- package/dist/styled-system/recipes/alert-dialog.mjs +114 -0
- package/dist/styled-system/recipes/alert-title.d.mts +27 -0
- package/dist/styled-system/recipes/alert-title.mjs +22 -0
- package/dist/styled-system/recipes/alert.d.mts +27 -0
- package/dist/styled-system/recipes/alert.mjs +29 -0
- package/dist/styled-system/recipes/avatar.d.mts +27 -0
- package/dist/styled-system/recipes/avatar.mjs +50 -0
- package/dist/styled-system/recipes/badge.d.mts +27 -0
- package/dist/styled-system/recipes/badge.mjs +31 -0
- package/dist/styled-system/recipes/blockquote.d.mts +27 -0
- package/dist/styled-system/recipes/blockquote.mjs +22 -0
- package/dist/styled-system/recipes/button.d.mts +28 -0
- package/dist/styled-system/recipes/button.mjs +40 -0
- package/dist/styled-system/recipes/calendar.d.mts +27 -0
- package/dist/styled-system/recipes/calendar.mjs +210 -0
- package/dist/styled-system/recipes/card-content.d.mts +27 -0
- package/dist/styled-system/recipes/card-content.mjs +22 -0
- package/dist/styled-system/recipes/card-description.d.mts +27 -0
- package/dist/styled-system/recipes/card-description.mjs +22 -0
- package/dist/styled-system/recipes/card-footer.d.mts +27 -0
- package/dist/styled-system/recipes/card-footer.mjs +22 -0
- package/dist/styled-system/recipes/card-header.d.mts +27 -0
- package/dist/styled-system/recipes/card-header.mjs +22 -0
- package/dist/styled-system/recipes/card-title.d.mts +27 -0
- package/dist/styled-system/recipes/card-title.mjs +22 -0
- package/dist/styled-system/recipes/card.d.mts +27 -0
- package/dist/styled-system/recipes/card.mjs +22 -0
- package/dist/styled-system/recipes/checkbox.d.mts +27 -0
- package/dist/styled-system/recipes/checkbox.mjs +42 -0
- package/dist/styled-system/recipes/collapsible.d.mts +27 -0
- package/dist/styled-system/recipes/collapsible.mjs +50 -0
- package/dist/styled-system/recipes/command-dialog.d.mts +27 -0
- package/dist/styled-system/recipes/command-dialog.mjs +42 -0
- package/dist/styled-system/recipes/command.d.mts +27 -0
- package/dist/styled-system/recipes/command.mjs +106 -0
- package/dist/styled-system/recipes/context-menu.d.mts +27 -0
- package/dist/styled-system/recipes/context-menu.mjs +162 -0
- package/dist/styled-system/recipes/create-recipe.d.mts +1 -0
- package/dist/styled-system/recipes/create-recipe.mjs +79 -0
- package/dist/styled-system/recipes/dialog.d.mts +27 -0
- package/dist/styled-system/recipes/dialog.mjs +106 -0
- package/dist/styled-system/recipes/dropdown-menu.d.mts +27 -0
- package/dist/styled-system/recipes/dropdown-menu.mjs +154 -0
- package/dist/styled-system/recipes/form-control.d.mts +27 -0
- package/dist/styled-system/recipes/form-control.mjs +22 -0
- package/dist/styled-system/recipes/form-description.d.mts +27 -0
- package/dist/styled-system/recipes/form-description.mjs +22 -0
- package/dist/styled-system/recipes/form-item.d.mts +27 -0
- package/dist/styled-system/recipes/form-item.mjs +22 -0
- package/dist/styled-system/recipes/form-label.d.mts +27 -0
- package/dist/styled-system/recipes/form-label.mjs +22 -0
- package/dist/styled-system/recipes/form-message.d.mts +27 -0
- package/dist/styled-system/recipes/form-message.mjs +22 -0
- package/dist/styled-system/recipes/h1.d.mts +27 -0
- package/dist/styled-system/recipes/h1.mjs +22 -0
- package/dist/styled-system/recipes/h2.d.mts +27 -0
- package/dist/styled-system/recipes/h2.mjs +22 -0
- package/dist/styled-system/recipes/h3.d.mts +27 -0
- package/dist/styled-system/recipes/h3.mjs +22 -0
- package/dist/styled-system/recipes/h4.d.mts +27 -0
- package/dist/styled-system/recipes/h4.mjs +22 -0
- package/dist/styled-system/recipes/hover-card.d.mts +27 -0
- package/dist/styled-system/recipes/hover-card.mjs +50 -0
- package/dist/styled-system/recipes/icon.d.mts +31 -0
- package/dist/styled-system/recipes/icon.mjs +52 -0
- package/dist/styled-system/recipes/index.d.mts +74 -0
- package/dist/styled-system/recipes/index.mjs +73 -0
- package/dist/styled-system/recipes/inline-code.d.mts +27 -0
- package/dist/styled-system/recipes/inline-code.mjs +22 -0
- package/dist/styled-system/recipes/input.d.mts +27 -0
- package/dist/styled-system/recipes/input.mjs +22 -0
- package/dist/styled-system/recipes/label.d.mts +27 -0
- package/dist/styled-system/recipes/label.mjs +22 -0
- package/dist/styled-system/recipes/large.d.mts +27 -0
- package/dist/styled-system/recipes/large.mjs +22 -0
- package/dist/styled-system/recipes/lead.d.mts +27 -0
- package/dist/styled-system/recipes/lead.mjs +22 -0
- package/dist/styled-system/recipes/link.d.mts +27 -0
- package/dist/styled-system/recipes/link.mjs +22 -0
- package/dist/styled-system/recipes/list.d.mts +27 -0
- package/dist/styled-system/recipes/list.mjs +22 -0
- package/dist/styled-system/recipes/menubar.d.mts +27 -0
- package/dist/styled-system/recipes/menubar.mjs +162 -0
- package/dist/styled-system/recipes/muted.d.mts +27 -0
- package/dist/styled-system/recipes/muted.mjs +22 -0
- package/dist/styled-system/recipes/navigation-menu.d.mts +27 -0
- package/dist/styled-system/recipes/navigation-menu.mjs +98 -0
- package/dist/styled-system/recipes/p.d.mts +27 -0
- package/dist/styled-system/recipes/p.mjs +22 -0
- package/dist/styled-system/recipes/popover.d.mts +27 -0
- package/dist/styled-system/recipes/popover.mjs +58 -0
- package/dist/styled-system/recipes/progress.d.mts +27 -0
- package/dist/styled-system/recipes/progress.mjs +42 -0
- package/dist/styled-system/recipes/radio-group.d.mts +27 -0
- package/dist/styled-system/recipes/radio-group.mjs +58 -0
- package/dist/styled-system/recipes/scroll-area.d.mts +27 -0
- package/dist/styled-system/recipes/scroll-area.mjs +66 -0
- package/dist/styled-system/recipes/select.d.mts +27 -0
- package/dist/styled-system/recipes/select.mjs +106 -0
- package/dist/styled-system/recipes/separator.d.mts +27 -0
- package/dist/styled-system/recipes/separator.mjs +29 -0
- package/dist/styled-system/recipes/sheet.d.mts +27 -0
- package/dist/styled-system/recipes/sheet.mjs +125 -0
- package/dist/styled-system/recipes/skeleton.d.mts +27 -0
- package/dist/styled-system/recipes/skeleton.mjs +22 -0
- package/dist/styled-system/recipes/slider.d.mts +27 -0
- package/dist/styled-system/recipes/slider.mjs +58 -0
- package/dist/styled-system/recipes/small.d.mts +27 -0
- package/dist/styled-system/recipes/small.mjs +22 -0
- package/dist/styled-system/recipes/switch-recipe.d.mts +27 -0
- package/dist/styled-system/recipes/switch-recipe.mjs +42 -0
- package/dist/styled-system/recipes/table-body.d.mts +27 -0
- package/dist/styled-system/recipes/table-body.mjs +22 -0
- package/dist/styled-system/recipes/table-caption.d.mts +27 -0
- package/dist/styled-system/recipes/table-caption.mjs +22 -0
- package/dist/styled-system/recipes/table-cell.d.mts +27 -0
- package/dist/styled-system/recipes/table-cell.mjs +22 -0
- package/dist/styled-system/recipes/table-container.d.mts +27 -0
- package/dist/styled-system/recipes/table-container.mjs +22 -0
- package/dist/styled-system/recipes/table-footer.d.mts +27 -0
- package/dist/styled-system/recipes/table-footer.mjs +22 -0
- package/dist/styled-system/recipes/table-head.d.mts +27 -0
- package/dist/styled-system/recipes/table-head.mjs +22 -0
- package/dist/styled-system/recipes/table-header.d.mts +27 -0
- package/dist/styled-system/recipes/table-header.mjs +22 -0
- package/dist/styled-system/recipes/table-row.d.mts +27 -0
- package/dist/styled-system/recipes/table-row.mjs +22 -0
- package/dist/styled-system/recipes/table.d.mts +27 -0
- package/dist/styled-system/recipes/table.mjs +22 -0
- package/dist/styled-system/recipes/tabs.d.mts +27 -0
- package/dist/styled-system/recipes/tabs.mjs +58 -0
- package/dist/styled-system/recipes/textarea.d.mts +27 -0
- package/dist/styled-system/recipes/textarea.mjs +22 -0
- package/dist/styled-system/recipes/toast-viewport.d.mts +27 -0
- package/dist/styled-system/recipes/toast-viewport.mjs +22 -0
- package/dist/styled-system/recipes/toast.d.mts +27 -0
- package/dist/styled-system/recipes/toast.mjs +83 -0
- package/dist/styled-system/recipes/toggle.d.mts +28 -0
- package/dist/styled-system/recipes/toggle.mjs +35 -0
- package/dist/styled-system/recipes/tooltip.d.mts +27 -0
- package/dist/styled-system/recipes/tooltip.mjs +50 -0
- package/dist/styled-system/recipes/typography-table-container.d.mts +27 -0
- package/dist/styled-system/recipes/typography-table-container.mjs +22 -0
- package/dist/styled-system/recipes/typography-table.d.mts +27 -0
- package/dist/styled-system/recipes/typography-table.mjs +22 -0
- package/dist/styled-system/tokens/index.d.mts +9 -0
- package/dist/styled-system/tokens/index.mjs +2680 -0
- package/dist/styled-system/tokens/tokens.d.mts +63 -0
- package/dist/styled-system/types/composition.d.mts +111 -0
- package/dist/styled-system/types/conditions.d.mts +268 -0
- package/dist/styled-system/types/csstype.d.mts +21298 -0
- package/dist/styled-system/types/global.d.mts +19 -0
- package/dist/styled-system/types/index.d.mts +8 -0
- package/dist/styled-system/types/jsx.d.mts +52 -0
- package/dist/styled-system/types/parts.d.mts +8 -0
- package/dist/styled-system/types/pattern.d.mts +63 -0
- package/dist/styled-system/types/prop-type.d.mts +437 -0
- package/dist/styled-system/types/recipe.d.mts +158 -0
- package/dist/styled-system/types/selectors.d.mts +59 -0
- package/dist/styled-system/types/static-css.d.mts +47 -0
- package/dist/styled-system/types/style-props.d.mts +687 -0
- package/dist/styled-system/types/system-types.d.mts +93 -0
- package/dist/translations/en/common/common.d.ts +7 -0
- package/dist/translations/en/common/common.d.ts.map +1 -0
- package/dist/translations/en/common/common.js +7 -0
- package/dist/translations/en/common/common.js.map +1 -0
- package/dist/translations/en/index.d.ts +7 -0
- package/dist/translations/en/index.d.ts.map +1 -0
- package/dist/translations/en/index.js +6 -0
- package/dist/translations/en/index.js.map +1 -0
- package/dist/translations/formatters.d.ts +4 -0
- package/dist/translations/formatters.d.ts.map +1 -0
- package/dist/translations/formatters.js +7 -0
- package/dist/translations/formatters.js.map +1 -0
- package/dist/translations/i18n-react.d.ts +11 -0
- package/dist/translations/i18n-react.d.ts.map +1 -0
- package/dist/translations/i18n-react.js +10 -0
- package/dist/translations/i18n-react.js.map +1 -0
- package/dist/translations/i18n-types.d.ts +25 -0
- package/dist/translations/i18n-types.d.ts.map +1 -0
- package/dist/translations/i18n-types.js +2 -0
- package/dist/translations/i18n-types.js.map +1 -0
- package/dist/translations/i18n-util.async.d.ts +6 -0
- package/dist/translations/i18n-util.async.d.ts.map +1 -0
- package/dist/translations/i18n-util.async.js +16 -0
- package/dist/translations/i18n-util.async.js.map +1 -0
- package/dist/translations/i18n-util.d.ts +18 -0
- package/dist/translations/i18n-util.d.ts.map +1 -0
- package/dist/translations/i18n-util.js +18 -0
- package/dist/translations/i18n-util.js.map +1 -0
- package/dist/translations/i18n-util.sync.d.ts +5 -0
- package/dist/translations/i18n-util.sync.d.ts.map +1 -0
- package/dist/translations/i18n-util.sync.js +17 -0
- package/dist/translations/i18n-util.sync.js.map +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
// src/assert.ts
|
|
2
|
+
function isObject(value) {
|
|
3
|
+
return typeof value === "object" && value != null && !Array.isArray(value);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
// src/compact.ts
|
|
7
|
+
function compact(value) {
|
|
8
|
+
return Object.fromEntries(Object.entries(value ?? {}).filter(([_, value2]) => value2 !== void 0));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// src/condition.ts
|
|
12
|
+
var isBaseCondition = (v) => v === "base";
|
|
13
|
+
function filterBaseConditions(c) {
|
|
14
|
+
return c.slice().filter((v) => !isBaseCondition(v));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// src/css-important.ts
|
|
18
|
+
var importantRegex = /!(important)?/;
|
|
19
|
+
function isImportant(value) {
|
|
20
|
+
return typeof value === "string" ? importantRegex.test(value) : false;
|
|
21
|
+
}
|
|
22
|
+
function withoutImportant(value) {
|
|
23
|
+
return typeof value === "string" ? value.replace(importantRegex, "").trim() : value;
|
|
24
|
+
}
|
|
25
|
+
function withoutSpace(str) {
|
|
26
|
+
return typeof str === "string" ? str.replaceAll(" ", "_") : str;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// src/hash.ts
|
|
30
|
+
function toChar(code) {
|
|
31
|
+
return String.fromCharCode(code + (code > 25 ? 39 : 97));
|
|
32
|
+
}
|
|
33
|
+
function toName(code) {
|
|
34
|
+
let name = "";
|
|
35
|
+
let x;
|
|
36
|
+
for (x = Math.abs(code); x > 52; x = x / 52 | 0)
|
|
37
|
+
name = toChar(x % 52) + name;
|
|
38
|
+
return toChar(x % 52) + name;
|
|
39
|
+
}
|
|
40
|
+
function toPhash(h, x) {
|
|
41
|
+
let i = x.length;
|
|
42
|
+
while (i)
|
|
43
|
+
h = h * 33 ^ x.charCodeAt(--i);
|
|
44
|
+
return h;
|
|
45
|
+
}
|
|
46
|
+
function toHash(value) {
|
|
47
|
+
return toName(toPhash(5381, value) >>> 0);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// src/merge-props.ts
|
|
51
|
+
function mergeProps(...sources) {
|
|
52
|
+
const objects = sources.filter(Boolean);
|
|
53
|
+
return objects.reduce((prev, obj) => {
|
|
54
|
+
Object.keys(obj).forEach((key) => {
|
|
55
|
+
const prevValue = prev[key];
|
|
56
|
+
const value = obj[key];
|
|
57
|
+
if (isObject(prevValue) && isObject(value)) {
|
|
58
|
+
prev[key] = mergeProps(prevValue, value);
|
|
59
|
+
} else {
|
|
60
|
+
prev[key] = value;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
return prev;
|
|
64
|
+
}, {});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// src/walk-object.ts
|
|
68
|
+
var isNotNullish = (element) => element != null;
|
|
69
|
+
function walkObject(target, predicate, options = {}) {
|
|
70
|
+
const { stop, getKey } = options;
|
|
71
|
+
function inner(value, path = []) {
|
|
72
|
+
if (isObject(value) || Array.isArray(value)) {
|
|
73
|
+
const result = {};
|
|
74
|
+
for (const [prop, child] of Object.entries(value)) {
|
|
75
|
+
const key = getKey?.(prop) ?? prop;
|
|
76
|
+
const childPath = [...path, key];
|
|
77
|
+
if (stop?.(value, childPath)) {
|
|
78
|
+
return predicate(value, path);
|
|
79
|
+
}
|
|
80
|
+
const next = inner(child, childPath);
|
|
81
|
+
if (isNotNullish(next)) {
|
|
82
|
+
result[key] = next;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return result;
|
|
86
|
+
}
|
|
87
|
+
return predicate(value, path);
|
|
88
|
+
}
|
|
89
|
+
return inner(target);
|
|
90
|
+
}
|
|
91
|
+
function mapObject(obj, fn) {
|
|
92
|
+
if (Array.isArray(obj))
|
|
93
|
+
return obj.map((value) => fn(value));
|
|
94
|
+
if (!isObject(obj))
|
|
95
|
+
return fn(obj);
|
|
96
|
+
return walkObject(obj, (value) => fn(value));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// src/normalize-style-object.ts
|
|
100
|
+
function toResponsiveObject(values, breakpoints) {
|
|
101
|
+
return values.reduce((acc, current, index) => {
|
|
102
|
+
const key = breakpoints[index];
|
|
103
|
+
if (current != null) {
|
|
104
|
+
acc[key] = current;
|
|
105
|
+
}
|
|
106
|
+
return acc;
|
|
107
|
+
}, {});
|
|
108
|
+
}
|
|
109
|
+
function normalizeShorthand(styles, context) {
|
|
110
|
+
const { hasShorthand, resolveShorthand } = context.utility;
|
|
111
|
+
return walkObject(styles, (v) => v, {
|
|
112
|
+
getKey: (prop) => {
|
|
113
|
+
return hasShorthand ? resolveShorthand(prop) : prop;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function normalizeStyleObject(styles, context, shorthand = true) {
|
|
118
|
+
const { utility, conditions } = context;
|
|
119
|
+
const { hasShorthand, resolveShorthand } = utility;
|
|
120
|
+
return walkObject(
|
|
121
|
+
styles,
|
|
122
|
+
(value) => {
|
|
123
|
+
return Array.isArray(value) ? toResponsiveObject(value, conditions.breakpoints.keys) : value;
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
stop: (value) => Array.isArray(value),
|
|
127
|
+
getKey: shorthand ? (prop) => hasShorthand ? resolveShorthand(prop) : prop : void 0
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// src/classname.ts
|
|
133
|
+
var fallbackCondition = {
|
|
134
|
+
shift: (v) => v,
|
|
135
|
+
finalize: (v) => v,
|
|
136
|
+
breakpoints: { keys: [] }
|
|
137
|
+
};
|
|
138
|
+
var sanitize = (value) => typeof value === "string" ? value.replaceAll(/[\n\s]+/g, " ") : value;
|
|
139
|
+
function createCss(context) {
|
|
140
|
+
const { utility, hash, conditions: conds = fallbackCondition } = context;
|
|
141
|
+
const formatClassName = (str) => [utility.prefix, str].filter(Boolean).join("-");
|
|
142
|
+
const hashFn = (conditions, className) => {
|
|
143
|
+
let result;
|
|
144
|
+
if (hash) {
|
|
145
|
+
const baseArray = [...conds.finalize(conditions), className];
|
|
146
|
+
result = formatClassName(toHash(baseArray.join(":")));
|
|
147
|
+
} else {
|
|
148
|
+
const baseArray = [...conds.finalize(conditions), formatClassName(className)];
|
|
149
|
+
result = baseArray.join(":");
|
|
150
|
+
}
|
|
151
|
+
return result;
|
|
152
|
+
};
|
|
153
|
+
return (styleObject = {}) => {
|
|
154
|
+
const normalizedObject = normalizeStyleObject(styleObject, context);
|
|
155
|
+
const classNames = /* @__PURE__ */ new Set();
|
|
156
|
+
walkObject(normalizedObject, (value, paths) => {
|
|
157
|
+
const important = isImportant(value);
|
|
158
|
+
if (value == null)
|
|
159
|
+
return;
|
|
160
|
+
const [prop, ...allConditions] = conds.shift(paths);
|
|
161
|
+
const conditions = filterBaseConditions(allConditions);
|
|
162
|
+
const transformed = utility.transform(prop, withoutImportant(sanitize(value)));
|
|
163
|
+
let className = hashFn(conditions, transformed.className);
|
|
164
|
+
if (important)
|
|
165
|
+
className = `${className}!`;
|
|
166
|
+
classNames.add(className);
|
|
167
|
+
});
|
|
168
|
+
return Array.from(classNames).join(" ");
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function compactStyles(...styles) {
|
|
172
|
+
return styles.filter((style) => isObject(style) && Object.keys(compact(style)).length > 0);
|
|
173
|
+
}
|
|
174
|
+
function createMergeCss(context) {
|
|
175
|
+
function resolve(styles) {
|
|
176
|
+
const allStyles = compactStyles(...styles);
|
|
177
|
+
if (allStyles.length === 1)
|
|
178
|
+
return allStyles;
|
|
179
|
+
return allStyles.map((style) => normalizeShorthand(style, context));
|
|
180
|
+
}
|
|
181
|
+
function mergeCss(...styles) {
|
|
182
|
+
return mergeProps(...resolve(styles));
|
|
183
|
+
}
|
|
184
|
+
function assignCss(...styles) {
|
|
185
|
+
return Object.assign({}, ...resolve(styles));
|
|
186
|
+
}
|
|
187
|
+
return { mergeCss, assignCss };
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// src/memo.ts
|
|
191
|
+
var memo = (fn) => {
|
|
192
|
+
const cache = /* @__PURE__ */ new Map();
|
|
193
|
+
const get = (...args) => {
|
|
194
|
+
const key = JSON.stringify(args);
|
|
195
|
+
if (cache.has(key)) {
|
|
196
|
+
return cache.get(key);
|
|
197
|
+
}
|
|
198
|
+
const result = fn(...args);
|
|
199
|
+
cache.set(key, result);
|
|
200
|
+
return result;
|
|
201
|
+
};
|
|
202
|
+
return get;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
// src/hypenate-property.ts
|
|
206
|
+
var wordRegex = /([A-Z])/g;
|
|
207
|
+
var msRegex = /^ms-/;
|
|
208
|
+
var hypenateProperty = memo((property) => {
|
|
209
|
+
if (property.startsWith("--"))
|
|
210
|
+
return property;
|
|
211
|
+
return property.replace(wordRegex, "-$1").replace(msRegex, "-ms-").toLowerCase();
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
// src/slot.ts
|
|
215
|
+
var getSlotRecipes = (recipe = {}) => {
|
|
216
|
+
const init = (slot) => ({
|
|
217
|
+
className: [recipe.className, slot].filter(Boolean).join("__"),
|
|
218
|
+
base: recipe.base?.[slot] ?? {},
|
|
219
|
+
variants: {},
|
|
220
|
+
defaultVariants: recipe.defaultVariants ?? {},
|
|
221
|
+
compoundVariants: recipe.compoundVariants ? getSlotCompoundVariant(recipe.compoundVariants, slot) : []
|
|
222
|
+
});
|
|
223
|
+
const slots = recipe.slots ?? [];
|
|
224
|
+
const recipeParts = slots.map((slot) => [slot, init(slot)]);
|
|
225
|
+
for (const [variantsKey, variantsSpec] of Object.entries(recipe.variants ?? {})) {
|
|
226
|
+
for (const [variantKey, variantSpec] of Object.entries(variantsSpec)) {
|
|
227
|
+
recipeParts.forEach(([slot, slotRecipe]) => {
|
|
228
|
+
slotRecipe.variants[variantsKey] ??= {};
|
|
229
|
+
slotRecipe.variants[variantsKey][variantKey] = variantSpec[slot] ?? {};
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return Object.fromEntries(recipeParts);
|
|
234
|
+
};
|
|
235
|
+
var getSlotCompoundVariant = (compoundVariants, slotName) => compoundVariants.filter((compoundVariant) => compoundVariant.css[slotName]).map((compoundVariant) => ({ ...compoundVariant, css: compoundVariant.css[slotName] }));
|
|
236
|
+
|
|
237
|
+
// src/split-props.ts
|
|
238
|
+
function splitProps(props, ...keys) {
|
|
239
|
+
const descriptors = Object.getOwnPropertyDescriptors(props);
|
|
240
|
+
const dKeys = Object.keys(descriptors);
|
|
241
|
+
const split = (k) => {
|
|
242
|
+
const clone = {};
|
|
243
|
+
for (let i = 0; i < k.length; i++) {
|
|
244
|
+
const key = k[i];
|
|
245
|
+
if (descriptors[key]) {
|
|
246
|
+
Object.defineProperty(clone, key, descriptors[key]);
|
|
247
|
+
delete descriptors[key];
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return clone;
|
|
251
|
+
};
|
|
252
|
+
const fn = (key) => split(Array.isArray(key) ? key : dKeys.filter(key));
|
|
253
|
+
return keys.map(fn).concat(split(dKeys));
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// src/uniq.ts
|
|
257
|
+
var uniq = (...items) => items.filter(Boolean).reduce((acc, item) => Array.from(/* @__PURE__ */ new Set([...acc, ...item])), []);
|
|
258
|
+
export {
|
|
259
|
+
compact,
|
|
260
|
+
createCss,
|
|
261
|
+
createMergeCss,
|
|
262
|
+
filterBaseConditions,
|
|
263
|
+
getSlotCompoundVariant,
|
|
264
|
+
getSlotRecipes,
|
|
265
|
+
hypenateProperty,
|
|
266
|
+
isBaseCondition,
|
|
267
|
+
isObject,
|
|
268
|
+
mapObject,
|
|
269
|
+
memo,
|
|
270
|
+
mergeProps,
|
|
271
|
+
splitProps,
|
|
272
|
+
toHash,
|
|
273
|
+
uniq,
|
|
274
|
+
walkObject,
|
|
275
|
+
withoutSpace
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
// src/normalize-html.ts
|
|
281
|
+
var htmlProps = ["htmlSize", "htmlTranslate", "htmlWidth", "htmlHeight"];
|
|
282
|
+
function convert(key) {
|
|
283
|
+
return htmlProps.includes(key) ? key.replace("html", "").toLowerCase() : key;
|
|
284
|
+
}
|
|
285
|
+
function normalizeHTMLProps(props) {
|
|
286
|
+
return Object.fromEntries(Object.entries(props).map(([key, value]) => [convert(key), value]));
|
|
287
|
+
}
|
|
288
|
+
normalizeHTMLProps.keys = htmlProps;
|
|
289
|
+
export {
|
|
290
|
+
normalizeHTMLProps
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
export function __spreadValues(a, b) {
|
|
295
|
+
return { ...a, ...b }
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export function __objRest(source, exclude) {
|
|
299
|
+
return Object.fromEntries(Object.entries(source).filter(([key]) => !exclude.includes(key)))
|
|
300
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { AspectRatioProperties } from '../patterns/aspect-ratio.d.mts';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx.d.mts';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
6
|
+
|
|
7
|
+
export interface AspectRatioProps extends AspectRatioProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof AspectRatioProperties | 'aspectRatio'> {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const AspectRatio: FunctionComponent<AspectRatioProps>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getAspectRatioStyle } from '../patterns/aspect-ratio.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const AspectRatio = /* @__PURE__ */ forwardRef(function AspectRatio(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["ratio"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getAspectRatioStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { BleedProperties } from '../patterns/bleed.d.mts';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx.d.mts';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
6
|
+
|
|
7
|
+
export interface BleedProps extends BleedProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof BleedProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const Bleed: FunctionComponent<BleedProps>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getBleedStyle } from '../patterns/bleed.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const Bleed = /* @__PURE__ */ forwardRef(function Bleed(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["inline","block"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getBleedStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { BoxProperties } from '../patterns/box.d.mts';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx.d.mts';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
6
|
+
|
|
7
|
+
export interface BoxProps extends BoxProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof BoxProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const Box: FunctionComponent<BoxProps>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getBoxStyle } from '../patterns/box.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const Box = /* @__PURE__ */ forwardRef(function Box(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
+
|
|
10
|
+
const styleProps = getBoxStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { CenterProperties } from '../patterns/center.d.mts';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx.d.mts';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
6
|
+
|
|
7
|
+
export interface CenterProps extends CenterProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof CenterProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const Center: FunctionComponent<CenterProps>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getCenterStyle } from '../patterns/center.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const Center = /* @__PURE__ */ forwardRef(function Center(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["inline"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getCenterStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { CircleProperties } from '../patterns/circle.d.mts';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx.d.mts';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
6
|
+
|
|
7
|
+
export interface CircleProps extends CircleProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof CircleProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const Circle: FunctionComponent<CircleProps>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getCircleStyle } from '../patterns/circle.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const Circle = /* @__PURE__ */ forwardRef(function Circle(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["size"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getCircleStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { ContainerProperties } from '../patterns/container.d.mts';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx.d.mts';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
6
|
+
|
|
7
|
+
export interface ContainerProps extends ContainerProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof ContainerProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const Container: FunctionComponent<ContainerProps>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getContainerStyle } from '../patterns/container.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const Container = /* @__PURE__ */ forwardRef(function Container(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
+
|
|
10
|
+
const styleProps = getContainerStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { DividerProperties } from '../patterns/divider.d.mts';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx.d.mts';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
6
|
+
|
|
7
|
+
export interface DividerProps extends DividerProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof DividerProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const Divider: FunctionComponent<DividerProps>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getDividerStyle } from '../patterns/divider.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const Divider = /* @__PURE__ */ forwardRef(function Divider(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["orientation","thickness","color"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getDividerStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { isCssProperty } from './is-valid-prop.mjs';
|
|
2
|
+
|
|
3
|
+
export const defaultShouldForwardProp = (prop, variantKeys) => !variantKeys.includes(prop) && !isCssProperty(prop)
|
|
4
|
+
|
|
5
|
+
export const composeShouldForwardProps = (tag, shouldForwardProp) =>
|
|
6
|
+
tag.__shouldForwardProps__ && shouldForwardProp
|
|
7
|
+
? (propName) => tag.__shouldForwardProps__(propName) && shouldForwardProp(propName)
|
|
8
|
+
: shouldForwardProp
|
|
9
|
+
|
|
10
|
+
export const composeCvaFn = (cvaA, cvaB) => {
|
|
11
|
+
if (cvaA && !cvaB) return cvaA
|
|
12
|
+
if (!cvaA && cvaB) return cvaB
|
|
13
|
+
if ((cvaA.__cva__ && cvaB.__cva__) || (cvaA.__recipe__ && cvaB.__recipe__)) return cvaA.merge(cvaB)
|
|
14
|
+
const error = new TypeError('Cannot merge cva with recipe. Please use either cva or recipe.')
|
|
15
|
+
TypeError.captureStackTrace?.(error)
|
|
16
|
+
throw error
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const getDisplayName = (Component) => {
|
|
20
|
+
if (typeof Component === 'string') return Component
|
|
21
|
+
return Component?.displayName || Component?.name || 'Component'
|
|
22
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { createElement, forwardRef, useMemo } from 'react'
|
|
2
|
+
import { css, cx, cva } from '../css/index.mjs';
|
|
3
|
+
import { defaultShouldForwardProp, composeShouldForwardProps, composeCvaFn, getDisplayName } from './factory-helper.mjs';
|
|
4
|
+
import { splitProps, normalizeHTMLProps } from '../helpers.mjs';
|
|
5
|
+
import { isCssProperty } from './is-valid-prop.mjs';
|
|
6
|
+
|
|
7
|
+
function styledFn(Dynamic, configOrCva = {}, options = {}) {
|
|
8
|
+
const cvaFn = configOrCva.__cva__ || configOrCva.__recipe__ ? configOrCva : cva(configOrCva)
|
|
9
|
+
|
|
10
|
+
const forwardFn = options.shouldForwardProp || defaultShouldForwardProp
|
|
11
|
+
const shouldForwardProp = (prop) => forwardFn(prop, cvaFn.variantKeys)
|
|
12
|
+
|
|
13
|
+
const defaultProps = Object.assign(
|
|
14
|
+
options.dataAttr && configOrCva.__name__ ? { 'data-recipe': configOrCva.__name__ } : {},
|
|
15
|
+
options.defaultProps,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
const StyledComponent = /* @__PURE__ */ forwardRef(function StyledComponent(props, ref) {
|
|
19
|
+
const { as: Element = Dynamic.__base__ || Dynamic, children, ...restProps } = props
|
|
20
|
+
|
|
21
|
+
const __cvaFn__ = composeCvaFn(Dynamic.__cva__, cvaFn)
|
|
22
|
+
const __shouldForwardProps__ = composeShouldForwardProps(Dynamic, shouldForwardProp)
|
|
23
|
+
|
|
24
|
+
const combinedProps = useMemo(() => Object.assign({}, defaultProps, restProps), [restProps])
|
|
25
|
+
|
|
26
|
+
const [htmlProps, forwardedProps, variantProps, styleProps, elementProps] = useMemo(() => {
|
|
27
|
+
return splitProps(combinedProps, normalizeHTMLProps.keys, __shouldForwardProps__, __cvaFn__.variantKeys, isCssProperty)
|
|
28
|
+
}, [combinedProps])
|
|
29
|
+
|
|
30
|
+
function recipeClass() {
|
|
31
|
+
const { css: cssStyles, ...propStyles } = styleProps
|
|
32
|
+
const compoundVariantStyles = __cvaFn__.__getCompoundVariantCss__?.(variantProps)
|
|
33
|
+
return cx(__cvaFn__(variantProps, false), css(compoundVariantStyles, propStyles, cssStyles), combinedProps.className)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function cvaClass() {
|
|
37
|
+
const { css: cssStyles, ...propStyles } = styleProps
|
|
38
|
+
const cvaStyles = __cvaFn__.raw(variantProps)
|
|
39
|
+
return cx(css(cvaStyles, propStyles, cssStyles), combinedProps.className)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const classes = configOrCva.__recipe__ ? recipeClass : cvaClass
|
|
43
|
+
|
|
44
|
+
return createElement(Element, {
|
|
45
|
+
ref,
|
|
46
|
+
...forwardedProps,
|
|
47
|
+
...elementProps,
|
|
48
|
+
...normalizeHTMLProps(htmlProps),
|
|
49
|
+
className: classes(),
|
|
50
|
+
}, combinedProps.children ?? children)
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
const name = getDisplayName(Dynamic)
|
|
54
|
+
|
|
55
|
+
StyledComponent.displayName = `styled.${name}`
|
|
56
|
+
StyledComponent.__cva__ = cvaFn
|
|
57
|
+
StyledComponent.__base__ = Dynamic
|
|
58
|
+
StyledComponent.__shouldForwardProps__ = shouldForwardProp
|
|
59
|
+
|
|
60
|
+
return StyledComponent
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function createJsxFactory() {
|
|
64
|
+
const cache = new Map()
|
|
65
|
+
|
|
66
|
+
return new Proxy(styledFn, {
|
|
67
|
+
apply(_, __, args) {
|
|
68
|
+
return styledFn(...args)
|
|
69
|
+
},
|
|
70
|
+
get(_, el) {
|
|
71
|
+
if (!cache.has(el)) {
|
|
72
|
+
cache.set(el, styledFn(el))
|
|
73
|
+
}
|
|
74
|
+
return cache.get(el)
|
|
75
|
+
},
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export const styled = /* @__PURE__ */ createJsxFactory()
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { FlexProperties } from '../patterns/flex.d.mts';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx.d.mts';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
6
|
+
|
|
7
|
+
export interface FlexProps extends FlexProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof FlexProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const Flex: FunctionComponent<FlexProps>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getFlexStyle } from '../patterns/flex.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const Flex = /* @__PURE__ */ forwardRef(function Flex(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["align","justify","direction","wrap","basis","grow","shrink"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getFlexStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { FloatProperties } from '../patterns/float.d.mts';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx.d.mts';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
6
|
+
|
|
7
|
+
export interface FloatProps extends FloatProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof FloatProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const Float: FunctionComponent<FloatProps>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getFloatStyle } from '../patterns/float.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const Float = /* @__PURE__ */ forwardRef(function Float(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["offsetX","offsetY","offset","placement"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getFloatStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { GridItemProperties } from '../patterns/grid-item.d.mts';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx.d.mts';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
6
|
+
|
|
7
|
+
export interface GridItemProps extends GridItemProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof GridItemProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const GridItem: FunctionComponent<GridItemProps>
|