@customafk/lunas-ui 0.0.26 → 0.0.28
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/dist/{alert-dialog-D-oR0YW3.cjs → alert-dialog-26JyobJb.cjs} +1 -1
- package/dist/{alert-dialog-D-oR0YW3.cjs.map → alert-dialog-26JyobJb.cjs.map} +1 -1
- package/dist/{alert-dialog-CNHyP_A9.js → alert-dialog-Dv0cgymS.js} +1 -1
- package/dist/{alert-dialog-CNHyP_A9.js.map → alert-dialog-Dv0cgymS.js.map} +1 -1
- package/dist/{button-BmBtMriU.d.ts → button-CPBLm_02.d.ts} +5 -5
- package/dist/{button-tCnJHt8O.d.cts → button-ghXW1WTr.d.cts} +5 -5
- package/dist/{calendar-CbuOOMpK.js → calendar-B66UT_fu.js} +1 -1
- package/dist/{calendar-CbuOOMpK.js.map → calendar-B66UT_fu.js.map} +1 -1
- package/dist/{calendar-B8IKzrdN.cjs → calendar-DXegnGRJ.cjs} +1 -1
- package/dist/{calendar-B8IKzrdN.cjs.map → calendar-DXegnGRJ.cjs.map} +1 -1
- package/dist/{command-Dr2XmKV6.d.cts → command-CE_Qcgo7.d.ts} +12 -12
- package/dist/{command-Dvq-HZwH.d.ts → command-CiEjoEnP.d.cts} +12 -12
- package/dist/{command-TFZwJmux.js → command-Dbkg10QA.js} +2 -2
- package/dist/{command-TFZwJmux.js.map → command-Dbkg10QA.js.map} +1 -1
- package/dist/{command-CoB5R5FI.cjs → command-IL3ogESu.cjs} +2 -2
- package/dist/{command-CoB5R5FI.cjs.map → command-IL3ogESu.cjs.map} +1 -1
- package/dist/data-display/empty.d.cts +2 -2
- package/dist/data-display/statistic.d.cts +2 -2
- package/dist/data-display/statistic.d.ts +2 -2
- package/dist/{dialog-CSDDiHKO.js → dialog-BEdMA5Lp.js} +1 -1
- package/dist/{dialog-CSDDiHKO.js.map → dialog-BEdMA5Lp.js.map} +1 -1
- package/dist/{dialog-C-DYoapJ.d.ts → dialog-Bw_T5aco.d.cts} +12 -12
- package/dist/{dialog-_Cgij9NP.cjs → dialog-C4oHnJNN.cjs} +1 -1
- package/dist/{dialog-_Cgij9NP.cjs.map → dialog-C4oHnJNN.cjs.map} +1 -1
- package/dist/{dialog-CA0E_tNX.d.cts → dialog-CoH1pTBH.d.ts} +12 -12
- package/dist/dialogs/confirm-dialog.cjs +1 -1
- package/dist/dialogs/confirm-dialog.js +1 -1
- package/dist/dialogs/detail-dialog/component/sidebar.d.cts +4 -4
- package/dist/dialogs/detail-dialog/component/sidebar.d.ts +28 -28
- package/dist/dialogs/detail-dialog/index.cjs +1 -1
- package/dist/dialogs/detail-dialog/index.js +1 -1
- package/dist/dialogs/error-dialog.cjs +1 -1
- package/dist/dialogs/error-dialog.js +1 -1
- package/dist/dialogs/form-dialog.cjs +1 -1
- package/dist/dialogs/form-dialog.d.cts +2 -2
- package/dist/dialogs/form-dialog.d.ts +2 -2
- package/dist/dialogs/form-dialog.js +1 -1
- package/dist/dialogs/loading-dialog.cjs +1 -1
- package/dist/dialogs/loading-dialog.js +1 -1
- package/dist/{error-dialog-D5R5le-W.cjs → error-dialog-C0PDn-pj.cjs} +2 -2
- package/dist/{error-dialog-D5R5le-W.cjs.map → error-dialog-C0PDn-pj.cjs.map} +1 -1
- package/dist/{error-dialog-Q99thrSD.js → error-dialog-CCdQ8zbQ.js} +2 -2
- package/dist/{error-dialog-Q99thrSD.js.map → error-dialog-CCdQ8zbQ.js.map} +1 -1
- package/dist/{form-wrapper-CY-stRaQ.cjs → form-wrapper-Cd8c5MIL.cjs} +2 -2
- package/dist/{form-wrapper-CY-stRaQ.cjs.map → form-wrapper-Cd8c5MIL.cjs.map} +1 -1
- package/dist/{form-wrapper-C2xlvWx0.js → form-wrapper-DntbFqN1.js} +2 -2
- package/dist/{form-wrapper-C2xlvWx0.js.map → form-wrapper-DntbFqN1.js.map} +1 -1
- package/dist/forms/combobox-field.cjs +1 -1
- package/dist/forms/combobox-field.d.cts +2 -2
- package/dist/forms/combobox-field.d.ts +2 -2
- package/dist/forms/combobox-field.js +1 -1
- package/dist/forms/date-field.cjs +1 -1
- package/dist/forms/date-field.d.cts +2 -2
- package/dist/forms/date-field.d.ts +2 -2
- package/dist/forms/date-field.js +1 -1
- package/dist/forms/form-wrapper.cjs +1 -1
- package/dist/forms/form-wrapper.d.cts +2 -2
- package/dist/forms/form-wrapper.d.ts +2 -2
- package/dist/forms/form-wrapper.js +1 -1
- package/dist/forms/multi-select-field.cjs +1 -1
- package/dist/forms/multi-select-field.cjs.map +1 -1
- package/dist/forms/multi-select-field.d.cts +2 -2
- package/dist/forms/multi-select-field.d.ts +2 -2
- package/dist/forms/multi-select-field.js +1 -1
- package/dist/forms/number-field.d.cts +2 -2
- package/dist/forms/number-field.d.ts +2 -2
- package/dist/forms/password-field.d.cts +2 -2
- package/dist/forms/password-field.d.ts +2 -2
- package/dist/forms/select-field.d.cts +2 -2
- package/dist/forms/select-field.d.ts +2 -2
- package/dist/forms/switch-field.d.cts +2 -2
- package/dist/forms/switch-field.d.ts +2 -2
- package/dist/forms/text-field.d.cts +2 -2
- package/dist/forms/text-field.d.ts +2 -2
- package/dist/forms/textarea-field.d.cts +2 -2
- package/dist/forms/textarea-field.d.ts +2 -2
- package/dist/{input-CjNcnHb_.d.ts → input-CUDclgoU.d.ts} +3 -3
- package/dist/{input-BsXm0_Iq.d.cts → input-y_n-XGys.d.cts} +3 -3
- package/dist/layouts/app-layout/index.d.cts +5 -5
- package/dist/layouts/app-layout/index.d.ts +3 -3
- package/dist/layouts/flex.d.cts +4 -4
- package/dist/layouts/flex.d.ts +4 -4
- package/dist/layouts/main/index.d.cts +4 -4
- package/dist/layouts/main/index.d.ts +4 -4
- package/dist/{multi-select-Cjvm4tK5.cjs → multi-select-3yxD9gbY.cjs} +2 -2
- package/dist/{multi-select-Cjvm4tK5.cjs.map → multi-select-3yxD9gbY.cjs.map} +1 -1
- package/dist/{multi-select-D0bZVOnm.js → multi-select-Cb07NlA7.js} +2 -2
- package/dist/{multi-select-D0bZVOnm.js.map → multi-select-Cb07NlA7.js.map} +1 -1
- package/dist/{popover-CTFp7ZXi.js → popover-CqAD7HNo.js} +1 -1
- package/dist/{popover-CTFp7ZXi.js.map → popover-CqAD7HNo.js.map} +1 -1
- package/dist/{popover-DCcPvdz2.cjs → popover-Dd0acCEk.cjs} +1 -1
- package/dist/{popover-DCcPvdz2.cjs.map → popover-Dd0acCEk.cjs.map} +1 -1
- package/dist/{separator-5FdzRGaJ.d.ts → separator-BLYi41aC.d.ts} +3 -3
- package/dist/{separator-DpxrpK_H.d.cts → separator-ClGBPiYE.d.cts} +3 -3
- package/dist/table/index.d.cts +2 -2
- package/dist/table/index.d.ts +2 -2
- package/dist/{toggle-Cx9H5u3p.d.cts → toggle-BWQWsKMA.d.ts} +4 -4
- package/dist/{toggle-DH9IssyE.d.ts → toggle-DnGvFJh8.d.cts} +4 -4
- package/dist/{tooltip-Djh_dcy5.d.ts → tooltip-Bk8VwHdM.d.ts} +6 -6
- package/dist/{tooltip-BAtWdJyX.d.cts → tooltip-cisSpCHG.d.cts} +6 -6
- package/dist/typography/paragraph.d.cts +2 -2
- package/dist/typography/paragraph.d.ts +2 -2
- package/dist/typography/title.d.cts +2 -2
- package/dist/typography/title.d.ts +2 -2
- package/dist/ui/alert-dialog.cjs +1 -1
- package/dist/ui/alert-dialog.d.cts +12 -12
- package/dist/ui/alert-dialog.d.ts +12 -12
- package/dist/ui/alert-dialog.js +1 -1
- package/dist/ui/alert.d.cts +6 -6
- package/dist/ui/alert.d.ts +6 -6
- package/dist/ui/aspect-ratio.d.cts +2 -2
- package/dist/ui/aspect-ratio.d.ts +2 -2
- package/dist/ui/avatar.d.cts +4 -4
- package/dist/ui/avatar.d.ts +4 -4
- package/dist/ui/badge.d.cts +2 -2
- package/dist/ui/badge.d.ts +4 -4
- package/dist/ui/breadcrumb.d.cts +8 -8
- package/dist/ui/breadcrumb.d.ts +8 -8
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/calendar.cjs +1 -1
- package/dist/ui/calendar.d.cts +4 -4
- package/dist/ui/calendar.d.ts +4 -4
- package/dist/ui/calendar.js +1 -1
- package/dist/ui/card.d.cts +8 -8
- package/dist/ui/card.d.ts +8 -8
- package/dist/ui/carousel.d.cts +7 -7
- package/dist/ui/carousel.d.ts +7 -7
- package/dist/ui/collapsible.d.cts +4 -4
- package/dist/ui/collapsible.d.ts +4 -4
- package/dist/ui/command.cjs +1 -1
- package/dist/ui/command.d.cts +2 -2
- package/dist/ui/command.d.ts +2 -2
- package/dist/ui/command.js +1 -1
- package/dist/ui/context-menu.d.cts +16 -16
- package/dist/ui/context-menu.d.ts +16 -16
- package/dist/ui/dialog.cjs +1 -1
- package/dist/ui/dialog.d.cts +1 -1
- package/dist/ui/dialog.d.ts +1 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/dropdown-menu.d.cts +16 -16
- package/dist/ui/dropdown-menu.d.ts +16 -16
- package/dist/ui/file-uploader.d.cts +2 -2
- package/dist/ui/file-uploader.d.ts +2 -2
- package/dist/ui/form.d.cts +7 -7
- package/dist/ui/form.d.ts +7 -7
- package/dist/ui/hover-card.d.cts +4 -4
- package/dist/ui/hover-card.d.ts +4 -4
- package/dist/ui/input-otp.d.cts +5 -5
- package/dist/ui/input-otp.d.ts +5 -5
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.ts +1 -1
- package/dist/ui/inputs/search-input.d.cts +1 -1
- package/dist/ui/inputs/search-input.d.ts +3 -3
- package/dist/ui/label.d.cts +2 -2
- package/dist/ui/label.d.ts +2 -2
- package/dist/ui/menubar.d.cts +17 -17
- package/dist/ui/menubar.d.ts +17 -17
- package/dist/ui/multi-select.cjs +1 -1
- package/dist/ui/multi-select.d.cts +2 -2
- package/dist/ui/multi-select.d.ts +2 -2
- package/dist/ui/multi-select.js +1 -1
- package/dist/ui/navigation-menu.d.cts +11 -11
- package/dist/ui/navigation-menu.d.ts +9 -9
- package/dist/ui/pagination.d.cts +9 -9
- package/dist/ui/pagination.d.ts +9 -9
- package/dist/ui/popover.cjs +1 -1
- package/dist/ui/popover.d.cts +5 -5
- package/dist/ui/popover.d.ts +5 -5
- package/dist/ui/popover.js +1 -1
- package/dist/ui/progress.d.cts +2 -2
- package/dist/ui/progress.d.ts +2 -2
- package/dist/ui/radio-group.d.cts +3 -3
- package/dist/ui/radio-group.d.ts +3 -3
- package/dist/ui/resizable.d.cts +4 -4
- package/dist/ui/resizable.d.ts +4 -4
- package/dist/ui/scroll-area.d.ts +3 -3
- package/dist/ui/select.d.cts +11 -11
- package/dist/ui/select.d.ts +11 -11
- package/dist/ui/separator.d.cts +1 -1
- package/dist/ui/separator.d.ts +1 -1
- package/dist/ui/sheet.d.cts +9 -9
- package/dist/ui/sheet.d.ts +9 -9
- package/dist/ui/sidebar.d.cts +30 -30
- package/dist/ui/sidebar.d.ts +30 -30
- package/dist/ui/skeleton.d.cts +2 -2
- package/dist/ui/skeleton.d.ts +2 -2
- package/dist/ui/slider.d.cts +2 -2
- package/dist/ui/slider.d.ts +2 -2
- package/dist/ui/sonner.d.cts +2 -2
- package/dist/ui/sonner.d.ts +2 -2
- package/dist/ui/switch.d.cts +2 -2
- package/dist/ui/switch.d.ts +2 -2
- package/dist/ui/table.d.cts +9 -9
- package/dist/ui/table.d.ts +9 -9
- package/dist/ui/tabs.d.cts +5 -5
- package/dist/ui/tabs.d.ts +5 -5
- package/dist/ui/textarea.d.cts +2 -2
- package/dist/ui/textarea.d.ts +2 -2
- package/dist/ui/toggle-group.d.cts +4 -4
- package/dist/ui/toggle-group.d.ts +4 -4
- package/dist/ui/toggle.d.cts +1 -1
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/tooltip.d.cts +1 -1
- package/dist/ui/tooltip.d.ts +1 -1
- package/package.json +6 -2
- package/styles/base.css +29 -0
- package/styles/loader.css +113 -0
- package/styles/theme.css +104 -0
- package/styles/typography.css +6 -0
- package/packages/components/cards/simple-card.tsx +0 -23
- package/packages/components/data-display/country.tsx +0 -53
- package/packages/components/data-display/data-list.tsx +0 -29
- package/packages/components/data-display/date-tooltip.tsx +0 -23
- package/packages/components/data-display/date.tsx +0 -157
- package/packages/components/data-display/empty.tsx +0 -13
- package/packages/components/data-display/name.tsx +0 -23
- package/packages/components/data-display/phone-number.tsx +0 -14
- package/packages/components/data-display/role-badge.tsx +0 -29
- package/packages/components/data-display/statistic.tsx +0 -139
- package/packages/components/dialogs/confirm-dialog.tsx +0 -44
- package/packages/components/dialogs/detail-dialog/component/header.tsx +0 -10
- package/packages/components/dialogs/detail-dialog/component/main.tsx +0 -35
- package/packages/components/dialogs/detail-dialog/component/sidebar.tsx +0 -618
- package/packages/components/dialogs/detail-dialog/component/wrapper.tsx +0 -15
- package/packages/components/dialogs/detail-dialog/index.tsx +0 -91
- package/packages/components/dialogs/error-dialog.tsx +0 -34
- package/packages/components/dialogs/form-dialog.tsx +0 -74
- package/packages/components/dialogs/loading-dialog.tsx +0 -20
- package/packages/components/forms/combobox-field.tsx +0 -104
- package/packages/components/forms/date-field.tsx +0 -62
- package/packages/components/forms/form-wrapper.tsx +0 -120
- package/packages/components/forms/multi-select-field.tsx +0 -56
- package/packages/components/forms/number-field.tsx +0 -54
- package/packages/components/forms/password-field.tsx +0 -38
- package/packages/components/forms/select-field.tsx +0 -58
- package/packages/components/forms/switch-field.tsx +0 -40
- package/packages/components/forms/text-field.tsx +0 -73
- package/packages/components/forms/textarea-field.tsx +0 -45
- package/packages/components/index.tsx +0 -0
- package/packages/components/layouts/app-layout/index.tsx +0 -74
- package/packages/components/layouts/app-layout/sidebar.tsx +0 -663
- package/packages/components/layouts/flex.tsx +0 -99
- package/packages/components/layouts/main/content.tsx +0 -11
- package/packages/components/layouts/main/header.tsx +0 -41
- package/packages/components/layouts/main/index.tsx +0 -3
- package/packages/components/layouts/main/wrapper.tsx +0 -5
- package/packages/components/table/data-table-pagination.tsx +0 -70
- package/packages/components/table/data-table.tsx +0 -241
- package/packages/components/table/index.tsx +0 -107
- package/packages/components/typography/paragraph.tsx +0 -29
- package/packages/components/typography/title.tsx +0 -31
- package/packages/components/ui/alert-dialog.tsx +0 -99
- package/packages/components/ui/alert.tsx +0 -44
- package/packages/components/ui/aspect-ratio.tsx +0 -11
- package/packages/components/ui/avatar.tsx +0 -25
- package/packages/components/ui/badge.tsx +0 -57
- package/packages/components/ui/breadcrumb.tsx +0 -74
- package/packages/components/ui/button.tsx +0 -205
- package/packages/components/ui/buttons/add-new.tsx +0 -19
- package/packages/components/ui/buttons/edit.tsx +0 -14
- package/packages/components/ui/buttons/refresh.tsx +0 -19
- package/packages/components/ui/buttons/trash.tsx +0 -14
- package/packages/components/ui/buttons/upload-image.tsx +0 -25
- package/packages/components/ui/calendar.tsx +0 -141
- package/packages/components/ui/card.tsx +0 -44
- package/packages/components/ui/carousel.tsx +0 -187
- package/packages/components/ui/checkbox.tsx +0 -34
- package/packages/components/ui/collapsible.tsx +0 -17
- package/packages/components/ui/command.tsx +0 -138
- package/packages/components/ui/context-menu.tsx +0 -196
- package/packages/components/ui/dialog.tsx +0 -119
- package/packages/components/ui/dropdown-menu.tsx +0 -249
- package/packages/components/ui/file-uploader.tsx +0 -314
- package/packages/components/ui/form.tsx +0 -104
- package/packages/components/ui/hover-card.tsx +0 -32
- package/packages/components/ui/input-otp.tsx +0 -67
- package/packages/components/ui/input.tsx +0 -59
- package/packages/components/ui/inputs/number-input.tsx +0 -317
- package/packages/components/ui/inputs/password-input.tsx +0 -29
- package/packages/components/ui/inputs/search-input.tsx +0 -24
- package/packages/components/ui/label.tsx +0 -26
- package/packages/components/ui/menubar.tsx +0 -212
- package/packages/components/ui/multi-select.tsx +0 -626
- package/packages/components/ui/navigation-menu.tsx +0 -124
- package/packages/components/ui/pagination.tsx +0 -70
- package/packages/components/ui/popover.tsx +0 -49
- package/packages/components/ui/progress.tsx +0 -19
- package/packages/components/ui/radio-group.tsx +0 -36
- package/packages/components/ui/resizable.tsx +0 -47
- package/packages/components/ui/scroll-area.tsx +0 -35
- package/packages/components/ui/select.tsx +0 -199
- package/packages/components/ui/separator.tsx +0 -25
- package/packages/components/ui/sheet.tsx +0 -119
- package/packages/components/ui/sidebar.tsx +0 -675
- package/packages/components/ui/skeleton.tsx +0 -8
- package/packages/components/ui/slider.tsx +0 -45
- package/packages/components/ui/sonner.tsx +0 -40
- package/packages/components/ui/switch.tsx +0 -46
- package/packages/components/ui/table.tsx +0 -66
- package/packages/components/ui/tabs.tsx +0 -53
- package/packages/components/ui/textarea.tsx +0 -46
- package/packages/components/ui/toggle-group.tsx +0 -63
- package/packages/components/ui/toggle.tsx +0 -34
- package/packages/components/ui/tooltip.tsx +0 -53
- package/packages/constants.tsx +0 -45
- package/packages/hooks/use-callback-ref.ts +0 -22
- package/packages/hooks/use-controllable-state.ts +0 -58
- package/packages/hooks/use-mobile.ts +0 -19
- package/packages/index.css +0 -133
- package/packages/lib/utils.ts +0 -24
- package/packages/stories/1.Guideline.mdx +0 -3
- package/packages/stories/2.Colors.mdx +0 -145
- package/packages/stories/3.Pypography.mdx +0 -51
- package/packages/stories/cards/simple-card.stories.tsx +0 -24
- package/packages/stories/data-display/data-list.stories.tsx +0 -22
- package/packages/stories/data-display/empty.stories.tsx +0 -13
- package/packages/stories/data-display/form-dialog.stories.tsx +0 -27
- package/packages/stories/data-display/name.stories.tsx +0 -25
- package/packages/stories/data-display/phone-number.stories.tsx +0 -17
- package/packages/stories/data-display/statistic.stories.tsx +0 -41
- package/packages/stories/dialogs/confirm-dialog.stories.tsx +0 -26
- package/packages/stories/dialogs/detail-dialog.stories.tsx +0 -34
- package/packages/stories/dialogs/error-dialog.stories.tsx +0 -27
- package/packages/stories/dialogs/loading-dialog.stories.tsx +0 -16
- package/packages/stories/forms/combobox-field.stories.tsx +0 -38
- package/packages/stories/forms/form-wrapper.stories.tsx +0 -59
- package/packages/stories/forms/multi-select-field.stories.tsx +0 -42
- package/packages/stories/forms/number-field.stories.tsx +0 -35
- package/packages/stories/forms/select-field.stories.tsx +0 -39
- package/packages/stories/forms/switch-field.stories.tsx +0 -36
- package/packages/stories/forms/text-field.stories.tsx +0 -41
- package/packages/stories/forms/textarea-field.stories.tsx +0 -34
- package/packages/stories/layouts/app-layout.stories.tsx +0 -49
- package/packages/stories/typography/paragraph.stories.tsx +0 -45
- package/packages/stories/typography/title.stories.tsx +0 -39
- package/packages/stories/ui/alert-dialog.stories.tsx +0 -49
- package/packages/stories/ui/alert.stories.tsx +0 -63
- package/packages/stories/ui/aspect-ratio.stories.tsx +0 -22
- package/packages/stories/ui/badge.stories.tsx +0 -170
- package/packages/stories/ui/breadcrumb.stories.tsx +0 -172
- package/packages/stories/ui/button.stories.tsx +0 -181
- package/packages/stories/ui/card.stories.tsx +0 -58
- package/packages/stories/ui/checkbox.stories.tsx +0 -48
- package/packages/stories/ui/command.stories.tsx +0 -58
- package/packages/stories/ui/dialog.stories.tsx +0 -55
- package/packages/stories/ui/dropdown-menu.stories.tsx +0 -89
- package/packages/stories/ui/file-uploader.stories.tsx +0 -18
- package/packages/stories/ui/input.stories.tsx +0 -38
- package/packages/stories/ui/label.stories.tsx +0 -17
- package/packages/stories/ui/multi-select.stories.tsx +0 -29
- package/packages/stories/ui/popover.stories.tsx +0 -52
- package/packages/stories/ui/progress.stories.tsx +0 -17
- package/packages/stories/ui/radio-group.stories.tsx +0 -31
- package/packages/stories/ui/select.stories.tsx +0 -31
- package/packages/stories/ui/separator.stories.tsx +0 -31
- package/packages/stories/ui/sheet.stories.tsx +0 -50
- package/packages/stories/ui/skeleton.stories.tsx +0 -27
- package/packages/stories/ui/switch.stories.tsx +0 -21
- package/packages/stories/ui/table.stories.tsx +0 -82
- package/packages/stories/ui/tabs.stories.tsx +0 -70
- package/packages/stories/ui/textarea.stories.tsx +0 -15
- package/packages/stories/ui/toaster.stories.tsx +0 -87
- package/packages/types.ts +0 -50
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { NavigationMenu as NavigationMenuPrimitive } from 'radix-ui'
|
|
4
|
-
import { cva } from 'class-variance-authority'
|
|
5
|
-
import { ChevronDownIcon } from 'lucide-react'
|
|
6
|
-
|
|
7
|
-
import { cn } from '@/lib/utils'
|
|
8
|
-
|
|
9
|
-
function NavigationMenu({
|
|
10
|
-
className,
|
|
11
|
-
children,
|
|
12
|
-
viewport = true,
|
|
13
|
-
...props
|
|
14
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
15
|
-
viewport?: boolean
|
|
16
|
-
}) {
|
|
17
|
-
return (
|
|
18
|
-
<NavigationMenuPrimitive.Root
|
|
19
|
-
data-slot="navigation-menu"
|
|
20
|
-
data-viewport={viewport}
|
|
21
|
-
className={cn('group/navigation-menu relative flex max-w-max flex-1 items-center justify-center', className)}
|
|
22
|
-
{...props}
|
|
23
|
-
>
|
|
24
|
-
{children}
|
|
25
|
-
{viewport && <NavigationMenuViewport />}
|
|
26
|
-
</NavigationMenuPrimitive.Root>
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function NavigationMenuList({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {
|
|
31
|
-
return (
|
|
32
|
-
<NavigationMenuPrimitive.List
|
|
33
|
-
data-slot="navigation-menu-list"
|
|
34
|
-
className={cn('group flex flex-1 list-none items-center justify-center gap-1', className)}
|
|
35
|
-
{...props}
|
|
36
|
-
/>
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function NavigationMenuItem({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {
|
|
41
|
-
return <NavigationMenuPrimitive.Item data-slot="navigation-menu-item" className={cn('relative', className)} {...props} />
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const navigationMenuTriggerStyle = cva(
|
|
45
|
-
'group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1',
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
function NavigationMenuTrigger({ className, children, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {
|
|
49
|
-
return (
|
|
50
|
-
<NavigationMenuPrimitive.Trigger data-slot="navigation-menu-trigger" className={cn(navigationMenuTriggerStyle(), 'group', className)} {...props}>
|
|
51
|
-
{children} <ChevronDownIcon className="relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180" aria-hidden="true" />
|
|
52
|
-
</NavigationMenuPrimitive.Trigger>
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function NavigationMenuContent({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {
|
|
57
|
-
return (
|
|
58
|
-
<NavigationMenuPrimitive.Content
|
|
59
|
-
data-slot="navigation-menu-content"
|
|
60
|
-
className={cn(
|
|
61
|
-
'data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto',
|
|
62
|
-
'group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none',
|
|
63
|
-
className,
|
|
64
|
-
)}
|
|
65
|
-
{...props}
|
|
66
|
-
/>
|
|
67
|
-
)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function NavigationMenuViewport({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>) {
|
|
71
|
-
return (
|
|
72
|
-
<div className={cn('absolute top-full left-0 isolate z-50 flex justify-center')}>
|
|
73
|
-
<NavigationMenuPrimitive.Viewport
|
|
74
|
-
data-slot="navigation-menu-viewport"
|
|
75
|
-
className={cn(
|
|
76
|
-
'origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]',
|
|
77
|
-
className,
|
|
78
|
-
)}
|
|
79
|
-
{...props}
|
|
80
|
-
/>
|
|
81
|
-
</div>
|
|
82
|
-
)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function NavigationMenuLink({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {
|
|
86
|
-
return (
|
|
87
|
-
<NavigationMenuPrimitive.Link
|
|
88
|
-
data-slot="navigation-menu-link"
|
|
89
|
-
className={cn(
|
|
90
|
-
"data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
|
|
91
|
-
className,
|
|
92
|
-
)}
|
|
93
|
-
{...props}
|
|
94
|
-
/>
|
|
95
|
-
)
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function NavigationMenuIndicator({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {
|
|
99
|
-
return (
|
|
100
|
-
<NavigationMenuPrimitive.Indicator
|
|
101
|
-
data-slot="navigation-menu-indicator"
|
|
102
|
-
className={cn(
|
|
103
|
-
'data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden',
|
|
104
|
-
className,
|
|
105
|
-
)}
|
|
106
|
-
{...props}
|
|
107
|
-
>
|
|
108
|
-
<div className="bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" />
|
|
109
|
-
</NavigationMenuPrimitive.Indicator>
|
|
110
|
-
)
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export {
|
|
114
|
-
NavigationMenu,
|
|
115
|
-
NavigationMenuContent,
|
|
116
|
-
NavigationMenuIndicator,
|
|
117
|
-
NavigationMenuItem,
|
|
118
|
-
NavigationMenuLink,
|
|
119
|
-
NavigationMenuList,
|
|
120
|
-
NavigationMenuTrigger,
|
|
121
|
-
// eslint-disable-next-line react-refresh/only-export-components
|
|
122
|
-
navigationMenuTriggerStyle,
|
|
123
|
-
NavigationMenuViewport,
|
|
124
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react'
|
|
4
|
-
|
|
5
|
-
import { Button, buttonVariants } from '@/components/ui/button'
|
|
6
|
-
import { cn } from '@/lib/utils'
|
|
7
|
-
|
|
8
|
-
function Pagination({ className, ...props }: React.ComponentProps<'nav'>) {
|
|
9
|
-
return <nav role="navigation" aria-label="pagination" data-slot="pagination" className={cn('mx-auto flex w-full justify-center', className)} {...props} />
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {
|
|
13
|
-
return <ul data-slot="pagination-content" className={cn('flex flex-row items-center gap-1', className)} {...props} />
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function PaginationItem({ ...props }: React.ComponentProps<'li'>) {
|
|
17
|
-
return <li data-slot="pagination-item" {...props} />
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
type PaginationLinkProps = {
|
|
21
|
-
isActive?: boolean
|
|
22
|
-
} & Pick<React.ComponentProps<typeof Button>, 'size'> &
|
|
23
|
-
React.ComponentProps<'a'>
|
|
24
|
-
|
|
25
|
-
function PaginationLink({ className, isActive, size = 'icon', ...props }: PaginationLinkProps) {
|
|
26
|
-
return (
|
|
27
|
-
<a
|
|
28
|
-
aria-current={isActive ? 'page' : undefined}
|
|
29
|
-
data-slot="pagination-link"
|
|
30
|
-
data-active={isActive}
|
|
31
|
-
className={cn(
|
|
32
|
-
buttonVariants({
|
|
33
|
-
variant: isActive ? 'outline' : 'ghost',
|
|
34
|
-
size,
|
|
35
|
-
}),
|
|
36
|
-
className,
|
|
37
|
-
)}
|
|
38
|
-
{...props}
|
|
39
|
-
/>
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {
|
|
44
|
-
return (
|
|
45
|
-
<PaginationLink aria-label="Go to previous page" size="default" className={cn('gap-1 px-2.5 sm:pl-2.5', className)} {...props}>
|
|
46
|
-
<ChevronLeftIcon />
|
|
47
|
-
<span className="hidden sm:block">Previous</span>
|
|
48
|
-
</PaginationLink>
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {
|
|
53
|
-
return (
|
|
54
|
-
<PaginationLink aria-label="Go to next page" size="default" className={cn('gap-1 px-2.5 sm:pr-2.5', className)} {...props}>
|
|
55
|
-
<span className="hidden sm:block">Next</span>
|
|
56
|
-
<ChevronRightIcon />
|
|
57
|
-
</PaginationLink>
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {
|
|
62
|
-
return (
|
|
63
|
-
<span aria-hidden data-slot="pagination-ellipsis" className={cn('flex size-9 items-center justify-center', className)} {...props}>
|
|
64
|
-
<MoreHorizontalIcon className="size-4" />
|
|
65
|
-
<span className="sr-only">More pages</span>
|
|
66
|
-
</span>
|
|
67
|
-
)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious }
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import { Popover as PopoverPrimitive } from 'radix-ui'
|
|
3
|
-
|
|
4
|
-
import { cn } from '@/lib/utils'
|
|
5
|
-
|
|
6
|
-
function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
|
|
7
|
-
return <PopoverPrimitive.Root data-slot="popover" {...props} />
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
|
|
11
|
-
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function PopoverContent({ className, align = 'start', sideOffset = 4, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>) {
|
|
15
|
-
return (
|
|
16
|
-
<PopoverPrimitive.Portal>
|
|
17
|
-
<PopoverPrimitive.Content
|
|
18
|
-
data-slot="popover-content"
|
|
19
|
-
align={align}
|
|
20
|
-
sideOffset={sideOffset}
|
|
21
|
-
className={cn(
|
|
22
|
-
'bg-popover',
|
|
23
|
-
'text-text-positive',
|
|
24
|
-
'z-50 w-72',
|
|
25
|
-
'origin-(--radix-popover-content-transform-origin)',
|
|
26
|
-
'shadow-dropdown rounded-md p-4 outline-none',
|
|
27
|
-
'data-[state=open]:animate-in',
|
|
28
|
-
'data-[state=open]:fade-in-0',
|
|
29
|
-
'data-[state=open]:zoom-in-95',
|
|
30
|
-
'data-[state=closed]:animate-out',
|
|
31
|
-
'data-[state=closed]:fade-out-0',
|
|
32
|
-
'data-[state=closed]:zoom-out-95',
|
|
33
|
-
'data-[side=bottom]:slide-in-from-top-2',
|
|
34
|
-
'data-[side=left]:slide-in-from-right-2',
|
|
35
|
-
'data-[side=right]:slide-in-from-left-2',
|
|
36
|
-
'data-[side=top]:slide-in-from-bottom-2',
|
|
37
|
-
className,
|
|
38
|
-
)}
|
|
39
|
-
{...props}
|
|
40
|
-
/>
|
|
41
|
-
</PopoverPrimitive.Portal>
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
|
|
46
|
-
return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger }
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { Progress as ProgressPrimitive } from 'radix-ui'
|
|
4
|
-
|
|
5
|
-
import { cn } from '@/lib/utils'
|
|
6
|
-
|
|
7
|
-
function Progress({ className, value, ...props }: React.ComponentProps<typeof ProgressPrimitive.Root>) {
|
|
8
|
-
return (
|
|
9
|
-
<ProgressPrimitive.Root data-slot="progress" className={cn('bg-primary-weak relative h-2 w-full overflow-hidden rounded-full', className)} {...props}>
|
|
10
|
-
<ProgressPrimitive.Indicator
|
|
11
|
-
data-slot="progress-indicator"
|
|
12
|
-
className="bg-primary size-full flex-1 transition-all"
|
|
13
|
-
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
14
|
-
/>
|
|
15
|
-
</ProgressPrimitive.Root>
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { Progress }
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { RadioGroup as RadioGroupPrimitive } from 'radix-ui'
|
|
4
|
-
import { CircleIcon } from 'lucide-react'
|
|
5
|
-
|
|
6
|
-
import { cn } from '@/lib/utils'
|
|
7
|
-
|
|
8
|
-
function RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
|
|
9
|
-
return <RadioGroupPrimitive.Root data-slot="radio-group" className={cn('grid gap-3', className)} {...props} />
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
|
|
13
|
-
return (
|
|
14
|
-
<RadioGroupPrimitive.Item
|
|
15
|
-
data-slot="radio-group-item"
|
|
16
|
-
className={cn(
|
|
17
|
-
'aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-all outline-none',
|
|
18
|
-
'focus:border-border',
|
|
19
|
-
'focus:ring-primary/50',
|
|
20
|
-
'focus:ring-[3px]',
|
|
21
|
-
'aria-invalid:ring-danger-weak',
|
|
22
|
-
'aria-invalid:border-danger-strong',
|
|
23
|
-
'disabled:cursor-not-allowed disabled:opacity-50',
|
|
24
|
-
className,
|
|
25
|
-
)}
|
|
26
|
-
{...props}
|
|
27
|
-
>
|
|
28
|
-
<RadioGroupPrimitive.Indicator data-slot="radio-group-indicator" className="bg-primary relative flex items-center justify-center">
|
|
29
|
-
<div className="bg-primary absolute size-4 rounded-full" />
|
|
30
|
-
<CircleIcon className="fill-text-negative-strong text-text-negative absolute top-1/2 left-1/2 size-2 -translate-1/2" />
|
|
31
|
-
</RadioGroupPrimitive.Indicator>
|
|
32
|
-
</RadioGroupPrimitive.Item>
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export { RadioGroup, RadioGroupItem }
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { GripVerticalIcon } from 'lucide-react'
|
|
4
|
-
import * as ResizablePrimitive from 'react-resizable-panels'
|
|
5
|
-
|
|
6
|
-
import { cn } from '@/lib/utils'
|
|
7
|
-
|
|
8
|
-
function ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
|
|
9
|
-
return (
|
|
10
|
-
<ResizablePrimitive.PanelGroup
|
|
11
|
-
data-slot="resizable-panel-group"
|
|
12
|
-
className={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {
|
|
19
|
-
return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function ResizableHandle({
|
|
23
|
-
withHandle,
|
|
24
|
-
className,
|
|
25
|
-
...props
|
|
26
|
-
}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
27
|
-
withHandle?: boolean
|
|
28
|
-
}) {
|
|
29
|
-
return (
|
|
30
|
-
<ResizablePrimitive.PanelResizeHandle
|
|
31
|
-
data-slot="resizable-handle"
|
|
32
|
-
className={cn(
|
|
33
|
-
'bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90',
|
|
34
|
-
className,
|
|
35
|
-
)}
|
|
36
|
-
{...props}
|
|
37
|
-
>
|
|
38
|
-
{withHandle && (
|
|
39
|
-
<div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border">
|
|
40
|
-
<GripVerticalIcon className="size-2.5" />
|
|
41
|
-
</div>
|
|
42
|
-
)}
|
|
43
|
-
</ResizablePrimitive.PanelResizeHandle>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export { ResizableHandle, ResizablePanel, ResizablePanelGroup }
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { ScrollArea as ScrollAreaPrimitive } from 'radix-ui'
|
|
4
|
-
|
|
5
|
-
import { cn } from '@/lib/utils'
|
|
6
|
-
|
|
7
|
-
function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
|
|
8
|
-
return (
|
|
9
|
-
<ScrollAreaPrimitive.Root data-slot="scroll-area" className={cn('relative overflow-hidden', className)} {...props}>
|
|
10
|
-
<ScrollAreaPrimitive.Viewport className="size-full rounded-[inherit]">{children}</ScrollAreaPrimitive.Viewport>
|
|
11
|
-
<ScrollBar />
|
|
12
|
-
<ScrollAreaPrimitive.Corner />
|
|
13
|
-
</ScrollAreaPrimitive.Root>
|
|
14
|
-
)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function ScrollBar({ className, orientation = 'vertical', ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
|
|
18
|
-
return (
|
|
19
|
-
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
20
|
-
data-slot="scroll-area-scrollbar"
|
|
21
|
-
orientation={orientation}
|
|
22
|
-
className={cn(
|
|
23
|
-
'flex touch-none p-px transition-colors select-none',
|
|
24
|
-
orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent',
|
|
25
|
-
orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent',
|
|
26
|
-
className,
|
|
27
|
-
)}
|
|
28
|
-
{...props}
|
|
29
|
-
>
|
|
30
|
-
<ScrollAreaPrimitive.ScrollAreaThumb className="bg-border relative flex-1 rounded-full" />
|
|
31
|
-
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { ScrollArea, ScrollBar }
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import { Select as SelectPrimitive } from 'radix-ui'
|
|
3
|
-
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'
|
|
4
|
-
|
|
5
|
-
import { cn } from '@/lib/utils'
|
|
6
|
-
|
|
7
|
-
function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
|
8
|
-
return <SelectPrimitive.Root data-slot="select" {...props} />
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
12
|
-
return <SelectPrimitive.Group data-slot="select-group" {...props} />
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
|
16
|
-
return <SelectPrimitive.Value data-slot="select-value" {...props} />
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function SelectTrigger({
|
|
20
|
-
className,
|
|
21
|
-
size = 'default',
|
|
22
|
-
children,
|
|
23
|
-
...props
|
|
24
|
-
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
25
|
-
size?: 'sm' | 'default'
|
|
26
|
-
}) {
|
|
27
|
-
return (
|
|
28
|
-
<SelectPrimitive.Trigger
|
|
29
|
-
data-slot="select-trigger"
|
|
30
|
-
data-size={size}
|
|
31
|
-
className={cn(
|
|
32
|
-
'border-border',
|
|
33
|
-
'flex w-fit items-center justify-between',
|
|
34
|
-
'gap-2 rounded-md border bg-transparent px-3 py-2 text-sm',
|
|
35
|
-
'whitespace-nowrap transition-all outline-none',
|
|
36
|
-
'cursor-pointer',
|
|
37
|
-
'hover:shadow-md',
|
|
38
|
-
'hover:shadow-border-weak',
|
|
39
|
-
'focus:border-primary-strong',
|
|
40
|
-
'focus:ring-primary-weak',
|
|
41
|
-
'focus:ring-4',
|
|
42
|
-
'aria-invalid:ring-danger-weak',
|
|
43
|
-
'aria-invalid:border-danger-strong',
|
|
44
|
-
'disabled:cursor-not-allowed',
|
|
45
|
-
'disabled:opacity-50',
|
|
46
|
-
'data-[state=open]:border-primary',
|
|
47
|
-
'data-[state=open]:ring-ring',
|
|
48
|
-
'data-[state=open]:ring-4',
|
|
49
|
-
'data-[placeholder]:text-text-positive-muted',
|
|
50
|
-
'data-[size=default]:h-9',
|
|
51
|
-
'data-[size=sm]:h-8',
|
|
52
|
-
'*:data-[slot=select-value]:line-clamp-1',
|
|
53
|
-
'*:data-[slot=select-value]:flex',
|
|
54
|
-
'*:data-[slot=select-value]:items-center',
|
|
55
|
-
'*:data-[slot=select-value]:gap-2',
|
|
56
|
-
'[&_svg]:shrink-0',
|
|
57
|
-
'[&_svg]:pointer-events-none',
|
|
58
|
-
"[&_svg:not([class*='size-'])]:size-4",
|
|
59
|
-
"[&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
60
|
-
className,
|
|
61
|
-
)}
|
|
62
|
-
{...props}
|
|
63
|
-
>
|
|
64
|
-
{children}
|
|
65
|
-
<SelectPrimitive.Icon asChild>
|
|
66
|
-
<ChevronDownIcon className="size-4 opacity-50" />
|
|
67
|
-
</SelectPrimitive.Icon>
|
|
68
|
-
</SelectPrimitive.Trigger>
|
|
69
|
-
)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function SelectContent({ className, children, position = 'popper', ...props }: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
|
73
|
-
return (
|
|
74
|
-
<SelectPrimitive.Portal>
|
|
75
|
-
<SelectPrimitive.Content
|
|
76
|
-
data-slot="select-content"
|
|
77
|
-
className={cn(
|
|
78
|
-
'bg-popover',
|
|
79
|
-
'relative z-50',
|
|
80
|
-
'min-w-32',
|
|
81
|
-
'overflow-x-hidden overflow-y-auto',
|
|
82
|
-
'shadow-dropdown rounded-md',
|
|
83
|
-
'data-[state=open]:animate-in',
|
|
84
|
-
'data-[state=open]:fade-in-0',
|
|
85
|
-
'data-[state=open]:zoom-in-95',
|
|
86
|
-
'data-[state=closed]:animate-out',
|
|
87
|
-
'data-[state=closed]:fade-out-0',
|
|
88
|
-
'data-[state=closed]:zoom-out-95',
|
|
89
|
-
'data-[side=bottom]:slide-in-from-top-2',
|
|
90
|
-
'data-[side=left]:slide-in-from-right-2',
|
|
91
|
-
'data-[side=right]:slide-in-from-left-2',
|
|
92
|
-
'data-[side=top]:slide-in-from-bottom-2',
|
|
93
|
-
'max-h-(--radix-select-content-available-height)',
|
|
94
|
-
'origin-(--radix-select-content-transform-origin)',
|
|
95
|
-
position === 'popper' && 'data-[side=bottom]:translate-y-1',
|
|
96
|
-
position === 'popper' && 'data-[side=left]:-translate-x-1',
|
|
97
|
-
position === 'popper' && 'data-[side=right]:translate-x-1',
|
|
98
|
-
position === 'popper' && 'data-[side=top]:-translate-y-1',
|
|
99
|
-
className,
|
|
100
|
-
)}
|
|
101
|
-
position={position}
|
|
102
|
-
{...props}
|
|
103
|
-
>
|
|
104
|
-
<SelectScrollUpButton />
|
|
105
|
-
<SelectPrimitive.Viewport
|
|
106
|
-
className={cn(
|
|
107
|
-
'p-1',
|
|
108
|
-
position === 'popper' && 'w-full scroll-my-1',
|
|
109
|
-
position === 'popper' && 'h-[var(--radix-select-trigger-height)]',
|
|
110
|
-
position === 'popper' && 'min-w-[var(--radix-select-trigger-width)]',
|
|
111
|
-
)}
|
|
112
|
-
>
|
|
113
|
-
{children}
|
|
114
|
-
</SelectPrimitive.Viewport>
|
|
115
|
-
<SelectScrollDownButton />
|
|
116
|
-
</SelectPrimitive.Content>
|
|
117
|
-
</SelectPrimitive.Portal>
|
|
118
|
-
)
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {
|
|
122
|
-
return <SelectPrimitive.Label data-slot="select-label" className={cn('text-text-positive-muted px-2 py-1.5 text-xs', className)} {...props} />
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) {
|
|
126
|
-
return (
|
|
127
|
-
<SelectPrimitive.Item
|
|
128
|
-
data-slot="select-item"
|
|
129
|
-
className={cn(
|
|
130
|
-
'relative flex items-center select-none',
|
|
131
|
-
'gap-2 rounded-md py-2.5 pr-8 pl-2',
|
|
132
|
-
'w-full',
|
|
133
|
-
'cursor-pointer transition-colors',
|
|
134
|
-
'text-text-positive-weak text-sm outline-hidden',
|
|
135
|
-
'focus:bg-accent-muted',
|
|
136
|
-
'focus:text-text-positive-strong',
|
|
137
|
-
'data-[disabled]:opacity-50',
|
|
138
|
-
'data-[disabled]:pointer-events-none',
|
|
139
|
-
'[&_svg]:pointer-events-none',
|
|
140
|
-
'[&_svg]:shrink-0',
|
|
141
|
-
"[&_svg:not([class*='size-'])]:size-4",
|
|
142
|
-
"[&_svg:not([class*='text-'])]:text-text-positive-weak",
|
|
143
|
-
'*:[span]:last:flex',
|
|
144
|
-
'*:[span]:last:items-center',
|
|
145
|
-
'*:[span]:last:gap-2',
|
|
146
|
-
className,
|
|
147
|
-
)}
|
|
148
|
-
{...props}
|
|
149
|
-
>
|
|
150
|
-
<span className="absolute right-2 flex size-3.5 items-center justify-center">
|
|
151
|
-
<SelectPrimitive.ItemIndicator>
|
|
152
|
-
<CheckIcon className="size-4" />
|
|
153
|
-
</SelectPrimitive.ItemIndicator>
|
|
154
|
-
</span>
|
|
155
|
-
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
156
|
-
</SelectPrimitive.Item>
|
|
157
|
-
)
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) {
|
|
161
|
-
return <SelectPrimitive.Separator data-slot="select-separator" className={cn('bg-border-weak pointer-events-none -mx-1 my-1 h-px', className)} {...props} />
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
|
|
165
|
-
return (
|
|
166
|
-
<SelectPrimitive.ScrollUpButton
|
|
167
|
-
data-slot="select-scroll-up-button"
|
|
168
|
-
className={cn('flex cursor-default items-center justify-center py-1', className)}
|
|
169
|
-
{...props}
|
|
170
|
-
>
|
|
171
|
-
<ChevronUpIcon className="size-4" />
|
|
172
|
-
</SelectPrimitive.ScrollUpButton>
|
|
173
|
-
)
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
|
|
177
|
-
return (
|
|
178
|
-
<SelectPrimitive.ScrollDownButton
|
|
179
|
-
data-slot="select-scroll-down-button"
|
|
180
|
-
className={cn('flex cursor-default items-center justify-center py-1', className)}
|
|
181
|
-
{...props}
|
|
182
|
-
>
|
|
183
|
-
<ChevronDownIcon className="size-4" />
|
|
184
|
-
</SelectPrimitive.ScrollDownButton>
|
|
185
|
-
)
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export {
|
|
189
|
-
Select,
|
|
190
|
-
SelectContent,
|
|
191
|
-
SelectGroup,
|
|
192
|
-
SelectItem,
|
|
193
|
-
SelectLabel,
|
|
194
|
-
SelectScrollDownButton,
|
|
195
|
-
SelectScrollUpButton,
|
|
196
|
-
SelectSeparator,
|
|
197
|
-
SelectTrigger,
|
|
198
|
-
SelectValue,
|
|
199
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import { Separator as SeparatorPrimitive } from 'radix-ui'
|
|
3
|
-
|
|
4
|
-
import { cn } from '@/lib/utils'
|
|
5
|
-
|
|
6
|
-
function Separator({ className, orientation = 'horizontal', decorative = true, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
|
7
|
-
return (
|
|
8
|
-
<SeparatorPrimitive.Root
|
|
9
|
-
data-slot="separator"
|
|
10
|
-
decorative={decorative}
|
|
11
|
-
orientation={orientation}
|
|
12
|
-
className={cn(
|
|
13
|
-
'bg-border-weak shrink-0',
|
|
14
|
-
'data-[orientation=horizontal]:h-px',
|
|
15
|
-
'data-[orientation=horizontal]:w-full',
|
|
16
|
-
'data-[orientation=vertical]:h-full',
|
|
17
|
-
'data-[orientation=vertical]:w-px',
|
|
18
|
-
className,
|
|
19
|
-
)}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { Separator }
|