@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/components/combobox/combobox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Check, ChevronsUpDown, Search } from \"lucide-react\";\nimport { cn } from \"../../lib/utils\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../popover\";\n\nexport interface ComboboxOption {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\nexport interface ComboboxProps {\n options: ComboboxOption[];\n value?: string;\n onChange?: (value: string) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n disabled?: boolean;\n className?: string;\n}\n\n/**\n * Filterable single-select. The trigger stays the ARIA combobox\n * (DESIGN.md selector surface); the popup input owns a managed highlight —\n * ArrowDown/ArrowUp/Home/End move an active index while focus stays in the\n * input, `aria-activedescendant` always points at the highlighted option,\n * Enter commits and Escape dismisses with focus restored to the trigger.\n */\nexport const Combobox = React.forwardRef<HTMLButtonElement, ComboboxProps>(\n (\n {\n options,\n value,\n onChange,\n placeholder = \"Select option...\",\n searchPlaceholder = \"Search options...\",\n disabled = false,\n className,\n },\n ref\n ) => {\n const [open, setOpen] = React.useState(false);\n const [search, setSearch] = React.useState(\"\");\n const [activeIndex, setActiveIndex] = React.useState(-1);\n\n const triggerRef = React.useRef<HTMLButtonElement | null>(null);\n const inputRef = React.useRef<HTMLInputElement | null>(null);\n const listboxId = React.useId();\n const optionId = (index: number) => `${listboxId}-option-${index}`;\n\n const setTriggerRef = React.useCallback(\n (node: HTMLButtonElement | null) => {\n triggerRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) ref.current = node;\n },\n [ref]\n );\n\n const filteredOptions = options.filter((o) =>\n o.label.toLowerCase().includes(search.toLowerCase())\n );\n\n const selectedOption = options.find((o) => o.value === value);\n\n React.useEffect(() => {\n if (open) inputRef.current?.focus();\n }, [open]);\n\n // Keep the highlighted row visible while arrowing through a long list.\n React.useEffect(() => {\n if (!open || activeIndex < 0) return;\n const node = document.getElementById(optionId(activeIndex));\n node?.scrollIntoView?.({ block: \"nearest\" });\n }, [open, activeIndex]);\n\n const closeCombobox = (restoreFocus: boolean) => {\n setOpen(false);\n setSearch(\"\");\n setActiveIndex(-1);\n if (restoreFocus) triggerRef.current?.focus();\n };\n\n const moveActive = (delta: 1 | -1) => {\n setActiveIndex((current) => {\n const count = filteredOptions.length;\n if (count === 0) return -1;\n let next = current;\n for (let step = 0; step < count; step++) {\n next = (next + delta + count) % count;\n if (!filteredOptions[next].disabled) return next;\n }\n return current;\n });\n };\n\n const moveActiveToEdge = (edge: \"first\" | \"last\") => {\n setActiveIndex(() => {\n const enabled = filteredOptions\n .map((option, index) => (option.disabled ? -1 : index))\n .filter((index) => index >= 0);\n if (enabled.length === 0) return -1;\n return edge === \"first\" ? enabled[0] : enabled[enabled.length - 1];\n });\n };\n\n const selectOption = (option: ComboboxOption) => {\n if (option.disabled) return;\n onChange?.(option.value);\n closeCombobox(true);\n };\n\n const handleInputKeyDown = (\n event: React.KeyboardEvent<HTMLInputElement>\n ) => {\n switch (event.key) {\n case \"ArrowDown\":\n event.preventDefault();\n moveActive(1);\n break;\n case \"ArrowUp\":\n event.preventDefault();\n moveActive(-1);\n break;\n case \"Home\":\n event.preventDefault();\n moveActiveToEdge(\"first\");\n break;\n case \"End\":\n event.preventDefault();\n moveActiveToEdge(\"last\");\n break;\n case \"Enter\": {\n event.preventDefault();\n const option = filteredOptions[activeIndex];\n if (option) selectOption(option);\n break;\n }\n case \"Escape\":\n event.preventDefault();\n closeCombobox(true);\n break;\n default:\n break;\n }\n };\n\n const activeOption =\n activeIndex >= 0 ? filteredOptions[activeIndex] : undefined;\n\n return (\n <Popover\n open={open}\n onOpenChange={(next) => {\n if (next) setOpen(true);\n else closeCombobox(false);\n }}\n >\n <PopoverTrigger\n render={\n <button\n ref={setTriggerRef}\n type=\"button\"\n role=\"combobox\"\n disabled={disabled}\n aria-expanded={open}\n aria-haspopup=\"listbox\"\n aria-controls={open ? listboxId : undefined}\n aria-label={selectedOption ? selectedOption.label : placeholder}\n className={cn(\n \"flex h-9 w-full items-center justify-between rounded-md border border-input bg-field px-3 py-2 text-sm text-foreground ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring focus:border-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n >\n <span className=\"line-clamp-1 text-left\">\n {selectedOption ? selectedOption.label : placeholder}\n </span>\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 text-fog\" />\n </button>\n }\n />\n <PopoverContent\n align=\"start\"\n className=\"w-[var(--anchor-width)] rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-(--shadow-xl) data-open:animate-overlay-in data-closed:animate-overlay-out\"\n >\n <span\n className=\"sr-only\"\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {filteredOptions.length === 0\n ? \"No options found.\"\n : `${filteredOptions.length} ${\n filteredOptions.length === 1 ? \"option\" : \"options\"\n } available.`}\n </span>\n\n <div className=\"flex items-center gap-2 border-b border-border px-2.5\">\n <Search className=\"h-3.5 w-3.5 shrink-0 text-fog\" aria-hidden=\"true\" />\n <input\n ref={inputRef}\n type=\"text\"\n role=\"combobox\"\n aria-expanded={open}\n aria-controls={listboxId}\n aria-autocomplete=\"list\"\n aria-activedescendant={\n activeOption ? optionId(activeIndex) : undefined\n }\n placeholder={searchPlaceholder}\n value={search}\n onChange={(event) => {\n setSearch(event.target.value);\n setActiveIndex(-1);\n }}\n onKeyDown={handleInputKeyDown}\n className=\"h-9 flex-1 bg-transparent text-caption text-foreground outline-none placeholder:text-fog\"\n />\n </div>\n\n <div\n id={listboxId}\n role=\"listbox\"\n aria-label={placeholder}\n className=\"max-h-64 overflow-y-auto p-1\"\n >\n {filteredOptions.length === 0 ? (\n <div className=\"py-6 text-center text-caption text-muted-foreground\">\n No options found.\n </div>\n ) : (\n filteredOptions.map((option, index) => {\n const isSelected = value === option.value;\n const isHighlighted = index === activeIndex;\n return (\n <div\n key={option.value}\n id={optionId(index)}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={option.disabled}\n data-highlighted={isHighlighted ? \"true\" : undefined}\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => selectOption(option)}\n className={cn(\n \"flex h-8 cursor-pointer select-none items-center gap-2 rounded-md px-2.5 text-caption text-muted-foreground transition-colors data-[highlighted]:bg-accent data-[highlighted]:text-foreground\",\n option.disabled\n ? \"cursor-not-allowed opacity-50\"\n : \"hover:bg-accent hover:text-foreground\"\n )}\n >\n <span className=\"flex-1 truncate\">{option.label}</span>\n {isSelected && (\n <Check\n className=\"h-3.5 w-3.5 shrink-0 text-foreground\"\n aria-hidden=\"true\"\n />\n )}\n </div>\n );\n })\n )}\n </div>\n </PopoverContent>\n </Popover>\n );\n }\n);\n\nCombobox.displayName = \"Combobox\";\n"],"mappings":";;;;;;;;;;;;;AA8BA,MAAa,WAAW,MAAM,YAE1B,EACE,SACA,OACA,UACA,cAAc,oBACd,oBAAoB,qBACpB,WAAW,OACX,aAEF,QACG;CACH,MAAM,CAAC,MAAM,WAAW,MAAM,SAAS,KAAK;CAC5C,MAAM,CAAC,QAAQ,aAAa,MAAM,SAAS,EAAE;CAC7C,MAAM,CAAC,aAAa,kBAAkB,MAAM,SAAS,EAAE;CAEvD,MAAM,aAAa,MAAM,OAAiC,IAAI;CAC9D,MAAM,WAAW,MAAM,OAAgC,IAAI;CAC3D,MAAM,YAAY,MAAM,MAAM;CAC9B,MAAM,YAAY,UAAkB,GAAG,UAAU,UAAU;CAE3D,MAAM,gBAAgB,MAAM,aACzB,SAAmC;EAClC,WAAW,UAAU;EACrB,IAAI,OAAO,QAAQ,YAAY,IAAI,IAAI;OAClC,IAAI,KAAK,IAAI,UAAU;CAC9B,GACA,CAAC,GAAG,CACN;CAEA,MAAM,kBAAkB,QAAQ,QAAQ,MACtC,EAAE,MAAM,YAAY,CAAC,CAAC,SAAS,OAAO,YAAY,CAAC,CACrD;CAEA,MAAM,iBAAiB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ClB,yBACE,eAAe,SAAS,WAAW,IAAI,KAAA;MAEzC,aAAa;MACb,OAAO;MACP,WAAW,UAAU;OACnB,UAAU,MAAM,OAAO,KAAK;OAC5B,eAAe,EAAE;MACnB;MACA,WAAW;MACX,WAAU;KACX,CAAA,CACE;;IAEL,oBAAC,OAAD;KACE,IAAI;KACJ,MAAK;KACL,cAAY;KACZ,WAAU;KAET,UAAA,gBAAgB,WAAW,IAC1B,oBAAC,OAAD;MAAK,WAAU;MAAsD,UAAA;KAEhE,CAAA,IAEL,gBAAgB,KAAK,QAAQ,UAAU;MACrC,MAAM,aAAa,UAAU,OAAO;MACpC,MAAM,gBAAgB,UAAU;MAChC,OACE,qBAAC,OAAD;OAEE,IAAI,SAAS,KAAK;OAClB,MAAK;OACL,iBAAe;OACf,iBAAe,OAAO;OACtB,oBAAkB,gBAAgB,SAAS,KAAA;OAC3C,cAAc,UAAU,MAAM,eAAe;OAC7C,eAAe,aAAa,MAAM;OAClC,WAAW,GACT,iMACA,OAAO,WACH,kCACA,uCACN;OAdF,UAAA,CAgBE,oBAAC,QAAD;QAAM,WAAU;QAAmB,UAAA,OAAO;OAAY,CAAA,GACrD,cACC,oBAAC,OAAD;QACE,WAAU;QACV,eAAY;OACb,CAAA,CAEA;MAtBE,GAAA,OAAO,KAsBT;KAET,CAAC;IAEA,CAAA;GACS;EACT,CAAA,CAAA;;AAEb,CACF;AAEA,SAAS,cAAc"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/components/combobox/combobox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Check, ChevronsUpDown, Search } from \"lucide-react\";\nimport { cn } from \"../../lib/utils\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../popover\";\n\nexport interface ComboboxOption {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\nexport interface ComboboxProps {\n options: ComboboxOption[];\n value?: string;\n onChange?: (value: string) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n disabled?: boolean;\n className?: string;\n}\n\n/**\n * Filterable single-select. The trigger stays the ARIA combobox\n * (DESIGN.md selector surface); the popup input owns a managed highlight —\n * ArrowDown/ArrowUp/Home/End move an active index while focus stays in the\n * input, `aria-activedescendant` always points at the highlighted option,\n * Enter commits and Escape dismisses with focus restored to the trigger.\n */\nexport const Combobox = React.forwardRef<HTMLButtonElement, ComboboxProps>(\n (\n {\n options,\n value,\n onChange,\n placeholder = \"Select option...\",\n searchPlaceholder = \"Search options...\",\n disabled = false,\n className,\n },\n ref\n ) => {\n const [open, setOpen] = React.useState(false);\n const [search, setSearch] = React.useState(\"\");\n const [activeIndex, setActiveIndex] = React.useState(-1);\n\n const triggerRef = React.useRef<HTMLButtonElement | null>(null);\n const inputRef = React.useRef<HTMLInputElement | null>(null);\n const listboxId = React.useId();\n const optionId = (index: number) => `${listboxId}-option-${index}`;\n\n const setTriggerRef = React.useCallback(\n (node: HTMLButtonElement | null) => {\n triggerRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) ref.current = node;\n },\n [ref]\n );\n\n const filteredOptions = options.filter((o) =>\n o.label.toLowerCase().includes(search.toLowerCase())\n );\n\n const selectedOption = options.find((o) => o.value === value);\n\n React.useEffect(() => {\n if (open) inputRef.current?.focus();\n }, [open]);\n\n // Keep the highlighted row visible while arrowing through a long list.\n React.useEffect(() => {\n if (!open || activeIndex < 0) return;\n const node = document.getElementById(optionId(activeIndex));\n node?.scrollIntoView?.({ block: \"nearest\" });\n }, [open, activeIndex]);\n\n const closeCombobox = (restoreFocus: boolean) => {\n setOpen(false);\n setSearch(\"\");\n setActiveIndex(-1);\n if (restoreFocus) triggerRef.current?.focus();\n };\n\n const moveActive = (delta: 1 | -1) => {\n setActiveIndex((current) => {\n const count = filteredOptions.length;\n if (count === 0) return -1;\n let next = current;\n for (let step = 0; step < count; step++) {\n next = (next + delta + count) % count;\n if (!filteredOptions[next].disabled) return next;\n }\n return current;\n });\n };\n\n const moveActiveToEdge = (edge: \"first\" | \"last\") => {\n setActiveIndex(() => {\n const enabled = filteredOptions\n .map((option, index) => (option.disabled ? -1 : index))\n .filter((index) => index >= 0);\n if (enabled.length === 0) return -1;\n return edge === \"first\" ? enabled[0] : enabled[enabled.length - 1];\n });\n };\n\n const selectOption = (option: ComboboxOption) => {\n if (option.disabled) return;\n onChange?.(option.value);\n closeCombobox(true);\n };\n\n const handleInputKeyDown = (\n event: React.KeyboardEvent<HTMLInputElement>\n ) => {\n switch (event.key) {\n case \"ArrowDown\":\n event.preventDefault();\n moveActive(1);\n break;\n case \"ArrowUp\":\n event.preventDefault();\n moveActive(-1);\n break;\n case \"Home\":\n event.preventDefault();\n moveActiveToEdge(\"first\");\n break;\n case \"End\":\n event.preventDefault();\n moveActiveToEdge(\"last\");\n break;\n case \"Enter\": {\n event.preventDefault();\n const option = filteredOptions[activeIndex];\n if (option) selectOption(option);\n break;\n }\n case \"Escape\":\n event.preventDefault();\n closeCombobox(true);\n break;\n default:\n break;\n }\n };\n\n const activeOption =\n activeIndex >= 0 ? filteredOptions[activeIndex] : undefined;\n\n return (\n <Popover\n open={open}\n onOpenChange={(next) => {\n if (next) setOpen(true);\n else closeCombobox(false);\n }}\n >\n <PopoverTrigger\n render={\n <button\n ref={setTriggerRef}\n type=\"button\"\n role=\"combobox\"\n disabled={disabled}\n aria-expanded={open}\n aria-haspopup=\"listbox\"\n aria-controls={open ? listboxId : undefined}\n aria-label={selectedOption ? selectedOption.label : placeholder}\n className={cn(\n \"flex h-9 w-full items-center justify-between rounded-md border border-input bg-field px-3 py-2 text-sm text-foreground ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n >\n <span className=\"line-clamp-1 text-left\">\n {selectedOption ? selectedOption.label : placeholder}\n </span>\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 text-fog\" />\n </button>\n }\n />\n <PopoverContent\n align=\"start\"\n className=\"w-[var(--anchor-width)] rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-(--shadow-xl) data-open:animate-overlay-in data-closed:animate-overlay-out\"\n >\n <span\n className=\"sr-only\"\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {filteredOptions.length === 0\n ? \"No options found.\"\n : `${filteredOptions.length} ${\n filteredOptions.length === 1 ? \"option\" : \"options\"\n } available.`}\n </span>\n\n <div className=\"flex items-center gap-2 border-b border-border px-2.5\">\n <Search className=\"h-3.5 w-3.5 shrink-0 text-fog\" aria-hidden=\"true\" />\n <input\n ref={inputRef}\n type=\"text\"\n role=\"combobox\"\n aria-expanded={open}\n aria-controls={listboxId}\n aria-autocomplete=\"list\"\n aria-activedescendant={\n activeOption ? optionId(activeIndex) : undefined\n }\n placeholder={searchPlaceholder}\n value={search}\n onChange={(event) => {\n setSearch(event.target.value);\n setActiveIndex(-1);\n }}\n onKeyDown={handleInputKeyDown}\n className=\"h-9 flex-1 bg-transparent text-caption text-foreground outline-none placeholder:text-fog\"\n />\n </div>\n\n <div\n id={listboxId}\n role=\"listbox\"\n aria-label={placeholder}\n className=\"max-h-64 overflow-y-auto p-1\"\n >\n {filteredOptions.length === 0 ? (\n <div className=\"py-6 text-center text-caption text-muted-foreground\">\n No options found.\n </div>\n ) : (\n filteredOptions.map((option, index) => {\n const isSelected = value === option.value;\n const isHighlighted = index === activeIndex;\n return (\n <div\n key={option.value}\n id={optionId(index)}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={option.disabled}\n data-highlighted={isHighlighted ? \"true\" : undefined}\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => selectOption(option)}\n className={cn(\n \"flex h-8 cursor-pointer select-none items-center gap-2 rounded-md px-2.5 text-caption text-muted-foreground transition-colors data-[highlighted]:bg-accent data-[highlighted]:text-foreground\",\n option.disabled\n ? \"cursor-not-allowed opacity-50\"\n : \"hover:bg-accent hover:text-foreground\"\n )}\n >\n <span className=\"flex-1 truncate\">{option.label}</span>\n {isSelected && (\n <Check\n className=\"h-3.5 w-3.5 shrink-0 text-foreground\"\n aria-hidden=\"true\"\n />\n )}\n </div>\n );\n })\n )}\n </div>\n </PopoverContent>\n </Popover>\n );\n }\n);\n\nCombobox.displayName = \"Combobox\";\n"],"mappings":";;;;;;;;;;;;;AA8BA,MAAa,WAAW,MAAM,YAE1B,EACE,SACA,OACA,UACA,cAAc,oBACd,oBAAoB,qBACpB,WAAW,OACX,aAEF,QACG;CACH,MAAM,CAAC,MAAM,WAAW,MAAM,SAAS,KAAK;CAC5C,MAAM,CAAC,QAAQ,aAAa,MAAM,SAAS,EAAE;CAC7C,MAAM,CAAC,aAAa,kBAAkB,MAAM,SAAS,EAAE;CAEvD,MAAM,aAAa,MAAM,OAAiC,IAAI;CAC9D,MAAM,WAAW,MAAM,OAAgC,IAAI;CAC3D,MAAM,YAAY,MAAM,MAAM;CAC9B,MAAM,YAAY,UAAkB,GAAG,UAAU,UAAU;CAE3D,MAAM,gBAAgB,MAAM,aACzB,SAAmC;EAClC,WAAW,UAAU;EACrB,IAAI,OAAO,QAAQ,YAAY,IAAI,IAAI;OAClC,IAAI,KAAK,IAAI,UAAU;CAC9B,GACA,CAAC,GAAG,CACN;CAEA,MAAM,kBAAkB,QAAQ,QAAQ,MACtC,EAAE,MAAM,YAAY,CAAC,CAAC,SAAS,OAAO,YAAY,CAAC,CACrD;CAEA,MAAM,iBAAiB,QAAQ,MAAM,MAAM,EAAE,UAAU,KAAK;CAE5D,MAAM,gBAAgB;EACpB,IAAI,MAAM,SAAS,SAAS,MAAM;CACpC,GAAG,CAAC,IAAI,CAAC;CAGT,MAAM,gBAAgB;EACpB,IAAI,CAAC,QAAQ,cAAc,GAAG;EAE9B,SADsB,eAAe,SAAS,WAAW,CACtD,CAAC,EAAE,iBAAiB,EAAE,OAAO,UAAU,CAAC;CAC7C,GAAG,CAAC,MAAM,WAAW,CAAC;CAEtB,MAAM,iBAAiB,iBAA0B;EAC/C,QAAQ,KA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,UAAU;MACrC,MAAM,aAAa,UAAU,OAAO;MACpC,MAAM,gBAAgB,UAAU;MAChC,OACE,qBAAC,OAAD;OAEE,IAAI,SAAS,KAAK;OAClB,MAAK;OACL,iBAAe;OACf,iBAAe,OAAO;OACtB,oBAAkB,gBAAgB,SAAS,KAAA;OAC3C,cAAc,UAAU,MAAM,eAAe;OAC7C,eAAe,aAAa,MAAM;OAClC,WAAW,GACT,iMACA,OAAO,WACH,kCACA,uCACN;OAdF,UAAA,CAgBE,oBAAC,QAAD;QAAM,WAAU;QAAmB,UAAA,OAAO;OAAY,CAAA,GACrD,cACC,oBAAC,OAAD;QACE,WAAU;QACV,eAAY;OACb,CAAA,CAEA;MAtBE,GAAA,OAAO,KAsBT;KAET,CAAC;IAEA,CAAA;GACS;EACT,CAAA,CAAA;;AAEb,CACF;AAEA,SAAS,cAAc"}
|
|
@@ -2,11 +2,11 @@ import * as React from "react";
|
|
|
2
2
|
//#region src/components/command/command.d.ts
|
|
3
3
|
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
5
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
6
6
|
ref?: React.Ref<HTMLDivElement>;
|
|
7
7
|
} & {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
-
}, "key" | "asChild"
|
|
9
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "key" | "asChild"> & {
|
|
10
10
|
label?: string;
|
|
11
11
|
shouldFilter?: boolean;
|
|
12
12
|
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
@@ -21,44 +21,44 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
21
21
|
ref?: React.Ref<HTMLInputElement>;
|
|
22
22
|
} & {
|
|
23
23
|
asChild?: boolean;
|
|
24
|
-
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "
|
|
24
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "value" | "type" | "onChange"> & {
|
|
25
25
|
value?: string;
|
|
26
26
|
onValueChange?: (search: string) => void;
|
|
27
27
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
28
28
|
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
29
29
|
children?: React.ReactNode;
|
|
30
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
30
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
31
31
|
ref?: React.Ref<HTMLDivElement>;
|
|
32
32
|
} & {
|
|
33
33
|
asChild?: boolean;
|
|
34
|
-
}, "key" | "asChild"
|
|
34
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "key" | "asChild"> & {
|
|
35
35
|
label?: string;
|
|
36
36
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
37
37
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
38
38
|
children?: React.ReactNode;
|
|
39
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
39
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
40
40
|
ref?: React.Ref<HTMLDivElement>;
|
|
41
41
|
} & {
|
|
42
42
|
asChild?: boolean;
|
|
43
|
-
}, "key" | "asChild"
|
|
43
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "key" | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
44
44
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
45
45
|
children?: React.ReactNode;
|
|
46
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
46
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
47
47
|
ref?: React.Ref<HTMLDivElement>;
|
|
48
48
|
} & {
|
|
49
49
|
asChild?: boolean;
|
|
50
|
-
}, "key" | "asChild"
|
|
50
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "key" | "asChild">, "value" | "heading"> & {
|
|
51
51
|
heading?: React.ReactNode;
|
|
52
52
|
value?: string;
|
|
53
53
|
forceMount?: boolean;
|
|
54
54
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
55
55
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
56
56
|
children?: React.ReactNode;
|
|
57
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
57
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
58
58
|
ref?: React.Ref<HTMLDivElement>;
|
|
59
59
|
} & {
|
|
60
60
|
asChild?: boolean;
|
|
61
|
-
}, "key" | "asChild"
|
|
61
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "key" | "asChild">, "value" | "onSelect" | "disabled"> & {
|
|
62
62
|
disabled?: boolean;
|
|
63
63
|
onSelect?: (value: string) => void;
|
|
64
64
|
value?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/components/command/command.tsx"],"mappings":";;cAOM,SAAO,MAAA,0BAAA;;;;;;;;;;;;;;;;IAYX,MAAA,cAAA,0BAAA,MAAA,cAAA;cAGI,cAAY,MAAA,0BAAA,KAAA,KAAA,KAAA,KAAA,MAAA,kBAAA,MAAA,oBAAA,mBAAA,iCAAA,MAAA,oBAAA;;;;;;;IAehB,MAAA,cAAA,4BAAA,MAAA,cAAA;cAGI,aAAW,MAAA,0BAAA;;;;;;;;IAYf,MAAA,cAAA,0BAAA,MAAA,cAAA;cAGI,cAAY,MAAA,0BAAA;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/components/command/command.tsx"],"mappings":";;cAOM,SAAO,MAAA,0BAAA;;;;;;;;;;;;;;;;IAYX,MAAA,cAAA,0BAAA,MAAA,cAAA;cAGI,cAAY,MAAA,0BAAA,KAAA,KAAA,KAAA,KAAA,MAAA,kBAAA,MAAA,oBAAA,mBAAA,iCAAA,MAAA,oBAAA;;;;;;;IAehB,MAAA,cAAA,4BAAA,MAAA,cAAA;cAGI,aAAW,MAAA,0BAAA;;;;;;;;IAYf,MAAA,cAAA,0BAAA,MAAA,cAAA;cAGI,cAAY,MAAA,0BAAA;;;;;;SAShB,MAAA,eAAA,uCAAA,MAAA,cAAA,0BAAA,MAAA,cAAA;cAGI,cAAY,MAAA,0BAAA;;;;;;;;;;IAYhB,MAAA,cAAA,0BAAA,MAAA,cAAA;cAGI,aAAW,MAAA,0BAAA;;;;;;;;;;;;IAYf,MAAA,cAAA,0BAAA,MAAA,cAAA;cAGI;KAGH,cAAA,SAAA,MAAM,eAAe,mBAAgB,MAAA,IAAA;;;cAoBlC,eAAa,MAAA,0BAAA,MAAA,eAAA,kBAAA,MAAA,cAAA"}
|
|
@@ -2,11 +2,11 @@ import * as React from "react";
|
|
|
2
2
|
//#region src/components/command/command.d.ts
|
|
3
3
|
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
5
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
6
6
|
ref?: React.Ref<HTMLDivElement>;
|
|
7
7
|
} & {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
-
}, "key" | "asChild"
|
|
9
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "key" | "asChild"> & {
|
|
10
10
|
label?: string;
|
|
11
11
|
shouldFilter?: boolean;
|
|
12
12
|
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
@@ -21,44 +21,44 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
21
21
|
ref?: React.Ref<HTMLInputElement>;
|
|
22
22
|
} & {
|
|
23
23
|
asChild?: boolean;
|
|
24
|
-
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "
|
|
24
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "value" | "type" | "onChange"> & {
|
|
25
25
|
value?: string;
|
|
26
26
|
onValueChange?: (search: string) => void;
|
|
27
27
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
28
28
|
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
29
29
|
children?: React.ReactNode;
|
|
30
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
30
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
31
31
|
ref?: React.Ref<HTMLDivElement>;
|
|
32
32
|
} & {
|
|
33
33
|
asChild?: boolean;
|
|
34
|
-
}, "key" | "asChild"
|
|
34
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "key" | "asChild"> & {
|
|
35
35
|
label?: string;
|
|
36
36
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
37
37
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
38
38
|
children?: React.ReactNode;
|
|
39
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
39
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
40
40
|
ref?: React.Ref<HTMLDivElement>;
|
|
41
41
|
} & {
|
|
42
42
|
asChild?: boolean;
|
|
43
|
-
}, "key" | "asChild"
|
|
43
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "key" | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
44
44
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
45
45
|
children?: React.ReactNode;
|
|
46
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
46
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
47
47
|
ref?: React.Ref<HTMLDivElement>;
|
|
48
48
|
} & {
|
|
49
49
|
asChild?: boolean;
|
|
50
|
-
}, "key" | "asChild"
|
|
50
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "key" | "asChild">, "value" | "heading"> & {
|
|
51
51
|
heading?: React.ReactNode;
|
|
52
52
|
value?: string;
|
|
53
53
|
forceMount?: boolean;
|
|
54
54
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
55
55
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
56
56
|
children?: React.ReactNode;
|
|
57
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
57
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
58
58
|
ref?: React.Ref<HTMLDivElement>;
|
|
59
59
|
} & {
|
|
60
60
|
asChild?: boolean;
|
|
61
|
-
}, "key" | "asChild"
|
|
61
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "key" | "asChild">, "value" | "onSelect" | "disabled"> & {
|
|
62
62
|
disabled?: boolean;
|
|
63
63
|
onSelect?: (value: string) => void;
|
|
64
64
|
value?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/components/command/command.tsx"],"mappings":";;cAOM,SAAO,MAAA,0BAAA;;;;;;;;;;;;;;;;IAYX,MAAA,cAAA,0BAAA,MAAA,cAAA;cAGI,cAAY,MAAA,0BAAA,KAAA,KAAA,KAAA,KAAA,MAAA,kBAAA,MAAA,oBAAA,mBAAA,iCAAA,MAAA,oBAAA;;;;;;;IAehB,MAAA,cAAA,4BAAA,MAAA,cAAA;cAGI,aAAW,MAAA,0BAAA;;;;;;;;IAYf,MAAA,cAAA,0BAAA,MAAA,cAAA;cAGI,cAAY,MAAA,0BAAA;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/components/command/command.tsx"],"mappings":";;cAOM,SAAO,MAAA,0BAAA;;;;;;;;;;;;;;;;IAYX,MAAA,cAAA,0BAAA,MAAA,cAAA;cAGI,cAAY,MAAA,0BAAA,KAAA,KAAA,KAAA,KAAA,MAAA,kBAAA,MAAA,oBAAA,mBAAA,iCAAA,MAAA,oBAAA;;;;;;;IAehB,MAAA,cAAA,4BAAA,MAAA,cAAA;cAGI,aAAW,MAAA,0BAAA;;;;;;;;IAYf,MAAA,cAAA,0BAAA,MAAA,cAAA;cAGI,cAAY,MAAA,0BAAA;;;;;;SAShB,MAAA,eAAA,uCAAA,MAAA,cAAA,0BAAA,MAAA,cAAA;cAGI,cAAY,MAAA,0BAAA;;;;;;;;;;IAYhB,MAAA,cAAA,0BAAA,MAAA,cAAA;cAGI,aAAW,MAAA,0BAAA;;;;;;;;;;;;IAYf,MAAA,cAAA,0BAAA,MAAA,cAAA;cAGI;KAGH,cAAA,SAAA,MAAM,eAAe,mBAAgB,MAAA,IAAA;;;cAoBlC,eAAa,MAAA,0BAAA,MAAA,eAAA,kBAAA,MAAA,cAAA"}
|
|
@@ -20,14 +20,14 @@ const ContextMenuContent = react.forwardRef(({ className, ...props }, ref) => /*
|
|
|
20
20
|
sideOffset: 4,
|
|
21
21
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_menu.Menu.Popup, {
|
|
22
22
|
ref,
|
|
23
|
-
className: require_utils.cn("z-50 min-w-[8rem] overflow-hidden rounded-
|
|
23
|
+
className: require_utils.cn("z-50 min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1.5 text-popover-foreground shadow-(--shadow-xl) outline-none data-open:animate-overlay-in data-closed:animate-overlay-out", className),
|
|
24
24
|
...props
|
|
25
25
|
})
|
|
26
26
|
}) }));
|
|
27
27
|
ContextMenuContent.displayName = "ContextMenuContent";
|
|
28
28
|
const ContextMenuItem = react.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_menu.Menu.Item, {
|
|
29
29
|
ref,
|
|
30
|
-
className: require_utils.cn("relative flex cursor-pointer select-none items-center rounded-
|
|
30
|
+
className: require_utils.cn("relative flex cursor-pointer select-none items-center gap-2 rounded-md px-3 py-2 text-xs outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground", inset && "pl-8", className),
|
|
31
31
|
...props
|
|
32
32
|
}));
|
|
33
33
|
ContextMenuItem.displayName = "ContextMenuItem";
|
|
@@ -17,14 +17,14 @@ const ContextMenuContent = React.forwardRef(({ className, ...props }, ref) => /*
|
|
|
17
17
|
sideOffset: 4,
|
|
18
18
|
children: /* @__PURE__ */ jsx(Menu.Popup, {
|
|
19
19
|
ref,
|
|
20
|
-
className: cn("z-50 min-w-[8rem] overflow-hidden rounded-
|
|
20
|
+
className: cn("z-50 min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1.5 text-popover-foreground shadow-(--shadow-xl) outline-none data-open:animate-overlay-in data-closed:animate-overlay-out", className),
|
|
21
21
|
...props
|
|
22
22
|
})
|
|
23
23
|
}) }));
|
|
24
24
|
ContextMenuContent.displayName = "ContextMenuContent";
|
|
25
25
|
const ContextMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(Menu.Item, {
|
|
26
26
|
ref,
|
|
27
|
-
className: cn("relative flex cursor-pointer select-none items-center rounded-
|
|
27
|
+
className: cn("relative flex cursor-pointer select-none items-center gap-2 rounded-md px-3 py-2 text-xs outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground", inset && "pl-8", className),
|
|
28
28
|
...props
|
|
29
29
|
}));
|
|
30
30
|
ContextMenuItem.displayName = "ContextMenuItem";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["BaseMenu"],"sources":["../../../src/components/context-menu/context-menu.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport { cn } from \"../../lib/utils\";\n\nexport const ContextMenu = BaseMenu.Root;\nexport const ContextMenuPortal = BaseMenu.Portal;\nexport const ContextMenuPositioner = BaseMenu.Positioner;\n\nexport const ContextMenuTrigger = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"cursor-context-menu\", className)}\n {...props}\n />\n));\nContextMenuTrigger.displayName = \"ContextMenuTrigger\";\n\nexport const ContextMenuContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<typeof BaseMenu.Popup>\n>(({ className, ...props }, ref) => (\n <ContextMenuPortal>\n <BaseMenu.Positioner sideOffset={4}>\n <BaseMenu.Popup\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["BaseMenu"],"sources":["../../../src/components/context-menu/context-menu.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport { cn } from \"../../lib/utils\";\n\nexport const ContextMenu = BaseMenu.Root;\nexport const ContextMenuPortal = BaseMenu.Portal;\nexport const ContextMenuPositioner = BaseMenu.Positioner;\n\nexport const ContextMenuTrigger = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"cursor-context-menu\", className)}\n {...props}\n />\n));\nContextMenuTrigger.displayName = \"ContextMenuTrigger\";\n\nexport const ContextMenuContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<typeof BaseMenu.Popup>\n>(({ className, ...props }, ref) => (\n <ContextMenuPortal>\n <BaseMenu.Positioner sideOffset={4}>\n <BaseMenu.Popup\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1.5 text-popover-foreground shadow-(--shadow-xl) outline-none data-open:animate-overlay-in data-closed:animate-overlay-out\",\n className\n )}\n {...props}\n />\n </BaseMenu.Positioner>\n </ContextMenuPortal>\n));\nContextMenuContent.displayName = \"ContextMenuContent\";\n\nexport const ContextMenuItem = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<typeof BaseMenu.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <BaseMenu.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center gap-2 rounded-md px-3 py-2 text-xs outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n));\nContextMenuItem.displayName = \"ContextMenuItem\";\n\nexport const ContextMenuSeparator = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<typeof BaseMenu.Separator>\n>(({ className, ...props }, ref) => (\n <BaseMenu.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n));\nContextMenuSeparator.displayName = \"ContextMenuSeparator\";\n\nexport const ContextMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground font-mono\",\n className\n )}\n {...props}\n />\n );\n};\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\n"],"mappings":";;;;;AAKA,MAAa,cAAcA,KAAS;AACpC,MAAa,oBAAoBA,KAAS;AAC1C,MAAa,wBAAwBA,KAAS;AAE9C,MAAa,qBAAqB,MAAM,YAGrC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,OAAD;CACO;CACL,WAAW,GAAG,uBAAuB,SAAS;CAC9C,GAAI;AACL,CAAA,CACF;AACD,mBAAmB,cAAc;AAEjC,MAAa,qBAAqB,MAAM,YAGrC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,mBAAD,EAAA,UACE,oBAACA,KAAS,YAAV;CAAqB,YAAY;CAC/B,UAAA,oBAACA,KAAS,OAAV;EACO;EACL,WAAW,GACT,6MACA,SACF;EACA,GAAI;CACL,CAAA;AACkB,CAAA,EACJ,CAAA,CACpB;AACD,mBAAmB,cAAc;AAEjC,MAAa,kBAAkB,MAAM,YAKlC,EAAE,WAAW,OAAO,GAAG,SAAS,QACjC,oBAACA,KAAS,MAAV;CACO;CACL,WAAW,GACT,8SACA,SAAS,QACT,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,gBAAgB,cAAc;AAE9B,MAAa,uBAAuB,MAAM,YAGvC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAACA,KAAS,WAAV;CACO;CACL,WAAW,GAAG,6BAA6B,SAAS;CACpD,GAAI;AACL,CAAA,CACF;AACD,qBAAqB,cAAc;AAEnC,MAAa,uBAAuB,EAClC,WACA,GAAG,YACwC;CAC3C,OACE,oBAAC,QAAD;EACE,WAAW,GACT,mEACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AACA,oBAAoB,cAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as CopyButtonProps, t as CopyButton } from "../../index-
|
|
1
|
+
import { n as CopyButtonProps, t as CopyButton } from "../../index-D5_0x-hC.cjs";
|
|
2
2
|
export { CopyButton, type CopyButtonProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as CopyButtonProps, t as CopyButton } from "../../index-
|
|
1
|
+
import { n as CopyButtonProps, t as CopyButton } from "../../index-2Vh9mMtN.mjs";
|
|
2
2
|
export { CopyButton, type CopyButtonProps };
|
|
@@ -69,7 +69,7 @@ function DataTable({ columns, data, filterColumnKey, filterPlaceholder = "Filter
|
|
|
69
69
|
})]
|
|
70
70
|
}),
|
|
71
71
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
72
|
-
className: "rounded-
|
|
72
|
+
className: "rounded-lg border border-border bg-background overflow-x-auto",
|
|
73
73
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("table", {
|
|
74
74
|
className: "w-full text-left text-xs text-foreground border-collapse",
|
|
75
75
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", {
|
|
@@ -66,7 +66,7 @@ function DataTable({ columns, data, filterColumnKey, filterPlaceholder = "Filter
|
|
|
66
66
|
})]
|
|
67
67
|
}),
|
|
68
68
|
/* @__PURE__ */ jsx("div", {
|
|
69
|
-
className: "rounded-
|
|
69
|
+
className: "rounded-lg border border-border bg-background overflow-x-auto",
|
|
70
70
|
children: /* @__PURE__ */ jsxs("table", {
|
|
71
71
|
className: "w-full text-left text-xs text-foreground border-collapse",
|
|
72
72
|
children: [/* @__PURE__ */ jsx("thead", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/components/data-table/data-table.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n ColumnDef,\n ColumnFiltersState,\n SortingState,\n VisibilityState,\n flexRender,\n getCoreRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from \"@tanstack/react-table\";\nimport {\n ChevronLeft,\n ChevronRight,\n ChevronsLeft,\n ChevronsRight,\n ArrowUpDown,\n} from \"lucide-react\";\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../button\";\nimport { Input } from \"../input\";\n\nexport interface DataTableProps<TData, TValue> {\n columns: ColumnDef<TData, TValue>[];\n data: TData[];\n filterColumnKey?: string;\n filterPlaceholder?: string;\n pageSize?: number;\n className?: string;\n}\n\nexport function DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: {\n column: any;\n title: string;\n className?: string;\n}) {\n if (!column.getCanSort()) {\n return (\n <div className={cn(\"text-xs font-semibold text-muted-foreground\", className)}>\n {title}\n </div>\n );\n }\n\n return (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n className={cn(\n \"-ml-3 h-8 text-xs font-semibold text-muted-foreground hover:text-foreground\",\n className\n )}\n >\n <span>{title}</span>\n <ArrowUpDown className=\"ml-2 h-3.5 w-3.5\" />\n </Button>\n );\n}\n\nexport function DataTable<TData, TValue>({\n columns,\n data,\n filterColumnKey,\n filterPlaceholder = \"Filter results...\",\n pageSize = 5,\n className,\n}: DataTableProps<TData, TValue>) {\n const [sorting, setSorting] = React.useState<SortingState>([]);\n const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>(\n []\n );\n const [columnVisibility, setColumnVisibility] =\n React.useState<VisibilityState>({});\n const [globalFilter, setGlobalFilter] = React.useState(\"\");\n\n const table = useReactTable({\n data,\n columns,\n state: {\n sorting,\n columnFilters,\n columnVisibility,\n globalFilter,\n },\n onSortingChange: setSorting,\n onColumnFiltersChange: setColumnFilters,\n onColumnVisibilityChange: setColumnVisibility,\n onGlobalFilterChange: setGlobalFilter,\n getCoreRowModel: getCoreRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n getSortedRowModel: getSortedRowModel(),\n initialState: {\n pagination: {\n pageSize,\n },\n },\n });\n\n return (\n <div className={cn(\"w-full space-y-4\", className)}>\n {/* Toolbar / Search */}\n <div className=\"flex items-center justify-between gap-4\">\n <Input\n placeholder={filterPlaceholder}\n value={\n filterColumnKey\n ? (table.getColumn(filterColumnKey)?.getFilterValue() as string) ??\n \"\"\n : globalFilter\n }\n onChange={(event) => {\n if (filterColumnKey) {\n table\n .getColumn(filterColumnKey)\n ?.setFilterValue(event.target.value);\n } else {\n setGlobalFilter(event.target.value);\n }\n }}\n className=\"max-w-sm h-9 text-xs\"\n />\n <div\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n className=\"text-xs text-muted-foreground font-mono\"\n >\n {table.getFilteredRowModel().rows.length} row(s) total\n </div>\n </div>\n\n {/* Table grid */}\n <div className=\"rounded-xl border border-border bg-background overflow-x-auto\">\n <table className=\"w-full text-left text-xs text-foreground border-collapse\">\n <thead className=\"bg-muted/50 border-b border-border text-muted-foreground uppercase tracking-wider\">\n {table.getHeaderGroups().map((headerGroup) => (\n <tr key={headerGroup.id}>\n {headerGroup.headers.map((header) => (\n <th key={header.id} className=\"px-4 py-3 font-semibold\">\n {header.isPlaceholder\n ? null\n : flexRender(\n header.column.columnDef.header,\n header.getContext()\n )}\n </th>\n ))}\n </tr>\n ))}\n </thead>\n <tbody className=\"divide-y divide-border/60\">\n {table.getRowModel().rows?.length ? (\n table.getRowModel().rows.map((row) => (\n <tr\n key={row.id}\n className=\"hover:bg-muted/50 transition-colors data-[selected=true]:bg-muted\"\n >\n {row.getVisibleCells().map((cell) => (\n <td key={cell.id} className=\"px-4 py-3 text-foreground\">\n {flexRender(\n cell.column.columnDef.cell,\n cell.getContext()\n )}\n </td>\n ))}\n </tr>\n ))\n ) : (\n <tr>\n <td\n colSpan={columns.length}\n className=\"h-24 text-center text-muted-foreground\"\n >\n No results found.\n </td>\n </tr>\n )}\n </tbody>\n </table>\n </div>\n\n {/* Pagination controls */}\n <div className=\"flex items-center justify-between px-2 text-xs text-muted-foreground\">\n <div>\n Page {table.getState().pagination.pageIndex + 1} of{\" \"}\n {table.getPageCount() || 1}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => table.setPageIndex(0)}\n disabled={!table.getCanPreviousPage()}\n aria-label=\"First page\"\n className=\"h-8 w-8 p-0\"\n >\n <ChevronsLeft className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n aria-label=\"Previous page\"\n className=\"h-8 w-8 p-0\"\n >\n <ChevronLeft className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => table.nextPage()}\n disabled={!table.getCanNextPage()}\n aria-label=\"Next page\"\n className=\"h-8 w-8 p-0\"\n >\n <ChevronRight className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n disabled={!table.getCanNextPage()}\n aria-label=\"Last page\"\n className=\"h-8 w-8 p-0\"\n >\n <ChevronsRight className=\"h-4 w-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAmCA,SAAgB,sBAAqC,EACnD,QACA,OACA,aAKC;CACD,IAAI,CAAC,OAAO,WAAW,GACrB,OACE,oBAAC,OAAD;EAAK,WAAW,GAAG,+CAA+C,SAAS;EACxE,UAAA;CACE,CAAA;CAIT,OACE,qBAAC,QAAD;EACE,SAAQ;EACR,MAAK;EACL,eAAe,OAAO,cAAc,OAAO,YAAY,MAAM,KAAK;EAClE,WAAW,GACT,+EACA,SACF;EAPF,UAAA,CASE,oBAAC,QAAD,EAAA,UAAO,MAAY,CAAA,GACnB,oBAAC,aAAD,EAAa,WAAU,mBAAoB,CAAA,CACrC;;AAEZ;AAEA,SAAgB,UAAyB,EACvC,SACA,MACA,iBACA,oBAAoB,qBACpB,WAAW,GACX,aACgC;CAChC,MAAM,CAAC,SAAS,cAAc,MAAM,SAAuB,CAAC,CAAC;CAC7D,MAAM,CAAC,eAAe,oBAAoB,MAAM,SAC9C,CAAC,CACH;CACA,MAAM,CAAC,kBAAkB,uBACvB,MAAM,SAA0B,CAAC,CAAC;CACpC,MAAM,CAAC,cAAc,mBAAmB,MAAM,SAAS,EAAE;CAEzD,MAAM,QAAQ,cAAc;EAC1B;EACA;EACA,OAAO;GACL;GACA;GACA;GACA;EACF;EACA,iBAAiB;EACjB,uBAAuB;EACvB,0BAA0B;EAC1B,sBAAsB;EACtB,iBAAiB,gBAAgB;EACjC,qBAAqB,oBAAoB;EACzC,uBAAuB,sBAAsB;EAC7C,mBAAmB,kBAAkB;EACrC,cAAc,EACZ,YAAY,EACV,SACF,EACF;CACF,CAAC;CAED,OACE,qBAAC,OAAD;E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AAD;OACE,SAAS,QAAQ;OACjB,WAAU;OACX,UAAA;MAEG,CAAA,EACF,CAAA;KAED,CAAA,CACF;;GACJ,CAAA;GAGL,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,qBAAC,OAAD,EAAA,UAAA;KAAK;KACG,MAAM,SAAS,CAAC,CAAC,WAAW,YAAY;KAAE;KAAI;KACnD,MAAM,aAAa,KAAK;IACtB,EAAA,CAAA,GACL,qBAAC,OAAD;KAAK,WAAU;KAAf,UAAA;MACE,oBAAC,QAAD;OACE,SAAQ;OACR,MAAK;OACL,eAAe,MAAM,aAAa,CAAC;OACnC,UAAU,CAAC,MAAM,mBAAmB;OACpC,cAAW;OACX,WAAU;OAEV,UAAA,oBAAC,cAAD,EAAc,WAAU,UAAW,CAAA;MAC7B,CAAA;MACR,oBAAC,QAAD;OACE,SAAQ;OACR,MAAK;OACL,eAAe,MAAM,aAAa;OAClC,UAAU,CAAC,MAAM,mBAAmB;OACpC,cAAW;OACX,WAAU;OAEV,UAAA,oBAAC,aAAD,EAAa,WAAU,UAAW,CAAA;MAC5B,CAAA;MACR,oBAAC,QAAD;OACE,SAAQ;OACR,MAAK;OACL,eAAe,MAAM,SAAS;OAC9B,UAAU,CAAC,MAAM,eAAe;OAChC,cAAW;OACX,WAAU;OAEV,UAAA,oBAAC,cAAD,EAAc,WAAU,UAAW,CAAA;MAC7B,CAAA;MACR,oBAAC,QAAD;OACE,SAAQ;OACR,MAAK;OACL,eAAe,MAAM,aAAa,MAAM,aAAa,IAAI,CAAC;OAC1D,UAAU,CAAC,MAAM,eAAe;OAChC,cAAW;OACX,WAAU;OAEV,UAAA,oBAAC,eAAD,EAAe,WAAU,UAAW,CAAA;MAC9B,CAAA;KACL;IACF,CAAA,CAAA;;EACF;;AAET"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/components/data-table/data-table.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n ColumnDef,\n ColumnFiltersState,\n SortingState,\n VisibilityState,\n flexRender,\n getCoreRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from \"@tanstack/react-table\";\nimport {\n ChevronLeft,\n ChevronRight,\n ChevronsLeft,\n ChevronsRight,\n ArrowUpDown,\n} from \"lucide-react\";\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../button\";\nimport { Input } from \"../input\";\n\nexport interface DataTableProps<TData, TValue> {\n columns: ColumnDef<TData, TValue>[];\n data: TData[];\n filterColumnKey?: string;\n filterPlaceholder?: string;\n pageSize?: number;\n className?: string;\n}\n\nexport function DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: {\n column: any;\n title: string;\n className?: string;\n}) {\n if (!column.getCanSort()) {\n return (\n <div className={cn(\"text-xs font-semibold text-muted-foreground\", className)}>\n {title}\n </div>\n );\n }\n\n return (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n className={cn(\n \"-ml-3 h-8 text-xs font-semibold text-muted-foreground hover:text-foreground\",\n className\n )}\n >\n <span>{title}</span>\n <ArrowUpDown className=\"ml-2 h-3.5 w-3.5\" />\n </Button>\n );\n}\n\nexport function DataTable<TData, TValue>({\n columns,\n data,\n filterColumnKey,\n filterPlaceholder = \"Filter results...\",\n pageSize = 5,\n className,\n}: DataTableProps<TData, TValue>) {\n const [sorting, setSorting] = React.useState<SortingState>([]);\n const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>(\n []\n );\n const [columnVisibility, setColumnVisibility] =\n React.useState<VisibilityState>({});\n const [globalFilter, setGlobalFilter] = React.useState(\"\");\n\n const table = useReactTable({\n data,\n columns,\n state: {\n sorting,\n columnFilters,\n columnVisibility,\n globalFilter,\n },\n onSortingChange: setSorting,\n onColumnFiltersChange: setColumnFilters,\n onColumnVisibilityChange: setColumnVisibility,\n onGlobalFilterChange: setGlobalFilter,\n getCoreRowModel: getCoreRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n getSortedRowModel: getSortedRowModel(),\n initialState: {\n pagination: {\n pageSize,\n },\n },\n });\n\n return (\n <div className={cn(\"w-full space-y-4\", className)}>\n {/* Toolbar / Search */}\n <div className=\"flex items-center justify-between gap-4\">\n <Input\n placeholder={filterPlaceholder}\n value={\n filterColumnKey\n ? (table.getColumn(filterColumnKey)?.getFilterValue() as string) ??\n \"\"\n : globalFilter\n }\n onChange={(event) => {\n if (filterColumnKey) {\n table\n .getColumn(filterColumnKey)\n ?.setFilterValue(event.target.value);\n } else {\n setGlobalFilter(event.target.value);\n }\n }}\n className=\"max-w-sm h-9 text-xs\"\n />\n <div\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n className=\"text-xs text-muted-foreground font-mono\"\n >\n {table.getFilteredRowModel().rows.length} row(s) total\n </div>\n </div>\n\n {/* Table grid */}\n <div className=\"rounded-lg border border-border bg-background overflow-x-auto\">\n <table className=\"w-full text-left text-xs text-foreground border-collapse\">\n <thead className=\"bg-muted/50 border-b border-border text-muted-foreground uppercase tracking-wider\">\n {table.getHeaderGroups().map((headerGroup) => (\n <tr key={headerGroup.id}>\n {headerGroup.headers.map((header) => (\n <th key={header.id} className=\"px-4 py-3 font-semibold\">\n {header.isPlaceholder\n ? null\n : flexRender(\n header.column.columnDef.header,\n header.getContext()\n )}\n </th>\n ))}\n </tr>\n ))}\n </thead>\n <tbody className=\"divide-y divide-border/60\">\n {table.getRowModel().rows?.length ? (\n table.getRowModel().rows.map((row) => (\n <tr\n key={row.id}\n className=\"hover:bg-muted/50 transition-colors data-[selected=true]:bg-muted\"\n >\n {row.getVisibleCells().map((cell) => (\n <td key={cell.id} className=\"px-4 py-3 text-foreground\">\n {flexRender(\n cell.column.columnDef.cell,\n cell.getContext()\n )}\n </td>\n ))}\n </tr>\n ))\n ) : (\n <tr>\n <td\n colSpan={columns.length}\n className=\"h-24 text-center text-muted-foreground\"\n >\n No results found.\n </td>\n </tr>\n )}\n </tbody>\n </table>\n </div>\n\n {/* Pagination controls */}\n <div className=\"flex items-center justify-between px-2 text-xs text-muted-foreground\">\n <div>\n Page {table.getState().pagination.pageIndex + 1} of{\" \"}\n {table.getPageCount() || 1}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => table.setPageIndex(0)}\n disabled={!table.getCanPreviousPage()}\n aria-label=\"First page\"\n className=\"h-8 w-8 p-0\"\n >\n <ChevronsLeft className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n aria-label=\"Previous page\"\n className=\"h-8 w-8 p-0\"\n >\n <ChevronLeft className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => table.nextPage()}\n disabled={!table.getCanNextPage()}\n aria-label=\"Next page\"\n className=\"h-8 w-8 p-0\"\n >\n <ChevronRight className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n disabled={!table.getCanNextPage()}\n aria-label=\"Last page\"\n className=\"h-8 w-8 p-0\"\n >\n <ChevronsRight className=\"h-4 w-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAmCA,SAAgB,sBAAqC,EACnD,QACA,OACA,aAKC;CACD,IAAI,CAAC,OAAO,WAAW,GACrB,OACE,oBAAC,OAAD;EAAK,WAAW,GAAG,+CAA+C,SAAS;EACxE,UAAA;CACE,CAAA;CAIT,OACE,qBAAC,QAAD;EACE,SAAQ;EACR,MAAK;EACL,eAAe,OAAO,cAAc,OAAO,YAAY,MAAM,KAAK;EAClE,WAAW,GACT,+EACA,SACF;EAPF,UAAA,CASE,oBAAC,QAAD,EAAA,UAAO,MAAY,CAAA,GACnB,oBAAC,aAAD,EAAa,WAA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W;OACX,WAAU;OAEV,UAAA,oBAAC,aAAD,EAAa,WAAU,UAAW,CAAA;MAC5B,CAAA;MACR,oBAAC,QAAD;OACE,SAAQ;OACR,MAAK;OACL,eAAe,MAAM,SAAS;OAC9B,UAAU,CAAC,MAAM,eAAe;OAChC,cAAW;OACX,WAAU;OAEV,UAAA,oBAAC,cAAD,EAAc,WAAU,UAAW,CAAA;MAC7B,CAAA;MACR,oBAAC,QAAD;OACE,SAAQ;OACR,MAAK;OACL,eAAe,MAAM,aAAa,MAAM,aAAa,IAAI,CAAC;OAC1D,UAAU,CAAC,MAAM,eAAe;OAChC,cAAW;OACX,WAAU;OAEV,UAAA,oBAAC,eAAD,EAAe,WAAU,UAAW,CAAA;MAC9B,CAAA;KACL;IACF,CAAA,CAAA;;EACF;;AAET"}
|
|
@@ -18,27 +18,28 @@ const DialogBackdrop = react.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
18
18
|
...props
|
|
19
19
|
}));
|
|
20
20
|
DialogBackdrop.displayName = "DialogBackdrop";
|
|
21
|
-
const DialogContent = react.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DialogPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogBackdrop, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_dialog.Dialog.Popup, {
|
|
21
|
+
const DialogContent = react.forwardRef(({ className, children, closeLabel = "Close", ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DialogPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogBackdrop, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_dialog.Dialog.Popup, {
|
|
22
22
|
ref,
|
|
23
|
-
|
|
23
|
+
"data-slot": "dialog-content",
|
|
24
|
+
className: require_utils.cn("fixed left-[50%] top-[50%] z-50 grid max-h-[calc(100dvh-2rem)] w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-5 overflow-y-auto overscroll-contain rounded-lg border border-border bg-popover text-popover-foreground px-7 py-6 shadow-(--shadow-xl) data-open:animate-overlay-in data-closed:animate-overlay-out", className),
|
|
24
25
|
...props,
|
|
25
26
|
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_dialog.Dialog.Close, {
|
|
26
|
-
"aria-label":
|
|
27
|
-
className: "absolute right-
|
|
27
|
+
"aria-label": closeLabel,
|
|
28
|
+
className: "absolute right-3 top-3 inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground opacity-80 ring-offset-background transition-[opacity,transform,color] duration-150 hover:opacity-100 hover:text-foreground active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none",
|
|
28
29
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: "h-4 w-4" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
29
30
|
className: "sr-only",
|
|
30
|
-
children:
|
|
31
|
+
children: closeLabel
|
|
31
32
|
})]
|
|
32
33
|
})]
|
|
33
34
|
})] }));
|
|
34
35
|
DialogContent.displayName = "DialogContent";
|
|
35
36
|
const DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
36
|
-
className: require_utils.cn("flex flex-col space-y-
|
|
37
|
+
className: require_utils.cn("flex flex-col space-y-2 text-center sm:text-left", className),
|
|
37
38
|
...props
|
|
38
39
|
});
|
|
39
40
|
DialogHeader.displayName = "DialogHeader";
|
|
40
41
|
const DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
41
|
-
className: require_utils.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
42
|
+
className: require_utils.cn("flex flex-col-reverse gap-2 pt-2 sm:flex-row sm:justify-end sm:gap-3", className),
|
|
42
43
|
...props
|
|
43
44
|
});
|
|
44
45
|
DialogFooter.displayName = "DialogFooter";
|
|
@@ -6,7 +6,9 @@ declare const DialogTrigger: Dialog$1.Trigger;
|
|
|
6
6
|
declare const DialogPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
declare const DialogClose: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
8
8
|
declare const DialogBackdrop: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
declare const DialogContent: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> &
|
|
9
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
closeLabel?: string;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
10
12
|
declare const DialogHeader: {
|
|
11
13
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
12
14
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/components/dialog/dialog.tsx"],"mappings":";;;cAKa,eAAM,SAAA;cACN,eAAa,SAAA;cACb,cAAY,MAAA,0BAAA,8BAAA,iCAAA,MAAA,cAAA;cACZ,aAAW,MAAA,0BAAA,8BAAA,gCAAA,MAAA,cAAA;cAEX,gBAAc,MAAA,0BAAA,KAAA,8BAAA,mCAAA,MAAA,cAAA,0BAAA,MAAA,cAAA;cAed,eAAa,MAAA,0BAAA,KAAA,8BAAA,gCAAA,MAAA,cAAA,
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/components/dialog/dialog.tsx"],"mappings":";;;cAKa,eAAM,SAAA;cACN,eAAa,SAAA;cACb,cAAY,MAAA,0BAAA,8BAAA,iCAAA,MAAA,cAAA;cACZ,aAAW,MAAA,0BAAA,8BAAA,gCAAA,MAAA,cAAA;cAEX,gBAAc,MAAA,0BAAA,KAAA,8BAAA,mCAAA,MAAA,cAAA,0BAAA,MAAA,cAAA;cAed,eAAa,MAAA,0BAAA,KAAA,8BAAA,gCAAA,MAAA,cAAA;EAGT;IAqBf,MAAA,cAAA;cAGW;KAGV,cAAA,SAAA,MAAM,eAAe,kBAAe,MAAA,IAAA;;;cAQ1B;KAGV,cAAA,SAAA,MAAM,eAAe,kBAAe,MAAA,IAAA;;;cAQ1B,aAAW,MAAA,0BAAA,KAAA,8BAAA,gCAAA,MAAA,cAAA,8BAAA,MAAA,cAAA;cAYX,mBAAiB,MAAA,0BAAA,KAAA,8BAAA,sCAAA,MAAA,cAAA,gCAAA,MAAA,cAAA"}
|
|
@@ -6,7 +6,9 @@ declare const DialogTrigger: Dialog$1.Trigger;
|
|
|
6
6
|
declare const DialogPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
declare const DialogClose: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
8
8
|
declare const DialogBackdrop: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
declare const DialogContent: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> &
|
|
9
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
closeLabel?: string;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
10
12
|
declare const DialogHeader: {
|
|
11
13
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
12
14
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/components/dialog/dialog.tsx"],"mappings":";;;cAKa,eAAM,SAAA;cACN,eAAa,SAAA;cACb,cAAY,MAAA,0BAAA,8BAAA,iCAAA,MAAA,cAAA;cACZ,aAAW,MAAA,0BAAA,8BAAA,gCAAA,MAAA,cAAA;cAEX,gBAAc,MAAA,0BAAA,KAAA,8BAAA,mCAAA,MAAA,cAAA,0BAAA,MAAA,cAAA;cAed,eAAa,MAAA,0BAAA,KAAA,8BAAA,gCAAA,MAAA,cAAA,
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/components/dialog/dialog.tsx"],"mappings":";;;cAKa,eAAM,SAAA;cACN,eAAa,SAAA;cACb,cAAY,MAAA,0BAAA,8BAAA,iCAAA,MAAA,cAAA;cACZ,aAAW,MAAA,0BAAA,8BAAA,gCAAA,MAAA,cAAA;cAEX,gBAAc,MAAA,0BAAA,KAAA,8BAAA,mCAAA,MAAA,cAAA,0BAAA,MAAA,cAAA;cAed,eAAa,MAAA,0BAAA,KAAA,8BAAA,gCAAA,MAAA,cAAA;EAGT;IAqBf,MAAA,cAAA;cAGW;KAGV,cAAA,SAAA,MAAM,eAAe,kBAAe,MAAA,IAAA;;;cAQ1B;KAGV,cAAA,SAAA,MAAM,eAAe,kBAAe,MAAA,IAAA;;;cAQ1B,aAAW,MAAA,0BAAA,KAAA,8BAAA,gCAAA,MAAA,cAAA,8BAAA,MAAA,cAAA;cAYX,mBAAiB,MAAA,0BAAA,KAAA,8BAAA,sCAAA,MAAA,cAAA,gCAAA,MAAA,cAAA"}
|
|
@@ -15,27 +15,28 @@ const DialogBackdrop = React.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
15
15
|
...props
|
|
16
16
|
}));
|
|
17
17
|
DialogBackdrop.displayName = "DialogBackdrop";
|
|
18
|
-
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogBackdrop, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
|
|
18
|
+
const DialogContent = React.forwardRef(({ className, children, closeLabel = "Close", ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogBackdrop, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
|
|
19
19
|
ref,
|
|
20
|
-
|
|
20
|
+
"data-slot": "dialog-content",
|
|
21
|
+
className: cn("fixed left-[50%] top-[50%] z-50 grid max-h-[calc(100dvh-2rem)] w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-5 overflow-y-auto overscroll-contain rounded-lg border border-border bg-popover text-popover-foreground px-7 py-6 shadow-(--shadow-xl) data-open:animate-overlay-in data-closed:animate-overlay-out", className),
|
|
21
22
|
...props,
|
|
22
23
|
children: [children, /* @__PURE__ */ jsxs(Dialog$1.Close, {
|
|
23
|
-
"aria-label":
|
|
24
|
-
className: "absolute right-
|
|
24
|
+
"aria-label": closeLabel,
|
|
25
|
+
className: "absolute right-3 top-3 inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground opacity-80 ring-offset-background transition-[opacity,transform,color] duration-150 hover:opacity-100 hover:text-foreground active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none",
|
|
25
26
|
children: [/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
26
27
|
className: "sr-only",
|
|
27
|
-
children:
|
|
28
|
+
children: closeLabel
|
|
28
29
|
})]
|
|
29
30
|
})]
|
|
30
31
|
})] }));
|
|
31
32
|
DialogContent.displayName = "DialogContent";
|
|
32
33
|
const DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
33
|
-
className: cn("flex flex-col space-y-
|
|
34
|
+
className: cn("flex flex-col space-y-2 text-center sm:text-left", className),
|
|
34
35
|
...props
|
|
35
36
|
});
|
|
36
37
|
DialogHeader.displayName = "DialogHeader";
|
|
37
38
|
const DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
38
|
-
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
39
|
+
className: cn("flex flex-col-reverse gap-2 pt-2 sm:flex-row sm:justify-end sm:gap-3", className),
|
|
39
40
|
...props
|
|
40
41
|
});
|
|
41
42
|
DialogFooter.displayName = "DialogFooter";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["BaseDialog"],"sources":["../../../src/components/dialog/dialog.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { X } from \"lucide-react\";\nimport { cn } from \"../../lib/utils\";\n\nexport const Dialog = BaseDialog.Root;\nexport const DialogTrigger = BaseDialog.Trigger;\nexport const DialogPortal = BaseDialog.Portal;\nexport const DialogClose = BaseDialog.Close;\n\nexport const DialogBackdrop = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<typeof BaseDialog.Backdrop>\n>(({ className, ...props }, ref) => (\n <BaseDialog.Backdrop\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-void/80 backdrop-blur-md data-open:animate-fade-in data-closed:animate-fade-out\",\n className\n )}\n {...props}\n />\n));\nDialogBackdrop.displayName = \"DialogBackdrop\";\n\nexport const DialogContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<typeof BaseDialog.Popup
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["BaseDialog"],"sources":["../../../src/components/dialog/dialog.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { X } from \"lucide-react\";\nimport { cn } from \"../../lib/utils\";\n\nexport const Dialog = BaseDialog.Root;\nexport const DialogTrigger = BaseDialog.Trigger;\nexport const DialogPortal = BaseDialog.Portal;\nexport const DialogClose = BaseDialog.Close;\n\nexport const DialogBackdrop = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<typeof BaseDialog.Backdrop>\n>(({ className, ...props }, ref) => (\n <BaseDialog.Backdrop\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-void/80 backdrop-blur-md data-open:animate-fade-in data-closed:animate-fade-out\",\n className\n )}\n {...props}\n />\n));\nDialogBackdrop.displayName = \"DialogBackdrop\";\n\nexport const DialogContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<typeof BaseDialog.Popup> & {\n closeLabel?: string;\n }\n>(({ className, children, closeLabel = \"Close\", ...props }, ref) => (\n <DialogPortal>\n <DialogBackdrop />\n <BaseDialog.Popup\n ref={ref}\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid max-h-[calc(100dvh-2rem)] w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-5 overflow-y-auto overscroll-contain rounded-lg border border-border bg-popover text-popover-foreground px-7 py-6 shadow-(--shadow-xl) data-open:animate-overlay-in data-closed:animate-overlay-out\",\n className\n )}\n {...props}\n >\n {children}\n <BaseDialog.Close aria-label={closeLabel} className=\"absolute right-3 top-3 inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground opacity-80 ring-offset-background transition-[opacity,transform,color] duration-150 hover:opacity-100 hover:text-foreground active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">{closeLabel}</span>\n </BaseDialog.Close>\n </BaseDialog.Popup>\n </DialogPortal>\n));\nDialogContent.displayName = \"DialogContent\";\n\nexport const DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col space-y-2 text-center sm:text-left\", className)}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nexport const DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col-reverse gap-2 pt-2 sm:flex-row sm:justify-end sm:gap-3\", className)}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nexport const DialogTitle = React.forwardRef<\n HTMLHeadingElement,\n React.ComponentPropsWithoutRef<typeof BaseDialog.Title>\n>(({ className, ...props }, ref) => (\n <BaseDialog.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight text-popover-foreground text-balance\", className)}\n {...props}\n />\n));\nDialogTitle.displayName = \"DialogTitle\";\n\nexport const DialogDescription = React.forwardRef<\n HTMLParagraphElement,\n React.ComponentPropsWithoutRef<typeof BaseDialog.Description>\n>(({ className, ...props }, ref) => (\n <BaseDialog.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground leading-relaxed text-pretty font-normal\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = \"DialogDescription\";\n"],"mappings":";;;;;;AAKA,MAAa,SAASA,SAAW;AACjC,MAAa,gBAAgBA,SAAW;AACxC,MAAa,eAAeA,SAAW;AACvC,MAAa,cAAcA,SAAW;AAEtC,MAAa,iBAAiB,MAAM,YAGjC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAACA,SAAW,UAAZ;CACO;CACL,WAAW,GACT,yGACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,eAAe,cAAc;AAE7B,MAAa,gBAAgB,MAAM,YAKhC,EAAE,WAAW,UAAU,aAAa,SAAS,GAAG,SAAS,QAC1D,qBAAC,cAAD,EAAA,UAAA,CACE,oBAAC,gBAAD,CAAiB,CAAA,GACjB,qBAACA,SAAW,OAAZ;CACO;CACL,aAAU;CACV,WAAW,GACT,gUACA,SACF;CACA,GAAI;CAPN,UAAA,CASG,UACD,qBAACA,SAAW,OAAZ;EAAkB,cAAY;EAAY,WAAU;EAApD,UAAA,CACE,oBAAC,GAAD,EAAG,WAAU,UAAW,CAAA,GACxB,oBAAC,QAAD;GAAM,WAAU;GAAW,UAAA;EAAiB,CAAA,CAC5B;CACF,CAAA,CAAA;AACN,CAAA,CAAA,EAAA,CAAA,CACf;AACD,cAAc,cAAc;AAE5B,MAAa,gBAAgB,EAC3B,WACA,GAAG,YAEH,oBAAC,OAAD;CACE,WAAW,GAAG,oDAAoD,SAAS;CAC3E,GAAI;AACL,CAAA;AAEH,aAAa,cAAc;AAE3B,MAAa,gBAAgB,EAC3B,WACA,GAAG,YAEH,oBAAC,OAAD;CACE,WAAW,GAAG,wEAAwE,SAAS;CAC/F,GAAI;AACL,CAAA;AAEH,aAAa,cAAc;AAE3B,MAAa,cAAc,MAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAACA,SAAW,OAAZ;CACO;CACL,WAAW,GAAG,0FAA0F,SAAS;CACjH,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc;AAE1B,MAAa,oBAAoB,MAAM,YAGpC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAACA,SAAW,aAAZ;CACO;CACL,WAAW,GAAG,yEAAyE,SAAS;CAChG,GAAI;AACL,CAAA,CACF;AACD,kBAAkB,cAAc"}
|
|
@@ -13,13 +13,15 @@ const DrawerPortal = _base_ui_react_drawer.Drawer.Portal;
|
|
|
13
13
|
const DrawerClose = _base_ui_react_drawer.Drawer.Close;
|
|
14
14
|
const DrawerBackdrop = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_drawer.Drawer.Backdrop, {
|
|
15
15
|
ref,
|
|
16
|
-
|
|
16
|
+
"data-slot": "drawer-backdrop",
|
|
17
|
+
className: require_utils.cn("fixed inset-0 z-50 bg-void/80 backdrop-blur-md data-open:animate-fade-in data-closed:animate-fade-out", className),
|
|
17
18
|
...props
|
|
18
19
|
}));
|
|
19
20
|
DrawerBackdrop.displayName = "DrawerBackdrop";
|
|
20
21
|
const DrawerContent = react.forwardRef(({ className, children, side = "right", ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DrawerPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DrawerBackdrop, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_drawer.Drawer.Viewport, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_drawer.Drawer.Popup, {
|
|
21
22
|
ref,
|
|
22
|
-
|
|
23
|
+
"data-slot": "drawer-content",
|
|
24
|
+
className: require_utils.cn("fixed z-50 gap-5 overflow-y-auto overscroll-contain bg-background px-7 py-6 shadow-(--shadow-xl) transition-[translate] duration-enter ease-out-expo data-closed:duration-exit", side === "top" && "inset-x-0 top-0 max-h-[calc(100dvh-2rem)] border-b data-starting-style:-translate-y-full data-ending-style:-translate-y-full", side === "bottom" && "inset-x-0 bottom-0 max-h-[calc(100dvh-2rem)] border-t data-starting-style:translate-y-full data-ending-style:translate-y-full", side === "left" && "inset-y-0 left-0 h-full w-3/4 border-r data-starting-style:-translate-x-full data-ending-style:-translate-x-full sm:max-w-sm", side === "right" && "inset-y-0 right-0 h-full w-3/4 border-l data-starting-style:translate-x-full data-ending-style:translate-x-full sm:max-w-sm", className),
|
|
23
25
|
...props,
|
|
24
26
|
children
|
|
25
27
|
}) })] }));
|
|
@@ -30,7 +32,7 @@ const DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_
|
|
|
30
32
|
});
|
|
31
33
|
DrawerHeader.displayName = "DrawerHeader";
|
|
32
34
|
const DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
33
|
-
className: require_utils.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
35
|
+
className: require_utils.cn("flex flex-col-reverse gap-2 pt-2 sm:flex-row sm:justify-end sm:gap-3", className),
|
|
34
36
|
...props
|
|
35
37
|
});
|
|
36
38
|
DrawerFooter.displayName = "DrawerFooter";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/components/drawer/drawer.tsx"],"mappings":";;;cAIa,eAAM,SAAA;cACN,eAAa,SAAA;cACb,cAAY,SAAA;cACZ,aAAW,SAAA;cAEX,gBAAc,MAAA,0BAAA,KAAA,8BAAA,8BAAA,MAAA,cAAA,0BAAA,MAAA,cAAA;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/components/drawer/drawer.tsx"],"mappings":";;;cAIa,eAAM,SAAA;cACN,eAAa,SAAA;cACb,cAAY,SAAA;cACZ,aAAW,SAAA;cAEX,gBAAc,MAAA,0BAAA,KAAA,8BAAA,8BAAA,MAAA,cAAA,0BAAA,MAAA,cAAA;cAgBd,eAAa,MAAA,0BAAA,KAAA,8BAAA,2BAAA,MAAA,cAAA;EAGf;IAuBT,MAAA,cAAA;cAGW;KAGV,cAAA,SAAA,MAAM,eAAe,kBAAe,MAAA,IAAA;;;cAQ1B;KAGV,cAAA,SAAA,MAAM,eAAe,kBAAe,MAAA,IAAA;;;cAQ1B,aAAW,MAAA,0BAAA,8BAAA,2BAAA,MAAA,cAAA;cAYX,mBAAiB,MAAA,0BAAA,8BAAA,iCAAA,MAAA,cAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/components/drawer/drawer.tsx"],"mappings":";;;cAIa,eAAM,SAAA;cACN,eAAa,SAAA;cACb,cAAY,SAAA;cACZ,aAAW,SAAA;cAEX,gBAAc,MAAA,0BAAA,KAAA,8BAAA,8BAAA,MAAA,cAAA,0BAAA,MAAA,cAAA;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/components/drawer/drawer.tsx"],"mappings":";;;cAIa,eAAM,SAAA;cACN,eAAa,SAAA;cACb,cAAY,SAAA;cACZ,aAAW,SAAA;cAEX,gBAAc,MAAA,0BAAA,KAAA,8BAAA,8BAAA,MAAA,cAAA,0BAAA,MAAA,cAAA;cAgBd,eAAa,MAAA,0BAAA,KAAA,8BAAA,2BAAA,MAAA,cAAA;EAGf;IAuBT,MAAA,cAAA;cAGW;KAGV,cAAA,SAAA,MAAM,eAAe,kBAAe,MAAA,IAAA;;;cAQ1B;KAGV,cAAA,SAAA,MAAM,eAAe,kBAAe,MAAA,IAAA;;;cAQ1B,aAAW,MAAA,0BAAA,8BAAA,2BAAA,MAAA,cAAA;cAYX,mBAAiB,MAAA,0BAAA,8BAAA,iCAAA,MAAA,cAAA"}
|