@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,144 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type CredentialCardVariantProps } from "./credential-card.variants";
|
|
3
|
+
/** The credential kind a CredentialCard represents (spec §3). */
|
|
4
|
+
export type CredentialKind = NonNullable<CredentialCardVariantProps["kind"]>;
|
|
5
|
+
/**
|
|
6
|
+
* One small fact shown about the credential (spec §2 `status`). `verified` is the green status
|
|
7
|
+
* Badge (a proof about THIS credential, never the identity); `primary` is the credential you
|
|
8
|
+
* currently sign in with — a NEUTRAL fact, not a status color and never the brand. The status
|
|
9
|
+
* describes the credential, not the identity: a verified credential does not make the person
|
|
10
|
+
* verified.
|
|
11
|
+
*/
|
|
12
|
+
export interface CredentialCardStatus {
|
|
13
|
+
/** `verified` (the green status) or `primary` (the current sign-in credential). */
|
|
14
|
+
kind: "verified" | "primary";
|
|
15
|
+
/** The Badge's visible label and accessible name, a plain word ("Verified", "Primary"). */
|
|
16
|
+
label: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export interface CredentialCardProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, "title">, CredentialCardVariantProps {
|
|
19
|
+
/**
|
|
20
|
+
* The credential kind this card represents (spec §3): `email`, `phone`, `passkey`, `wallet`,
|
|
21
|
+
* or `enterprise-sso`. The kind is carried by the {@link icon} + {@link label} text, never by
|
|
22
|
+
* color — every kind is the same neutral surface. Defaults to `email`, the common case.
|
|
23
|
+
*/
|
|
24
|
+
kind?: CredentialKind;
|
|
25
|
+
/**
|
|
26
|
+
* The human-readable name of the credential KIND (spec §2 `label`), a statement in sentence
|
|
27
|
+
* case — "Email", "Passkey", "Wallet". It says what kind of link this is, not who the identity
|
|
28
|
+
* is. Required.
|
|
29
|
+
*/
|
|
30
|
+
label: React.ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* The value that identifies this specific credential (spec §2 `identifier`): the email, the
|
|
33
|
+
* masked phone, the passkey device name, the truncated wallet address, or the SSO provider and
|
|
34
|
+
* domain. Rendered in the monospace type role and isolated left-to-right so addresses, hashes,
|
|
35
|
+
* and wallet strings are never garbled, even inside RTL text. Selectable text so it can be
|
|
36
|
+
* copied; that does not make the card a control. Required.
|
|
37
|
+
*/
|
|
38
|
+
identifier: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* A short, plain string used to NAME the credential in the control accessible names — the
|
|
41
|
+
* `remove` button reads "Remove {kindNoun} {identifierText}" and the `selectable` checkbox
|
|
42
|
+
* reads "Select {kindNoun} {identifierText}", so a screen-reader user is never asked to remove
|
|
43
|
+
* or select an unnamed thing (spec §7). When omitted it is built from the visible {@link label}
|
|
44
|
+
* and the {@link identifier} (when it is a plain string).
|
|
45
|
+
*/
|
|
46
|
+
identifierText?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The required kind glyph (spec §2 `icon`): a small decorative mark for the credential kind. It
|
|
49
|
+
* reinforces the kind shown in the label and is rendered `aria-hidden` so the kind is announced
|
|
50
|
+
* once, from the label, not twice. Its fill is a neutral role — never a status color, never the
|
|
51
|
+
* brand.
|
|
52
|
+
*/
|
|
53
|
+
icon?: React.ReactNode;
|
|
54
|
+
/**
|
|
55
|
+
* At most one or two small status Badges (spec §2 `status`): `verified` (the green status) or
|
|
56
|
+
* `primary` (the current sign-in credential). The status describes the credential, not the
|
|
57
|
+
* identity.
|
|
58
|
+
*/
|
|
59
|
+
status?: CredentialCardStatus[];
|
|
60
|
+
/**
|
|
61
|
+
* Quiet secondary text (spec §2 `meta`) such as when the credential was added or last used.
|
|
62
|
+
* De-emphasized; never an alarm color.
|
|
63
|
+
*/
|
|
64
|
+
meta?: React.ReactNode;
|
|
65
|
+
/**
|
|
66
|
+
* Fires when the required `remove` control is activated (spec §2 `remove`/§8). Removing a
|
|
67
|
+
* credential detaches a login method from the identity — it never deletes the person. In a real
|
|
68
|
+
* app this opens the confirm step (spec §8); the card stays mounted and the identity intact. The
|
|
69
|
+
* `remove` control is the card's primary focus stop. Omit only when the row is display-only.
|
|
70
|
+
*/
|
|
71
|
+
onRemove?: () => void;
|
|
72
|
+
/**
|
|
73
|
+
* Disable `remove` (spec §4 Disabled) — for example on the last remaining sign-in credential,
|
|
74
|
+
* because removing it would lock the identity out. Shown via `aria-disabled` and removed from
|
|
75
|
+
* the tab order; the credential is still shown (the card itself is never "disabled").
|
|
76
|
+
*/
|
|
77
|
+
removeDisabled?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* The reason `remove` is disabled (spec §4/§7), given as adjacent text and wired to the control
|
|
80
|
+
* as its accessible description — so the reason is heard, not just seen, never communicated by
|
|
81
|
+
* graying alone. Required reading whenever {@link removeDisabled} is set.
|
|
82
|
+
*/
|
|
83
|
+
removeDisabledReason?: React.ReactNode;
|
|
84
|
+
/**
|
|
85
|
+
* A removal is resolving on the server (spec §4 Loading): `remove` shows a Spinner in place,
|
|
86
|
+
* is `aria-busy`, and is not re-triggerable. A wait is a plain wait — never the deliberate
|
|
87
|
+
* verified-check duration.
|
|
88
|
+
*/
|
|
89
|
+
loading?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* The plain message shown when a removal FAILS (spec §4/§7): the credential stays in the list
|
|
92
|
+
* and the failure is stated where it happened, naming what failed and what to do next — never
|
|
93
|
+
* blaming the reader and never an exclamation mark. Announced through an assertive live region.
|
|
94
|
+
*/
|
|
95
|
+
error?: React.ReactNode;
|
|
96
|
+
/**
|
|
97
|
+
* At most one further low-emphasis control beside `remove` (spec §2 `actions`) — for example
|
|
98
|
+
* "Make primary" or "Re-verify". Pass the interactive element itself; it is its own focus stop
|
|
99
|
+
* with its own keyboard model and focus ring. Keep the card to one primary action.
|
|
100
|
+
*/
|
|
101
|
+
actions?: React.ReactNode;
|
|
102
|
+
/**
|
|
103
|
+
* Render a leading Checkbox for bulk actions on a managed list (spec §3 `selectable`). Composes
|
|
104
|
+
* with any kind. The checkbox's accessible name is tied to the same credential.
|
|
105
|
+
*/
|
|
106
|
+
selectable?: boolean;
|
|
107
|
+
/** The controlled selected value for the `selectable` Checkbox (spec §3/§4). */
|
|
108
|
+
selected?: boolean;
|
|
109
|
+
/** Fires with the next selected value when the `selectable` Checkbox toggles (spec §6). */
|
|
110
|
+
onSelectedChange?: (selected: boolean) => void;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* A CredentialCard is one ROW in the list of credentials attached to an identity (spec §1) — a
|
|
114
|
+
* single way to reach that identity, such as an email, a phone number, a passkey, a wallet, or an
|
|
115
|
+
* enterprise single sign-on connection. It shows what the credential is, how to recognize it, and
|
|
116
|
+
* lets you remove it. Each card is a LINK to an identity, NOT the identity itself: it is removable,
|
|
117
|
+
* and removing it never deletes the person.
|
|
118
|
+
*
|
|
119
|
+
* It encodes the platform's first invariant — identity is not credentials — in its UI contract. A
|
|
120
|
+
* credential is a means of signing in, so a CredentialCard never reads as "you" and never stands
|
|
121
|
+
* in for the account: one identity holds many credentials the way it holds many profiles, and a
|
|
122
|
+
* card is one of those means, not the whole. The card may show that a credential is verified (the
|
|
123
|
+
* green status, never the brand) or that it is the one you currently sign in with, but neither
|
|
124
|
+
* makes the card into the identity behind it (spec §1/§8).
|
|
125
|
+
*
|
|
126
|
+
* It COMPOSES the committed primitives — a Card-like neutral surface, the destructive Button for
|
|
127
|
+
* `remove`, the secondary control for an optional `action`, the Badge for a `status`, and the
|
|
128
|
+
* Checkbox for `selectable` — so the focus ring, the target-size floor, the keyboard model, and
|
|
129
|
+
* the control motion all come from those proven primitives. The card surface itself is a static
|
|
130
|
+
* `listitem` container, not a single clickable control: the whole row does not map to one action,
|
|
131
|
+
* so the controls inside it each take focus in DOM order while the row takes none (spec §4/§6/§7).
|
|
132
|
+
*
|
|
133
|
+
* brand != state (spec §3/§5/§8): the card surface, the icon, and the identifier are NEUTRAL — the
|
|
134
|
+
* brand violet never marks a credential as special, and the verified-status green is reserved for
|
|
135
|
+
* the `verified` status Badge alone, never spent on the surface, the icon, or the identifier.
|
|
136
|
+
* Coloring the card green would imply the IDENTITY is verified, the one misreport this molecule
|
|
137
|
+
* forbids. The only status color it binds is the critical foreground on a removal-failure message.
|
|
138
|
+
*
|
|
139
|
+
* It is `'use client'` for the `React.useId()` calls that mint the ids wiring the disabled reason
|
|
140
|
+
* and the failure region to the controls (any hook makes the file a client component); the
|
|
141
|
+
* composed Button/Checkbox own their own state and `'use client'` independently.
|
|
142
|
+
*/
|
|
143
|
+
export declare const CredentialCard: React.ForwardRefExoticComponent<CredentialCardProps & React.RefAttributes<HTMLLIElement>>;
|
|
144
|
+
//# sourceMappingURL=credential-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-card.d.ts","sourceRoot":"","sources":["../../../src/components/credential-card/credential-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAWL,KAAK,0BAA0B,EAChC,MAAM,4BAA4B,CAAC;AAEpC,iEAAiE;AACjE,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC,CAAC;AAE7E;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,mFAAmF;IACnF,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;IAC7B,2FAA2F;IAC3F,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC,EAC1D,0BAA0B;IAC5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;;;OAIG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;;;;OAMG;IACH,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;;OAIG;IACH,MAAM,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAChC;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2FAA2F;IAC3F,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAChD;AAWD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,cAAc,2FA6I1B,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
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 { Button } from "../button";
|
|
6
|
+
import { Badge } from "../badge";
|
|
7
|
+
import { Checkbox } from "../checkbox";
|
|
8
|
+
import {
|
|
9
|
+
credentialCardVariants,
|
|
10
|
+
credentialCardIconClass,
|
|
11
|
+
credentialCardBodyClass,
|
|
12
|
+
credentialCardLabelClass,
|
|
13
|
+
credentialCardIdentifierClass,
|
|
14
|
+
credentialCardStatusClass,
|
|
15
|
+
credentialCardMetaClass,
|
|
16
|
+
credentialCardControlsClass,
|
|
17
|
+
credentialCardReasonClass,
|
|
18
|
+
credentialCardErrorClass
|
|
19
|
+
} from "./credential-card.variants";
|
|
20
|
+
const KIND_NOUN = {
|
|
21
|
+
email: "email",
|
|
22
|
+
phone: "phone",
|
|
23
|
+
passkey: "passkey",
|
|
24
|
+
wallet: "wallet",
|
|
25
|
+
"enterprise-sso": "enterprise SSO"
|
|
26
|
+
};
|
|
27
|
+
const CredentialCard = React.forwardRef(
|
|
28
|
+
function CredentialCard2({
|
|
29
|
+
className,
|
|
30
|
+
kind = "email",
|
|
31
|
+
label,
|
|
32
|
+
identifier,
|
|
33
|
+
identifierText,
|
|
34
|
+
icon,
|
|
35
|
+
status,
|
|
36
|
+
meta,
|
|
37
|
+
onRemove,
|
|
38
|
+
removeDisabled = false,
|
|
39
|
+
removeDisabledReason,
|
|
40
|
+
loading = false,
|
|
41
|
+
error,
|
|
42
|
+
actions,
|
|
43
|
+
selectable = false,
|
|
44
|
+
selected,
|
|
45
|
+
onSelectedChange,
|
|
46
|
+
...props
|
|
47
|
+
}, ref) {
|
|
48
|
+
const reactId = React.useId();
|
|
49
|
+
const reasonId = removeDisabledReason != null ? `${reactId}-reason` : void 0;
|
|
50
|
+
const errorId = error != null ? `${reactId}-error` : void 0;
|
|
51
|
+
const idText = identifierText ?? (typeof identifier === "string" ? identifier : "");
|
|
52
|
+
const credentialName = `${KIND_NOUN[kind]} ${idText}`.trim();
|
|
53
|
+
return (
|
|
54
|
+
// The card is a listitem within the credential list's <ul role="list"> (spec §7): no
|
|
55
|
+
// interactive role of its own, not a focus stop, not a single control (spec §4/§6).
|
|
56
|
+
/* @__PURE__ */ jsxs(
|
|
57
|
+
"li",
|
|
58
|
+
{
|
|
59
|
+
ref,
|
|
60
|
+
className: cn(credentialCardVariants({ kind }), className),
|
|
61
|
+
...props,
|
|
62
|
+
children: [
|
|
63
|
+
selectable ? /* @__PURE__ */ jsx(
|
|
64
|
+
Checkbox,
|
|
65
|
+
{
|
|
66
|
+
"data-testid": "credential-card-select",
|
|
67
|
+
label: `Select ${credentialName}`,
|
|
68
|
+
checked: selected,
|
|
69
|
+
onCheckedChange: onSelectedChange
|
|
70
|
+
}
|
|
71
|
+
) : null,
|
|
72
|
+
icon != null ? /* @__PURE__ */ jsx(
|
|
73
|
+
"span",
|
|
74
|
+
{
|
|
75
|
+
"data-testid": "credential-card-icon",
|
|
76
|
+
"aria-hidden": "true",
|
|
77
|
+
className: credentialCardIconClass,
|
|
78
|
+
children: icon
|
|
79
|
+
}
|
|
80
|
+
) : null,
|
|
81
|
+
/* @__PURE__ */ jsxs("span", { className: credentialCardBodyClass, children: [
|
|
82
|
+
/* @__PURE__ */ jsx("span", { className: credentialCardLabelClass, children: label }),
|
|
83
|
+
/* @__PURE__ */ jsx("span", { className: credentialCardIdentifierClass, children: identifier }),
|
|
84
|
+
meta != null ? /* @__PURE__ */ jsx("span", { className: credentialCardMetaClass, children: meta }) : null,
|
|
85
|
+
removeDisabledReason != null ? /* @__PURE__ */ jsx("span", { id: reasonId, className: credentialCardReasonClass, children: removeDisabledReason }) : null,
|
|
86
|
+
error != null ? /* @__PURE__ */ jsx("span", { id: errorId, role: "alert", className: credentialCardErrorClass, children: error }) : null
|
|
87
|
+
] }),
|
|
88
|
+
status != null && status.length > 0 ? /* @__PURE__ */ jsx("span", { className: credentialCardStatusClass, children: status.map(
|
|
89
|
+
(s, i) => s.kind === "verified" ? /* @__PURE__ */ jsx(Badge, { status: "verified", children: s.label }, i) : /* @__PURE__ */ jsx(Badge, { children: s.label }, i)
|
|
90
|
+
) }) : null,
|
|
91
|
+
/* @__PURE__ */ jsxs("span", { className: credentialCardControlsClass, children: [
|
|
92
|
+
actions,
|
|
93
|
+
onRemove != null ? /* @__PURE__ */ jsx(
|
|
94
|
+
Button,
|
|
95
|
+
{
|
|
96
|
+
variant: "destructive",
|
|
97
|
+
loading,
|
|
98
|
+
"aria-label": `Remove ${credentialName}`,
|
|
99
|
+
"aria-disabled": removeDisabled || void 0,
|
|
100
|
+
"aria-describedby": [reasonId, errorId].filter(Boolean).join(" ") || void 0,
|
|
101
|
+
tabIndex: removeDisabled ? -1 : void 0,
|
|
102
|
+
className: removeDisabled ? "pointer-events-none text-text-disabled" : void 0,
|
|
103
|
+
onClick: removeDisabled || loading ? void 0 : onRemove,
|
|
104
|
+
children: "Remove"
|
|
105
|
+
}
|
|
106
|
+
) : null
|
|
107
|
+
] })
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
export {
|
|
115
|
+
CredentialCard
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=credential-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/credential-card/credential-card.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { cn } from \"../../lib/cn\";\nimport { Button } from \"../button\";\nimport { Badge } from \"../badge\";\nimport { Checkbox } from \"../checkbox\";\nimport {\n credentialCardVariants,\n credentialCardIconClass,\n credentialCardBodyClass,\n credentialCardLabelClass,\n credentialCardIdentifierClass,\n credentialCardStatusClass,\n credentialCardMetaClass,\n credentialCardControlsClass,\n credentialCardReasonClass,\n credentialCardErrorClass,\n type CredentialCardVariantProps,\n} from \"./credential-card.variants\";\n\n/** The credential kind a CredentialCard represents (spec §3). */\nexport type CredentialKind = NonNullable<CredentialCardVariantProps[\"kind\"]>;\n\n/**\n * One small fact shown about the credential (spec §2 `status`). `verified` is the green status\n * Badge (a proof about THIS credential, never the identity); `primary` is the credential you\n * currently sign in with — a NEUTRAL fact, not a status color and never the brand. The status\n * describes the credential, not the identity: a verified credential does not make the person\n * verified.\n */\nexport interface CredentialCardStatus {\n /** `verified` (the green status) or `primary` (the current sign-in credential). */\n kind: \"verified\" | \"primary\";\n /** The Badge's visible label and accessible name, a plain word (\"Verified\", \"Primary\"). */\n label: React.ReactNode;\n}\n\nexport interface CredentialCardProps\n extends Omit<React.LiHTMLAttributes<HTMLLIElement>, \"title\">,\n CredentialCardVariantProps {\n /**\n * The credential kind this card represents (spec §3): `email`, `phone`, `passkey`, `wallet`,\n * or `enterprise-sso`. The kind is carried by the {@link icon} + {@link label} text, never by\n * color — every kind is the same neutral surface. Defaults to `email`, the common case.\n */\n kind?: CredentialKind;\n /**\n * The human-readable name of the credential KIND (spec §2 `label`), a statement in sentence\n * case — \"Email\", \"Passkey\", \"Wallet\". It says what kind of link this is, not who the identity\n * is. Required.\n */\n label: React.ReactNode;\n /**\n * The value that identifies this specific credential (spec §2 `identifier`): the email, the\n * masked phone, the passkey device name, the truncated wallet address, or the SSO provider and\n * domain. Rendered in the monospace type role and isolated left-to-right so addresses, hashes,\n * and wallet strings are never garbled, even inside RTL text. Selectable text so it can be\n * copied; that does not make the card a control. Required.\n */\n identifier: React.ReactNode;\n /**\n * A short, plain string used to NAME the credential in the control accessible names — the\n * `remove` button reads \"Remove {kindNoun} {identifierText}\" and the `selectable` checkbox\n * reads \"Select {kindNoun} {identifierText}\", so a screen-reader user is never asked to remove\n * or select an unnamed thing (spec §7). When omitted it is built from the visible {@link label}\n * and the {@link identifier} (when it is a plain string).\n */\n identifierText?: string;\n /**\n * The required kind glyph (spec §2 `icon`): a small decorative mark for the credential kind. It\n * reinforces the kind shown in the label and is rendered `aria-hidden` so the kind is announced\n * once, from the label, not twice. Its fill is a neutral role — never a status color, never the\n * brand.\n */\n icon?: React.ReactNode;\n /**\n * At most one or two small status Badges (spec §2 `status`): `verified` (the green status) or\n * `primary` (the current sign-in credential). The status describes the credential, not the\n * identity.\n */\n status?: CredentialCardStatus[];\n /**\n * Quiet secondary text (spec §2 `meta`) such as when the credential was added or last used.\n * De-emphasized; never an alarm color.\n */\n meta?: React.ReactNode;\n /**\n * Fires when the required `remove` control is activated (spec §2 `remove`/§8). Removing a\n * credential detaches a login method from the identity — it never deletes the person. In a real\n * app this opens the confirm step (spec §8); the card stays mounted and the identity intact. The\n * `remove` control is the card's primary focus stop. Omit only when the row is display-only.\n */\n onRemove?: () => void;\n /**\n * Disable `remove` (spec §4 Disabled) — for example on the last remaining sign-in credential,\n * because removing it would lock the identity out. Shown via `aria-disabled` and removed from\n * the tab order; the credential is still shown (the card itself is never \"disabled\").\n */\n removeDisabled?: boolean;\n /**\n * The reason `remove` is disabled (spec §4/§7), given as adjacent text and wired to the control\n * as its accessible description — so the reason is heard, not just seen, never communicated by\n * graying alone. Required reading whenever {@link removeDisabled} is set.\n */\n removeDisabledReason?: React.ReactNode;\n /**\n * A removal is resolving on the server (spec §4 Loading): `remove` shows a Spinner in place,\n * is `aria-busy`, and is not re-triggerable. A wait is a plain wait — never the deliberate\n * verified-check duration.\n */\n loading?: boolean;\n /**\n * The plain message shown when a removal FAILS (spec §4/§7): the credential stays in the list\n * and the failure is stated where it happened, naming what failed and what to do next — never\n * blaming the reader and never an exclamation mark. Announced through an assertive live region.\n */\n error?: React.ReactNode;\n /**\n * At most one further low-emphasis control beside `remove` (spec §2 `actions`) — for example\n * \"Make primary\" or \"Re-verify\". Pass the interactive element itself; it is its own focus stop\n * with its own keyboard model and focus ring. Keep the card to one primary action.\n */\n actions?: React.ReactNode;\n /**\n * Render a leading Checkbox for bulk actions on a managed list (spec §3 `selectable`). Composes\n * with any kind. The checkbox's accessible name is tied to the same credential.\n */\n selectable?: boolean;\n /** The controlled selected value for the `selectable` Checkbox (spec §3/§4). */\n selected?: boolean;\n /** Fires with the next selected value when the `selectable` Checkbox toggles (spec §6). */\n onSelectedChange?: (selected: boolean) => void;\n}\n\n// The kind → noun used in the control accessible names (\"Remove email …\", \"Select email …\").\nconst KIND_NOUN: Record<CredentialKind, string> = {\n email: \"email\",\n phone: \"phone\",\n passkey: \"passkey\",\n wallet: \"wallet\",\n \"enterprise-sso\": \"enterprise SSO\",\n};\n\n/**\n * A CredentialCard is one ROW in the list of credentials attached to an identity (spec §1) — a\n * single way to reach that identity, such as an email, a phone number, a passkey, a wallet, or an\n * enterprise single sign-on connection. It shows what the credential is, how to recognize it, and\n * lets you remove it. Each card is a LINK to an identity, NOT the identity itself: it is removable,\n * and removing it never deletes the person.\n *\n * It encodes the platform's first invariant — identity is not credentials — in its UI contract. A\n * credential is a means of signing in, so a CredentialCard never reads as \"you\" and never stands\n * in for the account: one identity holds many credentials the way it holds many profiles, and a\n * card is one of those means, not the whole. The card may show that a credential is verified (the\n * green status, never the brand) or that it is the one you currently sign in with, but neither\n * makes the card into the identity behind it (spec §1/§8).\n *\n * It COMPOSES the committed primitives — a Card-like neutral surface, the destructive Button for\n * `remove`, the secondary control for an optional `action`, the Badge for a `status`, and the\n * Checkbox for `selectable` — so the focus ring, the target-size floor, the keyboard model, and\n * the control motion all come from those proven primitives. The card surface itself is a static\n * `listitem` container, not a single clickable control: the whole row does not map to one action,\n * so the controls inside it each take focus in DOM order while the row takes none (spec §4/§6/§7).\n *\n * brand != state (spec §3/§5/§8): the card surface, the icon, and the identifier are NEUTRAL — the\n * brand violet never marks a credential as special, and the verified-status green is reserved for\n * the `verified` status Badge alone, never spent on the surface, the icon, or the identifier.\n * Coloring the card green would imply the IDENTITY is verified, the one misreport this molecule\n * forbids. The only status color it binds is the critical foreground on a removal-failure message.\n *\n * It is `'use client'` for the `React.useId()` calls that mint the ids wiring the disabled reason\n * and the failure region to the controls (any hook makes the file a client component); the\n * composed Button/Checkbox own their own state and `'use client'` independently.\n */\nexport const CredentialCard = React.forwardRef<HTMLLIElement, CredentialCardProps>(\n function CredentialCard(\n {\n className,\n kind = \"email\",\n label,\n identifier,\n identifierText,\n icon,\n status,\n meta,\n onRemove,\n removeDisabled = false,\n removeDisabledReason,\n loading = false,\n error,\n actions,\n selectable = false,\n selected,\n onSelectedChange,\n ...props\n },\n ref,\n ) {\n const reactId = React.useId();\n const reasonId = removeDisabledReason != null ? `${reactId}-reason` : undefined;\n const errorId = error != null ? `${reactId}-error` : undefined;\n\n // The credential's name used in the control accessible names (spec §7) — a screen-reader user\n // is never asked to remove or select an unnamed thing. Built from the kind noun + a plain text\n // form of the identifier (the caller-supplied identifierText, else the identifier when it is a\n // plain string), so \"Remove email jordan@example.com\" / \"Select email jordan@example.com\".\n const idText =\n identifierText ?? (typeof identifier === \"string\" ? identifier : \"\");\n const credentialName = `${KIND_NOUN[kind]} ${idText}`.trim();\n\n return (\n // The card is a listitem within the credential list's <ul role=\"list\"> (spec §7): no\n // interactive role of its own, not a focus stop, not a single control (spec §4/§6).\n <li\n ref={ref}\n className={cn(credentialCardVariants({ kind }), className)}\n {...props}\n >\n {/* selectable: a leading Checkbox for bulk actions (spec §3). Its accessible name is tied\n to the same credential. A checked box is the brand action accent (bound in the Checkbox\n primitive), never the verified-status green — selection is a neutral action state. */}\n {selectable ? (\n <Checkbox\n data-testid=\"credential-card-select\"\n label={`Select ${credentialName}`}\n checked={selected}\n onCheckedChange={onSelectedChange}\n />\n ) : null}\n\n {/* the kind glyph (spec §2): decorative (aria-hidden), neutral fill, md icon role — the\n label text carries the kind if the icon is dropped, so the kind never rests on the icon\n or color alone (spec §7). */}\n {icon != null ? (\n <span\n data-testid=\"credential-card-icon\"\n aria-hidden=\"true\"\n className={credentialCardIconClass}\n >\n {icon}\n </span>\n ) : null}\n\n {/* the label + identifier block (spec §2): what kind of link this is, then the value that\n identifies this specific credential, in the monospace role, isolated LTR. Both reach the\n accessibility tree as text (1.3.1) — never carried by the icon or a color alone. */}\n <span className={credentialCardBodyClass}>\n <span className={credentialCardLabelClass}>{label}</span>\n <span className={credentialCardIdentifierClass}>{identifier}</span>\n {meta != null ? <span className={credentialCardMetaClass}>{meta}</span> : null}\n {/* the disabled reason (spec §4/§7): adjacent muted text, wired to the remove control as\n its accessible description so the reason is heard, not just seen — never gray alone. */}\n {removeDisabledReason != null ? (\n <span id={reasonId} className={credentialCardReasonClass}>\n {removeDisabledReason}\n </span>\n ) : null}\n {/* the removal-failure message (spec §4/§7): the credential stays and the failure is\n stated where it happened, in the critical color, through an ASSERTIVE live region\n (role=alert, 4.1.3) — naming what failed and what to do next, never blaming, never an\n exclamation mark. */}\n {error != null ? (\n <span id={errorId} role=\"alert\" className={credentialCardErrorClass}>\n {error}\n </span>\n ) : null}\n </span>\n\n {/* the status Badges (spec §2): at most one or two facts about the credential. `verified`\n is the green status Badge (a proof about THIS credential, never the identity); `primary`\n is a NEUTRAL Badge — which credential is used, a fact, not a status color or the brand. */}\n {status != null && status.length > 0 ? (\n <span className={credentialCardStatusClass}>\n {status.map((s, i) =>\n s.kind === \"verified\" ? (\n <Badge key={i} status=\"verified\">\n {s.label}\n </Badge>\n ) : (\n <Badge key={i}>{s.label}</Badge>\n ),\n )}\n </span>\n ) : null}\n\n {/* the trailing controls (spec §2): the optional low-emphasis `action` beside the required\n destructive `remove`. The `remove` control names the credential it detaches (spec §7);\n detaching is consequential, so it takes the destructive action treatment (spec §2/§5).\n Loading shows the Button's in-place spinner + aria-busy and is not re-triggerable; the\n wait runs on the Button's ambient spinner, never the verified-check theatre (spec §4). */}\n <span className={credentialCardControlsClass}>\n {actions}\n {onRemove != null ? (\n <Button\n variant=\"destructive\"\n loading={loading}\n aria-label={`Remove ${credentialName}`}\n aria-disabled={removeDisabled || undefined}\n aria-describedby={\n [reasonId, errorId].filter(Boolean).join(\" \") || undefined\n }\n // a disabled remove stays NAMED and described (aria-disabled, not native disabled),\n // out of the tab order, and inert — never a silently dropped name (spec §4/§7). DEC-C:\n // it dims via the disabled text TOKEN, set here, never a blanket opacity.\n tabIndex={removeDisabled ? -1 : undefined}\n className={removeDisabled ? \"pointer-events-none text-text-disabled\" : undefined}\n onClick={removeDisabled || loading ? undefined : onRemove}\n >\n Remove\n </Button>\n ) : null}\n </span>\n </li>\n );\n },\n);\n"],"mappings":";AA+NU,cAwBF,YAxBE;AA7NV,YAAY,WAAW;AACvB,SAAS,UAAU;AACnB,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAqHP,MAAM,YAA4C;AAAA,EAChD,OAAO;AAAA,EACP,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,kBAAkB;AACpB;AAiCO,MAAM,iBAAiB,MAAM;AAAA,EAClC,SAASA,gBACP;AAAA,IACE;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB;AAAA,IACjB;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,aAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,UAAM,UAAU,MAAM,MAAM;AAC5B,UAAM,WAAW,wBAAwB,OAAO,GAAG,OAAO,YAAY;AACtE,UAAM,UAAU,SAAS,OAAO,GAAG,OAAO,WAAW;AAMrD,UAAM,SACJ,mBAAmB,OAAO,eAAe,WAAW,aAAa;AACnE,UAAM,iBAAiB,GAAG,UAAU,IAAI,CAAC,IAAI,MAAM,GAAG,KAAK;AAE3D;AAAA;AAAA;AAAA,MAGE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,WAAW,GAAG,uBAAuB,EAAE,KAAK,CAAC,GAAG,SAAS;AAAA,UACxD,GAAG;AAAA,UAKH;AAAA,yBACC;AAAA,cAAC;AAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,OAAO,UAAU,cAAc;AAAA,gBAC/B,SAAS;AAAA,gBACT,iBAAiB;AAAA;AAAA,YACnB,IACE;AAAA,YAKH,QAAQ,OACP;AAAA,cAAC;AAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,eAAY;AAAA,gBACZ,WAAW;AAAA,gBAEV;AAAA;AAAA,YACH,IACE;AAAA,YAKJ,qBAAC,UAAK,WAAW,yBACf;AAAA,kCAAC,UAAK,WAAW,0BAA2B,iBAAM;AAAA,cAClD,oBAAC,UAAK,WAAW,+BAAgC,sBAAW;AAAA,cAC3D,QAAQ,OAAO,oBAAC,UAAK,WAAW,yBAA0B,gBAAK,IAAU;AAAA,cAGzE,wBAAwB,OACvB,oBAAC,UAAK,IAAI,UAAU,WAAW,2BAC5B,gCACH,IACE;AAAA,cAKH,SAAS,OACR,oBAAC,UAAK,IAAI,SAAS,MAAK,SAAQ,WAAW,0BACxC,iBACH,IACE;AAAA,eACN;AAAA,YAKC,UAAU,QAAQ,OAAO,SAAS,IACjC,oBAAC,UAAK,WAAW,2BACd,iBAAO;AAAA,cAAI,CAAC,GAAG,MACd,EAAE,SAAS,aACT,oBAAC,SAAc,QAAO,YACnB,YAAE,SADO,CAEZ,IAEA,oBAAC,SAAe,YAAE,SAAN,CAAY;AAAA,YAE5B,GACF,IACE;AAAA,YAOJ,qBAAC,UAAK,WAAW,6BACd;AAAA;AAAA,cACA,YAAY,OACX;AAAA,gBAAC;AAAA;AAAA,kBACC,SAAQ;AAAA,kBACR;AAAA,kBACA,cAAY,UAAU,cAAc;AAAA,kBACpC,iBAAe,kBAAkB;AAAA,kBACjC,oBACE,CAAC,UAAU,OAAO,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAAA,kBAKnD,UAAU,iBAAiB,KAAK;AAAA,kBAChC,WAAW,iBAAiB,2CAA2C;AAAA,kBACvE,SAAS,kBAAkB,UAAU,SAAY;AAAA,kBAClD;AAAA;AAAA,cAED,IACE;AAAA,eACN;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EAEJ;AACF;","names":["CredentialCard"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
export declare const credentialCardVariants: (props?: ({
|
|
3
|
+
kind?: "email" | "phone" | "passkey" | "wallet" | "enterprise-sso" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const credentialCardIconClass = "inline-flex h-(--size-icon-md) w-(--size-icon-md) shrink-0 items-center justify-center text-text-secondary";
|
|
6
|
+
export declare const credentialCardBodyClass = "flex min-w-0 flex-1 flex-col gap-(--space-1)";
|
|
7
|
+
export declare const credentialCardLabelClass = "text-label text-text-primary";
|
|
8
|
+
export declare const credentialCardIdentifierClass = "text-mono text-text-secondary [direction:ltr] truncate";
|
|
9
|
+
export declare const credentialCardStatusClass = "flex shrink-0 flex-wrap items-center gap-(--space-1)";
|
|
10
|
+
export declare const credentialCardMetaClass = "text-caption text-text-muted";
|
|
11
|
+
export declare const credentialCardControlsClass = "flex shrink-0 items-center gap-(--space-2)";
|
|
12
|
+
export declare const credentialCardReasonClass = "text-caption text-text-muted";
|
|
13
|
+
export declare const credentialCardErrorClass = "text-caption text-status-critical-fg";
|
|
14
|
+
export type CredentialCardVariantProps = VariantProps<typeof credentialCardVariants>;
|
|
15
|
+
//# sourceMappingURL=credential-card.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-card.variants.d.ts","sourceRoot":"","sources":["../../../src/components/credential-card/credential-card.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAsClE,eAAO,MAAM,sBAAsB;;8EAwBlC,CAAC;AAOF,eAAO,MAAM,uBAAuB,+GAC0E,CAAC;AAK/G,eAAO,MAAM,uBAAuB,iDAAiD,CAAC;AAKtF,eAAO,MAAM,wBAAwB,iCAAiC,CAAC;AAOvE,eAAO,MAAM,6BAA6B,2DACgB,CAAC;AAO3D,eAAO,MAAM,yBAAyB,yDAAyD,CAAC;AAIhG,eAAO,MAAM,uBAAuB,iCAAiC,CAAC;AAOtE,eAAO,MAAM,2BAA2B,+CAA+C,CAAC;AAMxF,eAAO,MAAM,yBAAyB,iCAAiC,CAAC;AAQxE,eAAO,MAAM,wBAAwB,yCAAyC,CAAC;AAE/E,MAAM,MAAM,0BAA0B,GAAG,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
const credentialCardVariants = cva(
|
|
3
|
+
[
|
|
4
|
+
// raised neutral surface, rounded container, resting elevation, internal padding from --space-4
|
|
5
|
+
"relative flex items-start gap-(--space-2) rounded-lg border bg-surface-raised shadow-sm p-(--space-4)",
|
|
6
|
+
// the default container hairline (spec §5)
|
|
7
|
+
"border-surface-border",
|
|
8
|
+
// logical-property text alignment so the row mirrors under dir=rtl (G-U6); list rows carry
|
|
9
|
+
// no bullet marker
|
|
10
|
+
"text-start text-text-primary list-none"
|
|
11
|
+
],
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
// STRUCTURAL axis = spec §3 (the credential KIND the card represents). The kind is carried
|
|
15
|
+
// by the icon + label text, never color, so every kind is the SAME neutral surface.
|
|
16
|
+
kind: {
|
|
17
|
+
email: "",
|
|
18
|
+
phone: "",
|
|
19
|
+
passkey: "",
|
|
20
|
+
wallet: "",
|
|
21
|
+
"enterprise-sso": ""
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: { kind: "email" }
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
const credentialCardIconClass = "inline-flex h-(--size-icon-md) w-(--size-icon-md) shrink-0 items-center justify-center text-text-secondary";
|
|
28
|
+
const credentialCardBodyClass = "flex min-w-0 flex-1 flex-col gap-(--space-1)";
|
|
29
|
+
const credentialCardLabelClass = "text-label text-text-primary";
|
|
30
|
+
const credentialCardIdentifierClass = "text-mono text-text-secondary [direction:ltr] truncate";
|
|
31
|
+
const credentialCardStatusClass = "flex shrink-0 flex-wrap items-center gap-(--space-1)";
|
|
32
|
+
const credentialCardMetaClass = "text-caption text-text-muted";
|
|
33
|
+
const credentialCardControlsClass = "flex shrink-0 items-center gap-(--space-2)";
|
|
34
|
+
const credentialCardReasonClass = "text-caption text-text-muted";
|
|
35
|
+
const credentialCardErrorClass = "text-caption text-status-critical-fg";
|
|
36
|
+
export {
|
|
37
|
+
credentialCardBodyClass,
|
|
38
|
+
credentialCardControlsClass,
|
|
39
|
+
credentialCardErrorClass,
|
|
40
|
+
credentialCardIconClass,
|
|
41
|
+
credentialCardIdentifierClass,
|
|
42
|
+
credentialCardLabelClass,
|
|
43
|
+
credentialCardMetaClass,
|
|
44
|
+
credentialCardReasonClass,
|
|
45
|
+
credentialCardStatusClass,
|
|
46
|
+
credentialCardVariants
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=credential-card.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/credential-card/credential-card.variants.ts"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\n\n// CredentialCard is one ROW in the list of credentials ATTACHED to an identity — a single way\n// to reach that identity (an email, phone, passkey, wallet, or enterprise SSO connection). It\n// encodes the platform's first invariant — identity is not credentials — in its UI contract: a\n// card is a LINK to an identity, never the identity itself, so it never reads as \"you\" and never\n// stands in for the account (spec §1/§8).\n//\n// It COMPOSES the committed primitives rather than reinventing them — a Card-like neutral surface\n// (the surface-* roles, bound here), the destructive Button for `remove`, the secondary Button\n// for an optional `action`, the Badge for a `status`, the Checkbox for `selectable`, and the\n// Button's in-place loading spinner for a resolving removal. So the focus ring, the target-size\n// floor, the keyboard model, and the control motion all come from those proven primitives; this\n// file binds ONLY the surrounding neutral surface + text-role + layout classes.\n//\n// brand != state (spec §3/§5/§8). The card SURFACE consumes NO action or status token of its own\n// — neutrals carry the card. The brand violet (Sovereign Violet, the action accent) is never a\n// card fill, never the icon, never the identifier, and never marks a credential as special. The\n// verified-status green is reserved for the `verified` status Badge and is never spent on the\n// card surface, the icon, or the identifier — coloring the card green would imply the IDENTITY is\n// verified, which is the one misreport this molecule forbids. The card therefore binds nothing\n// from the action tier and nothing from the status tier; those colors live on the controls and\n// Badges it holds (asserted positively in their own primitives' tests), never on this surface.\n//\n// The motion the card adds is none of its own: control hover/press uses the composed primitive's\n// fast functional transition on verdify easing, collapsing to the instant endpoint under reduced\n// motion. A resolving removal is a plain wait on the Button's ambient spinner — never the 350ms\n// VerifiedBadge-only theatre duration: a removal is not a verification (G-U3).\n\n// The card container (spec §2/§4/§5): a NEUTRAL raised surface, the same Card-static surface the\n// committed Card binds, but it is a LIST ROW (`<li role=\"listitem\">`, set in the tsx) so it sits\n// in the credential list's `<ul role=\"list\">` (spec §7). It is a static container, NOT a single\n// clickable control — the whole row does not map to one action — so it carries no focus ring and\n// no target-size floor of its own (those live on its controls, spec §4/§5). The `kind` axis is\n// which credential the card represents; it is carried by the `icon` + `label` TEXT, never by\n// color, so NONE of the kinds recolors the surface — every kind is the identical neutral surface\n// (spec §3). `selectable` composes with any kind and changes layout (a leading Checkbox), not\n// color, so it is not a color variant here.\nexport const credentialCardVariants = cva(\n [\n // raised neutral surface, rounded container, resting elevation, internal padding from --space-4\n \"relative flex items-start gap-(--space-2) rounded-lg border bg-surface-raised shadow-sm p-(--space-4)\",\n // the default container hairline (spec §5)\n \"border-surface-border\",\n // logical-property text alignment so the row mirrors under dir=rtl (G-U6); list rows carry\n // no bullet marker\n \"text-start text-text-primary list-none\",\n ],\n {\n variants: {\n // STRUCTURAL axis = spec §3 (the credential KIND the card represents). The kind is carried\n // by the icon + label text, never color, so every kind is the SAME neutral surface.\n kind: {\n email: \"\",\n phone: \"\",\n passkey: \"\",\n wallet: \"\",\n \"enterprise-sso\": \"\",\n },\n },\n defaultVariants: { kind: \"email\" },\n },\n);\n\n// The kind icon (spec §2/§5/§7): one small glyph for the credential kind at the md icon role. It\n// reinforces the kind shown in the label and is decorative (aria-hidden, set in the tsx) — the\n// label text still carries the kind if the icon is dropped, so the kind never rests on the icon\n// or color alone. Its fill is the SECONDARY text role (a neutral role), never a status color and\n// never the brand (spec §2/§3).\nexport const credentialCardIconClass =\n \"inline-flex h-(--size-icon-md) w-(--size-icon-md) shrink-0 items-center justify-center text-text-secondary\";\n\n// The label + identifier block (spec §2): the human-readable kind name above the value that\n// identifies this specific credential. Takes the remaining inline space between the icon and the\n// trailing status/controls; stacks the two lines at the --space-1 gap.\nexport const credentialCardBodyClass = \"flex min-w-0 flex-1 flex-col gap-(--space-1)\";\n\n// The label (spec §2/§5): the human-readable name of the credential KIND, a statement in\n// sentence case (for example \"Email\", \"Passkey\", \"Wallet\"), in the label type role + the PRIMARY\n// text color. The label says what kind of link this is, not who the identity is.\nexport const credentialCardLabelClass = \"text-label text-text-primary\";\n\n// The identifier (spec §2/§5/G-U6): the value that identifies this specific credential — the\n// email, the masked phone, the passkey device name, the truncated wallet address, or the SSO\n// provider + domain. It renders in the MONOSPACE type role (never the UI font for credential\n// strings) in the SECONDARY text color, isolated left-to-right so addresses, hashes, and wallet\n// strings stay readable even inside RTL text, and truncates rather than wrapping.\nexport const credentialCardIdentifierClass =\n \"text-mono text-text-secondary [direction:ltr] truncate\";\n\n// The status row (spec §2): at most one or two small Badges stating a fact about the credential —\n// `verified` (the green status, on the composed Badge's verified variant) or `primary` (the\n// credential you currently sign in with, a NEUTRAL Badge — \"primary\" is which credential is used,\n// a fact, not a status color and never the brand). The status describes the credential, not the\n// identity. This row only positions the composed Badges; their color lives in badge.variants.ts.\nexport const credentialCardStatusClass = \"flex shrink-0 flex-wrap items-center gap-(--space-1)\";\n\n// The meta line (spec §2/§5): quiet secondary text such as when the credential was added or last\n// used, in the MUTED text color at the caption role. De-emphasized; never an alarm color.\nexport const credentialCardMetaClass = \"text-caption text-text-muted\";\n\n// The trailing controls cluster (spec §2): the optional `action` beside the required `remove`,\n// aligned to the inline-end edge at the --space-2 gap. Keep the card to one primary action\n// (`remove`) plus at most one further low-emphasis control (restraint over volume). It only lays\n// the controls out; each control's treatment + focus ring + target-size floor live on the\n// composed Button.\nexport const credentialCardControlsClass = \"flex shrink-0 items-center gap-(--space-2)\";\n\n// The disabled-reason note (spec §4/§5/§7): when a control is disabled (for example `remove` on\n// the last sign-in credential), the reason is given as adjacent text in the MUTED text color at\n// the caption role — wired to the control as its accessible description (so the reason is heard,\n// not just seen), never communicated by graying alone.\nexport const credentialCardReasonClass = \"text-caption text-text-muted\";\n\n// The removal-failure message (spec §4/§7): on a FAILED removal the credential stays in the list\n// and the failure is stated plainly where it happened, in the CRITICAL status foreground at the\n// caption role — naming what failed and what to do next, never blaming the reader and never an\n// exclamation mark. It is the ONLY status color this component binds, and only here (never on the\n// card surface, brand != state). It is announced through an assertive live region (role=alert,\n// set in the tsx) per 4.1.3.\nexport const credentialCardErrorClass = \"text-caption text-status-critical-fg\";\n\nexport type CredentialCardVariantProps = VariantProps<typeof credentialCardVariants>;\n"],"mappings":"AAAA,SAAS,WAA8B;AAsChC,MAAM,yBAAyB;AAAA,EACpC;AAAA;AAAA,IAEE;AAAA;AAAA,IAEA;AAAA;AAAA;AAAA,IAGA;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA;AAAA;AAAA,MAGR,MAAM;AAAA,QACJ,OAAO;AAAA,QACP,OAAO;AAAA,QACP,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,kBAAkB;AAAA,MACpB;AAAA,IACF;AAAA,IACA,iBAAiB,EAAE,MAAM,QAAQ;AAAA,EACnC;AACF;AAOO,MAAM,0BACX;AAKK,MAAM,0BAA0B;AAKhC,MAAM,2BAA2B;AAOjC,MAAM,gCACX;AAOK,MAAM,4BAA4B;AAIlC,MAAM,0BAA0B;AAOhC,MAAM,8BAA8B;AAMpC,MAAM,4BAA4B;AAQlC,MAAM,2BAA2B;","names":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CredentialCard, type CredentialCardProps, type CredentialKind, type CredentialCardStatus, } from "./credential-card";
|
|
2
|
+
export { credentialCardVariants, credentialCardIconClass, credentialCardBodyClass, credentialCardLabelClass, credentialCardIdentifierClass, credentialCardStatusClass, credentialCardMetaClass, credentialCardControlsClass, credentialCardReasonClass, credentialCardErrorClass, type CredentialCardVariantProps, } from "./credential-card.variants";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/credential-card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,oBAAoB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,EAC7B,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,EAC3B,yBAAyB,EACzB,wBAAwB,EACxB,KAAK,0BAA0B,GAChC,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CredentialCard
|
|
3
|
+
} from "./credential-card";
|
|
4
|
+
import {
|
|
5
|
+
credentialCardVariants,
|
|
6
|
+
credentialCardIconClass,
|
|
7
|
+
credentialCardBodyClass,
|
|
8
|
+
credentialCardLabelClass,
|
|
9
|
+
credentialCardIdentifierClass,
|
|
10
|
+
credentialCardStatusClass,
|
|
11
|
+
credentialCardMetaClass,
|
|
12
|
+
credentialCardControlsClass,
|
|
13
|
+
credentialCardReasonClass,
|
|
14
|
+
credentialCardErrorClass
|
|
15
|
+
} from "./credential-card.variants";
|
|
16
|
+
export {
|
|
17
|
+
CredentialCard,
|
|
18
|
+
credentialCardBodyClass,
|
|
19
|
+
credentialCardControlsClass,
|
|
20
|
+
credentialCardErrorClass,
|
|
21
|
+
credentialCardIconClass,
|
|
22
|
+
credentialCardIdentifierClass,
|
|
23
|
+
credentialCardLabelClass,
|
|
24
|
+
credentialCardMetaClass,
|
|
25
|
+
credentialCardReasonClass,
|
|
26
|
+
credentialCardStatusClass,
|
|
27
|
+
credentialCardVariants
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/credential-card/index.ts"],"sourcesContent":["export {\n CredentialCard,\n type CredentialCardProps,\n type CredentialKind,\n type CredentialCardStatus,\n} from \"./credential-card\";\nexport {\n credentialCardVariants,\n credentialCardIconClass,\n credentialCardBodyClass,\n credentialCardLabelClass,\n credentialCardIdentifierClass,\n credentialCardStatusClass,\n credentialCardMetaClass,\n credentialCardControlsClass,\n credentialCardReasonClass,\n credentialCardErrorClass,\n type CredentialCardVariantProps,\n} from \"./credential-card.variants\";\n"],"mappings":"AAAA;AAAA,EACE;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;","names":[]}
|