@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
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { toggleVariants } from "../toggle-
|
|
1
|
+
import { toggleVariants } from "../toggle-8wPArWPq.cjs";
|
|
2
|
+
import * as react_jsx_runtime228 from "react/jsx-runtime";
|
|
2
3
|
import React from "react";
|
|
3
4
|
import { VariantProps } from "class-variance-authority";
|
|
4
5
|
import { ToggleGroup as ToggleGroup$1 } from "radix-ui";
|
|
@@ -10,14 +11,13 @@ declare function ToggleGroup({
|
|
|
10
11
|
size,
|
|
11
12
|
children,
|
|
12
13
|
...props
|
|
13
|
-
}: React.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants>):
|
|
14
|
+
}: React.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime228.JSX.Element;
|
|
14
15
|
declare function ToggleGroupItem({
|
|
15
16
|
className,
|
|
16
17
|
children,
|
|
17
18
|
variant,
|
|
18
19
|
size,
|
|
19
20
|
...props
|
|
20
|
-
}: React.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>):
|
|
21
|
+
}: React.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>): react_jsx_runtime228.JSX.Element;
|
|
21
22
|
//#endregion
|
|
22
|
-
export { ToggleGroup, ToggleGroupItem };
|
|
23
|
-
//# sourceMappingURL=toggle-group.d.cts.map
|
|
23
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { toggleVariants } from "../toggle-
|
|
1
|
+
import { toggleVariants } from "../toggle-3yC7NgOb.js";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import * as react_jsx_runtime108 from "react/jsx-runtime";
|
|
3
4
|
import { VariantProps } from "class-variance-authority";
|
|
4
5
|
import { ToggleGroup as ToggleGroup$1 } from "radix-ui";
|
|
5
6
|
|
|
@@ -10,14 +11,13 @@ declare function ToggleGroup({
|
|
|
10
11
|
size,
|
|
11
12
|
children,
|
|
12
13
|
...props
|
|
13
|
-
}: React.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants>):
|
|
14
|
+
}: React.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime108.JSX.Element;
|
|
14
15
|
declare function ToggleGroupItem({
|
|
15
16
|
className,
|
|
16
17
|
children,
|
|
17
18
|
variant,
|
|
18
19
|
size,
|
|
19
20
|
...props
|
|
20
|
-
}: React.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>):
|
|
21
|
+
}: React.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>): react_jsx_runtime108.JSX.Element;
|
|
21
22
|
//#endregion
|
|
22
|
-
export { ToggleGroup, ToggleGroupItem };
|
|
23
|
-
//# sourceMappingURL=toggle-group.d.ts.map
|
|
23
|
+
export { ToggleGroup, ToggleGroupItem };
|
package/dist/ui/toggle-group.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use client";import{cn as e}from"../utils-D9AH0PUV.js";import{toggleVariants as t}from"../toggle-
|
|
2
|
-
//# sourceMappingURL=toggle-group.js.map
|
|
1
|
+
"use client";import{cn as e}from"../utils-D9AH0PUV.js";import{toggleVariants as t}from"../toggle-CHJ2edke.js";import n from"react";import{jsx as r}from"react/jsx-runtime";import"class-variance-authority";import{ToggleGroup as i}from"radix-ui";const a=n.createContext({size:`default`,variant:`default`});function o({className:t,variant:n,size:o,children:s,...c}){return r(i.Root,{"data-slot":`toggle-group`,"data-variant":n,"data-size":o,className:e(`group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs`,t),...c,children:r(a.Provider,{value:{variant:n,size:o},children:s})})}function s({className:o,children:s,variant:c,size:l,...u}){let d=n.useContext(a);return r(i.Item,{"data-slot":`toggle-group-item`,"data-variant":d.variant||c,"data-size":d.size||l,className:e(t({variant:d.variant||c,size:d.size||l}),`min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l`,o),...u,children:s})}export{o as ToggleGroup,s as ToggleGroupItem};
|
package/dist/ui/toggle.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";require(`../utils-
|
|
1
|
+
"use client";const e=require(`../chunk-hhQzssFb.cjs`);require(`../utils-DaJ1XZgX.cjs`);const t=require(`../toggle-CzMYdDvC.cjs`);exports.Toggle=t.Toggle,exports.toggleVariants=t.toggleVariants;
|
package/dist/ui/toggle.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Toggle, toggleVariants } from "../toggle-
|
|
1
|
+
import { Toggle, toggleVariants } from "../toggle-8wPArWPq.cjs";
|
|
2
2
|
export { Toggle, toggleVariants };
|
package/dist/ui/toggle.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Toggle, toggleVariants } from "../toggle-
|
|
1
|
+
import { Toggle, toggleVariants } from "../toggle-3yC7NgOb.js";
|
|
2
2
|
export { Toggle, toggleVariants };
|
package/dist/ui/toggle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"../utils-D9AH0PUV.js";import{Toggle as e,toggleVariants as t}from"../toggle-
|
|
1
|
+
"use client";import"../utils-D9AH0PUV.js";import{Toggle as e,toggleVariants as t}from"../toggle-CHJ2edke.js";export{e as Toggle,t as toggleVariants};
|
package/dist/ui/tooltip.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";require(`../utils-
|
|
1
|
+
"use client";const e=require(`../chunk-hhQzssFb.cjs`);require(`../utils-DaJ1XZgX.cjs`);const t=require(`../tooltip-MgToVOzy.cjs`);exports.Tooltip=t.Tooltip,exports.TooltipContent=t.TooltipContent,exports.TooltipProvider=t.TooltipProvider,exports.TooltipTrigger=t.TooltipTrigger;
|
package/dist/ui/tooltip.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../tooltip-
|
|
1
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../tooltip-JbjxxBNd.cjs";
|
|
2
2
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
package/dist/ui/tooltip.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../tooltip-
|
|
1
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../tooltip-Bo9id3nz.js";
|
|
2
2
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
package/dist/utils-D9AH0PUV.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{clsx as e}from"clsx";import{twMerge as t}from"tailwind-merge";function n(e,t={}){let{decimals:n=0,sizeType:r=`normal`}=t,i=[`Bytes`,`KB`,`MB`,`GB`,`TB`],a=[`Bytes`,`KiB`,`MiB`,`GiB`,`TiB`];if(e===0)return`0 Byte`;let o=Math.floor(Math.log(e)/Math.log(1024));return`${(e/1024
|
|
2
|
-
//# sourceMappingURL=utils-D9AH0PUV.js.map
|
|
1
|
+
import{clsx as e}from"clsx";import{twMerge as t}from"tailwind-merge";function n(e,t={}){let{decimals:n=0,sizeType:r=`normal`}=t,i=[`Bytes`,`KB`,`MB`,`GB`,`TB`],a=[`Bytes`,`KiB`,`MiB`,`GiB`,`TiB`];if(e===0)return`0 Byte`;let o=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,o)).toFixed(n)} ${r===`accurate`?a[o]??`Bytes`:i[o]??`Bytes`}`}function r(...n){return t(e(n))}export{r as cn,n as formatBytes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-hhQzssFb.cjs`),t=e.__toESM(require(`clsx`)),n=e.__toESM(require(`tailwind-merge`)),r=5*1024*1024;function i(e,t={}){let{decimals:n=0,sizeType:r=`normal`}=t,i=[`Bytes`,`KB`,`MB`,`GB`,`TB`],a=[`Bytes`,`KiB`,`MiB`,`GiB`,`TiB`];if(e===0)return`0 Byte`;let o=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,o)).toFixed(n)} ${r===`accurate`?a[o]??`Bytes`:i[o]??`Bytes`}`}function a(...e){return(0,n.twMerge)((0,t.clsx)(e))}Object.defineProperty(exports,`cn`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`formatBytes`,{enumerable:!0,get:function(){return i}});
|
package/package.json
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@customafk/lunas-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "UI library for Lunas Enterprise",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"author":
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "CustomAFK",
|
|
8
|
+
"email": "quangpm220503vt@gmail.com"
|
|
9
|
+
},
|
|
7
10
|
"license": "ISC",
|
|
8
|
-
"homepage": "https://github.com/
|
|
11
|
+
"homepage": "https://github.com/QuangPhamvt/lunas-enterprise-ui-package#readme",
|
|
9
12
|
"repository": {
|
|
10
13
|
"type": "git",
|
|
11
14
|
"url": "git+https://github.com/QuangPhamvt/lunas-enterprise-ui-package.git"
|
|
12
15
|
},
|
|
13
16
|
"files": [
|
|
14
|
-
"dist"
|
|
17
|
+
"dist",
|
|
18
|
+
"packages",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"workspaces": [
|
|
22
|
+
"packages/*"
|
|
15
23
|
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">= 22.0.0"
|
|
26
|
+
},
|
|
16
27
|
"exports": {
|
|
17
28
|
"./cards/simple-card": {
|
|
18
29
|
"import": "./dist/cards/simple-card.js",
|
|
@@ -70,10 +81,46 @@
|
|
|
70
81
|
"import": "./dist/dialogs/loading-dialog.js",
|
|
71
82
|
"require": "./dist/dialogs/loading-dialog.cjs"
|
|
72
83
|
},
|
|
84
|
+
"./forms/combobox-field": {
|
|
85
|
+
"import": "./dist/forms/combobox-field.js",
|
|
86
|
+
"require": "./dist/forms/combobox-field.cjs"
|
|
87
|
+
},
|
|
88
|
+
"./forms/date-field": {
|
|
89
|
+
"import": "./dist/forms/date-field.js",
|
|
90
|
+
"require": "./dist/forms/date-field.cjs"
|
|
91
|
+
},
|
|
73
92
|
"./forms/form-wrapper": {
|
|
74
93
|
"import": "./dist/forms/form-wrapper.js",
|
|
75
94
|
"require": "./dist/forms/form-wrapper.cjs"
|
|
76
95
|
},
|
|
96
|
+
"./forms/multi-select-field": {
|
|
97
|
+
"import": "./dist/forms/multi-select-field.js",
|
|
98
|
+
"require": "./dist/forms/multi-select-field.cjs"
|
|
99
|
+
},
|
|
100
|
+
"./forms/number-field": {
|
|
101
|
+
"import": "./dist/forms/number-field.js",
|
|
102
|
+
"require": "./dist/forms/number-field.cjs"
|
|
103
|
+
},
|
|
104
|
+
"./forms/password-field": {
|
|
105
|
+
"import": "./dist/forms/password-field.js",
|
|
106
|
+
"require": "./dist/forms/password-field.cjs"
|
|
107
|
+
},
|
|
108
|
+
"./forms/select-field": {
|
|
109
|
+
"import": "./dist/forms/select-field.js",
|
|
110
|
+
"require": "./dist/forms/select-field.cjs"
|
|
111
|
+
},
|
|
112
|
+
"./forms/switch-field": {
|
|
113
|
+
"import": "./dist/forms/switch-field.js",
|
|
114
|
+
"require": "./dist/forms/switch-field.cjs"
|
|
115
|
+
},
|
|
116
|
+
"./forms/text-field": {
|
|
117
|
+
"import": "./dist/forms/text-field.js",
|
|
118
|
+
"require": "./dist/forms/text-field.cjs"
|
|
119
|
+
},
|
|
120
|
+
"./forms/textarea-field": {
|
|
121
|
+
"import": "./dist/forms/textarea-field.js",
|
|
122
|
+
"require": "./dist/forms/textarea-field.cjs"
|
|
123
|
+
},
|
|
77
124
|
"./layouts/flex": {
|
|
78
125
|
"import": "./dist/layouts/flex.js",
|
|
79
126
|
"require": "./dist/layouts/flex.cjs"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import {
|
|
4
|
+
Card,
|
|
5
|
+
CardAction,
|
|
6
|
+
CardContent,
|
|
7
|
+
CardDescription,
|
|
8
|
+
CardFooter,
|
|
9
|
+
CardHeader,
|
|
10
|
+
CardTitle,
|
|
11
|
+
} from "../ui/card";
|
|
12
|
+
|
|
13
|
+
type Props = {
|
|
14
|
+
title: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
action?: React.ReactNode;
|
|
17
|
+
footer?: React.ReactNode;
|
|
18
|
+
};
|
|
19
|
+
export const SimpleCard = ({
|
|
20
|
+
title,
|
|
21
|
+
description,
|
|
22
|
+
action,
|
|
23
|
+
footer,
|
|
24
|
+
children,
|
|
25
|
+
}: React.PropsWithChildren<Props>) => {
|
|
26
|
+
return (
|
|
27
|
+
<Card>
|
|
28
|
+
<CardHeader>
|
|
29
|
+
<CardTitle>{title}</CardTitle>
|
|
30
|
+
<CardDescription>{description}</CardDescription>
|
|
31
|
+
{action && <CardAction>{action}</CardAction>}
|
|
32
|
+
</CardHeader>
|
|
33
|
+
<CardContent>{children}</CardContent>
|
|
34
|
+
{footer && <CardFooter>{footer}</CardFooter>}
|
|
35
|
+
</Card>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ReactCountryFlag from "react-country-flag";
|
|
3
|
+
|
|
4
|
+
import { ECountry } from "@/types";
|
|
5
|
+
|
|
6
|
+
import { Flex } from "../layouts/flex";
|
|
7
|
+
import { Paragraph } from "../typography/paragraph";
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
country?: ECountry | null;
|
|
11
|
+
};
|
|
12
|
+
export const CountryDisplay: React.FC<React.PropsWithChildren<Props>> = ({
|
|
13
|
+
country,
|
|
14
|
+
}) => {
|
|
15
|
+
const code = React.useMemo(() => {
|
|
16
|
+
return {
|
|
17
|
+
[ECountry.VIETNAM]: "VN",
|
|
18
|
+
[ECountry.USA]: "US",
|
|
19
|
+
[ECountry.JAPAN]: "JP",
|
|
20
|
+
[ECountry.CHINA]: "CN",
|
|
21
|
+
[ECountry.KOREA]: "KR",
|
|
22
|
+
[ECountry.SINGAPORE]: "SG",
|
|
23
|
+
[ECountry.MALAYSIA]: "MY",
|
|
24
|
+
[ECountry.INDONESIA]: "ID",
|
|
25
|
+
[ECountry.TAIWAN]: "TW",
|
|
26
|
+
[ECountry.THAILAND]: "TH",
|
|
27
|
+
};
|
|
28
|
+
}, []);
|
|
29
|
+
if (!country) {
|
|
30
|
+
return (
|
|
31
|
+
<Flex padding="none" className="h-4 px-1">
|
|
32
|
+
<Paragraph variant="muted" className="line-clamp-1 text-xs">
|
|
33
|
+
No country
|
|
34
|
+
</Paragraph>
|
|
35
|
+
</Flex>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
return (
|
|
39
|
+
<Flex padding="none" className="h-4 px-1">
|
|
40
|
+
<ReactCountryFlag
|
|
41
|
+
svg
|
|
42
|
+
countryCode={country ? code[country] : "VN"}
|
|
43
|
+
className="emojiFlag border"
|
|
44
|
+
/>
|
|
45
|
+
<Paragraph variant="sm">
|
|
46
|
+
{country === ECountry.VIETNAM && "Vietnam"}
|
|
47
|
+
{country === ECountry.USA && "America"}
|
|
48
|
+
{country === ECountry.JAPAN && "Japan"}
|
|
49
|
+
{country === ECountry.CHINA && "China"}
|
|
50
|
+
{country === ECountry.KOREA && "Korea"}
|
|
51
|
+
{country === ECountry.SINGAPORE && "Singapore"}
|
|
52
|
+
{country === ECountry.MALAYSIA && "Malaysia"}
|
|
53
|
+
{country === ECountry.INDONESIA && "Indonesia"}
|
|
54
|
+
{country === ECountry.TAIWAN && "Taiwan"}
|
|
55
|
+
{country === ECountry.THAILAND && "Thailand"}
|
|
56
|
+
</Paragraph>
|
|
57
|
+
</Flex>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { Flex } from "../layouts/flex";
|
|
4
|
+
|
|
5
|
+
type DataListProps = {
|
|
6
|
+
title?: string;
|
|
7
|
+
};
|
|
8
|
+
export const DataList: React.FC<React.PropsWithChildren<DataListProps>> = ({
|
|
9
|
+
children,
|
|
10
|
+
}) => {
|
|
11
|
+
return (
|
|
12
|
+
<Flex vertical padding="none" gap="md" width="full">
|
|
13
|
+
{children}
|
|
14
|
+
</Flex>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type DataListItemProps = {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string | number | React.ReactNode;
|
|
21
|
+
minLabelWidth?: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const DataListItem: React.FC<
|
|
25
|
+
React.PropsWithChildren<DataListItemProps>
|
|
26
|
+
> = ({ label, value, minLabelWidth = "120px" }) => {
|
|
27
|
+
return (
|
|
28
|
+
<Flex align="center" justify="start" width="full" padding="none" gap="md">
|
|
29
|
+
<div
|
|
30
|
+
style={{ minWidth: minLabelWidth }}
|
|
31
|
+
className="text-muted-foreground text-sm"
|
|
32
|
+
>
|
|
33
|
+
{label}
|
|
34
|
+
</div>
|
|
35
|
+
<div className="text-secondary-foreground text-sm">{value}</div>
|
|
36
|
+
</Flex>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
format,
|
|
4
|
+
isThisMonth,
|
|
5
|
+
isThisWeek,
|
|
6
|
+
isThisYear,
|
|
7
|
+
isToday,
|
|
8
|
+
isTomorrow,
|
|
9
|
+
isValid,
|
|
10
|
+
isYesterday,
|
|
11
|
+
parseISO,
|
|
12
|
+
} from "date-fns";
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
TIME_IN_SECONDS,
|
|
16
|
+
vietnameseHolidays,
|
|
17
|
+
vietnameseLocale,
|
|
18
|
+
} from "@/constants";
|
|
19
|
+
import { cn } from "@/lib/utils";
|
|
20
|
+
|
|
21
|
+
interface Props {
|
|
22
|
+
date: Date | string | number;
|
|
23
|
+
format?:
|
|
24
|
+
| "short" // 15/03/24
|
|
25
|
+
| "medium" // 15/03/2024
|
|
26
|
+
| "long" // 15 tháng 3, 2024
|
|
27
|
+
| "full" // Thứ Sáu, ngày 15 tháng 3 năm 2024
|
|
28
|
+
| "relative" // 2 giờ trước
|
|
29
|
+
| "datetime" // 15/03/2024 14:30
|
|
30
|
+
| "time" // 14:30
|
|
31
|
+
| "smart"; // Tự động chọn format phù hợp
|
|
32
|
+
showHoliday?: boolean;
|
|
33
|
+
showTime?: boolean;
|
|
34
|
+
className?: string;
|
|
35
|
+
title?: string; // Tooltip khi hover
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const DateDisplay: React.FC<Props> = ({
|
|
39
|
+
date,
|
|
40
|
+
format: formatType = "medium",
|
|
41
|
+
showHoliday = false,
|
|
42
|
+
showTime = false,
|
|
43
|
+
className = "",
|
|
44
|
+
title,
|
|
45
|
+
}) => {
|
|
46
|
+
const parsedDate = React.useMemo(() => {
|
|
47
|
+
try {
|
|
48
|
+
if (date instanceof Date) {
|
|
49
|
+
return isValid(date) ? date : null;
|
|
50
|
+
}
|
|
51
|
+
if (typeof date === "string") {
|
|
52
|
+
const parsed = parseISO(date);
|
|
53
|
+
return isValid(parsed) ? parsed : new Date(date);
|
|
54
|
+
}
|
|
55
|
+
if (typeof date === "number") {
|
|
56
|
+
const parsed = new Date(date);
|
|
57
|
+
return isValid(parsed) ? parsed : null;
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
} catch {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
}, [date]);
|
|
64
|
+
|
|
65
|
+
// Format relative time in Vietnamese
|
|
66
|
+
const formatRelativeTime = React.useCallback((date: Date): string => {
|
|
67
|
+
const now = new Date();
|
|
68
|
+
const diffInSeconds = Math.floor((now.getTime() - date.getTime()) / 1000);
|
|
69
|
+
|
|
70
|
+
if (diffInSeconds < 60) return "Vừa xong";
|
|
71
|
+
if (diffInSeconds < 3600)
|
|
72
|
+
return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.MINUTE)} phút trước`;
|
|
73
|
+
if (diffInSeconds < 86400)
|
|
74
|
+
return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.HOUR)} giờ trước`;
|
|
75
|
+
if (diffInSeconds < 604800)
|
|
76
|
+
return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.DAY)} ngày trước`;
|
|
77
|
+
if (diffInSeconds < 2592000)
|
|
78
|
+
return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.WEEK)} tuần trước`;
|
|
79
|
+
if (diffInSeconds < 31536000)
|
|
80
|
+
return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.MONTH)} tháng trước`;
|
|
81
|
+
return `${Math.floor(diffInSeconds / TIME_IN_SECONDS.YEAR)} năm trước`;
|
|
82
|
+
}, []);
|
|
83
|
+
|
|
84
|
+
// Vietnamese weekday
|
|
85
|
+
const getVietnameseWeekday = React.useCallback(
|
|
86
|
+
(date: Date, short: boolean = false): string => {
|
|
87
|
+
const dayIndex = date.getDay();
|
|
88
|
+
return short
|
|
89
|
+
? vietnameseLocale.weekdaysShort[dayIndex]
|
|
90
|
+
: vietnameseLocale.weekdays[dayIndex];
|
|
91
|
+
},
|
|
92
|
+
[],
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
// Vietnamese month
|
|
96
|
+
const getVietnameseMonth = React.useCallback(
|
|
97
|
+
(date: Date, short: boolean = false): string => {
|
|
98
|
+
const monthIndex = date.getMonth();
|
|
99
|
+
return short
|
|
100
|
+
? vietnameseLocale.monthsShort[monthIndex]
|
|
101
|
+
: vietnameseLocale.months[monthIndex];
|
|
102
|
+
},
|
|
103
|
+
[],
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
// Check holiday
|
|
107
|
+
const getHoliday = React.useCallback((date: Date): string | null => {
|
|
108
|
+
const monthDay = format(date, "MM-dd") as keyof typeof vietnameseHolidays;
|
|
109
|
+
return vietnameseHolidays[monthDay] || null;
|
|
110
|
+
}, []);
|
|
111
|
+
|
|
112
|
+
// Smart format - choose appropriate format based on date
|
|
113
|
+
const getSmartFormat = React.useCallback(
|
|
114
|
+
(date: Date): string => {
|
|
115
|
+
if (isToday(date)) {
|
|
116
|
+
return showTime ? `Hôm nay ${format(date, "HH:mm")}` : "Hôm nay";
|
|
117
|
+
}
|
|
118
|
+
if (isYesterday(date)) {
|
|
119
|
+
return showTime ? `Hôm qua ${format(date, "HH:mm")}` : "Hôm qua";
|
|
120
|
+
}
|
|
121
|
+
if (isTomorrow(date)) {
|
|
122
|
+
return showTime ? `Ngày mai ${format(date, "HH:mm")}` : "Ngày mai";
|
|
123
|
+
}
|
|
124
|
+
if (isThisWeek(date)) {
|
|
125
|
+
const weekday = getVietnameseWeekday(date);
|
|
126
|
+
return showTime ? `${weekday} ${format(date, "HH:mm")}` : weekday;
|
|
127
|
+
}
|
|
128
|
+
if (isThisMonth(date)) {
|
|
129
|
+
const day = format(date, "d");
|
|
130
|
+
return showTime
|
|
131
|
+
? `${day}/${format(date, "M")} ${format(date, "HH:mm")}`
|
|
132
|
+
: `${day}/${format(date, "M")}`;
|
|
133
|
+
}
|
|
134
|
+
if (isThisYear(date)) {
|
|
135
|
+
return showTime ? format(date, "d/M HH:mm") : format(date, "d/M");
|
|
136
|
+
}
|
|
137
|
+
return showTime
|
|
138
|
+
? format(date, "d/M/yyyy HH:mm")
|
|
139
|
+
: format(date, "d/M/yyyy");
|
|
140
|
+
},
|
|
141
|
+
[getVietnameseWeekday, showTime],
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
// Main formatting function
|
|
145
|
+
const formatDate = React.useCallback(
|
|
146
|
+
(date: Date, type: string): string => {
|
|
147
|
+
const timeStr = showTime ? format(date, ", HH:mm") : "";
|
|
148
|
+
|
|
149
|
+
switch (type) {
|
|
150
|
+
case "short":
|
|
151
|
+
return format(date, "d/M/yy") + timeStr;
|
|
152
|
+
|
|
153
|
+
case "medium":
|
|
154
|
+
return format(date, "dd/MM/yyyy") + timeStr;
|
|
155
|
+
|
|
156
|
+
case "long":
|
|
157
|
+
return (
|
|
158
|
+
`${format(date, "d")} ${getVietnameseMonth(date)} ${format(date, "yyyy")}` +
|
|
159
|
+
timeStr
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
case "full": {
|
|
163
|
+
const data = `${getVietnameseWeekday(date)}, ngày ${format(date, "d")} ${getVietnameseMonth(date)} năm ${format(date, "yyyy")}`;
|
|
164
|
+
return data + timeStr;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
case "relative":
|
|
168
|
+
return formatRelativeTime(date);
|
|
169
|
+
|
|
170
|
+
case "datetime":
|
|
171
|
+
return format(date, "d/M/yyyy HH:mm");
|
|
172
|
+
|
|
173
|
+
case "time":
|
|
174
|
+
return format(date, "HH:mm");
|
|
175
|
+
|
|
176
|
+
case "smart":
|
|
177
|
+
return getSmartFormat(date);
|
|
178
|
+
|
|
179
|
+
default:
|
|
180
|
+
return format(date, "d/M/yyyy") + timeStr;
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
[
|
|
184
|
+
getSmartFormat,
|
|
185
|
+
getVietnameseMonth,
|
|
186
|
+
getVietnameseWeekday,
|
|
187
|
+
formatRelativeTime,
|
|
188
|
+
showTime,
|
|
189
|
+
],
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
if (!parsedDate) {
|
|
193
|
+
return (
|
|
194
|
+
<span className={cn("text-muted-foreground text-sm", className)}>
|
|
195
|
+
--/--/----
|
|
196
|
+
</span>
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
const formattedDate = formatDate(parsedDate, formatType);
|
|
201
|
+
const holiday = showHoliday ? getHoliday(parsedDate) : null;
|
|
202
|
+
const displayText = holiday ? `${formattedDate} (${holiday})` : formattedDate;
|
|
203
|
+
const tooltipTitle =
|
|
204
|
+
title || format(parsedDate, "EEEE, d MMMM yyyy HH:mm:ss");
|
|
205
|
+
|
|
206
|
+
return (
|
|
207
|
+
<time
|
|
208
|
+
dateTime={parsedDate.toISOString()}
|
|
209
|
+
className={cn("text-accent-foreground font-number text-sm", className)}
|
|
210
|
+
title={tooltipTitle}
|
|
211
|
+
>
|
|
212
|
+
{displayText}
|
|
213
|
+
</time>
|
|
214
|
+
);
|
|
215
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { PackageOpenIcon } from "lucide-react";
|
|
3
|
+
|
|
4
|
+
import { Flex } from "../layouts/flex";
|
|
5
|
+
|
|
6
|
+
export const EmptyDisplay = () => {
|
|
7
|
+
return (
|
|
8
|
+
<Flex
|
|
9
|
+
vertical
|
|
10
|
+
justify="center"
|
|
11
|
+
align="center"
|
|
12
|
+
gap="sm"
|
|
13
|
+
className="size-full"
|
|
14
|
+
>
|
|
15
|
+
<PackageOpenIcon
|
|
16
|
+
size={52}
|
|
17
|
+
strokeWidth={1}
|
|
18
|
+
className="text-muted-foreground"
|
|
19
|
+
/>
|
|
20
|
+
<p className="text-muted-foreground text-sm">
|
|
21
|
+
Không có dữ liệu nào để hiển thị.
|
|
22
|
+
</p>
|
|
23
|
+
</Flex>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { Paragraph } from "../typography/paragraph";
|
|
4
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
|
|
5
|
+
|
|
6
|
+
type NameDisplayProps = {
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const NameDisplay: React.FC<
|
|
11
|
+
React.PropsWithChildren<NameDisplayProps>
|
|
12
|
+
> = ({ name }) => {
|
|
13
|
+
return (
|
|
14
|
+
<Tooltip>
|
|
15
|
+
<TooltipTrigger>
|
|
16
|
+
<Paragraph variant="sm" className="line-clamp-2 cursor-help">
|
|
17
|
+
{name}
|
|
18
|
+
</Paragraph>
|
|
19
|
+
</TooltipTrigger>
|
|
20
|
+
<TooltipContent className="max-w-80 text-wrap break-keep whitespace-pre-line">
|
|
21
|
+
{name}
|
|
22
|
+
</TooltipContent>
|
|
23
|
+
</Tooltip>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
|
|
2
|
+
|
|
3
|
+
export const PhoneNumberDisplay: React.FC<
|
|
4
|
+
React.PropsWithChildren<{ value: string }>
|
|
5
|
+
> = ({ value }) => {
|
|
6
|
+
return (
|
|
7
|
+
<Tooltip>
|
|
8
|
+
<TooltipTrigger asChild>
|
|
9
|
+
<p className="font-number text-secondary-foreground text-sm">
|
|
10
|
+
{value.replace(/(\d{3})(\d{3})(\d{4})/, "($1) $2-$3")}
|
|
11
|
+
</p>
|
|
12
|
+
</TooltipTrigger>
|
|
13
|
+
<TooltipContent>
|
|
14
|
+
<p>
|
|
15
|
+
{value
|
|
16
|
+
.slice(1)
|
|
17
|
+
.replace(/(\d{2})(\d{3})(\d{4})/, "(00) (+84) ($1) $2-$3")}
|
|
18
|
+
</p>
|
|
19
|
+
</TooltipContent>
|
|
20
|
+
</Tooltip>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { ERole } from "@/types";
|
|
4
|
+
|
|
5
|
+
import { Badge } from "../ui/badge";
|
|
6
|
+
|
|
7
|
+
type Props = {
|
|
8
|
+
status: ERole;
|
|
9
|
+
};
|
|
10
|
+
export const RoleBadge: React.FC<React.PropsWithChildren<Props>> = ({
|
|
11
|
+
status,
|
|
12
|
+
}) => {
|
|
13
|
+
const colors = React.useMemo<
|
|
14
|
+
Record<ERole, React.ComponentProps<typeof Badge>["color"]>
|
|
15
|
+
>(() => {
|
|
16
|
+
return {
|
|
17
|
+
[ERole.ADMIN]: "red",
|
|
18
|
+
[ERole.SUPER_ADMIN]: "purple",
|
|
19
|
+
[ERole.MODERATOR]: "indigo",
|
|
20
|
+
[ERole.STAFF]: "green",
|
|
21
|
+
[ERole.USER]: "blue",
|
|
22
|
+
};
|
|
23
|
+
}, []);
|
|
24
|
+
return (
|
|
25
|
+
<Badge color={colors[status]} className="min-w-24 justify-center">
|
|
26
|
+
{status === ERole.SUPER_ADMIN && "Super Admin"}
|
|
27
|
+
{status === ERole.ADMIN && "Admin"}
|
|
28
|
+
{status === ERole.MODERATOR && "Moderator"}
|
|
29
|
+
{status === ERole.STAFF && "Staff"}
|
|
30
|
+
{status === ERole.USER && "User"}
|
|
31
|
+
</Badge>
|
|
32
|
+
);
|
|
33
|
+
};
|