@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,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Tooltip as TooltipPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "../../lib/cn";
|
|
6
|
+
import { tooltipContentClass, tooltipArrowClass } from "./tooltip.variants";
|
|
7
|
+
function TooltipProvider({ delayDuration = 300, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Provider, { delayDuration, ...props });
|
|
9
|
+
}
|
|
10
|
+
function Tooltip(props) {
|
|
11
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Root, { ...props });
|
|
12
|
+
}
|
|
13
|
+
const TooltipTrigger = React.forwardRef(function TooltipTrigger2(props, ref) {
|
|
14
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, { ref, ...props });
|
|
15
|
+
});
|
|
16
|
+
const TooltipContent = React.forwardRef(function TooltipContent2({ className, children, sideOffset = 6, arrow = true, variant: _variant = "description", ...props }, ref) {
|
|
17
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
18
|
+
TooltipPrimitive.Content,
|
|
19
|
+
{
|
|
20
|
+
ref,
|
|
21
|
+
"data-testid": "tooltip-content",
|
|
22
|
+
sideOffset,
|
|
23
|
+
className: cn(tooltipContentClass, className),
|
|
24
|
+
...props,
|
|
25
|
+
children: [
|
|
26
|
+
children,
|
|
27
|
+
arrow ? /* @__PURE__ */ jsx(
|
|
28
|
+
TooltipPrimitive.Arrow,
|
|
29
|
+
{
|
|
30
|
+
"data-testid": "tooltip-arrow",
|
|
31
|
+
className: tooltipArrowClass
|
|
32
|
+
}
|
|
33
|
+
) : null
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
) });
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
Tooltip,
|
|
40
|
+
TooltipContent,
|
|
41
|
+
TooltipProvider,
|
|
42
|
+
TooltipTrigger
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Tooltip as TooltipPrimitive } from \"radix-ui\";\nimport { cn } from \"../../lib/cn\";\nimport { tooltipContentClass, tooltipArrowClass } from \"./tooltip.variants\";\n\nexport interface TooltipProviderProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider> {}\n\n/**\n * Wraps the app (or a region of it) to provide global tooltip timing (spec §4). It owns the open\n * DELAY: hovering a trigger opens its tooltip after a short delay (`delayDuration`), while moving\n * between triggers within `skipDelayDuration` opens the next one immediately, so a row of icon\n * buttons does not re-delay on every hover. Keyboard focus always opens with NO delay regardless of\n * this setting, so a keyboard user gets the same information a pointer user does (spec §4 Focus).\n *\n * `disableHoverableContent` is intentionally NOT defaulted on: leaving it OFF keeps the tooltip open\n * while the pointer moves onto the content, which is what makes the tooltip HOVERABLE under\n * WCAG 1.4.13 — disabling it has accessibility consequences, so prefer the default.\n *\n * Place ONE Provider near the root of the app; individual tooltips read its timing. Wraps the Radix\n * Tooltip Provider — a stateful primitive, so this file is `'use client'`.\n */\nexport function TooltipProvider({ delayDuration = 300, ...props }: TooltipProviderProps) {\n return <TooltipPrimitive.Provider delayDuration={delayDuration} {...props} />;\n}\n\nexport interface TooltipProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root> {}\n\n/**\n * One tooltip: the trigger-plus-tooltip pair (spec §2/§4). Wraps `TooltipTrigger` and\n * `TooltipContent`. The tooltip is hidden until its trigger is hovered or focused, stays open while\n * the trigger holds focus or the pointer is over the trigger or the content (WCAG 1.4.13 hoverable\n * / persistent), and is dismissible with Escape (1.4.13 dismissible) — Radix wires all of this. Pass\n * a per-tooltip `delayDuration` (e.g. `0` for an instant open) to override the Provider's timing.\n */\nexport function Tooltip(props: TooltipProps) {\n return <TooltipPrimitive.Root {...props} />;\n}\n\nexport interface TooltipTriggerProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger> {}\n\n/**\n * The control the tooltip describes (spec §2 trigger): a REAL control — a button, a link, a field —\n * never inert text. The trigger owns the single tab stop and the 2px focus ring; the tooltip itself\n * never takes focus (spec §2/§4 Focus/§7). Radix sets the trigger's `aria-describedby` to the\n * tooltip's id while it is open, so the tooltip is announced as a DESCRIPTION after the trigger's own\n * name (spec §7) — it supplements the name, it does not replace it.\n *\n * Pass `asChild` to project the trigger onto your own control (commonly a Button) so the trigger\n * inherits that control's role, keyboard, and focus ring rather than nesting a second button — the\n * Menu/Dialog trigger precedent.\n *\n * The `label` variant (spec §3): on an ICON-ONLY control with no other accessible name, give that\n * control its OWN name (e.g. `aria-label=\"Revoke\"`) so it is never nameless — the tooltip still\n * describes it. The Tooltip surface is identical for both variants; the distinction is purely how the\n * caller names the trigger, which is the caller's responsibility and cannot be forced onto an\n * arbitrary child here.\n */\nexport const TooltipTrigger = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Trigger>,\n TooltipTriggerProps\n>(function TooltipTrigger(props, ref) {\n return <TooltipPrimitive.Trigger ref={ref} {...props} />;\n});\n\n/** The two spec §3 variants. They share ONE neutral surface; the distinction is how the trigger is named (§7). */\nexport type TooltipVariant = \"label\" | \"description\";\n\nexport interface TooltipContentProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> {\n /**\n * Which spec §3 variant this tooltip plays (default `description`). `description` adds a short hint\n * to a control that already has a visible label; `label` shows AND names an icon-only control (the\n * trigger must still carry its own `aria-label`/`aria-labelledby` — see `TooltipTrigger`). This is\n * a documentation/intent marker: the rendered surface is identical for both, and Radix wires the\n * trigger's `aria-describedby` either way — neutrals carry the whole surface, no status or brand\n * tint, by design (spec §3/§5).\n */\n variant?: TooltipVariant;\n /** Render the optional decorative arrow connecting the content to its trigger (spec §2 arrow). Default `true`. */\n arrow?: boolean;\n}\n\n/**\n * The floating label (spec §2 content, §3/§5): a `role=\"tooltip\"` element holding ONE short line of\n * plain text, raised above the page on the POPOVER layer and anchored to its trigger. It holds NO\n * interactive content — no link, no button, no field (if you need those, you need a Popover, spec\n * §1/§2). It is a NON-MODAL popover: no scrim, no `aria-modal`, no focus-trap — focus never enters\n * it, so there is nothing to trap (spec §7). A NEUTRAL surface: the brand violet and a status color\n * never appear on a tooltip (spec §3/§5/§8, brand != state).\n *\n * The open/close is the FAST motion duration and a plain fade — no slide, no bounce — instant under\n * `prefers-reduced-motion`; never the deliberate \"check\" duration, which is the VerifiedBadge-only\n * theatre (spec §4, G-U3). Portaled so it escapes overflow clipping. The decorative arrow's `fill`\n * matches the surface; Radix's bare arrow does not carry the surface's outer BORDER edge — a\n * conformant, non-load-bearing deviation from the §5 \"arrow edge\" border, flagged for amendment\n * rather than hand-rolling a custom bordered arrow polygon.\n */\nexport const TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n TooltipContentProps\n>(function TooltipContent(\n // `variant` is consumed for intent/TSDoc only — it does not alter the rendered surface or the ARIA\n // wiring (both variants are one neutral surface described via aria-describedby); destructured out so\n // it is not spread onto the DOM element.\n { className, children, sideOffset = 6, arrow = true, variant: _variant = \"description\", ...props },\n ref,\n) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n // The VISIBLE styled popup. Radix renders the accessible `role=\"tooltip\"` node as a SEPARATE\n // visually-hidden span (the `aria-describedby` target); this Content element carries the\n // surface bindings + Radix's `data-state` but is presentational, so a testid is the reliable\n // handle for the styled surface (the role node is found by `getByRole(\"tooltip\")`).\n data-testid=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(tooltipContentClass, className)}\n {...props}\n >\n {children}\n {arrow ? (\n <TooltipPrimitive.Arrow\n data-testid=\"tooltip-arrow\"\n className={tooltipArrowClass}\n />\n ) : null}\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n});\n"],"mappings":";AAyBS,cAyFH,YAzFG;AAvBT,YAAY,WAAW;AACvB,SAAS,WAAW,wBAAwB;AAC5C,SAAS,UAAU;AACnB,SAAS,qBAAqB,yBAAyB;AAmBhD,SAAS,gBAAgB,EAAE,gBAAgB,KAAK,GAAG,MAAM,GAAyB;AACvF,SAAO,oBAAC,iBAAiB,UAAjB,EAA0B,eAA+B,GAAG,OAAO;AAC7E;AAYO,SAAS,QAAQ,OAAqB;AAC3C,SAAO,oBAAC,iBAAiB,MAAjB,EAAuB,GAAG,OAAO;AAC3C;AAsBO,MAAM,iBAAiB,MAAM,WAGlC,SAASA,gBAAe,OAAO,KAAK;AACpC,SAAO,oBAAC,iBAAiB,SAAjB,EAAyB,KAAW,GAAG,OAAO;AACxD,CAAC;AAmCM,MAAM,iBAAiB,MAAM,WAGlC,SAASC,gBAIT,EAAE,WAAW,UAAU,aAAa,GAAG,QAAQ,MAAM,SAAS,WAAW,eAAe,GAAG,MAAM,GACjG,KACA;AACA,SACE,oBAAC,iBAAiB,QAAjB,EACC;AAAA,IAAC,iBAAiB;AAAA,IAAjB;AAAA,MACC;AAAA,MAKA,eAAY;AAAA,MACZ;AAAA,MACA,WAAW,GAAG,qBAAqB,SAAS;AAAA,MAC3C,GAAG;AAAA,MAEH;AAAA;AAAA,QACA,QACC;AAAA,UAAC,iBAAiB;AAAA,UAAjB;AAAA,YACC,eAAY;AAAA,YACZ,WAAW;AAAA;AAAA,QACb,IACE;AAAA;AAAA;AAAA,EACN,GACF;AAEJ,CAAC;","names":["TooltipTrigger","TooltipContent"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.variants.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.variants.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,mBAAmB,QAO6E,CAAC;AAM9G,eAAO,MAAM,iBAAiB,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const tooltipContentClass = "z-(--z-index-popover) max-w-(--container-sm) select-none px-(--space-3) py-(--space-2) bg-surface-raised border border-surface-border rounded-(--radius-sm) shadow-(--shadow-md) text-label text-text-primary transition-opacity duration-(--motion-duration-fast) ease-(--motion-easing-verdify) motion-reduce:duration-(--motion-duration-instant) data-[state=delayed-open]:opacity-100 data-[state=instant-open]:opacity-100 data-[state=closed]:opacity-0";
|
|
2
|
+
const tooltipArrowClass = "fill-surface-raised";
|
|
3
|
+
export {
|
|
4
|
+
tooltipArrowClass,
|
|
5
|
+
tooltipContentClass
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=tooltip.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/tooltip/tooltip.variants.ts"],"sourcesContent":["// A Tooltip is a small floating label that DESCRIBES the control it is attached to (spec §1). It is\n// a NON-MODAL popover, not a modal overlay: NO scrim, NO aria-modal, NO focus-trap — the page behind\n// stays live and the tooltip never takes focus. It is a NEUTRAL surface (spec §3/§5): the surface\n// and the only color on it (the text) are neutral, and NOTHING here binds a --color-status-* token\n// or the brand action-primary tier — a tooltip describes a control, it never reports a result, so\n// the brand violet and Verified Green never appear on it (brand != state, G-U2). This is the ONLY\n// token-binding site (skill §5 hard rule). All open/close motion is the FAST token transition on the\n// verdify easing, instant under reduced motion — never the 350ms VerifiedBadge-only theatre (G-U3).\n\n// The floating label (spec §2 content, §5): a NEUTRAL raised surface (--color-surface-raised) with\n// the outer surface border and the arrow edge color, the sm corner radius, and the md elevation\n// shadow above the page content, on the POPOVER z-layer (a tooltip is a non-modal popover layer, not\n// the modal layer). The label TEXT is the PRIMARY text color at the LABEL type role (spec §5\n// --color-text-primary / --text-label); the surface stays neutral and the only color is the text on\n// it. One short line — `max-w-(--container-sm)` keeps a long line from running the width of the\n// viewport, and the host can narrow it further via className. Internal padding from --space-2 /\n// --space-3 (the gap FROM the trigger is Radix's numeric `sideOffset`, a layout pixel offset with no\n// token-class seam, mirroring Menu's `sideOffset`). The open/close fade is a PLAIN fast transition +\n// verdify easing, instant under reduced motion — never the 350ms VerifiedBadge-only theatre (G-U3).\n// Enter/exit ride Radix's data-state on the content (attribute-selector variants, not arbitrary\n// values): Radix sets `delayed-open` (hover, after the open delay), `instant-open` (focus / no\n// delay), and `closed`, so BOTH open states fade in. `select-none` because a tooltip is read, not\n// selected.\nexport const tooltipContentClass =\n \"z-(--z-index-popover) max-w-(--container-sm) select-none \" +\n \"px-(--space-3) py-(--space-2) \" +\n \"bg-surface-raised border border-surface-border rounded-(--radius-sm) shadow-(--shadow-md) \" +\n \"text-label text-text-primary \" +\n \"transition-opacity duration-(--motion-duration-fast) ease-(--motion-easing-verdify) \" +\n \"motion-reduce:duration-(--motion-duration-instant) \" +\n \"data-[state=delayed-open]:opacity-100 data-[state=instant-open]:opacity-100 data-[state=closed]:opacity-0\";\n\n// The arrow (spec §2 arrow): a small DECORATIVE pointer connecting the content to its trigger,\n// carrying no meaning of its own (it is aria-hidden via the wrapper). It is filled with the SAME\n// neutral raised surface as the content so the pointer reads as part of the surface, never a brand\n// or status fill (spec §3/§5). `fill-*` is the SVG fill utility for the Radix arrow polygon.\nexport const tooltipArrowClass = \"fill-surface-raised\";\n"],"mappings":"AAuBO,MAAM,sBACX;AAYK,MAAM,oBAAoB;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/trust-score/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,KAAK,sBAAsB,GAC5B,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/trust-score/index.ts"],"sourcesContent":["export {\n TrustScore,\n type TrustScoreProps,\n type TrustScoreVariant,\n type TrustScoreState,\n} from \"./trust-score\";\nexport {\n trustScoreVariants,\n type TrustScoreVariantProps,\n} from \"./trust-score.variants\";\n"],"mappings":"AAAA;AAAA,EACE;AAAA,OAIK;AACP;AAAA,EACE;AAAA,OAEK;","names":[]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type TrustScoreVariantProps } from "./trust-score.variants";
|
|
3
|
+
/** The display form of the TrustScore (spec §3). Defaults to `value`. */
|
|
4
|
+
export type TrustScoreVariant = NonNullable<TrustScoreVariantProps["variant"]>;
|
|
5
|
+
/**
|
|
6
|
+
* The state the score's VALUE can be in (spec §4). TrustScore is a status output, not a
|
|
7
|
+
* control, so it has no hover/pressed/focus/disabled state of its own — only the states
|
|
8
|
+
* its value can be in. Defaults to `default` (the resolved score at rest).
|
|
9
|
+
*/
|
|
10
|
+
export type TrustScoreState = "default" | "updating" | "loading" | "unavailable";
|
|
11
|
+
export interface TrustScoreProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "aria-label">, Pick<TrustScoreVariantProps, "variant" | "carded"> {
|
|
12
|
+
/**
|
|
13
|
+
* The trust score itself (spec §2/§4) — the rolled-up number. Rendered in tabular
|
|
14
|
+
* figures so digits hold their place when the value updates, always paired with the
|
|
15
|
+
* label; the digit alone never carries the meaning. Omit it only in the `loading` and
|
|
16
|
+
* `unavailable` states, where no honest number exists — never pass a guessed `0`.
|
|
17
|
+
*/
|
|
18
|
+
score?: number;
|
|
19
|
+
/**
|
|
20
|
+
* The text naming what the number is, "Trust score" (spec §2). Rendered as visible text
|
|
21
|
+
* AND bound to the value as the group's accessible name (`aria-labelledby`). TrustScore
|
|
22
|
+
* is never an unlabeled number; provide EITHER a visible `label` or an `aria-label`.
|
|
23
|
+
*/
|
|
24
|
+
label?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* The accessible name when no visible {@link label} fits (spec §7) — "Trust score".
|
|
27
|
+
* Used only when there is no visible label; the group is never nameless to assistive
|
|
28
|
+
* technology, and a bare figure is never left to read as a rating it is not.
|
|
29
|
+
*/
|
|
30
|
+
"aria-label"?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The plain bound the number reads against, "out of 100" (spec §2). Shown when the
|
|
33
|
+
* scale is not obvious from context, so the value is legible without the reader guessing
|
|
34
|
+
* the range. Also bounds the optional gauge's `aria-valuetext`.
|
|
35
|
+
*/
|
|
36
|
+
scale?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* The upper bound of the scale (spec §7). Default `100`. Bounds the optional gauge
|
|
39
|
+
* (`aria-valuemax`) and the indicator length.
|
|
40
|
+
*/
|
|
41
|
+
max?: number;
|
|
42
|
+
/**
|
|
43
|
+
* The lower bound of the scale (spec §7). Default `0`. Bounds the optional gauge
|
|
44
|
+
* (`aria-valuemin`) and the indicator length.
|
|
45
|
+
*/
|
|
46
|
+
min?: number;
|
|
47
|
+
/**
|
|
48
|
+
* One line stating what the score means or when it last changed (spec §2), written as a
|
|
49
|
+
* statement ending with a period. Use it to keep the reader oriented, not to editorialise
|
|
50
|
+
* the number up or down.
|
|
51
|
+
*/
|
|
52
|
+
description?: React.ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* The state the value is in (spec §4). `updating` announces the new value politely and
|
|
55
|
+
* settles it on the fast duration (a moving score is information, not an event);
|
|
56
|
+
* `loading` shows a Skeleton in the value's place (never a `0`); `unavailable` states
|
|
57
|
+
* the absence in plain words ("Not yet scored") rather than a misleading number.
|
|
58
|
+
*/
|
|
59
|
+
state?: TrustScoreState;
|
|
60
|
+
/**
|
|
61
|
+
* The plain message shown where the number would be in the `unavailable` state (spec
|
|
62
|
+
* §4) — "Not yet scored" or "Score unavailable". Names the absence honestly; defaults to
|
|
63
|
+
* "Score unavailable".
|
|
64
|
+
*/
|
|
65
|
+
unavailableLabel?: React.ReactNode;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* TrustScore displays the cross-ecosystem trust score Verdify owns and computes — a single
|
|
69
|
+
* number rolled up from trust signals across the platform, shown so you can read where an
|
|
70
|
+
* identity stands at a glance (spec §1). It is a Verdify molecule: it reports a state
|
|
71
|
+
* Verdify HOLDS about an identity, not a credential the identity presents, so it encodes
|
|
72
|
+
* "identity is not credentials" — it reads the score against the identity without standing
|
|
73
|
+
* in for any login or document.
|
|
74
|
+
*
|
|
75
|
+
* It is calm by contract. It states the number plainly and never alarms, because a trust
|
|
76
|
+
* score is CONTEXT, not a verdict (spec §1). It is not a credit score, not a ranking, and
|
|
77
|
+
* not a pass/fail gate; it does not borrow the verified-status green to imply a binary
|
|
78
|
+
* "verified" result, and the brand (Sovereign Violet) is never used to make the score look
|
|
79
|
+
* important — the score is a MEASURE, neither a status nor an action, so it binds nothing
|
|
80
|
+
* from either the status or the action tier (brand != state, spec §3/§5/§8). There is no
|
|
81
|
+
* "good"/"warning"/"danger" band: banding the number by color would turn a calm measure
|
|
82
|
+
* into an alarmist verdict.
|
|
83
|
+
*
|
|
84
|
+
* It is a status OUTPUT, not a control (spec §4/§6/§7): it takes no focus, binds no keys,
|
|
85
|
+
* is never a tab stop, and renders no focus ring or target-size floor. The value and its
|
|
86
|
+
* label are exposed as an associated group named by the visible label, so a screen reader
|
|
87
|
+
* hears "Trust score, 82 out of 100", not a bare "82"; when the score updates, the new
|
|
88
|
+
* value reads through a POLITE live region (a moving trust score is not urgent), and the
|
|
89
|
+
* settle runs on the fast duration with verdify easing — never the 350ms verified-check
|
|
90
|
+
* theatre duration, because a score update is not a verification. A control that opens the
|
|
91
|
+
* score breakdown is a separate Button or Popover trigger with its own focus ring and
|
|
92
|
+
* keyboard model; it is not TrustScore gaining a state (spec §6).
|
|
93
|
+
*
|
|
94
|
+
* The optional `meter` gauge takes `role="meter"` (a present value, never a `progressbar`,
|
|
95
|
+
* which would read as work advancing) with `aria-valuenow`/`min`/`max` and a plain
|
|
96
|
+
* `aria-valuetext`; in the `unavailable` state it drops `aria-valuenow` so no value is
|
|
97
|
+
* claimed. The gauge is a calm rail in neutral control roles, never a colored threshold.
|
|
98
|
+
*/
|
|
99
|
+
export declare const TrustScore: React.ForwardRefExoticComponent<TrustScoreProps & React.RefAttributes<HTMLDivElement>>;
|
|
100
|
+
//# sourceMappingURL=trust-score.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trust-score.d.ts","sourceRoot":"","sources":["../../../src/components/trust-score/trust-score.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAWL,KAAK,sBAAsB,EAC5B,MAAM,wBAAwB,CAAC;AAEhC,yEAAyE;AACzE,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,CAAC;AAE/E;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,CAAC;AAEjF,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,YAAY,CAAC,EAC9D,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,QAAQ,CAAC;IACpD;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,UAAU,wFAmKtB,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
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 { Skeleton } from "../skeleton";
|
|
6
|
+
import {
|
|
7
|
+
trustScoreVariants,
|
|
8
|
+
trustScoreRowClass,
|
|
9
|
+
trustScoreValueClass,
|
|
10
|
+
trustScoreValueCompactClass,
|
|
11
|
+
trustScoreLabelClass,
|
|
12
|
+
trustScoreScaleClass,
|
|
13
|
+
trustScoreDescriptionClass,
|
|
14
|
+
trustScoreUnavailableClass,
|
|
15
|
+
trustScoreTrackClass,
|
|
16
|
+
trustScoreIndicatorClass
|
|
17
|
+
} from "./trust-score.variants";
|
|
18
|
+
const TrustScore = React.forwardRef(
|
|
19
|
+
function TrustScore2({
|
|
20
|
+
className,
|
|
21
|
+
variant = "value",
|
|
22
|
+
carded,
|
|
23
|
+
score,
|
|
24
|
+
label,
|
|
25
|
+
"aria-label": ariaLabel,
|
|
26
|
+
scale,
|
|
27
|
+
max = 100,
|
|
28
|
+
min = 0,
|
|
29
|
+
description,
|
|
30
|
+
state = "default",
|
|
31
|
+
unavailableLabel = "Score unavailable",
|
|
32
|
+
...props
|
|
33
|
+
}, ref) {
|
|
34
|
+
const labelId = React.useId();
|
|
35
|
+
const valueId = React.useId();
|
|
36
|
+
const descriptionId = React.useId();
|
|
37
|
+
const hasVisibleLabel = label != null && label !== false;
|
|
38
|
+
const hasScale = scale != null && scale !== false;
|
|
39
|
+
const hasDescription = description != null && description !== false;
|
|
40
|
+
const isLoading = state === "loading";
|
|
41
|
+
const isUnavailable = state === "unavailable";
|
|
42
|
+
const hasScore = !isLoading && !isUnavailable && score != null;
|
|
43
|
+
const isCompact = variant === "compact";
|
|
44
|
+
const clampedPct = hasScore && max > min ? Math.min(100, Math.max(0, (score - min) / (max - min) * 100)) : 0;
|
|
45
|
+
const valueText = hasScore && typeof scale === "string" ? `${score} ${scale}` : hasScore ? String(score) : void 0;
|
|
46
|
+
const describedBy = hasDescription ? descriptionId : void 0;
|
|
47
|
+
return (
|
|
48
|
+
// role="group": the value and its label are an associated group whose accessible
|
|
49
|
+
// name is the visible label (aria-labelledby), or an aria-label when no visible
|
|
50
|
+
// label exists — never both, never nameless (spec §2/§7). Non-interactive: no
|
|
51
|
+
// tabIndex, no focus ring, no target-size floor (spec §4/§6/§7).
|
|
52
|
+
/* @__PURE__ */ jsxs(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
ref,
|
|
56
|
+
role: "group",
|
|
57
|
+
"aria-labelledby": hasVisibleLabel ? labelId : void 0,
|
|
58
|
+
"aria-label": hasVisibleLabel ? void 0 : ariaLabel,
|
|
59
|
+
"aria-describedby": describedBy,
|
|
60
|
+
className: cn(trustScoreVariants({ variant, carded }), className),
|
|
61
|
+
...props,
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ jsxs("div", { className: trustScoreRowClass, children: [
|
|
64
|
+
isLoading ? (
|
|
65
|
+
// LOADING (spec §4): a Skeleton in the value's place rather than a 0, a guessed
|
|
66
|
+
// number, or an empty readout — a placeholder zero would be a false score. It
|
|
67
|
+
// is decorative (the Skeleton is aria-hidden); the real value replaces it on
|
|
68
|
+
// resolve.
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
Skeleton,
|
|
71
|
+
{
|
|
72
|
+
variant: "block",
|
|
73
|
+
"data-testid": "trust-score-loading",
|
|
74
|
+
className: "h-(--space-6) w-(--space-16)"
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
) : isUnavailable ? (
|
|
78
|
+
// UNAVAILABLE (spec §4/§7): plain text where the number would be, in the muted
|
|
79
|
+
// color. It reads as the group's value, so assistive technology announces the
|
|
80
|
+
// absence rather than a false number. It is the value region's polite live
|
|
81
|
+
// region so a transition into "unavailable" is announced, not asserted.
|
|
82
|
+
/* @__PURE__ */ jsx(
|
|
83
|
+
"span",
|
|
84
|
+
{
|
|
85
|
+
id: valueId,
|
|
86
|
+
"data-testid": "trust-score-unavailable",
|
|
87
|
+
"aria-live": "polite",
|
|
88
|
+
className: trustScoreUnavailableClass,
|
|
89
|
+
children: unavailableLabel
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
) : (
|
|
93
|
+
// DEFAULT / UPDATING (spec §4): the resolved score in tabular figures. It is a
|
|
94
|
+
// polite live region so a changed value is announced without interruption; the
|
|
95
|
+
// settle runs on the fast duration (never the deliberate verified-check
|
|
96
|
+
// theatre). The number is always paired with the label, so the digit alone
|
|
97
|
+
// never carries the meaning.
|
|
98
|
+
/* @__PURE__ */ jsx(
|
|
99
|
+
"span",
|
|
100
|
+
{
|
|
101
|
+
id: valueId,
|
|
102
|
+
"data-testid": "trust-score-value",
|
|
103
|
+
"aria-live": "polite",
|
|
104
|
+
className: isCompact ? trustScoreValueCompactClass : trustScoreValueClass,
|
|
105
|
+
children: score
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
),
|
|
109
|
+
hasScale ? /* @__PURE__ */ jsx("span", { "data-testid": "trust-score-scale", className: trustScoreScaleClass, children: scale }) : null
|
|
110
|
+
] }),
|
|
111
|
+
hasVisibleLabel ? /* @__PURE__ */ jsx("span", { id: labelId, className: trustScoreLabelClass, children: label }) : null,
|
|
112
|
+
variant === "meter" ? /* @__PURE__ */ jsx(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
"data-testid": "trust-score-track",
|
|
116
|
+
role: isUnavailable ? void 0 : "meter",
|
|
117
|
+
"aria-hidden": isUnavailable ? true : void 0,
|
|
118
|
+
"aria-valuenow": isUnavailable ? void 0 : hasScore ? score : void 0,
|
|
119
|
+
"aria-valuemin": isUnavailable ? void 0 : min,
|
|
120
|
+
"aria-valuemax": isUnavailable ? void 0 : max,
|
|
121
|
+
"aria-valuetext": isUnavailable ? void 0 : valueText,
|
|
122
|
+
"aria-labelledby": isUnavailable || !hasVisibleLabel ? void 0 : labelId,
|
|
123
|
+
"aria-label": isUnavailable || hasVisibleLabel ? void 0 : ariaLabel,
|
|
124
|
+
className: trustScoreTrackClass,
|
|
125
|
+
children: /* @__PURE__ */ jsx(
|
|
126
|
+
"span",
|
|
127
|
+
{
|
|
128
|
+
"data-testid": "trust-score-indicator",
|
|
129
|
+
"aria-hidden": "true",
|
|
130
|
+
className: trustScoreIndicatorClass,
|
|
131
|
+
style: { inlineSize: `${clampedPct}%` }
|
|
132
|
+
}
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
) : null,
|
|
136
|
+
hasDescription ? /* @__PURE__ */ jsx("span", { id: descriptionId, className: trustScoreDescriptionClass, children: description }) : null
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
export {
|
|
144
|
+
TrustScore
|
|
145
|
+
};
|
|
146
|
+
//# sourceMappingURL=trust-score.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/trust-score/trust-score.tsx"],"sourcesContent":["\"use client\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/cn\";\nimport { Skeleton } from \"../skeleton\";\nimport {\n trustScoreVariants,\n trustScoreRowClass,\n trustScoreValueClass,\n trustScoreValueCompactClass,\n trustScoreLabelClass,\n trustScoreScaleClass,\n trustScoreDescriptionClass,\n trustScoreUnavailableClass,\n trustScoreTrackClass,\n trustScoreIndicatorClass,\n type TrustScoreVariantProps,\n} from \"./trust-score.variants\";\n\n/** The display form of the TrustScore (spec §3). Defaults to `value`. */\nexport type TrustScoreVariant = NonNullable<TrustScoreVariantProps[\"variant\"]>;\n\n/**\n * The state the score's VALUE can be in (spec §4). TrustScore is a status output, not a\n * control, so it has no hover/pressed/focus/disabled state of its own — only the states\n * its value can be in. Defaults to `default` (the resolved score at rest).\n */\nexport type TrustScoreState = \"default\" | \"updating\" | \"loading\" | \"unavailable\";\n\nexport interface TrustScoreProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"aria-label\">,\n Pick<TrustScoreVariantProps, \"variant\" | \"carded\"> {\n /**\n * The trust score itself (spec §2/§4) — the rolled-up number. Rendered in tabular\n * figures so digits hold their place when the value updates, always paired with the\n * label; the digit alone never carries the meaning. Omit it only in the `loading` and\n * `unavailable` states, where no honest number exists — never pass a guessed `0`.\n */\n score?: number;\n /**\n * The text naming what the number is, \"Trust score\" (spec §2). Rendered as visible text\n * AND bound to the value as the group's accessible name (`aria-labelledby`). TrustScore\n * is never an unlabeled number; provide EITHER a visible `label` or an `aria-label`.\n */\n label?: React.ReactNode;\n /**\n * The accessible name when no visible {@link label} fits (spec §7) — \"Trust score\".\n * Used only when there is no visible label; the group is never nameless to assistive\n * technology, and a bare figure is never left to read as a rating it is not.\n */\n \"aria-label\"?: string;\n /**\n * The plain bound the number reads against, \"out of 100\" (spec §2). Shown when the\n * scale is not obvious from context, so the value is legible without the reader guessing\n * the range. Also bounds the optional gauge's `aria-valuetext`.\n */\n scale?: React.ReactNode;\n /**\n * The upper bound of the scale (spec §7). Default `100`. Bounds the optional gauge\n * (`aria-valuemax`) and the indicator length.\n */\n max?: number;\n /**\n * The lower bound of the scale (spec §7). Default `0`. Bounds the optional gauge\n * (`aria-valuemin`) and the indicator length.\n */\n min?: number;\n /**\n * One line stating what the score means or when it last changed (spec §2), written as a\n * statement ending with a period. Use it to keep the reader oriented, not to editorialise\n * the number up or down.\n */\n description?: React.ReactNode;\n /**\n * The state the value is in (spec §4). `updating` announces the new value politely and\n * settles it on the fast duration (a moving score is information, not an event);\n * `loading` shows a Skeleton in the value's place (never a `0`); `unavailable` states\n * the absence in plain words (\"Not yet scored\") rather than a misleading number.\n */\n state?: TrustScoreState;\n /**\n * The plain message shown where the number would be in the `unavailable` state (spec\n * §4) — \"Not yet scored\" or \"Score unavailable\". Names the absence honestly; defaults to\n * \"Score unavailable\".\n */\n unavailableLabel?: React.ReactNode;\n}\n\n/**\n * TrustScore displays the cross-ecosystem trust score Verdify owns and computes — a single\n * number rolled up from trust signals across the platform, shown so you can read where an\n * identity stands at a glance (spec §1). It is a Verdify molecule: it reports a state\n * Verdify HOLDS about an identity, not a credential the identity presents, so it encodes\n * \"identity is not credentials\" — it reads the score against the identity without standing\n * in for any login or document.\n *\n * It is calm by contract. It states the number plainly and never alarms, because a trust\n * score is CONTEXT, not a verdict (spec §1). It is not a credit score, not a ranking, and\n * not a pass/fail gate; it does not borrow the verified-status green to imply a binary\n * \"verified\" result, and the brand (Sovereign Violet) is never used to make the score look\n * important — the score is a MEASURE, neither a status nor an action, so it binds nothing\n * from either the status or the action tier (brand != state, spec §3/§5/§8). There is no\n * \"good\"/\"warning\"/\"danger\" band: banding the number by color would turn a calm measure\n * into an alarmist verdict.\n *\n * It is a status OUTPUT, not a control (spec §4/§6/§7): it takes no focus, binds no keys,\n * is never a tab stop, and renders no focus ring or target-size floor. The value and its\n * label are exposed as an associated group named by the visible label, so a screen reader\n * hears \"Trust score, 82 out of 100\", not a bare \"82\"; when the score updates, the new\n * value reads through a POLITE live region (a moving trust score is not urgent), and the\n * settle runs on the fast duration with verdify easing — never the 350ms verified-check\n * theatre duration, because a score update is not a verification. A control that opens the\n * score breakdown is a separate Button or Popover trigger with its own focus ring and\n * keyboard model; it is not TrustScore gaining a state (spec §6).\n *\n * The optional `meter` gauge takes `role=\"meter\"` (a present value, never a `progressbar`,\n * which would read as work advancing) with `aria-valuenow`/`min`/`max` and a plain\n * `aria-valuetext`; in the `unavailable` state it drops `aria-valuenow` so no value is\n * claimed. The gauge is a calm rail in neutral control roles, never a colored threshold.\n */\nexport const TrustScore = React.forwardRef<HTMLDivElement, TrustScoreProps>(\n function TrustScore(\n {\n className,\n variant = \"value\",\n carded,\n score,\n label,\n \"aria-label\": ariaLabel,\n scale,\n max = 100,\n min = 0,\n description,\n state = \"default\",\n unavailableLabel = \"Score unavailable\",\n ...props\n },\n ref,\n ) {\n const labelId = React.useId();\n const valueId = React.useId();\n const descriptionId = React.useId();\n\n const hasVisibleLabel = label != null && label !== false;\n const hasScale = scale != null && scale !== false;\n const hasDescription = description != null && description !== false;\n const isLoading = state === \"loading\";\n const isUnavailable = state === \"unavailable\";\n // a resolved number exists only outside the loading/unavailable states\n const hasScore = !isLoading && !isUnavailable && score != null;\n const isCompact = variant === \"compact\";\n\n // the meter indicator length is the score as a percentage of the scale, clamped to\n // 0..100% so an out-of-range value never overflows the rail (spec §4). aria-valuenow\n // still reports the raw score the caller passed.\n const clampedPct =\n hasScore && max > min\n ? Math.min(100, Math.max(0, ((score! - min) / (max - min)) * 100))\n : 0;\n\n // a plain readout for the gauge (\"82 out of 100\") so it announces a measure, not a\n // task in progress (spec §7). Falls back to the bare number when no scale is given.\n const valueText =\n hasScore && typeof scale === \"string\"\n ? `${score} ${scale}`\n : hasScore\n ? String(score)\n : undefined;\n\n // description is read with the group via aria-describedby when present (spec §2/§7).\n const describedBy = hasDescription ? descriptionId : undefined;\n\n return (\n // role=\"group\": the value and its label are an associated group whose accessible\n // name is the visible label (aria-labelledby), or an aria-label when no visible\n // label exists — never both, never nameless (spec §2/§7). Non-interactive: no\n // tabIndex, no focus ring, no target-size floor (spec §4/§6/§7).\n <div\n ref={ref}\n role=\"group\"\n aria-labelledby={hasVisibleLabel ? labelId : undefined}\n aria-label={hasVisibleLabel ? undefined : ariaLabel}\n aria-describedby={describedBy}\n className={cn(trustScoreVariants({ variant, carded }), className)}\n {...props}\n >\n <div className={trustScoreRowClass}>\n {isLoading ? (\n // LOADING (spec §4): a Skeleton in the value's place rather than a 0, a guessed\n // number, or an empty readout — a placeholder zero would be a false score. It\n // is decorative (the Skeleton is aria-hidden); the real value replaces it on\n // resolve.\n <Skeleton\n variant=\"block\"\n data-testid=\"trust-score-loading\"\n className=\"h-(--space-6) w-(--space-16)\"\n />\n ) : isUnavailable ? (\n // UNAVAILABLE (spec §4/§7): plain text where the number would be, in the muted\n // color. It reads as the group's value, so assistive technology announces the\n // absence rather than a false number. It is the value region's polite live\n // region so a transition into \"unavailable\" is announced, not asserted.\n <span\n id={valueId}\n data-testid=\"trust-score-unavailable\"\n aria-live=\"polite\"\n className={trustScoreUnavailableClass}\n >\n {unavailableLabel}\n </span>\n ) : (\n // DEFAULT / UPDATING (spec §4): the resolved score in tabular figures. It is a\n // polite live region so a changed value is announced without interruption; the\n // settle runs on the fast duration (never the deliberate verified-check\n // theatre). The number is always paired with the label, so the digit alone\n // never carries the meaning.\n <span\n id={valueId}\n data-testid=\"trust-score-value\"\n aria-live=\"polite\"\n className={isCompact ? trustScoreValueCompactClass : trustScoreValueClass}\n >\n {score}\n </span>\n )}\n\n {/* the optional inline scale (\"out of 100\"), so the value is legible without\n guessing the range (spec §2). Shown alongside the number; the gauge's\n aria-valuetext carries it to assistive technology too. */}\n {hasScale ? (\n <span data-testid=\"trust-score-scale\" className={trustScoreScaleClass}>\n {scale}\n </span>\n ) : null}\n </div>\n\n {/* the visible label naming the number, bound to the group as its accessible name\n (spec §2/§7). TrustScore is never an unlabeled number. */}\n {hasVisibleLabel ? (\n <span id={labelId} className={trustScoreLabelClass}>\n {label}\n </span>\n ) : null}\n\n {/* the optional meter gauge (spec §2/§3/§7): role=\"meter\" is a PRESENT value, not\n a task advancing, so it is never a progressbar. It is bounded by\n aria-valuemin/aria-valuemax with aria-valuenow + a plain aria-valuetext.\n UNAVAILABLE: no value may be claimed for an absent score, and role=\"meter\"\n REQUIRES aria-valuenow (an ARIA owned attribute) — a valueless meter is invalid\n ARIA. So the gauge drops role=\"meter\" and becomes the spec's \"decorative gauge\n with no semantic value\", aria-hidden, with the absence carried by the labelled\n text instead. Neutral rail, never a colored threshold. */}\n {variant === \"meter\" ? (\n <div\n data-testid=\"trust-score-track\"\n role={isUnavailable ? undefined : \"meter\"}\n aria-hidden={isUnavailable ? true : undefined}\n aria-valuenow={isUnavailable ? undefined : hasScore ? score : undefined}\n aria-valuemin={isUnavailable ? undefined : min}\n aria-valuemax={isUnavailable ? undefined : max}\n aria-valuetext={isUnavailable ? undefined : valueText}\n aria-labelledby={isUnavailable || !hasVisibleLabel ? undefined : labelId}\n aria-label={isUnavailable || hasVisibleLabel ? undefined : ariaLabel}\n className={trustScoreTrackClass}\n >\n <span\n data-testid=\"trust-score-indicator\"\n aria-hidden=\"true\"\n className={trustScoreIndicatorClass}\n style={{ inlineSize: `${clampedPct}%` }}\n />\n </div>\n ) : null}\n\n {/* the optional one-line description, read with the group (spec §2/§7). */}\n {hasDescription ? (\n <span id={descriptionId} className={trustScoreDescriptionClass}>\n {description}\n </span>\n ) : null}\n </div>\n );\n },\n);\n"],"mappings":";AAyLQ,SAMI,KANJ;AAxLR,YAAY,WAAW;AACvB,SAAS,UAAU;AACnB,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;AAuGA,MAAM,aAAa,MAAM;AAAA,EAC9B,SAASA,YACP;AAAA,IACE;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA,QAAQ;AAAA,IACR,mBAAmB;AAAA,IACnB,GAAG;AAAA,EACL,GACA,KACA;AACA,UAAM,UAAU,MAAM,MAAM;AAC5B,UAAM,UAAU,MAAM,MAAM;AAC5B,UAAM,gBAAgB,MAAM,MAAM;AAElC,UAAM,kBAAkB,SAAS,QAAQ,UAAU;AACnD,UAAM,WAAW,SAAS,QAAQ,UAAU;AAC5C,UAAM,iBAAiB,eAAe,QAAQ,gBAAgB;AAC9D,UAAM,YAAY,UAAU;AAC5B,UAAM,gBAAgB,UAAU;AAEhC,UAAM,WAAW,CAAC,aAAa,CAAC,iBAAiB,SAAS;AAC1D,UAAM,YAAY,YAAY;AAK9B,UAAM,aACJ,YAAY,MAAM,MACd,KAAK,IAAI,KAAK,KAAK,IAAI,IAAK,QAAS,QAAQ,MAAM,OAAQ,GAAG,CAAC,IAC/D;AAIN,UAAM,YACJ,YAAY,OAAO,UAAU,WACzB,GAAG,KAAK,IAAI,KAAK,KACjB,WACE,OAAO,KAAK,IACZ;AAGR,UAAM,cAAc,iBAAiB,gBAAgB;AAErD;AAAA;AAAA;AAAA;AAAA;AAAA,MAKE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,MAAK;AAAA,UACL,mBAAiB,kBAAkB,UAAU;AAAA,UAC7C,cAAY,kBAAkB,SAAY;AAAA,UAC1C,oBAAkB;AAAA,UAClB,WAAW,GAAG,mBAAmB,EAAE,SAAS,OAAO,CAAC,GAAG,SAAS;AAAA,UAC/D,GAAG;AAAA,UAEJ;AAAA,iCAAC,SAAI,WAAW,oBACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKC;AAAA,kBAAC;AAAA;AAAA,oBACC,SAAQ;AAAA,oBACR,eAAY;AAAA,oBACZ,WAAU;AAAA;AAAA,gBACZ;AAAA,kBACE;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKF;AAAA,kBAAC;AAAA;AAAA,oBACC,IAAI;AAAA,oBACJ,eAAY;AAAA,oBACZ,aAAU;AAAA,oBACV,WAAW;AAAA,oBAEV;AAAA;AAAA,gBACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAOA;AAAA,kBAAC;AAAA;AAAA,oBACC,IAAI;AAAA,oBACJ,eAAY;AAAA,oBACZ,aAAU;AAAA,oBACV,WAAW,YAAY,8BAA8B;AAAA,oBAEpD;AAAA;AAAA,gBACH;AAAA;AAAA,cAMD,WACC,oBAAC,UAAK,eAAY,qBAAoB,WAAW,sBAC9C,iBACH,IACE;AAAA,eACN;AAAA,YAIC,kBACC,oBAAC,UAAK,IAAI,SAAS,WAAW,sBAC3B,iBACH,IACE;AAAA,YAUH,YAAY,UACX;AAAA,cAAC;AAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,MAAM,gBAAgB,SAAY;AAAA,gBAClC,eAAa,gBAAgB,OAAO;AAAA,gBACpC,iBAAe,gBAAgB,SAAY,WAAW,QAAQ;AAAA,gBAC9D,iBAAe,gBAAgB,SAAY;AAAA,gBAC3C,iBAAe,gBAAgB,SAAY;AAAA,gBAC3C,kBAAgB,gBAAgB,SAAY;AAAA,gBAC5C,mBAAiB,iBAAiB,CAAC,kBAAkB,SAAY;AAAA,gBACjE,cAAY,iBAAiB,kBAAkB,SAAY;AAAA,gBAC3D,WAAW;AAAA,gBAEX;AAAA,kBAAC;AAAA;AAAA,oBACC,eAAY;AAAA,oBACZ,eAAY;AAAA,oBACZ,WAAW;AAAA,oBACX,OAAO,EAAE,YAAY,GAAG,UAAU,IAAI;AAAA;AAAA,gBACxC;AAAA;AAAA,YACF,IACE;AAAA,YAGH,iBACC,oBAAC,UAAK,IAAI,eAAe,WAAW,4BACjC,uBACH,IACE;AAAA;AAAA;AAAA,MACN;AAAA;AAAA,EAEJ;AACF;","names":["TrustScore"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
export declare const trustScoreVariants: (props?: ({
|
|
3
|
+
variant?: "value" | "meter" | "compact" | null | undefined;
|
|
4
|
+
carded?: boolean | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export declare const trustScoreRowClass = "flex items-baseline gap-(--space-2)";
|
|
7
|
+
export declare const trustScoreValueClass: string;
|
|
8
|
+
export declare const trustScoreValueCompactClass: string;
|
|
9
|
+
export declare const trustScoreLabelClass = "text-label text-text-secondary";
|
|
10
|
+
export declare const trustScoreScaleClass = "text-label text-text-secondary";
|
|
11
|
+
export declare const trustScoreDescriptionClass = "text-caption text-text-secondary";
|
|
12
|
+
export declare const trustScoreUnavailableClass = "text-caption text-text-muted";
|
|
13
|
+
export declare const trustScoreTrackClass: string;
|
|
14
|
+
export declare const trustScoreIndicatorClass: string;
|
|
15
|
+
export type TrustScoreVariantProps = VariantProps<typeof trustScoreVariants>;
|
|
16
|
+
//# sourceMappingURL=trust-score.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trust-score.variants.d.ts","sourceRoot":"","sources":["../../../src/components/trust-score/trust-score.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAkClE,eAAO,MAAM,kBAAkB;;;8EA0B7B,CAAC;AAIH,eAAO,MAAM,kBAAkB,wCAAwC,CAAC;AASxE,eAAO,MAAM,oBAAoB,QAGqB,CAAC;AAIvD,eAAO,MAAM,2BAA2B,QAGc,CAAC;AAIvD,eAAO,MAAM,oBAAoB,mCAAmC,CAAC;AAKrE,eAAO,MAAM,oBAAoB,mCAAmC,CAAC;AAIrE,eAAO,MAAM,0BAA0B,qCAAqC,CAAC;AAM7E,eAAO,MAAM,0BAA0B,iCAAiC,CAAC;AAQzE,eAAO,MAAM,oBAAoB,QAEqC,CAAC;AAQvE,eAAO,MAAM,wBAAwB,QAGiB,CAAC;AAEvD,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
const trustScoreVariants = cva("flex flex-col gap-(--space-2)", {
|
|
3
|
+
variants: {
|
|
4
|
+
// STRUCTURAL axis = spec §3: a form of DISPLAY, never a level of alarm. None of the
|
|
5
|
+
// variants recolors the readout — they differ only in what is shown and at which
|
|
6
|
+
// type role, so the meaning is identical across all three.
|
|
7
|
+
variant: {
|
|
8
|
+
// value (default): the number with its label and optional scale, no gauge — the
|
|
9
|
+
// common, calmest case (a profile header, a row, a card).
|
|
10
|
+
value: "",
|
|
11
|
+
// meter: the number plus the neutral track gauge, for a surface where seeing the
|
|
12
|
+
// value against its scale helps. The gauge is a calm rail in neutral control roles.
|
|
13
|
+
meter: "",
|
|
14
|
+
// compact: the bare number at a smaller footprint for dense rows and inline
|
|
15
|
+
// contexts; the full label + scale still reach assistive technology via the group
|
|
16
|
+
// name. Same meaning at a smaller type role, not a different component.
|
|
17
|
+
compact: ""
|
|
18
|
+
},
|
|
19
|
+
// When carded, paint the neutral container: the raised surface, the muted surface
|
|
20
|
+
// border, the medium corner radius, and the internal padding (spec §5). No status,
|
|
21
|
+
// no action — a calm container for a calm measure.
|
|
22
|
+
carded: {
|
|
23
|
+
true: "rounded-(--radius-md) border bg-surface-raised border-surface-border-muted p-(--space-3)",
|
|
24
|
+
false: ""
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: { variant: "value", carded: false }
|
|
28
|
+
});
|
|
29
|
+
const trustScoreRowClass = "flex items-baseline gap-(--space-2)";
|
|
30
|
+
const trustScoreValueClass = "tabular-nums text-h2 text-text-primary transition-[color,opacity] duration-(--motion-duration-fast) ease-(--motion-easing-verdify) motion-reduce:duration-(--motion-duration-instant)";
|
|
31
|
+
const trustScoreValueCompactClass = "tabular-nums text-label text-text-primary transition-[color,opacity] duration-(--motion-duration-fast) ease-(--motion-easing-verdify) motion-reduce:duration-(--motion-duration-instant)";
|
|
32
|
+
const trustScoreLabelClass = "text-label text-text-secondary";
|
|
33
|
+
const trustScoreScaleClass = "text-label text-text-secondary";
|
|
34
|
+
const trustScoreDescriptionClass = "text-caption text-text-secondary";
|
|
35
|
+
const trustScoreUnavailableClass = "text-caption text-text-muted";
|
|
36
|
+
const trustScoreTrackClass = "relative block h-(--space-2) w-full overflow-hidden rounded-(--radius-full) bg-control-bg border border-control-border";
|
|
37
|
+
const trustScoreIndicatorClass = "block h-full rounded-(--radius-full) bg-control-fg transition-[inline-size] duration-(--motion-duration-fast) ease-(--motion-easing-verdify) motion-reduce:duration-(--motion-duration-instant)";
|
|
38
|
+
export {
|
|
39
|
+
trustScoreDescriptionClass,
|
|
40
|
+
trustScoreIndicatorClass,
|
|
41
|
+
trustScoreLabelClass,
|
|
42
|
+
trustScoreRowClass,
|
|
43
|
+
trustScoreScaleClass,
|
|
44
|
+
trustScoreTrackClass,
|
|
45
|
+
trustScoreUnavailableClass,
|
|
46
|
+
trustScoreValueClass,
|
|
47
|
+
trustScoreValueCompactClass,
|
|
48
|
+
trustScoreVariants
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=trust-score.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/trust-score/trust-score.variants.ts"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\n\n// TrustScore displays the cross-ecosystem trust score Verdify owns and computes — a\n// single rolled-up number, shown so the reader can read where an identity stands at a\n// glance (spec §1). It is a status OUTPUT, not a control: it takes no focus, binds no\n// keys, is never a tab stop, and renders no focus ring or target-size floor — the value\n// reaches assistive technology through a named group + a polite live region, never\n// through motion (spec §4/§6/§7).\n//\n// CALM BY CONTRACT — brand != state (spec §1/§3/§5/§8). A trust score is a MEASURE, not\n// a verdict and not a credential. TrustScore therefore paints from NEUTRAL text/surface\n// roles and the neutral --color-control-* roles for the optional gauge, and binds:\n// * NOTHING from the action tier — the brand (Sovereign Violet) is never used to make\n// the score look important, because the brand is not a status; and\n// * NOTHING from the status tier — the verified-status green is never used to color a\n// \"high\" score (that green means one verified result and nothing else, so lending it\n// to a number tells the reader the score is a verification it is not), and there is\n// no caution/critical \"danger\" band — banding the number by color turns a calm\n// measure into an alarmist verdict.\n// There is no \"good\"/\"warning\"/\"danger\" variant: the variants below are forms of DISPLAY\n// (value / meter / compact), never levels of alarm. This whole-tree neutrality is pinned\n// as a component test in trust-score.test.tsx (the static brand!=state gate only catches\n// a cva-keyed status<->action cross-wire, not a neutral-leak — see the build-on-brand\n// skill, note B).\n//\n// The value also never animates on the deliberate verified-check duration — that 350ms\n// theatre is the verified check's alone, and a score update is not a verification; the\n// update settles on the fast duration with verdify easing (spec §4).\n\n// The root container (spec §2): a layout column stacking the value/scale row, the optional\n// label, the optional gauge, and the optional description at the --space-2 gap. Non-\n// interactive: no focus ring, no tab stop, no target-size floor (spec §4/§6/§7). When the\n// score sits in its own card the `carded` axis adds the neutral raised surface, the muted\n// surface border, the medium corner radius, and the --space-3 internal padding (spec §5).\nexport const trustScoreVariants = cva(\"flex flex-col gap-(--space-2)\", {\n variants: {\n // STRUCTURAL axis = spec §3: a form of DISPLAY, never a level of alarm. None of the\n // variants recolors the readout — they differ only in what is shown and at which\n // type role, so the meaning is identical across all three.\n variant: {\n // value (default): the number with its label and optional scale, no gauge — the\n // common, calmest case (a profile header, a row, a card).\n value: \"\",\n // meter: the number plus the neutral track gauge, for a surface where seeing the\n // value against its scale helps. The gauge is a calm rail in neutral control roles.\n meter: \"\",\n // compact: the bare number at a smaller footprint for dense rows and inline\n // contexts; the full label + scale still reach assistive technology via the group\n // name. Same meaning at a smaller type role, not a different component.\n compact: \"\",\n },\n // When carded, paint the neutral container: the raised surface, the muted surface\n // border, the medium corner radius, and the internal padding (spec §5). No status,\n // no action — a calm container for a calm measure.\n carded: {\n true: \"rounded-(--radius-md) border bg-surface-raised border-surface-border-muted p-(--space-3)\",\n false: \"\",\n },\n },\n defaultVariants: { variant: \"value\", carded: false },\n});\n\n// The value/scale row (spec §2): the number and its optional inline scale, baseline-\n// aligned at the small gap.\nexport const trustScoreRowClass = \"flex items-baseline gap-(--space-2)\";\n\n// The score numeric readout (spec §2/§4/§5): the trust score itself, in TABULAR figures\n// so digits hold their place when the value updates, at the h2 type role in the PRIMARY\n// text color. It is a polite live region (set in tsx) so a changed score is announced\n// without interruption; the value-settle transition runs on the FAST duration with\n// verdify easing, collapsing to the instant endpoint under reduced motion — a moving\n// trust score is information, not an event, and NEVER the 350ms verified-check theatre\n// duration (spec §4). The compact form drops the type role to the label role below.\nexport const trustScoreValueClass =\n \"tabular-nums text-h2 text-text-primary \" +\n \"transition-[color,opacity] duration-(--motion-duration-fast) ease-(--motion-easing-verdify) \" +\n \"motion-reduce:duration-(--motion-duration-instant)\";\n\n// The compact value (spec §3): the same primary readout at the smaller label type role\n// for dense rows. Same tabular figures and the same settle transition.\nexport const trustScoreValueCompactClass =\n \"tabular-nums text-label text-text-primary \" +\n \"transition-[color,opacity] duration-(--motion-duration-fast) ease-(--motion-easing-verdify) \" +\n \"motion-reduce:duration-(--motion-duration-instant)\";\n\n// The label (spec §2/§5): the text naming what the number is (\"Trust score\"), in the\n// secondary text color at the label type role. TrustScore is never an unlabeled number.\nexport const trustScoreLabelClass = \"text-label text-text-secondary\";\n\n// The scale (spec §2/§5): the plain bound the number reads against (\"out of 100\"), in the\n// secondary text color at the label type role, so the value is legible without guessing\n// the range.\nexport const trustScoreScaleClass = \"text-label text-text-secondary\";\n\n// The optional one-line description (spec §2/§5): a statement of what the score means or\n// when it last changed, in the secondary text color at the caption role.\nexport const trustScoreDescriptionClass = \"text-caption text-text-secondary\";\n\n// The unavailable message (spec §4/§5/§7): plain text where the number would be (\"Not yet\n// scored\" / \"Score unavailable\"), in the MUTED text color at the caption role, naming the\n// absence honestly rather than showing a misleading 0 or a low number. Honest about hard\n// things: an absent score is said, not faked.\nexport const trustScoreUnavailableClass = \"text-caption text-text-muted\";\n\n// The optional meter track (spec §2/§5): a restrained gauge rail visualising the score\n// against its scale, in the NEUTRAL control surface with the control border, clipped so\n// the rounded indicator end never bleeds past the rail, on the full radius. It is a calm\n// gauge, NEVER a progress fill racing toward a target and NEVER recolored to a status to\n// imply alarm or approval (spec §2/§3/§4) — the non-text contrast bar (1.4.11) is met by\n// the control roles, not by a colored band.\nexport const trustScoreTrackClass =\n \"relative block h-(--space-2) w-full overflow-hidden \" +\n \"rounded-(--radius-full) bg-control-bg border border-control-border\";\n\n// The meter filled-portion indicator (spec §2/§4/§5): the portion of the rail up to the\n// score, in the NEUTRAL control foreground, rounded on the full radius. Its inline length\n// is the score as a percentage of the scale (set as an inline width in tsx — a data\n// percentage, not a design token). The length CHANGES on the FAST duration with verdify\n// easing, collapsing to the instant endpoint under reduced motion — a calm settle, never\n// the verified-check theatre duration (spec §4). It is neutral: no status, no action.\nexport const trustScoreIndicatorClass =\n \"block h-full rounded-(--radius-full) bg-control-fg \" +\n \"transition-[inline-size] duration-(--motion-duration-fast) ease-(--motion-easing-verdify) \" +\n \"motion-reduce:duration-(--motion-duration-instant)\";\n\nexport type TrustScoreVariantProps = VariantProps<typeof trustScoreVariants>;\n"],"mappings":"AAAA,SAAS,WAA8B;AAkChC,MAAM,qBAAqB,IAAI,iCAAiC;AAAA,EACrE,UAAU;AAAA;AAAA;AAAA;AAAA,IAIR,SAAS;AAAA;AAAA;AAAA,MAGP,OAAO;AAAA;AAAA;AAAA,MAGP,OAAO;AAAA;AAAA;AAAA;AAAA,MAIP,SAAS;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAIA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,iBAAiB,EAAE,SAAS,SAAS,QAAQ,MAAM;AACrD,CAAC;AAIM,MAAM,qBAAqB;AAS3B,MAAM,uBACX;AAMK,MAAM,8BACX;AAMK,MAAM,uBAAuB;AAK7B,MAAM,uBAAuB;AAI7B,MAAM,6BAA6B;AAMnC,MAAM,6BAA6B;AAQnC,MAAM,uBACX;AASK,MAAM,2BACX;","names":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { VerifiedBadge, type VerifiedBadgeProps } from "./verified-badge";
|
|
2
|
+
export { verifiedBadgeVariants, verifiedBadgeCheckVariants, verifiedBadgeCheckStrokeClass, VERIFIED_BADGE_REVEAL_KEYFRAME, type VerifiedBadgeVariantProps, } from "./verified-badge.variants";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/verified-badge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,6BAA6B,EAC7B,8BAA8B,EAC9B,KAAK,yBAAyB,GAC/B,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { VerifiedBadge } from "./verified-badge";
|
|
2
|
+
import {
|
|
3
|
+
verifiedBadgeVariants,
|
|
4
|
+
verifiedBadgeCheckVariants,
|
|
5
|
+
verifiedBadgeCheckStrokeClass,
|
|
6
|
+
VERIFIED_BADGE_REVEAL_KEYFRAME
|
|
7
|
+
} from "./verified-badge.variants";
|
|
8
|
+
export {
|
|
9
|
+
VERIFIED_BADGE_REVEAL_KEYFRAME,
|
|
10
|
+
VerifiedBadge,
|
|
11
|
+
verifiedBadgeCheckStrokeClass,
|
|
12
|
+
verifiedBadgeCheckVariants,
|
|
13
|
+
verifiedBadgeVariants
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/verified-badge/index.ts"],"sourcesContent":["export { VerifiedBadge, type VerifiedBadgeProps } from \"./verified-badge\";\nexport {\n verifiedBadgeVariants,\n verifiedBadgeCheckVariants,\n verifiedBadgeCheckStrokeClass,\n VERIFIED_BADGE_REVEAL_KEYFRAME,\n type VerifiedBadgeVariantProps,\n} from \"./verified-badge.variants\";\n"],"mappings":"AAAA,SAAS,qBAA8C;AACvD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;","names":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VerifiedBadgeVariantProps } from "./verified-badge.variants";
|
|
3
|
+
export interface VerifiedBadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "aria-label">, VerifiedBadgeVariantProps {
|
|
4
|
+
/**
|
|
5
|
+
* Short text naming what was verified (spec §2), a plain statement in sentence case
|
|
6
|
+
* ("ID verified.", "Email verified.") — no all-caps, no exclamation mark. When present it
|
|
7
|
+
* is the visible name AND the accessible name. Omit it together with {@link labelHidden}
|
|
8
|
+
* for the check-only marker, in which case an {@link "aria-label"} carries the full
|
|
9
|
+
* statement (the badge is never nameless to assistive technology).
|
|
10
|
+
*/
|
|
11
|
+
label?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Hide the visible label, leaving the check standing alone (spec §3 `label-hidden`): a
|
|
14
|
+
* tight row or a repeated column. The accessible name is STILL required and still states
|
|
15
|
+
* what was verified, so the meaning never rests on the green check alone — supply it via
|
|
16
|
+
* {@link "aria-label"}. The check is decorative either way.
|
|
17
|
+
*/
|
|
18
|
+
labelHidden?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The accessible name when the label is hidden (spec §7). State what was verified
|
|
21
|
+
* ("ID verified."). Required whenever {@link labelHidden} is set — the green check alone is
|
|
22
|
+
* not an accessible name (1.4.1 / 1.3.1). Ignored when a visible {@link label} is present,
|
|
23
|
+
* because the visible text is already the name (never both).
|
|
24
|
+
*/
|
|
25
|
+
"aria-label"?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A VerifiedBadge shows the in-product VERIFIED state of one specific claim — that a proof
|
|
29
|
+
* checked out (spec §1). It reports a RESULT, not an action: it states that something was
|
|
30
|
+
* verified and names what, and it owns the verified-status treatment end to end, so a verified
|
|
31
|
+
* result looks the same everywhere and no screen hand-colors its own.
|
|
32
|
+
*
|
|
33
|
+
* It encodes "proofs, not documents": it asserts that a proof passed, never that a document is
|
|
34
|
+
* on file, so its label and its accessible name speak to the claim that was proven (spec §1).
|
|
35
|
+
* It keeps brand and status apart — the verified state is the GREEN verified status, never the
|
|
36
|
+
* brand violet — so it binds nothing from the action (brand) tier (brand != state, spec
|
|
37
|
+
* §3/§5/§8). It carries the ONE deliberate motion in the system: the verified check draws ONCE
|
|
38
|
+
* with the deliberate duration the moment a result first resolves, then holds as a static mark
|
|
39
|
+
* and never animates again (spec §4/§8). Under prefers-reduced-motion the draw is suppressed and
|
|
40
|
+
* the check appears already drawn (spec §4/§7).
|
|
41
|
+
*
|
|
42
|
+
* It has exactly one meaning — verified — so there is NO pending / failed VerifiedBadge: a
|
|
43
|
+
* claim that is pending, expiring, or failed is a generic Badge or an Alert in the matching
|
|
44
|
+
* status color, and only a confirmed verified result earns this molecule and the verified green
|
|
45
|
+
* (spec §3). There is no loading state on the badge itself: while a check is still running, show
|
|
46
|
+
* a Spinner or a Skeleton in its place and mount the VerifiedBadge only once the result is
|
|
47
|
+
* verified — its appearance IS the confirmation (spec §4).
|
|
48
|
+
*
|
|
49
|
+
* It is NON-INTERACTIVE (spec §4/§6): it takes no focus, binds no keys, is never a tab stop, and
|
|
50
|
+
* renders no focus ring or target-size floor. Acting on a verified result — opening the proof,
|
|
51
|
+
* managing the claim — is a SEPARATE control (a Button or link) with its own keyboard model and
|
|
52
|
+
* focus ring; the badge only reports (spec §6).
|
|
53
|
+
*/
|
|
54
|
+
export declare const VerifiedBadge: React.ForwardRefExoticComponent<VerifiedBadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
55
|
+
//# sourceMappingURL=verified-badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verified-badge.d.ts","sourceRoot":"","sources":["../../../src/components/verified-badge/verified-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAKL,KAAK,yBAAyB,EAC/B,MAAM,2BAA2B,CAAC;AAYnC,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,YAAY,CAAC,EAC/D,yBAAyB;IAC3B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,aAAa,4FAwEzB,CAAC"}
|