@stokelp/ui 2.96.6 → 2.97.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_commonjsHelpers.cjs +2 -0
- package/dist/_virtual/_commonjsHelpers.cjs.map +1 -0
- package/dist/_virtual/_commonjsHelpers.js +10 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/cjs.cjs +2 -0
- package/dist/_virtual/cjs.cjs.map +1 -0
- package/dist/_virtual/cjs.js +9 -0
- package/dist/_virtual/cjs.js.map +1 -0
- package/dist/_virtual/lodash.cjs +2 -0
- package/dist/_virtual/lodash.cjs.map +1 -0
- package/dist/_virtual/lodash.js +7 -0
- package/dist/_virtual/lodash.js.map +1 -0
- package/dist/_virtual/lodash2.cjs +2 -0
- package/dist/_virtual/lodash2.cjs.map +1 -0
- package/dist/_virtual/lodash2.js +6 -0
- package/dist/_virtual/lodash2.js.map +1 -0
- package/dist/components/accordion/Accordion.cjs +2 -0
- package/dist/components/accordion/Accordion.cjs.map +1 -0
- package/dist/components/accordion/Accordion.js +29 -0
- package/dist/components/accordion/Accordion.js.map +1 -0
- package/dist/components/action-card/ActionCard.cjs +2 -0
- package/dist/components/action-card/ActionCard.cjs.map +1 -0
- package/dist/components/action-card/ActionCard.js +28 -0
- package/dist/components/action-card/ActionCard.js.map +1 -0
- package/dist/components/alert/Alert.cjs +2 -0
- package/dist/components/alert/Alert.cjs.map +1 -0
- package/dist/components/alert/Alert.js +85 -0
- package/dist/components/alert/Alert.js.map +1 -0
- package/dist/components/app/navigation/AppNavigation.cjs +2 -0
- package/dist/components/app/navigation/AppNavigation.cjs.map +1 -0
- package/dist/components/app/navigation/AppNavigation.js +48 -0
- package/dist/components/app/navigation/AppNavigation.js.map +1 -0
- package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.cjs +2 -0
- package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.cjs.map +1 -0
- package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.js +120 -0
- package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.js.map +1 -0
- package/dist/components/app/price-tag/PriceTag.cjs +2 -0
- package/dist/components/app/price-tag/PriceTag.cjs.map +1 -0
- package/dist/components/app/price-tag/PriceTag.js +21 -0
- package/dist/components/app/price-tag/PriceTag.js.map +1 -0
- package/dist/components/app/product-card-catalog/styled.cjs +2 -0
- package/dist/components/app/product-card-catalog/styled.cjs.map +1 -0
- package/dist/components/app/product-card-catalog/styled.js +22 -0
- package/dist/components/app/product-card-catalog/styled.js.map +1 -0
- package/dist/components/avatar/styled.cjs +2 -0
- package/dist/components/avatar/styled.cjs.map +1 -0
- package/dist/components/avatar/styled.js +28 -0
- package/dist/components/avatar/styled.js.map +1 -0
- package/dist/components/box/Box.cjs +2 -0
- package/dist/components/box/Box.cjs.map +1 -0
- package/dist/components/box/Box.js +12 -0
- package/dist/components/box/Box.js.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.cjs +2 -0
- package/dist/components/breadcrumb/Breadcrumb.cjs.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.js +36 -0
- package/dist/components/breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/components/button/Button.cjs +2 -0
- package/dist/components/button/Button.cjs.map +1 -0
- package/dist/components/button/Button.js +9 -0
- package/dist/components/button/Button.js.map +1 -0
- package/dist/components/button-filter/ButtonFilter.cjs +2 -0
- package/dist/components/button-filter/ButtonFilter.cjs.map +1 -0
- package/dist/components/button-filter/ButtonFilter.js +9 -0
- package/dist/components/button-filter/ButtonFilter.js.map +1 -0
- package/dist/components/chat/Chat.cjs +2 -0
- package/dist/components/chat/Chat.cjs.map +1 -0
- package/dist/components/chat/Chat.js +27 -0
- package/dist/components/chat/Chat.js.map +1 -0
- package/dist/components/chat/ChatDocumentMessage.cjs +2 -0
- package/dist/components/chat/ChatDocumentMessage.cjs.map +1 -0
- package/dist/components/chat/ChatDocumentMessage.js +33 -0
- package/dist/components/chat/ChatDocumentMessage.js.map +1 -0
- package/dist/components/chat/ChatMessage.cjs +2 -0
- package/dist/components/chat/ChatMessage.cjs.map +1 -0
- package/dist/components/chat/ChatMessage.js +9 -0
- package/dist/components/chat/ChatMessage.js.map +1 -0
- package/dist/components/chat/ChatProfileAvatar.cjs +2 -0
- package/dist/components/chat/ChatProfileAvatar.cjs.map +1 -0
- package/dist/components/chat/ChatProfileAvatar.js +17 -0
- package/dist/components/chat/ChatProfileAvatar.js.map +1 -0
- package/dist/components/chat/ChatTextInput.cjs +2 -0
- package/dist/components/chat/ChatTextInput.cjs.map +1 -0
- package/dist/components/chat/ChatTextInput.js +54 -0
- package/dist/components/chat/ChatTextInput.js.map +1 -0
- package/dist/components/checkbox/Checkbox.cjs +2 -0
- package/dist/components/checkbox/Checkbox.cjs.map +1 -0
- package/dist/components/checkbox/Checkbox.js +35 -0
- package/dist/components/checkbox/Checkbox.js.map +1 -0
- package/dist/components/checkbox-card/CheckboxCard.cjs +2 -0
- package/dist/components/checkbox-card/CheckboxCard.cjs.map +1 -0
- package/dist/components/checkbox-card/CheckboxCard.js +40 -0
- package/dist/components/checkbox-card/CheckboxCard.js.map +1 -0
- package/dist/components/checkbox-card/namespace.cjs +2 -0
- package/dist/components/checkbox-card/namespace.cjs.map +1 -0
- package/dist/components/checkbox-card/namespace.js +10 -0
- package/dist/components/checkbox-card/namespace.js.map +1 -0
- package/dist/components/chip/Chip.cjs +2 -0
- package/dist/components/chip/Chip.cjs.map +1 -0
- package/dist/components/chip/Chip.js +25 -0
- package/dist/components/chip/Chip.js.map +1 -0
- package/dist/components/collapsible/styled.cjs +2 -0
- package/dist/components/collapsible/styled.cjs.map +1 -0
- package/dist/components/collapsible/styled.js +12 -0
- package/dist/components/collapsible/styled.js.map +1 -0
- package/dist/components/combobox/Combobox.cjs +2 -0
- package/dist/components/combobox/Combobox.cjs.map +1 -0
- package/dist/components/combobox/Combobox.js +176 -0
- package/dist/components/combobox/Combobox.js.map +1 -0
- package/dist/components/date-picker/DatePicker.cjs +2 -0
- package/dist/components/date-picker/DatePicker.cjs.map +1 -0
- package/dist/components/date-picker/DatePicker.js +129 -0
- package/dist/components/date-picker/DatePicker.js.map +1 -0
- package/dist/components/dialog/styled.cjs +2 -0
- package/dist/components/dialog/styled.cjs.map +1 -0
- package/dist/components/dialog/styled.js +67 -0
- package/dist/components/dialog/styled.js.map +1 -0
- package/dist/components/drawer/Drawer.cjs +2 -0
- package/dist/components/drawer/Drawer.cjs.map +1 -0
- package/dist/components/drawer/Drawer.js +64 -0
- package/dist/components/drawer/Drawer.js.map +1 -0
- package/dist/components/flag/styled.cjs +2 -0
- package/dist/components/flag/styled.cjs.map +1 -0
- package/dist/components/flag/styled.js +3753 -0
- package/dist/components/flag/styled.js.map +1 -0
- package/dist/components/form/FormControl.cjs +2 -0
- package/dist/components/form/FormControl.cjs.map +1 -0
- package/dist/components/form/FormControl.js +19 -0
- package/dist/components/form/FormControl.js.map +1 -0
- package/dist/components/form/FormHelperText.cjs +2 -0
- package/dist/components/form/FormHelperText.cjs.map +1 -0
- package/dist/components/form/FormHelperText.js +10 -0
- package/dist/components/form/FormHelperText.js.map +1 -0
- package/dist/components/form/FormLabel.cjs +2 -0
- package/dist/components/form/FormLabel.cjs.map +1 -0
- package/dist/components/form/FormLabel.js +35 -0
- package/dist/components/form/FormLabel.js.map +1 -0
- package/dist/components/heading/Heading.cjs +2 -0
- package/dist/components/heading/Heading.cjs.map +1 -0
- package/dist/components/heading/Heading.js +13 -0
- package/dist/components/heading/Heading.js.map +1 -0
- package/dist/components/icon/Icon.cjs +2 -0
- package/dist/components/icon/Icon.cjs.map +1 -0
- package/dist/components/icon/Icon.js +12 -0
- package/dist/components/icon/Icon.js.map +1 -0
- package/dist/components/icon-button/IconButton.cjs +2 -0
- package/dist/components/icon-button/IconButton.cjs.map +1 -0
- package/dist/components/icon-button/IconButton.js +8 -0
- package/dist/components/icon-button/IconButton.js.map +1 -0
- package/dist/components/illustration/Illustration.cjs +2 -0
- package/dist/components/illustration/Illustration.cjs.map +1 -0
- package/dist/components/illustration/Illustration.js +41 -0
- package/dist/components/illustration/Illustration.js.map +1 -0
- package/dist/components/illustration/patterns.cjs +2 -0
- package/dist/components/illustration/patterns.cjs.map +1 -0
- package/dist/{ui.js → components/illustration/patterns.js} +38 -15804
- package/dist/components/illustration/patterns.js.map +1 -0
- package/dist/components/input/HighlightedInput.cjs +2 -0
- package/dist/components/input/HighlightedInput.cjs.map +1 -0
- package/dist/components/input/HighlightedInput.js +60 -0
- package/dist/components/input/HighlightedInput.js.map +1 -0
- package/dist/components/input/Input.cjs +2 -0
- package/dist/components/input/Input.cjs.map +1 -0
- package/dist/components/input/Input.js +15 -0
- package/dist/components/input/Input.js.map +1 -0
- package/dist/components/input/InputAddon.cjs +2 -0
- package/dist/components/input/InputAddon.cjs.map +1 -0
- package/dist/components/input/InputAddon.js +11 -0
- package/dist/components/input/InputAddon.js.map +1 -0
- package/dist/components/input/InputGroup.cjs +2 -0
- package/dist/components/input/InputGroup.cjs.map +1 -0
- package/dist/components/input/InputGroup.js +10 -0
- package/dist/components/input/InputGroup.js.map +1 -0
- package/dist/components/input/PhoneNumberInput.cjs +2 -0
- package/dist/components/input/PhoneNumberInput.cjs.map +1 -0
- package/dist/components/input/PhoneNumberInput.js +26 -0
- package/dist/components/input/PhoneNumberInput.js.map +1 -0
- package/dist/components/menu/Menu.cjs +2 -0
- package/dist/components/menu/Menu.cjs.map +1 -0
- package/dist/components/menu/Menu.js +29 -0
- package/dist/components/menu/Menu.js.map +1 -0
- package/dist/components/pagination/Pagination.cjs +2 -0
- package/dist/components/pagination/Pagination.cjs.map +1 -0
- package/dist/components/pagination/Pagination.js +86 -0
- package/dist/components/pagination/Pagination.js.map +1 -0
- package/dist/components/pagination/use-pagination.cjs +2 -0
- package/dist/components/pagination/use-pagination.cjs.map +1 -0
- package/dist/components/pagination/use-pagination.js +57 -0
- package/dist/components/pagination/use-pagination.js.map +1 -0
- package/dist/components/popover/Popover.cjs +2 -0
- package/dist/components/popover/Popover.cjs.map +1 -0
- package/dist/components/popover/Popover.js +27 -0
- package/dist/components/popover/Popover.js.map +1 -0
- package/dist/components/radio-button-group/RadioButtonGroup.cjs +2 -0
- package/dist/components/radio-button-group/RadioButtonGroup.cjs.map +1 -0
- package/dist/components/radio-button-group/RadioButtonGroup.js +22 -0
- package/dist/components/radio-button-group/RadioButtonGroup.js.map +1 -0
- package/dist/components/radio-card-group/RadioCardGroup.cjs +2 -0
- package/dist/components/radio-card-group/RadioCardGroup.cjs.map +1 -0
- package/dist/components/radio-card-group/RadioCardGroup.js +23 -0
- package/dist/components/radio-card-group/RadioCardGroup.js.map +1 -0
- package/dist/components/radio-card-group/namespace.cjs +2 -0
- package/dist/components/radio-card-group/namespace.cjs.map +1 -0
- package/dist/components/radio-card-group/namespace.js +11 -0
- package/dist/components/radio-card-group/namespace.js.map +1 -0
- package/dist/components/radio-group/RadioGroup.cjs +2 -0
- package/dist/components/radio-group/RadioGroup.cjs.map +1 -0
- package/dist/components/radio-group/RadioGroup.js +22 -0
- package/dist/components/radio-group/RadioGroup.js.map +1 -0
- package/dist/components/select/Select.cjs +2 -0
- package/dist/components/select/Select.cjs.map +1 -0
- package/dist/components/select/Select.js +146 -0
- package/dist/components/select/Select.js.map +1 -0
- package/dist/components/select-language/SelectLanguage.cjs +2 -0
- package/dist/components/select-language/SelectLanguage.cjs.map +1 -0
- package/dist/components/select-language/SelectLanguage.js +89 -0
- package/dist/components/select-language/SelectLanguage.js.map +1 -0
- package/dist/components/status-tag-select/StatusTagSelect.cjs +2 -0
- package/dist/components/status-tag-select/StatusTagSelect.cjs.map +1 -0
- package/dist/components/status-tag-select/StatusTagSelect.js +117 -0
- package/dist/components/status-tag-select/StatusTagSelect.js.map +1 -0
- package/dist/components/switch/Switch.cjs +2 -0
- package/dist/components/switch/Switch.cjs.map +1 -0
- package/dist/components/switch/Switch.js +20 -0
- package/dist/components/switch/Switch.js.map +1 -0
- package/dist/components/switch-card/SwitchCard.cjs +2 -0
- package/dist/components/switch-card/SwitchCard.cjs.map +1 -0
- package/dist/components/switch-card/SwitchCard.js +27 -0
- package/dist/components/switch-card/SwitchCard.js.map +1 -0
- package/dist/components/switch-card/namespace.cjs +2 -0
- package/dist/components/switch-card/namespace.cjs.map +1 -0
- package/dist/components/switch-card/namespace.js +10 -0
- package/dist/components/switch-card/namespace.js.map +1 -0
- package/dist/components/table/Table.cjs +2 -0
- package/dist/components/table/Table.cjs.map +1 -0
- package/dist/components/table/Table.js +113 -0
- package/dist/components/table/Table.js.map +1 -0
- package/dist/components/table/TableProvider.cjs +2 -0
- package/dist/components/table/TableProvider.cjs.map +1 -0
- package/dist/components/table/TableProvider.js +41 -0
- package/dist/components/table/TableProvider.js.map +1 -0
- package/dist/components/tabs/Tabs.cjs +2 -0
- package/dist/components/tabs/Tabs.cjs.map +1 -0
- package/dist/components/tabs/Tabs.js +27 -0
- package/dist/components/tabs/Tabs.js.map +1 -0
- package/dist/components/tag/Tag.cjs +2 -0
- package/dist/components/tag/Tag.cjs.map +1 -0
- package/dist/components/tag/Tag.js +18 -0
- package/dist/components/tag/Tag.js.map +1 -0
- package/dist/components/text/Text.cjs +2 -0
- package/dist/components/text/Text.cjs.map +1 -0
- package/dist/components/text/Text.js +13 -0
- package/dist/components/text/Text.js.map +1 -0
- package/dist/components/textarea/Textarea.cjs +2 -0
- package/dist/components/textarea/Textarea.cjs.map +1 -0
- package/dist/components/textarea/Textarea.js +9 -0
- package/dist/components/textarea/Textarea.js.map +1 -0
- package/dist/components/tooltip/Tooltip.cjs +2 -0
- package/dist/components/tooltip/Tooltip.cjs.map +1 -0
- package/dist/components/tooltip/Tooltip.js +44 -0
- package/dist/components/tooltip/Tooltip.js.map +1 -0
- package/dist/{icons.cjs → icons/index.cjs} +1 -1
- package/dist/icons/index.cjs.map +1 -0
- package/dist/{icons.js → icons/index.js} +1 -1
- package/dist/icons/index.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +178 -0
- package/dist/index.js.map +1 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs +2 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs.map +1 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js +30 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js.map +1 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs +2 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs.map +1 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js +30 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js.map +1 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs +2 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs.map +1 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js +30 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js.map +1 -0
- package/dist/node_modules/@pandacss/shared/dist/index.cjs +2 -0
- package/dist/node_modules/@pandacss/shared/dist/index.cjs.map +1 -0
- package/dist/node_modules/@pandacss/shared/dist/index.js +469 -0
- package/dist/node_modules/@pandacss/shared/dist/index.js.map +1 -0
- package/dist/node_modules/@zag-js/utils/dist/index.cjs +2 -0
- package/dist/node_modules/@zag-js/utils/dist/index.cjs.map +1 -0
- package/dist/node_modules/@zag-js/utils/dist/index.js +8 -0
- package/dist/node_modules/@zag-js/utils/dist/index.js.map +1 -0
- package/dist/node_modules/deepmerge/dist/cjs.cjs +2 -0
- package/dist/node_modules/deepmerge/dist/cjs.cjs.map +1 -0
- package/dist/node_modules/deepmerge/dist/cjs.js +81 -0
- package/dist/node_modules/deepmerge/dist/cjs.js.map +1 -0
- package/dist/node_modules/lodash/lodash.cjs +28 -0
- package/dist/node_modules/lodash/lodash.cjs.map +1 -0
- package/dist/node_modules/lodash/lodash.js +3679 -0
- package/dist/node_modules/lodash/lodash.js.map +1 -0
- package/dist/preset.cjs +2 -0
- package/dist/preset.cjs.map +1 -0
- package/dist/preset.js +35 -0
- package/dist/preset.js.map +1 -0
- package/dist/shared/ConditionalWrapper.cjs +2 -0
- package/dist/shared/ConditionalWrapper.cjs.map +1 -0
- package/dist/shared/ConditionalWrapper.js +6 -0
- package/dist/shared/ConditionalWrapper.js.map +1 -0
- package/dist/shared/assets/icons.cjs +2 -0
- package/dist/shared/assets/icons.cjs.map +1 -0
- package/dist/shared/assets/icons.js +24 -0
- package/dist/shared/assets/icons.js.map +1 -0
- package/dist/shared/hooks/useUncontrolled.cjs +2 -0
- package/dist/shared/hooks/useUncontrolled.cjs.map +1 -0
- package/dist/shared/hooks/useUncontrolled.js +18 -0
- package/dist/shared/hooks/useUncontrolled.js.map +1 -0
- package/dist/shared/utils/events.cjs +2 -0
- package/dist/shared/utils/events.cjs.map +1 -0
- package/dist/shared/utils/events.js +8 -0
- package/dist/shared/utils/events.js.map +1 -0
- package/dist/theme/breakpoints.cjs +2 -0
- package/dist/theme/breakpoints.cjs.map +1 -0
- package/dist/theme/breakpoints.js +11 -0
- package/dist/theme/breakpoints.js.map +1 -0
- package/dist/theme/conditions.cjs +2 -0
- package/dist/theme/conditions.cjs.map +1 -0
- package/dist/theme/conditions.js +25 -0
- package/dist/theme/conditions.js.map +1 -0
- package/dist/theme/containers.cjs +2 -0
- package/dist/theme/containers.cjs.map +1 -0
- package/dist/theme/containers.js +19 -0
- package/dist/theme/containers.js.map +1 -0
- package/dist/theme/globalCss.cjs +4 -0
- package/dist/theme/globalCss.cjs.map +1 -0
- package/dist/theme/globalCss.js +101 -0
- package/dist/theme/globalCss.js.map +1 -0
- package/dist/theme/keyframes.cjs +2 -0
- package/dist/theme/keyframes.cjs.map +1 -0
- package/dist/theme/keyframes.js +173 -0
- package/dist/theme/keyframes.js.map +1 -0
- package/dist/theme/recipes/accordion.cjs +2 -0
- package/dist/theme/recipes/accordion.cjs.map +1 -0
- package/dist/theme/recipes/accordion.js +112 -0
- package/dist/theme/recipes/accordion.js.map +1 -0
- package/dist/theme/recipes/action-card.cjs +2 -0
- package/dist/theme/recipes/action-card.cjs.map +1 -0
- package/dist/theme/recipes/action-card.js +87 -0
- package/dist/theme/recipes/action-card.js.map +1 -0
- package/dist/theme/recipes/alert.cjs +2 -0
- package/dist/theme/recipes/alert.cjs.map +1 -0
- package/dist/theme/recipes/alert.js +68 -0
- package/dist/theme/recipes/alert.js.map +1 -0
- package/dist/theme/recipes/app/navigation-language-select.cjs +2 -0
- package/dist/theme/recipes/app/navigation-language-select.cjs.map +1 -0
- package/dist/theme/recipes/app/navigation-language-select.js +151 -0
- package/dist/theme/recipes/app/navigation-language-select.js.map +1 -0
- package/dist/theme/recipes/app/navigation.cjs +2 -0
- package/dist/theme/recipes/app/navigation.cjs.map +1 -0
- package/dist/theme/recipes/app/navigation.js +271 -0
- package/dist/theme/recipes/app/navigation.js.map +1 -0
- package/dist/theme/recipes/app/price-tag.cjs +2 -0
- package/dist/theme/recipes/app/price-tag.cjs.map +1 -0
- package/dist/theme/recipes/app/price-tag.js +73 -0
- package/dist/theme/recipes/app/price-tag.js.map +1 -0
- package/dist/theme/recipes/app/product-card-catalog.cjs +2 -0
- package/dist/theme/recipes/app/product-card-catalog.cjs.map +1 -0
- package/dist/theme/recipes/app/product-card-catalog.js +196 -0
- package/dist/theme/recipes/app/product-card-catalog.js.map +1 -0
- package/dist/theme/recipes/avatar-group.cjs +2 -0
- package/dist/theme/recipes/avatar-group.cjs.map +1 -0
- package/dist/theme/recipes/avatar-group.js +40 -0
- package/dist/theme/recipes/avatar-group.js.map +1 -0
- package/dist/theme/recipes/avatar.cjs +2 -0
- package/dist/theme/recipes/avatar.cjs.map +1 -0
- package/dist/theme/recipes/avatar.js +99 -0
- package/dist/theme/recipes/avatar.js.map +1 -0
- package/dist/theme/recipes/breadcrumb.cjs +2 -0
- package/dist/theme/recipes/breadcrumb.cjs.map +1 -0
- package/dist/theme/recipes/breadcrumb.js +34 -0
- package/dist/theme/recipes/breadcrumb.js.map +1 -0
- package/dist/theme/recipes/button-filter.cjs +2 -0
- package/dist/theme/recipes/button-filter.cjs.map +1 -0
- package/dist/theme/recipes/button-filter.js +63 -0
- package/dist/theme/recipes/button-filter.js.map +1 -0
- package/dist/theme/recipes/button.cjs +2 -0
- package/dist/theme/recipes/button.cjs.map +1 -0
- package/dist/theme/recipes/button.js +298 -0
- package/dist/theme/recipes/button.js.map +1 -0
- package/dist/theme/recipes/chat/chat-document-message.cjs +2 -0
- package/dist/theme/recipes/chat/chat-document-message.cjs.map +1 -0
- package/dist/theme/recipes/chat/chat-document-message.js +46 -0
- package/dist/theme/recipes/chat/chat-document-message.js.map +1 -0
- package/dist/theme/recipes/chat/chat-input-text.cjs +2 -0
- package/dist/theme/recipes/chat/chat-input-text.cjs.map +1 -0
- package/dist/theme/recipes/chat/chat-input-text.js +30 -0
- package/dist/theme/recipes/chat/chat-input-text.js.map +1 -0
- package/dist/theme/recipes/chat/chat-message.cjs +2 -0
- package/dist/theme/recipes/chat/chat-message.cjs.map +1 -0
- package/dist/theme/recipes/chat/chat-message.js +48 -0
- package/dist/theme/recipes/chat/chat-message.js.map +1 -0
- package/dist/theme/recipes/chat/chat-profile-avatar.cjs +2 -0
- package/dist/theme/recipes/chat/chat-profile-avatar.cjs.map +1 -0
- package/dist/theme/recipes/chat/chat-profile-avatar.js +28 -0
- package/dist/theme/recipes/chat/chat-profile-avatar.js.map +1 -0
- package/dist/theme/recipes/chat/chat.cjs +2 -0
- package/dist/theme/recipes/chat/chat.cjs.map +1 -0
- package/dist/theme/recipes/chat/chat.js +59 -0
- package/dist/theme/recipes/chat/chat.js.map +1 -0
- package/dist/theme/recipes/checkbox-card.cjs +2 -0
- package/dist/theme/recipes/checkbox-card.cjs.map +1 -0
- package/dist/theme/recipes/checkbox-card.js +42 -0
- package/dist/theme/recipes/checkbox-card.js.map +1 -0
- package/dist/theme/recipes/checkbox-group.cjs +2 -0
- package/dist/theme/recipes/checkbox-group.cjs.map +1 -0
- package/dist/theme/recipes/checkbox-group.js +15 -0
- package/dist/theme/recipes/checkbox-group.js.map +1 -0
- package/dist/theme/recipes/checkbox.cjs +2 -0
- package/dist/theme/recipes/checkbox.cjs.map +1 -0
- package/dist/theme/recipes/checkbox.js +131 -0
- package/dist/theme/recipes/checkbox.js.map +1 -0
- package/dist/theme/recipes/chip.cjs +2 -0
- package/dist/theme/recipes/chip.cjs.map +1 -0
- package/dist/theme/recipes/chip.js +184 -0
- package/dist/theme/recipes/chip.js.map +1 -0
- package/dist/theme/recipes/collapsible.cjs +2 -0
- package/dist/theme/recipes/collapsible.cjs.map +1 -0
- package/dist/theme/recipes/collapsible.js +30 -0
- package/dist/theme/recipes/collapsible.js.map +1 -0
- package/dist/theme/recipes/combobox.cjs +2 -0
- package/dist/theme/recipes/combobox.cjs.map +1 -0
- package/dist/theme/recipes/combobox.js +179 -0
- package/dist/theme/recipes/combobox.js.map +1 -0
- package/dist/theme/recipes/common/group-card.cjs +2 -0
- package/dist/theme/recipes/common/group-card.cjs.map +1 -0
- package/dist/theme/recipes/common/group-card.js +81 -0
- package/dist/theme/recipes/common/group-card.js.map +1 -0
- package/dist/theme/recipes/datepicker.cjs +2 -0
- package/dist/theme/recipes/datepicker.cjs.map +1 -0
- package/dist/theme/recipes/datepicker.js +178 -0
- package/dist/theme/recipes/datepicker.js.map +1 -0
- package/dist/theme/recipes/dialog.cjs +2 -0
- package/dist/theme/recipes/dialog.cjs.map +1 -0
- package/dist/theme/recipes/dialog.js +154 -0
- package/dist/theme/recipes/dialog.js.map +1 -0
- package/dist/theme/recipes/drawer.cjs +2 -0
- package/dist/theme/recipes/drawer.cjs.map +1 -0
- package/dist/theme/recipes/drawer.js +129 -0
- package/dist/theme/recipes/drawer.js.map +1 -0
- package/dist/theme/recipes/flag.cjs +2 -0
- package/dist/theme/recipes/flag.cjs.map +1 -0
- package/dist/theme/recipes/flag.js +33 -0
- package/dist/theme/recipes/flag.js.map +1 -0
- package/dist/theme/recipes/form/control.cjs +2 -0
- package/dist/theme/recipes/form/control.cjs.map +1 -0
- package/dist/theme/recipes/form/control.js +37 -0
- package/dist/theme/recipes/form/control.js.map +1 -0
- package/dist/theme/recipes/form/helper-text.cjs +2 -0
- package/dist/theme/recipes/form/helper-text.cjs.map +1 -0
- package/dist/theme/recipes/form/helper-text.js +16 -0
- package/dist/theme/recipes/form/helper-text.js.map +1 -0
- package/dist/theme/recipes/form/label.cjs +2 -0
- package/dist/theme/recipes/form/label.cjs.map +1 -0
- package/dist/theme/recipes/form/label.js +50 -0
- package/dist/theme/recipes/form/label.js.map +1 -0
- package/dist/theme/recipes/heading.cjs +2 -0
- package/dist/theme/recipes/heading.cjs.map +1 -0
- package/dist/theme/recipes/heading.js +37 -0
- package/dist/theme/recipes/heading.js.map +1 -0
- package/dist/theme/recipes/highlightedInput.cjs +2 -0
- package/dist/theme/recipes/highlightedInput.cjs.map +1 -0
- package/dist/theme/recipes/highlightedInput.js +48 -0
- package/dist/theme/recipes/highlightedInput.js.map +1 -0
- package/dist/theme/recipes/icon-button.cjs +2 -0
- package/dist/theme/recipes/icon-button.cjs.map +1 -0
- package/dist/theme/recipes/icon-button.js +91 -0
- package/dist/theme/recipes/icon-button.js.map +1 -0
- package/dist/theme/recipes/icon.cjs +2 -0
- package/dist/theme/recipes/icon.cjs.map +1 -0
- package/dist/theme/recipes/icon.js +44 -0
- package/dist/theme/recipes/icon.js.map +1 -0
- package/dist/theme/recipes/illustration.cjs +2 -0
- package/dist/theme/recipes/illustration.cjs.map +1 -0
- package/dist/theme/recipes/illustration.js +50 -0
- package/dist/theme/recipes/illustration.js.map +1 -0
- package/dist/theme/recipes/index.cjs +2 -0
- package/dist/theme/recipes/index.cjs.map +1 -0
- package/dist/theme/recipes/index.js +129 -0
- package/dist/theme/recipes/index.js.map +1 -0
- package/dist/theme/recipes/input-addon.cjs +2 -0
- package/dist/theme/recipes/input-addon.cjs.map +1 -0
- package/dist/theme/recipes/input-addon.js +27 -0
- package/dist/theme/recipes/input-addon.js.map +1 -0
- package/dist/theme/recipes/input-group.cjs +2 -0
- package/dist/theme/recipes/input-group.cjs.map +1 -0
- package/dist/theme/recipes/input-group.js +52 -0
- package/dist/theme/recipes/input-group.js.map +1 -0
- package/dist/theme/recipes/input.cjs +2 -0
- package/dist/theme/recipes/input.cjs.map +1 -0
- package/dist/theme/recipes/input.js +64 -0
- package/dist/theme/recipes/input.js.map +1 -0
- package/dist/theme/recipes/menu.cjs +2 -0
- package/dist/theme/recipes/menu.cjs.map +1 -0
- package/dist/theme/recipes/menu.js +102 -0
- package/dist/theme/recipes/menu.js.map +1 -0
- package/dist/theme/recipes/pagination.cjs +2 -0
- package/dist/theme/recipes/pagination.cjs.map +1 -0
- package/dist/theme/recipes/pagination.js +73 -0
- package/dist/theme/recipes/pagination.js.map +1 -0
- package/dist/theme/recipes/phone-number-input.cjs +2 -0
- package/dist/theme/recipes/phone-number-input.cjs.map +1 -0
- package/dist/theme/recipes/phone-number-input.js +68 -0
- package/dist/theme/recipes/phone-number-input.js.map +1 -0
- package/dist/theme/recipes/popover.cjs +2 -0
- package/dist/theme/recipes/popover.cjs.map +1 -0
- package/dist/theme/recipes/popover.js +30 -0
- package/dist/theme/recipes/popover.js.map +1 -0
- package/dist/theme/recipes/radio-button-group.cjs +2 -0
- package/dist/theme/recipes/radio-button-group.cjs.map +1 -0
- package/dist/theme/recipes/radio-button-group.js +97 -0
- package/dist/theme/recipes/radio-button-group.js.map +1 -0
- package/dist/theme/recipes/radio-card-group.cjs +2 -0
- package/dist/theme/recipes/radio-card-group.cjs.map +1 -0
- package/dist/theme/recipes/radio-card-group.js +70 -0
- package/dist/theme/recipes/radio-card-group.js.map +1 -0
- package/dist/theme/recipes/radio-group.cjs +2 -0
- package/dist/theme/recipes/radio-group.cjs.map +1 -0
- package/dist/theme/recipes/radio-group.js +121 -0
- package/dist/theme/recipes/radio-group.js.map +1 -0
- package/dist/theme/recipes/select-language.cjs +2 -0
- package/dist/theme/recipes/select-language.cjs.map +1 -0
- package/dist/theme/recipes/select-language.js +115 -0
- package/dist/theme/recipes/select-language.js.map +1 -0
- package/dist/theme/recipes/select.cjs +2 -0
- package/dist/theme/recipes/select.cjs.map +1 -0
- package/dist/theme/recipes/select.js +209 -0
- package/dist/theme/recipes/select.js.map +1 -0
- package/dist/theme/recipes/status-tag-select.cjs +2 -0
- package/dist/theme/recipes/status-tag-select.cjs.map +1 -0
- package/dist/theme/recipes/status-tag-select.js +177 -0
- package/dist/theme/recipes/status-tag-select.js.map +1 -0
- package/dist/theme/recipes/switch-card.cjs +2 -0
- package/dist/theme/recipes/switch-card.cjs.map +1 -0
- package/dist/theme/recipes/switch-card.js +44 -0
- package/dist/theme/recipes/switch-card.js.map +1 -0
- package/dist/theme/recipes/switch.cjs +2 -0
- package/dist/theme/recipes/switch.cjs.map +1 -0
- package/dist/theme/recipes/switch.js +90 -0
- package/dist/theme/recipes/switch.js.map +1 -0
- package/dist/theme/recipes/table-container.cjs +2 -0
- package/dist/theme/recipes/table-container.cjs.map +1 -0
- package/dist/theme/recipes/table-container.js +21 -0
- package/dist/theme/recipes/table-container.js.map +1 -0
- package/dist/theme/recipes/table-empty-row.cjs +2 -0
- package/dist/theme/recipes/table-empty-row.cjs.map +1 -0
- package/dist/theme/recipes/table-empty-row.js +19 -0
- package/dist/theme/recipes/table-empty-row.js.map +1 -0
- package/dist/theme/recipes/table-group-title.cjs +2 -0
- package/dist/theme/recipes/table-group-title.cjs.map +1 -0
- package/dist/theme/recipes/table-group-title.js +36 -0
- package/dist/theme/recipes/table-group-title.js.map +1 -0
- package/dist/theme/recipes/table.cjs +2 -0
- package/dist/theme/recipes/table.cjs.map +1 -0
- package/dist/theme/recipes/table.js +111 -0
- package/dist/theme/recipes/table.js.map +1 -0
- package/dist/theme/recipes/tabs-chip.cjs +2 -0
- package/dist/theme/recipes/tabs-chip.cjs.map +1 -0
- package/dist/theme/recipes/tabs-chip.js +49 -0
- package/dist/theme/recipes/tabs-chip.js.map +1 -0
- package/dist/theme/recipes/tabs.cjs +2 -0
- package/dist/theme/recipes/tabs.cjs.map +1 -0
- package/dist/theme/recipes/tabs.js +128 -0
- package/dist/theme/recipes/tabs.js.map +1 -0
- package/dist/theme/recipes/tag.cjs +2 -0
- package/dist/theme/recipes/tag.cjs.map +1 -0
- package/dist/theme/recipes/tag.js +124 -0
- package/dist/theme/recipes/tag.js.map +1 -0
- package/dist/theme/recipes/text.cjs +2 -0
- package/dist/theme/recipes/text.cjs.map +1 -0
- package/dist/theme/recipes/text.js +40 -0
- package/dist/theme/recipes/text.js.map +1 -0
- package/dist/theme/recipes/textarea.cjs +2 -0
- package/dist/theme/recipes/textarea.cjs.map +1 -0
- package/dist/theme/recipes/textarea.js +16 -0
- package/dist/theme/recipes/textarea.js.map +1 -0
- package/dist/theme/recipes/tooltip.cjs +2 -0
- package/dist/theme/recipes/tooltip.cjs.map +1 -0
- package/dist/theme/recipes/tooltip.js +64 -0
- package/dist/theme/recipes/tooltip.js.map +1 -0
- package/dist/theme/semantic-tokens/colors.cjs +2 -0
- package/dist/theme/semantic-tokens/colors.cjs.map +1 -0
- package/dist/theme/semantic-tokens/colors.js +143 -0
- package/dist/theme/semantic-tokens/colors.js.map +1 -0
- package/dist/theme/semantic-tokens/index.cjs +2 -0
- package/dist/theme/semantic-tokens/index.cjs.map +1 -0
- package/dist/theme/semantic-tokens/index.js +9 -0
- package/dist/theme/semantic-tokens/index.js.map +1 -0
- package/dist/theme/text-styles.cjs +2 -0
- package/dist/theme/text-styles.cjs.map +1 -0
- package/dist/theme/text-styles.js +90 -0
- package/dist/theme/text-styles.js.map +1 -0
- package/dist/theme/tokens/animations.cjs +2 -0
- package/dist/theme/tokens/animations.cjs.map +1 -0
- package/dist/theme/tokens/animations.js +48 -0
- package/dist/theme/tokens/animations.js.map +1 -0
- package/dist/theme/tokens/aspect-ratios.cjs +2 -0
- package/dist/theme/tokens/aspect-ratios.cjs.map +1 -0
- package/dist/theme/tokens/aspect-ratios.js +14 -0
- package/dist/theme/tokens/aspect-ratios.js.map +1 -0
- package/dist/theme/tokens/blurs.cjs +2 -0
- package/dist/theme/tokens/blurs.cjs.map +1 -0
- package/dist/theme/tokens/blurs.js +15 -0
- package/dist/theme/tokens/blurs.js.map +1 -0
- package/dist/theme/tokens/borders.cjs +2 -0
- package/dist/theme/tokens/borders.cjs.map +1 -0
- package/dist/theme/tokens/borders.js +11 -0
- package/dist/theme/tokens/borders.js.map +1 -0
- package/dist/theme/tokens/colors.cjs +2 -0
- package/dist/theme/tokens/colors.cjs.map +1 -0
- package/dist/theme/tokens/colors.js +80 -0
- package/dist/theme/tokens/colors.js.map +1 -0
- package/dist/theme/tokens/durations.cjs +2 -0
- package/dist/theme/tokens/durations.cjs.map +1 -0
- package/dist/theme/tokens/durations.js +15 -0
- package/dist/theme/tokens/durations.js.map +1 -0
- package/dist/theme/tokens/easings.cjs +51 -0
- package/dist/theme/tokens/easings.cjs.map +1 -0
- package/dist/theme/tokens/easings.js +95 -0
- package/dist/theme/tokens/easings.js.map +1 -0
- package/dist/theme/tokens/index.cjs +2 -0
- package/dist/theme/tokens/index.cjs.map +1 -0
- package/dist/theme/tokens/index.js +37 -0
- package/dist/theme/tokens/index.js.map +1 -0
- package/dist/theme/tokens/radii.cjs +2 -0
- package/dist/theme/tokens/radii.cjs.map +1 -0
- package/dist/theme/tokens/radii.js +29 -0
- package/dist/theme/tokens/radii.js.map +1 -0
- package/dist/theme/tokens/shadows.cjs +2 -0
- package/dist/theme/tokens/shadows.cjs.map +1 -0
- package/dist/theme/tokens/shadows.js +15 -0
- package/dist/theme/tokens/shadows.js.map +1 -0
- package/dist/theme/tokens/sizes.cjs +2 -0
- package/dist/theme/tokens/sizes.cjs.map +1 -0
- package/dist/theme/tokens/sizes.js +87 -0
- package/dist/theme/tokens/sizes.js.map +1 -0
- package/dist/theme/tokens/spacing.cjs +2 -0
- package/dist/theme/tokens/spacing.cjs.map +1 -0
- package/dist/theme/tokens/spacing.js +86 -0
- package/dist/theme/tokens/spacing.js.map +1 -0
- package/dist/theme/tokens/typography.cjs +2 -0
- package/dist/theme/tokens/typography.cjs.map +1 -0
- package/dist/theme/tokens/typography.js +87 -0
- package/dist/theme/tokens/typography.js.map +1 -0
- package/dist/theme/tokens/z-index.cjs +2 -0
- package/dist/theme/tokens/z-index.cjs.map +1 -0
- package/dist/theme/tokens/z-index.js +44 -0
- package/dist/theme/tokens/z-index.js.map +1 -0
- package/dist/theme/utilities.cjs +2 -0
- package/dist/theme/utilities.cjs.map +1 -0
- package/dist/theme/utilities.js +17 -0
- package/dist/theme/utilities.js.map +1 -0
- package/dist/utils/slots.cjs +2 -0
- package/dist/utils/slots.cjs.map +1 -0
- package/dist/utils/slots.js +42 -0
- package/dist/utils/slots.js.map +1 -0
- package/package.json +18 -7
- package/dist/icons.cjs.map +0 -1
- package/dist/icons.js.map +0 -1
- package/dist/ui.cjs +0 -79
- package/dist/ui.cjs.map +0 -1
- package/dist/ui.js.map +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { styled as n } from "@stokelp/styled-system/jsx";
|
|
4
|
+
import { statusTagSelect as O } from "@stokelp/styled-system/recipes";
|
|
5
|
+
import { useState as Q } from "react";
|
|
6
|
+
import { createListCollection as X, Portal as Y, Select as r } from "@ark-ui/react";
|
|
7
|
+
import { ConditionalWrapper as _ } from "../../shared/ConditionalWrapper.js";
|
|
8
|
+
import { createStyleContext as $ } from "../../utils/slots.js";
|
|
9
|
+
const { withProvider: U, withContext: i } = $(O), tt = U(n(r.Root), "root", {
|
|
10
|
+
defaultProps: {
|
|
11
|
+
loopFocus: !0
|
|
12
|
+
}
|
|
13
|
+
}), et = i(n(r.Content), "content"), rt = i(n(r.Indicator), "indicator"), ot = i(n(r.Item), "item"), nt = i(n(r.ItemText), "itemText"), it = i(n(r.Positioner), "positioner"), lt = i(n(r.Trigger), "trigger"), ct = i(n(r.ValueText), "valueText"), gt = ({
|
|
14
|
+
items: o,
|
|
15
|
+
lazyMount: d = !0,
|
|
16
|
+
usePortal: h = !0,
|
|
17
|
+
unmountOnExit: v = !0,
|
|
18
|
+
positioning: p,
|
|
19
|
+
onValueChange: s,
|
|
20
|
+
severity: g,
|
|
21
|
+
size: f,
|
|
22
|
+
closeOnSelect: m,
|
|
23
|
+
composite: C,
|
|
24
|
+
defaultOpen: y,
|
|
25
|
+
defaultValue: u,
|
|
26
|
+
disabled: x,
|
|
27
|
+
form: S,
|
|
28
|
+
highlightedValue: w,
|
|
29
|
+
id: T,
|
|
30
|
+
ids: I,
|
|
31
|
+
immediate: L,
|
|
32
|
+
invalid: P,
|
|
33
|
+
loopFocus: R,
|
|
34
|
+
name: V,
|
|
35
|
+
onExitComplete: j,
|
|
36
|
+
onFocusOutside: b,
|
|
37
|
+
onHighlightChange: H,
|
|
38
|
+
onInteractOutside: W,
|
|
39
|
+
onOpenChange: B,
|
|
40
|
+
onPointerDownOutside: M,
|
|
41
|
+
open: Z,
|
|
42
|
+
present: k,
|
|
43
|
+
readOnly: q,
|
|
44
|
+
required: z,
|
|
45
|
+
scrollToIndexFn: A,
|
|
46
|
+
value: D,
|
|
47
|
+
...E
|
|
48
|
+
}) => {
|
|
49
|
+
const l = o.every((t) => "severity" in t && !!t.severity), c = u || (o.length > 0 ? [o[0].value.toString()] : void 0), [F, G] = Q(() => {
|
|
50
|
+
if (c) {
|
|
51
|
+
const t = o.find((N) => N.value.toString() === c[0]);
|
|
52
|
+
return t && l ? t.severity : "neutral";
|
|
53
|
+
}
|
|
54
|
+
return o.length > 0 && l ? o[0].severity : "neutral";
|
|
55
|
+
}), J = (t) => {
|
|
56
|
+
t.items.length > 0 && typeof t.items[0] == "object" && G(t.items[0].severity ?? "neutral"), s?.(t);
|
|
57
|
+
}, K = X({
|
|
58
|
+
items: o
|
|
59
|
+
});
|
|
60
|
+
return /* @__PURE__ */ a(
|
|
61
|
+
tt,
|
|
62
|
+
{
|
|
63
|
+
closeOnSelect: m,
|
|
64
|
+
composite: C,
|
|
65
|
+
defaultOpen: y,
|
|
66
|
+
lazyMount: d,
|
|
67
|
+
unmountOnExit: v,
|
|
68
|
+
collection: K,
|
|
69
|
+
defaultValue: c,
|
|
70
|
+
positioning: { sameWidth: !0, gutter: 0, ...p },
|
|
71
|
+
onValueChange: l ? J : s,
|
|
72
|
+
severity: l ? F : g,
|
|
73
|
+
size: f,
|
|
74
|
+
disabled: x,
|
|
75
|
+
form: S,
|
|
76
|
+
highlightedValue: w,
|
|
77
|
+
id: T,
|
|
78
|
+
ids: I,
|
|
79
|
+
immediate: L,
|
|
80
|
+
invalid: P,
|
|
81
|
+
loopFocus: R,
|
|
82
|
+
name: V,
|
|
83
|
+
onExitComplete: j,
|
|
84
|
+
onFocusOutside: b,
|
|
85
|
+
onHighlightChange: H,
|
|
86
|
+
onInteractOutside: W,
|
|
87
|
+
onOpenChange: B,
|
|
88
|
+
onPointerDownOutside: M,
|
|
89
|
+
open: Z,
|
|
90
|
+
present: k,
|
|
91
|
+
readOnly: q,
|
|
92
|
+
required: z,
|
|
93
|
+
scrollToIndexFn: A,
|
|
94
|
+
value: D,
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ a(lt, { ...E, children: [
|
|
97
|
+
/* @__PURE__ */ e(ct, {}),
|
|
98
|
+
/* @__PURE__ */ e(rt, { asChild: !0, children: /* @__PURE__ */ e("svg", { width: "23", height: "24", viewBox: "0 0 23 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e(
|
|
99
|
+
"path",
|
|
100
|
+
{
|
|
101
|
+
fillRule: "evenodd",
|
|
102
|
+
clipRule: "evenodd",
|
|
103
|
+
d: "M12.0082 16.2803C11.7275 16.5732 11.2725 16.5732 10.9918 16.2803L3.80427 8.78033C3.52358 8.48744 3.52358 8.01257 3.80427 7.71967C4.08496 7.42678 4.54004 7.42678 4.82073 7.71967L11.5 14.6893L18.1793 7.71967C18.46 7.42678 18.915 7.42678 19.1957 7.71967C19.4764 8.01256 19.4764 8.48744 19.1957 8.78033L12.0082 16.2803Z",
|
|
104
|
+
fill: "currentColor"
|
|
105
|
+
}
|
|
106
|
+
) }) })
|
|
107
|
+
] }),
|
|
108
|
+
/* @__PURE__ */ e(_, { when: h, wrapper: (t) => /* @__PURE__ */ e(Y, { children: t }), children: /* @__PURE__ */ e(it, { children: /* @__PURE__ */ e(et, { children: o.map((t) => /* @__PURE__ */ e(ot, { item: t, children: /* @__PURE__ */ e(nt, { truncate: !0, children: t.label }) }, t.value)) }) }) }),
|
|
109
|
+
/* @__PURE__ */ e(r.HiddenSelect, {})
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
export {
|
|
115
|
+
gt as StatusTagSelect
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=StatusTagSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusTagSelect.js","sources":["../../../src/components/status-tag-select/StatusTagSelect.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { statusTagSelect, type StatusTagSelectVariantProps } from '@stokelp/styled-system/recipes'\nimport { HTMLStyledProps } from '@stokelp/styled-system/types'\nimport { type FC, useState } from 'react'\nimport { Portal, Select as ArkSelect, type SelectRootProps, createListCollection } from '@ark-ui/react'\nimport { ConditionalWrapper } from '~/shared/ConditionalWrapper.tsx'\nimport { createStyleContext } from '~/utils/slots.tsx'\n\nconst { withProvider, withContext } = createStyleContext(statusTagSelect)\n\nconst Root = withProvider(styled(ArkSelect.Root<StatusTagSelectItem>), 'root', {\n defaultProps: {\n loopFocus: true,\n },\n})\n\nconst Content = withContext(styled(ArkSelect.Content), 'content')\nconst Indicator = withContext(styled(ArkSelect.Indicator), 'indicator')\nconst Item = withContext(styled(ArkSelect.Item), 'item')\nconst ItemText = withContext(styled(ArkSelect.ItemText), 'itemText')\nconst Positioner = withContext(styled(ArkSelect.Positioner), 'positioner')\nconst Trigger = withContext(styled(ArkSelect.Trigger), 'trigger')\nconst ValueText = withContext(styled(ArkSelect.ValueText), 'valueText')\n\ntype Severity = StatusTagSelectVariantProps['severity']\n\nexport type StatusTagSelectItem = {\n value: string | number\n label: string\n disabled?: boolean\n severity?: Severity\n}\n\nexport type StatusTagSelectProps = Omit<SelectRootProps<StatusTagSelectItem>, 'collection' | 'multiple' | 'asChild'> & {\n items: StatusTagSelectItem[]\n usePortal?: boolean\n} & HTMLStyledProps<'button'> &\n StatusTagSelectVariantProps\n\nexport const StatusTagSelect: FC<StatusTagSelectProps> = ({\n items,\n lazyMount = true,\n usePortal = true,\n unmountOnExit = true,\n positioning,\n onValueChange,\n severity: severityFromUser,\n size,\n closeOnSelect,\n composite,\n defaultOpen,\n defaultValue: defaultValueFromUser,\n disabled,\n form,\n highlightedValue,\n id,\n ids,\n immediate,\n invalid,\n loopFocus,\n name,\n onExitComplete,\n onFocusOutside,\n onHighlightChange,\n onInteractOutside,\n onOpenChange,\n onPointerDownOutside,\n open,\n present,\n readOnly,\n required,\n scrollToIndexFn,\n value,\n ...props\n}) => {\n const shouldControlSeverity = items.every(item => 'severity' in item && !!item.severity)\n const defaultValue = defaultValueFromUser\n ? defaultValueFromUser\n : items.length > 0\n ? [items[0].value.toString()]\n : undefined\n\n const [severity, setSeverity] = useState<Severity>(() => {\n if (defaultValue) {\n const match = items.find(item => item.value.toString() === defaultValue[0])\n\n return match && shouldControlSeverity ? match.severity : 'neutral'\n }\n return items.length > 0 && shouldControlSeverity ? items[0].severity : 'neutral'\n })\n\n const onValueChangeHandler: StatusTagSelectProps['onValueChange'] = details => {\n if (details.items.length > 0 && typeof details.items[0] === 'object') {\n setSeverity(((details.items[0] as StatusTagSelectItem).severity ?? 'neutral') as Severity)\n }\n onValueChange?.(details)\n }\n const collection = createListCollection({\n items,\n })\n\n return (\n <Root\n closeOnSelect={closeOnSelect}\n composite={composite}\n defaultOpen={defaultOpen}\n lazyMount={lazyMount}\n unmountOnExit={unmountOnExit}\n collection={collection}\n defaultValue={defaultValue}\n positioning={{ sameWidth: true, gutter: 0, ...positioning }}\n onValueChange={shouldControlSeverity ? onValueChangeHandler : onValueChange}\n severity={shouldControlSeverity ? severity : severityFromUser}\n size={size}\n disabled={disabled}\n form={form}\n highlightedValue={highlightedValue}\n id={id}\n ids={ids}\n immediate={immediate}\n invalid={invalid}\n loopFocus={loopFocus}\n name={name}\n onExitComplete={onExitComplete}\n onFocusOutside={onFocusOutside}\n onHighlightChange={onHighlightChange}\n onInteractOutside={onInteractOutside}\n onOpenChange={onOpenChange}\n onPointerDownOutside={onPointerDownOutside}\n open={open}\n present={present}\n readOnly={readOnly}\n required={required}\n scrollToIndexFn={scrollToIndexFn}\n value={value}\n >\n <Trigger {...props}>\n <ValueText />\n <Indicator asChild>\n <svg width=\"23\" height=\"24\" viewBox=\"0 0 23 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12.0082 16.2803C11.7275 16.5732 11.2725 16.5732 10.9918 16.2803L3.80427 8.78033C3.52358 8.48744 3.52358 8.01257 3.80427 7.71967C4.08496 7.42678 4.54004 7.42678 4.82073 7.71967L11.5 14.6893L18.1793 7.71967C18.46 7.42678 18.915 7.42678 19.1957 7.71967C19.4764 8.01256 19.4764 8.48744 19.1957 8.78033L12.0082 16.2803Z\"\n fill=\"currentColor\"\n />\n </svg>\n </Indicator>\n </Trigger>\n <ConditionalWrapper when={usePortal} wrapper={children => <Portal>{children}</Portal>}>\n <Positioner>\n <Content>\n {items.map(item => (\n <Item key={item.value} item={item}>\n <ItemText truncate>{item.label}</ItemText>\n </Item>\n ))}\n </Content>\n </Positioner>\n </ConditionalWrapper>\n <ArkSelect.HiddenSelect />\n </Root>\n )\n}\n"],"names":["withProvider","withContext","createStyleContext","statusTagSelect","Root","styled","ArkSelect","Content","Indicator","Item","ItemText","Positioner","Trigger","ValueText","StatusTagSelect","items","lazyMount","usePortal","unmountOnExit","positioning","onValueChange","severityFromUser","size","closeOnSelect","composite","defaultOpen","defaultValueFromUser","disabled","form","highlightedValue","id","ids","immediate","invalid","loopFocus","name","onExitComplete","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","open","present","readOnly","required","scrollToIndexFn","value","props","shouldControlSeverity","item","defaultValue","severity","setSeverity","useState","match","onValueChangeHandler","details","collection","createListCollection","jsxs","jsx","ConditionalWrapper","children","Portal"],"mappings":"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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),e=require("@ark-ui/react"),r=require("@stokelp/styled-system/css"),S=require("@stokelp/styled-system/jsx"),i=require("@stokelp/styled-system/recipes"),d=require("react"),o=d.forwardRef((n,l)=>{const[a,h]=i.switchRecipe.splitVariantProps(n),[u,p]=S.splitCssProps(h),{children:c,className:w,...m}=p,t=i.switchRecipe(a);return s.jsxs(e.Switch.Root,{ref:l,className:r.cx(t.root,r.css(u),w),...m,children:[s.jsx(e.Switch.Control,{className:t.control,children:s.jsx(e.Switch.Thumb,{className:t.thumb})}),c?s.jsx(e.Switch.Label,{className:t.label,children:c}):null,s.jsx(e.Switch.HiddenInput,{})]})});o.displayName="Switch";exports.Switch=o;
|
|
2
|
+
//# sourceMappingURL=Switch.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.cjs","sources":["../../../src/components/switch/Switch.tsx"],"sourcesContent":["import { Switch as ArkSwitch, type SwitchRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps } from '@stokelp/styled-system/jsx'\nimport { switchRecipe, type SwitchRecipeVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { forwardRef, type ReactNode } from 'react'\n\nexport interface SwitchProps extends Assign<JsxStyleProps, SwitchRootProps>, SwitchRecipeVariantProps {\n children?: ReactNode\n}\n\nexport const Switch = forwardRef<HTMLLabelElement, SwitchProps>((props, ref) => {\n const [variantProps, switchProps] = switchRecipe.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(switchProps)\n const { children, className, ...rootProps } = localProps\n const styles = switchRecipe(variantProps)\n\n return (\n <ArkSwitch.Root ref={ref} className={cx(styles.root, css(cssProps), className)} {...rootProps}>\n <ArkSwitch.Control className={styles.control}>\n <ArkSwitch.Thumb className={styles.thumb} />\n </ArkSwitch.Control>\n {children ? <ArkSwitch.Label className={styles.label}>{children}</ArkSwitch.Label> : null}\n <ArkSwitch.HiddenInput />\n </ArkSwitch.Root>\n )\n})\n\nSwitch.displayName = 'Switch'\n"],"names":["Switch","forwardRef","props","ref","variantProps","switchProps","switchRecipe","cssProps","localProps","splitCssProps","children","className","rootProps","styles","jsxs","ArkSwitch","cx","css","jsx"],"mappings":"4SAWaA,EAASC,EAAAA,WAA0C,CAACC,EAAOC,IAAQ,CAC9E,KAAM,CAACC,EAAcC,CAAW,EAAIC,EAAAA,aAAa,kBAAkBJ,CAAK,EAClE,CAACK,EAAUC,CAAU,EAAIC,EAAAA,cAAcJ,CAAW,EAClD,CAAE,SAAAK,EAAU,UAAAC,EAAW,GAAGC,GAAcJ,EACxCK,EAASP,EAAAA,aAAaF,CAAY,EAExC,OACEU,EAAAA,KAACC,EAAAA,OAAU,KAAV,CAAe,IAAAZ,EAAU,UAAWa,KAAGH,EAAO,KAAMI,EAAAA,IAAIV,CAAQ,EAAGI,CAAS,EAAI,GAAGC,EAClF,SAAA,CAAAM,EAAAA,IAACH,EAAAA,OAAU,QAAV,CAAkB,UAAWF,EAAO,QACnC,SAAAK,EAAAA,IAACH,EAAAA,OAAU,MAAV,CAAgB,UAAWF,EAAO,MAAO,EAC5C,EACCH,QAAYK,EAAAA,OAAU,MAAV,CAAgB,UAAWF,EAAO,MAAQ,SAAAH,CAAA,CAAS,EAAqB,KACrFQ,MAACH,EAAAA,OAAU,YAAV,CAAA,CAAsB,CAAA,EACzB,CAEJ,CAAC,EAEDf,EAAO,YAAc"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { Switch as s } from "@ark-ui/react";
|
|
4
|
+
import { cx as d, css as w } from "@stokelp/styled-system/css";
|
|
5
|
+
import { splitCssProps as P } from "@stokelp/styled-system/jsx";
|
|
6
|
+
import { switchRecipe as c } from "@stokelp/styled-system/recipes";
|
|
7
|
+
import { forwardRef as u } from "react";
|
|
8
|
+
const N = u((i, l) => {
|
|
9
|
+
const [a, e] = c.splitVariantProps(i), [m, p] = P(e), { children: t, className: n, ...h } = p, o = c(a);
|
|
10
|
+
return /* @__PURE__ */ f(s.Root, { ref: l, className: d(o.root, w(m), n), ...h, children: [
|
|
11
|
+
/* @__PURE__ */ r(s.Control, { className: o.control, children: /* @__PURE__ */ r(s.Thumb, { className: o.thumb }) }),
|
|
12
|
+
t ? /* @__PURE__ */ r(s.Label, { className: o.label, children: t }) : null,
|
|
13
|
+
/* @__PURE__ */ r(s.HiddenInput, {})
|
|
14
|
+
] });
|
|
15
|
+
});
|
|
16
|
+
N.displayName = "Switch";
|
|
17
|
+
export {
|
|
18
|
+
N as Switch
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=Switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.js","sources":["../../../src/components/switch/Switch.tsx"],"sourcesContent":["import { Switch as ArkSwitch, type SwitchRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps } from '@stokelp/styled-system/jsx'\nimport { switchRecipe, type SwitchRecipeVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { forwardRef, type ReactNode } from 'react'\n\nexport interface SwitchProps extends Assign<JsxStyleProps, SwitchRootProps>, SwitchRecipeVariantProps {\n children?: ReactNode\n}\n\nexport const Switch = forwardRef<HTMLLabelElement, SwitchProps>((props, ref) => {\n const [variantProps, switchProps] = switchRecipe.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(switchProps)\n const { children, className, ...rootProps } = localProps\n const styles = switchRecipe(variantProps)\n\n return (\n <ArkSwitch.Root ref={ref} className={cx(styles.root, css(cssProps), className)} {...rootProps}>\n <ArkSwitch.Control className={styles.control}>\n <ArkSwitch.Thumb className={styles.thumb} />\n </ArkSwitch.Control>\n {children ? <ArkSwitch.Label className={styles.label}>{children}</ArkSwitch.Label> : null}\n <ArkSwitch.HiddenInput />\n </ArkSwitch.Root>\n )\n})\n\nSwitch.displayName = 'Switch'\n"],"names":["Switch","forwardRef","props","ref","variantProps","switchProps","switchRecipe","cssProps","localProps","splitCssProps","children","className","rootProps","styles","jsxs","ArkSwitch","cx","css","jsx"],"mappings":";;;;;;;AAWO,MAAMA,IAASC,EAA0C,CAACC,GAAOC,MAAQ;AAC9E,QAAM,CAACC,GAAcC,CAAW,IAAIC,EAAa,kBAAkBJ,CAAK,GAClE,CAACK,GAAUC,CAAU,IAAIC,EAAcJ,CAAW,GAClD,EAAE,UAAAK,GAAU,WAAAC,GAAW,GAAGC,MAAcJ,GACxCK,IAASP,EAAaF,CAAY;AAExC,SACE,gBAAAU,EAACC,EAAU,MAAV,EAAe,KAAAZ,GAAU,WAAWa,EAAGH,EAAO,MAAMI,EAAIV,CAAQ,GAAGI,CAAS,GAAI,GAAGC,GAClF,UAAA;AAAA,IAAA,gBAAAM,EAACH,EAAU,SAAV,EAAkB,WAAWF,EAAO,SACnC,UAAA,gBAAAK,EAACH,EAAU,OAAV,EAAgB,WAAWF,EAAO,OAAO,GAC5C;AAAA,IACCH,sBAAYK,EAAU,OAAV,EAAgB,WAAWF,EAAO,OAAQ,UAAAH,EAAA,CAAS,IAAqB;AAAA,IACrF,gBAAAQ,EAACH,EAAU,aAAV,CAAA,CAAsB;AAAA,EAAA,GACzB;AAEJ,CAAC;AAEDf,EAAO,cAAc;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@ark-ui/react"),o=require("@stokelp/styled-system/css"),s=require("@stokelp/styled-system/jsx"),i=require("@stokelp/styled-system/recipes"),m=require("react"),y=require("../../utils/slots.cjs"),{withProvider:x,withContext:r}=y.createStyleContext(i.switchCard,{dataAttr:!0}),P=x(s.styled(t.Switch.Root)),j=r(s.styled(t.Switch.Label),"title"),q=r(s.styled("div"),"content"),g=r(s.styled("p"),"description"),b=r(s.styled(t.ark.img),"image"),a=m.forwardRef((n,d)=>{const[l,h]=i.switchCard.splitVariantProps(n),[w,C]=s.splitCssProps(h),{children:S,className:p,...u}=C,c=i.switchCard(l);return e.jsxs(P,{ref:d,className:o.cx(c.root,o.css(w),p),...u,children:[S,e.jsx(t.Switch.Control,{className:c.control,children:e.jsx(t.Switch.Thumb,{className:c.thumb})}),e.jsx(t.Switch.HiddenInput,{})]})});a.displayName="SwitchCard";exports.SwitchCard=a;exports.SwitchCardContent=q;exports.SwitchCardDescription=g;exports.SwitchCardImage=b;exports.SwitchCardTitle=j;
|
|
2
|
+
//# sourceMappingURL=SwitchCard.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwitchCard.cjs","sources":["../../../src/components/switch-card/SwitchCard.tsx"],"sourcesContent":["import { ark, Switch as ArkSwitch, type SwitchRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { switchCard, type SwitchCardVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { ComponentProps, forwardRef } from 'react'\nimport { createStyleContext } from '~/utils/slots'\n\nexport interface SwitchCardProps extends Assign<JsxStyleProps, SwitchRootProps>, SwitchCardVariantProps {}\n\nconst { withProvider, withContext } = createStyleContext(switchCard, {\n dataAttr: true,\n})\n\nconst SwitchCardRoot = withProvider(styled(ArkSwitch.Root))\n\nexport const SwitchCardTitle = withContext(styled(ArkSwitch.Label), 'title')\nexport const SwitchCardContent = withContext(styled('div'), 'content')\nexport const SwitchCardDescription = withContext(styled('p'), 'description')\nexport const SwitchCardImage = withContext(styled(ark.img), 'image')\n\nexport type SwitchCardTitleProps = ComponentProps<typeof SwitchCardTitle>\nexport type SwitchCardContentProps = ComponentProps<typeof SwitchCardContent>\nexport type SwitchCardDescriptionProps = ComponentProps<typeof SwitchCardDescription>\nexport type SwitchCardImageProps = ComponentProps<typeof SwitchCardImage>\n\nexport const SwitchCard = forwardRef<HTMLLabelElement, SwitchCardProps>((props, ref) => {\n const [variantProps, switchProps] = switchCard.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(switchProps)\n const { children, className, ...rootProps } = localProps\n const styles = switchCard(variantProps)\n\n return (\n <SwitchCardRoot ref={ref} className={cx(styles.root, css(cssProps), className)} {...rootProps}>\n {children}\n <ArkSwitch.Control className={styles.control}>\n <ArkSwitch.Thumb className={styles.thumb} />\n </ArkSwitch.Control>\n <ArkSwitch.HiddenInput />\n </SwitchCardRoot>\n )\n})\n\nSwitchCard.displayName = 'SwitchCard'\n"],"names":["withProvider","withContext","createStyleContext","switchCard","SwitchCardRoot","styled","ArkSwitch","SwitchCardTitle","SwitchCardContent","SwitchCardDescription","SwitchCardImage","ark","SwitchCard","forwardRef","props","ref","variantProps","switchProps","cssProps","localProps","splitCssProps","children","className","rootProps","styles","jsxs","cx","css","jsx"],"mappings":"+UAUM,CAAE,aAAAA,EAAc,YAAAC,GAAgBC,EAAAA,mBAAmBC,EAAAA,WAAY,CACnE,SAAU,EACZ,CAAC,EAEKC,EAAiBJ,EAAaK,EAAAA,OAAOC,EAAAA,OAAU,IAAI,CAAC,EAE7CC,EAAkBN,EAAYI,EAAAA,OAAOC,EAAAA,OAAU,KAAK,EAAG,OAAO,EAC9DE,EAAoBP,EAAYI,SAAO,KAAK,EAAG,SAAS,EACxDI,EAAwBR,EAAYI,SAAO,GAAG,EAAG,aAAa,EAC9DK,EAAkBT,EAAYI,EAAAA,OAAOM,EAAAA,IAAI,GAAG,EAAG,OAAO,EAOtDC,EAAaC,EAAAA,WAA8C,CAACC,EAAOC,IAAQ,CACtF,KAAM,CAACC,EAAcC,CAAW,EAAId,EAAAA,WAAW,kBAAkBW,CAAK,EAChE,CAACI,EAAUC,CAAU,EAAIC,EAAAA,cAAcH,CAAW,EAClD,CAAE,SAAAI,EAAU,UAAAC,EAAW,GAAGC,GAAcJ,EACxCK,EAASrB,EAAAA,WAAWa,CAAY,EAEtC,OACES,EAAAA,KAACrB,EAAA,CAAe,IAAAW,EAAU,UAAWW,EAAAA,GAAGF,EAAO,KAAMG,EAAAA,IAAIT,CAAQ,EAAGI,CAAS,EAAI,GAAGC,EACjF,SAAA,CAAAF,EACDO,EAAAA,IAACtB,EAAAA,OAAU,QAAV,CAAkB,UAAWkB,EAAO,QACnC,SAAAI,EAAAA,IAACtB,EAAAA,OAAU,MAAV,CAAgB,UAAWkB,EAAO,MAAO,EAC5C,EACAI,MAACtB,EAAAA,OAAU,YAAV,CAAA,CAAsB,CAAA,EACzB,CAEJ,CAAC,EAEDM,EAAW,YAAc"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as C, jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { Switch as t, ark as f } from "@ark-ui/react";
|
|
4
|
+
import { cx as S, css as P } from "@stokelp/styled-system/css";
|
|
5
|
+
import { splitCssProps as u, styled as o } from "@stokelp/styled-system/jsx";
|
|
6
|
+
import { switchCard as c } from "@stokelp/styled-system/recipes";
|
|
7
|
+
import { forwardRef as x } from "react";
|
|
8
|
+
import { createStyleContext as N } from "../../utils/slots.js";
|
|
9
|
+
const { withProvider: y, withContext: r } = N(c, {
|
|
10
|
+
dataAttr: !0
|
|
11
|
+
}), b = y(o(t.Root)), D = r(o(t.Label), "title"), H = r(o("div"), "content"), L = r(o("p"), "description"), V = r(o(f.img), "image"), g = x((e, a) => {
|
|
12
|
+
const [n, m] = c.splitVariantProps(e), [p, l] = u(m), { children: d, className: h, ...w } = l, s = c(n);
|
|
13
|
+
return /* @__PURE__ */ C(b, { ref: a, className: S(s.root, P(p), h), ...w, children: [
|
|
14
|
+
d,
|
|
15
|
+
/* @__PURE__ */ i(t.Control, { className: s.control, children: /* @__PURE__ */ i(t.Thumb, { className: s.thumb }) }),
|
|
16
|
+
/* @__PURE__ */ i(t.HiddenInput, {})
|
|
17
|
+
] });
|
|
18
|
+
});
|
|
19
|
+
g.displayName = "SwitchCard";
|
|
20
|
+
export {
|
|
21
|
+
g as SwitchCard,
|
|
22
|
+
H as SwitchCardContent,
|
|
23
|
+
L as SwitchCardDescription,
|
|
24
|
+
V as SwitchCardImage,
|
|
25
|
+
D as SwitchCardTitle
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=SwitchCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwitchCard.js","sources":["../../../src/components/switch-card/SwitchCard.tsx"],"sourcesContent":["import { ark, Switch as ArkSwitch, type SwitchRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { switchCard, type SwitchCardVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { ComponentProps, forwardRef } from 'react'\nimport { createStyleContext } from '~/utils/slots'\n\nexport interface SwitchCardProps extends Assign<JsxStyleProps, SwitchRootProps>, SwitchCardVariantProps {}\n\nconst { withProvider, withContext } = createStyleContext(switchCard, {\n dataAttr: true,\n})\n\nconst SwitchCardRoot = withProvider(styled(ArkSwitch.Root))\n\nexport const SwitchCardTitle = withContext(styled(ArkSwitch.Label), 'title')\nexport const SwitchCardContent = withContext(styled('div'), 'content')\nexport const SwitchCardDescription = withContext(styled('p'), 'description')\nexport const SwitchCardImage = withContext(styled(ark.img), 'image')\n\nexport type SwitchCardTitleProps = ComponentProps<typeof SwitchCardTitle>\nexport type SwitchCardContentProps = ComponentProps<typeof SwitchCardContent>\nexport type SwitchCardDescriptionProps = ComponentProps<typeof SwitchCardDescription>\nexport type SwitchCardImageProps = ComponentProps<typeof SwitchCardImage>\n\nexport const SwitchCard = forwardRef<HTMLLabelElement, SwitchCardProps>((props, ref) => {\n const [variantProps, switchProps] = switchCard.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(switchProps)\n const { children, className, ...rootProps } = localProps\n const styles = switchCard(variantProps)\n\n return (\n <SwitchCardRoot ref={ref} className={cx(styles.root, css(cssProps), className)} {...rootProps}>\n {children}\n <ArkSwitch.Control className={styles.control}>\n <ArkSwitch.Thumb className={styles.thumb} />\n </ArkSwitch.Control>\n <ArkSwitch.HiddenInput />\n </SwitchCardRoot>\n )\n})\n\nSwitchCard.displayName = 'SwitchCard'\n"],"names":["withProvider","withContext","createStyleContext","switchCard","SwitchCardRoot","styled","ArkSwitch","SwitchCardTitle","SwitchCardContent","SwitchCardDescription","SwitchCardImage","ark","SwitchCard","forwardRef","props","ref","variantProps","switchProps","cssProps","localProps","splitCssProps","children","className","rootProps","styles","jsxs","cx","css","jsx"],"mappings":";;;;;;;;AAUA,MAAM,EAAE,cAAAA,GAAc,aAAAC,MAAgBC,EAAmBC,GAAY;AAAA,EACnE,UAAU;AACZ,CAAC,GAEKC,IAAiBJ,EAAaK,EAAOC,EAAU,IAAI,CAAC,GAE7CC,IAAkBN,EAAYI,EAAOC,EAAU,KAAK,GAAG,OAAO,GAC9DE,IAAoBP,EAAYI,EAAO,KAAK,GAAG,SAAS,GACxDI,IAAwBR,EAAYI,EAAO,GAAG,GAAG,aAAa,GAC9DK,IAAkBT,EAAYI,EAAOM,EAAI,GAAG,GAAG,OAAO,GAOtDC,IAAaC,EAA8C,CAACC,GAAOC,MAAQ;AACtF,QAAM,CAACC,GAAcC,CAAW,IAAId,EAAW,kBAAkBW,CAAK,GAChE,CAACI,GAAUC,CAAU,IAAIC,EAAcH,CAAW,GAClD,EAAE,UAAAI,GAAU,WAAAC,GAAW,GAAGC,MAAcJ,GACxCK,IAASrB,EAAWa,CAAY;AAEtC,SACE,gBAAAS,EAACrB,GAAA,EAAe,KAAAW,GAAU,WAAWW,EAAGF,EAAO,MAAMG,EAAIT,CAAQ,GAAGI,CAAS,GAAI,GAAGC,GACjF,UAAA;AAAA,IAAAF;AAAA,IACD,gBAAAO,EAACtB,EAAU,SAAV,EAAkB,WAAWkB,EAAO,SACnC,UAAA,gBAAAI,EAACtB,EAAU,OAAV,EAAgB,WAAWkB,EAAO,OAAO,GAC5C;AAAA,IACA,gBAAAI,EAACtB,EAAU,aAAV,CAAA,CAAsB;AAAA,EAAA,GACzB;AAEJ,CAAC;AAEDM,EAAW,cAAc;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./SwitchCard.cjs");exports.Content=t.SwitchCardContent;exports.Description=t.SwitchCardDescription;exports.Image=t.SwitchCardImage;exports.Root=t.SwitchCard;exports.Title=t.SwitchCardTitle;
|
|
2
|
+
//# sourceMappingURL=namespace.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespace.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { SwitchCardContent as i, SwitchCardDescription as e, SwitchCardImage as r, SwitchCard as c, SwitchCardTitle as o } from "./SwitchCard.js";
|
|
3
|
+
export {
|
|
4
|
+
i as Content,
|
|
5
|
+
e as Description,
|
|
6
|
+
r as Image,
|
|
7
|
+
c as Root,
|
|
8
|
+
o as Title
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=namespace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespace.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),l=require("@stokelp/styled-system/jsx"),u=require("@stokelp/styled-system/recipes"),j=require("../../utils/slots.cjs"),h=require("./TableProvider.cjs"),{withProvider:m,withContext:i}=j.createStyleContext(u.table),S=l.styled("div",u.tableContainer),C=m(l.styled("table"),"root"),p=s.forwardRef(({children:a,onSortChange:o,descriptor:t,...r},T)=>e.jsx(h.TableProvider,{descriptor:t,onSortChange:o,children:e.jsx(C,{ref:T,...r,children:a})}));p.displayName="Table";const _=i(l.styled("thead"),"thead"),y=i(l.styled("div"),"sortIndicatorRoot"),d=i(l.styled("svg"),"sortIndicator"),g=i(l.styled("tbody"),"tbody"),E=i(l.styled("tr"),"tr"),L=i(l.styled("th"),"th"),b=s.forwardRef(({children:a,addon:o,sortKey:t,onClick:r,...T},x)=>{const{dispatch:c,sortDescriptor:n}=h.useTable(),R=v=>{t&&(n===null?c({type:"UPDATE_SORT_DESCRIPTOR",payload:{key:t,direction:"asc"}}):n.key===t?n.direction==="asc"?c({type:"UPDATE_SORT_DESCRIPTOR",payload:{key:t,direction:"desc"}}):c({type:"CLEAR_SORT_DESCRIPTOR"}):c({type:"UPDATE_SORT_DESCRIPTOR",payload:{key:t,direction:"asc"}})),r?.(v)};return e.jsxs(L,{ref:x,...T,...t?{"data-sortable":!0}:{},role:"group",onClick:R,children:[a,o?e.jsxs("span",{className:"th__addon",children:[" ",o]}):null,n&&n.key===t?e.jsxs(y,{"data-state":"active",children:[e.jsx(d,{"data-active":n.direction==="asc"?!0:void 0,viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z",fill:"currentColor"})}),e.jsx(d,{"data-active":n.direction==="desc"?!0:void 0,viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z",fill:"currentColor"})})]}):t?e.jsxs(y,{"data-state":"idle",children:[e.jsx(d,{"data-active":!0,viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z",fill:"currentColor"})}),e.jsx(d,{"data-active":!0,viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z",fill:"currentColor"})})]}):null]})});b.displayName="Th";const P=i(l.styled("td"),"td"),O=l.styled("td",u.tableGroupTitle),f=s.forwardRef((a,o)=>{const t=s.useRef(null);return s.useLayoutEffect(()=>{if(t.current){const r=t.current?.closest("table")?.querySelector("thead > tr");r&&t.current.setAttribute("colspan",r.children.length.toString())}},[]),e.jsx("tr",{ref:o,className:"table_tr__group__title",children:e.jsx(O,{ref:t,...a})})});f.displayName="TableGroupTitle";const q=l.styled("td",u.tableEmptyRow),w=s.forwardRef((a,o)=>{const t=s.useRef(null);return s.useLayoutEffect(()=>{if(t.current){const r=t.current?.closest("table")?.querySelector("thead > tr");r&&t.current.setAttribute("colspan",r.children.length.toString())}},[]),e.jsx("tr",{ref:o,className:"table_tr__empty",children:e.jsx(q,{ref:t,...a})})});w.displayName="TableEmptyRow";exports.Table=p;exports.TableContainer=S;exports.TableEmptyRow=w;exports.TableGroupTitle=f;exports.Tbody=g;exports.Td=P;exports.Th=b;exports.Thead=_;exports.Tr=E;
|
|
2
|
+
//# sourceMappingURL=Table.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.cjs","sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import type { ComponentProps, ElementRef, FC, ReactNode } from 'react'\nimport { forwardRef, useLayoutEffect, useRef } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { table, tableContainer, tableEmptyRow, tableGroupTitle } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { TableProvider, type TableProviderProps, useTable } from './TableProvider'\n\nconst { withProvider, withContext } = createStyleContext(table)\n\nexport const TableContainer = styled('div', tableContainer)\n\nconst StyledTable = withProvider(styled('table'), 'root')\ntype StyledTableProps = ComponentProps<typeof StyledTable>\n\nexport interface TableProps extends StyledTableProps, Pick<TableProviderProps, 'onSortChange' | 'descriptor'> {}\n\nexport const Table = forwardRef<ElementRef<typeof StyledTable>, TableProps>(\n ({ children, onSortChange, descriptor, ...props }, ref) => {\n return (\n <TableProvider descriptor={descriptor} onSortChange={onSortChange}>\n <StyledTable ref={ref} {...props}>\n {children}\n </StyledTable>\n </TableProvider>\n )\n },\n) as FC<TableProps>\n\nTable.displayName = 'Table'\n\nexport const Thead = withContext(styled('thead'), 'thead')\nconst SortIndicatorRoot = withContext(styled('div'), 'sortIndicatorRoot')\nconst SortIndicator = withContext(styled('svg'), 'sortIndicator')\nexport const Tbody = withContext(styled('tbody'), 'tbody')\nexport const Tr = withContext(styled('tr'), 'tr')\nconst StyledTh = withContext(styled('th'), 'th')\n\ntype StyledThProps = ComponentProps<typeof StyledTh>\n\nexport interface ThProps extends StyledThProps {\n addon?: ReactNode\n sortKey?: string\n}\n\nexport const Th = forwardRef<ElementRef<typeof StyledTh>, ThProps>(\n ({ children, addon, sortKey, onClick, ...props }, ref) => {\n const { dispatch, sortDescriptor } = useTable()\n\n const handleOnClick: ThProps['onClick'] = e => {\n if (sortKey) {\n if (sortDescriptor === null) {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n } else if (sortDescriptor.key === sortKey) {\n if (sortDescriptor.direction === 'asc') {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'desc',\n },\n })\n } else {\n dispatch({\n type: 'CLEAR_SORT_DESCRIPTOR',\n })\n }\n } else {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n }\n }\n onClick?.(e)\n }\n\n return (\n <StyledTh\n ref={ref}\n {...props}\n {...(sortKey ? { 'data-sortable': true } : {})}\n role=\"group\"\n onClick={handleOnClick}\n >\n {children}\n {addon ? <span className=\"th__addon\"> {addon}</span> : null}\n {sortDescriptor && sortDescriptor.key === sortKey ? (\n <SortIndicatorRoot data-state=\"active\">\n <SortIndicator\n data-active={sortDescriptor.direction === 'asc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator\n data-active={sortDescriptor.direction === 'desc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : sortKey ? (\n <SortIndicatorRoot data-state=\"idle\">\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : null}\n </StyledTh>\n )\n },\n) as FC<ThProps>\n\nTh.displayName = 'Th'\n\nexport const Td = withContext(styled('td'), 'td')\n\nconst StyledTableGroupTitle = styled('td', tableGroupTitle)\nexport type TableGroupTitleProps = ComponentProps<typeof StyledTableGroupTitle>\nexport const TableGroupTitle = forwardRef<HTMLTableRowElement, TableGroupTitleProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableGroupTitle>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__group__title\">\n <StyledTableGroupTitle ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableGroupTitleProps>\nTableGroupTitle.displayName = 'TableGroupTitle'\n\nconst StyledTableEmptyRow = styled('td', tableEmptyRow)\nexport type TableEmptyRowProps = ComponentProps<typeof StyledTableEmptyRow>\nexport const TableEmptyRow = forwardRef<HTMLTableRowElement, TableEmptyRowProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableEmptyRow>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__empty\">\n <StyledTableEmptyRow ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableEmptyRowProps>\nTableEmptyRow.displayName = 'TableEmptyRow'\n\nexport interface TheadProps extends ComponentProps<typeof Thead> {}\n\nexport interface TbodyProps extends ComponentProps<typeof Tbody> {}\n\nexport interface TrProps extends ComponentProps<typeof Tr> {}\n\nexport interface TdProps extends ComponentProps<typeof Td> {}\n\nexport interface TableContainerProps extends ComponentProps<typeof TableContainer> {}\n"],"names":["withProvider","withContext","createStyleContext","table","TableContainer","styled","tableContainer","StyledTable","Table","forwardRef","children","onSortChange","descriptor","props","ref","jsx","TableProvider","Thead","SortIndicatorRoot","SortIndicator","Tbody","Tr","StyledTh","Th","addon","sortKey","onClick","dispatch","sortDescriptor","useTable","handleOnClick","e","jsxs","Td","StyledTableGroupTitle","tableGroupTitle","TableGroupTitle","$td","useRef","useLayoutEffect","tableColumns","StyledTableEmptyRow","tableEmptyRow","TableEmptyRow"],"mappings":"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"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as p, useRef as T, useLayoutEffect as m } from "react";
|
|
4
|
+
import { styled as r } from "@stokelp/styled-system/jsx";
|
|
5
|
+
import { tableContainer as w, tableGroupTitle as y, tableEmptyRow as R, table as v } from "@stokelp/styled-system/recipes";
|
|
6
|
+
import { createStyleContext as S } from "../../utils/slots.js";
|
|
7
|
+
import { TableProvider as C, useTable as _ } from "./TableProvider.js";
|
|
8
|
+
const { withProvider: g, withContext: i } = S(v), U = r("div", w), x = g(r("table"), "root"), E = p(
|
|
9
|
+
({ children: n, onSortChange: o, descriptor: t, ...l }, u) => /* @__PURE__ */ e(C, { descriptor: t, onSortChange: o, children: /* @__PURE__ */ e(x, { ref: u, ...l, children: n }) })
|
|
10
|
+
);
|
|
11
|
+
E.displayName = "Table";
|
|
12
|
+
const j = i(r("thead"), "thead"), h = i(r("div"), "sortIndicatorRoot"), s = i(r("svg"), "sortIndicator"), q = i(r("tbody"), "tbody"), $ = i(r("tr"), "tr"), L = i(r("th"), "th"), O = p(
|
|
13
|
+
({ children: n, addon: o, sortKey: t, onClick: l, ...u }, b) => {
|
|
14
|
+
const { dispatch: c, sortDescriptor: a } = _();
|
|
15
|
+
return /* @__PURE__ */ d(
|
|
16
|
+
L,
|
|
17
|
+
{
|
|
18
|
+
ref: b,
|
|
19
|
+
...u,
|
|
20
|
+
...t ? { "data-sortable": !0 } : {},
|
|
21
|
+
role: "group",
|
|
22
|
+
onClick: (f) => {
|
|
23
|
+
t && (a === null ? c({
|
|
24
|
+
type: "UPDATE_SORT_DESCRIPTOR",
|
|
25
|
+
payload: {
|
|
26
|
+
key: t,
|
|
27
|
+
direction: "asc"
|
|
28
|
+
}
|
|
29
|
+
}) : a.key === t ? a.direction === "asc" ? c({
|
|
30
|
+
type: "UPDATE_SORT_DESCRIPTOR",
|
|
31
|
+
payload: {
|
|
32
|
+
key: t,
|
|
33
|
+
direction: "desc"
|
|
34
|
+
}
|
|
35
|
+
}) : c({
|
|
36
|
+
type: "CLEAR_SORT_DESCRIPTOR"
|
|
37
|
+
}) : c({
|
|
38
|
+
type: "UPDATE_SORT_DESCRIPTOR",
|
|
39
|
+
payload: {
|
|
40
|
+
key: t,
|
|
41
|
+
direction: "asc"
|
|
42
|
+
}
|
|
43
|
+
})), l?.(f);
|
|
44
|
+
},
|
|
45
|
+
children: [
|
|
46
|
+
n,
|
|
47
|
+
o ? /* @__PURE__ */ d("span", { className: "th__addon", children: [
|
|
48
|
+
" ",
|
|
49
|
+
o
|
|
50
|
+
] }) : null,
|
|
51
|
+
a && a.key === t ? /* @__PURE__ */ d(h, { "data-state": "active", children: [
|
|
52
|
+
/* @__PURE__ */ e(
|
|
53
|
+
s,
|
|
54
|
+
{
|
|
55
|
+
"data-active": a.direction === "asc" ? !0 : void 0,
|
|
56
|
+
viewBox: "0 0 8 8",
|
|
57
|
+
fill: "none",
|
|
58
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
59
|
+
children: /* @__PURE__ */ e("path", { d: "M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z", fill: "currentColor" })
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ e(
|
|
63
|
+
s,
|
|
64
|
+
{
|
|
65
|
+
"data-active": a.direction === "desc" ? !0 : void 0,
|
|
66
|
+
viewBox: "0 0 8 8",
|
|
67
|
+
fill: "none",
|
|
68
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
69
|
+
children: /* @__PURE__ */ e("path", { d: "M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z", fill: "currentColor" })
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
] }) : t ? /* @__PURE__ */ d(h, { "data-state": "idle", children: [
|
|
73
|
+
/* @__PURE__ */ e(s, { "data-active": !0, viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z", fill: "currentColor" }) }),
|
|
74
|
+
/* @__PURE__ */ e(s, { "data-active": !0, viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z", fill: "currentColor" }) })
|
|
75
|
+
] }) : null
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
O.displayName = "Th";
|
|
82
|
+
const z = i(r("td"), "td"), P = r("td", y), k = p((n, o) => {
|
|
83
|
+
const t = T(null);
|
|
84
|
+
return m(() => {
|
|
85
|
+
if (t.current) {
|
|
86
|
+
const l = t.current?.closest("table")?.querySelector("thead > tr");
|
|
87
|
+
l && t.current.setAttribute("colspan", l.children.length.toString());
|
|
88
|
+
}
|
|
89
|
+
}, []), /* @__PURE__ */ e("tr", { ref: o, className: "table_tr__group__title", children: /* @__PURE__ */ e(P, { ref: t, ...n }) });
|
|
90
|
+
});
|
|
91
|
+
k.displayName = "TableGroupTitle";
|
|
92
|
+
const D = r("td", R), I = p((n, o) => {
|
|
93
|
+
const t = T(null);
|
|
94
|
+
return m(() => {
|
|
95
|
+
if (t.current) {
|
|
96
|
+
const l = t.current?.closest("table")?.querySelector("thead > tr");
|
|
97
|
+
l && t.current.setAttribute("colspan", l.children.length.toString());
|
|
98
|
+
}
|
|
99
|
+
}, []), /* @__PURE__ */ e("tr", { ref: o, className: "table_tr__empty", children: /* @__PURE__ */ e(D, { ref: t, ...n }) });
|
|
100
|
+
});
|
|
101
|
+
I.displayName = "TableEmptyRow";
|
|
102
|
+
export {
|
|
103
|
+
E as Table,
|
|
104
|
+
U as TableContainer,
|
|
105
|
+
I as TableEmptyRow,
|
|
106
|
+
k as TableGroupTitle,
|
|
107
|
+
q as Tbody,
|
|
108
|
+
z as Td,
|
|
109
|
+
O as Th,
|
|
110
|
+
j as Thead,
|
|
111
|
+
$ as Tr
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=Table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.js","sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import type { ComponentProps, ElementRef, FC, ReactNode } from 'react'\nimport { forwardRef, useLayoutEffect, useRef } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { table, tableContainer, tableEmptyRow, tableGroupTitle } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { TableProvider, type TableProviderProps, useTable } from './TableProvider'\n\nconst { withProvider, withContext } = createStyleContext(table)\n\nexport const TableContainer = styled('div', tableContainer)\n\nconst StyledTable = withProvider(styled('table'), 'root')\ntype StyledTableProps = ComponentProps<typeof StyledTable>\n\nexport interface TableProps extends StyledTableProps, Pick<TableProviderProps, 'onSortChange' | 'descriptor'> {}\n\nexport const Table = forwardRef<ElementRef<typeof StyledTable>, TableProps>(\n ({ children, onSortChange, descriptor, ...props }, ref) => {\n return (\n <TableProvider descriptor={descriptor} onSortChange={onSortChange}>\n <StyledTable ref={ref} {...props}>\n {children}\n </StyledTable>\n </TableProvider>\n )\n },\n) as FC<TableProps>\n\nTable.displayName = 'Table'\n\nexport const Thead = withContext(styled('thead'), 'thead')\nconst SortIndicatorRoot = withContext(styled('div'), 'sortIndicatorRoot')\nconst SortIndicator = withContext(styled('svg'), 'sortIndicator')\nexport const Tbody = withContext(styled('tbody'), 'tbody')\nexport const Tr = withContext(styled('tr'), 'tr')\nconst StyledTh = withContext(styled('th'), 'th')\n\ntype StyledThProps = ComponentProps<typeof StyledTh>\n\nexport interface ThProps extends StyledThProps {\n addon?: ReactNode\n sortKey?: string\n}\n\nexport const Th = forwardRef<ElementRef<typeof StyledTh>, ThProps>(\n ({ children, addon, sortKey, onClick, ...props }, ref) => {\n const { dispatch, sortDescriptor } = useTable()\n\n const handleOnClick: ThProps['onClick'] = e => {\n if (sortKey) {\n if (sortDescriptor === null) {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n } else if (sortDescriptor.key === sortKey) {\n if (sortDescriptor.direction === 'asc') {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'desc',\n },\n })\n } else {\n dispatch({\n type: 'CLEAR_SORT_DESCRIPTOR',\n })\n }\n } else {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n }\n }\n onClick?.(e)\n }\n\n return (\n <StyledTh\n ref={ref}\n {...props}\n {...(sortKey ? { 'data-sortable': true } : {})}\n role=\"group\"\n onClick={handleOnClick}\n >\n {children}\n {addon ? <span className=\"th__addon\"> {addon}</span> : null}\n {sortDescriptor && sortDescriptor.key === sortKey ? (\n <SortIndicatorRoot data-state=\"active\">\n <SortIndicator\n data-active={sortDescriptor.direction === 'asc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator\n data-active={sortDescriptor.direction === 'desc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : sortKey ? (\n <SortIndicatorRoot data-state=\"idle\">\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : null}\n </StyledTh>\n )\n },\n) as FC<ThProps>\n\nTh.displayName = 'Th'\n\nexport const Td = withContext(styled('td'), 'td')\n\nconst StyledTableGroupTitle = styled('td', tableGroupTitle)\nexport type TableGroupTitleProps = ComponentProps<typeof StyledTableGroupTitle>\nexport const TableGroupTitle = forwardRef<HTMLTableRowElement, TableGroupTitleProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableGroupTitle>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__group__title\">\n <StyledTableGroupTitle ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableGroupTitleProps>\nTableGroupTitle.displayName = 'TableGroupTitle'\n\nconst StyledTableEmptyRow = styled('td', tableEmptyRow)\nexport type TableEmptyRowProps = ComponentProps<typeof StyledTableEmptyRow>\nexport const TableEmptyRow = forwardRef<HTMLTableRowElement, TableEmptyRowProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableEmptyRow>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__empty\">\n <StyledTableEmptyRow ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableEmptyRowProps>\nTableEmptyRow.displayName = 'TableEmptyRow'\n\nexport interface TheadProps extends ComponentProps<typeof Thead> {}\n\nexport interface TbodyProps extends ComponentProps<typeof Tbody> {}\n\nexport interface TrProps extends ComponentProps<typeof Tr> {}\n\nexport interface TdProps extends ComponentProps<typeof Td> {}\n\nexport interface TableContainerProps extends ComponentProps<typeof TableContainer> {}\n"],"names":["withProvider","withContext","createStyleContext","table","TableContainer","styled","tableContainer","StyledTable","Table","forwardRef","children","onSortChange","descriptor","props","ref","jsx","TableProvider","Thead","SortIndicatorRoot","SortIndicator","Tbody","Tr","StyledTh","Th","addon","sortKey","onClick","dispatch","sortDescriptor","useTable","jsxs","e","Td","StyledTableGroupTitle","tableGroupTitle","TableGroupTitle","$td","useRef","useLayoutEffect","tableColumns","StyledTableEmptyRow","tableEmptyRow","TableEmptyRow"],"mappings":"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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),r=require("react"),l=(e,t)=>{switch(t.type){case"CLEAR_SORT_DESCRIPTOR":return{...e,sortDescriptor:null};case"UPDATE_SORT_DESCRIPTOR":return{...e,sortDescriptor:t.payload};default:return e}},o=r.createContext(void 0),a=()=>{const e=r.useContext(o);if(!e)throw new Error("useTable must be used within a <TableProvider/>");return e},d=({children:e,onSortChange:t,descriptor:c})=>{const[s,n]=r.useReducer(l,{sortDescriptor:c??null});r.useEffect(()=>{t?.(s.sortDescriptor)},[JSON.stringify(s.sortDescriptor)]);const u={...s,dispatch:n};return i.jsx(o.Provider,{value:u,children:e})};exports.TableProvider=d;exports.useTable=a;
|
|
2
|
+
//# sourceMappingURL=TableProvider.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableProvider.cjs","sources":["../../../src/components/table/TableProvider.tsx"],"sourcesContent":["import { createContext, Dispatch, FC, ReactNode, Reducer, useContext, useEffect, useReducer } from 'react'\nimport type { TableSortDescriptor } from './common'\n\ntype State = {\n sortDescriptor: TableSortDescriptor\n}\n\ntype Action =\n | {\n type: 'UPDATE_SORT_DESCRIPTOR'\n payload: TableSortDescriptor\n }\n | {\n type: 'CLEAR_SORT_DESCRIPTOR'\n }\n\ntype Context = State & {\n dispatch: Dispatch<Action>\n}\n\nexport interface TableProviderProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onSortChange?: (descriptor: TableSortDescriptor<any>) => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n descriptor?: TableSortDescriptor<any>\n children: ReactNode\n}\n\nconst tableReducer: Reducer<State, Action> = (state, action) => {\n switch (action.type) {\n case 'CLEAR_SORT_DESCRIPTOR': {\n return {\n ...state,\n sortDescriptor: null,\n }\n }\n case 'UPDATE_SORT_DESCRIPTOR': {\n return {\n ...state,\n sortDescriptor: action.payload,\n }\n }\n default:\n return state\n }\n}\n\nconst TableContext = createContext<Context | undefined>(undefined)\n\nexport const useTable = (): Context => {\n const context = useContext(TableContext)\n\n if (!context) {\n throw new Error('useTable must be used within a <TableProvider/>')\n }\n\n return context\n}\n\nexport const TableProvider: FC<TableProviderProps> = ({ children, onSortChange, descriptor }) => {\n const [state, dispatch] = useReducer(tableReducer, {\n sortDescriptor: descriptor ?? null,\n })\n\n useEffect(() => {\n onSortChange?.(state.sortDescriptor)\n }, [JSON.stringify(state.sortDescriptor)])\n\n const context = {\n ...state,\n dispatch,\n } satisfies Context\n\n return <TableContext.Provider value={context}>{children}</TableContext.Provider>\n}\n"],"names":["tableReducer","state","action","TableContext","createContext","useTable","context","useContext","TableProvider","children","onSortChange","descriptor","dispatch","useReducer","useEffect"],"mappings":"qJA4BMA,EAAuC,CAACC,EAAOC,IAAW,CAC9D,OAAQA,EAAO,KAAA,CACb,IAAK,wBACH,MAAO,CACL,GAAGD,EACH,eAAgB,IAAA,EAGpB,IAAK,yBACH,MAAO,CACL,GAAGA,EACH,eAAgBC,EAAO,OAAA,EAG3B,QACE,OAAOD,CAAA,CAEb,EAEME,EAAeC,EAAAA,cAAmC,MAAS,EAEpDC,EAAW,IAAe,CACrC,MAAMC,EAAUC,EAAAA,WAAWJ,CAAY,EAEvC,GAAI,CAACG,EACH,MAAM,IAAI,MAAM,iDAAiD,EAGnE,OAAOA,CACT,EAEaE,EAAwC,CAAC,CAAE,SAAAC,EAAU,aAAAC,EAAc,WAAAC,KAAiB,CAC/F,KAAM,CAACV,EAAOW,CAAQ,EAAIC,EAAAA,WAAWb,EAAc,CACjD,eAAgBW,GAAc,IAAA,CAC/B,EAEDG,EAAAA,UAAU,IAAM,CACdJ,IAAeT,EAAM,cAAc,CACrC,EAAG,CAAC,KAAK,UAAUA,EAAM,cAAc,CAAC,CAAC,EAEzC,MAAMK,EAAU,CACd,GAAGL,EACH,SAAAW,CAAA,EAGF,aAAQT,EAAa,SAAb,CAAsB,MAAOG,EAAU,SAAAG,EAAS,CAC1D"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import { useReducer as i, useEffect as l, createContext as a, useContext as p } from "react";
|
|
4
|
+
const d = (e, r) => {
|
|
5
|
+
switch (r.type) {
|
|
6
|
+
case "CLEAR_SORT_DESCRIPTOR":
|
|
7
|
+
return {
|
|
8
|
+
...e,
|
|
9
|
+
sortDescriptor: null
|
|
10
|
+
};
|
|
11
|
+
case "UPDATE_SORT_DESCRIPTOR":
|
|
12
|
+
return {
|
|
13
|
+
...e,
|
|
14
|
+
sortDescriptor: r.payload
|
|
15
|
+
};
|
|
16
|
+
default:
|
|
17
|
+
return e;
|
|
18
|
+
}
|
|
19
|
+
}, o = a(void 0), D = () => {
|
|
20
|
+
const e = p(o);
|
|
21
|
+
if (!e)
|
|
22
|
+
throw new Error("useTable must be used within a <TableProvider/>");
|
|
23
|
+
return e;
|
|
24
|
+
}, b = ({ children: e, onSortChange: r, descriptor: s }) => {
|
|
25
|
+
const [t, c] = i(d, {
|
|
26
|
+
sortDescriptor: s ?? null
|
|
27
|
+
});
|
|
28
|
+
l(() => {
|
|
29
|
+
r?.(t.sortDescriptor);
|
|
30
|
+
}, [JSON.stringify(t.sortDescriptor)]);
|
|
31
|
+
const n = {
|
|
32
|
+
...t,
|
|
33
|
+
dispatch: c
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ u(o.Provider, { value: n, children: e });
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
b as TableProvider,
|
|
39
|
+
D as useTable
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=TableProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableProvider.js","sources":["../../../src/components/table/TableProvider.tsx"],"sourcesContent":["import { createContext, Dispatch, FC, ReactNode, Reducer, useContext, useEffect, useReducer } from 'react'\nimport type { TableSortDescriptor } from './common'\n\ntype State = {\n sortDescriptor: TableSortDescriptor\n}\n\ntype Action =\n | {\n type: 'UPDATE_SORT_DESCRIPTOR'\n payload: TableSortDescriptor\n }\n | {\n type: 'CLEAR_SORT_DESCRIPTOR'\n }\n\ntype Context = State & {\n dispatch: Dispatch<Action>\n}\n\nexport interface TableProviderProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onSortChange?: (descriptor: TableSortDescriptor<any>) => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n descriptor?: TableSortDescriptor<any>\n children: ReactNode\n}\n\nconst tableReducer: Reducer<State, Action> = (state, action) => {\n switch (action.type) {\n case 'CLEAR_SORT_DESCRIPTOR': {\n return {\n ...state,\n sortDescriptor: null,\n }\n }\n case 'UPDATE_SORT_DESCRIPTOR': {\n return {\n ...state,\n sortDescriptor: action.payload,\n }\n }\n default:\n return state\n }\n}\n\nconst TableContext = createContext<Context | undefined>(undefined)\n\nexport const useTable = (): Context => {\n const context = useContext(TableContext)\n\n if (!context) {\n throw new Error('useTable must be used within a <TableProvider/>')\n }\n\n return context\n}\n\nexport const TableProvider: FC<TableProviderProps> = ({ children, onSortChange, descriptor }) => {\n const [state, dispatch] = useReducer(tableReducer, {\n sortDescriptor: descriptor ?? null,\n })\n\n useEffect(() => {\n onSortChange?.(state.sortDescriptor)\n }, [JSON.stringify(state.sortDescriptor)])\n\n const context = {\n ...state,\n dispatch,\n } satisfies Context\n\n return <TableContext.Provider value={context}>{children}</TableContext.Provider>\n}\n"],"names":["tableReducer","state","action","TableContext","createContext","useTable","context","useContext","TableProvider","children","onSortChange","descriptor","dispatch","useReducer","useEffect"],"mappings":";;;AA4BA,MAAMA,IAAuC,CAACC,GAAOC,MAAW;AAC9D,UAAQA,EAAO,MAAA;AAAA,IACb,KAAK;AACH,aAAO;AAAA,QACL,GAAGD;AAAA,QACH,gBAAgB;AAAA,MAAA;AAAA,IAGpB,KAAK;AACH,aAAO;AAAA,QACL,GAAGA;AAAA,QACH,gBAAgBC,EAAO;AAAA,MAAA;AAAA,IAG3B;AACE,aAAOD;AAAA,EAAA;AAEb,GAEME,IAAeC,EAAmC,MAAS,GAEpDC,IAAW,MAAe;AACrC,QAAMC,IAAUC,EAAWJ,CAAY;AAEvC,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,iDAAiD;AAGnE,SAAOA;AACT,GAEaE,IAAwC,CAAC,EAAE,UAAAC,GAAU,cAAAC,GAAc,YAAAC,QAAiB;AAC/F,QAAM,CAACV,GAAOW,CAAQ,IAAIC,EAAWb,GAAc;AAAA,IACjD,gBAAgBW,KAAc;AAAA,EAAA,CAC/B;AAED,EAAAG,EAAU,MAAM;AACd,IAAAJ,IAAeT,EAAM,cAAc;AAAA,EACrC,GAAG,CAAC,KAAK,UAAUA,EAAM,cAAc,CAAC,CAAC;AAEzC,QAAMK,IAAU;AAAA,IACd,GAAGL;AAAA,IACH,UAAAW;AAAA,EAAA;AAGF,2BAAQT,EAAa,UAAb,EAAsB,OAAOG,GAAU,UAAAG,GAAS;AAC1D;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),t=require("@ark-ui/react"),b=require("react"),s=require("@stokelp/styled-system/jsx"),a=require("@stokelp/styled-system/recipes"),T=require("../../utils/slots.cjs"),{withProvider:l,withContext:e}=T.createStyleContext(a.tabs),d=l(s.styled(t.Tabs.Root),"root",{defaultProps:{lazyMount:!0}}),u=e(s.styled(t.Tabs.Content),"content"),y=e(s.styled(t.Tabs.Trigger),"trigger"),g=s.styled(t.ark.span,a.tabsChip),p=e(s.styled(t.Tabs.Indicator),"indicator"),o=b.forwardRef(({children:i,...n},c)=>r.jsxs(t.Tabs.List,{ref:c,...n,children:[i,r.jsx(p,{})]}));o.displayName=t.Tabs.List.displayName;const C=e(s.styled(o),"list");exports.Tabs=d;exports.TabsChip=g;exports.TabsContent=u;exports.TabsList=C;exports.TabsTrigger=y;
|
|
2
|
+
//# sourceMappingURL=Tabs.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.cjs","sources":["../../../src/components/tabs/Tabs.tsx"],"sourcesContent":["import { ark, Tabs as ArkTab } from '@ark-ui/react'\nimport { ComponentProps, type ComponentPropsWithoutRef, type ElementRef, forwardRef } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { tabs, tabsChip } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots.tsx'\n\nconst { withProvider, withContext } = createStyleContext(tabs)\n\nexport const Tabs = withProvider(styled(ArkTab.Root), 'root', {\n defaultProps: {\n lazyMount: true,\n },\n})\nexport const TabsContent = withContext(styled(ArkTab.Content), 'content')\nexport const TabsTrigger = withContext(styled(ArkTab.Trigger), 'trigger')\nexport const TabsChip = styled(ark.span, tabsChip)\n\nconst TabsIndicator = withContext(styled(ArkTab.Indicator), 'indicator')\n\nconst List = forwardRef<ElementRef<typeof ArkTab.List>, ComponentPropsWithoutRef<typeof ArkTab.List>>(\n ({ children, ...props }, ref) => (\n <ArkTab.List ref={ref} {...props}>\n {children}\n <TabsIndicator />\n </ArkTab.List>\n ),\n)\nList.displayName = ArkTab.List.displayName\n\nexport const TabsList = withContext(styled(List), 'list')\n\nexport interface TabsProps extends ComponentProps<typeof Tabs> {}\n\nexport interface TabsContentProps extends ComponentProps<typeof TabsContent> {}\n\nexport interface TabsIndicatorProps extends ComponentProps<typeof TabsIndicator> {}\n\nexport interface TabsListProps extends ComponentProps<typeof TabsList> {}\n\nexport interface TabsTriggerProps extends ComponentProps<typeof TabsTrigger> {}\n\nexport interface TabsChipProps extends ComponentProps<typeof TabsChip> {}\n"],"names":["withProvider","withContext","createStyleContext","tabs","Tabs","styled","ArkTab","TabsContent","TabsTrigger","TabsChip","ark","tabsChip","TabsIndicator","List","forwardRef","children","props","ref","jsxs","TabsList"],"mappings":"uSAMM,CAAE,aAAAA,EAAc,YAAAC,GAAgBC,EAAAA,mBAAmBC,EAAAA,IAAI,EAEhDC,EAAOJ,EAAaK,EAAAA,OAAOC,EAAAA,KAAO,IAAI,EAAG,OAAQ,CAC5D,aAAc,CACZ,UAAW,EAAA,CAEf,CAAC,EACYC,EAAcN,EAAYI,EAAAA,OAAOC,EAAAA,KAAO,OAAO,EAAG,SAAS,EAC3DE,EAAcP,EAAYI,EAAAA,OAAOC,EAAAA,KAAO,OAAO,EAAG,SAAS,EAC3DG,EAAWJ,EAAAA,OAAOK,MAAI,KAAMC,EAAAA,QAAQ,EAE3CC,EAAgBX,EAAYI,EAAAA,OAAOC,EAAAA,KAAO,SAAS,EAAG,WAAW,EAEjEO,EAAOC,EAAAA,WACX,CAAC,CAAE,SAAAC,EAAU,GAAGC,CAAA,EAASC,IACvBC,EAAAA,KAACZ,EAAAA,KAAO,KAAP,CAAY,IAAAW,EAAW,GAAGD,EACxB,SAAA,CAAAD,QACAH,EAAA,CAAA,CAAc,CAAA,CAAA,CACjB,CAEJ,EACAC,EAAK,YAAcP,OAAO,KAAK,YAExB,MAAMa,EAAWlB,EAAYI,SAAOQ,CAAI,EAAG,MAAM"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as e, jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import { Tabs as t, ark as m } from "@ark-ui/react";
|
|
4
|
+
import { forwardRef as p } from "react";
|
|
5
|
+
import { styled as o } from "@stokelp/styled-system/jsx";
|
|
6
|
+
import { tabsChip as b, tabs as d } from "@stokelp/styled-system/recipes";
|
|
7
|
+
import { createStyleContext as T } from "../../utils/slots.js";
|
|
8
|
+
const { withProvider: f, withContext: s } = T(d), L = f(o(t.Root), "root", {
|
|
9
|
+
defaultProps: {
|
|
10
|
+
lazyMount: !0
|
|
11
|
+
}
|
|
12
|
+
}), w = s(o(t.Content), "content"), j = s(o(t.Trigger), "trigger"), I = o(m.span, b), l = s(o(t.Indicator), "indicator"), r = p(
|
|
13
|
+
({ children: i, ...a }, n) => /* @__PURE__ */ e(t.List, { ref: n, ...a, children: [
|
|
14
|
+
i,
|
|
15
|
+
/* @__PURE__ */ c(l, {})
|
|
16
|
+
] })
|
|
17
|
+
);
|
|
18
|
+
r.displayName = t.List.displayName;
|
|
19
|
+
const N = s(o(r), "list");
|
|
20
|
+
export {
|
|
21
|
+
L as Tabs,
|
|
22
|
+
I as TabsChip,
|
|
23
|
+
w as TabsContent,
|
|
24
|
+
N as TabsList,
|
|
25
|
+
j as TabsTrigger
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=Tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.js","sources":["../../../src/components/tabs/Tabs.tsx"],"sourcesContent":["import { ark, Tabs as ArkTab } from '@ark-ui/react'\nimport { ComponentProps, type ComponentPropsWithoutRef, type ElementRef, forwardRef } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { tabs, tabsChip } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots.tsx'\n\nconst { withProvider, withContext } = createStyleContext(tabs)\n\nexport const Tabs = withProvider(styled(ArkTab.Root), 'root', {\n defaultProps: {\n lazyMount: true,\n },\n})\nexport const TabsContent = withContext(styled(ArkTab.Content), 'content')\nexport const TabsTrigger = withContext(styled(ArkTab.Trigger), 'trigger')\nexport const TabsChip = styled(ark.span, tabsChip)\n\nconst TabsIndicator = withContext(styled(ArkTab.Indicator), 'indicator')\n\nconst List = forwardRef<ElementRef<typeof ArkTab.List>, ComponentPropsWithoutRef<typeof ArkTab.List>>(\n ({ children, ...props }, ref) => (\n <ArkTab.List ref={ref} {...props}>\n {children}\n <TabsIndicator />\n </ArkTab.List>\n ),\n)\nList.displayName = ArkTab.List.displayName\n\nexport const TabsList = withContext(styled(List), 'list')\n\nexport interface TabsProps extends ComponentProps<typeof Tabs> {}\n\nexport interface TabsContentProps extends ComponentProps<typeof TabsContent> {}\n\nexport interface TabsIndicatorProps extends ComponentProps<typeof TabsIndicator> {}\n\nexport interface TabsListProps extends ComponentProps<typeof TabsList> {}\n\nexport interface TabsTriggerProps extends ComponentProps<typeof TabsTrigger> {}\n\nexport interface TabsChipProps extends ComponentProps<typeof TabsChip> {}\n"],"names":["withProvider","withContext","createStyleContext","tabs","Tabs","styled","ArkTab","TabsContent","TabsTrigger","TabsChip","ark","tabsChip","TabsIndicator","List","forwardRef","children","props","ref","jsxs","TabsList"],"mappings":";;;;;;;AAMA,MAAM,EAAE,cAAAA,GAAc,aAAAC,MAAgBC,EAAmBC,CAAI,GAEhDC,IAAOJ,EAAaK,EAAOC,EAAO,IAAI,GAAG,QAAQ;AAAA,EAC5D,cAAc;AAAA,IACZ,WAAW;AAAA,EAAA;AAEf,CAAC,GACYC,IAAcN,EAAYI,EAAOC,EAAO,OAAO,GAAG,SAAS,GAC3DE,IAAcP,EAAYI,EAAOC,EAAO,OAAO,GAAG,SAAS,GAC3DG,IAAWJ,EAAOK,EAAI,MAAMC,CAAQ,GAE3CC,IAAgBX,EAAYI,EAAOC,EAAO,SAAS,GAAG,WAAW,GAEjEO,IAAOC;AAAA,EACX,CAAC,EAAE,UAAAC,GAAU,GAAGC,EAAA,GAASC,MACvB,gBAAAC,EAACZ,EAAO,MAAP,EAAY,KAAAW,GAAW,GAAGD,GACxB,UAAA;AAAA,IAAAD;AAAA,sBACAH,GAAA,CAAA,CAAc;AAAA,EAAA,EAAA,CACjB;AAEJ;AACAC,EAAK,cAAcP,EAAO,KAAK;AAExB,MAAMa,IAAWlB,EAAYI,EAAOQ,CAAI,GAAG,MAAM;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("@stokelp/styled-system/css"),P=require("@ark-ui/react"),t=require("@stokelp/styled-system/jsx"),c=require("@stokelp/styled-system/recipes"),q=require("react"),x=q.forwardRef((o,a)=>{const[i,n]=c.tag.splitVariantProps(o),[l,u]=t.splitCssProps(n),{children:p,className:d,...g}=u,r=c.tag(i);return e.jsxs(P.ark.div,{ref:a,className:s.cx(r.root,s.css(l),d),...g,children:[p,e.jsx(t.Circle,{className:s.cx(r.badge),borderRadius:"full"})]})});exports.Tag=x;
|
|
2
|
+
//# sourceMappingURL=Tag.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.cjs","sources":["../../../src/components/tag/Tag.tsx"],"sourcesContent":["import { css, cx } from '@stokelp/styled-system/css'\nimport { ark, type HTMLArkProps } from '@ark-ui/react'\nimport { Circle, splitCssProps } from '@stokelp/styled-system/jsx'\nimport { tag, type TagVariantProps } from '@stokelp/styled-system/recipes'\nimport { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { forwardRef, type ReactNode } from 'react'\n\nexport interface TagProps extends Assign<JsxStyleProps, HTMLArkProps<'div'>>, TagVariantProps {\n children: ReactNode\n}\n\nexport const Tag = forwardRef<HTMLDivElement, TagProps>((props, ref) => {\n const [variantProps, tagProps] = tag.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(tagProps)\n const { children, className, ...rootProps } = localProps\n const styles = tag(variantProps)\n\n return (\n <ark.div ref={ref} className={cx(styles.root, css(cssProps), className)} {...rootProps}>\n {children}\n <Circle className={cx(styles.badge)} borderRadius=\"full\" />\n </ark.div>\n )\n})\n"],"names":["Tag","forwardRef","props","ref","variantProps","tagProps","tag","cssProps","localProps","splitCssProps","children","className","rootProps","styles","jsxs","ark","cx","css","jsx","Circle"],"mappings":"4SAWaA,EAAMC,EAAAA,WAAqC,CAACC,EAAOC,IAAQ,CACtE,KAAM,CAACC,EAAcC,CAAQ,EAAIC,EAAAA,IAAI,kBAAkBJ,CAAK,EACtD,CAACK,EAAUC,CAAU,EAAIC,EAAAA,cAAcJ,CAAQ,EAC/C,CAAE,SAAAK,EAAU,UAAAC,EAAW,GAAGC,GAAcJ,EACxCK,EAASP,EAAAA,IAAIF,CAAY,EAE/B,OACEU,EAAAA,KAACC,EAAAA,IAAI,IAAJ,CAAQ,IAAAZ,EAAU,UAAWa,KAAGH,EAAO,KAAMI,EAAAA,IAAIV,CAAQ,EAAGI,CAAS,EAAI,GAAGC,EAC1E,SAAA,CAAAF,EACDQ,MAACC,EAAAA,QAAO,UAAWH,EAAAA,GAAGH,EAAO,KAAK,EAAG,aAAa,MAAA,CAAO,CAAA,EAC3D,CAEJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as f, jsx as d } from "react/jsx-runtime";
|
|
3
|
+
import { cx as s, css as P } from "@stokelp/styled-system/css";
|
|
4
|
+
import { ark as g } from "@ark-ui/react";
|
|
5
|
+
import { splitCssProps as u, Circle as x } from "@stokelp/styled-system/jsx";
|
|
6
|
+
import { tag as o } from "@stokelp/styled-system/recipes";
|
|
7
|
+
import { forwardRef as N } from "react";
|
|
8
|
+
const k = N((t, a) => {
|
|
9
|
+
const [c, i] = o.splitVariantProps(t), [p, m] = u(i), { children: e, className: l, ...n } = m, r = o(c);
|
|
10
|
+
return /* @__PURE__ */ f(g.div, { ref: a, className: s(r.root, P(p), l), ...n, children: [
|
|
11
|
+
e,
|
|
12
|
+
/* @__PURE__ */ d(x, { className: s(r.badge), borderRadius: "full" })
|
|
13
|
+
] });
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
k as Tag
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=Tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../src/components/tag/Tag.tsx"],"sourcesContent":["import { css, cx } from '@stokelp/styled-system/css'\nimport { ark, type HTMLArkProps } from '@ark-ui/react'\nimport { Circle, splitCssProps } from '@stokelp/styled-system/jsx'\nimport { tag, type TagVariantProps } from '@stokelp/styled-system/recipes'\nimport { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { forwardRef, type ReactNode } from 'react'\n\nexport interface TagProps extends Assign<JsxStyleProps, HTMLArkProps<'div'>>, TagVariantProps {\n children: ReactNode\n}\n\nexport const Tag = forwardRef<HTMLDivElement, TagProps>((props, ref) => {\n const [variantProps, tagProps] = tag.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(tagProps)\n const { children, className, ...rootProps } = localProps\n const styles = tag(variantProps)\n\n return (\n <ark.div ref={ref} className={cx(styles.root, css(cssProps), className)} {...rootProps}>\n {children}\n <Circle className={cx(styles.badge)} borderRadius=\"full\" />\n </ark.div>\n )\n})\n"],"names":["Tag","forwardRef","props","ref","variantProps","tagProps","tag","cssProps","localProps","splitCssProps","children","className","rootProps","styles","jsxs","ark","cx","css","jsx","Circle"],"mappings":";;;;;;;AAWO,MAAMA,IAAMC,EAAqC,CAACC,GAAOC,MAAQ;AACtE,QAAM,CAACC,GAAcC,CAAQ,IAAIC,EAAI,kBAAkBJ,CAAK,GACtD,CAACK,GAAUC,CAAU,IAAIC,EAAcJ,CAAQ,GAC/C,EAAE,UAAAK,GAAU,WAAAC,GAAW,GAAGC,MAAcJ,GACxCK,IAASP,EAAIF,CAAY;AAE/B,SACE,gBAAAU,EAACC,EAAI,KAAJ,EAAQ,KAAAZ,GAAU,WAAWa,EAAGH,EAAO,MAAMI,EAAIV,CAAQ,GAAGI,CAAS,GAAI,GAAGC,GAC1E,UAAA;AAAA,IAAAF;AAAA,IACD,gBAAAQ,EAACC,KAAO,WAAWH,EAAGH,EAAO,KAAK,GAAG,cAAa,OAAA,CAAO;AAAA,EAAA,GAC3D;AAEJ,CAAC;"}
|