@usalyt/ui 0.0.1 → 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 +19 -0
- package/LICENSE +21 -674
- package/NOTICE +7 -8
- package/README.md +6 -7
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/{app-shell-layout-S_85mtFG.cjs → app-shell-layout-BwhU0DNY.cjs} +8 -8
- package/dist/{app-shell-layout-C63PPxCb.mjs → app-shell-layout-Dpl6jPni.mjs} +9 -9
- package/dist/app-shell-layout-Dpl6jPni.mjs.map +1 -0
- package/dist/blocks/app-shell-layout/index.cjs +1 -1
- package/dist/blocks/app-shell-layout/index.mjs +1 -1
- package/dist/blocks/auth-form/index.cjs +4 -4
- package/dist/blocks/auth-form/index.mjs +4 -4
- package/dist/blocks/auth-form/index.mjs.map +1 -1
- package/dist/blocks/collaboration-chat-panel/index.cjs +1 -1
- package/dist/blocks/collaboration-chat-panel/index.mjs +1 -1
- 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 +1 -1
- package/dist/blocks/dashboard-header/index.mjs +1 -1
- package/dist/blocks/dashboard-header/index.mjs.map +1 -1
- package/dist/blocks/data-table-with-filters/index.cjs +4 -3
- package/dist/blocks/data-table-with-filters/index.d.cts.map +1 -1
- package/dist/blocks/data-table-with-filters/index.d.mts.map +1 -1
- package/dist/blocks/data-table-with-filters/index.mjs +4 -3
- package/dist/blocks/data-table-with-filters/index.mjs.map +1 -1
- package/dist/blocks/empty-state-block/index.cjs +1 -1
- package/dist/blocks/empty-state-block/index.mjs +1 -1
- package/dist/blocks/evaluation-summary-report/index.cjs +1 -1
- package/dist/blocks/evaluation-summary-report/index.mjs +1 -1
- package/dist/blocks/form-with-validation/index.cjs +57 -54
- package/dist/blocks/form-with-validation/index.d.cts +2 -2
- package/dist/blocks/form-with-validation/index.d.mts +2 -2
- package/dist/blocks/form-with-validation/index.mjs +57 -54
- package/dist/blocks/form-with-validation/index.mjs.map +1 -1
- package/dist/blocks/heuristic-finding-card/index.cjs +1 -1
- package/dist/blocks/heuristic-finding-card/index.mjs +1 -1
- package/dist/blocks/inspector-split-view/index.cjs +1 -1
- package/dist/blocks/inspector-split-view/index.mjs +1 -1
- 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 +1 -1
- package/dist/blocks/project-kanban-board/index.mjs +1 -1
- 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 +11 -10
- package/dist/blocks/stats-card-grid/index.d.cts +2 -0
- package/dist/blocks/stats-card-grid/index.d.cts.map +1 -1
- package/dist/blocks/stats-card-grid/index.d.mts +2 -0
- package/dist/blocks/stats-card-grid/index.d.mts.map +1 -1
- package/dist/blocks/stats-card-grid/index.mjs +11 -10
- package/dist/blocks/stats-card-grid/index.mjs.map +1 -1
- package/dist/blocks/team-members-table/index.cjs +1 -1
- package/dist/blocks/team-members-table/index.mjs +1 -1
- package/dist/{collaboration-chat-panel-DuIoQQ6W.mjs → collaboration-chat-panel-BO-k0fqo.mjs} +10 -10
- package/dist/collaboration-chat-panel-BO-k0fqo.mjs.map +1 -0
- package/dist/{collaboration-chat-panel-D-o2i4-Y.cjs → collaboration-chat-panel-CR14FNw6.cjs} +9 -9
- package/dist/components/accordion/index.cjs +2 -2
- package/dist/components/accordion/index.mjs +2 -2
- package/dist/components/accordion/index.mjs.map +1 -1
- package/dist/components/alert/index.cjs +8 -4
- package/dist/components/alert/index.d.cts +4 -4
- package/dist/components/alert/index.d.cts.map +1 -1
- package/dist/components/alert/index.d.mts +4 -4
- package/dist/components/alert/index.d.mts.map +1 -1
- package/dist/components/alert/index.mjs +8 -4
- package/dist/components/alert/index.mjs.map +1 -1
- package/dist/components/alert-dialog/index.cjs +2 -2
- package/dist/components/alert-dialog/index.mjs +2 -2
- package/dist/components/alert-dialog/index.mjs.map +1 -1
- package/dist/components/avatar/index.cjs +1 -1
- package/dist/components/avatar/index.mjs +1 -1
- package/dist/components/avatar/index.mjs.map +1 -1
- package/dist/components/badge/index.cjs +3 -1
- package/dist/components/badge/index.d.cts +1 -1
- package/dist/components/badge/index.d.cts.map +1 -1
- package/dist/components/badge/index.d.mts +1 -1
- package/dist/components/badge/index.d.mts.map +1 -1
- package/dist/components/badge/index.mjs +3 -1
- package/dist/components/badge/index.mjs.map +1 -1
- package/dist/components/button/index.cjs +50 -15
- package/dist/components/button/index.d.cts +1 -1
- package/dist/components/button/index.d.mts +1 -1
- package/dist/components/button/index.mjs +50 -15
- package/dist/components/button/index.mjs.map +1 -1
- package/dist/components/calendar/index.cjs +5 -5
- package/dist/components/calendar/index.mjs +5 -5
- package/dist/components/calendar/index.mjs.map +1 -1
- package/dist/components/card/index.cjs +9 -7
- package/dist/components/card/index.d.cts +1 -1
- package/dist/components/card/index.d.cts.map +1 -1
- package/dist/components/card/index.d.mts +1 -1
- package/dist/components/card/index.d.mts.map +1 -1
- package/dist/components/card/index.mjs +9 -7
- package/dist/components/card/index.mjs.map +1 -1
- package/dist/components/carousel/index.d.cts +1 -1
- package/dist/components/carousel/index.d.mts +1 -1
- package/dist/components/chart/index.cjs +1 -1
- package/dist/components/chart/index.mjs +1 -1
- package/dist/components/chart/index.mjs.map +1 -1
- package/dist/components/combobox/index.cjs +1 -1
- package/dist/components/combobox/index.mjs +1 -1
- package/dist/components/combobox/index.mjs.map +1 -1
- package/dist/components/command/index.d.cts +11 -11
- package/dist/components/command/index.d.cts.map +1 -1
- package/dist/components/command/index.d.mts +11 -11
- package/dist/components/command/index.d.mts.map +1 -1
- package/dist/components/context-menu/index.cjs +2 -2
- package/dist/components/context-menu/index.mjs +2 -2
- package/dist/components/context-menu/index.mjs.map +1 -1
- package/dist/components/copy-button/index.d.cts +1 -1
- package/dist/components/copy-button/index.d.mts +1 -1
- package/dist/components/data-table/index.cjs +1 -1
- package/dist/components/data-table/index.mjs +1 -1
- package/dist/components/data-table/index.mjs.map +1 -1
- package/dist/components/dialog/index.cjs +8 -7
- package/dist/components/dialog/index.d.cts +3 -1
- package/dist/components/dialog/index.d.cts.map +1 -1
- package/dist/components/dialog/index.d.mts +3 -1
- package/dist/components/dialog/index.d.mts.map +1 -1
- package/dist/components/dialog/index.mjs +8 -7
- package/dist/components/dialog/index.mjs.map +1 -1
- package/dist/components/drawer/index.cjs +5 -3
- package/dist/components/drawer/index.d.cts.map +1 -1
- package/dist/components/drawer/index.d.mts.map +1 -1
- package/dist/components/drawer/index.mjs +5 -3
- package/dist/components/drawer/index.mjs.map +1 -1
- package/dist/components/dropdown-menu/index.cjs +3 -3
- package/dist/components/dropdown-menu/index.mjs +3 -3
- package/dist/components/dropdown-menu/index.mjs.map +1 -1
- package/dist/components/file-input/index.cjs +1 -1
- package/dist/components/file-input/index.mjs +1 -1
- package/dist/components/file-input/index.mjs.map +1 -1
- package/dist/components/hover-card/index.cjs +1 -1
- package/dist/components/hover-card/index.d.cts +1 -1
- package/dist/components/hover-card/index.d.mts +1 -1
- package/dist/components/hover-card/index.mjs +1 -1
- package/dist/components/hover-card/index.mjs.map +1 -1
- package/dist/components/input/index.cjs +5 -4
- package/dist/components/input/index.mjs +5 -4
- package/dist/components/input/index.mjs.map +1 -1
- package/dist/components/input-otp/index.cjs +1 -1
- package/dist/components/input-otp/index.d.cts +1 -1
- package/dist/components/input-otp/index.d.mts +1 -1
- package/dist/components/input-otp/index.mjs +1 -1
- package/dist/components/navigation-menu/index.cjs +2 -2
- package/dist/components/navigation-menu/index.d.cts +1 -1
- package/dist/components/navigation-menu/index.d.mts +1 -1
- package/dist/components/navigation-menu/index.mjs +2 -2
- package/dist/components/navigation-menu/index.mjs.map +1 -1
- package/dist/components/number-field/index.cjs +1 -1
- package/dist/components/number-field/index.mjs +1 -1
- package/dist/components/number-field/index.mjs.map +1 -1
- package/dist/components/pagination/index.d.cts +1 -1
- package/dist/components/pagination/index.d.mts +1 -1
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.mjs +1 -1
- package/dist/components/popover/index.mjs.map +1 -1
- package/dist/components/progress/index.cjs +63 -15
- package/dist/components/progress/index.d.cts +3 -1
- package/dist/components/progress/index.d.cts.map +1 -1
- package/dist/components/progress/index.d.mts +3 -1
- package/dist/components/progress/index.d.mts.map +1 -1
- package/dist/components/progress/index.mjs +63 -15
- package/dist/components/progress/index.mjs.map +1 -1
- package/dist/components/resizable/index.d.cts +1 -1
- package/dist/components/resizable/index.d.mts +1 -1
- package/dist/components/select/index.cjs +5 -4
- package/dist/components/select/index.d.cts.map +1 -1
- package/dist/components/select/index.d.mts.map +1 -1
- package/dist/components/select/index.mjs +5 -4
- package/dist/components/select/index.mjs.map +1 -1
- package/dist/components/separator/index.cjs +1 -1
- package/dist/components/separator/index.mjs +1 -1
- package/dist/components/separator/index.mjs.map +1 -1
- package/dist/components/sheet/index.cjs +8 -6
- package/dist/components/sheet/index.d.cts +3 -1
- package/dist/components/sheet/index.d.cts.map +1 -1
- package/dist/components/sheet/index.d.mts +3 -1
- package/dist/components/sheet/index.d.mts.map +1 -1
- package/dist/components/sheet/index.mjs +8 -6
- package/dist/components/sheet/index.mjs.map +1 -1
- package/dist/components/sidebar/index.d.cts +1 -1
- package/dist/components/sidebar/index.d.mts +1 -1
- package/dist/components/spinner/index.d.cts +1 -1
- package/dist/components/spinner/index.d.mts +1 -1
- package/dist/components/stepper/index.d.cts +1 -1
- package/dist/components/stepper/index.d.mts +1 -1
- package/dist/components/switch/index.cjs +1 -1
- package/dist/components/switch/index.mjs +1 -1
- package/dist/components/switch/index.mjs.map +1 -1
- package/dist/components/table/index.cjs +2 -2
- package/dist/components/table/index.mjs +2 -2
- package/dist/components/table/index.mjs.map +1 -1
- package/dist/components/tabs/index.cjs +6 -3
- package/dist/components/tabs/index.d.cts.map +1 -1
- package/dist/components/tabs/index.d.mts.map +1 -1
- package/dist/components/tabs/index.mjs +6 -3
- package/dist/components/tabs/index.mjs.map +1 -1
- package/dist/components/textarea/index.cjs +1 -1
- package/dist/components/textarea/index.mjs +1 -1
- package/dist/components/textarea/index.mjs.map +1 -1
- package/dist/components/toast/index.cjs +8 -7
- package/dist/components/toast/index.d.cts +3 -1
- package/dist/components/toast/index.d.cts.map +1 -1
- package/dist/components/toast/index.d.mts +3 -1
- package/dist/components/toast/index.d.mts.map +1 -1
- package/dist/components/toast/index.mjs +8 -7
- package/dist/components/toast/index.mjs.map +1 -1
- package/dist/components/toggle/index.cjs +1 -1
- package/dist/components/toggle/index.mjs +1 -1
- package/dist/components/toggle-group/index.cjs +1 -1
- package/dist/components/toggle-group/index.mjs +1 -1
- package/dist/{empty-state-block-DePTPvzM.mjs → empty-state-block-DlccTgvo.mjs} +8 -7
- package/dist/empty-state-block-DlccTgvo.mjs.map +1 -0
- package/dist/{empty-state-block-CW1vdx89.cjs → empty-state-block-rrYF_ai9.cjs} +7 -6
- 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/{heuristic-finding-card-B5zpJp27.cjs → heuristic-finding-card-CeJzuzuN.cjs} +63 -40
- package/dist/{heuristic-finding-card-BFwXci2U.mjs → heuristic-finding-card-hlDwM_of.mjs} +64 -41
- package/dist/heuristic-finding-card-hlDwM_of.mjs.map +1 -0
- package/dist/{index-ClitDRHg.d.mts → index-2Vh9mMtN.d.mts} +2 -2
- package/dist/{index-ClitDRHg.d.mts.map → index-2Vh9mMtN.d.mts.map} +1 -1
- package/dist/index-B6epY4xT.d.cts +18 -0
- package/dist/index-B6epY4xT.d.cts.map +1 -0
- package/dist/index-B8Z5coVq.d.cts.map +1 -1
- package/dist/index-B8Z5coVq.d.mts.map +1 -1
- package/dist/{index-DCrV07Ko.d.cts → index-B_JrTcxF.d.cts} +2 -2
- package/dist/{index-DCrV07Ko.d.cts.map → index-B_JrTcxF.d.cts.map} +1 -1
- package/dist/index-C3V4MOJH.d.mts +18 -0
- package/dist/index-C3V4MOJH.d.mts.map +1 -0
- package/dist/{index-N-mHPudY.d.mts → index-C3ol_8Kk.d.cts} +2 -2
- package/dist/{index-DISRvpYF.d.cts.map → index-C3ol_8Kk.d.cts.map} +1 -1
- package/dist/{index-BfHoUosL.d.cts → index-C5ugjRen.d.cts} +2 -2
- package/dist/{index-BfHoUosL.d.cts.map → index-C5ugjRen.d.cts.map} +1 -1
- package/dist/{index-BfHoUosL.d.mts → index-C5ugjRen.d.mts} +2 -2
- package/dist/{index-BfHoUosL.d.mts.map → index-C5ugjRen.d.mts.map} +1 -1
- package/dist/{index-bO8Bd2qN.d.cts → index-CI5EwPm7.d.cts} +3 -3
- package/dist/{index-bO8Bd2qN.d.cts.map → index-CI5EwPm7.d.cts.map} +1 -1
- package/dist/{index-bO8Bd2qN.d.mts → index-CI5EwPm7.d.mts} +3 -3
- package/dist/{index-bO8Bd2qN.d.mts.map → index-CI5EwPm7.d.mts.map} +1 -1
- package/dist/{index-CxCGf9_1.d.mts → index-CU-siW-K.d.mts} +2 -2
- package/dist/{index-CTCm9Rd3.d.cts.map → index-CU-siW-K.d.mts.map} +1 -1
- package/dist/index-CsF26Fe8.d.cts.map +1 -1
- package/dist/index-CsF26Fe8.d.mts.map +1 -1
- package/dist/{index-D0R6bxY7.d.cts → index-D5_0x-hC.d.cts} +2 -2
- package/dist/{index-D0R6bxY7.d.cts.map → index-D5_0x-hC.d.cts.map} +1 -1
- package/dist/{index-Wut4L1Y4.d.mts → index-DeDN45Ha.d.mts} +2 -2
- package/dist/{index-Wut4L1Y4.d.mts.map → index-DeDN45Ha.d.mts.map} +1 -1
- package/dist/{index-CY6x-q24.d.cts → index-DtPmPGcN.d.cts} +2 -2
- package/dist/index-DtPmPGcN.d.cts.map +1 -0
- package/dist/{index-CY6x-q24.d.mts → index-DtPmPGcN.d.mts} +2 -2
- package/dist/index-DtPmPGcN.d.mts.map +1 -0
- package/dist/{index-DISRvpYF.d.cts → index-o7W0pKFo.d.mts} +2 -2
- package/dist/{index-N-mHPudY.d.mts.map → index-o7W0pKFo.d.mts.map} +1 -1
- package/dist/{index-CTCm9Rd3.d.cts → index-y8s6jpSR.d.cts} +2 -2
- package/dist/{index-CxCGf9_1.d.mts.map → index-y8s6jpSR.d.cts.map} +1 -1
- package/dist/index.cjs +16 -10
- package/dist/index.d.cts +12 -9
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +12 -9
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +14 -11
- package/dist/{input-otp-DyBlKPGM.cjs → input-otp-C7O7AtXb.cjs} +1 -1
- package/dist/{input-otp-CXy8gtKM.mjs → input-otp-CFNLnAuu.mjs} +2 -2
- package/dist/input-otp-CFNLnAuu.mjs.map +1 -0
- package/dist/{inspector-split-view-CSPoFJJC.cjs → inspector-split-view-Cwsvl3-m.cjs} +33 -27
- package/dist/{inspector-split-view-CQeClX4k.mjs → inspector-split-view-D5tX9P5r.mjs} +34 -28
- package/dist/inspector-split-view-D5tX9P5r.mjs.map +1 -0
- package/dist/{project-kanban-board-TUeAebbI.mjs → project-kanban-board-BHLRHooH.mjs} +13 -13
- package/dist/project-kanban-board-BHLRHooH.mjs.map +1 -0
- package/dist/{project-kanban-board-BGypLhTA.cjs → project-kanban-board-DUaDiHZC.cjs} +12 -12
- package/dist/styles.css +1 -1
- package/dist/{team-members-table-Cu5gCqMg.cjs → team-members-table-5OWUc6Ib.cjs} +5 -5
- package/dist/{team-members-table-ChWMZMYw.mjs → team-members-table-DW52BAKr.mjs} +6 -6
- package/dist/team-members-table-DW52BAKr.mjs.map +1 -0
- package/dist/{toggle-BjthGxVv.cjs → toggle-CZG8xQeG.cjs} +1 -1
- package/dist/{toggle-C2RktAMd.mjs → toggle-CpsU8EEk.mjs} +2 -2
- package/dist/toggle-CpsU8EEk.mjs.map +1 -0
- package/package.json +34 -4
- package/scripts/verify-artifacts.mjs +2 -2
- package/src/blocks/app-shell-layout/app-shell-layout.tsx +8 -8
- package/src/blocks/auth-form/auth-form.tsx +4 -4
- package/src/blocks/collaboration-chat-panel/collaboration-chat-panel.tsx +9 -9
- 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.tsx +1 -1
- package/src/blocks/data-table-with-filters/data-table-with-filters.tsx +4 -3
- package/src/blocks/empty-state-block/empty-state-block.tsx +9 -8
- package/src/blocks/evaluation-summary-report/evaluation-summary-report.test.tsx +16 -8
- package/src/blocks/evaluation-summary-report/evaluation-summary-report.tsx +161 -78
- package/src/blocks/form-with-validation/form-with-validation.tsx +5 -5
- package/src/blocks/heuristic-finding-card/heuristic-finding-card.stories.tsx +1 -1
- package/src/blocks/heuristic-finding-card/heuristic-finding-card.tsx +110 -64
- package/src/blocks/inspector-split-view/inspector-split-view.tsx +15 -15
- 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/project-kanban-board.tsx +12 -12
- 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/stats-card-grid.tsx +36 -10
- package/src/blocks/team-members-table/team-members-table.tsx +5 -5
- package/src/components/accordion/accordion.tsx +2 -2
- package/src/components/alert/alert.test.tsx +15 -1
- package/src/components/alert/alert.tsx +13 -9
- package/src/components/alert-dialog/alert-dialog.tsx +2 -2
- package/src/components/avatar/avatar.tsx +1 -1
- package/src/components/badge/badge.tsx +4 -1
- package/src/components/button/button.test.tsx +15 -6
- package/src/components/button/button.tsx +63 -13
- package/src/components/calendar/calendar.tsx +5 -5
- package/src/components/card/card.stories.tsx +1 -1
- package/src/components/card/card.tsx +11 -7
- package/src/components/chart/chart.tsx +1 -1
- package/src/components/combobox/combobox.tsx +1 -1
- package/src/components/context-menu/context-menu.tsx +2 -2
- package/src/components/data-table/data-table.tsx +1 -1
- package/src/components/dialog/dialog.tsx +10 -7
- package/src/components/drawer/drawer.tsx +5 -3
- package/src/components/dropdown-menu/dropdown-menu.tsx +3 -3
- package/src/components/file-input/file-input.tsx +1 -1
- package/src/components/hover-card/hover-card.tsx +1 -1
- package/src/components/input/input.tsx +5 -4
- package/src/components/input-otp/input-otp.tsx +1 -1
- package/src/components/navigation-menu/navigation-menu.tsx +2 -2
- package/src/components/number-field/number-field.tsx +1 -1
- package/src/components/popover/popover.tsx +1 -1
- package/src/components/progress/progress.stories.tsx +39 -0
- package/src/components/progress/progress.tsx +110 -18
- package/src/components/select/select.tsx +5 -4
- package/src/components/separator/separator.tsx +1 -1
- package/src/components/sheet/sheet.tsx +10 -7
- package/src/components/switch/switch.tsx +1 -1
- package/src/components/table/table.tsx +2 -2
- package/src/components/tabs/tabs.tsx +6 -3
- package/src/components/textarea/textarea.tsx +1 -1
- package/src/components/toast/toast.tsx +11 -8
- package/src/components/toggle/toggle.tsx +1 -1
- package/src/index.ts +3 -0
- package/src/test/palette-contract.test.ts +24 -21
- package/src/test/sidebar-contract.test.ts +8 -6
- package/styles/theme.css +279 -191
- package/dist/app-shell-layout-C63PPxCb.mjs.map +0 -1
- package/dist/collaboration-chat-panel-DuIoQQ6W.mjs.map +0 -1
- package/dist/empty-state-block-DePTPvzM.mjs.map +0 -1
- package/dist/evaluation-summary-report-Bx2iT1Pd.cjs +0 -212
- package/dist/evaluation-summary-report-CbaikB0Q.mjs +0 -207
- package/dist/evaluation-summary-report-CbaikB0Q.mjs.map +0 -1
- package/dist/heuristic-finding-card-BFwXci2U.mjs.map +0 -1
- package/dist/index-CY6x-q24.d.cts.map +0 -1
- package/dist/index-CY6x-q24.d.mts.map +0 -1
- package/dist/index-jYLDWfZc.d.cts +0 -15
- package/dist/index-jYLDWfZc.d.cts.map +0 -1
- package/dist/index-jYLDWfZc.d.mts +0 -15
- package/dist/index-jYLDWfZc.d.mts.map +0 -1
- package/dist/input-otp-CXy8gtKM.mjs.map +0 -1
- package/dist/inspector-split-view-CQeClX4k.mjs.map +0 -1
- package/dist/project-kanban-board-TUeAebbI.mjs.map +0 -1
- package/dist/team-members-table-ChWMZMYw.mjs.map +0 -1
- package/dist/toggle-C2RktAMd.mjs.map +0 -1
- package/src/__tests__/storybook-preview.test.tsx +0 -164
- package/src/test/docs-component-usability.test.tsx +0 -98
|
@@ -4,7 +4,7 @@ import { cva } from "class-variance-authority";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { Toggle } from "@base-ui/react/toggle";
|
|
6
6
|
//#region src/components/toggle/toggle.tsx
|
|
7
|
-
const toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-
|
|
7
|
+
const toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-[background-color,border-color,color,transform] duration-150 ease-out hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-[0.97] data-[pressed]:bg-accent data-[pressed]:text-accent-foreground data-[pressed]:font-semibold", {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
default: "bg-transparent text-foreground/80",
|
|
@@ -34,4 +34,4 @@ Toggle$1.displayName = "Toggle";
|
|
|
34
34
|
//#endregion
|
|
35
35
|
export { toggleVariants as n, Toggle$1 as t };
|
|
36
36
|
|
|
37
|
-
//# sourceMappingURL=toggle-
|
|
37
|
+
//# sourceMappingURL=toggle-CpsU8EEk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-CpsU8EEk.mjs","names":["Toggle","BaseToggle"],"sources":["../src/components/toggle/toggle.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Toggle as BaseToggle } from \"@base-ui/react/toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../lib/utils\";\n\nexport const toggleVariants = cva(\n \"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-[background-color,border-color,color,transform] duration-150 ease-out hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-[0.97] data-[pressed]:bg-accent data-[pressed]:text-accent-foreground data-[pressed]:font-semibold\",\n {\n variants: {\n variant: {\n default: \"bg-transparent text-foreground/80\",\n outline: \"border border-input/80 bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground data-[pressed]:border-primary\"\n },\n size: {\n sm: \"h-8 px-2.5 min-w-8 text-xs\",\n md: \"h-9 px-3.5 min-w-9 text-sm\",\n lg: \"h-10 px-4 min-w-10 text-base\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\"\n }\n }\n);\n\nexport interface ToggleProps\n extends React.ComponentPropsWithoutRef<typeof BaseToggle>,\n VariantProps<typeof toggleVariants> {}\n\nexport const Toggle = React.forwardRef<HTMLButtonElement, ToggleProps>(\n ({ className, variant, size, ...props }, ref) => (\n <BaseToggle\n ref={ref}\n className={cn(toggleVariants({ variant, size, className }))}\n {...props}\n />\n )\n);\n\nToggle.displayName = \"Toggle\";\n"],"mappings":";;;;;;AAKA,MAAa,iBAAiB,IAC5B,2cACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SAAS;EACX;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CACF;AAMA,MAAaA,WAAS,MAAM,YACzB,EAAE,WAAW,SAAS,MAAM,GAAG,SAAS,QACvC,oBAACC,QAAD;CACO;CACL,WAAW,GAAG,eAAe;EAAE;EAAS;EAAM;CAAU,CAAC,CAAC;CAC1D,GAAI;AACL,CAAA,CAEL;AAEA,SAAO,cAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usalyt/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Base UI + Tailwind v4 component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -647,6 +647,16 @@
|
|
|
647
647
|
"default": "./dist/blocks/collaboration-chat-panel/index.cjs"
|
|
648
648
|
}
|
|
649
649
|
},
|
|
650
|
+
"./blocks/color-palette-sheet": {
|
|
651
|
+
"import": {
|
|
652
|
+
"types": "./dist/blocks/color-palette-sheet/index.d.mts",
|
|
653
|
+
"default": "./dist/blocks/color-palette-sheet/index.mjs"
|
|
654
|
+
},
|
|
655
|
+
"require": {
|
|
656
|
+
"types": "./dist/blocks/color-palette-sheet/index.d.cts",
|
|
657
|
+
"default": "./dist/blocks/color-palette-sheet/index.cjs"
|
|
658
|
+
}
|
|
659
|
+
},
|
|
650
660
|
"./blocks/dashboard-header": {
|
|
651
661
|
"import": {
|
|
652
662
|
"types": "./dist/blocks/dashboard-header/index.d.mts",
|
|
@@ -717,6 +727,16 @@
|
|
|
717
727
|
"default": "./dist/blocks/inspector-split-view/index.cjs"
|
|
718
728
|
}
|
|
719
729
|
},
|
|
730
|
+
"./blocks/instrument-metrics-grid": {
|
|
731
|
+
"import": {
|
|
732
|
+
"types": "./dist/blocks/instrument-metrics-grid/index.d.mts",
|
|
733
|
+
"default": "./dist/blocks/instrument-metrics-grid/index.mjs"
|
|
734
|
+
},
|
|
735
|
+
"require": {
|
|
736
|
+
"types": "./dist/blocks/instrument-metrics-grid/index.d.cts",
|
|
737
|
+
"default": "./dist/blocks/instrument-metrics-grid/index.cjs"
|
|
738
|
+
}
|
|
739
|
+
},
|
|
720
740
|
"./blocks/project-kanban-board": {
|
|
721
741
|
"import": {
|
|
722
742
|
"types": "./dist/blocks/project-kanban-board/index.d.mts",
|
|
@@ -727,6 +747,16 @@
|
|
|
727
747
|
"default": "./dist/blocks/project-kanban-board/index.cjs"
|
|
728
748
|
}
|
|
729
749
|
},
|
|
750
|
+
"./blocks/schedule-timeline-board": {
|
|
751
|
+
"import": {
|
|
752
|
+
"types": "./dist/blocks/schedule-timeline-board/index.d.mts",
|
|
753
|
+
"default": "./dist/blocks/schedule-timeline-board/index.mjs"
|
|
754
|
+
},
|
|
755
|
+
"require": {
|
|
756
|
+
"types": "./dist/blocks/schedule-timeline-board/index.d.cts",
|
|
757
|
+
"default": "./dist/blocks/schedule-timeline-board/index.cjs"
|
|
758
|
+
}
|
|
759
|
+
},
|
|
730
760
|
"./blocks/stats-card-grid": {
|
|
731
761
|
"import": {
|
|
732
762
|
"types": "./dist/blocks/stats-card-grid/index.d.mts",
|
|
@@ -792,13 +822,13 @@
|
|
|
792
822
|
"typescript": "^6.0.0",
|
|
793
823
|
"vite-tsconfig-paths": "^6.1.1",
|
|
794
824
|
"vitest": "^4.1.10",
|
|
795
|
-
"@usalyt/tsconfig": "0.0.
|
|
825
|
+
"@usalyt/tsconfig": "0.0.2"
|
|
796
826
|
},
|
|
797
|
-
"license": "
|
|
827
|
+
"license": "MIT",
|
|
798
828
|
"repository": {
|
|
799
829
|
"type": "git",
|
|
800
830
|
"url": "git+https://github.com/Usalyt/ui.git",
|
|
801
|
-
"directory": "
|
|
831
|
+
"directory": "packages/ui"
|
|
802
832
|
},
|
|
803
833
|
"homepage": "https://github.com/Usalyt/ui",
|
|
804
834
|
"bugs": {
|
|
@@ -327,8 +327,8 @@ if (strictManifest) {
|
|
|
327
327
|
fail("manifest: publishConfig.access must be public");
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
-
if (manifest.license !== "
|
|
331
|
-
fail("manifest: license must be
|
|
330
|
+
if (manifest.license !== "MIT") {
|
|
331
|
+
fail("manifest: license must be MIT");
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
pass("strict manifest contract checked");
|
|
@@ -64,16 +64,16 @@ export function AppShellLayout({
|
|
|
64
64
|
{...props}
|
|
65
65
|
>
|
|
66
66
|
<Sidebar className="border-r border-border bg-surface-raised">
|
|
67
|
-
<SidebarHeader className="border-b border-border px-
|
|
68
|
-
<div className="flex items-center gap-2 font-bold text-foreground">
|
|
67
|
+
<SidebarHeader className="border-b border-border px-5 py-4 bg-surface-raised">
|
|
68
|
+
<div className="flex items-center gap-2.5 font-bold text-foreground">
|
|
69
69
|
{brandLogo}
|
|
70
70
|
<span className="text-base tracking-tight">{brandName}</span>
|
|
71
71
|
</div>
|
|
72
72
|
</SidebarHeader>
|
|
73
73
|
|
|
74
|
-
<SidebarContent className="
|
|
74
|
+
<SidebarContent className="px-3.5 py-4 bg-surface-raised">
|
|
75
75
|
<nav
|
|
76
|
-
className="flex flex-col gap-1"
|
|
76
|
+
className="flex flex-col gap-1.5"
|
|
77
77
|
aria-label="Sidebar Navigation"
|
|
78
78
|
>
|
|
79
79
|
{navItems.map((item, idx) => (
|
|
@@ -82,7 +82,7 @@ export function AppShellLayout({
|
|
|
82
82
|
href={item.href}
|
|
83
83
|
aria-current={item.isActive ? "page" : undefined}
|
|
84
84
|
className={cn(
|
|
85
|
-
"flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium tracking-tight-linear transition-colors",
|
|
85
|
+
"flex items-center gap-3 rounded-md px-3.5 py-2.5 text-sm font-medium tracking-tight-linear transition-colors",
|
|
86
86
|
item.isActive
|
|
87
87
|
? "bg-muted text-foreground border border-border"
|
|
88
88
|
: "text-muted-foreground hover:bg-muted/60 hover:text-foreground"
|
|
@@ -95,7 +95,7 @@ export function AppShellLayout({
|
|
|
95
95
|
</nav>
|
|
96
96
|
</SidebarContent>
|
|
97
97
|
|
|
98
|
-
<SidebarFooter className="border-t border-border
|
|
98
|
+
<SidebarFooter className="border-t border-border px-4 py-3.5 bg-surface-raised">
|
|
99
99
|
<div className="flex items-center gap-3">
|
|
100
100
|
<Avatar className="h-8 w-8 border border-border">
|
|
101
101
|
{user.avatarUrl && (
|
|
@@ -118,7 +118,7 @@ export function AppShellLayout({
|
|
|
118
118
|
</Sidebar>
|
|
119
119
|
|
|
120
120
|
<div className="flex flex-1 flex-col overflow-hidden bg-background">
|
|
121
|
-
<header className="flex h-14 items-center justify-between border-b border-border px-
|
|
121
|
+
<header className="flex h-14 items-center justify-between gap-4 border-b border-border px-6 bg-surface-raised/80 backdrop-blur-md">
|
|
122
122
|
<div className="flex items-center gap-3">
|
|
123
123
|
<SidebarTrigger />
|
|
124
124
|
{breadcrumbs.length > 0 && (
|
|
@@ -172,7 +172,7 @@ export function AppShellLayout({
|
|
|
172
172
|
</div>
|
|
173
173
|
</header>
|
|
174
174
|
|
|
175
|
-
<main className="flex-1 overflow-y-auto
|
|
175
|
+
<main className="flex-1 overflow-y-auto px-6 py-7 lg:px-8 lg:py-8 bg-background">{children}</main>
|
|
176
176
|
</div>
|
|
177
177
|
</div>
|
|
178
178
|
</SidebarProvider>
|
|
@@ -60,8 +60,8 @@ export function AuthForm({
|
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
return (
|
|
63
|
-
<Card className={cn("w-full max-w-md
|
|
64
|
-
<CardHeader className="space-y-
|
|
63
|
+
<Card className={cn("w-full max-w-md", className)}>
|
|
64
|
+
<CardHeader className="space-y-2 px-7 pt-7 pb-5">
|
|
65
65
|
<CardTitle className="text-subheading font-w590 leading-tight">
|
|
66
66
|
{title}
|
|
67
67
|
</CardTitle>
|
|
@@ -71,7 +71,7 @@ export function AuthForm({
|
|
|
71
71
|
</CardHeader>
|
|
72
72
|
<Form {...form}>
|
|
73
73
|
<form onSubmit={form.handleSubmit(handleSubmit)} noValidate>
|
|
74
|
-
<CardContent className="space-y-
|
|
74
|
+
<CardContent className="space-y-5 px-7 pb-6 pt-0">
|
|
75
75
|
{submitError && (
|
|
76
76
|
<div
|
|
77
77
|
role="alert"
|
|
@@ -119,7 +119,7 @@ export function AuthForm({
|
|
|
119
119
|
)}
|
|
120
120
|
/>
|
|
121
121
|
</CardContent>
|
|
122
|
-
<CardFooter className="mt-
|
|
122
|
+
<CardFooter className="mt-1 border-t border-border/60 px-7 py-5">
|
|
123
123
|
<Button
|
|
124
124
|
type="submit"
|
|
125
125
|
className="w-full"
|
|
@@ -56,18 +56,18 @@ export function CollaborationChatPanel({
|
|
|
56
56
|
return (
|
|
57
57
|
<Card
|
|
58
58
|
className={cn(
|
|
59
|
-
"flex flex-col h-[520px] border border-border bg-card
|
|
59
|
+
"flex flex-col h-[520px] border border-border bg-card overflow-hidden",
|
|
60
60
|
className
|
|
61
61
|
)}
|
|
62
62
|
{...props}
|
|
63
63
|
>
|
|
64
|
-
<CardHeader className="flex flex-row items-center justify-between py-
|
|
65
|
-
<div className="flex items-center gap-2">
|
|
64
|
+
<CardHeader className="flex flex-row items-center justify-between gap-4 py-4 px-5 border-b border-border bg-secondary/60">
|
|
65
|
+
<div className="flex items-center gap-2.5">
|
|
66
66
|
<MessageSquare className="h-4 w-4 text-primary" />
|
|
67
67
|
<CardTitle className="text-sm font-semibold text-foreground">{projectName}</CardTitle>
|
|
68
68
|
</div>
|
|
69
|
-
<div className="flex items-center gap-
|
|
70
|
-
<span className="inline-block h-2 w-2 rounded-full bg-pulse-green
|
|
69
|
+
<div className="flex items-center gap-2 text-xs text-muted-foreground tabular-nums">
|
|
70
|
+
<span className="inline-block h-2 w-2 rounded-full bg-pulse-green" />
|
|
71
71
|
<span>{onlineCount} online</span>
|
|
72
72
|
</div>
|
|
73
73
|
</CardHeader>
|
|
@@ -77,7 +77,7 @@ export function CollaborationChatPanel({
|
|
|
77
77
|
aria-label="Project chat messages"
|
|
78
78
|
aria-live="polite"
|
|
79
79
|
aria-relevant="additions"
|
|
80
|
-
className="flex-1 overflow-y-auto
|
|
80
|
+
className="flex-1 overflow-y-auto px-5 py-5 space-y-5"
|
|
81
81
|
>
|
|
82
82
|
{messages.length === 0 ? (
|
|
83
83
|
<div className="flex h-full items-center justify-center text-xs text-muted-foreground">
|
|
@@ -118,7 +118,7 @@ export function CollaborationChatPanel({
|
|
|
118
118
|
|
|
119
119
|
<div
|
|
120
120
|
className={cn(
|
|
121
|
-
"rounded-
|
|
121
|
+
"rounded-lg px-4 py-2.5 text-sm leading-relaxed border border-border",
|
|
122
122
|
msg.isCurrentUser
|
|
123
123
|
? "bg-secondary text-secondary-foreground rounded-tr-xs"
|
|
124
124
|
: "bg-muted text-foreground rounded-tl-xs"
|
|
@@ -154,8 +154,8 @@ export function CollaborationChatPanel({
|
|
|
154
154
|
</div>
|
|
155
155
|
)}
|
|
156
156
|
|
|
157
|
-
<CardFooter className="
|
|
158
|
-
<form onSubmit={handleSend} className="flex w-full items-center gap-2">
|
|
157
|
+
<CardFooter className="px-4 py-3.5 border-t border-border/60 bg-background">
|
|
158
|
+
<form onSubmit={handleSend} className="flex w-full items-center gap-2.5">
|
|
159
159
|
<Input
|
|
160
160
|
value={text}
|
|
161
161
|
onChange={(e) => setText(e.target.value)}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
3
|
+
import { ColorPaletteSheet } from "./color-palette-sheet";
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof ColorPaletteSheet> = {
|
|
6
|
+
title: "Blocks/ColorPaletteSheet",
|
|
7
|
+
component: ColorPaletteSheet,
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "fullscreen",
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
|
|
17
|
+
const DENSITY_OPTIONS = [
|
|
18
|
+
{ id: "compact", label: "90%", fillPercent: 34 },
|
|
19
|
+
{ id: "default", label: "100%", fillPercent: 66 },
|
|
20
|
+
{ id: "comfortable", label: "110%", fillPercent: 100 },
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
export const GraphiteLight: Story = {
|
|
24
|
+
render: () => {
|
|
25
|
+
const [density, setDensity] = React.useState("default");
|
|
26
|
+
return (
|
|
27
|
+
<div className="mx-auto w-full max-w-6xl p-8 sm:p-12">
|
|
28
|
+
<ColorPaletteSheet
|
|
29
|
+
surfaceSteps={[
|
|
30
|
+
{ name: "Canvas", hex: "#f4f3ef" },
|
|
31
|
+
{ name: "Step 1", hex: "#ffffff" },
|
|
32
|
+
{ name: "Step 2", hex: "#eae8e2" },
|
|
33
|
+
{ name: "Step 3", hex: "#e1dfd8" },
|
|
34
|
+
]}
|
|
35
|
+
interactionStates={[
|
|
36
|
+
{ label: "Rest", background: "#c83e0b", foreground: "#ffffff" },
|
|
37
|
+
{ label: "Hover", background: "#b03508", foreground: "#ffffff" },
|
|
38
|
+
{ label: "Focus", background: "#ea4b14", foreground: "#ffffff" },
|
|
39
|
+
]}
|
|
40
|
+
metrics={[
|
|
41
|
+
{ label: "WCAG AA", value: "5.1:1" },
|
|
42
|
+
{ label: "Base radius", value: "6px" },
|
|
43
|
+
{ label: "Spacing unit", value: "0.25rem" },
|
|
44
|
+
]}
|
|
45
|
+
densityOptions={DENSITY_OPTIONS}
|
|
46
|
+
activeDensityId={density}
|
|
47
|
+
onDensityChange={setDensity}
|
|
48
|
+
profileTags={[
|
|
49
|
+
"Graphite",
|
|
50
|
+
"Light canvas",
|
|
51
|
+
"6px radius",
|
|
52
|
+
density === "compact"
|
|
53
|
+
? "90% density"
|
|
54
|
+
: density === "comfortable"
|
|
55
|
+
? "110% density"
|
|
56
|
+
: "100% density",
|
|
57
|
+
"Inter Variable",
|
|
58
|
+
]}
|
|
59
|
+
swatches={[
|
|
60
|
+
{ label: "Canvas", hex: "#f4f3ef" },
|
|
61
|
+
{ label: "Surface", hex: "#ffffff" },
|
|
62
|
+
{ label: "Border", hex: "#d8d5cd" },
|
|
63
|
+
{ label: "Muted", hex: "#52514e" },
|
|
64
|
+
{ label: "Ink", hex: "#121213" },
|
|
65
|
+
{ label: "Accent", hex: "#c83e0b" },
|
|
66
|
+
]}
|
|
67
|
+
accentColor="#c83e0b"
|
|
68
|
+
sampleRadius="6px"
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const GraphiteDark: Story = {
|
|
76
|
+
render: () => (
|
|
77
|
+
<div className="dark mx-auto w-full max-w-6xl rounded-xl bg-[#0e0e10] p-8 text-[#f2f1ed] sm:p-12">
|
|
78
|
+
<ColorPaletteSheet
|
|
79
|
+
surfaceSteps={[
|
|
80
|
+
{ name: "Canvas", hex: "#0e0e10" },
|
|
81
|
+
{ name: "Step 1", hex: "#161618" },
|
|
82
|
+
{ name: "Step 2", hex: "#1e1e21" },
|
|
83
|
+
{ name: "Step 3", hex: "#26262a" },
|
|
84
|
+
]}
|
|
85
|
+
interactionStates={[
|
|
86
|
+
{ label: "Rest", background: "#f2541b", foreground: "#0e0e10" },
|
|
87
|
+
{ label: "Hover", background: "#ff6b35", foreground: "#0e0e10" },
|
|
88
|
+
{ label: "Focus", background: "#f2541b", foreground: "#0e0e10" },
|
|
89
|
+
]}
|
|
90
|
+
metrics={[
|
|
91
|
+
{ label: "WCAG AA", value: "5.6:1" },
|
|
92
|
+
{ label: "Base radius", value: "6px" },
|
|
93
|
+
{ label: "Spacing unit", value: "0.25rem" },
|
|
94
|
+
]}
|
|
95
|
+
densityOptions={DENSITY_OPTIONS}
|
|
96
|
+
activeDensityId="default"
|
|
97
|
+
profileTags={[
|
|
98
|
+
"Graphite",
|
|
99
|
+
"Dark canvas",
|
|
100
|
+
"6px radius",
|
|
101
|
+
"100% density",
|
|
102
|
+
"Inter Variable",
|
|
103
|
+
]}
|
|
104
|
+
swatches={[
|
|
105
|
+
{ label: "Canvas", hex: "#0e0e10" },
|
|
106
|
+
{ label: "Surface", hex: "#161618" },
|
|
107
|
+
{ label: "Border", hex: "#28282c" },
|
|
108
|
+
{ label: "Muted", hex: "#96948e" },
|
|
109
|
+
{ label: "Ink", hex: "#f2f1ed" },
|
|
110
|
+
{ label: "Accent", hex: "#f2541b" },
|
|
111
|
+
]}
|
|
112
|
+
accentColor="#f2541b"
|
|
113
|
+
sampleRadius="6px"
|
|
114
|
+
/>
|
|
115
|
+
</div>
|
|
116
|
+
),
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export const LinearDark: Story = {
|
|
120
|
+
render: () => (
|
|
121
|
+
<div className="dark mx-auto w-full max-w-6xl rounded-xl bg-[#010102] p-8 text-[#f7f8f8] sm:p-12">
|
|
122
|
+
<ColorPaletteSheet
|
|
123
|
+
surfaceSteps={[
|
|
124
|
+
{ name: "Canvas", hex: "#010102" },
|
|
125
|
+
{ name: "Step 1", hex: "#0f1011" },
|
|
126
|
+
{ name: "Step 2", hex: "#141516" },
|
|
127
|
+
{ name: "Step 3", hex: "#18191a" },
|
|
128
|
+
]}
|
|
129
|
+
interactionStates={[
|
|
130
|
+
{ label: "Rest", background: "#5e6ad2", foreground: "#ffffff" },
|
|
131
|
+
{ label: "Hover", background: "#828fff", foreground: "#ffffff" },
|
|
132
|
+
{ label: "Focus", background: "#5e69d1", foreground: "#ffffff" },
|
|
133
|
+
]}
|
|
134
|
+
metrics={[
|
|
135
|
+
{ label: "WCAG AA", value: "4.7:1" },
|
|
136
|
+
{ label: "Base radius", value: "10px" },
|
|
137
|
+
{ label: "Spacing unit", value: "0.25rem" },
|
|
138
|
+
]}
|
|
139
|
+
densityOptions={DENSITY_OPTIONS}
|
|
140
|
+
activeDensityId="default"
|
|
141
|
+
profileTags={[
|
|
142
|
+
"Linear",
|
|
143
|
+
"Dark canvas",
|
|
144
|
+
"10px radius",
|
|
145
|
+
"100% density",
|
|
146
|
+
"Inter Variable",
|
|
147
|
+
]}
|
|
148
|
+
swatches={[
|
|
149
|
+
{ label: "Canvas", hex: "#010102" },
|
|
150
|
+
{ label: "Surface", hex: "#0f1011" },
|
|
151
|
+
{ label: "Border", hex: "#23252a" },
|
|
152
|
+
{ label: "Muted", hex: "#8a8f98" },
|
|
153
|
+
{ label: "Ink", hex: "#f7f8f8" },
|
|
154
|
+
{ label: "Accent", hex: "#5e6ad2" },
|
|
155
|
+
]}
|
|
156
|
+
accentColor="#5e6ad2"
|
|
157
|
+
sampleRadius="10px"
|
|
158
|
+
/>
|
|
159
|
+
</div>
|
|
160
|
+
),
|
|
161
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { render, screen, fireEvent } from "@testing-library/react";
|
|
3
|
+
import { describe, expect, it, vi } from "vitest";
|
|
4
|
+
import { ColorPaletteSheet } from "./color-palette-sheet";
|
|
5
|
+
|
|
6
|
+
describe("ColorPaletteSheet", () => {
|
|
7
|
+
it("renders circular palette hex codes and calls onDensityChange when toggled", () => {
|
|
8
|
+
const onDensityChange = vi.fn();
|
|
9
|
+
|
|
10
|
+
render(
|
|
11
|
+
<ColorPaletteSheet
|
|
12
|
+
surfaceSteps={[
|
|
13
|
+
{ name: "Canvas", hex: "#010102" },
|
|
14
|
+
{ name: "Step 1", hex: "#0f1011" },
|
|
15
|
+
]}
|
|
16
|
+
interactionStates={[
|
|
17
|
+
{ label: "Rest", background: "#5e6ad2", foreground: "#ffffff" },
|
|
18
|
+
{ label: "Hover", background: "#828fff", foreground: "#ffffff" },
|
|
19
|
+
]}
|
|
20
|
+
metrics={[
|
|
21
|
+
{ label: "WCAG AA", value: "4.7:1" },
|
|
22
|
+
{ label: "Base radius", value: "8px" },
|
|
23
|
+
]}
|
|
24
|
+
densityOptions={[
|
|
25
|
+
{ id: "compact", label: "90%", fillPercent: 34 },
|
|
26
|
+
{ id: "default", label: "100%", fillPercent: 66 },
|
|
27
|
+
{ id: "comfortable", label: "110%", fillPercent: 100 },
|
|
28
|
+
]}
|
|
29
|
+
activeDensityId="default"
|
|
30
|
+
onDensityChange={onDensityChange}
|
|
31
|
+
profileTags={["Linear", "Dark canvas"]}
|
|
32
|
+
swatches={[
|
|
33
|
+
{ label: "Canvas", hex: "#010102" },
|
|
34
|
+
{ label: "Accent", hex: "#5e6ad2" },
|
|
35
|
+
]}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
expect(screen.getByText("010102")).toBeInTheDocument();
|
|
40
|
+
expect(screen.getByText("5E6AD2")).toBeInTheDocument();
|
|
41
|
+
|
|
42
|
+
fireEvent.click(screen.getByRole("button", { name: "110%" }));
|
|
43
|
+
expect(onDensityChange).toHaveBeenCalledWith("comfortable");
|
|
44
|
+
});
|
|
45
|
+
});
|