@customafk/lunas-ui 0.0.7 → 0.0.8
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/{add-new-BaABbnol.js → add-new-C--Ee4bj.js} +1 -2
- package/dist/{add-new-DUoS_-n2.cjs → add-new-pfLdk0Hp.cjs} +1 -2
- package/dist/{alert-dialog-0KwdjY-6.js → alert-dialog-CQa0TLlF.js} +1 -2
- package/dist/{alert-dialog-D5ZqgIiC.cjs → alert-dialog-D1DFrl-0.cjs} +1 -2
- package/dist/badge-D_qEoSL8.js +1 -2
- package/dist/{badge-CRXT2dH_.cjs → badge-DfSj5nwV.cjs} +1 -2
- package/dist/button-Bku3bKv9.js +1 -2
- package/dist/button-CS0x-mYR.d.cts +22 -0
- package/dist/button-CxHABSnr.d.ts +22 -0
- package/dist/{button-Dzv_nos1.cjs → button-CycE0WzB.cjs} +1 -2
- package/dist/calendar-DaYVxwJx.js +1 -0
- package/dist/calendar-DzAxQqFI.cjs +1 -0
- package/dist/{card-Dta5eW8u.cjs → card-D7C05tvk.cjs} +1 -2
- package/dist/card-D8cxRC5y.js +1 -2
- package/dist/cards/simple-card.cjs +1 -2
- package/dist/cards/simple-card.d.cts +3 -3
- package/dist/cards/simple-card.d.ts +3 -3
- package/dist/cards/simple-card.js +1 -2
- package/dist/chunk-hhQzssFb.cjs +1 -0
- package/dist/command-BfYiUikG.d.cts +52 -0
- package/dist/{command-CsntVmEz.cjs → command-CkGJbvFq.cjs} +1 -2
- package/dist/command-CycGGWOh.d.ts +52 -0
- package/dist/{command-_L9bD9a-.js → command-Ir_Vqgds.js} +1 -2
- package/dist/data-display/country.cjs +1 -2
- package/dist/data-display/country.d.cts +1 -2
- package/dist/data-display/country.d.ts +2 -3
- package/dist/data-display/country.js +1 -2
- package/dist/data-display/data-list.cjs +1 -2
- package/dist/data-display/data-list.d.cts +1 -2
- package/dist/data-display/data-list.d.ts +1 -2
- package/dist/data-display/data-list.js +1 -2
- package/dist/data-display/date.cjs +1 -1
- package/dist/data-display/date.d.cts +1 -2
- package/dist/data-display/date.d.ts +1 -2
- package/dist/data-display/empty.cjs +1 -2
- package/dist/data-display/empty.d.cts +4 -3
- package/dist/data-display/empty.d.ts +4 -3
- package/dist/data-display/empty.js +1 -2
- package/dist/data-display/name.cjs +1 -2
- package/dist/data-display/name.d.cts +1 -2
- package/dist/data-display/name.d.ts +1 -2
- package/dist/data-display/name.js +1 -2
- package/dist/data-display/phone-number.cjs +1 -2
- package/dist/data-display/phone-number.d.cts +1 -2
- package/dist/data-display/phone-number.d.ts +1 -2
- package/dist/data-display/phone-number.js +1 -2
- package/dist/data-display/role-badge.cjs +1 -2
- package/dist/data-display/role-badge.d.cts +1 -2
- package/dist/data-display/role-badge.d.ts +2 -3
- package/dist/data-display/role-badge.js +1 -2
- package/dist/data-display/statistic.cjs +1 -2
- package/dist/data-display/statistic.d.cts +26 -3
- package/dist/data-display/statistic.d.ts +26 -3
- package/dist/data-display/statistic.js +1 -2
- package/dist/date-BMq_DNsv.js +1 -2
- package/dist/{date-nd8WkPlx.cjs → date-ByLOGsKl.cjs} +1 -2
- package/dist/{dialog-D3VF5qxy.d.cts → dialog-B13T--98.d.ts} +12 -12
- package/dist/{dialog-W-DmDMEE.cjs → dialog-B3cQOpjg.cjs} +1 -2
- package/dist/{dialog-C4hf-Puw.js → dialog-BLDh3Gqw.js} +1 -2
- package/dist/{dialog-MLCAvDJH.d.ts → dialog-Dspjpsjh.d.cts} +12 -12
- package/dist/dialogs/confirm-dialog.cjs +1 -2
- package/dist/dialogs/confirm-dialog.d.cts +1 -2
- package/dist/dialogs/confirm-dialog.d.ts +1 -2
- package/dist/dialogs/confirm-dialog.js +1 -2
- package/dist/dialogs/detail-dialog/index.cjs +1 -2
- package/dist/dialogs/detail-dialog/index.d.cts +1 -2
- package/dist/dialogs/detail-dialog/index.d.ts +1 -2
- package/dist/dialogs/detail-dialog/index.js +1 -2
- package/dist/dialogs/error-dialog.cjs +1 -1
- package/dist/dialogs/error-dialog.d.cts +1 -2
- package/dist/dialogs/error-dialog.d.ts +1 -2
- package/dist/dialogs/error-dialog.js +1 -1
- package/dist/dialogs/form-dialog.cjs +1 -2
- package/dist/dialogs/form-dialog.d.cts +3 -3
- package/dist/dialogs/form-dialog.d.ts +3 -3
- package/dist/dialogs/form-dialog.js +1 -2
- package/dist/dialogs/loading-dialog.cjs +1 -2
- package/dist/dialogs/loading-dialog.d.cts +1 -2
- package/dist/dialogs/loading-dialog.d.ts +1 -2
- package/dist/dialogs/loading-dialog.js +1 -2
- package/dist/{dropdown-menu-Bv18S56o.cjs → dropdown-menu-CPvB_jOC.cjs} +1 -2
- package/dist/{dropdown-menu-jCQwh2rG.js → dropdown-menu-Cx-Wime0.js} +1 -2
- package/dist/{error-dialog-DpQgL5Hy.cjs → error-dialog-BTjeT7x-.cjs} +1 -2
- package/dist/{error-dialog-D_4WL-Hj.js → error-dialog-DlhosP10.js} +1 -2
- package/dist/flex-ILvQrYMJ.js +1 -2
- package/dist/{flex-CNA_SId-.cjs → flex-yTyoLpgH.cjs} +1 -2
- package/dist/form-CA4hhSV5.js +1 -2
- package/dist/{form-CYZkgobJ.cjs → form-C_PCHrpx.cjs} +1 -2
- package/dist/{form-wrapper-BYbwt1zC.cjs → form-wrapper-CCqogufb.cjs} +1 -2
- package/dist/{form-wrapper-D-2Uz518.js → form-wrapper-YPIbD8rh.js} +1 -2
- package/dist/forms/combobox-field.cjs +41 -0
- package/dist/forms/combobox-field.d.cts +27 -0
- package/dist/forms/combobox-field.d.ts +27 -0
- package/dist/forms/combobox-field.js +41 -0
- package/dist/forms/date-field.cjs +1 -0
- package/dist/forms/date-field.d.cts +21 -0
- package/dist/forms/date-field.d.ts +21 -0
- package/dist/forms/date-field.js +1 -0
- package/dist/forms/form-wrapper.cjs +1 -1
- package/dist/forms/form-wrapper.d.cts +3 -3
- package/dist/forms/form-wrapper.d.ts +3 -3
- package/dist/forms/form-wrapper.js +1 -1
- package/dist/forms/multi-select-field.cjs +1 -0
- package/dist/forms/multi-select-field.d.cts +29 -0
- package/dist/forms/multi-select-field.d.ts +29 -0
- package/dist/forms/multi-select-field.js +1 -0
- package/dist/forms/number-field.cjs +1 -0
- package/dist/forms/number-field.d.cts +27 -0
- package/dist/forms/number-field.d.ts +27 -0
- package/dist/forms/number-field.js +1 -0
- package/dist/forms/password-field.cjs +1 -0
- package/dist/forms/password-field.d.cts +22 -0
- package/dist/forms/password-field.d.ts +22 -0
- package/dist/forms/password-field.js +1 -0
- package/dist/forms/select-field.cjs +1 -0
- package/dist/forms/select-field.d.cts +32 -0
- package/dist/forms/select-field.d.ts +32 -0
- package/dist/forms/select-field.js +1 -0
- package/dist/forms/switch-field.cjs +1 -0
- package/dist/forms/switch-field.d.cts +18 -0
- package/dist/forms/switch-field.d.ts +18 -0
- package/dist/forms/switch-field.js +1 -0
- package/dist/forms/text-field.cjs +1 -0
- package/dist/forms/text-field.d.cts +30 -0
- package/dist/forms/text-field.d.ts +30 -0
- package/dist/forms/text-field.js +1 -0
- package/dist/forms/textarea-field.cjs +1 -0
- package/dist/forms/textarea-field.d.cts +26 -0
- package/dist/forms/textarea-field.d.ts +26 -0
- package/dist/forms/textarea-field.js +1 -0
- package/dist/{input-D0Phuz25.d.cts → input-BcIy0lq8.d.cts} +3 -3
- package/dist/{input-DXEBB91E.cjs → input-C8Sebaue.cjs} +1 -2
- package/dist/{input-tHIKXxVS.d.ts → input-Cux9upuQ.d.ts} +3 -3
- package/dist/{input-FzKbxUq2.js → input-Dmaq3fzf.js} +1 -2
- package/dist/label-Cxbctr6x.js +1 -2
- package/dist/{label-CunjD1rx.cjs → label-i858Jr98.cjs} +1 -2
- package/dist/layouts/flex.cjs +1 -1
- package/dist/layouts/flex.d.cts +14 -4
- package/dist/layouts/flex.d.ts +14 -4
- package/dist/layouts/main/index.cjs +1 -2
- package/dist/layouts/main/index.d.cts +14 -5
- package/dist/layouts/main/index.d.ts +14 -5
- package/dist/layouts/main/index.js +1 -2
- package/dist/multi-select-DZBXSr7F.cjs +1 -0
- package/dist/multi-select-LYl29d4h.js +1 -0
- package/dist/paragraph-Bey03JkA.js +1 -2
- package/dist/{paragraph-ZxI8zxuf.cjs → paragraph-DWQ0PZt_.cjs} +1 -2
- package/dist/popover-Ce0OTSQL.cjs +1 -0
- package/dist/popover-tDri6Ded.js +1 -0
- package/dist/{progress-BnnOfAZN.cjs → progress-CHh9eRZi.cjs} +1 -2
- package/dist/{progress-CBccqUUJ.js → progress-CeXKNvJc.js} +1 -2
- package/dist/{refresh-BHt_h3N_.js → refresh-BPlmkCzH.js} +1 -2
- package/dist/{refresh-DrolZxuC.cjs → refresh-Dtz354hW.cjs} +1 -2
- package/dist/{scroll-area-DWWpaz5j.cjs → scroll-area-Ba9RvkDf.cjs} +1 -2
- package/dist/{scroll-area-Bdb_LSFF.js → scroll-area-D-IhBWqm.js} +1 -2
- package/dist/{search-input-L2sq0eB0.js → search-input-BG4-fO9W.js} +1 -2
- package/dist/{search-input-Bf4-FeWu.cjs → search-input-DVMQEBvb.cjs} +1 -2
- package/dist/{select-CWUsisI0.js → select-4IO3vAjO.js} +1 -2
- package/dist/{select-ZSyt5zCe.cjs → select-UsiicIRo.cjs} +1 -2
- package/dist/{separator-DTB3sDNG.cjs → separator-D4iTmsID.cjs} +1 -2
- package/dist/{separator-BpsL0PlX.js → separator-DMdqEz29.js} +1 -2
- package/dist/{separator-COXs-I-Q.d.cts → separator-DtZ0fiIK.d.cts} +3 -3
- package/dist/{separator-2cwfp8qT.d.ts → separator-J8f9PdbI.d.ts} +3 -3
- package/dist/{sheet-C8r2QGpq.js → sheet-2JqHfdYi.js} +1 -2
- package/dist/{sheet-CCwbAaA6.cjs → sheet-Dr-a3-o2.cjs} +1 -2
- package/dist/{sidebar-C166f_9B.js → sidebar-COBzB7S8.js} +1 -2
- package/dist/{sidebar-BLPMNltJ.cjs → sidebar-gXuaHBie.cjs} +1 -2
- package/dist/skeleton-BTQm_mtV.cjs +1 -0
- package/dist/{skeleton-DYmX0k94.js → skeleton-D1_Brnl9.js} +1 -2
- package/dist/switch-BlK-TC1h.js +1 -0
- package/dist/switch-CoP3UwNk.cjs +1 -0
- package/dist/table/index.cjs +1 -2
- package/dist/table/index.d.cts +3 -3
- package/dist/table/index.d.ts +3 -3
- package/dist/table/index.js +1 -2
- package/dist/{table-BSeev7T0.cjs → table-C46bXpzd.cjs} +1 -2
- package/dist/{table-BvA64mE8.js → table-nHFRC3DG.js} +1 -2
- package/dist/textarea-Dz6npuI4.cjs +1 -0
- package/dist/textarea-dM1DYNfF.js +1 -0
- package/dist/{title-xsPZpQpb.cjs → title-BlLBscIg.cjs} +1 -2
- package/dist/title-DTkABsIG.js +1 -2
- package/dist/toggle-3yC7NgOb.d.ts +19 -0
- package/dist/toggle-8wPArWPq.d.cts +19 -0
- package/dist/{toggle-D_MDMruK.js → toggle-CHJ2edke.js} +1 -2
- package/dist/{toggle-CfL3GVe2.cjs → toggle-CzMYdDvC.cjs} +1 -2
- package/dist/{tooltip-Cjuu_Ld4.d.ts → tooltip-Bo9id3nz.d.ts} +6 -6
- package/dist/tooltip-Dzyf5smh.js +1 -2
- package/dist/{tooltip-Dk4HsZVR.d.cts → tooltip-JbjxxBNd.d.cts} +6 -6
- package/dist/{tooltip-Beb-_EPp.cjs → tooltip-MgToVOzy.cjs} +1 -2
- package/dist/types-B0V1F4Ml.d.cts +1 -2
- package/dist/{types-DLrIc2fL.d.ts → types-CmcNT14g.d.ts} +1 -2
- package/dist/types-CrbWxjnp.cjs +1 -2
- package/dist/types-DaIHddx7.js +1 -2
- package/dist/typography/paragraph.cjs +1 -1
- package/dist/typography/paragraph.d.cts +3 -3
- package/dist/typography/paragraph.d.ts +3 -3
- package/dist/typography/title.cjs +1 -1
- package/dist/typography/title.d.cts +4 -3
- package/dist/typography/title.d.ts +4 -3
- package/dist/ui/alert-dialog.cjs +1 -1
- package/dist/ui/alert-dialog.d.cts +13 -13
- package/dist/ui/alert-dialog.d.ts +13 -13
- package/dist/ui/alert-dialog.js +1 -1
- package/dist/ui/alert.cjs +1 -2
- package/dist/ui/alert.d.cts +9 -6
- package/dist/ui/alert.d.ts +9 -6
- package/dist/ui/alert.js +1 -2
- package/dist/ui/aspect-ratio.cjs +1 -2
- package/dist/ui/aspect-ratio.d.cts +3 -3
- package/dist/ui/aspect-ratio.d.ts +3 -3
- package/dist/ui/aspect-ratio.js +1 -2
- package/dist/ui/avatar.cjs +1 -2
- package/dist/ui/avatar.d.cts +5 -5
- package/dist/ui/avatar.d.ts +5 -5
- package/dist/ui/avatar.js +1 -2
- package/dist/ui/badge.cjs +1 -1
- package/dist/ui/badge.d.cts +9 -4
- package/dist/ui/badge.d.ts +9 -4
- package/dist/ui/breadcrumb.cjs +1 -2
- package/dist/ui/breadcrumb.d.cts +9 -9
- package/dist/ui/breadcrumb.d.ts +9 -9
- package/dist/ui/breadcrumb.js +1 -2
- package/dist/ui/button.cjs +1 -1
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/buttons/add-new.cjs +1 -1
- package/dist/ui/buttons/add-new.d.cts +1 -2
- package/dist/ui/buttons/add-new.d.ts +1 -2
- package/dist/ui/buttons/add-new.js +1 -1
- package/dist/ui/buttons/refresh.cjs +1 -1
- package/dist/ui/buttons/refresh.d.cts +1 -2
- package/dist/ui/buttons/refresh.d.ts +1 -2
- package/dist/ui/buttons/refresh.js +1 -1
- package/dist/ui/calendar.cjs +1 -2
- package/dist/ui/calendar.d.cts +5 -5
- package/dist/ui/calendar.d.ts +5 -5
- package/dist/ui/calendar.js +1 -2
- package/dist/ui/card.cjs +1 -1
- package/dist/ui/card.d.cts +9 -9
- package/dist/ui/card.d.ts +9 -9
- package/dist/ui/carousel.cjs +1 -2
- package/dist/ui/carousel.d.cts +8 -8
- package/dist/ui/carousel.d.ts +8 -8
- package/dist/ui/carousel.js +1 -2
- package/dist/ui/collapsible.cjs +1 -2
- package/dist/ui/collapsible.d.cts +5 -5
- package/dist/ui/collapsible.d.ts +5 -5
- package/dist/ui/collapsible.js +1 -2
- package/dist/ui/command.cjs +1 -1
- package/dist/ui/command.d.cts +3 -52
- package/dist/ui/command.d.ts +3 -52
- package/dist/ui/command.js +1 -1
- package/dist/ui/context-menu.cjs +1 -2
- package/dist/ui/context-menu.d.cts +17 -17
- package/dist/ui/context-menu.d.ts +17 -17
- package/dist/ui/context-menu.js +1 -2
- 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.cjs +1 -1
- package/dist/ui/dropdown-menu.d.cts +17 -17
- package/dist/ui/dropdown-menu.d.ts +17 -17
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/file-uploader.cjs +2 -3
- package/dist/ui/file-uploader.d.cts +3 -3
- package/dist/ui/file-uploader.d.ts +3 -3
- package/dist/ui/file-uploader.js +2 -3
- package/dist/ui/form.cjs +1 -1
- package/dist/ui/form.d.cts +24 -10
- package/dist/ui/form.d.ts +24 -10
- package/dist/ui/hover-card.cjs +1 -2
- package/dist/ui/hover-card.d.cts +5 -5
- package/dist/ui/hover-card.d.ts +5 -5
- package/dist/ui/hover-card.js +1 -2
- package/dist/ui/input-otp.cjs +1 -2
- package/dist/ui/input-otp.d.cts +6 -6
- package/dist/ui/input-otp.d.ts +6 -6
- package/dist/ui/input-otp.js +1 -2
- package/dist/ui/input.cjs +1 -1
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.ts +1 -1
- package/dist/ui/input.js +1 -1
- package/dist/ui/inputs/search-input.cjs +1 -1
- package/dist/ui/inputs/search-input.d.cts +4 -4
- package/dist/ui/inputs/search-input.d.ts +4 -4
- package/dist/ui/inputs/search-input.js +1 -1
- package/dist/ui/label.cjs +1 -1
- package/dist/ui/label.d.cts +3 -3
- package/dist/ui/label.d.ts +3 -3
- package/dist/ui/menubar.cjs +1 -2
- package/dist/ui/menubar.d.cts +18 -18
- package/dist/ui/menubar.d.ts +18 -18
- package/dist/ui/menubar.js +1 -2
- package/dist/ui/multi-select.cjs +1 -2
- package/dist/ui/multi-select.d.cts +62 -3
- package/dist/ui/multi-select.d.ts +62 -3
- package/dist/ui/multi-select.js +1 -2
- package/dist/ui/navigation-menu.cjs +1 -2
- package/dist/ui/navigation-menu.d.cts +12 -11
- package/dist/ui/navigation-menu.d.ts +12 -11
- package/dist/ui/navigation-menu.js +1 -2
- package/dist/ui/pagination.cjs +1 -2
- package/dist/ui/pagination.d.cts +10 -10
- package/dist/ui/pagination.d.ts +10 -10
- package/dist/ui/pagination.js +1 -2
- package/dist/ui/popover.cjs +1 -2
- package/dist/ui/popover.d.cts +6 -6
- package/dist/ui/popover.d.ts +6 -6
- package/dist/ui/popover.js +1 -2
- package/dist/ui/progress.cjs +1 -1
- package/dist/ui/progress.d.cts +3 -3
- package/dist/ui/progress.d.ts +3 -3
- package/dist/ui/progress.js +1 -1
- package/dist/ui/radio-group.cjs +1 -2
- package/dist/ui/radio-group.d.cts +4 -4
- package/dist/ui/radio-group.d.ts +4 -4
- package/dist/ui/radio-group.js +1 -2
- package/dist/ui/resizable.cjs +1 -2
- package/dist/ui/resizable.d.cts +5 -5
- package/dist/ui/resizable.d.ts +5 -5
- package/dist/ui/resizable.js +1 -2
- package/dist/ui/scroll-area.cjs +1 -1
- package/dist/ui/scroll-area.d.cts +4 -4
- package/dist/ui/scroll-area.d.ts +4 -4
- package/dist/ui/scroll-area.js +1 -1
- package/dist/ui/select.cjs +1 -1
- package/dist/ui/select.d.cts +12 -12
- package/dist/ui/select.d.ts +12 -12
- package/dist/ui/select.js +1 -1
- package/dist/ui/separator.cjs +1 -1
- package/dist/ui/separator.d.cts +1 -1
- package/dist/ui/separator.d.ts +1 -1
- package/dist/ui/separator.js +1 -1
- package/dist/ui/sheet.cjs +1 -1
- package/dist/ui/sheet.d.cts +10 -10
- package/dist/ui/sheet.d.ts +10 -10
- package/dist/ui/sheet.js +1 -1
- package/dist/ui/sidebar.cjs +1 -1
- package/dist/ui/sidebar.d.cts +44 -31
- package/dist/ui/sidebar.d.ts +44 -31
- package/dist/ui/sidebar.js +1 -1
- package/dist/ui/skeleton.cjs +1 -1
- package/dist/ui/skeleton.d.cts +3 -3
- package/dist/ui/skeleton.d.ts +3 -3
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.cjs +1 -2
- package/dist/ui/slider.d.cts +3 -3
- package/dist/ui/slider.d.ts +3 -3
- package/dist/ui/slider.js +1 -2
- package/dist/ui/sonner.cjs +1 -2
- package/dist/ui/sonner.d.cts +4 -3
- package/dist/ui/sonner.d.ts +4 -3
- package/dist/ui/sonner.js +1 -2
- package/dist/ui/switch.cjs +1 -2
- package/dist/ui/switch.d.cts +3 -3
- package/dist/ui/switch.d.ts +3 -3
- package/dist/ui/switch.js +1 -2
- package/dist/ui/table.cjs +1 -1
- package/dist/ui/table.d.cts +10 -10
- package/dist/ui/table.d.ts +10 -10
- package/dist/ui/table.js +1 -1
- package/dist/ui/tabs.cjs +1 -2
- package/dist/ui/tabs.d.cts +6 -6
- package/dist/ui/tabs.d.ts +6 -6
- package/dist/ui/tabs.js +1 -2
- package/dist/ui/textarea.cjs +1 -2
- package/dist/ui/textarea.d.cts +3 -3
- package/dist/ui/textarea.d.ts +3 -3
- package/dist/ui/textarea.js +1 -2
- package/dist/ui/toggle-group.cjs +1 -2
- package/dist/ui/toggle-group.d.cts +5 -5
- package/dist/ui/toggle-group.d.ts +5 -5
- package/dist/ui/toggle-group.js +1 -2
- package/dist/ui/toggle.cjs +1 -1
- package/dist/ui/toggle.d.cts +1 -1
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/toggle.js +1 -1
- package/dist/ui/tooltip.cjs +1 -1
- package/dist/ui/tooltip.d.cts +1 -1
- package/dist/ui/tooltip.d.ts +1 -1
- package/dist/utils-D9AH0PUV.js +1 -2
- package/dist/utils-DaJ1XZgX.cjs +1 -0
- package/package.json +51 -4
- package/packages/components/cards/simple-card.tsx +37 -0
- package/packages/components/data-display/country.tsx +59 -0
- package/packages/components/data-display/data-list.tsx +38 -0
- package/packages/components/data-display/date.tsx +215 -0
- package/packages/components/data-display/empty.tsx +25 -0
- package/packages/components/data-display/name.tsx +25 -0
- package/packages/components/data-display/phone-number.tsx +22 -0
- package/packages/components/data-display/role-badge.tsx +33 -0
- package/packages/components/data-display/statistic.tsx +141 -0
- package/packages/components/dialogs/confirm-dialog.tsx +51 -0
- package/packages/components/dialogs/detail-dialog/component/header.tsx +14 -0
- package/packages/components/dialogs/detail-dialog/component/main.tsx +39 -0
- package/packages/components/dialogs/detail-dialog/component/sidebar.tsx +747 -0
- package/packages/components/dialogs/detail-dialog/component/wrapper.tsx +17 -0
- package/packages/components/dialogs/detail-dialog/index.tsx +100 -0
- package/packages/components/dialogs/error-dialog.tsx +48 -0
- package/packages/components/dialogs/form-dialog.tsx +106 -0
- package/packages/components/dialogs/loading-dialog.tsx +23 -0
- package/packages/components/forms/combobox-field.tsx +113 -0
- package/packages/components/forms/date-field.tsx +65 -0
- package/packages/components/forms/form-wrapper.tsx +146 -0
- package/packages/components/forms/multi-select-field.tsx +56 -0
- package/packages/components/forms/number-field.tsx +56 -0
- package/packages/components/forms/password-field.tsx +38 -0
- package/packages/components/forms/select-field.tsx +58 -0
- package/packages/components/forms/switch-field.tsx +42 -0
- package/packages/components/forms/text-field.tsx +80 -0
- package/packages/components/forms/textarea-field.tsx +53 -0
- package/packages/components/index.tsx +0 -0
- package/packages/components/layouts/flex.tsx +110 -0
- package/packages/components/layouts/main/content.tsx +11 -0
- package/packages/components/layouts/main/header.tsx +53 -0
- package/packages/components/layouts/main/index.tsx +3 -0
- package/packages/components/layouts/main/wrapper.tsx +5 -0
- package/packages/components/table/data-table-pagination.tsx +99 -0
- package/packages/components/table/data-table.tsx +328 -0
- package/packages/components/table/index.tsx +126 -0
- package/packages/components/typography/paragraph.tsx +32 -0
- package/packages/components/typography/title.tsx +36 -0
- package/packages/components/ui/alert-dialog.tsx +173 -0
- package/packages/components/ui/alert.tsx +71 -0
- package/packages/components/ui/aspect-ratio.tsx +20 -0
- package/packages/components/ui/avatar.tsx +52 -0
- package/packages/components/ui/badge.tsx +63 -0
- package/packages/components/ui/breadcrumb.tsx +110 -0
- package/packages/components/ui/button.tsx +88 -0
- package/packages/components/ui/buttons/add-new.tsx +26 -0
- package/packages/components/ui/buttons/refresh.tsx +30 -0
- package/packages/components/ui/calendar.tsx +209 -0
- package/packages/components/ui/card.tsx +95 -0
- package/packages/components/ui/carousel.tsx +241 -0
- package/packages/components/ui/checkbox.tsx +44 -0
- package/packages/components/ui/collapsible.tsx +33 -0
- package/packages/components/ui/command.tsx +217 -0
- package/packages/components/ui/context-menu.tsx +258 -0
- package/packages/components/ui/dialog.tsx +174 -0
- package/packages/components/ui/dropdown-menu.tsx +318 -0
- package/packages/components/ui/file-uploader.tsx +372 -0
- package/packages/components/ui/form.tsx +168 -0
- package/packages/components/ui/hover-card.tsx +43 -0
- package/packages/components/ui/input-otp.tsx +76 -0
- package/packages/components/ui/input.tsx +59 -0
- package/packages/components/ui/inputs/number-input.tsx +325 -0
- package/packages/components/ui/inputs/password-input.tsx +35 -0
- package/packages/components/ui/inputs/search-input.tsx +24 -0
- package/packages/components/ui/label.tsx +29 -0
- package/packages/components/ui/menubar.tsx +275 -0
- package/packages/components/ui/multi-select.tsx +693 -0
- package/packages/components/ui/navigation-menu.tsx +170 -0
- package/packages/components/ui/pagination.tsx +128 -0
- package/packages/components/ui/popover.tsx +64 -0
- package/packages/components/ui/progress.tsx +30 -0
- package/packages/components/ui/radio-group.tsx +53 -0
- package/packages/components/ui/resizable.tsx +55 -0
- package/packages/components/ui/scroll-area.tsx +51 -0
- package/packages/components/ui/select.tsx +246 -0
- package/packages/components/ui/separator.tsx +27 -0
- package/packages/components/ui/sheet.tsx +155 -0
- package/packages/components/ui/sidebar.tsx +751 -0
- package/packages/components/ui/skeleton.tsx +15 -0
- package/packages/components/ui/slider.tsx +62 -0
- package/packages/components/ui/sonner.tsx +43 -0
- package/packages/components/ui/switch.tsx +52 -0
- package/packages/components/ui/table.tsx +118 -0
- package/packages/components/ui/tabs.tsx +85 -0
- package/packages/components/ui/textarea.tsx +47 -0
- package/packages/components/ui/toggle-group.tsx +72 -0
- package/packages/components/ui/toggle.tsx +47 -0
- package/packages/components/ui/tooltip.tsx +71 -0
- package/packages/constants.tsx +79 -0
- package/packages/hooks/use-callback-ref.ts +27 -0
- package/packages/hooks/use-controllable-state.ts +67 -0
- package/packages/hooks/use-mobile.ts +21 -0
- package/packages/index.css +392 -0
- package/packages/lib/utils.ts +28 -0
- package/packages/types.ts +50 -0
- package/dist/add-new-BaABbnol.js.map +0 -1
- package/dist/add-new-DUoS_-n2.cjs.map +0 -1
- package/dist/alert-dialog-0KwdjY-6.js.map +0 -1
- package/dist/alert-dialog-D5ZqgIiC.cjs.map +0 -1
- package/dist/badge-CRXT2dH_.cjs.map +0 -1
- package/dist/badge-D_qEoSL8.js.map +0 -1
- package/dist/button-Bku3bKv9.js.map +0 -1
- package/dist/button-D_E_bNRb.d.ts +0 -18
- package/dist/button-Dzv_nos1.cjs.map +0 -1
- package/dist/button-YHI7I64h.d.cts +0 -18
- package/dist/card-D8cxRC5y.js.map +0 -1
- package/dist/card-Dta5eW8u.cjs.map +0 -1
- package/dist/cards/simple-card.cjs.map +0 -1
- package/dist/cards/simple-card.js.map +0 -1
- package/dist/chunk-CUT6urMc.cjs +0 -1
- package/dist/command-CsntVmEz.cjs.map +0 -1
- package/dist/command-_L9bD9a-.js.map +0 -1
- package/dist/data-display/country.cjs.map +0 -1
- package/dist/data-display/country.js.map +0 -1
- package/dist/data-display/data-list.cjs.map +0 -1
- package/dist/data-display/data-list.js.map +0 -1
- package/dist/data-display/empty.cjs.map +0 -1
- package/dist/data-display/empty.js.map +0 -1
- package/dist/data-display/name.cjs.map +0 -1
- package/dist/data-display/name.js.map +0 -1
- package/dist/data-display/phone-number.cjs.map +0 -1
- package/dist/data-display/phone-number.js.map +0 -1
- package/dist/data-display/role-badge.cjs.map +0 -1
- package/dist/data-display/role-badge.js.map +0 -1
- package/dist/data-display/statistic.cjs.map +0 -1
- package/dist/data-display/statistic.js.map +0 -1
- package/dist/date-BMq_DNsv.js.map +0 -1
- package/dist/date-nd8WkPlx.cjs.map +0 -1
- package/dist/dialog-C4hf-Puw.js.map +0 -1
- package/dist/dialog-W-DmDMEE.cjs.map +0 -1
- package/dist/dialogs/confirm-dialog.cjs.map +0 -1
- package/dist/dialogs/confirm-dialog.js.map +0 -1
- package/dist/dialogs/detail-dialog/index.cjs.map +0 -1
- package/dist/dialogs/detail-dialog/index.js.map +0 -1
- package/dist/dialogs/form-dialog.cjs.map +0 -1
- package/dist/dialogs/form-dialog.js.map +0 -1
- package/dist/dialogs/loading-dialog.cjs.map +0 -1
- package/dist/dialogs/loading-dialog.js.map +0 -1
- package/dist/dropdown-menu-Bv18S56o.cjs.map +0 -1
- package/dist/dropdown-menu-jCQwh2rG.js.map +0 -1
- package/dist/error-dialog-D_4WL-Hj.js.map +0 -1
- package/dist/error-dialog-DpQgL5Hy.cjs.map +0 -1
- package/dist/flex-CNA_SId-.cjs.map +0 -1
- package/dist/flex-ILvQrYMJ.js.map +0 -1
- package/dist/form-CA4hhSV5.js.map +0 -1
- package/dist/form-CYZkgobJ.cjs.map +0 -1
- package/dist/form-wrapper-BYbwt1zC.cjs.map +0 -1
- package/dist/form-wrapper-D-2Uz518.js.map +0 -1
- package/dist/input-DXEBB91E.cjs.map +0 -1
- package/dist/input-FzKbxUq2.js.map +0 -1
- package/dist/label-CunjD1rx.cjs.map +0 -1
- package/dist/label-Cxbctr6x.js.map +0 -1
- package/dist/layouts/main/index.cjs.map +0 -1
- package/dist/layouts/main/index.js.map +0 -1
- package/dist/paragraph-Bey03JkA.js.map +0 -1
- package/dist/paragraph-ZxI8zxuf.cjs.map +0 -1
- package/dist/progress-BnnOfAZN.cjs.map +0 -1
- package/dist/progress-CBccqUUJ.js.map +0 -1
- package/dist/refresh-BHt_h3N_.js.map +0 -1
- package/dist/refresh-DrolZxuC.cjs.map +0 -1
- package/dist/scroll-area-Bdb_LSFF.js.map +0 -1
- package/dist/scroll-area-DWWpaz5j.cjs.map +0 -1
- package/dist/search-input-Bf4-FeWu.cjs.map +0 -1
- package/dist/search-input-L2sq0eB0.js.map +0 -1
- package/dist/select-CWUsisI0.js.map +0 -1
- package/dist/select-ZSyt5zCe.cjs.map +0 -1
- package/dist/separator-BpsL0PlX.js.map +0 -1
- package/dist/separator-DTB3sDNG.cjs.map +0 -1
- package/dist/sheet-C8r2QGpq.js.map +0 -1
- package/dist/sheet-CCwbAaA6.cjs.map +0 -1
- package/dist/sidebar-BLPMNltJ.cjs.map +0 -1
- package/dist/sidebar-C166f_9B.js.map +0 -1
- package/dist/skeleton-DYmX0k94.js.map +0 -1
- package/dist/skeleton-m3giaF4T.cjs +0 -2
- package/dist/skeleton-m3giaF4T.cjs.map +0 -1
- package/dist/table/index.cjs.map +0 -1
- package/dist/table/index.js.map +0 -1
- package/dist/table-BSeev7T0.cjs.map +0 -1
- package/dist/table-BvA64mE8.js.map +0 -1
- package/dist/title-DTkABsIG.js.map +0 -1
- package/dist/title-xsPZpQpb.cjs.map +0 -1
- package/dist/toggle-BVkMTVAz.d.ts +0 -15
- package/dist/toggle-CW-ZnYMy.d.cts +0 -15
- package/dist/toggle-CfL3GVe2.cjs.map +0 -1
- package/dist/toggle-D_MDMruK.js.map +0 -1
- package/dist/tooltip-Beb-_EPp.cjs.map +0 -1
- package/dist/tooltip-Dzyf5smh.js.map +0 -1
- package/dist/types-CrbWxjnp.cjs.map +0 -1
- package/dist/types-DaIHddx7.js.map +0 -1
- package/dist/ui/alert.cjs.map +0 -1
- package/dist/ui/alert.js.map +0 -1
- package/dist/ui/aspect-ratio.cjs.map +0 -1
- package/dist/ui/aspect-ratio.js.map +0 -1
- package/dist/ui/avatar.cjs.map +0 -1
- package/dist/ui/avatar.js.map +0 -1
- package/dist/ui/breadcrumb.cjs.map +0 -1
- package/dist/ui/breadcrumb.js.map +0 -1
- package/dist/ui/calendar.cjs.map +0 -1
- package/dist/ui/calendar.js.map +0 -1
- package/dist/ui/carousel.cjs.map +0 -1
- package/dist/ui/carousel.js.map +0 -1
- package/dist/ui/collapsible.cjs.map +0 -1
- package/dist/ui/collapsible.js.map +0 -1
- package/dist/ui/context-menu.cjs.map +0 -1
- package/dist/ui/context-menu.js.map +0 -1
- package/dist/ui/file-uploader.cjs.map +0 -1
- package/dist/ui/file-uploader.js.map +0 -1
- package/dist/ui/hover-card.cjs.map +0 -1
- package/dist/ui/hover-card.js.map +0 -1
- package/dist/ui/input-otp.cjs.map +0 -1
- package/dist/ui/input-otp.js.map +0 -1
- package/dist/ui/menubar.cjs.map +0 -1
- package/dist/ui/menubar.js.map +0 -1
- package/dist/ui/multi-select.cjs.map +0 -1
- package/dist/ui/multi-select.js.map +0 -1
- package/dist/ui/navigation-menu.cjs.map +0 -1
- package/dist/ui/navigation-menu.js.map +0 -1
- package/dist/ui/pagination.cjs.map +0 -1
- package/dist/ui/pagination.js.map +0 -1
- package/dist/ui/popover.cjs.map +0 -1
- package/dist/ui/popover.js.map +0 -1
- package/dist/ui/radio-group.cjs.map +0 -1
- package/dist/ui/radio-group.js.map +0 -1
- package/dist/ui/resizable.cjs.map +0 -1
- package/dist/ui/resizable.js.map +0 -1
- package/dist/ui/slider.cjs.map +0 -1
- package/dist/ui/slider.js.map +0 -1
- package/dist/ui/sonner.cjs.map +0 -1
- package/dist/ui/sonner.js.map +0 -1
- package/dist/ui/switch.cjs.map +0 -1
- package/dist/ui/switch.js.map +0 -1
- package/dist/ui/tabs.cjs.map +0 -1
- package/dist/ui/tabs.js.map +0 -1
- package/dist/ui/textarea.cjs.map +0 -1
- package/dist/ui/textarea.js.map +0 -1
- package/dist/ui/toggle-group.cjs.map +0 -1
- package/dist/ui/toggle-group.js.map +0 -1
- package/dist/utils-BsjVK5EW.cjs +0 -2
- package/dist/utils-BsjVK5EW.cjs.map +0 -1
- package/dist/utils-D9AH0PUV.js.map +0 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type FieldPath, type FieldValues, useWatch } from 'react-hook-form'
|
|
2
|
+
|
|
3
|
+
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '../ui/form'
|
|
4
|
+
import { NumberInput } from '../ui/inputs/number-input'
|
|
5
|
+
|
|
6
|
+
type Props<TFieldValues extends FieldValues = FieldValues> = {
|
|
7
|
+
name: FieldPath<TFieldValues>
|
|
8
|
+
label?: string
|
|
9
|
+
description?: string
|
|
10
|
+
placeholder?: string
|
|
11
|
+
unitText?: string
|
|
12
|
+
isShowClearButton?: boolean
|
|
13
|
+
isShowErrorMsg?: boolean
|
|
14
|
+
isShowCount?: boolean
|
|
15
|
+
onValueChange?: (value?: number) => void
|
|
16
|
+
}
|
|
17
|
+
export const NumberField = <TFieldValues extends FieldValues = FieldValues>({
|
|
18
|
+
name,
|
|
19
|
+
label = 'Number Field',
|
|
20
|
+
placeholder = '0',
|
|
21
|
+
isShowErrorMsg = false,
|
|
22
|
+
isShowCount = false,
|
|
23
|
+
unitText = '',
|
|
24
|
+
description = '',
|
|
25
|
+
onValueChange,
|
|
26
|
+
}: Props<TFieldValues>) => {
|
|
27
|
+
const valueWatch = useWatch({ name })
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<FormField
|
|
31
|
+
name={name}
|
|
32
|
+
render={({ field: { onChange, ...field } }) => (
|
|
33
|
+
<FormItem className="w-full gap-0">
|
|
34
|
+
<FormLabel>{label}</FormLabel>
|
|
35
|
+
<FormControl>
|
|
36
|
+
<NumberInput
|
|
37
|
+
{...field}
|
|
38
|
+
placeholder={placeholder}
|
|
39
|
+
className="w-full"
|
|
40
|
+
unitText={unitText}
|
|
41
|
+
onValueChange={(value) => {
|
|
42
|
+
onChange(value)
|
|
43
|
+
onValueChange?.(value)
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
</FormControl>
|
|
47
|
+
{isShowCount && (
|
|
48
|
+
<div className="text-muted-foreground text-end text-xs">{valueWatch?.length ?? 0} characters</div>
|
|
49
|
+
)}
|
|
50
|
+
{!!description && <FormDescription>{description}</FormDescription>}
|
|
51
|
+
{isShowErrorMsg && <FormMessage />}
|
|
52
|
+
</FormItem>
|
|
53
|
+
)}
|
|
54
|
+
/>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import type { FieldPath, FieldValues } from 'react-hook-form'
|
|
3
|
+
|
|
4
|
+
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '../ui/form'
|
|
5
|
+
import { PasswordInput } from '../ui/inputs/password-input'
|
|
6
|
+
|
|
7
|
+
type Props<TFieldValues extends FieldValues = FieldValues> = {
|
|
8
|
+
name: FieldPath<TFieldValues>
|
|
9
|
+
label?: string
|
|
10
|
+
description?: string
|
|
11
|
+
placeholder?: string
|
|
12
|
+
isShowErrorMsg?: boolean
|
|
13
|
+
onValueChange?: (value: string) => void
|
|
14
|
+
}
|
|
15
|
+
export const PasswordField = <TFieldValues extends FieldValues = FieldValues>({
|
|
16
|
+
name,
|
|
17
|
+
label = 'Text Field',
|
|
18
|
+
placeholder = 'Enter text here',
|
|
19
|
+
isShowErrorMsg = false,
|
|
20
|
+
description,
|
|
21
|
+
onValueChange,
|
|
22
|
+
}: Props<TFieldValues>) => {
|
|
23
|
+
return (
|
|
24
|
+
<FormField
|
|
25
|
+
name={name}
|
|
26
|
+
render={({ field }) => (
|
|
27
|
+
<FormItem className="w-full">
|
|
28
|
+
<FormLabel>{label}</FormLabel>
|
|
29
|
+
<FormControl>
|
|
30
|
+
<PasswordInput placeholder={placeholder} {...field} onValueChange={onValueChange} />
|
|
31
|
+
</FormControl>
|
|
32
|
+
{!!description && <FormDescription>{description}</FormDescription>}
|
|
33
|
+
{isShowErrorMsg && <FormMessage />}
|
|
34
|
+
</FormItem>
|
|
35
|
+
)}
|
|
36
|
+
/>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import type { FieldPath, FieldValues } from 'react-hook-form'
|
|
3
|
+
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '../ui/form'
|
|
7
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select'
|
|
8
|
+
|
|
9
|
+
type Props<TFieldValues extends FieldValues = FieldValues> = {
|
|
10
|
+
name: FieldPath<TFieldValues>
|
|
11
|
+
label?: string
|
|
12
|
+
placeholder?: string
|
|
13
|
+
disabledValues?: string[]
|
|
14
|
+
options?: { value: string; label: string }[]
|
|
15
|
+
isShowLabel?: boolean
|
|
16
|
+
isShowErrorMsg?: boolean
|
|
17
|
+
modal?: boolean
|
|
18
|
+
description?: string
|
|
19
|
+
className?: string
|
|
20
|
+
}
|
|
21
|
+
export const SelectField = <TFieldValues extends FieldValues = FieldValues>({
|
|
22
|
+
name,
|
|
23
|
+
label = 'Select Field',
|
|
24
|
+
placeholder = 'Select an option',
|
|
25
|
+
disabledValues = [],
|
|
26
|
+
options = [],
|
|
27
|
+
isShowLabel = true,
|
|
28
|
+
isShowErrorMsg = false,
|
|
29
|
+
description = '',
|
|
30
|
+
className = '',
|
|
31
|
+
}: Props<TFieldValues>) => {
|
|
32
|
+
return (
|
|
33
|
+
<FormField
|
|
34
|
+
name={name}
|
|
35
|
+
render={({ field }) => (
|
|
36
|
+
<FormItem className={cn('w-full', className)}>
|
|
37
|
+
{isShowLabel && <FormLabel>{label}</FormLabel>}
|
|
38
|
+
<Select defaultValue={field.value} onValueChange={field.onChange}>
|
|
39
|
+
<FormControl>
|
|
40
|
+
<SelectTrigger className="w-full">
|
|
41
|
+
<SelectValue placeholder={placeholder} />
|
|
42
|
+
</SelectTrigger>
|
|
43
|
+
</FormControl>
|
|
44
|
+
<SelectContent>
|
|
45
|
+
{options.map((option) => (
|
|
46
|
+
<SelectItem key={option.value} disabled={disabledValues.includes(option.value)} value={option.value}>
|
|
47
|
+
{option.label}
|
|
48
|
+
</SelectItem>
|
|
49
|
+
))}
|
|
50
|
+
</SelectContent>
|
|
51
|
+
</Select>
|
|
52
|
+
{!!description && <FormDescription>{description}</FormDescription>}
|
|
53
|
+
{isShowErrorMsg && <FormMessage />}
|
|
54
|
+
</FormItem>
|
|
55
|
+
)}
|
|
56
|
+
/>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import type { FieldPath, FieldValues } from 'react-hook-form'
|
|
3
|
+
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '../ui/form'
|
|
7
|
+
import { Switch } from '../ui/switch'
|
|
8
|
+
|
|
9
|
+
type Props<TFieldValues extends FieldValues = FieldValues> = {
|
|
10
|
+
name: FieldPath<TFieldValues>
|
|
11
|
+
label?: string
|
|
12
|
+
description?: string
|
|
13
|
+
isShowErrorMsg?: boolean
|
|
14
|
+
}
|
|
15
|
+
export const SwitchField = <TFieldValues extends FieldValues = FieldValues>({
|
|
16
|
+
name,
|
|
17
|
+
label = 'Switch Field',
|
|
18
|
+
description,
|
|
19
|
+
isShowErrorMsg = false,
|
|
20
|
+
}: Props<TFieldValues>) => {
|
|
21
|
+
return (
|
|
22
|
+
<FormField
|
|
23
|
+
name={name}
|
|
24
|
+
render={({ field }) => (
|
|
25
|
+
<div className="spage-y-1">
|
|
26
|
+
<FormItem
|
|
27
|
+
className={cn('border-border flex flex-row items-center justify-between rounded-lg border p-3 shadow-xs')}
|
|
28
|
+
>
|
|
29
|
+
<div className="space-y-0.5">
|
|
30
|
+
<FormLabel className="cursor-pointer text-sm">{label}</FormLabel>
|
|
31
|
+
{description && <FormDescription className="text-xs">{description}</FormDescription>}
|
|
32
|
+
</div>
|
|
33
|
+
<FormControl>
|
|
34
|
+
<Switch checked={field.value} onCheckedChange={field.onChange} />
|
|
35
|
+
</FormControl>
|
|
36
|
+
</FormItem>
|
|
37
|
+
{isShowErrorMsg && <FormMessage />}
|
|
38
|
+
</div>
|
|
39
|
+
)}
|
|
40
|
+
/>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { type FieldPath, type FieldValues, useWatch } from 'react-hook-form'
|
|
4
|
+
import { XIcon } from 'lucide-react'
|
|
5
|
+
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
|
+
|
|
8
|
+
import { Flex } from '../layouts/flex'
|
|
9
|
+
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField } from '../ui/form'
|
|
10
|
+
import { Input } from '../ui/input'
|
|
11
|
+
|
|
12
|
+
type Props<TFieldValues extends FieldValues = FieldValues> = {
|
|
13
|
+
name: FieldPath<TFieldValues>
|
|
14
|
+
label?: string
|
|
15
|
+
description?: string
|
|
16
|
+
placeholder?: string
|
|
17
|
+
isShowLabel?: boolean
|
|
18
|
+
isShowClearButton?: boolean
|
|
19
|
+
isShowErrorMsg?: boolean
|
|
20
|
+
isShowCount?: boolean
|
|
21
|
+
className?: string
|
|
22
|
+
onValueChange?: (value: string) => void
|
|
23
|
+
}
|
|
24
|
+
export const TextField = <TFieldValues extends FieldValues = FieldValues>({
|
|
25
|
+
name,
|
|
26
|
+
label = 'Text Field',
|
|
27
|
+
placeholder = 'Enter text here',
|
|
28
|
+
isShowLabel = true,
|
|
29
|
+
isShowClearButton = false,
|
|
30
|
+
isShowErrorMsg = false,
|
|
31
|
+
isShowCount = false,
|
|
32
|
+
description,
|
|
33
|
+
className = '',
|
|
34
|
+
onValueChange,
|
|
35
|
+
}: Props<TFieldValues>) => {
|
|
36
|
+
const { resetField } = useFormField()
|
|
37
|
+
const valueWatch = useWatch({ name })
|
|
38
|
+
|
|
39
|
+
const handleClearInput = React.useCallback(() => {
|
|
40
|
+
resetField(name)
|
|
41
|
+
}, [resetField, name])
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<FormField
|
|
45
|
+
name={name}
|
|
46
|
+
render={({ field }) => (
|
|
47
|
+
<FormItem className={cn('w-full gap-0', isShowCount || (!!description && 'space-y-1'), className)}>
|
|
48
|
+
{isShowLabel && <FormLabel>{label}</FormLabel>}
|
|
49
|
+
<div className="relative">
|
|
50
|
+
<FormControl>
|
|
51
|
+
<Input
|
|
52
|
+
{...field}
|
|
53
|
+
placeholder={placeholder}
|
|
54
|
+
className={cn('w-full', isShowClearButton && 'pr-9')}
|
|
55
|
+
onValueChange={onValueChange}
|
|
56
|
+
/>
|
|
57
|
+
</FormControl>
|
|
58
|
+
{isShowClearButton && valueWatch && (
|
|
59
|
+
<button
|
|
60
|
+
type="button"
|
|
61
|
+
className="text-muted-foreground/80 hover:text-accent-foreground focus-visible:ring-border absolute inset-y-0 end-0 flex h-full w-8 cursor-pointer items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-2"
|
|
62
|
+
aria-label="Clear input"
|
|
63
|
+
onClick={handleClearInput}
|
|
64
|
+
>
|
|
65
|
+
<XIcon size={14} aria-hidden="true" />
|
|
66
|
+
</button>
|
|
67
|
+
)}
|
|
68
|
+
</div>
|
|
69
|
+
<Flex width="full" padding="none" justify="end">
|
|
70
|
+
{isShowErrorMsg && <FormMessage className="grow" />}
|
|
71
|
+
{isShowCount && (
|
|
72
|
+
<div className="text-muted-foreground text-end text-xs">{valueWatch?.length ?? 0} characters</div>
|
|
73
|
+
)}
|
|
74
|
+
</Flex>
|
|
75
|
+
{!!description && <FormDescription>{description}</FormDescription>}
|
|
76
|
+
</FormItem>
|
|
77
|
+
)}
|
|
78
|
+
/>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { type FieldPath, type FieldValues, useWatch } from 'react-hook-form'
|
|
3
|
+
|
|
4
|
+
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '../ui/form'
|
|
5
|
+
import { Textarea } from '../ui/textarea'
|
|
6
|
+
|
|
7
|
+
type Props<TFieldValues extends FieldValues = FieldValues> = {
|
|
8
|
+
name: FieldPath<TFieldValues>
|
|
9
|
+
label?: string
|
|
10
|
+
description?: string
|
|
11
|
+
placeholder?: string
|
|
12
|
+
isShowErrorMsg?: boolean
|
|
13
|
+
isShowCount?: boolean
|
|
14
|
+
rows?: number
|
|
15
|
+
onValueChange?: (value: string) => void
|
|
16
|
+
}
|
|
17
|
+
export const TextareaField = <TFieldValues extends FieldValues = FieldValues>({
|
|
18
|
+
name,
|
|
19
|
+
label = 'Textarea Field',
|
|
20
|
+
placeholder = 'Enter text here',
|
|
21
|
+
isShowErrorMsg = false,
|
|
22
|
+
isShowCount = false,
|
|
23
|
+
description,
|
|
24
|
+
rows = 3,
|
|
25
|
+
onValueChange,
|
|
26
|
+
}: Props<TFieldValues>) => {
|
|
27
|
+
const valueWatch = useWatch({ name })
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<FormField
|
|
31
|
+
name={name}
|
|
32
|
+
render={({ field }) => (
|
|
33
|
+
<FormItem className="w-full">
|
|
34
|
+
<FormLabel>{label}</FormLabel>
|
|
35
|
+
<FormControl>
|
|
36
|
+
<Textarea
|
|
37
|
+
{...field}
|
|
38
|
+
placeholder={placeholder}
|
|
39
|
+
className="w-full"
|
|
40
|
+
rows={rows}
|
|
41
|
+
onValueChange={onValueChange}
|
|
42
|
+
/>
|
|
43
|
+
</FormControl>
|
|
44
|
+
{isShowCount && (
|
|
45
|
+
<div className="text-muted-foreground text-end text-xs">{valueWatch?.length ?? 0} characters</div>
|
|
46
|
+
)}
|
|
47
|
+
{!!description && <FormDescription>{description}</FormDescription>}
|
|
48
|
+
{isShowErrorMsg && <FormMessage />}
|
|
49
|
+
</FormItem>
|
|
50
|
+
)}
|
|
51
|
+
/>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,110 @@
|
|
|
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 flexVariants = cva(["relative flex", "text-sm"], {
|
|
8
|
+
variants: {
|
|
9
|
+
vertical: {
|
|
10
|
+
true: "flex-col",
|
|
11
|
+
false: "flex-row",
|
|
12
|
+
},
|
|
13
|
+
width: {
|
|
14
|
+
full: "w-full",
|
|
15
|
+
auto: "w-auto",
|
|
16
|
+
fit: "w-fit",
|
|
17
|
+
screen: "w-screen",
|
|
18
|
+
min: "w-min",
|
|
19
|
+
max: "w-max",
|
|
20
|
+
},
|
|
21
|
+
wrap: {
|
|
22
|
+
true: "flex-wrap",
|
|
23
|
+
false: "flex-nowrap",
|
|
24
|
+
},
|
|
25
|
+
margin: {
|
|
26
|
+
sm: "m-2",
|
|
27
|
+
md: "m-4",
|
|
28
|
+
lg: "m-6",
|
|
29
|
+
xl: "m-8",
|
|
30
|
+
none: "m-0",
|
|
31
|
+
},
|
|
32
|
+
padding: {
|
|
33
|
+
sm: "p-2",
|
|
34
|
+
md: "p-4",
|
|
35
|
+
lg: "p-6",
|
|
36
|
+
xl: "p-8",
|
|
37
|
+
none: "p-0",
|
|
38
|
+
},
|
|
39
|
+
gap: {
|
|
40
|
+
xs: "gap-1",
|
|
41
|
+
sm: "gap-2",
|
|
42
|
+
md: "gap-4",
|
|
43
|
+
lg: "gap-6",
|
|
44
|
+
xl: "gap-8",
|
|
45
|
+
none: "gap-0",
|
|
46
|
+
},
|
|
47
|
+
justify: {
|
|
48
|
+
start: "justify-start",
|
|
49
|
+
center: "justify-center",
|
|
50
|
+
end: "justify-end",
|
|
51
|
+
between: "justify-between",
|
|
52
|
+
around: "justify-around",
|
|
53
|
+
evenly: "justify-evenly",
|
|
54
|
+
stretch: "justify-stretch",
|
|
55
|
+
},
|
|
56
|
+
align: {
|
|
57
|
+
start: "items-start",
|
|
58
|
+
center: "items-center",
|
|
59
|
+
end: "items-end",
|
|
60
|
+
baseline: "items-baseline",
|
|
61
|
+
stretch: "items-stretch",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
defaultVariants: {
|
|
65
|
+
vertical: false,
|
|
66
|
+
wrap: true,
|
|
67
|
+
width: "fit",
|
|
68
|
+
margin: "none",
|
|
69
|
+
padding: "sm",
|
|
70
|
+
gap: "xs",
|
|
71
|
+
justify: "start",
|
|
72
|
+
align: "center",
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
type Props = {
|
|
77
|
+
className?: string;
|
|
78
|
+
} & VariantProps<typeof flexVariants>;
|
|
79
|
+
export const Flex = ({
|
|
80
|
+
vertical,
|
|
81
|
+
wrap,
|
|
82
|
+
width,
|
|
83
|
+
margin,
|
|
84
|
+
padding,
|
|
85
|
+
gap,
|
|
86
|
+
justify,
|
|
87
|
+
align,
|
|
88
|
+
className,
|
|
89
|
+
children,
|
|
90
|
+
}: React.PropsWithChildren<Props>) => {
|
|
91
|
+
return (
|
|
92
|
+
<div
|
|
93
|
+
className={cn(
|
|
94
|
+
flexVariants({
|
|
95
|
+
vertical,
|
|
96
|
+
width,
|
|
97
|
+
wrap,
|
|
98
|
+
margin,
|
|
99
|
+
padding,
|
|
100
|
+
gap,
|
|
101
|
+
justify,
|
|
102
|
+
align,
|
|
103
|
+
className,
|
|
104
|
+
}),
|
|
105
|
+
)}
|
|
106
|
+
>
|
|
107
|
+
{children}
|
|
108
|
+
</div>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SidebarInset } from "@/components/ui/sidebar";
|
|
2
|
+
|
|
3
|
+
export const MainLayoutContent = ({ children }: React.PropsWithChildren) => {
|
|
4
|
+
return (
|
|
5
|
+
<SidebarInset>
|
|
6
|
+
<section className="relative size-full">
|
|
7
|
+
<div className="absolute inset-0">{children}</div>
|
|
8
|
+
</section>
|
|
9
|
+
</SidebarInset>
|
|
10
|
+
);
|
|
11
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BellIcon,
|
|
3
|
+
CircleQuestionMarkIcon,
|
|
4
|
+
ShoppingCartIcon,
|
|
5
|
+
} from "lucide-react";
|
|
6
|
+
|
|
7
|
+
import { Button } from "@/components/ui/button";
|
|
8
|
+
import { SidebarTrigger } from "@/components/ui/sidebar";
|
|
9
|
+
import { cn } from "@/lib/utils";
|
|
10
|
+
|
|
11
|
+
export const MainLayoutHeader = () => {
|
|
12
|
+
return (
|
|
13
|
+
<header
|
|
14
|
+
className={cn(
|
|
15
|
+
"bg-card",
|
|
16
|
+
"h-(--header-height)",
|
|
17
|
+
"absolute inset-x-0 top-0 z-20",
|
|
18
|
+
"flex items-center gap-2 border-b shadow-sm",
|
|
19
|
+
"transition-[width,height] ease-linear",
|
|
20
|
+
"group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)",
|
|
21
|
+
"px-4",
|
|
22
|
+
)}
|
|
23
|
+
>
|
|
24
|
+
<SidebarTrigger />
|
|
25
|
+
|
|
26
|
+
<div className="ml-2.5 flex gap-x-2">
|
|
27
|
+
<div className="bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg">
|
|
28
|
+
<ShoppingCartIcon size={20} />
|
|
29
|
+
</div>
|
|
30
|
+
<div className="grid flex-1 text-left text-sm leading-tight">
|
|
31
|
+
<span className="truncate font-medium">Lunas Store</span>
|
|
32
|
+
<span className="truncate text-xs">Established 2023</span>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div className="flex flex-1 items-center justify-end">
|
|
36
|
+
<Button
|
|
37
|
+
variant="ghost"
|
|
38
|
+
size="icon"
|
|
39
|
+
className="text-muted-foreground rounded-full"
|
|
40
|
+
>
|
|
41
|
+
<CircleQuestionMarkIcon />
|
|
42
|
+
</Button>
|
|
43
|
+
<Button
|
|
44
|
+
variant="ghost"
|
|
45
|
+
size="icon"
|
|
46
|
+
className="text-muted-foreground rounded-full"
|
|
47
|
+
>
|
|
48
|
+
<BellIcon />
|
|
49
|
+
</Button>
|
|
50
|
+
</div>
|
|
51
|
+
</header>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { type Table } from "@tanstack/react-table";
|
|
2
|
+
import {
|
|
3
|
+
ChevronLeft,
|
|
4
|
+
ChevronRight,
|
|
5
|
+
ChevronsLeft,
|
|
6
|
+
ChevronsRight,
|
|
7
|
+
} from "lucide-react";
|
|
8
|
+
|
|
9
|
+
import { Button } from "@/components/ui/button";
|
|
10
|
+
import {
|
|
11
|
+
Select,
|
|
12
|
+
SelectContent,
|
|
13
|
+
SelectItem,
|
|
14
|
+
SelectTrigger,
|
|
15
|
+
SelectValue,
|
|
16
|
+
} from "@/components/ui/select";
|
|
17
|
+
|
|
18
|
+
interface DataTablePaginationProps<TData> {
|
|
19
|
+
table: Table<TData>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function DataTablePagination<TData>({
|
|
23
|
+
table,
|
|
24
|
+
}: DataTablePaginationProps<TData>) {
|
|
25
|
+
"use no memo";
|
|
26
|
+
return (
|
|
27
|
+
<div className="mt-4 flex w-full flex-0 flex-wrap items-center justify-between gap-y-4 px-2">
|
|
28
|
+
<div className="text-muted-foreground flex-1 text-sm">
|
|
29
|
+
{table.getFilteredSelectedRowModel().rows.length} of{" "}
|
|
30
|
+
{table.getFilteredRowModel().rows.length} row(s) selected.
|
|
31
|
+
</div>
|
|
32
|
+
<div className="flex flex-wrap items-center space-x-6 gap-y-4 lg:space-x-8">
|
|
33
|
+
<div className="flex items-center space-x-2">
|
|
34
|
+
<p className="text-sm font-medium">Rows per page</p>
|
|
35
|
+
<Select
|
|
36
|
+
value={`${table.getState().pagination.pageSize}`}
|
|
37
|
+
onValueChange={(value) => {
|
|
38
|
+
table.setPageSize(Number(value));
|
|
39
|
+
}}
|
|
40
|
+
>
|
|
41
|
+
<SelectTrigger className="h-8 w-[70px]">
|
|
42
|
+
<SelectValue placeholder={table.getState().pagination.pageSize} />
|
|
43
|
+
</SelectTrigger>
|
|
44
|
+
<SelectContent side="top">
|
|
45
|
+
{[10, 20, 30, 40, 50].map((pageSize) => (
|
|
46
|
+
<SelectItem key={pageSize} value={`${pageSize}`}>
|
|
47
|
+
{pageSize}
|
|
48
|
+
</SelectItem>
|
|
49
|
+
))}
|
|
50
|
+
</SelectContent>
|
|
51
|
+
</Select>
|
|
52
|
+
</div>
|
|
53
|
+
<div className="flex w-25 items-center justify-center text-sm font-medium">
|
|
54
|
+
Page {table.getState().pagination.pageIndex + 1} of{" "}
|
|
55
|
+
{table.getPageCount()}
|
|
56
|
+
</div>
|
|
57
|
+
<div className="flex items-center space-x-2 *:size-9 *:p-0">
|
|
58
|
+
<Button
|
|
59
|
+
variant="outline"
|
|
60
|
+
className="lg:flex"
|
|
61
|
+
onClick={() => table.setPageIndex(0)}
|
|
62
|
+
disabled={!table.getCanPreviousPage()}
|
|
63
|
+
>
|
|
64
|
+
<span className="sr-only">Go to first page</span>
|
|
65
|
+
<ChevronsLeft />
|
|
66
|
+
</Button>
|
|
67
|
+
<Button
|
|
68
|
+
variant="outline"
|
|
69
|
+
onClick={() => table.previousPage()}
|
|
70
|
+
disabled={!table.getCanPreviousPage()}
|
|
71
|
+
>
|
|
72
|
+
<span className="sr-only">Go to previous page</span>
|
|
73
|
+
<ChevronLeft />
|
|
74
|
+
</Button>
|
|
75
|
+
<Button
|
|
76
|
+
type="button"
|
|
77
|
+
variant="outline"
|
|
78
|
+
onClick={() => table.nextPage()}
|
|
79
|
+
disabled={!table.getCanNextPage()}
|
|
80
|
+
>
|
|
81
|
+
<span className="sr-only">Go to next page</span>
|
|
82
|
+
<ChevronRight />
|
|
83
|
+
</Button>
|
|
84
|
+
<Button
|
|
85
|
+
variant="outline"
|
|
86
|
+
className="lg:flex"
|
|
87
|
+
onClick={() => {
|
|
88
|
+
table.setPageIndex(table.getPageCount() - 1);
|
|
89
|
+
}}
|
|
90
|
+
disabled={!table.getCanNextPage()}
|
|
91
|
+
>
|
|
92
|
+
<span className="sr-only">Go to last page</span>
|
|
93
|
+
<ChevronsRight />
|
|
94
|
+
</Button>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
);
|
|
99
|
+
}
|