@locus-ui/components 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +84 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +39 -1
- package/dist/index.d.ts +39 -1
- package/dist/index.js +146 -55
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +314 -223
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1671,10 +1671,100 @@ var Container = React11.forwardRef((props, ref) => {
|
|
|
1671
1671
|
});
|
|
1672
1672
|
Container.displayName = "Container";
|
|
1673
1673
|
|
|
1674
|
-
// src/components/
|
|
1674
|
+
// src/components/flex/flex.tsx
|
|
1675
1675
|
import clsx14 from "clsx";
|
|
1676
1676
|
import * as React12 from "react";
|
|
1677
1677
|
|
|
1678
|
+
// src/components/flex/flex.props.ts
|
|
1679
|
+
var FlexGapValues = ["0", "1", "2", "3", "4", "5", "6", "8"];
|
|
1680
|
+
var FlexDirectionValues = [
|
|
1681
|
+
"row",
|
|
1682
|
+
"row-reverse",
|
|
1683
|
+
"column",
|
|
1684
|
+
"column-reverse"
|
|
1685
|
+
];
|
|
1686
|
+
var FlexJustifyValues = [
|
|
1687
|
+
"start",
|
|
1688
|
+
"end",
|
|
1689
|
+
"center",
|
|
1690
|
+
"between",
|
|
1691
|
+
"around",
|
|
1692
|
+
"evenly"
|
|
1693
|
+
];
|
|
1694
|
+
var FlexAlignValues = [
|
|
1695
|
+
"start",
|
|
1696
|
+
"end",
|
|
1697
|
+
"center",
|
|
1698
|
+
"stretch",
|
|
1699
|
+
"baseline"
|
|
1700
|
+
];
|
|
1701
|
+
var FlexWrapValues = ["nowrap", "wrap", "wrap-reverse"];
|
|
1702
|
+
var FlexPropsDefs = {
|
|
1703
|
+
/**
|
|
1704
|
+
* Sets the gap between flex items.
|
|
1705
|
+
*/
|
|
1706
|
+
gap: {
|
|
1707
|
+
type: "enum | string",
|
|
1708
|
+
values: FlexGapValues,
|
|
1709
|
+
dataAttr: "gap",
|
|
1710
|
+
responsive: true
|
|
1711
|
+
},
|
|
1712
|
+
/**
|
|
1713
|
+
* Sets the justification of flex items along the main axis.
|
|
1714
|
+
*/
|
|
1715
|
+
justify: {
|
|
1716
|
+
type: "enum",
|
|
1717
|
+
values: FlexJustifyValues,
|
|
1718
|
+
dataAttr: "justify",
|
|
1719
|
+
responsive: true
|
|
1720
|
+
},
|
|
1721
|
+
/**
|
|
1722
|
+
* Sets the direction of flex items.
|
|
1723
|
+
*/
|
|
1724
|
+
direction: {
|
|
1725
|
+
type: "enum",
|
|
1726
|
+
values: FlexDirectionValues,
|
|
1727
|
+
dataAttr: "direction",
|
|
1728
|
+
responsive: true
|
|
1729
|
+
},
|
|
1730
|
+
/**
|
|
1731
|
+
* Sets the alignment of flex items along the cross axis.
|
|
1732
|
+
*/
|
|
1733
|
+
align: {
|
|
1734
|
+
type: "enum",
|
|
1735
|
+
values: FlexAlignValues,
|
|
1736
|
+
dataAttr: "align",
|
|
1737
|
+
responsive: true
|
|
1738
|
+
},
|
|
1739
|
+
/**
|
|
1740
|
+
* Sets the wrapping behavior of flex items.
|
|
1741
|
+
*/
|
|
1742
|
+
wrap: {
|
|
1743
|
+
type: "enum",
|
|
1744
|
+
values: FlexWrapValues,
|
|
1745
|
+
dataAttr: "wrap",
|
|
1746
|
+
responsive: true
|
|
1747
|
+
}
|
|
1748
|
+
};
|
|
1749
|
+
|
|
1750
|
+
// src/components/flex/flex.tsx
|
|
1751
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1752
|
+
var Flex = React12.forwardRef((props, ref) => {
|
|
1753
|
+
const { className, dataAttrs, children, ...rest } = getComponentProps(
|
|
1754
|
+
props,
|
|
1755
|
+
FlexPropsDefs,
|
|
1756
|
+
MarginPropDefs,
|
|
1757
|
+
PaddingPropDefs,
|
|
1758
|
+
SpacingPropDef
|
|
1759
|
+
);
|
|
1760
|
+
return /* @__PURE__ */ jsx15("div", { ref, className: clsx14("flex", className), ...dataAttrs, ...rest, children });
|
|
1761
|
+
});
|
|
1762
|
+
Flex.displayName = "Flex";
|
|
1763
|
+
|
|
1764
|
+
// src/components/panel/panel.tsx
|
|
1765
|
+
import clsx15 from "clsx";
|
|
1766
|
+
import * as React13 from "react";
|
|
1767
|
+
|
|
1678
1768
|
// src/components/panel/panel.props.ts
|
|
1679
1769
|
var PanelVariants = ["solid", "outlined", "muted"];
|
|
1680
1770
|
var PanelPropsDefs = {
|
|
@@ -1700,8 +1790,8 @@ var PanelPropsDefs = {
|
|
|
1700
1790
|
};
|
|
1701
1791
|
|
|
1702
1792
|
// src/components/panel/panel.tsx
|
|
1703
|
-
import { jsx as
|
|
1704
|
-
var Panel =
|
|
1793
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1794
|
+
var Panel = React13.forwardRef((props, ref) => {
|
|
1705
1795
|
const { className, dataAttrs, children, ...rest } = getComponentProps(
|
|
1706
1796
|
props,
|
|
1707
1797
|
PanelPropsDefs,
|
|
@@ -1712,11 +1802,11 @@ var Panel = React12.forwardRef((props, ref) => {
|
|
|
1712
1802
|
RoundnessPropDef,
|
|
1713
1803
|
ColorPropDef
|
|
1714
1804
|
);
|
|
1715
|
-
return /* @__PURE__ */
|
|
1805
|
+
return /* @__PURE__ */ jsx16(
|
|
1716
1806
|
"div",
|
|
1717
1807
|
{
|
|
1718
1808
|
ref,
|
|
1719
|
-
className:
|
|
1809
|
+
className: clsx15("panel", className),
|
|
1720
1810
|
...dataAttrs,
|
|
1721
1811
|
...rest,
|
|
1722
1812
|
children
|
|
@@ -1726,16 +1816,16 @@ var Panel = React12.forwardRef((props, ref) => {
|
|
|
1726
1816
|
Panel.displayName = "Panel";
|
|
1727
1817
|
|
|
1728
1818
|
// src/components/portal/backdrop/portal-backdrop.tsx
|
|
1729
|
-
import
|
|
1730
|
-
import * as
|
|
1819
|
+
import clsx16 from "clsx";
|
|
1820
|
+
import * as React15 from "react";
|
|
1731
1821
|
|
|
1732
1822
|
// src/components/portal/portal-context.tsx
|
|
1733
|
-
import * as
|
|
1734
|
-
var PortalContext =
|
|
1823
|
+
import * as React14 from "react";
|
|
1824
|
+
var PortalContext = React14.createContext(
|
|
1735
1825
|
void 0
|
|
1736
1826
|
);
|
|
1737
1827
|
function usePortalContext() {
|
|
1738
|
-
const context =
|
|
1828
|
+
const context = React14.useContext(PortalContext);
|
|
1739
1829
|
if (!context) {
|
|
1740
1830
|
throw new Error("`usePortalContext` must be used within a `Portal.Root`");
|
|
1741
1831
|
}
|
|
@@ -1782,8 +1872,8 @@ var PortalBackdropPropsDefs = {
|
|
|
1782
1872
|
};
|
|
1783
1873
|
|
|
1784
1874
|
// src/components/portal/backdrop/portal-backdrop.tsx
|
|
1785
|
-
import { jsx as
|
|
1786
|
-
var PortalBackdrop =
|
|
1875
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1876
|
+
var PortalBackdrop = React15.forwardRef(
|
|
1787
1877
|
(props, ref) => {
|
|
1788
1878
|
const context = usePortalContext();
|
|
1789
1879
|
const { className, dataAttrs, ...rest } = getComponentProps(
|
|
@@ -1791,11 +1881,11 @@ var PortalBackdrop = React14.forwardRef(
|
|
|
1791
1881
|
PortalBackdropPropsDefs
|
|
1792
1882
|
);
|
|
1793
1883
|
if (!context.open) return null;
|
|
1794
|
-
return /* @__PURE__ */
|
|
1884
|
+
return /* @__PURE__ */ jsx17(
|
|
1795
1885
|
"div",
|
|
1796
1886
|
{
|
|
1797
1887
|
ref,
|
|
1798
|
-
className:
|
|
1888
|
+
className: clsx16("portal-backdrop", className),
|
|
1799
1889
|
...dataAttrs,
|
|
1800
1890
|
...rest
|
|
1801
1891
|
}
|
|
@@ -1805,17 +1895,17 @@ var PortalBackdrop = React14.forwardRef(
|
|
|
1805
1895
|
PortalBackdrop.displayName = "Portal.Backdrop";
|
|
1806
1896
|
|
|
1807
1897
|
// src/components/portal/content/portal-content.tsx
|
|
1808
|
-
import
|
|
1809
|
-
import * as
|
|
1898
|
+
import clsx17 from "clsx";
|
|
1899
|
+
import * as React18 from "react";
|
|
1810
1900
|
import ReactDOM from "react-dom";
|
|
1811
1901
|
|
|
1812
1902
|
// src/components/theme/theme-context.tsx
|
|
1813
|
-
import * as
|
|
1814
|
-
var ThemeContext =
|
|
1903
|
+
import * as React16 from "react";
|
|
1904
|
+
var ThemeContext = React16.createContext(
|
|
1815
1905
|
void 0
|
|
1816
1906
|
);
|
|
1817
1907
|
function useTheme() {
|
|
1818
|
-
const context =
|
|
1908
|
+
const context = React16.useContext(ThemeContext);
|
|
1819
1909
|
if (!context) {
|
|
1820
1910
|
throw new Error("`useTheme` must be used within a `Theme`");
|
|
1821
1911
|
}
|
|
@@ -1823,7 +1913,7 @@ function useTheme() {
|
|
|
1823
1913
|
}
|
|
1824
1914
|
|
|
1825
1915
|
// src/components/portal/utils/use-anchor-position.ts
|
|
1826
|
-
import * as
|
|
1916
|
+
import * as React17 from "react";
|
|
1827
1917
|
function useAnchorPosition({
|
|
1828
1918
|
anchorRef,
|
|
1829
1919
|
contentRef,
|
|
@@ -1833,9 +1923,9 @@ function useAnchorPosition({
|
|
|
1833
1923
|
alignOffset = 0,
|
|
1834
1924
|
enabled = true
|
|
1835
1925
|
}) {
|
|
1836
|
-
const [position, setPosition] =
|
|
1837
|
-
const [, _forceUpdate] =
|
|
1838
|
-
const updatePosition =
|
|
1926
|
+
const [position, setPosition] = React17.useState(null);
|
|
1927
|
+
const [, _forceUpdate] = React17.useReducer((x) => x + 1, 0);
|
|
1928
|
+
const updatePosition = React17.useCallback(() => {
|
|
1839
1929
|
const anchor = anchorRef.current;
|
|
1840
1930
|
const content = contentRef.current;
|
|
1841
1931
|
if (!anchor || !content || !enabled) {
|
|
@@ -1896,7 +1986,7 @@ function useAnchorPosition({
|
|
|
1896
1986
|
);
|
|
1897
1987
|
setPosition({ top, left });
|
|
1898
1988
|
}, [anchorRef, contentRef, side, align, sideOffset, alignOffset, enabled]);
|
|
1899
|
-
|
|
1989
|
+
React17.useEffect(() => {
|
|
1900
1990
|
if (!enabled) {
|
|
1901
1991
|
setPosition(null);
|
|
1902
1992
|
return;
|
|
@@ -1977,12 +2067,12 @@ var PortalContentPropsDefs = {
|
|
|
1977
2067
|
};
|
|
1978
2068
|
|
|
1979
2069
|
// src/components/portal/content/portal-content.tsx
|
|
1980
|
-
import { jsx as
|
|
1981
|
-
var PortalContent =
|
|
2070
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
2071
|
+
var PortalContent = React18.forwardRef(
|
|
1982
2072
|
(props, ref) => {
|
|
1983
2073
|
const portalContext = usePortalContext();
|
|
1984
|
-
const themeContext =
|
|
1985
|
-
const contentRef =
|
|
2074
|
+
const themeContext = React18.useContext(ThemeContext);
|
|
2075
|
+
const contentRef = React18.useRef(null);
|
|
1986
2076
|
const {
|
|
1987
2077
|
side = "bottom",
|
|
1988
2078
|
align = "center",
|
|
@@ -2004,7 +2094,7 @@ var PortalContent = React17.forwardRef(
|
|
|
2004
2094
|
alignOffset: parseInt(alignOffset, 10) || 0,
|
|
2005
2095
|
enabled: anchored && portalContext.open
|
|
2006
2096
|
});
|
|
2007
|
-
const setRefs =
|
|
2097
|
+
const setRefs = React18.useCallback(
|
|
2008
2098
|
(node) => {
|
|
2009
2099
|
contentRef.current = node;
|
|
2010
2100
|
if (typeof ref === "function") {
|
|
@@ -2015,7 +2105,7 @@ var PortalContent = React17.forwardRef(
|
|
|
2015
2105
|
},
|
|
2016
2106
|
[ref]
|
|
2017
2107
|
);
|
|
2018
|
-
|
|
2108
|
+
React18.useEffect(() => {
|
|
2019
2109
|
if (!portalContext.open) return;
|
|
2020
2110
|
function onKeyDown(e) {
|
|
2021
2111
|
if (e.key === "Escape") {
|
|
@@ -2027,7 +2117,7 @@ var PortalContent = React17.forwardRef(
|
|
|
2027
2117
|
document.removeEventListener("keydown", onKeyDown);
|
|
2028
2118
|
};
|
|
2029
2119
|
}, [portalContext.open, portalContext.onOpenChange]);
|
|
2030
|
-
|
|
2120
|
+
React18.useEffect(() => {
|
|
2031
2121
|
if (!portalContext.open || !anchored) return;
|
|
2032
2122
|
function onClickOutside(e) {
|
|
2033
2123
|
const target = e.target;
|
|
@@ -2062,11 +2152,11 @@ var PortalContent = React17.forwardRef(
|
|
|
2062
2152
|
left: anchorPosition.left
|
|
2063
2153
|
} : {}
|
|
2064
2154
|
};
|
|
2065
|
-
const portalContent = /* @__PURE__ */
|
|
2155
|
+
const portalContent = /* @__PURE__ */ jsx18(
|
|
2066
2156
|
"div",
|
|
2067
2157
|
{
|
|
2068
2158
|
ref: setRefs,
|
|
2069
|
-
className:
|
|
2159
|
+
className: clsx17("portal", className),
|
|
2070
2160
|
"data-appearance": themeContext?.appearance,
|
|
2071
2161
|
"data-radius": themeContext?.radius,
|
|
2072
2162
|
"data-roundness": themeContext?.roundness ?? "theme",
|
|
@@ -2077,7 +2167,7 @@ var PortalContent = React17.forwardRef(
|
|
|
2077
2167
|
onClick: anchored ? void 0 : () => portalContext.onOpenChange?.(false),
|
|
2078
2168
|
style: combinedStyle,
|
|
2079
2169
|
...dataAttrs,
|
|
2080
|
-
children: /* @__PURE__ */
|
|
2170
|
+
children: /* @__PURE__ */ jsx18(
|
|
2081
2171
|
"div",
|
|
2082
2172
|
{
|
|
2083
2173
|
className: "portal-content",
|
|
@@ -2087,23 +2177,23 @@ var PortalContent = React17.forwardRef(
|
|
|
2087
2177
|
)
|
|
2088
2178
|
}
|
|
2089
2179
|
);
|
|
2090
|
-
const content = themeContext ? /* @__PURE__ */
|
|
2180
|
+
const content = themeContext ? /* @__PURE__ */ jsx18(ThemeContext.Provider, { value: themeContext, children: portalContent }) : portalContent;
|
|
2091
2181
|
return ReactDOM.createPortal(content, container);
|
|
2092
2182
|
}
|
|
2093
2183
|
);
|
|
2094
2184
|
PortalContent.displayName = "Portal.Content";
|
|
2095
2185
|
|
|
2096
2186
|
// src/components/portal/root/portal-root.tsx
|
|
2097
|
-
import * as
|
|
2187
|
+
import * as React20 from "react";
|
|
2098
2188
|
|
|
2099
2189
|
// src/components/portal/trigger/portal-trigger.tsx
|
|
2100
|
-
import * as
|
|
2101
|
-
import { jsx as
|
|
2102
|
-
var PortalTrigger =
|
|
2190
|
+
import * as React19 from "react";
|
|
2191
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2192
|
+
var PortalTrigger = React19.forwardRef(
|
|
2103
2193
|
({ children, asChild, onClick, ...props }, ref) => {
|
|
2104
2194
|
const context = usePortalContext();
|
|
2105
|
-
const internalRef =
|
|
2106
|
-
|
|
2195
|
+
const internalRef = React19.useRef(null);
|
|
2196
|
+
React19.useEffect(() => {
|
|
2107
2197
|
if (internalRef.current) {
|
|
2108
2198
|
context.triggerRef.current = internalRef.current;
|
|
2109
2199
|
}
|
|
@@ -2112,7 +2202,7 @@ var PortalTrigger = React18.forwardRef(
|
|
|
2112
2202
|
context.onOpenChange?.(!context.open);
|
|
2113
2203
|
onClick?.(event);
|
|
2114
2204
|
};
|
|
2115
|
-
const setRefs =
|
|
2205
|
+
const setRefs = React19.useCallback(
|
|
2116
2206
|
(node) => {
|
|
2117
2207
|
internalRef.current = node;
|
|
2118
2208
|
if (typeof ref === "function") {
|
|
@@ -2124,14 +2214,14 @@ var PortalTrigger = React18.forwardRef(
|
|
|
2124
2214
|
},
|
|
2125
2215
|
[ref, context.triggerRef]
|
|
2126
2216
|
);
|
|
2127
|
-
if (asChild &&
|
|
2128
|
-
return
|
|
2217
|
+
if (asChild && React19.isValidElement(children)) {
|
|
2218
|
+
return React19.cloneElement(children, {
|
|
2129
2219
|
ref: setRefs,
|
|
2130
2220
|
onClick: handleClick,
|
|
2131
2221
|
...props
|
|
2132
2222
|
});
|
|
2133
2223
|
}
|
|
2134
|
-
return /* @__PURE__ */
|
|
2224
|
+
return /* @__PURE__ */ jsx19(
|
|
2135
2225
|
"button",
|
|
2136
2226
|
{
|
|
2137
2227
|
ref: setRefs,
|
|
@@ -2170,7 +2260,7 @@ var PortalRootPropsDefs = {
|
|
|
2170
2260
|
};
|
|
2171
2261
|
|
|
2172
2262
|
// src/components/portal/root/portal-root.tsx
|
|
2173
|
-
import { jsx as
|
|
2263
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
2174
2264
|
var ALLOWED_CHILDREN4 = [
|
|
2175
2265
|
PortalTrigger.displayName,
|
|
2176
2266
|
PortalBackdrop.displayName,
|
|
@@ -2189,8 +2279,8 @@ var PortalRoot = (props) => {
|
|
|
2189
2279
|
defaultValue: defaultOpen,
|
|
2190
2280
|
onChange: onOpenChange
|
|
2191
2281
|
});
|
|
2192
|
-
const triggerRef =
|
|
2193
|
-
const value =
|
|
2282
|
+
const triggerRef = React20.useRef(null);
|
|
2283
|
+
const value = React20.useMemo(
|
|
2194
2284
|
() => ({
|
|
2195
2285
|
open,
|
|
2196
2286
|
onOpenChange: setOpen,
|
|
@@ -2202,7 +2292,7 @@ var PortalRoot = (props) => {
|
|
|
2202
2292
|
const validChildren = filterChildren(children, ALLOWED_CHILDREN4, {
|
|
2203
2293
|
parentDisplayName: PortalRoot.displayName
|
|
2204
2294
|
});
|
|
2205
|
-
return /* @__PURE__ */
|
|
2295
|
+
return /* @__PURE__ */ jsx20(PortalContext.Provider, { value, children: validChildren });
|
|
2206
2296
|
};
|
|
2207
2297
|
PortalRoot.displayName = "Portal.Root";
|
|
2208
2298
|
|
|
@@ -2219,12 +2309,12 @@ var Portal = {
|
|
|
2219
2309
|
};
|
|
2220
2310
|
|
|
2221
2311
|
// src/components/progress-bar/fill/progress-bar-fill.tsx
|
|
2222
|
-
import
|
|
2312
|
+
import clsx18 from "clsx";
|
|
2223
2313
|
import { useContext as useContext4 } from "react";
|
|
2224
2314
|
|
|
2225
2315
|
// src/components/progress-bar/progress-bar-context.ts
|
|
2226
|
-
import
|
|
2227
|
-
var ProgressBarContext =
|
|
2316
|
+
import React21 from "react";
|
|
2317
|
+
var ProgressBarContext = React21.createContext(null);
|
|
2228
2318
|
|
|
2229
2319
|
// src/components/progress-bar/fill/progress-bar-fill.props.ts
|
|
2230
2320
|
var ProgressBarFillPropsDefs = {
|
|
@@ -2238,17 +2328,17 @@ var ProgressBarFillPropsDefs = {
|
|
|
2238
2328
|
};
|
|
2239
2329
|
|
|
2240
2330
|
// src/components/progress-bar/fill/progress-bar-fill.tsx
|
|
2241
|
-
import { jsx as
|
|
2331
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
2242
2332
|
var ProgressBarFill = (props) => {
|
|
2243
2333
|
const context = useContext4(ProgressBarContext);
|
|
2244
2334
|
const { value, color, style, className, dataAttrs, ...rest } = getComponentProps(props, ProgressBarFillPropsDefs);
|
|
2245
|
-
return /* @__PURE__ */
|
|
2335
|
+
return /* @__PURE__ */ jsx21(
|
|
2246
2336
|
"div",
|
|
2247
2337
|
{
|
|
2248
2338
|
"data-color": color ?? context?.color,
|
|
2249
2339
|
"data-variant": context?.variant,
|
|
2250
2340
|
style: { ...style, width: `${(value ?? 0) / ((context?.totalValue ?? 0) > 1 ? context.totalValue : 1) * 100}%` },
|
|
2251
|
-
className:
|
|
2341
|
+
className: clsx18("progress-bar-fill", className),
|
|
2252
2342
|
...dataAttrs,
|
|
2253
2343
|
...rest
|
|
2254
2344
|
}
|
|
@@ -2257,8 +2347,8 @@ var ProgressBarFill = (props) => {
|
|
|
2257
2347
|
ProgressBarFill.displayName = "ProgressBar.Fill";
|
|
2258
2348
|
|
|
2259
2349
|
// src/components/progress-bar/root/progress-bar-root.tsx
|
|
2260
|
-
import
|
|
2261
|
-
import
|
|
2350
|
+
import clsx19 from "clsx";
|
|
2351
|
+
import React22, { isValidElement as isValidElement4, useMemo as useMemo5 } from "react";
|
|
2262
2352
|
|
|
2263
2353
|
// src/components/progress-bar/root/progress-bar-root.props.ts
|
|
2264
2354
|
var ProgressBarVariants = ["solid", "outlined", "muted"];
|
|
@@ -2281,7 +2371,7 @@ var ProgressBarRootPropsDefs = {
|
|
|
2281
2371
|
};
|
|
2282
2372
|
|
|
2283
2373
|
// src/components/progress-bar/root/progress-bar-root.tsx
|
|
2284
|
-
import { jsx as
|
|
2374
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
2285
2375
|
var ALLOWED_CHILDREN5 = [ProgressBarFill.displayName];
|
|
2286
2376
|
var ProgressBarRoot = (props) => {
|
|
2287
2377
|
const { value, size, color, variant, className, dataAttrs, ...rest } = getComponentProps(
|
|
@@ -2308,20 +2398,20 @@ var ProgressBarRoot = (props) => {
|
|
|
2308
2398
|
};
|
|
2309
2399
|
}
|
|
2310
2400
|
return {
|
|
2311
|
-
fills: [/* @__PURE__ */
|
|
2401
|
+
fills: [/* @__PURE__ */ jsx22(ProgressBarFill, { color, value })],
|
|
2312
2402
|
totalValue: value ?? 0
|
|
2313
2403
|
};
|
|
2314
2404
|
}, [validChildren, color, value]);
|
|
2315
|
-
return /* @__PURE__ */
|
|
2405
|
+
return /* @__PURE__ */ jsx22(ProgressBarContext.Provider, { value: { color, variant, totalValue }, children: /* @__PURE__ */ jsx22(
|
|
2316
2406
|
"div",
|
|
2317
2407
|
{
|
|
2318
2408
|
"data-size": size,
|
|
2319
2409
|
"data-color": color,
|
|
2320
2410
|
"data-variant": variant,
|
|
2321
|
-
className:
|
|
2411
|
+
className: clsx19("progress-bar-root", className),
|
|
2322
2412
|
...dataAttrs,
|
|
2323
2413
|
...rest,
|
|
2324
|
-
children: fills.map((fill, index) => /* @__PURE__ */
|
|
2414
|
+
children: fills.map((fill, index) => /* @__PURE__ */ jsx22(React22.Fragment, { children: fill }, index))
|
|
2325
2415
|
}
|
|
2326
2416
|
) });
|
|
2327
2417
|
};
|
|
@@ -2340,16 +2430,16 @@ var ProgressBar = Object.assign(ProgressBarRoot, {
|
|
|
2340
2430
|
});
|
|
2341
2431
|
|
|
2342
2432
|
// src/components/select/content/select-content.tsx
|
|
2343
|
-
import
|
|
2344
|
-
import * as
|
|
2433
|
+
import clsx21 from "clsx";
|
|
2434
|
+
import * as React26 from "react";
|
|
2345
2435
|
|
|
2346
2436
|
// src/components/select/select-context.tsx
|
|
2347
|
-
import * as
|
|
2348
|
-
var SelectContext =
|
|
2437
|
+
import * as React23 from "react";
|
|
2438
|
+
var SelectContext = React23.createContext(
|
|
2349
2439
|
null
|
|
2350
2440
|
);
|
|
2351
2441
|
function useSelectContext() {
|
|
2352
|
-
const context =
|
|
2442
|
+
const context = React23.useContext(SelectContext);
|
|
2353
2443
|
if (!context) {
|
|
2354
2444
|
throw new Error("Select components must be used within a Select.Root");
|
|
2355
2445
|
}
|
|
@@ -2357,9 +2447,9 @@ function useSelectContext() {
|
|
|
2357
2447
|
}
|
|
2358
2448
|
|
|
2359
2449
|
// src/components/select/utils/user-composed-refs.ts
|
|
2360
|
-
import * as
|
|
2450
|
+
import * as React24 from "react";
|
|
2361
2451
|
function useComposedRefs(...refs) {
|
|
2362
|
-
return
|
|
2452
|
+
return React24.useCallback(
|
|
2363
2453
|
(node) => {
|
|
2364
2454
|
refs.forEach((ref) => {
|
|
2365
2455
|
if (typeof ref === "function") {
|
|
@@ -2374,20 +2464,20 @@ function useComposedRefs(...refs) {
|
|
|
2374
2464
|
}
|
|
2375
2465
|
|
|
2376
2466
|
// src/components/select/viewport/select-viewport.tsx
|
|
2377
|
-
import
|
|
2378
|
-
import * as
|
|
2379
|
-
import { jsx as
|
|
2380
|
-
var SelectViewport =
|
|
2467
|
+
import clsx20 from "clsx";
|
|
2468
|
+
import * as React25 from "react";
|
|
2469
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2470
|
+
var SelectViewport = React25.forwardRef(
|
|
2381
2471
|
(props, ref) => {
|
|
2382
2472
|
const { className, children, ...rest } = props;
|
|
2383
|
-
return /* @__PURE__ */
|
|
2473
|
+
return /* @__PURE__ */ jsx23("div", { ref, className: clsx20("select-viewport", className), ...rest, children });
|
|
2384
2474
|
}
|
|
2385
2475
|
);
|
|
2386
2476
|
SelectViewport.displayName = "Select.Viewport";
|
|
2387
2477
|
|
|
2388
2478
|
// src/components/select/content/select-content.tsx
|
|
2389
|
-
import { jsx as
|
|
2390
|
-
var SelectContent =
|
|
2479
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2480
|
+
var SelectContent = React26.forwardRef(
|
|
2391
2481
|
(props, forwardedRef) => {
|
|
2392
2482
|
const {
|
|
2393
2483
|
className,
|
|
@@ -2400,10 +2490,10 @@ var SelectContent = React25.forwardRef(
|
|
|
2400
2490
|
} = props;
|
|
2401
2491
|
const context = useSelectContext();
|
|
2402
2492
|
const composedRef = useComposedRefs(forwardedRef, context.contentRef);
|
|
2403
|
-
|
|
2493
|
+
React26.useEffect(() => {
|
|
2404
2494
|
context.itemValues.current = [];
|
|
2405
2495
|
}, [context.open]);
|
|
2406
|
-
|
|
2496
|
+
React26.useEffect(() => {
|
|
2407
2497
|
if (!context.open) return;
|
|
2408
2498
|
const handleClickOutside = (event) => {
|
|
2409
2499
|
const target = event.target;
|
|
@@ -2414,7 +2504,7 @@ var SelectContent = React25.forwardRef(
|
|
|
2414
2504
|
document.addEventListener("mousedown", handleClickOutside);
|
|
2415
2505
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
2416
2506
|
}, [context.open]);
|
|
2417
|
-
|
|
2507
|
+
React26.useEffect(() => {
|
|
2418
2508
|
if (!context.open) return;
|
|
2419
2509
|
const handleKeyDown = (event) => {
|
|
2420
2510
|
const items = context.itemValues.current;
|
|
@@ -2467,24 +2557,24 @@ var SelectContent = React25.forwardRef(
|
|
|
2467
2557
|
document.addEventListener("keydown", handleKeyDown);
|
|
2468
2558
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
2469
2559
|
}, [context.open, context.highlightedIndex]);
|
|
2470
|
-
const [contentWidth, setContentWidth] =
|
|
2560
|
+
const [contentWidth, setContentWidth] = React26.useState();
|
|
2471
2561
|
const labelInside = context.labelPosition === "inside";
|
|
2472
2562
|
const anchorRef = labelInside ? context.rootRef : context.triggerRef;
|
|
2473
|
-
|
|
2563
|
+
React26.useLayoutEffect(() => {
|
|
2474
2564
|
if (context.open && anchorRef.current) {
|
|
2475
2565
|
setContentWidth(anchorRef.current.getBoundingClientRect().width);
|
|
2476
2566
|
}
|
|
2477
2567
|
}, [context.open, context.labelPosition, anchorRef]);
|
|
2478
2568
|
if (!context.open) {
|
|
2479
|
-
return /* @__PURE__ */
|
|
2569
|
+
return /* @__PURE__ */ jsx24("div", { style: { display: "none" }, "aria-hidden": "true", children });
|
|
2480
2570
|
}
|
|
2481
|
-
return /* @__PURE__ */
|
|
2571
|
+
return /* @__PURE__ */ jsx24(
|
|
2482
2572
|
Portal.Root,
|
|
2483
2573
|
{
|
|
2484
2574
|
open: context.open,
|
|
2485
2575
|
onOpenChange: context.onOpenChange,
|
|
2486
2576
|
anchorRef,
|
|
2487
|
-
children: /* @__PURE__ */
|
|
2577
|
+
children: /* @__PURE__ */ jsx24(Portal.Content, { anchored: true, side, align, sideOffset: offset, children: /* @__PURE__ */ jsx24(
|
|
2488
2578
|
"div",
|
|
2489
2579
|
{
|
|
2490
2580
|
ref: composedRef,
|
|
@@ -2493,10 +2583,10 @@ var SelectContent = React25.forwardRef(
|
|
|
2493
2583
|
"data-side": side,
|
|
2494
2584
|
"data-align": align,
|
|
2495
2585
|
"data-trigger-variant": context.triggerVariant,
|
|
2496
|
-
className:
|
|
2586
|
+
className: clsx21("select-content", className),
|
|
2497
2587
|
style: { width: contentWidth },
|
|
2498
2588
|
...rest,
|
|
2499
|
-
children: /* @__PURE__ */
|
|
2589
|
+
children: /* @__PURE__ */ jsx24(SelectViewport, { children })
|
|
2500
2590
|
}
|
|
2501
2591
|
) })
|
|
2502
2592
|
}
|
|
@@ -2506,8 +2596,8 @@ var SelectContent = React25.forwardRef(
|
|
|
2506
2596
|
SelectContent.displayName = "Select.Content";
|
|
2507
2597
|
|
|
2508
2598
|
// src/components/select/group/select-group.tsx
|
|
2509
|
-
import
|
|
2510
|
-
import * as
|
|
2599
|
+
import clsx22 from "clsx";
|
|
2600
|
+
import * as React27 from "react";
|
|
2511
2601
|
|
|
2512
2602
|
// src/components/select/group/select-group.props.ts
|
|
2513
2603
|
var SelectGroupsPropDefs = {
|
|
@@ -2517,8 +2607,8 @@ var SelectGroupsPropDefs = {
|
|
|
2517
2607
|
};
|
|
2518
2608
|
|
|
2519
2609
|
// src/components/select/group/select-group.tsx
|
|
2520
|
-
import { jsx as
|
|
2521
|
-
var SelectGroup =
|
|
2610
|
+
import { jsx as jsx25, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2611
|
+
var SelectGroup = React27.forwardRef(
|
|
2522
2612
|
(props, ref) => {
|
|
2523
2613
|
const { className, children, dataAttrs, ...rest } = getComponentProps(
|
|
2524
2614
|
props,
|
|
@@ -2529,10 +2619,10 @@ var SelectGroup = React26.forwardRef(
|
|
|
2529
2619
|
{
|
|
2530
2620
|
ref,
|
|
2531
2621
|
role: "group",
|
|
2532
|
-
className:
|
|
2622
|
+
className: clsx22("select-group", className),
|
|
2533
2623
|
...rest,
|
|
2534
2624
|
children: [
|
|
2535
|
-
/* @__PURE__ */
|
|
2625
|
+
/* @__PURE__ */ jsx25(Text, { className: "select-group-label", disabled: true, children: props.title }),
|
|
2536
2626
|
children
|
|
2537
2627
|
]
|
|
2538
2628
|
}
|
|
@@ -2542,13 +2632,13 @@ var SelectGroup = React26.forwardRef(
|
|
|
2542
2632
|
SelectGroup.displayName = "Select.Group";
|
|
2543
2633
|
|
|
2544
2634
|
// src/components/select/item/select-item.tsx
|
|
2545
|
-
import
|
|
2546
|
-
import * as
|
|
2635
|
+
import clsx23 from "clsx";
|
|
2636
|
+
import * as React28 from "react";
|
|
2547
2637
|
|
|
2548
2638
|
// src/components/select/item/select-item-indicator.tsx
|
|
2549
|
-
import { jsx as
|
|
2639
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2550
2640
|
var SelectItemIndicator = () => {
|
|
2551
|
-
return /* @__PURE__ */
|
|
2641
|
+
return /* @__PURE__ */ jsx26("span", { className: "select-item-indicator", children: /* @__PURE__ */ jsx26(
|
|
2552
2642
|
"svg",
|
|
2553
2643
|
{
|
|
2554
2644
|
width: "20",
|
|
@@ -2556,7 +2646,7 @@ var SelectItemIndicator = () => {
|
|
|
2556
2646
|
viewBox: "0 0 15 15",
|
|
2557
2647
|
fill: "none",
|
|
2558
2648
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2559
|
-
children: /* @__PURE__ */
|
|
2649
|
+
children: /* @__PURE__ */ jsx26(
|
|
2560
2650
|
"path",
|
|
2561
2651
|
{
|
|
2562
2652
|
d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
|
|
@@ -2581,8 +2671,8 @@ var SelectItemPropDefs = {
|
|
|
2581
2671
|
};
|
|
2582
2672
|
|
|
2583
2673
|
// src/components/select/item/select-item.tsx
|
|
2584
|
-
import { jsx as
|
|
2585
|
-
var SelectItem =
|
|
2674
|
+
import { jsx as jsx27, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2675
|
+
var SelectItem = React28.forwardRef(
|
|
2586
2676
|
(props, ref) => {
|
|
2587
2677
|
const context = useSelectContext();
|
|
2588
2678
|
const { value, disabled, children, className, ...rest } = getComponentProps(
|
|
@@ -2590,12 +2680,12 @@ var SelectItem = React27.forwardRef(
|
|
|
2590
2680
|
SelectItemPropDefs
|
|
2591
2681
|
);
|
|
2592
2682
|
const selected = context.value === value;
|
|
2593
|
-
|
|
2683
|
+
React28.useEffect(() => {
|
|
2594
2684
|
if (selected && children) {
|
|
2595
2685
|
context.setDisplayValue(children);
|
|
2596
2686
|
}
|
|
2597
2687
|
}, [selected]);
|
|
2598
|
-
|
|
2688
|
+
React28.useEffect(() => {
|
|
2599
2689
|
if (!value) return;
|
|
2600
2690
|
if (!disabled) {
|
|
2601
2691
|
const values = context.itemValues.current;
|
|
@@ -2634,20 +2724,20 @@ var SelectItem = React27.forwardRef(
|
|
|
2634
2724
|
"data-state": selected ? "checked" : "unchecked",
|
|
2635
2725
|
"data-highlighted": isHighlighted ? "" : void 0,
|
|
2636
2726
|
"data-disabled": disabled ? "" : void 0,
|
|
2637
|
-
className:
|
|
2727
|
+
className: clsx23("select-item", className),
|
|
2638
2728
|
onClick: handleClick,
|
|
2639
2729
|
onMouseEnter: handleMouseEnter,
|
|
2640
2730
|
...rest,
|
|
2641
2731
|
children: [
|
|
2642
|
-
/* @__PURE__ */
|
|
2732
|
+
/* @__PURE__ */ jsx27(
|
|
2643
2733
|
Box,
|
|
2644
2734
|
{
|
|
2645
2735
|
style: { width: 24, height: 24, justifyContent: "center" },
|
|
2646
2736
|
className: "flex items-center",
|
|
2647
|
-
children: selected && /* @__PURE__ */
|
|
2737
|
+
children: selected && /* @__PURE__ */ jsx27(SelectItemIndicator, {})
|
|
2648
2738
|
}
|
|
2649
2739
|
),
|
|
2650
|
-
/* @__PURE__ */
|
|
2740
|
+
/* @__PURE__ */ jsx27(Text, { disabled, children })
|
|
2651
2741
|
]
|
|
2652
2742
|
}
|
|
2653
2743
|
);
|
|
@@ -2656,8 +2746,8 @@ var SelectItem = React27.forwardRef(
|
|
|
2656
2746
|
SelectItem.displayName = "Select.Item";
|
|
2657
2747
|
|
|
2658
2748
|
// src/components/select/label/select-label.tsx
|
|
2659
|
-
import
|
|
2660
|
-
import * as
|
|
2749
|
+
import clsx24 from "clsx";
|
|
2750
|
+
import * as React29 from "react";
|
|
2661
2751
|
|
|
2662
2752
|
// src/components/select/label/select-label.props.ts
|
|
2663
2753
|
var labelPositions2 = ["top", "left", "inside"];
|
|
@@ -2671,25 +2761,25 @@ var SelectLabelPropDefs = {
|
|
|
2671
2761
|
};
|
|
2672
2762
|
|
|
2673
2763
|
// src/components/select/label/select-label.tsx
|
|
2674
|
-
import { jsx as
|
|
2675
|
-
var SelectLabel =
|
|
2764
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2765
|
+
var SelectLabel = React29.forwardRef(
|
|
2676
2766
|
(props, ref) => {
|
|
2677
2767
|
const context = useSelectContext();
|
|
2678
2768
|
const { className, children, position, dataAttrs } = getComponentProps(
|
|
2679
2769
|
props,
|
|
2680
2770
|
SelectLabelPropDefs
|
|
2681
2771
|
);
|
|
2682
|
-
|
|
2772
|
+
React29.useLayoutEffect(() => {
|
|
2683
2773
|
context.setLabelPosition?.(position ?? "top");
|
|
2684
2774
|
}, [position, context.setLabelPosition]);
|
|
2685
|
-
return /* @__PURE__ */
|
|
2775
|
+
return /* @__PURE__ */ jsx28(
|
|
2686
2776
|
"label",
|
|
2687
2777
|
{
|
|
2688
2778
|
ref,
|
|
2689
2779
|
htmlFor: context.labelId,
|
|
2690
|
-
className:
|
|
2780
|
+
className: clsx24("select-label", className),
|
|
2691
2781
|
...dataAttrs,
|
|
2692
|
-
children: /* @__PURE__ */
|
|
2782
|
+
children: /* @__PURE__ */ jsx28(Text, { disabled: context.disabled, children })
|
|
2693
2783
|
}
|
|
2694
2784
|
);
|
|
2695
2785
|
}
|
|
@@ -2697,7 +2787,7 @@ var SelectLabel = React28.forwardRef(
|
|
|
2697
2787
|
SelectLabel.displayName = "Select.Label";
|
|
2698
2788
|
|
|
2699
2789
|
// src/components/select/root/select-root.tsx
|
|
2700
|
-
import
|
|
2790
|
+
import clsx28 from "clsx";
|
|
2701
2791
|
import {
|
|
2702
2792
|
useId as useId2,
|
|
2703
2793
|
useLayoutEffect as useLayoutEffect3,
|
|
@@ -2707,26 +2797,26 @@ import {
|
|
|
2707
2797
|
} from "react";
|
|
2708
2798
|
|
|
2709
2799
|
// src/components/select/trigger/select-trigger.tsx
|
|
2710
|
-
import
|
|
2711
|
-
import * as
|
|
2800
|
+
import clsx27 from "clsx";
|
|
2801
|
+
import * as React31 from "react";
|
|
2712
2802
|
|
|
2713
2803
|
// src/components/select/value/select-value.tsx
|
|
2714
|
-
import
|
|
2715
|
-
import * as
|
|
2716
|
-
import { jsx as
|
|
2717
|
-
var SelectValue =
|
|
2804
|
+
import clsx25 from "clsx";
|
|
2805
|
+
import * as React30 from "react";
|
|
2806
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2807
|
+
var SelectValue = React30.forwardRef(
|
|
2718
2808
|
(props, ref) => {
|
|
2719
2809
|
const { className, placeholder: placeholderProp, ...rest } = props;
|
|
2720
2810
|
const context = useSelectContext();
|
|
2721
2811
|
const placeholder = placeholderProp ?? context.placeholder;
|
|
2722
|
-
return /* @__PURE__ */
|
|
2812
|
+
return /* @__PURE__ */ jsx29(
|
|
2723
2813
|
"span",
|
|
2724
2814
|
{
|
|
2725
2815
|
ref,
|
|
2726
|
-
className:
|
|
2816
|
+
className: clsx25("select-value", className),
|
|
2727
2817
|
"data-placeholder": !context.value ? "" : void 0,
|
|
2728
2818
|
...rest,
|
|
2729
|
-
children: /* @__PURE__ */
|
|
2819
|
+
children: /* @__PURE__ */ jsx29(Text, { disabled: context.disabled, children: context.displayValue || placeholder })
|
|
2730
2820
|
}
|
|
2731
2821
|
);
|
|
2732
2822
|
}
|
|
@@ -2734,21 +2824,21 @@ var SelectValue = React29.forwardRef(
|
|
|
2734
2824
|
SelectValue.displayName = "Select.Value";
|
|
2735
2825
|
|
|
2736
2826
|
// src/components/select/trigger/select-trigger-icon.tsx
|
|
2737
|
-
import
|
|
2738
|
-
import { jsx as
|
|
2827
|
+
import clsx26 from "clsx";
|
|
2828
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2739
2829
|
var SelectTriggerIcon = (props) => {
|
|
2740
2830
|
const { className, ...rest } = props;
|
|
2741
|
-
return /* @__PURE__ */
|
|
2831
|
+
return /* @__PURE__ */ jsx30(
|
|
2742
2832
|
"svg",
|
|
2743
2833
|
{
|
|
2744
|
-
className:
|
|
2834
|
+
className: clsx26("select-trigger-icon", className),
|
|
2745
2835
|
width: "20",
|
|
2746
2836
|
height: "20",
|
|
2747
2837
|
viewBox: "0 0 15 15",
|
|
2748
2838
|
fill: "none",
|
|
2749
2839
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2750
2840
|
...rest,
|
|
2751
|
-
children: /* @__PURE__ */
|
|
2841
|
+
children: /* @__PURE__ */ jsx30(
|
|
2752
2842
|
"path",
|
|
2753
2843
|
{
|
|
2754
2844
|
d: "M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z",
|
|
@@ -2765,8 +2855,8 @@ var SelectTriggerIcon = (props) => {
|
|
|
2765
2855
|
var SelectTriggerPropsDefs = {};
|
|
2766
2856
|
|
|
2767
2857
|
// src/components/select/trigger/select-trigger.tsx
|
|
2768
|
-
import { jsx as
|
|
2769
|
-
var SelectTrigger =
|
|
2858
|
+
import { jsx as jsx31, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2859
|
+
var SelectTrigger = React31.forwardRef(
|
|
2770
2860
|
(props, forwardedRef) => {
|
|
2771
2861
|
const {
|
|
2772
2862
|
className,
|
|
@@ -2802,11 +2892,11 @@ var SelectTrigger = React30.forwardRef(
|
|
|
2802
2892
|
"data-state": context.open ? "open" : "closed",
|
|
2803
2893
|
"data-disabled": disabled ? "" : void 0,
|
|
2804
2894
|
"data-variant": context.triggerVariant,
|
|
2805
|
-
className:
|
|
2895
|
+
className: clsx27("select-trigger", className),
|
|
2806
2896
|
...dataAttrs,
|
|
2807
2897
|
children: [
|
|
2808
|
-
/* @__PURE__ */
|
|
2809
|
-
/* @__PURE__ */
|
|
2898
|
+
/* @__PURE__ */ jsx31(SelectValue, {}),
|
|
2899
|
+
/* @__PURE__ */ jsx31(SelectTriggerIcon, {})
|
|
2810
2900
|
]
|
|
2811
2901
|
}
|
|
2812
2902
|
);
|
|
@@ -2823,14 +2913,14 @@ var SelectTrigger = React30.forwardRef(
|
|
|
2823
2913
|
disabled,
|
|
2824
2914
|
"data-state": context.open ? "open" : "closed",
|
|
2825
2915
|
"data-disabled": disabled ? "" : void 0,
|
|
2826
|
-
className:
|
|
2916
|
+
className: clsx27("select-trigger", className),
|
|
2827
2917
|
onClick: handleClick,
|
|
2828
2918
|
onKeyDown: handleKeyDown,
|
|
2829
2919
|
"data-variant": context.triggerVariant,
|
|
2830
2920
|
...dataAttrs,
|
|
2831
2921
|
children: [
|
|
2832
|
-
/* @__PURE__ */
|
|
2833
|
-
/* @__PURE__ */
|
|
2922
|
+
/* @__PURE__ */ jsx31(SelectValue, {}),
|
|
2923
|
+
/* @__PURE__ */ jsx31(SelectTriggerIcon, {})
|
|
2834
2924
|
]
|
|
2835
2925
|
}
|
|
2836
2926
|
);
|
|
@@ -2870,7 +2960,7 @@ var SelectRootPropsDefs = {
|
|
|
2870
2960
|
};
|
|
2871
2961
|
|
|
2872
2962
|
// src/components/select/root/select-root.tsx
|
|
2873
|
-
import { jsx as
|
|
2963
|
+
import { jsx as jsx32, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2874
2964
|
var ALLOWED_CHILDREN6 = [
|
|
2875
2965
|
SelectLabel.displayName,
|
|
2876
2966
|
SelectTrigger.displayName,
|
|
@@ -2976,7 +3066,7 @@ var SelectRoot = (props) => {
|
|
|
2976
3066
|
}
|
|
2977
3067
|
};
|
|
2978
3068
|
if (labelInside) {
|
|
2979
|
-
return /* @__PURE__ */
|
|
3069
|
+
return /* @__PURE__ */ jsx32(SelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs8(
|
|
2980
3070
|
"button",
|
|
2981
3071
|
{
|
|
2982
3072
|
type: "button",
|
|
@@ -2988,26 +3078,26 @@ var SelectRoot = (props) => {
|
|
|
2988
3078
|
ref: rootRef,
|
|
2989
3079
|
"data-state": open ? "open" : "closed",
|
|
2990
3080
|
"data-disabled": disabled ? "" : void 0,
|
|
2991
|
-
className:
|
|
3081
|
+
className: clsx28("select-root", className),
|
|
2992
3082
|
onClick: handleClick,
|
|
2993
3083
|
onKeyDown: handleKeyDown,
|
|
2994
3084
|
...dataAttrs,
|
|
2995
3085
|
children: [
|
|
2996
3086
|
validChildren,
|
|
2997
|
-
name && /* @__PURE__ */
|
|
3087
|
+
name && /* @__PURE__ */ jsx32("input", { type: "hidden", name, value })
|
|
2998
3088
|
]
|
|
2999
3089
|
}
|
|
3000
3090
|
) });
|
|
3001
3091
|
}
|
|
3002
|
-
return /* @__PURE__ */
|
|
3092
|
+
return /* @__PURE__ */ jsx32(SelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs8(
|
|
3003
3093
|
Box,
|
|
3004
3094
|
{
|
|
3005
3095
|
ref: rootRef,
|
|
3006
|
-
className:
|
|
3096
|
+
className: clsx28("select-root", className),
|
|
3007
3097
|
...dataAttrs,
|
|
3008
3098
|
children: [
|
|
3009
3099
|
validChildren,
|
|
3010
|
-
name && /* @__PURE__ */
|
|
3100
|
+
name && /* @__PURE__ */ jsx32("input", { type: "hidden", name, value })
|
|
3011
3101
|
]
|
|
3012
3102
|
}
|
|
3013
3103
|
) });
|
|
@@ -3015,17 +3105,17 @@ var SelectRoot = (props) => {
|
|
|
3015
3105
|
SelectRoot.displayName = "Select.Root";
|
|
3016
3106
|
|
|
3017
3107
|
// src/components/select/separator/select-separator.tsx
|
|
3018
|
-
import
|
|
3019
|
-
import * as
|
|
3020
|
-
import { jsx as
|
|
3021
|
-
var SelectSeparator =
|
|
3108
|
+
import clsx29 from "clsx";
|
|
3109
|
+
import * as React32 from "react";
|
|
3110
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
3111
|
+
var SelectSeparator = React32.forwardRef(
|
|
3022
3112
|
(props, ref) => {
|
|
3023
3113
|
const { className, ...rest } = props;
|
|
3024
|
-
return /* @__PURE__ */
|
|
3114
|
+
return /* @__PURE__ */ jsx33(
|
|
3025
3115
|
"div",
|
|
3026
3116
|
{
|
|
3027
3117
|
ref,
|
|
3028
|
-
className:
|
|
3118
|
+
className: clsx29("select-separator", className),
|
|
3029
3119
|
...rest
|
|
3030
3120
|
}
|
|
3031
3121
|
);
|
|
@@ -3046,7 +3136,7 @@ var Select = {
|
|
|
3046
3136
|
};
|
|
3047
3137
|
|
|
3048
3138
|
// src/components/separator/separator.tsx
|
|
3049
|
-
import
|
|
3139
|
+
import clsx30 from "clsx";
|
|
3050
3140
|
|
|
3051
3141
|
// src/components/separator/separator.props.ts
|
|
3052
3142
|
var directions = ["horizontal", "vertical"];
|
|
@@ -3077,16 +3167,16 @@ var SeparatorPropsDefs = {
|
|
|
3077
3167
|
};
|
|
3078
3168
|
|
|
3079
3169
|
// src/components/separator/separator.tsx
|
|
3080
|
-
import { jsx as
|
|
3170
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3081
3171
|
var Separator = (props) => {
|
|
3082
3172
|
const { className, dataAttrs, style } = getComponentProps(
|
|
3083
3173
|
props,
|
|
3084
3174
|
SeparatorPropsDefs
|
|
3085
3175
|
);
|
|
3086
|
-
return /* @__PURE__ */
|
|
3176
|
+
return /* @__PURE__ */ jsx34(
|
|
3087
3177
|
"div",
|
|
3088
3178
|
{
|
|
3089
|
-
className:
|
|
3179
|
+
className: clsx30("separator", className),
|
|
3090
3180
|
style,
|
|
3091
3181
|
...dataAttrs
|
|
3092
3182
|
}
|
|
@@ -3095,16 +3185,16 @@ var Separator = (props) => {
|
|
|
3095
3185
|
Separator.displayName = "Separator";
|
|
3096
3186
|
|
|
3097
3187
|
// src/components/switch/indicator/switch-indicator.tsx
|
|
3098
|
-
import
|
|
3099
|
-
import
|
|
3188
|
+
import clsx31 from "clsx";
|
|
3189
|
+
import React34 from "react";
|
|
3100
3190
|
|
|
3101
3191
|
// src/components/switch/switch-context.ts
|
|
3102
|
-
import
|
|
3103
|
-
var SwitchContext =
|
|
3192
|
+
import React33 from "react";
|
|
3193
|
+
var SwitchContext = React33.createContext(
|
|
3104
3194
|
null
|
|
3105
3195
|
);
|
|
3106
3196
|
function useSwitchContext() {
|
|
3107
|
-
const context =
|
|
3197
|
+
const context = React33.useContext(SwitchContext);
|
|
3108
3198
|
if (!context) {
|
|
3109
3199
|
throw new Error("Switch components must be used within a Switch.Root");
|
|
3110
3200
|
}
|
|
@@ -3199,8 +3289,8 @@ var SwitchIndicatorPropDefs = {
|
|
|
3199
3289
|
};
|
|
3200
3290
|
|
|
3201
3291
|
// src/components/switch/indicator/switch-indicator.tsx
|
|
3202
|
-
import { jsx as
|
|
3203
|
-
var SwitchIndicator =
|
|
3292
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
3293
|
+
var SwitchIndicator = React34.forwardRef((props, ref) => {
|
|
3204
3294
|
const {
|
|
3205
3295
|
value,
|
|
3206
3296
|
setValue,
|
|
@@ -3230,7 +3320,7 @@ var SwitchIndicator = React33.forwardRef((props, ref) => {
|
|
|
3230
3320
|
...readonly && { "data-readonly": true },
|
|
3231
3321
|
...(variant || contextVariant) && { "data-variant": indicatorVariant }
|
|
3232
3322
|
};
|
|
3233
|
-
return /* @__PURE__ */
|
|
3323
|
+
return /* @__PURE__ */ jsx35(
|
|
3234
3324
|
"div",
|
|
3235
3325
|
{
|
|
3236
3326
|
ref,
|
|
@@ -3244,7 +3334,7 @@ var SwitchIndicator = React33.forwardRef((props, ref) => {
|
|
|
3244
3334
|
"aria-readonly": readonly,
|
|
3245
3335
|
onKeyDown: handleKeyDown,
|
|
3246
3336
|
tabIndex: disabled || readonly ? -1 : 0,
|
|
3247
|
-
className:
|
|
3337
|
+
className: clsx31("switch-indicator", className),
|
|
3248
3338
|
...indicatorProps,
|
|
3249
3339
|
...dataAttrs
|
|
3250
3340
|
}
|
|
@@ -3253,8 +3343,8 @@ var SwitchIndicator = React33.forwardRef((props, ref) => {
|
|
|
3253
3343
|
SwitchIndicator.displayName = "Switch.Indicator";
|
|
3254
3344
|
|
|
3255
3345
|
// src/components/switch/label/switch-label.tsx
|
|
3256
|
-
import
|
|
3257
|
-
import
|
|
3346
|
+
import clsx32 from "clsx";
|
|
3347
|
+
import React35 from "react";
|
|
3258
3348
|
|
|
3259
3349
|
// src/components/switch/label/switch-label.props.ts
|
|
3260
3350
|
var labelPositions3 = ["top", "left", "right", "bottom"];
|
|
@@ -3273,25 +3363,25 @@ var SwitchLabelPropDefs = {
|
|
|
3273
3363
|
};
|
|
3274
3364
|
|
|
3275
3365
|
// src/components/switch/label/switch-label.tsx
|
|
3276
|
-
import { jsx as
|
|
3277
|
-
var SwitchLabel =
|
|
3366
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3367
|
+
var SwitchLabel = React35.forwardRef(
|
|
3278
3368
|
(props, ref) => {
|
|
3279
3369
|
const context = useSwitchContext();
|
|
3280
3370
|
const { className, children, position } = getComponentProps(
|
|
3281
3371
|
props,
|
|
3282
3372
|
SwitchLabelPropDefs
|
|
3283
3373
|
);
|
|
3284
|
-
|
|
3374
|
+
React35.useLayoutEffect(() => {
|
|
3285
3375
|
context.setLabelPosition?.(position ?? "right");
|
|
3286
3376
|
}, [position, context.setLabelPosition]);
|
|
3287
|
-
return /* @__PURE__ */
|
|
3377
|
+
return /* @__PURE__ */ jsx36(
|
|
3288
3378
|
"label",
|
|
3289
3379
|
{
|
|
3290
3380
|
ref,
|
|
3291
3381
|
htmlFor: context.labelId,
|
|
3292
|
-
className:
|
|
3382
|
+
className: clsx32("switch-label", className),
|
|
3293
3383
|
...position && { [`data-position`]: position },
|
|
3294
|
-
children: /* @__PURE__ */
|
|
3384
|
+
children: /* @__PURE__ */ jsx36(Text, { children })
|
|
3295
3385
|
}
|
|
3296
3386
|
);
|
|
3297
3387
|
}
|
|
@@ -3299,14 +3389,14 @@ var SwitchLabel = React34.forwardRef(
|
|
|
3299
3389
|
SwitchLabel.displayName = "Switch.Label";
|
|
3300
3390
|
|
|
3301
3391
|
// src/components/switch/root/switch-root.tsx
|
|
3302
|
-
import
|
|
3392
|
+
import clsx33 from "clsx";
|
|
3303
3393
|
import {
|
|
3304
3394
|
isValidElement as isValidElement5,
|
|
3305
3395
|
useId as useId3,
|
|
3306
3396
|
useMemo as useMemo7,
|
|
3307
3397
|
useState as useState7
|
|
3308
3398
|
} from "react";
|
|
3309
|
-
import { jsx as
|
|
3399
|
+
import { jsx as jsx37, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3310
3400
|
var ALLOWED_CHILDREN7 = [
|
|
3311
3401
|
SwitchLabel.displayName,
|
|
3312
3402
|
SwitchIndicator.displayName
|
|
@@ -3360,7 +3450,7 @@ var SwitchRoot = (props) => {
|
|
|
3360
3450
|
};
|
|
3361
3451
|
}
|
|
3362
3452
|
return {
|
|
3363
|
-
indicator: /* @__PURE__ */
|
|
3453
|
+
indicator: /* @__PURE__ */ jsx37(SwitchIndicator, { size }),
|
|
3364
3454
|
otherChildren: validChildren
|
|
3365
3455
|
};
|
|
3366
3456
|
}, [validChildren, size]);
|
|
@@ -3402,10 +3492,10 @@ var SwitchRoot = (props) => {
|
|
|
3402
3492
|
if (disabled || readonly) return;
|
|
3403
3493
|
setValue(!value);
|
|
3404
3494
|
};
|
|
3405
|
-
return /* @__PURE__ */
|
|
3495
|
+
return /* @__PURE__ */ jsx37(SwitchContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs9(
|
|
3406
3496
|
"div",
|
|
3407
3497
|
{
|
|
3408
|
-
className:
|
|
3498
|
+
className: clsx33("switch-root", props.className),
|
|
3409
3499
|
onClick: () => handleClick(),
|
|
3410
3500
|
onFocus: () => setFocused(true),
|
|
3411
3501
|
onBlur: () => setFocused(false),
|
|
@@ -3413,7 +3503,7 @@ var SwitchRoot = (props) => {
|
|
|
3413
3503
|
onMouseLeave: () => setHovered(false),
|
|
3414
3504
|
...restDataAttrs,
|
|
3415
3505
|
children: [
|
|
3416
|
-
/* @__PURE__ */
|
|
3506
|
+
/* @__PURE__ */ jsx37(
|
|
3417
3507
|
"div",
|
|
3418
3508
|
{
|
|
3419
3509
|
className: "switch-container",
|
|
@@ -3427,7 +3517,7 @@ var SwitchRoot = (props) => {
|
|
|
3427
3517
|
}
|
|
3428
3518
|
),
|
|
3429
3519
|
otherChildren,
|
|
3430
|
-
name && /* @__PURE__ */
|
|
3520
|
+
name && /* @__PURE__ */ jsx37("input", { type: "hidden", name, value: String(value) })
|
|
3431
3521
|
]
|
|
3432
3522
|
}
|
|
3433
3523
|
) });
|
|
@@ -3442,16 +3532,16 @@ var Switch = Object.assign(SwitchRoot, {
|
|
|
3442
3532
|
});
|
|
3443
3533
|
|
|
3444
3534
|
// src/components/theme/theme.tsx
|
|
3445
|
-
import * as
|
|
3446
|
-
import { jsx as
|
|
3447
|
-
var Theme =
|
|
3448
|
-
const context =
|
|
3535
|
+
import * as React37 from "react";
|
|
3536
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3537
|
+
var Theme = React37.forwardRef((props, ref) => {
|
|
3538
|
+
const context = React37.useContext(ThemeContext);
|
|
3449
3539
|
const isRoot = context === void 0;
|
|
3450
|
-
if (isRoot) return /* @__PURE__ */
|
|
3451
|
-
return /* @__PURE__ */
|
|
3540
|
+
if (isRoot) return /* @__PURE__ */ jsx38(ThemeRoot, { ...props, ref });
|
|
3541
|
+
return /* @__PURE__ */ jsx38(ThemeSub, { ...props, ref });
|
|
3452
3542
|
});
|
|
3453
3543
|
Theme.displayName = "Theme";
|
|
3454
|
-
var ThemeRoot =
|
|
3544
|
+
var ThemeRoot = React37.forwardRef((props, ref) => {
|
|
3455
3545
|
const {
|
|
3456
3546
|
appearance: themeAppearance,
|
|
3457
3547
|
radius: themeRadius,
|
|
@@ -3460,15 +3550,15 @@ var ThemeRoot = React36.forwardRef((props, ref) => {
|
|
|
3460
3550
|
children,
|
|
3461
3551
|
...rest
|
|
3462
3552
|
} = props;
|
|
3463
|
-
const [appearance, setAppearance] =
|
|
3553
|
+
const [appearance, setAppearance] = React37.useState(
|
|
3464
3554
|
themeAppearance ?? "light"
|
|
3465
3555
|
);
|
|
3466
|
-
const [radius, setRadius] =
|
|
3467
|
-
const [roundness2, setRoundness] =
|
|
3556
|
+
const [radius, setRadius] = React37.useState(themeRadius ?? "md");
|
|
3557
|
+
const [roundness2, setRoundness] = React37.useState(
|
|
3468
3558
|
themeRoundness ?? "3"
|
|
3469
3559
|
);
|
|
3470
|
-
const [spacing, setSpacing] =
|
|
3471
|
-
const value =
|
|
3560
|
+
const [spacing, setSpacing] = React37.useState(themeSpacing ?? "md");
|
|
3561
|
+
const value = React37.useMemo(
|
|
3472
3562
|
() => ({
|
|
3473
3563
|
appearance,
|
|
3474
3564
|
radius,
|
|
@@ -3481,7 +3571,7 @@ var ThemeRoot = React36.forwardRef((props, ref) => {
|
|
|
3481
3571
|
}),
|
|
3482
3572
|
[appearance, radius, roundness2, spacing]
|
|
3483
3573
|
);
|
|
3484
|
-
return /* @__PURE__ */
|
|
3574
|
+
return /* @__PURE__ */ jsx38(ThemeContext.Provider, { value, children: /* @__PURE__ */ jsx38(
|
|
3485
3575
|
"div",
|
|
3486
3576
|
{
|
|
3487
3577
|
ref,
|
|
@@ -3495,8 +3585,8 @@ var ThemeRoot = React36.forwardRef((props, ref) => {
|
|
|
3495
3585
|
) });
|
|
3496
3586
|
});
|
|
3497
3587
|
ThemeRoot.displayName = "ThemeRoot";
|
|
3498
|
-
var ThemeSub =
|
|
3499
|
-
const context =
|
|
3588
|
+
var ThemeSub = React37.forwardRef((props, ref) => {
|
|
3589
|
+
const context = React37.useContext(ThemeContext);
|
|
3500
3590
|
const {
|
|
3501
3591
|
appearance,
|
|
3502
3592
|
radius,
|
|
@@ -3519,7 +3609,7 @@ var ThemeSub = React36.forwardRef((props, ref) => {
|
|
|
3519
3609
|
onRoundnessChange: context.onRoundnessChange,
|
|
3520
3610
|
onSpacingChange: context.onSpacingChange
|
|
3521
3611
|
};
|
|
3522
|
-
return /* @__PURE__ */
|
|
3612
|
+
return /* @__PURE__ */ jsx38(ThemeContext.Provider, { value: contextProps, children: /* @__PURE__ */ jsx38(
|
|
3523
3613
|
"div",
|
|
3524
3614
|
{
|
|
3525
3615
|
ref,
|
|
@@ -3537,7 +3627,7 @@ ThemeSub.displayName = "ThemeSub";
|
|
|
3537
3627
|
|
|
3538
3628
|
// src/components/theme/theme-control.tsx
|
|
3539
3629
|
import { useEffect as useEffect7, useState as useState9 } from "react";
|
|
3540
|
-
import { jsx as
|
|
3630
|
+
import { jsx as jsx39, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3541
3631
|
function ThemeControl({ position = "bottom" }) {
|
|
3542
3632
|
const {
|
|
3543
3633
|
appearance,
|
|
@@ -3560,7 +3650,7 @@ function ThemeControl({ position = "bottom" }) {
|
|
|
3560
3650
|
document.addEventListener("keydown", handleKeyDown);
|
|
3561
3651
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
3562
3652
|
}, [visible]);
|
|
3563
|
-
return /* @__PURE__ */
|
|
3653
|
+
return /* @__PURE__ */ jsx39(Portal.Root, { open: visible, onOpenChange: setVisible, children: /* @__PURE__ */ jsx39(Portal.Content, { position, children: /* @__PURE__ */ jsxs10(
|
|
3564
3654
|
Box,
|
|
3565
3655
|
{
|
|
3566
3656
|
m: "4",
|
|
@@ -3574,11 +3664,11 @@ function ThemeControl({ position = "bottom" }) {
|
|
|
3574
3664
|
value: appearance,
|
|
3575
3665
|
onValueChange: (change) => onAppearanceChange?.(change),
|
|
3576
3666
|
children: [
|
|
3577
|
-
/* @__PURE__ */
|
|
3578
|
-
/* @__PURE__ */
|
|
3667
|
+
/* @__PURE__ */ jsx39(Select.Label, { position: "inside", children: "Theme Settings" }),
|
|
3668
|
+
/* @__PURE__ */ jsx39(Select.Trigger, {}),
|
|
3579
3669
|
/* @__PURE__ */ jsxs10(Select.Content, { children: [
|
|
3580
|
-
/* @__PURE__ */
|
|
3581
|
-
/* @__PURE__ */
|
|
3670
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "light", children: "Light" }),
|
|
3671
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "dark", children: "Dark" })
|
|
3582
3672
|
] })
|
|
3583
3673
|
]
|
|
3584
3674
|
}
|
|
@@ -3590,16 +3680,16 @@ function ThemeControl({ position = "bottom" }) {
|
|
|
3590
3680
|
value: radius,
|
|
3591
3681
|
onValueChange: (change) => onRadiusChange?.(change),
|
|
3592
3682
|
children: [
|
|
3593
|
-
/* @__PURE__ */
|
|
3594
|
-
/* @__PURE__ */
|
|
3683
|
+
/* @__PURE__ */ jsx39(Select.Label, { position: "inside", children: "Radius" }),
|
|
3684
|
+
/* @__PURE__ */ jsx39(Select.Trigger, {}),
|
|
3595
3685
|
/* @__PURE__ */ jsxs10(Select.Content, { children: [
|
|
3596
|
-
/* @__PURE__ */
|
|
3597
|
-
/* @__PURE__ */
|
|
3598
|
-
/* @__PURE__ */
|
|
3599
|
-
/* @__PURE__ */
|
|
3600
|
-
/* @__PURE__ */
|
|
3601
|
-
/* @__PURE__ */
|
|
3602
|
-
/* @__PURE__ */
|
|
3686
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "none", children: "None" }),
|
|
3687
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "xs", children: "XS" }),
|
|
3688
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "sm", children: "SM" }),
|
|
3689
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "md", children: "MD" }),
|
|
3690
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "lg", children: "LG" }),
|
|
3691
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "xl", children: "XL" }),
|
|
3692
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "full", children: "FULL" })
|
|
3603
3693
|
] })
|
|
3604
3694
|
]
|
|
3605
3695
|
}
|
|
@@ -3611,15 +3701,15 @@ function ThemeControl({ position = "bottom" }) {
|
|
|
3611
3701
|
value: roundness2,
|
|
3612
3702
|
onValueChange: (change) => onRoundnessChange?.(change),
|
|
3613
3703
|
children: [
|
|
3614
|
-
/* @__PURE__ */
|
|
3615
|
-
/* @__PURE__ */
|
|
3704
|
+
/* @__PURE__ */ jsx39(Select.Label, { className: "min-w-40!", position: "inside", children: "Roundness" }),
|
|
3705
|
+
/* @__PURE__ */ jsx39(Select.Trigger, {}),
|
|
3616
3706
|
/* @__PURE__ */ jsxs10(Select.Content, { children: [
|
|
3617
|
-
/* @__PURE__ */
|
|
3618
|
-
/* @__PURE__ */
|
|
3619
|
-
/* @__PURE__ */
|
|
3620
|
-
/* @__PURE__ */
|
|
3621
|
-
/* @__PURE__ */
|
|
3622
|
-
/* @__PURE__ */
|
|
3707
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "1", children: "1" }),
|
|
3708
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "2", children: "2" }),
|
|
3709
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "3", children: "3" }),
|
|
3710
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "4", children: "4" }),
|
|
3711
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "5", children: "5" }),
|
|
3712
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "6", children: "6" })
|
|
3623
3713
|
] })
|
|
3624
3714
|
]
|
|
3625
3715
|
}
|
|
@@ -3631,14 +3721,14 @@ function ThemeControl({ position = "bottom" }) {
|
|
|
3631
3721
|
value: spacing,
|
|
3632
3722
|
onValueChange: (change) => onSpacingChange?.(change),
|
|
3633
3723
|
children: [
|
|
3634
|
-
/* @__PURE__ */
|
|
3635
|
-
/* @__PURE__ */
|
|
3724
|
+
/* @__PURE__ */ jsx39(Select.Label, { position: "inside", children: "Spacing" }),
|
|
3725
|
+
/* @__PURE__ */ jsx39(Select.Trigger, {}),
|
|
3636
3726
|
/* @__PURE__ */ jsxs10(Select.Content, { children: [
|
|
3637
|
-
/* @__PURE__ */
|
|
3638
|
-
/* @__PURE__ */
|
|
3639
|
-
/* @__PURE__ */
|
|
3640
|
-
/* @__PURE__ */
|
|
3641
|
-
/* @__PURE__ */
|
|
3727
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "xs", children: "XS" }),
|
|
3728
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "sm", children: "SM" }),
|
|
3729
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "md", children: "MD" }),
|
|
3730
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "lg", children: "LG" }),
|
|
3731
|
+
/* @__PURE__ */ jsx39(Select.Item, { value: "xl", children: "XL" })
|
|
3642
3732
|
] })
|
|
3643
3733
|
]
|
|
3644
3734
|
}
|
|
@@ -3654,6 +3744,7 @@ export {
|
|
|
3654
3744
|
Button,
|
|
3655
3745
|
Checkbox,
|
|
3656
3746
|
Container,
|
|
3747
|
+
Flex,
|
|
3657
3748
|
Panel,
|
|
3658
3749
|
Portal,
|
|
3659
3750
|
ProgressBar,
|