@marigold/components 9.0.2 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +165 -91
- package/dist/index.d.ts +165 -91
- package/dist/index.js +692 -587
- package/dist/index.mjs +608 -503
- package/package.json +25 -25
package/dist/index.js
CHANGED
|
@@ -57,7 +57,7 @@ __export(src_exports, {
|
|
|
57
57
|
FieldGroup: () => FieldGroup,
|
|
58
58
|
FieldGroupContext: () => FieldGroupContext,
|
|
59
59
|
Footer: () => Footer,
|
|
60
|
-
Form: () =>
|
|
60
|
+
Form: () => import_react_aria_components21.Form,
|
|
61
61
|
Grid: () => Grid,
|
|
62
62
|
Header: () => _Header,
|
|
63
63
|
Headline: () => _Headline,
|
|
@@ -78,7 +78,7 @@ __export(src_exports, {
|
|
|
78
78
|
Popover: () => _Popover,
|
|
79
79
|
Radio: () => _Radio,
|
|
80
80
|
RadioGroup: () => _RadioGroup,
|
|
81
|
-
RouterProvider: () =>
|
|
81
|
+
RouterProvider: () => import_react_aria_components60.RouterProvider,
|
|
82
82
|
Scrollable: () => Scrollable,
|
|
83
83
|
SearchField: () => _SearchField,
|
|
84
84
|
SectionMessage: () => SectionMessage,
|
|
@@ -713,15 +713,12 @@ var _ListBoxItem = ({ ...props }) => {
|
|
|
713
713
|
var import_react_aria_components6 = require("react-aria-components");
|
|
714
714
|
var import_system11 = require("@marigold/system");
|
|
715
715
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
716
|
-
var _Section = (props) => {
|
|
716
|
+
var _Section = ({ header: header2, children, ...props }) => {
|
|
717
717
|
const { classNames: classNames2 } = useListBoxContext();
|
|
718
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.
|
|
719
|
-
import_react_aria_components6.
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
className: (0, import_system11.cn)(classNames2.section, classNames2.sectionTitle)
|
|
723
|
-
}
|
|
724
|
-
);
|
|
718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_aria_components6.Section, { ...props, className: (0, import_system11.cn)(classNames2.section, classNames2.header), children: [
|
|
719
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_aria_components6.Header, { children: header2 }),
|
|
720
|
+
children
|
|
721
|
+
] });
|
|
725
722
|
};
|
|
726
723
|
|
|
727
724
|
// src/ListBox/ListBox.tsx
|
|
@@ -935,7 +932,8 @@ var _Autocomplete = (0, import_react15.forwardRef)(
|
|
|
935
932
|
] });
|
|
936
933
|
}
|
|
937
934
|
);
|
|
938
|
-
_Autocomplete.
|
|
935
|
+
_Autocomplete.Option = _ListBox.Item;
|
|
936
|
+
_Autocomplete.Section = _ListBox.Section;
|
|
939
937
|
|
|
940
938
|
// src/ComboBox/ComboBox.tsx
|
|
941
939
|
var import_react17 = require("react");
|
|
@@ -1010,7 +1008,8 @@ var _ComboBox = (0, import_react17.forwardRef)(
|
|
|
1010
1008
|
] });
|
|
1011
1009
|
}
|
|
1012
1010
|
);
|
|
1013
|
-
_ComboBox.
|
|
1011
|
+
_ComboBox.Option = _ListBox.Item;
|
|
1012
|
+
_ComboBox.Section = _ListBox.Section;
|
|
1014
1013
|
|
|
1015
1014
|
// src/Badge/Badge.tsx
|
|
1016
1015
|
var import_system20 = require("@marigold/system");
|
|
@@ -1119,8 +1118,8 @@ var Center = ({
|
|
|
1119
1118
|
|
|
1120
1119
|
// src/Checkbox/Checkbox.tsx
|
|
1121
1120
|
var import_react19 = require("react");
|
|
1122
|
-
var
|
|
1123
|
-
var
|
|
1121
|
+
var import_react_aria_components14 = require("react-aria-components");
|
|
1122
|
+
var import_system27 = require("@marigold/system");
|
|
1124
1123
|
|
|
1125
1124
|
// src/Checkbox/CheckBoxField.tsx
|
|
1126
1125
|
var import_system25 = require("@marigold/system");
|
|
@@ -1133,14 +1132,61 @@ var CheckboxField = ({ children, labelWidth }) => {
|
|
|
1133
1132
|
] });
|
|
1134
1133
|
};
|
|
1135
1134
|
|
|
1135
|
+
// src/Checkbox/CheckboxGroup.tsx
|
|
1136
|
+
var import_react_aria_components13 = require("react-aria-components");
|
|
1137
|
+
var import_system26 = require("@marigold/system");
|
|
1138
|
+
|
|
1136
1139
|
// src/Checkbox/Context.tsx
|
|
1137
1140
|
var import_react18 = require("react");
|
|
1138
1141
|
var CheckboxGroupContext = (0, import_react18.createContext)(null);
|
|
1139
1142
|
var useCheckboxGroupContext = () => (0, import_react18.useContext)(CheckboxGroupContext);
|
|
1140
1143
|
|
|
1141
|
-
// src/Checkbox/
|
|
1144
|
+
// src/Checkbox/CheckboxGroup.tsx
|
|
1142
1145
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1143
|
-
var
|
|
1146
|
+
var _CheckboxGroup = ({
|
|
1147
|
+
children,
|
|
1148
|
+
variant,
|
|
1149
|
+
size,
|
|
1150
|
+
required,
|
|
1151
|
+
disabled,
|
|
1152
|
+
readOnly,
|
|
1153
|
+
error,
|
|
1154
|
+
width,
|
|
1155
|
+
orientation = "vertical",
|
|
1156
|
+
...rest
|
|
1157
|
+
}) => {
|
|
1158
|
+
const classNames2 = (0, import_system26.useClassNames)({
|
|
1159
|
+
component: "Checkbox",
|
|
1160
|
+
variant,
|
|
1161
|
+
size,
|
|
1162
|
+
className: { group: "gap-x-2" }
|
|
1163
|
+
});
|
|
1164
|
+
const props = {
|
|
1165
|
+
className: classNames2.group,
|
|
1166
|
+
isRequired: required,
|
|
1167
|
+
isDisabled: disabled,
|
|
1168
|
+
isReadOnly: readOnly,
|
|
1169
|
+
isInvalid: error,
|
|
1170
|
+
...rest
|
|
1171
|
+
};
|
|
1172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FieldBase, { as: import_react_aria_components13.CheckboxGroup, width, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1173
|
+
"div",
|
|
1174
|
+
{
|
|
1175
|
+
role: "presentation",
|
|
1176
|
+
"data-orientation": orientation,
|
|
1177
|
+
className: (0, import_system26.cn)(
|
|
1178
|
+
classNames2.group,
|
|
1179
|
+
"flex items-start",
|
|
1180
|
+
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
1181
|
+
),
|
|
1182
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CheckboxGroupContext.Provider, { value: { width, variant, size }, children })
|
|
1183
|
+
}
|
|
1184
|
+
) });
|
|
1185
|
+
};
|
|
1186
|
+
|
|
1187
|
+
// src/Checkbox/Checkbox.tsx
|
|
1188
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1189
|
+
var CheckMark = () => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("svg", { viewBox: "0 0 12 10", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1144
1190
|
"path",
|
|
1145
1191
|
{
|
|
1146
1192
|
fill: "currentColor",
|
|
@@ -1148,7 +1194,7 @@ var CheckMark = () => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("svg", { vie
|
|
|
1148
1194
|
d: "M11.915 1.548 10.367 0 4.045 6.315 1.557 3.827 0 5.373l4.045 4.046 7.87-7.871Z"
|
|
1149
1195
|
}
|
|
1150
1196
|
) });
|
|
1151
|
-
var IndeterminateMark = () => /* @__PURE__ */ (0,
|
|
1197
|
+
var IndeterminateMark = () => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("svg", { width: "12", height: "3", viewBox: "0 0 12 3", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1152
1198
|
"path",
|
|
1153
1199
|
{
|
|
1154
1200
|
fill: "currentColor",
|
|
@@ -1157,11 +1203,11 @@ var IndeterminateMark = () => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("svg
|
|
|
1157
1203
|
}
|
|
1158
1204
|
) });
|
|
1159
1205
|
var Icon2 = ({ className, checked, indeterminate, ...props }) => {
|
|
1160
|
-
return /* @__PURE__ */ (0,
|
|
1206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1161
1207
|
"div",
|
|
1162
1208
|
{
|
|
1163
1209
|
"aria-hidden": "true",
|
|
1164
|
-
className: (0,
|
|
1210
|
+
className: (0, import_system27.cn)(
|
|
1165
1211
|
"flex shrink-0 grow-0 basis-4 items-center justify-center",
|
|
1166
1212
|
"h-4 w-4 p-px",
|
|
1167
1213
|
"bg-white",
|
|
@@ -1169,7 +1215,7 @@ var Icon2 = ({ className, checked, indeterminate, ...props }) => {
|
|
|
1169
1215
|
className
|
|
1170
1216
|
),
|
|
1171
1217
|
...props,
|
|
1172
|
-
children: indeterminate ? /* @__PURE__ */ (0,
|
|
1218
|
+
children: indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(IndeterminateMark, {}) : checked ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CheckMark, {}) : null
|
|
1173
1219
|
}
|
|
1174
1220
|
);
|
|
1175
1221
|
};
|
|
@@ -1199,23 +1245,23 @@ var _Checkbox = (0, import_react19.forwardRef)(
|
|
|
1199
1245
|
};
|
|
1200
1246
|
const { labelWidth } = useFieldGroupContext();
|
|
1201
1247
|
const group = useCheckboxGroupContext();
|
|
1202
|
-
const classNames2 = (0,
|
|
1248
|
+
const classNames2 = (0, import_system27.useClassNames)({
|
|
1203
1249
|
component: "Checkbox",
|
|
1204
1250
|
variant: variant || (group == null ? void 0 : group.variant),
|
|
1205
1251
|
size: size || (group == null ? void 0 : group.size)
|
|
1206
1252
|
});
|
|
1207
|
-
const component = /* @__PURE__ */ (0,
|
|
1208
|
-
|
|
1253
|
+
const component = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1254
|
+
import_react_aria_components14.Checkbox,
|
|
1209
1255
|
{
|
|
1210
1256
|
ref,
|
|
1211
|
-
className: (0,
|
|
1257
|
+
className: (0, import_system27.cn)(
|
|
1212
1258
|
"group/checkbox flex items-center gap-[0.5rem]",
|
|
1213
1259
|
"cursor-pointer data-[disabled]:cursor-not-allowed",
|
|
1214
1260
|
classNames2.container
|
|
1215
1261
|
),
|
|
1216
1262
|
...props,
|
|
1217
|
-
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ (0,
|
|
1218
|
-
/* @__PURE__ */ (0,
|
|
1263
|
+
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
1264
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1219
1265
|
Icon2,
|
|
1220
1266
|
{
|
|
1221
1267
|
checked: isSelected,
|
|
@@ -1223,58 +1269,14 @@ var _Checkbox = (0, import_react19.forwardRef)(
|
|
|
1223
1269
|
className: classNames2.checkbox
|
|
1224
1270
|
}
|
|
1225
1271
|
),
|
|
1226
|
-
/* @__PURE__ */ (0,
|
|
1272
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: classNames2.label, children }) : null
|
|
1227
1273
|
] })
|
|
1228
1274
|
}
|
|
1229
1275
|
);
|
|
1230
|
-
return !group && !!labelWidth ? /* @__PURE__ */ (0,
|
|
1276
|
+
return !group && !!labelWidth ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CheckboxField, { labelWidth, children: component }) : component;
|
|
1231
1277
|
}
|
|
1232
1278
|
);
|
|
1233
|
-
|
|
1234
|
-
// src/Checkbox/CheckboxGroup.tsx
|
|
1235
|
-
var import_react_aria_components14 = require("react-aria-components");
|
|
1236
|
-
var import_system27 = require("@marigold/system");
|
|
1237
|
-
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1238
|
-
var _CheckboxGroup = ({
|
|
1239
|
-
children,
|
|
1240
|
-
variant,
|
|
1241
|
-
size,
|
|
1242
|
-
required,
|
|
1243
|
-
disabled,
|
|
1244
|
-
readOnly,
|
|
1245
|
-
error,
|
|
1246
|
-
width,
|
|
1247
|
-
orientation = "vertical",
|
|
1248
|
-
...rest
|
|
1249
|
-
}) => {
|
|
1250
|
-
const classNames2 = (0, import_system27.useClassNames)({
|
|
1251
|
-
component: "Checkbox",
|
|
1252
|
-
variant,
|
|
1253
|
-
size,
|
|
1254
|
-
className: { group: "gap-x-2" }
|
|
1255
|
-
});
|
|
1256
|
-
const props = {
|
|
1257
|
-
className: classNames2.group,
|
|
1258
|
-
isRequired: required,
|
|
1259
|
-
isDisabled: disabled,
|
|
1260
|
-
isReadOnly: readOnly,
|
|
1261
|
-
isInvalid: error,
|
|
1262
|
-
...rest
|
|
1263
|
-
};
|
|
1264
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FieldBase, { as: import_react_aria_components14.CheckboxGroup, width, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1265
|
-
"div",
|
|
1266
|
-
{
|
|
1267
|
-
role: "presentation",
|
|
1268
|
-
"data-orientation": orientation,
|
|
1269
|
-
className: (0, import_system27.cn)(
|
|
1270
|
-
classNames2.group,
|
|
1271
|
-
"flex items-start",
|
|
1272
|
-
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
1273
|
-
),
|
|
1274
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CheckboxGroupContext.Provider, { value: { width, variant, size }, children })
|
|
1275
|
-
}
|
|
1276
|
-
) });
|
|
1277
|
-
};
|
|
1279
|
+
_Checkbox.Group = _CheckboxGroup;
|
|
1278
1280
|
|
|
1279
1281
|
// src/Columns/Columns.tsx
|
|
1280
1282
|
var import_react20 = require("react");
|
|
@@ -1362,13 +1364,49 @@ var Container = ({
|
|
|
1362
1364
|
|
|
1363
1365
|
// src/Dialog/Dialog.tsx
|
|
1364
1366
|
var import_react23 = require("react");
|
|
1365
|
-
var
|
|
1366
|
-
var
|
|
1367
|
+
var import_react_aria_components19 = require("react-aria-components");
|
|
1368
|
+
var import_system35 = require("@marigold/system");
|
|
1367
1369
|
|
|
1368
|
-
// src/
|
|
1369
|
-
var import_react_aria_components15 = require("react-aria-components");
|
|
1370
|
+
// src/Dialog/DialogActions.tsx
|
|
1370
1371
|
var import_system30 = require("@marigold/system");
|
|
1371
1372
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1373
|
+
var DialogActions = ({ variant, size, children }) => {
|
|
1374
|
+
const classNames2 = (0, import_system30.useClassNames)({ component: "Dialog", variant, size });
|
|
1375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: (0, import_system30.cn)("[grid-area:actions]", classNames2.actions), children });
|
|
1376
|
+
};
|
|
1377
|
+
|
|
1378
|
+
// src/Dialog/DialogContent.tsx
|
|
1379
|
+
var import_system31 = require("@marigold/system");
|
|
1380
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1381
|
+
var DialogContent = ({
|
|
1382
|
+
variant,
|
|
1383
|
+
size,
|
|
1384
|
+
children
|
|
1385
|
+
}) => {
|
|
1386
|
+
const classNames2 = (0, import_system31.useClassNames)({ component: "Dialog", variant, size });
|
|
1387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: (0, import_system31.cn)("[grid-area:content]", classNames2.content), children });
|
|
1388
|
+
};
|
|
1389
|
+
|
|
1390
|
+
// src/Dialog/DialogTitle.tsx
|
|
1391
|
+
var import_system34 = require("@marigold/system");
|
|
1392
|
+
|
|
1393
|
+
// src/Header/Header.tsx
|
|
1394
|
+
var import_react_aria_components15 = require("react-aria-components");
|
|
1395
|
+
var import_system32 = require("@marigold/system");
|
|
1396
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1397
|
+
var _Header = ({ variant, size, ...props }) => {
|
|
1398
|
+
const classNames2 = (0, import_system32.useClassNames)({
|
|
1399
|
+
component: "Header",
|
|
1400
|
+
variant,
|
|
1401
|
+
size
|
|
1402
|
+
});
|
|
1403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_aria_components15.Header, { className: classNames2, ...props, children: props.children });
|
|
1404
|
+
};
|
|
1405
|
+
|
|
1406
|
+
// src/Headline/Headline.tsx
|
|
1407
|
+
var import_react_aria_components16 = require("react-aria-components");
|
|
1408
|
+
var import_system33 = require("@marigold/system");
|
|
1409
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1372
1410
|
var _Headline = ({
|
|
1373
1411
|
variant,
|
|
1374
1412
|
size,
|
|
@@ -1378,20 +1416,20 @@ var _Headline = ({
|
|
|
1378
1416
|
level = "1",
|
|
1379
1417
|
...props
|
|
1380
1418
|
}) => {
|
|
1381
|
-
const theme = (0,
|
|
1382
|
-
const classNames2 = (0,
|
|
1419
|
+
const theme = (0, import_system33.useTheme)();
|
|
1420
|
+
const classNames2 = (0, import_system33.useClassNames)({
|
|
1383
1421
|
component: "Headline",
|
|
1384
1422
|
variant,
|
|
1385
1423
|
size: size != null ? size : `level-${level}`
|
|
1386
1424
|
});
|
|
1387
|
-
return /* @__PURE__ */ (0,
|
|
1388
|
-
|
|
1425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1426
|
+
import_react_aria_components16.Heading,
|
|
1389
1427
|
{
|
|
1390
1428
|
level: Number(level),
|
|
1391
1429
|
...props,
|
|
1392
|
-
className: (0,
|
|
1393
|
-
style: (0,
|
|
1394
|
-
color: color && (0,
|
|
1430
|
+
className: (0, import_system33.cn)(classNames2, "text-[--color]", import_system33.textAlign[align]),
|
|
1431
|
+
style: (0, import_system33.createVar)({
|
|
1432
|
+
color: color && (0, import_system33.getColor)(
|
|
1395
1433
|
theme,
|
|
1396
1434
|
color,
|
|
1397
1435
|
color
|
|
@@ -1403,14 +1441,26 @@ var _Headline = ({
|
|
|
1403
1441
|
);
|
|
1404
1442
|
};
|
|
1405
1443
|
|
|
1444
|
+
// src/Dialog/DialogTitle.tsx
|
|
1445
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1446
|
+
var DialogTitle = ({
|
|
1447
|
+
level = "2",
|
|
1448
|
+
variant,
|
|
1449
|
+
size,
|
|
1450
|
+
children
|
|
1451
|
+
}) => {
|
|
1452
|
+
const classNames2 = (0, import_system34.useClassNames)({ component: "Dialog", variant, size });
|
|
1453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(_Header, { className: (0, import_system34.cn)("[grid-area:title]", classNames2.header), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(_Headline, { slot: "title", level, children }) });
|
|
1454
|
+
};
|
|
1455
|
+
|
|
1406
1456
|
// src/Dialog/DialogTrigger.tsx
|
|
1407
1457
|
var import_react22 = require("react");
|
|
1408
|
-
var
|
|
1458
|
+
var import_react_aria_components18 = require("react-aria-components");
|
|
1409
1459
|
|
|
1410
1460
|
// src/Overlay/Modal.tsx
|
|
1411
1461
|
var import_react21 = require("react");
|
|
1412
|
-
var
|
|
1413
|
-
var
|
|
1462
|
+
var import_react_aria_components17 = require("react-aria-components");
|
|
1463
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1414
1464
|
var _Modal = (0, import_react21.forwardRef)(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
|
|
1415
1465
|
const props = {
|
|
1416
1466
|
isOpen: open,
|
|
@@ -1418,20 +1468,28 @@ var _Modal = (0, import_react21.forwardRef)(({ open, dismissable, keyboardDismis
|
|
|
1418
1468
|
isKeyboardDismissDisabled: keyboardDismissable,
|
|
1419
1469
|
...rest
|
|
1420
1470
|
};
|
|
1421
|
-
return /* @__PURE__ */ (0,
|
|
1471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1422
1472
|
Underlay,
|
|
1423
1473
|
{
|
|
1424
1474
|
dismissable,
|
|
1425
1475
|
keyboardDismissable,
|
|
1426
1476
|
open,
|
|
1427
1477
|
variant: "modal",
|
|
1428
|
-
children: /* @__PURE__ */ (0,
|
|
1478
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1479
|
+
import_react_aria_components17.Modal,
|
|
1480
|
+
{
|
|
1481
|
+
ref,
|
|
1482
|
+
className: "relative flex w-full justify-center",
|
|
1483
|
+
...props,
|
|
1484
|
+
children: props.children
|
|
1485
|
+
}
|
|
1486
|
+
)
|
|
1429
1487
|
}
|
|
1430
1488
|
);
|
|
1431
1489
|
});
|
|
1432
1490
|
|
|
1433
1491
|
// src/Dialog/DialogTrigger.tsx
|
|
1434
|
-
var
|
|
1492
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1435
1493
|
var _DialogTrigger = ({
|
|
1436
1494
|
open,
|
|
1437
1495
|
dismissable,
|
|
@@ -1448,10 +1506,10 @@ var _DialogTrigger = ({
|
|
|
1448
1506
|
const hasDialogTrigger = dialogTrigger.type !== _Dialog;
|
|
1449
1507
|
const currentDialog = children.length < 2 ? !hasDialogTrigger && dialogTrigger : dialog;
|
|
1450
1508
|
if (isNonModal)
|
|
1451
|
-
return /* @__PURE__ */ (0,
|
|
1452
|
-
return /* @__PURE__ */ (0,
|
|
1509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components18.DialogTrigger, { ...props, children: props.children });
|
|
1510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react_aria_components18.DialogTrigger, { ...props, children: [
|
|
1453
1511
|
hasDialogTrigger && dialogTrigger,
|
|
1454
|
-
/* @__PURE__ */ (0,
|
|
1512
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1455
1513
|
_Modal,
|
|
1456
1514
|
{
|
|
1457
1515
|
dismissable,
|
|
@@ -1463,18 +1521,19 @@ var _DialogTrigger = ({
|
|
|
1463
1521
|
};
|
|
1464
1522
|
|
|
1465
1523
|
// src/Dialog/Dialog.tsx
|
|
1466
|
-
var
|
|
1524
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1467
1525
|
var CloseButton = ({ className }) => {
|
|
1468
|
-
const { close } = (0, import_react23.useContext)(
|
|
1469
|
-
return /* @__PURE__ */ (0,
|
|
1526
|
+
const { close } = (0, import_react23.useContext)(import_react_aria_components19.OverlayTriggerStateContext);
|
|
1527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "absolute right-4 top-4 ml-4", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1470
1528
|
"button",
|
|
1471
1529
|
{
|
|
1472
|
-
className: (0,
|
|
1530
|
+
className: (0, import_system35.cn)(
|
|
1473
1531
|
"h-4 w-4 cursor-pointer border-none p-0 leading-normal outline-0",
|
|
1474
1532
|
className
|
|
1475
1533
|
),
|
|
1476
1534
|
onClick: close,
|
|
1477
|
-
|
|
1535
|
+
slot: "dismiss-button",
|
|
1536
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1478
1537
|
"path",
|
|
1479
1538
|
{
|
|
1480
1539
|
fillRule: "evenodd",
|
|
@@ -1485,7 +1544,6 @@ var CloseButton = ({ className }) => {
|
|
|
1485
1544
|
}
|
|
1486
1545
|
) });
|
|
1487
1546
|
};
|
|
1488
|
-
var DialogHeadline = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(_Headline, { slot: "title", children });
|
|
1489
1547
|
var _Dialog = ({
|
|
1490
1548
|
variant,
|
|
1491
1549
|
size,
|
|
@@ -1493,59 +1551,61 @@ var _Dialog = ({
|
|
|
1493
1551
|
isNonModal,
|
|
1494
1552
|
...props
|
|
1495
1553
|
}) => {
|
|
1496
|
-
const classNames2 = (0,
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
});
|
|
1504
|
-
}
|
|
1505
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1506
|
-
import_react_aria_components18.Dialog,
|
|
1554
|
+
const classNames2 = (0, import_system35.useClassNames)({ component: "Dialog", variant, size });
|
|
1555
|
+
const state = (0, import_react23.useContext)(import_react_aria_components19.OverlayTriggerStateContext);
|
|
1556
|
+
const children = typeof props.children === "function" ? props.children({
|
|
1557
|
+
close: state == null ? void 0 : state.close
|
|
1558
|
+
}) : props.children;
|
|
1559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
1560
|
+
import_react_aria_components19.Dialog,
|
|
1507
1561
|
{
|
|
1508
1562
|
...props,
|
|
1509
|
-
className: (0,
|
|
1510
|
-
|
|
1511
|
-
|
|
1563
|
+
className: (0, import_system35.cn)(
|
|
1564
|
+
"relative outline-none [&>*:not(:last-child)]:mb-4",
|
|
1565
|
+
"grid [grid-template-areas:'title'_'content'_'actions']",
|
|
1566
|
+
classNames2.container
|
|
1567
|
+
),
|
|
1568
|
+
children: [
|
|
1569
|
+
closeButton && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CloseButton, { className: classNames2.closeButton }),
|
|
1512
1570
|
children
|
|
1513
|
-
]
|
|
1571
|
+
]
|
|
1514
1572
|
}
|
|
1515
1573
|
);
|
|
1516
1574
|
};
|
|
1517
1575
|
_Dialog.Trigger = _DialogTrigger;
|
|
1518
|
-
_Dialog.
|
|
1576
|
+
_Dialog.Title = DialogTitle;
|
|
1577
|
+
_Dialog.Content = DialogContent;
|
|
1578
|
+
_Dialog.Actions = DialogActions;
|
|
1519
1579
|
|
|
1520
1580
|
// src/Divider/Divider.tsx
|
|
1521
|
-
var
|
|
1522
|
-
var
|
|
1523
|
-
var
|
|
1581
|
+
var import_react_aria_components20 = require("react-aria-components");
|
|
1582
|
+
var import_system36 = require("@marigold/system");
|
|
1583
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1524
1584
|
var _Divider = ({ variant, ...props }) => {
|
|
1525
|
-
const classNames2 = (0,
|
|
1526
|
-
return /* @__PURE__ */ (0,
|
|
1585
|
+
const classNames2 = (0, import_system36.useClassNames)({ component: "Divider", variant });
|
|
1586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_aria_components20.Separator, { className: (0, import_system36.cn)("border-none", classNames2), ...props });
|
|
1527
1587
|
};
|
|
1528
1588
|
|
|
1529
1589
|
// src/Footer/Footer.tsx
|
|
1530
|
-
var
|
|
1531
|
-
var
|
|
1590
|
+
var import_system37 = require("@marigold/system");
|
|
1591
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1532
1592
|
var Footer = ({ children, variant, size, ...props }) => {
|
|
1533
|
-
const classNames2 = (0,
|
|
1534
|
-
return /* @__PURE__ */ (0,
|
|
1593
|
+
const classNames2 = (0, import_system37.useClassNames)({ component: "Footer", variant, size });
|
|
1594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("footer", { ...props, className: classNames2, children });
|
|
1535
1595
|
};
|
|
1536
1596
|
|
|
1537
1597
|
// src/Form/Form.tsx
|
|
1538
|
-
var
|
|
1598
|
+
var import_react_aria_components21 = require("react-aria-components");
|
|
1539
1599
|
|
|
1540
1600
|
// src/Grid/Grid.tsx
|
|
1541
|
-
var
|
|
1601
|
+
var import_system38 = require("@marigold/system");
|
|
1542
1602
|
|
|
1543
1603
|
// src/Grid/GridArea.tsx
|
|
1544
|
-
var
|
|
1545
|
-
var GridArea = ({ name, children }) => /* @__PURE__ */ (0,
|
|
1604
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1605
|
+
var GridArea = ({ name, children }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { style: { gridArea: name }, children });
|
|
1546
1606
|
|
|
1547
1607
|
// src/Grid/Grid.tsx
|
|
1548
|
-
var
|
|
1608
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1549
1609
|
var parseGridAreas = (areas) => areas.map((area) => `"${area}"`).join("\n");
|
|
1550
1610
|
var parseTemplateValue = (values) => values.map((val) => typeof val === "number" ? `${val}fr` : val).join(" ");
|
|
1551
1611
|
var Grid = ({
|
|
@@ -1557,10 +1617,10 @@ var Grid = ({
|
|
|
1557
1617
|
space = 0,
|
|
1558
1618
|
...props
|
|
1559
1619
|
}) => {
|
|
1560
|
-
return /* @__PURE__ */ (0,
|
|
1620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1561
1621
|
"div",
|
|
1562
1622
|
{
|
|
1563
|
-
className: (0,
|
|
1623
|
+
className: (0, import_system38.cn)("grid", import_system38.gapSpace[space], import_system38.height[height]),
|
|
1564
1624
|
style: {
|
|
1565
1625
|
gridTemplateAreas: parseGridAreas(areas),
|
|
1566
1626
|
gridTemplateColumns: parseTemplateValue(columns),
|
|
@@ -1573,22 +1633,9 @@ var Grid = ({
|
|
|
1573
1633
|
};
|
|
1574
1634
|
Grid.Area = GridArea;
|
|
1575
1635
|
|
|
1576
|
-
// src/Header/Header.tsx
|
|
1577
|
-
var import_react_aria_components21 = require("react-aria-components");
|
|
1578
|
-
var import_system35 = require("@marigold/system");
|
|
1579
|
-
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1580
|
-
var _Header = ({ variant, size, ...props }) => {
|
|
1581
|
-
const classNames2 = (0, import_system35.useClassNames)({
|
|
1582
|
-
component: "Header",
|
|
1583
|
-
variant,
|
|
1584
|
-
size
|
|
1585
|
-
});
|
|
1586
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_aria_components21.Header, { className: classNames2, ...props, children: props.children });
|
|
1587
|
-
};
|
|
1588
|
-
|
|
1589
1636
|
// src/Image/Image.tsx
|
|
1590
|
-
var
|
|
1591
|
-
var
|
|
1637
|
+
var import_system39 = require("@marigold/system");
|
|
1638
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1592
1639
|
var Image = ({
|
|
1593
1640
|
variant,
|
|
1594
1641
|
size,
|
|
@@ -1596,25 +1643,25 @@ var Image = ({
|
|
|
1596
1643
|
position = "none",
|
|
1597
1644
|
...props
|
|
1598
1645
|
}) => {
|
|
1599
|
-
const classNames2 = (0,
|
|
1600
|
-
return /* @__PURE__ */ (0,
|
|
1646
|
+
const classNames2 = (0, import_system39.useClassNames)({ component: "Image", variant, size });
|
|
1647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1601
1648
|
"img",
|
|
1602
1649
|
{
|
|
1603
1650
|
...props,
|
|
1604
1651
|
alt: props.alt,
|
|
1605
|
-
className: (0,
|
|
1652
|
+
className: (0, import_system39.cn)(
|
|
1606
1653
|
fit !== "none" && "h-full w-full",
|
|
1607
1654
|
classNames2,
|
|
1608
|
-
|
|
1609
|
-
|
|
1655
|
+
import_system39.objectFit[fit],
|
|
1656
|
+
import_system39.objectPosition[position]
|
|
1610
1657
|
)
|
|
1611
1658
|
}
|
|
1612
1659
|
);
|
|
1613
1660
|
};
|
|
1614
1661
|
|
|
1615
1662
|
// src/Inline/Inline.tsx
|
|
1616
|
-
var
|
|
1617
|
-
var
|
|
1663
|
+
var import_system40 = require("@marigold/system");
|
|
1664
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1618
1665
|
var Inline = ({
|
|
1619
1666
|
space = 0,
|
|
1620
1667
|
alignX,
|
|
@@ -1623,15 +1670,15 @@ var Inline = ({
|
|
|
1623
1670
|
...props
|
|
1624
1671
|
}) => {
|
|
1625
1672
|
var _a, _b, _c, _d;
|
|
1626
|
-
return /* @__PURE__ */ (0,
|
|
1673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1627
1674
|
"div",
|
|
1628
1675
|
{
|
|
1629
1676
|
...props,
|
|
1630
|
-
className: (0,
|
|
1677
|
+
className: (0, import_system40.cn)(
|
|
1631
1678
|
"flex flex-wrap",
|
|
1632
|
-
|
|
1633
|
-
alignX && ((_b = (_a =
|
|
1634
|
-
alignY && ((_d = (_c =
|
|
1679
|
+
import_system40.gapSpace[space],
|
|
1680
|
+
alignX && ((_b = (_a = import_system40.alignment) == null ? void 0 : _a.horizontal) == null ? void 0 : _b.alignmentX[alignX]),
|
|
1681
|
+
alignY && ((_d = (_c = import_system40.alignment) == null ? void 0 : _c.horizontal) == null ? void 0 : _d.alignmentY[alignY])
|
|
1635
1682
|
),
|
|
1636
1683
|
children
|
|
1637
1684
|
}
|
|
@@ -1644,14 +1691,14 @@ var import_react_aria_components24 = require("react-aria-components");
|
|
|
1644
1691
|
|
|
1645
1692
|
// src/DateField/DateInput.tsx
|
|
1646
1693
|
var import_react_aria_components23 = require("react-aria-components");
|
|
1647
|
-
var
|
|
1694
|
+
var import_system42 = require("@marigold/system");
|
|
1648
1695
|
|
|
1649
1696
|
// src/DateField/DateSegment.tsx
|
|
1650
1697
|
var import_react_aria_components22 = require("react-aria-components");
|
|
1651
|
-
var
|
|
1652
|
-
var
|
|
1698
|
+
var import_system41 = require("@marigold/system");
|
|
1699
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1653
1700
|
var _DateSegment = ({ segment, ...props }) => {
|
|
1654
|
-
return /* @__PURE__ */ (0,
|
|
1701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1655
1702
|
import_react_aria_components22.DateSegment,
|
|
1656
1703
|
{
|
|
1657
1704
|
...props,
|
|
@@ -1659,31 +1706,31 @@ var _DateSegment = ({ segment, ...props }) => {
|
|
|
1659
1706
|
style: {
|
|
1660
1707
|
minWidth: segment.maxValue != null ? `${String(segment.maxValue).length}ch` : void 0
|
|
1661
1708
|
},
|
|
1662
|
-
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */ (0,
|
|
1663
|
-
/* @__PURE__ */ (0,
|
|
1709
|
+
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
1710
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1664
1711
|
"span",
|
|
1665
1712
|
{
|
|
1666
1713
|
"aria-hidden": "true",
|
|
1667
|
-
className: (0,
|
|
1714
|
+
className: (0, import_system41.cn)(
|
|
1668
1715
|
isPlaceholder ? "visible block" : "invisible hidden",
|
|
1669
1716
|
"pointer-events-none w-full text-center"
|
|
1670
1717
|
),
|
|
1671
1718
|
children: isPlaceholder && (placeholder == null ? void 0 : placeholder.toUpperCase())
|
|
1672
1719
|
}
|
|
1673
1720
|
),
|
|
1674
|
-
/* @__PURE__ */ (0,
|
|
1721
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: isPlaceholder ? "" : segment.type === "month" || segment.type === "day" ? segment.text.padStart(2, "0") : text })
|
|
1675
1722
|
] })
|
|
1676
1723
|
}
|
|
1677
1724
|
);
|
|
1678
1725
|
};
|
|
1679
1726
|
|
|
1680
1727
|
// src/DateField/DateInput.tsx
|
|
1681
|
-
var
|
|
1728
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1682
1729
|
var _DateInput = ({ variant, size, action, ...props }) => {
|
|
1683
|
-
const classNames2 = (0,
|
|
1684
|
-
return /* @__PURE__ */ (0,
|
|
1685
|
-
/* @__PURE__ */ (0,
|
|
1686
|
-
action ? action : /* @__PURE__ */ (0,
|
|
1730
|
+
const classNames2 = (0, import_system42.useClassNames)({ component: "DateField", variant, size });
|
|
1731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_aria_components23.Group, { className: classNames2.field, children: [
|
|
1732
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_aria_components23.DateInput, { className: "flex flex-1 items-center", ...props, children: (segment) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(_DateSegment, { className: classNames2.segment, segment }) }),
|
|
1733
|
+
action ? action : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1687
1734
|
"svg",
|
|
1688
1735
|
{
|
|
1689
1736
|
"data-testid": "action",
|
|
@@ -1691,14 +1738,14 @@ var _DateInput = ({ variant, size, action, ...props }) => {
|
|
|
1691
1738
|
viewBox: "0 0 24 24",
|
|
1692
1739
|
width: 24,
|
|
1693
1740
|
height: 24,
|
|
1694
|
-
children: /* @__PURE__ */ (0,
|
|
1741
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("path", { d: "M20.0906 19.2V6.6C20.0906 5.61 19.2806 4.8 18.2906 4.8H17.3906V3H15.5906V4.8H8.39062V3H6.59062V4.8H5.69063C4.69163 4.8 3.89962 5.61 3.89962 6.6L3.89062 19.2C3.89062 20.19 4.69163 21 5.69063 21H18.2906C19.2806 21 20.0906 20.19 20.0906 19.2ZM9.29062 11.1001H7.49061V12.9001H9.29062V11.1001ZM5.69062 8.40009H18.2906V6.60008H5.69062V8.40009ZM18.2906 10.2V19.2H5.69062V10.2H18.2906ZM14.6906 12.9001H16.4906V11.1001H14.6906V12.9001ZM12.8906 12.9001H11.0906V11.1001H12.8906V12.9001Z" })
|
|
1695
1742
|
}
|
|
1696
1743
|
) })
|
|
1697
1744
|
] });
|
|
1698
1745
|
};
|
|
1699
1746
|
|
|
1700
1747
|
// src/DateField/DateField.tsx
|
|
1701
|
-
var
|
|
1748
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1702
1749
|
var _DateField = (0, import_react24.forwardRef)(
|
|
1703
1750
|
({
|
|
1704
1751
|
variant,
|
|
@@ -1717,7 +1764,7 @@ var _DateField = (0, import_react24.forwardRef)(
|
|
|
1717
1764
|
isRequired: required,
|
|
1718
1765
|
...rest
|
|
1719
1766
|
};
|
|
1720
|
-
return /* @__PURE__ */ (0,
|
|
1767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1721
1768
|
FieldBase,
|
|
1722
1769
|
{
|
|
1723
1770
|
as: import_react_aria_components24.DateField,
|
|
@@ -1725,7 +1772,7 @@ var _DateField = (0, import_react24.forwardRef)(
|
|
|
1725
1772
|
size,
|
|
1726
1773
|
ref,
|
|
1727
1774
|
...props,
|
|
1728
|
-
children: /* @__PURE__ */ (0,
|
|
1775
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(_DateInput, { action })
|
|
1729
1776
|
}
|
|
1730
1777
|
);
|
|
1731
1778
|
}
|
|
@@ -1734,11 +1781,11 @@ var _DateField = (0, import_react24.forwardRef)(
|
|
|
1734
1781
|
// src/Calendar/Calendar.tsx
|
|
1735
1782
|
var import_react29 = require("react");
|
|
1736
1783
|
var import_react_aria_components31 = require("react-aria-components");
|
|
1737
|
-
var
|
|
1784
|
+
var import_system47 = require("@marigold/system");
|
|
1738
1785
|
|
|
1739
1786
|
// src/Calendar/CalendarGrid.tsx
|
|
1740
1787
|
var import_react_aria_components26 = require("react-aria-components");
|
|
1741
|
-
var
|
|
1788
|
+
var import_system44 = require("@marigold/system");
|
|
1742
1789
|
|
|
1743
1790
|
// src/Calendar/CalendarGridHeader.tsx
|
|
1744
1791
|
var import_date = require("@internationalized/date");
|
|
@@ -1746,8 +1793,8 @@ var import_react25 = require("react");
|
|
|
1746
1793
|
var import_react_aria_components25 = require("react-aria-components");
|
|
1747
1794
|
var import_calendar = require("@react-aria/calendar");
|
|
1748
1795
|
var import_i18n3 = require("@react-aria/i18n");
|
|
1749
|
-
var
|
|
1750
|
-
var
|
|
1796
|
+
var import_system43 = require("@marigold/system");
|
|
1797
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1751
1798
|
function CalendarGridHeader(props) {
|
|
1752
1799
|
const state = (0, import_react25.useContext)(import_react_aria_components25.CalendarStateContext);
|
|
1753
1800
|
const { headerProps } = (0, import_calendar.useCalendarGrid)(props, state);
|
|
@@ -1764,21 +1811,21 @@ function CalendarGridHeader(props) {
|
|
|
1764
1811
|
return dayFormatter.format(dateDay);
|
|
1765
1812
|
});
|
|
1766
1813
|
}, [locale, state.timeZone, dayFormatter]);
|
|
1767
|
-
const classNames2 = (0,
|
|
1768
|
-
return /* @__PURE__ */ (0,
|
|
1814
|
+
const classNames2 = (0, import_system43.useClassNames)({ component: "Calendar" });
|
|
1815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("thead", { ...headerProps, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("tr", { children: weekDays.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("th", { className: classNames2.calendarHeader, children: day.substring(0, 2) }, index)) }) });
|
|
1769
1816
|
}
|
|
1770
1817
|
|
|
1771
1818
|
// src/Calendar/CalendarGrid.tsx
|
|
1772
|
-
var
|
|
1819
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1773
1820
|
var _CalendarGrid = () => {
|
|
1774
|
-
const classNames2 = (0,
|
|
1775
|
-
return /* @__PURE__ */ (0,
|
|
1776
|
-
/* @__PURE__ */ (0,
|
|
1777
|
-
/* @__PURE__ */ (0,
|
|
1821
|
+
const classNames2 = (0, import_system44.useClassNames)({ component: "Calendar" });
|
|
1822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react_aria_components26.CalendarGrid, { className: classNames2.calendarGrid, children: [
|
|
1823
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CalendarGridHeader, {}),
|
|
1824
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_aria_components26.CalendarGridBody, { children: (date) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1778
1825
|
import_react_aria_components26.CalendarCell,
|
|
1779
1826
|
{
|
|
1780
1827
|
date,
|
|
1781
|
-
className: (0,
|
|
1828
|
+
className: (0, import_system44.cn)(
|
|
1782
1829
|
"flex h-[30px] w-[30px] cursor-pointer items-center justify-center rounded-full p-[5.3px] text-sm font-normal aria-disabled:cursor-default",
|
|
1783
1830
|
classNames2.calendarCell
|
|
1784
1831
|
)
|
|
@@ -1791,7 +1838,7 @@ var _CalendarGrid = () => {
|
|
|
1791
1838
|
var import_react26 = require("react");
|
|
1792
1839
|
var import_react_aria_components27 = require("react-aria-components");
|
|
1793
1840
|
var import_icons = require("@marigold/icons");
|
|
1794
|
-
var
|
|
1841
|
+
var import_system45 = require("@marigold/system");
|
|
1795
1842
|
|
|
1796
1843
|
// src/Calendar/useFormattedMonths.tsx
|
|
1797
1844
|
var import_i18n4 = require("@react-aria/i18n");
|
|
@@ -1810,7 +1857,7 @@ function useFormattedMonths(timeZone, focusedDate) {
|
|
|
1810
1857
|
}
|
|
1811
1858
|
|
|
1812
1859
|
// src/Calendar/CalendarListBox.tsx
|
|
1813
|
-
var
|
|
1860
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1814
1861
|
function CalendarListBox({
|
|
1815
1862
|
type,
|
|
1816
1863
|
isDisabled,
|
|
@@ -1819,17 +1866,17 @@ function CalendarListBox({
|
|
|
1819
1866
|
const state = (0, import_react26.useContext)(import_react_aria_components27.CalendarStateContext);
|
|
1820
1867
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
1821
1868
|
const buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
|
|
1822
|
-
const { select: selectClassNames } = (0,
|
|
1823
|
-
return /* @__PURE__ */ (0,
|
|
1869
|
+
const { select: selectClassNames } = (0, import_system45.useClassNames)({ component: "Select" });
|
|
1870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
1824
1871
|
"button",
|
|
1825
1872
|
{
|
|
1826
1873
|
disabled: isDisabled,
|
|
1827
1874
|
onClick: () => setSelectedDropdown(type),
|
|
1828
|
-
className: (0,
|
|
1875
|
+
className: (0, import_system45.cn)(buttonStyles, selectClassNames),
|
|
1829
1876
|
"data-testid": type,
|
|
1830
1877
|
children: [
|
|
1831
1878
|
type === "month" ? months[state.focusedDate.month - 1].substring(0, 3) : state.focusedDate.year,
|
|
1832
|
-
/* @__PURE__ */ (0,
|
|
1879
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons.ChevronDown, {})
|
|
1833
1880
|
]
|
|
1834
1881
|
}
|
|
1835
1882
|
);
|
|
@@ -1838,39 +1885,39 @@ function CalendarListBox({
|
|
|
1838
1885
|
// src/Calendar/MonthControls.tsx
|
|
1839
1886
|
var import_react_aria_components28 = require("react-aria-components");
|
|
1840
1887
|
var import_icons2 = require("@marigold/icons");
|
|
1841
|
-
var
|
|
1842
|
-
var
|
|
1888
|
+
var import_system46 = require("@marigold/system");
|
|
1889
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1843
1890
|
function MonthControls() {
|
|
1844
|
-
const classNames2 = (0,
|
|
1845
|
-
const buttonClassNames = (0,
|
|
1846
|
-
return /* @__PURE__ */ (0,
|
|
1891
|
+
const classNames2 = (0, import_system46.useClassNames)({ component: "Calendar" });
|
|
1892
|
+
const buttonClassNames = (0, import_system46.useClassNames)({ component: "Button" });
|
|
1893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
1847
1894
|
"div",
|
|
1848
1895
|
{
|
|
1849
|
-
className: (0,
|
|
1896
|
+
className: (0, import_system46.cn)(
|
|
1850
1897
|
"flex w-full flex-nowrap justify-end gap-[10px] [&_button:disabled]:cursor-not-allowed [&_button]:px-2 [&_button]:py-1",
|
|
1851
1898
|
classNames2.calendarControllers
|
|
1852
1899
|
),
|
|
1853
1900
|
children: [
|
|
1854
|
-
/* @__PURE__ */ (0,
|
|
1901
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
1855
1902
|
import_react_aria_components28.Button,
|
|
1856
1903
|
{
|
|
1857
|
-
className: (0,
|
|
1904
|
+
className: (0, import_system46.cn)(
|
|
1858
1905
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
1859
1906
|
buttonClassNames
|
|
1860
1907
|
),
|
|
1861
1908
|
slot: "previous",
|
|
1862
|
-
children: /* @__PURE__ */ (0,
|
|
1909
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons2.ChevronLeft, {})
|
|
1863
1910
|
}
|
|
1864
1911
|
),
|
|
1865
|
-
/* @__PURE__ */ (0,
|
|
1912
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
1866
1913
|
import_react_aria_components28.Button,
|
|
1867
1914
|
{
|
|
1868
|
-
className: (0,
|
|
1915
|
+
className: (0, import_system46.cn)(
|
|
1869
1916
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
1870
1917
|
buttonClassNames
|
|
1871
1918
|
),
|
|
1872
1919
|
slot: "next",
|
|
1873
|
-
children: /* @__PURE__ */ (0,
|
|
1920
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons2.ChevronRight, {})
|
|
1874
1921
|
}
|
|
1875
1922
|
)
|
|
1876
1923
|
]
|
|
@@ -1882,7 +1929,7 @@ var MonthControls_default = MonthControls;
|
|
|
1882
1929
|
// src/Calendar/MonthListBox.tsx
|
|
1883
1930
|
var import_react27 = require("react");
|
|
1884
1931
|
var import_react_aria_components29 = require("react-aria-components");
|
|
1885
|
-
var
|
|
1932
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1886
1933
|
var MonthListBox = ({ setSelectedDropdown }) => {
|
|
1887
1934
|
const state = (0, import_react27.useContext)(import_react_aria_components29.CalendarStateContext);
|
|
1888
1935
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
@@ -1891,13 +1938,13 @@ var MonthListBox = ({ setSelectedDropdown }) => {
|
|
|
1891
1938
|
let date = state.focusedDate.set({ month: value });
|
|
1892
1939
|
state.setFocusedDate(date);
|
|
1893
1940
|
};
|
|
1894
|
-
return /* @__PURE__ */ (0,
|
|
1941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1895
1942
|
"ul",
|
|
1896
1943
|
{
|
|
1897
1944
|
"data-testid": "monthOptions",
|
|
1898
1945
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
1899
1946
|
children: months.map((month, index) => {
|
|
1900
|
-
return /* @__PURE__ */ (0,
|
|
1947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("li", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1901
1948
|
_Button,
|
|
1902
1949
|
{
|
|
1903
1950
|
slot: "previous",
|
|
@@ -1921,7 +1968,7 @@ var MonthListBox_default = MonthListBox;
|
|
|
1921
1968
|
var import_react28 = require("react");
|
|
1922
1969
|
var import_react_aria_components30 = require("react-aria-components");
|
|
1923
1970
|
var import_i18n5 = require("@react-aria/i18n");
|
|
1924
|
-
var
|
|
1971
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1925
1972
|
var YearListBox = ({ setSelectedDropdown }) => {
|
|
1926
1973
|
const state = (0, import_react28.useContext)(import_react_aria_components30.CalendarStateContext);
|
|
1927
1974
|
const years = [];
|
|
@@ -1951,19 +1998,19 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
1951
1998
|
let date = years[index].value;
|
|
1952
1999
|
state.setFocusedDate(date);
|
|
1953
2000
|
};
|
|
1954
|
-
return /* @__PURE__ */ (0,
|
|
2001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1955
2002
|
"ul",
|
|
1956
2003
|
{
|
|
1957
2004
|
"data-testid": "yearOptions",
|
|
1958
2005
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
1959
2006
|
children: years.map((year, index) => {
|
|
1960
2007
|
const isActive = +year.formatted === state.focusedDate.year;
|
|
1961
|
-
return /* @__PURE__ */ (0,
|
|
2008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("li", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1962
2009
|
"div",
|
|
1963
2010
|
{
|
|
1964
2011
|
ref: isActive ? activeButtonRef : null,
|
|
1965
2012
|
style: { height: "100%", width: "100%" },
|
|
1966
|
-
children: /* @__PURE__ */ (0,
|
|
2013
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1967
2014
|
_Button,
|
|
1968
2015
|
{
|
|
1969
2016
|
slot: "previous",
|
|
@@ -1988,7 +2035,7 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
1988
2035
|
var YearListBox_default = YearListBox;
|
|
1989
2036
|
|
|
1990
2037
|
// src/Calendar/Calendar.tsx
|
|
1991
|
-
var
|
|
2038
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1992
2039
|
var _Calendar = ({
|
|
1993
2040
|
disabled,
|
|
1994
2041
|
readOnly,
|
|
@@ -2001,24 +2048,24 @@ var _Calendar = ({
|
|
|
2001
2048
|
isReadOnly: readOnly,
|
|
2002
2049
|
...rest
|
|
2003
2050
|
};
|
|
2004
|
-
const classNames2 = (0,
|
|
2051
|
+
const classNames2 = (0, import_system47.useClassNames)({ component: "Calendar" });
|
|
2005
2052
|
const [selectedDropdown, setSelectedDropdown] = (0, import_react29.useState)();
|
|
2006
2053
|
const ViewMap = {
|
|
2007
|
-
month: /* @__PURE__ */ (0,
|
|
2008
|
-
year: /* @__PURE__ */ (0,
|
|
2054
|
+
month: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(MonthListBox_default, { setSelectedDropdown }),
|
|
2055
|
+
year: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(YearListBox_default, { setSelectedDropdown })
|
|
2009
2056
|
};
|
|
2010
|
-
return /* @__PURE__ */ (0,
|
|
2057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2011
2058
|
import_react_aria_components31.Calendar,
|
|
2012
2059
|
{
|
|
2013
|
-
className: (0,
|
|
2060
|
+
className: (0, import_system47.cn)(
|
|
2014
2061
|
"flex min-h-[350px] w-[360px] flex-col rounded-sm p-4",
|
|
2015
2062
|
classNames2.calendar
|
|
2016
2063
|
),
|
|
2017
2064
|
...props,
|
|
2018
|
-
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */ (0,
|
|
2019
|
-
/* @__PURE__ */ (0,
|
|
2020
|
-
/* @__PURE__ */ (0,
|
|
2021
|
-
/* @__PURE__ */ (0,
|
|
2065
|
+
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
2066
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
2067
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex w-full gap-4", children: [
|
|
2068
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2022
2069
|
CalendarListBox,
|
|
2023
2070
|
{
|
|
2024
2071
|
type: "month",
|
|
@@ -2026,7 +2073,7 @@ var _Calendar = ({
|
|
|
2026
2073
|
setSelectedDropdown
|
|
2027
2074
|
}
|
|
2028
2075
|
),
|
|
2029
|
-
/* @__PURE__ */ (0,
|
|
2076
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2030
2077
|
CalendarListBox,
|
|
2031
2078
|
{
|
|
2032
2079
|
type: "year",
|
|
@@ -2035,9 +2082,9 @@ var _Calendar = ({
|
|
|
2035
2082
|
}
|
|
2036
2083
|
)
|
|
2037
2084
|
] }),
|
|
2038
|
-
/* @__PURE__ */ (0,
|
|
2085
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(MonthControls_default, {})
|
|
2039
2086
|
] }),
|
|
2040
|
-
/* @__PURE__ */ (0,
|
|
2087
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(_CalendarGrid, {})
|
|
2041
2088
|
] })
|
|
2042
2089
|
}
|
|
2043
2090
|
);
|
|
@@ -2046,10 +2093,11 @@ var _Calendar = ({
|
|
|
2046
2093
|
// src/DatePicker/DatePicker.tsx
|
|
2047
2094
|
var import_react30 = __toESM(require("react"));
|
|
2048
2095
|
var import_react_aria_components32 = require("react-aria-components");
|
|
2049
|
-
var
|
|
2050
|
-
var
|
|
2096
|
+
var import_system48 = require("@marigold/system");
|
|
2097
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2051
2098
|
var _DatePicker = import_react30.default.forwardRef(
|
|
2052
2099
|
({
|
|
2100
|
+
dateUnavailable,
|
|
2053
2101
|
disabled,
|
|
2054
2102
|
required,
|
|
2055
2103
|
readOnly,
|
|
@@ -2061,6 +2109,7 @@ var _DatePicker = import_react30.default.forwardRef(
|
|
|
2061
2109
|
...rest
|
|
2062
2110
|
}, ref) => {
|
|
2063
2111
|
const props = {
|
|
2112
|
+
isDateUnavailable: dateUnavailable,
|
|
2064
2113
|
isDisabled: disabled,
|
|
2065
2114
|
isReadOnly: readOnly,
|
|
2066
2115
|
isRequired: required,
|
|
@@ -2069,12 +2118,12 @@ var _DatePicker = import_react30.default.forwardRef(
|
|
|
2069
2118
|
granularity,
|
|
2070
2119
|
...rest
|
|
2071
2120
|
};
|
|
2072
|
-
const classNames2 = (0,
|
|
2121
|
+
const classNames2 = (0, import_system48.useClassNames)({
|
|
2073
2122
|
component: "DatePicker",
|
|
2074
2123
|
size,
|
|
2075
2124
|
variant
|
|
2076
2125
|
});
|
|
2077
|
-
return /* @__PURE__ */ (0,
|
|
2126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
2078
2127
|
FieldBase,
|
|
2079
2128
|
{
|
|
2080
2129
|
as: import_react_aria_components32.DatePicker,
|
|
@@ -2083,16 +2132,16 @@ var _DatePicker = import_react30.default.forwardRef(
|
|
|
2083
2132
|
...props,
|
|
2084
2133
|
ref,
|
|
2085
2134
|
children: [
|
|
2086
|
-
/* @__PURE__ */ (0,
|
|
2135
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2087
2136
|
_DateInput,
|
|
2088
2137
|
{
|
|
2089
|
-
action: /* @__PURE__ */ (0,
|
|
2138
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: classNames2.container, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2090
2139
|
_Button,
|
|
2091
2140
|
{
|
|
2092
2141
|
size: "small",
|
|
2093
2142
|
disabled,
|
|
2094
2143
|
className: classNames2.button,
|
|
2095
|
-
children: /* @__PURE__ */ (0,
|
|
2144
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2096
2145
|
"svg",
|
|
2097
2146
|
{
|
|
2098
2147
|
"data-testid": "action",
|
|
@@ -2100,14 +2149,14 @@ var _DatePicker = import_react30.default.forwardRef(
|
|
|
2100
2149
|
width: 24,
|
|
2101
2150
|
height: 24,
|
|
2102
2151
|
fill: "currentColor",
|
|
2103
|
-
children: /* @__PURE__ */ (0,
|
|
2152
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M20.0906 19.2V6.6C20.0906 5.61 19.2806 4.8 18.2906 4.8H17.3906V3H15.5906V4.8H8.39062V3H6.59062V4.8H5.69063C4.69163 4.8 3.89962 5.61 3.89962 6.6L3.89062 19.2C3.89062 20.19 4.69163 21 5.69063 21H18.2906C19.2806 21 20.0906 20.19 20.0906 19.2ZM9.29062 11.1001H7.49061V12.9001H9.29062V11.1001ZM5.69062 8.40009H18.2906V6.60008H5.69062V8.40009ZM18.2906 10.2V19.2H5.69062V10.2H18.2906ZM14.6906 12.9001H16.4906V11.1001H14.6906V12.9001ZM12.8906 12.9001H11.0906V11.1001H12.8906V12.9001Z" })
|
|
2104
2153
|
}
|
|
2105
2154
|
)
|
|
2106
2155
|
}
|
|
2107
2156
|
) })
|
|
2108
2157
|
}
|
|
2109
2158
|
),
|
|
2110
|
-
/* @__PURE__ */ (0,
|
|
2159
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(_Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(_Calendar, { disabled }) })
|
|
2111
2160
|
]
|
|
2112
2161
|
}
|
|
2113
2162
|
);
|
|
@@ -2115,15 +2164,15 @@ var _DatePicker = import_react30.default.forwardRef(
|
|
|
2115
2164
|
);
|
|
2116
2165
|
|
|
2117
2166
|
// src/Inset/Inset.tsx
|
|
2118
|
-
var
|
|
2119
|
-
var
|
|
2120
|
-
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ (0,
|
|
2167
|
+
var import_system49 = require("@marigold/system");
|
|
2168
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2169
|
+
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2121
2170
|
"div",
|
|
2122
2171
|
{
|
|
2123
|
-
className: (0,
|
|
2124
|
-
space &&
|
|
2125
|
-
!space && spaceX &&
|
|
2126
|
-
!space && spaceY &&
|
|
2172
|
+
className: (0, import_system49.cn)(
|
|
2173
|
+
space && import_system49.paddingSpace[space],
|
|
2174
|
+
!space && spaceX && import_system49.paddingSpaceX[spaceX],
|
|
2175
|
+
!space && spaceY && import_system49.paddingSpaceY[spaceY]
|
|
2127
2176
|
),
|
|
2128
2177
|
children
|
|
2129
2178
|
}
|
|
@@ -2132,21 +2181,21 @@ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ (0, import_
|
|
|
2132
2181
|
// src/Link/Link.tsx
|
|
2133
2182
|
var import_react31 = require("react");
|
|
2134
2183
|
var import_react_aria_components33 = require("react-aria-components");
|
|
2135
|
-
var
|
|
2136
|
-
var
|
|
2184
|
+
var import_system50 = require("@marigold/system");
|
|
2185
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2137
2186
|
var _Link = (0, import_react31.forwardRef)(
|
|
2138
2187
|
({ variant, size, disabled, children, ...props }, ref) => {
|
|
2139
|
-
const classNames2 = (0,
|
|
2188
|
+
const classNames2 = (0, import_system50.useClassNames)({
|
|
2140
2189
|
component: "Link",
|
|
2141
2190
|
variant,
|
|
2142
2191
|
size
|
|
2143
2192
|
});
|
|
2144
|
-
return /* @__PURE__ */ (0,
|
|
2193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_aria_components33.Link, { ...props, ref, className: classNames2, isDisabled: disabled, children });
|
|
2145
2194
|
}
|
|
2146
2195
|
);
|
|
2147
2196
|
|
|
2148
2197
|
// src/List/List.tsx
|
|
2149
|
-
var
|
|
2198
|
+
var import_system51 = require("@marigold/system");
|
|
2150
2199
|
|
|
2151
2200
|
// src/List/Context.ts
|
|
2152
2201
|
var import_react32 = require("react");
|
|
@@ -2154,14 +2203,14 @@ var ListContext = (0, import_react32.createContext)({});
|
|
|
2154
2203
|
var useListContext = () => (0, import_react32.useContext)(ListContext);
|
|
2155
2204
|
|
|
2156
2205
|
// src/List/ListItem.tsx
|
|
2157
|
-
var
|
|
2206
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2158
2207
|
var ListItem = ({ children, ...props }) => {
|
|
2159
2208
|
const { classNames: classNames2 } = useListContext();
|
|
2160
|
-
return /* @__PURE__ */ (0,
|
|
2209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("li", { ...props, className: classNames2, children });
|
|
2161
2210
|
};
|
|
2162
2211
|
|
|
2163
2212
|
// src/List/List.tsx
|
|
2164
|
-
var
|
|
2213
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2165
2214
|
var List = ({
|
|
2166
2215
|
as = "ul",
|
|
2167
2216
|
children,
|
|
@@ -2170,38 +2219,38 @@ var List = ({
|
|
|
2170
2219
|
...props
|
|
2171
2220
|
}) => {
|
|
2172
2221
|
const Component = as;
|
|
2173
|
-
const classNames2 = (0,
|
|
2174
|
-
return /* @__PURE__ */ (0,
|
|
2222
|
+
const classNames2 = (0, import_system51.useClassNames)({ component: "List", variant, size });
|
|
2223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Component, { ...props, className: classNames2[as], children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ListContext.Provider, { value: { classNames: classNames2.item }, children }) });
|
|
2175
2224
|
};
|
|
2176
2225
|
List.Item = ListItem;
|
|
2177
2226
|
|
|
2178
2227
|
// src/Menu/Menu.tsx
|
|
2179
2228
|
var import_react_aria_components36 = require("react-aria-components");
|
|
2180
|
-
var
|
|
2229
|
+
var import_system54 = require("@marigold/system");
|
|
2181
2230
|
|
|
2182
2231
|
// src/Menu/MenuItem.tsx
|
|
2183
2232
|
var import_react_aria_components34 = require("react-aria-components");
|
|
2184
|
-
var
|
|
2185
|
-
var
|
|
2233
|
+
var import_system52 = require("@marigold/system");
|
|
2234
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2186
2235
|
var _MenuItem = ({ children, ...props }) => {
|
|
2187
|
-
const classNames2 = (0,
|
|
2188
|
-
return /* @__PURE__ */ (0,
|
|
2236
|
+
const classNames2 = (0, import_system52.useClassNames)({ component: "Menu" });
|
|
2237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react_aria_components34.MenuItem, { ...props, className: classNames2.item, children });
|
|
2189
2238
|
};
|
|
2190
2239
|
|
|
2191
2240
|
// src/Menu/MenuSection.tsx
|
|
2192
2241
|
var import_react_aria_components35 = require("react-aria-components");
|
|
2193
|
-
var
|
|
2194
|
-
var
|
|
2242
|
+
var import_system53 = require("@marigold/system");
|
|
2243
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2195
2244
|
var _MenuSection = ({ children, title, ...props }) => {
|
|
2196
|
-
const className = (0,
|
|
2197
|
-
return /* @__PURE__ */ (0,
|
|
2198
|
-
/* @__PURE__ */ (0,
|
|
2245
|
+
const className = (0, import_system53.useClassNames)({ component: "Menu" });
|
|
2246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react_aria_components35.Section, { ...props, children: [
|
|
2247
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(_Header, { className: className.section, children: title }),
|
|
2199
2248
|
children
|
|
2200
2249
|
] });
|
|
2201
2250
|
};
|
|
2202
2251
|
|
|
2203
2252
|
// src/Menu/Menu.tsx
|
|
2204
|
-
var
|
|
2253
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2205
2254
|
var _Menu = ({
|
|
2206
2255
|
children,
|
|
2207
2256
|
label,
|
|
@@ -2210,12 +2259,13 @@ var _Menu = ({
|
|
|
2210
2259
|
disabled,
|
|
2211
2260
|
open,
|
|
2212
2261
|
placement,
|
|
2262
|
+
"aria-label": ariaLabel,
|
|
2213
2263
|
...props
|
|
2214
2264
|
}) => {
|
|
2215
|
-
const classNames2 = (0,
|
|
2216
|
-
return /* @__PURE__ */ (0,
|
|
2217
|
-
/* @__PURE__ */ (0,
|
|
2218
|
-
/* @__PURE__ */ (0,
|
|
2265
|
+
const classNames2 = (0, import_system54.useClassNames)({ component: "Menu", variant, size });
|
|
2266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react_aria_components36.MenuTrigger, { ...props, children: [
|
|
2267
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(_Button, { variant: "menu", disabled, "aria-label": ariaLabel, children: label }),
|
|
2268
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(_Popover, { open, placement, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react_aria_components36.Menu, { ...props, className: classNames2.container, children }) })
|
|
2219
2269
|
] });
|
|
2220
2270
|
};
|
|
2221
2271
|
_Menu.Item = _MenuItem;
|
|
@@ -2223,23 +2273,24 @@ _Menu.Section = _MenuSection;
|
|
|
2223
2273
|
|
|
2224
2274
|
// src/Menu/ActionMenu.tsx
|
|
2225
2275
|
var import_react_aria_components37 = require("react-aria-components");
|
|
2226
|
-
var
|
|
2227
|
-
var
|
|
2276
|
+
var import_system55 = require("@marigold/system");
|
|
2277
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2228
2278
|
var ActionMenu = ({
|
|
2229
2279
|
variant,
|
|
2230
2280
|
size,
|
|
2231
2281
|
disabled,
|
|
2232
2282
|
...props
|
|
2233
2283
|
}) => {
|
|
2234
|
-
const classNames2 = (0,
|
|
2235
|
-
return /* @__PURE__ */ (0,
|
|
2236
|
-
/* @__PURE__ */ (0,
|
|
2237
|
-
/* @__PURE__ */ (0,
|
|
2284
|
+
const classNames2 = (0, import_system55.useClassNames)({ component: "Menu", variant, size });
|
|
2285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_react_aria_components37.MenuTrigger, { children: [
|
|
2286
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(_Button, { variant: "menu", size: "small", disabled, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_system55.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("path", { d: "M12.0117 7.47656C13.2557 7.47656 14.2734 6.45879 14.2734 5.21484C14.2734 3.9709 13.2557 2.95312 12.0117 2.95312C10.7678 2.95312 9.75 3.9709 9.75 5.21484C9.75 6.45879 10.7678 7.47656 12.0117 7.47656ZM12.0117 9.73828C10.7678 9.73828 9.75 10.7561 9.75 12C9.75 13.2439 10.7678 14.2617 12.0117 14.2617C13.2557 14.2617 14.2734 13.2439 14.2734 12C14.2734 10.7561 13.2557 9.73828 12.0117 9.73828ZM12.0117 16.5234C10.7678 16.5234 9.75 17.5412 9.75 18.7852C9.75 20.0291 10.7678 21.0469 12.0117 21.0469C13.2557 21.0469 14.2734 20.0291 14.2734 18.7852C14.2734 17.5412 13.2557 16.5234 12.0117 16.5234Z" }) }) }),
|
|
2287
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(_Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react_aria_components37.Menu, { ...props, className: classNames2.container, children: props.children }) })
|
|
2238
2288
|
] });
|
|
2239
2289
|
};
|
|
2240
2290
|
|
|
2241
2291
|
// src/SectionMessage/SectionMessage.tsx
|
|
2242
|
-
var
|
|
2292
|
+
var import_react34 = require("react");
|
|
2293
|
+
var import_system58 = require("@marigold/system");
|
|
2243
2294
|
|
|
2244
2295
|
// src/SectionMessage/Context.tsx
|
|
2245
2296
|
var import_react33 = require("react");
|
|
@@ -2247,33 +2298,33 @@ var SectionMessageContext = (0, import_react33.createContext)({});
|
|
|
2247
2298
|
var useSectionMessageContext = () => (0, import_react33.useContext)(SectionMessageContext);
|
|
2248
2299
|
|
|
2249
2300
|
// src/SectionMessage/SectionMessageContent.tsx
|
|
2250
|
-
var
|
|
2251
|
-
var
|
|
2301
|
+
var import_system56 = require("@marigold/system");
|
|
2302
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2252
2303
|
var SectionMessageContent = ({
|
|
2253
2304
|
children
|
|
2254
2305
|
}) => {
|
|
2255
2306
|
const { classNames: classNames2 } = useSectionMessageContext();
|
|
2256
|
-
return /* @__PURE__ */ (0,
|
|
2307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: (0, import_system56.cn)("[grid-area:content]", classNames2.content), children });
|
|
2257
2308
|
};
|
|
2258
2309
|
|
|
2259
2310
|
// src/SectionMessage/SectionMessageTitle.tsx
|
|
2260
|
-
var
|
|
2261
|
-
var
|
|
2311
|
+
var import_system57 = require("@marigold/system");
|
|
2312
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2262
2313
|
var SectionMessageTitle = ({ children }) => {
|
|
2263
2314
|
const { classNames: classNames2 } = useSectionMessageContext();
|
|
2264
|
-
return /* @__PURE__ */ (0,
|
|
2315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: (0, import_system57.cn)("[grid-area:title]", classNames2.title), children });
|
|
2265
2316
|
};
|
|
2266
2317
|
|
|
2267
2318
|
// src/SectionMessage/SectionMessage.tsx
|
|
2268
|
-
var
|
|
2319
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2269
2320
|
var icons = {
|
|
2270
|
-
success: () => /* @__PURE__ */ (0,
|
|
2321
|
+
success: () => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2271
2322
|
"svg",
|
|
2272
2323
|
{
|
|
2273
2324
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2274
2325
|
viewBox: "0 0 24 24",
|
|
2275
2326
|
fill: "currentColor",
|
|
2276
|
-
children: /* @__PURE__ */ (0,
|
|
2327
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2277
2328
|
"path",
|
|
2278
2329
|
{
|
|
2279
2330
|
fillRule: "evenodd",
|
|
@@ -2283,13 +2334,13 @@ var icons = {
|
|
|
2283
2334
|
)
|
|
2284
2335
|
}
|
|
2285
2336
|
),
|
|
2286
|
-
info: () => /* @__PURE__ */ (0,
|
|
2337
|
+
info: () => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2287
2338
|
"svg",
|
|
2288
2339
|
{
|
|
2289
2340
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2290
2341
|
viewBox: "0 0 24 24",
|
|
2291
2342
|
fill: "currentColor",
|
|
2292
|
-
children: /* @__PURE__ */ (0,
|
|
2343
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2293
2344
|
"path",
|
|
2294
2345
|
{
|
|
2295
2346
|
fillRule: "evenodd",
|
|
@@ -2299,13 +2350,13 @@ var icons = {
|
|
|
2299
2350
|
)
|
|
2300
2351
|
}
|
|
2301
2352
|
),
|
|
2302
|
-
warning: () => /* @__PURE__ */ (0,
|
|
2353
|
+
warning: () => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2303
2354
|
"svg",
|
|
2304
2355
|
{
|
|
2305
2356
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2306
2357
|
viewBox: "0 0 24 24",
|
|
2307
2358
|
fill: "currentColor",
|
|
2308
|
-
children: /* @__PURE__ */ (0,
|
|
2359
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2309
2360
|
"path",
|
|
2310
2361
|
{
|
|
2311
2362
|
fillRule: "evenodd",
|
|
@@ -2315,13 +2366,13 @@ var icons = {
|
|
|
2315
2366
|
)
|
|
2316
2367
|
}
|
|
2317
2368
|
),
|
|
2318
|
-
error: () => /* @__PURE__ */ (0,
|
|
2369
|
+
error: () => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2319
2370
|
"svg",
|
|
2320
2371
|
{
|
|
2321
2372
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2322
2373
|
viewBox: "0 0 24 24",
|
|
2323
2374
|
fill: "currentColor",
|
|
2324
|
-
children: /* @__PURE__ */ (0,
|
|
2375
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2325
2376
|
"path",
|
|
2326
2377
|
{
|
|
2327
2378
|
fillRule: "evenodd",
|
|
@@ -2336,29 +2387,51 @@ var SectionMessage = ({
|
|
|
2336
2387
|
variant = "info",
|
|
2337
2388
|
size,
|
|
2338
2389
|
children,
|
|
2390
|
+
closeButton,
|
|
2339
2391
|
...props
|
|
2340
2392
|
}) => {
|
|
2341
|
-
const classNames2 = (0,
|
|
2393
|
+
const classNames2 = (0, import_system58.useClassNames)({
|
|
2342
2394
|
component: "SectionMessage",
|
|
2343
2395
|
variant,
|
|
2344
2396
|
size
|
|
2345
2397
|
});
|
|
2346
2398
|
const Icon4 = icons[variant];
|
|
2347
|
-
|
|
2399
|
+
const [isVisible, setIsVisible] = (0, import_react34.useState)(true);
|
|
2400
|
+
const handleClose = () => {
|
|
2401
|
+
setIsVisible(false);
|
|
2402
|
+
};
|
|
2403
|
+
if (!isVisible) return null;
|
|
2404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(SectionMessageContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
2348
2405
|
"div",
|
|
2349
2406
|
{
|
|
2350
2407
|
role: variant === "error" ? "alert" : void 0,
|
|
2351
2408
|
...props,
|
|
2352
|
-
className: (0,
|
|
2409
|
+
className: (0, import_system58.cn)("grid auto-rows-min", classNames2.container),
|
|
2353
2410
|
children: [
|
|
2354
|
-
/* @__PURE__ */ (0,
|
|
2411
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2355
2412
|
"div",
|
|
2356
2413
|
{
|
|
2357
|
-
className: (0,
|
|
2414
|
+
className: (0, import_system58.cn)(
|
|
2358
2415
|
"h-5 w-5 self-center [grid-area:icon]",
|
|
2359
2416
|
classNames2.icon
|
|
2360
2417
|
),
|
|
2361
|
-
children: /* @__PURE__ */ (0,
|
|
2418
|
+
children: Icon4 && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Icon4, {})
|
|
2419
|
+
}
|
|
2420
|
+
),
|
|
2421
|
+
closeButton && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2422
|
+
"button",
|
|
2423
|
+
{
|
|
2424
|
+
"aria-label": "close",
|
|
2425
|
+
className: "h-5 w-5 cursor-pointer border-none p-0 leading-normal outline-0 [grid-area:close]",
|
|
2426
|
+
onClick: handleClose,
|
|
2427
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("svg", { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2428
|
+
"path",
|
|
2429
|
+
{
|
|
2430
|
+
fillRule: "evenodd",
|
|
2431
|
+
clipRule: "evenodd",
|
|
2432
|
+
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"
|
|
2433
|
+
}
|
|
2434
|
+
) })
|
|
2362
2435
|
}
|
|
2363
2436
|
),
|
|
2364
2437
|
children
|
|
@@ -2370,17 +2443,17 @@ SectionMessage.Title = SectionMessageTitle;
|
|
|
2370
2443
|
SectionMessage.Content = SectionMessageContent;
|
|
2371
2444
|
|
|
2372
2445
|
// src/Multiselect/Multiselect.tsx
|
|
2373
|
-
var
|
|
2446
|
+
var import_react35 = require("react");
|
|
2374
2447
|
var import_data2 = require("@react-stately/data");
|
|
2375
2448
|
|
|
2376
2449
|
// src/TagGroup/Tag.tsx
|
|
2377
2450
|
var import_react_aria_components39 = require("react-aria-components");
|
|
2378
|
-
var
|
|
2451
|
+
var import_system60 = require("@marigold/system");
|
|
2379
2452
|
|
|
2380
2453
|
// src/TagGroup/TagGroup.tsx
|
|
2381
2454
|
var import_react_aria_components38 = require("react-aria-components");
|
|
2382
|
-
var
|
|
2383
|
-
var
|
|
2455
|
+
var import_system59 = require("@marigold/system");
|
|
2456
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2384
2457
|
var _TagGroup = ({
|
|
2385
2458
|
width,
|
|
2386
2459
|
items,
|
|
@@ -2390,8 +2463,8 @@ var _TagGroup = ({
|
|
|
2390
2463
|
size,
|
|
2391
2464
|
...rest
|
|
2392
2465
|
}) => {
|
|
2393
|
-
const classNames2 = (0,
|
|
2394
|
-
return /* @__PURE__ */ (0,
|
|
2466
|
+
const classNames2 = (0, import_system59.useClassNames)({ component: "Tag", variant, size });
|
|
2467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(FieldBase, { as: import_react_aria_components38.TagGroup, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
2395
2468
|
import_react_aria_components38.TagList,
|
|
2396
2469
|
{
|
|
2397
2470
|
items,
|
|
@@ -2403,25 +2476,25 @@ var _TagGroup = ({
|
|
|
2403
2476
|
};
|
|
2404
2477
|
|
|
2405
2478
|
// src/TagGroup/Tag.tsx
|
|
2406
|
-
var
|
|
2479
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2407
2480
|
var CloseButton2 = ({ className }) => {
|
|
2408
|
-
return /* @__PURE__ */ (0,
|
|
2481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react_aria_components39.Button, { slot: "remove", className, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("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" }) }) });
|
|
2409
2482
|
};
|
|
2410
2483
|
var _Tag = ({ variant, size, children, ...props }) => {
|
|
2411
2484
|
let textValue = typeof children === "string" ? children : void 0;
|
|
2412
|
-
const classNames2 = (0,
|
|
2413
|
-
return /* @__PURE__ */ (0,
|
|
2485
|
+
const classNames2 = (0, import_system60.useClassNames)({ component: "Tag", variant, size });
|
|
2486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
2414
2487
|
import_react_aria_components39.Tag,
|
|
2415
2488
|
{
|
|
2416
2489
|
textValue,
|
|
2417
2490
|
...props,
|
|
2418
|
-
className: (0,
|
|
2419
|
-
children: ({ allowsRemoving }) => /* @__PURE__ */ (0,
|
|
2491
|
+
className: (0, import_system60.cn)("data-[selection-mode]:cursor-pointer", classNames2.tag),
|
|
2492
|
+
children: ({ allowsRemoving }) => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
|
|
2420
2493
|
children,
|
|
2421
|
-
allowsRemoving && /* @__PURE__ */ (0,
|
|
2494
|
+
allowsRemoving && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
2422
2495
|
CloseButton2,
|
|
2423
2496
|
{
|
|
2424
|
-
className: (0,
|
|
2497
|
+
className: (0, import_system60.cn)("flex items-center", classNames2.closeButton)
|
|
2425
2498
|
}
|
|
2426
2499
|
)
|
|
2427
2500
|
] })
|
|
@@ -2431,14 +2504,14 @@ var _Tag = ({ variant, size, children, ...props }) => {
|
|
|
2431
2504
|
_Tag.Group = _TagGroup;
|
|
2432
2505
|
|
|
2433
2506
|
// src/Multiselect/Multiselect.tsx
|
|
2434
|
-
var
|
|
2507
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2435
2508
|
var Item2 = (_) => null;
|
|
2436
2509
|
var Multiselect = ({
|
|
2437
2510
|
label,
|
|
2438
2511
|
children,
|
|
2439
2512
|
...props
|
|
2440
2513
|
}) => {
|
|
2441
|
-
const items =
|
|
2514
|
+
const items = import_react35.Children.map(children, ({ props: props2 }) => props2);
|
|
2442
2515
|
const list = (0, import_data2.useListData)({
|
|
2443
2516
|
initialItems: items,
|
|
2444
2517
|
initialSelectedKeys: props.defaultSelectedKeys,
|
|
@@ -2457,7 +2530,7 @@ var Multiselect = ({
|
|
|
2457
2530
|
}
|
|
2458
2531
|
list.setSelectedKeys(next);
|
|
2459
2532
|
};
|
|
2460
|
-
const [value, setValue] = (0,
|
|
2533
|
+
const [value, setValue] = (0, import_react35.useState)("");
|
|
2461
2534
|
const selectItem = (key) => {
|
|
2462
2535
|
if (list.selectedKeys !== "all") {
|
|
2463
2536
|
const next = list.selectedKeys.add(key);
|
|
@@ -2469,18 +2542,18 @@ var Multiselect = ({
|
|
|
2469
2542
|
}, 0);
|
|
2470
2543
|
input.focus();
|
|
2471
2544
|
};
|
|
2472
|
-
return /* @__PURE__ */ (0,
|
|
2473
|
-
/* @__PURE__ */ (0,
|
|
2545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex flex-wrap gap-1", children: [
|
|
2546
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2474
2547
|
_Tag.Group,
|
|
2475
2548
|
{
|
|
2476
2549
|
items: selected,
|
|
2477
2550
|
allowsRemoving: true,
|
|
2478
2551
|
onRemove: setUnselected,
|
|
2479
2552
|
renderEmptyState: () => null,
|
|
2480
|
-
children: (item) => /* @__PURE__ */ (0,
|
|
2553
|
+
children: (item) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(_Tag, { id: item.id, children: item.children }, item.id)
|
|
2481
2554
|
}
|
|
2482
2555
|
),
|
|
2483
|
-
/* @__PURE__ */ (0,
|
|
2556
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2484
2557
|
_ComboBox,
|
|
2485
2558
|
{
|
|
2486
2559
|
value,
|
|
@@ -2490,7 +2563,7 @@ var Multiselect = ({
|
|
|
2490
2563
|
disabled: unselected.length === 0,
|
|
2491
2564
|
placeholder: unselected.length === 0 ? "All items selected" : "",
|
|
2492
2565
|
...props,
|
|
2493
|
-
children: unselected.map((item) => /* @__PURE__ */ (0,
|
|
2566
|
+
children: unselected.map((item) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(_ComboBox.Option, { id: item.id, children: item.children }, item.id))
|
|
2494
2567
|
}
|
|
2495
2568
|
)
|
|
2496
2569
|
] });
|
|
@@ -2498,15 +2571,15 @@ var Multiselect = ({
|
|
|
2498
2571
|
Multiselect.Item = Item2;
|
|
2499
2572
|
|
|
2500
2573
|
// src/NumberField/NumberField.tsx
|
|
2501
|
-
var
|
|
2574
|
+
var import_react36 = require("react");
|
|
2502
2575
|
var import_react_aria_components41 = require("react-aria-components");
|
|
2503
|
-
var
|
|
2576
|
+
var import_system62 = require("@marigold/system");
|
|
2504
2577
|
|
|
2505
2578
|
// src/NumberField/StepButton.tsx
|
|
2506
2579
|
var import_react_aria_components40 = require("react-aria-components");
|
|
2507
|
-
var
|
|
2508
|
-
var
|
|
2509
|
-
var Plus = () => /* @__PURE__ */ (0,
|
|
2580
|
+
var import_system61 = require("@marigold/system");
|
|
2581
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
2582
|
+
var Plus = () => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
2510
2583
|
"path",
|
|
2511
2584
|
{
|
|
2512
2585
|
fillRule: "evenodd",
|
|
@@ -2514,7 +2587,7 @@ var Plus = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("svg", { width: 1
|
|
|
2514
2587
|
d: "M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z"
|
|
2515
2588
|
}
|
|
2516
2589
|
) });
|
|
2517
|
-
var Minus = () => /* @__PURE__ */ (0,
|
|
2590
|
+
var Minus = () => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
2518
2591
|
"path",
|
|
2519
2592
|
{
|
|
2520
2593
|
fillRule: "evenodd",
|
|
@@ -2524,10 +2597,10 @@ var Minus = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("svg", { width:
|
|
|
2524
2597
|
) });
|
|
2525
2598
|
var _StepButton = ({ direction, className, ...props }) => {
|
|
2526
2599
|
const Icon4 = direction === "up" ? Plus : Minus;
|
|
2527
|
-
return /* @__PURE__ */ (0,
|
|
2600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
2528
2601
|
import_react_aria_components40.Button,
|
|
2529
2602
|
{
|
|
2530
|
-
className: (0,
|
|
2603
|
+
className: (0, import_system61.cn)(
|
|
2531
2604
|
[
|
|
2532
2605
|
"flex items-center justify-center",
|
|
2533
2606
|
"cursor-pointer data-[disabled]:cursor-not-allowed"
|
|
@@ -2535,14 +2608,14 @@ var _StepButton = ({ direction, className, ...props }) => {
|
|
|
2535
2608
|
className
|
|
2536
2609
|
),
|
|
2537
2610
|
...props,
|
|
2538
|
-
children: /* @__PURE__ */ (0,
|
|
2611
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Icon4, {})
|
|
2539
2612
|
}
|
|
2540
2613
|
);
|
|
2541
2614
|
};
|
|
2542
2615
|
|
|
2543
2616
|
// src/NumberField/NumberField.tsx
|
|
2544
|
-
var
|
|
2545
|
-
var _NumberField = (0,
|
|
2617
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
2618
|
+
var _NumberField = (0, import_react36.forwardRef)(
|
|
2546
2619
|
({
|
|
2547
2620
|
variant,
|
|
2548
2621
|
size,
|
|
@@ -2553,7 +2626,7 @@ var _NumberField = (0, import_react35.forwardRef)(
|
|
|
2553
2626
|
hideStepper,
|
|
2554
2627
|
...rest
|
|
2555
2628
|
}, ref) => {
|
|
2556
|
-
const classNames2 = (0,
|
|
2629
|
+
const classNames2 = (0, import_system62.useClassNames)({
|
|
2557
2630
|
component: "NumberField",
|
|
2558
2631
|
size,
|
|
2559
2632
|
variant
|
|
@@ -2566,8 +2639,8 @@ var _NumberField = (0, import_react35.forwardRef)(
|
|
|
2566
2639
|
...rest
|
|
2567
2640
|
};
|
|
2568
2641
|
const showStepper = !hideStepper;
|
|
2569
|
-
return /* @__PURE__ */ (0,
|
|
2570
|
-
showStepper && /* @__PURE__ */ (0,
|
|
2642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(FieldBase, { as: import_react_aria_components41.NumberField, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_react_aria_components41.Group, { className: (0, import_system62.cn)("flex items-stretch", classNames2.group), children: [
|
|
2643
|
+
showStepper && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
2571
2644
|
_StepButton,
|
|
2572
2645
|
{
|
|
2573
2646
|
className: classNames2.stepper,
|
|
@@ -2575,7 +2648,7 @@ var _NumberField = (0, import_react35.forwardRef)(
|
|
|
2575
2648
|
slot: "decrement"
|
|
2576
2649
|
}
|
|
2577
2650
|
),
|
|
2578
|
-
/* @__PURE__ */ (0,
|
|
2651
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
2579
2652
|
_Input,
|
|
2580
2653
|
{
|
|
2581
2654
|
ref,
|
|
@@ -2584,7 +2657,7 @@ var _NumberField = (0, import_react35.forwardRef)(
|
|
|
2584
2657
|
className: classNames2.input
|
|
2585
2658
|
}
|
|
2586
2659
|
) }),
|
|
2587
|
-
showStepper && /* @__PURE__ */ (0,
|
|
2660
|
+
showStepper && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
2588
2661
|
_StepButton,
|
|
2589
2662
|
{
|
|
2590
2663
|
className: classNames2.stepper,
|
|
@@ -2597,21 +2670,21 @@ var _NumberField = (0, import_react35.forwardRef)(
|
|
|
2597
2670
|
);
|
|
2598
2671
|
|
|
2599
2672
|
// src/Radio/Radio.tsx
|
|
2600
|
-
var
|
|
2673
|
+
var import_react38 = require("react");
|
|
2601
2674
|
var import_react_aria_components43 = require("react-aria-components");
|
|
2602
|
-
var
|
|
2675
|
+
var import_system64 = require("@marigold/system");
|
|
2603
2676
|
|
|
2604
2677
|
// src/Radio/Context.ts
|
|
2605
|
-
var
|
|
2606
|
-
var RadioGroupContext = (0,
|
|
2678
|
+
var import_react37 = require("react");
|
|
2679
|
+
var RadioGroupContext = (0, import_react37.createContext)(
|
|
2607
2680
|
null
|
|
2608
2681
|
);
|
|
2609
|
-
var useRadioGroupContext = () => (0,
|
|
2682
|
+
var useRadioGroupContext = () => (0, import_react37.useContext)(RadioGroupContext);
|
|
2610
2683
|
|
|
2611
2684
|
// src/Radio/RadioGroup.tsx
|
|
2612
2685
|
var import_react_aria_components42 = require("react-aria-components");
|
|
2613
|
-
var
|
|
2614
|
-
var
|
|
2686
|
+
var import_system63 = require("@marigold/system");
|
|
2687
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
2615
2688
|
var _RadioGroup = ({
|
|
2616
2689
|
variant,
|
|
2617
2690
|
size,
|
|
@@ -2627,7 +2700,7 @@ var _RadioGroup = ({
|
|
|
2627
2700
|
width,
|
|
2628
2701
|
...rest
|
|
2629
2702
|
}) => {
|
|
2630
|
-
const classNames2 = (0,
|
|
2703
|
+
const classNames2 = (0, import_system63.useClassNames)({ component: "Radio", variant, size });
|
|
2631
2704
|
const props = {
|
|
2632
2705
|
isDisabled: disabled,
|
|
2633
2706
|
isReadOnly: readOnly,
|
|
@@ -2635,7 +2708,7 @@ var _RadioGroup = ({
|
|
|
2635
2708
|
isInvalid: error,
|
|
2636
2709
|
...rest
|
|
2637
2710
|
};
|
|
2638
|
-
return /* @__PURE__ */ (0,
|
|
2711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
2639
2712
|
FieldBase,
|
|
2640
2713
|
{
|
|
2641
2714
|
as: import_react_aria_components42.RadioGroup,
|
|
@@ -2646,18 +2719,18 @@ var _RadioGroup = ({
|
|
|
2646
2719
|
variant,
|
|
2647
2720
|
size,
|
|
2648
2721
|
...props,
|
|
2649
|
-
children: /* @__PURE__ */ (0,
|
|
2722
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
2650
2723
|
"div",
|
|
2651
2724
|
{
|
|
2652
2725
|
role: "presentation",
|
|
2653
2726
|
"data-testid": "group",
|
|
2654
2727
|
"data-orientation": orientation,
|
|
2655
|
-
className: (0,
|
|
2728
|
+
className: (0, import_system63.cn)(
|
|
2656
2729
|
classNames2.group,
|
|
2657
2730
|
"flex items-start",
|
|
2658
2731
|
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
2659
2732
|
),
|
|
2660
|
-
children: /* @__PURE__ */ (0,
|
|
2733
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(RadioGroupContext.Provider, { value: { width, variant, size }, children })
|
|
2661
2734
|
}
|
|
2662
2735
|
)
|
|
2663
2736
|
}
|
|
@@ -2665,33 +2738,33 @@ var _RadioGroup = ({
|
|
|
2665
2738
|
};
|
|
2666
2739
|
|
|
2667
2740
|
// src/Radio/Radio.tsx
|
|
2668
|
-
var
|
|
2669
|
-
var Dot = () => /* @__PURE__ */ (0,
|
|
2670
|
-
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ (0,
|
|
2741
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
2742
|
+
var Dot = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
2743
|
+
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
2671
2744
|
"div",
|
|
2672
2745
|
{
|
|
2673
|
-
className: (0,
|
|
2746
|
+
className: (0, import_system64.cn)(
|
|
2674
2747
|
"bg-secondary-50 flex h-4 w-4 items-center justify-center rounded-[50%] border p-1",
|
|
2675
2748
|
className
|
|
2676
2749
|
),
|
|
2677
2750
|
"aria-hidden": "true",
|
|
2678
2751
|
...props,
|
|
2679
|
-
children: checked ? /* @__PURE__ */ (0,
|
|
2752
|
+
children: checked ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Dot, {}) : null
|
|
2680
2753
|
}
|
|
2681
2754
|
);
|
|
2682
|
-
var _Radio = (0,
|
|
2755
|
+
var _Radio = (0, import_react38.forwardRef)(
|
|
2683
2756
|
({ value, disabled, width, children, ...props }, ref) => {
|
|
2684
2757
|
const { variant, size, width: groupWidth } = useRadioGroupContext();
|
|
2685
|
-
const classNames2 = (0,
|
|
2758
|
+
const classNames2 = (0, import_system64.useClassNames)({
|
|
2686
2759
|
component: "Radio",
|
|
2687
2760
|
variant: variant || props.variant,
|
|
2688
2761
|
size: size || props.size
|
|
2689
2762
|
});
|
|
2690
|
-
return /* @__PURE__ */ (0,
|
|
2763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
2691
2764
|
import_react_aria_components43.Radio,
|
|
2692
2765
|
{
|
|
2693
2766
|
ref,
|
|
2694
|
-
className: (0,
|
|
2767
|
+
className: (0, import_system64.cn)(
|
|
2695
2768
|
"group/radio",
|
|
2696
2769
|
"relative flex items-center gap-[1ch]",
|
|
2697
2770
|
width || groupWidth || "w-full",
|
|
@@ -2700,18 +2773,18 @@ var _Radio = (0, import_react37.forwardRef)(
|
|
|
2700
2773
|
value,
|
|
2701
2774
|
isDisabled: disabled,
|
|
2702
2775
|
...props,
|
|
2703
|
-
children: ({ isSelected }) => /* @__PURE__ */ (0,
|
|
2704
|
-
/* @__PURE__ */ (0,
|
|
2776
|
+
children: ({ isSelected }) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
2777
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
2705
2778
|
Icon3,
|
|
2706
2779
|
{
|
|
2707
2780
|
checked: isSelected,
|
|
2708
|
-
className: (0,
|
|
2781
|
+
className: (0, import_system64.cn)(
|
|
2709
2782
|
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
2710
2783
|
classNames2.radio
|
|
2711
2784
|
)
|
|
2712
2785
|
}
|
|
2713
2786
|
),
|
|
2714
|
-
/* @__PURE__ */ (0,
|
|
2787
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: classNames2.label, children })
|
|
2715
2788
|
] })
|
|
2716
2789
|
}
|
|
2717
2790
|
);
|
|
@@ -2720,10 +2793,10 @@ var _Radio = (0, import_react37.forwardRef)(
|
|
|
2720
2793
|
_Radio.Group = _RadioGroup;
|
|
2721
2794
|
|
|
2722
2795
|
// src/SearchField/SearchField.tsx
|
|
2723
|
-
var
|
|
2796
|
+
var import_react39 = require("react");
|
|
2724
2797
|
var import_react_aria_components44 = require("react-aria-components");
|
|
2725
|
-
var
|
|
2726
|
-
var _SearchField = (0,
|
|
2798
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
2799
|
+
var _SearchField = (0, import_react39.forwardRef)(
|
|
2727
2800
|
({ disabled, required, readOnly, error, action, ...rest }, ref) => {
|
|
2728
2801
|
const props = {
|
|
2729
2802
|
...rest,
|
|
@@ -2732,7 +2805,7 @@ var _SearchField = (0, import_react38.forwardRef)(
|
|
|
2732
2805
|
isReadOnly: readOnly,
|
|
2733
2806
|
isInvalid: error
|
|
2734
2807
|
};
|
|
2735
|
-
return /* @__PURE__ */ (0,
|
|
2808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(FieldBase, { as: import_react_aria_components44.SearchField, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
2736
2809
|
SearchInput,
|
|
2737
2810
|
{
|
|
2738
2811
|
ref,
|
|
@@ -2743,11 +2816,11 @@ var _SearchField = (0, import_react38.forwardRef)(
|
|
|
2743
2816
|
);
|
|
2744
2817
|
|
|
2745
2818
|
// src/Select/Select.tsx
|
|
2746
|
-
var
|
|
2819
|
+
var import_react40 = require("react");
|
|
2747
2820
|
var import_react_aria_components45 = require("react-aria-components");
|
|
2748
|
-
var
|
|
2749
|
-
var
|
|
2750
|
-
var _Select = (0,
|
|
2821
|
+
var import_system65 = require("@marigold/system");
|
|
2822
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
2823
|
+
var _Select = (0, import_react40.forwardRef)(
|
|
2751
2824
|
({
|
|
2752
2825
|
disabled,
|
|
2753
2826
|
required,
|
|
@@ -2767,8 +2840,8 @@ var _Select = (0, import_react39.forwardRef)(
|
|
|
2767
2840
|
onSelectionChange: onChange,
|
|
2768
2841
|
...rest
|
|
2769
2842
|
};
|
|
2770
|
-
const classNames2 = (0,
|
|
2771
|
-
return /* @__PURE__ */ (0,
|
|
2843
|
+
const classNames2 = (0, import_system65.useClassNames)({ component: "Select", variant, size });
|
|
2844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
2772
2845
|
FieldBase,
|
|
2773
2846
|
{
|
|
2774
2847
|
isOpen: true,
|
|
@@ -2778,20 +2851,20 @@ var _Select = (0, import_react39.forwardRef)(
|
|
|
2778
2851
|
size,
|
|
2779
2852
|
...props,
|
|
2780
2853
|
children: [
|
|
2781
|
-
/* @__PURE__ */ (0,
|
|
2854
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
2782
2855
|
import_react_aria_components45.Button,
|
|
2783
2856
|
{
|
|
2784
|
-
className: (0,
|
|
2857
|
+
className: (0, import_system65.cn)(
|
|
2785
2858
|
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
2786
2859
|
classNames2.select
|
|
2787
2860
|
),
|
|
2788
2861
|
children: [
|
|
2789
|
-
/* @__PURE__ */ (0,
|
|
2790
|
-
/* @__PURE__ */ (0,
|
|
2862
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react_aria_components45.SelectValue, { className: "[&>[slot=description]]:hidden" }),
|
|
2863
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(ChevronDown, { className: (0, import_system65.cn)("size-4", classNames2.icon) })
|
|
2791
2864
|
]
|
|
2792
2865
|
}
|
|
2793
2866
|
),
|
|
2794
|
-
/* @__PURE__ */ (0,
|
|
2867
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(_Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(_ListBox, { items, children: props.children }) })
|
|
2795
2868
|
]
|
|
2796
2869
|
}
|
|
2797
2870
|
);
|
|
@@ -2801,38 +2874,38 @@ _Select.Option = _ListBox.Item;
|
|
|
2801
2874
|
_Select.Section = _ListBox.Section;
|
|
2802
2875
|
|
|
2803
2876
|
// src/SelectList/SelectList.tsx
|
|
2804
|
-
var
|
|
2877
|
+
var import_react43 = require("react");
|
|
2805
2878
|
var import_react_aria_components47 = require("react-aria-components");
|
|
2806
|
-
var
|
|
2879
|
+
var import_system67 = require("@marigold/system");
|
|
2807
2880
|
|
|
2808
2881
|
// src/SelectList/Context.ts
|
|
2809
|
-
var
|
|
2810
|
-
var SelectListContext = (0,
|
|
2882
|
+
var import_react41 = require("react");
|
|
2883
|
+
var SelectListContext = (0, import_react41.createContext)(
|
|
2811
2884
|
{}
|
|
2812
2885
|
);
|
|
2813
|
-
var useSelectListContext = () => (0,
|
|
2886
|
+
var useSelectListContext = () => (0, import_react41.useContext)(SelectListContext);
|
|
2814
2887
|
|
|
2815
2888
|
// src/SelectList/SelectListItem.tsx
|
|
2816
|
-
var
|
|
2889
|
+
var import_react42 = require("react");
|
|
2817
2890
|
var import_react_aria_components46 = require("react-aria-components");
|
|
2818
|
-
var
|
|
2819
|
-
var
|
|
2820
|
-
var _SelectListItem = (0,
|
|
2891
|
+
var import_system66 = require("@marigold/system");
|
|
2892
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
2893
|
+
var _SelectListItem = (0, import_react42.forwardRef)(
|
|
2821
2894
|
({ children, ...props }, ref) => {
|
|
2822
2895
|
let textValue = typeof children === "string" ? children : void 0;
|
|
2823
2896
|
const { classNames: classNames2 } = useSelectListContext();
|
|
2824
|
-
return /* @__PURE__ */ (0,
|
|
2897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
2825
2898
|
import_react_aria_components46.GridListItem,
|
|
2826
2899
|
{
|
|
2827
2900
|
textValue,
|
|
2828
2901
|
...props,
|
|
2829
|
-
className: (0,
|
|
2902
|
+
className: (0, import_system66.cn)(
|
|
2830
2903
|
"items-center group-data-[layout=grid]/list:flex-row",
|
|
2831
2904
|
classNames2 == null ? void 0 : classNames2.option
|
|
2832
2905
|
),
|
|
2833
2906
|
ref,
|
|
2834
|
-
children: ({ selectionMode }) => /* @__PURE__ */ (0,
|
|
2835
|
-
selectionMode === "multiple" && /* @__PURE__ */ (0,
|
|
2907
|
+
children: ({ selectionMode }) => /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
2908
|
+
selectionMode === "multiple" && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(_Checkbox, { slot: "selection" }),
|
|
2836
2909
|
children
|
|
2837
2910
|
] })
|
|
2838
2911
|
}
|
|
@@ -2841,21 +2914,21 @@ var _SelectListItem = (0, import_react41.forwardRef)(
|
|
|
2841
2914
|
);
|
|
2842
2915
|
|
|
2843
2916
|
// src/SelectList/SelectList.tsx
|
|
2844
|
-
var
|
|
2845
|
-
var _SelectList = (0,
|
|
2917
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
2918
|
+
var _SelectList = (0, import_react43.forwardRef)(
|
|
2846
2919
|
({ onChange, ...rest }, ref) => {
|
|
2847
|
-
const classNames2 = (0,
|
|
2920
|
+
const classNames2 = (0, import_system67.useClassNames)({ component: "ListBox" });
|
|
2848
2921
|
const props = {
|
|
2849
2922
|
onSelectionChange: onChange,
|
|
2850
2923
|
...rest
|
|
2851
2924
|
};
|
|
2852
|
-
return /* @__PURE__ */ (0,
|
|
2925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SelectListContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: classNames2.container, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
2853
2926
|
import_react_aria_components47.GridList,
|
|
2854
2927
|
{
|
|
2855
2928
|
...props,
|
|
2856
2929
|
layout: "grid",
|
|
2857
2930
|
ref,
|
|
2858
|
-
className: (0,
|
|
2931
|
+
className: (0, import_system67.cn)(
|
|
2859
2932
|
"group/list overflow-y-auto sm:max-h-[75vh] lg:max-h-[45vh]",
|
|
2860
2933
|
classNames2.list
|
|
2861
2934
|
),
|
|
@@ -2867,29 +2940,29 @@ var _SelectList = (0, import_react42.forwardRef)(
|
|
|
2867
2940
|
_SelectList.Item = _SelectListItem;
|
|
2868
2941
|
|
|
2869
2942
|
// src/Scrollable/Scrollable.tsx
|
|
2870
|
-
var
|
|
2871
|
-
var
|
|
2943
|
+
var import_system68 = require("@marigold/system");
|
|
2944
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
2872
2945
|
var Scrollable = ({
|
|
2873
2946
|
children,
|
|
2874
2947
|
width = "full",
|
|
2875
2948
|
height,
|
|
2876
2949
|
...props
|
|
2877
|
-
}) => /* @__PURE__ */ (0,
|
|
2950
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
2878
2951
|
"div",
|
|
2879
2952
|
{
|
|
2880
2953
|
...props,
|
|
2881
|
-
className: (0,
|
|
2882
|
-
style: (0,
|
|
2954
|
+
className: (0, import_system68.cn)(["sticky h-[--height] overflow-auto", import_system68.width[width]]),
|
|
2955
|
+
style: (0, import_system68.createVar)({ height }),
|
|
2883
2956
|
children
|
|
2884
2957
|
}
|
|
2885
2958
|
);
|
|
2886
2959
|
|
|
2887
2960
|
// src/Slider/Slider.tsx
|
|
2888
|
-
var
|
|
2961
|
+
var import_react44 = require("react");
|
|
2889
2962
|
var import_react_aria_components48 = require("react-aria-components");
|
|
2890
|
-
var
|
|
2891
|
-
var
|
|
2892
|
-
var _Slider = (0,
|
|
2963
|
+
var import_system69 = require("@marigold/system");
|
|
2964
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
2965
|
+
var _Slider = (0, import_react44.forwardRef)(
|
|
2893
2966
|
({
|
|
2894
2967
|
thumbLabels,
|
|
2895
2968
|
variant,
|
|
@@ -2898,7 +2971,7 @@ var _Slider = (0, import_react43.forwardRef)(
|
|
|
2898
2971
|
disabled,
|
|
2899
2972
|
...rest
|
|
2900
2973
|
}, ref) => {
|
|
2901
|
-
const classNames2 = (0,
|
|
2974
|
+
const classNames2 = (0, import_system69.useClassNames)({
|
|
2902
2975
|
component: "Slider",
|
|
2903
2976
|
variant,
|
|
2904
2977
|
size
|
|
@@ -2907,27 +2980,27 @@ var _Slider = (0, import_react43.forwardRef)(
|
|
|
2907
2980
|
isDisabled: disabled,
|
|
2908
2981
|
...rest
|
|
2909
2982
|
};
|
|
2910
|
-
return /* @__PURE__ */ (0,
|
|
2983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
2911
2984
|
import_react_aria_components48.Slider,
|
|
2912
2985
|
{
|
|
2913
|
-
className: (0,
|
|
2986
|
+
className: (0, import_system69.cn)(
|
|
2914
2987
|
"grid grid-cols-[auto_1fr] gap-y-1",
|
|
2915
2988
|
classNames2.container,
|
|
2916
|
-
|
|
2989
|
+
import_system69.width[width]
|
|
2917
2990
|
),
|
|
2918
2991
|
ref,
|
|
2919
2992
|
...props,
|
|
2920
2993
|
children: [
|
|
2921
|
-
/* @__PURE__ */ (0,
|
|
2922
|
-
/* @__PURE__ */ (0,
|
|
2923
|
-
/* @__PURE__ */ (0,
|
|
2994
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(_Label, { children: props.children }),
|
|
2995
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_aria_components48.SliderOutput, { className: (0, import_system69.cn)("flex justify-end", classNames2.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
|
|
2996
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
2924
2997
|
import_react_aria_components48.SliderTrack,
|
|
2925
2998
|
{
|
|
2926
|
-
className: (0,
|
|
2927
|
-
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */ (0,
|
|
2999
|
+
className: (0, import_system69.cn)("relative col-span-2 h-2 w-full", classNames2.track),
|
|
3000
|
+
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
2928
3001
|
import_react_aria_components48.SliderThumb,
|
|
2929
3002
|
{
|
|
2930
|
-
className: (0,
|
|
3003
|
+
className: (0, import_system69.cn)("top-1/2 cursor-pointer", classNames2.thumb),
|
|
2931
3004
|
index: i,
|
|
2932
3005
|
"aria-label": thumbLabels == null ? void 0 : thumbLabels[i]
|
|
2933
3006
|
},
|
|
@@ -2942,12 +3015,12 @@ var _Slider = (0, import_react43.forwardRef)(
|
|
|
2942
3015
|
);
|
|
2943
3016
|
|
|
2944
3017
|
// src/Split/Split.tsx
|
|
2945
|
-
var
|
|
2946
|
-
var Split = () => /* @__PURE__ */ (0,
|
|
3018
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3019
|
+
var Split = () => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { role: "separator", className: "grow" });
|
|
2947
3020
|
|
|
2948
3021
|
// src/Stack/Stack.tsx
|
|
2949
|
-
var
|
|
2950
|
-
var
|
|
3022
|
+
var import_system70 = require("@marigold/system");
|
|
3023
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
2951
3024
|
var Stack = ({
|
|
2952
3025
|
children,
|
|
2953
3026
|
space = 0,
|
|
@@ -2957,14 +3030,14 @@ var Stack = ({
|
|
|
2957
3030
|
...props
|
|
2958
3031
|
}) => {
|
|
2959
3032
|
var _a, _b, _c, _d;
|
|
2960
|
-
return /* @__PURE__ */ (0,
|
|
3033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
2961
3034
|
"div",
|
|
2962
3035
|
{
|
|
2963
|
-
className: (0,
|
|
3036
|
+
className: (0, import_system70.cn)(
|
|
2964
3037
|
"flex flex-col",
|
|
2965
|
-
|
|
2966
|
-
alignX && ((_b = (_a =
|
|
2967
|
-
alignY && ((_d = (_c =
|
|
3038
|
+
import_system70.gapSpace[space],
|
|
3039
|
+
alignX && ((_b = (_a = import_system70.alignment) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
|
|
3040
|
+
alignY && ((_d = (_c = import_system70.alignment) == null ? void 0 : _c.vertical) == null ? void 0 : _d.alignmentY[alignY]),
|
|
2968
3041
|
stretch && "h-full w-full"
|
|
2969
3042
|
),
|
|
2970
3043
|
...props,
|
|
@@ -2974,11 +3047,11 @@ var Stack = ({
|
|
|
2974
3047
|
};
|
|
2975
3048
|
|
|
2976
3049
|
// src/Switch/Switch.tsx
|
|
2977
|
-
var
|
|
3050
|
+
var import_react45 = require("react");
|
|
2978
3051
|
var import_react_aria_components49 = require("react-aria-components");
|
|
2979
|
-
var
|
|
2980
|
-
var
|
|
2981
|
-
var _Switch = (0,
|
|
3052
|
+
var import_system71 = require("@marigold/system");
|
|
3053
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
3054
|
+
var _Switch = (0, import_react45.forwardRef)(
|
|
2982
3055
|
({
|
|
2983
3056
|
variant,
|
|
2984
3057
|
size,
|
|
@@ -2989,37 +3062,37 @@ var _Switch = (0, import_react44.forwardRef)(
|
|
|
2989
3062
|
readOnly,
|
|
2990
3063
|
...rest
|
|
2991
3064
|
}, ref) => {
|
|
2992
|
-
const classNames2 = (0,
|
|
3065
|
+
const classNames2 = (0, import_system71.useClassNames)({ component: "Switch", size, variant });
|
|
2993
3066
|
const props = {
|
|
2994
3067
|
isDisabled: disabled,
|
|
2995
3068
|
isReadOnly: readOnly,
|
|
2996
3069
|
isSelected: selected,
|
|
2997
3070
|
...rest
|
|
2998
3071
|
};
|
|
2999
|
-
return /* @__PURE__ */ (0,
|
|
3072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
3000
3073
|
import_react_aria_components49.Switch,
|
|
3001
3074
|
{
|
|
3002
3075
|
...props,
|
|
3003
3076
|
ref,
|
|
3004
|
-
className: (0,
|
|
3005
|
-
|
|
3077
|
+
className: (0, import_system71.cn)(
|
|
3078
|
+
import_system71.width[width],
|
|
3006
3079
|
"group/switch",
|
|
3007
3080
|
"flex items-center gap-[1ch]",
|
|
3008
3081
|
classNames2.container
|
|
3009
3082
|
),
|
|
3010
3083
|
children: [
|
|
3011
|
-
/* @__PURE__ */ (0,
|
|
3012
|
-
/* @__PURE__ */ (0,
|
|
3084
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(_Label, { elementType: "span", children }),
|
|
3085
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
3013
3086
|
"div",
|
|
3014
3087
|
{
|
|
3015
|
-
className: (0,
|
|
3088
|
+
className: (0, import_system71.cn)(
|
|
3016
3089
|
"h-6 w-12 basis-12 rounded-3xl group-disabled/switch:cursor-not-allowed",
|
|
3017
3090
|
classNames2.track
|
|
3018
3091
|
),
|
|
3019
|
-
children: /* @__PURE__ */ (0,
|
|
3092
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
3020
3093
|
"div",
|
|
3021
3094
|
{
|
|
3022
|
-
className: (0,
|
|
3095
|
+
className: (0, import_system71.cn)(
|
|
3023
3096
|
"h-[22px] w-[22px]",
|
|
3024
3097
|
"cubic-bezier(.7,0,.3,1)",
|
|
3025
3098
|
"absolute left-0 top-px",
|
|
@@ -3038,24 +3111,24 @@ var _Switch = (0, import_react44.forwardRef)(
|
|
|
3038
3111
|
);
|
|
3039
3112
|
|
|
3040
3113
|
// src/Table/Table.tsx
|
|
3041
|
-
var
|
|
3114
|
+
var import_react53 = require("react");
|
|
3042
3115
|
var import_table9 = require("@react-aria/table");
|
|
3043
3116
|
var import_table10 = require("@react-stately/table");
|
|
3044
|
-
var
|
|
3117
|
+
var import_system77 = require("@marigold/system");
|
|
3045
3118
|
|
|
3046
3119
|
// src/Table/Context.tsx
|
|
3047
|
-
var
|
|
3048
|
-
var TableContext = (0,
|
|
3049
|
-
var useTableContext = () => (0,
|
|
3120
|
+
var import_react46 = require("react");
|
|
3121
|
+
var TableContext = (0, import_react46.createContext)({});
|
|
3122
|
+
var useTableContext = () => (0, import_react46.useContext)(TableContext);
|
|
3050
3123
|
|
|
3051
3124
|
// src/Table/TableBody.tsx
|
|
3052
3125
|
var import_table = require("@react-aria/table");
|
|
3053
|
-
var
|
|
3126
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
3054
3127
|
var TableBody = ({ children, emptyState }) => {
|
|
3055
3128
|
const { rowGroupProps } = (0, import_table.useTableRowGroup)();
|
|
3056
3129
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3057
3130
|
if (state.collection.size === 0 && emptyState) {
|
|
3058
|
-
return /* @__PURE__ */ (0,
|
|
3131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("tbody", { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("tr", { className: classNames2 == null ? void 0 : classNames2.row, role: "row", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
3059
3132
|
"td",
|
|
3060
3133
|
{
|
|
3061
3134
|
className: classNames2 == null ? void 0 : classNames2.cell,
|
|
@@ -3065,18 +3138,18 @@ var TableBody = ({ children, emptyState }) => {
|
|
|
3065
3138
|
}
|
|
3066
3139
|
) }) });
|
|
3067
3140
|
}
|
|
3068
|
-
return /* @__PURE__ */ (0,
|
|
3141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("tbody", { ...rowGroupProps, children });
|
|
3069
3142
|
};
|
|
3070
3143
|
|
|
3071
3144
|
// src/Table/TableCell.tsx
|
|
3072
|
-
var
|
|
3145
|
+
var import_react47 = require("react");
|
|
3073
3146
|
var import_focus2 = require("@react-aria/focus");
|
|
3074
3147
|
var import_table2 = require("@react-aria/table");
|
|
3075
3148
|
var import_utils3 = require("@react-aria/utils");
|
|
3076
|
-
var
|
|
3077
|
-
var
|
|
3149
|
+
var import_system72 = require("@marigold/system");
|
|
3150
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
3078
3151
|
var TableCell = ({ cell, align = "left" }) => {
|
|
3079
|
-
const ref = (0,
|
|
3152
|
+
const ref = (0, import_react47.useRef)(null);
|
|
3080
3153
|
const { interactive, state, classNames: classNames2 } = useTableContext();
|
|
3081
3154
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
3082
3155
|
const { gridCellProps } = (0, import_table2.useTableCell)(
|
|
@@ -3096,12 +3169,12 @@ var TableCell = ({ cell, align = "left" }) => {
|
|
|
3096
3169
|
onPointerDown: (e) => e.stopPropagation()
|
|
3097
3170
|
};
|
|
3098
3171
|
const { focusProps, isFocusVisible } = (0, import_focus2.useFocusRing)();
|
|
3099
|
-
const stateProps = (0,
|
|
3100
|
-
return /* @__PURE__ */ (0,
|
|
3172
|
+
const stateProps = (0, import_system72.useStateProps)({ disabled, focusVisible: isFocusVisible });
|
|
3173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
3101
3174
|
"td",
|
|
3102
3175
|
{
|
|
3103
3176
|
ref,
|
|
3104
|
-
className: (0,
|
|
3177
|
+
className: (0, import_system72.cn)(classNames2 == null ? void 0 : classNames2.cell),
|
|
3105
3178
|
...(0, import_utils3.mergeProps)(cellProps, focusProps),
|
|
3106
3179
|
...stateProps,
|
|
3107
3180
|
align,
|
|
@@ -3111,11 +3184,11 @@ var TableCell = ({ cell, align = "left" }) => {
|
|
|
3111
3184
|
};
|
|
3112
3185
|
|
|
3113
3186
|
// src/Table/TableCheckboxCell.tsx
|
|
3114
|
-
var
|
|
3187
|
+
var import_react48 = require("react");
|
|
3115
3188
|
var import_focus3 = require("@react-aria/focus");
|
|
3116
3189
|
var import_table3 = require("@react-aria/table");
|
|
3117
3190
|
var import_utils4 = require("@react-aria/utils");
|
|
3118
|
-
var
|
|
3191
|
+
var import_system73 = require("@marigold/system");
|
|
3119
3192
|
|
|
3120
3193
|
// src/Table/utils.ts
|
|
3121
3194
|
var mapCheckboxProps = ({
|
|
@@ -3138,9 +3211,9 @@ var mapCheckboxProps = ({
|
|
|
3138
3211
|
};
|
|
3139
3212
|
|
|
3140
3213
|
// src/Table/TableCheckboxCell.tsx
|
|
3141
|
-
var
|
|
3214
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
3142
3215
|
var TableCheckboxCell = ({ cell }) => {
|
|
3143
|
-
const ref = (0,
|
|
3216
|
+
const ref = (0, import_react48.useRef)(null);
|
|
3144
3217
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3145
3218
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
3146
3219
|
const { gridCellProps } = (0, import_table3.useTableCell)(
|
|
@@ -3154,35 +3227,35 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
3154
3227
|
(0, import_table3.useTableSelectionCheckbox)({ key: cell.parentKey }, state)
|
|
3155
3228
|
);
|
|
3156
3229
|
const { focusProps, isFocusVisible } = (0, import_focus3.useFocusRing)();
|
|
3157
|
-
const stateProps = (0,
|
|
3158
|
-
return /* @__PURE__ */ (0,
|
|
3230
|
+
const stateProps = (0, import_system73.useStateProps)({ disabled, focusVisible: isFocusVisible });
|
|
3231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
3159
3232
|
"td",
|
|
3160
3233
|
{
|
|
3161
3234
|
ref,
|
|
3162
|
-
className: (0,
|
|
3235
|
+
className: (0, import_system73.cn)("text-center align-middle leading-none", classNames2 == null ? void 0 : classNames2.cell),
|
|
3163
3236
|
...(0, import_utils4.mergeProps)(gridCellProps, focusProps),
|
|
3164
3237
|
...stateProps,
|
|
3165
|
-
children: /* @__PURE__ */ (0,
|
|
3238
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(_Checkbox, { ...checkboxProps })
|
|
3166
3239
|
}
|
|
3167
3240
|
);
|
|
3168
3241
|
};
|
|
3169
3242
|
|
|
3170
3243
|
// src/Table/TableColumnHeader.tsx
|
|
3171
|
-
var
|
|
3244
|
+
var import_react49 = require("react");
|
|
3172
3245
|
var import_focus4 = require("@react-aria/focus");
|
|
3173
3246
|
var import_interactions = require("@react-aria/interactions");
|
|
3174
3247
|
var import_table4 = require("@react-aria/table");
|
|
3175
3248
|
var import_utils6 = require("@react-aria/utils");
|
|
3176
3249
|
var import_icons3 = require("@marigold/icons");
|
|
3177
|
-
var
|
|
3178
|
-
var
|
|
3250
|
+
var import_system74 = require("@marigold/system");
|
|
3251
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
3179
3252
|
var TableColumnHeader = ({
|
|
3180
3253
|
column,
|
|
3181
3254
|
width = "auto",
|
|
3182
3255
|
align = "left"
|
|
3183
3256
|
}) => {
|
|
3184
3257
|
var _a, _b;
|
|
3185
|
-
const ref = (0,
|
|
3258
|
+
const ref = (0, import_react49.useRef)(null);
|
|
3186
3259
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3187
3260
|
const { columnHeaderProps } = (0, import_table4.useTableColumnHeader)(
|
|
3188
3261
|
{
|
|
@@ -3193,22 +3266,22 @@ var TableColumnHeader = ({
|
|
|
3193
3266
|
);
|
|
3194
3267
|
const { hoverProps, isHovered } = (0, import_interactions.useHover)({});
|
|
3195
3268
|
const { focusProps, isFocusVisible } = (0, import_focus4.useFocusRing)();
|
|
3196
|
-
const stateProps = (0,
|
|
3269
|
+
const stateProps = (0, import_system74.useStateProps)({
|
|
3197
3270
|
hover: isHovered,
|
|
3198
3271
|
focusVisible: isFocusVisible
|
|
3199
3272
|
});
|
|
3200
|
-
return /* @__PURE__ */ (0,
|
|
3273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
3201
3274
|
"th",
|
|
3202
3275
|
{
|
|
3203
3276
|
colSpan: column.colspan,
|
|
3204
3277
|
ref,
|
|
3205
|
-
className: (0,
|
|
3278
|
+
className: (0, import_system74.cn)("cursor-default", import_system74.width[width], classNames2 == null ? void 0 : classNames2.header),
|
|
3206
3279
|
...(0, import_utils6.mergeProps)(columnHeaderProps, hoverProps, focusProps),
|
|
3207
3280
|
...stateProps,
|
|
3208
3281
|
align,
|
|
3209
3282
|
children: [
|
|
3210
3283
|
column.rendered,
|
|
3211
|
-
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ (0,
|
|
3284
|
+
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_icons3.SortUp, { className: "inline-block" }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_icons3.SortDown, { className: "inline-block" }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "invisible", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_icons3.SortDown, { className: "inline-block" }) }))
|
|
3212
3285
|
]
|
|
3213
3286
|
}
|
|
3214
3287
|
);
|
|
@@ -3216,10 +3289,10 @@ var TableColumnHeader = ({
|
|
|
3216
3289
|
|
|
3217
3290
|
// src/Table/TableHeader.tsx
|
|
3218
3291
|
var import_table5 = require("@react-aria/table");
|
|
3219
|
-
var
|
|
3292
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
3220
3293
|
var TableHeader = ({ stickyHeader, children }) => {
|
|
3221
3294
|
const { rowGroupProps } = (0, import_table5.useTableRowGroup)();
|
|
3222
|
-
return /* @__PURE__ */ (0,
|
|
3295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
3223
3296
|
"thead",
|
|
3224
3297
|
{
|
|
3225
3298
|
...rowGroupProps,
|
|
@@ -3230,29 +3303,29 @@ var TableHeader = ({ stickyHeader, children }) => {
|
|
|
3230
3303
|
};
|
|
3231
3304
|
|
|
3232
3305
|
// src/Table/TableHeaderRow.tsx
|
|
3233
|
-
var
|
|
3306
|
+
var import_react50 = require("react");
|
|
3234
3307
|
var import_table6 = require("@react-aria/table");
|
|
3235
|
-
var
|
|
3308
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
3236
3309
|
var TableHeaderRow = ({ item, children }) => {
|
|
3237
3310
|
const { state } = useTableContext();
|
|
3238
|
-
const ref = (0,
|
|
3311
|
+
const ref = (0, import_react50.useRef)(null);
|
|
3239
3312
|
const { rowProps } = (0, import_table6.useTableHeaderRow)({ node: item }, state, ref);
|
|
3240
|
-
return /* @__PURE__ */ (0,
|
|
3313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("tr", { ...rowProps, ref, children });
|
|
3241
3314
|
};
|
|
3242
3315
|
|
|
3243
3316
|
// src/Table/TableRow.tsx
|
|
3244
|
-
var
|
|
3317
|
+
var import_react51 = require("react");
|
|
3245
3318
|
var import_focus5 = require("@react-aria/focus");
|
|
3246
3319
|
var import_interactions2 = require("@react-aria/interactions");
|
|
3247
3320
|
var import_table7 = require("@react-aria/table");
|
|
3248
3321
|
var import_utils7 = require("@react-aria/utils");
|
|
3249
|
-
var
|
|
3250
|
-
var
|
|
3322
|
+
var import_system75 = require("@marigold/system");
|
|
3323
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
3251
3324
|
var TableRow = ({ children, row }) => {
|
|
3252
|
-
const ref = (0,
|
|
3325
|
+
const ref = (0, import_react51.useRef)(null);
|
|
3253
3326
|
const { interactive, state, ...ctx } = useTableContext();
|
|
3254
3327
|
const { variant, size } = row.props;
|
|
3255
|
-
const classNames2 = (0,
|
|
3328
|
+
const classNames2 = (0, import_system75.useClassNames)({
|
|
3256
3329
|
component: "Table",
|
|
3257
3330
|
variant: variant || ctx.variant,
|
|
3258
3331
|
size: size || ctx.size
|
|
@@ -3266,22 +3339,22 @@ var TableRow = ({ children, row }) => {
|
|
|
3266
3339
|
);
|
|
3267
3340
|
const disabled = state.disabledKeys.has(row.key);
|
|
3268
3341
|
const selected = state.selectionManager.isSelected(row.key);
|
|
3269
|
-
const { focusProps, isFocusVisible } = (0, import_focus5.useFocusRing)(
|
|
3342
|
+
const { focusProps, isFocusVisible } = (0, import_focus5.useFocusRing)();
|
|
3270
3343
|
const { hoverProps, isHovered } = (0, import_interactions2.useHover)({
|
|
3271
3344
|
isDisabled: disabled || !interactive
|
|
3272
3345
|
});
|
|
3273
|
-
const stateProps = (0,
|
|
3346
|
+
const stateProps = (0, import_system75.useStateProps)({
|
|
3274
3347
|
disabled,
|
|
3275
3348
|
selected,
|
|
3276
3349
|
hover: isHovered,
|
|
3277
3350
|
focusVisible: isFocusVisible,
|
|
3278
3351
|
active: isPressed
|
|
3279
3352
|
});
|
|
3280
|
-
return /* @__PURE__ */ (0,
|
|
3353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
3281
3354
|
"tr",
|
|
3282
3355
|
{
|
|
3283
3356
|
ref,
|
|
3284
|
-
className: (0,
|
|
3357
|
+
className: (0, import_system75.cn)(
|
|
3285
3358
|
[
|
|
3286
3359
|
!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
|
|
3287
3360
|
],
|
|
@@ -3295,19 +3368,19 @@ var TableRow = ({ children, row }) => {
|
|
|
3295
3368
|
};
|
|
3296
3369
|
|
|
3297
3370
|
// src/Table/TableSelectAllCell.tsx
|
|
3298
|
-
var
|
|
3371
|
+
var import_react52 = require("react");
|
|
3299
3372
|
var import_focus6 = require("@react-aria/focus");
|
|
3300
3373
|
var import_interactions3 = require("@react-aria/interactions");
|
|
3301
3374
|
var import_table8 = require("@react-aria/table");
|
|
3302
3375
|
var import_utils8 = require("@react-aria/utils");
|
|
3303
|
-
var
|
|
3304
|
-
var
|
|
3376
|
+
var import_system76 = require("@marigold/system");
|
|
3377
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
3305
3378
|
var TableSelectAllCell = ({
|
|
3306
3379
|
column,
|
|
3307
3380
|
width = "auto",
|
|
3308
3381
|
align = "left"
|
|
3309
3382
|
}) => {
|
|
3310
|
-
const ref = (0,
|
|
3383
|
+
const ref = (0, import_react52.useRef)(null);
|
|
3311
3384
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3312
3385
|
const { columnHeaderProps } = (0, import_table8.useTableColumnHeader)(
|
|
3313
3386
|
{
|
|
@@ -3319,25 +3392,25 @@ var TableSelectAllCell = ({
|
|
|
3319
3392
|
const { checkboxProps } = mapCheckboxProps((0, import_table8.useTableSelectAllCheckbox)(state));
|
|
3320
3393
|
const { hoverProps, isHovered } = (0, import_interactions3.useHover)({});
|
|
3321
3394
|
const { focusProps, isFocusVisible } = (0, import_focus6.useFocusRing)();
|
|
3322
|
-
const stateProps = (0,
|
|
3395
|
+
const stateProps = (0, import_system76.useStateProps)({
|
|
3323
3396
|
hover: isHovered,
|
|
3324
3397
|
focusVisible: isFocusVisible
|
|
3325
3398
|
});
|
|
3326
|
-
return /* @__PURE__ */ (0,
|
|
3399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
3327
3400
|
"th",
|
|
3328
3401
|
{
|
|
3329
3402
|
ref,
|
|
3330
|
-
className: (0,
|
|
3403
|
+
className: (0, import_system76.cn)(import_system76.width[width], ["leading-none"], classNames2 == null ? void 0 : classNames2.header),
|
|
3331
3404
|
...(0, import_utils8.mergeProps)(columnHeaderProps, hoverProps, focusProps),
|
|
3332
3405
|
...stateProps,
|
|
3333
3406
|
align,
|
|
3334
|
-
children: /* @__PURE__ */ (0,
|
|
3407
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(_Checkbox, { ...checkboxProps })
|
|
3335
3408
|
}
|
|
3336
3409
|
);
|
|
3337
3410
|
};
|
|
3338
3411
|
|
|
3339
3412
|
// src/Table/Table.tsx
|
|
3340
|
-
var
|
|
3413
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
3341
3414
|
var Table = ({
|
|
3342
3415
|
variant,
|
|
3343
3416
|
size,
|
|
@@ -3349,7 +3422,7 @@ var Table = ({
|
|
|
3349
3422
|
...props
|
|
3350
3423
|
}) => {
|
|
3351
3424
|
const interactive = selectionMode !== "none";
|
|
3352
|
-
const tableRef = (0,
|
|
3425
|
+
const tableRef = (0, import_react53.useRef)(null);
|
|
3353
3426
|
const state = (0, import_table10.useTableState)({
|
|
3354
3427
|
...props,
|
|
3355
3428
|
selectionMode,
|
|
@@ -3360,21 +3433,21 @@ var Table = ({
|
|
|
3360
3433
|
state.isKeyboardNavigationDisabled = disableKeyboardNavigation;
|
|
3361
3434
|
}
|
|
3362
3435
|
const { gridProps } = (0, import_table9.useTable)(props, state, tableRef);
|
|
3363
|
-
const classNames2 = (0,
|
|
3436
|
+
const classNames2 = (0, import_system77.useClassNames)({
|
|
3364
3437
|
component: "Table",
|
|
3365
3438
|
variant,
|
|
3366
3439
|
size
|
|
3367
3440
|
});
|
|
3368
3441
|
const { collection } = state;
|
|
3369
|
-
return /* @__PURE__ */ (0,
|
|
3442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
3370
3443
|
TableContext.Provider,
|
|
3371
3444
|
{
|
|
3372
3445
|
value: { state, interactive, classNames: classNames2, variant, size },
|
|
3373
|
-
children: /* @__PURE__ */ (0,
|
|
3446
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
3374
3447
|
"table",
|
|
3375
3448
|
{
|
|
3376
3449
|
ref: tableRef,
|
|
3377
|
-
className: (0,
|
|
3450
|
+
className: (0, import_system77.cn)(
|
|
3378
3451
|
"group/table",
|
|
3379
3452
|
"border-collapse",
|
|
3380
3453
|
stretch ? "table w-full" : "block",
|
|
@@ -3382,10 +3455,10 @@ var Table = ({
|
|
|
3382
3455
|
),
|
|
3383
3456
|
...gridProps,
|
|
3384
3457
|
children: [
|
|
3385
|
-
/* @__PURE__ */ (0,
|
|
3458
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
|
|
3386
3459
|
(column) => {
|
|
3387
3460
|
var _a, _b, _c, _d, _e;
|
|
3388
|
-
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ (0,
|
|
3461
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
3389
3462
|
TableSelectAllCell,
|
|
3390
3463
|
{
|
|
3391
3464
|
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
@@ -3393,7 +3466,7 @@ var Table = ({
|
|
|
3393
3466
|
align: (_c = column.props) == null ? void 0 : _c.align
|
|
3394
3467
|
},
|
|
3395
3468
|
column.key
|
|
3396
|
-
) : /* @__PURE__ */ (0,
|
|
3469
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
3397
3470
|
TableColumnHeader,
|
|
3398
3471
|
{
|
|
3399
3472
|
width: (_d = column.props) == null ? void 0 : _d.width,
|
|
@@ -3404,12 +3477,12 @@ var Table = ({
|
|
|
3404
3477
|
);
|
|
3405
3478
|
}
|
|
3406
3479
|
) }, headerRow.key)) }),
|
|
3407
|
-
/* @__PURE__ */ (0,
|
|
3480
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(TableBody, { emptyState, children: [
|
|
3408
3481
|
...collection.rows.map(
|
|
3409
|
-
(row) => row.type === "item" && /* @__PURE__ */ (0,
|
|
3482
|
+
(row) => row.type === "item" && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(TableRow, { row, children: [...collection.getChildren(row.key)].map((cell, index) => {
|
|
3410
3483
|
var _a, _b;
|
|
3411
3484
|
const currentColumn = collection.columns[index];
|
|
3412
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ (0,
|
|
3485
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
3413
3486
|
TableCell,
|
|
3414
3487
|
{
|
|
3415
3488
|
align: (_b = currentColumn.props) == null ? void 0 : _b.align,
|
|
@@ -3434,8 +3507,8 @@ Table.Row = import_table10.Row;
|
|
|
3434
3507
|
|
|
3435
3508
|
// src/Text/Text.tsx
|
|
3436
3509
|
var import_react_aria_components50 = require("react-aria-components");
|
|
3437
|
-
var
|
|
3438
|
-
var
|
|
3510
|
+
var import_system78 = require("@marigold/system");
|
|
3511
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
3439
3512
|
var _Text = ({
|
|
3440
3513
|
variant,
|
|
3441
3514
|
size,
|
|
@@ -3449,28 +3522,29 @@ var _Text = ({
|
|
|
3449
3522
|
as = "div",
|
|
3450
3523
|
...props
|
|
3451
3524
|
}) => {
|
|
3452
|
-
const theme = (0,
|
|
3453
|
-
const classNames2 = (0,
|
|
3525
|
+
const theme = (0, import_system78.useTheme)();
|
|
3526
|
+
const classNames2 = (0, import_system78.useClassNames)({
|
|
3454
3527
|
component: "Text",
|
|
3455
3528
|
variant,
|
|
3456
3529
|
size
|
|
3457
3530
|
});
|
|
3458
|
-
|
|
3459
|
-
|
|
3531
|
+
const Component = props.slot ? import_react_aria_components50.Text : as;
|
|
3532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
3533
|
+
Component,
|
|
3460
3534
|
{
|
|
3461
3535
|
...props,
|
|
3462
3536
|
elementType: as,
|
|
3463
|
-
className: (0,
|
|
3537
|
+
className: (0, import_system78.cn)(
|
|
3464
3538
|
"text-[--color] outline-[--outline]",
|
|
3465
3539
|
classNames2,
|
|
3466
|
-
fontStyle &&
|
|
3467
|
-
align &&
|
|
3468
|
-
cursor &&
|
|
3469
|
-
weight &&
|
|
3470
|
-
fontSize &&
|
|
3540
|
+
fontStyle && import_system78.textStyle[fontStyle],
|
|
3541
|
+
align && import_system78.textAlign[align],
|
|
3542
|
+
cursor && import_system78.cursorStyle[cursor],
|
|
3543
|
+
weight && import_system78.fontWeight[weight],
|
|
3544
|
+
fontSize && import_system78.textSize[fontSize]
|
|
3471
3545
|
),
|
|
3472
|
-
style: (0,
|
|
3473
|
-
color: color && (0,
|
|
3546
|
+
style: (0, import_system78.createVar)({
|
|
3547
|
+
color: color && (0, import_system78.getColor)(
|
|
3474
3548
|
theme,
|
|
3475
3549
|
color,
|
|
3476
3550
|
color
|
|
@@ -3483,11 +3557,11 @@ var _Text = ({
|
|
|
3483
3557
|
};
|
|
3484
3558
|
|
|
3485
3559
|
// src/TextArea/TextArea.tsx
|
|
3486
|
-
var
|
|
3560
|
+
var import_react54 = require("react");
|
|
3487
3561
|
var import_react_aria_components51 = require("react-aria-components");
|
|
3488
|
-
var
|
|
3489
|
-
var
|
|
3490
|
-
var _TextArea = (0,
|
|
3562
|
+
var import_system79 = require("@marigold/system");
|
|
3563
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
3564
|
+
var _TextArea = (0, import_react54.forwardRef)(
|
|
3491
3565
|
({
|
|
3492
3566
|
variant,
|
|
3493
3567
|
size,
|
|
@@ -3498,7 +3572,7 @@ var _TextArea = (0, import_react53.forwardRef)(
|
|
|
3498
3572
|
rows,
|
|
3499
3573
|
...rest
|
|
3500
3574
|
}, ref) => {
|
|
3501
|
-
const classNames2 = (0,
|
|
3575
|
+
const classNames2 = (0, import_system79.useClassNames)({ component: "TextArea", variant, size });
|
|
3502
3576
|
const props = {
|
|
3503
3577
|
isDisabled: disabled,
|
|
3504
3578
|
isReadOnly: readOnly,
|
|
@@ -3506,15 +3580,15 @@ var _TextArea = (0, import_react53.forwardRef)(
|
|
|
3506
3580
|
isRequired: required,
|
|
3507
3581
|
...rest
|
|
3508
3582
|
};
|
|
3509
|
-
return /* @__PURE__ */ (0,
|
|
3583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(FieldBase, { as: import_react_aria_components51.TextField, ...props, variant, size, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_aria_components51.TextArea, { className: classNames2, ref, rows }) });
|
|
3510
3584
|
}
|
|
3511
3585
|
);
|
|
3512
3586
|
|
|
3513
3587
|
// src/TextField/TextField.tsx
|
|
3514
|
-
var
|
|
3588
|
+
var import_react55 = require("react");
|
|
3515
3589
|
var import_react_aria_components52 = require("react-aria-components");
|
|
3516
|
-
var
|
|
3517
|
-
var _TextField = (0,
|
|
3590
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
3591
|
+
var _TextField = (0, import_react55.forwardRef)(
|
|
3518
3592
|
({ required, disabled, readOnly, error, ...rest }, ref) => {
|
|
3519
3593
|
const props = {
|
|
3520
3594
|
isDisabled: disabled,
|
|
@@ -3523,13 +3597,13 @@ var _TextField = (0, import_react54.forwardRef)(
|
|
|
3523
3597
|
isRequired: required,
|
|
3524
3598
|
...rest
|
|
3525
3599
|
};
|
|
3526
|
-
return /* @__PURE__ */ (0,
|
|
3600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FieldBase, { as: import_react_aria_components52.TextField, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(_Input, { ref }) });
|
|
3527
3601
|
}
|
|
3528
3602
|
);
|
|
3529
3603
|
|
|
3530
3604
|
// src/Tiles/Tiles.tsx
|
|
3531
|
-
var
|
|
3532
|
-
var
|
|
3605
|
+
var import_system80 = require("@marigold/system");
|
|
3606
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
3533
3607
|
var Tiles = ({
|
|
3534
3608
|
space = 0,
|
|
3535
3609
|
stretch = false,
|
|
@@ -3542,17 +3616,17 @@ var Tiles = ({
|
|
|
3542
3616
|
if (stretch) {
|
|
3543
3617
|
column = `minmax(${column}, 1fr)`;
|
|
3544
3618
|
}
|
|
3545
|
-
return /* @__PURE__ */ (0,
|
|
3619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
3546
3620
|
"div",
|
|
3547
3621
|
{
|
|
3548
3622
|
...props,
|
|
3549
|
-
className: (0,
|
|
3623
|
+
className: (0, import_system80.cn)(
|
|
3550
3624
|
"grid",
|
|
3551
|
-
|
|
3625
|
+
import_system80.gapSpace[space],
|
|
3552
3626
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
3553
3627
|
equalHeight && "auto-rows-[1fr]"
|
|
3554
3628
|
),
|
|
3555
|
-
style: (0,
|
|
3629
|
+
style: (0, import_system80.createVar)({ column, tilesWidth }),
|
|
3556
3630
|
children
|
|
3557
3631
|
}
|
|
3558
3632
|
);
|
|
@@ -3560,11 +3634,11 @@ var Tiles = ({
|
|
|
3560
3634
|
|
|
3561
3635
|
// src/Tooltip/Tooltip.tsx
|
|
3562
3636
|
var import_react_aria_components54 = require("react-aria-components");
|
|
3563
|
-
var
|
|
3637
|
+
var import_system81 = require("@marigold/system");
|
|
3564
3638
|
|
|
3565
3639
|
// src/Tooltip/TooltipTrigger.tsx
|
|
3566
3640
|
var import_react_aria_components53 = require("react-aria-components");
|
|
3567
|
-
var
|
|
3641
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
3568
3642
|
var _TooltipTrigger = ({
|
|
3569
3643
|
delay = 1e3,
|
|
3570
3644
|
children,
|
|
@@ -3578,26 +3652,26 @@ var _TooltipTrigger = ({
|
|
|
3578
3652
|
isOpen: open,
|
|
3579
3653
|
delay
|
|
3580
3654
|
};
|
|
3581
|
-
return /* @__PURE__ */ (0,
|
|
3655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_aria_components53.TooltipTrigger, { ...props, children });
|
|
3582
3656
|
};
|
|
3583
3657
|
|
|
3584
3658
|
// src/Tooltip/Tooltip.tsx
|
|
3585
|
-
var
|
|
3659
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
3586
3660
|
var _Tooltip = ({ children, variant, size, open, ...rest }) => {
|
|
3587
3661
|
const props = {
|
|
3588
3662
|
...rest,
|
|
3589
3663
|
isOpen: open
|
|
3590
3664
|
};
|
|
3591
|
-
const classNames2 = (0,
|
|
3665
|
+
const classNames2 = (0, import_system81.useClassNames)({ component: "Tooltip", variant, size });
|
|
3592
3666
|
const portal = usePortalContainer();
|
|
3593
|
-
return /* @__PURE__ */ (0,
|
|
3667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
3594
3668
|
import_react_aria_components54.Tooltip,
|
|
3595
3669
|
{
|
|
3596
3670
|
...props,
|
|
3597
|
-
className: (0,
|
|
3671
|
+
className: (0, import_system81.cn)("group/tooltip", classNames2.container),
|
|
3598
3672
|
UNSTABLE_portalContainer: portal,
|
|
3599
3673
|
children: [
|
|
3600
|
-
/* @__PURE__ */ (0,
|
|
3674
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_aria_components54.OverlayArrow, { className: classNames2.arrow, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
3601
3675
|
children
|
|
3602
3676
|
]
|
|
3603
3677
|
}
|
|
@@ -3609,11 +3683,16 @@ _Tooltip.Trigger = _TooltipTrigger;
|
|
|
3609
3683
|
var import_visually_hidden = require("@react-aria/visually-hidden");
|
|
3610
3684
|
|
|
3611
3685
|
// src/XLoader/XLoader.tsx
|
|
3612
|
-
var
|
|
3613
|
-
var
|
|
3614
|
-
var
|
|
3615
|
-
var
|
|
3616
|
-
|
|
3686
|
+
var import_react56 = require("react");
|
|
3687
|
+
var import_react_aria_components55 = require("react-aria-components");
|
|
3688
|
+
var import_system82 = require("@marigold/system");
|
|
3689
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
3690
|
+
var LoadingModes = {
|
|
3691
|
+
FullSize: "fullsize",
|
|
3692
|
+
Inline: "inline"
|
|
3693
|
+
};
|
|
3694
|
+
var Loader = (0, import_react56.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
3695
|
+
import_system82.SVG,
|
|
3617
3696
|
{
|
|
3618
3697
|
id: "XLoader",
|
|
3619
3698
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3622,13 +3701,13 @@ var XLoader = (0, import_react55.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
3622
3701
|
...props,
|
|
3623
3702
|
...ref,
|
|
3624
3703
|
children: [
|
|
3625
|
-
/* @__PURE__ */ (0,
|
|
3626
|
-
/* @__PURE__ */ (0,
|
|
3704
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
3705
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3627
3706
|
"path",
|
|
3628
3707
|
{
|
|
3629
3708
|
id: "XMLID_5_",
|
|
3630
3709
|
d: "M124.3 12.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3631
|
-
children: /* @__PURE__ */ (0,
|
|
3710
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3632
3711
|
"animate",
|
|
3633
3712
|
{
|
|
3634
3713
|
attributeName: "opacity",
|
|
@@ -3641,12 +3720,12 @@ var XLoader = (0, import_react55.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
3641
3720
|
)
|
|
3642
3721
|
}
|
|
3643
3722
|
),
|
|
3644
|
-
/* @__PURE__ */ (0,
|
|
3723
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3645
3724
|
"path",
|
|
3646
3725
|
{
|
|
3647
3726
|
id: "XMLID_18_",
|
|
3648
3727
|
d: "M115.9 24.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3649
|
-
children: /* @__PURE__ */ (0,
|
|
3728
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3650
3729
|
"animate",
|
|
3651
3730
|
{
|
|
3652
3731
|
attributeName: "opacity",
|
|
@@ -3659,12 +3738,12 @@ var XLoader = (0, import_react55.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
3659
3738
|
)
|
|
3660
3739
|
}
|
|
3661
3740
|
),
|
|
3662
|
-
/* @__PURE__ */ (0,
|
|
3741
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3663
3742
|
"path",
|
|
3664
3743
|
{
|
|
3665
3744
|
id: "XMLID_19_",
|
|
3666
3745
|
d: "M107.5 35.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3667
|
-
children: /* @__PURE__ */ (0,
|
|
3746
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3668
3747
|
"animate",
|
|
3669
3748
|
{
|
|
3670
3749
|
attributeName: "opacity",
|
|
@@ -3677,12 +3756,12 @@ var XLoader = (0, import_react55.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
3677
3756
|
)
|
|
3678
3757
|
}
|
|
3679
3758
|
),
|
|
3680
|
-
/* @__PURE__ */ (0,
|
|
3759
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3681
3760
|
"path",
|
|
3682
3761
|
{
|
|
3683
3762
|
id: "XMLID_20_",
|
|
3684
3763
|
d: "M99.1 47.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3685
|
-
children: /* @__PURE__ */ (0,
|
|
3764
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3686
3765
|
"animate",
|
|
3687
3766
|
{
|
|
3688
3767
|
attributeName: "opacity",
|
|
@@ -3695,12 +3774,12 @@ var XLoader = (0, import_react55.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
3695
3774
|
)
|
|
3696
3775
|
}
|
|
3697
3776
|
),
|
|
3698
|
-
/* @__PURE__ */ (0,
|
|
3777
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3699
3778
|
"path",
|
|
3700
3779
|
{
|
|
3701
3780
|
id: "XMLID_21_",
|
|
3702
3781
|
d: "M90.7 59H90c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.8-2.2 4.9-4.9 4.9z",
|
|
3703
|
-
children: /* @__PURE__ */ (0,
|
|
3782
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3704
3783
|
"animate",
|
|
3705
3784
|
{
|
|
3706
3785
|
attributeName: "opacity",
|
|
@@ -3713,12 +3792,12 @@ var XLoader = (0, import_react55.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
3713
3792
|
)
|
|
3714
3793
|
}
|
|
3715
3794
|
),
|
|
3716
|
-
/* @__PURE__ */ (0,
|
|
3795
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3717
3796
|
"path",
|
|
3718
3797
|
{
|
|
3719
3798
|
id: "XMLID_22_",
|
|
3720
3799
|
d: "M68 89.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.8c0 2.6-2.2 4.8-4.9 4.8z",
|
|
3721
|
-
children: /* @__PURE__ */ (0,
|
|
3800
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3722
3801
|
"animate",
|
|
3723
3802
|
{
|
|
3724
3803
|
attributeName: "opacity",
|
|
@@ -3731,12 +3810,12 @@ var XLoader = (0, import_react55.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
3731
3810
|
)
|
|
3732
3811
|
}
|
|
3733
3812
|
),
|
|
3734
|
-
/* @__PURE__ */ (0,
|
|
3813
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3735
3814
|
"path",
|
|
3736
3815
|
{
|
|
3737
3816
|
id: "XMLID_23_",
|
|
3738
3817
|
d: "M59.6 101.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3739
|
-
children: /* @__PURE__ */ (0,
|
|
3818
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3740
3819
|
"animate",
|
|
3741
3820
|
{
|
|
3742
3821
|
attributeName: "opacity",
|
|
@@ -3749,12 +3828,12 @@ var XLoader = (0, import_react55.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
3749
3828
|
)
|
|
3750
3829
|
}
|
|
3751
3830
|
),
|
|
3752
|
-
/* @__PURE__ */ (0,
|
|
3831
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3753
3832
|
"path",
|
|
3754
3833
|
{
|
|
3755
3834
|
id: "XMLID_24_",
|
|
3756
3835
|
d: "M51.2 112.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z",
|
|
3757
|
-
children: /* @__PURE__ */ (0,
|
|
3836
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3758
3837
|
"animate",
|
|
3759
3838
|
{
|
|
3760
3839
|
attributeName: "opacity",
|
|
@@ -3767,12 +3846,12 @@ var XLoader = (0, import_react55.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
3767
3846
|
)
|
|
3768
3847
|
}
|
|
3769
3848
|
),
|
|
3770
|
-
/* @__PURE__ */ (0,
|
|
3849
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3771
3850
|
"path",
|
|
3772
3851
|
{
|
|
3773
3852
|
id: "XMLID_25_",
|
|
3774
3853
|
d: "M42.8 124.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z",
|
|
3775
|
-
children: /* @__PURE__ */ (0,
|
|
3854
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3776
3855
|
"animate",
|
|
3777
3856
|
{
|
|
3778
3857
|
attributeName: "opacity",
|
|
@@ -3785,12 +3864,12 @@ var XLoader = (0, import_react55.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
3785
3864
|
)
|
|
3786
3865
|
}
|
|
3787
3866
|
),
|
|
3788
|
-
/* @__PURE__ */ (0,
|
|
3867
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3789
3868
|
"path",
|
|
3790
3869
|
{
|
|
3791
3870
|
id: "XMLID_26_",
|
|
3792
3871
|
d: "M34.4 136h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z",
|
|
3793
|
-
children: /* @__PURE__ */ (0,
|
|
3872
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3794
3873
|
"animate",
|
|
3795
3874
|
{
|
|
3796
3875
|
attributeName: "opacity",
|
|
@@ -3803,12 +3882,12 @@ var XLoader = (0, import_react55.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
3803
3882
|
)
|
|
3804
3883
|
}
|
|
3805
3884
|
),
|
|
3806
|
-
/* @__PURE__ */ (0,
|
|
3885
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3807
3886
|
"path",
|
|
3808
3887
|
{
|
|
3809
3888
|
id: "XMLID_27_",
|
|
3810
3889
|
d: "M26 147.6h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z",
|
|
3811
|
-
children: /* @__PURE__ */ (0,
|
|
3890
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
3812
3891
|
"animate",
|
|
3813
3892
|
{
|
|
3814
3893
|
attributeName: "opacity",
|
|
@@ -3824,27 +3903,53 @@ var XLoader = (0, import_react55.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
|
3824
3903
|
]
|
|
3825
3904
|
}
|
|
3826
3905
|
));
|
|
3906
|
+
var LoaderFullSize = (0, import_react56.forwardRef)(
|
|
3907
|
+
({ children, ...rest }, ref) => {
|
|
3908
|
+
const className = (0, import_system82.useClassNames)({
|
|
3909
|
+
component: "Underlay",
|
|
3910
|
+
variant: "modal",
|
|
3911
|
+
className: "fixed left-0 top-0 z-10 flex h-[--visual-viewport-height] w-screen items-center justify-center bg-gray-950/30 cursor-progress"
|
|
3912
|
+
});
|
|
3913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_aria_components55.ModalOverlay, { defaultOpen: true, className, isKeyboardDismissDisabled: true, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_aria_components55.Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_aria_components55.Dialog, { className: "text-text-inverted outline-0", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Stack, { space: 2, alignX: "center", children: [
|
|
3914
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Loader, { ...rest, ...ref, color: "text-inverted", size: 80 }),
|
|
3915
|
+
children
|
|
3916
|
+
] }) }) }) });
|
|
3917
|
+
}
|
|
3918
|
+
);
|
|
3919
|
+
var LoaderInline = (0, import_react56.forwardRef)(
|
|
3920
|
+
({ children, ...rest }, ref) => {
|
|
3921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "text-text-inverted flex h-full w-full items-center justify-center bg-gray-950/30", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Stack, { space: 2, alignX: "center", children: [
|
|
3922
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Loader, { ...rest, ...ref, color: "text-inverted", size: 80 }),
|
|
3923
|
+
children
|
|
3924
|
+
] }) });
|
|
3925
|
+
}
|
|
3926
|
+
);
|
|
3927
|
+
var XLoader = (0, import_react56.forwardRef)(
|
|
3928
|
+
({ mode, ...rest }, ref) => {
|
|
3929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_jsx_runtime99.Fragment, { children: mode === LoadingModes.FullSize ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(LoaderFullSize, { ...rest, ...ref }) : mode === LoadingModes.Inline ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(LoaderInline, { ...rest, ...ref }) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Loader, { ...rest, ...ref }) });
|
|
3930
|
+
}
|
|
3931
|
+
);
|
|
3827
3932
|
|
|
3828
3933
|
// src/Tabs/Tabs.tsx
|
|
3829
|
-
var
|
|
3830
|
-
var
|
|
3934
|
+
var import_react_aria_components59 = require("react-aria-components");
|
|
3935
|
+
var import_system85 = require("@marigold/system");
|
|
3831
3936
|
|
|
3832
3937
|
// src/Tabs/Context.ts
|
|
3833
|
-
var
|
|
3834
|
-
var TabContext = (0,
|
|
3835
|
-
var useTabContext = () => (0,
|
|
3938
|
+
var import_react57 = require("react");
|
|
3939
|
+
var TabContext = (0, import_react57.createContext)({});
|
|
3940
|
+
var useTabContext = () => (0, import_react57.useContext)(TabContext);
|
|
3836
3941
|
|
|
3837
3942
|
// src/Tabs/Tab.tsx
|
|
3838
|
-
var
|
|
3839
|
-
var
|
|
3840
|
-
var
|
|
3943
|
+
var import_react_aria_components56 = require("react-aria-components");
|
|
3944
|
+
var import_system83 = require("@marigold/system");
|
|
3945
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
3841
3946
|
var _Tab = (props) => {
|
|
3842
3947
|
const { classNames: classNames2 } = useTabContext();
|
|
3843
|
-
return /* @__PURE__ */ (0,
|
|
3844
|
-
|
|
3948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
3949
|
+
import_react_aria_components56.Tab,
|
|
3845
3950
|
{
|
|
3846
3951
|
...props,
|
|
3847
|
-
className: (0,
|
|
3952
|
+
className: (0, import_system83.cn)(
|
|
3848
3953
|
"flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
|
|
3849
3954
|
classNames2.tab
|
|
3850
3955
|
),
|
|
@@ -3854,49 +3959,49 @@ var _Tab = (props) => {
|
|
|
3854
3959
|
};
|
|
3855
3960
|
|
|
3856
3961
|
// src/Tabs/TabList.tsx
|
|
3857
|
-
var
|
|
3858
|
-
var
|
|
3859
|
-
var
|
|
3962
|
+
var import_react_aria_components57 = require("react-aria-components");
|
|
3963
|
+
var import_system84 = require("@marigold/system");
|
|
3964
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
3860
3965
|
var _TabList = ({ space = 2, ...props }) => {
|
|
3861
3966
|
const { classNames: classNames2 } = useTabContext();
|
|
3862
|
-
return /* @__PURE__ */ (0,
|
|
3863
|
-
|
|
3967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
3968
|
+
import_react_aria_components57.TabList,
|
|
3864
3969
|
{
|
|
3865
3970
|
...props,
|
|
3866
|
-
className: (0,
|
|
3971
|
+
className: (0, import_system84.cn)("flex", import_system84.gapSpace[space], classNames2.tabsList),
|
|
3867
3972
|
children: props.children
|
|
3868
3973
|
}
|
|
3869
3974
|
);
|
|
3870
3975
|
};
|
|
3871
3976
|
|
|
3872
3977
|
// src/Tabs/TabPanel.tsx
|
|
3873
|
-
var
|
|
3874
|
-
var
|
|
3978
|
+
var import_react_aria_components58 = require("react-aria-components");
|
|
3979
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
3875
3980
|
var _TabPanel = (props) => {
|
|
3876
3981
|
const { classNames: classNames2 } = useTabContext();
|
|
3877
|
-
return /* @__PURE__ */ (0,
|
|
3982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_aria_components58.TabPanel, { ...props, className: classNames2.tabpanel, children: props.children });
|
|
3878
3983
|
};
|
|
3879
3984
|
|
|
3880
3985
|
// src/Tabs/Tabs.tsx
|
|
3881
|
-
var
|
|
3986
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
3882
3987
|
var _Tabs = ({ disabled, variant, size = "medium", ...rest }) => {
|
|
3883
3988
|
const props = {
|
|
3884
3989
|
isDisabled: disabled,
|
|
3885
3990
|
...rest
|
|
3886
3991
|
};
|
|
3887
|
-
const classNames2 = (0,
|
|
3992
|
+
const classNames2 = (0, import_system85.useClassNames)({
|
|
3888
3993
|
component: "Tabs",
|
|
3889
3994
|
size,
|
|
3890
3995
|
variant
|
|
3891
3996
|
});
|
|
3892
|
-
return /* @__PURE__ */ (0,
|
|
3997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(TabContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react_aria_components59.Tabs, { ...props, className: classNames2.container, children: props.children }) });
|
|
3893
3998
|
};
|
|
3894
3999
|
_Tabs.List = _TabList;
|
|
3895
4000
|
_Tabs.TabPanel = _TabPanel;
|
|
3896
4001
|
_Tabs.Item = _Tab;
|
|
3897
4002
|
|
|
3898
4003
|
// src/RouterProvider/RouterProvider.tsx
|
|
3899
|
-
var
|
|
4004
|
+
var import_react_aria_components60 = require("react-aria-components");
|
|
3900
4005
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3901
4006
|
0 && (module.exports = {
|
|
3902
4007
|
Accordion,
|