@ogcio/design-system-react 1.29.0 → 1.31.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 (109) hide show
  1. package/README.md +11 -33
  2. package/dist/alert/variants.d.ts +78 -2
  3. package/dist/atoms/DsButton.d.ts +194 -0
  4. package/dist/atoms/DsButton.js +330 -0
  5. package/dist/atoms/InsetText.d.ts +14 -0
  6. package/dist/atoms/InsetText.js +17 -0
  7. package/dist/atoms/icons/Close.d.ts +3 -0
  8. package/dist/atoms/icons/Close.js +23 -0
  9. package/dist/atoms/icons/KeyboardArrowDown.d.ts +3 -0
  10. package/dist/atoms/icons/KeyboardArrowDown.js +23 -0
  11. package/dist/atoms/icons/KeyboardArrowUp.d.ts +3 -0
  12. package/dist/atoms/icons/KeyboardArrowUp.js +23 -0
  13. package/dist/atoms/icons/Visibility.d.ts +3 -0
  14. package/dist/atoms/icons/Visibility.js +23 -0
  15. package/dist/atoms/icons/VisibilityOff.d.ts +3 -0
  16. package/dist/atoms/icons/VisibilityOff.js +23 -0
  17. package/dist/atoms/icons/index.d.ts +6 -0
  18. package/dist/atoms/icons/index.js +12 -0
  19. package/dist/atoms/icons/logos/LogoBlack.d.ts +3 -0
  20. package/dist/atoms/icons/logos/LogoBlack.js +327 -0
  21. package/dist/atoms/icons/logos/LogoGoldGreen.d.ts +3 -0
  22. package/dist/atoms/icons/logos/LogoGoldGreen.js +327 -0
  23. package/dist/atoms/icons/logos/LogoGoldWhite.d.ts +3 -0
  24. package/dist/atoms/icons/logos/LogoGoldWhite.js +87 -0
  25. package/dist/atoms/icons/logos/LogoHarpBlack.d.ts +3 -0
  26. package/dist/atoms/icons/logos/LogoHarpBlack.js +68 -0
  27. package/dist/atoms/icons/logos/LogoHarpWhite.d.ts +3 -0
  28. package/dist/{assets/logos/LogoHarpBlack.js → atoms/icons/logos/LogoHarpWhite.js} +33 -31
  29. package/dist/atoms/icons/logos/LogoWhite.d.ts +3 -0
  30. package/dist/atoms/icons/logos/LogoWhite.js +327 -0
  31. package/dist/atoms/icons/logos/index.d.ts +6 -0
  32. package/dist/atoms/icons/logos/index.js +14 -0
  33. package/dist/atoms/icons/types.d.ts +10 -0
  34. package/dist/atoms/icons/types.js +1 -0
  35. package/dist/atoms/index.d.ts +3 -0
  36. package/dist/atoms/index.js +16 -0
  37. package/dist/autocomplete/autocomplete.js +131 -115
  38. package/dist/blockquote/blockquote.d.ts +4 -1
  39. package/dist/blockquote/blockquote.js +18 -4
  40. package/dist/breadcrumbs/breadcrumbs.js +54 -33
  41. package/dist/button-group/button-group.js +31 -28
  42. package/dist/character-count/character-count.js +5 -5
  43. package/dist/chip/chip.js +41 -19
  44. package/dist/combo-box/combo-box.js +6 -13
  45. package/dist/combo-box/dropdown-item.js +39 -40
  46. package/dist/cookie-banner/cookie-banner.js +28 -20
  47. package/dist/data-table/data-table-footer.js +57 -51
  48. package/dist/data-table/data-table-header.d.ts +7 -7
  49. package/dist/data-table/data-table-header.js +97 -110
  50. package/dist/data-table/data-table-selected-rows.d.ts +1 -0
  51. package/dist/data-table/data-table-selected-rows.js +15 -19
  52. package/dist/details/details.js +43 -23
  53. package/dist/drawer/drawer.js +35 -32
  54. package/dist/footer/footer.js +54 -46
  55. package/dist/forms/form-field/form-field.d.ts +2 -2
  56. package/dist/forms/form-field/form-field.js +40 -30
  57. package/dist/forms/form-field/types.d.ts +10 -3
  58. package/dist/header/components/header-slot.js +33 -32
  59. package/dist/header/header-legacy.js +8 -8
  60. package/dist/header/variants.d.ts +220 -20
  61. package/dist/heading/heading.d.ts +70 -2
  62. package/dist/hooks/use-aria-hider.d.ts +1 -1
  63. package/dist/hooks/use-aria-hider.js +14 -13
  64. package/dist/hooks/use-breakpoint.js +15 -12
  65. package/dist/hooks/use-focus-trap.d.ts +1 -1
  66. package/dist/hooks/use-focus-trap.js +179 -179
  67. package/dist/icon/icon.d.ts +10 -0
  68. package/dist/icon/icon.js +64 -52
  69. package/dist/icon/icons.d.ts +1 -1
  70. package/dist/icons/index.d.ts +1 -0
  71. package/dist/icons/index.js +12 -0
  72. package/dist/index.d.ts +1 -0
  73. package/dist/index.js +144 -142
  74. package/dist/input-file/input-file.js +15 -12
  75. package/dist/input-password/input-password.js +13 -12
  76. package/dist/input-text/input-text.js +18 -16
  77. package/dist/label/label.d.ts +43 -0
  78. package/dist/label/label.js +7 -6
  79. package/dist/logos/index.d.ts +1 -0
  80. package/dist/logos/index.js +14 -0
  81. package/dist/modal/modal.js +125 -127
  82. package/dist/popover/popover.js +67 -64
  83. package/dist/score-select/score-select.js +20 -20
  84. package/dist/select/select-next.js +45 -45
  85. package/dist/spinner/spinner.d.ts +30 -2
  86. package/dist/styles.css +12 -2
  87. package/dist/table/table-row.js +14 -7
  88. package/dist/table/table.d.ts +22 -2
  89. package/dist/tabs/tab-item.d.ts +2 -2
  90. package/dist/tabs/tab-panel.js +6 -6
  91. package/dist/tabs/tabs.js +19 -19
  92. package/dist/text-input/text-input.d.ts +1 -1
  93. package/dist/textarea/textarea.js +27 -28
  94. package/dist/toast/ds-toast.d.ts +78 -2
  95. package/fonts.css +10 -0
  96. package/package.json +17 -12
  97. package/dist/assets/logos/LogoBlack.d.ts +0 -3
  98. package/dist/assets/logos/LogoBlack.js +0 -322
  99. package/dist/assets/logos/LogoGoldGreen.d.ts +0 -3
  100. package/dist/assets/logos/LogoGoldGreen.js +0 -322
  101. package/dist/assets/logos/LogoGoldWhite.d.ts +0 -3
  102. package/dist/assets/logos/LogoGoldWhite.js +0 -82
  103. package/dist/assets/logos/LogoHarpBlack.d.ts +0 -3
  104. package/dist/assets/logos/LogoHarpWhite.d.ts +0 -3
  105. package/dist/assets/logos/LogoHarpWhite.js +0 -60
  106. package/dist/assets/logos/LogoWhite.d.ts +0 -3
  107. package/dist/assets/logos/LogoWhite.js +0 -322
  108. package/dist/assets/logos/index.d.ts +0 -6
  109. package/dist/assets/logos/index.js +0 -14
@@ -2,8 +2,8 @@
2
2
  import { jsx as dt } from "react/jsx-runtime";
3
3
  import { useRef as Ee, useEffect as Ae } from "react";
4
4
  import { cn as mt } from "../cn.js";
5
- import { createDynamicHeightModifier as Xe } from "./utilities.js";
6
- var $ = "top", T = "bottom", S = "right", k = "left", Be = "auto", fe = [$, T, S, k], Q = "start", ie = "end", ht = "clippingParents", _e = "viewport", ne = "popper", yt = "reference", ze = /* @__PURE__ */ fe.reduce(function(e, t) {
5
+ import { createDynamicHeightModifier as ze } from "./utilities.js";
6
+ var $ = "top", T = "bottom", S = "right", k = "left", Be = "auto", fe = [$, T, S, k], Q = "start", ie = "end", ht = "clippingParents", _e = "viewport", ne = "popper", yt = "reference", Xe = /* @__PURE__ */ fe.reduce(function(e, t) {
7
7
  return e.concat([t + "-" + Q, t + "-" + ie]);
8
8
  }, []), et = /* @__PURE__ */ [].concat(fe, [Be]).reduce(function(e, t) {
9
9
  return e.concat([t, t + "-" + Q, t + "-" + ie]);
@@ -211,7 +211,7 @@ var Tt = function(t, r) {
211
211
  function St(e) {
212
212
  var t, r = e.state, n = e.name, a = e.options, o = r.elements.arrow, c = r.modifiersData.popperOffsets, s = H(r.placement), i = ke(s), u = [k, S].indexOf(s) >= 0, f = u ? "height" : "width";
213
213
  if (!(!o || !c)) {
214
- var d = Tt(a.padding, r), h = $e(o), p = i === "y" ? $ : k, y = i === "y" ? T : S, m = r.rects.reference[f] + r.rects.reference[i] - c[i] - r.rects.popper[f], l = c[i] - r.rects.reference[i], w = ce(o), x = w ? i === "y" ? w.clientHeight || 0 : w.clientWidth || 0 : 0, O = m / 2 - l / 2, v = d[p], g = x - h[f] - d[y], b = x / 2 - h[f] / 2 + O, E = ae(v, b, g), D = i;
214
+ var d = Tt(a.padding, r), h = $e(o), l = i === "y" ? $ : k, y = i === "y" ? T : S, m = r.rects.reference[f] + r.rects.reference[i] - c[i] - r.rects.popper[f], p = c[i] - r.rects.reference[i], w = ce(o), x = w ? i === "y" ? w.clientHeight || 0 : w.clientWidth || 0 : 0, O = m / 2 - p / 2, v = d[l], g = x - h[f] - d[y], b = x / 2 - h[f] / 2 + O, E = ae(v, b, g), D = i;
215
215
  r.modifiersData[n] = (t = {}, t[D] = E, t.centerOffset = E - b, t);
216
216
  }
217
217
  }
@@ -245,14 +245,14 @@ function Vt(e, t) {
245
245
  };
246
246
  }
247
247
  function Ye(e) {
248
- var t, r = e.popper, n = e.popperRect, a = e.placement, o = e.variation, c = e.offsets, s = e.position, i = e.gpuAcceleration, u = e.adaptive, f = e.roundOffsets, d = e.isFixed, h = c.x, p = h === void 0 ? 0 : h, y = c.y, m = y === void 0 ? 0 : y, l = typeof f == "function" ? f({
249
- x: p,
248
+ var t, r = e.popper, n = e.popperRect, a = e.placement, o = e.variation, c = e.offsets, s = e.position, i = e.gpuAcceleration, u = e.adaptive, f = e.roundOffsets, d = e.isFixed, h = c.x, l = h === void 0 ? 0 : h, y = c.y, m = y === void 0 ? 0 : y, p = typeof f == "function" ? f({
249
+ x: l,
250
250
  y: m
251
251
  }) : {
252
- x: p,
252
+ x: l,
253
253
  y: m
254
254
  };
255
- p = l.x, m = l.y;
255
+ l = p.x, m = p.y;
256
256
  var w = c.hasOwnProperty("x"), x = c.hasOwnProperty("y"), O = k, v = $, g = window;
257
257
  if (u) {
258
258
  var b = ce(r), E = "clientHeight", D = "clientWidth";
@@ -270,23 +270,23 @@ function Ye(e) {
270
270
  // $FlowFixMe[prop-missing]
271
271
  b[D]
272
272
  );
273
- p -= A - n.width, p *= i ? 1 : -1;
273
+ l -= A - n.width, l *= i ? 1 : -1;
274
274
  }
275
275
  }
276
276
  var B = Object.assign({
277
277
  position: s
278
278
  }, u && Ht), M = f === !0 ? Vt({
279
- x: p,
279
+ x: l,
280
280
  y: m
281
281
  }, L(r)) : {
282
- x: p,
282
+ x: l,
283
283
  y: m
284
284
  };
285
- if (p = M.x, m = M.y, i) {
285
+ if (l = M.x, m = M.y, i) {
286
286
  var j;
287
- return Object.assign({}, B, (j = {}, j[v] = x ? "0" : "", j[O] = w ? "0" : "", j.transform = (g.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + m + "px)" : "translate3d(" + p + "px, " + m + "px, 0)", j));
287
+ return Object.assign({}, B, (j = {}, j[v] = x ? "0" : "", j[O] = w ? "0" : "", j.transform = (g.devicePixelRatio || 1) <= 1 ? "translate(" + l + "px, " + m + "px)" : "translate3d(" + l + "px, " + m + "px, 0)", j));
288
288
  }
289
- return Object.assign({}, B, (t = {}, t[v] = x ? m + "px" : "", t[O] = w ? p + "px" : "", t.transform = "", t));
289
+ return Object.assign({}, B, (t = {}, t[v] = x ? m + "px" : "", t[O] = w ? l + "px" : "", t.transform = "", t));
290
290
  }
291
291
  function Nt(e) {
292
292
  var t = e.state, r = e.options, n = r.gpuAcceleration, a = n === void 0 ? !0 : n, o = r.adaptive, c = o === void 0 ? !0 : o, s = r.roundOffsets, i = s === void 0 ? !0 : s, u = {
@@ -331,7 +331,7 @@ function qt(e) {
331
331
  }), s && i.removeEventListener("resize", r.update, me);
332
332
  };
333
333
  }
334
- const Xt = {
334
+ const zt = {
335
335
  name: "eventListeners",
336
336
  enabled: !0,
337
337
  phase: "write",
@@ -340,7 +340,7 @@ const Xt = {
340
340
  effect: qt,
341
341
  data: {}
342
342
  };
343
- var zt = {
343
+ var Xt = {
344
344
  left: "right",
345
345
  right: "left",
346
346
  bottom: "top",
@@ -348,7 +348,7 @@ var zt = {
348
348
  };
349
349
  function he(e) {
350
350
  return e.replace(/left|right|bottom|top/g, function(t) {
351
- return zt[t];
351
+ return Xt[t];
352
352
  });
353
353
  }
354
354
  var It = {
@@ -486,7 +486,7 @@ function st(e) {
486
486
  }
487
487
  function se(e, t) {
488
488
  t === void 0 && (t = {});
489
- var r = t, n = r.placement, a = n === void 0 ? e.placement : n, o = r.strategy, c = o === void 0 ? e.strategy : o, s = r.boundary, i = s === void 0 ? ht : s, u = r.rootBoundary, f = u === void 0 ? _e : u, d = r.elementContext, h = d === void 0 ? ne : d, p = r.altBoundary, y = p === void 0 ? !1 : p, m = r.padding, l = m === void 0 ? 0 : m, w = at(typeof l != "number" ? l : ot(l, fe)), x = h === ne ? yt : ne, O = e.rects.popper, v = e.elements[y ? x : h], g = Jt(K(v) ? v : v.contextElement || q(e.elements.popper), i, f, c), b = _(e.elements.reference), E = st({
489
+ var r = t, n = r.placement, a = n === void 0 ? e.placement : n, o = r.strategy, c = o === void 0 ? e.strategy : o, s = r.boundary, i = s === void 0 ? ht : s, u = r.rootBoundary, f = u === void 0 ? _e : u, d = r.elementContext, h = d === void 0 ? ne : d, l = r.altBoundary, y = l === void 0 ? !1 : l, m = r.padding, p = m === void 0 ? 0 : m, w = at(typeof p != "number" ? p : ot(p, fe)), x = h === ne ? yt : ne, O = e.rects.popper, v = e.elements[y ? x : h], g = Jt(K(v) ? v : v.contextElement || q(e.elements.popper), i, f, c), b = _(e.elements.reference), E = st({
490
490
  reference: b,
491
491
  element: O,
492
492
  placement: a
@@ -499,21 +499,21 @@ function se(e, t) {
499
499
  if (h === ne && B) {
500
500
  var M = B[a];
501
501
  Object.keys(A).forEach(function(j) {
502
- var X = [S, T].indexOf(j) >= 0 ? 1 : -1, z = [$, T].indexOf(j) >= 0 ? "y" : "x";
503
- A[j] += M[z] * X;
502
+ var z = [S, T].indexOf(j) >= 0 ? 1 : -1, X = [$, T].indexOf(j) >= 0 ? "y" : "x";
503
+ A[j] += M[X] * z;
504
504
  });
505
505
  }
506
506
  return A;
507
507
  }
508
508
  function Qt(e, t) {
509
509
  t === void 0 && (t = {});
510
- var r = t, n = r.placement, a = r.boundary, o = r.rootBoundary, c = r.padding, s = r.flipVariations, i = r.allowedAutoPlacements, u = i === void 0 ? et : i, f = ee(n), d = f ? s ? ze : ze.filter(function(y) {
510
+ var r = t, n = r.placement, a = r.boundary, o = r.rootBoundary, c = r.padding, s = r.flipVariations, i = r.allowedAutoPlacements, u = i === void 0 ? et : i, f = ee(n), d = f ? s ? Xe : Xe.filter(function(y) {
511
511
  return ee(y) === f;
512
512
  }) : fe, h = d.filter(function(y) {
513
513
  return u.indexOf(y) >= 0;
514
514
  });
515
515
  h.length === 0 && (h = d);
516
- var p = h.reduce(function(y, m) {
516
+ var l = h.reduce(function(y, m) {
517
517
  return y[m] = se(e, {
518
518
  placement: m,
519
519
  boundary: a,
@@ -521,8 +521,8 @@ function Qt(e, t) {
521
521
  padding: c
522
522
  })[H(m)], y;
523
523
  }, {});
524
- return Object.keys(p).sort(function(y, m) {
525
- return p[y] - p[m];
524
+ return Object.keys(l).sort(function(y, m) {
525
+ return l[y] - l[m];
526
526
  });
527
527
  }
528
528
  function Zt(e) {
@@ -534,7 +534,7 @@ function Zt(e) {
534
534
  function _t(e) {
535
535
  var t = e.state, r = e.options, n = e.name;
536
536
  if (!t.modifiersData[n]._skip) {
537
- for (var a = r.mainAxis, o = a === void 0 ? !0 : a, c = r.altAxis, s = c === void 0 ? !0 : c, i = r.fallbackPlacements, u = r.padding, f = r.boundary, d = r.rootBoundary, h = r.altBoundary, p = r.flipVariations, y = p === void 0 ? !0 : p, m = r.allowedAutoPlacements, l = t.options.placement, w = H(l), x = w === l, O = i || (x || !y ? [he(l)] : Zt(l)), v = [l].concat(O).reduce(function(J, F) {
537
+ for (var a = r.mainAxis, o = a === void 0 ? !0 : a, c = r.altAxis, s = c === void 0 ? !0 : c, i = r.fallbackPlacements, u = r.padding, f = r.boundary, d = r.rootBoundary, h = r.altBoundary, l = r.flipVariations, y = l === void 0 ? !0 : l, m = r.allowedAutoPlacements, p = t.options.placement, w = H(p), x = w === p, O = i || (x || !y ? [he(p)] : Zt(p)), v = [p].concat(O).reduce(function(J, F) {
538
538
  return J.concat(H(F) === Be ? Qt(t, {
539
539
  placement: F,
540
540
  boundary: f,
@@ -544,14 +544,14 @@ function _t(e) {
544
544
  allowedAutoPlacements: m
545
545
  }) : F);
546
546
  }, []), g = t.rects.reference, b = t.rects.popper, E = /* @__PURE__ */ new Map(), D = !0, P = v[0], A = 0; A < v.length; A++) {
547
- var B = v[A], M = H(B), j = ee(B) === Q, X = [$, T].indexOf(M) >= 0, z = X ? "width" : "height", C = se(t, {
547
+ var B = v[A], M = H(B), j = ee(B) === Q, z = [$, T].indexOf(M) >= 0, X = z ? "width" : "height", C = se(t, {
548
548
  placement: B,
549
549
  boundary: f,
550
550
  rootBoundary: d,
551
551
  altBoundary: h,
552
552
  padding: u
553
- }), W = X ? j ? S : k : j ? T : $;
554
- g[z] > b[z] && (W = he(W));
553
+ }), W = z ? j ? S : k : j ? T : $;
554
+ g[X] > b[X] && (W = he(W));
555
555
  var ue = he(W), I = [];
556
556
  if (o && I.push(C[M] <= 0), s && I.push(C[W] <= 0, C[ue] <= 0), I.every(function(J) {
557
557
  return J;
@@ -562,7 +562,7 @@ function _t(e) {
562
562
  E.set(B, I);
563
563
  }
564
564
  if (D)
565
- for (var pe = y ? 3 : 1, be = function(F) {
565
+ for (var le = y ? 3 : 1, be = function(F) {
566
566
  var re = v.find(function(ve) {
567
567
  var Y = E.get(ve);
568
568
  if (Y)
@@ -572,9 +572,9 @@ function _t(e) {
572
572
  });
573
573
  if (re)
574
574
  return P = re, "break";
575
- }, te = pe; te > 0; te--) {
576
- var le = be(te);
577
- if (le === "break") break;
575
+ }, te = le; te > 0; te--) {
576
+ var pe = be(te);
577
+ if (pe === "break") break;
578
578
  }
579
579
  t.placement !== P && (t.modifiersData[n]._skip = !0, t.placement = P, t.reset = !0);
580
580
  }
@@ -672,7 +672,7 @@ function fr(e) {
672
672
  return e === "x" ? "y" : "x";
673
673
  }
674
674
  function cr(e) {
675
- var t = e.state, r = e.options, n = e.name, a = r.mainAxis, o = a === void 0 ? !0 : a, c = r.altAxis, s = c === void 0 ? !1 : c, i = r.boundary, u = r.rootBoundary, f = r.altBoundary, d = r.padding, h = r.tether, p = h === void 0 ? !0 : h, y = r.tetherOffset, m = y === void 0 ? 0 : y, l = se(t, {
675
+ var t = e.state, r = e.options, n = e.name, a = r.mainAxis, o = a === void 0 ? !0 : a, c = r.altAxis, s = c === void 0 ? !1 : c, i = r.boundary, u = r.rootBoundary, f = r.altBoundary, d = r.padding, h = r.tether, l = h === void 0 ? !0 : h, y = r.tetherOffset, m = y === void 0 ? 0 : y, p = se(t, {
676
676
  boundary: i,
677
677
  rootBoundary: u,
678
678
  padding: d,
@@ -691,14 +691,14 @@ function cr(e) {
691
691
  };
692
692
  if (b) {
693
693
  if (o) {
694
- var j, X = v === "y" ? $ : k, z = v === "y" ? T : S, C = v === "y" ? "height" : "width", W = b[v], ue = W + l[X], I = W - l[z], pe = p ? -D[C] / 2 : 0, be = x === Q ? E[C] : D[C], te = x === Q ? -D[C] : -E[C], le = t.elements.arrow, J = p && le ? $e(le) : {
694
+ var j, z = v === "y" ? $ : k, X = v === "y" ? T : S, C = v === "y" ? "height" : "width", W = b[v], ue = W + p[z], I = W - p[X], le = l ? -D[C] / 2 : 0, be = x === Q ? E[C] : D[C], te = x === Q ? -D[C] : -E[C], pe = t.elements.arrow, J = l && pe ? $e(pe) : {
695
695
  width: 0,
696
696
  height: 0
697
- }, F = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : nt(), re = F[X], ve = F[z], Y = ae(0, E[C], J[C]), we = O ? E[C] / 2 - pe - Y - re - A.mainAxis : be - Y - re - A.mainAxis, ft = O ? -E[C] / 2 + pe + Y + ve + A.mainAxis : te + Y + ve + A.mainAxis, xe = t.elements.arrow && ce(t.elements.arrow), ct = xe ? v === "y" ? xe.clientTop || 0 : xe.clientLeft || 0 : 0, Te = (j = B == null ? void 0 : B[v]) != null ? j : 0, ut = W + we - Te - ct, pt = W + ft - Te, Se = ae(p ? ye(ue, ut) : ue, W, p ? G(I, pt) : I);
697
+ }, F = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : nt(), re = F[z], ve = F[X], Y = ae(0, E[C], J[C]), we = O ? E[C] / 2 - le - Y - re - A.mainAxis : be - Y - re - A.mainAxis, ft = O ? -E[C] / 2 + le + Y + ve + A.mainAxis : te + Y + ve + A.mainAxis, xe = t.elements.arrow && ce(t.elements.arrow), ct = xe ? v === "y" ? xe.clientTop || 0 : xe.clientLeft || 0 : 0, Te = (j = B == null ? void 0 : B[v]) != null ? j : 0, ut = W + we - Te - ct, lt = W + ft - Te, Se = ae(l ? ye(ue, ut) : ue, W, l ? G(I, lt) : I);
698
698
  b[v] = Se, M[v] = Se - W;
699
699
  }
700
700
  if (s) {
701
- var Me, lt = v === "x" ? $ : k, vt = v === "x" ? T : S, U = b[g], de = g === "y" ? "height" : "width", We = U + l[lt], He = U - l[vt], Oe = [$, k].indexOf(w) !== -1, Ve = (Me = B == null ? void 0 : B[g]) != null ? Me : 0, Ne = Oe ? We : U - E[de] - D[de] - Ve + A.altAxis, Fe = Oe ? U + E[de] + D[de] - Ve - A.altAxis : He, qe = p && Oe ? Rt(Ne, U, Fe) : ae(p ? Ne : We, U, p ? Fe : He);
701
+ var Me, pt = v === "x" ? $ : k, vt = v === "x" ? T : S, U = b[g], de = g === "y" ? "height" : "width", We = U + p[pt], He = U - p[vt], Oe = [$, k].indexOf(w) !== -1, Ve = (Me = B == null ? void 0 : B[g]) != null ? Me : 0, Ne = Oe ? We : U - E[de] - D[de] - Ve + A.altAxis, Fe = Oe ? U + E[de] + D[de] - Ve - A.altAxis : He, qe = l && Oe ? Rt(Ne, U, Fe) : ae(l ? Ne : We, U, l ? Fe : He);
702
702
  b[g] = qe, M[g] = qe - U;
703
703
  }
704
704
  t.modifiersData[n] = M;
@@ -711,14 +711,14 @@ const ur = {
711
711
  fn: cr,
712
712
  requiresIfExists: ["offset"]
713
713
  };
714
- function pr(e) {
714
+ function lr(e) {
715
715
  return {
716
716
  scrollLeft: e.scrollLeft,
717
717
  scrollTop: e.scrollTop
718
718
  };
719
719
  }
720
- function lr(e) {
721
- return e === L(e) || !R(e) ? Ce(e) : pr(e);
720
+ function pr(e) {
721
+ return e === L(e) || !R(e) ? Ce(e) : lr(e);
722
722
  }
723
723
  function vr(e) {
724
724
  var t = e.getBoundingClientRect(), r = Z(t.width) / e.offsetWidth || 1, n = Z(t.height) / e.offsetHeight || 1;
@@ -734,7 +734,7 @@ function dr(e, t, r) {
734
734
  y: 0
735
735
  };
736
736
  return (n || !n && !r) && ((V(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
737
- Re(o)) && (s = lr(t)), R(t) ? (i = _(t, !0), i.x += t.clientLeft, i.y += t.clientTop) : o && (i.x = Le(o))), {
737
+ Re(o)) && (s = pr(t)), R(t) ? (i = _(t, !0), i.x += t.clientLeft, i.y += t.clientTop) : o && (i.x = Le(o))), {
738
738
  x: c.left + s.scrollLeft - i.x,
739
739
  y: c.top + s.scrollTop - i.y,
740
740
  width: c.width,
@@ -818,7 +818,7 @@ function br(e) {
818
818
  },
819
819
  attributes: {},
820
820
  styles: {}
821
- }, d = [], h = !1, p = {
821
+ }, d = [], h = !1, l = {
822
822
  state: f,
823
823
  setOptions: function(w) {
824
824
  var x = typeof w == "function" ? w(f.options) : w;
@@ -829,7 +829,7 @@ function br(e) {
829
829
  var O = hr(gr([].concat(n, f.options.modifiers)));
830
830
  return f.orderedModifiers = O.filter(function(v) {
831
831
  return v.enabled;
832
- }), y(), p.update();
832
+ }), y(), l.update();
833
833
  },
834
834
  // Sync update – it will always be executed, even if not necessary. This
835
835
  // is useful for low frequency updates where sync behavior simplifies the
@@ -856,7 +856,7 @@ function br(e) {
856
856
  state: f,
857
857
  options: D,
858
858
  name: P,
859
- instance: p
859
+ instance: l
860
860
  }) || f);
861
861
  }
862
862
  }
@@ -865,8 +865,8 @@ function br(e) {
865
865
  // Async and optimistically optimized update – it will not be executed if
866
866
  // not necessary (debounced to run at most once-per-tick)
867
867
  update: yr(function() {
868
- return new Promise(function(l) {
869
- p.forceUpdate(), l(f);
868
+ return new Promise(function(p) {
869
+ l.forceUpdate(), p(f);
870
870
  });
871
871
  }),
872
872
  destroy: function() {
@@ -874,18 +874,18 @@ function br(e) {
874
874
  }
875
875
  };
876
876
  if (!Ze(s, i))
877
- return p;
878
- p.setOptions(u).then(function(l) {
879
- !h && u.onFirstUpdate && u.onFirstUpdate(l);
877
+ return l;
878
+ l.setOptions(u).then(function(p) {
879
+ !h && u.onFirstUpdate && u.onFirstUpdate(p);
880
880
  });
881
881
  function y() {
882
- f.orderedModifiers.forEach(function(l) {
883
- var w = l.name, x = l.options, O = x === void 0 ? {} : x, v = l.effect;
882
+ f.orderedModifiers.forEach(function(p) {
883
+ var w = p.name, x = p.options, O = x === void 0 ? {} : x, v = p.effect;
884
884
  if (typeof v == "function") {
885
885
  var g = v({
886
886
  state: f,
887
887
  name: w,
888
- instance: p,
888
+ instance: l,
889
889
  options: O
890
890
  }), b = function() {
891
891
  };
@@ -894,14 +894,14 @@ function br(e) {
894
894
  });
895
895
  }
896
896
  function m() {
897
- d.forEach(function(l) {
898
- return l();
897
+ d.forEach(function(p) {
898
+ return p();
899
899
  }), d = [];
900
900
  }
901
- return p;
901
+ return l;
902
902
  };
903
903
  }
904
- var wr = [Xt, sr, Ft, kt, or, er, ur, Wt, rr], xr = /* @__PURE__ */ br({
904
+ var wr = [zt, sr, Ft, kt, or, er, ur, Wt, rr], xr = /* @__PURE__ */ br({
905
905
  defaultModifiers: wr
906
906
  });
907
907
  const Dr = ({
@@ -947,7 +947,7 @@ const Dr = ({
947
947
  ...c,
948
948
  modifiers: [
949
949
  ...(c == null ? void 0 : c.modifiers) ?? [],
950
- Xe(o),
950
+ ze(o),
951
951
  { name: "eventListeners", enabled: !0 }
952
952
  ]
953
953
  }), f.current = new ResizeObserver(() => {
@@ -955,8 +955,8 @@ const Dr = ({
955
955
  }), f.current.observe(h), f.current.observe(d), requestAnimationFrame(() => {
956
956
  u.current && u.current.update();
957
957
  }), () => {
958
- var p, y;
959
- f.current && f.current.disconnect(), f.current = null, u.current && ((y = (p = u.current).destroy) == null || y.call(p)), u.current = null;
958
+ var l, y;
959
+ f.current && f.current.disconnect(), f.current = null, u.current && ((y = (l = u.current).destroy) == null || y.call(l)), u.current = null;
960
960
  };
961
961
  }, [n, e, o, c]), Ae(() => {
962
962
  n && u.current && (u.current.setOptions((d) => ({
@@ -964,7 +964,7 @@ const Dr = ({
964
964
  ...c,
965
965
  modifiers: [
966
966
  ...(c == null ? void 0 : c.modifiers) ?? [],
967
- Xe(o),
967
+ ze(o),
968
968
  { name: "eventListeners", enabled: !0 }
969
969
  ]
970
970
  })), u.current.update());
@@ -972,10 +972,10 @@ const Dr = ({
972
972
  if (!n)
973
973
  return;
974
974
  const d = () => {
975
- const y = (e == null ? void 0 : e.current) ?? null, m = s.map((l) => (l == null ? void 0 : l.current) ?? null).filter(Boolean);
975
+ const y = (e == null ? void 0 : e.current) ?? null, m = s.map((p) => (p == null ? void 0 : p.current) ?? null).filter(Boolean);
976
976
  return { base: y, extras: m };
977
977
  }, h = (y) => {
978
- const m = y.target, l = i.current, { base: w, extras: x } = d(), O = !!(l && l.contains(m)), v = !!(w && w.contains(m));
978
+ const m = y.target, p = i.current, { base: w, extras: x } = d(), O = !!(p && p.contains(m)), v = !!(w && w.contains(m));
979
979
  let g = !1;
980
980
  for (const b of x)
981
981
  if (b.contains(m)) {
@@ -983,11 +983,11 @@ const Dr = ({
983
983
  break;
984
984
  }
985
985
  !O && !v && !g && a(!1);
986
- }, p = (y) => {
986
+ }, l = (y) => {
987
987
  y.key === "Escape" && a(!1);
988
988
  };
989
- return document.addEventListener("mousedown", h), document.addEventListener("keydown", p), () => {
990
- document.removeEventListener("mousedown", h), document.removeEventListener("keydown", p);
989
+ return document.addEventListener("mousedown", h), document.addEventListener("keydown", l), () => {
990
+ document.removeEventListener("mousedown", h), document.removeEventListener("keydown", l);
991
991
  };
992
992
  }, [n, a, e, s]), n ? /* @__PURE__ */ dt(
993
993
  "div",
@@ -995,7 +995,10 @@ const Dr = ({
995
995
  ref: i,
996
996
  "aria-label": "popover",
997
997
  role: "dialog",
998
- className: mt("gi-popover", r),
998
+ className: mt(
999
+ "gi-overflow-y-auto gi-bg-color-surface-system-neutral-layer1 gi-z-[1000] gi-rounded-sm gi-border-[1px] gi-border-color-border-system-neutral-muted [width:inherit]",
1000
+ r
1001
+ ),
999
1002
  children: t
1000
1003
  }
1001
1004
  ) : null;
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { jsxs as a, jsx as s, Fragment as F } from "react/jsx-runtime";
2
+ import { jsxs as a, jsx as u, Fragment as F } from "react/jsx-runtime";
3
3
  import { useId as G } from "react";
4
4
  import { ButtonGroup as j, ButtonGroupItem as w } from "../button-group/button-group.js";
5
5
  import { cn as o } from "../cn.js";
6
6
  import { FormField as O, FormFieldLabel as V, FormFieldHint as E } from "../forms/form-field/form-field.js";
7
7
  import { useBreakpoint as H, Breakpoint as $ } from "../hooks/use-breakpoint.js";
8
- const K = ({
9
- name: B,
10
- size: x = "medium",
8
+ const J = ({
9
+ name: x,
10
+ size: B = "medium",
11
11
  orientation: t = "horizontal",
12
12
  wrapInMobile: I = !0,
13
13
  value: m,
@@ -18,7 +18,7 @@ const K = ({
18
18
  onChange: v,
19
19
  type: f
20
20
  }) => {
21
- const h = G(), b = `${h}-label`, n = d ? `${h}-hint` : void 0, { breakpoint: p } = H(), g = p === $.ExtraSmall || p === $.Small;
21
+ const p = G(), b = `${p}-label`, n = d ? `${p}-hint` : void 0, { breakpoint: h } = H(), g = h === $.ExtraSmall || h === $.Small;
22
22
  let l = [];
23
23
  switch (f) {
24
24
  case "1-5": {
@@ -60,9 +60,9 @@ const K = ({
60
60
  break;
61
61
  }
62
62
  }
63
- const u = t === "vertical" || g && !I, y = () => u ? "gi-score-select-button-group-vertical" : "gi-score-select-button-group-horizontal", z = () => {
63
+ const s = t === "vertical" || g && !I, y = () => s ? "gi-score-select-button-group-vertical" : "gi-score-select-button-group-horizontal", z = () => {
64
64
  var e, r;
65
- return i && c && l.length > 2 && t === "horizontal" && !u && /* @__PURE__ */ a(
65
+ return i && c && l.length > 2 && t === "horizontal" && !s && /* @__PURE__ */ a(
66
66
  "div",
67
67
  {
68
68
  className: o("gi-score-select-labels-responsive"),
@@ -83,11 +83,11 @@ const K = ({
83
83
  );
84
84
  }, S = () => {
85
85
  var e, r;
86
- return (i || c) && /* @__PURE__ */ s(
86
+ return (i || c) && /* @__PURE__ */ u(
87
87
  "div",
88
88
  {
89
89
  className: o("gi-score-select-labels", {
90
- "gi-score-select-labels-vertical": u
90
+ "gi-score-select-labels-vertical": s
91
91
  }),
92
92
  "aria-hidden": "true",
93
93
  children: t === "horizontal" && g ? /* @__PURE__ */ a(F, { children: [
@@ -102,15 +102,15 @@ const K = ({
102
102
  c
103
103
  ] })
104
104
  ] }) : /* @__PURE__ */ a(F, { children: [
105
- /* @__PURE__ */ s("div", { children: i }),
106
- /* @__PURE__ */ s("div", { children: c })
105
+ /* @__PURE__ */ u("div", { children: i }),
106
+ /* @__PURE__ */ u("div", { children: c })
107
107
  ] })
108
108
  }
109
109
  );
110
110
  };
111
111
  return /* @__PURE__ */ a(O, { className: "gi-w-full", children: [
112
- /* @__PURE__ */ s(V, { id: b, children: N }),
113
- d && /* @__PURE__ */ s(E, { id: n, children: d }),
112
+ /* @__PURE__ */ u(V, { id: b, children: N }),
113
+ d && /* @__PURE__ */ u(E, { id: n, children: d }),
114
114
  /* @__PURE__ */ a(
115
115
  "div",
116
116
  {
@@ -120,22 +120,22 @@ const K = ({
120
120
  "aria-describedby": n,
121
121
  children: [
122
122
  z(),
123
- /* @__PURE__ */ s(
123
+ /* @__PURE__ */ u(
124
124
  j,
125
125
  {
126
- name: B,
127
- size: x,
126
+ name: x,
127
+ size: B,
128
128
  defaultValue: m,
129
129
  onChange: (e) => v == null ? void 0 : v(e),
130
130
  role: "radiogroup",
131
131
  "aria-labelledby": b,
132
132
  "aria-describedby": n,
133
- className: o({
134
- "gi-flex-col gi-items-start": u
133
+ className: o("[&_button]:gi-px-0", {
134
+ "gi-flex-col gi-items-start": s
135
135
  }),
136
136
  children: l.map((e) => {
137
137
  var r, k;
138
- return /* @__PURE__ */ s(
138
+ return /* @__PURE__ */ u(
139
139
  w,
140
140
  {
141
141
  value: e.value,
@@ -156,5 +156,5 @@ const K = ({
156
156
  ] });
157
157
  };
158
158
  export {
159
- K as ScoreSelect
159
+ J as ScoreSelect
160
160
  };