@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,89 +1,92 @@
1
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
- import * as d from "react";
3
- import { DayPicker as g, Chevron as p } from "react-day-picker";
4
- import { ChevronDown as x, ChevronLeft as w, ChevronRight as y } from "@trsys-tech/matrix-icons";
5
- import { Collapsible as v, CollapsibleTrigger as u, CollapsibleContent as C } from "@radix-ui/react-collapsible";
6
- import { cn as o } from "./utils.es.js";
1
+ import { jsx as m, jsxs as d } from "react/jsx-runtime";
2
+ import * as n from "react";
3
+ import { DayPicker as h, Chevron as g } from "react-day-picker";
4
+ import { ChevronDown as p, ChevronLeft as w, ChevronRight as y } from "@trsys-tech/matrix-icons";
5
+ import { Collapsible as v, CollapsibleTrigger as s, CollapsibleContent as C } from "@radix-ui/react-collapsible";
6
+ import { cn as x } from "./utils.es.js";
7
7
  import { Button as N } from "./button.es.js";
8
- function _({ className: c, classNames: f, showOutsideDays: m = !0, ...a }) {
9
- const n = d.useRef(null), [s, b] = d.useState({ width: 0, height: 0 });
10
- return d.useEffect(() => {
11
- if (n.current) {
12
- const { width: e, height: l } = n.current.parentElement?.parentElement?.parentElement?.getBoundingClientRect() ?? {
8
+ function _({ className: i, classNames: u, showOutsideDays: c = !0, ...r }) {
9
+ const o = n.useRef(null), [l, f] = n.useState({ width: 0, height: 0 });
10
+ return n.useEffect(() => {
11
+ if (o.current) {
12
+ const { width: t, height: a } = o.current.parentElement?.parentElement?.parentElement?.getBoundingClientRect() ?? {
13
13
  width: 0,
14
14
  height: 0
15
15
  };
16
- b({ width: e, height: l });
16
+ f({ width: t, height: a });
17
17
  }
18
- }, []), /* @__PURE__ */ r(
19
- g,
18
+ }, []), /* @__PURE__ */ m(
19
+ h,
20
20
  {
21
- showOutsideDays: m,
22
- className: o("p-3 relative w-full max-w-sm group/root z-10", c),
21
+ showOutsideDays: c,
22
+ className: x("mtx-p-3 mtx-relative mtx-w-full mtx-max-w-sm mtx-group/root mtx-z-10", i),
23
23
  classNames: {
24
- months: o("relative flex flex-col", a.mode === "range" && "md:flex-row md:space-x-4 md:space-y-2"),
25
- month: "space-y-4 peer md:flex-1",
26
- month_caption: "flex justify-center pt-1 relative items-center",
27
- dropdowns: "flex gap-2",
28
- caption_label: "text-sm font-bold",
29
- nav: o("space-x-1 flex items-center group-has-[[data-state=open]]/root:hidden", a.mode !== "range" && "relative"),
30
- button_previous: o(
31
- "h-7 w-7 bg-transparent p-0 text-primary hover:opacity-100 absolute left-2 top-0 md:top-0.5 z-10",
32
- a.mode === "range" && "md:left-8 md:top-2"
24
+ months: x("mtx-relative mtx-flex mtx-flex-col", r.mode === "range" && "md:mtx-flex-row md:mtx-space-x-4 md:mtx-space-y-2"),
25
+ month: "mtx-space-y-4 mtx-peer md:mtx-flex-1",
26
+ month_caption: "mtx-flex mtx-justify-center mtx-pt-1 mtx-relative mtx-items-center",
27
+ dropdowns: "mtx-flex mtx-gap-2",
28
+ caption_label: "mtx-text-sm mtx-font-bold",
29
+ nav: x("mtx-space-x-1 mtx-flex mtx-items-center group-has-[[data-state=open]]/root:mtx-hidden", r.mode !== "range" && "mtx-relative"),
30
+ button_previous: x(
31
+ "mtx-h-7 mtx-w-7 mtx-bg-transparent mtx-p-0 mtx-text-primary hover:mtx-opacity-100 mtx-absolute mtx-left-2 mtx-top-0 md:mtx-top-0.5 mtx-z-10",
32
+ r.mode === "range" && "md:mtx-left-8 md:mtx-top-2"
33
33
  ),
34
- button_next: o(
35
- "h-7 w-7 bg-transparent p-0 text-primary hover:opacity-100 absolute right-2 top-0 md:top-0.5 z-10",
36
- a.mode === "range" && "md:top-2"
34
+ button_next: x(
35
+ "mtx-h-7 mtx-w-7 mtx-bg-transparent mtx-p-0 mtx-text-primary hover:mtx-opacity-100 mtx-absolute mtx-right-2 mtx-top-0 md:mtx-top-0.5 mtx-z-10",
36
+ r.mode === "range" && "md:mtx-top-2"
37
37
  ),
38
- month_grid: o("w-full border-collapse space-y-1"),
39
- weekdays: "grid grid-cols-7 justify-items-center",
40
- weekday: "text-text rounded-md w-8 font-bold text-sm",
41
- week: "mt-2 h-11 grid grid-cols-7 items-center",
42
- day: "relative p-0 text-center text-sm h-11 min-w-11 md:min-w-9 md:h-9",
43
- day_button: "w-11 md:w-9 h-full p-0 text-sm",
44
- range_start: "before:block before:absolute before:-z-10 before:content-[''] before:w-1/2 before:end-0 before:h-full before:bg-secondary/50 after:!w-0",
45
- range_end: "after:block after:absolute after:top-0 after:-z-10 after:content-[''] after:w-1/2 after:start-0 after:h-full after:bg-secondary/50 before:!w-0",
46
- selected: "[&>button]:bg-secondary [&>button]:rounded-full text-text font-bold [&>button]:hover:bg-secondary [&>button]:hover:text-text [&>button]:focus:bg-secondary [&>button]:focus:text-text [&>button]:text-xs",
47
- today: "text-primary font-bold [&>button]:text-xs",
48
- outside: "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
49
- disabled: "text-muted-foreground opacity-50",
50
- range_middle: "bg-secondary/50 [&>button]:data-[selected='true']:bg-secondary/0 data-[selected='true']:rounded-none text-accent-foreground",
51
- hidden: "invisible",
52
- ...f
38
+ month_grid: x("mtx-w-full mtx-border-collapse mtx-space-y-1"),
39
+ weekdays: "mtx-grid mtx-grid-cols-7 mtx-justify-items-center",
40
+ weekday: "mtx-text-text mtx-rounded-md mtx-w-8 mtx-font-bold mtx-text-sm",
41
+ week: "mtx-mt-2 mtx-h-11 mtx-grid mtx-grid-cols-7 mtx-items-center",
42
+ day: "mtx-relative mtx-p-0 mtx-text-center mtx-text-sm mtx-h-11 mtx-min-w-11 md:mtx-min-w-9 md:mtx-h-9",
43
+ day_button: "mtx-w-11 md:mtx-w-9 mtx-h-full mtx-p-0 mtx-text-sm",
44
+ range_start: "before:mtx-block before:mtx-absolute before:mtx--z-10 before:mtx-content-[''] before:mtx-w-1/2 before:mtx-end-0 before:mtx-h-full before:mtx-bg-secondary/50 after:!mtx-w-0",
45
+ range_end: "after:mtx-block after:mtx-absolute after:mtx-top-0 after:mtx--z-10 after:mtx-content-[''] after:mtx-w-1/2 after:mtx-start-0 after:mtx-h-full after:mtx-bg-secondary/50 before:!mtx-w-0",
46
+ selected: "[&>button]:mtx-bg-secondary [&>button]:mtx-rounded-full mtx-text-text mtx-font-bold [&>button]:hover:mtx-bg-secondary [&>button]:hover:mtx-text-text [&>button]:focus:mtx-bg-secondary [&>button]:focus:mtx-text-text [&>button]:mtx-text-xs",
47
+ today: "mtx-text-primary mtx-font-bold [&>button]:mtx-text-xs",
48
+ outside: "mtx-day-outside mtx-text-muted-foreground mtx-opacity-50 mtx-aria-selected:mtx-bg-accent/50 mtx-aria-selected:mtx-text-muted-foreground mtx-aria-selected:mtx-opacity-30",
49
+ disabled: "mtx-text-muted-foreground mtx-opacity-50",
50
+ range_middle: "mtx-bg-secondary/50 [&>button]:mtx-data-[selected='true']:mtx-bg-secondary/0 [&>button]:mtx-data-[selected='true']:mtx-rounded-none mtx-text-accent-foreground",
51
+ hidden: "mtx-invisible",
52
+ ...u
53
53
  },
54
54
  components: {
55
- Chevron: (e) => e.orientation === "left" ? /* @__PURE__ */ r(w, { ...e, className: "h-6 w-6" }) : e.orientation === "right" ? /* @__PURE__ */ r(y, { ...e, className: "h-6 w-6" }) : /* @__PURE__ */ r(p, { ...e }),
56
- YearsDropdown: (e) => {
57
- const l = (t) => {
58
- e.onChange?.({ target: { value: t } });
55
+ Chevron: (t) => t.orientation === "left" ? /* @__PURE__ */ m(w, { ...t, className: "mtx-h-6 mtx-w-6" }) : t.orientation === "right" ? /* @__PURE__ */ m(y, { ...t, className: "mtx-h-6 mtx-w-6" }) : /* @__PURE__ */ m(g, { ...t }),
56
+ YearsDropdown: (t) => {
57
+ const a = (e) => {
58
+ t.onChange?.({ target: { value: e } });
59
59
  };
60
- return /* @__PURE__ */ i(v, { ref: n, children: [
61
- /* @__PURE__ */ i(u, { className: "group flex items-center gap-1", children: [
62
- e.value,
60
+ return /* @__PURE__ */ d(v, { ref: o, children: [
61
+ /* @__PURE__ */ d(s, { className: "mtx-group mtx-flex mtx-items-center mtx-gap-1", children: [
62
+ t.value,
63
63
  " ",
64
- /* @__PURE__ */ r(x, { className: "text-primary w-5 h-5 group-data-[state='open']:rotate-180 transition-transform ms-auto" })
64
+ /* @__PURE__ */ m(p, { className: "mtx-text-primary mtx-w-5 mtx-h-5 group-data-[state='open']:mtx-rotate-180 mtx-transition-transform mtx-ms-auto" })
65
65
  ] }),
66
- /* @__PURE__ */ r(
66
+ /* @__PURE__ */ m(
67
67
  C,
68
68
  {
69
- className: "overflow-auto z-50 absolute bg-popover left-2 top-11 p-1",
70
- style: { width: s.width, height: s.height - 44 },
71
- children: /* @__PURE__ */ r("div", { className: "flex flex-row flex-wrap gap-4", children: e.options ? [...e.options].sort((t, h) => Number(h.value) - Number(t.value)).map((t) => /* @__PURE__ */ r(u, { asChild: !0, children: /* @__PURE__ */ r(
69
+ className: "mtx-overflow-auto mtx-z-50 mtx-absolute mtx-bg-popover mtx-left-2 mtx-top-11 mtx-p-1",
70
+ style: { width: l.width, height: l.height - 44 },
71
+ children: /* @__PURE__ */ m("div", { className: "mtx-flex mtx-flex-row mtx-flex-wrap mtx-gap-4", children: t.options ? [...t.options].sort((e, b) => Number(b.value) - Number(e.value)).map((e) => /* @__PURE__ */ m(s, { asChild: !0, children: /* @__PURE__ */ m(
72
72
  N,
73
73
  {
74
- "data-value": t.value,
74
+ "data-value": e.value,
75
75
  variant: "text",
76
- className: o("h-6 w-14 py-1 px-3 rounded-full font-bold", e.value === t.value && "bg-secondary"),
77
- onClick: () => l(t.value.toString()),
78
- children: t.label
76
+ className: x(
77
+ "mtx-h-6 mtx-w-14 mtx-py-1 mtx-px-3 mtx-rounded-full mtx-font-bold",
78
+ t.value === e.value && "mtx-bg-secondary"
79
+ ),
80
+ onClick: () => a(e.value.toString()),
81
+ children: e.label
79
82
  }
80
- ) }, t.label)) : null })
83
+ ) }, e.label)) : null })
81
84
  }
82
85
  )
83
86
  ] });
84
87
  }
85
88
  },
86
- ...a
89
+ ...r
87
90
  }
88
91
  );
89
92
  }
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.es.js","sources":["../src/components/date-picker/calendar.tsx"],"sourcesContent":["\"use client\";\n\n/* eslint-disable camelcase */\nimport * as React from \"react\";\nimport { Chevron, DayPicker, DayPickerProps } from \"react-day-picker\";\nimport { ChevronDown, ChevronLeft, ChevronRight } from \"@trsys-tech/matrix-icons\";\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from \"@radix-ui/react-collapsible\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../button/Button\";\n\nexport type CalendarProps = DayPickerProps & {};\n\nfunction Calendar({ className, classNames, showOutsideDays = true, ...props }: CalendarProps) {\n const yearCollapseRef = React.useRef<HTMLDivElement>(null);\n const [size, setSize] = React.useState({ width: 0, height: 0 });\n\n React.useEffect(() => {\n if (yearCollapseRef.current) {\n const { width, height } = yearCollapseRef.current.parentElement?.parentElement?.parentElement?.getBoundingClientRect() ?? {\n width: 0,\n height: 0,\n };\n setSize({ width, height });\n }\n }, []);\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\"p-3 relative w-full max-w-sm group/root z-10\", className)}\n classNames={{\n months: cn(\"relative flex flex-col\", props.mode === \"range\" && \"md:flex-row md:space-x-4 md:space-y-2\"),\n month: \"space-y-4 peer md:flex-1\",\n month_caption: \"flex justify-center pt-1 relative items-center\",\n dropdowns: \"flex gap-2\",\n caption_label: \"text-sm font-bold\",\n nav: cn(\"space-x-1 flex items-center group-has-[[data-state=open]]/root:hidden\", props.mode !== \"range\" && \"relative\"),\n button_previous: cn(\n \"h-7 w-7 bg-transparent p-0 text-primary hover:opacity-100 absolute left-2 top-0 md:top-0.5 z-10\",\n props.mode === \"range\" && \"md:left-8 md:top-2\",\n ),\n button_next: cn(\n \"h-7 w-7 bg-transparent p-0 text-primary hover:opacity-100 absolute right-2 top-0 md:top-0.5 z-10\",\n props.mode === \"range\" && \"md:top-2\",\n ),\n month_grid: cn(\"w-full border-collapse space-y-1\"),\n weekdays: \"grid grid-cols-7 justify-items-center\",\n weekday: \"text-text rounded-md w-8 font-bold text-sm\",\n week: \"mt-2 h-11 grid grid-cols-7 items-center\",\n day: \"relative p-0 text-center text-sm h-11 min-w-11 md:min-w-9 md:h-9\",\n day_button: \"w-11 md:w-9 h-full p-0 text-sm\",\n range_start:\n \"before:block before:absolute before:-z-10 before:content-[''] before:w-1/2 before:end-0 before:h-full before:bg-secondary/50 after:!w-0\",\n range_end:\n \"after:block after:absolute after:top-0 after:-z-10 after:content-[''] after:w-1/2 after:start-0 after:h-full after:bg-secondary/50 before:!w-0\",\n selected:\n \"[&>button]:bg-secondary [&>button]:rounded-full text-text font-bold [&>button]:hover:bg-secondary [&>button]:hover:text-text [&>button]:focus:bg-secondary [&>button]:focus:text-text [&>button]:text-xs\",\n today: \"text-primary font-bold [&>button]:text-xs\",\n outside:\n \"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30\",\n disabled: \"text-muted-foreground opacity-50\",\n range_middle: \"bg-secondary/50 [&>button]:data-[selected='true']:bg-secondary/0 data-[selected='true']:rounded-none text-accent-foreground\",\n hidden: \"invisible\",\n ...classNames,\n }}\n components={{\n Chevron: props => {\n if (props.orientation === \"left\") {\n return <ChevronLeft {...props} className=\"h-6 w-6\" />;\n } else if (props.orientation === \"right\") {\n return <ChevronRight {...props} className=\"h-6 w-6\" />;\n }\n return <Chevron {...props} />;\n },\n YearsDropdown: params => {\n const handleChange = (value: string) => {\n params.onChange?.({ target: { value: value } } as unknown as React.ChangeEvent<HTMLSelectElement>);\n };\n return (\n <Collapsible ref={yearCollapseRef}>\n <CollapsibleTrigger className=\"group flex items-center gap-1\">\n {params.value} <ChevronDown className=\"text-primary w-5 h-5 group-data-[state='open']:rotate-180 transition-transform ms-auto\" />\n </CollapsibleTrigger>\n <CollapsibleContent\n className=\"overflow-auto z-50 absolute bg-popover left-2 top-11 p-1\"\n style={{ width: size.width, height: size.height - 44 }}\n >\n <div className=\"flex flex-row flex-wrap gap-4\">\n {params.options\n ? [...params.options]\n .sort((a, b) => Number(b.value) - Number(a.value)) // Sort in descending order (newest year first)\n .map(option => (\n <CollapsibleTrigger asChild key={option.label}>\n <Button\n data-value={option.value}\n variant=\"text\"\n className={cn(\"h-6 w-14 py-1 px-3 rounded-full font-bold\", params.value === option.value && \"bg-secondary\")}\n onClick={() => handleChange(option.value.toString())}\n >\n {option.label}\n </Button>\n </CollapsibleTrigger>\n ))\n : null}\n </div>\n </CollapsibleContent>\n </Collapsible>\n );\n },\n }}\n {...props}\n />\n );\n}\nCalendar.displayName = \"Calendar\";\n\nexport { Calendar };\n"],"names":["Calendar","className","classNames","showOutsideDays","props","yearCollapseRef","React","size","setSize","width","height","jsx","DayPicker","cn","ChevronLeft","ChevronRight","Chevron","params","handleChange","value","jsxs","Collapsible","CollapsibleTrigger","ChevronDown","CollapsibleContent","a","b","option","Button"],"mappings":"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"}
1
+ {"version":3,"file":"calendar.es.js","sources":["../src/components/date-picker/calendar.tsx"],"sourcesContent":["\"use client\";\n\n/* eslint-disable camelcase */\nimport * as React from \"react\";\nimport { Chevron, DayPicker, DayPickerProps } from \"react-day-picker\";\nimport { ChevronDown, ChevronLeft, ChevronRight } from \"@trsys-tech/matrix-icons\";\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from \"@radix-ui/react-collapsible\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../button/Button\";\n\nexport type CalendarProps = DayPickerProps & {};\n\nfunction Calendar({ className, classNames, showOutsideDays = true, ...props }: CalendarProps) {\n const yearCollapseRef = React.useRef<HTMLDivElement>(null);\n const [size, setSize] = React.useState({ width: 0, height: 0 });\n\n React.useEffect(() => {\n if (yearCollapseRef.current) {\n const { width, height } = yearCollapseRef.current.parentElement?.parentElement?.parentElement?.getBoundingClientRect() ?? {\n width: 0,\n height: 0,\n };\n setSize({ width, height });\n }\n }, []);\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\"mtx-p-3 mtx-relative mtx-w-full mtx-max-w-sm mtx-group/root mtx-z-10\", className)}\n classNames={{\n months: cn(\"mtx-relative mtx-flex mtx-flex-col\", props.mode === \"range\" && \"md:mtx-flex-row md:mtx-space-x-4 md:mtx-space-y-2\"),\n month: \"mtx-space-y-4 mtx-peer md:mtx-flex-1\",\n month_caption: \"mtx-flex mtx-justify-center mtx-pt-1 mtx-relative mtx-items-center\",\n dropdowns: \"mtx-flex mtx-gap-2\",\n caption_label: \"mtx-text-sm mtx-font-bold\",\n nav: cn(\"mtx-space-x-1 mtx-flex mtx-items-center group-has-[[data-state=open]]/root:mtx-hidden\", props.mode !== \"range\" && \"mtx-relative\"),\n button_previous: cn(\n \"mtx-h-7 mtx-w-7 mtx-bg-transparent mtx-p-0 mtx-text-primary hover:mtx-opacity-100 mtx-absolute mtx-left-2 mtx-top-0 md:mtx-top-0.5 mtx-z-10\",\n props.mode === \"range\" && \"md:mtx-left-8 md:mtx-top-2\",\n ),\n button_next: cn(\n \"mtx-h-7 mtx-w-7 mtx-bg-transparent mtx-p-0 mtx-text-primary hover:mtx-opacity-100 mtx-absolute mtx-right-2 mtx-top-0 md:mtx-top-0.5 mtx-z-10\",\n props.mode === \"range\" && \"md:mtx-top-2\",\n ),\n month_grid: cn(\"mtx-w-full mtx-border-collapse mtx-space-y-1\"),\n weekdays: \"mtx-grid mtx-grid-cols-7 mtx-justify-items-center\",\n weekday: \"mtx-text-text mtx-rounded-md mtx-w-8 mtx-font-bold mtx-text-sm\",\n week: \"mtx-mt-2 mtx-h-11 mtx-grid mtx-grid-cols-7 mtx-items-center\",\n day: \"mtx-relative mtx-p-0 mtx-text-center mtx-text-sm mtx-h-11 mtx-min-w-11 md:mtx-min-w-9 md:mtx-h-9\",\n day_button: \"mtx-w-11 md:mtx-w-9 mtx-h-full mtx-p-0 mtx-text-sm\",\n range_start:\n \"before:mtx-block before:mtx-absolute before:mtx--z-10 before:mtx-content-[''] before:mtx-w-1/2 before:mtx-end-0 before:mtx-h-full before:mtx-bg-secondary/50 after:!mtx-w-0\",\n range_end:\n \"after:mtx-block after:mtx-absolute after:mtx-top-0 after:mtx--z-10 after:mtx-content-[''] after:mtx-w-1/2 after:mtx-start-0 after:mtx-h-full after:mtx-bg-secondary/50 before:!mtx-w-0\",\n selected:\n \"[&>button]:mtx-bg-secondary [&>button]:mtx-rounded-full mtx-text-text mtx-font-bold [&>button]:hover:mtx-bg-secondary [&>button]:hover:mtx-text-text [&>button]:focus:mtx-bg-secondary [&>button]:focus:mtx-text-text [&>button]:mtx-text-xs\",\n today: \"mtx-text-primary mtx-font-bold [&>button]:mtx-text-xs\",\n outside:\n \"mtx-day-outside mtx-text-muted-foreground mtx-opacity-50 mtx-aria-selected:mtx-bg-accent/50 mtx-aria-selected:mtx-text-muted-foreground mtx-aria-selected:mtx-opacity-30\",\n disabled: \"mtx-text-muted-foreground mtx-opacity-50\",\n range_middle:\n \"mtx-bg-secondary/50 [&>button]:mtx-data-[selected='true']:mtx-bg-secondary/0 [&>button]:mtx-data-[selected='true']:mtx-rounded-none mtx-text-accent-foreground\",\n hidden: \"mtx-invisible\",\n ...classNames,\n }}\n components={{\n Chevron: props => {\n if (props.orientation === \"left\") {\n return <ChevronLeft {...props} className=\"mtx-h-6 mtx-w-6\" />;\n } else if (props.orientation === \"right\") {\n return <ChevronRight {...props} className=\"mtx-h-6 mtx-w-6\" />;\n }\n return <Chevron {...props} />;\n },\n YearsDropdown: params => {\n const handleChange = (value: string) => {\n params.onChange?.({ target: { value: value } } as unknown as React.ChangeEvent<HTMLSelectElement>);\n };\n return (\n <Collapsible ref={yearCollapseRef}>\n <CollapsibleTrigger className=\"mtx-group mtx-flex mtx-items-center mtx-gap-1\">\n {params.value}{\" \"}\n <ChevronDown className=\"mtx-text-primary mtx-w-5 mtx-h-5 group-data-[state='open']:mtx-rotate-180 mtx-transition-transform mtx-ms-auto\" />\n </CollapsibleTrigger>\n <CollapsibleContent\n className=\"mtx-overflow-auto mtx-z-50 mtx-absolute mtx-bg-popover mtx-left-2 mtx-top-11 mtx-p-1\"\n style={{ width: size.width, height: size.height - 44 }}\n >\n <div className=\"mtx-flex mtx-flex-row mtx-flex-wrap mtx-gap-4\">\n {params.options\n ? [...params.options]\n .sort((a, b) => Number(b.value) - Number(a.value)) // Sort in descending order (newest year first)\n .map(option => (\n <CollapsibleTrigger asChild key={option.label}>\n <Button\n data-value={option.value}\n variant=\"text\"\n className={cn(\n \"mtx-h-6 mtx-w-14 mtx-py-1 mtx-px-3 mtx-rounded-full mtx-font-bold\",\n params.value === option.value && \"mtx-bg-secondary\",\n )}\n onClick={() => handleChange(option.value.toString())}\n >\n {option.label}\n </Button>\n </CollapsibleTrigger>\n ))\n : null}\n </div>\n </CollapsibleContent>\n </Collapsible>\n );\n },\n }}\n {...props}\n />\n );\n}\nCalendar.displayName = \"Calendar\";\n\nexport { Calendar };\n"],"names":["Calendar","className","classNames","showOutsideDays","props","yearCollapseRef","React","size","setSize","width","height","jsx","DayPicker","cn","ChevronLeft","ChevronRight","Chevron","params","handleChange","value","jsxs","Collapsible","CollapsibleTrigger","ChevronDown","CollapsibleContent","a","option","Button"],"mappings":"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"}
package/dist/card.es.js CHANGED
@@ -1,24 +1,24 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import o from "react";
3
- import { cn as t } from "./utils.es.js";
4
- const s = o.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d("div", { ref: r, className: t("rounded-lg bg-card text-card-foreground shadow-card", a), ...e }));
5
- s.displayName = "Card";
6
- const i = o.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d("div", { ref: r, className: t("flex flex-col space-y-1.5 p-4", a), ...e }));
7
- i.displayName = "CardHeader";
8
- const c = o.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d("h3", { ref: r, className: t("font-semibold leading-none tracking-tight", a), ...e }));
9
- c.displayName = "CardTitle";
10
- const f = o.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d("p", { ref: r, className: t("text-sm text-muted-foreground", a), ...e }));
11
- f.displayName = "CardDescription";
12
- const l = o.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d("div", { ref: r, className: t("p-4 pt-0", a), ...e }));
13
- l.displayName = "CardContent";
14
- const m = o.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d("div", { ref: r, className: t("flex items-center p-4 pt-0", a), ...e }));
15
- m.displayName = "CardFooter";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import d from "react";
3
+ import { cn as m } from "./utils.es.js";
4
+ const o = d.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ r("div", { ref: e, className: m("mtx-rounded-lg mtx-bg-card mtx-text-card-foreground mtx-shadow-card", t), ...a }));
5
+ o.displayName = "Card";
6
+ const s = d.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ r("div", { ref: e, className: m("mtx-flex mtx-flex-col mtx-space-y-1.5 mtx-p-4", t), ...a }));
7
+ s.displayName = "CardHeader";
8
+ const x = d.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ r("h3", { ref: e, className: m("mtx-font-semibold mtx-leading-none mtx-tracking-tight", t), ...a }));
9
+ x.displayName = "CardTitle";
10
+ const i = d.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ r("p", { ref: e, className: m("mtx-text-sm mtx-text-muted-foreground", t), ...a }));
11
+ i.displayName = "CardDescription";
12
+ const c = d.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ r("div", { ref: e, className: m("mtx-p-4 mtx-pt-0", t), ...a }));
13
+ c.displayName = "CardContent";
14
+ const f = d.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ r("div", { ref: e, className: m("mtx-flex mtx-items-center mtx-p-4 mtx-pt-0", t), ...a }));
15
+ f.displayName = "CardFooter";
16
16
  export {
17
- s as Card,
18
- l as CardContent,
19
- f as CardDescription,
20
- m as CardFooter,
21
- i as CardHeader,
22
- c as CardTitle
17
+ o as Card,
18
+ c as CardContent,
19
+ i as CardDescription,
20
+ f as CardFooter,
21
+ s as CardHeader,
22
+ x as CardTitle
23
23
  };
24
24
  //# sourceMappingURL=card.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.es.js","sources":["../src/components/card/Card.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport React from \"react\";\r\nimport { cn } from \"../../lib/utils\";\r\n\r\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (\r\n <div ref={ref} className={cn(\"rounded-lg bg-card text-card-foreground shadow-card\", className)} {...props} />\r\n));\r\nCard.displayName = \"Card\";\r\ntype CardProps = React.ComponentProps<typeof Card>;\r\n\r\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (\r\n <div ref={ref} className={cn(\"flex flex-col space-y-1.5 p-4\", className)} {...props} />\r\n));\r\nCardHeader.displayName = \"CardHeader\";\r\ntype CardHeaderProps = React.ComponentProps<typeof CardHeader>;\r\n\r\nconst CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(({ className, ...props }, ref) => (\r\n <h3 ref={ref} className={cn(\"font-semibold leading-none tracking-tight\", className)} {...props} />\r\n));\r\nCardTitle.displayName = \"CardTitle\";\r\ntype CardTitleProps = React.ComponentProps<typeof CardTitle>;\r\n\r\nconst CardDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(({ className, ...props }, ref) => (\r\n <p ref={ref} className={cn(\"text-sm text-muted-foreground\", className)} {...props} />\r\n));\r\nCardDescription.displayName = \"CardDescription\";\r\ntype CardDescriptionProps = React.ComponentProps<typeof CardDescription>;\r\n\r\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (\r\n <div ref={ref} className={cn(\"p-4 pt-0\", className)} {...props} />\r\n));\r\nCardContent.displayName = \"CardContent\";\r\ntype CardContentProps = React.ComponentProps<typeof CardContent>;\r\n\r\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (\r\n <div ref={ref} className={cn(\"flex items-center p-4 pt-0\", className)} {...props} />\r\n));\r\nCardFooter.displayName = \"CardFooter\";\r\ntype CardFooterProps = React.ComponentProps<typeof CardFooter>;\r\n\r\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };\r\nexport type { CardProps, CardHeaderProps, CardFooterProps, CardTitleProps, CardDescriptionProps, CardContentProps };\r\n"],"names":["Card","React","className","props","ref","cn","CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],"mappings":";;;AAKA,MAAMA,IAAOC,EAAM,WAAiE,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBAC3G,OAAA,EAAI,KAAAA,GAAU,WAAWC,EAAG,uDAAuDH,CAAS,GAAI,GAAGC,GAAO,CAC5G;AACDH,EAAK,cAAc;AAGnB,MAAMM,IAAaL,EAAM,WAAiE,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBACjH,OAAA,EAAI,KAAAA,GAAU,WAAWC,EAAG,iCAAiCH,CAAS,GAAI,GAAGC,GAAO,CACtF;AACDG,EAAW,cAAc;AAGzB,MAAMC,IAAYN,EAAM,WAA2E,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBAC1H,MAAA,EAAG,KAAAA,GAAU,WAAWC,EAAG,6CAA6CH,CAAS,GAAI,GAAGC,GAAO,CACjG;AACDI,EAAU,cAAc;AAGxB,MAAMC,IAAkBP,EAAM,WAA6E,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBAClI,KAAA,EAAE,KAAAA,GAAU,WAAWC,EAAG,iCAAiCH,CAAS,GAAI,GAAGC,GAAO,CACpF;AACDK,EAAgB,cAAc;AAG9B,MAAMC,IAAcR,EAAM,WAAiE,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBAClH,OAAA,EAAI,KAAAA,GAAU,WAAWC,EAAG,YAAYH,CAAS,GAAI,GAAGC,GAAO,CACjE;AACDM,EAAY,cAAc;AAG1B,MAAMC,IAAaT,EAAM,WAAiE,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBACjH,OAAA,EAAI,KAAAA,GAAU,WAAWC,EAAG,8BAA8BH,CAAS,GAAI,GAAGC,GAAO,CACnF;AACDO,EAAW,cAAc;"}
1
+ {"version":3,"file":"card.es.js","sources":["../src/components/card/Card.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport React from \"react\";\r\nimport { cn } from \"../../lib/utils\";\r\n\r\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (\r\n <div ref={ref} className={cn(\"mtx-rounded-lg mtx-bg-card mtx-text-card-foreground mtx-shadow-card\", className)} {...props} />\r\n));\r\nCard.displayName = \"Card\";\r\ntype CardProps = React.ComponentProps<typeof Card>;\r\n\r\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (\r\n <div ref={ref} className={cn(\"mtx-flex mtx-flex-col mtx-space-y-1.5 mtx-p-4\", className)} {...props} />\r\n));\r\nCardHeader.displayName = \"CardHeader\";\r\ntype CardHeaderProps = React.ComponentProps<typeof CardHeader>;\r\n\r\nconst CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(({ className, ...props }, ref) => (\r\n <h3 ref={ref} className={cn(\"mtx-font-semibold mtx-leading-none mtx-tracking-tight\", className)} {...props} />\r\n));\r\nCardTitle.displayName = \"CardTitle\";\r\ntype CardTitleProps = React.ComponentProps<typeof CardTitle>;\r\n\r\nconst CardDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(({ className, ...props }, ref) => (\r\n <p ref={ref} className={cn(\"mtx-text-sm mtx-text-muted-foreground\", className)} {...props} />\r\n));\r\nCardDescription.displayName = \"CardDescription\";\r\ntype CardDescriptionProps = React.ComponentProps<typeof CardDescription>;\r\n\r\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (\r\n <div ref={ref} className={cn(\"mtx-p-4 mtx-pt-0\", className)} {...props} />\r\n));\r\nCardContent.displayName = \"CardContent\";\r\ntype CardContentProps = React.ComponentProps<typeof CardContent>;\r\n\r\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (\r\n <div ref={ref} className={cn(\"mtx-flex mtx-items-center mtx-p-4 mtx-pt-0\", className)} {...props} />\r\n));\r\nCardFooter.displayName = \"CardFooter\";\r\ntype CardFooterProps = React.ComponentProps<typeof CardFooter>;\r\n\r\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };\r\nexport type { CardProps, CardHeaderProps, CardFooterProps, CardTitleProps, CardDescriptionProps, CardContentProps };\r\n"],"names":["Card","React","className","props","ref","cn","CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],"mappings":";;;AAKA,MAAMA,IAAOC,EAAM,WAAiE,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBAC3G,OAAA,EAAI,KAAAA,GAAU,WAAWC,EAAG,uEAAuEH,CAAS,GAAI,GAAGC,GAAO,CAC5H;AACDH,EAAK,cAAc;AAGnB,MAAMM,IAAaL,EAAM,WAAiE,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBACjH,OAAA,EAAI,KAAAA,GAAU,WAAWC,EAAG,iDAAiDH,CAAS,GAAI,GAAGC,GAAO,CACtG;AACDG,EAAW,cAAc;AAGzB,MAAMC,IAAYN,EAAM,WAA2E,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBAC1H,MAAA,EAAG,KAAAA,GAAU,WAAWC,EAAG,yDAAyDH,CAAS,GAAI,GAAGC,GAAO,CAC7G;AACDI,EAAU,cAAc;AAGxB,MAAMC,IAAkBP,EAAM,WAA6E,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBAClI,KAAA,EAAE,KAAAA,GAAU,WAAWC,EAAG,yCAAyCH,CAAS,GAAI,GAAGC,GAAO,CAC5F;AACDK,EAAgB,cAAc;AAG9B,MAAMC,IAAcR,EAAM,WAAiE,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBAClH,OAAA,EAAI,KAAAA,GAAU,WAAWC,EAAG,oBAAoBH,CAAS,GAAI,GAAGC,GAAO,CACzE;AACDM,EAAY,cAAc;AAG1B,MAAMC,IAAaT,EAAM,WAAiE,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,wBACjH,OAAA,EAAI,KAAAA,GAAU,WAAWC,EAAG,8CAA8CH,CAAS,GAAI,GAAGC,GAAO,CACnG;AACDO,EAAW,cAAc;"}
@@ -1,27 +1,27 @@
1
- import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
- import * as o from "react";
3
- import * as t from "@radix-ui/react-checkbox";
1
+ import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
+ import * as s from "react";
3
+ import * as e from "@radix-ui/react-checkbox";
4
4
  import { cn as a } from "./utils.es.js";
5
- import { Check as m, Minus as n } from "@trsys-tech/matrix-icons";
6
- const c = o.forwardRef(
7
- ({ className: r, ...d }, i) => /* @__PURE__ */ e(
8
- t.Root,
5
+ import { Check as o, Minus as x } from "@trsys-tech/matrix-icons";
6
+ const n = s.forwardRef(
7
+ ({ className: r, ...m }, d) => /* @__PURE__ */ t(
8
+ e.Root,
9
9
  {
10
- ref: i,
10
+ ref: d,
11
11
  className: a(
12
- "peer h-4 w-4 shrink-0 rounded-sm border border-gray-400 hover:border-primary hover:bg-primary-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground disabled:bg-muted disabled:border-muted disabled:data-[state=checked]:border-muted disabled:data-[state=checked]:bg-muted disabled:data-[state=checked]:text-muted-foreground disabled:data-[state=indeterminate]:border-muted disabled:data-[state=indeterminate]:bg-muted disabled:data-[state=indeterminate]:text-muted-foreground",
12
+ "mtx-peer mtx-h-4 mtx-w-4 mtx-shrink-0 mtx-rounded-sm mtx-border mtx-border-gray-400 hover:mtx-border-primary hover:mtx-bg-primary-100 focus-visible:mtx-outline-none focus-visible:mtx-ring-1 focus-visible:mtx-ring-ring disabled:mtx-cursor-not-allowed data-[state=checked]:mtx-bg-primary data-[state=checked]:mtx-text-primary-foreground data-[state=checked]:mtx-border-primary data-[state=indeterminate]:mtx-border-primary data-[state=indeterminate]:mtx-bg-primary data-[state=indeterminate]:mtx-text-primary-foreground disabled:mtx-bg-muted disabled:mtx-border-muted disabled:data-[state=checked]:mtx-border-muted disabled:data-[state=checked]:mtx-bg-muted disabled:data-[state=checked]:mtx-text-muted-foreground disabled:data-[state=indeterminate]:mtx-border-muted disabled:data-[state=indeterminate]:mtx-bg-muted disabled:data-[state=indeterminate]:mtx-text-muted-foreground",
13
13
  r
14
14
  ),
15
- ...d,
16
- children: /* @__PURE__ */ s(t.Indicator, { className: a("flex items-center justify-center text-current group"), children: [
17
- /* @__PURE__ */ e(m, { className: "w-full h-full group-data-[state=indeterminate]:hidden" }),
18
- /* @__PURE__ */ e(n, { className: "w-full h-full group-data-[state=checked]:hidden" })
15
+ ...m,
16
+ children: /* @__PURE__ */ i(e.Indicator, { className: a("mtx-flex mtx-items-center mtx-justify-center mtx-text-current mtx-group"), children: [
17
+ /* @__PURE__ */ t(o, { className: "mtx-w-full mtx-h-full group-data-[state=indeterminate]:mtx-hidden" }),
18
+ /* @__PURE__ */ t(x, { className: "mtx-w-full mtx-h-full group-data-[state=checked]:mtx-hidden" })
19
19
  ] })
20
20
  }
21
21
  )
22
22
  );
23
- c.displayName = t.Root.displayName;
23
+ n.displayName = e.Root.displayName;
24
24
  export {
25
- c as Checkbox
25
+ n as Checkbox
26
26
  };
27
27
  //# sourceMappingURL=checkbox.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.es.js","sources":["../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\r\n\r\nimport { cn } from \"../../lib/utils\";\r\nimport { Check, Minus } from \"@trsys-tech/matrix-icons\";\r\n\r\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>>(\r\n ({ className, ...props }, ref) => {\r\n return (\r\n <CheckboxPrimitive.Root\r\n ref={ref}\r\n className={cn(\r\n \"peer h-4 w-4 shrink-0 rounded-sm border border-gray-400 hover:border-primary hover:bg-primary-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground disabled:bg-muted disabled:border-muted disabled:data-[state=checked]:border-muted disabled:data-[state=checked]:bg-muted disabled:data-[state=checked]:text-muted-foreground disabled:data-[state=indeterminate]:border-muted disabled:data-[state=indeterminate]:bg-muted disabled:data-[state=indeterminate]:text-muted-foreground\",\r\n className,\r\n )}\r\n {...props}\r\n >\r\n <CheckboxPrimitive.Indicator className={cn(\"flex items-center justify-center text-current group\")}>\r\n <Check className=\"w-full h-full group-data-[state=indeterminate]:hidden\" />\r\n <Minus className=\"w-full h-full group-data-[state=checked]:hidden\" />\r\n </CheckboxPrimitive.Indicator>\r\n </CheckboxPrimitive.Root>\r\n );\r\n },\r\n);\r\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\r\ntype CheckboxProps = React.ComponentProps<typeof Checkbox>;\r\n\r\nexport { Checkbox, type CheckboxProps };\r\n"],"names":["Checkbox","React","className","props","ref","jsx","CheckboxPrimitive","cn","Check","Minus"],"mappings":";;;;;AAQA,MAAMA,IAAWC,EAAM;AAAA,EACrB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAEtB,gBAAAC;AAAA,IAACC,EAAkB;AAAA,IAAlB;AAAA,MACC,KAAAF;AAAA,MACA,WAAWG;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,MAEJ,4BAACG,EAAkB,WAAlB,EAA4B,WAAWC,EAAG,qDAAqD,GAC9F,UAAA;AAAA,QAAA,gBAAAF,EAACG,GAAA,EAAM,WAAU,wDAAA,CAAwD;AAAA,QACzE,gBAAAH,EAACI,GAAA,EAAM,WAAU,kDAAA,CAAkD;AAAA,MAAA,EAAA,CACrE;AAAA,IAAA;AAAA,EAAA;AAIR;AACAT,EAAS,cAAcM,EAAkB,KAAK;"}
1
+ {"version":3,"file":"checkbox.es.js","sources":["../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\r\n\r\nimport { cn } from \"../../lib/utils\";\r\nimport { Check, Minus } from \"@trsys-tech/matrix-icons\";\r\n\r\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>>(\r\n ({ className, ...props }, ref) => {\r\n return (\r\n <CheckboxPrimitive.Root\r\n ref={ref}\r\n className={cn(\r\n \"mtx-peer mtx-h-4 mtx-w-4 mtx-shrink-0 mtx-rounded-sm mtx-border mtx-border-gray-400 hover:mtx-border-primary hover:mtx-bg-primary-100 focus-visible:mtx-outline-none focus-visible:mtx-ring-1 focus-visible:mtx-ring-ring disabled:mtx-cursor-not-allowed data-[state=checked]:mtx-bg-primary data-[state=checked]:mtx-text-primary-foreground data-[state=checked]:mtx-border-primary data-[state=indeterminate]:mtx-border-primary data-[state=indeterminate]:mtx-bg-primary data-[state=indeterminate]:mtx-text-primary-foreground disabled:mtx-bg-muted disabled:mtx-border-muted disabled:data-[state=checked]:mtx-border-muted disabled:data-[state=checked]:mtx-bg-muted disabled:data-[state=checked]:mtx-text-muted-foreground disabled:data-[state=indeterminate]:mtx-border-muted disabled:data-[state=indeterminate]:mtx-bg-muted disabled:data-[state=indeterminate]:mtx-text-muted-foreground\",\r\n className,\r\n )}\r\n {...props}\r\n >\r\n <CheckboxPrimitive.Indicator className={cn(\"mtx-flex mtx-items-center mtx-justify-center mtx-text-current mtx-group\")}>\r\n <Check className=\"mtx-w-full mtx-h-full group-data-[state=indeterminate]:mtx-hidden\" />\r\n <Minus className=\"mtx-w-full mtx-h-full group-data-[state=checked]:mtx-hidden\" />\r\n </CheckboxPrimitive.Indicator>\r\n </CheckboxPrimitive.Root>\r\n );\r\n },\r\n);\r\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\r\ntype CheckboxProps = React.ComponentProps<typeof Checkbox>;\r\n\r\nexport { Checkbox, type CheckboxProps };\r\n"],"names":["Checkbox","React","className","props","ref","jsx","CheckboxPrimitive","cn","Check","Minus"],"mappings":";;;;;AAQA,MAAMA,IAAWC,EAAM;AAAA,EACrB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAEtB,gBAAAC;AAAA,IAACC,EAAkB;AAAA,IAAlB;AAAA,MACC,KAAAF;AAAA,MACA,WAAWG;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,MAEJ,4BAACG,EAAkB,WAAlB,EAA4B,WAAWC,EAAG,yEAAyE,GAClH,UAAA;AAAA,QAAA,gBAAAF,EAACG,GAAA,EAAM,WAAU,oEAAA,CAAoE;AAAA,QACrF,gBAAAH,EAACI,GAAA,EAAM,WAAU,8DAAA,CAA8D;AAAA,MAAA,EAAA,CACjF;AAAA,IAAA;AAAA,EAAA;AAIR;AACAT,EAAS,cAAcM,EAAkB,KAAK;"}
package/dist/chip.es.js CHANGED
@@ -1,40 +1,40 @@
1
- import { jsxs as l, jsx as a } from "react/jsx-runtime";
2
- import d from "react";
3
- import { Slot as f } from "@radix-ui/react-slot";
4
- import { tv as g } from "tailwind-variants";
5
- import { cn as e } from "./utils.es.js";
6
- import { XMark as x } from "@trsys-tech/matrix-icons";
7
- const c = g({
8
- base: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-xs font-medium",
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
+ import l from "react";
3
+ import { Slot as d } from "@radix-ui/react-slot";
4
+ import { tv as f } from "tailwind-variants";
5
+ import { cn as x } from "./utils.es.js";
6
+ import { XMark as g } from "@trsys-tech/matrix-icons";
7
+ const c = f({
8
+ base: "mtx-inline-flex mtx-items-center mtx-justify-center mtx-gap-2 mtx-whitespace-nowrap mtx-rounded-full mtx-text-xs mtx-font-medium",
9
9
  variants: {
10
10
  variant: {
11
- primary: "bg-primary-100 text-primary-700 border border-primary",
12
- neutral: "bg-gray-50 text-text-400 border border-gray-400",
13
- "table-primary": "bg-primary-25 text-primary font-bold",
14
- "table-neutral": "bg-gray-50 text-text-400 font-medium"
11
+ primary: "mtx-bg-primary-100 mtx-text-primary-700 mtx-border mtx-border-primary",
12
+ neutral: "mtx-bg-gray-50 mtx-text-text-400 mtx-border mtx-border-gray-400",
13
+ "table-primary": "mtx-bg-primary-25 mtx-text-primary mtx-font-bold",
14
+ "table-neutral": "mtx-bg-gray-50 mtx-text-text-400 mtx-font-medium"
15
15
  },
16
16
  size: {
17
- sm: "px-2 h-6",
18
- md: "px-4 h-8",
19
- lg: "px-6 h-10 text-sm"
17
+ sm: "mtx-px-2 mtx-h-6",
18
+ md: "mtx-px-4 mtx-h-8",
19
+ lg: "mtx-px-6 mtx-h-10 mtx-text-sm"
20
20
  }
21
21
  },
22
22
  defaultVariants: {
23
23
  variant: "primary",
24
24
  size: "md"
25
25
  }
26
- }), b = d.forwardRef(({ className: m, variant: i, asChild: o = !1, children: p, onClose: t, size: r, ...s }, n) => /* @__PURE__ */ l(o ? f : "span", { className: e(c({ variant: i, size: r, className: m })), ref: n, ...s, children: [
27
- p,
28
- t ? /* @__PURE__ */ a(
26
+ }), b = l.forwardRef(({ className: a, variant: e, asChild: i = !1, children: o, onClose: m, size: t, ...p }, s) => /* @__PURE__ */ n(i ? d : "span", { className: x(c({ variant: e, size: t, className: a })), ref: s, ...p, children: [
27
+ o,
28
+ m ? /* @__PURE__ */ r(
29
29
  "button",
30
30
  {
31
- onClick: t,
32
- className: e(
33
- { "-me-3 [&>svg]:w-5 [&>svg]:h-5": r === "lg" },
34
- { "-me-2 [&>svg]:w-4.5 [&>svg]:h-4.5": r === "md" || r === void 0 },
35
- { "-me-1 [&>svg]:w-4 [&>svg]:h-4": r === "sm" }
31
+ onClick: m,
32
+ className: x(
33
+ { "-mtx-me-3 [&>svg]:mtx-w-5 [&>svg]:mtx-h-5": t === "lg" },
34
+ { "-mtx-me-2 [&>svg]:mtx-w-4.5 [&>svg]:mtx-h-4.5": t === "md" || t === void 0 },
35
+ { "-mtx-me-1 [&>svg]:mtx-w-4 [&>svg]:mtx-h-4": t === "sm" }
36
36
  ),
37
- children: /* @__PURE__ */ a(x, {})
37
+ children: /* @__PURE__ */ r(g, {})
38
38
  }
39
39
  ) : null
40
40
  ] }));
@@ -1 +1 @@
1
- {"version":3,"file":"chip.es.js","sources":["../src/components/chip/Chip.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport React from \"react\";\r\nimport { Slot } from \"@radix-ui/react-slot\";\r\nimport { tv, VariantProps } from \"tailwind-variants\";\r\n\r\nimport { cn } from \"../../lib/utils\";\r\nimport { XMark } from \"@trsys-tech/matrix-icons\";\r\n\r\nconst chipVariants = tv({\r\n base: \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-xs font-medium\",\r\n variants: {\r\n variant: {\r\n primary: \"bg-primary-100 text-primary-700 border border-primary\",\r\n neutral: \"bg-gray-50 text-text-400 border border-gray-400\",\r\n \"table-primary\": \"bg-primary-25 text-primary font-bold\",\r\n \"table-neutral\": \"bg-gray-50 text-text-400 font-medium\",\r\n },\r\n size: {\r\n sm: \"px-2 h-6\",\r\n md: \"px-4 h-8\",\r\n lg: \"px-6 h-10 text-sm\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"primary\",\r\n size: \"md\",\r\n },\r\n});\r\n\r\ninterface ChipProps extends React.ButtonHTMLAttributes<HTMLSpanElement>, VariantProps<typeof chipVariants> {\r\n asChild?: boolean;\r\n onClose?: () => void;\r\n}\r\n\r\nconst Chip = React.forwardRef<HTMLSpanElement, ChipProps>(({ className, variant, asChild = false, children, onClose, size, ...props }, ref) => {\r\n const Comp = asChild ? Slot : \"span\";\r\n return (\r\n <Comp className={cn(chipVariants({ variant, size, className }))} ref={ref} {...props}>\r\n {children}\r\n {onClose ? (\r\n <button\r\n onClick={onClose}\r\n className={cn(\r\n { \"-me-3 [&>svg]:w-5 [&>svg]:h-5\": size === \"lg\" },\r\n { \"-me-2 [&>svg]:w-4.5 [&>svg]:h-4.5\": size === \"md\" || size === undefined },\r\n { \"-me-1 [&>svg]:w-4 [&>svg]:h-4\": size === \"sm\" },\r\n )}\r\n >\r\n <XMark />\r\n </button>\r\n ) : null}\r\n </Comp>\r\n );\r\n});\r\nChip.displayName = \"Chip\";\r\n\r\nexport { Chip, type ChipProps };\r\n"],"names":["chipVariants","tv","Chip","React","className","variant","asChild","children","onClose","size","props","ref","jsxs","Slot","cn","jsx","XMark"],"mappings":";;;;;;AASA,MAAMA,IAAeC,EAAG;AAAA,EACtB,MAAM;AAAA,EACN,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,MACT,iBAAiB;AAAA,MACjB,iBAAiB;AAAA,IAAA;AAAA,IAEnB,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,EACN;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAEV,CAAC,GAOKC,IAAOC,EAAM,WAAuC,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,SAAAC,IAAU,IAAO,UAAAC,GAAU,SAAAC,GAAS,MAAAC,GAAM,GAAGC,EAAA,GAASC,MAGnI,gBAAAC,EAFWN,IAAUO,IAAO,QAE3B,EAAK,WAAWC,EAAGd,EAAa,EAAE,SAAAK,GAAS,MAAAI,GAAM,WAAAL,EAAA,CAAW,CAAC,GAAG,KAAAO,GAAW,GAAGD,GAC5E,UAAA;AAAA,EAAAH;AAAA,EACAC,IACC,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAASP;AAAA,MACT,WAAWM;AAAA,QACT,EAAE,iCAAiCL,MAAS,KAAA;AAAA,QAC5C,EAAE,qCAAqCA,MAAS,QAAQA,MAAS,OAAA;AAAA,QACjE,EAAE,iCAAiCA,MAAS,KAAA;AAAA,MAAK;AAAA,MAGnD,4BAACO,GAAA,CAAA,CAAM;AAAA,IAAA;AAAA,EAAA,IAEP;AAAA,GACN,CAEH;AACDd,EAAK,cAAc;"}
1
+ {"version":3,"file":"chip.es.js","sources":["../src/components/chip/Chip.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport React from \"react\";\r\nimport { Slot } from \"@radix-ui/react-slot\";\r\nimport { tv, VariantProps } from \"tailwind-variants\";\r\n\r\nimport { cn } from \"../../lib/utils\";\r\nimport { XMark } from \"@trsys-tech/matrix-icons\";\r\n\r\nconst chipVariants = tv({\r\n base: \"mtx-inline-flex mtx-items-center mtx-justify-center mtx-gap-2 mtx-whitespace-nowrap mtx-rounded-full mtx-text-xs mtx-font-medium\",\r\n variants: {\r\n variant: {\r\n primary: \"mtx-bg-primary-100 mtx-text-primary-700 mtx-border mtx-border-primary\",\r\n neutral: \"mtx-bg-gray-50 mtx-text-text-400 mtx-border mtx-border-gray-400\",\r\n \"table-primary\": \"mtx-bg-primary-25 mtx-text-primary mtx-font-bold\",\r\n \"table-neutral\": \"mtx-bg-gray-50 mtx-text-text-400 mtx-font-medium\",\r\n },\r\n size: {\r\n sm: \"mtx-px-2 mtx-h-6\",\r\n md: \"mtx-px-4 mtx-h-8\",\r\n lg: \"mtx-px-6 mtx-h-10 mtx-text-sm\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"primary\",\r\n size: \"md\",\r\n },\r\n});\r\n\r\ninterface ChipProps extends React.ButtonHTMLAttributes<HTMLSpanElement>, VariantProps<typeof chipVariants> {\r\n asChild?: boolean;\r\n onClose?: () => void;\r\n}\r\n\r\nconst Chip = React.forwardRef<HTMLSpanElement, ChipProps>(({ className, variant, asChild = false, children, onClose, size, ...props }, ref) => {\r\n const Comp = asChild ? Slot : \"span\";\r\n return (\r\n <Comp className={cn(chipVariants({ variant, size, className }))} ref={ref} {...props}>\r\n {children}\r\n {onClose ? (\r\n <button\r\n onClick={onClose}\r\n className={cn(\r\n { \"-mtx-me-3 [&>svg]:mtx-w-5 [&>svg]:mtx-h-5\": size === \"lg\" },\r\n { \"-mtx-me-2 [&>svg]:mtx-w-4.5 [&>svg]:mtx-h-4.5\": size === \"md\" || size === undefined },\r\n { \"-mtx-me-1 [&>svg]:mtx-w-4 [&>svg]:mtx-h-4\": size === \"sm\" },\r\n )}\r\n >\r\n <XMark />\r\n </button>\r\n ) : null}\r\n </Comp>\r\n );\r\n});\r\nChip.displayName = \"Chip\";\r\n\r\nexport { Chip, type ChipProps };\r\n"],"names":["chipVariants","tv","Chip","React","className","variant","asChild","children","onClose","size","props","ref","jsxs","Slot","cn","jsx","XMark"],"mappings":";;;;;;AASA,MAAMA,IAAeC,EAAG;AAAA,EACtB,MAAM;AAAA,EACN,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,MACT,iBAAiB;AAAA,MACjB,iBAAiB;AAAA,IAAA;AAAA,IAEnB,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,EACN;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAEV,CAAC,GAOKC,IAAOC,EAAM,WAAuC,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,SAAAC,IAAU,IAAO,UAAAC,GAAU,SAAAC,GAAS,MAAAC,GAAM,GAAGC,EAAA,GAASC,MAGnI,gBAAAC,EAFWN,IAAUO,IAAO,QAE3B,EAAK,WAAWC,EAAGd,EAAa,EAAE,SAAAK,GAAS,MAAAI,GAAM,WAAAL,EAAA,CAAW,CAAC,GAAG,KAAAO,GAAW,GAAGD,GAC5E,UAAA;AAAA,EAAAH;AAAA,EACAC,IACC,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAASP;AAAA,MACT,WAAWM;AAAA,QACT,EAAE,6CAA6CL,MAAS,KAAA;AAAA,QACxD,EAAE,iDAAiDA,MAAS,QAAQA,MAAS,OAAA;AAAA,QAC7E,EAAE,6CAA6CA,MAAS,KAAA;AAAA,MAAK;AAAA,MAG/D,4BAACO,GAAA,CAAA,CAAM;AAAA,IAAA;AAAA,EAAA,IAEP;AAAA,GACN,CAEH;AACDd,EAAK,cAAc;"}
@@ -1,24 +1,24 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import i from "react";
3
- import * as o from "@radix-ui/react-collapsible";
4
- import { cn as t } from "./utils.es.js";
5
- const d = i.forwardRef(({ className: a, ...e }, l) => /* @__PURE__ */ r(o.Root, { ref: l, className: t("rounded-lg bg-card text-card-foreground shadow-card", a), ...e }));
6
- d.displayName = "Collapsible";
7
- const p = i.forwardRef(({ className: a, children: e, ...l }, s) => /* @__PURE__ */ r(
8
- o.CollapsibleContent,
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import r from "react";
3
+ import * as t from "@radix-ui/react-collapsible";
4
+ import { cn as s } from "./utils.es.js";
5
+ const i = r.forwardRef(({ className: a, ...e }, l) => /* @__PURE__ */ o(t.Root, { ref: l, className: s("mtx-rounded-lg mtx-bg-card mtx-text-card-foreground mtx-shadow-card", a), ...e }));
6
+ i.displayName = "Collapsible";
7
+ const d = r.forwardRef(({ className: a, children: e, ...l }, m) => /* @__PURE__ */ o(
8
+ t.CollapsibleContent,
9
9
  {
10
- ref: s,
11
- className: "overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down rounded-b-lg",
10
+ ref: m,
11
+ className: "mtx-overflow-hidden data-[state=closed]:mtx-animate-collapsible-up data-[state=open]:mtx-animate-collapsible-down mtx-rounded-b-lg",
12
12
  ...l,
13
- children: /* @__PURE__ */ r("div", { className: t("p-4 pt-0", a), children: e })
13
+ children: /* @__PURE__ */ o("div", { className: s("mtx-p-4 mtx-pt-0", a), children: e })
14
14
  }
15
15
  ));
16
- p.displayName = o.Content.displayName;
17
- const m = i.forwardRef(({ className: a, children: e, ...l }, s) => /* @__PURE__ */ r(o.CollapsibleTrigger, { ref: s, className: t("p-4", a), ...l, children: e }));
18
- m.displayName = o.Trigger.displayName;
16
+ d.displayName = t.Content.displayName;
17
+ const p = r.forwardRef(({ className: a, children: e, ...l }, m) => /* @__PURE__ */ o(t.CollapsibleTrigger, { ref: m, className: s("mtx-p-4", a), ...l, children: e }));
18
+ p.displayName = t.Trigger.displayName;
19
19
  export {
20
- d as Collapsible,
21
- p as CollapsibleContent,
22
- m as CollapsibleTrigger
20
+ i as Collapsible,
21
+ d as CollapsibleContent,
22
+ p as CollapsibleTrigger
23
23
  };
24
24
  //# sourceMappingURL=collapsible.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible.es.js","sources":["../src/components/collapsible/Collapsible.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\nimport type { CollapsibleProps, CollapsibleContentProps, CollapsibleTriggerProps } from \"@radix-ui/react-collapsible\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Collapsible = React.forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CollapsiblePrimitive.Root ref={ref} className={cn(\"rounded-lg bg-card text-card-foreground shadow-card\", className)} {...props} />\n));\nCollapsible.displayName = \"Collapsible\";\n\nconst CollapsibleContent = React.forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.CollapsibleContent>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.CollapsibleContent>\n>(({ className, children, ...props }, ref) => (\n <CollapsiblePrimitive.CollapsibleContent\n ref={ref}\n className=\"overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down rounded-b-lg\"\n {...props}\n >\n <div className={cn(\"p-4 pt-0\", className)}>{children}</div>\n </CollapsiblePrimitive.CollapsibleContent>\n));\nCollapsibleContent.displayName = CollapsiblePrimitive.Content.displayName;\n\nconst CollapsibleTrigger = React.forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.CollapsibleTrigger>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.CollapsibleTrigger>\n>(({ className, children, ...props }, ref) => (\n <CollapsiblePrimitive.CollapsibleTrigger ref={ref} className={cn(\"p-4\", className)} {...props}>\n {children}\n </CollapsiblePrimitive.CollapsibleTrigger>\n));\nCollapsibleTrigger.displayName = CollapsiblePrimitive.Trigger.displayName;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent, type CollapsibleProps, type CollapsibleContentProps, type CollapsibleTriggerProps };\n"],"names":["Collapsible","React","className","props","ref","jsx","CollapsiblePrimitive","cn","CollapsibleContent","children","CollapsibleTrigger"],"mappings":";;;;AAQA,MAAMA,IAAcC,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC,EAACC,EAAqB,MAArB,EAA0B,KAAAF,GAAU,WAAWG,EAAG,uDAAuDL,CAAS,GAAI,GAAGC,GAAO,CAClI;AACDH,EAAY,cAAc;AAE1B,MAAMQ,IAAqBP,EAAM,WAG/B,CAAC,EAAE,WAAAC,GAAW,UAAAO,GAAU,GAAGN,KAASC,MACpC,gBAAAC;AAAA,EAACC,EAAqB;AAAA,EAArB;AAAA,IACC,KAAAF;AAAA,IACA,WAAU;AAAA,IACT,GAAGD;AAAA,IAEJ,4BAAC,OAAA,EAAI,WAAWI,EAAG,YAAYL,CAAS,GAAI,UAAAO,EAAA,CAAS;AAAA,EAAA;AACvD,CACD;AACDD,EAAmB,cAAcF,EAAqB,QAAQ;AAE9D,MAAMI,IAAqBT,EAAM,WAG/B,CAAC,EAAE,WAAAC,GAAW,UAAAO,GAAU,GAAGN,KAASC,MACpC,gBAAAC,EAACC,EAAqB,oBAArB,EAAwC,KAAAF,GAAU,WAAWG,EAAG,OAAOL,CAAS,GAAI,GAAGC,GACrF,UAAAM,GACH,CACD;AACDC,EAAmB,cAAcJ,EAAqB,QAAQ;"}
1
+ {"version":3,"file":"collapsible.es.js","sources":["../src/components/collapsible/Collapsible.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\nimport type { CollapsibleProps, CollapsibleContentProps, CollapsibleTriggerProps } from \"@radix-ui/react-collapsible\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Collapsible = React.forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CollapsiblePrimitive.Root ref={ref} className={cn(\"mtx-rounded-lg mtx-bg-card mtx-text-card-foreground mtx-shadow-card\", className)} {...props} />\n));\nCollapsible.displayName = \"Collapsible\";\n\nconst CollapsibleContent = React.forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.CollapsibleContent>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.CollapsibleContent>\n>(({ className, children, ...props }, ref) => (\n <CollapsiblePrimitive.CollapsibleContent\n ref={ref}\n className=\"mtx-overflow-hidden data-[state=closed]:mtx-animate-collapsible-up data-[state=open]:mtx-animate-collapsible-down mtx-rounded-b-lg\"\n {...props}\n >\n <div className={cn(\"mtx-p-4 mtx-pt-0\", className)}>{children}</div>\n </CollapsiblePrimitive.CollapsibleContent>\n));\nCollapsibleContent.displayName = CollapsiblePrimitive.Content.displayName;\n\nconst CollapsibleTrigger = React.forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.CollapsibleTrigger>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.CollapsibleTrigger>\n>(({ className, children, ...props }, ref) => (\n <CollapsiblePrimitive.CollapsibleTrigger ref={ref} className={cn(\"mtx-p-4\", className)} {...props}>\n {children}\n </CollapsiblePrimitive.CollapsibleTrigger>\n));\nCollapsibleTrigger.displayName = CollapsiblePrimitive.Trigger.displayName;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent, type CollapsibleProps, type CollapsibleContentProps, type CollapsibleTriggerProps };\n"],"names":["Collapsible","React","className","props","ref","jsx","CollapsiblePrimitive","cn","CollapsibleContent","children","CollapsibleTrigger"],"mappings":";;;;AAQA,MAAMA,IAAcC,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC,EAACC,EAAqB,MAArB,EAA0B,KAAAF,GAAU,WAAWG,EAAG,uEAAuEL,CAAS,GAAI,GAAGC,GAAO,CAClJ;AACDH,EAAY,cAAc;AAE1B,MAAMQ,IAAqBP,EAAM,WAG/B,CAAC,EAAE,WAAAC,GAAW,UAAAO,GAAU,GAAGN,KAASC,MACpC,gBAAAC;AAAA,EAACC,EAAqB;AAAA,EAArB;AAAA,IACC,KAAAF;AAAA,IACA,WAAU;AAAA,IACT,GAAGD;AAAA,IAEJ,4BAAC,OAAA,EAAI,WAAWI,EAAG,oBAAoBL,CAAS,GAAI,UAAAO,EAAA,CAAS;AAAA,EAAA;AAC/D,CACD;AACDD,EAAmB,cAAcF,EAAqB,QAAQ;AAE9D,MAAMI,IAAqBT,EAAM,WAG/B,CAAC,EAAE,WAAAC,GAAW,UAAAO,GAAU,GAAGN,KAASC,MACpC,gBAAAC,EAACC,EAAqB,oBAArB,EAAwC,KAAAF,GAAU,WAAWG,EAAG,WAAWL,CAAS,GAAI,GAAGC,GACzF,UAAAM,GACH,CACD;AACDC,EAAmB,cAAcJ,EAAqB,QAAQ;"}