@marigold/components 11.0.2 → 11.1.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.js +420 -402
- package/dist/index.mjs +314 -296
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { useAsyncList, useListData } from "@react-stately/data";
|
|
|
3
3
|
|
|
4
4
|
// src/Accordion/Accordion.tsx
|
|
5
5
|
import { DisclosureGroup } from "react-aria-components";
|
|
6
|
-
import { useClassNames
|
|
6
|
+
import { useClassNames } from "@marigold/system";
|
|
7
7
|
|
|
8
8
|
// src/Accordion/AccordionContext.tsx
|
|
9
9
|
import { createContext, useContext } from "react";
|
|
@@ -19,126 +19,30 @@ var useAccordionContext = () => {
|
|
|
19
19
|
return ctx;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
// src/Accordion/
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
22
|
+
// src/Accordion/AccordionHeader.tsx
|
|
23
|
+
import { useContext as useContext2 } from "react";
|
|
24
|
+
import { Button, DisclosureStateContext, Heading } from "react-aria-components";
|
|
25
|
+
import { cn } from "@marigold/system";
|
|
25
26
|
|
|
26
|
-
// src/
|
|
27
|
+
// src/icons/ChevronDown.tsx
|
|
27
28
|
import { forwardRef } from "react";
|
|
28
|
-
import { Button } from "react-aria-components";
|
|
29
|
-
import { cn, useClassNames } from "@marigold/system";
|
|
30
|
-
|
|
31
|
-
// src/ProgressCycle/ProgressCycle.tsx
|
|
32
|
-
import { ProgressBar } from "react-aria-components";
|
|
33
29
|
import { SVG } from "@marigold/system";
|
|
34
|
-
import { jsx
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
...props
|
|
38
|
-
}) => {
|
|
39
|
-
let strokeWidth = 3;
|
|
40
|
-
if (size <= "24") {
|
|
41
|
-
strokeWidth = 2;
|
|
42
|
-
} else if (size >= "32") {
|
|
43
|
-
strokeWidth = 4;
|
|
44
|
-
}
|
|
45
|
-
const radius = `calc(50% - ${strokeWidth / 2}px)`;
|
|
46
|
-
return /* @__PURE__ */ jsx(ProgressBar, { ...props, "aria-label": "loading", isIndeterminate: true, children: /* @__PURE__ */ jsxs(
|
|
47
|
-
SVG,
|
|
48
|
-
{
|
|
49
|
-
className: "animate-rotate-spinner origin-center fill-none",
|
|
50
|
-
size,
|
|
51
|
-
"aria-hidden": "true",
|
|
52
|
-
role: "img",
|
|
53
|
-
children: [
|
|
54
|
-
/* @__PURE__ */ jsx(
|
|
55
|
-
"circle",
|
|
56
|
-
{
|
|
57
|
-
cx: "50%",
|
|
58
|
-
cy: "50%",
|
|
59
|
-
r: radius,
|
|
60
|
-
strokeWidth,
|
|
61
|
-
className: "stroke-transparent"
|
|
62
|
-
}
|
|
63
|
-
),
|
|
64
|
-
/* @__PURE__ */ jsx(
|
|
65
|
-
"circle",
|
|
66
|
-
{
|
|
67
|
-
cx: "50%",
|
|
68
|
-
cy: "50%",
|
|
69
|
-
r: radius,
|
|
70
|
-
strokeWidth,
|
|
71
|
-
pathLength: "100",
|
|
72
|
-
strokeDasharray: "100 200",
|
|
73
|
-
strokeDashoffset: "0",
|
|
74
|
-
strokeLinecap: "round",
|
|
75
|
-
className: "animate-progress-cycle origin-center -rotate-90 stroke-gray-800"
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
) });
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
// src/Button/Button.tsx
|
|
84
|
-
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
85
|
-
var _Button = forwardRef(
|
|
86
|
-
({
|
|
87
|
-
children,
|
|
88
|
-
variant,
|
|
89
|
-
size,
|
|
90
|
-
className,
|
|
91
|
-
disabled,
|
|
92
|
-
loading,
|
|
93
|
-
fullWidth,
|
|
94
|
-
...props
|
|
95
|
-
}, ref) => {
|
|
96
|
-
const classNames2 = useClassNames({
|
|
97
|
-
component: "Button",
|
|
98
|
-
variant,
|
|
99
|
-
size,
|
|
100
|
-
className
|
|
101
|
-
});
|
|
102
|
-
return /* @__PURE__ */ jsx2(
|
|
103
|
-
Button,
|
|
104
|
-
{
|
|
105
|
-
...props,
|
|
106
|
-
ref,
|
|
107
|
-
className: cn(
|
|
108
|
-
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
109
|
-
classNames2,
|
|
110
|
-
fullWidth ? "w-full" : void 0,
|
|
111
|
-
loading && "cursor-progress!"
|
|
112
|
-
),
|
|
113
|
-
isPending: loading,
|
|
114
|
-
isDisabled: disabled,
|
|
115
|
-
children: loading ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
116
|
-
/* @__PURE__ */ jsx2("span", { className: "absolute", children: /* @__PURE__ */ jsx2(ProgressCycle, {}) }),
|
|
117
|
-
/* @__PURE__ */ jsx2("span", { className: "invisible flex gap-[inherit]", children })
|
|
118
|
-
] }) : children
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
}
|
|
30
|
+
import { jsx } from "react/jsx-runtime";
|
|
31
|
+
var ChevronDown = forwardRef(
|
|
32
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(SVG, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ jsx("path", { d: "M5.97563 7.125L12 13.1363L18.0244 7.125L19.875 8.97563L12 16.8506L4.125 8.97563L5.97563 7.125Z" }) })
|
|
122
33
|
);
|
|
123
34
|
|
|
124
|
-
// src/
|
|
125
|
-
import {
|
|
126
|
-
import { SVG as SVG2 } from "@marigold/system";
|
|
127
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
128
|
-
var ChevronRight = forwardRef2(
|
|
129
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx3(SVG2, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ jsx3("path", { d: "M7.125 18.0244L13.1363 12L7.125 5.97563L8.97563 4.125L16.8506 12L8.97563 19.875L7.125 18.0244Z" }) })
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
// src/Accordion/AccordionHeading.tsx
|
|
133
|
-
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
35
|
+
// src/Accordion/AccordionHeader.tsx
|
|
36
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
134
37
|
var AccordionHeader = ({ children }) => {
|
|
135
38
|
const { classNames: classNames2 } = useAccordionContext();
|
|
136
|
-
|
|
39
|
+
const { isExpanded } = useContext2(DisclosureStateContext);
|
|
40
|
+
return /* @__PURE__ */ jsx2(Heading, { children: /* @__PURE__ */ jsxs(Button, { slot: "trigger", className: classNames2.header, children: [
|
|
137
41
|
children,
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
|
|
42
|
+
/* @__PURE__ */ jsx2(
|
|
43
|
+
ChevronDown,
|
|
140
44
|
{
|
|
141
|
-
className:
|
|
45
|
+
className: cn(classNames2.icon, isExpanded && "rotate-180")
|
|
142
46
|
}
|
|
143
47
|
)
|
|
144
48
|
] }) });
|
|
@@ -146,7 +50,7 @@ var AccordionHeader = ({ children }) => {
|
|
|
146
50
|
|
|
147
51
|
// src/Accordion/AccordionItem.tsx
|
|
148
52
|
import { Disclosure } from "react-aria-components";
|
|
149
|
-
import { jsx as
|
|
53
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
150
54
|
var AccordionItem = ({
|
|
151
55
|
children,
|
|
152
56
|
disabled,
|
|
@@ -154,7 +58,7 @@ var AccordionItem = ({
|
|
|
154
58
|
...props
|
|
155
59
|
}) => {
|
|
156
60
|
const { classNames: classNames2 } = useAccordionContext();
|
|
157
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ jsx3(
|
|
158
62
|
Disclosure,
|
|
159
63
|
{
|
|
160
64
|
isDisabled: disabled,
|
|
@@ -168,14 +72,14 @@ var AccordionItem = ({
|
|
|
168
72
|
|
|
169
73
|
// src/Accordion/AccordionPanel.tsx
|
|
170
74
|
import { DisclosurePanel } from "react-aria-components";
|
|
171
|
-
import { jsx as
|
|
75
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
172
76
|
var AccordionPanel = ({ children }) => {
|
|
173
77
|
const { classNames: classNames2 } = useAccordionContext();
|
|
174
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ jsx4(DisclosurePanel, { className: classNames2.content, children });
|
|
175
79
|
};
|
|
176
80
|
|
|
177
81
|
// src/Accordion/Accordion.tsx
|
|
178
|
-
import { jsx as
|
|
82
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
179
83
|
var Accordion = ({
|
|
180
84
|
children,
|
|
181
85
|
disabled,
|
|
@@ -183,8 +87,8 @@ var Accordion = ({
|
|
|
183
87
|
size,
|
|
184
88
|
...props
|
|
185
89
|
}) => {
|
|
186
|
-
const classNames2 =
|
|
187
|
-
return /* @__PURE__ */
|
|
90
|
+
const classNames2 = useClassNames({ component: "Accordion", variant, size });
|
|
91
|
+
return /* @__PURE__ */ jsx5(AccordionProvider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx5(
|
|
188
92
|
DisclosureGroup,
|
|
189
93
|
{
|
|
190
94
|
...props,
|
|
@@ -200,8 +104,8 @@ Accordion.Item = AccordionItem;
|
|
|
200
104
|
|
|
201
105
|
// src/Aside/Aside.tsx
|
|
202
106
|
import { Children } from "react";
|
|
203
|
-
import { cn as
|
|
204
|
-
import { jsx as
|
|
107
|
+
import { cn as cn2, createVar, gapSpace } from "@marigold/system";
|
|
108
|
+
import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
205
109
|
var classNames = {
|
|
206
110
|
aside: "grow basis-(--sideWidth)",
|
|
207
111
|
content: "basis-0 grow-999 [min-inline-size:var(--wrap)]"
|
|
@@ -218,8 +122,8 @@ var Aside = ({
|
|
|
218
122
|
aside: createVar({ sideWidth }),
|
|
219
123
|
content: createVar({ wrap })
|
|
220
124
|
};
|
|
221
|
-
return /* @__PURE__ */
|
|
222
|
-
/* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ jsxs2("div", { className: cn2("flex flex-wrap", gapSpace[space]), children: [
|
|
126
|
+
/* @__PURE__ */ jsx6(
|
|
223
127
|
"div",
|
|
224
128
|
{
|
|
225
129
|
className: classNames[side === "left" ? "aside" : "content"],
|
|
@@ -227,7 +131,7 @@ var Aside = ({
|
|
|
227
131
|
children: left
|
|
228
132
|
}
|
|
229
133
|
),
|
|
230
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ jsx6(
|
|
231
135
|
"div",
|
|
232
136
|
{
|
|
233
137
|
className: classNames[side === "right" ? "aside" : "content"],
|
|
@@ -239,17 +143,17 @@ var Aside = ({
|
|
|
239
143
|
};
|
|
240
144
|
|
|
241
145
|
// src/Aspect/Aspect.tsx
|
|
242
|
-
import { aspect, cn as
|
|
243
|
-
import { jsx as
|
|
146
|
+
import { aspect, cn as cn3, createVar as createVar2 } from "@marigold/system";
|
|
147
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
244
148
|
var Aspect = ({
|
|
245
149
|
ratio = "square",
|
|
246
150
|
maxWidth,
|
|
247
151
|
children
|
|
248
152
|
}) => {
|
|
249
|
-
return /* @__PURE__ */
|
|
153
|
+
return /* @__PURE__ */ jsx7(
|
|
250
154
|
"div",
|
|
251
155
|
{
|
|
252
|
-
className:
|
|
156
|
+
className: cn3(
|
|
253
157
|
"overflow-hidden",
|
|
254
158
|
aspect[ratio],
|
|
255
159
|
"max-w-[var(--maxWidth)]"
|
|
@@ -262,28 +166,28 @@ var Aspect = ({
|
|
|
262
166
|
|
|
263
167
|
// src/Autocomplete/Autocomplete.tsx
|
|
264
168
|
import React, {
|
|
265
|
-
forwardRef as
|
|
169
|
+
forwardRef as forwardRef7
|
|
266
170
|
} from "react";
|
|
267
171
|
import { ComboBox, ComboBoxStateContext } from "react-aria-components";
|
|
268
|
-
import { cn as
|
|
172
|
+
import { cn as cn13, useClassNames as useClassNames9 } from "@marigold/system";
|
|
269
173
|
|
|
270
174
|
// src/FieldBase/FieldBase.tsx
|
|
271
|
-
import { forwardRef as
|
|
272
|
-
import { cn as
|
|
175
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
176
|
+
import { cn as cn6, width as twWidth, useClassNames as useClassNames4 } from "@marigold/system";
|
|
273
177
|
|
|
274
178
|
// src/HelpText/HelpText.tsx
|
|
275
|
-
import { useContext as
|
|
179
|
+
import { useContext as useContext3 } from "react";
|
|
276
180
|
import { FieldError, FieldErrorContext, Text } from "react-aria-components";
|
|
277
|
-
import { cn as
|
|
278
|
-
import { jsx as
|
|
279
|
-
var Icon = ({ className }) => /* @__PURE__ */
|
|
181
|
+
import { cn as cn4, useClassNames as useClassNames2 } from "@marigold/system";
|
|
182
|
+
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
183
|
+
var Icon = ({ className }) => /* @__PURE__ */ jsx8(
|
|
280
184
|
"svg",
|
|
281
185
|
{
|
|
282
|
-
className:
|
|
186
|
+
className: cn4("h-4 w-4 shrink-0", className),
|
|
283
187
|
viewBox: "0 0 24 24",
|
|
284
188
|
role: "presentation",
|
|
285
189
|
fill: "currentColor",
|
|
286
|
-
children: /* @__PURE__ */
|
|
190
|
+
children: /* @__PURE__ */ jsx8("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" })
|
|
287
191
|
}
|
|
288
192
|
);
|
|
289
193
|
var HelpText = ({
|
|
@@ -293,64 +197,64 @@ var HelpText = ({
|
|
|
293
197
|
errorMessage,
|
|
294
198
|
...props
|
|
295
199
|
}) => {
|
|
296
|
-
const classNames2 =
|
|
200
|
+
const classNames2 = useClassNames2({
|
|
297
201
|
component: "HelpText",
|
|
298
202
|
variant,
|
|
299
203
|
size
|
|
300
204
|
});
|
|
301
|
-
const ctx =
|
|
205
|
+
const ctx = useContext3(FieldErrorContext);
|
|
302
206
|
if (!description && ctx && !ctx.isInvalid) {
|
|
303
207
|
return null;
|
|
304
208
|
}
|
|
305
|
-
return /* @__PURE__ */
|
|
306
|
-
/* @__PURE__ */
|
|
209
|
+
return /* @__PURE__ */ jsxs3("div", { className: cn4(classNames2.container), children: [
|
|
210
|
+
/* @__PURE__ */ jsx8(FieldError, { ...props, className: "flex flex-col", children: (validation) => {
|
|
307
211
|
const messages = (typeof errorMessage === "function" ? errorMessage(validation) : errorMessage) || validation.validationErrors;
|
|
308
|
-
return Array.isArray(messages) ? messages.map((msg, idx) => /* @__PURE__ */
|
|
309
|
-
/* @__PURE__ */
|
|
212
|
+
return Array.isArray(messages) ? messages.map((msg, idx) => /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-start gap-1", children: [
|
|
213
|
+
/* @__PURE__ */ jsx8(Icon, { className: classNames2.icon }),
|
|
310
214
|
msg
|
|
311
|
-
] }, idx)) : /* @__PURE__ */
|
|
312
|
-
/* @__PURE__ */
|
|
215
|
+
] }, idx)) : /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-start gap-1", children: [
|
|
216
|
+
/* @__PURE__ */ jsx8(Icon, { className: classNames2.icon }),
|
|
313
217
|
messages
|
|
314
218
|
] });
|
|
315
219
|
} }),
|
|
316
|
-
ctx && ctx.isInvalid ? null : /* @__PURE__ */
|
|
220
|
+
ctx && ctx.isInvalid ? null : /* @__PURE__ */ jsx8(Text, { slot: "description", children: description })
|
|
317
221
|
] });
|
|
318
222
|
};
|
|
319
223
|
|
|
320
224
|
// src/Label/Label.tsx
|
|
321
225
|
import { Label } from "react-aria-components";
|
|
322
|
-
import { SVG as
|
|
226
|
+
import { SVG as SVG2, cn as cn5, createVar as createVar3, useClassNames as useClassNames3 } from "@marigold/system";
|
|
323
227
|
|
|
324
228
|
// src/FieldBase/FieldGroup.tsx
|
|
325
|
-
import { createContext as createContext2, useContext as
|
|
326
|
-
import { jsx as
|
|
229
|
+
import { createContext as createContext2, useContext as useContext4 } from "react";
|
|
230
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
327
231
|
var FieldGroupContext = createContext2({});
|
|
328
|
-
var useFieldGroupContext = () =>
|
|
232
|
+
var useFieldGroupContext = () => useContext4(FieldGroupContext);
|
|
329
233
|
var FieldGroup = ({ labelWidth, children }) => {
|
|
330
|
-
return /* @__PURE__ */
|
|
234
|
+
return /* @__PURE__ */ jsx9(FieldGroupContext.Provider, { value: { labelWidth }, children });
|
|
331
235
|
};
|
|
332
236
|
|
|
333
237
|
// src/Label/Label.tsx
|
|
334
|
-
import { jsx as
|
|
238
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
335
239
|
var _Label = ({ size, variant, children, ...props }) => {
|
|
336
|
-
const classNames2 =
|
|
240
|
+
const classNames2 = useClassNames3({ component: "Label", size, variant });
|
|
337
241
|
const { labelWidth } = useFieldGroupContext();
|
|
338
|
-
return /* @__PURE__ */
|
|
242
|
+
return /* @__PURE__ */ jsxs4(
|
|
339
243
|
Label,
|
|
340
244
|
{
|
|
341
245
|
...props,
|
|
342
|
-
className:
|
|
246
|
+
className: cn5(classNames2.container, "flex w-[var(--labelWidth)]"),
|
|
343
247
|
style: createVar3({ labelWidth }),
|
|
344
248
|
children: [
|
|
345
249
|
children,
|
|
346
|
-
/* @__PURE__ */
|
|
347
|
-
|
|
250
|
+
/* @__PURE__ */ jsx10(
|
|
251
|
+
SVG2,
|
|
348
252
|
{
|
|
349
253
|
viewBox: "0 0 24 24",
|
|
350
254
|
role: "presentation",
|
|
351
255
|
size: 16,
|
|
352
|
-
className:
|
|
353
|
-
children: /* @__PURE__ */
|
|
256
|
+
className: cn5("hidden", classNames2.indicator),
|
|
257
|
+
children: /* @__PURE__ */ jsx10("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" })
|
|
354
258
|
}
|
|
355
259
|
)
|
|
356
260
|
]
|
|
@@ -359,8 +263,8 @@ var _Label = ({ size, variant, children, ...props }) => {
|
|
|
359
263
|
};
|
|
360
264
|
|
|
361
265
|
// src/FieldBase/FieldBase.tsx
|
|
362
|
-
import { jsx as
|
|
363
|
-
var fixedForwardRef =
|
|
266
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
267
|
+
var fixedForwardRef = forwardRef2;
|
|
364
268
|
var _FieldBase = (props, ref) => {
|
|
365
269
|
const {
|
|
366
270
|
as: Component = "div",
|
|
@@ -375,16 +279,16 @@ var _FieldBase = (props, ref) => {
|
|
|
375
279
|
stateProps,
|
|
376
280
|
...rest
|
|
377
281
|
} = props;
|
|
378
|
-
const classNames2 =
|
|
282
|
+
const classNames2 = useClassNames4({
|
|
379
283
|
component: "Field",
|
|
380
284
|
variant,
|
|
381
285
|
size
|
|
382
286
|
});
|
|
383
|
-
return /* @__PURE__ */
|
|
287
|
+
return /* @__PURE__ */ jsxs5(
|
|
384
288
|
Component,
|
|
385
289
|
{
|
|
386
290
|
ref,
|
|
387
|
-
className:
|
|
291
|
+
className: cn6(
|
|
388
292
|
"group/field",
|
|
389
293
|
twWidth[width],
|
|
390
294
|
classNames2,
|
|
@@ -395,9 +299,9 @@ var _FieldBase = (props, ref) => {
|
|
|
395
299
|
"data-error": props.isInvalid ? true : void 0,
|
|
396
300
|
...rest,
|
|
397
301
|
children: [
|
|
398
|
-
label ? /* @__PURE__ */
|
|
302
|
+
label ? /* @__PURE__ */ jsx11(_Label, { variant, size, children: label }) : /* @__PURE__ */ jsx11("span", { "aria-hidden": "true" }),
|
|
399
303
|
children,
|
|
400
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ jsx11(
|
|
401
305
|
HelpText,
|
|
402
306
|
{
|
|
403
307
|
variant,
|
|
@@ -413,26 +317,26 @@ var _FieldBase = (props, ref) => {
|
|
|
413
317
|
var FieldBase = fixedForwardRef(_FieldBase);
|
|
414
318
|
|
|
415
319
|
// src/Input/SearchInput.tsx
|
|
416
|
-
import { forwardRef as
|
|
320
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
417
321
|
import { Button as Button2 } from "react-aria-components";
|
|
418
322
|
import { useLocalizedStringFormatter } from "@react-aria/i18n";
|
|
419
|
-
import { cn as
|
|
323
|
+
import { cn as cn8 } from "@marigold/system";
|
|
420
324
|
|
|
421
325
|
// src/Input/Input.tsx
|
|
422
|
-
import { cloneElement, forwardRef as
|
|
326
|
+
import { cloneElement, forwardRef as forwardRef3 } from "react";
|
|
423
327
|
import { Input } from "react-aria-components";
|
|
424
|
-
import { cn as
|
|
425
|
-
import { jsx as
|
|
426
|
-
var _Input =
|
|
328
|
+
import { cn as cn7, useClassNames as useClassNames5 } from "@marigold/system";
|
|
329
|
+
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
330
|
+
var _Input = forwardRef3(
|
|
427
331
|
({ type, icon, action, variant, size, className, ...props }, ref) => {
|
|
428
|
-
const classNames2 =
|
|
332
|
+
const classNames2 = useClassNames5({
|
|
429
333
|
component: "Input",
|
|
430
334
|
variant,
|
|
431
335
|
size
|
|
432
336
|
});
|
|
433
337
|
const inputIcon = icon ? cloneElement(icon, {
|
|
434
338
|
...icon.props,
|
|
435
|
-
className:
|
|
339
|
+
className: cn7(
|
|
436
340
|
"pointer-events-none absolute",
|
|
437
341
|
classNames2.icon,
|
|
438
342
|
icon.props.className
|
|
@@ -440,13 +344,13 @@ var _Input = forwardRef4(
|
|
|
440
344
|
}) : null;
|
|
441
345
|
const inputAction = action && !props.readOnly ? cloneElement(action, {
|
|
442
346
|
...action.props,
|
|
443
|
-
className:
|
|
347
|
+
className: cn7(
|
|
444
348
|
"absolute right-0",
|
|
445
349
|
classNames2.action,
|
|
446
350
|
action.props.className
|
|
447
351
|
)
|
|
448
352
|
}) : null;
|
|
449
|
-
return /* @__PURE__ */
|
|
353
|
+
return /* @__PURE__ */ jsxs6(
|
|
450
354
|
"div",
|
|
451
355
|
{
|
|
452
356
|
className: "group/input relative flex items-center",
|
|
@@ -454,11 +358,11 @@ var _Input = forwardRef4(
|
|
|
454
358
|
"data-action": action && "",
|
|
455
359
|
children: [
|
|
456
360
|
inputIcon,
|
|
457
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ jsx12(
|
|
458
362
|
Input,
|
|
459
363
|
{
|
|
460
364
|
...props,
|
|
461
|
-
className:
|
|
365
|
+
className: cn7(
|
|
462
366
|
"w-full flex-1",
|
|
463
367
|
"disabled:cursor-not-allowed",
|
|
464
368
|
"[&[type=file]]:border-none [&[type=file]]:p-0",
|
|
@@ -478,7 +382,7 @@ var _Input = forwardRef4(
|
|
|
478
382
|
);
|
|
479
383
|
|
|
480
384
|
// src/Input/SearchInput.tsx
|
|
481
|
-
import { jsx as
|
|
385
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
482
386
|
var intlMessages = {
|
|
483
387
|
"de-DE": {
|
|
484
388
|
"Clear search": "Suche zur\xFCcksetzen"
|
|
@@ -490,7 +394,7 @@ var intlMessages = {
|
|
|
490
394
|
"Clear search": "Effacer la recherche"
|
|
491
395
|
}
|
|
492
396
|
};
|
|
493
|
-
var SearchIcon = (props) => /* @__PURE__ */
|
|
397
|
+
var SearchIcon = (props) => /* @__PURE__ */ jsx13(
|
|
494
398
|
"svg",
|
|
495
399
|
{
|
|
496
400
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -499,23 +403,23 @@ var SearchIcon = (props) => /* @__PURE__ */ jsx15(
|
|
|
499
403
|
width: 24,
|
|
500
404
|
height: 24,
|
|
501
405
|
...props,
|
|
502
|
-
children: /* @__PURE__ */
|
|
406
|
+
children: /* @__PURE__ */ jsx13("path", { d: "M16.1865 14.5142H15.3057L14.9936 14.2131C16.0862 12.9421 16.744 11.292 16.744 9.497C16.744 5.49443 13.4996 2.25 9.497 2.25C5.49443 2.25 2.25 5.49443 2.25 9.497C2.25 13.4996 5.49443 16.744 9.497 16.744C11.292 16.744 12.9421 16.0862 14.2131 14.9936L14.5142 15.3057V16.1865L20.0888 21.75L21.75 20.0888L16.1865 14.5142ZM9.49701 14.5142C6.72085 14.5142 4.47986 12.2732 4.47986 9.49701C4.47986 6.72085 6.72085 4.47986 9.49701 4.47986C12.2732 4.47986 14.5142 6.72085 14.5142 9.49701C14.5142 12.2732 12.2732 14.5142 9.49701 14.5142Z" })
|
|
503
407
|
}
|
|
504
408
|
);
|
|
505
|
-
var SearchInput =
|
|
409
|
+
var SearchInput = forwardRef4(
|
|
506
410
|
({ className, onClear, ...props }, ref) => {
|
|
507
411
|
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
508
|
-
return /* @__PURE__ */
|
|
412
|
+
return /* @__PURE__ */ jsx13(
|
|
509
413
|
_Input,
|
|
510
414
|
{
|
|
511
415
|
type: "search",
|
|
512
|
-
className:
|
|
416
|
+
className: cn8(
|
|
513
417
|
"[&::-webkit-search-cancel-button]:hidden",
|
|
514
418
|
className == null ? void 0 : className.input
|
|
515
419
|
),
|
|
516
420
|
ref,
|
|
517
|
-
icon: /* @__PURE__ */
|
|
518
|
-
action: /* @__PURE__ */
|
|
421
|
+
icon: /* @__PURE__ */ jsx13(SearchIcon, {}),
|
|
422
|
+
action: /* @__PURE__ */ jsx13(
|
|
519
423
|
Button2,
|
|
520
424
|
{
|
|
521
425
|
className: className == null ? void 0 : className.action,
|
|
@@ -523,7 +427,7 @@ var SearchInput = forwardRef5(
|
|
|
523
427
|
"aria-label": stringFormatter.format("Clear search"),
|
|
524
428
|
excludeFromTabOrder: true,
|
|
525
429
|
preventFocusOnPress: true,
|
|
526
|
-
children: /* @__PURE__ */
|
|
430
|
+
children: /* @__PURE__ */ jsx13(
|
|
527
431
|
"svg",
|
|
528
432
|
{
|
|
529
433
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -531,7 +435,7 @@ var SearchInput = forwardRef5(
|
|
|
531
435
|
fill: "currentColor",
|
|
532
436
|
width: 20,
|
|
533
437
|
height: 20,
|
|
534
|
-
children: /* @__PURE__ */
|
|
438
|
+
children: /* @__PURE__ */ jsx13("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" })
|
|
535
439
|
}
|
|
536
440
|
)
|
|
537
441
|
}
|
|
@@ -544,37 +448,37 @@ var SearchInput = forwardRef5(
|
|
|
544
448
|
|
|
545
449
|
// src/ListBox/ListBox.tsx
|
|
546
450
|
import {
|
|
547
|
-
forwardRef as
|
|
451
|
+
forwardRef as forwardRef5
|
|
548
452
|
} from "react";
|
|
549
453
|
import { ListBox } from "react-aria-components";
|
|
550
|
-
import { cn as
|
|
454
|
+
import { cn as cn10, useClassNames as useClassNames6 } from "@marigold/system";
|
|
551
455
|
|
|
552
456
|
// src/ListBox/Context.ts
|
|
553
|
-
import { createContext as createContext3, useContext as
|
|
457
|
+
import { createContext as createContext3, useContext as useContext5 } from "react";
|
|
554
458
|
var ListBoxContext = createContext3({});
|
|
555
|
-
var useListBoxContext = () =>
|
|
459
|
+
var useListBoxContext = () => useContext5(ListBoxContext);
|
|
556
460
|
|
|
557
461
|
// src/ListBox/ListBoxItem.tsx
|
|
558
462
|
import { ListBoxItem } from "react-aria-components";
|
|
559
|
-
import { jsx as
|
|
463
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
560
464
|
var _ListBoxItem = ({ ...props }) => {
|
|
561
465
|
const { classNames: classNames2 } = useListBoxContext();
|
|
562
|
-
return /* @__PURE__ */
|
|
466
|
+
return /* @__PURE__ */ jsx14(ListBoxItem, { ...props, className: classNames2.option });
|
|
563
467
|
};
|
|
564
468
|
|
|
565
469
|
// src/ListBox/ListBoxSection.tsx
|
|
566
470
|
import { Header, ListBoxSection } from "react-aria-components";
|
|
567
|
-
import { cn as
|
|
568
|
-
import { jsx as
|
|
471
|
+
import { cn as cn9 } from "@marigold/system";
|
|
472
|
+
import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
569
473
|
var _Section = ({ header, children, ...props }) => {
|
|
570
474
|
const { classNames: classNames2 } = useListBoxContext();
|
|
571
|
-
return /* @__PURE__ */
|
|
475
|
+
return /* @__PURE__ */ jsxs7(
|
|
572
476
|
ListBoxSection,
|
|
573
477
|
{
|
|
574
478
|
...props,
|
|
575
|
-
className:
|
|
479
|
+
className: cn9(classNames2.section, classNames2.header),
|
|
576
480
|
children: [
|
|
577
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ jsx15(Header, { children: header }),
|
|
578
482
|
children
|
|
579
483
|
]
|
|
580
484
|
}
|
|
@@ -582,16 +486,16 @@ var _Section = ({ header, children, ...props }) => {
|
|
|
582
486
|
};
|
|
583
487
|
|
|
584
488
|
// src/ListBox/ListBox.tsx
|
|
585
|
-
import { jsx as
|
|
586
|
-
var _ListBox =
|
|
489
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
490
|
+
var _ListBox = forwardRef5(
|
|
587
491
|
({ variant, size, ...props }, ref) => {
|
|
588
|
-
const classNames2 =
|
|
492
|
+
const classNames2 = useClassNames6({ component: "ListBox", variant, size });
|
|
589
493
|
const listBoxProps = { shouldSelectOnPressUp: false };
|
|
590
|
-
return /* @__PURE__ */
|
|
494
|
+
return /* @__PURE__ */ jsx16(ListBoxContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx16("div", { className: classNames2.container, children: /* @__PURE__ */ jsx16(
|
|
591
495
|
ListBox,
|
|
592
496
|
{
|
|
593
497
|
...props,
|
|
594
|
-
className:
|
|
498
|
+
className: cn10(
|
|
595
499
|
"overflow-y-auto sm:max-h-[75vh] lg:max-h-[45vh]",
|
|
596
500
|
classNames2.list
|
|
597
501
|
),
|
|
@@ -606,17 +510,17 @@ _ListBox.Item = _ListBoxItem;
|
|
|
606
510
|
_ListBox.Section = _Section;
|
|
607
511
|
|
|
608
512
|
// src/Overlay/Popover.tsx
|
|
609
|
-
import { forwardRef as
|
|
513
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
610
514
|
import { Popover } from "react-aria-components";
|
|
611
|
-
import { cn as
|
|
515
|
+
import { cn as cn12, useClassNames as useClassNames8, useSmallScreen } from "@marigold/system";
|
|
612
516
|
|
|
613
517
|
// src/Provider/OverlayContainerProvider.tsx
|
|
614
|
-
import { createContext as createContext4, useContext as
|
|
518
|
+
import { createContext as createContext4, useContext as useContext6 } from "react";
|
|
615
519
|
import { useIsSSR } from "@react-aria/ssr";
|
|
616
520
|
var OverlayContainerContext = createContext4(void 0);
|
|
617
521
|
var OverlayContainerProvider = OverlayContainerContext.Provider;
|
|
618
522
|
var usePortalContainer = () => {
|
|
619
|
-
const portalContainer =
|
|
523
|
+
const portalContainer = useContext6(OverlayContainerContext);
|
|
620
524
|
const isSSR = useIsSSR();
|
|
621
525
|
const portal = isSSR ? null : portalContainer ? document.getElementById(portalContainer) : document.body;
|
|
622
526
|
return portal;
|
|
@@ -624,7 +528,7 @@ var usePortalContainer = () => {
|
|
|
624
528
|
|
|
625
529
|
// src/Overlay/Underlay.tsx
|
|
626
530
|
import { ModalOverlay } from "react-aria-components";
|
|
627
|
-
import { cn as
|
|
531
|
+
import { cn as cn11, useClassNames as useClassNames7 } from "@marigold/system";
|
|
628
532
|
|
|
629
533
|
// src/Provider/index.ts
|
|
630
534
|
import { useTheme, ThemeProvider as ThemeProvider2 } from "@marigold/system";
|
|
@@ -632,17 +536,17 @@ import { I18nProvider } from "@react-aria/i18n";
|
|
|
632
536
|
|
|
633
537
|
// src/Provider/MarigoldProvider.tsx
|
|
634
538
|
import { ThemeProvider } from "@marigold/system";
|
|
635
|
-
import { jsx as
|
|
539
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
636
540
|
function MarigoldProvider({
|
|
637
541
|
children,
|
|
638
542
|
className,
|
|
639
543
|
theme
|
|
640
544
|
}) {
|
|
641
|
-
return /* @__PURE__ */
|
|
545
|
+
return /* @__PURE__ */ jsx17(ThemeProvider, { theme, className, children });
|
|
642
546
|
}
|
|
643
547
|
|
|
644
548
|
// src/Overlay/Underlay.tsx
|
|
645
|
-
import { jsx as
|
|
549
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
646
550
|
var Underlay = ({
|
|
647
551
|
size,
|
|
648
552
|
variant,
|
|
@@ -651,7 +555,7 @@ var Underlay = ({
|
|
|
651
555
|
keyboardDismissable,
|
|
652
556
|
...rest
|
|
653
557
|
}) => {
|
|
654
|
-
const classNames2 =
|
|
558
|
+
const classNames2 = useClassNames7({ component: "Underlay", size, variant });
|
|
655
559
|
const props = {
|
|
656
560
|
isOpen: open,
|
|
657
561
|
isDismissable: dismissable,
|
|
@@ -659,10 +563,10 @@ var Underlay = ({
|
|
|
659
563
|
...rest
|
|
660
564
|
};
|
|
661
565
|
const portal = usePortalContainer();
|
|
662
|
-
return /* @__PURE__ */
|
|
566
|
+
return /* @__PURE__ */ jsx18(
|
|
663
567
|
ModalOverlay,
|
|
664
568
|
{
|
|
665
|
-
className: ({ isEntering, isExiting }) =>
|
|
569
|
+
className: ({ isEntering, isExiting }) => cn11(
|
|
666
570
|
"fixed inset-0 z-40 flex min-h-full items-center justify-center overflow-y-auto backdrop-blur-xs",
|
|
667
571
|
isEntering ? "animate-in fade-in duration-300 ease-out" : "",
|
|
668
572
|
isExiting ? "animate-out fade-out duration-200 ease-in" : "",
|
|
@@ -677,8 +581,8 @@ var Underlay = ({
|
|
|
677
581
|
};
|
|
678
582
|
|
|
679
583
|
// src/Overlay/Popover.tsx
|
|
680
|
-
import { Fragment
|
|
681
|
-
var _Popover =
|
|
584
|
+
import { Fragment, jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
585
|
+
var _Popover = forwardRef6(
|
|
682
586
|
({ keyboardDismissDisabled, placement, open, children, container, ...rest }, ref) => {
|
|
683
587
|
const props = {
|
|
684
588
|
isKeyboardDismissDisabled: keyboardDismissDisabled,
|
|
@@ -686,7 +590,7 @@ var _Popover = forwardRef7(
|
|
|
686
590
|
placement,
|
|
687
591
|
...rest
|
|
688
592
|
};
|
|
689
|
-
const classNames2 =
|
|
593
|
+
const classNames2 = useClassNames8({
|
|
690
594
|
component: "Popover",
|
|
691
595
|
variant: placement,
|
|
692
596
|
// Make Popover as wide as trigger element
|
|
@@ -694,22 +598,22 @@ var _Popover = forwardRef7(
|
|
|
694
598
|
});
|
|
695
599
|
const isSmallScreen = useSmallScreen();
|
|
696
600
|
const portal = usePortalContainer();
|
|
697
|
-
return /* @__PURE__ */
|
|
601
|
+
return /* @__PURE__ */ jsx19(Fragment, { children: isSmallScreen ? /* @__PURE__ */ jsx19(Fragment, { children: /* @__PURE__ */ jsxs8(
|
|
698
602
|
Popover,
|
|
699
603
|
{
|
|
700
604
|
ref,
|
|
701
605
|
...props,
|
|
702
|
-
className:
|
|
606
|
+
className: cn12(
|
|
703
607
|
"fixed! top-auto! bottom-0! left-0! max-h-fit! w-full",
|
|
704
608
|
classNames2
|
|
705
609
|
),
|
|
706
610
|
UNSTABLE_portalContainer: portal,
|
|
707
611
|
children: [
|
|
708
612
|
children,
|
|
709
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ jsx19(Underlay, { open, variant: "modal" })
|
|
710
614
|
]
|
|
711
615
|
}
|
|
712
|
-
) }) : /* @__PURE__ */
|
|
616
|
+
) }) : /* @__PURE__ */ jsx19(
|
|
713
617
|
Popover,
|
|
714
618
|
{
|
|
715
619
|
ref,
|
|
@@ -725,20 +629,20 @@ var _Popover = forwardRef7(
|
|
|
725
629
|
);
|
|
726
630
|
|
|
727
631
|
// src/Autocomplete/Autocomplete.tsx
|
|
728
|
-
import { jsx as
|
|
632
|
+
import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
729
633
|
var AutocompleteInput = ({
|
|
730
634
|
onSubmit,
|
|
731
635
|
onClear,
|
|
732
636
|
ref
|
|
733
637
|
}) => {
|
|
734
638
|
const state = React.useContext(ComboBoxStateContext);
|
|
735
|
-
const classNames2 =
|
|
736
|
-
return /* @__PURE__ */
|
|
639
|
+
const classNames2 = useClassNames9({ component: "ComboBox" });
|
|
640
|
+
return /* @__PURE__ */ jsx20(
|
|
737
641
|
SearchInput,
|
|
738
642
|
{
|
|
739
643
|
ref,
|
|
740
644
|
className: {
|
|
741
|
-
action:
|
|
645
|
+
action: cn13(
|
|
742
646
|
(state == null ? void 0 : state.inputValue) === "" ? "invisible" : "visible",
|
|
743
647
|
classNames2
|
|
744
648
|
)
|
|
@@ -761,7 +665,7 @@ var AutocompleteInput = ({
|
|
|
761
665
|
}
|
|
762
666
|
);
|
|
763
667
|
};
|
|
764
|
-
var _Autocomplete =
|
|
668
|
+
var _Autocomplete = forwardRef7(
|
|
765
669
|
({
|
|
766
670
|
children,
|
|
767
671
|
defaultValue,
|
|
@@ -787,9 +691,9 @@ var _Autocomplete = forwardRef8(
|
|
|
787
691
|
isRequired: required,
|
|
788
692
|
...rest
|
|
789
693
|
};
|
|
790
|
-
return /* @__PURE__ */
|
|
791
|
-
/* @__PURE__ */
|
|
792
|
-
/* @__PURE__ */
|
|
694
|
+
return /* @__PURE__ */ jsxs9(FieldBase, { as: ComboBox, ref, ...props, children: [
|
|
695
|
+
/* @__PURE__ */ jsx20(AutocompleteInput, { onSubmit, onClear, ref }),
|
|
696
|
+
/* @__PURE__ */ jsx20(_Popover, { children: /* @__PURE__ */ jsx20(_ListBox, { children }) })
|
|
793
697
|
] });
|
|
794
698
|
}
|
|
795
699
|
);
|
|
@@ -801,12 +705,110 @@ import { forwardRef as forwardRef13 } from "react";
|
|
|
801
705
|
import { ComboBox as ComboBox2 } from "react-aria-components";
|
|
802
706
|
import { useClassNames as useClassNames11 } from "@marigold/system";
|
|
803
707
|
|
|
804
|
-
// src/
|
|
708
|
+
// src/Button/Button.tsx
|
|
709
|
+
import { forwardRef as forwardRef8 } from "react";
|
|
710
|
+
import { Button as Button3 } from "react-aria-components";
|
|
711
|
+
import { cn as cn14, useClassNames as useClassNames10 } from "@marigold/system";
|
|
712
|
+
|
|
713
|
+
// src/ProgressCycle/ProgressCycle.tsx
|
|
714
|
+
import { ProgressBar } from "react-aria-components";
|
|
715
|
+
import { SVG as SVG3 } from "@marigold/system";
|
|
716
|
+
import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
717
|
+
var ProgressCycle = ({
|
|
718
|
+
size = "16",
|
|
719
|
+
...props
|
|
720
|
+
}) => {
|
|
721
|
+
let strokeWidth = 3;
|
|
722
|
+
if (size <= "24") {
|
|
723
|
+
strokeWidth = 2;
|
|
724
|
+
} else if (size >= "32") {
|
|
725
|
+
strokeWidth = 4;
|
|
726
|
+
}
|
|
727
|
+
const radius = `calc(50% - ${strokeWidth / 2}px)`;
|
|
728
|
+
return /* @__PURE__ */ jsx21(ProgressBar, { ...props, "aria-label": "loading", isIndeterminate: true, children: /* @__PURE__ */ jsxs10(
|
|
729
|
+
SVG3,
|
|
730
|
+
{
|
|
731
|
+
className: "animate-rotate-spinner origin-center fill-none",
|
|
732
|
+
size,
|
|
733
|
+
"aria-hidden": "true",
|
|
734
|
+
role: "img",
|
|
735
|
+
children: [
|
|
736
|
+
/* @__PURE__ */ jsx21(
|
|
737
|
+
"circle",
|
|
738
|
+
{
|
|
739
|
+
cx: "50%",
|
|
740
|
+
cy: "50%",
|
|
741
|
+
r: radius,
|
|
742
|
+
strokeWidth,
|
|
743
|
+
className: "stroke-transparent"
|
|
744
|
+
}
|
|
745
|
+
),
|
|
746
|
+
/* @__PURE__ */ jsx21(
|
|
747
|
+
"circle",
|
|
748
|
+
{
|
|
749
|
+
cx: "50%",
|
|
750
|
+
cy: "50%",
|
|
751
|
+
r: radius,
|
|
752
|
+
strokeWidth,
|
|
753
|
+
pathLength: "100",
|
|
754
|
+
strokeDasharray: "100 200",
|
|
755
|
+
strokeDashoffset: "0",
|
|
756
|
+
strokeLinecap: "round",
|
|
757
|
+
className: "animate-progress-cycle origin-center -rotate-90 stroke-gray-800"
|
|
758
|
+
}
|
|
759
|
+
)
|
|
760
|
+
]
|
|
761
|
+
}
|
|
762
|
+
) });
|
|
763
|
+
};
|
|
764
|
+
|
|
765
|
+
// src/Button/Button.tsx
|
|
766
|
+
import { Fragment as Fragment2, jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
767
|
+
var _Button = forwardRef8(
|
|
768
|
+
({
|
|
769
|
+
children,
|
|
770
|
+
variant,
|
|
771
|
+
size,
|
|
772
|
+
className,
|
|
773
|
+
disabled,
|
|
774
|
+
loading,
|
|
775
|
+
fullWidth,
|
|
776
|
+
...props
|
|
777
|
+
}, ref) => {
|
|
778
|
+
const classNames2 = useClassNames10({
|
|
779
|
+
component: "Button",
|
|
780
|
+
variant,
|
|
781
|
+
size,
|
|
782
|
+
className
|
|
783
|
+
});
|
|
784
|
+
return /* @__PURE__ */ jsx22(
|
|
785
|
+
Button3,
|
|
786
|
+
{
|
|
787
|
+
...props,
|
|
788
|
+
ref,
|
|
789
|
+
className: cn14(
|
|
790
|
+
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
791
|
+
classNames2,
|
|
792
|
+
fullWidth ? "w-full" : void 0,
|
|
793
|
+
loading && "cursor-progress!"
|
|
794
|
+
),
|
|
795
|
+
isPending: loading,
|
|
796
|
+
isDisabled: disabled,
|
|
797
|
+
children: loading ? /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
798
|
+
/* @__PURE__ */ jsx22("span", { className: "absolute", children: /* @__PURE__ */ jsx22(ProgressCycle, {}) }),
|
|
799
|
+
/* @__PURE__ */ jsx22("span", { className: "invisible flex gap-[inherit]", children })
|
|
800
|
+
] }) : children
|
|
801
|
+
}
|
|
802
|
+
);
|
|
803
|
+
}
|
|
804
|
+
);
|
|
805
|
+
|
|
806
|
+
// src/icons/ChevronRight.tsx
|
|
805
807
|
import { forwardRef as forwardRef9 } from "react";
|
|
806
808
|
import { SVG as SVG4 } from "@marigold/system";
|
|
807
809
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
808
|
-
var
|
|
809
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx23(SVG4, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ jsx23("path", { d: "
|
|
810
|
+
var ChevronRight = forwardRef9(
|
|
811
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx23(SVG4, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ jsx23("path", { d: "M7.125 18.0244L13.1363 12L7.125 5.97563L8.97563 4.125L16.8506 12L8.97563 19.875L7.125 18.0244Z" }) })
|
|
810
812
|
);
|
|
811
813
|
|
|
812
814
|
// src/icons/ChevronLeft.tsx
|
|
@@ -987,9 +989,9 @@ import { CheckboxGroup } from "react-aria-components";
|
|
|
987
989
|
import { cn as cn17, useClassNames as useClassNames16 } from "@marigold/system";
|
|
988
990
|
|
|
989
991
|
// src/Checkbox/Context.tsx
|
|
990
|
-
import { createContext as createContext5, useContext as
|
|
992
|
+
import { createContext as createContext5, useContext as useContext7 } from "react";
|
|
991
993
|
var CheckboxGroupContext = createContext5(null);
|
|
992
|
-
var useCheckboxGroupContext = () =>
|
|
994
|
+
var useCheckboxGroupContext = () => useContext7(CheckboxGroupContext);
|
|
993
995
|
|
|
994
996
|
// src/Checkbox/CheckboxGroup.tsx
|
|
995
997
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
@@ -1224,7 +1226,7 @@ var Container = ({
|
|
|
1224
1226
|
);
|
|
1225
1227
|
|
|
1226
1228
|
// src/Dialog/Dialog.tsx
|
|
1227
|
-
import { useContext as
|
|
1229
|
+
import { useContext as useContext8 } from "react";
|
|
1228
1230
|
import { Dialog, OverlayTriggerStateContext } from "react-aria-components";
|
|
1229
1231
|
import { cn as cn25, useClassNames as useClassNames23 } from "@marigold/system";
|
|
1230
1232
|
|
|
@@ -1381,7 +1383,7 @@ var _DialogTrigger = ({
|
|
|
1381
1383
|
// src/Dialog/Dialog.tsx
|
|
1382
1384
|
import { jsx as jsx45, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1383
1385
|
var CloseButton = ({ className }) => {
|
|
1384
|
-
const ctx =
|
|
1386
|
+
const ctx = useContext8(OverlayTriggerStateContext);
|
|
1385
1387
|
return /* @__PURE__ */ jsx45("div", { className: "absolute top-4 right-4 ml-4", children: /* @__PURE__ */ jsx45(
|
|
1386
1388
|
"button",
|
|
1387
1389
|
{
|
|
@@ -1411,7 +1413,7 @@ var _Dialog = ({
|
|
|
1411
1413
|
}) => {
|
|
1412
1414
|
var _a;
|
|
1413
1415
|
const classNames2 = useClassNames23({ component: "Dialog", variant, size });
|
|
1414
|
-
const state =
|
|
1416
|
+
const state = useContext8(OverlayTriggerStateContext);
|
|
1415
1417
|
const children = typeof props.children === "function" ? props.children({
|
|
1416
1418
|
close: (_a = state == null ? void 0 : state.close) != null ? _a : () => {
|
|
1417
1419
|
}
|
|
@@ -1658,14 +1660,14 @@ import { cn as cn31, useClassNames as useClassNames29 } from "@marigold/system";
|
|
|
1658
1660
|
|
|
1659
1661
|
// src/Calendar/CalendarGridHeader.tsx
|
|
1660
1662
|
import { startOfWeek, today } from "@internationalized/date";
|
|
1661
|
-
import { useContext as
|
|
1663
|
+
import { useContext as useContext9, useMemo } from "react";
|
|
1662
1664
|
import { CalendarStateContext } from "react-aria-components";
|
|
1663
1665
|
import { useCalendarGrid } from "@react-aria/calendar";
|
|
1664
1666
|
import { useDateFormatter, useLocale } from "@react-aria/i18n";
|
|
1665
1667
|
import { useClassNames as useClassNames28 } from "@marigold/system";
|
|
1666
1668
|
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
1667
1669
|
function CalendarGridHeader(props) {
|
|
1668
|
-
const state =
|
|
1670
|
+
const state = useContext9(CalendarStateContext);
|
|
1669
1671
|
const { headerProps } = useCalendarGrid(props, state);
|
|
1670
1672
|
const { locale } = useLocale();
|
|
1671
1673
|
const dayFormatter = useDateFormatter({
|
|
@@ -1704,7 +1706,7 @@ var _CalendarGrid = () => {
|
|
|
1704
1706
|
};
|
|
1705
1707
|
|
|
1706
1708
|
// src/Calendar/CalendarListBox.tsx
|
|
1707
|
-
import { useContext as
|
|
1709
|
+
import { useContext as useContext10 } from "react";
|
|
1708
1710
|
import { CalendarStateContext as CalendarStateContext2 } from "react-aria-components";
|
|
1709
1711
|
import { cn as cn32, useClassNames as useClassNames30 } from "@marigold/system";
|
|
1710
1712
|
|
|
@@ -1731,7 +1733,7 @@ function CalendarListBox({
|
|
|
1731
1733
|
isDisabled,
|
|
1732
1734
|
setSelectedDropdown
|
|
1733
1735
|
}) {
|
|
1734
|
-
const state =
|
|
1736
|
+
const state = useContext10(CalendarStateContext2);
|
|
1735
1737
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
1736
1738
|
const buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
|
|
1737
1739
|
const { select: selectClassNames } = useClassNames30({ component: "Select" });
|
|
@@ -1751,7 +1753,7 @@ function CalendarListBox({
|
|
|
1751
1753
|
}
|
|
1752
1754
|
|
|
1753
1755
|
// src/Calendar/MonthControls.tsx
|
|
1754
|
-
import { Button as
|
|
1756
|
+
import { Button as Button4 } from "react-aria-components";
|
|
1755
1757
|
import { cn as cn33, useClassNames as useClassNames31 } from "@marigold/system";
|
|
1756
1758
|
import { jsx as jsx58, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1757
1759
|
function MonthControls() {
|
|
@@ -1766,7 +1768,7 @@ function MonthControls() {
|
|
|
1766
1768
|
),
|
|
1767
1769
|
children: [
|
|
1768
1770
|
/* @__PURE__ */ jsx58(
|
|
1769
|
-
|
|
1771
|
+
Button4,
|
|
1770
1772
|
{
|
|
1771
1773
|
className: cn33(
|
|
1772
1774
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
@@ -1777,7 +1779,7 @@ function MonthControls() {
|
|
|
1777
1779
|
}
|
|
1778
1780
|
),
|
|
1779
1781
|
/* @__PURE__ */ jsx58(
|
|
1780
|
-
|
|
1782
|
+
Button4,
|
|
1781
1783
|
{
|
|
1782
1784
|
className: cn33(
|
|
1783
1785
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
@@ -1794,11 +1796,11 @@ function MonthControls() {
|
|
|
1794
1796
|
var MonthControls_default = MonthControls;
|
|
1795
1797
|
|
|
1796
1798
|
// src/Calendar/MonthListBox.tsx
|
|
1797
|
-
import { useContext as
|
|
1799
|
+
import { useContext as useContext11 } from "react";
|
|
1798
1800
|
import { CalendarStateContext as CalendarStateContext3 } from "react-aria-components";
|
|
1799
1801
|
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
1800
1802
|
var MonthListBox = ({ setSelectedDropdown }) => {
|
|
1801
|
-
const state =
|
|
1803
|
+
const state = useContext11(CalendarStateContext3);
|
|
1802
1804
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
1803
1805
|
let onChange = (index) => {
|
|
1804
1806
|
let value = Number(index) + 1;
|
|
@@ -1833,7 +1835,7 @@ var MonthListBox_default = MonthListBox;
|
|
|
1833
1835
|
|
|
1834
1836
|
// src/Calendar/YearListBox.tsx
|
|
1835
1837
|
import {
|
|
1836
|
-
useContext as
|
|
1838
|
+
useContext as useContext12,
|
|
1837
1839
|
useEffect,
|
|
1838
1840
|
useRef
|
|
1839
1841
|
} from "react";
|
|
@@ -1841,7 +1843,7 @@ import { CalendarStateContext as CalendarStateContext4 } from "react-aria-compon
|
|
|
1841
1843
|
import { useDateFormatter as useDateFormatter3 } from "@react-aria/i18n";
|
|
1842
1844
|
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
1843
1845
|
var YearListBox = ({ setSelectedDropdown }) => {
|
|
1844
|
-
const state =
|
|
1846
|
+
const state = useContext12(CalendarStateContext4);
|
|
1845
1847
|
const years = [];
|
|
1846
1848
|
let formatter = useDateFormatter3({
|
|
1847
1849
|
year: "numeric",
|
|
@@ -2076,9 +2078,9 @@ var _Link = forwardRef17(
|
|
|
2076
2078
|
import { useClassNames as useClassNames35 } from "@marigold/system";
|
|
2077
2079
|
|
|
2078
2080
|
// src/List/Context.ts
|
|
2079
|
-
import { createContext as createContext6, useContext as
|
|
2081
|
+
import { createContext as createContext6, useContext as useContext13 } from "react";
|
|
2080
2082
|
var ListContext = createContext6({});
|
|
2081
|
-
var useListContext = () =>
|
|
2083
|
+
var useListContext = () => useContext13(ListContext);
|
|
2082
2084
|
|
|
2083
2085
|
// src/List/ListItem.tsx
|
|
2084
2086
|
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
@@ -2172,9 +2174,9 @@ import { useButton } from "@react-aria/button";
|
|
|
2172
2174
|
import { cn as cn38, useClassNames as useClassNames40 } from "@marigold/system";
|
|
2173
2175
|
|
|
2174
2176
|
// src/SectionMessage/Context.tsx
|
|
2175
|
-
import { createContext as createContext7, useContext as
|
|
2177
|
+
import { createContext as createContext7, useContext as useContext14 } from "react";
|
|
2176
2178
|
var SectionMessageContext = createContext7({});
|
|
2177
|
-
var useSectionMessageContext = () =>
|
|
2179
|
+
var useSectionMessageContext = () => useContext14(SectionMessageContext);
|
|
2178
2180
|
|
|
2179
2181
|
// src/SectionMessage/SectionMessageContent.tsx
|
|
2180
2182
|
import { cn as cn36 } from "@marigold/system";
|
|
@@ -2336,7 +2338,7 @@ import { Children as Children4, useState as useState3 } from "react";
|
|
|
2336
2338
|
import { useListData as useListData2 } from "@react-stately/data";
|
|
2337
2339
|
|
|
2338
2340
|
// src/TagGroup/Tag.tsx
|
|
2339
|
-
import { Button as
|
|
2341
|
+
import { Button as Button5, Tag } from "react-aria-components";
|
|
2340
2342
|
import { cn as cn39, useClassNames as useClassNames42 } from "@marigold/system";
|
|
2341
2343
|
|
|
2342
2344
|
// src/TagGroup/TagGroup.tsx
|
|
@@ -2367,7 +2369,7 @@ var _TagGroup = ({
|
|
|
2367
2369
|
// src/TagGroup/Tag.tsx
|
|
2368
2370
|
import { Fragment as Fragment6, jsx as jsx75, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2369
2371
|
var CloseButton2 = ({ className }) => {
|
|
2370
|
-
return /* @__PURE__ */ jsx75(
|
|
2372
|
+
return /* @__PURE__ */ jsx75(Button5, { slot: "remove", className, children: /* @__PURE__ */ jsx75("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx75("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
|
|
2371
2373
|
};
|
|
2372
2374
|
var _Tag = ({ variant, size, children, ...props }) => {
|
|
2373
2375
|
let textValue = typeof children === "string" ? children : void 0;
|
|
@@ -2465,7 +2467,7 @@ import { Group as Group2, NumberField } from "react-aria-components";
|
|
|
2465
2467
|
import { cn as cn41, useClassNames as useClassNames43 } from "@marigold/system";
|
|
2466
2468
|
|
|
2467
2469
|
// src/NumberField/StepButton.tsx
|
|
2468
|
-
import { Button as
|
|
2470
|
+
import { Button as Button6 } from "react-aria-components";
|
|
2469
2471
|
import { cn as cn40 } from "@marigold/system";
|
|
2470
2472
|
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
2471
2473
|
var Plus = () => /* @__PURE__ */ jsx77("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx77(
|
|
@@ -2487,7 +2489,7 @@ var Minus = () => /* @__PURE__ */ jsx77("svg", { width: 16, height: 16, viewBox:
|
|
|
2487
2489
|
var _StepButton = ({ direction, className, ...props }) => {
|
|
2488
2490
|
const Icon4 = direction === "up" ? Plus : Minus;
|
|
2489
2491
|
return /* @__PURE__ */ jsx77(
|
|
2490
|
-
|
|
2492
|
+
Button6,
|
|
2491
2493
|
{
|
|
2492
2494
|
className: cn40(
|
|
2493
2495
|
[
|
|
@@ -2901,11 +2903,11 @@ import { Radio } from "react-aria-components";
|
|
|
2901
2903
|
import { cn as cn44, useClassNames as useClassNames47 } from "@marigold/system";
|
|
2902
2904
|
|
|
2903
2905
|
// src/Radio/Context.ts
|
|
2904
|
-
import { createContext as createContext8, useContext as
|
|
2906
|
+
import { createContext as createContext8, useContext as useContext15 } from "react";
|
|
2905
2907
|
var RadioGroupContext = createContext8(
|
|
2906
2908
|
null
|
|
2907
2909
|
);
|
|
2908
|
-
var useRadioGroupContext = () =>
|
|
2910
|
+
var useRadioGroupContext = () => useContext15(RadioGroupContext);
|
|
2909
2911
|
|
|
2910
2912
|
// src/Radio/RadioGroup.tsx
|
|
2911
2913
|
import { RadioGroup } from "react-aria-components";
|
|
@@ -3044,7 +3046,7 @@ var _SearchField = forwardRef20(
|
|
|
3044
3046
|
// src/Select/Select.tsx
|
|
3045
3047
|
import { forwardRef as forwardRef21 } from "react";
|
|
3046
3048
|
import {
|
|
3047
|
-
Button as
|
|
3049
|
+
Button as Button7,
|
|
3048
3050
|
Select,
|
|
3049
3051
|
SelectValue
|
|
3050
3052
|
} from "react-aria-components";
|
|
@@ -3073,7 +3075,7 @@ var _Select = forwardRef21(
|
|
|
3073
3075
|
const classNames2 = useClassNames48({ component: "Select", variant, size });
|
|
3074
3076
|
return /* @__PURE__ */ jsxs34(FieldBase, { as: Select, ref, variant, size, ...props, children: [
|
|
3075
3077
|
/* @__PURE__ */ jsxs34(
|
|
3076
|
-
|
|
3078
|
+
Button7,
|
|
3077
3079
|
{
|
|
3078
3080
|
className: cn45(
|
|
3079
3081
|
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
@@ -3100,11 +3102,11 @@ import { GridList as SelectList } from "react-aria-components";
|
|
|
3100
3102
|
import { cn as cn47, useClassNames as useClassNames49 } from "@marigold/system";
|
|
3101
3103
|
|
|
3102
3104
|
// src/SelectList/Context.ts
|
|
3103
|
-
import { createContext as createContext9, useContext as
|
|
3105
|
+
import { createContext as createContext9, useContext as useContext16 } from "react";
|
|
3104
3106
|
var SelectListContext = createContext9(
|
|
3105
3107
|
{}
|
|
3106
3108
|
);
|
|
3107
|
-
var useSelectListContext = () =>
|
|
3109
|
+
var useSelectListContext = () => useContext16(SelectListContext);
|
|
3108
3110
|
|
|
3109
3111
|
// src/SelectList/SelectListItem.tsx
|
|
3110
3112
|
import { forwardRef as forwardRef22 } from "react";
|
|
@@ -3385,18 +3387,22 @@ import {
|
|
|
3385
3387
|
import { cn as cn57, useClassNames as useClassNames53 } from "@marigold/system";
|
|
3386
3388
|
|
|
3387
3389
|
// src/Table/Context.tsx
|
|
3388
|
-
import { createContext as createContext10, useContext as
|
|
3390
|
+
import { createContext as createContext10, useContext as useContext17 } from "react";
|
|
3389
3391
|
var TableContext = createContext10({});
|
|
3390
|
-
var useTableContext = () =>
|
|
3392
|
+
var useTableContext = () => useContext17(TableContext);
|
|
3391
3393
|
|
|
3392
3394
|
// src/Table/TableBody.tsx
|
|
3393
3395
|
import { useTableRowGroup } from "@react-aria/table";
|
|
3394
3396
|
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
3395
|
-
var TableBody = ({
|
|
3397
|
+
var TableBody = ({
|
|
3398
|
+
children,
|
|
3399
|
+
className,
|
|
3400
|
+
emptyState
|
|
3401
|
+
}) => {
|
|
3396
3402
|
const { rowGroupProps } = useTableRowGroup();
|
|
3397
3403
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3398
3404
|
if (state.collection.size === 0 && emptyState) {
|
|
3399
|
-
return /* @__PURE__ */ jsx93("tbody", { children: /* @__PURE__ */ jsx93("tr", { className: classNames2 == null ? void 0 : classNames2.row, role: "row", children: /* @__PURE__ */ jsx93(
|
|
3405
|
+
return /* @__PURE__ */ jsx93("tbody", { className, children: /* @__PURE__ */ jsx93("tr", { className: classNames2 == null ? void 0 : classNames2.row, role: "row", children: /* @__PURE__ */ jsx93(
|
|
3400
3406
|
"td",
|
|
3401
3407
|
{
|
|
3402
3408
|
className: classNames2 == null ? void 0 : classNames2.cell,
|
|
@@ -3406,7 +3412,7 @@ var TableBody = ({ children, emptyState }) => {
|
|
|
3406
3412
|
}
|
|
3407
3413
|
) }) });
|
|
3408
3414
|
}
|
|
3409
|
-
return /* @__PURE__ */ jsx93("tbody", { ...rowGroupProps, children });
|
|
3415
|
+
return /* @__PURE__ */ jsx93("tbody", { ...rowGroupProps, className, children });
|
|
3410
3416
|
};
|
|
3411
3417
|
|
|
3412
3418
|
// src/Table/TableCell.tsx
|
|
@@ -3573,11 +3579,15 @@ var TableHeader = ({ stickyHeader, children }) => {
|
|
|
3573
3579
|
import { useRef as useRef9 } from "react";
|
|
3574
3580
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
3575
3581
|
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
3576
|
-
var TableHeaderRow = ({
|
|
3582
|
+
var TableHeaderRow = ({
|
|
3583
|
+
item,
|
|
3584
|
+
className,
|
|
3585
|
+
children
|
|
3586
|
+
}) => {
|
|
3577
3587
|
const { state } = useTableContext();
|
|
3578
3588
|
const ref = useRef9(null);
|
|
3579
3589
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
3580
|
-
return /* @__PURE__ */ jsx98("tr", { ...rowProps, ref, children });
|
|
3590
|
+
return /* @__PURE__ */ jsx98("tr", { ...rowProps, className, ref, children });
|
|
3581
3591
|
};
|
|
3582
3592
|
|
|
3583
3593
|
// src/Table/TableRow.tsx
|
|
@@ -3729,29 +3739,37 @@ var Table = ({
|
|
|
3729
3739
|
),
|
|
3730
3740
|
...gridProps,
|
|
3731
3741
|
children: [
|
|
3732
|
-
/* @__PURE__ */ jsx101(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx101(
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3742
|
+
/* @__PURE__ */ jsx101(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx101(
|
|
3743
|
+
TableHeaderRow,
|
|
3744
|
+
{
|
|
3745
|
+
item: headerRow,
|
|
3746
|
+
className: classNames2.headerRow,
|
|
3747
|
+
children: [...collection.getChildren(headerRow.key)].map(
|
|
3748
|
+
(column) => {
|
|
3749
|
+
var _a, _b, _c, _d, _e;
|
|
3750
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx101(
|
|
3751
|
+
TableSelectAllCell,
|
|
3752
|
+
{
|
|
3753
|
+
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
3754
|
+
column,
|
|
3755
|
+
align: (_c = column.props) == null ? void 0 : _c.align
|
|
3756
|
+
},
|
|
3757
|
+
column.key
|
|
3758
|
+
) : /* @__PURE__ */ jsx101(
|
|
3759
|
+
TableColumnHeader,
|
|
3760
|
+
{
|
|
3761
|
+
width: (_d = column.props) == null ? void 0 : _d.width,
|
|
3762
|
+
column,
|
|
3763
|
+
align: (_e = column.props) == null ? void 0 : _e.align
|
|
3764
|
+
},
|
|
3765
|
+
column.key
|
|
3766
|
+
);
|
|
3767
|
+
}
|
|
3768
|
+
)
|
|
3769
|
+
},
|
|
3770
|
+
headerRow.key
|
|
3771
|
+
)) }),
|
|
3772
|
+
/* @__PURE__ */ jsxs39(TableBody, { className: classNames2.body, emptyState, children: [
|
|
3755
3773
|
...collection.rows.map(
|
|
3756
3774
|
(row) => row.type === "item" && /* @__PURE__ */ jsx101(TableRow, { row, children: [...collection.getChildren(row.key)].map((cell, index) => {
|
|
3757
3775
|
var _a, _b;
|
|
@@ -4234,9 +4252,9 @@ import { Tabs } from "react-aria-components";
|
|
|
4234
4252
|
import { useClassNames as useClassNames59 } from "@marigold/system";
|
|
4235
4253
|
|
|
4236
4254
|
// src/Tabs/Context.ts
|
|
4237
|
-
import { createContext as createContext11, useContext as
|
|
4255
|
+
import { createContext as createContext11, useContext as useContext18 } from "react";
|
|
4238
4256
|
var TabContext = createContext11({});
|
|
4239
|
-
var useTabContext = () =>
|
|
4257
|
+
var useTabContext = () => useContext18(TabContext);
|
|
4240
4258
|
|
|
4241
4259
|
// src/Tabs/Tab.tsx
|
|
4242
4260
|
import { Tab } from "react-aria-components";
|