@marigold/components 2.1.3 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +43 -24
- package/dist/index.js +141 -125
- package/dist/index.mjs +145 -126
- package/package.json +45 -44
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// src/hooks.ts
|
|
2
2
|
import { useAsyncList, useListData } from "@react-stately/data";
|
|
3
3
|
|
|
4
|
+
// src/theme.ts
|
|
5
|
+
import merge from "deepmerge";
|
|
6
|
+
var extendTheme = (baseTheme, extendTheme2) => merge(baseTheme, extendTheme2);
|
|
7
|
+
|
|
4
8
|
// src/Aside/Aside.tsx
|
|
5
9
|
import React from "react";
|
|
6
10
|
|
|
@@ -80,34 +84,51 @@ var useAlignment = (direction) => {
|
|
|
80
84
|
return "flex-start";
|
|
81
85
|
};
|
|
82
86
|
var Breakout = ({
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
alignX,
|
|
88
|
+
alignY,
|
|
89
|
+
height,
|
|
85
90
|
children,
|
|
86
91
|
...props
|
|
87
92
|
}) => {
|
|
88
|
-
const alignItems = useAlignment(
|
|
89
|
-
const justifyContent = useAlignment(
|
|
93
|
+
const alignItems = useAlignment(alignY);
|
|
94
|
+
const justifyContent = useAlignment(alignX);
|
|
90
95
|
return /* @__PURE__ */ React4.createElement(Box, {
|
|
91
96
|
alignItems,
|
|
92
97
|
justifyContent,
|
|
93
98
|
width: "100%",
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
99
|
+
height,
|
|
100
|
+
display: alignY || alignX ? "flex" : "block",
|
|
101
|
+
__baseCSS: {
|
|
102
|
+
gridColumn: "1 / -1 !important"
|
|
97
103
|
},
|
|
98
104
|
...props
|
|
99
105
|
}, children);
|
|
100
106
|
};
|
|
101
107
|
|
|
108
|
+
// src/Body/Body.tsx
|
|
109
|
+
import React5 from "react";
|
|
110
|
+
import {
|
|
111
|
+
Box as Box2,
|
|
112
|
+
useComponentStyles as useComponentStyles2
|
|
113
|
+
} from "@marigold/system";
|
|
114
|
+
var Body = ({ children, variant, size, ...props }) => {
|
|
115
|
+
const styles = useComponentStyles2("Body", { variant, size });
|
|
116
|
+
return /* @__PURE__ */ React5.createElement(Box2, {
|
|
117
|
+
as: "section",
|
|
118
|
+
...props,
|
|
119
|
+
css: styles
|
|
120
|
+
}, children);
|
|
121
|
+
};
|
|
122
|
+
|
|
102
123
|
// src/Button/Button.tsx
|
|
103
|
-
import
|
|
124
|
+
import React6, { forwardRef } from "react";
|
|
104
125
|
import { useButton } from "@react-aria/button";
|
|
105
126
|
import { useFocusRing } from "@react-aria/focus";
|
|
106
127
|
import { useHover } from "@react-aria/interactions";
|
|
107
128
|
import { mergeProps, useObjectRef } from "@react-aria/utils";
|
|
108
129
|
import {
|
|
109
|
-
Box as
|
|
110
|
-
useComponentStyles as
|
|
130
|
+
Box as Box3,
|
|
131
|
+
useComponentStyles as useComponentStyles3,
|
|
111
132
|
useStateProps
|
|
112
133
|
} from "@marigold/system";
|
|
113
134
|
var Button = forwardRef(
|
|
@@ -145,13 +166,13 @@ var Button = forwardRef(
|
|
|
145
166
|
},
|
|
146
167
|
buttonRef
|
|
147
168
|
);
|
|
148
|
-
const styles =
|
|
169
|
+
const styles = useComponentStyles3("Button", { variant, size });
|
|
149
170
|
const stateProps = useStateProps({
|
|
150
171
|
active: isPressed,
|
|
151
172
|
focusVisible: isFocusVisible,
|
|
152
173
|
hover: isHovered
|
|
153
174
|
});
|
|
154
|
-
return /* @__PURE__ */
|
|
175
|
+
return /* @__PURE__ */ React6.createElement(Box3, {
|
|
155
176
|
...mergeProps(buttonProps, focusProps, hoverProps, props),
|
|
156
177
|
...stateProps,
|
|
157
178
|
as,
|
|
@@ -173,27 +194,39 @@ var Button = forwardRef(
|
|
|
173
194
|
);
|
|
174
195
|
|
|
175
196
|
// src/Card/Card.tsx
|
|
176
|
-
import
|
|
197
|
+
import React7 from "react";
|
|
177
198
|
import {
|
|
178
|
-
Box as
|
|
179
|
-
useComponentStyles as
|
|
199
|
+
Box as Box4,
|
|
200
|
+
useComponentStyles as useComponentStyles4
|
|
180
201
|
} from "@marigold/system";
|
|
181
|
-
var Card = ({
|
|
182
|
-
|
|
183
|
-
|
|
202
|
+
var Card = ({
|
|
203
|
+
children,
|
|
204
|
+
variant,
|
|
205
|
+
size,
|
|
206
|
+
p,
|
|
207
|
+
px,
|
|
208
|
+
py,
|
|
209
|
+
pt,
|
|
210
|
+
pb,
|
|
211
|
+
pl,
|
|
212
|
+
pr,
|
|
213
|
+
...props
|
|
214
|
+
}) => {
|
|
215
|
+
const styles = useComponentStyles4("Card", { variant, size });
|
|
216
|
+
return /* @__PURE__ */ React7.createElement(Box4, {
|
|
184
217
|
...props,
|
|
185
|
-
css: styles
|
|
218
|
+
css: [styles, { p, px, py, pt, pb, pl, pr }]
|
|
186
219
|
}, children);
|
|
187
220
|
};
|
|
188
221
|
|
|
189
222
|
// src/Center/Center.tsx
|
|
190
|
-
import
|
|
223
|
+
import React8 from "react";
|
|
191
224
|
var Center = ({
|
|
192
225
|
maxWidth,
|
|
193
226
|
space = "none",
|
|
194
227
|
children,
|
|
195
228
|
...props
|
|
196
|
-
}) => /* @__PURE__ */
|
|
229
|
+
}) => /* @__PURE__ */ React8.createElement(Box, {
|
|
197
230
|
css: {
|
|
198
231
|
boxSizing: "content-box",
|
|
199
232
|
display: "flex",
|
|
@@ -208,33 +241,33 @@ var Center = ({
|
|
|
208
241
|
}, children);
|
|
209
242
|
|
|
210
243
|
// src/Checkbox/Checkbox.tsx
|
|
211
|
-
import
|
|
244
|
+
import React11, { forwardRef as forwardRef2 } from "react";
|
|
212
245
|
import { useCheckbox, useCheckboxGroupItem } from "@react-aria/checkbox";
|
|
213
246
|
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
214
247
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
215
248
|
import { useObjectRef as useObjectRef2 } from "@react-aria/utils";
|
|
216
249
|
import { useToggleState } from "@react-stately/toggle";
|
|
217
250
|
import {
|
|
218
|
-
Box as
|
|
219
|
-
useComponentStyles as
|
|
251
|
+
Box as Box7,
|
|
252
|
+
useComponentStyles as useComponentStyles7,
|
|
220
253
|
useStateProps as useStateProps2
|
|
221
254
|
} from "@marigold/system";
|
|
222
255
|
|
|
223
256
|
// src/Checkbox/CheckboxGroup.tsx
|
|
224
|
-
import
|
|
257
|
+
import React10, { createContext, useContext } from "react";
|
|
225
258
|
import { useCheckboxGroup } from "@react-aria/checkbox";
|
|
226
259
|
import {
|
|
227
260
|
useCheckboxGroupState
|
|
228
261
|
} from "@react-stately/checkbox";
|
|
229
262
|
import {
|
|
230
|
-
Box as
|
|
231
|
-
useComponentStyles as
|
|
263
|
+
Box as Box6,
|
|
264
|
+
useComponentStyles as useComponentStyles6
|
|
232
265
|
} from "@marigold/system";
|
|
233
266
|
|
|
234
267
|
// src/Label/Label.tsx
|
|
235
|
-
import
|
|
268
|
+
import React9 from "react";
|
|
236
269
|
import { Required } from "@marigold/icons";
|
|
237
|
-
import { Box as
|
|
270
|
+
import { Box as Box5, useComponentStyles as useComponentStyles5 } from "@marigold/system";
|
|
238
271
|
var Label = ({
|
|
239
272
|
as = "label",
|
|
240
273
|
required,
|
|
@@ -243,13 +276,13 @@ var Label = ({
|
|
|
243
276
|
size,
|
|
244
277
|
...props
|
|
245
278
|
}) => {
|
|
246
|
-
const styles =
|
|
247
|
-
return /* @__PURE__ */
|
|
279
|
+
const styles = useComponentStyles5("Label", { size, variant });
|
|
280
|
+
return /* @__PURE__ */ React9.createElement(Box5, {
|
|
248
281
|
...props,
|
|
249
282
|
as,
|
|
250
283
|
__baseCSS: { display: "flex", alignItems: "center", gap: 4 },
|
|
251
284
|
css: styles
|
|
252
|
-
}, children, required && /* @__PURE__ */
|
|
285
|
+
}, children, required && /* @__PURE__ */ React9.createElement(Required, {
|
|
253
286
|
role: "presentation",
|
|
254
287
|
size: 16,
|
|
255
288
|
fill: "error"
|
|
@@ -280,19 +313,19 @@ var CheckboxGroup = ({
|
|
|
280
313
|
};
|
|
281
314
|
const state = useCheckboxGroupState(props);
|
|
282
315
|
const { groupProps, labelProps } = useCheckboxGroup(props, state);
|
|
283
|
-
const styles =
|
|
316
|
+
const styles = useComponentStyles6(
|
|
284
317
|
"CheckboxGroup",
|
|
285
318
|
{ variant, size },
|
|
286
319
|
{ parts: ["container", "group"] }
|
|
287
320
|
);
|
|
288
|
-
return /* @__PURE__ */
|
|
321
|
+
return /* @__PURE__ */ React10.createElement(Box6, {
|
|
289
322
|
...groupProps,
|
|
290
323
|
css: styles.container
|
|
291
|
-
}, props.label && /* @__PURE__ */
|
|
324
|
+
}, props.label && /* @__PURE__ */ React10.createElement(Label, {
|
|
292
325
|
as: "span",
|
|
293
326
|
required,
|
|
294
327
|
...labelProps
|
|
295
|
-
}, props.label), /* @__PURE__ */
|
|
328
|
+
}, props.label), /* @__PURE__ */ React10.createElement(Box6, {
|
|
296
329
|
role: "presentation",
|
|
297
330
|
__baseCSS: {
|
|
298
331
|
display: "flex",
|
|
@@ -300,29 +333,29 @@ var CheckboxGroup = ({
|
|
|
300
333
|
alignItems: "start"
|
|
301
334
|
},
|
|
302
335
|
css: styles.group
|
|
303
|
-
}, /* @__PURE__ */
|
|
336
|
+
}, /* @__PURE__ */ React10.createElement(CheckboxGroupContext.Provider, {
|
|
304
337
|
value: { variant, size, error, ...state }
|
|
305
338
|
}, children)));
|
|
306
339
|
};
|
|
307
340
|
|
|
308
341
|
// src/Checkbox/Checkbox.tsx
|
|
309
|
-
var CheckMark = () => /* @__PURE__ */
|
|
342
|
+
var CheckMark = () => /* @__PURE__ */ React11.createElement("svg", {
|
|
310
343
|
viewBox: "0 0 12 10"
|
|
311
|
-
}, /* @__PURE__ */
|
|
344
|
+
}, /* @__PURE__ */ React11.createElement("path", {
|
|
312
345
|
fill: "currentColor",
|
|
313
346
|
stroke: "none",
|
|
314
347
|
d: "M11.915 1.548 10.367 0 4.045 6.315 1.557 3.827 0 5.373l4.045 4.046 7.87-7.871Z"
|
|
315
348
|
}));
|
|
316
|
-
var IndeterminateMark = () => /* @__PURE__ */
|
|
349
|
+
var IndeterminateMark = () => /* @__PURE__ */ React11.createElement("svg", {
|
|
317
350
|
width: "12",
|
|
318
351
|
height: "3",
|
|
319
352
|
viewBox: "0 0 12 3"
|
|
320
|
-
}, /* @__PURE__ */
|
|
353
|
+
}, /* @__PURE__ */ React11.createElement("path", {
|
|
321
354
|
fill: "currentColor",
|
|
322
355
|
stroke: "none",
|
|
323
356
|
d: "M11.5 2.04018H0.5V0.46875H11.5V2.04018Z"
|
|
324
357
|
}));
|
|
325
|
-
var Icon = ({ css, checked, indeterminate, ...props }) => /* @__PURE__ */
|
|
358
|
+
var Icon = ({ css, checked, indeterminate, ...props }) => /* @__PURE__ */ React11.createElement(Box7, {
|
|
326
359
|
"aria-hidden": "true",
|
|
327
360
|
__baseCSS: {
|
|
328
361
|
width: 16,
|
|
@@ -337,7 +370,7 @@ var Icon = ({ css, checked, indeterminate, ...props }) => /* @__PURE__ */ React1
|
|
|
337
370
|
},
|
|
338
371
|
css,
|
|
339
372
|
...props
|
|
340
|
-
}, indeterminate ? /* @__PURE__ */
|
|
373
|
+
}, indeterminate ? /* @__PURE__ */ React11.createElement(IndeterminateMark, null) : checked ? /* @__PURE__ */ React11.createElement(CheckMark, null) : null);
|
|
341
374
|
var Checkbox = forwardRef2(
|
|
342
375
|
({
|
|
343
376
|
size,
|
|
@@ -383,7 +416,7 @@ var Checkbox = forwardRef2(
|
|
|
383
416
|
}),
|
|
384
417
|
inputRef
|
|
385
418
|
);
|
|
386
|
-
const styles =
|
|
419
|
+
const styles = useComponentStyles7(
|
|
387
420
|
"Checkbox",
|
|
388
421
|
{
|
|
389
422
|
variant: (groupState == null ? void 0 : groupState.variant) || variant,
|
|
@@ -402,7 +435,7 @@ var Checkbox = forwardRef2(
|
|
|
402
435
|
readOnly,
|
|
403
436
|
indeterminate
|
|
404
437
|
});
|
|
405
|
-
return /* @__PURE__ */
|
|
438
|
+
return /* @__PURE__ */ React11.createElement(Box7, {
|
|
406
439
|
as: "label",
|
|
407
440
|
__baseCSS: {
|
|
408
441
|
display: "flex",
|
|
@@ -413,7 +446,7 @@ var Checkbox = forwardRef2(
|
|
|
413
446
|
css: styles.container,
|
|
414
447
|
...hoverProps,
|
|
415
448
|
...stateProps
|
|
416
|
-
}, /* @__PURE__ */
|
|
449
|
+
}, /* @__PURE__ */ React11.createElement(Box7, {
|
|
417
450
|
as: "input",
|
|
418
451
|
ref: inputRef,
|
|
419
452
|
css: {
|
|
@@ -428,12 +461,12 @@ var Checkbox = forwardRef2(
|
|
|
428
461
|
},
|
|
429
462
|
...inputProps,
|
|
430
463
|
...focusProps
|
|
431
|
-
}), /* @__PURE__ */
|
|
464
|
+
}), /* @__PURE__ */ React11.createElement(Icon, {
|
|
432
465
|
checked: inputProps.checked,
|
|
433
466
|
indeterminate,
|
|
434
467
|
css: styles.checkbox,
|
|
435
468
|
...stateProps
|
|
436
|
-
}), props.children && /* @__PURE__ */
|
|
469
|
+
}), props.children && /* @__PURE__ */ React11.createElement(Box7, {
|
|
437
470
|
css: styles.label,
|
|
438
471
|
...stateProps
|
|
439
472
|
}, props.children));
|
|
@@ -441,11 +474,16 @@ var Checkbox = forwardRef2(
|
|
|
441
474
|
);
|
|
442
475
|
|
|
443
476
|
// src/Columns/Columns.tsx
|
|
444
|
-
import
|
|
477
|
+
import React12, {
|
|
478
|
+
Children,
|
|
479
|
+
cloneElement,
|
|
480
|
+
isValidElement
|
|
481
|
+
} from "react";
|
|
445
482
|
var Columns = ({
|
|
446
483
|
space = "none",
|
|
447
484
|
columns,
|
|
448
|
-
collapseAt = "
|
|
485
|
+
collapseAt = "0em",
|
|
486
|
+
stretch,
|
|
449
487
|
children,
|
|
450
488
|
...props
|
|
451
489
|
}) => {
|
|
@@ -456,89 +494,70 @@ var Columns = ({
|
|
|
456
494
|
)}`
|
|
457
495
|
);
|
|
458
496
|
}
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
497
|
+
return /* @__PURE__ */ React12.createElement(Box, {
|
|
498
|
+
css: {
|
|
499
|
+
display: "flex",
|
|
500
|
+
flexWrap: "wrap",
|
|
501
|
+
alignItems: "stretch",
|
|
502
|
+
height: stretch ? "100%" : void 0,
|
|
503
|
+
gap: space,
|
|
504
|
+
"> *": {
|
|
505
|
+
flexBasis: `calc(( ${collapseAt} - 100%) * 999)`
|
|
463
506
|
}
|
|
464
|
-
}
|
|
465
|
-
});
|
|
466
|
-
return /* @__PURE__ */ React11.createElement(Box, {
|
|
467
|
-
display: "flex",
|
|
468
|
-
css: Object.assign(
|
|
469
|
-
{
|
|
470
|
-
flexWrap: "wrap",
|
|
471
|
-
gap: space,
|
|
472
|
-
"> *": {
|
|
473
|
-
flexBasis: `calc(( ${collapseAt} - 100%) * 999)`
|
|
474
|
-
}
|
|
475
|
-
},
|
|
476
|
-
...getColumnWidths
|
|
477
|
-
),
|
|
507
|
+
},
|
|
478
508
|
...props
|
|
479
|
-
}, children)
|
|
509
|
+
}, Children.map(children, (child, idx) => /* @__PURE__ */ React12.createElement(Box, {
|
|
510
|
+
css: {
|
|
511
|
+
flexGrow: columns[idx]
|
|
512
|
+
}
|
|
513
|
+
}, isValidElement(child) ? cloneElement(child) : null)));
|
|
480
514
|
};
|
|
481
515
|
|
|
482
516
|
// src/Container/Container.tsx
|
|
483
|
-
import
|
|
517
|
+
import React13 from "react";
|
|
484
518
|
import { size as tokenSize } from "@marigold/tokens";
|
|
485
|
-
var
|
|
486
|
-
left: "
|
|
519
|
+
var ALIGN_ITEMS = {
|
|
520
|
+
left: "start",
|
|
487
521
|
center: "center",
|
|
488
|
-
right: "
|
|
522
|
+
right: "end",
|
|
523
|
+
none: "initial"
|
|
524
|
+
};
|
|
525
|
+
var ALIGN = {
|
|
526
|
+
left: (maxWidth) => ({
|
|
527
|
+
gridTemplateColumns: `minmax(0, ${maxWidth}) 1fr 1fr`,
|
|
528
|
+
gridColumn: 1
|
|
529
|
+
}),
|
|
530
|
+
center: (maxWidth) => ({
|
|
531
|
+
gridTemplateColumns: `1fr minmax(0, ${maxWidth}) 1fr`,
|
|
532
|
+
gridColumn: 2
|
|
533
|
+
}),
|
|
534
|
+
right: (maxWidth) => ({
|
|
535
|
+
gridTemplateColumns: `1fr 1fr minmax(0, ${maxWidth})`,
|
|
536
|
+
gridColumn: 3
|
|
537
|
+
})
|
|
489
538
|
};
|
|
490
539
|
var Container = ({
|
|
491
540
|
contentType = "content",
|
|
492
541
|
size = "medium",
|
|
493
542
|
align = "left",
|
|
494
|
-
|
|
543
|
+
alignItems = "none",
|
|
495
544
|
children,
|
|
496
545
|
...props
|
|
497
546
|
}) => {
|
|
498
547
|
const maxWidth = tokenSize[contentType][size];
|
|
499
|
-
|
|
500
|
-
let gridColumn = 1;
|
|
501
|
-
if (alignContainer === "center") {
|
|
502
|
-
gridTemplateColumns = `1fr ${maxWidth} 1fr`;
|
|
503
|
-
gridColumn = 2;
|
|
504
|
-
}
|
|
505
|
-
if (alignContainer === "right") {
|
|
506
|
-
gridTemplateColumns = `1fr 1fr ${maxWidth}`;
|
|
507
|
-
gridColumn = 3;
|
|
508
|
-
}
|
|
509
|
-
return /* @__PURE__ */ React12.createElement(Box, {
|
|
548
|
+
return /* @__PURE__ */ React13.createElement(Box, {
|
|
510
549
|
display: "grid",
|
|
511
550
|
css: {
|
|
512
|
-
gridTemplateColumns,
|
|
513
|
-
placeItems:
|
|
551
|
+
gridTemplateColumns: ALIGN[align](maxWidth).gridTemplateColumns,
|
|
552
|
+
placeItems: ALIGN_ITEMS[alignItems],
|
|
514
553
|
"> *": {
|
|
515
|
-
gridColumn
|
|
554
|
+
gridColumn: ALIGN[align](maxWidth).gridColumn
|
|
516
555
|
}
|
|
517
556
|
},
|
|
518
557
|
...props
|
|
519
558
|
}, children);
|
|
520
559
|
};
|
|
521
560
|
|
|
522
|
-
// src/Content/Content.tsx
|
|
523
|
-
import React13 from "react";
|
|
524
|
-
import {
|
|
525
|
-
Box as Box7,
|
|
526
|
-
useComponentStyles as useComponentStyles7
|
|
527
|
-
} from "@marigold/system";
|
|
528
|
-
var Content = ({
|
|
529
|
-
children,
|
|
530
|
-
variant,
|
|
531
|
-
size,
|
|
532
|
-
...props
|
|
533
|
-
}) => {
|
|
534
|
-
const styles = useComponentStyles7("Content", { variant, size });
|
|
535
|
-
return /* @__PURE__ */ React13.createElement(Box7, {
|
|
536
|
-
as: "section",
|
|
537
|
-
...props,
|
|
538
|
-
css: styles
|
|
539
|
-
}, children);
|
|
540
|
-
};
|
|
541
|
-
|
|
542
561
|
// src/Dialog/Dialog.tsx
|
|
543
562
|
import React21, { useRef as useRef3 } from "react";
|
|
544
563
|
import { useButton as useButton2 } from "@react-aria/button";
|
|
@@ -1630,7 +1649,7 @@ import React44, {
|
|
|
1630
1649
|
} from "react";
|
|
1631
1650
|
import { useButton as useButton4 } from "@react-aria/button";
|
|
1632
1651
|
import { FocusScope as FocusScope3, useFocusRing as useFocusRing6 } from "@react-aria/focus";
|
|
1633
|
-
import {
|
|
1652
|
+
import { useLocalizedStringFormatter } from "@react-aria/i18n";
|
|
1634
1653
|
import { DismissButton as DismissButton2, useOverlayPosition as useOverlayPosition2 } from "@react-aria/overlays";
|
|
1635
1654
|
import { HiddenSelect, useSelect } from "@react-aria/select";
|
|
1636
1655
|
import { useSelectState } from "@react-stately/select";
|
|
@@ -1775,14 +1794,14 @@ var Chevron = ({ css }) => /* @__PURE__ */ React44.createElement(Box27, {
|
|
|
1775
1794
|
}));
|
|
1776
1795
|
var Select = forwardRef10(
|
|
1777
1796
|
({ variant, size, width, open, disabled, required, error, ...rest }, ref) => {
|
|
1778
|
-
const formatMessage =
|
|
1797
|
+
const formatMessage = useLocalizedStringFormatter(messages);
|
|
1779
1798
|
const buttonRef = useObjectRef8(ref);
|
|
1780
1799
|
const props = {
|
|
1781
1800
|
isOpen: open,
|
|
1782
1801
|
isDisabled: disabled,
|
|
1783
1802
|
isRequired: required,
|
|
1784
1803
|
validationState: error ? "invalid" : "valid",
|
|
1785
|
-
placeholder: rest.placeholder || formatMessage("placeholder"),
|
|
1804
|
+
placeholder: rest.placeholder || formatMessage.format("placeholder"),
|
|
1786
1805
|
...rest
|
|
1787
1806
|
};
|
|
1788
1807
|
const state = useSelectState(props);
|
|
@@ -2010,11 +2029,13 @@ var Split = (props) => /* @__PURE__ */ React47.createElement(Box28, {
|
|
|
2010
2029
|
// src/Stack/Stack.tsx
|
|
2011
2030
|
import React48 from "react";
|
|
2012
2031
|
var ALIGNMENT_X2 = {
|
|
2032
|
+
none: "initial",
|
|
2013
2033
|
left: "flex-start",
|
|
2014
2034
|
center: "center",
|
|
2015
2035
|
right: "flex-end"
|
|
2016
2036
|
};
|
|
2017
2037
|
var ALIGNMENT_Y2 = {
|
|
2038
|
+
none: "initial",
|
|
2018
2039
|
top: "flex-start",
|
|
2019
2040
|
center: "center",
|
|
2020
2041
|
bottom: "flex-end"
|
|
@@ -2022,8 +2043,8 @@ var ALIGNMENT_Y2 = {
|
|
|
2022
2043
|
var Stack = ({
|
|
2023
2044
|
children,
|
|
2024
2045
|
space = "none",
|
|
2025
|
-
alignX = "
|
|
2026
|
-
alignY = "
|
|
2046
|
+
alignX = "none",
|
|
2047
|
+
alignY = "none",
|
|
2027
2048
|
stretch = false,
|
|
2028
2049
|
...props
|
|
2029
2050
|
}) => /* @__PURE__ */ React48.createElement(Box, {
|
|
@@ -2034,7 +2055,7 @@ var Stack = ({
|
|
|
2034
2055
|
gap: space,
|
|
2035
2056
|
alignItems: ALIGNMENT_X2[alignX],
|
|
2036
2057
|
justifyContent: ALIGNMENT_Y2[alignY],
|
|
2037
|
-
blockSize: stretch ? "100%" : "
|
|
2058
|
+
blockSize: stretch ? "100%" : "initial"
|
|
2038
2059
|
},
|
|
2039
2060
|
...props
|
|
2040
2061
|
}, children);
|
|
@@ -2150,7 +2171,7 @@ import {
|
|
|
2150
2171
|
Cell,
|
|
2151
2172
|
Column,
|
|
2152
2173
|
Row,
|
|
2153
|
-
TableBody as
|
|
2174
|
+
TableBody as Body2,
|
|
2154
2175
|
TableHeader as Header2,
|
|
2155
2176
|
useTableState
|
|
2156
2177
|
} from "@react-stately/table";
|
|
@@ -2450,18 +2471,15 @@ var Table = ({
|
|
|
2450
2471
|
const { collection } = state;
|
|
2451
2472
|
return /* @__PURE__ */ React58.createElement(TableContext.Provider, {
|
|
2452
2473
|
value: { state, interactive, styles }
|
|
2453
|
-
}, /* @__PURE__ */ React58.createElement(Box34, {
|
|
2454
|
-
__baseCSS: {
|
|
2455
|
-
overflow: ["scroll", "unset"],
|
|
2456
|
-
whiteSpace: ["nowrap", "unset"]
|
|
2457
|
-
}
|
|
2458
2474
|
}, /* @__PURE__ */ React58.createElement(Box34, {
|
|
2459
2475
|
as: "table",
|
|
2460
2476
|
ref: tableRef,
|
|
2461
2477
|
__baseCSS: {
|
|
2478
|
+
display: "block",
|
|
2462
2479
|
borderCollapse: "collapse",
|
|
2463
|
-
|
|
2464
|
-
|
|
2480
|
+
overflow: "auto",
|
|
2481
|
+
whiteSpace: "nowrap",
|
|
2482
|
+
width: stretch ? "100%" : void 0
|
|
2465
2483
|
},
|
|
2466
2484
|
css: styles.table,
|
|
2467
2485
|
...gridProps
|
|
@@ -2493,9 +2511,9 @@ var Table = ({
|
|
|
2493
2511
|
cell
|
|
2494
2512
|
});
|
|
2495
2513
|
}
|
|
2496
|
-
))))))
|
|
2514
|
+
))))));
|
|
2497
2515
|
};
|
|
2498
|
-
Table.Body =
|
|
2516
|
+
Table.Body = Body2;
|
|
2499
2517
|
Table.Cell = Cell;
|
|
2500
2518
|
Table.Column = Column;
|
|
2501
2519
|
Table.Header = Header2;
|
|
@@ -2525,7 +2543,7 @@ var Text = ({
|
|
|
2525
2543
|
return /* @__PURE__ */ React59.createElement(Box35, {
|
|
2526
2544
|
as: "p",
|
|
2527
2545
|
...props,
|
|
2528
|
-
css: { color, cursor, outline, fontSize, textAlign: align
|
|
2546
|
+
css: [styles, { color, cursor, outline, fontSize, textAlign: align }]
|
|
2529
2547
|
}, children);
|
|
2530
2548
|
};
|
|
2531
2549
|
|
|
@@ -2779,6 +2797,7 @@ export {
|
|
|
2779
2797
|
Aside,
|
|
2780
2798
|
Aspect,
|
|
2781
2799
|
Badge,
|
|
2800
|
+
Body,
|
|
2782
2801
|
Box,
|
|
2783
2802
|
Breakout,
|
|
2784
2803
|
Button,
|
|
@@ -2789,7 +2808,6 @@ export {
|
|
|
2789
2808
|
CheckboxGroupContext,
|
|
2790
2809
|
Columns,
|
|
2791
2810
|
Container,
|
|
2792
|
-
Content,
|
|
2793
2811
|
Dialog,
|
|
2794
2812
|
Divider,
|
|
2795
2813
|
Footer,
|
|
@@ -2823,6 +2841,7 @@ export {
|
|
|
2823
2841
|
Tooltip,
|
|
2824
2842
|
Underlay,
|
|
2825
2843
|
VisuallyHidden,
|
|
2844
|
+
extendTheme,
|
|
2826
2845
|
useAsyncList,
|
|
2827
2846
|
useCheckboxGroupContext,
|
|
2828
2847
|
useListData,
|