@marigold/components 11.0.2 → 11.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +422 -404
- package/dist/index.mjs +323 -299
- 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
|
-
}
|
|
122
|
-
);
|
|
123
|
-
|
|
124
|
-
// src/icons/ChevronRight.tsx
|
|
125
|
-
import { forwardRef as forwardRef2 } from "react";
|
|
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" }) })
|
|
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" }) })
|
|
130
33
|
);
|
|
131
34
|
|
|
132
|
-
// src/Accordion/
|
|
133
|
-
import { jsx as
|
|
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
|
|
|
@@ -1266,7 +1268,12 @@ var _Header = ({ variant, size, ...props }) => {
|
|
|
1266
1268
|
|
|
1267
1269
|
// src/Headline/Headline.tsx
|
|
1268
1270
|
import { Heading as Heading2 } from "react-aria-components";
|
|
1269
|
-
import {
|
|
1271
|
+
import {
|
|
1272
|
+
cn as cn23,
|
|
1273
|
+
ensureCssVar,
|
|
1274
|
+
textAlign,
|
|
1275
|
+
useClassNames as useClassNames21
|
|
1276
|
+
} from "@marigold/system";
|
|
1270
1277
|
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
1271
1278
|
var _Headline = ({
|
|
1272
1279
|
variant,
|
|
@@ -1293,7 +1300,7 @@ var _Headline = ({
|
|
|
1293
1300
|
// possibly set by a <Container>
|
|
1294
1301
|
textAlign[align]
|
|
1295
1302
|
),
|
|
1296
|
-
style: { color:
|
|
1303
|
+
style: { color: ensureCssVar(color) },
|
|
1297
1304
|
children
|
|
1298
1305
|
}
|
|
1299
1306
|
);
|
|
@@ -1381,7 +1388,7 @@ var _DialogTrigger = ({
|
|
|
1381
1388
|
// src/Dialog/Dialog.tsx
|
|
1382
1389
|
import { jsx as jsx45, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1383
1390
|
var CloseButton = ({ className }) => {
|
|
1384
|
-
const ctx =
|
|
1391
|
+
const ctx = useContext8(OverlayTriggerStateContext);
|
|
1385
1392
|
return /* @__PURE__ */ jsx45("div", { className: "absolute top-4 right-4 ml-4", children: /* @__PURE__ */ jsx45(
|
|
1386
1393
|
"button",
|
|
1387
1394
|
{
|
|
@@ -1411,7 +1418,7 @@ var _Dialog = ({
|
|
|
1411
1418
|
}) => {
|
|
1412
1419
|
var _a;
|
|
1413
1420
|
const classNames2 = useClassNames23({ component: "Dialog", variant, size });
|
|
1414
|
-
const state =
|
|
1421
|
+
const state = useContext8(OverlayTriggerStateContext);
|
|
1415
1422
|
const children = typeof props.children === "function" ? props.children({
|
|
1416
1423
|
close: (_a = state == null ? void 0 : state.close) != null ? _a : () => {
|
|
1417
1424
|
}
|
|
@@ -1658,14 +1665,14 @@ import { cn as cn31, useClassNames as useClassNames29 } from "@marigold/system";
|
|
|
1658
1665
|
|
|
1659
1666
|
// src/Calendar/CalendarGridHeader.tsx
|
|
1660
1667
|
import { startOfWeek, today } from "@internationalized/date";
|
|
1661
|
-
import { useContext as
|
|
1668
|
+
import { useContext as useContext9, useMemo } from "react";
|
|
1662
1669
|
import { CalendarStateContext } from "react-aria-components";
|
|
1663
1670
|
import { useCalendarGrid } from "@react-aria/calendar";
|
|
1664
1671
|
import { useDateFormatter, useLocale } from "@react-aria/i18n";
|
|
1665
1672
|
import { useClassNames as useClassNames28 } from "@marigold/system";
|
|
1666
1673
|
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
1667
1674
|
function CalendarGridHeader(props) {
|
|
1668
|
-
const state =
|
|
1675
|
+
const state = useContext9(CalendarStateContext);
|
|
1669
1676
|
const { headerProps } = useCalendarGrid(props, state);
|
|
1670
1677
|
const { locale } = useLocale();
|
|
1671
1678
|
const dayFormatter = useDateFormatter({
|
|
@@ -1704,7 +1711,7 @@ var _CalendarGrid = () => {
|
|
|
1704
1711
|
};
|
|
1705
1712
|
|
|
1706
1713
|
// src/Calendar/CalendarListBox.tsx
|
|
1707
|
-
import { useContext as
|
|
1714
|
+
import { useContext as useContext10 } from "react";
|
|
1708
1715
|
import { CalendarStateContext as CalendarStateContext2 } from "react-aria-components";
|
|
1709
1716
|
import { cn as cn32, useClassNames as useClassNames30 } from "@marigold/system";
|
|
1710
1717
|
|
|
@@ -1731,7 +1738,7 @@ function CalendarListBox({
|
|
|
1731
1738
|
isDisabled,
|
|
1732
1739
|
setSelectedDropdown
|
|
1733
1740
|
}) {
|
|
1734
|
-
const state =
|
|
1741
|
+
const state = useContext10(CalendarStateContext2);
|
|
1735
1742
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
1736
1743
|
const buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
|
|
1737
1744
|
const { select: selectClassNames } = useClassNames30({ component: "Select" });
|
|
@@ -1751,7 +1758,7 @@ function CalendarListBox({
|
|
|
1751
1758
|
}
|
|
1752
1759
|
|
|
1753
1760
|
// src/Calendar/MonthControls.tsx
|
|
1754
|
-
import { Button as
|
|
1761
|
+
import { Button as Button4 } from "react-aria-components";
|
|
1755
1762
|
import { cn as cn33, useClassNames as useClassNames31 } from "@marigold/system";
|
|
1756
1763
|
import { jsx as jsx58, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1757
1764
|
function MonthControls() {
|
|
@@ -1766,7 +1773,7 @@ function MonthControls() {
|
|
|
1766
1773
|
),
|
|
1767
1774
|
children: [
|
|
1768
1775
|
/* @__PURE__ */ jsx58(
|
|
1769
|
-
|
|
1776
|
+
Button4,
|
|
1770
1777
|
{
|
|
1771
1778
|
className: cn33(
|
|
1772
1779
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
@@ -1777,7 +1784,7 @@ function MonthControls() {
|
|
|
1777
1784
|
}
|
|
1778
1785
|
),
|
|
1779
1786
|
/* @__PURE__ */ jsx58(
|
|
1780
|
-
|
|
1787
|
+
Button4,
|
|
1781
1788
|
{
|
|
1782
1789
|
className: cn33(
|
|
1783
1790
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
@@ -1794,11 +1801,11 @@ function MonthControls() {
|
|
|
1794
1801
|
var MonthControls_default = MonthControls;
|
|
1795
1802
|
|
|
1796
1803
|
// src/Calendar/MonthListBox.tsx
|
|
1797
|
-
import { useContext as
|
|
1804
|
+
import { useContext as useContext11 } from "react";
|
|
1798
1805
|
import { CalendarStateContext as CalendarStateContext3 } from "react-aria-components";
|
|
1799
1806
|
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
1800
1807
|
var MonthListBox = ({ setSelectedDropdown }) => {
|
|
1801
|
-
const state =
|
|
1808
|
+
const state = useContext11(CalendarStateContext3);
|
|
1802
1809
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
1803
1810
|
let onChange = (index) => {
|
|
1804
1811
|
let value = Number(index) + 1;
|
|
@@ -1833,7 +1840,7 @@ var MonthListBox_default = MonthListBox;
|
|
|
1833
1840
|
|
|
1834
1841
|
// src/Calendar/YearListBox.tsx
|
|
1835
1842
|
import {
|
|
1836
|
-
useContext as
|
|
1843
|
+
useContext as useContext12,
|
|
1837
1844
|
useEffect,
|
|
1838
1845
|
useRef
|
|
1839
1846
|
} from "react";
|
|
@@ -1841,7 +1848,7 @@ import { CalendarStateContext as CalendarStateContext4 } from "react-aria-compon
|
|
|
1841
1848
|
import { useDateFormatter as useDateFormatter3 } from "@react-aria/i18n";
|
|
1842
1849
|
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
1843
1850
|
var YearListBox = ({ setSelectedDropdown }) => {
|
|
1844
|
-
const state =
|
|
1851
|
+
const state = useContext12(CalendarStateContext4);
|
|
1845
1852
|
const years = [];
|
|
1846
1853
|
let formatter = useDateFormatter3({
|
|
1847
1854
|
year: "numeric",
|
|
@@ -2076,9 +2083,9 @@ var _Link = forwardRef17(
|
|
|
2076
2083
|
import { useClassNames as useClassNames35 } from "@marigold/system";
|
|
2077
2084
|
|
|
2078
2085
|
// src/List/Context.ts
|
|
2079
|
-
import { createContext as createContext6, useContext as
|
|
2086
|
+
import { createContext as createContext6, useContext as useContext13 } from "react";
|
|
2080
2087
|
var ListContext = createContext6({});
|
|
2081
|
-
var useListContext = () =>
|
|
2088
|
+
var useListContext = () => useContext13(ListContext);
|
|
2082
2089
|
|
|
2083
2090
|
// src/List/ListItem.tsx
|
|
2084
2091
|
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
@@ -2172,9 +2179,9 @@ import { useButton } from "@react-aria/button";
|
|
|
2172
2179
|
import { cn as cn38, useClassNames as useClassNames40 } from "@marigold/system";
|
|
2173
2180
|
|
|
2174
2181
|
// src/SectionMessage/Context.tsx
|
|
2175
|
-
import { createContext as createContext7, useContext as
|
|
2182
|
+
import { createContext as createContext7, useContext as useContext14 } from "react";
|
|
2176
2183
|
var SectionMessageContext = createContext7({});
|
|
2177
|
-
var useSectionMessageContext = () =>
|
|
2184
|
+
var useSectionMessageContext = () => useContext14(SectionMessageContext);
|
|
2178
2185
|
|
|
2179
2186
|
// src/SectionMessage/SectionMessageContent.tsx
|
|
2180
2187
|
import { cn as cn36 } from "@marigold/system";
|
|
@@ -2336,7 +2343,7 @@ import { Children as Children4, useState as useState3 } from "react";
|
|
|
2336
2343
|
import { useListData as useListData2 } from "@react-stately/data";
|
|
2337
2344
|
|
|
2338
2345
|
// src/TagGroup/Tag.tsx
|
|
2339
|
-
import { Button as
|
|
2346
|
+
import { Button as Button5, Tag } from "react-aria-components";
|
|
2340
2347
|
import { cn as cn39, useClassNames as useClassNames42 } from "@marigold/system";
|
|
2341
2348
|
|
|
2342
2349
|
// src/TagGroup/TagGroup.tsx
|
|
@@ -2367,7 +2374,7 @@ var _TagGroup = ({
|
|
|
2367
2374
|
// src/TagGroup/Tag.tsx
|
|
2368
2375
|
import { Fragment as Fragment6, jsx as jsx75, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2369
2376
|
var CloseButton2 = ({ className }) => {
|
|
2370
|
-
return /* @__PURE__ */ jsx75(
|
|
2377
|
+
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
2378
|
};
|
|
2372
2379
|
var _Tag = ({ variant, size, children, ...props }) => {
|
|
2373
2380
|
let textValue = typeof children === "string" ? children : void 0;
|
|
@@ -2465,7 +2472,7 @@ import { Group as Group2, NumberField } from "react-aria-components";
|
|
|
2465
2472
|
import { cn as cn41, useClassNames as useClassNames43 } from "@marigold/system";
|
|
2466
2473
|
|
|
2467
2474
|
// src/NumberField/StepButton.tsx
|
|
2468
|
-
import { Button as
|
|
2475
|
+
import { Button as Button6 } from "react-aria-components";
|
|
2469
2476
|
import { cn as cn40 } from "@marigold/system";
|
|
2470
2477
|
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
2471
2478
|
var Plus = () => /* @__PURE__ */ jsx77("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx77(
|
|
@@ -2487,7 +2494,7 @@ var Minus = () => /* @__PURE__ */ jsx77("svg", { width: 16, height: 16, viewBox:
|
|
|
2487
2494
|
var _StepButton = ({ direction, className, ...props }) => {
|
|
2488
2495
|
const Icon4 = direction === "up" ? Plus : Minus;
|
|
2489
2496
|
return /* @__PURE__ */ jsx77(
|
|
2490
|
-
|
|
2497
|
+
Button6,
|
|
2491
2498
|
{
|
|
2492
2499
|
className: cn40(
|
|
2493
2500
|
[
|
|
@@ -2901,11 +2908,11 @@ import { Radio } from "react-aria-components";
|
|
|
2901
2908
|
import { cn as cn44, useClassNames as useClassNames47 } from "@marigold/system";
|
|
2902
2909
|
|
|
2903
2910
|
// src/Radio/Context.ts
|
|
2904
|
-
import { createContext as createContext8, useContext as
|
|
2911
|
+
import { createContext as createContext8, useContext as useContext15 } from "react";
|
|
2905
2912
|
var RadioGroupContext = createContext8(
|
|
2906
2913
|
null
|
|
2907
2914
|
);
|
|
2908
|
-
var useRadioGroupContext = () =>
|
|
2915
|
+
var useRadioGroupContext = () => useContext15(RadioGroupContext);
|
|
2909
2916
|
|
|
2910
2917
|
// src/Radio/RadioGroup.tsx
|
|
2911
2918
|
import { RadioGroup } from "react-aria-components";
|
|
@@ -3044,7 +3051,7 @@ var _SearchField = forwardRef20(
|
|
|
3044
3051
|
// src/Select/Select.tsx
|
|
3045
3052
|
import { forwardRef as forwardRef21 } from "react";
|
|
3046
3053
|
import {
|
|
3047
|
-
Button as
|
|
3054
|
+
Button as Button7,
|
|
3048
3055
|
Select,
|
|
3049
3056
|
SelectValue
|
|
3050
3057
|
} from "react-aria-components";
|
|
@@ -3073,7 +3080,7 @@ var _Select = forwardRef21(
|
|
|
3073
3080
|
const classNames2 = useClassNames48({ component: "Select", variant, size });
|
|
3074
3081
|
return /* @__PURE__ */ jsxs34(FieldBase, { as: Select, ref, variant, size, ...props, children: [
|
|
3075
3082
|
/* @__PURE__ */ jsxs34(
|
|
3076
|
-
|
|
3083
|
+
Button7,
|
|
3077
3084
|
{
|
|
3078
3085
|
className: cn45(
|
|
3079
3086
|
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
@@ -3100,11 +3107,11 @@ import { GridList as SelectList } from "react-aria-components";
|
|
|
3100
3107
|
import { cn as cn47, useClassNames as useClassNames49 } from "@marigold/system";
|
|
3101
3108
|
|
|
3102
3109
|
// src/SelectList/Context.ts
|
|
3103
|
-
import { createContext as createContext9, useContext as
|
|
3110
|
+
import { createContext as createContext9, useContext as useContext16 } from "react";
|
|
3104
3111
|
var SelectListContext = createContext9(
|
|
3105
3112
|
{}
|
|
3106
3113
|
);
|
|
3107
|
-
var useSelectListContext = () =>
|
|
3114
|
+
var useSelectListContext = () => useContext16(SelectListContext);
|
|
3108
3115
|
|
|
3109
3116
|
// src/SelectList/SelectListItem.tsx
|
|
3110
3117
|
import { forwardRef as forwardRef22 } from "react";
|
|
@@ -3385,18 +3392,22 @@ import {
|
|
|
3385
3392
|
import { cn as cn57, useClassNames as useClassNames53 } from "@marigold/system";
|
|
3386
3393
|
|
|
3387
3394
|
// src/Table/Context.tsx
|
|
3388
|
-
import { createContext as createContext10, useContext as
|
|
3395
|
+
import { createContext as createContext10, useContext as useContext17 } from "react";
|
|
3389
3396
|
var TableContext = createContext10({});
|
|
3390
|
-
var useTableContext = () =>
|
|
3397
|
+
var useTableContext = () => useContext17(TableContext);
|
|
3391
3398
|
|
|
3392
3399
|
// src/Table/TableBody.tsx
|
|
3393
3400
|
import { useTableRowGroup } from "@react-aria/table";
|
|
3394
3401
|
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
3395
|
-
var TableBody = ({
|
|
3402
|
+
var TableBody = ({
|
|
3403
|
+
children,
|
|
3404
|
+
className,
|
|
3405
|
+
emptyState
|
|
3406
|
+
}) => {
|
|
3396
3407
|
const { rowGroupProps } = useTableRowGroup();
|
|
3397
3408
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3398
3409
|
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(
|
|
3410
|
+
return /* @__PURE__ */ jsx93("tbody", { className, children: /* @__PURE__ */ jsx93("tr", { className: classNames2 == null ? void 0 : classNames2.row, role: "row", children: /* @__PURE__ */ jsx93(
|
|
3400
3411
|
"td",
|
|
3401
3412
|
{
|
|
3402
3413
|
className: classNames2 == null ? void 0 : classNames2.cell,
|
|
@@ -3406,7 +3417,7 @@ var TableBody = ({ children, emptyState }) => {
|
|
|
3406
3417
|
}
|
|
3407
3418
|
) }) });
|
|
3408
3419
|
}
|
|
3409
|
-
return /* @__PURE__ */ jsx93("tbody", { ...rowGroupProps, children });
|
|
3420
|
+
return /* @__PURE__ */ jsx93("tbody", { ...rowGroupProps, className, children });
|
|
3410
3421
|
};
|
|
3411
3422
|
|
|
3412
3423
|
// src/Table/TableCell.tsx
|
|
@@ -3573,11 +3584,15 @@ var TableHeader = ({ stickyHeader, children }) => {
|
|
|
3573
3584
|
import { useRef as useRef9 } from "react";
|
|
3574
3585
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
3575
3586
|
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
3576
|
-
var TableHeaderRow = ({
|
|
3587
|
+
var TableHeaderRow = ({
|
|
3588
|
+
item,
|
|
3589
|
+
className,
|
|
3590
|
+
children
|
|
3591
|
+
}) => {
|
|
3577
3592
|
const { state } = useTableContext();
|
|
3578
3593
|
const ref = useRef9(null);
|
|
3579
3594
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
3580
|
-
return /* @__PURE__ */ jsx98("tr", { ...rowProps, ref, children });
|
|
3595
|
+
return /* @__PURE__ */ jsx98("tr", { ...rowProps, className, ref, children });
|
|
3581
3596
|
};
|
|
3582
3597
|
|
|
3583
3598
|
// src/Table/TableRow.tsx
|
|
@@ -3729,29 +3744,37 @@ var Table = ({
|
|
|
3729
3744
|
),
|
|
3730
3745
|
...gridProps,
|
|
3731
3746
|
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
|
-
|
|
3747
|
+
/* @__PURE__ */ jsx101(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx101(
|
|
3748
|
+
TableHeaderRow,
|
|
3749
|
+
{
|
|
3750
|
+
item: headerRow,
|
|
3751
|
+
className: classNames2.headerRow,
|
|
3752
|
+
children: [...collection.getChildren(headerRow.key)].map(
|
|
3753
|
+
(column) => {
|
|
3754
|
+
var _a, _b, _c, _d, _e;
|
|
3755
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx101(
|
|
3756
|
+
TableSelectAllCell,
|
|
3757
|
+
{
|
|
3758
|
+
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
3759
|
+
column,
|
|
3760
|
+
align: (_c = column.props) == null ? void 0 : _c.align
|
|
3761
|
+
},
|
|
3762
|
+
column.key
|
|
3763
|
+
) : /* @__PURE__ */ jsx101(
|
|
3764
|
+
TableColumnHeader,
|
|
3765
|
+
{
|
|
3766
|
+
width: (_d = column.props) == null ? void 0 : _d.width,
|
|
3767
|
+
column,
|
|
3768
|
+
align: (_e = column.props) == null ? void 0 : _e.align
|
|
3769
|
+
},
|
|
3770
|
+
column.key
|
|
3771
|
+
);
|
|
3772
|
+
}
|
|
3773
|
+
)
|
|
3774
|
+
},
|
|
3775
|
+
headerRow.key
|
|
3776
|
+
)) }),
|
|
3777
|
+
/* @__PURE__ */ jsxs39(TableBody, { className: classNames2.body, emptyState, children: [
|
|
3755
3778
|
...collection.rows.map(
|
|
3756
3779
|
(row) => row.type === "item" && /* @__PURE__ */ jsx101(TableRow, { row, children: [...collection.getChildren(row.key)].map((cell, index) => {
|
|
3757
3780
|
var _a, _b;
|
|
@@ -3784,6 +3807,7 @@ import { Text as Text2 } from "react-aria-components";
|
|
|
3784
3807
|
import {
|
|
3785
3808
|
cn as cn58,
|
|
3786
3809
|
cursorStyle,
|
|
3810
|
+
ensureCssVar as ensureCssVar2,
|
|
3787
3811
|
fontWeight,
|
|
3788
3812
|
textAlign as textAlign2,
|
|
3789
3813
|
textSize,
|
|
@@ -3826,7 +3850,7 @@ var _Text = ({
|
|
|
3826
3850
|
weight && fontWeight[weight],
|
|
3827
3851
|
fontSize && textSize[fontSize]
|
|
3828
3852
|
),
|
|
3829
|
-
style: { color:
|
|
3853
|
+
style: { color: ensureCssVar2(color) },
|
|
3830
3854
|
children
|
|
3831
3855
|
}
|
|
3832
3856
|
);
|
|
@@ -4234,9 +4258,9 @@ import { Tabs } from "react-aria-components";
|
|
|
4234
4258
|
import { useClassNames as useClassNames59 } from "@marigold/system";
|
|
4235
4259
|
|
|
4236
4260
|
// src/Tabs/Context.ts
|
|
4237
|
-
import { createContext as createContext11, useContext as
|
|
4261
|
+
import { createContext as createContext11, useContext as useContext18 } from "react";
|
|
4238
4262
|
var TabContext = createContext11({});
|
|
4239
|
-
var useTabContext = () =>
|
|
4263
|
+
var useTabContext = () => useContext18(TabContext);
|
|
4240
4264
|
|
|
4241
4265
|
// src/Tabs/Tab.tsx
|
|
4242
4266
|
import { Tab } from "react-aria-components";
|