@pglevy/sailwind 0.5.0 → 0.5.1

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 (50) hide show
  1. package/README.md +19 -2
  2. package/dist/components/Button/Button.stories.d.ts +13 -0
  3. package/dist/components/Button/Button.stories.d.ts.map +1 -1
  4. package/dist/components/Button/ButtonWidget.d.ts.map +1 -1
  5. package/dist/components/Button/ButtonWidget.js +67 -61
  6. package/dist/components/Card/Card.stories.d.ts +30 -0
  7. package/dist/components/Card/Card.stories.d.ts.map +1 -1
  8. package/dist/components/Checkbox/Checkbox.stories.d.ts +22 -0
  9. package/dist/components/Checkbox/Checkbox.stories.d.ts.map +1 -1
  10. package/dist/components/Checkbox/CheckboxField.js +63 -60
  11. package/dist/components/Dialog/Dialog.stories.d.ts +10 -0
  12. package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -1
  13. package/dist/components/Dropdown/Dropdown.stories.d.ts +10 -0
  14. package/dist/components/Dropdown/Dropdown.stories.d.ts.map +1 -1
  15. package/dist/components/Heading/Heading.stories.d.ts +29 -0
  16. package/dist/components/Heading/Heading.stories.d.ts.map +1 -1
  17. package/dist/components/MessageBanner/MessageBanner.stories.d.ts +20 -0
  18. package/dist/components/MessageBanner/MessageBanner.stories.d.ts.map +1 -1
  19. package/dist/components/Milestone/Milestone.stories.d.ts +17 -0
  20. package/dist/components/Milestone/Milestone.stories.d.ts.map +1 -1
  21. package/dist/components/Milestone/MilestoneField.d.ts.map +1 -1
  22. package/dist/components/Milestone/MilestoneField.js +43 -42
  23. package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
  24. package/dist/components/ProgressBar/ProgressBar.js +35 -34
  25. package/dist/components/ProgressBar/ProgressBar.stories.d.ts +13 -0
  26. package/dist/components/ProgressBar/ProgressBar.stories.d.ts.map +1 -1
  27. package/dist/components/RadioButton/RadioButton.stories.d.ts +22 -0
  28. package/dist/components/RadioButton/RadioButton.stories.d.ts.map +1 -1
  29. package/dist/components/ReadOnlyGrid/ReadOnlyGrid.js +54 -54
  30. package/dist/components/ReadOnlyGrid/ReadOnlyGrid.stories.d.ts +30 -0
  31. package/dist/components/ReadOnlyGrid/ReadOnlyGrid.stories.d.ts.map +1 -1
  32. package/dist/components/RichText/RichText.stories.d.ts +18 -0
  33. package/dist/components/RichText/RichText.stories.d.ts.map +1 -1
  34. package/dist/components/Slider/SliderField.d.ts.map +1 -1
  35. package/dist/components/Slider/SliderField.js +69 -68
  36. package/dist/components/Stamp/Stamp.stories.d.ts +24 -0
  37. package/dist/components/Stamp/Stamp.stories.d.ts.map +1 -1
  38. package/dist/components/Stamp/StampField.js +5 -5
  39. package/dist/components/Switch/Switch.stories.d.ts.map +1 -1
  40. package/dist/components/Tabs/Tabs.stories.d.ts +17 -0
  41. package/dist/components/Tabs/Tabs.stories.d.ts.map +1 -1
  42. package/dist/components/Tag/Tag.stories.d.ts +10 -0
  43. package/dist/components/Tag/Tag.stories.d.ts.map +1 -1
  44. package/dist/components/Tag/TagField.d.ts.map +1 -1
  45. package/dist/components/Tag/TagField.js +1 -0
  46. package/dist/components/TextField/TextField.stories.d.ts +10 -0
  47. package/dist/components/TextField/TextField.stories.d.ts.map +1 -1
  48. package/dist/components/Toggle/Toggle.stories.d.ts.map +1 -1
  49. package/dist/components/Toggle/ToggleField.js +20 -20
  50. package/package.json +16 -8
@@ -1,31 +1,31 @@
1
1
  import { jsx as t, jsxs as h, Fragment as we } from "react/jsx-runtime";
2
2
  import o from "react";
3
- import { ChevronsLeft as Re, ChevronLeft as $e, ChevronRight as ve, ChevronsRight as Ee, MoveUp as Le, MoveDown as Se } from "lucide-react";
3
+ import { ChevronsLeft as Re, ChevronLeft as $e, ChevronRight as ve, ChevronsRight as Se, MoveUp as Ee, MoveDown as Le } from "lucide-react";
4
4
  import { FieldWrapper as Ae } from "../shared/FieldWrapper.js";
5
5
  import { GridColumn as Oe } from "./GridColumn.js";
6
- function Te(n) {
6
+ function Te(s) {
7
7
  const i = [];
8
- return o.Children.forEach(n, (l) => {
8
+ return o.Children.forEach(s, (l) => {
9
9
  o.isValidElement(l) && l.type === Oe && i.push(l.props);
10
10
  }), i;
11
11
  }
12
- function Me(n, i, l) {
13
- if (n == null)
12
+ function Me(s, i, l) {
13
+ if (s == null)
14
14
  return null;
15
- if (typeof n == "string")
16
- return i[n] ?? null;
17
- if (typeof n == "function")
15
+ if (typeof s == "string")
16
+ return i[s] ?? null;
17
+ if (typeof s == "function")
18
18
  try {
19
- return n(i, l);
20
- } catch (S) {
21
- return console.warn("GridColumn value accessor threw an error:", S), null;
19
+ return s(i, l);
20
+ } catch (L) {
21
+ return console.warn("GridColumn value accessor threw an error:", L), null;
22
22
  }
23
23
  return null;
24
24
  }
25
- function He(n, i) {
26
- if (!n) return {};
27
- const l = typeof n == "function" ? n(i) : n;
28
- return !l || l === "NONE" ? {} : I[l] !== void 0 ? I[l] ? { className: I[l] } : {} : l.startsWith("#") ? { style: { backgroundColor: l } } : {};
25
+ function He(s, i) {
26
+ if (!s) return {};
27
+ const l = typeof s == "function" ? s(i) : s;
28
+ return !l || l === "NONE" ? {} : X[l] !== void 0 ? X[l] ? { className: X[l] } : {} : l.startsWith("#") ? { style: { backgroundColor: l } } : {};
29
29
  }
30
30
  const Ue = {
31
31
  SHORT: "max-h-40",
@@ -59,7 +59,7 @@ const Ue = {
59
59
  START: "text-left",
60
60
  CENTER: "text-center",
61
61
  END: "text-right"
62
- }, I = {
62
+ }, X = {
63
63
  NONE: "",
64
64
  ACCENT: "bg-blue-50",
65
65
  SUCCESS: "bg-green-50",
@@ -67,14 +67,14 @@ const Ue = {
67
67
  WARN: "bg-yellow-50",
68
68
  ERROR: "bg-red-50"
69
69
  }, We = ({
70
- label: n,
70
+ label: s,
71
71
  labelPosition: i,
72
72
  instructions: l,
73
- helpTooltip: S,
73
+ helpTooltip: L,
74
74
  emptyGridMessage: le = "No items available",
75
- data: X,
75
+ data: D,
76
76
  children: ae,
77
- pageSize: D = 10,
77
+ pageSize: k = 10,
78
78
  initialSorts: x,
79
79
  selectable: d,
80
80
  selectionStyle: m = "CHECKBOX",
@@ -85,32 +85,32 @@ const Ue = {
85
85
  borderStyle: ie = "LIGHT",
86
86
  shadeAlternateRows: de = !1,
87
87
  spacing: ce = "STANDARD",
88
- height: k = "AUTO",
89
- accessibilityText: F,
88
+ height: F = "AUTO",
89
+ accessibilityText: O,
90
90
  marginAbove: ue,
91
91
  marginBelow: he
92
92
  }) => {
93
- const ge = o.useId(), O = D > 0 ? D : 10, C = Array.isArray(X) ? X : [], [T, f] = o.useState(1), [p, W] = o.useState(null), [c, M] = o.useState(!0);
93
+ const ge = o.useId(), T = k > 0 ? k : 10, C = Array.isArray(D) ? D : [], [M, f] = o.useState(1), [p, W] = o.useState(null), [c, H] = o.useState(!0);
94
94
  o.useEffect(() => {
95
- x && x.length > 0 && (W(x[0].field), M(x[0].ascending));
95
+ x && x.length > 0 && (W(x[0].field), H(x[0].ascending));
96
96
  }, []), o.useEffect(() => {
97
97
  f(1);
98
98
  }, [C.length]);
99
99
  const pe = (e) => {
100
- p === e ? M((r) => !r) : (W(e), M(!0)), f(1);
101
- }, H = o.useMemo(
100
+ p === e ? H((r) => !r) : (W(e), H(!0)), f(1);
101
+ }, U = o.useMemo(
102
102
  () => C.map((e, r) => ({ ...e, __originalIndex: r })),
103
103
  [C]
104
- ), y = o.useMemo(() => p ? [...H].sort((e, r) => {
105
- const s = e[p], a = r[p];
106
- return s == null && a == null ? 0 : s == null ? c ? -1 : 1 : a == null ? c ? 1 : -1 : typeof s == "string" && typeof a == "string" ? c ? s.localeCompare(a) : a.localeCompare(s) : s < a ? c ? -1 : 1 : s > a ? c ? 1 : -1 : 0;
107
- }) : H, [H, p, c]);
104
+ ), N = o.useMemo(() => p ? [...U].sort((e, r) => {
105
+ const n = e[p], a = r[p];
106
+ return n == null && a == null ? 0 : n == null ? c ? -1 : 1 : a == null ? c ? 1 : -1 : typeof n == "string" && typeof a == "string" ? c ? n.localeCompare(a) : a.localeCompare(n) : n < a ? c ? -1 : 1 : n > a ? c ? 1 : -1 : 0;
107
+ }) : U, [U, p, c]);
108
108
  if (!oe)
109
109
  return null;
110
- const N = Te(ae).filter((e) => e.showWhen !== !1), w = ie === "STANDARD", fe = w ? "border border-gray-300" : "", me = w ? "border-b border-gray-300" : "border-b border-gray-200", be = w ? "border-b border-gray-300" : "border-b border-gray-200", u = w ? "border-r border-gray-300" : "", R = ce === "DENSE" ? "px-2 py-1" : "px-3 py-2", G = Ue[k] || "", z = k !== "AUTO" && G !== "", U = Math.ceil(y.length / O), $ = (T - 1) * O, B = Math.min($ + O, y.length), j = T > 1, K = T < U, q = y.slice($, B), J = (e) => e.id !== void 0 ? e.id : e.__originalIndex, Q = (e) => {
110
+ const y = Te(ae).filter((e) => e.showWhen !== !1), w = ie === "STANDARD", fe = w ? "border border-gray-300" : "", me = w ? "border-b border-gray-300" : "border-b border-gray-200", be = w ? "border-b border-gray-300" : "border-b border-gray-200", u = w ? "border-r border-gray-300" : "", R = ce === "DENSE" ? "px-2 py-1" : "px-3 py-2", G = Ue[F] || "", z = F !== "AUTO" && G !== "", _ = Math.ceil(N.length / T), $ = (M - 1) * T, B = Math.min($ + T, N.length), j = M > 1, K = M < _, q = N.slice($, B), J = (e) => e.id !== void 0 ? e.id : e.__originalIndex, Q = (e) => {
111
111
  if (!b) return;
112
- const s = g.includes(e) ? g.filter((a) => a !== e) : [...g, e];
113
- b(s);
112
+ const n = g.includes(e) ? g.filter((a) => a !== e) : [...g, e];
113
+ b(n);
114
114
  }, v = d ? q.map((e) => J(e)) : [], Y = d && v.length > 0 && v.every((e) => g.includes(e)), xe = () => {
115
115
  if (b)
116
116
  if (Y)
@@ -125,7 +125,7 @@ const Ue = {
125
125
  "table",
126
126
  {
127
127
  className: `w-full border-collapse ${fe}`,
128
- "aria-label": F,
128
+ "aria-label": O,
129
129
  children: [
130
130
  /* @__PURE__ */ t("thead", { className: z ? "sticky top-0 bg-white z-10" : void 0, children: /* @__PURE__ */ h("tr", { className: me, children: [
131
131
  d && m === "CHECKBOX" && /* @__PURE__ */ t("th", { className: `${R} w-10${u ? ` ${u}` : ""}`, children: /* @__PURE__ */ t(
@@ -137,12 +137,12 @@ const Ue = {
137
137
  "aria-label": "Select all rows"
138
138
  }
139
139
  ) }),
140
- N.map((e, r) => {
141
- const s = Z(e), a = V(e), E = !(r === N.length - 1) && u ? ` ${u}` : "";
140
+ y.map((e, r) => {
141
+ const n = Z(e), a = V(e), S = !(r === y.length - 1) && u ? ` ${u}` : "";
142
142
  return /* @__PURE__ */ t(
143
143
  "th",
144
144
  {
145
- className: `${R} ${a} text-sm font-semibold text-base${s ? ` ${s}` : ""}${E}`,
145
+ className: `${R} ${a} text-sm font-semibold text-base${n ? ` ${n}` : ""}${S}`,
146
146
  "aria-sort": p === e.sortField ? c ? "ascending" : "descending" : void 0,
147
147
  children: e.sortField ? /* @__PURE__ */ h(
148
148
  "button",
@@ -152,7 +152,7 @@ const Ue = {
152
152
  className: "flex items-center gap-1 hover:text-gray-900 cursor-pointer",
153
153
  children: [
154
154
  e.label ?? "",
155
- p === e.sortField && /* @__PURE__ */ t("span", { "aria-hidden": "true", children: c ? /* @__PURE__ */ t(Le, { size: 14 }) : /* @__PURE__ */ t(Se, { size: 14 }) })
155
+ p === e.sortField && /* @__PURE__ */ t("span", { "aria-hidden": "true", children: c ? /* @__PURE__ */ t(Ee, { size: 14 }) : /* @__PURE__ */ t(Le, { size: 14 }) })
156
156
  ]
157
157
  }
158
158
  ) : e.label ?? ""
@@ -162,30 +162,30 @@ const Ue = {
162
162
  })
163
163
  ] }) }),
164
164
  /* @__PURE__ */ t("tbody", { children: q.map((e, r) => {
165
- const s = J(e), a = d && g.includes(s), _ = d && m === "ROW_HIGHLIGHT" && a, E = de && r % 2 === 0 && !_ ? "bg-gray-50" : "";
165
+ const n = J(e), a = d && g.includes(n), I = d && m === "ROW_HIGHLIGHT" && a, S = de && r % 2 === 0 && !I ? "bg-gray-50" : "";
166
166
  return /* @__PURE__ */ h(
167
167
  "tr",
168
168
  {
169
- className: `${be}${d && m === "ROW_HIGHLIGHT" ? " cursor-pointer" : ""}${_ ? " bg-blue-50" : ""}${E ? ` ${E}` : ""}`,
170
- onClick: d && m === "ROW_HIGHLIGHT" ? () => Q(s) : void 0,
169
+ className: `${be}${d && m === "ROW_HIGHLIGHT" ? " cursor-pointer" : ""}${I ? " bg-blue-50" : ""}${S ? ` ${S}` : ""}`,
170
+ onClick: d && m === "ROW_HIGHLIGHT" ? () => Q(n) : void 0,
171
171
  children: [
172
172
  d && m === "CHECKBOX" && /* @__PURE__ */ t("td", { className: `${R} w-10${u ? ` ${u}` : ""}`, children: /* @__PURE__ */ t(
173
173
  "input",
174
174
  {
175
175
  type: "checkbox",
176
176
  checked: a || !1,
177
- onChange: () => Q(s),
177
+ onChange: () => Q(n),
178
178
  "aria-label": `Select row ${r + 1}`
179
179
  }
180
180
  ) }),
181
- N.map((L, te) => {
182
- const re = Z(L), ye = V(L), P = He(L.backgroundColor, e), Ne = !(te === N.length - 1) && u ? ` ${u}` : "";
181
+ y.map((E, te) => {
182
+ const re = Z(E), Ne = V(E), P = He(E.backgroundColor, e), ye = !(te === y.length - 1) && u ? ` ${u}` : "";
183
183
  return /* @__PURE__ */ t(
184
184
  "td",
185
185
  {
186
- className: `${R} ${ye} text-sm text-gray-900${re ? ` ${re}` : ""}${P.className ? ` ${P.className}` : ""}${Ne}`,
186
+ className: `${R} ${Ne} text-sm text-gray-900${re ? ` ${re}` : ""}${P.className ? ` ${P.className}` : ""}${ye}`,
187
187
  style: P.style,
188
- children: Me(L.value, e, $ + r)
188
+ children: Me(E.value, e, $ + r)
189
189
  },
190
190
  te
191
191
  );
@@ -201,18 +201,18 @@ const Ue = {
201
201
  return /* @__PURE__ */ t(
202
202
  Ae,
203
203
  {
204
- label: n,
204
+ label: s,
205
205
  labelPosition: i,
206
206
  instructions: l,
207
- helpTooltip: S,
208
- accessibilityText: F,
207
+ helpTooltip: L,
208
+ accessibilityText: O,
209
209
  inputId: ge,
210
210
  marginAbove: ue,
211
211
  marginBelow: he,
212
212
  footer: Ce,
213
213
  children: C.length === 0 ? /* @__PURE__ */ t("div", { className: "text-gray-500 py-4 text-center", children: le }) : /* @__PURE__ */ h(we, { children: [
214
- z ? /* @__PURE__ */ t("div", { className: `${G} overflow-y-auto`, children: ee() }) : ee(),
215
- U > 1 && /* @__PURE__ */ h("div", { className: "flex items-center justify-end gap-2 px-3 py-2 text-sm text-gray-700", children: [
214
+ z ? /* @__PURE__ */ t("div", { className: `${G} overflow-y-auto`, tabIndex: 0, role: "region", "aria-label": O || s || "Scrollable grid", children: ee() }) : ee(),
215
+ _ > 1 && /* @__PURE__ */ h("div", { className: "flex items-center justify-end gap-2 px-3 py-2 text-sm text-gray-700", children: [
216
216
  /* @__PURE__ */ t(
217
217
  "button",
218
218
  {
@@ -243,7 +243,7 @@ const Ue = {
243
243
  ] }),
244
244
  " ",
245
245
  "of ",
246
- y.length
246
+ N.length
247
247
  ] }),
248
248
  /* @__PURE__ */ t(
249
249
  "button",
@@ -259,12 +259,12 @@ const Ue = {
259
259
  /* @__PURE__ */ t(
260
260
  "button",
261
261
  {
262
- onClick: () => f(U),
262
+ onClick: () => f(_),
263
263
  disabled: !K,
264
264
  "aria-label": "Last page",
265
265
  title: "Last page",
266
266
  className: "px-1 py-1 disabled:text-gray-300 disabled:cursor-not-allowed text-blue-700 hover:text-blue-900 cursor-pointer",
267
- children: /* @__PURE__ */ t(Ee, { size: 18 })
267
+ children: /* @__PURE__ */ t(Se, { size: 18 })
268
268
  }
269
269
  )
270
270
  ] })
@@ -7,6 +7,36 @@ declare const meta: {
7
7
  parameters: {
8
8
  layout: string;
9
9
  };
10
+ argTypes: {
11
+ borderStyle: {
12
+ control: "select";
13
+ options: string[];
14
+ };
15
+ spacing: {
16
+ control: "select";
17
+ options: string[];
18
+ };
19
+ height: {
20
+ control: "select";
21
+ options: string[];
22
+ };
23
+ selectionStyle: {
24
+ control: "select";
25
+ options: string[];
26
+ };
27
+ labelPosition: {
28
+ control: "select";
29
+ options: string[];
30
+ };
31
+ marginAbove: {
32
+ control: "select";
33
+ options: string[];
34
+ };
35
+ marginBelow: {
36
+ control: "select";
37
+ options: string[];
38
+ };
39
+ };
10
40
  };
11
41
  export default meta;
12
42
  type Story = StoryObj<typeof meta>;
@@ -1 +1 @@
1
- {"version":3,"file":"ReadOnlyGrid.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ReadOnlyGrid/ReadOnlyGrid.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAmB3D,QAAA,MAAM,IAAI;;;;;;;CAK2B,CAAA;AAErC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,iDAAiD;AACjD,eAAO,MAAM,OAAO,EAAE,KASrB,CAAA;AAED,qDAAqD;AACrD,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAA;AAED,2EAA2E;AAC3E,eAAO,MAAM,UAAU,EAAE,KASxB,CAAA;AAED,+EAA+E;AAC/E,eAAO,MAAM,WAAW,EAAE,KAazB,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,EAAE,KAgBnC,CAAA;AAED,mEAAmE;AACnE,eAAO,MAAM,yBAAyB,EAAE,KAiBvC,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,UAAU,EAAE,KAcxB,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,WAAW,EAAE,KASzB,CAAA;AAED,iFAAiF;AACjF,eAAO,MAAM,uBAAuB,EAAE,KAcrC,CAAA;AAED,0EAA0E;AAC1E,eAAO,MAAM,wBAAwB,EAAE,KAStC,CAAA;AAED,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,EAAE,KAwB9B,CAAA"}
1
+ {"version":3,"file":"ReadOnlyGrid.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ReadOnlyGrid/ReadOnlyGrid.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAoB3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAc2B,CAAA;AAErC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,iDAAiD;AACjD,eAAO,MAAM,OAAO,EAAE,KAarB,CAAA;AAED,qDAAqD;AACrD,eAAO,MAAM,UAAU,EAAE,KAYxB,CAAA;AAED,2EAA2E;AAC3E,eAAO,MAAM,UAAU,EAAE,KAuBxB,CAAA;AAED,+EAA+E;AAC/E,eAAO,MAAM,WAAW,EAAE,KAczB,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,EAAE,KAgBnC,CAAA;AAED,mEAAmE;AACnE,eAAO,MAAM,yBAAyB,EAAE,KAgBvC,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,UAAU,EAAE,KAexB,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,WAAW,EAAE,KAazB,CAAA;AAED,iFAAiF;AACjF,eAAO,MAAM,uBAAuB,EAAE,KAerC,CAAA;AAED,0EAA0E;AAC1E,eAAO,MAAM,wBAAwB,EAAE,KAYtC,CAAA;AAED,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,EAAE,KA2B9B,CAAA"}
@@ -6,6 +6,24 @@ declare const meta: {
6
6
  parameters: {
7
7
  layout: string;
8
8
  };
9
+ argTypes: {
10
+ align: {
11
+ control: "select";
12
+ options: string[];
13
+ };
14
+ labelPosition: {
15
+ control: "select";
16
+ options: string[];
17
+ };
18
+ marginAbove: {
19
+ control: "select";
20
+ options: string[];
21
+ };
22
+ marginBelow: {
23
+ control: "select";
24
+ options: string[];
25
+ };
26
+ };
9
27
  };
10
28
  export default meta;
11
29
  type Story = StoryObj<typeof meta>;
@@ -1 +1 @@
1
- {"version":3,"file":"RichText.stories.d.ts","sourceRoot":"","sources":["../../../src/components/RichText/RichText.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAK3D,QAAA,MAAM,IAAI;;;;;;;CAKmC,CAAA;AAE7C,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAuBlC,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,KAexB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAuB9B,CAAA;AAED,eAAO,MAAM,yBAAyB,EAAE,KAwBvC,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAgB7B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAoB3B,CAAA"}
1
+ {"version":3,"file":"RichText.stories.d.ts","sourceRoot":"","sources":["../../../src/components/RichText/RichText.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAK3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;CAWmC,CAAA;AAE7C,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAqBlC,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAaxB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAqB9B,CAAA;AAED,eAAO,MAAM,yBAAyB,EAAE,KAsBvC,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,K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AE,CAAC,gBAAgB,CA0NlD,CAAA"}
@@ -3,60 +3,60 @@ import "react";
3
3
  import * as n from "@radix-ui/react-slider";
4
4
  import { FieldWrapper as W } from "../shared/FieldWrapper.js";
5
5
  const Y = ({
6
- label: b,
7
- instructions: m,
8
- required: f = !1,
9
- disabled: d = !1,
10
- value: h = 50,
11
- min: A = 0,
6
+ label: h,
7
+ instructions: f,
8
+ required: A = !1,
9
+ disabled: g = !1,
10
+ value: d = 50,
11
+ min: N = 0,
12
12
  max: v = 100,
13
13
  step: E = 1,
14
- validations: N = [],
14
+ validations: w = [],
15
15
  saveInto: I,
16
16
  onChange: O,
17
17
  validationGroup: F,
18
- requiredMessage: w,
19
- labelPosition: y = "ABOVE",
20
- helpTooltip: L,
21
- accessibilityText: C,
22
- showWhen: x = !0,
18
+ requiredMessage: C,
19
+ labelPosition: L = "ABOVE",
20
+ helpTooltip: y,
21
+ accessibilityText: i,
22
+ showWhen: S = !0,
23
23
  marginAbove: V = "NONE",
24
24
  marginBelow: D = "STANDARD",
25
- size: g = "STANDARD",
26
- color: o = "ACCENT",
27
- orientation: e = "HORIZONTAL",
28
- showValue: S = !1,
29
- formatValue: i = (s) => s.toString()
25
+ size: c = "STANDARD",
26
+ color: l = "ACCENT",
27
+ orientation: r = "HORIZONTAL",
28
+ showValue: k = !1,
29
+ formatValue: u = (o) => o.toString()
30
30
  }) => {
31
- if (!x) return null;
32
- const s = `sliderfield-${Math.random().toString(36).substr(2, 9)}`, a = Array.isArray(h) ? h : [h], R = Array.isArray(h), c = {
31
+ if (!S) return null;
32
+ const o = `sliderfield-${Math.random().toString(36).substr(2, 9)}`, s = Array.isArray(d) ? d : [d], R = Array.isArray(d), b = {
33
33
  SMALL: {
34
- track: e === "HORIZONTAL" ? "h-1" : "w-1",
34
+ track: r === "HORIZONTAL" ? "h-1" : "w-1",
35
35
  thumb: "h-4 w-4",
36
- height: e === "VERTICAL" ? "h-32" : void 0
36
+ height: r === "VERTICAL" ? "h-32" : void 0
37
37
  },
38
38
  STANDARD: {
39
- track: e === "HORIZONTAL" ? "h-2" : "w-2",
39
+ track: r === "HORIZONTAL" ? "h-2" : "w-2",
40
40
  thumb: "h-5 w-5",
41
- height: e === "VERTICAL" ? "h-40" : void 0
41
+ height: r === "VERTICAL" ? "h-40" : void 0
42
42
  },
43
43
  MEDIUM: {
44
- track: e === "HORIZONTAL" ? "h-3" : "w-3",
44
+ track: r === "HORIZONTAL" ? "h-3" : "w-3",
45
45
  thumb: "h-6 w-6",
46
- height: e === "VERTICAL" ? "h-48" : void 0
46
+ height: r === "VERTICAL" ? "h-48" : void 0
47
47
  },
48
48
  LARGE: {
49
- track: e === "HORIZONTAL" ? "h-4" : "w-4",
49
+ track: r === "HORIZONTAL" ? "h-4" : "w-4",
50
50
  thumb: "h-8 w-8",
51
- height: e === "VERTICAL" ? "h-56" : void 0
51
+ height: r === "VERTICAL" ? "h-56" : void 0
52
52
  }
53
53
  }, T = (() => {
54
- if (o.startsWith("#"))
54
+ if (l.startsWith("#"))
55
55
  return {
56
56
  range: "",
57
57
  thumb: "border-2 border-white shadow-lg"
58
58
  };
59
- const r = {
59
+ const e = {
60
60
  ACCENT: {
61
61
  range: "bg-blue-500",
62
62
  thumb: "bg-blue-500 border-2 border-white shadow-lg hover:bg-blue-700 focus:bg-blue-700"
@@ -74,37 +74,37 @@ const Y = ({
74
74
  thumb: "bg-gray-700 border-2 border-white shadow-lg hover:bg-gray-900 focus:bg-gray-900"
75
75
  }
76
76
  };
77
- return r[o] || r.ACCENT;
78
- })(), k = (r) => {
79
- const l = O || I;
80
- l && !d && l(R ? r : r[0]);
81
- }, u = N.length > 0, j = f && a.every((r) => r === A) && w, H = () => R ? `${i(a[0])} - ${i(a[1])}` : i(a[0]), Z = /* @__PURE__ */ t("div", { className: e === "VERTICAL" ? "flex justify-center" : "", children: /* @__PURE__ */ p(
77
+ return e[l] || e.ACCENT;
78
+ })(), x = (e) => {
79
+ const a = O || I;
80
+ a && !g && a(R ? e : e[0]);
81
+ }, m = w.length > 0, j = A && s.every((e) => e === N) && C, $ = () => R ? `${u(s[0])} - ${u(s[1])}` : u(s[0]), H = /* @__PURE__ */ t("div", { className: r === "VERTICAL" ? "flex justify-center" : "", children: /* @__PURE__ */ p(
82
82
  n.Root,
83
83
  {
84
- id: s,
85
- value: a,
86
- onValueChange: k,
87
- min: A,
84
+ id: o,
85
+ value: s,
86
+ onValueChange: x,
87
+ min: N,
88
88
  max: v,
89
89
  step: E,
90
- disabled: d,
91
- orientation: e.toLowerCase(),
90
+ disabled: g,
91
+ orientation: r.toLowerCase(),
92
92
  className: [
93
93
  "relative flex items-center select-none touch-none",
94
- e === "HORIZONTAL" ? "w-full" : c[g].height,
95
- d && "opacity-50 cursor-not-allowed"
94
+ r === "HORIZONTAL" ? "w-full" : b[c].height,
95
+ g && "opacity-50 cursor-not-allowed"
96
96
  ].filter(Boolean).join(" "),
97
- "aria-label": C || b,
98
- "aria-describedby": m ? `${s}-instructions` : void 0,
99
- "aria-invalid": u,
100
- "aria-errormessage": u ? `${s}-error` : void 0,
97
+ "aria-label": i || h,
98
+ "aria-describedby": f ? `${o}-instructions` : void 0,
99
+ "aria-invalid": m,
100
+ "aria-errormessage": m ? `${o}-error` : void 0,
101
101
  children: [
102
102
  /* @__PURE__ */ t(
103
103
  n.Track,
104
104
  {
105
105
  className: [
106
106
  "relative grow rounded-full bg-gray-200",
107
- c[g].track
107
+ b[c].track
108
108
  ].join(" "),
109
109
  children: /* @__PURE__ */ t(
110
110
  n.Range,
@@ -112,50 +112,51 @@ const Y = ({
112
112
  className: [
113
113
  "absolute rounded-full",
114
114
  T.range,
115
- e === "HORIZONTAL" ? "h-full" : "w-full"
115
+ r === "HORIZONTAL" ? "h-full" : "w-full"
116
116
  ].join(" "),
117
- style: o.startsWith("#") ? { backgroundColor: o } : void 0
117
+ style: l.startsWith("#") ? { backgroundColor: l } : void 0
118
118
  }
119
119
  )
120
120
  }
121
121
  ),
122
- a.map((r, l) => /* @__PURE__ */ t(
122
+ s.map((e, a) => /* @__PURE__ */ t(
123
123
  n.Thumb,
124
124
  {
125
125
  className: [
126
126
  "block rounded-full transition-colors",
127
- c[g].thumb,
127
+ b[c].thumb,
128
128
  T.thumb,
129
129
  "focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
130
130
  ].join(" "),
131
- style: o.startsWith("#") ? { backgroundColor: o } : void 0
131
+ style: l.startsWith("#") ? { backgroundColor: l } : void 0,
132
+ "aria-label": s.length > 1 ? `${h || "Slider"} thumb ${a + 1}` : i || h || "Slider"
132
133
  },
133
- l
134
+ a
134
135
  ))
135
136
  ]
136
137
  }
137
- ) }), M = S && /* @__PURE__ */ t("div", { className: [
138
+ ) }), Z = k && /* @__PURE__ */ t("div", { className: [
138
139
  "text-sm text-gray-700 mt-2",
139
- e === "VERTICAL" ? "text-center" : ""
140
- ].join(" "), children: H() }), $ = /* @__PURE__ */ p(G, { children: [
141
- M,
142
- u && /* @__PURE__ */ t("div", { id: `${s}-error`, className: "mt-2", role: "alert", children: N.map((r, l) => /* @__PURE__ */ t("p", { className: "text-sm text-red-700", children: r }, l)) }),
143
- j && /* @__PURE__ */ t("p", { className: "text-sm text-red-700 mt-2", role: "alert", children: w })
140
+ r === "VERTICAL" ? "text-center" : ""
141
+ ].join(" "), children: $() }), M = /* @__PURE__ */ p(G, { children: [
142
+ Z,
143
+ m && /* @__PURE__ */ t("div", { id: `${o}-error`, className: "mt-2", role: "alert", children: w.map((e, a) => /* @__PURE__ */ t("p", { className: "text-sm text-red-700", children: e }, a)) }),
144
+ j && /* @__PURE__ */ t("p", { className: "text-sm text-red-700 mt-2", role: "alert", children: C })
144
145
  ] });
145
146
  return /* @__PURE__ */ t(
146
147
  W,
147
148
  {
148
- label: b,
149
- labelPosition: y,
150
- required: f,
151
- instructions: m,
152
- helpTooltip: L,
153
- accessibilityText: C,
154
- inputId: s,
149
+ label: h,
150
+ labelPosition: L,
151
+ required: A,
152
+ instructions: f,
153
+ helpTooltip: y,
154
+ accessibilityText: i,
155
+ inputId: o,
155
156
  marginAbove: V,
156
157
  marginBelow: D,
157
- footer: $,
158
- children: Z
158
+ footer: M,
159
+ children: H
159
160
  }
160
161
  );
161
162
  };
@@ -6,6 +6,30 @@ declare const meta: {
6
6
  parameters: {
7
7
  layout: string;
8
8
  };
9
+ argTypes: {
10
+ size: {
11
+ control: "select";
12
+ options: string[];
13
+ };
14
+ shape: {
15
+ control: "select";
16
+ options: string[];
17
+ };
18
+ align: {
19
+ control: "select";
20
+ options: string[];
21
+ };
22
+ labelPosition: {
23
+ control: "select";
24
+ options: string[];
25
+ };
26
+ backgroundColor: {
27
+ control: "text";
28
+ };
29
+ contentColor: {
30
+ control: "text";
31
+ };
32
+ };
9
33
  };
10
34
  export default meta;
11
35
  type Story = StoryObj<typeof meta>;
@@ -1 +1 @@
1
- {"version":3,"file":"Stamp.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Stamp/Stamp.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG3D,QAAA,MAAM,IAAI;;;;;;;CAKyB,CAAA;AAEnC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAQ5B,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,KAOnC,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KASnB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,KAWtC,CAAA"}
1
+ {"version":3,"file":"Stamp.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Stamp/Stamp.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAayB,CAAA;AAEnC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAQ5B,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,KAOnC,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KASnB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,KAWtC,CAAA"}
@@ -3,7 +3,7 @@ import "react";
3
3
  import * as s from "lucide-react";
4
4
  const q = ({
5
5
  label: m,
6
- labelPosition: D = "ABOVE",
6
+ labelPosition: g = "ABOVE",
7
7
  instructions: p,
8
8
  helpTooltip: A,
9
9
  icon: c,
@@ -12,7 +12,7 @@ const q = ({
12
12
  contentColor: i = "STANDARD",
13
13
  size: n = "MEDIUM",
14
14
  align: u = "CENTER",
15
- tooltip: g,
15
+ tooltip: D,
16
16
  showWhen: C = !0,
17
17
  accessibilityText: N,
18
18
  link: o,
@@ -142,8 +142,8 @@ const q = ({
142
142
  {
143
143
  className: B,
144
144
  style: G,
145
- title: g,
146
- role: o ? "button" : void 0,
145
+ title: D,
146
+ role: o ? "button" : "img",
147
147
  tabIndex: o ? 0 : void 0,
148
148
  "aria-label": N || l || `${c} stamp`,
149
149
  children: Y()
@@ -152,7 +152,7 @@ const q = ({
152
152
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), o?.onClick?.());
153
153
  }, children: T }) : T;
154
154
  return /* @__PURE__ */ d("div", { className: _, children: [
155
- !m || D === "COLLAPSED" ? N ? /* @__PURE__ */ a("span", { className: "sr-only", children: m || N }) : null : /* @__PURE__ */ d("label", { className: "text-base font-medium text-gray-900 block mb-2", children: [
155
+ !m || g === "COLLAPSED" ? N ? /* @__PURE__ */ a("span", { className: "sr-only", children: m || N }) : null : /* @__PURE__ */ d("label", { className: "text-base font-medium text-gray-900 block mb-2", children: [
156
156
  m,
157
157
  A && /* @__PURE__ */ a(
158
158
  "span",
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAI3D,QAAA,MAAM,IAAI;;;;;;;CAK0B,CAAA;AAEpC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KASvB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAW9B,CAAA;AAGD,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAM3B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAM3B,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAM3B,CAAA"}
1
+ {"version":3,"file":"Switch.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAK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