@usalyt/ui 0.0.0-stage → 0.0.2
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/CHANGELOG.md +34 -0
- package/LICENSE +21 -0
- package/NOTICE +31 -0
- package/README.md +147 -2
- package/THIRD_PARTY_NOTICES.md +446 -0
- package/dist/app-shell-layout-BwhU0DNY.cjs +120 -0
- package/dist/app-shell-layout-Dpl6jPni.mjs +115 -0
- package/dist/app-shell-layout-Dpl6jPni.mjs.map +1 -0
- package/dist/aspect-ratio-D-UR6be8.cjs +36 -0
- package/dist/aspect-ratio-DkBx-nZ0.mjs +31 -0
- package/dist/aspect-ratio-DkBx-nZ0.mjs.map +1 -0
- package/dist/blocks/app-shell-layout/index.cjs +4 -0
- package/dist/blocks/app-shell-layout/index.d.cts +2 -0
- package/dist/blocks/app-shell-layout/index.d.mts +2 -0
- package/dist/blocks/app-shell-layout/index.mjs +3 -0
- package/dist/blocks/auth-form/index.cjs +110 -0
- package/dist/blocks/auth-form/index.d.cts +25 -0
- package/dist/blocks/auth-form/index.d.cts.map +1 -0
- package/dist/blocks/auth-form/index.d.mts +25 -0
- package/dist/blocks/auth-form/index.d.mts.map +1 -0
- package/dist/blocks/auth-form/index.mjs +109 -0
- package/dist/blocks/auth-form/index.mjs.map +1 -0
- package/dist/blocks/collaboration-chat-panel/index.cjs +4 -0
- package/dist/blocks/collaboration-chat-panel/index.d.cts +2 -0
- package/dist/blocks/collaboration-chat-panel/index.d.mts +2 -0
- package/dist/blocks/collaboration-chat-panel/index.mjs +3 -0
- package/dist/blocks/color-palette-sheet/index.cjs +191 -0
- package/dist/blocks/color-palette-sheet/index.d.cts +42 -0
- package/dist/blocks/color-palette-sheet/index.d.cts.map +1 -0
- package/dist/blocks/color-palette-sheet/index.d.mts +42 -0
- package/dist/blocks/color-palette-sheet/index.d.mts.map +1 -0
- package/dist/blocks/color-palette-sheet/index.mjs +190 -0
- package/dist/blocks/color-palette-sheet/index.mjs.map +1 -0
- package/dist/blocks/dashboard-header/index.cjs +91 -0
- package/dist/blocks/dashboard-header/index.d.cts +19 -0
- package/dist/blocks/dashboard-header/index.d.cts.map +1 -0
- package/dist/blocks/dashboard-header/index.d.mts +19 -0
- package/dist/blocks/dashboard-header/index.d.mts.map +1 -0
- package/dist/blocks/dashboard-header/index.mjs +90 -0
- package/dist/blocks/dashboard-header/index.mjs.map +1 -0
- package/dist/blocks/data-table-with-filters/index.cjs +87 -0
- package/dist/blocks/data-table-with-filters/index.d.cts +19 -0
- package/dist/blocks/data-table-with-filters/index.d.cts.map +1 -0
- package/dist/blocks/data-table-with-filters/index.d.mts +19 -0
- package/dist/blocks/data-table-with-filters/index.d.mts.map +1 -0
- package/dist/blocks/data-table-with-filters/index.mjs +86 -0
- package/dist/blocks/data-table-with-filters/index.mjs.map +1 -0
- package/dist/blocks/empty-state-block/index.cjs +4 -0
- package/dist/blocks/empty-state-block/index.d.cts +2 -0
- package/dist/blocks/empty-state-block/index.d.mts +2 -0
- package/dist/blocks/empty-state-block/index.mjs +3 -0
- package/dist/blocks/evaluation-summary-report/index.cjs +4 -0
- package/dist/blocks/evaluation-summary-report/index.d.cts +2 -0
- package/dist/blocks/evaluation-summary-report/index.d.mts +2 -0
- package/dist/blocks/evaluation-summary-report/index.mjs +3 -0
- package/dist/blocks/form-with-validation/index.cjs +122 -0
- package/dist/blocks/form-with-validation/index.d.cts +27 -0
- package/dist/blocks/form-with-validation/index.d.cts.map +1 -0
- package/dist/blocks/form-with-validation/index.d.mts +27 -0
- package/dist/blocks/form-with-validation/index.d.mts.map +1 -0
- package/dist/blocks/form-with-validation/index.mjs +120 -0
- package/dist/blocks/form-with-validation/index.mjs.map +1 -0
- package/dist/blocks/heuristic-finding-card/index.cjs +4 -0
- package/dist/blocks/heuristic-finding-card/index.d.cts +2 -0
- package/dist/blocks/heuristic-finding-card/index.d.mts +2 -0
- package/dist/blocks/heuristic-finding-card/index.mjs +3 -0
- package/dist/blocks/inspector-split-view/index.cjs +4 -0
- package/dist/blocks/inspector-split-view/index.d.cts +2 -0
- package/dist/blocks/inspector-split-view/index.d.mts +2 -0
- package/dist/blocks/inspector-split-view/index.mjs +3 -0
- package/dist/blocks/instrument-metrics-grid/index.cjs +225 -0
- package/dist/blocks/instrument-metrics-grid/index.d.cts +32 -0
- package/dist/blocks/instrument-metrics-grid/index.d.cts.map +1 -0
- package/dist/blocks/instrument-metrics-grid/index.d.mts +32 -0
- package/dist/blocks/instrument-metrics-grid/index.d.mts.map +1 -0
- package/dist/blocks/instrument-metrics-grid/index.mjs +224 -0
- package/dist/blocks/instrument-metrics-grid/index.mjs.map +1 -0
- package/dist/blocks/project-kanban-board/index.cjs +4 -0
- package/dist/blocks/project-kanban-board/index.d.cts +2 -0
- package/dist/blocks/project-kanban-board/index.d.mts +2 -0
- package/dist/blocks/project-kanban-board/index.mjs +3 -0
- package/dist/blocks/schedule-timeline-board/index.cjs +327 -0
- package/dist/blocks/schedule-timeline-board/index.d.cts +51 -0
- package/dist/blocks/schedule-timeline-board/index.d.cts.map +1 -0
- package/dist/blocks/schedule-timeline-board/index.d.mts +51 -0
- package/dist/blocks/schedule-timeline-board/index.d.mts.map +1 -0
- package/dist/blocks/schedule-timeline-board/index.mjs +326 -0
- package/dist/blocks/schedule-timeline-board/index.mjs.map +1 -0
- package/dist/blocks/stats-card-grid/index.cjs +55 -0
- package/dist/blocks/stats-card-grid/index.d.cts +22 -0
- package/dist/blocks/stats-card-grid/index.d.cts.map +1 -0
- package/dist/blocks/stats-card-grid/index.d.mts +22 -0
- package/dist/blocks/stats-card-grid/index.d.mts.map +1 -0
- package/dist/blocks/stats-card-grid/index.mjs +54 -0
- package/dist/blocks/stats-card-grid/index.mjs.map +1 -0
- package/dist/blocks/team-members-table/index.cjs +4 -0
- package/dist/blocks/team-members-table/index.d.cts +2 -0
- package/dist/blocks/team-members-table/index.d.mts +2 -0
- package/dist/blocks/team-members-table/index.mjs +3 -0
- package/dist/carousel-BvB82spx.mjs +138 -0
- package/dist/carousel-BvB82spx.mjs.map +1 -0
- package/dist/carousel-DU60VwEf.cjs +174 -0
- package/dist/collaboration-chat-panel-BO-k0fqo.mjs +113 -0
- package/dist/collaboration-chat-panel-BO-k0fqo.mjs.map +1 -0
- package/dist/collaboration-chat-panel-CR14FNw6.cjs +118 -0
- package/dist/color-swatch-XzO6dwhR.mjs +47 -0
- package/dist/color-swatch-XzO6dwhR.mjs.map +1 -0
- package/dist/color-swatch-nICTKGMP.cjs +58 -0
- package/dist/components/accordion/index.cjs +44 -0
- package/dist/components/accordion/index.d.cts +11 -0
- package/dist/components/accordion/index.d.cts.map +1 -0
- package/dist/components/accordion/index.d.mts +11 -0
- package/dist/components/accordion/index.d.mts.map +1 -0
- package/dist/components/accordion/index.mjs +39 -0
- package/dist/components/accordion/index.mjs.map +1 -0
- package/dist/components/alert/index.cjs +46 -0
- package/dist/components/alert/index.d.cts +14 -0
- package/dist/components/alert/index.d.cts.map +1 -0
- package/dist/components/alert/index.d.mts +14 -0
- package/dist/components/alert/index.d.mts.map +1 -0
- package/dist/components/alert/index.mjs +42 -0
- package/dist/components/alert/index.mjs.map +1 -0
- package/dist/components/alert-dialog/index.cjs +61 -0
- package/dist/components/alert-dialog/index.d.cts +23 -0
- package/dist/components/alert-dialog/index.d.cts.map +1 -0
- package/dist/components/alert-dialog/index.d.mts +23 -0
- package/dist/components/alert-dialog/index.d.mts.map +1 -0
- package/dist/components/alert-dialog/index.mjs +50 -0
- package/dist/components/alert-dialog/index.mjs.map +1 -0
- package/dist/components/aspect-ratio/index.cjs +4 -0
- package/dist/components/aspect-ratio/index.d.cts +2 -0
- package/dist/components/aspect-ratio/index.d.mts +2 -0
- package/dist/components/aspect-ratio/index.mjs +3 -0
- package/dist/components/avatar/index.cjs +42 -0
- package/dist/components/avatar/index.d.cts +14 -0
- package/dist/components/avatar/index.d.cts.map +1 -0
- package/dist/components/avatar/index.d.mts +14 -0
- package/dist/components/avatar/index.d.mts.map +1 -0
- package/dist/components/avatar/index.mjs +38 -0
- package/dist/components/avatar/index.mjs.map +1 -0
- package/dist/components/badge/index.cjs +38 -0
- package/dist/components/badge/index.d.cts +11 -0
- package/dist/components/badge/index.d.cts.map +1 -0
- package/dist/components/badge/index.d.mts +11 -0
- package/dist/components/badge/index.d.mts.map +1 -0
- package/dist/components/badge/index.mjs +36 -0
- package/dist/components/badge/index.mjs.map +1 -0
- package/dist/components/breadcrumb/index.cjs +70 -0
- package/dist/components/breadcrumb/index.d.cts +18 -0
- package/dist/components/breadcrumb/index.d.cts.map +1 -0
- package/dist/components/breadcrumb/index.d.mts +18 -0
- package/dist/components/breadcrumb/index.d.mts.map +1 -0
- package/dist/components/breadcrumb/index.mjs +63 -0
- package/dist/components/breadcrumb/index.mjs.map +1 -0
- package/dist/components/button/index.cjs +100 -0
- package/dist/components/button/index.d.cts +2 -0
- package/dist/components/button/index.d.mts +2 -0
- package/dist/components/button/index.mjs +98 -0
- package/dist/components/button/index.mjs.map +1 -0
- package/dist/components/calendar/index.cjs +125 -0
- package/dist/components/calendar/index.d.cts +12 -0
- package/dist/components/calendar/index.d.cts.map +1 -0
- package/dist/components/calendar/index.d.mts +12 -0
- package/dist/components/calendar/index.d.mts.map +1 -0
- package/dist/components/calendar/index.mjs +124 -0
- package/dist/components/calendar/index.mjs.map +1 -0
- package/dist/components/card/index.cjs +65 -0
- package/dist/components/card/index.d.cts +16 -0
- package/dist/components/card/index.d.cts.map +1 -0
- package/dist/components/card/index.d.mts +16 -0
- package/dist/components/card/index.d.mts.map +1 -0
- package/dist/components/card/index.mjs +58 -0
- package/dist/components/card/index.mjs.map +1 -0
- package/dist/components/carousel/index.cjs +9 -0
- package/dist/components/carousel/index.d.cts +2 -0
- package/dist/components/carousel/index.d.mts +2 -0
- package/dist/components/carousel/index.mjs +3 -0
- package/dist/components/chart/index.cjs +63 -0
- package/dist/components/chart/index.d.cts +21 -0
- package/dist/components/chart/index.d.cts.map +1 -0
- package/dist/components/chart/index.d.mts +21 -0
- package/dist/components/chart/index.d.mts.map +1 -0
- package/dist/components/chart/index.mjs +60 -0
- package/dist/components/chart/index.mjs.map +1 -0
- package/dist/components/checkbox/index.cjs +34 -0
- package/dist/components/checkbox/index.d.cts +10 -0
- package/dist/components/checkbox/index.d.cts.map +1 -0
- package/dist/components/checkbox/index.d.mts +10 -0
- package/dist/components/checkbox/index.d.mts.map +1 -0
- package/dist/components/checkbox/index.mjs +33 -0
- package/dist/components/checkbox/index.mjs.map +1 -0
- package/dist/components/collapsible/index.cjs +22 -0
- package/dist/components/collapsible/index.d.cts +8 -0
- package/dist/components/collapsible/index.d.cts.map +1 -0
- package/dist/components/collapsible/index.d.mts +8 -0
- package/dist/components/collapsible/index.d.mts.map +1 -0
- package/dist/components/collapsible/index.mjs +19 -0
- package/dist/components/collapsible/index.mjs.map +1 -0
- package/dist/components/color-swatch/index.cjs +5 -0
- package/dist/components/color-swatch/index.d.cts +2 -0
- package/dist/components/color-swatch/index.d.mts +2 -0
- package/dist/components/color-swatch/index.mjs +3 -0
- package/dist/components/combobox/index.cjs +192 -0
- package/dist/components/combobox/index.d.cts +27 -0
- package/dist/components/combobox/index.d.cts.map +1 -0
- package/dist/components/combobox/index.d.mts +27 -0
- package/dist/components/combobox/index.d.mts.map +1 -0
- package/dist/components/combobox/index.mjs +191 -0
- package/dist/components/combobox/index.mjs.map +1 -0
- package/dist/components/command/index.cjs +96 -0
- package/dist/components/command/index.d.cts +75 -0
- package/dist/components/command/index.d.cts.map +1 -0
- package/dist/components/command/index.d.mts +75 -0
- package/dist/components/command/index.d.mts.map +1 -0
- package/dist/components/command/index.mjs +88 -0
- package/dist/components/command/index.mjs.map +1 -0
- package/dist/components/context-menu/index.cjs +55 -0
- package/dist/components/context-menu/index.d.cts +19 -0
- package/dist/components/context-menu/index.d.cts.map +1 -0
- package/dist/components/context-menu/index.d.mts +19 -0
- package/dist/components/context-menu/index.d.mts.map +1 -0
- package/dist/components/context-menu/index.mjs +47 -0
- package/dist/components/context-menu/index.mjs.map +1 -0
- package/dist/components/copy-button/index.cjs +4 -0
- package/dist/components/copy-button/index.d.cts +2 -0
- package/dist/components/copy-button/index.d.mts +2 -0
- package/dist/components/copy-button/index.mjs +3 -0
- package/dist/components/data-table/index.cjs +152 -0
- package/dist/components/data-table/index.d.cts +20 -0
- package/dist/components/data-table/index.d.cts.map +1 -0
- package/dist/components/data-table/index.d.mts +20 -0
- package/dist/components/data-table/index.d.mts.map +1 -0
- package/dist/components/data-table/index.mjs +150 -0
- package/dist/components/data-table/index.mjs.map +1 -0
- package/dist/components/date-picker/index.cjs +48 -0
- package/dist/components/date-picker/index.d.cts +13 -0
- package/dist/components/date-picker/index.d.cts.map +1 -0
- package/dist/components/date-picker/index.d.mts +13 -0
- package/dist/components/date-picker/index.d.mts.map +1 -0
- package/dist/components/date-picker/index.mjs +47 -0
- package/dist/components/date-picker/index.mjs.map +1 -0
- package/dist/components/dialog/index.cjs +68 -0
- package/dist/components/dialog/index.d.cts +24 -0
- package/dist/components/dialog/index.d.cts.map +1 -0
- package/dist/components/dialog/index.d.mts +24 -0
- package/dist/components/dialog/index.d.mts.map +1 -0
- package/dist/components/dialog/index.mjs +58 -0
- package/dist/components/dialog/index.mjs.map +1 -0
- package/dist/components/drawer/index.cjs +61 -0
- package/dist/components/drawer/index.d.cts +24 -0
- package/dist/components/drawer/index.d.cts.map +1 -0
- package/dist/components/drawer/index.d.mts +24 -0
- package/dist/components/drawer/index.d.mts.map +1 -0
- package/dist/components/drawer/index.mjs +51 -0
- package/dist/components/drawer/index.mjs.map +1 -0
- package/dist/components/dropdown-menu/index.cjs +58 -0
- package/dist/components/dropdown-menu/index.d.cts +21 -0
- package/dist/components/dropdown-menu/index.d.cts.map +1 -0
- package/dist/components/dropdown-menu/index.d.mts +21 -0
- package/dist/components/dropdown-menu/index.d.mts.map +1 -0
- package/dist/components/dropdown-menu/index.mjs +49 -0
- package/dist/components/dropdown-menu/index.mjs.map +1 -0
- package/dist/components/file-input/index.cjs +60 -0
- package/dist/components/file-input/index.d.cts +11 -0
- package/dist/components/file-input/index.d.cts.map +1 -0
- package/dist/components/file-input/index.d.mts +11 -0
- package/dist/components/file-input/index.d.mts.map +1 -0
- package/dist/components/file-input/index.mjs +59 -0
- package/dist/components/file-input/index.mjs.map +1 -0
- package/dist/components/form/index.cjs +121 -0
- package/dist/components/form/index.d.cts +26 -0
- package/dist/components/form/index.d.cts.map +1 -0
- package/dist/components/form/index.d.mts +26 -0
- package/dist/components/form/index.d.mts.map +1 -0
- package/dist/components/form/index.mjs +113 -0
- package/dist/components/form/index.mjs.map +1 -0
- package/dist/components/hover-card/index.cjs +57 -0
- package/dist/components/hover-card/index.d.cts +43 -0
- package/dist/components/hover-card/index.d.cts.map +1 -0
- package/dist/components/hover-card/index.d.mts +43 -0
- package/dist/components/hover-card/index.d.mts.map +1 -0
- package/dist/components/hover-card/index.mjs +53 -0
- package/dist/components/hover-card/index.mjs.map +1 -0
- package/dist/components/input/index.cjs +33 -0
- package/dist/components/input/index.d.cts +11 -0
- package/dist/components/input/index.d.cts.map +1 -0
- package/dist/components/input/index.d.mts +11 -0
- package/dist/components/input/index.d.mts.map +1 -0
- package/dist/components/input/index.mjs +31 -0
- package/dist/components/input/index.mjs.map +1 -0
- package/dist/components/input-otp/index.cjs +7 -0
- package/dist/components/input-otp/index.d.cts +2 -0
- package/dist/components/input-otp/index.d.mts +2 -0
- package/dist/components/input-otp/index.mjs +3 -0
- package/dist/components/kbd/index.cjs +5 -0
- package/dist/components/kbd/index.d.cts +2 -0
- package/dist/components/kbd/index.d.mts +2 -0
- package/dist/components/kbd/index.mjs +3 -0
- package/dist/components/label/index.cjs +24 -0
- package/dist/components/label/index.d.cts +2 -0
- package/dist/components/label/index.d.mts +2 -0
- package/dist/components/label/index.mjs +22 -0
- package/dist/components/label/index.mjs.map +1 -0
- package/dist/components/menubar/index.cjs +63 -0
- package/dist/components/menubar/index.d.cts +19 -0
- package/dist/components/menubar/index.d.cts.map +1 -0
- package/dist/components/menubar/index.d.mts +19 -0
- package/dist/components/menubar/index.d.mts.map +1 -0
- package/dist/components/menubar/index.mjs +55 -0
- package/dist/components/menubar/index.mjs.map +1 -0
- package/dist/components/navigation-menu/index.cjs +62 -0
- package/dist/components/navigation-menu/index.d.cts +27 -0
- package/dist/components/navigation-menu/index.d.cts.map +1 -0
- package/dist/components/navigation-menu/index.d.mts +27 -0
- package/dist/components/navigation-menu/index.d.mts.map +1 -0
- package/dist/components/navigation-menu/index.mjs +56 -0
- package/dist/components/navigation-menu/index.mjs.map +1 -0
- package/dist/components/number-field/index.cjs +41 -0
- package/dist/components/number-field/index.d.cts +11 -0
- package/dist/components/number-field/index.d.cts.map +1 -0
- package/dist/components/number-field/index.d.mts +11 -0
- package/dist/components/number-field/index.d.mts.map +1 -0
- package/dist/components/number-field/index.mjs +37 -0
- package/dist/components/number-field/index.mjs.map +1 -0
- package/dist/components/pagination/index.cjs +10 -0
- package/dist/components/pagination/index.d.cts +2 -0
- package/dist/components/pagination/index.d.mts +2 -0
- package/dist/components/pagination/index.mjs +3 -0
- package/dist/components/popover/index.cjs +29 -0
- package/dist/components/popover/index.d.cts +14 -0
- package/dist/components/popover/index.d.cts.map +1 -0
- package/dist/components/popover/index.d.mts +14 -0
- package/dist/components/popover/index.d.mts.map +1 -0
- package/dist/components/popover/index.mjs +24 -0
- package/dist/components/popover/index.mjs.map +1 -0
- package/dist/components/progress/index.cjs +94 -0
- package/dist/components/progress/index.d.cts +20 -0
- package/dist/components/progress/index.d.cts.map +1 -0
- package/dist/components/progress/index.d.mts +20 -0
- package/dist/components/progress/index.d.mts.map +1 -0
- package/dist/components/progress/index.mjs +91 -0
- package/dist/components/progress/index.mjs.map +1 -0
- package/dist/components/radio-group/index.cjs +43 -0
- package/dist/components/radio-group/index.d.cts +17 -0
- package/dist/components/radio-group/index.d.cts.map +1 -0
- package/dist/components/radio-group/index.d.mts +17 -0
- package/dist/components/radio-group/index.d.mts.map +1 -0
- package/dist/components/radio-group/index.mjs +41 -0
- package/dist/components/radio-group/index.mjs.map +1 -0
- package/dist/components/rating/index.cjs +4 -0
- package/dist/components/rating/index.d.cts +2 -0
- package/dist/components/rating/index.d.mts +2 -0
- package/dist/components/rating/index.mjs +3 -0
- package/dist/components/resizable/index.cjs +6 -0
- package/dist/components/resizable/index.d.cts +2 -0
- package/dist/components/resizable/index.d.mts +2 -0
- package/dist/components/resizable/index.mjs +3 -0
- package/dist/components/scroll-area/index.cjs +35 -0
- package/dist/components/scroll-area/index.d.cts +9 -0
- package/dist/components/scroll-area/index.d.cts.map +1 -0
- package/dist/components/scroll-area/index.d.mts +9 -0
- package/dist/components/scroll-area/index.d.mts.map +1 -0
- package/dist/components/scroll-area/index.mjs +33 -0
- package/dist/components/scroll-area/index.mjs.map +1 -0
- package/dist/components/select/index.cjs +54 -0
- package/dist/components/select/index.d.cts +17 -0
- package/dist/components/select/index.d.cts.map +1 -0
- package/dist/components/select/index.d.mts +17 -0
- package/dist/components/select/index.d.mts.map +1 -0
- package/dist/components/select/index.mjs +46 -0
- package/dist/components/select/index.mjs.map +1 -0
- package/dist/components/separator/index.cjs +18 -0
- package/dist/components/separator/index.d.cts +6 -0
- package/dist/components/separator/index.d.cts.map +1 -0
- package/dist/components/separator/index.d.mts +6 -0
- package/dist/components/separator/index.d.mts.map +1 -0
- package/dist/components/separator/index.mjs +17 -0
- package/dist/components/separator/index.mjs.map +1 -0
- package/dist/components/sheet/index.cjs +69 -0
- package/dist/components/sheet/index.d.cts +27 -0
- package/dist/components/sheet/index.d.cts.map +1 -0
- package/dist/components/sheet/index.d.mts +27 -0
- package/dist/components/sheet/index.d.mts.map +1 -0
- package/dist/components/sheet/index.mjs +61 -0
- package/dist/components/sheet/index.mjs.map +1 -0
- package/dist/components/sidebar/index.cjs +16 -0
- package/dist/components/sidebar/index.d.cts +2 -0
- package/dist/components/sidebar/index.d.mts +2 -0
- package/dist/components/sidebar/index.mjs +3 -0
- package/dist/components/skeleton/index.cjs +19 -0
- package/dist/components/skeleton/index.d.cts +7 -0
- package/dist/components/skeleton/index.d.cts.map +1 -0
- package/dist/components/skeleton/index.d.mts +7 -0
- package/dist/components/skeleton/index.d.mts.map +1 -0
- package/dist/components/skeleton/index.mjs +18 -0
- package/dist/components/skeleton/index.mjs.map +1 -0
- package/dist/components/slider/index.cjs +30 -0
- package/dist/components/slider/index.d.cts +10 -0
- package/dist/components/slider/index.d.cts.map +1 -0
- package/dist/components/slider/index.d.mts +10 -0
- package/dist/components/slider/index.d.mts.map +1 -0
- package/dist/components/slider/index.mjs +29 -0
- package/dist/components/slider/index.mjs.map +1 -0
- package/dist/components/sonner/index.cjs +6 -0
- package/dist/components/sonner/index.d.cts +2 -0
- package/dist/components/sonner/index.d.mts +2 -0
- package/dist/components/sonner/index.mjs +3 -0
- package/dist/components/spinner/index.cjs +53 -0
- package/dist/components/spinner/index.d.cts +14 -0
- package/dist/components/spinner/index.d.cts.map +1 -0
- package/dist/components/spinner/index.d.mts +14 -0
- package/dist/components/spinner/index.d.mts.map +1 -0
- package/dist/components/spinner/index.mjs +51 -0
- package/dist/components/spinner/index.mjs.map +1 -0
- package/dist/components/stepper/index.cjs +9 -0
- package/dist/components/stepper/index.d.cts +2 -0
- package/dist/components/stepper/index.d.mts +2 -0
- package/dist/components/stepper/index.mjs +3 -0
- package/dist/components/switch/index.cjs +18 -0
- package/dist/components/switch/index.d.cts +8 -0
- package/dist/components/switch/index.d.cts.map +1 -0
- package/dist/components/switch/index.d.mts +8 -0
- package/dist/components/switch/index.d.mts.map +1 -0
- package/dist/components/switch/index.mjs +17 -0
- package/dist/components/switch/index.mjs.map +1 -0
- package/dist/components/table/index.cjs +69 -0
- package/dist/components/table/index.d.cts +13 -0
- package/dist/components/table/index.d.cts.map +1 -0
- package/dist/components/table/index.d.mts +13 -0
- package/dist/components/table/index.d.mts.map +1 -0
- package/dist/components/table/index.mjs +61 -0
- package/dist/components/table/index.mjs.map +1 -0
- package/dist/components/tabs/index.cjs +36 -0
- package/dist/components/tabs/index.d.cts +9 -0
- package/dist/components/tabs/index.d.cts.map +1 -0
- package/dist/components/tabs/index.d.mts +9 -0
- package/dist/components/tabs/index.d.mts.map +1 -0
- package/dist/components/tabs/index.mjs +32 -0
- package/dist/components/tabs/index.mjs.map +1 -0
- package/dist/components/textarea/index.cjs +32 -0
- package/dist/components/textarea/index.d.cts +11 -0
- package/dist/components/textarea/index.d.cts.map +1 -0
- package/dist/components/textarea/index.d.mts +11 -0
- package/dist/components/textarea/index.d.mts.map +1 -0
- package/dist/components/textarea/index.mjs +30 -0
- package/dist/components/textarea/index.mjs.map +1 -0
- package/dist/components/timeline/index.cjs +12 -0
- package/dist/components/timeline/index.d.cts +2 -0
- package/dist/components/timeline/index.d.mts +2 -0
- package/dist/components/timeline/index.mjs +3 -0
- package/dist/components/toast/index.cjs +92 -0
- package/dist/components/toast/index.d.cts +27 -0
- package/dist/components/toast/index.d.cts.map +1 -0
- package/dist/components/toast/index.d.mts +27 -0
- package/dist/components/toast/index.d.mts.map +1 -0
- package/dist/components/toast/index.mjs +80 -0
- package/dist/components/toast/index.mjs.map +1 -0
- package/dist/components/toggle/index.cjs +5 -0
- package/dist/components/toggle/index.d.cts +2 -0
- package/dist/components/toggle/index.d.mts +2 -0
- package/dist/components/toggle/index.mjs +3 -0
- package/dist/components/toggle-group/index.cjs +45 -0
- package/dist/components/toggle-group/index.d.cts +13 -0
- package/dist/components/toggle-group/index.d.cts.map +1 -0
- package/dist/components/toggle-group/index.d.mts +13 -0
- package/dist/components/toggle-group/index.d.mts.map +1 -0
- package/dist/components/toggle-group/index.mjs +43 -0
- package/dist/components/toggle-group/index.mjs.map +1 -0
- package/dist/components/tooltip/index.cjs +29 -0
- package/dist/components/tooltip/index.d.cts +13 -0
- package/dist/components/tooltip/index.d.cts.map +1 -0
- package/dist/components/tooltip/index.d.mts +13 -0
- package/dist/components/tooltip/index.d.mts.map +1 -0
- package/dist/components/tooltip/index.mjs +24 -0
- package/dist/components/tooltip/index.mjs.map +1 -0
- package/dist/components/tree-view/index.cjs +7 -0
- package/dist/components/tree-view/index.d.cts +2 -0
- package/dist/components/tree-view/index.d.mts +2 -0
- package/dist/components/tree-view/index.mjs +3 -0
- package/dist/copy-button-CQR9ba95.cjs +45 -0
- package/dist/copy-button-DebO1rhk.mjs +40 -0
- package/dist/copy-button-DebO1rhk.mjs.map +1 -0
- package/dist/empty-state-block-DlccTgvo.mjs +53 -0
- package/dist/empty-state-block-DlccTgvo.mjs.map +1 -0
- package/dist/empty-state-block-rrYF_ai9.cjs +58 -0
- package/dist/evaluation-summary-report-CIa4moWm.cjs +245 -0
- package/dist/evaluation-summary-report-COZZFLS6.mjs +240 -0
- package/dist/evaluation-summary-report-COZZFLS6.mjs.map +1 -0
- package/dist/files/Inter-OFL.txt +93 -0
- package/dist/files/inter-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-wght-normal.woff2 +0 -0
- package/dist/files/inter-greek-ext-wght-normal.woff2 +0 -0
- package/dist/files/inter-greek-wght-normal.woff2 +0 -0
- package/dist/files/inter-latin-ext-wght-normal.woff2 +0 -0
- package/dist/files/inter-latin-wght-normal.woff2 +0 -0
- package/dist/files/inter-vietnamese-wght-normal.woff2 +0 -0
- package/dist/heuristic-finding-card-CeJzuzuN.cjs +153 -0
- package/dist/heuristic-finding-card-hlDwM_of.mjs +148 -0
- package/dist/heuristic-finding-card-hlDwM_of.mjs.map +1 -0
- package/dist/index-2Vh9mMtN.d.mts +12 -0
- package/dist/index-2Vh9mMtN.d.mts.map +1 -0
- package/dist/index-6OorKnHX.d.cts +21 -0
- package/dist/index-6OorKnHX.d.cts.map +1 -0
- package/dist/index-6OorKnHX.d.mts +21 -0
- package/dist/index-6OorKnHX.d.mts.map +1 -0
- package/dist/index-B6epY4xT.d.cts +18 -0
- package/dist/index-B6epY4xT.d.cts.map +1 -0
- package/dist/index-B8Z5coVq.d.cts +25 -0
- package/dist/index-B8Z5coVq.d.cts.map +1 -0
- package/dist/index-B8Z5coVq.d.mts +25 -0
- package/dist/index-B8Z5coVq.d.mts.map +1 -0
- package/dist/index-BHz32vzo.d.cts +17 -0
- package/dist/index-BHz32vzo.d.cts.map +1 -0
- package/dist/index-BHz32vzo.d.mts +17 -0
- package/dist/index-BHz32vzo.d.mts.map +1 -0
- package/dist/index-BUL5nXfL.d.cts +22 -0
- package/dist/index-BUL5nXfL.d.cts.map +1 -0
- package/dist/index-BUL5nXfL.d.mts +22 -0
- package/dist/index-BUL5nXfL.d.mts.map +1 -0
- package/dist/index-BVVCNb2w.d.cts +29 -0
- package/dist/index-BVVCNb2w.d.cts.map +1 -0
- package/dist/index-BVVCNb2w.d.mts +29 -0
- package/dist/index-BVVCNb2w.d.mts.map +1 -0
- package/dist/index-B_JrTcxF.d.cts +31 -0
- package/dist/index-B_JrTcxF.d.cts.map +1 -0
- package/dist/index-C3V4MOJH.d.mts +18 -0
- package/dist/index-C3V4MOJH.d.mts.map +1 -0
- package/dist/index-C3ol_8Kk.d.cts +31 -0
- package/dist/index-C3ol_8Kk.d.cts.map +1 -0
- package/dist/index-C5ugjRen.d.cts +25 -0
- package/dist/index-C5ugjRen.d.cts.map +1 -0
- package/dist/index-C5ugjRen.d.mts +25 -0
- package/dist/index-C5ugjRen.d.mts.map +1 -0
- package/dist/index-CI5EwPm7.d.cts +39 -0
- package/dist/index-CI5EwPm7.d.cts.map +1 -0
- package/dist/index-CI5EwPm7.d.mts +39 -0
- package/dist/index-CI5EwPm7.d.mts.map +1 -0
- package/dist/index-CU-siW-K.d.mts +46 -0
- package/dist/index-CU-siW-K.d.mts.map +1 -0
- package/dist/index-CsF26Fe8.d.cts +23 -0
- package/dist/index-CsF26Fe8.d.cts.map +1 -0
- package/dist/index-CsF26Fe8.d.mts +23 -0
- package/dist/index-CsF26Fe8.d.mts.map +1 -0
- package/dist/index-CvHlThTj.d.cts +10 -0
- package/dist/index-CvHlThTj.d.cts.map +1 -0
- package/dist/index-CvHlThTj.d.mts +10 -0
- package/dist/index-CvHlThTj.d.mts.map +1 -0
- package/dist/index-D56D0Sa2.d.cts +13 -0
- package/dist/index-D56D0Sa2.d.cts.map +1 -0
- package/dist/index-D56D0Sa2.d.mts +13 -0
- package/dist/index-D56D0Sa2.d.mts.map +1 -0
- package/dist/index-D5_0x-hC.d.cts +12 -0
- package/dist/index-D5_0x-hC.d.cts.map +1 -0
- package/dist/index-D5sQcRHf.d.cts +23 -0
- package/dist/index-D5sQcRHf.d.cts.map +1 -0
- package/dist/index-D5sQcRHf.d.mts +23 -0
- package/dist/index-D5sQcRHf.d.mts.map +1 -0
- package/dist/index-DeDN45Ha.d.mts +31 -0
- package/dist/index-DeDN45Ha.d.mts.map +1 -0
- package/dist/index-DjbxiLM8.d.cts +12 -0
- package/dist/index-DjbxiLM8.d.cts.map +1 -0
- package/dist/index-DjbxiLM8.d.mts +12 -0
- package/dist/index-DjbxiLM8.d.mts.map +1 -0
- package/dist/index-DlP_5d_g.d.cts +21 -0
- package/dist/index-DlP_5d_g.d.cts.map +1 -0
- package/dist/index-DlP_5d_g.d.mts +21 -0
- package/dist/index-DlP_5d_g.d.mts.map +1 -0
- package/dist/index-DtPmPGcN.d.cts +27 -0
- package/dist/index-DtPmPGcN.d.cts.map +1 -0
- package/dist/index-DtPmPGcN.d.mts +27 -0
- package/dist/index-DtPmPGcN.d.mts.map +1 -0
- package/dist/index-Q6oL7Ku9.d.cts +8 -0
- package/dist/index-Q6oL7Ku9.d.cts.map +1 -0
- package/dist/index-Q6oL7Ku9.d.mts +8 -0
- package/dist/index-Q6oL7Ku9.d.mts.map +1 -0
- package/dist/index-Ymzy10FB.d.cts +21 -0
- package/dist/index-Ymzy10FB.d.cts.map +1 -0
- package/dist/index-Ymzy10FB.d.mts +21 -0
- package/dist/index-Ymzy10FB.d.mts.map +1 -0
- package/dist/index-bZKcWdNm.d.cts +15 -0
- package/dist/index-bZKcWdNm.d.cts.map +1 -0
- package/dist/index-bZKcWdNm.d.mts +15 -0
- package/dist/index-bZKcWdNm.d.mts.map +1 -0
- package/dist/index-joP2_4d6.d.cts +11 -0
- package/dist/index-joP2_4d6.d.cts.map +1 -0
- package/dist/index-joP2_4d6.d.mts +11 -0
- package/dist/index-joP2_4d6.d.mts.map +1 -0
- package/dist/index-o7W0pKFo.d.mts +31 -0
- package/dist/index-o7W0pKFo.d.mts.map +1 -0
- package/dist/index-y8s6jpSR.d.cts +46 -0
- package/dist/index-y8s6jpSR.d.cts.map +1 -0
- package/dist/index-zlEzdw7N.d.cts +15 -0
- package/dist/index-zlEzdw7N.d.cts.map +1 -0
- package/dist/index-zlEzdw7N.d.mts +15 -0
- package/dist/index-zlEzdw7N.d.mts.map +1 -0
- package/dist/index.cjs +363 -0
- package/dist/index.d.cts +83 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +83 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +80 -0
- package/dist/input-otp-C7O7AtXb.cjs +67 -0
- package/dist/input-otp-CFNLnAuu.mjs +44 -0
- package/dist/input-otp-CFNLnAuu.mjs.map +1 -0
- package/dist/inspector-split-view-Cwsvl3-m.cjs +150 -0
- package/dist/inspector-split-view-D5tX9P5r.mjs +145 -0
- package/dist/inspector-split-view-D5tX9P5r.mjs.map +1 -0
- package/dist/kbd-D9Ymi9Pt.mjs +37 -0
- package/dist/kbd-D9Ymi9Pt.mjs.map +1 -0
- package/dist/kbd-Dhz_xrKs.cjs +48 -0
- package/dist/pagination-B8J2t1Vr.cjs +105 -0
- package/dist/pagination-ivrgsud6.mjs +64 -0
- package/dist/pagination-ivrgsud6.mjs.map +1 -0
- package/dist/project-kanban-board-BHLRHooH.mjs +138 -0
- package/dist/project-kanban-board-BHLRHooH.mjs.map +1 -0
- package/dist/project-kanban-board-DUaDiHZC.cjs +143 -0
- package/dist/rating-CtXEsqKU.cjs +72 -0
- package/dist/rating-pFb5zNn2.mjs +67 -0
- package/dist/rating-pFb5zNn2.mjs.map +1 -0
- package/dist/resizable-DrJqbD5t.mjs +23 -0
- package/dist/resizable-DrJqbD5t.mjs.map +1 -0
- package/dist/resizable-VZ7tgMu9.cjs +41 -0
- package/dist/rolldown-runtime-D6vf50IK.cjs +28 -0
- package/dist/sidebar-BCBtb6sS.mjs +232 -0
- package/dist/sidebar-BCBtb6sS.mjs.map +1 -0
- package/dist/sidebar-BilZg_Lv.cjs +309 -0
- package/dist/sonner-Ba68yk7d.mjs +20 -0
- package/dist/sonner-Ba68yk7d.mjs.map +1 -0
- package/dist/sonner-Crak-gYY.cjs +25 -0
- package/dist/stepper-CgBpI7sb.cjs +96 -0
- package/dist/stepper-Dtf208dW.mjs +61 -0
- package/dist/stepper-Dtf208dW.mjs.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/team-members-table-5OWUc6Ib.cjs +126 -0
- package/dist/team-members-table-DW52BAKr.mjs +121 -0
- package/dist/team-members-table-DW52BAKr.mjs.map +1 -0
- package/dist/timeline-CAPfreK3.cjs +118 -0
- package/dist/timeline-CBMvtk3M.mjs +65 -0
- package/dist/timeline-CBMvtk3M.mjs.map +1 -0
- package/dist/toggle-CZG8xQeG.cjs +48 -0
- package/dist/toggle-CpGSEgUK.d.cts +13 -0
- package/dist/toggle-CpGSEgUK.d.cts.map +1 -0
- package/dist/toggle-CpGSEgUK.d.mts +13 -0
- package/dist/toggle-CpGSEgUK.d.mts.map +1 -0
- package/dist/toggle-CpsU8EEk.mjs +37 -0
- package/dist/toggle-CpsU8EEk.mjs.map +1 -0
- package/dist/tree-view-BB1ghmfC.mjs +69 -0
- package/dist/tree-view-BB1ghmfC.mjs.map +1 -0
- package/dist/tree-view-BFzVxqkZ.cjs +92 -0
- package/dist/utils-BVF9WCwH.mjs +38 -0
- package/dist/utils-BVF9WCwH.mjs.map +1 -0
- package/dist/utils-YZxtPI0Y.cjs +40 -0
- package/package.json +873 -3
- package/scripts/audit-bundle-size.ts +80 -0
- package/scripts/generate-storybook-stories.ts +79 -0
- package/scripts/postbuild.mjs +132 -0
- package/scripts/public-entries.d.mts +25 -0
- package/scripts/public-entries.mjs +123 -0
- package/scripts/verify-artifacts.mjs +361 -0
- package/scripts/write-all-rich-stories.ts +402 -0
- package/src/blocks/app-shell-layout/app-shell-layout.stories.tsx +62 -0
- package/src/blocks/app-shell-layout/app-shell-layout.test.tsx +59 -0
- package/src/blocks/app-shell-layout/app-shell-layout.tsx +180 -0
- package/src/blocks/app-shell-layout/index.ts +5 -0
- package/src/blocks/auth-form/auth-form.stories.tsx +36 -0
- package/src/blocks/auth-form/auth-form.test.tsx +72 -0
- package/src/blocks/auth-form/auth-form.tsx +136 -0
- package/src/blocks/auth-form/index.ts +1 -0
- package/src/blocks/collaboration-chat-panel/collaboration-chat-panel.stories.tsx +45 -0
- package/src/blocks/collaboration-chat-panel/collaboration-chat-panel.test.tsx +101 -0
- package/src/blocks/collaboration-chat-panel/collaboration-chat-panel.tsx +180 -0
- package/src/blocks/collaboration-chat-panel/index.ts +5 -0
- package/src/blocks/color-palette-sheet/color-palette-sheet.stories.tsx +161 -0
- package/src/blocks/color-palette-sheet/color-palette-sheet.test.tsx +45 -0
- package/src/blocks/color-palette-sheet/color-palette-sheet.tsx +287 -0
- package/src/blocks/color-palette-sheet/index.ts +1 -0
- package/src/blocks/dashboard-header/dashboard-header.stories.tsx +41 -0
- package/src/blocks/dashboard-header/dashboard-header.test.tsx +76 -0
- package/src/blocks/dashboard-header/dashboard-header.tsx +128 -0
- package/src/blocks/dashboard-header/index.ts +1 -0
- package/src/blocks/data-table-with-filters/data-table-with-filters.stories.tsx +41 -0
- package/src/blocks/data-table-with-filters/data-table-with-filters.test.tsx +40 -0
- package/src/blocks/data-table-with-filters/data-table-with-filters.tsx +88 -0
- package/src/blocks/data-table-with-filters/index.ts +1 -0
- package/src/blocks/empty-state-block/empty-state-block.stories.tsx +39 -0
- package/src/blocks/empty-state-block/empty-state-block.test.tsx +76 -0
- package/src/blocks/empty-state-block/empty-state-block.tsx +83 -0
- package/src/blocks/empty-state-block/index.ts +4 -0
- package/src/blocks/evaluation-summary-report/evaluation-summary-report.stories.tsx +77 -0
- package/src/blocks/evaluation-summary-report/evaluation-summary-report.test.tsx +87 -0
- package/src/blocks/evaluation-summary-report/evaluation-summary-report.tsx +291 -0
- package/src/blocks/evaluation-summary-report/index.ts +5 -0
- package/src/blocks/form-with-validation/form-with-validation.stories.tsx +48 -0
- package/src/blocks/form-with-validation/form-with-validation.test.tsx +95 -0
- package/src/blocks/form-with-validation/form-with-validation.tsx +145 -0
- package/src/blocks/form-with-validation/index.ts +1 -0
- package/src/blocks/heuristic-finding-card/heuristic-finding-card.stories.tsx +125 -0
- package/src/blocks/heuristic-finding-card/heuristic-finding-card.test.tsx +68 -0
- package/src/blocks/heuristic-finding-card/heuristic-finding-card.tsx +218 -0
- package/src/blocks/heuristic-finding-card/index.ts +6 -0
- package/src/blocks/inspector-split-view/index.ts +5 -0
- package/src/blocks/inspector-split-view/inspector-split-view.stories.tsx +99 -0
- package/src/blocks/inspector-split-view/inspector-split-view.test.tsx +96 -0
- package/src/blocks/inspector-split-view/inspector-split-view.tsx +190 -0
- package/src/blocks/instrument-metrics-grid/index.ts +1 -0
- package/src/blocks/instrument-metrics-grid/instrument-metrics-grid.stories.tsx +41 -0
- package/src/blocks/instrument-metrics-grid/instrument-metrics-grid.test.tsx +17 -0
- package/src/blocks/instrument-metrics-grid/instrument-metrics-grid.tsx +277 -0
- package/src/blocks/project-kanban-board/index.ts +6 -0
- package/src/blocks/project-kanban-board/project-kanban-board.stories.tsx +107 -0
- package/src/blocks/project-kanban-board/project-kanban-board.test.tsx +112 -0
- package/src/blocks/project-kanban-board/project-kanban-board.tsx +243 -0
- package/src/blocks/schedule-timeline-board/index.ts +1 -0
- package/src/blocks/schedule-timeline-board/schedule-timeline-board.stories.tsx +202 -0
- package/src/blocks/schedule-timeline-board/schedule-timeline-board.test.tsx +67 -0
- package/src/blocks/schedule-timeline-board/schedule-timeline-board.tsx +495 -0
- package/src/blocks/stats-card-grid/index.ts +1 -0
- package/src/blocks/stats-card-grid/stats-card-grid.stories.tsx +66 -0
- package/src/blocks/stats-card-grid/stats-card-grid.test.tsx +53 -0
- package/src/blocks/stats-card-grid/stats-card-grid.tsx +127 -0
- package/src/blocks/team-members-table/index.ts +6 -0
- package/src/blocks/team-members-table/team-members-table.stories.tsx +41 -0
- package/src/blocks/team-members-table/team-members-table.test.tsx +58 -0
- package/src/blocks/team-members-table/team-members-table.tsx +178 -0
- package/src/components/accordion/accordion.stories.tsx +85 -0
- package/src/components/accordion/accordion.test.tsx +125 -0
- package/src/components/accordion/accordion.tsx +57 -0
- package/src/components/accordion/index.ts +1 -0
- package/src/components/alert/alert.stories.tsx +90 -0
- package/src/components/alert/alert.test.tsx +118 -0
- package/src/components/alert/alert.tsx +72 -0
- package/src/components/alert/index.ts +1 -0
- package/src/components/alert-dialog/alert-dialog.stories.tsx +129 -0
- package/src/components/alert-dialog/alert-dialog.test.tsx +187 -0
- package/src/components/alert-dialog/alert-dialog.tsx +91 -0
- package/src/components/alert-dialog/index.ts +1 -0
- package/src/components/aspect-ratio/aspect-ratio.stories.tsx +22 -0
- package/src/components/aspect-ratio/aspect-ratio.test.tsx +43 -0
- package/src/components/aspect-ratio/aspect-ratio.tsx +39 -0
- package/src/components/aspect-ratio/index.ts +1 -0
- package/src/components/avatar/avatar.stories.tsx +98 -0
- package/src/components/avatar/avatar.test.tsx +72 -0
- package/src/components/avatar/avatar.tsx +63 -0
- package/src/components/avatar/index.ts +1 -0
- package/src/components/badge/badge.stories.tsx +83 -0
- package/src/components/badge/badge.test.tsx +79 -0
- package/src/components/badge/badge.tsx +58 -0
- package/src/components/badge/index.ts +1 -0
- package/src/components/breadcrumb/breadcrumb.stories.tsx +89 -0
- package/src/components/breadcrumb/breadcrumb.test.tsx +132 -0
- package/src/components/breadcrumb/breadcrumb.tsx +115 -0
- package/src/components/breadcrumb/index.ts +1 -0
- package/src/components/button/button.stories.tsx +150 -0
- package/src/components/button/button.test.tsx +192 -0
- package/src/components/button/button.tsx +140 -0
- package/src/components/button/index.ts +1 -0
- package/src/components/calendar/calendar.stories.tsx +64 -0
- package/src/components/calendar/calendar.test.tsx +80 -0
- package/src/components/calendar/calendar.tsx +161 -0
- package/src/components/calendar/index.ts +1 -0
- package/src/components/card/card.stories.tsx +118 -0
- package/src/components/card/card.test.tsx +113 -0
- package/src/components/card/card.tsx +98 -0
- package/src/components/card/index.ts +1 -0
- package/src/components/carousel/carousel.stories.tsx +40 -0
- package/src/components/carousel/carousel.test.tsx +30 -0
- package/src/components/carousel/carousel.tsx +241 -0
- package/src/components/carousel/index.ts +10 -0
- package/src/components/chart/chart.stories.tsx +71 -0
- package/src/components/chart/chart.test.tsx +74 -0
- package/src/components/chart/chart.tsx +96 -0
- package/src/components/chart/index.ts +1 -0
- package/src/components/checkbox/checkbox.stories.tsx +118 -0
- package/src/components/checkbox/checkbox.test.tsx +118 -0
- package/src/components/checkbox/checkbox.tsx +58 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/collapsible/collapsible.stories.tsx +75 -0
- package/src/components/collapsible/collapsible.test.tsx +98 -0
- package/src/components/collapsible/collapsible.tsx +23 -0
- package/src/components/collapsible/index.ts +1 -0
- package/src/components/color-swatch/color-swatch.stories.tsx +28 -0
- package/src/components/color-swatch/color-swatch.test.tsx +86 -0
- package/src/components/color-swatch/color-swatch.tsx +72 -0
- package/src/components/color-swatch/index.ts +5 -0
- package/src/components/combobox/combobox.stories.tsx +72 -0
- package/src/components/combobox/combobox.test.tsx +146 -0
- package/src/components/combobox/combobox.tsx +273 -0
- package/src/components/combobox/index.ts +1 -0
- package/src/components/command/command.stories.tsx +88 -0
- package/src/components/command/command.test.tsx +174 -0
- package/src/components/command/command.tsx +152 -0
- package/src/components/command/index.ts +1 -0
- package/src/components/context-menu/context-menu.stories.tsx +62 -0
- package/src/components/context-menu/context-menu.test.tsx +94 -0
- package/src/components/context-menu/context-menu.tsx +85 -0
- package/src/components/context-menu/index.ts +1 -0
- package/src/components/copy-button/copy-button.stories.tsx +21 -0
- package/src/components/copy-button/copy-button.test.tsx +33 -0
- package/src/components/copy-button/copy-button.tsx +71 -0
- package/src/components/copy-button/index.ts +1 -0
- package/src/components/data-table/data-table.stories.tsx +85 -0
- package/src/components/data-table/data-table.test.tsx +117 -0
- package/src/components/data-table/data-table.tsx +243 -0
- package/src/components/data-table/index.ts +1 -0
- package/src/components/date-picker/date-picker.stories.tsx +49 -0
- package/src/components/date-picker/date-picker.test.tsx +50 -0
- package/src/components/date-picker/date-picker.tsx +78 -0
- package/src/components/date-picker/index.ts +1 -0
- package/src/components/dialog/dialog.stories.tsx +131 -0
- package/src/components/dialog/dialog.test.tsx +197 -0
- package/src/components/dialog/dialog.tsx +97 -0
- package/src/components/dialog/index.ts +1 -0
- package/src/components/drawer/drawer.stories.tsx +158 -0
- package/src/components/drawer/drawer.test.tsx +189 -0
- package/src/components/drawer/drawer.tsx +99 -0
- package/src/components/drawer/index.ts +1 -0
- package/src/components/dropdown-menu/dropdown-menu.stories.tsx +96 -0
- package/src/components/dropdown-menu/dropdown-menu.test.tsx +139 -0
- package/src/components/dropdown-menu/dropdown-menu.tsx +88 -0
- package/src/components/dropdown-menu/index.ts +1 -0
- package/src/components/file-input/file-input.stories.tsx +50 -0
- package/src/components/file-input/file-input.test.tsx +85 -0
- package/src/components/file-input/file-input.tsx +91 -0
- package/src/components/file-input/index.ts +1 -0
- package/src/components/form/form.stories.tsx +86 -0
- package/src/components/form/form.test.tsx +246 -0
- package/src/components/form/form.tsx +210 -0
- package/src/components/form/index.ts +1 -0
- package/src/components/hover-card/hover-card.stories.tsx +74 -0
- package/src/components/hover-card/hover-card.test.tsx +63 -0
- package/src/components/hover-card/hover-card.tsx +85 -0
- package/src/components/hover-card/index.ts +1 -0
- package/src/components/input/index.ts +1 -0
- package/src/components/input/input.stories.tsx +146 -0
- package/src/components/input/input.test.tsx +74 -0
- package/src/components/input/input.tsx +39 -0
- package/src/components/input-otp/index.ts +6 -0
- package/src/components/input-otp/input-otp.stories.tsx +35 -0
- package/src/components/input-otp/input-otp.test.tsx +52 -0
- package/src/components/input-otp/input-otp.tsx +69 -0
- package/src/components/kbd/index.ts +1 -0
- package/src/components/kbd/kbd.stories.tsx +22 -0
- package/src/components/kbd/kbd.test.tsx +25 -0
- package/src/components/kbd/kbd.tsx +41 -0
- package/src/components/label/index.ts +1 -0
- package/src/components/label/label.stories.tsx +44 -0
- package/src/components/label/label.test.tsx +47 -0
- package/src/components/label/label.tsx +31 -0
- package/src/components/menubar/index.ts +1 -0
- package/src/components/menubar/menubar.stories.tsx +70 -0
- package/src/components/menubar/menubar.test.tsx +103 -0
- package/src/components/menubar/menubar.tsx +103 -0
- package/src/components/navigation-menu/index.ts +1 -0
- package/src/components/navigation-menu/navigation-menu.stories.tsx +118 -0
- package/src/components/navigation-menu/navigation-menu.test.tsx +84 -0
- package/src/components/navigation-menu/navigation-menu.tsx +111 -0
- package/src/components/number-field/index.ts +1 -0
- package/src/components/number-field/number-field.stories.tsx +69 -0
- package/src/components/number-field/number-field.test.tsx +76 -0
- package/src/components/number-field/number-field.tsx +48 -0
- package/src/components/pagination/index.ts +10 -0
- package/src/components/pagination/pagination.stories.tsx +46 -0
- package/src/components/pagination/pagination.test.tsx +48 -0
- package/src/components/pagination/pagination.tsx +106 -0
- package/src/components/popover/index.ts +1 -0
- package/src/components/popover/popover.stories.tsx +106 -0
- package/src/components/popover/popover.test.tsx +111 -0
- package/src/components/popover/popover.tsx +30 -0
- package/src/components/progress/index.ts +1 -0
- package/src/components/progress/progress.stories.tsx +172 -0
- package/src/components/progress/progress.test.tsx +68 -0
- package/src/components/progress/progress.tsx +156 -0
- package/src/components/radio-group/index.ts +1 -0
- package/src/components/radio-group/radio-group.stories.tsx +125 -0
- package/src/components/radio-group/radio-group.test.tsx +160 -0
- package/src/components/radio-group/radio-group.tsx +56 -0
- package/src/components/rating/index.ts +1 -0
- package/src/components/rating/rating.stories.tsx +39 -0
- package/src/components/rating/rating.test.tsx +103 -0
- package/src/components/rating/rating.tsx +134 -0
- package/src/components/resizable/index.ts +5 -0
- package/src/components/resizable/resizable.stories.tsx +36 -0
- package/src/components/resizable/resizable.test.tsx +42 -0
- package/src/components/resizable/resizable.tsx +43 -0
- package/src/components/scroll-area/index.ts +1 -0
- package/src/components/scroll-area/scroll-area.stories.tsx +48 -0
- package/src/components/scroll-area/scroll-area.test.tsx +52 -0
- package/src/components/scroll-area/scroll-area.tsx +46 -0
- package/src/components/select/index.ts +1 -0
- package/src/components/select/select.stories.tsx +89 -0
- package/src/components/select/select.test.tsx +162 -0
- package/src/components/select/select.tsx +89 -0
- package/src/components/separator/index.ts +1 -0
- package/src/components/separator/separator.stories.tsx +68 -0
- package/src/components/separator/separator.test.tsx +35 -0
- package/src/components/separator/separator.tsx +25 -0
- package/src/components/sheet/index.ts +1 -0
- package/src/components/sheet/sheet.stories.tsx +164 -0
- package/src/components/sheet/sheet.test.tsx +187 -0
- package/src/components/sheet/sheet.tsx +119 -0
- package/src/components/sidebar/index.ts +18 -0
- package/src/components/sidebar/sidebar.stories.tsx +100 -0
- package/src/components/sidebar/sidebar.test.tsx +108 -0
- package/src/components/sidebar/sidebar.tsx +428 -0
- package/src/components/skeleton/index.ts +1 -0
- package/src/components/skeleton/skeleton.stories.tsx +51 -0
- package/src/components/skeleton/skeleton.test.tsx +41 -0
- package/src/components/skeleton/skeleton.tsx +22 -0
- package/src/components/slider/index.ts +1 -0
- package/src/components/slider/slider.stories.tsx +95 -0
- package/src/components/slider/slider.test.tsx +58 -0
- package/src/components/slider/slider.tsx +34 -0
- package/src/components/sonner/index.ts +1 -0
- package/src/components/sonner/sonner.stories.tsx +34 -0
- package/src/components/sonner/sonner.test.tsx +15 -0
- package/src/components/sonner/sonner.tsx +28 -0
- package/src/components/spinner/index.ts +1 -0
- package/src/components/spinner/spinner.stories.tsx +66 -0
- package/src/components/spinner/spinner.test.tsx +49 -0
- package/src/components/spinner/spinner.tsx +65 -0
- package/src/components/stepper/index.ts +11 -0
- package/src/components/stepper/stepper.stories.tsx +51 -0
- package/src/components/stepper/stepper.test.tsx +50 -0
- package/src/components/stepper/stepper.tsx +129 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/switch/switch.stories.tsx +81 -0
- package/src/components/switch/switch.test.tsx +81 -0
- package/src/components/switch/switch.tsx +26 -0
- package/src/components/table/index.ts +1 -0
- package/src/components/table/table.stories.tsx +100 -0
- package/src/components/table/table.test.tsx +89 -0
- package/src/components/table/table.tsx +120 -0
- package/src/components/tabs/index.ts +1 -0
- package/src/components/tabs/tabs.stories.tsx +95 -0
- package/src/components/tabs/tabs.test.tsx +175 -0
- package/src/components/tabs/tabs.tsx +58 -0
- package/src/components/textarea/index.ts +1 -0
- package/src/components/textarea/textarea.stories.tsx +103 -0
- package/src/components/textarea/textarea.test.tsx +65 -0
- package/src/components/textarea/textarea.tsx +38 -0
- package/src/components/timeline/index.ts +12 -0
- package/src/components/timeline/timeline.stories.tsx +104 -0
- package/src/components/timeline/timeline.test.tsx +39 -0
- package/src/components/timeline/timeline.tsx +135 -0
- package/src/components/toast/index.ts +1 -0
- package/src/components/toast/toast.stories.tsx +170 -0
- package/src/components/toast/toast.test.tsx +159 -0
- package/src/components/toast/toast.tsx +136 -0
- package/src/components/toggle/index.ts +1 -0
- package/src/components/toggle/toggle.stories.tsx +106 -0
- package/src/components/toggle/toggle.test.tsx +87 -0
- package/src/components/toggle/toggle.tsx +41 -0
- package/src/components/toggle-group/index.ts +1 -0
- package/src/components/toggle-group/toggle-group.stories.tsx +123 -0
- package/src/components/toggle-group/toggle-group.test.tsx +102 -0
- package/src/components/toggle-group/toggle-group.tsx +58 -0
- package/src/components/tooltip/index.ts +1 -0
- package/src/components/tooltip/tooltip.stories.tsx +82 -0
- package/src/components/tooltip/tooltip.test.tsx +103 -0
- package/src/components/tooltip/tooltip.tsx +30 -0
- package/src/components/tree-view/index.ts +8 -0
- package/src/components/tree-view/tree-view.stories.tsx +61 -0
- package/src/components/tree-view/tree-view.test.tsx +36 -0
- package/src/components/tree-view/tree-view.tsx +116 -0
- package/src/index.ts +77 -0
- package/src/lib/utils.ts +38 -0
- package/src/test/contrast.ts +139 -0
- package/src/test/palette-contract.test.ts +697 -0
- package/src/test/public-entries.test.ts +118 -0
- package/src/test/setup.ts +94 -0
- package/src/test/sidebar-contract.test.ts +196 -0
- package/src/test/type-contract.test.ts +253 -0
- package/src/test/vitest-axe.d.ts +10 -0
- package/src/typography/typography.stories.tsx +172 -0
- package/styles/compiled.css +19 -0
- package/styles/globals.css +27 -0
- package/styles/theme.css +430 -0
- package/tsconfig.json +11 -0
- package/tsdown.config.ts +34 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// Public entry map contract.
|
|
2
|
+
//
|
|
3
|
+
// Pins the data that scripts/postbuild.mjs, scripts/verify-artifacts.mjs, and
|
|
4
|
+
// the package.json `exports` map consume: every source component/block with an
|
|
5
|
+
// index.ts must have exactly one public subpath, a real source file, and a
|
|
6
|
+
// dual-format (ESM/CJS + matching declarations) output layout.
|
|
7
|
+
|
|
8
|
+
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
9
|
+
import path from "node:path";
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
11
|
+
import { describe, expect, it } from "vitest";
|
|
12
|
+
import {
|
|
13
|
+
buildExportsMap,
|
|
14
|
+
entryExtensions,
|
|
15
|
+
publicEntries,
|
|
16
|
+
styleFiles,
|
|
17
|
+
} from "../../scripts/public-entries.mjs";
|
|
18
|
+
|
|
19
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
20
|
+
const packageRoot = path.resolve(here, "../..");
|
|
21
|
+
const sourceRoot = path.join(packageRoot, "src");
|
|
22
|
+
|
|
23
|
+
function sourceEntries(group: "components" | "blocks"): string[] {
|
|
24
|
+
return readdirSync(path.join(sourceRoot, group), { withFileTypes: true })
|
|
25
|
+
.filter(
|
|
26
|
+
(entry) =>
|
|
27
|
+
entry.isDirectory() &&
|
|
28
|
+
existsSync(path.join(sourceRoot, group, entry.name, "index.ts")),
|
|
29
|
+
)
|
|
30
|
+
.map((entry) => `${group}/${entry.name}`)
|
|
31
|
+
.sort();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
describe("public entry map", () => {
|
|
35
|
+
it("lists the root barrel, every component, and every block exactly once", () => {
|
|
36
|
+
const expectedSources = [
|
|
37
|
+
"src/index.ts",
|
|
38
|
+
...sourceEntries("components").map((name) => `src/${name}/index.ts`),
|
|
39
|
+
...sourceEntries("blocks").map((name) => `src/${name}/index.ts`),
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
expect(
|
|
43
|
+
publicEntries.map((entry) => entry.source).sort(),
|
|
44
|
+
"publicEntries must mirror src/index.ts + every component/block index.ts",
|
|
45
|
+
).toEqual(expectedSources.sort());
|
|
46
|
+
|
|
47
|
+
const subpaths = publicEntries.map((entry) => entry.subpath);
|
|
48
|
+
expect(new Set(subpaths).size).toBe(subpaths.length);
|
|
49
|
+
expect(subpaths[0]).toBe(".");
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it("points every entry at a real source file", () => {
|
|
53
|
+
for (const entry of publicEntries) {
|
|
54
|
+
expect(
|
|
55
|
+
existsSync(path.join(packageRoot, entry.source)),
|
|
56
|
+
`${entry.subpath} source must exist (${entry.source})`,
|
|
57
|
+
).toBe(true);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it("re-exports every component and block from the root barrel", () => {
|
|
62
|
+
const barrel = readFileSync(path.join(sourceRoot, "index.ts"), "utf8");
|
|
63
|
+
|
|
64
|
+
for (const entry of publicEntries) {
|
|
65
|
+
if (entry.subpath === ".") continue;
|
|
66
|
+
expect(
|
|
67
|
+
barrel.includes(`export * from "./${entry.source.replace(/^src\//, "").replace(/\/index\.ts$/, "")}";`),
|
|
68
|
+
`src/index.ts must re-export ${entry.subpath}`,
|
|
69
|
+
).toBe(true);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it("declares dual-format targets with matching declaration files", () => {
|
|
74
|
+
const exportsMap = buildExportsMap() as Record<
|
|
75
|
+
string,
|
|
76
|
+
| string
|
|
77
|
+
| {
|
|
78
|
+
import?: { types?: string; default?: string };
|
|
79
|
+
require?: { types?: string; default?: string };
|
|
80
|
+
}
|
|
81
|
+
>;
|
|
82
|
+
|
|
83
|
+
for (const entry of publicEntries) {
|
|
84
|
+
const target = exportsMap[entry.subpath];
|
|
85
|
+
expect(typeof target, `${entry.subpath} must have an export target`).toBe(
|
|
86
|
+
"object",
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
const conditions = target as {
|
|
90
|
+
import: { types: string; default: string };
|
|
91
|
+
require: { types: string; default: string };
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
expect(conditions.import.default).toBe(
|
|
95
|
+
`./${entry.distBase}.${entryExtensions.esm}`,
|
|
96
|
+
);
|
|
97
|
+
expect(conditions.import.types).toBe(
|
|
98
|
+
`./${entry.distBase}.${entryExtensions.esmTypes}`,
|
|
99
|
+
);
|
|
100
|
+
expect(conditions.require.default).toBe(
|
|
101
|
+
`./${entry.distBase}.${entryExtensions.cjs}`,
|
|
102
|
+
);
|
|
103
|
+
expect(conditions.require.types).toBe(
|
|
104
|
+
`./${entry.distBase}.${entryExtensions.cjsTypes}`,
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
// `types` must precede `default` inside each condition for TypeScript to
|
|
108
|
+
// read the declaration instead of the runtime file.
|
|
109
|
+
expect(Object.keys(conditions.import)).toEqual(["types", "default"]);
|
|
110
|
+
expect(Object.keys(conditions.require)).toEqual(["types", "default"]);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
expect(exportsMap["./styles.css"]).toBe(`./${styleFiles.compiled}`);
|
|
114
|
+
expect(exportsMap["./styles/globals.css"]).toBe(`./${styleFiles.raw}`);
|
|
115
|
+
expect(exportsMap["./styles/theme.css"]).toBe(`./${styleFiles.theme}`);
|
|
116
|
+
expect(exportsMap["./package.json"]).toBe("./package.json");
|
|
117
|
+
});
|
|
118
|
+
});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import "@testing-library/jest-dom/vitest";
|
|
2
|
+
import { expect, vi, beforeEach, afterEach } from "vitest";
|
|
3
|
+
|
|
4
|
+
// Set global react act environment flag
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
globalThis.IS_REACT_ACT_ENVIRONMENT = true;
|
|
7
|
+
|
|
8
|
+
if (typeof window !== "undefined" && !window.PointerEvent) {
|
|
9
|
+
class PointerEvent extends MouseEvent {
|
|
10
|
+
public pointerId: number = 1;
|
|
11
|
+
public pointerType: string = "mouse";
|
|
12
|
+
public isPrimary: boolean = true;
|
|
13
|
+
|
|
14
|
+
constructor(type: string, props: PointerEventInit = {}) {
|
|
15
|
+
super(type, props);
|
|
16
|
+
this.pointerId = props.pointerId ?? 1;
|
|
17
|
+
this.pointerType = props.pointerType ?? "mouse";
|
|
18
|
+
this.isPrimary = props.isPrimary ?? true;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
window.PointerEvent = PointerEvent as any;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Object.defineProperty(window, "matchMedia", {
|
|
25
|
+
writable: true,
|
|
26
|
+
value: vi.fn().mockImplementation((query: string) => ({
|
|
27
|
+
matches: false,
|
|
28
|
+
media: query,
|
|
29
|
+
onchange: null,
|
|
30
|
+
addListener: vi.fn(),
|
|
31
|
+
removeListener: vi.fn(),
|
|
32
|
+
addEventListener: vi.fn(),
|
|
33
|
+
removeEventListener: vi.fn(),
|
|
34
|
+
dispatchEvent: vi.fn()
|
|
35
|
+
}))
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Polyfill ResizeObserver as a constructor for Floating UI / Base UI popups
|
|
39
|
+
class MockResizeObserver {
|
|
40
|
+
observe() {}
|
|
41
|
+
unobserve() {}
|
|
42
|
+
disconnect() {}
|
|
43
|
+
}
|
|
44
|
+
globalThis.ResizeObserver = MockResizeObserver as any;
|
|
45
|
+
|
|
46
|
+
// Polyfill IntersectionObserver for embla-carousel / jsdom
|
|
47
|
+
class MockIntersectionObserver {
|
|
48
|
+
observe() {}
|
|
49
|
+
unobserve() {}
|
|
50
|
+
disconnect() {}
|
|
51
|
+
}
|
|
52
|
+
globalThis.IntersectionObserver = MockIntersectionObserver as any;
|
|
53
|
+
|
|
54
|
+
// Polyfill HTMLElement.prototype.scrollIntoView for cmdk / jsdom
|
|
55
|
+
if (typeof window !== "undefined" && !window.HTMLElement.prototype.scrollIntoView) {
|
|
56
|
+
window.HTMLElement.prototype.scrollIntoView = vi.fn();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Polyfill document.elementFromPoint for input-otp / jsdom
|
|
60
|
+
if (typeof document !== "undefined" && !document.elementFromPoint) {
|
|
61
|
+
document.elementFromPoint = () => null;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
let consoleWarnSpy: ReturnType<typeof vi.spyOn>;
|
|
65
|
+
let consoleErrorSpy: ReturnType<typeof vi.spyOn>;
|
|
66
|
+
|
|
67
|
+
beforeEach(() => {
|
|
68
|
+
consoleWarnSpy = vi.spyOn(console, "warn").mockImplementation(() => {});
|
|
69
|
+
consoleErrorSpy = vi.spyOn(console, "error").mockImplementation((...args: any[]) => {
|
|
70
|
+
// Ignore React 19 act(...) async warnings for Base UI mount effects in jsdom
|
|
71
|
+
const msg = args.map((a) => (typeof a === "string" ? a : String(a))).join(" ");
|
|
72
|
+
if (
|
|
73
|
+
msg.includes("was not wrapped in act") ||
|
|
74
|
+
msg.includes("testing environment is not configured to support act")
|
|
75
|
+
) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
afterEach(() => {
|
|
82
|
+
const filteredErrorCalls = consoleErrorSpy.mock.calls.filter((args: any[]) => {
|
|
83
|
+
const msg = args.map((a) => (typeof a === "string" ? a : String(a))).join(" ");
|
|
84
|
+
return (
|
|
85
|
+
!msg.includes("was not wrapped in act") &&
|
|
86
|
+
!msg.includes("testing environment is not configured to support act")
|
|
87
|
+
);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
expect(consoleWarnSpy).not.toHaveBeenCalled();
|
|
91
|
+
expect(filteredErrorCalls).toHaveLength(0);
|
|
92
|
+
consoleWarnSpy.mockRestore();
|
|
93
|
+
consoleErrorSpy.mockRestore();
|
|
94
|
+
});
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// Sidebar surface + collapsed-rail contract tests — TDD layer for OpenSpec
|
|
2
|
+
// change refactor-sdd-tdd-full-coverage, task 15 (Redesign Workstream).
|
|
3
|
+
//
|
|
4
|
+
// These tests read the actual source (theme.css tokens + sidebar source)
|
|
5
|
+
// and pin the task-15 sidebar contract:
|
|
6
|
+
// - the six `--color-sidebar*` tokens exist in @theme and are overridden in
|
|
7
|
+
// the light theme block, so `bg-sidebar` / `text-sidebar-foreground` /
|
|
8
|
+
// `hover:bg-sidebar-accent` resolve in BOTH themes,
|
|
9
|
+
// - the sidebar foreground keeps the WCAG AA floor on both sidebar surfaces,
|
|
10
|
+
// - the primitive hides the label slot and centres the icon in the
|
|
11
|
+
// `collapsible=icon` rail instead of clipping text into single letters,
|
|
12
|
+
// - the default story ships a fullscreen layout with icons, real labels and
|
|
13
|
+
// a visible active state.
|
|
14
|
+
//
|
|
15
|
+
// RED state before task 15: none of the `--color-sidebar*` tokens existed in
|
|
16
|
+
// globals.css (the sidebar surface rendered transparent over the page canvas),
|
|
17
|
+
// the story had no `layout: "fullscreen"` (SidebarInset collapsed to a sliver)
|
|
18
|
+
// and the collapsed rail wrapped the brand label and clipped menu labels to single
|
|
19
|
+
// letters.
|
|
20
|
+
|
|
21
|
+
import { readFileSync } from "node:fs";
|
|
22
|
+
import path from "node:path";
|
|
23
|
+
import { fileURLToPath } from "node:url";
|
|
24
|
+
import { describe, expect, it } from "vitest";
|
|
25
|
+
import { contrastRatio, hexToRgb, type RGB } from "./contrast";
|
|
26
|
+
|
|
27
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
28
|
+
const themeCss = readFileSync(
|
|
29
|
+
path.resolve(here, "../../styles/theme.css"),
|
|
30
|
+
"utf8",
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const COMPONENT_DIR = path.resolve(here, "../components");
|
|
34
|
+
|
|
35
|
+
function readComponent(relativePath: string): string {
|
|
36
|
+
return readFileSync(path.resolve(COMPONENT_DIR, relativePath), "utf8");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const sidebarSource = readComponent("sidebar/sidebar.tsx");
|
|
40
|
+
const sidebarStories = readComponent("sidebar/sidebar.stories.tsx");
|
|
41
|
+
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
// Minimal theme.css token parser (same contract as palette/type contracts).
|
|
44
|
+
// ---------------------------------------------------------------------------
|
|
45
|
+
|
|
46
|
+
type VarMap = Record<string, string>; // token name (without --) -> raw value
|
|
47
|
+
|
|
48
|
+
const LIGHT_SELECTOR = 'html[data-theme="light"]:not(.dark)';
|
|
49
|
+
const DARK_SELECTOR = '.dark,\n html[data-theme="dark"]';
|
|
50
|
+
|
|
51
|
+
function blockSourceAfter(css: string, selector: string): string {
|
|
52
|
+
const at = css.indexOf(selector);
|
|
53
|
+
if (at === -1) return "";
|
|
54
|
+
const start = css.indexOf("{", at);
|
|
55
|
+
const end = css.indexOf("}", start);
|
|
56
|
+
return css.slice(start + 1, end);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function collectVars(css: string): VarMap {
|
|
60
|
+
const vars: VarMap = {};
|
|
61
|
+
const re = /--([a-z0-9-]+)\s*:\s*([^;]+);/g;
|
|
62
|
+
let m: RegExpExecArray | null;
|
|
63
|
+
while ((m = re.exec(css))) {
|
|
64
|
+
if (!(m[1] in vars)) vars[m[1]] = m[2].trim();
|
|
65
|
+
}
|
|
66
|
+
return vars;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const baseVars = collectVars(themeCss);
|
|
70
|
+
const lightVars = { ...baseVars, ...collectVars(blockSourceAfter(themeCss, LIGHT_SELECTOR)) };
|
|
71
|
+
const darkVars = { ...baseVars, ...collectVars(blockSourceAfter(themeCss, DARK_SELECTOR)) };
|
|
72
|
+
|
|
73
|
+
/** Resolve a token through up to two `var(--x)` indirections. */
|
|
74
|
+
function resolveVar(scoped: VarMap, name: string): string | undefined {
|
|
75
|
+
let value = scoped[name] ?? baseVars[name];
|
|
76
|
+
for (let hop = 0; hop < 2 && value; hop++) {
|
|
77
|
+
const ref = value.match(/^var\(--([a-z0-9-]+)\)$/);
|
|
78
|
+
if (!ref) break;
|
|
79
|
+
value = scoped[ref[1]] ?? baseVars[ref[1]];
|
|
80
|
+
}
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function resolveColor(name: string, theme: "light" | "dark"): RGB {
|
|
85
|
+
const scoped = theme === "light" ? lightVars : darkVars;
|
|
86
|
+
const value = resolveVar(scoped, name);
|
|
87
|
+
if (!value) throw new Error(`Token --${name} not found in theme.css`);
|
|
88
|
+
const hex = value.match(/^#([0-9a-fA-F]{3,8})$/);
|
|
89
|
+
if (!hex) throw new Error(`--${name} must resolve to a hex color, got "${value}"`);
|
|
90
|
+
return hexToRgb(value);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const SIDEBAR_TOKENS = [
|
|
94
|
+
"color-sidebar",
|
|
95
|
+
"color-sidebar-foreground",
|
|
96
|
+
"color-sidebar-border",
|
|
97
|
+
"color-sidebar-ring",
|
|
98
|
+
"color-sidebar-accent",
|
|
99
|
+
"color-sidebar-accent-foreground",
|
|
100
|
+
] as const;
|
|
101
|
+
|
|
102
|
+
describe("Sidebar surface tokens (task 15)", () => {
|
|
103
|
+
it("declares all six --color-sidebar* tokens in the @theme block", () => {
|
|
104
|
+
for (const token of SIDEBAR_TOKENS) {
|
|
105
|
+
expect(
|
|
106
|
+
darkVars[token],
|
|
107
|
+
`--${token} must be declared in packages/ui/styles/theme.css @theme so bg-sidebar / text-sidebar-foreground resolve`,
|
|
108
|
+
).toBeTruthy();
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it("overrides the sidebar surface tokens in the light theme block", () => {
|
|
113
|
+
for (const token of SIDEBAR_TOKENS) {
|
|
114
|
+
expect(
|
|
115
|
+
lightVars[token],
|
|
116
|
+
`--${token} must be overridden in ${LIGHT_SELECTOR}`,
|
|
117
|
+
).toBeTruthy();
|
|
118
|
+
}
|
|
119
|
+
expect(
|
|
120
|
+
resolveVar(lightVars, "color-sidebar"),
|
|
121
|
+
"the light sidebar surface must differ from the dark carbon surface",
|
|
122
|
+
).not.toBe(resolveVar(darkVars, "color-sidebar"));
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it("keeps the sidebar foreground >= 4.5:1 on the sidebar surface in both themes", () => {
|
|
126
|
+
for (const theme of ["dark", "light"] as const) {
|
|
127
|
+
const surface = resolveColor("color-sidebar", theme);
|
|
128
|
+
const foreground = resolveColor("color-sidebar-foreground", theme);
|
|
129
|
+
const ratio = contrastRatio(foreground, surface);
|
|
130
|
+
expect(
|
|
131
|
+
ratio,
|
|
132
|
+
`[${theme}] sidebar foreground on sidebar surface measured ${ratio.toFixed(2)}:1`,
|
|
133
|
+
).toBeGreaterThanOrEqual(4.5);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
it("routes the primitive through token utilities instead of dead hsl(var(--sidebar-*)) references", () => {
|
|
138
|
+
expect(sidebarSource).toContain("bg-sidebar");
|
|
139
|
+
expect(sidebarSource).toContain("text-sidebar-foreground");
|
|
140
|
+
expect(sidebarSource).toContain("hover:bg-sidebar-accent");
|
|
141
|
+
expect(sidebarSource).toContain("border-sidebar-border");
|
|
142
|
+
expect(
|
|
143
|
+
sidebarSource.match(/hsl\(var\(--sidebar/g) ?? [],
|
|
144
|
+
"hsl(var(--sidebar-*)) never resolves — use the --color-sidebar-* tokens directly",
|
|
145
|
+
).toEqual([]);
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
describe("Sidebar collapsed rail (task 15)", () => {
|
|
150
|
+
it("collapses the icon rail to a centred 2rem button and hides the label slot", () => {
|
|
151
|
+
expect(
|
|
152
|
+
sidebarSource,
|
|
153
|
+
"menu buttons must shrink to a centred icon square when collapsible=icon",
|
|
154
|
+
).toContain("group-data-[collapsible=icon]:size-8");
|
|
155
|
+
expect(
|
|
156
|
+
sidebarSource,
|
|
157
|
+
"menu buttons must centre their icon when collapsible=icon",
|
|
158
|
+
).toContain("group-data-[collapsible=icon]:justify-center");
|
|
159
|
+
expect(
|
|
160
|
+
sidebarSource,
|
|
161
|
+
"the trailing label span must be hidden when collapsible=icon (no single-letter clipping)",
|
|
162
|
+
).toMatch(/group-data-\[collapsible=icon\]:\[&>span:last-child\]:hidden/);
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
it("removes the group padding in the collapsed rail so the icon square fits", () => {
|
|
166
|
+
expect(sidebarSource).toContain(
|
|
167
|
+
"group-data-[collapsible=icon]:p-0",
|
|
168
|
+
);
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
describe("Sidebar default story (task 15)", () => {
|
|
173
|
+
it("renders fullscreen in both themes", () => {
|
|
174
|
+
expect(sidebarStories).toContain('layout: "fullscreen"');
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
it("uses real lucide icons and keeps Usalyt demo content", () => {
|
|
178
|
+
expect(sidebarStories).toContain('from "lucide-react"');
|
|
179
|
+
expect(sidebarStories).toContain("Usalyt");
|
|
180
|
+
expect(sidebarStories).not.toContain("UX Check");
|
|
181
|
+
expect(sidebarStories).toContain("Evaluations");
|
|
182
|
+
expect(sidebarStories).toContain("v1.0.0");
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
it("shows one active item and names the icon-only buttons when collapsed", () => {
|
|
186
|
+
expect(sidebarStories).toContain("isActive");
|
|
187
|
+
expect(
|
|
188
|
+
sidebarStories.match(/aria-label=/g)?.length ?? 0,
|
|
189
|
+
"collapsed rail buttons need accessible names (aria-label)",
|
|
190
|
+
).toBeGreaterThanOrEqual(2);
|
|
191
|
+
expect(
|
|
192
|
+
sidebarStories,
|
|
193
|
+
"collapsed rail labels must hide cleanly through the group-data contract",
|
|
194
|
+
).toContain("group-data-[collapsible=icon]:hidden");
|
|
195
|
+
});
|
|
196
|
+
});
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
// Type contract tests — TDD layer for OpenSpec change
|
|
2
|
+
// refactor-sdd-tdd-full-coverage, task 12 (Batch 3).
|
|
3
|
+
//
|
|
4
|
+
// These tests read the actual source (theme.css + package.json) and pin the
|
|
5
|
+
// DESIGN.md "Tokens — Typography" contract:
|
|
6
|
+
// - every type-scale token declared with its size / line-height /
|
|
7
|
+
// letter-spacing values,
|
|
8
|
+
// - the 300 / 400 / 510 / 590 weight vocabulary as aliases,
|
|
9
|
+
// - a REAL loading mechanism for Inter Variable (fontsource import +
|
|
10
|
+
// dependency), so consumers never silently receive system fallbacks,
|
|
11
|
+
// - the Berkeley Mono substitution contract (local() first, JetBrains Mono
|
|
12
|
+
// then ui-monospace, never bundled) documented in a CSS comment,
|
|
13
|
+
// - the OpenType feature signature (cv01 / ss03 / zero) applied to the sans
|
|
14
|
+
// stack.
|
|
15
|
+
//
|
|
16
|
+
// RED state (documented in the 2026-09-24 critique, Priority Issue 5):
|
|
17
|
+
// `--text-caption` / `--text-body-sm` etc. do not exist, "Inter Variable" is
|
|
18
|
+
// referenced by name only with no loader, and Berkeley Mono has no declared
|
|
19
|
+
// source at all.
|
|
20
|
+
|
|
21
|
+
import { readFileSync } from "node:fs";
|
|
22
|
+
import path from "node:path";
|
|
23
|
+
import { fileURLToPath } from "node:url";
|
|
24
|
+
import { describe, expect, it } from "vitest";
|
|
25
|
+
|
|
26
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
27
|
+
const themeCss = readFileSync(
|
|
28
|
+
path.resolve(here, "../../styles/theme.css"),
|
|
29
|
+
"utf8",
|
|
30
|
+
);
|
|
31
|
+
const globalsCss = readFileSync(
|
|
32
|
+
path.resolve(here, "../../styles/globals.css"),
|
|
33
|
+
"utf8",
|
|
34
|
+
);
|
|
35
|
+
const packageJson = readFileSync(
|
|
36
|
+
path.resolve(here, "../../package.json"),
|
|
37
|
+
"utf8",
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
// Minimal theme.css token parser (same contract as palette-contract).
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
|
|
44
|
+
type VarMap = Record<string, string>; // token name (without --) -> raw value
|
|
45
|
+
|
|
46
|
+
function collectVars(css: string): VarMap {
|
|
47
|
+
const vars: VarMap = {};
|
|
48
|
+
const re = /--([a-z0-9-]+)\s*:\s*([^;]+);/g;
|
|
49
|
+
let m: RegExpExecArray | null;
|
|
50
|
+
while ((m = re.exec(css))) {
|
|
51
|
+
if (!(m[1] in vars)) vars[m[1]] = m[2].trim();
|
|
52
|
+
}
|
|
53
|
+
return vars;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Resolve a token value through at most one `var(--x)` indirection. */
|
|
57
|
+
function resolveValue(vars: VarMap, name: string): string {
|
|
58
|
+
const raw = vars[name];
|
|
59
|
+
if (raw === undefined) {
|
|
60
|
+
throw new Error(`Token --${name} not found in theme.css`);
|
|
61
|
+
}
|
|
62
|
+
const ref = raw.match(/^var\(--([a-z0-9-]+)\)$/);
|
|
63
|
+
return ref ? vars[ref[1]] ?? "" : raw;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const vars = collectVars(themeCss);
|
|
67
|
+
|
|
68
|
+
// ---------------------------------------------------------------------------
|
|
69
|
+
// (a) Type scale — every DESIGN.md token declared with exact metrics.
|
|
70
|
+
// Values come from DESIGN.md "Type Scale" and "Type Scale Detail"
|
|
71
|
+
// (micro/label leadings; caption has no tracking by contract).
|
|
72
|
+
// ---------------------------------------------------------------------------
|
|
73
|
+
|
|
74
|
+
const TYPE_SCALE: Record<
|
|
75
|
+
string,
|
|
76
|
+
{ size: string; lineHeight: string; letterSpacing: string | null }
|
|
77
|
+
> = {
|
|
78
|
+
micro: { size: "10px", lineHeight: "1.5", letterSpacing: null },
|
|
79
|
+
label: { size: "12px", lineHeight: "1.4", letterSpacing: null },
|
|
80
|
+
caption: { size: "13px", lineHeight: "1.2", letterSpacing: null },
|
|
81
|
+
"body-sm": { size: "15px", lineHeight: "1.6", letterSpacing: "-0.165px" },
|
|
82
|
+
"body-lg": { size: "20px", lineHeight: "1.33", letterSpacing: "-0.24px" },
|
|
83
|
+
subheading: { size: "24px", lineHeight: "1.33", letterSpacing: "-0.288px" },
|
|
84
|
+
"heading-sm": { size: "32px", lineHeight: "1.13", letterSpacing: "-0.704px" },
|
|
85
|
+
heading: { size: "48px", lineHeight: "1", letterSpacing: "-1.056px" },
|
|
86
|
+
"heading-lg": { size: "64px", lineHeight: "1", letterSpacing: "-1.408px" },
|
|
87
|
+
display: { size: "72px", lineHeight: "1", letterSpacing: "-1.584px" },
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
describe("Type scale tokens (task 12)", () => {
|
|
91
|
+
it("declares every DESIGN.md type-scale token with its exact size", () => {
|
|
92
|
+
for (const [name, spec] of Object.entries(TYPE_SCALE)) {
|
|
93
|
+
expect(
|
|
94
|
+
vars[`text-${name}`],
|
|
95
|
+
`--text-${name} must be declared in packages/ui/styles/theme.css @theme`,
|
|
96
|
+
).toBe(spec.size);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
it("declares per-size line-height (sub-key) and the granular --leading-* token with the same value", () => {
|
|
101
|
+
for (const [name, spec] of Object.entries(TYPE_SCALE)) {
|
|
102
|
+
const subKey = resolveValue(vars, `text-${name}--line-height`);
|
|
103
|
+
expect(
|
|
104
|
+
subKey,
|
|
105
|
+
`--text-${name}--line-height must exist and resolve to ${spec.lineHeight}`,
|
|
106
|
+
).toBe(spec.lineHeight);
|
|
107
|
+
expect(
|
|
108
|
+
vars[`leading-${name}`],
|
|
109
|
+
`--leading-${name} must exist for the granular leading utility`,
|
|
110
|
+
).toBe(spec.lineHeight);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
it("declares optical letter-spacing per size (and none for micro/label/caption)", () => {
|
|
115
|
+
for (const [name, spec] of Object.entries(TYPE_SCALE)) {
|
|
116
|
+
if (spec.letterSpacing === null) {
|
|
117
|
+
expect(
|
|
118
|
+
vars[`text-${name}--letter-spacing`],
|
|
119
|
+
`--text-${name}--letter-spacing must NOT exist: ${name} ships default tracking per DESIGN.md`,
|
|
120
|
+
).toBeUndefined();
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
expect(
|
|
124
|
+
resolveValue(vars, `text-${name}--letter-spacing`),
|
|
125
|
+
`--text-${name}--letter-spacing must resolve to ${spec.letterSpacing}`,
|
|
126
|
+
).toBe(spec.letterSpacing);
|
|
127
|
+
expect(
|
|
128
|
+
vars[`tracking-${name}`],
|
|
129
|
+
`--tracking-${name} must exist for the granular tracking utility`,
|
|
130
|
+
).toBe(spec.letterSpacing);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// ---------------------------------------------------------------------------
|
|
136
|
+
// (b) Weight aliases — the Linear precision vocabulary (300 / 400 / 510 / 590).
|
|
137
|
+
// ---------------------------------------------------------------------------
|
|
138
|
+
|
|
139
|
+
describe("Font weight aliases (task 12)", () => {
|
|
140
|
+
it("declares light / regular / w510 / w590 aliases", () => {
|
|
141
|
+
expect(vars["font-weight-light"]).toBe("300");
|
|
142
|
+
expect(vars["font-weight-regular"]).toBe("400");
|
|
143
|
+
expect(vars["font-weight-w510"]).toBe("510");
|
|
144
|
+
expect(vars["font-weight-w590"]).toBe("590");
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
// ---------------------------------------------------------------------------
|
|
149
|
+
// (c) Font loading — Inter Variable must have a REAL loading mechanism.
|
|
150
|
+
// A bare `"Inter Variable"` name with no @font-face source silently falls
|
|
151
|
+
// back to system-ui (the critique's Priority Issue 5). The contract is: the
|
|
152
|
+
// @fontsource-variable/inter CSS is imported in globals.css AND shipped as a
|
|
153
|
+
// runtime dependency, so any consumer importing @usalyt/ui/styles.css resolves the
|
|
154
|
+
// actual variable font.
|
|
155
|
+
// ---------------------------------------------------------------------------
|
|
156
|
+
|
|
157
|
+
describe("Inter Variable loading (task 12)", () => {
|
|
158
|
+
it("imports the @fontsource-variable/inter CSS in globals.css", () => {
|
|
159
|
+
expect(
|
|
160
|
+
/@import\s+"@fontsource-variable\/inter"/.test(globalsCss),
|
|
161
|
+
'globals.css must import "@fontsource-variable/inter" so "Inter Variable" resolves for consumers',
|
|
162
|
+
).toBe(true);
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
it("ships @fontsource-variable/inter as a runtime dependency", () => {
|
|
166
|
+
const pkg = JSON.parse(packageJson) as { dependencies?: Record<string, string> };
|
|
167
|
+
expect(
|
|
168
|
+
pkg.dependencies?.["@fontsource-variable/inter"],
|
|
169
|
+
"@fontsource-variable/inter must be a dependency of @usalyt/ui (not dev-only) so the import resolves in consumer apps",
|
|
170
|
+
).toBeTruthy();
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
it("references the Inter Variable family in the sans stacks", () => {
|
|
174
|
+
for (const stack of ["font-sans", "font-inter-variable"]) {
|
|
175
|
+
expect(
|
|
176
|
+
vars[stack],
|
|
177
|
+
`--${stack} must keep "Inter Variable" as its first family`,
|
|
178
|
+
).toMatch(/^"Inter Variable"/);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
// ---------------------------------------------------------------------------
|
|
184
|
+
// (d) Berkeley Mono substitution contract — commercial face, never bundled.
|
|
185
|
+
// ---------------------------------------------------------------------------
|
|
186
|
+
|
|
187
|
+
function berkeleyMonoFontFace(css: string): string {
|
|
188
|
+
const at = css.indexOf('@font-face');
|
|
189
|
+
expect(at, 'theme.css must declare an @font-face for Berkeley Mono').toBeGreaterThanOrEqual(0);
|
|
190
|
+
const start = css.indexOf("{", at);
|
|
191
|
+
const end = css.indexOf("}", start);
|
|
192
|
+
return css.slice(start + 1, end);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
describe("Berkeley Mono substitution contract (task 12)", () => {
|
|
196
|
+
it("declares Berkeley Mono with local() as the first source and never bundles a file", () => {
|
|
197
|
+
const face = berkeleyMonoFontFace(themeCss);
|
|
198
|
+
expect(face).toContain('font-family: "Berkeley Mono"');
|
|
199
|
+
const localAt = face.indexOf('local("Berkeley Mono")');
|
|
200
|
+
expect(
|
|
201
|
+
localAt,
|
|
202
|
+
'the Berkeley Mono @font-face must start from local("Berkeley Mono")',
|
|
203
|
+
).toBeGreaterThanOrEqual(0);
|
|
204
|
+
expect(
|
|
205
|
+
face.indexOf("url("),
|
|
206
|
+
"Berkeley Mono is commercial — the @font-face must not bundle a url() source",
|
|
207
|
+
).toBe(-1);
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
it("falls back to JetBrains Mono then ui-monospace in the mono stacks", () => {
|
|
211
|
+
for (const stack of ["font-mono", "font-berkeley-mono"]) {
|
|
212
|
+
const value = vars[stack];
|
|
213
|
+
expect(value, `--${stack} must keep "Berkeley Mono" first`).toMatch(
|
|
214
|
+
/^"Berkeley Mono"/,
|
|
215
|
+
);
|
|
216
|
+
expect(
|
|
217
|
+
value.indexOf('"JetBrains Mono"'),
|
|
218
|
+
`--${stack} must list "JetBrains Mono" right after Berkeley Mono`,
|
|
219
|
+
).toBeGreaterThan(-1);
|
|
220
|
+
expect(
|
|
221
|
+
value.indexOf("ui-monospace"),
|
|
222
|
+
`--${stack} must keep ui-monospace after JetBrains Mono`,
|
|
223
|
+
).toBeGreaterThan(value.indexOf('"JetBrains Mono"'));
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
it("documents the substitution contract in a CSS comment", () => {
|
|
228
|
+
const comments = themeCss.match(/\/\*[\s\S]*?\*\//g) ?? [];
|
|
229
|
+
expect(
|
|
230
|
+
comments.some((c) =>
|
|
231
|
+
/Berkeley Mono/.test(c) && /JetBrains Mono/.test(c) && /never bundled|not bundled/.test(c),
|
|
232
|
+
),
|
|
233
|
+
"theme.css must carry a comment documenting the Berkeley Mono → JetBrains Mono → ui-monospace substitution contract",
|
|
234
|
+
).toBe(true);
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
// ---------------------------------------------------------------------------
|
|
239
|
+
// OpenType feature signature — cv01 / ss03 / zero applied to the sans stack.
|
|
240
|
+
// ---------------------------------------------------------------------------
|
|
241
|
+
|
|
242
|
+
describe("OpenType features (task 12)", () => {
|
|
243
|
+
it("applies cv01 / ss03 / zero to the Inter Variable sans stack", () => {
|
|
244
|
+
const bodyRule = globalsCss.match(/body\s*{[^}]*}/)?.[0] ?? "";
|
|
245
|
+
expect(bodyRule, "the base body rule must set font-family: var(--font-sans)").toContain(
|
|
246
|
+
"font-family: var(--font-sans)",
|
|
247
|
+
);
|
|
248
|
+
expect(
|
|
249
|
+
bodyRule,
|
|
250
|
+
'the base body rule must apply font-feature-settings "cv01", "ss03", "zero"',
|
|
251
|
+
).toMatch(/font-feature-settings:\s*"cv01"[\s\S]*"ss03"[\s\S]*"zero"/);
|
|
252
|
+
});
|
|
253
|
+
});
|