@blenx-dev/components 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-check-types.log +1 -0
- package/MIGRATION-PLAN.md +423 -0
- package/TASKS.md +192 -0
- package/blenx-dev-ui-0.0.0.tgz +0 -0
- package/dist/assets/components.css +8407 -0
- package/dist/components/Accordion/accordion.css.js +13 -0
- package/dist/components/Accordion/accordion.js +54 -0
- package/dist/components/Alert/alert.css.js +17 -0
- package/dist/components/Alert/alert.js +38 -0
- package/dist/components/AlertDialog/alert-dialog.css.js +18 -0
- package/dist/components/AlertDialog/alert-dialog.js +117 -0
- package/dist/components/Autocomplete/autocomplete.css.js +28 -0
- package/dist/components/Autocomplete/autocomplete.js +157 -0
- package/dist/components/Avatar/avatar.css.js +37 -0
- package/dist/components/Avatar/avatar.js +28 -0
- package/dist/components/Badge/badge.css.js +19 -0
- package/dist/components/Badge/badge.js +14 -0
- package/dist/components/Box/box.css.js +6 -0
- package/dist/components/Box/box.js +18 -0
- package/dist/components/Breadcrumbs/breadcrumbs.css.js +13 -0
- package/dist/components/Breadcrumbs/breadcrumbs.js +73 -0
- package/dist/components/Button/button.css.js +37 -0
- package/dist/components/Button/button.js +28 -0
- package/dist/components/Calendar/calendar.css.js +23 -0
- package/dist/components/Calendar/calendar.js +104 -0
- package/dist/components/Card/card.js +46 -0
- package/dist/components/Checkbox/checkbox.css.js +13 -0
- package/dist/components/Checkbox/checkbox.js +59 -0
- package/dist/components/CloseButton/close-button.css.js +5 -0
- package/dist/components/CloseButton/close-button.js +27 -0
- package/dist/components/CloseButton/index.js +1 -0
- package/dist/components/ColorPicker/color-picker.js +103 -0
- package/dist/components/ColorSwatch/color-swatch.js +16 -0
- package/dist/components/Combobox/combobox.css.js +36 -0
- package/dist/components/Combobox/combobox.js +236 -0
- package/dist/components/Command/command.css.js +18 -0
- package/dist/components/Command/command.js +264 -0
- package/dist/components/Container/container.css.js +28 -0
- package/dist/components/Container/container.js +18 -0
- package/dist/components/CopyButton/copy-button.css.js +5 -0
- package/dist/components/CopyButton/copy-button.js +41 -0
- package/dist/components/CopyButton/index.js +1 -0
- package/dist/components/Dialog/dialog.css.js +19 -0
- package/dist/components/Dialog/dialog.js +112 -0
- package/dist/components/Drawer/drawer.css.js +60 -0
- package/dist/components/Drawer/drawer.js +307 -0
- package/dist/components/Field/field.css.js +11 -0
- package/dist/components/Field/field.js +50 -0
- package/dist/components/Grid/grid.css.js +19 -0
- package/dist/components/Grid/grid.js +31 -0
- package/dist/components/Icon/icon.css.js +5 -0
- package/dist/components/Icon/icon.js +15 -0
- package/dist/components/IconButton/icon-button.css.js +5 -0
- package/dist/components/IconButton/icon-button.js +14 -0
- package/dist/components/IconButton/index.js +1 -0
- package/dist/components/Input/input.css.js +11 -0
- package/dist/components/Input/input.js +31 -0
- package/dist/components/InputGroup/input-group.css.js +16 -0
- package/dist/components/InputGroup/input-group.js +70 -0
- package/dist/components/Menu/menu.css.js +14 -0
- package/dist/components/Menu/menu.js +54 -0
- package/dist/components/OTPField/otp-field.css.js +18 -0
- package/dist/components/OTPField/otp-field.js +23 -0
- package/dist/components/Popover/popover.css.js +13 -0
- package/dist/components/Popover/popover.js +89 -0
- package/dist/components/Progress/progress.css.js +11 -0
- package/dist/components/Progress/progress.js +44 -0
- package/dist/components/Radio/radio.css.js +12 -0
- package/dist/components/Radio/radio.js +32 -0
- package/dist/components/ScrollArea/scroll-area.css.js +15 -0
- package/dist/components/ScrollArea/scroll-area.js +50 -0
- package/dist/components/SegmentedControl/segmented-control.js +21 -0
- package/dist/components/Select/select.css.js +17 -0
- package/dist/components/Select/select.js +129 -0
- package/dist/components/Separator/separator.css.js +27 -0
- package/dist/components/Separator/separator.js +27 -0
- package/dist/components/Sheet/sheet.css.js +27 -0
- package/dist/components/Sheet/sheet.js +112 -0
- package/dist/components/Slider/slider.css.js +17 -0
- package/dist/components/Slider/slider.js +55 -0
- package/dist/components/Spinner/spinner.css.js +5 -0
- package/dist/components/Spinner/spinner.js +15 -0
- package/dist/components/Splitter/splitter.css.js +15 -0
- package/dist/components/Splitter/splitter.js +313 -0
- package/dist/components/Stack/stack.css.js +44 -0
- package/dist/components/Stack/stack.js +32 -0
- package/dist/components/Surface/surface.css.js +20 -0
- package/dist/components/Surface/surface.js +17 -0
- package/dist/components/Switch/switch.css.js +11 -0
- package/dist/components/Switch/switch.js +18 -0
- package/dist/components/Table/table.css.js +16 -0
- package/dist/components/Table/table.js +44 -0
- package/dist/components/Tabs/tabs.css.js +23 -0
- package/dist/components/Tabs/tabs.js +47 -0
- package/dist/components/Text/index.js +1 -0
- package/dist/components/Text/text.css.js +61 -0
- package/dist/components/Text/text.js +51 -0
- package/dist/components/Textarea/textarea.css.js +9 -0
- package/dist/components/Textarea/textarea.js +31 -0
- package/dist/components/Toggle/toggle.css.js +46 -0
- package/dist/components/Toggle/toggle.js +22 -0
- package/dist/components/ToggleGroup/toggle-group.css.js +13 -0
- package/dist/components/ToggleGroup/toggle-group.js +63 -0
- package/dist/components/index.js +52 -0
- package/dist/index.js +52 -0
- package/dist/node_modules/.bun/@vanilla-extract_recipes@0.5.7_19e937df7e0b57ed/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js +89 -0
- package/dist/node_modules/.bun/@vanilla-extract_sprinkles@1.6.5_19e937df7e0b57ed/node_modules/@vanilla-extract/sprinkles/createRuntimeSprinkles/dist/vanilla-extract-sprinkles-createRuntimeSprinkles.esm.js +8 -0
- package/dist/node_modules/.bun/@vanilla-extract_sprinkles@1.6.5_19e937df7e0b57ed/node_modules/@vanilla-extract/sprinkles/dist/createSprinkles-74286718.esm.js +141 -0
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +16 -0
- package/dist/package.json +232 -0
- package/dist/src/DataTable/data-table-column-toggle.d.ts +6 -0
- package/dist/src/DataTable/data-table-empty.d.ts +7 -0
- package/dist/src/DataTable/data-table-error.d.ts +6 -0
- package/dist/src/DataTable/data-table-infinite-loader.d.ts +10 -0
- package/dist/src/DataTable/data-table-loading.d.ts +8 -0
- package/dist/src/DataTable/data-table-pagination.d.ts +6 -0
- package/dist/src/DataTable/data-table-toolbar.d.ts +13 -0
- package/dist/src/DataTable/data-table.css.d.ts +58 -0
- package/dist/src/DataTable/data-table.d.ts +2 -0
- package/dist/src/DataTable/index.d.ts +10 -0
- package/dist/src/DataTable/types.d.ts +106 -0
- package/dist/src/DataTable/use-infinite-scroll.d.ts +28 -0
- package/dist/src/components/Accordion/accordion.css.d.ts +7 -0
- package/dist/src/components/Accordion/accordion.d.ts +20 -0
- package/dist/src/components/Accordion/accordion.demo.d.ts +5 -0
- package/dist/src/components/Accordion/index.d.ts +1 -0
- package/dist/src/components/Alert/alert.css.d.ts +24 -0
- package/dist/src/components/Alert/alert.d.ts +13 -0
- package/dist/src/components/Alert/alert.demo.d.ts +6 -0
- package/dist/src/components/Alert/index.d.ts +1 -0
- package/dist/src/components/AlertDialog/alert-dialog.css.d.ts +13 -0
- package/dist/src/components/AlertDialog/alert-dialog.d.ts +30 -0
- package/dist/src/components/AlertDialog/alert-dialog.demo.d.ts +5 -0
- package/dist/src/components/AlertDialog/alert-dialog.doc.d.ts +1 -0
- package/dist/src/components/AlertDialog/index.d.ts +1 -0
- package/dist/src/components/Autocomplete/autocomplete.css.d.ts +23 -0
- package/dist/src/components/Autocomplete/autocomplete.d.ts +34 -0
- package/dist/src/components/Autocomplete/index.d.ts +1 -0
- package/dist/src/components/Avatar/avatar.css.d.ts +55 -0
- package/dist/src/components/Avatar/avatar.d.ts +20 -0
- package/dist/src/components/Avatar/avatar.doc.d.ts +2 -0
- package/dist/src/components/Avatar/index.d.ts +1 -0
- package/dist/src/components/Badge/badge.css.d.ts +24 -0
- package/dist/src/components/Badge/badge.d.ts +7 -0
- package/dist/src/components/Badge/badge.demo.d.ts +5 -0
- package/dist/src/components/Badge/badge.doc.d.ts +1 -0
- package/dist/src/components/Badge/index.d.ts +1 -0
- package/dist/src/components/Box/box.css.d.ts +1 -0
- package/dist/src/components/Box/box.d.ts +6 -0
- package/dist/src/components/Box/box.doc.d.ts +1 -0
- package/dist/src/components/Box/index.d.ts +1 -0
- package/dist/src/components/Breadcrumbs/breadcrumbs.css.d.ts +8 -0
- package/dist/src/components/Breadcrumbs/breadcrumbs.d.ts +30 -0
- package/dist/src/components/Breadcrumbs/breadcrumbs.doc.d.ts +2 -0
- package/dist/src/components/Breadcrumbs/index.d.ts +1 -0
- package/dist/src/components/Button/button.css.d.ts +179 -0
- package/dist/src/components/Button/button.d.ts +13 -0
- package/dist/src/components/Button/button.demo.d.ts +5 -0
- package/dist/src/components/Button/index.d.ts +1 -0
- package/dist/src/components/Calendar/calendar.css.d.ts +17 -0
- package/dist/src/components/Calendar/calendar.d.ts +3 -0
- package/dist/src/components/Calendar/calendar.doc.d.ts +1 -0
- package/dist/src/components/Calendar/index.d.ts +1 -0
- package/dist/src/components/Card/card.d.ts +12 -0
- package/dist/src/components/Card/card.demo.d.ts +8 -0
- package/dist/src/components/Card/card.doc.d.ts +2 -0
- package/dist/src/components/Card/index.d.ts +1 -0
- package/dist/src/components/Checkbox/checkbox.css.d.ts +7 -0
- package/dist/src/components/Checkbox/checkbox.d.ts +13 -0
- package/dist/src/components/Checkbox/index.d.ts +1 -0
- package/dist/src/components/CloseButton/close-button.css.d.ts +1 -0
- package/dist/src/components/CloseButton/close-button.d.ts +3 -0
- package/dist/src/components/CloseButton/index.d.ts +2 -0
- package/dist/src/components/ColorPicker/color-picker.d.ts +7 -0
- package/dist/src/components/ColorPicker/color-picker.doc.d.ts +1 -0
- package/dist/src/components/ColorPicker/index.d.ts +1 -0
- package/dist/src/components/ColorSwatch/color-swatch.d.ts +8 -0
- package/dist/src/components/ColorSwatch/color-swatch.doc.d.ts +2 -0
- package/dist/src/components/ColorSwatch/index.d.ts +1 -0
- package/dist/src/components/Combobox/combobox.css.d.ts +32 -0
- package/dist/src/components/Combobox/combobox.d.ts +52 -0
- package/dist/src/components/Combobox/index.d.ts +1 -0
- package/dist/src/components/Command/command.css.d.ts +12 -0
- package/dist/src/components/Command/command.d.ts +48 -0
- package/dist/src/components/Command/command.demo.d.ts +6 -0
- package/dist/src/components/Command/command.doc.d.ts +3 -0
- package/dist/src/components/Command/index.d.ts +7 -0
- package/dist/src/components/Container/container.css.d.ts +48 -0
- package/dist/src/components/Container/container.d.ts +8 -0
- package/dist/src/components/Container/container.doc.d.ts +1 -0
- package/dist/src/components/Container/index.d.ts +1 -0
- package/dist/src/components/CopyButton/copy-button.css.d.ts +1 -0
- package/dist/src/components/CopyButton/copy-button.d.ts +7 -0
- package/dist/src/components/CopyButton/index.d.ts +2 -0
- package/dist/src/components/DatePicker/date-picker.d.ts +11 -0
- package/dist/src/components/DatePicker/date-picker.doc.d.ts +1 -0
- package/dist/src/components/DatePicker/index.d.ts +1 -0
- package/dist/src/components/Dialog/dialog.css.d.ts +13 -0
- package/dist/src/components/Dialog/dialog.d.ts +32 -0
- package/dist/src/components/Dialog/dialog.demo.d.ts +5 -0
- package/dist/src/components/Dialog/dialog.doc.d.ts +1 -0
- package/dist/src/components/Dialog/index.d.ts +1 -0
- package/dist/src/components/Drawer/drawer.css.d.ts +54 -0
- package/dist/src/components/Drawer/drawer.d.ts +66 -0
- package/dist/src/components/Drawer/drawer.demo.d.ts +5 -0
- package/dist/src/components/Drawer/drawer.doc.d.ts +2 -0
- package/dist/src/components/Drawer/index.d.ts +1 -0
- package/dist/src/components/Field/field.css.d.ts +5 -0
- package/dist/src/components/Field/field.d.ts +25 -0
- package/dist/src/components/Field/field.doc.d.ts +1 -0
- package/dist/src/components/Field/index.d.ts +1 -0
- package/dist/src/components/Grid/grid.css.d.ts +4 -0
- package/dist/src/components/Grid/grid.d.ts +11 -0
- package/dist/src/components/Grid/grid.doc.d.ts +1 -0
- package/dist/src/components/Grid/index.d.ts +1 -0
- package/dist/src/components/Icon/icon.css.d.ts +1 -0
- package/dist/src/components/Icon/icon.d.ts +4 -0
- package/dist/src/components/Icon/icon.demo.d.ts +5 -0
- package/dist/src/components/Icon/index.d.ts +1 -0
- package/dist/src/components/IconButton/icon-button.css.d.ts +1 -0
- package/dist/src/components/IconButton/icon-button.d.ts +4 -0
- package/dist/src/components/IconButton/icon-button.demo.d.ts +5 -0
- package/dist/src/components/IconButton/index.d.ts +2 -0
- package/dist/src/components/Input/index.d.ts +1 -0
- package/dist/src/components/Input/input.css.d.ts +6 -0
- package/dist/src/components/Input/input.d.ts +19 -0
- package/dist/src/components/Input/input.demo.d.ts +5 -0
- package/dist/src/components/Input/input.doc.d.ts +2 -0
- package/dist/src/components/InputGroup/index.d.ts +1 -0
- package/dist/src/components/InputGroup/input-group.css.d.ts +10 -0
- package/dist/src/components/InputGroup/input-group.d.ts +25 -0
- package/dist/src/components/InputGroup/input-group.demo.d.ts +5 -0
- package/dist/src/components/Menu/index.d.ts +1 -0
- package/dist/src/components/Menu/menu.css.d.ts +8 -0
- package/dist/src/components/Menu/menu.d.ts +41 -0
- package/dist/src/components/Menu/menu.demo.d.ts +5 -0
- package/dist/src/components/OTPField/index.d.ts +1 -0
- package/dist/src/components/OTPField/otp-field.css.d.ts +16 -0
- package/dist/src/components/OTPField/otp-field.d.ts +18 -0
- package/dist/src/components/OTPField/otp-field.demo.d.ts +6 -0
- package/dist/src/components/Popover/index.d.ts +1 -0
- package/dist/src/components/Popover/popover.css.d.ts +7 -0
- package/dist/src/components/Popover/popover.d.ts +33 -0
- package/dist/src/components/Popover/popover.demo.d.ts +5 -0
- package/dist/src/components/Progress/index.d.ts +1 -0
- package/dist/src/components/Progress/progress.css.d.ts +5 -0
- package/dist/src/components/Progress/progress.d.ts +13 -0
- package/dist/src/components/Radio/index.d.ts +1 -0
- package/dist/src/components/Radio/radio.css.d.ts +6 -0
- package/dist/src/components/Radio/radio.d.ts +13 -0
- package/dist/src/components/ScrollArea/index.d.ts +1 -0
- package/dist/src/components/ScrollArea/scroll-area.css.d.ts +9 -0
- package/dist/src/components/ScrollArea/scroll-area.d.ts +19 -0
- package/dist/src/components/ScrollArea/scroll-area.doc.d.ts +2 -0
- package/dist/src/components/SegmentedControl/index.d.ts +1 -0
- package/dist/src/components/SegmentedControl/segmented-control.d.ts +14 -0
- package/dist/src/components/SegmentedControl/segmented-control.doc.d.ts +1 -0
- package/dist/src/components/Select/index.d.ts +1 -0
- package/dist/src/components/Select/select.css.d.ts +11 -0
- package/dist/src/components/Select/select.d.ts +54 -0
- package/dist/src/components/Select/select.demo.d.ts +5 -0
- package/dist/src/components/Select/select.doc.d.ts +2 -0
- package/dist/src/components/Separator/index.d.ts +1 -0
- package/dist/src/components/Separator/separator.css.d.ts +22 -0
- package/dist/src/components/Separator/separator.d.ts +13 -0
- package/dist/src/components/Separator/separator.doc.d.ts +4 -0
- package/dist/src/components/Sheet/index.d.ts +1 -0
- package/dist/src/components/Sheet/sheet.css.d.ts +21 -0
- package/dist/src/components/Sheet/sheet.d.ts +35 -0
- package/dist/src/components/Sheet/sheet.demo.d.ts +5 -0
- package/dist/src/components/Slider/index.d.ts +1 -0
- package/dist/src/components/Slider/slider.css.d.ts +11 -0
- package/dist/src/components/Slider/slider.d.ts +11 -0
- package/dist/src/components/Spinner/index.d.ts +1 -0
- package/dist/src/components/Spinner/spinner.css.d.ts +2 -0
- package/dist/src/components/Spinner/spinner.d.ts +8 -0
- package/dist/src/components/Spinner/spinner.demo.d.ts +1 -0
- package/dist/src/components/Splitter/index.d.ts +1 -0
- package/dist/src/components/Splitter/splitter.css.d.ts +11 -0
- package/dist/src/components/Splitter/splitter.d.ts +36 -0
- package/dist/src/components/Stack/index.d.ts +1 -0
- package/dist/src/components/Stack/stack.css.d.ts +82 -0
- package/dist/src/components/Stack/stack.d.ts +11 -0
- package/dist/src/components/Stack/stack.doc.d.ts +3 -0
- package/dist/src/components/Surface/index.d.ts +1 -0
- package/dist/src/components/Surface/surface.css.d.ts +34 -0
- package/dist/src/components/Surface/surface.d.ts +7 -0
- package/dist/src/components/Surface/surface.doc.d.ts +2 -0
- package/dist/src/components/Switch/index.d.ts +1 -0
- package/dist/src/components/Switch/switch.css.d.ts +5 -0
- package/dist/src/components/Switch/switch.d.ts +7 -0
- package/dist/src/components/Switch/switch.demo.d.ts +5 -0
- package/dist/src/components/Switch/switch.doc.d.ts +2 -0
- package/dist/src/components/Table/index.d.ts +2 -0
- package/dist/src/components/Table/table.css.d.ts +10 -0
- package/dist/src/components/Table/table.d.ts +24 -0
- package/dist/src/components/Table/table.demo.d.ts +5 -0
- package/dist/src/components/Tabs/index.d.ts +1 -0
- package/dist/src/components/Tabs/tabs.css.d.ts +27 -0
- package/dist/src/components/Tabs/tabs.d.ts +15 -0
- package/dist/src/components/Tabs/tabs.demo.d.ts +5 -0
- package/dist/src/components/Tabs/tabs.doc.d.ts +3 -0
- package/dist/src/components/Text/index.d.ts +2 -0
- package/dist/src/components/Text/text.css.d.ts +204 -0
- package/dist/src/components/Text/text.d.ts +9 -0
- package/dist/src/components/Text/text.doc.d.ts +4 -0
- package/dist/src/components/Textarea/index.d.ts +1 -0
- package/dist/src/components/Textarea/textarea.css.d.ts +4 -0
- package/dist/src/components/Textarea/textarea.d.ts +7 -0
- package/dist/src/components/Textarea/textarea.doc.d.ts +2 -0
- package/dist/src/components/Toggle/index.d.ts +1 -0
- package/dist/src/components/Toggle/toggle.css.d.ts +68 -0
- package/dist/src/components/Toggle/toggle.d.ts +12 -0
- package/dist/src/components/Toggle/toggle.doc.d.ts +1 -0
- package/dist/src/components/ToggleGroup/index.d.ts +1 -0
- package/dist/src/components/ToggleGroup/toggle-group.css.d.ts +7 -0
- package/dist/src/components/ToggleGroup/toggle-group.d.ts +31 -0
- package/dist/src/components/ToggleGroup/toggle-group.doc.d.ts +3 -0
- package/dist/src/components/index.d.ts +49 -0
- package/dist/src/demos/accordion.demo.d.ts +5 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/utils/heights.d.ts +2 -0
- package/dist/src/utils/sprinkles.css.d.ts +515 -0
- package/dist/src/utils/types.d.ts +8 -0
- package/dist/src/utils/ve-style.utils.d.ts +1 -0
- package/dist/utils/sprinkles.css.js +5350 -0
- package/dist/utils/ve-style.utils.js +21 -0
- package/package.build.json +39 -0
- package/package.json +60 -0
- package/scripts/generate-api.ts +183 -0
- package/scripts/generate-package.ts +99 -0
- package/src/DataTable/data-table-column-toggle.tsx +73 -0
- package/src/DataTable/data-table-empty.tsx +27 -0
- package/src/DataTable/data-table-error.tsx +25 -0
- package/src/DataTable/data-table-infinite-loader.tsx +73 -0
- package/src/DataTable/data-table-loading.tsx +67 -0
- package/src/DataTable/data-table-pagination.tsx +80 -0
- package/src/DataTable/data-table-toolbar.tsx +62 -0
- package/src/DataTable/data-table.css.ts +421 -0
- package/src/DataTable/data-table.tsx +507 -0
- package/src/DataTable/index.ts +24 -0
- package/src/DataTable/registry-meta.json +66 -0
- package/src/DataTable/types.ts +169 -0
- package/src/DataTable/use-infinite-scroll.ts +67 -0
- package/src/components/Accordion/accordion.css.ts +93 -0
- package/src/components/Accordion/accordion.demo.tsx +42 -0
- package/src/components/Accordion/accordion.tsx +87 -0
- package/src/components/Accordion/docs-meta.json +13 -0
- package/src/components/Accordion/index.ts +8 -0
- package/src/components/Accordion/registry-meta.json +19 -0
- package/src/components/Alert/alert.css.ts +29 -0
- package/src/components/Alert/alert.demo.tsx +34 -0
- package/src/components/Alert/alert.tsx +40 -0
- package/src/components/Alert/docs-meta.json +12 -0
- package/src/components/Alert/index.ts +1 -0
- package/src/components/Alert/registry-meta.json +20 -0
- package/src/components/AlertDialog/alert-dialog.css.ts +146 -0
- package/src/components/AlertDialog/alert-dialog.demo.tsx +59 -0
- package/src/components/AlertDialog/alert-dialog.doc.tsx +31 -0
- package/src/components/AlertDialog/alert-dialog.tsx +197 -0
- package/src/components/AlertDialog/docs-meta.json +14 -0
- package/src/components/AlertDialog/index.ts +1 -0
- package/src/components/AlertDialog/registry-meta.json +20 -0
- package/src/components/Autocomplete/autocomplete.css.ts +168 -0
- package/src/components/Autocomplete/autocomplete.tsx +226 -0
- package/src/components/Autocomplete/docs-meta.json +9 -0
- package/src/components/Autocomplete/index.ts +1 -0
- package/src/components/Autocomplete/registry-meta.json +20 -0
- package/src/components/Avatar/avatar.css.ts +72 -0
- package/src/components/Avatar/avatar.doc.tsx +32 -0
- package/src/components/Avatar/avatar.tsx +49 -0
- package/src/components/Avatar/docs-meta.json +9 -0
- package/src/components/Avatar/index.ts +1 -0
- package/src/components/Avatar/registry-meta.json +19 -0
- package/src/components/Badge/badge.css.ts +40 -0
- package/src/components/Badge/badge.demo.tsx +18 -0
- package/src/components/Badge/badge.doc.tsx +12 -0
- package/src/components/Badge/badge.tsx +13 -0
- package/src/components/Badge/docs-meta.json +9 -0
- package/src/components/Badge/index.ts +1 -0
- package/src/components/Badge/registry-meta.json +19 -0
- package/src/components/Box/box.css.ts +7 -0
- package/src/components/Box/box.doc.tsx +19 -0
- package/src/components/Box/box.tsx +21 -0
- package/src/components/Box/docs-meta.json +9 -0
- package/src/components/Box/index.ts +1 -0
- package/src/components/Box/registry-meta.json +14 -0
- package/src/components/Breadcrumbs/breadcrumbs.css.ts +72 -0
- package/src/components/Breadcrumbs/breadcrumbs.doc.tsx +61 -0
- package/src/components/Breadcrumbs/breadcrumbs.tsx +79 -0
- package/src/components/Breadcrumbs/docs-meta.json +12 -0
- package/src/components/Breadcrumbs/index.ts +9 -0
- package/src/components/Breadcrumbs/registry-meta.json +19 -0
- package/src/components/Button/button.css.ts +209 -0
- package/src/components/Button/button.demo.tsx +119 -0
- package/src/components/Button/button.tsx +55 -0
- package/src/components/Button/docs-meta.json +13 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Button/registry-meta.json +20 -0
- package/src/components/Calendar/calendar.css.ts +188 -0
- package/src/components/Calendar/calendar.doc.tsx +10 -0
- package/src/components/Calendar/calendar.tsx +143 -0
- package/src/components/Calendar/docs-meta.json +9 -0
- package/src/components/Calendar/index.ts +1 -0
- package/src/components/Calendar/registry-meta.json +20 -0
- package/src/components/Card/card.demo.tsx +177 -0
- package/src/components/Card/card.doc.tsx +47 -0
- package/src/components/Card/card.tsx +32 -0
- package/src/components/Card/docs-meta.json +9 -0
- package/src/components/Card/index.ts +1 -0
- package/src/components/Card/registry-meta.json +15 -0
- package/src/components/Checkbox/checkbox.css.ts +77 -0
- package/src/components/Checkbox/checkbox.tsx +94 -0
- package/src/components/Checkbox/docs-meta.json +13 -0
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/Checkbox/registry-meta.json +19 -0
- package/src/components/CloseButton/close-button.css.ts +11 -0
- package/src/components/CloseButton/close-button.tsx +15 -0
- package/src/components/CloseButton/index.ts +2 -0
- package/src/components/CloseButton/registry-meta.json +15 -0
- package/src/components/ColorPicker/color-picker.doc.tsx +12 -0
- package/src/components/ColorPicker/color-picker.tsx +123 -0
- package/src/components/ColorPicker/docs-meta.json +9 -0
- package/src/components/ColorPicker/index.ts +1 -0
- package/src/components/ColorPicker/registry-meta.json +15 -0
- package/src/components/ColorSwatch/color-swatch.doc.tsx +25 -0
- package/src/components/ColorSwatch/color-swatch.tsx +21 -0
- package/src/components/ColorSwatch/docs-meta.json +9 -0
- package/src/components/ColorSwatch/index.ts +1 -0
- package/src/components/ColorSwatch/registry-meta.json +20 -0
- package/src/components/Combobox/combobox.css.ts +334 -0
- package/src/components/Combobox/combobox.tsx +350 -0
- package/src/components/Combobox/docs-meta.json +9 -0
- package/src/components/Combobox/index.ts +1 -0
- package/src/components/Combobox/registry-meta.json +20 -0
- package/src/components/Command/command.css.ts +131 -0
- package/src/components/Command/command.demo.tsx +110 -0
- package/src/components/Command/command.doc.tsx +100 -0
- package/src/components/Command/command.tsx +413 -0
- package/src/components/Command/docs-meta.json +21 -0
- package/src/components/Command/index.ts +7 -0
- package/src/components/Command/registry-meta.json +20 -0
- package/src/components/Container/container.css.ts +40 -0
- package/src/components/Container/container.doc.tsx +28 -0
- package/src/components/Container/container.tsx +24 -0
- package/src/components/Container/docs-meta.json +9 -0
- package/src/components/Container/index.ts +1 -0
- package/src/components/Container/registry-meta.json +20 -0
- package/src/components/CopyButton/copy-button.css.ts +11 -0
- package/src/components/CopyButton/copy-button.tsx +45 -0
- package/src/components/CopyButton/index.ts +2 -0
- package/src/components/CopyButton/registry-meta.json +15 -0
- package/src/components/DatePicker/date-picker.doc.tsx +12 -0
- package/src/components/DatePicker/date-picker.tsx +75 -0
- package/src/components/DatePicker/docs-meta.json +9 -0
- package/src/components/DatePicker/index.ts +1 -0
- package/src/components/DatePicker/registry-meta.json +15 -0
- package/src/components/Dialog/dialog.css.ts +155 -0
- package/src/components/Dialog/dialog.demo.tsx +39 -0
- package/src/components/Dialog/dialog.doc.tsx +33 -0
- package/src/components/Dialog/dialog.tsx +186 -0
- package/src/components/Dialog/docs-meta.json +13 -0
- package/src/components/Dialog/index.ts +1 -0
- package/src/components/Dialog/registry-meta.json +20 -0
- package/src/components/Drawer/docs-meta.json +9 -0
- package/src/components/Drawer/drawer.css.ts +412 -0
- package/src/components/Drawer/drawer.demo.tsx +58 -0
- package/src/components/Drawer/drawer.doc.tsx +49 -0
- package/src/components/Drawer/drawer.tsx +574 -0
- package/src/components/Drawer/index.ts +1 -0
- package/src/components/Drawer/registry-meta.json +20 -0
- package/src/components/Field/docs-meta.json +9 -0
- package/src/components/Field/field.css.ts +35 -0
- package/src/components/Field/field.doc.tsx +19 -0
- package/src/components/Field/field.tsx +101 -0
- package/src/components/Field/index.ts +1 -0
- package/src/components/Field/registry-meta.json +20 -0
- package/src/components/Grid/docs-meta.json +9 -0
- package/src/components/Grid/grid.css.ts +12 -0
- package/src/components/Grid/grid.doc.tsx +148 -0
- package/src/components/Grid/grid.tsx +57 -0
- package/src/components/Grid/index.ts +1 -0
- package/src/components/Grid/registry-meta.json +20 -0
- package/src/components/Icon/docs-meta.json +13 -0
- package/src/components/Icon/icon.css.ts +10 -0
- package/src/components/Icon/icon.demo.tsx +97 -0
- package/src/components/Icon/icon.tsx +15 -0
- package/src/components/Icon/index.ts +1 -0
- package/src/components/Icon/registry-meta.json +20 -0
- package/src/components/IconButton/docs-meta.json +13 -0
- package/src/components/IconButton/icon-button.css.ts +6 -0
- package/src/components/IconButton/icon-button.demo.tsx +102 -0
- package/src/components/IconButton/icon-button.tsx +11 -0
- package/src/components/IconButton/index.ts +2 -0
- package/src/components/IconButton/registry-meta.json +15 -0
- package/src/components/Input/docs-meta.json +9 -0
- package/src/components/Input/index.ts +1 -0
- package/src/components/Input/input.css.ts +73 -0
- package/src/components/Input/input.demo.tsx +24 -0
- package/src/components/Input/input.doc.tsx +25 -0
- package/src/components/Input/input.tsx +50 -0
- package/src/components/Input/registry-meta.json +19 -0
- package/src/components/InputGroup/docs-meta.json +9 -0
- package/src/components/InputGroup/index.ts +1 -0
- package/src/components/InputGroup/input-group.css.ts +157 -0
- package/src/components/InputGroup/input-group.demo.tsx +53 -0
- package/src/components/InputGroup/input-group.tsx +133 -0
- package/src/components/InputGroup/registry-meta.json +19 -0
- package/src/components/Menu/docs-meta.json +13 -0
- package/src/components/Menu/index.ts +1 -0
- package/src/components/Menu/menu.css.ts +128 -0
- package/src/components/Menu/menu.demo.tsx +40 -0
- package/src/components/Menu/menu.tsx +115 -0
- package/src/components/Menu/registry-meta.json +19 -0
- package/src/components/OTPField/docs-meta.json +9 -0
- package/src/components/OTPField/index.ts +1 -0
- package/src/components/OTPField/otp-field.css.ts +55 -0
- package/src/components/OTPField/otp-field.demo.tsx +57 -0
- package/src/components/OTPField/otp-field.tsx +46 -0
- package/src/components/OTPField/registry-meta.json +19 -0
- package/src/components/Popover/docs-meta.json +13 -0
- package/src/components/Popover/index.ts +1 -0
- package/src/components/Popover/popover.css.ts +82 -0
- package/src/components/Popover/popover.demo.tsx +34 -0
- package/src/components/Popover/popover.tsx +113 -0
- package/src/components/Popover/registry-meta.json +19 -0
- package/src/components/Progress/docs-meta.json +12 -0
- package/src/components/Progress/index.ts +7 -0
- package/src/components/Progress/progress.css.ts +38 -0
- package/src/components/Progress/progress.tsx +62 -0
- package/src/components/Progress/registry-meta.json +19 -0
- package/src/components/Radio/docs-meta.json +13 -0
- package/src/components/Radio/index.ts +1 -0
- package/src/components/Radio/radio.css.ts +73 -0
- package/src/components/Radio/radio.tsx +49 -0
- package/src/components/Radio/registry-meta.json +19 -0
- package/src/components/ScrollArea/docs-meta.json +9 -0
- package/src/components/ScrollArea/index.ts +1 -0
- package/src/components/ScrollArea/registry-meta.json +19 -0
- package/src/components/ScrollArea/scroll-area.css.ts +80 -0
- package/src/components/ScrollArea/scroll-area.doc.tsx +44 -0
- package/src/components/ScrollArea/scroll-area.tsx +96 -0
- package/src/components/SegmentedControl/docs-meta.json +9 -0
- package/src/components/SegmentedControl/index.ts +1 -0
- package/src/components/SegmentedControl/registry-meta.json +15 -0
- package/src/components/SegmentedControl/segmented-control.doc.tsx +28 -0
- package/src/components/SegmentedControl/segmented-control.tsx +42 -0
- package/src/components/Select/docs-meta.json +13 -0
- package/src/components/Select/index.ts +1 -0
- package/src/components/Select/registry-meta.json +20 -0
- package/src/components/Select/select.css.ts +183 -0
- package/src/components/Select/select.demo.tsx +35 -0
- package/src/components/Select/select.doc.tsx +65 -0
- package/src/components/Select/select.tsx +165 -0
- package/src/components/Separator/docs-meta.json +12 -0
- package/src/components/Separator/index.ts +1 -0
- package/src/components/Separator/registry-meta.json +20 -0
- package/src/components/Separator/separator.css.ts +60 -0
- package/src/components/Separator/separator.doc.tsx +44 -0
- package/src/components/Separator/separator.tsx +34 -0
- package/src/components/Sheet/docs-meta.json +13 -0
- package/src/components/Sheet/index.ts +1 -0
- package/src/components/Sheet/registry-meta.json +20 -0
- package/src/components/Sheet/sheet.css.ts +192 -0
- package/src/components/Sheet/sheet.demo.tsx +53 -0
- package/src/components/Sheet/sheet.tsx +213 -0
- package/src/components/Slider/docs-meta.json +13 -0
- package/src/components/Slider/index.ts +1 -0
- package/src/components/Slider/registry-meta.json +19 -0
- package/src/components/Slider/slider.css.ts +82 -0
- package/src/components/Slider/slider.tsx +100 -0
- package/src/components/Spinner/docs-meta.json +12 -0
- package/src/components/Spinner/index.ts +1 -0
- package/src/components/Spinner/registry-meta.json +19 -0
- package/src/components/Spinner/spinner.css.ts +17 -0
- package/src/components/Spinner/spinner.demo.tsx +13 -0
- package/src/components/Spinner/spinner.tsx +15 -0
- package/src/components/Splitter/docs-meta.json +9 -0
- package/src/components/Splitter/index.ts +1 -0
- package/src/components/Splitter/registry-meta.json +19 -0
- package/src/components/Splitter/splitter.css.ts +70 -0
- package/src/components/Splitter/splitter.tsx +521 -0
- package/src/components/Stack/docs-meta.json +9 -0
- package/src/components/Stack/index.ts +1 -0
- package/src/components/Stack/registry-meta.json +20 -0
- package/src/components/Stack/stack.css.ts +42 -0
- package/src/components/Stack/stack.doc.tsx +57 -0
- package/src/components/Stack/stack.tsx +32 -0
- package/src/components/Surface/docs-meta.json +9 -0
- package/src/components/Surface/index.ts +1 -0
- package/src/components/Surface/registry-meta.json +20 -0
- package/src/components/Surface/surface.css.ts +40 -0
- package/src/components/Surface/surface.doc.tsx +32 -0
- package/src/components/Surface/surface.tsx +19 -0
- package/src/components/Switch/docs-meta.json +13 -0
- package/src/components/Switch/index.ts +1 -0
- package/src/components/Switch/registry-meta.json +20 -0
- package/src/components/Switch/switch.css.ts +47 -0
- package/src/components/Switch/switch.demo.tsx +26 -0
- package/src/components/Switch/switch.doc.tsx +25 -0
- package/src/components/Switch/switch.tsx +25 -0
- package/src/components/Table/docs-meta.json +12 -0
- package/src/components/Table/index.ts +2 -0
- package/src/components/Table/registry-meta.json +19 -0
- package/src/components/Table/table.css.ts +72 -0
- package/src/components/Table/table.demo.tsx +58 -0
- package/src/components/Table/table.tsx +116 -0
- package/src/components/Tabs/docs-meta.json +13 -0
- package/src/components/Tabs/index.ts +1 -0
- package/src/components/Tabs/registry-meta.json +19 -0
- package/src/components/Tabs/tabs.css.ts +259 -0
- package/src/components/Tabs/tabs.demo.tsx +33 -0
- package/src/components/Tabs/tabs.doc.tsx +62 -0
- package/src/components/Tabs/tabs.tsx +119 -0
- package/src/components/Text/docs-meta.json +9 -0
- package/src/components/Text/index.ts +2 -0
- package/src/components/Text/registry-meta.json +19 -0
- package/src/components/Text/text.css.ts +167 -0
- package/src/components/Text/text.doc.tsx +53 -0
- package/src/components/Text/text.tsx +64 -0
- package/src/components/Textarea/docs-meta.json +9 -0
- package/src/components/Textarea/index.ts +1 -0
- package/src/components/Textarea/registry-meta.json +19 -0
- package/src/components/Textarea/textarea.css.ts +66 -0
- package/src/components/Textarea/textarea.doc.tsx +23 -0
- package/src/components/Textarea/textarea.tsx +48 -0
- package/src/components/Toggle/docs-meta.json +12 -0
- package/src/components/Toggle/index.ts +1 -0
- package/src/components/Toggle/registry-meta.json +19 -0
- package/src/components/Toggle/toggle.css.ts +101 -0
- package/src/components/Toggle/toggle.doc.tsx +24 -0
- package/src/components/Toggle/toggle.tsx +60 -0
- package/src/components/ToggleGroup/docs-meta.json +9 -0
- package/src/components/ToggleGroup/index.ts +1 -0
- package/src/components/ToggleGroup/registry-meta.json +20 -0
- package/src/components/ToggleGroup/toggle-group.css.ts +77 -0
- package/src/components/ToggleGroup/toggle-group.doc.tsx +38 -0
- package/src/components/ToggleGroup/toggle-group.tsx +131 -0
- package/src/components/index.ts +53 -0
- package/src/demos/accordion.demo.tsx +41 -0
- package/src/index.ts +3 -0
- package/src/utils/heights.ts +16 -0
- package/src/utils/sprinkles.css.ts +251 -0
- package/src/utils/types.ts +20 -0
- package/src/utils/ve-style.utils.ts +24 -0
- package/tsconfig.build.json +14 -0
- package/tsconfig.json +10 -0
- package/vite.config.ts +47 -0
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import clsx from "../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
3
|
+
import { handle, handleHorizontal, handleVertical, panel, root, rootHorizontal, rootVertical } from "./splitter.css.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import React, { createContext, createElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
6
|
+
//#region src/components/Splitter/splitter.tsx
|
|
7
|
+
var InternalCtx = createContext(null);
|
|
8
|
+
function useInternalCtx() {
|
|
9
|
+
const ctx = useContext(InternalCtx);
|
|
10
|
+
if (!ctx) throw new Error("Splitter compound components must be used within <Splitter>");
|
|
11
|
+
return ctx;
|
|
12
|
+
}
|
|
13
|
+
function isPanel(child) {
|
|
14
|
+
return React.isValidElement(child) && child.type === SplitterPanel;
|
|
15
|
+
}
|
|
16
|
+
function isHandle(child) {
|
|
17
|
+
return React.isValidElement(child) && child.type === SplitterHandle;
|
|
18
|
+
}
|
|
19
|
+
function calculateSizes(panelProps, storageKey) {
|
|
20
|
+
const count = panelProps.length;
|
|
21
|
+
if (count === 0) return [];
|
|
22
|
+
if (storageKey) try {
|
|
23
|
+
const stored = localStorage.getItem(storageKey);
|
|
24
|
+
if (stored) {
|
|
25
|
+
const parsed = JSON.parse(stored);
|
|
26
|
+
if (Array.isArray(parsed) && parsed.length === count) return parsed;
|
|
27
|
+
}
|
|
28
|
+
} catch {}
|
|
29
|
+
const result = Array.from({ length: count }, () => 0);
|
|
30
|
+
let usedSize = 0;
|
|
31
|
+
let unsetCount = count;
|
|
32
|
+
for (let i = 0; i < count; i++) {
|
|
33
|
+
const p = panelProps[i];
|
|
34
|
+
const sz = p?.size ?? p?.defaultSize;
|
|
35
|
+
if (sz != null) {
|
|
36
|
+
result[i] = sz;
|
|
37
|
+
usedSize += sz;
|
|
38
|
+
unsetCount--;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const equalShare = unsetCount > 0 ? (100 - usedSize) / unsetCount : 0;
|
|
42
|
+
for (let i = 0; i < count; i++) if (result[i] == null) result[i] = equalShare;
|
|
43
|
+
const total = result.reduce((a, b) => a + b, 0);
|
|
44
|
+
if (Math.abs(total - 100) > .01 && total > 0) for (let i = 0; i < count; i++) result[i] = result[i] / total * 100;
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
function clamp(value, min, max) {
|
|
48
|
+
return Math.min(Math.max(value, min), max);
|
|
49
|
+
}
|
|
50
|
+
function Splitter({ orientation = "horizontal", disabled: isDisabled = false, storageKey, children, onResizeStart, onResize, onResizeEnd, className }) {
|
|
51
|
+
const rootRef = useRef(null);
|
|
52
|
+
const panelConstraintsRef = useRef([]);
|
|
53
|
+
const panelRefs = useRef([]);
|
|
54
|
+
const sizesRef = useRef([]);
|
|
55
|
+
const isFirstRender = useRef(true);
|
|
56
|
+
const onResizeStartRef = useRef(onResizeStart);
|
|
57
|
+
const onResizeRef = useRef(onResize);
|
|
58
|
+
const onResizeEndRef = useRef(onResizeEnd);
|
|
59
|
+
onResizeStartRef.current = onResizeStart;
|
|
60
|
+
onResizeRef.current = onResize;
|
|
61
|
+
onResizeEndRef.current = onResizeEnd;
|
|
62
|
+
const panelPropsList = useMemo(() => {
|
|
63
|
+
const list = [];
|
|
64
|
+
React.Children.forEach(children, (child) => {
|
|
65
|
+
if (isPanel(child)) list.push(child.props);
|
|
66
|
+
});
|
|
67
|
+
return list;
|
|
68
|
+
}, [children]);
|
|
69
|
+
const panelCount = panelPropsList.length;
|
|
70
|
+
const [sizes, setSizes] = useState(() => calculateSizes(panelPropsList, storageKey));
|
|
71
|
+
sizesRef.current = sizes;
|
|
72
|
+
const prevPanelCount = useRef(panelCount);
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
if (prevPanelCount.current !== panelCount) {
|
|
75
|
+
prevPanelCount.current = panelCount;
|
|
76
|
+
setSizes(calculateSizes(panelPropsList, storageKey));
|
|
77
|
+
}
|
|
78
|
+
}, [
|
|
79
|
+
panelCount,
|
|
80
|
+
panelPropsList,
|
|
81
|
+
storageKey
|
|
82
|
+
]);
|
|
83
|
+
useEffect(() => {
|
|
84
|
+
if (isFirstRender.current) {
|
|
85
|
+
isFirstRender.current = false;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (storageKey) try {
|
|
89
|
+
localStorage.setItem(storageKey, JSON.stringify(sizes));
|
|
90
|
+
} catch {}
|
|
91
|
+
}, [storageKey, sizes]);
|
|
92
|
+
const handlePointerDown = useCallback((handleIndex, e) => {
|
|
93
|
+
if (isDisabled) return;
|
|
94
|
+
e.preventDefault();
|
|
95
|
+
const root = rootRef.current;
|
|
96
|
+
if (!root) return;
|
|
97
|
+
const rect = root.getBoundingClientRect();
|
|
98
|
+
const totalPx = orientation === "horizontal" ? rect.width : rect.height;
|
|
99
|
+
const startPos = orientation === "horizontal" ? e.clientX : e.clientY;
|
|
100
|
+
const availablePx = totalPx - (panelCount - 1) * 8;
|
|
101
|
+
if (availablePx <= 0) return;
|
|
102
|
+
const startSizes = [...sizesRef.current];
|
|
103
|
+
onResizeStartRef.current?.();
|
|
104
|
+
const onMove = (ev) => {
|
|
105
|
+
const deltaPct = ((orientation === "horizontal" ? ev.clientX : ev.clientY) - startPos) / availablePx * 100;
|
|
106
|
+
const newSizes = [...startSizes];
|
|
107
|
+
let left = (startSizes[handleIndex] ?? 0) + deltaPct;
|
|
108
|
+
let right = (startSizes[handleIndex + 1] ?? 0) - deltaPct;
|
|
109
|
+
const cLeft = panelConstraintsRef.current[handleIndex];
|
|
110
|
+
const cRight = panelConstraintsRef.current[handleIndex + 1];
|
|
111
|
+
const minL = cLeft?.minSize ?? 0;
|
|
112
|
+
const maxL = cLeft?.maxSize ?? 100;
|
|
113
|
+
const minR = cRight?.minSize ?? 0;
|
|
114
|
+
const maxR = cRight?.maxSize ?? 100;
|
|
115
|
+
if (left < minL) {
|
|
116
|
+
right += left - minL;
|
|
117
|
+
left = minL;
|
|
118
|
+
}
|
|
119
|
+
if (left > maxL) {
|
|
120
|
+
right -= left - maxL;
|
|
121
|
+
left = maxL;
|
|
122
|
+
}
|
|
123
|
+
if (right < minR) {
|
|
124
|
+
left -= minR - right;
|
|
125
|
+
right = minR;
|
|
126
|
+
}
|
|
127
|
+
if (right > maxR) {
|
|
128
|
+
left += right - maxR;
|
|
129
|
+
right = maxR;
|
|
130
|
+
}
|
|
131
|
+
left = clamp(left, minL, maxL);
|
|
132
|
+
right = clamp(right, minR, maxR);
|
|
133
|
+
newSizes[handleIndex] = left;
|
|
134
|
+
newSizes[handleIndex + 1] = right;
|
|
135
|
+
setSizes(newSizes);
|
|
136
|
+
onResizeRef.current?.(newSizes);
|
|
137
|
+
};
|
|
138
|
+
const onUp = () => {
|
|
139
|
+
document.removeEventListener("pointermove", onMove);
|
|
140
|
+
document.removeEventListener("pointerup", onUp);
|
|
141
|
+
document.body.style.userSelect = "";
|
|
142
|
+
document.body.style.pointerEvents = "";
|
|
143
|
+
onResizeEndRef.current?.([...sizesRef.current]);
|
|
144
|
+
};
|
|
145
|
+
document.addEventListener("pointermove", onMove);
|
|
146
|
+
document.addEventListener("pointerup", onUp);
|
|
147
|
+
document.body.style.userSelect = "none";
|
|
148
|
+
document.body.style.pointerEvents = "none";
|
|
149
|
+
}, [
|
|
150
|
+
isDisabled,
|
|
151
|
+
orientation,
|
|
152
|
+
panelCount
|
|
153
|
+
]);
|
|
154
|
+
const handleKeyDown = useCallback((handleIndex, e) => {
|
|
155
|
+
if (isDisabled) return;
|
|
156
|
+
let delta = 0;
|
|
157
|
+
const step = e.shiftKey ? 10 : 1;
|
|
158
|
+
if (orientation === "horizontal") {
|
|
159
|
+
if (e.key === "ArrowLeft") delta = -step;
|
|
160
|
+
else if (e.key === "ArrowRight") delta = step;
|
|
161
|
+
} else if (e.key === "ArrowUp") delta = -step;
|
|
162
|
+
else if (e.key === "ArrowDown") delta = step;
|
|
163
|
+
if (delta === 0) return;
|
|
164
|
+
e.preventDefault();
|
|
165
|
+
const currentSizes = sizesRef.current;
|
|
166
|
+
const newSizes = [...currentSizes];
|
|
167
|
+
let left = (currentSizes[handleIndex] ?? 0) + delta;
|
|
168
|
+
let right = (currentSizes[handleIndex + 1] ?? 0) - delta;
|
|
169
|
+
const cLeft = panelConstraintsRef.current[handleIndex];
|
|
170
|
+
const cRight = panelConstraintsRef.current[handleIndex + 1];
|
|
171
|
+
const minL = cLeft?.minSize ?? 0;
|
|
172
|
+
const maxL = cLeft?.maxSize ?? 100;
|
|
173
|
+
const minR = cRight?.minSize ?? 0;
|
|
174
|
+
const maxR = cRight?.maxSize ?? 100;
|
|
175
|
+
if (left < minL) {
|
|
176
|
+
right += left - minL;
|
|
177
|
+
left = minL;
|
|
178
|
+
}
|
|
179
|
+
if (left > maxL) {
|
|
180
|
+
right -= left - maxL;
|
|
181
|
+
left = maxL;
|
|
182
|
+
}
|
|
183
|
+
if (right < minR) {
|
|
184
|
+
left -= minR - right;
|
|
185
|
+
right = minR;
|
|
186
|
+
}
|
|
187
|
+
if (right > maxR) {
|
|
188
|
+
left += right - maxR;
|
|
189
|
+
right = maxR;
|
|
190
|
+
}
|
|
191
|
+
left = clamp(left, minL, maxL);
|
|
192
|
+
right = clamp(right, minR, maxR);
|
|
193
|
+
newSizes[handleIndex] = left;
|
|
194
|
+
newSizes[handleIndex + 1] = right;
|
|
195
|
+
setSizes(newSizes);
|
|
196
|
+
onResizeRef.current?.(newSizes);
|
|
197
|
+
}, [isDisabled, orientation]);
|
|
198
|
+
const ctxValue = useMemo(() => ({
|
|
199
|
+
orientation,
|
|
200
|
+
disabled: isDisabled,
|
|
201
|
+
sizes,
|
|
202
|
+
panelConstraintsRef,
|
|
203
|
+
panelRefs,
|
|
204
|
+
setSizes,
|
|
205
|
+
handlePointerDown,
|
|
206
|
+
handleKeyDown
|
|
207
|
+
}), [
|
|
208
|
+
orientation,
|
|
209
|
+
isDisabled,
|
|
210
|
+
sizes,
|
|
211
|
+
handlePointerDown,
|
|
212
|
+
handleKeyDown
|
|
213
|
+
]);
|
|
214
|
+
let panelIdx = 0;
|
|
215
|
+
let handleIdx = 0;
|
|
216
|
+
const mapped = React.Children.map(children, (child) => {
|
|
217
|
+
if (isPanel(child)) {
|
|
218
|
+
const idx = panelIdx++;
|
|
219
|
+
return /* @__PURE__ */ createElement(SplitterPanel, {
|
|
220
|
+
...child.props,
|
|
221
|
+
__panelIndex: idx,
|
|
222
|
+
key: child.key ?? `splitter-panel-${idx}`
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
if (isHandle(child)) {
|
|
226
|
+
const idx = handleIdx++;
|
|
227
|
+
return /* @__PURE__ */ createElement(SplitterHandle, {
|
|
228
|
+
...child.props,
|
|
229
|
+
__handleIndex: idx,
|
|
230
|
+
key: child.key ?? `splitter-handle-${idx}`
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
return child;
|
|
234
|
+
});
|
|
235
|
+
return /* @__PURE__ */ jsx(InternalCtx.Provider, {
|
|
236
|
+
value: ctxValue,
|
|
237
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
238
|
+
ref: rootRef,
|
|
239
|
+
className: clsx(root, orientation === "horizontal" ? rootHorizontal : rootVertical, isDisabled && "w4j08r3", className),
|
|
240
|
+
"data-orientation": orientation,
|
|
241
|
+
children: mapped
|
|
242
|
+
})
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
function SplitterPanel({ defaultSize: _defaultSize, size: _size, minSize = 0, maxSize = 100, collapsible: _collapsible = false, collapsedSize: _collapsedSize = 0, children, className, __panelIndex }) {
|
|
246
|
+
const ctx = useInternalCtx();
|
|
247
|
+
const index = __panelIndex;
|
|
248
|
+
useEffect(() => {
|
|
249
|
+
const ref = ctx.panelConstraintsRef.current;
|
|
250
|
+
ref[index] = {
|
|
251
|
+
minSize,
|
|
252
|
+
maxSize
|
|
253
|
+
};
|
|
254
|
+
return () => {
|
|
255
|
+
ref[index] = void 0;
|
|
256
|
+
};
|
|
257
|
+
}, [
|
|
258
|
+
index,
|
|
259
|
+
minSize,
|
|
260
|
+
maxSize,
|
|
261
|
+
ctx.panelConstraintsRef
|
|
262
|
+
]);
|
|
263
|
+
const panelSize = ctx.sizes[index] ?? 0;
|
|
264
|
+
return /* @__PURE__ */ jsx("div", {
|
|
265
|
+
ref: (el) => {
|
|
266
|
+
ctx.panelRefs.current[index] = el;
|
|
267
|
+
},
|
|
268
|
+
className: clsx(panel, className),
|
|
269
|
+
style: { flex: `${panelSize} 0 0` },
|
|
270
|
+
"data-slot": "splitter-panel",
|
|
271
|
+
children
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
function SplitterHandle({ disabled: handleDisabled, className, __handleIndex }) {
|
|
275
|
+
const ctx = useInternalCtx();
|
|
276
|
+
const index = __handleIndex;
|
|
277
|
+
const [active, setActive] = useState(false);
|
|
278
|
+
const onPointerDown = useCallback((e) => {
|
|
279
|
+
if (handleDisabled || ctx.disabled) return;
|
|
280
|
+
setActive(true);
|
|
281
|
+
ctx.handlePointerDown(index, e);
|
|
282
|
+
}, [
|
|
283
|
+
handleDisabled,
|
|
284
|
+
ctx,
|
|
285
|
+
index
|
|
286
|
+
]);
|
|
287
|
+
const onKeyDown = useCallback((e) => {
|
|
288
|
+
ctx.handleKeyDown(index, e);
|
|
289
|
+
}, [ctx, index]);
|
|
290
|
+
useEffect(() => {
|
|
291
|
+
if (!active) return;
|
|
292
|
+
const onUp = () => setActive(false);
|
|
293
|
+
document.addEventListener("pointerup", onUp);
|
|
294
|
+
return () => document.removeEventListener("pointerup", onUp);
|
|
295
|
+
}, [active]);
|
|
296
|
+
const panelSize = ctx.sizes[index] ?? 0;
|
|
297
|
+
return /* @__PURE__ */ jsx("hr", {
|
|
298
|
+
tabIndex: handleDisabled || ctx.disabled ? -1 : 0,
|
|
299
|
+
"aria-orientation": ctx.orientation,
|
|
300
|
+
"aria-valuenow": Math.round(panelSize),
|
|
301
|
+
"aria-valuemin": 0,
|
|
302
|
+
"aria-valuemax": 100,
|
|
303
|
+
"aria-disabled": handleDisabled || ctx.disabled || void 0,
|
|
304
|
+
onPointerDown,
|
|
305
|
+
onKeyDown,
|
|
306
|
+
className: clsx(handle, ctx.orientation === "horizontal" ? handleHorizontal : handleVertical, active && "w4j08r6", (handleDisabled || ctx.disabled) && handleDisabled, className),
|
|
307
|
+
"data-slot": "splitter-handle"
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
Splitter.Panel = SplitterPanel;
|
|
311
|
+
Splitter.Handle = SplitterHandle;
|
|
312
|
+
//#endregion
|
|
313
|
+
export { Splitter, SplitterHandle, SplitterPanel };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { createRuntimeFn } from "../../node_modules/.bun/@vanilla-extract_recipes@0.5.7_19e937df7e0b57ed/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
//#region src/components/Stack/stack.css.ts
|
|
6
|
+
var stackRecipe = createRuntimeFn({
|
|
7
|
+
defaultClassName: "_82zwcu0",
|
|
8
|
+
variantClassNames: {
|
|
9
|
+
gap: {
|
|
10
|
+
none: "_82zwcu1",
|
|
11
|
+
xxsmall: "_82zwcu2",
|
|
12
|
+
xsmall: "_82zwcu3",
|
|
13
|
+
small: "_82zwcu4",
|
|
14
|
+
medium: "_82zwcu5",
|
|
15
|
+
large: "_82zwcu6",
|
|
16
|
+
xlarge: "_82zwcu7",
|
|
17
|
+
xxlarge: "_82zwcu8",
|
|
18
|
+
xxxlarge: "_82zwcu9",
|
|
19
|
+
huge: "_82zwcua",
|
|
20
|
+
massive: "_82zwcub"
|
|
21
|
+
},
|
|
22
|
+
align: {
|
|
23
|
+
start: "_82zwcuc",
|
|
24
|
+
center: "_82zwcud",
|
|
25
|
+
end: "_82zwcue",
|
|
26
|
+
stretch: "_82zwcuf",
|
|
27
|
+
baseline: "_82zwcug"
|
|
28
|
+
},
|
|
29
|
+
justify: {
|
|
30
|
+
start: "_82zwcuh",
|
|
31
|
+
center: "_82zwcui",
|
|
32
|
+
end: "_82zwcuj",
|
|
33
|
+
between: "_82zwcuk",
|
|
34
|
+
around: "_82zwcul",
|
|
35
|
+
evenly: "_82zwcum",
|
|
36
|
+
stretch: "_82zwcun"
|
|
37
|
+
},
|
|
38
|
+
wrap: { true: "_82zwcuo" }
|
|
39
|
+
},
|
|
40
|
+
defaultVariants: { gap: "medium" },
|
|
41
|
+
compoundVariants: []
|
|
42
|
+
});
|
|
43
|
+
//#endregion
|
|
44
|
+
export { stackRecipe };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import clsx from "../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
2
|
+
import { Box } from "../Box/box.js";
|
|
3
|
+
import { stackRecipe } from "./stack.css.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/Stack/stack.tsx
|
|
6
|
+
function Stack({ gap, align, justify, wrap, className, style, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
8
|
+
display: "flex",
|
|
9
|
+
className: clsx(stackRecipe({
|
|
10
|
+
gap,
|
|
11
|
+
align,
|
|
12
|
+
justify,
|
|
13
|
+
wrap
|
|
14
|
+
}), className),
|
|
15
|
+
style,
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function VStack(props) {
|
|
20
|
+
return /* @__PURE__ */ jsx(Stack, {
|
|
21
|
+
direction: "column",
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function HStack(props) {
|
|
26
|
+
return /* @__PURE__ */ jsx(Stack, {
|
|
27
|
+
direction: "row",
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { HStack, Stack, VStack };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { createRuntimeFn } from "../../node_modules/.bun/@vanilla-extract_recipes@0.5.7_19e937df7e0b57ed/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/Surface/surface.css.ts
|
|
5
|
+
var variantRecipe = createRuntimeFn({
|
|
6
|
+
defaultClassName: "_1vnk5c40",
|
|
7
|
+
variantClassNames: {
|
|
8
|
+
variant: {
|
|
9
|
+
"default": "_1vnk5c41",
|
|
10
|
+
outline: "_1vnk5c42",
|
|
11
|
+
raised: "_1vnk5c43",
|
|
12
|
+
sunken: "_1vnk5c44"
|
|
13
|
+
},
|
|
14
|
+
interactive: { true: "_1vnk5c45" }
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {},
|
|
17
|
+
compoundVariants: []
|
|
18
|
+
});
|
|
19
|
+
//#endregion
|
|
20
|
+
export { variantRecipe };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import clsx from "../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
2
|
+
import { Box } from "../Box/box.js";
|
|
3
|
+
import { variantRecipe } from "./surface.css.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/Surface/surface.tsx
|
|
6
|
+
function Surface({ variant, interactive, className, style, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
8
|
+
className: clsx(variantRecipe({
|
|
9
|
+
variant,
|
|
10
|
+
interactive
|
|
11
|
+
}), className),
|
|
12
|
+
style,
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Surface };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/Switch/switch.css.ts
|
|
5
|
+
var root = "dv64p10";
|
|
6
|
+
var rootChecked = "dv64p11";
|
|
7
|
+
var rootDisabled = "dv64p12";
|
|
8
|
+
var thumb = "dv64p13";
|
|
9
|
+
var thumbChecked = "dv64p14";
|
|
10
|
+
//#endregion
|
|
11
|
+
export { root, rootChecked, rootDisabled, thumb, thumbChecked };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import clsx from "../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
2
|
+
import { root, thumb } from "./switch.css.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Switch } from "@base-ui/react/switch";
|
|
5
|
+
//#region src/components/Switch/switch.tsx
|
|
6
|
+
function Switch$1({ className, style, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Switch.Root, {
|
|
8
|
+
...props,
|
|
9
|
+
render: (renderProps, { checked, disabled }) => /* @__PURE__ */ jsx("span", {
|
|
10
|
+
...renderProps,
|
|
11
|
+
className: clsx(root, checked && "dv64p11", disabled && "dv64p12", className),
|
|
12
|
+
style,
|
|
13
|
+
children: /* @__PURE__ */ jsx(Switch.Thumb, { className: clsx(thumb, checked && "dv64p14") })
|
|
14
|
+
})
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Switch$1 as Switch };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/Table/table.css.ts
|
|
5
|
+
var root = "ksfrvb0";
|
|
6
|
+
var head = "ksfrvb1";
|
|
7
|
+
var header = "ksfrvb2";
|
|
8
|
+
var row = "ksfrvb3";
|
|
9
|
+
var cell = "ksfrvb4";
|
|
10
|
+
var wrapper = "ksfrvb5";
|
|
11
|
+
var alignLeft = "ksfrvb6";
|
|
12
|
+
var alignCenter = "ksfrvb7";
|
|
13
|
+
var alignRight = "ksfrvb8";
|
|
14
|
+
var colorSecondary = "ksfrvb9";
|
|
15
|
+
//#endregion
|
|
16
|
+
export { alignCenter, alignLeft, alignRight, cell, colorSecondary, head, header, root, row, wrapper };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import clsx from "../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
2
|
+
import { alignCenter, alignLeft, alignRight, cell, head, header, root, row, wrapper } from "./table.css.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/Table/table.tsx
|
|
5
|
+
var cellAlignMap = {
|
|
6
|
+
left: alignLeft,
|
|
7
|
+
center: alignCenter,
|
|
8
|
+
right: alignRight
|
|
9
|
+
};
|
|
10
|
+
function getCellValue(col, row) {
|
|
11
|
+
if (col?.cell) return col.cell(row);
|
|
12
|
+
return row[col.key];
|
|
13
|
+
}
|
|
14
|
+
function Table({ columnData, rowData, rowKey, getRowProps, style, className, color }) {
|
|
15
|
+
return /* @__PURE__ */ jsx("div", {
|
|
16
|
+
className: clsx(wrapper, color && "ksfrvb9", className),
|
|
17
|
+
style,
|
|
18
|
+
children: /* @__PURE__ */ jsxs("table", {
|
|
19
|
+
className: clsx(root, color && "ksfrvb9"),
|
|
20
|
+
children: [/* @__PURE__ */ jsx("thead", {
|
|
21
|
+
className: head,
|
|
22
|
+
children: /* @__PURE__ */ jsx("tr", { children: columnData.map((col) => /* @__PURE__ */ jsx("th", {
|
|
23
|
+
style: col.width ? { width: col.width } : void 0,
|
|
24
|
+
className: clsx(header, col.align && cellAlignMap[col.align]),
|
|
25
|
+
children: col.header
|
|
26
|
+
}, col.key.toString())) })
|
|
27
|
+
}), /* @__PURE__ */ jsx("tbody", { children: rowData.map((dataRow, index) => {
|
|
28
|
+
const key = rowKey ? dataRow[rowKey] : index.toString();
|
|
29
|
+
const rowProps = getRowProps?.(dataRow, index);
|
|
30
|
+
return /* @__PURE__ */ jsx("tr", {
|
|
31
|
+
...rowProps,
|
|
32
|
+
className: clsx(row, rowProps?.className),
|
|
33
|
+
children: columnData.map((col) => /* @__PURE__ */ jsx("td", {
|
|
34
|
+
...col.cellProps,
|
|
35
|
+
className: clsx(cell, col.align && cellAlignMap[col.align], col.cellProps?.className || void 0),
|
|
36
|
+
children: getCellValue(col, dataRow)
|
|
37
|
+
}, col.key.toString()))
|
|
38
|
+
}, key);
|
|
39
|
+
}) })]
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { Table };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/Tabs/tabs.css.ts
|
|
5
|
+
var root = "wawfqz0";
|
|
6
|
+
var rootVertical = "wawfqz1";
|
|
7
|
+
var list = "wawfqz2";
|
|
8
|
+
var listUnderline = "wawfqz4";
|
|
9
|
+
var tabUnderlineActive = "wawfqz8";
|
|
10
|
+
var listGhost = "wawfqz9";
|
|
11
|
+
var tabGhost = "wawfqza";
|
|
12
|
+
var tabGhostActive = "wawfqzb";
|
|
13
|
+
var listSegmented = "wawfqzc";
|
|
14
|
+
var tabSegmented = "wawfqzd";
|
|
15
|
+
var tabSegmentedActive = "wawfqze";
|
|
16
|
+
var tab = "wawfqzf";
|
|
17
|
+
var tabVertical = "wawfqzh";
|
|
18
|
+
var tabDisabled = "wawfqzj";
|
|
19
|
+
var tabUnderline = "wawfqzl";
|
|
20
|
+
var panel = "wawfqzp";
|
|
21
|
+
var panelVertical = "wawfqzq";
|
|
22
|
+
//#endregion
|
|
23
|
+
export { list, listGhost, listSegmented, listUnderline, panel, panelVertical, root, rootVertical, tab, tabDisabled, tabGhost, tabGhostActive, tabSegmented, tabSegmentedActive, tabUnderline, tabUnderlineActive, tabVertical };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import clsx from "../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
2
|
+
import { list, panel, root, tab } from "./tabs.css.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import { Tabs } from "@base-ui/react/tabs";
|
|
6
|
+
//#region src/components/Tabs/tabs.tsx
|
|
7
|
+
var DEFAULT_VARIANT = "underline";
|
|
8
|
+
var TabsContext = React$1.createContext(null);
|
|
9
|
+
function useTabsContext() {
|
|
10
|
+
return React$1.useContext(TabsContext) ?? { variant: DEFAULT_VARIANT };
|
|
11
|
+
}
|
|
12
|
+
function Tabs$1({ children, variant = DEFAULT_VARIANT, ...props }) {
|
|
13
|
+
const contextValue = React$1.useMemo(() => ({ variant }), [variant]);
|
|
14
|
+
return /* @__PURE__ */ jsx(TabsContext.Provider, {
|
|
15
|
+
value: contextValue,
|
|
16
|
+
children: /* @__PURE__ */ jsx(Tabs.Root, {
|
|
17
|
+
className: (state) => clsx(root, state.orientation === "vertical" && "wawfqz1"),
|
|
18
|
+
...props,
|
|
19
|
+
children
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function TabsList({ className, ...props }) {
|
|
24
|
+
const { variant } = useTabsContext();
|
|
25
|
+
return /* @__PURE__ */ jsx(Tabs.List, {
|
|
26
|
+
className: clsx(list, variant === "underline" && "wawfqz4", variant === "ghost" && "wawfqz9", variant === "segmented" && "wawfqzc", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function TabsTab({ className, ...props }) {
|
|
31
|
+
const { variant } = useTabsContext();
|
|
32
|
+
return /* @__PURE__ */ jsx(Tabs.Tab, {
|
|
33
|
+
className: (state) => clsx(tab, variant === "underline" && "wawfqzl", variant === "ghost" && "wawfqza", variant === "segmented" && "wawfqzd", state.orientation === "vertical" && "wawfqzh", state.active && variant === "underline" && "wawfqz8", state.active && variant === "ghost" && "wawfqzb", state.active && variant === "segmented" && "wawfqze", state.disabled && "wawfqzj", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function TabsIndicator() {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
function TabsPanel({ className, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsx(Tabs.Panel, {
|
|
42
|
+
className: (state) => clsx(panel, state.orientation === "vertical" && "wawfqzq", className),
|
|
43
|
+
...props
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { Tabs$1 as Tabs, TabsIndicator, TabsList, TabsPanel, TabsTab };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./text.js";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { createRuntimeFn } from "../../node_modules/.bun/@vanilla-extract_recipes@0.5.7_19e937df7e0b57ed/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
|
|
5
|
+
//#region src/components/Text/text.css.ts
|
|
6
|
+
var textVariants = createRuntimeFn({
|
|
7
|
+
defaultClassName: "_1wmhbih0",
|
|
8
|
+
variantClassNames: {
|
|
9
|
+
variant: {
|
|
10
|
+
h1: "_1wmhbih1",
|
|
11
|
+
h2: "_1wmhbih2",
|
|
12
|
+
h3: "_1wmhbih3",
|
|
13
|
+
h4: "_1wmhbih4",
|
|
14
|
+
h5: "_1wmhbih5",
|
|
15
|
+
h6: "_1wmhbih6",
|
|
16
|
+
body1: "_1wmhbih7",
|
|
17
|
+
body2: "_1wmhbih8",
|
|
18
|
+
body3: "_1wmhbih9",
|
|
19
|
+
body4: "_1wmhbiha",
|
|
20
|
+
caption: "_1wmhbihb",
|
|
21
|
+
creatorNote: "_1wmhbihc",
|
|
22
|
+
p: "_1wmhbihd",
|
|
23
|
+
div: "_1wmhbihe",
|
|
24
|
+
code: "_1wmhbihf"
|
|
25
|
+
},
|
|
26
|
+
textAlign: {
|
|
27
|
+
left: "_1wmhbihg",
|
|
28
|
+
center: "_1wmhbihh",
|
|
29
|
+
right: "_1wmhbihi"
|
|
30
|
+
},
|
|
31
|
+
weight: {
|
|
32
|
+
regular: "_1wmhbihj",
|
|
33
|
+
medium: "_1wmhbihk",
|
|
34
|
+
semibold: "_1wmhbihl",
|
|
35
|
+
bold: "_1wmhbihm"
|
|
36
|
+
},
|
|
37
|
+
transform: {
|
|
38
|
+
uppercase: "_1wmhbihn",
|
|
39
|
+
capitalize: "_1wmhbiho",
|
|
40
|
+
none: "_1wmhbihp",
|
|
41
|
+
lowercase: "_1wmhbihq"
|
|
42
|
+
},
|
|
43
|
+
size: {
|
|
44
|
+
xxsmall: "_1wmhbihr",
|
|
45
|
+
xsmall: "_1wmhbihs",
|
|
46
|
+
small: "_1wmhbiht",
|
|
47
|
+
medium: "_1wmhbihu",
|
|
48
|
+
large: "_1wmhbihv",
|
|
49
|
+
xlarge: "_1wmhbihw",
|
|
50
|
+
xxlarge: "_1wmhbihx",
|
|
51
|
+
xxxlarge: "_1wmhbihy",
|
|
52
|
+
huge: "_1wmhbihz",
|
|
53
|
+
massive: "_1wmhbih10",
|
|
54
|
+
titanic: "_1wmhbih11"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
defaultVariants: {},
|
|
58
|
+
compoundVariants: []
|
|
59
|
+
});
|
|
60
|
+
//#endregion
|
|
61
|
+
export { textVariants };
|