@trsys-tech/matrix-library 0.3.3 → 0.3.5

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.
Files changed (113) hide show
  1. package/dist/badge.es.js.map +1 -1
  2. package/dist/breadcrumb.es.js.map +1 -1
  3. package/dist/button.es.js.map +1 -1
  4. package/dist/calendar.es.js.map +1 -1
  5. package/dist/card.es.js.map +1 -1
  6. package/dist/chip.es.js.map +1 -1
  7. package/dist/collapsible.es.js.map +1 -1
  8. package/dist/combobox.es.js +84 -32
  9. package/dist/combobox.es.js.map +1 -1
  10. package/dist/command.es.js +60 -47
  11. package/dist/command.es.js.map +1 -1
  12. package/dist/components/badge/Badge.d.ts.map +1 -1
  13. package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -1
  14. package/dist/components/button/Button.d.ts.map +1 -1
  15. package/dist/components/card/Card.d.ts.map +1 -1
  16. package/dist/components/chip/Chip.d.ts.map +1 -1
  17. package/dist/components/collapsible/Collapsible.d.ts.map +1 -1
  18. package/dist/components/combobox/Combobox.d.ts +68 -59
  19. package/dist/components/combobox/Combobox.d.ts.map +1 -1
  20. package/dist/components/command/Command.d.ts +5 -2
  21. package/dist/components/command/Command.d.ts.map +1 -1
  22. package/dist/components/confirm/Confirm.d.ts.map +1 -1
  23. package/dist/components/data-grid/DataGrid.d.ts.map +1 -1
  24. package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
  25. package/dist/components/date-picker/DateRangePicker.d.ts.map +1 -1
  26. package/dist/components/date-picker/DesktopTimePicker.d.ts.map +1 -1
  27. package/dist/components/date-picker/MobileTimePicker.d.ts.map +1 -1
  28. package/dist/components/date-picker/TimePicker.d.ts.map +1 -1
  29. package/dist/components/date-picker/calendar.d.ts.map +1 -1
  30. package/dist/components/dialog/Dialog.d.ts.map +1 -1
  31. package/dist/components/form/Form.d.ts.map +1 -1
  32. package/dist/components/form-checkbox/FormCheckbox.d.ts.map +1 -1
  33. package/dist/components/form-combobox/FormCombobox.d.ts +2 -7
  34. package/dist/components/form-combobox/FormCombobox.d.ts.map +1 -1
  35. package/dist/components/form-date-picker/FormDatePicker.d.ts.map +1 -1
  36. package/dist/components/form-date-range-picker/FormDateRangePicker.d.ts.map +1 -1
  37. package/dist/components/form-input/FormInput.d.ts.map +1 -1
  38. package/dist/components/form-multi-select/FormMultiSelect.d.ts.map +1 -1
  39. package/dist/components/form-rating/FormRating.d.ts.map +1 -1
  40. package/dist/components/form-select/FormSelect.d.ts.map +1 -1
  41. package/dist/components/form-switch/FormSwitch.d.ts.map +1 -1
  42. package/dist/components/form-textarea/FormTextarea.d.ts.map +1 -1
  43. package/dist/components/form-time-picker/FormTimePicker.d.ts.map +1 -1
  44. package/dist/components/icon-botton/IconButton.d.ts.map +1 -1
  45. package/dist/components/modal/Modal.d.ts.map +1 -1
  46. package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
  47. package/dist/components/select/Select.d.ts.map +1 -1
  48. package/dist/components/tabs/Tabs.d.ts.map +1 -1
  49. package/dist/components/text-field/TextField.d.ts +2 -2
  50. package/dist/components/text-field/TextField.d.ts.map +1 -1
  51. package/dist/components/toast/Toast.d.ts.map +1 -1
  52. package/dist/components/toast/toast-components.d.ts.map +1 -1
  53. package/dist/components/toast/use-toast.d.ts.map +1 -1
  54. package/dist/confirm.es.js.map +1 -1
  55. package/dist/datagrid.es.js +41 -41
  56. package/dist/datagrid.es.js.map +1 -1
  57. package/dist/datepicker.es.js.map +1 -1
  58. package/dist/daterangepicker.es.js.map +1 -1
  59. package/dist/desktopdatepicker.es.js +33 -33
  60. package/dist/desktopdatepicker.es.js.map +1 -1
  61. package/dist/desktopdaterangepicker.es.js +33 -33
  62. package/dist/desktopdaterangepicker.es.js.map +1 -1
  63. package/dist/desktoptimepicker.es.js +27 -23
  64. package/dist/desktoptimepicker.es.js.map +1 -1
  65. package/dist/dialog.es.js.map +1 -1
  66. package/dist/form.es.js.map +1 -1
  67. package/dist/formcheckbox.es.js +4 -4
  68. package/dist/formcheckbox.es.js.map +1 -1
  69. package/dist/formcombobox.es.js +46 -103
  70. package/dist/formcombobox.es.js.map +1 -1
  71. package/dist/formdatepicker.es.js +11 -11
  72. package/dist/formdatepicker.es.js.map +1 -1
  73. package/dist/formdaterangepicker.es.js +12 -12
  74. package/dist/formdaterangepicker.es.js.map +1 -1
  75. package/dist/forminput.es.js +8 -8
  76. package/dist/forminput.es.js.map +1 -1
  77. package/dist/formmultiselect.es.js +10 -10
  78. package/dist/formmultiselect.es.js.map +1 -1
  79. package/dist/formrating.es.js +21 -21
  80. package/dist/formrating.es.js.map +1 -1
  81. package/dist/formselect.es.js +11 -11
  82. package/dist/formselect.es.js.map +1 -1
  83. package/dist/formswitch.es.js +7 -7
  84. package/dist/formswitch.es.js.map +1 -1
  85. package/dist/formtextarea.es.js +5 -5
  86. package/dist/formtextarea.es.js.map +1 -1
  87. package/dist/formtimepicker.es.js +5 -5
  88. package/dist/formtimepicker.es.js.map +1 -1
  89. package/dist/iconbutton.es.js.map +1 -1
  90. package/dist/index.d.ts +2 -0
  91. package/dist/index.d.ts.map +1 -1
  92. package/dist/index.es.js +205 -193
  93. package/dist/index.es.js.map +1 -1
  94. package/dist/mobiledatepicker.es.js +38 -38
  95. package/dist/mobiledatepicker.es.js.map +1 -1
  96. package/dist/mobiledaterangepicker.es.js +51 -51
  97. package/dist/mobiledaterangepicker.es.js.map +1 -1
  98. package/dist/mobiletimepicker.es.js +30 -26
  99. package/dist/mobiletimepicker.es.js.map +1 -1
  100. package/dist/modal.es.js.map +1 -1
  101. package/dist/multiselect.es.js +114 -106
  102. package/dist/multiselect.es.js.map +1 -1
  103. package/dist/select.es.js +1 -1
  104. package/dist/select.es.js.map +1 -1
  105. package/dist/style.css +1 -1
  106. package/dist/tabs.es.js.map +1 -1
  107. package/dist/textfield.es.js +12 -11
  108. package/dist/textfield.es.js.map +1 -1
  109. package/dist/timepicker.es.js.map +1 -1
  110. package/dist/toast-components.es.js.map +1 -1
  111. package/dist/toast.es.js.map +1 -1
  112. package/dist/use-toast.es.js.map +1 -1
  113. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -1,209 +1,221 @@
1
1
  /* empty css */
2
2
  import { Badge as t } from "./badge.es.js";
3
- import { Button as i, buttonVariants as p } from "./button.es.js";
4
- import { Breadcrumb as l, BreadcrumbEllipsis as n, BreadcrumbItem as S, BreadcrumbLink as b, BreadcrumbList as x, BreadcrumbPage as d, BreadcrumbSeparator as f } from "./breadcrumb.es.js";
5
- import { Card as D, CardContent as u, CardDescription as g, CardFooter as s, CardHeader as C, CardTitle as T } from "./card.es.js";
3
+ import { Button as i, buttonVariants as m } from "./button.es.js";
4
+ import { Breadcrumb as n, BreadcrumbEllipsis as l, BreadcrumbItem as S, BreadcrumbLink as d, BreadcrumbList as b, BreadcrumbPage as x, BreadcrumbSeparator as f } from "./breadcrumb.es.js";
5
+ import { Card as D, CardContent as u, CardDescription as C, CardFooter as g, CardHeader as s, CardTitle as T } from "./card.es.js";
6
6
  import { Checkbox as P } from "./checkbox.es.js";
7
7
  import { Chip as k } from "./chip.es.js";
8
- import { Collapsible as M, CollapsibleContent as B, CollapsibleTrigger as G } from "./collapsible.es.js";
9
- import { ConfirmProvider as I, useConfirm as R } from "./confirm.es.js";
10
- import { DatePicker as L } from "./datepicker.es.js";
11
- import { DateRangePicker as y } from "./daterangepicker.es.js";
12
- import { TimePicker as O } from "./timepicker.es.js";
13
- import { Calendar as z } from "./calendar.es.js";
14
- import { DataGrid as j, DataGridActionBar as q, DataGridContent as J, DeleteAction as K, ExtraActions as N, FreezeAction as Q, PrintAction as W, RefreshAction as X, SearchAction as Y, useDataGrid as Z } from "./datagrid.es.js";
15
- import { Dialog as $, DialogClose as ee, DialogContent as re, DialogDescription as oe, DialogFooter as te, DialogHeader as ae, DialogOverlay as ie, DialogPortal as pe, DialogTitle as me, DialogTrigger as le } from "./dialog.es.js";
16
- import { Drawer as Se, DrawerContent as be, DrawerMain as xe } from "./drawer.es.js";
17
- import { SwipableDrawer as fe, SwipableDrawerClose as ce, SwipableDrawerContent as De, SwipableDrawerDescription as ue, SwipableDrawerFooter as ge, SwipableDrawerHeader as se, SwipableDrawerTitle as Ce, SwipableDrawerTrigger as Te } from "./swipabledrawer.es.js";
18
- import { Form as Pe, FormControl as we, FormDescription as ke, FormField as he, FormItem as Me, FormLabel as Be, FormMessage as Ge } from "./form.es.js";
19
- import { FormCheckbox as Ie } from "./formcheckbox.es.js";
20
- import { FormCombobox as ve } from "./formcombobox.es.js";
21
- import { FormDatePicker as He } from "./formdatepicker.es.js";
22
- import { FormDateRangePicker as Ee } from "./formdaterangepicker.es.js";
23
- import { FormInput as Ve } from "./forminput.es.js";
24
- import { FormMultiSelect as Ue } from "./formmultiselect.es.js";
25
- import { FormRating as qe } from "./formrating.es.js";
26
- import { FormSelect as Ke } from "./formselect.es.js";
27
- import { FormSwitch as Qe } from "./formswitch.es.js";
28
- import { FormTextarea as Xe } from "./formtextarea.es.js";
29
- import { FormTimePicker as Ze } from "./formtimepicker.es.js";
30
- import { IconButton as $e } from "./iconbutton.es.js";
31
- import { Label as rr } from "./label.es.js";
32
- import { Modal as tr, ModalFooter as ar } from "./modal.es.js";
33
- import { Popover as pr, PopoverAnchor as mr, PopoverContent as lr, PopoverTrigger as nr } from "./popover.es.js";
34
- import { Rating as br } from "./rating.es.js";
35
- import { RadioGroup as dr, RadioGroupItem as fr } from "./radiogroup.es.js";
36
- import { Select as Dr, SelectContent as ur, SelectGroup as gr, SelectItem as sr, SelectLabel as Cr, SelectScrollDownButton as Tr, SelectScrollUpButton as Fr, SelectSeparator as Pr, SelectTrigger as wr, SelectValue as kr } from "./select.es.js";
37
- import { Separator as Mr } from "./separator.es.js";
38
- import { Sheet as Gr, SheetClose as Ar, SheetContent as Ir, SheetDescription as Rr, SheetFooter as vr, SheetHeader as Lr, SheetOverlay as Hr, SheetPortal as yr, SheetTitle as Er, SheetTrigger as Or } from "./sheet.es.js";
39
- import { Sidebar as zr, SidebarContent as Ur, SidebarFooter as jr, SidebarGroup as qr, SidebarGroupAction as Jr, SidebarGroupContent as Kr, SidebarGroupLabel as Nr, SidebarHeader as Qr, SidebarInset as Wr, SidebarMenu as Xr, SidebarMenuAction as Yr, SidebarMenuBadge as Zr, SidebarMenuButton as _r, SidebarMenuItem as $r, SidebarMenuSkeleton as eo, SidebarMenuSub as ro, SidebarMenuSubButton as oo, SidebarMenuSubItem as to, SidebarProvider as ao, SidebarRail as io, SidebarSeparator as po, SidebarTrigger as mo, useSidebar as lo } from "./sidebar.es.js";
40
- import { Skeleton as So } from "./skeleton.es.js";
41
- import { Switch as xo } from "./switch.es.js";
42
- import { Tabs as co, TabsContent as Do, TabsList as uo, TabsTrigger as go } from "./tabs.es.js";
43
- import { TextField as Co } from "./textfield.es.js";
44
- import { Toast as Fo } from "./toast.es.js";
45
- import { toast as wo } from "./use-toast.es.js";
46
- import { Tooltip as ho, TooltipContent as Mo, TooltipProvider as Bo, TooltipTrigger as Go } from "./tooltip.es.js";
47
- import { useIsMobile as Io } from "./use-mobile.es.js";
48
- import { cn as vo } from "./utils.es.js";
49
- import { DesktopDatePicker as Ho } from "./desktopdatepicker.es.js";
50
- import { MobileDatePicker as Eo } from "./mobiledatepicker.es.js";
51
- import { DesktopDateRangePicker as Vo } from "./desktopdaterangepicker.es.js";
52
- import { MobileDateRangePicker as Uo } from "./mobiledaterangepicker.es.js";
53
- import { MobileTimePicker as qo } from "./mobiletimepicker.es.js";
54
- import { DesktopTimePicker as Ko } from "./desktoptimepicker.es.js";
8
+ import { Combobox as M } from "./combobox.es.js";
9
+ import { Command as G, CommandDialog as I, CommandEmpty as A, CommandGroup as R, CommandInput as v, CommandItem as L, CommandList as H, CommandSeparator as y, CommandShortcut as E } from "./command.es.js";
10
+ import { Collapsible as V, CollapsibleContent as z, CollapsibleTrigger as U } from "./collapsible.es.js";
11
+ import { ConfirmProvider as q, useConfirm as J } from "./confirm.es.js";
12
+ import { DatePicker as N } from "./datepicker.es.js";
13
+ import { DateRangePicker as W } from "./daterangepicker.es.js";
14
+ import { TimePicker as Y } from "./timepicker.es.js";
15
+ import { Calendar as _ } from "./calendar.es.js";
16
+ import { DataGrid as ee, DataGridActionBar as re, DataGridContent as oe, DeleteAction as te, ExtraActions as ae, FreezeAction as ie, PrintAction as me, RefreshAction as pe, SearchAction as ne, useDataGrid as le } from "./datagrid.es.js";
17
+ import { Dialog as de, DialogClose as be, DialogContent as xe, DialogDescription as fe, DialogFooter as ce, DialogHeader as De, DialogOverlay as ue, DialogPortal as Ce, DialogTitle as ge, DialogTrigger as se } from "./dialog.es.js";
18
+ import { Drawer as Fe, DrawerContent as Pe, DrawerMain as we } from "./drawer.es.js";
19
+ import { SwipableDrawer as he, SwipableDrawerClose as Me, SwipableDrawerContent as Be, SwipableDrawerDescription as Ge, SwipableDrawerFooter as Ie, SwipableDrawerHeader as Ae, SwipableDrawerTitle as Re, SwipableDrawerTrigger as ve } from "./swipabledrawer.es.js";
20
+ import { Form as He, FormControl as ye, FormDescription as Ee, FormField as Oe, FormItem as Ve, FormLabel as ze, FormMessage as Ue } from "./form.es.js";
21
+ import { FormCheckbox as qe } from "./formcheckbox.es.js";
22
+ import { FormCombobox as Ke } from "./formcombobox.es.js";
23
+ import { FormDatePicker as Qe } from "./formdatepicker.es.js";
24
+ import { FormDateRangePicker as Xe } from "./formdaterangepicker.es.js";
25
+ import { FormInput as Ze } from "./forminput.es.js";
26
+ import { FormMultiSelect as $e } from "./formmultiselect.es.js";
27
+ import { FormRating as rr } from "./formrating.es.js";
28
+ import { FormSelect as tr } from "./formselect.es.js";
29
+ import { FormSwitch as ir } from "./formswitch.es.js";
30
+ import { FormTextarea as pr } from "./formtextarea.es.js";
31
+ import { FormTimePicker as lr } from "./formtimepicker.es.js";
32
+ import { IconButton as dr } from "./iconbutton.es.js";
33
+ import { Label as xr } from "./label.es.js";
34
+ import { Modal as cr, ModalFooter as Dr } from "./modal.es.js";
35
+ import { Popover as Cr, PopoverAnchor as gr, PopoverContent as sr, PopoverTrigger as Tr } from "./popover.es.js";
36
+ import { Rating as Pr } from "./rating.es.js";
37
+ import { RadioGroup as kr, RadioGroupItem as hr } from "./radiogroup.es.js";
38
+ import { Select as Br, SelectContent as Gr, SelectGroup as Ir, SelectItem as Ar, SelectLabel as Rr, SelectScrollDownButton as vr, SelectScrollUpButton as Lr, SelectSeparator as Hr, SelectTrigger as yr, SelectValue as Er } from "./select.es.js";
39
+ import { Separator as Vr } from "./separator.es.js";
40
+ import { Sheet as Ur, SheetClose as jr, SheetContent as qr, SheetDescription as Jr, SheetFooter as Kr, SheetHeader as Nr, SheetOverlay as Qr, SheetPortal as Wr, SheetTitle as Xr, SheetTrigger as Yr } from "./sheet.es.js";
41
+ import { Sidebar as _r, SidebarContent as $r, SidebarFooter as eo, SidebarGroup as ro, SidebarGroupAction as oo, SidebarGroupContent as to, SidebarGroupLabel as ao, SidebarHeader as io, SidebarInset as mo, SidebarMenu as po, SidebarMenuAction as no, SidebarMenuBadge as lo, SidebarMenuButton as So, SidebarMenuItem as bo, SidebarMenuSkeleton as xo, SidebarMenuSub as fo, SidebarMenuSubButton as co, SidebarMenuSubItem as Do, SidebarProvider as uo, SidebarRail as Co, SidebarSeparator as go, SidebarTrigger as so, useSidebar as To } from "./sidebar.es.js";
42
+ import { Skeleton as Po } from "./skeleton.es.js";
43
+ import { Switch as ko } from "./switch.es.js";
44
+ import { Tabs as Mo, TabsContent as Bo, TabsList as Go, TabsTrigger as Io } from "./tabs.es.js";
45
+ import { TextField as Ro } from "./textfield.es.js";
46
+ import { Toast as Lo } from "./toast.es.js";
47
+ import { toast as yo } from "./use-toast.es.js";
48
+ import { Tooltip as Oo, TooltipContent as Vo, TooltipProvider as zo, TooltipTrigger as Uo } from "./tooltip.es.js";
49
+ import { useIsMobile as qo } from "./use-mobile.es.js";
50
+ import { cn as Ko } from "./utils.es.js";
51
+ import { DesktopDatePicker as Qo } from "./desktopdatepicker.es.js";
52
+ import { MobileDatePicker as Xo } from "./mobiledatepicker.es.js";
53
+ import { DesktopDateRangePicker as Zo } from "./desktopdaterangepicker.es.js";
54
+ import { MobileDateRangePicker as $o } from "./mobiledaterangepicker.es.js";
55
+ import { MobileTimePicker as rt } from "./mobiletimepicker.es.js";
56
+ import { DesktopTimePicker as tt } from "./desktoptimepicker.es.js";
55
57
  export {
56
58
  t as Badge,
57
- l as Breadcrumb,
58
- n as BreadcrumbEllipsis,
59
+ n as Breadcrumb,
60
+ l as BreadcrumbEllipsis,
59
61
  S as BreadcrumbItem,
60
- b as BreadcrumbLink,
61
- x as BreadcrumbList,
62
- d as BreadcrumbPage,
62
+ d as BreadcrumbLink,
63
+ b as BreadcrumbList,
64
+ x as BreadcrumbPage,
63
65
  f as BreadcrumbSeparator,
64
66
  i as Button,
65
- z as Calendar,
67
+ _ as Calendar,
66
68
  D as Card,
67
69
  u as CardContent,
68
- g as CardDescription,
69
- s as CardFooter,
70
- C as CardHeader,
70
+ C as CardDescription,
71
+ g as CardFooter,
72
+ s as CardHeader,
71
73
  T as CardTitle,
72
74
  P as Checkbox,
73
75
  k as Chip,
74
- M as Collapsible,
75
- B as CollapsibleContent,
76
- G as CollapsibleTrigger,
77
- I as ConfirmProvider,
78
- j as DataGrid,
79
- q as DataGridActionBar,
80
- J as DataGridContent,
81
- L as DatePicker,
82
- y as DateRangePicker,
83
- K as DeleteAction,
84
- Ho as DesktopDatePicker,
85
- Vo as DesktopDateRangePicker,
86
- Ko as DesktopTimePicker,
87
- $ as Dialog,
88
- ee as DialogClose,
89
- re as DialogContent,
90
- oe as DialogDescription,
91
- te as DialogFooter,
92
- ae as DialogHeader,
93
- ie as DialogOverlay,
94
- pe as DialogPortal,
95
- me as DialogTitle,
96
- le as DialogTrigger,
97
- Se as Drawer,
98
- be as DrawerContent,
99
- xe as DrawerMain,
100
- N as ExtraActions,
101
- Pe as Form,
102
- Ie as FormCheckbox,
103
- ve as FormCombobox,
104
- we as FormControl,
105
- He as FormDatePicker,
106
- Ee as FormDateRangePicker,
107
- ke as FormDescription,
108
- he as FormField,
109
- Ve as FormInput,
110
- Me as FormItem,
111
- Be as FormLabel,
112
- Ge as FormMessage,
113
- Ue as FormMultiSelect,
114
- qe as FormRating,
115
- Ke as FormSelect,
116
- Qe as FormSwitch,
117
- Xe as FormTextarea,
118
- Ze as FormTimePicker,
119
- Q as FreezeAction,
120
- $e as IconButton,
121
- rr as Label,
122
- Eo as MobileDatePicker,
123
- Uo as MobileDateRangePicker,
124
- qo as MobileTimePicker,
125
- tr as Modal,
126
- ar as ModalFooter,
127
- pr as Popover,
128
- mr as PopoverAnchor,
129
- lr as PopoverContent,
130
- nr as PopoverTrigger,
131
- W as PrintAction,
132
- dr as RadioGroup,
133
- fr as RadioGroupItem,
134
- br as Rating,
135
- X as RefreshAction,
136
- Y as SearchAction,
137
- Dr as Select,
138
- ur as SelectContent,
139
- gr as SelectGroup,
140
- sr as SelectItem,
141
- Cr as SelectLabel,
142
- Tr as SelectScrollDownButton,
143
- Fr as SelectScrollUpButton,
144
- Pr as SelectSeparator,
145
- wr as SelectTrigger,
146
- kr as SelectValue,
147
- Mr as Separator,
148
- Gr as Sheet,
149
- Ar as SheetClose,
150
- Ir as SheetContent,
151
- Rr as SheetDescription,
152
- vr as SheetFooter,
153
- Lr as SheetHeader,
154
- Hr as SheetOverlay,
155
- yr as SheetPortal,
156
- Er as SheetTitle,
157
- Or as SheetTrigger,
158
- zr as Sidebar,
159
- Ur as SidebarContent,
160
- jr as SidebarFooter,
161
- qr as SidebarGroup,
162
- Jr as SidebarGroupAction,
163
- Kr as SidebarGroupContent,
164
- Nr as SidebarGroupLabel,
165
- Qr as SidebarHeader,
166
- Wr as SidebarInset,
167
- Xr as SidebarMenu,
168
- Yr as SidebarMenuAction,
169
- Zr as SidebarMenuBadge,
170
- _r as SidebarMenuButton,
171
- $r as SidebarMenuItem,
172
- eo as SidebarMenuSkeleton,
173
- ro as SidebarMenuSub,
174
- oo as SidebarMenuSubButton,
175
- to as SidebarMenuSubItem,
176
- ao as SidebarProvider,
177
- io as SidebarRail,
178
- po as SidebarSeparator,
179
- mo as SidebarTrigger,
180
- So as Skeleton,
181
- fe as SwipableDrawer,
182
- ce as SwipableDrawerClose,
183
- De as SwipableDrawerContent,
184
- ue as SwipableDrawerDescription,
185
- ge as SwipableDrawerFooter,
186
- se as SwipableDrawerHeader,
187
- Ce as SwipableDrawerTitle,
188
- Te as SwipableDrawerTrigger,
189
- xo as Switch,
190
- co as Tabs,
191
- Do as TabsContent,
192
- uo as TabsList,
193
- go as TabsTrigger,
194
- Co as TextField,
195
- O as TimePicker,
196
- Fo as Toast,
197
- ho as Tooltip,
198
- Mo as TooltipContent,
199
- Bo as TooltipProvider,
200
- Go as TooltipTrigger,
201
- p as buttonVariants,
202
- vo as cn,
203
- wo as toast,
204
- R as useConfirm,
205
- Z as useDataGrid,
206
- Io as useIsMobile,
207
- lo as useSidebar
76
+ V as Collapsible,
77
+ z as CollapsibleContent,
78
+ U as CollapsibleTrigger,
79
+ M as Combobox,
80
+ G as Command,
81
+ I as CommandDialog,
82
+ A as CommandEmpty,
83
+ R as CommandGroup,
84
+ v as CommandInput,
85
+ L as CommandItem,
86
+ H as CommandList,
87
+ y as CommandSeparator,
88
+ E as CommandShortcut,
89
+ q as ConfirmProvider,
90
+ ee as DataGrid,
91
+ re as DataGridActionBar,
92
+ oe as DataGridContent,
93
+ N as DatePicker,
94
+ W as DateRangePicker,
95
+ te as DeleteAction,
96
+ Qo as DesktopDatePicker,
97
+ Zo as DesktopDateRangePicker,
98
+ tt as DesktopTimePicker,
99
+ de as Dialog,
100
+ be as DialogClose,
101
+ xe as DialogContent,
102
+ fe as DialogDescription,
103
+ ce as DialogFooter,
104
+ De as DialogHeader,
105
+ ue as DialogOverlay,
106
+ Ce as DialogPortal,
107
+ ge as DialogTitle,
108
+ se as DialogTrigger,
109
+ Fe as Drawer,
110
+ Pe as DrawerContent,
111
+ we as DrawerMain,
112
+ ae as ExtraActions,
113
+ He as Form,
114
+ qe as FormCheckbox,
115
+ Ke as FormCombobox,
116
+ ye as FormControl,
117
+ Qe as FormDatePicker,
118
+ Xe as FormDateRangePicker,
119
+ Ee as FormDescription,
120
+ Oe as FormField,
121
+ Ze as FormInput,
122
+ Ve as FormItem,
123
+ ze as FormLabel,
124
+ Ue as FormMessage,
125
+ $e as FormMultiSelect,
126
+ rr as FormRating,
127
+ tr as FormSelect,
128
+ ir as FormSwitch,
129
+ pr as FormTextarea,
130
+ lr as FormTimePicker,
131
+ ie as FreezeAction,
132
+ dr as IconButton,
133
+ xr as Label,
134
+ Xo as MobileDatePicker,
135
+ $o as MobileDateRangePicker,
136
+ rt as MobileTimePicker,
137
+ cr as Modal,
138
+ Dr as ModalFooter,
139
+ Cr as Popover,
140
+ gr as PopoverAnchor,
141
+ sr as PopoverContent,
142
+ Tr as PopoverTrigger,
143
+ me as PrintAction,
144
+ kr as RadioGroup,
145
+ hr as RadioGroupItem,
146
+ Pr as Rating,
147
+ pe as RefreshAction,
148
+ ne as SearchAction,
149
+ Br as Select,
150
+ Gr as SelectContent,
151
+ Ir as SelectGroup,
152
+ Ar as SelectItem,
153
+ Rr as SelectLabel,
154
+ vr as SelectScrollDownButton,
155
+ Lr as SelectScrollUpButton,
156
+ Hr as SelectSeparator,
157
+ yr as SelectTrigger,
158
+ Er as SelectValue,
159
+ Vr as Separator,
160
+ Ur as Sheet,
161
+ jr as SheetClose,
162
+ qr as SheetContent,
163
+ Jr as SheetDescription,
164
+ Kr as SheetFooter,
165
+ Nr as SheetHeader,
166
+ Qr as SheetOverlay,
167
+ Wr as SheetPortal,
168
+ Xr as SheetTitle,
169
+ Yr as SheetTrigger,
170
+ _r as Sidebar,
171
+ $r as SidebarContent,
172
+ eo as SidebarFooter,
173
+ ro as SidebarGroup,
174
+ oo as SidebarGroupAction,
175
+ to as SidebarGroupContent,
176
+ ao as SidebarGroupLabel,
177
+ io as SidebarHeader,
178
+ mo as SidebarInset,
179
+ po as SidebarMenu,
180
+ no as SidebarMenuAction,
181
+ lo as SidebarMenuBadge,
182
+ So as SidebarMenuButton,
183
+ bo as SidebarMenuItem,
184
+ xo as SidebarMenuSkeleton,
185
+ fo as SidebarMenuSub,
186
+ co as SidebarMenuSubButton,
187
+ Do as SidebarMenuSubItem,
188
+ uo as SidebarProvider,
189
+ Co as SidebarRail,
190
+ go as SidebarSeparator,
191
+ so as SidebarTrigger,
192
+ Po as Skeleton,
193
+ he as SwipableDrawer,
194
+ Me as SwipableDrawerClose,
195
+ Be as SwipableDrawerContent,
196
+ Ge as SwipableDrawerDescription,
197
+ Ie as SwipableDrawerFooter,
198
+ Ae as SwipableDrawerHeader,
199
+ Re as SwipableDrawerTitle,
200
+ ve as SwipableDrawerTrigger,
201
+ ko as Switch,
202
+ Mo as Tabs,
203
+ Bo as TabsContent,
204
+ Go as TabsList,
205
+ Io as TabsTrigger,
206
+ Ro as TextField,
207
+ Y as TimePicker,
208
+ Lo as Toast,
209
+ Oo as Tooltip,
210
+ Vo as TooltipContent,
211
+ zo as TooltipProvider,
212
+ Uo as TooltipTrigger,
213
+ m as buttonVariants,
214
+ Ko as cn,
215
+ yo as toast,
216
+ J as useConfirm,
217
+ le as useDataGrid,
218
+ qo as useIsMobile,
219
+ To as useSidebar
208
220
  };
209
221
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,12 +1,12 @@
1
- import { jsxs as t, Fragment as D, jsx as e } from "react/jsx-runtime";
2
- import * as d from "react";
3
- import { VisuallyHidden as M } from "@radix-ui/react-visually-hidden";
4
- import { Calendar as v } from "@trsys-tech/matrix-icons";
1
+ import { jsxs as r, Fragment as C, jsx as e } from "react/jsx-runtime";
2
+ import * as c from "react";
3
+ import { VisuallyHidden as D } from "@radix-ui/react-visually-hidden";
4
+ import { Calendar as w } from "@trsys-tech/matrix-icons";
5
5
  import { cn as m } from "./utils.es.js";
6
- import { Calendar as k } from "./calendar.es.js";
7
- import { Button as i } from "./button.es.js";
8
- import { Dialog as w, DialogContent as j, DialogHeader as P, DialogTitle as O, DialogDescription as S } from "./dialog.es.js";
9
- import { formatDate as o } from "./format.es.js";
6
+ import { Calendar as M } from "./calendar.es.js";
7
+ import { Button as n } from "./button.es.js";
8
+ import { Dialog as k, DialogContent as j, DialogHeader as P, DialogTitle as O, DialogDescription as S } from "./dialog.es.js";
9
+ import { formatDate as s } from "./format.es.js";
10
10
  const V = ({
11
11
  formatStr: l,
12
12
  selected: a,
@@ -14,48 +14,48 @@ const V = ({
14
14
  className: f,
15
15
  calendarClassName: h,
16
16
  cancelText: u,
17
- applyText: x,
18
- onSelect: g,
19
- disabled: y,
20
- ...b
17
+ applyText: b,
18
+ onSelect: x,
19
+ disabled: g,
20
+ ...y
21
21
  }) => {
22
- const [N, n] = d.useState(!1), [r, s] = d.useState(a), c = () => {
23
- n(!1), s(a);
24
- }, C = () => {
25
- g?.(r), n(!1);
22
+ const [v, o] = c.useState(!1), [t, i] = c.useState(a), d = () => {
23
+ o(!1), i(a);
24
+ }, N = () => {
25
+ x?.(t), o(!1);
26
26
  };
27
- return /* @__PURE__ */ t(D, { children: [
28
- /* @__PURE__ */ t(
29
- i,
27
+ return /* @__PURE__ */ r(C, { children: [
28
+ /* @__PURE__ */ r(
29
+ n,
30
30
  {
31
- variant: "outline",
31
+ variant: "text",
32
32
  className: m(
33
- "w-full border-gray-300 text-text focus:ring-0 active:ring-transparent justify-start disabled:bg-gray-100",
34
- !a && "text-muted-foreground",
33
+ "flex h-8 w-full items-center justify-between whitespace-nowrap rounded-sm border border-input bg-transparent ps-3 pe-1 py-1.5 text-sm ring-offset-background data-[placeholder]:text-muted-foreground hover:border hover:border-primary hover:bg-transparent focus:border focus:border-primary focus:outline-none focus:ring focus:ring-primary-100 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-text-300 disabled:border-gray-100 [&>span]:line-clamp-1 [&_svg]:disabled:text-text-300",
35
34
  f
36
35
  ),
37
- onClick: () => n(!0),
38
- "aria-label": a ? `Selected date: ${o(a, l ?? "yyyy/MM/dd")}` : "Pick a date",
39
- disabled: y,
36
+ "data-placeholder": a ? void 0 : "",
37
+ onClick: () => o(!0),
38
+ "aria-label": a ? `Selected date: ${s(a, l ?? "yyyy/MM/dd")}` : "Pick a date",
39
+ disabled: g,
40
40
  children: [
41
- a ? o(a, l ?? "eee, MMM dd") : /* @__PURE__ */ e("span", { children: p ?? "Pick a date" }),
42
- /* @__PURE__ */ e(v, { className: "mr-2 h-5 w-5 ms-auto" })
41
+ a ? s(a, l ?? "eee, MMM dd") : /* @__PURE__ */ e("span", { children: p ?? "Pick a date" }),
42
+ /* @__PURE__ */ e(w, { className: "mr-2 h-5 w-5 ms-auto" })
43
43
  ]
44
44
  }
45
45
  ),
46
- /* @__PURE__ */ e(w, { open: N, onOpenChange: c, children: /* @__PURE__ */ t(j, { className: "h-dscreen w-screen p-0 flex flex-col gap-0 data-[state=open]:animate-slide-from-bottom data-[state=closed]:animate-slide-to-bottom overflow-auto max-w-screen-2xl sm:rounded-none", children: [
47
- /* @__PURE__ */ t(P, { className: "p-4 border-b border-b-gray-200", children: [
48
- /* @__PURE__ */ e(O, { asChild: !0, children: /* @__PURE__ */ t("div", { className: "text-sm font-bold space-y-1 mt-3", children: [
49
- /* @__PURE__ */ e("h5", { className: "text-text-300", children: r?.getFullYear() ?? /* @__PURE__ */ e("pre", { children: " " }) }),
50
- /* @__PURE__ */ e("h6", { className: "", children: r ? o(r, l ?? "eee, MMM dd") : /* @__PURE__ */ e("pre", { children: " " }) })
46
+ /* @__PURE__ */ e(k, { open: v, onOpenChange: d, children: /* @__PURE__ */ r(j, { className: "h-dscreen w-screen p-0 flex flex-col gap-0 data-[state=open]:animate-slide-from-bottom data-[state=closed]:animate-slide-to-bottom overflow-auto max-w-screen-2xl sm:rounded-none", children: [
47
+ /* @__PURE__ */ r(P, { className: "p-4 border-b border-b-gray-200", children: [
48
+ /* @__PURE__ */ e(O, { asChild: !0, children: /* @__PURE__ */ r("div", { className: "text-sm font-bold space-y-1 mt-3", children: [
49
+ /* @__PURE__ */ e("h5", { className: "text-text-300", children: t?.getFullYear() ?? /* @__PURE__ */ e("pre", { children: " " }) }),
50
+ /* @__PURE__ */ e("h6", { className: "", children: t ? s(t, l ?? "eee, MMM dd") : /* @__PURE__ */ e("pre", { children: " " }) })
51
51
  ] }) }),
52
- /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(S, { children: "Date Picker" }) })
52
+ /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(S, { children: "Date Picker" }) })
53
53
  ] }),
54
- /* @__PURE__ */ t("div", { className: "flex-1 flex flex-col items-center p-4", children: [
55
- /* @__PURE__ */ e(k, { ...b, mode: "single", selected: r, onSelect: s, className: m("p-0", h) }),
56
- /* @__PURE__ */ t("div", { className: "flex justify-center items-center gap-4 mt-auto w-full", children: [
57
- /* @__PURE__ */ e(i, { variant: "text", className: "flex-1 h-10", onClick: c, children: u ?? "Cancel" }),
58
- /* @__PURE__ */ e(i, { variant: "primary", className: "flex-1 h-10", onClick: C, children: x ?? "Apply" })
54
+ /* @__PURE__ */ r("div", { className: "flex-1 flex flex-col items-center p-4", children: [
55
+ /* @__PURE__ */ e(M, { ...y, mode: "single", selected: t, onSelect: i, className: m("p-0", h) }),
56
+ /* @__PURE__ */ r("div", { className: "flex justify-center items-center gap-4 mt-auto w-full", children: [
57
+ /* @__PURE__ */ e(n, { variant: "text", className: "flex-1 h-10", onClick: d, children: u ?? "Cancel" }),
58
+ /* @__PURE__ */ e(n, { variant: "primary", className: "flex-1 h-10", onClick: N, children: b ?? "Apply" })
59
59
  ] })
60
60
  ] })
61
61
  ] }) })
@@ -1 +1 @@
1
- {"version":3,"file":"mobiledatepicker.es.js","sources":["../src/components/date-picker/MobileDatePicker.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport { format } from \"date-fns\";\r\nimport { PropsBase, PropsSingle } from \"react-day-picker\";\r\nimport { VisuallyHidden } from \"@radix-ui/react-visually-hidden\";\r\nimport { Calendar as CalendarIcon } from \"@trsys-tech/matrix-icons\";\r\n\r\nimport { cn } from \"../../lib/utils\";\r\nimport { Calendar } from \"./calendar\";\r\nimport { Button } from \"../button/Button\";\r\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from \"../dialog/Dialog\";\r\n\r\ntype MobileDatePickerProps = PropsBase &\r\n Omit<PropsSingle, \"mode\"> & {\r\n formatStr?: string;\r\n placeholder?: string;\r\n calendarClassName?: string;\r\n selected?: Date;\r\n required?: boolean;\r\n cancelText?: string;\r\n applyText?: string;\r\n onSelect?: (date: Date | undefined) => void;\r\n disabled?: boolean;\r\n };\r\n\r\nconst MobileDatePicker: React.FC<MobileDatePickerProps> = ({\r\n formatStr,\r\n selected,\r\n placeholder,\r\n className,\r\n calendarClassName,\r\n cancelText,\r\n applyText,\r\n onSelect,\r\n disabled,\r\n ...props\r\n}) => {\r\n const [isOpen, setIsOpen] = React.useState(false);\r\n const [selectedDate, setSelectedDate] = React.useState<Date | undefined>(selected);\r\n\r\n const handleCancel = () => {\r\n setIsOpen(false);\r\n setSelectedDate(selected);\r\n };\r\n\r\n const handleApply = () => {\r\n onSelect?.(selectedDate);\r\n setIsOpen(false);\r\n };\r\n\r\n return (\r\n <>\r\n <Button\r\n variant={\"outline\"}\r\n className={cn(\r\n \"w-full border-gray-300 text-text focus:ring-0 active:ring-transparent justify-start disabled:bg-gray-100\",\r\n !selected && \"text-muted-foreground\",\r\n className,\r\n )}\r\n onClick={() => setIsOpen(true)}\r\n aria-label={selected ? `Selected date: ${format(selected, formatStr ?? \"yyyy/MM/dd\")}` : \"Pick a date\"}\r\n disabled={disabled}\r\n >\r\n {selected ? format(selected, formatStr ?? \"eee, MMM dd\") : <span>{placeholder ?? \"Pick a date\"}</span>}\r\n <CalendarIcon className=\"mr-2 h-5 w-5 ms-auto\" />\r\n </Button>\r\n <Dialog open={isOpen} onOpenChange={handleCancel}>\r\n <DialogContent className=\"h-dscreen w-screen p-0 flex flex-col gap-0 data-[state=open]:animate-slide-from-bottom data-[state=closed]:animate-slide-to-bottom overflow-auto max-w-screen-2xl sm:rounded-none\">\r\n <DialogHeader className=\"p-4 border-b border-b-gray-200\">\r\n <DialogTitle asChild>\r\n <div className=\"text-sm font-bold space-y-1 mt-3\">\r\n <h5 className=\"text-text-300\">{selectedDate?.getFullYear() ?? <pre> </pre>}</h5>\r\n <h6 className=\"\">{selectedDate ? format(selectedDate, formatStr ?? \"eee, MMM dd\") : <pre> </pre>}</h6>\r\n </div>\r\n </DialogTitle>\r\n <VisuallyHidden>\r\n <DialogDescription>{\"Date Picker\"}</DialogDescription>\r\n </VisuallyHidden>\r\n </DialogHeader>\r\n <div className=\"flex-1 flex flex-col items-center p-4\">\r\n <Calendar {...props} mode=\"single\" selected={selectedDate} onSelect={setSelectedDate} className={cn(\"p-0\", calendarClassName)} />\r\n <div className=\"flex justify-center items-center gap-4 mt-auto w-full\">\r\n <Button variant=\"text\" className=\"flex-1 h-10\" onClick={handleCancel}>\r\n {cancelText ?? \"Cancel\"}\r\n </Button>\r\n <Button variant=\"primary\" className=\"flex-1 h-10\" onClick={handleApply}>\r\n {applyText ?? \"Apply\"}\r\n </Button>\r\n </div>\r\n </div>\r\n </DialogContent>\r\n </Dialog>\r\n </>\r\n );\r\n};\r\n\r\nexport { MobileDatePicker, type MobileDatePickerProps };\r\n"],"names":["MobileDatePicker","formatStr","selected","placeholder","className","calendarClassName","cancelText","applyText","onSelect","disabled","props","isOpen","setIsOpen","React","selectedDate","setSelectedDate","handleCancel","handleApply","jsxs","Fragment","Button","cn","format","jsx","CalendarIcon","Dialog","DialogContent","DialogHeader","DialogTitle","Vis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UAAA;AAAA,QAAA,gBAAAJ,EAACK,KAAY,SAAO,IAClB,UAAC,gBAAAV,EAAA,OAAA,EAAI,WAAU,oCACb,UAAA;AAAA,UAAC,gBAAAK,EAAA,MAAA,EAAG,WAAU,iBAAiB,UAAAT,GAAc,iBAAiB,gBAAAS,EAAC,OAAI,EAAA,UAAA,IAAA,CAAC,EAAO,CAAA;AAAA,UAC1E,gBAAAA,EAAA,MAAA,EAAG,WAAU,IAAI,UAAeT,IAAAQ,EAAOR,GAAcb,KAAa,aAAa,IAAK,gBAAAsB,EAAA,OAAA,EAAI,eAAC,EAAO,CAAA;AAAA,QAAA,EAAA,CACnG,EACF,CAAA;AAAA,QACC,gBAAAA,EAAAM,GAAA,EACC,UAAC,gBAAAN,EAAAO,GAAA,EAAmB,yBAAc,EACpC,CAAA;AAAA,MAAA,GACF;AAAA,MACA,gBAAAZ,EAAC,OAAI,EAAA,WAAU,yCACb,UAAA;AAAA,QAAA,gBAAAK,EAACQ,GAAU,EAAA,GAAGrB,GAAO,MAAK,UAAS,UAAUI,GAAc,UAAUC,GAAiB,WAAWM,EAAG,OAAOhB,CAAiB,GAAG;AAAA,QAC/H,gBAAAa,EAAC,OAAI,EAAA,WAAU,yDACb,UAAA;AAAA,UAAC,gBAAAK,EAAAH,GAAA,EAAO,SAAQ,QAAO,WAAU,eAAc,SAASJ,GACrD,eAAc,SACjB,CAAA;AAAA,UACA,gBAAAO,EAACH,KAAO,SAAQ,WAAU,WAAU,eAAc,SAASH,GACxD,UAAAV,KAAa,QAChB,CAAA;AAAA,QAAA,EACF,CAAA;AAAA,MAAA,EACF,CAAA;AAAA,IAAA,EAAA,CACF,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"mobiledatepicker.es.js","sources":["../src/components/date-picker/MobileDatePicker.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport { format } from \"date-fns\";\r\nimport { PropsBase, PropsSingle } from \"react-day-picker\";\r\nimport { VisuallyHidden } from \"@radix-ui/react-visually-hidden\";\r\nimport { Calendar as CalendarIcon } from \"@trsys-tech/matrix-icons\";\r\n\r\nimport { cn } from \"../../lib/utils\";\r\nimport { Calendar } from \"./calendar\";\r\nimport { Button } from \"../button/Button\";\r\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from \"../dialog/Dialog\";\r\n\r\ntype MobileDatePickerProps = PropsBase &\r\n Omit<PropsSingle, \"mode\"> & {\r\n formatStr?: string;\r\n placeholder?: string;\r\n calendarClassName?: string;\r\n selected?: Date;\r\n required?: boolean;\r\n cancelText?: string;\r\n applyText?: string;\r\n onSelect?: (date: Date | undefined) => void;\r\n disabled?: boolean;\r\n };\r\n\r\nconst MobileDatePicker: React.FC<MobileDatePickerProps> = ({\r\n formatStr,\r\n selected,\r\n placeholder,\r\n className,\r\n calendarClassName,\r\n cancelText,\r\n applyText,\r\n onSelect,\r\n disabled,\r\n ...props\r\n}) => {\r\n const [isOpen, setIsOpen] = React.useState(false);\r\n const [selectedDate, setSelectedDate] = React.useState<Date | undefined>(selected);\r\n\r\n const handleCancel = () => {\r\n setIsOpen(false);\r\n setSelectedDate(selected);\r\n };\r\n\r\n const handleApply = () => {\r\n onSelect?.(selectedDate);\r\n setIsOpen(false);\r\n };\r\n\r\n return (\r\n <>\r\n <Button\r\n variant=\"text\"\r\n className={cn(\r\n \"flex h-8 w-full items-center justify-between whitespace-nowrap rounded-sm border border-input bg-transparent ps-3 pe-1 py-1.5 text-sm ring-offset-background data-[placeholder]:text-muted-foreground hover:border hover:border-primary hover:bg-transparent focus:border focus:border-primary focus:outline-none focus:ring focus:ring-primary-100 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-text-300 disabled:border-gray-100 [&>span]:line-clamp-1 [&_svg]:disabled:text-text-300\",\r\n className,\r\n )}\r\n data-placeholder={!selected ? \"\" : undefined}\r\n onClick={() => setIsOpen(true)}\r\n aria-label={selected ? `Selected date: ${format(selected, formatStr ?? \"yyyy/MM/dd\")}` : \"Pick a date\"}\r\n disabled={disabled}\r\n >\r\n {selected ? format(selected, formatStr ?? \"eee, MMM dd\") : <span>{placeholder ?? \"Pick a date\"}</span>}\r\n <CalendarIcon className=\"mr-2 h-5 w-5 ms-auto\" />\r\n </Button>\r\n <Dialog open={isOpen} onOpenChange={handleCancel}>\r\n <DialogContent className=\"h-dscreen w-screen p-0 flex flex-col gap-0 data-[state=open]:animate-slide-from-bottom data-[state=closed]:animate-slide-to-bottom overflow-auto max-w-screen-2xl sm:rounded-none\">\r\n <DialogHeader className=\"p-4 border-b border-b-gray-200\">\r\n <DialogTitle asChild>\r\n <div className=\"text-sm font-bold space-y-1 mt-3\">\r\n <h5 className=\"text-text-300\">{selectedDate?.getFullYear() ?? <pre> </pre>}</h5>\r\n <h6 className=\"\">{selectedDate ? format(selectedDate, formatStr ?? \"eee, MMM dd\") : <pre> </pre>}</h6>\r\n </div>\r\n </DialogTitle>\r\n <VisuallyHidden>\r\n <DialogDescription>{\"Date Picker\"}</DialogDescription>\r\n </VisuallyHidden>\r\n </DialogHeader>\r\n <div className=\"flex-1 flex flex-col items-center p-4\">\r\n <Calendar {...props} mode=\"single\" selected={selectedDate} onSelect={setSelectedDate} className={cn(\"p-0\", calendarClassName)} />\r\n <div className=\"flex justify-center items-center gap-4 mt-auto w-full\">\r\n <Button variant=\"text\" className=\"flex-1 h-10\" onClick={handleCancel}>\r\n {cancelText ?? \"Cancel\"}\r\n </Button>\r\n <Button variant=\"primary\" className=\"flex-1 h-10\" onClick={handleApply}>\r\n {applyText ?? \"Apply\"}\r\n </Button>\r\n </div>\r\n </div>\r\n </DialogContent>\r\n </Dialog>\r\n </>\r\n );\r\n};\r\n\r\nexport { MobileDatePicker, type MobileDatePickerProps };\r\n"],"names":["MobileDatePicker","formatStr","selected","placeholder","className","calendarClassName","cancelText","applyText","onSelect","disabled","props","isOpen","setIsOpen","React","selectedDate","setSelectedDate","handleCancel","handleApply","jsxs","Fragment","Button","cn","format","jsx","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