@stokelp/ui 2.103.0 → 2.104.1
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/_rolldown/runtime.cjs +1 -0
- package/dist/_virtual/_rolldown/runtime.js +21 -0
- package/dist/components/accordion/Accordion.cjs +2 -2
- package/dist/components/accordion/Accordion.cjs.map +1 -1
- package/dist/components/accordion/Accordion.js +22 -27
- package/dist/components/accordion/Accordion.js.map +1 -1
- package/dist/components/action-card/ActionCard.cjs +2 -2
- package/dist/components/action-card/ActionCard.cjs.map +1 -1
- package/dist/components/action-card/ActionCard.js +23 -26
- package/dist/components/action-card/ActionCard.js.map +1 -1
- package/dist/components/alert/Alert.cjs +2 -2
- package/dist/components/alert/Alert.cjs.map +1 -1
- package/dist/components/alert/Alert.js +117 -84
- package/dist/components/alert/Alert.js.map +1 -1
- package/dist/components/app/mobile-card/MobileCardEntityRow.cjs +2 -2
- package/dist/components/app/mobile-card/MobileCardEntityRow.cjs.map +1 -1
- package/dist/components/app/mobile-card/MobileCardEntityRow.js +44 -25
- package/dist/components/app/mobile-card/MobileCardEntityRow.js.map +1 -1
- package/dist/components/app/mobile-card/MobileCardHeader.cjs +2 -2
- package/dist/components/app/mobile-card/MobileCardHeader.cjs.map +1 -1
- package/dist/components/app/mobile-card/MobileCardHeader.js +18 -20
- package/dist/components/app/mobile-card/MobileCardHeader.js.map +1 -1
- package/dist/components/app/mobile-card/MobileCardNotificationBadge.cjs +2 -2
- package/dist/components/app/mobile-card/MobileCardNotificationBadge.cjs.map +1 -1
- package/dist/components/app/mobile-card/MobileCardNotificationBadge.js +31 -13
- package/dist/components/app/mobile-card/MobileCardNotificationBadge.js.map +1 -1
- package/dist/components/app/mobile-card/MobileCardShell.cjs +2 -2
- package/dist/components/app/mobile-card/MobileCardShell.cjs.map +1 -1
- package/dist/components/app/mobile-card/MobileCardShell.js +17 -19
- package/dist/components/app/mobile-card/MobileCardShell.js.map +1 -1
- package/dist/components/app/mobile-card/MobileCardSkeleton.cjs +2 -2
- package/dist/components/app/mobile-card/MobileCardSkeleton.cjs.map +1 -1
- package/dist/components/app/mobile-card/MobileCardSkeleton.js +45 -22
- package/dist/components/app/mobile-card/MobileCardSkeleton.js.map +1 -1
- package/dist/components/app/mobile-navigation/MobileNavigation.cjs +2 -2
- package/dist/components/app/mobile-navigation/MobileNavigation.cjs.map +1 -1
- package/dist/components/app/mobile-navigation/MobileNavigation.d.ts +4 -5
- package/dist/components/app/mobile-navigation/MobileNavigation.js +16 -18
- package/dist/components/app/mobile-navigation/MobileNavigation.js.map +1 -1
- package/dist/components/app/navigation/AppNavigation.cjs +2 -2
- package/dist/components/app/navigation/AppNavigation.cjs.map +1 -1
- package/dist/components/app/navigation/AppNavigation.d.ts +11 -11
- package/dist/components/app/navigation/AppNavigation.js +35 -47
- package/dist/components/app/navigation/AppNavigation.js.map +1 -1
- package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.cjs +2 -2
- package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.cjs.map +1 -1
- package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.js +188 -119
- package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.js.map +1 -1
- package/dist/components/app/price-tag/PriceTag.cjs +2 -2
- package/dist/components/app/price-tag/PriceTag.cjs.map +1 -1
- package/dist/components/app/price-tag/PriceTag.js +25 -19
- package/dist/components/app/price-tag/PriceTag.js.map +1 -1
- package/dist/components/app/product-card-catalog/styled.cjs +2 -2
- package/dist/components/app/product-card-catalog/styled.cjs.map +1 -1
- package/dist/components/app/product-card-catalog/styled.js +23 -21
- package/dist/components/app/product-card-catalog/styled.js.map +1 -1
- package/dist/components/avatar/styled.cjs +2 -2
- package/dist/components/avatar/styled.cjs.map +1 -1
- package/dist/components/avatar/styled.d.ts +11 -7
- package/dist/components/avatar/styled.js +28 -27
- package/dist/components/avatar/styled.js.map +1 -1
- package/dist/components/box/Box.cjs +2 -2
- package/dist/components/box/Box.cjs.map +1 -1
- package/dist/components/box/Box.js +11 -10
- package/dist/components/box/Box.js.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.cjs +2 -2
- package/dist/components/breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts +6 -8
- package/dist/components/breadcrumb/Breadcrumb.js +39 -35
- package/dist/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/button/Button.cjs +2 -2
- package/dist/components/button/Button.cjs.map +1 -1
- package/dist/components/button/Button.d.ts +8 -4
- package/dist/components/button/Button.js +9 -8
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button-filter/ButtonFilter.cjs +2 -2
- package/dist/components/button-filter/ButtonFilter.cjs.map +1 -1
- package/dist/components/button-filter/ButtonFilter.d.ts +5 -4
- package/dist/components/button-filter/ButtonFilter.js +9 -8
- package/dist/components/button-filter/ButtonFilter.js.map +1 -1
- package/dist/components/chat/Chat.cjs +2 -2
- package/dist/components/chat/Chat.cjs.map +1 -1
- package/dist/components/chat/Chat.d.ts +15 -8
- package/dist/components/chat/Chat.js +27 -26
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/ChatDocumentMessage.cjs +2 -2
- package/dist/components/chat/ChatDocumentMessage.cjs.map +1 -1
- package/dist/components/chat/ChatDocumentMessage.js +32 -31
- package/dist/components/chat/ChatDocumentMessage.js.map +1 -1
- package/dist/components/chat/ChatMessage.cjs +2 -2
- package/dist/components/chat/ChatMessage.cjs.map +1 -1
- package/dist/components/chat/ChatMessage.d.ts +7 -4
- package/dist/components/chat/ChatMessage.js +8 -7
- package/dist/components/chat/ChatMessage.js.map +1 -1
- package/dist/components/chat/ChatProfileAvatar.cjs +2 -2
- package/dist/components/chat/ChatProfileAvatar.cjs.map +1 -1
- package/dist/components/chat/ChatProfileAvatar.js +24 -16
- package/dist/components/chat/ChatProfileAvatar.js.map +1 -1
- package/dist/components/chat/ChatTextInput.cjs +2 -2
- package/dist/components/chat/ChatTextInput.cjs.map +1 -1
- package/dist/components/chat/ChatTextInput.d.ts +2 -2
- package/dist/components/chat/ChatTextInput.js +44 -52
- package/dist/components/chat/ChatTextInput.js.map +1 -1
- package/dist/components/checkbox/Checkbox.cjs +2 -2
- package/dist/components/checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/checkbox/Checkbox.js +36 -34
- package/dist/components/checkbox/Checkbox.js.map +1 -1
- package/dist/components/checkbox-card/CheckboxCard.cjs +2 -2
- package/dist/components/checkbox-card/CheckboxCard.cjs.map +1 -1
- package/dist/components/checkbox-card/CheckboxCard.d.ts +2 -2
- package/dist/components/checkbox-card/CheckboxCard.js +33 -38
- package/dist/components/checkbox-card/CheckboxCard.js.map +1 -1
- package/dist/components/checkbox-card/namespace.cjs +2 -2
- package/dist/components/checkbox-card/namespace.cjs.map +1 -1
- package/dist/components/checkbox-card/namespace.js +14 -9
- package/dist/components/checkbox-card/namespace.js.map +1 -1
- package/dist/components/chip/Chip.cjs +2 -2
- package/dist/components/chip/Chip.cjs.map +1 -1
- package/dist/components/chip/Chip.d.ts +1 -1
- package/dist/components/chip/Chip.js +23 -23
- package/dist/components/chip/Chip.js.map +1 -1
- package/dist/components/collapsible/styled.cjs +2 -2
- package/dist/components/collapsible/styled.cjs.map +1 -1
- package/dist/components/collapsible/styled.js +15 -11
- package/dist/components/collapsible/styled.js.map +1 -1
- package/dist/components/combobox/Combobox.cjs +2 -2
- package/dist/components/combobox/Combobox.cjs.map +1 -1
- package/dist/components/combobox/Combobox.js +206 -173
- package/dist/components/combobox/Combobox.js.map +1 -1
- package/dist/components/date-picker/DatePicker.cjs +2 -2
- package/dist/components/date-picker/DatePicker.cjs.map +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +2 -2
- package/dist/components/date-picker/DatePicker.js +151 -127
- package/dist/components/date-picker/DatePicker.js.map +1 -1
- package/dist/components/dialog/styled.cjs +2 -2
- package/dist/components/dialog/styled.cjs.map +1 -1
- package/dist/components/dialog/styled.js +75 -65
- package/dist/components/dialog/styled.js.map +1 -1
- package/dist/components/drawer/Drawer.cjs +2 -2
- package/dist/components/drawer/Drawer.cjs.map +1 -1
- package/dist/components/drawer/Drawer.js +69 -63
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/flag/styled.cjs +2 -2
- package/dist/components/flag/styled.cjs.map +1 -1
- package/dist/components/flag/styled.d.ts +9 -7
- package/dist/components/flag/styled.js +8437 -3751
- package/dist/components/flag/styled.js.map +1 -1
- package/dist/components/form/FormControl.cjs +2 -2
- package/dist/components/form/FormControl.cjs.map +1 -1
- package/dist/components/form/FormControl.d.ts +3 -3
- package/dist/components/form/FormControl.js +13 -18
- package/dist/components/form/FormControl.js.map +1 -1
- package/dist/components/form/FormHelperText.cjs +2 -2
- package/dist/components/form/FormHelperText.cjs.map +1 -1
- package/dist/components/form/FormHelperText.d.ts +1 -1
- package/dist/components/form/FormHelperText.js +8 -9
- package/dist/components/form/FormHelperText.js.map +1 -1
- package/dist/components/form/FormLabel.cjs +2 -2
- package/dist/components/form/FormLabel.cjs.map +1 -1
- package/dist/components/form/FormLabel.d.ts +3 -3
- package/dist/components/form/FormLabel.js +38 -33
- package/dist/components/form/FormLabel.js.map +1 -1
- package/dist/components/heading/Heading.cjs +2 -2
- package/dist/components/heading/Heading.cjs.map +1 -1
- package/dist/components/heading/Heading.js +14 -10
- package/dist/components/heading/Heading.js.map +1 -1
- package/dist/components/icon/Icon.cjs +2 -2
- package/dist/components/icon/Icon.cjs.map +1 -1
- package/dist/components/icon/Icon.d.ts +2 -2
- package/dist/components/icon/Icon.js +15 -10
- package/dist/components/icon/Icon.js.map +1 -1
- package/dist/components/icon-button/IconButton.cjs +2 -2
- package/dist/components/icon-button/IconButton.cjs.map +1 -1
- package/dist/components/icon-button/IconButton.d.ts +2 -3
- package/dist/components/icon-button/IconButton.js +8 -7
- package/dist/components/icon-button/IconButton.js.map +1 -1
- package/dist/components/illustration/Illustration.cjs +2 -2
- package/dist/components/illustration/Illustration.cjs.map +1 -1
- package/dist/components/illustration/Illustration.js +35 -39
- package/dist/components/illustration/Illustration.js.map +1 -1
- package/dist/components/illustration/patterns.cjs +2 -2
- package/dist/components/illustration/patterns.cjs.map +1 -1
- package/dist/components/illustration/patterns.js +5563 -8897
- package/dist/components/illustration/patterns.js.map +1 -1
- package/dist/components/input/HighlightedInput.cjs +2 -2
- package/dist/components/input/HighlightedInput.cjs.map +1 -1
- package/dist/components/input/HighlightedInput.d.ts +13 -16
- package/dist/components/input/HighlightedInput.js +43 -58
- package/dist/components/input/HighlightedInput.js.map +1 -1
- package/dist/components/input/Input.cjs +2 -2
- package/dist/components/input/Input.cjs.map +1 -1
- package/dist/components/input/Input.d.ts +2 -3
- package/dist/components/input/Input.js +12 -13
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/input/InputAddon.cjs +2 -2
- package/dist/components/input/InputAddon.cjs.map +1 -1
- package/dist/components/input/InputAddon.d.ts +5 -4
- package/dist/components/input/InputAddon.js +8 -9
- package/dist/components/input/InputAddon.js.map +1 -1
- package/dist/components/input/InputGroup.cjs +2 -2
- package/dist/components/input/InputGroup.cjs.map +1 -1
- package/dist/components/input/InputGroup.d.ts +1 -1
- package/dist/components/input/InputGroup.js +8 -9
- package/dist/components/input/InputGroup.js.map +1 -1
- package/dist/components/input/PhoneNumberInput.cjs +2 -2
- package/dist/components/input/PhoneNumberInput.cjs.map +1 -1
- package/dist/components/input/PhoneNumberInput.js +21 -23
- package/dist/components/input/PhoneNumberInput.js.map +1 -1
- package/dist/components/menu/Menu.cjs +2 -2
- package/dist/components/menu/Menu.cjs.map +1 -1
- package/dist/components/menu/Menu.js +32 -28
- package/dist/components/menu/Menu.js.map +1 -1
- package/dist/components/pagination/Pagination.cjs +2 -2
- package/dist/components/pagination/Pagination.cjs.map +1 -1
- package/dist/components/pagination/Pagination.d.ts +1 -1
- package/dist/components/pagination/Pagination.js +76 -84
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/pagination/use-pagination.cjs +2 -2
- package/dist/components/pagination/use-pagination.cjs.map +1 -1
- package/dist/components/pagination/use-pagination.js +56 -54
- package/dist/components/pagination/use-pagination.js.map +1 -1
- package/dist/components/popover/Popover.cjs +2 -2
- package/dist/components/popover/Popover.cjs.map +1 -1
- package/dist/components/popover/Popover.js +21 -25
- package/dist/components/popover/Popover.js.map +1 -1
- package/dist/components/radio-button-group/RadioButtonGroup.cjs +2 -2
- package/dist/components/radio-button-group/RadioButtonGroup.cjs.map +1 -1
- package/dist/components/radio-button-group/RadioButtonGroup.js +20 -20
- package/dist/components/radio-button-group/RadioButtonGroup.js.map +1 -1
- package/dist/components/radio-card-group/RadioCardGroup.cjs +2 -2
- package/dist/components/radio-card-group/RadioCardGroup.cjs.map +1 -1
- package/dist/components/radio-card-group/RadioCardGroup.d.ts +2 -2
- package/dist/components/radio-card-group/RadioCardGroup.js +21 -22
- package/dist/components/radio-card-group/RadioCardGroup.js.map +1 -1
- package/dist/components/radio-card-group/namespace.cjs +2 -2
- package/dist/components/radio-card-group/namespace.cjs.map +1 -1
- package/dist/components/radio-card-group/namespace.js +15 -10
- package/dist/components/radio-card-group/namespace.js.map +1 -1
- package/dist/components/radio-group/RadioGroup.cjs +2 -2
- package/dist/components/radio-group/RadioGroup.cjs.map +1 -1
- package/dist/components/radio-group/RadioGroup.js +21 -21
- package/dist/components/radio-group/RadioGroup.js.map +1 -1
- package/dist/components/select/Select.cjs +2 -2
- package/dist/components/select/Select.cjs.map +1 -1
- package/dist/components/select/Select.js +194 -141
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select-language/SelectLanguage.cjs +2 -2
- package/dist/components/select-language/SelectLanguage.cjs.map +1 -1
- package/dist/components/select-language/SelectLanguage.js +114 -88
- package/dist/components/select-language/SelectLanguage.js.map +1 -1
- package/dist/components/status-tag-select/StatusTagSelect.cjs +2 -2
- package/dist/components/status-tag-select/StatusTagSelect.cjs.map +1 -1
- package/dist/components/status-tag-select/StatusTagSelect.js +93 -115
- package/dist/components/status-tag-select/StatusTagSelect.js.map +1 -1
- package/dist/components/switch/Switch.cjs +2 -2
- package/dist/components/switch/Switch.cjs.map +1 -1
- package/dist/components/switch/Switch.js +30 -18
- package/dist/components/switch/Switch.js.map +1 -1
- package/dist/components/switch-card/SwitchCard.cjs +2 -2
- package/dist/components/switch-card/SwitchCard.cjs.map +1 -1
- package/dist/components/switch-card/SwitchCard.d.ts +2 -2
- package/dist/components/switch-card/SwitchCard.js +28 -25
- package/dist/components/switch-card/SwitchCard.js.map +1 -1
- package/dist/components/switch-card/namespace.cjs +2 -2
- package/dist/components/switch-card/namespace.cjs.map +1 -1
- package/dist/components/switch-card/namespace.js +14 -9
- package/dist/components/switch-card/namespace.js.map +1 -1
- package/dist/components/table/Table.cjs +2 -2
- package/dist/components/table/Table.cjs.map +1 -1
- package/dist/components/table/Table.d.ts +12 -13
- package/dist/components/table/Table.js +133 -109
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/TableProvider.cjs +2 -2
- package/dist/components/table/TableProvider.cjs.map +1 -1
- package/dist/components/table/TableProvider.js +36 -39
- package/dist/components/table/TableProvider.js.map +1 -1
- package/dist/components/tabs/Tabs.cjs +2 -2
- package/dist/components/tabs/Tabs.cjs.map +1 -1
- package/dist/components/tabs/Tabs.d.ts +8 -4
- package/dist/components/tabs/Tabs.js +18 -26
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/tag/Tag.cjs +2 -2
- package/dist/components/tag/Tag.cjs.map +1 -1
- package/dist/components/tag/Tag.js +22 -16
- package/dist/components/tag/Tag.js.map +1 -1
- package/dist/components/text/Text.cjs +2 -2
- package/dist/components/text/Text.cjs.map +1 -1
- package/dist/components/text/Text.js +12 -11
- package/dist/components/text/Text.js.map +1 -1
- package/dist/components/textarea/Textarea.cjs +2 -2
- package/dist/components/textarea/Textarea.cjs.map +1 -1
- package/dist/components/textarea/Textarea.d.ts +6 -6
- package/dist/components/textarea/Textarea.js +9 -8
- package/dist/components/textarea/Textarea.js.map +1 -1
- package/dist/components/tooltip/Tooltip.cjs +2 -2
- package/dist/components/tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/tooltip/Tooltip.js +38 -42
- package/dist/components/tooltip/Tooltip.js.map +1 -1
- package/dist/icons/index.cjs +2 -2
- package/dist/icons/index.cjs.map +1 -1
- package/dist/icons/index.js +65 -58
- package/dist/icons/index.js.map +1 -1
- package/dist/index.cjs +1 -2
- package/dist/index.js +66 -191
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs +2 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs.map +1 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js +25 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js.map +1 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs +2 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs.map +1 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js +25 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js.map +1 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.cjs +2 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.cjs.map +1 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.js +25 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.js.map +1 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs +2 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs.map +1 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js +25 -0
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js.map +1 -0
- package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.cjs +2 -0
- package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.cjs.map +1 -0
- package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js +77 -0
- package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js.map +1 -0
- package/dist/preset.cjs +2 -2
- package/dist/preset.cjs.map +1 -1
- package/dist/preset.d.ts +1 -1
- package/dist/preset.js +30 -31
- package/dist/preset.js.map +1 -1
- package/dist/shared/ConditionalWrapper.cjs +2 -2
- package/dist/shared/ConditionalWrapper.cjs.map +1 -1
- package/dist/shared/ConditionalWrapper.js +6 -5
- package/dist/shared/ConditionalWrapper.js.map +1 -1
- package/dist/shared/assets/icons.cjs +2 -2
- package/dist/shared/assets/icons.cjs.map +1 -1
- package/dist/shared/assets/icons.js +30 -22
- package/dist/shared/assets/icons.js.map +1 -1
- package/dist/shared/hooks/useUncontrolled.cjs +2 -2
- package/dist/shared/hooks/useUncontrolled.cjs.map +1 -1
- package/dist/shared/hooks/useUncontrolled.js +19 -16
- package/dist/shared/hooks/useUncontrolled.js.map +1 -1
- package/dist/shared/utils/events.cjs +2 -2
- package/dist/shared/utils/events.cjs.map +1 -1
- package/dist/shared/utils/events.js +7 -6
- package/dist/shared/utils/events.js.map +1 -1
- package/dist/theme/breakpoints.cjs +2 -2
- package/dist/theme/breakpoints.cjs.map +1 -1
- package/dist/theme/breakpoints.js +10 -9
- package/dist/theme/breakpoints.js.map +1 -1
- package/dist/theme/conditions.cjs +2 -2
- package/dist/theme/conditions.cjs.map +1 -1
- package/dist/theme/conditions.js +23 -24
- package/dist/theme/conditions.js.map +1 -1
- package/dist/theme/containers.cjs +2 -2
- package/dist/theme/containers.cjs.map +1 -1
- package/dist/theme/containers.js +18 -17
- package/dist/theme/containers.js.map +1 -1
- package/dist/theme/globalCss.cjs +4 -4
- package/dist/theme/globalCss.cjs.map +1 -1
- package/dist/theme/globalCss.d.ts +1 -1
- package/dist/theme/globalCss.js +94 -99
- package/dist/theme/globalCss.js.map +1 -1
- package/dist/theme/keyframes.cjs +2 -2
- package/dist/theme/keyframes.cjs.map +1 -1
- package/dist/theme/keyframes.d.ts +1 -1
- package/dist/theme/keyframes.js +256 -171
- package/dist/theme/keyframes.js.map +1 -1
- package/dist/theme/recipes/accordion.cjs +2 -2
- package/dist/theme/recipes/accordion.cjs.map +1 -1
- package/dist/theme/recipes/accordion.d.ts +1 -1
- package/dist/theme/recipes/accordion.js +93 -110
- package/dist/theme/recipes/accordion.js.map +1 -1
- package/dist/theme/recipes/action-card.cjs +2 -2
- package/dist/theme/recipes/action-card.cjs.map +1 -1
- package/dist/theme/recipes/action-card.d.ts +1 -1
- package/dist/theme/recipes/action-card.js +88 -84
- package/dist/theme/recipes/action-card.js.map +1 -1
- package/dist/theme/recipes/alert.cjs +2 -2
- package/dist/theme/recipes/alert.cjs.map +1 -1
- package/dist/theme/recipes/alert.d.ts +1 -1
- package/dist/theme/recipes/alert.js +52 -65
- package/dist/theme/recipes/alert.js.map +1 -1
- package/dist/theme/recipes/app/mobile-navigation.cjs +2 -2
- package/dist/theme/recipes/app/mobile-navigation.cjs.map +1 -1
- package/dist/theme/recipes/app/mobile-navigation.d.ts +1 -1
- package/dist/theme/recipes/app/mobile-navigation.js +94 -108
- package/dist/theme/recipes/app/mobile-navigation.js.map +1 -1
- package/dist/theme/recipes/app/navigation-language-select.cjs +2 -2
- package/dist/theme/recipes/app/navigation-language-select.cjs.map +1 -1
- package/dist/theme/recipes/app/navigation-language-select.d.ts +1 -1
- package/dist/theme/recipes/app/navigation-language-select.js +135 -148
- package/dist/theme/recipes/app/navigation-language-select.js.map +1 -1
- package/dist/theme/recipes/app/navigation.cjs +2 -2
- package/dist/theme/recipes/app/navigation.cjs.map +1 -1
- package/dist/theme/recipes/app/navigation.d.ts +1 -1
- package/dist/theme/recipes/app/navigation.js +214 -269
- package/dist/theme/recipes/app/navigation.js.map +1 -1
- package/dist/theme/recipes/app/price-tag.cjs +2 -2
- package/dist/theme/recipes/app/price-tag.cjs.map +1 -1
- package/dist/theme/recipes/app/price-tag.d.ts +1 -1
- package/dist/theme/recipes/app/price-tag.js +59 -70
- package/dist/theme/recipes/app/price-tag.js.map +1 -1
- package/dist/theme/recipes/app/product-card-catalog.cjs +2 -2
- package/dist/theme/recipes/app/product-card-catalog.cjs.map +1 -1
- package/dist/theme/recipes/app/product-card-catalog.d.ts +1 -1
- package/dist/theme/recipes/app/product-card-catalog.js +189 -194
- package/dist/theme/recipes/app/product-card-catalog.js.map +1 -1
- package/dist/theme/recipes/avatar-group.cjs +2 -2
- package/dist/theme/recipes/avatar-group.cjs.map +1 -1
- package/dist/theme/recipes/avatar-group.d.ts +1 -1
- package/dist/theme/recipes/avatar-group.js +27 -38
- package/dist/theme/recipes/avatar-group.js.map +1 -1
- package/dist/theme/recipes/avatar.cjs +2 -2
- package/dist/theme/recipes/avatar.cjs.map +1 -1
- package/dist/theme/recipes/avatar.d.ts +1 -1
- package/dist/theme/recipes/avatar.js +97 -95
- package/dist/theme/recipes/avatar.js.map +1 -1
- package/dist/theme/recipes/breadcrumb.cjs +2 -2
- package/dist/theme/recipes/breadcrumb.cjs.map +1 -1
- package/dist/theme/recipes/breadcrumb.d.ts +1 -1
- package/dist/theme/recipes/breadcrumb.js +35 -31
- package/dist/theme/recipes/breadcrumb.js.map +1 -1
- package/dist/theme/recipes/button-filter.cjs +2 -2
- package/dist/theme/recipes/button-filter.cjs.map +1 -1
- package/dist/theme/recipes/button-filter.d.ts +1 -1
- package/dist/theme/recipes/button-filter.js +57 -60
- package/dist/theme/recipes/button-filter.js.map +1 -1
- package/dist/theme/recipes/button.cjs +2 -2
- package/dist/theme/recipes/button.cjs.map +1 -1
- package/dist/theme/recipes/button.d.ts +1 -1
- package/dist/theme/recipes/button.js +287 -295
- package/dist/theme/recipes/button.js.map +1 -1
- package/dist/theme/recipes/chat/chat-document-message.cjs +2 -2
- package/dist/theme/recipes/chat/chat-document-message.cjs.map +1 -1
- package/dist/theme/recipes/chat/chat-document-message.d.ts +1 -1
- package/dist/theme/recipes/chat/chat-document-message.js +38 -43
- package/dist/theme/recipes/chat/chat-document-message.js.map +1 -1
- package/dist/theme/recipes/chat/chat-input-text.cjs +2 -2
- package/dist/theme/recipes/chat/chat-input-text.cjs.map +1 -1
- package/dist/theme/recipes/chat/chat-input-text.d.ts +1 -1
- package/dist/theme/recipes/chat/chat-input-text.js +26 -27
- package/dist/theme/recipes/chat/chat-input-text.js.map +1 -1
- package/dist/theme/recipes/chat/chat-message.cjs +2 -2
- package/dist/theme/recipes/chat/chat-message.cjs.map +1 -1
- package/dist/theme/recipes/chat/chat-message.d.ts +1 -1
- package/dist/theme/recipes/chat/chat-message.js +49 -45
- package/dist/theme/recipes/chat/chat-message.js.map +1 -1
- package/dist/theme/recipes/chat/chat-profile-avatar.cjs +2 -2
- package/dist/theme/recipes/chat/chat-profile-avatar.cjs.map +1 -1
- package/dist/theme/recipes/chat/chat-profile-avatar.d.ts +1 -1
- package/dist/theme/recipes/chat/chat-profile-avatar.js +20 -25
- package/dist/theme/recipes/chat/chat-profile-avatar.js.map +1 -1
- package/dist/theme/recipes/chat/chat.cjs +2 -2
- package/dist/theme/recipes/chat/chat.cjs.map +1 -1
- package/dist/theme/recipes/chat/chat.d.ts +1 -1
- package/dist/theme/recipes/chat/chat.js +51 -56
- package/dist/theme/recipes/chat/chat.js.map +1 -1
- package/dist/theme/recipes/checkbox-card.cjs +2 -2
- package/dist/theme/recipes/checkbox-card.cjs.map +1 -1
- package/dist/theme/recipes/checkbox-card.js +44 -40
- package/dist/theme/recipes/checkbox-card.js.map +1 -1
- package/dist/theme/recipes/checkbox-group.cjs +2 -2
- package/dist/theme/recipes/checkbox-group.cjs.map +1 -1
- package/dist/theme/recipes/checkbox-group.d.ts +1 -1
- package/dist/theme/recipes/checkbox-group.js +13 -12
- package/dist/theme/recipes/checkbox-group.js.map +1 -1
- package/dist/theme/recipes/checkbox.cjs +2 -2
- package/dist/theme/recipes/checkbox.cjs.map +1 -1
- package/dist/theme/recipes/checkbox.d.ts +1 -1
- package/dist/theme/recipes/checkbox.js +110 -129
- package/dist/theme/recipes/checkbox.js.map +1 -1
- package/dist/theme/recipes/chip.cjs +2 -2
- package/dist/theme/recipes/chip.cjs.map +1 -1
- package/dist/theme/recipes/chip.d.ts +1 -1
- package/dist/theme/recipes/chip.js +144 -182
- package/dist/theme/recipes/chip.js.map +1 -1
- package/dist/theme/recipes/collapsible.cjs +2 -2
- package/dist/theme/recipes/collapsible.cjs.map +1 -1
- package/dist/theme/recipes/collapsible.d.ts +1 -1
- package/dist/theme/recipes/collapsible.js +30 -28
- package/dist/theme/recipes/collapsible.js.map +1 -1
- package/dist/theme/recipes/combobox.cjs +2 -2
- package/dist/theme/recipes/combobox.cjs.map +1 -1
- package/dist/theme/recipes/combobox.d.ts +1 -1
- package/dist/theme/recipes/combobox.js +149 -176
- package/dist/theme/recipes/combobox.js.map +1 -1
- package/dist/theme/recipes/common/group-card.cjs +2 -2
- package/dist/theme/recipes/common/group-card.cjs.map +1 -1
- package/dist/theme/recipes/common/group-card.js +60 -80
- package/dist/theme/recipes/common/group-card.js.map +1 -1
- package/dist/theme/recipes/datepicker.cjs +2 -2
- package/dist/theme/recipes/datepicker.cjs.map +1 -1
- package/dist/theme/recipes/datepicker.d.ts +1 -1
- package/dist/theme/recipes/datepicker.js +149 -176
- package/dist/theme/recipes/datepicker.js.map +1 -1
- package/dist/theme/recipes/dialog.cjs +2 -2
- package/dist/theme/recipes/dialog.cjs.map +1 -1
- package/dist/theme/recipes/dialog.d.ts +1 -1
- package/dist/theme/recipes/dialog.js +137 -151
- package/dist/theme/recipes/dialog.js.map +1 -1
- package/dist/theme/recipes/drawer.cjs +2 -2
- package/dist/theme/recipes/drawer.cjs.map +1 -1
- package/dist/theme/recipes/drawer.d.ts +1 -1
- package/dist/theme/recipes/drawer.js +105 -125
- package/dist/theme/recipes/drawer.js.map +1 -1
- package/dist/theme/recipes/flag.cjs +2 -2
- package/dist/theme/recipes/flag.cjs.map +1 -1
- package/dist/theme/recipes/flag.d.ts +1 -1
- package/dist/theme/recipes/flag.js +21 -30
- package/dist/theme/recipes/flag.js.map +1 -1
- package/dist/theme/recipes/form/control.cjs +2 -2
- package/dist/theme/recipes/form/control.cjs.map +1 -1
- package/dist/theme/recipes/form/control.d.ts +1 -1
- package/dist/theme/recipes/form/control.js +27 -34
- package/dist/theme/recipes/form/control.js.map +1 -1
- package/dist/theme/recipes/form/helper-text.cjs +2 -2
- package/dist/theme/recipes/form/helper-text.cjs.map +1 -1
- package/dist/theme/recipes/form/helper-text.d.ts +1 -1
- package/dist/theme/recipes/form/helper-text.js +14 -13
- package/dist/theme/recipes/form/helper-text.js.map +1 -1
- package/dist/theme/recipes/form/label.cjs +2 -2
- package/dist/theme/recipes/form/label.cjs.map +1 -1
- package/dist/theme/recipes/form/label.d.ts +1 -1
- package/dist/theme/recipes/form/label.js +47 -48
- package/dist/theme/recipes/form/label.js.map +1 -1
- package/dist/theme/recipes/heading.cjs +2 -2
- package/dist/theme/recipes/heading.cjs.map +1 -1
- package/dist/theme/recipes/heading.d.ts +1 -1
- package/dist/theme/recipes/heading.js +25 -34
- package/dist/theme/recipes/heading.js.map +1 -1
- package/dist/theme/recipes/highlightedInput.cjs +2 -2
- package/dist/theme/recipes/highlightedInput.cjs.map +1 -1
- package/dist/theme/recipes/highlightedInput.d.ts +1 -1
- package/dist/theme/recipes/highlightedInput.js +54 -45
- package/dist/theme/recipes/highlightedInput.js.map +1 -1
- package/dist/theme/recipes/icon-button.cjs +2 -2
- package/dist/theme/recipes/icon-button.cjs.map +1 -1
- package/dist/theme/recipes/icon-button.js +81 -89
- package/dist/theme/recipes/icon-button.js.map +1 -1
- package/dist/theme/recipes/icon.cjs +2 -2
- package/dist/theme/recipes/icon.cjs.map +1 -1
- package/dist/theme/recipes/icon.d.ts +1 -1
- package/dist/theme/recipes/icon.js +39 -42
- package/dist/theme/recipes/icon.js.map +1 -1
- package/dist/theme/recipes/illustration.cjs +2 -2
- package/dist/theme/recipes/illustration.cjs.map +1 -1
- package/dist/theme/recipes/illustration.d.ts +1 -1
- package/dist/theme/recipes/illustration.js +29 -48
- package/dist/theme/recipes/illustration.js.map +1 -1
- package/dist/theme/recipes/index.cjs +2 -2
- package/dist/theme/recipes/index.cjs.map +1 -1
- package/dist/theme/recipes/index.d.ts +1 -1
- package/dist/theme/recipes/index.js +127 -127
- package/dist/theme/recipes/index.js.map +1 -1
- package/dist/theme/recipes/input-addon.cjs +2 -2
- package/dist/theme/recipes/input-addon.cjs.map +1 -1
- package/dist/theme/recipes/input-addon.d.ts +1 -1
- package/dist/theme/recipes/input-addon.js +24 -24
- package/dist/theme/recipes/input-addon.js.map +1 -1
- package/dist/theme/recipes/input-group.cjs +2 -2
- package/dist/theme/recipes/input-group.cjs.map +1 -1
- package/dist/theme/recipes/input-group.d.ts +1 -1
- package/dist/theme/recipes/input-group.js +40 -49
- package/dist/theme/recipes/input-group.js.map +1 -1
- package/dist/theme/recipes/input.cjs +2 -2
- package/dist/theme/recipes/input.cjs.map +1 -1
- package/dist/theme/recipes/input.d.ts +1 -1
- package/dist/theme/recipes/input.js +48 -61
- package/dist/theme/recipes/input.js.map +1 -1
- package/dist/theme/recipes/menu.cjs +2 -2
- package/dist/theme/recipes/menu.cjs.map +1 -1
- package/dist/theme/recipes/menu.d.ts +1 -1
- package/dist/theme/recipes/menu.js +96 -100
- package/dist/theme/recipes/menu.js.map +1 -1
- package/dist/theme/recipes/pagination.cjs +2 -2
- package/dist/theme/recipes/pagination.cjs.map +1 -1
- package/dist/theme/recipes/pagination.d.ts +1 -1
- package/dist/theme/recipes/pagination.js +76 -71
- package/dist/theme/recipes/pagination.js.map +1 -1
- package/dist/theme/recipes/phone-number-input.cjs +2 -2
- package/dist/theme/recipes/phone-number-input.cjs.map +1 -1
- package/dist/theme/recipes/phone-number-input.d.ts +1 -1
- package/dist/theme/recipes/phone-number-input.js +55 -66
- package/dist/theme/recipes/phone-number-input.js.map +1 -1
- package/dist/theme/recipes/popover.cjs +2 -2
- package/dist/theme/recipes/popover.cjs.map +1 -1
- package/dist/theme/recipes/popover.d.ts +1 -1
- package/dist/theme/recipes/popover.js +30 -28
- package/dist/theme/recipes/popover.js.map +1 -1
- package/dist/theme/recipes/radio-button-group.cjs +2 -2
- package/dist/theme/recipes/radio-button-group.cjs.map +1 -1
- package/dist/theme/recipes/radio-button-group.d.ts +1 -1
- package/dist/theme/recipes/radio-button-group.js +83 -94
- package/dist/theme/recipes/radio-button-group.js.map +1 -1
- package/dist/theme/recipes/radio-card-group.cjs +2 -2
- package/dist/theme/recipes/radio-card-group.cjs.map +1 -1
- package/dist/theme/recipes/radio-card-group.d.ts +1 -1
- package/dist/theme/recipes/radio-card-group.js +64 -67
- package/dist/theme/recipes/radio-card-group.js.map +1 -1
- package/dist/theme/recipes/radio-group.cjs +2 -2
- package/dist/theme/recipes/radio-group.cjs.map +1 -1
- package/dist/theme/recipes/radio-group.d.ts +1 -1
- package/dist/theme/recipes/radio-group.js +101 -118
- package/dist/theme/recipes/radio-group.js.map +1 -1
- package/dist/theme/recipes/select-language.cjs +2 -2
- package/dist/theme/recipes/select-language.cjs.map +1 -1
- package/dist/theme/recipes/select-language.d.ts +1 -1
- package/dist/theme/recipes/select-language.js +93 -112
- package/dist/theme/recipes/select-language.js.map +1 -1
- package/dist/theme/recipes/select.cjs +2 -2
- package/dist/theme/recipes/select.cjs.map +1 -1
- package/dist/theme/recipes/select.d.ts +1 -1
- package/dist/theme/recipes/select.js +194 -206
- package/dist/theme/recipes/select.js.map +1 -1
- package/dist/theme/recipes/status-tag-select.cjs +2 -2
- package/dist/theme/recipes/status-tag-select.cjs.map +1 -1
- package/dist/theme/recipes/status-tag-select.d.ts +1 -1
- package/dist/theme/recipes/status-tag-select.js +162 -175
- package/dist/theme/recipes/status-tag-select.js.map +1 -1
- package/dist/theme/recipes/switch-card.cjs +2 -2
- package/dist/theme/recipes/switch-card.cjs.map +1 -1
- package/dist/theme/recipes/switch-card.js +43 -42
- package/dist/theme/recipes/switch-card.js.map +1 -1
- package/dist/theme/recipes/switch.cjs +2 -2
- package/dist/theme/recipes/switch.cjs.map +1 -1
- package/dist/theme/recipes/switch.d.ts +1 -1
- package/dist/theme/recipes/switch.js +71 -86
- package/dist/theme/recipes/switch.js.map +1 -1
- package/dist/theme/recipes/table-container.cjs +2 -2
- package/dist/theme/recipes/table-container.cjs.map +1 -1
- package/dist/theme/recipes/table-container.d.ts +1 -1
- package/dist/theme/recipes/table-container.js +19 -18
- package/dist/theme/recipes/table-container.js.map +1 -1
- package/dist/theme/recipes/table-empty-row.cjs +2 -2
- package/dist/theme/recipes/table-empty-row.cjs.map +1 -1
- package/dist/theme/recipes/table-empty-row.d.ts +1 -1
- package/dist/theme/recipes/table-empty-row.js +17 -16
- package/dist/theme/recipes/table-empty-row.js.map +1 -1
- package/dist/theme/recipes/table-group-title.cjs +2 -2
- package/dist/theme/recipes/table-group-title.cjs.map +1 -1
- package/dist/theme/recipes/table-group-title.d.ts +1 -1
- package/dist/theme/recipes/table-group-title.js +26 -33
- package/dist/theme/recipes/table-group-title.js.map +1 -1
- package/dist/theme/recipes/table.cjs +2 -2
- package/dist/theme/recipes/table.cjs.map +1 -1
- package/dist/theme/recipes/table.d.ts +1 -1
- package/dist/theme/recipes/table.js +111 -109
- package/dist/theme/recipes/table.js.map +1 -1
- package/dist/theme/recipes/tabs-chip.cjs +2 -2
- package/dist/theme/recipes/tabs-chip.cjs.map +1 -1
- package/dist/theme/recipes/tabs-chip.d.ts +1 -1
- package/dist/theme/recipes/tabs-chip.js +43 -46
- package/dist/theme/recipes/tabs-chip.js.map +1 -1
- package/dist/theme/recipes/tabs.cjs +2 -2
- package/dist/theme/recipes/tabs.cjs.map +1 -1
- package/dist/theme/recipes/tabs.d.ts +1 -1
- package/dist/theme/recipes/tabs.js +92 -125
- package/dist/theme/recipes/tabs.js.map +1 -1
- package/dist/theme/recipes/tag.cjs +2 -2
- package/dist/theme/recipes/tag.cjs.map +1 -1
- package/dist/theme/recipes/tag.d.ts +1 -1
- package/dist/theme/recipes/tag.js +110 -121
- package/dist/theme/recipes/tag.js.map +1 -1
- package/dist/theme/recipes/text.cjs +2 -2
- package/dist/theme/recipes/text.cjs.map +1 -1
- package/dist/theme/recipes/text.d.ts +1 -1
- package/dist/theme/recipes/text.js +25 -38
- package/dist/theme/recipes/text.js.map +1 -1
- package/dist/theme/recipes/textarea.cjs +2 -2
- package/dist/theme/recipes/textarea.cjs.map +1 -1
- package/dist/theme/recipes/textarea.d.ts +1 -1
- package/dist/theme/recipes/textarea.js +15 -14
- package/dist/theme/recipes/textarea.js.map +1 -1
- package/dist/theme/recipes/tooltip.cjs +2 -2
- package/dist/theme/recipes/tooltip.cjs.map +1 -1
- package/dist/theme/recipes/tooltip.d.ts +1 -1
- package/dist/theme/recipes/tooltip.js +47 -62
- package/dist/theme/recipes/tooltip.js.map +1 -1
- package/dist/theme/semantic-tokens/colors.cjs +2 -2
- package/dist/theme/semantic-tokens/colors.cjs.map +1 -1
- package/dist/theme/semantic-tokens/colors.js +189 -140
- package/dist/theme/semantic-tokens/colors.js.map +1 -1
- package/dist/theme/semantic-tokens/index.cjs +2 -2
- package/dist/theme/semantic-tokens/index.cjs.map +1 -1
- package/dist/theme/semantic-tokens/index.js +7 -8
- package/dist/theme/semantic-tokens/index.js.map +1 -1
- package/dist/theme/text-styles.cjs +2 -2
- package/dist/theme/text-styles.cjs.map +1 -1
- package/dist/theme/text-styles.d.ts +1 -1
- package/dist/theme/text-styles.js +70 -87
- package/dist/theme/text-styles.js.map +1 -1
- package/dist/theme/tokens/animations.cjs +2 -2
- package/dist/theme/tokens/animations.cjs.map +1 -1
- package/dist/theme/tokens/animations.js +22 -45
- package/dist/theme/tokens/animations.js.map +1 -1
- package/dist/theme/tokens/aspect-ratios.cjs +2 -2
- package/dist/theme/tokens/aspect-ratios.cjs.map +1 -1
- package/dist/theme/tokens/aspect-ratios.js +12 -11
- package/dist/theme/tokens/aspect-ratios.js.map +1 -1
- package/dist/theme/tokens/blurs.cjs +2 -2
- package/dist/theme/tokens/blurs.cjs.map +1 -1
- package/dist/theme/tokens/blurs.js +13 -12
- package/dist/theme/tokens/blurs.js.map +1 -1
- package/dist/theme/tokens/borders.cjs +2 -2
- package/dist/theme/tokens/borders.cjs.map +1 -1
- package/dist/theme/tokens/borders.js +6 -9
- package/dist/theme/tokens/borders.js.map +1 -1
- package/dist/theme/tokens/colors.cjs +2 -2
- package/dist/theme/tokens/colors.cjs.map +1 -1
- package/dist/theme/tokens/colors.js +78 -77
- package/dist/theme/tokens/colors.js.map +1 -1
- package/dist/theme/tokens/durations.cjs +2 -2
- package/dist/theme/tokens/durations.cjs.map +1 -1
- package/dist/theme/tokens/durations.js +14 -13
- package/dist/theme/tokens/durations.js.map +1 -1
- package/dist/theme/tokens/easings.cjs +3 -3
- package/dist/theme/tokens/easings.cjs.map +1 -1
- package/dist/theme/tokens/easings.js +24 -92
- package/dist/theme/tokens/easings.js.map +1 -1
- package/dist/theme/tokens/index.cjs +2 -2
- package/dist/theme/tokens/index.cjs.map +1 -1
- package/dist/theme/tokens/index.js +36 -35
- package/dist/theme/tokens/index.js.map +1 -1
- package/dist/theme/tokens/radii.cjs +2 -2
- package/dist/theme/tokens/radii.cjs.map +1 -1
- package/dist/theme/tokens/radii.js +28 -27
- package/dist/theme/tokens/radii.js.map +1 -1
- package/dist/theme/tokens/shadows.cjs +2 -2
- package/dist/theme/tokens/shadows.cjs.map +1 -1
- package/dist/theme/tokens/shadows.js +14 -13
- package/dist/theme/tokens/shadows.js.map +1 -1
- package/dist/theme/tokens/sizes.cjs +2 -2
- package/dist/theme/tokens/sizes.cjs.map +1 -1
- package/dist/theme/tokens/sizes.js +35 -84
- package/dist/theme/tokens/sizes.js.map +1 -1
- package/dist/theme/tokens/spacing.cjs +2 -2
- package/dist/theme/tokens/spacing.cjs.map +1 -1
- package/dist/theme/tokens/spacing.js +32 -83
- package/dist/theme/tokens/spacing.js.map +1 -1
- package/dist/theme/tokens/typography.cjs +2 -2
- package/dist/theme/tokens/typography.cjs.map +1 -1
- package/dist/theme/tokens/typography.js +82 -85
- package/dist/theme/tokens/typography.js.map +1 -1
- package/dist/theme/tokens/z-index.cjs +2 -2
- package/dist/theme/tokens/z-index.cjs.map +1 -1
- package/dist/theme/tokens/z-index.js +18 -41
- package/dist/theme/tokens/z-index.js.map +1 -1
- package/dist/theme/utilities.cjs +2 -2
- package/dist/theme/utilities.cjs.map +1 -1
- package/dist/theme/utilities.js +15 -16
- package/dist/theme/utilities.js.map +1 -1
- package/dist/ui.css +2 -1
- package/dist/utils/slots.cjs +2 -2
- package/dist/utils/slots.cjs.map +1 -1
- package/dist/utils/slots.js +42 -40
- package/dist/utils/slots.js.map +1 -1
- package/package.json +11 -7
- package/dist/_virtual/_commonjsHelpers.cjs +0 -2
- package/dist/_virtual/_commonjsHelpers.cjs.map +0 -1
- package/dist/_virtual/_commonjsHelpers.js +0 -10
- package/dist/_virtual/_commonjsHelpers.js.map +0 -1
- package/dist/_virtual/cjs.cjs +0 -2
- package/dist/_virtual/cjs.cjs.map +0 -1
- package/dist/_virtual/cjs.js +0 -9
- package/dist/_virtual/cjs.js.map +0 -1
- package/dist/_virtual/lodash.cjs +0 -2
- package/dist/_virtual/lodash.cjs.map +0 -1
- package/dist/_virtual/lodash.js +0 -7
- package/dist/_virtual/lodash.js.map +0 -1
- package/dist/_virtual/lodash2.cjs +0 -2
- package/dist/_virtual/lodash2.cjs.map +0 -1
- package/dist/_virtual/lodash2.js +0 -6
- package/dist/_virtual/lodash2.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs +0 -2
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js +0 -30
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs +0 -2
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js +0 -30
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.cjs +0 -2
- package/dist/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.cjs.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.js +0 -30
- package/dist/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.js.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs +0 -2
- package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js +0 -30
- package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js.map +0 -1
- package/dist/node_modules/@pandacss/shared/dist/index.cjs +0 -2
- package/dist/node_modules/@pandacss/shared/dist/index.cjs.map +0 -1
- package/dist/node_modules/@pandacss/shared/dist/index.js +0 -469
- package/dist/node_modules/@pandacss/shared/dist/index.js.map +0 -1
- package/dist/node_modules/@zag-js/utils/dist/functions.cjs +0 -2
- package/dist/node_modules/@zag-js/utils/dist/functions.cjs.map +0 -1
- package/dist/node_modules/@zag-js/utils/dist/functions.js +0 -6
- package/dist/node_modules/@zag-js/utils/dist/functions.js.map +0 -1
- package/dist/node_modules/deepmerge/dist/cjs.cjs +0 -2
- package/dist/node_modules/deepmerge/dist/cjs.cjs.map +0 -1
- package/dist/node_modules/deepmerge/dist/cjs.js +0 -81
- package/dist/node_modules/deepmerge/dist/cjs.js.map +0 -1
- package/dist/node_modules/lodash/lodash.cjs +0 -21
- package/dist/node_modules/lodash/lodash.cjs.map +0 -1
- package/dist/node_modules/lodash/lodash.js +0 -3686
- package/dist/node_modules/lodash/lodash.js.map +0 -1
|
@@ -1,113 +1,137 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { createStyleContext as e } from "../../utils/slots.js";
|
|
3
|
+
import { TableProvider as t, useTable as n } from "./TableProvider.js";
|
|
4
4
|
import { styled as r } from "@stokelp/styled-system/jsx";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
5
|
+
import { table as i, tableContainer as a, tableEmptyRow as o, tableGroupTitle as s } from "@stokelp/styled-system/recipes";
|
|
6
|
+
import { forwardRef as c, useLayoutEffect as l, useRef as u } from "react";
|
|
7
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/table/Table.tsx
|
|
9
|
+
var { withProvider: p, withContext: m } = e(i), h = r("div", a), g = p(r("table"), "root"), _ = c(({ children: e, onSortChange: n, descriptor: r, ...i }, a) => /* @__PURE__ */ d(t, {
|
|
10
|
+
descriptor: r,
|
|
11
|
+
onSortChange: n,
|
|
12
|
+
children: /* @__PURE__ */ d(g, {
|
|
13
|
+
ref: a,
|
|
14
|
+
...i,
|
|
15
|
+
children: e
|
|
16
|
+
})
|
|
17
|
+
}));
|
|
18
|
+
_.displayName = "Table";
|
|
19
|
+
var v = m(r("thead"), "thead"), y = m(r("div"), "sortIndicatorRoot"), b = m(r("svg"), "sortIndicator"), x = m(r("tbody"), "tbody"), S = m(r("tr"), "tr"), C = m(r("th"), "th"), w = c(({ children: e, addon: t, sortKey: r, onClick: i, ...a }, o) => {
|
|
20
|
+
let { dispatch: s, sortDescriptor: c } = n(), l = (e) => {
|
|
21
|
+
r && (c === null ? s({
|
|
22
|
+
type: "UPDATE_SORT_DESCRIPTOR",
|
|
23
|
+
payload: {
|
|
24
|
+
key: r,
|
|
25
|
+
direction: "asc"
|
|
26
|
+
}
|
|
27
|
+
}) : c.key === r ? c.direction === "asc" ? s({
|
|
28
|
+
type: "UPDATE_SORT_DESCRIPTOR",
|
|
29
|
+
payload: {
|
|
30
|
+
key: r,
|
|
31
|
+
direction: "desc"
|
|
32
|
+
}
|
|
33
|
+
}) : s({ type: "CLEAR_SORT_DESCRIPTOR" }) : s({
|
|
34
|
+
type: "UPDATE_SORT_DESCRIPTOR",
|
|
35
|
+
payload: {
|
|
36
|
+
key: r,
|
|
37
|
+
direction: "asc"
|
|
38
|
+
}
|
|
39
|
+
})), i?.(e);
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ f(C, {
|
|
42
|
+
ref: o,
|
|
43
|
+
...a,
|
|
44
|
+
...r ? { "data-sortable": !0 } : {},
|
|
45
|
+
role: "group",
|
|
46
|
+
onClick: l,
|
|
47
|
+
children: [
|
|
48
|
+
e,
|
|
49
|
+
t ? /* @__PURE__ */ f("span", {
|
|
50
|
+
className: "th__addon",
|
|
51
|
+
children: ["\xA0", t]
|
|
52
|
+
}) : null,
|
|
53
|
+
c && c.key === r ? /* @__PURE__ */ f(y, {
|
|
54
|
+
"data-state": "active",
|
|
55
|
+
children: [/* @__PURE__ */ d(b, {
|
|
56
|
+
"data-active": c.direction === "asc" ? !0 : void 0,
|
|
57
|
+
viewBox: "0 0 8 8",
|
|
58
|
+
fill: "none",
|
|
59
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
60
|
+
children: /* @__PURE__ */ d("path", {
|
|
61
|
+
d: "M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z",
|
|
62
|
+
fill: "currentColor"
|
|
63
|
+
})
|
|
64
|
+
}), /* @__PURE__ */ d(b, {
|
|
65
|
+
"data-active": c.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__ */ d("path", {
|
|
70
|
+
d: "M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z",
|
|
71
|
+
fill: "currentColor"
|
|
72
|
+
})
|
|
73
|
+
})]
|
|
74
|
+
}) : r ? /* @__PURE__ */ f(y, {
|
|
75
|
+
"data-state": "idle",
|
|
76
|
+
children: [/* @__PURE__ */ d(b, {
|
|
77
|
+
"data-active": !0,
|
|
78
|
+
viewBox: "0 0 8 8",
|
|
79
|
+
fill: "none",
|
|
80
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
81
|
+
children: /* @__PURE__ */ d("path", {
|
|
82
|
+
d: "M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z",
|
|
83
|
+
fill: "currentColor"
|
|
84
|
+
})
|
|
85
|
+
}), /* @__PURE__ */ d(b, {
|
|
86
|
+
"data-active": !0,
|
|
87
|
+
viewBox: "0 0 8 8",
|
|
88
|
+
fill: "none",
|
|
89
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
90
|
+
children: /* @__PURE__ */ d("path", {
|
|
91
|
+
d: "M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z",
|
|
92
|
+
fill: "currentColor"
|
|
93
|
+
})
|
|
94
|
+
})]
|
|
95
|
+
}) : null
|
|
96
|
+
]
|
|
97
|
+
});
|
|
90
98
|
});
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
w.displayName = "Th";
|
|
100
|
+
var T = m(r("td"), "td"), E = r("td", s), D = c((e, t) => {
|
|
101
|
+
let n = u(null);
|
|
102
|
+
return l(() => {
|
|
103
|
+
if (n.current) {
|
|
104
|
+
let e = n.current?.closest("table")?.querySelector("thead > tr");
|
|
105
|
+
e && n.current.setAttribute("colspan", e.children.length.toString());
|
|
106
|
+
}
|
|
107
|
+
}, []), /* @__PURE__ */ d("tr", {
|
|
108
|
+
ref: t,
|
|
109
|
+
className: "table_tr__group__title",
|
|
110
|
+
children: /* @__PURE__ */ d(E, {
|
|
111
|
+
ref: n,
|
|
112
|
+
...e
|
|
113
|
+
})
|
|
114
|
+
});
|
|
100
115
|
});
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
D.displayName = "TableGroupTitle";
|
|
117
|
+
var O = r("td", o), k = c((e, t) => {
|
|
118
|
+
let n = u(null);
|
|
119
|
+
return l(() => {
|
|
120
|
+
if (n.current) {
|
|
121
|
+
let e = n.current?.closest("table")?.querySelector("thead > tr");
|
|
122
|
+
e && n.current.setAttribute("colspan", e.children.length.toString());
|
|
123
|
+
}
|
|
124
|
+
}, []), /* @__PURE__ */ d("tr", {
|
|
125
|
+
ref: t,
|
|
126
|
+
className: "table_tr__empty",
|
|
127
|
+
children: /* @__PURE__ */ d(O, {
|
|
128
|
+
ref: n,
|
|
129
|
+
...e
|
|
130
|
+
})
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
k.displayName = "TableEmptyRow";
|
|
134
|
+
//#endregion
|
|
135
|
+
export { _ as Table, h as TableContainer, k as TableEmptyRow, D as TableGroupTitle, x as Tbody, T as Td, w as Th, v as Thead, S as Tr };
|
|
136
|
+
|
|
137
|
+
//# sourceMappingURL=Table.js.map
|
|
@@ -1 +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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"}
|
|
1
|
+
{"version":3,"file":"Table.js","names":[],"sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import type { ComponentProps, ElementRef, FC, MouseEvent, 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 type TableProps = 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 type ThProps = 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 = (e: MouseEvent<HTMLTableCellElement>) => {\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"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
//# sourceMappingURL=TableProvider.cjs.map
|
|
1
|
+
"use client";let e=require("react"),t=require("react/jsx-runtime");var n=(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}},r=(0,e.createContext)(void 0),i=()=>{let t=(0,e.useContext)(r);if(!t)throw Error(`useTable must be used within a <TableProvider/>`);return t},a=({children:i,onSortChange:a,descriptor:o})=>{let[s,c]=(0,e.useReducer)(n,{sortDescriptor:o??null});(0,e.useEffect)(()=>{a?.(s.sortDescriptor)},[JSON.stringify(s.sortDescriptor)]);let l={...s,dispatch:c};return(0,t.jsx)(r.Provider,{value:l,children:i})};exports.TableProvider=a,exports.useTable=i;
|
|
2
|
+
//# sourceMappingURL=TableProvider.cjs.map
|
|
@@ -1 +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"],"
|
|
1
|
+
{"version":3,"file":"TableProvider.cjs","names":[],"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"],"mappings":"mEA4BA,IAAM,GAAwC,EAAO,IAAW,CAC9D,OAAQ,EAAO,KAAf,CACE,IAAK,wBACH,MAAO,CACL,GAAG,EACH,eAAgB,IAClB,EAEF,IAAK,yBACH,MAAO,CACL,GAAG,EACH,eAAgB,EAAO,OACzB,EAEF,QACE,OAAO,CACX,CACF,EAEM,GAAA,EAAA,EAAA,eAAkD,IAAA,EAAS,EAEpD,MAA0B,CACrC,IAAM,GAAA,EAAA,EAAA,YAAqB,CAAY,EAEvC,GAAI,CAAC,EACH,MAAU,MAAM,iDAAiD,EAGnE,OAAO,CACT,EAEa,GAAyC,CAAE,WAAU,eAAc,gBAAiB,CAC/F,GAAM,CAAC,EAAO,IAAA,EAAA,EAAA,YAAuB,EAAc,CACjD,eAAgB,GAAc,IAChC,CAAC,GAED,EAAA,EAAA,eAAgB,CACd,IAAe,EAAM,cAAc,CACrC,EAAG,CAAC,KAAK,UAAU,EAAM,cAAc,CAAC,CAAC,EAEzC,IAAM,EAAU,CACd,GAAG,EACH,UACF,EAEA,OAAO,EAAA,EAAA,KAAC,EAAa,SAAd,CAAuB,MAAO,EAAU,UAAgC,CAAA,CACjF"}
|
|
@@ -1,41 +1,38 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
return /* @__PURE__ */ u(o.Provider, { value: n, children: e });
|
|
2
|
+
import { createContext as e, useContext as t, useEffect as n, useReducer as r } from "react";
|
|
3
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/table/TableProvider.tsx
|
|
5
|
+
var a = (e, t) => {
|
|
6
|
+
switch (t.type) {
|
|
7
|
+
case "CLEAR_SORT_DESCRIPTOR": return {
|
|
8
|
+
...e,
|
|
9
|
+
sortDescriptor: null
|
|
10
|
+
};
|
|
11
|
+
case "UPDATE_SORT_DESCRIPTOR": return {
|
|
12
|
+
...e,
|
|
13
|
+
sortDescriptor: t.payload
|
|
14
|
+
};
|
|
15
|
+
default: return e;
|
|
16
|
+
}
|
|
17
|
+
}, o = e(void 0), s = () => {
|
|
18
|
+
let e = t(o);
|
|
19
|
+
if (!e) throw Error("useTable must be used within a <TableProvider/>");
|
|
20
|
+
return e;
|
|
21
|
+
}, c = ({ children: e, onSortChange: t, descriptor: s }) => {
|
|
22
|
+
let [c, l] = r(a, { sortDescriptor: s ?? null });
|
|
23
|
+
n(() => {
|
|
24
|
+
t?.(c.sortDescriptor);
|
|
25
|
+
}, [JSON.stringify(c.sortDescriptor)]);
|
|
26
|
+
let u = {
|
|
27
|
+
...c,
|
|
28
|
+
dispatch: l
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ i(o.Provider, {
|
|
31
|
+
value: u,
|
|
32
|
+
children: e
|
|
33
|
+
});
|
|
36
34
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
//# sourceMappingURL=TableProvider.js.map
|
|
35
|
+
//#endregion
|
|
36
|
+
export { c as TableProvider, s as useTable };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=TableProvider.js.map
|
|
@@ -1 +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"],"
|
|
1
|
+
{"version":3,"file":"TableProvider.js","names":[],"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"],"mappings":";;;;AA4BA,IAAM,KAAwC,GAAO,MAAW;CAC9D,QAAQ,EAAO,MAAf;EACE,KAAK,yBACH,OAAO;GACL,GAAG;GACH,gBAAgB;EAClB;EAEF,KAAK,0BACH,OAAO;GACL,GAAG;GACH,gBAAgB,EAAO;EACzB;EAEF,SACE,OAAO;CACX;AACF,GAEM,IAAe,EAAmC,KAAA,CAAS,GAEpD,UAA0B;CACrC,IAAM,IAAU,EAAW,CAAY;CAEvC,IAAI,CAAC,GACH,MAAU,MAAM,iDAAiD;CAGnE,OAAO;AACT,GAEa,KAAyC,EAAE,aAAU,iBAAc,oBAAiB;CAC/F,IAAM,CAAC,GAAO,KAAY,EAAW,GAAc,EACjD,gBAAgB,KAAc,KAChC,CAAC;CAED,QAAgB;EACd,IAAe,EAAM,cAAc;CACrC,GAAG,CAAC,KAAK,UAAU,EAAM,cAAc,CAAC,CAAC;CAEzC,IAAM,IAAU;EACd,GAAG;EACH;CACF;CAEA,OAAO,kBAAC,EAAa,UAAd;EAAuB,OAAO;EAAU;CAAgC,CAAA;AACjF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
//# sourceMappingURL=Tabs.cjs.map
|
|
1
|
+
"use client";const e=require("../../utils/slots.cjs");let t=require("@ark-ui/react"),n=require("@stokelp/styled-system/jsx"),r=require("@stokelp/styled-system/recipes"),i=require("react"),a=require("react/jsx-runtime");var{withProvider:o,withContext:s}=e.createStyleContext(r.tabs),c=o((0,n.styled)(t.Tabs.Root),`root`,{defaultProps:{lazyMount:!0}}),l=s((0,n.styled)(t.Tabs.Content),`content`),u=s((0,n.styled)(t.Tabs.Trigger),`trigger`),d=(0,n.styled)(t.ark.span,r.tabsChip),f=s((0,n.styled)(t.Tabs.Indicator),`indicator`),p=(0,i.forwardRef)(({children:e,...n},r)=>(0,a.jsxs)(t.Tabs.List,{ref:r,...n,children:[e,(0,a.jsx)(f,{})]}));p.displayName=t.Tabs.List.displayName;var m=s((0,n.styled)(p),`list`);exports.Tabs=c,exports.TabsChip=d,exports.TabsContent=l,exports.TabsList=m,exports.TabsTrigger=u;
|
|
2
|
+
//# sourceMappingURL=Tabs.cjs.map
|
|
@@ -1 +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"],"
|
|
1
|
+
{"version":3,"file":"Tabs.cjs","names":[],"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"],"mappings":"2NAMA,GAAM,CAAE,eAAc,eAAgB,EAAA,mBAAmB,EAAA,IAAI,EAEhD,EAAO,GAAA,EAAA,EAAA,QAAoB,EAAA,KAAO,IAAI,EAAG,OAAQ,CAC5D,aAAc,CACZ,UAAW,EACb,CACF,CAAC,EACY,EAAc,GAAA,EAAA,EAAA,QAAmB,EAAA,KAAO,OAAO,EAAG,SAAS,EAC3D,EAAc,GAAA,EAAA,EAAA,QAAmB,EAAA,KAAO,OAAO,EAAG,SAAS,EAC3D,GAAA,EAAA,EAAA,QAAkB,EAAA,IAAI,KAAM,EAAA,QAAQ,EAE3C,EAAgB,GAAA,EAAA,EAAA,QAAmB,EAAA,KAAO,SAAS,EAAG,WAAW,EAEjE,GAAA,EAAA,EAAA,aACH,CAAE,WAAU,GAAG,GAAS,KACvB,EAAA,EAAA,MAAC,EAAA,KAAO,KAAR,CAAkB,MAAK,GAAI,WAA3B,CACG,GACD,EAAA,EAAA,KAAC,EAAD,CAAgB,CAAA,CACL,GAEjB,EACA,EAAK,YAAc,EAAA,KAAO,KAAK,YAE/B,IAAa,EAAW,GAAA,EAAA,EAAA,QAAmB,CAAI,EAAG,MAAM"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { Tabs as ArkTab
|
|
2
|
-
import { ComponentProps, ForwardRefExoticComponent, RefAttributes
|
|
1
|
+
import { Tabs as ArkTab } from '@ark-ui/react';
|
|
2
|
+
import { ComponentProps, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
import { ComponentVariants } from '../../utils/slots.tsx';
|
|
4
4
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
5
|
-
import { TabsRecipe
|
|
5
|
+
import { TabsRecipe } from '@stokelp/styled-system/recipes';
|
|
6
6
|
export declare const Tabs: ComponentVariants<StyledComponent<ForwardRefExoticComponent<ArkTab.RootProps & RefAttributes<HTMLDivElement>>, {}>, TabsRecipe>;
|
|
7
7
|
export declare const TabsContent: StyledComponent<ForwardRefExoticComponent<ArkTab.ContentProps & RefAttributes<HTMLDivElement>>, {}>;
|
|
8
8
|
export declare const TabsTrigger: StyledComponent<ForwardRefExoticComponent<ArkTab.TriggerProps & RefAttributes<HTMLButtonElement>>, {}>;
|
|
9
|
-
export declare const TabsChip: StyledComponent<
|
|
9
|
+
export declare const TabsChip: StyledComponent<any, {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
[x: number]: unknown;
|
|
12
|
+
colorScheme?: unknown;
|
|
13
|
+
}>;
|
|
10
14
|
declare const TabsIndicator: StyledComponent<ForwardRefExoticComponent<ArkTab.IndicatorProps & RefAttributes<HTMLDivElement>>, {}>;
|
|
11
15
|
export declare const TabsList: StyledComponent<ForwardRefExoticComponent<Omit<ArkTab.ListProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>, {}>;
|
|
12
16
|
export interface TabsProps extends ComponentProps<typeof Tabs> {
|
|
@@ -1,27 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { Tabs as t, ark as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
|
2
|
+
import { createStyleContext as e } from "../../utils/slots.js";
|
|
3
|
+
import { Tabs as t, ark as n } from "@ark-ui/react";
|
|
4
|
+
import { styled as r } from "@stokelp/styled-system/jsx";
|
|
5
|
+
import { tabs as i, tabsChip as a } from "@stokelp/styled-system/recipes";
|
|
6
|
+
import { forwardRef as o } from "react";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/tabs/Tabs.tsx
|
|
9
|
+
var { withProvider: l, withContext: u } = e(i), d = l(r(t.Root), "root", { defaultProps: { lazyMount: !0 } }), f = u(r(t.Content), "content"), p = u(r(t.Trigger), "trigger"), m = r(n.span, a), h = u(r(t.Indicator), "indicator"), g = o(({ children: e, ...n }, r) => /* @__PURE__ */ c(t.List, {
|
|
10
|
+
ref: r,
|
|
11
|
+
...n,
|
|
12
|
+
children: [e, /* @__PURE__ */ s(h, {})]
|
|
13
|
+
}));
|
|
14
|
+
g.displayName = t.List.displayName;
|
|
15
|
+
var _ = u(r(g), "list");
|
|
16
|
+
//#endregion
|
|
17
|
+
export { d as Tabs, m as TabsChip, f as TabsContent, _ as TabsList, p as TabsTrigger };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=Tabs.js.map
|
|
@@ -1 +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"],"
|
|
1
|
+
{"version":3,"file":"Tabs.js","names":[],"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"],"mappings":";;;;;;;;AAMA,IAAM,EAAE,iBAAc,mBAAgB,EAAmB,CAAI,GAEhD,IAAO,EAAa,EAAO,EAAO,IAAI,GAAG,QAAQ,EAC5D,cAAc,EACZ,WAAW,GACb,EACF,CAAC,GACY,IAAc,EAAY,EAAO,EAAO,OAAO,GAAG,SAAS,GAC3D,IAAc,EAAY,EAAO,EAAO,OAAO,GAAG,SAAS,GAC3D,IAAW,EAAO,EAAI,MAAM,CAAQ,GAE3C,IAAgB,EAAY,EAAO,EAAO,SAAS,GAAG,WAAW,GAEjE,IAAO,GACV,EAAE,aAAU,GAAG,KAAS,MACvB,kBAAC,EAAO,MAAR;CAAkB;CAAK,GAAI;WAA3B,CACG,GACD,kBAAC,GAAD,CAAgB,CAAA,CACL;EAEjB;AACA,EAAK,cAAc,EAAO,KAAK;AAE/B,IAAa,IAAW,EAAY,EAAO,CAAI,GAAG,MAAM"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
//# sourceMappingURL=Tag.cjs.map
|
|
1
|
+
"use client";let e=require("@ark-ui/react"),t=require("@stokelp/styled-system/jsx"),n=require("@stokelp/styled-system/recipes"),r=require("react"),i=require("react/jsx-runtime"),a=require("@stokelp/styled-system/css");var o=(0,r.forwardRef)((r,o)=>{let[s,c]=n.tag.splitVariantProps(r),[l,u]=(0,t.splitCssProps)(c),{children:d,className:f,...p}=u,m=(0,n.tag)(s);return(0,i.jsxs)(e.ark.div,{ref:o,className:(0,a.cx)(m.root,(0,a.css)(l),f),...p,children:[d,(0,i.jsx)(t.Circle,{className:(0,a.cx)(m.badge),borderRadius:`full`})]})});exports.Tag=o;
|
|
2
|
+
//# sourceMappingURL=Tag.cjs.map
|
|
@@ -1 +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"],"
|
|
1
|
+
{"version":3,"file":"Tag.cjs","names":[],"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"],"mappings":"0NAWA,IAAa,GAAA,EAAA,EAAA,aAA4C,EAAO,IAAQ,CACtE,GAAM,CAAC,EAAc,GAAY,EAAA,IAAI,kBAAkB,CAAK,EACtD,CAAC,EAAU,IAAA,EAAA,EAAA,eAA4B,CAAQ,EAC/C,CAAE,WAAU,YAAW,GAAG,GAAc,EACxC,GAAA,EAAA,EAAA,KAAa,CAAY,EAE/B,OACE,EAAA,EAAA,MAAC,EAAA,IAAI,IAAL,CAAc,MAAK,WAAA,EAAA,EAAA,IAAc,EAAO,MAAA,EAAA,EAAA,KAAU,CAAQ,EAAG,CAAS,EAAG,GAAI,WAA7E,CACG,GACD,EAAA,EAAA,KAAC,EAAA,OAAD,CAAQ,WAAA,EAAA,EAAA,IAAc,EAAO,KAAK,EAAG,aAAa,MAAQ,CAAA,CACnD,GAEb,CAAC"}
|