@gears-frontx/ui-kit 0.4.0-alpha.4 → 0.4.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/README.md +1 -1
  2. package/dist/accordion.js +7 -7
  3. package/dist/alert-dialog.js +21 -21
  4. package/dist/alert.js +19 -19
  5. package/dist/attachment.js +11 -11
  6. package/dist/avatar.js +33 -33
  7. package/dist/badge.js +48 -25
  8. package/dist/badge.js.map +1 -1
  9. package/dist/bubble.js +38 -38
  10. package/dist/button-group.js +8 -8
  11. package/dist/button.js +40 -34
  12. package/dist/button.js.map +1 -1
  13. package/dist/calendar.js +30 -30
  14. package/dist/card.js +56 -33
  15. package/dist/card.js.map +1 -1
  16. package/dist/chart.js +183 -115
  17. package/dist/chart.js.map +1 -1
  18. package/dist/checkbox.js +12 -12
  19. package/dist/checkbox.js.map +1 -1
  20. package/dist/chunks/accordion.CXlSdkrc.css +1 -0
  21. package/dist/chunks/alert-dialog.C4aLtUC8.css +1 -0
  22. package/dist/chunks/alert.DsgRIXLn.css +1 -0
  23. package/dist/chunks/attachment.CZuZdlXC.css +1 -0
  24. package/dist/chunks/avatar.BMm-Z9l5.css +1 -0
  25. package/dist/chunks/badge.BCreEn3O.css +1 -0
  26. package/dist/chunks/bubble.Ccu0e3lY.css +1 -0
  27. package/dist/chunks/button-group.BB-_2uav.css +1 -0
  28. package/dist/chunks/button.DgUTlW0_.css +1 -0
  29. package/dist/chunks/calendar.Dtndav4F.css +1 -0
  30. package/dist/chunks/card.DdBl-usf.css +1 -0
  31. package/dist/chunks/checkbox.CrdIZhi1.css +1 -0
  32. package/dist/chunks/collapsible.BkLeBug_.css +1 -0
  33. package/dist/chunks/combobox.DZZ3tHP_.css +1 -0
  34. package/dist/chunks/command.BBW1Cy-M.css +1 -0
  35. package/dist/chunks/context-menu.D_HuTgqL.css +1 -0
  36. package/dist/chunks/data-table.DJJaM7bh.css +1 -0
  37. package/dist/chunks/dialog.Cpo8vChK.css +1 -0
  38. package/dist/chunks/drawer.D8l6-G8t.css +1 -0
  39. package/dist/chunks/dropdown-menu.TU3FHXbJ.css +1 -0
  40. package/dist/chunks/empty.DnAKlw2g.css +1 -0
  41. package/dist/chunks/field.CDoJmJUe.css +1 -0
  42. package/dist/chunks/hover-card.D00tbys5.css +1 -0
  43. package/dist/chunks/input-group.C7XgalVn.css +1 -0
  44. package/dist/chunks/input-otp.Dvxlngb4.css +1 -0
  45. package/dist/chunks/input.DORly3Cx.css +1 -0
  46. package/dist/chunks/{label.jrB9zD_G.css → label.s0Wrm1i-.css} +1 -1
  47. package/dist/chunks/{menubar.CxRNI9o4.css → menubar.CJcVQhPq.css} +1 -1
  48. package/dist/chunks/message.B9Rexp_f.css +1 -0
  49. package/dist/chunks/native-select.BosBdRAx.css +1 -0
  50. package/dist/chunks/navigation-menu.CuXMCPRN.css +1 -0
  51. package/dist/chunks/pagination.bFb5us_w.css +1 -0
  52. package/dist/chunks/popover.BYhwNKnZ.css +1 -0
  53. package/dist/chunks/progress.DjSEXfxh.css +1 -0
  54. package/dist/chunks/questionnaire.C-YTRjPE.css +1 -0
  55. package/dist/chunks/radio-group.CisvBT6g.css +1 -0
  56. package/dist/chunks/scroll-area.B0OVmDRX.css +1 -0
  57. package/dist/chunks/select.BFwI5rhI.css +1 -0
  58. package/dist/chunks/sheet.BWvXXyXk.css +1 -0
  59. package/dist/chunks/sidebar.DdEvMURX.css +1 -0
  60. package/dist/chunks/slider.inyNxx4y.css +1 -0
  61. package/dist/chunks/spinner.sH6x_1Uf.css +1 -0
  62. package/dist/chunks/status-dot.DWa2qGKe.css +1 -0
  63. package/dist/chunks/switch.D3_ZyuVP.css +1 -0
  64. package/dist/chunks/table.DR2nFT0x.css +1 -0
  65. package/dist/chunks/tabs.DFa0OYMo.css +1 -0
  66. package/dist/chunks/{textarea.ORRSI69B.css → textarea.DMphp0qh.css} +1 -1
  67. package/dist/chunks/toast.Dw-jW4YY.css +1 -0
  68. package/dist/chunks/toggle-group.BpWF6enM.css +1 -0
  69. package/dist/chunks/toggle.B82Id2zR.css +1 -0
  70. package/dist/chunks/tooltip.CFJyyz-O.css +1 -0
  71. package/dist/collapsible.js +7 -7
  72. package/dist/combobox.js +87 -87
  73. package/dist/command.js +28 -28
  74. package/dist/components/badge/badge.d.ts +5 -2
  75. package/dist/components/badge/badge.d.ts.map +1 -1
  76. package/dist/components/button/button.d.ts +1 -1
  77. package/dist/components/button/button.d.ts.map +1 -1
  78. package/dist/components/card/card.d.ts +10 -4
  79. package/dist/components/card/card.d.ts.map +1 -1
  80. package/dist/components/chart/chart.d.ts +7 -6
  81. package/dist/components/chart/chart.d.ts.map +1 -1
  82. package/dist/components/checkbox/checkbox.d.ts.map +1 -1
  83. package/dist/components/dropdown-menu/dropdown-menu.d.ts +9 -1
  84. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  85. package/dist/components/empty/empty.d.ts +11 -0
  86. package/dist/components/empty/empty.d.ts.map +1 -1
  87. package/dist/components/empty/public.d.ts +1 -1
  88. package/dist/components/empty/public.d.ts.map +1 -1
  89. package/dist/components/input-group/input-group.d.ts +5 -2
  90. package/dist/components/input-group/input-group.d.ts.map +1 -1
  91. package/dist/components/navigation-menu/navigation-menu.d.ts +7 -2
  92. package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -1
  93. package/dist/components/pagination/pagination.d.ts +4 -6
  94. package/dist/components/pagination/pagination.d.ts.map +1 -1
  95. package/dist/components/popover/popover.d.ts +2 -2
  96. package/dist/components/popover/popover.d.ts.map +1 -1
  97. package/dist/components/select/select.d.ts +2 -2
  98. package/dist/components/select/select.d.ts.map +1 -1
  99. package/dist/components/spinner/spinner.d.ts +19 -3
  100. package/dist/components/spinner/spinner.d.ts.map +1 -1
  101. package/dist/components/status-dot/public.d.ts +2 -0
  102. package/dist/components/status-dot/public.d.ts.map +1 -0
  103. package/dist/components/status-dot/status-dot.d.ts +25 -0
  104. package/dist/components/status-dot/status-dot.d.ts.map +1 -0
  105. package/dist/components/table/table.d.ts +31 -5
  106. package/dist/components/table/table.d.ts.map +1 -1
  107. package/dist/components/tabs/tabs.d.ts +10 -2
  108. package/dist/components/tabs/tabs.d.ts.map +1 -1
  109. package/dist/components/toggle/toggle.d.ts +12 -2
  110. package/dist/components/toggle/toggle.d.ts.map +1 -1
  111. package/dist/components/toggle-group/toggle-group.d.ts +33 -4
  112. package/dist/components/toggle-group/toggle-group.d.ts.map +1 -1
  113. package/dist/components/tooltip/tooltip.d.ts +5 -8
  114. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  115. package/dist/context-menu.js +54 -54
  116. package/dist/data-table.js +41 -41
  117. package/dist/dialog.js +39 -39
  118. package/dist/docs/alert-dialog.md +1 -1
  119. package/dist/docs/avatar.md +3 -1
  120. package/dist/docs/badge.md +42 -14
  121. package/dist/docs/button.md +3 -2
  122. package/dist/docs/card.md +6 -0
  123. package/dist/docs/chart.md +20 -14
  124. package/dist/docs/checkbox.md +6 -0
  125. package/dist/docs/command.md +4 -0
  126. package/dist/docs/data-table.md +12 -7
  127. package/dist/docs/dialog.md +3 -2
  128. package/dist/docs/dropdown-menu.md +6 -0
  129. package/dist/docs/empty.md +44 -9
  130. package/dist/docs/input-group.md +23 -3
  131. package/dist/docs/navigation-menu.md +14 -5
  132. package/dist/docs/pagination.md +18 -15
  133. package/dist/docs/popover.md +6 -0
  134. package/dist/docs/progress.md +6 -0
  135. package/dist/docs/questionnaire.md +4 -2
  136. package/dist/docs/select.md +8 -4
  137. package/dist/docs/sheet.md +8 -7
  138. package/dist/docs/spinner.md +35 -5
  139. package/dist/docs/status-dot.md +77 -0
  140. package/dist/docs/table.md +69 -25
  141. package/dist/docs/tabs.md +22 -7
  142. package/dist/docs/toggle-group.md +68 -9
  143. package/dist/docs/toggle.md +7 -1
  144. package/dist/docs/tooltip.md +5 -9
  145. package/dist/drawer.js +53 -53
  146. package/dist/dropdown-menu.js +102 -89
  147. package/dist/dropdown-menu.js.map +1 -1
  148. package/dist/empty.js +31 -21
  149. package/dist/empty.js.map +1 -1
  150. package/dist/field.js +24 -24
  151. package/dist/hover-card.js +14 -14
  152. package/dist/index.d.ts +1 -0
  153. package/dist/index.d.ts.map +1 -1
  154. package/dist/index.js +266 -261
  155. package/dist/index.js.map +1 -1
  156. package/dist/input-group.js +73 -50
  157. package/dist/input-group.js.map +1 -1
  158. package/dist/input-otp.js +3 -3
  159. package/dist/input.js +19 -19
  160. package/dist/label.js +1 -1
  161. package/dist/menubar.js +18 -18
  162. package/dist/message.js +11 -11
  163. package/dist/native-select.js +20 -20
  164. package/dist/navigation-menu.js +83 -64
  165. package/dist/navigation-menu.js.map +1 -1
  166. package/dist/pagination.js +39 -52
  167. package/dist/pagination.js.map +1 -1
  168. package/dist/popover.js +33 -31
  169. package/dist/popover.js.map +1 -1
  170. package/dist/progress.js +15 -15
  171. package/dist/questionnaire.js +72 -72
  172. package/dist/radio-group.js +7 -7
  173. package/dist/scroll-area.js +8 -8
  174. package/dist/select.js +82 -80
  175. package/dist/select.js.map +1 -1
  176. package/dist/sheet.js +46 -46
  177. package/dist/sidebar.js +130 -130
  178. package/dist/slider.js +14 -14
  179. package/dist/spinner.js +45 -13
  180. package/dist/spinner.js.map +1 -1
  181. package/dist/status-dot.d.ts +1 -0
  182. package/dist/status-dot.js +76 -0
  183. package/dist/status-dot.js.map +1 -0
  184. package/dist/switch.js +14 -14
  185. package/dist/table.js +221 -43
  186. package/dist/table.js.map +1 -1
  187. package/dist/tabs.js +44 -26
  188. package/dist/tabs.js.map +1 -1
  189. package/dist/textarea.js +5 -5
  190. package/dist/theme.css +222 -135
  191. package/dist/toast.js +26 -26
  192. package/dist/toggle-group.js +40 -25
  193. package/dist/toggle-group.js.map +1 -1
  194. package/dist/toggle.js +21 -11
  195. package/dist/toggle.js.map +1 -1
  196. package/dist/tooltip.js +37 -34
  197. package/dist/tooltip.js.map +1 -1
  198. package/llms.txt +26 -10
  199. package/package.json +1 -1
  200. package/dist/chunks/accordion.X_AK08Iv.css +0 -1
  201. package/dist/chunks/alert-dialog.B50f-Gsz.css +0 -1
  202. package/dist/chunks/alert.C5BedF7l.css +0 -1
  203. package/dist/chunks/attachment.GAZbWSyB.css +0 -1
  204. package/dist/chunks/avatar.DZUXl1ev.css +0 -1
  205. package/dist/chunks/badge.Bi22h20j.css +0 -1
  206. package/dist/chunks/bubble.DvN6QyQ1.css +0 -1
  207. package/dist/chunks/button-group.D0Ir-jbL.css +0 -1
  208. package/dist/chunks/button.DvAxXxKj.css +0 -1
  209. package/dist/chunks/calendar.Cnbv4EzY.css +0 -1
  210. package/dist/chunks/card.D3Ct_dza.css +0 -1
  211. package/dist/chunks/checkbox.CZfE_PkU.css +0 -1
  212. package/dist/chunks/collapsible.BQ-sU5sQ.css +0 -1
  213. package/dist/chunks/combobox.CtYpZAKB.css +0 -1
  214. package/dist/chunks/command.Km60IuqD.css +0 -1
  215. package/dist/chunks/context-menu.DwGCD0vN.css +0 -1
  216. package/dist/chunks/data-table.CtZdVSAU.css +0 -1
  217. package/dist/chunks/dialog.BxcZ12Gb.css +0 -1
  218. package/dist/chunks/drawer.BkS_qEHj.css +0 -1
  219. package/dist/chunks/dropdown-menu.C5TLD9JO.css +0 -1
  220. package/dist/chunks/empty.BlhsHrOz.css +0 -1
  221. package/dist/chunks/field.Ccqt897k.css +0 -1
  222. package/dist/chunks/hover-card.DmwvigMp.css +0 -1
  223. package/dist/chunks/input-group.CFIUP-Oh.css +0 -1
  224. package/dist/chunks/input-otp.XSpqyVij.css +0 -1
  225. package/dist/chunks/input.DvA_mTq8.css +0 -1
  226. package/dist/chunks/message.BhD5JDJK.css +0 -1
  227. package/dist/chunks/native-select.DF1QrNz4.css +0 -1
  228. package/dist/chunks/navigation-menu.C2JGHAKD.css +0 -1
  229. package/dist/chunks/pagination.DUiQuWla.css +0 -1
  230. package/dist/chunks/popover.fOvPrnsr.css +0 -1
  231. package/dist/chunks/progress.Bp13t8iw.css +0 -1
  232. package/dist/chunks/questionnaire.D-u_K3Co.css +0 -1
  233. package/dist/chunks/radio-group.CV3MBCsI.css +0 -1
  234. package/dist/chunks/scroll-area.C4kWMAsU.css +0 -1
  235. package/dist/chunks/select.iEwV-sfJ.css +0 -1
  236. package/dist/chunks/sheet.DALPg9vf.css +0 -1
  237. package/dist/chunks/sidebar.CGTQhfWG.css +0 -1
  238. package/dist/chunks/slider.B5nouD7J.css +0 -1
  239. package/dist/chunks/spinner.UKK4f1tu.css +0 -1
  240. package/dist/chunks/switch.CIW9Jr1x.css +0 -1
  241. package/dist/chunks/table.BpnQ6j85.css +0 -1
  242. package/dist/chunks/tabs.4MEFBvw-.css +0 -1
  243. package/dist/chunks/toast.uUtCEAiv.css +0 -1
  244. package/dist/chunks/toggle-group.Bd0cCCnV.css +0 -1
  245. package/dist/chunks/toggle.B9tvfl1n.css +0 -1
  246. package/dist/chunks/tooltip.apA3VWHJ.css +0 -1
@@ -4,13 +4,13 @@ import { mergeProps as e } from "@base-ui/react/merge-props";
4
4
  import { useRender as s } from "@base-ui/react/use-render";
5
5
  import { cx as i, cva as p } from "class-variance-authority";
6
6
  import { Separator as u } from "./separator.js";
7
- import './chunks/button-group.D0Ir-jbL.css';const c = "_group_1jwm6_13", l = "_orientationHorizontal_1jwm6_13", m = "_orientationVertical_1jwm6_64", _ = "_text_1jwm6_132", f = "_separator_1jwm6_152", a = {
7
+ import './chunks/button-group.BB-_2uav.css';const c = "_group_bvzhd_13", l = "_orientationHorizontal_bvzhd_13", m = "_orientationVertical_bvzhd_64", _ = "_text_bvzhd_136", z = "_separator_bvzhd_162", a = {
8
8
  group: c,
9
9
  orientationHorizontal: l,
10
10
  orientationVertical: m,
11
11
  text: _,
12
- separator: f
13
- }, x = p(a.group, {
12
+ separator: z
13
+ }, d = p(a.group, {
14
14
  variants: {
15
15
  orientation: {
16
16
  horizontal: a.orientationHorizontal,
@@ -21,18 +21,18 @@ import './chunks/button-group.D0Ir-jbL.css';const c = "_group_1jwm6_13", l = "_o
21
21
  orientation: "horizontal"
22
22
  }
23
23
  });
24
- function V({ className: o, orientation: t, ...r }) {
24
+ function b({ className: o, orientation: t, ...r }) {
25
25
  return /* @__PURE__ */ n(
26
26
  "div",
27
27
  {
28
28
  role: "group",
29
29
  "data-orientation": t ?? "horizontal",
30
- className: x({ orientation: t, className: o }),
30
+ className: d({ orientation: t, className: o }),
31
31
  ...r
32
32
  }
33
33
  );
34
34
  }
35
- function w({ className: o, render: t, ...r }) {
35
+ function V({ className: o, render: t, ...r }) {
36
36
  return s({
37
37
  defaultTagName: "div",
38
38
  render: t,
@@ -54,8 +54,8 @@ function G({
54
54
  );
55
55
  }
56
56
  export {
57
- V as ButtonGroup,
57
+ b as ButtonGroup,
58
58
  G as ButtonGroupSeparator,
59
- w as ButtonGroupText
59
+ V as ButtonGroupText
60
60
  };
61
61
  //# sourceMappingURL=button-group.js.map
package/dist/button.js CHANGED
@@ -1,22 +1,25 @@
1
- import { jsxs as k, jsx as i } from "react/jsx-runtime";
2
- import { Button as j } from "@base-ui/react/button";
3
- import { cva as b } from "class-variance-authority";
4
- import { Children as u } from "react";
5
- import './chunks/button.DvAxXxKj.css';const z = "_button_1jku4_6", D = "_variantDefault_1jku4_132", h = "_variantDestructive_1jku4_148", p = "_variantOutline_1jku4_177", y = "_variantSecondary_1jku4_197", L = "_variantGhost_1jku4_214", S = "_variantLink_1jku4_235", O = "_sizeDefault_1jku4_276", G = "_sizeSm_1jku4_289", N = "_sizeLg_1jku4_298", g = "_icon_1jku4_316", x = "_label_1jku4_338", B = "_spinner_1jku4_42", t = {
6
- button: z,
7
- variantDefault: D,
8
- variantDestructive: h,
9
- variantOutline: p,
10
- variantSecondary: y,
11
- variantGhost: L,
1
+ import { jsxs as y, jsx as i } from "react/jsx-runtime";
2
+ import { Button as b } from "@base-ui/react/button";
3
+ import { cva as z } from "class-variance-authority";
4
+ import { Children as l } from "react";
5
+ import './chunks/button.DgUTlW0_.css';const D = "_button_tl0n1_6", h = "_variantDefault_tl0n1_132", p = "_variantDestructive_tl0n1_164", L = "_variantOutline_tl0n1_196", g = "_variantSecondary_tl0n1_216", N = "_variantGhost_tl0n1_233", S = "_variantLink_tl0n1_254", A = "_variantNavigation_tl0n1_273", k = "_variantAvatar_tl0n1_312", O = "_variantUtility_tl0n1_343", G = "_icon_tl0n1_357", U = "_sizeDefault_tl0n1_392", x = "_sizeSm_tl0n1_308", B = "_sizeLg_tl0n1_411", j = "_label_tl0n1_451", V = "_spinner_tl0n1_42", t = {
6
+ button: D,
7
+ variantDefault: h,
8
+ variantDestructive: p,
9
+ variantOutline: L,
10
+ variantSecondary: g,
11
+ variantGhost: N,
12
12
  variantLink: S,
13
- sizeDefault: O,
14
- sizeSm: G,
15
- sizeLg: N,
16
- icon: g,
17
- label: x,
18
- spinner: B
19
- }, A = b(t.button, {
13
+ variantNavigation: A,
14
+ variantAvatar: k,
15
+ variantUtility: O,
16
+ icon: G,
17
+ sizeDefault: U,
18
+ sizeSm: x,
19
+ sizeLg: B,
20
+ label: j,
21
+ spinner: V
22
+ }, C = z(t.button, {
20
23
  variants: {
21
24
  variant: {
22
25
  default: t.variantDefault,
@@ -24,7 +27,10 @@ import './chunks/button.DvAxXxKj.css';const z = "_button_1jku4_6", D = "_variant
24
27
  outline: t.variantOutline,
25
28
  secondary: t.variantSecondary,
26
29
  ghost: t.variantGhost,
27
- link: t.variantLink
30
+ link: t.variantLink,
31
+ navigation: t.variantNavigation,
32
+ avatar: t.variantAvatar,
33
+ utility: t.variantUtility
28
34
  },
29
35
  size: {
30
36
  default: t.sizeDefault,
@@ -37,38 +43,38 @@ import './chunks/button.DvAxXxKj.css';const z = "_button_1jku4_6", D = "_variant
37
43
  size: "default"
38
44
  }
39
45
  });
40
- function $({
41
- className: c,
46
+ function w({
47
+ className: v,
42
48
  variant: _,
43
- size: l,
44
- icon: s,
49
+ size: c,
50
+ icon: r,
45
51
  loading: a,
46
- disabled: v,
52
+ disabled: u,
47
53
  focusableWhenDisabled: d,
48
- children: e,
54
+ children: s,
49
55
  ...f
50
56
  }) {
51
- const r = u.toArray(e).some((n) => n !== ""), o = u.toArray(s).some((n) => n !== ""), m = o && !r;
52
- return /* @__PURE__ */ k(
53
- j,
57
+ const e = l.toArray(s).some((n) => n !== ""), o = l.toArray(r).some((n) => n !== ""), m = o && !e;
58
+ return /* @__PURE__ */ y(
59
+ b,
54
60
  {
55
- className: A({ variant: _, size: l, className: c }),
61
+ className: C({ variant: _, size: c, className: v }),
56
62
  ...f,
57
63
  focusableWhenDisabled: a || d,
58
- disabled: v || a,
64
+ disabled: u || a,
59
65
  "data-icon-only": m || void 0,
60
66
  "data-loading": a || void 0,
61
67
  "aria-busy": a || void 0,
62
68
  children: [
63
69
  a && /* @__PURE__ */ i("span", { className: t.spinner, "aria-hidden": "true" }),
64
- o && /* @__PURE__ */ i("span", { className: t.icon, "aria-hidden": "true", children: s }),
65
- r && /* @__PURE__ */ i("span", { className: t.label, children: e })
70
+ o && /* @__PURE__ */ i("span", { className: t.icon, "aria-hidden": "true", children: r }),
71
+ e && /* @__PURE__ */ i("span", { className: t.label, children: s })
66
72
  ]
67
73
  }
68
74
  );
69
75
  }
70
76
  export {
71
- $ as Button,
72
- A as buttonVariants
77
+ w as Button,
78
+ C as buttonVariants
73
79
  };
74
80
  //# sourceMappingURL=button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sources":["../src/components/button/button.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from '@base-ui/react/button';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Children, type ReactNode } from 'react';\n\nimport styles from './button.module.css';\n\n// Exported (upstream parity — shadcn/ui exports buttonVariants) so a\n// component that renders link/anchor markup styled like a button, but isn't\n// itself a Button (e.g. pagination's page links), can reuse the same class\n// map instead of hand-duplicating variant→class wiring.\nexport const buttonVariants = cva(styles.button, {\n variants: {\n variant: {\n default: styles.variantDefault,\n destructive: styles.variantDestructive,\n outline: styles.variantOutline,\n secondary: styles.variantSecondary,\n ghost: styles.variantGhost,\n link: styles.variantLink,\n },\n size: {\n default: styles.sizeDefault,\n sm: styles.sizeSm,\n lg: styles.sizeLg,\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n});\n\nexport interface ButtonProps\n extends Omit<ButtonPrimitive.Props, 'className'>, VariantProps<typeof buttonVariants> {\n className?: string;\n /**\n * Leading icon slot — the one right way to put an icon in a Button (never\n * via children; the slot is what gets sized, spaced, hidden during\n * `loading`, and marked decorative). With no children the button turns\n * square icon-only — pass `aria-label` then, the icon carries no\n * accessible name. Same prop shape as react-kit's AcvButton; a trailing\n * slot, if ever needed, takes AcvButton's `end` name.\n */\n icon?: ReactNode;\n /**\n * Shows a centered spinner and reports `aria-busy`. Content is hidden\n * with opacity, not visibility: it keeps painting the button's size (no\n * width jump) and, unlike visibility, stays in the accessibility tree —\n * the button keeps its name while `aria-busy` reports the state, with no\n * hardcoded \"Loading\" label the kit would otherwise have to translate.\n * Clicks are suppressed the same way `disabled` suppresses them, but the\n * button does NOT become natively `disabled` — it forces\n * `focusableWhenDisabled` (see below) instead, so it stays in the tab\n * order and reports `aria-disabled` rather than blurring itself the\n * instant a native `disabled` attribute would land. Consumer code\n * checking the native `disabled` property or a `:disabled` CSS selector\n * will NOT see a `loading` button the way it sees a plain `disabled`\n * one — check `aria-disabled`/`aria-busy` instead.\n */\n loading?: boolean;\n /**\n * Keep the button in the tab order (and reporting `aria-disabled`\n * instead of the native `disabled` attribute) while disabled — inherited\n * from Base UI's Button, re-declared here because `loading` above forces\n * this to `true` regardless of what's passed: a native `disabled`\n * attribute blurs the button the instant it lands, which `loading` can't\n * afford (it needs `aria-busy` to still be announced to something). An\n * explicit `focusableWhenDisabled={false}` is silently overridden while\n * `loading` is `true`.\n * @default false\n */\n focusableWhenDisabled?: boolean;\n}\n\nexport function Button({\n className,\n variant,\n size,\n icon,\n loading,\n disabled,\n focusableWhenDisabled,\n children,\n ...props\n}: ButtonProps) {\n // One predicate for \"does this button have a visible label\", driving\n // BOTH the icon-only derivation below and the label-render guard at the\n // bottom: `children == null` only catches a missing prop, not a falsy\n // one — `<Button icon={x}>{cond && 'Save'}</Button>` with cond=false\n // passes `false` as children, which is neither null nor renderable, so\n // checking each spot with its own logic could (and did) disagree about\n // whether the button has a label.\n //\n // Children.toArray drops `false`/`null`/`undefined`/`[]` but KEEPS the\n // empty string (`toArray('')` has length 1), so the array being non-empty\n // is not on its own the same question as \"renders something visible\" —\n // hence the explicit `!== ''` filter. `<Button icon={x}>{label}</Button>`\n // with an empty `label` is the case it covers: without the filter that\n // button stays a wide pill wrapping an empty label span instead of going\n // icon-only. `0` is deliberately NOT filtered — React renders it.\n const hasLabel = Children.toArray(children).some((child) => child !== '');\n // Same predicate, applied to the icon slot: `icon != null` is true for\n // `icon={false}` — a valid ReactNode that renders nothing — which is\n // exactly what `icon={cond && <Icon/>}` passes when `cond` is false.\n // Without this, a false condition still forced the button icon-only and\n // rendered an empty square.\n const hasIcon = Children.toArray(icon).some((child) => child !== '');\n const iconOnly = hasIcon && !hasLabel;\n return (\n <ButtonPrimitive\n className={buttonVariants({ variant, size, className })}\n {...props}\n /*\n * Derived attributes are spread AFTER `...props` so a caller's own\n * conflicting `aria-busy`/`data-loading`/`data-icon-only` can never\n * shadow the state this component just computed — the button IS\n * loading/icon-only/not, regardless of what a stray prop says.\n *\n * `focusableWhenDisabled` while `loading`: a native `disabled`\n * attribute blurs the element the instant it lands, which would\n * silently steal focus off a button the user just clicked and make\n * `aria-busy` announce to no one. Base UI's `focusableWhenDisabled`\n * keeps it in the tab order and reports the state via\n * `aria-disabled` instead (see useFocusableWhenDisabled) — clicks\n * still get suppressed via `disabled` below either way. A plain\n * `disabled` with no `loading` keeps its ordinary native behavior\n * unless the caller opts into `focusableWhenDisabled` itself.\n */\n focusableWhenDisabled={loading || focusableWhenDisabled}\n disabled={disabled || loading}\n data-icon-only={iconOnly || undefined}\n data-loading={loading || undefined}\n aria-busy={loading || undefined}\n >\n {loading && <span className={styles.spinner} aria-hidden=\"true\" />}\n {hasIcon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {icon}\n </span>\n )}\n {hasLabel && <span className={styles.label}>{children}</span>}\n </ButtonPrimitive>\n );\n}\n"],"names":["buttonVariants","cva","styles","Button","className","variant","size","icon","loading","disabled","focusableWhenDisabled","children","props","hasLabel","Children","child","hasIcon","iconOnly","jsxs","ButtonPrimitive","jsx"],"mappings":";;;;;;;;;;;;;;;;;;GAUaA,IAAiBC,EAAIC,EAAO,QAAQ;AAAA,EAC/C,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAASA,EAAO;AAAA,MAChB,aAAaA,EAAO;AAAA,MACpB,SAASA,EAAO;AAAA,MAChB,WAAWA,EAAO;AAAA,MAClB,OAAOA,EAAO;AAAA,MACd,MAAMA,EAAO;AAAA,IAAA;AAAA,IAEf,MAAM;AAAA,MACJ,SAASA,EAAO;AAAA,MAChB,IAAIA,EAAO;AAAA,MACX,IAAIA,EAAO;AAAA,IAAA;AAAA,EACb;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAEV,CAAC;AA4CM,SAASC,EAAO;AAAA,EACrB,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAAgB;AAgBd,QAAMC,IAAWC,EAAS,QAAQH,CAAQ,EAAE,KAAK,CAACI,MAAUA,MAAU,EAAE,GAMlEC,IAAUF,EAAS,QAAQP,CAAI,EAAE,KAAK,CAACQ,MAAUA,MAAU,EAAE,GAC7DE,IAAWD,KAAW,CAACH;AAC7B,SACE,gBAAAK;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,WAAWnB,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,GAAW;AAAA,MACrD,GAAGQ;AAAA,MAiBJ,uBAAuBJ,KAAWE;AAAA,MAClC,UAAUD,KAAYD;AAAA,MACtB,kBAAgBS,KAAY;AAAA,MAC5B,gBAAcT,KAAW;AAAA,MACzB,aAAWA,KAAW;AAAA,MAErB,UAAA;AAAA,QAAAA,uBAAY,QAAA,EAAK,WAAWN,EAAO,SAAS,eAAY,QAAO;AAAA,QAC/Dc,uBACE,QAAA,EAAK,WAAWd,EAAO,MAAM,eAAY,QACvC,UAAAK,EAAA,CACH;AAAA,QAEDM,KAAY,gBAAAO,EAAC,QAAA,EAAK,WAAWlB,EAAO,OAAQ,UAAAS,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG5D;"}
1
+ {"version":3,"file":"button.js","sources":["../src/components/button/button.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from '@base-ui/react/button';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Children, type ReactNode } from 'react';\n\nimport styles from './button.module.css';\n\n// Exported (upstream parity — shadcn/ui exports buttonVariants) so a\n// component that renders link/anchor markup styled like a button, but isn't\n// itself a Button (e.g. pagination's page links), can reuse the same class\n// map instead of hand-duplicating variant→class wiring.\nexport const buttonVariants = cva(styles.button, {\n variants: {\n variant: {\n default: styles.variantDefault,\n destructive: styles.variantDestructive,\n outline: styles.variantOutline,\n secondary: styles.variantSecondary,\n ghost: styles.variantGhost,\n link: styles.variantLink,\n navigation: styles.variantNavigation,\n avatar: styles.variantAvatar,\n utility: styles.variantUtility,\n },\n size: {\n default: styles.sizeDefault,\n sm: styles.sizeSm,\n lg: styles.sizeLg,\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n});\n\nexport interface ButtonProps\n extends Omit<ButtonPrimitive.Props, 'className'>, VariantProps<typeof buttonVariants> {\n className?: string;\n /**\n * Leading icon slot — the one right way to put an icon in a Button (never\n * via children; the slot is what gets sized, spaced, hidden during\n * `loading`, and marked decorative). With no children the button turns\n * square icon-only — pass `aria-label` then, the icon carries no\n * accessible name. Same prop shape as react-kit's AcvButton; a trailing\n * slot, if ever needed, takes AcvButton's `end` name.\n */\n icon?: ReactNode;\n /**\n * Shows a centered spinner and reports `aria-busy`. Content is hidden\n * with opacity, not visibility: it keeps painting the button's size (no\n * width jump) and, unlike visibility, stays in the accessibility tree —\n * the button keeps its name while `aria-busy` reports the state, with no\n * hardcoded \"Loading\" label the kit would otherwise have to translate.\n * Clicks are suppressed the same way `disabled` suppresses them, but the\n * button does NOT become natively `disabled` — it forces\n * `focusableWhenDisabled` (see below) instead, so it stays in the tab\n * order and reports `aria-disabled` rather than blurring itself the\n * instant a native `disabled` attribute would land. Consumer code\n * checking the native `disabled` property or a `:disabled` CSS selector\n * will NOT see a `loading` button the way it sees a plain `disabled`\n * one — check `aria-disabled`/`aria-busy` instead.\n */\n loading?: boolean;\n /**\n * Keep the button in the tab order (and reporting `aria-disabled`\n * instead of the native `disabled` attribute) while disabled — inherited\n * from Base UI's Button, re-declared here because `loading` above forces\n * this to `true` regardless of what's passed: a native `disabled`\n * attribute blurs the button the instant it lands, which `loading` can't\n * afford (it needs `aria-busy` to still be announced to something). An\n * explicit `focusableWhenDisabled={false}` is silently overridden while\n * `loading` is `true`.\n * @default false\n */\n focusableWhenDisabled?: boolean;\n}\n\nexport function Button({\n className,\n variant,\n size,\n icon,\n loading,\n disabled,\n focusableWhenDisabled,\n children,\n ...props\n}: ButtonProps) {\n // One predicate for \"does this button have a visible label\", driving\n // BOTH the icon-only derivation below and the label-render guard at the\n // bottom: `children == null` only catches a missing prop, not a falsy\n // one — `<Button icon={x}>{cond && 'Save'}</Button>` with cond=false\n // passes `false` as children, which is neither null nor renderable, so\n // checking each spot with its own logic could (and did) disagree about\n // whether the button has a label.\n //\n // Children.toArray drops `false`/`null`/`undefined`/`[]` but KEEPS the\n // empty string (`toArray('')` has length 1), so the array being non-empty\n // is not on its own the same question as \"renders something visible\" —\n // hence the explicit `!== ''` filter. `<Button icon={x}>{label}</Button>`\n // with an empty `label` is the case it covers: without the filter that\n // button stays a wide pill wrapping an empty label span instead of going\n // icon-only. `0` is deliberately NOT filtered — React renders it.\n const hasLabel = Children.toArray(children).some((child) => child !== '');\n // Same predicate, applied to the icon slot: `icon != null` is true for\n // `icon={false}` — a valid ReactNode that renders nothing — which is\n // exactly what `icon={cond && <Icon/>}` passes when `cond` is false.\n // Without this, a false condition still forced the button icon-only and\n // rendered an empty square.\n const hasIcon = Children.toArray(icon).some((child) => child !== '');\n const iconOnly = hasIcon && !hasLabel;\n return (\n <ButtonPrimitive\n className={buttonVariants({ variant, size, className })}\n {...props}\n /*\n * Derived attributes are spread AFTER `...props` so a caller's own\n * conflicting `aria-busy`/`data-loading`/`data-icon-only` can never\n * shadow the state this component just computed — the button IS\n * loading/icon-only/not, regardless of what a stray prop says.\n *\n * `focusableWhenDisabled` while `loading`: a native `disabled`\n * attribute blurs the element the instant it lands, which would\n * silently steal focus off a button the user just clicked and make\n * `aria-busy` announce to no one. Base UI's `focusableWhenDisabled`\n * keeps it in the tab order and reports the state via\n * `aria-disabled` instead (see useFocusableWhenDisabled) — clicks\n * still get suppressed via `disabled` below either way. A plain\n * `disabled` with no `loading` keeps its ordinary native behavior\n * unless the caller opts into `focusableWhenDisabled` itself.\n */\n focusableWhenDisabled={loading || focusableWhenDisabled}\n disabled={disabled || loading}\n data-icon-only={iconOnly || undefined}\n data-loading={loading || undefined}\n aria-busy={loading || undefined}\n >\n {loading && <span className={styles.spinner} aria-hidden=\"true\" />}\n {hasIcon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {icon}\n </span>\n )}\n {hasLabel && <span className={styles.label}>{children}</span>}\n </ButtonPrimitive>\n );\n}\n"],"names":["buttonVariants","cva","styles","Button","className","variant","size","icon","loading","disabled","focusableWhenDisabled","children","props","hasLabel","Children","child","hasIcon","iconOnly","jsxs","ButtonPrimitive","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;GAUaA,IAAiBC,EAAIC,EAAO,QAAQ;AAAA,EAC/C,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAASA,EAAO;AAAA,MAChB,aAAaA,EAAO;AAAA,MACpB,SAASA,EAAO;AAAA,MAChB,WAAWA,EAAO;AAAA,MAClB,OAAOA,EAAO;AAAA,MACd,MAAMA,EAAO;AAAA,MACb,YAAYA,EAAO;AAAA,MACnB,QAAQA,EAAO;AAAA,MACf,SAASA,EAAO;AAAA,IAAA;AAAA,IAElB,MAAM;AAAA,MACJ,SAASA,EAAO;AAAA,MAChB,IAAIA,EAAO;AAAA,MACX,IAAIA,EAAO;AAAA,IAAA;AAAA,EACb;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAEV,CAAC;AA4CM,SAASC,EAAO;AAAA,EACrB,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAAgB;AAgBd,QAAMC,IAAWC,EAAS,QAAQH,CAAQ,EAAE,KAAK,CAACI,MAAUA,MAAU,EAAE,GAMlEC,IAAUF,EAAS,QAAQP,CAAI,EAAE,KAAK,CAACQ,MAAUA,MAAU,EAAE,GAC7DE,IAAWD,KAAW,CAACH;AAC7B,SACE,gBAAAK;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,WAAWnB,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,GAAW;AAAA,MACrD,GAAGQ;AAAA,MAiBJ,uBAAuBJ,KAAWE;AAAA,MAClC,UAAUD,KAAYD;AAAA,MACtB,kBAAgBS,KAAY;AAAA,MAC5B,gBAAcT,KAAW;AAAA,MACzB,aAAWA,KAAW;AAAA,MAErB,UAAA;AAAA,QAAAA,uBAAY,QAAA,EAAK,WAAWN,EAAO,SAAS,eAAY,QAAO;AAAA,QAC/Dc,uBACE,QAAA,EAAK,WAAWd,EAAO,MAAM,eAAY,QACvC,UAAAK,EAAA,CACH;AAAA,QAEDM,KAAY,gBAAAO,EAAC,QAAA,EAAK,WAAWlB,EAAO,OAAQ,UAAAS,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG5D;"}
package/dist/calendar.js CHANGED
@@ -1,9 +1,9 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { cx as h } from "class-variance-authority";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { cx as b } from "class-variance-authority";
3
3
  import { ChevronRightIcon as w, ChevronLeftIcon as i, ChevronUpIcon as l, ChevronDownIcon as p } from "lucide-react";
4
- import { useRef as b, useEffect as x } from "react";
4
+ import { useRef as h, useEffect as x } from "react";
5
5
  import { DayPicker as k } from "react-day-picker";
6
- import './chunks/calendar.Cnbv4EzY.css';const y = "_root_8sxhd_14", g = "_months_8sxhd_21", v = "_month_8sxhd_21", N = "_nav_8sxhd_52", C = "_buttonPrevious_8sxhd_64", f = "_buttonNext_8sxhd_65", D = "_monthCaption_8sxhd_44", L = "_dropdowns_8sxhd_116", R = "_dropdownRoot_8sxhd_135", B = "_dropdown_8sxhd_116", E = "_captionLabel_8sxhd_131", S = "_captionLabelDropdown_8sxhd_159", H = "_chevron_8sxhd_173", M = "_monthGrid_8sxhd_184", P = "_weekdays_8sxhd_189", G = "_weekday_8sxhd_189", I = "_week_8sxhd_189", j = "_weekNumberHeader_8sxhd_210", O = "_weekNumber_8sxhd_210", U = "_weekNumberCell_8sxhd_220", V = "_day_8sxhd_235", W = "_today_8sxhd_230", q = "_outside_8sxhd_230", z = "_disabled_8sxhd_231", A = "_hidden_8sxhd_269", F = "_rangeStart_8sxhd_231", J = "_rangeMiddle_8sxhd_231", K = "_rangeEnd_8sxhd_231", Q = "_dayButton_8sxhd_235", e = {
6
+ import './chunks/calendar.Dtndav4F.css';const y = "_root_1dbxd_14", g = "_months_1dbxd_21", v = "_month_1dbxd_21", N = "_nav_1dbxd_52", C = "_buttonPrevious_1dbxd_64", f = "_buttonNext_1dbxd_65", D = "_monthCaption_1dbxd_44", L = "_dropdowns_1dbxd_116", R = "_dropdownRoot_1dbxd_135", B = "_dropdown_1dbxd_116", E = "_captionLabel_1dbxd_131", S = "_captionLabelDropdown_1dbxd_159", H = "_chevron_1dbxd_173", M = "_monthGrid_1dbxd_184", P = "_weekdays_1dbxd_189", G = "_weekday_1dbxd_189", I = "_week_1dbxd_189", j = "_weekNumberHeader_1dbxd_210", O = "_weekNumber_1dbxd_210", U = "_weekNumberCell_1dbxd_220", V = "_day_1dbxd_235", W = "_today_1dbxd_230", q = "_outside_1dbxd_230", z = "_disabled_1dbxd_231", A = "_hidden_1dbxd_269", F = "_rangeStart_1dbxd_231", J = "_rangeMiddle_1dbxd_231", K = "_rangeEnd_1dbxd_231", Q = "_dayButton_1dbxd_235", e = {
7
7
  root: y,
8
8
  months: g,
9
9
  month: v,
@@ -40,36 +40,36 @@ import './chunks/calendar.Cnbv4EzY.css';const y = "_root_8sxhd_14", g = "_months
40
40
  right: w
41
41
  };
42
42
  function X({
43
- orientation: d = "down",
43
+ orientation: t = "down",
44
44
  className: r
45
45
  }) {
46
- const o = T[d];
47
- return /* @__PURE__ */ t(o, { className: h(e.chevron, r) });
46
+ const o = T[t];
47
+ return /* @__PURE__ */ n(o, { className: b(e.chevron, r) });
48
48
  }
49
- function te({
50
- className: d,
49
+ function ne({
50
+ className: t,
51
51
  classNames: r,
52
52
  showOutsideDays: o = !0,
53
- captionLayout: s = "label",
54
- locale: n,
55
- formatters: _,
53
+ captionLayout: _ = "label",
54
+ locale: d,
55
+ formatters: s,
56
56
  components: u,
57
57
  ...m
58
58
  }) {
59
- return /* @__PURE__ */ t(
59
+ return /* @__PURE__ */ n(
60
60
  k,
61
61
  {
62
62
  showOutsideDays: o,
63
- captionLayout: s,
64
- className: h(e.root, d),
65
- locale: n,
63
+ captionLayout: _,
64
+ className: b(e.root, t),
65
+ locale: d,
66
66
  formatters: {
67
67
  // Upstream's own override: the ramp's default is the localized FULL
68
68
  // month name, which overflows the dropdown chip's compact width —
69
69
  // forced to the abbreviated form regardless of what the consumer's
70
70
  // own `formatters` might otherwise leave at the default.
71
- formatMonthDropdown: (a) => a.toLocaleString(n == null ? void 0 : n.code, { month: "short" }),
72
- ..._
71
+ formatMonthDropdown: (a) => a.toLocaleString(d == null ? void 0 : d.code, { month: "short" }),
72
+ ...s
73
73
  },
74
74
  classNames: {
75
75
  months: e.months,
@@ -81,7 +81,7 @@ function te({
81
81
  dropdowns: e.dropdowns,
82
82
  dropdown_root: e.dropdownRoot,
83
83
  dropdown: e.dropdown,
84
- caption_label: h(e.captionLabel, s !== "label" && e.captionLabelDropdown),
84
+ caption_label: b(e.captionLabel, _ !== "label" && e.captionLabelDropdown),
85
85
  month_grid: e.monthGrid,
86
86
  weekdays: e.weekdays,
87
87
  weekday: e.weekday,
@@ -99,36 +99,36 @@ function te({
99
99
  ...r
100
100
  },
101
101
  components: {
102
- Chevron: ({ className: a, orientation: c }) => /* @__PURE__ */ t(X, { orientation: c, className: a }),
102
+ Chevron: ({ className: a, orientation: c }) => /* @__PURE__ */ n(X, { orientation: c, className: a }),
103
103
  DayButton: Y,
104
- WeekNumber: ({ children: a, ...c }) => /* @__PURE__ */ t("td", { ...c, children: /* @__PURE__ */ t("div", { className: e.weekNumberCell, children: a }) }),
104
+ WeekNumber: ({ children: a, ...c }) => /* @__PURE__ */ n("td", { ...c, children: /* @__PURE__ */ n("div", { className: e.weekNumberCell, children: a }) }),
105
105
  ...u
106
106
  },
107
107
  ...m
108
108
  }
109
109
  );
110
110
  }
111
- function Y({ className: d, day: r, modifiers: o, ...s }) {
112
- const n = b(null);
111
+ function Y({ className: t, day: r, modifiers: o, ..._ }) {
112
+ const d = h(null);
113
113
  return x(() => {
114
- var _;
115
- o.focused && ((_ = n.current) == null || _.focus());
116
- }, [o.focused]), /* @__PURE__ */ t(
114
+ var s;
115
+ o.focused && ((s = d.current) == null || s.focus());
116
+ }, [o.focused]), /* @__PURE__ */ n(
117
117
  "button",
118
118
  {
119
- ref: n,
119
+ ref: d,
120
120
  type: "button",
121
121
  "data-selected-single": o.selected && !o.range_start && !o.range_end && !o.range_middle || void 0,
122
122
  "data-range-start": o.range_start || void 0,
123
123
  "data-range-end": o.range_end || void 0,
124
124
  "data-range-middle": o.range_middle || void 0,
125
- className: h(e.dayButton, d),
126
- ...s
125
+ className: b(e.dayButton, t),
126
+ ..._
127
127
  }
128
128
  );
129
129
  }
130
130
  export {
131
- te as Calendar,
131
+ ne as Calendar,
132
132
  Y as CalendarDayButton
133
133
  };
134
134
  //# sourceMappingURL=calendar.js.map
package/dist/card.js CHANGED
@@ -1,54 +1,77 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { cx as e, cva as n } from "class-variance-authority";
3
- import './chunks/card.D3Ct_dza.css';const d = "_card_1sj4w_6", i = "_sizeDefault_1sj4w_82", o = "_sizeSm_1sj4w_39", _ = "_cardHeader_1sj4w_94", u = "_cardAction_1sj4w_110", l = "_cardDescription_1sj4w_114", f = "_cardTitle_1sj4w_118", m = "_cardContent_1sj4w_143", C = "_cardFooter_1sj4w_147", t = {
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { cx as o, cva as c } from "class-variance-authority";
3
+ import './chunks/card.DdBl-usf.css';const d = "_card_136no_6", i = "_sizeDefault_136no_82", s = "_sizeSm_136no_39", l = "_cardHeader_136no_94", p = "_cardAction_136no_110", _ = "_cardDescription_136no_114", u = "_cardTitle_136no_118", y = "_typographyDefault_136no_146", f = "_typographyPanel_136no_150", m = "_cardContent_136no_172", D = "_cardFooter_136no_176", r = {
4
4
  card: d,
5
5
  sizeDefault: i,
6
- sizeSm: o,
7
- cardHeader: _,
8
- cardAction: u,
9
- cardDescription: l,
10
- cardTitle: f,
6
+ sizeSm: s,
7
+ cardHeader: l,
8
+ cardAction: p,
9
+ cardDescription: _,
10
+ cardTitle: u,
11
+ typographyDefault: y,
12
+ typographyPanel: f,
11
13
  cardContent: m,
12
- cardFooter: C
13
- }, j = n(t.card, {
14
+ cardFooter: D
15
+ }, g = c(r.card, {
14
16
  variants: {
15
17
  size: {
16
- default: t.sizeDefault,
17
- sm: t.sizeSm
18
+ default: r.sizeDefault,
19
+ sm: r.sizeSm
18
20
  }
19
21
  },
20
22
  defaultVariants: {
21
23
  size: "default"
22
24
  }
23
25
  });
24
- function w({ className: r, size: a, ...s }) {
25
- return /* @__PURE__ */ c("div", { className: j({ size: a, className: r }), ...s });
26
+ function N({ className: a, size: t, ...e }) {
27
+ return /* @__PURE__ */ n("div", { className: g({ size: t, className: a }), ...e });
26
28
  }
27
- function D({ className: r, ...a }) {
28
- return /* @__PURE__ */ c("div", { className: e(t.cardHeader, r), ...a });
29
+ function T({ className: a, ...t }) {
30
+ return /* @__PURE__ */ n("div", { className: o(r.cardHeader, a), ...t });
29
31
  }
30
- function p({ className: r, ...a }) {
31
- return /* @__PURE__ */ c("div", { className: e(t.cardTitle, r), ...a });
32
+ const h = c(r.cardTitle, {
33
+ variants: {
34
+ typography: {
35
+ default: r.typographyDefault,
36
+ panel: r.typographyPanel
37
+ }
38
+ },
39
+ defaultVariants: {
40
+ typography: "default"
41
+ }
42
+ }), C = c(r.cardDescription, {
43
+ variants: {
44
+ typography: {
45
+ default: r.typographyDefault,
46
+ panel: r.typographyPanel
47
+ }
48
+ },
49
+ defaultVariants: {
50
+ typography: "default"
51
+ }
52
+ });
53
+ function V({ className: a, typography: t, ...e }) {
54
+ return /* @__PURE__ */ n("div", { className: h({ typography: t, className: a }), ...e });
32
55
  }
33
- function N({ className: r, ...a }) {
34
- return /* @__PURE__ */ c("div", { className: e(t.cardDescription, r), ...a });
56
+ function A({ className: a, typography: t, ...e }) {
57
+ return /* @__PURE__ */ n("div", { className: C({ typography: t, className: a }), ...e });
35
58
  }
36
- function A({ className: r, ...a }) {
37
- return /* @__PURE__ */ c("div", { className: e(t.cardAction, r), ...a });
59
+ function F({ className: a, ...t }) {
60
+ return /* @__PURE__ */ n("div", { className: o(r.cardAction, a), ...t });
38
61
  }
39
- function F({ className: r, ...a }) {
40
- return /* @__PURE__ */ c("div", { className: e(t.cardContent, r), ...a });
62
+ function H({ className: a, ...t }) {
63
+ return /* @__PURE__ */ n("div", { className: o(r.cardContent, a), ...t });
41
64
  }
42
- function H({ className: r, ...a }) {
43
- return /* @__PURE__ */ c("div", { className: e(t.cardFooter, r), ...a });
65
+ function P({ className: a, ...t }) {
66
+ return /* @__PURE__ */ n("div", { className: o(r.cardFooter, a), ...t });
44
67
  }
45
68
  export {
46
- w as Card,
47
- A as CardAction,
48
- F as CardContent,
49
- N as CardDescription,
50
- H as CardFooter,
51
- D as CardHeader,
52
- p as CardTitle
69
+ N as Card,
70
+ F as CardAction,
71
+ H as CardContent,
72
+ A as CardDescription,
73
+ P as CardFooter,
74
+ T as CardHeader,
75
+ V as CardTitle
53
76
  };
54
77
  //# sourceMappingURL=card.js.map
package/dist/card.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","sources":["../src/components/card/card.tsx"],"sourcesContent":["import { cva, cx, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport styles from './card.module.css';\n\n/*\n * Card has no Base UI primitive (registry/base-vega ships plain `div`s with\n * data-slot markers) — this is a pure styling translation over native\n * elements, same shape as Dialog's Header/Footer/Title/Description.\n */\n\nconst cardVariants = cva(styles.card, {\n variants: {\n size: {\n default: styles.sizeDefault,\n sm: styles.sizeSm,\n },\n },\n defaultVariants: {\n size: 'default',\n },\n});\n\nexport type CardProps = ComponentProps<'div'> & VariantProps<typeof cardVariants>;\n\nexport function Card({ className, size, ...props }: CardProps) {\n return <div className={cardVariants({ size, className })} {...props} />;\n}\n\nexport type CardHeaderProps = ComponentProps<'div'>;\n\nexport function CardHeader({ className, ...props }: CardHeaderProps) {\n return <div className={cx(styles.cardHeader, className)} {...props} />;\n}\n\nexport type CardTitleProps = ComponentProps<'div'>;\n\nexport function CardTitle({ className, ...props }: CardTitleProps) {\n return <div className={cx(styles.cardTitle, className)} {...props} />;\n}\n\nexport type CardDescriptionProps = ComponentProps<'div'>;\n\nexport function CardDescription({ className, ...props }: CardDescriptionProps) {\n return <div className={cx(styles.cardDescription, className)} {...props} />;\n}\n\n/** Positions in the header's second column, spanning both its rows (see CSS). */\nexport type CardActionProps = ComponentProps<'div'>;\n\nexport function CardAction({ className, ...props }: CardActionProps) {\n return <div className={cx(styles.cardAction, className)} {...props} />;\n}\n\nexport type CardContentProps = ComponentProps<'div'>;\n\nexport function CardContent({ className, ...props }: CardContentProps) {\n return <div className={cx(styles.cardContent, className)} {...props} />;\n}\n\nexport type CardFooterProps = ComponentProps<'div'>;\n\nexport function CardFooter({ className, ...props }: CardFooterProps) {\n return <div className={cx(styles.cardFooter, className)} {...props} />;\n}\n"],"names":["cardVariants","cva","styles","Card","className","size","props","jsx","CardHeader","cx","CardTitle","CardDescription","CardAction","CardContent","CardFooter"],"mappings":";;;;;;;;;;;;GAWMA,IAAeC,EAAIC,EAAO,MAAM;AAAA,EACpC,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,SAASA,EAAO;AAAA,MAChB,IAAIA,EAAO;AAAA,IAAA;AAAA,EACb;AAAA,EAEF,iBAAiB;AAAA,IACf,MAAM;AAAA,EAAA;AAEV,CAAC;AAIM,SAASC,EAAK,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,KAAoB;AAC7D,SAAO,gBAAAC,EAAC,OAAA,EAAI,WAAWP,EAAa,EAAE,MAAAK,GAAM,WAAAD,EAAA,CAAW,GAAI,GAAGE,GAAO;AACvE;AAIO,SAASE,EAAW,EAAE,WAAAJ,GAAW,GAAGE,KAA0B;AACnE,SAAO,gBAAAC,EAAC,SAAI,WAAWE,EAAGP,EAAO,YAAYE,CAAS,GAAI,GAAGE,GAAO;AACtE;AAIO,SAASI,EAAU,EAAE,WAAAN,GAAW,GAAGE,KAAyB;AACjE,SAAO,gBAAAC,EAAC,SAAI,WAAWE,EAAGP,EAAO,WAAWE,CAAS,GAAI,GAAGE,GAAO;AACrE;AAIO,SAASK,EAAgB,EAAE,WAAAP,GAAW,GAAGE,KAA+B;AAC7E,SAAO,gBAAAC,EAAC,SAAI,WAAWE,EAAGP,EAAO,iBAAiBE,CAAS,GAAI,GAAGE,GAAO;AAC3E;AAKO,SAASM,EAAW,EAAE,WAAAR,GAAW,GAAGE,KAA0B;AACnE,SAAO,gBAAAC,EAAC,SAAI,WAAWE,EAAGP,EAAO,YAAYE,CAAS,GAAI,GAAGE,GAAO;AACtE;AAIO,SAASO,EAAY,EAAE,WAAAT,GAAW,GAAGE,KAA2B;AACrE,SAAO,gBAAAC,EAAC,SAAI,WAAWE,EAAGP,EAAO,aAAaE,CAAS,GAAI,GAAGE,GAAO;AACvE;AAIO,SAASQ,EAAW,EAAE,WAAAV,GAAW,GAAGE,KAA0B;AACnE,SAAO,gBAAAC,EAAC,SAAI,WAAWE,EAAGP,EAAO,YAAYE,CAAS,GAAI,GAAGE,GAAO;AACtE;"}
1
+ {"version":3,"file":"card.js","sources":["../src/components/card/card.tsx"],"sourcesContent":["import { cva, cx, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport styles from './card.module.css';\n\n/*\n * Card has no Base UI primitive (registry/base-vega ships plain `div`s with\n * data-slot markers) — this is a pure styling translation over native\n * elements, same shape as Dialog's Header/Footer/Title/Description.\n */\n\nconst cardVariants = cva(styles.card, {\n variants: {\n size: {\n default: styles.sizeDefault,\n sm: styles.sizeSm,\n },\n },\n defaultVariants: {\n size: 'default',\n },\n});\n\nexport type CardProps = ComponentProps<'div'> & VariantProps<typeof cardVariants>;\n\nexport function Card({ className, size, ...props }: CardProps) {\n return <div className={cardVariants({ size, className })} {...props} />;\n}\n\nexport type CardHeaderProps = ComponentProps<'div'>;\n\nexport function CardHeader({ className, ...props }: CardHeaderProps) {\n return <div className={cx(styles.cardHeader, className)} {...props} />;\n}\n\n/*\n * The typography axis, shared by the two text parts: `default` is the\n * card's own ramp and `panel` the denser pair a drawn panel header uses.\n * Two recipes rather than one, because the two parts step onto different\n * roles; the axis name and its values are the same on both, so a caller\n * sets the same word on each.\n */\nconst cardTitleVariants = cva(styles.cardTitle, {\n variants: {\n typography: {\n default: styles.typographyDefault,\n panel: styles.typographyPanel,\n },\n },\n defaultVariants: {\n typography: 'default',\n },\n});\n\nconst cardDescriptionVariants = cva(styles.cardDescription, {\n variants: {\n typography: {\n default: styles.typographyDefault,\n panel: styles.typographyPanel,\n },\n },\n defaultVariants: {\n typography: 'default',\n },\n});\n\nexport type CardTitleProps = ComponentProps<'div'> & VariantProps<typeof cardTitleVariants>;\n\nexport function CardTitle({ className, typography, ...props }: CardTitleProps) {\n return <div className={cardTitleVariants({ typography, className })} {...props} />;\n}\n\nexport type CardDescriptionProps = ComponentProps<'div'> &\n VariantProps<typeof cardDescriptionVariants>;\n\nexport function CardDescription({ className, typography, ...props }: CardDescriptionProps) {\n return <div className={cardDescriptionVariants({ typography, className })} {...props} />;\n}\n\n/** Positions in the header's second column, spanning both its rows (see CSS). */\nexport type CardActionProps = ComponentProps<'div'>;\n\nexport function CardAction({ className, ...props }: CardActionProps) {\n return <div className={cx(styles.cardAction, className)} {...props} />;\n}\n\nexport type CardContentProps = ComponentProps<'div'>;\n\nexport function CardContent({ className, ...props }: CardContentProps) {\n return <div className={cx(styles.cardContent, className)} {...props} />;\n}\n\nexport type CardFooterProps = ComponentProps<'div'>;\n\nexport function CardFooter({ className, ...props }: CardFooterProps) {\n return <div className={cx(styles.cardFooter, className)} {...props} />;\n}\n"],"names":["cardVariants","cva","styles","Card","className","size","props","jsx","CardHeader","cx","cardTitleVariants","cardDescriptionVariants","CardTitle","typography","CardDescription","CardAction","CardContent","CardFooter"],"mappings":";;;;;;;;;;;;;;GAWMA,IAAeC,EAAIC,EAAO,MAAM;AAAA,EACpC,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,SAASA,EAAO;AAAA,MAChB,IAAIA,EAAO;AAAA,IAAA;AAAA,EACb;AAAA,EAEF,iBAAiB;AAAA,IACf,MAAM;AAAA,EAAA;AAEV,CAAC;AAIM,SAASC,EAAK,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,KAAoB;AAC7D,SAAO,gBAAAC,EAAC,OAAA,EAAI,WAAWP,EAAa,EAAE,MAAAK,GAAM,WAAAD,EAAA,CAAW,GAAI,GAAGE,GAAO;AACvE;AAIO,SAASE,EAAW,EAAE,WAAAJ,GAAW,GAAGE,KAA0B;AACnE,SAAO,gBAAAC,EAAC,SAAI,WAAWE,EAAGP,EAAO,YAAYE,CAAS,GAAI,GAAGE,GAAO;AACtE;AASA,MAAMI,IAAoBT,EAAIC,EAAO,WAAW;AAAA,EAC9C,UAAU;AAAA,IACR,YAAY;AAAA,MACV,SAASA,EAAO;AAAA,MAChB,OAAOA,EAAO;AAAA,IAAA;AAAA,EAChB;AAAA,EAEF,iBAAiB;AAAA,IACf,YAAY;AAAA,EAAA;AAEhB,CAAC,GAEKS,IAA0BV,EAAIC,EAAO,iBAAiB;AAAA,EAC1D,UAAU;AAAA,IACR,YAAY;AAAA,MACV,SAASA,EAAO;AAAA,MAChB,OAAOA,EAAO;AAAA,IAAA;AAAA,EAChB;AAAA,EAEF,iBAAiB;AAAA,IACf,YAAY;AAAA,EAAA;AAEhB,CAAC;AAIM,SAASU,EAAU,EAAE,WAAAR,GAAW,YAAAS,GAAY,GAAGP,KAAyB;AAC7E,SAAO,gBAAAC,EAAC,OAAA,EAAI,WAAWG,EAAkB,EAAE,YAAAG,GAAY,WAAAT,EAAA,CAAW,GAAI,GAAGE,GAAO;AAClF;AAKO,SAASQ,EAAgB,EAAE,WAAAV,GAAW,YAAAS,GAAY,GAAGP,KAA+B;AACzF,SAAO,gBAAAC,EAAC,OAAA,EAAI,WAAWI,EAAwB,EAAE,YAAAE,GAAY,WAAAT,EAAA,CAAW,GAAI,GAAGE,GAAO;AACxF;AAKO,SAASS,EAAW,EAAE,WAAAX,GAAW,GAAGE,KAA0B;AACnE,SAAO,gBAAAC,EAAC,SAAI,WAAWE,EAAGP,EAAO,YAAYE,CAAS,GAAI,GAAGE,GAAO;AACtE;AAIO,SAASU,EAAY,EAAE,WAAAZ,GAAW,GAAGE,KAA2B;AACrE,SAAO,gBAAAC,EAAC,SAAI,WAAWE,EAAGP,EAAO,aAAaE,CAAS,GAAI,GAAGE,GAAO;AACvE;AAIO,SAASW,EAAW,EAAE,WAAAb,GAAW,GAAGE,KAA0B;AACnE,SAAO,gBAAAC,EAAC,SAAI,WAAWE,EAAGP,EAAO,YAAYE,CAAS,GAAI,GAAGE,GAAO;AACtE;"}