@mirror-physics/fractal-ui 0.2.0-next.74 → 0.2.0-next.76
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 +8 -0
- package/dist/index.cjs +222 -182
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +237 -74
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +33 -9
- package/dist/index.d.ts +33 -9
- package/dist/index.js +221 -182
- package/dist/index.js.map +1 -1
- package/dist/tokens.css +71 -6
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -47,31 +47,19 @@ var colorPalette = {
|
|
|
47
47
|
700: "var(--green-700)"
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
|
|
51
|
-
xs: { height: "28px", padding: "4px 8px", iconOnly: "28px", fontSize: "0.75rem" },
|
|
52
|
-
sm: { height: "32px", padding: "6px 12px", iconOnly: "32px", fontSize: "0.75rem" },
|
|
53
|
-
md: { height: "40px", padding: "8px 16px", iconOnly: "40px", fontSize: "0.875rem" },
|
|
54
|
-
lg: { height: "44px", padding: "10px 20px", iconOnly: "44px", fontSize: "1rem" },
|
|
55
|
-
xl: { height: "56px", padding: "14px 28px", iconOnly: "56px", fontSize: "1rem" }
|
|
56
|
-
};
|
|
57
|
-
function getButtonStyles(buttonType, isHovered, isActive, buttonSize, disabled, color, hasIconOnly) {
|
|
50
|
+
function getButtonStyles(buttonType, isHovered, isActive, disabled, color, hasIconOnly) {
|
|
58
51
|
const palette = colorPalette[color];
|
|
59
|
-
const size = sizeConfig[buttonSize];
|
|
60
52
|
const base = {
|
|
61
|
-
height: size.height,
|
|
62
|
-
padding: hasIconOnly ? "0" : size.padding,
|
|
63
53
|
borderRadius: hasIconOnly ? "var(--radius-lg, 8px)" : "var(--radius-full, 9999px)",
|
|
64
54
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
65
|
-
fontSize: size.fontSize,
|
|
66
55
|
transition: "background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease"
|
|
67
56
|
};
|
|
68
57
|
if (hasIconOnly) {
|
|
69
|
-
base.width = size.iconOnly;
|
|
70
58
|
base.justifyContent = "center";
|
|
71
59
|
}
|
|
72
60
|
if (disabled) {
|
|
73
61
|
if (buttonType === "ghost") {
|
|
74
|
-
return { ...base, backgroundColor: "transparent", border: "
|
|
62
|
+
return { ...base, backgroundColor: "transparent", border: "1px solid transparent", color: "var(--fg-disabled)" };
|
|
75
63
|
}
|
|
76
64
|
return { ...base, backgroundColor: "transparent", border: "1px solid var(--fg-disabled)", color: "var(--fg-disabled)" };
|
|
77
65
|
}
|
|
@@ -82,7 +70,7 @@ function getButtonStyles(buttonType, isHovered, isActive, buttonSize, disabled,
|
|
|
82
70
|
return {
|
|
83
71
|
...base,
|
|
84
72
|
backgroundColor: isActive ? palette[700] : isHovered ? palette[500] : palette[600],
|
|
85
|
-
border: "
|
|
73
|
+
border: "1px solid transparent",
|
|
86
74
|
color: "var(--fg-inverse)"
|
|
87
75
|
};
|
|
88
76
|
}
|
|
@@ -106,7 +94,7 @@ function getButtonStyles(buttonType, isHovered, isActive, buttonSize, disabled,
|
|
|
106
94
|
return {
|
|
107
95
|
...base,
|
|
108
96
|
backgroundColor: isHovered || isActive ? "var(--bg-surface-1)" : "transparent",
|
|
109
|
-
border: "
|
|
97
|
+
border: "1px solid transparent",
|
|
110
98
|
color: "var(--fg-primary)"
|
|
111
99
|
};
|
|
112
100
|
// Danger: low-intensity destructive action. Text stays steady; hover deepens the light red surface.
|
|
@@ -114,7 +102,7 @@ function getButtonStyles(buttonType, isHovered, isActive, buttonSize, disabled,
|
|
|
114
102
|
return {
|
|
115
103
|
...base,
|
|
116
104
|
backgroundColor: isHovered || isActive ? "var(--danger-button-surface-hover)" : "var(--danger-button-surface)",
|
|
117
|
-
border: "
|
|
105
|
+
border: "1px solid transparent",
|
|
118
106
|
color: "var(--danger-button-fg)"
|
|
119
107
|
};
|
|
120
108
|
default:
|
|
@@ -122,10 +110,10 @@ function getButtonStyles(buttonType, isHovered, isActive, buttonSize, disabled,
|
|
|
122
110
|
}
|
|
123
111
|
}
|
|
124
112
|
var Button = React.forwardRef(
|
|
125
|
-
({ className, buttonType = "primary", buttonSize = "md", color = "blue", icon, hasIconOnly, iconPosition = "left", style, disabled, children, ...props }, ref) => {
|
|
113
|
+
({ className, buttonType = "primary", buttonSize = "md", controlSize, color = "blue", icon, hasIconOnly, iconPosition = "left", style, disabled, children, ...props }, ref) => {
|
|
126
114
|
const [isHovered, setIsHovered] = React.useState(false);
|
|
127
115
|
const [isActive, setIsActive] = React.useState(false);
|
|
128
|
-
const typeStyles = getButtonStyles(buttonType, isHovered, isActive,
|
|
116
|
+
const typeStyles = getButtonStyles(buttonType, isHovered, isActive, !!disabled, color, hasIconOnly);
|
|
129
117
|
const hasIconAndText = icon && children && !hasIconOnly;
|
|
130
118
|
const finalStyles = hasIconAndText ? { ...typeStyles, gap: "var(--space-2, 8px)", ...style } : { ...typeStyles, ...style };
|
|
131
119
|
return /* @__PURE__ */ jsxs(
|
|
@@ -133,7 +121,9 @@ var Button = React.forwardRef(
|
|
|
133
121
|
{
|
|
134
122
|
ref,
|
|
135
123
|
type: "button",
|
|
136
|
-
|
|
124
|
+
"data-control-size": controlSize ?? buttonSize,
|
|
125
|
+
"data-icon-only": hasIconOnly || void 0,
|
|
126
|
+
className: cn("fractal-control", "fractal-button", `fractal-button--${buttonType}`, className),
|
|
137
127
|
style: finalStyles,
|
|
138
128
|
disabled,
|
|
139
129
|
onMouseEnter: (e) => {
|
|
@@ -541,7 +531,7 @@ import * as React2 from "react";
|
|
|
541
531
|
import { Folder as FolderIcon } from "@mirror-physics/fractal-icons";
|
|
542
532
|
import { jsx as jsx3, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
543
533
|
var Card = React2.forwardRef(
|
|
544
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx3("div", { ref, className: cn("fractal-card", className), ...props })
|
|
534
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx3("div", { ref, "data-fractal-border-surface": "surface-1", className: cn("fractal-card", className), ...props })
|
|
545
535
|
);
|
|
546
536
|
Card.displayName = "Card";
|
|
547
537
|
var CardHeader = React2.forwardRef(
|
|
@@ -671,12 +661,13 @@ PromptGrid.displayName = "PromptGrid";
|
|
|
671
661
|
import * as React4 from "react";
|
|
672
662
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
673
663
|
var Input = React4.forwardRef(
|
|
674
|
-
({ className, type, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
664
|
+
({ className, type, controlSize = "md", ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
675
665
|
"input",
|
|
676
666
|
{
|
|
677
667
|
type,
|
|
678
668
|
ref,
|
|
679
|
-
|
|
669
|
+
"data-control-size": controlSize,
|
|
670
|
+
className: cn("fractal-control", "fractal-input", className),
|
|
680
671
|
...props
|
|
681
672
|
}
|
|
682
673
|
)
|
|
@@ -690,6 +681,7 @@ import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
|
690
681
|
var TableSearch = React5.forwardRef(
|
|
691
682
|
({
|
|
692
683
|
searchType = "text",
|
|
684
|
+
controlSize = "md",
|
|
693
685
|
className,
|
|
694
686
|
inputClassName,
|
|
695
687
|
placeholder,
|
|
@@ -703,12 +695,14 @@ var TableSearch = React5.forwardRef(
|
|
|
703
695
|
{
|
|
704
696
|
className: cn("fractal-table-search", className),
|
|
705
697
|
"data-search-type": searchType,
|
|
698
|
+
"data-control-size": controlSize,
|
|
706
699
|
children: [
|
|
707
700
|
/* @__PURE__ */ jsx6(SearchIcon, { className: "fractal-table-search__icon", size: 17, "aria-hidden": "true" }),
|
|
708
701
|
/* @__PURE__ */ jsx6(
|
|
709
702
|
Input,
|
|
710
703
|
{
|
|
711
704
|
...props,
|
|
705
|
+
controlSize,
|
|
712
706
|
ref,
|
|
713
707
|
type: "search",
|
|
714
708
|
className: cn("fractal-table-search__input", inputClassName),
|
|
@@ -729,6 +723,7 @@ import { Minus, Plus } from "@mirror-physics/fractal-icons";
|
|
|
729
723
|
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
730
724
|
function NumberInput({
|
|
731
725
|
unit,
|
|
726
|
+
controlSize = "md",
|
|
732
727
|
className,
|
|
733
728
|
value,
|
|
734
729
|
defaultValue,
|
|
@@ -752,11 +747,12 @@ function NumberInput({
|
|
|
752
747
|
input.dispatchEvent(new Event("input", { bubbles: true }));
|
|
753
748
|
input.focus();
|
|
754
749
|
};
|
|
755
|
-
return /* @__PURE__ */ jsxs7("div", { className: cn("fractal-number-input", unit && "fractal-number-input--with-unit", className), children: [
|
|
750
|
+
return /* @__PURE__ */ jsxs7("div", { "data-control-size": controlSize, className: cn("fractal-number-input", unit && "fractal-number-input--with-unit", className), children: [
|
|
756
751
|
/* @__PURE__ */ jsx7(
|
|
757
752
|
Input,
|
|
758
753
|
{
|
|
759
754
|
ref: inputRef,
|
|
755
|
+
controlSize,
|
|
760
756
|
type: "number",
|
|
761
757
|
value,
|
|
762
758
|
defaultValue,
|
|
@@ -771,7 +767,7 @@ function NumberInput({
|
|
|
771
767
|
"span",
|
|
772
768
|
{
|
|
773
769
|
className: "fractal-number-input-unit",
|
|
774
|
-
style: { left: `calc(var(--
|
|
770
|
+
style: { left: `calc(var(--control-padding-inline) + ${characterCount}ch)` },
|
|
775
771
|
"aria-hidden": "true",
|
|
776
772
|
children: unit
|
|
777
773
|
}
|
|
@@ -936,6 +932,7 @@ import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
|
936
932
|
var PasswordInput = React7.forwardRef(
|
|
937
933
|
({
|
|
938
934
|
className,
|
|
935
|
+
controlSize = "md",
|
|
939
936
|
disabled,
|
|
940
937
|
showPasswordLabel = "Show password",
|
|
941
938
|
hidePasswordLabel = "Hide password",
|
|
@@ -947,12 +944,14 @@ var PasswordInput = React7.forwardRef(
|
|
|
947
944
|
"div",
|
|
948
945
|
{
|
|
949
946
|
className: cn("fractal-password-input", className),
|
|
947
|
+
"data-control-size": controlSize,
|
|
950
948
|
"data-password-visible": passwordVisible ? "" : void 0,
|
|
951
949
|
children: [
|
|
952
950
|
/* @__PURE__ */ jsx9(
|
|
953
951
|
Input,
|
|
954
952
|
{
|
|
955
953
|
...props,
|
|
954
|
+
controlSize,
|
|
956
955
|
ref,
|
|
957
956
|
className: "fractal-password-input-field",
|
|
958
957
|
disabled,
|
|
@@ -983,10 +982,11 @@ PasswordInput.displayName = "PasswordInput";
|
|
|
983
982
|
import * as React8 from "react";
|
|
984
983
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
985
984
|
var Label = React8.forwardRef(
|
|
986
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
985
|
+
({ className, controlSize = "md", ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
987
986
|
"label",
|
|
988
987
|
{
|
|
989
988
|
ref,
|
|
989
|
+
"data-control-size": controlSize,
|
|
990
990
|
className: cn("fractal-label", className),
|
|
991
991
|
...props
|
|
992
992
|
}
|
|
@@ -1341,7 +1341,9 @@ function Dropdown({
|
|
|
1341
1341
|
label,
|
|
1342
1342
|
iconOnly = false,
|
|
1343
1343
|
noChevron = false,
|
|
1344
|
-
size = "md",
|
|
1344
|
+
size: sizeAlias = "md",
|
|
1345
|
+
controlSize,
|
|
1346
|
+
triggerId,
|
|
1345
1347
|
triggerVariant = "outline",
|
|
1346
1348
|
className,
|
|
1347
1349
|
triggerClassName,
|
|
@@ -1349,6 +1351,7 @@ function Dropdown({
|
|
|
1349
1351
|
closeOnSelect = true,
|
|
1350
1352
|
disabled = false
|
|
1351
1353
|
}) {
|
|
1354
|
+
const size = controlSize ?? sizeAlias;
|
|
1352
1355
|
const [open, setOpen] = React12.useState(false);
|
|
1353
1356
|
const triggerRef = React12.useRef(null);
|
|
1354
1357
|
const panelRef = React12.useRef(null);
|
|
@@ -1423,11 +1426,13 @@ function Dropdown({
|
|
|
1423
1426
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1424
1427
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1425
1428
|
}, [open]);
|
|
1426
|
-
return /* @__PURE__ */ jsxs16("div", { className: cn("fractal-dropdown", className), children: [
|
|
1429
|
+
return /* @__PURE__ */ jsxs16("div", { "data-control-size": size, className: cn("fractal-dropdown", className), children: [
|
|
1427
1430
|
/* @__PURE__ */ jsxs16(
|
|
1428
1431
|
"button",
|
|
1429
1432
|
{
|
|
1430
1433
|
ref: triggerRef,
|
|
1434
|
+
id: triggerId,
|
|
1435
|
+
"data-control-size": size,
|
|
1431
1436
|
type: "button",
|
|
1432
1437
|
disabled,
|
|
1433
1438
|
"aria-haspopup": "listbox",
|
|
@@ -1435,6 +1440,7 @@ function Dropdown({
|
|
|
1435
1440
|
"aria-label": triggerLabel,
|
|
1436
1441
|
onClick: () => setOpen((o) => !o),
|
|
1437
1442
|
className: cn(
|
|
1443
|
+
"fractal-control",
|
|
1438
1444
|
"fractal-dropdown-trigger",
|
|
1439
1445
|
`fractal-dropdown-trigger--${size}`,
|
|
1440
1446
|
`fractal-dropdown-trigger--${triggerVariant}`,
|
|
@@ -1524,6 +1530,7 @@ var Chip = React14.forwardRef(
|
|
|
1524
1530
|
"span",
|
|
1525
1531
|
{
|
|
1526
1532
|
ref,
|
|
1533
|
+
"data-fractal-border-surface": tone === "neutral" ? "surface-2" : void 0,
|
|
1527
1534
|
className: cn("fractal-chip", `fractal-chip--${tone}`, className),
|
|
1528
1535
|
...props
|
|
1529
1536
|
}
|
|
@@ -1574,10 +1581,41 @@ function Checkbox({
|
|
|
1574
1581
|
);
|
|
1575
1582
|
}
|
|
1576
1583
|
|
|
1584
|
+
// src/components/Radio/Radio.tsx
|
|
1585
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1586
|
+
function Radio({
|
|
1587
|
+
checked,
|
|
1588
|
+
className,
|
|
1589
|
+
description,
|
|
1590
|
+
disabled,
|
|
1591
|
+
label,
|
|
1592
|
+
onCheckedChange,
|
|
1593
|
+
...props
|
|
1594
|
+
}) {
|
|
1595
|
+
return /* @__PURE__ */ jsxs18("label", { className: cn("fractal-radio", disabled && "fractal-radio--disabled", className), children: [
|
|
1596
|
+
/* @__PURE__ */ jsx21(
|
|
1597
|
+
"input",
|
|
1598
|
+
{
|
|
1599
|
+
...props,
|
|
1600
|
+
checked,
|
|
1601
|
+
className: "fractal-radio__input",
|
|
1602
|
+
disabled,
|
|
1603
|
+
onChange: (event) => onCheckedChange?.(event.currentTarget.checked),
|
|
1604
|
+
type: "radio"
|
|
1605
|
+
}
|
|
1606
|
+
),
|
|
1607
|
+
/* @__PURE__ */ jsx21("span", { "aria-hidden": "true", className: "fractal-radio__control", children: /* @__PURE__ */ jsx21("span", { className: "fractal-radio__dot" }) }),
|
|
1608
|
+
/* @__PURE__ */ jsxs18("span", { className: "fractal-radio__content", children: [
|
|
1609
|
+
/* @__PURE__ */ jsx21("span", { className: "fractal-radio__label", children: label }),
|
|
1610
|
+
description && /* @__PURE__ */ jsx21("span", { className: "fractal-radio__description", children: description })
|
|
1611
|
+
] })
|
|
1612
|
+
] });
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1577
1615
|
// src/components/SortableTable/SortableTable.tsx
|
|
1578
1616
|
import { useMemo as useMemo2, useState as useState7 } from "react";
|
|
1579
1617
|
import { ArrowUp, ArrowDown, ArrowsUpDown } from "@mirror-physics/fractal-icons";
|
|
1580
|
-
import { jsx as
|
|
1618
|
+
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1581
1619
|
function SortableTable({
|
|
1582
1620
|
columns,
|
|
1583
1621
|
data,
|
|
@@ -1672,16 +1710,16 @@ function SortableTable({
|
|
|
1672
1710
|
onSortChange?.(nextKey, nextDirection);
|
|
1673
1711
|
}
|
|
1674
1712
|
};
|
|
1675
|
-
return /* @__PURE__ */
|
|
1676
|
-
header && /* @__PURE__ */
|
|
1677
|
-
visibleRows.length === 0 ? /* @__PURE__ */
|
|
1678
|
-
/* @__PURE__ */
|
|
1679
|
-
selection && /* @__PURE__ */
|
|
1713
|
+
return /* @__PURE__ */ jsx22("div", { className: cn("fractal-sortable-table", `fractal-sortable-table--${size}`, embedded && "fractal-sortable-table--embedded", className), children: /* @__PURE__ */ jsxs19("div", { className: "fractal-sortable-table-surface", children: [
|
|
1714
|
+
header && /* @__PURE__ */ jsx22("div", { className: "fractal-sortable-table-header", children: header }),
|
|
1715
|
+
visibleRows.length === 0 ? /* @__PURE__ */ jsx22("div", { className: "fractal-sortable-table-empty", children: emptyMessage || "No data" }) : /* @__PURE__ */ jsxs19("table", { "aria-label": ariaLabel, className: "fractal-sortable-table-table", children: [
|
|
1716
|
+
/* @__PURE__ */ jsx22("thead", { children: /* @__PURE__ */ jsxs19("tr", { className: "fractal-sortable-table-thead-row", children: [
|
|
1717
|
+
selection && /* @__PURE__ */ jsx22(
|
|
1680
1718
|
"th",
|
|
1681
1719
|
{
|
|
1682
1720
|
className: "fractal-sortable-table-th fractal-sortable-table-selection-cell",
|
|
1683
1721
|
scope: "col",
|
|
1684
|
-
children: /* @__PURE__ */
|
|
1722
|
+
children: /* @__PURE__ */ jsx22(
|
|
1685
1723
|
Checkbox,
|
|
1686
1724
|
{
|
|
1687
1725
|
"aria-label": selection.selectAllLabel ?? "Select all rows",
|
|
@@ -1707,7 +1745,7 @@ function SortableTable({
|
|
|
1707
1745
|
columns.map((col) => {
|
|
1708
1746
|
const isActive = activeKey === col.key && activeDirection !== null;
|
|
1709
1747
|
if (!col.sortable) {
|
|
1710
|
-
return /* @__PURE__ */
|
|
1748
|
+
return /* @__PURE__ */ jsx22(
|
|
1711
1749
|
"th",
|
|
1712
1750
|
{
|
|
1713
1751
|
className: "fractal-sortable-table-th",
|
|
@@ -1718,13 +1756,13 @@ function SortableTable({
|
|
|
1718
1756
|
col.key
|
|
1719
1757
|
);
|
|
1720
1758
|
}
|
|
1721
|
-
return /* @__PURE__ */
|
|
1759
|
+
return /* @__PURE__ */ jsx22(
|
|
1722
1760
|
"th",
|
|
1723
1761
|
{
|
|
1724
1762
|
className: "fractal-sortable-table-th fractal-sortable-table-th--sortable",
|
|
1725
1763
|
scope: "col",
|
|
1726
1764
|
style: { width: col.width },
|
|
1727
|
-
children: /* @__PURE__ */
|
|
1765
|
+
children: /* @__PURE__ */ jsxs19(
|
|
1728
1766
|
"button",
|
|
1729
1767
|
{
|
|
1730
1768
|
type: "button",
|
|
@@ -1735,8 +1773,8 @@ function SortableTable({
|
|
|
1735
1773
|
onClick: () => handleSortClick(col.key),
|
|
1736
1774
|
"aria-sort": isActive ? activeDirection === "asc" ? "ascending" : "descending" : "none",
|
|
1737
1775
|
children: [
|
|
1738
|
-
/* @__PURE__ */
|
|
1739
|
-
/* @__PURE__ */
|
|
1776
|
+
/* @__PURE__ */ jsx22("span", { children: col.header }),
|
|
1777
|
+
/* @__PURE__ */ jsx22("span", { className: "fractal-sortable-table-sort-icon", "aria-hidden": "true", children: isActive && activeDirection === "asc" ? /* @__PURE__ */ jsx22(ArrowUp, { size: 14 }) : isActive && activeDirection === "desc" ? /* @__PURE__ */ jsx22(ArrowDown, { size: 14 }) : /* @__PURE__ */ jsx22(ArrowsUpDown, { size: 14 }) })
|
|
1740
1778
|
]
|
|
1741
1779
|
}
|
|
1742
1780
|
)
|
|
@@ -1745,7 +1783,7 @@ function SortableTable({
|
|
|
1745
1783
|
);
|
|
1746
1784
|
})
|
|
1747
1785
|
] }) }),
|
|
1748
|
-
/* @__PURE__ */
|
|
1786
|
+
/* @__PURE__ */ jsx22("tbody", { children: visibleRows.map((row, rowIndex) => {
|
|
1749
1787
|
const highlighted = highlightRow?.(row, rowIndex) ?? false;
|
|
1750
1788
|
const disabled = isRowDisabled?.(row) ?? false;
|
|
1751
1789
|
const selectionDisabled = disabled || (isRowSelectionDisabled?.(row) ?? false);
|
|
@@ -1754,7 +1792,7 @@ function SortableTable({
|
|
|
1754
1792
|
label: rowAction.label(row, rowIndex),
|
|
1755
1793
|
icon: rowAction.icon(row, rowIndex)
|
|
1756
1794
|
} : null;
|
|
1757
|
-
return /* @__PURE__ */
|
|
1795
|
+
return /* @__PURE__ */ jsxs19(
|
|
1758
1796
|
"tr",
|
|
1759
1797
|
{
|
|
1760
1798
|
className: cn(
|
|
@@ -1778,7 +1816,7 @@ function SortableTable({
|
|
|
1778
1816
|
role: interactive ? "button" : void 0,
|
|
1779
1817
|
tabIndex: interactive ? 0 : void 0,
|
|
1780
1818
|
children: [
|
|
1781
|
-
selection && /* @__PURE__ */
|
|
1819
|
+
selection && /* @__PURE__ */ jsx22("td", { className: "fractal-sortable-table-td fractal-sortable-table-selection-cell", children: /* @__PURE__ */ jsx22(
|
|
1782
1820
|
Checkbox,
|
|
1783
1821
|
{
|
|
1784
1822
|
"aria-label": selection.getRowLabel(row),
|
|
@@ -1790,7 +1828,7 @@ function SortableTable({
|
|
|
1790
1828
|
}
|
|
1791
1829
|
}
|
|
1792
1830
|
) }),
|
|
1793
|
-
columns.map((col, columnIndex) => /* @__PURE__ */
|
|
1831
|
+
columns.map((col, columnIndex) => /* @__PURE__ */ jsxs19(
|
|
1794
1832
|
"td",
|
|
1795
1833
|
{
|
|
1796
1834
|
className: cn(
|
|
@@ -1800,7 +1838,7 @@ function SortableTable({
|
|
|
1800
1838
|
style: { width: col.width, textAlign: col.align ?? "left" },
|
|
1801
1839
|
children: [
|
|
1802
1840
|
col.render(row, rowIndex),
|
|
1803
|
-
action && columnIndex === columns.length - 1 && /* @__PURE__ */
|
|
1841
|
+
action && columnIndex === columns.length - 1 && /* @__PURE__ */ jsx22("span", { className: "fractal-sortable-table-row-action", "aria-hidden": "true", children: /* @__PURE__ */ jsx22("span", { className: "fractal-sortable-table-row-action__icon", children: action.icon }) })
|
|
1804
1842
|
]
|
|
1805
1843
|
},
|
|
1806
1844
|
col.key
|
|
@@ -1816,7 +1854,7 @@ function SortableTable({
|
|
|
1816
1854
|
|
|
1817
1855
|
// src/components/Tabs/Tabs.tsx
|
|
1818
1856
|
import { useId as useId2, useLayoutEffect as useLayoutEffect2, useRef as useRef6, useState as useState8 } from "react";
|
|
1819
|
-
import { jsx as
|
|
1857
|
+
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1820
1858
|
function Tabs({
|
|
1821
1859
|
items,
|
|
1822
1860
|
defaultValue,
|
|
@@ -1887,8 +1925,8 @@ function Tabs({
|
|
|
1887
1925
|
selectTab(nextId2);
|
|
1888
1926
|
requestAnimationFrame(() => tabRefs.current[nextId2]?.focus());
|
|
1889
1927
|
};
|
|
1890
|
-
return /* @__PURE__ */
|
|
1891
|
-
/* @__PURE__ */
|
|
1928
|
+
return /* @__PURE__ */ jsxs20("div", { className: cn("fractal-tabs", `fractal-tabs--${variant}`, divider && "fractal-tabs--divider", className), children: [
|
|
1929
|
+
/* @__PURE__ */ jsx23(
|
|
1892
1930
|
"div",
|
|
1893
1931
|
{
|
|
1894
1932
|
ref: tabListRef,
|
|
@@ -1901,7 +1939,7 @@ function Tabs({
|
|
|
1901
1939
|
const isActive = item.id === activeId;
|
|
1902
1940
|
const tabId = `${reactId}-tab-${item.id}`;
|
|
1903
1941
|
const panelId = `${reactId}-panel-${item.id}`;
|
|
1904
|
-
return /* @__PURE__ */
|
|
1942
|
+
return /* @__PURE__ */ jsx23(
|
|
1905
1943
|
"button",
|
|
1906
1944
|
{
|
|
1907
1945
|
ref: (el) => {
|
|
@@ -1932,7 +1970,7 @@ function Tabs({
|
|
|
1932
1970
|
const tabId = `${reactId}-tab-${item.id}`;
|
|
1933
1971
|
const panelId = `${reactId}-panel-${item.id}`;
|
|
1934
1972
|
const isActive = item.id === activeId;
|
|
1935
|
-
return /* @__PURE__ */
|
|
1973
|
+
return /* @__PURE__ */ jsx23(
|
|
1936
1974
|
"div",
|
|
1937
1975
|
{
|
|
1938
1976
|
id: panelId,
|
|
@@ -1950,7 +1988,7 @@ function Tabs({
|
|
|
1950
1988
|
|
|
1951
1989
|
// src/components/ContentSwitcher/ContentSwitcher.tsx
|
|
1952
1990
|
import * as React15 from "react";
|
|
1953
|
-
import { jsx as
|
|
1991
|
+
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1954
1992
|
function ContentSwitcher({ items, value, onValueChange, ariaLabel, fullWidth = false, className }) {
|
|
1955
1993
|
const switcherRef = React15.useRef(null);
|
|
1956
1994
|
const buttonRefs = React15.useRef([]);
|
|
@@ -2008,7 +2046,7 @@ function ContentSwitcher({ items, value, onValueChange, ariaLabel, fullWidth = f
|
|
|
2008
2046
|
onValueChange(items[nextIndex].value);
|
|
2009
2047
|
}
|
|
2010
2048
|
};
|
|
2011
|
-
return /* @__PURE__ */
|
|
2049
|
+
return /* @__PURE__ */ jsxs21(
|
|
2012
2050
|
"div",
|
|
2013
2051
|
{
|
|
2014
2052
|
className: cn("fractal-content-switcher", fullWidth && "fractal-content-switcher--full-width", className),
|
|
@@ -2016,10 +2054,10 @@ function ContentSwitcher({ items, value, onValueChange, ariaLabel, fullWidth = f
|
|
|
2016
2054
|
"aria-label": ariaLabel,
|
|
2017
2055
|
ref: switcherRef,
|
|
2018
2056
|
children: [
|
|
2019
|
-
/* @__PURE__ */
|
|
2057
|
+
/* @__PURE__ */ jsx24("span", { className: "fractal-content-switcher__indicator", "aria-hidden": true }),
|
|
2020
2058
|
items.map((item, index) => {
|
|
2021
2059
|
const active = item.value === value;
|
|
2022
|
-
return /* @__PURE__ */
|
|
2060
|
+
return /* @__PURE__ */ jsx24(
|
|
2023
2061
|
"button",
|
|
2024
2062
|
{
|
|
2025
2063
|
className: cn("fractal-content-switcher__item", active && "fractal-content-switcher__item--active"),
|
|
@@ -2053,7 +2091,7 @@ function ContentSwitcher({ items, value, onValueChange, ariaLabel, fullWidth = f
|
|
|
2053
2091
|
// src/components/Disclosure/Disclosure.tsx
|
|
2054
2092
|
import { useId as useId3, useState as useState9 } from "react";
|
|
2055
2093
|
import { ChevronRight as ChevronRight3, ChevronDown as ChevronDown2 } from "@mirror-physics/fractal-icons";
|
|
2056
|
-
import { jsx as
|
|
2094
|
+
import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2057
2095
|
function Disclosure({
|
|
2058
2096
|
title,
|
|
2059
2097
|
meta,
|
|
@@ -2081,7 +2119,7 @@ function Disclosure({
|
|
|
2081
2119
|
onOpenChange?.(next);
|
|
2082
2120
|
}
|
|
2083
2121
|
};
|
|
2084
|
-
return /* @__PURE__ */
|
|
2122
|
+
return /* @__PURE__ */ jsxs22(
|
|
2085
2123
|
"div",
|
|
2086
2124
|
{
|
|
2087
2125
|
className: cn(
|
|
@@ -2092,7 +2130,7 @@ function Disclosure({
|
|
|
2092
2130
|
className
|
|
2093
2131
|
),
|
|
2094
2132
|
children: [
|
|
2095
|
-
/* @__PURE__ */
|
|
2133
|
+
/* @__PURE__ */ jsxs22(
|
|
2096
2134
|
"button",
|
|
2097
2135
|
{
|
|
2098
2136
|
type: "button",
|
|
@@ -2103,13 +2141,13 @@ function Disclosure({
|
|
|
2103
2141
|
disabled,
|
|
2104
2142
|
onClick: toggle,
|
|
2105
2143
|
children: [
|
|
2106
|
-
/* @__PURE__ */
|
|
2107
|
-
/* @__PURE__ */
|
|
2108
|
-
meta && /* @__PURE__ */
|
|
2144
|
+
/* @__PURE__ */ jsx25("span", { className: "fractal-disclosure-icon", "aria-hidden": "true", children: isOpen ? /* @__PURE__ */ jsx25(ChevronDown2, { size: 16 }) : /* @__PURE__ */ jsx25(ChevronRight3, { size: 16 }) }),
|
|
2145
|
+
/* @__PURE__ */ jsx25("span", { className: "fractal-disclosure-title", children: title }),
|
|
2146
|
+
meta && /* @__PURE__ */ jsx25("span", { className: "fractal-disclosure-meta", children: meta })
|
|
2109
2147
|
]
|
|
2110
2148
|
}
|
|
2111
2149
|
),
|
|
2112
|
-
/* @__PURE__ */
|
|
2150
|
+
/* @__PURE__ */ jsx25(
|
|
2113
2151
|
"div",
|
|
2114
2152
|
{
|
|
2115
2153
|
id: panelId,
|
|
@@ -2117,7 +2155,7 @@ function Disclosure({
|
|
|
2117
2155
|
"aria-labelledby": headerId,
|
|
2118
2156
|
className: "fractal-disclosure-panel",
|
|
2119
2157
|
hidden: !isOpen,
|
|
2120
|
-
children: /* @__PURE__ */
|
|
2158
|
+
children: /* @__PURE__ */ jsx25("div", { className: "fractal-disclosure-panel-inner", children })
|
|
2121
2159
|
}
|
|
2122
2160
|
)
|
|
2123
2161
|
]
|
|
@@ -2126,18 +2164,18 @@ function Disclosure({
|
|
|
2126
2164
|
}
|
|
2127
2165
|
|
|
2128
2166
|
// src/components/LatticeLoader/LatticeLoader.tsx
|
|
2129
|
-
import { jsx as
|
|
2167
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2130
2168
|
var LATTICE_COUNT = 160;
|
|
2131
2169
|
var WAVE_PERIOD = 80;
|
|
2132
2170
|
function LatticeLoader({ className, label = "Loading", ...props }) {
|
|
2133
|
-
return /* @__PURE__ */
|
|
2171
|
+
return /* @__PURE__ */ jsx26(
|
|
2134
2172
|
"span",
|
|
2135
2173
|
{
|
|
2136
2174
|
"aria-label": label,
|
|
2137
2175
|
className: cn("fractal-lattice-loader", className),
|
|
2138
2176
|
role: "progressbar",
|
|
2139
2177
|
...props,
|
|
2140
|
-
children: Array.from({ length: LATTICE_COUNT }, (_, index) => /* @__PURE__ */
|
|
2178
|
+
children: Array.from({ length: LATTICE_COUNT }, (_, index) => /* @__PURE__ */ jsx26(
|
|
2141
2179
|
"span",
|
|
2142
2180
|
{
|
|
2143
2181
|
"aria-hidden": "true",
|
|
@@ -2151,10 +2189,10 @@ function LatticeLoader({ className, label = "Loading", ...props }) {
|
|
|
2151
2189
|
}
|
|
2152
2190
|
|
|
2153
2191
|
// src/components/Ghost/Ghost.tsx
|
|
2154
|
-
import { jsx as
|
|
2192
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2155
2193
|
var toCssLength = (value) => typeof value === "number" ? `${value}px` : value;
|
|
2156
2194
|
function Ghost({ className, width, height, radius, style, ...props }) {
|
|
2157
|
-
return /* @__PURE__ */
|
|
2195
|
+
return /* @__PURE__ */ jsx27(
|
|
2158
2196
|
"div",
|
|
2159
2197
|
{
|
|
2160
2198
|
"aria-hidden": "true",
|
|
@@ -2170,15 +2208,15 @@ function Ghost({ className, width, height, radius, style, ...props }) {
|
|
|
2170
2208
|
);
|
|
2171
2209
|
}
|
|
2172
2210
|
function GhostLine({ className, size = "md", width = "100%", ...props }) {
|
|
2173
|
-
return /* @__PURE__ */
|
|
2211
|
+
return /* @__PURE__ */ jsx27(Ghost, { className: cn("fractal-ghost-line", `fractal-ghost-line--${size}`, className), width, ...props });
|
|
2174
2212
|
}
|
|
2175
|
-
function ButtonGhost({ className, size = "md", iconOnly = false, width, ...props }) {
|
|
2176
|
-
return /* @__PURE__ */
|
|
2213
|
+
function ButtonGhost({ className, size = "md", controlSize, iconOnly = false, width, ...props }) {
|
|
2214
|
+
return /* @__PURE__ */ jsx27(Ghost, { "data-control-size": controlSize ?? size, className: cn("fractal-ghost-button", `fractal-ghost-button--${size}`, iconOnly && "fractal-ghost-button--icon-only", className), width, ...props });
|
|
2177
2215
|
}
|
|
2178
2216
|
function CardGhost({ className, lines = 3, showHeader = true, ...props }) {
|
|
2179
|
-
return /* @__PURE__ */
|
|
2180
|
-
showHeader && /* @__PURE__ */
|
|
2181
|
-
/* @__PURE__ */
|
|
2217
|
+
return /* @__PURE__ */ jsxs23("div", { "aria-hidden": "true", className: cn("fractal-ghost-card", className), ...props, children: [
|
|
2218
|
+
showHeader && /* @__PURE__ */ jsx27(GhostLine, { width: "38%" }),
|
|
2219
|
+
/* @__PURE__ */ jsx27("div", { className: "fractal-ghost-stack", children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ jsx27(GhostLine, { width: index === lines - 1 ? "62%" : "100%" }, index)) })
|
|
2182
2220
|
] });
|
|
2183
2221
|
}
|
|
2184
2222
|
function DataTableGhost({
|
|
@@ -2192,81 +2230,81 @@ function DataTableGhost({
|
|
|
2192
2230
|
...props
|
|
2193
2231
|
}) {
|
|
2194
2232
|
const cells = Array.from({ length: columns }, (_, index) => index);
|
|
2195
|
-
return /* @__PURE__ */
|
|
2196
|
-
(showHeader || headers) && /* @__PURE__ */
|
|
2197
|
-
/* @__PURE__ */
|
|
2233
|
+
return /* @__PURE__ */ jsx27("div", { "aria-busy": "true", "aria-label": "Loading table", className: cn("fractal-ghost-table", `fractal-ghost-table--${size}`, className), role: "status", ...props, children: /* @__PURE__ */ jsxs23("table", { className: "fractal-ghost-table__table", children: [
|
|
2234
|
+
(showHeader || headers) && /* @__PURE__ */ jsx27("thead", { children: /* @__PURE__ */ jsx27("tr", { className: "fractal-ghost-table__head-row", children: cells.map((index) => /* @__PURE__ */ jsx27("th", { style: { width: columnWidths?.[index] }, children: headers?.[index] ?? /* @__PURE__ */ jsx27(GhostLine, { size: "sm", width: index === columns - 1 ? "62%" : "76%" }) }, index)) }) }),
|
|
2235
|
+
/* @__PURE__ */ jsx27("tbody", { children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ jsx27("tr", { className: "fractal-ghost-table__row", children: cells.map((columnIndex) => /* @__PURE__ */ jsx27("td", { style: { width: columnWidths?.[columnIndex] }, children: /* @__PURE__ */ jsx27(GhostLine, { width: `${[72, 54, 82, 63, 46][(rowIndex + columnIndex) % 5]}%` }) }, columnIndex)) }, rowIndex)) })
|
|
2198
2236
|
] }) });
|
|
2199
2237
|
}
|
|
2200
2238
|
function InputGhost({ className, labelWidth = "26%", ...props }) {
|
|
2201
|
-
return /* @__PURE__ */
|
|
2239
|
+
return /* @__PURE__ */ jsx27(FormFieldGhost, { className, labelWidth, ...props });
|
|
2202
2240
|
}
|
|
2203
2241
|
function TextareaGhost({ className, labelWidth = "26%", ...props }) {
|
|
2204
|
-
return /* @__PURE__ */
|
|
2242
|
+
return /* @__PURE__ */ jsx27(FormFieldGhost, { className, labelWidth, multiline: true, ...props });
|
|
2205
2243
|
}
|
|
2206
2244
|
function LabelGhost({ className, width = "26%", ...props }) {
|
|
2207
|
-
return /* @__PURE__ */
|
|
2245
|
+
return /* @__PURE__ */ jsx27(GhostLine, { className: cn("fractal-ghost-label", className), size: "sm", width, ...props });
|
|
2208
2246
|
}
|
|
2209
|
-
function FormFieldGhost({ className, labelWidth = "26%", multiline = false, ...props }) {
|
|
2210
|
-
return /* @__PURE__ */
|
|
2211
|
-
/* @__PURE__ */
|
|
2212
|
-
/* @__PURE__ */
|
|
2247
|
+
function FormFieldGhost({ className, labelWidth = "26%", multiline = false, controlSize = "md", ...props }) {
|
|
2248
|
+
return /* @__PURE__ */ jsxs23("div", { "aria-hidden": "true", "data-control-size": controlSize, className: cn("fractal-ghost-field", className), ...props, children: [
|
|
2249
|
+
/* @__PURE__ */ jsx27(LabelGhost, { width: labelWidth }),
|
|
2250
|
+
/* @__PURE__ */ jsx27(Ghost, { className: cn("fractal-ghost-field__control", multiline && "fractal-ghost-field__control--multiline") })
|
|
2213
2251
|
] });
|
|
2214
2252
|
}
|
|
2215
2253
|
function AlertGhost({ className, ...props }) {
|
|
2216
|
-
return /* @__PURE__ */
|
|
2217
|
-
/* @__PURE__ */
|
|
2218
|
-
/* @__PURE__ */
|
|
2254
|
+
return /* @__PURE__ */ jsxs23("div", { "aria-hidden": "true", className: cn("fractal-ghost-alert", className), ...props, children: [
|
|
2255
|
+
/* @__PURE__ */ jsx27(GhostLine, { width: "30%" }),
|
|
2256
|
+
/* @__PURE__ */ jsx27(GhostLine, { size: "sm", width: "78%" })
|
|
2219
2257
|
] });
|
|
2220
2258
|
}
|
|
2221
2259
|
function CheckboxGhost({ className, ...props }) {
|
|
2222
|
-
return /* @__PURE__ */
|
|
2223
|
-
/* @__PURE__ */
|
|
2224
|
-
/* @__PURE__ */
|
|
2260
|
+
return /* @__PURE__ */ jsxs23("div", { "aria-hidden": "true", className: cn("fractal-ghost-choice", className), ...props, children: [
|
|
2261
|
+
/* @__PURE__ */ jsx27(Ghost, { className: "fractal-ghost-choice__control" }),
|
|
2262
|
+
/* @__PURE__ */ jsx27(GhostLine, { width: "42%" })
|
|
2225
2263
|
] });
|
|
2226
2264
|
}
|
|
2227
2265
|
var ToggleGhost = CheckboxGhost;
|
|
2228
2266
|
function ChipGhost({ className, width = 74, ...props }) {
|
|
2229
|
-
return /* @__PURE__ */
|
|
2267
|
+
return /* @__PURE__ */ jsx27(Ghost, { className: cn("fractal-ghost-chip", className), height: 24, width, ...props });
|
|
2230
2268
|
}
|
|
2231
2269
|
function LinkGhost({ className, width = 96, ...props }) {
|
|
2232
|
-
return /* @__PURE__ */
|
|
2270
|
+
return /* @__PURE__ */ jsx27(GhostLine, { className: cn("fractal-ghost-link", className), size: "sm", width, ...props });
|
|
2233
2271
|
}
|
|
2234
2272
|
var TextButtonGhost = LinkGhost;
|
|
2235
|
-
function DropdownGhost({ className, ...props }) {
|
|
2236
|
-
return /* @__PURE__ */
|
|
2237
|
-
/* @__PURE__ */
|
|
2238
|
-
/* @__PURE__ */
|
|
2273
|
+
function DropdownGhost({ className, controlSize = "md", ...props }) {
|
|
2274
|
+
return /* @__PURE__ */ jsxs23("div", { "aria-hidden": "true", "data-control-size": controlSize, className: cn("fractal-ghost-dropdown", className), ...props, children: [
|
|
2275
|
+
/* @__PURE__ */ jsx27(GhostLine, { width: "38%" }),
|
|
2276
|
+
/* @__PURE__ */ jsx27(Ghost, { className: "fractal-ghost-dropdown__chevron" })
|
|
2239
2277
|
] });
|
|
2240
2278
|
}
|
|
2241
2279
|
function ContentSwitcherGhost({ className, options = 3, ...props }) {
|
|
2242
|
-
return /* @__PURE__ */
|
|
2280
|
+
return /* @__PURE__ */ jsx27("div", { "aria-hidden": "true", className: cn("fractal-ghost-switcher", className), ...props, children: Array.from({ length: options }, (_, index) => /* @__PURE__ */ jsx27(Ghost, {}, index)) });
|
|
2243
2281
|
}
|
|
2244
2282
|
var TabsGhost = ContentSwitcherGhost;
|
|
2245
2283
|
function DisclosureGhost({ className, ...props }) {
|
|
2246
|
-
return /* @__PURE__ */
|
|
2247
|
-
/* @__PURE__ */
|
|
2248
|
-
/* @__PURE__ */
|
|
2284
|
+
return /* @__PURE__ */ jsxs23("div", { "aria-hidden": "true", className: cn("fractal-ghost-disclosure", className), ...props, children: [
|
|
2285
|
+
/* @__PURE__ */ jsx27(Ghost, { className: "fractal-ghost-disclosure__icon" }),
|
|
2286
|
+
/* @__PURE__ */ jsx27(GhostLine, { width: "42%" })
|
|
2249
2287
|
] });
|
|
2250
2288
|
}
|
|
2251
2289
|
function PaginationGhost({ className, pages = 5, ...props }) {
|
|
2252
|
-
return /* @__PURE__ */
|
|
2290
|
+
return /* @__PURE__ */ jsx27("div", { "aria-hidden": "true", className: cn("fractal-ghost-pagination", className), ...props, children: Array.from({ length: pages }, (_, index) => /* @__PURE__ */ jsx27(Ghost, {}, index)) });
|
|
2253
2291
|
}
|
|
2254
2292
|
function FileDropzoneGhost({ className, ...props }) {
|
|
2255
|
-
return /* @__PURE__ */
|
|
2256
|
-
/* @__PURE__ */
|
|
2257
|
-
/* @__PURE__ */
|
|
2258
|
-
/* @__PURE__ */
|
|
2293
|
+
return /* @__PURE__ */ jsxs23("div", { "aria-hidden": "true", className: cn("fractal-ghost-dropzone", className), ...props, children: [
|
|
2294
|
+
/* @__PURE__ */ jsx27(Ghost, { className: "fractal-ghost-dropzone__icon" }),
|
|
2295
|
+
/* @__PURE__ */ jsx27(GhostLine, { width: "26%" }),
|
|
2296
|
+
/* @__PURE__ */ jsx27(GhostLine, { size: "sm", width: "46%" })
|
|
2259
2297
|
] });
|
|
2260
2298
|
}
|
|
2261
2299
|
function PromptCardGhost({ className, ...props }) {
|
|
2262
|
-
return /* @__PURE__ */
|
|
2300
|
+
return /* @__PURE__ */ jsx27(CardGhost, { className: cn("fractal-ghost-prompt-card", className), lines: 4, ...props });
|
|
2263
2301
|
}
|
|
2264
2302
|
function ConversationGhost({
|
|
2265
2303
|
className,
|
|
2266
2304
|
"aria-label": ariaLabel = "Loading conversation",
|
|
2267
2305
|
...props
|
|
2268
2306
|
}) {
|
|
2269
|
-
return /* @__PURE__ */
|
|
2307
|
+
return /* @__PURE__ */ jsxs23(
|
|
2270
2308
|
"div",
|
|
2271
2309
|
{
|
|
2272
2310
|
"aria-busy": "true",
|
|
@@ -2275,54 +2313,54 @@ function ConversationGhost({
|
|
|
2275
2313
|
role: "status",
|
|
2276
2314
|
...props,
|
|
2277
2315
|
children: [
|
|
2278
|
-
/* @__PURE__ */
|
|
2279
|
-
/* @__PURE__ */
|
|
2280
|
-
/* @__PURE__ */
|
|
2281
|
-
/* @__PURE__ */
|
|
2316
|
+
/* @__PURE__ */ jsx27("div", { "aria-hidden": "true", className: "fractal-ghost-conversation__message fractal-ghost-conversation__message--user", children: /* @__PURE__ */ jsxs23("div", { className: "fractal-ghost-conversation__bubble", children: [
|
|
2317
|
+
/* @__PURE__ */ jsx27(GhostLine, { width: "100%" }),
|
|
2318
|
+
/* @__PURE__ */ jsx27(GhostLine, { width: "86%" }),
|
|
2319
|
+
/* @__PURE__ */ jsx27(GhostLine, { width: "64%" })
|
|
2282
2320
|
] }) }),
|
|
2283
|
-
/* @__PURE__ */
|
|
2284
|
-
/* @__PURE__ */
|
|
2285
|
-
/* @__PURE__ */
|
|
2286
|
-
/* @__PURE__ */
|
|
2321
|
+
/* @__PURE__ */ jsxs23("div", { "aria-hidden": "true", className: "fractal-ghost-conversation__message fractal-ghost-conversation__message--assistant", children: [
|
|
2322
|
+
/* @__PURE__ */ jsx27(GhostLine, { width: "92%" }),
|
|
2323
|
+
/* @__PURE__ */ jsx27(GhostLine, { width: "78%" }),
|
|
2324
|
+
/* @__PURE__ */ jsx27(GhostLine, { width: "58%" })
|
|
2287
2325
|
] })
|
|
2288
2326
|
]
|
|
2289
2327
|
}
|
|
2290
2328
|
);
|
|
2291
2329
|
}
|
|
2292
2330
|
function SortableTableGhost(props) {
|
|
2293
|
-
return /* @__PURE__ */
|
|
2331
|
+
return /* @__PURE__ */ jsx27(DataTableGhost, { ...props });
|
|
2294
2332
|
}
|
|
2295
2333
|
function SidebarGhost({ className, items = 6, ...props }) {
|
|
2296
|
-
return /* @__PURE__ */
|
|
2297
|
-
/* @__PURE__ */
|
|
2298
|
-
/* @__PURE__ */
|
|
2299
|
-
/* @__PURE__ */
|
|
2300
|
-
/* @__PURE__ */
|
|
2334
|
+
return /* @__PURE__ */ jsxs23("aside", { "aria-hidden": "true", className: cn("fractal-ghost-sidebar", className), ...props, children: [
|
|
2335
|
+
/* @__PURE__ */ jsx27(Ghost, { className: "fractal-ghost-sidebar__brand" }),
|
|
2336
|
+
/* @__PURE__ */ jsx27("div", { className: "fractal-ghost-sidebar__items", children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ jsxs23("div", { className: "fractal-ghost-sidebar__item", children: [
|
|
2337
|
+
/* @__PURE__ */ jsx27(Ghost, {}),
|
|
2338
|
+
/* @__PURE__ */ jsx27(GhostLine, { width: `${[54, 68, 44, 61][index % 4]}%` })
|
|
2301
2339
|
] }, index)) })
|
|
2302
2340
|
] });
|
|
2303
2341
|
}
|
|
2304
2342
|
function ModalGhost({ className, title, lines = 3, ...props }) {
|
|
2305
|
-
return /* @__PURE__ */
|
|
2343
|
+
return /* @__PURE__ */ jsx27(SurfaceGhost, { className: cn("fractal-ghost-modal", className), title, lines, ...props });
|
|
2306
2344
|
}
|
|
2307
2345
|
function SidePanelGhost({ className, title, lines = 5, ...props }) {
|
|
2308
|
-
return /* @__PURE__ */
|
|
2346
|
+
return /* @__PURE__ */ jsx27(SurfaceGhost, { className: cn("fractal-ghost-side-panel", className), title, lines, ...props });
|
|
2309
2347
|
}
|
|
2310
2348
|
function SurfaceGhost({ className, title, lines = 3, ...props }) {
|
|
2311
|
-
return /* @__PURE__ */
|
|
2312
|
-
/* @__PURE__ */
|
|
2313
|
-
/* @__PURE__ */
|
|
2314
|
-
/* @__PURE__ */
|
|
2349
|
+
return /* @__PURE__ */ jsxs23("div", { "aria-hidden": "true", className: cn("fractal-ghost-surface", className), ...props, children: [
|
|
2350
|
+
/* @__PURE__ */ jsxs23("div", { className: "fractal-ghost-surface__header", children: [
|
|
2351
|
+
/* @__PURE__ */ jsx27(GhostLine, { width: "42%" }),
|
|
2352
|
+
/* @__PURE__ */ jsx27(Ghost, { className: "fractal-ghost-surface__close" })
|
|
2315
2353
|
] }),
|
|
2316
|
-
title && /* @__PURE__ */
|
|
2317
|
-
/* @__PURE__ */
|
|
2354
|
+
title && /* @__PURE__ */ jsx27("div", { className: "fractal-ghost-surface__title", children: title }),
|
|
2355
|
+
/* @__PURE__ */ jsx27("div", { className: "fractal-ghost-stack", children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ jsx27(GhostLine, { width: index === lines - 1 ? "64%" : "100%" }, index)) })
|
|
2318
2356
|
] });
|
|
2319
2357
|
}
|
|
2320
2358
|
|
|
2321
2359
|
// src/components/Sidebar/Sidebar.tsx
|
|
2322
2360
|
import * as React16 from "react";
|
|
2323
|
-
import { Fragment as Fragment3, jsx as
|
|
2361
|
+
import { Fragment as Fragment3, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2324
2362
|
var Sidebar = React16.forwardRef(
|
|
2325
|
-
({ className, width, compact = false, style, ...props }, ref) => /* @__PURE__ */
|
|
2363
|
+
({ className, width, compact = false, style, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
2326
2364
|
"aside",
|
|
2327
2365
|
{
|
|
2328
2366
|
ref,
|
|
@@ -2335,11 +2373,11 @@ var Sidebar = React16.forwardRef(
|
|
|
2335
2373
|
);
|
|
2336
2374
|
Sidebar.displayName = "Sidebar";
|
|
2337
2375
|
var SidebarHeader = React16.forwardRef(
|
|
2338
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
2376
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx28("div", { ref, className: cn("fractal-sidebar__header", className), ...props })
|
|
2339
2377
|
);
|
|
2340
2378
|
SidebarHeader.displayName = "SidebarHeader";
|
|
2341
2379
|
var SidebarBrand = React16.forwardRef(
|
|
2342
|
-
({ className, type = "button", ...props }, ref) => /* @__PURE__ */
|
|
2380
|
+
({ className, type = "button", ...props }, ref) => /* @__PURE__ */ jsx28("button", { ref, type, className: cn("fractal-sidebar__brand", className), ...props })
|
|
2343
2381
|
);
|
|
2344
2382
|
SidebarBrand.displayName = "SidebarBrand";
|
|
2345
2383
|
function SidebarAccountMenu({
|
|
@@ -2350,7 +2388,7 @@ function SidebarAccountMenu({
|
|
|
2350
2388
|
icon,
|
|
2351
2389
|
className
|
|
2352
2390
|
}) {
|
|
2353
|
-
return /* @__PURE__ */
|
|
2391
|
+
return /* @__PURE__ */ jsx28(
|
|
2354
2392
|
Dropdown,
|
|
2355
2393
|
{
|
|
2356
2394
|
align: "left",
|
|
@@ -2360,9 +2398,9 @@ function SidebarAccountMenu({
|
|
|
2360
2398
|
panelClassName: "fractal-sidebar__account-panel",
|
|
2361
2399
|
selectedValue: "",
|
|
2362
2400
|
triggerClassName: "fractal-sidebar__account-trigger",
|
|
2363
|
-
triggerContent: /* @__PURE__ */
|
|
2364
|
-
icon && /* @__PURE__ */
|
|
2365
|
-
/* @__PURE__ */
|
|
2401
|
+
triggerContent: /* @__PURE__ */ jsxs24(Fragment3, { children: [
|
|
2402
|
+
icon && /* @__PURE__ */ jsx28("span", { className: "fractal-sidebar__account-icon", "aria-hidden": "true", children: icon }),
|
|
2403
|
+
/* @__PURE__ */ jsx28("span", { className: "fractal-sidebar__account-name", children: name })
|
|
2366
2404
|
] }),
|
|
2367
2405
|
triggerLabel,
|
|
2368
2406
|
triggerVariant: "tertiary"
|
|
@@ -2370,15 +2408,15 @@ function SidebarAccountMenu({
|
|
|
2370
2408
|
);
|
|
2371
2409
|
}
|
|
2372
2410
|
var SidebarNav = React16.forwardRef(
|
|
2373
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
2411
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx28("nav", { ref, className: cn("fractal-sidebar__nav", className), ...props })
|
|
2374
2412
|
);
|
|
2375
2413
|
SidebarNav.displayName = "SidebarNav";
|
|
2376
2414
|
var SidebarSection = React16.forwardRef(
|
|
2377
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
2415
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx28("div", { ref, className: cn("fractal-sidebar__section", className), ...props })
|
|
2378
2416
|
);
|
|
2379
2417
|
SidebarSection.displayName = "SidebarSection";
|
|
2380
2418
|
var SidebarNavItem = React16.forwardRef(
|
|
2381
|
-
({ active = false, icon, endAdornment, className, type = "button", children, ...props }, ref) => /* @__PURE__ */
|
|
2419
|
+
({ active = false, icon, endAdornment, className, type = "button", children, ...props }, ref) => /* @__PURE__ */ jsxs24(
|
|
2382
2420
|
"button",
|
|
2383
2421
|
{
|
|
2384
2422
|
ref,
|
|
@@ -2388,28 +2426,28 @@ var SidebarNavItem = React16.forwardRef(
|
|
|
2388
2426
|
"aria-current": active ? "page" : void 0,
|
|
2389
2427
|
...props,
|
|
2390
2428
|
children: [
|
|
2391
|
-
icon && /* @__PURE__ */
|
|
2392
|
-
/* @__PURE__ */
|
|
2393
|
-
endAdornment && /* @__PURE__ */
|
|
2429
|
+
icon && /* @__PURE__ */ jsx28("span", { className: "fractal-sidebar__nav-item-icon", "aria-hidden": "true", children: icon }),
|
|
2430
|
+
/* @__PURE__ */ jsx28("span", { className: "fractal-sidebar__nav-item-label", children }),
|
|
2431
|
+
endAdornment && /* @__PURE__ */ jsx28("span", { className: "fractal-sidebar__nav-item-end", children: endAdornment })
|
|
2394
2432
|
]
|
|
2395
2433
|
}
|
|
2396
2434
|
)
|
|
2397
2435
|
);
|
|
2398
2436
|
SidebarNavItem.displayName = "SidebarNavItem";
|
|
2399
2437
|
var SidebarFooter = React16.forwardRef(
|
|
2400
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
2438
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx28("div", { ref, className: cn("fractal-sidebar__footer", className), ...props })
|
|
2401
2439
|
);
|
|
2402
2440
|
SidebarFooter.displayName = "SidebarFooter";
|
|
2403
2441
|
|
|
2404
2442
|
// src/components/SidePanel/SidePanel.tsx
|
|
2405
2443
|
import { createPortal as createPortal3 } from "react-dom";
|
|
2406
2444
|
import { Close as Close2 } from "@mirror-physics/fractal-icons";
|
|
2407
|
-
import { jsx as
|
|
2445
|
+
import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2408
2446
|
function SidePanel({ open, onClose, title, description, children, footer, size = "md", loading = false, loadingLabel = "Loading", className }) {
|
|
2409
2447
|
useEscapeDismiss(80, onClose, open);
|
|
2410
2448
|
if (!open) return null;
|
|
2411
2449
|
return createPortal3(
|
|
2412
|
-
/* @__PURE__ */
|
|
2450
|
+
/* @__PURE__ */ jsx29("div", { className: "fractal-side-panel-overlay", onMouseDown: onClose, children: /* @__PURE__ */ jsxs25(
|
|
2413
2451
|
"aside",
|
|
2414
2452
|
{
|
|
2415
2453
|
className: cn("fractal-side-panel", `fractal-side-panel--${size}`, className),
|
|
@@ -2418,15 +2456,15 @@ function SidePanel({ open, onClose, title, description, children, footer, size =
|
|
|
2418
2456
|
role: "dialog",
|
|
2419
2457
|
onMouseDown: (event) => event.stopPropagation(),
|
|
2420
2458
|
children: [
|
|
2421
|
-
/* @__PURE__ */
|
|
2422
|
-
/* @__PURE__ */
|
|
2423
|
-
typeof title === "string" ? /* @__PURE__ */
|
|
2424
|
-
description && /* @__PURE__ */
|
|
2459
|
+
/* @__PURE__ */ jsxs25("header", { className: "fractal-side-panel__header", children: [
|
|
2460
|
+
/* @__PURE__ */ jsxs25("div", { className: "fractal-side-panel__heading", children: [
|
|
2461
|
+
typeof title === "string" ? /* @__PURE__ */ jsx29("h2", { className: "fractal-side-panel__title", children: title }) : /* @__PURE__ */ jsx29("div", { className: "fractal-side-panel__title", children: title }),
|
|
2462
|
+
description && /* @__PURE__ */ jsx29("p", { className: "fractal-side-panel__description", children: description })
|
|
2425
2463
|
] }),
|
|
2426
|
-
/* @__PURE__ */
|
|
2464
|
+
/* @__PURE__ */ jsx29("button", { type: "button", className: "fractal-side-panel__close", "aria-label": "Close panel", onClick: onClose, children: /* @__PURE__ */ jsx29(Close2, { size: 18 }) })
|
|
2427
2465
|
] }),
|
|
2428
|
-
/* @__PURE__ */
|
|
2429
|
-
footer && /* @__PURE__ */
|
|
2466
|
+
/* @__PURE__ */ jsx29("div", { "aria-busy": loading || void 0, className: cn("fractal-side-panel__body", loading && "fractal-side-panel__body--loading"), children: loading ? /* @__PURE__ */ jsx29(UILoader, { label: loadingLabel }) : children }),
|
|
2467
|
+
footer && /* @__PURE__ */ jsx29("footer", { className: "fractal-side-panel__footer", children: footer })
|
|
2430
2468
|
]
|
|
2431
2469
|
}
|
|
2432
2470
|
) }),
|
|
@@ -2436,17 +2474,17 @@ function SidePanel({ open, onClose, title, description, children, footer, size =
|
|
|
2436
2474
|
|
|
2437
2475
|
// src/components/Textarea/Textarea.tsx
|
|
2438
2476
|
import * as React17 from "react";
|
|
2439
|
-
import { jsx as
|
|
2477
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2440
2478
|
var Textarea = React17.forwardRef(
|
|
2441
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
2479
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx30("textarea", { ref, className: cn("fractal-textarea", className), ...props })
|
|
2442
2480
|
);
|
|
2443
2481
|
Textarea.displayName = "Textarea";
|
|
2444
2482
|
|
|
2445
2483
|
// src/components/TextButton/TextButton.tsx
|
|
2446
2484
|
import * as React18 from "react";
|
|
2447
|
-
import { jsx as
|
|
2485
|
+
import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2448
2486
|
var TextButton = React18.forwardRef(
|
|
2449
|
-
({ className, icon, iconPosition = "start", size = "md", tone = "primary", children, ...props }, ref) => /* @__PURE__ */
|
|
2487
|
+
({ className, icon, iconPosition = "start", size = "md", tone = "primary", children, ...props }, ref) => /* @__PURE__ */ jsxs26(
|
|
2450
2488
|
"button",
|
|
2451
2489
|
{
|
|
2452
2490
|
ref,
|
|
@@ -2454,9 +2492,9 @@ var TextButton = React18.forwardRef(
|
|
|
2454
2492
|
type: "button",
|
|
2455
2493
|
...props,
|
|
2456
2494
|
children: [
|
|
2457
|
-
icon && iconPosition === "start" && /* @__PURE__ */
|
|
2458
|
-
/* @__PURE__ */
|
|
2459
|
-
icon && iconPosition === "end" && /* @__PURE__ */
|
|
2495
|
+
icon && iconPosition === "start" && /* @__PURE__ */ jsx31("span", { className: "fractal-text-button__icon", "aria-hidden": "true", children: icon }),
|
|
2496
|
+
/* @__PURE__ */ jsx31("span", { children }),
|
|
2497
|
+
icon && iconPosition === "end" && /* @__PURE__ */ jsx31("span", { className: "fractal-text-button__icon", "aria-hidden": "true", children: icon })
|
|
2460
2498
|
]
|
|
2461
2499
|
}
|
|
2462
2500
|
)
|
|
@@ -2466,7 +2504,7 @@ TextButton.displayName = "TextButton";
|
|
|
2466
2504
|
// src/components/FileDropzone/FileDropzone.tsx
|
|
2467
2505
|
import * as React19 from "react";
|
|
2468
2506
|
import { Close as Close3, FileArrowUp } from "@mirror-physics/fractal-icons";
|
|
2469
|
-
import { jsx as
|
|
2507
|
+
import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2470
2508
|
function FileDropzone({
|
|
2471
2509
|
files,
|
|
2472
2510
|
onFilesChange,
|
|
@@ -2486,8 +2524,8 @@ function FileDropzone({
|
|
|
2486
2524
|
if (additions.length === 0) return;
|
|
2487
2525
|
onFilesChange(multiple ? [...files, ...additions] : additions.slice(0, 1));
|
|
2488
2526
|
};
|
|
2489
|
-
return /* @__PURE__ */
|
|
2490
|
-
/* @__PURE__ */
|
|
2527
|
+
return /* @__PURE__ */ jsxs27("div", { className: cn("fractal-file-dropzone", className), children: [
|
|
2528
|
+
/* @__PURE__ */ jsx32(
|
|
2491
2529
|
"input",
|
|
2492
2530
|
{
|
|
2493
2531
|
ref: inputRef,
|
|
@@ -2503,7 +2541,7 @@ function FileDropzone({
|
|
|
2503
2541
|
}
|
|
2504
2542
|
}
|
|
2505
2543
|
),
|
|
2506
|
-
/* @__PURE__ */
|
|
2544
|
+
/* @__PURE__ */ jsxs27(
|
|
2507
2545
|
"button",
|
|
2508
2546
|
{
|
|
2509
2547
|
className: "fractal-file-dropzone__target",
|
|
@@ -2526,18 +2564,18 @@ function FileDropzone({
|
|
|
2526
2564
|
addFiles(event.dataTransfer.files);
|
|
2527
2565
|
},
|
|
2528
2566
|
children: [
|
|
2529
|
-
/* @__PURE__ */
|
|
2530
|
-
/* @__PURE__ */
|
|
2531
|
-
/* @__PURE__ */
|
|
2532
|
-
description && /* @__PURE__ */
|
|
2567
|
+
/* @__PURE__ */ jsx32(FileArrowUp, { "aria-hidden": "true", size: 20 }),
|
|
2568
|
+
/* @__PURE__ */ jsxs27("span", { className: "fractal-file-dropzone__copy", children: [
|
|
2569
|
+
/* @__PURE__ */ jsx32("span", { className: "fractal-file-dropzone__title", children: title }),
|
|
2570
|
+
description && /* @__PURE__ */ jsx32("span", { className: "fractal-file-dropzone__description", children: description })
|
|
2533
2571
|
] })
|
|
2534
2572
|
]
|
|
2535
2573
|
}
|
|
2536
2574
|
),
|
|
2537
|
-
files.length > 0 && /* @__PURE__ */
|
|
2538
|
-
/* @__PURE__ */
|
|
2539
|
-
/* @__PURE__ */
|
|
2540
|
-
/* @__PURE__ */
|
|
2575
|
+
files.length > 0 && /* @__PURE__ */ jsx32("ul", { className: "fractal-file-dropzone__files", "aria-label": "Attached files", children: files.map((file, index) => /* @__PURE__ */ jsxs27("li", { className: "fractal-file-dropzone__file", children: [
|
|
2576
|
+
/* @__PURE__ */ jsx32("span", { className: "fractal-file-dropzone__file-name", children: file.name }),
|
|
2577
|
+
/* @__PURE__ */ jsx32("span", { className: "fractal-file-dropzone__file-meta", children: formatFileSize(file.size) }),
|
|
2578
|
+
/* @__PURE__ */ jsx32(
|
|
2541
2579
|
"button",
|
|
2542
2580
|
{
|
|
2543
2581
|
className: "fractal-file-dropzone__remove",
|
|
@@ -2545,7 +2583,7 @@ function FileDropzone({
|
|
|
2545
2583
|
"aria-label": `Remove ${file.name}`,
|
|
2546
2584
|
disabled,
|
|
2547
2585
|
onClick: () => onFilesChange(files.filter((_, fileIndex) => fileIndex !== index)),
|
|
2548
|
-
children: /* @__PURE__ */
|
|
2586
|
+
children: /* @__PURE__ */ jsx32(Close3, { "aria-hidden": "true", size: 14 })
|
|
2549
2587
|
}
|
|
2550
2588
|
)
|
|
2551
2589
|
] }, `${file.name}-${file.size}-${index}`)) })
|
|
@@ -2559,7 +2597,7 @@ function formatFileSize(bytes) {
|
|
|
2559
2597
|
|
|
2560
2598
|
// src/components/Pagination/Pagination.tsx
|
|
2561
2599
|
import { ArrowLeft, ArrowRight } from "@mirror-physics/fractal-icons";
|
|
2562
|
-
import { jsx as
|
|
2600
|
+
import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2563
2601
|
function Pagination({
|
|
2564
2602
|
page,
|
|
2565
2603
|
pageSize,
|
|
@@ -2575,10 +2613,10 @@ function Pagination({
|
|
|
2575
2613
|
const start = totalItems === 0 ? 0 : (currentPage - 1) * pageSize + 1;
|
|
2576
2614
|
const end = Math.min(currentPage * pageSize, totalItems);
|
|
2577
2615
|
const canChangePageSize = pageSizeOptions != null && pageSizeOptions.length > 0 && onPageSizeChange != null;
|
|
2578
|
-
return /* @__PURE__ */
|
|
2579
|
-
/* @__PURE__ */
|
|
2580
|
-
/* @__PURE__ */
|
|
2581
|
-
canChangePageSize && /* @__PURE__ */
|
|
2616
|
+
return /* @__PURE__ */ jsxs28("nav", { className: cn("fractal-pagination", className), "aria-label": ariaLabel, children: [
|
|
2617
|
+
/* @__PURE__ */ jsx33("span", { className: "fractal-pagination__summary", children: totalItems === 0 ? "No results" : `${start}-${end} of ${totalItems}` }),
|
|
2618
|
+
/* @__PURE__ */ jsxs28("div", { className: "fractal-pagination__controls", children: [
|
|
2619
|
+
canChangePageSize && /* @__PURE__ */ jsx33(
|
|
2582
2620
|
Dropdown,
|
|
2583
2621
|
{
|
|
2584
2622
|
align: "right",
|
|
@@ -2595,7 +2633,7 @@ function Pagination({
|
|
|
2595
2633
|
triggerVariant: "tertiary"
|
|
2596
2634
|
}
|
|
2597
2635
|
),
|
|
2598
|
-
/* @__PURE__ */
|
|
2636
|
+
/* @__PURE__ */ jsx33(
|
|
2599
2637
|
"button",
|
|
2600
2638
|
{
|
|
2601
2639
|
className: "fractal-pagination__button",
|
|
@@ -2604,15 +2642,15 @@ function Pagination({
|
|
|
2604
2642
|
title: "Previous page",
|
|
2605
2643
|
disabled: currentPage === 1 || totalItems === 0,
|
|
2606
2644
|
onClick: () => onPageChange(currentPage - 1),
|
|
2607
|
-
children: /* @__PURE__ */
|
|
2645
|
+
children: /* @__PURE__ */ jsx33(ArrowLeft, { "aria-hidden": "true", size: 16 })
|
|
2608
2646
|
}
|
|
2609
2647
|
),
|
|
2610
|
-
/* @__PURE__ */
|
|
2648
|
+
/* @__PURE__ */ jsxs28("span", { className: "fractal-pagination__page", "aria-current": "page", children: [
|
|
2611
2649
|
currentPage,
|
|
2612
2650
|
" of ",
|
|
2613
2651
|
totalPages
|
|
2614
2652
|
] }),
|
|
2615
|
-
/* @__PURE__ */
|
|
2653
|
+
/* @__PURE__ */ jsx33(
|
|
2616
2654
|
"button",
|
|
2617
2655
|
{
|
|
2618
2656
|
className: "fractal-pagination__button",
|
|
@@ -2621,7 +2659,7 @@ function Pagination({
|
|
|
2621
2659
|
title: "Next page",
|
|
2622
2660
|
disabled: currentPage === totalPages || totalItems === 0,
|
|
2623
2661
|
onClick: () => onPageChange(currentPage + 1),
|
|
2624
|
-
children: /* @__PURE__ */
|
|
2662
|
+
children: /* @__PURE__ */ jsx33(ArrowRight, { "aria-hidden": "true", size: 16 })
|
|
2625
2663
|
}
|
|
2626
2664
|
)
|
|
2627
2665
|
] })
|
|
@@ -2678,6 +2716,7 @@ export {
|
|
|
2678
2716
|
PromptCard,
|
|
2679
2717
|
PromptCardGhost,
|
|
2680
2718
|
PromptGrid,
|
|
2719
|
+
Radio,
|
|
2681
2720
|
SidePanel,
|
|
2682
2721
|
SidePanelGhost,
|
|
2683
2722
|
Sidebar,
|