@orioncactuscorp/ui 1.9.2 → 1.11.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 (99) hide show
  1. package/README.md +119 -54
  2. package/dist/components/Accordion/Accordion.css +1 -1
  3. package/dist/components/Accordion/Accordion.js +169 -177
  4. package/dist/components/ActionArea/ActionAreaLayout.js +20 -24
  5. package/dist/components/Cell/Cell.css +1 -1
  6. package/dist/components/Cell/Cell.js +57 -58
  7. package/dist/components/CheckMark/CheckMark.css +1 -1
  8. package/dist/components/Checkbox/Checkbox.css +1 -1
  9. package/dist/components/Checkbox/Checkbox.js +50 -51
  10. package/dist/components/Menu/Menu.css +1 -1
  11. package/dist/components/Menu/Menu.module.scss.js +20 -22
  12. package/dist/components/Modal/Modal.css +1 -1
  13. package/dist/components/Modal/Modal.js +585 -575
  14. package/dist/components/Modal/bottomSheetGeometry.js +46 -33
  15. package/dist/components/Modal/modalScrollArbitration.js +71 -49
  16. package/dist/components/Modal/snapPoints.js +42 -38
  17. package/dist/components/Modal/useModalContentBlockTransition.js +49 -44
  18. package/dist/components/Modal/useModalDrag.js +937 -854
  19. package/dist/components/Radio/Radio.css +1 -1
  20. package/dist/components/ScrollArea/ScrollArea.js +197 -200
  21. package/dist/components/Select/Select.js +31 -34
  22. package/dist/components/Switch/Switch.css +1 -1
  23. package/dist/components/Tabs/Tabs.css +1 -0
  24. package/dist/components/Tabs/Tabs.js +208 -0
  25. package/dist/components/Tabs/Tabs.module.scss.js +27 -0
  26. package/dist/components/Tabs.d.ts +6 -0
  27. package/dist/components/Tabs.js +8 -0
  28. package/dist/components/TextArea/TextArea.js +57 -58
  29. package/dist/components/TextInput/TextInput.js +30 -33
  30. package/dist/components/Tooltip/Tooltip.css +1 -1
  31. package/dist/foundations/color.theme.dark.css +1 -1
  32. package/dist/foundations/color.theme.light.css +1 -1
  33. package/dist/foundations/focus.css +1 -0
  34. package/dist/foundations/reset.css +1 -1
  35. package/dist/foundations.css +4 -3
  36. package/dist/index.js +69 -64
  37. package/dist/react/motion.js +31 -35
  38. package/dist/reset.css +1 -1
  39. package/dist/styles.css +14 -12
  40. package/dist/ui/src/components/Accordion/Accordion.d.ts.map +1 -1
  41. package/dist/ui/src/components/ActionArea/ActionAreaLayout.d.ts.map +1 -1
  42. package/dist/ui/src/components/Cell/Cell.d.ts.map +1 -1
  43. package/dist/ui/src/components/CheckMark/types.d.ts +10 -0
  44. package/dist/ui/src/components/CheckMark/types.d.ts.map +1 -1
  45. package/dist/ui/src/components/Checkbox/Checkbox.d.ts.map +1 -1
  46. package/dist/ui/src/components/Checkbox/types.d.ts +16 -0
  47. package/dist/ui/src/components/Checkbox/types.d.ts.map +1 -1
  48. package/dist/ui/src/components/Modal/Modal.d.ts +1 -1
  49. package/dist/ui/src/components/Modal/Modal.d.ts.map +1 -1
  50. package/dist/ui/src/components/Modal/bottomSheetGeometry.d.ts +13 -0
  51. package/dist/ui/src/components/Modal/bottomSheetGeometry.d.ts.map +1 -1
  52. package/dist/ui/src/components/Modal/modalScrollArbitration.d.ts.map +1 -1
  53. package/dist/ui/src/components/Modal/snapPoints.d.ts +3 -1
  54. package/dist/ui/src/components/Modal/snapPoints.d.ts.map +1 -1
  55. package/dist/ui/src/components/Modal/types.d.ts +8 -0
  56. package/dist/ui/src/components/Modal/types.d.ts.map +1 -1
  57. package/dist/ui/src/components/Modal/useModalContentBlockTransition.d.ts.map +1 -1
  58. package/dist/ui/src/components/Modal/useModalDrag.d.ts +27 -10
  59. package/dist/ui/src/components/Modal/useModalDrag.d.ts.map +1 -1
  60. package/dist/ui/src/components/Radio/types.d.ts +16 -0
  61. package/dist/ui/src/components/Radio/types.d.ts.map +1 -1
  62. package/dist/ui/src/components/ScrollArea/ScrollArea.d.ts.map +1 -1
  63. package/dist/ui/src/components/Select/Select.d.ts.map +1 -1
  64. package/dist/ui/src/components/Switch/types.d.ts +10 -0
  65. package/dist/ui/src/components/Switch/types.d.ts.map +1 -1
  66. package/dist/ui/src/components/Tabs/Tabs.d.ts +7 -0
  67. package/dist/ui/src/components/Tabs/Tabs.d.ts.map +1 -0
  68. package/dist/ui/src/components/Tabs/index.d.ts +3 -0
  69. package/dist/ui/src/components/Tabs/index.d.ts.map +1 -0
  70. package/dist/ui/src/components/Tabs/types.d.ts +26 -0
  71. package/dist/ui/src/components/Tabs/types.d.ts.map +1 -0
  72. package/dist/ui/src/components/TextArea/TextArea.d.ts.map +1 -1
  73. package/dist/ui/src/components/TextInput/TextInput.d.ts.map +1 -1
  74. package/dist/ui/src/index.d.ts +2 -0
  75. package/dist/ui/src/index.d.ts.map +1 -1
  76. package/dist/ui/src/react/motion/index.d.ts.map +1 -1
  77. package/dist/ui/src/utils/mergeRefs.d.ts +13 -0
  78. package/dist/ui/src/utils/mergeRefs.d.ts.map +1 -0
  79. package/dist/utils/mergeRefs.js +24 -0
  80. package/dist/vscode/oc-ui-vars.css +13 -0
  81. package/docs/editor-setup.md +42 -0
  82. package/docs/motion.md +665 -0
  83. package/docs/responsive-foundation-profile.md +230 -0
  84. package/docs/scss-helpers.md +189 -0
  85. package/docs/selector-contract.md +260 -0
  86. package/docs/spring.md +382 -0
  87. package/docs/stability.md +62 -0
  88. package/docs/tokens.md +559 -0
  89. package/package.json +9 -4
  90. package/src/scss/foundations/color-theme.test.ts +14 -0
  91. package/src/scss/foundations/color.theme.dark.scss +1 -0
  92. package/src/scss/foundations/color.theme.light.scss +1 -0
  93. package/src/scss/foundations/focus.scss +4 -0
  94. package/src/scss/foundations/focus.test.ts +48 -0
  95. package/src/scss/foundations/reset.scss +9 -4
  96. package/src/scss/foundations/reset.test.ts +32 -0
  97. package/src/scss/index.scss +2 -0
  98. package/src/scss/mixins/_focus.scss +11 -0
  99. package/src/scss/mixins/_focus.test.ts +58 -0
@@ -1,260 +1,252 @@
1
1
  'use client';
2
- import { jsx as d, jsxs as E } from "react/jsx-runtime";
3
- import { useRef as K, useState as $, useCallback as q, useId as O, createContext as z, useContext as B } from "react";
4
- import { MotionExpand as F } from "../../react/motion.js";
5
- import M from "../Interaction/Interaction.js";
2
+ import { jsx as s, jsxs as k } from "react/jsx-runtime";
3
+ import { useRef as T, useState as V, useMemo as U, useId as K, useCallback as M, createContext as $, useContext as q } from "react";
4
+ import { MotionExpand as O } from "../../react/motion.js";
5
+ import { mergeRefs as z } from "../../utils/mergeRefs.js";
6
+ import F from "../Interaction/Interaction.js";
6
7
  import { DisclosureIndicator as G } from "../internal/DisclosureIndicator.js";
7
- import { normalizeSlotIcon as V } from "../internal/slot.js";
8
- import f from "./Accordion.module.scss.js";
9
- const H = z(null), j = z(
8
+ import { normalizeSlotIcon as E } from "../internal/slot.js";
9
+ import m from "./Accordion.module.scss.js";
10
+ const B = $(null), H = $(
10
11
  null
11
12
  );
12
- function S(t) {
13
- const o = B(H);
14
- if (!o)
15
- throw new Error(`${t} must be used within Accordion.`);
16
- return o;
13
+ function S(o) {
14
+ const e = q(B);
15
+ if (!e)
16
+ throw new Error(`${o} must be used within Accordion.`);
17
+ return e;
17
18
  }
18
- function T(t) {
19
- const o = B(j);
20
- if (!o)
21
- throw new Error(`${t} must be used within AccordionItem.`);
22
- return o;
19
+ function j(o) {
20
+ const e = q(H);
21
+ if (!e)
22
+ throw new Error(`${o} must be used within AccordionItem.`);
23
+ return e;
23
24
  }
24
- function R(t, o) {
25
- const e = Array.from(new Set(t.filter(Boolean)));
26
- return o ? e : e.slice(0, 1);
25
+ function P(o, e) {
26
+ const t = Array.from(new Set(o.filter(Boolean)));
27
+ return e ? t : t.slice(0, 1);
27
28
  }
28
- function w(...t) {
29
- return t.filter(Boolean).join(" ");
29
+ function w(...o) {
30
+ return o.filter(Boolean).join(" ");
30
31
  }
31
- function k(t, o) {
32
- typeof t == "function" ? t(o) : t && (t.current = o);
33
- }
34
- function J(t) {
35
- return t ? Array.from(
36
- t.querySelectorAll(
32
+ function J(o) {
33
+ return o ? Array.from(
34
+ o.querySelectorAll(
37
35
  '[data-oc-component="accordion-summary"]:not(:disabled)'
38
36
  )
39
- ).filter((o) => o.getAttribute("aria-hidden") !== "true") : [];
37
+ ).filter((e) => e.getAttribute("aria-hidden") !== "true") : [];
40
38
  }
41
39
  function L({
42
- root: t,
43
- currentTarget: o,
44
- key: e,
40
+ root: o,
41
+ currentTarget: e,
42
+ key: t,
45
43
  loopFocus: r
46
44
  }) {
47
- const u = J(t), a = u.indexOf(o);
45
+ const l = J(o), a = l.indexOf(e);
48
46
  if (a < 0) return;
49
- const c = u.length - 1;
47
+ const c = l.length - 1;
50
48
  let i = a;
51
- e === "Home" ? i = 0 : e === "End" ? i = c : e === "ArrowDown" ? i = a === c ? r ? 0 : c : a + 1 : e === "ArrowUp" && (i = a === 0 ? r ? c : 0 : a - 1), u[i]?.focus();
49
+ t === "Home" ? i = 0 : t === "End" ? i = c : t === "ArrowDown" ? i = a === c ? r ? 0 : c : a + 1 : t === "ArrowUp" && (i = a === 0 ? r ? c : 0 : a - 1), l[i]?.focus();
52
50
  }
53
- function Q(t) {
54
- return t >= 2 && t <= 6;
51
+ function Q(o) {
52
+ return o >= 2 && o <= 6;
55
53
  }
56
- function et({
57
- children: t,
58
- className: o = "",
59
- collapsible: e = !0,
54
+ function no({
55
+ children: o,
56
+ className: e = "",
57
+ collapsible: t = !0,
60
58
  defaultValue: r = [],
61
- disabled: u = !1,
59
+ disabled: l = !1,
62
60
  disableAnimation: a = !1,
63
61
  divider: c = "neutral",
64
62
  loopFocus: i = !0,
65
63
  multiple: n = !0,
66
- onValueChange: A,
67
- ref: y,
68
- value: p,
69
- ...h
64
+ onValueChange: f,
65
+ ref: p,
66
+ value: A,
67
+ ...g
70
68
  }) {
71
- const g = K(null), v = p !== void 0, [I, b] = $(
72
- () => R(r, n)
73
- ), s = R(
74
- v ? p : I,
69
+ const h = T(null), v = A !== void 0, [I, y] = V(
70
+ () => P(r, n)
71
+ ), d = P(
72
+ v ? A : I,
75
73
  n
76
- ), x = (m) => {
77
- g.current = m, k(y, m);
78
- }, D = (m) => {
79
- const C = R(m, n);
80
- v || b(C), A?.(C);
81
- }, P = (m) => {
82
- if (u) return;
83
- if (s.includes(m)) {
84
- if (!e) return;
85
- D(s.filter((N) => N !== m));
74
+ ), b = (x) => {
75
+ const D = P(x, n);
76
+ v || y(D), f?.(D);
77
+ }, C = (x) => {
78
+ if (l) return;
79
+ if (d.includes(x)) {
80
+ if (!t) return;
81
+ b(d.filter((N) => N !== x));
86
82
  return;
87
83
  }
88
- D(n ? [...s, m] : [m]);
84
+ b(n ? [...d, x] : [x]);
89
85
  };
90
- return /* @__PURE__ */ d(
91
- H.Provider,
86
+ return /* @__PURE__ */ s(
87
+ B.Provider,
92
88
  {
93
89
  value: {
94
- value: s,
95
- collapsible: e,
96
- disabled: u,
90
+ value: d,
91
+ collapsible: t,
92
+ disabled: l,
97
93
  divider: c,
98
94
  disableAnimation: a,
99
95
  loopFocus: i,
100
- rootRef: g,
101
- toggleItem: P
96
+ rootRef: h,
97
+ toggleItem: C
102
98
  },
103
- children: /* @__PURE__ */ d(
99
+ children: /* @__PURE__ */ s(
104
100
  "div",
105
101
  {
106
- ref: x,
107
- className: w(f.accordion, f[c], o),
108
- ...h,
102
+ ref: z(h, p),
103
+ className: w(m.accordion, m[c], e),
104
+ ...g,
109
105
  "data-oc-component": "accordion",
110
- "data-oc-disabled": u ? "true" : void 0,
106
+ "data-oc-disabled": l ? "true" : void 0,
111
107
  "data-oc-divider": c,
112
108
  "data-oc-animation": a ? "disabled" : void 0,
113
- children: t
109
+ children: o
114
110
  }
115
111
  )
116
112
  }
117
113
  );
118
114
  }
119
- function nt({
120
- children: t,
121
- className: o = "",
122
- disabled: e = !1,
115
+ function ro({
116
+ children: o,
117
+ className: e = "",
118
+ disabled: t = !1,
123
119
  divider: r,
124
- ref: u,
120
+ ref: l,
125
121
  value: a,
126
122
  ...c
127
123
  }) {
128
- const i = S("AccordionItem"), n = O(), A = i.disabled || e, y = i.value.includes(a), p = r ?? i.divider, [h, g] = $(y), v = q((I) => {
129
- g(
130
- (b) => b === I ? b : I
124
+ const i = S("AccordionItem"), n = K(), f = i.disabled || t, p = i.value.includes(a), A = r ?? i.divider, [g, h] = V(p), v = M((I) => {
125
+ h(
126
+ (y) => y === I ? y : I
131
127
  );
132
128
  }, []);
133
- return /* @__PURE__ */ d(
134
- j.Provider,
129
+ return /* @__PURE__ */ s(
130
+ H.Provider,
135
131
  {
136
132
  value: {
137
133
  value: a,
138
- open: y,
139
- disabled: A,
140
- divider: p,
134
+ open: p,
135
+ disabled: f,
136
+ divider: A,
141
137
  summaryId: `${n}-summary`,
142
138
  detailsId: `${n}-details`,
143
- detailsPresent: h,
139
+ detailsPresent: g,
144
140
  setDetailsPresent: v
145
141
  },
146
- children: /* @__PURE__ */ d(
142
+ children: /* @__PURE__ */ s(
147
143
  "div",
148
144
  {
149
- ref: u,
150
- className: w(f.item, o),
145
+ ref: l,
146
+ className: w(m.item, e),
151
147
  ...c,
152
148
  "data-oc-component": "accordion-item",
153
- "data-oc-disabled": A ? "true" : void 0,
154
- "data-oc-divider": p,
155
- "data-oc-state": y ? "open" : "closed",
156
- children: t
149
+ "data-oc-disabled": f ? "true" : void 0,
150
+ "data-oc-divider": A,
151
+ "data-oc-state": p ? "open" : "closed",
152
+ children: o
157
153
  }
158
154
  )
159
155
  }
160
156
  );
161
157
  }
162
- function rt({
163
- children: t,
164
- className: o = "",
165
- content: e,
158
+ function ao({
159
+ children: o,
160
+ className: e = "",
161
+ content: t,
166
162
  description: r,
167
- disabled: u = !1,
163
+ disabled: l = !1,
168
164
  fillWidth: a = !1,
169
165
  headingLevel: c = 3,
170
166
  interactionVariant: i = "light",
171
167
  leading: n,
172
- onClick: A,
173
- onKeyDown: y,
174
- ref: p,
175
- trailing: h,
176
- type: g = "button",
168
+ onClick: f,
169
+ onKeyDown: p,
170
+ ref: A,
171
+ trailing: g,
172
+ type: h = "button",
177
173
  verticalAlign: v = "top",
178
174
  ...I
179
175
  }) {
180
- const b = S("AccordionSummary"), s = T("AccordionSummary"), x = s.disabled || u, D = s.open && !b.collapsible, P = `h${Q(c) ? c : 3}`, m = e ?? (r ? /* @__PURE__ */ E("span", { "data-oc-part": "text", children: [
181
- /* @__PURE__ */ d("span", { "data-oc-part": "label", children: t }),
182
- /* @__PURE__ */ d("span", { "data-oc-part": "description", children: r })
183
- ] }) : t), C = V(n), N = V(h), U = (l) => {
184
- k(p, l);
185
- };
186
- return /* @__PURE__ */ d(P, { className: f.header, "data-oc-part": "header", children: /* @__PURE__ */ E(
176
+ const y = S("AccordionSummary"), d = j("AccordionSummary"), b = d.disabled || l, C = d.open && !y.collapsible, x = `h${Q(c) ? c : 3}`, D = t ?? (r ? /* @__PURE__ */ k("span", { "data-oc-part": "text", children: [
177
+ /* @__PURE__ */ s("span", { "data-oc-part": "label", children: o }),
178
+ /* @__PURE__ */ s("span", { "data-oc-part": "description", children: r })
179
+ ] }) : o), N = E(n), R = E(g);
180
+ return /* @__PURE__ */ s(x, { className: m.header, "data-oc-part": "header", children: /* @__PURE__ */ k(
187
181
  "button",
188
182
  {
189
- ref: U,
190
- className: w(f.summary, o),
183
+ ref: A,
184
+ className: w(m.summary, e),
191
185
  ...I,
192
- type: g,
193
- disabled: x,
194
- "aria-disabled": x || D ? "true" : I["aria-disabled"],
195
- "aria-expanded": s.open,
196
- "aria-controls": s.open || s.detailsPresent ? s.detailsId : void 0,
197
- id: s.summaryId,
198
- onClick: (l) => {
199
- A?.(l), !(l.defaultPrevented || x || D) && b.toggleItem(s.value);
186
+ type: h,
187
+ disabled: b,
188
+ "aria-disabled": b || C ? "true" : I["aria-disabled"],
189
+ "aria-expanded": d.open,
190
+ "aria-controls": d.open || d.detailsPresent ? d.detailsId : void 0,
191
+ id: d.summaryId,
192
+ onClick: (u) => {
193
+ f?.(u), !(u.defaultPrevented || b || C) && y.toggleItem(d.value);
200
194
  },
201
- onKeyDown: (l) => {
202
- y?.(l), !(l.defaultPrevented || x) && (l.key === "ArrowDown" || l.key === "ArrowUp" || l.key === "Home" || l.key === "End") && (l.preventDefault(), L({
203
- root: b.rootRef.current,
204
- currentTarget: l.currentTarget,
205
- key: l.key,
206
- loopFocus: b.loopFocus
195
+ onKeyDown: (u) => {
196
+ p?.(u), !(u.defaultPrevented || b) && (u.key === "ArrowDown" || u.key === "ArrowUp" || u.key === "Home" || u.key === "End") && (u.preventDefault(), L({
197
+ root: y.rootRef.current,
198
+ currentTarget: u.currentTarget,
199
+ key: u.key,
200
+ loopFocus: y.loopFocus
207
201
  }));
208
202
  },
209
203
  "data-oc-component": "accordion-summary",
210
- "data-oc-disabled": x ? "true" : void 0,
204
+ "data-oc-disabled": b ? "true" : void 0,
211
205
  "data-oc-fill-width": a ? "true" : "false",
212
- "data-oc-state": s.open ? "open" : "closed",
206
+ "data-oc-state": d.open ? "open" : "closed",
213
207
  "data-oc-vertical-align": v,
214
208
  children: [
215
- n ? /* @__PURE__ */ d("span", { "data-oc-part": "leading", children: C }) : null,
216
- /* @__PURE__ */ d("span", { "data-oc-part": "content", children: m }),
217
- h === void 0 ? /* @__PURE__ */ d(
209
+ n ? /* @__PURE__ */ s("span", { "data-oc-part": "leading", children: N }) : null,
210
+ /* @__PURE__ */ s("span", { "data-oc-part": "content", children: D }),
211
+ g === void 0 ? /* @__PURE__ */ s(
218
212
  G,
219
213
  {
220
- className: f.trailing,
221
- open: s.open,
214
+ className: m.trailing,
215
+ open: d.open,
222
216
  part: "trailing",
223
217
  "data-oc-rotate": "true",
224
218
  rotationVariable: "--oc-accordion-chevron-rotation"
225
219
  }
226
- ) : N ? /* @__PURE__ */ d("span", { className: f.trailing, "data-oc-part": "trailing", children: N }) : null,
227
- x ? null : /* @__PURE__ */ d(M, { variant: i, self: !0 })
220
+ ) : R ? /* @__PURE__ */ s("span", { className: m.trailing, "data-oc-part": "trailing", children: R }) : null,
221
+ b ? null : /* @__PURE__ */ s(F, { variant: i, self: !0 })
228
222
  ]
229
223
  }
230
224
  ) });
231
225
  }
232
- function at({
233
- children: t,
234
- className: o = "",
235
- forceMount: e = !1,
226
+ function co({
227
+ children: o,
228
+ className: e = "",
229
+ forceMount: t = !1,
236
230
  ref: r,
237
- region: u = !1,
231
+ region: l = !1,
238
232
  role: a,
239
233
  ...c
240
234
  }) {
241
- const i = S("AccordionDetails"), n = T("AccordionDetails"), { setDetailsPresent: A } = n, y = q(
242
- (p) => {
243
- k(r, p), A(p !== null);
244
- },
245
- [r, A]
235
+ const i = S("AccordionDetails"), n = j("AccordionDetails"), { setDetailsPresent: f } = n, p = U(
236
+ () => z(r, (A) => f(A !== null)),
237
+ [r, f]
246
238
  );
247
- return /* @__PURE__ */ d(
248
- F,
239
+ return /* @__PURE__ */ s(
240
+ O,
249
241
  {
250
- ref: y,
251
- className: w(f.details, o),
242
+ ref: p,
243
+ className: w(m.details, e),
252
244
  open: n.open,
253
- forceMount: e,
245
+ forceMount: t,
254
246
  disableAnimation: i.disableAnimation,
255
247
  intent: "expand",
256
248
  contentProps: {
257
- className: f.panelInner,
249
+ className: m.panelInner,
258
250
  "data-oc-part": "panel-inner"
259
251
  },
260
252
  ...c,
@@ -262,52 +254,52 @@ function at({
262
254
  "aria-labelledby": n.summaryId,
263
255
  id: n.detailsId,
264
256
  inert: n.open ? void 0 : !0,
265
- role: u ? "region" : a,
257
+ role: l ? "region" : a,
266
258
  "data-oc-component": "accordion-details",
267
259
  "data-oc-state": n.open ? "open" : "closed",
268
- children: t
260
+ children: o
269
261
  }
270
262
  );
271
263
  }
272
- function ct({
273
- children: t,
274
- className: o = "",
275
- ref: e,
264
+ function io({
265
+ children: o,
266
+ className: e = "",
267
+ ref: t,
276
268
  ...r
277
269
  }) {
278
- return /* @__PURE__ */ d(
270
+ return /* @__PURE__ */ s(
279
271
  "p",
280
272
  {
281
- ref: e,
282
- className: w(f.description, o),
273
+ ref: t,
274
+ className: w(m.description, e),
283
275
  ...r,
284
276
  "data-oc-component": "accordion-description",
285
- children: t
277
+ children: o
286
278
  }
287
279
  );
288
280
  }
289
- function it({
290
- children: t,
291
- className: o = "",
292
- ref: e,
281
+ function so({
282
+ children: o,
283
+ className: e = "",
284
+ ref: t,
293
285
  ...r
294
286
  }) {
295
- return /* @__PURE__ */ d(
287
+ return /* @__PURE__ */ s(
296
288
  "div",
297
289
  {
298
- ref: e,
299
- className: w(f.content, o),
290
+ ref: t,
291
+ className: w(m.content, e),
300
292
  ...r,
301
293
  "data-oc-component": "accordion-content",
302
- children: t
294
+ children: o
303
295
  }
304
296
  );
305
297
  }
306
298
  export {
307
- it as AccordionContent,
308
- ct as AccordionDescription,
309
- at as AccordionDetails,
310
- nt as AccordionItem,
311
- rt as AccordionSummary,
312
- et as default
299
+ so as AccordionContent,
300
+ io as AccordionDescription,
301
+ co as AccordionDetails,
302
+ ro as AccordionItem,
303
+ ao as AccordionSummary,
304
+ no as default
313
305
  };
@@ -1,28 +1,26 @@
1
1
  'use client';
2
2
  import { jsx as l } from "react/jsx-runtime";
3
- import { useState as L, useCallback as S, useEffect as h, useMemo as N, useContext as O, createContext as C } from "react";
3
+ import { useState as b, useCallback as h, useMemo as L, useEffect as N, useContext as O, createContext as C } from "react";
4
4
  import { ActionArea as x } from "./ActionArea.js";
5
+ import { mergeRefs as R } from "../../utils/mergeRefs.js";
5
6
  import d from "./ActionAreaLayout.module.scss.js";
6
- const p = {
7
+ const v = {
7
8
  canScroll: !1,
8
9
  scrolledToBottom: !0
9
- }, b = 1, v = C(null);
10
+ }, S = 1, p = C(null);
10
11
  function f(...o) {
11
12
  return o.filter(Boolean).join(" ");
12
13
  }
13
- function R(o, t) {
14
- typeof o == "function" ? o(t) : o && (o.current = t);
15
- }
16
14
  function E(o) {
17
- if (!o) return p;
18
- const t = o.scrollHeight - o.scrollTop - o.clientHeight, r = o.scrollHeight - o.clientHeight > b;
15
+ if (!o) return v;
16
+ const t = o.scrollHeight - o.scrollTop - o.clientHeight, r = o.scrollHeight - o.clientHeight > S;
19
17
  return {
20
18
  canScroll: r,
21
- scrolledToBottom: !r || t <= b
19
+ scrolledToBottom: !r || t <= S
22
20
  };
23
21
  }
24
22
  function A(o) {
25
- const t = O(v);
23
+ const t = O(p);
26
24
  if (!t)
27
25
  throw new Error(`${o} must be used within ActionAreaLayout.`);
28
26
  return t;
@@ -36,14 +34,14 @@ function w({
36
34
  ref: r,
37
35
  ...c
38
36
  }) {
39
- const [a, i] = L(p), u = N(
37
+ const [a, i] = b(v), u = L(
40
38
  () => ({
41
39
  ...a,
42
40
  setScrollState: i
43
41
  }),
44
42
  [a]
45
43
  );
46
- return /* @__PURE__ */ l(v.Provider, { value: u, children: /* @__PURE__ */ l(
44
+ return /* @__PURE__ */ l(p.Provider, { value: u, children: /* @__PURE__ */ l(
47
45
  "div",
48
46
  {
49
47
  ...c,
@@ -64,31 +62,29 @@ function _({
64
62
  }) {
65
63
  const { setScrollState: i } = A(
66
64
  "ActionAreaLayout.Body"
67
- ), [u, g] = L(null), n = S(
65
+ ), [u, g] = b(null), n = h(
68
66
  (e) => {
69
67
  i(
70
68
  (s) => H(s, E(e))
71
69
  );
72
70
  },
73
71
  [i]
74
- ), B = S(
75
- (e) => {
76
- g(e), R(c, e), n(e);
77
- },
72
+ ), B = L(
73
+ () => R(g, c, n),
78
74
  [c, n]
79
75
  );
80
- return h(() => {
76
+ return N(() => {
81
77
  const e = u;
82
78
  if (n(e), !e || typeof ResizeObserver > "u")
83
79
  return;
84
- const s = new ResizeObserver(() => n(e)), y = () => {
80
+ const s = new ResizeObserver(() => n(e)), m = () => {
85
81
  s.disconnect(), s.observe(e);
86
82
  for (const T of Array.from(e.children))
87
83
  s.observe(T);
88
84
  n(e);
89
- }, m = typeof MutationObserver > "u" ? void 0 : new MutationObserver(y);
90
- return y(), m?.observe(e, { childList: !0 }), () => {
91
- s.disconnect(), m?.disconnect();
85
+ }, y = typeof MutationObserver > "u" ? void 0 : new MutationObserver(m);
86
+ return m(), y?.observe(e, { childList: !0 }), () => {
87
+ s.disconnect(), y?.disconnect();
92
88
  };
93
89
  }, [u, n]), /* @__PURE__ */ l(
94
90
  "div",
@@ -132,7 +128,7 @@ function j({
132
128
  );
133
129
  return /* @__PURE__ */ l(x, { ...t, background: o === "auto" ? r && !c : o });
134
130
  }
135
- const P = Object.assign(w, {
131
+ const U = Object.assign(w, {
136
132
  Body: _,
137
133
  Footer: F,
138
134
  ActionArea: j
@@ -142,5 +138,5 @@ export {
142
138
  j as ActionAreaLayoutActionArea,
143
139
  _ as ActionAreaLayoutBody,
144
140
  F as ActionAreaLayoutFooter,
145
- P as default
141
+ U as default
146
142
  };
@@ -1 +1 @@
1
- .oc-Cell-module__cell__BDmja{font-size:calc(var(--oc-typo-size-body1) * var(--oc-typo-size-factor, 1));line-height:calc(var(--oc-typo-height-body1) * var(--oc-typo-size-factor, 1));letter-spacing:var(--oc-typo-spacing-body1);display:flex;flex-direction:column;margin-block:calc(-1 * var(--oc-cell-padding));padding:0;color:var(--oc-color-theme-label-normal);list-style:none;--oc-cell-padding: var(--oc-space-item-padding-small);--oc-cell-padding-inline: var(--oc-space-item-padding-medium);--oc-cell-gap: .5em;--oc-cell-icon-size: 1.375rem;--oc-cell-disabled-opacity: .28;--oc-cell-interaction-margin-inline: var(--oc-space-item-padding-xsmall);--oc-cell-interaction-radius: var(--oc-atomic-radius-small);--oc-cell-divider-color: var(--oc-color-theme-line-normal-normal)}.oc-Cell-module__item__r5fW2{position:relative;display:flex;align-items:flex-start;gap:var(--oc-cell-gap);padding-block:var(--oc-cell-padding);min-inline-size:0;color:inherit;transform:scale(var(--oc-cell-press-scale, 1));transition:transform calc(var(--oc-motion-duration-feedback) * var(--oc-motion-duration-factor) * var(--oc-motion-pace-normal) * 1) var(--oc-motion-timing-feedback)}@media(prefers-reduced-motion:reduce){.oc-Cell-module__item__r5fW2{transition:none;transform:none}}.oc-Cell-module__item__r5fW2{--oc-cell-content-min-block-size: var(--oc-typo-height-body1)}.oc-Cell-module__item__r5fW2[data-oc-vertical-align=center]{align-items:center}.oc-Cell-module__item__r5fW2[data-oc-fill-width=true]{padding-inline:var(--oc-cell-padding-inline)}.oc-Cell-module__item__r5fW2[data-oc-fill-width=true]>[data-oc-component=interaction]{--oc-interaction-inset-x: 0;--oc-interaction-radius: 0}.oc-Cell-module__item__r5fW2[data-oc-fill-width=false]>[data-oc-component=interaction]{--oc-interaction-inset-x: calc(-1 * var(--oc-cell-interaction-margin-inline));--oc-interaction-radius: var(--oc-cell-interaction-radius)}.oc-Cell-module__item__r5fW2[data-oc-divider=normal]{--oc-cell-current-divider-color: var(--oc-color-theme-line-normal-normal)}.oc-Cell-module__item__r5fW2[data-oc-divider=neutral]{--oc-cell-current-divider-color: var(--oc-color-theme-line-normal-neutral)}.oc-Cell-module__item__r5fW2[data-oc-divider=alternative]{--oc-cell-current-divider-color: var(--oc-color-theme-line-normal-alternative)}.oc-Cell-module__item__r5fW2[data-oc-divider=none]{--oc-cell-current-divider-color: transparent}.oc-Cell-module__item__r5fW2+.oc-Cell-module__item__r5fW2{border-block-start:1px solid var(--oc-cell-current-divider-color, var(--oc-cell-divider-color));transition:border-color calc(var(--oc-motion-duration-feedback) * var(--oc-motion-duration-factor) * var(--oc-motion-pace-normal) * .5) var(--oc-motion-timing-feedback),transform calc(var(--oc-motion-duration-feedback) * var(--oc-motion-duration-factor) * var(--oc-motion-pace-normal) * 1) var(--oc-motion-timing-feedback)}@media(prefers-reduced-motion:reduce){.oc-Cell-module__item__r5fW2+.oc-Cell-module__item__r5fW2{transform:none;transition-property:border-color;transition-duration:calc(var(--oc-motion-duration-feedback) * var(--oc-motion-duration-factor-reduced) * var(--oc-motion-pace-normal) * .5);transition-timing-function:var(--oc-motion-timing-feedback)}}.oc-Cell-module__item__r5fW2[data-oc-interactive=true]{cursor:pointer;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:focus-visible{outline:none}.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:focus-visible>[data-oc-component=interaction]{opacity:var(--oc-interaction-opacity-focus);transform:scale(1)}@media(hover:hover){.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:hover:not([data-oc-disabled=true])>[data-oc-component=interaction]{opacity:var(--oc-interaction-opacity-hover);transform:scale(1)}}.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:active:not([data-oc-disabled=true]){--oc-cell-press-scale: max(0, 1 + (.9875 - 1) * var(--oc-motion-scale-factor-feedback))}.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:active:not([data-oc-disabled=true])>[data-oc-component=interaction]{opacity:var(--oc-interaction-opacity-active);transform:scale(1)}.oc-Cell-module__item__r5fW2[data-oc-disabled=true]{cursor:not-allowed}.oc-Cell-module__item__r5fW2[data-oc-disabled=true]>:where([data-oc-part=leading],[data-oc-part=content],[data-oc-part=trailing]){opacity:var(--oc-cell-disabled-opacity)}.oc-Cell-module__item__r5fW2[data-oc-disabled=true]>[data-oc-component=interaction]{pointer-events:none}.oc-Cell-module__item__r5fW2>[data-oc-component=interaction]{border-radius:var(--oc-interaction-radius)}.oc-Cell-module__item__r5fW2>[data-oc-part=leading],.oc-Cell-module__item__r5fW2>[data-oc-part=trailing]{position:relative;z-index:2;display:inline-flex;flex:none;align-items:center;min-block-size:var(--oc-cell-content-min-block-size);color:var(--oc-color-theme-label-alternative)}.oc-Cell-module__item__r5fW2>[data-oc-part=leading]>[data-oc-component=svg-icon],.oc-Cell-module__item__r5fW2>[data-oc-part=trailing]>[data-oc-component=svg-icon]{block-size:var(--oc-cell-icon-size)}.oc-Cell-module__item__r5fW2>[data-oc-part=content]{position:relative;z-index:2;display:flex;align-items:center;flex:1;min-block-size:var(--oc-cell-content-min-block-size);min-inline-size:0}.oc-Cell-module__item__r5fW2 [data-oc-part=text]{display:flex;flex-direction:column;gap:var(--oc-space-item-gap-atom);min-inline-size:0}.oc-Cell-module__item__r5fW2 [data-oc-part=label],.oc-Cell-module__item__r5fW2 [data-oc-part=description]{min-inline-size:0}.oc-Cell-module__item__r5fW2 [data-oc-part=description]{font-size:calc(var(--oc-typo-size-label1) * var(--oc-typo-size-factor, 1));line-height:calc(var(--oc-typo-height-label1) * var(--oc-typo-size-factor, 1));letter-spacing:var(--oc-typo-spacing-label1);color:var(--oc-color-theme-label-alternative)}.oc-Cell-module__item__r5fW2>[data-oc-part=trailing]{justify-content:flex-end}@media(hover:hover){.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:hover:not([data-oc-disabled=true]){--oc-cell-current-divider-color: transparent}.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:hover:not([data-oc-disabled=true])+.oc-Cell-module__item__r5fW2{--oc-cell-current-divider-color: transparent}}@media(hover:none){.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:active:not([data-oc-disabled=true]){--oc-cell-current-divider-color: transparent}.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:active:not([data-oc-disabled=true])+.oc-Cell-module__item__r5fW2{--oc-cell-current-divider-color: transparent}}.oc-Cell-module__item__r5fW2[data-oc-interactive=true] :where([data-oc-component=checkbox],[data-oc-component=radio],[data-oc-component=switch]) [data-oc-component=interaction]{display:none}.oc-Cell-module__normal__O7uwW{--oc-cell-divider-color: var(--oc-color-theme-line-normal-normal)}.oc-Cell-module__neutral__Fhigo{--oc-cell-divider-color: var(--oc-color-theme-line-normal-neutral)}.oc-Cell-module__alternative__7dShz{--oc-cell-divider-color: var(--oc-color-theme-line-normal-alternative)}.oc-Cell-module__none__s4kvs{--oc-cell-divider-color: transparent}
1
+ .oc-Cell-module__cell__BDmja{font-size:calc(var(--oc-typo-size-body1) * var(--oc-typo-size-factor, 1));line-height:calc(var(--oc-typo-height-body1) * var(--oc-typo-size-factor, 1));letter-spacing:var(--oc-typo-spacing-body1);display:flex;flex-direction:column;margin-block:calc(-1 * var(--oc-cell-padding));padding:0;color:var(--oc-color-theme-label-normal);list-style:none;--oc-cell-padding: var(--oc-space-item-padding-small);--oc-cell-padding-inline: var(--oc-space-item-padding-medium);--oc-cell-gap: .5em;--oc-cell-icon-size: 1.375rem;--oc-cell-disabled-opacity: .28;--oc-cell-interaction-margin-inline: var(--oc-space-item-padding-xsmall);--oc-cell-interaction-radius: var(--oc-atomic-radius-small);--oc-cell-divider-color: var(--oc-color-theme-line-normal-normal)}.oc-Cell-module__item__r5fW2{position:relative;display:flex;align-items:flex-start;gap:var(--oc-cell-gap);padding-block:var(--oc-cell-padding);min-inline-size:0;color:inherit;transform:scale(var(--oc-cell-press-scale, 1));transition:transform calc(var(--oc-motion-duration-feedback) * var(--oc-motion-duration-factor) * var(--oc-motion-pace-normal) * 1) var(--oc-motion-timing-feedback)}@media(prefers-reduced-motion:reduce){.oc-Cell-module__item__r5fW2{transition:none;transform:none}}.oc-Cell-module__item__r5fW2{--oc-cell-content-min-block-size: var(--oc-typo-height-body1)}.oc-Cell-module__item__r5fW2[data-oc-vertical-align=center]{align-items:center}.oc-Cell-module__item__r5fW2[data-oc-fill-width=true]{padding-inline:var(--oc-cell-padding-inline)}.oc-Cell-module__item__r5fW2[data-oc-fill-width=true]>[data-oc-component=interaction]{--oc-interaction-inset-x: 0;--oc-interaction-radius: 0}.oc-Cell-module__item__r5fW2[data-oc-fill-width=false]>[data-oc-component=interaction]{--oc-interaction-inset-x: calc(-1 * var(--oc-cell-interaction-margin-inline));--oc-interaction-radius: var(--oc-cell-interaction-radius)}.oc-Cell-module__item__r5fW2[data-oc-divider=normal]{--oc-cell-current-divider-color: var(--oc-color-theme-line-normal-normal)}.oc-Cell-module__item__r5fW2[data-oc-divider=neutral]{--oc-cell-current-divider-color: var(--oc-color-theme-line-normal-neutral)}.oc-Cell-module__item__r5fW2[data-oc-divider=alternative]{--oc-cell-current-divider-color: var(--oc-color-theme-line-normal-alternative)}.oc-Cell-module__item__r5fW2[data-oc-divider=none]{--oc-cell-current-divider-color: transparent}.oc-Cell-module__item__r5fW2+.oc-Cell-module__item__r5fW2{border-block-start:1px solid var(--oc-cell-current-divider-color, var(--oc-cell-divider-color));transition:border-color calc(var(--oc-motion-duration-feedback) * var(--oc-motion-duration-factor) * var(--oc-motion-pace-normal) * .5) var(--oc-motion-timing-feedback),transform calc(var(--oc-motion-duration-feedback) * var(--oc-motion-duration-factor) * var(--oc-motion-pace-normal) * 1) var(--oc-motion-timing-feedback)}@media(prefers-reduced-motion:reduce){.oc-Cell-module__item__r5fW2+.oc-Cell-module__item__r5fW2{transform:none;transition-property:border-color;transition-duration:calc(var(--oc-motion-duration-feedback) * var(--oc-motion-duration-factor-reduced) * var(--oc-motion-pace-normal) * .5);transition-timing-function:var(--oc-motion-timing-feedback)}}.oc-Cell-module__item__r5fW2[data-oc-interactive=true]{cursor:pointer;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:focus-visible>[data-oc-component=interaction]{opacity:var(--oc-interaction-opacity-focus);transform:scale(1)}@media(hover:hover){.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:hover:not([data-oc-disabled=true])>[data-oc-component=interaction]{opacity:var(--oc-interaction-opacity-hover);transform:scale(1)}}.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:active:not([data-oc-disabled=true]){--oc-cell-press-scale: max(0, 1 + (.9875 - 1) * var(--oc-motion-scale-factor-feedback))}.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:active:not([data-oc-disabled=true])>[data-oc-component=interaction]{opacity:var(--oc-interaction-opacity-active);transform:scale(1)}.oc-Cell-module__item__r5fW2[data-oc-disabled=true]{cursor:not-allowed}.oc-Cell-module__item__r5fW2[data-oc-disabled=true]>:where([data-oc-part=leading],[data-oc-part=content],[data-oc-part=trailing]){opacity:var(--oc-cell-disabled-opacity)}.oc-Cell-module__item__r5fW2[data-oc-disabled=true]>[data-oc-component=interaction]{pointer-events:none}.oc-Cell-module__item__r5fW2>[data-oc-component=interaction]{border-radius:var(--oc-interaction-radius)}.oc-Cell-module__item__r5fW2>[data-oc-part=leading],.oc-Cell-module__item__r5fW2>[data-oc-part=trailing]{position:relative;z-index:2;display:inline-flex;flex:none;align-items:center;min-block-size:var(--oc-cell-content-min-block-size);color:var(--oc-color-theme-label-alternative)}.oc-Cell-module__item__r5fW2>[data-oc-part=leading]>[data-oc-component=svg-icon],.oc-Cell-module__item__r5fW2>[data-oc-part=trailing]>[data-oc-component=svg-icon]{block-size:var(--oc-cell-icon-size)}.oc-Cell-module__item__r5fW2>[data-oc-part=content]{position:relative;z-index:2;display:flex;align-items:center;flex:1;min-block-size:var(--oc-cell-content-min-block-size);min-inline-size:0}.oc-Cell-module__item__r5fW2 [data-oc-part=text]{display:flex;flex-direction:column;gap:var(--oc-space-item-gap-atom);min-inline-size:0}.oc-Cell-module__item__r5fW2 [data-oc-part=label],.oc-Cell-module__item__r5fW2 [data-oc-part=description]{min-inline-size:0}.oc-Cell-module__item__r5fW2 [data-oc-part=description]{font-size:calc(var(--oc-typo-size-label1) * var(--oc-typo-size-factor, 1));line-height:calc(var(--oc-typo-height-label1) * var(--oc-typo-size-factor, 1));letter-spacing:var(--oc-typo-spacing-label1);color:var(--oc-color-theme-label-alternative)}.oc-Cell-module__item__r5fW2>[data-oc-part=trailing]{justify-content:flex-end}@media(hover:hover){.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:hover:not([data-oc-disabled=true]){--oc-cell-current-divider-color: transparent}.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:hover:not([data-oc-disabled=true])+.oc-Cell-module__item__r5fW2{--oc-cell-current-divider-color: transparent}}@media(hover:none){.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:active:not([data-oc-disabled=true]){--oc-cell-current-divider-color: transparent}.oc-Cell-module__item__r5fW2[data-oc-interactive=true]:active:not([data-oc-disabled=true])+.oc-Cell-module__item__r5fW2{--oc-cell-current-divider-color: transparent}}.oc-Cell-module__item__r5fW2[data-oc-interactive=true] :where([data-oc-component=checkbox],[data-oc-component=radio],[data-oc-component=switch]) [data-oc-component=interaction]{display:none}.oc-Cell-module__normal__O7uwW{--oc-cell-divider-color: var(--oc-color-theme-line-normal-normal)}.oc-Cell-module__neutral__Fhigo{--oc-cell-divider-color: var(--oc-color-theme-line-normal-neutral)}.oc-Cell-module__alternative__7dShz{--oc-cell-divider-color: var(--oc-color-theme-line-normal-alternative)}.oc-Cell-module__none__s4kvs{--oc-cell-divider-color: transparent}