@marigold/components 5.1.0 → 5.2.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 +57 -6
- package/dist/index.js +1158 -925
- package/dist/index.mjs +1188 -955
- package/package.json +6 -3
package/dist/index.mjs
CHANGED
|
@@ -67,16 +67,696 @@ var Aspect = ({
|
|
|
67
67
|
children
|
|
68
68
|
);
|
|
69
69
|
|
|
70
|
+
// src/Autocomplete/Autocomplete.tsx
|
|
71
|
+
import React18, { useRef as useRef5 } from "react";
|
|
72
|
+
import { useSearchAutocomplete } from "@react-aria/autocomplete";
|
|
73
|
+
import { useFilter } from "@react-aria/i18n";
|
|
74
|
+
import { useComboBoxState } from "@react-stately/combobox";
|
|
75
|
+
import { Item } from "@react-stately/collections";
|
|
76
|
+
import { SVG as SVG3 } from "@marigold/system";
|
|
77
|
+
|
|
78
|
+
// src/FieldBase/FieldBase.tsx
|
|
79
|
+
import React6 from "react";
|
|
80
|
+
import {
|
|
81
|
+
Box as Box4,
|
|
82
|
+
useComponentStyles as useComponentStyles3
|
|
83
|
+
} from "@marigold/system";
|
|
84
|
+
|
|
85
|
+
// src/Label/Label.tsx
|
|
86
|
+
import React3 from "react";
|
|
87
|
+
import { Box as Box2, SVG, useComponentStyles } from "@marigold/system";
|
|
88
|
+
var Label = ({
|
|
89
|
+
as = "label",
|
|
90
|
+
required,
|
|
91
|
+
children,
|
|
92
|
+
variant,
|
|
93
|
+
size,
|
|
94
|
+
labelWidth,
|
|
95
|
+
...props
|
|
96
|
+
}) => {
|
|
97
|
+
const styles = useComponentStyles("Label", { size, variant });
|
|
98
|
+
return /* @__PURE__ */ React3.createElement(
|
|
99
|
+
Box2,
|
|
100
|
+
{
|
|
101
|
+
...props,
|
|
102
|
+
as,
|
|
103
|
+
"aria-required": required,
|
|
104
|
+
__baseCSS: {
|
|
105
|
+
display: "flex",
|
|
106
|
+
width: labelWidth
|
|
107
|
+
},
|
|
108
|
+
css: styles
|
|
109
|
+
},
|
|
110
|
+
children,
|
|
111
|
+
required && /* @__PURE__ */ React3.createElement(SVG, { viewBox: "0 0 24 24", role: "presentation", size: 16, fill: "error" }, /* @__PURE__ */ React3.createElement("path", { d: "M10.8 3.84003H13.2V9.85259L18.1543 7.01815L19.3461 9.10132L14.3584 11.9549L19.3371 14.7999L18.1463 16.8836L13.2 14.0572V20.16H10.8V13.9907L5.76116 16.8735L4.56935 14.7903L9.5232 11.9561L4.56 9.12003L5.75073 7.03624L10.8 9.92154V3.84003Z" }))
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
// src/HelpText/HelpText.tsx
|
|
116
|
+
import React4 from "react";
|
|
117
|
+
import {
|
|
118
|
+
Box as Box3,
|
|
119
|
+
SVG as SVG2,
|
|
120
|
+
useComponentStyles as useComponentStyles2
|
|
121
|
+
} from "@marigold/system";
|
|
122
|
+
var HelpText = ({
|
|
123
|
+
variant,
|
|
124
|
+
size,
|
|
125
|
+
disabled,
|
|
126
|
+
description,
|
|
127
|
+
descriptionProps,
|
|
128
|
+
error,
|
|
129
|
+
errorMessage,
|
|
130
|
+
errorMessageProps,
|
|
131
|
+
...props
|
|
132
|
+
}) => {
|
|
133
|
+
var _a;
|
|
134
|
+
const hasErrorMessage = errorMessage && error;
|
|
135
|
+
const styles = useComponentStyles2(
|
|
136
|
+
"HelpText",
|
|
137
|
+
{ variant, size },
|
|
138
|
+
{ parts: ["container", "icon"] }
|
|
139
|
+
);
|
|
140
|
+
return /* @__PURE__ */ React4.createElement(
|
|
141
|
+
Box3,
|
|
142
|
+
{
|
|
143
|
+
...hasErrorMessage ? errorMessageProps : descriptionProps,
|
|
144
|
+
...props,
|
|
145
|
+
__baseCSS: { display: "flex", alignItems: "center", gap: 4 },
|
|
146
|
+
css: styles.container
|
|
147
|
+
},
|
|
148
|
+
hasErrorMessage ? /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
|
|
149
|
+
SVG2,
|
|
150
|
+
{
|
|
151
|
+
viewBox: "0 0 24 24",
|
|
152
|
+
role: "presentation",
|
|
153
|
+
size: ((_a = styles == null ? void 0 : styles.icon) == null ? void 0 : _a.size) || 16
|
|
154
|
+
},
|
|
155
|
+
/* @__PURE__ */ React4.createElement("path", { d: "M2.25 20.3097H21.75L12 3.46875L2.25 20.3097ZM12.8864 17.2606H11.1136V15.4879H12.8864V17.2606ZM12.8864 13.7151H11.1136V10.1697H12.8864V13.7151Z" })
|
|
156
|
+
), errorMessage) : /* @__PURE__ */ React4.createElement(React4.Fragment, null, description)
|
|
157
|
+
);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
// src/FieldBase/FieldGroup.tsx
|
|
161
|
+
import React5 from "react";
|
|
162
|
+
import { createContext, useContext } from "react";
|
|
163
|
+
var FieldGroupContext = createContext({});
|
|
164
|
+
var useFieldGroupContext = () => useContext(FieldGroupContext);
|
|
165
|
+
var FieldGroup = ({ labelWidth, children }) => {
|
|
166
|
+
return /* @__PURE__ */ React5.createElement(FieldGroupContext.Provider, { value: { labelWidth } }, children);
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
// src/FieldBase/FieldBase.tsx
|
|
170
|
+
var FieldBase = ({
|
|
171
|
+
children,
|
|
172
|
+
variant,
|
|
173
|
+
size,
|
|
174
|
+
width = "100%",
|
|
175
|
+
disabled,
|
|
176
|
+
required,
|
|
177
|
+
label,
|
|
178
|
+
labelProps,
|
|
179
|
+
description,
|
|
180
|
+
descriptionProps,
|
|
181
|
+
error,
|
|
182
|
+
errorMessage,
|
|
183
|
+
errorMessageProps,
|
|
184
|
+
stateProps,
|
|
185
|
+
...props
|
|
186
|
+
}) => {
|
|
187
|
+
const hasHelpText = !!description || errorMessage && error;
|
|
188
|
+
const style = useComponentStyles3("Field", { variant, size });
|
|
189
|
+
const { labelWidth } = useFieldGroupContext();
|
|
190
|
+
return /* @__PURE__ */ React6.createElement(
|
|
191
|
+
Box4,
|
|
192
|
+
{
|
|
193
|
+
...props,
|
|
194
|
+
__baseCSS: {
|
|
195
|
+
display: "flex",
|
|
196
|
+
flexDirection: "column",
|
|
197
|
+
width,
|
|
198
|
+
position: "relative"
|
|
199
|
+
},
|
|
200
|
+
css: style
|
|
201
|
+
},
|
|
202
|
+
label && /* @__PURE__ */ React6.createElement(
|
|
203
|
+
Label,
|
|
204
|
+
{
|
|
205
|
+
required,
|
|
206
|
+
variant,
|
|
207
|
+
size,
|
|
208
|
+
labelWidth,
|
|
209
|
+
...labelProps,
|
|
210
|
+
...stateProps
|
|
211
|
+
},
|
|
212
|
+
label
|
|
213
|
+
),
|
|
214
|
+
/* @__PURE__ */ React6.createElement(Box4, { __baseCSS: { display: "flex", flexDirection: "column" } }, children, hasHelpText && /* @__PURE__ */ React6.createElement(
|
|
215
|
+
HelpText,
|
|
216
|
+
{
|
|
217
|
+
...stateProps,
|
|
218
|
+
variant,
|
|
219
|
+
size,
|
|
220
|
+
disabled,
|
|
221
|
+
description,
|
|
222
|
+
descriptionProps,
|
|
223
|
+
error,
|
|
224
|
+
errorMessage,
|
|
225
|
+
errorMessageProps
|
|
226
|
+
}
|
|
227
|
+
))
|
|
228
|
+
);
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
// src/Input/InputField.tsx
|
|
232
|
+
import React7, { forwardRef } from "react";
|
|
233
|
+
import { Box as Box5 } from "@marigold/system";
|
|
234
|
+
var InputField = forwardRef(
|
|
235
|
+
({ type = "text", ...props }, ref) => {
|
|
236
|
+
return /* @__PURE__ */ React7.createElement(
|
|
237
|
+
Box5,
|
|
238
|
+
{
|
|
239
|
+
__baseCSS: { border: 0, width: "100%", outline: "none" },
|
|
240
|
+
...props,
|
|
241
|
+
ref,
|
|
242
|
+
as: "input",
|
|
243
|
+
type
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
);
|
|
248
|
+
|
|
249
|
+
// src/Input/Input.tsx
|
|
250
|
+
import {
|
|
251
|
+
Box as Box6,
|
|
252
|
+
useComponentStyles as useComponentStyles4
|
|
253
|
+
} from "@marigold/system";
|
|
254
|
+
import React8 from "react";
|
|
255
|
+
var Input = ({
|
|
256
|
+
space = "xsmall",
|
|
257
|
+
children,
|
|
258
|
+
variant,
|
|
259
|
+
size,
|
|
260
|
+
...props
|
|
261
|
+
}) => {
|
|
262
|
+
const [leading, input, trailing] = React8.Children.toArray(children);
|
|
263
|
+
const styles = useComponentStyles4("Input", { variant, size });
|
|
264
|
+
return /* @__PURE__ */ React8.createElement(
|
|
265
|
+
Box6,
|
|
266
|
+
{
|
|
267
|
+
__baseCSS: {
|
|
268
|
+
display: "flex",
|
|
269
|
+
alignItems: "center",
|
|
270
|
+
width: "100%",
|
|
271
|
+
gap: space
|
|
272
|
+
},
|
|
273
|
+
css: styles,
|
|
274
|
+
...props
|
|
275
|
+
},
|
|
276
|
+
leading,
|
|
277
|
+
input,
|
|
278
|
+
trailing
|
|
279
|
+
);
|
|
280
|
+
};
|
|
281
|
+
Input.Field = InputField;
|
|
282
|
+
|
|
283
|
+
// src/ListBox/ListBox.tsx
|
|
284
|
+
import React11, { forwardRef as forwardRef2 } from "react";
|
|
285
|
+
import { useObjectRef } from "@react-aria/utils";
|
|
286
|
+
import {
|
|
287
|
+
Box as Box9,
|
|
288
|
+
useComponentStyles as useComponentStyles5
|
|
289
|
+
} from "@marigold/system";
|
|
290
|
+
import { useListBox } from "@react-aria/listbox";
|
|
291
|
+
|
|
292
|
+
// src/ListBox/Context.ts
|
|
293
|
+
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
294
|
+
var ListBoxContext = createContext2({});
|
|
295
|
+
var useListBoxContext = () => useContext2(ListBoxContext);
|
|
296
|
+
|
|
297
|
+
// src/ListBox/ListBoxSection.tsx
|
|
298
|
+
import React10 from "react";
|
|
299
|
+
import { useListBoxSection } from "@react-aria/listbox";
|
|
300
|
+
import { Box as Box8 } from "@marigold/system";
|
|
301
|
+
|
|
302
|
+
// src/ListBox/ListBoxOption.tsx
|
|
303
|
+
import React9, { useRef } from "react";
|
|
304
|
+
import { useOption } from "@react-aria/listbox";
|
|
305
|
+
import { mergeProps } from "@react-aria/utils";
|
|
306
|
+
import { Box as Box7, useStateProps } from "@marigold/system";
|
|
307
|
+
var ListBoxOption = ({ item, state }) => {
|
|
308
|
+
const ref = useRef(null);
|
|
309
|
+
const { optionProps, isSelected, isDisabled, isFocused } = useOption(
|
|
310
|
+
{
|
|
311
|
+
key: item.key
|
|
312
|
+
},
|
|
313
|
+
state,
|
|
314
|
+
ref
|
|
315
|
+
);
|
|
316
|
+
const { onPointerUp, ...props } = optionProps;
|
|
317
|
+
const { styles } = useListBoxContext();
|
|
318
|
+
const stateProps = useStateProps({
|
|
319
|
+
selected: isSelected,
|
|
320
|
+
disabled: isDisabled,
|
|
321
|
+
focusVisible: isFocused
|
|
322
|
+
});
|
|
323
|
+
return /* @__PURE__ */ React9.createElement(
|
|
324
|
+
Box7,
|
|
325
|
+
{
|
|
326
|
+
as: "li",
|
|
327
|
+
ref,
|
|
328
|
+
css: styles.option,
|
|
329
|
+
...mergeProps(props, { onPointerDown: onPointerUp }, { ...stateProps })
|
|
330
|
+
},
|
|
331
|
+
item.rendered
|
|
332
|
+
);
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
// src/ListBox/ListBoxSection.tsx
|
|
336
|
+
var ListBoxSection = ({ section, state }) => {
|
|
337
|
+
const { itemProps, headingProps, groupProps } = useListBoxSection({
|
|
338
|
+
heading: section.rendered,
|
|
339
|
+
"aria-label": section["aria-label"]
|
|
340
|
+
});
|
|
341
|
+
const { styles } = useListBoxContext();
|
|
342
|
+
return /* @__PURE__ */ React10.createElement(Box8, { as: "li", css: styles.section, ...itemProps }, section.rendered && /* @__PURE__ */ React10.createElement(Box8, { css: styles.sectionTitle, ...headingProps }, section.rendered), /* @__PURE__ */ React10.createElement(
|
|
343
|
+
Box8,
|
|
344
|
+
{
|
|
345
|
+
as: "ul",
|
|
346
|
+
__baseCSS: { listStyle: "none", p: 0 },
|
|
347
|
+
css: styles.list,
|
|
348
|
+
...groupProps
|
|
349
|
+
},
|
|
350
|
+
[...section.childNodes].map((node) => /* @__PURE__ */ React10.createElement(ListBoxOption, { key: node.key, item: node, state }))
|
|
351
|
+
));
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
// src/ListBox/ListBox.tsx
|
|
355
|
+
var ListBox = forwardRef2(
|
|
356
|
+
({ state, variant, size, ...props }, ref) => {
|
|
357
|
+
const innerRef = useObjectRef(ref);
|
|
358
|
+
const { listBoxProps } = useListBox(props, state, innerRef);
|
|
359
|
+
const styles = useComponentStyles5(
|
|
360
|
+
"ListBox",
|
|
361
|
+
{ variant, size },
|
|
362
|
+
{ parts: ["container", "list", "option", "section", "sectionTitle"] }
|
|
363
|
+
);
|
|
364
|
+
return /* @__PURE__ */ React11.createElement(ListBoxContext.Provider, { value: { styles } }, /* @__PURE__ */ React11.createElement(Box9, { css: styles.container }, /* @__PURE__ */ React11.createElement(
|
|
365
|
+
Box9,
|
|
366
|
+
{
|
|
367
|
+
as: "ul",
|
|
368
|
+
ref: innerRef,
|
|
369
|
+
__baseCSS: { listStyle: "none", p: 0 },
|
|
370
|
+
css: styles.list,
|
|
371
|
+
...listBoxProps
|
|
372
|
+
},
|
|
373
|
+
[...state.collection].map(
|
|
374
|
+
(item) => item.type === "section" ? /* @__PURE__ */ React11.createElement(ListBoxSection, { key: item.key, section: item, state }) : /* @__PURE__ */ React11.createElement(ListBoxOption, { key: item.key, item, state })
|
|
375
|
+
)
|
|
376
|
+
)));
|
|
377
|
+
}
|
|
378
|
+
);
|
|
379
|
+
|
|
380
|
+
// src/Overlay/Modal.tsx
|
|
381
|
+
import React13, { forwardRef as forwardRef3 } from "react";
|
|
382
|
+
import { FocusScope } from "@react-aria/focus";
|
|
383
|
+
import { useModal, useOverlay, usePreventScroll } from "@react-aria/overlays";
|
|
384
|
+
import { mergeProps as mergeProps2, useObjectRef as useObjectRef2 } from "@react-aria/utils";
|
|
385
|
+
|
|
386
|
+
// src/Overlay/Underlay.tsx
|
|
387
|
+
import React12 from "react";
|
|
388
|
+
import { Box as Box10, useComponentStyles as useComponentStyles6 } from "@marigold/system";
|
|
389
|
+
var Underlay = ({ size, variant, ...props }) => {
|
|
390
|
+
const styles = useComponentStyles6("Underlay", { size, variant });
|
|
391
|
+
return /* @__PURE__ */ React12.createElement(
|
|
392
|
+
Box10,
|
|
393
|
+
{
|
|
394
|
+
__baseCSS: {
|
|
395
|
+
position: "fixed",
|
|
396
|
+
inset: 0,
|
|
397
|
+
zIndex: 1
|
|
398
|
+
},
|
|
399
|
+
css: styles,
|
|
400
|
+
...props
|
|
401
|
+
}
|
|
402
|
+
);
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
// src/Overlay/Modal.tsx
|
|
406
|
+
var Modal = forwardRef3(
|
|
407
|
+
({ children, open, dismissable, keyboardDismissable, onClose, ...props }, ref) => {
|
|
408
|
+
const modalRef = useObjectRef2(ref);
|
|
409
|
+
const { overlayProps, underlayProps } = useOverlay(
|
|
410
|
+
{
|
|
411
|
+
isOpen: open,
|
|
412
|
+
onClose,
|
|
413
|
+
isDismissable: dismissable,
|
|
414
|
+
isKeyboardDismissDisabled: !keyboardDismissable
|
|
415
|
+
},
|
|
416
|
+
modalRef
|
|
417
|
+
);
|
|
418
|
+
usePreventScroll();
|
|
419
|
+
const { modalProps } = useModal({});
|
|
420
|
+
return /* @__PURE__ */ React13.createElement(FocusScope, { contain: true, restoreFocus: true, autoFocus: true }, /* @__PURE__ */ React13.createElement(Underlay, { ...underlayProps, variant: "modal" }), /* @__PURE__ */ React13.createElement(
|
|
421
|
+
"div",
|
|
422
|
+
{
|
|
423
|
+
style: {
|
|
424
|
+
display: "flex",
|
|
425
|
+
alignItems: "center",
|
|
426
|
+
justifyContent: "center",
|
|
427
|
+
position: "fixed",
|
|
428
|
+
inset: 0,
|
|
429
|
+
zIndex: 2,
|
|
430
|
+
pointerEvents: "none"
|
|
431
|
+
},
|
|
432
|
+
ref: modalRef,
|
|
433
|
+
...mergeProps2(props, overlayProps, modalProps)
|
|
434
|
+
},
|
|
435
|
+
/* @__PURE__ */ React13.createElement("div", { style: { pointerEvents: "auto" } }, children)
|
|
436
|
+
));
|
|
437
|
+
}
|
|
438
|
+
);
|
|
439
|
+
|
|
440
|
+
// src/Overlay/Overlay.tsx
|
|
441
|
+
import React14, { useRef as useRef2 } from "react";
|
|
442
|
+
import { Transition } from "react-transition-group";
|
|
443
|
+
import {
|
|
444
|
+
Overlay as ReactAriaOverlay
|
|
445
|
+
} from "@react-aria/overlays";
|
|
446
|
+
var duration = 300;
|
|
447
|
+
var defaultStyle = {
|
|
448
|
+
transition: `opacity ${duration}ms ease-in-out`,
|
|
449
|
+
opacity: 0
|
|
450
|
+
};
|
|
451
|
+
var transitionStyles = {
|
|
452
|
+
entering: { opacity: 1 },
|
|
453
|
+
entered: { opacity: 1 },
|
|
454
|
+
exiting: { opacity: 0 },
|
|
455
|
+
exited: { opacity: 0 },
|
|
456
|
+
unmounted: { opacity: 0 }
|
|
457
|
+
};
|
|
458
|
+
var Overlay = ({ children, container, open }) => {
|
|
459
|
+
const nodeRef = useRef2(null);
|
|
460
|
+
let mountOverlay = open;
|
|
461
|
+
if (!mountOverlay) {
|
|
462
|
+
return null;
|
|
463
|
+
}
|
|
464
|
+
return /* @__PURE__ */ React14.createElement(ReactAriaOverlay, { portalContainer: container }, /* @__PURE__ */ React14.createElement(Transition, { nodeRef, timeout: duration, in: open, appear: true }, (state) => /* @__PURE__ */ React14.createElement(
|
|
465
|
+
"div",
|
|
466
|
+
{
|
|
467
|
+
ref: nodeRef,
|
|
468
|
+
"data-testid": "overlay",
|
|
469
|
+
style: {
|
|
470
|
+
...defaultStyle,
|
|
471
|
+
...transitionStyles[state]
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
children
|
|
475
|
+
)));
|
|
476
|
+
};
|
|
477
|
+
|
|
478
|
+
// src/Overlay/Popover.tsx
|
|
479
|
+
import React15, { forwardRef as forwardRef4, useRef as useRef3 } from "react";
|
|
480
|
+
import {
|
|
481
|
+
DismissButton,
|
|
482
|
+
usePopover
|
|
483
|
+
} from "@react-aria/overlays";
|
|
484
|
+
import { FocusScope as FocusScope2 } from "@react-aria/focus";
|
|
485
|
+
var Popover = forwardRef4(
|
|
486
|
+
(props, ref) => {
|
|
487
|
+
const fallbackRef = useRef3(null);
|
|
488
|
+
const popoverRef = ref || fallbackRef;
|
|
489
|
+
let { children, state, ...otherProps } = props;
|
|
490
|
+
return /* @__PURE__ */ React15.createElement(Overlay, { open: state.isOpen, ...otherProps }, /* @__PURE__ */ React15.createElement(PopoverWrapper, { ref: popoverRef, ...props }, children));
|
|
491
|
+
}
|
|
492
|
+
);
|
|
493
|
+
var PopoverWrapper = forwardRef4(
|
|
494
|
+
({
|
|
495
|
+
children,
|
|
496
|
+
isNonModal,
|
|
497
|
+
state,
|
|
498
|
+
keyboardDismissDisabled,
|
|
499
|
+
...props
|
|
500
|
+
}, ref) => {
|
|
501
|
+
const { popoverProps, underlayProps } = usePopover(
|
|
502
|
+
{
|
|
503
|
+
...props,
|
|
504
|
+
isNonModal,
|
|
505
|
+
isKeyboardDismissDisabled: keyboardDismissDisabled,
|
|
506
|
+
popoverRef: ref,
|
|
507
|
+
placement: "bottom left"
|
|
508
|
+
},
|
|
509
|
+
state
|
|
510
|
+
);
|
|
511
|
+
return /* @__PURE__ */ React15.createElement(FocusScope2, { restoreFocus: true }, !isNonModal && /* @__PURE__ */ React15.createElement(Underlay, { ...underlayProps }), /* @__PURE__ */ React15.createElement(
|
|
512
|
+
"div",
|
|
513
|
+
{
|
|
514
|
+
...popoverProps,
|
|
515
|
+
style: {
|
|
516
|
+
...popoverProps.style,
|
|
517
|
+
minWidth: props.triggerRef.current ? props.triggerRef.current.offsetWidth : void 0
|
|
518
|
+
},
|
|
519
|
+
ref,
|
|
520
|
+
role: "presentation"
|
|
521
|
+
},
|
|
522
|
+
!isNonModal && /* @__PURE__ */ React15.createElement(DismissButton, { onDismiss: state.close }),
|
|
523
|
+
children,
|
|
524
|
+
/* @__PURE__ */ React15.createElement(DismissButton, { onDismiss: state.close })
|
|
525
|
+
));
|
|
526
|
+
}
|
|
527
|
+
);
|
|
528
|
+
|
|
529
|
+
// src/Overlay/Tray.tsx
|
|
530
|
+
import React16 from "react";
|
|
531
|
+
import { Box as Box11 } from "@marigold/system";
|
|
532
|
+
import { FocusScope as FocusScope3 } from "@react-aria/focus";
|
|
533
|
+
import {
|
|
534
|
+
DismissButton as DismissButton2,
|
|
535
|
+
useModalOverlay
|
|
536
|
+
} from "@react-aria/overlays";
|
|
537
|
+
import { useObjectRef as useObjectRef3 } from "@react-aria/utils";
|
|
538
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
539
|
+
var Tray = forwardRef5(
|
|
540
|
+
({ state, children, ...props }, ref) => {
|
|
541
|
+
const trayRef = useObjectRef3(ref);
|
|
542
|
+
return /* @__PURE__ */ React16.createElement(Overlay, { open: state.isOpen }, /* @__PURE__ */ React16.createElement(TrayWrapper, { state, ...props, ref: trayRef }, children));
|
|
543
|
+
}
|
|
544
|
+
);
|
|
545
|
+
var TrayWrapper = forwardRef5(
|
|
546
|
+
({ children, state, ...props }, ref) => {
|
|
547
|
+
let { modalProps, underlayProps } = useModalOverlay(
|
|
548
|
+
{
|
|
549
|
+
...props,
|
|
550
|
+
isDismissable: true
|
|
551
|
+
},
|
|
552
|
+
state,
|
|
553
|
+
ref
|
|
554
|
+
);
|
|
555
|
+
return /* @__PURE__ */ React16.createElement(FocusScope3, { contain: true, restoreFocus: true, autoFocus: true }, /* @__PURE__ */ React16.createElement(Underlay, { ...underlayProps, variant: "modal" }, /* @__PURE__ */ React16.createElement(
|
|
556
|
+
Box11,
|
|
557
|
+
{
|
|
558
|
+
...modalProps,
|
|
559
|
+
ref,
|
|
560
|
+
__baseCSS: { position: "absolute", width: "100%", bottom: 0 },
|
|
561
|
+
"data-testid": "tray"
|
|
562
|
+
},
|
|
563
|
+
/* @__PURE__ */ React16.createElement(DismissButton2, { onDismiss: state.close }),
|
|
564
|
+
children,
|
|
565
|
+
/* @__PURE__ */ React16.createElement(DismissButton2, { onDismiss: state.close })
|
|
566
|
+
)));
|
|
567
|
+
}
|
|
568
|
+
);
|
|
569
|
+
|
|
570
|
+
// src/Autocomplete/ClearButton.tsx
|
|
571
|
+
import React17, { useRef as useRef4 } from "react";
|
|
572
|
+
import { useHover } from "@react-aria/interactions";
|
|
573
|
+
import { useFocusRing } from "@react-aria/focus";
|
|
574
|
+
import { useButton } from "@react-aria/button";
|
|
575
|
+
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
|
576
|
+
import { Box as Box12, useStateProps as useStateProps2 } from "@marigold/system";
|
|
577
|
+
var ClearButton = ({
|
|
578
|
+
preventFocus,
|
|
579
|
+
disabled,
|
|
580
|
+
onClick,
|
|
581
|
+
onPress,
|
|
582
|
+
onPressStart,
|
|
583
|
+
onPressEnd,
|
|
584
|
+
onPressChange,
|
|
585
|
+
onPressUp,
|
|
586
|
+
excludeFromTabOrder,
|
|
587
|
+
preventFocusOnPress,
|
|
588
|
+
...props
|
|
589
|
+
}) => {
|
|
590
|
+
const buttonRef = useRef4(null);
|
|
591
|
+
const { hoverProps, isHovered } = useHover({ isDisabled: disabled });
|
|
592
|
+
const { isFocusVisible, focusProps } = useFocusRing({
|
|
593
|
+
autoFocus: props.autoFocus
|
|
594
|
+
});
|
|
595
|
+
const { buttonProps, isPressed } = useButton(
|
|
596
|
+
{
|
|
597
|
+
...props,
|
|
598
|
+
onClick,
|
|
599
|
+
onPress,
|
|
600
|
+
onPressStart,
|
|
601
|
+
onPressEnd,
|
|
602
|
+
onPressChange,
|
|
603
|
+
onPressUp,
|
|
604
|
+
excludeFromTabOrder,
|
|
605
|
+
preventFocusOnPress,
|
|
606
|
+
isDisabled: disabled
|
|
607
|
+
},
|
|
608
|
+
buttonRef
|
|
609
|
+
);
|
|
610
|
+
if (preventFocus) {
|
|
611
|
+
delete buttonProps.tabIndex;
|
|
612
|
+
}
|
|
613
|
+
const stateProps = useStateProps2({
|
|
614
|
+
active: isPressed,
|
|
615
|
+
focusVisible: isFocusVisible,
|
|
616
|
+
hover: isHovered
|
|
617
|
+
});
|
|
618
|
+
return /* @__PURE__ */ React17.createElement(
|
|
619
|
+
Box12,
|
|
620
|
+
{
|
|
621
|
+
...mergeProps3(buttonProps, focusProps, hoverProps, props),
|
|
622
|
+
...stateProps,
|
|
623
|
+
as: "button",
|
|
624
|
+
ref: buttonRef,
|
|
625
|
+
css: {
|
|
626
|
+
appearance: "none",
|
|
627
|
+
border: "none",
|
|
628
|
+
p: 0,
|
|
629
|
+
cursor: "pointer"
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
/* @__PURE__ */ React17.createElement(
|
|
633
|
+
"svg",
|
|
634
|
+
{
|
|
635
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
636
|
+
viewBox: "0 0 20 20",
|
|
637
|
+
fill: "currentColor",
|
|
638
|
+
height: 20,
|
|
639
|
+
width: 20
|
|
640
|
+
},
|
|
641
|
+
/* @__PURE__ */ React17.createElement("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" })
|
|
642
|
+
)
|
|
643
|
+
);
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
// src/Autocomplete/Autocomplete.tsx
|
|
647
|
+
var SearchIcon = () => /* @__PURE__ */ React18.createElement(
|
|
648
|
+
SVG3,
|
|
649
|
+
{
|
|
650
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
651
|
+
viewBox: "0 0 20 20",
|
|
652
|
+
fill: "currentColor",
|
|
653
|
+
height: 16,
|
|
654
|
+
width: 16
|
|
655
|
+
},
|
|
656
|
+
/* @__PURE__ */ React18.createElement(
|
|
657
|
+
"path",
|
|
658
|
+
{
|
|
659
|
+
fillRule: "evenodd",
|
|
660
|
+
d: "M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z",
|
|
661
|
+
clipRule: "evenodd"
|
|
662
|
+
}
|
|
663
|
+
)
|
|
664
|
+
);
|
|
665
|
+
var Autocomplete = ({
|
|
666
|
+
disabled,
|
|
667
|
+
required,
|
|
668
|
+
readOnly,
|
|
669
|
+
error,
|
|
670
|
+
onChange,
|
|
671
|
+
value,
|
|
672
|
+
defaultValue,
|
|
673
|
+
width,
|
|
674
|
+
...rest
|
|
675
|
+
}) => {
|
|
676
|
+
const { contains } = useFilter({ sensitivity: "base" });
|
|
677
|
+
const props = {
|
|
678
|
+
...rest,
|
|
679
|
+
onInputChange: onChange,
|
|
680
|
+
inputValue: value,
|
|
681
|
+
defaultInputValue: defaultValue,
|
|
682
|
+
isDisabled: disabled,
|
|
683
|
+
isRequired: required,
|
|
684
|
+
isReadOnly: readOnly,
|
|
685
|
+
validationState: error ? "invalid" : "valid"
|
|
686
|
+
};
|
|
687
|
+
const state = useComboBoxState({
|
|
688
|
+
...props,
|
|
689
|
+
defaultFilter: contains,
|
|
690
|
+
allowsCustomValue: true,
|
|
691
|
+
onSelectionChange: (key) => {
|
|
692
|
+
var _a;
|
|
693
|
+
return key !== null && ((_a = props.onSubmit) == null ? void 0 : _a.call(props, key, null));
|
|
694
|
+
},
|
|
695
|
+
selectedKey: void 0,
|
|
696
|
+
defaultSelectedKey: void 0
|
|
697
|
+
});
|
|
698
|
+
const inputRef = useRef5(null);
|
|
699
|
+
const listBoxRef = useRef5(null);
|
|
700
|
+
const popoverRef = useRef5(null);
|
|
701
|
+
const { inputProps, listBoxProps, labelProps, clearButtonProps } = useSearchAutocomplete(
|
|
702
|
+
{
|
|
703
|
+
...props,
|
|
704
|
+
onSubmit: (value2, key) => {
|
|
705
|
+
var _a;
|
|
706
|
+
return (_a = props.onSubmit) == null ? void 0 : _a.call(props, key, value2);
|
|
707
|
+
},
|
|
708
|
+
popoverRef,
|
|
709
|
+
listBoxRef,
|
|
710
|
+
inputRef
|
|
711
|
+
},
|
|
712
|
+
state
|
|
713
|
+
);
|
|
714
|
+
const errorMessageProps = { "aria-invalid": error };
|
|
715
|
+
const { isDisabled, ...restClearButtonProps } = clearButtonProps;
|
|
716
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
|
|
717
|
+
FieldBase,
|
|
718
|
+
{
|
|
719
|
+
label: props.label,
|
|
720
|
+
labelProps,
|
|
721
|
+
description: props.description,
|
|
722
|
+
error,
|
|
723
|
+
errorMessage: props.errorMessage,
|
|
724
|
+
errorMessageProps,
|
|
725
|
+
disabled,
|
|
726
|
+
width
|
|
727
|
+
},
|
|
728
|
+
/* @__PURE__ */ React18.createElement(Input, null, /* @__PURE__ */ React18.createElement(SearchIcon, null), /* @__PURE__ */ React18.createElement(Input.Field, { ...inputProps, ref: inputRef }), state.inputValue !== "" && /* @__PURE__ */ React18.createElement(
|
|
729
|
+
ClearButton,
|
|
730
|
+
{
|
|
731
|
+
preventFocus: true,
|
|
732
|
+
disabled: isDisabled,
|
|
733
|
+
...restClearButtonProps
|
|
734
|
+
}
|
|
735
|
+
))
|
|
736
|
+
), /* @__PURE__ */ React18.createElement(
|
|
737
|
+
Popover,
|
|
738
|
+
{
|
|
739
|
+
state,
|
|
740
|
+
ref: popoverRef,
|
|
741
|
+
triggerRef: inputRef,
|
|
742
|
+
scrollRef: listBoxRef,
|
|
743
|
+
isNonModal: true
|
|
744
|
+
},
|
|
745
|
+
/* @__PURE__ */ React18.createElement(ListBox, { ref: listBoxRef, state, ...listBoxProps })
|
|
746
|
+
));
|
|
747
|
+
};
|
|
748
|
+
Autocomplete.Item = Item;
|
|
749
|
+
|
|
70
750
|
// src/Badge/Badge.tsx
|
|
71
|
-
import
|
|
72
|
-
import { useComponentStyles } from "@marigold/system";
|
|
751
|
+
import React19 from "react";
|
|
752
|
+
import { useComponentStyles as useComponentStyles7 } from "@marigold/system";
|
|
73
753
|
var Badge = ({ variant, size, children, ...props }) => {
|
|
74
|
-
const styles =
|
|
75
|
-
return /* @__PURE__ */
|
|
754
|
+
const styles = useComponentStyles7("Badge", { variant, size });
|
|
755
|
+
return /* @__PURE__ */ React19.createElement(Box, { ...props, css: styles }, children);
|
|
76
756
|
};
|
|
77
757
|
|
|
78
758
|
// src/Breakout/Breakout.tsx
|
|
79
|
-
import
|
|
759
|
+
import React20 from "react";
|
|
80
760
|
var useAlignment = (direction) => {
|
|
81
761
|
switch (direction) {
|
|
82
762
|
case "right":
|
|
@@ -97,7 +777,7 @@ var Breakout = ({
|
|
|
97
777
|
}) => {
|
|
98
778
|
const alignItems = useAlignment(alignY);
|
|
99
779
|
const justifyContent = useAlignment(alignX);
|
|
100
|
-
return /* @__PURE__ */
|
|
780
|
+
return /* @__PURE__ */ React20.createElement(
|
|
101
781
|
Box,
|
|
102
782
|
{
|
|
103
783
|
css: {
|
|
@@ -115,28 +795,28 @@ var Breakout = ({
|
|
|
115
795
|
};
|
|
116
796
|
|
|
117
797
|
// src/Body/Body.tsx
|
|
118
|
-
import
|
|
798
|
+
import React21 from "react";
|
|
119
799
|
import {
|
|
120
|
-
Box as
|
|
121
|
-
useComponentStyles as
|
|
800
|
+
Box as Box13,
|
|
801
|
+
useComponentStyles as useComponentStyles8
|
|
122
802
|
} from "@marigold/system";
|
|
123
803
|
var Body = ({ children, variant, size, ...props }) => {
|
|
124
|
-
const styles =
|
|
125
|
-
return /* @__PURE__ */
|
|
804
|
+
const styles = useComponentStyles8("Body", { variant, size });
|
|
805
|
+
return /* @__PURE__ */ React21.createElement(Box13, { as: "section", ...props, css: styles }, children);
|
|
126
806
|
};
|
|
127
807
|
|
|
128
808
|
// src/Button/Button.tsx
|
|
129
|
-
import
|
|
130
|
-
import { useButton } from "@react-aria/button";
|
|
131
|
-
import { useFocusRing } from "@react-aria/focus";
|
|
132
|
-
import { useHover } from "@react-aria/interactions";
|
|
133
|
-
import { mergeProps, useObjectRef } from "@react-aria/utils";
|
|
809
|
+
import React22, { forwardRef as forwardRef6 } from "react";
|
|
810
|
+
import { useButton as useButton2 } from "@react-aria/button";
|
|
811
|
+
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
812
|
+
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
813
|
+
import { mergeProps as mergeProps4, useObjectRef as useObjectRef4 } from "@react-aria/utils";
|
|
134
814
|
import {
|
|
135
|
-
Box as
|
|
136
|
-
useComponentStyles as
|
|
137
|
-
useStateProps
|
|
815
|
+
Box as Box14,
|
|
816
|
+
useComponentStyles as useComponentStyles9,
|
|
817
|
+
useStateProps as useStateProps3
|
|
138
818
|
} from "@marigold/system";
|
|
139
|
-
var Button =
|
|
819
|
+
var Button = forwardRef6(
|
|
140
820
|
({
|
|
141
821
|
as = "button",
|
|
142
822
|
children,
|
|
@@ -152,12 +832,12 @@ var Button = forwardRef(
|
|
|
152
832
|
fullWidth,
|
|
153
833
|
...props
|
|
154
834
|
}, ref) => {
|
|
155
|
-
const buttonRef =
|
|
156
|
-
const { hoverProps, isHovered } =
|
|
157
|
-
const { isFocusVisible, focusProps } =
|
|
835
|
+
const buttonRef = useObjectRef4(ref);
|
|
836
|
+
const { hoverProps, isHovered } = useHover2({ isDisabled: disabled });
|
|
837
|
+
const { isFocusVisible, focusProps } = useFocusRing2({
|
|
158
838
|
autoFocus: props.autoFocus
|
|
159
839
|
});
|
|
160
|
-
const { buttonProps, isPressed } =
|
|
840
|
+
const { buttonProps, isPressed } = useButton2(
|
|
161
841
|
{
|
|
162
842
|
/**
|
|
163
843
|
* `react-aria` only expected `Element` but we casted
|
|
@@ -175,16 +855,16 @@ var Button = forwardRef(
|
|
|
175
855
|
},
|
|
176
856
|
buttonRef
|
|
177
857
|
);
|
|
178
|
-
const styles =
|
|
179
|
-
const stateProps =
|
|
858
|
+
const styles = useComponentStyles9("Button", { variant, size });
|
|
859
|
+
const stateProps = useStateProps3({
|
|
180
860
|
active: isPressed,
|
|
181
861
|
focusVisible: isFocusVisible,
|
|
182
862
|
hover: isHovered
|
|
183
863
|
});
|
|
184
|
-
return /* @__PURE__ */
|
|
185
|
-
|
|
864
|
+
return /* @__PURE__ */ React22.createElement(
|
|
865
|
+
Box14,
|
|
186
866
|
{
|
|
187
|
-
...
|
|
867
|
+
...mergeProps4(buttonProps, focusProps, hoverProps, props),
|
|
188
868
|
...stateProps,
|
|
189
869
|
as,
|
|
190
870
|
ref: buttonRef,
|
|
@@ -207,10 +887,10 @@ var Button = forwardRef(
|
|
|
207
887
|
);
|
|
208
888
|
|
|
209
889
|
// src/Card/Card.tsx
|
|
210
|
-
import
|
|
890
|
+
import React23 from "react";
|
|
211
891
|
import {
|
|
212
|
-
Box as
|
|
213
|
-
useComponentStyles as
|
|
892
|
+
Box as Box15,
|
|
893
|
+
useComponentStyles as useComponentStyles10
|
|
214
894
|
} from "@marigold/system";
|
|
215
895
|
var Card = ({
|
|
216
896
|
children,
|
|
@@ -225,214 +905,59 @@ var Card = ({
|
|
|
225
905
|
pr,
|
|
226
906
|
...props
|
|
227
907
|
}) => {
|
|
228
|
-
const styles =
|
|
229
|
-
return /* @__PURE__ */
|
|
908
|
+
const styles = useComponentStyles10("Card", { variant, size });
|
|
909
|
+
return /* @__PURE__ */ React23.createElement(Box15, { ...props, css: [styles, { p, px, py, pt, pb, pl, pr }] }, children);
|
|
230
910
|
};
|
|
231
911
|
|
|
232
912
|
// src/Center/Center.tsx
|
|
233
|
-
import
|
|
913
|
+
import React24 from "react";
|
|
234
914
|
var Center = ({
|
|
235
|
-
maxWidth,
|
|
236
|
-
space = "none",
|
|
237
|
-
children,
|
|
238
|
-
...props
|
|
239
|
-
}) => /* @__PURE__ */ React8.createElement(
|
|
240
|
-
Box,
|
|
241
|
-
{
|
|
242
|
-
css: {
|
|
243
|
-
boxSizing: "content-box",
|
|
244
|
-
display: "flex",
|
|
245
|
-
flexDirection: "column",
|
|
246
|
-
alignItems: "center",
|
|
247
|
-
justifyContent: "center",
|
|
248
|
-
marginInline: "auto",
|
|
249
|
-
maxInlineSize: maxWidth,
|
|
250
|
-
gap: space
|
|
251
|
-
},
|
|
252
|
-
...props
|
|
253
|
-
},
|
|
254
|
-
children
|
|
255
|
-
);
|
|
256
|
-
|
|
257
|
-
// src/Checkbox/Checkbox.tsx
|
|
258
|
-
import React14, { forwardRef as forwardRef2 } from "react";
|
|
259
|
-
import { useCheckbox, useCheckboxGroupItem } from "@react-aria/checkbox";
|
|
260
|
-
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
261
|
-
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
262
|
-
import { useObjectRef as useObjectRef2 } from "@react-aria/utils";
|
|
263
|
-
import { useToggleState } from "@react-stately/toggle";
|
|
264
|
-
import {
|
|
265
|
-
Box as Box9,
|
|
266
|
-
useComponentStyles as useComponentStyles8,
|
|
267
|
-
useStateProps as useStateProps3
|
|
268
|
-
} from "@marigold/system";
|
|
269
|
-
|
|
270
|
-
// src/Checkbox/CheckboxGroup.tsx
|
|
271
|
-
import React13, { createContext as createContext2, useContext as useContext2 } from "react";
|
|
272
|
-
import { useCheckboxGroup } from "@react-aria/checkbox";
|
|
273
|
-
import {
|
|
274
|
-
useCheckboxGroupState
|
|
275
|
-
} from "@react-stately/checkbox";
|
|
276
|
-
import { Box as Box8, useStateProps as useStateProps2 } from "@marigold/system";
|
|
277
|
-
|
|
278
|
-
// src/FieldBase/FieldBase.tsx
|
|
279
|
-
import React12 from "react";
|
|
280
|
-
import {
|
|
281
|
-
Box as Box7,
|
|
282
|
-
useComponentStyles as useComponentStyles7
|
|
283
|
-
} from "@marigold/system";
|
|
284
|
-
|
|
285
|
-
// src/Label/Label.tsx
|
|
286
|
-
import React9 from "react";
|
|
287
|
-
import { Box as Box5, SVG, useComponentStyles as useComponentStyles5 } from "@marigold/system";
|
|
288
|
-
var Label = ({
|
|
289
|
-
as = "label",
|
|
290
|
-
required,
|
|
291
|
-
children,
|
|
292
|
-
variant,
|
|
293
|
-
size,
|
|
294
|
-
labelWidth,
|
|
295
|
-
...props
|
|
296
|
-
}) => {
|
|
297
|
-
const styles = useComponentStyles5("Label", { size, variant });
|
|
298
|
-
return /* @__PURE__ */ React9.createElement(
|
|
299
|
-
Box5,
|
|
300
|
-
{
|
|
301
|
-
...props,
|
|
302
|
-
as,
|
|
303
|
-
"aria-required": required,
|
|
304
|
-
__baseCSS: {
|
|
305
|
-
display: "flex",
|
|
306
|
-
width: labelWidth
|
|
307
|
-
},
|
|
308
|
-
css: styles
|
|
309
|
-
},
|
|
310
|
-
children,
|
|
311
|
-
required && /* @__PURE__ */ React9.createElement(SVG, { viewBox: "0 0 24 24", role: "presentation", size: 16, fill: "error" }, /* @__PURE__ */ React9.createElement("path", { d: "M10.8 3.84003H13.2V9.85259L18.1543 7.01815L19.3461 9.10132L14.3584 11.9549L19.3371 14.7999L18.1463 16.8836L13.2 14.0572V20.16H10.8V13.9907L5.76116 16.8735L4.56935 14.7903L9.5232 11.9561L4.56 9.12003L5.75073 7.03624L10.8 9.92154V3.84003Z" }))
|
|
312
|
-
);
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
// src/HelpText/HelpText.tsx
|
|
316
|
-
import React10 from "react";
|
|
317
|
-
import {
|
|
318
|
-
Box as Box6,
|
|
319
|
-
SVG as SVG2,
|
|
320
|
-
useComponentStyles as useComponentStyles6
|
|
321
|
-
} from "@marigold/system";
|
|
322
|
-
var HelpText = ({
|
|
323
|
-
variant,
|
|
324
|
-
size,
|
|
325
|
-
disabled,
|
|
326
|
-
description,
|
|
327
|
-
descriptionProps,
|
|
328
|
-
error,
|
|
329
|
-
errorMessage,
|
|
330
|
-
errorMessageProps,
|
|
331
|
-
...props
|
|
332
|
-
}) => {
|
|
333
|
-
var _a;
|
|
334
|
-
const hasErrorMessage = errorMessage && error;
|
|
335
|
-
const styles = useComponentStyles6(
|
|
336
|
-
"HelpText",
|
|
337
|
-
{ variant, size },
|
|
338
|
-
{ parts: ["container", "icon"] }
|
|
339
|
-
);
|
|
340
|
-
return /* @__PURE__ */ React10.createElement(
|
|
341
|
-
Box6,
|
|
342
|
-
{
|
|
343
|
-
...hasErrorMessage ? errorMessageProps : descriptionProps,
|
|
344
|
-
...props,
|
|
345
|
-
__baseCSS: { display: "flex", alignItems: "center", gap: 4 },
|
|
346
|
-
css: styles.container
|
|
347
|
-
},
|
|
348
|
-
hasErrorMessage ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
|
|
349
|
-
SVG2,
|
|
350
|
-
{
|
|
351
|
-
viewBox: "0 0 24 24",
|
|
352
|
-
role: "presentation",
|
|
353
|
-
size: ((_a = styles == null ? void 0 : styles.icon) == null ? void 0 : _a.size) || 16
|
|
354
|
-
},
|
|
355
|
-
/* @__PURE__ */ React10.createElement("path", { d: "M2.25 20.3097H21.75L12 3.46875L2.25 20.3097ZM12.8864 17.2606H11.1136V15.4879H12.8864V17.2606ZM12.8864 13.7151H11.1136V10.1697H12.8864V13.7151Z" })
|
|
356
|
-
), errorMessage) : /* @__PURE__ */ React10.createElement(React10.Fragment, null, description)
|
|
357
|
-
);
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
// src/FieldBase/FieldGroup.tsx
|
|
361
|
-
import React11 from "react";
|
|
362
|
-
import { createContext, useContext } from "react";
|
|
363
|
-
var FieldGroupContext = createContext({});
|
|
364
|
-
var useFieldGroupContext = () => useContext(FieldGroupContext);
|
|
365
|
-
var FieldGroup = ({ labelWidth, children }) => {
|
|
366
|
-
return /* @__PURE__ */ React11.createElement(FieldGroupContext.Provider, { value: { labelWidth } }, children);
|
|
367
|
-
};
|
|
368
|
-
|
|
369
|
-
// src/FieldBase/FieldBase.tsx
|
|
370
|
-
var FieldBase = ({
|
|
371
|
-
children,
|
|
372
|
-
variant,
|
|
373
|
-
size,
|
|
374
|
-
width = "100%",
|
|
375
|
-
disabled,
|
|
376
|
-
required,
|
|
377
|
-
label,
|
|
378
|
-
labelProps,
|
|
379
|
-
description,
|
|
380
|
-
descriptionProps,
|
|
381
|
-
error,
|
|
382
|
-
errorMessage,
|
|
383
|
-
errorMessageProps,
|
|
384
|
-
stateProps,
|
|
915
|
+
maxWidth,
|
|
916
|
+
space = "none",
|
|
917
|
+
children,
|
|
385
918
|
...props
|
|
386
|
-
}) =>
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
position: "relative"
|
|
399
|
-
},
|
|
400
|
-
css: style
|
|
919
|
+
}) => /* @__PURE__ */ React24.createElement(
|
|
920
|
+
Box,
|
|
921
|
+
{
|
|
922
|
+
css: {
|
|
923
|
+
boxSizing: "content-box",
|
|
924
|
+
display: "flex",
|
|
925
|
+
flexDirection: "column",
|
|
926
|
+
alignItems: "center",
|
|
927
|
+
justifyContent: "center",
|
|
928
|
+
marginInline: "auto",
|
|
929
|
+
maxInlineSize: maxWidth,
|
|
930
|
+
gap: space
|
|
401
931
|
},
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
size,
|
|
420
|
-
disabled,
|
|
421
|
-
description,
|
|
422
|
-
descriptionProps,
|
|
423
|
-
error,
|
|
424
|
-
errorMessage,
|
|
425
|
-
errorMessageProps
|
|
426
|
-
}
|
|
427
|
-
))
|
|
428
|
-
);
|
|
429
|
-
};
|
|
932
|
+
...props
|
|
933
|
+
},
|
|
934
|
+
children
|
|
935
|
+
);
|
|
936
|
+
|
|
937
|
+
// src/Checkbox/Checkbox.tsx
|
|
938
|
+
import React26, { forwardRef as forwardRef7 } from "react";
|
|
939
|
+
import { useCheckbox, useCheckboxGroupItem } from "@react-aria/checkbox";
|
|
940
|
+
import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
941
|
+
import { useHover as useHover3 } from "@react-aria/interactions";
|
|
942
|
+
import { useObjectRef as useObjectRef5 } from "@react-aria/utils";
|
|
943
|
+
import { useToggleState } from "@react-stately/toggle";
|
|
944
|
+
import {
|
|
945
|
+
Box as Box17,
|
|
946
|
+
useComponentStyles as useComponentStyles11,
|
|
947
|
+
useStateProps as useStateProps5
|
|
948
|
+
} from "@marigold/system";
|
|
430
949
|
|
|
431
950
|
// src/Checkbox/CheckboxGroup.tsx
|
|
432
|
-
|
|
951
|
+
import React25, { createContext as createContext3, useContext as useContext3 } from "react";
|
|
952
|
+
import { useCheckboxGroup } from "@react-aria/checkbox";
|
|
953
|
+
import {
|
|
954
|
+
useCheckboxGroupState
|
|
955
|
+
} from "@react-stately/checkbox";
|
|
956
|
+
import { Box as Box16, useStateProps as useStateProps4 } from "@marigold/system";
|
|
957
|
+
var CheckboxGroupContext = createContext3(
|
|
433
958
|
null
|
|
434
959
|
);
|
|
435
|
-
var useCheckboxGroupContext = () =>
|
|
960
|
+
var useCheckboxGroupContext = () => useContext3(CheckboxGroupContext);
|
|
436
961
|
var CheckboxGroup = ({
|
|
437
962
|
children,
|
|
438
963
|
required,
|
|
@@ -450,12 +975,12 @@ var CheckboxGroup = ({
|
|
|
450
975
|
};
|
|
451
976
|
const state = useCheckboxGroupState(props);
|
|
452
977
|
const { groupProps, labelProps, descriptionProps, errorMessageProps } = useCheckboxGroup(props, state);
|
|
453
|
-
const stateProps =
|
|
978
|
+
const stateProps = useStateProps4({
|
|
454
979
|
disabled,
|
|
455
980
|
readOnly,
|
|
456
981
|
error
|
|
457
982
|
});
|
|
458
|
-
return /* @__PURE__ */
|
|
983
|
+
return /* @__PURE__ */ React25.createElement(
|
|
459
984
|
FieldBase,
|
|
460
985
|
{
|
|
461
986
|
label: props.label,
|
|
@@ -470,8 +995,8 @@ var CheckboxGroup = ({
|
|
|
470
995
|
required,
|
|
471
996
|
...groupProps
|
|
472
997
|
},
|
|
473
|
-
/* @__PURE__ */
|
|
474
|
-
|
|
998
|
+
/* @__PURE__ */ React25.createElement(
|
|
999
|
+
Box16,
|
|
475
1000
|
{
|
|
476
1001
|
role: "presentation",
|
|
477
1002
|
__baseCSS: {
|
|
@@ -480,13 +1005,13 @@ var CheckboxGroup = ({
|
|
|
480
1005
|
alignItems: "start"
|
|
481
1006
|
}
|
|
482
1007
|
},
|
|
483
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ React25.createElement(CheckboxGroupContext.Provider, { value: { error, ...state } }, children)
|
|
484
1009
|
)
|
|
485
1010
|
);
|
|
486
1011
|
};
|
|
487
1012
|
|
|
488
1013
|
// src/Checkbox/Checkbox.tsx
|
|
489
|
-
var CheckMark = () => /* @__PURE__ */
|
|
1014
|
+
var CheckMark = () => /* @__PURE__ */ React26.createElement("svg", { viewBox: "0 0 12 10" }, /* @__PURE__ */ React26.createElement(
|
|
490
1015
|
"path",
|
|
491
1016
|
{
|
|
492
1017
|
fill: "currentColor",
|
|
@@ -494,7 +1019,7 @@ var CheckMark = () => /* @__PURE__ */ React14.createElement("svg", { viewBox: "0
|
|
|
494
1019
|
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"
|
|
495
1020
|
}
|
|
496
1021
|
));
|
|
497
|
-
var IndeterminateMark = () => /* @__PURE__ */
|
|
1022
|
+
var IndeterminateMark = () => /* @__PURE__ */ React26.createElement("svg", { width: "12", height: "3", viewBox: "0 0 12 3" }, /* @__PURE__ */ React26.createElement(
|
|
498
1023
|
"path",
|
|
499
1024
|
{
|
|
500
1025
|
fill: "currentColor",
|
|
@@ -502,8 +1027,8 @@ var IndeterminateMark = () => /* @__PURE__ */ React14.createElement("svg", { wid
|
|
|
502
1027
|
d: "M11.5 2.04018H0.5V0.46875H11.5V2.04018Z"
|
|
503
1028
|
}
|
|
504
1029
|
));
|
|
505
|
-
var Icon = ({ css, checked, indeterminate, ...props }) => /* @__PURE__ */
|
|
506
|
-
|
|
1030
|
+
var Icon = ({ css, checked, indeterminate, ...props }) => /* @__PURE__ */ React26.createElement(
|
|
1031
|
+
Box17,
|
|
507
1032
|
{
|
|
508
1033
|
"aria-hidden": "true",
|
|
509
1034
|
__baseCSS: {
|
|
@@ -521,9 +1046,9 @@ var Icon = ({ css, checked, indeterminate, ...props }) => /* @__PURE__ */ React1
|
|
|
521
1046
|
css,
|
|
522
1047
|
...props
|
|
523
1048
|
},
|
|
524
|
-
indeterminate ? /* @__PURE__ */
|
|
1049
|
+
indeterminate ? /* @__PURE__ */ React26.createElement(IndeterminateMark, null) : checked ? /* @__PURE__ */ React26.createElement(CheckMark, null) : null
|
|
525
1050
|
);
|
|
526
|
-
var Checkbox =
|
|
1051
|
+
var Checkbox = forwardRef7(
|
|
527
1052
|
({
|
|
528
1053
|
size,
|
|
529
1054
|
variant,
|
|
@@ -536,7 +1061,7 @@ var Checkbox = forwardRef2(
|
|
|
536
1061
|
error,
|
|
537
1062
|
...props
|
|
538
1063
|
}, ref) => {
|
|
539
|
-
const inputRef =
|
|
1064
|
+
const inputRef = useObjectRef5(ref);
|
|
540
1065
|
const checkboxProps = {
|
|
541
1066
|
isIndeterminate: indeterminate,
|
|
542
1067
|
isDisabled: disabled,
|
|
@@ -572,7 +1097,7 @@ var Checkbox = forwardRef2(
|
|
|
572
1097
|
}),
|
|
573
1098
|
inputRef
|
|
574
1099
|
);
|
|
575
|
-
const styles =
|
|
1100
|
+
const styles = useComponentStyles11(
|
|
576
1101
|
"Checkbox",
|
|
577
1102
|
{
|
|
578
1103
|
variant,
|
|
@@ -580,9 +1105,9 @@ var Checkbox = forwardRef2(
|
|
|
580
1105
|
},
|
|
581
1106
|
{ parts: ["container", "label", "checkbox"] }
|
|
582
1107
|
);
|
|
583
|
-
const { hoverProps, isHovered } =
|
|
584
|
-
const { isFocusVisible, focusProps } =
|
|
585
|
-
const stateProps =
|
|
1108
|
+
const { hoverProps, isHovered } = useHover3({});
|
|
1109
|
+
const { isFocusVisible, focusProps } = useFocusRing3();
|
|
1110
|
+
const stateProps = useStateProps5({
|
|
586
1111
|
hover: isHovered,
|
|
587
1112
|
focus: isFocusVisible,
|
|
588
1113
|
checked: inputProps.checked,
|
|
@@ -591,8 +1116,8 @@ var Checkbox = forwardRef2(
|
|
|
591
1116
|
readOnly,
|
|
592
1117
|
indeterminate
|
|
593
1118
|
});
|
|
594
|
-
return /* @__PURE__ */
|
|
595
|
-
|
|
1119
|
+
return /* @__PURE__ */ React26.createElement(
|
|
1120
|
+
Box17,
|
|
596
1121
|
{
|
|
597
1122
|
as: "label",
|
|
598
1123
|
__baseCSS: {
|
|
@@ -605,8 +1130,8 @@ var Checkbox = forwardRef2(
|
|
|
605
1130
|
...hoverProps,
|
|
606
1131
|
...stateProps
|
|
607
1132
|
},
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
|
|
1133
|
+
/* @__PURE__ */ React26.createElement(
|
|
1134
|
+
Box17,
|
|
610
1135
|
{
|
|
611
1136
|
as: "input",
|
|
612
1137
|
ref: inputRef,
|
|
@@ -624,7 +1149,7 @@ var Checkbox = forwardRef2(
|
|
|
624
1149
|
...focusProps
|
|
625
1150
|
}
|
|
626
1151
|
),
|
|
627
|
-
/* @__PURE__ */
|
|
1152
|
+
/* @__PURE__ */ React26.createElement(
|
|
628
1153
|
Icon,
|
|
629
1154
|
{
|
|
630
1155
|
checked: inputProps.checked,
|
|
@@ -633,13 +1158,13 @@ var Checkbox = forwardRef2(
|
|
|
633
1158
|
...stateProps
|
|
634
1159
|
}
|
|
635
1160
|
),
|
|
636
|
-
props.children && /* @__PURE__ */
|
|
1161
|
+
props.children && /* @__PURE__ */ React26.createElement(Box17, { css: styles.label, ...stateProps }, props.children)
|
|
637
1162
|
);
|
|
638
1163
|
}
|
|
639
1164
|
);
|
|
640
1165
|
|
|
641
1166
|
// src/Columns/Columns.tsx
|
|
642
|
-
import
|
|
1167
|
+
import React27, {
|
|
643
1168
|
Children,
|
|
644
1169
|
cloneElement,
|
|
645
1170
|
isValidElement
|
|
@@ -659,7 +1184,7 @@ var Columns = ({
|
|
|
659
1184
|
)}`
|
|
660
1185
|
);
|
|
661
1186
|
}
|
|
662
|
-
return /* @__PURE__ */
|
|
1187
|
+
return /* @__PURE__ */ React27.createElement(
|
|
663
1188
|
Box,
|
|
664
1189
|
{
|
|
665
1190
|
css: {
|
|
@@ -678,7 +1203,7 @@ var Columns = ({
|
|
|
678
1203
|
},
|
|
679
1204
|
...props
|
|
680
1205
|
},
|
|
681
|
-
Children.map(children, (child, idx) => /* @__PURE__ */
|
|
1206
|
+
Children.map(children, (child, idx) => /* @__PURE__ */ React27.createElement(
|
|
682
1207
|
Box,
|
|
683
1208
|
{
|
|
684
1209
|
css: {
|
|
@@ -692,7 +1217,7 @@ var Columns = ({
|
|
|
692
1217
|
};
|
|
693
1218
|
|
|
694
1219
|
// src/Container/Container.tsx
|
|
695
|
-
import
|
|
1220
|
+
import React28 from "react";
|
|
696
1221
|
import { size as tokenSize } from "@marigold/tokens";
|
|
697
1222
|
var ALIGN_ITEMS = {
|
|
698
1223
|
left: "start",
|
|
@@ -723,7 +1248,7 @@ var Container = ({
|
|
|
723
1248
|
...props
|
|
724
1249
|
}) => {
|
|
725
1250
|
const maxWidth = tokenSize[contentType][size];
|
|
726
|
-
return /* @__PURE__ */
|
|
1251
|
+
return /* @__PURE__ */ React28.createElement(
|
|
727
1252
|
Box,
|
|
728
1253
|
{
|
|
729
1254
|
css: {
|
|
@@ -741,29 +1266,29 @@ var Container = ({
|
|
|
741
1266
|
};
|
|
742
1267
|
|
|
743
1268
|
// src/Dialog/Dialog.tsx
|
|
744
|
-
import
|
|
745
|
-
import { useButton as
|
|
1269
|
+
import React33, { useRef as useRef7 } from "react";
|
|
1270
|
+
import { useButton as useButton3 } from "@react-aria/button";
|
|
746
1271
|
import { useDialog } from "@react-aria/dialog";
|
|
747
1272
|
import {
|
|
748
|
-
Box as
|
|
749
|
-
useComponentStyles as
|
|
1273
|
+
Box as Box19,
|
|
1274
|
+
useComponentStyles as useComponentStyles14
|
|
750
1275
|
} from "@marigold/system";
|
|
751
1276
|
|
|
752
1277
|
// src/Header/Header.tsx
|
|
753
|
-
import
|
|
1278
|
+
import React29 from "react";
|
|
754
1279
|
import {
|
|
755
|
-
useComponentStyles as
|
|
1280
|
+
useComponentStyles as useComponentStyles12
|
|
756
1281
|
} from "@marigold/system";
|
|
757
1282
|
var Header = ({ children, variant, size, ...props }) => {
|
|
758
|
-
const styles =
|
|
759
|
-
return /* @__PURE__ */
|
|
1283
|
+
const styles = useComponentStyles12("Header", { variant, size });
|
|
1284
|
+
return /* @__PURE__ */ React29.createElement(Box, { as: "header", ...props, css: styles }, children);
|
|
760
1285
|
};
|
|
761
1286
|
|
|
762
1287
|
// src/Headline/Headline.tsx
|
|
763
|
-
import
|
|
1288
|
+
import React30 from "react";
|
|
764
1289
|
import {
|
|
765
|
-
Box as
|
|
766
|
-
useComponentStyles as
|
|
1290
|
+
Box as Box18,
|
|
1291
|
+
useComponentStyles as useComponentStyles13
|
|
767
1292
|
} from "@marigold/system";
|
|
768
1293
|
var Headline = ({
|
|
769
1294
|
children,
|
|
@@ -774,12 +1299,12 @@ var Headline = ({
|
|
|
774
1299
|
level = "1",
|
|
775
1300
|
...props
|
|
776
1301
|
}) => {
|
|
777
|
-
const styles =
|
|
1302
|
+
const styles = useComponentStyles13("Headline", {
|
|
778
1303
|
variant,
|
|
779
1304
|
size: size != null ? size : `level-${level}`
|
|
780
1305
|
});
|
|
781
|
-
return /* @__PURE__ */
|
|
782
|
-
|
|
1306
|
+
return /* @__PURE__ */ React30.createElement(
|
|
1307
|
+
Box18,
|
|
783
1308
|
{
|
|
784
1309
|
as: `h${level}`,
|
|
785
1310
|
...props,
|
|
@@ -790,216 +1315,24 @@ var Headline = ({
|
|
|
790
1315
|
};
|
|
791
1316
|
|
|
792
1317
|
// src/Dialog/Context.ts
|
|
793
|
-
import { createContext as
|
|
794
|
-
var DialogContext =
|
|
795
|
-
var useDialogContext = () =>
|
|
1318
|
+
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
1319
|
+
var DialogContext = createContext4({});
|
|
1320
|
+
var useDialogContext = () => useContext4(DialogContext);
|
|
796
1321
|
|
|
797
1322
|
// src/Dialog/DialogTrigger.tsx
|
|
798
|
-
import
|
|
1323
|
+
import React31, { useRef as useRef6 } from "react";
|
|
799
1324
|
import { PressResponder } from "@react-aria/interactions";
|
|
800
1325
|
import { useOverlayTriggerState } from "@react-stately/overlays";
|
|
801
|
-
|
|
802
|
-
// src/Overlay/Modal.tsx
|
|
803
|
-
import React20, { forwardRef as forwardRef3 } from "react";
|
|
804
|
-
import { FocusScope } from "@react-aria/focus";
|
|
805
|
-
import { useModal, useOverlay, usePreventScroll } from "@react-aria/overlays";
|
|
806
|
-
import { mergeProps as mergeProps2, useObjectRef as useObjectRef3 } from "@react-aria/utils";
|
|
807
|
-
|
|
808
|
-
// src/Overlay/Underlay.tsx
|
|
809
|
-
import React19 from "react";
|
|
810
|
-
import { Box as Box11, useComponentStyles as useComponentStyles11 } from "@marigold/system";
|
|
811
|
-
var Underlay = ({ size, variant, ...props }) => {
|
|
812
|
-
const styles = useComponentStyles11("Underlay", { size, variant });
|
|
813
|
-
return /* @__PURE__ */ React19.createElement(
|
|
814
|
-
Box11,
|
|
815
|
-
{
|
|
816
|
-
__baseCSS: {
|
|
817
|
-
position: "fixed",
|
|
818
|
-
inset: 0,
|
|
819
|
-
zIndex: 1
|
|
820
|
-
},
|
|
821
|
-
css: styles,
|
|
822
|
-
...props
|
|
823
|
-
}
|
|
824
|
-
);
|
|
825
|
-
};
|
|
826
|
-
|
|
827
|
-
// src/Overlay/Modal.tsx
|
|
828
|
-
var Modal = forwardRef3(
|
|
829
|
-
({ children, open, dismissable, keyboardDismissable, onClose, ...props }, ref) => {
|
|
830
|
-
const modalRef = useObjectRef3(ref);
|
|
831
|
-
const { overlayProps, underlayProps } = useOverlay(
|
|
832
|
-
{
|
|
833
|
-
isOpen: open,
|
|
834
|
-
onClose,
|
|
835
|
-
isDismissable: dismissable,
|
|
836
|
-
isKeyboardDismissDisabled: !keyboardDismissable
|
|
837
|
-
},
|
|
838
|
-
modalRef
|
|
839
|
-
);
|
|
840
|
-
usePreventScroll();
|
|
841
|
-
const { modalProps } = useModal({});
|
|
842
|
-
return /* @__PURE__ */ React20.createElement(FocusScope, { contain: true, restoreFocus: true, autoFocus: true }, /* @__PURE__ */ React20.createElement(Underlay, { ...underlayProps, variant: "modal" }), /* @__PURE__ */ React20.createElement(
|
|
843
|
-
"div",
|
|
844
|
-
{
|
|
845
|
-
style: {
|
|
846
|
-
display: "flex",
|
|
847
|
-
alignItems: "center",
|
|
848
|
-
justifyContent: "center",
|
|
849
|
-
position: "fixed",
|
|
850
|
-
inset: 0,
|
|
851
|
-
zIndex: 2,
|
|
852
|
-
pointerEvents: "none"
|
|
853
|
-
},
|
|
854
|
-
ref: modalRef,
|
|
855
|
-
...mergeProps2(props, overlayProps, modalProps)
|
|
856
|
-
},
|
|
857
|
-
/* @__PURE__ */ React20.createElement("div", { style: { pointerEvents: "auto" } }, children)
|
|
858
|
-
));
|
|
859
|
-
}
|
|
860
|
-
);
|
|
861
|
-
|
|
862
|
-
// src/Overlay/Overlay.tsx
|
|
863
|
-
import React21, { useRef } from "react";
|
|
864
|
-
import { Transition } from "react-transition-group";
|
|
865
|
-
import {
|
|
866
|
-
Overlay as ReactAriaOverlay
|
|
867
|
-
} from "@react-aria/overlays";
|
|
868
|
-
var duration = 300;
|
|
869
|
-
var defaultStyle = {
|
|
870
|
-
transition: `opacity ${duration}ms ease-in-out`,
|
|
871
|
-
opacity: 0
|
|
872
|
-
};
|
|
873
|
-
var transitionStyles = {
|
|
874
|
-
entering: { opacity: 1 },
|
|
875
|
-
entered: { opacity: 1 },
|
|
876
|
-
exiting: { opacity: 0 },
|
|
877
|
-
exited: { opacity: 0 },
|
|
878
|
-
unmounted: { opacity: 0 }
|
|
879
|
-
};
|
|
880
|
-
var Overlay = ({ children, container, open }) => {
|
|
881
|
-
const nodeRef = useRef(null);
|
|
882
|
-
let mountOverlay = open;
|
|
883
|
-
if (!mountOverlay) {
|
|
884
|
-
return null;
|
|
885
|
-
}
|
|
886
|
-
return /* @__PURE__ */ React21.createElement(ReactAriaOverlay, { portalContainer: container }, /* @__PURE__ */ React21.createElement(Transition, { nodeRef, timeout: duration, in: open, appear: true }, (state) => /* @__PURE__ */ React21.createElement(
|
|
887
|
-
"div",
|
|
888
|
-
{
|
|
889
|
-
ref: nodeRef,
|
|
890
|
-
"data-testid": "overlay",
|
|
891
|
-
style: {
|
|
892
|
-
...defaultStyle,
|
|
893
|
-
...transitionStyles[state]
|
|
894
|
-
}
|
|
895
|
-
},
|
|
896
|
-
children
|
|
897
|
-
)));
|
|
898
|
-
};
|
|
899
|
-
|
|
900
|
-
// src/Overlay/Popover.tsx
|
|
901
|
-
import React22, { forwardRef as forwardRef4 } from "react";
|
|
902
|
-
import {
|
|
903
|
-
DismissButton,
|
|
904
|
-
usePopover
|
|
905
|
-
} from "@react-aria/overlays";
|
|
906
|
-
import { useObjectRef as useObjectRef4 } from "@react-aria/utils";
|
|
907
|
-
import { FocusScope as FocusScope2 } from "@react-aria/focus";
|
|
908
|
-
var Popover = forwardRef4(
|
|
909
|
-
(props, ref) => {
|
|
910
|
-
const popoverRef = useObjectRef4(ref);
|
|
911
|
-
let { children, state, ...otherProps } = props;
|
|
912
|
-
return /* @__PURE__ */ React22.createElement(Overlay, { open: state.isOpen, ...otherProps }, /* @__PURE__ */ React22.createElement(PopoverWrapper, { ref: popoverRef, ...props }, children));
|
|
913
|
-
}
|
|
914
|
-
);
|
|
915
|
-
var PopoverWrapper = forwardRef4(
|
|
916
|
-
({
|
|
917
|
-
children,
|
|
918
|
-
isNonModal,
|
|
919
|
-
state,
|
|
920
|
-
keyboardDismissDisabled,
|
|
921
|
-
...props
|
|
922
|
-
}, ref) => {
|
|
923
|
-
const { popoverProps, underlayProps } = usePopover(
|
|
924
|
-
{
|
|
925
|
-
...props,
|
|
926
|
-
isNonModal,
|
|
927
|
-
isKeyboardDismissDisabled: keyboardDismissDisabled,
|
|
928
|
-
popoverRef: ref,
|
|
929
|
-
placement: "bottom left"
|
|
930
|
-
},
|
|
931
|
-
state
|
|
932
|
-
);
|
|
933
|
-
return /* @__PURE__ */ React22.createElement(FocusScope2, { restoreFocus: true }, !isNonModal && /* @__PURE__ */ React22.createElement(Underlay, { ...underlayProps }), /* @__PURE__ */ React22.createElement(
|
|
934
|
-
"div",
|
|
935
|
-
{
|
|
936
|
-
...popoverProps,
|
|
937
|
-
style: {
|
|
938
|
-
...popoverProps.style,
|
|
939
|
-
minWidth: props.triggerRef.current ? props.triggerRef.current.offsetWidth : void 0
|
|
940
|
-
},
|
|
941
|
-
ref,
|
|
942
|
-
role: "presentation"
|
|
943
|
-
},
|
|
944
|
-
!isNonModal && /* @__PURE__ */ React22.createElement(DismissButton, { onDismiss: state.close }),
|
|
945
|
-
children,
|
|
946
|
-
/* @__PURE__ */ React22.createElement(DismissButton, { onDismiss: state.close })
|
|
947
|
-
));
|
|
948
|
-
}
|
|
949
|
-
);
|
|
950
|
-
|
|
951
|
-
// src/Overlay/Tray.tsx
|
|
952
|
-
import React23 from "react";
|
|
953
|
-
import { Box as Box12 } from "@marigold/system";
|
|
954
|
-
import { FocusScope as FocusScope3 } from "@react-aria/focus";
|
|
955
|
-
import {
|
|
956
|
-
DismissButton as DismissButton2,
|
|
957
|
-
useModalOverlay
|
|
958
|
-
} from "@react-aria/overlays";
|
|
959
|
-
import { useObjectRef as useObjectRef5 } from "@react-aria/utils";
|
|
960
|
-
import { forwardRef as forwardRef5 } from "react";
|
|
961
|
-
var Tray = forwardRef5(
|
|
962
|
-
({ state, children, ...props }, ref) => {
|
|
963
|
-
const trayRef = useObjectRef5(ref);
|
|
964
|
-
return /* @__PURE__ */ React23.createElement(Overlay, { open: state.isOpen }, /* @__PURE__ */ React23.createElement(TrayWrapper, { state, ...props, ref: trayRef }, children));
|
|
965
|
-
}
|
|
966
|
-
);
|
|
967
|
-
var TrayWrapper = forwardRef5(
|
|
968
|
-
({ children, state, ...props }, ref) => {
|
|
969
|
-
let { modalProps, underlayProps } = useModalOverlay(
|
|
970
|
-
{
|
|
971
|
-
...props,
|
|
972
|
-
isDismissable: true
|
|
973
|
-
},
|
|
974
|
-
state,
|
|
975
|
-
ref
|
|
976
|
-
);
|
|
977
|
-
return /* @__PURE__ */ React23.createElement(FocusScope3, { contain: true, restoreFocus: true, autoFocus: true }, /* @__PURE__ */ React23.createElement(Underlay, { ...underlayProps, variant: "modal" }, /* @__PURE__ */ React23.createElement(
|
|
978
|
-
Box12,
|
|
979
|
-
{
|
|
980
|
-
...modalProps,
|
|
981
|
-
ref,
|
|
982
|
-
__baseCSS: { position: "absolute", width: "100%", bottom: 0 },
|
|
983
|
-
"data-testid": "tray"
|
|
984
|
-
},
|
|
985
|
-
/* @__PURE__ */ React23.createElement(DismissButton2, { onDismiss: state.close }),
|
|
986
|
-
children,
|
|
987
|
-
/* @__PURE__ */ React23.createElement(DismissButton2, { onDismiss: state.close })
|
|
988
|
-
)));
|
|
989
|
-
}
|
|
990
|
-
);
|
|
991
|
-
|
|
992
|
-
// src/Dialog/DialogTrigger.tsx
|
|
993
1326
|
var DialogTrigger = ({
|
|
994
1327
|
children,
|
|
995
1328
|
dismissable = true,
|
|
996
1329
|
keyboardDismissable = true
|
|
997
1330
|
}) => {
|
|
998
|
-
const [dialogTrigger, dialog] =
|
|
999
|
-
const dialogTriggerRef =
|
|
1331
|
+
const [dialogTrigger, dialog] = React31.Children.toArray(children);
|
|
1332
|
+
const dialogTriggerRef = useRef6(null);
|
|
1000
1333
|
const state = useOverlayTriggerState({});
|
|
1001
1334
|
const ctx = { open: state.isOpen, close: state.close };
|
|
1002
|
-
return /* @__PURE__ */
|
|
1335
|
+
return /* @__PURE__ */ React31.createElement(DialogContext.Provider, { value: ctx }, /* @__PURE__ */ React31.createElement(
|
|
1003
1336
|
PressResponder,
|
|
1004
1337
|
{
|
|
1005
1338
|
ref: dialogTriggerRef,
|
|
@@ -1007,7 +1340,7 @@ var DialogTrigger = ({
|
|
|
1007
1340
|
onPress: state.toggle
|
|
1008
1341
|
},
|
|
1009
1342
|
dialogTrigger
|
|
1010
|
-
), /* @__PURE__ */
|
|
1343
|
+
), /* @__PURE__ */ React31.createElement(Overlay, { open: state.isOpen }, /* @__PURE__ */ React31.createElement(
|
|
1011
1344
|
Modal,
|
|
1012
1345
|
{
|
|
1013
1346
|
open: state.isOpen,
|
|
@@ -1021,7 +1354,7 @@ var DialogTrigger = ({
|
|
|
1021
1354
|
|
|
1022
1355
|
// src/Dialog/DialogController.tsx
|
|
1023
1356
|
import { useOverlayTriggerState as useOverlayTriggerState2 } from "@react-stately/overlays";
|
|
1024
|
-
import
|
|
1357
|
+
import React32 from "react";
|
|
1025
1358
|
var DialogController = ({
|
|
1026
1359
|
children,
|
|
1027
1360
|
dismissable = true,
|
|
@@ -1034,7 +1367,7 @@ var DialogController = ({
|
|
|
1034
1367
|
onOpenChange
|
|
1035
1368
|
});
|
|
1036
1369
|
const ctx = { open: state.isOpen, close: state.close };
|
|
1037
|
-
return /* @__PURE__ */
|
|
1370
|
+
return /* @__PURE__ */ React32.createElement(DialogContext.Provider, { value: ctx }, /* @__PURE__ */ React32.createElement(Overlay, { open: state.isOpen }, /* @__PURE__ */ React32.createElement(
|
|
1038
1371
|
Modal,
|
|
1039
1372
|
{
|
|
1040
1373
|
open: state.isOpen,
|
|
@@ -1048,16 +1381,16 @@ var DialogController = ({
|
|
|
1048
1381
|
|
|
1049
1382
|
// src/Dialog/Dialog.tsx
|
|
1050
1383
|
var CloseButton = ({ css }) => {
|
|
1051
|
-
const ref =
|
|
1384
|
+
const ref = useRef7(null);
|
|
1052
1385
|
const { close } = useDialogContext();
|
|
1053
|
-
const { buttonProps } =
|
|
1386
|
+
const { buttonProps } = useButton3(
|
|
1054
1387
|
{
|
|
1055
1388
|
onPress: () => close == null ? void 0 : close()
|
|
1056
1389
|
},
|
|
1057
1390
|
ref
|
|
1058
1391
|
);
|
|
1059
|
-
return /* @__PURE__ */
|
|
1060
|
-
|
|
1392
|
+
return /* @__PURE__ */ React33.createElement(Box19, { css: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React33.createElement(
|
|
1393
|
+
Box19,
|
|
1061
1394
|
{
|
|
1062
1395
|
as: "button",
|
|
1063
1396
|
__baseCSS: {
|
|
@@ -1073,7 +1406,7 @@ var CloseButton = ({ css }) => {
|
|
|
1073
1406
|
ref,
|
|
1074
1407
|
...buttonProps
|
|
1075
1408
|
},
|
|
1076
|
-
/* @__PURE__ */
|
|
1409
|
+
/* @__PURE__ */ React33.createElement("svg", { viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React33.createElement(
|
|
1077
1410
|
"path",
|
|
1078
1411
|
{
|
|
1079
1412
|
fillRule: "evenodd",
|
|
@@ -1084,9 +1417,9 @@ var CloseButton = ({ css }) => {
|
|
|
1084
1417
|
));
|
|
1085
1418
|
};
|
|
1086
1419
|
var addTitleProps = (children, titleProps) => {
|
|
1087
|
-
const childs =
|
|
1420
|
+
const childs = React33.Children.toArray(children);
|
|
1088
1421
|
const titleIndex = childs.findIndex(
|
|
1089
|
-
(child) =>
|
|
1422
|
+
(child) => React33.isValidElement(child) && (child.type === Header || child.type === Headline)
|
|
1090
1423
|
);
|
|
1091
1424
|
if (titleIndex < 0) {
|
|
1092
1425
|
console.warn(
|
|
@@ -1094,7 +1427,7 @@ var addTitleProps = (children, titleProps) => {
|
|
|
1094
1427
|
);
|
|
1095
1428
|
return children;
|
|
1096
1429
|
}
|
|
1097
|
-
const titleChild =
|
|
1430
|
+
const titleChild = React33.cloneElement(
|
|
1098
1431
|
childs[titleIndex],
|
|
1099
1432
|
titleProps
|
|
1100
1433
|
);
|
|
@@ -1108,43 +1441,43 @@ var Dialog = ({
|
|
|
1108
1441
|
closeButton,
|
|
1109
1442
|
...props
|
|
1110
1443
|
}) => {
|
|
1111
|
-
const ref =
|
|
1444
|
+
const ref = useRef7(null);
|
|
1112
1445
|
const { close } = useDialogContext();
|
|
1113
1446
|
const { dialogProps, titleProps } = useDialog(props, ref);
|
|
1114
|
-
const styles =
|
|
1447
|
+
const styles = useComponentStyles14(
|
|
1115
1448
|
"Dialog",
|
|
1116
1449
|
{ variant, size },
|
|
1117
1450
|
{ parts: ["container", "closeButton"] }
|
|
1118
1451
|
);
|
|
1119
|
-
return /* @__PURE__ */
|
|
1452
|
+
return /* @__PURE__ */ React33.createElement(Box19, { __baseCSS: { bg: "#fff" }, css: styles.container, ...dialogProps }, closeButton && /* @__PURE__ */ React33.createElement(CloseButton, { css: styles.closeButton }), typeof children === "function" ? children({ close, titleProps }) : props["aria-labelledby"] ? children : addTitleProps(children, titleProps));
|
|
1120
1453
|
};
|
|
1121
1454
|
Dialog.Trigger = DialogTrigger;
|
|
1122
1455
|
Dialog.Controller = DialogController;
|
|
1123
1456
|
|
|
1124
1457
|
// src/Divider/Divider.tsx
|
|
1125
|
-
import
|
|
1458
|
+
import React34 from "react";
|
|
1126
1459
|
import { useSeparator } from "@react-aria/separator";
|
|
1127
|
-
import { Box as
|
|
1460
|
+
import { Box as Box20, useComponentStyles as useComponentStyles15 } from "@marigold/system";
|
|
1128
1461
|
var Divider = ({ variant, ...props }) => {
|
|
1129
1462
|
const { separatorProps } = useSeparator(props);
|
|
1130
|
-
const styles =
|
|
1131
|
-
return /* @__PURE__ */
|
|
1463
|
+
const styles = useComponentStyles15("Divider", { variant });
|
|
1464
|
+
return /* @__PURE__ */ React34.createElement(Box20, { css: styles, ...props, ...separatorProps });
|
|
1132
1465
|
};
|
|
1133
1466
|
|
|
1134
1467
|
// src/Footer/Footer.tsx
|
|
1135
|
-
import
|
|
1468
|
+
import React35 from "react";
|
|
1136
1469
|
import {
|
|
1137
|
-
useComponentStyles as
|
|
1470
|
+
useComponentStyles as useComponentStyles16
|
|
1138
1471
|
} from "@marigold/system";
|
|
1139
1472
|
var Footer = ({ children, variant, size, ...props }) => {
|
|
1140
|
-
const styles =
|
|
1141
|
-
return /* @__PURE__ */
|
|
1473
|
+
const styles = useComponentStyles16("Footer", { variant, size });
|
|
1474
|
+
return /* @__PURE__ */ React35.createElement(Box, { as: "footer", ...props, css: styles }, children);
|
|
1142
1475
|
};
|
|
1143
1476
|
|
|
1144
1477
|
// src/Image/Image.tsx
|
|
1145
|
-
import
|
|
1146
|
-
import { Box as
|
|
1147
|
-
import { useComponentStyles as
|
|
1478
|
+
import React36 from "react";
|
|
1479
|
+
import { Box as Box21 } from "@marigold/system";
|
|
1480
|
+
import { useComponentStyles as useComponentStyles17 } from "@marigold/system";
|
|
1148
1481
|
var Image = ({
|
|
1149
1482
|
variant,
|
|
1150
1483
|
size,
|
|
@@ -1152,14 +1485,14 @@ var Image = ({
|
|
|
1152
1485
|
position,
|
|
1153
1486
|
...props
|
|
1154
1487
|
}) => {
|
|
1155
|
-
const styles =
|
|
1488
|
+
const styles = useComponentStyles17("Image", { variant, size });
|
|
1156
1489
|
const css = {
|
|
1157
1490
|
...styles,
|
|
1158
1491
|
objectFit: fit,
|
|
1159
1492
|
objectPosition: position
|
|
1160
1493
|
};
|
|
1161
|
-
return /* @__PURE__ */
|
|
1162
|
-
|
|
1494
|
+
return /* @__PURE__ */ React36.createElement(
|
|
1495
|
+
Box21,
|
|
1163
1496
|
{
|
|
1164
1497
|
...props,
|
|
1165
1498
|
as: "img",
|
|
@@ -1170,7 +1503,7 @@ var Image = ({
|
|
|
1170
1503
|
};
|
|
1171
1504
|
|
|
1172
1505
|
// src/Inline/Inline.tsx
|
|
1173
|
-
import
|
|
1506
|
+
import React37 from "react";
|
|
1174
1507
|
var ALIGNMENT_X = {
|
|
1175
1508
|
left: "flex-start",
|
|
1176
1509
|
center: "center",
|
|
@@ -1187,7 +1520,7 @@ var Inline = ({
|
|
|
1187
1520
|
alignY = "center",
|
|
1188
1521
|
children,
|
|
1189
1522
|
...props
|
|
1190
|
-
}) => /* @__PURE__ */
|
|
1523
|
+
}) => /* @__PURE__ */ React37.createElement(
|
|
1191
1524
|
Box,
|
|
1192
1525
|
{
|
|
1193
1526
|
css: {
|
|
@@ -1202,22 +1535,17 @@ var Inline = ({
|
|
|
1202
1535
|
children
|
|
1203
1536
|
);
|
|
1204
1537
|
|
|
1205
|
-
// src/
|
|
1206
|
-
import
|
|
1207
|
-
import { Box as
|
|
1208
|
-
var
|
|
1209
|
-
({ variant, size, type = "text", ...props }, ref) => {
|
|
1210
|
-
const styles = useComponentStyles16("Input", { variant, size });
|
|
1211
|
-
return /* @__PURE__ */ React31.createElement(Box16, { ...props, ref, as: "input", type, css: styles });
|
|
1212
|
-
}
|
|
1213
|
-
);
|
|
1538
|
+
// src/Inset/Inset.tsx
|
|
1539
|
+
import React38 from "react";
|
|
1540
|
+
import { Box as Box22 } from "@marigold/system";
|
|
1541
|
+
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ React38.createElement(Box22, { css: space ? { p: space } : { px: spaceX, py: spaceY } }, children);
|
|
1214
1542
|
|
|
1215
1543
|
// src/Link/Link.tsx
|
|
1216
|
-
import
|
|
1544
|
+
import React39, { forwardRef as forwardRef8 } from "react";
|
|
1217
1545
|
import { useLink } from "@react-aria/link";
|
|
1218
|
-
import { useComponentStyles as
|
|
1546
|
+
import { useComponentStyles as useComponentStyles18 } from "@marigold/system";
|
|
1219
1547
|
import { useObjectRef as useObjectRef6 } from "@react-aria/utils";
|
|
1220
|
-
var Link =
|
|
1548
|
+
var Link = forwardRef8(
|
|
1221
1549
|
({
|
|
1222
1550
|
as = "a",
|
|
1223
1551
|
variant,
|
|
@@ -1237,8 +1565,8 @@ var Link = forwardRef7(
|
|
|
1237
1565
|
},
|
|
1238
1566
|
linkRef
|
|
1239
1567
|
);
|
|
1240
|
-
const styles =
|
|
1241
|
-
return /* @__PURE__ */
|
|
1568
|
+
const styles = useComponentStyles18("Link", { variant, size });
|
|
1569
|
+
return /* @__PURE__ */ React39.createElement(
|
|
1242
1570
|
Box,
|
|
1243
1571
|
{
|
|
1244
1572
|
as,
|
|
@@ -1254,23 +1582,23 @@ var Link = forwardRef7(
|
|
|
1254
1582
|
);
|
|
1255
1583
|
|
|
1256
1584
|
// src/List/List.tsx
|
|
1257
|
-
import
|
|
1585
|
+
import React41 from "react";
|
|
1258
1586
|
import {
|
|
1259
|
-
Box as
|
|
1260
|
-
useComponentStyles as
|
|
1587
|
+
Box as Box24,
|
|
1588
|
+
useComponentStyles as useComponentStyles19
|
|
1261
1589
|
} from "@marigold/system";
|
|
1262
1590
|
|
|
1263
1591
|
// src/List/Context.ts
|
|
1264
|
-
import { createContext as
|
|
1265
|
-
var ListContext =
|
|
1266
|
-
var useListContext = () =>
|
|
1592
|
+
import { createContext as createContext5, useContext as useContext5 } from "react";
|
|
1593
|
+
var ListContext = createContext5({});
|
|
1594
|
+
var useListContext = () => useContext5(ListContext);
|
|
1267
1595
|
|
|
1268
1596
|
// src/List/ListItem.tsx
|
|
1269
|
-
import
|
|
1270
|
-
import { Box as
|
|
1597
|
+
import React40 from "react";
|
|
1598
|
+
import { Box as Box23 } from "@marigold/system";
|
|
1271
1599
|
var ListItem = ({ children, ...props }) => {
|
|
1272
1600
|
const { styles } = useListContext();
|
|
1273
|
-
return /* @__PURE__ */
|
|
1601
|
+
return /* @__PURE__ */ React40.createElement(Box23, { ...props, as: "li", css: styles }, children);
|
|
1274
1602
|
};
|
|
1275
1603
|
|
|
1276
1604
|
// src/List/List.tsx
|
|
@@ -1281,35 +1609,35 @@ var List = ({
|
|
|
1281
1609
|
size,
|
|
1282
1610
|
...props
|
|
1283
1611
|
}) => {
|
|
1284
|
-
const styles =
|
|
1612
|
+
const styles = useComponentStyles19(
|
|
1285
1613
|
"List",
|
|
1286
1614
|
{ variant, size },
|
|
1287
1615
|
{ parts: ["ul", "ol", "item"] }
|
|
1288
1616
|
);
|
|
1289
|
-
return /* @__PURE__ */
|
|
1617
|
+
return /* @__PURE__ */ React41.createElement(Box24, { ...props, as, css: styles[as] }, /* @__PURE__ */ React41.createElement(ListContext.Provider, { value: { styles: styles.item } }, children));
|
|
1290
1618
|
};
|
|
1291
1619
|
List.Item = ListItem;
|
|
1292
1620
|
|
|
1293
1621
|
// src/Menu/Menu.tsx
|
|
1294
|
-
import
|
|
1622
|
+
import React44, { useRef as useRef10 } from "react";
|
|
1295
1623
|
import { useMenu } from "@react-aria/menu";
|
|
1296
|
-
import { Item } from "@react-stately/collections";
|
|
1624
|
+
import { Item as Item2 } from "@react-stately/collections";
|
|
1297
1625
|
import { useTreeState } from "@react-stately/tree";
|
|
1298
1626
|
import {
|
|
1299
|
-
Box as
|
|
1300
|
-
useComponentStyles as
|
|
1627
|
+
Box as Box26,
|
|
1628
|
+
useComponentStyles as useComponentStyles20
|
|
1301
1629
|
} from "@marigold/system";
|
|
1302
1630
|
|
|
1303
1631
|
// src/Menu/Context.ts
|
|
1304
1632
|
import {
|
|
1305
|
-
createContext as
|
|
1306
|
-
useContext as
|
|
1633
|
+
createContext as createContext6,
|
|
1634
|
+
useContext as useContext6
|
|
1307
1635
|
} from "react";
|
|
1308
|
-
var MenuContext =
|
|
1309
|
-
var useMenuContext = () =>
|
|
1636
|
+
var MenuContext = createContext6({});
|
|
1637
|
+
var useMenuContext = () => useContext6(MenuContext);
|
|
1310
1638
|
|
|
1311
1639
|
// src/Menu/MenuTrigger.tsx
|
|
1312
|
-
import
|
|
1640
|
+
import React42, { useRef as useRef8 } from "react";
|
|
1313
1641
|
import { useMenuTriggerState } from "@react-stately/menu";
|
|
1314
1642
|
import { PressResponder as PressResponder2 } from "@react-aria/interactions";
|
|
1315
1643
|
import { useMenuTrigger } from "@react-aria/menu";
|
|
@@ -1321,8 +1649,8 @@ var MenuTrigger = ({
|
|
|
1321
1649
|
onOpenChange,
|
|
1322
1650
|
children
|
|
1323
1651
|
}) => {
|
|
1324
|
-
const [menuTrigger, menu] =
|
|
1325
|
-
const menuTriggerRef =
|
|
1652
|
+
const [menuTrigger, menu] = React42.Children.toArray(children);
|
|
1653
|
+
const menuTriggerRef = useRef8(null);
|
|
1326
1654
|
const menuRef = useObjectRef7();
|
|
1327
1655
|
const state = useMenuTriggerState({
|
|
1328
1656
|
isOpen: open,
|
|
@@ -1341,7 +1669,7 @@ var MenuTrigger = ({
|
|
|
1341
1669
|
autoFocus: state.focusStrategy
|
|
1342
1670
|
};
|
|
1343
1671
|
const isSmallScreen = useResponsiveValue([true, false, false], 2);
|
|
1344
|
-
return /* @__PURE__ */
|
|
1672
|
+
return /* @__PURE__ */ React42.createElement(MenuContext.Provider, { value: menuContext }, /* @__PURE__ */ React42.createElement(
|
|
1345
1673
|
PressResponder2,
|
|
1346
1674
|
{
|
|
1347
1675
|
...menuTriggerProps,
|
|
@@ -1349,17 +1677,17 @@ var MenuTrigger = ({
|
|
|
1349
1677
|
isPressed: state.isOpen
|
|
1350
1678
|
},
|
|
1351
1679
|
menuTrigger
|
|
1352
|
-
), isSmallScreen ? /* @__PURE__ */
|
|
1680
|
+
), isSmallScreen ? /* @__PURE__ */ React42.createElement(Tray, { state }, menu) : /* @__PURE__ */ React42.createElement(Popover, { triggerRef: menuTriggerRef, scrollRef: menuRef, state }, menu));
|
|
1353
1681
|
};
|
|
1354
1682
|
|
|
1355
1683
|
// src/Menu/MenuItem.tsx
|
|
1356
|
-
import
|
|
1357
|
-
import { useFocusRing as
|
|
1684
|
+
import React43, { useRef as useRef9 } from "react";
|
|
1685
|
+
import { useFocusRing as useFocusRing4 } from "@react-aria/focus";
|
|
1358
1686
|
import { useMenuItem } from "@react-aria/menu";
|
|
1359
|
-
import { mergeProps as
|
|
1360
|
-
import { Box as
|
|
1687
|
+
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
1688
|
+
import { Box as Box25, useStateProps as useStateProps6 } from "@marigold/system";
|
|
1361
1689
|
var MenuItem = ({ item, state, onAction, css }) => {
|
|
1362
|
-
const ref =
|
|
1690
|
+
const ref = useRef9(null);
|
|
1363
1691
|
const { onClose } = useMenuContext();
|
|
1364
1692
|
const { menuItemProps } = useMenuItem(
|
|
1365
1693
|
{
|
|
@@ -1370,13 +1698,13 @@ var MenuItem = ({ item, state, onAction, css }) => {
|
|
|
1370
1698
|
state,
|
|
1371
1699
|
ref
|
|
1372
1700
|
);
|
|
1373
|
-
const { isFocusVisible, focusProps } =
|
|
1374
|
-
const stateProps =
|
|
1701
|
+
const { isFocusVisible, focusProps } = useFocusRing4();
|
|
1702
|
+
const stateProps = useStateProps6({
|
|
1375
1703
|
focus: isFocusVisible
|
|
1376
1704
|
});
|
|
1377
1705
|
const { onPointerUp, ...props } = menuItemProps;
|
|
1378
|
-
return /* @__PURE__ */
|
|
1379
|
-
|
|
1706
|
+
return /* @__PURE__ */ React43.createElement(
|
|
1707
|
+
Box25,
|
|
1380
1708
|
{
|
|
1381
1709
|
as: "li",
|
|
1382
1710
|
ref,
|
|
@@ -1386,7 +1714,7 @@ var MenuItem = ({ item, state, onAction, css }) => {
|
|
|
1386
1714
|
}
|
|
1387
1715
|
},
|
|
1388
1716
|
css,
|
|
1389
|
-
...
|
|
1717
|
+
...mergeProps5(props, { onPointerDown: onPointerUp }, focusProps),
|
|
1390
1718
|
...stateProps
|
|
1391
1719
|
},
|
|
1392
1720
|
item.rendered
|
|
@@ -1398,17 +1726,17 @@ import { useSyncRef } from "@react-aria/utils";
|
|
|
1398
1726
|
var Menu = ({ variant, size, ...props }) => {
|
|
1399
1727
|
const { ref: scrollRef, ...menuContext } = useMenuContext();
|
|
1400
1728
|
const ownProps = { ...props, ...menuContext };
|
|
1401
|
-
const ref =
|
|
1729
|
+
const ref = useRef10(null);
|
|
1402
1730
|
const state = useTreeState({ ...ownProps, selectionMode: "none" });
|
|
1403
1731
|
const { menuProps } = useMenu(ownProps, state, ref);
|
|
1404
1732
|
useSyncRef({ ref: scrollRef }, ref);
|
|
1405
|
-
const styles =
|
|
1733
|
+
const styles = useComponentStyles20(
|
|
1406
1734
|
"Menu",
|
|
1407
1735
|
{ variant, size },
|
|
1408
1736
|
{ parts: ["container", "item"] }
|
|
1409
1737
|
);
|
|
1410
|
-
return /* @__PURE__ */
|
|
1411
|
-
|
|
1738
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1739
|
+
Box26,
|
|
1412
1740
|
{
|
|
1413
1741
|
as: "ul",
|
|
1414
1742
|
ref,
|
|
@@ -1420,7 +1748,7 @@ var Menu = ({ variant, size, ...props }) => {
|
|
|
1420
1748
|
css: styles.container,
|
|
1421
1749
|
...menuProps
|
|
1422
1750
|
},
|
|
1423
|
-
[...state.collection].map((item) => /* @__PURE__ */
|
|
1751
|
+
[...state.collection].map((item) => /* @__PURE__ */ React44.createElement(
|
|
1424
1752
|
MenuItem,
|
|
1425
1753
|
{
|
|
1426
1754
|
key: item.key,
|
|
@@ -1433,18 +1761,18 @@ var Menu = ({ variant, size, ...props }) => {
|
|
|
1433
1761
|
);
|
|
1434
1762
|
};
|
|
1435
1763
|
Menu.Trigger = MenuTrigger;
|
|
1436
|
-
Menu.Item =
|
|
1764
|
+
Menu.Item = Item2;
|
|
1437
1765
|
|
|
1438
1766
|
// src/Menu/ActionMenu.tsx
|
|
1439
|
-
import
|
|
1440
|
-
import { SVG as
|
|
1767
|
+
import React45 from "react";
|
|
1768
|
+
import { SVG as SVG4 } from "@marigold/system";
|
|
1441
1769
|
var ActionMenu = (props) => {
|
|
1442
|
-
return /* @__PURE__ */
|
|
1770
|
+
return /* @__PURE__ */ React45.createElement(Menu.Trigger, null, /* @__PURE__ */ React45.createElement(Button, { variant: "menu", size: "small" }, /* @__PURE__ */ React45.createElement(SVG4, { viewBox: "0 0 24 24" }, /* @__PURE__ */ React45.createElement("path", { d: "M12.0117 7.47656C13.2557 7.47656 14.2734 6.45879 14.2734 5.21484C14.2734 3.9709 13.2557 2.95312 12.0117 2.95312C10.7678 2.95312 9.75 3.9709 9.75 5.21484C9.75 6.45879 10.7678 7.47656 12.0117 7.47656ZM12.0117 9.73828C10.7678 9.73828 9.75 10.7561 9.75 12C9.75 13.2439 10.7678 14.2617 12.0117 14.2617C13.2557 14.2617 14.2734 13.2439 14.2734 12C14.2734 10.7561 13.2557 9.73828 12.0117 9.73828ZM12.0117 16.5234C10.7678 16.5234 9.75 17.5412 9.75 18.7852C9.75 20.0291 10.7678 21.0469 12.0117 21.0469C13.2557 21.0469 14.2734 20.0291 14.2734 18.7852C14.2734 17.5412 13.2557 16.5234 12.0117 16.5234Z" }))), /* @__PURE__ */ React45.createElement(Menu, { ...props }));
|
|
1443
1771
|
};
|
|
1444
1772
|
|
|
1445
1773
|
// src/Message/Message.tsx
|
|
1446
|
-
import
|
|
1447
|
-
import { useComponentStyles as
|
|
1774
|
+
import React46 from "react";
|
|
1775
|
+
import { useComponentStyles as useComponentStyles21 } from "@marigold/system";
|
|
1448
1776
|
var Message = ({
|
|
1449
1777
|
messageTitle,
|
|
1450
1778
|
variant = "info",
|
|
@@ -1452,7 +1780,7 @@ var Message = ({
|
|
|
1452
1780
|
children,
|
|
1453
1781
|
...props
|
|
1454
1782
|
}) => {
|
|
1455
|
-
const styles =
|
|
1783
|
+
const styles = useComponentStyles21(
|
|
1456
1784
|
"Message",
|
|
1457
1785
|
{
|
|
1458
1786
|
variant,
|
|
@@ -1460,14 +1788,14 @@ var Message = ({
|
|
|
1460
1788
|
},
|
|
1461
1789
|
{ parts: ["container", "icon", "title", "content"] }
|
|
1462
1790
|
);
|
|
1463
|
-
var icon = /* @__PURE__ */
|
|
1791
|
+
var icon = /* @__PURE__ */ React46.createElement("svg", { viewBox: "0 0 24 24" }, /* @__PURE__ */ React46.createElement("path", { d: "M12 2.85938C6.95437 2.85938 2.85938 6.95437 2.85938 12C2.85938 17.0456 6.95437 21.1406 12 21.1406C17.0456 21.1406 21.1406 17.0456 21.1406 12C21.1406 6.95437 17.0456 2.85938 12 2.85938ZM12.7875 15.9374H11.2125V11.2124H12.7875V15.9374ZM12.7875 9.6375H11.2125V8.0625H12.7875V9.6375Z" }));
|
|
1464
1792
|
if (variant === "warning") {
|
|
1465
|
-
icon = /* @__PURE__ */
|
|
1793
|
+
icon = /* @__PURE__ */ React46.createElement("svg", { viewBox: "0 0 24 24" }, /* @__PURE__ */ React46.createElement("path", { d: "M19.2 3H4.8C3.81 3 3.009 3.81 3.009 4.8L3 21L6.6 17.4H19.2C20.19 17.4 21 16.59 21 15.6V4.8C21 3.81 20.19 3 19.2 3ZM12.9 13.8H11.1V12H12.9V13.8ZM12.9 10.2001H11.1V6.60008H12.9V10.2001Z" }));
|
|
1466
1794
|
}
|
|
1467
1795
|
if (variant === "error") {
|
|
1468
|
-
icon = /* @__PURE__ */
|
|
1796
|
+
icon = /* @__PURE__ */ React46.createElement("svg", { viewBox: "0 0 24 24" }, /* @__PURE__ */ React46.createElement("path", { d: "M2.25 20.3097H21.75L12 3.46875L2.25 20.3097ZM12.8864 17.2606H11.1136V15.4879H12.8864V17.2606ZM12.8864 13.7151H11.1136V10.1697H12.8864V13.7151Z" }));
|
|
1469
1797
|
}
|
|
1470
|
-
return /* @__PURE__ */
|
|
1798
|
+
return /* @__PURE__ */ React46.createElement(Box, { css: styles.container, ...props }, /* @__PURE__ */ React46.createElement(Box, { __baseCSS: { display: "flex", alignItems: "top", gap: 4 } }, /* @__PURE__ */ React46.createElement(
|
|
1471
1799
|
Box,
|
|
1472
1800
|
{
|
|
1473
1801
|
role: "presentation",
|
|
@@ -1475,38 +1803,38 @@ var Message = ({
|
|
|
1475
1803
|
css: styles.icon
|
|
1476
1804
|
},
|
|
1477
1805
|
icon
|
|
1478
|
-
), /* @__PURE__ */
|
|
1806
|
+
), /* @__PURE__ */ React46.createElement(Box, { css: styles.title }, messageTitle)), /* @__PURE__ */ React46.createElement(Box, { css: styles.content }, children));
|
|
1479
1807
|
};
|
|
1480
1808
|
|
|
1481
1809
|
// src/NumberField/NumberField.tsx
|
|
1482
|
-
import
|
|
1483
|
-
import { useFocusRing as
|
|
1484
|
-
import { useHover as
|
|
1810
|
+
import React48, { forwardRef as forwardRef9 } from "react";
|
|
1811
|
+
import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
1812
|
+
import { useHover as useHover5 } from "@react-aria/interactions";
|
|
1485
1813
|
import { useLocale } from "@react-aria/i18n";
|
|
1486
1814
|
import { useNumberField } from "@react-aria/numberfield";
|
|
1487
|
-
import { mergeProps as
|
|
1815
|
+
import { mergeProps as mergeProps7, useObjectRef as useObjectRef8 } from "@react-aria/utils";
|
|
1488
1816
|
import { useNumberFieldState } from "@react-stately/numberfield";
|
|
1489
1817
|
import {
|
|
1490
|
-
Box as
|
|
1491
|
-
useComponentStyles as
|
|
1492
|
-
useStateProps as
|
|
1818
|
+
Box as Box28,
|
|
1819
|
+
useComponentStyles as useComponentStyles22,
|
|
1820
|
+
useStateProps as useStateProps8
|
|
1493
1821
|
} from "@marigold/system";
|
|
1494
1822
|
|
|
1495
1823
|
// src/NumberField/StepButton.tsx
|
|
1496
|
-
import
|
|
1497
|
-
import { useButton as
|
|
1498
|
-
import { useHover as
|
|
1499
|
-
import { mergeProps as
|
|
1500
|
-
import { Box as
|
|
1501
|
-
var Plus = () => /* @__PURE__ */
|
|
1502
|
-
|
|
1824
|
+
import React47, { useRef as useRef11 } from "react";
|
|
1825
|
+
import { useButton as useButton4 } from "@react-aria/button";
|
|
1826
|
+
import { useHover as useHover4 } from "@react-aria/interactions";
|
|
1827
|
+
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
1828
|
+
import { Box as Box27, useStateProps as useStateProps7 } from "@marigold/system";
|
|
1829
|
+
var Plus = () => /* @__PURE__ */ React47.createElement(
|
|
1830
|
+
Box27,
|
|
1503
1831
|
{
|
|
1504
1832
|
as: "svg",
|
|
1505
1833
|
__baseCSS: { width: 16, height: 16 },
|
|
1506
1834
|
viewBox: "0 0 20 20",
|
|
1507
1835
|
fill: "currentColor"
|
|
1508
1836
|
},
|
|
1509
|
-
/* @__PURE__ */
|
|
1837
|
+
/* @__PURE__ */ React47.createElement(
|
|
1510
1838
|
"path",
|
|
1511
1839
|
{
|
|
1512
1840
|
fillRule: "evenodd",
|
|
@@ -1515,15 +1843,15 @@ var Plus = () => /* @__PURE__ */ React40.createElement(
|
|
|
1515
1843
|
}
|
|
1516
1844
|
)
|
|
1517
1845
|
);
|
|
1518
|
-
var Minus = () => /* @__PURE__ */
|
|
1519
|
-
|
|
1846
|
+
var Minus = () => /* @__PURE__ */ React47.createElement(
|
|
1847
|
+
Box27,
|
|
1520
1848
|
{
|
|
1521
1849
|
as: "svg",
|
|
1522
1850
|
__baseCSS: { width: 16, height: 16 },
|
|
1523
1851
|
viewBox: "0 0 20 20",
|
|
1524
1852
|
fill: "currentColor"
|
|
1525
1853
|
},
|
|
1526
|
-
/* @__PURE__ */
|
|
1854
|
+
/* @__PURE__ */ React47.createElement(
|
|
1527
1855
|
"path",
|
|
1528
1856
|
{
|
|
1529
1857
|
fillRule: "evenodd",
|
|
@@ -1533,20 +1861,20 @@ var Minus = () => /* @__PURE__ */ React40.createElement(
|
|
|
1533
1861
|
)
|
|
1534
1862
|
);
|
|
1535
1863
|
var StepButton = ({ direction, css, ...props }) => {
|
|
1536
|
-
const ref =
|
|
1537
|
-
const { buttonProps, isPressed } =
|
|
1864
|
+
const ref = useRef11(null);
|
|
1865
|
+
const { buttonProps, isPressed } = useButton4(
|
|
1538
1866
|
{ ...props, elementType: "div" },
|
|
1539
1867
|
ref
|
|
1540
1868
|
);
|
|
1541
|
-
const { hoverProps, isHovered } =
|
|
1542
|
-
const stateProps =
|
|
1869
|
+
const { hoverProps, isHovered } = useHover4(props);
|
|
1870
|
+
const stateProps = useStateProps7({
|
|
1543
1871
|
active: isPressed,
|
|
1544
1872
|
hover: isHovered,
|
|
1545
1873
|
disabled: props.isDisabled
|
|
1546
1874
|
});
|
|
1547
1875
|
const Icon3 = direction === "up" ? Plus : Minus;
|
|
1548
|
-
return /* @__PURE__ */
|
|
1549
|
-
|
|
1876
|
+
return /* @__PURE__ */ React47.createElement(
|
|
1877
|
+
Box27,
|
|
1550
1878
|
{
|
|
1551
1879
|
__baseCSS: {
|
|
1552
1880
|
display: "flex",
|
|
@@ -1555,15 +1883,15 @@ var StepButton = ({ direction, css, ...props }) => {
|
|
|
1555
1883
|
cursor: props.isDisabled ? "not-allowed" : "pointer"
|
|
1556
1884
|
},
|
|
1557
1885
|
css,
|
|
1558
|
-
...
|
|
1886
|
+
...mergeProps6(buttonProps, hoverProps),
|
|
1559
1887
|
...stateProps
|
|
1560
1888
|
},
|
|
1561
|
-
/* @__PURE__ */
|
|
1889
|
+
/* @__PURE__ */ React47.createElement(Icon3, null)
|
|
1562
1890
|
);
|
|
1563
1891
|
};
|
|
1564
1892
|
|
|
1565
1893
|
// src/NumberField/NumberField.tsx
|
|
1566
|
-
var NumberField =
|
|
1894
|
+
var NumberField = forwardRef9(
|
|
1567
1895
|
({
|
|
1568
1896
|
variant,
|
|
1569
1897
|
size,
|
|
@@ -1595,25 +1923,25 @@ var NumberField = forwardRef8(
|
|
|
1595
1923
|
incrementButtonProps,
|
|
1596
1924
|
decrementButtonProps
|
|
1597
1925
|
} = useNumberField(props, state, inputRef);
|
|
1598
|
-
const { hoverProps, isHovered } =
|
|
1599
|
-
const { focusProps, isFocused } =
|
|
1926
|
+
const { hoverProps, isHovered } = useHover5({ isDisabled: disabled });
|
|
1927
|
+
const { focusProps, isFocused } = useFocusRing5({
|
|
1600
1928
|
within: true,
|
|
1601
1929
|
isTextInput: true,
|
|
1602
1930
|
autoFocus: props.autoFocus
|
|
1603
1931
|
});
|
|
1604
|
-
const styles =
|
|
1932
|
+
const styles = useComponentStyles22(
|
|
1605
1933
|
"NumberField",
|
|
1606
1934
|
{ variant, size },
|
|
1607
1935
|
{ parts: ["group", "stepper"] }
|
|
1608
1936
|
);
|
|
1609
|
-
const stateProps =
|
|
1937
|
+
const stateProps = useStateProps8({
|
|
1610
1938
|
hover: isHovered,
|
|
1611
1939
|
focus: isFocused,
|
|
1612
1940
|
disabled,
|
|
1613
1941
|
readOnly,
|
|
1614
1942
|
error
|
|
1615
1943
|
});
|
|
1616
|
-
return /* @__PURE__ */
|
|
1944
|
+
return /* @__PURE__ */ React48.createElement(
|
|
1617
1945
|
FieldBase,
|
|
1618
1946
|
{
|
|
1619
1947
|
label: props.label,
|
|
@@ -1629,8 +1957,8 @@ var NumberField = forwardRef8(
|
|
|
1629
1957
|
size,
|
|
1630
1958
|
width
|
|
1631
1959
|
},
|
|
1632
|
-
/* @__PURE__ */
|
|
1633
|
-
|
|
1960
|
+
/* @__PURE__ */ React48.createElement(
|
|
1961
|
+
Box28,
|
|
1634
1962
|
{
|
|
1635
1963
|
"data-group": true,
|
|
1636
1964
|
__baseCSS: {
|
|
@@ -1643,10 +1971,10 @@ var NumberField = forwardRef8(
|
|
|
1643
1971
|
}
|
|
1644
1972
|
},
|
|
1645
1973
|
css: styles.group,
|
|
1646
|
-
...
|
|
1974
|
+
...mergeProps7(groupProps, focusProps, hoverProps),
|
|
1647
1975
|
...stateProps
|
|
1648
1976
|
},
|
|
1649
|
-
showStepper && /* @__PURE__ */
|
|
1977
|
+
showStepper && /* @__PURE__ */ React48.createElement(
|
|
1650
1978
|
StepButton,
|
|
1651
1979
|
{
|
|
1652
1980
|
direction: "down",
|
|
@@ -1654,17 +1982,15 @@ var NumberField = forwardRef8(
|
|
|
1654
1982
|
...decrementButtonProps
|
|
1655
1983
|
}
|
|
1656
1984
|
),
|
|
1657
|
-
/* @__PURE__ */
|
|
1658
|
-
Input,
|
|
1985
|
+
/* @__PURE__ */ React48.createElement(Input, { variant, size, ...stateProps }, /* @__PURE__ */ React48.createElement(
|
|
1986
|
+
Input.Field,
|
|
1659
1987
|
{
|
|
1660
1988
|
ref: inputRef,
|
|
1661
|
-
variant,
|
|
1662
|
-
size,
|
|
1663
1989
|
...inputProps,
|
|
1664
1990
|
...stateProps
|
|
1665
1991
|
}
|
|
1666
|
-
),
|
|
1667
|
-
showStepper && /* @__PURE__ */
|
|
1992
|
+
)),
|
|
1993
|
+
showStepper && /* @__PURE__ */ React48.createElement(
|
|
1668
1994
|
StepButton,
|
|
1669
1995
|
{
|
|
1670
1996
|
direction: "up",
|
|
@@ -1682,7 +2008,7 @@ import { useTheme as useTheme2, ThemeProvider as ThemeProvider2 } from "@marigol
|
|
|
1682
2008
|
import { SSRProvider } from "@react-aria/ssr";
|
|
1683
2009
|
|
|
1684
2010
|
// src/Provider/MarigoldProvider.tsx
|
|
1685
|
-
import
|
|
2011
|
+
import React49 from "react";
|
|
1686
2012
|
import { OverlayProvider } from "@react-aria/overlays";
|
|
1687
2013
|
import {
|
|
1688
2014
|
Global,
|
|
@@ -1705,41 +2031,41 @@ function MarigoldProvider({
|
|
|
1705
2031
|
Nested themes with a "root" property must specify a "selector" to prevent accidentally overriding global CSS`
|
|
1706
2032
|
);
|
|
1707
2033
|
}
|
|
1708
|
-
return /* @__PURE__ */
|
|
2034
|
+
return /* @__PURE__ */ React49.createElement(ThemeProvider, { theme }, /* @__PURE__ */ React49.createElement(
|
|
1709
2035
|
Global,
|
|
1710
2036
|
{
|
|
1711
2037
|
normalizeDocument: isTopLevel && normalizeDocument,
|
|
1712
2038
|
selector
|
|
1713
2039
|
}
|
|
1714
|
-
), isTopLevel ? /* @__PURE__ */
|
|
2040
|
+
), isTopLevel ? /* @__PURE__ */ React49.createElement(OverlayProvider, null, children) : children);
|
|
1715
2041
|
}
|
|
1716
2042
|
|
|
1717
2043
|
// src/Radio/Radio.tsx
|
|
1718
|
-
import
|
|
1719
|
-
forwardRef as
|
|
2044
|
+
import React51, {
|
|
2045
|
+
forwardRef as forwardRef10
|
|
1720
2046
|
} from "react";
|
|
1721
|
-
import { useHover as
|
|
1722
|
-
import { useFocusRing as
|
|
2047
|
+
import { useHover as useHover6 } from "@react-aria/interactions";
|
|
2048
|
+
import { useFocusRing as useFocusRing6 } from "@react-aria/focus";
|
|
1723
2049
|
import { useRadio } from "@react-aria/radio";
|
|
1724
|
-
import { mergeProps as
|
|
2050
|
+
import { mergeProps as mergeProps8, useObjectRef as useObjectRef9 } from "@react-aria/utils";
|
|
1725
2051
|
import {
|
|
1726
|
-
Box as
|
|
1727
|
-
useComponentStyles as
|
|
1728
|
-
useStateProps as
|
|
2052
|
+
Box as Box30,
|
|
2053
|
+
useComponentStyles as useComponentStyles23,
|
|
2054
|
+
useStateProps as useStateProps10
|
|
1729
2055
|
} from "@marigold/system";
|
|
1730
2056
|
|
|
1731
2057
|
// src/Radio/Context.ts
|
|
1732
|
-
import { createContext as
|
|
1733
|
-
var RadioGroupContext =
|
|
2058
|
+
import { createContext as createContext7, useContext as useContext7 } from "react";
|
|
2059
|
+
var RadioGroupContext = createContext7(
|
|
1734
2060
|
null
|
|
1735
2061
|
);
|
|
1736
|
-
var useRadioGroupContext = () =>
|
|
2062
|
+
var useRadioGroupContext = () => useContext7(RadioGroupContext);
|
|
1737
2063
|
|
|
1738
2064
|
// src/Radio/RadioGroup.tsx
|
|
1739
|
-
import
|
|
2065
|
+
import React50 from "react";
|
|
1740
2066
|
import { useRadioGroup } from "@react-aria/radio";
|
|
1741
2067
|
import { useRadioGroupState } from "@react-stately/radio";
|
|
1742
|
-
import { Box as
|
|
2068
|
+
import { Box as Box29, useStateProps as useStateProps9 } from "@marigold/system";
|
|
1743
2069
|
var RadioGroup = ({
|
|
1744
2070
|
children,
|
|
1745
2071
|
orientation = "vertical",
|
|
@@ -1759,12 +2085,12 @@ var RadioGroup = ({
|
|
|
1759
2085
|
};
|
|
1760
2086
|
const state = useRadioGroupState(props);
|
|
1761
2087
|
const { radioGroupProps, labelProps, errorMessageProps, descriptionProps } = useRadioGroup(props, state);
|
|
1762
|
-
const stateProps =
|
|
2088
|
+
const stateProps = useStateProps9({
|
|
1763
2089
|
disabled,
|
|
1764
2090
|
readOnly,
|
|
1765
2091
|
error
|
|
1766
2092
|
});
|
|
1767
|
-
return /* @__PURE__ */
|
|
2093
|
+
return /* @__PURE__ */ React50.createElement(
|
|
1768
2094
|
FieldBase,
|
|
1769
2095
|
{
|
|
1770
2096
|
width,
|
|
@@ -1780,8 +2106,8 @@ var RadioGroup = ({
|
|
|
1780
2106
|
required,
|
|
1781
2107
|
...radioGroupProps
|
|
1782
2108
|
},
|
|
1783
|
-
/* @__PURE__ */
|
|
1784
|
-
|
|
2109
|
+
/* @__PURE__ */ React50.createElement(
|
|
2110
|
+
Box29,
|
|
1785
2111
|
{
|
|
1786
2112
|
role: "presentation",
|
|
1787
2113
|
"data-orientation": orientation,
|
|
@@ -1792,15 +2118,15 @@ var RadioGroup = ({
|
|
|
1792
2118
|
gap: orientation === "vertical" ? "0.5ch" : "1.5ch"
|
|
1793
2119
|
}
|
|
1794
2120
|
},
|
|
1795
|
-
/* @__PURE__ */
|
|
2121
|
+
/* @__PURE__ */ React50.createElement(RadioGroupContext.Provider, { value: { width, error, state } }, children)
|
|
1796
2122
|
)
|
|
1797
2123
|
);
|
|
1798
2124
|
};
|
|
1799
2125
|
|
|
1800
2126
|
// src/Radio/Radio.tsx
|
|
1801
|
-
var Dot = () => /* @__PURE__ */
|
|
1802
|
-
var Icon2 = ({ checked, css, ...props }) => /* @__PURE__ */
|
|
1803
|
-
|
|
2127
|
+
var Dot = () => /* @__PURE__ */ React51.createElement("svg", { viewBox: "0 0 6 6" }, /* @__PURE__ */ React51.createElement("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }));
|
|
2128
|
+
var Icon2 = ({ checked, css, ...props }) => /* @__PURE__ */ React51.createElement(
|
|
2129
|
+
Box30,
|
|
1804
2130
|
{
|
|
1805
2131
|
"aria-hidden": "true",
|
|
1806
2132
|
__baseCSS: {
|
|
@@ -1817,9 +2143,9 @@ var Icon2 = ({ checked, css, ...props }) => /* @__PURE__ */ React44.createElemen
|
|
|
1817
2143
|
css,
|
|
1818
2144
|
...props
|
|
1819
2145
|
},
|
|
1820
|
-
checked ? /* @__PURE__ */
|
|
2146
|
+
checked ? /* @__PURE__ */ React51.createElement(Dot, null) : null
|
|
1821
2147
|
);
|
|
1822
|
-
var Radio =
|
|
2148
|
+
var Radio = forwardRef10(
|
|
1823
2149
|
({ width, disabled, ...props }, ref) => {
|
|
1824
2150
|
const {
|
|
1825
2151
|
variant,
|
|
@@ -1834,14 +2160,14 @@ var Radio = forwardRef9(
|
|
|
1834
2160
|
state,
|
|
1835
2161
|
inputRef
|
|
1836
2162
|
);
|
|
1837
|
-
const styles =
|
|
2163
|
+
const styles = useComponentStyles23(
|
|
1838
2164
|
"Radio",
|
|
1839
2165
|
{ variant: variant || props.variant, size: size || props.size },
|
|
1840
2166
|
{ parts: ["container", "label", "radio"] }
|
|
1841
2167
|
);
|
|
1842
|
-
const { hoverProps, isHovered } =
|
|
1843
|
-
const { isFocusVisible, focusProps } =
|
|
1844
|
-
const stateProps =
|
|
2168
|
+
const { hoverProps, isHovered } = useHover6({ isDisabled: disabled });
|
|
2169
|
+
const { isFocusVisible, focusProps } = useFocusRing6();
|
|
2170
|
+
const stateProps = useStateProps10({
|
|
1845
2171
|
hover: isHovered,
|
|
1846
2172
|
focus: isFocusVisible,
|
|
1847
2173
|
checked: inputProps.checked,
|
|
@@ -1849,8 +2175,8 @@ var Radio = forwardRef9(
|
|
|
1849
2175
|
readOnly: props.readOnly,
|
|
1850
2176
|
error
|
|
1851
2177
|
});
|
|
1852
|
-
return /* @__PURE__ */
|
|
1853
|
-
|
|
2178
|
+
return /* @__PURE__ */ React51.createElement(
|
|
2179
|
+
Box30,
|
|
1854
2180
|
{
|
|
1855
2181
|
as: "label",
|
|
1856
2182
|
__baseCSS: {
|
|
@@ -1861,10 +2187,10 @@ var Radio = forwardRef9(
|
|
|
1861
2187
|
width: width || groupWidth || "100%"
|
|
1862
2188
|
},
|
|
1863
2189
|
css: styles.container,
|
|
1864
|
-
...
|
|
2190
|
+
...mergeProps8(hoverProps, stateProps)
|
|
1865
2191
|
},
|
|
1866
|
-
/* @__PURE__ */
|
|
1867
|
-
|
|
2192
|
+
/* @__PURE__ */ React51.createElement(
|
|
2193
|
+
Box30,
|
|
1868
2194
|
{
|
|
1869
2195
|
as: "input",
|
|
1870
2196
|
ref: inputRef,
|
|
@@ -1878,131 +2204,34 @@ var Radio = forwardRef9(
|
|
|
1878
2204
|
opacity: 1e-4,
|
|
1879
2205
|
cursor: inputProps.disabled ? "not-allowed" : "pointer"
|
|
1880
2206
|
},
|
|
1881
|
-
...
|
|
2207
|
+
...mergeProps8(inputProps, focusProps)
|
|
1882
2208
|
}
|
|
1883
2209
|
),
|
|
1884
|
-
/* @__PURE__ */
|
|
1885
|
-
/* @__PURE__ */
|
|
2210
|
+
/* @__PURE__ */ React51.createElement(Icon2, { checked: inputProps.checked, css: styles.radio, ...stateProps }),
|
|
2211
|
+
/* @__PURE__ */ React51.createElement(Box30, { css: styles.label, ...stateProps }, props.children)
|
|
1886
2212
|
);
|
|
1887
2213
|
}
|
|
1888
2214
|
);
|
|
1889
2215
|
Radio.Group = RadioGroup;
|
|
1890
2216
|
|
|
1891
2217
|
// src/Select/Select.tsx
|
|
1892
|
-
import
|
|
2218
|
+
import React52, {
|
|
1893
2219
|
forwardRef as forwardRef11,
|
|
1894
|
-
useRef as
|
|
2220
|
+
useRef as useRef12
|
|
1895
2221
|
} from "react";
|
|
1896
|
-
import { useButton as
|
|
1897
|
-
import { useFocusRing as
|
|
2222
|
+
import { useButton as useButton5 } from "@react-aria/button";
|
|
2223
|
+
import { useFocusRing as useFocusRing7 } from "@react-aria/focus";
|
|
1898
2224
|
import { useLocalizedStringFormatter } from "@react-aria/i18n";
|
|
1899
2225
|
import { HiddenSelect, useSelect } from "@react-aria/select";
|
|
1900
2226
|
import { useSelectState } from "@react-stately/select";
|
|
1901
|
-
import { Item as
|
|
1902
|
-
import { mergeProps as
|
|
2227
|
+
import { Item as Item3, Section } from "@react-stately/collections";
|
|
2228
|
+
import { mergeProps as mergeProps9, useObjectRef as useObjectRef10 } from "@react-aria/utils";
|
|
1903
2229
|
import {
|
|
1904
|
-
Box as
|
|
2230
|
+
Box as Box31,
|
|
1905
2231
|
useComponentStyles as useComponentStyles24,
|
|
1906
2232
|
useResponsiveValue as useResponsiveValue2,
|
|
1907
|
-
useStateProps as
|
|
1908
|
-
} from "@marigold/system";
|
|
1909
|
-
|
|
1910
|
-
// src/ListBox/ListBox.tsx
|
|
1911
|
-
import React47, { forwardRef as forwardRef10 } from "react";
|
|
1912
|
-
import { useObjectRef as useObjectRef10 } from "@react-aria/utils";
|
|
1913
|
-
import {
|
|
1914
|
-
Box as Box27,
|
|
1915
|
-
useComponentStyles as useComponentStyles23
|
|
2233
|
+
useStateProps as useStateProps11
|
|
1916
2234
|
} from "@marigold/system";
|
|
1917
|
-
import { useListBox } from "@react-aria/listbox";
|
|
1918
|
-
|
|
1919
|
-
// src/ListBox/Context.ts
|
|
1920
|
-
import { createContext as createContext7, useContext as useContext7 } from "react";
|
|
1921
|
-
var ListBoxContext = createContext7({});
|
|
1922
|
-
var useListBoxContext = () => useContext7(ListBoxContext);
|
|
1923
|
-
|
|
1924
|
-
// src/ListBox/ListBoxSection.tsx
|
|
1925
|
-
import React46 from "react";
|
|
1926
|
-
import { useListBoxSection } from "@react-aria/listbox";
|
|
1927
|
-
import { Box as Box26 } from "@marigold/system";
|
|
1928
|
-
|
|
1929
|
-
// src/ListBox/ListBoxOption.tsx
|
|
1930
|
-
import React45, { useRef as useRef8 } from "react";
|
|
1931
|
-
import { useOption } from "@react-aria/listbox";
|
|
1932
|
-
import { mergeProps as mergeProps7 } from "@react-aria/utils";
|
|
1933
|
-
import { Box as Box25, useStateProps as useStateProps9 } from "@marigold/system";
|
|
1934
|
-
var ListBoxOption = ({ item, state }) => {
|
|
1935
|
-
const ref = useRef8(null);
|
|
1936
|
-
const { optionProps, isSelected, isDisabled, isFocused } = useOption(
|
|
1937
|
-
{
|
|
1938
|
-
key: item.key
|
|
1939
|
-
},
|
|
1940
|
-
state,
|
|
1941
|
-
ref
|
|
1942
|
-
);
|
|
1943
|
-
const { onPointerUp, ...props } = optionProps;
|
|
1944
|
-
const { styles } = useListBoxContext();
|
|
1945
|
-
const stateProps = useStateProps9({
|
|
1946
|
-
selected: isSelected,
|
|
1947
|
-
disabled: isDisabled,
|
|
1948
|
-
focusVisible: isFocused
|
|
1949
|
-
});
|
|
1950
|
-
return /* @__PURE__ */ React45.createElement(
|
|
1951
|
-
Box25,
|
|
1952
|
-
{
|
|
1953
|
-
as: "li",
|
|
1954
|
-
ref,
|
|
1955
|
-
css: styles.option,
|
|
1956
|
-
...mergeProps7(props, { onPointerDown: onPointerUp }, { ...stateProps })
|
|
1957
|
-
},
|
|
1958
|
-
item.rendered
|
|
1959
|
-
);
|
|
1960
|
-
};
|
|
1961
|
-
|
|
1962
|
-
// src/ListBox/ListBoxSection.tsx
|
|
1963
|
-
var ListBoxSection = ({ section, state }) => {
|
|
1964
|
-
const { itemProps, headingProps, groupProps } = useListBoxSection({
|
|
1965
|
-
heading: section.rendered,
|
|
1966
|
-
"aria-label": section["aria-label"]
|
|
1967
|
-
});
|
|
1968
|
-
const { styles } = useListBoxContext();
|
|
1969
|
-
return /* @__PURE__ */ React46.createElement(Box26, { as: "li", css: styles.section, ...itemProps }, section.rendered && /* @__PURE__ */ React46.createElement(Box26, { css: styles.sectionTitle, ...headingProps }, section.rendered), /* @__PURE__ */ React46.createElement(
|
|
1970
|
-
Box26,
|
|
1971
|
-
{
|
|
1972
|
-
as: "ul",
|
|
1973
|
-
__baseCSS: { listStyle: "none", p: 0 },
|
|
1974
|
-
css: styles.list,
|
|
1975
|
-
...groupProps
|
|
1976
|
-
},
|
|
1977
|
-
[...section.childNodes].map((node) => /* @__PURE__ */ React46.createElement(ListBoxOption, { key: node.key, item: node, state }))
|
|
1978
|
-
));
|
|
1979
|
-
};
|
|
1980
|
-
|
|
1981
|
-
// src/ListBox/ListBox.tsx
|
|
1982
|
-
var ListBox = forwardRef10(
|
|
1983
|
-
({ state, variant, size, ...props }, ref) => {
|
|
1984
|
-
const innerRef = useObjectRef10(ref);
|
|
1985
|
-
const { listBoxProps } = useListBox(props, state, innerRef);
|
|
1986
|
-
const styles = useComponentStyles23(
|
|
1987
|
-
"ListBox",
|
|
1988
|
-
{ variant, size },
|
|
1989
|
-
{ parts: ["container", "list", "option", "section", "sectionTitle"] }
|
|
1990
|
-
);
|
|
1991
|
-
return /* @__PURE__ */ React47.createElement(ListBoxContext.Provider, { value: { styles } }, /* @__PURE__ */ React47.createElement(Box27, { css: styles.container }, /* @__PURE__ */ React47.createElement(
|
|
1992
|
-
Box27,
|
|
1993
|
-
{
|
|
1994
|
-
as: "ul",
|
|
1995
|
-
ref: innerRef,
|
|
1996
|
-
__baseCSS: { listStyle: "none", p: 0 },
|
|
1997
|
-
css: styles.list,
|
|
1998
|
-
...listBoxProps
|
|
1999
|
-
},
|
|
2000
|
-
[...state.collection].map(
|
|
2001
|
-
(item) => item.type === "section" ? /* @__PURE__ */ React47.createElement(ListBoxSection, { key: item.key, section: item, state }) : /* @__PURE__ */ React47.createElement(ListBoxOption, { key: item.key, item, state })
|
|
2002
|
-
)
|
|
2003
|
-
)));
|
|
2004
|
-
}
|
|
2005
|
-
);
|
|
2006
2235
|
|
|
2007
2236
|
// src/Select/intl.ts
|
|
2008
2237
|
var messages = {
|
|
@@ -2015,8 +2244,8 @@ var messages = {
|
|
|
2015
2244
|
};
|
|
2016
2245
|
|
|
2017
2246
|
// src/Select/Select.tsx
|
|
2018
|
-
var Chevron = ({ css }) => /* @__PURE__ */
|
|
2019
|
-
|
|
2247
|
+
var Chevron = ({ css }) => /* @__PURE__ */ React52.createElement(
|
|
2248
|
+
Box31,
|
|
2020
2249
|
{
|
|
2021
2250
|
as: "svg",
|
|
2022
2251
|
__baseCSS: { width: 16, height: 16, fill: "none" },
|
|
@@ -2025,7 +2254,7 @@ var Chevron = ({ css }) => /* @__PURE__ */ React48.createElement(
|
|
|
2025
2254
|
stroke: "currentColor",
|
|
2026
2255
|
strokeWidth: 2
|
|
2027
2256
|
},
|
|
2028
|
-
/* @__PURE__ */
|
|
2257
|
+
/* @__PURE__ */ React52.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
|
|
2029
2258
|
);
|
|
2030
2259
|
var Select = forwardRef11(
|
|
2031
2260
|
({
|
|
@@ -2050,8 +2279,8 @@ var Select = forwardRef11(
|
|
|
2050
2279
|
...rest
|
|
2051
2280
|
};
|
|
2052
2281
|
const state = useSelectState(props);
|
|
2053
|
-
const buttonRef =
|
|
2054
|
-
const listboxRef =
|
|
2282
|
+
const buttonRef = useObjectRef10(ref);
|
|
2283
|
+
const listboxRef = useRef12(null);
|
|
2055
2284
|
const isSmallScreen = useResponsiveValue2([true, false, false], 2);
|
|
2056
2285
|
const {
|
|
2057
2286
|
labelProps,
|
|
@@ -2061,23 +2290,23 @@ var Select = forwardRef11(
|
|
|
2061
2290
|
descriptionProps,
|
|
2062
2291
|
errorMessageProps
|
|
2063
2292
|
} = useSelect(props, state, buttonRef);
|
|
2064
|
-
const { buttonProps } =
|
|
2293
|
+
const { buttonProps } = useButton5(
|
|
2065
2294
|
{ isDisabled: disabled, ...triggerProps },
|
|
2066
2295
|
buttonRef
|
|
2067
2296
|
);
|
|
2068
|
-
const { focusProps, isFocusVisible } =
|
|
2297
|
+
const { focusProps, isFocusVisible } = useFocusRing7();
|
|
2069
2298
|
const styles = useComponentStyles24(
|
|
2070
2299
|
"Select",
|
|
2071
2300
|
{ variant, size },
|
|
2072
2301
|
{ parts: ["container", "button", "icon"] }
|
|
2073
2302
|
);
|
|
2074
|
-
const stateProps =
|
|
2303
|
+
const stateProps = useStateProps11({
|
|
2075
2304
|
disabled,
|
|
2076
2305
|
error,
|
|
2077
2306
|
focusVisible: isFocusVisible,
|
|
2078
2307
|
expanded: state.isOpen
|
|
2079
2308
|
});
|
|
2080
|
-
return /* @__PURE__ */
|
|
2309
|
+
return /* @__PURE__ */ React52.createElement(
|
|
2081
2310
|
FieldBase,
|
|
2082
2311
|
{
|
|
2083
2312
|
variant,
|
|
@@ -2094,7 +2323,7 @@ var Select = forwardRef11(
|
|
|
2094
2323
|
disabled,
|
|
2095
2324
|
required
|
|
2096
2325
|
},
|
|
2097
|
-
/* @__PURE__ */
|
|
2326
|
+
/* @__PURE__ */ React52.createElement(
|
|
2098
2327
|
HiddenSelect,
|
|
2099
2328
|
{
|
|
2100
2329
|
state,
|
|
@@ -2104,8 +2333,8 @@ var Select = forwardRef11(
|
|
|
2104
2333
|
isDisabled: disabled
|
|
2105
2334
|
}
|
|
2106
2335
|
),
|
|
2107
|
-
/* @__PURE__ */
|
|
2108
|
-
|
|
2336
|
+
/* @__PURE__ */ React52.createElement(
|
|
2337
|
+
Box31,
|
|
2109
2338
|
{
|
|
2110
2339
|
as: "button",
|
|
2111
2340
|
__baseCSS: {
|
|
@@ -2117,11 +2346,11 @@ var Select = forwardRef11(
|
|
|
2117
2346
|
},
|
|
2118
2347
|
css: styles.button,
|
|
2119
2348
|
ref: buttonRef,
|
|
2120
|
-
...
|
|
2349
|
+
...mergeProps9(buttonProps, focusProps),
|
|
2121
2350
|
...stateProps
|
|
2122
2351
|
},
|
|
2123
|
-
/* @__PURE__ */
|
|
2124
|
-
|
|
2352
|
+
/* @__PURE__ */ React52.createElement(
|
|
2353
|
+
Box31,
|
|
2125
2354
|
{
|
|
2126
2355
|
css: {
|
|
2127
2356
|
overflow: "hidden",
|
|
@@ -2131,9 +2360,9 @@ var Select = forwardRef11(
|
|
|
2131
2360
|
},
|
|
2132
2361
|
state.selectedItem ? state.selectedItem.rendered : props.placeholder
|
|
2133
2362
|
),
|
|
2134
|
-
/* @__PURE__ */
|
|
2363
|
+
/* @__PURE__ */ React52.createElement(Chevron, { css: styles.icon })
|
|
2135
2364
|
),
|
|
2136
|
-
isSmallScreen ? /* @__PURE__ */
|
|
2365
|
+
isSmallScreen ? /* @__PURE__ */ React52.createElement(Tray, { state }, /* @__PURE__ */ React52.createElement(
|
|
2137
2366
|
ListBox,
|
|
2138
2367
|
{
|
|
2139
2368
|
ref: listboxRef,
|
|
@@ -2142,7 +2371,7 @@ var Select = forwardRef11(
|
|
|
2142
2371
|
size,
|
|
2143
2372
|
...menuProps
|
|
2144
2373
|
}
|
|
2145
|
-
)) : /* @__PURE__ */
|
|
2374
|
+
)) : /* @__PURE__ */ React52.createElement(Popover, { state, triggerRef: buttonRef, scrollRef: listboxRef }, /* @__PURE__ */ React52.createElement(
|
|
2146
2375
|
ListBox,
|
|
2147
2376
|
{
|
|
2148
2377
|
ref: listboxRef,
|
|
@@ -2155,34 +2384,34 @@ var Select = forwardRef11(
|
|
|
2155
2384
|
);
|
|
2156
2385
|
}
|
|
2157
2386
|
);
|
|
2158
|
-
Select.Option =
|
|
2387
|
+
Select.Option = Item3;
|
|
2159
2388
|
Select.Section = Section;
|
|
2160
2389
|
|
|
2161
2390
|
// src/Slider/Slider.tsx
|
|
2162
|
-
import
|
|
2391
|
+
import React54, { forwardRef as forwardRef12 } from "react";
|
|
2163
2392
|
import { useSlider } from "@react-aria/slider";
|
|
2164
2393
|
import { useSliderState } from "@react-stately/slider";
|
|
2165
2394
|
import { useNumberFormatter } from "@react-aria/i18n";
|
|
2166
|
-
import { useObjectRef as
|
|
2395
|
+
import { useObjectRef as useObjectRef11 } from "@react-aria/utils";
|
|
2167
2396
|
import { useComponentStyles as useComponentStyles25 } from "@marigold/system";
|
|
2168
2397
|
|
|
2169
2398
|
// src/Slider/Thumb.tsx
|
|
2170
|
-
import
|
|
2399
|
+
import React53, { useEffect } from "react";
|
|
2171
2400
|
import { useSliderThumb } from "@react-aria/slider";
|
|
2172
|
-
import { mergeProps as
|
|
2173
|
-
import { useStateProps as
|
|
2401
|
+
import { mergeProps as mergeProps10 } from "@react-aria/utils";
|
|
2402
|
+
import { useStateProps as useStateProps12 } from "@marigold/system";
|
|
2174
2403
|
|
|
2175
2404
|
// src/VisuallyHidden/VisuallyHidden.tsx
|
|
2176
2405
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
2177
2406
|
|
|
2178
2407
|
// src/Slider/Thumb.tsx
|
|
2179
|
-
import { useFocusRing as
|
|
2408
|
+
import { useFocusRing as useFocusRing8 } from "@react-aria/focus";
|
|
2180
2409
|
var Thumb = ({ state, trackRef, styles, ...props }) => {
|
|
2181
2410
|
const { disabled } = props;
|
|
2182
|
-
const inputRef =
|
|
2183
|
-
const { isFocusVisible, focusProps, isFocused } =
|
|
2411
|
+
const inputRef = React53.useRef(null);
|
|
2412
|
+
const { isFocusVisible, focusProps, isFocused } = useFocusRing8();
|
|
2184
2413
|
const focused = isFocused || isFocusVisible || state.isThumbDragging(0);
|
|
2185
|
-
const stateProps =
|
|
2414
|
+
const stateProps = useStateProps12({
|
|
2186
2415
|
focus: focused,
|
|
2187
2416
|
disabled
|
|
2188
2417
|
});
|
|
@@ -2198,7 +2427,7 @@ var Thumb = ({ state, trackRef, styles, ...props }) => {
|
|
|
2198
2427
|
useEffect(() => {
|
|
2199
2428
|
state.setThumbEditable(0, !disabled);
|
|
2200
2429
|
}, [disabled, state]);
|
|
2201
|
-
return /* @__PURE__ */
|
|
2430
|
+
return /* @__PURE__ */ React53.createElement(
|
|
2202
2431
|
Box,
|
|
2203
2432
|
{
|
|
2204
2433
|
__baseCSS: { top: "50%" },
|
|
@@ -2206,13 +2435,13 @@ var Thumb = ({ state, trackRef, styles, ...props }) => {
|
|
|
2206
2435
|
...thumbProps,
|
|
2207
2436
|
...stateProps
|
|
2208
2437
|
},
|
|
2209
|
-
/* @__PURE__ */
|
|
2438
|
+
/* @__PURE__ */ React53.createElement(VisuallyHidden, null, /* @__PURE__ */ React53.createElement(
|
|
2210
2439
|
Box,
|
|
2211
2440
|
{
|
|
2212
2441
|
as: "input",
|
|
2213
2442
|
type: "range",
|
|
2214
2443
|
ref: inputRef,
|
|
2215
|
-
...
|
|
2444
|
+
...mergeProps10(inputProps, focusProps)
|
|
2216
2445
|
}
|
|
2217
2446
|
))
|
|
2218
2447
|
);
|
|
@@ -2222,7 +2451,7 @@ var Thumb = ({ state, trackRef, styles, ...props }) => {
|
|
|
2222
2451
|
var Slider = forwardRef12(
|
|
2223
2452
|
({ variant, size, width = "100%", ...props }, ref) => {
|
|
2224
2453
|
const { formatOptions } = props;
|
|
2225
|
-
const trackRef =
|
|
2454
|
+
const trackRef = useObjectRef11(ref);
|
|
2226
2455
|
const numberFormatter = useNumberFormatter(formatOptions);
|
|
2227
2456
|
const state = useSliderState({ ...props, numberFormatter });
|
|
2228
2457
|
const { groupProps, trackProps, labelProps, outputProps } = useSlider(
|
|
@@ -2238,7 +2467,7 @@ var Slider = forwardRef12(
|
|
|
2238
2467
|
{ variant, size },
|
|
2239
2468
|
{ parts: ["track", "thumb", "label", "output"] }
|
|
2240
2469
|
);
|
|
2241
|
-
return /* @__PURE__ */
|
|
2470
|
+
return /* @__PURE__ */ React54.createElement(
|
|
2242
2471
|
Box,
|
|
2243
2472
|
{
|
|
2244
2473
|
__baseCSS: {
|
|
@@ -2249,7 +2478,7 @@ var Slider = forwardRef12(
|
|
|
2249
2478
|
},
|
|
2250
2479
|
...groupProps
|
|
2251
2480
|
},
|
|
2252
|
-
/* @__PURE__ */
|
|
2481
|
+
/* @__PURE__ */ React54.createElement(Box, { __baseCSS: { display: "flex", alignSelf: "stretch" } }, props.children && /* @__PURE__ */ React54.createElement(Box, { as: "label", __baseCSS: styles.label, ...labelProps }, props.children), /* @__PURE__ */ React54.createElement(
|
|
2253
2482
|
Box,
|
|
2254
2483
|
{
|
|
2255
2484
|
as: "output",
|
|
@@ -2259,7 +2488,7 @@ var Slider = forwardRef12(
|
|
|
2259
2488
|
},
|
|
2260
2489
|
state.getThumbValueLabel(0)
|
|
2261
2490
|
)),
|
|
2262
|
-
/* @__PURE__ */
|
|
2491
|
+
/* @__PURE__ */ React54.createElement(
|
|
2263
2492
|
Box,
|
|
2264
2493
|
{
|
|
2265
2494
|
...trackProps,
|
|
@@ -2270,7 +2499,7 @@ var Slider = forwardRef12(
|
|
|
2270
2499
|
cursor: props.disabled ? "not-allowed" : "pointer"
|
|
2271
2500
|
}
|
|
2272
2501
|
},
|
|
2273
|
-
/* @__PURE__ */
|
|
2502
|
+
/* @__PURE__ */ React54.createElement(
|
|
2274
2503
|
Box,
|
|
2275
2504
|
{
|
|
2276
2505
|
__baseCSS: {
|
|
@@ -2280,7 +2509,7 @@ var Slider = forwardRef12(
|
|
|
2280
2509
|
css: styles.track
|
|
2281
2510
|
}
|
|
2282
2511
|
),
|
|
2283
|
-
/* @__PURE__ */
|
|
2512
|
+
/* @__PURE__ */ React54.createElement(
|
|
2284
2513
|
Thumb,
|
|
2285
2514
|
{
|
|
2286
2515
|
state,
|
|
@@ -2295,12 +2524,13 @@ var Slider = forwardRef12(
|
|
|
2295
2524
|
);
|
|
2296
2525
|
|
|
2297
2526
|
// src/Split/Split.tsx
|
|
2298
|
-
import
|
|
2299
|
-
import { Box as
|
|
2300
|
-
var Split = (props) => /* @__PURE__ */
|
|
2527
|
+
import React55 from "react";
|
|
2528
|
+
import { Box as Box32 } from "@marigold/system";
|
|
2529
|
+
var Split = (props) => /* @__PURE__ */ React55.createElement(Box32, { ...props, role: "separator", css: { flexGrow: 1 } });
|
|
2301
2530
|
|
|
2302
2531
|
// src/Stack/Stack.tsx
|
|
2303
|
-
import
|
|
2532
|
+
import React56 from "react";
|
|
2533
|
+
import { Box as Box33 } from "@marigold/system";
|
|
2304
2534
|
var ALIGNMENT_X2 = {
|
|
2305
2535
|
none: "initial",
|
|
2306
2536
|
left: "flex-start",
|
|
@@ -2320,8 +2550,8 @@ var Stack = ({
|
|
|
2320
2550
|
alignY = "none",
|
|
2321
2551
|
stretch = false,
|
|
2322
2552
|
...props
|
|
2323
|
-
}) => /* @__PURE__ */
|
|
2324
|
-
|
|
2553
|
+
}) => /* @__PURE__ */ React56.createElement(
|
|
2554
|
+
Box33,
|
|
2325
2555
|
{
|
|
2326
2556
|
css: {
|
|
2327
2557
|
display: "flex",
|
|
@@ -2338,14 +2568,14 @@ var Stack = ({
|
|
|
2338
2568
|
);
|
|
2339
2569
|
|
|
2340
2570
|
// src/Switch/Switch.tsx
|
|
2341
|
-
import
|
|
2342
|
-
import { useFocusRing as
|
|
2571
|
+
import React57, { forwardRef as forwardRef13 } from "react";
|
|
2572
|
+
import { useFocusRing as useFocusRing9 } from "@react-aria/focus";
|
|
2343
2573
|
import { useSwitch } from "@react-aria/switch";
|
|
2344
|
-
import { useObjectRef as
|
|
2574
|
+
import { useObjectRef as useObjectRef12 } from "@react-aria/utils";
|
|
2345
2575
|
import { useToggleState as useToggleState2 } from "@react-stately/toggle";
|
|
2346
2576
|
import {
|
|
2347
2577
|
useComponentStyles as useComponentStyles26,
|
|
2348
|
-
useStateProps as
|
|
2578
|
+
useStateProps as useStateProps13
|
|
2349
2579
|
} from "@marigold/system";
|
|
2350
2580
|
var Switch = forwardRef13(
|
|
2351
2581
|
({
|
|
@@ -2358,7 +2588,7 @@ var Switch = forwardRef13(
|
|
|
2358
2588
|
defaultChecked,
|
|
2359
2589
|
...rest
|
|
2360
2590
|
}, ref) => {
|
|
2361
|
-
const inputRef =
|
|
2591
|
+
const inputRef = useObjectRef12(ref);
|
|
2362
2592
|
const props = {
|
|
2363
2593
|
isSelected: checked,
|
|
2364
2594
|
isDisabled: disabled,
|
|
@@ -2368,8 +2598,8 @@ var Switch = forwardRef13(
|
|
|
2368
2598
|
};
|
|
2369
2599
|
const state = useToggleState2(props);
|
|
2370
2600
|
const { inputProps } = useSwitch(props, state, inputRef);
|
|
2371
|
-
const { isFocusVisible, focusProps } =
|
|
2372
|
-
const stateProps =
|
|
2601
|
+
const { isFocusVisible, focusProps } = useFocusRing9();
|
|
2602
|
+
const stateProps = useStateProps13({
|
|
2373
2603
|
checked: state.isSelected,
|
|
2374
2604
|
disabled,
|
|
2375
2605
|
readOnly,
|
|
@@ -2380,7 +2610,7 @@ var Switch = forwardRef13(
|
|
|
2380
2610
|
{ variant, size },
|
|
2381
2611
|
{ parts: ["container", "label", "track", "thumb"] }
|
|
2382
2612
|
);
|
|
2383
|
-
return /* @__PURE__ */
|
|
2613
|
+
return /* @__PURE__ */ React57.createElement(
|
|
2384
2614
|
Box,
|
|
2385
2615
|
{
|
|
2386
2616
|
as: "label",
|
|
@@ -2394,7 +2624,7 @@ var Switch = forwardRef13(
|
|
|
2394
2624
|
},
|
|
2395
2625
|
css: styles.container
|
|
2396
2626
|
},
|
|
2397
|
-
/* @__PURE__ */
|
|
2627
|
+
/* @__PURE__ */ React57.createElement(
|
|
2398
2628
|
Box,
|
|
2399
2629
|
{
|
|
2400
2630
|
as: "input",
|
|
@@ -2413,8 +2643,8 @@ var Switch = forwardRef13(
|
|
|
2413
2643
|
...focusProps
|
|
2414
2644
|
}
|
|
2415
2645
|
),
|
|
2416
|
-
props.children && /* @__PURE__ */
|
|
2417
|
-
/* @__PURE__ */
|
|
2646
|
+
props.children && /* @__PURE__ */ React57.createElement(Box, { css: styles.label }, props.children),
|
|
2647
|
+
/* @__PURE__ */ React57.createElement(
|
|
2418
2648
|
Box,
|
|
2419
2649
|
{
|
|
2420
2650
|
__baseCSS: {
|
|
@@ -2428,7 +2658,7 @@ var Switch = forwardRef13(
|
|
|
2428
2658
|
css: styles.track,
|
|
2429
2659
|
...stateProps
|
|
2430
2660
|
},
|
|
2431
|
-
/* @__PURE__ */
|
|
2661
|
+
/* @__PURE__ */ React57.createElement(
|
|
2432
2662
|
Box,
|
|
2433
2663
|
{
|
|
2434
2664
|
__baseCSS: {
|
|
@@ -2457,7 +2687,7 @@ var Switch = forwardRef13(
|
|
|
2457
2687
|
);
|
|
2458
2688
|
|
|
2459
2689
|
// src/Table/Table.tsx
|
|
2460
|
-
import
|
|
2690
|
+
import React66, { useRef as useRef19 } from "react";
|
|
2461
2691
|
import { useTable } from "@react-aria/table";
|
|
2462
2692
|
import {
|
|
2463
2693
|
Cell,
|
|
@@ -2468,7 +2698,7 @@ import {
|
|
|
2468
2698
|
useTableState
|
|
2469
2699
|
} from "@react-stately/table";
|
|
2470
2700
|
import {
|
|
2471
|
-
Box as
|
|
2701
|
+
Box as Box39,
|
|
2472
2702
|
useComponentStyles as useComponentStyles28
|
|
2473
2703
|
} from "@marigold/system";
|
|
2474
2704
|
|
|
@@ -2478,21 +2708,21 @@ var TableContext = createContext8({});
|
|
|
2478
2708
|
var useTableContext = () => useContext8(TableContext);
|
|
2479
2709
|
|
|
2480
2710
|
// src/Table/TableBody.tsx
|
|
2481
|
-
import
|
|
2711
|
+
import React58 from "react";
|
|
2482
2712
|
import { useTableRowGroup } from "@react-aria/table";
|
|
2483
2713
|
var TableBody = ({ children }) => {
|
|
2484
2714
|
const { rowGroupProps } = useTableRowGroup();
|
|
2485
|
-
return /* @__PURE__ */
|
|
2715
|
+
return /* @__PURE__ */ React58.createElement("tbody", { ...rowGroupProps }, children);
|
|
2486
2716
|
};
|
|
2487
2717
|
|
|
2488
2718
|
// src/Table/TableCell.tsx
|
|
2489
|
-
import
|
|
2719
|
+
import React59, { useRef as useRef13 } from "react";
|
|
2490
2720
|
import { useTableCell } from "@react-aria/table";
|
|
2491
|
-
import { useFocusRing as
|
|
2492
|
-
import { mergeProps as
|
|
2493
|
-
import { Box as
|
|
2721
|
+
import { useFocusRing as useFocusRing10 } from "@react-aria/focus";
|
|
2722
|
+
import { mergeProps as mergeProps11 } from "@react-aria/utils";
|
|
2723
|
+
import { Box as Box34, useStateProps as useStateProps14 } from "@marigold/system";
|
|
2494
2724
|
var TableCell = ({ cell }) => {
|
|
2495
|
-
const ref =
|
|
2725
|
+
const ref = useRef13(null);
|
|
2496
2726
|
const { interactive, state, styles } = useTableContext();
|
|
2497
2727
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
2498
2728
|
const { gridCellProps } = useTableCell(
|
|
@@ -2511,15 +2741,15 @@ var TableCell = ({ cell }) => {
|
|
|
2511
2741
|
onMouseDown: (e) => e.stopPropagation(),
|
|
2512
2742
|
onPointerDown: (e) => e.stopPropagation()
|
|
2513
2743
|
};
|
|
2514
|
-
const { focusProps, isFocusVisible } =
|
|
2515
|
-
const stateProps =
|
|
2516
|
-
return /* @__PURE__ */
|
|
2517
|
-
|
|
2744
|
+
const { focusProps, isFocusVisible } = useFocusRing10();
|
|
2745
|
+
const stateProps = useStateProps14({ disabled, focusVisible: isFocusVisible });
|
|
2746
|
+
return /* @__PURE__ */ React59.createElement(
|
|
2747
|
+
Box34,
|
|
2518
2748
|
{
|
|
2519
2749
|
as: "td",
|
|
2520
2750
|
ref,
|
|
2521
2751
|
css: styles.cell,
|
|
2522
|
-
...
|
|
2752
|
+
...mergeProps11(cellProps, focusProps),
|
|
2523
2753
|
...stateProps
|
|
2524
2754
|
},
|
|
2525
2755
|
cell.rendered
|
|
@@ -2527,11 +2757,11 @@ var TableCell = ({ cell }) => {
|
|
|
2527
2757
|
};
|
|
2528
2758
|
|
|
2529
2759
|
// src/Table/TableCheckboxCell.tsx
|
|
2530
|
-
import
|
|
2760
|
+
import React60, { useRef as useRef14 } from "react";
|
|
2531
2761
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
2532
|
-
import { useFocusRing as
|
|
2533
|
-
import { mergeProps as
|
|
2534
|
-
import { Box as
|
|
2762
|
+
import { useFocusRing as useFocusRing11 } from "@react-aria/focus";
|
|
2763
|
+
import { mergeProps as mergeProps12 } from "@react-aria/utils";
|
|
2764
|
+
import { Box as Box35, useStateProps as useStateProps15 } from "@marigold/system";
|
|
2535
2765
|
|
|
2536
2766
|
// src/Table/utils.ts
|
|
2537
2767
|
var mapCheckboxProps = ({
|
|
@@ -2555,7 +2785,7 @@ var mapCheckboxProps = ({
|
|
|
2555
2785
|
|
|
2556
2786
|
// src/Table/TableCheckboxCell.tsx
|
|
2557
2787
|
var TableCheckboxCell = ({ cell }) => {
|
|
2558
|
-
const ref =
|
|
2788
|
+
const ref = useRef14(null);
|
|
2559
2789
|
const { state, styles } = useTableContext();
|
|
2560
2790
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
2561
2791
|
const { gridCellProps } = useTableCell2(
|
|
@@ -2568,10 +2798,10 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
2568
2798
|
const { checkboxProps } = mapCheckboxProps(
|
|
2569
2799
|
useTableSelectionCheckbox({ key: cell.parentKey }, state)
|
|
2570
2800
|
);
|
|
2571
|
-
const { focusProps, isFocusVisible } =
|
|
2572
|
-
const stateProps =
|
|
2573
|
-
return /* @__PURE__ */
|
|
2574
|
-
|
|
2801
|
+
const { focusProps, isFocusVisible } = useFocusRing11();
|
|
2802
|
+
const stateProps = useStateProps15({ disabled, focusVisible: isFocusVisible });
|
|
2803
|
+
return /* @__PURE__ */ React60.createElement(
|
|
2804
|
+
Box35,
|
|
2575
2805
|
{
|
|
2576
2806
|
as: "td",
|
|
2577
2807
|
ref,
|
|
@@ -2581,25 +2811,25 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
2581
2811
|
lineHeight: 1
|
|
2582
2812
|
},
|
|
2583
2813
|
css: styles.cell,
|
|
2584
|
-
...
|
|
2814
|
+
...mergeProps12(gridCellProps, focusProps),
|
|
2585
2815
|
...stateProps
|
|
2586
2816
|
},
|
|
2587
|
-
/* @__PURE__ */
|
|
2817
|
+
/* @__PURE__ */ React60.createElement(Checkbox, { ...checkboxProps })
|
|
2588
2818
|
);
|
|
2589
2819
|
};
|
|
2590
2820
|
|
|
2591
2821
|
// src/Table/TableColumnHeader.tsx
|
|
2592
|
-
import
|
|
2593
|
-
import { useFocusRing as
|
|
2594
|
-
import { useHover as
|
|
2822
|
+
import React61, { useRef as useRef15 } from "react";
|
|
2823
|
+
import { useFocusRing as useFocusRing12 } from "@react-aria/focus";
|
|
2824
|
+
import { useHover as useHover7 } from "@react-aria/interactions";
|
|
2595
2825
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
2596
|
-
import { mergeProps as
|
|
2597
|
-
import { Box as
|
|
2826
|
+
import { mergeProps as mergeProps13 } from "@react-aria/utils";
|
|
2827
|
+
import { Box as Box36, useStateProps as useStateProps16 } from "@marigold/system";
|
|
2598
2828
|
var SortIndicator = ({
|
|
2599
2829
|
direction = "ascending",
|
|
2600
2830
|
visible
|
|
2601
|
-
}) => /* @__PURE__ */
|
|
2602
|
-
|
|
2831
|
+
}) => /* @__PURE__ */ React61.createElement(
|
|
2832
|
+
Box36,
|
|
2603
2833
|
{
|
|
2604
2834
|
as: "span",
|
|
2605
2835
|
role: "presentation",
|
|
@@ -2614,7 +2844,7 @@ var SortIndicator = ({
|
|
|
2614
2844
|
);
|
|
2615
2845
|
var TableColumnHeader = ({ column }) => {
|
|
2616
2846
|
var _a, _b;
|
|
2617
|
-
const ref =
|
|
2847
|
+
const ref = useRef15(null);
|
|
2618
2848
|
const { state, styles } = useTableContext();
|
|
2619
2849
|
const { columnHeaderProps } = useTableColumnHeader(
|
|
2620
2850
|
{
|
|
@@ -2623,25 +2853,25 @@ var TableColumnHeader = ({ column }) => {
|
|
|
2623
2853
|
state,
|
|
2624
2854
|
ref
|
|
2625
2855
|
);
|
|
2626
|
-
const { hoverProps, isHovered } =
|
|
2627
|
-
const { focusProps, isFocusVisible } =
|
|
2628
|
-
const stateProps =
|
|
2856
|
+
const { hoverProps, isHovered } = useHover7({});
|
|
2857
|
+
const { focusProps, isFocusVisible } = useFocusRing12();
|
|
2858
|
+
const stateProps = useStateProps16({
|
|
2629
2859
|
hover: isHovered,
|
|
2630
2860
|
focusVisible: isFocusVisible
|
|
2631
2861
|
});
|
|
2632
|
-
return /* @__PURE__ */
|
|
2633
|
-
|
|
2862
|
+
return /* @__PURE__ */ React61.createElement(
|
|
2863
|
+
Box36,
|
|
2634
2864
|
{
|
|
2635
2865
|
as: "th",
|
|
2636
2866
|
colSpan: column.colspan,
|
|
2637
2867
|
ref,
|
|
2638
2868
|
__baseCSS: { cursor: "default" },
|
|
2639
2869
|
css: styles.header,
|
|
2640
|
-
...
|
|
2870
|
+
...mergeProps13(columnHeaderProps, hoverProps, focusProps),
|
|
2641
2871
|
...stateProps
|
|
2642
2872
|
},
|
|
2643
2873
|
column.rendered,
|
|
2644
|
-
column.props.allowsSorting && /* @__PURE__ */
|
|
2874
|
+
column.props.allowsSorting && /* @__PURE__ */ React61.createElement(
|
|
2645
2875
|
SortIndicator,
|
|
2646
2876
|
{
|
|
2647
2877
|
direction: (_a = state.sortDescriptor) == null ? void 0 : _a.direction,
|
|
@@ -2652,32 +2882,32 @@ var TableColumnHeader = ({ column }) => {
|
|
|
2652
2882
|
};
|
|
2653
2883
|
|
|
2654
2884
|
// src/Table/TableHeader.tsx
|
|
2655
|
-
import
|
|
2885
|
+
import React62 from "react";
|
|
2656
2886
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
2657
2887
|
var TableHeader = ({ children }) => {
|
|
2658
2888
|
const { rowGroupProps } = useTableRowGroup2();
|
|
2659
|
-
return /* @__PURE__ */
|
|
2889
|
+
return /* @__PURE__ */ React62.createElement("thead", { ...rowGroupProps }, children);
|
|
2660
2890
|
};
|
|
2661
2891
|
|
|
2662
2892
|
// src/Table/TableHeaderRow.tsx
|
|
2663
|
-
import
|
|
2893
|
+
import React63, { useRef as useRef16 } from "react";
|
|
2664
2894
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
2665
2895
|
var TableHeaderRow = ({ item, children }) => {
|
|
2666
2896
|
const { state } = useTableContext();
|
|
2667
|
-
const ref =
|
|
2897
|
+
const ref = useRef16(null);
|
|
2668
2898
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
2669
|
-
return /* @__PURE__ */
|
|
2899
|
+
return /* @__PURE__ */ React63.createElement("tr", { ...rowProps, ref }, children);
|
|
2670
2900
|
};
|
|
2671
2901
|
|
|
2672
2902
|
// src/Table/TableRow.tsx
|
|
2673
|
-
import
|
|
2674
|
-
import { useFocusRing as
|
|
2675
|
-
import { useHover as
|
|
2903
|
+
import React64, { useRef as useRef17 } from "react";
|
|
2904
|
+
import { useFocusRing as useFocusRing13 } from "@react-aria/focus";
|
|
2905
|
+
import { useHover as useHover8 } from "@react-aria/interactions";
|
|
2676
2906
|
import { useTableRow } from "@react-aria/table";
|
|
2677
|
-
import { mergeProps as
|
|
2678
|
-
import { Box as
|
|
2907
|
+
import { mergeProps as mergeProps14 } from "@react-aria/utils";
|
|
2908
|
+
import { Box as Box37, useComponentStyles as useComponentStyles27, useStateProps as useStateProps17 } from "@marigold/system";
|
|
2679
2909
|
var TableRow = ({ children, row }) => {
|
|
2680
|
-
const ref =
|
|
2910
|
+
const ref = useRef17(null);
|
|
2681
2911
|
const { interactive, state, ...ctx } = useTableContext();
|
|
2682
2912
|
const { variant, size } = row.props;
|
|
2683
2913
|
const { row: styles } = useComponentStyles27(
|
|
@@ -2694,19 +2924,19 @@ var TableRow = ({ children, row }) => {
|
|
|
2694
2924
|
);
|
|
2695
2925
|
const disabled = state.disabledKeys.has(row.key);
|
|
2696
2926
|
const selected = state.selectionManager.isSelected(row.key);
|
|
2697
|
-
const { focusProps, isFocusVisible } =
|
|
2698
|
-
const { hoverProps, isHovered } =
|
|
2927
|
+
const { focusProps, isFocusVisible } = useFocusRing13({ within: true });
|
|
2928
|
+
const { hoverProps, isHovered } = useHover8({
|
|
2699
2929
|
isDisabled: disabled || !interactive
|
|
2700
2930
|
});
|
|
2701
|
-
const stateProps =
|
|
2931
|
+
const stateProps = useStateProps17({
|
|
2702
2932
|
disabled,
|
|
2703
2933
|
selected,
|
|
2704
2934
|
hover: isHovered,
|
|
2705
2935
|
focusVisible: isFocusVisible,
|
|
2706
2936
|
active: isPressed
|
|
2707
2937
|
});
|
|
2708
|
-
return /* @__PURE__ */
|
|
2709
|
-
|
|
2938
|
+
return /* @__PURE__ */ React64.createElement(
|
|
2939
|
+
Box37,
|
|
2710
2940
|
{
|
|
2711
2941
|
as: "tr",
|
|
2712
2942
|
ref,
|
|
@@ -2714,7 +2944,7 @@ var TableRow = ({ children, row }) => {
|
|
|
2714
2944
|
cursor: !interactive ? "text" : disabled ? "default" : "pointer"
|
|
2715
2945
|
},
|
|
2716
2946
|
css: styles,
|
|
2717
|
-
...
|
|
2947
|
+
...mergeProps14(rowProps, focusProps, hoverProps),
|
|
2718
2948
|
...stateProps
|
|
2719
2949
|
},
|
|
2720
2950
|
children
|
|
@@ -2722,17 +2952,17 @@ var TableRow = ({ children, row }) => {
|
|
|
2722
2952
|
};
|
|
2723
2953
|
|
|
2724
2954
|
// src/Table/TableSelectAllCell.tsx
|
|
2725
|
-
import
|
|
2726
|
-
import { useFocusRing as
|
|
2727
|
-
import { useHover as
|
|
2955
|
+
import React65, { useRef as useRef18 } from "react";
|
|
2956
|
+
import { useFocusRing as useFocusRing14 } from "@react-aria/focus";
|
|
2957
|
+
import { useHover as useHover9 } from "@react-aria/interactions";
|
|
2728
2958
|
import {
|
|
2729
2959
|
useTableColumnHeader as useTableColumnHeader2,
|
|
2730
2960
|
useTableSelectAllCheckbox
|
|
2731
2961
|
} from "@react-aria/table";
|
|
2732
|
-
import { mergeProps as
|
|
2733
|
-
import { Box as
|
|
2962
|
+
import { mergeProps as mergeProps15 } from "@react-aria/utils";
|
|
2963
|
+
import { Box as Box38, useStateProps as useStateProps18 } from "@marigold/system";
|
|
2734
2964
|
var TableSelectAllCell = ({ column }) => {
|
|
2735
|
-
const ref =
|
|
2965
|
+
const ref = useRef18(null);
|
|
2736
2966
|
const { state, styles } = useTableContext();
|
|
2737
2967
|
const { columnHeaderProps } = useTableColumnHeader2(
|
|
2738
2968
|
{
|
|
@@ -2742,14 +2972,14 @@ var TableSelectAllCell = ({ column }) => {
|
|
|
2742
2972
|
ref
|
|
2743
2973
|
);
|
|
2744
2974
|
const { checkboxProps } = mapCheckboxProps(useTableSelectAllCheckbox(state));
|
|
2745
|
-
const { hoverProps, isHovered } =
|
|
2746
|
-
const { focusProps, isFocusVisible } =
|
|
2747
|
-
const stateProps =
|
|
2975
|
+
const { hoverProps, isHovered } = useHover9({});
|
|
2976
|
+
const { focusProps, isFocusVisible } = useFocusRing14();
|
|
2977
|
+
const stateProps = useStateProps18({
|
|
2748
2978
|
hover: isHovered,
|
|
2749
2979
|
focusVisible: isFocusVisible
|
|
2750
2980
|
});
|
|
2751
|
-
return /* @__PURE__ */
|
|
2752
|
-
|
|
2981
|
+
return /* @__PURE__ */ React65.createElement(
|
|
2982
|
+
Box38,
|
|
2753
2983
|
{
|
|
2754
2984
|
as: "th",
|
|
2755
2985
|
ref,
|
|
@@ -2759,10 +2989,10 @@ var TableSelectAllCell = ({ column }) => {
|
|
|
2759
2989
|
lineHeight: 1
|
|
2760
2990
|
},
|
|
2761
2991
|
css: styles.header,
|
|
2762
|
-
...
|
|
2992
|
+
...mergeProps15(columnHeaderProps, hoverProps, focusProps),
|
|
2763
2993
|
...stateProps
|
|
2764
2994
|
},
|
|
2765
|
-
/* @__PURE__ */
|
|
2995
|
+
/* @__PURE__ */ React65.createElement(Checkbox, { ...checkboxProps })
|
|
2766
2996
|
);
|
|
2767
2997
|
};
|
|
2768
2998
|
|
|
@@ -2775,7 +3005,7 @@ var Table = ({
|
|
|
2775
3005
|
...props
|
|
2776
3006
|
}) => {
|
|
2777
3007
|
const interactive = selectionMode !== "none";
|
|
2778
|
-
const tableRef =
|
|
3008
|
+
const tableRef = useRef19(null);
|
|
2779
3009
|
const state = useTableState({
|
|
2780
3010
|
...props,
|
|
2781
3011
|
selectionMode,
|
|
@@ -2789,8 +3019,8 @@ var Table = ({
|
|
|
2789
3019
|
{ parts: ["table", "header", "row", "cell"] }
|
|
2790
3020
|
);
|
|
2791
3021
|
const { collection } = state;
|
|
2792
|
-
return /* @__PURE__ */
|
|
2793
|
-
|
|
3022
|
+
return /* @__PURE__ */ React66.createElement(TableContext.Provider, { value: { state, interactive, styles } }, /* @__PURE__ */ React66.createElement(
|
|
3023
|
+
Box39,
|
|
2794
3024
|
{
|
|
2795
3025
|
as: "table",
|
|
2796
3026
|
ref: tableRef,
|
|
@@ -2804,16 +3034,16 @@ var Table = ({
|
|
|
2804
3034
|
css: styles.table,
|
|
2805
3035
|
...gridProps
|
|
2806
3036
|
},
|
|
2807
|
-
/* @__PURE__ */
|
|
3037
|
+
/* @__PURE__ */ React66.createElement(TableHeader, null, collection.headerRows.map((headerRow) => /* @__PURE__ */ React66.createElement(TableHeaderRow, { key: headerRow.key, item: headerRow }, [...headerRow.childNodes].map(
|
|
2808
3038
|
(column) => {
|
|
2809
3039
|
var _a;
|
|
2810
|
-
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3040
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ React66.createElement(TableSelectAllCell, { key: column.key, column }) : /* @__PURE__ */ React66.createElement(TableColumnHeader, { key: column.key, column });
|
|
2811
3041
|
}
|
|
2812
3042
|
)))),
|
|
2813
|
-
/* @__PURE__ */
|
|
3043
|
+
/* @__PURE__ */ React66.createElement(TableBody, null, [...collection.body.childNodes].map((row) => /* @__PURE__ */ React66.createElement(TableRow, { key: row.key, row }, [...row.childNodes].map(
|
|
2814
3044
|
(cell) => {
|
|
2815
3045
|
var _a;
|
|
2816
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3046
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ React66.createElement(TableCheckboxCell, { key: cell.key, cell }) : /* @__PURE__ */ React66.createElement(TableCell, { key: cell.key, cell });
|
|
2817
3047
|
}
|
|
2818
3048
|
))))
|
|
2819
3049
|
));
|
|
@@ -2825,11 +3055,11 @@ Table.Header = Header2;
|
|
|
2825
3055
|
Table.Row = Row;
|
|
2826
3056
|
|
|
2827
3057
|
// src/Text/Text.tsx
|
|
2828
|
-
import
|
|
3058
|
+
import React67 from "react";
|
|
2829
3059
|
import {
|
|
2830
3060
|
useComponentStyles as useComponentStyles29
|
|
2831
3061
|
} from "@marigold/system";
|
|
2832
|
-
import { Box as
|
|
3062
|
+
import { Box as Box40 } from "@marigold/system";
|
|
2833
3063
|
var Text = ({
|
|
2834
3064
|
variant,
|
|
2835
3065
|
size,
|
|
@@ -2847,8 +3077,8 @@ var Text = ({
|
|
|
2847
3077
|
variant,
|
|
2848
3078
|
size
|
|
2849
3079
|
});
|
|
2850
|
-
return /* @__PURE__ */
|
|
2851
|
-
|
|
3080
|
+
return /* @__PURE__ */ React67.createElement(
|
|
3081
|
+
Box40,
|
|
2852
3082
|
{
|
|
2853
3083
|
as: "p",
|
|
2854
3084
|
...props,
|
|
@@ -2870,15 +3100,15 @@ var Text = ({
|
|
|
2870
3100
|
};
|
|
2871
3101
|
|
|
2872
3102
|
// src/TextArea/TextArea.tsx
|
|
2873
|
-
import
|
|
2874
|
-
import { useHover as
|
|
2875
|
-
import { useFocusRing as
|
|
3103
|
+
import React68, { forwardRef as forwardRef14 } from "react";
|
|
3104
|
+
import { useHover as useHover10 } from "@react-aria/interactions";
|
|
3105
|
+
import { useFocusRing as useFocusRing15 } from "@react-aria/focus";
|
|
2876
3106
|
import { useTextField } from "@react-aria/textfield";
|
|
2877
|
-
import { useObjectRef as
|
|
3107
|
+
import { useObjectRef as useObjectRef13 } from "@react-aria/utils";
|
|
2878
3108
|
import {
|
|
2879
|
-
Box as
|
|
3109
|
+
Box as Box41,
|
|
2880
3110
|
useComponentStyles as useComponentStyles30,
|
|
2881
|
-
useStateProps as
|
|
3111
|
+
useStateProps as useStateProps19
|
|
2882
3112
|
} from "@marigold/system";
|
|
2883
3113
|
var TextArea = forwardRef14(
|
|
2884
3114
|
({
|
|
@@ -2893,7 +3123,7 @@ var TextArea = forwardRef14(
|
|
|
2893
3123
|
...props
|
|
2894
3124
|
}, ref) => {
|
|
2895
3125
|
const { label, description, errorMessage } = props;
|
|
2896
|
-
const textAreaRef =
|
|
3126
|
+
const textAreaRef = useObjectRef13(ref);
|
|
2897
3127
|
const { labelProps, inputProps, descriptionProps, errorMessageProps } = useTextField(
|
|
2898
3128
|
{
|
|
2899
3129
|
inputElementType: "textarea",
|
|
@@ -2905,9 +3135,9 @@ var TextArea = forwardRef14(
|
|
|
2905
3135
|
},
|
|
2906
3136
|
textAreaRef
|
|
2907
3137
|
);
|
|
2908
|
-
const { hoverProps, isHovered } =
|
|
2909
|
-
const { focusProps, isFocusVisible } =
|
|
2910
|
-
const stateProps =
|
|
3138
|
+
const { hoverProps, isHovered } = useHover10({});
|
|
3139
|
+
const { focusProps, isFocusVisible } = useFocusRing15();
|
|
3140
|
+
const stateProps = useStateProps19({
|
|
2911
3141
|
hover: isHovered,
|
|
2912
3142
|
focus: isFocusVisible,
|
|
2913
3143
|
disabled,
|
|
@@ -2915,7 +3145,7 @@ var TextArea = forwardRef14(
|
|
|
2915
3145
|
error
|
|
2916
3146
|
});
|
|
2917
3147
|
const styles = useComponentStyles30("TextArea", { variant, size });
|
|
2918
|
-
return /* @__PURE__ */
|
|
3148
|
+
return /* @__PURE__ */ React68.createElement(
|
|
2919
3149
|
FieldBase,
|
|
2920
3150
|
{
|
|
2921
3151
|
label,
|
|
@@ -2931,8 +3161,8 @@ var TextArea = forwardRef14(
|
|
|
2931
3161
|
size,
|
|
2932
3162
|
width
|
|
2933
3163
|
},
|
|
2934
|
-
/* @__PURE__ */
|
|
2935
|
-
|
|
3164
|
+
/* @__PURE__ */ React68.createElement(
|
|
3165
|
+
Box41,
|
|
2936
3166
|
{
|
|
2937
3167
|
as: "textarea",
|
|
2938
3168
|
css: styles,
|
|
@@ -2949,16 +3179,16 @@ var TextArea = forwardRef14(
|
|
|
2949
3179
|
);
|
|
2950
3180
|
|
|
2951
3181
|
// src/TextField/TextField.tsx
|
|
2952
|
-
import
|
|
2953
|
-
import { useHover as
|
|
2954
|
-
import { useFocusRing as
|
|
3182
|
+
import React69, { forwardRef as forwardRef15 } from "react";
|
|
3183
|
+
import { useHover as useHover11 } from "@react-aria/interactions";
|
|
3184
|
+
import { useFocusRing as useFocusRing16 } from "@react-aria/focus";
|
|
2955
3185
|
import { useTextField as useTextField2 } from "@react-aria/textfield";
|
|
2956
|
-
import { useObjectRef as
|
|
2957
|
-
import { useStateProps as
|
|
3186
|
+
import { useObjectRef as useObjectRef14 } from "@react-aria/utils";
|
|
3187
|
+
import { useStateProps as useStateProps20 } from "@marigold/system";
|
|
2958
3188
|
var TextField = forwardRef15(
|
|
2959
3189
|
({ variant, size, width, disabled, required, readOnly, error, ...props }, ref) => {
|
|
2960
3190
|
const { label, description, errorMessage, autoFocus } = props;
|
|
2961
|
-
const inputRef =
|
|
3191
|
+
const inputRef = useObjectRef14(ref);
|
|
2962
3192
|
const { labelProps, inputProps, descriptionProps, errorMessageProps } = useTextField2(
|
|
2963
3193
|
{
|
|
2964
3194
|
isDisabled: disabled,
|
|
@@ -2969,19 +3199,19 @@ var TextField = forwardRef15(
|
|
|
2969
3199
|
},
|
|
2970
3200
|
inputRef
|
|
2971
3201
|
);
|
|
2972
|
-
const { hoverProps, isHovered } =
|
|
2973
|
-
const { focusProps,
|
|
3202
|
+
const { hoverProps, isHovered } = useHover11({});
|
|
3203
|
+
const { focusProps, isFocused } = useFocusRing16({
|
|
2974
3204
|
isTextInput: true,
|
|
2975
3205
|
autoFocus
|
|
2976
3206
|
});
|
|
2977
|
-
const stateProps =
|
|
3207
|
+
const stateProps = useStateProps20({
|
|
2978
3208
|
hover: isHovered,
|
|
2979
|
-
focus:
|
|
3209
|
+
focus: isFocused,
|
|
2980
3210
|
disabled,
|
|
2981
3211
|
readOnly,
|
|
2982
3212
|
error
|
|
2983
3213
|
});
|
|
2984
|
-
return /* @__PURE__ */
|
|
3214
|
+
return /* @__PURE__ */ React69.createElement(
|
|
2985
3215
|
FieldBase,
|
|
2986
3216
|
{
|
|
2987
3217
|
label,
|
|
@@ -2997,8 +3227,8 @@ var TextField = forwardRef15(
|
|
|
2997
3227
|
size,
|
|
2998
3228
|
width
|
|
2999
3229
|
},
|
|
3000
|
-
/* @__PURE__ */
|
|
3001
|
-
Input,
|
|
3230
|
+
/* @__PURE__ */ React69.createElement(Input, { ...stateProps }, /* @__PURE__ */ React69.createElement(
|
|
3231
|
+
Input.Field,
|
|
3002
3232
|
{
|
|
3003
3233
|
ref: inputRef,
|
|
3004
3234
|
variant,
|
|
@@ -3008,13 +3238,13 @@ var TextField = forwardRef15(
|
|
|
3008
3238
|
...hoverProps,
|
|
3009
3239
|
...stateProps
|
|
3010
3240
|
}
|
|
3011
|
-
)
|
|
3241
|
+
))
|
|
3012
3242
|
);
|
|
3013
3243
|
}
|
|
3014
3244
|
);
|
|
3015
3245
|
|
|
3016
3246
|
// src/Tiles/Tiles.tsx
|
|
3017
|
-
import
|
|
3247
|
+
import React70 from "react";
|
|
3018
3248
|
import { useTheme as useTheme3 } from "@marigold/system";
|
|
3019
3249
|
var Tiles = ({
|
|
3020
3250
|
space = "none",
|
|
@@ -3030,7 +3260,7 @@ var Tiles = ({
|
|
|
3030
3260
|
if (stretch) {
|
|
3031
3261
|
column = `minmax(${column}, 1fr)`;
|
|
3032
3262
|
}
|
|
3033
|
-
return /* @__PURE__ */
|
|
3263
|
+
return /* @__PURE__ */ React70.createElement(
|
|
3034
3264
|
Box,
|
|
3035
3265
|
{
|
|
3036
3266
|
...props,
|
|
@@ -3050,10 +3280,10 @@ var Tiles = ({
|
|
|
3050
3280
|
};
|
|
3051
3281
|
|
|
3052
3282
|
// src/Tooltip/Tooltip.tsx
|
|
3053
|
-
import
|
|
3283
|
+
import React72 from "react";
|
|
3054
3284
|
import { useTooltip } from "@react-aria/tooltip";
|
|
3055
3285
|
import {
|
|
3056
|
-
Box as
|
|
3286
|
+
Box as Box42,
|
|
3057
3287
|
useComponentStyles as useComponentStyles31
|
|
3058
3288
|
} from "@marigold/system";
|
|
3059
3289
|
|
|
@@ -3063,7 +3293,7 @@ var TooltipContext = createContext9({});
|
|
|
3063
3293
|
var useTooltipContext = () => useContext9(TooltipContext);
|
|
3064
3294
|
|
|
3065
3295
|
// src/Tooltip/TooltipTrigger.tsx
|
|
3066
|
-
import
|
|
3296
|
+
import React71, { useRef as useRef20 } from "react";
|
|
3067
3297
|
import { FocusableProvider } from "@react-aria/focus";
|
|
3068
3298
|
import { useOverlayPosition } from "@react-aria/overlays";
|
|
3069
3299
|
import { useTooltipTrigger } from "@react-aria/tooltip";
|
|
@@ -3076,7 +3306,7 @@ var TooltipTrigger = ({
|
|
|
3076
3306
|
children,
|
|
3077
3307
|
...rest
|
|
3078
3308
|
}) => {
|
|
3079
|
-
const [tooltipTrigger, tooltip] =
|
|
3309
|
+
const [tooltipTrigger, tooltip] = React71.Children.toArray(children);
|
|
3080
3310
|
const props = {
|
|
3081
3311
|
...rest,
|
|
3082
3312
|
isDisabled: disabled,
|
|
@@ -3084,8 +3314,8 @@ var TooltipTrigger = ({
|
|
|
3084
3314
|
delay,
|
|
3085
3315
|
placement
|
|
3086
3316
|
};
|
|
3087
|
-
const tooltipTriggerRef =
|
|
3088
|
-
const overlayRef =
|
|
3317
|
+
const tooltipTriggerRef = useRef20(null);
|
|
3318
|
+
const overlayRef = useRef20(null);
|
|
3089
3319
|
const state = useTooltipTriggerState(props);
|
|
3090
3320
|
const { triggerProps, tooltipProps } = useTooltipTrigger(
|
|
3091
3321
|
props,
|
|
@@ -3104,7 +3334,7 @@ var TooltipTrigger = ({
|
|
|
3104
3334
|
isOpen: state.isOpen,
|
|
3105
3335
|
overlayRef
|
|
3106
3336
|
});
|
|
3107
|
-
return /* @__PURE__ */
|
|
3337
|
+
return /* @__PURE__ */ React71.createElement(FocusableProvider, { ref: tooltipTriggerRef, ...triggerProps }, tooltipTrigger, /* @__PURE__ */ React71.createElement(
|
|
3108
3338
|
TooltipContext.Provider,
|
|
3109
3339
|
{
|
|
3110
3340
|
value: {
|
|
@@ -3116,7 +3346,7 @@ var TooltipTrigger = ({
|
|
|
3116
3346
|
...positionProps
|
|
3117
3347
|
}
|
|
3118
3348
|
},
|
|
3119
|
-
/* @__PURE__ */
|
|
3349
|
+
/* @__PURE__ */ React71.createElement(Overlay, { open: state.isOpen }, tooltip)
|
|
3120
3350
|
));
|
|
3121
3351
|
};
|
|
3122
3352
|
|
|
@@ -3129,8 +3359,8 @@ var Tooltip = ({ children, variant, size }) => {
|
|
|
3129
3359
|
{ variant, size },
|
|
3130
3360
|
{ parts: ["container", "arrow"] }
|
|
3131
3361
|
);
|
|
3132
|
-
return /* @__PURE__ */
|
|
3133
|
-
|
|
3362
|
+
return /* @__PURE__ */ React72.createElement(
|
|
3363
|
+
Box42,
|
|
3134
3364
|
{
|
|
3135
3365
|
...tooltipProps,
|
|
3136
3366
|
...rest,
|
|
@@ -3138,9 +3368,9 @@ var Tooltip = ({ children, variant, size }) => {
|
|
|
3138
3368
|
css: styles.container,
|
|
3139
3369
|
"data-placement": placement
|
|
3140
3370
|
},
|
|
3141
|
-
/* @__PURE__ */
|
|
3142
|
-
/* @__PURE__ */
|
|
3143
|
-
|
|
3371
|
+
/* @__PURE__ */ React72.createElement("div", null, children),
|
|
3372
|
+
/* @__PURE__ */ React72.createElement(
|
|
3373
|
+
Box42,
|
|
3144
3374
|
{
|
|
3145
3375
|
...arrowProps,
|
|
3146
3376
|
__baseCSS: {
|
|
@@ -3160,10 +3390,10 @@ var Tooltip = ({ children, variant, size }) => {
|
|
|
3160
3390
|
Tooltip.Trigger = TooltipTrigger;
|
|
3161
3391
|
|
|
3162
3392
|
// src/XLoader/XLoader.tsx
|
|
3163
|
-
import { SVG as
|
|
3164
|
-
import
|
|
3165
|
-
var XLoader = forwardRef16((props, ref) => /* @__PURE__ */
|
|
3166
|
-
|
|
3393
|
+
import { SVG as SVG5 } from "@marigold/system";
|
|
3394
|
+
import React73, { forwardRef as forwardRef16 } from "react";
|
|
3395
|
+
var XLoader = forwardRef16((props, ref) => /* @__PURE__ */ React73.createElement(
|
|
3396
|
+
SVG5,
|
|
3167
3397
|
{
|
|
3168
3398
|
id: "XLoader",
|
|
3169
3399
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3172,14 +3402,14 @@ var XLoader = forwardRef16((props, ref) => /* @__PURE__ */ React69.createElement
|
|
|
3172
3402
|
...props,
|
|
3173
3403
|
...ref
|
|
3174
3404
|
},
|
|
3175
|
-
/* @__PURE__ */
|
|
3176
|
-
/* @__PURE__ */
|
|
3405
|
+
/* @__PURE__ */ React73.createElement("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
3406
|
+
/* @__PURE__ */ React73.createElement(
|
|
3177
3407
|
"path",
|
|
3178
3408
|
{
|
|
3179
3409
|
id: "XMLID_5_",
|
|
3180
3410
|
d: "M124.3 12.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z"
|
|
3181
3411
|
},
|
|
3182
|
-
/* @__PURE__ */
|
|
3412
|
+
/* @__PURE__ */ React73.createElement(
|
|
3183
3413
|
"animate",
|
|
3184
3414
|
{
|
|
3185
3415
|
attributeName: "opacity",
|
|
@@ -3191,13 +3421,13 @@ var XLoader = forwardRef16((props, ref) => /* @__PURE__ */ React69.createElement
|
|
|
3191
3421
|
}
|
|
3192
3422
|
)
|
|
3193
3423
|
),
|
|
3194
|
-
/* @__PURE__ */
|
|
3424
|
+
/* @__PURE__ */ React73.createElement(
|
|
3195
3425
|
"path",
|
|
3196
3426
|
{
|
|
3197
3427
|
id: "XMLID_18_",
|
|
3198
3428
|
d: "M115.9 24.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z"
|
|
3199
3429
|
},
|
|
3200
|
-
/* @__PURE__ */
|
|
3430
|
+
/* @__PURE__ */ React73.createElement(
|
|
3201
3431
|
"animate",
|
|
3202
3432
|
{
|
|
3203
3433
|
attributeName: "opacity",
|
|
@@ -3209,13 +3439,13 @@ var XLoader = forwardRef16((props, ref) => /* @__PURE__ */ React69.createElement
|
|
|
3209
3439
|
}
|
|
3210
3440
|
)
|
|
3211
3441
|
),
|
|
3212
|
-
/* @__PURE__ */
|
|
3442
|
+
/* @__PURE__ */ React73.createElement(
|
|
3213
3443
|
"path",
|
|
3214
3444
|
{
|
|
3215
3445
|
id: "XMLID_19_",
|
|
3216
3446
|
d: "M107.5 35.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z"
|
|
3217
3447
|
},
|
|
3218
|
-
/* @__PURE__ */
|
|
3448
|
+
/* @__PURE__ */ React73.createElement(
|
|
3219
3449
|
"animate",
|
|
3220
3450
|
{
|
|
3221
3451
|
attributeName: "opacity",
|
|
@@ -3227,13 +3457,13 @@ var XLoader = forwardRef16((props, ref) => /* @__PURE__ */ React69.createElement
|
|
|
3227
3457
|
}
|
|
3228
3458
|
)
|
|
3229
3459
|
),
|
|
3230
|
-
/* @__PURE__ */
|
|
3460
|
+
/* @__PURE__ */ React73.createElement(
|
|
3231
3461
|
"path",
|
|
3232
3462
|
{
|
|
3233
3463
|
id: "XMLID_20_",
|
|
3234
3464
|
d: "M99.1 47.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z"
|
|
3235
3465
|
},
|
|
3236
|
-
/* @__PURE__ */
|
|
3466
|
+
/* @__PURE__ */ React73.createElement(
|
|
3237
3467
|
"animate",
|
|
3238
3468
|
{
|
|
3239
3469
|
attributeName: "opacity",
|
|
@@ -3245,13 +3475,13 @@ var XLoader = forwardRef16((props, ref) => /* @__PURE__ */ React69.createElement
|
|
|
3245
3475
|
}
|
|
3246
3476
|
)
|
|
3247
3477
|
),
|
|
3248
|
-
/* @__PURE__ */
|
|
3478
|
+
/* @__PURE__ */ React73.createElement(
|
|
3249
3479
|
"path",
|
|
3250
3480
|
{
|
|
3251
3481
|
id: "XMLID_21_",
|
|
3252
3482
|
d: "M90.7 59H90c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.8-2.2 4.9-4.9 4.9z"
|
|
3253
3483
|
},
|
|
3254
|
-
/* @__PURE__ */
|
|
3484
|
+
/* @__PURE__ */ React73.createElement(
|
|
3255
3485
|
"animate",
|
|
3256
3486
|
{
|
|
3257
3487
|
attributeName: "opacity",
|
|
@@ -3263,13 +3493,13 @@ var XLoader = forwardRef16((props, ref) => /* @__PURE__ */ React69.createElement
|
|
|
3263
3493
|
}
|
|
3264
3494
|
)
|
|
3265
3495
|
),
|
|
3266
|
-
/* @__PURE__ */
|
|
3496
|
+
/* @__PURE__ */ React73.createElement(
|
|
3267
3497
|
"path",
|
|
3268
3498
|
{
|
|
3269
3499
|
id: "XMLID_22_",
|
|
3270
3500
|
d: "M68 89.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.8c0 2.6-2.2 4.8-4.9 4.8z"
|
|
3271
3501
|
},
|
|
3272
|
-
/* @__PURE__ */
|
|
3502
|
+
/* @__PURE__ */ React73.createElement(
|
|
3273
3503
|
"animate",
|
|
3274
3504
|
{
|
|
3275
3505
|
attributeName: "opacity",
|
|
@@ -3281,13 +3511,13 @@ var XLoader = forwardRef16((props, ref) => /* @__PURE__ */ React69.createElement
|
|
|
3281
3511
|
}
|
|
3282
3512
|
)
|
|
3283
3513
|
),
|
|
3284
|
-
/* @__PURE__ */
|
|
3514
|
+
/* @__PURE__ */ React73.createElement(
|
|
3285
3515
|
"path",
|
|
3286
3516
|
{
|
|
3287
3517
|
id: "XMLID_23_",
|
|
3288
3518
|
d: "M59.6 101.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z"
|
|
3289
3519
|
},
|
|
3290
|
-
/* @__PURE__ */
|
|
3520
|
+
/* @__PURE__ */ React73.createElement(
|
|
3291
3521
|
"animate",
|
|
3292
3522
|
{
|
|
3293
3523
|
attributeName: "opacity",
|
|
@@ -3299,13 +3529,13 @@ var XLoader = forwardRef16((props, ref) => /* @__PURE__ */ React69.createElement
|
|
|
3299
3529
|
}
|
|
3300
3530
|
)
|
|
3301
3531
|
),
|
|
3302
|
-
/* @__PURE__ */
|
|
3532
|
+
/* @__PURE__ */ React73.createElement(
|
|
3303
3533
|
"path",
|
|
3304
3534
|
{
|
|
3305
3535
|
id: "XMLID_24_",
|
|
3306
3536
|
d: "M51.2 112.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z"
|
|
3307
3537
|
},
|
|
3308
|
-
/* @__PURE__ */
|
|
3538
|
+
/* @__PURE__ */ React73.createElement(
|
|
3309
3539
|
"animate",
|
|
3310
3540
|
{
|
|
3311
3541
|
attributeName: "opacity",
|
|
@@ -3317,13 +3547,13 @@ var XLoader = forwardRef16((props, ref) => /* @__PURE__ */ React69.createElement
|
|
|
3317
3547
|
}
|
|
3318
3548
|
)
|
|
3319
3549
|
),
|
|
3320
|
-
/* @__PURE__ */
|
|
3550
|
+
/* @__PURE__ */ React73.createElement(
|
|
3321
3551
|
"path",
|
|
3322
3552
|
{
|
|
3323
3553
|
id: "XMLID_25_",
|
|
3324
3554
|
d: "M42.8 124.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z"
|
|
3325
3555
|
},
|
|
3326
|
-
/* @__PURE__ */
|
|
3556
|
+
/* @__PURE__ */ React73.createElement(
|
|
3327
3557
|
"animate",
|
|
3328
3558
|
{
|
|
3329
3559
|
attributeName: "opacity",
|
|
@@ -3335,13 +3565,13 @@ var XLoader = forwardRef16((props, ref) => /* @__PURE__ */ React69.createElement
|
|
|
3335
3565
|
}
|
|
3336
3566
|
)
|
|
3337
3567
|
),
|
|
3338
|
-
/* @__PURE__ */
|
|
3568
|
+
/* @__PURE__ */ React73.createElement(
|
|
3339
3569
|
"path",
|
|
3340
3570
|
{
|
|
3341
3571
|
id: "XMLID_26_",
|
|
3342
3572
|
d: "M34.4 136h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z"
|
|
3343
3573
|
},
|
|
3344
|
-
/* @__PURE__ */
|
|
3574
|
+
/* @__PURE__ */ React73.createElement(
|
|
3345
3575
|
"animate",
|
|
3346
3576
|
{
|
|
3347
3577
|
attributeName: "opacity",
|
|
@@ -3353,13 +3583,13 @@ var XLoader = forwardRef16((props, ref) => /* @__PURE__ */ React69.createElement
|
|
|
3353
3583
|
}
|
|
3354
3584
|
)
|
|
3355
3585
|
),
|
|
3356
|
-
/* @__PURE__ */
|
|
3586
|
+
/* @__PURE__ */ React73.createElement(
|
|
3357
3587
|
"path",
|
|
3358
3588
|
{
|
|
3359
3589
|
id: "XMLID_27_",
|
|
3360
3590
|
d: "M26 147.6h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z"
|
|
3361
3591
|
},
|
|
3362
|
-
/* @__PURE__ */
|
|
3592
|
+
/* @__PURE__ */ React73.createElement(
|
|
3363
3593
|
"animate",
|
|
3364
3594
|
{
|
|
3365
3595
|
attributeName: "opacity",
|
|
@@ -3376,6 +3606,7 @@ export {
|
|
|
3376
3606
|
ActionMenu,
|
|
3377
3607
|
Aside,
|
|
3378
3608
|
Aspect,
|
|
3609
|
+
Autocomplete,
|
|
3379
3610
|
Badge,
|
|
3380
3611
|
Body,
|
|
3381
3612
|
Box,
|
|
@@ -3399,6 +3630,8 @@ export {
|
|
|
3399
3630
|
Image,
|
|
3400
3631
|
Inline,
|
|
3401
3632
|
Input,
|
|
3633
|
+
InputField,
|
|
3634
|
+
Inset,
|
|
3402
3635
|
Label,
|
|
3403
3636
|
Link,
|
|
3404
3637
|
List,
|