@marigold/components 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +716 -805
  2. package/dist/index.mjs +715 -808
  3. package/package.json +45 -45
package/dist/index.mjs CHANGED
@@ -1,35 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
-
33
1
  // src/Aside/Aside.tsx
34
2
  import React from "react";
35
3
 
@@ -87,12 +55,12 @@ var Aspect = ({
87
55
  // src/Badge/Badge.tsx
88
56
  import React3 from "react";
89
57
  import { useComponentStyles } from "@marigold/system";
90
- var Badge = (_a) => {
91
- var _b = _a, { variant, size, children } = _b, props = __objRest(_b, ["variant", "size", "children"]);
58
+ var Badge = ({ variant, size, children, ...props }) => {
92
59
  const styles = useComponentStyles("Badge", { variant, size });
93
- return /* @__PURE__ */ React3.createElement(Box, __spreadProps(__spreadValues({}, props), {
60
+ return /* @__PURE__ */ React3.createElement(Box, {
61
+ ...props,
94
62
  css: styles
95
- }), children);
63
+ }, children);
96
64
  };
97
65
 
98
66
  // src/Breakout/Breakout.tsx
@@ -108,27 +76,24 @@ var useAlignment = (direction) => {
108
76
  }
109
77
  return "flex-start";
110
78
  };
111
- var Breakout = (_a) => {
112
- var _b = _a, {
113
- horizontalAlign,
114
- verticalAlign,
115
- children
116
- } = _b, props = __objRest(_b, [
117
- "horizontalAlign",
118
- "verticalAlign",
119
- "children"
120
- ]);
79
+ var Breakout = ({
80
+ horizontalAlign,
81
+ verticalAlign,
82
+ children,
83
+ ...props
84
+ }) => {
121
85
  const alignItems = useAlignment(horizontalAlign);
122
86
  const justifyContent = useAlignment(verticalAlign);
123
- return /* @__PURE__ */ React4.createElement(Box, __spreadValues({
87
+ return /* @__PURE__ */ React4.createElement(Box, {
124
88
  alignItems,
125
89
  justifyContent,
126
90
  width: "100%",
127
91
  display: verticalAlign || horizontalAlign ? "flex" : "block",
128
92
  css: {
129
93
  gridColumn: "1 / -1"
130
- }
131
- }, props), children);
94
+ },
95
+ ...props
96
+ }, children);
132
97
  };
133
98
 
134
99
  // src/Button/Button.tsx
@@ -145,33 +110,30 @@ import {
145
110
  useComponentStyles as useComponentStyles2,
146
111
  useStateProps
147
112
  } from "@marigold/system";
148
- var Button = forwardRef((_a, ref) => {
149
- var _b = _a, {
150
- as = "button",
151
- children,
152
- variant,
153
- size,
154
- disabled
155
- } = _b, props = __objRest(_b, [
156
- "as",
157
- "children",
158
- "variant",
159
- "size",
160
- "disabled"
161
- ]);
113
+ var Button = forwardRef(({
114
+ as = "button",
115
+ children,
116
+ variant,
117
+ size,
118
+ disabled,
119
+ ...props
120
+ }, ref) => {
162
121
  const buttonRef = useRef(null);
163
122
  useImperativeHandle(ref, () => buttonRef.current);
164
- const { buttonProps, isPressed } = useButton(__spreadProps(__spreadValues({}, props), {
123
+ const { buttonProps, isPressed } = useButton({
124
+ ...props,
165
125
  elementType: typeof as === "string" ? as : "span",
166
126
  isDisabled: disabled
167
- }), buttonRef);
127
+ }, buttonRef);
168
128
  const { isFocusVisible, focusProps } = useFocusRing();
169
129
  const styles = useComponentStyles2("Button", { variant, size });
170
130
  const stateProps = useStateProps({
171
131
  active: isPressed,
172
132
  focus: isFocusVisible
173
133
  });
174
- return /* @__PURE__ */ React5.createElement(Box2, __spreadProps(__spreadValues(__spreadValues({}, mergeProps(buttonProps, focusProps)), stateProps), {
134
+ return /* @__PURE__ */ React5.createElement(Box2, {
135
+ ...mergeProps(buttonProps, focusProps),
136
+ ...stateProps,
175
137
  as,
176
138
  ref: buttonRef,
177
139
  __baseCSS: {
@@ -181,7 +143,7 @@ var Button = forwardRef((_a, ref) => {
181
143
  cursor: disabled ? "not-allowed" : "pointer"
182
144
  },
183
145
  css: styles
184
- }), children);
146
+ }, children);
185
147
  });
186
148
 
187
149
  // src/Card/Card.tsx
@@ -190,39 +152,34 @@ import {
190
152
  Box as Box3,
191
153
  useComponentStyles as useComponentStyles3
192
154
  } from "@marigold/system";
193
- var Card = (_a) => {
194
- var _b = _a, { children, variant, size } = _b, props = __objRest(_b, ["children", "variant", "size"]);
155
+ var Card = ({ children, variant, size, ...props }) => {
195
156
  const styles = useComponentStyles3("Card", { variant, size });
196
- return /* @__PURE__ */ React6.createElement(Box3, __spreadProps(__spreadValues({}, props), {
157
+ return /* @__PURE__ */ React6.createElement(Box3, {
158
+ ...props,
197
159
  css: styles
198
- }), children);
160
+ }, children);
199
161
  };
200
162
 
201
163
  // src/Center/Center.tsx
202
164
  import React7 from "react";
203
- var Center = (_a) => {
204
- var _b = _a, {
205
- maxWidth,
206
- space = "none",
207
- children
208
- } = _b, props = __objRest(_b, [
209
- "maxWidth",
210
- "space",
211
- "children"
212
- ]);
213
- return /* @__PURE__ */ React7.createElement(Box, __spreadValues({
214
- css: {
215
- boxSizing: "content-box",
216
- display: "flex",
217
- flexDirection: "column",
218
- alignItems: "center",
219
- justifyContent: "center",
220
- marginInline: "auto",
221
- maxInlineSize: maxWidth,
222
- gap: space
223
- }
224
- }, props), children);
225
- };
165
+ var Center = ({
166
+ maxWidth,
167
+ space = "none",
168
+ children,
169
+ ...props
170
+ }) => /* @__PURE__ */ React7.createElement(Box, {
171
+ css: {
172
+ boxSizing: "content-box",
173
+ display: "flex",
174
+ flexDirection: "column",
175
+ alignItems: "center",
176
+ justifyContent: "center",
177
+ marginInline: "auto",
178
+ maxInlineSize: maxWidth,
179
+ gap: space
180
+ },
181
+ ...props
182
+ }, children);
226
183
 
227
184
  // src/Checkbox/Checkbox.tsx
228
185
  import React10, { forwardRef as forwardRef2 } from "react";
@@ -252,26 +209,21 @@ import {
252
209
  import React8 from "react";
253
210
  import { Required } from "@marigold/icons";
254
211
  import { Box as Box4, useComponentStyles as useComponentStyles4 } from "@marigold/system";
255
- var Label = (_a) => {
256
- var _b = _a, {
257
- as = "label",
258
- required,
259
- children,
260
- variant,
261
- size
262
- } = _b, props = __objRest(_b, [
263
- "as",
264
- "required",
265
- "children",
266
- "variant",
267
- "size"
268
- ]);
212
+ var Label = ({
213
+ as = "label",
214
+ required,
215
+ children,
216
+ variant,
217
+ size,
218
+ ...props
219
+ }) => {
269
220
  const styles = useComponentStyles4("Label", { size, variant });
270
- return /* @__PURE__ */ React8.createElement(Box4, __spreadProps(__spreadValues({}, props), {
221
+ return /* @__PURE__ */ React8.createElement(Box4, {
222
+ ...props,
271
223
  as,
272
224
  __baseCSS: { display: "flex", alignItems: "center", gap: 4 },
273
225
  css: styles
274
- }), children, required && /* @__PURE__ */ React8.createElement(Required, {
226
+ }, children, required && /* @__PURE__ */ React8.createElement(Required, {
275
227
  role: "presentation",
276
228
  size: 16,
277
229
  fill: "error"
@@ -281,39 +233,34 @@ var Label = (_a) => {
281
233
  // src/Checkbox/CheckboxGroup.tsx
282
234
  var CheckboxGroupContext = createContext(null);
283
235
  var useCheckboxGroupContext = () => useContext(CheckboxGroupContext);
284
- var CheckboxGroup = (_a) => {
285
- var _b = _a, {
286
- children,
287
- variant,
288
- size,
289
- required,
290
- disabled,
291
- readOnly,
292
- error
293
- } = _b, rest = __objRest(_b, [
294
- "children",
295
- "variant",
296
- "size",
297
- "required",
298
- "disabled",
299
- "readOnly",
300
- "error"
301
- ]);
302
- const props = __spreadValues({
236
+ var CheckboxGroup = ({
237
+ children,
238
+ variant,
239
+ size,
240
+ required,
241
+ disabled,
242
+ readOnly,
243
+ error,
244
+ ...rest
245
+ }) => {
246
+ const props = {
303
247
  isRequired: required,
304
248
  isDisabled: disabled,
305
249
  isReadOnly: readOnly,
306
- validationState: error ? "invalid" : "valid"
307
- }, rest);
250
+ validationState: error ? "invalid" : "valid",
251
+ ...rest
252
+ };
308
253
  const state = useCheckboxGroupState(props);
309
254
  const { groupProps, labelProps } = useCheckboxGroup(props, state);
310
255
  const styles = useComponentStyles5("CheckboxGroup", { variant, size }, { parts: ["container", "group"] });
311
- return /* @__PURE__ */ React9.createElement(Box5, __spreadProps(__spreadValues({}, groupProps), {
256
+ return /* @__PURE__ */ React9.createElement(Box5, {
257
+ ...groupProps,
312
258
  css: styles.container
313
- }), props.label && /* @__PURE__ */ React9.createElement(Label, __spreadValues({
259
+ }, props.label && /* @__PURE__ */ React9.createElement(Label, {
314
260
  as: "span",
315
- required
316
- }, labelProps), props.label), /* @__PURE__ */ React9.createElement(Box5, {
261
+ required,
262
+ ...labelProps
263
+ }, props.label), /* @__PURE__ */ React9.createElement(Box5, {
317
264
  role: "presentation",
318
265
  __baseCSS: {
319
266
  display: "flex",
@@ -322,7 +269,7 @@ var CheckboxGroup = (_a) => {
322
269
  },
323
270
  css: styles.group
324
271
  }, /* @__PURE__ */ React9.createElement(CheckboxGroupContext.Provider, {
325
- value: __spreadValues({ variant, size, error }, state)
272
+ value: { variant, size, error, ...state }
326
273
  }, children)));
327
274
  };
328
275
 
@@ -343,46 +290,34 @@ var IndeterminateMark = () => /* @__PURE__ */ React10.createElement("svg", {
343
290
  stroke: "none",
344
291
  d: "M11.5 2.04018H0.5V0.46875H11.5V2.04018Z"
345
292
  }));
346
- var Icon = (_a) => {
347
- var _b = _a, { css, checked, indeterminate } = _b, props = __objRest(_b, ["css", "checked", "indeterminate"]);
348
- return /* @__PURE__ */ React10.createElement(Box6, __spreadValues({
349
- "aria-hidden": "true",
350
- __baseCSS: {
351
- width: 16,
352
- height: 16,
353
- bg: "#fff",
354
- border: "1px solid #000",
355
- borderRadius: 3,
356
- display: "flex",
357
- alignItems: "center",
358
- justifyContent: "center",
359
- p: 1
360
- },
361
- css
362
- }, props), indeterminate ? /* @__PURE__ */ React10.createElement(IndeterminateMark, null) : checked ? /* @__PURE__ */ React10.createElement(CheckMark, null) : null);
363
- };
364
- var Checkbox = forwardRef2((_a, ref) => {
365
- var _b = _a, {
366
- size,
367
- variant,
368
- disabled,
369
- checked,
370
- defaultChecked,
371
- indeterminate,
372
- readOnly,
373
- required,
374
- error
375
- } = _b, props = __objRest(_b, [
376
- "size",
377
- "variant",
378
- "disabled",
379
- "checked",
380
- "defaultChecked",
381
- "indeterminate",
382
- "readOnly",
383
- "required",
384
- "error"
385
- ]);
293
+ var Icon = ({ css, checked, indeterminate, ...props }) => /* @__PURE__ */ React10.createElement(Box6, {
294
+ "aria-hidden": "true",
295
+ __baseCSS: {
296
+ width: 16,
297
+ height: 16,
298
+ bg: "#fff",
299
+ border: "1px solid #000",
300
+ borderRadius: 3,
301
+ display: "flex",
302
+ alignItems: "center",
303
+ justifyContent: "center",
304
+ p: 1
305
+ },
306
+ css,
307
+ ...props
308
+ }, indeterminate ? /* @__PURE__ */ React10.createElement(IndeterminateMark, null) : checked ? /* @__PURE__ */ React10.createElement(CheckMark, null) : null);
309
+ var Checkbox = forwardRef2(({
310
+ size,
311
+ variant,
312
+ disabled,
313
+ checked,
314
+ defaultChecked,
315
+ indeterminate,
316
+ readOnly,
317
+ required,
318
+ error,
319
+ ...props
320
+ }, ref) => {
386
321
  const inputRef = useObjectRef(ref);
387
322
  const checkboxProps = {
388
323
  isIndeterminate: indeterminate,
@@ -392,15 +327,20 @@ var Checkbox = forwardRef2((_a, ref) => {
392
327
  validationState: error ? "invalid" : "valid"
393
328
  };
394
329
  const groupState = useCheckboxGroupContext();
395
- const { inputProps } = groupState ? useCheckboxGroupItem(__spreadProps(__spreadValues(__spreadValues({}, props), checkboxProps), {
330
+ const { inputProps } = groupState ? useCheckboxGroupItem({
331
+ ...props,
332
+ ...checkboxProps,
396
333
  value: props.value
397
- }), groupState, inputRef) : useCheckbox(__spreadValues(__spreadValues({
334
+ }, groupState, inputRef) : useCheckbox({
398
335
  isSelected: checked,
399
- defaultSelected: defaultChecked
400
- }, checkboxProps), props), useToggleState(__spreadValues({
336
+ defaultSelected: defaultChecked,
337
+ ...checkboxProps,
338
+ ...props
339
+ }, useToggleState({
401
340
  isSelected: checked,
402
- defaultSelected: defaultChecked
403
- }, props)), inputRef);
341
+ defaultSelected: defaultChecked,
342
+ ...props
343
+ }), inputRef);
404
344
  const styles = useComponentStyles6("Checkbox", {
405
345
  variant: (groupState == null ? void 0 : groupState.variant) || variant,
406
346
  size: (groupState == null ? void 0 : groupState.size) || size
@@ -416,7 +356,7 @@ var Checkbox = forwardRef2((_a, ref) => {
416
356
  readOnly,
417
357
  indeterminate
418
358
  });
419
- return /* @__PURE__ */ React10.createElement(Box6, __spreadValues(__spreadValues({
359
+ return /* @__PURE__ */ React10.createElement(Box6, {
420
360
  as: "label",
421
361
  __baseCSS: {
422
362
  display: "flex",
@@ -424,8 +364,10 @@ var Checkbox = forwardRef2((_a, ref) => {
424
364
  gap: "1ch",
425
365
  position: "relative"
426
366
  },
427
- css: styles.container
428
- }, hoverProps), stateProps), /* @__PURE__ */ React10.createElement(Box6, __spreadValues(__spreadValues({
367
+ css: styles.container,
368
+ ...hoverProps,
369
+ ...stateProps
370
+ }, /* @__PURE__ */ React10.createElement(Box6, {
429
371
  as: "input",
430
372
  ref: inputRef,
431
373
  css: {
@@ -437,30 +379,29 @@ var Checkbox = forwardRef2((_a, ref) => {
437
379
  zIndex: 1,
438
380
  opacity: 1e-4,
439
381
  cursor: inputProps.disabled ? "not-allowed" : "pointer"
440
- }
441
- }, inputProps), focusProps)), /* @__PURE__ */ React10.createElement(Icon, __spreadValues({
382
+ },
383
+ ...inputProps,
384
+ ...focusProps
385
+ }), /* @__PURE__ */ React10.createElement(Icon, {
442
386
  checked: inputProps.checked,
443
387
  indeterminate,
444
- css: styles.checkbox
445
- }, stateProps)), props.children && /* @__PURE__ */ React10.createElement(Box6, __spreadValues({
446
- css: styles.label
447
- }, stateProps), props.children));
388
+ css: styles.checkbox,
389
+ ...stateProps
390
+ }), props.children && /* @__PURE__ */ React10.createElement(Box6, {
391
+ css: styles.label,
392
+ ...stateProps
393
+ }, props.children));
448
394
  });
449
395
 
450
396
  // src/Columns/Columns.tsx
451
397
  import React11, { Children } from "react";
452
- var Columns = (_a) => {
453
- var _b = _a, {
454
- space = "none",
455
- columns,
456
- collapseAt = "40em",
457
- children
458
- } = _b, props = __objRest(_b, [
459
- "space",
460
- "columns",
461
- "collapseAt",
462
- "children"
463
- ]);
398
+ var Columns = ({
399
+ space = "none",
400
+ columns,
401
+ collapseAt = "40em",
402
+ children,
403
+ ...props
404
+ }) => {
464
405
  if (Children.count(children) !== columns.length) {
465
406
  throw new Error(`Columns: expected ${columns.length} children, got ${Children.count(children)}`);
466
407
  }
@@ -471,7 +412,7 @@ var Columns = (_a) => {
471
412
  }
472
413
  };
473
414
  });
474
- return /* @__PURE__ */ React11.createElement(Box, __spreadValues({
415
+ return /* @__PURE__ */ React11.createElement(Box, {
475
416
  display: "flex",
476
417
  css: Object.assign({
477
418
  flexWrap: "wrap",
@@ -479,8 +420,9 @@ var Columns = (_a) => {
479
420
  "> *": {
480
421
  flexBasis: `calc(( ${collapseAt} - 100%) * 999)`
481
422
  }
482
- }, ...getColumnWidths)
483
- }, props), children);
423
+ }, ...getColumnWidths),
424
+ ...props
425
+ }, children);
484
426
  };
485
427
 
486
428
  // src/Container/Container.tsx
@@ -491,20 +433,14 @@ var ALIGNMENT = {
491
433
  center: "center",
492
434
  right: "flex-end"
493
435
  };
494
- var Container = (_a) => {
495
- var _b = _a, {
496
- contentType = "content",
497
- size = "medium",
498
- align = "left",
499
- alignContainer = "left",
500
- children
501
- } = _b, props = __objRest(_b, [
502
- "contentType",
503
- "size",
504
- "align",
505
- "alignContainer",
506
- "children"
507
- ]);
436
+ var Container = ({
437
+ contentType = "content",
438
+ size = "medium",
439
+ align = "left",
440
+ alignContainer = "left",
441
+ children,
442
+ ...props
443
+ }) => {
508
444
  const maxWidth = tokenSize[contentType][size];
509
445
  let gridTemplateColumns = `${maxWidth} 1fr 1fr`;
510
446
  let gridColumn = 1;
@@ -516,7 +452,7 @@ var Container = (_a) => {
516
452
  gridTemplateColumns = `1fr 1fr ${maxWidth}`;
517
453
  gridColumn = 3;
518
454
  }
519
- return /* @__PURE__ */ React12.createElement(Box, __spreadValues({
455
+ return /* @__PURE__ */ React12.createElement(Box, {
520
456
  display: "grid",
521
457
  css: {
522
458
  gridTemplateColumns,
@@ -524,8 +460,9 @@ var Container = (_a) => {
524
460
  "> *": {
525
461
  gridColumn
526
462
  }
527
- }
528
- }, props), children);
463
+ },
464
+ ...props
465
+ }, children);
529
466
  };
530
467
 
531
468
  // src/Content/Content.tsx
@@ -534,22 +471,18 @@ import {
534
471
  Box as Box7,
535
472
  useComponentStyles as useComponentStyles7
536
473
  } from "@marigold/system";
537
- var Content = (_a) => {
538
- var _b = _a, {
539
- children,
540
- variant,
541
- size
542
- } = _b, props = __objRest(_b, [
543
- "children",
544
- "variant",
545
- "size"
546
- ]);
474
+ var Content = ({
475
+ children,
476
+ variant,
477
+ size,
478
+ ...props
479
+ }) => {
547
480
  const styles = useComponentStyles7("Content", { variant, size });
548
- return /* @__PURE__ */ React13.createElement(Box7, __spreadProps(__spreadValues({
549
- as: "section"
550
- }, props), {
481
+ return /* @__PURE__ */ React13.createElement(Box7, {
482
+ as: "section",
483
+ ...props,
551
484
  css: styles
552
- }), children);
485
+ }, children);
553
486
  };
554
487
 
555
488
  // src/Dialog/Dialog.tsx
@@ -566,14 +499,13 @@ import React14 from "react";
566
499
  import {
567
500
  useComponentStyles as useComponentStyles8
568
501
  } from "@marigold/system";
569
- var Header = (_a) => {
570
- var _b = _a, { children, variant, size } = _b, props = __objRest(_b, ["children", "variant", "size"]);
502
+ var Header = ({ children, variant, size, ...props }) => {
571
503
  const styles = useComponentStyles8("Header", { variant, size });
572
- return /* @__PURE__ */ React14.createElement(Box, __spreadProps(__spreadValues({
573
- as: "header"
574
- }, props), {
504
+ return /* @__PURE__ */ React14.createElement(Box, {
505
+ as: "header",
506
+ ...props,
575
507
  css: styles
576
- }), children);
508
+ }, children);
577
509
  };
578
510
 
579
511
  // src/Headline/Headline.tsx
@@ -582,27 +514,22 @@ import {
582
514
  Box as Box8,
583
515
  useComponentStyles as useComponentStyles9
584
516
  } from "@marigold/system";
585
- var Headline = (_a) => {
586
- var _b = _a, {
587
- children,
588
- variant,
589
- size,
590
- level = "1"
591
- } = _b, props = __objRest(_b, [
592
- "children",
593
- "variant",
594
- "size",
595
- "level"
596
- ]);
517
+ var Headline = ({
518
+ children,
519
+ variant,
520
+ size,
521
+ level = "1",
522
+ ...props
523
+ }) => {
597
524
  const styles = useComponentStyles9("Headline", {
598
525
  variant,
599
526
  size: size ?? `level-${level}`
600
527
  });
601
- return /* @__PURE__ */ React15.createElement(Box8, __spreadProps(__spreadValues({
602
- as: `h${level}`
603
- }, props), {
528
+ return /* @__PURE__ */ React15.createElement(Box8, {
529
+ as: `h${level}`,
530
+ ...props,
604
531
  css: styles
605
- }), children);
532
+ }, children);
606
533
  };
607
534
 
608
535
  // src/Dialog/Context.ts
@@ -624,22 +551,21 @@ import { mergeProps as mergeProps2, useObjectRef as useObjectRef2 } from "@react
624
551
  // src/Overlay/Underlay.tsx
625
552
  import React16 from "react";
626
553
  import { Box as Box9, useComponentStyles as useComponentStyles10 } from "@marigold/system";
627
- var Underlay = (_a) => {
628
- var _b = _a, { size, variant } = _b, props = __objRest(_b, ["size", "variant"]);
554
+ var Underlay = ({ size, variant, ...props }) => {
629
555
  const styles = useComponentStyles10("Underlay", { size, variant });
630
- return /* @__PURE__ */ React16.createElement(Box9, __spreadValues({
556
+ return /* @__PURE__ */ React16.createElement(Box9, {
631
557
  __baseCSS: {
632
558
  position: "fixed",
633
559
  inset: 0,
634
560
  zIndex: 1
635
561
  },
636
- css: styles
637
- }, props));
562
+ css: styles,
563
+ ...props
564
+ });
638
565
  };
639
566
 
640
567
  // src/Overlay/Modal.tsx
641
- var Modal = forwardRef3((_a, ref) => {
642
- var _b = _a, { children, open, dismissable, keyboardDismissable, onClose } = _b, props = __objRest(_b, ["children", "open", "dismissable", "keyboardDismissable", "onClose"]);
568
+ var Modal = forwardRef3(({ children, open, dismissable, keyboardDismissable, onClose, ...props }, ref) => {
643
569
  const modalRef = useObjectRef2(ref);
644
570
  const { overlayProps, underlayProps } = useOverlay({
645
571
  isOpen: open,
@@ -653,7 +579,9 @@ var Modal = forwardRef3((_a, ref) => {
653
579
  contain: true,
654
580
  restoreFocus: true,
655
581
  autoFocus: true
656
- }, /* @__PURE__ */ React17.createElement(Underlay, __spreadValues({}, underlayProps)), /* @__PURE__ */ React17.createElement("div", __spreadValues({
582
+ }, /* @__PURE__ */ React17.createElement(Underlay, {
583
+ ...underlayProps
584
+ }), /* @__PURE__ */ React17.createElement("div", {
657
585
  style: {
658
586
  display: "flex",
659
587
  alignItems: "center",
@@ -663,8 +591,9 @@ var Modal = forwardRef3((_a, ref) => {
663
591
  zIndex: 2,
664
592
  pointerEvents: "none"
665
593
  },
666
- ref: modalRef
667
- }, mergeProps2(props, overlayProps, modalProps)), /* @__PURE__ */ React17.createElement("div", {
594
+ ref: modalRef,
595
+ ...mergeProps2(props, overlayProps, modalProps)
596
+ }, /* @__PURE__ */ React17.createElement("div", {
668
597
  style: { pointerEvents: "auto" }
669
598
  }, children)));
670
599
  });
@@ -672,60 +601,53 @@ var Modal = forwardRef3((_a, ref) => {
672
601
  // src/Overlay/Overlay.tsx
673
602
  import React18 from "react";
674
603
  import { OverlayContainer } from "@react-aria/overlays";
675
- var Overlay = (_a) => {
676
- var _b = _a, {
677
- children,
678
- open = false,
679
- container
680
- } = _b, props = __objRest(_b, [
681
- "children",
682
- "open",
683
- "container"
684
- ]);
604
+ var Overlay = ({
605
+ children,
606
+ open = false,
607
+ container,
608
+ ...props
609
+ }) => {
685
610
  if (!open) {
686
611
  return null;
687
612
  }
688
613
  return /* @__PURE__ */ React18.createElement(OverlayContainer, {
689
614
  portalContainer: container
690
- }, /* @__PURE__ */ React18.createElement(Box, __spreadValues({}, props), children));
615
+ }, /* @__PURE__ */ React18.createElement(Box, {
616
+ ...props
617
+ }, children));
691
618
  };
692
619
 
693
620
  // src/Overlay/Popover.tsx
694
621
  import React19, { forwardRef as forwardRef4, useRef as useRef2 } from "react";
695
622
  import { useModal as useModal2, useOverlay as useOverlay2 } from "@react-aria/overlays";
696
623
  import { mergeProps as mergeProps3 } from "@react-aria/utils";
697
- var Popover = forwardRef4((_a, ref) => {
698
- var _b = _a, {
699
- children,
700
- open,
701
- dismissable,
702
- keyboardDismissDisabled,
703
- shouldCloseOnBlur,
704
- minWidth = 0
705
- } = _b, props = __objRest(_b, [
706
- "children",
707
- "open",
708
- "dismissable",
709
- "keyboardDismissDisabled",
710
- "shouldCloseOnBlur",
711
- "minWidth"
712
- ]);
624
+ var Popover = forwardRef4(({
625
+ children,
626
+ open,
627
+ dismissable,
628
+ keyboardDismissDisabled,
629
+ shouldCloseOnBlur,
630
+ minWidth = 0,
631
+ ...props
632
+ }, ref) => {
713
633
  const fallbackRef = useRef2(null);
714
634
  const popoverRef = ref || fallbackRef;
715
- const { overlayProps } = useOverlay2(__spreadValues({
635
+ const { overlayProps } = useOverlay2({
716
636
  isOpen: open,
717
637
  isDismissable: dismissable,
718
638
  isKeyboardDismissDisabled: keyboardDismissDisabled,
719
- shouldCloseOnBlur
720
- }, props), popoverRef);
639
+ shouldCloseOnBlur,
640
+ ...props
641
+ }, popoverRef);
721
642
  const { modalProps } = useModal2({});
722
643
  const style = { minWidth };
723
644
  return /* @__PURE__ */ React19.createElement(Overlay, {
724
645
  open
725
- }, /* @__PURE__ */ React19.createElement(Box, __spreadValues({
646
+ }, /* @__PURE__ */ React19.createElement(Box, {
726
647
  ref: popoverRef,
727
- role: "presentation"
728
- }, mergeProps3(props, overlayProps, modalProps, style)), children));
648
+ role: "presentation",
649
+ ...mergeProps3(props, overlayProps, modalProps, style)
650
+ }, children));
729
651
  });
730
652
 
731
653
  // src/Dialog/DialogTrigger.tsx
@@ -763,7 +685,7 @@ var CloseButton = ({ css }) => {
763
685
  }, ref);
764
686
  return /* @__PURE__ */ React21.createElement(Box10, {
765
687
  css: { display: "flex", justifyContent: "flex-end" }
766
- }, /* @__PURE__ */ React21.createElement(Box10, __spreadValues({
688
+ }, /* @__PURE__ */ React21.createElement(Box10, {
767
689
  as: "button",
768
690
  __baseCSS: {
769
691
  outline: "none",
@@ -775,8 +697,9 @@ var CloseButton = ({ css }) => {
775
697
  p: 0
776
698
  },
777
699
  css,
778
- ref
779
- }, buttonProps), /* @__PURE__ */ React21.createElement("svg", {
700
+ ref,
701
+ ...buttonProps
702
+ }, /* @__PURE__ */ React21.createElement("svg", {
780
703
  viewBox: "0 0 20 20",
781
704
  fill: "currentColor"
782
705
  }, /* @__PURE__ */ React21.createElement("path", {
@@ -796,26 +719,22 @@ var addTitleProps = (children, titleProps) => {
796
719
  childs.splice(titleIndex, 1, titleChild);
797
720
  return childs;
798
721
  };
799
- var Dialog = (_a) => {
800
- var _b = _a, {
801
- children,
802
- variant,
803
- size,
804
- closeButton
805
- } = _b, props = __objRest(_b, [
806
- "children",
807
- "variant",
808
- "size",
809
- "closeButton"
810
- ]);
722
+ var Dialog = ({
723
+ children,
724
+ variant,
725
+ size,
726
+ closeButton,
727
+ ...props
728
+ }) => {
811
729
  const ref = useRef4(null);
812
730
  const { close } = useDialogContext();
813
731
  const { dialogProps, titleProps } = useDialog(props, ref);
814
732
  const styles = useComponentStyles11("Dialog", { variant, size }, { parts: ["container", "closeButton"] });
815
- return /* @__PURE__ */ React21.createElement(Box10, __spreadValues({
733
+ return /* @__PURE__ */ React21.createElement(Box10, {
816
734
  __baseCSS: { bg: "#fff" },
817
- css: styles.container
818
- }, dialogProps), closeButton && /* @__PURE__ */ React21.createElement(CloseButton, {
735
+ css: styles.container,
736
+ ...dialogProps
737
+ }, closeButton && /* @__PURE__ */ React21.createElement(CloseButton, {
819
738
  css: styles.closeButton
820
739
  }), typeof children === "function" ? children({ close, titleProps }) : props["aria-labelledby"] ? children : addTitleProps(children, titleProps));
821
740
  };
@@ -825,13 +744,14 @@ Dialog.Trigger = DialogTrigger;
825
744
  import React22 from "react";
826
745
  import { useSeparator } from "@react-aria/separator";
827
746
  import { Box as Box11, useComponentStyles as useComponentStyles12 } from "@marigold/system";
828
- var Divider = (_a) => {
829
- var _b = _a, { variant } = _b, props = __objRest(_b, ["variant"]);
747
+ var Divider = ({ variant, ...props }) => {
830
748
  const { separatorProps } = useSeparator(props);
831
749
  const styles = useComponentStyles12("Divider", { variant });
832
- return /* @__PURE__ */ React22.createElement(Box11, __spreadValues(__spreadValues({
833
- css: styles
834
- }, props), separatorProps));
750
+ return /* @__PURE__ */ React22.createElement(Box11, {
751
+ css: styles,
752
+ ...props,
753
+ ...separatorProps
754
+ });
835
755
  };
836
756
 
837
757
  // src/Footer/Footer.tsx
@@ -839,26 +759,25 @@ import React23 from "react";
839
759
  import {
840
760
  useComponentStyles as useComponentStyles13
841
761
  } from "@marigold/system";
842
- var Footer = (_a) => {
843
- var _b = _a, { children, variant, size } = _b, props = __objRest(_b, ["children", "variant", "size"]);
762
+ var Footer = ({ children, variant, size, ...props }) => {
844
763
  const styles = useComponentStyles13("Footer", { variant, size });
845
- return /* @__PURE__ */ React23.createElement(Box, __spreadProps(__spreadValues({
846
- as: "footer"
847
- }, props), {
764
+ return /* @__PURE__ */ React23.createElement(Box, {
765
+ as: "footer",
766
+ ...props,
848
767
  css: styles
849
- }), children);
768
+ }, children);
850
769
  };
851
770
 
852
771
  // src/Image/Image.tsx
853
772
  import React24 from "react";
854
773
  import { useComponentStyles as useComponentStyles14 } from "@marigold/system";
855
- var Image = (_a) => {
856
- var _b = _a, { variant } = _b, props = __objRest(_b, ["variant"]);
774
+ var Image = ({ variant, ...props }) => {
857
775
  const styles = useComponentStyles14("Image", { variant });
858
- return /* @__PURE__ */ React24.createElement(Box, __spreadProps(__spreadValues({}, props), {
776
+ return /* @__PURE__ */ React24.createElement(Box, {
777
+ ...props,
859
778
  as: "img",
860
779
  css: styles
861
- }));
780
+ });
862
781
  };
863
782
 
864
783
  // src/Inline/Inline.tsx
@@ -873,72 +792,63 @@ var ALIGNMENT_Y = {
873
792
  center: "center",
874
793
  bottom: "flex-end"
875
794
  };
876
- var Inline = (_a) => {
877
- var _b = _a, {
878
- space = "none",
879
- alignX = "left",
880
- alignY = "center",
881
- children
882
- } = _b, props = __objRest(_b, [
883
- "space",
884
- "alignX",
885
- "alignY",
886
- "children"
887
- ]);
888
- return /* @__PURE__ */ React25.createElement(Box, __spreadValues({
889
- css: {
890
- display: "flex",
891
- flexWrap: "wrap",
892
- gap: space,
893
- alignItems: ALIGNMENT_Y[alignY],
894
- justifyContent: ALIGNMENT_X[alignX]
895
- }
896
- }, props), children);
897
- };
795
+ var Inline = ({
796
+ space = "none",
797
+ alignX = "left",
798
+ alignY = "center",
799
+ children,
800
+ ...props
801
+ }) => /* @__PURE__ */ React25.createElement(Box, {
802
+ css: {
803
+ display: "flex",
804
+ flexWrap: "wrap",
805
+ gap: space,
806
+ alignItems: ALIGNMENT_Y[alignY],
807
+ justifyContent: ALIGNMENT_X[alignX]
808
+ },
809
+ ...props
810
+ }, children);
898
811
 
899
812
  // src/Input/Input.tsx
900
813
  import React26, { forwardRef as forwardRef5 } from "react";
901
814
  import { Box as Box12, useComponentStyles as useComponentStyles15 } from "@marigold/system";
902
- var Input = forwardRef5((_a, ref) => {
903
- var _b = _a, { variant, size, type = "text" } = _b, props = __objRest(_b, ["variant", "size", "type"]);
815
+ var Input = forwardRef5(({ variant, size, type = "text", ...props }, ref) => {
904
816
  const styles = useComponentStyles15("Input", { variant, size });
905
- return /* @__PURE__ */ React26.createElement(Box12, __spreadProps(__spreadValues({}, props), {
817
+ return /* @__PURE__ */ React26.createElement(Box12, {
818
+ ...props,
906
819
  ref,
907
820
  as: "input",
908
821
  type,
909
822
  css: styles
910
- }));
823
+ });
911
824
  });
912
825
 
913
826
  // src/Link/Link.tsx
914
827
  import React27, { useRef as useRef5 } from "react";
915
828
  import { useLink } from "@react-aria/link";
916
829
  import { useComponentStyles as useComponentStyles16 } from "@marigold/system";
917
- var Link = (_a) => {
918
- var _b = _a, {
919
- as = "a",
920
- variant,
921
- size,
922
- children,
923
- disabled
924
- } = _b, props = __objRest(_b, [
925
- "as",
926
- "variant",
927
- "size",
928
- "children",
929
- "disabled"
930
- ]);
830
+ var Link = ({
831
+ as = "a",
832
+ variant,
833
+ size,
834
+ children,
835
+ disabled,
836
+ ...props
837
+ }) => {
931
838
  const ref = useRef5(null);
932
- const { linkProps } = useLink(__spreadProps(__spreadValues({}, props), {
839
+ const { linkProps } = useLink({
840
+ ...props,
933
841
  elementType: typeof as === "string" ? as : "span",
934
842
  isDisabled: disabled
935
- }), ref);
843
+ }, ref);
936
844
  const styles = useComponentStyles16("Link", { variant, size });
937
- return /* @__PURE__ */ React27.createElement(Box, __spreadValues(__spreadValues({
845
+ return /* @__PURE__ */ React27.createElement(Box, {
938
846
  as,
939
847
  css: styles,
940
- ref
941
- }, props), linkProps), children);
848
+ ref,
849
+ ...props,
850
+ ...linkProps
851
+ }, children);
942
852
  };
943
853
 
944
854
  // src/Menu/Menu.tsx
@@ -975,24 +885,27 @@ var MenuTrigger = ({ disabled, children }) => {
975
885
  overlayRef,
976
886
  isOpen: state.isOpen
977
887
  });
978
- const menuContext = __spreadProps(__spreadValues({}, menuProps), {
888
+ const menuContext = {
889
+ ...menuProps,
979
890
  open: state.isOpen,
980
891
  onClose: state.close,
981
892
  autoFocus: state.focusStrategy,
982
893
  triggerWidth: menuTriggerRef.current ? menuTriggerRef.current.offsetWidth : void 0
983
- });
894
+ };
984
895
  return /* @__PURE__ */ React28.createElement(MenuContext.Provider, {
985
896
  value: menuContext
986
- }, /* @__PURE__ */ React28.createElement(PressResponder2, __spreadProps(__spreadValues({}, menuTriggerProps), {
897
+ }, /* @__PURE__ */ React28.createElement(PressResponder2, {
898
+ ...menuTriggerProps,
987
899
  ref: menuTriggerRef,
988
900
  isPressed: state.isOpen
989
- }), menuTrigger), /* @__PURE__ */ React28.createElement(Popover, __spreadValues({
901
+ }, menuTrigger), /* @__PURE__ */ React28.createElement(Popover, {
990
902
  open: state.isOpen,
991
903
  onClose: state.close,
992
904
  dismissable: true,
993
905
  shouldCloseOnBlur: true,
994
- ref: overlayRef
995
- }, positionProps), menu));
906
+ ref: overlayRef,
907
+ ...positionProps
908
+ }, menu));
996
909
  };
997
910
 
998
911
  // src/Menu/MenuItem.tsx
@@ -1013,7 +926,7 @@ var MenuItem = ({ item, state, onAction, css }) => {
1013
926
  const stateProps = useStateProps3({
1014
927
  focus: isFocusVisible
1015
928
  });
1016
- return /* @__PURE__ */ React29.createElement(Box13, __spreadValues(__spreadValues({
929
+ return /* @__PURE__ */ React29.createElement(Box13, {
1017
930
  as: "li",
1018
931
  ref,
1019
932
  __baseCSS: {
@@ -1021,24 +934,25 @@ var MenuItem = ({ item, state, onAction, css }) => {
1021
934
  outline: 0
1022
935
  }
1023
936
  },
1024
- css
1025
- }, mergeProps4(menuItemProps, focusProps)), stateProps), item.rendered);
937
+ css,
938
+ ...mergeProps4(menuItemProps, focusProps),
939
+ ...stateProps
940
+ }, item.rendered);
1026
941
  };
1027
942
 
1028
943
  // src/Menu/Menu.tsx
1029
- var Menu = (_a) => {
1030
- var _b = _a, { variant, size } = _b, props = __objRest(_b, ["variant", "size"]);
1031
- const _a2 = useMenuContext(), { triggerWidth } = _a2, menuContext = __objRest(_a2, ["triggerWidth"]);
1032
- const ownProps = __spreadValues(__spreadValues({}, props), menuContext);
944
+ var Menu = ({ variant, size, ...props }) => {
945
+ const { triggerWidth, ...menuContext } = useMenuContext();
946
+ const ownProps = { ...props, ...menuContext };
1033
947
  const ref = useRef8(null);
1034
- const state = useTreeState(__spreadProps(__spreadValues({}, ownProps), { selectionMode: "none" }));
948
+ const state = useTreeState({ ...ownProps, selectionMode: "none" });
1035
949
  const { menuProps } = useMenu(ownProps, state, ref);
1036
950
  const styles = useComponentStyles17("Menu", { variant, size }, { parts: ["container", "item"] });
1037
951
  return /* @__PURE__ */ React30.createElement(FocusScope2, {
1038
952
  restoreFocus: true
1039
953
  }, /* @__PURE__ */ React30.createElement("div", null, /* @__PURE__ */ React30.createElement(DismissButton, {
1040
954
  onDismiss: ownProps.onClose
1041
- }), /* @__PURE__ */ React30.createElement(Box14, __spreadValues({
955
+ }), /* @__PURE__ */ React30.createElement(Box14, {
1042
956
  as: "ul",
1043
957
  ref,
1044
958
  style: { width: triggerWidth },
@@ -1047,8 +961,9 @@ var Menu = (_a) => {
1047
961
  p: 0,
1048
962
  overflowWrap: "break-word"
1049
963
  },
1050
- css: styles.container
1051
- }, menuProps), [...state.collection].map((item) => /* @__PURE__ */ React30.createElement(MenuItem, {
964
+ css: styles.container,
965
+ ...menuProps
966
+ }, [...state.collection].map((item) => /* @__PURE__ */ React30.createElement(MenuItem, {
1052
967
  key: item.key,
1053
968
  item,
1054
969
  state,
@@ -1065,18 +980,13 @@ Menu.Item = Item;
1065
980
  import React31 from "react";
1066
981
  import { Exclamation, Info, Notification } from "@marigold/icons";
1067
982
  import { useComponentStyles as useComponentStyles18 } from "@marigold/system";
1068
- var Message = (_a) => {
1069
- var _b = _a, {
1070
- messageTitle,
1071
- variant = "info",
1072
- size,
1073
- children
1074
- } = _b, props = __objRest(_b, [
1075
- "messageTitle",
1076
- "variant",
1077
- "size",
1078
- "children"
1079
- ]);
983
+ var Message = ({
984
+ messageTitle,
985
+ variant = "info",
986
+ size,
987
+ children,
988
+ ...props
989
+ }) => {
1080
990
  const styles = useComponentStyles18("Message", {
1081
991
  variant,
1082
992
  size
@@ -1088,9 +998,10 @@ var Message = (_a) => {
1088
998
  if (variant === "error") {
1089
999
  icon = /* @__PURE__ */ React31.createElement(Exclamation, null);
1090
1000
  }
1091
- return /* @__PURE__ */ React31.createElement(Box, __spreadValues({
1092
- css: styles.container
1093
- }, props), /* @__PURE__ */ React31.createElement(Box, {
1001
+ return /* @__PURE__ */ React31.createElement(Box, {
1002
+ css: styles.container,
1003
+ ...props
1004
+ }, /* @__PURE__ */ React31.createElement(Box, {
1094
1005
  __baseCSS: { display: "flex", alignItems: "center", gap: 4 }
1095
1006
  }, /* @__PURE__ */ React31.createElement(Box, {
1096
1007
  role: "presentation",
@@ -1127,35 +1038,28 @@ import {
1127
1038
  Box as Box15,
1128
1039
  useComponentStyles as useComponentStyles19
1129
1040
  } from "@marigold/system";
1130
- var HelpText = (_a) => {
1131
- var _b = _a, {
1132
- variant,
1133
- size,
1134
- disabled,
1135
- description,
1136
- descriptionProps,
1137
- error,
1138
- errorMessage,
1139
- errorMessageProps
1140
- } = _b, props = __objRest(_b, [
1141
- "variant",
1142
- "size",
1143
- "disabled",
1144
- "description",
1145
- "descriptionProps",
1146
- "error",
1147
- "errorMessage",
1148
- "errorMessageProps"
1149
- ]);
1150
- var _a2;
1041
+ var HelpText = ({
1042
+ variant,
1043
+ size,
1044
+ disabled,
1045
+ description,
1046
+ descriptionProps,
1047
+ error,
1048
+ errorMessage,
1049
+ errorMessageProps,
1050
+ ...props
1051
+ }) => {
1052
+ var _a;
1151
1053
  const hasErrorMessage = errorMessage && error;
1152
1054
  const styles = useComponentStyles19("HelpText", { variant, size }, { parts: ["container", "icon"] });
1153
- return /* @__PURE__ */ React32.createElement(Box15, __spreadProps(__spreadValues(__spreadValues({}, hasErrorMessage ? errorMessageProps : descriptionProps), props), {
1055
+ return /* @__PURE__ */ React32.createElement(Box15, {
1056
+ ...hasErrorMessage ? errorMessageProps : descriptionProps,
1057
+ ...props,
1154
1058
  __baseCSS: { display: "flex", alignItems: "center", gap: 4 },
1155
1059
  css: styles.container
1156
- }), hasErrorMessage ? /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(Exclamation2, {
1060
+ }, hasErrorMessage ? /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(Exclamation2, {
1157
1061
  role: "presentation",
1158
- size: ((_a2 = styles == null ? void 0 : styles.icon) == null ? void 0 : _a2.size) || 16
1062
+ size: ((_a = styles == null ? void 0 : styles.icon) == null ? void 0 : _a.size) || 16
1159
1063
  }), errorMessage) : /* @__PURE__ */ React32.createElement(React32.Fragment, null, description));
1160
1064
  };
1161
1065
 
@@ -1179,11 +1083,14 @@ var FieldBase = ({
1179
1083
  const hasHelpText = !!description || errorMessage && error;
1180
1084
  return /* @__PURE__ */ React33.createElement(Box16, {
1181
1085
  css: { display: "flex", flexDirection: "column", width }
1182
- }, label && /* @__PURE__ */ React33.createElement(Label, __spreadValues(__spreadValues({
1086
+ }, label && /* @__PURE__ */ React33.createElement(Label, {
1183
1087
  required,
1184
1088
  variant,
1185
- size
1186
- }, labelProps), stateProps), label), children, hasHelpText && /* @__PURE__ */ React33.createElement(HelpText, __spreadProps(__spreadValues({}, stateProps), {
1089
+ size,
1090
+ ...labelProps,
1091
+ ...stateProps
1092
+ }, label), children, hasHelpText && /* @__PURE__ */ React33.createElement(HelpText, {
1093
+ ...stateProps,
1187
1094
  variant,
1188
1095
  size,
1189
1096
  disabled,
@@ -1192,7 +1099,7 @@ var FieldBase = ({
1192
1099
  error,
1193
1100
  errorMessage,
1194
1101
  errorMessageProps
1195
- })));
1102
+ }));
1196
1103
  };
1197
1104
 
1198
1105
  // src/NumberField/StepButton.tsx
@@ -1221,10 +1128,9 @@ var Minus = () => /* @__PURE__ */ React34.createElement(Box17, {
1221
1128
  clipRule: "evenodd",
1222
1129
  d: "M3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
1223
1130
  }));
1224
- var StepButton = (_a) => {
1225
- var _b = _a, { direction, css } = _b, props = __objRest(_b, ["direction", "css"]);
1131
+ var StepButton = ({ direction, css, ...props }) => {
1226
1132
  const ref = useRef9(null);
1227
- const { buttonProps, isPressed } = useButton3(__spreadProps(__spreadValues({}, props), { elementType: "div" }), ref);
1133
+ const { buttonProps, isPressed } = useButton3({ ...props, elementType: "div" }, ref);
1228
1134
  const { hoverProps, isHovered } = useHover2(props);
1229
1135
  const stateProps = useStateProps4({
1230
1136
  active: isPressed,
@@ -1232,48 +1138,42 @@ var StepButton = (_a) => {
1232
1138
  disabled: props.isDisabled
1233
1139
  });
1234
1140
  const Icon3 = direction === "up" ? Plus : Minus;
1235
- return /* @__PURE__ */ React34.createElement(Box17, __spreadValues(__spreadValues({
1141
+ return /* @__PURE__ */ React34.createElement(Box17, {
1236
1142
  __baseCSS: {
1237
1143
  display: "flex",
1238
1144
  alignItems: "center",
1239
1145
  justifyContent: "center",
1240
1146
  cursor: props.isDisabled ? "not-allowed" : "pointer"
1241
1147
  },
1242
- css
1243
- }, mergeProps5(buttonProps, hoverProps)), stateProps), /* @__PURE__ */ React34.createElement(Icon3, null));
1148
+ css,
1149
+ ...mergeProps5(buttonProps, hoverProps),
1150
+ ...stateProps
1151
+ }, /* @__PURE__ */ React34.createElement(Icon3, null));
1244
1152
  };
1245
1153
 
1246
1154
  // src/NumberField/NumberField.tsx
1247
- var NumberField = forwardRef6((_a, ref) => {
1248
- var _b = _a, {
1249
- variant,
1250
- size,
1251
- width,
1252
- disabled,
1253
- required,
1254
- readOnly,
1255
- error,
1256
- hideStepper
1257
- } = _b, rest = __objRest(_b, [
1258
- "variant",
1259
- "size",
1260
- "width",
1261
- "disabled",
1262
- "required",
1263
- "readOnly",
1264
- "error",
1265
- "hideStepper"
1266
- ]);
1267
- const props = __spreadValues({
1155
+ var NumberField = forwardRef6(({
1156
+ variant,
1157
+ size,
1158
+ width,
1159
+ disabled,
1160
+ required,
1161
+ readOnly,
1162
+ error,
1163
+ hideStepper,
1164
+ ...rest
1165
+ }, ref) => {
1166
+ const props = {
1268
1167
  isDisabled: disabled,
1269
1168
  isRequired: required,
1270
1169
  isReadOnly: readOnly,
1271
- validationState: error ? "invalid" : "valid"
1272
- }, rest);
1170
+ validationState: error ? "invalid" : "valid",
1171
+ ...rest
1172
+ };
1273
1173
  const showStepper = !hideStepper;
1274
1174
  const { locale } = useLocale();
1275
1175
  const inputRef = useObjectRef3(ref);
1276
- const state = useNumberFieldState(__spreadProps(__spreadValues({}, props), { locale }));
1176
+ const state = useNumberFieldState({ ...props, locale });
1277
1177
  const {
1278
1178
  labelProps,
1279
1179
  groupProps,
@@ -1310,7 +1210,7 @@ var NumberField = forwardRef6((_a, ref) => {
1310
1210
  variant,
1311
1211
  size,
1312
1212
  width
1313
- }, /* @__PURE__ */ React35.createElement(Box18, __spreadValues(__spreadValues({
1213
+ }, /* @__PURE__ */ React35.createElement(Box18, {
1314
1214
  "data-group": true,
1315
1215
  __baseCSS: {
1316
1216
  display: "flex",
@@ -1319,18 +1219,24 @@ var NumberField = forwardRef6((_a, ref) => {
1319
1219
  flexGrow: 1
1320
1220
  }
1321
1221
  },
1322
- css: styles.group
1323
- }, mergeProps6(groupProps, focusProps, hoverProps)), stateProps), showStepper && /* @__PURE__ */ React35.createElement(StepButton, __spreadValues({
1222
+ css: styles.group,
1223
+ ...mergeProps6(groupProps, focusProps, hoverProps),
1224
+ ...stateProps
1225
+ }, showStepper && /* @__PURE__ */ React35.createElement(StepButton, {
1324
1226
  direction: "down",
1325
- css: styles.stepper
1326
- }, decrementButtonProps)), /* @__PURE__ */ React35.createElement(Input, __spreadValues(__spreadValues({
1227
+ css: styles.stepper,
1228
+ ...decrementButtonProps
1229
+ }), /* @__PURE__ */ React35.createElement(Input, {
1327
1230
  ref: inputRef,
1328
1231
  variant,
1329
- size
1330
- }, inputProps), stateProps)), showStepper && /* @__PURE__ */ React35.createElement(StepButton, __spreadValues({
1232
+ size,
1233
+ ...inputProps,
1234
+ ...stateProps
1235
+ }), showStepper && /* @__PURE__ */ React35.createElement(StepButton, {
1331
1236
  direction: "up",
1332
- css: styles.stepper
1333
- }, incrementButtonProps))));
1237
+ css: styles.stepper,
1238
+ ...incrementButtonProps
1239
+ })));
1334
1240
  });
1335
1241
 
1336
1242
  // src/Provider/index.ts
@@ -1394,43 +1300,36 @@ import {
1394
1300
  Box as Box19,
1395
1301
  useComponentStyles as useComponentStyles21
1396
1302
  } from "@marigold/system";
1397
- var RadioGroup = (_a) => {
1398
- var _b = _a, {
1399
- children,
1400
- orientation = "vertical",
1401
- size,
1402
- variant,
1403
- width,
1404
- required,
1405
- disabled,
1406
- readOnly,
1407
- error
1408
- } = _b, rest = __objRest(_b, [
1409
- "children",
1410
- "orientation",
1411
- "size",
1412
- "variant",
1413
- "width",
1414
- "required",
1415
- "disabled",
1416
- "readOnly",
1417
- "error"
1418
- ]);
1419
- const props = __spreadValues({
1303
+ var RadioGroup = ({
1304
+ children,
1305
+ orientation = "vertical",
1306
+ size,
1307
+ variant,
1308
+ width,
1309
+ required,
1310
+ disabled,
1311
+ readOnly,
1312
+ error,
1313
+ ...rest
1314
+ }) => {
1315
+ const props = {
1420
1316
  isRequired: required,
1421
1317
  isDisabled: disabled,
1422
1318
  isReadOnly: readOnly,
1423
- validationState: error ? "invalid" : "valid"
1424
- }, rest);
1319
+ validationState: error ? "invalid" : "valid",
1320
+ ...rest
1321
+ };
1425
1322
  const state = useRadioGroupState(props);
1426
1323
  const { radioGroupProps, labelProps } = useRadioGroup(props, state);
1427
1324
  const styles = useComponentStyles21("RadioGroup", { variant, size }, { parts: ["container", "group"] });
1428
- return /* @__PURE__ */ React37.createElement(Box19, __spreadProps(__spreadValues({}, radioGroupProps), {
1325
+ return /* @__PURE__ */ React37.createElement(Box19, {
1326
+ ...radioGroupProps,
1429
1327
  css: styles.container
1430
- }), props.label && /* @__PURE__ */ React37.createElement(Label, __spreadValues({
1328
+ }, props.label && /* @__PURE__ */ React37.createElement(Label, {
1431
1329
  as: "span",
1432
- required
1433
- }, labelProps), props.label), /* @__PURE__ */ React37.createElement(Box19, {
1330
+ required,
1331
+ ...labelProps
1332
+ }, props.label), /* @__PURE__ */ React37.createElement(Box19, {
1434
1333
  role: "presentation",
1435
1334
  "data-orientation": orientation,
1436
1335
  __baseCSS: {
@@ -1441,7 +1340,7 @@ var RadioGroup = (_a) => {
1441
1340
  },
1442
1341
  css: styles.group
1443
1342
  }, /* @__PURE__ */ React37.createElement(RadioGroupContext.Provider, {
1444
- value: __spreadValues({ variant, size, width, error }, state)
1343
+ value: { variant, size, width, error, ...state }
1445
1344
  }, children)));
1446
1345
  };
1447
1346
 
@@ -1454,39 +1353,32 @@ var Dot = () => /* @__PURE__ */ React38.createElement("svg", {
1454
1353
  cy: "3",
1455
1354
  r: "3"
1456
1355
  }));
1457
- var Icon2 = (_a) => {
1458
- var _b = _a, { checked, css } = _b, props = __objRest(_b, ["checked", "css"]);
1459
- return /* @__PURE__ */ React38.createElement(Box20, __spreadValues({
1460
- "aria-hidden": "true",
1461
- __baseCSS: {
1462
- width: 16,
1463
- height: 16,
1464
- bg: "#fff",
1465
- border: "1px solid #000",
1466
- borderRadius: "50%",
1467
- display: "flex",
1468
- alignItems: "center",
1469
- justifyContent: "center",
1470
- p: 4
1471
- },
1472
- css
1473
- }, props), checked ? /* @__PURE__ */ React38.createElement(Dot, null) : null);
1474
- };
1475
- var Radio = forwardRef7((_a, ref) => {
1476
- var _b = _a, { width, disabled } = _b, props = __objRest(_b, ["width", "disabled"]);
1477
- const _a2 = useRadioGroupContext(), {
1356
+ var Icon2 = ({ checked, css, ...props }) => /* @__PURE__ */ React38.createElement(Box20, {
1357
+ "aria-hidden": "true",
1358
+ __baseCSS: {
1359
+ width: 16,
1360
+ height: 16,
1361
+ bg: "#fff",
1362
+ border: "1px solid #000",
1363
+ borderRadius: "50%",
1364
+ display: "flex",
1365
+ alignItems: "center",
1366
+ justifyContent: "center",
1367
+ p: 4
1368
+ },
1369
+ css,
1370
+ ...props
1371
+ }, checked ? /* @__PURE__ */ React38.createElement(Dot, null) : null);
1372
+ var Radio = forwardRef7(({ width, disabled, ...props }, ref) => {
1373
+ const {
1478
1374
  variant,
1479
1375
  size,
1480
1376
  error,
1481
- width: groupWidth
1482
- } = _a2, state = __objRest(_a2, [
1483
- "variant",
1484
- "size",
1485
- "error",
1486
- "width"
1487
- ]);
1377
+ width: groupWidth,
1378
+ ...state
1379
+ } = useRadioGroupContext();
1488
1380
  const inputRef = useObjectRef4(ref);
1489
- const { inputProps } = useRadio(__spreadValues({ isDisabled: disabled }, props), state, inputRef);
1381
+ const { inputProps } = useRadio({ isDisabled: disabled, ...props }, state, inputRef);
1490
1382
  const styles = useComponentStyles22("Radio", { variant: variant || props.variant, size: size || props.size }, { parts: ["container", "label", "radio"] });
1491
1383
  const { hoverProps, isHovered } = useHover4({});
1492
1384
  const { isFocusVisible, focusProps } = useFocusRing5();
@@ -1498,7 +1390,7 @@ var Radio = forwardRef7((_a, ref) => {
1498
1390
  readOnly: props.readOnly,
1499
1391
  error
1500
1392
  });
1501
- return /* @__PURE__ */ React38.createElement(Box20, __spreadValues(__spreadValues({
1393
+ return /* @__PURE__ */ React38.createElement(Box20, {
1502
1394
  as: "label",
1503
1395
  __baseCSS: {
1504
1396
  display: "flex",
@@ -1507,8 +1399,10 @@ var Radio = forwardRef7((_a, ref) => {
1507
1399
  position: "relative",
1508
1400
  width: width || groupWidth || "100%"
1509
1401
  },
1510
- css: styles.container
1511
- }, hoverProps), stateProps), /* @__PURE__ */ React38.createElement(Box20, __spreadValues(__spreadValues({
1402
+ css: styles.container,
1403
+ ...hoverProps,
1404
+ ...stateProps
1405
+ }, /* @__PURE__ */ React38.createElement(Box20, {
1512
1406
  as: "input",
1513
1407
  ref: inputRef,
1514
1408
  css: {
@@ -1520,13 +1414,17 @@ var Radio = forwardRef7((_a, ref) => {
1520
1414
  zIndex: 1,
1521
1415
  opacity: 1e-4,
1522
1416
  cursor: inputProps.disabled ? "not-allowed" : "pointer"
1523
- }
1524
- }, inputProps), focusProps)), /* @__PURE__ */ React38.createElement(Icon2, __spreadValues({
1417
+ },
1418
+ ...inputProps,
1419
+ ...focusProps
1420
+ }), /* @__PURE__ */ React38.createElement(Icon2, {
1525
1421
  checked: inputProps.checked,
1526
- css: styles.radio
1527
- }, stateProps)), /* @__PURE__ */ React38.createElement(Box20, __spreadValues({
1528
- css: styles.label
1529
- }, stateProps), props.children));
1422
+ css: styles.radio,
1423
+ ...stateProps
1424
+ }), /* @__PURE__ */ React38.createElement(Box20, {
1425
+ css: styles.label,
1426
+ ...stateProps
1427
+ }, props.children));
1530
1428
  });
1531
1429
  Radio.Group = RadioGroup;
1532
1430
 
@@ -1583,11 +1481,13 @@ var ListBoxOption = ({ item, state }) => {
1583
1481
  disabled: isDisabled,
1584
1482
  focusVisible: isFocused
1585
1483
  });
1586
- return /* @__PURE__ */ React39.createElement(Box21, __spreadValues(__spreadValues({
1484
+ return /* @__PURE__ */ React39.createElement(Box21, {
1587
1485
  as: "li",
1588
1486
  ref,
1589
- css: styles.option
1590
- }, optionProps), stateProps), item.rendered);
1487
+ css: styles.option,
1488
+ ...optionProps,
1489
+ ...stateProps
1490
+ }, item.rendered);
1591
1491
  };
1592
1492
 
1593
1493
  // src/ListBox/ListBoxSection.tsx
@@ -1597,16 +1497,19 @@ var ListBoxSection = ({ section, state }) => {
1597
1497
  "aria-label": section["aria-label"]
1598
1498
  });
1599
1499
  const { styles } = useListBoxContext();
1600
- return /* @__PURE__ */ React40.createElement(Box22, __spreadValues({
1500
+ return /* @__PURE__ */ React40.createElement(Box22, {
1601
1501
  as: "li",
1602
- css: styles.section
1603
- }, itemProps), section.rendered && /* @__PURE__ */ React40.createElement(Box22, __spreadValues({
1604
- css: styles.sectionTitle
1605
- }, headingProps), section.rendered), /* @__PURE__ */ React40.createElement(Box22, __spreadValues({
1502
+ css: styles.section,
1503
+ ...itemProps
1504
+ }, section.rendered && /* @__PURE__ */ React40.createElement(Box22, {
1505
+ css: styles.sectionTitle,
1506
+ ...headingProps
1507
+ }, section.rendered), /* @__PURE__ */ React40.createElement(Box22, {
1606
1508
  as: "ul",
1607
1509
  __baseCSS: { listStyle: "none", p: 0 },
1608
- css: styles.list
1609
- }, groupProps), [...section.childNodes].map((node) => /* @__PURE__ */ React40.createElement(ListBoxOption, {
1510
+ css: styles.list,
1511
+ ...groupProps
1512
+ }, [...section.childNodes].map((node) => /* @__PURE__ */ React40.createElement(ListBoxOption, {
1610
1513
  key: node.key,
1611
1514
  item: node,
1612
1515
  state
@@ -1614,8 +1517,7 @@ var ListBoxSection = ({ section, state }) => {
1614
1517
  };
1615
1518
 
1616
1519
  // src/ListBox/ListBox.tsx
1617
- var ListBox = forwardRef8((_a, ref) => {
1618
- var _b = _a, { state, variant, size } = _b, props = __objRest(_b, ["state", "variant", "size"]);
1520
+ var ListBox = forwardRef8(({ state, variant, size, ...props }, ref) => {
1619
1521
  const innerRef = useObjectRef5(ref);
1620
1522
  const { listBoxProps } = useListBox(props, state, innerRef);
1621
1523
  const styles = useComponentStyles23("ListBox", { variant, size }, { parts: ["container", "list", "option", "section", "sectionTitle"] });
@@ -1623,12 +1525,13 @@ var ListBox = forwardRef8((_a, ref) => {
1623
1525
  value: { styles }
1624
1526
  }, /* @__PURE__ */ React41.createElement(Box23, {
1625
1527
  css: styles.container
1626
- }, /* @__PURE__ */ React41.createElement(Box23, __spreadValues({
1528
+ }, /* @__PURE__ */ React41.createElement(Box23, {
1627
1529
  as: "ul",
1628
1530
  ref: innerRef,
1629
1531
  __baseCSS: { listStyle: "none", p: 0 },
1630
- css: styles.list
1631
- }, listBoxProps), [...state.collection].map((item) => item.type === "section" ? /* @__PURE__ */ React41.createElement(ListBoxSection, {
1532
+ css: styles.list,
1533
+ ...listBoxProps
1534
+ }, [...state.collection].map((item) => item.type === "section" ? /* @__PURE__ */ React41.createElement(ListBoxSection, {
1632
1535
  key: item.key,
1633
1536
  section: item,
1634
1537
  state
@@ -1663,17 +1566,17 @@ var Chevron = ({ css }) => /* @__PURE__ */ React42.createElement(Box24, {
1663
1566
  strokeLinejoin: "round",
1664
1567
  d: "M19 9l-7 7-7-7"
1665
1568
  }));
1666
- var Select = forwardRef9((_a, ref) => {
1667
- var _b = _a, { variant, size, width, open, disabled, required, error } = _b, rest = __objRest(_b, ["variant", "size", "width", "open", "disabled", "required", "error"]);
1569
+ var Select = forwardRef9(({ variant, size, width, open, disabled, required, error, ...rest }, ref) => {
1668
1570
  const formatMessage = useMessageFormatter(messages);
1669
1571
  const buttonRef = useObjectRef6(ref);
1670
- const props = __spreadValues({
1572
+ const props = {
1671
1573
  isOpen: open,
1672
1574
  isDisabled: disabled,
1673
1575
  isRequired: required,
1674
1576
  validationState: error ? "invalid" : "valid",
1675
- placeholder: rest.placeholder || formatMessage("placeholder")
1676
- }, rest);
1577
+ placeholder: rest.placeholder || formatMessage("placeholder"),
1578
+ ...rest
1579
+ };
1677
1580
  const state = useSelectState(props);
1678
1581
  const {
1679
1582
  labelProps,
@@ -1683,7 +1586,7 @@ var Select = forwardRef9((_a, ref) => {
1683
1586
  descriptionProps,
1684
1587
  errorMessageProps
1685
1588
  } = useSelect(props, state, buttonRef);
1686
- const { buttonProps } = useButton4(__spreadValues({ isDisabled: disabled }, triggerProps), buttonRef);
1589
+ const { buttonProps } = useButton4({ isDisabled: disabled, ...triggerProps }, buttonRef);
1687
1590
  const { focusProps, isFocusVisible } = useFocusRing6();
1688
1591
  const overlayRef = useRef11(null);
1689
1592
  const { overlayProps: positionProps } = useOverlayPosition2({
@@ -1704,7 +1607,7 @@ var Select = forwardRef9((_a, ref) => {
1704
1607
  size,
1705
1608
  width,
1706
1609
  label: props.label,
1707
- labelProps: __spreadValues({ as: "span" }, labelProps),
1610
+ labelProps: { as: "span", ...labelProps },
1708
1611
  description: props.description,
1709
1612
  descriptionProps,
1710
1613
  error,
@@ -1719,7 +1622,7 @@ var Select = forwardRef9((_a, ref) => {
1719
1622
  label: props.label,
1720
1623
  name: props.name,
1721
1624
  isDisabled: disabled
1722
- }), /* @__PURE__ */ React42.createElement(Box24, __spreadValues(__spreadValues({
1625
+ }), /* @__PURE__ */ React42.createElement(Box24, {
1723
1626
  as: "button",
1724
1627
  __baseCSS: {
1725
1628
  display: "flex",
@@ -1729,30 +1632,35 @@ var Select = forwardRef9((_a, ref) => {
1729
1632
  width: "100%"
1730
1633
  },
1731
1634
  css: styles.button,
1732
- ref: buttonRef
1733
- }, mergeProps7(buttonProps, focusProps)), stateProps), /* @__PURE__ */ React42.createElement(Box24, __spreadValues({
1635
+ ref: buttonRef,
1636
+ ...mergeProps7(buttonProps, focusProps),
1637
+ ...stateProps
1638
+ }, /* @__PURE__ */ React42.createElement(Box24, {
1734
1639
  css: {
1735
1640
  overflow: "hidden",
1736
1641
  whiteSpace: "nowrap"
1737
- }
1738
- }, valueProps), state.selectedItem ? state.selectedItem.rendered : props.placeholder), /* @__PURE__ */ React42.createElement(Chevron, {
1642
+ },
1643
+ ...valueProps
1644
+ }, state.selectedItem ? state.selectedItem.rendered : props.placeholder), /* @__PURE__ */ React42.createElement(Chevron, {
1739
1645
  css: styles.icon
1740
- })), /* @__PURE__ */ React42.createElement(Popover, __spreadValues({
1646
+ })), /* @__PURE__ */ React42.createElement(Popover, {
1741
1647
  open: state.isOpen,
1742
1648
  onClose: state.close,
1743
1649
  dismissable: true,
1744
1650
  shouldCloseOnBlur: true,
1745
1651
  minWidth: buttonRef.current ? buttonRef.current.offsetWidth : void 0,
1746
- ref: overlayRef
1747
- }, positionProps), /* @__PURE__ */ React42.createElement(FocusScope3, {
1652
+ ref: overlayRef,
1653
+ ...positionProps
1654
+ }, /* @__PURE__ */ React42.createElement(FocusScope3, {
1748
1655
  restoreFocus: true
1749
1656
  }, /* @__PURE__ */ React42.createElement(DismissButton2, {
1750
1657
  onDismiss: state.close
1751
- }), /* @__PURE__ */ React42.createElement(ListBox, __spreadValues({
1658
+ }), /* @__PURE__ */ React42.createElement(ListBox, {
1752
1659
  state,
1753
1660
  variant,
1754
- size
1755
- }, menuProps)), /* @__PURE__ */ React42.createElement(DismissButton2, {
1661
+ size,
1662
+ ...menuProps
1663
+ }), /* @__PURE__ */ React42.createElement(DismissButton2, {
1756
1664
  onDismiss: state.close
1757
1665
  }))));
1758
1666
  });
@@ -1778,8 +1686,7 @@ import { VisuallyHidden } from "@react-aria/visually-hidden";
1778
1686
 
1779
1687
  // src/Slider/Thumb.tsx
1780
1688
  import { useFocusRing as useFocusRing7 } from "@react-aria/focus";
1781
- var Thumb = (_a) => {
1782
- var _b = _a, { state, trackRef, styles } = _b, props = __objRest(_b, ["state", "trackRef", "styles"]);
1689
+ var Thumb = ({ state, trackRef, styles, ...props }) => {
1783
1690
  const { disabled } = props;
1784
1691
  const inputRef = React43.useRef(null);
1785
1692
  const { isFocusVisible, focusProps, isFocused } = useFocusRing7();
@@ -1804,44 +1711,50 @@ var Thumb = (_a) => {
1804
1711
  transform: "translateX(-50%)",
1805
1712
  left: `${state.getThumbPercent(0) * 100}%`
1806
1713
  }
1807
- }, /* @__PURE__ */ React43.createElement(Box, __spreadValues(__spreadProps(__spreadValues({}, thumbProps), {
1808
- __baseCSS: styles
1809
- }), stateProps), /* @__PURE__ */ React43.createElement(VisuallyHidden, null, /* @__PURE__ */ React43.createElement(Box, __spreadValues({
1714
+ }, /* @__PURE__ */ React43.createElement(Box, {
1715
+ ...thumbProps,
1716
+ __baseCSS: styles,
1717
+ ...stateProps
1718
+ }, /* @__PURE__ */ React43.createElement(VisuallyHidden, null, /* @__PURE__ */ React43.createElement(Box, {
1810
1719
  as: "input",
1811
1720
  type: "range",
1812
- ref: inputRef
1813
- }, mergeProps8(inputProps, focusProps))))));
1721
+ ref: inputRef,
1722
+ ...mergeProps8(inputProps, focusProps)
1723
+ }))));
1814
1724
  };
1815
1725
 
1816
1726
  // src/Slider/Slider.tsx
1817
- var Slider = forwardRef10((_a, ref) => {
1818
- var _b = _a, { variant, size, width = "100%" } = _b, props = __objRest(_b, ["variant", "size", "width"]);
1727
+ var Slider = forwardRef10(({ variant, size, width = "100%", ...props }, ref) => {
1819
1728
  const { formatOptions } = props;
1820
1729
  const trackRef = useObjectRef7(ref);
1821
1730
  const numberFormatter = useNumberFormatter(formatOptions);
1822
- const state = useSliderState(__spreadProps(__spreadValues({}, props), { numberFormatter }));
1823
- const { groupProps, trackProps, labelProps, outputProps } = useSlider(__spreadValues({
1824
- label: props.children
1825
- }, props), state, trackRef);
1731
+ const state = useSliderState({ ...props, numberFormatter });
1732
+ const { groupProps, trackProps, labelProps, outputProps } = useSlider({
1733
+ label: props.children,
1734
+ ...props
1735
+ }, state, trackRef);
1826
1736
  const styles = useComponentStyles25("Slider", { variant, size }, { parts: ["track", "thumb", "label", "output"] });
1827
- return /* @__PURE__ */ React44.createElement(Box, __spreadValues({
1737
+ return /* @__PURE__ */ React44.createElement(Box, {
1828
1738
  __baseCSS: {
1829
1739
  display: "flex",
1830
1740
  flexDirection: "column",
1831
1741
  touchAction: "none",
1832
1742
  width
1833
- }
1834
- }, groupProps), /* @__PURE__ */ React44.createElement(Box, {
1743
+ },
1744
+ ...groupProps
1745
+ }, /* @__PURE__ */ React44.createElement(Box, {
1835
1746
  __baseCSS: { display: "flex", alignSelf: "stretch" }
1836
- }, props.children && /* @__PURE__ */ React44.createElement(Box, __spreadValues({
1747
+ }, props.children && /* @__PURE__ */ React44.createElement(Box, {
1837
1748
  as: "label",
1838
- __baseCSS: styles.label
1839
- }, labelProps), props.children), /* @__PURE__ */ React44.createElement(Box, __spreadProps(__spreadValues({
1840
- as: "output"
1841
- }, outputProps), {
1749
+ __baseCSS: styles.label,
1750
+ ...labelProps
1751
+ }, props.children), /* @__PURE__ */ React44.createElement(Box, {
1752
+ as: "output",
1753
+ ...outputProps,
1842
1754
  __baseCSS: { flex: "1 0 auto", textAlign: "end" },
1843
1755
  css: styles.output
1844
- }), state.getThumbValueLabel(0))), /* @__PURE__ */ React44.createElement(Box, __spreadProps(__spreadValues({}, trackProps), {
1756
+ }, state.getThumbValueLabel(0))), /* @__PURE__ */ React44.createElement(Box, {
1757
+ ...trackProps,
1845
1758
  ref: trackRef,
1846
1759
  __baseCSS: {
1847
1760
  position: "relative",
@@ -1849,7 +1762,7 @@ var Slider = forwardRef10((_a, ref) => {
1849
1762
  width: "100%",
1850
1763
  cursor: props.disabled ? "not-allowed" : "pointer"
1851
1764
  }
1852
- }), /* @__PURE__ */ React44.createElement(Box, {
1765
+ }, /* @__PURE__ */ React44.createElement(Box, {
1853
1766
  __baseCSS: styles.track
1854
1767
  }), /* @__PURE__ */ React44.createElement(Thumb, {
1855
1768
  state,
@@ -1862,10 +1775,11 @@ var Slider = forwardRef10((_a, ref) => {
1862
1775
  // src/Split/Split.tsx
1863
1776
  import React45 from "react";
1864
1777
  import { Box as Box25 } from "@marigold/system";
1865
- var Split = (props) => /* @__PURE__ */ React45.createElement(Box25, __spreadProps(__spreadValues({}, props), {
1778
+ var Split = (props) => /* @__PURE__ */ React45.createElement(Box25, {
1779
+ ...props,
1866
1780
  role: "separator",
1867
1781
  css: { flexGrow: 1 }
1868
- }));
1782
+ });
1869
1783
 
1870
1784
  // src/Stack/Stack.tsx
1871
1785
  import React46 from "react";
@@ -1879,32 +1793,25 @@ var ALIGNMENT_Y2 = {
1879
1793
  center: "center",
1880
1794
  bottom: "flex-end"
1881
1795
  };
1882
- var Stack = (_a) => {
1883
- var _b = _a, {
1884
- children,
1885
- space = "none",
1886
- alignX = "left",
1887
- alignY = "top",
1888
- stretch = false
1889
- } = _b, props = __objRest(_b, [
1890
- "children",
1891
- "space",
1892
- "alignX",
1893
- "alignY",
1894
- "stretch"
1895
- ]);
1896
- return /* @__PURE__ */ React46.createElement(Box, __spreadValues({
1897
- css: {
1898
- display: "flex",
1899
- flexDirection: "column",
1900
- p: 0,
1901
- gap: space,
1902
- alignItems: ALIGNMENT_X2[alignX],
1903
- justifyContent: ALIGNMENT_Y2[alignY],
1904
- blockSize: stretch ? "100%" : "auto"
1905
- }
1906
- }, props), children);
1907
- };
1796
+ var Stack = ({
1797
+ children,
1798
+ space = "none",
1799
+ alignX = "left",
1800
+ alignY = "top",
1801
+ stretch = false,
1802
+ ...props
1803
+ }) => /* @__PURE__ */ React46.createElement(Box, {
1804
+ css: {
1805
+ display: "flex",
1806
+ flexDirection: "column",
1807
+ p: 0,
1808
+ gap: space,
1809
+ alignItems: ALIGNMENT_X2[alignX],
1810
+ justifyContent: ALIGNMENT_Y2[alignY],
1811
+ blockSize: stretch ? "100%" : "auto"
1812
+ },
1813
+ ...props
1814
+ }, children);
1908
1815
 
1909
1816
  // src/Switch/Switch.tsx
1910
1817
  import React47, { forwardRef as forwardRef11 } from "react";
@@ -1916,31 +1823,24 @@ import {
1916
1823
  useComponentStyles as useComponentStyles26,
1917
1824
  useStateProps as useStateProps10
1918
1825
  } from "@marigold/system";
1919
- var Switch = forwardRef11((_a, ref) => {
1920
- var _b = _a, {
1921
- variant,
1922
- size,
1923
- width = "100%",
1924
- checked,
1925
- disabled,
1926
- readOnly,
1927
- defaultChecked
1928
- } = _b, rest = __objRest(_b, [
1929
- "variant",
1930
- "size",
1931
- "width",
1932
- "checked",
1933
- "disabled",
1934
- "readOnly",
1935
- "defaultChecked"
1936
- ]);
1826
+ var Switch = forwardRef11(({
1827
+ variant,
1828
+ size,
1829
+ width = "100%",
1830
+ checked,
1831
+ disabled,
1832
+ readOnly,
1833
+ defaultChecked,
1834
+ ...rest
1835
+ }, ref) => {
1937
1836
  const inputRef = useObjectRef8(ref);
1938
- const props = __spreadValues({
1837
+ const props = {
1939
1838
  isSelected: checked,
1940
1839
  isDisabled: disabled,
1941
1840
  isReadOnly: readOnly,
1942
- defaultSelected: defaultChecked
1943
- }, rest);
1841
+ defaultSelected: defaultChecked,
1842
+ ...rest
1843
+ };
1944
1844
  const state = useToggleState2(props);
1945
1845
  const { inputProps } = useSwitch(props, state, inputRef);
1946
1846
  const { isFocusVisible, focusProps } = useFocusRing8();
@@ -1962,7 +1862,7 @@ var Switch = forwardRef11((_a, ref) => {
1962
1862
  width
1963
1863
  },
1964
1864
  css: styles.container
1965
- }, /* @__PURE__ */ React47.createElement(Box, __spreadValues(__spreadValues({
1865
+ }, /* @__PURE__ */ React47.createElement(Box, {
1966
1866
  as: "input",
1967
1867
  ref: inputRef,
1968
1868
  css: {
@@ -1974,10 +1874,12 @@ var Switch = forwardRef11((_a, ref) => {
1974
1874
  zIndex: 1,
1975
1875
  opacity: 1e-4,
1976
1876
  cursor: inputProps.disabled ? "not-allowed" : "pointer"
1977
- }
1978
- }, inputProps), focusProps)), props.children && /* @__PURE__ */ React47.createElement(Box, {
1877
+ },
1878
+ ...inputProps,
1879
+ ...focusProps
1880
+ }), props.children && /* @__PURE__ */ React47.createElement(Box, {
1979
1881
  css: styles.label
1980
- }, props.children), /* @__PURE__ */ React47.createElement(Box, __spreadValues({
1882
+ }, props.children), /* @__PURE__ */ React47.createElement(Box, {
1981
1883
  __baseCSS: {
1982
1884
  position: "relative",
1983
1885
  width: 48,
@@ -1985,8 +1887,9 @@ var Switch = forwardRef11((_a, ref) => {
1985
1887
  bg: "#dee2e6",
1986
1888
  borderRadius: 20
1987
1889
  },
1988
- css: styles.track
1989
- }, stateProps), /* @__PURE__ */ React47.createElement(Box, __spreadValues({
1890
+ css: styles.track,
1891
+ ...stateProps
1892
+ }, /* @__PURE__ */ React47.createElement(Box, {
1990
1893
  __baseCSS: {
1991
1894
  display: "block",
1992
1895
  position: "absolute",
@@ -2003,8 +1906,9 @@ var Switch = forwardRef11((_a, ref) => {
2003
1906
  transform: "translateX(calc(47px - 100%))"
2004
1907
  }
2005
1908
  },
2006
- css: styles.thumb
2007
- }, stateProps))));
1909
+ css: styles.thumb,
1910
+ ...stateProps
1911
+ })));
2008
1912
  });
2009
1913
 
2010
1914
  // src/Table/Table.tsx
@@ -2033,7 +1937,9 @@ import React48 from "react";
2033
1937
  import { useTableRowGroup } from "@react-aria/table";
2034
1938
  var TableBody = ({ children }) => {
2035
1939
  const { rowGroupProps } = useTableRowGroup();
2036
- return /* @__PURE__ */ React48.createElement("tbody", __spreadValues({}, rowGroupProps), children);
1940
+ return /* @__PURE__ */ React48.createElement("tbody", {
1941
+ ...rowGroupProps
1942
+ }, children);
2037
1943
  };
2038
1944
 
2039
1945
  // src/Table/TableCell.tsx
@@ -2051,11 +1957,13 @@ var TableCell = ({ cell }) => {
2051
1957
  }, state, ref);
2052
1958
  const { focusProps, isFocusVisible } = useFocusRing9();
2053
1959
  const stateProps = useStateProps11({ disabled, focusVisible: isFocusVisible });
2054
- return /* @__PURE__ */ React49.createElement(Box26, __spreadValues(__spreadValues({
1960
+ return /* @__PURE__ */ React49.createElement(Box26, {
2055
1961
  as: "td",
2056
1962
  ref,
2057
- css: styles.cell
2058
- }, mergeProps9(gridCellProps, focusProps)), stateProps), cell.rendered);
1963
+ css: styles.cell,
1964
+ ...mergeProps9(gridCellProps, focusProps),
1965
+ ...stateProps
1966
+ }, cell.rendered);
2059
1967
  };
2060
1968
 
2061
1969
  // src/Table/TableCheckboxCell.tsx
@@ -2066,26 +1974,22 @@ import { mergeProps as mergeProps10 } from "@react-aria/utils";
2066
1974
  import { Box as Box27, useStateProps as useStateProps12 } from "@marigold/system";
2067
1975
 
2068
1976
  // src/Table/utils.ts
2069
- var mapCheckboxProps = (_a) => {
2070
- var {
2071
- checkboxProps: _b
2072
- } = _a, _c = _b, {
1977
+ var mapCheckboxProps = ({
1978
+ checkboxProps: {
2073
1979
  isIndeterminate,
2074
1980
  isSelected,
2075
1981
  isDisabled,
2076
- defaultSelected
2077
- } = _c, rest = __objRest(_c, [
2078
- "isIndeterminate",
2079
- "isSelected",
2080
- "isDisabled",
2081
- "defaultSelected"
2082
- ]);
2083
- const checkboxProps = __spreadValues({
1982
+ defaultSelected,
1983
+ ...rest
1984
+ }
1985
+ }) => {
1986
+ const checkboxProps = {
2084
1987
  disabled: isDisabled,
2085
1988
  checked: isSelected,
2086
1989
  defaultChecked: defaultSelected,
2087
- indeterminate: isIndeterminate
2088
- }, rest);
1990
+ indeterminate: isIndeterminate,
1991
+ ...rest
1992
+ };
2089
1993
  return { checkboxProps };
2090
1994
  };
2091
1995
 
@@ -2100,7 +2004,7 @@ var TableCheckboxCell = ({ cell }) => {
2100
2004
  const { checkboxProps } = mapCheckboxProps(useTableSelectionCheckbox({ key: cell.parentKey }, state));
2101
2005
  const { focusProps, isFocusVisible } = useFocusRing10();
2102
2006
  const stateProps = useStateProps12({ disabled, focusVisible: isFocusVisible });
2103
- return /* @__PURE__ */ React50.createElement(Box27, __spreadValues(__spreadValues({
2007
+ return /* @__PURE__ */ React50.createElement(Box27, {
2104
2008
  as: "td",
2105
2009
  ref,
2106
2010
  __baseCSS: {
@@ -2108,8 +2012,12 @@ var TableCheckboxCell = ({ cell }) => {
2108
2012
  verticalAlign: "middle",
2109
2013
  lineHeight: 1
2110
2014
  },
2111
- css: styles.cell
2112
- }, mergeProps10(gridCellProps, focusProps)), stateProps), /* @__PURE__ */ React50.createElement(Checkbox, __spreadValues({}, checkboxProps)));
2015
+ css: styles.cell,
2016
+ ...mergeProps10(gridCellProps, focusProps),
2017
+ ...stateProps
2018
+ }, /* @__PURE__ */ React50.createElement(Checkbox, {
2019
+ ...checkboxProps
2020
+ }));
2113
2021
  };
2114
2022
 
2115
2023
  // src/Table/TableColumnHeader.tsx
@@ -2145,12 +2053,14 @@ var TableColumnHeader = ({ column }) => {
2145
2053
  hover: isHovered,
2146
2054
  focusVisible: isFocusVisible
2147
2055
  });
2148
- return /* @__PURE__ */ React51.createElement(Box28, __spreadValues(__spreadValues({
2056
+ return /* @__PURE__ */ React51.createElement(Box28, {
2149
2057
  as: "th",
2150
2058
  colSpan: column.colspan,
2151
2059
  ref,
2152
- css: styles.header
2153
- }, mergeProps11(columnHeaderProps, hoverProps, focusProps)), stateProps), column.rendered, column.props.allowsSorting && /* @__PURE__ */ React51.createElement(SortIndicator, {
2060
+ css: styles.header,
2061
+ ...mergeProps11(columnHeaderProps, hoverProps, focusProps),
2062
+ ...stateProps
2063
+ }, column.rendered, column.props.allowsSorting && /* @__PURE__ */ React51.createElement(SortIndicator, {
2154
2064
  direction: (_a = state.sortDescriptor) == null ? void 0 : _a.direction,
2155
2065
  visible: ((_b = state.sortDescriptor) == null ? void 0 : _b.column) === column.key
2156
2066
  }));
@@ -2161,7 +2071,9 @@ import React52 from "react";
2161
2071
  import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
2162
2072
  var TableHeader = ({ children }) => {
2163
2073
  const { rowGroupProps } = useTableRowGroup2();
2164
- return /* @__PURE__ */ React52.createElement("thead", __spreadValues({}, rowGroupProps), children);
2074
+ return /* @__PURE__ */ React52.createElement("thead", {
2075
+ ...rowGroupProps
2076
+ }, children);
2165
2077
  };
2166
2078
 
2167
2079
  // src/Table/TableHeaderRow.tsx
@@ -2171,9 +2083,10 @@ var TableHeaderRow = ({ item, children }) => {
2171
2083
  const { state } = useTableContext();
2172
2084
  const ref = useRef15(null);
2173
2085
  const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
2174
- return /* @__PURE__ */ React53.createElement("tr", __spreadProps(__spreadValues({}, rowProps), {
2086
+ return /* @__PURE__ */ React53.createElement("tr", {
2087
+ ...rowProps,
2175
2088
  ref
2176
- }), children);
2089
+ }, children);
2177
2090
  };
2178
2091
 
2179
2092
  // src/Table/TableRow.tsx
@@ -2200,11 +2113,13 @@ var TableRow = ({ children, row }) => {
2200
2113
  focusVisible: isFocusVisible,
2201
2114
  active: isPressed
2202
2115
  });
2203
- return /* @__PURE__ */ React54.createElement(Box29, __spreadValues(__spreadValues({
2116
+ return /* @__PURE__ */ React54.createElement(Box29, {
2204
2117
  as: "tr",
2205
2118
  ref,
2206
- css: styles.row
2207
- }, mergeProps12(rowProps, focusProps, hoverProps)), stateProps), children);
2119
+ css: styles.row,
2120
+ ...mergeProps12(rowProps, focusProps, hoverProps),
2121
+ ...stateProps
2122
+ }, children);
2208
2123
  };
2209
2124
 
2210
2125
  // src/Table/TableSelectAllCell.tsx
@@ -2230,7 +2145,7 @@ var TableSelectAllCell = ({ column }) => {
2230
2145
  hover: isHovered,
2231
2146
  focusVisible: isFocusVisible
2232
2147
  });
2233
- return /* @__PURE__ */ React55.createElement(Box30, __spreadValues(__spreadValues({
2148
+ return /* @__PURE__ */ React55.createElement(Box30, {
2234
2149
  as: "th",
2235
2150
  ref,
2236
2151
  __baseCSS: {
@@ -2238,44 +2153,46 @@ var TableSelectAllCell = ({ column }) => {
2238
2153
  verticalAlign: "middle",
2239
2154
  lineHeight: 1
2240
2155
  },
2241
- css: styles.header
2242
- }, mergeProps13(columnHeaderProps, hoverProps, focusProps)), stateProps), /* @__PURE__ */ React55.createElement(Checkbox, __spreadValues({}, checkboxProps)));
2156
+ css: styles.header,
2157
+ ...mergeProps13(columnHeaderProps, hoverProps, focusProps),
2158
+ ...stateProps
2159
+ }, /* @__PURE__ */ React55.createElement(Checkbox, {
2160
+ ...checkboxProps
2161
+ }));
2243
2162
  };
2244
2163
 
2245
2164
  // src/Table/Table.tsx
2246
- var Table = (_a) => {
2247
- var _b = _a, {
2248
- variant,
2249
- size,
2250
- stretch
2251
- } = _b, props = __objRest(_b, [
2252
- "variant",
2253
- "size",
2254
- "stretch"
2255
- ]);
2165
+ var Table = ({
2166
+ variant,
2167
+ size,
2168
+ stretch,
2169
+ ...props
2170
+ }) => {
2256
2171
  const tableRef = useRef18(null);
2257
- const state = useTableState(__spreadProps(__spreadValues({}, props), {
2172
+ const state = useTableState({
2173
+ ...props,
2258
2174
  showSelectionCheckboxes: props.selectionMode === "multiple" && props.selectionBehavior !== "replace"
2259
- }));
2175
+ });
2260
2176
  const { gridProps } = useTable(props, state, tableRef);
2261
2177
  const styles = useComponentStyles27("Table", { variant, size }, { parts: ["table", "header", "row", "cell"] });
2262
2178
  const { collection } = state;
2263
2179
  return /* @__PURE__ */ React56.createElement(TableContext.Provider, {
2264
2180
  value: { state, styles }
2265
- }, /* @__PURE__ */ React56.createElement(Box31, __spreadValues({
2181
+ }, /* @__PURE__ */ React56.createElement(Box31, {
2266
2182
  as: "table",
2267
2183
  ref: tableRef,
2268
2184
  __baseCSS: {
2269
2185
  borderCollapse: "collapse",
2270
2186
  width: stretch ? "100%" : void 0
2271
2187
  },
2272
- css: styles.table
2273
- }, gridProps), /* @__PURE__ */ React56.createElement(TableHeader, null, collection.headerRows.map((headerRow) => /* @__PURE__ */ React56.createElement(TableHeaderRow, {
2188
+ css: styles.table,
2189
+ ...gridProps
2190
+ }, /* @__PURE__ */ React56.createElement(TableHeader, null, collection.headerRows.map((headerRow) => /* @__PURE__ */ React56.createElement(TableHeaderRow, {
2274
2191
  key: headerRow.key,
2275
2192
  item: headerRow
2276
2193
  }, [...headerRow.childNodes].map((column) => {
2277
- var _a2;
2278
- return ((_a2 = column.props) == null ? void 0 : _a2.isSelectionCell) ? /* @__PURE__ */ React56.createElement(TableSelectAllCell, {
2194
+ var _a;
2195
+ return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ React56.createElement(TableSelectAllCell, {
2279
2196
  key: column.key,
2280
2197
  column
2281
2198
  }) : /* @__PURE__ */ React56.createElement(TableColumnHeader, {
@@ -2286,8 +2203,8 @@ var Table = (_a) => {
2286
2203
  key: row.key,
2287
2204
  row
2288
2205
  }, [...row.childNodes].map((cell) => {
2289
- var _a2;
2290
- return ((_a2 = cell.props) == null ? void 0 : _a2.isSelectionCell) ? /* @__PURE__ */ React56.createElement(TableCheckboxCell, {
2206
+ var _a;
2207
+ return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ React56.createElement(TableCheckboxCell, {
2291
2208
  key: cell.key,
2292
2209
  cell
2293
2210
  }) : /* @__PURE__ */ React56.createElement(TableCell, {
@@ -2308,35 +2225,26 @@ import {
2308
2225
  useComponentStyles as useComponentStyles28
2309
2226
  } from "@marigold/system";
2310
2227
  import { Box as Box32 } from "@marigold/system";
2311
- var Text = (_a) => {
2312
- var _b = _a, {
2313
- variant,
2314
- size,
2315
- align,
2316
- color,
2317
- fontSize,
2318
- cursor,
2319
- outline,
2320
- children
2321
- } = _b, props = __objRest(_b, [
2322
- "variant",
2323
- "size",
2324
- "align",
2325
- "color",
2326
- "fontSize",
2327
- "cursor",
2328
- "outline",
2329
- "children"
2330
- ]);
2228
+ var Text = ({
2229
+ variant,
2230
+ size,
2231
+ align,
2232
+ color,
2233
+ fontSize,
2234
+ cursor,
2235
+ outline,
2236
+ children,
2237
+ ...props
2238
+ }) => {
2331
2239
  const styles = useComponentStyles28("Text", {
2332
2240
  variant,
2333
2241
  size
2334
2242
  });
2335
- return /* @__PURE__ */ React57.createElement(Box32, __spreadProps(__spreadValues({
2336
- as: "p"
2337
- }, props), {
2338
- css: __spreadValues({ color, cursor, outline, fontSize, textAlign: align }, styles)
2339
- }), children);
2243
+ return /* @__PURE__ */ React57.createElement(Box32, {
2244
+ as: "p",
2245
+ ...props,
2246
+ css: { color, cursor, outline, fontSize, textAlign: align, ...styles }
2247
+ }, children);
2340
2248
  };
2341
2249
 
2342
2250
  // src/TextArea/TextArea.tsx
@@ -2350,35 +2258,27 @@ import {
2350
2258
  useComponentStyles as useComponentStyles29,
2351
2259
  useStateProps as useStateProps16
2352
2260
  } from "@marigold/system";
2353
- var TextArea = forwardRef12((_a, ref) => {
2354
- var _b = _a, {
2355
- variant,
2356
- size,
2357
- width,
2358
- disabled,
2359
- required,
2360
- readOnly,
2361
- error,
2362
- rows
2363
- } = _b, props = __objRest(_b, [
2364
- "variant",
2365
- "size",
2366
- "width",
2367
- "disabled",
2368
- "required",
2369
- "readOnly",
2370
- "error",
2371
- "rows"
2372
- ]);
2261
+ var TextArea = forwardRef12(({
2262
+ variant,
2263
+ size,
2264
+ width,
2265
+ disabled,
2266
+ required,
2267
+ readOnly,
2268
+ error,
2269
+ rows,
2270
+ ...props
2271
+ }, ref) => {
2373
2272
  const { label, description, errorMessage } = props;
2374
2273
  const textAreaRef = useObjectRef9(ref);
2375
- const { labelProps, inputProps, descriptionProps, errorMessageProps } = useTextField(__spreadValues({
2274
+ const { labelProps, inputProps, descriptionProps, errorMessageProps } = useTextField({
2376
2275
  inputElementType: "textarea",
2377
2276
  isDisabled: disabled,
2378
2277
  isRequired: required,
2379
2278
  isReadOnly: readOnly,
2380
- validationState: error ? "invalid" : "valid"
2381
- }, props), textAreaRef);
2279
+ validationState: error ? "invalid" : "valid",
2280
+ ...props
2281
+ }, textAreaRef);
2382
2282
  const { hoverProps, isHovered } = useHover8({});
2383
2283
  const { focusProps, isFocusVisible } = useFocusRing14();
2384
2284
  const stateProps = useStateProps16({
@@ -2402,12 +2302,16 @@ var TextArea = forwardRef12((_a, ref) => {
2402
2302
  variant,
2403
2303
  size,
2404
2304
  width
2405
- }, /* @__PURE__ */ React58.createElement(Box33, __spreadValues(__spreadValues(__spreadValues(__spreadValues({
2305
+ }, /* @__PURE__ */ React58.createElement(Box33, {
2406
2306
  as: "textarea",
2407
2307
  css: styles,
2408
2308
  ref: textAreaRef,
2409
- rows
2410
- }, inputProps), focusProps), hoverProps), stateProps)));
2309
+ rows,
2310
+ ...inputProps,
2311
+ ...focusProps,
2312
+ ...hoverProps,
2313
+ ...stateProps
2314
+ }));
2411
2315
  });
2412
2316
 
2413
2317
  // src/TextField/TextField.tsx
@@ -2417,16 +2321,16 @@ import { useFocusRing as useFocusRing15 } from "@react-aria/focus";
2417
2321
  import { useTextField as useTextField2 } from "@react-aria/textfield";
2418
2322
  import { useObjectRef as useObjectRef10 } from "@react-aria/utils";
2419
2323
  import { useStateProps as useStateProps17 } from "@marigold/system";
2420
- var TextField = forwardRef13((_a, ref) => {
2421
- var _b = _a, { variant, size, width, disabled, required, readOnly, error } = _b, props = __objRest(_b, ["variant", "size", "width", "disabled", "required", "readOnly", "error"]);
2324
+ var TextField = forwardRef13(({ variant, size, width, disabled, required, readOnly, error, ...props }, ref) => {
2422
2325
  const { label, description, errorMessage, autoFocus } = props;
2423
2326
  const inputRef = useObjectRef10(ref);
2424
- const { labelProps, inputProps, descriptionProps, errorMessageProps } = useTextField2(__spreadValues({
2327
+ const { labelProps, inputProps, descriptionProps, errorMessageProps } = useTextField2({
2425
2328
  isDisabled: disabled,
2426
2329
  isRequired: required,
2427
2330
  isReadOnly: readOnly,
2428
- validationState: error ? "invalid" : "valid"
2429
- }, props), inputRef);
2331
+ validationState: error ? "invalid" : "valid",
2332
+ ...props
2333
+ }, inputRef);
2430
2334
  const { hoverProps, isHovered } = useHover9({});
2431
2335
  const { focusProps, isFocusVisible } = useFocusRing15({
2432
2336
  isTextInput: true,
@@ -2452,26 +2356,28 @@ var TextField = forwardRef13((_a, ref) => {
2452
2356
  variant,
2453
2357
  size,
2454
2358
  width
2455
- }, /* @__PURE__ */ React59.createElement(Input, __spreadValues(__spreadValues(__spreadValues(__spreadValues({
2359
+ }, /* @__PURE__ */ React59.createElement(Input, {
2456
2360
  ref: inputRef,
2457
2361
  variant,
2458
- size
2459
- }, inputProps), focusProps), hoverProps), stateProps)));
2362
+ size,
2363
+ ...inputProps,
2364
+ ...focusProps,
2365
+ ...hoverProps,
2366
+ ...stateProps
2367
+ }));
2460
2368
  });
2461
2369
 
2462
2370
  // src/Tiles/Tiles.tsx
2463
2371
  import React60 from "react";
2464
- var Tiles = React60.forwardRef((_a, ref) => {
2465
- var _b = _a, { space = "none", itemMinWidth = "250px", children } = _b, props = __objRest(_b, ["space", "itemMinWidth", "children"]);
2466
- return /* @__PURE__ */ React60.createElement(Box, __spreadValues({
2467
- ref,
2468
- display: "grid",
2469
- __baseCSS: {
2470
- gap: space,
2471
- gridTemplateColumns: `repeat(auto-fit, minmax(min(${itemMinWidth}, 100%), 1fr))`
2472
- }
2473
- }, props), children);
2474
- });
2372
+ var Tiles = React60.forwardRef(({ space = "none", itemMinWidth = "250px", children, ...props }, ref) => /* @__PURE__ */ React60.createElement(Box, {
2373
+ ref,
2374
+ display: "grid",
2375
+ __baseCSS: {
2376
+ gap: space,
2377
+ gridTemplateColumns: `repeat(auto-fit, minmax(min(${itemMinWidth}, 100%), 1fr))`
2378
+ },
2379
+ ...props
2380
+ }, children));
2475
2381
 
2476
2382
  // src/Tooltip/Tooltip.tsx
2477
2383
  import React62 from "react";
@@ -2492,27 +2398,22 @@ import { FocusableProvider } from "@react-aria/focus";
2492
2398
  import { useOverlayPosition as useOverlayPosition3 } from "@react-aria/overlays";
2493
2399
  import { useTooltipTrigger } from "@react-aria/tooltip";
2494
2400
  import { useTooltipTriggerState } from "@react-stately/tooltip";
2495
- var TooltipTrigger = (_a) => {
2496
- var _b = _a, {
2497
- disabled,
2498
- open,
2499
- delay = 1e3,
2500
- placement = "top",
2501
- children
2502
- } = _b, rest = __objRest(_b, [
2503
- "disabled",
2504
- "open",
2505
- "delay",
2506
- "placement",
2507
- "children"
2508
- ]);
2401
+ var TooltipTrigger = ({
2402
+ disabled,
2403
+ open,
2404
+ delay = 1e3,
2405
+ placement = "top",
2406
+ children,
2407
+ ...rest
2408
+ }) => {
2509
2409
  const [tooltipTrigger, tooltip] = React61.Children.toArray(children);
2510
- const props = __spreadProps(__spreadValues({}, rest), {
2410
+ const props = {
2411
+ ...rest,
2511
2412
  isDisabled: disabled,
2512
2413
  isOpen: open,
2513
2414
  delay,
2514
2415
  placement
2515
- });
2416
+ };
2516
2417
  const tooltipTriggerRef = useRef19(null);
2517
2418
  const overlayRef = useRef19(null);
2518
2419
  const state = useTooltipTriggerState(props);
@@ -2529,15 +2430,18 @@ var TooltipTrigger = (_a) => {
2529
2430
  isOpen: state.isOpen,
2530
2431
  overlayRef
2531
2432
  });
2532
- return /* @__PURE__ */ React61.createElement(FocusableProvider, __spreadValues({
2533
- ref: tooltipTriggerRef
2534
- }, triggerProps), tooltipTrigger, /* @__PURE__ */ React61.createElement(TooltipContext.Provider, {
2535
- value: __spreadValues(__spreadValues({
2433
+ return /* @__PURE__ */ React61.createElement(FocusableProvider, {
2434
+ ref: tooltipTriggerRef,
2435
+ ...triggerProps
2436
+ }, tooltipTrigger, /* @__PURE__ */ React61.createElement(TooltipContext.Provider, {
2437
+ value: {
2536
2438
  state,
2537
2439
  overlayRef,
2538
2440
  arrowProps,
2539
- placement: overlayPlacement
2540
- }, tooltipProps), positionProps)
2441
+ placement: overlayPlacement,
2442
+ ...tooltipProps,
2443
+ ...positionProps
2444
+ }
2541
2445
  }, /* @__PURE__ */ React61.createElement(Overlay, {
2542
2446
  open: state.isOpen
2543
2447
  }, tooltip)));
@@ -2545,14 +2449,17 @@ var TooltipTrigger = (_a) => {
2545
2449
 
2546
2450
  // src/Tooltip/Tooltip.tsx
2547
2451
  var Tooltip = ({ children, variant, size }) => {
2548
- const _a = useTooltipContext(), { arrowProps, state, overlayRef, placement } = _a, rest = __objRest(_a, ["arrowProps", "state", "overlayRef", "placement"]);
2452
+ const { arrowProps, state, overlayRef, placement, ...rest } = useTooltipContext();
2549
2453
  const { tooltipProps } = useTooltip({}, state);
2550
2454
  const styles = useComponentStyles30("Tooltip", { variant, size }, { parts: ["container", "arrow"] });
2551
- return /* @__PURE__ */ React62.createElement(Box34, __spreadProps(__spreadValues(__spreadValues({}, tooltipProps), rest), {
2455
+ return /* @__PURE__ */ React62.createElement(Box34, {
2456
+ ...tooltipProps,
2457
+ ...rest,
2552
2458
  ref: overlayRef,
2553
2459
  css: styles.container,
2554
2460
  "data-placement": placement
2555
- }), /* @__PURE__ */ React62.createElement("div", null, children), /* @__PURE__ */ React62.createElement(Box34, __spreadProps(__spreadValues({}, arrowProps), {
2461
+ }, /* @__PURE__ */ React62.createElement("div", null, children), /* @__PURE__ */ React62.createElement(Box34, {
2462
+ ...arrowProps,
2556
2463
  __baseCSS: {
2557
2464
  position: "absolute",
2558
2465
  height: 0,
@@ -2563,7 +2470,7 @@ var Tooltip = ({ children, variant, size }) => {
2563
2470
  borderBottomColor: "transparent"
2564
2471
  },
2565
2472
  css: styles.arrow
2566
- })));
2473
+ }));
2567
2474
  };
2568
2475
  Tooltip.Trigger = TooltipTrigger;
2569
2476
  export {