@marigold/components 11.0.2 → 11.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +422 -404
  2. package/dist/index.mjs +323 -299
  3. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -95,7 +95,7 @@ __export(index_exports, {
95
95
  Text: () => _Text,
96
96
  TextArea: () => _TextArea,
97
97
  TextField: () => _TextField,
98
- ThemeProvider: () => import_system16.ThemeProvider,
98
+ ThemeProvider: () => import_system14.ThemeProvider,
99
99
  Tiles: () => Tiles,
100
100
  Tooltip: () => _Tooltip,
101
101
  Underlay: () => Underlay,
@@ -108,7 +108,7 @@ __export(index_exports, {
108
108
  useFieldGroupContext: () => useFieldGroupContext,
109
109
  useListData: () => import_data.useListData,
110
110
  usePortalContainer: () => usePortalContainer,
111
- useTheme: () => import_system16.useTheme
111
+ useTheme: () => import_system14.useTheme
112
112
  });
113
113
  module.exports = __toCommonJS(index_exports);
114
114
 
@@ -116,8 +116,8 @@ module.exports = __toCommonJS(index_exports);
116
116
  var import_data = require("@react-stately/data");
117
117
 
118
118
  // src/Accordion/Accordion.tsx
119
- var import_react_aria_components6 = require("react-aria-components");
120
- var import_system5 = require("@marigold/system");
119
+ var import_react_aria_components4 = require("react-aria-components");
120
+ var import_system3 = require("@marigold/system");
121
121
 
122
122
  // src/Accordion/AccordionContext.tsx
123
123
  var import_react = require("react");
@@ -133,134 +133,38 @@ var useAccordionContext = () => {
133
133
  return ctx;
134
134
  };
135
135
 
136
- // src/Accordion/AccordionHeading.tsx
137
- var import_react_aria_components3 = require("react-aria-components");
138
- var import_system4 = require("@marigold/system");
139
-
140
- // src/Button/Button.tsx
141
- var import_react2 = require("react");
142
- var import_react_aria_components2 = require("react-aria-components");
136
+ // src/Accordion/AccordionHeader.tsx
137
+ var import_react3 = require("react");
138
+ var import_react_aria_components = require("react-aria-components");
143
139
  var import_system2 = require("@marigold/system");
144
140
 
145
- // src/ProgressCycle/ProgressCycle.tsx
146
- var import_react_aria_components = require("react-aria-components");
141
+ // src/icons/ChevronDown.tsx
142
+ var import_react2 = require("react");
147
143
  var import_system = require("@marigold/system");
148
144
  var import_jsx_runtime = require("react/jsx-runtime");
149
- var ProgressCycle = ({
150
- size = "16",
151
- ...props
152
- }) => {
153
- let strokeWidth = 3;
154
- if (size <= "24") {
155
- strokeWidth = 2;
156
- } else if (size >= "32") {
157
- strokeWidth = 4;
158
- }
159
- const radius = `calc(50% - ${strokeWidth / 2}px)`;
160
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_aria_components.ProgressBar, { ...props, "aria-label": "loading", isIndeterminate: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
161
- import_system.SVG,
162
- {
163
- className: "animate-rotate-spinner origin-center fill-none",
164
- size,
165
- "aria-hidden": "true",
166
- role: "img",
167
- children: [
168
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
169
- "circle",
170
- {
171
- cx: "50%",
172
- cy: "50%",
173
- r: radius,
174
- strokeWidth,
175
- className: "stroke-transparent"
176
- }
177
- ),
178
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
179
- "circle",
180
- {
181
- cx: "50%",
182
- cy: "50%",
183
- r: radius,
184
- strokeWidth,
185
- pathLength: "100",
186
- strokeDasharray: "100 200",
187
- strokeDashoffset: "0",
188
- strokeLinecap: "round",
189
- className: "animate-progress-cycle origin-center -rotate-90 stroke-gray-800"
190
- }
191
- )
192
- ]
193
- }
194
- ) });
195
- };
196
-
197
- // src/Button/Button.tsx
198
- var import_jsx_runtime2 = require("react/jsx-runtime");
199
- var _Button = (0, import_react2.forwardRef)(
200
- ({
201
- children,
202
- variant,
203
- size,
204
- className,
205
- disabled,
206
- loading,
207
- fullWidth,
208
- ...props
209
- }, ref) => {
210
- const classNames2 = (0, import_system2.useClassNames)({
211
- component: "Button",
212
- variant,
213
- size,
214
- className
215
- });
216
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
217
- import_react_aria_components2.Button,
218
- {
219
- ...props,
220
- ref,
221
- className: (0, import_system2.cn)(
222
- "inline-flex items-center justify-center gap-[0.5ch]",
223
- classNames2,
224
- fullWidth ? "w-full" : void 0,
225
- loading && "cursor-progress!"
226
- ),
227
- isPending: loading,
228
- isDisabled: disabled,
229
- children: loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
230
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "absolute", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ProgressCycle, {}) }),
231
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "invisible flex gap-[inherit]", children })
232
- ] }) : children
233
- }
234
- );
235
- }
236
- );
237
-
238
- // src/icons/ChevronRight.tsx
239
- var import_react3 = require("react");
240
- var import_system3 = require("@marigold/system");
241
- var import_jsx_runtime3 = require("react/jsx-runtime");
242
- var ChevronRight = (0, import_react3.forwardRef)(
243
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_system3.SVG, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7.125 18.0244L13.1363 12L7.125 5.97563L8.97563 4.125L16.8506 12L8.97563 19.875L7.125 18.0244Z" }) })
145
+ var ChevronDown = (0, import_react2.forwardRef)(
146
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_system.SVG, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M5.97563 7.125L12 13.1363L18.0244 7.125L19.875 8.97563L12 16.8506L4.125 8.97563L5.97563 7.125Z" }) })
244
147
  );
245
148
 
246
- // src/Accordion/AccordionHeading.tsx
247
- var import_jsx_runtime4 = require("react/jsx-runtime");
149
+ // src/Accordion/AccordionHeader.tsx
150
+ var import_jsx_runtime2 = require("react/jsx-runtime");
248
151
  var AccordionHeader = ({ children }) => {
249
152
  const { classNames: classNames2 } = useAccordionContext();
250
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_aria_components3.Heading, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(_Button, { slot: "trigger", className: (0, import_system4.cn)("group", classNames2.header), children: [
153
+ const { isExpanded } = (0, import_react3.useContext)(import_react_aria_components.DisclosureStateContext);
154
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_aria_components.Heading, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_aria_components.Button, { slot: "trigger", className: classNames2.header, children: [
251
155
  children,
252
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
253
- ChevronRight,
156
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
157
+ ChevronDown,
254
158
  {
255
- className: (0, import_system4.cn)(classNames2.icon, "group-aria-expanded:rotate-90")
159
+ className: (0, import_system2.cn)(classNames2.icon, isExpanded && "rotate-180")
256
160
  }
257
161
  )
258
162
  ] }) });
259
163
  };
260
164
 
261
165
  // src/Accordion/AccordionItem.tsx
262
- var import_react_aria_components4 = require("react-aria-components");
263
- var import_jsx_runtime5 = require("react/jsx-runtime");
166
+ var import_react_aria_components2 = require("react-aria-components");
167
+ var import_jsx_runtime3 = require("react/jsx-runtime");
264
168
  var AccordionItem = ({
265
169
  children,
266
170
  disabled,
@@ -268,8 +172,8 @@ var AccordionItem = ({
268
172
  ...props
269
173
  }) => {
270
174
  const { classNames: classNames2 } = useAccordionContext();
271
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
272
- import_react_aria_components4.Disclosure,
175
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
176
+ import_react_aria_components2.Disclosure,
273
177
  {
274
178
  isDisabled: disabled,
275
179
  isExpanded: expanded,
@@ -281,15 +185,15 @@ var AccordionItem = ({
281
185
  };
282
186
 
283
187
  // src/Accordion/AccordionPanel.tsx
284
- var import_react_aria_components5 = require("react-aria-components");
285
- var import_jsx_runtime6 = require("react/jsx-runtime");
188
+ var import_react_aria_components3 = require("react-aria-components");
189
+ var import_jsx_runtime4 = require("react/jsx-runtime");
286
190
  var AccordionPanel = ({ children }) => {
287
191
  const { classNames: classNames2 } = useAccordionContext();
288
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_aria_components5.DisclosurePanel, { className: classNames2.content, children });
192
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_aria_components3.DisclosurePanel, { className: classNames2.content, children });
289
193
  };
290
194
 
291
195
  // src/Accordion/Accordion.tsx
292
- var import_jsx_runtime7 = require("react/jsx-runtime");
196
+ var import_jsx_runtime5 = require("react/jsx-runtime");
293
197
  var Accordion = ({
294
198
  children,
295
199
  disabled,
@@ -297,9 +201,9 @@ var Accordion = ({
297
201
  size,
298
202
  ...props
299
203
  }) => {
300
- const classNames2 = (0, import_system5.useClassNames)({ component: "Accordion", variant, size });
301
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AccordionProvider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
302
- import_react_aria_components6.DisclosureGroup,
204
+ const classNames2 = (0, import_system3.useClassNames)({ component: "Accordion", variant, size });
205
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AccordionProvider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
206
+ import_react_aria_components4.DisclosureGroup,
303
207
  {
304
208
  ...props,
305
209
  isDisabled: disabled,
@@ -314,8 +218,8 @@ Accordion.Item = AccordionItem;
314
218
 
315
219
  // src/Aside/Aside.tsx
316
220
  var import_react4 = require("react");
317
- var import_system6 = require("@marigold/system");
318
- var import_jsx_runtime8 = require("react/jsx-runtime");
221
+ var import_system4 = require("@marigold/system");
222
+ var import_jsx_runtime6 = require("react/jsx-runtime");
319
223
  var classNames = {
320
224
  aside: "grow basis-(--sideWidth)",
321
225
  content: "basis-0 grow-999 [min-inline-size:var(--wrap)]"
@@ -329,11 +233,11 @@ var Aside = ({
329
233
  }) => {
330
234
  const [left, right] = import_react4.Children.toArray(children);
331
235
  const vars = {
332
- aside: (0, import_system6.createVar)({ sideWidth }),
333
- content: (0, import_system6.createVar)({ wrap })
236
+ aside: (0, import_system4.createVar)({ sideWidth }),
237
+ content: (0, import_system4.createVar)({ wrap })
334
238
  };
335
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_system6.cn)("flex flex-wrap", import_system6.gapSpace[space]), children: [
336
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
239
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: (0, import_system4.cn)("flex flex-wrap", import_system4.gapSpace[space]), children: [
240
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
337
241
  "div",
338
242
  {
339
243
  className: classNames[side === "left" ? "aside" : "content"],
@@ -341,7 +245,7 @@ var Aside = ({
341
245
  children: left
342
246
  }
343
247
  ),
344
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
248
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
345
249
  "div",
346
250
  {
347
251
  className: classNames[side === "right" ? "aside" : "content"],
@@ -353,22 +257,22 @@ var Aside = ({
353
257
  };
354
258
 
355
259
  // src/Aspect/Aspect.tsx
356
- var import_system7 = require("@marigold/system");
357
- var import_jsx_runtime9 = require("react/jsx-runtime");
260
+ var import_system5 = require("@marigold/system");
261
+ var import_jsx_runtime7 = require("react/jsx-runtime");
358
262
  var Aspect = ({
359
263
  ratio = "square",
360
264
  maxWidth,
361
265
  children
362
266
  }) => {
363
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
267
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
364
268
  "div",
365
269
  {
366
- className: (0, import_system7.cn)(
270
+ className: (0, import_system5.cn)(
367
271
  "overflow-hidden",
368
- import_system7.aspect[ratio],
272
+ import_system5.aspect[ratio],
369
273
  "max-w-[var(--maxWidth)]"
370
274
  ),
371
- style: (0, import_system7.createVar)({ maxWidth }),
275
+ style: (0, import_system5.createVar)({ maxWidth }),
372
276
  children
373
277
  }
374
278
  );
@@ -376,26 +280,26 @@ var Aspect = ({
376
280
 
377
281
  // src/Autocomplete/Autocomplete.tsx
378
282
  var import_react14 = __toESM(require("react"));
379
- var import_react_aria_components16 = require("react-aria-components");
380
- var import_system19 = require("@marigold/system");
283
+ var import_react_aria_components14 = require("react-aria-components");
284
+ var import_system17 = require("@marigold/system");
381
285
 
382
286
  // src/FieldBase/FieldBase.tsx
383
287
  var import_react7 = require("react");
384
- var import_system10 = require("@marigold/system");
288
+ var import_system8 = require("@marigold/system");
385
289
 
386
290
  // src/HelpText/HelpText.tsx
387
291
  var import_react5 = require("react");
388
- var import_react_aria_components7 = require("react-aria-components");
389
- var import_system8 = require("@marigold/system");
390
- var import_jsx_runtime10 = require("react/jsx-runtime");
391
- var Icon = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
292
+ var import_react_aria_components5 = require("react-aria-components");
293
+ var import_system6 = require("@marigold/system");
294
+ var import_jsx_runtime8 = require("react/jsx-runtime");
295
+ var Icon = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
392
296
  "svg",
393
297
  {
394
- className: (0, import_system8.cn)("h-4 w-4 shrink-0", className),
298
+ className: (0, import_system6.cn)("h-4 w-4 shrink-0", className),
395
299
  viewBox: "0 0 24 24",
396
300
  role: "presentation",
397
301
  fill: "currentColor",
398
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M2.25 20.3097H21.75L12 3.46875L2.25 20.3097ZM12.8864 17.2606H11.1136V15.4879H12.8864V17.2606ZM12.8864 13.7151H11.1136V10.1697H12.8864V13.7151Z" })
302
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M2.25 20.3097H21.75L12 3.46875L2.25 20.3097ZM12.8864 17.2606H11.1136V15.4879H12.8864V17.2606ZM12.8864 13.7151H11.1136V10.1697H12.8864V13.7151Z" })
399
303
  }
400
304
  );
401
305
  var HelpText = ({
@@ -405,64 +309,64 @@ var HelpText = ({
405
309
  errorMessage,
406
310
  ...props
407
311
  }) => {
408
- const classNames2 = (0, import_system8.useClassNames)({
312
+ const classNames2 = (0, import_system6.useClassNames)({
409
313
  component: "HelpText",
410
314
  variant,
411
315
  size
412
316
  });
413
- const ctx = (0, import_react5.useContext)(import_react_aria_components7.FieldErrorContext);
317
+ const ctx = (0, import_react5.useContext)(import_react_aria_components5.FieldErrorContext);
414
318
  if (!description && ctx && !ctx.isInvalid) {
415
319
  return null;
416
320
  }
417
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: (0, import_system8.cn)(classNames2.container), children: [
418
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_aria_components7.FieldError, { ...props, className: "flex flex-col", children: (validation) => {
321
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_system6.cn)(classNames2.container), children: [
322
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_aria_components5.FieldError, { ...props, className: "flex flex-col", children: (validation) => {
419
323
  const messages = (typeof errorMessage === "function" ? errorMessage(validation) : errorMessage) || validation.validationErrors;
420
- return Array.isArray(messages) ? messages.map((msg, idx) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-start gap-1", children: [
421
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { className: classNames2.icon }),
324
+ return Array.isArray(messages) ? messages.map((msg, idx) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-start gap-1", children: [
325
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { className: classNames2.icon }),
422
326
  msg
423
- ] }, idx)) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-start gap-1", children: [
424
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { className: classNames2.icon }),
327
+ ] }, idx)) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-start gap-1", children: [
328
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { className: classNames2.icon }),
425
329
  messages
426
330
  ] });
427
331
  } }),
428
- ctx && ctx.isInvalid ? null : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_aria_components7.Text, { slot: "description", children: description })
332
+ ctx && ctx.isInvalid ? null : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_aria_components5.Text, { slot: "description", children: description })
429
333
  ] });
430
334
  };
431
335
 
432
336
  // src/Label/Label.tsx
433
- var import_react_aria_components8 = require("react-aria-components");
434
- var import_system9 = require("@marigold/system");
337
+ var import_react_aria_components6 = require("react-aria-components");
338
+ var import_system7 = require("@marigold/system");
435
339
 
436
340
  // src/FieldBase/FieldGroup.tsx
437
341
  var import_react6 = require("react");
438
- var import_jsx_runtime11 = require("react/jsx-runtime");
342
+ var import_jsx_runtime9 = require("react/jsx-runtime");
439
343
  var FieldGroupContext = (0, import_react6.createContext)({});
440
344
  var useFieldGroupContext = () => (0, import_react6.useContext)(FieldGroupContext);
441
345
  var FieldGroup = ({ labelWidth, children }) => {
442
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FieldGroupContext.Provider, { value: { labelWidth }, children });
346
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FieldGroupContext.Provider, { value: { labelWidth }, children });
443
347
  };
444
348
 
445
349
  // src/Label/Label.tsx
446
- var import_jsx_runtime12 = require("react/jsx-runtime");
350
+ var import_jsx_runtime10 = require("react/jsx-runtime");
447
351
  var _Label = ({ size, variant, children, ...props }) => {
448
- const classNames2 = (0, import_system9.useClassNames)({ component: "Label", size, variant });
352
+ const classNames2 = (0, import_system7.useClassNames)({ component: "Label", size, variant });
449
353
  const { labelWidth } = useFieldGroupContext();
450
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
451
- import_react_aria_components8.Label,
354
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
355
+ import_react_aria_components6.Label,
452
356
  {
453
357
  ...props,
454
- className: (0, import_system9.cn)(classNames2.container, "flex w-[var(--labelWidth)]"),
455
- style: (0, import_system9.createVar)({ labelWidth }),
358
+ className: (0, import_system7.cn)(classNames2.container, "flex w-[var(--labelWidth)]"),
359
+ style: (0, import_system7.createVar)({ labelWidth }),
456
360
  children: [
457
361
  children,
458
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
459
- import_system9.SVG,
362
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
363
+ import_system7.SVG,
460
364
  {
461
365
  viewBox: "0 0 24 24",
462
366
  role: "presentation",
463
367
  size: 16,
464
- className: (0, import_system9.cn)("hidden", classNames2.indicator),
465
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M10.8 3.84003H13.2V9.85259L18.1543 7.01815L19.3461 9.10132L14.3584 11.9549L19.3371 14.7999L18.1463 16.8836L13.2 14.0572V20.16H10.8V13.9907L5.76116 16.8735L4.56935 14.7903L9.5232 11.9561L4.56 9.12003L5.75073 7.03624L10.8 9.92154V3.84003Z" })
368
+ className: (0, import_system7.cn)("hidden", classNames2.indicator),
369
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M10.8 3.84003H13.2V9.85259L18.1543 7.01815L19.3461 9.10132L14.3584 11.9549L19.3371 14.7999L18.1463 16.8836L13.2 14.0572V20.16H10.8V13.9907L5.76116 16.8735L4.56935 14.7903L9.5232 11.9561L4.56 9.12003L5.75073 7.03624L10.8 9.92154V3.84003Z" })
466
370
  }
467
371
  )
468
372
  ]
@@ -471,7 +375,7 @@ var _Label = ({ size, variant, children, ...props }) => {
471
375
  };
472
376
 
473
377
  // src/FieldBase/FieldBase.tsx
474
- var import_jsx_runtime13 = require("react/jsx-runtime");
378
+ var import_jsx_runtime11 = require("react/jsx-runtime");
475
379
  var fixedForwardRef = import_react7.forwardRef;
476
380
  var _FieldBase = (props, ref) => {
477
381
  const {
@@ -487,18 +391,18 @@ var _FieldBase = (props, ref) => {
487
391
  stateProps,
488
392
  ...rest
489
393
  } = props;
490
- const classNames2 = (0, import_system10.useClassNames)({
394
+ const classNames2 = (0, import_system8.useClassNames)({
491
395
  component: "Field",
492
396
  variant,
493
397
  size
494
398
  });
495
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
399
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
496
400
  Component,
497
401
  {
498
402
  ref,
499
- className: (0, import_system10.cn)(
403
+ className: (0, import_system8.cn)(
500
404
  "group/field",
501
- import_system10.width[width],
405
+ import_system8.width[width],
502
406
  classNames2,
503
407
  className,
504
408
  !label && `gap-x-0`
@@ -507,9 +411,9 @@ var _FieldBase = (props, ref) => {
507
411
  "data-error": props.isInvalid ? true : void 0,
508
412
  ...rest,
509
413
  children: [
510
- label ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(_Label, { variant, size, children: label }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { "aria-hidden": "true" }),
414
+ label ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(_Label, { variant, size, children: label }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "aria-hidden": "true" }),
511
415
  children,
512
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
416
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
513
417
  HelpText,
514
418
  {
515
419
  variant,
@@ -526,25 +430,25 @@ var FieldBase = fixedForwardRef(_FieldBase);
526
430
 
527
431
  // src/Input/SearchInput.tsx
528
432
  var import_react9 = require("react");
529
- var import_react_aria_components10 = require("react-aria-components");
433
+ var import_react_aria_components8 = require("react-aria-components");
530
434
  var import_i18n = require("@react-aria/i18n");
531
- var import_system12 = require("@marigold/system");
435
+ var import_system10 = require("@marigold/system");
532
436
 
533
437
  // src/Input/Input.tsx
534
438
  var import_react8 = require("react");
535
- var import_react_aria_components9 = require("react-aria-components");
536
- var import_system11 = require("@marigold/system");
537
- var import_jsx_runtime14 = require("react/jsx-runtime");
439
+ var import_react_aria_components7 = require("react-aria-components");
440
+ var import_system9 = require("@marigold/system");
441
+ var import_jsx_runtime12 = require("react/jsx-runtime");
538
442
  var _Input = (0, import_react8.forwardRef)(
539
443
  ({ type, icon, action, variant, size, className, ...props }, ref) => {
540
- const classNames2 = (0, import_system11.useClassNames)({
444
+ const classNames2 = (0, import_system9.useClassNames)({
541
445
  component: "Input",
542
446
  variant,
543
447
  size
544
448
  });
545
449
  const inputIcon = icon ? (0, import_react8.cloneElement)(icon, {
546
450
  ...icon.props,
547
- className: (0, import_system11.cn)(
451
+ className: (0, import_system9.cn)(
548
452
  "pointer-events-none absolute",
549
453
  classNames2.icon,
550
454
  icon.props.className
@@ -552,13 +456,13 @@ var _Input = (0, import_react8.forwardRef)(
552
456
  }) : null;
553
457
  const inputAction = action && !props.readOnly ? (0, import_react8.cloneElement)(action, {
554
458
  ...action.props,
555
- className: (0, import_system11.cn)(
459
+ className: (0, import_system9.cn)(
556
460
  "absolute right-0",
557
461
  classNames2.action,
558
462
  action.props.className
559
463
  )
560
464
  }) : null;
561
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
465
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
562
466
  "div",
563
467
  {
564
468
  className: "group/input relative flex items-center",
@@ -566,11 +470,11 @@ var _Input = (0, import_react8.forwardRef)(
566
470
  "data-action": action && "",
567
471
  children: [
568
472
  inputIcon,
569
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
570
- import_react_aria_components9.Input,
473
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
474
+ import_react_aria_components7.Input,
571
475
  {
572
476
  ...props,
573
- className: (0, import_system11.cn)(
477
+ className: (0, import_system9.cn)(
574
478
  "w-full flex-1",
575
479
  "disabled:cursor-not-allowed",
576
480
  "[&[type=file]]:border-none [&[type=file]]:p-0",
@@ -590,7 +494,7 @@ var _Input = (0, import_react8.forwardRef)(
590
494
  );
591
495
 
592
496
  // src/Input/SearchInput.tsx
593
- var import_jsx_runtime15 = require("react/jsx-runtime");
497
+ var import_jsx_runtime13 = require("react/jsx-runtime");
594
498
  var intlMessages = {
595
499
  "de-DE": {
596
500
  "Clear search": "Suche zur\xFCcksetzen"
@@ -602,7 +506,7 @@ var intlMessages = {
602
506
  "Clear search": "Effacer la recherche"
603
507
  }
604
508
  };
605
- var SearchIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
509
+ var SearchIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
606
510
  "svg",
607
511
  {
608
512
  xmlns: "http://www.w3.org/2000/svg",
@@ -611,31 +515,31 @@ var SearchIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
611
515
  width: 24,
612
516
  height: 24,
613
517
  ...props,
614
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M16.1865 14.5142H15.3057L14.9936 14.2131C16.0862 12.9421 16.744 11.292 16.744 9.497C16.744 5.49443 13.4996 2.25 9.497 2.25C5.49443 2.25 2.25 5.49443 2.25 9.497C2.25 13.4996 5.49443 16.744 9.497 16.744C11.292 16.744 12.9421 16.0862 14.2131 14.9936L14.5142 15.3057V16.1865L20.0888 21.75L21.75 20.0888L16.1865 14.5142ZM9.49701 14.5142C6.72085 14.5142 4.47986 12.2732 4.47986 9.49701C4.47986 6.72085 6.72085 4.47986 9.49701 4.47986C12.2732 4.47986 14.5142 6.72085 14.5142 9.49701C14.5142 12.2732 12.2732 14.5142 9.49701 14.5142Z" })
518
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M16.1865 14.5142H15.3057L14.9936 14.2131C16.0862 12.9421 16.744 11.292 16.744 9.497C16.744 5.49443 13.4996 2.25 9.497 2.25C5.49443 2.25 2.25 5.49443 2.25 9.497C2.25 13.4996 5.49443 16.744 9.497 16.744C11.292 16.744 12.9421 16.0862 14.2131 14.9936L14.5142 15.3057V16.1865L20.0888 21.75L21.75 20.0888L16.1865 14.5142ZM9.49701 14.5142C6.72085 14.5142 4.47986 12.2732 4.47986 9.49701C4.47986 6.72085 6.72085 4.47986 9.49701 4.47986C12.2732 4.47986 14.5142 6.72085 14.5142 9.49701C14.5142 12.2732 12.2732 14.5142 9.49701 14.5142Z" })
615
519
  }
616
520
  );
617
521
  var SearchInput = (0, import_react9.forwardRef)(
618
522
  ({ className, onClear, ...props }, ref) => {
619
523
  const stringFormatter = (0, import_i18n.useLocalizedStringFormatter)(intlMessages);
620
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
524
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
621
525
  _Input,
622
526
  {
623
527
  type: "search",
624
- className: (0, import_system12.cn)(
528
+ className: (0, import_system10.cn)(
625
529
  "[&::-webkit-search-cancel-button]:hidden",
626
530
  className == null ? void 0 : className.input
627
531
  ),
628
532
  ref,
629
- icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SearchIcon, {}),
630
- action: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
631
- import_react_aria_components10.Button,
533
+ icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SearchIcon, {}),
534
+ action: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
535
+ import_react_aria_components8.Button,
632
536
  {
633
537
  className: className == null ? void 0 : className.action,
634
538
  onPress: () => onClear == null ? void 0 : onClear(),
635
539
  "aria-label": stringFormatter.format("Clear search"),
636
540
  excludeFromTabOrder: true,
637
541
  preventFocusOnPress: true,
638
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
542
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
639
543
  "svg",
640
544
  {
641
545
  xmlns: "http://www.w3.org/2000/svg",
@@ -643,7 +547,7 @@ var SearchInput = (0, import_react9.forwardRef)(
643
547
  fill: "currentColor",
644
548
  width: 20,
645
549
  height: 20,
646
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" })
550
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" })
647
551
  }
648
552
  )
649
553
  }
@@ -656,8 +560,8 @@ var SearchInput = (0, import_react9.forwardRef)(
656
560
 
657
561
  // src/ListBox/ListBox.tsx
658
562
  var import_react11 = require("react");
659
- var import_react_aria_components13 = require("react-aria-components");
660
- var import_system14 = require("@marigold/system");
563
+ var import_react_aria_components11 = require("react-aria-components");
564
+ var import_system12 = require("@marigold/system");
661
565
 
662
566
  // src/ListBox/Context.ts
663
567
  var import_react10 = require("react");
@@ -665,26 +569,26 @@ var ListBoxContext = (0, import_react10.createContext)({});
665
569
  var useListBoxContext = () => (0, import_react10.useContext)(ListBoxContext);
666
570
 
667
571
  // src/ListBox/ListBoxItem.tsx
668
- var import_react_aria_components11 = require("react-aria-components");
669
- var import_jsx_runtime16 = require("react/jsx-runtime");
572
+ var import_react_aria_components9 = require("react-aria-components");
573
+ var import_jsx_runtime14 = require("react/jsx-runtime");
670
574
  var _ListBoxItem = ({ ...props }) => {
671
575
  const { classNames: classNames2 } = useListBoxContext();
672
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_aria_components11.ListBoxItem, { ...props, className: classNames2.option });
576
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components9.ListBoxItem, { ...props, className: classNames2.option });
673
577
  };
674
578
 
675
579
  // src/ListBox/ListBoxSection.tsx
676
- var import_react_aria_components12 = require("react-aria-components");
677
- var import_system13 = require("@marigold/system");
678
- var import_jsx_runtime17 = require("react/jsx-runtime");
580
+ var import_react_aria_components10 = require("react-aria-components");
581
+ var import_system11 = require("@marigold/system");
582
+ var import_jsx_runtime15 = require("react/jsx-runtime");
679
583
  var _Section = ({ header, children, ...props }) => {
680
584
  const { classNames: classNames2 } = useListBoxContext();
681
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
682
- import_react_aria_components12.ListBoxSection,
585
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
586
+ import_react_aria_components10.ListBoxSection,
683
587
  {
684
588
  ...props,
685
- className: (0, import_system13.cn)(classNames2.section, classNames2.header),
589
+ className: (0, import_system11.cn)(classNames2.section, classNames2.header),
686
590
  children: [
687
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_aria_components12.Header, { children: header }),
591
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_aria_components10.Header, { children: header }),
688
592
  children
689
593
  ]
690
594
  }
@@ -692,16 +596,16 @@ var _Section = ({ header, children, ...props }) => {
692
596
  };
693
597
 
694
598
  // src/ListBox/ListBox.tsx
695
- var import_jsx_runtime18 = require("react/jsx-runtime");
599
+ var import_jsx_runtime16 = require("react/jsx-runtime");
696
600
  var _ListBox = (0, import_react11.forwardRef)(
697
601
  ({ variant, size, ...props }, ref) => {
698
- const classNames2 = (0, import_system14.useClassNames)({ component: "ListBox", variant, size });
602
+ const classNames2 = (0, import_system12.useClassNames)({ component: "ListBox", variant, size });
699
603
  const listBoxProps = { shouldSelectOnPressUp: false };
700
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ListBoxContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: classNames2.container, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
701
- import_react_aria_components13.ListBox,
604
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ListBoxContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: classNames2.container, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
605
+ import_react_aria_components11.ListBox,
702
606
  {
703
607
  ...props,
704
- className: (0, import_system14.cn)(
608
+ className: (0, import_system12.cn)(
705
609
  "overflow-y-auto sm:max-h-[75vh] lg:max-h-[45vh]",
706
610
  classNames2.list
707
611
  ),
@@ -717,8 +621,8 @@ _ListBox.Section = _Section;
717
621
 
718
622
  // src/Overlay/Popover.tsx
719
623
  var import_react13 = require("react");
720
- var import_react_aria_components15 = require("react-aria-components");
721
- var import_system18 = require("@marigold/system");
624
+ var import_react_aria_components13 = require("react-aria-components");
625
+ var import_system16 = require("@marigold/system");
722
626
 
723
627
  // src/Provider/OverlayContainerProvider.tsx
724
628
  var import_react12 = require("react");
@@ -733,26 +637,26 @@ var usePortalContainer = () => {
733
637
  };
734
638
 
735
639
  // src/Overlay/Underlay.tsx
736
- var import_react_aria_components14 = require("react-aria-components");
737
- var import_system17 = require("@marigold/system");
640
+ var import_react_aria_components12 = require("react-aria-components");
641
+ var import_system15 = require("@marigold/system");
738
642
 
739
643
  // src/Provider/index.ts
740
- var import_system16 = require("@marigold/system");
644
+ var import_system14 = require("@marigold/system");
741
645
  var import_i18n2 = require("@react-aria/i18n");
742
646
 
743
647
  // src/Provider/MarigoldProvider.tsx
744
- var import_system15 = require("@marigold/system");
745
- var import_jsx_runtime19 = require("react/jsx-runtime");
648
+ var import_system13 = require("@marigold/system");
649
+ var import_jsx_runtime17 = require("react/jsx-runtime");
746
650
  function MarigoldProvider({
747
651
  children,
748
652
  className,
749
653
  theme
750
654
  }) {
751
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_system15.ThemeProvider, { theme, className, children });
655
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_system13.ThemeProvider, { theme, className, children });
752
656
  }
753
657
 
754
658
  // src/Overlay/Underlay.tsx
755
- var import_jsx_runtime20 = require("react/jsx-runtime");
659
+ var import_jsx_runtime18 = require("react/jsx-runtime");
756
660
  var Underlay = ({
757
661
  size,
758
662
  variant,
@@ -761,7 +665,7 @@ var Underlay = ({
761
665
  keyboardDismissable,
762
666
  ...rest
763
667
  }) => {
764
- const classNames2 = (0, import_system17.useClassNames)({ component: "Underlay", size, variant });
668
+ const classNames2 = (0, import_system15.useClassNames)({ component: "Underlay", size, variant });
765
669
  const props = {
766
670
  isOpen: open,
767
671
  isDismissable: dismissable,
@@ -769,10 +673,10 @@ var Underlay = ({
769
673
  ...rest
770
674
  };
771
675
  const portal = usePortalContainer();
772
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
773
- import_react_aria_components14.ModalOverlay,
676
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
677
+ import_react_aria_components12.ModalOverlay,
774
678
  {
775
- className: ({ isEntering, isExiting }) => (0, import_system17.cn)(
679
+ className: ({ isEntering, isExiting }) => (0, import_system15.cn)(
776
680
  "fixed inset-0 z-40 flex min-h-full items-center justify-center overflow-y-auto backdrop-blur-xs",
777
681
  isEntering ? "animate-in fade-in duration-300 ease-out" : "",
778
682
  isExiting ? "animate-out fade-out duration-200 ease-in" : "",
@@ -787,7 +691,7 @@ var Underlay = ({
787
691
  };
788
692
 
789
693
  // src/Overlay/Popover.tsx
790
- var import_jsx_runtime21 = require("react/jsx-runtime");
694
+ var import_jsx_runtime19 = require("react/jsx-runtime");
791
695
  var _Popover = (0, import_react13.forwardRef)(
792
696
  ({ keyboardDismissDisabled, placement, open, children, container, ...rest }, ref) => {
793
697
  const props = {
@@ -796,31 +700,31 @@ var _Popover = (0, import_react13.forwardRef)(
796
700
  placement,
797
701
  ...rest
798
702
  };
799
- const classNames2 = (0, import_system18.useClassNames)({
703
+ const classNames2 = (0, import_system16.useClassNames)({
800
704
  component: "Popover",
801
705
  variant: placement,
802
706
  // Make Popover as wide as trigger element
803
707
  className: "min-w-(--trigger-width)"
804
708
  });
805
- const isSmallScreen = (0, import_system18.useSmallScreen)();
709
+ const isSmallScreen = (0, import_system16.useSmallScreen)();
806
710
  const portal = usePortalContainer();
807
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, { children: isSmallScreen ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
808
- import_react_aria_components15.Popover,
711
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: isSmallScreen ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
712
+ import_react_aria_components13.Popover,
809
713
  {
810
714
  ref,
811
715
  ...props,
812
- className: (0, import_system18.cn)(
716
+ className: (0, import_system16.cn)(
813
717
  "fixed! top-auto! bottom-0! left-0! max-h-fit! w-full",
814
718
  classNames2
815
719
  ),
816
720
  UNSTABLE_portalContainer: portal,
817
721
  children: [
818
722
  children,
819
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Underlay, { open, variant: "modal" })
723
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Underlay, { open, variant: "modal" })
820
724
  ]
821
725
  }
822
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
823
- import_react_aria_components15.Popover,
726
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
727
+ import_react_aria_components13.Popover,
824
728
  {
825
729
  ref,
826
730
  ...props,
@@ -835,20 +739,20 @@ var _Popover = (0, import_react13.forwardRef)(
835
739
  );
836
740
 
837
741
  // src/Autocomplete/Autocomplete.tsx
838
- var import_jsx_runtime22 = require("react/jsx-runtime");
742
+ var import_jsx_runtime20 = require("react/jsx-runtime");
839
743
  var AutocompleteInput = ({
840
744
  onSubmit,
841
745
  onClear,
842
746
  ref
843
747
  }) => {
844
- const state = import_react14.default.useContext(import_react_aria_components16.ComboBoxStateContext);
845
- const classNames2 = (0, import_system19.useClassNames)({ component: "ComboBox" });
846
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
748
+ const state = import_react14.default.useContext(import_react_aria_components14.ComboBoxStateContext);
749
+ const classNames2 = (0, import_system17.useClassNames)({ component: "ComboBox" });
750
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
847
751
  SearchInput,
848
752
  {
849
753
  ref,
850
754
  className: {
851
- action: (0, import_system19.cn)(
755
+ action: (0, import_system17.cn)(
852
756
  (state == null ? void 0 : state.inputValue) === "" ? "invisible" : "visible",
853
757
  classNames2
854
758
  )
@@ -897,9 +801,9 @@ var _Autocomplete = (0, import_react14.forwardRef)(
897
801
  isRequired: required,
898
802
  ...rest
899
803
  };
900
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(FieldBase, { as: import_react_aria_components16.ComboBox, ref, ...props, children: [
901
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AutocompleteInput, { onSubmit, onClear, ref }),
902
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(_Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(_ListBox, { children }) })
804
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(FieldBase, { as: import_react_aria_components14.ComboBox, ref, ...props, children: [
805
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AutocompleteInput, { onSubmit, onClear, ref }),
806
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(_Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(_ListBox, { children }) })
903
807
  ] });
904
808
  }
905
809
  );
@@ -907,41 +811,139 @@ _Autocomplete.Option = _ListBox.Item;
907
811
  _Autocomplete.Section = _ListBox.Section;
908
812
 
909
813
  // src/ComboBox/ComboBox.tsx
910
- var import_react19 = require("react");
814
+ var import_react20 = require("react");
911
815
  var import_react_aria_components17 = require("react-aria-components");
912
816
  var import_system24 = require("@marigold/system");
913
817
 
914
- // src/icons/ChevronDown.tsx
818
+ // src/Button/Button.tsx
915
819
  var import_react15 = require("react");
820
+ var import_react_aria_components16 = require("react-aria-components");
821
+ var import_system19 = require("@marigold/system");
822
+
823
+ // src/ProgressCycle/ProgressCycle.tsx
824
+ var import_react_aria_components15 = require("react-aria-components");
825
+ var import_system18 = require("@marigold/system");
826
+ var import_jsx_runtime21 = require("react/jsx-runtime");
827
+ var ProgressCycle = ({
828
+ size = "16",
829
+ ...props
830
+ }) => {
831
+ let strokeWidth = 3;
832
+ if (size <= "24") {
833
+ strokeWidth = 2;
834
+ } else if (size >= "32") {
835
+ strokeWidth = 4;
836
+ }
837
+ const radius = `calc(50% - ${strokeWidth / 2}px)`;
838
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components15.ProgressBar, { ...props, "aria-label": "loading", isIndeterminate: true, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
839
+ import_system18.SVG,
840
+ {
841
+ className: "animate-rotate-spinner origin-center fill-none",
842
+ size,
843
+ "aria-hidden": "true",
844
+ role: "img",
845
+ children: [
846
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
847
+ "circle",
848
+ {
849
+ cx: "50%",
850
+ cy: "50%",
851
+ r: radius,
852
+ strokeWidth,
853
+ className: "stroke-transparent"
854
+ }
855
+ ),
856
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
857
+ "circle",
858
+ {
859
+ cx: "50%",
860
+ cy: "50%",
861
+ r: radius,
862
+ strokeWidth,
863
+ pathLength: "100",
864
+ strokeDasharray: "100 200",
865
+ strokeDashoffset: "0",
866
+ strokeLinecap: "round",
867
+ className: "animate-progress-cycle origin-center -rotate-90 stroke-gray-800"
868
+ }
869
+ )
870
+ ]
871
+ }
872
+ ) });
873
+ };
874
+
875
+ // src/Button/Button.tsx
876
+ var import_jsx_runtime22 = require("react/jsx-runtime");
877
+ var _Button = (0, import_react15.forwardRef)(
878
+ ({
879
+ children,
880
+ variant,
881
+ size,
882
+ className,
883
+ disabled,
884
+ loading,
885
+ fullWidth,
886
+ ...props
887
+ }, ref) => {
888
+ const classNames2 = (0, import_system19.useClassNames)({
889
+ component: "Button",
890
+ variant,
891
+ size,
892
+ className
893
+ });
894
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
895
+ import_react_aria_components16.Button,
896
+ {
897
+ ...props,
898
+ ref,
899
+ className: (0, import_system19.cn)(
900
+ "inline-flex items-center justify-center gap-[0.5ch]",
901
+ classNames2,
902
+ fullWidth ? "w-full" : void 0,
903
+ loading && "cursor-progress!"
904
+ ),
905
+ isPending: loading,
906
+ isDisabled: disabled,
907
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
908
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "absolute", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ProgressCycle, {}) }),
909
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "invisible flex gap-[inherit]", children })
910
+ ] }) : children
911
+ }
912
+ );
913
+ }
914
+ );
915
+
916
+ // src/icons/ChevronRight.tsx
917
+ var import_react16 = require("react");
916
918
  var import_system20 = require("@marigold/system");
917
919
  var import_jsx_runtime23 = require("react/jsx-runtime");
918
- var ChevronDown = (0, import_react15.forwardRef)(
919
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_system20.SVG, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M5.97563 7.125L12 13.1363L18.0244 7.125L19.875 8.97563L12 16.8506L4.125 8.97563L5.97563 7.125Z" }) })
920
+ var ChevronRight = (0, import_react16.forwardRef)(
921
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_system20.SVG, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M7.125 18.0244L13.1363 12L7.125 5.97563L8.97563 4.125L16.8506 12L8.97563 19.875L7.125 18.0244Z" }) })
920
922
  );
921
923
 
922
924
  // src/icons/ChevronLeft.tsx
923
- var import_react16 = require("react");
925
+ var import_react17 = require("react");
924
926
  var import_system21 = require("@marigold/system");
925
927
  var import_jsx_runtime24 = require("react/jsx-runtime");
926
- var ChevronLeft = (0, import_react16.forwardRef)(
928
+ var ChevronLeft = (0, import_react17.forwardRef)(
927
929
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_system21.SVG, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { d: "M16.8506 18.0244L10.8394 12L16.8506 5.97563L15 4.125L7.125 12L15 19.875L16.8506 18.0244Z" }) })
928
930
  );
929
931
 
930
932
  // src/icons/SortDown.tsx
931
- var import_react17 = require("react");
933
+ var import_react18 = require("react");
932
934
  var import_system22 = require("@marigold/system");
933
935
  var import_jsx_runtime25 = require("react/jsx-runtime");
934
- var SortDown = (0, import_react17.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_system22.SVG, { ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "M17.3962 10.0496L12.5042 14.9416C12.3731 15.0727 12.1984 15.1492 12.0128 15.1492C11.8272 15.1492 11.6524 15.0727 11.5214 14.9416L6.62934 10.0496C6.49827 9.91854 6.42188 9.7439 6.42188 9.55816C6.42188 9.17606 6.73856 8.85938 7.12078 8.85938H16.9048C17.287 8.85938 17.6037 9.17606 17.6037 9.55816C17.6037 9.7439 17.5273 9.91854 17.3962 10.0496Z" }) }));
936
+ var SortDown = (0, import_react18.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_system22.SVG, { ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "M17.3962 10.0496L12.5042 14.9416C12.3731 15.0727 12.1984 15.1492 12.0128 15.1492C11.8272 15.1492 11.6524 15.0727 11.5214 14.9416L6.62934 10.0496C6.49827 9.91854 6.42188 9.7439 6.42188 9.55816C6.42188 9.17606 6.73856 8.85938 7.12078 8.85938H16.9048C17.287 8.85938 17.6037 9.17606 17.6037 9.55816C17.6037 9.7439 17.5273 9.91854 17.3962 10.0496Z" }) }));
935
937
 
936
938
  // src/icons/SortUp.tsx
937
- var import_react18 = require("react");
939
+ var import_react19 = require("react");
938
940
  var import_system23 = require("@marigold/system");
939
941
  var import_jsx_runtime26 = require("react/jsx-runtime");
940
- var SortUp = (0, import_react18.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_system23.SVG, { ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M16.9048 15.1491H7.12078C6.73856 15.1491 6.42188 14.8324 6.42188 14.4503C6.42188 14.2645 6.49827 14.0899 6.62934 13.9588L11.5214 9.06684C11.6524 8.93577 11.8272 8.85938 12.0128 8.85938C12.1984 8.85938 12.3731 8.93577 12.5042 9.06684L17.3962 13.9588C17.5273 14.0899 17.6037 14.2645 17.6037 14.4503C17.6037 14.8324 17.287 15.1491 16.9048 15.1491Z" }) }));
942
+ var SortUp = (0, import_react19.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_system23.SVG, { ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M16.9048 15.1491H7.12078C6.73856 15.1491 6.42188 14.8324 6.42188 14.4503C6.42188 14.2645 6.49827 14.0899 6.62934 13.9588L11.5214 9.06684C11.6524 8.93577 11.8272 8.85938 12.0128 8.85938C12.1984 8.85938 12.3731 8.93577 12.5042 9.06684L17.3962 13.9588C17.5273 14.0899 17.6037 14.2645 17.6037 14.4503C17.6037 14.8324 17.287 15.1491 16.9048 15.1491Z" }) }));
941
943
 
942
944
  // src/ComboBox/ComboBox.tsx
943
945
  var import_jsx_runtime27 = require("react/jsx-runtime");
944
- var _ComboBox = (0, import_react19.forwardRef)(
946
+ var _ComboBox = (0, import_react20.forwardRef)(
945
947
  ({
946
948
  variant,
947
949
  size,
@@ -1066,7 +1068,7 @@ var Center = ({
1066
1068
  };
1067
1069
 
1068
1070
  // src/Checkbox/Checkbox.tsx
1069
- var import_react21 = require("react");
1071
+ var import_react22 = require("react");
1070
1072
  var import_react_aria_components19 = require("react-aria-components");
1071
1073
  var import_system31 = require("@marigold/system");
1072
1074
 
@@ -1086,9 +1088,9 @@ var import_react_aria_components18 = require("react-aria-components");
1086
1088
  var import_system30 = require("@marigold/system");
1087
1089
 
1088
1090
  // src/Checkbox/Context.tsx
1089
- var import_react20 = require("react");
1090
- var CheckboxGroupContext = (0, import_react20.createContext)(null);
1091
- var useCheckboxGroupContext = () => (0, import_react20.useContext)(CheckboxGroupContext);
1091
+ var import_react21 = require("react");
1092
+ var CheckboxGroupContext = (0, import_react21.createContext)(null);
1093
+ var useCheckboxGroupContext = () => (0, import_react21.useContext)(CheckboxGroupContext);
1092
1094
 
1093
1095
  // src/Checkbox/CheckboxGroup.tsx
1094
1096
  var import_jsx_runtime34 = require("react/jsx-runtime");
@@ -1168,7 +1170,7 @@ var Icon2 = ({ className, checked, indeterminate, ...props }) => {
1168
1170
  }
1169
1171
  );
1170
1172
  };
1171
- var _Checkbox = (0, import_react21.forwardRef)(
1173
+ var _Checkbox = (0, import_react22.forwardRef)(
1172
1174
  ({
1173
1175
  error,
1174
1176
  disabled,
@@ -1228,7 +1230,7 @@ var _Checkbox = (0, import_react21.forwardRef)(
1228
1230
  _Checkbox.Group = _CheckboxGroup;
1229
1231
 
1230
1232
  // src/Columns/Columns.tsx
1231
- var import_react22 = require("react");
1233
+ var import_react23 = require("react");
1232
1234
  var import_system32 = require("@marigold/system");
1233
1235
  var import_jsx_runtime36 = require("react/jsx-runtime");
1234
1236
  var Columns = ({
@@ -1239,9 +1241,9 @@ var Columns = ({
1239
1241
  children,
1240
1242
  ...props
1241
1243
  }) => {
1242
- if (import_react22.Children.count(children) !== columns.length) {
1244
+ if (import_react23.Children.count(children) !== columns.length) {
1243
1245
  throw new Error(
1244
- `Columns: expected ${columns.length} children, got ${import_react22.Children.count(
1246
+ `Columns: expected ${columns.length} children, got ${import_react23.Children.count(
1245
1247
  children
1246
1248
  )}`
1247
1249
  );
@@ -1255,7 +1257,7 @@ var Columns = ({
1255
1257
  import_system32.gapSpace[space]
1256
1258
  ),
1257
1259
  ...props,
1258
- children: import_react22.Children.map(children, (child, idx) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1260
+ children: import_react23.Children.map(children, (child, idx) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1259
1261
  "div",
1260
1262
  {
1261
1263
  className: (0, import_system32.cn)(
@@ -1323,7 +1325,7 @@ var Container = ({
1323
1325
  );
1324
1326
 
1325
1327
  // src/Dialog/Dialog.tsx
1326
- var import_react25 = require("react");
1328
+ var import_react26 = require("react");
1327
1329
  var import_react_aria_components24 = require("react-aria-components");
1328
1330
  var import_system39 = require("@marigold/system");
1329
1331
 
@@ -1392,7 +1394,7 @@ var _Headline = ({
1392
1394
  // possibly set by a <Container>
1393
1395
  import_system37.textAlign[align]
1394
1396
  ),
1395
- style: { color: color && `var(--color-${color})` },
1397
+ style: { color: (0, import_system37.ensureCssVar)(color) },
1396
1398
  children
1397
1399
  }
1398
1400
  );
@@ -1411,14 +1413,14 @@ var DialogTitle = ({
1411
1413
  };
1412
1414
 
1413
1415
  // src/Dialog/DialogTrigger.tsx
1414
- var import_react24 = require("react");
1416
+ var import_react25 = require("react");
1415
1417
  var import_react_aria_components23 = require("react-aria-components");
1416
1418
 
1417
1419
  // src/Overlay/Modal.tsx
1418
- var import_react23 = require("react");
1420
+ var import_react24 = require("react");
1419
1421
  var import_react_aria_components22 = require("react-aria-components");
1420
1422
  var import_jsx_runtime43 = require("react/jsx-runtime");
1421
- var _Modal = (0, import_react23.forwardRef)(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
1423
+ var _Modal = (0, import_react24.forwardRef)(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
1422
1424
  const props = {
1423
1425
  isOpen: open,
1424
1426
  isDismissable: dismissable,
@@ -1458,7 +1460,7 @@ var _DialogTrigger = ({
1458
1460
  isOpen: open,
1459
1461
  ...rest
1460
1462
  };
1461
- const children = import_react24.Children.toArray(props.children);
1463
+ const children = import_react25.Children.toArray(props.children);
1462
1464
  const [dialogTrigger, dialog] = children;
1463
1465
  const hasDialogTrigger = dialogTrigger.type !== _Dialog;
1464
1466
  const currentDialog = children.length < 2 ? !hasDialogTrigger && dialogTrigger : dialog;
@@ -1480,7 +1482,7 @@ var _DialogTrigger = ({
1480
1482
  // src/Dialog/Dialog.tsx
1481
1483
  var import_jsx_runtime45 = require("react/jsx-runtime");
1482
1484
  var CloseButton = ({ className }) => {
1483
- const ctx = (0, import_react25.useContext)(import_react_aria_components24.OverlayTriggerStateContext);
1485
+ const ctx = (0, import_react26.useContext)(import_react_aria_components24.OverlayTriggerStateContext);
1484
1486
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "absolute top-4 right-4 ml-4", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
1485
1487
  "button",
1486
1488
  {
@@ -1510,7 +1512,7 @@ var _Dialog = ({
1510
1512
  }) => {
1511
1513
  var _a;
1512
1514
  const classNames2 = (0, import_system39.useClassNames)({ component: "Dialog", variant, size });
1513
- const state = (0, import_react25.useContext)(import_react_aria_components24.OverlayTriggerStateContext);
1515
+ const state = (0, import_react26.useContext)(import_react_aria_components24.OverlayTriggerStateContext);
1514
1516
  const children = typeof props.children === "function" ? props.children({
1515
1517
  close: (_a = state == null ? void 0 : state.close) != null ? _a : () => {
1516
1518
  }
@@ -1645,7 +1647,7 @@ var Inline = ({
1645
1647
  };
1646
1648
 
1647
1649
  // src/DateField/DateField.tsx
1648
- var import_react26 = require("react");
1650
+ var import_react27 = require("react");
1649
1651
  var import_react_aria_components29 = require("react-aria-components");
1650
1652
 
1651
1653
  // src/DateField/DateInput.tsx
@@ -1705,7 +1707,7 @@ var _DateInput = ({ variant, size, action, ...props }) => {
1705
1707
 
1706
1708
  // src/DateField/DateField.tsx
1707
1709
  var import_jsx_runtime54 = require("react/jsx-runtime");
1708
- var _DateField = (0, import_react26.forwardRef)(
1710
+ var _DateField = (0, import_react27.forwardRef)(
1709
1711
  ({
1710
1712
  variant,
1711
1713
  size,
@@ -1738,7 +1740,7 @@ var _DateField = (0, import_react26.forwardRef)(
1738
1740
  );
1739
1741
 
1740
1742
  // src/Calendar/Calendar.tsx
1741
- var import_react31 = require("react");
1743
+ var import_react32 = require("react");
1742
1744
  var import_react_aria_components36 = require("react-aria-components");
1743
1745
  var import_system51 = require("@marigold/system");
1744
1746
 
@@ -1748,21 +1750,21 @@ var import_system48 = require("@marigold/system");
1748
1750
 
1749
1751
  // src/Calendar/CalendarGridHeader.tsx
1750
1752
  var import_date = require("@internationalized/date");
1751
- var import_react27 = require("react");
1753
+ var import_react28 = require("react");
1752
1754
  var import_react_aria_components30 = require("react-aria-components");
1753
1755
  var import_calendar = require("@react-aria/calendar");
1754
1756
  var import_i18n3 = require("@react-aria/i18n");
1755
1757
  var import_system47 = require("@marigold/system");
1756
1758
  var import_jsx_runtime55 = require("react/jsx-runtime");
1757
1759
  function CalendarGridHeader(props) {
1758
- const state = (0, import_react27.useContext)(import_react_aria_components30.CalendarStateContext);
1760
+ const state = (0, import_react28.useContext)(import_react_aria_components30.CalendarStateContext);
1759
1761
  const { headerProps } = (0, import_calendar.useCalendarGrid)(props, state);
1760
1762
  const { locale } = (0, import_i18n3.useLocale)();
1761
1763
  const dayFormatter = (0, import_i18n3.useDateFormatter)({
1762
1764
  weekday: "short",
1763
1765
  timeZone: state.timeZone
1764
1766
  });
1765
- const weekDays = (0, import_react27.useMemo)(() => {
1767
+ const weekDays = (0, import_react28.useMemo)(() => {
1766
1768
  const weekStart = (0, import_date.startOfWeek)((0, import_date.today)(state.timeZone), locale);
1767
1769
  return [...new Array(7).keys()].map((index) => {
1768
1770
  const date = weekStart.add({ days: index });
@@ -1794,7 +1796,7 @@ var _CalendarGrid = () => {
1794
1796
  };
1795
1797
 
1796
1798
  // src/Calendar/CalendarListBox.tsx
1797
- var import_react28 = require("react");
1799
+ var import_react29 = require("react");
1798
1800
  var import_react_aria_components32 = require("react-aria-components");
1799
1801
  var import_system49 = require("@marigold/system");
1800
1802
 
@@ -1821,7 +1823,7 @@ function CalendarListBox({
1821
1823
  isDisabled,
1822
1824
  setSelectedDropdown
1823
1825
  }) {
1824
- const state = (0, import_react28.useContext)(import_react_aria_components32.CalendarStateContext);
1826
+ const state = (0, import_react29.useContext)(import_react_aria_components32.CalendarStateContext);
1825
1827
  const months = useFormattedMonths(state.timeZone, state.focusedDate);
1826
1828
  const buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
1827
1829
  const { select: selectClassNames } = (0, import_system49.useClassNames)({ component: "Select" });
@@ -1884,11 +1886,11 @@ function MonthControls() {
1884
1886
  var MonthControls_default = MonthControls;
1885
1887
 
1886
1888
  // src/Calendar/MonthListBox.tsx
1887
- var import_react29 = require("react");
1889
+ var import_react30 = require("react");
1888
1890
  var import_react_aria_components34 = require("react-aria-components");
1889
1891
  var import_jsx_runtime59 = require("react/jsx-runtime");
1890
1892
  var MonthListBox = ({ setSelectedDropdown }) => {
1891
- const state = (0, import_react29.useContext)(import_react_aria_components34.CalendarStateContext);
1893
+ const state = (0, import_react30.useContext)(import_react_aria_components34.CalendarStateContext);
1892
1894
  const months = useFormattedMonths(state.timeZone, state.focusedDate);
1893
1895
  let onChange = (index) => {
1894
1896
  let value = Number(index) + 1;
@@ -1922,12 +1924,12 @@ var MonthListBox = ({ setSelectedDropdown }) => {
1922
1924
  var MonthListBox_default = MonthListBox;
1923
1925
 
1924
1926
  // src/Calendar/YearListBox.tsx
1925
- var import_react30 = require("react");
1927
+ var import_react31 = require("react");
1926
1928
  var import_react_aria_components35 = require("react-aria-components");
1927
1929
  var import_i18n5 = require("@react-aria/i18n");
1928
1930
  var import_jsx_runtime60 = require("react/jsx-runtime");
1929
1931
  var YearListBox = ({ setSelectedDropdown }) => {
1930
- const state = (0, import_react30.useContext)(import_react_aria_components35.CalendarStateContext);
1932
+ const state = (0, import_react31.useContext)(import_react_aria_components35.CalendarStateContext);
1931
1933
  const years = [];
1932
1934
  let formatter = (0, import_i18n5.useDateFormatter)({
1933
1935
  year: "numeric",
@@ -1940,8 +1942,8 @@ var YearListBox = ({ setSelectedDropdown }) => {
1940
1942
  formatted: formatter.format(date.toDate(state.timeZone))
1941
1943
  });
1942
1944
  }
1943
- const activeButtonRef = (0, import_react30.useRef)(null);
1944
- (0, import_react30.useEffect)(() => {
1945
+ const activeButtonRef = (0, import_react31.useRef)(null);
1946
+ (0, import_react31.useEffect)(() => {
1945
1947
  if (activeButtonRef.current) {
1946
1948
  const activeButton = activeButtonRef.current;
1947
1949
  activeButton == null ? void 0 : activeButton.scrollIntoView({
@@ -2008,7 +2010,7 @@ var _Calendar = ({
2008
2010
  ...rest
2009
2011
  };
2010
2012
  const classNames2 = (0, import_system51.useClassNames)({ component: "Calendar" });
2011
- const [selectedDropdown, setSelectedDropdown] = (0, import_react31.useState)();
2013
+ const [selectedDropdown, setSelectedDropdown] = (0, import_react32.useState)();
2012
2014
  const ViewMap = {
2013
2015
  month: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(MonthListBox_default, { setSelectedDropdown }),
2014
2016
  year: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(YearListBox_default, { setSelectedDropdown })
@@ -2050,11 +2052,11 @@ var _Calendar = ({
2050
2052
  };
2051
2053
 
2052
2054
  // src/DatePicker/DatePicker.tsx
2053
- var import_react32 = __toESM(require("react"));
2055
+ var import_react33 = __toESM(require("react"));
2054
2056
  var import_react_aria_components37 = require("react-aria-components");
2055
2057
  var import_system52 = require("@marigold/system");
2056
2058
  var import_jsx_runtime62 = require("react/jsx-runtime");
2057
- var _DatePicker = import_react32.default.forwardRef(
2059
+ var _DatePicker = import_react33.default.forwardRef(
2058
2060
  ({
2059
2061
  dateUnavailable,
2060
2062
  disabled,
@@ -2138,11 +2140,11 @@ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ (0, import_
2138
2140
  );
2139
2141
 
2140
2142
  // src/Link/Link.tsx
2141
- var import_react33 = require("react");
2143
+ var import_react34 = require("react");
2142
2144
  var import_react_aria_components38 = require("react-aria-components");
2143
2145
  var import_system54 = require("@marigold/system");
2144
2146
  var import_jsx_runtime64 = require("react/jsx-runtime");
2145
- var _Link = (0, import_react33.forwardRef)(
2147
+ var _Link = (0, import_react34.forwardRef)(
2146
2148
  ({ variant, size, disabled, children, ...props }, ref) => {
2147
2149
  const classNames2 = (0, import_system54.useClassNames)({
2148
2150
  component: "Link",
@@ -2157,9 +2159,9 @@ var _Link = (0, import_react33.forwardRef)(
2157
2159
  var import_system55 = require("@marigold/system");
2158
2160
 
2159
2161
  // src/List/Context.ts
2160
- var import_react34 = require("react");
2161
- var ListContext = (0, import_react34.createContext)({});
2162
- var useListContext = () => (0, import_react34.useContext)(ListContext);
2162
+ var import_react35 = require("react");
2163
+ var ListContext = (0, import_react35.createContext)({});
2164
+ var useListContext = () => (0, import_react35.useContext)(ListContext);
2163
2165
 
2164
2166
  // src/List/ListItem.tsx
2165
2167
  var import_jsx_runtime65 = require("react/jsx-runtime");
@@ -2248,14 +2250,14 @@ var ActionMenu = ({
2248
2250
  };
2249
2251
 
2250
2252
  // src/SectionMessage/SectionMessage.tsx
2251
- var import_react36 = require("react");
2253
+ var import_react37 = require("react");
2252
2254
  var import_button = require("@react-aria/button");
2253
2255
  var import_system62 = require("@marigold/system");
2254
2256
 
2255
2257
  // src/SectionMessage/Context.tsx
2256
- var import_react35 = require("react");
2257
- var SectionMessageContext = (0, import_react35.createContext)({});
2258
- var useSectionMessageContext = () => (0, import_react35.useContext)(SectionMessageContext);
2258
+ var import_react36 = require("react");
2259
+ var SectionMessageContext = (0, import_react36.createContext)({});
2260
+ var useSectionMessageContext = () => (0, import_react36.useContext)(SectionMessageContext);
2259
2261
 
2260
2262
  // src/SectionMessage/SectionMessageContent.tsx
2261
2263
  var import_system60 = require("@marigold/system");
@@ -2352,14 +2354,14 @@ var SectionMessage = ({
2352
2354
  onCloseChange,
2353
2355
  ...props
2354
2356
  }) => {
2355
- const buttonRef = (0, import_react36.useRef)(null);
2357
+ const buttonRef = (0, import_react37.useRef)(null);
2356
2358
  const classNames2 = (0, import_system62.useClassNames)({
2357
2359
  component: "SectionMessage",
2358
2360
  variant,
2359
2361
  size
2360
2362
  });
2361
2363
  const Icon4 = icons[variant];
2362
- const [internalVisible, setInternalVisible] = (0, import_react36.useState)(true);
2364
+ const [internalVisible, setInternalVisible] = (0, import_react37.useState)(true);
2363
2365
  const isCurrentlyVisible = close != null ? close : internalVisible;
2364
2366
  const { buttonProps } = (0, import_button.useButton)(props, buttonRef);
2365
2367
  const handleClose = () => {
@@ -2413,7 +2415,7 @@ SectionMessage.Title = SectionMessageTitle;
2413
2415
  SectionMessage.Content = SectionMessageContent;
2414
2416
 
2415
2417
  // src/Multiselect/Multiselect.tsx
2416
- var import_react37 = require("react");
2418
+ var import_react38 = require("react");
2417
2419
  var import_data2 = require("@react-stately/data");
2418
2420
 
2419
2421
  // src/TagGroup/Tag.tsx
@@ -2481,7 +2483,7 @@ var Multiselect = ({
2481
2483
  children,
2482
2484
  ...props
2483
2485
  }) => {
2484
- const items = import_react37.Children.map(children, ({ props: props2 }) => props2);
2486
+ const items = import_react38.Children.map(children, ({ props: props2 }) => props2);
2485
2487
  const list = (0, import_data2.useListData)({
2486
2488
  initialItems: items,
2487
2489
  initialSelectedKeys: props.defaultSelectedKeys,
@@ -2500,7 +2502,7 @@ var Multiselect = ({
2500
2502
  }
2501
2503
  list.setSelectedKeys(next);
2502
2504
  };
2503
- const [value, setValue] = (0, import_react37.useState)("");
2505
+ const [value, setValue] = (0, import_react38.useState)("");
2504
2506
  const selectItem = (key) => {
2505
2507
  if (list.selectedKeys !== "all") {
2506
2508
  const next = list.selectedKeys.add(key);
@@ -2541,7 +2543,7 @@ var Multiselect = ({
2541
2543
  Multiselect.Item = Item;
2542
2544
 
2543
2545
  // src/NumberField/NumberField.tsx
2544
- var import_react38 = require("react");
2546
+ var import_react39 = require("react");
2545
2547
  var import_react_aria_components46 = require("react-aria-components");
2546
2548
  var import_system66 = require("@marigold/system");
2547
2549
 
@@ -2585,7 +2587,7 @@ var _StepButton = ({ direction, className, ...props }) => {
2585
2587
 
2586
2588
  // src/NumberField/NumberField.tsx
2587
2589
  var import_jsx_runtime78 = require("react/jsx-runtime");
2588
- var _NumberField = (0, import_react38.forwardRef)(
2590
+ var _NumberField = (0, import_react39.forwardRef)(
2589
2591
  ({
2590
2592
  variant,
2591
2593
  size,
@@ -2640,7 +2642,7 @@ var _NumberField = (0, import_react38.forwardRef)(
2640
2642
  );
2641
2643
 
2642
2644
  // src/Pagination/Pagination.tsx
2643
- var import_react42 = require("react");
2645
+ var import_react43 = require("react");
2644
2646
 
2645
2647
  // src/Pagination/Ellipsis.tsx
2646
2648
  var import_jsx_runtime79 = require("react/jsx-runtime");
@@ -2656,12 +2658,12 @@ var Ellipsis = () => {
2656
2658
  };
2657
2659
 
2658
2660
  // src/Pagination/NavigationButton.tsx
2659
- var import_react39 = __toESM(require("react"));
2661
+ var import_react40 = __toESM(require("react"));
2660
2662
  var import_button2 = require("@react-aria/button");
2661
2663
  var import_system67 = require("@marigold/system");
2662
2664
  var import_jsx_runtime80 = require("react/jsx-runtime");
2663
2665
  var NavigationButton = (props) => {
2664
- const ref = import_react39.default.useRef(null);
2666
+ const ref = import_react40.default.useRef(null);
2665
2667
  const classNames2 = (0, import_system67.useClassNames)({
2666
2668
  component: "Pagination"
2667
2669
  });
@@ -2675,7 +2677,7 @@ var NavigationButton = (props) => {
2675
2677
  position,
2676
2678
  ...rest
2677
2679
  } = props;
2678
- (0, import_react39.useEffect)(() => {
2680
+ (0, import_react40.useEffect)(() => {
2679
2681
  if (registerRef) {
2680
2682
  registerRef(ref.current);
2681
2683
  return () => registerRef(null);
@@ -2700,18 +2702,18 @@ var NavigationButton = (props) => {
2700
2702
  };
2701
2703
 
2702
2704
  // src/Pagination/PageButton.tsx
2703
- var import_react40 = require("react");
2705
+ var import_react41 = require("react");
2704
2706
  var import_button3 = require("@react-aria/button");
2705
2707
  var import_system68 = require("@marigold/system");
2706
2708
  var import_jsx_runtime81 = require("react/jsx-runtime");
2707
2709
  var PageButton = (props) => {
2708
- const ref = (0, import_react40.useRef)(null);
2710
+ const ref = (0, import_react41.useRef)(null);
2709
2711
  const classNames2 = (0, import_system68.useClassNames)({
2710
2712
  component: "Pagination"
2711
2713
  });
2712
2714
  let { buttonProps } = (0, import_button3.useButton)(props, ref);
2713
2715
  let { page, selected, registerRef, isDisabled } = props;
2714
- (0, import_react40.useEffect)(() => {
2716
+ (0, import_react41.useEffect)(() => {
2715
2717
  if (registerRef) {
2716
2718
  registerRef(ref.current);
2717
2719
  return () => registerRef(null);
@@ -2734,7 +2736,7 @@ var PageButton = (props) => {
2734
2736
  };
2735
2737
 
2736
2738
  // src/Pagination/useKeyboardNavigation.tsx
2737
- var import_react41 = require("react");
2739
+ var import_react42 = require("react");
2738
2740
  var import_interactions = require("@react-aria/interactions");
2739
2741
  var NavigationTypes = {
2740
2742
  Prev: "prev",
@@ -2748,14 +2750,14 @@ var useKeyboardNavigation = ({
2748
2750
  onChange = () => {
2749
2751
  }
2750
2752
  }) => {
2751
- const containerRef = (0, import_react41.useRef)(null);
2752
- const [focusedItem, setFocusedItem] = (0, import_react41.useState)({
2753
+ const containerRef = (0, import_react42.useRef)(null);
2754
+ const [focusedItem, setFocusedItem] = (0, import_react42.useState)({
2753
2755
  type: "page",
2754
2756
  value: page
2755
2757
  });
2756
- const navigationItems = (0, import_react41.useRef)([]);
2757
- const buttonRefs = (0, import_react41.useRef)(/* @__PURE__ */ new Map());
2758
- const isItemDisabled = (0, import_react41.useCallback)(
2758
+ const navigationItems = (0, import_react42.useRef)([]);
2759
+ const buttonRefs = (0, import_react42.useRef)(/* @__PURE__ */ new Map());
2760
+ const isItemDisabled = (0, import_react42.useCallback)(
2759
2761
  (item) => {
2760
2762
  if (item.type === NavigationTypes.Prev) return page <= 1;
2761
2763
  if (item.type === NavigationTypes.Next) return page >= totalPages;
@@ -2763,7 +2765,7 @@ var useKeyboardNavigation = ({
2763
2765
  },
2764
2766
  [page, totalPages]
2765
2767
  );
2766
- const findNextFocusableItem = (0, import_react41.useCallback)(
2768
+ const findNextFocusableItem = (0, import_react42.useCallback)(
2767
2769
  (current, direction) => {
2768
2770
  const items = navigationItems.current.filter(
2769
2771
  (item) => !isItemDisabled(item)
@@ -2779,7 +2781,7 @@ var useKeyboardNavigation = ({
2779
2781
  },
2780
2782
  [isItemDisabled, page]
2781
2783
  );
2782
- const focusItem = (0, import_react41.useCallback)(
2784
+ const focusItem = (0, import_react42.useCallback)(
2783
2785
  (item) => {
2784
2786
  if (isItemDisabled(item)) return;
2785
2787
  const key = `${item.type}-${item.value}`;
@@ -2826,7 +2828,7 @@ var useKeyboardNavigation = ({
2826
2828
  }
2827
2829
  }
2828
2830
  });
2829
- const registerRef = (0, import_react41.useCallback)(
2831
+ const registerRef = (0, import_react42.useCallback)(
2830
2832
  (type, value, ref) => {
2831
2833
  const key = `${type}-${value}`;
2832
2834
  if (ref) {
@@ -2837,7 +2839,7 @@ var useKeyboardNavigation = ({
2837
2839
  },
2838
2840
  []
2839
2841
  );
2840
- const setNavigationItems = (0, import_react41.useCallback)((items) => {
2842
+ const setNavigationItems = (0, import_react42.useCallback)((items) => {
2841
2843
  navigationItems.current = items;
2842
2844
  }, []);
2843
2845
  return {
@@ -2890,10 +2892,10 @@ var _Pagination = ({
2890
2892
  },
2891
2893
  controlLabels
2892
2894
  }) => {
2893
- const [currentPage, setCurrentPage] = (0, import_react42.useState)(page != null ? page : defaultPage);
2895
+ const [currentPage, setCurrentPage] = (0, import_react43.useState)(page != null ? page : defaultPage);
2894
2896
  const totalPages = Math.ceil(totalItems / pageSize);
2895
- const isFirstRender = (0, import_react42.useRef)(true);
2896
- (0, import_react42.useEffect)(() => {
2897
+ const isFirstRender = (0, import_react43.useRef)(true);
2898
+ (0, import_react43.useEffect)(() => {
2897
2899
  if (isFirstRender.current) {
2898
2900
  isFirstRender.current = false;
2899
2901
  return;
@@ -2910,7 +2912,7 @@ var _Pagination = ({
2910
2912
  onChange: handlePageChange
2911
2913
  });
2912
2914
  const pageRange = usePageRange({ currentPage, totalPages });
2913
- (0, import_react42.useEffect)(() => {
2915
+ (0, import_react43.useEffect)(() => {
2914
2916
  const items = [
2915
2917
  { type: NavigationTypes.Prev, value: currentPage - 1 },
2916
2918
  ...pageRange.map((value) => ({
@@ -2921,7 +2923,7 @@ var _Pagination = ({
2921
2923
  ];
2922
2924
  setNavigationItems(items);
2923
2925
  }, [pageRange, currentPage, setNavigationItems]);
2924
- (0, import_react42.useEffect)(() => {
2926
+ (0, import_react43.useEffect)(() => {
2925
2927
  setFocusedItem({ type: NavigationTypes.Page, value: currentPage });
2926
2928
  }, [currentPage, setFocusedItem]);
2927
2929
  const isFirstPage = currentPage === 1;
@@ -2975,16 +2977,16 @@ var _Pagination = ({
2975
2977
  };
2976
2978
 
2977
2979
  // src/Radio/Radio.tsx
2978
- var import_react44 = require("react");
2980
+ var import_react45 = require("react");
2979
2981
  var import_react_aria_components48 = require("react-aria-components");
2980
2982
  var import_system70 = require("@marigold/system");
2981
2983
 
2982
2984
  // src/Radio/Context.ts
2983
- var import_react43 = require("react");
2984
- var RadioGroupContext = (0, import_react43.createContext)(
2985
+ var import_react44 = require("react");
2986
+ var RadioGroupContext = (0, import_react44.createContext)(
2985
2987
  null
2986
2988
  );
2987
- var useRadioGroupContext = () => (0, import_react43.useContext)(RadioGroupContext);
2989
+ var useRadioGroupContext = () => (0, import_react44.useContext)(RadioGroupContext);
2988
2990
 
2989
2991
  // src/Radio/RadioGroup.tsx
2990
2992
  var import_react_aria_components47 = require("react-aria-components");
@@ -3057,7 +3059,7 @@ var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ (0, import_jsx
3057
3059
  children: checked ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Dot, {}) : null
3058
3060
  }
3059
3061
  );
3060
- var _Radio = (0, import_react44.forwardRef)(
3062
+ var _Radio = (0, import_react45.forwardRef)(
3061
3063
  ({ value, disabled, width, children, ...props }, ref) => {
3062
3064
  const { variant, size, width: groupWidth } = useRadioGroupContext();
3063
3065
  const classNames2 = (0, import_system70.useClassNames)({
@@ -3098,10 +3100,10 @@ var _Radio = (0, import_react44.forwardRef)(
3098
3100
  _Radio.Group = _RadioGroup;
3099
3101
 
3100
3102
  // src/SearchField/SearchField.tsx
3101
- var import_react45 = require("react");
3103
+ var import_react46 = require("react");
3102
3104
  var import_react_aria_components49 = require("react-aria-components");
3103
3105
  var import_jsx_runtime85 = require("react/jsx-runtime");
3104
- var _SearchField = (0, import_react45.forwardRef)(
3106
+ var _SearchField = (0, import_react46.forwardRef)(
3105
3107
  ({ disabled, required, readOnly, error, action, ...rest }, ref) => {
3106
3108
  const props = {
3107
3109
  ...rest,
@@ -3121,11 +3123,11 @@ var _SearchField = (0, import_react45.forwardRef)(
3121
3123
  );
3122
3124
 
3123
3125
  // src/Select/Select.tsx
3124
- var import_react46 = require("react");
3126
+ var import_react47 = require("react");
3125
3127
  var import_react_aria_components50 = require("react-aria-components");
3126
3128
  var import_system71 = require("@marigold/system");
3127
3129
  var import_jsx_runtime86 = require("react/jsx-runtime");
3128
- var _Select = (0, import_react46.forwardRef)(
3130
+ var _Select = (0, import_react47.forwardRef)(
3129
3131
  ({
3130
3132
  disabled,
3131
3133
  required,
@@ -3168,23 +3170,23 @@ _Select.Option = _ListBox.Item;
3168
3170
  _Select.Section = _ListBox.Section;
3169
3171
 
3170
3172
  // src/SelectList/SelectList.tsx
3171
- var import_react49 = require("react");
3173
+ var import_react50 = require("react");
3172
3174
  var import_react_aria_components52 = require("react-aria-components");
3173
3175
  var import_system73 = require("@marigold/system");
3174
3176
 
3175
3177
  // src/SelectList/Context.ts
3176
- var import_react47 = require("react");
3177
- var SelectListContext = (0, import_react47.createContext)(
3178
+ var import_react48 = require("react");
3179
+ var SelectListContext = (0, import_react48.createContext)(
3178
3180
  {}
3179
3181
  );
3180
- var useSelectListContext = () => (0, import_react47.useContext)(SelectListContext);
3182
+ var useSelectListContext = () => (0, import_react48.useContext)(SelectListContext);
3181
3183
 
3182
3184
  // src/SelectList/SelectListItem.tsx
3183
- var import_react48 = require("react");
3185
+ var import_react49 = require("react");
3184
3186
  var import_react_aria_components51 = require("react-aria-components");
3185
3187
  var import_system72 = require("@marigold/system");
3186
3188
  var import_jsx_runtime87 = require("react/jsx-runtime");
3187
- var _SelectListItem = (0, import_react48.forwardRef)(
3189
+ var _SelectListItem = (0, import_react49.forwardRef)(
3188
3190
  ({ children, ...props }, ref) => {
3189
3191
  let textValue = typeof children === "string" ? children : void 0;
3190
3192
  const { classNames: classNames2 } = useSelectListContext();
@@ -3209,7 +3211,7 @@ var _SelectListItem = (0, import_react48.forwardRef)(
3209
3211
 
3210
3212
  // src/SelectList/SelectList.tsx
3211
3213
  var import_jsx_runtime88 = require("react/jsx-runtime");
3212
- var _SelectList = (0, import_react49.forwardRef)(
3214
+ var _SelectList = (0, import_react50.forwardRef)(
3213
3215
  ({ onChange, ...rest }, ref) => {
3214
3216
  const classNames2 = (0, import_system73.useClassNames)({ component: "ListBox" });
3215
3217
  const props = {
@@ -3252,11 +3254,11 @@ var Scrollable = ({
3252
3254
  );
3253
3255
 
3254
3256
  // src/Slider/Slider.tsx
3255
- var import_react50 = require("react");
3257
+ var import_react51 = require("react");
3256
3258
  var import_react_aria_components53 = require("react-aria-components");
3257
3259
  var import_system75 = require("@marigold/system");
3258
3260
  var import_jsx_runtime90 = require("react/jsx-runtime");
3259
- var _Slider = (0, import_react50.forwardRef)(
3261
+ var _Slider = (0, import_react51.forwardRef)(
3260
3262
  ({
3261
3263
  thumbLabels,
3262
3264
  variant,
@@ -3368,11 +3370,11 @@ var Stack = ({
3368
3370
  };
3369
3371
 
3370
3372
  // src/Switch/Switch.tsx
3371
- var import_react51 = require("react");
3373
+ var import_react52 = require("react");
3372
3374
  var import_react_aria_components54 = require("react-aria-components");
3373
3375
  var import_system77 = require("@marigold/system");
3374
3376
  var import_jsx_runtime93 = require("react/jsx-runtime");
3375
- var _Switch = (0, import_react51.forwardRef)(
3377
+ var _Switch = (0, import_react52.forwardRef)(
3376
3378
  ({
3377
3379
  variant,
3378
3380
  size,
@@ -3432,24 +3434,28 @@ var _Switch = (0, import_react51.forwardRef)(
3432
3434
  );
3433
3435
 
3434
3436
  // src/Table/Table.tsx
3435
- var import_react59 = require("react");
3437
+ var import_react60 = require("react");
3436
3438
  var import_table9 = require("@react-aria/table");
3437
3439
  var import_table10 = require("@react-stately/table");
3438
3440
  var import_system83 = require("@marigold/system");
3439
3441
 
3440
3442
  // src/Table/Context.tsx
3441
- var import_react52 = require("react");
3442
- var TableContext = (0, import_react52.createContext)({});
3443
- var useTableContext = () => (0, import_react52.useContext)(TableContext);
3443
+ var import_react53 = require("react");
3444
+ var TableContext = (0, import_react53.createContext)({});
3445
+ var useTableContext = () => (0, import_react53.useContext)(TableContext);
3444
3446
 
3445
3447
  // src/Table/TableBody.tsx
3446
3448
  var import_table = require("@react-aria/table");
3447
3449
  var import_jsx_runtime94 = require("react/jsx-runtime");
3448
- var TableBody = ({ children, emptyState }) => {
3450
+ var TableBody = ({
3451
+ children,
3452
+ className,
3453
+ emptyState
3454
+ }) => {
3449
3455
  const { rowGroupProps } = (0, import_table.useTableRowGroup)();
3450
3456
  const { state, classNames: classNames2 } = useTableContext();
3451
3457
  if (state.collection.size === 0 && emptyState) {
3452
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("tbody", { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("tr", { className: classNames2 == null ? void 0 : classNames2.row, role: "row", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
3458
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("tbody", { className, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("tr", { className: classNames2 == null ? void 0 : classNames2.row, role: "row", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
3453
3459
  "td",
3454
3460
  {
3455
3461
  className: classNames2 == null ? void 0 : classNames2.cell,
@@ -3459,18 +3465,18 @@ var TableBody = ({ children, emptyState }) => {
3459
3465
  }
3460
3466
  ) }) });
3461
3467
  }
3462
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("tbody", { ...rowGroupProps, children });
3468
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("tbody", { ...rowGroupProps, className, children });
3463
3469
  };
3464
3470
 
3465
3471
  // src/Table/TableCell.tsx
3466
- var import_react53 = require("react");
3472
+ var import_react54 = require("react");
3467
3473
  var import_focus = require("@react-aria/focus");
3468
3474
  var import_table2 = require("@react-aria/table");
3469
3475
  var import_utils = require("@react-aria/utils");
3470
3476
  var import_system78 = require("@marigold/system");
3471
3477
  var import_jsx_runtime95 = require("react/jsx-runtime");
3472
3478
  var TableCell = ({ cell, align = "left" }) => {
3473
- const ref = (0, import_react53.useRef)(null);
3479
+ const ref = (0, import_react54.useRef)(null);
3474
3480
  const { interactive, state, classNames: classNames2 } = useTableContext();
3475
3481
  const disabled = state.disabledKeys.has(cell.parentKey);
3476
3482
  const { gridCellProps } = (0, import_table2.useTableCell)(
@@ -3505,7 +3511,7 @@ var TableCell = ({ cell, align = "left" }) => {
3505
3511
  };
3506
3512
 
3507
3513
  // src/Table/TableCheckboxCell.tsx
3508
- var import_react54 = require("react");
3514
+ var import_react55 = require("react");
3509
3515
  var import_focus2 = require("@react-aria/focus");
3510
3516
  var import_table3 = require("@react-aria/table");
3511
3517
  var import_utils2 = require("@react-aria/utils");
@@ -3534,7 +3540,7 @@ var mapCheckboxProps = ({
3534
3540
  // src/Table/TableCheckboxCell.tsx
3535
3541
  var import_jsx_runtime96 = require("react/jsx-runtime");
3536
3542
  var TableCheckboxCell = ({ cell }) => {
3537
- const ref = (0, import_react54.useRef)(null);
3543
+ const ref = (0, import_react55.useRef)(null);
3538
3544
  const { state, classNames: classNames2 } = useTableContext();
3539
3545
  const disabled = state.disabledKeys.has(cell.parentKey);
3540
3546
  const { gridCellProps } = (0, import_table3.useTableCell)(
@@ -3562,7 +3568,7 @@ var TableCheckboxCell = ({ cell }) => {
3562
3568
  };
3563
3569
 
3564
3570
  // src/Table/TableColumnHeader.tsx
3565
- var import_react55 = require("react");
3571
+ var import_react56 = require("react");
3566
3572
  var import_focus3 = require("@react-aria/focus");
3567
3573
  var import_interactions2 = require("@react-aria/interactions");
3568
3574
  var import_table4 = require("@react-aria/table");
@@ -3575,7 +3581,7 @@ var TableColumnHeader = ({
3575
3581
  align = "left"
3576
3582
  }) => {
3577
3583
  var _a, _b;
3578
- const ref = (0, import_react55.useRef)(null);
3584
+ const ref = (0, import_react56.useRef)(null);
3579
3585
  const { state, classNames: classNames2 } = useTableContext();
3580
3586
  const { columnHeaderProps } = (0, import_table4.useTableColumnHeader)(
3581
3587
  {
@@ -3623,18 +3629,22 @@ var TableHeader = ({ stickyHeader, children }) => {
3623
3629
  };
3624
3630
 
3625
3631
  // src/Table/TableHeaderRow.tsx
3626
- var import_react56 = require("react");
3632
+ var import_react57 = require("react");
3627
3633
  var import_table6 = require("@react-aria/table");
3628
3634
  var import_jsx_runtime99 = require("react/jsx-runtime");
3629
- var TableHeaderRow = ({ item, children }) => {
3635
+ var TableHeaderRow = ({
3636
+ item,
3637
+ className,
3638
+ children
3639
+ }) => {
3630
3640
  const { state } = useTableContext();
3631
- const ref = (0, import_react56.useRef)(null);
3641
+ const ref = (0, import_react57.useRef)(null);
3632
3642
  const { rowProps } = (0, import_table6.useTableHeaderRow)({ node: item }, state, ref);
3633
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("tr", { ...rowProps, ref, children });
3643
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("tr", { ...rowProps, className, ref, children });
3634
3644
  };
3635
3645
 
3636
3646
  // src/Table/TableRow.tsx
3637
- var import_react57 = require("react");
3647
+ var import_react58 = require("react");
3638
3648
  var import_focus4 = require("@react-aria/focus");
3639
3649
  var import_interactions3 = require("@react-aria/interactions");
3640
3650
  var import_table7 = require("@react-aria/table");
@@ -3642,7 +3652,7 @@ var import_utils5 = require("@react-aria/utils");
3642
3652
  var import_system81 = require("@marigold/system");
3643
3653
  var import_jsx_runtime100 = require("react/jsx-runtime");
3644
3654
  var TableRow = ({ children, row }) => {
3645
- const ref = (0, import_react57.useRef)(null);
3655
+ const ref = (0, import_react58.useRef)(null);
3646
3656
  const { interactive, state, ...ctx } = useTableContext();
3647
3657
  const { variant, size } = row.props;
3648
3658
  const classNames2 = (0, import_system81.useClassNames)({
@@ -3688,7 +3698,7 @@ var TableRow = ({ children, row }) => {
3688
3698
  };
3689
3699
 
3690
3700
  // src/Table/TableSelectAllCell.tsx
3691
- var import_react58 = require("react");
3701
+ var import_react59 = require("react");
3692
3702
  var import_focus5 = require("@react-aria/focus");
3693
3703
  var import_interactions4 = require("@react-aria/interactions");
3694
3704
  var import_table8 = require("@react-aria/table");
@@ -3700,7 +3710,7 @@ var TableSelectAllCell = ({
3700
3710
  width = "auto",
3701
3711
  align = "left"
3702
3712
  }) => {
3703
- const ref = (0, import_react58.useRef)(null);
3713
+ const ref = (0, import_react59.useRef)(null);
3704
3714
  const { state, classNames: classNames2 } = useTableContext();
3705
3715
  const { columnHeaderProps } = (0, import_table8.useTableColumnHeader)(
3706
3716
  {
@@ -3742,7 +3752,7 @@ var Table = ({
3742
3752
  ...props
3743
3753
  }) => {
3744
3754
  const interactive = selectionMode !== "none";
3745
- const tableRef = (0, import_react59.useRef)(null);
3755
+ const tableRef = (0, import_react60.useRef)(null);
3746
3756
  const state = (0, import_table10.useTableState)({
3747
3757
  ...props,
3748
3758
  selectionMode,
@@ -3775,29 +3785,37 @@ var Table = ({
3775
3785
  ),
3776
3786
  ...gridProps,
3777
3787
  children: [
3778
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
3779
- (column) => {
3780
- var _a, _b, _c, _d, _e;
3781
- return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
3782
- TableSelectAllCell,
3783
- {
3784
- width: (_b = column.props) == null ? void 0 : _b.width,
3785
- column,
3786
- align: (_c = column.props) == null ? void 0 : _c.align
3787
- },
3788
- column.key
3789
- ) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
3790
- TableColumnHeader,
3791
- {
3792
- width: (_d = column.props) == null ? void 0 : _d.width,
3793
- column,
3794
- align: (_e = column.props) == null ? void 0 : _e.align
3795
- },
3796
- column.key
3797
- );
3798
- }
3799
- ) }, headerRow.key)) }),
3800
- /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(TableBody, { emptyState, children: [
3788
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
3789
+ TableHeaderRow,
3790
+ {
3791
+ item: headerRow,
3792
+ className: classNames2.headerRow,
3793
+ children: [...collection.getChildren(headerRow.key)].map(
3794
+ (column) => {
3795
+ var _a, _b, _c, _d, _e;
3796
+ return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
3797
+ TableSelectAllCell,
3798
+ {
3799
+ width: (_b = column.props) == null ? void 0 : _b.width,
3800
+ column,
3801
+ align: (_c = column.props) == null ? void 0 : _c.align
3802
+ },
3803
+ column.key
3804
+ ) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
3805
+ TableColumnHeader,
3806
+ {
3807
+ width: (_d = column.props) == null ? void 0 : _d.width,
3808
+ column,
3809
+ align: (_e = column.props) == null ? void 0 : _e.align
3810
+ },
3811
+ column.key
3812
+ );
3813
+ }
3814
+ )
3815
+ },
3816
+ headerRow.key
3817
+ )) }),
3818
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(TableBody, { className: classNames2.body, emptyState, children: [
3801
3819
  ...collection.rows.map(
3802
3820
  (row) => row.type === "item" && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TableRow, { row, children: [...collection.getChildren(row.key)].map((cell, index) => {
3803
3821
  var _a, _b;
@@ -3864,18 +3882,18 @@ var _Text = ({
3864
3882
  weight && import_system84.fontWeight[weight],
3865
3883
  fontSize && import_system84.textSize[fontSize]
3866
3884
  ),
3867
- style: { color: color && `var(--color-${color})` },
3885
+ style: { color: (0, import_system84.ensureCssVar)(color) },
3868
3886
  children
3869
3887
  }
3870
3888
  );
3871
3889
  };
3872
3890
 
3873
3891
  // src/TextArea/TextArea.tsx
3874
- var import_react60 = require("react");
3892
+ var import_react61 = require("react");
3875
3893
  var import_react_aria_components56 = require("react-aria-components");
3876
3894
  var import_system85 = require("@marigold/system");
3877
3895
  var import_jsx_runtime104 = require("react/jsx-runtime");
3878
- var _TextArea = (0, import_react60.forwardRef)(
3896
+ var _TextArea = (0, import_react61.forwardRef)(
3879
3897
  ({
3880
3898
  variant,
3881
3899
  size,
@@ -3899,10 +3917,10 @@ var _TextArea = (0, import_react60.forwardRef)(
3899
3917
  );
3900
3918
 
3901
3919
  // src/TextField/TextField.tsx
3902
- var import_react61 = require("react");
3920
+ var import_react62 = require("react");
3903
3921
  var import_react_aria_components57 = require("react-aria-components");
3904
3922
  var import_jsx_runtime105 = require("react/jsx-runtime");
3905
- var _TextField = (0, import_react61.forwardRef)(
3923
+ var _TextField = (0, import_react62.forwardRef)(
3906
3924
  ({ required, disabled, readOnly, error, ...rest }, ref) => {
3907
3925
  const props = {
3908
3926
  isDisabled: disabled,
@@ -3997,7 +4015,7 @@ _Tooltip.Trigger = _TooltipTrigger;
3997
4015
  var import_visually_hidden = require("@react-aria/visually-hidden");
3998
4016
 
3999
4017
  // src/XLoader/XLoader.tsx
4000
- var import_react62 = require("react");
4018
+ var import_react63 = require("react");
4001
4019
  var import_react_aria_components61 = require("react-aria-components");
4002
4020
  var import_system89 = require("@marigold/system");
4003
4021
 
@@ -4254,7 +4272,7 @@ var BaseLoader = ({
4254
4272
  // src/XLoader/XLoader.tsx
4255
4273
  var import_jsx_runtime110 = require("react/jsx-runtime");
4256
4274
  var LoaderFullScreen = (props) => {
4257
- const id = (0, import_react62.useId)();
4275
+ const id = (0, import_react63.useId)();
4258
4276
  return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Underlay, { defaultOpen: true, keyboardDismissable: true, variant: "modal", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_react_aria_components61.Modal, { className: "grid h-(--visual-viewport-height) cursor-progress place-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_react_aria_components61.Dialog, { className: "outline-0", "aria-labelledby": id, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(BaseLoader, { id, ...props }) }) }) });
4259
4277
  };
4260
4278
  var LoaderSection = (props) => {
@@ -4272,9 +4290,9 @@ var import_react_aria_components65 = require("react-aria-components");
4272
4290
  var import_system92 = require("@marigold/system");
4273
4291
 
4274
4292
  // src/Tabs/Context.ts
4275
- var import_react63 = require("react");
4276
- var TabContext = (0, import_react63.createContext)({});
4277
- var useTabContext = () => (0, import_react63.useContext)(TabContext);
4293
+ var import_react64 = require("react");
4294
+ var TabContext = (0, import_react64.createContext)({});
4295
+ var useTabContext = () => (0, import_react64.useContext)(TabContext);
4278
4296
 
4279
4297
  // src/Tabs/Tab.tsx
4280
4298
  var import_react_aria_components62 = require("react-aria-components");