@ogcio/design-system-react 1.12.0 → 1.12.2

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 (39) hide show
  1. package/dist/accordion/accordion-item.js +1 -1
  2. package/dist/alert/alert.js +1 -1
  3. package/dist/autocomplete/autocomplete.js +4 -4
  4. package/dist/button-group/button-group.js +44 -44
  5. package/dist/card/card-next.js +28 -28
  6. package/dist/combo-box/dropdown-item.js +30 -30
  7. package/dist/drawer/drawer.content.js +6 -6
  8. package/dist/drawer/drawer.js +8 -8
  9. package/dist/error-text/error-text.js +1 -1
  10. package/dist/forms/form-field/form-field.js +1 -1
  11. package/dist/forms/form-field-with-tag/form-field-with-tag.js +1 -1
  12. package/dist/heading/heading.js +1 -1
  13. package/dist/hint-text/hint-text.js +1 -1
  14. package/dist/icon/icon.js +32 -32
  15. package/dist/{index-CB-zPpNk.js → index-DNkhmzZp.js} +44 -44
  16. package/dist/index-ntYL1VRC.js +64 -0
  17. package/dist/input-checkbox/input-checkbox.js +13 -13
  18. package/dist/input-password/input-password.d.ts +2 -1
  19. package/dist/input-password/input-password.js +30 -26
  20. package/dist/input-radio/input-radio.js +15 -15
  21. package/dist/label/label.js +1 -1
  22. package/dist/link/link.js +1 -1
  23. package/dist/list/list.js +2 -2
  24. package/dist/modal/modal.content.js +1 -1
  25. package/dist/modal/modal.js +3 -3
  26. package/dist/popover/popover.js +466 -464
  27. package/dist/primitives/anchor.js +1 -1
  28. package/dist/progress-bar/progress-bar.js +8 -8
  29. package/dist/progress-stepper/progress-stepper.js +10 -10
  30. package/dist/score-select/score-select.js +29 -29
  31. package/dist/side-nav/side-nav.js +23 -23
  32. package/dist/spinner/spinner.js +1 -1
  33. package/dist/stack/stack.js +2 -2
  34. package/dist/table/table.js +1 -1
  35. package/dist/textarea/textarea.js +7 -7
  36. package/dist/toast/ds-toast.js +1 -1
  37. package/dist/tooltip/tooltip.js +1 -1
  38. package/package.json +5 -6
  39. package/dist/index-2sRBqKFV.js +0 -78
package/dist/icon/icon.js CHANGED
@@ -1,20 +1,20 @@
1
1
  "use client";
2
- import { jsx as e } from "react/jsx-runtime";
2
+ import { jsx as s } from "react/jsx-runtime";
3
3
  import { cn as a } from "../cn.js";
4
- import b from "./svgs/bluesky.js";
5
- import u from "./svgs/facebook.js";
4
+ import u from "./svgs/bluesky.js";
5
+ import b from "./svgs/facebook.js";
6
6
  import y from "./svgs/instagram.js";
7
7
  import z from "./svgs/linkedin.js";
8
8
  import N from "./svgs/placeholder.js";
9
9
  import h from "./svgs/threads.js";
10
10
  import x from "./svgs/tiktok.js";
11
- import _ from "./svgs/x.js";
12
- import n from "./svgs/youtube.js";
13
- function j({
11
+ import n from "./svgs/x.js";
12
+ import _ from "./svgs/youtube.js";
13
+ function v({
14
14
  icon: t,
15
15
  size: g = "md",
16
16
  filled: c,
17
- disabled: s,
17
+ disabled: e,
18
18
  ariaHidden: l,
19
19
  ariaLabel: i,
20
20
  inline: r = !1,
@@ -38,115 +38,115 @@ function j({
38
38
  }
39
39
  }
40
40
  if (t === "social_bluesky")
41
- return /* @__PURE__ */ e(
42
- b,
41
+ return /* @__PURE__ */ s(
42
+ u,
43
43
  {
44
44
  size: o,
45
45
  className: a({
46
46
  "gi-block": !r,
47
47
  "gi-inline-block": r,
48
- "gi-stroke-gray-700": s
48
+ "gi-stroke-gray-700": e
49
49
  })
50
50
  }
51
51
  );
52
52
  if (t === "social_facebook")
53
- return /* @__PURE__ */ e(
54
- u,
53
+ return /* @__PURE__ */ s(
54
+ b,
55
55
  {
56
56
  size: o,
57
57
  className: a({
58
58
  "gi-block": !r,
59
59
  "gi-inline-block": r,
60
- "gi-stroke-gray-700": s
60
+ "gi-stroke-gray-700": e
61
61
  })
62
62
  }
63
63
  );
64
64
  if (t === "social_instagram")
65
- return /* @__PURE__ */ e(
65
+ return /* @__PURE__ */ s(
66
66
  y,
67
67
  {
68
68
  size: o,
69
69
  className: a({
70
70
  "gi-block": !r,
71
71
  "gi-inline-block": r,
72
- "gi-stroke-gray-700": s
72
+ "gi-stroke-gray-700": e
73
73
  })
74
74
  }
75
75
  );
76
76
  if (t === "social_linkedin")
77
- return /* @__PURE__ */ e(
77
+ return /* @__PURE__ */ s(
78
78
  z,
79
79
  {
80
80
  size: o,
81
81
  className: a({
82
82
  "gi-block": !r,
83
83
  "gi-inline-block": r,
84
- "gi-stroke-gray-700": s
84
+ "gi-stroke-gray-700": e
85
85
  })
86
86
  }
87
87
  );
88
88
  if (t === "social_threads")
89
- return /* @__PURE__ */ e(
89
+ return /* @__PURE__ */ s(
90
90
  h,
91
91
  {
92
92
  size: o,
93
93
  className: a({
94
94
  "gi-block": !r,
95
95
  "gi-inline-block": r,
96
- "gi-stroke-gray-700": s
96
+ "gi-stroke-gray-700": e
97
97
  })
98
98
  }
99
99
  );
100
100
  if (t === "social_tiktok")
101
- return /* @__PURE__ */ e(
101
+ return /* @__PURE__ */ s(
102
102
  x,
103
103
  {
104
104
  size: o,
105
105
  className: a({
106
106
  "gi-block": !r,
107
107
  "gi-inline-block": r,
108
- "gi-stroke-gray-700": s
108
+ "gi-stroke-gray-700": e
109
109
  })
110
110
  }
111
111
  );
112
112
  if (t === "social_x")
113
- return /* @__PURE__ */ e(
114
- _,
113
+ return /* @__PURE__ */ s(
114
+ n,
115
115
  {
116
116
  size: o,
117
117
  className: a({
118
118
  "gi-block": !r,
119
119
  "gi-inline-block": r,
120
- "gi-stroke-gray-700": s
120
+ "gi-stroke-gray-700": e
121
121
  })
122
122
  }
123
123
  );
124
124
  if (t === "social_youtube")
125
- return /* @__PURE__ */ e(
126
- n,
125
+ return /* @__PURE__ */ s(
126
+ _,
127
127
  {
128
128
  size: o,
129
129
  className: a({
130
130
  "gi-block": !r,
131
131
  "gi-inline-block": r,
132
- "gi-stroke-gray-700": s
132
+ "gi-stroke-gray-700": e
133
133
  })
134
134
  }
135
135
  );
136
136
  if (t === "placeholder")
137
- return /* @__PURE__ */ e(
137
+ return /* @__PURE__ */ s(
138
138
  N,
139
139
  {
140
140
  size: o,
141
141
  className: a({
142
142
  "gi-block": !r,
143
143
  "gi-inline-block": r,
144
- "gi-fill-gray-700": s
144
+ "gi-fill-gray-700": e
145
145
  })
146
146
  }
147
147
  );
148
148
  const p = c ? "'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' " + o : "'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' " + o;
149
- return /* @__PURE__ */ e(
149
+ return /* @__PURE__ */ s(
150
150
  "span",
151
151
  {
152
152
  ...f,
@@ -156,7 +156,7 @@ function j({
156
156
  "aria-label": i || t,
157
157
  role: i ? "img" : "presentation",
158
158
  className: a(
159
- { "gi-block": !r, "gi-text-gray-700": s },
159
+ { "gi-block": !r, "gi-text-gray-700": e },
160
160
  "material-symbols-outlined",
161
161
  k
162
162
  ),
@@ -169,5 +169,5 @@ function j({
169
169
  );
170
170
  }
171
171
  export {
172
- j as Icon
172
+ v as Icon
173
173
  };
@@ -119,7 +119,7 @@ const ie = "-", Me = (e) => {
119
119
  r.has(o) ? r.set(o, i) : a(o, i);
120
120
  }
121
121
  };
122
- }, ve = "!", Ne = (e) => {
122
+ }, xe = "!", Ne = (e) => {
123
123
  const {
124
124
  separator: t,
125
125
  experimentalParseClassName: r
@@ -140,7 +140,7 @@ const ie = "-", Me = (e) => {
140
140
  }
141
141
  A === "[" ? C++ : A === "]" && C--;
142
142
  }
143
- const M = u.length === 0 ? s : s.substring(m), R = M.startsWith(ve), j = R ? M.substring(1) : M, k = S && S > m ? S - m : void 0;
143
+ const M = u.length === 0 ? s : s.substring(m), R = M.startsWith(xe), j = R ? M.substring(1) : M, k = S && S > m ? S - m : void 0;
144
144
  return {
145
145
  modifiers: u,
146
146
  hasImportantModifier: R,
@@ -190,7 +190,7 @@ const ie = "-", Me = (e) => {
190
190
  }
191
191
  j = !1;
192
192
  }
193
- const b = $e(m).join(":"), A = S ? b + ve : b, h = A + k;
193
+ const b = $e(m).join(":"), A = S ? b + xe : b, h = A + k;
194
194
  if (o.includes(h))
195
195
  continue;
196
196
  o.push(h);
@@ -206,15 +206,15 @@ const ie = "-", Me = (e) => {
206
206
  function Oe() {
207
207
  let e = 0, t, r, n = "";
208
208
  for (; e < arguments.length; )
209
- (t = arguments[e++]) && (r = xe(t)) && (n && (n += " "), n += r);
209
+ (t = arguments[e++]) && (r = we(t)) && (n && (n += " "), n += r);
210
210
  return n;
211
211
  }
212
- const xe = (e) => {
212
+ const we = (e) => {
213
213
  if (typeof e == "string")
214
214
  return e;
215
215
  let t, r = "";
216
216
  for (let n = 0; n < e.length; n++)
217
- e[n] && (t = xe(e[n])) && (r && (r += " "), r += t);
217
+ e[n] && (t = we(e[n])) && (r && (r += " "), r += t);
218
218
  return r;
219
219
  };
220
220
  function ne(e, ...t) {
@@ -234,11 +234,11 @@ function ne(e, ...t) {
234
234
  return o(Oe.apply(null, arguments));
235
235
  };
236
236
  }
237
- const w = (e) => {
237
+ const v = (e) => {
238
238
  const t = (r) => r[e] || [];
239
239
  return t.isThemeGetter = !0, t;
240
- }, we = /^\[(?:([a-z-]+):)?(.+)\]$/i, Le = /^\d+\/\d+$/, We = /* @__PURE__ */ new Set(["px", "full", "screen"]), _e = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Be = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Ue = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Fe = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Je = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, N = (e) => _(e) || We.has(e) || Le.test(e), T = (e) => B(e, "length", De), _ = (e) => !!e && !Number.isNaN(Number(e)), re = (e) => B(e, "number", _), K = (e) => !!e && Number.isInteger(Number(e)), qe = (e) => e.endsWith("%") && _(e.slice(0, -1)), c = (e) => we.test(e), E = (e) => _e.test(e), Ke = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Ze = (e) => B(e, Ke, ke), He = (e) => B(e, "position", ke), Xe = /* @__PURE__ */ new Set(["image", "url"]), Qe = (e) => B(e, Xe, rr), Ye = (e) => B(e, "", er), Z = () => !0, B = (e, t, r) => {
241
- const n = we.exec(e);
240
+ }, ve = /^\[(?:([a-z-]+):)?(.+)\]$/i, Le = /^\d+\/\d+$/, We = /* @__PURE__ */ new Set(["px", "full", "screen"]), _e = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Be = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Ue = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Fe = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Je = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, N = (e) => _(e) || We.has(e) || Le.test(e), T = (e) => B(e, "length", De), _ = (e) => !!e && !Number.isNaN(Number(e)), re = (e) => B(e, "number", _), K = (e) => !!e && Number.isInteger(Number(e)), qe = (e) => e.endsWith("%") && _(e.slice(0, -1)), c = (e) => ve.test(e), E = (e) => _e.test(e), Ke = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Ze = (e) => B(e, Ke, ke), He = (e) => B(e, "position", ke), Xe = /* @__PURE__ */ new Set(["image", "url"]), Qe = (e) => B(e, Xe, rr), Ye = (e) => B(e, "", er), Z = () => !0, B = (e, t, r) => {
241
+ const n = ve.exec(e);
242
242
  return n ? n[1] ? typeof t == "string" ? n[1] === t : t.has(n[1]) : r(n[2]) : !1;
243
243
  }, De = (e) => (
244
244
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
@@ -246,7 +246,7 @@ const w = (e) => {
246
246
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
247
247
  Be.test(e) && !Ue.test(e)
248
248
  ), ke = () => !1, er = (e) => Fe.test(e), rr = (e) => Je.test(e), se = () => {
249
- const e = w("colors"), t = w("spacing"), r = w("blur"), n = w("brightness"), a = w("borderColor"), o = w("borderRadius"), i = w("borderSpacing"), s = w("borderWidth"), u = w("contrast"), C = w("grayscale"), m = w("hueRotate"), S = w("invert"), M = w("gap"), R = w("gradientColorStops"), j = w("gradientColorStopPositions"), k = w("inset"), b = w("margin"), A = w("opacity"), h = w("padding"), O = w("saturate"), V = w("scale"), L = w("sepia"), Y = w("skew"), U = w("space"), F = w("translate"), W = () => ["auto", "contain", "none"], J = () => ["auto", "hidden", "clip", "visible", "scroll"], q = () => ["auto", c, t], l = () => [c, t], p = () => ["", N, T], d = () => ["auto", _, c], g = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], f = () => ["solid", "dashed", "dotted", "double", "none"], y = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], v = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], x = () => ["", "0", c], z = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], G = () => [_, c];
249
+ const e = v("colors"), t = v("spacing"), r = v("blur"), n = v("brightness"), a = v("borderColor"), o = v("borderRadius"), i = v("borderSpacing"), s = v("borderWidth"), u = v("contrast"), C = v("grayscale"), m = v("hueRotate"), S = v("invert"), M = v("gap"), R = v("gradientColorStops"), j = v("gradientColorStopPositions"), k = v("inset"), b = v("margin"), A = v("opacity"), h = v("padding"), O = v("saturate"), V = v("scale"), L = v("sepia"), Y = v("skew"), U = v("space"), F = v("translate"), W = () => ["auto", "contain", "none"], J = () => ["auto", "hidden", "clip", "visible", "scroll"], q = () => ["auto", c, t], l = () => [c, t], p = () => ["", N, T], d = () => ["auto", _, c], g = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], f = () => ["solid", "dashed", "dotted", "double", "none"], y = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], x = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], w = () => ["", "0", c], z = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], G = () => [_, c];
250
250
  return {
251
251
  cacheSize: 500,
252
252
  separator: ":",
@@ -260,9 +260,9 @@ const w = (e) => {
260
260
  borderSpacing: l(),
261
261
  borderWidth: p(),
262
262
  contrast: G(),
263
- grayscale: x(),
263
+ grayscale: w(),
264
264
  hueRotate: G(),
265
- invert: x(),
265
+ invert: w(),
266
266
  gap: l(),
267
267
  gradientColorStops: [e],
268
268
  gradientColorStopPositions: [qe, T],
@@ -272,7 +272,7 @@ const w = (e) => {
272
272
  padding: l(),
273
273
  saturate: G(),
274
274
  scale: G(),
275
- sepia: x(),
275
+ sepia: w(),
276
276
  skew: G(),
277
277
  space: l(),
278
278
  translate: l()
@@ -527,14 +527,14 @@ const w = (e) => {
527
527
  * @see https://tailwindcss.com/docs/flex-grow
528
528
  */
529
529
  grow: [{
530
- grow: x()
530
+ grow: w()
531
531
  }],
532
532
  /**
533
533
  * Flex Shrink
534
534
  * @see https://tailwindcss.com/docs/flex-shrink
535
535
  */
536
536
  shrink: [{
537
- shrink: x()
537
+ shrink: w()
538
538
  }],
539
539
  /**
540
540
  * Order
@@ -650,7 +650,7 @@ const w = (e) => {
650
650
  * @see https://tailwindcss.com/docs/justify-content
651
651
  */
652
652
  "justify-content": [{
653
- justify: ["normal", ...v()]
653
+ justify: ["normal", ...x()]
654
654
  }],
655
655
  /**
656
656
  * Justify Items
@@ -671,7 +671,7 @@ const w = (e) => {
671
671
  * @see https://tailwindcss.com/docs/align-content
672
672
  */
673
673
  "align-content": [{
674
- content: ["normal", ...v(), "baseline"]
674
+ content: ["normal", ...x(), "baseline"]
675
675
  }],
676
676
  /**
677
677
  * Align Items
@@ -692,7 +692,7 @@ const w = (e) => {
692
692
  * @see https://tailwindcss.com/docs/place-content
693
693
  */
694
694
  "place-content": [{
695
- "place-content": [...v(), "baseline"]
695
+ "place-content": [...x(), "baseline"]
696
696
  }],
697
697
  /**
698
698
  * Place Items
@@ -2314,14 +2314,14 @@ var ir = { twMerge: !0, twMergeConfig: {}, responsiveVariants: !1 }, Ce = (e) =>
2314
2314
  let O = (l, p, d = [], g) => {
2315
2315
  let f = d;
2316
2316
  if (typeof p == "string") f = f.concat(de(p).split(" ").map((y) => `${l}:${y}`));
2317
- else if (Array.isArray(p)) f = f.concat(p.reduce((y, v) => y.concat(`${l}:${v}`), []));
2317
+ else if (Array.isArray(p)) f = f.concat(p.reduce((y, x) => y.concat(`${l}:${x}`), []));
2318
2318
  else if (typeof p == "object" && typeof g == "string") {
2319
2319
  for (let y in p) if (p.hasOwnProperty(y) && y === g) {
2320
- let v = p[y];
2321
- if (v && typeof v == "string") {
2322
- let x = de(v);
2323
- f[g] ? f[g] = f[g].concat(x.split(" ").map((z) => `${l}:${z}`)) : f[g] = x.split(" ").map((z) => `${l}:${z}`);
2324
- } else Array.isArray(v) && v.length > 0 && (f[g] = v.reduce((x, z) => x.concat(`${l}:${z}`), []));
2320
+ let x = p[y];
2321
+ if (x && typeof x == "string") {
2322
+ let w = de(x);
2323
+ f[g] ? f[g] = f[g].concat(w.split(" ").map((z) => `${l}:${z}`)) : f[g] = w.split(" ").map((z) => `${l}:${z}`);
2324
+ } else Array.isArray(x) && x.length > 0 && (f[g] = x.reduce((w, z) => w.concat(`${l}:${z}`), []));
2325
2325
  }
2326
2326
  }
2327
2327
  return f;
@@ -2329,10 +2329,10 @@ var ir = { twMerge: !0, twMergeConfig: {}, responsiveVariants: !1 }, Ce = (e) =>
2329
2329
  var f;
2330
2330
  let y = p[l];
2331
2331
  if (!y || P(y)) return null;
2332
- let v = (f = g == null ? void 0 : g[l]) != null ? f : h == null ? void 0 : h[l];
2333
- if (v === null) return null;
2334
- let x = ce(v), z = Array.isArray(u.responsiveVariants) && u.responsiveVariants.length > 0 || u.responsiveVariants === !0, G = S == null ? void 0 : S[l], I = [];
2335
- if (typeof x == "object" && z) for (let [ee, ae] of Object.entries(x)) {
2332
+ let x = (f = g == null ? void 0 : g[l]) != null ? f : h == null ? void 0 : h[l];
2333
+ if (x === null) return null;
2334
+ let w = ce(x), z = Array.isArray(u.responsiveVariants) && u.responsiveVariants.length > 0 || u.responsiveVariants === !0, G = S == null ? void 0 : S[l], I = [];
2335
+ if (typeof w == "object" && z) for (let [ee, ae] of Object.entries(w)) {
2336
2336
  let ze = y[ae];
2337
2337
  if (ee === "initial") {
2338
2338
  G = ae;
@@ -2340,7 +2340,7 @@ var ir = { twMerge: !0, twMergeConfig: {}, responsiveVariants: !1 }, Ce = (e) =>
2340
2340
  }
2341
2341
  Array.isArray(u.responsiveVariants) && !u.responsiveVariants.includes(ee) || (I = O(ee, ze, I, d));
2342
2342
  }
2343
- let Ae = x != null && typeof x != "object" ? x : ce(G), D = y[Ae || "false"];
2343
+ let Ae = w != null && typeof w != "object" ? w : ce(G), D = y[Ae || "false"];
2344
2344
  return typeof I == "object" && typeof d == "string" && I[d] ? fe(I, D) : I.length > 0 ? (I.push(D), I) : D;
2345
2345
  }, L = () => m ? Object.keys(m).map((l) => V(l, m)) : null, Y = (l, p) => {
2346
2346
  if (!m || typeof m != "object") return null;
@@ -2359,20 +2359,20 @@ var ir = { twMerge: !0, twMergeConfig: {}, responsiveVariants: !1 }, Ce = (e) =>
2359
2359
  }, W = (l = [], p) => {
2360
2360
  let d = [];
2361
2361
  for (let { class: g, className: f, ...y } of l) {
2362
- let v = !0;
2363
- for (let [x, z] of Object.entries(y)) {
2364
- let G = F(x, p);
2362
+ let x = !0;
2363
+ for (let [w, z] of Object.entries(y)) {
2364
+ let G = F(w, p);
2365
2365
  if (Array.isArray(z)) {
2366
- if (!z.includes(G[x])) {
2367
- v = !1;
2366
+ if (!z.includes(G[w])) {
2367
+ x = !1;
2368
2368
  break;
2369
2369
  }
2370
- } else if (G[x] !== z) {
2371
- v = !1;
2370
+ } else if (G[w] !== z) {
2371
+ x = !1;
2372
2372
  break;
2373
2373
  }
2374
2374
  }
2375
- v && (g && d.push(g), f && d.push(f));
2375
+ x && (g && d.push(g), f && d.push(f));
2376
2376
  }
2377
2377
  return d;
2378
2378
  }, J = (l) => {
@@ -2386,17 +2386,17 @@ var ir = { twMerge: !0, twMergeConfig: {}, responsiveVariants: !1 }, Ce = (e) =>
2386
2386
  let p = {};
2387
2387
  for (let { slots: d = [], class: g, className: f, ...y } of i) {
2388
2388
  if (!P(y)) {
2389
- let v = !0;
2390
- for (let x of Object.keys(y)) {
2391
- let z = F(x, l)[x];
2392
- if (z === void 0 || (Array.isArray(y[x]) ? !y[x].includes(z) : y[x] !== z)) {
2393
- v = !1;
2389
+ let x = !0;
2390
+ for (let w of Object.keys(y)) {
2391
+ let z = F(w, l)[w];
2392
+ if (z === void 0 || (Array.isArray(y[w]) ? !y[w].includes(z) : y[w] !== z)) {
2393
+ x = !1;
2394
2394
  break;
2395
2395
  }
2396
2396
  }
2397
- if (!v) continue;
2397
+ if (!x) continue;
2398
2398
  }
2399
- for (let v of d) p[v] = p[v] || [], p[v].push([g, f]);
2399
+ for (let x of d) p[x] = p[x] || [], p[x].push([g, f]);
2400
2400
  }
2401
2401
  return p;
2402
2402
  };
@@ -0,0 +1,64 @@
1
+ import * as i from "react";
2
+ import { jsx as c, Fragment as d } from "react/jsx-runtime";
3
+ function p(e, r) {
4
+ if (typeof e == "function")
5
+ return e(r);
6
+ e != null && (e.current = r);
7
+ }
8
+ function m(...e) {
9
+ return (r) => {
10
+ let n = !1;
11
+ const l = e.map((t) => {
12
+ const o = p(t, r);
13
+ return !n && typeof o == "function" && (n = !0), o;
14
+ });
15
+ if (n)
16
+ return () => {
17
+ for (let t = 0; t < l.length; t++) {
18
+ const o = l[t];
19
+ typeof o == "function" ? o() : p(e[t], null);
20
+ }
21
+ };
22
+ };
23
+ }
24
+ var y = i.forwardRef((e, r) => {
25
+ const { children: n, ...l } = e, t = i.Children.toArray(n), o = t.find(h);
26
+ if (o) {
27
+ const s = o.props.children, a = t.map((u) => u === o ? i.Children.count(s) > 1 ? i.Children.only(null) : i.isValidElement(s) ? s.props.children : null : u);
28
+ return /* @__PURE__ */ c(f, { ...l, ref: r, children: i.isValidElement(s) ? i.cloneElement(s, void 0, a) : null });
29
+ }
30
+ return /* @__PURE__ */ c(f, { ...l, ref: r, children: n });
31
+ });
32
+ y.displayName = "Slot";
33
+ var f = i.forwardRef((e, r) => {
34
+ const { children: n, ...l } = e;
35
+ if (i.isValidElement(n)) {
36
+ const t = R(n), o = C(l, n.props);
37
+ return n.type !== i.Fragment && (o.ref = r ? m(r, t) : t), i.cloneElement(n, o);
38
+ }
39
+ return i.Children.count(n) > 1 ? i.Children.only(null) : null;
40
+ });
41
+ f.displayName = "SlotClone";
42
+ var g = ({ children: e }) => /* @__PURE__ */ c(d, { children: e });
43
+ function h(e) {
44
+ return i.isValidElement(e) && e.type === g;
45
+ }
46
+ function C(e, r) {
47
+ const n = { ...r };
48
+ for (const l in r) {
49
+ const t = e[l], o = r[l];
50
+ /^on[A-Z]/.test(l) ? t && o ? n[l] = (...a) => {
51
+ o(...a), t(...a);
52
+ } : t && (n[l] = t) : l === "style" ? n[l] = { ...t, ...o } : l === "className" && (n[l] = [t, o].filter(Boolean).join(" "));
53
+ }
54
+ return { ...e, ...n };
55
+ }
56
+ function R(e) {
57
+ var l, t;
58
+ let r = (l = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : l.get, n = r && "isReactWarning" in r && r.isReactWarning;
59
+ return n ? e.ref : (r = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, n = r && "isReactWarning" in r && r.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
60
+ }
61
+ export {
62
+ g as S,
63
+ y as a
64
+ };
@@ -1,31 +1,31 @@
1
1
  "use client";
2
- import { jsxs as n, Fragment as m, jsx as c } from "react/jsx-runtime";
2
+ import { jsxs as r, Fragment as m, jsx as c } from "react/jsx-runtime";
3
3
  import { useId as s } from "react";
4
4
  import { HintText as d } from "../hint-text/hint-text.js";
5
5
  import { Input as h } from "../primitives/input.js";
6
- import { InputCheckboxSizeEnum as r } from "./types.js";
6
+ import { InputCheckboxSizeEnum as n } from "./types.js";
7
7
  const u = (e) => {
8
8
  switch (e) {
9
- case r.Large:
9
+ case n.Large:
10
10
  return "gi-input-checkbox-large";
11
- case r.Small:
11
+ case n.Small:
12
12
  return "gi-input-checkbox-small";
13
13
  default:
14
14
  return "gi-input-checkbox-medium";
15
15
  }
16
16
  }, p = (e) => {
17
17
  let i = "gi-w-8";
18
- return e === r.Large && (i = "gi-w-11"), e === r.Small && (i = "gi-w-6"), i;
18
+ return e === n.Large && (i = "gi-w-11"), e === n.Small && (i = "gi-w-6"), i;
19
19
  }, x = ({
20
20
  id: e,
21
- size: i = r.Medium,
21
+ size: i = n.Medium,
22
22
  label: l,
23
- hint: o,
24
- ...a
23
+ hint: a,
24
+ ...o
25
25
  }) => {
26
26
  const t = e || s();
27
- return /* @__PURE__ */ n(m, { children: [
28
- /* @__PURE__ */ n("div", { className: "gi-input-checkbox-container", children: [
27
+ return /* @__PURE__ */ r(m, { children: [
28
+ /* @__PURE__ */ r("div", { className: "gi-input-checkbox-container", children: [
29
29
  /* @__PURE__ */ c(
30
30
  h,
31
31
  {
@@ -33,14 +33,14 @@ const u = (e) => {
33
33
  id: t,
34
34
  className: u(i),
35
35
  "aria-labelledby": l ? `${t}-label` : void 0,
36
- ...a
36
+ ...o
37
37
  }
38
38
  ),
39
39
  /* @__PURE__ */ c("label", { id: `${t}-label`, htmlFor: t, children: l })
40
40
  ] }),
41
- o && /* @__PURE__ */ n("div", { className: "gi-input-checkbox-hint-container", children: [
41
+ a && /* @__PURE__ */ r("div", { className: "gi-input-checkbox-hint-container", children: [
42
42
  /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c("div", { className: p(i) }) }),
43
- /* @__PURE__ */ c(d, { id: `${t}-hint`, text: o })
43
+ /* @__PURE__ */ c(d, { id: `${t}-hint`, text: a })
44
44
  ] })
45
45
  ] });
46
46
  };
@@ -1,2 +1,3 @@
1
+ import { default as React } from 'react';
1
2
  import { InputPasswordProps } from './types.js';
2
- export declare const InputPassword: React.FC<InputPasswordProps>;
3
+ export declare const InputPassword: React.ForwardRefExoticComponent<InputPasswordProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,30 +1,34 @@
1
1
  "use client";
2
- import { jsx as p } from "react/jsx-runtime";
3
- import { useState as e } from "react";
4
- import { InputText as r } from "../input-text/input-text.js";
5
- const y = (o) => {
6
- const [t, s] = e({
7
- icon: "visibility",
8
- type: "password"
9
- }), n = () => {
10
- const i = t.type === "text";
11
- s({
12
- type: i ? "password" : "text",
13
- icon: i ? "visibility" : "visibility_off"
14
- });
15
- };
16
- return /* @__PURE__ */ p(
17
- r,
18
- {
19
- ...o,
20
- type: t.type,
21
- inputActionButton: {
22
- icon: t.icon,
23
- onClick: n
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import { forwardRef as r, useState as c } from "react";
4
+ import { InputText as l } from "../input-text/input-text.js";
5
+ const u = r(
6
+ (o, s) => {
7
+ const [t, n] = c({
8
+ icon: "visibility",
9
+ type: "password"
10
+ }), p = () => {
11
+ const i = t.type === "text";
12
+ n({
13
+ type: i ? "password" : "text",
14
+ icon: i ? "visibility" : "visibility_off"
15
+ });
16
+ };
17
+ return /* @__PURE__ */ e(
18
+ l,
19
+ {
20
+ ...o,
21
+ type: t.type,
22
+ inputActionButton: {
23
+ icon: t.icon,
24
+ onClick: p
25
+ },
26
+ ref: s
24
27
  }
25
- }
26
- );
27
- };
28
+ );
29
+ }
30
+ );
31
+ u.displayName = "InputPassword";
28
32
  export {
29
- y as InputPassword
33
+ u as InputPassword
30
34
  };