@locus-ui/components 0.0.1 → 0.0.12
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/README.md +155 -0
- package/dist/index.css +53 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +42 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +190 -149
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -1
package/dist/index.mjs
CHANGED
|
@@ -971,8 +971,48 @@ var Accordion = Object.assign(AccordionRoot, {
|
|
|
971
971
|
Content: AccordionContent
|
|
972
972
|
});
|
|
973
973
|
|
|
974
|
-
// src/components/
|
|
974
|
+
// src/components/badge/badge.tsx
|
|
975
975
|
import clsx6 from "clsx";
|
|
976
|
+
|
|
977
|
+
// src/components/badge/badge.props.ts
|
|
978
|
+
var BadgeVariants = ["solid", "outlined", "muted", "clear"];
|
|
979
|
+
var BadgeRootPropsDefs = {
|
|
980
|
+
/**
|
|
981
|
+
* Sets the variant style of the badge ("solid", "outlined", "muted", or "clear").
|
|
982
|
+
*/
|
|
983
|
+
variant: {
|
|
984
|
+
type: "enum",
|
|
985
|
+
values: BadgeVariants,
|
|
986
|
+
dataAttr: "variant"
|
|
987
|
+
}
|
|
988
|
+
};
|
|
989
|
+
|
|
990
|
+
// src/components/badge/badge.tsx
|
|
991
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
992
|
+
var Badge = (props) => {
|
|
993
|
+
const { color, variant, className, dataAttrs, ...rest } = getComponentProps(
|
|
994
|
+
props,
|
|
995
|
+
BadgeRootPropsDefs,
|
|
996
|
+
MarginPropDefs,
|
|
997
|
+
PaddingPropDefs,
|
|
998
|
+
RadiusPropDefs,
|
|
999
|
+
SizePropDef
|
|
1000
|
+
);
|
|
1001
|
+
return /* @__PURE__ */ jsx5(
|
|
1002
|
+
"div",
|
|
1003
|
+
{
|
|
1004
|
+
className: clsx6("badge", className),
|
|
1005
|
+
"data-color": color ?? true,
|
|
1006
|
+
"data-variant": variant,
|
|
1007
|
+
...dataAttrs,
|
|
1008
|
+
...rest,
|
|
1009
|
+
children: props.children
|
|
1010
|
+
}
|
|
1011
|
+
);
|
|
1012
|
+
};
|
|
1013
|
+
|
|
1014
|
+
// src/components/box/box.tsx
|
|
1015
|
+
import clsx7 from "clsx";
|
|
976
1016
|
import * as React5 from "react";
|
|
977
1017
|
|
|
978
1018
|
// src/components/box/box.props.ts
|
|
@@ -992,7 +1032,7 @@ var BoxPropsDefs = {
|
|
|
992
1032
|
};
|
|
993
1033
|
|
|
994
1034
|
// src/components/box/box.tsx
|
|
995
|
-
import { jsx as
|
|
1035
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
996
1036
|
var Box = React5.forwardRef((props, ref) => {
|
|
997
1037
|
const { className, dataAttrs, children, ...rest } = getComponentProps(
|
|
998
1038
|
props,
|
|
@@ -1003,12 +1043,12 @@ var Box = React5.forwardRef((props, ref) => {
|
|
|
1003
1043
|
RadiusPropDefs,
|
|
1004
1044
|
RoundnessPropDef
|
|
1005
1045
|
);
|
|
1006
|
-
return /* @__PURE__ */
|
|
1046
|
+
return /* @__PURE__ */ jsx6(
|
|
1007
1047
|
"div",
|
|
1008
1048
|
{
|
|
1009
1049
|
ref,
|
|
1010
1050
|
...dataAttrs,
|
|
1011
|
-
className:
|
|
1051
|
+
className: clsx7("lcs-box", className),
|
|
1012
1052
|
...rest,
|
|
1013
1053
|
children
|
|
1014
1054
|
}
|
|
@@ -1017,7 +1057,7 @@ var Box = React5.forwardRef((props, ref) => {
|
|
|
1017
1057
|
Box.displayName = "Box";
|
|
1018
1058
|
|
|
1019
1059
|
// src/components/button/button.tsx
|
|
1020
|
-
import
|
|
1060
|
+
import clsx8 from "clsx";
|
|
1021
1061
|
import { useState as useState2 } from "react";
|
|
1022
1062
|
|
|
1023
1063
|
// src/components/button/button.props.ts
|
|
@@ -1058,7 +1098,7 @@ var ButtonRootPropsDefs = {
|
|
|
1058
1098
|
};
|
|
1059
1099
|
|
|
1060
1100
|
// src/components/button/button.tsx
|
|
1061
|
-
import { jsx as
|
|
1101
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1062
1102
|
var Button = (props) => {
|
|
1063
1103
|
const {
|
|
1064
1104
|
color,
|
|
@@ -1078,10 +1118,10 @@ var Button = (props) => {
|
|
|
1078
1118
|
SizePropDef
|
|
1079
1119
|
);
|
|
1080
1120
|
const [hovered, setHovered] = useState2(false);
|
|
1081
|
-
return /* @__PURE__ */
|
|
1121
|
+
return /* @__PURE__ */ jsx7(
|
|
1082
1122
|
"button",
|
|
1083
1123
|
{
|
|
1084
|
-
className:
|
|
1124
|
+
className: clsx8("button", className),
|
|
1085
1125
|
"data-color": color ?? true,
|
|
1086
1126
|
"data-variant": variant,
|
|
1087
1127
|
"data-disabled": disabled ? true : void 0,
|
|
@@ -1093,19 +1133,19 @@ var Button = (props) => {
|
|
|
1093
1133
|
onMouseEnter: () => setHovered(true),
|
|
1094
1134
|
onMouseLeave: () => setHovered(false),
|
|
1095
1135
|
...rest,
|
|
1096
|
-
children: /* @__PURE__ */
|
|
1136
|
+
children: /* @__PURE__ */ jsx7("span", { children: props.children })
|
|
1097
1137
|
}
|
|
1098
1138
|
);
|
|
1099
1139
|
};
|
|
1100
1140
|
|
|
1101
1141
|
// src/components/checkbox/indicator/checkbox-indicator.tsx
|
|
1102
|
-
import
|
|
1142
|
+
import clsx9 from "clsx";
|
|
1103
1143
|
import React7 from "react";
|
|
1104
1144
|
|
|
1105
1145
|
// src/icons/check-mark.icon.tsx
|
|
1106
|
-
import { jsx as
|
|
1146
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1107
1147
|
var CheckMark = ({ color = "currentColor" }) => {
|
|
1108
|
-
return /* @__PURE__ */
|
|
1148
|
+
return /* @__PURE__ */ jsx8(
|
|
1109
1149
|
"svg",
|
|
1110
1150
|
{
|
|
1111
1151
|
width: "64",
|
|
@@ -1113,7 +1153,7 @@ var CheckMark = ({ color = "currentColor" }) => {
|
|
|
1113
1153
|
viewBox: "0 0 15 15",
|
|
1114
1154
|
fill: "none",
|
|
1115
1155
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1116
|
-
children: /* @__PURE__ */
|
|
1156
|
+
children: /* @__PURE__ */ jsx8(
|
|
1117
1157
|
"path",
|
|
1118
1158
|
{
|
|
1119
1159
|
d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
|
|
@@ -1127,9 +1167,9 @@ var CheckMark = ({ color = "currentColor" }) => {
|
|
|
1127
1167
|
};
|
|
1128
1168
|
|
|
1129
1169
|
// src/icons/minus.icon.tsx
|
|
1130
|
-
import { jsx as
|
|
1170
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1131
1171
|
var Minus = ({ color = "currentColor" }) => {
|
|
1132
|
-
return /* @__PURE__ */
|
|
1172
|
+
return /* @__PURE__ */ jsx9(
|
|
1133
1173
|
"svg",
|
|
1134
1174
|
{
|
|
1135
1175
|
width: "64",
|
|
@@ -1137,7 +1177,7 @@ var Minus = ({ color = "currentColor" }) => {
|
|
|
1137
1177
|
viewBox: "0 0 15 15",
|
|
1138
1178
|
fill: "none",
|
|
1139
1179
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1140
|
-
children: /* @__PURE__ */
|
|
1180
|
+
children: /* @__PURE__ */ jsx9(
|
|
1141
1181
|
"path",
|
|
1142
1182
|
{
|
|
1143
1183
|
d: "M3.5 7.5C3.5 7.08579 3.83579 6.75 4.25 6.75H10.75C11.1642 6.75 11.5 7.08579 11.5 7.5C11.5 7.91421 11.1642 8.25 10.75 8.25H4.25C3.83579 8.25 3.5 7.91421 3.5 7.5Z",
|
|
@@ -1267,7 +1307,7 @@ var CheckboxIndicatorPropDefs = {
|
|
|
1267
1307
|
};
|
|
1268
1308
|
|
|
1269
1309
|
// src/components/checkbox/indicator/checkbox-indicator.tsx
|
|
1270
|
-
import { jsx as
|
|
1310
|
+
import { jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1271
1311
|
var CheckboxIndicator = React7.forwardRef((props, ref) => {
|
|
1272
1312
|
const {
|
|
1273
1313
|
value,
|
|
@@ -1314,17 +1354,17 @@ var CheckboxIndicator = React7.forwardRef((props, ref) => {
|
|
|
1314
1354
|
"aria-checked": indeterminate ? "mixed" : value,
|
|
1315
1355
|
onKeyDown: handleKeyDown,
|
|
1316
1356
|
tabIndex: disabled || readonly ? -1 : 0,
|
|
1317
|
-
className:
|
|
1357
|
+
className: clsx9("checkbox-indicator", className),
|
|
1318
1358
|
...indicatorProps,
|
|
1319
1359
|
...dataAttrs,
|
|
1320
1360
|
children: [
|
|
1321
|
-
indeterminate && !value && /* @__PURE__ */
|
|
1361
|
+
indeterminate && !value && /* @__PURE__ */ jsx10(
|
|
1322
1362
|
Minus,
|
|
1323
1363
|
{
|
|
1324
1364
|
color: highContrast && indicatorVariant === "solid" ? "black" : "white"
|
|
1325
1365
|
}
|
|
1326
1366
|
),
|
|
1327
|
-
value && /* @__PURE__ */
|
|
1367
|
+
value && /* @__PURE__ */ jsx10(
|
|
1328
1368
|
CheckMark,
|
|
1329
1369
|
{
|
|
1330
1370
|
color: highContrast && indicatorVariant === "solid" ? "black" : "white"
|
|
@@ -1337,11 +1377,11 @@ var CheckboxIndicator = React7.forwardRef((props, ref) => {
|
|
|
1337
1377
|
CheckboxIndicator.displayName = "Checkbox.Indicator";
|
|
1338
1378
|
|
|
1339
1379
|
// src/components/checkbox/label/checkbox-label.tsx
|
|
1340
|
-
import
|
|
1380
|
+
import clsx11 from "clsx";
|
|
1341
1381
|
import React9 from "react";
|
|
1342
1382
|
|
|
1343
1383
|
// src/components/text/text.tsx
|
|
1344
|
-
import
|
|
1384
|
+
import clsx10 from "clsx";
|
|
1345
1385
|
import React8 from "react";
|
|
1346
1386
|
|
|
1347
1387
|
// src/components/text/text.props.ts
|
|
@@ -1367,7 +1407,7 @@ var TextPropsDefs = {
|
|
|
1367
1407
|
};
|
|
1368
1408
|
|
|
1369
1409
|
// src/components/text/text.tsx
|
|
1370
|
-
import { jsx as
|
|
1410
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1371
1411
|
var Text = React8.forwardRef(
|
|
1372
1412
|
(props, ref) => {
|
|
1373
1413
|
const { className, dataAttrs, children, ...rest } = getComponentProps(
|
|
@@ -1376,12 +1416,12 @@ var Text = React8.forwardRef(
|
|
|
1376
1416
|
MarginPropDefs,
|
|
1377
1417
|
PaddingPropDefs
|
|
1378
1418
|
);
|
|
1379
|
-
return /* @__PURE__ */
|
|
1419
|
+
return /* @__PURE__ */ jsx11(
|
|
1380
1420
|
"p",
|
|
1381
1421
|
{
|
|
1382
1422
|
ref,
|
|
1383
1423
|
...dataAttrs,
|
|
1384
|
-
className:
|
|
1424
|
+
className: clsx10("lcs-text", className),
|
|
1385
1425
|
...rest,
|
|
1386
1426
|
children
|
|
1387
1427
|
}
|
|
@@ -1406,7 +1446,7 @@ var CheckboxLabelPropDefs = {
|
|
|
1406
1446
|
};
|
|
1407
1447
|
|
|
1408
1448
|
// src/components/checkbox/label/checkbox-label.tsx
|
|
1409
|
-
import { jsx as
|
|
1449
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1410
1450
|
var CheckboxLabel = React9.forwardRef(
|
|
1411
1451
|
(props, ref) => {
|
|
1412
1452
|
const context = useCheckboxContext();
|
|
@@ -1417,14 +1457,14 @@ var CheckboxLabel = React9.forwardRef(
|
|
|
1417
1457
|
React9.useLayoutEffect(() => {
|
|
1418
1458
|
context.setLabelPosition?.(position ?? "right");
|
|
1419
1459
|
}, [position, context.setLabelPosition]);
|
|
1420
|
-
return /* @__PURE__ */
|
|
1460
|
+
return /* @__PURE__ */ jsx12(
|
|
1421
1461
|
"label",
|
|
1422
1462
|
{
|
|
1423
1463
|
ref,
|
|
1424
1464
|
htmlFor: context.labelId,
|
|
1425
|
-
className:
|
|
1465
|
+
className: clsx11("checkbox-label", className),
|
|
1426
1466
|
...position && { [`data-position`]: position },
|
|
1427
|
-
children: /* @__PURE__ */
|
|
1467
|
+
children: /* @__PURE__ */ jsx12(Text, { children })
|
|
1428
1468
|
}
|
|
1429
1469
|
);
|
|
1430
1470
|
}
|
|
@@ -1432,14 +1472,14 @@ var CheckboxLabel = React9.forwardRef(
|
|
|
1432
1472
|
CheckboxLabel.displayName = "Checkbox.Label";
|
|
1433
1473
|
|
|
1434
1474
|
// src/components/checkbox/root/checkbox-root.tsx
|
|
1435
|
-
import
|
|
1475
|
+
import clsx12 from "clsx";
|
|
1436
1476
|
import {
|
|
1437
1477
|
isValidElement as isValidElement2,
|
|
1438
1478
|
useId,
|
|
1439
1479
|
useMemo as useMemo3,
|
|
1440
1480
|
useState as useState3
|
|
1441
1481
|
} from "react";
|
|
1442
|
-
import { jsx as
|
|
1482
|
+
import { jsx as jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1443
1483
|
var ALLOWED_CHILDREN3 = [
|
|
1444
1484
|
CheckboxLabel.displayName,
|
|
1445
1485
|
CheckboxIndicator.displayName
|
|
@@ -1489,7 +1529,7 @@ var CheckboxRoot = (props) => {
|
|
|
1489
1529
|
};
|
|
1490
1530
|
}
|
|
1491
1531
|
return {
|
|
1492
|
-
indicator: /* @__PURE__ */
|
|
1532
|
+
indicator: /* @__PURE__ */ jsx13(CheckboxIndicator, { size }),
|
|
1493
1533
|
otherChildren: validChildren
|
|
1494
1534
|
};
|
|
1495
1535
|
}, [validChildren, size]);
|
|
@@ -1532,10 +1572,10 @@ var CheckboxRoot = (props) => {
|
|
|
1532
1572
|
if (disabled || readonly) return;
|
|
1533
1573
|
setValue(!value);
|
|
1534
1574
|
};
|
|
1535
|
-
return /* @__PURE__ */
|
|
1575
|
+
return /* @__PURE__ */ jsx13(CheckboxContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs4(
|
|
1536
1576
|
"div",
|
|
1537
1577
|
{
|
|
1538
|
-
className:
|
|
1578
|
+
className: clsx12("checkbox-root", props.className),
|
|
1539
1579
|
onClick: () => handleClick(),
|
|
1540
1580
|
onMouseEnter: () => setHovered(true),
|
|
1541
1581
|
onMouseLeave: () => setHovered(false),
|
|
@@ -1543,7 +1583,7 @@ var CheckboxRoot = (props) => {
|
|
|
1543
1583
|
children: [
|
|
1544
1584
|
indicator,
|
|
1545
1585
|
otherChildren,
|
|
1546
|
-
name && /* @__PURE__ */
|
|
1586
|
+
name && /* @__PURE__ */ jsx13("input", { type: "hidden", name, value: String(value) })
|
|
1547
1587
|
]
|
|
1548
1588
|
}
|
|
1549
1589
|
) });
|
|
@@ -1558,17 +1598,17 @@ var Checkbox = Object.assign(CheckboxRoot, {
|
|
|
1558
1598
|
});
|
|
1559
1599
|
|
|
1560
1600
|
// src/components/container/container.tsx
|
|
1561
|
-
import
|
|
1601
|
+
import clsx13 from "clsx";
|
|
1562
1602
|
import * as React11 from "react";
|
|
1563
|
-
import { jsx as
|
|
1603
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1564
1604
|
var Container = React11.forwardRef((props, ref) => {
|
|
1565
1605
|
const { className, children, direction, ...rest } = props;
|
|
1566
|
-
return /* @__PURE__ */
|
|
1606
|
+
return /* @__PURE__ */ jsx14(
|
|
1567
1607
|
"div",
|
|
1568
1608
|
{
|
|
1569
1609
|
ref,
|
|
1570
1610
|
"data-direction": direction,
|
|
1571
|
-
className:
|
|
1611
|
+
className: clsx13(className, "lcs-container"),
|
|
1572
1612
|
...rest,
|
|
1573
1613
|
children
|
|
1574
1614
|
}
|
|
@@ -1577,7 +1617,7 @@ var Container = React11.forwardRef((props, ref) => {
|
|
|
1577
1617
|
Container.displayName = "Container";
|
|
1578
1618
|
|
|
1579
1619
|
// src/components/portal/backdrop/portal-backdrop.tsx
|
|
1580
|
-
import
|
|
1620
|
+
import clsx14 from "clsx";
|
|
1581
1621
|
import * as React13 from "react";
|
|
1582
1622
|
|
|
1583
1623
|
// src/components/portal/portal-context.tsx
|
|
@@ -1633,7 +1673,7 @@ var PortalBackdropPropsDefs = {
|
|
|
1633
1673
|
};
|
|
1634
1674
|
|
|
1635
1675
|
// src/components/portal/backdrop/portal-backdrop.tsx
|
|
1636
|
-
import { jsx as
|
|
1676
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1637
1677
|
var PortalBackdrop = React13.forwardRef(
|
|
1638
1678
|
(props, ref) => {
|
|
1639
1679
|
const context = usePortalContext();
|
|
@@ -1642,11 +1682,11 @@ var PortalBackdrop = React13.forwardRef(
|
|
|
1642
1682
|
PortalBackdropPropsDefs
|
|
1643
1683
|
);
|
|
1644
1684
|
if (!context.open) return null;
|
|
1645
|
-
return /* @__PURE__ */
|
|
1685
|
+
return /* @__PURE__ */ jsx15(
|
|
1646
1686
|
"div",
|
|
1647
1687
|
{
|
|
1648
1688
|
ref,
|
|
1649
|
-
className:
|
|
1689
|
+
className: clsx14("portal-backdrop", className),
|
|
1650
1690
|
...dataAttrs,
|
|
1651
1691
|
...rest
|
|
1652
1692
|
}
|
|
@@ -1656,7 +1696,7 @@ var PortalBackdrop = React13.forwardRef(
|
|
|
1656
1696
|
PortalBackdrop.displayName = "Portal.Backdrop";
|
|
1657
1697
|
|
|
1658
1698
|
// src/components/portal/content/portal-content.tsx
|
|
1659
|
-
import
|
|
1699
|
+
import clsx15 from "clsx";
|
|
1660
1700
|
import * as React16 from "react";
|
|
1661
1701
|
import ReactDOM from "react-dom";
|
|
1662
1702
|
|
|
@@ -1828,7 +1868,7 @@ var PortalContentPropsDefs = {
|
|
|
1828
1868
|
};
|
|
1829
1869
|
|
|
1830
1870
|
// src/components/portal/content/portal-content.tsx
|
|
1831
|
-
import { jsx as
|
|
1871
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1832
1872
|
var PortalContent = React16.forwardRef(
|
|
1833
1873
|
(props, ref) => {
|
|
1834
1874
|
const portalContext = usePortalContext();
|
|
@@ -1913,11 +1953,11 @@ var PortalContent = React16.forwardRef(
|
|
|
1913
1953
|
left: anchorPosition.left
|
|
1914
1954
|
} : {}
|
|
1915
1955
|
};
|
|
1916
|
-
const portalContent = /* @__PURE__ */
|
|
1956
|
+
const portalContent = /* @__PURE__ */ jsx16(
|
|
1917
1957
|
"div",
|
|
1918
1958
|
{
|
|
1919
1959
|
ref: setRefs,
|
|
1920
|
-
className:
|
|
1960
|
+
className: clsx15("portal", className),
|
|
1921
1961
|
"data-appearance": themeContext?.appearance,
|
|
1922
1962
|
"data-radius": themeContext?.radius,
|
|
1923
1963
|
"data-roundness": themeContext?.roundness ?? "theme",
|
|
@@ -1928,7 +1968,7 @@ var PortalContent = React16.forwardRef(
|
|
|
1928
1968
|
onClick: anchored ? void 0 : () => portalContext.onOpenChange?.(false),
|
|
1929
1969
|
style: combinedStyle,
|
|
1930
1970
|
...dataAttrs,
|
|
1931
|
-
children: /* @__PURE__ */
|
|
1971
|
+
children: /* @__PURE__ */ jsx16(
|
|
1932
1972
|
"div",
|
|
1933
1973
|
{
|
|
1934
1974
|
className: "portal-content",
|
|
@@ -1938,7 +1978,7 @@ var PortalContent = React16.forwardRef(
|
|
|
1938
1978
|
)
|
|
1939
1979
|
}
|
|
1940
1980
|
);
|
|
1941
|
-
const content = themeContext ? /* @__PURE__ */
|
|
1981
|
+
const content = themeContext ? /* @__PURE__ */ jsx16(ThemeContext.Provider, { value: themeContext, children: portalContent }) : portalContent;
|
|
1942
1982
|
return ReactDOM.createPortal(content, container);
|
|
1943
1983
|
}
|
|
1944
1984
|
);
|
|
@@ -1949,7 +1989,7 @@ import * as React18 from "react";
|
|
|
1949
1989
|
|
|
1950
1990
|
// src/components/portal/trigger/portal-trigger.tsx
|
|
1951
1991
|
import * as React17 from "react";
|
|
1952
|
-
import { jsx as
|
|
1992
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1953
1993
|
var PortalTrigger = React17.forwardRef(
|
|
1954
1994
|
({ children, asChild, onClick, ...props }, ref) => {
|
|
1955
1995
|
const context = usePortalContext();
|
|
@@ -1982,7 +2022,7 @@ var PortalTrigger = React17.forwardRef(
|
|
|
1982
2022
|
...props
|
|
1983
2023
|
});
|
|
1984
2024
|
}
|
|
1985
|
-
return /* @__PURE__ */
|
|
2025
|
+
return /* @__PURE__ */ jsx17(
|
|
1986
2026
|
"button",
|
|
1987
2027
|
{
|
|
1988
2028
|
ref: setRefs,
|
|
@@ -2021,7 +2061,7 @@ var PortalRootPropsDefs = {
|
|
|
2021
2061
|
};
|
|
2022
2062
|
|
|
2023
2063
|
// src/components/portal/root/portal-root.tsx
|
|
2024
|
-
import { jsx as
|
|
2064
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
2025
2065
|
var ALLOWED_CHILDREN4 = [
|
|
2026
2066
|
PortalTrigger.displayName,
|
|
2027
2067
|
PortalBackdrop.displayName,
|
|
@@ -2053,7 +2093,7 @@ var PortalRoot = (props) => {
|
|
|
2053
2093
|
const validChildren = filterChildren(children, ALLOWED_CHILDREN4, {
|
|
2054
2094
|
parentDisplayName: PortalRoot.displayName
|
|
2055
2095
|
});
|
|
2056
|
-
return /* @__PURE__ */
|
|
2096
|
+
return /* @__PURE__ */ jsx18(PortalContext.Provider, { value, children: validChildren });
|
|
2057
2097
|
};
|
|
2058
2098
|
PortalRoot.displayName = "Portal.Root";
|
|
2059
2099
|
|
|
@@ -2070,7 +2110,7 @@ var Portal = {
|
|
|
2070
2110
|
};
|
|
2071
2111
|
|
|
2072
2112
|
// src/components/select/content/select-content.tsx
|
|
2073
|
-
import
|
|
2113
|
+
import clsx17 from "clsx";
|
|
2074
2114
|
import * as React22 from "react";
|
|
2075
2115
|
|
|
2076
2116
|
// src/components/select/select-context.tsx
|
|
@@ -2104,19 +2144,19 @@ function useComposedRefs(...refs) {
|
|
|
2104
2144
|
}
|
|
2105
2145
|
|
|
2106
2146
|
// src/components/select/viewport/select-viewport.tsx
|
|
2107
|
-
import
|
|
2147
|
+
import clsx16 from "clsx";
|
|
2108
2148
|
import * as React21 from "react";
|
|
2109
|
-
import { jsx as
|
|
2149
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2110
2150
|
var SelectViewport = React21.forwardRef(
|
|
2111
2151
|
(props, ref) => {
|
|
2112
2152
|
const { className, children, ...rest } = props;
|
|
2113
|
-
return /* @__PURE__ */
|
|
2153
|
+
return /* @__PURE__ */ jsx19("div", { ref, className: clsx16("select-viewport", className), ...rest, children });
|
|
2114
2154
|
}
|
|
2115
2155
|
);
|
|
2116
2156
|
SelectViewport.displayName = "Select.Viewport";
|
|
2117
2157
|
|
|
2118
2158
|
// src/components/select/content/select-content.tsx
|
|
2119
|
-
import { jsx as
|
|
2159
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
2120
2160
|
var SelectContent = React22.forwardRef(
|
|
2121
2161
|
(props, forwardedRef) => {
|
|
2122
2162
|
const {
|
|
@@ -2206,15 +2246,15 @@ var SelectContent = React22.forwardRef(
|
|
|
2206
2246
|
}
|
|
2207
2247
|
}, [context.open, context.labelPosition, anchorRef]);
|
|
2208
2248
|
if (!context.open) {
|
|
2209
|
-
return /* @__PURE__ */
|
|
2249
|
+
return /* @__PURE__ */ jsx20("div", { style: { display: "none" }, "aria-hidden": "true", children });
|
|
2210
2250
|
}
|
|
2211
|
-
return /* @__PURE__ */
|
|
2251
|
+
return /* @__PURE__ */ jsx20(
|
|
2212
2252
|
Portal.Root,
|
|
2213
2253
|
{
|
|
2214
2254
|
open: context.open,
|
|
2215
2255
|
onOpenChange: context.onOpenChange,
|
|
2216
2256
|
anchorRef,
|
|
2217
|
-
children: /* @__PURE__ */
|
|
2257
|
+
children: /* @__PURE__ */ jsx20(Portal.Content, { anchored: true, side, align, sideOffset: offset, children: /* @__PURE__ */ jsx20(
|
|
2218
2258
|
"div",
|
|
2219
2259
|
{
|
|
2220
2260
|
ref: composedRef,
|
|
@@ -2223,10 +2263,10 @@ var SelectContent = React22.forwardRef(
|
|
|
2223
2263
|
"data-side": side,
|
|
2224
2264
|
"data-align": align,
|
|
2225
2265
|
"data-trigger-variant": context.triggerVariant,
|
|
2226
|
-
className:
|
|
2266
|
+
className: clsx17("select-content", className),
|
|
2227
2267
|
style: { width: contentWidth },
|
|
2228
2268
|
...rest,
|
|
2229
|
-
children: /* @__PURE__ */
|
|
2269
|
+
children: /* @__PURE__ */ jsx20(SelectViewport, { children })
|
|
2230
2270
|
}
|
|
2231
2271
|
) })
|
|
2232
2272
|
}
|
|
@@ -2236,7 +2276,7 @@ var SelectContent = React22.forwardRef(
|
|
|
2236
2276
|
SelectContent.displayName = "Select.Content";
|
|
2237
2277
|
|
|
2238
2278
|
// src/components/select/group/select-group.tsx
|
|
2239
|
-
import
|
|
2279
|
+
import clsx18 from "clsx";
|
|
2240
2280
|
import * as React23 from "react";
|
|
2241
2281
|
|
|
2242
2282
|
// src/components/select/group/select-group.props.ts
|
|
@@ -2247,7 +2287,7 @@ var SelectGroupsPropDefs = {
|
|
|
2247
2287
|
};
|
|
2248
2288
|
|
|
2249
2289
|
// src/components/select/group/select-group.tsx
|
|
2250
|
-
import { jsx as
|
|
2290
|
+
import { jsx as jsx21, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2251
2291
|
var SelectGroup = React23.forwardRef(
|
|
2252
2292
|
(props, ref) => {
|
|
2253
2293
|
const { className, children, dataAttrs, ...rest } = getComponentProps(
|
|
@@ -2259,10 +2299,10 @@ var SelectGroup = React23.forwardRef(
|
|
|
2259
2299
|
{
|
|
2260
2300
|
ref,
|
|
2261
2301
|
role: "group",
|
|
2262
|
-
className:
|
|
2302
|
+
className: clsx18("select-group", className),
|
|
2263
2303
|
...rest,
|
|
2264
2304
|
children: [
|
|
2265
|
-
/* @__PURE__ */
|
|
2305
|
+
/* @__PURE__ */ jsx21(Text, { className: "select-group-label", disabled: true, children: props.title }),
|
|
2266
2306
|
children
|
|
2267
2307
|
]
|
|
2268
2308
|
}
|
|
@@ -2272,13 +2312,13 @@ var SelectGroup = React23.forwardRef(
|
|
|
2272
2312
|
SelectGroup.displayName = "Select.Group";
|
|
2273
2313
|
|
|
2274
2314
|
// src/components/select/item/select-item.tsx
|
|
2275
|
-
import
|
|
2315
|
+
import clsx19 from "clsx";
|
|
2276
2316
|
import * as React24 from "react";
|
|
2277
2317
|
|
|
2278
2318
|
// src/components/select/item/select-item-indicator.tsx
|
|
2279
|
-
import { jsx as
|
|
2319
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
2280
2320
|
var SelectItemIndicator = () => {
|
|
2281
|
-
return /* @__PURE__ */
|
|
2321
|
+
return /* @__PURE__ */ jsx22("span", { className: "select-item-indicator", children: /* @__PURE__ */ jsx22(
|
|
2282
2322
|
"svg",
|
|
2283
2323
|
{
|
|
2284
2324
|
width: "20",
|
|
@@ -2286,7 +2326,7 @@ var SelectItemIndicator = () => {
|
|
|
2286
2326
|
viewBox: "0 0 15 15",
|
|
2287
2327
|
fill: "none",
|
|
2288
2328
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2289
|
-
children: /* @__PURE__ */
|
|
2329
|
+
children: /* @__PURE__ */ jsx22(
|
|
2290
2330
|
"path",
|
|
2291
2331
|
{
|
|
2292
2332
|
d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
|
|
@@ -2311,7 +2351,7 @@ var SelectItemPropDefs = {
|
|
|
2311
2351
|
};
|
|
2312
2352
|
|
|
2313
2353
|
// src/components/select/item/select-item.tsx
|
|
2314
|
-
import { jsx as
|
|
2354
|
+
import { jsx as jsx23, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2315
2355
|
var SelectItem = React24.forwardRef(
|
|
2316
2356
|
(props, ref) => {
|
|
2317
2357
|
const context = useSelectContext();
|
|
@@ -2364,20 +2404,20 @@ var SelectItem = React24.forwardRef(
|
|
|
2364
2404
|
"data-state": selected ? "checked" : "unchecked",
|
|
2365
2405
|
"data-highlighted": isHighlighted ? "" : void 0,
|
|
2366
2406
|
"data-disabled": disabled ? "" : void 0,
|
|
2367
|
-
className:
|
|
2407
|
+
className: clsx19("select-item", className),
|
|
2368
2408
|
onClick: handleClick,
|
|
2369
2409
|
onMouseEnter: handleMouseEnter,
|
|
2370
2410
|
...rest,
|
|
2371
2411
|
children: [
|
|
2372
|
-
/* @__PURE__ */
|
|
2412
|
+
/* @__PURE__ */ jsx23(
|
|
2373
2413
|
Box,
|
|
2374
2414
|
{
|
|
2375
2415
|
style: { width: 24, height: 24, justifyContent: "center" },
|
|
2376
2416
|
className: "flex items-center",
|
|
2377
|
-
children: selected && /* @__PURE__ */
|
|
2417
|
+
children: selected && /* @__PURE__ */ jsx23(SelectItemIndicator, {})
|
|
2378
2418
|
}
|
|
2379
2419
|
),
|
|
2380
|
-
/* @__PURE__ */
|
|
2420
|
+
/* @__PURE__ */ jsx23(Text, { disabled, children })
|
|
2381
2421
|
]
|
|
2382
2422
|
}
|
|
2383
2423
|
);
|
|
@@ -2386,7 +2426,7 @@ var SelectItem = React24.forwardRef(
|
|
|
2386
2426
|
SelectItem.displayName = "Select.Item";
|
|
2387
2427
|
|
|
2388
2428
|
// src/components/select/label/select-label.tsx
|
|
2389
|
-
import
|
|
2429
|
+
import clsx20 from "clsx";
|
|
2390
2430
|
import * as React25 from "react";
|
|
2391
2431
|
|
|
2392
2432
|
// src/components/select/label/select-label.props.ts
|
|
@@ -2401,7 +2441,7 @@ var SelectLabelPropDefs = {
|
|
|
2401
2441
|
};
|
|
2402
2442
|
|
|
2403
2443
|
// src/components/select/label/select-label.tsx
|
|
2404
|
-
import { jsx as
|
|
2444
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2405
2445
|
var SelectLabel = React25.forwardRef(
|
|
2406
2446
|
(props, ref) => {
|
|
2407
2447
|
const context = useSelectContext();
|
|
@@ -2412,14 +2452,14 @@ var SelectLabel = React25.forwardRef(
|
|
|
2412
2452
|
React25.useLayoutEffect(() => {
|
|
2413
2453
|
context.setLabelPosition?.(position ?? "top");
|
|
2414
2454
|
}, [position, context.setLabelPosition]);
|
|
2415
|
-
return /* @__PURE__ */
|
|
2455
|
+
return /* @__PURE__ */ jsx24(
|
|
2416
2456
|
"label",
|
|
2417
2457
|
{
|
|
2418
2458
|
ref,
|
|
2419
2459
|
htmlFor: context.labelId,
|
|
2420
|
-
className:
|
|
2460
|
+
className: clsx20("select-label", className),
|
|
2421
2461
|
...dataAttrs,
|
|
2422
|
-
children: /* @__PURE__ */
|
|
2462
|
+
children: /* @__PURE__ */ jsx24(Text, { disabled: context.disabled, children })
|
|
2423
2463
|
}
|
|
2424
2464
|
);
|
|
2425
2465
|
}
|
|
@@ -2427,7 +2467,7 @@ var SelectLabel = React25.forwardRef(
|
|
|
2427
2467
|
SelectLabel.displayName = "Select.Label";
|
|
2428
2468
|
|
|
2429
2469
|
// src/components/select/root/select-root.tsx
|
|
2430
|
-
import
|
|
2470
|
+
import clsx24 from "clsx";
|
|
2431
2471
|
import {
|
|
2432
2472
|
useId as useId2,
|
|
2433
2473
|
useLayoutEffect as useLayoutEffect3,
|
|
@@ -2437,26 +2477,26 @@ import {
|
|
|
2437
2477
|
} from "react";
|
|
2438
2478
|
|
|
2439
2479
|
// src/components/select/trigger/select-trigger.tsx
|
|
2440
|
-
import
|
|
2480
|
+
import clsx23 from "clsx";
|
|
2441
2481
|
import * as React27 from "react";
|
|
2442
2482
|
|
|
2443
2483
|
// src/components/select/value/select-value.tsx
|
|
2444
|
-
import
|
|
2484
|
+
import clsx21 from "clsx";
|
|
2445
2485
|
import * as React26 from "react";
|
|
2446
|
-
import { jsx as
|
|
2486
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2447
2487
|
var SelectValue = React26.forwardRef(
|
|
2448
2488
|
(props, ref) => {
|
|
2449
2489
|
const { className, placeholder: placeholderProp, ...rest } = props;
|
|
2450
2490
|
const context = useSelectContext();
|
|
2451
2491
|
const placeholder = placeholderProp ?? context.placeholder;
|
|
2452
|
-
return /* @__PURE__ */
|
|
2492
|
+
return /* @__PURE__ */ jsx25(
|
|
2453
2493
|
"span",
|
|
2454
2494
|
{
|
|
2455
2495
|
ref,
|
|
2456
|
-
className:
|
|
2496
|
+
className: clsx21("select-value", className),
|
|
2457
2497
|
"data-placeholder": !context.value ? "" : void 0,
|
|
2458
2498
|
...rest,
|
|
2459
|
-
children: /* @__PURE__ */
|
|
2499
|
+
children: /* @__PURE__ */ jsx25(Text, { disabled: context.disabled, children: context.displayValue || placeholder })
|
|
2460
2500
|
}
|
|
2461
2501
|
);
|
|
2462
2502
|
}
|
|
@@ -2464,21 +2504,21 @@ var SelectValue = React26.forwardRef(
|
|
|
2464
2504
|
SelectValue.displayName = "Select.Value";
|
|
2465
2505
|
|
|
2466
2506
|
// src/components/select/trigger/select-trigger-icon.tsx
|
|
2467
|
-
import
|
|
2468
|
-
import { jsx as
|
|
2507
|
+
import clsx22 from "clsx";
|
|
2508
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2469
2509
|
var SelectTriggerIcon = (props) => {
|
|
2470
2510
|
const { className, ...rest } = props;
|
|
2471
|
-
return /* @__PURE__ */
|
|
2511
|
+
return /* @__PURE__ */ jsx26(
|
|
2472
2512
|
"svg",
|
|
2473
2513
|
{
|
|
2474
|
-
className:
|
|
2514
|
+
className: clsx22("select-trigger-icon", className),
|
|
2475
2515
|
width: "20",
|
|
2476
2516
|
height: "20",
|
|
2477
2517
|
viewBox: "0 0 15 15",
|
|
2478
2518
|
fill: "none",
|
|
2479
2519
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2480
2520
|
...rest,
|
|
2481
|
-
children: /* @__PURE__ */
|
|
2521
|
+
children: /* @__PURE__ */ jsx26(
|
|
2482
2522
|
"path",
|
|
2483
2523
|
{
|
|
2484
2524
|
d: "M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z",
|
|
@@ -2495,7 +2535,7 @@ var SelectTriggerIcon = (props) => {
|
|
|
2495
2535
|
var SelectTriggerPropsDefs = {};
|
|
2496
2536
|
|
|
2497
2537
|
// src/components/select/trigger/select-trigger.tsx
|
|
2498
|
-
import { jsx as
|
|
2538
|
+
import { jsx as jsx27, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2499
2539
|
var SelectTrigger = React27.forwardRef(
|
|
2500
2540
|
(props, forwardedRef) => {
|
|
2501
2541
|
const {
|
|
@@ -2532,11 +2572,11 @@ var SelectTrigger = React27.forwardRef(
|
|
|
2532
2572
|
"data-state": context.open ? "open" : "closed",
|
|
2533
2573
|
"data-disabled": disabled ? "" : void 0,
|
|
2534
2574
|
"data-variant": context.triggerVariant,
|
|
2535
|
-
className:
|
|
2575
|
+
className: clsx23("select-trigger", className),
|
|
2536
2576
|
...dataAttrs,
|
|
2537
2577
|
children: [
|
|
2538
|
-
/* @__PURE__ */
|
|
2539
|
-
/* @__PURE__ */
|
|
2578
|
+
/* @__PURE__ */ jsx27(SelectValue, {}),
|
|
2579
|
+
/* @__PURE__ */ jsx27(SelectTriggerIcon, {})
|
|
2540
2580
|
]
|
|
2541
2581
|
}
|
|
2542
2582
|
);
|
|
@@ -2553,14 +2593,14 @@ var SelectTrigger = React27.forwardRef(
|
|
|
2553
2593
|
disabled,
|
|
2554
2594
|
"data-state": context.open ? "open" : "closed",
|
|
2555
2595
|
"data-disabled": disabled ? "" : void 0,
|
|
2556
|
-
className:
|
|
2596
|
+
className: clsx23("select-trigger", className),
|
|
2557
2597
|
onClick: handleClick,
|
|
2558
2598
|
onKeyDown: handleKeyDown,
|
|
2559
2599
|
"data-variant": context.triggerVariant,
|
|
2560
2600
|
...dataAttrs,
|
|
2561
2601
|
children: [
|
|
2562
|
-
/* @__PURE__ */
|
|
2563
|
-
/* @__PURE__ */
|
|
2602
|
+
/* @__PURE__ */ jsx27(SelectValue, {}),
|
|
2603
|
+
/* @__PURE__ */ jsx27(SelectTriggerIcon, {})
|
|
2564
2604
|
]
|
|
2565
2605
|
}
|
|
2566
2606
|
);
|
|
@@ -2600,7 +2640,7 @@ var SelectRootPropsDefs = {
|
|
|
2600
2640
|
};
|
|
2601
2641
|
|
|
2602
2642
|
// src/components/select/root/select-root.tsx
|
|
2603
|
-
import { jsx as
|
|
2643
|
+
import { jsx as jsx28, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2604
2644
|
var ALLOWED_CHILDREN5 = [
|
|
2605
2645
|
SelectLabel.displayName,
|
|
2606
2646
|
SelectTrigger.displayName,
|
|
@@ -2706,7 +2746,7 @@ var SelectRoot = (props) => {
|
|
|
2706
2746
|
}
|
|
2707
2747
|
};
|
|
2708
2748
|
if (labelInside) {
|
|
2709
|
-
return /* @__PURE__ */
|
|
2749
|
+
return /* @__PURE__ */ jsx28(SelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs8(
|
|
2710
2750
|
"button",
|
|
2711
2751
|
{
|
|
2712
2752
|
type: "button",
|
|
@@ -2718,26 +2758,26 @@ var SelectRoot = (props) => {
|
|
|
2718
2758
|
ref: rootRef,
|
|
2719
2759
|
"data-state": open ? "open" : "closed",
|
|
2720
2760
|
"data-disabled": disabled ? "" : void 0,
|
|
2721
|
-
className:
|
|
2761
|
+
className: clsx24("select-root", className),
|
|
2722
2762
|
onClick: handleClick,
|
|
2723
2763
|
onKeyDown: handleKeyDown,
|
|
2724
2764
|
...dataAttrs,
|
|
2725
2765
|
children: [
|
|
2726
2766
|
validChildren,
|
|
2727
|
-
name && /* @__PURE__ */
|
|
2767
|
+
name && /* @__PURE__ */ jsx28("input", { type: "hidden", name, value })
|
|
2728
2768
|
]
|
|
2729
2769
|
}
|
|
2730
2770
|
) });
|
|
2731
2771
|
}
|
|
2732
|
-
return /* @__PURE__ */
|
|
2772
|
+
return /* @__PURE__ */ jsx28(SelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs8(
|
|
2733
2773
|
Box,
|
|
2734
2774
|
{
|
|
2735
2775
|
ref: rootRef,
|
|
2736
|
-
className:
|
|
2776
|
+
className: clsx24("select-root", className),
|
|
2737
2777
|
...dataAttrs,
|
|
2738
2778
|
children: [
|
|
2739
2779
|
validChildren,
|
|
2740
|
-
name && /* @__PURE__ */
|
|
2780
|
+
name && /* @__PURE__ */ jsx28("input", { type: "hidden", name, value })
|
|
2741
2781
|
]
|
|
2742
2782
|
}
|
|
2743
2783
|
) });
|
|
@@ -2745,17 +2785,17 @@ var SelectRoot = (props) => {
|
|
|
2745
2785
|
SelectRoot.displayName = "Select.Root";
|
|
2746
2786
|
|
|
2747
2787
|
// src/components/select/separator/select-separator.tsx
|
|
2748
|
-
import
|
|
2788
|
+
import clsx25 from "clsx";
|
|
2749
2789
|
import * as React28 from "react";
|
|
2750
|
-
import { jsx as
|
|
2790
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2751
2791
|
var SelectSeparator = React28.forwardRef(
|
|
2752
2792
|
(props, ref) => {
|
|
2753
2793
|
const { className, ...rest } = props;
|
|
2754
|
-
return /* @__PURE__ */
|
|
2794
|
+
return /* @__PURE__ */ jsx29(
|
|
2755
2795
|
"div",
|
|
2756
2796
|
{
|
|
2757
2797
|
ref,
|
|
2758
|
-
className:
|
|
2798
|
+
className: clsx25("select-separator", className),
|
|
2759
2799
|
...rest
|
|
2760
2800
|
}
|
|
2761
2801
|
);
|
|
@@ -2776,7 +2816,7 @@ var Select = {
|
|
|
2776
2816
|
};
|
|
2777
2817
|
|
|
2778
2818
|
// src/components/separator/separator.tsx
|
|
2779
|
-
import
|
|
2819
|
+
import clsx26 from "clsx";
|
|
2780
2820
|
|
|
2781
2821
|
// src/components/separator/separator.props.ts
|
|
2782
2822
|
var directions = ["horizontal", "vertical"];
|
|
@@ -2807,16 +2847,16 @@ var SeparatorPropsDefs = {
|
|
|
2807
2847
|
};
|
|
2808
2848
|
|
|
2809
2849
|
// src/components/separator/separator.tsx
|
|
2810
|
-
import { jsx as
|
|
2850
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2811
2851
|
var Separator = (props) => {
|
|
2812
2852
|
const { className, dataAttrs, style } = getComponentProps(
|
|
2813
2853
|
props,
|
|
2814
2854
|
SeparatorPropsDefs
|
|
2815
2855
|
);
|
|
2816
|
-
return /* @__PURE__ */
|
|
2856
|
+
return /* @__PURE__ */ jsx30(
|
|
2817
2857
|
"div",
|
|
2818
2858
|
{
|
|
2819
|
-
className:
|
|
2859
|
+
className: clsx26("separator", className),
|
|
2820
2860
|
style,
|
|
2821
2861
|
...dataAttrs
|
|
2822
2862
|
}
|
|
@@ -2826,12 +2866,12 @@ Separator.displayName = "Separator";
|
|
|
2826
2866
|
|
|
2827
2867
|
// src/components/theme/theme.tsx
|
|
2828
2868
|
import * as React29 from "react";
|
|
2829
|
-
import { jsx as
|
|
2869
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2830
2870
|
var Theme = React29.forwardRef((props, ref) => {
|
|
2831
2871
|
const context = React29.useContext(ThemeContext);
|
|
2832
2872
|
const isRoot = context === void 0;
|
|
2833
|
-
if (isRoot) return /* @__PURE__ */
|
|
2834
|
-
return /* @__PURE__ */
|
|
2873
|
+
if (isRoot) return /* @__PURE__ */ jsx31(ThemeRoot, { ...props, ref });
|
|
2874
|
+
return /* @__PURE__ */ jsx31(ThemeSub, { ...props, ref });
|
|
2835
2875
|
});
|
|
2836
2876
|
Theme.displayName = "Theme";
|
|
2837
2877
|
var ThemeRoot = React29.forwardRef((props, ref) => {
|
|
@@ -2864,7 +2904,7 @@ var ThemeRoot = React29.forwardRef((props, ref) => {
|
|
|
2864
2904
|
}),
|
|
2865
2905
|
[appearance, radius, roundness2, spacing]
|
|
2866
2906
|
);
|
|
2867
|
-
return /* @__PURE__ */
|
|
2907
|
+
return /* @__PURE__ */ jsx31(ThemeContext.Provider, { value, children: /* @__PURE__ */ jsx31(
|
|
2868
2908
|
"div",
|
|
2869
2909
|
{
|
|
2870
2910
|
ref,
|
|
@@ -2902,7 +2942,7 @@ var ThemeSub = React29.forwardRef((props, ref) => {
|
|
|
2902
2942
|
onRoundnessChange: context.onRoundnessChange,
|
|
2903
2943
|
onSpacingChange: context.onSpacingChange
|
|
2904
2944
|
};
|
|
2905
|
-
return /* @__PURE__ */
|
|
2945
|
+
return /* @__PURE__ */ jsx31(ThemeContext.Provider, { value: contextProps, children: /* @__PURE__ */ jsx31(
|
|
2906
2946
|
"div",
|
|
2907
2947
|
{
|
|
2908
2948
|
ref,
|
|
@@ -2919,7 +2959,7 @@ var ThemeSub = React29.forwardRef((props, ref) => {
|
|
|
2919
2959
|
ThemeSub.displayName = "ThemeSub";
|
|
2920
2960
|
|
|
2921
2961
|
// src/components/theme/theme-control.tsx
|
|
2922
|
-
import { jsx as
|
|
2962
|
+
import { jsx as jsx32, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2923
2963
|
function ThemeControl() {
|
|
2924
2964
|
const {
|
|
2925
2965
|
appearance,
|
|
@@ -2939,11 +2979,11 @@ function ThemeControl() {
|
|
|
2939
2979
|
value: appearance,
|
|
2940
2980
|
onValueChange: (change) => onAppearanceChange?.(change),
|
|
2941
2981
|
children: [
|
|
2942
|
-
/* @__PURE__ */
|
|
2943
|
-
/* @__PURE__ */
|
|
2982
|
+
/* @__PURE__ */ jsx32(Select.Label, { position: "inside", children: "Theme Settings" }),
|
|
2983
|
+
/* @__PURE__ */ jsx32(Select.Trigger, {}),
|
|
2944
2984
|
/* @__PURE__ */ jsxs9(Select.Content, { children: [
|
|
2945
|
-
/* @__PURE__ */
|
|
2946
|
-
/* @__PURE__ */
|
|
2985
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "light", children: "Light" }),
|
|
2986
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "dark", children: "Dark" })
|
|
2947
2987
|
] })
|
|
2948
2988
|
]
|
|
2949
2989
|
}
|
|
@@ -2955,16 +2995,16 @@ function ThemeControl() {
|
|
|
2955
2995
|
value: radius,
|
|
2956
2996
|
onValueChange: (change) => onRadiusChange?.(change),
|
|
2957
2997
|
children: [
|
|
2958
|
-
/* @__PURE__ */
|
|
2959
|
-
/* @__PURE__ */
|
|
2998
|
+
/* @__PURE__ */ jsx32(Select.Label, { position: "inside", children: "Radius" }),
|
|
2999
|
+
/* @__PURE__ */ jsx32(Select.Trigger, {}),
|
|
2960
3000
|
/* @__PURE__ */ jsxs9(Select.Content, { children: [
|
|
2961
|
-
/* @__PURE__ */
|
|
2962
|
-
/* @__PURE__ */
|
|
2963
|
-
/* @__PURE__ */
|
|
2964
|
-
/* @__PURE__ */
|
|
2965
|
-
/* @__PURE__ */
|
|
2966
|
-
/* @__PURE__ */
|
|
2967
|
-
/* @__PURE__ */
|
|
3001
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "none", children: "None" }),
|
|
3002
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "xs", children: "XS" }),
|
|
3003
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "sm", children: "SM" }),
|
|
3004
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "md", children: "MD" }),
|
|
3005
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "lg", children: "LG" }),
|
|
3006
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "xl", children: "XL" }),
|
|
3007
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "full", children: "FULL" })
|
|
2968
3008
|
] })
|
|
2969
3009
|
]
|
|
2970
3010
|
}
|
|
@@ -2976,15 +3016,15 @@ function ThemeControl() {
|
|
|
2976
3016
|
value: roundness2,
|
|
2977
3017
|
onValueChange: (change) => onRoundnessChange?.(change),
|
|
2978
3018
|
children: [
|
|
2979
|
-
/* @__PURE__ */
|
|
2980
|
-
/* @__PURE__ */
|
|
3019
|
+
/* @__PURE__ */ jsx32(Select.Label, { className: "min-w-40!", position: "inside", children: "Roundness" }),
|
|
3020
|
+
/* @__PURE__ */ jsx32(Select.Trigger, {}),
|
|
2981
3021
|
/* @__PURE__ */ jsxs9(Select.Content, { children: [
|
|
2982
|
-
/* @__PURE__ */
|
|
2983
|
-
/* @__PURE__ */
|
|
2984
|
-
/* @__PURE__ */
|
|
2985
|
-
/* @__PURE__ */
|
|
2986
|
-
/* @__PURE__ */
|
|
2987
|
-
/* @__PURE__ */
|
|
3022
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "1", children: "1" }),
|
|
3023
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "2", children: "2" }),
|
|
3024
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "3", children: "3" }),
|
|
3025
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "4", children: "4" }),
|
|
3026
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "5", children: "5" }),
|
|
3027
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "6", children: "6" })
|
|
2988
3028
|
] })
|
|
2989
3029
|
]
|
|
2990
3030
|
}
|
|
@@ -2996,14 +3036,14 @@ function ThemeControl() {
|
|
|
2996
3036
|
value: spacing,
|
|
2997
3037
|
onValueChange: (change) => onSpacingChange?.(change),
|
|
2998
3038
|
children: [
|
|
2999
|
-
/* @__PURE__ */
|
|
3000
|
-
/* @__PURE__ */
|
|
3039
|
+
/* @__PURE__ */ jsx32(Select.Label, { position: "inside", children: "Spacing" }),
|
|
3040
|
+
/* @__PURE__ */ jsx32(Select.Trigger, {}),
|
|
3001
3041
|
/* @__PURE__ */ jsxs9(Select.Content, { children: [
|
|
3002
|
-
/* @__PURE__ */
|
|
3003
|
-
/* @__PURE__ */
|
|
3004
|
-
/* @__PURE__ */
|
|
3005
|
-
/* @__PURE__ */
|
|
3006
|
-
/* @__PURE__ */
|
|
3042
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "xs", children: "XS" }),
|
|
3043
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "sm", children: "SM" }),
|
|
3044
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "md", children: "MD" }),
|
|
3045
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "lg", children: "LG" }),
|
|
3046
|
+
/* @__PURE__ */ jsx32(Select.Item, { value: "xl", children: "XL" })
|
|
3007
3047
|
] })
|
|
3008
3048
|
]
|
|
3009
3049
|
}
|
|
@@ -3012,6 +3052,7 @@ function ThemeControl() {
|
|
|
3012
3052
|
}
|
|
3013
3053
|
export {
|
|
3014
3054
|
Accordion,
|
|
3055
|
+
Badge,
|
|
3015
3056
|
Box,
|
|
3016
3057
|
Button,
|
|
3017
3058
|
Checkbox,
|