@cerberus-design/react 0.16.0-next-1e5283a → 0.16.0-next-004ae01
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/build/legacy/_tsup-dts-rollup.d.cts +298 -0
- package/build/legacy/components/combobox/combobox.cjs +224 -0
- package/build/legacy/components/combobox/combobox.cjs.map +1 -0
- package/build/legacy/components/combobox/index.cjs +326 -0
- package/build/legacy/components/combobox/index.cjs.map +1 -0
- package/build/legacy/components/combobox/item-group.cjs +178 -0
- package/build/legacy/components/combobox/item-group.cjs.map +1 -0
- package/build/legacy/components/combobox/item.cjs +192 -0
- package/build/legacy/components/combobox/item.cjs.map +1 -0
- package/build/legacy/components/combobox/parts.cjs +168 -0
- package/build/legacy/components/combobox/parts.cjs.map +1 -0
- package/build/legacy/components/combobox/primitives.cjs +182 -0
- package/build/legacy/components/combobox/primitives.cjs.map +1 -0
- package/build/legacy/components/combobox/use-stateful-collection.cjs +72 -0
- package/build/legacy/components/combobox/use-stateful-collection.cjs.map +1 -0
- package/build/legacy/components/select/index.cjs.map +1 -1
- package/build/legacy/components/select/select.cjs.map +1 -1
- package/build/legacy/index.cjs +960 -700
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +298 -0
- package/build/modern/{chunk-4WKM2MJC.js → chunk-3B4SFTQB.js} +2 -2
- package/build/modern/chunk-FZ53535Q.js +18 -0
- package/build/modern/chunk-FZ53535Q.js.map +1 -0
- package/build/modern/chunk-HIC7Z23X.js +37 -0
- package/build/modern/chunk-HIC7Z23X.js.map +1 -0
- package/build/modern/chunk-J7SAFAW3.js +44 -0
- package/build/modern/chunk-J7SAFAW3.js.map +1 -0
- package/build/modern/{chunk-C45HS2C4.js → chunk-MH6CIBDU.js} +4 -4
- package/build/modern/chunk-ML2IKLMJ.js +1 -0
- package/build/modern/chunk-ML2IKLMJ.js.map +1 -0
- package/build/modern/chunk-MR4DX76C.js +38 -0
- package/build/modern/chunk-MR4DX76C.js.map +1 -0
- package/build/modern/chunk-NR5XDIJ7.js +148 -0
- package/build/modern/chunk-NR5XDIJ7.js.map +1 -0
- package/build/modern/{chunk-OOUNB643.js → chunk-R7MPDSXX.js} +7 -7
- package/build/modern/{chunk-6DAOKE6Z.js → chunk-RKVY2HJ3.js} +4 -4
- package/build/modern/{chunk-MTZDZXZM.js → chunk-U5XRQ2JZ.js} +2 -2
- package/build/modern/{chunk-CF3EHG42.js → chunk-VTQ6RW3Z.js} +7 -7
- package/build/modern/chunk-XBUXVNTY.js +22 -0
- package/build/modern/chunk-XBUXVNTY.js.map +1 -0
- package/build/modern/{chunk-6ICNCCPD.js → chunk-YLKFZGBY.js} +1 -1
- package/build/modern/chunk-YLKFZGBY.js.map +1 -0
- package/build/modern/components/FileStatus.js +3 -3
- package/build/modern/components/combobox/combobox.js +13 -0
- package/build/modern/components/combobox/combobox.js.map +1 -0
- package/build/modern/components/combobox/index.js +60 -0
- package/build/modern/components/combobox/index.js.map +1 -0
- package/build/modern/components/combobox/item-group.js +9 -0
- package/build/modern/components/combobox/item-group.js.map +1 -0
- package/build/modern/components/combobox/item.js +11 -0
- package/build/modern/components/combobox/item.js.map +1 -0
- package/build/modern/components/combobox/parts.js +8 -0
- package/build/modern/components/combobox/parts.js.map +1 -0
- package/build/modern/components/combobox/primitives.js +35 -0
- package/build/modern/components/combobox/primitives.js.map +1 -0
- package/build/modern/components/combobox/use-stateful-collection.js +9 -0
- package/build/modern/components/combobox/use-stateful-collection.js.map +1 -0
- package/build/modern/components/cta-dialog/index.js +3 -3
- package/build/modern/components/cta-dialog/provider.js +3 -3
- package/build/modern/components/dialog/dialog.js +2 -2
- package/build/modern/components/dialog/index.js +2 -2
- package/build/modern/components/select/index.js +1 -1
- package/build/modern/components/select/select.js +1 -1
- package/build/modern/context/confirm-modal.js +3 -3
- package/build/modern/context/notification-center.js +2 -2
- package/build/modern/context/prompt-modal.js +9 -9
- package/build/modern/index.js +187 -134
- package/build/modern/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/combobox/combobox.tsx +66 -0
- package/src/components/combobox/index.ts +6 -0
- package/src/components/combobox/item-group.tsx +19 -0
- package/src/components/combobox/item.tsx +30 -0
- package/src/components/combobox/parts.ts +101 -0
- package/src/components/combobox/primitives.tsx +209 -0
- package/src/components/combobox/use-stateful-collection.ts +65 -0
- package/src/components/select/select.tsx +1 -0
- package/src/index.ts +1 -0
- package/build/modern/chunk-6ICNCCPD.js.map +0 -1
- /package/build/modern/{chunk-4WKM2MJC.js.map → chunk-3B4SFTQB.js.map} +0 -0
- /package/build/modern/{chunk-C45HS2C4.js.map → chunk-MH6CIBDU.js.map} +0 -0
- /package/build/modern/{chunk-OOUNB643.js.map → chunk-R7MPDSXX.js.map} +0 -0
- /package/build/modern/{chunk-6DAOKE6Z.js.map → chunk-RKVY2HJ3.js.map} +0 -0
- /package/build/modern/{chunk-MTZDZXZM.js.map → chunk-U5XRQ2JZ.js.map} +0 -0
- /package/build/modern/{chunk-CF3EHG42.js.map → chunk-VTQ6RW3Z.js.map} +0 -0
package/build/legacy/index.cjs
CHANGED
|
@@ -45,6 +45,25 @@ __export(src_exports, {
|
|
|
45
45
|
CheckboxParts: () => CheckboxParts,
|
|
46
46
|
CheckboxRoot: () => CheckboxRoot,
|
|
47
47
|
CircularProgress: () => CircularProgress,
|
|
48
|
+
ComboItemGroup: () => ComboItemGroup,
|
|
49
|
+
ComboItemText: () => ComboItemText,
|
|
50
|
+
ComboItemWithIndicator: () => ComboItemWithIndicator,
|
|
51
|
+
Combobox: () => Combobox2,
|
|
52
|
+
ComboboxClearTrigger: () => ComboboxClearTrigger,
|
|
53
|
+
ComboboxContent: () => ComboboxContent,
|
|
54
|
+
ComboboxControl: () => ComboboxControl,
|
|
55
|
+
ComboboxInput: () => ComboboxInput,
|
|
56
|
+
ComboboxItem: () => ComboboxItem,
|
|
57
|
+
ComboboxItemGroup: () => ComboboxItemGroup,
|
|
58
|
+
ComboboxItemGroupLabel: () => ComboboxItemGroupLabel,
|
|
59
|
+
ComboboxItemIndicator: () => ComboboxItemIndicator,
|
|
60
|
+
ComboboxItemText: () => ComboboxItemText,
|
|
61
|
+
ComboboxLabel: () => ComboboxLabel,
|
|
62
|
+
ComboboxParts: () => ComboboxParts,
|
|
63
|
+
ComboboxPositioner: () => ComboboxPositioner,
|
|
64
|
+
ComboboxRoot: () => ComboboxRoot,
|
|
65
|
+
ComboboxStartIcon: () => ComboboxStartIcon,
|
|
66
|
+
ComboboxTrigger: () => ComboboxTrigger,
|
|
48
67
|
ConfirmModal: () => ConfirmModal,
|
|
49
68
|
DateFormats: () => DateFormats,
|
|
50
69
|
DatePicker: () => DatePicker,
|
|
@@ -224,6 +243,7 @@ __export(src_exports, {
|
|
|
224
243
|
useNotificationCenter: () => useNotificationCenter,
|
|
225
244
|
usePromptModal: () => usePromptModal,
|
|
226
245
|
useRootColors: () => useRootColors,
|
|
246
|
+
useStatefulCollection: () => useStatefulCollection,
|
|
227
247
|
useTabsContext: () => useTabsContext,
|
|
228
248
|
useTheme: () => useTheme,
|
|
229
249
|
useThemeContext: () => useThemeContext,
|
|
@@ -1627,8 +1647,341 @@ function CircularProgress(props) {
|
|
|
1627
1647
|
);
|
|
1628
1648
|
}
|
|
1629
1649
|
|
|
1650
|
+
// src/components/combobox/primitives.tsx
|
|
1651
|
+
var import_combobox = require("@ark-ui/react/combobox");
|
|
1652
|
+
var import_factory = require("@ark-ui/react/factory");
|
|
1653
|
+
var import_recipes17 = require("@cerberus/styled-system/recipes");
|
|
1654
|
+
var import_css23 = require("@cerberus/styled-system/css");
|
|
1655
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1656
|
+
function ComboboxRoot(props) {
|
|
1657
|
+
const { size, ...rootProps } = props;
|
|
1658
|
+
const styles = (0, import_recipes17.combobox)({ size });
|
|
1659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1660
|
+
import_combobox.Combobox.Root,
|
|
1661
|
+
{
|
|
1662
|
+
...rootProps,
|
|
1663
|
+
className: (0, import_css23.cx)(styles.root, rootProps.className)
|
|
1664
|
+
}
|
|
1665
|
+
);
|
|
1666
|
+
}
|
|
1667
|
+
function ComboboxLabel(props) {
|
|
1668
|
+
const styles = (0, import_recipes17.combobox)();
|
|
1669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_combobox.Combobox.Label, { ...props, className: (0, import_css23.cx)(styles.label, props.className) });
|
|
1670
|
+
}
|
|
1671
|
+
function ComboboxControl(props) {
|
|
1672
|
+
const styles = (0, import_recipes17.combobox)();
|
|
1673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1674
|
+
import_combobox.Combobox.Control,
|
|
1675
|
+
{
|
|
1676
|
+
...props,
|
|
1677
|
+
className: (0, import_css23.cx)(styles.control, props.className)
|
|
1678
|
+
}
|
|
1679
|
+
);
|
|
1680
|
+
}
|
|
1681
|
+
function ComboboxInput(props) {
|
|
1682
|
+
const styles = (0, import_recipes17.combobox)();
|
|
1683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_combobox.Combobox.Input, { ...props, className: (0, import_css23.cx)(styles.input, props.className) });
|
|
1684
|
+
}
|
|
1685
|
+
function ComboboxTrigger(props) {
|
|
1686
|
+
const styles = (0, import_recipes17.combobox)();
|
|
1687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1688
|
+
import_combobox.Combobox.Trigger,
|
|
1689
|
+
{
|
|
1690
|
+
...props,
|
|
1691
|
+
className: (0, import_css23.cx)(styles.trigger, props.className)
|
|
1692
|
+
}
|
|
1693
|
+
);
|
|
1694
|
+
}
|
|
1695
|
+
function ComboboxClearTrigger(props) {
|
|
1696
|
+
const styles = (0, import_recipes17.combobox)();
|
|
1697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1698
|
+
import_combobox.Combobox.ClearTrigger,
|
|
1699
|
+
{
|
|
1700
|
+
...props,
|
|
1701
|
+
className: (0, import_css23.cx)(styles.clearTrigger, props.className)
|
|
1702
|
+
}
|
|
1703
|
+
);
|
|
1704
|
+
}
|
|
1705
|
+
function ComboboxPositioner(props) {
|
|
1706
|
+
const styles = (0, import_recipes17.combobox)();
|
|
1707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1708
|
+
import_combobox.Combobox.Positioner,
|
|
1709
|
+
{
|
|
1710
|
+
...props,
|
|
1711
|
+
className: (0, import_css23.cx)(styles.positioner, props.className)
|
|
1712
|
+
}
|
|
1713
|
+
);
|
|
1714
|
+
}
|
|
1715
|
+
function ComboboxContent(props) {
|
|
1716
|
+
const { size, ...contentProps } = props;
|
|
1717
|
+
const styles = (0, import_recipes17.combobox)({ size });
|
|
1718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1719
|
+
import_combobox.Combobox.Content,
|
|
1720
|
+
{
|
|
1721
|
+
...contentProps,
|
|
1722
|
+
className: (0, import_css23.cx)(styles.content, contentProps.className)
|
|
1723
|
+
}
|
|
1724
|
+
);
|
|
1725
|
+
}
|
|
1726
|
+
function ComboboxItemGroup(props) {
|
|
1727
|
+
const styles = (0, import_recipes17.combobox)();
|
|
1728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1729
|
+
import_combobox.Combobox.ItemGroup,
|
|
1730
|
+
{
|
|
1731
|
+
...props,
|
|
1732
|
+
className: (0, import_css23.cx)(styles.itemGroup, props.className)
|
|
1733
|
+
}
|
|
1734
|
+
);
|
|
1735
|
+
}
|
|
1736
|
+
function ComboboxItemGroupLabel(props) {
|
|
1737
|
+
const styles = (0, import_recipes17.combobox)();
|
|
1738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1739
|
+
import_combobox.Combobox.ItemGroupLabel,
|
|
1740
|
+
{
|
|
1741
|
+
...props,
|
|
1742
|
+
className: (0, import_css23.cx)(styles.itemGroupLabel, props.className)
|
|
1743
|
+
}
|
|
1744
|
+
);
|
|
1745
|
+
}
|
|
1746
|
+
function ComboboxItem(props) {
|
|
1747
|
+
const styles = (0, import_recipes17.combobox)();
|
|
1748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_combobox.Combobox.Item, { ...props, className: (0, import_css23.cx)(styles.item, props.className) });
|
|
1749
|
+
}
|
|
1750
|
+
function ComboboxItemText(props) {
|
|
1751
|
+
const styles = (0, import_recipes17.combobox)();
|
|
1752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1753
|
+
import_combobox.Combobox.ItemText,
|
|
1754
|
+
{
|
|
1755
|
+
...props,
|
|
1756
|
+
className: (0, import_css23.cx)(styles.itemText, props.className)
|
|
1757
|
+
}
|
|
1758
|
+
);
|
|
1759
|
+
}
|
|
1760
|
+
function ComboboxItemIndicator(props) {
|
|
1761
|
+
const styles = (0, import_recipes17.combobox)();
|
|
1762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1763
|
+
import_combobox.Combobox.ItemIndicator,
|
|
1764
|
+
{
|
|
1765
|
+
...props,
|
|
1766
|
+
className: (0, import_css23.cx)(styles.itemIndicator, props.className)
|
|
1767
|
+
}
|
|
1768
|
+
);
|
|
1769
|
+
}
|
|
1770
|
+
function ComboboxStartIcon(props) {
|
|
1771
|
+
const styles = (0, import_recipes17.combobox)();
|
|
1772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_factory.ark.span, { ...props, className: styles.startIcon });
|
|
1773
|
+
}
|
|
1774
|
+
var ComboItemText = ComboboxItemText;
|
|
1775
|
+
|
|
1776
|
+
// src/components/combobox/parts.ts
|
|
1777
|
+
var ComboboxParts = {
|
|
1778
|
+
Root: ComboboxRoot,
|
|
1779
|
+
Label: ComboboxLabel,
|
|
1780
|
+
Control: ComboboxControl,
|
|
1781
|
+
Input: ComboboxInput,
|
|
1782
|
+
Trigger: ComboboxTrigger,
|
|
1783
|
+
ClearTrigger: ComboboxClearTrigger,
|
|
1784
|
+
Positioner: ComboboxPositioner,
|
|
1785
|
+
Content: ComboboxContent,
|
|
1786
|
+
ItemGroup: ComboboxItemGroup,
|
|
1787
|
+
ItemGroupLabel: ComboboxItemGroupLabel,
|
|
1788
|
+
Item: ComboboxItem,
|
|
1789
|
+
ItemText: ComboboxItemText,
|
|
1790
|
+
ItemIndicator: ComboboxItemIndicator
|
|
1791
|
+
};
|
|
1792
|
+
|
|
1793
|
+
// src/components/Portal.tsx
|
|
1794
|
+
var import_react15 = require("@ark-ui/react");
|
|
1795
|
+
var Portal = import_react15.Portal;
|
|
1796
|
+
|
|
1797
|
+
// src/components/combobox/combobox.tsx
|
|
1798
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1799
|
+
function Combobox2(props) {
|
|
1800
|
+
const { label: label5, children, startIcon, ...rootProps } = props;
|
|
1801
|
+
const { icons } = useCerberusContext();
|
|
1802
|
+
const { selectArrow: SelectArrow, close: CloseIcon } = icons;
|
|
1803
|
+
const hasStartIcon = Boolean(startIcon);
|
|
1804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(ComboboxParts.Root, { ...rootProps, children: [
|
|
1805
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Show, { when: Boolean(label5), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ComboboxParts.Label, { children: label5 }) }),
|
|
1806
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(ComboboxParts.Control, { children: [
|
|
1807
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Show, { when: hasStartIcon, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ComboboxStartIcon, { children: startIcon }) }),
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1809
|
+
ComboboxParts.Input,
|
|
1810
|
+
{
|
|
1811
|
+
...hasStartIcon && { "data-has": "start-indicator" }
|
|
1812
|
+
}
|
|
1813
|
+
),
|
|
1814
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ComboboxParts.ClearTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CloseIcon, {}) }),
|
|
1815
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ComboboxParts.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectArrow, {}) })
|
|
1816
|
+
] }),
|
|
1817
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ComboboxParts.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ComboboxParts.Content, { size: rootProps.size, children }) }) })
|
|
1818
|
+
] });
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
// src/components/combobox/item.tsx
|
|
1822
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1823
|
+
function ComboItemWithIndicator(props) {
|
|
1824
|
+
const { icons } = useCerberusContext();
|
|
1825
|
+
const { selectChecked: CheckedIcon } = icons;
|
|
1826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(ComboboxParts.Item, { ...props, children: [
|
|
1827
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ComboboxParts.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CheckedIcon, {}) }),
|
|
1828
|
+
props.children
|
|
1829
|
+
] });
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
// src/components/combobox/item-group.tsx
|
|
1833
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1834
|
+
function ComboItemGroup(props) {
|
|
1835
|
+
const { label: label5, children, ...groupProps } = props;
|
|
1836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(ComboboxParts.ItemGroup, { ...groupProps, children: [
|
|
1837
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ComboboxParts.ItemGroupLabel, { children: label5 }),
|
|
1838
|
+
children
|
|
1839
|
+
] });
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
// src/components/combobox/use-stateful-collection.ts
|
|
1843
|
+
var import_react16 = require("react");
|
|
1844
|
+
|
|
1845
|
+
// src/components/select/primitives.tsx
|
|
1846
|
+
var import_select = require("@ark-ui/react/select");
|
|
1847
|
+
var import_recipes18 = require("@cerberus/styled-system/recipes");
|
|
1848
|
+
var import_css24 = require("@cerberus/styled-system/css");
|
|
1849
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1850
|
+
function SelectRoot(props) {
|
|
1851
|
+
const { size, ...rootProps } = props;
|
|
1852
|
+
const styles = (0, import_recipes18.select)({ size });
|
|
1853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1854
|
+
import_select.Select.Root,
|
|
1855
|
+
{
|
|
1856
|
+
...rootProps,
|
|
1857
|
+
className: (0, import_css24.cx)(styles.root, rootProps.className)
|
|
1858
|
+
}
|
|
1859
|
+
);
|
|
1860
|
+
}
|
|
1861
|
+
function SelectLabel(props) {
|
|
1862
|
+
const styles = (0, import_recipes18.select)();
|
|
1863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.Label, { ...props, className: (0, import_css24.cx)(styles.label, props.className) });
|
|
1864
|
+
}
|
|
1865
|
+
function SelectControl(props) {
|
|
1866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.Control, { ...props });
|
|
1867
|
+
}
|
|
1868
|
+
function SelectTrigger(props) {
|
|
1869
|
+
const styles = (0, import_recipes18.select)();
|
|
1870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1871
|
+
import_select.Select.Trigger,
|
|
1872
|
+
{
|
|
1873
|
+
...props,
|
|
1874
|
+
className: (0, import_css24.cx)(styles.trigger, props.className)
|
|
1875
|
+
}
|
|
1876
|
+
);
|
|
1877
|
+
}
|
|
1878
|
+
function SelectValueText(props) {
|
|
1879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.ValueText, { ...props });
|
|
1880
|
+
}
|
|
1881
|
+
function SelectIndicator(props) {
|
|
1882
|
+
const styles = (0, import_recipes18.select)();
|
|
1883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1884
|
+
import_select.Select.Indicator,
|
|
1885
|
+
{
|
|
1886
|
+
...props,
|
|
1887
|
+
className: (0, import_css24.cx)(styles.indicator, props.className)
|
|
1888
|
+
}
|
|
1889
|
+
);
|
|
1890
|
+
}
|
|
1891
|
+
function SelectClearTrigger(props) {
|
|
1892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.ClearTrigger, { ...props });
|
|
1893
|
+
}
|
|
1894
|
+
function SelectPositioner(props) {
|
|
1895
|
+
const styles = (0, import_recipes18.select)();
|
|
1896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1897
|
+
import_select.Select.Positioner,
|
|
1898
|
+
{
|
|
1899
|
+
...props,
|
|
1900
|
+
className: (0, import_css24.cx)(styles.positioner, props.className)
|
|
1901
|
+
}
|
|
1902
|
+
);
|
|
1903
|
+
}
|
|
1904
|
+
function SelectContent(props) {
|
|
1905
|
+
const { size, ...contentProps } = props;
|
|
1906
|
+
const styles = (0, import_recipes18.select)({ size });
|
|
1907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1908
|
+
import_select.Select.Content,
|
|
1909
|
+
{
|
|
1910
|
+
...contentProps,
|
|
1911
|
+
className: (0, import_css24.cx)(styles.content, contentProps.className)
|
|
1912
|
+
}
|
|
1913
|
+
);
|
|
1914
|
+
}
|
|
1915
|
+
function SelectItemGroup(props) {
|
|
1916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.ItemGroup, { ...props });
|
|
1917
|
+
}
|
|
1918
|
+
function SelectItemGroupLabel(props) {
|
|
1919
|
+
const styles = (0, import_recipes18.select)();
|
|
1920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1921
|
+
import_select.Select.ItemGroupLabel,
|
|
1922
|
+
{
|
|
1923
|
+
...props,
|
|
1924
|
+
className: (0, import_css24.cx)(styles.itemGroupLabel, props.className)
|
|
1925
|
+
}
|
|
1926
|
+
);
|
|
1927
|
+
}
|
|
1928
|
+
function SelectItem(props) {
|
|
1929
|
+
const styles = (0, import_recipes18.select)();
|
|
1930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.Item, { ...props, className: (0, import_css24.cx)(styles.item, props.className) });
|
|
1931
|
+
}
|
|
1932
|
+
function SelectItemText(props) {
|
|
1933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.ItemText, { ...props });
|
|
1934
|
+
}
|
|
1935
|
+
function SelectItemIndicator(props) {
|
|
1936
|
+
const styles = (0, import_recipes18.select)();
|
|
1937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1938
|
+
import_select.Select.ItemIndicator,
|
|
1939
|
+
{
|
|
1940
|
+
...props,
|
|
1941
|
+
className: (0, import_css24.cx)(styles.itemIndicator, props.className)
|
|
1942
|
+
}
|
|
1943
|
+
);
|
|
1944
|
+
}
|
|
1945
|
+
function SelectHiddenSelect(props) {
|
|
1946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.HiddenSelect, { ...props });
|
|
1947
|
+
}
|
|
1948
|
+
function createSelectCollection(collection) {
|
|
1949
|
+
return (0, import_select.createListCollection)({
|
|
1950
|
+
items: collection
|
|
1951
|
+
});
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
// src/components/combobox/use-stateful-collection.ts
|
|
1955
|
+
function useStatefulCollection(initialItems = []) {
|
|
1956
|
+
const [items, setItems] = (0, import_react16.useState)(initialItems);
|
|
1957
|
+
const [filterValue, setFilterValue] = (0, import_react16.useState)([]);
|
|
1958
|
+
const collection = (0, import_react16.useMemo)(() => createSelectCollection(items), [items]);
|
|
1959
|
+
const handleInputChange = (0, import_react16.useCallback)(
|
|
1960
|
+
(details) => {
|
|
1961
|
+
if (details.inputValue === "") {
|
|
1962
|
+
return setItems(initialItems);
|
|
1963
|
+
}
|
|
1964
|
+
setItems(
|
|
1965
|
+
(prev) => prev.filter(
|
|
1966
|
+
(item) => item.value.includes(details.inputValue.toLowerCase())
|
|
1967
|
+
)
|
|
1968
|
+
);
|
|
1969
|
+
setFilterValue(details.inputValue.split(""));
|
|
1970
|
+
},
|
|
1971
|
+
[initialItems]
|
|
1972
|
+
);
|
|
1973
|
+
return (0, import_react16.useMemo)(
|
|
1974
|
+
() => ({
|
|
1975
|
+
collection,
|
|
1976
|
+
filterChars: filterValue,
|
|
1977
|
+
handleInputChange
|
|
1978
|
+
}),
|
|
1979
|
+
[collection, filterValue, handleInputChange]
|
|
1980
|
+
);
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1630
1983
|
// src/components/cta-dialog/provider.tsx
|
|
1631
|
-
var
|
|
1984
|
+
var import_react18 = require("react");
|
|
1632
1985
|
var import_jsx4 = require("@cerberus/styled-system/jsx");
|
|
1633
1986
|
|
|
1634
1987
|
// src/components/for.tsx
|
|
@@ -1642,69 +1995,69 @@ function For(props) {
|
|
|
1642
1995
|
|
|
1643
1996
|
// src/components/dialog/primitives.tsx
|
|
1644
1997
|
var import_dialog = require("@ark-ui/react/dialog");
|
|
1645
|
-
var
|
|
1646
|
-
var
|
|
1647
|
-
var
|
|
1998
|
+
var import_css25 = require("@cerberus/styled-system/css");
|
|
1999
|
+
var import_recipes19 = require("@cerberus/styled-system/recipes");
|
|
2000
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1648
2001
|
function DialogRoot(props) {
|
|
1649
|
-
return /* @__PURE__ */ (0,
|
|
2002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_dialog.Dialog.Root, { ...props });
|
|
1650
2003
|
}
|
|
1651
2004
|
function DialogTrigger(props) {
|
|
1652
|
-
const styles = (0,
|
|
1653
|
-
return /* @__PURE__ */ (0,
|
|
2005
|
+
const styles = (0, import_recipes19.dialog)();
|
|
2006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1654
2007
|
import_dialog.Dialog.Trigger,
|
|
1655
2008
|
{
|
|
1656
2009
|
...props,
|
|
1657
|
-
className: (0,
|
|
2010
|
+
className: (0, import_css25.cx)(styles.trigger, props.className)
|
|
1658
2011
|
}
|
|
1659
2012
|
);
|
|
1660
2013
|
}
|
|
1661
2014
|
function DialogBackdrop(props) {
|
|
1662
|
-
const styles = (0,
|
|
1663
|
-
return /* @__PURE__ */ (0,
|
|
2015
|
+
const styles = (0, import_recipes19.dialog)();
|
|
2016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1664
2017
|
import_dialog.Dialog.Backdrop,
|
|
1665
2018
|
{
|
|
1666
2019
|
...props,
|
|
1667
|
-
className: (0,
|
|
2020
|
+
className: (0, import_css25.cx)(styles.backdrop, props.className)
|
|
1668
2021
|
}
|
|
1669
2022
|
);
|
|
1670
2023
|
}
|
|
1671
2024
|
function DialogPositioner(props) {
|
|
1672
|
-
const styles = (0,
|
|
1673
|
-
return /* @__PURE__ */ (0,
|
|
2025
|
+
const styles = (0, import_recipes19.dialog)();
|
|
2026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1674
2027
|
import_dialog.Dialog.Positioner,
|
|
1675
2028
|
{
|
|
1676
2029
|
...props,
|
|
1677
|
-
className: (0,
|
|
2030
|
+
className: (0, import_css25.cx)(styles.positioner, props.className)
|
|
1678
2031
|
}
|
|
1679
2032
|
);
|
|
1680
2033
|
}
|
|
1681
2034
|
function DialogContent(props) {
|
|
1682
2035
|
const { size, ...contentProps } = props;
|
|
1683
|
-
const styles = (0,
|
|
1684
|
-
return /* @__PURE__ */ (0,
|
|
2036
|
+
const styles = (0, import_recipes19.dialog)({ size });
|
|
2037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1685
2038
|
import_dialog.Dialog.Content,
|
|
1686
2039
|
{
|
|
1687
2040
|
...contentProps,
|
|
1688
|
-
className: (0,
|
|
2041
|
+
className: (0, import_css25.cx)(styles.content, contentProps.className)
|
|
1689
2042
|
}
|
|
1690
2043
|
);
|
|
1691
2044
|
}
|
|
1692
2045
|
function DialogHeading(props) {
|
|
1693
|
-
const styles = (0,
|
|
1694
|
-
return /* @__PURE__ */ (0,
|
|
2046
|
+
const styles = (0, import_recipes19.dialog)();
|
|
2047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_dialog.Dialog.Title, { ...props, className: (0, import_css25.cx)(styles.title, props.className) });
|
|
1695
2048
|
}
|
|
1696
2049
|
function DialogDescription(props) {
|
|
1697
|
-
const styles = (0,
|
|
1698
|
-
return /* @__PURE__ */ (0,
|
|
2050
|
+
const styles = (0, import_recipes19.dialog)();
|
|
2051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1699
2052
|
import_dialog.Dialog.Description,
|
|
1700
2053
|
{
|
|
1701
2054
|
...props,
|
|
1702
|
-
className: (0,
|
|
2055
|
+
className: (0, import_css25.cx)(styles.description, props.className)
|
|
1703
2056
|
}
|
|
1704
2057
|
);
|
|
1705
2058
|
}
|
|
1706
2059
|
function DialogCloseTrigger(props) {
|
|
1707
|
-
return /* @__PURE__ */ (0,
|
|
2060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_dialog.Dialog.CloseTrigger, { ...props });
|
|
1708
2061
|
}
|
|
1709
2062
|
var DialogProvider = DialogRoot;
|
|
1710
2063
|
|
|
@@ -1721,19 +2074,19 @@ var DialogParts = {
|
|
|
1721
2074
|
};
|
|
1722
2075
|
|
|
1723
2076
|
// src/components/IconButton.tsx
|
|
1724
|
-
var
|
|
1725
|
-
var
|
|
1726
|
-
var
|
|
2077
|
+
var import_css26 = require("@cerberus/styled-system/css");
|
|
2078
|
+
var import_recipes20 = require("@cerberus/styled-system/recipes");
|
|
2079
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1727
2080
|
function IconButton(props) {
|
|
1728
2081
|
const { ariaLabel, palette, usage, size, ...nativeProps } = props;
|
|
1729
|
-
return /* @__PURE__ */ (0,
|
|
2082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1730
2083
|
"button",
|
|
1731
2084
|
{
|
|
1732
2085
|
...nativeProps,
|
|
1733
2086
|
"aria-label": ariaLabel ?? "Icon Button",
|
|
1734
|
-
className: (0,
|
|
2087
|
+
className: (0, import_css26.cx)(
|
|
1735
2088
|
nativeProps.className,
|
|
1736
|
-
(0,
|
|
2089
|
+
(0, import_recipes20.iconButton)({
|
|
1737
2090
|
palette,
|
|
1738
2091
|
usage,
|
|
1739
2092
|
size
|
|
@@ -1744,67 +2097,63 @@ function IconButton(props) {
|
|
|
1744
2097
|
}
|
|
1745
2098
|
|
|
1746
2099
|
// src/components/dialog/close-icon-trigger.tsx
|
|
1747
|
-
var
|
|
1748
|
-
var
|
|
1749
|
-
var
|
|
2100
|
+
var import_recipes21 = require("@cerberus/styled-system/recipes");
|
|
2101
|
+
var import_css27 = require("@cerberus/styled-system/css");
|
|
2102
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1750
2103
|
function DialogCloseIconTrigger(props) {
|
|
1751
|
-
const styles = (0,
|
|
2104
|
+
const styles = (0, import_recipes21.dialog)();
|
|
1752
2105
|
const { icons } = useCerberusContext();
|
|
1753
2106
|
const { close: CloseIcon } = icons;
|
|
1754
|
-
return /* @__PURE__ */ (0,
|
|
2107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1755
2108
|
DialogCloseTrigger,
|
|
1756
2109
|
{
|
|
1757
2110
|
...props,
|
|
1758
|
-
className: (0,
|
|
2111
|
+
className: (0, import_css27.cx)(styles.closeTrigger, props.className),
|
|
1759
2112
|
asChild: true,
|
|
1760
|
-
children: /* @__PURE__ */ (0,
|
|
2113
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1761
2114
|
IconButton,
|
|
1762
2115
|
{
|
|
1763
2116
|
ariaLabel: "Close dialog",
|
|
1764
2117
|
palette: "action",
|
|
1765
2118
|
size: "lg",
|
|
1766
2119
|
usage: "ghost",
|
|
1767
|
-
children: /* @__PURE__ */ (0,
|
|
2120
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CloseIcon, {})
|
|
1768
2121
|
}
|
|
1769
2122
|
)
|
|
1770
2123
|
}
|
|
1771
2124
|
);
|
|
1772
2125
|
}
|
|
1773
2126
|
|
|
1774
|
-
// src/components/Portal.tsx
|
|
1775
|
-
var import_react15 = require("@ark-ui/react");
|
|
1776
|
-
var Portal = import_react15.Portal;
|
|
1777
|
-
|
|
1778
2127
|
// src/components/dialog/dialog.tsx
|
|
1779
|
-
var
|
|
2128
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1780
2129
|
function Dialog2(props) {
|
|
1781
|
-
return /* @__PURE__ */ (0,
|
|
1782
|
-
/* @__PURE__ */ (0,
|
|
1783
|
-
/* @__PURE__ */ (0,
|
|
2130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Portal, { children: [
|
|
2131
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DialogBackdrop, {}),
|
|
2132
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DialogPositioner, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DialogContent, { ...props }) })
|
|
1784
2133
|
] });
|
|
1785
2134
|
}
|
|
1786
2135
|
|
|
1787
2136
|
// src/components/cta-dialog/context.tsx
|
|
1788
|
-
var
|
|
1789
|
-
var CTAModalContext = (0,
|
|
2137
|
+
var import_react17 = require("react");
|
|
2138
|
+
var CTAModalContext = (0, import_react17.createContext)(null);
|
|
1790
2139
|
|
|
1791
2140
|
// src/components/cta-dialog/trigger-item.tsx
|
|
1792
|
-
var
|
|
1793
|
-
var
|
|
1794
|
-
var
|
|
1795
|
-
var
|
|
2141
|
+
var import_css28 = require("@cerberus/styled-system/css");
|
|
2142
|
+
var import_factory2 = require("@ark-ui/react/factory");
|
|
2143
|
+
var import_recipes22 = require("@cerberus/styled-system/recipes");
|
|
2144
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1796
2145
|
function TriggerItem(props) {
|
|
1797
2146
|
const { asChild, children, ...buttonProps } = props;
|
|
1798
2147
|
if (asChild) {
|
|
1799
|
-
return /* @__PURE__ */ (0,
|
|
1800
|
-
|
|
2148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2149
|
+
import_factory2.ark.div,
|
|
1801
2150
|
{
|
|
1802
|
-
className: (0,
|
|
1803
|
-
(0,
|
|
2151
|
+
className: (0, import_css28.cx)(
|
|
2152
|
+
(0, import_recipes22.button)({
|
|
1804
2153
|
shape: "rounded",
|
|
1805
2154
|
usage: "ghost"
|
|
1806
2155
|
}),
|
|
1807
|
-
(0,
|
|
2156
|
+
(0, import_css28.css)({
|
|
1808
2157
|
w: "1/2"
|
|
1809
2158
|
})
|
|
1810
2159
|
),
|
|
@@ -1813,11 +2162,11 @@ function TriggerItem(props) {
|
|
|
1813
2162
|
}
|
|
1814
2163
|
);
|
|
1815
2164
|
}
|
|
1816
|
-
return /* @__PURE__ */ (0,
|
|
2165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1817
2166
|
Button,
|
|
1818
2167
|
{
|
|
1819
2168
|
...buttonProps,
|
|
1820
|
-
className: (0,
|
|
2169
|
+
className: (0, import_css28.css)({
|
|
1821
2170
|
w: "1/2"
|
|
1822
2171
|
}),
|
|
1823
2172
|
shape: "rounded",
|
|
@@ -1828,21 +2177,21 @@ function TriggerItem(props) {
|
|
|
1828
2177
|
}
|
|
1829
2178
|
|
|
1830
2179
|
// src/components/cta-dialog/provider.tsx
|
|
1831
|
-
var
|
|
2180
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1832
2181
|
function CTAModal(props) {
|
|
1833
|
-
const [open, setOpen] = (0,
|
|
1834
|
-
const [content, setContent] = (0,
|
|
2182
|
+
const [open, setOpen] = (0, import_react18.useState)(false);
|
|
2183
|
+
const [content, setContent] = (0, import_react18.useState)(null);
|
|
1835
2184
|
const confirmIcon = content == null ? void 0 : content.icon;
|
|
1836
2185
|
const { icons } = useCerberusContext();
|
|
1837
2186
|
const { confirmModal: FallbackIcon } = icons;
|
|
1838
|
-
const handleShow = (0,
|
|
2187
|
+
const handleShow = (0, import_react18.useCallback)(
|
|
1839
2188
|
(options) => {
|
|
1840
2189
|
setContent({ ...options });
|
|
1841
2190
|
setOpen(true);
|
|
1842
2191
|
},
|
|
1843
2192
|
[setOpen]
|
|
1844
2193
|
);
|
|
1845
|
-
const handleActionClick = (0,
|
|
2194
|
+
const handleActionClick = (0, import_react18.useCallback)(
|
|
1846
2195
|
(event) => {
|
|
1847
2196
|
var _a;
|
|
1848
2197
|
const index = Number(event.currentTarget.getAttribute("data-index"));
|
|
@@ -1853,45 +2202,45 @@ function CTAModal(props) {
|
|
|
1853
2202
|
},
|
|
1854
2203
|
[content, setOpen]
|
|
1855
2204
|
);
|
|
1856
|
-
const value = (0,
|
|
2205
|
+
const value = (0, import_react18.useMemo)(
|
|
1857
2206
|
() => ({
|
|
1858
2207
|
show: handleShow
|
|
1859
2208
|
}),
|
|
1860
2209
|
[handleShow]
|
|
1861
2210
|
);
|
|
1862
|
-
return /* @__PURE__ */ (0,
|
|
2211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(CTAModalContext.Provider, { value, children: [
|
|
1863
2212
|
props.children,
|
|
1864
|
-
/* @__PURE__ */ (0,
|
|
1865
|
-
/* @__PURE__ */ (0,
|
|
1866
|
-
/* @__PURE__ */ (0,
|
|
1867
|
-
/* @__PURE__ */ (0,
|
|
1868
|
-
/* @__PURE__ */ (0,
|
|
2213
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DialogProvider, { open, onOpenChange: (e) => setOpen(e.open), children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Dialog2, { size: "sm", children: [
|
|
2214
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DialogCloseIconTrigger, {}),
|
|
2215
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx4.VStack, { gap: "xl", w: "full", children: [
|
|
2216
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx4.VStack, { alignItems: "flex-start", gap: "md", w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx4.VStack, { gap: "lg", w: "full", children: [
|
|
2217
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1869
2218
|
Avatar,
|
|
1870
2219
|
{
|
|
1871
2220
|
ariaLabel: "",
|
|
1872
2221
|
gradient: "charon-light",
|
|
1873
|
-
icon: /* @__PURE__ */ (0,
|
|
2222
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1874
2223
|
Show,
|
|
1875
2224
|
{
|
|
1876
2225
|
when: Boolean(confirmIcon),
|
|
1877
|
-
fallback: /* @__PURE__ */ (0,
|
|
2226
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(FallbackIcon, { size: 24 }),
|
|
1878
2227
|
children: confirmIcon
|
|
1879
2228
|
}
|
|
1880
2229
|
),
|
|
1881
2230
|
src: ""
|
|
1882
2231
|
}
|
|
1883
2232
|
),
|
|
1884
|
-
/* @__PURE__ */ (0,
|
|
1885
|
-
/* @__PURE__ */ (0,
|
|
2233
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DialogHeading, { children: content == null ? void 0 : content.heading }),
|
|
2234
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DialogDescription, { children: content == null ? void 0 : content.description })
|
|
1886
2235
|
] }) }),
|
|
1887
|
-
/* @__PURE__ */ (0,
|
|
2236
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx4.HStack, { gap: "md", w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(For, { each: content == null ? void 0 : content.actions._actions, children: (action, index) => {
|
|
1888
2237
|
var _a;
|
|
1889
|
-
return /* @__PURE__ */ (0,
|
|
2238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1890
2239
|
Show,
|
|
1891
2240
|
{
|
|
1892
2241
|
when: ((_a = content == null ? void 0 : content.actions) == null ? void 0 : _a.type) === "btnAction",
|
|
1893
|
-
fallback: /* @__PURE__ */ (0,
|
|
1894
|
-
children: /* @__PURE__ */ (0,
|
|
2242
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TriggerItem, { asChild: true, children: action }),
|
|
2243
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TriggerItem, { "data-index": index, onClick: handleActionClick, children: action == null ? void 0 : action.text })
|
|
1895
2244
|
},
|
|
1896
2245
|
index
|
|
1897
2246
|
);
|
|
@@ -1901,7 +2250,7 @@ function CTAModal(props) {
|
|
|
1901
2250
|
] });
|
|
1902
2251
|
}
|
|
1903
2252
|
function useCTAModal() {
|
|
1904
|
-
const context = (0,
|
|
2253
|
+
const context = (0, import_react18.useContext)(CTAModalContext);
|
|
1905
2254
|
if (context === null) {
|
|
1906
2255
|
throw new Error("useCTAModal must be used within a CTAModal Provider");
|
|
1907
2256
|
}
|
|
@@ -1928,25 +2277,25 @@ function createCTAModalActions(providedActions) {
|
|
|
1928
2277
|
}
|
|
1929
2278
|
|
|
1930
2279
|
// src/components/DatePicker.client.tsx
|
|
1931
|
-
var
|
|
1932
|
-
var
|
|
1933
|
-
var
|
|
2280
|
+
var import_react20 = require("@ark-ui/react");
|
|
2281
|
+
var import_recipes24 = require("@cerberus/styled-system/recipes");
|
|
2282
|
+
var import_css30 = require("@cerberus/styled-system/css");
|
|
1934
2283
|
|
|
1935
2284
|
// src/components/DatePicker.server.tsx
|
|
1936
|
-
var
|
|
1937
|
-
var
|
|
1938
|
-
var
|
|
1939
|
-
var
|
|
1940
|
-
var datePickerStyles = (0,
|
|
2285
|
+
var import_react19 = require("@ark-ui/react");
|
|
2286
|
+
var import_css29 = require("@cerberus/styled-system/css");
|
|
2287
|
+
var import_recipes23 = require("@cerberus/styled-system/recipes");
|
|
2288
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2289
|
+
var datePickerStyles = (0, import_recipes23.datePicker)();
|
|
1941
2290
|
function DatePickerLabel(props) {
|
|
1942
2291
|
const { className, ...arkProps } = props;
|
|
1943
|
-
return /* @__PURE__ */ (0,
|
|
1944
|
-
|
|
2292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2293
|
+
import_react19.DatePicker.Label,
|
|
1945
2294
|
{
|
|
1946
2295
|
...arkProps,
|
|
1947
|
-
className: (0,
|
|
2296
|
+
className: (0, import_css29.cx)(
|
|
1948
2297
|
className,
|
|
1949
|
-
(0,
|
|
2298
|
+
(0, import_recipes23.label)({
|
|
1950
2299
|
size: "sm"
|
|
1951
2300
|
})
|
|
1952
2301
|
)
|
|
@@ -1954,60 +2303,60 @@ function DatePickerLabel(props) {
|
|
|
1954
2303
|
);
|
|
1955
2304
|
}
|
|
1956
2305
|
function DatePickerViewControl(props) {
|
|
1957
|
-
return /* @__PURE__ */ (0,
|
|
1958
|
-
|
|
2306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2307
|
+
import_react19.DatePicker.Control,
|
|
1959
2308
|
{
|
|
1960
2309
|
...props,
|
|
1961
|
-
className: (0,
|
|
2310
|
+
className: (0, import_css29.cx)(props.className, datePickerStyles.viewControl)
|
|
1962
2311
|
}
|
|
1963
2312
|
);
|
|
1964
2313
|
}
|
|
1965
2314
|
function DatePickerTable(props) {
|
|
1966
|
-
return /* @__PURE__ */ (0,
|
|
1967
|
-
|
|
2315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2316
|
+
import_react19.DatePicker.Table,
|
|
1968
2317
|
{
|
|
1969
2318
|
...props,
|
|
1970
|
-
className: (0,
|
|
2319
|
+
className: (0, import_css29.cx)(props.className, datePickerStyles.table)
|
|
1971
2320
|
}
|
|
1972
2321
|
);
|
|
1973
2322
|
}
|
|
1974
2323
|
function DatePickerTableHeader(props) {
|
|
1975
|
-
return /* @__PURE__ */ (0,
|
|
1976
|
-
|
|
2324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2325
|
+
import_react19.DatePicker.TableHeader,
|
|
1977
2326
|
{
|
|
1978
2327
|
...props,
|
|
1979
|
-
className: (0,
|
|
2328
|
+
className: (0, import_css29.cx)(props.className, datePickerStyles.tableHeader)
|
|
1980
2329
|
}
|
|
1981
2330
|
);
|
|
1982
2331
|
}
|
|
1983
2332
|
function DatePickerTableCell(props) {
|
|
1984
|
-
return /* @__PURE__ */ (0,
|
|
1985
|
-
|
|
2333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2334
|
+
import_react19.DatePicker.TableCell,
|
|
1986
2335
|
{
|
|
1987
2336
|
...props,
|
|
1988
|
-
className: (0,
|
|
2337
|
+
className: (0, import_css29.cx)(props.className, datePickerStyles.tableCell)
|
|
1989
2338
|
}
|
|
1990
2339
|
);
|
|
1991
2340
|
}
|
|
1992
2341
|
function DatePickerTableCellTrigger(props) {
|
|
1993
|
-
return /* @__PURE__ */ (0,
|
|
1994
|
-
|
|
2342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2343
|
+
import_react19.DatePicker.TableCellTrigger,
|
|
1995
2344
|
{
|
|
1996
2345
|
...props,
|
|
1997
|
-
className: (0,
|
|
2346
|
+
className: (0, import_css29.cx)(props.className, datePickerStyles.tableCellTrigger)
|
|
1998
2347
|
}
|
|
1999
2348
|
);
|
|
2000
2349
|
}
|
|
2001
|
-
var DatePickerView =
|
|
2002
|
-
var DatePickerContext =
|
|
2350
|
+
var DatePickerView = import_react19.DatePicker.View;
|
|
2351
|
+
var DatePickerContext = import_react19.DatePicker.Context;
|
|
2003
2352
|
|
|
2004
2353
|
// src/components/DatePicker.client.tsx
|
|
2005
|
-
var
|
|
2006
|
-
var
|
|
2007
|
-
var datePickerStyles2 = (0,
|
|
2354
|
+
var import_react21 = require("react");
|
|
2355
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2356
|
+
var datePickerStyles2 = (0, import_recipes24.datePicker)();
|
|
2008
2357
|
function DatePicker(props) {
|
|
2009
|
-
return /* @__PURE__ */ (0,
|
|
2010
|
-
|
|
2358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2359
|
+
import_react20.DatePicker.Root,
|
|
2011
2360
|
{
|
|
2012
2361
|
...props,
|
|
2013
2362
|
positioning: {
|
|
@@ -2019,51 +2368,51 @@ function DatePicker(props) {
|
|
|
2019
2368
|
function DatePickerViewControlGroup(props) {
|
|
2020
2369
|
const { icons } = useCerberusContext();
|
|
2021
2370
|
const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons;
|
|
2022
|
-
return /* @__PURE__ */ (0,
|
|
2023
|
-
/* @__PURE__ */ (0,
|
|
2024
|
-
/* @__PURE__ */ (0,
|
|
2371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(DatePickerViewControl, { ...props, children: [
|
|
2372
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IconButton, { ariaLabel: "Previous", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PrevIcon, {}) }) }),
|
|
2373
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.ViewTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2025
2374
|
Button,
|
|
2026
2375
|
{
|
|
2027
|
-
className: (0,
|
|
2376
|
+
className: (0, import_css30.css)({
|
|
2028
2377
|
h: "2rem",
|
|
2029
2378
|
paddingInline: "md"
|
|
2030
2379
|
}),
|
|
2031
2380
|
shape: "rounded",
|
|
2032
2381
|
size: "sm",
|
|
2033
2382
|
usage: "ghost",
|
|
2034
|
-
children: /* @__PURE__ */ (0,
|
|
2383
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.RangeText, {})
|
|
2035
2384
|
}
|
|
2036
2385
|
) }),
|
|
2037
|
-
/* @__PURE__ */ (0,
|
|
2386
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.NextTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IconButton, { ariaLabel: "Next", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(NextIcon, {}) }) })
|
|
2038
2387
|
] });
|
|
2039
2388
|
}
|
|
2040
2389
|
function DatePickerTrigger(props) {
|
|
2041
2390
|
const { icons } = useCerberusContext();
|
|
2042
2391
|
const { calendar: CalendarIcon } = icons;
|
|
2043
|
-
return /* @__PURE__ */ (0,
|
|
2044
|
-
|
|
2392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2393
|
+
import_react20.DatePicker.Trigger,
|
|
2045
2394
|
{
|
|
2046
2395
|
...props,
|
|
2047
|
-
className: (0,
|
|
2396
|
+
className: (0, import_css30.cx)(
|
|
2048
2397
|
props.className,
|
|
2049
|
-
(0,
|
|
2398
|
+
(0, import_recipes24.iconButton)({
|
|
2050
2399
|
size: "sm",
|
|
2051
2400
|
usage: "ghost"
|
|
2052
2401
|
}),
|
|
2053
2402
|
datePickerStyles2.trigger
|
|
2054
2403
|
),
|
|
2055
|
-
children: /* @__PURE__ */ (0,
|
|
2404
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CalendarIcon, {})
|
|
2056
2405
|
}
|
|
2057
2406
|
);
|
|
2058
2407
|
}
|
|
2059
2408
|
function DatePickerInput(props) {
|
|
2060
|
-
return /* @__PURE__ */ (0,
|
|
2061
|
-
/* @__PURE__ */ (0,
|
|
2062
|
-
/* @__PURE__ */ (0,
|
|
2063
|
-
|
|
2409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react20.DatePicker.Control, { className: datePickerStyles2.control, children: [
|
|
2410
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTrigger, {}),
|
|
2411
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2412
|
+
import_react20.DatePicker.Input,
|
|
2064
2413
|
{
|
|
2065
2414
|
...props,
|
|
2066
|
-
className: (0,
|
|
2415
|
+
className: (0, import_css30.cx)(props.className, datePickerStyles2.input),
|
|
2067
2416
|
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
2068
2417
|
maxLength: 11
|
|
2069
2418
|
}
|
|
@@ -2072,30 +2421,30 @@ function DatePickerInput(props) {
|
|
|
2072
2421
|
}
|
|
2073
2422
|
function RangePickerInput(props) {
|
|
2074
2423
|
const { defaultValue, ...nativeProps } = props;
|
|
2075
|
-
const startDate = (0,
|
|
2076
|
-
const endDate = (0,
|
|
2077
|
-
return /* @__PURE__ */ (0,
|
|
2078
|
-
/* @__PURE__ */ (0,
|
|
2079
|
-
/* @__PURE__ */ (0,
|
|
2080
|
-
|
|
2424
|
+
const startDate = (0, import_react21.useMemo)(() => defaultValue == null ? void 0 : defaultValue[0], [defaultValue]);
|
|
2425
|
+
const endDate = (0, import_react21.useMemo)(() => defaultValue == null ? void 0 : defaultValue[1], [defaultValue]);
|
|
2426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react20.DatePicker.Control, { "data-range": true, className: datePickerStyles2.control, children: [
|
|
2427
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTrigger, {}),
|
|
2428
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2429
|
+
import_react20.DatePicker.Input,
|
|
2081
2430
|
{
|
|
2082
2431
|
...nativeProps,
|
|
2083
2432
|
"data-range-input": true,
|
|
2084
2433
|
defaultValue: startDate,
|
|
2085
|
-
className: (0,
|
|
2434
|
+
className: (0, import_css30.cx)(props.className, datePickerStyles2.input),
|
|
2086
2435
|
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
2087
2436
|
maxLength: 11,
|
|
2088
2437
|
index: 0
|
|
2089
2438
|
}
|
|
2090
2439
|
),
|
|
2091
|
-
/* @__PURE__ */ (0,
|
|
2092
|
-
|
|
2440
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2441
|
+
import_react20.DatePicker.Input,
|
|
2093
2442
|
{
|
|
2094
2443
|
...nativeProps,
|
|
2095
2444
|
"data-range-input": true,
|
|
2096
2445
|
defaultValue: endDate,
|
|
2097
2446
|
"data-range-end-input": true,
|
|
2098
|
-
className: (0,
|
|
2447
|
+
className: (0, import_css30.cx)(props.className, datePickerStyles2.input),
|
|
2099
2448
|
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
2100
2449
|
maxLength: 11,
|
|
2101
2450
|
index: 1
|
|
@@ -2105,11 +2454,11 @@ function RangePickerInput(props) {
|
|
|
2105
2454
|
}
|
|
2106
2455
|
function DatePickerContent(props) {
|
|
2107
2456
|
const { children, withModal, ...contentProps } = props;
|
|
2108
|
-
return /* @__PURE__ */ (0,
|
|
2109
|
-
|
|
2457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Portal, { disabled: withModal ?? false, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.Positioner, { className: datePickerStyles2.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2458
|
+
import_react20.DatePicker.Content,
|
|
2110
2459
|
{
|
|
2111
2460
|
...contentProps,
|
|
2112
|
-
className: (0,
|
|
2461
|
+
className: (0, import_css30.cx)(contentProps.className, datePickerStyles2.content),
|
|
2113
2462
|
children
|
|
2114
2463
|
}
|
|
2115
2464
|
) }) });
|
|
@@ -2131,11 +2480,11 @@ function DatePickerDayView(props) {
|
|
|
2131
2480
|
if (isPastDay(date)) return "past";
|
|
2132
2481
|
return "future";
|
|
2133
2482
|
}
|
|
2134
|
-
return /* @__PURE__ */ (0,
|
|
2135
|
-
/* @__PURE__ */ (0,
|
|
2136
|
-
/* @__PURE__ */ (0,
|
|
2137
|
-
/* @__PURE__ */ (0,
|
|
2138
|
-
/* @__PURE__ */ (0,
|
|
2483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerView, { ...props, view: "day", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerContext, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
2484
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerViewControlGroup, {}),
|
|
2485
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(DatePickerTable, { children: [
|
|
2486
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.TableRow, { children: datePicker3.weekDays.map((weekDay, id) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTableHeader, { children: weekDay.narrow }, id)) }) }),
|
|
2487
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.TableBody, { children: datePicker3.weeks.map((week, id) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.TableRow, { children: week.map((day, id2) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTableCell, { value: day, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2139
2488
|
DatePickerTableCellTrigger,
|
|
2140
2489
|
{
|
|
2141
2490
|
"data-date": getDayValue(day),
|
|
@@ -2146,39 +2495,39 @@ function DatePickerDayView(props) {
|
|
|
2146
2495
|
] }) }) });
|
|
2147
2496
|
}
|
|
2148
2497
|
function DatePickerMonthView(props) {
|
|
2149
|
-
return /* @__PURE__ */ (0,
|
|
2150
|
-
/* @__PURE__ */ (0,
|
|
2151
|
-
/* @__PURE__ */ (0,
|
|
2498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.View, { ...props, view: "month", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
2499
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerViewControlGroup, {}),
|
|
2500
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.TableBody, { children: datePicker3.getMonthsGrid({ columns: 4, format: "short" }).map((months, id) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.TableRow, { children: months.map((month, id2) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTableCell, { value: month.value, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTableCellTrigger, { children: month.label }) }, id2)) }, id)) }) })
|
|
2152
2501
|
] }) }) });
|
|
2153
2502
|
}
|
|
2154
2503
|
function DatePickerYearView(props) {
|
|
2155
|
-
return /* @__PURE__ */ (0,
|
|
2156
|
-
/* @__PURE__ */ (0,
|
|
2157
|
-
/* @__PURE__ */ (0,
|
|
2504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.View, { ...props, view: "year", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
2505
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerViewControlGroup, {}),
|
|
2506
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.TableBody, { children: datePicker3.getYearsGrid({ columns: 4 }).map((years, id) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.DatePicker.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTableCell, { value: year.value, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTableCellTrigger, { children: year.label }) }, id2)) }, id)) }) })
|
|
2158
2507
|
] }) }) });
|
|
2159
2508
|
}
|
|
2160
2509
|
function DatePickerCalendar(props) {
|
|
2161
|
-
return /* @__PURE__ */ (0,
|
|
2162
|
-
/* @__PURE__ */ (0,
|
|
2163
|
-
/* @__PURE__ */ (0,
|
|
2164
|
-
/* @__PURE__ */ (0,
|
|
2510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(DatePickerContent, { withModal: props.withModal, children: [
|
|
2511
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerDayView, {}),
|
|
2512
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerMonthView, {}),
|
|
2513
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerYearView, {})
|
|
2165
2514
|
] });
|
|
2166
2515
|
}
|
|
2167
2516
|
|
|
2168
2517
|
// src/components/Droppable.tsx
|
|
2169
2518
|
var import_core = require("@dnd-kit/core");
|
|
2170
|
-
var
|
|
2171
|
-
var
|
|
2519
|
+
var import_react22 = require("react");
|
|
2520
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2172
2521
|
function Droppable(props) {
|
|
2173
2522
|
const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } = props;
|
|
2174
|
-
const uuid = (0,
|
|
2523
|
+
const uuid = (0, import_react22.useId)();
|
|
2175
2524
|
const { isOver, setNodeRef } = (0, import_core.useDroppable)({
|
|
2176
2525
|
data,
|
|
2177
2526
|
disabled,
|
|
2178
2527
|
id: id || uuid,
|
|
2179
2528
|
resizeObserverConfig
|
|
2180
2529
|
});
|
|
2181
|
-
return /* @__PURE__ */ (0,
|
|
2530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2182
2531
|
"div",
|
|
2183
2532
|
{
|
|
2184
2533
|
...nativeProps,
|
|
@@ -2191,14 +2540,14 @@ function Droppable(props) {
|
|
|
2191
2540
|
}
|
|
2192
2541
|
|
|
2193
2542
|
// src/context/feature-flags.tsx
|
|
2194
|
-
var
|
|
2195
|
-
var
|
|
2196
|
-
var FeatureFlagContext = (0,
|
|
2543
|
+
var import_react23 = require("react");
|
|
2544
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2545
|
+
var FeatureFlagContext = (0, import_react23.createContext)(null);
|
|
2197
2546
|
function FeatureFlags(props) {
|
|
2198
|
-
return /* @__PURE__ */ (0,
|
|
2547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(FeatureFlagContext.Provider, { value: props.flags, children: props.children });
|
|
2199
2548
|
}
|
|
2200
2549
|
function useFeatureFlags(key) {
|
|
2201
|
-
const context = (0,
|
|
2550
|
+
const context = (0, import_react23.useContext)(FeatureFlagContext);
|
|
2202
2551
|
if (context === null) {
|
|
2203
2552
|
throw new Error(
|
|
2204
2553
|
"useFeatureFlag must be used within a FeatureFlags Provider"
|
|
@@ -2208,50 +2557,50 @@ function useFeatureFlags(key) {
|
|
|
2208
2557
|
}
|
|
2209
2558
|
|
|
2210
2559
|
// src/components/FeatureFlag.tsx
|
|
2211
|
-
var
|
|
2560
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2212
2561
|
function FeatureFlag(props) {
|
|
2213
2562
|
const showContent = useFeatureFlags(props.flag);
|
|
2214
|
-
return /* @__PURE__ */ (0,
|
|
2563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Show, { when: showContent, children: props.children });
|
|
2215
2564
|
}
|
|
2216
2565
|
|
|
2217
2566
|
// src/components/fieldset/primitives.tsx
|
|
2218
2567
|
var import_fieldset = require("@ark-ui/react/fieldset");
|
|
2219
|
-
var
|
|
2220
|
-
var
|
|
2221
|
-
var
|
|
2568
|
+
var import_css31 = require("@cerberus/styled-system/css");
|
|
2569
|
+
var import_recipes25 = require("@cerberus/styled-system/recipes");
|
|
2570
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2222
2571
|
function FieldsetRoot(props) {
|
|
2223
|
-
const styles = (0,
|
|
2224
|
-
return /* @__PURE__ */ (0,
|
|
2572
|
+
const styles = (0, import_recipes25.fieldset)();
|
|
2573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_fieldset.Fieldset.Root, { ...props, className: (0, import_css31.cx)(styles.root, props.className) });
|
|
2225
2574
|
}
|
|
2226
2575
|
function FieldsetLegend(props) {
|
|
2227
2576
|
const { usage, ...legendProps } = props;
|
|
2228
|
-
const styles = (0,
|
|
2229
|
-
return /* @__PURE__ */ (0,
|
|
2577
|
+
const styles = (0, import_recipes25.fieldset)({ usage });
|
|
2578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2230
2579
|
import_fieldset.Fieldset.Legend,
|
|
2231
2580
|
{
|
|
2232
2581
|
...legendProps,
|
|
2233
|
-
className: (0,
|
|
2582
|
+
className: (0, import_css31.cx)(styles.legend, legendProps.className)
|
|
2234
2583
|
}
|
|
2235
2584
|
);
|
|
2236
2585
|
}
|
|
2237
2586
|
function FieldsetHelperText(props) {
|
|
2238
2587
|
const { usage, ...helperTextProps } = props;
|
|
2239
|
-
const styles = (0,
|
|
2240
|
-
return /* @__PURE__ */ (0,
|
|
2588
|
+
const styles = (0, import_recipes25.fieldset)({ usage });
|
|
2589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2241
2590
|
import_fieldset.Fieldset.HelperText,
|
|
2242
2591
|
{
|
|
2243
2592
|
...helperTextProps,
|
|
2244
|
-
className: (0,
|
|
2593
|
+
className: (0, import_css31.cx)(styles.helperText, helperTextProps.className)
|
|
2245
2594
|
}
|
|
2246
2595
|
);
|
|
2247
2596
|
}
|
|
2248
2597
|
function FieldsetErrorText(props) {
|
|
2249
|
-
const styles = (0,
|
|
2250
|
-
return /* @__PURE__ */ (0,
|
|
2598
|
+
const styles = (0, import_recipes25.fieldset)();
|
|
2599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2251
2600
|
import_fieldset.Fieldset.ErrorText,
|
|
2252
2601
|
{
|
|
2253
2602
|
...props,
|
|
2254
|
-
className: (0,
|
|
2603
|
+
className: (0, import_css31.cx)(styles.errorText, props.className)
|
|
2255
2604
|
}
|
|
2256
2605
|
);
|
|
2257
2606
|
}
|
|
@@ -2265,39 +2614,39 @@ var FieldsetParts = {
|
|
|
2265
2614
|
};
|
|
2266
2615
|
|
|
2267
2616
|
// src/components/fieldset/fieldset.tsx
|
|
2268
|
-
var
|
|
2617
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2269
2618
|
function Fieldset2(props) {
|
|
2270
2619
|
const [fieldsetProps, { usage }, rootProps] = splitProps(
|
|
2271
2620
|
props,
|
|
2272
2621
|
["legend", "helperText", "errorText", "children"],
|
|
2273
2622
|
["usage"]
|
|
2274
2623
|
);
|
|
2275
|
-
return /* @__PURE__ */ (0,
|
|
2276
|
-
/* @__PURE__ */ (0,
|
|
2277
|
-
/* @__PURE__ */ (0,
|
|
2624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(FieldsetParts.Root, { ...rootProps, children: [
|
|
2625
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(FieldsetParts.Legend, { usage, children: fieldsetProps.legend }),
|
|
2626
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(FieldsetParts.HelperText, { usage, children: fieldsetProps.helperText }),
|
|
2278
2627
|
fieldsetProps.children,
|
|
2279
|
-
/* @__PURE__ */ (0,
|
|
2628
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(FieldsetParts.ErrorText, { children: fieldsetProps.errorText })
|
|
2280
2629
|
] });
|
|
2281
2630
|
}
|
|
2282
2631
|
|
|
2283
2632
|
// src/components/FileStatus.tsx
|
|
2284
|
-
var
|
|
2285
|
-
var
|
|
2286
|
-
var
|
|
2633
|
+
var import_react24 = require("react");
|
|
2634
|
+
var import_recipes27 = require("@cerberus/styled-system/recipes");
|
|
2635
|
+
var import_css33 = require("@cerberus/styled-system/css");
|
|
2287
2636
|
var import_patterns6 = require("@cerberus/styled-system/patterns");
|
|
2288
2637
|
|
|
2289
2638
|
// src/components/ProgressBar.tsx
|
|
2290
|
-
var
|
|
2291
|
-
var
|
|
2292
|
-
var
|
|
2639
|
+
var import_css32 = require("@cerberus/styled-system/css");
|
|
2640
|
+
var import_recipes26 = require("@cerberus/styled-system/recipes");
|
|
2641
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2293
2642
|
function ProgressBar(props) {
|
|
2294
2643
|
const { indeterminate, size, usage, now, label: label5, ...nativeProps } = props;
|
|
2295
|
-
const styles = (0,
|
|
2644
|
+
const styles = (0, import_recipes26.progressBar)({ size, usage });
|
|
2296
2645
|
const nowClamped = Math.min(100, Math.max(0, now || 0));
|
|
2297
2646
|
const width = {
|
|
2298
2647
|
width: indeterminate ? "50%" : `${nowClamped}%`
|
|
2299
2648
|
};
|
|
2300
|
-
return /* @__PURE__ */ (0,
|
|
2649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2301
2650
|
"div",
|
|
2302
2651
|
{
|
|
2303
2652
|
...nativeProps,
|
|
@@ -2305,9 +2654,9 @@ function ProgressBar(props) {
|
|
|
2305
2654
|
"aria-valuemin": 0,
|
|
2306
2655
|
"aria-valuemax": 100,
|
|
2307
2656
|
"aria-valuenow": indeterminate ? 0 : nowClamped,
|
|
2308
|
-
className: (0,
|
|
2657
|
+
className: (0, import_css32.cx)(nativeProps.className, styles.root),
|
|
2309
2658
|
role: "progressbar",
|
|
2310
|
-
children: /* @__PURE__ */ (0,
|
|
2659
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2311
2660
|
"div",
|
|
2312
2661
|
{
|
|
2313
2662
|
...indeterminate && { "data-indeterminate": true },
|
|
@@ -2321,7 +2670,7 @@ function ProgressBar(props) {
|
|
|
2321
2670
|
}
|
|
2322
2671
|
|
|
2323
2672
|
// src/components/FileStatus.tsx
|
|
2324
|
-
var
|
|
2673
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2325
2674
|
var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
2326
2675
|
processStatus2["TODO"] = "todo";
|
|
2327
2676
|
processStatus2["PROCESSING"] = "processing";
|
|
@@ -2331,24 +2680,24 @@ var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
|
2331
2680
|
})(processStatus || {});
|
|
2332
2681
|
function FileStatus(props) {
|
|
2333
2682
|
const { file, now, status, onClick, ...nativeProps } = props;
|
|
2334
|
-
const actionLabel = (0,
|
|
2335
|
-
const palette = (0,
|
|
2336
|
-
const modalIconPalette = (0,
|
|
2337
|
-
const styles = (0,
|
|
2683
|
+
const actionLabel = (0, import_react24.useMemo)(() => getStatusActionLabel(status), [status]);
|
|
2684
|
+
const palette = (0, import_react24.useMemo)(() => getPalette(status), [status]);
|
|
2685
|
+
const modalIconPalette = (0, import_react24.useMemo)(() => getModalIconPalette(status), [status]);
|
|
2686
|
+
const styles = (0, import_react24.useMemo)(() => {
|
|
2338
2687
|
switch (status) {
|
|
2339
2688
|
case "todo" /* TODO */:
|
|
2340
|
-
return (0,
|
|
2689
|
+
return (0, import_recipes27.fileStatus)({ status: "todo" });
|
|
2341
2690
|
case "processing" /* PROCESSING */:
|
|
2342
|
-
return (0,
|
|
2691
|
+
return (0, import_recipes27.fileStatus)({ status: "processing" });
|
|
2343
2692
|
case "done" /* DONE */:
|
|
2344
|
-
return (0,
|
|
2693
|
+
return (0, import_recipes27.fileStatus)({ status: "done" });
|
|
2345
2694
|
case "error" /* ERROR */:
|
|
2346
|
-
return (0,
|
|
2695
|
+
return (0, import_recipes27.fileStatus)({ status: "error" });
|
|
2347
2696
|
default:
|
|
2348
|
-
return (0,
|
|
2697
|
+
return (0, import_recipes27.fileStatus)();
|
|
2349
2698
|
}
|
|
2350
2699
|
}, [status]);
|
|
2351
|
-
const handleClick = (0,
|
|
2700
|
+
const handleClick = (0, import_react24.useCallback)(
|
|
2352
2701
|
(e) => {
|
|
2353
2702
|
const actionStatus = getStatusActionLabel(
|
|
2354
2703
|
status
|
|
@@ -2357,22 +2706,22 @@ function FileStatus(props) {
|
|
|
2357
2706
|
},
|
|
2358
2707
|
[onClick]
|
|
2359
2708
|
);
|
|
2360
|
-
return /* @__PURE__ */ (0,
|
|
2709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
2361
2710
|
"div",
|
|
2362
2711
|
{
|
|
2363
2712
|
...nativeProps,
|
|
2364
|
-
className: (0,
|
|
2713
|
+
className: (0, import_css33.cx)(nativeProps.className, styles.root, (0, import_patterns6.hstack)()),
|
|
2365
2714
|
children: [
|
|
2366
|
-
/* @__PURE__ */ (0,
|
|
2715
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2367
2716
|
Avatar,
|
|
2368
2717
|
{
|
|
2369
2718
|
ariaLabel: "",
|
|
2370
2719
|
gradient: modalIconPalette,
|
|
2371
|
-
icon: /* @__PURE__ */ (0,
|
|
2720
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MatchFileStatusIcon, { size: 24, status }),
|
|
2372
2721
|
src: ""
|
|
2373
2722
|
}
|
|
2374
2723
|
),
|
|
2375
|
-
/* @__PURE__ */ (0,
|
|
2724
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
2376
2725
|
"div",
|
|
2377
2726
|
{
|
|
2378
2727
|
className: (0, import_patterns6.vstack)({
|
|
@@ -2381,17 +2730,17 @@ function FileStatus(props) {
|
|
|
2381
2730
|
w: "full"
|
|
2382
2731
|
}),
|
|
2383
2732
|
children: [
|
|
2384
|
-
/* @__PURE__ */ (0,
|
|
2733
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2385
2734
|
"small",
|
|
2386
2735
|
{
|
|
2387
|
-
className: (0,
|
|
2736
|
+
className: (0, import_css33.css)({
|
|
2388
2737
|
color: "page.text.initial",
|
|
2389
2738
|
textStyle: "label-sm"
|
|
2390
2739
|
}),
|
|
2391
2740
|
children: file
|
|
2392
2741
|
}
|
|
2393
2742
|
),
|
|
2394
|
-
/* @__PURE__ */ (0,
|
|
2743
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2395
2744
|
ProgressBar,
|
|
2396
2745
|
{
|
|
2397
2746
|
id: props.id,
|
|
@@ -2400,27 +2749,27 @@ function FileStatus(props) {
|
|
|
2400
2749
|
size: "sm"
|
|
2401
2750
|
}
|
|
2402
2751
|
),
|
|
2403
|
-
/* @__PURE__ */ (0,
|
|
2752
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Field2, { label: "", invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2404
2753
|
FieldHelperText,
|
|
2405
2754
|
{
|
|
2406
|
-
className: (0,
|
|
2755
|
+
className: (0, import_css33.css)({
|
|
2407
2756
|
color: "page.text.100"
|
|
2408
2757
|
}),
|
|
2409
2758
|
id: `help:${file}`,
|
|
2410
|
-
children: /* @__PURE__ */ (0,
|
|
2759
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MatchFileStatusText, { status, now })
|
|
2411
2760
|
}
|
|
2412
2761
|
) })
|
|
2413
2762
|
]
|
|
2414
2763
|
}
|
|
2415
2764
|
),
|
|
2416
|
-
/* @__PURE__ */ (0,
|
|
2765
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2417
2766
|
IconButton,
|
|
2418
2767
|
{
|
|
2419
2768
|
ariaLabel: actionLabel,
|
|
2420
2769
|
onClick: handleClick,
|
|
2421
2770
|
palette,
|
|
2422
2771
|
size: "sm",
|
|
2423
|
-
children: /* @__PURE__ */ (0,
|
|
2772
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MatchStatusAction, { status })
|
|
2424
2773
|
}
|
|
2425
2774
|
)
|
|
2426
2775
|
]
|
|
@@ -2437,13 +2786,13 @@ function MatchFileStatusIcon(props) {
|
|
|
2437
2786
|
} = icons;
|
|
2438
2787
|
switch (props.status) {
|
|
2439
2788
|
case "todo" /* TODO */:
|
|
2440
|
-
return /* @__PURE__ */ (0,
|
|
2789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TodoIcon, { size: props.size });
|
|
2441
2790
|
case "processing" /* PROCESSING */:
|
|
2442
|
-
return /* @__PURE__ */ (0,
|
|
2791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FileUploaderIcon, { size: props.size });
|
|
2443
2792
|
case "done" /* DONE */:
|
|
2444
|
-
return /* @__PURE__ */ (0,
|
|
2793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DoneIcon, { size: props.size });
|
|
2445
2794
|
case "error" /* ERROR */:
|
|
2446
|
-
return /* @__PURE__ */ (0,
|
|
2795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(InvalidIcon, { size: props.size });
|
|
2447
2796
|
default:
|
|
2448
2797
|
throw new Error("Unknown status");
|
|
2449
2798
|
}
|
|
@@ -2468,11 +2817,11 @@ function MatchStatusAction(props) {
|
|
|
2468
2817
|
switch (props.status) {
|
|
2469
2818
|
case "todo" /* TODO */:
|
|
2470
2819
|
case "processing" /* PROCESSING */:
|
|
2471
|
-
return /* @__PURE__ */ (0,
|
|
2820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(CloseIcon, {});
|
|
2472
2821
|
case "error" /* ERROR */:
|
|
2473
|
-
return /* @__PURE__ */ (0,
|
|
2822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RedoIcon, {});
|
|
2474
2823
|
case "done" /* DONE */:
|
|
2475
|
-
return /* @__PURE__ */ (0,
|
|
2824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TrashIcon, {});
|
|
2476
2825
|
default:
|
|
2477
2826
|
throw new Error("Invalid status");
|
|
2478
2827
|
}
|
|
@@ -2518,40 +2867,40 @@ function getModalIconPalette(status) {
|
|
|
2518
2867
|
}
|
|
2519
2868
|
|
|
2520
2869
|
// src/components/FileUploader.tsx
|
|
2521
|
-
var
|
|
2870
|
+
var import_css34 = require("@cerberus/styled-system/css");
|
|
2522
2871
|
var import_patterns7 = require("@cerberus/styled-system/patterns");
|
|
2523
|
-
var
|
|
2524
|
-
var
|
|
2872
|
+
var import_recipes28 = require("@cerberus/styled-system/recipes");
|
|
2873
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2525
2874
|
function FileUploader(props) {
|
|
2526
2875
|
var _a;
|
|
2527
2876
|
const { icons } = useCerberusContext();
|
|
2528
|
-
const styles = (0,
|
|
2877
|
+
const styles = (0, import_recipes28.fileUploader)();
|
|
2529
2878
|
const { waitingFileUploader: Icon } = icons;
|
|
2530
|
-
return /* @__PURE__ */ (0,
|
|
2879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2531
2880
|
"div",
|
|
2532
2881
|
{
|
|
2533
2882
|
...props.disabled ? { "aria-disabled": true } : {},
|
|
2534
|
-
className: (0,
|
|
2883
|
+
className: (0, import_css34.cx)(
|
|
2535
2884
|
(0, import_patterns7.vstack)({
|
|
2536
2885
|
justify: "center"
|
|
2537
2886
|
}),
|
|
2538
2887
|
styles.container
|
|
2539
2888
|
),
|
|
2540
2889
|
children: [
|
|
2541
|
-
/* @__PURE__ */ (0,
|
|
2890
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2542
2891
|
Avatar,
|
|
2543
2892
|
{
|
|
2544
2893
|
gradient: "charon-light",
|
|
2545
2894
|
ariaLabel: "",
|
|
2546
|
-
icon: /* @__PURE__ */ (0,
|
|
2895
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, {}),
|
|
2547
2896
|
size: "md",
|
|
2548
2897
|
src: ""
|
|
2549
2898
|
}
|
|
2550
2899
|
) }),
|
|
2551
|
-
/* @__PURE__ */ (0,
|
|
2900
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2552
2901
|
"label",
|
|
2553
2902
|
{
|
|
2554
|
-
className: (0,
|
|
2903
|
+
className: (0, import_css34.cx)(
|
|
2555
2904
|
(0, import_patterns7.vstack)({
|
|
2556
2905
|
justify: "center"
|
|
2557
2906
|
}),
|
|
@@ -2559,16 +2908,16 @@ function FileUploader(props) {
|
|
|
2559
2908
|
),
|
|
2560
2909
|
htmlFor: props.name,
|
|
2561
2910
|
children: [
|
|
2562
|
-
/* @__PURE__ */ (0,
|
|
2911
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Show, { when: Boolean(props.heading), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: styles.heading, children: props.heading }) }),
|
|
2563
2912
|
"Import ",
|
|
2564
2913
|
(_a = props.accept) == null ? void 0 : _a.replace(",", ", "),
|
|
2565
2914
|
" files",
|
|
2566
|
-
/* @__PURE__ */ (0,
|
|
2567
|
-
/* @__PURE__ */ (0,
|
|
2915
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: styles.description, children: "Click to select files" }),
|
|
2916
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2568
2917
|
"input",
|
|
2569
2918
|
{
|
|
2570
2919
|
...props,
|
|
2571
|
-
className: (0,
|
|
2920
|
+
className: (0, import_css34.cx)(props.className, styles.input),
|
|
2572
2921
|
type: "file"
|
|
2573
2922
|
}
|
|
2574
2923
|
)
|
|
@@ -2580,36 +2929,36 @@ function FileUploader(props) {
|
|
|
2580
2929
|
);
|
|
2581
2930
|
}
|
|
2582
2931
|
|
|
2583
|
-
// src/components/Legend.tsx
|
|
2584
|
-
var
|
|
2585
|
-
var
|
|
2932
|
+
// src/components/Legend.tsx
|
|
2933
|
+
var import_css35 = require("@cerberus/styled-system/css");
|
|
2934
|
+
var import_recipes29 = require("@cerberus/styled-system/recipes");
|
|
2586
2935
|
var import_patterns8 = require("@cerberus/styled-system/patterns");
|
|
2587
2936
|
var import_field5 = require("@ark-ui/react/field");
|
|
2588
|
-
var
|
|
2937
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2589
2938
|
function Legend(props) {
|
|
2590
2939
|
const { size, ...nativeProps } = props;
|
|
2591
2940
|
const { invalid, required } = (0, import_field5.useFieldContext)();
|
|
2592
|
-
return /* @__PURE__ */ (0,
|
|
2941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
2593
2942
|
"legend",
|
|
2594
2943
|
{
|
|
2595
2944
|
...nativeProps,
|
|
2596
2945
|
...invalid && { "aria-invalid": true },
|
|
2597
|
-
className: (0,
|
|
2946
|
+
className: (0, import_css35.cx)(
|
|
2598
2947
|
nativeProps.className,
|
|
2599
2948
|
(0, import_patterns8.hstack)({
|
|
2600
2949
|
justify: "space-between",
|
|
2601
2950
|
w: "full"
|
|
2602
2951
|
}),
|
|
2603
|
-
(0,
|
|
2952
|
+
(0, import_recipes29.label)({
|
|
2604
2953
|
size
|
|
2605
2954
|
})
|
|
2606
2955
|
),
|
|
2607
2956
|
children: [
|
|
2608
2957
|
nativeProps.children,
|
|
2609
|
-
/* @__PURE__ */ (0,
|
|
2958
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Show, { when: required, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2610
2959
|
"span",
|
|
2611
2960
|
{
|
|
2612
|
-
className: (0,
|
|
2961
|
+
className: (0, import_css35.css)({
|
|
2613
2962
|
color: "page.text.100",
|
|
2614
2963
|
fontSize: "inherit"
|
|
2615
2964
|
}),
|
|
@@ -2622,52 +2971,52 @@ function Legend(props) {
|
|
|
2622
2971
|
}
|
|
2623
2972
|
|
|
2624
2973
|
// src/components/Menu.tsx
|
|
2625
|
-
var
|
|
2626
|
-
var
|
|
2627
|
-
var
|
|
2628
|
-
var
|
|
2629
|
-
var menuStyles = (0,
|
|
2630
|
-
var Menu =
|
|
2974
|
+
var import_react25 = require("@ark-ui/react");
|
|
2975
|
+
var import_recipes30 = require("@cerberus/styled-system/recipes");
|
|
2976
|
+
var import_css36 = require("@cerberus/styled-system/css");
|
|
2977
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2978
|
+
var menuStyles = (0, import_recipes30.menu)();
|
|
2979
|
+
var Menu = import_react25.Menu.Root;
|
|
2631
2980
|
function MenuTrigger(props) {
|
|
2632
|
-
return /* @__PURE__ */ (0,
|
|
2981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react25.Menu.Trigger, { ...props, asChild: true });
|
|
2633
2982
|
}
|
|
2634
2983
|
function MenuContent(props) {
|
|
2635
|
-
return /* @__PURE__ */ (0,
|
|
2636
|
-
|
|
2984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react25.Menu.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2985
|
+
import_react25.Menu.Content,
|
|
2637
2986
|
{
|
|
2638
2987
|
...props,
|
|
2639
|
-
className: (0,
|
|
2988
|
+
className: (0, import_css36.cx)(props.className, menuStyles.content)
|
|
2640
2989
|
}
|
|
2641
2990
|
) });
|
|
2642
2991
|
}
|
|
2643
2992
|
function MenuItem(props) {
|
|
2644
|
-
return /* @__PURE__ */ (0,
|
|
2993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react25.Menu.Item, { ...props, className: (0, import_css36.cx)(props.className, menuStyles.item) });
|
|
2645
2994
|
}
|
|
2646
|
-
var MenuItemGroup =
|
|
2995
|
+
var MenuItemGroup = import_react25.Menu.ItemGroup;
|
|
2647
2996
|
function MenuGroupLabel(props) {
|
|
2648
|
-
return /* @__PURE__ */ (0,
|
|
2649
|
-
|
|
2997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2998
|
+
import_react25.Menu.ItemGroupLabel,
|
|
2650
2999
|
{
|
|
2651
3000
|
...props,
|
|
2652
|
-
className: (0,
|
|
3001
|
+
className: (0, import_css36.cx)(props.className, menuStyles.itemGroupLabel)
|
|
2653
3002
|
}
|
|
2654
3003
|
);
|
|
2655
3004
|
}
|
|
2656
3005
|
function MenuSeparator(props) {
|
|
2657
|
-
return /* @__PURE__ */ (0,
|
|
2658
|
-
|
|
3006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3007
|
+
import_react25.Menu.Separator,
|
|
2659
3008
|
{
|
|
2660
3009
|
...props,
|
|
2661
|
-
className: (0,
|
|
3010
|
+
className: (0, import_css36.cx)(props.className, menuStyles.separator)
|
|
2662
3011
|
}
|
|
2663
3012
|
);
|
|
2664
3013
|
}
|
|
2665
3014
|
|
|
2666
3015
|
// src/components/Notification.tsx
|
|
2667
|
-
var
|
|
3016
|
+
var import_css37 = require("@cerberus/styled-system/css");
|
|
2668
3017
|
var import_patterns9 = require("@cerberus/styled-system/patterns");
|
|
2669
|
-
var
|
|
2670
|
-
var
|
|
3018
|
+
var import_recipes31 = require("@cerberus/styled-system/recipes");
|
|
3019
|
+
var import_react26 = require("react");
|
|
2671
3020
|
|
|
2672
3021
|
// src/aria-helpers/trap-focus.aria.ts
|
|
2673
3022
|
function trapFocus(modalRef) {
|
|
@@ -2696,27 +3045,27 @@ function trapFocus(modalRef) {
|
|
|
2696
3045
|
}
|
|
2697
3046
|
|
|
2698
3047
|
// src/components/Notification.tsx
|
|
2699
|
-
var
|
|
3048
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2700
3049
|
function MatchNotificationIcon(props) {
|
|
2701
3050
|
const { icons } = useCerberusContext();
|
|
2702
3051
|
const palette = props.palette || "info";
|
|
2703
3052
|
const key = `${palette}Notification`;
|
|
2704
3053
|
const Icon = icons[key];
|
|
2705
|
-
return /* @__PURE__ */ (0,
|
|
3054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon, {});
|
|
2706
3055
|
}
|
|
2707
3056
|
function Notification(props) {
|
|
2708
3057
|
const { children, palette, onClose, ...nativeProps } = props;
|
|
2709
|
-
const ref = (0,
|
|
3058
|
+
const ref = (0, import_react26.useRef)(null);
|
|
2710
3059
|
const onKeyDown = trapFocus(ref);
|
|
2711
|
-
const styles = (0,
|
|
3060
|
+
const styles = (0, import_recipes31.notification)({ palette });
|
|
2712
3061
|
const { icons } = useCerberusContext();
|
|
2713
3062
|
const { close: CloseIcon } = icons;
|
|
2714
|
-
return /* @__PURE__ */ (0,
|
|
3063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
2715
3064
|
"dialog",
|
|
2716
3065
|
{
|
|
2717
3066
|
...nativeProps,
|
|
2718
3067
|
"data-placement": "left",
|
|
2719
|
-
className: (0,
|
|
3068
|
+
className: (0, import_css37.cx)(
|
|
2720
3069
|
nativeProps.className,
|
|
2721
3070
|
(0, import_patterns9.hstack)({
|
|
2722
3071
|
position: "relative",
|
|
@@ -2727,8 +3076,8 @@ function Notification(props) {
|
|
|
2727
3076
|
onKeyDown,
|
|
2728
3077
|
ref,
|
|
2729
3078
|
children: [
|
|
2730
|
-
/* @__PURE__ */ (0,
|
|
2731
|
-
/* @__PURE__ */ (0,
|
|
3079
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(MatchNotificationIcon, { palette }) }),
|
|
3080
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2732
3081
|
"div",
|
|
2733
3082
|
{
|
|
2734
3083
|
className: (0, import_patterns9.vstack)({
|
|
@@ -2739,14 +3088,14 @@ function Notification(props) {
|
|
|
2739
3088
|
children
|
|
2740
3089
|
}
|
|
2741
3090
|
),
|
|
2742
|
-
/* @__PURE__ */ (0,
|
|
3091
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2743
3092
|
"button",
|
|
2744
3093
|
{
|
|
2745
3094
|
"aria-label": "Close",
|
|
2746
3095
|
className: styles.close,
|
|
2747
3096
|
onClick: onClose,
|
|
2748
3097
|
value: props.id,
|
|
2749
|
-
children: /* @__PURE__ */ (0,
|
|
3098
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CloseIcon, {})
|
|
2750
3099
|
}
|
|
2751
3100
|
)
|
|
2752
3101
|
]
|
|
@@ -2755,26 +3104,26 @@ function Notification(props) {
|
|
|
2755
3104
|
}
|
|
2756
3105
|
|
|
2757
3106
|
// src/components/NotificationHeading.tsx
|
|
2758
|
-
var
|
|
2759
|
-
var
|
|
2760
|
-
var
|
|
3107
|
+
var import_css38 = require("@cerberus/styled-system/css");
|
|
3108
|
+
var import_recipes32 = require("@cerberus/styled-system/recipes");
|
|
3109
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2761
3110
|
function NotificationHeading(props) {
|
|
2762
3111
|
const { palette, ...nativeProps } = props;
|
|
2763
|
-
const styles = (0,
|
|
2764
|
-
return /* @__PURE__ */ (0,
|
|
3112
|
+
const styles = (0, import_recipes32.notification)({ palette });
|
|
3113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: (0, import_css38.cx)(nativeProps.className, styles.heading), ...nativeProps });
|
|
2765
3114
|
}
|
|
2766
3115
|
|
|
2767
3116
|
// src/components/NotificationDescription.tsx
|
|
2768
|
-
var
|
|
2769
|
-
var
|
|
2770
|
-
var
|
|
3117
|
+
var import_css39 = require("@cerberus/styled-system/css");
|
|
3118
|
+
var import_recipes33 = require("@cerberus/styled-system/recipes");
|
|
3119
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2771
3120
|
function NotificationDescription(props) {
|
|
2772
3121
|
const { palette, ...nativeProps } = props;
|
|
2773
|
-
const styles = (0,
|
|
2774
|
-
return /* @__PURE__ */ (0,
|
|
3122
|
+
const styles = (0, import_recipes33.notification)({ palette });
|
|
3123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2775
3124
|
"p",
|
|
2776
3125
|
{
|
|
2777
|
-
className: (0,
|
|
3126
|
+
className: (0, import_css39.cx)(nativeProps.className, styles.description),
|
|
2778
3127
|
...nativeProps
|
|
2779
3128
|
}
|
|
2780
3129
|
);
|
|
@@ -2782,74 +3131,74 @@ function NotificationDescription(props) {
|
|
|
2782
3131
|
|
|
2783
3132
|
// src/components/radio/primitives.tsx
|
|
2784
3133
|
var import_radio_group = require("@ark-ui/react/radio-group");
|
|
2785
|
-
var
|
|
2786
|
-
var
|
|
2787
|
-
var
|
|
3134
|
+
var import_css40 = require("@cerberus/styled-system/css");
|
|
3135
|
+
var import_recipes34 = require("@cerberus/styled-system/recipes");
|
|
3136
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2788
3137
|
function RadioGroupRoot(props) {
|
|
2789
3138
|
const { size, orientation, ...rootProps } = props;
|
|
2790
|
-
const styles = (0,
|
|
2791
|
-
return /* @__PURE__ */ (0,
|
|
3139
|
+
const styles = (0, import_recipes34.radioGroup)({ size, orientation });
|
|
3140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2792
3141
|
import_radio_group.RadioGroup.Root,
|
|
2793
3142
|
{
|
|
2794
3143
|
...rootProps,
|
|
2795
|
-
className: (0,
|
|
3144
|
+
className: (0, import_css40.cx)(styles.root, rootProps.className)
|
|
2796
3145
|
}
|
|
2797
3146
|
);
|
|
2798
3147
|
}
|
|
2799
3148
|
function RadioGroupLabel(props) {
|
|
2800
|
-
const styles = (0,
|
|
2801
|
-
return /* @__PURE__ */ (0,
|
|
3149
|
+
const styles = (0, import_recipes34.radioGroup)();
|
|
3150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2802
3151
|
import_radio_group.RadioGroup.Label,
|
|
2803
3152
|
{
|
|
2804
3153
|
...props,
|
|
2805
|
-
className: (0,
|
|
3154
|
+
className: (0, import_css40.cx)(styles.label, props.className)
|
|
2806
3155
|
}
|
|
2807
3156
|
);
|
|
2808
3157
|
}
|
|
2809
3158
|
function RadioGroupIndicator(props) {
|
|
2810
|
-
const styles = (0,
|
|
2811
|
-
return /* @__PURE__ */ (0,
|
|
3159
|
+
const styles = (0, import_recipes34.radioGroup)();
|
|
3160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2812
3161
|
import_radio_group.RadioGroup.Indicator,
|
|
2813
3162
|
{
|
|
2814
3163
|
...props,
|
|
2815
|
-
className: (0,
|
|
3164
|
+
className: (0, import_css40.cx)(styles.indicator, props.className)
|
|
2816
3165
|
}
|
|
2817
3166
|
);
|
|
2818
3167
|
}
|
|
2819
3168
|
function RadioGroupItem(props) {
|
|
2820
|
-
const styles = (0,
|
|
2821
|
-
return /* @__PURE__ */ (0,
|
|
3169
|
+
const styles = (0, import_recipes34.radioGroup)();
|
|
3170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2822
3171
|
import_radio_group.RadioGroup.Item,
|
|
2823
3172
|
{
|
|
2824
3173
|
...props,
|
|
2825
|
-
className: (0,
|
|
3174
|
+
className: (0, import_css40.cx)(styles.item, props.className)
|
|
2826
3175
|
}
|
|
2827
3176
|
);
|
|
2828
3177
|
}
|
|
2829
3178
|
function RadioGroupItemText(props) {
|
|
2830
3179
|
const { size, orientation, ...itemTextProps } = props;
|
|
2831
|
-
const styles = (0,
|
|
2832
|
-
return /* @__PURE__ */ (0,
|
|
3180
|
+
const styles = (0, import_recipes34.radioGroup)({ size, orientation });
|
|
3181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2833
3182
|
import_radio_group.RadioGroup.ItemText,
|
|
2834
3183
|
{
|
|
2835
3184
|
...itemTextProps,
|
|
2836
|
-
className: (0,
|
|
3185
|
+
className: (0, import_css40.cx)(styles.itemText, itemTextProps.className)
|
|
2837
3186
|
}
|
|
2838
3187
|
);
|
|
2839
3188
|
}
|
|
2840
3189
|
function RadioGroupItemControl(props) {
|
|
2841
3190
|
const { size, orientation, ...itemControlProps } = props;
|
|
2842
|
-
const styles = (0,
|
|
2843
|
-
return /* @__PURE__ */ (0,
|
|
3191
|
+
const styles = (0, import_recipes34.radioGroup)({ size, orientation });
|
|
3192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2844
3193
|
import_radio_group.RadioGroup.ItemControl,
|
|
2845
3194
|
{
|
|
2846
3195
|
...itemControlProps,
|
|
2847
|
-
className: (0,
|
|
3196
|
+
className: (0, import_css40.cx)(styles.itemControl, itemControlProps.className)
|
|
2848
3197
|
}
|
|
2849
3198
|
);
|
|
2850
3199
|
}
|
|
2851
3200
|
function RadioGroupItemHiddenInput(props) {
|
|
2852
|
-
return /* @__PURE__ */ (0,
|
|
3201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_radio_group.RadioGroup.ItemHiddenInput, { ...props });
|
|
2853
3202
|
}
|
|
2854
3203
|
var RadioGroup = RadioGroupRoot;
|
|
2855
3204
|
|
|
@@ -2865,71 +3214,71 @@ var RadioParts = {
|
|
|
2865
3214
|
};
|
|
2866
3215
|
|
|
2867
3216
|
// src/components/radio/radio.tsx
|
|
2868
|
-
var
|
|
3217
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2869
3218
|
function Radio(props) {
|
|
2870
3219
|
const { size, children, ...groupProps } = props;
|
|
2871
|
-
return /* @__PURE__ */ (0,
|
|
2872
|
-
/* @__PURE__ */ (0,
|
|
2873
|
-
/* @__PURE__ */ (0,
|
|
2874
|
-
/* @__PURE__ */ (0,
|
|
3220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(RadioGroupItem, { ...groupProps, children: [
|
|
3221
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(RadioGroupItemControl, { size }),
|
|
3222
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(RadioGroupItemText, { size, children }),
|
|
3223
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(RadioGroupItemHiddenInput, {})
|
|
2875
3224
|
] });
|
|
2876
3225
|
}
|
|
2877
3226
|
|
|
2878
3227
|
// src/components/rating/primitives.tsx
|
|
2879
3228
|
var import_rating_group = require("@ark-ui/react/rating-group");
|
|
2880
|
-
var
|
|
2881
|
-
var
|
|
2882
|
-
var
|
|
3229
|
+
var import_css41 = require("@cerberus/styled-system/css");
|
|
3230
|
+
var import_recipes35 = require("@cerberus/styled-system/recipes");
|
|
3231
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2883
3232
|
function RatingRoot(props) {
|
|
2884
3233
|
const { orientation, size, ...rootProps } = props;
|
|
2885
|
-
const styles = (0,
|
|
2886
|
-
return /* @__PURE__ */ (0,
|
|
3234
|
+
const styles = (0, import_recipes35.ratingGroup)({ orientation, size });
|
|
3235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2887
3236
|
import_rating_group.RatingGroup.Root,
|
|
2888
3237
|
{
|
|
2889
3238
|
...rootProps,
|
|
2890
|
-
className: (0,
|
|
3239
|
+
className: (0, import_css41.cx)(styles.root, rootProps.className)
|
|
2891
3240
|
}
|
|
2892
3241
|
);
|
|
2893
3242
|
}
|
|
2894
3243
|
function RatingLabel(props) {
|
|
2895
|
-
const styles = (0,
|
|
2896
|
-
return /* @__PURE__ */ (0,
|
|
3244
|
+
const styles = (0, import_recipes35.ratingGroup)();
|
|
3245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2897
3246
|
import_rating_group.RatingGroup.Label,
|
|
2898
3247
|
{
|
|
2899
3248
|
...props,
|
|
2900
|
-
className: (0,
|
|
3249
|
+
className: (0, import_css41.cx)(styles.label, props.className)
|
|
2901
3250
|
}
|
|
2902
3251
|
);
|
|
2903
3252
|
}
|
|
2904
3253
|
function RatingControl(props) {
|
|
2905
|
-
const styles = (0,
|
|
2906
|
-
return /* @__PURE__ */ (0,
|
|
3254
|
+
const styles = (0, import_recipes35.ratingGroup)();
|
|
3255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2907
3256
|
import_rating_group.RatingGroup.Control,
|
|
2908
3257
|
{
|
|
2909
3258
|
...props,
|
|
2910
|
-
className: (0,
|
|
3259
|
+
className: (0, import_css41.cx)(styles.control, props.className)
|
|
2911
3260
|
}
|
|
2912
3261
|
);
|
|
2913
3262
|
}
|
|
2914
3263
|
function RatingContext(props) {
|
|
2915
|
-
return /* @__PURE__ */ (0,
|
|
3264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_rating_group.RatingGroup.Context, { ...props });
|
|
2916
3265
|
}
|
|
2917
3266
|
function RatingItem(props) {
|
|
2918
3267
|
const { palette, ...itemProps } = props;
|
|
2919
|
-
const styles = (0,
|
|
2920
|
-
return /* @__PURE__ */ (0,
|
|
3268
|
+
const styles = (0, import_recipes35.ratingGroup)({ palette });
|
|
3269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2921
3270
|
import_rating_group.RatingGroup.Item,
|
|
2922
3271
|
{
|
|
2923
3272
|
...itemProps,
|
|
2924
|
-
className: (0,
|
|
3273
|
+
className: (0, import_css41.cx)(styles.item, itemProps.className)
|
|
2925
3274
|
}
|
|
2926
3275
|
);
|
|
2927
3276
|
}
|
|
2928
3277
|
function RatingItemContext(props) {
|
|
2929
|
-
return /* @__PURE__ */ (0,
|
|
3278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_rating_group.RatingGroup.ItemContext, { ...props });
|
|
2930
3279
|
}
|
|
2931
3280
|
function RatingHiddenInput(props) {
|
|
2932
|
-
return /* @__PURE__ */ (0,
|
|
3281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_rating_group.RatingGroup.HiddenInput, { ...props });
|
|
2933
3282
|
}
|
|
2934
3283
|
|
|
2935
3284
|
// src/components/rating/parts.tsx
|
|
@@ -2944,136 +3293,27 @@ var RatingParts = {
|
|
|
2944
3293
|
};
|
|
2945
3294
|
|
|
2946
3295
|
// src/components/rating/rating.tsx
|
|
2947
|
-
var
|
|
3296
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2948
3297
|
function Rating(props) {
|
|
2949
3298
|
const [{ label: label5 }, styleProps, rootProps] = splitProps(
|
|
2950
3299
|
props,
|
|
2951
3300
|
["label"],
|
|
2952
3301
|
["orientation", "palette", "size"]
|
|
2953
3302
|
);
|
|
2954
|
-
return /* @__PURE__ */ (0,
|
|
2955
|
-
/* @__PURE__ */ (0,
|
|
2956
|
-
/* @__PURE__ */ (0,
|
|
3303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(RatingParts.Root, { ...styleProps, ...rootProps, children: [
|
|
3304
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Show, { when: Boolean(label5), children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(RatingParts.Label, { children: label5 }) }),
|
|
3305
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(RatingParts.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(RatingParts.Context, { children: (context) => context.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2957
3306
|
RatingParts.Item,
|
|
2958
3307
|
{
|
|
2959
3308
|
index: item,
|
|
2960
3309
|
palette: styleProps.palette,
|
|
2961
|
-
children: /* @__PURE__ */ (0,
|
|
3310
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(RatingParts.ItemContext, { children: rootProps.children })
|
|
2962
3311
|
},
|
|
2963
3312
|
item
|
|
2964
3313
|
)) }) })
|
|
2965
3314
|
] });
|
|
2966
3315
|
}
|
|
2967
3316
|
|
|
2968
|
-
// src/components/select/primitives.tsx
|
|
2969
|
-
var import_select = require("@ark-ui/react/select");
|
|
2970
|
-
var import_recipes34 = require("@cerberus/styled-system/recipes");
|
|
2971
|
-
var import_css40 = require("@cerberus/styled-system/css");
|
|
2972
|
-
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2973
|
-
function SelectRoot(props) {
|
|
2974
|
-
const { size, ...rootProps } = props;
|
|
2975
|
-
const styles = (0, import_recipes34.select)({ size });
|
|
2976
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2977
|
-
import_select.Select.Root,
|
|
2978
|
-
{
|
|
2979
|
-
...rootProps,
|
|
2980
|
-
className: (0, import_css40.cx)(styles.root, rootProps.className)
|
|
2981
|
-
}
|
|
2982
|
-
);
|
|
2983
|
-
}
|
|
2984
|
-
function SelectLabel(props) {
|
|
2985
|
-
const styles = (0, import_recipes34.select)();
|
|
2986
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_select.Select.Label, { ...props, className: (0, import_css40.cx)(styles.label, props.className) });
|
|
2987
|
-
}
|
|
2988
|
-
function SelectControl(props) {
|
|
2989
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_select.Select.Control, { ...props });
|
|
2990
|
-
}
|
|
2991
|
-
function SelectTrigger(props) {
|
|
2992
|
-
const styles = (0, import_recipes34.select)();
|
|
2993
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2994
|
-
import_select.Select.Trigger,
|
|
2995
|
-
{
|
|
2996
|
-
...props,
|
|
2997
|
-
className: (0, import_css40.cx)(styles.trigger, props.className)
|
|
2998
|
-
}
|
|
2999
|
-
);
|
|
3000
|
-
}
|
|
3001
|
-
function SelectValueText(props) {
|
|
3002
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_select.Select.ValueText, { ...props });
|
|
3003
|
-
}
|
|
3004
|
-
function SelectIndicator(props) {
|
|
3005
|
-
const styles = (0, import_recipes34.select)();
|
|
3006
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3007
|
-
import_select.Select.Indicator,
|
|
3008
|
-
{
|
|
3009
|
-
...props,
|
|
3010
|
-
className: (0, import_css40.cx)(styles.indicator, props.className)
|
|
3011
|
-
}
|
|
3012
|
-
);
|
|
3013
|
-
}
|
|
3014
|
-
function SelectClearTrigger(props) {
|
|
3015
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_select.Select.ClearTrigger, { ...props });
|
|
3016
|
-
}
|
|
3017
|
-
function SelectPositioner(props) {
|
|
3018
|
-
const styles = (0, import_recipes34.select)();
|
|
3019
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3020
|
-
import_select.Select.Positioner,
|
|
3021
|
-
{
|
|
3022
|
-
...props,
|
|
3023
|
-
className: (0, import_css40.cx)(styles.positioner, props.className)
|
|
3024
|
-
}
|
|
3025
|
-
);
|
|
3026
|
-
}
|
|
3027
|
-
function SelectContent(props) {
|
|
3028
|
-
const { size, ...contentProps } = props;
|
|
3029
|
-
const styles = (0, import_recipes34.select)({ size });
|
|
3030
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3031
|
-
import_select.Select.Content,
|
|
3032
|
-
{
|
|
3033
|
-
...contentProps,
|
|
3034
|
-
className: (0, import_css40.cx)(styles.content, contentProps.className)
|
|
3035
|
-
}
|
|
3036
|
-
);
|
|
3037
|
-
}
|
|
3038
|
-
function SelectItemGroup(props) {
|
|
3039
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_select.Select.ItemGroup, { ...props });
|
|
3040
|
-
}
|
|
3041
|
-
function SelectItemGroupLabel(props) {
|
|
3042
|
-
const styles = (0, import_recipes34.select)();
|
|
3043
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3044
|
-
import_select.Select.ItemGroupLabel,
|
|
3045
|
-
{
|
|
3046
|
-
...props,
|
|
3047
|
-
className: (0, import_css40.cx)(styles.itemGroupLabel, props.className)
|
|
3048
|
-
}
|
|
3049
|
-
);
|
|
3050
|
-
}
|
|
3051
|
-
function SelectItem(props) {
|
|
3052
|
-
const styles = (0, import_recipes34.select)();
|
|
3053
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_select.Select.Item, { ...props, className: (0, import_css40.cx)(styles.item, props.className) });
|
|
3054
|
-
}
|
|
3055
|
-
function SelectItemText(props) {
|
|
3056
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_select.Select.ItemText, { ...props });
|
|
3057
|
-
}
|
|
3058
|
-
function SelectItemIndicator(props) {
|
|
3059
|
-
const styles = (0, import_recipes34.select)();
|
|
3060
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3061
|
-
import_select.Select.ItemIndicator,
|
|
3062
|
-
{
|
|
3063
|
-
...props,
|
|
3064
|
-
className: (0, import_css40.cx)(styles.itemIndicator, props.className)
|
|
3065
|
-
}
|
|
3066
|
-
);
|
|
3067
|
-
}
|
|
3068
|
-
function SelectHiddenSelect(props) {
|
|
3069
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_select.Select.HiddenSelect, { ...props });
|
|
3070
|
-
}
|
|
3071
|
-
function createSelectCollection(collection) {
|
|
3072
|
-
return (0, import_select.createListCollection)({
|
|
3073
|
-
items: collection
|
|
3074
|
-
});
|
|
3075
|
-
}
|
|
3076
|
-
|
|
3077
3317
|
// src/components/select/parts.ts
|
|
3078
3318
|
var SelectParts = {
|
|
3079
3319
|
Root: SelectRoot,
|
|
@@ -3095,77 +3335,77 @@ var SelectParts = {
|
|
|
3095
3335
|
|
|
3096
3336
|
// src/components/select/select.tsx
|
|
3097
3337
|
var import_jsx5 = require("@cerberus/styled-system/jsx");
|
|
3098
|
-
var
|
|
3338
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3099
3339
|
function Select2(props) {
|
|
3100
3340
|
const { collection, placeholder, ...rootProps } = props;
|
|
3101
3341
|
const { icons } = useCerberusContext();
|
|
3102
3342
|
const { selectArrow: SelectArrow, invalid: InvalidIcon } = icons;
|
|
3103
|
-
return /* @__PURE__ */ (0,
|
|
3104
|
-
/* @__PURE__ */ (0,
|
|
3105
|
-
/* @__PURE__ */ (0,
|
|
3106
|
-
/* @__PURE__ */ (0,
|
|
3107
|
-
/* @__PURE__ */ (0,
|
|
3108
|
-
/* @__PURE__ */ (0,
|
|
3343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(SelectParts.Root, { collection, ...rootProps, children: [
|
|
3344
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectParts.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(SelectParts.Trigger, { children: [
|
|
3345
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectParts.ValueText, { placeholder }),
|
|
3346
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx5.HStack, { children: [
|
|
3347
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Show, { when: props.invalid, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(InvalidIcon, { "data-part": "invalid-icon" }) }),
|
|
3348
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectParts.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectArrow, {}) })
|
|
3109
3349
|
] })
|
|
3110
3350
|
] }) }),
|
|
3111
|
-
/* @__PURE__ */ (0,
|
|
3112
|
-
/* @__PURE__ */ (0,
|
|
3351
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectParts.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectParts.Content, { size: rootProps.size, children: props.children }) }) }),
|
|
3352
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectParts.HiddenSelect, {})
|
|
3113
3353
|
] });
|
|
3114
3354
|
}
|
|
3115
3355
|
function Option(props) {
|
|
3116
3356
|
const { item, ...itemProps } = props;
|
|
3117
3357
|
const { icons } = useCerberusContext();
|
|
3118
3358
|
const { selectChecked: CheckedIcon } = icons;
|
|
3119
|
-
return /* @__PURE__ */ (0,
|
|
3120
|
-
/* @__PURE__ */ (0,
|
|
3121
|
-
/* @__PURE__ */ (0,
|
|
3359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(SelectParts.Item, { ...itemProps, item, children: [
|
|
3360
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectParts.ItemText, { children: item == null ? void 0 : item.label }),
|
|
3361
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectParts.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CheckedIcon, {}) })
|
|
3122
3362
|
] });
|
|
3123
3363
|
}
|
|
3124
3364
|
|
|
3125
3365
|
// src/components/select/option-group.tsx
|
|
3126
|
-
var
|
|
3366
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3127
3367
|
function OptionGroup(props) {
|
|
3128
|
-
return /* @__PURE__ */ (0,
|
|
3368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SelectItemGroup, { ...props });
|
|
3129
3369
|
}
|
|
3130
3370
|
function OptionGroupLabel(props) {
|
|
3131
|
-
return /* @__PURE__ */ (0,
|
|
3371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SelectItemGroupLabel, { ...props });
|
|
3132
3372
|
}
|
|
3133
3373
|
|
|
3134
3374
|
// src/components/switch/primitives.tsx
|
|
3135
|
-
var
|
|
3136
|
-
var
|
|
3137
|
-
var
|
|
3138
|
-
var
|
|
3375
|
+
var import_react27 = require("@ark-ui/react");
|
|
3376
|
+
var import_css42 = require("@cerberus/styled-system/css");
|
|
3377
|
+
var import_recipes36 = require("@cerberus/styled-system/recipes");
|
|
3378
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3139
3379
|
function SwitchRoot(props) {
|
|
3140
3380
|
const { size, ...rootProps } = props;
|
|
3141
|
-
const styles = (0,
|
|
3142
|
-
return /* @__PURE__ */ (0,
|
|
3143
|
-
|
|
3381
|
+
const styles = (0, import_recipes36.switchRecipe)({ size });
|
|
3382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3383
|
+
import_react27.Switch.Root,
|
|
3144
3384
|
{
|
|
3145
3385
|
...rootProps,
|
|
3146
|
-
className: (0,
|
|
3386
|
+
className: (0, import_css42.cx)(styles.root, rootProps.className)
|
|
3147
3387
|
}
|
|
3148
3388
|
);
|
|
3149
3389
|
}
|
|
3150
3390
|
function SwitchLabel(props) {
|
|
3151
|
-
const styles = (0,
|
|
3152
|
-
return /* @__PURE__ */ (0,
|
|
3391
|
+
const styles = (0, import_recipes36.switchRecipe)();
|
|
3392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react27.Switch.Label, { ...props, className: (0, import_css42.cx)(styles.label, props.className) });
|
|
3153
3393
|
}
|
|
3154
3394
|
function SwitchControl(props) {
|
|
3155
|
-
const styles = (0,
|
|
3156
|
-
return /* @__PURE__ */ (0,
|
|
3157
|
-
|
|
3395
|
+
const styles = (0, import_recipes36.switchRecipe)();
|
|
3396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3397
|
+
import_react27.Switch.Control,
|
|
3158
3398
|
{
|
|
3159
3399
|
...props,
|
|
3160
|
-
className: (0,
|
|
3400
|
+
className: (0, import_css42.cx)(styles.control, props.className)
|
|
3161
3401
|
}
|
|
3162
3402
|
);
|
|
3163
3403
|
}
|
|
3164
3404
|
function SwitchThumb(props) {
|
|
3165
|
-
const styles = (0,
|
|
3166
|
-
return /* @__PURE__ */ (0,
|
|
3405
|
+
const styles = (0, import_recipes36.switchRecipe)();
|
|
3406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react27.Switch.Thumb, { ...props, className: (0, import_css42.cx)(styles.thumb, props.className) });
|
|
3167
3407
|
}
|
|
3168
|
-
var SwitchHiddenInput =
|
|
3408
|
+
var SwitchHiddenInput = import_react27.Switch.HiddenInput;
|
|
3169
3409
|
|
|
3170
3410
|
// src/components/switch/parts.ts
|
|
3171
3411
|
var SwitchParts = {
|
|
@@ -3177,45 +3417,45 @@ var SwitchParts = {
|
|
|
3177
3417
|
};
|
|
3178
3418
|
|
|
3179
3419
|
// src/components/switch/switch-indicator.tsx
|
|
3180
|
-
var
|
|
3420
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3181
3421
|
function SwitchIndicator() {
|
|
3182
3422
|
const { icons } = useCerberusContext();
|
|
3183
3423
|
const { toggleChecked: CheckIcon } = icons;
|
|
3184
|
-
return /* @__PURE__ */ (0,
|
|
3424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(CheckIcon, {});
|
|
3185
3425
|
}
|
|
3186
3426
|
|
|
3187
3427
|
// src/components/switch/switch.tsx
|
|
3188
|
-
var
|
|
3428
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3189
3429
|
function Switch2(props) {
|
|
3190
3430
|
const { children, ...rootProps } = props;
|
|
3191
|
-
return /* @__PURE__ */ (0,
|
|
3192
|
-
/* @__PURE__ */ (0,
|
|
3193
|
-
/* @__PURE__ */ (0,
|
|
3194
|
-
/* @__PURE__ */ (0,
|
|
3431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(SwitchParts.Root, { ...rootProps, children: [
|
|
3432
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(SwitchParts.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(SwitchParts.Thumb, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(SwitchIndicator, {}) }) }),
|
|
3433
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(SwitchParts.Label, { children }),
|
|
3434
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(SwitchParts.HiddenInput, {})
|
|
3195
3435
|
] });
|
|
3196
3436
|
}
|
|
3197
3437
|
|
|
3198
3438
|
// src/components/Tabs.client.tsx
|
|
3199
3439
|
var import_tabs2 = require("@ark-ui/react/tabs");
|
|
3200
|
-
var
|
|
3440
|
+
var import_css43 = require("@cerberus/styled-system/css");
|
|
3201
3441
|
|
|
3202
3442
|
// src/context/tabs.tsx
|
|
3203
3443
|
var import_tabs = require("@ark-ui/react/tabs");
|
|
3204
|
-
var
|
|
3205
|
-
var
|
|
3206
|
-
var
|
|
3207
|
-
var TabsContext = (0,
|
|
3444
|
+
var import_recipes37 = require("@cerberus/styled-system/recipes");
|
|
3445
|
+
var import_react28 = require("react");
|
|
3446
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3447
|
+
var TabsContext = (0, import_react28.createContext)(null);
|
|
3208
3448
|
function Tabs(props) {
|
|
3209
3449
|
const { cache, defaultValue, palette, uuid, ...arkProps } = props;
|
|
3210
|
-
const [activeTab, setActiveTab] = (0,
|
|
3450
|
+
const [activeTab, setActiveTab] = (0, import_react28.useState)(
|
|
3211
3451
|
() => cache ? "" : defaultValue
|
|
3212
3452
|
);
|
|
3213
|
-
const styles = (0,
|
|
3214
|
-
const cacheKey = (0,
|
|
3453
|
+
const styles = (0, import_recipes37.tabs)({ palette });
|
|
3454
|
+
const cacheKey = (0, import_react28.useMemo)(
|
|
3215
3455
|
() => uuid ? `cerberus-tabs-${uuid}` : "cerberus-tabs",
|
|
3216
3456
|
[uuid]
|
|
3217
3457
|
);
|
|
3218
|
-
const handleValueChange = (0,
|
|
3458
|
+
const handleValueChange = (0, import_react28.useCallback)(
|
|
3219
3459
|
(details) => {
|
|
3220
3460
|
if (cache) {
|
|
3221
3461
|
setLocalStorage(cacheKey, details.value);
|
|
@@ -3224,20 +3464,20 @@ function Tabs(props) {
|
|
|
3224
3464
|
},
|
|
3225
3465
|
[cache]
|
|
3226
3466
|
);
|
|
3227
|
-
(0,
|
|
3467
|
+
(0, import_react28.useEffect)(() => {
|
|
3228
3468
|
if (cache && !activeTab) {
|
|
3229
3469
|
const cachedTab = getLocalStorage(cacheKey, defaultValue ?? "");
|
|
3230
3470
|
setActiveTab(cachedTab);
|
|
3231
3471
|
}
|
|
3232
3472
|
}, [cache, defaultValue, activeTab]);
|
|
3233
|
-
const value = (0,
|
|
3473
|
+
const value = (0, import_react28.useMemo)(
|
|
3234
3474
|
() => ({
|
|
3235
3475
|
active: activeTab,
|
|
3236
3476
|
styles
|
|
3237
3477
|
}),
|
|
3238
3478
|
[activeTab, palette, styles]
|
|
3239
3479
|
);
|
|
3240
|
-
return /* @__PURE__ */ (0,
|
|
3480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(TabsContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3241
3481
|
import_tabs.Tabs.Root,
|
|
3242
3482
|
{
|
|
3243
3483
|
...arkProps,
|
|
@@ -3251,7 +3491,7 @@ function Tabs(props) {
|
|
|
3251
3491
|
) });
|
|
3252
3492
|
}
|
|
3253
3493
|
function useTabsContext() {
|
|
3254
|
-
const context = (0,
|
|
3494
|
+
const context = (0, import_react28.useContext)(TabsContext);
|
|
3255
3495
|
if (!context) {
|
|
3256
3496
|
throw new Error("useTabsContext must be used within a Tabs Provider.");
|
|
3257
3497
|
}
|
|
@@ -3259,18 +3499,18 @@ function useTabsContext() {
|
|
|
3259
3499
|
}
|
|
3260
3500
|
|
|
3261
3501
|
// src/components/Tabs.client.tsx
|
|
3262
|
-
var
|
|
3502
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3263
3503
|
function TabsList(props) {
|
|
3264
3504
|
const { children, ...tabsProps } = props;
|
|
3265
3505
|
const { styles } = useTabsContext();
|
|
3266
|
-
return /* @__PURE__ */ (0,
|
|
3506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
3267
3507
|
import_tabs2.Tabs.List,
|
|
3268
3508
|
{
|
|
3269
3509
|
...tabsProps,
|
|
3270
|
-
className: (0,
|
|
3510
|
+
className: (0, import_css43.cx)(tabsProps.className, styles.list),
|
|
3271
3511
|
children: [
|
|
3272
3512
|
children,
|
|
3273
|
-
/* @__PURE__ */ (0,
|
|
3513
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TabIndicator, {})
|
|
3274
3514
|
]
|
|
3275
3515
|
}
|
|
3276
3516
|
);
|
|
@@ -3278,90 +3518,90 @@ function TabsList(props) {
|
|
|
3278
3518
|
var TabList = TabsList;
|
|
3279
3519
|
function Tab(props) {
|
|
3280
3520
|
const { styles } = useTabsContext();
|
|
3281
|
-
return /* @__PURE__ */ (0,
|
|
3521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3282
3522
|
import_tabs2.Tabs.Trigger,
|
|
3283
3523
|
{
|
|
3284
3524
|
...props,
|
|
3285
|
-
className: (0,
|
|
3525
|
+
className: (0, import_css43.cx)(props.className, styles.trigger)
|
|
3286
3526
|
}
|
|
3287
3527
|
);
|
|
3288
3528
|
}
|
|
3289
3529
|
function TabIndicator(props) {
|
|
3290
3530
|
const { styles } = useTabsContext();
|
|
3291
|
-
return /* @__PURE__ */ (0,
|
|
3531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3292
3532
|
import_tabs2.Tabs.Indicator,
|
|
3293
3533
|
{
|
|
3294
3534
|
...props,
|
|
3295
|
-
className: (0,
|
|
3535
|
+
className: (0, import_css43.cx)(props.className, styles.indicator)
|
|
3296
3536
|
}
|
|
3297
3537
|
);
|
|
3298
3538
|
}
|
|
3299
3539
|
function TabPanel(props) {
|
|
3300
3540
|
const { styles } = useTabsContext();
|
|
3301
|
-
return /* @__PURE__ */ (0,
|
|
3541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3302
3542
|
import_tabs2.Tabs.Content,
|
|
3303
3543
|
{
|
|
3304
3544
|
...props,
|
|
3305
|
-
className: (0,
|
|
3545
|
+
className: (0, import_css43.cx)(props.className, styles.content)
|
|
3306
3546
|
}
|
|
3307
3547
|
);
|
|
3308
3548
|
}
|
|
3309
3549
|
|
|
3310
3550
|
// src/components/Table.tsx
|
|
3311
|
-
var
|
|
3312
|
-
var
|
|
3313
|
-
var
|
|
3551
|
+
var import_css44 = require("@cerberus/styled-system/css");
|
|
3552
|
+
var import_recipes38 = require("@cerberus/styled-system/recipes");
|
|
3553
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3314
3554
|
function Table(props) {
|
|
3315
3555
|
const { caption, children, ...nativeProps } = props;
|
|
3316
|
-
const styles = (0,
|
|
3317
|
-
return /* @__PURE__ */ (0,
|
|
3556
|
+
const styles = (0, import_recipes38.table)();
|
|
3557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.container, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
3318
3558
|
"table",
|
|
3319
3559
|
{
|
|
3320
3560
|
...nativeProps,
|
|
3321
|
-
className: (0,
|
|
3561
|
+
className: (0, import_css44.cx)(nativeProps.className, styles.table),
|
|
3322
3562
|
children: [
|
|
3323
|
-
/* @__PURE__ */ (0,
|
|
3563
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("caption", { className: styles.caption, children: caption }),
|
|
3324
3564
|
children
|
|
3325
3565
|
]
|
|
3326
3566
|
}
|
|
3327
3567
|
) });
|
|
3328
3568
|
}
|
|
3329
3569
|
function Tr(props) {
|
|
3330
|
-
return /* @__PURE__ */ (0,
|
|
3570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("tr", { ...props });
|
|
3331
3571
|
}
|
|
3332
3572
|
|
|
3333
3573
|
// src/components/Thead.tsx
|
|
3334
|
-
var
|
|
3335
|
-
var
|
|
3336
|
-
var
|
|
3574
|
+
var import_css45 = require("@cerberus/styled-system/css");
|
|
3575
|
+
var import_recipes39 = require("@cerberus/styled-system/recipes");
|
|
3576
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3337
3577
|
function Thead(props) {
|
|
3338
|
-
return /* @__PURE__ */ (0,
|
|
3578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("thead", { ...props, className: (0, import_css45.cx)(props.className, (0, import_recipes39.thead)()) });
|
|
3339
3579
|
}
|
|
3340
3580
|
|
|
3341
3581
|
// src/components/Th.tsx
|
|
3342
|
-
var
|
|
3343
|
-
var
|
|
3344
|
-
var
|
|
3582
|
+
var import_css46 = require("@cerberus/styled-system/css");
|
|
3583
|
+
var import_recipes40 = require("@cerberus/styled-system/recipes");
|
|
3584
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3345
3585
|
function Th(props) {
|
|
3346
3586
|
const { size, onClick, ...nativeProps } = props;
|
|
3347
|
-
return /* @__PURE__ */ (0,
|
|
3587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3348
3588
|
Show,
|
|
3349
3589
|
{
|
|
3350
3590
|
when: Boolean(onClick),
|
|
3351
|
-
fallback: /* @__PURE__ */ (0,
|
|
3591
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3352
3592
|
"th",
|
|
3353
3593
|
{
|
|
3354
3594
|
...nativeProps,
|
|
3355
|
-
className: (0,
|
|
3595
|
+
className: (0, import_css46.cx)(nativeProps.className, (0, import_recipes40.th)({ size }))
|
|
3356
3596
|
}
|
|
3357
3597
|
),
|
|
3358
|
-
children: /* @__PURE__ */ (0,
|
|
3598
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("th", { ...nativeProps, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3359
3599
|
"button",
|
|
3360
3600
|
{
|
|
3361
|
-
className: (0,
|
|
3601
|
+
className: (0, import_css46.cx)(
|
|
3362
3602
|
nativeProps.className,
|
|
3363
|
-
(0,
|
|
3364
|
-
(0,
|
|
3603
|
+
(0, import_recipes40.th)({ size }),
|
|
3604
|
+
(0, import_css46.css)({
|
|
3365
3605
|
alignItems: "center",
|
|
3366
3606
|
display: "inline-flex",
|
|
3367
3607
|
justifyContent: "space-between",
|
|
@@ -3381,18 +3621,18 @@ function Th(props) {
|
|
|
3381
3621
|
}
|
|
3382
3622
|
|
|
3383
3623
|
// src/components/Td.tsx
|
|
3384
|
-
var
|
|
3385
|
-
var
|
|
3386
|
-
var
|
|
3624
|
+
var import_css47 = require("@cerberus/styled-system/css");
|
|
3625
|
+
var import_recipes41 = require("@cerberus/styled-system/recipes");
|
|
3626
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3387
3627
|
function Td(props) {
|
|
3388
3628
|
const { size, ...nativeProps } = props;
|
|
3389
|
-
return /* @__PURE__ */ (0,
|
|
3629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3390
3630
|
"td",
|
|
3391
3631
|
{
|
|
3392
3632
|
...nativeProps,
|
|
3393
|
-
className: (0,
|
|
3633
|
+
className: (0, import_css47.cx)(
|
|
3394
3634
|
nativeProps.className,
|
|
3395
|
-
(0,
|
|
3635
|
+
(0, import_recipes41.td)({
|
|
3396
3636
|
size
|
|
3397
3637
|
})
|
|
3398
3638
|
)
|
|
@@ -3401,18 +3641,18 @@ function Td(props) {
|
|
|
3401
3641
|
}
|
|
3402
3642
|
|
|
3403
3643
|
// src/components/Tbody.tsx
|
|
3404
|
-
var
|
|
3405
|
-
var
|
|
3406
|
-
var
|
|
3644
|
+
var import_recipes42 = require("@cerberus/styled-system/recipes");
|
|
3645
|
+
var import_css48 = require("@cerberus/styled-system/css");
|
|
3646
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3407
3647
|
function Tbody(props) {
|
|
3408
3648
|
const { decoration, ...nativeProps } = props;
|
|
3409
|
-
return /* @__PURE__ */ (0,
|
|
3649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3410
3650
|
"tbody",
|
|
3411
3651
|
{
|
|
3412
3652
|
...nativeProps,
|
|
3413
|
-
className: (0,
|
|
3653
|
+
className: (0, import_css48.cx)(
|
|
3414
3654
|
nativeProps.className,
|
|
3415
|
-
(0,
|
|
3655
|
+
(0, import_recipes42.tbody)({
|
|
3416
3656
|
decoration
|
|
3417
3657
|
})
|
|
3418
3658
|
)
|
|
@@ -3421,9 +3661,9 @@ function Tbody(props) {
|
|
|
3421
3661
|
}
|
|
3422
3662
|
|
|
3423
3663
|
// src/components/Tag.tsx
|
|
3424
|
-
var
|
|
3425
|
-
var
|
|
3426
|
-
var
|
|
3664
|
+
var import_css49 = require("@cerberus/styled-system/css");
|
|
3665
|
+
var import_recipes43 = require("@cerberus/styled-system/recipes");
|
|
3666
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3427
3667
|
function Tag(props) {
|
|
3428
3668
|
const { shape: initShape, gradient, onClick, usage, ...nativeProps } = props;
|
|
3429
3669
|
const palette = (props == null ? void 0 : props.palette) ?? "page";
|
|
@@ -3432,13 +3672,13 @@ function Tag(props) {
|
|
|
3432
3672
|
const closableStyles = isClosable ? closableCss : "";
|
|
3433
3673
|
const { icons } = useCerberusContext();
|
|
3434
3674
|
const { close: Close } = icons;
|
|
3435
|
-
return /* @__PURE__ */ (0,
|
|
3675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
3436
3676
|
"span",
|
|
3437
3677
|
{
|
|
3438
3678
|
...nativeProps,
|
|
3439
|
-
className: (0,
|
|
3679
|
+
className: (0, import_css49.cx)(
|
|
3440
3680
|
nativeProps.className,
|
|
3441
|
-
(0,
|
|
3681
|
+
(0, import_recipes43.tag)({
|
|
3442
3682
|
gradient,
|
|
3443
3683
|
palette,
|
|
3444
3684
|
shape,
|
|
@@ -3448,24 +3688,24 @@ function Tag(props) {
|
|
|
3448
3688
|
),
|
|
3449
3689
|
children: [
|
|
3450
3690
|
props.children,
|
|
3451
|
-
/* @__PURE__ */ (0,
|
|
3691
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Show, { when: isClosable, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3452
3692
|
"button",
|
|
3453
3693
|
{
|
|
3454
3694
|
"aria-label": "Close",
|
|
3455
|
-
className: (0,
|
|
3695
|
+
className: (0, import_recipes43.iconButton)({
|
|
3456
3696
|
palette: "action",
|
|
3457
3697
|
usage: "filled",
|
|
3458
3698
|
size: "sm"
|
|
3459
3699
|
}),
|
|
3460
3700
|
onClick,
|
|
3461
|
-
children: /* @__PURE__ */ (0,
|
|
3701
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Close, {})
|
|
3462
3702
|
}
|
|
3463
3703
|
) })
|
|
3464
3704
|
]
|
|
3465
3705
|
}
|
|
3466
3706
|
);
|
|
3467
3707
|
}
|
|
3468
|
-
var closableCss = (0,
|
|
3708
|
+
var closableCss = (0, import_css49.css)({
|
|
3469
3709
|
bgColor: "action.bg.active",
|
|
3470
3710
|
color: "action.text.initial",
|
|
3471
3711
|
paddingInlineEnd: "0"
|
|
@@ -3484,24 +3724,24 @@ var ToggleParts = {
|
|
|
3484
3724
|
|
|
3485
3725
|
// src/components/Tooltip.tsx
|
|
3486
3726
|
var import_tooltip = require("@ark-ui/react/tooltip");
|
|
3487
|
-
var
|
|
3488
|
-
var
|
|
3489
|
-
var
|
|
3727
|
+
var import_css50 = require("@cerberus/styled-system/css");
|
|
3728
|
+
var import_recipes44 = require("@cerberus/styled-system/recipes");
|
|
3729
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3490
3730
|
function Tooltip(props) {
|
|
3491
3731
|
const { content, children, asChild, ...nativeProps } = props;
|
|
3492
|
-
const styles = (0,
|
|
3732
|
+
const styles = (0, import_recipes44.tooltip)();
|
|
3493
3733
|
const position = {
|
|
3494
3734
|
placement: props.position || "top"
|
|
3495
3735
|
};
|
|
3496
|
-
return /* @__PURE__ */ (0,
|
|
3497
|
-
/* @__PURE__ */ (0,
|
|
3498
|
-
/* @__PURE__ */ (0,
|
|
3736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_tooltip.Tooltip.Root, { openDelay: 400, positioning: position, children: [
|
|
3737
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_tooltip.Tooltip.Trigger, { className: styles.trigger, asChild, children }),
|
|
3738
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_tooltip.Tooltip.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
3499
3739
|
import_tooltip.Tooltip.Content,
|
|
3500
3740
|
{
|
|
3501
3741
|
...nativeProps,
|
|
3502
|
-
className: (0,
|
|
3742
|
+
className: (0, import_css50.cx)(nativeProps.className, styles.content),
|
|
3503
3743
|
children: [
|
|
3504
|
-
/* @__PURE__ */ (0,
|
|
3744
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_tooltip.Tooltip.Arrow, { className: styles.arrow, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_tooltip.Tooltip.ArrowTip, { className: styles.arrowTip }) }),
|
|
3505
3745
|
content
|
|
3506
3746
|
]
|
|
3507
3747
|
}
|
|
@@ -3510,23 +3750,23 @@ function Tooltip(props) {
|
|
|
3510
3750
|
}
|
|
3511
3751
|
|
|
3512
3752
|
// src/context/confirm-modal.tsx
|
|
3513
|
-
var
|
|
3514
|
-
var
|
|
3753
|
+
var import_react29 = require("react");
|
|
3754
|
+
var import_css51 = require("@cerberus/styled-system/css");
|
|
3515
3755
|
var import_jsx6 = require("@cerberus/styled-system/jsx");
|
|
3516
|
-
var
|
|
3517
|
-
var ConfirmModalContext = (0,
|
|
3756
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3757
|
+
var ConfirmModalContext = (0, import_react29.createContext)(null);
|
|
3518
3758
|
function ConfirmModal(props) {
|
|
3519
|
-
const [open, setOpen] = (0,
|
|
3520
|
-
const [content, setContent] = (0,
|
|
3521
|
-
const resolveRef = (0,
|
|
3759
|
+
const [open, setOpen] = (0, import_react29.useState)(false);
|
|
3760
|
+
const [content, setContent] = (0, import_react29.useState)(null);
|
|
3761
|
+
const resolveRef = (0, import_react29.useRef)(null);
|
|
3522
3762
|
const kind = (content == null ? void 0 : content.kind) ?? "non-destructive";
|
|
3523
3763
|
const { icons } = useCerberusContext();
|
|
3524
3764
|
const { confirmModal: ConfirmIcon } = icons;
|
|
3525
|
-
const palette = (0,
|
|
3765
|
+
const palette = (0, import_react29.useMemo)(
|
|
3526
3766
|
() => kind === "destructive" ? "danger" : "action",
|
|
3527
3767
|
[kind]
|
|
3528
3768
|
);
|
|
3529
|
-
const handleChoice = (0,
|
|
3769
|
+
const handleChoice = (0, import_react29.useCallback)(
|
|
3530
3770
|
(e) => {
|
|
3531
3771
|
var _a, _b;
|
|
3532
3772
|
const target = e.currentTarget;
|
|
@@ -3538,7 +3778,7 @@ function ConfirmModal(props) {
|
|
|
3538
3778
|
},
|
|
3539
3779
|
[setOpen]
|
|
3540
3780
|
);
|
|
3541
|
-
const handleShow = (0,
|
|
3781
|
+
const handleShow = (0, import_react29.useCallback)(
|
|
3542
3782
|
(options) => {
|
|
3543
3783
|
return new Promise((resolve) => {
|
|
3544
3784
|
setContent({ ...options });
|
|
@@ -3548,42 +3788,42 @@ function ConfirmModal(props) {
|
|
|
3548
3788
|
},
|
|
3549
3789
|
[setOpen, setContent]
|
|
3550
3790
|
);
|
|
3551
|
-
const value = (0,
|
|
3791
|
+
const value = (0, import_react29.useMemo)(
|
|
3552
3792
|
() => ({
|
|
3553
3793
|
show: handleShow
|
|
3554
3794
|
}),
|
|
3555
3795
|
[handleShow]
|
|
3556
3796
|
);
|
|
3557
|
-
return /* @__PURE__ */ (0,
|
|
3797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(ConfirmModalContext.Provider, { value, children: [
|
|
3558
3798
|
props.children,
|
|
3559
|
-
/* @__PURE__ */ (0,
|
|
3560
|
-
/* @__PURE__ */ (0,
|
|
3561
|
-
/* @__PURE__ */ (0,
|
|
3799
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(DialogProvider, { open, onOpenChange: (e) => setOpen(e.open), children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Dialog2, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx6.VStack, { gap: "xl", w: "full", children: [
|
|
3800
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx6.VStack, { alignItems: "flex-start", gap: "md", w: "full", children: [
|
|
3801
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3562
3802
|
import_jsx6.HStack,
|
|
3563
3803
|
{
|
|
3564
3804
|
alignSelf: "center",
|
|
3565
3805
|
justify: "center",
|
|
3566
3806
|
paddingBlockEnd: "md",
|
|
3567
3807
|
w: "full",
|
|
3568
|
-
children: /* @__PURE__ */ (0,
|
|
3808
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3569
3809
|
Show,
|
|
3570
3810
|
{
|
|
3571
3811
|
when: palette === "danger",
|
|
3572
|
-
fallback: /* @__PURE__ */ (0,
|
|
3812
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3573
3813
|
Avatar,
|
|
3574
3814
|
{
|
|
3575
3815
|
ariaLabel: "",
|
|
3576
3816
|
gradient: "charon-light",
|
|
3577
|
-
icon: /* @__PURE__ */ (0,
|
|
3817
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(ConfirmIcon, { size: 24 }),
|
|
3578
3818
|
src: ""
|
|
3579
3819
|
}
|
|
3580
3820
|
),
|
|
3581
|
-
children: /* @__PURE__ */ (0,
|
|
3821
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3582
3822
|
Avatar,
|
|
3583
3823
|
{
|
|
3584
3824
|
ariaLabel: "",
|
|
3585
3825
|
gradient: "hades-dark",
|
|
3586
|
-
icon: /* @__PURE__ */ (0,
|
|
3826
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(ConfirmIcon, { size: 24 }),
|
|
3587
3827
|
src: ""
|
|
3588
3828
|
}
|
|
3589
3829
|
)
|
|
@@ -3591,15 +3831,15 @@ function ConfirmModal(props) {
|
|
|
3591
3831
|
)
|
|
3592
3832
|
}
|
|
3593
3833
|
),
|
|
3594
|
-
/* @__PURE__ */ (0,
|
|
3595
|
-
/* @__PURE__ */ (0,
|
|
3834
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(DialogHeading, { children: content == null ? void 0 : content.heading }),
|
|
3835
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(DialogDescription, { children: content == null ? void 0 : content.description })
|
|
3596
3836
|
] }),
|
|
3597
|
-
/* @__PURE__ */ (0,
|
|
3598
|
-
/* @__PURE__ */ (0,
|
|
3837
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx6.HStack, { gap: "4", w: "full", children: [
|
|
3838
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3599
3839
|
Button,
|
|
3600
3840
|
{
|
|
3601
3841
|
autoFocus: true,
|
|
3602
|
-
className: (0,
|
|
3842
|
+
className: (0, import_css51.css)({
|
|
3603
3843
|
w: "1/2"
|
|
3604
3844
|
}),
|
|
3605
3845
|
name: "confirm",
|
|
@@ -3609,10 +3849,10 @@ function ConfirmModal(props) {
|
|
|
3609
3849
|
children: content == null ? void 0 : content.actionText
|
|
3610
3850
|
}
|
|
3611
3851
|
),
|
|
3612
|
-
/* @__PURE__ */ (0,
|
|
3852
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(DialogCloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3613
3853
|
Button,
|
|
3614
3854
|
{
|
|
3615
|
-
className: (0,
|
|
3855
|
+
className: (0, import_css51.css)({
|
|
3616
3856
|
w: "1/2"
|
|
3617
3857
|
}),
|
|
3618
3858
|
name: "cancel",
|
|
@@ -3627,7 +3867,7 @@ function ConfirmModal(props) {
|
|
|
3627
3867
|
] });
|
|
3628
3868
|
}
|
|
3629
3869
|
function useConfirmModal() {
|
|
3630
|
-
const context = (0,
|
|
3870
|
+
const context = (0, import_react29.useContext)(ConfirmModalContext);
|
|
3631
3871
|
if (context === null) {
|
|
3632
3872
|
throw new Error(
|
|
3633
3873
|
"useConfirmModal must be used within a ConfirmModal Provider"
|
|
@@ -3637,10 +3877,10 @@ function useConfirmModal() {
|
|
|
3637
3877
|
}
|
|
3638
3878
|
|
|
3639
3879
|
// src/context/notification-center.tsx
|
|
3640
|
-
var
|
|
3880
|
+
var import_react30 = require("react");
|
|
3641
3881
|
var import_patterns10 = require("@cerberus/styled-system/patterns");
|
|
3642
|
-
var
|
|
3643
|
-
var
|
|
3882
|
+
var import_recipes45 = require("@cerberus/styled-system/recipes");
|
|
3883
|
+
var import_css52 = require("@cerberus/styled-system/css");
|
|
3644
3884
|
|
|
3645
3885
|
// src/context/notification-center/store.ts
|
|
3646
3886
|
function notificationCenterReducer(state, action) {
|
|
@@ -3673,16 +3913,16 @@ function clearNotificationState(dispatch) {
|
|
|
3673
3913
|
}
|
|
3674
3914
|
|
|
3675
3915
|
// src/context/notification-center.tsx
|
|
3676
|
-
var
|
|
3677
|
-
var NotificationsContext = (0,
|
|
3916
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3917
|
+
var NotificationsContext = (0, import_react30.createContext)(null);
|
|
3678
3918
|
function NotificationCenter(props) {
|
|
3679
|
-
const [state, dispatch] = (0,
|
|
3680
|
-
const styles = (0,
|
|
3681
|
-
const timeout = (0,
|
|
3919
|
+
const [state, dispatch] = (0, import_react30.useReducer)(notificationCenterReducer, []);
|
|
3920
|
+
const styles = (0, import_recipes45.notification)();
|
|
3921
|
+
const timeout = (0, import_react30.useMemo)(
|
|
3682
3922
|
() => props.duration || 6e3,
|
|
3683
3923
|
[props.duration]
|
|
3684
3924
|
);
|
|
3685
|
-
const closeNotification = (0,
|
|
3925
|
+
const closeNotification = (0, import_react30.useCallback)(
|
|
3686
3926
|
(id) => {
|
|
3687
3927
|
updateNotificationState(dispatch, {
|
|
3688
3928
|
id,
|
|
@@ -3694,7 +3934,7 @@ function NotificationCenter(props) {
|
|
|
3694
3934
|
},
|
|
3695
3935
|
[dispatch]
|
|
3696
3936
|
);
|
|
3697
|
-
const handleNotify = (0,
|
|
3937
|
+
const handleNotify = (0, import_react30.useCallback)(
|
|
3698
3938
|
(options) => {
|
|
3699
3939
|
const id = `${options.palette}:${state.length + 1}`;
|
|
3700
3940
|
addNotification(dispatch, {
|
|
@@ -3708,32 +3948,32 @@ function NotificationCenter(props) {
|
|
|
3708
3948
|
},
|
|
3709
3949
|
[dispatch, state, timeout, closeNotification]
|
|
3710
3950
|
);
|
|
3711
|
-
const handleClose = (0,
|
|
3951
|
+
const handleClose = (0, import_react30.useCallback)(
|
|
3712
3952
|
(e) => {
|
|
3713
3953
|
const target = e.currentTarget;
|
|
3714
3954
|
closeNotification(target.value);
|
|
3715
3955
|
},
|
|
3716
3956
|
[closeNotification]
|
|
3717
3957
|
);
|
|
3718
|
-
const handleCloseAll = (0,
|
|
3958
|
+
const handleCloseAll = (0, import_react30.useCallback)(() => {
|
|
3719
3959
|
state.forEach((item) => {
|
|
3720
3960
|
if (item.onClose) item.onClose();
|
|
3721
3961
|
});
|
|
3722
3962
|
clearNotificationState(dispatch);
|
|
3723
3963
|
}, [state, dispatch]);
|
|
3724
|
-
const value = (0,
|
|
3964
|
+
const value = (0, import_react30.useMemo)(
|
|
3725
3965
|
() => ({
|
|
3726
3966
|
notify: handleNotify
|
|
3727
3967
|
}),
|
|
3728
3968
|
[handleNotify]
|
|
3729
3969
|
);
|
|
3730
|
-
return /* @__PURE__ */ (0,
|
|
3970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(NotificationsContext.Provider, { value, children: [
|
|
3731
3971
|
props.children,
|
|
3732
|
-
/* @__PURE__ */ (0,
|
|
3733
|
-
/* @__PURE__ */ (0,
|
|
3972
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Show, { when: state.length > 0, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Portal, { container: props.container, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: styles.center, children: [
|
|
3973
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Show, { when: state.length >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3734
3974
|
Button,
|
|
3735
3975
|
{
|
|
3736
|
-
className: (0,
|
|
3976
|
+
className: (0, import_css52.cx)(styles.closeAll, (0, import_patterns10.animateIn)()),
|
|
3737
3977
|
onClick: handleCloseAll,
|
|
3738
3978
|
palette: "action",
|
|
3739
3979
|
shape: "rounded",
|
|
@@ -3742,7 +3982,7 @@ function NotificationCenter(props) {
|
|
|
3742
3982
|
children: "Close all"
|
|
3743
3983
|
}
|
|
3744
3984
|
) }),
|
|
3745
|
-
/* @__PURE__ */ (0,
|
|
3985
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3746
3986
|
"div",
|
|
3747
3987
|
{
|
|
3748
3988
|
className: (0, import_patterns10.vstack)({
|
|
@@ -3752,7 +3992,7 @@ function NotificationCenter(props) {
|
|
|
3752
3992
|
style: {
|
|
3753
3993
|
alignItems: "flex-end"
|
|
3754
3994
|
},
|
|
3755
|
-
children: state.map((option) => /* @__PURE__ */ (0,
|
|
3995
|
+
children: state.map((option) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3756
3996
|
MatchNotification,
|
|
3757
3997
|
{
|
|
3758
3998
|
...option,
|
|
@@ -3768,7 +4008,7 @@ function NotificationCenter(props) {
|
|
|
3768
4008
|
}
|
|
3769
4009
|
function MatchNotification(props) {
|
|
3770
4010
|
const { palette, id, onClose, heading, description, open } = props;
|
|
3771
|
-
const sharedProps = (0,
|
|
4011
|
+
const sharedProps = (0, import_react30.useMemo)(
|
|
3772
4012
|
() => ({
|
|
3773
4013
|
id,
|
|
3774
4014
|
open: true,
|
|
@@ -3779,30 +4019,30 @@ function MatchNotification(props) {
|
|
|
3779
4019
|
);
|
|
3780
4020
|
switch (palette) {
|
|
3781
4021
|
case "success":
|
|
3782
|
-
return /* @__PURE__ */ (0,
|
|
3783
|
-
/* @__PURE__ */ (0,
|
|
3784
|
-
/* @__PURE__ */ (0,
|
|
4022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Notification, { ...sharedProps, palette: "success", children: [
|
|
4023
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(NotificationHeading, { palette: "success", children: heading }),
|
|
4024
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(NotificationDescription, { palette: "success", children: description })
|
|
3785
4025
|
] });
|
|
3786
4026
|
case "warning":
|
|
3787
|
-
return /* @__PURE__ */ (0,
|
|
3788
|
-
/* @__PURE__ */ (0,
|
|
3789
|
-
/* @__PURE__ */ (0,
|
|
4027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Notification, { ...sharedProps, palette: "warning", children: [
|
|
4028
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(NotificationHeading, { palette: "warning", children: heading }),
|
|
4029
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(NotificationDescription, { palette: "warning", children: description })
|
|
3790
4030
|
] });
|
|
3791
4031
|
case "danger":
|
|
3792
|
-
return /* @__PURE__ */ (0,
|
|
3793
|
-
/* @__PURE__ */ (0,
|
|
3794
|
-
/* @__PURE__ */ (0,
|
|
4032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Notification, { ...sharedProps, palette: "danger", children: [
|
|
4033
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(NotificationHeading, { palette: "danger", children: heading }),
|
|
4034
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(NotificationDescription, { palette: "danger", children: description })
|
|
3795
4035
|
] });
|
|
3796
4036
|
case "info":
|
|
3797
4037
|
default:
|
|
3798
|
-
return /* @__PURE__ */ (0,
|
|
3799
|
-
/* @__PURE__ */ (0,
|
|
3800
|
-
/* @__PURE__ */ (0,
|
|
4038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Notification, { ...sharedProps, palette: "info", children: [
|
|
4039
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(NotificationHeading, { palette: "info", children: heading }),
|
|
4040
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(NotificationDescription, { palette: "info", children: description })
|
|
3801
4041
|
] });
|
|
3802
4042
|
}
|
|
3803
4043
|
}
|
|
3804
4044
|
function useNotificationCenter() {
|
|
3805
|
-
const context = (0,
|
|
4045
|
+
const context = (0, import_react30.useContext)(NotificationsContext);
|
|
3806
4046
|
if (!context) {
|
|
3807
4047
|
throw new Error(
|
|
3808
4048
|
"useNotificationCenter must be used within a NotificationsProvider"
|
|
@@ -3812,35 +4052,35 @@ function useNotificationCenter() {
|
|
|
3812
4052
|
}
|
|
3813
4053
|
|
|
3814
4054
|
// src/context/prompt-modal.tsx
|
|
3815
|
-
var
|
|
3816
|
-
var
|
|
4055
|
+
var import_react31 = require("react");
|
|
4056
|
+
var import_react32 = require("@ark-ui/react");
|
|
3817
4057
|
var import_jsx7 = require("@cerberus/styled-system/jsx");
|
|
3818
|
-
var
|
|
4058
|
+
var import_css53 = require("@cerberus/styled-system/css");
|
|
3819
4059
|
var import_patterns11 = require("@cerberus/styled-system/patterns");
|
|
3820
|
-
var
|
|
3821
|
-
var PromptModalContext = (0,
|
|
4060
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4061
|
+
var PromptModalContext = (0, import_react31.createContext)(null);
|
|
3822
4062
|
function PromptModal(props) {
|
|
3823
|
-
const resolveRef = (0,
|
|
3824
|
-
const [open, setOpen] = (0,
|
|
3825
|
-
const [content, setContent] = (0,
|
|
3826
|
-
const [inputValue, setInputValue] = (0,
|
|
4063
|
+
const resolveRef = (0, import_react31.useRef)(null);
|
|
4064
|
+
const [open, setOpen] = (0, import_react31.useState)(false);
|
|
4065
|
+
const [content, setContent] = (0, import_react31.useState)(null);
|
|
4066
|
+
const [inputValue, setInputValue] = (0, import_react31.useState)("");
|
|
3827
4067
|
const { icons } = useCerberusContext();
|
|
3828
4068
|
const { promptModal: PromptIcon } = icons;
|
|
3829
|
-
const isValid = (0,
|
|
4069
|
+
const isValid = (0, import_react31.useMemo)(
|
|
3830
4070
|
() => inputValue === (content == null ? void 0 : content.key),
|
|
3831
4071
|
[inputValue, content]
|
|
3832
4072
|
);
|
|
3833
|
-
const palette = (0,
|
|
4073
|
+
const palette = (0, import_react31.useMemo)(
|
|
3834
4074
|
() => (content == null ? void 0 : content.kind) === "destructive" ? "danger" : "action",
|
|
3835
4075
|
[content]
|
|
3836
4076
|
);
|
|
3837
|
-
const handleChange = (0,
|
|
4077
|
+
const handleChange = (0, import_react31.useCallback)(
|
|
3838
4078
|
(e) => {
|
|
3839
4079
|
setInputValue(e.currentTarget.value);
|
|
3840
4080
|
},
|
|
3841
4081
|
[content]
|
|
3842
4082
|
);
|
|
3843
|
-
const handleChoice = (0,
|
|
4083
|
+
const handleChoice = (0, import_react31.useCallback)(
|
|
3844
4084
|
(e) => {
|
|
3845
4085
|
var _a;
|
|
3846
4086
|
const target = e.currentTarget;
|
|
@@ -3851,7 +4091,7 @@ function PromptModal(props) {
|
|
|
3851
4091
|
},
|
|
3852
4092
|
[inputValue, setOpen]
|
|
3853
4093
|
);
|
|
3854
|
-
const handleShow = (0,
|
|
4094
|
+
const handleShow = (0, import_react31.useCallback)(
|
|
3855
4095
|
(options) => {
|
|
3856
4096
|
return new Promise((resolve) => {
|
|
3857
4097
|
setContent({ ...options, kind: options.kind || "non-destructive" });
|
|
@@ -3861,42 +4101,42 @@ function PromptModal(props) {
|
|
|
3861
4101
|
},
|
|
3862
4102
|
[setOpen]
|
|
3863
4103
|
);
|
|
3864
|
-
const value = (0,
|
|
4104
|
+
const value = (0, import_react31.useMemo)(
|
|
3865
4105
|
() => ({
|
|
3866
4106
|
show: handleShow
|
|
3867
4107
|
}),
|
|
3868
4108
|
[handleShow]
|
|
3869
4109
|
);
|
|
3870
|
-
return /* @__PURE__ */ (0,
|
|
4110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(PromptModalContext.Provider, { value, children: [
|
|
3871
4111
|
props.children,
|
|
3872
|
-
/* @__PURE__ */ (0,
|
|
3873
|
-
/* @__PURE__ */ (0,
|
|
3874
|
-
/* @__PURE__ */ (0,
|
|
4112
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DialogProvider, { open, onOpenChange: (e) => setOpen(e.open), children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Dialog2, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx7.VStack, { gap: "xl", w: "full", children: [
|
|
4113
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx7.VStack, { alignItems: "flex-start", gap: "md", w: "full", children: [
|
|
4114
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3875
4115
|
import_jsx7.HStack,
|
|
3876
4116
|
{
|
|
3877
4117
|
alignSelf: "center",
|
|
3878
4118
|
justify: "center",
|
|
3879
4119
|
paddingBlockEnd: "md",
|
|
3880
4120
|
w: "full",
|
|
3881
|
-
children: /* @__PURE__ */ (0,
|
|
4121
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3882
4122
|
Show,
|
|
3883
4123
|
{
|
|
3884
4124
|
when: palette === "danger",
|
|
3885
|
-
fallback: /* @__PURE__ */ (0,
|
|
4125
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3886
4126
|
Avatar,
|
|
3887
4127
|
{
|
|
3888
4128
|
ariaLabel: "",
|
|
3889
4129
|
gradient: "charon-light",
|
|
3890
|
-
icon: /* @__PURE__ */ (0,
|
|
4130
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(PromptIcon, { size: 24 }),
|
|
3891
4131
|
src: ""
|
|
3892
4132
|
}
|
|
3893
4133
|
),
|
|
3894
|
-
children: /* @__PURE__ */ (0,
|
|
4134
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3895
4135
|
Avatar,
|
|
3896
4136
|
{
|
|
3897
4137
|
ariaLabel: "",
|
|
3898
4138
|
gradient: "hades-dark",
|
|
3899
|
-
icon: /* @__PURE__ */ (0,
|
|
4139
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(PromptIcon, { size: 24 }),
|
|
3900
4140
|
src: ""
|
|
3901
4141
|
}
|
|
3902
4142
|
)
|
|
@@ -3904,17 +4144,17 @@ function PromptModal(props) {
|
|
|
3904
4144
|
)
|
|
3905
4145
|
}
|
|
3906
4146
|
),
|
|
3907
|
-
/* @__PURE__ */ (0,
|
|
3908
|
-
/* @__PURE__ */ (0,
|
|
4147
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DialogHeading, { children: content == null ? void 0 : content.heading }),
|
|
4148
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DialogDescription, { children: content == null ? void 0 : content.description })
|
|
3909
4149
|
] }),
|
|
3910
|
-
/* @__PURE__ */ (0,
|
|
4150
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3911
4151
|
import_jsx7.VStack,
|
|
3912
4152
|
{
|
|
3913
4153
|
alignItems: "flex-start",
|
|
3914
4154
|
marginBlockStart: "md",
|
|
3915
4155
|
marginBlockEnd: "lg",
|
|
3916
4156
|
w: "full",
|
|
3917
|
-
children: /* @__PURE__ */ (0,
|
|
4157
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
3918
4158
|
FieldRoot,
|
|
3919
4159
|
{
|
|
3920
4160
|
ids: {
|
|
@@ -3922,7 +4162,7 @@ function PromptModal(props) {
|
|
|
3922
4162
|
},
|
|
3923
4163
|
invalid: !isValid,
|
|
3924
4164
|
children: [
|
|
3925
|
-
/* @__PURE__ */ (0,
|
|
4165
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
3926
4166
|
FieldLabel,
|
|
3927
4167
|
{
|
|
3928
4168
|
className: (0, import_patterns11.hstack)({
|
|
@@ -3933,23 +4173,23 @@ function PromptModal(props) {
|
|
|
3933
4173
|
}),
|
|
3934
4174
|
children: [
|
|
3935
4175
|
"Type",
|
|
3936
|
-
/* @__PURE__ */ (0,
|
|
4176
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Text, { as: "strong", textTransform: "uppercase", children: content == null ? void 0 : content.key }),
|
|
3937
4177
|
"to confirm"
|
|
3938
4178
|
]
|
|
3939
4179
|
}
|
|
3940
4180
|
),
|
|
3941
|
-
/* @__PURE__ */ (0,
|
|
4181
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Input, { name: "confirm", onChange: handleChange, type: "text" })
|
|
3942
4182
|
]
|
|
3943
4183
|
}
|
|
3944
4184
|
)
|
|
3945
4185
|
}
|
|
3946
4186
|
),
|
|
3947
|
-
/* @__PURE__ */ (0,
|
|
3948
|
-
/* @__PURE__ */ (0,
|
|
4187
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx7.HStack, { gap: "md", justify: "stretch", w: "full", children: [
|
|
4188
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3949
4189
|
Button,
|
|
3950
4190
|
{
|
|
3951
4191
|
autoFocus: true,
|
|
3952
|
-
className: (0,
|
|
4192
|
+
className: (0, import_css53.css)({
|
|
3953
4193
|
w: "1/2"
|
|
3954
4194
|
}),
|
|
3955
4195
|
disabled: !isValid,
|
|
@@ -3960,10 +4200,10 @@ function PromptModal(props) {
|
|
|
3960
4200
|
children: content == null ? void 0 : content.actionText
|
|
3961
4201
|
}
|
|
3962
4202
|
),
|
|
3963
|
-
/* @__PURE__ */ (0,
|
|
4203
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react32.DialogCloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3964
4204
|
Button,
|
|
3965
4205
|
{
|
|
3966
|
-
className: (0,
|
|
4206
|
+
className: (0, import_css53.css)({
|
|
3967
4207
|
w: "1/2"
|
|
3968
4208
|
}),
|
|
3969
4209
|
name: "cancel",
|
|
@@ -3978,7 +4218,7 @@ function PromptModal(props) {
|
|
|
3978
4218
|
] });
|
|
3979
4219
|
}
|
|
3980
4220
|
function usePromptModal() {
|
|
3981
|
-
const context = (0,
|
|
4221
|
+
const context = (0, import_react31.useContext)(PromptModalContext);
|
|
3982
4222
|
if (context === null) {
|
|
3983
4223
|
throw new Error("usePromptModal must be used within a PromptModal Provider");
|
|
3984
4224
|
}
|
|
@@ -3986,50 +4226,50 @@ function usePromptModal() {
|
|
|
3986
4226
|
}
|
|
3987
4227
|
|
|
3988
4228
|
// src/context/theme.tsx
|
|
3989
|
-
var
|
|
4229
|
+
var import_react34 = require("react");
|
|
3990
4230
|
|
|
3991
4231
|
// src/hooks/useTheme.ts
|
|
3992
|
-
var
|
|
4232
|
+
var import_react33 = require("react");
|
|
3993
4233
|
var THEME_KEY = "cerberus-theme";
|
|
3994
4234
|
var MODE_KEY = "cerberus-mode";
|
|
3995
4235
|
function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options = {}) {
|
|
3996
4236
|
const { updateMode, updateTheme, cache } = options;
|
|
3997
|
-
const [theme, setTheme] = (0,
|
|
3998
|
-
const [colorMode, setColorMode] = (0,
|
|
3999
|
-
const handleThemeChange = (0,
|
|
4237
|
+
const [theme, setTheme] = (0, import_react33.useState)(defaultTheme);
|
|
4238
|
+
const [colorMode, setColorMode] = (0, import_react33.useState)(defaultColorMode);
|
|
4239
|
+
const handleThemeChange = (0, import_react33.useCallback)(
|
|
4000
4240
|
(newTheme) => {
|
|
4001
4241
|
setTheme(newTheme);
|
|
4002
4242
|
updateTheme == null ? void 0 : updateTheme(newTheme);
|
|
4003
4243
|
},
|
|
4004
4244
|
[updateTheme]
|
|
4005
4245
|
);
|
|
4006
|
-
const handleColorModeChange = (0,
|
|
4246
|
+
const handleColorModeChange = (0, import_react33.useCallback)(
|
|
4007
4247
|
(newMode) => {
|
|
4008
4248
|
setColorMode(newMode);
|
|
4009
4249
|
updateMode == null ? void 0 : updateMode(newMode);
|
|
4010
4250
|
},
|
|
4011
4251
|
[updateMode]
|
|
4012
4252
|
);
|
|
4013
|
-
(0,
|
|
4253
|
+
(0, import_react33.useLayoutEffect)(() => {
|
|
4014
4254
|
const theme2 = localStorage.getItem(THEME_KEY);
|
|
4015
4255
|
if (theme2) {
|
|
4016
4256
|
setTheme(theme2);
|
|
4017
4257
|
}
|
|
4018
4258
|
}, []);
|
|
4019
|
-
(0,
|
|
4259
|
+
(0, import_react33.useLayoutEffect)(() => {
|
|
4020
4260
|
const mode = localStorage.getItem(MODE_KEY);
|
|
4021
4261
|
if (mode) {
|
|
4022
4262
|
setColorMode(mode);
|
|
4023
4263
|
}
|
|
4024
4264
|
}, []);
|
|
4025
|
-
(0,
|
|
4265
|
+
(0, import_react33.useEffect)(() => {
|
|
4026
4266
|
const root = document.documentElement;
|
|
4027
4267
|
root.dataset.pandaTheme = theme;
|
|
4028
4268
|
if (cache) {
|
|
4029
4269
|
localStorage.setItem(THEME_KEY, theme);
|
|
4030
4270
|
}
|
|
4031
4271
|
}, [theme, cache]);
|
|
4032
|
-
(0,
|
|
4272
|
+
(0, import_react33.useEffect)(() => {
|
|
4033
4273
|
const root = document.documentElement;
|
|
4034
4274
|
if (colorMode === "system") {
|
|
4035
4275
|
root.dataset.colorMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
@@ -4040,7 +4280,7 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
4040
4280
|
localStorage.setItem(MODE_KEY, colorMode);
|
|
4041
4281
|
}
|
|
4042
4282
|
}, [colorMode, cache]);
|
|
4043
|
-
return (0,
|
|
4283
|
+
return (0, import_react33.useMemo)(
|
|
4044
4284
|
() => ({
|
|
4045
4285
|
theme,
|
|
4046
4286
|
mode: colorMode,
|
|
@@ -4052,8 +4292,8 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
4052
4292
|
}
|
|
4053
4293
|
|
|
4054
4294
|
// src/context/theme.tsx
|
|
4055
|
-
var
|
|
4056
|
-
var ThemeContext = (0,
|
|
4295
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4296
|
+
var ThemeContext = (0, import_react34.createContext)(
|
|
4057
4297
|
null
|
|
4058
4298
|
);
|
|
4059
4299
|
function ThemeProvider(props) {
|
|
@@ -4062,10 +4302,10 @@ function ThemeProvider(props) {
|
|
|
4062
4302
|
updateMode: props.updateMode,
|
|
4063
4303
|
updateTheme: props.updateTheme
|
|
4064
4304
|
});
|
|
4065
|
-
return /* @__PURE__ */ (0,
|
|
4305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ThemeContext.Provider, { value: state, children: props.children });
|
|
4066
4306
|
}
|
|
4067
4307
|
function useThemeContext() {
|
|
4068
|
-
const context = (0,
|
|
4308
|
+
const context = (0, import_react34.useContext)(ThemeContext);
|
|
4069
4309
|
if (!context) {
|
|
4070
4310
|
throw new Error("useThemeContext must be used within a ThemeProvider");
|
|
4071
4311
|
}
|
|
@@ -4073,20 +4313,20 @@ function useThemeContext() {
|
|
|
4073
4313
|
}
|
|
4074
4314
|
|
|
4075
4315
|
// src/hooks/useRootColors.ts
|
|
4076
|
-
var
|
|
4316
|
+
var import_react35 = require("react");
|
|
4077
4317
|
function useRootColors(colors = []) {
|
|
4078
|
-
const [state, dispatch] = (0,
|
|
4079
|
-
const handleRefetch = (0,
|
|
4318
|
+
const [state, dispatch] = (0, import_react35.useReducer)(rootColorsReducer, {});
|
|
4319
|
+
const handleRefetch = (0, import_react35.useCallback)(() => {
|
|
4080
4320
|
return new Promise((resolve) => {
|
|
4081
4321
|
dispatch(formatColors(colors));
|
|
4082
4322
|
resolve();
|
|
4083
4323
|
});
|
|
4084
4324
|
}, []);
|
|
4085
|
-
(0,
|
|
4325
|
+
(0, import_react35.useEffect)(() => {
|
|
4086
4326
|
if (Object.keys(state).length === colors.length) return;
|
|
4087
4327
|
dispatch(formatColors(colors));
|
|
4088
4328
|
}, [colors]);
|
|
4089
|
-
return (0,
|
|
4329
|
+
return (0, import_react35.useMemo)(
|
|
4090
4330
|
() => ({ colors: state, refetch: handleRefetch }),
|
|
4091
4331
|
[state, handleRefetch]
|
|
4092
4332
|
);
|
|
@@ -4107,9 +4347,9 @@ function rootColorsReducer(state, action) {
|
|
|
4107
4347
|
}
|
|
4108
4348
|
|
|
4109
4349
|
// src/config/icons/checkbox.icons.tsx
|
|
4110
|
-
var
|
|
4350
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4111
4351
|
function CheckmarkIcon(props) {
|
|
4112
|
-
return /* @__PURE__ */ (0,
|
|
4352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4113
4353
|
"svg",
|
|
4114
4354
|
{
|
|
4115
4355
|
"aria-hidden": "true",
|
|
@@ -4118,7 +4358,7 @@ function CheckmarkIcon(props) {
|
|
|
4118
4358
|
role: "img",
|
|
4119
4359
|
viewBox: "0 0 24 24",
|
|
4120
4360
|
...props,
|
|
4121
|
-
children: /* @__PURE__ */ (0,
|
|
4361
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4122
4362
|
"path",
|
|
4123
4363
|
{
|
|
4124
4364
|
fill: "currentColor",
|
|
@@ -4129,7 +4369,7 @@ function CheckmarkIcon(props) {
|
|
|
4129
4369
|
);
|
|
4130
4370
|
}
|
|
4131
4371
|
function IndeterminateIcon(props) {
|
|
4132
|
-
return /* @__PURE__ */ (0,
|
|
4372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4133
4373
|
"svg",
|
|
4134
4374
|
{
|
|
4135
4375
|
"aria-hidden": "true",
|
|
@@ -4138,15 +4378,15 @@ function IndeterminateIcon(props) {
|
|
|
4138
4378
|
fill: "none",
|
|
4139
4379
|
viewBox: "0 0 24 24",
|
|
4140
4380
|
...props,
|
|
4141
|
-
children: /* @__PURE__ */ (0,
|
|
4381
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
|
|
4142
4382
|
}
|
|
4143
4383
|
);
|
|
4144
4384
|
}
|
|
4145
4385
|
|
|
4146
4386
|
// src/components/AnimatingUploadIcon.tsx
|
|
4147
|
-
var
|
|
4387
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
4148
4388
|
function AnimatingUploadIcon(props) {
|
|
4149
|
-
return /* @__PURE__ */ (0,
|
|
4389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4150
4390
|
"svg",
|
|
4151
4391
|
{
|
|
4152
4392
|
"aria-hidden": "true",
|
|
@@ -4154,7 +4394,7 @@ function AnimatingUploadIcon(props) {
|
|
|
4154
4394
|
width: props.size ?? "1em",
|
|
4155
4395
|
height: props.size ?? "1em",
|
|
4156
4396
|
viewBox: "0 0 24 24",
|
|
4157
|
-
children: /* @__PURE__ */ (0,
|
|
4397
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
4158
4398
|
"g",
|
|
4159
4399
|
{
|
|
4160
4400
|
fill: "none",
|
|
@@ -4163,14 +4403,14 @@ function AnimatingUploadIcon(props) {
|
|
|
4163
4403
|
strokeLinejoin: "round",
|
|
4164
4404
|
strokeWidth: 1.5,
|
|
4165
4405
|
children: [
|
|
4166
|
-
/* @__PURE__ */ (0,
|
|
4406
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4167
4407
|
"path",
|
|
4168
4408
|
{
|
|
4169
4409
|
"data-name": "animating-trail",
|
|
4170
4410
|
strokeDasharray: "2 4",
|
|
4171
4411
|
strokeDashoffset: 6,
|
|
4172
4412
|
d: "M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",
|
|
4173
|
-
children: /* @__PURE__ */ (0,
|
|
4413
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4174
4414
|
"animate",
|
|
4175
4415
|
{
|
|
4176
4416
|
attributeName: "stroke-dashoffset",
|
|
@@ -4181,14 +4421,14 @@ function AnimatingUploadIcon(props) {
|
|
|
4181
4421
|
)
|
|
4182
4422
|
}
|
|
4183
4423
|
),
|
|
4184
|
-
/* @__PURE__ */ (0,
|
|
4424
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4185
4425
|
"path",
|
|
4186
4426
|
{
|
|
4187
4427
|
"data-name": "half-circle",
|
|
4188
4428
|
strokeDasharray: 32,
|
|
4189
4429
|
strokeDashoffset: 32,
|
|
4190
4430
|
d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",
|
|
4191
|
-
children: /* @__PURE__ */ (0,
|
|
4431
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4192
4432
|
"animate",
|
|
4193
4433
|
{
|
|
4194
4434
|
fill: "freeze",
|
|
@@ -4200,7 +4440,7 @@ function AnimatingUploadIcon(props) {
|
|
|
4200
4440
|
)
|
|
4201
4441
|
}
|
|
4202
4442
|
),
|
|
4203
|
-
/* @__PURE__ */ (0,
|
|
4443
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4204
4444
|
"svg",
|
|
4205
4445
|
{
|
|
4206
4446
|
"aria-hidden": "true",
|
|
@@ -4210,7 +4450,7 @@ function AnimatingUploadIcon(props) {
|
|
|
4210
4450
|
x: "27%",
|
|
4211
4451
|
y: "27%",
|
|
4212
4452
|
viewBox: "0 0 24 24",
|
|
4213
|
-
children: /* @__PURE__ */ (0,
|
|
4453
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4214
4454
|
"polygon",
|
|
4215
4455
|
{
|
|
4216
4456
|
fill: "currentColor",
|
|
@@ -4218,7 +4458,7 @@ function AnimatingUploadIcon(props) {
|
|
|
4218
4458
|
strokeWidth: 0.8,
|
|
4219
4459
|
opacity: "1",
|
|
4220
4460
|
points: "3.7,6.7 7.5,2.9 7.5,15 8.5,15 8.5,2.9 12.3,6.7 13,6 8,1 3,6 ",
|
|
4221
|
-
children: /* @__PURE__ */ (0,
|
|
4461
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4222
4462
|
"animate",
|
|
4223
4463
|
{
|
|
4224
4464
|
fill: "freeze",
|
|
@@ -4285,6 +4525,25 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
4285
4525
|
CheckboxParts,
|
|
4286
4526
|
CheckboxRoot,
|
|
4287
4527
|
CircularProgress,
|
|
4528
|
+
ComboItemGroup,
|
|
4529
|
+
ComboItemText,
|
|
4530
|
+
ComboItemWithIndicator,
|
|
4531
|
+
Combobox,
|
|
4532
|
+
ComboboxClearTrigger,
|
|
4533
|
+
ComboboxContent,
|
|
4534
|
+
ComboboxControl,
|
|
4535
|
+
ComboboxInput,
|
|
4536
|
+
ComboboxItem,
|
|
4537
|
+
ComboboxItemGroup,
|
|
4538
|
+
ComboboxItemGroupLabel,
|
|
4539
|
+
ComboboxItemIndicator,
|
|
4540
|
+
ComboboxItemText,
|
|
4541
|
+
ComboboxLabel,
|
|
4542
|
+
ComboboxParts,
|
|
4543
|
+
ComboboxPositioner,
|
|
4544
|
+
ComboboxRoot,
|
|
4545
|
+
ComboboxStartIcon,
|
|
4546
|
+
ComboboxTrigger,
|
|
4288
4547
|
ConfirmModal,
|
|
4289
4548
|
DateFormats,
|
|
4290
4549
|
DatePicker,
|
|
@@ -4464,6 +4723,7 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
4464
4723
|
useNotificationCenter,
|
|
4465
4724
|
usePromptModal,
|
|
4466
4725
|
useRootColors,
|
|
4726
|
+
useStatefulCollection,
|
|
4467
4727
|
useTabsContext,
|
|
4468
4728
|
useTheme,
|
|
4469
4729
|
useThemeContext,
|