doodleui-react 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -8,6 +8,13 @@ var CheckboxPrimitive = require('@radix-ui/react-checkbox');
8
8
  var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
9
9
  var Dialog = require('@radix-ui/react-dialog');
10
10
  var TooltipPrimitive = require('@radix-ui/react-tooltip');
11
+ var SelectPrimitive = require('@radix-ui/react-select');
12
+ var SwitchPrimitive = require('@radix-ui/react-switch');
13
+ var TabsPrimitive = require('@radix-ui/react-tabs');
14
+ var ToastPrimitive = require('@radix-ui/react-toast');
15
+ var AccordionPrimitive = require('@radix-ui/react-accordion');
16
+ var AvatarPrimitive = require('@radix-ui/react-avatar');
17
+ var SliderPrimitive = require('@radix-ui/react-slider');
11
18
 
12
19
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
13
20
 
@@ -34,6 +41,13 @@ var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimit
34
41
  var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
35
42
  var Dialog__namespace = /*#__PURE__*/_interopNamespace(Dialog);
36
43
  var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
44
+ var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
45
+ var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
46
+ var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
47
+ var ToastPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToastPrimitive);
48
+ var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
49
+ var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
50
+ var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
37
51
 
38
52
  // src/types.ts
39
53
  function toRoughOptions(props) {
@@ -88,6 +102,13 @@ function cn(...parts) {
88
102
  const value = parts.filter(Boolean).join(" ");
89
103
  return value.length > 0 ? value : void 0;
90
104
  }
105
+ function deriveSeed(base, key) {
106
+ let hash = 0;
107
+ for (let i = 0; i < key.length; i += 1) {
108
+ hash = hash * 31 + key.charCodeAt(i) | 0;
109
+ }
110
+ return (base + (hash >>> 0)) % 2 ** 31;
111
+ }
91
112
  var SketchSeedContext = react.createContext(null);
92
113
  function SketchSeedProvider({
93
114
  children,
@@ -1281,9 +1302,1959 @@ function Tooltip({
1281
1302
  ) })
1282
1303
  ] });
1283
1304
  }
1305
+ var CHEVRON_PATH = "M 4 6 L 10 12 L 16 6";
1306
+ var UNDERLINE_INSET = 4;
1307
+ var SelectSketchContext = react.createContext(
1308
+ null
1309
+ );
1310
+ function useSelectSketch() {
1311
+ const ctx = react.useContext(SelectSketchContext);
1312
+ if (!ctx) {
1313
+ throw new Error("Select parts must be used inside <Select>.");
1314
+ }
1315
+ return ctx;
1316
+ }
1317
+ function Select({
1318
+ options,
1319
+ placeholder = "Select\u2026",
1320
+ className,
1321
+ style,
1322
+ roughness,
1323
+ seed,
1324
+ sketchColor,
1325
+ bowing,
1326
+ fillStyle,
1327
+ strokeWidth,
1328
+ value,
1329
+ defaultValue,
1330
+ onValueChange,
1331
+ "aria-label": ariaLabel,
1332
+ ...rest
1333
+ }) {
1334
+ const [uncontrolled, setUncontrolled] = react.useState(defaultValue);
1335
+ const selectedValue = value ?? uncontrolled;
1336
+ const selectedLabel = options.find((option) => option.value === selectedValue)?.label;
1337
+ const resolvedSeed = useResolvedSeed(seed);
1338
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
1339
+ return /* @__PURE__ */ jsxRuntime.jsx(
1340
+ SelectSketchContext.Provider,
1341
+ {
1342
+ value: {
1343
+ roughness,
1344
+ seed: resolvedSeed,
1345
+ sketchColor,
1346
+ bowing,
1347
+ fillStyle,
1348
+ strokeWidth,
1349
+ resolvedSeed,
1350
+ ink,
1351
+ selectedValue,
1352
+ selectedLabel,
1353
+ placeholder
1354
+ },
1355
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1356
+ SelectPrimitive__namespace.Root,
1357
+ {
1358
+ value,
1359
+ defaultValue,
1360
+ onValueChange: (next) => {
1361
+ setUncontrolled(next);
1362
+ onValueChange?.(next);
1363
+ },
1364
+ ...rest,
1365
+ children: [
1366
+ /* @__PURE__ */ jsxRuntime.jsx(
1367
+ SelectTrigger,
1368
+ {
1369
+ className,
1370
+ style,
1371
+ placeholder,
1372
+ "aria-label": ariaLabel
1373
+ }
1374
+ ),
1375
+ /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
1376
+ SelectItem,
1377
+ {
1378
+ value: option.value,
1379
+ disabled: option.disabled,
1380
+ children: option.label
1381
+ },
1382
+ option.value
1383
+ )) })
1384
+ ]
1385
+ }
1386
+ )
1387
+ }
1388
+ );
1389
+ }
1390
+ var SelectTrigger = react.forwardRef(
1391
+ function SelectTrigger2({ className, style, placeholder, children, ...rest }, ref) {
1392
+ const sketch = useSelectSketch();
1393
+ const [openish, setOpenish] = react.useState(false);
1394
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1395
+ SelectPrimitive__namespace.Trigger,
1396
+ {
1397
+ ref,
1398
+ className: cn(className),
1399
+ onPointerDown: () => setOpenish(true),
1400
+ onBlur: () => setOpenish(false),
1401
+ style: {
1402
+ position: "relative",
1403
+ display: "inline-flex",
1404
+ alignItems: "center",
1405
+ justifyContent: "space-between",
1406
+ gap: 12,
1407
+ minWidth: 180,
1408
+ minHeight: 38,
1409
+ padding: "8px 12px",
1410
+ border: "none",
1411
+ background: "transparent",
1412
+ cursor: "pointer",
1413
+ color: sketch.ink,
1414
+ fontFamily: doodleUiFontFamily,
1415
+ fontSize: 15,
1416
+ lineHeight: 1.2,
1417
+ outline: "none",
1418
+ textAlign: "left",
1419
+ ...style
1420
+ },
1421
+ ...rest,
1422
+ children: [
1423
+ /* @__PURE__ */ jsxRuntime.jsx(
1424
+ RoughSvg,
1425
+ {
1426
+ shape: "rectangle",
1427
+ roughness: sketch.roughness,
1428
+ seed: sketch.resolvedSeed,
1429
+ sketchColor: openish ? SKETCH_COLORS.accent : sketch.ink,
1430
+ bowing: sketch.bowing,
1431
+ fillStyle: sketch.fillStyle,
1432
+ strokeWidth: openish ? (sketch.strokeWidth ?? 1.75) + 0.35 : sketch.strokeWidth
1433
+ }
1434
+ ),
1435
+ /* @__PURE__ */ jsxRuntime.jsx(
1436
+ "span",
1437
+ {
1438
+ style: {
1439
+ position: "relative",
1440
+ zIndex: 1,
1441
+ flex: 1,
1442
+ overflow: "hidden",
1443
+ textOverflow: "ellipsis",
1444
+ whiteSpace: "nowrap"
1445
+ },
1446
+ children: children ?? sketch.selectedLabel ?? placeholder
1447
+ }
1448
+ ),
1449
+ /* @__PURE__ */ jsxRuntime.jsx(
1450
+ SelectPrimitive__namespace.Icon,
1451
+ {
1452
+ style: {
1453
+ position: "relative",
1454
+ zIndex: 1,
1455
+ width: 18,
1456
+ height: 18,
1457
+ flexShrink: 0
1458
+ },
1459
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1460
+ RoughSvg,
1461
+ {
1462
+ shape: "path",
1463
+ path: CHEVRON_PATH,
1464
+ roughness: (sketch.roughness ?? 1.5) * 0.7,
1465
+ seed: sketch.resolvedSeed,
1466
+ sketchColor: sketch.ink,
1467
+ bowing: sketch.bowing,
1468
+ strokeWidth: (sketch.strokeWidth ?? 1.6) + 0.2,
1469
+ inset: 0
1470
+ }
1471
+ )
1472
+ }
1473
+ )
1474
+ ]
1475
+ }
1476
+ );
1477
+ }
1478
+ );
1479
+ var SelectContent = react.forwardRef(
1480
+ function SelectContent2({ className, style, children, ...rest }, ref) {
1481
+ const sketch = useSelectSketch();
1482
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1483
+ SelectPrimitive__namespace.Content,
1484
+ {
1485
+ ref,
1486
+ position: "popper",
1487
+ sideOffset: 6,
1488
+ className: cn(className),
1489
+ style: {
1490
+ zIndex: 80,
1491
+ outline: "none",
1492
+ minWidth: "var(--radix-select-trigger-width)",
1493
+ ...style
1494
+ },
1495
+ ...rest,
1496
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1497
+ SketchBox,
1498
+ {
1499
+ roughness: sketch.roughness,
1500
+ seed: sketch.resolvedSeed,
1501
+ sketchColor: sketch.ink,
1502
+ bowing: sketch.bowing,
1503
+ fillStyle: sketch.fillStyle ?? "solid",
1504
+ fill: "#f7f6f2",
1505
+ strokeWidth: sketch.strokeWidth ?? 1.5,
1506
+ contentStyle: { padding: "6px 4px" },
1507
+ children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Viewport, { children })
1508
+ }
1509
+ )
1510
+ }
1511
+ ) });
1512
+ }
1513
+ );
1514
+ var SelectItem = react.forwardRef(
1515
+ function SelectItem2({ className, style, children, value, ...rest }, ref) {
1516
+ const sketch = useSelectSketch();
1517
+ const [highlighted, setHighlighted] = react.useState(false);
1518
+ const selected = sketch.selectedValue === value;
1519
+ const mark = highlighted || selected;
1520
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1521
+ SelectPrimitive__namespace.Item,
1522
+ {
1523
+ ref,
1524
+ value,
1525
+ className: cn(className),
1526
+ onPointerMove: () => setHighlighted(true),
1527
+ onPointerLeave: () => setHighlighted(false),
1528
+ onFocus: () => setHighlighted(true),
1529
+ onBlur: () => setHighlighted(false),
1530
+ style: {
1531
+ position: "relative",
1532
+ display: "flex",
1533
+ alignItems: "center",
1534
+ padding: "7px 12px",
1535
+ fontFamily: doodleUiFontFamily,
1536
+ fontSize: 14,
1537
+ color: sketch.ink,
1538
+ outline: "none",
1539
+ cursor: "pointer",
1540
+ userSelect: "none",
1541
+ fontWeight: selected ? doodleUiFontWeight(650) : doodleUiFontWeight(400),
1542
+ ...style
1543
+ },
1544
+ ...rest,
1545
+ children: [
1546
+ mark ? /* @__PURE__ */ jsxRuntime.jsx(
1547
+ RoughSvg,
1548
+ {
1549
+ shape: "line",
1550
+ roughness: (sketch.roughness ?? 1.5) + 0.4,
1551
+ seed: sketch.resolvedSeed,
1552
+ sketchColor: selected ? SKETCH_COLORS.accent : sketch.ink,
1553
+ bowing: sketch.bowing ?? 1.6,
1554
+ strokeWidth: selected ? 1.8 : 1.3,
1555
+ inset: UNDERLINE_INSET,
1556
+ style: { opacity: selected ? 0.9 : 0.45 }
1557
+ }
1558
+ ) : null,
1559
+ /* @__PURE__ */ jsxRuntime.jsx(
1560
+ SelectPrimitive__namespace.ItemText,
1561
+ {
1562
+ style: { position: "relative", zIndex: 1 },
1563
+ children
1564
+ }
1565
+ )
1566
+ ]
1567
+ }
1568
+ );
1569
+ }
1570
+ );
1571
+ var SelectRoot = SelectPrimitive__namespace.Root;
1572
+ var SelectValue = SelectPrimitive__namespace.Value;
1573
+ var SelectGroup = SelectPrimitive__namespace.Group;
1574
+ var SelectLabel = SelectPrimitive__namespace.Label;
1575
+ var SelectSeparator = SelectPrimitive__namespace.Separator;
1576
+ var TRACK_W = 44;
1577
+ var TRACK_H = 24;
1578
+ var THUMB = 18;
1579
+ var THUMB_OFF = 3;
1580
+ var THUMB_ON = TRACK_W - THUMB - 3;
1581
+ var Switch = react.forwardRef(
1582
+ function Switch2({
1583
+ className,
1584
+ style,
1585
+ label,
1586
+ roughness,
1587
+ seed,
1588
+ sketchColor,
1589
+ bowing,
1590
+ fillStyle,
1591
+ strokeWidth,
1592
+ checked,
1593
+ defaultChecked,
1594
+ onCheckedChange,
1595
+ id,
1596
+ ...rest
1597
+ }, ref) {
1598
+ const [uncontrolled, setUncontrolled] = react.useState(defaultChecked === true);
1599
+ const isOn = checked ?? uncontrolled;
1600
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
1601
+ const resolvedSeed = useResolvedSeed(seed);
1602
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1603
+ "span",
1604
+ {
1605
+ className: cn(className),
1606
+ style: {
1607
+ display: "inline-flex",
1608
+ alignItems: "center",
1609
+ gap: 8,
1610
+ cursor: "pointer",
1611
+ userSelect: "none",
1612
+ ...style
1613
+ },
1614
+ children: [
1615
+ /* @__PURE__ */ jsxRuntime.jsxs(
1616
+ SwitchPrimitive__namespace.Root,
1617
+ {
1618
+ ref,
1619
+ id,
1620
+ checked,
1621
+ defaultChecked,
1622
+ onCheckedChange: (next) => {
1623
+ setUncontrolled(next);
1624
+ onCheckedChange?.(next);
1625
+ },
1626
+ style: {
1627
+ position: "relative",
1628
+ width: TRACK_W,
1629
+ height: TRACK_H,
1630
+ padding: 0,
1631
+ border: "none",
1632
+ background: "transparent",
1633
+ flexShrink: 0,
1634
+ cursor: "pointer",
1635
+ outline: "none"
1636
+ },
1637
+ ...rest,
1638
+ children: [
1639
+ /* @__PURE__ */ jsxRuntime.jsx(
1640
+ RoughSvg,
1641
+ {
1642
+ shape: "rectangle",
1643
+ roughness,
1644
+ seed: resolvedSeed,
1645
+ sketchColor: isOn ? SKETCH_COLORS.accent : ink,
1646
+ bowing: bowing ?? 1.4,
1647
+ fillStyle: fillStyle ?? (isOn ? "hachure" : void 0),
1648
+ fill: isOn ? SKETCH_COLORS.accentFill : void 0,
1649
+ strokeWidth: strokeWidth ?? 1.6,
1650
+ inset: 1.5
1651
+ }
1652
+ ),
1653
+ /* @__PURE__ */ jsxRuntime.jsx(
1654
+ SwitchPrimitive__namespace.Thumb,
1655
+ {
1656
+ style: {
1657
+ position: "absolute",
1658
+ top: (TRACK_H - THUMB) / 2,
1659
+ left: 0,
1660
+ width: THUMB,
1661
+ height: THUMB,
1662
+ display: "block",
1663
+ transform: `translateX(${isOn ? THUMB_ON : THUMB_OFF}px)`,
1664
+ transition: "transform 160ms ease",
1665
+ zIndex: 1
1666
+ },
1667
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1668
+ RoughSvg,
1669
+ {
1670
+ shape: "ellipse",
1671
+ roughness: (roughness ?? 1.5) * 0.85,
1672
+ seed: deriveSeed(resolvedSeed, "thumb"),
1673
+ sketchColor: isOn ? SKETCH_COLORS.accent : ink,
1674
+ fill: "#f7f6f2",
1675
+ fillStyle: "solid",
1676
+ bowing,
1677
+ strokeWidth: (strokeWidth ?? 1.5) + 0.2,
1678
+ inset: 1
1679
+ }
1680
+ )
1681
+ }
1682
+ )
1683
+ ]
1684
+ }
1685
+ ),
1686
+ label ? /* @__PURE__ */ jsxRuntime.jsx(
1687
+ "label",
1688
+ {
1689
+ htmlFor: id,
1690
+ style: {
1691
+ fontSize: 15,
1692
+ cursor: "pointer",
1693
+ fontFamily: doodleUiFontFamily
1694
+ },
1695
+ children: label
1696
+ }
1697
+ ) : null
1698
+ ]
1699
+ }
1700
+ );
1701
+ }
1702
+ );
1703
+ var TabsSketchContext = react.createContext(null);
1704
+ function useTabsSketch() {
1705
+ const ctx = react.useContext(TabsSketchContext);
1706
+ if (!ctx) {
1707
+ throw new Error("Tab parts must be used inside <Tabs>.");
1708
+ }
1709
+ return ctx;
1710
+ }
1711
+ var Tabs = react.forwardRef(function Tabs2({
1712
+ className,
1713
+ style,
1714
+ children,
1715
+ value,
1716
+ defaultValue,
1717
+ onValueChange,
1718
+ roughness,
1719
+ seed,
1720
+ sketchColor,
1721
+ bowing,
1722
+ fillStyle,
1723
+ strokeWidth,
1724
+ ...rest
1725
+ }, ref) {
1726
+ const [uncontrolled, setUncontrolled] = react.useState(defaultValue);
1727
+ const current = value ?? uncontrolled;
1728
+ const resolvedSeed = useResolvedSeed(seed);
1729
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
1730
+ return /* @__PURE__ */ jsxRuntime.jsx(
1731
+ TabsSketchContext.Provider,
1732
+ {
1733
+ value: {
1734
+ roughness,
1735
+ seed: resolvedSeed,
1736
+ sketchColor,
1737
+ bowing,
1738
+ fillStyle,
1739
+ strokeWidth,
1740
+ resolvedSeed,
1741
+ ink,
1742
+ current
1743
+ },
1744
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1745
+ TabsPrimitive__namespace.Root,
1746
+ {
1747
+ ref,
1748
+ className: cn(className),
1749
+ style,
1750
+ value: current,
1751
+ defaultValue,
1752
+ onValueChange: (next) => {
1753
+ setUncontrolled(next);
1754
+ onValueChange?.(next);
1755
+ },
1756
+ ...rest,
1757
+ children
1758
+ }
1759
+ )
1760
+ }
1761
+ );
1762
+ });
1763
+ var TabList = react.forwardRef(
1764
+ function TabList2({ className, style, children, ...rest }, ref) {
1765
+ return /* @__PURE__ */ jsxRuntime.jsx(
1766
+ TabsPrimitive__namespace.List,
1767
+ {
1768
+ ref,
1769
+ className: cn(className),
1770
+ style: {
1771
+ display: "flex",
1772
+ flexWrap: "wrap",
1773
+ gap: 4,
1774
+ ...style
1775
+ },
1776
+ ...rest,
1777
+ children
1778
+ }
1779
+ );
1780
+ }
1781
+ );
1782
+ var Tab = react.forwardRef(function Tab2({ className, style, children, value, ...rest }, ref) {
1783
+ const sketch = useTabsSketch();
1784
+ const active = sketch.current === value;
1785
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1786
+ TabsPrimitive__namespace.Trigger,
1787
+ {
1788
+ ref,
1789
+ value,
1790
+ className: cn(className),
1791
+ style: {
1792
+ position: "relative",
1793
+ border: "none",
1794
+ background: "transparent",
1795
+ cursor: "pointer",
1796
+ padding: "8px 14px 12px",
1797
+ fontFamily: doodleUiFontFamily,
1798
+ fontSize: 15,
1799
+ fontWeight: active ? doodleUiFontWeight(650) : doodleUiFontWeight(400),
1800
+ color: sketch.ink,
1801
+ outline: "none",
1802
+ ...style
1803
+ },
1804
+ ...rest,
1805
+ children: [
1806
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children }),
1807
+ active ? /* @__PURE__ */ jsxRuntime.jsx(
1808
+ "span",
1809
+ {
1810
+ style: {
1811
+ position: "absolute",
1812
+ left: 8,
1813
+ right: 8,
1814
+ bottom: 2,
1815
+ height: 10,
1816
+ pointerEvents: "none"
1817
+ },
1818
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1819
+ RoughSvg,
1820
+ {
1821
+ shape: "line",
1822
+ roughness: (sketch.roughness ?? 1.5) + 0.35,
1823
+ seed: deriveSeed(sketch.resolvedSeed, value),
1824
+ sketchColor: SKETCH_COLORS.accent,
1825
+ bowing: sketch.bowing ?? 1.8,
1826
+ strokeWidth: (sketch.strokeWidth ?? 1.75) + 0.4,
1827
+ inset: 2
1828
+ }
1829
+ )
1830
+ }
1831
+ ) : null
1832
+ ]
1833
+ }
1834
+ );
1835
+ });
1836
+ var TabPanel = react.forwardRef(
1837
+ function TabPanel2({ className, style, children, ...rest }, ref) {
1838
+ const sketch = useTabsSketch();
1839
+ return /* @__PURE__ */ jsxRuntime.jsx(
1840
+ TabsPrimitive__namespace.Content,
1841
+ {
1842
+ ref,
1843
+ className: cn(className),
1844
+ style: {
1845
+ paddingTop: 14,
1846
+ fontFamily: doodleUiFontFamily,
1847
+ color: sketch.ink,
1848
+ fontSize: 15,
1849
+ lineHeight: 1.5,
1850
+ outline: "none",
1851
+ ...style
1852
+ },
1853
+ ...rest,
1854
+ children
1855
+ }
1856
+ );
1857
+ }
1858
+ );
1859
+ var TableSketchContext = react.createContext(null);
1860
+ function useTableSketch() {
1861
+ const ctx = react.useContext(TableSketchContext);
1862
+ if (!ctx) {
1863
+ throw new Error("Table parts must be used inside <Table>.");
1864
+ }
1865
+ return ctx;
1866
+ }
1867
+ var Table = react.forwardRef(function Table2({
1868
+ className,
1869
+ style,
1870
+ children,
1871
+ headerUnderline = true,
1872
+ roughness,
1873
+ seed,
1874
+ sketchColor,
1875
+ bowing,
1876
+ fillStyle,
1877
+ strokeWidth,
1878
+ ...rest
1879
+ }, ref) {
1880
+ const wrapperRef = react.useRef(null);
1881
+ const tableRef = react.useRef(null);
1882
+ const [lines, setLines] = react.useState([]);
1883
+ const resolvedSeed = useResolvedSeed(seed);
1884
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
1885
+ react.useLayoutEffect(() => {
1886
+ const wrapper = wrapperRef.current;
1887
+ const table = tableRef.current;
1888
+ if (!wrapper || !table) return;
1889
+ const measure = () => {
1890
+ const rows = Array.from(table.querySelectorAll("tr"));
1891
+ const next = [];
1892
+ rows.forEach((row, index) => {
1893
+ const isLast = index === rows.length - 1;
1894
+ const isHeader = row.parentElement?.tagName === "THEAD";
1895
+ if (isLast && !isHeader) return;
1896
+ next.push({
1897
+ y: row.offsetTop + row.offsetHeight,
1898
+ width: table.offsetWidth,
1899
+ key: isHeader ? `header-${index}` : `row-${index}`,
1900
+ header: Boolean(isHeader)
1901
+ });
1902
+ });
1903
+ setLines(next);
1904
+ };
1905
+ measure();
1906
+ const observer = new ResizeObserver(measure);
1907
+ observer.observe(table);
1908
+ observer.observe(wrapper);
1909
+ return () => observer.disconnect();
1910
+ }, [children]);
1911
+ return /* @__PURE__ */ jsxRuntime.jsx(
1912
+ TableSketchContext.Provider,
1913
+ {
1914
+ value: {
1915
+ roughness,
1916
+ seed: resolvedSeed,
1917
+ sketchColor,
1918
+ bowing,
1919
+ fillStyle,
1920
+ strokeWidth,
1921
+ resolvedSeed,
1922
+ ink
1923
+ },
1924
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1925
+ "div",
1926
+ {
1927
+ ref: wrapperRef,
1928
+ className: cn(className),
1929
+ style: { position: "relative", width: "100%", ...style },
1930
+ children: [
1931
+ /* @__PURE__ */ jsxRuntime.jsx(
1932
+ "div",
1933
+ {
1934
+ "aria-hidden": "true",
1935
+ style: {
1936
+ position: "absolute",
1937
+ inset: 0,
1938
+ pointerEvents: "none",
1939
+ zIndex: 1,
1940
+ overflow: "visible"
1941
+ },
1942
+ children: lines.map((line) => {
1943
+ if (line.header && !headerUnderline) return null;
1944
+ return /* @__PURE__ */ jsxRuntime.jsx(
1945
+ "div",
1946
+ {
1947
+ style: {
1948
+ position: "absolute",
1949
+ left: 0,
1950
+ width: line.width,
1951
+ top: line.y - 6,
1952
+ height: 12
1953
+ },
1954
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1955
+ RoughSvg,
1956
+ {
1957
+ shape: "line",
1958
+ roughness: line.header ? (roughness ?? 1.5) + 0.2 : roughness ?? 1.7,
1959
+ seed: deriveSeed(resolvedSeed, line.key),
1960
+ sketchColor: ink,
1961
+ bowing: bowing ?? (line.header ? 1.4 : 2),
1962
+ strokeWidth: line.header ? (strokeWidth ?? 1.75) + 0.35 : strokeWidth ?? 1.35,
1963
+ inset: 6
1964
+ }
1965
+ )
1966
+ },
1967
+ line.key
1968
+ );
1969
+ })
1970
+ }
1971
+ ),
1972
+ /* @__PURE__ */ jsxRuntime.jsx(
1973
+ "table",
1974
+ {
1975
+ ref: (node) => {
1976
+ tableRef.current = node;
1977
+ if (typeof ref === "function") ref(node);
1978
+ else if (ref) ref.current = node;
1979
+ },
1980
+ style: {
1981
+ width: "100%",
1982
+ borderCollapse: "collapse",
1983
+ position: "relative",
1984
+ zIndex: 0,
1985
+ fontFamily: doodleUiFontFamily,
1986
+ color: ink
1987
+ },
1988
+ ...rest,
1989
+ children
1990
+ }
1991
+ )
1992
+ ]
1993
+ }
1994
+ )
1995
+ }
1996
+ );
1997
+ });
1998
+ var TableHead = react.forwardRef(function TableHead2({ className, style, ...rest }, ref) {
1999
+ return /* @__PURE__ */ jsxRuntime.jsx(
2000
+ "thead",
2001
+ {
2002
+ ref,
2003
+ className: cn(className),
2004
+ style,
2005
+ ...rest
2006
+ }
2007
+ );
2008
+ });
2009
+ var TableBody = react.forwardRef(function TableBody2({ className, style, ...rest }, ref) {
2010
+ return /* @__PURE__ */ jsxRuntime.jsx(
2011
+ "tbody",
2012
+ {
2013
+ ref,
2014
+ className: cn(className),
2015
+ style,
2016
+ ...rest
2017
+ }
2018
+ );
2019
+ });
2020
+ var TableRow = react.forwardRef(function TableRow2({ className, style, ...rest }, ref) {
2021
+ return /* @__PURE__ */ jsxRuntime.jsx(
2022
+ "tr",
2023
+ {
2024
+ ref,
2025
+ className: cn(className),
2026
+ style,
2027
+ ...rest
2028
+ }
2029
+ );
2030
+ });
2031
+ var TableHeaderCell = react.forwardRef(function TableHeaderCell2({ className, style, children, ...rest }, ref) {
2032
+ useTableSketch();
2033
+ return /* @__PURE__ */ jsxRuntime.jsx(
2034
+ "th",
2035
+ {
2036
+ ref,
2037
+ className: cn(className),
2038
+ style: {
2039
+ textAlign: "left",
2040
+ fontWeight: doodleUiFontWeight(650),
2041
+ fontSize: 13,
2042
+ padding: "10px 12px",
2043
+ ...style
2044
+ },
2045
+ ...rest,
2046
+ children
2047
+ }
2048
+ );
2049
+ });
2050
+ var TableCell = react.forwardRef(
2051
+ function TableCell2({ className, style, children, ...rest }, ref) {
2052
+ useTableSketch();
2053
+ return /* @__PURE__ */ jsxRuntime.jsx(
2054
+ "td",
2055
+ {
2056
+ ref,
2057
+ className: cn(className),
2058
+ style: {
2059
+ fontSize: 14,
2060
+ padding: "10px 12px",
2061
+ ...style
2062
+ },
2063
+ ...rest,
2064
+ children
2065
+ }
2066
+ );
2067
+ }
2068
+ );
2069
+ var VARIANT_COLOR2 = {
2070
+ info: SKETCH_COLORS.info,
2071
+ warning: SKETCH_COLORS.warning,
2072
+ error: SKETCH_COLORS.error,
2073
+ success: SKETCH_COLORS.success
2074
+ };
2075
+ var VARIANT_FILL2 = {
2076
+ info: "#d2deec",
2077
+ warning: "#f3e2c0",
2078
+ error: "#f3d0cc",
2079
+ success: "#d3e8dc"
2080
+ };
2081
+ var POSITION_STYLE = {
2082
+ "top-left": { top: 16, left: 16 },
2083
+ "top-right": { top: 16, right: 16 },
2084
+ "bottom-left": { bottom: 16, left: 16 },
2085
+ "bottom-right": { bottom: 16, right: 16 }
2086
+ };
2087
+ var ToastPositionContext = react.createContext("bottom-right");
2088
+ function ToastProvider({
2089
+ children,
2090
+ position = "bottom-right",
2091
+ duration = 4e3,
2092
+ swipeDirection = "right",
2093
+ label
2094
+ }) {
2095
+ return /* @__PURE__ */ jsxRuntime.jsx(ToastPositionContext.Provider, { value: position, children: /* @__PURE__ */ jsxRuntime.jsxs(
2096
+ ToastPrimitive__namespace.Provider,
2097
+ {
2098
+ duration,
2099
+ swipeDirection,
2100
+ label,
2101
+ children: [
2102
+ children,
2103
+ /* @__PURE__ */ jsxRuntime.jsx(
2104
+ ToastPrimitive__namespace.Viewport,
2105
+ {
2106
+ style: {
2107
+ position: "fixed",
2108
+ zIndex: 90,
2109
+ display: "flex",
2110
+ flexDirection: "column",
2111
+ gap: 10,
2112
+ width: "min(360px, calc(100vw - 32px))",
2113
+ margin: 0,
2114
+ padding: 0,
2115
+ listStyle: "none",
2116
+ outline: "none",
2117
+ ...POSITION_STYLE[position]
2118
+ }
2119
+ }
2120
+ )
2121
+ ]
2122
+ }
2123
+ ) });
2124
+ }
2125
+ function Toast({
2126
+ open,
2127
+ defaultOpen,
2128
+ onOpenChange,
2129
+ title,
2130
+ children,
2131
+ variant = "info",
2132
+ duration,
2133
+ className,
2134
+ style,
2135
+ roughness,
2136
+ seed,
2137
+ sketchColor,
2138
+ bowing,
2139
+ fillStyle,
2140
+ strokeWidth
2141
+ }) {
2142
+ const position = react.useContext(ToastPositionContext);
2143
+ const fromTop = position.startsWith("top");
2144
+ const [entered, setEntered] = react.useState(false);
2145
+ const color = sketchColor ?? VARIANT_COLOR2[variant];
2146
+ const visible = open ?? true;
2147
+ react.useLayoutEffect(() => {
2148
+ if (!visible) {
2149
+ setEntered(false);
2150
+ return;
2151
+ }
2152
+ setEntered(false);
2153
+ const frame = requestAnimationFrame(() => {
2154
+ requestAnimationFrame(() => setEntered(true));
2155
+ });
2156
+ return () => cancelAnimationFrame(frame);
2157
+ }, [visible]);
2158
+ return /* @__PURE__ */ jsxRuntime.jsx(
2159
+ ToastPrimitive__namespace.Root,
2160
+ {
2161
+ open,
2162
+ defaultOpen,
2163
+ onOpenChange,
2164
+ duration,
2165
+ className: cn(className),
2166
+ style: {
2167
+ transform: entered ? "translateY(0)" : `translateY(${fromTop ? "-10px" : "10px"})`,
2168
+ opacity: entered ? 1 : 0,
2169
+ transition: "transform 200ms ease, opacity 200ms ease",
2170
+ outline: "none",
2171
+ ...style
2172
+ },
2173
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
2174
+ SketchBox,
2175
+ {
2176
+ roughness,
2177
+ seed,
2178
+ sketchColor: color,
2179
+ bowing,
2180
+ fillStyle: fillStyle ?? "hachure",
2181
+ fill: VARIANT_FILL2[variant],
2182
+ strokeWidth: strokeWidth ?? 1.7,
2183
+ shadow: true,
2184
+ contentStyle: { padding: "12px 16px" },
2185
+ children: [
2186
+ title ? /* @__PURE__ */ jsxRuntime.jsx(
2187
+ ToastPrimitive__namespace.Title,
2188
+ {
2189
+ style: {
2190
+ margin: 0,
2191
+ fontWeight: doodleUiFontWeight(700),
2192
+ fontSize: 15,
2193
+ fontFamily: doodleUiFontFamily,
2194
+ color,
2195
+ marginBottom: children ? 4 : 0
2196
+ },
2197
+ children: title
2198
+ }
2199
+ ) : null,
2200
+ children ? /* @__PURE__ */ jsxRuntime.jsx(
2201
+ ToastPrimitive__namespace.Description,
2202
+ {
2203
+ style: {
2204
+ margin: 0,
2205
+ fontSize: 14,
2206
+ lineHeight: 1.5,
2207
+ fontFamily: doodleUiFontFamily,
2208
+ color: SKETCH_COLORS.ink
2209
+ },
2210
+ children
2211
+ }
2212
+ ) : null
2213
+ ]
2214
+ }
2215
+ )
2216
+ }
2217
+ );
2218
+ }
2219
+ var ToastRoot = ToastPrimitive__namespace.Root;
2220
+ var ToastTitle = ToastPrimitive__namespace.Title;
2221
+ var ToastDescription = ToastPrimitive__namespace.Description;
2222
+ var ToastClose = ToastPrimitive__namespace.Close;
2223
+ var ToastAction = ToastPrimitive__namespace.Action;
2224
+ var ToastViewport = ToastPrimitive__namespace.Viewport;
2225
+ var CHEVRON_PATH2 = "M 6 4 L 12 10 L 6 16";
2226
+ var AccordionSketchContext = react.createContext(null);
2227
+ function useAccordionSketch() {
2228
+ const ctx = react.useContext(AccordionSketchContext);
2229
+ if (!ctx) {
2230
+ throw new Error("Accordion parts must be used inside <Accordion>.");
2231
+ }
2232
+ return ctx;
2233
+ }
2234
+ var AccordionItemContext = react.createContext("");
2235
+ var Accordion = react.forwardRef(
2236
+ function Accordion2({
2237
+ className,
2238
+ style,
2239
+ children,
2240
+ type = "single",
2241
+ collapsible = true,
2242
+ value,
2243
+ defaultValue,
2244
+ onValueChange,
2245
+ disabled,
2246
+ roughness,
2247
+ seed,
2248
+ sketchColor,
2249
+ bowing,
2250
+ fillStyle,
2251
+ strokeWidth
2252
+ }, ref) {
2253
+ const resolvedSeed = useResolvedSeed(seed);
2254
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
2255
+ const [uncontrolled, setUncontrolled] = react.useState(defaultValue ?? (type === "multiple" ? [] : void 0));
2256
+ const openValue = value ?? uncontrolled;
2257
+ const sketchValue = {
2258
+ roughness,
2259
+ seed: resolvedSeed,
2260
+ sketchColor,
2261
+ bowing,
2262
+ fillStyle,
2263
+ strokeWidth,
2264
+ resolvedSeed,
2265
+ ink,
2266
+ openValue
2267
+ };
2268
+ function handleChange(next) {
2269
+ setUncontrolled(next);
2270
+ onValueChange?.(next);
2271
+ }
2272
+ const root = type === "multiple" ? /* @__PURE__ */ jsxRuntime.jsx(
2273
+ AccordionPrimitive__namespace.Root,
2274
+ {
2275
+ ref,
2276
+ type: "multiple",
2277
+ disabled,
2278
+ className: cn(className),
2279
+ style,
2280
+ value: openValue,
2281
+ defaultValue,
2282
+ onValueChange: handleChange,
2283
+ children
2284
+ }
2285
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
2286
+ AccordionPrimitive__namespace.Root,
2287
+ {
2288
+ ref,
2289
+ type: "single",
2290
+ collapsible,
2291
+ disabled,
2292
+ className: cn(className),
2293
+ style,
2294
+ value: openValue,
2295
+ defaultValue,
2296
+ onValueChange: handleChange,
2297
+ children
2298
+ }
2299
+ );
2300
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionSketchContext.Provider, { value: sketchValue, children: root });
2301
+ }
2302
+ );
2303
+ var AccordionItem = react.forwardRef(
2304
+ function AccordionItem2({ className, style, children, value, ...rest }, ref) {
2305
+ const sketch = useAccordionSketch();
2306
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionItemContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsxs(
2307
+ AccordionPrimitive__namespace.Item,
2308
+ {
2309
+ ref,
2310
+ value,
2311
+ className: cn(className),
2312
+ style: { position: "relative", ...style },
2313
+ ...rest,
2314
+ children: [
2315
+ /* @__PURE__ */ jsxRuntime.jsx(
2316
+ "div",
2317
+ {
2318
+ style: {
2319
+ position: "absolute",
2320
+ left: 0,
2321
+ right: 0,
2322
+ top: -6,
2323
+ height: 12,
2324
+ pointerEvents: "none"
2325
+ },
2326
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2327
+ RoughSvg,
2328
+ {
2329
+ shape: "line",
2330
+ roughness: (sketch.roughness ?? 1.5) + 0.25,
2331
+ seed: deriveSeed(sketch.resolvedSeed, `div-${value}`),
2332
+ sketchColor: sketch.ink,
2333
+ bowing: sketch.bowing ?? 1.8,
2334
+ strokeWidth: sketch.strokeWidth ?? 1.4,
2335
+ inset: 2
2336
+ }
2337
+ )
2338
+ }
2339
+ ),
2340
+ children
2341
+ ]
2342
+ }
2343
+ ) });
2344
+ }
2345
+ );
2346
+ var AccordionTrigger = react.forwardRef(function AccordionTrigger2({ className, style, children, ...rest }, ref) {
2347
+ const sketch = useAccordionSketch();
2348
+ const itemValue = react.useContext(AccordionItemContext);
2349
+ const open = Array.isArray(sketch.openValue) ? sketch.openValue.includes(itemValue) : sketch.openValue === itemValue;
2350
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("h3", { style: { margin: 0 }, children: /* @__PURE__ */ jsxRuntime.jsxs(
2351
+ AccordionPrimitive__namespace.Trigger,
2352
+ {
2353
+ ref,
2354
+ className: cn(className),
2355
+ style: {
2356
+ display: "flex",
2357
+ width: "100%",
2358
+ alignItems: "center",
2359
+ justifyContent: "space-between",
2360
+ gap: 12,
2361
+ padding: "12px 4px",
2362
+ border: "none",
2363
+ background: "transparent",
2364
+ cursor: "pointer",
2365
+ fontFamily: doodleUiFontFamily,
2366
+ fontSize: 15,
2367
+ fontWeight: doodleUiFontWeight(600),
2368
+ color: sketch.ink,
2369
+ textAlign: "left",
2370
+ outline: "none",
2371
+ ...style
2372
+ },
2373
+ ...rest,
2374
+ children: [
2375
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children }),
2376
+ /* @__PURE__ */ jsxRuntime.jsx(
2377
+ "span",
2378
+ {
2379
+ style: {
2380
+ position: "relative",
2381
+ width: 18,
2382
+ height: 18,
2383
+ flexShrink: 0,
2384
+ transform: open ? "rotate(90deg)" : "rotate(0deg)",
2385
+ transition: "transform 180ms ease"
2386
+ },
2387
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2388
+ RoughSvg,
2389
+ {
2390
+ shape: "path",
2391
+ path: CHEVRON_PATH2,
2392
+ roughness: (sketch.roughness ?? 1.5) * 0.7,
2393
+ seed: deriveSeed(sketch.resolvedSeed, `chevron-${itemValue}`),
2394
+ sketchColor: sketch.ink,
2395
+ bowing: sketch.bowing,
2396
+ strokeWidth: (sketch.strokeWidth ?? 1.6) + 0.2,
2397
+ inset: 0
2398
+ }
2399
+ )
2400
+ }
2401
+ )
2402
+ ]
2403
+ }
2404
+ ) }) });
2405
+ });
2406
+ var AccordionContent = react.forwardRef(function AccordionContent2({ className, style, children, ...rest }, ref) {
2407
+ const sketch = useAccordionSketch();
2408
+ return /* @__PURE__ */ jsxRuntime.jsx(
2409
+ AccordionPrimitive__namespace.Content,
2410
+ {
2411
+ ref,
2412
+ className: cn(className),
2413
+ style: {
2414
+ padding: "0 4px 14px",
2415
+ fontFamily: doodleUiFontFamily,
2416
+ fontSize: 14,
2417
+ lineHeight: 1.5,
2418
+ color: sketch.ink,
2419
+ ...style
2420
+ },
2421
+ ...rest,
2422
+ children
2423
+ }
2424
+ );
2425
+ });
2426
+ var STATUS_COLOR = {
2427
+ online: SKETCH_COLORS.success,
2428
+ offline: "#8a8680",
2429
+ busy: SKETCH_COLORS.accent
2430
+ };
2431
+ var Avatar = react.forwardRef(
2432
+ function Avatar2({
2433
+ className,
2434
+ style,
2435
+ src,
2436
+ alt,
2437
+ fallback,
2438
+ size = 40,
2439
+ shape = "circle",
2440
+ status,
2441
+ roughness,
2442
+ seed,
2443
+ sketchColor,
2444
+ bowing,
2445
+ fillStyle,
2446
+ strokeWidth,
2447
+ ...rest
2448
+ }, ref) {
2449
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
2450
+ const resolvedSeed = useResolvedSeed(seed);
2451
+ const roughShape = shape === "circle" ? "ellipse" : "rectangle";
2452
+ const badge = 12;
2453
+ const rootStyle = {
2454
+ position: "relative",
2455
+ display: "inline-flex",
2456
+ width: size,
2457
+ height: size,
2458
+ flexShrink: 0,
2459
+ verticalAlign: "middle",
2460
+ ...style
2461
+ };
2462
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2463
+ AvatarPrimitive__namespace.Root,
2464
+ {
2465
+ ref,
2466
+ className: cn(className),
2467
+ style: rootStyle,
2468
+ ...rest,
2469
+ children: [
2470
+ /* @__PURE__ */ jsxRuntime.jsx(
2471
+ RoughSvg,
2472
+ {
2473
+ shape: roughShape,
2474
+ roughness,
2475
+ seed: resolvedSeed,
2476
+ sketchColor: ink,
2477
+ bowing,
2478
+ fillStyle: fillStyle ?? "solid",
2479
+ fill: "#f7f6f2",
2480
+ strokeWidth: strokeWidth ?? 1.6,
2481
+ inset: 1.5
2482
+ }
2483
+ ),
2484
+ /* @__PURE__ */ jsxRuntime.jsxs(
2485
+ "span",
2486
+ {
2487
+ style: {
2488
+ position: "absolute",
2489
+ inset: 4,
2490
+ overflow: "hidden",
2491
+ borderRadius: shape === "circle" ? "50%" : 4,
2492
+ zIndex: 1,
2493
+ display: "flex",
2494
+ alignItems: "center",
2495
+ justifyContent: "center"
2496
+ },
2497
+ children: [
2498
+ src ? /* @__PURE__ */ jsxRuntime.jsx(
2499
+ AvatarPrimitive__namespace.Image,
2500
+ {
2501
+ src,
2502
+ alt,
2503
+ style: {
2504
+ width: "100%",
2505
+ height: "100%",
2506
+ objectFit: "cover"
2507
+ }
2508
+ }
2509
+ ) : null,
2510
+ /* @__PURE__ */ jsxRuntime.jsx(
2511
+ AvatarPrimitive__namespace.Fallback,
2512
+ {
2513
+ delayMs: src ? 400 : 0,
2514
+ style: {
2515
+ width: "100%",
2516
+ height: "100%",
2517
+ display: "flex",
2518
+ alignItems: "center",
2519
+ justifyContent: "center",
2520
+ fontFamily: doodleUiFontFamily,
2521
+ fontWeight: doodleUiFontWeight(650),
2522
+ fontSize: Math.max(12, size * 0.36),
2523
+ color: ink,
2524
+ background: SKETCH_COLORS.secondaryFill
2525
+ },
2526
+ children: fallback
2527
+ }
2528
+ )
2529
+ ]
2530
+ }
2531
+ ),
2532
+ status ? /* @__PURE__ */ jsxRuntime.jsx(
2533
+ "span",
2534
+ {
2535
+ style: {
2536
+ position: "absolute",
2537
+ width: badge,
2538
+ height: badge,
2539
+ right: -1,
2540
+ bottom: -1,
2541
+ zIndex: 2
2542
+ },
2543
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2544
+ RoughSvg,
2545
+ {
2546
+ shape: "ellipse",
2547
+ roughness: (roughness ?? 1.5) * 0.8,
2548
+ seed: deriveSeed(resolvedSeed, "status"),
2549
+ sketchColor: STATUS_COLOR[status],
2550
+ fill: STATUS_COLOR[status],
2551
+ fillStyle: "solid",
2552
+ bowing,
2553
+ strokeWidth: 1,
2554
+ inset: 0.5
2555
+ }
2556
+ )
2557
+ }
2558
+ ) : null
2559
+ ]
2560
+ }
2561
+ );
2562
+ }
2563
+ );
2564
+ var Slider = react.forwardRef(function Slider2({
2565
+ className,
2566
+ style,
2567
+ roughness,
2568
+ seed,
2569
+ sketchColor,
2570
+ bowing,
2571
+ fillStyle,
2572
+ strokeWidth,
2573
+ thumbShape = "circle",
2574
+ ...rest
2575
+ }, ref) {
2576
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
2577
+ const resolvedSeed = useResolvedSeed(seed);
2578
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2579
+ SliderPrimitive__namespace.Root,
2580
+ {
2581
+ ref,
2582
+ className: cn(className),
2583
+ style: {
2584
+ position: "relative",
2585
+ display: "flex",
2586
+ alignItems: "center",
2587
+ width: "100%",
2588
+ height: 28,
2589
+ userSelect: "none",
2590
+ touchAction: "none",
2591
+ ...style
2592
+ },
2593
+ ...rest,
2594
+ children: [
2595
+ /* @__PURE__ */ jsxRuntime.jsxs(
2596
+ SliderPrimitive__namespace.Track,
2597
+ {
2598
+ style: {
2599
+ position: "relative",
2600
+ flex: 1,
2601
+ height: 16
2602
+ },
2603
+ children: [
2604
+ /* @__PURE__ */ jsxRuntime.jsx(
2605
+ RoughSvg,
2606
+ {
2607
+ shape: "line",
2608
+ roughness: roughness ?? 1.8,
2609
+ seed: resolvedSeed,
2610
+ sketchColor: ink,
2611
+ bowing: bowing ?? 2,
2612
+ strokeWidth: strokeWidth ?? 1.6,
2613
+ inset: 4
2614
+ }
2615
+ ),
2616
+ /* @__PURE__ */ jsxRuntime.jsx(
2617
+ SliderPrimitive__namespace.Range,
2618
+ {
2619
+ style: {
2620
+ position: "absolute",
2621
+ left: 0,
2622
+ height: "100%"
2623
+ },
2624
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2625
+ RoughSvg,
2626
+ {
2627
+ shape: "line",
2628
+ roughness: (roughness ?? 1.5) + 0.4,
2629
+ seed: deriveSeed(resolvedSeed, "range"),
2630
+ sketchColor: SKETCH_COLORS.accent,
2631
+ bowing: bowing ?? 1.6,
2632
+ strokeWidth: (strokeWidth ?? 1.6) + 0.6,
2633
+ inset: 4
2634
+ }
2635
+ )
2636
+ }
2637
+ )
2638
+ ]
2639
+ }
2640
+ ),
2641
+ /* @__PURE__ */ jsxRuntime.jsx(
2642
+ SliderPrimitive__namespace.Thumb,
2643
+ {
2644
+ style: {
2645
+ display: "block",
2646
+ width: 20,
2647
+ height: 20,
2648
+ position: "relative",
2649
+ outline: "none",
2650
+ cursor: "grab"
2651
+ },
2652
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2653
+ RoughSvg,
2654
+ {
2655
+ shape: thumbShape === "square" ? "rectangle" : "ellipse",
2656
+ roughness: (roughness ?? 1.5) * 0.85,
2657
+ seed: deriveSeed(resolvedSeed, "thumb"),
2658
+ sketchColor: SKETCH_COLORS.accent,
2659
+ fill: "#f7f6f2",
2660
+ fillStyle: fillStyle ?? "solid",
2661
+ bowing,
2662
+ strokeWidth: (strokeWidth ?? 1.5) + 0.3,
2663
+ inset: 1
2664
+ }
2665
+ )
2666
+ }
2667
+ )
2668
+ ]
2669
+ }
2670
+ );
2671
+ });
2672
+ var PREV_PATH = "M 12 4 L 6 10 L 12 16";
2673
+ var NEXT_PATH = "M 6 4 L 12 10 L 6 16";
2674
+ function pageItems(page, count) {
2675
+ if (count <= 7) {
2676
+ return Array.from({ length: count }, (_, i) => i + 1);
2677
+ }
2678
+ const items = [1];
2679
+ const start = Math.max(2, page - 1);
2680
+ const end = Math.min(count - 1, page + 1);
2681
+ if (start > 2) items.push("ellipsis");
2682
+ for (let n = start; n <= end; n += 1) items.push(n);
2683
+ if (end < count - 1) items.push("ellipsis");
2684
+ items.push(count);
2685
+ return items;
2686
+ }
2687
+ var Pagination = react.forwardRef(
2688
+ function Pagination2({
2689
+ className,
2690
+ style,
2691
+ page,
2692
+ count,
2693
+ onPageChange,
2694
+ roughness,
2695
+ seed,
2696
+ sketchColor,
2697
+ bowing,
2698
+ strokeWidth,
2699
+ ...rest
2700
+ }, ref) {
2701
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
2702
+ const resolvedSeed = useResolvedSeed(seed);
2703
+ const items = pageItems(page, count);
2704
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2705
+ "nav",
2706
+ {
2707
+ ref,
2708
+ className: cn(className),
2709
+ "aria-label": "Pagination",
2710
+ style: {
2711
+ display: "inline-flex",
2712
+ alignItems: "center",
2713
+ gap: 4,
2714
+ ...style
2715
+ },
2716
+ ...rest,
2717
+ children: [
2718
+ /* @__PURE__ */ jsxRuntime.jsx(
2719
+ PageButton,
2720
+ {
2721
+ "aria-label": "Previous page",
2722
+ disabled: page <= 1,
2723
+ onClick: () => onPageChange?.(Math.max(1, page - 1)),
2724
+ roughness,
2725
+ seed: deriveSeed(resolvedSeed, "prev"),
2726
+ ink,
2727
+ bowing,
2728
+ strokeWidth,
2729
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", width: 16, height: 16, display: "block" }, children: /* @__PURE__ */ jsxRuntime.jsx(
2730
+ RoughSvg,
2731
+ {
2732
+ shape: "path",
2733
+ path: PREV_PATH,
2734
+ roughness: (roughness ?? 1.5) * 0.7,
2735
+ seed: deriveSeed(resolvedSeed, "prev-arrow"),
2736
+ sketchColor: ink,
2737
+ strokeWidth: (strokeWidth ?? 1.5) + 0.2,
2738
+ inset: 0
2739
+ }
2740
+ ) })
2741
+ }
2742
+ ),
2743
+ items.map(
2744
+ (item, index) => item === "ellipsis" ? /* @__PURE__ */ jsxRuntime.jsx(
2745
+ "span",
2746
+ {
2747
+ style: {
2748
+ width: 28,
2749
+ textAlign: "center",
2750
+ fontFamily: doodleUiFontFamily,
2751
+ color: ink
2752
+ },
2753
+ children: "\u2026"
2754
+ },
2755
+ `e-${index}`
2756
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
2757
+ PageButton,
2758
+ {
2759
+ "aria-label": `Page ${item}`,
2760
+ "aria-current": item === page ? "page" : void 0,
2761
+ active: item === page,
2762
+ onClick: () => onPageChange?.(item),
2763
+ roughness,
2764
+ seed: deriveSeed(resolvedSeed, `page-${item}`),
2765
+ ink,
2766
+ bowing,
2767
+ strokeWidth,
2768
+ children: item
2769
+ },
2770
+ item
2771
+ )
2772
+ ),
2773
+ /* @__PURE__ */ jsxRuntime.jsx(
2774
+ PageButton,
2775
+ {
2776
+ "aria-label": "Next page",
2777
+ disabled: page >= count,
2778
+ onClick: () => onPageChange?.(Math.min(count, page + 1)),
2779
+ roughness,
2780
+ seed: deriveSeed(resolvedSeed, "next"),
2781
+ ink,
2782
+ bowing,
2783
+ strokeWidth,
2784
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", width: 16, height: 16, display: "block" }, children: /* @__PURE__ */ jsxRuntime.jsx(
2785
+ RoughSvg,
2786
+ {
2787
+ shape: "path",
2788
+ path: NEXT_PATH,
2789
+ roughness: (roughness ?? 1.5) * 0.7,
2790
+ seed: deriveSeed(resolvedSeed, "next-arrow"),
2791
+ sketchColor: ink,
2792
+ strokeWidth: (strokeWidth ?? 1.5) + 0.2,
2793
+ inset: 0
2794
+ }
2795
+ ) })
2796
+ }
2797
+ )
2798
+ ]
2799
+ }
2800
+ );
2801
+ }
2802
+ );
2803
+ function PageButton({
2804
+ children,
2805
+ className,
2806
+ style,
2807
+ active,
2808
+ disabled,
2809
+ roughness,
2810
+ seed,
2811
+ ink,
2812
+ bowing,
2813
+ strokeWidth,
2814
+ ...rest
2815
+ }) {
2816
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2817
+ "button",
2818
+ {
2819
+ type: "button",
2820
+ disabled,
2821
+ className: cn(className),
2822
+ style: {
2823
+ position: "relative",
2824
+ width: 36,
2825
+ height: 36,
2826
+ padding: 0,
2827
+ border: "none",
2828
+ background: "transparent",
2829
+ cursor: disabled ? "not-allowed" : "pointer",
2830
+ color: ink,
2831
+ fontFamily: doodleUiFontFamily,
2832
+ fontWeight: active ? doodleUiFontWeight(700) : doodleUiFontWeight(400),
2833
+ fontSize: 14,
2834
+ outline: "none",
2835
+ opacity: disabled ? 0.4 : 1,
2836
+ ...style
2837
+ },
2838
+ ...rest,
2839
+ children: [
2840
+ /* @__PURE__ */ jsxRuntime.jsx(
2841
+ RoughSvg,
2842
+ {
2843
+ shape: "ellipse",
2844
+ roughness,
2845
+ seed,
2846
+ sketchColor: active ? SKETCH_COLORS.accent : ink,
2847
+ bowing,
2848
+ fill: active ? SKETCH_COLORS.accentFill : void 0,
2849
+ fillStyle: active ? "hachure" : void 0,
2850
+ strokeWidth: active ? (strokeWidth ?? 1.6) + 0.3 : strokeWidth ?? 1.4,
2851
+ inset: 1.5
2852
+ }
2853
+ ),
2854
+ active ? /* @__PURE__ */ jsxRuntime.jsx(
2855
+ RoughSvg,
2856
+ {
2857
+ shape: "ellipse",
2858
+ roughness: (roughness ?? 1.5) + 0.45,
2859
+ seed,
2860
+ sketchColor: SKETCH_COLORS.accent,
2861
+ bowing: bowing ?? 1.6,
2862
+ strokeWidth: 1.1,
2863
+ inset: -1.5,
2864
+ style: { opacity: 0.7 }
2865
+ }
2866
+ ) : null,
2867
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
2868
+ ]
2869
+ }
2870
+ );
2871
+ }
2872
+ var SLASH_PATH = "M 10 3 L 6 15";
2873
+ var CHEVRON_PATH3 = "M 5 4 L 11 9 L 5 14";
2874
+ var BreadcrumbSketchContext = react.createContext(null);
2875
+ function useBreadcrumbSketch() {
2876
+ const ctx = react.useContext(BreadcrumbSketchContext);
2877
+ if (!ctx) {
2878
+ throw new Error("BreadcrumbItem must be used inside <Breadcrumb>.");
2879
+ }
2880
+ return ctx;
2881
+ }
2882
+ var Breadcrumb = react.forwardRef(
2883
+ function Breadcrumb2({
2884
+ className,
2885
+ style,
2886
+ children,
2887
+ separator = "slash",
2888
+ roughness,
2889
+ seed,
2890
+ sketchColor,
2891
+ bowing,
2892
+ strokeWidth,
2893
+ ...rest
2894
+ }, ref) {
2895
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
2896
+ const resolvedSeed = useResolvedSeed(seed);
2897
+ const items = react.Children.toArray(children).filter(react.isValidElement);
2898
+ return /* @__PURE__ */ jsxRuntime.jsx(
2899
+ BreadcrumbSketchContext.Provider,
2900
+ {
2901
+ value: {
2902
+ roughness,
2903
+ seed: resolvedSeed,
2904
+ sketchColor,
2905
+ bowing,
2906
+ strokeWidth,
2907
+ resolvedSeed,
2908
+ ink,
2909
+ separator
2910
+ },
2911
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2912
+ "nav",
2913
+ {
2914
+ ref,
2915
+ className: cn(className),
2916
+ "aria-label": "Breadcrumb",
2917
+ style,
2918
+ ...rest,
2919
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2920
+ "ol",
2921
+ {
2922
+ style: {
2923
+ display: "flex",
2924
+ flexWrap: "wrap",
2925
+ alignItems: "center",
2926
+ gap: 4,
2927
+ listStyle: "none",
2928
+ margin: 0,
2929
+ padding: 0,
2930
+ fontFamily: doodleUiFontFamily,
2931
+ color: ink,
2932
+ fontSize: 14
2933
+ },
2934
+ children: items.map((child, index) => /* @__PURE__ */ jsxRuntime.jsxs(
2935
+ "li",
2936
+ {
2937
+ style: { display: "inline-flex", alignItems: "center", gap: 4 },
2938
+ children: [
2939
+ react.cloneElement(child, {
2940
+ index
2941
+ }),
2942
+ index < items.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx(
2943
+ SeparatorMark,
2944
+ {
2945
+ index,
2946
+ separator,
2947
+ resolvedSeed,
2948
+ roughness,
2949
+ ink,
2950
+ bowing,
2951
+ strokeWidth
2952
+ }
2953
+ ) : null
2954
+ ]
2955
+ },
2956
+ index
2957
+ ))
2958
+ }
2959
+ )
2960
+ }
2961
+ )
2962
+ }
2963
+ );
2964
+ }
2965
+ );
2966
+ function SeparatorMark({
2967
+ index,
2968
+ separator,
2969
+ resolvedSeed,
2970
+ roughness,
2971
+ ink,
2972
+ bowing,
2973
+ strokeWidth
2974
+ }) {
2975
+ return /* @__PURE__ */ jsxRuntime.jsx(
2976
+ "span",
2977
+ {
2978
+ "aria-hidden": "true",
2979
+ style: { position: "relative", width: 16, height: 18, display: "inline-block" },
2980
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2981
+ RoughSvg,
2982
+ {
2983
+ shape: "path",
2984
+ path: separator === "chevron" ? CHEVRON_PATH3 : SLASH_PATH,
2985
+ roughness: (roughness ?? 1.5) * 0.85,
2986
+ seed: deriveSeed(resolvedSeed, `sep-${index}`),
2987
+ sketchColor: ink,
2988
+ bowing: bowing ?? 1.6,
2989
+ strokeWidth: strokeWidth ?? 1.4,
2990
+ inset: 0
2991
+ }
2992
+ )
2993
+ }
2994
+ );
2995
+ }
2996
+ var BreadcrumbItem = react.forwardRef(
2997
+ function BreadcrumbItem2({ className, style, href, current, children, index: _index, ...rest }, ref) {
2998
+ const sketch = useBreadcrumbSketch();
2999
+ const contentStyle = {
3000
+ color: current ? sketch.ink : sketch.ink,
3001
+ opacity: current ? 1 : 0.75,
3002
+ textDecoration: "none",
3003
+ fontFamily: doodleUiFontFamily,
3004
+ ...style
3005
+ };
3006
+ if (href && !current) {
3007
+ return /* @__PURE__ */ jsxRuntime.jsx(
3008
+ "a",
3009
+ {
3010
+ href,
3011
+ className: cn(className),
3012
+ style: contentStyle,
3013
+ ...rest,
3014
+ children
3015
+ }
3016
+ );
3017
+ }
3018
+ return /* @__PURE__ */ jsxRuntime.jsx(
3019
+ "span",
3020
+ {
3021
+ ref,
3022
+ className: cn(className),
3023
+ "aria-current": current ? "page" : void 0,
3024
+ style: contentStyle,
3025
+ ...rest,
3026
+ children
3027
+ }
3028
+ );
3029
+ }
3030
+ );
3031
+ var Skeleton = react.forwardRef(
3032
+ function Skeleton2({
3033
+ className,
3034
+ style,
3035
+ variant = "rect",
3036
+ pulse = true,
3037
+ width,
3038
+ height,
3039
+ roughness,
3040
+ seed,
3041
+ sketchColor,
3042
+ bowing,
3043
+ fillStyle,
3044
+ strokeWidth,
3045
+ ...rest
3046
+ }, ref) {
3047
+ const base = useResolvedSeed(seed);
3048
+ const [tick, setTick] = react.useState(0);
3049
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
3050
+ react.useEffect(() => {
3051
+ if (!pulse) return;
3052
+ const id = window.setInterval(() => {
3053
+ setTick((current) => current + 1);
3054
+ }, 900);
3055
+ return () => window.clearInterval(id);
3056
+ }, [pulse]);
3057
+ const resolved = pulse ? deriveSeed(base, `pulse-${tick}`) : base;
3058
+ const shape = variant === "circle" ? "ellipse" : "rectangle";
3059
+ const defaultHeight = variant === "text" ? 14 : variant === "circle" ? 40 : 80;
3060
+ const defaultWidth = variant === "circle" ? 40 : "100%";
3061
+ return /* @__PURE__ */ jsxRuntime.jsx(
3062
+ "div",
3063
+ {
3064
+ ref,
3065
+ "aria-hidden": "true",
3066
+ className: cn(className),
3067
+ style: {
3068
+ position: "relative",
3069
+ width: width ?? defaultWidth,
3070
+ height: height ?? defaultHeight,
3071
+ maxWidth: "100%",
3072
+ ...style
3073
+ },
3074
+ ...rest,
3075
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3076
+ RoughSvg,
3077
+ {
3078
+ shape,
3079
+ roughness: (roughness ?? 1.5) + 0.4,
3080
+ seed: resolved,
3081
+ sketchColor: ink,
3082
+ fill: ink,
3083
+ fillStyle: fillStyle ?? "hachure",
3084
+ bowing: bowing ?? 1.6,
3085
+ strokeWidth: strokeWidth ?? 1.1,
3086
+ inset: 2,
3087
+ style: { opacity: 0.28 }
3088
+ }
3089
+ )
3090
+ }
3091
+ );
3092
+ }
3093
+ );
3094
+ function normalizeSteps(steps) {
3095
+ return steps.map(
3096
+ (step) => step !== null && typeof step === "object" && "label" in step ? step : { label: step }
3097
+ );
3098
+ }
3099
+ var Stepper = react.forwardRef(
3100
+ function Stepper2({
3101
+ className,
3102
+ style,
3103
+ steps,
3104
+ current = 0,
3105
+ orientation = "horizontal",
3106
+ roughness,
3107
+ seed,
3108
+ sketchColor,
3109
+ bowing,
3110
+ fillStyle,
3111
+ strokeWidth,
3112
+ ...rest
3113
+ }, ref) {
3114
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
3115
+ const resolvedSeed = useResolvedSeed(seed);
3116
+ const items = normalizeSteps(steps);
3117
+ const horizontal = orientation === "horizontal";
3118
+ return /* @__PURE__ */ jsxRuntime.jsx(
3119
+ "div",
3120
+ {
3121
+ ref,
3122
+ role: "list",
3123
+ className: cn(className),
3124
+ style: {
3125
+ display: "flex",
3126
+ flexDirection: horizontal ? "row" : "column",
3127
+ alignItems: horizontal ? "flex-start" : "stretch",
3128
+ ...style
3129
+ },
3130
+ ...rest,
3131
+ children: items.map((step, index) => {
3132
+ const complete = index < current;
3133
+ const active = index === current;
3134
+ const markerColor = complete || active ? SKETCH_COLORS.accent : ink;
3135
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3136
+ "div",
3137
+ {
3138
+ role: "listitem",
3139
+ "aria-current": active ? "step" : void 0,
3140
+ style: {
3141
+ display: "flex",
3142
+ flex: horizontal ? 1 : void 0,
3143
+ flexDirection: horizontal ? "column" : "row",
3144
+ alignItems: horizontal ? "center" : "flex-start",
3145
+ minWidth: 0
3146
+ },
3147
+ children: [
3148
+ /* @__PURE__ */ jsxRuntime.jsxs(
3149
+ "div",
3150
+ {
3151
+ style: {
3152
+ display: "flex",
3153
+ flexDirection: horizontal ? "row" : "column",
3154
+ alignItems: "center",
3155
+ width: horizontal ? "100%" : void 0
3156
+ },
3157
+ children: [
3158
+ /* @__PURE__ */ jsxRuntime.jsxs(
3159
+ "span",
3160
+ {
3161
+ style: {
3162
+ position: "relative",
3163
+ width: 28,
3164
+ height: 28,
3165
+ flexShrink: 0,
3166
+ display: "inline-flex",
3167
+ alignItems: "center",
3168
+ justifyContent: "center",
3169
+ fontFamily: doodleUiFontFamily,
3170
+ fontWeight: doodleUiFontWeight(700),
3171
+ fontSize: 13,
3172
+ color: markerColor
3173
+ },
3174
+ children: [
3175
+ /* @__PURE__ */ jsxRuntime.jsx(
3176
+ RoughSvg,
3177
+ {
3178
+ shape: "ellipse",
3179
+ roughness,
3180
+ seed: deriveSeed(resolvedSeed, `step-${index}`),
3181
+ sketchColor: markerColor,
3182
+ fill: complete ? SKETCH_COLORS.accentFill : active ? "#f7f6f2" : void 0,
3183
+ fillStyle: complete || active ? fillStyle ?? "hachure" : void 0,
3184
+ bowing,
3185
+ strokeWidth: active ? (strokeWidth ?? 1.6) + 0.4 : strokeWidth ?? 1.5,
3186
+ inset: 1.5
3187
+ }
3188
+ ),
3189
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children: complete ? "\u2713" : index + 1 })
3190
+ ]
3191
+ }
3192
+ ),
3193
+ index < items.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx(
3194
+ "span",
3195
+ {
3196
+ style: {
3197
+ position: "relative",
3198
+ flex: 1,
3199
+ width: horizontal ? void 0 : 12,
3200
+ height: horizontal ? 12 : 28,
3201
+ minWidth: horizontal ? 16 : 12,
3202
+ alignSelf: "center"
3203
+ },
3204
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3205
+ RoughSvg,
3206
+ {
3207
+ shape: horizontal ? "line" : "line-vertical",
3208
+ roughness: (roughness ?? 1.5) + 0.3,
3209
+ seed: deriveSeed(resolvedSeed, `connector-${index}`),
3210
+ sketchColor: complete ? SKETCH_COLORS.accent : ink,
3211
+ bowing: bowing ?? 2,
3212
+ strokeWidth: strokeWidth ?? 1.4,
3213
+ inset: 2
3214
+ }
3215
+ )
3216
+ }
3217
+ ) : null
3218
+ ]
3219
+ }
3220
+ ),
3221
+ /* @__PURE__ */ jsxRuntime.jsxs(
3222
+ "div",
3223
+ {
3224
+ style: {
3225
+ marginTop: horizontal ? 8 : 0,
3226
+ marginLeft: horizontal ? 0 : 10,
3227
+ paddingBottom: horizontal ? 0 : 8,
3228
+ textAlign: horizontal ? "center" : "left",
3229
+ fontFamily: doodleUiFontFamily,
3230
+ fontSize: 13,
3231
+ color: ink
3232
+ },
3233
+ children: [
3234
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontWeight: doodleUiFontWeight(600) }, children: step.label }),
3235
+ step.description ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { opacity: 0.7, fontSize: 12, marginTop: 2 }, children: step.description }) : null
3236
+ ]
3237
+ }
3238
+ )
3239
+ ]
3240
+ },
3241
+ index
3242
+ );
3243
+ })
3244
+ }
3245
+ );
3246
+ }
3247
+ );
1284
3248
 
3249
+ exports.Accordion = Accordion;
3250
+ exports.AccordionContent = AccordionContent;
3251
+ exports.AccordionItem = AccordionItem;
3252
+ exports.AccordionTrigger = AccordionTrigger;
1285
3253
  exports.Alert = Alert;
3254
+ exports.Avatar = Avatar;
1286
3255
  exports.Badge = Badge;
3256
+ exports.Breadcrumb = Breadcrumb;
3257
+ exports.BreadcrumbItem = BreadcrumbItem;
1287
3258
  exports.Button = Button;
1288
3259
  exports.Card = Card;
1289
3260
  exports.Checkbox = Checkbox;
@@ -1299,16 +3270,49 @@ exports.ModalDescription = ModalDescription;
1299
3270
  exports.ModalRoot = ModalRoot;
1300
3271
  exports.ModalTitle = ModalTitle;
1301
3272
  exports.ModalTrigger = ModalTrigger;
3273
+ exports.Pagination = Pagination;
1302
3274
  exports.Progress = Progress;
1303
3275
  exports.Radio = Radio;
1304
3276
  exports.RadioGroup = RadioGroup;
1305
3277
  exports.RoughSvg = RoughSvg;
1306
3278
  exports.SKETCH_COLORS = SKETCH_COLORS;
3279
+ exports.Select = Select;
3280
+ exports.SelectContent = SelectContent;
3281
+ exports.SelectGroup = SelectGroup;
3282
+ exports.SelectItem = SelectItem;
3283
+ exports.SelectLabel = SelectLabel;
3284
+ exports.SelectRoot = SelectRoot;
3285
+ exports.SelectSeparator = SelectSeparator;
3286
+ exports.SelectTrigger = SelectTrigger;
3287
+ exports.SelectValue = SelectValue;
3288
+ exports.Skeleton = Skeleton;
1307
3289
  exports.SketchBox = SketchBox;
1308
3290
  exports.SketchSeedProvider = SketchSeedProvider;
3291
+ exports.Slider = Slider;
3292
+ exports.Stepper = Stepper;
3293
+ exports.Switch = Switch;
3294
+ exports.Tab = Tab;
3295
+ exports.TabList = TabList;
3296
+ exports.TabPanel = TabPanel;
3297
+ exports.Table = Table;
3298
+ exports.TableBody = TableBody;
3299
+ exports.TableCell = TableCell;
3300
+ exports.TableHead = TableHead;
3301
+ exports.TableHeaderCell = TableHeaderCell;
3302
+ exports.TableRow = TableRow;
3303
+ exports.Tabs = Tabs;
1309
3304
  exports.Textarea = Textarea;
3305
+ exports.Toast = Toast;
3306
+ exports.ToastAction = ToastAction;
3307
+ exports.ToastClose = ToastClose;
3308
+ exports.ToastDescription = ToastDescription;
3309
+ exports.ToastProvider = ToastProvider;
3310
+ exports.ToastRoot = ToastRoot;
3311
+ exports.ToastTitle = ToastTitle;
3312
+ exports.ToastViewport = ToastViewport;
1310
3313
  exports.Tooltip = Tooltip;
1311
3314
  exports.TooltipProvider = TooltipProvider;
3315
+ exports.deriveSeed = deriveSeed;
1312
3316
  exports.toRoughOptions = toRoughOptions;
1313
3317
  exports.useResolvedSeed = useResolvedSeed;
1314
3318
  exports.useSketchSeed = useSketchSeed;