@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,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "icon-button",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"title": "IconButton",
|
|
6
|
+
"description": "IconButton component from Blenx UI.",
|
|
7
|
+
"registryDependencies": ["button"],
|
|
8
|
+
"files": [
|
|
9
|
+
{
|
|
10
|
+
"file": "icon-button.tsx",
|
|
11
|
+
"type": "registry:ui",
|
|
12
|
+
"target": "@ui/IconButton/icon-button.tsx"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://blenx-ui.vercel.app/docs/docs-meta.schema.json",
|
|
3
|
+
"title": "Input",
|
|
4
|
+
"description": "A text input component with size presets, error state styling, and auto-generated IDs. Built on Base UI Input primitive.",
|
|
5
|
+
"category": "Forms",
|
|
6
|
+
"status": "stable",
|
|
7
|
+
"keywords": ["input", "text", "form", "field", "text input"],
|
|
8
|
+
"related": ["Field", "InputGroup", "Autocomplete", "Combobox"]
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./input";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { style } from "@vanilla-extract/css";
|
|
2
|
+
import { themeContract } from "@blenx-dev/theme/contract";
|
|
3
|
+
import { spacing } from "@blenx-dev/theme/tokens";
|
|
4
|
+
|
|
5
|
+
export const label = style({
|
|
6
|
+
fontSize: 14,
|
|
7
|
+
display: "inline-flex",
|
|
8
|
+
gap: 4,
|
|
9
|
+
lineHeight: 1.4,
|
|
10
|
+
fontWeight: 400,
|
|
11
|
+
color: themeContract.contentSecondary,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const input = style({
|
|
15
|
+
width: "100%",
|
|
16
|
+
boxSizing: "border-box",
|
|
17
|
+
paddingTop: spacing.small,
|
|
18
|
+
paddingBottom: spacing.small,
|
|
19
|
+
paddingLeft: spacing.medium,
|
|
20
|
+
paddingRight: spacing.medium,
|
|
21
|
+
fontSize: 16,
|
|
22
|
+
lineHeight: 1.5,
|
|
23
|
+
color: themeContract.contentPrimary,
|
|
24
|
+
backgroundColor: themeContract.surface,
|
|
25
|
+
borderWidth: 1,
|
|
26
|
+
borderStyle: "solid",
|
|
27
|
+
borderColor: themeContract.border,
|
|
28
|
+
borderRadius: themeContract.borderRadius,
|
|
29
|
+
outline: "none",
|
|
30
|
+
selectors: {
|
|
31
|
+
"&::placeholder": {
|
|
32
|
+
color: themeContract.contentDisabled,
|
|
33
|
+
},
|
|
34
|
+
"&:disabled": {
|
|
35
|
+
opacity: 0.5,
|
|
36
|
+
cursor: "not-allowed",
|
|
37
|
+
},
|
|
38
|
+
"&:focus-visible": {
|
|
39
|
+
borderColor: themeContract.borderStrong,
|
|
40
|
+
boxShadow: `0 0 0 2px ${themeContract.borderStrong}`,
|
|
41
|
+
},
|
|
42
|
+
"&:focus-visible[aria-invalid='true']": {
|
|
43
|
+
borderColor: themeContract.sentimentNegative,
|
|
44
|
+
boxShadow: `0 0 0 3px ${themeContract.sentimentNegative}`,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export const inputSm = style({
|
|
50
|
+
paddingTop: spacing.xsmall,
|
|
51
|
+
paddingBottom: spacing.xsmall,
|
|
52
|
+
paddingLeft: spacing.small,
|
|
53
|
+
paddingRight: spacing.small,
|
|
54
|
+
fontSize: 16,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export const inputLg = style({
|
|
58
|
+
paddingTop: spacing.medium,
|
|
59
|
+
paddingBottom: spacing.medium,
|
|
60
|
+
paddingLeft: spacing.large,
|
|
61
|
+
paddingRight: spacing.large,
|
|
62
|
+
fontSize: 16,
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export const inputError = style({
|
|
66
|
+
borderColor: themeContract.sentimentNegative,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export const error = style({
|
|
70
|
+
fontSize: 12,
|
|
71
|
+
lineHeight: 1.4,
|
|
72
|
+
color: themeContract.sentimentNegative,
|
|
73
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { VStack } from "../Stack/stack";
|
|
2
|
+
import { Text } from "../Text/text";
|
|
3
|
+
import { Input } from "./input";
|
|
4
|
+
|
|
5
|
+
export function InputDemo() {
|
|
6
|
+
return (
|
|
7
|
+
<VStack gap="medium">
|
|
8
|
+
<VStack gap="medium" padding="medium">
|
|
9
|
+
<Text variant="h6">Size</Text>
|
|
10
|
+
<Input size="sm" placeholder="Small input" />
|
|
11
|
+
<Input placeholder="Default input" />
|
|
12
|
+
<Input size="lg" placeholder="Large input" />
|
|
13
|
+
</VStack>
|
|
14
|
+
<VStack gap="medium" padding="medium">
|
|
15
|
+
<Text variant="h4">States</Text>
|
|
16
|
+
<Input placeholder="Normal input" />
|
|
17
|
+
<Input placeholder="Disabled input" disabled />
|
|
18
|
+
<Input placeholder="With error" error="This field is required" />
|
|
19
|
+
</VStack>
|
|
20
|
+
</VStack>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const demos = [{ name: "Default", component: InputDemo }];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Stack } from "../Stack/stack";
|
|
2
|
+
import { Text } from "../Text/text";
|
|
3
|
+
import { Input } from "./input";
|
|
4
|
+
|
|
5
|
+
export function SizesStory() {
|
|
6
|
+
return (
|
|
7
|
+
<Stack gap="medium">
|
|
8
|
+
<Text variant="h4">Sizess</Text>
|
|
9
|
+
<Input size="sm" placeholder="Small input" />
|
|
10
|
+
<Input size="default" placeholder="Default input" />
|
|
11
|
+
<Input size="lg" placeholder="Large input" />
|
|
12
|
+
</Stack>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function StatesStory() {
|
|
17
|
+
return (
|
|
18
|
+
<Stack gap="medium">
|
|
19
|
+
<Text variant="h4">States</Text>
|
|
20
|
+
<Input placeholder="Normal input" />
|
|
21
|
+
<Input placeholder="Disabled input" disabled />
|
|
22
|
+
<Input placeholder="With error" error="This field is required" />
|
|
23
|
+
</Stack>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import type * as React from "react";
|
|
5
|
+
import { useId } from "react";
|
|
6
|
+
import { input, inputSm, inputLg, inputError, label } from "./input.css";
|
|
7
|
+
|
|
8
|
+
type InputSize = "sm" | "default" | "lg";
|
|
9
|
+
type _BaseInputProps = Omit<InputPrimitive.Props & React.RefAttributes<HTMLInputElement>, "size">;
|
|
10
|
+
export type InputProps = _BaseInputProps & {
|
|
11
|
+
size?: InputSize;
|
|
12
|
+
error?: string;
|
|
13
|
+
wrapperStyle?: React.CSSProperties;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type LabelProps = useRender.ComponentProps<"label"> & {
|
|
19
|
+
className?: string;
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export function Label({ render, className, style, ...props }: LabelProps): React.ReactElement {
|
|
24
|
+
return useRender({
|
|
25
|
+
defaultTagName: "label",
|
|
26
|
+
props: { className: clsx(label, className), style, "data-slot": "label", ...props },
|
|
27
|
+
render,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function Input({ error, className, style, size = "default", ...props }: InputProps) {
|
|
32
|
+
const generatedId = useId();
|
|
33
|
+
const fieldId = props.id ?? generatedId;
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<InputPrimitive
|
|
37
|
+
id={fieldId}
|
|
38
|
+
data-slot="input"
|
|
39
|
+
className={clsx(
|
|
40
|
+
input,
|
|
41
|
+
size === "sm" && inputSm,
|
|
42
|
+
size === "lg" && inputLg,
|
|
43
|
+
error ? inputError : null,
|
|
44
|
+
className,
|
|
45
|
+
)}
|
|
46
|
+
style={style}
|
|
47
|
+
{...props}
|
|
48
|
+
/>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "input",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"title": "Input",
|
|
6
|
+
"description": "A StyleX Input component.",
|
|
7
|
+
"files": [
|
|
8
|
+
{
|
|
9
|
+
"file": "input.tsx",
|
|
10
|
+
"type": "registry:ui",
|
|
11
|
+
"target": "@ui/Input/input.tsx"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"file": "input.css.ts",
|
|
15
|
+
"type": "registry:file",
|
|
16
|
+
"target": "@ui/Input/input.css.ts"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://blenx-ui.vercel.app/docs/docs-meta.schema.json",
|
|
3
|
+
"title": "Input Group",
|
|
4
|
+
"description": "A compound form control group with addon, label, input, textarea, menu, checkbox, and radio sub-components.",
|
|
5
|
+
"category": "Forms",
|
|
6
|
+
"status": "stable",
|
|
7
|
+
"keywords": ["input group", "fieldset", "addon", "form", "group"],
|
|
8
|
+
"related": ["Input", "Field", "Checkbox", "Radio"]
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./input-group";
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { style } from "@vanilla-extract/css";
|
|
2
|
+
import { themeContract } from "@blenx-dev/theme/contract";
|
|
3
|
+
import { borderRadius, fontSize, spacing } from "@blenx-dev/theme/tokens";
|
|
4
|
+
|
|
5
|
+
export const group = style({
|
|
6
|
+
position: "relative",
|
|
7
|
+
display: "inline-flex",
|
|
8
|
+
width: "100%",
|
|
9
|
+
minWidth: 0,
|
|
10
|
+
alignItems: "center",
|
|
11
|
+
borderRadius: borderRadius.large,
|
|
12
|
+
borderWidth: 1,
|
|
13
|
+
borderStyle: "solid",
|
|
14
|
+
borderColor: themeContract.border,
|
|
15
|
+
color: themeContract.contentPrimary,
|
|
16
|
+
fontSize: fontSize.small,
|
|
17
|
+
boxSizing: "border-box",
|
|
18
|
+
minHeight: "40px",
|
|
19
|
+
overflow: "hidden",
|
|
20
|
+
transitionProperty: "border-color, box-shadow",
|
|
21
|
+
transitionDuration: "150ms",
|
|
22
|
+
selectors: {
|
|
23
|
+
"&:focus-within": {
|
|
24
|
+
borderColor: themeContract.borderStrong,
|
|
25
|
+
boxShadow: `0 0 0 2px ${themeContract.borderStrong}`,
|
|
26
|
+
},
|
|
27
|
+
"&:has([aria-invalid='true'])": {
|
|
28
|
+
borderColor: themeContract.sentimentNegative,
|
|
29
|
+
},
|
|
30
|
+
"&:has([aria-invalid='true']:focus-visible)": {
|
|
31
|
+
borderColor: themeContract.sentimentNegative,
|
|
32
|
+
boxShadow: `0 0 0 2px ${themeContract.sentimentNegative}`,
|
|
33
|
+
},
|
|
34
|
+
"&:has(:disabled)": {
|
|
35
|
+
opacity: 0.64,
|
|
36
|
+
cursor: "not-allowed",
|
|
37
|
+
},
|
|
38
|
+
"&:has([data-align='block-start'], [data-align='block-end'])": {
|
|
39
|
+
flexDirection: "column",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export const addon = style({
|
|
45
|
+
display: "flex",
|
|
46
|
+
alignItems: "center",
|
|
47
|
+
justifyContent: "center",
|
|
48
|
+
cursor: "text",
|
|
49
|
+
flexShrink: 0,
|
|
50
|
+
color: themeContract.contentSecondary,
|
|
51
|
+
userSelect: "none",
|
|
52
|
+
fontSize: fontSize.small,
|
|
53
|
+
selectors: {
|
|
54
|
+
"&:has(:last-child[data-slot='badge'])": {
|
|
55
|
+
marginInlineStart: 0,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export const addonInlineStart = style({
|
|
61
|
+
paddingTop: 0,
|
|
62
|
+
paddingBottom: 0,
|
|
63
|
+
paddingLeft: "8px",
|
|
64
|
+
paddingRight: "4px",
|
|
65
|
+
alignSelf: "center",
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export const addonInlineEnd = style({
|
|
69
|
+
order: 1,
|
|
70
|
+
paddingLeft: "4px",
|
|
71
|
+
paddingRight: "4px",
|
|
72
|
+
alignSelf: "stretch",
|
|
73
|
+
display: "flex",
|
|
74
|
+
alignItems: "center",
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export const addonBlockStart = style({
|
|
78
|
+
order: -1,
|
|
79
|
+
width: "100%",
|
|
80
|
+
justifyContent: "flex-start",
|
|
81
|
+
paddingTop: "4px",
|
|
82
|
+
paddingLeft: "4px",
|
|
83
|
+
paddingRight: "4px",
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export const addonBlockEnd = style({
|
|
87
|
+
order: 1,
|
|
88
|
+
width: "100%",
|
|
89
|
+
justifyContent: "flex-start",
|
|
90
|
+
paddingBottom: "4px",
|
|
91
|
+
paddingLeft: "4px",
|
|
92
|
+
paddingRight: "4px",
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
export const text = style({
|
|
96
|
+
display: "flex",
|
|
97
|
+
alignItems: "center",
|
|
98
|
+
gap: spacing.small,
|
|
99
|
+
whiteSpace: "nowrap",
|
|
100
|
+
lineHeight: 1,
|
|
101
|
+
color: themeContract.contentSecondary,
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
export const menu = style({
|
|
105
|
+
display: "flex",
|
|
106
|
+
flexDirection: "column",
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
export const input = style({
|
|
110
|
+
flex: 1,
|
|
111
|
+
minWidth: 0,
|
|
112
|
+
width: "100%",
|
|
113
|
+
height: "100%",
|
|
114
|
+
border: "none",
|
|
115
|
+
outline: "none",
|
|
116
|
+
backgroundColor: "inherit",
|
|
117
|
+
paddingTop: "8px",
|
|
118
|
+
paddingBottom: "6px",
|
|
119
|
+
paddingLeft: "8px",
|
|
120
|
+
paddingRight: "8px",
|
|
121
|
+
borderWidth: 0,
|
|
122
|
+
fontSize: fontSize.small,
|
|
123
|
+
color: themeContract.contentPrimary,
|
|
124
|
+
boxSizing: "border-box",
|
|
125
|
+
lineHeight: 1.5,
|
|
126
|
+
selectors: {
|
|
127
|
+
"&::placeholder": {
|
|
128
|
+
color: themeContract.contentDisabled,
|
|
129
|
+
},
|
|
130
|
+
"&:disabled": {
|
|
131
|
+
opacity: 0.5,
|
|
132
|
+
cursor: "not-allowed",
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
export const textarea = style({
|
|
138
|
+
flex: 1,
|
|
139
|
+
minWidth: 0,
|
|
140
|
+
width: "100%",
|
|
141
|
+
border: "none",
|
|
142
|
+
outline: "none",
|
|
143
|
+
backgroundColor: "transparent",
|
|
144
|
+
paddingTop: "8px",
|
|
145
|
+
paddingBottom: "8px",
|
|
146
|
+
borderWidth: 0,
|
|
147
|
+
paddingLeft: "10px",
|
|
148
|
+
paddingRight: "10px",
|
|
149
|
+
fontSize: fontSize.small,
|
|
150
|
+
color: themeContract.contentPrimary,
|
|
151
|
+
resize: "none",
|
|
152
|
+
selectors: {
|
|
153
|
+
"&::placeholder": {
|
|
154
|
+
color: themeContract.contentDisabled,
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { MagnifyingGlassIcon, UserIcon } from "@phosphor-icons/react";
|
|
2
|
+
import { Button } from "../Button/button";
|
|
3
|
+
import { Stack } from "../Stack/stack";
|
|
4
|
+
import { Text } from "../Text/text";
|
|
5
|
+
import {
|
|
6
|
+
InputGroup,
|
|
7
|
+
InputGroupAddon,
|
|
8
|
+
InputGroupInput,
|
|
9
|
+
InputGroupText,
|
|
10
|
+
InputGroupTextarea,
|
|
11
|
+
} from "./input-group";
|
|
12
|
+
|
|
13
|
+
export function DefaultStory() {
|
|
14
|
+
return (
|
|
15
|
+
<Stack gap="medium">
|
|
16
|
+
<Text variant="h4">With icon and button</Text>
|
|
17
|
+
<InputGroup>
|
|
18
|
+
<InputGroupAddon align="inline-start">
|
|
19
|
+
<MagnifyingGlassIcon size={16} />
|
|
20
|
+
</InputGroupAddon>
|
|
21
|
+
<InputGroupInput placeholder="Search..." />
|
|
22
|
+
<InputGroupAddon align="inline-end">
|
|
23
|
+
<Button size="small" variant="ghost">
|
|
24
|
+
Go
|
|
25
|
+
</Button>
|
|
26
|
+
</InputGroupAddon>
|
|
27
|
+
</InputGroup>
|
|
28
|
+
<InputGroup>
|
|
29
|
+
<InputGroupAddon align="block-start">
|
|
30
|
+
<MagnifyingGlassIcon size={16} />
|
|
31
|
+
</InputGroupAddon>
|
|
32
|
+
<InputGroupTextarea placeholder="Search..." />
|
|
33
|
+
<InputGroupAddon align="block-end">
|
|
34
|
+
<Button size="small" variant="ghost">
|
|
35
|
+
Go
|
|
36
|
+
</Button>
|
|
37
|
+
</InputGroupAddon>
|
|
38
|
+
</InputGroup>
|
|
39
|
+
<Text variant="h4">With text addon</Text>
|
|
40
|
+
<InputGroup>
|
|
41
|
+
<InputGroupAddon align="inline-start">
|
|
42
|
+
<UserIcon size={16} />
|
|
43
|
+
</InputGroupAddon>
|
|
44
|
+
<InputGroupInput placeholder="Username" aria-invalid />
|
|
45
|
+
<InputGroupAddon align="inline-end">
|
|
46
|
+
<InputGroupText>@example.com</InputGroupText>
|
|
47
|
+
</InputGroupAddon>
|
|
48
|
+
</InputGroup>
|
|
49
|
+
</Stack>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const demos = [{ name: "Input group", component: DefaultStory }];
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useRender } from "@base-ui/react";
|
|
4
|
+
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
5
|
+
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
6
|
+
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
7
|
+
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
8
|
+
import clsx from "clsx";
|
|
9
|
+
import type * as React from "react";
|
|
10
|
+
import {
|
|
11
|
+
group,
|
|
12
|
+
addon,
|
|
13
|
+
addonInlineStart,
|
|
14
|
+
addonInlineEnd,
|
|
15
|
+
addonBlockStart,
|
|
16
|
+
addonBlockEnd,
|
|
17
|
+
text as textStyle,
|
|
18
|
+
menu,
|
|
19
|
+
input as inputStyle,
|
|
20
|
+
textarea as textareaStyle,
|
|
21
|
+
} from "./input-group.css";
|
|
22
|
+
import type { _BaseDivProps } from "../../utils/types";
|
|
23
|
+
|
|
24
|
+
type Align = "inline-start" | "inline-end" | "block-start" | "block-end";
|
|
25
|
+
|
|
26
|
+
type InputGroupProps = useRender.ComponentProps<"fieldset">;
|
|
27
|
+
|
|
28
|
+
function InputGroup({ className, ...props }: InputGroupProps): React.ReactElement {
|
|
29
|
+
return <fieldset className={clsx(group, className)} data-slot="input-group" {...props} />;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type InputGroupAddonProps = _BaseDivProps & {
|
|
33
|
+
align?: Align;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
function InputGroupAddon({
|
|
37
|
+
align = "inline-start",
|
|
38
|
+
className,
|
|
39
|
+
...props
|
|
40
|
+
}: InputGroupAddonProps): React.ReactElement {
|
|
41
|
+
return (
|
|
42
|
+
<div
|
|
43
|
+
className={clsx(
|
|
44
|
+
addon,
|
|
45
|
+
align === "inline-start" && addonInlineStart,
|
|
46
|
+
align === "inline-end" && addonInlineEnd,
|
|
47
|
+
align === "block-start" && addonBlockStart,
|
|
48
|
+
align === "block-end" && addonBlockEnd,
|
|
49
|
+
className,
|
|
50
|
+
)}
|
|
51
|
+
data-align={align}
|
|
52
|
+
data-slot="input-group-addon"
|
|
53
|
+
role="presentation"
|
|
54
|
+
onMouseDown={(e: React.MouseEvent<HTMLDivElement>) => {
|
|
55
|
+
const target = e.target as HTMLElement;
|
|
56
|
+
const isInteractive = target.closest(
|
|
57
|
+
"button, a, input, select, textarea, [role='button'], [role='combobox'], [role='listbox'], [data-slot='select-trigger']",
|
|
58
|
+
);
|
|
59
|
+
if (isInteractive) return;
|
|
60
|
+
e.preventDefault();
|
|
61
|
+
const parent = e.currentTarget.parentElement;
|
|
62
|
+
const input = parent?.querySelector<HTMLInputElement | HTMLTextAreaElement>(
|
|
63
|
+
"input, textarea",
|
|
64
|
+
);
|
|
65
|
+
if (input && !parent?.querySelector("input:focus, textarea:focus")) {
|
|
66
|
+
input.focus();
|
|
67
|
+
}
|
|
68
|
+
}}
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
type InputGroupTextProps = React.ComponentProps<"span">;
|
|
75
|
+
|
|
76
|
+
function InputGroupText({ className, ...props }: InputGroupTextProps): React.ReactElement {
|
|
77
|
+
return <span className={clsx(textStyle, className)} {...props} />;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
type InputGroupInputProps = Omit<
|
|
81
|
+
InputPrimitive.Props & React.RefAttributes<HTMLInputElement>,
|
|
82
|
+
"style"
|
|
83
|
+
>;
|
|
84
|
+
|
|
85
|
+
function InputGroupInput({ className, ...props }: InputGroupInputProps): React.ReactElement {
|
|
86
|
+
return (
|
|
87
|
+
<InputPrimitive className={clsx(inputStyle, className)} data-slot="input-control" {...props} />
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
type InputGroupTextareaProps = Omit<React.ComponentPropsWithoutRef<"textarea">, "style">;
|
|
92
|
+
|
|
93
|
+
function InputGroupTextarea({ ...props }: InputGroupTextareaProps): React.ReactElement {
|
|
94
|
+
return <textarea className={textareaStyle} rows={4} data-slot="textarea-control" {...props} />;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function InputGroupMenu({
|
|
98
|
+
className,
|
|
99
|
+
render,
|
|
100
|
+
...props
|
|
101
|
+
}: useRender.ComponentProps<"nav">): React.ReactElement {
|
|
102
|
+
return useRender({
|
|
103
|
+
defaultTagName: "nav",
|
|
104
|
+
props: {
|
|
105
|
+
className: clsx(menu, className),
|
|
106
|
+
"data-slot": "input-group-menu",
|
|
107
|
+
...props,
|
|
108
|
+
} as never,
|
|
109
|
+
render,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const InputGroupCheckboxItem = CheckboxPrimitive.Root;
|
|
114
|
+
const InputGroupRadioGroup = RadioGroupPrimitive;
|
|
115
|
+
const InputGroupRadioItem = RadioPrimitive.Root;
|
|
116
|
+
|
|
117
|
+
export type {
|
|
118
|
+
InputGroupAddonProps,
|
|
119
|
+
InputGroupInputProps,
|
|
120
|
+
InputGroupProps,
|
|
121
|
+
InputGroupTextareaProps,
|
|
122
|
+
};
|
|
123
|
+
export {
|
|
124
|
+
InputGroup,
|
|
125
|
+
InputGroupAddon,
|
|
126
|
+
InputGroupCheckboxItem,
|
|
127
|
+
InputGroupInput,
|
|
128
|
+
InputGroupMenu,
|
|
129
|
+
InputGroupRadioGroup,
|
|
130
|
+
InputGroupRadioItem,
|
|
131
|
+
InputGroupText,
|
|
132
|
+
InputGroupTextarea,
|
|
133
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "inputgroup",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"title": "InputGroup",
|
|
6
|
+
"description": "A StyleX Input Group component.",
|
|
7
|
+
"files": [
|
|
8
|
+
{
|
|
9
|
+
"file": "input-group.tsx",
|
|
10
|
+
"type": "registry:ui",
|
|
11
|
+
"target": "@ui/InputGroup/input-group.tsx"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"file": "input-group.css.ts",
|
|
15
|
+
"type": "registry:file",
|
|
16
|
+
"target": "@ui/InputGroup/input-group.css.ts"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://blenx-ui.vercel.app/docs/docs-meta.schema.json",
|
|
3
|
+
"title": "Menu",
|
|
4
|
+
"description": "A dropdown menu with items, separators, group labels, and shortcuts. Built on Base UI Menu.",
|
|
5
|
+
"category": "Navigation",
|
|
6
|
+
"status": "stable",
|
|
7
|
+
"keywords": ["menu", "dropdown", "context menu", "navigation"],
|
|
8
|
+
"related": ["Button"],
|
|
9
|
+
"accessibility": {
|
|
10
|
+
"keyboard": ["ArrowUp", "ArrowDown", "Enter", "Escape"],
|
|
11
|
+
"aria": ["role", "aria-orientation"]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./menu";
|