@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
@@ -1,5 +1,5 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { a } from "../index-2sRBqKFV.js";
2
+ import { a } from "../index-ntYL1VRC.js";
3
3
  const f = ({
4
4
  external: o = !1,
5
5
  asChild: r,
@@ -1,13 +1,13 @@
1
1
  import { jsxs as l, jsx as a } from "react/jsx-runtime";
2
- import { cn as t } from "../cn.js";
3
- import { translate as g } from "../i18n/utility.js";
2
+ import { cn as n } from "../cn.js";
3
+ import { translate as t } from "../i18n/utility.js";
4
4
  function d({
5
5
  value: s = 0,
6
6
  max: e = 100,
7
7
  isIndeterminate: r,
8
- label: o
8
+ label: i
9
9
  }) {
10
- const i = s * 100 / e;
10
+ const o = s * 100 / e;
11
11
  return /* @__PURE__ */ l("div", { className: "gi-progress-bar-container", children: [
12
12
  /* @__PURE__ */ a(
13
13
  "div",
@@ -16,7 +16,7 @@ function d({
16
16
  "aria-valuenow": r ? void 0 : s,
17
17
  "aria-valuemin": 0,
18
18
  "aria-valuemax": e,
19
- "aria-label": g("progressBar.progressBar", {
19
+ "aria-label": t("progressBar.progressBar", {
20
20
  defaultValue: "Progress bar"
21
21
  }),
22
22
  "data-testid": "progress-bar",
@@ -24,15 +24,15 @@ function d({
24
24
  children: /* @__PURE__ */ a(
25
25
  "div",
26
26
  {
27
- className: t({
27
+ className: n({
28
28
  "gi-progress-bar-indeterminate": r
29
29
  }),
30
- style: r ? {} : { width: `${i}%` }
30
+ style: r ? {} : { width: `${o}%` }
31
31
  }
32
32
  )
33
33
  }
34
34
  ),
35
- o && /* @__PURE__ */ a("span", { children: o })
35
+ i && /* @__PURE__ */ a("span", { children: i })
36
36
  ] });
37
37
  }
38
38
  export {
@@ -1,8 +1,8 @@
1
- import { jsxs as v, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
2
  import { Children as P } from "react";
3
3
  import { cn as $ } from "../cn.js";
4
4
  import { Icon as z } from "../icon/icon.js";
5
- import { ProgressStepperIndicator as f } from "./types.js";
5
+ import { ProgressStepperIndicator as v } from "./types.js";
6
6
  const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
7
7
  isNextStep: e,
8
8
  orientation: t = "horizontal",
@@ -11,7 +11,7 @@ const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
11
11
  verticalGap: l
12
12
  }) => {
13
13
  const o = t === "vertical" ? { height: j(l) } : void 0;
14
- return /* @__PURE__ */ v(
14
+ return /* @__PURE__ */ f(
15
15
  "div",
16
16
  {
17
17
  "data-orientation": t,
@@ -28,19 +28,19 @@ const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
28
28
  }
29
29
  );
30
30
  }, x = (e) => ({
31
- [f.Hashtag]: {
31
+ [v.Hashtag]: {
32
32
  completed: /* @__PURE__ */ r(z, { icon: "check" }),
33
33
  current: () => "#",
34
34
  next: () => "#"
35
35
  },
36
- [f.Number]: {
36
+ [v.Number]: {
37
37
  completed: /* @__PURE__ */ r(z, { icon: "check" }),
38
38
  current: (s) => s,
39
39
  next: (s) => s
40
40
  }
41
41
  })[e], V = (e, t, s, a) => {
42
42
  const { current: l, completed: o, next: i } = x(
43
- e || f.Hashtag
43
+ e || v.Hashtag
44
44
  );
45
45
  return s ? o : a ? l(t) : i(t);
46
46
  }, B = ({
@@ -58,8 +58,8 @@ const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
58
58
  verticalGap: h
59
59
  }) => {
60
60
  const m = !t && !e, c = l === "vertical" && (e || d || t), p = !!o;
61
- return /* @__PURE__ */ v("div", { className: "gi-relative", children: [
62
- /* @__PURE__ */ v(
61
+ return /* @__PURE__ */ f("div", { className: "gi-relative", children: [
62
+ /* @__PURE__ */ f(
63
63
  "div",
64
64
  {
65
65
  className: "gi-progress-stepper-step-container",
@@ -74,7 +74,7 @@ const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
74
74
  "aria-label": p ? void 0 : g,
75
75
  children: [
76
76
  /* @__PURE__ */ r("div", { className: "gi-progress-stepper-step", "data-indicator": i, children: V(
77
- i || f.Hashtag,
77
+ i || v.Hashtag,
78
78
  a,
79
79
  t,
80
80
  e
@@ -126,7 +126,7 @@ const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
126
126
  }) => {
127
127
  var g, h;
128
128
  const d = (h = (g = e[t]) == null ? void 0 : g.props) == null ? void 0 : h.children, u = s === "horizontal" && d;
129
- return /* @__PURE__ */ v(
129
+ return /* @__PURE__ */ f(
130
130
  "div",
131
131
  {
132
132
  className: $("gi-w-full", {
@@ -1,21 +1,21 @@
1
1
  "use client";
2
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
3
- import k from "react";
4
- import { ButtonGroup as y, ButtonGroupItem as N } from "../button-group/button-group.js";
5
- import { FormField as f } from "../forms/form-field/form-field.js";
2
+ import { jsx as r, jsxs as d } from "react/jsx-runtime";
3
+ import f from "react";
4
+ import { ButtonGroup as k, ButtonGroupItem as y } from "../button-group/button-group.js";
5
+ import { FormField as N } from "../forms/form-field/form-field.js";
6
6
  const G = ({
7
7
  name: p,
8
8
  size: $ = "medium",
9
9
  value: s,
10
10
  label: x,
11
- hint: v,
11
+ hint: i,
12
12
  leftLabel: a,
13
- rightLabel: r,
14
- onChange: i,
13
+ rightLabel: u,
14
+ onChange: c,
15
15
  type: I
16
16
  }) => {
17
- var t, m;
18
- const o = k.useId(), c = `${o}-label`, b = v ? `${o}-hint` : void 0;
17
+ var o, n;
18
+ const t = f.useId(), v = `${t}-label`, b = i ? `${t}-hint` : void 0;
19
19
  let l = [];
20
20
  switch (I) {
21
21
  case "1-5": {
@@ -57,51 +57,51 @@ const G = ({
57
57
  break;
58
58
  }
59
59
  }
60
- return /* @__PURE__ */ u(
61
- f,
60
+ return /* @__PURE__ */ r(
61
+ N,
62
62
  {
63
63
  className: "gi-w-full",
64
- label: { text: x, id: c },
65
- hint: v ? { text: v, id: b } : void 0,
64
+ label: { text: x, id: v },
65
+ hint: i ? { text: i, id: b } : void 0,
66
66
  children: /* @__PURE__ */ d(
67
67
  "div",
68
68
  {
69
69
  className: "gi-score-select-button-group",
70
70
  role: "group",
71
- "aria-labelledby": c,
71
+ "aria-labelledby": v,
72
72
  "aria-describedby": b,
73
73
  children: [
74
- a && r && l.length > 2 && /* @__PURE__ */ d("div", { className: "gi-score-select-labels-responsive", "aria-hidden": "true", children: [
74
+ a && u && l.length > 2 && /* @__PURE__ */ d("div", { className: "gi-score-select-labels-responsive", "aria-hidden": "true", children: [
75
75
  /* @__PURE__ */ d("div", { children: [
76
- (t = l[0]) == null ? void 0 : t.label,
76
+ (o = l[0]) == null ? void 0 : o.label,
77
77
  " – ",
78
78
  a
79
79
  ] }),
80
80
  /* @__PURE__ */ d("div", { children: [
81
- (m = l.at(-1)) == null ? void 0 : m.label,
81
+ (n = l.at(-1)) == null ? void 0 : n.label,
82
82
  " – ",
83
- r
83
+ u
84
84
  ] })
85
85
  ] }),
86
- /* @__PURE__ */ u(
87
- y,
86
+ /* @__PURE__ */ r(
87
+ k,
88
88
  {
89
89
  name: p,
90
90
  size: $,
91
91
  defaultValue: s,
92
- onChange: (e) => i == null ? void 0 : i(e),
92
+ onChange: (e) => c == null ? void 0 : c(e),
93
93
  role: "radiogroup",
94
- "aria-labelledby": c,
94
+ "aria-labelledby": v,
95
95
  "aria-describedby": b,
96
96
  children: l.map((e) => {
97
- var n, h;
98
- return /* @__PURE__ */ u(
99
- N,
97
+ var m, h;
98
+ return /* @__PURE__ */ r(
99
+ y,
100
100
  {
101
101
  value: e.value,
102
102
  role: "radio",
103
103
  "aria-checked": s === e.value,
104
- "aria-label": `${e.label}${a && e.value === ((n = l[0]) == null ? void 0 : n.value) ? ` - ${a}` : ""}${r && e.value === ((h = l.at(-1)) == null ? void 0 : h.value) ? ` - ${r}` : ""}`,
104
+ "aria-label": `${e.label}${a && e.value === ((m = l[0]) == null ? void 0 : m.value) ? ` - ${a}` : ""}${u && e.value === ((h = l.at(-1)) == null ? void 0 : h.value) ? ` - ${u}` : ""}`,
105
105
  children: e.label
106
106
  },
107
107
  e.value
@@ -109,9 +109,9 @@ const G = ({
109
109
  })
110
110
  }
111
111
  ),
112
- (a || r) && /* @__PURE__ */ d("div", { className: "gi-score-select-labels", "aria-hidden": "true", children: [
113
- /* @__PURE__ */ u("div", { children: a }),
114
- /* @__PURE__ */ u("div", { children: r })
112
+ (a || u) && /* @__PURE__ */ d("div", { className: "gi-score-select-labels", "aria-hidden": "true", children: [
113
+ /* @__PURE__ */ r("div", { children: a }),
114
+ /* @__PURE__ */ r("div", { children: u })
115
115
  ] })
116
116
  ]
117
117
  }
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { jsxs as w, Fragment as V, jsx as s } from "react/jsx-runtime";
3
- import f, { memo as B, useEffect as q, useCallback as v, useState as _ } from "react";
3
+ import N, { memo as B, useEffect as q, useCallback as v, useState as _ } from "react";
4
4
  import { Button as A } from "../button/button.js";
5
- import { cn as N } from "../cn.js";
5
+ import { cn as f } from "../cn.js";
6
6
  import { Icon as $ } from "../icon/icon.js";
7
7
  import { Link as G } from "../link/link.js";
8
8
  import { Paragraph as H } from "../paragraph/paragraph.js";
9
- const j = f.createContext(
9
+ const j = N.createContext(
10
10
  void 0
11
11
  ), z = B(
12
12
  ({
@@ -22,41 +22,41 @@ const j = f.createContext(
22
22
  c && /* @__PURE__ */ s("div", { className: "gi-side-nav-expandable-icon", children: /* @__PURE__ */ s(
23
23
  $,
24
24
  {
25
- className: N(e && "gi-rotate-180"),
25
+ className: f(e && "gi-rotate-180"),
26
26
  icon: "keyboard_arrow_down"
27
27
  }
28
28
  ) })
29
29
  ] })
30
- ), J = f.memo(
30
+ ), J = N.memo(
31
31
  ({
32
32
  children: n,
33
33
  primary: i,
34
34
  secondary: c,
35
35
  expandable: e,
36
- label: a,
36
+ label: o,
37
37
  value: t,
38
38
  icon: u,
39
39
  href: m,
40
40
  asChild: g,
41
41
  open: r
42
42
  }) => {
43
- const l = f.useContext(j);
43
+ const l = N.useContext(j);
44
44
  if (!l)
45
45
  throw new Error("SideNavItem must be used within a SideNav");
46
46
  const {
47
- openItemIds: o,
47
+ openItemIds: a,
48
48
  selectedItemId: S,
49
49
  setOpenItemIds: p,
50
50
  setSelectedItemId: C,
51
51
  navId: P
52
- } = l, I = o.includes(t), x = S === t;
52
+ } = l, I = a.includes(t), x = S === t;
53
53
  q(() => {
54
54
  r && p((d) => d.includes(t) ? d : [...d, t]);
55
55
  }, [r, p, t]);
56
56
  const h = v(() => {
57
- const d = I ? o.filter((R) => R !== t) : [...o, t];
57
+ const d = I ? a.filter((R) => R !== t) : [...a, t];
58
58
  p(d);
59
- }, [I, o, p, t]), k = v(() => {
59
+ }, [I, a, p, t]), k = v(() => {
60
60
  C(t);
61
61
  }, [C, t]), E = `${P}-${t}`, O = i && e, b = m !== void 0, D = v(() => {
62
62
  i && e && h(), k();
@@ -65,11 +65,11 @@ const j = f.createContext(
65
65
  d.preventDefault(), i && e ? h() : k();
66
66
  },
67
67
  [i, e, h, k]
68
- ), L = N("gi-side-nav-item", {
68
+ ), L = f("gi-side-nav-item", {
69
69
  "gi-side-nav-item-selected": x,
70
70
  "gi-side-nav-item-primary": i,
71
71
  "gi-side-nav-item-secondary": c
72
- }), M = N("gi-side-nav-item", {
72
+ }), M = f("gi-side-nav-item", {
73
73
  "gi-side-nav-item-selected": x,
74
74
  "gi-side-nav-item-primary": i,
75
75
  "gi-side-nav-item-secondary": c
@@ -78,7 +78,7 @@ const j = f.createContext(
78
78
  "div",
79
79
  {
80
80
  role: "group",
81
- "aria-label": `${a} ${i && e ? "dropdown" : "item"}`,
81
+ "aria-label": `${o} ${i && e ? "dropdown" : "item"}`,
82
82
  children: [
83
83
  b ? /* @__PURE__ */ s(
84
84
  G,
@@ -97,7 +97,7 @@ const j = f.createContext(
97
97
  z,
98
98
  {
99
99
  icon: u,
100
- label: a,
100
+ label: o,
101
101
  showExpandableIcon: O,
102
102
  isOpen: I
103
103
  }
@@ -116,7 +116,7 @@ const j = f.createContext(
116
116
  z,
117
117
  {
118
118
  icon: u,
119
- label: a,
119
+ label: o,
120
120
  showExpandableIcon: O,
121
121
  isOpen: I
122
122
  }
@@ -126,7 +126,7 @@ const j = f.createContext(
126
126
  e && i && /* @__PURE__ */ s(
127
127
  "div",
128
128
  {
129
- className: N(I ? "gi-side-nav-item-content" : "gi-hidden"),
129
+ className: f(I ? "gi-side-nav-item-content" : "gi-hidden"),
130
130
  children: n
131
131
  }
132
132
  )
@@ -135,15 +135,15 @@ const j = f.createContext(
135
135
  );
136
136
  }
137
137
  ), K = B(
138
- ({ children: n, className: i, dataTestid: c, onChange: e, value: a }) => {
138
+ ({ children: n, className: i, dataTestid: c, onChange: e, value: o }) => {
139
139
  const [t, u] = _([]), [m, g] = _(
140
- a
141
- ), r = f.useId(), l = v(
140
+ o
141
+ ), r = N.useId(), l = v(
142
142
  (S) => {
143
143
  g(S), e == null || e(S);
144
144
  },
145
145
  [e]
146
- ), o = f.useMemo(
146
+ ), a = N.useMemo(
147
147
  () => ({
148
148
  openItemIds: t,
149
149
  selectedItemId: m,
@@ -153,10 +153,10 @@ const j = f.createContext(
153
153
  }),
154
154
  [t, m, l, r]
155
155
  );
156
- return /* @__PURE__ */ s(j.Provider, { value: o, children: /* @__PURE__ */ s(
156
+ return /* @__PURE__ */ s(j.Provider, { value: a, children: /* @__PURE__ */ s(
157
157
  "div",
158
158
  {
159
- className: N("gi-side-nav-container", i),
159
+ className: f("gi-side-nav-container", i),
160
160
  "data-testid": c,
161
161
  children: n
162
162
  }
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as i } from "react/jsx-runtime";
3
- import { c as o } from "../index-CB-zPpNk.js";
3
+ import { c as o } from "../index-DNkhmzZp.js";
4
4
  import { cn as l } from "../cn.js";
5
5
  const c = {
6
6
  xl: "gi-w-10 gi-h-10",
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as C, jsxs as h } from "react/jsx-runtime";
3
- import { Children as R, Fragment as y, cloneElement as d, isValidElement as X } from "react";
3
+ import { Children as R, Fragment as y, isValidElement as d, cloneElement as X } from "react";
4
4
  import { cn as c } from "../cn.js";
5
5
  const p = (l) => typeof l == "string" ? {} : {
6
6
  isBaseColumn: l.base === "column",
@@ -168,7 +168,7 @@ const p = (l) => typeof l == "string" ? {} : {
168
168
  children: (() => {
169
169
  const n = R.toArray(l);
170
170
  return n.map((o, i) => /* @__PURE__ */ h(y, { children: [
171
- X(o) ? d(
171
+ d(o) ? X(
172
172
  o,
173
173
  {
174
174
  "data-testid": `govie-stack-item-${i}`
@@ -1,5 +1,5 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import { c as l } from "../index-CB-zPpNk.js";
2
+ import { c as l } from "../index-DNkhmzZp.js";
3
3
  import { cn as r } from "../cn.js";
4
4
  const b = l({
5
5
  base: "gi-table",
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs as d, Fragment as k, jsx as n } from "react/jsx-runtime";
3
3
  import { forwardRef as R, useRef as j, useState as m, useImperativeHandle as p, useEffect as y } from "react";
4
- import { cn as g } from "../cn.js";
4
+ import { cn as u } from "../cn.js";
5
5
  import { HintText as z } from "../hint-text/hint-text.js";
6
6
  import { translate as A } from "../i18n/utility.js";
7
7
  import { Icon as H } from "../icon/icon.js";
@@ -9,8 +9,8 @@ import { IconButton as O } from "../icon-button/icon-button.js";
9
9
  const E = R(
10
10
  ({
11
11
  value: i,
12
- rows: u = 4,
13
- cols: f = 100,
12
+ rows: f = 4,
13
+ cols: g = 100,
14
14
  autoComplete: h = "on",
15
15
  maxChars: t,
16
16
  halfFluid: x = !1,
@@ -44,7 +44,7 @@ const E = R(
44
44
  /* @__PURE__ */ n("div", { className: "gi-textarea-container", children: /* @__PURE__ */ d(
45
45
  "div",
46
46
  {
47
- className: g("gi-textarea-inner", {
47
+ className: u("gi-textarea-inner", {
48
48
  "gi-input-half-width": x
49
49
  }),
50
50
  children: [
@@ -52,10 +52,10 @@ const E = R(
52
52
  /* @__PURE__ */ n(
53
53
  "textarea",
54
54
  {
55
- rows: u,
56
- cols: f,
55
+ rows: f,
56
+ cols: g,
57
57
  autoComplete: h,
58
- className: g(v, "gi-textarea"),
58
+ className: u(v, "gi-textarea"),
59
59
  ref: e,
60
60
  "data-icon-start": !!c,
61
61
  "data-clear-enabled": l,
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsxs as n, jsx as i } from "react/jsx-runtime";
3
- import { c as u } from "../index-CB-zPpNk.js";
3
+ import { c as u } from "../index-DNkhmzZp.js";
4
4
  import { Icon as p } from "../icon/icon.js";
5
5
  import { IconButton as v } from "../icon-button/icon-button.js";
6
6
  import { Link as w } from "../link/link.js";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs as b, jsx as g } from "react/jsx-runtime";
3
3
  import { useState as c, useId as h, useCallback as d, useEffect as v } from "react";
4
- import { c as y } from "../index-CB-zPpNk.js";
4
+ import { c as y } from "../index-DNkhmzZp.js";
5
5
  const T = ["top", "bottom", "left", "right"], E = y({
6
6
  base: "gi-tooltip",
7
7
  variants: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ogcio/design-system-react",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "description": "The GOV IE design system React components.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,8 +31,7 @@
31
31
  "@popperjs/core": "^2.11.8",
32
32
  "@radix-ui/react-slot": "^1.1.2",
33
33
  "clsx": "^2.1.1",
34
- "rollup-preserve-directives": "^1.1.2",
35
- "@ogcio/design-system-tokens": "1.5.3"
34
+ "rollup-preserve-directives": "^1.1.2"
36
35
  },
37
36
  "devDependencies": {
38
37
  "@percy/cli": "^1.30.7",
@@ -51,11 +50,11 @@
51
50
  "postcss-import": "^16.1.0",
52
51
  "react": "19.0.0",
53
52
  "react-dom": "19.0.0",
54
- "@ogcio/design-system-eslint-config": "1.2.5",
55
- "@ogcio/design-system-prettier-config": "1.0.5",
56
53
  "@ogcio/design-system-tailwind": "1.11.0",
57
54
  "@ogcio/theme-doete": "1.0.0",
58
- "@ogcio/theme-govie": "1.5.3"
55
+ "@ogcio/theme-govie": "1.5.3",
56
+ "@ogcio/design-system-prettier-config": "1.0.5",
57
+ "@ogcio/design-system-eslint-config": "1.2.5"
59
58
  },
60
59
  "scripts": {
61
60
  "format": "prettier 'src/**/*.{ts,tsx}' --write",
@@ -1,78 +0,0 @@
1
- import * as i from "react";
2
- import { jsx as f, Fragment as S } from "react/jsx-runtime";
3
- function d(t, e) {
4
- if (typeof t == "function")
5
- return t(e);
6
- t != null && (t.current = e);
7
- }
8
- function g(...t) {
9
- return (e) => {
10
- let r = !1;
11
- const o = t.map((n) => {
12
- const l = d(n, e);
13
- return !r && typeof l == "function" && (r = !0), l;
14
- });
15
- if (r)
16
- return () => {
17
- for (let n = 0; n < o.length; n++) {
18
- const l = o[n];
19
- typeof l == "function" ? l() : d(t[n], null);
20
- }
21
- };
22
- };
23
- }
24
- // @__NO_SIDE_EFFECTS__
25
- function b(t) {
26
- const e = /* @__PURE__ */ C(t), r = i.forwardRef((o, n) => {
27
- const { children: l, ...a } = o, s = i.Children.toArray(l), c = s.find(h);
28
- if (c) {
29
- const u = c.props.children, m = s.map((p) => p === c ? i.Children.count(u) > 1 ? i.Children.only(null) : i.isValidElement(u) ? u.props.children : null : p);
30
- return /* @__PURE__ */ f(e, { ...a, ref: n, children: i.isValidElement(u) ? i.cloneElement(u, void 0, m) : null });
31
- }
32
- return /* @__PURE__ */ f(e, { ...a, ref: n, children: l });
33
- });
34
- return r.displayName = `${t}.Slot`, r;
35
- }
36
- var I = /* @__PURE__ */ b("Slot");
37
- // @__NO_SIDE_EFFECTS__
38
- function C(t) {
39
- const e = i.forwardRef((r, o) => {
40
- const { children: n, ...l } = r;
41
- if (i.isValidElement(n)) {
42
- const a = _(n), s = R(l, n.props);
43
- return n.type !== i.Fragment && (s.ref = o ? g(o, a) : a), i.cloneElement(n, s);
44
- }
45
- return i.Children.count(n) > 1 ? i.Children.only(null) : null;
46
- });
47
- return e.displayName = `${t}.SlotClone`, e;
48
- }
49
- var y = Symbol("radix.slottable");
50
- // @__NO_SIDE_EFFECTS__
51
- function E(t) {
52
- const e = ({ children: r }) => /* @__PURE__ */ f(S, { children: r });
53
- return e.displayName = `${t}.Slottable`, e.__radixId = y, e;
54
- }
55
- var V = /* @__PURE__ */ E("Slottable");
56
- function h(t) {
57
- return i.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === y;
58
- }
59
- function R(t, e) {
60
- const r = { ...e };
61
- for (const o in e) {
62
- const n = t[o], l = e[o];
63
- /^on[A-Z]/.test(o) ? n && l ? r[o] = (...s) => {
64
- const c = l(...s);
65
- return n(...s), c;
66
- } : n && (r[o] = n) : o === "style" ? r[o] = { ...n, ...l } : o === "className" && (r[o] = [n, l].filter(Boolean).join(" "));
67
- }
68
- return { ...t, ...r };
69
- }
70
- function _(t) {
71
- var o, n;
72
- let e = (o = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : o.get, r = e && "isReactWarning" in e && e.isReactWarning;
73
- return r ? t.ref : (e = (n = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : n.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? t.props.ref : t.props.ref || t.ref);
74
- }
75
- export {
76
- V as S,
77
- I as a
78
- };