jenosize-ui 0.1.0 → 0.2.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 (169) hide show
  1. package/README.md +10 -7
  2. package/dist/Cartesian-ZIKPEYWP.d.ts +26 -0
  3. package/dist/area-chart.d.ts +53 -0
  4. package/dist/area-chart.js +8 -0
  5. package/dist/avatar.d.ts +19 -0
  6. package/dist/avatar.js +12 -7
  7. package/dist/badge.js +5 -5
  8. package/dist/bar-chart.d.ts +31 -0
  9. package/dist/bar-chart.js +8 -0
  10. package/dist/breadcrumb.js +3 -3
  11. package/dist/button.d.ts +11 -1
  12. package/dist/button.js +9 -8
  13. package/dist/calendar.js +14 -12
  14. package/dist/callout.js +10 -9
  15. package/dist/card.d.ts +52 -2
  16. package/dist/card.js +6 -2
  17. package/dist/checkbox.js +6 -5
  18. package/dist/chunk-34J5AANZ.js +605 -0
  19. package/dist/{chunk-D6TPWNRK.js → chunk-3GT43XPK.js} +5 -5
  20. package/dist/{chunk-3Y5X7B5C.js → chunk-3Z3SDKIA.js} +6 -11
  21. package/dist/{chunk-MQGD2OUF.js → chunk-42FCPC77.js} +3 -3
  22. package/dist/{chunk-Z3ETJN5G.js → chunk-4BRMM3I5.js} +6 -11
  23. package/dist/{chunk-WZQFC7ZN.js → chunk-4HKDD3PR.js} +55 -16
  24. package/dist/chunk-4K6V6NNK.js +169 -0
  25. package/dist/{chunk-ZZA2LUTL.js → chunk-4R7WDDCW.js} +41 -16
  26. package/dist/{chunk-BJUZVYQC.js → chunk-4W6AYGLR.js} +12 -12
  27. package/dist/{chunk-4OLULPQG.js → chunk-54S5CUY6.js} +8 -5
  28. package/dist/{chunk-GRLSUQQE.js → chunk-5JRM3OES.js} +4 -4
  29. package/dist/chunk-5ZPUAGOP.js +19 -0
  30. package/dist/{chunk-W5GGOUUI.js → chunk-6HJA7NPL.js} +3 -3
  31. package/dist/{chunk-CME4DIML.js → chunk-6IUTVDNI.js} +22 -3
  32. package/dist/chunk-6UBYHSBX.js +147 -0
  33. package/dist/{chunk-HMUZE6EK.js → chunk-74HPBSVY.js} +3 -3
  34. package/dist/chunk-75M43ELV.js +366 -0
  35. package/dist/chunk-763VS2FY.js +10 -0
  36. package/dist/chunk-7HV6EIGZ.js +26 -0
  37. package/dist/chunk-7VLYQR4D.js +44 -0
  38. package/dist/{chunk-D5BTFSL7.js → chunk-A46ED5JQ.js} +3 -3
  39. package/dist/{chunk-W46K56XU.js → chunk-A5WQLN4B.js} +8 -24
  40. package/dist/chunk-AC6ZWKRN.js +23 -0
  41. package/dist/{chunk-E7ZSWBAK.js → chunk-BD5YKFRA.js} +4 -4
  42. package/dist/chunk-BLIZ3CL3.js +49 -0
  43. package/dist/{chunk-DRZCJCBO.js → chunk-BNIWT6CW.js} +4 -4
  44. package/dist/{chunk-JVJRHBTD.js → chunk-C6OTOTKI.js} +21 -8
  45. package/dist/chunk-CTENRS34.js +60 -0
  46. package/dist/{chunk-7IU5TMFL.js → chunk-CWMFEF6R.js} +75 -27
  47. package/dist/{chunk-JTNFJLIY.js → chunk-DCGTB7P7.js} +13 -13
  48. package/dist/{chunk-GFOAJVW5.js → chunk-DJYWPJZ3.js} +3 -3
  49. package/dist/{chunk-MUFHLP4S.js → chunk-DTMYD63D.js} +11 -22
  50. package/dist/{chunk-KDLPXXD2.js → chunk-EDOUI2BG.js} +4 -4
  51. package/dist/{chunk-R6RGJF4L.js → chunk-EDT5J5WK.js} +4 -4
  52. package/dist/{chunk-PWKWNDBS.js → chunk-EX374YWB.js} +6 -6
  53. package/dist/{chunk-F2K7VJUV.js → chunk-FFTRB2UU.js} +4 -4
  54. package/dist/chunk-FIGBJGH2.js +1474 -0
  55. package/dist/chunk-FKVPAEJ6.js +57 -0
  56. package/dist/{chunk-J7ZQQFPT.js → chunk-FZBZGA3P.js} +17 -17
  57. package/dist/{chunk-T7FCG7XV.js → chunk-GAFGIT4Q.js} +10 -10
  58. package/dist/chunk-HSVBTIP2.js +482 -0
  59. package/dist/{chunk-FHHAPGCR.js → chunk-ILICYNK7.js} +3 -3
  60. package/dist/{chunk-WFY7DKQD.js → chunk-JAVNGTOE.js} +9 -14
  61. package/dist/{chunk-7HOIZ3UO.js → chunk-JMWYCT63.js} +6 -6
  62. package/dist/{chunk-QA74ITR4.js → chunk-JUWDRRD6.js} +45 -17
  63. package/dist/{chunk-BVJWBYIG.js → chunk-JXHZHUB3.js} +4 -4
  64. package/dist/{chunk-VWC72TR3.js → chunk-JYBGO6GY.js} +7 -7
  65. package/dist/{chunk-J36M3KRX.js → chunk-L53Y7KUV.js} +13 -11
  66. package/dist/chunk-LBYCCLVI.js +33 -0
  67. package/dist/chunk-LCG34A5T.js +98 -0
  68. package/dist/chunk-M5TVCASC.js +75 -0
  69. package/dist/chunk-MCUASLZH.js +10 -0
  70. package/dist/{chunk-5RAPA22E.js → chunk-MD4AR43X.js} +4 -4
  71. package/dist/{chunk-JP26LPCY.js → chunk-MYQ3FD4Y.js} +25 -11
  72. package/dist/chunk-NA35YZRD.js +252 -0
  73. package/dist/chunk-NKDW6C7K.js +10 -0
  74. package/dist/{chunk-5NOBSXJN.js → chunk-NMERLWT7.js} +6 -6
  75. package/dist/{chunk-KMSYEE23.js → chunk-P6CON2R2.js} +25 -11
  76. package/dist/{chunk-LME57Z6J.js → chunk-P7DH62UY.js} +6 -6
  77. package/dist/chunk-PO2TYK3C.js +17 -0
  78. package/dist/{chunk-5FATN5YD.js → chunk-PXEJ5RKO.js} +4 -4
  79. package/dist/{chunk-JYGR44ZC.js → chunk-QBHQOX23.js} +6 -6
  80. package/dist/{chunk-GCVA3OIV.js → chunk-QDYE5LVT.js} +13 -3
  81. package/dist/{chunk-J2BCKBHC.js → chunk-QKDEQFOQ.js} +4 -4
  82. package/dist/{chunk-ZOOX3TUB.js → chunk-RIXEUAPY.js} +5 -5
  83. package/dist/{chunk-THC2ISYP.js → chunk-RNXRZGXN.js} +4 -4
  84. package/dist/{chunk-7EWQKTNQ.js → chunk-T2WAD4QP.js} +15 -13
  85. package/dist/{chunk-KNYKWUYX.js → chunk-TBN644IN.js} +3 -3
  86. package/dist/{chunk-MKC5HNA7.js → chunk-USL3TDZM.js} +101 -90
  87. package/dist/{chunk-CYPPEUX5.js → chunk-VEOYCAJP.js} +4 -9
  88. package/dist/{chunk-WEUJYDCV.js → chunk-VH35QHD4.js} +6 -6
  89. package/dist/chunk-VWGAMOSE.js +188 -0
  90. package/dist/{chunk-SV56BSUQ.js → chunk-WKWAUU64.js} +4 -4
  91. package/dist/chunk-X2X7Q7NW.js +17 -0
  92. package/dist/{chunk-I7WU4GTY.js → chunk-YLEHYDXC.js} +5 -5
  93. package/dist/combobox.js +12 -10
  94. package/dist/control-size-CaxQhkKh.d.ts +3 -0
  95. package/dist/date-input.js +9 -8
  96. package/dist/date-picker.js +20 -17
  97. package/dist/dialog.d.ts +16 -4
  98. package/dist/dialog.js +8 -6
  99. package/dist/drawer.d.ts +9 -2
  100. package/dist/drawer.js +7 -5
  101. package/dist/dropdown-menu.d.ts +14 -2
  102. package/dist/dropdown-menu.js +7 -3
  103. package/dist/dropzone.d.ts +34 -0
  104. package/dist/dropzone.js +22 -0
  105. package/dist/form.d.ts +78 -0
  106. package/dist/form.js +176 -32
  107. package/dist/header-navigation.d.ts +15 -4
  108. package/dist/header-navigation.js +19 -14
  109. package/dist/index.d.ts +26 -4
  110. package/dist/index.js +76 -56
  111. package/dist/indicator.js +4 -4
  112. package/dist/input.js +8 -7
  113. package/dist/kanban-board.d.ts +549 -0
  114. package/dist/kanban-board.js +23 -0
  115. package/dist/line-chart.d.ts +35 -0
  116. package/dist/line-chart.js +8 -0
  117. package/dist/{nav-Bla0o_-1.d.ts → nav-DcCyt00p.d.ts} +8 -11
  118. package/dist/number-input.js +8 -7
  119. package/dist/pagination.js +12 -9
  120. package/dist/panel-El4oI68p.d.ts +9 -0
  121. package/dist/payment-input.js +8 -7
  122. package/dist/pie-chart.d.ts +60 -0
  123. package/dist/pie-chart.js +8 -0
  124. package/dist/popover.d.ts +9 -3
  125. package/dist/popover.js +7 -5
  126. package/dist/progress-steps.d.ts +275 -0
  127. package/dist/progress-steps.js +8 -0
  128. package/dist/progress.js +2 -2
  129. package/dist/radar-chart.d.ts +73 -0
  130. package/dist/radar-chart.js +8 -0
  131. package/dist/radial-chart.d.ts +69 -0
  132. package/dist/radial-chart.js +8 -0
  133. package/dist/radio.js +6 -5
  134. package/dist/rule-BqzaIwJy.d.ts +80 -0
  135. package/dist/scroll-area.d.ts +62 -0
  136. package/dist/scroll-area.js +7 -0
  137. package/dist/select.d.ts +1 -2
  138. package/dist/select.js +15 -13
  139. package/dist/separator.d.ts +114 -0
  140. package/dist/separator.js +5 -0
  141. package/dist/sidebar-navigation.d.ts +54 -7
  142. package/dist/sidebar-navigation.js +15 -8
  143. package/dist/skeleton.d.ts +61 -0
  144. package/dist/skeleton.js +5 -0
  145. package/dist/styles.css +1 -1
  146. package/dist/surface-DFyDnrTJ.d.ts +34 -0
  147. package/dist/switch.js +2 -2
  148. package/dist/table.d.ts +94 -38
  149. package/dist/table.js +32 -28
  150. package/dist/tabs.js +2 -2
  151. package/dist/tag-input.js +11 -10
  152. package/dist/tag.js +3 -3
  153. package/dist/textarea.js +6 -5
  154. package/dist/theme.css +82 -0
  155. package/dist/theme.js +10 -9
  156. package/dist/toast.js +10 -9
  157. package/dist/tooltip-surface-Dmvb8v5K.d.ts +35 -0
  158. package/dist/tooltip.d.ts +15 -1
  159. package/dist/tooltip.js +3 -2
  160. package/dist/tree.js +6 -5
  161. package/dist/types-6kvYwtRH.d.ts +156 -0
  162. package/dist/use-uploads-ButS4dGe.d.ts +473 -0
  163. package/dist/verification-code-input.d.ts +84 -0
  164. package/dist/verification-code-input.js +13 -0
  165. package/package.json +59 -9
  166. package/dist/card-nWicloNi.d.ts +0 -80
  167. package/dist/chunk-24TO7E32.js +0 -42
  168. package/dist/chunk-FXIBGTS5.js +0 -14
  169. package/dist/chunk-ZZT2E5VT.js +0 -24
@@ -0,0 +1,147 @@
1
+ import { controlBoxClasses } from './chunk-JUWDRRD6.js';
2
+ import { useFieldValidity, FieldFrame, CONTROL_TEXT } from './chunk-QKDEQFOQ.js';
3
+ import { CircleIcon, AsteriskIcon } from './chunk-BLIZ3CL3.js';
4
+ import { warnPositiveInt } from './chunk-QDYE5LVT.js';
5
+ import { cn } from './chunk-ZSNJ6UA3.js';
6
+ import { OTPField } from '@base-ui/react/otp-field';
7
+ import * as React from 'react';
8
+ import { jsx, jsxs } from 'react/jsx-runtime';
9
+
10
+ var BOX_SIZE = { sm: "size-9", md: "size-10", lg: "size-11" };
11
+ var BOX_GAP = { sm: "gap-1.5", md: "gap-2", lg: "gap-2" };
12
+ var MASK_GLYPH_SIZE = {
13
+ dot: { sm: "size-1.5", md: "size-2", lg: "size-2.5" },
14
+ star: { sm: "size-3.5", md: "size-4", lg: "size-4.5" }
15
+ };
16
+ function VerificationCodeInput(props) {
17
+ const {
18
+ length,
19
+ size = "md",
20
+ value,
21
+ defaultValue,
22
+ onValueChange,
23
+ onComplete,
24
+ validationType = "numeric",
25
+ mask = false,
26
+ autoSubmit = false,
27
+ readOnly = false,
28
+ label,
29
+ tooltip,
30
+ tooltipDescription,
31
+ hint,
32
+ required = false,
33
+ hideRequiredIndicator = false,
34
+ invalid = false,
35
+ error,
36
+ disabled = false,
37
+ fullWidth = true,
38
+ name,
39
+ id,
40
+ className,
41
+ ...rest
42
+ } = props;
43
+ const groups = React.useMemo(() => typeof length === "number" ? [length] : length, [length]);
44
+ const total = React.useMemo(() => groups.reduce((n, g) => n + g, 0), [groups]);
45
+ for (const g of groups) warnPositiveInt("VerificationCodeInput", "length", g);
46
+ const { isInvalid, showError } = useFieldValidity(invalid, error);
47
+ const slotClass = cn(
48
+ controlBoxClasses({ size, invalid: isInvalid, disabled, focus: "self" }),
49
+ BOX_SIZE[size],
50
+ // `shrink-0` is what keeps a slot SQUARE — without it the row's flex children compress and the
51
+ // boxes turn into rectangles in any narrow parent. It also raises the row's min-content to
52
+ // (total × box + gaps): measured 280px for a 6-slot md row.
53
+ //
54
+ // What that buys, MEASURED in a 200px flex row rather than assumed, because the two halves of
55
+ // `fullWidth` behave differently and only one of them is the "floor" story:
56
+ // · `fullWidth={false}` (`w-auto`) — the column floors at 280px. `min-width: auto` resolves to
57
+ // the content-based minimum, which is exactly what `shrink-0` raised.
58
+ // · `fullWidth` (default, `w-full`) — the column is 200px and the ROW overflows it. A definite
59
+ // `width` caps the flex item's automatic minimum at the specified-size suggestion, so the
60
+ // column cannot floor. The boxes still measure 40px, which is the guarantee that matters.
61
+ // NEVER a flat `min-w-*` on the column either way: an explicit min-width REPLACES `min-width:
62
+ // auto` and LOWERS the floor (measured on Input: 205 → 112). See control-size.ts's BAR_MIN_W note.
63
+ "shrink-0 appearance-none",
64
+ // A deliberate deviation from <Input>'s left-aligned normal-weight value, documented in the
65
+ // spec: a lone digit centred in a 40px square reads thin at normal weight, and `tabular-nums`
66
+ // is load-bearing — without it `1` and `0` have different advance widths and the digits
67
+ // visibly jitter box to box.
68
+ "text-center font-medium tabular-nums",
69
+ // Masked: the slot is still `type="password"` (so the character is unreadable and uncopyable),
70
+ // but its bullets are painted out and OUR glyph is drawn over the box — a browser gives no way
71
+ // to choose that glyph, and picks a different one per platform. `caret-*` is load-bearing:
72
+ // the caret defaults to `currentColor`, which `text-transparent` would otherwise erase.
73
+ mask !== false && "text-transparent caret-text-primary"
74
+ );
75
+ const maskedSlot = mask === false ? void 0 : (inputProps, state) => /* @__PURE__ */ jsxs("span", { className: cn("relative inline-flex shrink-0", BOX_SIZE[size]), children: [
76
+ /* @__PURE__ */ jsx("input", { ...inputProps }),
77
+ state.filled ? (
78
+ // The component's OWN fixed glyph, not a caller slot: it stays `aria-hidden` (the
79
+ // value is announced by the input itself) and never goes through `<Slot>`.
80
+ // `opacity-50` is repeated here because `controlBoxClasses`'s disabled fade lands on
81
+ // the <input>, and this span is its SIBLING.
82
+ /* @__PURE__ */ jsx(
83
+ "span",
84
+ {
85
+ "aria-hidden": "true",
86
+ className: cn("pointer-events-none absolute inset-0 flex items-center justify-center text-primary", disabled && "opacity-50"),
87
+ children: mask === "dot" ? /* @__PURE__ */ jsx(CircleIcon, { className: cn(MASK_GLYPH_SIZE.dot[size], "fill-current") }) : /* @__PURE__ */ jsx(AsteriskIcon, { className: MASK_GLYPH_SIZE.star[size] })
88
+ }
89
+ )
90
+ ) : null
91
+ ] });
92
+ let slot = 0;
93
+ return /* @__PURE__ */ jsx(
94
+ FieldFrame,
95
+ {
96
+ label,
97
+ tooltip,
98
+ tooltipDescription,
99
+ hint,
100
+ error,
101
+ isInvalid,
102
+ showError,
103
+ required,
104
+ hideRequiredIndicator,
105
+ size,
106
+ disabled,
107
+ fullWidth,
108
+ className,
109
+ children: /* @__PURE__ */ jsx(
110
+ OTPField.Root,
111
+ {
112
+ length: total,
113
+ value,
114
+ defaultValue,
115
+ onValueChange: (next) => onValueChange?.(next),
116
+ onValueComplete: (next) => onComplete?.(next),
117
+ validationType,
118
+ mask: mask !== false,
119
+ autoSubmit,
120
+ readOnly,
121
+ required,
122
+ disabled,
123
+ name,
124
+ id,
125
+ className: cn("flex items-center", BOX_GAP[size]),
126
+ ...rest,
127
+ children: groups.map((count, g) => (
128
+ // The index IS the identity here — a group is defined by its position in `length`.
129
+ /* @__PURE__ */ jsxs(React.Fragment, { children: [
130
+ g > 0 ? (
131
+ // Decorative: a dash between digit groups adds nothing for a screen reader, and the
132
+ // value it separates is already announced per slot. Base UI re-exports a `Separator`
133
+ // with `role="separator"`; this is the same shape DateInput's segment separator uses.
134
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn("px-0.5 text-fg-quaternary", CONTROL_TEXT[size]), children: "\u2013" })
135
+ ) : null,
136
+ Array.from({ length: count }, () => /* @__PURE__ */ jsx(OTPField.Input, { className: slotClass, render: maskedSlot }, slot++))
137
+ ] }, g)
138
+ ))
139
+ }
140
+ )
141
+ }
142
+ );
143
+ }
144
+
145
+ export { VerificationCodeInput };
146
+ //# sourceMappingURL=chunk-6UBYHSBX.js.map
147
+ //# sourceMappingURL=chunk-6UBYHSBX.js.map
@@ -1,5 +1,5 @@
1
1
  import { OptionRow } from './chunk-GTHJWR3Q.js';
2
- import { warnNeedsName } from './chunk-GCVA3OIV.js';
2
+ import { warnNeedsName } from './chunk-QDYE5LVT.js';
3
3
  import { cn } from './chunk-ZSNJ6UA3.js';
4
4
  import { Switch as Switch$1 } from '@base-ui/react/switch';
5
5
  import * as React from 'react';
@@ -63,5 +63,5 @@ function Switch(props) {
63
63
  }
64
64
 
65
65
  export { Switch };
66
- //# sourceMappingURL=chunk-HMUZE6EK.js.map
67
- //# sourceMappingURL=chunk-HMUZE6EK.js.map
66
+ //# sourceMappingURL=chunk-74HPBSVY.js.map
67
+ //# sourceMappingURL=chunk-74HPBSVY.js.map
@@ -0,0 +1,366 @@
1
+ import { TOOLTIP_TONE, TOOLTIP_SWATCH } from './chunk-AC6ZWKRN.js';
2
+ import { warnPositiveInt, devWarn } from './chunk-QDYE5LVT.js';
3
+ import { cn } from './chunk-ZSNJ6UA3.js';
4
+ import { ResponsiveContainer } from 'recharts';
5
+ export { Area, AreaChart, Bar, BarChart, CartesianGrid, Label, Line, LineChart, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart, RadialBar, RadialBarChart, ReferenceLine, Text, Tooltip, XAxis, YAxis } from 'recharts';
6
+ import * as React2 from 'react';
7
+ import { useRef, useLayoutEffect } from 'react';
8
+ import { jsx, jsxs } from 'react/jsx-runtime';
9
+
10
+ // src/components/chart/shared.ts
11
+ var CHART_ROOT = "text-tertiary [&_.recharts-text]:text-xs";
12
+ var POLAR_ROOT = "font-medium text-tertiary [&_.recharts-polar-grid]:text-utility-neutral-100 [&_.recharts-text]:text-xs";
13
+ var MARGIN = {
14
+ line: { left: 5, right: 5, top: 12, bottom: 16 },
15
+ bar: { left: 4, right: 0, top: 12, bottom: 18 },
16
+ /** `bars` layout needs room for the category labels down the left edge. */
17
+ barsLayout: { left: 12, right: 8, top: 12, bottom: 8 },
18
+ /** Pie and Radial draw nothing outside the arc, so their box IS the disc. */
19
+ polar: { left: 0, right: 0, top: 0, bottom: 0 },
20
+ /**
21
+ * The radar's is NOT `polar`, and the asymmetry is the whole point: **this margin IS the band its
22
+ * spoke labels are painted in**, so it is half a text width to the sides and half a line height
23
+ * above and below.
24
+ *
25
+ * Recharts derives the radius as `outerRadius × min(width − left − right, height − top − bottom) / 2`,
26
+ * so pairing this with `outerRadius="100%"` makes the constraint exact — the ring grows until the
27
+ * labels touch the box and stops. The previous pairing (a zero margin and a `72%` guess) got both
28
+ * ends wrong at once: 45px of dead space above and below at a wide size, and clipped labels
29
+ * ("Coverage" → "Cove") the moment a side legend narrowed the plot, because a percentage of
30
+ * `min(w, h)` cannot know how wide a word is.
31
+ *
32
+ * The numbers are measured, not guessed: an angle tick is anchored `POLAR_ANGLE_TICK_SIZE` (17px)
33
+ * outside the ring, and the widest label in the demos ("Coverage") is 56px × 15px, so 32 ends
34
+ * clears a label with a little air. **The sides do NOT carry that same 17px**, which is why they
35
+ * are 64 and not 73: a wide radar is bound by its HEIGHT, so the side band is never the binding
36
+ * constraint there, and in a NARROW one every pixel of side margin comes straight off the radius
37
+ * (a 147px-wide plot is already down to r≈10). **They are a band, not a guarantee** — SVG text
38
+ * does not wrap, so a spoke label materially longer than that, in a plot materially narrower than
39
+ * a card, will still run past the edge. Nothing short of measuring the text can fix that, and the
40
+ * radius has to be decided before there is a tick to measure.
41
+ */
42
+ radar: { left: 64, right: 64, top: 32, bottom: 32 }
43
+ };
44
+ var AXIS = {
45
+ fill: "currentColor",
46
+ axisLine: false,
47
+ tickLine: false,
48
+ interval: "preserveStartEnd"
49
+ };
50
+ var X_AXIS_PADDING = { left: 10, right: 10 };
51
+ var AXIS_TICK = "text-quaternary";
52
+ var AXIS_LABEL = "text-xs! font-medium";
53
+ var GRID = "text-utility-neutral-100";
54
+ var ZERO_LINE = "text-utility-neutral-300";
55
+ var BAND_SEPARATOR = "text-utility-neutral-200";
56
+ var TOOLTIP_CURSOR = {
57
+ line: { className: "stroke-utility-brand-600 stroke-2" },
58
+ bar: { className: "fill-utility-neutral-200/20" }
59
+ };
60
+ var AREA_BAND = {
61
+ detached: "[&_.recharts-area-area]:translate-y-1.5 [&_.recharts-area-area]:[clip-path:inset(0_0_6px_0)]",
62
+ flush: ""
63
+ };
64
+ var AREA_FILL_OPACITY = 0.1;
65
+ var AREA_SOLID_OPACITY = 0.25;
66
+ var AREA_GRADIENT_STOPS = { from: 0.7, to: 0, fromOffset: "5%", toOffset: "95%" };
67
+ var LINE_DASH = { strokeDasharray: "6 4", strokeLinecap: "butt" };
68
+ var DOT_SIZE = { r: 3, activeR: 4, strokeWidth: 2 };
69
+ var dot = (color, r) => ({
70
+ className: cn("fill-bg-primary", color),
71
+ stroke: "currentColor",
72
+ strokeDasharray: "none",
73
+ strokeWidth: DOT_SIZE.strokeWidth,
74
+ r
75
+ });
76
+ var DOT = (color) => dot(color, DOT_SIZE.r);
77
+ var ACTIVE_DOT = (color) => dot(color, DOT_SIZE.activeR);
78
+ var NO_ANIMATION = { isAnimationActive: false };
79
+ var TOOLTIP_FOLLOW = "transform 400ms ease";
80
+ var MAX_BAR_SIZE = 32;
81
+ var BAR_RADIUS = [6, 6, 0, 0];
82
+ var BAR_RADIUS_HORIZONTAL = [0, 6, 6, 0];
83
+ var BAR_LAYOUT = { columns: "horizontal", bars: "vertical" };
84
+ var PIE_SIZE = {
85
+ xs: { height: 160, outer: 80 },
86
+ sm: { height: 200, outer: 100 },
87
+ md: { height: 240, outer: 120 },
88
+ lg: { height: 280, outer: 140 }
89
+ };
90
+ var PIE_DONUT = {
91
+ thin: 0.65,
92
+ regular: 0.5,
93
+ thick: 0.35
94
+ };
95
+ var RADIAL_SIZE = {
96
+ xs: {
97
+ height: 172,
98
+ inner: 52,
99
+ outer: 86,
100
+ label: "text-xl font-semibold",
101
+ description: "text-xs font-medium",
102
+ labelDy: "1.25em",
103
+ descriptionDy: "-1.175em"
104
+ },
105
+ sm: {
106
+ height: 220,
107
+ inner: 61,
108
+ outer: 110,
109
+ label: "text-display-xs font-semibold",
110
+ description: "text-xs font-medium",
111
+ labelDy: "1.15em",
112
+ descriptionDy: "-1.35em"
113
+ },
114
+ md: {
115
+ height: 264,
116
+ inner: 74,
117
+ outer: 132,
118
+ label: "text-display-sm font-semibold",
119
+ description: "text-sm font-medium",
120
+ labelDy: "1.075em",
121
+ descriptionDy: "-1.45em"
122
+ },
123
+ lg: {
124
+ height: 308,
125
+ inner: 84,
126
+ outer: 154,
127
+ label: "text-display-md font-semibold",
128
+ description: "text-sm font-medium",
129
+ labelDy: "1.05em",
130
+ descriptionDy: "-1.5em"
131
+ }
132
+ };
133
+ var RADIAL_TRACK = { className: "fill-utility-neutral-100" };
134
+ var POLAR_HOVER = [
135
+ "[&_.recharts-radial-bar-sector]:transition-opacity",
136
+ "[&_.recharts-radial-bar-sectors:hover_.recharts-radial-bar-sector:not(:hover)]:opacity-40",
137
+ "[&_.recharts-pie-sector]:transition-opacity",
138
+ "[&_.recharts-pie:hover_.recharts-pie-sector:not(:hover)]:opacity-40"
139
+ ].join(" ");
140
+ var POLAR_ANGLE_TICK = "fill-utility-neutral-700 text-xs font-medium";
141
+ var POLAR_RADIUS_PILL = "fill-utility-neutral-50 stroke-border-secondary_alt stroke-1";
142
+ var POLAR_ANGLE_TICK_LIFT = 9;
143
+ var POLAR_RADIUS_PILL_HEIGHT = 20;
144
+ var POLAR_RADIUS_PILL_PAD_X = 10;
145
+ var POLAR_RADIUS_PILL_BASELINE = 4;
146
+ var POLAR_RADIUS_RINGS_DEFAULT = 4;
147
+ var LEGEND = {
148
+ list: "flex flex-wrap",
149
+ horizontal: "flex-row justify-center gap-3",
150
+ vertical: "flex-col items-start gap-1",
151
+ item: "flex items-center gap-2 text-sm text-tertiary",
152
+ swatch: "block size-2 shrink-0 rounded-full bg-current ring-[0.5px] ring-secondary_alt ring-inset"
153
+ };
154
+ var LEGEND_GAP = { vertical: "gap-4", horizontal: "gap-2" };
155
+ var TOOLTIP = {
156
+ layout: "flex flex-col gap-0.5 px-2.5 py-1.5",
157
+ /** The row box. Its `text-*` colour comes from the tone — see `ChartTooltip.tsx`. */
158
+ row: "flex items-center gap-1.5"
159
+ };
160
+ var EMPTY = "flex items-center justify-center text-sm text-tertiary";
161
+ var formatNumber = (value) => value.toLocaleString();
162
+ function ChartFrame({
163
+ ariaLabel,
164
+ height,
165
+ isEmpty,
166
+ emptyMessage,
167
+ component,
168
+ className,
169
+ table,
170
+ legend,
171
+ legendPlacement = "bottom",
172
+ legendAlign = "center",
173
+ children
174
+ }) {
175
+ warnPositiveInt(component, "height", height);
176
+ const gradientId = `jz-chart-${React2.useId().replaceAll(/[^a-zA-Z0-9]/g, "")}`;
177
+ const legendNode = !isEmpty && legend ? legend : null;
178
+ const isBeside = legendPlacement === "left" || legendPlacement === "right";
179
+ const isFirst = legendPlacement === "top" || legendPlacement === "left";
180
+ const plot = isEmpty ? /* @__PURE__ */ jsx("div", { className: EMPTY, style: { height }, children: emptyMessage }) : (
181
+ /*
182
+ * The plot is hidden from assistive tech, and the table below is the WHOLE accessible story.
183
+ *
184
+ * The alternative was recharts' `accessibilityLayer`, which buys keyboard tooltip traversal.
185
+ * Measured, it puts `role="application"` and `tabindex="0"` on the `<svg>` — axe passes it,
186
+ * but `role="application"` tells a screen reader to hand every keystroke to the widget, and
187
+ * that is a large claim for a static plot. Leaving the SVG exposed instead is worse: its
188
+ * axis and legend text would be announced as loose fragments AROUND the table, so the same
189
+ * numbers get read twice, once meaninglessly. One representation, and it is the real one.
190
+ *
191
+ * **It defaults to `true` in recharts 3, so declining it means saying so.** The clone below
192
+ * is that declaration, and it is done HERE rather than at four chart roots so a fifth chart
193
+ * cannot forget it. Two things it fixes at once: the UA focus ring the tabbable `<svg>` drew
194
+ * around the whole plot on click, and the `aria-hidden` + focusable contradiction that ring
195
+ * was the visible symptom of — a wrapper cannot hide something the tab order still reaches.
196
+ *
197
+ * `[&_:focus]:outline-none` covers what that clone CANNOT reach. recharts 3 renders its
198
+ * paint order as a stack of `<g class="recharts-zIndex-layer_*" tabindex="-1">` portals, and
199
+ * `tabindex="-1"` is set unconditionally — no prop turns it off. An SVG element does not get
200
+ * the mouse-focus exemption a `<div>` does, so a plain CLICK anywhere on the plot focuses
201
+ * whichever layer was hit and Chrome paints its UA ring (`auto 5px`) around that layer's
202
+ * bounding box: the whole plot rect on a cartesian chart, the hovered wedge's box on a pie.
203
+ * A blanket `:focus` reset is safe HERE and only here — the subtree is `aria-hidden`, holds
204
+ * nothing interactive, and nothing in it is reachable by keyboard to need a ring.
205
+ */
206
+ /*
207
+ * `min-w-0` is load-bearing beside a legend: a flex item's `min-width: auto` floors it at
208
+ * min-content, and `ResponsiveContainer` reports the width it is GIVEN, so without this the plot
209
+ * refuses to shrink and pushes the legend off the card instead.
210
+ */
211
+ /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: cn("[&_:focus]:outline-none", isBeside && legendNode && "min-w-0 flex-1"), style: { height }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { initialDimension: { width: 1, height: 1 }, width: "100%", height: "100%", children: React2.cloneElement(children(gradientId), { accessibilityLayer: false }) }) })
212
+ );
213
+ return /* @__PURE__ */ jsxs("figure", { "aria-label": ariaLabel, className: cn("m-0 w-full", className), children: [
214
+ legendNode ? /* @__PURE__ */ jsxs(
215
+ "div",
216
+ {
217
+ className: cn(
218
+ "flex",
219
+ isBeside ? cn("flex-row", LEGEND_GAP.vertical, legendAlign === "start" ? "items-start" : "items-center") : cn("flex-col", LEGEND_GAP.horizontal)
220
+ ),
221
+ children: [
222
+ isFirst ? /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: "shrink-0", children: legendNode }) : null,
223
+ plot,
224
+ isFirst ? null : /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: "shrink-0", children: legendNode })
225
+ ]
226
+ }
227
+ ) : plot,
228
+ table
229
+ ] });
230
+ }
231
+ function ChartLegendContent({ items, placement }) {
232
+ const isVertical = placement === "left" || placement === "right";
233
+ return /* @__PURE__ */ jsx("ul", { className: cn(LEGEND.list, isVertical ? LEGEND.vertical : LEGEND.horizontal), children: items.map((item, index) => /* @__PURE__ */ jsxs("li", { className: cn(LEGEND.item, item.colorClass), children: [
234
+ /* @__PURE__ */ jsx("span", { className: LEGEND.swatch }),
235
+ /* @__PURE__ */ jsx("span", { className: "text-tertiary", children: item.label })
236
+ ] }, `${item.label}-${index}`)) });
237
+ }
238
+ var keyOf = (entry, labels) => {
239
+ const datum = entry.payload?.["name"];
240
+ for (const candidate of [entry.dataKey, entry.name, datum]) {
241
+ const key = typeof candidate === "string" || typeof candidate === "number" ? String(candidate) : "";
242
+ if (key && labels[key] !== void 0) return key;
243
+ }
244
+ return String(datum ?? entry.name ?? entry.dataKey ?? "");
245
+ };
246
+ var APPEARANCE_FRAMES = 2;
247
+ function usePointerFollow(active) {
248
+ const ref = useRef(null);
249
+ useLayoutEffect(() => {
250
+ if (!active) return;
251
+ const wrapper = ref.current?.closest(".recharts-tooltip-wrapper");
252
+ if (!wrapper) return;
253
+ if (globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
254
+ wrapper.style.transition = "none";
255
+ let frame = 0;
256
+ let remaining = APPEARANCE_FRAMES;
257
+ const arm = () => {
258
+ if (remaining-- > 0) {
259
+ frame = requestAnimationFrame(arm);
260
+ return;
261
+ }
262
+ wrapper.style.transition = TOOLTIP_FOLLOW;
263
+ };
264
+ frame = requestAnimationFrame(arm);
265
+ return () => {
266
+ cancelAnimationFrame(frame);
267
+ wrapper.style.transition = "";
268
+ };
269
+ }, [active]);
270
+ return ref;
271
+ }
272
+ function ChartTooltipContent({ colors, labels, formatValue, formatLabel, tone = "surface", active, payload, label }) {
273
+ const ref = usePointerFollow(active === true);
274
+ if (!active || !payload || payload.length === 0) return null;
275
+ const t = TOOLTIP_TONE[tone];
276
+ const surface = cn(TOOLTIP.layout, t.surface);
277
+ const format = (value) => typeof value === "number" ? formatValue(value) : String(value ?? "");
278
+ if (payload.length === 1) {
279
+ const entry = payload[0];
280
+ const key = keyOf(entry, labels);
281
+ return /* @__PURE__ */ jsxs("div", { ref, className: surface, children: [
282
+ /* @__PURE__ */ jsx("p", { className: t.title, children: format(entry.value) }),
283
+ /* @__PURE__ */ jsx("p", { className: cn(TOOLTIP.row, t.supporting), children: labels[key] ?? key })
284
+ ] });
285
+ }
286
+ return /* @__PURE__ */ jsxs("div", { ref, className: surface, children: [
287
+ /* @__PURE__ */ jsx("p", { className: t.title, children: formatLabel ? formatLabel(label) : String(label ?? "") }),
288
+ payload.map((entry, index) => {
289
+ const key = keyOf(entry, labels);
290
+ return (
291
+ /* `colors[key]` comes LAST so tailwind-merge lets the series colour beat the tone's text
292
+ role: on this row the `text-*` is not type, it is what the `bg-current` swatch reads. The
293
+ tone's own colour is re-applied to the inner span, which IS type. */
294
+ /* @__PURE__ */ jsxs("p", { className: cn(TOOLTIP.row, t.supporting, colors[key]), children: [
295
+ /* @__PURE__ */ jsx("span", { className: TOOLTIP_SWATCH }),
296
+ /* @__PURE__ */ jsxs("span", { className: t.supporting, children: [
297
+ labels[key] ?? key,
298
+ ": ",
299
+ format(entry.value)
300
+ ] })
301
+ ] }, `${key}-${index}`)
302
+ );
303
+ })
304
+ ] });
305
+ }
306
+ function ChartDataTable({ caption, rowHeader, columns, rows }) {
307
+ return /* @__PURE__ */ jsx("div", { className: "sr-only", children: /* @__PURE__ */ jsxs("table", { children: [
308
+ caption ? /* @__PURE__ */ jsx("caption", { children: caption }) : null,
309
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
310
+ /* @__PURE__ */ jsx("th", { scope: "col", children: rowHeader }),
311
+ columns.map((column, i) => /* @__PURE__ */ jsx("th", { scope: "col", children: column }, `${column}-${i}`))
312
+ ] }) }),
313
+ /* @__PURE__ */ jsx("tbody", { children: rows.map((row, i) => /* @__PURE__ */ jsxs("tr", { children: [
314
+ /* @__PURE__ */ jsx("th", { scope: "row", children: row[0] }),
315
+ row.slice(1).map((cell, j) => /* @__PURE__ */ jsx("td", { children: cell }, j))
316
+ ] }, i)) })
317
+ ] }) });
318
+ }
319
+ var BRAND = [
320
+ "text-utility-brand-700",
321
+ "text-utility-brand-600",
322
+ "text-utility-brand-500",
323
+ "text-utility-brand-400",
324
+ "text-utility-brand-300",
325
+ "text-utility-brand-200"
326
+ ];
327
+ var CATEGORICAL = [
328
+ "text-utility-brand-600",
329
+ "text-utility-blue-600",
330
+ "text-utility-green-600",
331
+ "text-utility-amber-600",
332
+ "text-utility-red-600",
333
+ "text-utility-neutral-600"
334
+ ];
335
+ var EXPLICIT = {
336
+ brand: "text-utility-brand-600",
337
+ blue: "text-utility-blue-600",
338
+ green: "text-utility-green-600",
339
+ amber: "text-utility-amber-600",
340
+ red: "text-utility-red-600",
341
+ neutral: "text-utility-neutral-600"
342
+ };
343
+ var PALETTE_LENGTH = 6;
344
+ function seriesColorClass(color, index, palette) {
345
+ if (color) return EXPLICIT[color];
346
+ const ramp = palette === "categorical" ? CATEGORICAL : BRAND;
347
+ return ramp[index % ramp.length];
348
+ }
349
+ function useSeriesColors(component, total, resolve) {
350
+ React2.useEffect(() => {
351
+ if (total > PALETTE_LENGTH) {
352
+ devWarn(
353
+ `<${component}> has ${total} series but the palette has ${PALETTE_LENGTH} steps \u2014 colours repeat from series ${PALETTE_LENGTH + 1}. Give the extra series an explicit \`color\`, or plot fewer.`
354
+ );
355
+ }
356
+ }, [component, total]);
357
+ return React2.useMemo(() => Array.from({ length: total }, (_, i) => resolve(i)), [total, resolve]);
358
+ }
359
+ function useCartesianColors(component, series, palette) {
360
+ const resolve = React2.useCallback((i) => seriesColorClass(series[i]?.color, i, palette), [series, palette]);
361
+ return useSeriesColors(component, series.length, resolve);
362
+ }
363
+
364
+ export { ACTIVE_DOT, AREA_BAND, AREA_FILL_OPACITY, AREA_GRADIENT_STOPS, AREA_SOLID_OPACITY, AXIS, AXIS_LABEL, AXIS_TICK, BAND_SEPARATOR, BAR_LAYOUT, BAR_RADIUS, BAR_RADIUS_HORIZONTAL, CHART_ROOT, ChartDataTable, ChartFrame, ChartLegendContent, ChartTooltipContent, DOT, GRID, LINE_DASH, MARGIN, MAX_BAR_SIZE, NO_ANIMATION, PIE_DONUT, PIE_SIZE, POLAR_ANGLE_TICK, POLAR_ANGLE_TICK_LIFT, POLAR_HOVER, POLAR_RADIUS_PILL, POLAR_RADIUS_PILL_BASELINE, POLAR_RADIUS_PILL_HEIGHT, POLAR_RADIUS_PILL_PAD_X, POLAR_RADIUS_RINGS_DEFAULT, POLAR_ROOT, RADIAL_SIZE, RADIAL_TRACK, TOOLTIP_CURSOR, X_AXIS_PADDING, ZERO_LINE, formatNumber, seriesColorClass, useCartesianColors, useSeriesColors };
365
+ //# sourceMappingURL=chunk-75M43ELV.js.map
366
+ //# sourceMappingURL=chunk-75M43ELV.js.map
@@ -0,0 +1,10 @@
1
+ import { Cartesian } from './chunk-NA35YZRD.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ function LineChart({ curve = "monotone", dashed = false, dots = false, ...rest }) {
5
+ return /* @__PURE__ */ jsx(Cartesian, { ...rest, component: "LineChart", mark: { kind: "line", dashed, dots, curve } });
6
+ }
7
+
8
+ export { LineChart };
9
+ //# sourceMappingURL=chunk-763VS2FY.js.map
10
+ //# sourceMappingURL=chunk-763VS2FY.js.map
@@ -0,0 +1,26 @@
1
+ import { warnPositiveInt } from './chunk-QDYE5LVT.js';
2
+ import { cn } from './chunk-ZSNJ6UA3.js';
3
+ import 'react';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ // src/lib/skeleton.ts
7
+ var SKELETON_WIDTHS = ["w-3/5", "w-4/5", "w-2/3", "w-11/12", "w-1/2", "w-3/4"];
8
+ function skeletonWidth(index) {
9
+ return SKELETON_WIDTHS[index % SKELETON_WIDTHS.length];
10
+ }
11
+ var SHAPE = { bar: "rounded-lg", circle: "rounded-full" };
12
+ var TEXT_LINE = { sm: "h-3", md: "h-4", lg: "h-5" };
13
+ var BASE = "animate-pulse bg-tertiary motion-reduce:animate-none";
14
+ function Skeleton({ shape = "bar", className }) {
15
+ return /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: cn(BASE, SHAPE[shape], className) });
16
+ }
17
+ Skeleton.displayName = "Skeleton";
18
+ function SkeletonText({ lines = 3, size = "md", className }) {
19
+ warnPositiveInt("SkeletonText", "lines", lines);
20
+ return /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: cn("flex flex-col gap-2", className), children: Array.from({ length: Math.max(0, Math.floor(lines)) }, (_, index) => /* @__PURE__ */ jsx(Skeleton, { className: cn(TEXT_LINE[size], skeletonWidth(index)) }, index)) });
21
+ }
22
+ SkeletonText.displayName = "SkeletonText";
23
+
24
+ export { SKELETON_WIDTHS, Skeleton, SkeletonText, skeletonWidth };
25
+ //# sourceMappingURL=chunk-7HV6EIGZ.js.map
26
+ //# sourceMappingURL=chunk-7HV6EIGZ.js.map
@@ -0,0 +1,44 @@
1
+ import { ruleBox, rulePaint } from './chunk-LCG34A5T.js';
2
+ import { cn } from './chunk-ZSNJ6UA3.js';
3
+ import { Separator as Separator$1 } from '@base-ui/react/separator';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ var VERTICAL_LENGTH = {
7
+ sm: "h-3",
8
+ md: "h-5",
9
+ full: "self-stretch"
10
+ };
11
+ var BASE = "shrink-0 border-none";
12
+ function Separator(props) {
13
+ const {
14
+ orientation = "horizontal",
15
+ texture = "line",
16
+ tone = "default",
17
+ length = "md",
18
+ weight = "hairline",
19
+ decorative = false,
20
+ className,
21
+ render
22
+ } = props;
23
+ const axis = orientation === "horizontal" ? "y" : "x";
24
+ return /* @__PURE__ */ jsx(
25
+ Separator$1,
26
+ {
27
+ orientation,
28
+ render,
29
+ "aria-hidden": decorative || void 0,
30
+ className: cn(
31
+ BASE,
32
+ orientation === "horizontal" ? "w-full" : VERTICAL_LENGTH[length],
33
+ ruleBox(texture, axis, weight),
34
+ rulePaint({ texture, axis, tone, weight }),
35
+ className
36
+ )
37
+ }
38
+ );
39
+ }
40
+ Separator.displayName = "Separator";
41
+
42
+ export { Separator };
43
+ //# sourceMappingURL=chunk-7VLYQR4D.js.map
44
+ //# sourceMappingURL=chunk-7VLYQR4D.js.map
@@ -1,4 +1,4 @@
1
- import { warnNeedsName, warnRange, devWarn } from './chunk-GCVA3OIV.js';
1
+ import { warnNeedsName, warnRange, devWarn } from './chunk-QDYE5LVT.js';
2
2
  import { cn } from './chunk-ZSNJ6UA3.js';
3
3
  import 'react';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -67,5 +67,5 @@ function Progress(props) {
67
67
  }
68
68
 
69
69
  export { Progress };
70
- //# sourceMappingURL=chunk-D5BTFSL7.js.map
71
- //# sourceMappingURL=chunk-D5BTFSL7.js.map
70
+ //# sourceMappingURL=chunk-A46ED5JQ.js.map
71
+ //# sourceMappingURL=chunk-A46ED5JQ.js.map