@trsys-tech/matrix-library 0.3.4 → 0.3.6

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 (105) hide show
  1. package/dist/accordion.es.js +40 -0
  2. package/dist/accordion.es.js.map +1 -0
  3. package/dist/avatar.es.js +20 -0
  4. package/dist/avatar.es.js.map +1 -0
  5. package/dist/badge.es.js.map +1 -1
  6. package/dist/breadcrumb.es.js.map +1 -1
  7. package/dist/button.es.js.map +1 -1
  8. package/dist/calendar.es.js.map +1 -1
  9. package/dist/card.es.js.map +1 -1
  10. package/dist/chip.es.js.map +1 -1
  11. package/dist/collapsible.es.js.map +1 -1
  12. package/dist/combobox.es.js +84 -32
  13. package/dist/combobox.es.js.map +1 -1
  14. package/dist/command.es.js +58 -50
  15. package/dist/command.es.js.map +1 -1
  16. package/dist/components/badge/Badge.d.ts.map +1 -1
  17. package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -1
  18. package/dist/components/button/Button.d.ts.map +1 -1
  19. package/dist/components/card/Card.d.ts.map +1 -1
  20. package/dist/components/chip/Chip.d.ts.map +1 -1
  21. package/dist/components/collapsible/Collapsible.d.ts.map +1 -1
  22. package/dist/components/combobox/Combobox.d.ts +68 -59
  23. package/dist/components/combobox/Combobox.d.ts.map +1 -1
  24. package/dist/components/command/Command.d.ts +12 -9
  25. package/dist/components/command/Command.d.ts.map +1 -1
  26. package/dist/components/confirm/Confirm.d.ts.map +1 -1
  27. package/dist/components/data-grid/DataGrid.d.ts.map +1 -1
  28. package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
  29. package/dist/components/date-picker/DateRangePicker.d.ts.map +1 -1
  30. package/dist/components/date-picker/DesktopTimePicker.d.ts.map +1 -1
  31. package/dist/components/date-picker/MobileTimePicker.d.ts.map +1 -1
  32. package/dist/components/date-picker/TimePicker.d.ts.map +1 -1
  33. package/dist/components/date-picker/calendar.d.ts.map +1 -1
  34. package/dist/components/dialog/Dialog.d.ts.map +1 -1
  35. package/dist/components/form/Form.d.ts.map +1 -1
  36. package/dist/components/form-checkbox/FormCheckbox.d.ts.map +1 -1
  37. package/dist/components/form-combobox/FormCombobox.d.ts +2 -7
  38. package/dist/components/form-combobox/FormCombobox.d.ts.map +1 -1
  39. package/dist/components/form-date-picker/FormDatePicker.d.ts.map +1 -1
  40. package/dist/components/form-date-range-picker/FormDateRangePicker.d.ts.map +1 -1
  41. package/dist/components/form-input/FormInput.d.ts.map +1 -1
  42. package/dist/components/form-multi-select/FormMultiSelect.d.ts.map +1 -1
  43. package/dist/components/form-rating/FormRating.d.ts.map +1 -1
  44. package/dist/components/form-select/FormSelect.d.ts.map +1 -1
  45. package/dist/components/form-switch/FormSwitch.d.ts.map +1 -1
  46. package/dist/components/form-textarea/FormTextarea.d.ts.map +1 -1
  47. package/dist/components/form-time-picker/FormTimePicker.d.ts.map +1 -1
  48. package/dist/components/icon-botton/IconButton.d.ts.map +1 -1
  49. package/dist/components/modal/Modal.d.ts.map +1 -1
  50. package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
  51. package/dist/components/select/Select.d.ts.map +1 -1
  52. package/dist/components/tabs/Tabs.d.ts.map +1 -1
  53. package/dist/components/text-field/TextField.d.ts.map +1 -1
  54. package/dist/components/toast/Toast.d.ts.map +1 -1
  55. package/dist/components/toast/toast-components.d.ts.map +1 -1
  56. package/dist/components/toast/use-toast.d.ts.map +1 -1
  57. package/dist/confirm.es.js.map +1 -1
  58. package/dist/contextmenu.es.js +116 -0
  59. package/dist/contextmenu.es.js.map +1 -0
  60. package/dist/datagrid.es.js.map +1 -1
  61. package/dist/datepicker.es.js.map +1 -1
  62. package/dist/daterangepicker.es.js.map +1 -1
  63. package/dist/desktopdatepicker.es.js +33 -33
  64. package/dist/desktopdatepicker.es.js.map +1 -1
  65. package/dist/desktopdaterangepicker.es.js +33 -33
  66. package/dist/desktopdaterangepicker.es.js.map +1 -1
  67. package/dist/desktoptimepicker.es.js +27 -23
  68. package/dist/desktoptimepicker.es.js.map +1 -1
  69. package/dist/dialog.es.js.map +1 -1
  70. package/dist/form.es.js.map +1 -1
  71. package/dist/formcheckbox.es.js.map +1 -1
  72. package/dist/formcombobox.es.js +47 -104
  73. package/dist/formcombobox.es.js.map +1 -1
  74. package/dist/formdatepicker.es.js.map +1 -1
  75. package/dist/formdaterangepicker.es.js.map +1 -1
  76. package/dist/forminput.es.js.map +1 -1
  77. package/dist/formmultiselect.es.js.map +1 -1
  78. package/dist/formrating.es.js.map +1 -1
  79. package/dist/formselect.es.js.map +1 -1
  80. package/dist/formswitch.es.js.map +1 -1
  81. package/dist/formtextarea.es.js.map +1 -1
  82. package/dist/formtimepicker.es.js.map +1 -1
  83. package/dist/iconbutton.es.js.map +1 -1
  84. package/dist/index.d.ts +11 -5
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.es.js +246 -215
  87. package/dist/index.es.js.map +1 -1
  88. package/dist/mobiledatepicker.es.js +38 -38
  89. package/dist/mobiledatepicker.es.js.map +1 -1
  90. package/dist/mobiledaterangepicker.es.js +51 -51
  91. package/dist/mobiledaterangepicker.es.js.map +1 -1
  92. package/dist/mobiletimepicker.es.js +30 -26
  93. package/dist/mobiletimepicker.es.js.map +1 -1
  94. package/dist/modal.es.js.map +1 -1
  95. package/dist/multiselect.es.js +114 -106
  96. package/dist/multiselect.es.js.map +1 -1
  97. package/dist/select.es.js.map +1 -1
  98. package/dist/style.css +1 -1
  99. package/dist/tabs.es.js.map +1 -1
  100. package/dist/textfield.es.js.map +1 -1
  101. package/dist/timepicker.es.js.map +1 -1
  102. package/dist/toast-components.es.js.map +1 -1
  103. package/dist/toast.es.js.map +1 -1
  104. package/dist/use-toast.es.js.map +1 -1
  105. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -1,219 +1,250 @@
1
1
  /* empty css */
2
- import { Badge as t } from "./badge.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
- import { Checkbox as P } from "./checkbox.es.js";
7
- import { Chip as k } from "./chip.es.js";
8
- import { Command as M, CommandDialog as B, CommandEmpty as G, CommandGroup as I, CommandInput as A, CommandItem as R, CommandList as v, CommandSeparator as L, CommandShortcut as H } from "./command.es.js";
9
- import { Collapsible as E, CollapsibleContent as O, CollapsibleTrigger as V } from "./collapsible.es.js";
10
- import { ConfirmProvider as U, useConfirm as j } from "./confirm.es.js";
11
- import { DatePicker as J } from "./datepicker.es.js";
12
- import { DateRangePicker as N } from "./daterangepicker.es.js";
13
- import { TimePicker as W } from "./timepicker.es.js";
14
- import { Calendar as Y } from "./calendar.es.js";
15
- import { DataGrid as _, DataGridActionBar as $, DataGridContent as ee, DeleteAction as re, ExtraActions as oe, FreezeAction as te, PrintAction as ae, RefreshAction as ie, SearchAction as me, useDataGrid as pe } from "./datagrid.es.js";
16
- import { Dialog as le, DialogClose as Se, DialogContent as de, DialogDescription as be, DialogFooter as xe, DialogHeader as fe, DialogOverlay as ce, DialogPortal as De, DialogTitle as ue, DialogTrigger as Ce } from "./dialog.es.js";
17
- import { Drawer as se, DrawerContent as Te, DrawerMain as Fe } from "./drawer.es.js";
18
- import { SwipableDrawer as we, SwipableDrawerClose as ke, SwipableDrawerContent as he, SwipableDrawerDescription as Me, SwipableDrawerFooter as Be, SwipableDrawerHeader as Ge, SwipableDrawerTitle as Ie, SwipableDrawerTrigger as Ae } from "./swipabledrawer.es.js";
19
- import { Form as ve, FormControl as Le, FormDescription as He, FormField as ye, FormItem as Ee, FormLabel as Oe, FormMessage as Ve } from "./form.es.js";
20
- import { FormCheckbox as Ue } from "./formcheckbox.es.js";
21
- import { FormCombobox as qe } from "./formcombobox.es.js";
22
- import { FormDatePicker as Ke } from "./formdatepicker.es.js";
23
- import { FormDateRangePicker as Qe } from "./formdaterangepicker.es.js";
24
- import { FormInput as Xe } from "./forminput.es.js";
25
- import { FormMultiSelect as Ze } from "./formmultiselect.es.js";
26
- import { FormRating as $e } from "./formrating.es.js";
27
- import { FormSelect as rr } from "./formselect.es.js";
28
- import { FormSwitch as tr } from "./formswitch.es.js";
29
- import { FormTextarea as ir } from "./formtextarea.es.js";
30
- import { FormTimePicker as pr } from "./formtimepicker.es.js";
31
- import { IconButton as lr } from "./iconbutton.es.js";
32
- import { Label as dr } from "./label.es.js";
33
- import { Modal as xr, ModalFooter as fr } from "./modal.es.js";
34
- import { Popover as Dr, PopoverAnchor as ur, PopoverContent as Cr, PopoverTrigger as gr } from "./popover.es.js";
35
- import { Rating as Tr } from "./rating.es.js";
36
- import { RadioGroup as Pr, RadioGroupItem as wr } from "./radiogroup.es.js";
37
- import { Select as hr, SelectContent as Mr, SelectGroup as Br, SelectItem as Gr, SelectLabel as Ir, SelectScrollDownButton as Ar, SelectScrollUpButton as Rr, SelectSeparator as vr, SelectTrigger as Lr, SelectValue as Hr } from "./select.es.js";
38
- import { Separator as Er } from "./separator.es.js";
39
- import { Sheet as Vr, SheetClose as zr, SheetContent as Ur, SheetDescription as jr, SheetFooter as qr, SheetHeader as Jr, SheetOverlay as Kr, SheetPortal as Nr, SheetTitle as Qr, SheetTrigger as Wr } from "./sheet.es.js";
40
- import { Sidebar as Yr, SidebarContent as Zr, SidebarFooter as _r, SidebarGroup as $r, SidebarGroupAction as eo, SidebarGroupContent as ro, SidebarGroupLabel as oo, SidebarHeader as to, SidebarInset as ao, SidebarMenu as io, SidebarMenuAction as mo, SidebarMenuBadge as po, SidebarMenuButton as no, SidebarMenuItem as lo, SidebarMenuSkeleton as So, SidebarMenuSub as bo, SidebarMenuSubButton as xo, SidebarMenuSubItem as fo, SidebarProvider as co, SidebarRail as Do, SidebarSeparator as uo, SidebarTrigger as Co, useSidebar as go } from "./sidebar.es.js";
41
- import { Skeleton as To } from "./skeleton.es.js";
42
- import { Switch as Po } from "./switch.es.js";
43
- import { Tabs as ko, TabsContent as ho, TabsList as Mo, TabsTrigger as Bo } from "./tabs.es.js";
44
- import { TextField as Io } from "./textfield.es.js";
45
- import { Toast as Ro } from "./toast.es.js";
46
- import { toast as Lo } from "./use-toast.es.js";
47
- import { Tooltip as yo, TooltipContent as Eo, TooltipProvider as Oo, TooltipTrigger as Vo } from "./tooltip.es.js";
48
- import { useIsMobile as Uo } from "./use-mobile.es.js";
49
- import { cn as qo } from "./utils.es.js";
50
- import { DesktopDatePicker as Ko } from "./desktopdatepicker.es.js";
51
- import { MobileDatePicker as Qo } from "./mobiledatepicker.es.js";
52
- import { DesktopDateRangePicker as Xo } from "./desktopdaterangepicker.es.js";
53
- import { MobileDateRangePicker as Zo } from "./mobiledaterangepicker.es.js";
54
- import { MobileTimePicker as $o } from "./mobiletimepicker.es.js";
55
- import { DesktopTimePicker as rt } from "./desktoptimepicker.es.js";
2
+ import { Accordion as t, AccordionContent as a, AccordionItem as i, AccordionTrigger as n } from "./accordion.es.js";
3
+ import { Avatar as p, AvatarFallback as l, AvatarImage as x } from "./avatar.es.js";
4
+ import { Badge as d } from "./badge.es.js";
5
+ import { Breadcrumb as c, BreadcrumbEllipsis as u, BreadcrumbItem as f, BreadcrumbLink as C, BreadcrumbList as g, BreadcrumbPage as D, BreadcrumbSeparator as s } from "./breadcrumb.es.js";
6
+ import { Button as T, buttonVariants as F } from "./button.es.js";
7
+ import { Calendar as k } from "./calendar.es.js";
8
+ import { Card as h, CardContent as A, CardDescription as I, CardFooter as B, CardHeader as G, CardTitle as v } from "./card.es.js";
9
+ import { Checkbox as L } from "./checkbox.es.js";
10
+ import { Chip as y } from "./chip.es.js";
11
+ import { Collapsible as O, CollapsibleContent as V, CollapsibleTrigger as z } from "./collapsible.es.js";
12
+ import { Combobox as j } from "./combobox.es.js";
13
+ import { Command as J, CommandDialog as K, CommandEmpty as N, CommandGroup as Q, CommandInput as W, CommandItem as X, CommandList as Y, CommandSeparator as Z, CommandShortcut as _ } from "./command.es.js";
14
+ import { ConfirmProvider as ee, useConfirm as re } from "./confirm.es.js";
15
+ import { ContextMenu as te, ContextMenuCheckboxItem as ae, ContextMenuContent as ie, ContextMenuGroup as ne, ContextMenuItem as me, ContextMenuLabel as pe, ContextMenuPortal as le, ContextMenuRadioGroup as xe, ContextMenuRadioItem as Se, ContextMenuSeparator as de, ContextMenuShortcut as be, ContextMenuSub as ce, ContextMenuSubContent as ue, ContextMenuSubTrigger as fe, ContextMenuTrigger as Ce } from "./contextmenu.es.js";
16
+ import { DataGrid as De, DataGridActionBar as se, DataGridContent as Me, DeleteAction as Te, ExtraActions as Fe, FreezeAction as Pe, PrintAction as ke, RefreshAction as we, SearchAction as he, useDataGrid as Ae } from "./datagrid.es.js";
17
+ import { DatePicker as Be } from "./datepicker.es.js";
18
+ import { DateRangePicker as ve } from "./daterangepicker.es.js";
19
+ import { TimePicker as Le } from "./timepicker.es.js";
20
+ import { Dialog as ye, DialogClose as Ee, DialogContent as Oe, DialogDescription as Ve, DialogFooter as ze, DialogHeader as Ue, DialogOverlay as je, DialogPortal as qe, DialogTitle as Je, DialogTrigger as Ke } from "./dialog.es.js";
21
+ import { Drawer as Qe, DrawerContent as We, DrawerMain as Xe } from "./drawer.es.js";
22
+ import { SwipableDrawer as Ze, SwipableDrawerClose as _e, SwipableDrawerContent as $e, SwipableDrawerDescription as er, SwipableDrawerFooter as rr, SwipableDrawerHeader as or, SwipableDrawerTitle as tr, SwipableDrawerTrigger as ar } from "./swipabledrawer.es.js";
23
+ import { Form as nr, FormControl as mr, FormDescription as pr, FormField as lr, FormItem as xr, FormLabel as Sr, FormMessage as dr } from "./form.es.js";
24
+ import { FormCheckbox as cr } from "./formcheckbox.es.js";
25
+ import { FormCombobox as fr } from "./formcombobox.es.js";
26
+ import { FormDatePicker as gr } from "./formdatepicker.es.js";
27
+ import { FormDateRangePicker as sr } from "./formdaterangepicker.es.js";
28
+ import { FormInput as Tr } from "./forminput.es.js";
29
+ import { FormMultiSelect as Pr } from "./formmultiselect.es.js";
30
+ import { FormRating as wr } from "./formrating.es.js";
31
+ import { FormSelect as Ar } from "./formselect.es.js";
32
+ import { FormSwitch as Br } from "./formswitch.es.js";
33
+ import { FormTextarea as vr } from "./formtextarea.es.js";
34
+ import { FormTimePicker as Lr } from "./formtimepicker.es.js";
35
+ import { IconButton as yr } from "./iconbutton.es.js";
36
+ import { Label as Or } from "./label.es.js";
37
+ import { Modal as zr, ModalFooter as Ur } from "./modal.es.js";
38
+ import { MultiSelect as qr } from "./multiselect.es.js";
39
+ import { Popover as Kr, PopoverAnchor as Nr, PopoverContent as Qr, PopoverTrigger as Wr } from "./popover.es.js";
40
+ import { RadioGroup as Yr, RadioGroupItem as Zr } from "./radiogroup.es.js";
41
+ import { Rating as $r } from "./rating.es.js";
42
+ import { Select as ro, SelectContent as oo, SelectGroup as to, SelectItem as ao, SelectLabel as io, SelectScrollDownButton as no, SelectScrollUpButton as mo, SelectSeparator as po, SelectTrigger as lo, SelectValue as xo } from "./select.es.js";
43
+ import { Separator as bo } from "./separator.es.js";
44
+ import { Sheet as uo, SheetClose as fo, SheetContent as Co, SheetDescription as go, SheetFooter as Do, SheetHeader as so, SheetOverlay as Mo, SheetPortal as To, SheetTitle as Fo, SheetTrigger as Po } from "./sheet.es.js";
45
+ import { Sidebar as wo, SidebarContent as ho, SidebarFooter as Ao, SidebarGroup as Io, SidebarGroupAction as Bo, SidebarGroupContent as Go, SidebarGroupLabel as vo, SidebarHeader as Ro, SidebarInset as Lo, SidebarMenu as Ho, SidebarMenuAction as yo, SidebarMenuBadge as Eo, SidebarMenuButton as Oo, SidebarMenuItem as Vo, SidebarMenuSkeleton as zo, SidebarMenuSub as Uo, SidebarMenuSubButton as jo, SidebarMenuSubItem as qo, SidebarProvider as Jo, SidebarRail as Ko, SidebarSeparator as No, SidebarTrigger as Qo, useSidebar as Wo } from "./sidebar.es.js";
46
+ import { Skeleton as Yo } from "./skeleton.es.js";
47
+ import { Switch as _o } from "./switch.es.js";
48
+ import { Tabs as et, TabsContent as rt, TabsList as ot, TabsTrigger as tt } from "./tabs.es.js";
49
+ import { TextField as it } from "./textfield.es.js";
50
+ import { Textarea as mt } from "./textarea.es.js";
51
+ import { Toast as lt } from "./toast.es.js";
52
+ import { toast as St } from "./use-toast.es.js";
53
+ import { Tooltip as bt, TooltipContent as ct, TooltipProvider as ut, TooltipTrigger as ft } from "./tooltip.es.js";
54
+ import { useIsMobile as gt } from "./use-mobile.es.js";
55
+ import { cn as st } from "./utils.es.js";
56
+ import { DesktopDatePicker as Tt } from "./desktopdatepicker.es.js";
57
+ import { MobileDatePicker as Pt } from "./mobiledatepicker.es.js";
58
+ import { DesktopDateRangePicker as wt } from "./desktopdaterangepicker.es.js";
59
+ import { MobileDateRangePicker as At } from "./mobiledaterangepicker.es.js";
60
+ import { MobileTimePicker as Bt } from "./mobiletimepicker.es.js";
61
+ import { DesktopTimePicker as vt } from "./desktoptimepicker.es.js";
56
62
  export {
57
- t as Badge,
58
- n as Breadcrumb,
59
- l as BreadcrumbEllipsis,
60
- S as BreadcrumbItem,
61
- d as BreadcrumbLink,
62
- b as BreadcrumbList,
63
- x as BreadcrumbPage,
64
- f as BreadcrumbSeparator,
65
- i as Button,
66
- Y as Calendar,
67
- D as Card,
68
- u as CardContent,
69
- C as CardDescription,
70
- g as CardFooter,
71
- s as CardHeader,
72
- T as CardTitle,
73
- P as Checkbox,
74
- k as Chip,
75
- E as Collapsible,
76
- O as CollapsibleContent,
77
- V as CollapsibleTrigger,
78
- M as Command,
79
- B as CommandDialog,
80
- G as CommandEmpty,
81
- I as CommandGroup,
82
- A as CommandInput,
83
- R as CommandItem,
84
- v as CommandList,
85
- L as CommandSeparator,
86
- H as CommandShortcut,
87
- U as ConfirmProvider,
88
- _ as DataGrid,
89
- $ as DataGridActionBar,
90
- ee as DataGridContent,
91
- J as DatePicker,
92
- N as DateRangePicker,
93
- re as DeleteAction,
94
- Ko as DesktopDatePicker,
95
- Xo as DesktopDateRangePicker,
96
- rt as DesktopTimePicker,
97
- le as Dialog,
98
- Se as DialogClose,
99
- de as DialogContent,
100
- be as DialogDescription,
101
- xe as DialogFooter,
102
- fe as DialogHeader,
103
- ce as DialogOverlay,
104
- De as DialogPortal,
105
- ue as DialogTitle,
106
- Ce as DialogTrigger,
107
- se as Drawer,
108
- Te as DrawerContent,
109
- Fe as DrawerMain,
110
- oe as ExtraActions,
111
- ve as Form,
112
- Ue as FormCheckbox,
113
- qe as FormCombobox,
114
- Le as FormControl,
115
- Ke as FormDatePicker,
116
- Qe as FormDateRangePicker,
117
- He as FormDescription,
118
- ye as FormField,
119
- Xe as FormInput,
120
- Ee as FormItem,
121
- Oe as FormLabel,
122
- Ve as FormMessage,
123
- Ze as FormMultiSelect,
124
- $e as FormRating,
125
- rr as FormSelect,
126
- tr as FormSwitch,
127
- ir as FormTextarea,
128
- pr as FormTimePicker,
129
- te as FreezeAction,
130
- lr as IconButton,
131
- dr as Label,
132
- Qo as MobileDatePicker,
133
- Zo as MobileDateRangePicker,
134
- $o as MobileTimePicker,
135
- xr as Modal,
136
- fr as ModalFooter,
137
- Dr as Popover,
138
- ur as PopoverAnchor,
139
- Cr as PopoverContent,
140
- gr as PopoverTrigger,
141
- ae as PrintAction,
142
- Pr as RadioGroup,
143
- wr as RadioGroupItem,
144
- Tr as Rating,
145
- ie as RefreshAction,
146
- me as SearchAction,
147
- hr as Select,
148
- Mr as SelectContent,
149
- Br as SelectGroup,
150
- Gr as SelectItem,
151
- Ir as SelectLabel,
152
- Ar as SelectScrollDownButton,
153
- Rr as SelectScrollUpButton,
154
- vr as SelectSeparator,
155
- Lr as SelectTrigger,
156
- Hr as SelectValue,
157
- Er as Separator,
158
- Vr as Sheet,
159
- zr as SheetClose,
160
- Ur as SheetContent,
161
- jr as SheetDescription,
162
- qr as SheetFooter,
163
- Jr as SheetHeader,
164
- Kr as SheetOverlay,
165
- Nr as SheetPortal,
166
- Qr as SheetTitle,
167
- Wr as SheetTrigger,
168
- Yr as Sidebar,
169
- Zr as SidebarContent,
170
- _r as SidebarFooter,
171
- $r as SidebarGroup,
172
- eo as SidebarGroupAction,
173
- ro as SidebarGroupContent,
174
- oo as SidebarGroupLabel,
175
- to as SidebarHeader,
176
- ao as SidebarInset,
177
- io as SidebarMenu,
178
- mo as SidebarMenuAction,
179
- po as SidebarMenuBadge,
180
- no as SidebarMenuButton,
181
- lo as SidebarMenuItem,
182
- So as SidebarMenuSkeleton,
183
- bo as SidebarMenuSub,
184
- xo as SidebarMenuSubButton,
185
- fo as SidebarMenuSubItem,
186
- co as SidebarProvider,
187
- Do as SidebarRail,
188
- uo as SidebarSeparator,
189
- Co as SidebarTrigger,
190
- To as Skeleton,
191
- we as SwipableDrawer,
192
- ke as SwipableDrawerClose,
193
- he as SwipableDrawerContent,
194
- Me as SwipableDrawerDescription,
195
- Be as SwipableDrawerFooter,
196
- Ge as SwipableDrawerHeader,
197
- Ie as SwipableDrawerTitle,
198
- Ae as SwipableDrawerTrigger,
199
- Po as Switch,
200
- ko as Tabs,
201
- ho as TabsContent,
202
- Mo as TabsList,
203
- Bo as TabsTrigger,
204
- Io as TextField,
205
- W as TimePicker,
206
- Ro as Toast,
207
- yo as Tooltip,
208
- Eo as TooltipContent,
209
- Oo as TooltipProvider,
210
- Vo as TooltipTrigger,
211
- m as buttonVariants,
212
- qo as cn,
213
- Lo as toast,
214
- j as useConfirm,
215
- pe as useDataGrid,
216
- Uo as useIsMobile,
217
- go as useSidebar
63
+ t as Accordion,
64
+ a as AccordionContent,
65
+ i as AccordionItem,
66
+ n as AccordionTrigger,
67
+ p as Avatar,
68
+ l as AvatarFallback,
69
+ x as AvatarImage,
70
+ d as Badge,
71
+ c as Breadcrumb,
72
+ u as BreadcrumbEllipsis,
73
+ f as BreadcrumbItem,
74
+ C as BreadcrumbLink,
75
+ g as BreadcrumbList,
76
+ D as BreadcrumbPage,
77
+ s as BreadcrumbSeparator,
78
+ T as Button,
79
+ k as Calendar,
80
+ h as Card,
81
+ A as CardContent,
82
+ I as CardDescription,
83
+ B as CardFooter,
84
+ G as CardHeader,
85
+ v as CardTitle,
86
+ L as Checkbox,
87
+ y as Chip,
88
+ O as Collapsible,
89
+ V as CollapsibleContent,
90
+ z as CollapsibleTrigger,
91
+ j as Combobox,
92
+ J as Command,
93
+ K as CommandDialog,
94
+ N as CommandEmpty,
95
+ Q as CommandGroup,
96
+ W as CommandInput,
97
+ X as CommandItem,
98
+ Y as CommandList,
99
+ Z as CommandSeparator,
100
+ _ as CommandShortcut,
101
+ ee as ConfirmProvider,
102
+ te as ContextMenu,
103
+ ae as ContextMenuCheckboxItem,
104
+ ie as ContextMenuContent,
105
+ ne as ContextMenuGroup,
106
+ me as ContextMenuItem,
107
+ pe as ContextMenuLabel,
108
+ le as ContextMenuPortal,
109
+ xe as ContextMenuRadioGroup,
110
+ Se as ContextMenuRadioItem,
111
+ de as ContextMenuSeparator,
112
+ be as ContextMenuShortcut,
113
+ ce as ContextMenuSub,
114
+ ue as ContextMenuSubContent,
115
+ fe as ContextMenuSubTrigger,
116
+ Ce as ContextMenuTrigger,
117
+ De as DataGrid,
118
+ se as DataGridActionBar,
119
+ Me as DataGridContent,
120
+ Be as DatePicker,
121
+ ve as DateRangePicker,
122
+ Te as DeleteAction,
123
+ Tt as DesktopDatePicker,
124
+ wt as DesktopDateRangePicker,
125
+ vt as DesktopTimePicker,
126
+ ye as Dialog,
127
+ Ee as DialogClose,
128
+ Oe as DialogContent,
129
+ Ve as DialogDescription,
130
+ ze as DialogFooter,
131
+ Ue as DialogHeader,
132
+ je as DialogOverlay,
133
+ qe as DialogPortal,
134
+ Je as DialogTitle,
135
+ Ke as DialogTrigger,
136
+ Qe as Drawer,
137
+ We as DrawerContent,
138
+ Xe as DrawerMain,
139
+ Fe as ExtraActions,
140
+ nr as Form,
141
+ cr as FormCheckbox,
142
+ fr as FormCombobox,
143
+ mr as FormControl,
144
+ gr as FormDatePicker,
145
+ sr as FormDateRangePicker,
146
+ pr as FormDescription,
147
+ lr as FormField,
148
+ Tr as FormInput,
149
+ xr as FormItem,
150
+ Sr as FormLabel,
151
+ dr as FormMessage,
152
+ Pr as FormMultiSelect,
153
+ wr as FormRating,
154
+ Ar as FormSelect,
155
+ Br as FormSwitch,
156
+ vr as FormTextarea,
157
+ Lr as FormTimePicker,
158
+ Pe as FreezeAction,
159
+ yr as IconButton,
160
+ Or as Label,
161
+ Pt as MobileDatePicker,
162
+ At as MobileDateRangePicker,
163
+ Bt as MobileTimePicker,
164
+ zr as Modal,
165
+ Ur as ModalFooter,
166
+ qr as MultiSelect,
167
+ Kr as Popover,
168
+ Nr as PopoverAnchor,
169
+ Qr as PopoverContent,
170
+ Wr as PopoverTrigger,
171
+ ke as PrintAction,
172
+ Yr as RadioGroup,
173
+ Zr as RadioGroupItem,
174
+ $r as Rating,
175
+ we as RefreshAction,
176
+ he as SearchAction,
177
+ ro as Select,
178
+ oo as SelectContent,
179
+ to as SelectGroup,
180
+ ao as SelectItem,
181
+ io as SelectLabel,
182
+ no as SelectScrollDownButton,
183
+ mo as SelectScrollUpButton,
184
+ po as SelectSeparator,
185
+ lo as SelectTrigger,
186
+ xo as SelectValue,
187
+ bo as Separator,
188
+ uo as Sheet,
189
+ fo as SheetClose,
190
+ Co as SheetContent,
191
+ go as SheetDescription,
192
+ Do as SheetFooter,
193
+ so as SheetHeader,
194
+ Mo as SheetOverlay,
195
+ To as SheetPortal,
196
+ Fo as SheetTitle,
197
+ Po as SheetTrigger,
198
+ wo as Sidebar,
199
+ ho as SidebarContent,
200
+ Ao as SidebarFooter,
201
+ Io as SidebarGroup,
202
+ Bo as SidebarGroupAction,
203
+ Go as SidebarGroupContent,
204
+ vo as SidebarGroupLabel,
205
+ Ro as SidebarHeader,
206
+ Lo as SidebarInset,
207
+ Ho as SidebarMenu,
208
+ yo as SidebarMenuAction,
209
+ Eo as SidebarMenuBadge,
210
+ Oo as SidebarMenuButton,
211
+ Vo as SidebarMenuItem,
212
+ zo as SidebarMenuSkeleton,
213
+ Uo as SidebarMenuSub,
214
+ jo as SidebarMenuSubButton,
215
+ qo as SidebarMenuSubItem,
216
+ Jo as SidebarProvider,
217
+ Ko as SidebarRail,
218
+ No as SidebarSeparator,
219
+ Qo as SidebarTrigger,
220
+ Yo as Skeleton,
221
+ Ze as SwipableDrawer,
222
+ _e as SwipableDrawerClose,
223
+ $e as SwipableDrawerContent,
224
+ er as SwipableDrawerDescription,
225
+ rr as SwipableDrawerFooter,
226
+ or as SwipableDrawerHeader,
227
+ tr as SwipableDrawerTitle,
228
+ ar as SwipableDrawerTrigger,
229
+ _o as Switch,
230
+ et as Tabs,
231
+ rt as TabsContent,
232
+ ot as TabsList,
233
+ tt as TabsTrigger,
234
+ it as TextField,
235
+ mt as Textarea,
236
+ Le as TimePicker,
237
+ lt as Toast,
238
+ bt as Tooltip,
239
+ ct as TooltipContent,
240
+ ut as TooltipProvider,
241
+ ft as TooltipTrigger,
242
+ F as buttonVariants,
243
+ st as cn,
244
+ St as toast,
245
+ re as useConfirm,
246
+ Ae as useDataGrid,
247
+ gt as useIsMobile,
248
+ Wo as useSidebar
218
249
  };
219
250
  //# 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","VisuallyHidden","DialogDescription","Calendar"],"mappings":";;;;;;;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,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","CalendarIcon","Dialog","DialogContent","DialogHeader","DialogTitle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