@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,71 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../lib/cn";
|
|
4
|
+
import {
|
|
5
|
+
inputVariants,
|
|
6
|
+
inputMessageVariants
|
|
7
|
+
} from "./input.variants";
|
|
8
|
+
const Input = React.forwardRef(
|
|
9
|
+
function Input2({
|
|
10
|
+
id,
|
|
11
|
+
className,
|
|
12
|
+
size,
|
|
13
|
+
leading,
|
|
14
|
+
trailing,
|
|
15
|
+
help,
|
|
16
|
+
error,
|
|
17
|
+
"aria-describedby": describedBy,
|
|
18
|
+
...props
|
|
19
|
+
}, ref) {
|
|
20
|
+
const invalid = error != null && error !== false;
|
|
21
|
+
const showMessage = help != null || invalid;
|
|
22
|
+
const messageId = showMessage ? `${id}-message` : void 0;
|
|
23
|
+
const describedByValue = [describedBy, messageId].filter(Boolean).join(" ") || void 0;
|
|
24
|
+
return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
25
|
+
/* @__PURE__ */ jsxs("div", { className: "relative flex items-center", children: [
|
|
26
|
+
leading ? /* @__PURE__ */ jsx(
|
|
27
|
+
"span",
|
|
28
|
+
{
|
|
29
|
+
"aria-hidden": "true",
|
|
30
|
+
className: cn(
|
|
31
|
+
"pointer-events-none absolute start-0 flex items-center justify-center",
|
|
32
|
+
"ps-(--space-3) text-control-placeholder text-(length:--size-icon-sm)"
|
|
33
|
+
),
|
|
34
|
+
children: leading
|
|
35
|
+
}
|
|
36
|
+
) : null,
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
"input",
|
|
39
|
+
{
|
|
40
|
+
ref,
|
|
41
|
+
id,
|
|
42
|
+
"aria-invalid": invalid || void 0,
|
|
43
|
+
"aria-describedby": describedByValue,
|
|
44
|
+
className: cn(
|
|
45
|
+
inputVariants({
|
|
46
|
+
size,
|
|
47
|
+
leadingSlot: !!leading,
|
|
48
|
+
trailingSlot: !!trailing
|
|
49
|
+
}),
|
|
50
|
+
className
|
|
51
|
+
),
|
|
52
|
+
...props
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
trailing ? /* @__PURE__ */ jsx("span", { className: "absolute end-0 flex items-center justify-center pe-(--space-2) text-(length:--size-icon-sm)", children: trailing }) : null
|
|
56
|
+
] }),
|
|
57
|
+
showMessage ? /* @__PURE__ */ jsx(
|
|
58
|
+
"p",
|
|
59
|
+
{
|
|
60
|
+
id: messageId,
|
|
61
|
+
className: inputMessageVariants({ tone: invalid ? "error" : "help" }),
|
|
62
|
+
children: invalid ? error : help
|
|
63
|
+
}
|
|
64
|
+
) : null
|
|
65
|
+
] });
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
export {
|
|
69
|
+
Input
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/input/input.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../lib/cn\";\nimport {\n inputVariants,\n inputMessageVariants,\n type InputVariantProps,\n} from \"./input.variants\";\n\nexport interface InputProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"size\">,\n Pick<InputVariantProps, \"size\"> {\n /** Required: the field is wired to a sibling <label for={id}> (or aria-label). */\n id: string;\n /** Icon/prefix inside the inline-start edge (search glyph, currency mark). */\n leading?: React.ReactNode;\n /** Icon/affordance inside the inline-end edge (clear, reveal, unit suffix). */\n trailing?: React.ReactNode;\n /** Neutral description below the field, wired by aria-describedby. */\n help?: React.ReactNode;\n /** Error message below the field: sets aria-invalid + critical border, wired\n * by aria-describedby so the reason is read with the field. */\n error?: React.ReactNode;\n}\n\n// Render-only native control: error/disabled/readOnly are props, not internal\n// state, and there is no hook, effect, or stateful Radix primitive — so NO\n// 'use client' directive (input.md §7: the native <input> role, no composite widget).\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n function Input(\n {\n id,\n className,\n size,\n leading,\n trailing,\n help,\n error,\n \"aria-describedby\": describedBy,\n ...props\n },\n ref,\n ) {\n const invalid = error != null && error !== false;\n const showMessage = help != null || invalid;\n const messageId = showMessage ? `${id}-message` : undefined;\n // caller-provided aria-describedby first, then the generated message id —\n // both are read with the field; collapse to undefined when neither is set.\n const describedByValue =\n [describedBy, messageId].filter(Boolean).join(\" \") || undefined;\n return (\n <div className=\"w-full\">\n <div className=\"relative flex items-center\">\n {leading ? (\n <span\n aria-hidden=\"true\"\n className={cn(\n \"pointer-events-none absolute start-0 flex items-center justify-center\",\n \"ps-(--space-3) text-control-placeholder text-(length:--size-icon-sm)\",\n )}\n >\n {leading}\n </span>\n ) : null}\n <input\n ref={ref}\n id={id}\n aria-invalid={invalid || undefined}\n aria-describedby={describedByValue}\n className={cn(\n inputVariants({\n size,\n leadingSlot: !!leading,\n trailingSlot: !!trailing,\n }),\n className,\n )}\n {...props}\n />\n {trailing ? (\n <span className=\"absolute end-0 flex items-center justify-center pe-(--space-2) text-(length:--size-icon-sm)\">\n {trailing}\n </span>\n ) : null}\n </div>\n {showMessage ? (\n <p\n id={messageId}\n className={inputMessageVariants({ tone: invalid ? \"error\" : \"help\" })}\n >\n {invalid ? error : help}\n </p>\n ) : null}\n </div>\n );\n },\n);\n"],"mappings":"AAmDQ,SAEI,KAFJ;AAnDR,YAAY,WAAW;AACvB,SAAS,UAAU;AACnB;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AAqBA,MAAM,QAAQ,MAAM;AAAA,EACzB,SAASA,OACP;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,oBAAoB;AAAA,IACpB,GAAG;AAAA,EACL,GACA,KACA;AACA,UAAM,UAAU,SAAS,QAAQ,UAAU;AAC3C,UAAM,cAAc,QAAQ,QAAQ;AACpC,UAAM,YAAY,cAAc,GAAG,EAAE,aAAa;AAGlD,UAAM,mBACJ,CAAC,aAAa,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AACxD,WACE,qBAAC,SAAI,WAAU,UACb;AAAA,2BAAC,SAAI,WAAU,8BACZ;AAAA,kBACC;AAAA,UAAC;AAAA;AAAA,YACC,eAAY;AAAA,YACZ,WAAW;AAAA,cACT;AAAA,cACA;AAAA,YACF;AAAA,YAEC;AAAA;AAAA,QACH,IACE;AAAA,QACJ;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA,gBAAc,WAAW;AAAA,YACzB,oBAAkB;AAAA,YAClB,WAAW;AAAA,cACT,cAAc;AAAA,gBACZ;AAAA,gBACA,aAAa,CAAC,CAAC;AAAA,gBACf,cAAc,CAAC,CAAC;AAAA,cAClB,CAAC;AAAA,cACD;AAAA,YACF;AAAA,YACC,GAAG;AAAA;AAAA,QACN;AAAA,QACC,WACC,oBAAC,UAAK,WAAU,+FACb,oBACH,IACE;AAAA,SACN;AAAA,MACC,cACC;AAAA,QAAC;AAAA;AAAA,UACC,IAAI;AAAA,UACJ,WAAW,qBAAqB,EAAE,MAAM,UAAU,UAAU,OAAO,CAAC;AAAA,UAEnE,oBAAU,QAAQ;AAAA;AAAA,MACrB,IACE;AAAA,OACN;AAAA,EAEJ;AACF;","names":["Input"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
export declare const inputVariants: (props?: ({
|
|
3
|
+
size?: "md" | "sm" | null | undefined;
|
|
4
|
+
leadingSlot?: boolean | null | undefined;
|
|
5
|
+
trailingSlot?: boolean | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export type InputVariantProps = VariantProps<typeof inputVariants>;
|
|
8
|
+
export declare const inputMessageVariants: (props?: ({
|
|
9
|
+
tone?: "error" | "help" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
//# sourceMappingURL=input.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.variants.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,eAAO,MAAM,aAAa;;;;8EAmDzB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAInE,eAAO,MAAM,oBAAoB;;8EAK/B,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
const inputVariants = cva(
|
|
3
|
+
[
|
|
4
|
+
// shape + resting field: control-* carries the field, neutrals not brand
|
|
5
|
+
"block w-full rounded-md border bg-control-bg text-control-fg",
|
|
6
|
+
"border-control-border placeholder:text-control-placeholder",
|
|
7
|
+
// DEC-A — the value SIZE is text-base (16px) so iOS never zooms on focus; the
|
|
8
|
+
// brand BODY line-height + letter-spacing ride along via the role-suffix vars.
|
|
9
|
+
// text-body itself (0.9375rem / 15px) is NEVER bound on a form field: under the
|
|
10
|
+
// role-aware cn it would collapse against text-base, and 15px would reintroduce
|
|
11
|
+
// the iOS focus-zoom that the 16px reset exists to prevent.
|
|
12
|
+
"text-base leading-(--text-body--line-height) tracking-(--text-body--letter-spacing)",
|
|
13
|
+
// hover shows a text caret; the border does NOT change color (restraint)
|
|
14
|
+
"cursor-text",
|
|
15
|
+
// focus: visible 2px signal-blue ring at 2px offset + focused border, never
|
|
16
|
+
// removed (2.4.7); border+ring meet 3:1 non-text contrast (1.4.11)
|
|
17
|
+
"outline-none",
|
|
18
|
+
"focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2",
|
|
19
|
+
"focus-visible:border-border-focus",
|
|
20
|
+
// colors transition functionally (no theatre); border + ring only
|
|
21
|
+
"transition-colors duration-(--motion-duration-fast) ease-(--motion-easing-verdify)",
|
|
22
|
+
// disabled: muted value, non-interactive (native disabled drives tab skip)
|
|
23
|
+
"disabled:cursor-not-allowed disabled:text-text-disabled",
|
|
24
|
+
// read-only: editable-looking, selectable, stays in the tab order
|
|
25
|
+
"read-only:cursor-default",
|
|
26
|
+
// ERROR is the only colored field state — it borrows the STATUS color, never
|
|
27
|
+
// the brand (§3, §8). Driven by the native aria-invalid attribute.
|
|
28
|
+
"aria-invalid:border-status-critical-border",
|
|
29
|
+
"aria-invalid:focus-visible:ring-status-critical-border",
|
|
30
|
+
// 44px mobile / 40px desktop target floor, logical block-size. DEC-B: tokens
|
|
31
|
+
// expose only target-size FLOORS, no height scale — every size anchors this
|
|
32
|
+
// floor and never sets a fixed height below it (a11y). Resting height emerges
|
|
33
|
+
// from the size variant's vertical padding above this floor.
|
|
34
|
+
"min-h-(--size-target-mobile) sm:min-h-(--size-target-desktop)"
|
|
35
|
+
],
|
|
36
|
+
{
|
|
37
|
+
variants: {
|
|
38
|
+
// DEC-B — the 16px no-zoom reset is a hard floor on every form-field size, so
|
|
39
|
+
// (unlike a non-field control) the type role is held constant and the sizes
|
|
40
|
+
// differ ONLY by vertical padding (density) ABOVE the shared target floor:
|
|
41
|
+
// --space-1 (0.25rem) <= --space-2 (0.5rem) gives a coherent sm <= md height
|
|
42
|
+
// progression, both >= the floor.
|
|
43
|
+
size: {
|
|
44
|
+
md: "py-(--space-2)",
|
|
45
|
+
sm: "py-(--space-1)"
|
|
46
|
+
},
|
|
47
|
+
// logical inline padding; widened on the slot side to reserve room
|
|
48
|
+
leadingSlot: { true: "ps-(--space-9)", false: "ps-(--space-3)" },
|
|
49
|
+
trailingSlot: { true: "pe-(--space-9)", false: "pe-(--space-3)" }
|
|
50
|
+
},
|
|
51
|
+
defaultVariants: { size: "md", leadingSlot: false, trailingSlot: false }
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
const inputMessageVariants = cva("mt-(--space-1) text-caption", {
|
|
55
|
+
variants: {
|
|
56
|
+
tone: { help: "text-text-secondary", error: "text-status-critical-fg" }
|
|
57
|
+
},
|
|
58
|
+
defaultVariants: { tone: "help" }
|
|
59
|
+
});
|
|
60
|
+
export {
|
|
61
|
+
inputMessageVariants,
|
|
62
|
+
inputVariants
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=input.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/input/input.variants.ts"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\n\n// The text field. Token binding lives ONLY here. Native <input>, no Radix.\n// The closed state set for a text field is default·hover·focus·disabled·read-only·error\n// (input.md §4) — loading and pressed do NOT apply and are dropped.\nexport const inputVariants = cva(\n [\n // shape + resting field: control-* carries the field, neutrals not brand\n \"block w-full rounded-md border bg-control-bg text-control-fg\",\n \"border-control-border placeholder:text-control-placeholder\",\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 // hover shows a text caret; the border does NOT change color (restraint)\n \"cursor-text\",\n // focus: visible 2px signal-blue ring at 2px offset + focused border, never\n // removed (2.4.7); border+ring meet 3:1 non-text contrast (1.4.11)\n \"outline-none\",\n \"focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2\",\n \"focus-visible:border-border-focus\",\n // colors transition functionally (no theatre); border + ring only\n \"transition-colors duration-(--motion-duration-fast) ease-(--motion-easing-verdify)\",\n // disabled: muted value, non-interactive (native disabled drives tab skip)\n \"disabled:cursor-not-allowed disabled:text-text-disabled\",\n // read-only: editable-looking, selectable, stays in the tab order\n \"read-only:cursor-default\",\n // ERROR is the only colored field state — it borrows the STATUS color, never\n // the brand (§3, §8). Driven by the native aria-invalid attribute.\n \"aria-invalid:border-status-critical-border\",\n \"aria-invalid:focus-visible:ring-status-critical-border\",\n // 44px mobile / 40px desktop target floor, logical block-size. DEC-B: tokens\n // expose only target-size FLOORS, no height scale — every size anchors this\n // floor and never sets a fixed height below it (a11y). Resting height emerges\n // from the size variant's vertical padding above this floor.\n \"min-h-(--size-target-mobile) sm:min-h-(--size-target-desktop)\",\n ],\n {\n variants: {\n // DEC-B — the 16px no-zoom reset is a hard floor on every form-field size, so\n // (unlike a non-field control) the type role is held constant and the sizes\n // differ ONLY by vertical padding (density) ABOVE the shared target floor:\n // --space-1 (0.25rem) <= --space-2 (0.5rem) gives a coherent sm <= md height\n // progression, both >= the floor.\n size: {\n md: \"py-(--space-2)\",\n sm: \"py-(--space-1)\",\n },\n // logical inline padding; widened on the slot side to reserve room\n leadingSlot: { true: \"ps-(--space-9)\", false: \"ps-(--space-3)\" },\n trailingSlot: { true: \"pe-(--space-9)\", false: \"pe-(--space-3)\" },\n },\n defaultVariants: { size: \"md\", leadingSlot: false, trailingSlot: false },\n },\n);\n\nexport type InputVariantProps = VariantProps<typeof inputVariants>;\n\n// The message below the field. The error help text borrows the field's STATUS\n// color (the only colored field state); neutral help text is muted secondary.\nexport const inputMessageVariants = cva(\"mt-(--space-1) text-caption\", {\n variants: {\n tone: { help: \"text-text-secondary\", error: \"text-status-critical-fg\" },\n },\n defaultVariants: { tone: \"help\" },\n});\n"],"mappings":"AAAA,SAAS,WAA8B;AAKhC,MAAM,gBAAgB;AAAA,EAC3B;AAAA;AAAA,IAEE;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA;AAAA;AAAA,IAEA;AAAA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA;AAAA,IAEA;AAAA;AAAA,IAEA;AAAA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA;AAAA,MAEA,aAAa,EAAE,MAAM,kBAAkB,OAAO,iBAAiB;AAAA,MAC/D,cAAc,EAAE,MAAM,kBAAkB,OAAO,iBAAiB;AAAA,IAClE;AAAA,IACA,iBAAiB,EAAE,MAAM,MAAM,aAAa,OAAO,cAAc,MAAM;AAAA,EACzE;AACF;AAMO,MAAM,uBAAuB,IAAI,+BAA+B;AAAA,EACrE,UAAU;AAAA,IACR,MAAM,EAAE,MAAM,uBAAuB,OAAO,0BAA0B;AAAA,EACxE;AAAA,EACA,iBAAiB,EAAE,MAAM,OAAO;AAClC,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/label/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,KAAK,iBAAiB,GACvB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Label } from "./label";
|
|
2
|
+
import {
|
|
3
|
+
labelVariants,
|
|
4
|
+
requiredMarkVariants,
|
|
5
|
+
optionalHintVariants
|
|
6
|
+
} from "./label.variants";
|
|
7
|
+
export {
|
|
8
|
+
Label,
|
|
9
|
+
labelVariants,
|
|
10
|
+
optionalHintVariants,
|
|
11
|
+
requiredMarkVariants
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/label/index.ts"],"sourcesContent":["export { Label, type LabelProps } from \"./label\";\nexport {\n labelVariants,\n requiredMarkVariants,\n optionalHintVariants,\n type LabelVariantProps,\n} from \"./label.variants\";\n"],"mappings":"AAAA,SAAS,aAA8B;AACvC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type LabelVariantProps } from "./label.variants";
|
|
3
|
+
export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement>, Omit<LabelVariantProps, "disabled"> {
|
|
4
|
+
/**
|
|
5
|
+
* Show the required mark. Presentation only — the field's required state is
|
|
6
|
+
* carried by the control's `required` / `aria-required`, not by this mark.
|
|
7
|
+
* Mutually exclusive with `optional`; `required` wins.
|
|
8
|
+
*/
|
|
9
|
+
required?: boolean;
|
|
10
|
+
/** Show the optional hint instead of a mark. Ignored when `required` is set. */
|
|
11
|
+
optional?: boolean;
|
|
12
|
+
/** Reflect the associated control's disabled state (renders disabled text). */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
16
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/label/label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EACjD,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC;IACrC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,KAAK,qFA2BjB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../lib/cn";
|
|
4
|
+
import {
|
|
5
|
+
labelVariants,
|
|
6
|
+
requiredMarkVariants,
|
|
7
|
+
optionalHintVariants
|
|
8
|
+
} from "./label.variants";
|
|
9
|
+
const Label = React.forwardRef(
|
|
10
|
+
function Label2({ className, required = false, optional = false, disabled = false, children, ...props }, ref) {
|
|
11
|
+
return (
|
|
12
|
+
// native <label>; associate with its control via the `htmlFor`/`id` props.
|
|
13
|
+
// No role override, no tabIndex, no focus ring — not an interactive control.
|
|
14
|
+
/* @__PURE__ */ jsxs("label", { ref, className: cn(labelVariants({ disabled }), className), ...props, children: [
|
|
15
|
+
children,
|
|
16
|
+
required ? /* @__PURE__ */ jsxs("span", { "data-testid": "label-required-mark", className: cn(requiredMarkVariants()), children: [
|
|
17
|
+
/* @__PURE__ */ jsx("span", { "data-testid": "label-required-glyph", "aria-hidden": "true", children: "*" }),
|
|
18
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "required" })
|
|
19
|
+
] }) : optional ? /* @__PURE__ */ jsx("span", { "data-testid": "label-optional-hint", className: cn(optionalHintVariants()), children: "optional" }) : null
|
|
20
|
+
] })
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
export {
|
|
25
|
+
Label
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/label/label.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../lib/cn\";\nimport {\n labelVariants,\n requiredMarkVariants,\n optionalHintVariants,\n type LabelVariantProps,\n} from \"./label.variants\";\n\nexport interface LabelProps\n extends React.LabelHTMLAttributes<HTMLLabelElement>,\n Omit<LabelVariantProps, \"disabled\"> {\n /**\n * Show the required mark. Presentation only — the field's required state is\n * carried by the control's `required` / `aria-required`, not by this mark.\n * Mutually exclusive with `optional`; `required` wins.\n */\n required?: boolean;\n /** Show the optional hint instead of a mark. Ignored when `required` is set. */\n optional?: boolean;\n /** Reflect the associated control's disabled state (renders disabled text). */\n disabled?: boolean;\n}\n\nexport const Label = React.forwardRef<HTMLLabelElement, LabelProps>(\n function Label(\n { className, required = false, optional = false, disabled = false, children, ...props },\n ref,\n ) {\n return (\n // native <label>; associate with its control via the `htmlFor`/`id` props.\n // No role override, no tabIndex, no focus ring — not an interactive control.\n <label ref={ref} className={cn(labelVariants({ disabled }), className)} {...props}>\n {children}\n {required ? (\n <span data-testid=\"label-required-mark\" className={cn(requiredMarkVariants())}>\n {/* decorative glyph — the meaning is the word, not the color */}\n <span data-testid=\"label-required-glyph\" aria-hidden=\"true\">\n *\n </span>\n {/* visually hidden so the mark reads \"required\" to assistive tech */}\n <span className=\"sr-only\">required</span>\n </span>\n ) : optional ? (\n <span data-testid=\"label-optional-hint\" className={cn(optionalHintVariants())}>\n optional\n </span>\n ) : null}\n </label>\n );\n },\n);\n"],"mappings":"AAmCU,SAEE,KAFF;AAnCV,YAAY,WAAW;AACvB,SAAS,UAAU;AACnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAiBA,MAAM,QAAQ,MAAM;AAAA,EACzB,SAASA,OACP,EAAE,WAAW,WAAW,OAAO,WAAW,OAAO,WAAW,OAAO,UAAU,GAAG,MAAM,GACtF,KACA;AACA;AAAA;AAAA;AAAA,MAGE,qBAAC,WAAM,KAAU,WAAW,GAAG,cAAc,EAAE,SAAS,CAAC,GAAG,SAAS,GAAI,GAAG,OACzE;AAAA;AAAA,QACA,WACC,qBAAC,UAAK,eAAY,uBAAsB,WAAW,GAAG,qBAAqB,CAAC,GAE1E;AAAA,8BAAC,UAAK,eAAY,wBAAuB,eAAY,QAAO,eAE5D;AAAA,UAEA,oBAAC,UAAK,WAAU,WAAU,sBAAQ;AAAA,WACpC,IACE,WACF,oBAAC,UAAK,eAAY,uBAAsB,WAAW,GAAG,qBAAqB,CAAC,GAAG,sBAE/E,IACE;AAAA,SACN;AAAA;AAAA,EAEJ;AACF;","names":["Label"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
export declare const labelVariants: (props?: ({
|
|
3
|
+
disabled?: boolean | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const requiredMarkVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
6
|
+
export declare const optionalHintVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
7
|
+
export type LabelVariantProps = VariantProps<typeof labelVariants>;
|
|
8
|
+
//# sourceMappingURL=label.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.variants.d.ts","sourceRoot":"","sources":["../../../src/components/label/label.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,eAAO,MAAM,aAAa;;8EAezB,CAAC;AAKF,eAAO,MAAM,oBAAoB,oFAE/B,CAAC;AAGH,eAAO,MAAM,oBAAoB,oFAA4C,CAAC;AAE9E,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
const labelVariants = cva(
|
|
3
|
+
[
|
|
4
|
+
"inline-flex items-center gap-(--space-2)",
|
|
5
|
+
"text-label font-medium text-text-primary select-none"
|
|
6
|
+
],
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
disabled: {
|
|
10
|
+
// reflects the associated control's disabled state; stays in the DOM
|
|
11
|
+
true: "text-text-disabled",
|
|
12
|
+
false: ""
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: { disabled: false }
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
const requiredMarkVariants = cva([
|
|
19
|
+
"inline-flex items-center gap-(--space-1) text-status-critical-fg"
|
|
20
|
+
]);
|
|
21
|
+
const optionalHintVariants = cva(["text-caption text-text-secondary"]);
|
|
22
|
+
export {
|
|
23
|
+
labelVariants,
|
|
24
|
+
optionalHintVariants,
|
|
25
|
+
requiredMarkVariants
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=label.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/label/label.variants.ts"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\n\n// Resting label text: the label type role + primary text color, laid out inline\n// with its mark/hint at the --space-2 gap. No focus ring, no target-size floor —\n// a Label is not interactive. `disabled` reflects the control's state visually.\nexport const labelVariants = cva(\n [\n \"inline-flex items-center gap-(--space-2)\",\n \"text-label font-medium text-text-primary select-none\",\n ],\n {\n variants: {\n disabled: {\n // reflects the associated control's disabled state; stays in the DOM\n true: \"text-text-disabled\",\n false: \"\",\n },\n },\n defaultVariants: { disabled: false },\n },\n);\n\n// The required mark — meaning carried by shape + text, never color alone. The\n// critical color is permitted ONLY here (paired with the asterisk glyph and the\n// visually-hidden \"required\" word), never on resting label text.\nexport const requiredMarkVariants = cva([\n \"inline-flex items-center gap-(--space-1) text-status-critical-fg\",\n]);\n\n// The optional hint — a short secondary note in the caption role + secondary color.\nexport const optionalHintVariants = cva([\"text-caption text-text-secondary\"]);\n\nexport type LabelVariantProps = VariantProps<typeof labelVariants>;\n"],"mappings":"AAAA,SAAS,WAA8B;AAKhC,MAAM,gBAAgB;AAAA,EAC3B;AAAA,IACE;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,UAAU;AAAA;AAAA,QAER,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,IACF;AAAA,IACA,iBAAiB,EAAE,UAAU,MAAM;AAAA,EACrC;AACF;AAKO,MAAM,uBAAuB,IAAI;AAAA,EACtC;AACF,CAAC;AAGM,MAAM,uBAAuB,IAAI,CAAC,kCAAkC,CAAC;","names":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Menu, MenuTrigger, MenuContent, MenuItem, MenuGroup, MenuLabel, MenuSeparator, MenuSub, MenuSubTrigger, MenuSubContent, type MenuProps, type MenuTriggerProps, type MenuContentProps, type MenuItemProps, type MenuGroupProps, type MenuLabelProps, type MenuSeparatorProps, type MenuSubProps, type MenuSubTriggerProps, type MenuSubContentProps, } from "./menu";
|
|
2
|
+
export { menuTriggerClass, menuPopupClass, menuItemVariants, menuItemIconClass, menuItemShortcutClass, menuSubChevronClass, menuLabelClass, menuSeparatorClass, type MenuItemVariantProps, } from "./menu.variants";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,WAAW,EACX,WAAW,EACX,QAAQ,EACR,SAAS,EACT,SAAS,EACT,aAAa,EACb,OAAO,EACP,cAAc,EACd,cAAc,EACd,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,KAAK,oBAAoB,GAC1B,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Menu,
|
|
3
|
+
MenuTrigger,
|
|
4
|
+
MenuContent,
|
|
5
|
+
MenuItem,
|
|
6
|
+
MenuGroup,
|
|
7
|
+
MenuLabel,
|
|
8
|
+
MenuSeparator,
|
|
9
|
+
MenuSub,
|
|
10
|
+
MenuSubTrigger,
|
|
11
|
+
MenuSubContent
|
|
12
|
+
} from "./menu";
|
|
13
|
+
import {
|
|
14
|
+
menuTriggerClass,
|
|
15
|
+
menuPopupClass,
|
|
16
|
+
menuItemVariants,
|
|
17
|
+
menuItemIconClass,
|
|
18
|
+
menuItemShortcutClass,
|
|
19
|
+
menuSubChevronClass,
|
|
20
|
+
menuLabelClass,
|
|
21
|
+
menuSeparatorClass
|
|
22
|
+
} from "./menu.variants";
|
|
23
|
+
export {
|
|
24
|
+
Menu,
|
|
25
|
+
MenuContent,
|
|
26
|
+
MenuGroup,
|
|
27
|
+
MenuItem,
|
|
28
|
+
MenuLabel,
|
|
29
|
+
MenuSeparator,
|
|
30
|
+
MenuSub,
|
|
31
|
+
MenuSubContent,
|
|
32
|
+
MenuSubTrigger,
|
|
33
|
+
MenuTrigger,
|
|
34
|
+
menuItemIconClass,
|
|
35
|
+
menuItemShortcutClass,
|
|
36
|
+
menuItemVariants,
|
|
37
|
+
menuLabelClass,
|
|
38
|
+
menuPopupClass,
|
|
39
|
+
menuSeparatorClass,
|
|
40
|
+
menuSubChevronClass,
|
|
41
|
+
menuTriggerClass
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/menu/index.ts"],"sourcesContent":["export {\n Menu,\n MenuTrigger,\n MenuContent,\n MenuItem,\n MenuGroup,\n MenuLabel,\n MenuSeparator,\n MenuSub,\n MenuSubTrigger,\n MenuSubContent,\n type MenuProps,\n type MenuTriggerProps,\n type MenuContentProps,\n type MenuItemProps,\n type MenuGroupProps,\n type MenuLabelProps,\n type MenuSeparatorProps,\n type MenuSubProps,\n type MenuSubTriggerProps,\n type MenuSubContentProps,\n} from \"./menu\";\nexport {\n menuTriggerClass,\n menuPopupClass,\n menuItemVariants,\n menuItemIconClass,\n menuItemShortcutClass,\n menuSubChevronClass,\n menuLabelClass,\n menuSeparatorClass,\n type MenuItemVariantProps,\n} from \"./menu.variants\";\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAWK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;","names":[]}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
3
|
+
import { type MenuItemVariantProps } from "./menu.variants";
|
|
4
|
+
export interface MenuProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Menu is a popup list of ACTIONS that a trigger opens — the row of commands behind a button, an
|
|
8
|
+
* avatar, or a row's overflow control (spec §1). Reach for it when you want to fire an action (open,
|
|
9
|
+
* rename, sign out, revoke a key), not pick a value: use Select to choose one option from a list, and
|
|
10
|
+
* use the Sidebar for page-level navigation. Each item runs a command and then the menu closes.
|
|
11
|
+
*
|
|
12
|
+
* It is a NEUTRAL surface (spec §3): the popup, items, and separators are neutral, and the brand
|
|
13
|
+
* violet never marks an item as "the special one." The one colored item is the destructive item,
|
|
14
|
+
* which takes the destructive ACTION treatment because the command it runs is irreversible — a risk
|
|
15
|
+
* signal, not a status result; a verified result is never reported by a menu item (brand != state).
|
|
16
|
+
*
|
|
17
|
+
* Wraps the Radix DropdownMenu primitive (WAI-ARIA APG menu-button + menu pattern), which provides
|
|
18
|
+
* the portal, roving tabindex, type-ahead, submenu, and Escape/arrow keyboard model — a stateful
|
|
19
|
+
* primitive, so this file is `'use client'`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function Menu(props: MenuProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export interface MenuTriggerProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger> {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The control that opens the menu (spec §2 trigger): the one stop in the page tab order for this
|
|
26
|
+
* control, carrying the focus ring. Radix sets `aria-haspopup="menu"`, `aria-expanded`, and
|
|
27
|
+
* `aria-controls` (pointing at the popup) for you. Pass `asChild` to wrap your own Button so the
|
|
28
|
+
* trigger inherits its role, keyboard, and focus ring rather than nesting a second button; the bare
|
|
29
|
+
* (non-`asChild`) form renders the default neutral-ghost trigger.
|
|
30
|
+
*/
|
|
31
|
+
export declare const MenuTrigger: React.ForwardRefExoticComponent<MenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
32
|
+
export interface MenuContentProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Renders the portal and the popup (spec §2 popup): the floating `role="menu"` surface that opens on
|
|
36
|
+
* activation, raised above the page and anchored to the trigger. On open, focus moves into the popup
|
|
37
|
+
* (first item, or last on Up) and roving tabindex tracks the active item; on close — by Escape,
|
|
38
|
+
* activation, or click-away — focus returns to the trigger (Radix, spec §6/§7). The menu is NOT a
|
|
39
|
+
* modal dialog: focus is not trapped, and Tab leaves the menu rather than stepping through items.
|
|
40
|
+
* A neutral raised surface; brand violet and Verified Green never appear here (spec §3/§5/§8).
|
|
41
|
+
*/
|
|
42
|
+
export declare const MenuContent: React.ForwardRefExoticComponent<MenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
export interface MenuItemProps extends Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item>, "color">, MenuItemVariantProps {
|
|
44
|
+
/** The leading icon (spec §2): decorative, sized by `--size-icon-md`; the item names itself by its label text. */
|
|
45
|
+
icon?: React.ReactNode;
|
|
46
|
+
/** A trailing shortcut hint (spec §2): text such as "⌘K", in the muted label role; never a focus stop. */
|
|
47
|
+
shortcut?: React.ReactNode;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* One command row (spec §2 item, §4 states): a `role="menuitem"` whose activation runs its command
|
|
51
|
+
* and closes the menu, returning focus to the trigger (Radix). It holds an optional leading icon, a
|
|
52
|
+
* label, and an optional trailing shortcut hint. Pointer hover and keyboard arrow movement share ONE
|
|
53
|
+
* highlight (Radix `data-highlighted`), so the active item is the same for both (spec §4 Hover).
|
|
54
|
+
*
|
|
55
|
+
* `destructive` (spec §3 `item=destructive`) marks the ONE colored item — a command that is
|
|
56
|
+
* irreversible (revoke a key, delete a profile). It takes the destructive ACTION treatment and must
|
|
57
|
+
* name the consequence in its TEXT, never by color alone (spec §7/§8). A `disabled` item stays in the
|
|
58
|
+
* menu and readable to assistive technology (`aria-disabled`), is skipped by arrow movement, and does
|
|
59
|
+
* not fire on activation (spec §4 Disabled / §7).
|
|
60
|
+
*/
|
|
61
|
+
export declare const MenuItem: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
62
|
+
export interface MenuGroupProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group> {
|
|
63
|
+
/**
|
|
64
|
+
* The non-interactive heading that partitions the popup (spec §2 group / group-label). It names the
|
|
65
|
+
* group for assistive technology via `aria-labelledby` (Radix `Label`) and is NEVER a focus stop.
|
|
66
|
+
*/
|
|
67
|
+
label?: React.ReactNode;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* A set of related items under a non-interactive `group-label` that partitions the popup (spec §2
|
|
71
|
+
* group). The items read as a related set (`role="group"` named by the label); the label is never a
|
|
72
|
+
* menuitem and never a focus stop.
|
|
73
|
+
*/
|
|
74
|
+
export declare const MenuGroup: React.ForwardRefExoticComponent<MenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
75
|
+
export interface MenuLabelProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* A standalone non-interactive section label (spec §2 group-label) for a label that is not wrapped in
|
|
79
|
+
* a `MenuGroup`. Like the group label it is the muted label-role heading and is never a focus stop.
|
|
80
|
+
*/
|
|
81
|
+
export declare const MenuLabel: React.ForwardRefExoticComponent<MenuLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
82
|
+
export interface MenuSeparatorProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator> {
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* A thin neutral divider between groups (spec §2 separator): decorative (`role="separator"`), never a
|
|
86
|
+
* focus stop.
|
|
87
|
+
*/
|
|
88
|
+
export declare const MenuSeparator: React.ForwardRefExoticComponent<MenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
89
|
+
export interface MenuSubProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub> {
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* A submenu: an item that opens a nested popup of its own items (spec §2 submenu). Keep nesting
|
|
93
|
+
* shallow — deep trees are hard to operate by keyboard (spec §2). Wraps `MenuSubTrigger` +
|
|
94
|
+
* `MenuSubContent`.
|
|
95
|
+
*/
|
|
96
|
+
export declare function MenuSub(props: MenuSubProps): import("react/jsx-runtime").JSX.Element;
|
|
97
|
+
export interface MenuSubTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger>, "color">, MenuItemVariantProps {
|
|
98
|
+
/** The leading icon (spec §2): decorative, sized by `--size-icon-md`. */
|
|
99
|
+
icon?: React.ReactNode;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The item that opens a submenu (spec §2/§6): a `role="menuitem"` with `aria-haspopup="menu"` and its
|
|
103
|
+
* own `aria-expanded` (Radix). Right opens the submenu and focuses its first item; Left closes it and
|
|
104
|
+
* returns focus here. It carries the same row treatment as a `MenuItem`, plus a trailing chevron
|
|
105
|
+
* pointing to the inline-end.
|
|
106
|
+
*/
|
|
107
|
+
export declare const MenuSubTrigger: React.ForwardRefExoticComponent<MenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
108
|
+
export interface MenuSubContentProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent> {
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The nested popup of a submenu (spec §2 submenu): the same neutral raised `role="menu"` surface as
|
|
112
|
+
* `MenuContent`, anchored to its `MenuSubTrigger`.
|
|
113
|
+
*/
|
|
114
|
+
export declare const MenuSubContent: React.ForwardRefExoticComponent<MenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
115
|
+
//# sourceMappingURL=menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,IAAI,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjE,OAAO,EASL,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC;CAAG;AAE9E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,2CAEpC;AAED,MAAM,WAAW,gBACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC;CAAG;AAEjF;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,4FAYtB,CAAC;AAEH,MAAM,WAAW,gBACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC;CAAG;AAEjF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,yFAkBtB,CAAC;AAEH,MAAM,WAAW,aACf,SAAQ,IAAI,CACR,KAAK,CAAC,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,EACjE,OAAO,CACR,EACD,oBAAoB;IACtB,kHAAkH;IAClH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,0GAA0G;IAC1G,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,QAAQ,sFAmBnB,CAAC;AAEH,MAAM,WAAW,cACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,KAAK,CAAC;IAC1E;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,uFAyBpB,CAAC;AAEH,MAAM,WAAW,cACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,KAAK,CAAC;CAAG;AAE/E;;;GAGG;AACH,eAAO,MAAM,SAAS,uFAOpB,CAAC;AAEH,MAAM,WAAW,kBACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,SAAS,CAAC;CAAG;AAEnF;;;GAGG;AACH,eAAO,MAAM,aAAa,2FAWxB,CAAC;AAEH,MAAM,WAAW,YACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,GAAG,CAAC;CAAG;AAE7E;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,2CAE1C;AAED,MAAM,WAAW,mBACf,SAAQ,IAAI,CACR,KAAK,CAAC,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,EACvE,OAAO,CACR,EACD,oBAAoB;IACtB,yEAAyE;IACzE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,4FAmBzB,CAAC;AAEH,MAAM,WAAW,mBACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC;CAAG;AAEpF;;;GAGG;AACH,eAAO,MAAM,cAAc,4FAiBzB,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "../../lib/cn";
|
|
6
|
+
import {
|
|
7
|
+
menuTriggerClass,
|
|
8
|
+
menuPopupClass,
|
|
9
|
+
menuItemVariants,
|
|
10
|
+
menuItemIconClass,
|
|
11
|
+
menuItemShortcutClass,
|
|
12
|
+
menuSubChevronClass,
|
|
13
|
+
menuLabelClass,
|
|
14
|
+
menuSeparatorClass
|
|
15
|
+
} from "./menu.variants";
|
|
16
|
+
function Menu(props) {
|
|
17
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { ...props });
|
|
18
|
+
}
|
|
19
|
+
const MenuTrigger = React.forwardRef(function MenuTrigger2({ className, asChild, ...props }, ref) {
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
DropdownMenuPrimitive.Trigger,
|
|
22
|
+
{
|
|
23
|
+
ref,
|
|
24
|
+
asChild,
|
|
25
|
+
className: asChild ? className : cn(menuTriggerClass, className),
|
|
26
|
+
...props
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
const MenuContent = React.forwardRef(function MenuContent2({ className, sideOffset = 4, loop = true, ...props }, ref) {
|
|
31
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
32
|
+
DropdownMenuPrimitive.Content,
|
|
33
|
+
{
|
|
34
|
+
ref,
|
|
35
|
+
sideOffset,
|
|
36
|
+
loop,
|
|
37
|
+
className: cn(menuPopupClass, className),
|
|
38
|
+
...props
|
|
39
|
+
}
|
|
40
|
+
) });
|
|
41
|
+
});
|
|
42
|
+
const MenuItem = React.forwardRef(function MenuItem2({ className, destructive, icon, shortcut, children, ...props }, ref) {
|
|
43
|
+
return /* @__PURE__ */ jsxs(
|
|
44
|
+
DropdownMenuPrimitive.Item,
|
|
45
|
+
{
|
|
46
|
+
ref,
|
|
47
|
+
className: cn(menuItemVariants({ destructive }), className),
|
|
48
|
+
...props,
|
|
49
|
+
children: [
|
|
50
|
+
icon ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: menuItemIconClass, children: icon }) : null,
|
|
51
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children }),
|
|
52
|
+
shortcut ? /* @__PURE__ */ jsx("span", { className: menuItemShortcutClass, children: shortcut }) : null
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
const MenuGroup = React.forwardRef(function MenuGroup2({ label, children, ...props }, ref) {
|
|
58
|
+
const labelId = React.useId();
|
|
59
|
+
return /* @__PURE__ */ jsxs(
|
|
60
|
+
DropdownMenuPrimitive.Group,
|
|
61
|
+
{
|
|
62
|
+
ref,
|
|
63
|
+
"aria-labelledby": label ? labelId : void 0,
|
|
64
|
+
...props,
|
|
65
|
+
children: [
|
|
66
|
+
label ? /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, { id: labelId, className: menuLabelClass, children: label }) : null,
|
|
67
|
+
children
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
});
|
|
72
|
+
const MenuLabel = React.forwardRef(function MenuLabel2({ className, ...props }, ref) {
|
|
73
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, { ref, className: cn(menuLabelClass, className), ...props });
|
|
74
|
+
});
|
|
75
|
+
const MenuSeparator = React.forwardRef(function MenuSeparator2({ className, ...props }, ref) {
|
|
76
|
+
return /* @__PURE__ */ jsx(
|
|
77
|
+
DropdownMenuPrimitive.Separator,
|
|
78
|
+
{
|
|
79
|
+
ref,
|
|
80
|
+
className: cn(menuSeparatorClass, className),
|
|
81
|
+
...props
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
});
|
|
85
|
+
function MenuSub(props) {
|
|
86
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { ...props });
|
|
87
|
+
}
|
|
88
|
+
const MenuSubTrigger = React.forwardRef(function MenuSubTrigger2({ className, destructive, icon, children, ...props }, ref) {
|
|
89
|
+
return /* @__PURE__ */ jsxs(
|
|
90
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
91
|
+
{
|
|
92
|
+
ref,
|
|
93
|
+
className: cn(menuItemVariants({ destructive }), className),
|
|
94
|
+
...props,
|
|
95
|
+
children: [
|
|
96
|
+
icon ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: menuItemIconClass, children: icon }) : null,
|
|
97
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children }),
|
|
98
|
+
/* @__PURE__ */ jsx(ChevronGlyph, {})
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
});
|
|
103
|
+
const MenuSubContent = React.forwardRef(function MenuSubContent2({ className, sideOffset = 2, loop = true, ...props }, ref) {
|
|
104
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
105
|
+
DropdownMenuPrimitive.SubContent,
|
|
106
|
+
{
|
|
107
|
+
ref,
|
|
108
|
+
sideOffset,
|
|
109
|
+
loop,
|
|
110
|
+
className: cn(menuPopupClass, className),
|
|
111
|
+
...props
|
|
112
|
+
}
|
|
113
|
+
) });
|
|
114
|
+
});
|
|
115
|
+
function ChevronGlyph() {
|
|
116
|
+
return /* @__PURE__ */ jsx("span", { "data-testid": "menu-sub-chevron", "aria-hidden": "true", className: menuSubChevronClass, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", focusable: "false", children: /* @__PURE__ */ jsx("path", { d: "M6 4l4 4-4 4", strokeLinecap: "round", strokeLinejoin: "round" }) }) });
|
|
117
|
+
}
|
|
118
|
+
export {
|
|
119
|
+
Menu,
|
|
120
|
+
MenuContent,
|
|
121
|
+
MenuGroup,
|
|
122
|
+
MenuItem,
|
|
123
|
+
MenuLabel,
|
|
124
|
+
MenuSeparator,
|
|
125
|
+
MenuSub,
|
|
126
|
+
MenuSubContent,
|
|
127
|
+
MenuSubTrigger,
|
|
128
|
+
MenuTrigger
|
|
129
|
+
};
|
|
130
|
+
//# sourceMappingURL=menu.js.map
|