@verdify/ui 0.1.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/LICENSE +12 -0
- package/README.md +117 -0
- package/dist/components/accordion/accordion.d.ts +66 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.js +97 -0
- package/dist/components/accordion/accordion.js.map +1 -0
- package/dist/components/accordion/accordion.variants.d.ts +9 -0
- package/dist/components/accordion/accordion.variants.d.ts.map +1 -0
- package/dist/components/accordion/accordion.variants.js +54 -0
- package/dist/components/accordion/accordion.variants.js.map +1 -0
- package/dist/components/accordion/index.d.ts +3 -0
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/accordion/index.js +25 -0
- package/dist/components/accordion/index.js.map +1 -0
- package/dist/components/agent-badge/agent-badge.d.ts +56 -0
- package/dist/components/agent-badge/agent-badge.d.ts.map +1 -0
- package/dist/components/agent-badge/agent-badge.js +35 -0
- package/dist/components/agent-badge/agent-badge.js.map +1 -0
- package/dist/components/agent-badge/agent-badge.variants.d.ts +7 -0
- package/dist/components/agent-badge/agent-badge.variants.d.ts.map +1 -0
- package/dist/components/agent-badge/agent-badge.variants.js +35 -0
- package/dist/components/agent-badge/agent-badge.variants.js.map +1 -0
- package/dist/components/agent-badge/index.d.ts +3 -0
- package/dist/components/agent-badge/index.d.ts.map +1 -0
- package/dist/components/agent-badge/index.js +11 -0
- package/dist/components/agent-badge/index.js.map +1 -0
- package/dist/components/alert/alert.d.ts +94 -0
- package/dist/components/alert/alert.d.ts.map +1 -0
- package/dist/components/alert/alert.js +105 -0
- package/dist/components/alert/alert.js.map +1 -0
- package/dist/components/alert/alert.variants.d.ts +15 -0
- package/dist/components/alert/alert.variants.d.ts.map +1 -0
- package/dist/components/alert/alert.variants.js +74 -0
- package/dist/components/alert/alert.variants.js.map +1 -0
- package/dist/components/alert/index.d.ts +3 -0
- package/dist/components/alert/index.d.ts.map +1 -0
- package/dist/components/alert/index.js +37 -0
- package/dist/components/alert/index.js.map +1 -0
- package/dist/components/avatar/avatar.d.ts +56 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/avatar.js +107 -0
- package/dist/components/avatar/avatar.js.map +1 -0
- package/dist/components/avatar/avatar.variants.d.ts +11 -0
- package/dist/components/avatar/avatar.variants.d.ts.map +1 -0
- package/dist/components/avatar/avatar.variants.js +48 -0
- package/dist/components/avatar/avatar.variants.js.map +1 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/avatar/index.d.ts.map +1 -0
- package/dist/components/avatar/index.js +15 -0
- package/dist/components/avatar/index.js.map +1 -0
- package/dist/components/badge/badge.d.ts +30 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/badge.js +33 -0
- package/dist/components/badge/badge.js.map +1 -0
- package/dist/components/badge/badge.variants.d.ts +7 -0
- package/dist/components/badge/badge.variants.d.ts.map +1 -0
- package/dist/components/badge/badge.variants.js +33 -0
- package/dist/components/badge/badge.variants.js.map +1 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/badge/index.js +8 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +90 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.js +143 -0
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.variants.d.ts +10 -0
- package/dist/components/breadcrumb/breadcrumb.variants.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.variants.js +41 -0
- package/dist/components/breadcrumb/breadcrumb.variants.js.map +1 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/breadcrumb/index.d.ts.map +1 -0
- package/dist/components/breadcrumb/index.js +35 -0
- package/dist/components/breadcrumb/index.js.map +1 -0
- package/dist/components/button/button.d.ts +10 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/button.js +42 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button/button.variants.d.ts +6 -0
- package/dist/components/button/button.variants.d.ts.map +1 -0
- package/dist/components/button/button.variants.js +45 -0
- package/dist/components/button/button.variants.js.map +1 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +7 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/card/card.d.ts +59 -0
- package/dist/components/card/card.d.ts.map +1 -0
- package/dist/components/card/card.js +101 -0
- package/dist/components/card/card.js.map +1 -0
- package/dist/components/card/card.variants.d.ts +13 -0
- package/dist/components/card/card.variants.d.ts.map +1 -0
- package/dist/components/card/card.variants.js +64 -0
- package/dist/components/card/card.variants.js.map +1 -0
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/card/index.d.ts.map +1 -0
- package/dist/components/card/index.js +35 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +20 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.js +102 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/checkbox/checkbox.variants.d.ts +15 -0
- package/dist/components/checkbox/checkbox.variants.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.variants.js +70 -0
- package/dist/components/checkbox/checkbox.variants.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/index.js +11 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/command-palette/command-palette.d.ts +76 -0
- package/dist/components/command-palette/command-palette.d.ts.map +1 -0
- package/dist/components/command-palette/command-palette.js +271 -0
- package/dist/components/command-palette/command-palette.js.map +1 -0
- package/dist/components/command-palette/command-palette.variants.d.ts +18 -0
- package/dist/components/command-palette/command-palette.variants.d.ts.map +1 -0
- package/dist/components/command-palette/command-palette.variants.js +62 -0
- package/dist/components/command-palette/command-palette.variants.js.map +1 -0
- package/dist/components/command-palette/index.d.ts +3 -0
- package/dist/components/command-palette/index.d.ts.map +1 -0
- package/dist/components/command-palette/index.js +35 -0
- package/dist/components/command-palette/index.js.map +1 -0
- package/dist/components/consent-toggle/consent-toggle.d.ts +107 -0
- package/dist/components/consent-toggle/consent-toggle.d.ts.map +1 -0
- package/dist/components/consent-toggle/consent-toggle.js +68 -0
- package/dist/components/consent-toggle/consent-toggle.js.map +1 -0
- package/dist/components/consent-toggle/consent-toggle.variants.d.ts +10 -0
- package/dist/components/consent-toggle/consent-toggle.variants.d.ts.map +1 -0
- package/dist/components/consent-toggle/consent-toggle.variants.js +29 -0
- package/dist/components/consent-toggle/consent-toggle.variants.js.map +1 -0
- package/dist/components/consent-toggle/index.d.ts +3 -0
- package/dist/components/consent-toggle/index.d.ts.map +1 -0
- package/dist/components/consent-toggle/index.js +19 -0
- package/dist/components/consent-toggle/index.js.map +1 -0
- package/dist/components/credential-card/credential-card.d.ts +144 -0
- package/dist/components/credential-card/credential-card.d.ts.map +1 -0
- package/dist/components/credential-card/credential-card.js +117 -0
- package/dist/components/credential-card/credential-card.js.map +1 -0
- package/dist/components/credential-card/credential-card.variants.d.ts +15 -0
- package/dist/components/credential-card/credential-card.variants.d.ts.map +1 -0
- package/dist/components/credential-card/credential-card.variants.js +48 -0
- package/dist/components/credential-card/credential-card.variants.js.map +1 -0
- package/dist/components/credential-card/index.d.ts +3 -0
- package/dist/components/credential-card/index.d.ts.map +1 -0
- package/dist/components/credential-card/index.js +29 -0
- package/dist/components/credential-card/index.js.map +1 -0
- package/dist/components/data-grid/data-grid.d.ts +247 -0
- package/dist/components/data-grid/data-grid.d.ts.map +1 -0
- package/dist/components/data-grid/data-grid.js +529 -0
- package/dist/components/data-grid/data-grid.js.map +1 -0
- package/dist/components/data-grid/data-grid.variants.d.ts +29 -0
- package/dist/components/data-grid/data-grid.variants.d.ts.map +1 -0
- package/dist/components/data-grid/data-grid.variants.js +110 -0
- package/dist/components/data-grid/data-grid.variants.js.map +1 -0
- package/dist/components/data-grid/index.d.ts +3 -0
- package/dist/components/data-grid/index.d.ts.map +1 -0
- package/dist/components/data-grid/index.js +59 -0
- package/dist/components/data-grid/index.js.map +1 -0
- package/dist/components/dialog/dialog.d.ts +98 -0
- package/dist/components/dialog/dialog.d.ts.map +1 -0
- package/dist/components/dialog/dialog.js +121 -0
- package/dist/components/dialog/dialog.js.map +1 -0
- package/dist/components/dialog/dialog.variants.d.ts +14 -0
- package/dist/components/dialog/dialog.variants.d.ts.map +1 -0
- package/dist/components/dialog/dialog.variants.js +71 -0
- package/dist/components/dialog/dialog.variants.js.map +1 -0
- package/dist/components/dialog/index.d.ts +3 -0
- package/dist/components/dialog/index.d.ts.map +1 -0
- package/dist/components/dialog/index.js +31 -0
- package/dist/components/dialog/index.js.map +1 -0
- package/dist/components/identity-chip/identity-chip.d.ts +121 -0
- package/dist/components/identity-chip/identity-chip.d.ts.map +1 -0
- package/dist/components/identity-chip/identity-chip.js +203 -0
- package/dist/components/identity-chip/identity-chip.js.map +1 -0
- package/dist/components/identity-chip/identity-chip.variants.d.ts +11 -0
- package/dist/components/identity-chip/identity-chip.variants.d.ts.map +1 -0
- package/dist/components/identity-chip/identity-chip.variants.js +61 -0
- package/dist/components/identity-chip/identity-chip.variants.js.map +1 -0
- package/dist/components/identity-chip/index.d.ts +3 -0
- package/dist/components/identity-chip/index.d.ts.map +1 -0
- package/dist/components/identity-chip/index.js +21 -0
- package/dist/components/identity-chip/index.js.map +1 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/index.js +11 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input/input.d.ts +17 -0
- package/dist/components/input/input.d.ts.map +1 -0
- package/dist/components/input/input.js +71 -0
- package/dist/components/input/input.js.map +1 -0
- package/dist/components/input/input.variants.d.ts +11 -0
- package/dist/components/input/input.variants.d.ts.map +1 -0
- package/dist/components/input/input.variants.js +64 -0
- package/dist/components/input/input.variants.js.map +1 -0
- package/dist/components/label/index.d.ts +3 -0
- package/dist/components/label/index.d.ts.map +1 -0
- package/dist/components/label/index.js +13 -0
- package/dist/components/label/index.js.map +1 -0
- package/dist/components/label/label.d.ts +16 -0
- package/dist/components/label/label.d.ts.map +1 -0
- package/dist/components/label/label.js +27 -0
- package/dist/components/label/label.js.map +1 -0
- package/dist/components/label/label.variants.d.ts +8 -0
- package/dist/components/label/label.variants.d.ts.map +1 -0
- package/dist/components/label/label.variants.js +27 -0
- package/dist/components/label/label.variants.js.map +1 -0
- package/dist/components/menu/index.d.ts +3 -0
- package/dist/components/menu/index.d.ts.map +1 -0
- package/dist/components/menu/index.js +43 -0
- package/dist/components/menu/index.js.map +1 -0
- package/dist/components/menu/menu.d.ts +115 -0
- package/dist/components/menu/menu.d.ts.map +1 -0
- package/dist/components/menu/menu.js +130 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/menu/menu.variants.d.ts +13 -0
- package/dist/components/menu/menu.variants.d.ts.map +1 -0
- package/dist/components/menu/menu.variants.js +56 -0
- package/dist/components/menu/menu.variants.js.map +1 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.d.ts.map +1 -0
- package/dist/components/pagination/index.js +37 -0
- package/dist/components/pagination/index.js.map +1 -0
- package/dist/components/pagination/pagination.d.ts +118 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -0
- package/dist/components/pagination/pagination.js +204 -0
- package/dist/components/pagination/pagination.js.map +1 -0
- package/dist/components/pagination/pagination.variants.d.ts +13 -0
- package/dist/components/pagination/pagination.variants.d.ts.map +1 -0
- package/dist/components/pagination/pagination.variants.js +63 -0
- package/dist/components/pagination/pagination.variants.js.map +1 -0
- package/dist/components/popover/index.d.ts +3 -0
- package/dist/components/popover/index.d.ts.map +1 -0
- package/dist/components/popover/index.js +39 -0
- package/dist/components/popover/index.js.map +1 -0
- package/dist/components/popover/popover.d.ts +92 -0
- package/dist/components/popover/popover.d.ts.map +1 -0
- package/dist/components/popover/popover.js +135 -0
- package/dist/components/popover/popover.js.map +1 -0
- package/dist/components/popover/popover.variants.d.ts +9 -0
- package/dist/components/popover/popover.variants.d.ts.map +1 -0
- package/dist/components/popover/popover.variants.js +19 -0
- package/dist/components/popover/popover.variants.js.map +1 -0
- package/dist/components/progress/index.d.ts +3 -0
- package/dist/components/progress/index.d.ts.map +1 -0
- package/dist/components/progress/index.js +23 -0
- package/dist/components/progress/index.js.map +1 -0
- package/dist/components/progress/progress.d.ts +71 -0
- package/dist/components/progress/progress.d.ts.map +1 -0
- package/dist/components/progress/progress.js +91 -0
- package/dist/components/progress/progress.js.map +1 -0
- package/dist/components/progress/progress.variants.d.ts +14 -0
- package/dist/components/progress/progress.variants.d.ts.map +1 -0
- package/dist/components/progress/progress.variants.js +37 -0
- package/dist/components/progress/progress.variants.js.map +1 -0
- package/dist/components/radio/index.d.ts +3 -0
- package/dist/components/radio/index.d.ts.map +1 -0
- package/dist/components/radio/index.js +22 -0
- package/dist/components/radio/index.js.map +1 -0
- package/dist/components/radio/radio.d.ts +23 -0
- package/dist/components/radio/radio.d.ts.map +1 -0
- package/dist/components/radio/radio.js +183 -0
- package/dist/components/radio/radio.js.map +1 -0
- package/dist/components/radio/radio.variants.d.ts +17 -0
- package/dist/components/radio/radio.variants.d.ts.map +1 -0
- package/dist/components/radio/radio.variants.js +60 -0
- package/dist/components/radio/radio.variants.js.map +1 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/select/index.js +9 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/select/select.d.ts +27 -0
- package/dist/components/select/select.d.ts.map +1 -0
- package/dist/components/select/select.js +145 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/select/select.variants.d.ts +18 -0
- package/dist/components/select/select.variants.d.ts.map +1 -0
- package/dist/components/select/select.variants.js +102 -0
- package/dist/components/select/select.variants.js.map +1 -0
- package/dist/components/separator/index.d.ts +3 -0
- package/dist/components/separator/index.d.ts.map +1 -0
- package/dist/components/separator/index.js +15 -0
- package/dist/components/separator/index.js.map +1 -0
- package/dist/components/separator/separator.d.ts +23 -0
- package/dist/components/separator/separator.d.ts.map +1 -0
- package/dist/components/separator/separator.js +61 -0
- package/dist/components/separator/separator.js.map +1 -0
- package/dist/components/separator/separator.variants.d.ts +13 -0
- package/dist/components/separator/separator.variants.d.ts.map +1 -0
- package/dist/components/separator/separator.variants.js +46 -0
- package/dist/components/separator/separator.variants.js.map +1 -0
- package/dist/components/sheet/index.d.ts +3 -0
- package/dist/components/sheet/index.d.ts.map +1 -0
- package/dist/components/sheet/index.js +31 -0
- package/dist/components/sheet/index.js.map +1 -0
- package/dist/components/sheet/sheet.d.ts +102 -0
- package/dist/components/sheet/sheet.d.ts.map +1 -0
- package/dist/components/sheet/sheet.js +120 -0
- package/dist/components/sheet/sheet.js.map +1 -0
- package/dist/components/sheet/sheet.variants.d.ts +15 -0
- package/dist/components/sheet/sheet.variants.d.ts.map +1 -0
- package/dist/components/sheet/sheet.variants.js +97 -0
- package/dist/components/sheet/sheet.variants.js.map +1 -0
- package/dist/components/sidebar/index.d.ts +3 -0
- package/dist/components/sidebar/index.d.ts.map +1 -0
- package/dist/components/sidebar/index.js +43 -0
- package/dist/components/sidebar/index.js.map +1 -0
- package/dist/components/sidebar/sidebar.d.ts +114 -0
- package/dist/components/sidebar/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar.js +202 -0
- package/dist/components/sidebar/sidebar.js.map +1 -0
- package/dist/components/sidebar/sidebar.variants.d.ts +19 -0
- package/dist/components/sidebar/sidebar.variants.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar.variants.js +93 -0
- package/dist/components/sidebar/sidebar.variants.js.map +1 -0
- package/dist/components/skeleton/index.d.ts +3 -0
- package/dist/components/skeleton/index.d.ts.map +1 -0
- package/dist/components/skeleton/index.js +15 -0
- package/dist/components/skeleton/index.js.map +1 -0
- package/dist/components/skeleton/skeleton.d.ts +42 -0
- package/dist/components/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.js +54 -0
- package/dist/components/skeleton/skeleton.js.map +1 -0
- package/dist/components/skeleton/skeleton.variants.d.ts +9 -0
- package/dist/components/skeleton/skeleton.variants.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.variants.js +31 -0
- package/dist/components/skeleton/skeleton.variants.js.map +1 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/components/spinner/index.js +13 -0
- package/dist/components/spinner/index.js.map +1 -0
- package/dist/components/spinner/spinner.d.ts +41 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/spinner/spinner.js +48 -0
- package/dist/components/spinner/spinner.js.map +1 -0
- package/dist/components/spinner/spinner.variants.d.ts +8 -0
- package/dist/components/spinner/spinner.variants.d.ts.map +1 -0
- package/dist/components/spinner/spinner.variants.js +32 -0
- package/dist/components/spinner/spinner.variants.js.map +1 -0
- package/dist/components/switch/index.d.ts +3 -0
- package/dist/components/switch/index.d.ts.map +1 -0
- package/dist/components/switch/index.js +15 -0
- package/dist/components/switch/index.js.map +1 -0
- package/dist/components/switch/switch.d.ts +20 -0
- package/dist/components/switch/switch.d.ts.map +1 -0
- package/dist/components/switch/switch.js +107 -0
- package/dist/components/switch/switch.js.map +1 -0
- package/dist/components/switch/switch.variants.d.ts +14 -0
- package/dist/components/switch/switch.variants.d.ts.map +1 -0
- package/dist/components/switch/switch.variants.js +69 -0
- package/dist/components/switch/switch.variants.js.map +1 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/table/index.js +51 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/table/table.d.ts +173 -0
- package/dist/components/table/table.d.ts.map +1 -0
- package/dist/components/table/table.js +172 -0
- package/dist/components/table/table.js.map +1 -0
- package/dist/components/table/table.variants.d.ts +39 -0
- package/dist/components/table/table.variants.d.ts.map +1 -0
- package/dist/components/table/table.variants.js +124 -0
- package/dist/components/table/table.variants.js.map +1 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tabs/index.js +21 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/tabs/tabs.d.ts +66 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tabs/tabs.js +81 -0
- package/dist/components/tabs/tabs.js.map +1 -0
- package/dist/components/tabs/tabs.variants.d.ts +15 -0
- package/dist/components/tabs/tabs.variants.d.ts.map +1 -0
- package/dist/components/tabs/tabs.variants.js +98 -0
- package/dist/components/tabs/tabs.variants.js.map +1 -0
- package/dist/components/textarea/index.d.ts +3 -0
- package/dist/components/textarea/index.d.ts.map +1 -0
- package/dist/components/textarea/index.js +7 -0
- package/dist/components/textarea/index.js.map +1 -0
- package/dist/components/textarea/textarea.d.ts +18 -0
- package/dist/components/textarea/textarea.d.ts.map +1 -0
- package/dist/components/textarea/textarea.js +136 -0
- package/dist/components/textarea/textarea.js.map +1 -0
- package/dist/components/textarea/textarea.variants.d.ts +6 -0
- package/dist/components/textarea/textarea.variants.d.ts.map +1 -0
- package/dist/components/textarea/textarea.variants.js +53 -0
- package/dist/components/textarea/textarea.variants.js.map +1 -0
- package/dist/components/toast/index.d.ts +3 -0
- package/dist/components/toast/index.d.ts.map +1 -0
- package/dist/components/toast/index.js +43 -0
- package/dist/components/toast/index.js.map +1 -0
- package/dist/components/toast/toast.d.ts +140 -0
- package/dist/components/toast/toast.d.ts.map +1 -0
- package/dist/components/toast/toast.js +123 -0
- package/dist/components/toast/toast.js.map +1 -0
- package/dist/components/toast/toast.variants.d.ts +16 -0
- package/dist/components/toast/toast.variants.d.ts.map +1 -0
- package/dist/components/toast/toast.variants.js +77 -0
- package/dist/components/toast/toast.variants.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/index.js +16 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +81 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.js +44 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/components/tooltip/tooltip.variants.d.ts +3 -0
- package/dist/components/tooltip/tooltip.variants.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.variants.js +7 -0
- package/dist/components/tooltip/tooltip.variants.js.map +1 -0
- package/dist/components/trust-score/index.d.ts +3 -0
- package/dist/components/trust-score/index.d.ts.map +1 -0
- package/dist/components/trust-score/index.js +11 -0
- package/dist/components/trust-score/index.js.map +1 -0
- package/dist/components/trust-score/trust-score.d.ts +100 -0
- package/dist/components/trust-score/trust-score.d.ts.map +1 -0
- package/dist/components/trust-score/trust-score.js +146 -0
- package/dist/components/trust-score/trust-score.js.map +1 -0
- package/dist/components/trust-score/trust-score.variants.d.ts +16 -0
- package/dist/components/trust-score/trust-score.variants.d.ts.map +1 -0
- package/dist/components/trust-score/trust-score.variants.js +50 -0
- package/dist/components/trust-score/trust-score.variants.js.map +1 -0
- package/dist/components/verified-badge/index.d.ts +3 -0
- package/dist/components/verified-badge/index.d.ts.map +1 -0
- package/dist/components/verified-badge/index.js +15 -0
- package/dist/components/verified-badge/index.js.map +1 -0
- package/dist/components/verified-badge/verified-badge.d.ts +55 -0
- package/dist/components/verified-badge/verified-badge.d.ts.map +1 -0
- package/dist/components/verified-badge/verified-badge.js +67 -0
- package/dist/components/verified-badge/verified-badge.js.map +1 -0
- package/dist/components/verified-badge/verified-badge.variants.d.ts +11 -0
- package/dist/components/verified-badge/verified-badge.variants.d.ts.map +1 -0
- package/dist/components/verified-badge/verified-badge.variants.js +45 -0
- package/dist/components/verified-badge/verified-badge.variants.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +322 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/cn.d.ts +3 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +24 -0
- package/dist/lib/cn.js.map +1 -0
- package/package.json +74 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Tabs,
|
|
3
|
+
TabsList,
|
|
4
|
+
TabsTab,
|
|
5
|
+
TabsPanel
|
|
6
|
+
} from "./tabs";
|
|
7
|
+
import {
|
|
8
|
+
tabsListVariants,
|
|
9
|
+
tabsTabVariants,
|
|
10
|
+
tabsPanelVariants
|
|
11
|
+
} from "./tabs.variants";
|
|
12
|
+
export {
|
|
13
|
+
Tabs,
|
|
14
|
+
TabsList,
|
|
15
|
+
TabsPanel,
|
|
16
|
+
TabsTab,
|
|
17
|
+
tabsListVariants,
|
|
18
|
+
tabsPanelVariants,
|
|
19
|
+
tabsTabVariants
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/tabs/index.ts"],"sourcesContent":["export {\n Tabs,\n TabsList,\n TabsTab,\n TabsPanel,\n type TabsProps,\n type TabsListProps,\n type TabsTabProps,\n type TabsPanelProps,\n} from \"./tabs\";\nexport {\n tabsListVariants,\n tabsTabVariants,\n tabsPanelVariants,\n type TabsListVariantProps,\n type TabsTabVariantProps,\n type TabsPanelVariantProps,\n} from \"./tabs.variants\";\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;","names":[]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
3
|
+
import { type TabsTabVariantProps } from "./tabs.variants";
|
|
4
|
+
type TabsVariant = NonNullable<TabsTabVariantProps["variant"]>;
|
|
5
|
+
type TabsSize = NonNullable<TabsTabVariantProps["size"]>;
|
|
6
|
+
type TabsOrientation = "horizontal" | "vertical";
|
|
7
|
+
export interface TabsProps extends Omit<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root>, "orientation"> {
|
|
8
|
+
/** Indicator style (spec §3): `underline` (default, in-page) or `pill` (dense/boxed surfaces). */
|
|
9
|
+
variant?: TabsVariant;
|
|
10
|
+
/** Tab density (spec §3): `md` (default) or `sm` for side rails. Both hold the target-size floor. */
|
|
11
|
+
size?: TabsSize;
|
|
12
|
+
/** Layout + arrow-key axis (spec §3): `horizontal` (default, Left/Right) or `vertical` (Up/Down). */
|
|
13
|
+
orientation?: TabsOrientation;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Tabs split one region into sibling panels and show one at a time, with a row of tabs that
|
|
17
|
+
* switches between them (spec §1). It is a neutral layout container: the selected tab and its
|
|
18
|
+
* indicator take the BRAND primary action accent, never a status color — a tab reports which
|
|
19
|
+
* panel is open, not a verified result (spec §3/§5/§8, brand != state). Wraps the Radix Tabs
|
|
20
|
+
* primitive (WAI-ARIA APG tabs pattern) — a stateful primitive, so this file is `'use client'`.
|
|
21
|
+
*
|
|
22
|
+
* Activation follows the spec §6 default: `activationMode="manual"`, so arrow keys browse tabs
|
|
23
|
+
* without switching the panel until you commit with Space/Enter. Pass `activationMode="automatic"`
|
|
24
|
+
* only when switching panels is cheap and side-effect free.
|
|
25
|
+
*/
|
|
26
|
+
export declare function Tabs({ variant, size, orientation, activationMode, className, children, ...rootProps }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export interface TabsListProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> {
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The row (or column) that holds the tabs and carries the `tablist` role (spec §2). It is one
|
|
31
|
+
* stop in the page tab order via Radix's roving tabindex. It takes its accessible name from a
|
|
32
|
+
* visible heading via `aria-labelledby`, or from `aria-label` when no heading is present (spec §7).
|
|
33
|
+
*/
|
|
34
|
+
export declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
export interface TabsTabProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger> {
|
|
36
|
+
/** Stable identity for this tab; pairs the tab with its panel (Radix wires aria-controls). */
|
|
37
|
+
value: string;
|
|
38
|
+
/** The tab is present but not operable, and is skipped by arrow movement (spec §4 Disabled). */
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* One selectable label in the tablist (spec §2 `tab`): holds text, an optional leading icon, and
|
|
43
|
+
* an optional trailing count. Radix renders it as `role="tab"` with roving tabindex (selected =
|
|
44
|
+
* `tabindex="0"`, the rest `-1`), `aria-selected`, and `aria-controls` to its panel. The selected
|
|
45
|
+
* indicator (underline or pill) reinforces selection but never carries it alone — `aria-selected`
|
|
46
|
+
* and the visible panel do (spec §2 indicator / §4 Selected / use-of-color).
|
|
47
|
+
*/
|
|
48
|
+
export declare const TabsTab: React.ForwardRefExoticComponent<TabsTabProps & React.RefAttributes<HTMLButtonElement>>;
|
|
49
|
+
export interface TabsPanelProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content> {
|
|
50
|
+
/** Stable identity tying this panel to its tab (Radix wires role + aria-labelledby). */
|
|
51
|
+
value: string;
|
|
52
|
+
/**
|
|
53
|
+
* The panel content is resolving (spec §4 Loading): announces `aria-busy` while the tablist
|
|
54
|
+
* stays operable so you can switch away. A wait is a plain wait, never deliberate motion theatre.
|
|
55
|
+
*/
|
|
56
|
+
loading?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The content region tied to the selected tab (spec §2 `panel`): one panel is visible, the rest
|
|
60
|
+
* hidden and out of the tab order until selected. Radix sets `role="tabpanel"` and
|
|
61
|
+
* `aria-labelledby` back to its tab, and makes the panel focusable (`tabindex="0"`) when it holds
|
|
62
|
+
* no focusable content of its own, so Tab always reaches it (spec §7 focus management).
|
|
63
|
+
*/
|
|
64
|
+
export declare const TabsPanel: React.ForwardRefExoticComponent<TabsPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC;AAEjD,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC;AAEzB,KAAK,WAAW,GAAG,WAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC;AAC/D,KAAK,QAAQ,GAAG,WAAW,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;AACzD,KAAK,eAAe,GAAG,YAAY,GAAG,UAAU,CAAC;AAgBjD,MAAM,WAAW,SACf,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC;IACtF,kGAAkG;IAClG,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,qGAAqG;IACrG,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,qGAAqG;IACrG,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,EACnB,OAAqB,EACrB,IAAW,EACX,WAA0B,EAC1B,cAAyB,EACzB,SAAS,EACT,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,SAAS,2CAkBX;AAED,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC;CAAG;AAEtE;;;;GAIG;AACH,eAAO,MAAM,QAAQ,sFAYnB,CAAC;AAEH,MAAM,WAAW,YACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC;IACpE,8FAA8F;IAC9F,KAAK,EAAE,MAAM,CAAC;IACd,gGAAgG;IAChG,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,wFAYlB,CAAC;AAEH,MAAM,WAAW,cACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC;IACpE,wFAAwF;IACxF,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,uFAapB,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "../../lib/cn";
|
|
6
|
+
import {
|
|
7
|
+
tabsListVariants,
|
|
8
|
+
tabsTabVariants,
|
|
9
|
+
tabsPanelVariants
|
|
10
|
+
} from "./tabs.variants";
|
|
11
|
+
const TabsContext = React.createContext({
|
|
12
|
+
variant: "underline",
|
|
13
|
+
size: "md",
|
|
14
|
+
orientation: "horizontal"
|
|
15
|
+
});
|
|
16
|
+
function Tabs({
|
|
17
|
+
variant = "underline",
|
|
18
|
+
size = "md",
|
|
19
|
+
orientation = "horizontal",
|
|
20
|
+
activationMode = "manual",
|
|
21
|
+
className,
|
|
22
|
+
children,
|
|
23
|
+
...rootProps
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ jsx(TabsContext.Provider, { value: { variant, size, orientation }, children: /* @__PURE__ */ jsx(
|
|
26
|
+
TabsPrimitive.Root,
|
|
27
|
+
{
|
|
28
|
+
orientation,
|
|
29
|
+
activationMode,
|
|
30
|
+
className: cn(
|
|
31
|
+
// logical-property layout (G-U6): horizontal stacks list-above-panel, vertical
|
|
32
|
+
// places the rail inline-start of the panel
|
|
33
|
+
orientation === "vertical" ? "flex flex-row gap-(--space-4)" : "flex flex-col",
|
|
34
|
+
className
|
|
35
|
+
),
|
|
36
|
+
...rootProps,
|
|
37
|
+
children
|
|
38
|
+
}
|
|
39
|
+
) });
|
|
40
|
+
}
|
|
41
|
+
const TabsList = React.forwardRef(function TabsList2({ className, ...props }, ref) {
|
|
42
|
+
const { orientation } = React.useContext(TabsContext);
|
|
43
|
+
return /* @__PURE__ */ jsx(
|
|
44
|
+
TabsPrimitive.List,
|
|
45
|
+
{
|
|
46
|
+
ref,
|
|
47
|
+
className: cn(tabsListVariants({ orientation }), className),
|
|
48
|
+
...props
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
});
|
|
52
|
+
const TabsTab = React.forwardRef(function TabsTab2({ className, ...props }, ref) {
|
|
53
|
+
const { variant, size } = React.useContext(TabsContext);
|
|
54
|
+
return /* @__PURE__ */ jsx(
|
|
55
|
+
TabsPrimitive.Trigger,
|
|
56
|
+
{
|
|
57
|
+
ref,
|
|
58
|
+
className: cn(tabsTabVariants({ variant, size }), className),
|
|
59
|
+
...props
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
const TabsPanel = React.forwardRef(function TabsPanel2({ className, loading, ...props }, ref) {
|
|
64
|
+
const { orientation } = React.useContext(TabsContext);
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
TabsPrimitive.Content,
|
|
67
|
+
{
|
|
68
|
+
ref,
|
|
69
|
+
"aria-busy": loading || void 0,
|
|
70
|
+
className: cn(tabsPanelVariants({ orientation }), className),
|
|
71
|
+
...props
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
export {
|
|
76
|
+
Tabs,
|
|
77
|
+
TabsList,
|
|
78
|
+
TabsPanel,
|
|
79
|
+
TabsTab
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/tabs/tabs.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport { cn } from \"../../lib/cn\";\nimport {\n tabsListVariants,\n tabsTabVariants,\n tabsPanelVariants,\n type TabsTabVariantProps,\n} from \"./tabs.variants\";\n\ntype TabsVariant = NonNullable<TabsTabVariantProps[\"variant\"]>;\ntype TabsSize = NonNullable<TabsTabVariantProps[\"size\"]>;\ntype TabsOrientation = \"horizontal\" | \"vertical\";\n\n// The presentation axes (spec §3) are set ONCE on the root and travel to every tab + panel via\n// context, so callers don't repeat `variant`/`size`/`orientation` on each part (mirrors the\n// Accordion headingLevel-context precedent). Orientation also drives Radix's arrow-key axis.\ntype TabsContextValue = {\n variant: TabsVariant;\n size: TabsSize;\n orientation: TabsOrientation;\n};\nconst TabsContext = React.createContext<TabsContextValue>({\n variant: \"underline\",\n size: \"md\",\n orientation: \"horizontal\",\n});\n\nexport interface TabsProps\n extends Omit<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root>, \"orientation\"> {\n /** Indicator style (spec §3): `underline` (default, in-page) or `pill` (dense/boxed surfaces). */\n variant?: TabsVariant;\n /** Tab density (spec §3): `md` (default) or `sm` for side rails. Both hold the target-size floor. */\n size?: TabsSize;\n /** Layout + arrow-key axis (spec §3): `horizontal` (default, Left/Right) or `vertical` (Up/Down). */\n orientation?: TabsOrientation;\n}\n\n/**\n * Tabs split one region into sibling panels and show one at a time, with a row of tabs that\n * switches between them (spec §1). It is a neutral layout container: the selected tab and its\n * indicator take the BRAND primary action accent, never a status color — a tab reports which\n * panel is open, not a verified result (spec §3/§5/§8, brand != state). Wraps the Radix Tabs\n * primitive (WAI-ARIA APG tabs pattern) — a stateful primitive, so this file is `'use client'`.\n *\n * Activation follows the spec §6 default: `activationMode=\"manual\"`, so arrow keys browse tabs\n * without switching the panel until you commit with Space/Enter. Pass `activationMode=\"automatic\"`\n * only when switching panels is cheap and side-effect free.\n */\nexport function Tabs({\n variant = \"underline\",\n size = \"md\",\n orientation = \"horizontal\",\n activationMode = \"manual\",\n className,\n children,\n ...rootProps\n}: TabsProps) {\n return (\n <TabsContext.Provider value={{ variant, size, orientation }}>\n <TabsPrimitive.Root\n orientation={orientation}\n activationMode={activationMode}\n className={cn(\n // logical-property layout (G-U6): horizontal stacks list-above-panel, vertical\n // places the rail inline-start of the panel\n orientation === \"vertical\" ? \"flex flex-row gap-(--space-4)\" : \"flex flex-col\",\n className,\n )}\n {...rootProps}\n >\n {children}\n </TabsPrimitive.Root>\n </TabsContext.Provider>\n );\n}\n\nexport interface TabsListProps\n extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> {}\n\n/**\n * The row (or column) that holds the tabs and carries the `tablist` role (spec §2). It is one\n * stop in the page tab order via Radix's roving tabindex. It takes its accessible name from a\n * visible heading via `aria-labelledby`, or from `aria-label` when no heading is present (spec §7).\n */\nexport const TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n TabsListProps\n>(function TabsList({ className, ...props }, ref) {\n const { orientation } = React.useContext(TabsContext);\n return (\n <TabsPrimitive.List\n ref={ref}\n className={cn(tabsListVariants({ orientation }), className)}\n {...props}\n />\n );\n});\n\nexport interface TabsTabProps\n extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger> {\n /** Stable identity for this tab; pairs the tab with its panel (Radix wires aria-controls). */\n value: string;\n /** The tab is present but not operable, and is skipped by arrow movement (spec §4 Disabled). */\n disabled?: boolean;\n}\n\n/**\n * One selectable label in the tablist (spec §2 `tab`): holds text, an optional leading icon, and\n * an optional trailing count. Radix renders it as `role=\"tab\"` with roving tabindex (selected =\n * `tabindex=\"0\"`, the rest `-1`), `aria-selected`, and `aria-controls` to its panel. The selected\n * indicator (underline or pill) reinforces selection but never carries it alone — `aria-selected`\n * and the visible panel do (spec §2 indicator / §4 Selected / use-of-color).\n */\nexport const TabsTab = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n TabsTabProps\n>(function TabsTab({ className, ...props }, ref) {\n const { variant, size } = React.useContext(TabsContext);\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(tabsTabVariants({ variant, size }), className)}\n {...props}\n />\n );\n});\n\nexport interface TabsPanelProps\n extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content> {\n /** Stable identity tying this panel to its tab (Radix wires role + aria-labelledby). */\n value: string;\n /**\n * The panel content is resolving (spec §4 Loading): announces `aria-busy` while the tablist\n * stays operable so you can switch away. A wait is a plain wait, never deliberate motion theatre.\n */\n loading?: boolean;\n}\n\n/**\n * The content region tied to the selected tab (spec §2 `panel`): one panel is visible, the rest\n * hidden and out of the tab order until selected. Radix sets `role=\"tabpanel\"` and\n * `aria-labelledby` back to its tab, and makes the panel focusable (`tabindex=\"0\"`) when it holds\n * no focusable content of its own, so Tab always reaches it (spec §7 focus management).\n */\nexport const TabsPanel = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n TabsPanelProps\n>(function TabsPanel({ className, loading, ...props }, ref) {\n const { orientation } = React.useContext(TabsContext);\n return (\n <TabsPrimitive.Content\n ref={ref}\n aria-busy={loading || undefined}\n className={cn(tabsPanelVariants({ orientation }), className)}\n {...props}\n />\n );\n});\n"],"mappings":";AA8DM;AA5DN,YAAY,WAAW;AACvB,SAAS,QAAQ,qBAAqB;AACtC,SAAS,UAAU;AACnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAcP,MAAM,cAAc,MAAM,cAAgC;AAAA,EACxD,SAAS;AAAA,EACT,MAAM;AAAA,EACN,aAAa;AACf,CAAC;AAuBM,SAAS,KAAK;AAAA,EACnB,UAAU;AAAA,EACV,OAAO;AAAA,EACP,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAc;AACZ,SACE,oBAAC,YAAY,UAAZ,EAAqB,OAAO,EAAE,SAAS,MAAM,YAAY,GACxD;AAAA,IAAC,cAAc;AAAA,IAAd;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW;AAAA;AAAA;AAAA,QAGT,gBAAgB,aAAa,kCAAkC;AAAA,QAC/D;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH,GACF;AAEJ;AAUO,MAAM,WAAW,MAAM,WAG5B,SAASA,UAAS,EAAE,WAAW,GAAG,MAAM,GAAG,KAAK;AAChD,QAAM,EAAE,YAAY,IAAI,MAAM,WAAW,WAAW;AACpD,SACE;AAAA,IAAC,cAAc;AAAA,IAAd;AAAA,MACC;AAAA,MACA,WAAW,GAAG,iBAAiB,EAAE,YAAY,CAAC,GAAG,SAAS;AAAA,MACzD,GAAG;AAAA;AAAA,EACN;AAEJ,CAAC;AAiBM,MAAM,UAAU,MAAM,WAG3B,SAASC,SAAQ,EAAE,WAAW,GAAG,MAAM,GAAG,KAAK;AAC/C,QAAM,EAAE,SAAS,KAAK,IAAI,MAAM,WAAW,WAAW;AACtD,SACE;AAAA,IAAC,cAAc;AAAA,IAAd;AAAA,MACC;AAAA,MACA,WAAW,GAAG,gBAAgB,EAAE,SAAS,KAAK,CAAC,GAAG,SAAS;AAAA,MAC1D,GAAG;AAAA;AAAA,EACN;AAEJ,CAAC;AAmBM,MAAM,YAAY,MAAM,WAG7B,SAASC,WAAU,EAAE,WAAW,SAAS,GAAG,MAAM,GAAG,KAAK;AAC1D,QAAM,EAAE,YAAY,IAAI,MAAM,WAAW,WAAW;AACpD,SACE;AAAA,IAAC,cAAc;AAAA,IAAd;AAAA,MACC;AAAA,MACA,aAAW,WAAW;AAAA,MACtB,WAAW,GAAG,kBAAkB,EAAE,YAAY,CAAC,GAAG,SAAS;AAAA,MAC1D,GAAG;AAAA;AAAA,EACN;AAEJ,CAAC;","names":["TabsList","TabsTab","TabsPanel"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
export declare const tabsListVariants: (props?: ({
|
|
3
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const tabsTabVariants: (props?: ({
|
|
6
|
+
variant?: "underline" | "pill" | null | undefined;
|
|
7
|
+
size?: "md" | "sm" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
export declare const tabsPanelVariants: (props?: ({
|
|
10
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
export type TabsListVariantProps = VariantProps<typeof tabsListVariants>;
|
|
13
|
+
export type TabsTabVariantProps = VariantProps<typeof tabsTabVariants>;
|
|
14
|
+
export type TabsPanelVariantProps = VariantProps<typeof tabsPanelVariants>;
|
|
15
|
+
//# sourceMappingURL=tabs.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.variants.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/tabs.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAWlE,eAAO,MAAM,gBAAgB;;8EAkB5B,CAAC;AAaF,eAAO,MAAM,eAAe;;;8EAmD3B,CAAC;AAOF,eAAO,MAAM,iBAAiB;;8EAmB7B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACzE,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;AACvE,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
const tabsListVariants = cva(
|
|
3
|
+
[
|
|
4
|
+
// logical-property layout (G-U6) — flex row by default, gapped; the canvas backs the row
|
|
5
|
+
"flex bg-surface-canvas",
|
|
6
|
+
// the neutral baseline the underline indicator sits on (spec §5 border-default)
|
|
7
|
+
"border-border-default"
|
|
8
|
+
],
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
orientation: {
|
|
12
|
+
// horizontal: tabs sit in a row above a 1px baseline; gap between tabs
|
|
13
|
+
horizontal: "flex-row items-end gap-(--space-1) border-b",
|
|
14
|
+
// vertical: tabs stack in a column beside a 1px inline-end rail (side rail)
|
|
15
|
+
vertical: "flex-col items-stretch gap-(--space-1) border-e"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: { orientation: "horizontal" }
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
const tabsTabVariants = cva(
|
|
22
|
+
[
|
|
23
|
+
// layout: label (+ optional leading icon / trailing count) on a single centered row
|
|
24
|
+
"group inline-flex items-center justify-center gap-(--space-2) px-(--space-4)",
|
|
25
|
+
// type role + weight; ghost fg is the resting label + leading-icon color (spec §5 ghost-fg);
|
|
26
|
+
// unselected label color is text-secondary, lifting to text-primary when active
|
|
27
|
+
"text-label font-medium cursor-pointer select-none whitespace-nowrap",
|
|
28
|
+
"text-text-secondary data-[state=active]:text-text-primary",
|
|
29
|
+
// restrained ghost hover fill — never a brand fill on an unselected tab (spec §4 Hover)
|
|
30
|
+
"hover:bg-action-ghost-bg-hover",
|
|
31
|
+
// the indicator slide is a PLAIN, fast transition + verdify easing, instant under reduced
|
|
32
|
+
// motion. Never the 350ms VerifiedBadge-only theatre duration (G-U3 motion-theatre gate).
|
|
33
|
+
"transition-[color,background-color,border-color] duration-(--motion-duration-fast) ease-(--motion-easing-verdify)",
|
|
34
|
+
"motion-reduce:duration-(--motion-duration-instant)",
|
|
35
|
+
// target-size floor: 44px touch / 40px pointer (§7 2.5.5/Material), padding density above it;
|
|
36
|
+
// the height EMERGES from the floor + py, never a fixed height below the a11y floor (DEC-B)
|
|
37
|
+
"min-h-(--size-target-mobile) sm:min-h-(--size-target-desktop)",
|
|
38
|
+
// visible 2px focus ring at 2px offset; persists whether the tab is selected or not, and is
|
|
39
|
+
// DISTINCT from selection — arrows move focus across tabs while selection stays put (spec §4)
|
|
40
|
+
"outline-none",
|
|
41
|
+
"focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2",
|
|
42
|
+
// disabled — DEC-C: reduced emphasis via the disabled TOKEN (Radix sets data-disabled +
|
|
43
|
+
// removes it from the roving sequence), never a blanket opacity on the control
|
|
44
|
+
"data-[disabled]:pointer-events-none data-[disabled]:text-text-disabled"
|
|
45
|
+
],
|
|
46
|
+
{
|
|
47
|
+
variants: {
|
|
48
|
+
variant: {
|
|
49
|
+
// underline (default): a transparent bottom border at rest that paints to the BRAND
|
|
50
|
+
// action-primary when selected (spec §5: action-primary indicator). The border box is
|
|
51
|
+
// always reserved so the row does not reflow on selection.
|
|
52
|
+
underline: [
|
|
53
|
+
"border-b-2 border-b-transparent -mb-px",
|
|
54
|
+
"data-[state=active]:border-action-primary-bg"
|
|
55
|
+
],
|
|
56
|
+
// pill: the selected tab is a filled brand chip — action-primary fill, its fg label, md
|
|
57
|
+
// radius (spec §5: action-primary-bg fill, action-primary-fg label, radius-md)
|
|
58
|
+
pill: [
|
|
59
|
+
"rounded-(--radius-md)",
|
|
60
|
+
"data-[state=active]:bg-action-primary-bg data-[state=active]:text-action-primary-fg"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
size: {
|
|
64
|
+
// DEC-B: both sizes hold the shared target-size floor; they differ by vertical padding
|
|
65
|
+
// density ABOVE it (md roomier, sm denser for side rails), never a fixed height below it.
|
|
66
|
+
md: "py-(--space-2)",
|
|
67
|
+
sm: "py-(--space-1)"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
defaultVariants: { variant: "underline", size: "md" }
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
const tabsPanelVariants = cva(
|
|
74
|
+
[
|
|
75
|
+
"bg-surface-canvas text-text-primary text-body",
|
|
76
|
+
"px-(--space-4) py-(--space-4)",
|
|
77
|
+
// visible focus ring when the panel itself takes focus (it is tabindex=0); never removed
|
|
78
|
+
"outline-none",
|
|
79
|
+
"focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2"
|
|
80
|
+
],
|
|
81
|
+
{
|
|
82
|
+
variants: {
|
|
83
|
+
orientation: {
|
|
84
|
+
// horizontal: a neutral hairline above the panel continues the tablist baseline
|
|
85
|
+
horizontal: "border-t border-border-default",
|
|
86
|
+
// vertical: the panel sits beside the column rail; no top divider
|
|
87
|
+
vertical: ""
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
defaultVariants: { orientation: "horizontal" }
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
export {
|
|
94
|
+
tabsListVariants,
|
|
95
|
+
tabsPanelVariants,
|
|
96
|
+
tabsTabVariants
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=tabs.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/tabs/tabs.variants.ts"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\n\n// Tabs is a NEUTRAL layout container (spec §1/§3/§5/§8): brand violet and Verified Green are\n// accents, neutrals carry the surface. The SELECTED tab + its indicator take the BRAND primary\n// action accent (--color-action-primary-*), NEVER a status color — a selected tab reports which\n// panel is open, not a verified result. Surfacing a verified result is VerifiedBadge's job\n// (brand != state, G-U2). This file is the ONLY token-binding site (skill §5 hard rule).\n\n// The tablist: the row (or column) of tabs. A neutral baseline divider (border-border-default)\n// runs along the inline-end edge of the tabs; in horizontal it is the bottom border under the\n// row, in vertical the inline-end border of the column. The canvas surface backs it.\nexport const tabsListVariants = cva(\n [\n // logical-property layout (G-U6) — flex row by default, gapped; the canvas backs the row\n \"flex bg-surface-canvas\",\n // the neutral baseline the underline indicator sits on (spec §5 border-default)\n \"border-border-default\",\n ],\n {\n variants: {\n orientation: {\n // horizontal: tabs sit in a row above a 1px baseline; gap between tabs\n horizontal: \"flex-row items-end gap-(--space-1) border-b\",\n // vertical: tabs stack in a column beside a 1px inline-end rail (side rail)\n vertical: \"flex-col items-stretch gap-(--space-1) border-e\",\n },\n },\n defaultVariants: { orientation: \"horizontal\" },\n },\n);\n\n// The tab: one selectable label in the tablist. A NEUTRAL ghost surface at rest — the unselected\n// label in --color-text-secondary, the leading icon + label in the ghost fg, a restrained ghost\n// hover fill. SELECTED lifts the label to --color-text-primary and paints the indicator in the\n// BRAND action-primary (underline border, or pill fill). The persistent focus ring; the\n// target-size floor (padding density above it, DEC-B); fast functional indicator-slide motion\n// (NEVER the deliberate verified-check theatre, G-U3); DEC-C disabled via the disabled TOKEN.\n//\n// Radix Tabs.Trigger drives data-state=active|inactive, data-disabled, and data-orientation on\n// the tab button, so the selected/disabled bindings are attribute-selector variants (allowed —\n// not arbitrary values). aria-selected + the visible panel ALSO encode selection, so color is\n// never the sole signal (spec §4 Selected / use-of-color 1.4.1).\nexport const tabsTabVariants = cva(\n [\n // layout: label (+ optional leading icon / trailing count) on a single centered row\n \"group inline-flex items-center justify-center gap-(--space-2) px-(--space-4)\",\n // type role + weight; ghost fg is the resting label + leading-icon color (spec §5 ghost-fg);\n // unselected label color is text-secondary, lifting to text-primary when active\n \"text-label font-medium cursor-pointer select-none whitespace-nowrap\",\n \"text-text-secondary data-[state=active]:text-text-primary\",\n // restrained ghost hover fill — never a brand fill on an unselected tab (spec §4 Hover)\n \"hover:bg-action-ghost-bg-hover\",\n // the indicator slide is a PLAIN, fast transition + verdify easing, instant under reduced\n // motion. Never the 350ms VerifiedBadge-only theatre duration (G-U3 motion-theatre gate).\n \"transition-[color,background-color,border-color] duration-(--motion-duration-fast) ease-(--motion-easing-verdify)\",\n \"motion-reduce:duration-(--motion-duration-instant)\",\n // target-size floor: 44px touch / 40px pointer (§7 2.5.5/Material), padding density above it;\n // the height EMERGES from the floor + py, never a fixed height below the a11y floor (DEC-B)\n \"min-h-(--size-target-mobile) sm:min-h-(--size-target-desktop)\",\n // visible 2px focus ring at 2px offset; persists whether the tab is selected or not, and is\n // DISTINCT from selection — arrows move focus across tabs while selection stays put (spec §4)\n \"outline-none\",\n \"focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2\",\n // disabled — DEC-C: reduced emphasis via the disabled TOKEN (Radix sets data-disabled +\n // removes it from the roving sequence), never a blanket opacity on the control\n \"data-[disabled]:pointer-events-none data-[disabled]:text-text-disabled\",\n ],\n {\n variants: {\n variant: {\n // underline (default): a transparent bottom border at rest that paints to the BRAND\n // action-primary when selected (spec §5: action-primary indicator). The border box is\n // always reserved so the row does not reflow on selection.\n underline: [\n \"border-b-2 border-b-transparent -mb-px\",\n \"data-[state=active]:border-action-primary-bg\",\n ],\n // pill: the selected tab is a filled brand chip — action-primary fill, its fg label, md\n // radius (spec §5: action-primary-bg fill, action-primary-fg label, radius-md)\n pill: [\n \"rounded-(--radius-md)\",\n \"data-[state=active]:bg-action-primary-bg data-[state=active]:text-action-primary-fg\",\n ],\n },\n size: {\n // DEC-B: both sizes hold the shared target-size floor; they differ by vertical padding\n // density ABOVE it (md roomier, sm denser for side rails), never a fixed height below it.\n md: \"py-(--space-2)\",\n sm: \"py-(--space-1)\",\n },\n },\n defaultVariants: { variant: \"underline\", size: \"md\" },\n },\n);\n\n// The panel: the content region tied to the selected tab. The canvas surface, the primary body\n// text at the body type role, panel insets from --space-4. In horizontal layout a divider above\n// it (border-t) continues the neutral hairline; in vertical it insets beside the rail. Radix\n// gives it role=tabpanel + aria-labelledby back to its tab, and tabindex=0 when it holds no\n// focusable content so Tab always reaches it (spec §7 focus management).\nexport const tabsPanelVariants = cva(\n [\n \"bg-surface-canvas text-text-primary text-body\",\n \"px-(--space-4) py-(--space-4)\",\n // visible focus ring when the panel itself takes focus (it is tabindex=0); never removed\n \"outline-none\",\n \"focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2\",\n ],\n {\n variants: {\n orientation: {\n // horizontal: a neutral hairline above the panel continues the tablist baseline\n horizontal: \"border-t border-border-default\",\n // vertical: the panel sits beside the column rail; no top divider\n vertical: \"\",\n },\n },\n defaultVariants: { orientation: \"horizontal\" },\n },\n);\n\nexport type TabsListVariantProps = VariantProps<typeof tabsListVariants>;\nexport type TabsTabVariantProps = VariantProps<typeof tabsTabVariants>;\nexport type TabsPanelVariantProps = VariantProps<typeof tabsPanelVariants>;\n"],"mappings":"AAAA,SAAS,WAA8B;AAWhC,MAAM,mBAAmB;AAAA,EAC9B;AAAA;AAAA,IAEE;AAAA;AAAA,IAEA;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,aAAa;AAAA;AAAA,QAEX,YAAY;AAAA;AAAA,QAEZ,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,iBAAiB,EAAE,aAAa,aAAa;AAAA,EAC/C;AACF;AAaO,MAAM,kBAAkB;AAAA,EAC7B;AAAA;AAAA,IAEE;AAAA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA;AAAA;AAAA,IAGA;AAAA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA;AAAA;AAAA,IAGA;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA;AAAA;AAAA;AAAA,QAIP,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA;AAAA;AAAA,QAGA,MAAM;AAAA,UACJ;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,MACA,MAAM;AAAA;AAAA;AAAA,QAGJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,IACF;AAAA,IACA,iBAAiB,EAAE,SAAS,aAAa,MAAM,KAAK;AAAA,EACtD;AACF;AAOO,MAAM,oBAAoB;AAAA,EAC/B;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,aAAa;AAAA;AAAA,QAEX,YAAY;AAAA;AAAA,QAEZ,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,iBAAiB,EAAE,aAAa,aAAa;AAAA,EAC/C;AACF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/textarea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/textarea/index.ts"],"sourcesContent":["export { Textarea, type TextareaProps } from \"./textarea\";\nexport { textareaVariants, type TextareaVariantProps } from \"./textarea.variants\";\n"],"mappings":"AAAA,SAAS,gBAAoC;AAC7C,SAAS,wBAAmD;","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type TextareaVariantProps } from "./textarea.variants";
|
|
3
|
+
export interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "id">, TextareaVariantProps {
|
|
4
|
+
/** Bound visible label text (for/id). Required — the placeholder is never the name. */
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
/** Help text below the field, linked via aria-describedby. */
|
|
7
|
+
description?: React.ReactNode;
|
|
8
|
+
/** Error message: reds the border, sets aria-invalid, joins aria-describedby. */
|
|
9
|
+
error?: React.ReactNode;
|
|
10
|
+
/** Field id; auto-generated from React.useId when omitted. */
|
|
11
|
+
id?: string;
|
|
12
|
+
/** auto-grow lower bound (rows). */
|
|
13
|
+
minRows?: number;
|
|
14
|
+
/** auto-grow upper bound (rows) — beyond it the field scrolls. */
|
|
15
|
+
maxRows?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
18
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/components/textarea/textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAoB,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAElF,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,IAAI,CAAC,EACnE,oBAAoB;IACtB,uFAAuF;IACvF,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,iFAAiF;IACjF,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,8DAA8D;IAC9D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAQD,eAAO,MAAM,QAAQ,2FA4JpB,CAAC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../lib/cn";
|
|
5
|
+
import { Label } from "../label";
|
|
6
|
+
import { textareaVariants } from "./textarea.variants";
|
|
7
|
+
function describedBy(...ids) {
|
|
8
|
+
const present = ids.filter(Boolean);
|
|
9
|
+
return present.length ? present.join(" ") : void 0;
|
|
10
|
+
}
|
|
11
|
+
const Textarea = React.forwardRef(
|
|
12
|
+
function Textarea2({
|
|
13
|
+
className,
|
|
14
|
+
resize = "vertical",
|
|
15
|
+
label,
|
|
16
|
+
description,
|
|
17
|
+
error,
|
|
18
|
+
id,
|
|
19
|
+
minRows = 3,
|
|
20
|
+
maxRows = 8,
|
|
21
|
+
rows,
|
|
22
|
+
maxLength,
|
|
23
|
+
value,
|
|
24
|
+
defaultValue,
|
|
25
|
+
onChange,
|
|
26
|
+
disabled,
|
|
27
|
+
readOnly,
|
|
28
|
+
required,
|
|
29
|
+
...props
|
|
30
|
+
}, forwardedRef) {
|
|
31
|
+
const autoId = React.useId();
|
|
32
|
+
const fieldId = id ?? autoId;
|
|
33
|
+
const descId = `${fieldId}-desc`;
|
|
34
|
+
const errId = `${fieldId}-err`;
|
|
35
|
+
const counterId = `${fieldId}-counter`;
|
|
36
|
+
const innerRef = React.useRef(null);
|
|
37
|
+
React.useImperativeHandle(
|
|
38
|
+
forwardedRef,
|
|
39
|
+
() => innerRef.current
|
|
40
|
+
);
|
|
41
|
+
const isControlled = value !== void 0;
|
|
42
|
+
const [count, setCount] = React.useState(
|
|
43
|
+
String(value ?? defaultValue ?? "").length
|
|
44
|
+
);
|
|
45
|
+
const length = isControlled ? String(value ?? "").length : count;
|
|
46
|
+
const isAutoGrow = resize === "auto-grow";
|
|
47
|
+
const resizeToContent = React.useCallback(() => {
|
|
48
|
+
const el = innerRef.current;
|
|
49
|
+
if (!el || !isAutoGrow) return;
|
|
50
|
+
const style = window.getComputedStyle(el);
|
|
51
|
+
const px = (v, fallback = 0) => {
|
|
52
|
+
const n = parseFloat(v);
|
|
53
|
+
return Number.isFinite(n) ? n : fallback;
|
|
54
|
+
};
|
|
55
|
+
const lineHeight = px(style.lineHeight) || px(style.fontSize) * 1.5 || 20;
|
|
56
|
+
const borders = px(style.borderTopWidth) + px(style.borderBottomWidth);
|
|
57
|
+
const padding = px(style.paddingTop) + px(style.paddingBottom);
|
|
58
|
+
const ceiling = maxRows * lineHeight + padding + borders;
|
|
59
|
+
el.style.height = "auto";
|
|
60
|
+
const next = Math.min(el.scrollHeight, ceiling);
|
|
61
|
+
el.style.height = `${next}px`;
|
|
62
|
+
el.style.maxHeight = `${ceiling}px`;
|
|
63
|
+
el.style.overflowY = el.scrollHeight > ceiling ? "auto" : "hidden";
|
|
64
|
+
}, [isAutoGrow, maxRows]);
|
|
65
|
+
React.useLayoutEffect(() => {
|
|
66
|
+
if (isAutoGrow) resizeToContent();
|
|
67
|
+
}, [isAutoGrow, resizeToContent, value]);
|
|
68
|
+
const handleChange = (e) => {
|
|
69
|
+
if (!isControlled) setCount(e.target.value.length);
|
|
70
|
+
if (isAutoGrow) resizeToContent();
|
|
71
|
+
onChange?.(e);
|
|
72
|
+
};
|
|
73
|
+
const hasCounter = maxLength !== void 0;
|
|
74
|
+
const hasError = error != null && error !== false;
|
|
75
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-(--space-3)", children: [
|
|
76
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: fieldId, disabled, required, children: label }),
|
|
77
|
+
/* @__PURE__ */ jsx(
|
|
78
|
+
"textarea",
|
|
79
|
+
{
|
|
80
|
+
ref: innerRef,
|
|
81
|
+
id: fieldId,
|
|
82
|
+
"aria-multiline": "true",
|
|
83
|
+
rows: isAutoGrow ? minRows : rows,
|
|
84
|
+
maxLength,
|
|
85
|
+
value,
|
|
86
|
+
defaultValue,
|
|
87
|
+
onChange: handleChange,
|
|
88
|
+
disabled,
|
|
89
|
+
readOnly,
|
|
90
|
+
required,
|
|
91
|
+
"aria-required": required || void 0,
|
|
92
|
+
"aria-invalid": hasError || void 0,
|
|
93
|
+
"aria-describedby": describedBy(
|
|
94
|
+
// coerce each guard to a boolean so the expression narrows to
|
|
95
|
+
// string | false (React.ReactNode can be null/0/0n, which would widen
|
|
96
|
+
// the union past the describedBy signature otherwise)
|
|
97
|
+
!!description && descId,
|
|
98
|
+
hasError && errId,
|
|
99
|
+
hasCounter && counterId
|
|
100
|
+
),
|
|
101
|
+
style: isAutoGrow ? { overflowY: "hidden" } : void 0,
|
|
102
|
+
className: cn(textareaVariants({ resize }), className),
|
|
103
|
+
...props
|
|
104
|
+
}
|
|
105
|
+
),
|
|
106
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-(--space-3)", children: [
|
|
107
|
+
/* @__PURE__ */ jsxs("div", { className: "text-caption text-text-secondary", children: [
|
|
108
|
+
description ? (
|
|
109
|
+
// spec §5: label AND description text are text-secondary; text-muted is
|
|
110
|
+
// reserved for the character counter at rest (see the counter below).
|
|
111
|
+
/* @__PURE__ */ jsx("span", { id: descId, className: "text-caption text-text-secondary", children: description })
|
|
112
|
+
) : null,
|
|
113
|
+
hasError ? /* @__PURE__ */ jsx("span", { id: errId, className: "text-caption text-status-critical-fg", children: error }) : null
|
|
114
|
+
] }),
|
|
115
|
+
hasCounter ? /* @__PURE__ */ jsxs(
|
|
116
|
+
"span",
|
|
117
|
+
{
|
|
118
|
+
id: counterId,
|
|
119
|
+
"data-testid": "textarea-counter",
|
|
120
|
+
"aria-live": "polite",
|
|
121
|
+
className: "text-caption text-text-muted tabular-nums",
|
|
122
|
+
children: [
|
|
123
|
+
length,
|
|
124
|
+
"/",
|
|
125
|
+
maxLength
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
) : null
|
|
129
|
+
] })
|
|
130
|
+
] });
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
export {
|
|
134
|
+
Textarea
|
|
135
|
+
};
|
|
136
|
+
//# sourceMappingURL=textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/textarea/textarea.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { cn } from \"../../lib/cn\";\nimport { Label } from \"../label\";\nimport { textareaVariants, type TextareaVariantProps } from \"./textarea.variants\";\n\nexport interface TextareaProps\n extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, \"id\">,\n TextareaVariantProps {\n /** Bound visible label text (for/id). Required — the placeholder is never the name. */\n label: React.ReactNode;\n /** Help text below the field, linked via aria-describedby. */\n description?: React.ReactNode;\n /** Error message: reds the border, sets aria-invalid, joins aria-describedby. */\n error?: React.ReactNode;\n /** Field id; auto-generated from React.useId when omitted. */\n id?: string;\n /** auto-grow lower bound (rows). */\n minRows?: number;\n /** auto-grow upper bound (rows) — beyond it the field scrolls. */\n maxRows?: number;\n}\n\n/** Merge non-null describedby ids into a single attribute value (or undefined). */\nfunction describedBy(...ids: (string | false | undefined)[]): string | undefined {\n const present = ids.filter(Boolean) as string[];\n return present.length ? present.join(\" \") : undefined;\n}\n\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n function Textarea(\n {\n className,\n resize = \"vertical\",\n label,\n description,\n error,\n id,\n minRows = 3,\n maxRows = 8,\n rows,\n maxLength,\n value,\n defaultValue,\n onChange,\n disabled,\n readOnly,\n required,\n ...props\n },\n forwardedRef,\n ) {\n const autoId = React.useId();\n const fieldId = id ?? autoId;\n const descId = `${fieldId}-desc`;\n const errId = `${fieldId}-err`;\n const counterId = `${fieldId}-counter`;\n\n const innerRef = React.useRef<HTMLTextAreaElement>(null);\n React.useImperativeHandle(\n forwardedRef,\n () => innerRef.current as HTMLTextAreaElement,\n );\n\n // counter state: read controlled value when present, else track length locally\n const isControlled = value !== undefined;\n const [count, setCount] = React.useState(\n String(value ?? defaultValue ?? \"\").length,\n );\n const length = isControlled ? String(value ?? \"\").length : count;\n\n const isAutoGrow = resize === \"auto-grow\";\n\n // auto-grow: measure scrollHeight, then clamp the height to a ceiling computed\n // from maxRows × line-height. Beyond the ceiling the field scrolls (overflowY\n // auto) instead of growing unbounded; below it the field hugs its content\n // (overflowY hidden). The ceiling is written to el.style.maxHeight — there is no\n // class for it, so nothing references an undefined custom property.\n const resizeToContent = React.useCallback(() => {\n const el = innerRef.current;\n if (!el || !isAutoGrow) return;\n const style = window.getComputedStyle(el);\n // jsdom and \"normal\" line-height both yield NaN here; px() coerces any\n // non-finite value to 0 (or the fallback) so the ceiling stays a real number.\n const px = (v: string, fallback = 0) => {\n const n = parseFloat(v);\n return Number.isFinite(n) ? n : fallback;\n };\n // line-height may compute to \"normal\"; fall back to ~1.5× font size, else 20px.\n const lineHeight = px(style.lineHeight) || px(style.fontSize) * 1.5 || 20;\n const borders = px(style.borderTopWidth) + px(style.borderBottomWidth);\n const padding = px(style.paddingTop) + px(style.paddingBottom);\n const ceiling = maxRows * lineHeight + padding + borders;\n // measure the natural content height from a collapsed baseline\n el.style.height = \"auto\";\n const next = Math.min(el.scrollHeight, ceiling);\n el.style.height = `${next}px`;\n el.style.maxHeight = `${ceiling}px`;\n // scroll only once content exceeds the ceiling; hug content otherwise\n el.style.overflowY = el.scrollHeight > ceiling ? \"auto\" : \"hidden\";\n }, [isAutoGrow, maxRows]);\n\n React.useLayoutEffect(() => {\n if (isAutoGrow) resizeToContent();\n }, [isAutoGrow, resizeToContent, value]);\n\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n if (!isControlled) setCount(e.target.value.length);\n if (isAutoGrow) resizeToContent();\n onChange?.(e);\n };\n\n const hasCounter = maxLength !== undefined;\n const hasError = error != null && error !== false;\n\n return (\n <div className=\"flex flex-col gap-(--space-3)\">\n {/* Compose the Label primitive (define-once): it owns the canonical\n label role/color (text-label / text-text-primary) and the disabled\n dim. Passing `disabled` lets a disabled Textarea's name dim to\n --color-text-disabled via Label's own cva variant, and `required`\n surfaces the required mark there (the field still carries the real\n required / aria-required state below). textarea.md §5 lists\n text-secondary for the label, but label.md §3–5 is authoritative for\n the Label primitive: resting label text is text-text-primary. */}\n <Label htmlFor={fieldId} disabled={disabled} required={required}>\n {label}\n </Label>\n <textarea\n ref={innerRef}\n id={fieldId}\n // native <textarea> already carries an implicit aria-multiline; make the\n // multi-line contract explicit per the frozen ARIA contract (spec §7).\n aria-multiline=\"true\"\n rows={isAutoGrow ? minRows : rows}\n maxLength={maxLength}\n value={value}\n defaultValue={defaultValue}\n onChange={handleChange}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n aria-required={required || undefined}\n aria-invalid={hasError || undefined}\n aria-describedby={describedBy(\n // coerce each guard to a boolean so the expression narrows to\n // string | false (React.ReactNode can be null/0/0n, which would widen\n // the union past the describedBy signature otherwise)\n !!description && descId,\n hasError && errId,\n hasCounter && counterId,\n )}\n style={isAutoGrow ? { overflowY: \"hidden\" } : undefined}\n className={cn(textareaVariants({ resize }), className)}\n {...props}\n />\n <div className=\"flex items-start justify-between gap-(--space-3)\">\n <div className=\"text-caption text-text-secondary\">\n {description ? (\n // spec §5: label AND description text are text-secondary; text-muted is\n // reserved for the character counter at rest (see the counter below).\n <span id={descId} className=\"text-caption text-text-secondary\">\n {description}\n </span>\n ) : null}\n {hasError ? (\n <span id={errId} className=\"text-caption text-status-critical-fg\">\n {error}\n </span>\n ) : null}\n </div>\n {hasCounter ? (\n <span\n id={counterId}\n data-testid=\"textarea-counter\"\n aria-live=\"polite\"\n className=\"text-caption text-text-muted tabular-nums\"\n >\n {length}/{maxLength}\n </span>\n ) : null}\n </div>\n </div>\n );\n },\n);\n"],"mappings":";AA8HQ,cAgCE,YAhCF;AA5HR,YAAY,WAAW;AACvB,SAAS,UAAU;AACnB,SAAS,aAAa;AACtB,SAAS,wBAAmD;AAoB5D,SAAS,eAAe,KAAyD;AAC/E,QAAM,UAAU,IAAI,OAAO,OAAO;AAClC,SAAO,QAAQ,SAAS,QAAQ,KAAK,GAAG,IAAI;AAC9C;AAEO,MAAM,WAAW,MAAM;AAAA,EAC5B,SAASA,UACP;AAAA,IACE;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,cACA;AACA,UAAM,SAAS,MAAM,MAAM;AAC3B,UAAM,UAAU,MAAM;AACtB,UAAM,SAAS,GAAG,OAAO;AACzB,UAAM,QAAQ,GAAG,OAAO;AACxB,UAAM,YAAY,GAAG,OAAO;AAE5B,UAAM,WAAW,MAAM,OAA4B,IAAI;AACvD,UAAM;AAAA,MACJ;AAAA,MACA,MAAM,SAAS;AAAA,IACjB;AAGA,UAAM,eAAe,UAAU;AAC/B,UAAM,CAAC,OAAO,QAAQ,IAAI,MAAM;AAAA,MAC9B,OAAO,SAAS,gBAAgB,EAAE,EAAE;AAAA,IACtC;AACA,UAAM,SAAS,eAAe,OAAO,SAAS,EAAE,EAAE,SAAS;AAE3D,UAAM,aAAa,WAAW;AAO9B,UAAM,kBAAkB,MAAM,YAAY,MAAM;AAC9C,YAAM,KAAK,SAAS;AACpB,UAAI,CAAC,MAAM,CAAC,WAAY;AACxB,YAAM,QAAQ,OAAO,iBAAiB,EAAE;AAGxC,YAAM,KAAK,CAAC,GAAW,WAAW,MAAM;AACtC,cAAM,IAAI,WAAW,CAAC;AACtB,eAAO,OAAO,SAAS,CAAC,IAAI,IAAI;AAAA,MAClC;AAEA,YAAM,aAAa,GAAG,MAAM,UAAU,KAAK,GAAG,MAAM,QAAQ,IAAI,OAAO;AACvE,YAAM,UAAU,GAAG,MAAM,cAAc,IAAI,GAAG,MAAM,iBAAiB;AACrE,YAAM,UAAU,GAAG,MAAM,UAAU,IAAI,GAAG,MAAM,aAAa;AAC7D,YAAM,UAAU,UAAU,aAAa,UAAU;AAEjD,SAAG,MAAM,SAAS;AAClB,YAAM,OAAO,KAAK,IAAI,GAAG,cAAc,OAAO;AAC9C,SAAG,MAAM,SAAS,GAAG,IAAI;AACzB,SAAG,MAAM,YAAY,GAAG,OAAO;AAE/B,SAAG,MAAM,YAAY,GAAG,eAAe,UAAU,SAAS;AAAA,IAC5D,GAAG,CAAC,YAAY,OAAO,CAAC;AAExB,UAAM,gBAAgB,MAAM;AAC1B,UAAI,WAAY,iBAAgB;AAAA,IAClC,GAAG,CAAC,YAAY,iBAAiB,KAAK,CAAC;AAEvC,UAAM,eAAe,CAAC,MAA8C;AAClE,UAAI,CAAC,aAAc,UAAS,EAAE,OAAO,MAAM,MAAM;AACjD,UAAI,WAAY,iBAAgB;AAChC,iBAAW,CAAC;AAAA,IACd;AAEA,UAAM,aAAa,cAAc;AACjC,UAAM,WAAW,SAAS,QAAQ,UAAU;AAE5C,WACE,qBAAC,SAAI,WAAU,iCASb;AAAA,0BAAC,SAAM,SAAS,SAAS,UAAoB,UAC1C,iBACH;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,KAAK;AAAA,UACL,IAAI;AAAA,UAGJ,kBAAe;AAAA,UACf,MAAM,aAAa,UAAU;AAAA,UAC7B;AAAA,UACA;AAAA,UACA;AAAA,UACA,UAAU;AAAA,UACV;AAAA,UACA;AAAA,UACA;AAAA,UACA,iBAAe,YAAY;AAAA,UAC3B,gBAAc,YAAY;AAAA,UAC1B,oBAAkB;AAAA;AAAA;AAAA;AAAA,YAIhB,CAAC,CAAC,eAAe;AAAA,YACjB,YAAY;AAAA,YACZ,cAAc;AAAA,UAChB;AAAA,UACA,OAAO,aAAa,EAAE,WAAW,SAAS,IAAI;AAAA,UAC9C,WAAW,GAAG,iBAAiB,EAAE,OAAO,CAAC,GAAG,SAAS;AAAA,UACpD,GAAG;AAAA;AAAA,MACN;AAAA,MACA,qBAAC,SAAI,WAAU,oDACb;AAAA,6BAAC,SAAI,WAAU,oCACZ;AAAA;AAAA;AAAA;AAAA,YAGC,oBAAC,UAAK,IAAI,QAAQ,WAAU,oCACzB,uBACH;AAAA,cACE;AAAA,UACH,WACC,oBAAC,UAAK,IAAI,OAAO,WAAU,wCACxB,iBACH,IACE;AAAA,WACN;AAAA,QACC,aACC;AAAA,UAAC;AAAA;AAAA,YACC,IAAI;AAAA,YACJ,eAAY;AAAA,YACZ,aAAU;AAAA,YACV,WAAU;AAAA,YAET;AAAA;AAAA,cAAO;AAAA,cAAE;AAAA;AAAA;AAAA,QACZ,IACE;AAAA,SACN;AAAA,OACF;AAAA,EAEJ;AACF;","names":["Textarea"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
export declare const textareaVariants: (props?: ({
|
|
3
|
+
resize?: "none" | "vertical" | "auto-grow" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export type TextareaVariantProps = VariantProps<typeof textareaVariants>;
|
|
6
|
+
//# sourceMappingURL=textarea.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.variants.d.ts","sourceRoot":"","sources":["../../../src/components/textarea/textarea.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOlE,eAAO,MAAM,gBAAgB;;8EA+C5B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
const textareaVariants = cva(
|
|
3
|
+
[
|
|
4
|
+
// shape + radius + internal padding; control intent tier carries the field
|
|
5
|
+
"block w-full rounded-md px-(--space-2) py-(--space-2)",
|
|
6
|
+
// DEC-A — the value SIZE is text-base (16px) so iOS never zooms on focus; the
|
|
7
|
+
// brand BODY line-height + letter-spacing ride along via the role-suffix vars.
|
|
8
|
+
// text-body itself (0.9375rem / 15px) is NEVER bound on a form field: under the
|
|
9
|
+
// role-aware cn it would collapse against text-base, and 15px would reintroduce
|
|
10
|
+
// the iOS focus-zoom that the 16px reset exists to prevent.
|
|
11
|
+
"text-base leading-(--text-body--line-height) tracking-(--text-body--letter-spacing)",
|
|
12
|
+
// resting fill / border / text / placeholder — control intent tier
|
|
13
|
+
"bg-control-bg border border-control-border text-control-fg",
|
|
14
|
+
"placeholder:text-control-placeholder",
|
|
15
|
+
// hover darkens the border only; fill is unchanged (restraint)
|
|
16
|
+
"hover:border-border-strong",
|
|
17
|
+
// focus: visible 2px signal-blue ring at 2px offset + focused border, never
|
|
18
|
+
// removed (2.4.7); fast functional transition, no theatre
|
|
19
|
+
"outline-none transition-[color,border-color,box-shadow] duration-(--motion-duration-fast)",
|
|
20
|
+
"focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2",
|
|
21
|
+
"focus-visible:border-border-focus",
|
|
22
|
+
"motion-reduce:transition-none",
|
|
23
|
+
// ERROR is the only colored field state — it borrows the STATUS color, never the
|
|
24
|
+
// brand (§3, §8). Driven by the native aria-invalid attribute.
|
|
25
|
+
"aria-invalid:border-status-critical-border",
|
|
26
|
+
// disabled: reduced-emphasis text + placeholder, not editable
|
|
27
|
+
"disabled:cursor-not-allowed disabled:text-text-disabled",
|
|
28
|
+
"disabled:placeholder:text-text-disabled",
|
|
29
|
+
// 44px mobile / 40px desktop minimum block-size floor, logical (a11y target size)
|
|
30
|
+
"min-h-(--size-target-mobile) sm:min-h-(--size-target-desktop)"
|
|
31
|
+
],
|
|
32
|
+
{
|
|
33
|
+
variants: {
|
|
34
|
+
resize: {
|
|
35
|
+
// reader drags the height; content may exceed the start height
|
|
36
|
+
vertical: "resize-y",
|
|
37
|
+
// fixed height; reader scrolls within it
|
|
38
|
+
none: "resize-none",
|
|
39
|
+
// height is driven programmatically between minRows/maxRows, then scrolls;
|
|
40
|
+
// the manual grip is disabled. The ceiling is NOT a class — it is computed
|
|
41
|
+
// from maxRows × line-height in the layout effect and written to
|
|
42
|
+
// el.style.maxHeight (a bare CSS-var class here would reference an undefined
|
|
43
|
+
// custom property and the token-binding gate would flag a non-token var).
|
|
44
|
+
"auto-grow": "resize-none"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: { resize: "vertical" }
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
export {
|
|
51
|
+
textareaVariants
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=textarea.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/textarea/textarea.variants.ts"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\n\n// The multi-line text field. Token binding lives ONLY here. Native <textarea>, no Radix.\n// The closed state set is default·hover·focus·disabled·read-only·error (textarea.md §4) —\n// loading and pressed do NOT apply and are dropped. Neutrals carry the field; the only\n// accent is the critical status in the error state — never brand violet for a state,\n// never a status color as a flourish (§3, §8).\nexport const textareaVariants = cva(\n [\n // shape + radius + internal padding; control intent tier carries the field\n \"block w-full rounded-md px-(--space-2) py-(--space-2)\",\n // DEC-A — the value SIZE is text-base (16px) so iOS never zooms on focus; the\n // brand BODY line-height + letter-spacing ride along via the role-suffix vars.\n // text-body itself (0.9375rem / 15px) is NEVER bound on a form field: under the\n // role-aware cn it would collapse against text-base, and 15px would reintroduce\n // the iOS focus-zoom that the 16px reset exists to prevent.\n \"text-base leading-(--text-body--line-height) tracking-(--text-body--letter-spacing)\",\n // resting fill / border / text / placeholder — control intent tier\n \"bg-control-bg border border-control-border text-control-fg\",\n \"placeholder:text-control-placeholder\",\n // hover darkens the border only; fill is unchanged (restraint)\n \"hover:border-border-strong\",\n // focus: visible 2px signal-blue ring at 2px offset + focused border, never\n // removed (2.4.7); fast functional transition, no theatre\n \"outline-none transition-[color,border-color,box-shadow] duration-(--motion-duration-fast)\",\n \"focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2\",\n \"focus-visible:border-border-focus\",\n \"motion-reduce:transition-none\",\n // ERROR is the only colored field state — it borrows the STATUS color, never the\n // brand (§3, §8). Driven by the native aria-invalid attribute.\n \"aria-invalid:border-status-critical-border\",\n // disabled: reduced-emphasis text + placeholder, not editable\n \"disabled:cursor-not-allowed disabled:text-text-disabled\",\n \"disabled:placeholder:text-text-disabled\",\n // 44px mobile / 40px desktop minimum block-size floor, logical (a11y target size)\n \"min-h-(--size-target-mobile) sm:min-h-(--size-target-desktop)\",\n ],\n {\n variants: {\n resize: {\n // reader drags the height; content may exceed the start height\n vertical: \"resize-y\",\n // fixed height; reader scrolls within it\n none: \"resize-none\",\n // height is driven programmatically between minRows/maxRows, then scrolls;\n // the manual grip is disabled. The ceiling is NOT a class — it is computed\n // from maxRows × line-height in the layout effect and written to\n // el.style.maxHeight (a bare CSS-var class here would reference an undefined\n // custom property and the token-binding gate would flag a non-token var).\n \"auto-grow\": \"resize-none\",\n },\n },\n defaultVariants: { resize: \"vertical\" },\n },\n);\n\nexport type TextareaVariantProps = VariantProps<typeof textareaVariants>;\n"],"mappings":"AAAA,SAAS,WAA8B;AAOhC,MAAM,mBAAmB;AAAA,EAC9B;AAAA;AAAA,IAEE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA;AAAA;AAAA,IAEA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAAA,IAGA;AAAA;AAAA,IAEA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,QAAQ;AAAA;AAAA,QAEN,UAAU;AAAA;AAAA,QAEV,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMN,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IACA,iBAAiB,EAAE,QAAQ,WAAW;AAAA,EACxC;AACF;","names":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ToastProvider, ToastViewport, Toast, ToastIcon, ToastContent, ToastTitle, ToastDescription, ToastAction, ToastClose, type ToastProviderProps, type ToastViewportProps, type ToastProps, type ToastIconProps, type ToastContentProps, type ToastTitleProps, type ToastDescriptionProps, type ToastActionProps, type ToastCloseProps, } from "./toast";
|
|
2
|
+
export { toastViewportClass, toastVariants, toastIconVariants, toastContentClass, toastTitleClass, toastDescriptionClass, toastActionClass, toastCloseClass, toastCloseGlyphClass, type ToastVariantProps, } from "./toast.variants";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,aAAa,EACb,KAAK,EACL,SAAS,EACT,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,KAAK,iBAAiB,GACvB,MAAM,kBAAkB,CAAC"}
|