@marigold/components 7.5.2 → 7.5.4
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 +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +392 -302
- package/dist/index.mjs +348 -259
- package/package.json +6 -5
package/dist/index.mjs
CHANGED
|
@@ -1434,11 +1434,11 @@ _Dialog.Headline = DialogHeadline;
|
|
|
1434
1434
|
|
|
1435
1435
|
// src/Divider/Divider.tsx
|
|
1436
1436
|
import { Separator } from "react-aria-components";
|
|
1437
|
-
import { useClassNames as useClassNames19 } from "@marigold/system";
|
|
1437
|
+
import { cn as cn23, useClassNames as useClassNames19 } from "@marigold/system";
|
|
1438
1438
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1439
1439
|
var _Divider = ({ variant, ...props }) => {
|
|
1440
1440
|
const classNames2 = useClassNames19({ component: "Divider", variant });
|
|
1441
|
-
return /* @__PURE__ */ jsx36(Separator, { className: classNames2, ...props });
|
|
1441
|
+
return /* @__PURE__ */ jsx36(Separator, { className: cn23("border-none", classNames2), ...props });
|
|
1442
1442
|
};
|
|
1443
1443
|
|
|
1444
1444
|
// src/Footer/Footer.tsx
|
|
@@ -1467,7 +1467,7 @@ var _Header = ({ variant, size, ...props }) => {
|
|
|
1467
1467
|
|
|
1468
1468
|
// src/Image/Image.tsx
|
|
1469
1469
|
import {
|
|
1470
|
-
cn as
|
|
1470
|
+
cn as cn24,
|
|
1471
1471
|
objectFit,
|
|
1472
1472
|
objectPosition,
|
|
1473
1473
|
useClassNames as useClassNames22
|
|
@@ -1486,7 +1486,7 @@ var Image = ({
|
|
|
1486
1486
|
{
|
|
1487
1487
|
...props,
|
|
1488
1488
|
alt: props.alt,
|
|
1489
|
-
className:
|
|
1489
|
+
className: cn24(
|
|
1490
1490
|
fit !== "none" && "h-full w-full",
|
|
1491
1491
|
classNames2,
|
|
1492
1492
|
objectFit[fit],
|
|
@@ -1499,7 +1499,7 @@ var Image = ({
|
|
|
1499
1499
|
// src/Inline/Inline.tsx
|
|
1500
1500
|
import {
|
|
1501
1501
|
alignment as alignment2,
|
|
1502
|
-
cn as
|
|
1502
|
+
cn as cn25,
|
|
1503
1503
|
gapSpace as gapSpace5
|
|
1504
1504
|
} from "@marigold/system";
|
|
1505
1505
|
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
@@ -1516,7 +1516,7 @@ var Inline = ({
|
|
|
1516
1516
|
"div",
|
|
1517
1517
|
{
|
|
1518
1518
|
...props,
|
|
1519
|
-
className:
|
|
1519
|
+
className: cn25(
|
|
1520
1520
|
"flex flex-wrap",
|
|
1521
1521
|
gapSpace5[space],
|
|
1522
1522
|
alignX && ((_b2 = (_a2 = alignment2) == null ? void 0 : _a2.horizontal) == null ? void 0 : _b2.alignmentX[alignX]),
|
|
@@ -1537,7 +1537,7 @@ import { useClassNames as useClassNames23 } from "@marigold/system";
|
|
|
1537
1537
|
|
|
1538
1538
|
// src/DateField/DateSegment.tsx
|
|
1539
1539
|
import { DateSegment } from "react-aria-components";
|
|
1540
|
-
import { cn as
|
|
1540
|
+
import { cn as cn26 } from "@marigold/system";
|
|
1541
1541
|
import { Fragment as Fragment4, jsx as jsx41, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1542
1542
|
var _DateSegment = ({ segment, ...props }) => {
|
|
1543
1543
|
return /* @__PURE__ */ jsx41(
|
|
@@ -1553,7 +1553,7 @@ var _DateSegment = ({ segment, ...props }) => {
|
|
|
1553
1553
|
"span",
|
|
1554
1554
|
{
|
|
1555
1555
|
"aria-hidden": "true",
|
|
1556
|
-
className:
|
|
1556
|
+
className: cn26(
|
|
1557
1557
|
isPlaceholder ? "visible block" : "invisible hidden",
|
|
1558
1558
|
"pointer-events-none w-full text-center"
|
|
1559
1559
|
),
|
|
@@ -1623,7 +1623,7 @@ var _DateField = forwardRef13(
|
|
|
1623
1623
|
// src/Calendar/Calendar.tsx
|
|
1624
1624
|
import { useState } from "react";
|
|
1625
1625
|
import { Calendar } from "react-aria-components";
|
|
1626
|
-
import { cn as
|
|
1626
|
+
import { cn as cn30, useClassNames as useClassNames28 } from "@marigold/system";
|
|
1627
1627
|
|
|
1628
1628
|
// src/Calendar/CalendarGrid.tsx
|
|
1629
1629
|
import {
|
|
@@ -1631,7 +1631,7 @@ import {
|
|
|
1631
1631
|
CalendarGrid,
|
|
1632
1632
|
CalendarGridBody
|
|
1633
1633
|
} from "react-aria-components";
|
|
1634
|
-
import { cn as
|
|
1634
|
+
import { cn as cn27, useClassNames as useClassNames25 } from "@marigold/system";
|
|
1635
1635
|
|
|
1636
1636
|
// src/Calendar/CalendarGridHeader.tsx
|
|
1637
1637
|
import { startOfWeek, today } from "@internationalized/date";
|
|
@@ -1671,7 +1671,7 @@ var _CalendarGrid = () => {
|
|
|
1671
1671
|
CalendarCell,
|
|
1672
1672
|
{
|
|
1673
1673
|
date,
|
|
1674
|
-
className:
|
|
1674
|
+
className: cn27(
|
|
1675
1675
|
"flex h-[30px] w-[30px] cursor-pointer items-center justify-center rounded-full p-[5.3px] text-sm font-normal aria-disabled:cursor-default",
|
|
1676
1676
|
classNames2.calendarCell
|
|
1677
1677
|
)
|
|
@@ -1684,7 +1684,7 @@ var _CalendarGrid = () => {
|
|
|
1684
1684
|
import { useContext as useContext8 } from "react";
|
|
1685
1685
|
import { CalendarStateContext as CalendarStateContext2 } from "react-aria-components";
|
|
1686
1686
|
import { ChevronDown as ChevronDown2 } from "@marigold/icons";
|
|
1687
|
-
import { cn as
|
|
1687
|
+
import { cn as cn28, useClassNames as useClassNames26 } from "@marigold/system";
|
|
1688
1688
|
|
|
1689
1689
|
// src/Calendar/useFormattedMonths.tsx
|
|
1690
1690
|
import { useDateFormatter as useDateFormatter2 } from "@react-aria/i18n";
|
|
@@ -1718,7 +1718,7 @@ function CalendarListBox({
|
|
|
1718
1718
|
{
|
|
1719
1719
|
disabled: isDisabled,
|
|
1720
1720
|
onClick: () => setSelectedDropdown(type),
|
|
1721
|
-
className:
|
|
1721
|
+
className: cn28(buttonStyles, selectClassNames),
|
|
1722
1722
|
"data-testid": type,
|
|
1723
1723
|
children: [
|
|
1724
1724
|
type === "month" ? months[state.focusedDate.month - 1].substring(0, 3) : state.focusedDate.year,
|
|
@@ -1731,7 +1731,7 @@ function CalendarListBox({
|
|
|
1731
1731
|
// src/Calendar/MonthControls.tsx
|
|
1732
1732
|
import { Button as Button3 } from "react-aria-components";
|
|
1733
1733
|
import { ChevronLeft, ChevronRight } from "@marigold/icons";
|
|
1734
|
-
import { cn as
|
|
1734
|
+
import { cn as cn29, useClassNames as useClassNames27 } from "@marigold/system";
|
|
1735
1735
|
import { jsx as jsx47, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1736
1736
|
function MonthControls() {
|
|
1737
1737
|
const classNames2 = useClassNames27({ component: "Calendar" });
|
|
@@ -1739,7 +1739,7 @@ function MonthControls() {
|
|
|
1739
1739
|
return /* @__PURE__ */ jsxs18(
|
|
1740
1740
|
"div",
|
|
1741
1741
|
{
|
|
1742
|
-
className:
|
|
1742
|
+
className: cn29(
|
|
1743
1743
|
"flex w-full flex-nowrap justify-end gap-[10px] [&_button:disabled]:cursor-not-allowed [&_button]:px-2 [&_button]:py-1",
|
|
1744
1744
|
classNames2.calendarControllers
|
|
1745
1745
|
),
|
|
@@ -1747,7 +1747,7 @@ function MonthControls() {
|
|
|
1747
1747
|
/* @__PURE__ */ jsx47(
|
|
1748
1748
|
Button3,
|
|
1749
1749
|
{
|
|
1750
|
-
className:
|
|
1750
|
+
className: cn29(
|
|
1751
1751
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
1752
1752
|
buttonClassNames
|
|
1753
1753
|
),
|
|
@@ -1758,7 +1758,7 @@ function MonthControls() {
|
|
|
1758
1758
|
/* @__PURE__ */ jsx47(
|
|
1759
1759
|
Button3,
|
|
1760
1760
|
{
|
|
1761
|
-
className:
|
|
1761
|
+
className: cn29(
|
|
1762
1762
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
1763
1763
|
buttonClassNames
|
|
1764
1764
|
),
|
|
@@ -1907,7 +1907,7 @@ var _Calendar = ({
|
|
|
1907
1907
|
return /* @__PURE__ */ jsx50(
|
|
1908
1908
|
Calendar,
|
|
1909
1909
|
{
|
|
1910
|
-
className:
|
|
1910
|
+
className: cn30(
|
|
1911
1911
|
"flex min-h-[350px] w-[360px] flex-col rounded-sm p-4",
|
|
1912
1912
|
classNames2.calendar
|
|
1913
1913
|
),
|
|
@@ -1998,7 +1998,7 @@ var _DatePicker = ({
|
|
|
1998
1998
|
|
|
1999
1999
|
// src/Inset/Inset.tsx
|
|
2000
2000
|
import {
|
|
2001
|
-
cn as
|
|
2001
|
+
cn as cn31,
|
|
2002
2002
|
paddingSpace as paddingSpace2,
|
|
2003
2003
|
paddingSpaceX as paddingSpaceX2,
|
|
2004
2004
|
paddingSpaceY as paddingSpaceY2
|
|
@@ -2007,7 +2007,7 @@ import { jsx as jsx52 } from "react/jsx-runtime";
|
|
|
2007
2007
|
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx52(
|
|
2008
2008
|
"div",
|
|
2009
2009
|
{
|
|
2010
|
-
className:
|
|
2010
|
+
className: cn31(
|
|
2011
2011
|
space && paddingSpace2[space],
|
|
2012
2012
|
!space && spaceX && paddingSpaceX2[spaceX],
|
|
2013
2013
|
!space && spaceY && paddingSpaceY2[spaceY]
|
|
@@ -2126,7 +2126,7 @@ var ActionMenu = ({
|
|
|
2126
2126
|
|
|
2127
2127
|
// src/Message/Message.tsx
|
|
2128
2128
|
import { forwardRef as forwardRef15 } from "react";
|
|
2129
|
-
import { cn as
|
|
2129
|
+
import { cn as cn32, useClassNames as useClassNames36 } from "@marigold/system";
|
|
2130
2130
|
import { jsx as jsx60, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2131
2131
|
var icons = {
|
|
2132
2132
|
success: () => /* @__PURE__ */ jsx60(
|
|
@@ -2201,41 +2201,169 @@ var Message = forwardRef15(
|
|
|
2201
2201
|
return /* @__PURE__ */ jsxs24(
|
|
2202
2202
|
"div",
|
|
2203
2203
|
{
|
|
2204
|
-
className:
|
|
2204
|
+
className: cn32(
|
|
2205
2205
|
"grid auto-rows-min grid-cols-[min-content_auto] gap-1",
|
|
2206
2206
|
classNames2.container
|
|
2207
2207
|
),
|
|
2208
2208
|
ref,
|
|
2209
2209
|
...props,
|
|
2210
2210
|
children: [
|
|
2211
|
-
/* @__PURE__ */ jsx60("div", { className:
|
|
2211
|
+
/* @__PURE__ */ jsx60("div", { className: cn32("col-span-1 h-5 w-5 self-center", classNames2.icon), children: /* @__PURE__ */ jsx60(Icon4, {}) }),
|
|
2212
2212
|
/* @__PURE__ */ jsx60(
|
|
2213
2213
|
"div",
|
|
2214
2214
|
{
|
|
2215
|
-
className:
|
|
2215
|
+
className: cn32(
|
|
2216
2216
|
"col-start-2 row-start-1 self-center",
|
|
2217
2217
|
classNames2.title
|
|
2218
2218
|
),
|
|
2219
2219
|
children: messageTitle
|
|
2220
2220
|
}
|
|
2221
2221
|
),
|
|
2222
|
-
/* @__PURE__ */ jsx60("div", { className:
|
|
2222
|
+
/* @__PURE__ */ jsx60("div", { className: cn32("col-start-2", classNames2.content), children })
|
|
2223
2223
|
]
|
|
2224
2224
|
}
|
|
2225
2225
|
);
|
|
2226
2226
|
}
|
|
2227
2227
|
);
|
|
2228
2228
|
|
|
2229
|
+
// src/Multiselect/Multiselect.tsx
|
|
2230
|
+
import { Children as Children5, useState as useState2 } from "react";
|
|
2231
|
+
import { useListData as useListData2 } from "@react-stately/data";
|
|
2232
|
+
|
|
2233
|
+
// src/TagGroup/Tag.tsx
|
|
2234
|
+
import { Button as Button4, Tag } from "react-aria-components";
|
|
2235
|
+
import { cn as cn33, useClassNames as useClassNames38 } from "@marigold/system";
|
|
2236
|
+
|
|
2237
|
+
// src/TagGroup/TagGroup.tsx
|
|
2238
|
+
import { TagGroup, TagList } from "react-aria-components";
|
|
2239
|
+
import { useClassNames as useClassNames37 } from "@marigold/system";
|
|
2240
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
2241
|
+
var _TagGroup = ({
|
|
2242
|
+
width,
|
|
2243
|
+
items,
|
|
2244
|
+
children,
|
|
2245
|
+
renderEmptyState,
|
|
2246
|
+
variant,
|
|
2247
|
+
size,
|
|
2248
|
+
...rest
|
|
2249
|
+
}) => {
|
|
2250
|
+
const classNames2 = useClassNames37({ component: "Tag", variant, size });
|
|
2251
|
+
return /* @__PURE__ */ jsx61(FieldBase, { as: TagGroup, ...rest, children: /* @__PURE__ */ jsx61(
|
|
2252
|
+
TagList,
|
|
2253
|
+
{
|
|
2254
|
+
items,
|
|
2255
|
+
className: classNames2.listItems,
|
|
2256
|
+
renderEmptyState,
|
|
2257
|
+
children
|
|
2258
|
+
}
|
|
2259
|
+
) });
|
|
2260
|
+
};
|
|
2261
|
+
|
|
2262
|
+
// src/TagGroup/Tag.tsx
|
|
2263
|
+
import { Fragment as Fragment6, jsx as jsx62, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2264
|
+
var CloseButton2 = ({ className }) => {
|
|
2265
|
+
return /* @__PURE__ */ jsx62(Button4, { slot: "remove", className, children: /* @__PURE__ */ jsx62("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx62("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" }) }) });
|
|
2266
|
+
};
|
|
2267
|
+
var _Tag = ({ variant, size, children, ...props }) => {
|
|
2268
|
+
let textValue = typeof children === "string" ? children : void 0;
|
|
2269
|
+
const classNames2 = useClassNames38({ component: "Tag", variant, size });
|
|
2270
|
+
return /* @__PURE__ */ jsx62(
|
|
2271
|
+
Tag,
|
|
2272
|
+
{
|
|
2273
|
+
textValue,
|
|
2274
|
+
...props,
|
|
2275
|
+
className: cn33("data-[selection-mode]:cursor-pointer", classNames2.tag),
|
|
2276
|
+
children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs25(Fragment6, { children: [
|
|
2277
|
+
children,
|
|
2278
|
+
allowsRemoving && /* @__PURE__ */ jsx62(
|
|
2279
|
+
CloseButton2,
|
|
2280
|
+
{
|
|
2281
|
+
className: cn33("flex items-center", classNames2.closeButton)
|
|
2282
|
+
}
|
|
2283
|
+
)
|
|
2284
|
+
] })
|
|
2285
|
+
}
|
|
2286
|
+
);
|
|
2287
|
+
};
|
|
2288
|
+
_Tag.Group = _TagGroup;
|
|
2289
|
+
|
|
2290
|
+
// src/Multiselect/Multiselect.tsx
|
|
2291
|
+
import { jsx as jsx63, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2292
|
+
var Item2 = (_) => null;
|
|
2293
|
+
var Multiselect = ({
|
|
2294
|
+
label,
|
|
2295
|
+
children,
|
|
2296
|
+
...props
|
|
2297
|
+
}) => {
|
|
2298
|
+
const items = Children5.map(children, ({ props: props2 }) => props2);
|
|
2299
|
+
const list = useListData2({
|
|
2300
|
+
initialItems: items,
|
|
2301
|
+
initialSelectedKeys: props.defaultSelectedKeys,
|
|
2302
|
+
getKey: (item) => item.id
|
|
2303
|
+
});
|
|
2304
|
+
const selected = list.items.filter(
|
|
2305
|
+
(item) => list.selectedKeys === "all" ? true : list.selectedKeys.has(item.id)
|
|
2306
|
+
);
|
|
2307
|
+
const unselected = list.items.filter((item) => !selected.includes(item));
|
|
2308
|
+
const setUnselected = (keys) => {
|
|
2309
|
+
const next = list.selectedKeys === "all" ? new Set(items) : new Set(list.selectedKeys);
|
|
2310
|
+
if (list.selectedKeys !== "all") {
|
|
2311
|
+
keys.forEach((key) => {
|
|
2312
|
+
next.delete(key);
|
|
2313
|
+
});
|
|
2314
|
+
}
|
|
2315
|
+
list.setSelectedKeys(next);
|
|
2316
|
+
};
|
|
2317
|
+
const [value, setValue] = useState2("");
|
|
2318
|
+
const selectItem = (key) => {
|
|
2319
|
+
if (list.selectedKeys !== "all") {
|
|
2320
|
+
const next = list.selectedKeys.add(key);
|
|
2321
|
+
list.setSelectedKeys(next);
|
|
2322
|
+
}
|
|
2323
|
+
const input = document.activeElement;
|
|
2324
|
+
setTimeout(() => {
|
|
2325
|
+
setValue("");
|
|
2326
|
+
}, 0);
|
|
2327
|
+
input.focus();
|
|
2328
|
+
};
|
|
2329
|
+
return /* @__PURE__ */ jsxs26("div", { className: "flex flex-wrap gap-1", children: [
|
|
2330
|
+
/* @__PURE__ */ jsx63(
|
|
2331
|
+
_Tag.Group,
|
|
2332
|
+
{
|
|
2333
|
+
items: selected,
|
|
2334
|
+
allowsRemoving: true,
|
|
2335
|
+
onRemove: setUnselected,
|
|
2336
|
+
renderEmptyState: () => null,
|
|
2337
|
+
children: (item) => /* @__PURE__ */ jsx63(_Tag, { id: item.id, children: item.children }, item.id)
|
|
2338
|
+
}
|
|
2339
|
+
),
|
|
2340
|
+
/* @__PURE__ */ jsx63(
|
|
2341
|
+
_ComboBox,
|
|
2342
|
+
{
|
|
2343
|
+
value,
|
|
2344
|
+
onChange: setValue,
|
|
2345
|
+
onSelectionChange: selectItem,
|
|
2346
|
+
menuTrigger: "focus",
|
|
2347
|
+
disabled: unselected.length === 0,
|
|
2348
|
+
placeholder: unselected.length === 0 ? "All items selected" : "",
|
|
2349
|
+
...props,
|
|
2350
|
+
children: unselected.map((item) => /* @__PURE__ */ jsx63(_ComboBox.Item, { id: item.id, children: item.children }, item.id))
|
|
2351
|
+
}
|
|
2352
|
+
)
|
|
2353
|
+
] });
|
|
2354
|
+
};
|
|
2355
|
+
Multiselect.Item = Item2;
|
|
2356
|
+
|
|
2229
2357
|
// src/NumberField/NumberField.tsx
|
|
2230
2358
|
import { forwardRef as forwardRef16 } from "react";
|
|
2231
2359
|
import { Group as Group2, NumberField } from "react-aria-components";
|
|
2232
|
-
import { cn as
|
|
2360
|
+
import { cn as cn35, useClassNames as useClassNames39 } from "@marigold/system";
|
|
2233
2361
|
|
|
2234
2362
|
// src/NumberField/StepButton.tsx
|
|
2235
|
-
import { Button as
|
|
2236
|
-
import { cn as
|
|
2237
|
-
import { jsx as
|
|
2238
|
-
var Plus = () => /* @__PURE__ */
|
|
2363
|
+
import { Button as Button5 } from "react-aria-components";
|
|
2364
|
+
import { cn as cn34 } from "@marigold/system";
|
|
2365
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
2366
|
+
var Plus = () => /* @__PURE__ */ jsx64("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx64(
|
|
2239
2367
|
"path",
|
|
2240
2368
|
{
|
|
2241
2369
|
fillRule: "evenodd",
|
|
@@ -2243,7 +2371,7 @@ var Plus = () => /* @__PURE__ */ jsx61("svg", { width: 16, height: 16, viewBox:
|
|
|
2243
2371
|
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"
|
|
2244
2372
|
}
|
|
2245
2373
|
) });
|
|
2246
|
-
var Minus = () => /* @__PURE__ */
|
|
2374
|
+
var Minus = () => /* @__PURE__ */ jsx64("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx64(
|
|
2247
2375
|
"path",
|
|
2248
2376
|
{
|
|
2249
2377
|
fillRule: "evenodd",
|
|
@@ -2253,10 +2381,10 @@ var Minus = () => /* @__PURE__ */ jsx61("svg", { width: 16, height: 16, viewBox:
|
|
|
2253
2381
|
) });
|
|
2254
2382
|
var _StepButton = ({ direction, className, ...props }) => {
|
|
2255
2383
|
const Icon4 = direction === "up" ? Plus : Minus;
|
|
2256
|
-
return /* @__PURE__ */
|
|
2257
|
-
|
|
2384
|
+
return /* @__PURE__ */ jsx64(
|
|
2385
|
+
Button5,
|
|
2258
2386
|
{
|
|
2259
|
-
className:
|
|
2387
|
+
className: cn34(
|
|
2260
2388
|
[
|
|
2261
2389
|
"flex items-center justify-center",
|
|
2262
2390
|
"cursor-pointer data-[disabled]:cursor-not-allowed"
|
|
@@ -2264,13 +2392,13 @@ var _StepButton = ({ direction, className, ...props }) => {
|
|
|
2264
2392
|
className
|
|
2265
2393
|
),
|
|
2266
2394
|
...props,
|
|
2267
|
-
children: /* @__PURE__ */
|
|
2395
|
+
children: /* @__PURE__ */ jsx64(Icon4, {})
|
|
2268
2396
|
}
|
|
2269
2397
|
);
|
|
2270
2398
|
};
|
|
2271
2399
|
|
|
2272
2400
|
// src/NumberField/NumberField.tsx
|
|
2273
|
-
import { jsx as
|
|
2401
|
+
import { jsx as jsx65, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2274
2402
|
var _NumberField = forwardRef16(
|
|
2275
2403
|
({
|
|
2276
2404
|
variant,
|
|
@@ -2282,7 +2410,7 @@ var _NumberField = forwardRef16(
|
|
|
2282
2410
|
hideStepper,
|
|
2283
2411
|
...rest
|
|
2284
2412
|
}, ref) => {
|
|
2285
|
-
const classNames2 =
|
|
2413
|
+
const classNames2 = useClassNames39({
|
|
2286
2414
|
component: "NumberField",
|
|
2287
2415
|
size,
|
|
2288
2416
|
variant
|
|
@@ -2295,8 +2423,8 @@ var _NumberField = forwardRef16(
|
|
|
2295
2423
|
...rest
|
|
2296
2424
|
};
|
|
2297
2425
|
const showStepper = !hideStepper;
|
|
2298
|
-
return /* @__PURE__ */
|
|
2299
|
-
showStepper && /* @__PURE__ */
|
|
2426
|
+
return /* @__PURE__ */ jsx65(FieldBase, { as: NumberField, ...props, children: /* @__PURE__ */ jsxs27(Group2, { className: cn35("flex items-stretch", classNames2.group), children: [
|
|
2427
|
+
showStepper && /* @__PURE__ */ jsx65(
|
|
2300
2428
|
_StepButton,
|
|
2301
2429
|
{
|
|
2302
2430
|
className: classNames2.stepper,
|
|
@@ -2304,7 +2432,7 @@ var _NumberField = forwardRef16(
|
|
|
2304
2432
|
slot: "decrement"
|
|
2305
2433
|
}
|
|
2306
2434
|
),
|
|
2307
|
-
/* @__PURE__ */
|
|
2435
|
+
/* @__PURE__ */ jsx65("div", { className: "flex-1", children: /* @__PURE__ */ jsx65(
|
|
2308
2436
|
_Input,
|
|
2309
2437
|
{
|
|
2310
2438
|
ref,
|
|
@@ -2313,7 +2441,7 @@ var _NumberField = forwardRef16(
|
|
|
2313
2441
|
className: classNames2.input
|
|
2314
2442
|
}
|
|
2315
2443
|
) }),
|
|
2316
|
-
showStepper && /* @__PURE__ */
|
|
2444
|
+
showStepper && /* @__PURE__ */ jsx65(
|
|
2317
2445
|
_StepButton,
|
|
2318
2446
|
{
|
|
2319
2447
|
className: classNames2.stepper,
|
|
@@ -2330,7 +2458,7 @@ import {
|
|
|
2330
2458
|
forwardRef as forwardRef17
|
|
2331
2459
|
} from "react";
|
|
2332
2460
|
import { Radio } from "react-aria-components";
|
|
2333
|
-
import { cn as
|
|
2461
|
+
import { cn as cn37, useClassNames as useClassNames41 } from "@marigold/system";
|
|
2334
2462
|
|
|
2335
2463
|
// src/Radio/Context.ts
|
|
2336
2464
|
import { createContext as createContext6, useContext as useContext12 } from "react";
|
|
@@ -2341,8 +2469,8 @@ var useRadioGroupContext = () => useContext12(RadioGroupContext);
|
|
|
2341
2469
|
|
|
2342
2470
|
// src/Radio/RadioGroup.tsx
|
|
2343
2471
|
import { RadioGroup } from "react-aria-components";
|
|
2344
|
-
import { cn as
|
|
2345
|
-
import { jsx as
|
|
2472
|
+
import { cn as cn36, useClassNames as useClassNames40 } from "@marigold/system";
|
|
2473
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
2346
2474
|
var _RadioGroup = ({
|
|
2347
2475
|
variant,
|
|
2348
2476
|
size,
|
|
@@ -2358,7 +2486,7 @@ var _RadioGroup = ({
|
|
|
2358
2486
|
width,
|
|
2359
2487
|
...rest
|
|
2360
2488
|
}) => {
|
|
2361
|
-
const classNames2 =
|
|
2489
|
+
const classNames2 = useClassNames40({ component: "Radio", variant, size });
|
|
2362
2490
|
const props = {
|
|
2363
2491
|
isDisabled: disabled,
|
|
2364
2492
|
isReadOnly: readOnly,
|
|
@@ -2366,7 +2494,7 @@ var _RadioGroup = ({
|
|
|
2366
2494
|
isInvalid: error,
|
|
2367
2495
|
...rest
|
|
2368
2496
|
};
|
|
2369
|
-
return /* @__PURE__ */
|
|
2497
|
+
return /* @__PURE__ */ jsx66(
|
|
2370
2498
|
FieldBase,
|
|
2371
2499
|
{
|
|
2372
2500
|
as: RadioGroup,
|
|
@@ -2377,18 +2505,18 @@ var _RadioGroup = ({
|
|
|
2377
2505
|
variant,
|
|
2378
2506
|
size,
|
|
2379
2507
|
...props,
|
|
2380
|
-
children: /* @__PURE__ */
|
|
2508
|
+
children: /* @__PURE__ */ jsx66(
|
|
2381
2509
|
"div",
|
|
2382
2510
|
{
|
|
2383
2511
|
role: "presentation",
|
|
2384
2512
|
"data-testid": "group",
|
|
2385
2513
|
"data-orientation": orientation,
|
|
2386
|
-
className:
|
|
2514
|
+
className: cn36(
|
|
2387
2515
|
classNames2.group,
|
|
2388
2516
|
"flex items-start",
|
|
2389
2517
|
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
2390
2518
|
),
|
|
2391
|
-
children: /* @__PURE__ */
|
|
2519
|
+
children: /* @__PURE__ */ jsx66(RadioGroupContext.Provider, { value: { width, variant, size }, children })
|
|
2392
2520
|
}
|
|
2393
2521
|
)
|
|
2394
2522
|
}
|
|
@@ -2396,33 +2524,33 @@ var _RadioGroup = ({
|
|
|
2396
2524
|
};
|
|
2397
2525
|
|
|
2398
2526
|
// src/Radio/Radio.tsx
|
|
2399
|
-
import { Fragment as
|
|
2400
|
-
var Dot = () => /* @__PURE__ */
|
|
2401
|
-
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */
|
|
2527
|
+
import { Fragment as Fragment7, jsx as jsx67, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2528
|
+
var Dot = () => /* @__PURE__ */ jsx67("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx67("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
2529
|
+
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx67(
|
|
2402
2530
|
"div",
|
|
2403
2531
|
{
|
|
2404
|
-
className:
|
|
2532
|
+
className: cn37(
|
|
2405
2533
|
"bg-secondary-50 flex h-4 w-4 items-center justify-center rounded-[50%] border p-1",
|
|
2406
2534
|
className
|
|
2407
2535
|
),
|
|
2408
2536
|
"aria-hidden": "true",
|
|
2409
2537
|
...props,
|
|
2410
|
-
children: checked ? /* @__PURE__ */
|
|
2538
|
+
children: checked ? /* @__PURE__ */ jsx67(Dot, {}) : null
|
|
2411
2539
|
}
|
|
2412
2540
|
);
|
|
2413
2541
|
var _Radio = forwardRef17(
|
|
2414
2542
|
({ value, disabled, width, children, ...props }, ref) => {
|
|
2415
2543
|
const { variant, size, width: groupWidth } = useRadioGroupContext();
|
|
2416
|
-
const classNames2 =
|
|
2544
|
+
const classNames2 = useClassNames41({
|
|
2417
2545
|
component: "Radio",
|
|
2418
2546
|
variant: variant || props.variant,
|
|
2419
2547
|
size: size || props.size
|
|
2420
2548
|
});
|
|
2421
|
-
return /* @__PURE__ */
|
|
2549
|
+
return /* @__PURE__ */ jsx67(
|
|
2422
2550
|
Radio,
|
|
2423
2551
|
{
|
|
2424
2552
|
ref,
|
|
2425
|
-
className:
|
|
2553
|
+
className: cn37(
|
|
2426
2554
|
"group/radio",
|
|
2427
2555
|
"relative flex items-center gap-[1ch]",
|
|
2428
2556
|
width || groupWidth || "w-full",
|
|
@@ -2431,18 +2559,18 @@ var _Radio = forwardRef17(
|
|
|
2431
2559
|
value,
|
|
2432
2560
|
isDisabled: disabled,
|
|
2433
2561
|
...props,
|
|
2434
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
2435
|
-
/* @__PURE__ */
|
|
2562
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs28(Fragment7, { children: [
|
|
2563
|
+
/* @__PURE__ */ jsx67(
|
|
2436
2564
|
Icon3,
|
|
2437
2565
|
{
|
|
2438
2566
|
checked: isSelected,
|
|
2439
|
-
className:
|
|
2567
|
+
className: cn37(
|
|
2440
2568
|
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
2441
2569
|
classNames2.radio
|
|
2442
2570
|
)
|
|
2443
2571
|
}
|
|
2444
2572
|
),
|
|
2445
|
-
/* @__PURE__ */
|
|
2573
|
+
/* @__PURE__ */ jsx67("div", { className: classNames2.label, children })
|
|
2446
2574
|
] })
|
|
2447
2575
|
}
|
|
2448
2576
|
);
|
|
@@ -2453,7 +2581,7 @@ _Radio.Group = _RadioGroup;
|
|
|
2453
2581
|
// src/SearchField/SearchField.tsx
|
|
2454
2582
|
import { forwardRef as forwardRef18 } from "react";
|
|
2455
2583
|
import { SearchField } from "react-aria-components";
|
|
2456
|
-
import { jsx as
|
|
2584
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
2457
2585
|
var _SearchField = forwardRef18(
|
|
2458
2586
|
({ disabled, required, readOnly, error, action, ...rest }, ref) => {
|
|
2459
2587
|
const props = {
|
|
@@ -2463,7 +2591,7 @@ var _SearchField = forwardRef18(
|
|
|
2463
2591
|
isReadOnly: readOnly,
|
|
2464
2592
|
isInvalid: error
|
|
2465
2593
|
};
|
|
2466
|
-
return /* @__PURE__ */
|
|
2594
|
+
return /* @__PURE__ */ jsx68(FieldBase, { as: SearchField, ...props, children: /* @__PURE__ */ jsx68(
|
|
2467
2595
|
SearchInput,
|
|
2468
2596
|
{
|
|
2469
2597
|
ref,
|
|
@@ -2476,12 +2604,12 @@ var _SearchField = forwardRef18(
|
|
|
2476
2604
|
// src/Select/Select.tsx
|
|
2477
2605
|
import { forwardRef as forwardRef19 } from "react";
|
|
2478
2606
|
import {
|
|
2479
|
-
Button as
|
|
2607
|
+
Button as Button6,
|
|
2480
2608
|
Select,
|
|
2481
2609
|
SelectValue
|
|
2482
2610
|
} from "react-aria-components";
|
|
2483
|
-
import { cn as
|
|
2484
|
-
import { jsx as
|
|
2611
|
+
import { cn as cn38, useClassNames as useClassNames42 } from "@marigold/system";
|
|
2612
|
+
import { jsx as jsx69, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2485
2613
|
var _Select = forwardRef19(
|
|
2486
2614
|
({
|
|
2487
2615
|
disabled,
|
|
@@ -2502,22 +2630,22 @@ var _Select = forwardRef19(
|
|
|
2502
2630
|
onSelectionChange: onChange,
|
|
2503
2631
|
...rest
|
|
2504
2632
|
};
|
|
2505
|
-
const classNames2 =
|
|
2506
|
-
return /* @__PURE__ */
|
|
2507
|
-
/* @__PURE__ */
|
|
2508
|
-
|
|
2633
|
+
const classNames2 = useClassNames42({ component: "Select", variant, size });
|
|
2634
|
+
return /* @__PURE__ */ jsxs29(FieldBase, { isOpen: true, as: Select, ref, ...props, children: [
|
|
2635
|
+
/* @__PURE__ */ jsxs29(
|
|
2636
|
+
Button6,
|
|
2509
2637
|
{
|
|
2510
|
-
className:
|
|
2638
|
+
className: cn38(
|
|
2511
2639
|
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
2512
2640
|
classNames2.select
|
|
2513
2641
|
),
|
|
2514
2642
|
children: [
|
|
2515
|
-
/* @__PURE__ */
|
|
2516
|
-
/* @__PURE__ */
|
|
2643
|
+
/* @__PURE__ */ jsx69(SelectValue, {}),
|
|
2644
|
+
/* @__PURE__ */ jsx69(ChevronDown, { className: "size-4" })
|
|
2517
2645
|
]
|
|
2518
2646
|
}
|
|
2519
2647
|
),
|
|
2520
|
-
/* @__PURE__ */
|
|
2648
|
+
/* @__PURE__ */ jsx69(_Popover, { children: /* @__PURE__ */ jsx69(_ListBox, { items, children: props.children }) })
|
|
2521
2649
|
] });
|
|
2522
2650
|
}
|
|
2523
2651
|
);
|
|
@@ -2525,18 +2653,18 @@ _Select.Option = _ListBox.Item;
|
|
|
2525
2653
|
_Select.Section = _ListBox.Section;
|
|
2526
2654
|
|
|
2527
2655
|
// src/Scrollable/Scrollable.tsx
|
|
2528
|
-
import { cn as
|
|
2529
|
-
import { jsx as
|
|
2656
|
+
import { cn as cn39, createVar as createVar10, width as twWidth2 } from "@marigold/system";
|
|
2657
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
2530
2658
|
var Scrollable = ({
|
|
2531
2659
|
children,
|
|
2532
2660
|
width = "full",
|
|
2533
2661
|
height,
|
|
2534
2662
|
...props
|
|
2535
|
-
}) => /* @__PURE__ */
|
|
2663
|
+
}) => /* @__PURE__ */ jsx70(
|
|
2536
2664
|
"div",
|
|
2537
2665
|
{
|
|
2538
2666
|
...props,
|
|
2539
|
-
className:
|
|
2667
|
+
className: cn39(["sticky h-[--height] overflow-auto", twWidth2[width]]),
|
|
2540
2668
|
style: createVar10({ height }),
|
|
2541
2669
|
children
|
|
2542
2670
|
}
|
|
@@ -2551,11 +2679,11 @@ import {
|
|
|
2551
2679
|
SliderTrack
|
|
2552
2680
|
} from "react-aria-components";
|
|
2553
2681
|
import {
|
|
2554
|
-
cn as
|
|
2682
|
+
cn as cn40,
|
|
2555
2683
|
width as twWidth3,
|
|
2556
|
-
useClassNames as
|
|
2684
|
+
useClassNames as useClassNames43
|
|
2557
2685
|
} from "@marigold/system";
|
|
2558
|
-
import { jsx as
|
|
2686
|
+
import { jsx as jsx71, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2559
2687
|
var _Slider = forwardRef20(
|
|
2560
2688
|
({
|
|
2561
2689
|
thumbLabels,
|
|
@@ -2565,7 +2693,7 @@ var _Slider = forwardRef20(
|
|
|
2565
2693
|
disabled,
|
|
2566
2694
|
...rest
|
|
2567
2695
|
}, ref) => {
|
|
2568
|
-
const classNames2 =
|
|
2696
|
+
const classNames2 = useClassNames43({
|
|
2569
2697
|
component: "Slider",
|
|
2570
2698
|
variant,
|
|
2571
2699
|
size
|
|
@@ -2574,10 +2702,10 @@ var _Slider = forwardRef20(
|
|
|
2574
2702
|
isDisabled: disabled,
|
|
2575
2703
|
...rest
|
|
2576
2704
|
};
|
|
2577
|
-
return /* @__PURE__ */
|
|
2705
|
+
return /* @__PURE__ */ jsxs30(
|
|
2578
2706
|
Slider,
|
|
2579
2707
|
{
|
|
2580
|
-
className:
|
|
2708
|
+
className: cn40(
|
|
2581
2709
|
"grid grid-cols-[auto_1fr] gap-y-1",
|
|
2582
2710
|
classNames2.container,
|
|
2583
2711
|
twWidth3[width]
|
|
@@ -2585,16 +2713,16 @@ var _Slider = forwardRef20(
|
|
|
2585
2713
|
ref,
|
|
2586
2714
|
...props,
|
|
2587
2715
|
children: [
|
|
2588
|
-
/* @__PURE__ */
|
|
2589
|
-
/* @__PURE__ */
|
|
2590
|
-
/* @__PURE__ */
|
|
2716
|
+
/* @__PURE__ */ jsx71(_Label, { children: props.children }),
|
|
2717
|
+
/* @__PURE__ */ jsx71(SliderOutput, { className: cn40("flex justify-end", classNames2.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
|
|
2718
|
+
/* @__PURE__ */ jsx71(
|
|
2591
2719
|
SliderTrack,
|
|
2592
2720
|
{
|
|
2593
|
-
className:
|
|
2594
|
-
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */
|
|
2721
|
+
className: cn40("relative col-span-2 h-2 w-full", classNames2.track),
|
|
2722
|
+
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */ jsx71(
|
|
2595
2723
|
SliderThumb,
|
|
2596
2724
|
{
|
|
2597
|
-
className:
|
|
2725
|
+
className: cn40("top-1/2 cursor-pointer", classNames2.thumb),
|
|
2598
2726
|
index: i,
|
|
2599
2727
|
"aria-label": thumbLabels == null ? void 0 : thumbLabels[i]
|
|
2600
2728
|
},
|
|
@@ -2609,16 +2737,16 @@ var _Slider = forwardRef20(
|
|
|
2609
2737
|
);
|
|
2610
2738
|
|
|
2611
2739
|
// src/Split/Split.tsx
|
|
2612
|
-
import { jsx as
|
|
2613
|
-
var Split = (props) => /* @__PURE__ */
|
|
2740
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
2741
|
+
var Split = (props) => /* @__PURE__ */ jsx72("div", { ...props, role: "separator", className: "grow" });
|
|
2614
2742
|
|
|
2615
2743
|
// src/Stack/Stack.tsx
|
|
2616
2744
|
import {
|
|
2617
2745
|
alignment as alignment3,
|
|
2618
|
-
cn as
|
|
2746
|
+
cn as cn41,
|
|
2619
2747
|
gapSpace as gapSpace6
|
|
2620
2748
|
} from "@marigold/system";
|
|
2621
|
-
import { jsx as
|
|
2749
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
2622
2750
|
var Stack = ({
|
|
2623
2751
|
children,
|
|
2624
2752
|
space = 0,
|
|
@@ -2629,10 +2757,10 @@ var Stack = ({
|
|
|
2629
2757
|
...props
|
|
2630
2758
|
}) => {
|
|
2631
2759
|
var _a, _b, _c, _d;
|
|
2632
|
-
return /* @__PURE__ */
|
|
2760
|
+
return /* @__PURE__ */ jsx73(
|
|
2633
2761
|
"div",
|
|
2634
2762
|
{
|
|
2635
|
-
className:
|
|
2763
|
+
className: cn41(
|
|
2636
2764
|
"flex flex-col",
|
|
2637
2765
|
gapSpace6[space],
|
|
2638
2766
|
alignX && ((_b = (_a = alignment3) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
|
|
@@ -2649,11 +2777,11 @@ var Stack = ({
|
|
|
2649
2777
|
import { forwardRef as forwardRef21 } from "react";
|
|
2650
2778
|
import { Switch } from "react-aria-components";
|
|
2651
2779
|
import {
|
|
2652
|
-
cn as
|
|
2780
|
+
cn as cn42,
|
|
2653
2781
|
width as twWidth4,
|
|
2654
|
-
useClassNames as
|
|
2782
|
+
useClassNames as useClassNames44
|
|
2655
2783
|
} from "@marigold/system";
|
|
2656
|
-
import { jsx as
|
|
2784
|
+
import { jsx as jsx74, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2657
2785
|
var _Switch = forwardRef21(
|
|
2658
2786
|
({
|
|
2659
2787
|
variant,
|
|
@@ -2665,37 +2793,37 @@ var _Switch = forwardRef21(
|
|
|
2665
2793
|
readOnly,
|
|
2666
2794
|
...rest
|
|
2667
2795
|
}, ref) => {
|
|
2668
|
-
const classNames2 =
|
|
2796
|
+
const classNames2 = useClassNames44({ component: "Switch", size, variant });
|
|
2669
2797
|
const props = {
|
|
2670
2798
|
isDisabled: disabled,
|
|
2671
2799
|
isReadOnly: readOnly,
|
|
2672
2800
|
isSelected: selected,
|
|
2673
2801
|
...rest
|
|
2674
2802
|
};
|
|
2675
|
-
return /* @__PURE__ */
|
|
2803
|
+
return /* @__PURE__ */ jsxs31(
|
|
2676
2804
|
Switch,
|
|
2677
2805
|
{
|
|
2678
2806
|
...props,
|
|
2679
2807
|
ref,
|
|
2680
|
-
className:
|
|
2808
|
+
className: cn42(
|
|
2681
2809
|
twWidth4[width],
|
|
2682
2810
|
"group/switch",
|
|
2683
2811
|
"flex items-center gap-[1ch]",
|
|
2684
2812
|
classNames2.container
|
|
2685
2813
|
),
|
|
2686
2814
|
children: [
|
|
2687
|
-
/* @__PURE__ */
|
|
2688
|
-
/* @__PURE__ */
|
|
2815
|
+
/* @__PURE__ */ jsx74(_Label, { elementType: "span", children }),
|
|
2816
|
+
/* @__PURE__ */ jsx74("div", { className: "relative", children: /* @__PURE__ */ jsx74(
|
|
2689
2817
|
"div",
|
|
2690
2818
|
{
|
|
2691
|
-
className:
|
|
2819
|
+
className: cn42(
|
|
2692
2820
|
"h-6 w-12 basis-12 rounded-3xl group-disabled/switch:cursor-not-allowed ",
|
|
2693
2821
|
classNames2.track
|
|
2694
2822
|
),
|
|
2695
|
-
children: /* @__PURE__ */
|
|
2823
|
+
children: /* @__PURE__ */ jsx74(
|
|
2696
2824
|
"div",
|
|
2697
2825
|
{
|
|
2698
|
-
className:
|
|
2826
|
+
className: cn42(
|
|
2699
2827
|
"h-[22px] w-[22px]",
|
|
2700
2828
|
"cubic-bezier(.7,0,.3,1)",
|
|
2701
2829
|
"absolute left-0 top-px",
|
|
@@ -2724,7 +2852,7 @@ import {
|
|
|
2724
2852
|
Row,
|
|
2725
2853
|
useTableState
|
|
2726
2854
|
} from "@react-stately/table";
|
|
2727
|
-
import { cn as
|
|
2855
|
+
import { cn as cn48, useClassNames as useClassNames46 } from "@marigold/system";
|
|
2728
2856
|
|
|
2729
2857
|
// src/Table/Context.tsx
|
|
2730
2858
|
import { createContext as createContext7, useContext as useContext13 } from "react";
|
|
@@ -2733,10 +2861,10 @@ var useTableContext = () => useContext13(TableContext);
|
|
|
2733
2861
|
|
|
2734
2862
|
// src/Table/TableBody.tsx
|
|
2735
2863
|
import { useTableRowGroup } from "@react-aria/table";
|
|
2736
|
-
import { jsx as
|
|
2864
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
2737
2865
|
var TableBody = ({ children }) => {
|
|
2738
2866
|
const { rowGroupProps } = useTableRowGroup();
|
|
2739
|
-
return /* @__PURE__ */
|
|
2867
|
+
return /* @__PURE__ */ jsx75("tbody", { ...rowGroupProps, children });
|
|
2740
2868
|
};
|
|
2741
2869
|
|
|
2742
2870
|
// src/Table/TableCell.tsx
|
|
@@ -2744,8 +2872,8 @@ import { useRef as useRef4 } from "react";
|
|
|
2744
2872
|
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
2745
2873
|
import { useTableCell } from "@react-aria/table";
|
|
2746
2874
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
|
2747
|
-
import { cn as
|
|
2748
|
-
import { jsx as
|
|
2875
|
+
import { cn as cn43, useStateProps as useStateProps2 } from "@marigold/system";
|
|
2876
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
2749
2877
|
var TableCell = ({ cell, align = "left" }) => {
|
|
2750
2878
|
const ref = useRef4(null);
|
|
2751
2879
|
const { interactive, state, classNames: classNames2 } = useTableContext();
|
|
@@ -2768,11 +2896,11 @@ var TableCell = ({ cell, align = "left" }) => {
|
|
|
2768
2896
|
};
|
|
2769
2897
|
const { focusProps, isFocusVisible } = useFocusRing2();
|
|
2770
2898
|
const stateProps = useStateProps2({ disabled, focusVisible: isFocusVisible });
|
|
2771
|
-
return /* @__PURE__ */
|
|
2899
|
+
return /* @__PURE__ */ jsx76(
|
|
2772
2900
|
"td",
|
|
2773
2901
|
{
|
|
2774
2902
|
ref,
|
|
2775
|
-
className:
|
|
2903
|
+
className: cn43(classNames2 == null ? void 0 : classNames2.cell),
|
|
2776
2904
|
...mergeProps3(cellProps, focusProps),
|
|
2777
2905
|
...stateProps,
|
|
2778
2906
|
align,
|
|
@@ -2786,7 +2914,7 @@ import { useRef as useRef5 } from "react";
|
|
|
2786
2914
|
import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
2787
2915
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
2788
2916
|
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
2789
|
-
import { cn as
|
|
2917
|
+
import { cn as cn44, useStateProps as useStateProps3 } from "@marigold/system";
|
|
2790
2918
|
|
|
2791
2919
|
// src/Table/utils.ts
|
|
2792
2920
|
var mapCheckboxProps = ({
|
|
@@ -2809,7 +2937,7 @@ var mapCheckboxProps = ({
|
|
|
2809
2937
|
};
|
|
2810
2938
|
|
|
2811
2939
|
// src/Table/TableCheckboxCell.tsx
|
|
2812
|
-
import { jsx as
|
|
2940
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
2813
2941
|
var TableCheckboxCell = ({ cell }) => {
|
|
2814
2942
|
const ref = useRef5(null);
|
|
2815
2943
|
const { state, classNames: classNames2 } = useTableContext();
|
|
@@ -2826,14 +2954,14 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
2826
2954
|
);
|
|
2827
2955
|
const { focusProps, isFocusVisible } = useFocusRing3();
|
|
2828
2956
|
const stateProps = useStateProps3({ disabled, focusVisible: isFocusVisible });
|
|
2829
|
-
return /* @__PURE__ */
|
|
2957
|
+
return /* @__PURE__ */ jsx77(
|
|
2830
2958
|
"td",
|
|
2831
2959
|
{
|
|
2832
2960
|
ref,
|
|
2833
|
-
className:
|
|
2961
|
+
className: cn44("text-center align-middle leading-none", classNames2 == null ? void 0 : classNames2.cell),
|
|
2834
2962
|
...mergeProps4(gridCellProps, focusProps),
|
|
2835
2963
|
...stateProps,
|
|
2836
|
-
children: /* @__PURE__ */
|
|
2964
|
+
children: /* @__PURE__ */ jsx77(_Checkbox, { ...checkboxProps })
|
|
2837
2965
|
}
|
|
2838
2966
|
);
|
|
2839
2967
|
};
|
|
@@ -2845,9 +2973,9 @@ import { useHover } from "@react-aria/interactions";
|
|
|
2845
2973
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
2846
2974
|
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
2847
2975
|
import { SortDown, SortUp } from "@marigold/icons";
|
|
2848
|
-
import { cn as
|
|
2976
|
+
import { cn as cn45, useStateProps as useStateProps4 } from "@marigold/system";
|
|
2849
2977
|
import { width as twWidth5 } from "@marigold/system";
|
|
2850
|
-
import { jsx as
|
|
2978
|
+
import { jsx as jsx78, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2851
2979
|
var TableColumnHeader = ({
|
|
2852
2980
|
column,
|
|
2853
2981
|
width = "auto",
|
|
@@ -2869,18 +2997,18 @@ var TableColumnHeader = ({
|
|
|
2869
2997
|
hover: isHovered,
|
|
2870
2998
|
focusVisible: isFocusVisible
|
|
2871
2999
|
});
|
|
2872
|
-
return /* @__PURE__ */
|
|
3000
|
+
return /* @__PURE__ */ jsxs32(
|
|
2873
3001
|
"th",
|
|
2874
3002
|
{
|
|
2875
3003
|
colSpan: column.colspan,
|
|
2876
3004
|
ref,
|
|
2877
|
-
className:
|
|
3005
|
+
className: cn45("cursor-default", twWidth5[width], classNames2 == null ? void 0 : classNames2.header),
|
|
2878
3006
|
...mergeProps5(columnHeaderProps, hoverProps, focusProps),
|
|
2879
3007
|
...stateProps,
|
|
2880
3008
|
align,
|
|
2881
3009
|
children: [
|
|
2882
3010
|
column.rendered,
|
|
2883
|
-
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */
|
|
3011
|
+
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx78(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx78(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx78(SortDown, { className: "inline-block" }))
|
|
2884
3012
|
]
|
|
2885
3013
|
}
|
|
2886
3014
|
);
|
|
@@ -2888,10 +3016,10 @@ var TableColumnHeader = ({
|
|
|
2888
3016
|
|
|
2889
3017
|
// src/Table/TableHeader.tsx
|
|
2890
3018
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
2891
|
-
import { jsx as
|
|
3019
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
2892
3020
|
var TableHeader = ({ stickyHeader, children }) => {
|
|
2893
3021
|
const { rowGroupProps } = useTableRowGroup2();
|
|
2894
|
-
return /* @__PURE__ */
|
|
3022
|
+
return /* @__PURE__ */ jsx79(
|
|
2895
3023
|
"thead",
|
|
2896
3024
|
{
|
|
2897
3025
|
...rowGroupProps,
|
|
@@ -2904,12 +3032,12 @@ var TableHeader = ({ stickyHeader, children }) => {
|
|
|
2904
3032
|
// src/Table/TableHeaderRow.tsx
|
|
2905
3033
|
import { useRef as useRef7 } from "react";
|
|
2906
3034
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
2907
|
-
import { jsx as
|
|
3035
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
2908
3036
|
var TableHeaderRow = ({ item, children }) => {
|
|
2909
3037
|
const { state } = useTableContext();
|
|
2910
3038
|
const ref = useRef7(null);
|
|
2911
3039
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
2912
|
-
return /* @__PURE__ */
|
|
3040
|
+
return /* @__PURE__ */ jsx80("tr", { ...rowProps, ref, children });
|
|
2913
3041
|
};
|
|
2914
3042
|
|
|
2915
3043
|
// src/Table/TableRow.tsx
|
|
@@ -2918,13 +3046,13 @@ import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
|
2918
3046
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
2919
3047
|
import { useTableRow } from "@react-aria/table";
|
|
2920
3048
|
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
2921
|
-
import { cn as
|
|
2922
|
-
import { jsx as
|
|
3049
|
+
import { cn as cn46, useClassNames as useClassNames45, useStateProps as useStateProps5 } from "@marigold/system";
|
|
3050
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
2923
3051
|
var TableRow = ({ children, row }) => {
|
|
2924
3052
|
const ref = useRef8(null);
|
|
2925
3053
|
const { interactive, state, ...ctx } = useTableContext();
|
|
2926
3054
|
const { variant, size } = row.props;
|
|
2927
|
-
const classNames2 =
|
|
3055
|
+
const classNames2 = useClassNames45({
|
|
2928
3056
|
component: "Table",
|
|
2929
3057
|
variant: variant || ctx.variant,
|
|
2930
3058
|
size: size || ctx.size
|
|
@@ -2949,11 +3077,11 @@ var TableRow = ({ children, row }) => {
|
|
|
2949
3077
|
focusVisible: isFocusVisible,
|
|
2950
3078
|
active: isPressed
|
|
2951
3079
|
});
|
|
2952
|
-
return /* @__PURE__ */
|
|
3080
|
+
return /* @__PURE__ */ jsx81(
|
|
2953
3081
|
"tr",
|
|
2954
3082
|
{
|
|
2955
3083
|
ref,
|
|
2956
|
-
className:
|
|
3084
|
+
className: cn46(
|
|
2957
3085
|
[
|
|
2958
3086
|
!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
|
|
2959
3087
|
],
|
|
@@ -2976,11 +3104,11 @@ import {
|
|
|
2976
3104
|
} from "@react-aria/table";
|
|
2977
3105
|
import { mergeProps as mergeProps7 } from "@react-aria/utils";
|
|
2978
3106
|
import {
|
|
2979
|
-
cn as
|
|
3107
|
+
cn as cn47,
|
|
2980
3108
|
width as twWidth6,
|
|
2981
3109
|
useStateProps as useStateProps6
|
|
2982
3110
|
} from "@marigold/system";
|
|
2983
|
-
import { jsx as
|
|
3111
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
2984
3112
|
var TableSelectAllCell = ({
|
|
2985
3113
|
column,
|
|
2986
3114
|
width = "auto",
|
|
@@ -3002,21 +3130,21 @@ var TableSelectAllCell = ({
|
|
|
3002
3130
|
hover: isHovered,
|
|
3003
3131
|
focusVisible: isFocusVisible
|
|
3004
3132
|
});
|
|
3005
|
-
return /* @__PURE__ */
|
|
3133
|
+
return /* @__PURE__ */ jsx82(
|
|
3006
3134
|
"th",
|
|
3007
3135
|
{
|
|
3008
3136
|
ref,
|
|
3009
|
-
className:
|
|
3137
|
+
className: cn47(twWidth6[width], [" leading-none"], classNames2 == null ? void 0 : classNames2.header),
|
|
3010
3138
|
...mergeProps7(columnHeaderProps, hoverProps, focusProps),
|
|
3011
3139
|
...stateProps,
|
|
3012
3140
|
align,
|
|
3013
|
-
children: /* @__PURE__ */
|
|
3141
|
+
children: /* @__PURE__ */ jsx82(_Checkbox, { ...checkboxProps })
|
|
3014
3142
|
}
|
|
3015
3143
|
);
|
|
3016
3144
|
};
|
|
3017
3145
|
|
|
3018
3146
|
// src/Table/Table.tsx
|
|
3019
|
-
import { jsx as
|
|
3147
|
+
import { jsx as jsx83, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3020
3148
|
var Table = ({
|
|
3021
3149
|
variant,
|
|
3022
3150
|
size,
|
|
@@ -3034,21 +3162,21 @@ var Table = ({
|
|
|
3034
3162
|
props.selectionBehavior !== "replace"
|
|
3035
3163
|
});
|
|
3036
3164
|
const { gridProps } = useTable(props, state, tableRef);
|
|
3037
|
-
const classNames2 =
|
|
3165
|
+
const classNames2 = useClassNames46({
|
|
3038
3166
|
component: "Table",
|
|
3039
3167
|
variant,
|
|
3040
3168
|
size
|
|
3041
3169
|
});
|
|
3042
3170
|
const { collection } = state;
|
|
3043
|
-
return /* @__PURE__ */
|
|
3171
|
+
return /* @__PURE__ */ jsx83(
|
|
3044
3172
|
TableContext.Provider,
|
|
3045
3173
|
{
|
|
3046
3174
|
value: { state, interactive, classNames: classNames2, variant, size },
|
|
3047
|
-
children: /* @__PURE__ */
|
|
3175
|
+
children: /* @__PURE__ */ jsxs33(
|
|
3048
3176
|
"table",
|
|
3049
3177
|
{
|
|
3050
3178
|
ref: tableRef,
|
|
3051
|
-
className:
|
|
3179
|
+
className: cn48(
|
|
3052
3180
|
"group/table",
|
|
3053
3181
|
"border-collapse whitespace-nowrap",
|
|
3054
3182
|
stretch ? "table w-full" : "block",
|
|
@@ -3056,10 +3184,10 @@ var Table = ({
|
|
|
3056
3184
|
),
|
|
3057
3185
|
...gridProps,
|
|
3058
3186
|
children: [
|
|
3059
|
-
/* @__PURE__ */
|
|
3187
|
+
/* @__PURE__ */ jsx83(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx83(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
|
|
3060
3188
|
(column) => {
|
|
3061
3189
|
var _a, _b, _c, _d, _e;
|
|
3062
|
-
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3190
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx83(
|
|
3063
3191
|
TableSelectAllCell,
|
|
3064
3192
|
{
|
|
3065
3193
|
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
@@ -3067,7 +3195,7 @@ var Table = ({
|
|
|
3067
3195
|
align: (_c = column.props) == null ? void 0 : _c.align
|
|
3068
3196
|
},
|
|
3069
3197
|
column.key
|
|
3070
|
-
) : /* @__PURE__ */
|
|
3198
|
+
) : /* @__PURE__ */ jsx83(
|
|
3071
3199
|
TableColumnHeader,
|
|
3072
3200
|
{
|
|
3073
3201
|
width: (_d = column.props) == null ? void 0 : _d.width,
|
|
@@ -3078,12 +3206,12 @@ var Table = ({
|
|
|
3078
3206
|
);
|
|
3079
3207
|
}
|
|
3080
3208
|
) }, headerRow.key)) }),
|
|
3081
|
-
/* @__PURE__ */
|
|
3209
|
+
/* @__PURE__ */ jsxs33(TableBody, { children: [
|
|
3082
3210
|
...collection.rows.map(
|
|
3083
|
-
(row) => row.type === "item" && /* @__PURE__ */
|
|
3211
|
+
(row) => row.type === "item" && /* @__PURE__ */ jsx83(TableRow, { row, children: [...collection.getChildren(row.key)].map((cell, index) => {
|
|
3084
3212
|
var _a, _b;
|
|
3085
3213
|
const currentColumn = collection.columns[index];
|
|
3086
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3214
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx83(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ jsx83(
|
|
3087
3215
|
TableCell,
|
|
3088
3216
|
{
|
|
3089
3217
|
align: (_b = currentColumn.props) == null ? void 0 : _b.align,
|
|
@@ -3108,7 +3236,7 @@ Table.Row = Row;
|
|
|
3108
3236
|
|
|
3109
3237
|
// src/Text/Text.tsx
|
|
3110
3238
|
import {
|
|
3111
|
-
cn as
|
|
3239
|
+
cn as cn49,
|
|
3112
3240
|
createVar as createVar11,
|
|
3113
3241
|
cursorStyle,
|
|
3114
3242
|
fontWeight,
|
|
@@ -3116,10 +3244,10 @@ import {
|
|
|
3116
3244
|
textAlign as textAlign2,
|
|
3117
3245
|
textSize,
|
|
3118
3246
|
textStyle,
|
|
3119
|
-
useClassNames as
|
|
3247
|
+
useClassNames as useClassNames47,
|
|
3120
3248
|
useTheme as useTheme3
|
|
3121
3249
|
} from "@marigold/system";
|
|
3122
|
-
import { jsx as
|
|
3250
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
3123
3251
|
var Text2 = ({
|
|
3124
3252
|
variant,
|
|
3125
3253
|
size,
|
|
@@ -3133,16 +3261,16 @@ var Text2 = ({
|
|
|
3133
3261
|
...props
|
|
3134
3262
|
}) => {
|
|
3135
3263
|
const theme = useTheme3();
|
|
3136
|
-
const classNames2 =
|
|
3264
|
+
const classNames2 = useClassNames47({
|
|
3137
3265
|
component: "Text",
|
|
3138
3266
|
variant,
|
|
3139
3267
|
size
|
|
3140
3268
|
});
|
|
3141
|
-
return /* @__PURE__ */
|
|
3269
|
+
return /* @__PURE__ */ jsx84(
|
|
3142
3270
|
"p",
|
|
3143
3271
|
{
|
|
3144
3272
|
...props,
|
|
3145
|
-
className:
|
|
3273
|
+
className: cn49(
|
|
3146
3274
|
"text-[--color] outline-[--outline]",
|
|
3147
3275
|
classNames2,
|
|
3148
3276
|
fontStyle && textStyle[fontStyle],
|
|
@@ -3167,8 +3295,8 @@ var Text2 = ({
|
|
|
3167
3295
|
// src/TextArea/TextArea.tsx
|
|
3168
3296
|
import { forwardRef as forwardRef22 } from "react";
|
|
3169
3297
|
import { TextArea, TextField } from "react-aria-components";
|
|
3170
|
-
import { useClassNames as
|
|
3171
|
-
import { jsx as
|
|
3298
|
+
import { useClassNames as useClassNames48 } from "@marigold/system";
|
|
3299
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
3172
3300
|
var _TextArea = forwardRef22(
|
|
3173
3301
|
({
|
|
3174
3302
|
variant,
|
|
@@ -3180,7 +3308,7 @@ var _TextArea = forwardRef22(
|
|
|
3180
3308
|
rows,
|
|
3181
3309
|
...rest
|
|
3182
3310
|
}, ref) => {
|
|
3183
|
-
const classNames2 =
|
|
3311
|
+
const classNames2 = useClassNames48({ component: "TextArea", variant, size });
|
|
3184
3312
|
const props = {
|
|
3185
3313
|
isDisabled: disabled,
|
|
3186
3314
|
isReadOnly: readOnly,
|
|
@@ -3188,14 +3316,14 @@ var _TextArea = forwardRef22(
|
|
|
3188
3316
|
isRequired: required,
|
|
3189
3317
|
...rest
|
|
3190
3318
|
};
|
|
3191
|
-
return /* @__PURE__ */
|
|
3319
|
+
return /* @__PURE__ */ jsx85(FieldBase, { as: TextField, ...props, variant, size, children: /* @__PURE__ */ jsx85(TextArea, { className: classNames2, ref, rows }) });
|
|
3192
3320
|
}
|
|
3193
3321
|
);
|
|
3194
3322
|
|
|
3195
3323
|
// src/TextField/TextField.tsx
|
|
3196
3324
|
import { forwardRef as forwardRef23 } from "react";
|
|
3197
3325
|
import { TextField as TextField2 } from "react-aria-components";
|
|
3198
|
-
import { jsx as
|
|
3326
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
3199
3327
|
var _TextField = forwardRef23(
|
|
3200
3328
|
({
|
|
3201
3329
|
variant,
|
|
@@ -3213,13 +3341,13 @@ var _TextField = forwardRef23(
|
|
|
3213
3341
|
isRequired: required,
|
|
3214
3342
|
...rest
|
|
3215
3343
|
};
|
|
3216
|
-
return /* @__PURE__ */
|
|
3344
|
+
return /* @__PURE__ */ jsx86(FieldBase, { as: TextField2, ...props, children: /* @__PURE__ */ jsx86(_Input, { ref }) });
|
|
3217
3345
|
}
|
|
3218
3346
|
);
|
|
3219
3347
|
|
|
3220
3348
|
// src/Tiles/Tiles.tsx
|
|
3221
|
-
import { cn as
|
|
3222
|
-
import { jsx as
|
|
3349
|
+
import { cn as cn50, createVar as createVar12, gapSpace as gapSpace7 } from "@marigold/system";
|
|
3350
|
+
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
3223
3351
|
var Tiles = ({
|
|
3224
3352
|
space = 0,
|
|
3225
3353
|
stretch = false,
|
|
@@ -3232,11 +3360,11 @@ var Tiles = ({
|
|
|
3232
3360
|
if (stretch) {
|
|
3233
3361
|
column = `minmax(${column}, 1fr)`;
|
|
3234
3362
|
}
|
|
3235
|
-
return /* @__PURE__ */
|
|
3363
|
+
return /* @__PURE__ */ jsx87(
|
|
3236
3364
|
"div",
|
|
3237
3365
|
{
|
|
3238
3366
|
...props,
|
|
3239
|
-
className:
|
|
3367
|
+
className: cn50(
|
|
3240
3368
|
"grid",
|
|
3241
3369
|
gapSpace7[space],
|
|
3242
3370
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
@@ -3250,11 +3378,11 @@ var Tiles = ({
|
|
|
3250
3378
|
|
|
3251
3379
|
// src/Tooltip/Tooltip.tsx
|
|
3252
3380
|
import { OverlayArrow, Tooltip } from "react-aria-components";
|
|
3253
|
-
import { cn as
|
|
3381
|
+
import { cn as cn51, useClassNames as useClassNames49 } from "@marigold/system";
|
|
3254
3382
|
|
|
3255
3383
|
// src/Tooltip/TooltipTrigger.tsx
|
|
3256
3384
|
import { TooltipTrigger } from "react-aria-components";
|
|
3257
|
-
import { jsx as
|
|
3385
|
+
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
3258
3386
|
var _TooltipTrigger = ({
|
|
3259
3387
|
delay = 1e3,
|
|
3260
3388
|
children,
|
|
@@ -3268,72 +3396,32 @@ var _TooltipTrigger = ({
|
|
|
3268
3396
|
isOpen: open,
|
|
3269
3397
|
delay
|
|
3270
3398
|
};
|
|
3271
|
-
return /* @__PURE__ */
|
|
3399
|
+
return /* @__PURE__ */ jsx88(TooltipTrigger, { ...props, children });
|
|
3272
3400
|
};
|
|
3273
3401
|
|
|
3274
3402
|
// src/Tooltip/Tooltip.tsx
|
|
3275
|
-
import { jsx as
|
|
3403
|
+
import { jsx as jsx89, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3276
3404
|
var _Tooltip = ({ children, variant, size, open, ...rest }) => {
|
|
3277
3405
|
const props = {
|
|
3278
3406
|
...rest,
|
|
3279
3407
|
isOpen: open
|
|
3280
3408
|
};
|
|
3281
|
-
const classNames2 =
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
] });
|
|
3286
|
-
};
|
|
3287
|
-
_Tooltip.Trigger = _TooltipTrigger;
|
|
3288
|
-
|
|
3289
|
-
// src/TagGroup/Tag.tsx
|
|
3290
|
-
import { Button as Button6, Tag } from "react-aria-components";
|
|
3291
|
-
import { cn as cn50, useClassNames as useClassNames49 } from "@marigold/system";
|
|
3292
|
-
|
|
3293
|
-
// src/TagGroup/TagGroup.tsx
|
|
3294
|
-
import { TagGroup, TagList } from "react-aria-components";
|
|
3295
|
-
import { useClassNames as useClassNames48 } from "@marigold/system";
|
|
3296
|
-
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
3297
|
-
var _TagGroup = ({
|
|
3298
|
-
width,
|
|
3299
|
-
items,
|
|
3300
|
-
children,
|
|
3301
|
-
renderEmptyState,
|
|
3302
|
-
variant,
|
|
3303
|
-
size,
|
|
3304
|
-
...rest
|
|
3305
|
-
}) => {
|
|
3306
|
-
const classNames2 = useClassNames48({ component: "Tag", variant, size });
|
|
3307
|
-
return /* @__PURE__ */ jsx87(FieldBase, { as: TagGroup, ...rest, children: /* @__PURE__ */ jsx87(
|
|
3308
|
-
TagList,
|
|
3409
|
+
const classNames2 = useClassNames49({ component: "Tooltip", variant, size });
|
|
3410
|
+
const portal = usePortalContainer();
|
|
3411
|
+
return /* @__PURE__ */ jsxs34(
|
|
3412
|
+
Tooltip,
|
|
3309
3413
|
{
|
|
3310
|
-
|
|
3311
|
-
className: classNames2.
|
|
3312
|
-
|
|
3313
|
-
children
|
|
3414
|
+
...props,
|
|
3415
|
+
className: cn51("group/tooltip", classNames2.container),
|
|
3416
|
+
UNSTABLE_portalContainer: portal,
|
|
3417
|
+
children: [
|
|
3418
|
+
/* @__PURE__ */ jsx89(OverlayArrow, { className: classNames2.arrow, children: /* @__PURE__ */ jsx89("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx89("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
3419
|
+
children
|
|
3420
|
+
]
|
|
3314
3421
|
}
|
|
3315
|
-
)
|
|
3316
|
-
};
|
|
3317
|
-
|
|
3318
|
-
// src/TagGroup/Tag.tsx
|
|
3319
|
-
import { Fragment as Fragment7, jsx as jsx88, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3320
|
-
var CloseButton2 = ({ className }) => {
|
|
3321
|
-
return /* @__PURE__ */ jsx88(Button6, { slot: "remove", className, children: /* @__PURE__ */ jsx88("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx88("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" }) }) });
|
|
3322
|
-
};
|
|
3323
|
-
var _Tag = ({ variant, size, children, ...props }) => {
|
|
3324
|
-
let textValue = typeof children === "string" ? children : void 0;
|
|
3325
|
-
const classNames2 = useClassNames49({ component: "Tag", variant, size });
|
|
3326
|
-
return /* @__PURE__ */ jsx88(Tag, { textValue, ...props, className: classNames2.tag, children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs33(Fragment7, { children: [
|
|
3327
|
-
children,
|
|
3328
|
-
allowsRemoving && /* @__PURE__ */ jsx88(
|
|
3329
|
-
CloseButton2,
|
|
3330
|
-
{
|
|
3331
|
-
className: cn50("flex items-center", classNames2.closeButton)
|
|
3332
|
-
}
|
|
3333
|
-
)
|
|
3334
|
-
] }) });
|
|
3422
|
+
);
|
|
3335
3423
|
};
|
|
3336
|
-
|
|
3424
|
+
_Tooltip.Trigger = _TooltipTrigger;
|
|
3337
3425
|
|
|
3338
3426
|
// src/VisuallyHidden/VisuallyHidden.tsx
|
|
3339
3427
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
@@ -3341,8 +3429,8 @@ import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
|
3341
3429
|
// src/XLoader/XLoader.tsx
|
|
3342
3430
|
import { forwardRef as forwardRef24 } from "react";
|
|
3343
3431
|
import { SVG as SVG5 } from "@marigold/system";
|
|
3344
|
-
import { jsx as
|
|
3345
|
-
var XLoader = forwardRef24((props, ref) => /* @__PURE__ */
|
|
3432
|
+
import { jsx as jsx90, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3433
|
+
var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs35(
|
|
3346
3434
|
SVG5,
|
|
3347
3435
|
{
|
|
3348
3436
|
id: "XLoader",
|
|
@@ -3352,13 +3440,13 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs34(
|
|
|
3352
3440
|
...props,
|
|
3353
3441
|
...ref,
|
|
3354
3442
|
children: [
|
|
3355
|
-
/* @__PURE__ */
|
|
3356
|
-
/* @__PURE__ */
|
|
3443
|
+
/* @__PURE__ */ jsx90("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
3444
|
+
/* @__PURE__ */ jsx90(
|
|
3357
3445
|
"path",
|
|
3358
3446
|
{
|
|
3359
3447
|
id: "XMLID_5_",
|
|
3360
3448
|
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",
|
|
3361
|
-
children: /* @__PURE__ */
|
|
3449
|
+
children: /* @__PURE__ */ jsx90(
|
|
3362
3450
|
"animate",
|
|
3363
3451
|
{
|
|
3364
3452
|
attributeName: "opacity",
|
|
@@ -3371,12 +3459,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs34(
|
|
|
3371
3459
|
)
|
|
3372
3460
|
}
|
|
3373
3461
|
),
|
|
3374
|
-
/* @__PURE__ */
|
|
3462
|
+
/* @__PURE__ */ jsx90(
|
|
3375
3463
|
"path",
|
|
3376
3464
|
{
|
|
3377
3465
|
id: "XMLID_18_",
|
|
3378
3466
|
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",
|
|
3379
|
-
children: /* @__PURE__ */
|
|
3467
|
+
children: /* @__PURE__ */ jsx90(
|
|
3380
3468
|
"animate",
|
|
3381
3469
|
{
|
|
3382
3470
|
attributeName: "opacity",
|
|
@@ -3389,12 +3477,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs34(
|
|
|
3389
3477
|
)
|
|
3390
3478
|
}
|
|
3391
3479
|
),
|
|
3392
|
-
/* @__PURE__ */
|
|
3480
|
+
/* @__PURE__ */ jsx90(
|
|
3393
3481
|
"path",
|
|
3394
3482
|
{
|
|
3395
3483
|
id: "XMLID_19_",
|
|
3396
3484
|
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",
|
|
3397
|
-
children: /* @__PURE__ */
|
|
3485
|
+
children: /* @__PURE__ */ jsx90(
|
|
3398
3486
|
"animate",
|
|
3399
3487
|
{
|
|
3400
3488
|
attributeName: "opacity",
|
|
@@ -3407,12 +3495,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs34(
|
|
|
3407
3495
|
)
|
|
3408
3496
|
}
|
|
3409
3497
|
),
|
|
3410
|
-
/* @__PURE__ */
|
|
3498
|
+
/* @__PURE__ */ jsx90(
|
|
3411
3499
|
"path",
|
|
3412
3500
|
{
|
|
3413
3501
|
id: "XMLID_20_",
|
|
3414
3502
|
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",
|
|
3415
|
-
children: /* @__PURE__ */
|
|
3503
|
+
children: /* @__PURE__ */ jsx90(
|
|
3416
3504
|
"animate",
|
|
3417
3505
|
{
|
|
3418
3506
|
attributeName: "opacity",
|
|
@@ -3425,12 +3513,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs34(
|
|
|
3425
3513
|
)
|
|
3426
3514
|
}
|
|
3427
3515
|
),
|
|
3428
|
-
/* @__PURE__ */
|
|
3516
|
+
/* @__PURE__ */ jsx90(
|
|
3429
3517
|
"path",
|
|
3430
3518
|
{
|
|
3431
3519
|
id: "XMLID_21_",
|
|
3432
3520
|
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",
|
|
3433
|
-
children: /* @__PURE__ */
|
|
3521
|
+
children: /* @__PURE__ */ jsx90(
|
|
3434
3522
|
"animate",
|
|
3435
3523
|
{
|
|
3436
3524
|
attributeName: "opacity",
|
|
@@ -3443,12 +3531,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs34(
|
|
|
3443
3531
|
)
|
|
3444
3532
|
}
|
|
3445
3533
|
),
|
|
3446
|
-
/* @__PURE__ */
|
|
3534
|
+
/* @__PURE__ */ jsx90(
|
|
3447
3535
|
"path",
|
|
3448
3536
|
{
|
|
3449
3537
|
id: "XMLID_22_",
|
|
3450
3538
|
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",
|
|
3451
|
-
children: /* @__PURE__ */
|
|
3539
|
+
children: /* @__PURE__ */ jsx90(
|
|
3452
3540
|
"animate",
|
|
3453
3541
|
{
|
|
3454
3542
|
attributeName: "opacity",
|
|
@@ -3461,12 +3549,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs34(
|
|
|
3461
3549
|
)
|
|
3462
3550
|
}
|
|
3463
3551
|
),
|
|
3464
|
-
/* @__PURE__ */
|
|
3552
|
+
/* @__PURE__ */ jsx90(
|
|
3465
3553
|
"path",
|
|
3466
3554
|
{
|
|
3467
3555
|
id: "XMLID_23_",
|
|
3468
3556
|
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",
|
|
3469
|
-
children: /* @__PURE__ */
|
|
3557
|
+
children: /* @__PURE__ */ jsx90(
|
|
3470
3558
|
"animate",
|
|
3471
3559
|
{
|
|
3472
3560
|
attributeName: "opacity",
|
|
@@ -3479,12 +3567,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs34(
|
|
|
3479
3567
|
)
|
|
3480
3568
|
}
|
|
3481
3569
|
),
|
|
3482
|
-
/* @__PURE__ */
|
|
3570
|
+
/* @__PURE__ */ jsx90(
|
|
3483
3571
|
"path",
|
|
3484
3572
|
{
|
|
3485
3573
|
id: "XMLID_24_",
|
|
3486
3574
|
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",
|
|
3487
|
-
children: /* @__PURE__ */
|
|
3575
|
+
children: /* @__PURE__ */ jsx90(
|
|
3488
3576
|
"animate",
|
|
3489
3577
|
{
|
|
3490
3578
|
attributeName: "opacity",
|
|
@@ -3497,12 +3585,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs34(
|
|
|
3497
3585
|
)
|
|
3498
3586
|
}
|
|
3499
3587
|
),
|
|
3500
|
-
/* @__PURE__ */
|
|
3588
|
+
/* @__PURE__ */ jsx90(
|
|
3501
3589
|
"path",
|
|
3502
3590
|
{
|
|
3503
3591
|
id: "XMLID_25_",
|
|
3504
3592
|
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",
|
|
3505
|
-
children: /* @__PURE__ */
|
|
3593
|
+
children: /* @__PURE__ */ jsx90(
|
|
3506
3594
|
"animate",
|
|
3507
3595
|
{
|
|
3508
3596
|
attributeName: "opacity",
|
|
@@ -3515,12 +3603,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs34(
|
|
|
3515
3603
|
)
|
|
3516
3604
|
}
|
|
3517
3605
|
),
|
|
3518
|
-
/* @__PURE__ */
|
|
3606
|
+
/* @__PURE__ */ jsx90(
|
|
3519
3607
|
"path",
|
|
3520
3608
|
{
|
|
3521
3609
|
id: "XMLID_26_",
|
|
3522
3610
|
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",
|
|
3523
|
-
children: /* @__PURE__ */
|
|
3611
|
+
children: /* @__PURE__ */ jsx90(
|
|
3524
3612
|
"animate",
|
|
3525
3613
|
{
|
|
3526
3614
|
attributeName: "opacity",
|
|
@@ -3533,12 +3621,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs34(
|
|
|
3533
3621
|
)
|
|
3534
3622
|
}
|
|
3535
3623
|
),
|
|
3536
|
-
/* @__PURE__ */
|
|
3624
|
+
/* @__PURE__ */ jsx90(
|
|
3537
3625
|
"path",
|
|
3538
3626
|
{
|
|
3539
3627
|
id: "XMLID_27_",
|
|
3540
3628
|
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",
|
|
3541
|
-
children: /* @__PURE__ */
|
|
3629
|
+
children: /* @__PURE__ */ jsx90(
|
|
3542
3630
|
"animate",
|
|
3543
3631
|
{
|
|
3544
3632
|
attributeName: "opacity",
|
|
@@ -3566,15 +3654,15 @@ var useTabContext = () => useContext14(TabContext);
|
|
|
3566
3654
|
|
|
3567
3655
|
// src/Tabs/Tab.tsx
|
|
3568
3656
|
import { Tab } from "react-aria-components";
|
|
3569
|
-
import { cn as
|
|
3570
|
-
import { jsx as
|
|
3657
|
+
import { cn as cn52 } from "@marigold/system";
|
|
3658
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
3571
3659
|
var _Tab = (props) => {
|
|
3572
3660
|
const { classNames: classNames2 } = useTabContext();
|
|
3573
|
-
return /* @__PURE__ */
|
|
3661
|
+
return /* @__PURE__ */ jsx91(
|
|
3574
3662
|
Tab,
|
|
3575
3663
|
{
|
|
3576
3664
|
...props,
|
|
3577
|
-
className:
|
|
3665
|
+
className: cn52(
|
|
3578
3666
|
"flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
|
|
3579
3667
|
classNames2.tab
|
|
3580
3668
|
),
|
|
@@ -3585,15 +3673,15 @@ var _Tab = (props) => {
|
|
|
3585
3673
|
|
|
3586
3674
|
// src/Tabs/TabList.tsx
|
|
3587
3675
|
import { TabList } from "react-aria-components";
|
|
3588
|
-
import { cn as
|
|
3589
|
-
import { jsx as
|
|
3676
|
+
import { cn as cn53, gapSpace as gapSpace8 } from "@marigold/system";
|
|
3677
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
3590
3678
|
var _TabList = ({ space = 2, ...props }) => {
|
|
3591
3679
|
const { classNames: classNames2 } = useTabContext();
|
|
3592
|
-
return /* @__PURE__ */
|
|
3680
|
+
return /* @__PURE__ */ jsx92(
|
|
3593
3681
|
TabList,
|
|
3594
3682
|
{
|
|
3595
3683
|
...props,
|
|
3596
|
-
className:
|
|
3684
|
+
className: cn53("flex", gapSpace8[space], classNames2.tabsList),
|
|
3597
3685
|
children: props.children
|
|
3598
3686
|
}
|
|
3599
3687
|
);
|
|
@@ -3601,14 +3689,14 @@ var _TabList = ({ space = 2, ...props }) => {
|
|
|
3601
3689
|
|
|
3602
3690
|
// src/Tabs/TabPanel.tsx
|
|
3603
3691
|
import { TabPanel } from "react-aria-components";
|
|
3604
|
-
import { jsx as
|
|
3692
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
3605
3693
|
var _TabPanel = (props) => {
|
|
3606
3694
|
const { classNames: classNames2 } = useTabContext();
|
|
3607
|
-
return /* @__PURE__ */
|
|
3695
|
+
return /* @__PURE__ */ jsx93(TabPanel, { ...props, className: classNames2.tabpanel, children: props.children });
|
|
3608
3696
|
};
|
|
3609
3697
|
|
|
3610
3698
|
// src/Tabs/Tabs.tsx
|
|
3611
|
-
import { jsx as
|
|
3699
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
3612
3700
|
var _Tabs = ({ disabled, variant, size = "medium", ...rest }) => {
|
|
3613
3701
|
const props = {
|
|
3614
3702
|
isDisabled: disabled,
|
|
@@ -3619,7 +3707,7 @@ var _Tabs = ({ disabled, variant, size = "medium", ...rest }) => {
|
|
|
3619
3707
|
size,
|
|
3620
3708
|
variant
|
|
3621
3709
|
});
|
|
3622
|
-
return /* @__PURE__ */
|
|
3710
|
+
return /* @__PURE__ */ jsx94(TabContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx94(Tabs, { ...props, className: classNames2.container, children: props.children }) });
|
|
3623
3711
|
};
|
|
3624
3712
|
_Tabs.List = _TabList;
|
|
3625
3713
|
_Tabs.TabPanel = _TabPanel;
|
|
@@ -3670,6 +3758,7 @@ export {
|
|
|
3670
3758
|
_Menu as Menu,
|
|
3671
3759
|
Message,
|
|
3672
3760
|
_Modal as Modal,
|
|
3761
|
+
Multiselect,
|
|
3673
3762
|
_NumberField as NumberField,
|
|
3674
3763
|
OverlayContainerProvider,
|
|
3675
3764
|
_Popover as Popover,
|