@trsys-tech/matrix-library 0.6.0 → 1.0.0-canary.0

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 (156) hide show
  1. package/dist/accordion.es.js +27 -27
  2. package/dist/accordion.es.js.map +1 -1
  3. package/dist/avatar.es.js +28 -14
  4. package/dist/avatar.es.js.map +1 -1
  5. package/dist/badge.es.js +24 -24
  6. package/dist/badge.es.js.map +1 -1
  7. package/dist/breadcrumb.es.js +34 -24
  8. package/dist/breadcrumb.es.js.map +1 -1
  9. package/dist/button.es.js +28 -28
  10. package/dist/button.es.js.map +1 -1
  11. package/dist/calendar.es.js +64 -61
  12. package/dist/calendar.es.js.map +1 -1
  13. package/dist/card.es.js +21 -21
  14. package/dist/card.es.js.map +1 -1
  15. package/dist/checkbox.es.js +15 -15
  16. package/dist/checkbox.es.js.map +1 -1
  17. package/dist/chip.es.js +24 -24
  18. package/dist/chip.es.js.map +1 -1
  19. package/dist/collapsible.es.js +17 -17
  20. package/dist/collapsible.es.js.map +1 -1
  21. package/dist/combobox.es.js +79 -70
  22. package/dist/combobox.es.js.map +1 -1
  23. package/dist/command.es.js +62 -59
  24. package/dist/command.es.js.map +1 -1
  25. package/dist/components/accordion/Accordion.d.ts.map +1 -1
  26. package/dist/components/avatar/Avatar.d.ts.map +1 -1
  27. package/dist/components/badge/Badge.d.ts +2 -2
  28. package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -1
  29. package/dist/components/button/Button.d.ts +2 -2
  30. package/dist/components/chip/Chip.d.ts +2 -2
  31. package/dist/components/combobox/Combobox.d.ts.map +1 -1
  32. package/dist/components/command/Command.d.ts.map +1 -1
  33. package/dist/components/confirm/Confirm.d.ts.map +1 -1
  34. package/dist/components/context-menu/ContextMenu.d.ts.map +1 -1
  35. package/dist/components/data-grid/DataGrid.d.ts.map +1 -1
  36. package/dist/components/date-picker/TimePickerContent.d.ts.map +1 -1
  37. package/dist/components/date-picker/calendar.d.ts.map +1 -1
  38. package/dist/components/dialog/Dialog.d.ts.map +1 -1
  39. package/dist/components/drawer/Drawer.d.ts.map +1 -1
  40. package/dist/components/drawer/SwipableDrawer.d.ts.map +1 -1
  41. package/dist/components/form/Form.d.ts.map +1 -1
  42. package/dist/components/icon-botton/IconButton.d.ts +2 -2
  43. package/dist/components/icon-botton/IconButton.d.ts.map +1 -1
  44. package/dist/components/label/Label.d.ts +1 -1
  45. package/dist/components/label/Label.d.ts.map +1 -1
  46. package/dist/components/modal/Modal.d.ts.map +1 -1
  47. package/dist/components/multi-select/MultiSelect.d.ts +2 -2
  48. package/dist/components/progress/Progress.d.ts.map +1 -1
  49. package/dist/components/rating/Rating.d.ts +2 -2
  50. package/dist/components/select/Select.d.ts.map +1 -1
  51. package/dist/components/sheet/Sheet.d.ts +2 -2
  52. package/dist/components/sheet/Sheet.d.ts.map +1 -1
  53. package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
  54. package/dist/components/switch/Switch.d.ts +2 -2
  55. package/dist/components/text-field/TextField.d.ts.map +1 -1
  56. package/dist/components/toast/toast-components.d.ts +4 -4
  57. package/dist/components/toast/toast-components.d.ts.map +1 -1
  58. package/dist/confirm.es.js +18 -8
  59. package/dist/confirm.es.js.map +1 -1
  60. package/dist/contextmenu.es.js +77 -70
  61. package/dist/contextmenu.es.js.map +1 -1
  62. package/dist/datagrid.es.js +101 -97
  63. package/dist/datagrid.es.js.map +1 -1
  64. package/dist/desktopdatepicker.es.js +30 -30
  65. package/dist/desktopdatepicker.es.js.map +1 -1
  66. package/dist/desktopdaterangepicker.es.js +44 -44
  67. package/dist/desktopdaterangepicker.es.js.map +1 -1
  68. package/dist/desktoptimepicker.es.js +24 -24
  69. package/dist/desktoptimepicker.es.js.map +1 -1
  70. package/dist/dialog.es.js +43 -43
  71. package/dist/dialog.es.js.map +1 -1
  72. package/dist/drawer.es.js +27 -27
  73. package/dist/drawer.es.js.map +1 -1
  74. package/dist/duration.es.js +34 -34
  75. package/dist/duration.es.js.map +1 -1
  76. package/dist/form.es.js +20 -20
  77. package/dist/form.es.js.map +1 -1
  78. package/dist/formcheckbox.es.js +13 -13
  79. package/dist/formcheckbox.es.js.map +1 -1
  80. package/dist/formcombobox.es.js +17 -17
  81. package/dist/formcombobox.es.js.map +1 -1
  82. package/dist/formdatepicker.es.js +12 -12
  83. package/dist/formdatepicker.es.js.map +1 -1
  84. package/dist/formdaterangepicker.es.js +16 -16
  85. package/dist/formdaterangepicker.es.js.map +1 -1
  86. package/dist/formduration.es.js +13 -13
  87. package/dist/formduration.es.js.map +1 -1
  88. package/dist/forminput.es.js +10 -10
  89. package/dist/forminput.es.js.map +1 -1
  90. package/dist/formmultiselect.es.js +7 -7
  91. package/dist/formmultiselect.es.js.map +1 -1
  92. package/dist/formrating.es.js +21 -21
  93. package/dist/formrating.es.js.map +1 -1
  94. package/dist/formselect.es.js +28 -28
  95. package/dist/formselect.es.js.map +1 -1
  96. package/dist/formswitch.es.js +14 -14
  97. package/dist/formswitch.es.js.map +1 -1
  98. package/dist/formtextarea.es.js +12 -12
  99. package/dist/formtextarea.es.js.map +1 -1
  100. package/dist/formtimepicker.es.js +12 -12
  101. package/dist/formtimepicker.es.js.map +1 -1
  102. package/dist/iconbutton.es.js +22 -22
  103. package/dist/iconbutton.es.js.map +1 -1
  104. package/dist/label.es.js +6 -6
  105. package/dist/label.es.js.map +1 -1
  106. package/dist/lib/utils.d.ts.map +1 -1
  107. package/dist/mobiledatepicker.es.js +42 -42
  108. package/dist/mobiledatepicker.es.js.map +1 -1
  109. package/dist/mobiledaterangepicker.es.js +50 -50
  110. package/dist/mobiledaterangepicker.es.js.map +1 -1
  111. package/dist/mobiletimepicker.es.js +30 -30
  112. package/dist/mobiletimepicker.es.js.map +1 -1
  113. package/dist/modal.es.js +48 -44
  114. package/dist/modal.es.js.map +1 -1
  115. package/dist/multiselect.es.js +120 -120
  116. package/dist/multiselect.es.js.map +1 -1
  117. package/dist/popover.es.js +16 -16
  118. package/dist/popover.es.js.map +1 -1
  119. package/dist/progress.es.js +29 -21
  120. package/dist/progress.es.js.map +1 -1
  121. package/dist/radiogroup.es.js +16 -16
  122. package/dist/radiogroup.es.js.map +1 -1
  123. package/dist/rating.es.js +76 -76
  124. package/dist/rating.es.js.map +1 -1
  125. package/dist/select.es.js +82 -63
  126. package/dist/select.es.js.map +1 -1
  127. package/dist/separator.es.js +13 -13
  128. package/dist/separator.es.js.map +1 -1
  129. package/dist/sheet.es.js +44 -44
  130. package/dist/sheet.es.js.map +1 -1
  131. package/dist/sidebar.es.js +245 -233
  132. package/dist/sidebar.es.js.map +1 -1
  133. package/dist/skeleton.es.js +6 -6
  134. package/dist/skeleton.es.js.map +1 -1
  135. package/dist/styles.css +1 -1
  136. package/dist/swipabledrawer.es.js +41 -38
  137. package/dist/swipabledrawer.es.js.map +1 -1
  138. package/dist/switch.es.js +16 -16
  139. package/dist/switch.es.js.map +1 -1
  140. package/dist/tabs.es.js +22 -22
  141. package/dist/tabs.es.js.map +1 -1
  142. package/dist/textarea.es.js +12 -12
  143. package/dist/textarea.es.js.map +1 -1
  144. package/dist/textfield.es.js +37 -37
  145. package/dist/textfield.es.js.map +1 -1
  146. package/dist/timepickercontent.es.js +63 -56
  147. package/dist/timepickercontent.es.js.map +1 -1
  148. package/dist/toast-components.es.js +47 -44
  149. package/dist/toast-components.es.js.map +1 -1
  150. package/dist/toast.es.js +24 -24
  151. package/dist/toast.es.js.map +1 -1
  152. package/dist/tooltip.es.js +16 -16
  153. package/dist/tooltip.es.js.map +1 -1
  154. package/dist/utils.es.js +6 -5
  155. package/dist/utils.es.js.map +1 -1
  156. package/package.json +5 -5
@@ -1,47 +1,50 @@
1
- import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
- import * as o from "react";
3
- import { Drawer as t } from "vaul";
4
- import { cn as i } from "./utils.es.js";
5
- const d = ({ shouldScaleBackground: e = !0, ...a }) => /* @__PURE__ */ r(t.Root, { shouldScaleBackground: e, ...a });
6
- d.displayName = "SwipableDrawer";
7
- const m = t.Trigger;
8
- m.displayName = "SwipableDrawerTrigger";
9
- const n = t.Portal, c = t.Close;
10
- c.displayName = "SwipableDrawerClose";
11
- const w = o.forwardRef(({ className: e, ...a }, l) => /* @__PURE__ */ r(t.Overlay, { ref: l, className: i("fixed inset-0 z-50 bg-black/80", e), ...a }));
12
- w.displayName = "SwipableDrawerOverlay";
13
- const b = o.forwardRef(({ className: e, children: a, ...l }, p) => /* @__PURE__ */ s(n, { children: [
14
- /* @__PURE__ */ r(w, {}),
15
- /* @__PURE__ */ s(
16
- t.Content,
1
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { Drawer as r } from "vaul";
4
+ import { cn as l } from "./utils.es.js";
5
+ const w = ({ shouldScaleBackground: e = !0, ...t }) => /* @__PURE__ */ a(r.Root, { shouldScaleBackground: e, ...t });
6
+ w.displayName = "SwipableDrawer";
7
+ const p = r.Trigger;
8
+ p.displayName = "SwipableDrawerTrigger";
9
+ const d = r.Portal, n = r.Close;
10
+ n.displayName = "SwipableDrawerClose";
11
+ const x = i.forwardRef(({ className: e, ...t }, m) => /* @__PURE__ */ a(r.Overlay, { ref: m, className: l("mtx-fixed mtx-inset-0 mtx-z-50 mtx-bg-black/80", e), ...t }));
12
+ x.displayName = "SwipableDrawerOverlay";
13
+ const c = i.forwardRef(({ className: e, children: t, ...m }, s) => /* @__PURE__ */ o(d, { children: [
14
+ /* @__PURE__ */ a(x, {}),
15
+ /* @__PURE__ */ o(
16
+ r.Content,
17
17
  {
18
- ref: p,
19
- className: i("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background", e),
20
- ...l,
18
+ ref: s,
19
+ className: l(
20
+ "mtx-fixed mtx-inset-x-0 mtx-bottom-0 mtx-z-50 mtx-mt-24 mtx-flex mtx-h-auto mtx-flex-col mtx-rounded-t-[10px] mtx-border mtx-bg-background",
21
+ e
22
+ ),
23
+ ...m,
21
24
  children: [
22
- /* @__PURE__ */ r("div", { className: "mx-auto my-2 h-1.5 w-[100px] rounded-full bg-muted" }),
23
- a
25
+ /* @__PURE__ */ a("div", { className: "mtx-mx-auto mtx-my-2 mtx-h-1.5 mtx-w-[100px] mtx-rounded-full mtx-bg-muted" }),
26
+ t
24
27
  ]
25
28
  }
26
29
  )
27
30
  ] }));
28
- b.displayName = "SwipableDrawerContent";
29
- const D = ({ className: e, ...a }) => /* @__PURE__ */ r("div", { className: i("grid gap-1.5 p-4 text-center sm:text-left", e), ...a });
30
- D.displayName = "SwipableDrawerHeader";
31
- const f = ({ className: e, ...a }) => /* @__PURE__ */ r("div", { className: i("mt-auto flex flex-col gap-2 p-4", e), ...a });
32
- f.displayName = "SwipableDrawerFooter";
33
- const S = o.forwardRef(({ className: e, ...a }, l) => /* @__PURE__ */ r(t.Title, { ref: l, className: i("text-lg font-semibold leading-none tracking-tight", e), ...a }));
34
- S.displayName = "SwipableDrawerTitle";
35
- const g = o.forwardRef(({ className: e, ...a }, l) => /* @__PURE__ */ r(t.Description, { ref: l, className: i("text-sm text-muted-foreground", e), ...a }));
36
- g.displayName = "SwipableDrawerDescription";
31
+ c.displayName = "SwipableDrawerContent";
32
+ const b = ({ className: e, ...t }) => /* @__PURE__ */ a("div", { className: l("mtx-grid mtx-gap-1.5 mtx-p-4 mtx-text-center sm:mtx-text-left", e), ...t });
33
+ b.displayName = "SwipableDrawerHeader";
34
+ const D = ({ className: e, ...t }) => /* @__PURE__ */ a("div", { className: l("mtx-mt-auto mtx-flex mtx-flex-col mtx-gap-2 mtx-p-4", e), ...t });
35
+ D.displayName = "SwipableDrawerFooter";
36
+ const f = i.forwardRef(({ className: e, ...t }, m) => /* @__PURE__ */ a(r.Title, { ref: m, className: l("mtx-text-lg mtx-font-semibold mtx-leading-none mtx-tracking-tight", e), ...t }));
37
+ f.displayName = "SwipableDrawerTitle";
38
+ const S = i.forwardRef(({ className: e, ...t }, m) => /* @__PURE__ */ a(r.Description, { ref: m, className: l("mtx-text-sm mtx-text-muted-foreground", e), ...t }));
39
+ S.displayName = "SwipableDrawerDescription";
37
40
  export {
38
- d as SwipableDrawer,
39
- c as SwipableDrawerClose,
40
- b as SwipableDrawerContent,
41
- g as SwipableDrawerDescription,
42
- f as SwipableDrawerFooter,
43
- D as SwipableDrawerHeader,
44
- S as SwipableDrawerTitle,
45
- m as SwipableDrawerTrigger
41
+ w as SwipableDrawer,
42
+ n as SwipableDrawerClose,
43
+ c as SwipableDrawerContent,
44
+ S as SwipableDrawerDescription,
45
+ D as SwipableDrawerFooter,
46
+ b as SwipableDrawerHeader,
47
+ f as SwipableDrawerTitle,
48
+ p as SwipableDrawerTrigger
46
49
  };
47
50
  //# sourceMappingURL=swipabledrawer.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"swipabledrawer.es.js","sources":["../src/components/drawer/SwipableDrawer.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport { Drawer as DrawerPrimitive } from \"vaul\";\r\n\r\nimport { cn } from \"../../lib/utils\";\r\n\r\nconst SwipableDrawer = ({ shouldScaleBackground = true, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\r\n <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />\r\n);\r\nSwipableDrawer.displayName = \"SwipableDrawer\";\r\ntype SwipableDrawerProps = React.ComponentProps<typeof SwipableDrawer>;\r\n\r\nconst SwipableDrawerTrigger = DrawerPrimitive.Trigger;\r\nSwipableDrawerTrigger.displayName = \"SwipableDrawerTrigger\";\r\ntype SwipableDrawerTriggerProps = React.ComponentProps<typeof SwipableDrawerTrigger>;\r\n\r\nconst SwipableDrawerPortal = DrawerPrimitive.Portal;\r\n\r\nconst SwipableDrawerClose = DrawerPrimitive.Close;\r\nSwipableDrawerClose.displayName = \"SwipableDrawerClose\";\r\ntype SwipableDrawerCloseProps = React.ComponentProps<typeof SwipableDrawerClose>;\r\n\r\nconst SwipableDrawerOverlay = React.forwardRef<\r\n React.ElementRef<typeof DrawerPrimitive.Overlay>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\r\n>(({ className, ...props }, ref) => <DrawerPrimitive.Overlay ref={ref} className={cn(\"fixed inset-0 z-50 bg-black/80\", className)} {...props} />);\r\nSwipableDrawerOverlay.displayName = \"SwipableDrawerOverlay\";\r\n\r\nconst SwipableDrawerContent = React.forwardRef<\r\n React.ElementRef<typeof DrawerPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\r\n>(({ className, children, ...props }, ref) => (\r\n <SwipableDrawerPortal>\r\n <SwipableDrawerOverlay />\r\n <DrawerPrimitive.Content\r\n ref={ref}\r\n className={cn(\"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background\", className)}\r\n {...props}\r\n >\r\n <div className=\"mx-auto my-2 h-1.5 w-[100px] rounded-full bg-muted\" />\r\n {children}\r\n </DrawerPrimitive.Content>\r\n </SwipableDrawerPortal>\r\n));\r\nSwipableDrawerContent.displayName = \"SwipableDrawerContent\";\r\ntype SwipableDrawerContentProps = React.ComponentProps<typeof SwipableDrawerContent>;\r\n\r\nconst SwipableDrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)} {...props} />\r\n);\r\nSwipableDrawerHeader.displayName = \"SwipableDrawerHeader\";\r\ntype SwipableDrawerHeaderProps = React.ComponentProps<typeof SwipableDrawerHeader>;\r\n\r\nconst SwipableDrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />\r\n);\r\nSwipableDrawerFooter.displayName = \"SwipableDrawerFooter\";\r\ntype SwipableDrawerFooterProps = React.ComponentProps<typeof SwipableDrawerFooter>;\r\n\r\nconst SwipableDrawerTitle = React.forwardRef<\r\n React.ElementRef<typeof DrawerPrimitive.Title>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\r\n>(({ className, ...props }, ref) => (\r\n <DrawerPrimitive.Title ref={ref} className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)} {...props} />\r\n));\r\nSwipableDrawerTitle.displayName = \"SwipableDrawerTitle\";\r\ntype SwipableDrawerTitleProps = React.ComponentProps<typeof SwipableDrawerTitle>;\r\n\r\nconst SwipableDrawerDescription = React.forwardRef<\r\n React.ElementRef<typeof DrawerPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\r\n>(({ className, ...props }, ref) => <DrawerPrimitive.Description ref={ref} className={cn(\"text-sm text-muted-foreground\", className)} {...props} />);\r\nSwipableDrawerDescription.displayName = \"SwipableDrawerDescription\";\r\ntype SwipableDrawerDescriptionProps = React.ComponentProps<typeof SwipableDrawerDescription>;\r\n\r\nexport {\r\n SwipableDrawer,\r\n SwipableDrawerTrigger,\r\n SwipableDrawerClose,\r\n SwipableDrawerContent,\r\n SwipableDrawerHeader,\r\n SwipableDrawerFooter,\r\n SwipableDrawerTitle,\r\n SwipableDrawerDescription,\r\n type SwipableDrawerProps,\r\n type SwipableDrawerTriggerProps,\r\n type SwipableDrawerCloseProps,\r\n type SwipableDrawerContentProps,\r\n type SwipableDrawerHeaderProps,\r\n type SwipableDrawerFooterProps,\r\n type SwipableDrawerTitleProps,\r\n type SwipableDrawerDescriptionProps,\r\n};\r\n"],"names":["SwipableDrawer","shouldScaleBackground","props","jsx","DrawerPrimitive","SwipableDrawerTrigger","SwipableDrawerPortal","SwipableDrawerClose","SwipableDrawerOverlay","React","className","ref","cn","SwipableDrawerContent","children","jsxs","SwipableDrawerHeader","SwipableDrawerFooter","SwipableDrawerTitle","SwipableDrawerDescription"],"mappings":";;;;AAOA,MAAMA,IAAiB,CAAC,EAAE,uBAAAC,IAAwB,IAAM,GAAGC,EAAA,MACzD,gBAAAC,EAACC,EAAgB,MAAhB,EAAqB,uBAAAH,GAA+C,GAAGC,EAAA,CAAO;AAEjFF,EAAe,cAAc;AAG7B,MAAMK,IAAwBD,EAAgB;AAC9CC,EAAsB,cAAc;AAGpC,MAAMC,IAAuBF,EAAgB,QAEvCG,IAAsBH,EAAgB;AAC5CG,EAAoB,cAAc;AAGlC,MAAMC,IAAwBC,EAAM,WAGlC,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAA,GAASS,MAAQ,gBAAAR,EAACC,EAAgB,SAAhB,EAAwB,KAAAO,GAAU,WAAWC,EAAG,kCAAkCF,CAAS,GAAI,GAAGR,EAAA,CAAO,CAAE;AAChJM,EAAsB,cAAc;AAEpC,MAAMK,IAAwBJ,EAAM,WAGlC,CAAC,EAAE,WAAAC,GAAW,UAAAI,GAAU,GAAGZ,EAAA,GAASS,MACpC,gBAAAI,EAACT,GAAA,EACC,UAAA;AAAA,EAAA,gBAAAH,EAACK,GAAA,EAAsB;AAAA,EACvB,gBAAAO;AAAA,IAACX,EAAgB;AAAA,IAAhB;AAAA,MACC,KAAAO;AAAA,MACA,WAAWC,EAAG,kGAAkGF,CAAS;AAAA,MACxH,GAAGR;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,qDAAA,CAAqD;AAAA,QACnEW;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AACH,GACF,CACD;AACDD,EAAsB,cAAc;AAGpC,MAAMG,IAAuB,CAAC,EAAE,WAAAN,GAAW,GAAGR,EAAA,MAC5C,gBAAAC,EAAC,OAAA,EAAI,WAAWS,EAAG,6CAA6CF,CAAS,GAAI,GAAGR,EAAA,CAAO;AAEzFc,EAAqB,cAAc;AAGnC,MAAMC,IAAuB,CAAC,EAAE,WAAAP,GAAW,GAAGR,EAAA,MAC5C,gBAAAC,EAAC,OAAA,EAAI,WAAWS,EAAG,mCAAmCF,CAAS,GAAI,GAAGR,EAAA,CAAO;AAE/Ee,EAAqB,cAAc;AAGnC,MAAMC,IAAsBT,EAAM,WAGhC,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAA,GAASS,MAC1B,gBAAAR,EAACC,EAAgB,OAAhB,EAAsB,KAAAO,GAAU,WAAWC,EAAG,qDAAqDF,CAAS,GAAI,GAAGR,GAAO,CAC5H;AACDgB,EAAoB,cAAc;AAGlC,MAAMC,IAA4BV,EAAM,WAGtC,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAA,GAASS,MAAQ,gBAAAR,EAACC,EAAgB,aAAhB,EAA4B,KAAAO,GAAU,WAAWC,EAAG,iCAAiCF,CAAS,GAAI,GAAGR,GAAO,CAAE;AACnJiB,EAA0B,cAAc;"}
1
+ {"version":3,"file":"swipabledrawer.es.js","sources":["../src/components/drawer/SwipableDrawer.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport { Drawer as DrawerPrimitive } from \"vaul\";\r\n\r\nimport { cn } from \"../../lib/utils\";\r\n\r\nconst SwipableDrawer = ({ shouldScaleBackground = true, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\r\n <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />\r\n);\r\nSwipableDrawer.displayName = \"SwipableDrawer\";\r\ntype SwipableDrawerProps = React.ComponentProps<typeof SwipableDrawer>;\r\n\r\nconst SwipableDrawerTrigger = DrawerPrimitive.Trigger;\r\nSwipableDrawerTrigger.displayName = \"SwipableDrawerTrigger\";\r\ntype SwipableDrawerTriggerProps = React.ComponentProps<typeof SwipableDrawerTrigger>;\r\n\r\nconst SwipableDrawerPortal = DrawerPrimitive.Portal;\r\n\r\nconst SwipableDrawerClose = DrawerPrimitive.Close;\r\nSwipableDrawerClose.displayName = \"SwipableDrawerClose\";\r\ntype SwipableDrawerCloseProps = React.ComponentProps<typeof SwipableDrawerClose>;\r\n\r\nconst SwipableDrawerOverlay = React.forwardRef<\r\n React.ElementRef<typeof DrawerPrimitive.Overlay>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\r\n>(({ className, ...props }, ref) => (\r\n <DrawerPrimitive.Overlay ref={ref} className={cn(\"mtx-fixed mtx-inset-0 mtx-z-50 mtx-bg-black/80\", className)} {...props} />\r\n));\r\nSwipableDrawerOverlay.displayName = \"SwipableDrawerOverlay\";\r\n\r\nconst SwipableDrawerContent = React.forwardRef<\r\n React.ElementRef<typeof DrawerPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\r\n>(({ className, children, ...props }, ref) => (\r\n <SwipableDrawerPortal>\r\n <SwipableDrawerOverlay />\r\n <DrawerPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"mtx-fixed mtx-inset-x-0 mtx-bottom-0 mtx-z-50 mtx-mt-24 mtx-flex mtx-h-auto mtx-flex-col mtx-rounded-t-[10px] mtx-border mtx-bg-background\",\r\n className,\r\n )}\r\n {...props}\r\n >\r\n <div className=\"mtx-mx-auto mtx-my-2 mtx-h-1.5 mtx-w-[100px] mtx-rounded-full mtx-bg-muted\" />\r\n {children}\r\n </DrawerPrimitive.Content>\r\n </SwipableDrawerPortal>\r\n));\r\nSwipableDrawerContent.displayName = \"SwipableDrawerContent\";\r\ntype SwipableDrawerContentProps = React.ComponentProps<typeof SwipableDrawerContent>;\r\n\r\nconst SwipableDrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div className={cn(\"mtx-grid mtx-gap-1.5 mtx-p-4 mtx-text-center sm:mtx-text-left\", className)} {...props} />\r\n);\r\nSwipableDrawerHeader.displayName = \"SwipableDrawerHeader\";\r\ntype SwipableDrawerHeaderProps = React.ComponentProps<typeof SwipableDrawerHeader>;\r\n\r\nconst SwipableDrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div className={cn(\"mtx-mt-auto mtx-flex mtx-flex-col mtx-gap-2 mtx-p-4\", className)} {...props} />\r\n);\r\nSwipableDrawerFooter.displayName = \"SwipableDrawerFooter\";\r\ntype SwipableDrawerFooterProps = React.ComponentProps<typeof SwipableDrawerFooter>;\r\n\r\nconst SwipableDrawerTitle = React.forwardRef<\r\n React.ElementRef<typeof DrawerPrimitive.Title>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\r\n>(({ className, ...props }, ref) => (\r\n <DrawerPrimitive.Title ref={ref} className={cn(\"mtx-text-lg mtx-font-semibold mtx-leading-none mtx-tracking-tight\", className)} {...props} />\r\n));\r\nSwipableDrawerTitle.displayName = \"SwipableDrawerTitle\";\r\ntype SwipableDrawerTitleProps = React.ComponentProps<typeof SwipableDrawerTitle>;\r\n\r\nconst SwipableDrawerDescription = React.forwardRef<\r\n React.ElementRef<typeof DrawerPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\r\n>(({ className, ...props }, ref) => (\r\n <DrawerPrimitive.Description ref={ref} className={cn(\"mtx-text-sm mtx-text-muted-foreground\", className)} {...props} />\r\n));\r\nSwipableDrawerDescription.displayName = \"SwipableDrawerDescription\";\r\ntype SwipableDrawerDescriptionProps = React.ComponentProps<typeof SwipableDrawerDescription>;\r\n\r\nexport {\r\n SwipableDrawer,\r\n SwipableDrawerTrigger,\r\n SwipableDrawerClose,\r\n SwipableDrawerContent,\r\n SwipableDrawerHeader,\r\n SwipableDrawerFooter,\r\n SwipableDrawerTitle,\r\n SwipableDrawerDescription,\r\n type SwipableDrawerProps,\r\n type SwipableDrawerTriggerProps,\r\n type SwipableDrawerCloseProps,\r\n type SwipableDrawerContentProps,\r\n type SwipableDrawerHeaderProps,\r\n type SwipableDrawerFooterProps,\r\n type SwipableDrawerTitleProps,\r\n type SwipableDrawerDescriptionProps,\r\n};\r\n"],"names":["SwipableDrawer","shouldScaleBackground","props","jsx","DrawerPrimitive","SwipableDrawerTrigger","SwipableDrawerPortal","SwipableDrawerClose","SwipableDrawerOverlay","React","className","ref","cn","SwipableDrawerContent","children","jsxs","SwipableDrawerHeader","SwipableDrawerFooter","SwipableDrawerTitle","SwipableDrawerDescription"],"mappings":";;;;AAOA,MAAMA,IAAiB,CAAC,EAAE,uBAAAC,IAAwB,IAAM,GAAGC,EAAA,MACzD,gBAAAC,EAACC,EAAgB,MAAhB,EAAqB,uBAAAH,GAA+C,GAAGC,EAAA,CAAO;AAEjFF,EAAe,cAAc;AAG7B,MAAMK,IAAwBD,EAAgB;AAC9CC,EAAsB,cAAc;AAGpC,MAAMC,IAAuBF,EAAgB,QAEvCG,IAAsBH,EAAgB;AAC5CG,EAAoB,cAAc;AAGlC,MAAMC,IAAwBC,EAAM,WAGlC,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAA,GAASS,MAC1B,gBAAAR,EAACC,EAAgB,SAAhB,EAAwB,KAAAO,GAAU,WAAWC,EAAG,kDAAkDF,CAAS,GAAI,GAAGR,EAAA,CAAO,CAC3H;AACDM,EAAsB,cAAc;AAEpC,MAAMK,IAAwBJ,EAAM,WAGlC,CAAC,EAAE,WAAAC,GAAW,UAAAI,GAAU,GAAGZ,EAAA,GAASS,MACpC,gBAAAI,EAACT,GAAA,EACC,UAAA;AAAA,EAAA,gBAAAH,EAACK,GAAA,EAAsB;AAAA,EACvB,gBAAAO;AAAA,IAACX,EAAgB;AAAA,IAAhB;AAAA,MACC,KAAAO;AAAA,MACA,WAAWC;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGR;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,6EAAA,CAA6E;AAAA,QAC3FW;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AACH,GACF,CACD;AACDD,EAAsB,cAAc;AAGpC,MAAMG,IAAuB,CAAC,EAAE,WAAAN,GAAW,GAAGR,EAAA,MAC5C,gBAAAC,EAAC,OAAA,EAAI,WAAWS,EAAG,iEAAiEF,CAAS,GAAI,GAAGR,EAAA,CAAO;AAE7Gc,EAAqB,cAAc;AAGnC,MAAMC,IAAuB,CAAC,EAAE,WAAAP,GAAW,GAAGR,EAAA,MAC5C,gBAAAC,EAAC,OAAA,EAAI,WAAWS,EAAG,uDAAuDF,CAAS,GAAI,GAAGR,EAAA,CAAO;AAEnGe,EAAqB,cAAc;AAGnC,MAAMC,IAAsBT,EAAM,WAGhC,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAA,GAASS,MAC1B,gBAAAR,EAACC,EAAgB,OAAhB,EAAsB,KAAAO,GAAU,WAAWC,EAAG,qEAAqEF,CAAS,GAAI,GAAGR,GAAO,CAC5I;AACDgB,EAAoB,cAAc;AAGlC,MAAMC,IAA4BV,EAAM,WAGtC,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAA,GAASS,MAC1B,gBAAAR,EAACC,EAAgB,aAAhB,EAA4B,KAAAO,GAAU,WAAWC,EAAG,yCAAyCF,CAAS,GAAI,GAAGR,GAAO,CACtH;AACDiB,EAA0B,cAAc;"}
package/dist/switch.es.js CHANGED
@@ -1,30 +1,30 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import * as o from "react";
3
- import * as a from "@radix-ui/react-switch";
4
- import { cn as e } from "./utils.es.js";
5
- import { tv as c } from "tailwind-variants";
6
- const d = c({
7
- base: "peer inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import * as t from "@radix-ui/react-switch";
4
+ import { cn as m } from "./utils.es.js";
5
+ import { tv as x } from "tailwind-variants";
6
+ const o = x({
7
+ base: "mtx-peer mtx-inline-flex mtx-h-4 mtx-w-7 mtx-shrink-0 mtx-cursor-pointer mtx-items-center mtx-rounded-full mtx-border-2 mtx-border-transparent mtx-shadow-sm mtx-transition-colors focus-visible:mtx-outline-none focus-visible:mtx-ring-2 focus-visible:mtx-ring-ring focus-visible:mtx-ring-offset-2 focus-visible:mtx-ring-offset-background disabled:mtx-cursor-not-allowed disabled:mtx-opacity-50 data-[state=checked]:mtx-bg-primary data-[state=unchecked]:mtx-bg-input",
8
8
  variants: {
9
9
  size: {
10
- sm: "h-4 w-7 [&>span]:h-3 [&>span]:w-3 [&>span]:data-[state=checked]:translate-x-3",
11
- md: "h-5 w-9 [&>span]:h-4 [&>span]:w-4 [&>span]:data-[state=checked]:translate-x-4",
12
- lg: "h-6 w-11 [&>span]:h-5 [&>span]:w-5 [&>span]:data-[state=checked]:translate-x-5"
10
+ sm: "mtx-h-4 mtx-w-7 [&>span]:mtx-h-3 [&>span]:mtx-w-3 [&>span]:data-[state=checked]:mtx-translate-x-3",
11
+ md: "mtx-h-5 mtx-w-9 [&>span]:mtx-h-4 [&>span]:mtx-w-4 [&>span]:data-[state=checked]:mtx-translate-x-4",
12
+ lg: "mtx-h-6 mtx-w-11 [&>span]:mtx-h-5 [&>span]:mtx-w-5 [&>span]:data-[state=checked]:mtx-translate-x-5"
13
13
  }
14
14
  },
15
15
  defaultVariants: {
16
16
  size: "md"
17
17
  }
18
- }), l = o.forwardRef(({ className: t, size: r, ...n }, i) => /* @__PURE__ */ s(a.Root, { className: e(d({ size: r, className: t })), ...n, ref: i, children: /* @__PURE__ */ s(
19
- a.Thumb,
18
+ }), c = i.forwardRef(({ className: s, size: e, ...r }, n) => /* @__PURE__ */ a(t.Root, { className: m(o({ size: e, className: s })), ...r, ref: n, children: /* @__PURE__ */ a(
19
+ t.Thumb,
20
20
  {
21
- className: e(
22
- "pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=unchecked]:translate-x-0"
21
+ className: m(
22
+ "mtx-pointer-events-none mtx-block mtx-rounded-full mtx-bg-background mtx-shadow-lg mtx-ring-0 mtx-transition-transform data-[state=unchecked]:mtx-translate-x-0"
23
23
  )
24
24
  }
25
25
  ) }));
26
- l.displayName = a.Root.displayName;
26
+ c.displayName = t.Root.displayName;
27
27
  export {
28
- l as Switch
28
+ c as Switch
29
29
  };
30
30
  //# sourceMappingURL=switch.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.es.js","sources":["../src/components/switch/Switch.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\";\r\n\r\nimport { cn } from \"../../lib/utils\";\r\nimport { tv, VariantProps } from \"tailwind-variants\";\r\n\r\nconst switchVariants = tv({\r\n base: \"peer inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\r\n variants: {\r\n size: {\r\n sm: \"h-4 w-7 [&>span]:h-3 [&>span]:w-3 [&>span]:data-[state=checked]:translate-x-3\",\r\n md: \"h-5 w-9 [&>span]:h-4 [&>span]:w-4 [&>span]:data-[state=checked]:translate-x-4\",\r\n lg: \"h-6 w-11 [&>span]:h-5 [&>span]:w-5 [&>span]:data-[state=checked]:translate-x-5\",\r\n },\r\n },\r\n defaultVariants: {\r\n size: \"md\",\r\n },\r\n});\r\n\r\ninterface SwitchProps extends SwitchPrimitives.SwitchProps, VariantProps<typeof switchVariants> {}\r\n\r\nconst Switch = React.forwardRef<React.ElementRef<typeof SwitchPrimitives.Root>, SwitchProps>(({ className, size, ...props }, ref) => (\r\n <SwitchPrimitives.Root className={cn(switchVariants({ size, className }))} {...props} ref={ref}>\r\n <SwitchPrimitives.Thumb\r\n className={cn(\r\n \"pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=unchecked]:translate-x-0\",\r\n )}\r\n />\r\n </SwitchPrimitives.Root>\r\n));\r\nSwitch.displayName = SwitchPrimitives.Root.displayName;\r\n\r\nexport { Switch, type SwitchProps };\r\n"],"names":["switchVariants","tv","Switch","React","className","size","props","ref","jsx","SwitchPrimitives","cn"],"mappings":";;;;;AAQA,MAAMA,IAAiBC,EAAG;AAAA,EACxB,MAAM;AAAA,EACN,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,EACN;AAAA,EAEF,iBAAiB;AAAA,IACf,MAAM;AAAA,EAAA;AAEV,CAAC,GAIKC,IAASC,EAAM,WAAwE,CAAC,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,EAAA,GAASC,MAC3H,gBAAAC,EAACC,EAAiB,MAAjB,EAAsB,WAAWC,EAAGV,EAAe,EAAE,MAAAK,GAAM,WAAAD,GAAW,CAAC,GAAI,GAAGE,GAAO,KAAAC,GACpF,UAAA,gBAAAC;AAAA,EAACC,EAAiB;AAAA,EAAjB;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AACF,GACF,CACD;AACDR,EAAO,cAAcO,EAAiB,KAAK;"}
1
+ {"version":3,"file":"switch.es.js","sources":["../src/components/switch/Switch.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\";\r\n\r\nimport { cn } from \"../../lib/utils\";\r\nimport { tv, VariantProps } from \"tailwind-variants\";\r\n\r\nconst switchVariants = tv({\r\n base: \"mtx-peer mtx-inline-flex mtx-h-4 mtx-w-7 mtx-shrink-0 mtx-cursor-pointer mtx-items-center mtx-rounded-full mtx-border-2 mtx-border-transparent mtx-shadow-sm mtx-transition-colors focus-visible:mtx-outline-none focus-visible:mtx-ring-2 focus-visible:mtx-ring-ring focus-visible:mtx-ring-offset-2 focus-visible:mtx-ring-offset-background disabled:mtx-cursor-not-allowed disabled:mtx-opacity-50 data-[state=checked]:mtx-bg-primary data-[state=unchecked]:mtx-bg-input\",\r\n variants: {\r\n size: {\r\n sm: \"mtx-h-4 mtx-w-7 [&>span]:mtx-h-3 [&>span]:mtx-w-3 [&>span]:data-[state=checked]:mtx-translate-x-3\",\r\n md: \"mtx-h-5 mtx-w-9 [&>span]:mtx-h-4 [&>span]:mtx-w-4 [&>span]:data-[state=checked]:mtx-translate-x-4\",\r\n lg: \"mtx-h-6 mtx-w-11 [&>span]:mtx-h-5 [&>span]:mtx-w-5 [&>span]:data-[state=checked]:mtx-translate-x-5\",\r\n },\r\n },\r\n defaultVariants: {\r\n size: \"md\",\r\n },\r\n});\r\n\r\ninterface SwitchProps extends SwitchPrimitives.SwitchProps, VariantProps<typeof switchVariants> {}\r\n\r\nconst Switch = React.forwardRef<React.ElementRef<typeof SwitchPrimitives.Root>, SwitchProps>(({ className, size, ...props }, ref) => (\r\n <SwitchPrimitives.Root className={cn(switchVariants({ size, className }))} {...props} ref={ref}>\r\n <SwitchPrimitives.Thumb\r\n className={cn(\r\n \"mtx-pointer-events-none mtx-block mtx-rounded-full mtx-bg-background mtx-shadow-lg mtx-ring-0 mtx-transition-transform data-[state=unchecked]:mtx-translate-x-0\",\r\n )}\r\n />\r\n </SwitchPrimitives.Root>\r\n));\r\nSwitch.displayName = SwitchPrimitives.Root.displayName;\r\n\r\nexport { Switch, type SwitchProps };\r\n"],"names":["switchVariants","tv","Switch","React","className","size","props","ref","jsx","SwitchPrimitives","cn"],"mappings":";;;;;AAQA,MAAMA,IAAiBC,EAAG;AAAA,EACxB,MAAM;AAAA,EACN,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,EACN;AAAA,EAEF,iBAAiB;AAAA,IACf,MAAM;AAAA,EAAA;AAEV,CAAC,GAIKC,IAASC,EAAM,WAAwE,CAAC,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,EAAA,GAASC,MAC3H,gBAAAC,EAACC,EAAiB,MAAjB,EAAsB,WAAWC,EAAGV,EAAe,EAAE,MAAAK,GAAM,WAAAD,GAAW,CAAC,GAAI,GAAGE,GAAO,KAAAC,GACpF,UAAA,gBAAAC;AAAA,EAACC,EAAiB;AAAA,EAAjB;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AACF,GACF,CACD;AACDR,EAAO,cAAcO,EAAiB,KAAK;"}
package/dist/tabs.es.js CHANGED
@@ -1,41 +1,41 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import * as r from "react";
3
- import { Root as m, Content as i, List as n, Trigger as d } from "@radix-ui/react-tabs";
4
- import { cn as o } from "./utils.es.js";
5
- const u = m, l = r.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ s(
6
- n,
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import * as s from "react";
3
+ import { Root as n, Content as o, List as x, Trigger as i } from "@radix-ui/react-tabs";
4
+ import { cn as r } from "./utils.es.js";
5
+ const y = n, d = s.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ m(
6
+ x,
7
7
  {
8
8
  ref: a,
9
- className: o(
10
- "inline-flex h-12 w-full overflow-auto thin-scrollbar items-center justify-start bg-background p-0 text-muted-foreground md:[box-shadow:inset_0_-1px_0_hsl(var(--gray-300))]",
9
+ className: r(
10
+ "mtx-inline-flex mtx-h-12 mtx-w-full mtx-overflow-auto mtx-thin-scrollbar mtx-items-center mtx-justify-start mtx-bg-background mtx-p-0 mtx-text-muted-foreground md:mtx-[box-shadow:inset_0_-1px_0_hsl(var(--gray-300))]",
11
11
  t
12
12
  ),
13
13
  ...e
14
14
  }
15
15
  ));
16
- l.displayName = n.displayName;
17
- const f = r.forwardRef(
18
- ({ className: t, ...e }, a) => /* @__PURE__ */ s(
19
- d,
16
+ d.displayName = x.displayName;
17
+ const l = s.forwardRef(
18
+ ({ className: t, ...e }, a) => /* @__PURE__ */ m(
19
+ i,
20
20
  {
21
21
  ref: a,
22
- className: o(
23
- "inline-flex items-center justify-center whitespace-nowrap h-full px-3 py-1 text-sm font-medium disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground data-[state=active]:font-bold data-[state=active]:border-b-2 data-[state=active]:border-primary",
22
+ className: r(
23
+ "mtx-inline-flex mtx-items-center mtx-justify-center mtx-whitespace-nowrap mtx-h-full mtx-px-3 mtx-py-1 mtx-text-sm mtx-font-medium disabled:mtx-pointer-events-none disabled:mtx-opacity-50 data-[state=active]:mtx-text-foreground data-[state=active]:mtx-font-bold data-[state=active]:mtx-border-b-2 data-[state=active]:mtx-border-primary",
24
24
  t
25
25
  ),
26
26
  ...e
27
27
  }
28
28
  )
29
29
  );
30
- f.displayName = d.displayName;
31
- const c = r.forwardRef(
32
- ({ className: t, ...e }, a) => /* @__PURE__ */ s(i, { ref: a, className: o("mt-2", t), ...e })
30
+ l.displayName = i.displayName;
31
+ const f = s.forwardRef(
32
+ ({ className: t, ...e }, a) => /* @__PURE__ */ m(o, { ref: a, className: r("mtx-mt-2", t), ...e })
33
33
  );
34
- c.displayName = i.displayName;
34
+ f.displayName = o.displayName;
35
35
  export {
36
- u as Tabs,
37
- c as TabsContent,
38
- l as TabsList,
39
- f as TabsTrigger
36
+ y as Tabs,
37
+ f as TabsContent,
38
+ d as TabsList,
39
+ l as TabsTrigger
40
40
  };
41
41
  //# sourceMappingURL=tabs.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.es.js","sources":["../src/components/tabs/Tabs.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport { Content, List, Root, TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps, Trigger } from \"@radix-ui/react-tabs\";\r\nimport { cn } from \"../../lib/utils\";\r\n\r\nconst Tabs = Root;\r\n\r\nconst TabsList = React.forwardRef<React.ElementRef<typeof List>, React.ComponentPropsWithoutRef<typeof List>>(({ className, ...props }, ref) => (\r\n <List\r\n ref={ref}\r\n className={cn(\r\n \"inline-flex h-12 w-full overflow-auto thin-scrollbar items-center justify-start bg-background p-0 text-muted-foreground md:[box-shadow:inset_0_-1px_0_hsl(var(--gray-300))]\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nTabsList.displayName = List.displayName;\r\n\r\nconst TabsTrigger = React.forwardRef<React.ElementRef<typeof Trigger>, React.ComponentPropsWithoutRef<typeof Trigger>>(\r\n ({ className, ...props }, ref) => (\r\n <Trigger\r\n ref={ref}\r\n className={cn(\r\n \"inline-flex items-center justify-center whitespace-nowrap h-full px-3 py-1 text-sm font-medium disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground data-[state=active]:font-bold data-[state=active]:border-b-2 data-[state=active]:border-primary\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n ),\r\n);\r\nTabsTrigger.displayName = Trigger.displayName;\r\n\r\nconst TabsContent = React.forwardRef<React.ElementRef<typeof Content>, React.ComponentPropsWithoutRef<typeof Content>>(\r\n ({ className, ...props }, ref) => <Content ref={ref} className={cn(\"mt-2\", className)} {...props} />,\r\n);\r\nTabsContent.displayName = Content.displayName;\r\n\r\nexport { Tabs, TabsList, TabsTrigger, TabsContent, type TabsProps, type TabsListProps, type TabsTriggerProps, type TabsContentProps };\r\n"],"names":["Tabs","Root","TabsList","React","className","props","ref","jsx","List","cn","TabsTrigger","Trigger","TabsContent","Content"],"mappings":";;;;AAMA,MAAMA,IAAOC,GAEPC,IAAWC,EAAM,WAAuF,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MACtI,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAS,cAAcM,EAAK;AAE5B,MAAME,IAAcP,EAAM;AAAA,EACxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MACxB,gBAAAC;AAAA,IAACI;AAAA,IAAA;AAAA,MACC,KAAAL;AAAA,MACA,WAAWG;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AACAK,EAAY,cAAcC,EAAQ;AAElC,MAAMC,IAAcT,EAAM;AAAA,EACxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAAQ,gBAAAC,EAACM,GAAA,EAAQ,KAAAP,GAAU,WAAWG,EAAG,QAAQL,CAAS,GAAI,GAAGC,EAAA,CAAO;AACpG;AACAO,EAAY,cAAcC,EAAQ;"}
1
+ {"version":3,"file":"tabs.es.js","sources":["../src/components/tabs/Tabs.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport { Content, List, Root, TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps, Trigger } from \"@radix-ui/react-tabs\";\r\nimport { cn } from \"../../lib/utils\";\r\n\r\nconst Tabs = Root;\r\n\r\nconst TabsList = React.forwardRef<React.ElementRef<typeof List>, React.ComponentPropsWithoutRef<typeof List>>(({ className, ...props }, ref) => (\r\n <List\r\n ref={ref}\r\n className={cn(\r\n \"mtx-inline-flex mtx-h-12 mtx-w-full mtx-overflow-auto mtx-thin-scrollbar mtx-items-center mtx-justify-start mtx-bg-background mtx-p-0 mtx-text-muted-foreground md:mtx-[box-shadow:inset_0_-1px_0_hsl(var(--gray-300))]\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nTabsList.displayName = List.displayName;\r\n\r\nconst TabsTrigger = React.forwardRef<React.ElementRef<typeof Trigger>, React.ComponentPropsWithoutRef<typeof Trigger>>(\r\n ({ className, ...props }, ref) => (\r\n <Trigger\r\n ref={ref}\r\n className={cn(\r\n \"mtx-inline-flex mtx-items-center mtx-justify-center mtx-whitespace-nowrap mtx-h-full mtx-px-3 mtx-py-1 mtx-text-sm mtx-font-medium disabled:mtx-pointer-events-none disabled:mtx-opacity-50 data-[state=active]:mtx-text-foreground data-[state=active]:mtx-font-bold data-[state=active]:mtx-border-b-2 data-[state=active]:mtx-border-primary\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n ),\r\n);\r\nTabsTrigger.displayName = Trigger.displayName;\r\n\r\nconst TabsContent = React.forwardRef<React.ElementRef<typeof Content>, React.ComponentPropsWithoutRef<typeof Content>>(\r\n ({ className, ...props }, ref) => <Content ref={ref} className={cn(\"mtx-mt-2\", className)} {...props} />,\r\n);\r\nTabsContent.displayName = Content.displayName;\r\n\r\nexport { Tabs, TabsList, TabsTrigger, TabsContent, type TabsProps, type TabsListProps, type TabsTriggerProps, type TabsContentProps };\r\n"],"names":["Tabs","Root","TabsList","React","className","props","ref","jsx","List","cn","TabsTrigger","Trigger","TabsContent","Content"],"mappings":";;;;AAMA,MAAMA,IAAOC,GAEPC,IAAWC,EAAM,WAAuF,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MACtI,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAS,cAAcM,EAAK;AAE5B,MAAME,IAAcP,EAAM;AAAA,EACxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MACxB,gBAAAC;AAAA,IAACI;AAAA,IAAA;AAAA,MACC,KAAAL;AAAA,MACA,WAAWG;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AACAK,EAAY,cAAcC,EAAQ;AAElC,MAAMC,IAAcT,EAAM;AAAA,EACxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAAQ,gBAAAC,EAACM,GAAA,EAAQ,KAAAP,GAAU,WAAWG,EAAG,YAAYL,CAAS,GAAI,GAAGC,EAAA,CAAO;AACxG;AACAO,EAAY,cAAcC,EAAQ;"}
@@ -1,20 +1,20 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import * as o from "react";
3
- import { cn as d } from "./utils.es.js";
4
- const i = o.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import * as r from "react";
3
+ import { cn as a } from "./utils.es.js";
4
+ const o = r.forwardRef(({ className: t, ...e }, x) => /* @__PURE__ */ m(
5
5
  "textarea",
6
6
  {
7
- className: d(
8
- "flex min-h-[60px] w-full rounded-sm border border-input bg-transparent px-3 py-2 text-xs font-medium text-text",
9
- "placeholder:text-text-300 focus-visible:outline-none focus-visible:border-primary disabled:opacity-50 disabled:text-text-300 disabled:bg-gray-100 disabled:border-gray-100",
10
- e
7
+ className: a(
8
+ "mtx-flex mtx-min-h-[60px] mtx-w-full mtx-rounded-sm mtx-border mtx-border-input mtx-bg-transparent mtx-px-3 mtx-py-2 mtx-text-xs mtx-font-medium mtx-text-text",
9
+ "placeholder:mtx-text-text-300 focus-visible:mtx-outline-none focus-visible:mtx-border-primary disabled:mtx-opacity-50 disabled:mtx-text-text-300 disabled:mtx-bg-gray-100 disabled:mtx-border-gray-100",
10
+ t
11
11
  ),
12
- ref: r,
13
- ...t
12
+ ref: x,
13
+ ...e
14
14
  }
15
15
  ));
16
- i.displayName = "Textarea";
16
+ o.displayName = "Textarea";
17
17
  export {
18
- i as Textarea
18
+ o as Textarea
19
19
  };
20
20
  //# sourceMappingURL=textarea.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.es.js","sources":["../src/components/textarea/Textarea.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(({ className, ...props }, ref) => {\n return (\n <textarea\n className={cn(\n \"flex min-h-[60px] w-full rounded-sm border border-input bg-transparent px-3 py-2 text-xs font-medium text-text\",\n \"placeholder:text-text-300 focus-visible:outline-none focus-visible:border-primary disabled:opacity-50 disabled:text-text-300 disabled:bg-gray-100 disabled:border-gray-100\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n});\nTextarea.displayName = \"Textarea\";\n\nexport { Textarea };\n"],"names":["Textarea","React","className","props","ref","jsx","cn"],"mappings":";;;AAMA,MAAMA,IAAWC,EAAM,WAA+C,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAE5F,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACA;AAAA,MACAJ;AAAA,IAAA;AAAA,IAEF,KAAAE;AAAA,IACC,GAAGD;AAAA,EAAA;AAAA,CAGT;AACDH,EAAS,cAAc;"}
1
+ {"version":3,"file":"textarea.es.js","sources":["../src/components/textarea/Textarea.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(({ className, ...props }, ref) => {\n return (\n <textarea\n className={cn(\n \"mtx-flex mtx-min-h-[60px] mtx-w-full mtx-rounded-sm mtx-border mtx-border-input mtx-bg-transparent mtx-px-3 mtx-py-2 mtx-text-xs mtx-font-medium mtx-text-text\",\n \"placeholder:mtx-text-text-300 focus-visible:mtx-outline-none focus-visible:mtx-border-primary disabled:mtx-opacity-50 disabled:mtx-text-text-300 disabled:mtx-bg-gray-100 disabled:mtx-border-gray-100\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n});\nTextarea.displayName = \"Textarea\";\n\nexport { Textarea };\n"],"names":["Textarea","React","className","props","ref","jsx","cn"],"mappings":";;;AAMA,MAAMA,IAAWC,EAAM,WAA+C,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAE5F,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACA;AAAA,MACAJ;AAAA,IAAA;AAAA,IAEF,KAAAE;AAAA,IACC,GAAGD;AAAA,EAAA;AAAA,CAGT;AACDH,EAAS,cAAc;"}
@@ -1,18 +1,18 @@
1
- import { jsxs as v, jsx as s } from "react/jsx-runtime";
1
+ import { jsxs as v, jsx as n } from "react/jsx-runtime";
2
2
  import * as N from "react";
3
3
  import { tv as F } from "tailwind-variants";
4
- import { cn as d } from "./utils.es.js";
4
+ import { cn as o } from "./utils.es.js";
5
5
  const j = F({
6
6
  base: [
7
- "flex items-center w-full rounded-sm border border-input text-text bg-transparent p-0 text-xs [&_input]:text-xs font-medium transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground",
8
- "placeholder:text-text-300 hover:border-primary-400 focus-within:border-primary-400 focus-within:outline-none focus-within:ring focus-within:ring-primary-100",
9
- "aria-disabled:text-text-300 aria-disabled:bg-gray-100 aria-disabled:border-gray-100"
7
+ "mtx-flex mtx-items-center mtx-w-full mtx-rounded-sm mtx-border mtx-border-input mtx-text-text mtx-bg-transparent mtx-p-0 mtx-text-xs [&_input]:mtx-text-xs mtx-font-medium mtx-transition-colors file:mtx-border-0 file:mtx-bg-transparent file:mtx-text-sm file:mtx-font-medium file:mtx-text-foreground",
8
+ "placeholder:mtx-text-text-300 hover:mtx-border-primary-400 focus-within:mtx-border-primary-400 focus-within:mtx-outline-none focus-within:mtx-ring focus-within:mtx-ring-primary-100",
9
+ "aria-disabled:mtx-text-text-300 aria-disabled:mtx-bg-gray-100 aria-disabled:mtx-border-gray-100"
10
10
  ],
11
11
  variants: {
12
12
  size: {
13
- sm: "h-7",
14
- md: "h-8",
15
- lg: "h-11"
13
+ sm: "mtx-h-7",
14
+ md: "mtx-h-8",
15
+ lg: "mtx-h-11"
16
16
  }
17
17
  },
18
18
  defaultVariants: {
@@ -20,51 +20,51 @@ const j = F({
20
20
  }
21
21
  }), z = N.forwardRef(
22
22
  ({
23
- className: l,
24
- slotProps: r,
25
- suffix: e,
26
- endAdornment: m,
27
- startAdornment: t,
28
- size: f,
29
- value: p,
30
- onChange: u,
31
- defaultValue: x,
32
- type: i,
33
- disabled: a,
34
- onWheel: n,
23
+ className: s,
24
+ slotProps: e,
25
+ suffix: t,
26
+ endAdornment: d,
27
+ startAdornment: m,
28
+ size: l,
29
+ value: f,
30
+ onChange: p,
31
+ defaultValue: u,
32
+ type: r,
33
+ disabled: x,
34
+ onWheel: i,
35
35
  id: b,
36
36
  "aria-describedby": c,
37
37
  "aria-invalid": h,
38
38
  ...g
39
39
  }, y) => {
40
- const w = (o) => {
41
- i === "number" && o.target.blur(), n && n(o);
40
+ const w = (a) => {
41
+ r === "number" && a.target.blur(), i && i(a);
42
42
  };
43
- return /* @__PURE__ */ v("div", { ...g, className: d(j({ size: f, className: l })), "aria-disabled": a, children: [
44
- t,
45
- /* @__PURE__ */ s(
43
+ return /* @__PURE__ */ v("div", { ...g, className: o(j({ size: l, className: s })), "aria-disabled": x, children: [
44
+ m,
45
+ /* @__PURE__ */ n(
46
46
  "input",
47
47
  {
48
- type: i,
48
+ type: r,
49
49
  onWheel: w,
50
50
  ref: y,
51
51
  id: b,
52
52
  "aria-describedby": c,
53
53
  "aria-invalid": h,
54
- onChange: u,
55
- value: p,
56
- defaultValue: x,
57
- disabled: a,
58
- ...r?.inputProps ?? {},
59
- className: d(
60
- "focus:outline-none w-full h-full py-1 rounded-sm file:border-0 bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-text-300",
61
- t ? "ps-1 pe-3" : "px-3",
62
- r?.inputProps?.className
54
+ onChange: p,
55
+ value: f,
56
+ defaultValue: u,
57
+ disabled: x,
58
+ ...e?.inputProps ?? {},
59
+ className: o(
60
+ "focus:mtx-outline-none mtx-w-full mtx-h-full mtx-py-1 mtx-rounded-sm file:mtx-border-0 mtx-bg-transparent file:mtx-text-sm file:mtx-font-medium file:mtx-text-foreground placeholder:mtx-text-text-300",
61
+ m ? "mtx-ps-1 mtx-pe-3" : "mtx-px-3",
62
+ e?.inputProps?.className
63
63
  )
64
64
  }
65
65
  ),
66
- typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ s("span", { className: "inline-flex items-center px-2 text-xs font-medium text-primary bg-primary-50 m-0.5 rounded-sm", children: e }) : e,
67
- m
66
+ typeof t == "string" || typeof t == "number" ? /* @__PURE__ */ n("span", { className: "mtx-inline-flex mtx-items-center mtx-px-2 mtx-text-xs mtx-font-medium mtx-text-primary mtx-bg-primary-50 mtx-m-0.5 mtx-rounded-sm", children: t }) : t,
67
+ d
68
68
  ] });
69
69
  }
70
70
  );
@@ -1 +1 @@
1
- {"version":3,"file":"textfield.es.js","sources":["../src/components/text-field/TextField.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport { tv, VariantProps } from \"tailwind-variants\";\r\n\r\nimport { cn } from \"../../lib/utils\";\r\n\r\nconst textFieldVariants = tv({\r\n base: [\r\n \"flex items-center w-full rounded-sm border border-input text-text bg-transparent p-0 text-xs [&_input]:text-xs font-medium transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground\",\r\n \"placeholder:text-text-300 hover:border-primary-400 focus-within:border-primary-400 focus-within:outline-none focus-within:ring focus-within:ring-primary-100\",\r\n \"aria-disabled:text-text-300 aria-disabled:bg-gray-100 aria-disabled:border-gray-100\",\r\n ],\r\n variants: {\r\n size: {\r\n sm: \"h-7\",\r\n md: \"h-8\",\r\n lg: \"h-11\",\r\n },\r\n },\r\n defaultVariants: {\r\n size: \"md\",\r\n },\r\n});\r\n\r\ninterface TextFieldProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof textFieldVariants> {\r\n type?: React.HTMLInputTypeAttribute;\r\n disabled?: boolean;\r\n suffix?: React.ReactNode;\r\n endAdornment?: React.ReactNode;\r\n startAdornment?: React.ReactNode;\r\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\r\n value?: string | number;\r\n defaultValue?: string | number;\r\n slotProps?: {\r\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>;\r\n };\r\n}\r\n\r\nconst TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(\r\n (\r\n {\r\n className,\r\n slotProps,\r\n suffix,\r\n endAdornment,\r\n startAdornment,\r\n size,\r\n value,\r\n onChange,\r\n defaultValue,\r\n type,\r\n disabled,\r\n onWheel,\r\n id,\r\n \"aria-describedby\": ariaDescribedby,\r\n \"aria-invalid\": ariaInvalid,\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const handleWheel = (event: React.WheelEvent<HTMLInputElement>) => {\r\n if (type === \"number\") {\r\n // Prevents the number input from changing value when scrolling\r\n (event.target as HTMLInputElement).blur();\r\n }\r\n if (onWheel) {\r\n onWheel(event);\r\n }\r\n };\r\n\r\n return (\r\n <div {...props} className={cn(textFieldVariants({ size, className }))} aria-disabled={disabled}>\r\n {startAdornment}\r\n <input\r\n type={type}\r\n onWheel={handleWheel}\r\n ref={ref}\r\n id={id}\r\n aria-describedby={ariaDescribedby}\r\n aria-invalid={ariaInvalid}\r\n onChange={onChange}\r\n value={value}\r\n defaultValue={defaultValue}\r\n disabled={disabled}\r\n {...(slotProps?.inputProps ?? {})}\r\n className={cn(\r\n \"focus:outline-none w-full h-full py-1 rounded-sm file:border-0 bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-text-300\",\r\n !startAdornment ? \"px-3\" : \"ps-1 pe-3\",\r\n slotProps?.inputProps?.className,\r\n )}\r\n />\r\n {typeof suffix === \"string\" || typeof suffix === \"number\" ? (\r\n <span className=\"inline-flex items-center px-2 text-xs font-medium text-primary bg-primary-50 m-0.5 rounded-sm\">{suffix}</span>\r\n ) : (\r\n suffix\r\n )}\r\n {endAdornment}\r\n </div>\r\n );\r\n },\r\n);\r\nTextField.displayName = \"TextField\";\r\n\r\nexport { TextField, type TextFieldProps };\r\n"],"names":["textFieldVariants","tv","TextField","React","className","slotProps","suffix","endAdornment","startAdornment","size","value","onChange","defaultValue","type","disabled","onWheel","id","ariaDescribedby","ariaInvalid","props","ref","handleWheel","event","jsxs","cn","jsx"],"mappings":";;;;AAOA,MAAMA,IAAoBC,EAAG;AAAA,EAC3B,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,EACN;AAAA,EAEF,iBAAiB;AAAA,IACf,MAAM;AAAA,EAAA;AAEV,CAAC,GAgBKC,IAAYC,EAAM;AAAA,EACtB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,IAAAC;AAAA,IACA,oBAAoBC;AAAA,IACpB,gBAAgBC;AAAA,IAChB,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAc,CAACC,MAA8C;AACjE,MAAIT,MAAS,YAEVS,EAAM,OAA4B,KAAA,GAEjCP,KACFA,EAAQO,CAAK;AAAA,IAEjB;AAEA,WACE,gBAAAC,EAAC,OAAA,EAAK,GAAGJ,GAAO,WAAWK,EAAGxB,EAAkB,EAAE,MAAAS,GAAM,WAAAL,EAAA,CAAW,CAAC,GAAG,iBAAeU,GACnF,UAAA;AAAA,MAAAN;AAAA,MACD,gBAAAiB;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAAZ;AAAA,UACA,SAASQ;AAAA,UACT,KAAAD;AAAA,UACA,IAAAJ;AAAA,UACA,oBAAkBC;AAAA,UAClB,gBAAcC;AAAA,UACd,UAAAP;AAAA,UACA,OAAAD;AAAA,UACA,cAAAE;AAAA,UACA,UAAAE;AAAA,UACC,GAAIT,GAAW,cAAc,CAAA;AAAA,UAC9B,WAAWmB;AAAA,YACT;AAAA,YACChB,IAA0B,cAAT;AAAA,YAClBH,GAAW,YAAY;AAAA,UAAA;AAAA,QACzB;AAAA,MAAA;AAAA,MAED,OAAOC,KAAW,YAAY,OAAOA,KAAW,WAC/C,gBAAAmB,EAAC,QAAA,EAAK,WAAU,iGAAiG,UAAAnB,EAAA,CAAO,IAExHA;AAAA,MAEDC;AAAA,IAAA,GACH;AAAA,EAEJ;AACF;AACAL,EAAU,cAAc;"}
1
+ {"version":3,"file":"textfield.es.js","sources":["../src/components/text-field/TextField.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport { tv, VariantProps } from \"tailwind-variants\";\r\n\r\nimport { cn } from \"../../lib/utils\";\r\n\r\nconst textFieldVariants = tv({\r\n base: [\r\n \"mtx-flex mtx-items-center mtx-w-full mtx-rounded-sm mtx-border mtx-border-input mtx-text-text mtx-bg-transparent mtx-p-0 mtx-text-xs [&_input]:mtx-text-xs mtx-font-medium mtx-transition-colors file:mtx-border-0 file:mtx-bg-transparent file:mtx-text-sm file:mtx-font-medium file:mtx-text-foreground\",\r\n \"placeholder:mtx-text-text-300 hover:mtx-border-primary-400 focus-within:mtx-border-primary-400 focus-within:mtx-outline-none focus-within:mtx-ring focus-within:mtx-ring-primary-100\",\r\n \"aria-disabled:mtx-text-text-300 aria-disabled:mtx-bg-gray-100 aria-disabled:mtx-border-gray-100\",\r\n ],\r\n variants: {\r\n size: {\r\n sm: \"mtx-h-7\",\r\n md: \"mtx-h-8\",\r\n lg: \"mtx-h-11\",\r\n },\r\n },\r\n defaultVariants: {\r\n size: \"md\",\r\n },\r\n});\r\n\r\ninterface TextFieldProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof textFieldVariants> {\r\n type?: React.HTMLInputTypeAttribute;\r\n disabled?: boolean;\r\n suffix?: React.ReactNode;\r\n endAdornment?: React.ReactNode;\r\n startAdornment?: React.ReactNode;\r\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\r\n value?: string | number;\r\n defaultValue?: string | number;\r\n slotProps?: {\r\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>;\r\n };\r\n}\r\n\r\nconst TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(\r\n (\r\n {\r\n className,\r\n slotProps,\r\n suffix,\r\n endAdornment,\r\n startAdornment,\r\n size,\r\n value,\r\n onChange,\r\n defaultValue,\r\n type,\r\n disabled,\r\n onWheel,\r\n id,\r\n \"aria-describedby\": ariaDescribedby,\r\n \"aria-invalid\": ariaInvalid,\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const handleWheel = (event: React.WheelEvent<HTMLInputElement>) => {\r\n if (type === \"number\") {\r\n // Prevents the number input from changing value when scrolling\r\n (event.target as HTMLInputElement).blur();\r\n }\r\n if (onWheel) {\r\n onWheel(event);\r\n }\r\n };\r\n\r\n return (\r\n <div {...props} className={cn(textFieldVariants({ size, className }))} aria-disabled={disabled}>\r\n {startAdornment}\r\n <input\r\n type={type}\r\n onWheel={handleWheel}\r\n ref={ref}\r\n id={id}\r\n aria-describedby={ariaDescribedby}\r\n aria-invalid={ariaInvalid}\r\n onChange={onChange}\r\n value={value}\r\n defaultValue={defaultValue}\r\n disabled={disabled}\r\n {...(slotProps?.inputProps ?? {})}\r\n className={cn(\r\n \"focus:mtx-outline-none mtx-w-full mtx-h-full mtx-py-1 mtx-rounded-sm file:mtx-border-0 mtx-bg-transparent file:mtx-text-sm file:mtx-font-medium file:mtx-text-foreground placeholder:mtx-text-text-300\",\r\n !startAdornment ? \"mtx-px-3\" : \"mtx-ps-1 mtx-pe-3\",\r\n slotProps?.inputProps?.className,\r\n )}\r\n />\r\n {typeof suffix === \"string\" || typeof suffix === \"number\" ? (\r\n <span className=\"mtx-inline-flex mtx-items-center mtx-px-2 mtx-text-xs mtx-font-medium mtx-text-primary mtx-bg-primary-50 mtx-m-0.5 mtx-rounded-sm\">\r\n {suffix}\r\n </span>\r\n ) : (\r\n suffix\r\n )}\r\n {endAdornment}\r\n </div>\r\n );\r\n },\r\n);\r\nTextField.displayName = \"TextField\";\r\n\r\nexport { TextField, type TextFieldProps };\r\n"],"names":["textFieldVariants","tv","TextField","React","className","slotProps","suffix","endAdornment","startAdornment","size","value","onChange","defaultValue","type","disabled","onWheel","id","ariaDescribedby","ariaInvalid","props","ref","handleWheel","event","jsxs","cn","jsx"],"mappings":";;;;AAOA,MAAMA,IAAoBC,EAAG;AAAA,EAC3B,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,EACN;AAAA,EAEF,iBAAiB;AAAA,IACf,MAAM;AAAA,EAAA;AAEV,CAAC,GAgBKC,IAAYC,EAAM;AAAA,EACtB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,IAAAC;AAAA,IACA,oBAAoBC;AAAA,IACpB,gBAAgBC;AAAA,IAChB,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAc,CAACC,MAA8C;AACjE,MAAIT,MAAS,YAEVS,EAAM,OAA4B,KAAA,GAEjCP,KACFA,EAAQO,CAAK;AAAA,IAEjB;AAEA,WACE,gBAAAC,EAAC,OAAA,EAAK,GAAGJ,GAAO,WAAWK,EAAGxB,EAAkB,EAAE,MAAAS,GAAM,WAAAL,EAAA,CAAW,CAAC,GAAG,iBAAeU,GACnF,UAAA;AAAA,MAAAN;AAAA,MACD,gBAAAiB;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAAZ;AAAA,UACA,SAASQ;AAAA,UACT,KAAAD;AAAA,UACA,IAAAJ;AAAA,UACA,oBAAkBC;AAAA,UAClB,gBAAcC;AAAA,UACd,UAAAP;AAAA,UACA,OAAAD;AAAA,UACA,cAAAE;AAAA,UACA,UAAAE;AAAA,UACC,GAAIT,GAAW,cAAc,CAAA;AAAA,UAC9B,WAAWmB;AAAA,YACT;AAAA,YACChB,IAA8B,sBAAb;AAAA,YAClBH,GAAW,YAAY;AAAA,UAAA;AAAA,QACzB;AAAA,MAAA;AAAA,MAED,OAAOC,KAAW,YAAY,OAAOA,KAAW,WAC/C,gBAAAmB,EAAC,QAAA,EAAK,WAAU,qIACb,UAAAnB,EAAA,CACH,IAEAA;AAAA,MAEDC;AAAA,IAAA,GACH;AAAA,EAEJ;AACF;AACAL,EAAU,cAAc;"}
@@ -1,71 +1,78 @@
1
- import { jsxs as N, jsx as o } from "react/jsx-runtime";
2
- import { useState as S, useRef as m, useEffect as g } from "react";
3
- import { cn as u } from "./utils.es.js";
4
- const w = () => ({ hour: (/* @__PURE__ */ new Date()).getHours() % 12, minute: (/* @__PURE__ */ new Date()).getMinutes(), ampm: (/* @__PURE__ */ new Date()).getHours() < 12 ? "AM" : "PM" }), k = ({ isOpen: c, time: a, onTimeChange: i, slotsProps: d }) => {
5
- const [r, s] = S(a ?? w()), e = m(r), h = m(null), x = m(null), n = 32, l = 8, b = (t) => {
6
- h?.current?.scrollTo({
7
- top: t * (n + l),
1
+ import { jsxs as N, jsx as m } from "react/jsx-runtime";
2
+ import { useState as S, useRef as i, useEffect as g } from "react";
3
+ import { cn as c } from "./utils.es.js";
4
+ const w = () => ({ hour: (/* @__PURE__ */ new Date()).getHours() % 12, minute: (/* @__PURE__ */ new Date()).getMinutes(), ampm: (/* @__PURE__ */ new Date()).getHours() < 12 ? "AM" : "PM" }), k = ({ isOpen: l, time: s, onTimeChange: u, slotsProps: f }) => {
5
+ const [r, x] = S(s ?? w()), e = i(r), d = i(null), h = i(null), o = 32, n = 8, b = (t) => {
6
+ d?.current?.scrollTo({
7
+ top: t * (o + n),
8
8
  behavior: "smooth"
9
9
  });
10
10
  }, y = (t) => {
11
- x?.current?.scrollTo({
12
- top: t * (n + l),
11
+ h?.current?.scrollTo({
12
+ top: t * (o + n),
13
13
  behavior: "smooth"
14
14
  });
15
15
  }, p = (t) => {
16
- e.current = { ...r, hour: t }, s(e.current), i(e.current);
16
+ e.current = { ...r, hour: t }, x(e.current), u(e.current);
17
17
  }, v = (t) => {
18
- e.current = { ...r, minute: t }, s(e.current), i(e.current);
18
+ e.current = { ...r, minute: t }, x(e.current), u(e.current);
19
19
  }, M = (t) => {
20
- e.current = { ...r, ampm: t }, s(e.current), i(e.current);
20
+ e.current = { ...r, ampm: t }, x(e.current), u(e.current);
21
21
  };
22
22
  return g(() => {
23
- c && s(a ?? w());
24
- }, [c, a]), g(() => {
25
- c && setTimeout(() => {
23
+ l && x(s ?? w());
24
+ }, [l, s]), g(() => {
25
+ l && setTimeout(() => {
26
26
  b(e.current.hour - 1), y(e.current.minute);
27
27
  });
28
- }, [c]), /* @__PURE__ */ N("div", { ...d?.content ?? {}, className: u("py-2 px-0 h-52 w-full flex justify-center gap-1", d?.content?.className), children: [
29
- /* @__PURE__ */ o("div", { className: "w-24 px-2 h-full relative overflow-auto thin-scrollbar", ref: h, children: Array.from({ length: 12 }, (t, f) => f).map((t) => /* @__PURE__ */ o(
30
- "button",
31
- {
32
- style: { height: n, marginBottom: l },
33
- className: u(
34
- "w-full flex justify-center items-center rounded-full text-xs font-bold text-text-400",
35
- t + 1 === r.hour && "bg-secondary"
36
- ),
37
- onClick: () => p(t + 1),
38
- children: (t + 1).toString().padStart(2, "0")
39
- },
40
- t + 1
41
- )) }),
42
- /* @__PURE__ */ o("div", { className: "h-full w-24 px-2 relative overflow-auto thin-scrollbar", ref: x, children: Array.from({ length: 60 }, (t, f) => f).map((t) => /* @__PURE__ */ o(
43
- "button",
44
- {
45
- style: { height: n, marginBottom: l },
46
- className: u(
47
- "w-full flex justify-center items-center rounded-full text-xs font-bold text-text-400",
48
- t === r.minute && "bg-secondary"
49
- ),
50
- onClick: () => v(t),
51
- children: t.toString().padStart(2, "0")
52
- },
53
- t
54
- )) }),
55
- /* @__PURE__ */ o("div", { className: "h-full w-24 px-2 relative overflow-auto thin-scrollbar", children: ["AM", "PM"].map((t) => /* @__PURE__ */ o(
56
- "button",
57
- {
58
- style: { height: n, marginBottom: l },
59
- className: u(
60
- "w-full flex justify-center items-center rounded-full text-xs font-bold text-text-400",
61
- t === r.ampm && "bg-secondary"
62
- ),
63
- onClick: () => M(t),
64
- children: t
65
- },
66
- t
67
- )) })
68
- ] });
28
+ }, [l]), /* @__PURE__ */ N(
29
+ "div",
30
+ {
31
+ ...f?.content ?? {},
32
+ className: c("mtx-py-2 mtx-px-0 mtx-h-52 mtx-w-full mtx-flex mtx-justify-center mtx-gap-1", f?.content?.className),
33
+ children: [
34
+ /* @__PURE__ */ m("div", { className: "mtx-w-24 mtx-px-2 mtx-h-full mtx-relative mtx-overflow-auto mtx-thin-scrollbar", ref: d, children: Array.from({ length: 12 }, (t, a) => a).map((t) => /* @__PURE__ */ m(
35
+ "button",
36
+ {
37
+ style: { height: o, marginBottom: n },
38
+ className: c(
39
+ "mtx-w-full mtx-flex mtx-justify-center mtx-items-center mtx-rounded-full mtx-text-xs mtx-font-bold mtx-text-text-400",
40
+ t + 1 === r.hour && "mtx-bg-secondary"
41
+ ),
42
+ onClick: () => p(t + 1),
43
+ children: (t + 1).toString().padStart(2, "0")
44
+ },
45
+ t + 1
46
+ )) }),
47
+ /* @__PURE__ */ m("div", { className: "mtx-h-full mtx-w-24 mtx-px-2 mtx-relative mtx-overflow-auto mtx-thin-scrollbar", ref: h, children: Array.from({ length: 60 }, (t, a) => a).map((t) => /* @__PURE__ */ m(
48
+ "button",
49
+ {
50
+ style: { height: o, marginBottom: n },
51
+ className: c(
52
+ "mtx-w-full mtx-flex mtx-justify-center mtx-items-center mtx-rounded-full mtx-text-xs mtx-font-bold mtx-text-text-400",
53
+ t === r.minute && "mtx-bg-secondary"
54
+ ),
55
+ onClick: () => v(t),
56
+ children: t.toString().padStart(2, "0")
57
+ },
58
+ t
59
+ )) }),
60
+ /* @__PURE__ */ m("div", { className: "mtx-h-full mtx-w-24 mtx-px-2 mtx-relative mtx-overflow-auto mtx-thin-scrollbar", children: ["AM", "PM"].map((t) => /* @__PURE__ */ m(
61
+ "button",
62
+ {
63
+ style: { height: o, marginBottom: n },
64
+ className: c(
65
+ "mtx-w-full mtx-flex mtx-justify-center mtx-items-center mtx-rounded-full mtx-text-xs mtx-font-bold mtx-text-text-400",
66
+ t === r.ampm && "mtx-bg-secondary"
67
+ ),
68
+ onClick: () => M(t),
69
+ children: t
70
+ },
71
+ t
72
+ )) })
73
+ ]
74
+ }
75
+ );
69
76
  };
70
77
  export {
71
78
  k as TimePickerContent