@customafk/lunas-ui 0.0.25 → 0.0.27
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 +2 -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,99 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { AlertDialog as AlertDialogPrimitive } from 'radix-ui'
|
|
4
|
-
|
|
5
|
-
import { buttonVariants } from '@/components/ui/button'
|
|
6
|
-
import { cn } from '@/lib/utils'
|
|
7
|
-
|
|
8
|
-
function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
|
9
|
-
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
|
|
13
|
-
return <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
|
|
17
|
-
return <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
|
|
21
|
-
return (
|
|
22
|
-
<AlertDialogPrimitive.Overlay
|
|
23
|
-
data-slot="alert-dialog-overlay"
|
|
24
|
-
className={cn(
|
|
25
|
-
'fixed inset-0 z-50 bg-black/50',
|
|
26
|
-
'data-[state=open]:animate-in',
|
|
27
|
-
'data-[state=closed]:animate-out',
|
|
28
|
-
'data-[state=closed]:fade-out-0',
|
|
29
|
-
'data-[state=open]:fade-in-0',
|
|
30
|
-
className,
|
|
31
|
-
)}
|
|
32
|
-
{...props}
|
|
33
|
-
/>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {
|
|
38
|
-
return (
|
|
39
|
-
<AlertDialogPortal>
|
|
40
|
-
<AlertDialogOverlay />
|
|
41
|
-
<AlertDialogPrimitive.Content
|
|
42
|
-
data-slot="alert-dialog-content"
|
|
43
|
-
className={cn(
|
|
44
|
-
'bg-background',
|
|
45
|
-
'fixed z-50',
|
|
46
|
-
'top-1/2 left-1/2 -translate-1/2',
|
|
47
|
-
'grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg',
|
|
48
|
-
'gap-4 rounded-lg p-6 shadow-lg duration-200',
|
|
49
|
-
'data-[state=open]:animate-in',
|
|
50
|
-
'data-[state=open]:fade-in-0',
|
|
51
|
-
'data-[state=open]:zoom-in-95',
|
|
52
|
-
'data-[state=closed]:animate-out',
|
|
53
|
-
'data-[state=closed]:fade-out-0',
|
|
54
|
-
'data-[state=closed]:zoom-out-95',
|
|
55
|
-
className,
|
|
56
|
-
)}
|
|
57
|
-
{...props}
|
|
58
|
-
/>
|
|
59
|
-
</AlertDialogPortal>
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
64
|
-
return <div data-slot="alert-dialog-header" className={cn('flex flex-col gap-2 text-center sm:text-left', className)} {...props} />
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
|
68
|
-
return <div data-slot="alert-dialog-footer" className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
|
|
72
|
-
return <AlertDialogPrimitive.Title data-slot="alert-dialog-title" className={cn('text-text-positive-strong text-lg font-semibold', className)} {...props} />
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
76
|
-
return <AlertDialogPrimitive.Description data-slot="alert-dialog-description" className={cn('text-text-positive-weak text-sm', className)} {...props} />
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {
|
|
80
|
-
return <AlertDialogPrimitive.Action className={cn(buttonVariants(), 'min-w-24', className)} {...props} autoFocus tabIndex={1} />
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {
|
|
84
|
-
return <AlertDialogPrimitive.Cancel className={cn(buttonVariants({ variant: 'outline', color: 'muted' }), 'min-w-24', className)} {...props} />
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export {
|
|
88
|
-
AlertDialog,
|
|
89
|
-
AlertDialogAction,
|
|
90
|
-
AlertDialogCancel,
|
|
91
|
-
AlertDialogContent,
|
|
92
|
-
AlertDialogDescription,
|
|
93
|
-
AlertDialogFooter,
|
|
94
|
-
AlertDialogHeader,
|
|
95
|
-
AlertDialogOverlay,
|
|
96
|
-
AlertDialogPortal,
|
|
97
|
-
AlertDialogTitle,
|
|
98
|
-
AlertDialogTrigger,
|
|
99
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { cva, type VariantProps } from 'class-variance-authority'
|
|
4
|
-
|
|
5
|
-
import { cn } from '@/lib/utils'
|
|
6
|
-
|
|
7
|
-
const alertVariants = cva(
|
|
8
|
-
[
|
|
9
|
-
'relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm',
|
|
10
|
-
'has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4',
|
|
11
|
-
'[&>svg]:translate-y-0.5 [&>svg]:text-current',
|
|
12
|
-
],
|
|
13
|
-
{
|
|
14
|
-
variants: {
|
|
15
|
-
variant: {
|
|
16
|
-
default: 'bg-card text-text-positive-strong',
|
|
17
|
-
destructive: 'text-danger-strong bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-danger',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
defaultVariants: {
|
|
21
|
-
variant: 'default',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
function Alert({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {
|
|
27
|
-
return <div data-slot="alert" role="alert" className={cn(alertVariants({ variant }), className)} {...props} />
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {
|
|
31
|
-
return <div data-slot="alert-title" className={cn('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', className)} {...props} />
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function AlertDescription({ className, ...props }: React.ComponentProps<'div'>) {
|
|
35
|
-
return (
|
|
36
|
-
<div
|
|
37
|
-
data-slot="alert-description"
|
|
38
|
-
className={cn('text-text-positive-weak col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed', className)}
|
|
39
|
-
{...props}
|
|
40
|
-
/>
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export { Alert, AlertDescription, AlertTitle }
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { AspectRatio as AspectRatioPrimitive } from 'radix-ui'
|
|
4
|
-
|
|
5
|
-
import { cn } from '@/lib/utils'
|
|
6
|
-
|
|
7
|
-
function AspectRatio({ className, ...props }: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {
|
|
8
|
-
return <AspectRatioPrimitive.Root data-slot="aspect-ratio" className={cn('bg-secondary-muted rounded-md', className)} {...props} />
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { AspectRatio }
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { Avatar as AvatarPrimitive } from 'radix-ui'
|
|
4
|
-
|
|
5
|
-
import { cn } from '@/lib/utils'
|
|
6
|
-
|
|
7
|
-
function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>) {
|
|
8
|
-
return <AvatarPrimitive.Root data-slot="avatar" className={cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', className)} {...props} />
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) {
|
|
12
|
-
return <AvatarPrimitive.Image data-slot="avatar-image" className={cn('aspect-square size-full', className)} {...props} />
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
|
|
16
|
-
return (
|
|
17
|
-
<AvatarPrimitive.Fallback
|
|
18
|
-
data-slot="avatar-fallback"
|
|
19
|
-
className={cn('bg-muted flex size-full items-center justify-center rounded-full', className)}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { Avatar, AvatarFallback, AvatarImage }
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { cva, type VariantProps } from 'class-variance-authority'
|
|
4
|
-
|
|
5
|
-
import { cn } from '@/lib/utils'
|
|
6
|
-
|
|
7
|
-
const badgeVariants = cva(
|
|
8
|
-
'focus:ring-ring rounded-sm inline-flex items-center px-2.5 py-0.5 font-semibold text-white shadow-sm transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-hidden forced-colors:outline',
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
color: {
|
|
12
|
-
red: 'bg-red-500 dark:bg-red-600 text-white',
|
|
13
|
-
orange: 'bg-orange-500 text-white dark:bg-orange-600',
|
|
14
|
-
amber: 'bg-amber-500 text-white dark:bg-amber-600 ',
|
|
15
|
-
yellow: 'bg-yellow-500 text-white dark:bg-yellow-600 ',
|
|
16
|
-
lime: 'bg-lime-500 text-white dark:bg-lime-600',
|
|
17
|
-
green: 'bg-green-500 text-white dark:bg-green-600',
|
|
18
|
-
emerald: 'bg-emerald-500 text-white dark:bg-emerald-600',
|
|
19
|
-
teal: 'bg-teal-500 text-white dark:bg-teal-600',
|
|
20
|
-
cyan: 'bg-cyan-500 text-white dark:bg-cyan-600',
|
|
21
|
-
sky: 'bg-sky-500 text-white dark:bg-sky-600',
|
|
22
|
-
blue: 'bg-blue-500 text-white dark:bg-blue-600',
|
|
23
|
-
indigo: 'bg-indigo-500 text-white dark:bg-indigo-600',
|
|
24
|
-
violet: 'bg-violet-500 text-white dark:bg-violet-600',
|
|
25
|
-
purple: 'bg-purple-500 text-white dark:bg-purple-600',
|
|
26
|
-
fuchsia: 'bg-fuchsia-500 text-white dark:bg-fuchsia-600',
|
|
27
|
-
pink: 'bg-pink-500 text-white dark:bg-pink-600',
|
|
28
|
-
rose: 'bg-rose-500 text-white dark:bg-rose-600',
|
|
29
|
-
zinc: 'bg-zinc-500 text-white dark:bg-zinc-600',
|
|
30
|
-
},
|
|
31
|
-
size: {
|
|
32
|
-
xs: 'text-[8px]/3 px-1 py-0.5 gap-1',
|
|
33
|
-
sm: 'text-[10px]/3 px-1.5 py-1 gap-1',
|
|
34
|
-
md: 'text-xs px-2 py-1 gap-1',
|
|
35
|
-
lg: 'text-sm px-2 py-1 gap-1.5',
|
|
36
|
-
xl: 'text-base px-2.5 py-1 gap-1.5',
|
|
37
|
-
},
|
|
38
|
-
pill: {
|
|
39
|
-
true: 'rounded-full',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
defaultVariants: {
|
|
43
|
-
color: 'zinc',
|
|
44
|
-
size: 'md',
|
|
45
|
-
pill: true,
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
export type BadgeProps = VariantProps<typeof badgeVariants> & React.ComponentPropsWithoutRef<'div'>
|
|
51
|
-
|
|
52
|
-
function Badge({ className, color, size, pill, ...props }: BadgeProps) {
|
|
53
|
-
return <div className={cn(badgeVariants({ color, pill, size }), className)} {...props} />
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// eslint-disable-next-line react-refresh/only-export-components
|
|
57
|
-
export { Badge, badgeVariants }
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { Slot as SlotPrimitive } from 'radix-ui'
|
|
4
|
-
import { ChevronRight, MoreHorizontalIcon } from 'lucide-react'
|
|
5
|
-
|
|
6
|
-
import { cn } from '@/lib/utils'
|
|
7
|
-
|
|
8
|
-
function Breadcrumb({ ...props }: React.ComponentProps<'nav'>) {
|
|
9
|
-
return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>) {
|
|
13
|
-
return (
|
|
14
|
-
<ol
|
|
15
|
-
data-slot="breadcrumb-list"
|
|
16
|
-
className={cn('text-text-positive-weak flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5', className)}
|
|
17
|
-
{...props}
|
|
18
|
-
/>
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>) {
|
|
23
|
-
return <li data-slot="breadcrumb-item" className={cn('inline-flex items-center gap-1.5', className)} {...props} />
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function BreadcrumbLink({
|
|
27
|
-
asChild,
|
|
28
|
-
className,
|
|
29
|
-
...props
|
|
30
|
-
}: React.ComponentProps<'a'> & {
|
|
31
|
-
asChild?: boolean
|
|
32
|
-
}) {
|
|
33
|
-
const Comp = asChild ? SlotPrimitive.Slot : 'a'
|
|
34
|
-
|
|
35
|
-
return <Comp data-slot="breadcrumb-link" className={cn('hover:text-text-positive transition-colors', className)} {...props} />
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>) {
|
|
39
|
-
return (
|
|
40
|
-
<span
|
|
41
|
-
data-slot="breadcrumb-page"
|
|
42
|
-
role="link"
|
|
43
|
-
aria-disabled="true"
|
|
44
|
-
aria-current="page"
|
|
45
|
-
className={cn('text-text-positive-strong font-normal', className)}
|
|
46
|
-
{...props}
|
|
47
|
-
/>
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>) {
|
|
52
|
-
return (
|
|
53
|
-
<li data-slot="breadcrumb-separator" role="presentation" aria-hidden="true" className={cn('[&>svg]:size-3.5', className)} {...props}>
|
|
54
|
-
{children ?? <ChevronRight />}
|
|
55
|
-
</li>
|
|
56
|
-
)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>) {
|
|
60
|
-
return (
|
|
61
|
-
<span
|
|
62
|
-
data-slot="breadcrumb-ellipsis"
|
|
63
|
-
role="presentation"
|
|
64
|
-
aria-hidden="true"
|
|
65
|
-
className={cn('flex size-9 items-center justify-center', className)}
|
|
66
|
-
{...props}
|
|
67
|
-
>
|
|
68
|
-
<MoreHorizontalIcon size={16} />
|
|
69
|
-
<span className="sr-only">More</span>
|
|
70
|
-
</span>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator }
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { Slot } from 'radix-ui'
|
|
4
|
-
import { cva, type VariantProps } from 'class-variance-authority'
|
|
5
|
-
|
|
6
|
-
import { cn } from '@/lib/utils'
|
|
7
|
-
|
|
8
|
-
const buttonVariants = cva(
|
|
9
|
-
[
|
|
10
|
-
'relative shrink-0 cursor-pointer rounded-md font-medium whitespace-normal transition-all',
|
|
11
|
-
'hover:shadow-md',
|
|
12
|
-
'active:ring-0',
|
|
13
|
-
'[&_svg]:pointer-events-none',
|
|
14
|
-
'[&_svg]:shrink-0',
|
|
15
|
-
"[&_svg:not([class*='size-'])]:size-4",
|
|
16
|
-
'disabled:pointer-events-none',
|
|
17
|
-
'disabled:cursor-default disabled:opacity-50',
|
|
18
|
-
],
|
|
19
|
-
{
|
|
20
|
-
variants: {
|
|
21
|
-
variant: {
|
|
22
|
-
default: '-outline-offset-1 outline-1 text-text-negative-strong',
|
|
23
|
-
outline:
|
|
24
|
-
'-outline-offset-1 outline-1 text-text-positive hover:text-text-positive-strong focus:text-text-positive-strong active:text-text-positive-strong',
|
|
25
|
-
ghost: 'outline-0 shadow-none hover:shadow-none',
|
|
26
|
-
|
|
27
|
-
link: '',
|
|
28
|
-
},
|
|
29
|
-
color: {
|
|
30
|
-
primary: 'hover:shadow-primary-weak',
|
|
31
|
-
secondary: 'hover:shadow-secondary-weak',
|
|
32
|
-
muted: 'hover:shadow-border-weak',
|
|
33
|
-
success: 'hover:shadow-success-weak',
|
|
34
|
-
important: 'hover:shadow-important-weak',
|
|
35
|
-
info: 'hover:shadow-info-weak',
|
|
36
|
-
warning: 'hover:shadow-warning-weak',
|
|
37
|
-
danger: 'hover:shadow-danger-weak',
|
|
38
|
-
},
|
|
39
|
-
size: {
|
|
40
|
-
sm: 'px-2 py-1.5 gap-1 text-xs focus:ring-4 has-[>svg]:px-2.5',
|
|
41
|
-
default: 'px-2.5 py-2 gap-1 text-sm focus:ring-4 has-[>svg]:px-3',
|
|
42
|
-
lg: 'px-3 py-2.5 gap-1 text-base focus:ring-6 has-[>svg]:px-4',
|
|
43
|
-
icon: 'size-8',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
defaultVariants: {
|
|
47
|
-
variant: 'default',
|
|
48
|
-
color: 'primary',
|
|
49
|
-
size: 'default',
|
|
50
|
-
},
|
|
51
|
-
compoundVariants: [
|
|
52
|
-
{
|
|
53
|
-
variant: 'default',
|
|
54
|
-
color: 'primary',
|
|
55
|
-
className: 'outline-primary-strong bg-primary focus:ring-primary-weak focus:outline-primary-intense focus:bg-primary-strong active:bg-primary-strong',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
variant: 'default',
|
|
59
|
-
color: 'secondary',
|
|
60
|
-
className:
|
|
61
|
-
'outline-secondary-strong bg-secondary focus:ring-secondary-weak focus:outline-secondary-intense focus:bg-secondary-strong active:bg-secondary-strong',
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
variant: 'default',
|
|
65
|
-
color: 'success',
|
|
66
|
-
className: 'outline-success-strong bg-success focus:ring-success-weak focus:outline-success-intense focus:bg-success-strong active:bg-success-strong',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
variant: 'default',
|
|
70
|
-
color: 'important',
|
|
71
|
-
className:
|
|
72
|
-
'outline-important-strong bg-important focus:ring-important-weak focus:outline-important-intense focus:bg-important-strong active:bg-important-strong',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
variant: 'default',
|
|
76
|
-
color: 'info',
|
|
77
|
-
className: 'outline-info-strong bg-info focus:ring-info-weak focus:outline-info-intense focus:bg-info-strong active:bg-info-strong',
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
variant: 'default',
|
|
81
|
-
color: 'warning',
|
|
82
|
-
className: 'outline-warning-strong bg-warning focus:ring-warning-weak focus:outline-warning-intense focus:bg-warning-strong active:bg-warning-strong',
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
variant: 'default',
|
|
86
|
-
color: 'danger',
|
|
87
|
-
className: 'outline-danger-strong bg-danger focus:ring-danger-weak focus:outline-danger-intense focus:bg-danger-strong active:bg-danger-strong',
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
variant: 'outline',
|
|
91
|
-
color: 'muted',
|
|
92
|
-
className: 'outline-border bg-background focus:ring-border-weak focus:outline-border-strong focus:bg-border-muted active:bg-border-muted',
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
variant: 'outline',
|
|
96
|
-
color: 'primary',
|
|
97
|
-
className: 'outline-primary-strong bg-background focus:ring-primary-weak focus:outline-primary-intense focus:bg-primary-muted active:bg-primary-muted',
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
variant: 'outline',
|
|
101
|
-
color: 'secondary',
|
|
102
|
-
className:
|
|
103
|
-
'outline-secondary-strong bg-background focus:ring-secondary-weak focus:outline-secondary-intense focus:bg-secondary-muted active:bg-secondary-muted',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
variant: 'outline',
|
|
107
|
-
color: 'success',
|
|
108
|
-
className: 'outline-success-strong bg-background focus:ring-success-weak focus:outline-success-intense focus:bg-success-muted active:bg-success-muted',
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
variant: 'outline',
|
|
112
|
-
color: 'important',
|
|
113
|
-
className:
|
|
114
|
-
'outline-important-strong bg-background focus:ring-important-weak focus:outline-important-intense focus:bg-important-muted active:bg-important-muted',
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
variant: 'outline',
|
|
118
|
-
color: 'info',
|
|
119
|
-
className: 'outline-info-strong bg-background focus:ring-info-weak focus:outline-info-intense focus:bg-info-muted active:bg-info-muted',
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
variant: 'outline',
|
|
123
|
-
color: 'warning',
|
|
124
|
-
className: 'outline-warning-strong bg-background focus:ring-warning-weak focus:outline-warning-intense focus:bg-warning-muted active:bg-warning-muted',
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
variant: 'outline',
|
|
128
|
-
color: 'danger',
|
|
129
|
-
className: 'outline-danger-strong bg-background focus:ring-danger-weak focus:outline-danger-intense focus:bg-danger-muted active:bg-danger-muted',
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
variant: 'ghost',
|
|
133
|
-
color: 'primary',
|
|
134
|
-
className: 'text-primary-strong hover:bg-primary-muted focus:ring-primary-weak focus:bg-primary/10 active:bg-primary/10',
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
variant: 'ghost',
|
|
138
|
-
color: 'secondary',
|
|
139
|
-
className: 'text-secondary-strong hover:bg-secondary-muted focus:ring-secondary-weak focus:bg-secondary/10 active:bg-secondary/10',
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
variant: 'ghost',
|
|
143
|
-
color: 'muted',
|
|
144
|
-
className: 'text-text-positive hover:bg-border-muted focus:ring-border-weak focus:bg-border/10 active:bg-border/10',
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
variant: 'ghost',
|
|
148
|
-
color: 'success',
|
|
149
|
-
className: 'text-success-strong hover:bg-success-muted focus:ring-success-weak focus:bg-success/10 active:bg-success/10',
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
variant: 'ghost',
|
|
153
|
-
color: 'important',
|
|
154
|
-
className: 'text-important-strong hover:bg-important-muted focus:ring-important-weak focus:bg-important/10 active:bg-important/10',
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
variant: 'ghost',
|
|
158
|
-
color: 'info',
|
|
159
|
-
className: 'text-info-strong hover:bg-info-muted focus:ring-info-weak focus:bg-info/10 active:bg-info/10',
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
variant: 'ghost',
|
|
163
|
-
color: 'warning',
|
|
164
|
-
className: 'text-warning-strong hover:bg-warning-muted focus:ring-warning-weak focus:bg-warning/10 active:bg-warning/10',
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
variant: 'ghost',
|
|
168
|
-
color: 'danger',
|
|
169
|
-
className: 'text-danger-strong hover:bg-danger-muted focus:ring-danger-weak focus:bg-danger/10 active:bg-danger/10',
|
|
170
|
-
},
|
|
171
|
-
],
|
|
172
|
-
},
|
|
173
|
-
)
|
|
174
|
-
|
|
175
|
-
function Button({
|
|
176
|
-
className,
|
|
177
|
-
variant,
|
|
178
|
-
size,
|
|
179
|
-
color,
|
|
180
|
-
asChild = false,
|
|
181
|
-
isLoading = false,
|
|
182
|
-
...props
|
|
183
|
-
}: React.ComponentProps<'button'> &
|
|
184
|
-
VariantProps<typeof buttonVariants> & {
|
|
185
|
-
asChild?: boolean
|
|
186
|
-
isLoading?: boolean
|
|
187
|
-
}) {
|
|
188
|
-
const Comp = asChild ? Slot.Root : 'button'
|
|
189
|
-
|
|
190
|
-
return (
|
|
191
|
-
<Comp data-slot="button" className={cn(buttonVariants({ variant, size, color, className }))} {...props}>
|
|
192
|
-
<div className={cn('flex size-full items-center justify-center gap-2 text-nowrap', isLoading && 'opacity-0')}>
|
|
193
|
-
<Slot.Slottable>{props.children}</Slot.Slottable>
|
|
194
|
-
</div>
|
|
195
|
-
{isLoading && (
|
|
196
|
-
<div className="absolute inset-0 flex items-center justify-center">
|
|
197
|
-
<div className="loader-spinner text-muted-foreground" />
|
|
198
|
-
</div>
|
|
199
|
-
)}
|
|
200
|
-
</Comp>
|
|
201
|
-
)
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
// eslint-disable-next-line react-refresh/only-export-components
|
|
205
|
-
export { Button, buttonVariants }
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { PlusIcon } from 'lucide-react'
|
|
2
|
-
|
|
3
|
-
import { Paragraph } from '@/components/typography/paragraph'
|
|
4
|
-
|
|
5
|
-
import { Button } from '../button'
|
|
6
|
-
|
|
7
|
-
type Props = {
|
|
8
|
-
onClick?: () => void
|
|
9
|
-
}
|
|
10
|
-
export const AddNewBtn: React.FC<React.PropsWithChildren<Props>> = ({ onClick = () => {} }) => {
|
|
11
|
-
return (
|
|
12
|
-
<Button aria-label="Tạo mới" variant="outline" className="aspect-square max-sm:p-0" onClick={onClick}>
|
|
13
|
-
<PlusIcon className="opacity-60 sm:-ms-1" size={16} aria-hidden="true" />
|
|
14
|
-
<Paragraph variant="sm" className="max-sm:sr-only">
|
|
15
|
-
Create New
|
|
16
|
-
</Paragraph>
|
|
17
|
-
</Button>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Edit2Icon } from 'lucide-react'
|
|
2
|
-
|
|
3
|
-
import { Button } from '../button'
|
|
4
|
-
|
|
5
|
-
type Props = {
|
|
6
|
-
onClick?: () => void
|
|
7
|
-
}
|
|
8
|
-
export const EditBtn: React.FC<Props> = ({ onClick }) => {
|
|
9
|
-
return (
|
|
10
|
-
<Button aria-label="Chỉnh sửa" variant="ghost" size="icon" className="aspect-square max-sm:p-0" onClick={onClick}>
|
|
11
|
-
<Edit2Icon size={16} className="opacity-60" />
|
|
12
|
-
</Button>
|
|
13
|
-
)
|
|
14
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { RefreshCwIcon } from 'lucide-react'
|
|
2
|
-
|
|
3
|
-
import { Paragraph } from '@/components/typography/paragraph'
|
|
4
|
-
|
|
5
|
-
import { Button } from '../button'
|
|
6
|
-
|
|
7
|
-
type Props = {
|
|
8
|
-
onClick?: () => void
|
|
9
|
-
}
|
|
10
|
-
export const RefreshBtn: React.FC<React.PropsWithChildren<Props>> = ({ onClick = () => {} }) => {
|
|
11
|
-
return (
|
|
12
|
-
<Button aria-label="Tạo mới" variant="outline" className="aspect-square max-sm:p-0" onClick={onClick}>
|
|
13
|
-
<RefreshCwIcon className="opacity-60 sm:-ms-1" size={16} aria-hidden="true" />
|
|
14
|
-
<Paragraph variant="sm" className="max-sm:sr-only">
|
|
15
|
-
Reset
|
|
16
|
-
</Paragraph>
|
|
17
|
-
</Button>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Trash2Icon } from 'lucide-react'
|
|
2
|
-
|
|
3
|
-
import { Button } from '../button'
|
|
4
|
-
|
|
5
|
-
type Props = {
|
|
6
|
-
onClick?: () => void
|
|
7
|
-
}
|
|
8
|
-
export const TrashBtn: React.FC<Props> = ({ onClick }) => {
|
|
9
|
-
return (
|
|
10
|
-
<Button aria-label="Xoá" variant="ghost" size="icon" className="aspect-square max-sm:p-0" onClick={onClick}>
|
|
11
|
-
<Trash2Icon size={16} className="opacity-60" aria-hidden="true" />
|
|
12
|
-
</Button>
|
|
13
|
-
)
|
|
14
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import type { PropsWithChildren } from 'react'
|
|
3
|
-
import { UploadIcon } from 'lucide-react'
|
|
4
|
-
|
|
5
|
-
import { Button } from '../button'
|
|
6
|
-
|
|
7
|
-
type Props = {
|
|
8
|
-
size?: number
|
|
9
|
-
onClick?: () => void
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const UploadImageBtn: React.FC<PropsWithChildren<Props>> = ({ size = '5rem', onClick }) => {
|
|
13
|
-
return (
|
|
14
|
-
<Button
|
|
15
|
-
style={{
|
|
16
|
-
width: size,
|
|
17
|
-
height: size,
|
|
18
|
-
}}
|
|
19
|
-
variant="outline"
|
|
20
|
-
onClick={onClick}
|
|
21
|
-
>
|
|
22
|
-
<UploadIcon className="size-6" />
|
|
23
|
-
</Button>
|
|
24
|
-
)
|
|
25
|
-
}
|