@customafk/lunas-ui 0.0.53 → 0.0.54
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-CBg3KRIT.cjs → add-new-DfABsmli.cjs} +2 -2
- package/dist/{add-new-CBg3KRIT.cjs.map → add-new-DfABsmli.cjs.map} +1 -1
- package/dist/{add-new-B9_P1OXs.js → add-new-Dwxj9tEB.js} +2 -2
- package/dist/{add-new-B9_P1OXs.js.map → add-new-Dwxj9tEB.js.map} +1 -1
- package/dist/{badge-DP4D6fsq.js → badge-BJWJGcs7.js} +1 -1
- package/dist/{badge-DP4D6fsq.js.map → badge-BJWJGcs7.js.map} +1 -1
- package/dist/{badge-C5OQVVdj.cjs → badge-CtACOYGz.cjs} +1 -1
- package/dist/{badge-C5OQVVdj.cjs.map → badge-CtACOYGz.cjs.map} +1 -1
- package/dist/{button-y_YnE05_.d.ts → button-6o1dgit-.d.cts} +4 -4
- package/dist/{button-DBBV45P_.d.cts → button-B4fdn-Yc.d.ts} +5 -5
- package/dist/{calendar-DSpnZGer.cjs → calendar-CnhHBLl8.cjs} +1 -1
- package/dist/{calendar-DSpnZGer.cjs.map → calendar-CnhHBLl8.cjs.map} +1 -1
- package/dist/{calendar-DXPcqnGq.js → calendar-DlLKQCdQ.js} +1 -1
- package/dist/{calendar-DXPcqnGq.js.map → calendar-DlLKQCdQ.js.map} +1 -1
- package/dist/{command-BHcMi5w6.d.cts → command-B1RFofax.d.cts} +12 -12
- package/dist/{command-BAGuL4Lq.d.ts → command-CMagw20N.d.ts} +12 -12
- package/dist/{command-DEYbZBFJ.js → command-CxB1jizd.js} +1 -1
- package/dist/{command-DEYbZBFJ.js.map → command-CxB1jizd.js.map} +1 -1
- package/dist/{command-BBHlXG-4.cjs → command-DL8-AZm7.cjs} +1 -1
- package/dist/{command-BBHlXG-4.cjs.map → command-DL8-AZm7.cjs.map} +1 -1
- package/dist/data-display/country.cjs +1 -1
- package/dist/data-display/country.js +1 -1
- package/dist/data-display/data-list.cjs +1 -1
- package/dist/data-display/data-list.js +1 -1
- package/dist/data-display/date-tooltip.cjs +1 -1
- package/dist/data-display/date-tooltip.js +1 -1
- package/dist/data-display/date.cjs +1 -1
- package/dist/data-display/date.js +1 -1
- package/dist/data-display/empty.cjs +1 -1
- package/dist/data-display/empty.d.cts +2 -2
- package/dist/data-display/empty.d.ts +2 -2
- package/dist/data-display/empty.js +1 -1
- package/dist/data-display/name.cjs +1 -1
- package/dist/data-display/name.js +1 -1
- package/dist/data-display/phone-number.cjs +1 -1
- package/dist/data-display/phone-number.js +1 -1
- package/dist/data-display/role-badge.cjs +1 -1
- package/dist/data-display/role-badge.js +1 -1
- package/dist/data-display/statistic.cjs +1 -1
- package/dist/data-display/statistic.d.cts +2 -2
- package/dist/data-display/statistic.d.ts +2 -2
- package/dist/data-display/statistic.js +1 -1
- package/dist/{date-B1g1OMYc.js → date-CztL0aWp.js} +1 -1
- package/dist/{date-B1g1OMYc.js.map → date-CztL0aWp.js.map} +1 -1
- package/dist/{date-Cw6Jf7k6.cjs → date-DCURBWXk.cjs} +1 -1
- package/dist/{date-Cw6Jf7k6.cjs.map → date-DCURBWXk.cjs.map} +1 -1
- package/dist/{dialog-LR_6dvSQ.d.cts → dialog-DxwqxuCv.d.cts} +12 -12
- package/dist/{dialog-DzGLUK6_.d.ts → dialog-J3LaGLck.d.ts} +12 -12
- package/dist/dialogs/detail-dialog/component/sidebar.cjs +1 -1
- package/dist/dialogs/detail-dialog/component/sidebar.d.cts +30 -30
- package/dist/dialogs/detail-dialog/component/sidebar.d.ts +4 -4
- package/dist/dialogs/detail-dialog/component/sidebar.js +1 -1
- package/dist/dialogs/detail-dialog/index.cjs +1 -1
- package/dist/dialogs/detail-dialog/index.cjs.map +1 -1
- package/dist/dialogs/detail-dialog/index.js +1 -1
- package/dist/dialogs/form-dialog.d.cts +2 -2
- package/dist/dialogs/form-dialog.d.ts +2 -2
- package/dist/{flex-CXCO0f21.js → flex-CvokpUf1.js} +1 -1
- package/dist/{flex-CXCO0f21.js.map → flex-CvokpUf1.js.map} +1 -1
- package/dist/{flex-BSVrFdMJ.cjs → flex-DjACH4wX.cjs} +1 -1
- package/dist/{flex-BSVrFdMJ.cjs.map → flex-DjACH4wX.cjs.map} +1 -1
- package/dist/forms/combobox-field.cjs +1 -1
- package/dist/forms/combobox-field.d.cts +2 -2
- package/dist/forms/combobox-field.d.ts +2 -2
- package/dist/forms/combobox-field.js +1 -1
- package/dist/forms/date-field.cjs +1 -1
- package/dist/forms/date-field.d.cts +2 -2
- package/dist/forms/date-field.d.ts +2 -2
- package/dist/forms/date-field.js +1 -1
- package/dist/forms/form-wrapper.d.cts +2 -2
- package/dist/forms/form-wrapper.d.ts +2 -2
- package/dist/forms/multi-select-field.cjs +1 -1
- package/dist/forms/multi-select-field.d.cts +2 -2
- package/dist/forms/multi-select-field.d.ts +2 -2
- package/dist/forms/multi-select-field.js +1 -1
- package/dist/forms/number-field.cjs +1 -1
- package/dist/forms/number-field.d.cts +2 -2
- package/dist/forms/number-field.d.ts +2 -2
- package/dist/forms/number-field.js +1 -1
- package/dist/forms/password-field.cjs +1 -1
- package/dist/forms/password-field.d.cts +2 -2
- package/dist/forms/password-field.js +1 -1
- package/dist/forms/select-field.cjs +1 -1
- package/dist/forms/select-field.d.cts +2 -2
- package/dist/forms/select-field.d.ts +2 -2
- package/dist/forms/select-field.js +1 -1
- package/dist/forms/switch-field.cjs +1 -1
- package/dist/forms/switch-field.d.cts +2 -2
- package/dist/forms/switch-field.d.ts +2 -2
- package/dist/forms/switch-field.js +1 -1
- package/dist/forms/text-field.cjs +1 -1
- package/dist/forms/text-field.d.cts +2 -2
- package/dist/forms/text-field.d.ts +2 -2
- package/dist/forms/text-field.js +1 -1
- package/dist/forms/textarea-field.cjs +1 -1
- package/dist/forms/textarea-field.d.cts +2 -2
- package/dist/forms/textarea-field.d.ts +2 -2
- package/dist/forms/textarea-field.js +1 -1
- package/dist/{input-C-60EZ1K.cjs → input-C2xQcVZP.cjs} +1 -1
- package/dist/{input-C-60EZ1K.cjs.map → input-C2xQcVZP.cjs.map} +1 -1
- package/dist/{input-nsu0-DwM.js → input-DgJVc3kt.js} +1 -1
- package/dist/{input-nsu0-DwM.js.map → input-DgJVc3kt.js.map} +1 -1
- package/dist/{input-BZBf-l4K.d.ts → input-Dt8julrj.d.cts} +3 -3
- package/dist/{input-Ci55gNyE.d.cts → input-fe1qd_Yy.d.ts} +3 -3
- package/dist/layouts/app-layout/index.cjs +1 -1
- package/dist/layouts/app-layout/index.cjs.map +1 -1
- package/dist/layouts/app-layout/index.d.cts +3 -3
- package/dist/layouts/app-layout/index.d.ts +26 -26
- package/dist/layouts/app-layout/index.js +1 -1
- package/dist/layouts/app-layout/index.js.map +1 -1
- package/dist/layouts/flex.cjs +1 -1
- package/dist/layouts/flex.d.cts +2 -2
- package/dist/layouts/flex.d.ts +2 -2
- package/dist/layouts/flex.js +1 -1
- package/dist/layouts/main/index.cjs +1 -1
- package/dist/layouts/main/index.d.cts +4 -4
- package/dist/layouts/main/index.d.ts +4 -4
- package/dist/layouts/main/index.js +1 -1
- package/dist/{multi-select-Doj_6IIC.cjs → multi-select-BuhAcysb.cjs} +2 -2
- package/dist/{multi-select-Doj_6IIC.cjs.map → multi-select-BuhAcysb.cjs.map} +1 -1
- package/dist/{multi-select-i3VQ915k.js → multi-select-LJzXqVC-.js} +2 -2
- package/dist/{multi-select-i3VQ915k.js.map → multi-select-LJzXqVC-.js.map} +1 -1
- package/dist/{paragraph-C0KfolV0.js → paragraph-Bn2q1srm.js} +1 -1
- package/dist/{paragraph-C0KfolV0.js.map → paragraph-Bn2q1srm.js.map} +1 -1
- package/dist/{paragraph-JXci2Ihg.cjs → paragraph-DA4bg12A.cjs} +1 -1
- package/dist/{paragraph-JXci2Ihg.cjs.map → paragraph-DA4bg12A.cjs.map} +1 -1
- package/dist/{popover-DjfTTw9J.js → popover-CTFp7ZXi.js} +1 -1
- package/dist/{popover-DjfTTw9J.js.map → popover-CTFp7ZXi.js.map} +1 -1
- package/dist/{popover-F0wFeBo7.cjs → popover-DCcPvdz2.cjs} +1 -1
- package/dist/{popover-F0wFeBo7.cjs.map → popover-DCcPvdz2.cjs.map} +1 -1
- package/dist/{refresh-Uhf4oSfg.js → refresh-CNeJCjk5.js} +2 -2
- package/dist/{refresh-Uhf4oSfg.js.map → refresh-CNeJCjk5.js.map} +1 -1
- package/dist/{refresh-X3mMFqTM.cjs → refresh-DmguI4WR.cjs} +2 -2
- package/dist/{refresh-X3mMFqTM.cjs.map → refresh-DmguI4WR.cjs.map} +1 -1
- package/dist/{search-input-w_52Z2rk.js → search-input-CP1CX74C.js} +2 -2
- package/dist/{search-input-w_52Z2rk.js.map → search-input-CP1CX74C.js.map} +1 -1
- package/dist/{search-input-DyqFLvzs.cjs → search-input-DzRJf6qI.cjs} +2 -2
- package/dist/{search-input-DyqFLvzs.cjs.map → search-input-DzRJf6qI.cjs.map} +1 -1
- package/dist/{select-C5k0McoM.cjs → select-BCBdGAk7.cjs} +1 -1
- package/dist/{select-C5k0McoM.cjs.map → select-BCBdGAk7.cjs.map} +1 -1
- package/dist/{select-Ch3I_jWe.js → select-DmjCwCGB.js} +1 -1
- package/dist/{select-Ch3I_jWe.js.map → select-DmjCwCGB.js.map} +1 -1
- package/dist/{separator-BssDmBsX.d.ts → separator-Cs0J9x-4.d.ts} +3 -3
- package/dist/{separator-DbpWHldj.d.cts → separator-Rm2a238S.d.cts} +3 -3
- package/dist/{sidebar-5HuN-j1i.js → sidebar-BiG4ZcRy.js} +2 -2
- package/dist/{sidebar-5HuN-j1i.js.map → sidebar-BiG4ZcRy.js.map} +1 -1
- package/dist/{sidebar-BDLTT1ko.js → sidebar-C397Bg8C.js} +2 -2
- package/dist/{sidebar-BDLTT1ko.js.map → sidebar-C397Bg8C.js.map} +1 -1
- package/dist/{sidebar-B-iUTI3P.cjs → sidebar-Ccw4-cV5.cjs} +2 -2
- package/dist/{sidebar-B-iUTI3P.cjs.map → sidebar-Ccw4-cV5.cjs.map} +1 -1
- package/dist/{sidebar-C0EmqKyz.cjs → sidebar-DGjpr6u7.cjs} +2 -2
- package/dist/{sidebar-C0EmqKyz.cjs.map → sidebar-DGjpr6u7.cjs.map} +1 -1
- package/dist/{switch-B9LmV-PS.js → switch-965kHdW_.js} +1 -1
- package/dist/{switch-B9LmV-PS.js.map → switch-965kHdW_.js.map} +1 -1
- package/dist/{switch-bfoTi9s3.cjs → switch-C3igCoxt.cjs} +1 -1
- package/dist/{switch-bfoTi9s3.cjs.map → switch-C3igCoxt.cjs.map} +1 -1
- package/dist/table/index.cjs +1 -1
- package/dist/table/index.cjs.map +1 -1
- package/dist/table/index.d.cts +2 -2
- package/dist/table/index.d.ts +2 -2
- package/dist/table/index.js +1 -1
- package/dist/{textarea-0egIZLQD.js → textarea-BK2brgwY.js} +1 -1
- package/dist/{textarea-0egIZLQD.js.map → textarea-BK2brgwY.js.map} +1 -1
- package/dist/{textarea-dFxubrKf.cjs → textarea-Y4wAXFGr.cjs} +1 -1
- package/dist/{textarea-dFxubrKf.cjs.map → textarea-Y4wAXFGr.cjs.map} +1 -1
- package/dist/{toggle-C9fT4j4U.d.cts → toggle-B_di9jVO.d.cts} +3 -3
- package/dist/{toggle-Cfa3Ju6R.d.ts → toggle-Dfy8X50O.d.ts} +3 -3
- package/dist/{tooltip-CnemaSZS.d.cts → tooltip-BkWWOZyr.d.cts} +6 -6
- package/dist/{tooltip-jz3-KXgN.js → tooltip-C9Ex69RQ.js} +1 -1
- package/dist/{tooltip-jz3-KXgN.js.map → tooltip-C9Ex69RQ.js.map} +1 -1
- package/dist/{tooltip-GgIQS_wc.d.ts → tooltip-DFRxIbzr.d.ts} +6 -6
- package/dist/{tooltip-BeQcgjzF.cjs → tooltip-i-daLHx3.cjs} +1 -1
- package/dist/{tooltip-BeQcgjzF.cjs.map → tooltip-i-daLHx3.cjs.map} +1 -1
- package/dist/{types-CnMfjcgO.cjs → types--5Hxh5iL.cjs} +1 -1
- package/dist/{types-CnMfjcgO.cjs.map → types--5Hxh5iL.cjs.map} +1 -1
- package/dist/{types-BVNbk1ZN.js → types-DGK6BDUS.js} +1 -1
- package/dist/{types-BVNbk1ZN.js.map → types-DGK6BDUS.js.map} +1 -1
- package/dist/typography/paragraph.cjs +1 -1
- package/dist/typography/paragraph.d.cts +2 -2
- package/dist/typography/paragraph.d.ts +2 -2
- package/dist/typography/paragraph.js +1 -1
- package/dist/typography/title.d.cts +2 -2
- package/dist/typography/title.d.ts +2 -2
- package/dist/ui/alert-dialog.d.cts +12 -12
- package/dist/ui/alert-dialog.d.ts +12 -12
- package/dist/ui/alert.d.cts +6 -6
- package/dist/ui/alert.d.ts +6 -6
- package/dist/ui/aspect-ratio.d.cts +2 -2
- package/dist/ui/aspect-ratio.d.ts +2 -2
- package/dist/ui/avatar.d.cts +4 -4
- package/dist/ui/avatar.d.ts +4 -4
- package/dist/ui/badge.cjs +1 -1
- package/dist/ui/badge.d.cts +4 -4
- package/dist/ui/badge.d.ts +4 -4
- package/dist/ui/badge.js +1 -1
- package/dist/ui/breadcrumb.d.cts +8 -8
- package/dist/ui/breadcrumb.d.ts +8 -8
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/buttons/add-new.cjs +1 -1
- package/dist/ui/buttons/add-new.js +1 -1
- package/dist/ui/buttons/refresh.cjs +1 -1
- package/dist/ui/buttons/refresh.js +1 -1
- package/dist/ui/calendar.cjs +1 -1
- package/dist/ui/calendar.d.cts +4 -4
- package/dist/ui/calendar.d.ts +4 -4
- package/dist/ui/calendar.js +1 -1
- package/dist/ui/card.d.cts +8 -8
- package/dist/ui/card.d.ts +8 -8
- package/dist/ui/carousel.d.cts +7 -7
- package/dist/ui/carousel.d.ts +7 -7
- package/dist/ui/collapsible.d.cts +4 -4
- package/dist/ui/collapsible.d.ts +4 -4
- package/dist/ui/command.cjs +1 -1
- package/dist/ui/command.d.cts +2 -2
- package/dist/ui/command.d.ts +2 -2
- package/dist/ui/command.js +1 -1
- package/dist/ui/context-menu.d.cts +16 -16
- package/dist/ui/context-menu.d.ts +16 -16
- package/dist/ui/dialog.d.cts +1 -1
- package/dist/ui/dialog.d.ts +1 -1
- package/dist/ui/dropdown-menu.d.cts +16 -16
- package/dist/ui/dropdown-menu.d.ts +16 -16
- package/dist/ui/file-uploader.d.cts +2 -2
- package/dist/ui/file-uploader.d.ts +2 -2
- package/dist/ui/form.d.cts +7 -7
- package/dist/ui/form.d.ts +7 -7
- package/dist/ui/hover-card.d.cts +4 -4
- package/dist/ui/hover-card.d.ts +4 -4
- package/dist/ui/input-otp.d.cts +5 -5
- package/dist/ui/input-otp.d.ts +5 -5
- package/dist/ui/input.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 +3 -3
- package/dist/ui/inputs/search-input.d.ts +3 -3
- package/dist/ui/inputs/search-input.js +1 -1
- package/dist/ui/label.d.cts +2 -2
- package/dist/ui/label.d.ts +2 -2
- package/dist/ui/menubar.d.cts +17 -17
- package/dist/ui/menubar.d.ts +17 -17
- package/dist/ui/multi-select.cjs +1 -1
- package/dist/ui/multi-select.d.cts +2 -2
- package/dist/ui/multi-select.d.ts +2 -2
- package/dist/ui/multi-select.js +1 -1
- package/dist/ui/navigation-menu.d.cts +11 -11
- package/dist/ui/navigation-menu.d.ts +11 -11
- package/dist/ui/pagination.d.cts +9 -9
- package/dist/ui/pagination.d.ts +9 -9
- package/dist/ui/popover.cjs +1 -1
- package/dist/ui/popover.d.cts +5 -5
- package/dist/ui/popover.d.ts +5 -5
- package/dist/ui/popover.js +1 -1
- package/dist/ui/progress.d.cts +2 -2
- package/dist/ui/progress.d.ts +2 -2
- package/dist/ui/radio-group.d.cts +3 -3
- package/dist/ui/radio-group.d.ts +3 -3
- package/dist/ui/resizable.d.cts +4 -4
- package/dist/ui/resizable.d.ts +4 -4
- package/dist/ui/scroll-area.d.cts +3 -3
- package/dist/ui/scroll-area.d.ts +3 -3
- package/dist/ui/select.cjs +1 -1
- package/dist/ui/select.d.cts +11 -11
- package/dist/ui/select.d.ts +11 -11
- package/dist/ui/select.js +1 -1
- package/dist/ui/separator.d.cts +1 -1
- package/dist/ui/separator.d.ts +1 -1
- package/dist/ui/sheet.d.cts +9 -9
- package/dist/ui/sheet.d.ts +9 -9
- package/dist/ui/sidebar.cjs +1 -1
- package/dist/ui/sidebar.d.cts +30 -30
- package/dist/ui/sidebar.d.ts +30 -30
- package/dist/ui/sidebar.js +1 -1
- package/dist/ui/skeleton.d.cts +2 -2
- package/dist/ui/skeleton.d.ts +2 -2
- package/dist/ui/slider.d.cts +2 -2
- package/dist/ui/slider.d.ts +2 -2
- package/dist/ui/sonner.d.cts +2 -2
- package/dist/ui/sonner.d.ts +2 -2
- package/dist/ui/switch.cjs +1 -1
- package/dist/ui/switch.d.cts +2 -2
- package/dist/ui/switch.d.ts +2 -2
- package/dist/ui/switch.js +1 -1
- package/dist/ui/table.d.cts +9 -9
- package/dist/ui/table.d.ts +9 -9
- package/dist/ui/tabs.d.cts +5 -5
- package/dist/ui/tabs.d.ts +5 -5
- package/dist/ui/textarea.cjs +1 -1
- package/dist/ui/textarea.d.cts +2 -2
- package/dist/ui/textarea.d.ts +2 -2
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/toggle-group.d.cts +4 -4
- package/dist/ui/toggle-group.d.ts +4 -4
- package/dist/ui/toggle.d.cts +1 -1
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/tooltip.cjs +1 -1
- package/dist/ui/tooltip.d.cts +1 -1
- package/dist/ui/tooltip.d.ts +1 -1
- package/dist/ui/tooltip.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["DialogHeader","DialogTitle","DialogDescription","DetailDialogMain: React.FC<React.PropsWithChildren>","Flex","DetailDialogMainHeader: React.FC<React.PropsWithChildren<DetailDialogMainHeaderProps>>","DetailDialogSidebarTrigger","Title","CalendarIcon","DateDisplay","DetailDialogWrapper: React.FC<React.PropsWithChildren>","DialogContent","cn","DetailDialogSidebar: React.FC<React.PropsWithChildren<{ title?: string; sidebarFooter?: React.ReactNode }>>","Sidebar","DetailDialogSidebarHeader","DetailDialogSidebarMenu","DetailDialogSidebarMenuItem","DetailDialogSidebarMenuButton","CatIcon","DetailDialogSidebarContent","DetailDialogSidebarGroup","DetailDialogSidebarFooter","DetailDialog: React.FC<React.PropsWithChildren<Props>>","Dialog","SidebarProvider","Flex"],"sources":["../../../packages/components/dialogs/detail-dialog/component/header.tsx","../../../packages/components/dialogs/detail-dialog/component/main.tsx","../../../packages/components/dialogs/detail-dialog/component/wrapper.tsx","../../../packages/components/dialogs/detail-dialog/index.tsx"],"sourcesContent":["import { DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog'\n\nexport const DetailDialogHeader = () => {\n return (\n <DialogHeader className=\"sr-only\">\n <DialogTitle className=\"sr-only\"></DialogTitle>\n <DialogDescription className=\"sr-only\"></DialogDescription>\n </DialogHeader>\n )\n}\n","import { CalendarIcon } from 'lucide-react'\n\nimport { DateDisplay } from '@/components/data-display/date'\nimport { Flex } from '@/components/layouts/flex'\nimport { Title } from '@/components/typography/title'\n\nimport { DetailDialogSidebarTrigger } from './sidebar'\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'\n\nexport const DetailDialogMain: React.FC<React.PropsWithChildren> = ({ children }) => (\n <main data-slot=\"detail-dialog-main\" className=\"relative h-full flex-1\">\n <Flex padding=\"none\" gap=\"none\" vertical align=\"stretch\" className=\"absolute inset-0 size-full\">\n {children}\n </Flex>\n </main>\n)\n\ntype DetailDialogMainHeaderProps = {\n title: string\n createdAt?: string | Date | number\n}\nexport const DetailDialogMainHeader: React.FC<React.PropsWithChildren<DetailDialogMainHeaderProps>> = ({ title, createdAt }) => (\n <header className=\"bg-card border-border-weak flex w-full flex-0 items-start gap-x-2.5 border-b py-2.5 pr-12 pl-2\">\n <DetailDialogSidebarTrigger />\n <Flex vertical align=\"start\" padding=\"none\" width=\"null\" wrap={false} className=\"flex-1\">\n <Title level={5} className=\"line-clamp-1 truncate text-wrap\">\n {title || 'Detail Dialog'}\n </Title>\n <Flex padding=\"none\" className=\"text-text-positive-weak relative\">\n <CalendarIcon size={12} className=\"absolute top-0.5 md:top-1\" />\n {!!createdAt && <DateDisplay showTime showHoliday date={createdAt} format=\"full\" className=\"ml-4 text-xs md:text-sm\" />}\n </Flex>\n </Flex>\n </header>\n)\n\nexport const DetailDialogMainGroup: React.FC<React.PropsWithChildren> = ({ children }) => (\n <Flex vertical gap=\"md\" padding=\"md\" width=\"full\">\n {children}\n </Flex>\n)\n\ntype DetailDialogMainGroupItemProps = {\n title?: string\n description?: string\n}\nexport const DetailDialogMainGroupItem: React.FC<React.PropsWithChildren<DetailDialogMainGroupItemProps>> = ({ title, description, children }) => (\n <Card className=\"w-full snap-start scroll-mt-4\">\n <CardHeader>\n <CardTitle>{title}</CardTitle>\n <CardDescription>{description}</CardDescription>\n </CardHeader>\n <CardContent>{children}</CardContent>\n </Card>\n)\n","import { DialogContent } from '@/components/ui/dialog'\nimport { cn } from '@/lib/utils'\n\nexport const DetailDialogWrapper: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <DialogContent\n className={cn(\n 'relative h-full overflow-hidden border-none p-0',\n 'rounded-none md:rounded-lg',\n 'max-h-svh max-w-svw',\n 'md:max-h-[90svh] md:max-w-[90svw]',\n 'xl:max-h-[90svh] xl:max-w-[90svw]',\n '2xl:max-h-[90svh] 2xl:max-w-7xl',\n )}\n onInteractOutside={(e) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n >\n {children}\n </DialogContent>\n )\n}\n","import { CatIcon } from 'lucide-react'\n\nimport { Flex } from '@/components/layouts/flex'\nimport { Dialog } from '@/components/ui/dialog'\n\nimport { DetailDialogHeader } from './component/header'\nimport { DetailDialogMain, DetailDialogMainHeader } from './component/main'\nimport {\n Sidebar,\n SidebarProvider,\n DetailDialogSidebarContent,\n DetailDialogSidebarFooter,\n DetailDialogSidebarGroup,\n DetailDialogSidebarHeader,\n DetailDialogSidebarMenu,\n DetailDialogSidebarMenuButton,\n DetailDialogSidebarMenuItem,\n} from './component/sidebar'\nimport { DetailDialogWrapper } from './component/wrapper'\n\nconst DetailDialogSidebar: React.FC<React.PropsWithChildren<{ title?: string; sidebarFooter?: React.ReactNode }>> = ({ title, sidebarFooter, children }) => {\n return (\n <Sidebar collapsible=\"icon\" className=\"shadow-nav z-20 hidden md:flex\">\n <DetailDialogSidebarHeader>\n <DetailDialogSidebarMenu>\n <DetailDialogSidebarMenuItem>\n <DetailDialogSidebarMenuButton size=\"lg\" tabIndex={-1}>\n <div className=\"bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg\">\n <CatIcon size={16} />\n </div>\n <div className=\"grid flex-1 text-left text-sm leading-tight\">\n <span className=\"truncate font-medium\">{title || 'Detail Dialog'}</span>\n <span className=\"truncate text-xs\">Lunas Enterprise</span>\n </div>\n </DetailDialogSidebarMenuButton>\n </DetailDialogSidebarMenuItem>\n </DetailDialogSidebarMenu>\n </DetailDialogSidebarHeader>\n <DetailDialogSidebarContent>\n <DetailDialogSidebarGroup>{children}</DetailDialogSidebarGroup>\n </DetailDialogSidebarContent>\n {sidebarFooter && <DetailDialogSidebarFooter>{sidebarFooter}</DetailDialogSidebarFooter>}\n </Sidebar>\n )\n}\n\ntype Props = {\n open?: boolean\n isLoading?: boolean\n sidebarTitle?: string\n sidebar?: React.ReactNode\n sidebarFooter?: React.ReactNode\n title: string\n createdAt: string | Date | number\n onOpenChange?: (open: boolean) => void | Promise<void>\n}\nexport const DetailDialog: React.FC<React.PropsWithChildren<Props>> = ({\n open,\n isLoading = false,\n sidebarTitle,\n sidebar,\n sidebarFooter,\n title,\n createdAt,\n onOpenChange,\n children,\n}) => {\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DetailDialogWrapper>\n <DetailDialogHeader />\n <SidebarProvider className=\"h-full min-h-[85svh] items-start\">\n <DetailDialogSidebar title={sidebarTitle} sidebarFooter={sidebarFooter} children={sidebar} />\n <DetailDialogMain>\n <DetailDialogMainHeader title={title} createdAt={createdAt} />\n {isLoading ? (\n <Flex justify=\"center\" className=\"bg-muted-muted w-full flex-1 inset-shadow-sm\">\n <div className=\"loader\" />\n </Flex>\n ) : (\n <section className=\"bg-muted-muted relative flex flex-1 snap-y flex-col gap-0 overflow-y-auto inset-shadow-sm\">{children}</section>\n )}\n </DetailDialogMain>\n </SidebarProvider>\n </DetailDialogWrapper>\n </Dialog>\n )\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["DialogHeader","DialogTitle","DialogDescription","DetailDialogMain: React.FC<React.PropsWithChildren>","Flex","DetailDialogMainHeader: React.FC<React.PropsWithChildren<DetailDialogMainHeaderProps>>","DetailDialogSidebarTrigger","Title","CalendarIcon","DateDisplay","DetailDialogWrapper: React.FC<React.PropsWithChildren>","DialogContent","cn","DetailDialogSidebar: React.FC<React.PropsWithChildren<{ title?: string; sidebarFooter?: React.ReactNode }>>","Sidebar","DetailDialogSidebarHeader","DetailDialogSidebarMenu","DetailDialogSidebarMenuItem","DetailDialogSidebarMenuButton","CatIcon","DetailDialogSidebarContent","DetailDialogSidebarGroup","DetailDialogSidebarFooter","DetailDialog: React.FC<React.PropsWithChildren<Props>>","Dialog","SidebarProvider","Flex"],"sources":["../../../packages/components/dialogs/detail-dialog/component/header.tsx","../../../packages/components/dialogs/detail-dialog/component/main.tsx","../../../packages/components/dialogs/detail-dialog/component/wrapper.tsx","../../../packages/components/dialogs/detail-dialog/index.tsx"],"sourcesContent":["import { DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog'\n\nexport const DetailDialogHeader = () => {\n return (\n <DialogHeader className=\"sr-only\">\n <DialogTitle className=\"sr-only\"></DialogTitle>\n <DialogDescription className=\"sr-only\"></DialogDescription>\n </DialogHeader>\n )\n}\n","import { CalendarIcon } from 'lucide-react'\n\nimport { DateDisplay } from '@/components/data-display/date'\nimport { Flex } from '@/components/layouts/flex'\nimport { Title } from '@/components/typography/title'\n\nimport { DetailDialogSidebarTrigger } from './sidebar'\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'\n\nexport const DetailDialogMain: React.FC<React.PropsWithChildren> = ({ children }) => (\n <main data-slot=\"detail-dialog-main\" className=\"relative h-full flex-1\">\n <Flex padding=\"none\" gap=\"none\" vertical align=\"stretch\" className=\"absolute inset-0 size-full\">\n {children}\n </Flex>\n </main>\n)\n\ntype DetailDialogMainHeaderProps = {\n title: string\n createdAt?: string | Date | number\n}\nexport const DetailDialogMainHeader: React.FC<React.PropsWithChildren<DetailDialogMainHeaderProps>> = ({ title, createdAt }) => (\n <header className=\"bg-card border-border-weak flex w-full flex-0 items-start gap-x-2.5 border-b py-2.5 pr-12 pl-2\">\n <DetailDialogSidebarTrigger />\n <Flex vertical align=\"start\" padding=\"none\" width=\"null\" wrap={false} className=\"flex-1\">\n <Title level={5} className=\"line-clamp-1 truncate text-wrap\">\n {title || 'Detail Dialog'}\n </Title>\n <Flex padding=\"none\" className=\"text-text-positive-weak relative\">\n <CalendarIcon size={12} className=\"absolute top-0.5 md:top-1\" />\n {!!createdAt && <DateDisplay showTime showHoliday date={createdAt} format=\"full\" className=\"ml-4 text-xs md:text-sm\" />}\n </Flex>\n </Flex>\n </header>\n)\n\nexport const DetailDialogMainGroup: React.FC<React.PropsWithChildren> = ({ children }) => (\n <Flex vertical gap=\"md\" padding=\"md\" width=\"full\">\n {children}\n </Flex>\n)\n\ntype DetailDialogMainGroupItemProps = {\n title?: string\n description?: string\n}\nexport const DetailDialogMainGroupItem: React.FC<React.PropsWithChildren<DetailDialogMainGroupItemProps>> = ({ title, description, children }) => (\n <Card className=\"w-full snap-start scroll-mt-4\">\n <CardHeader>\n <CardTitle>{title}</CardTitle>\n <CardDescription>{description}</CardDescription>\n </CardHeader>\n <CardContent>{children}</CardContent>\n </Card>\n)\n","import { DialogContent } from '@/components/ui/dialog'\nimport { cn } from '@/lib/utils'\n\nexport const DetailDialogWrapper: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <DialogContent\n className={cn(\n 'relative h-full overflow-hidden border-none p-0',\n 'rounded-none md:rounded-lg',\n 'max-h-svh max-w-svw',\n 'md:max-h-[90svh] md:max-w-[90svw]',\n 'xl:max-h-[90svh] xl:max-w-[90svw]',\n '2xl:max-h-[90svh] 2xl:max-w-7xl',\n )}\n onInteractOutside={(e) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n >\n {children}\n </DialogContent>\n )\n}\n","import { CatIcon } from 'lucide-react'\n\nimport { Flex } from '@/components/layouts/flex'\nimport { Dialog } from '@/components/ui/dialog'\n\nimport { DetailDialogHeader } from './component/header'\nimport { DetailDialogMain, DetailDialogMainHeader } from './component/main'\nimport {\n Sidebar,\n SidebarProvider,\n DetailDialogSidebarContent,\n DetailDialogSidebarFooter,\n DetailDialogSidebarGroup,\n DetailDialogSidebarHeader,\n DetailDialogSidebarMenu,\n DetailDialogSidebarMenuButton,\n DetailDialogSidebarMenuItem,\n} from './component/sidebar'\nimport { DetailDialogWrapper } from './component/wrapper'\n\nconst DetailDialogSidebar: React.FC<React.PropsWithChildren<{ title?: string; sidebarFooter?: React.ReactNode }>> = ({ title, sidebarFooter, children }) => {\n return (\n <Sidebar collapsible=\"icon\" className=\"shadow-nav z-20 hidden md:flex\">\n <DetailDialogSidebarHeader>\n <DetailDialogSidebarMenu>\n <DetailDialogSidebarMenuItem>\n <DetailDialogSidebarMenuButton size=\"lg\" tabIndex={-1}>\n <div className=\"bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg\">\n <CatIcon size={16} />\n </div>\n <div className=\"grid flex-1 text-left text-sm leading-tight\">\n <span className=\"truncate font-medium\">{title || 'Detail Dialog'}</span>\n <span className=\"truncate text-xs\">Lunas Enterprise</span>\n </div>\n </DetailDialogSidebarMenuButton>\n </DetailDialogSidebarMenuItem>\n </DetailDialogSidebarMenu>\n </DetailDialogSidebarHeader>\n <DetailDialogSidebarContent>\n <DetailDialogSidebarGroup>{children}</DetailDialogSidebarGroup>\n </DetailDialogSidebarContent>\n {sidebarFooter && <DetailDialogSidebarFooter>{sidebarFooter}</DetailDialogSidebarFooter>}\n </Sidebar>\n )\n}\n\ntype Props = {\n open?: boolean\n isLoading?: boolean\n sidebarTitle?: string\n sidebar?: React.ReactNode\n sidebarFooter?: React.ReactNode\n title: string\n createdAt: string | Date | number\n onOpenChange?: (open: boolean) => void | Promise<void>\n}\nexport const DetailDialog: React.FC<React.PropsWithChildren<Props>> = ({\n open,\n isLoading = false,\n sidebarTitle,\n sidebar,\n sidebarFooter,\n title,\n createdAt,\n onOpenChange,\n children,\n}) => {\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DetailDialogWrapper>\n <DetailDialogHeader />\n <SidebarProvider className=\"h-full min-h-[85svh] items-start\">\n <DetailDialogSidebar title={sidebarTitle} sidebarFooter={sidebarFooter} children={sidebar} />\n <DetailDialogMain>\n <DetailDialogMainHeader title={title} createdAt={createdAt} />\n {isLoading ? (\n <Flex justify=\"center\" className=\"bg-muted-muted w-full flex-1 inset-shadow-sm\">\n <div className=\"loader\" />\n </Flex>\n ) : (\n <section className=\"bg-muted-muted relative flex flex-1 snap-y flex-col gap-0 overflow-y-auto inset-shadow-sm\">{children}</section>\n )}\n </DetailDialogMain>\n </SidebarProvider>\n </DetailDialogWrapper>\n </Dialog>\n )\n}\n"],"mappings":"gqBAEa,OAET,EAAA,EAAA,MAACA,EAAAA,aAAAA,CAAa,UAAU,qBACtB,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAY,UAAU,aACvB,EAAA,EAAA,KAACC,EAAAA,kBAAAA,CAAkB,UAAU,eCGtBC,GAAuD,CAAE,eACpE,EAAA,EAAA,KAAC,OAAA,CAAK,YAAU,qBAAqB,UAAU,mCAC7C,EAAA,EAAA,KAACuB,EAAAA,KAAAA,CAAK,QAAQ,OAAO,IAAI,OAAO,SAAA,GAAS,MAAM,UAAU,UAAU,6BAChE,eASMrB,GAA0F,CAAE,QAAO,gBAC9G,EAAA,EAAA,MAAC,SAAA,CAAO,UAAU,4GAChB,EAAA,EAAA,KAACC,EAAAA,2BAAAA,KACD,EAAA,EAAA,MAACoB,EAAAA,KAAAA,CAAK,SAAA,GAAS,MAAM,QAAQ,QAAQ,OAAO,MAAM,OAAO,KAAM,GAAO,UAAU,oBAC9E,EAAA,EAAA,KAACnB,EAAAA,MAAAA,CAAM,MAAO,EAAG,UAAU,2CACxB,GAAS,mBAEZ,EAAA,EAAA,MAACmB,EAAAA,KAAAA,CAAK,QAAQ,OAAO,UAAU,8CAC7B,EAAA,EAAA,KAAClB,EAAAA,aAAAA,CAAa,KAAM,GAAI,UAAU,8BACjC,CAAC,CAAC,IAAa,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAY,SAAA,GAAS,YAAA,GAAY,KAAM,EAAW,OAAO,OAAO,UAAU,qCC3BtFC,GAA0D,CAAE,eAErE,EAAA,EAAA,KAACC,EAAAA,cAAAA,CACC,UAAWC,EAAAA,GACT,kDACA,6BACA,sBACA,oCACA,oCACA,mCAEF,kBAAoB,GAAM,CACxB,EAAE,iBACF,EAAE,mBAGH,aCCDC,GAA+G,CAAE,QAAO,gBAAe,eAEzI,EAAA,EAAA,MAACC,EAAAA,QAAAA,CAAQ,YAAY,OAAO,UAAU,4CACpC,EAAA,EAAA,KAACC,EAAAA,0BAAAA,CAAAA,UACC,EAAA,EAAA,KAACC,EAAAA,wBAAAA,CAAAA,UACC,EAAA,EAAA,KAACC,EAAAA,4BAAAA,CAAAA,UACC,EAAA,EAAA,MAACC,EAAAA,8BAAAA,CAA8B,KAAK,KAAK,SAAU,cACjD,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,gIACb,EAAA,EAAA,KAACC,EAAAA,QAAAA,CAAQ,KAAM,QAEjB,EAAA,EAAA,MAAC,MAAA,CAAI,UAAU,yDACb,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,gCAAwB,GAAS,mBACjD,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,4BAAmB,kCAM7C,EAAA,EAAA,KAACC,EAAAA,2BAAAA,CAAAA,UACC,EAAA,EAAA,KAACC,EAAAA,yBAAAA,CAA0B,eAE5B,IAAiB,EAAA,EAAA,KAACC,EAAAA,0BAAAA,CAAAA,SAA2B,OAevCC,GAA0D,CACrE,OACA,YAAY,GACZ,eACA,UACA,gBACA,QACA,YACA,eACA,eAGE,EAAA,EAAA,KAACC,EAAAA,OAAAA,CAAa,OAAoB,yBAChC,EAAA,EAAA,MAAC,EAAA,CAAA,SAAA,EACC,EAAA,EAAA,KAAC,EAAA,KACD,EAAA,EAAA,MAACC,EAAAA,gBAAAA,CAAgB,UAAU,8CACzB,EAAA,EAAA,KAAC,EAAA,CAAoB,MAAO,EAA6B,gBAAe,SAAU,KAClF,EAAA,EAAA,MAAC,EAAA,CAAA,SAAA,EACC,EAAA,EAAA,KAAC,EAAA,CAA8B,QAAkB,cAChD,GACC,EAAA,EAAA,KAACC,EAAAA,KAAAA,CAAK,QAAQ,SAAS,UAAU,yDAC/B,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,cAGjB,EAAA,EAAA,KAAC,UAAA,CAAQ,UAAU,4FAA6F"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as e}from"../../utils-D9AH0PUV.js";import"../../card-C17NWErE.js";import"../../button-Pscu7CVU.js";import{Dialog as t,DialogContent as n,DialogDescription as r,DialogHeader as i,DialogTitle as a}from"../../dialog-T1ItzQn7.js";import
|
|
1
|
+
import{cn as e}from"../../utils-D9AH0PUV.js";import"../../card-C17NWErE.js";import"../../button-Pscu7CVU.js";import{Dialog as t,DialogContent as n,DialogDescription as r,DialogHeader as i,DialogTitle as a}from"../../dialog-T1ItzQn7.js";import{Flex as o}from"../../flex-CvokpUf1.js";import{DateDisplay as s}from"../../date-CztL0aWp.js";import"../../tooltip-C9Ex69RQ.js";import"../../input-DgJVc3kt.js";import{Title as c}from"../../title-CxIwADiB.js";import"../../separator-aLdI4FQe.js";import"../../sheet-DqPtcv9H.js";import"../../skeleton-BSi1n1L2.js";import"../../use-mobile-CNVZwItd.js";import{DetailDialogSidebarContent as l,DetailDialogSidebarFooter as u,DetailDialogSidebarGroup as d,DetailDialogSidebarHeader as f,DetailDialogSidebarMenu as p,DetailDialogSidebarMenuButton as m,DetailDialogSidebarMenuItem as h,DetailDialogSidebarTrigger as g,Sidebar as _,SidebarProvider as v}from"../../sidebar-BiG4ZcRy.js";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{CalendarIcon as x,CatIcon as S}from"lucide-react";const C=()=>b(i,{className:`sr-only`,children:[y(a,{className:`sr-only`}),y(r,{className:`sr-only`})]}),w=({children:e})=>y(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:y(o,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:e})}),T=({title:e,createdAt:t})=>b(`header`,{className:`bg-card border-border-weak flex w-full flex-0 items-start gap-x-2.5 border-b py-2.5 pr-12 pl-2`,children:[y(g,{}),b(o,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1`,children:[y(c,{level:5,className:`line-clamp-1 truncate text-wrap`,children:e||`Detail Dialog`}),b(o,{padding:`none`,className:`text-text-positive-weak relative`,children:[y(x,{size:12,className:`absolute top-0.5 md:top-1`}),!!t&&y(s,{showTime:!0,showHoliday:!0,date:t,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),E=({children:t})=>y(n,{className:e(`relative h-full overflow-hidden border-none p-0`,`rounded-none md:rounded-lg`,`max-h-svh max-w-svw`,`md:max-h-[90svh] md:max-w-[90svw]`,`xl:max-h-[90svh] xl:max-w-[90svw]`,`2xl:max-h-[90svh] 2xl:max-w-7xl`),onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:t}),D=({title:e,sidebarFooter:t,children:n})=>b(_,{collapsible:`icon`,className:`shadow-nav z-20 hidden md:flex`,children:[y(f,{children:y(p,{children:y(h,{children:b(m,{size:`lg`,tabIndex:-1,children:[y(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg`,children:y(S,{size:16})}),b(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[y(`span`,{className:`truncate font-medium`,children:e||`Detail Dialog`}),y(`span`,{className:`truncate text-xs`,children:`Lunas Enterprise`})]})]})})})}),y(l,{children:y(d,{children:n})}),t&&y(u,{children:t})]}),O=({open:e,isLoading:n=!1,sidebarTitle:r,sidebar:i,sidebarFooter:a,title:s,createdAt:c,onOpenChange:l,children:u})=>y(t,{open:e,onOpenChange:l,children:b(E,{children:[y(C,{}),b(v,{className:`h-full min-h-[85svh] items-start`,children:[y(D,{title:r,sidebarFooter:a,children:i}),b(w,{children:[y(T,{title:s,createdAt:c}),n?y(o,{justify:`center`,className:`bg-muted-muted w-full flex-1 inset-shadow-sm`,children:y(`div`,{className:`loader`})}):y(`section`,{className:`bg-muted-muted relative flex flex-1 snap-y flex-col gap-0 overflow-y-auto inset-shadow-sm`,children:u})]})]})]})});export{O as DetailDialog};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
2
2
|
import { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/dialogs/form-dialog.d.ts
|
|
@@ -30,7 +30,7 @@ declare const FormDialog: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
30
30
|
onError,
|
|
31
31
|
onReset,
|
|
32
32
|
children
|
|
33
|
-
}: React.PropsWithChildren<Props<TFieldValues>>) =>
|
|
33
|
+
}: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime4.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { FormDialog };
|
|
36
36
|
//# sourceMappingURL=form-dialog.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
2
2
|
import { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/dialogs/form-dialog.d.ts
|
|
@@ -30,7 +30,7 @@ declare const FormDialog: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
30
30
|
onError,
|
|
31
31
|
onReset,
|
|
32
32
|
children
|
|
33
|
-
}: React.PropsWithChildren<Props<TFieldValues>>) =>
|
|
33
|
+
}: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime4.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { FormDialog };
|
|
36
36
|
//# sourceMappingURL=form-dialog.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{cn as e}from"./utils-D9AH0PUV.js";import t from"react";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r([`relative flex`,`text-sm`],{variants:{vertical:{true:`flex-col`,false:`flex-row`},width:{full:`w-full`,auto:`w-auto`,fit:`w-fit`,screen:`w-screen`,min:`w-min`,max:`w-max`,null:``},wrap:{true:`flex-wrap`,false:`flex-nowrap`},margin:{sm:`m-2`,md:`m-4`,lg:`m-6`,xl:`m-8`,none:`m-0`},padding:{sm:`p-2`,md:`p-4`,lg:`p-6`,xl:`p-8`,none:`p-0`},gap:{xs:`gap-1`,sm:`gap-2`,md:`gap-4`,lg:`gap-6`,xl:`gap-8`,none:`gap-0`},justify:{start:`justify-start`,center:`justify-center`,end:`justify-end`,between:`justify-between`,around:`justify-around`,evenly:`justify-evenly`,stretch:`justify-stretch`},align:{start:`items-start`,center:`items-center`,end:`items-end`,baseline:`items-baseline`,stretch:`items-stretch`}},defaultVariants:{vertical:!1,wrap:!0,width:`fit`,margin:`none`,padding:`sm`,gap:`xs`,justify:`start`,align:`center`}}),a=({vertical:t,wrap:r,width:a,margin:o,padding:s,gap:c,justify:l,align:u,className:d,children:f})=>n(`div`,{className:e(i({vertical:t,width:a,wrap:r,margin:o,padding:s,gap:c,justify:l,align:u,className:d})),children:f});export{a as Flex};
|
|
2
|
-
//# sourceMappingURL=flex-
|
|
2
|
+
//# sourceMappingURL=flex-CvokpUf1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flex-
|
|
1
|
+
{"version":3,"file":"flex-CvokpUf1.js","names":[],"sources":["../packages/components/layouts/flex.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@/lib/utils'\n\nconst flexVariants = cva(['relative flex', 'text-sm'], {\n variants: {\n vertical: {\n true: 'flex-col',\n false: 'flex-row',\n },\n width: {\n full: 'w-full',\n auto: 'w-auto',\n fit: 'w-fit',\n screen: 'w-screen',\n min: 'w-min',\n max: 'w-max',\n null: '',\n },\n wrap: {\n true: 'flex-wrap',\n false: 'flex-nowrap',\n },\n margin: {\n sm: 'm-2',\n md: 'm-4',\n lg: 'm-6',\n xl: 'm-8',\n none: 'm-0',\n },\n padding: {\n sm: 'p-2',\n md: 'p-4',\n lg: 'p-6',\n xl: 'p-8',\n none: 'p-0',\n },\n gap: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-4',\n lg: 'gap-6',\n xl: 'gap-8',\n none: 'gap-0',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n stretch: 'justify-stretch',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n baseline: 'items-baseline',\n stretch: 'items-stretch',\n },\n },\n defaultVariants: {\n vertical: false,\n wrap: true,\n width: 'fit',\n margin: 'none',\n padding: 'sm',\n gap: 'xs',\n justify: 'start',\n align: 'center',\n },\n})\n\ntype Props = {\n className?: string\n} & VariantProps<typeof flexVariants>\nexport const Flex = ({ vertical, wrap, width, margin, padding, gap, justify, align, className, children }: React.PropsWithChildren<Props>) => {\n return (\n <div\n className={cn(\n flexVariants({\n vertical,\n width,\n wrap,\n margin,\n padding,\n gap,\n justify,\n align,\n className,\n }),\n )}\n >\n {children}\n </div>\n )\n}\n"],"mappings":"qJAMA,MAAM,EAAe,EAAI,CAAC,gBAAiB,WAAY,CACrD,SAAU,CACR,SAAU,CACR,KAAM,WACN,MAAO,YAET,MAAO,CACL,KAAM,SACN,KAAM,SACN,IAAK,QACL,OAAQ,WACR,IAAK,QACL,IAAK,QACL,KAAM,IAER,KAAM,CACJ,KAAM,YACN,MAAO,eAET,OAAQ,CACN,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,KAAM,OAER,QAAS,CACP,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,KAAM,OAER,IAAK,CACH,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,KAAM,SAER,QAAS,CACP,MAAO,gBACP,OAAQ,iBACR,IAAK,cACL,QAAS,kBACT,OAAQ,iBACR,OAAQ,iBACR,QAAS,mBAEX,MAAO,CACL,MAAO,cACP,OAAQ,eACR,IAAK,YACL,SAAU,iBACV,QAAS,kBAGb,gBAAiB,CACf,SAAU,GACV,KAAM,GACN,MAAO,MACP,OAAQ,OACR,QAAS,KACT,IAAK,KACL,QAAS,QACT,MAAO,YAOE,GAAQ,CAAE,WAAU,OAAM,QAAO,SAAQ,UAAS,MAAK,UAAS,QAAO,YAAW,cAE3F,EAAC,MAAA,CACC,UAAW,EACT,EAAa,CACX,WACA,QACA,OACA,SACA,UACA,MACA,UACA,QACA,eAIH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const e=require(`./chunk-CUT6urMc.cjs`),t=require(`./utils-BsjVK5EW.cjs`),n=e.__toESM(require(`react`)),r=e.__toESM(require(`react/jsx-runtime`)),i=e.__toESM(require(`class-variance-authority`)),a=(0,i.cva)([`relative flex`,`text-sm`],{variants:{vertical:{true:`flex-col`,false:`flex-row`},width:{full:`w-full`,auto:`w-auto`,fit:`w-fit`,screen:`w-screen`,min:`w-min`,max:`w-max`,null:``},wrap:{true:`flex-wrap`,false:`flex-nowrap`},margin:{sm:`m-2`,md:`m-4`,lg:`m-6`,xl:`m-8`,none:`m-0`},padding:{sm:`p-2`,md:`p-4`,lg:`p-6`,xl:`p-8`,none:`p-0`},gap:{xs:`gap-1`,sm:`gap-2`,md:`gap-4`,lg:`gap-6`,xl:`gap-8`,none:`gap-0`},justify:{start:`justify-start`,center:`justify-center`,end:`justify-end`,between:`justify-between`,around:`justify-around`,evenly:`justify-evenly`,stretch:`justify-stretch`},align:{start:`items-start`,center:`items-center`,end:`items-end`,baseline:`items-baseline`,stretch:`items-stretch`}},defaultVariants:{vertical:!1,wrap:!0,width:`fit`,margin:`none`,padding:`sm`,gap:`xs`,justify:`start`,align:`center`}}),o=({vertical:e,wrap:n,width:i,margin:o,padding:s,gap:c,justify:l,align:u,className:d,children:f})=>(0,r.jsx)(`div`,{className:t.cn(a({vertical:e,width:i,wrap:n,margin:o,padding:s,gap:c,justify:l,align:u,className:d})),children:f});Object.defineProperty(exports,`Flex`,{enumerable:!0,get:function(){return o}});
|
|
2
|
-
//# sourceMappingURL=flex-
|
|
2
|
+
//# sourceMappingURL=flex-DjACH4wX.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flex-
|
|
1
|
+
{"version":3,"file":"flex-DjACH4wX.cjs","names":["cn"],"sources":["../packages/components/layouts/flex.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@/lib/utils'\n\nconst flexVariants = cva(['relative flex', 'text-sm'], {\n variants: {\n vertical: {\n true: 'flex-col',\n false: 'flex-row',\n },\n width: {\n full: 'w-full',\n auto: 'w-auto',\n fit: 'w-fit',\n screen: 'w-screen',\n min: 'w-min',\n max: 'w-max',\n null: '',\n },\n wrap: {\n true: 'flex-wrap',\n false: 'flex-nowrap',\n },\n margin: {\n sm: 'm-2',\n md: 'm-4',\n lg: 'm-6',\n xl: 'm-8',\n none: 'm-0',\n },\n padding: {\n sm: 'p-2',\n md: 'p-4',\n lg: 'p-6',\n xl: 'p-8',\n none: 'p-0',\n },\n gap: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-4',\n lg: 'gap-6',\n xl: 'gap-8',\n none: 'gap-0',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n stretch: 'justify-stretch',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n baseline: 'items-baseline',\n stretch: 'items-stretch',\n },\n },\n defaultVariants: {\n vertical: false,\n wrap: true,\n width: 'fit',\n margin: 'none',\n padding: 'sm',\n gap: 'xs',\n justify: 'start',\n align: 'center',\n },\n})\n\ntype Props = {\n className?: string\n} & VariantProps<typeof flexVariants>\nexport const Flex = ({ vertical, wrap, width, margin, padding, gap, justify, align, className, children }: React.PropsWithChildren<Props>) => {\n return (\n <div\n className={cn(\n flexVariants({\n vertical,\n width,\n wrap,\n margin,\n padding,\n gap,\n justify,\n align,\n className,\n }),\n )}\n >\n {children}\n </div>\n )\n}\n"],"mappings":"mMAMM,GAAA,EAAA,EAAA,KAAmB,CAAC,gBAAiB,WAAY,CACrD,SAAU,CACR,SAAU,CACR,KAAM,WACN,MAAO,YAET,MAAO,CACL,KAAM,SACN,KAAM,SACN,IAAK,QACL,OAAQ,WACR,IAAK,QACL,IAAK,QACL,KAAM,IAER,KAAM,CACJ,KAAM,YACN,MAAO,eAET,OAAQ,CACN,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,KAAM,OAER,QAAS,CACP,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,KAAM,OAER,IAAK,CACH,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,KAAM,SAER,QAAS,CACP,MAAO,gBACP,OAAQ,iBACR,IAAK,cACL,QAAS,kBACT,OAAQ,iBACR,OAAQ,iBACR,QAAS,mBAEX,MAAO,CACL,MAAO,cACP,OAAQ,eACR,IAAK,YACL,SAAU,iBACV,QAAS,kBAGb,gBAAiB,CACf,SAAU,GACV,KAAM,GACN,MAAO,MACP,OAAQ,OACR,QAAS,KACT,IAAK,KACL,QAAS,QACT,MAAO,YAOE,GAAQ,CAAE,WAAU,OAAM,QAAO,SAAQ,UAAS,MAAK,UAAS,QAAO,YAAW,eAE3F,EAAA,EAAA,KAAC,MAAA,CACC,UAAWA,EAAAA,GACT,EAAa,CACX,WACA,QACA,OACA,SACA,UACA,MACA,UACA,QACA,eAIH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`),n=require(`../button-Db_CKSZw.cjs`);require(`../label-CW94D639.cjs`);const r=require(`../form-C7n0ESic.cjs`);require(`../dialog-yB7g_7Wi.cjs`);const i=require(`../command-
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`),n=require(`../button-Db_CKSZw.cjs`);require(`../label-CW94D639.cjs`);const r=require(`../form-C7n0ESic.cjs`);require(`../dialog-yB7g_7Wi.cjs`);const i=require(`../command-DL8-AZm7.cjs`),a=require(`../popover-DCcPvdz2.cjs`),o=e.__toESM(require(`react`)),s=e.__toESM(require(`react/jsx-runtime`)),c=e.__toESM(require(`lucide-react`)),l=({name:e,label:l=`Combobox`,placeholder:u=`Chọn một mục`,description:d,options:f,onAddNewItem:p})=>(0,s.jsx)(r.FormField,{name:e,render:({field:e})=>(0,s.jsxs)(r.FormItem,{className:`w-full`,children:[(0,s.jsx)(r.FormLabel,{children:l}),(0,s.jsxs)(a.Popover,{modal:!0,children:[(0,s.jsx)(a.PopoverTrigger,{asChild:!0,children:(0,s.jsx)(r.FormControl,{children:(0,s.jsxs)(n.Button,{type:`button`,variant:`outline`,role:`combobox`,color:`muted`,className:t.cn(`shadow-input flex justify-between rounded-md px-3`,`outline-border-weak font-normal`,`[&_div]:w-full`,`[&_div]:justify-between`,`hover:outline-border`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-primary-weak`,`data-[state=open]:ring-4`,`focus:border-primary-strong`,`focus:ring-4`,`focus:ring-primary-weak`,`focus:outline-1`,`focus:outline-primary-strong`),children:[e.value?(0,s.jsx)(`span`,{className:`flex min-w-0 items-center gap-2`,children:f?.find(({value:t})=>t===e.value)?.label}):(0,s.jsx)(`span`,{className:`text-text-positive-muted`,children:u}),(0,s.jsx)(c.ChevronDownIcon,{size:16,className:`text-text-positive-weak shrink-0`,"aria-hidden":`true`})]})})}),(0,s.jsx)(a.PopoverContent,{className:`w-[var(--radix-popover-trigger-width)] p-0`,children:(0,s.jsxs)(i.Command,{className:`border-none`,children:[(0,s.jsx)(i.CommandInput,{placeholder:u??`Tìm kiếm`}),(0,s.jsxs)(i.CommandList,{children:[(0,s.jsx)(i.CommandGroup,{className:`max-h-40 overflow-y-auto`,children:f?.map(({value:t,label:n})=>(0,s.jsx)(i.CommandItem,{value:n,onSelect:()=>e.onChange(t),children:n},t))}),p&&(0,s.jsxs)(o.default.Fragment,{children:[(0,s.jsx)(i.CommandSeparator,{}),(0,s.jsx)(i.CommandGroup,{children:(0,s.jsxs)(n.Button,{type:`button`,variant:`ghost`,className:`w-full justify-start font-normal`,children:[(0,s.jsx)(c.PlusIcon,{size:14,className:`-ms-2 opacity-60`,"aria-hidden":`true`}),`Thêm mới`]})})]})]}),(0,s.jsx)(i.CommandEmpty,{children:`Không có kết quả`})]})})]}),!!d&&(0,s.jsx)(r.FormDescription,{children:d})]})});exports.ComboboxField=l;
|
|
2
2
|
//# sourceMappingURL=combobox-field.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/combobox-field.d.ts
|
|
@@ -22,7 +22,7 @@ declare const ComboboxField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
22
22
|
description,
|
|
23
23
|
options,
|
|
24
24
|
onAddNewItem
|
|
25
|
-
}: Props<TFieldValues>) =>
|
|
25
|
+
}: Props<TFieldValues>) => react_jsx_runtime7.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { ComboboxField };
|
|
28
28
|
//# sourceMappingURL=combobox-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/combobox-field.d.ts
|
|
@@ -22,7 +22,7 @@ declare const ComboboxField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
22
22
|
description,
|
|
23
23
|
options,
|
|
24
24
|
onAddNewItem
|
|
25
|
-
}: Props<TFieldValues>) =>
|
|
25
|
+
}: Props<TFieldValues>) => react_jsx_runtime0.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { ComboboxField };
|
|
28
28
|
//# sourceMappingURL=combobox-field.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{cn as e}from"../utils-D9AH0PUV.js";import{Button as t}from"../button-Pscu7CVU.js";import"../label-DuddAB1p.js";import{FormControl as n,FormDescription as r,FormField as i,FormItem as a,FormLabel as o}from"../form-D5BmOjlU.js";import"../dialog-T1ItzQn7.js";import{Command as s,CommandEmpty as c,CommandGroup as l,CommandInput as u,CommandItem as d,CommandList as f,CommandSeparator as p}from"../command-
|
|
1
|
+
"use client";import{cn as e}from"../utils-D9AH0PUV.js";import{Button as t}from"../button-Pscu7CVU.js";import"../label-DuddAB1p.js";import{FormControl as n,FormDescription as r,FormField as i,FormItem as a,FormLabel as o}from"../form-D5BmOjlU.js";import"../dialog-T1ItzQn7.js";import{Command as s,CommandEmpty as c,CommandGroup as l,CommandInput as u,CommandItem as d,CommandList as f,CommandSeparator as p}from"../command-CxB1jizd.js";import{Popover as m,PopoverContent as h,PopoverTrigger as g}from"../popover-CTFp7ZXi.js";import _ from"react";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{ChevronDownIcon as b,PlusIcon as x}from"lucide-react";const S=({name:S,label:C=`Combobox`,placeholder:w=`Chọn một mục`,description:T,options:E,onAddNewItem:D})=>v(i,{name:S,render:({field:i})=>y(a,{className:`w-full`,children:[v(o,{children:C}),y(m,{modal:!0,children:[v(g,{asChild:!0,children:v(n,{children:y(t,{type:`button`,variant:`outline`,role:`combobox`,color:`muted`,className:e(`shadow-input flex justify-between rounded-md px-3`,`outline-border-weak font-normal`,`[&_div]:w-full`,`[&_div]:justify-between`,`hover:outline-border`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-primary-weak`,`data-[state=open]:ring-4`,`focus:border-primary-strong`,`focus:ring-4`,`focus:ring-primary-weak`,`focus:outline-1`,`focus:outline-primary-strong`),children:[i.value?v(`span`,{className:`flex min-w-0 items-center gap-2`,children:E?.find(({value:e})=>e===i.value)?.label}):v(`span`,{className:`text-text-positive-muted`,children:w}),v(b,{size:16,className:`text-text-positive-weak shrink-0`,"aria-hidden":`true`})]})})}),v(h,{className:`w-[var(--radix-popover-trigger-width)] p-0`,children:y(s,{className:`border-none`,children:[v(u,{placeholder:w??`Tìm kiếm`}),y(f,{children:[v(l,{className:`max-h-40 overflow-y-auto`,children:E?.map(({value:e,label:t})=>v(d,{value:t,onSelect:()=>i.onChange(e),children:t},e))}),D&&y(_.Fragment,{children:[v(p,{}),v(l,{children:y(t,{type:`button`,variant:`ghost`,className:`w-full justify-start font-normal`,children:[v(x,{size:14,className:`-ms-2 opacity-60`,"aria-hidden":`true`}),`Thêm mới`]})})]})]}),v(c,{children:`Không có kết quả`})]})})]}),!!T&&v(r,{children:T})]})});export{S as ComboboxField};
|
|
2
2
|
//# sourceMappingURL=combobox-field.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`),n=require(`../button-Db_CKSZw.cjs`);require(`../label-CW94D639.cjs`);const r=require(`../form-C7n0ESic.cjs`),i=require(`../popover-
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`),n=require(`../button-Db_CKSZw.cjs`);require(`../label-CW94D639.cjs`);const r=require(`../form-C7n0ESic.cjs`),i=require(`../popover-DCcPvdz2.cjs`),a=require(`../calendar-CnhHBLl8.cjs`),o=e.__toESM(require(`react/jsx-runtime`)),s=e.__toESM(require(`lucide-react`)),c=e.__toESM(require(`date-fns`)),l=({name:e,label:l=`Date Field`,placeholder:u=`Select a date`,description:d=``,isShowErrorMsg:f=!1})=>(0,o.jsx)(r.FormField,{name:e,render:({field:e})=>(0,o.jsxs)(r.FormItem,{className:`w-full`,children:[(0,o.jsx)(r.FormLabel,{children:l}),(0,o.jsxs)(i.Popover,{modal:!0,children:[(0,o.jsx)(i.PopoverTrigger,{asChild:!0,children:(0,o.jsx)(r.FormControl,{children:(0,o.jsxs)(n.Button,{variant:`outline`,color:`muted`,className:t.cn(`w-full pl-3 text-left font-normal`,`outline-border-weak font-normal`,`hover:outline-border`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-primary-weak`,`data-[state=open]:ring-4`,`focus:border-primary-strong`,`focus:ring-4`,`focus:ring-primary-weak`,`focus:outline-1`,`focus:outline-primary-strong`,!e.value&&`text-text-positive-muted`),children:[e.value?(0,c.format)(e.value,`PPP`):(0,o.jsxs)(`span`,{children:[` `,u||`Pick a date`]}),(0,o.jsx)(s.CalendarIcon,{className:`text-text-positive-weak ml-auto size-4`})]})})}),(0,o.jsx)(i.PopoverContent,{className:`w-auto p-0`,align:`start`,children:(0,o.jsx)(a.Calendar,{mode:`single`,selected:e.value,onSelect:t=>{e.onChange(t?.toISOString())},captionLayout:`dropdown`,disabled:e=>e<new Date(`2022-01-01`)})})]}),!!d&&(0,o.jsx)(r.FormDescription,{children:d}),f&&(0,o.jsx)(r.FormMessage,{})]})});exports.DateField=l;
|
|
2
2
|
//# sourceMappingURL=date-field.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/date-field.d.ts
|
|
@@ -16,7 +16,7 @@ declare const DateField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
16
16
|
placeholder,
|
|
17
17
|
description,
|
|
18
18
|
isShowErrorMsg
|
|
19
|
-
}: Props<TFieldValues>) =>
|
|
19
|
+
}: Props<TFieldValues>) => react_jsx_runtime5.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { DateField };
|
|
22
22
|
//# sourceMappingURL=date-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/date-field.d.ts
|
|
@@ -16,7 +16,7 @@ declare const DateField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
16
16
|
placeholder,
|
|
17
17
|
description,
|
|
18
18
|
isShowErrorMsg
|
|
19
|
-
}: Props<TFieldValues>) =>
|
|
19
|
+
}: Props<TFieldValues>) => react_jsx_runtime10.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { DateField };
|
|
22
22
|
//# sourceMappingURL=date-field.d.ts.map
|
package/dist/forms/date-field.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{cn as e}from"../utils-D9AH0PUV.js";import{Button as t}from"../button-Pscu7CVU.js";import"../label-DuddAB1p.js";import{FormControl as n,FormDescription as r,FormField as i,FormItem as a,FormLabel as o,FormMessage as s}from"../form-D5BmOjlU.js";import{Popover as c,PopoverContent as l,PopoverTrigger as u}from"../popover-
|
|
1
|
+
"use client";import{cn as e}from"../utils-D9AH0PUV.js";import{Button as t}from"../button-Pscu7CVU.js";import"../label-DuddAB1p.js";import{FormControl as n,FormDescription as r,FormField as i,FormItem as a,FormLabel as o,FormMessage as s}from"../form-D5BmOjlU.js";import{Popover as c,PopoverContent as l,PopoverTrigger as u}from"../popover-CTFp7ZXi.js";import{Calendar as d}from"../calendar-DlLKQCdQ.js";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{CalendarIcon as m}from"lucide-react";import{format as h}from"date-fns";const g=({name:g,label:_=`Date Field`,placeholder:v=`Select a date`,description:y=``,isShowErrorMsg:b=!1})=>f(i,{name:g,render:({field:i})=>p(a,{className:`w-full`,children:[f(o,{children:_}),p(c,{modal:!0,children:[f(u,{asChild:!0,children:f(n,{children:p(t,{variant:`outline`,color:`muted`,className:e(`w-full pl-3 text-left font-normal`,`outline-border-weak font-normal`,`hover:outline-border`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-primary-weak`,`data-[state=open]:ring-4`,`focus:border-primary-strong`,`focus:ring-4`,`focus:ring-primary-weak`,`focus:outline-1`,`focus:outline-primary-strong`,!i.value&&`text-text-positive-muted`),children:[i.value?h(i.value,`PPP`):p(`span`,{children:[` `,v||`Pick a date`]}),f(m,{className:`text-text-positive-weak ml-auto size-4`})]})})}),f(l,{className:`w-auto p-0`,align:`start`,children:f(d,{mode:`single`,selected:i.value,onSelect:e=>{i.onChange(e?.toISOString())},captionLayout:`dropdown`,disabled:e=>e<new Date(`2022-01-01`)})})]}),!!y&&f(r,{children:y}),b&&f(s,{})]})});export{g as DateField};
|
|
2
2
|
//# sourceMappingURL=date-field.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from "react-hook-form";
|
|
4
4
|
|
|
@@ -19,7 +19,7 @@ declare const FormWrapper: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
19
19
|
onError,
|
|
20
20
|
onSubcribe,
|
|
21
21
|
children
|
|
22
|
-
}: React.PropsWithChildren<Props<TFieldValues>>) =>
|
|
22
|
+
}: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime2.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { FormWrapper };
|
|
25
25
|
//# sourceMappingURL=form-wrapper.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
3
3
|
import { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from "react-hook-form";
|
|
4
4
|
|
|
5
5
|
//#region packages/components/forms/form-wrapper.d.ts
|
|
@@ -19,7 +19,7 @@ declare const FormWrapper: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
19
19
|
onError,
|
|
20
20
|
onSubcribe,
|
|
21
21
|
children
|
|
22
|
-
}: React.PropsWithChildren<Props<TFieldValues>>) =>
|
|
22
|
+
}: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime3.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { FormWrapper };
|
|
25
25
|
//# sourceMappingURL=form-wrapper.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../utils-BsjVK5EW.cjs`),require(`../button-Db_CKSZw.cjs`),require(`../label-CW94D639.cjs`);const t=require(`../form-C7n0ESic.cjs`);require(`../dialog-yB7g_7Wi.cjs`),require(`../command-
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../utils-BsjVK5EW.cjs`),require(`../button-Db_CKSZw.cjs`),require(`../label-CW94D639.cjs`);const t=require(`../form-C7n0ESic.cjs`);require(`../dialog-yB7g_7Wi.cjs`),require(`../command-DL8-AZm7.cjs`);const n=require(`../multi-select-BuhAcysb.cjs`),r=e.__toESM(require(`react/jsx-runtime`)),i=({name:e,label:i=`Multi Select Field`,isShowLabel:a=!0,isShowErrorMsg:o,placeholder:s=`Select options`,description:c=``,options:l=[],onAdd:u})=>(0,r.jsx)(t.FormField,{name:e,render:({field:{value:e,onChange:d}})=>{let f=l.filter(t=>e?.includes(t.value)),p=e=>{let t=e.map(e=>e.value);d(t)};return(0,r.jsxs)(t.FormItem,{className:`w-full gap-0`,children:[a&&(0,r.jsx)(t.FormLabel,{children:i}),(0,r.jsx)(t.FormControl,{children:(0,r.jsx)(n.MultipleSelector,{placeholder:s,emptyIndicator:`No options available`,value:f,options:l,onChange:p,onAddNewItem:u})}),!!c&&(0,r.jsx)(t.FormDescription,{children:c}),o&&(0,r.jsx)(t.FormMessage,{})]})}});exports.MultiSelectField=i;
|
|
2
2
|
//# sourceMappingURL=multi-select-field.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime233 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/multi-select-field.d.ts
|
|
@@ -24,7 +24,7 @@ declare const MultiSelectField: <TFieldValues extends FieldValues = FieldValues>
|
|
|
24
24
|
description,
|
|
25
25
|
options,
|
|
26
26
|
onAdd
|
|
27
|
-
}: Props<TFieldValues>) =>
|
|
27
|
+
}: Props<TFieldValues>) => react_jsx_runtime233.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { MultiSelectField };
|
|
30
30
|
//# sourceMappingURL=multi-select-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/multi-select-field.d.ts
|
|
@@ -24,7 +24,7 @@ declare const MultiSelectField: <TFieldValues extends FieldValues = FieldValues>
|
|
|
24
24
|
description,
|
|
25
25
|
options,
|
|
26
26
|
onAdd
|
|
27
|
-
}: Props<TFieldValues>) =>
|
|
27
|
+
}: Props<TFieldValues>) => react_jsx_runtime8.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { MultiSelectField };
|
|
30
30
|
//# sourceMappingURL=multi-select-field.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import"../utils-D9AH0PUV.js";import"../button-Pscu7CVU.js";import"../label-DuddAB1p.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-D5BmOjlU.js";import"../dialog-T1ItzQn7.js";import"../command-
|
|
1
|
+
"use client";import"../utils-D9AH0PUV.js";import"../button-Pscu7CVU.js";import"../label-DuddAB1p.js";import{FormControl as e,FormDescription as t,FormField as n,FormItem as r,FormLabel as i,FormMessage as a}from"../form-D5BmOjlU.js";import"../dialog-T1ItzQn7.js";import"../command-CxB1jizd.js";import{MultipleSelector as o}from"../multi-select-LJzXqVC-.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=({name:l,label:u=`Multi Select Field`,isShowLabel:d=!0,isShowErrorMsg:f,placeholder:p=`Select options`,description:m=``,options:h=[],onAdd:g})=>s(n,{name:l,render:({field:{value:n,onChange:l}})=>{let _=h.filter(e=>n?.includes(e.value)),v=e=>{let t=e.map(e=>e.value);l(t)};return c(r,{className:`w-full gap-0`,children:[d&&s(i,{children:u}),s(e,{children:s(o,{placeholder:p,emptyIndicator:`No options available`,value:_,options:h,onChange:v,onAddNewItem:g})}),!!m&&s(t,{children:m}),f&&s(a,{})]})}});export{l as MultiSelectField};
|
|
2
2
|
//# sourceMappingURL=multi-select-field.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`);require(`../label-CW94D639.cjs`);const n=require(`../form-C7n0ESic.cjs`),r=require(`../input-
|
|
1
|
+
const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`);require(`../label-CW94D639.cjs`);const n=require(`../form-C7n0ESic.cjs`),r=require(`../input-C2xQcVZP.cjs`),i=e.__toESM(require(`react`)),a=e.__toESM(require(`react/jsx-runtime`)),o=e.__toESM(require(`react-hook-form`)),s=e=>e?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/,c=e=>Number(e).toLocaleString(),l=({disabled:e=!1,readonly:n=!1,allowNegative:o=!1,numberAfterDecimalPoint:l=2,roundingRule:u=`none`,value:d=``,unitText:f,decimal:p,placeholder:m,precision:h,onChange:g,onValueChange:_,onBlur:v,...y})=>{let b=i.default.useRef(null),x=i.default.useRef(null),[S,C]=i.default.useState(d.toString()),w=p?.[1]??l,T=p&&p[0]-p[1],E=i.default.useMemo(()=>s(o),[o]),D=i.default.useCallback(e=>{if(!w&&e.includes(`.`))return!1;let t=e.split(`.`)[1];return!t||t.length<=w},[w]),O=i.default.useCallback(e=>{if(!p||e===`-`)return!0;let[t,n=``]=e.split(`.`);return n.length<=p[1]&&(t.startsWith(`-`)?t.length-1:t.length)<=T},[p,T]),k=i.default.useCallback((e,t)=>{if(u===`none`)return e;let n=Math.pow(10,t),r=e*n;switch(u){case`up`:return Math.ceil(r)/n;case`down`:return Math.floor(r)/n;case`nearest`:return r%1<.1?Math.floor(r)/n:r%1>=.59?Math.ceil(r)/n:(Math.floor(r)+.5)/n;default:return e}},[u]),A=i.default.useCallback(e=>!l&&e.includes(`.`)||e.split(`.`)[1]?.length>l,[l]),j=i.default.useCallback(e=>{if(e===`0`)return`0`;if(!Number(e))return``;let t=parseFloat(e),n=Math.min(w-1,h||0),r=k(t,n).toString(),[i,a=``]=r.split(`.`),o=c(i);return a?`${o}.${a}`:o},[k,w,h]),M=i.default.useCallback(e=>{if(!p||e===`-`)return!0;let[t,n=``]=e.split(`.`),r=t.startsWith(`-`)?t.length-1:t.length,i=p[0]-p[1];return n.length<=p[1]&&r<=i},[p]),N=i.default.useCallback(e=>{g?.(e);let{value:t}=e.target;if(!t){_?.(void 0),C(``);return}let n=t===`0`,r=t===`-`&&o;if(n||r){_?.(0),C(t);return}let i=E.test(t)&&O(t)&&(p||D(t));if(!i)return;let a=parseFloat(t)||0;_?.(a),C(t)},[o,p,D,O,g,_,E]),P=i.default.useCallback(()=>{n||C(e=>e.replace(/,/g,``))},[n]),F=i.default.useCallback(()=>{n||(v?.(),C(e=>j(e)))},[n,v,j]);return i.default.useEffect(()=>{let e=document.activeElement===x.current;if(!d||!E.test(d.toString())||!M(d.toString())||!p&&A(d.toString())){C(``);return}C(t=>t===`-`?`-`:t?e?d.toString():j(d.toString()):``)},[p,j,d,A,M,E]),i.default.useEffect(()=>{if(!b.current||!x.current||!f)return;let e=b.current.offsetWidth;x.current.style.setProperty(`padding-right`,`${(e+10)/16}rem`)},[e,f]),(0,a.jsxs)(`div`,{className:`relative`,children:[(0,a.jsx)(r.Input,{...y,ref:x,value:S||(n?`0`:``),placeholder:m,disabled:e,readOnly:n,className:t.cn(`font-number text-end`,n&&`bg-muted text-muted-foreground`),onChange:N,onFocus:P,onBlur:F}),f&&(0,a.jsx)(`span`,{ref:b,className:`text-muted-foreground pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 text-sm`,children:f})]})},u=({name:e,label:t=`Number Field`,placeholder:r=`0`,isShowErrorMsg:i=!1,isShowCount:s=!1,unitText:c=``,description:u=``,onValueChange:d})=>{let f=(0,o.useWatch)({name:e});return(0,a.jsx)(n.FormField,{name:e,render:({field:{onChange:e,...o}})=>(0,a.jsxs)(n.FormItem,{className:`w-full gap-0`,children:[(0,a.jsx)(n.FormLabel,{children:t}),(0,a.jsx)(n.FormControl,{children:(0,a.jsx)(l,{...o,placeholder:r,className:`w-full`,unitText:c,onValueChange:t=>{e(t),d?.(t)}})}),s&&(0,a.jsxs)(`div`,{className:`text-muted-foreground text-end text-xs`,children:[f?.length??0,` characters`]}),!!u&&(0,a.jsx)(n.FormDescription,{children:u}),i&&(0,a.jsx)(n.FormMessage,{})]})})};exports.NumberField=u;
|
|
2
2
|
//# sourceMappingURL=number-field.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/number-field.d.ts
|
|
@@ -22,7 +22,7 @@ declare const NumberField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
22
22
|
unitText,
|
|
23
23
|
description,
|
|
24
24
|
onValueChange
|
|
25
|
-
}: Props<TFieldValues>) =>
|
|
25
|
+
}: Props<TFieldValues>) => react_jsx_runtime3.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { NumberField };
|
|
28
28
|
//# sourceMappingURL=number-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/number-field.d.ts
|
|
@@ -22,7 +22,7 @@ declare const NumberField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
22
22
|
unitText,
|
|
23
23
|
description,
|
|
24
24
|
onValueChange
|
|
25
|
-
}: Props<TFieldValues>) =>
|
|
25
|
+
}: Props<TFieldValues>) => react_jsx_runtime6.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { NumberField };
|
|
28
28
|
//# sourceMappingURL=number-field.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as e}from"../utils-D9AH0PUV.js";import"../label-DuddAB1p.js";import{FormControl as t,FormDescription as n,FormField as r,FormItem as i,FormLabel as a,FormMessage as o}from"../form-D5BmOjlU.js";import{Input as s}from"../input-
|
|
1
|
+
import{cn as e}from"../utils-D9AH0PUV.js";import"../label-DuddAB1p.js";import{FormControl as t,FormDescription as n,FormField as r,FormItem as i,FormLabel as a,FormMessage as o}from"../form-D5BmOjlU.js";import{Input as s}from"../input-DgJVc3kt.js";import c from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{useWatch as d}from"react-hook-form";const f=e=>e?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/,p=e=>Number(e).toLocaleString(),m=({disabled:t=!1,readonly:n=!1,allowNegative:r=!1,numberAfterDecimalPoint:i=2,roundingRule:a=`none`,value:o=``,unitText:d,decimal:m,placeholder:h,precision:g,onChange:_,onValueChange:v,onBlur:y,...b})=>{let x=c.useRef(null),S=c.useRef(null),[C,w]=c.useState(o.toString()),T=m?.[1]??i,E=m&&m[0]-m[1],D=c.useMemo(()=>f(r),[r]),O=c.useCallback(e=>{if(!T&&e.includes(`.`))return!1;let t=e.split(`.`)[1];return!t||t.length<=T},[T]),k=c.useCallback(e=>{if(!m||e===`-`)return!0;let[t,n=``]=e.split(`.`);return n.length<=m[1]&&(t.startsWith(`-`)?t.length-1:t.length)<=E},[m,E]),A=c.useCallback((e,t)=>{if(a===`none`)return e;let n=Math.pow(10,t),r=e*n;switch(a){case`up`:return Math.ceil(r)/n;case`down`:return Math.floor(r)/n;case`nearest`:return r%1<.1?Math.floor(r)/n:r%1>=.59?Math.ceil(r)/n:(Math.floor(r)+.5)/n;default:return e}},[a]),j=c.useCallback(e=>!i&&e.includes(`.`)||e.split(`.`)[1]?.length>i,[i]),M=c.useCallback(e=>{if(e===`0`)return`0`;if(!Number(e))return``;let t=parseFloat(e),n=Math.min(T-1,g||0),r=A(t,n).toString(),[i,a=``]=r.split(`.`),o=p(i);return a?`${o}.${a}`:o},[A,T,g]),N=c.useCallback(e=>{if(!m||e===`-`)return!0;let[t,n=``]=e.split(`.`),r=t.startsWith(`-`)?t.length-1:t.length,i=m[0]-m[1];return n.length<=m[1]&&r<=i},[m]),P=c.useCallback(e=>{_?.(e);let{value:t}=e.target;if(!t){v?.(void 0),w(``);return}let n=t===`0`,i=t===`-`&&r;if(n||i){v?.(0),w(t);return}let a=D.test(t)&&k(t)&&(m||O(t));if(!a)return;let o=parseFloat(t)||0;v?.(o),w(t)},[r,m,O,k,_,v,D]),F=c.useCallback(()=>{n||w(e=>e.replace(/,/g,``))},[n]),I=c.useCallback(()=>{n||(y?.(),w(e=>M(e)))},[n,y,M]);return c.useEffect(()=>{let e=document.activeElement===S.current;if(!o||!D.test(o.toString())||!N(o.toString())||!m&&j(o.toString())){w(``);return}w(t=>t===`-`?`-`:t?e?o.toString():M(o.toString()):``)},[m,M,o,j,N,D]),c.useEffect(()=>{if(!x.current||!S.current||!d)return;let e=x.current.offsetWidth;S.current.style.setProperty(`padding-right`,`${(e+10)/16}rem`)},[t,d]),u(`div`,{className:`relative`,children:[l(s,{...b,ref:S,value:C||(n?`0`:``),placeholder:h,disabled:t,readOnly:n,className:e(`font-number text-end`,n&&`bg-muted text-muted-foreground`),onChange:P,onFocus:F,onBlur:I}),d&&l(`span`,{ref:x,className:`text-muted-foreground pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 text-sm`,children:d})]})},h=({name:e,label:s=`Number Field`,placeholder:c=`0`,isShowErrorMsg:f=!1,isShowCount:p=!1,unitText:h=``,description:g=``,onValueChange:_})=>{let v=d({name:e});return l(r,{name:e,render:({field:{onChange:e,...r}})=>u(i,{className:`w-full gap-0`,children:[l(a,{children:s}),l(t,{children:l(m,{...r,placeholder:c,className:`w-full`,unitText:h,onValueChange:t=>{e(t),_?.(t)}})}),p&&u(`div`,{className:`text-muted-foreground text-end text-xs`,children:[v?.length??0,` characters`]}),!!g&&l(n,{children:g}),f&&l(o,{})]})})};export{h as NumberField};
|
|
2
2
|
//# sourceMappingURL=number-field.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`);require(`../label-CW94D639.cjs`);const n=require(`../form-C7n0ESic.cjs`),r=require(`../input-
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`);require(`../label-CW94D639.cjs`);const n=require(`../form-C7n0ESic.cjs`),r=require(`../input-C2xQcVZP.cjs`),i=e.__toESM(require(`react`)),a=e.__toESM(require(`react/jsx-runtime`)),o=e.__toESM(require(`lucide-react`)),s=({className:e,...n})=>{let s=i.default.useId(),[c,l]=i.default.useState(!1),u=i.default.useCallback(()=>l(e=>!e),[]);return(0,a.jsxs)(`div`,{className:`relative`,children:[(0,a.jsx)(r.Input,{...n,id:s,placeholder:`Password`,type:c?`text`:`password`,className:t.cn(`pe-9`,e)}),(0,a.jsx)(`button`,{className:`text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:u,"aria-label":c?`Hide password`:`Show password`,"aria-pressed":c,"aria-controls":`password`,children:c?(0,a.jsx)(o.EyeOffIcon,{size:16,"aria-hidden":`true`}):(0,a.jsx)(o.EyeIcon,{size:16,"aria-hidden":`true`})})]})},c=({name:e,label:t=`Text Field`,placeholder:r=`Enter text here`,isShowErrorMsg:i=!1,description:o,onValueChange:c})=>(0,a.jsx)(n.FormField,{name:e,render:({field:e})=>(0,a.jsxs)(n.FormItem,{className:`w-full`,children:[(0,a.jsx)(n.FormLabel,{children:t}),(0,a.jsx)(n.FormControl,{children:(0,a.jsx)(s,{placeholder:r,...e,onValueChange:c})}),!!o&&(0,a.jsx)(n.FormDescription,{children:o}),i&&(0,a.jsx)(n.FormMessage,{})]})});exports.PasswordField=c;
|
|
2
2
|
//# sourceMappingURL=password-field.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime27 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/password-field.d.ts
|
|
@@ -17,7 +17,7 @@ declare const PasswordField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
17
17
|
isShowErrorMsg,
|
|
18
18
|
description,
|
|
19
19
|
onValueChange
|
|
20
|
-
}: Props<TFieldValues>) =>
|
|
20
|
+
}: Props<TFieldValues>) => react_jsx_runtime27.JSX.Element;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { PasswordField };
|
|
23
23
|
//# sourceMappingURL=password-field.d.cts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{cn as e}from"../utils-D9AH0PUV.js";import"../label-DuddAB1p.js";import{FormControl as t,FormDescription as n,FormField as r,FormItem as i,FormLabel as a,FormMessage as o}from"../form-D5BmOjlU.js";import{Input as s}from"../input-
|
|
1
|
+
"use client";import{cn as e}from"../utils-D9AH0PUV.js";import"../label-DuddAB1p.js";import{FormControl as t,FormDescription as n,FormField as r,FormItem as i,FormLabel as a,FormMessage as o}from"../form-D5BmOjlU.js";import{Input as s}from"../input-DgJVc3kt.js";import c from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{EyeIcon as d,EyeOffIcon as f}from"lucide-react";const p=({className:t,...n})=>{let r=c.useId(),[i,a]=c.useState(!1),o=c.useCallback(()=>a(e=>!e),[]);return u(`div`,{className:`relative`,children:[l(s,{...n,id:r,placeholder:`Password`,type:i?`text`:`password`,className:e(`pe-9`,t)}),l(`button`,{className:`text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:o,"aria-label":i?`Hide password`:`Show password`,"aria-pressed":i,"aria-controls":`password`,children:l(i?f:d,{size:16,"aria-hidden":`true`})})]})},m=({name:e,label:s=`Text Field`,placeholder:c=`Enter text here`,isShowErrorMsg:d=!1,description:f,onValueChange:m})=>l(r,{name:e,render:({field:e})=>u(i,{className:`w-full`,children:[l(a,{children:s}),l(t,{children:l(p,{placeholder:c,...e,onValueChange:m})}),!!f&&l(n,{children:f}),d&&l(o,{})]})});export{m as PasswordField};
|
|
2
2
|
//# sourceMappingURL=password-field.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`);require(`../label-CW94D639.cjs`);const n=require(`../form-C7n0ESic.cjs`),r=require(`../select-
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`);require(`../label-CW94D639.cjs`);const n=require(`../form-C7n0ESic.cjs`),r=require(`../select-BCBdGAk7.cjs`),i=e.__toESM(require(`react/jsx-runtime`)),a=({name:e,label:a=`Select Field`,placeholder:o=`Select an option`,disabledValues:s=[],options:c=[],isShowLabel:l=!0,isShowErrorMsg:u=!1,description:d=``,className:f=``})=>(0,i.jsx)(n.FormField,{name:e,render:({field:e})=>(0,i.jsxs)(n.FormItem,{className:t.cn(`w-full`,f),children:[l&&(0,i.jsx)(n.FormLabel,{children:a}),(0,i.jsxs)(r.Select,{defaultValue:e.value,onValueChange:e.onChange,children:[(0,i.jsx)(n.FormControl,{children:(0,i.jsx)(r.SelectTrigger,{className:`w-full`,children:(0,i.jsx)(r.SelectValue,{placeholder:o})})}),(0,i.jsx)(r.SelectContent,{children:c.map(e=>(0,i.jsx)(r.SelectItem,{disabled:s.includes(e.value),value:e.value,children:e.label},e.value))})]}),!!d&&(0,i.jsx)(n.FormDescription,{children:d}),u&&(0,i.jsx)(n.FormMessage,{})]})});exports.SelectField=a;
|
|
2
2
|
//# sourceMappingURL=select-field.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/select-field.d.ts
|
|
@@ -27,7 +27,7 @@ declare const SelectField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
27
27
|
isShowErrorMsg,
|
|
28
28
|
description,
|
|
29
29
|
className
|
|
30
|
-
}: Props<TFieldValues>) =>
|
|
30
|
+
}: Props<TFieldValues>) => react_jsx_runtime6.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { SelectField };
|
|
33
33
|
//# sourceMappingURL=select-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime43 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/select-field.d.ts
|
|
@@ -27,7 +27,7 @@ declare const SelectField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
27
27
|
isShowErrorMsg,
|
|
28
28
|
description,
|
|
29
29
|
className
|
|
30
|
-
}: Props<TFieldValues>) =>
|
|
30
|
+
}: Props<TFieldValues>) => react_jsx_runtime43.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { SelectField };
|
|
33
33
|
//# sourceMappingURL=select-field.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{cn as e}from"../utils-D9AH0PUV.js";import"../label-DuddAB1p.js";import{FormControl as t,FormDescription as n,FormField as r,FormItem as i,FormLabel as a,FormMessage as o}from"../form-D5BmOjlU.js";import{Select as s,SelectContent as c,SelectItem as l,SelectTrigger as u,SelectValue as d}from"../select-
|
|
1
|
+
"use client";import{cn as e}from"../utils-D9AH0PUV.js";import"../label-DuddAB1p.js";import{FormControl as t,FormDescription as n,FormField as r,FormItem as i,FormLabel as a,FormMessage as o}from"../form-D5BmOjlU.js";import{Select as s,SelectContent as c,SelectItem as l,SelectTrigger as u,SelectValue as d}from"../select-DmjCwCGB.js";import{jsx as f,jsxs as p}from"react/jsx-runtime";const m=({name:m,label:h=`Select Field`,placeholder:g=`Select an option`,disabledValues:_=[],options:v=[],isShowLabel:y=!0,isShowErrorMsg:b=!1,description:x=``,className:S=``})=>f(r,{name:m,render:({field:r})=>p(i,{className:e(`w-full`,S),children:[y&&f(a,{children:h}),p(s,{defaultValue:r.value,onValueChange:r.onChange,children:[f(t,{children:f(u,{className:`w-full`,children:f(d,{placeholder:g})})}),f(c,{children:v.map(e=>f(l,{disabled:_.includes(e.value),value:e.value,children:e.label},e.value))})]}),!!x&&f(n,{children:x}),b&&f(o,{})]})});export{m as SelectField};
|
|
2
2
|
//# sourceMappingURL=select-field.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`);require(`../label-CW94D639.cjs`);const n=require(`../form-C7n0ESic.cjs`),r=require(`../switch-
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`);require(`../label-CW94D639.cjs`);const n=require(`../form-C7n0ESic.cjs`),r=require(`../switch-C3igCoxt.cjs`),i=e.__toESM(require(`react/jsx-runtime`)),a=({name:e,label:a=`Switch Field`,description:o,isShowErrorMsg:s=!1})=>(0,i.jsx)(n.FormField,{name:e,render:({field:e})=>(0,i.jsxs)(`div`,{className:`spage-y-1`,children:[(0,i.jsxs)(n.FormItem,{className:t.cn(`border-border-weak flex flex-row items-center justify-between rounded-lg border p-3 shadow-xs`),children:[(0,i.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,i.jsx)(n.FormLabel,{className:`cursor-pointer text-sm`,children:a}),o&&(0,i.jsx)(n.FormDescription,{className:`text-xs`,children:o})]}),(0,i.jsx)(n.FormControl,{children:(0,i.jsx)(r.Switch,{checked:e.value,onCheckedChange:e.onChange})})]}),s&&(0,i.jsx)(n.FormMessage,{})]})});exports.SwitchField=a;
|
|
2
2
|
//# sourceMappingURL=switch-field.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/switch-field.d.ts
|
|
@@ -13,7 +13,7 @@ declare const SwitchField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
13
13
|
label,
|
|
14
14
|
description,
|
|
15
15
|
isShowErrorMsg
|
|
16
|
-
}: Props<TFieldValues>) =>
|
|
16
|
+
}: Props<TFieldValues>) => react_jsx_runtime8.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { SwitchField };
|
|
19
19
|
//# sourceMappingURL=switch-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/switch-field.d.ts
|
|
@@ -13,7 +13,7 @@ declare const SwitchField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
13
13
|
label,
|
|
14
14
|
description,
|
|
15
15
|
isShowErrorMsg
|
|
16
|
-
}: Props<TFieldValues>) =>
|
|
16
|
+
}: Props<TFieldValues>) => react_jsx_runtime11.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { SwitchField };
|
|
19
19
|
//# sourceMappingURL=switch-field.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{cn as e}from"../utils-D9AH0PUV.js";import"../label-DuddAB1p.js";import{FormControl as t,FormDescription as n,FormField as r,FormItem as i,FormLabel as a,FormMessage as o}from"../form-D5BmOjlU.js";import{Switch as s}from"../switch-
|
|
1
|
+
"use client";import{cn as e}from"../utils-D9AH0PUV.js";import"../label-DuddAB1p.js";import{FormControl as t,FormDescription as n,FormField as r,FormItem as i,FormLabel as a,FormMessage as o}from"../form-D5BmOjlU.js";import{Switch as s}from"../switch-965kHdW_.js";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=({name:u,label:d=`Switch Field`,description:f,isShowErrorMsg:p=!1})=>c(r,{name:u,render:({field:r})=>l(`div`,{className:`spage-y-1`,children:[l(i,{className:e(`border-border-weak flex flex-row items-center justify-between rounded-lg border p-3 shadow-xs`),children:[l(`div`,{className:`space-y-0.5`,children:[c(a,{className:`cursor-pointer text-sm`,children:d}),f&&c(n,{className:`text-xs`,children:f})]}),c(t,{children:c(s,{checked:r.value,onCheckedChange:r.onChange})})]}),p&&c(o,{})]})});export{u as SwitchField};
|
|
2
2
|
//# sourceMappingURL=switch-field.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`);require(`../label-CW94D639.cjs`);const n=require(`../form-C7n0ESic.cjs`),r=require(`../
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../utils-BsjVK5EW.cjs`);require(`../label-CW94D639.cjs`);const n=require(`../form-C7n0ESic.cjs`),r=require(`../flex-DjACH4wX.cjs`),i=require(`../input-C2xQcVZP.cjs`),a=e.__toESM(require(`react`)),o=e.__toESM(require(`react/jsx-runtime`)),s=e.__toESM(require(`lucide-react`)),c=e.__toESM(require(`react-hook-form`)),l=({name:e,label:l=`Text Field`,placeholder:u=`Enter text here`,isShowLabel:d=!0,isShowClearButton:f=!1,isShowErrorMsg:p=!1,isShowCount:m=!1,description:h,className:g=``,onValueChange:_})=>{let{resetField:v}=n.useFormField(),y=(0,c.useWatch)({name:e}),b=a.default.useCallback(()=>{v(e)},[v,e]);return(0,o.jsx)(n.FormField,{name:e,render:({field:e})=>(0,o.jsxs)(n.FormItem,{className:t.cn(`w-full gap-0`,m||!!h&&`space-y-1`,g),children:[d&&(0,o.jsx)(n.FormLabel,{children:l}),(0,o.jsxs)(`div`,{className:`relative`,children:[(0,o.jsx)(n.FormControl,{children:(0,o.jsx)(i.Input,{...e,placeholder:u,className:t.cn(`w-full`,f&&`pr-9`),onValueChange:_})}),f&&y&&(0,o.jsx)(`button`,{type:`button`,className:`text-text-positive-weak hover:text-text-positive 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`,"aria-label":`Clear input`,onClick:b,children:(0,o.jsx)(s.XIcon,{size:14,"aria-hidden":`true`})})]}),(0,o.jsxs)(r.Flex,{width:`full`,padding:`none`,justify:`end`,children:[p&&(0,o.jsx)(n.FormMessage,{className:`grow`}),m&&(0,o.jsxs)(`div`,{className:`text-text-positive-weak text-end text-xs`,children:[y?.length??0,` characters`]})]}),!!h&&(0,o.jsx)(n.FormDescription,{children:h})]})})};exports.TextField=l;
|
|
2
2
|
//# sourceMappingURL=text-field.cjs.map
|