@locus-ui/components 0.0.12 → 0.0.13
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 +74 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +113 -4
- package/dist/index.d.ts +113 -4
- package/dist/index.js +392 -140
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +488 -236
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ function getComponentProps(props, ...propDefs) {
|
|
|
19
19
|
const prop = allProps[key];
|
|
20
20
|
const value = props?.[key];
|
|
21
21
|
delete restProps[key];
|
|
22
|
-
if (prop.type === "boolean" || prop.type === "string" || prop.type === "value | array" || prop.type === "reactNode" || prop.type === "function") {
|
|
22
|
+
if (prop.type === "boolean" || prop.type === "string" || prop.type === "number" || prop.type === "value | array" || prop.type === "reactNode" || prop.type === "function") {
|
|
23
23
|
extractedProps[key] = value;
|
|
24
24
|
if (prop.cssProperty && value !== void 0 && value !== null) {
|
|
25
25
|
style = {
|
|
@@ -41,13 +41,14 @@ function getComponentProps(props, ...propDefs) {
|
|
|
41
41
|
if (propValue !== null && propValue !== void 0) {
|
|
42
42
|
if (!breakpoint) extractedProps[key] = propValue;
|
|
43
43
|
if (!prop.values.includes(propValue)) {
|
|
44
|
+
const transformedValue = "transform" in prop && prop.transform ? prop.transform(propValue) : propValue;
|
|
44
45
|
if (prop.className) {
|
|
45
46
|
classNames.push(
|
|
46
47
|
breakpoint ? `${prop.className}-${breakpoint}` : prop.className
|
|
47
48
|
);
|
|
48
49
|
style = {
|
|
49
50
|
...style,
|
|
50
|
-
[`--custom-${key}${usedBreakpoint}`]:
|
|
51
|
+
[`--custom-${key}${usedBreakpoint}`]: transformedValue
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
54
|
if (prop.dataAttr) {
|
|
@@ -322,6 +323,60 @@ var AlignPropDef = {
|
|
|
322
323
|
}
|
|
323
324
|
};
|
|
324
325
|
|
|
326
|
+
// src/utils/parse-color.ts
|
|
327
|
+
function parseColor(value) {
|
|
328
|
+
const trimmed = value.trim();
|
|
329
|
+
const hexMatch = trimmed.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);
|
|
330
|
+
if (hexMatch) {
|
|
331
|
+
let hex = hexMatch[1];
|
|
332
|
+
if (hex.length === 3) {
|
|
333
|
+
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
|
|
334
|
+
}
|
|
335
|
+
const r = parseInt(hex.slice(0, 2), 16);
|
|
336
|
+
const g = parseInt(hex.slice(2, 4), 16);
|
|
337
|
+
const b = parseInt(hex.slice(4, 6), 16);
|
|
338
|
+
return `${r}, ${g}, ${b}`;
|
|
339
|
+
}
|
|
340
|
+
const rgbMatch = trimmed.match(
|
|
341
|
+
/^rgba?\(\s*(\d{1,3})\s*[,\s]\s*(\d{1,3})\s*[,\s]\s*(\d{1,3})\s*(?:[,/]\s*[\d.]+%?\s*)?\)$/
|
|
342
|
+
);
|
|
343
|
+
if (rgbMatch) {
|
|
344
|
+
return `${rgbMatch[1]}, ${rgbMatch[2]}, ${rgbMatch[3]}`;
|
|
345
|
+
}
|
|
346
|
+
return trimmed;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// src/props/color.prop.ts
|
|
350
|
+
var Colors = [
|
|
351
|
+
"primary",
|
|
352
|
+
"secondary",
|
|
353
|
+
"tertiary",
|
|
354
|
+
"accent",
|
|
355
|
+
"success",
|
|
356
|
+
"warning",
|
|
357
|
+
"danger",
|
|
358
|
+
"info"
|
|
359
|
+
];
|
|
360
|
+
var ColorPropDef = {
|
|
361
|
+
/**
|
|
362
|
+
* Sets the color of the component.
|
|
363
|
+
*
|
|
364
|
+
* Uses predefined theme colors ("primary", "secondary", etc.) or accepts custom color values in hex, rgb, or raw rgb formats.
|
|
365
|
+
*
|
|
366
|
+
* @example color="primary" // primary color
|
|
367
|
+
* @example color="#7BEB34" // hex color
|
|
368
|
+
* @example color="rgb(125, 235, 52)" // rgb color
|
|
369
|
+
* @example color="125, 235, 52" // raw rgb values
|
|
370
|
+
*/
|
|
371
|
+
color: {
|
|
372
|
+
type: "enum | string",
|
|
373
|
+
values: Colors,
|
|
374
|
+
dataAttr: "color",
|
|
375
|
+
className: "color",
|
|
376
|
+
transform: parseColor
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
|
|
325
380
|
// src/props/margin.prop.ts
|
|
326
381
|
var marginValues = [
|
|
327
382
|
"auto",
|
|
@@ -1112,6 +1167,7 @@ var Button = (props) => {
|
|
|
1112
1167
|
} = getComponentProps(
|
|
1113
1168
|
props,
|
|
1114
1169
|
ButtonRootPropsDefs,
|
|
1170
|
+
ColorPropDef,
|
|
1115
1171
|
MarginPropDefs,
|
|
1116
1172
|
PaddingPropDefs,
|
|
1117
1173
|
RadiusPropDefs,
|
|
@@ -1616,17 +1672,70 @@ var Container = React11.forwardRef((props, ref) => {
|
|
|
1616
1672
|
});
|
|
1617
1673
|
Container.displayName = "Container";
|
|
1618
1674
|
|
|
1619
|
-
// src/components/
|
|
1675
|
+
// src/components/panel/panel.tsx
|
|
1620
1676
|
import clsx14 from "clsx";
|
|
1621
|
-
import * as
|
|
1677
|
+
import * as React12 from "react";
|
|
1678
|
+
|
|
1679
|
+
// src/components/panel/panel.props.ts
|
|
1680
|
+
var PanelVariants = ["solid", "outlined", "muted"];
|
|
1681
|
+
var PanelPropsDefs = {
|
|
1682
|
+
/**
|
|
1683
|
+
* Sets the variant style of the panel ("solid", "outlined", or "muted").
|
|
1684
|
+
*/
|
|
1685
|
+
variant: {
|
|
1686
|
+
type: "enum",
|
|
1687
|
+
values: PanelVariants,
|
|
1688
|
+
dataAttr: "variant"
|
|
1689
|
+
},
|
|
1690
|
+
/**
|
|
1691
|
+
* The blur amount applied to the panel.
|
|
1692
|
+
*
|
|
1693
|
+
* @example blur="4px" // Sets the backdrop blur to 4 pixels
|
|
1694
|
+
* @default "2px"
|
|
1695
|
+
*/
|
|
1696
|
+
blur: {
|
|
1697
|
+
type: "string",
|
|
1698
|
+
default: "2px",
|
|
1699
|
+
cssProperty: "--panel-blur"
|
|
1700
|
+
}
|
|
1701
|
+
};
|
|
1702
|
+
|
|
1703
|
+
// src/components/panel/panel.tsx
|
|
1704
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1705
|
+
var Panel = React12.forwardRef((props, ref) => {
|
|
1706
|
+
const { className, dataAttrs, children, ...rest } = getComponentProps(
|
|
1707
|
+
props,
|
|
1708
|
+
PanelPropsDefs,
|
|
1709
|
+
MarginPropDefs,
|
|
1710
|
+
PaddingPropDefs,
|
|
1711
|
+
SpacingPropDef,
|
|
1712
|
+
RadiusPropDefs,
|
|
1713
|
+
RoundnessPropDef
|
|
1714
|
+
);
|
|
1715
|
+
return /* @__PURE__ */ jsx15(
|
|
1716
|
+
"div",
|
|
1717
|
+
{
|
|
1718
|
+
ref,
|
|
1719
|
+
className: clsx14("panel", className),
|
|
1720
|
+
...dataAttrs,
|
|
1721
|
+
...rest,
|
|
1722
|
+
children
|
|
1723
|
+
}
|
|
1724
|
+
);
|
|
1725
|
+
});
|
|
1726
|
+
Panel.displayName = "Panel";
|
|
1727
|
+
|
|
1728
|
+
// src/components/portal/backdrop/portal-backdrop.tsx
|
|
1729
|
+
import clsx15 from "clsx";
|
|
1730
|
+
import * as React14 from "react";
|
|
1622
1731
|
|
|
1623
1732
|
// src/components/portal/portal-context.tsx
|
|
1624
|
-
import * as
|
|
1625
|
-
var PortalContext =
|
|
1733
|
+
import * as React13 from "react";
|
|
1734
|
+
var PortalContext = React13.createContext(
|
|
1626
1735
|
void 0
|
|
1627
1736
|
);
|
|
1628
1737
|
function usePortalContext() {
|
|
1629
|
-
const context =
|
|
1738
|
+
const context = React13.useContext(PortalContext);
|
|
1630
1739
|
if (!context) {
|
|
1631
1740
|
throw new Error("`usePortalContext` must be used within a `Portal.Root`");
|
|
1632
1741
|
}
|
|
@@ -1673,8 +1782,8 @@ var PortalBackdropPropsDefs = {
|
|
|
1673
1782
|
};
|
|
1674
1783
|
|
|
1675
1784
|
// src/components/portal/backdrop/portal-backdrop.tsx
|
|
1676
|
-
import { jsx as
|
|
1677
|
-
var PortalBackdrop =
|
|
1785
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1786
|
+
var PortalBackdrop = React14.forwardRef(
|
|
1678
1787
|
(props, ref) => {
|
|
1679
1788
|
const context = usePortalContext();
|
|
1680
1789
|
const { className, dataAttrs, ...rest } = getComponentProps(
|
|
@@ -1682,11 +1791,11 @@ var PortalBackdrop = React13.forwardRef(
|
|
|
1682
1791
|
PortalBackdropPropsDefs
|
|
1683
1792
|
);
|
|
1684
1793
|
if (!context.open) return null;
|
|
1685
|
-
return /* @__PURE__ */
|
|
1794
|
+
return /* @__PURE__ */ jsx16(
|
|
1686
1795
|
"div",
|
|
1687
1796
|
{
|
|
1688
1797
|
ref,
|
|
1689
|
-
className:
|
|
1798
|
+
className: clsx15("portal-backdrop", className),
|
|
1690
1799
|
...dataAttrs,
|
|
1691
1800
|
...rest
|
|
1692
1801
|
}
|
|
@@ -1696,17 +1805,17 @@ var PortalBackdrop = React13.forwardRef(
|
|
|
1696
1805
|
PortalBackdrop.displayName = "Portal.Backdrop";
|
|
1697
1806
|
|
|
1698
1807
|
// src/components/portal/content/portal-content.tsx
|
|
1699
|
-
import
|
|
1700
|
-
import * as
|
|
1808
|
+
import clsx16 from "clsx";
|
|
1809
|
+
import * as React17 from "react";
|
|
1701
1810
|
import ReactDOM from "react-dom";
|
|
1702
1811
|
|
|
1703
1812
|
// src/components/theme/theme-context.tsx
|
|
1704
|
-
import * as
|
|
1705
|
-
var ThemeContext =
|
|
1813
|
+
import * as React15 from "react";
|
|
1814
|
+
var ThemeContext = React15.createContext(
|
|
1706
1815
|
void 0
|
|
1707
1816
|
);
|
|
1708
1817
|
function useTheme() {
|
|
1709
|
-
const context =
|
|
1818
|
+
const context = React15.useContext(ThemeContext);
|
|
1710
1819
|
if (!context) {
|
|
1711
1820
|
throw new Error("`useTheme` must be used within a `Theme`");
|
|
1712
1821
|
}
|
|
@@ -1714,7 +1823,7 @@ function useTheme() {
|
|
|
1714
1823
|
}
|
|
1715
1824
|
|
|
1716
1825
|
// src/components/portal/utils/use-anchor-position.ts
|
|
1717
|
-
import * as
|
|
1826
|
+
import * as React16 from "react";
|
|
1718
1827
|
function useAnchorPosition({
|
|
1719
1828
|
anchorRef,
|
|
1720
1829
|
contentRef,
|
|
@@ -1724,9 +1833,9 @@ function useAnchorPosition({
|
|
|
1724
1833
|
alignOffset = 0,
|
|
1725
1834
|
enabled = true
|
|
1726
1835
|
}) {
|
|
1727
|
-
const [position, setPosition] =
|
|
1728
|
-
const [, _forceUpdate] =
|
|
1729
|
-
const updatePosition =
|
|
1836
|
+
const [position, setPosition] = React16.useState(null);
|
|
1837
|
+
const [, _forceUpdate] = React16.useReducer((x) => x + 1, 0);
|
|
1838
|
+
const updatePosition = React16.useCallback(() => {
|
|
1730
1839
|
const anchor = anchorRef.current;
|
|
1731
1840
|
const content = contentRef.current;
|
|
1732
1841
|
if (!anchor || !content || !enabled) {
|
|
@@ -1787,7 +1896,7 @@ function useAnchorPosition({
|
|
|
1787
1896
|
);
|
|
1788
1897
|
setPosition({ top, left });
|
|
1789
1898
|
}, [anchorRef, contentRef, side, align, sideOffset, alignOffset, enabled]);
|
|
1790
|
-
|
|
1899
|
+
React16.useEffect(() => {
|
|
1791
1900
|
if (!enabled) {
|
|
1792
1901
|
setPosition(null);
|
|
1793
1902
|
return;
|
|
@@ -1868,12 +1977,12 @@ var PortalContentPropsDefs = {
|
|
|
1868
1977
|
};
|
|
1869
1978
|
|
|
1870
1979
|
// src/components/portal/content/portal-content.tsx
|
|
1871
|
-
import { jsx as
|
|
1872
|
-
var PortalContent =
|
|
1980
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1981
|
+
var PortalContent = React17.forwardRef(
|
|
1873
1982
|
(props, ref) => {
|
|
1874
1983
|
const portalContext = usePortalContext();
|
|
1875
|
-
const themeContext =
|
|
1876
|
-
const contentRef =
|
|
1984
|
+
const themeContext = React17.useContext(ThemeContext);
|
|
1985
|
+
const contentRef = React17.useRef(null);
|
|
1877
1986
|
const {
|
|
1878
1987
|
side = "bottom",
|
|
1879
1988
|
align = "center",
|
|
@@ -1895,7 +2004,7 @@ var PortalContent = React16.forwardRef(
|
|
|
1895
2004
|
alignOffset: parseInt(alignOffset, 10) || 0,
|
|
1896
2005
|
enabled: anchored && portalContext.open
|
|
1897
2006
|
});
|
|
1898
|
-
const setRefs =
|
|
2007
|
+
const setRefs = React17.useCallback(
|
|
1899
2008
|
(node) => {
|
|
1900
2009
|
contentRef.current = node;
|
|
1901
2010
|
if (typeof ref === "function") {
|
|
@@ -1906,7 +2015,7 @@ var PortalContent = React16.forwardRef(
|
|
|
1906
2015
|
},
|
|
1907
2016
|
[ref]
|
|
1908
2017
|
);
|
|
1909
|
-
|
|
2018
|
+
React17.useEffect(() => {
|
|
1910
2019
|
if (!portalContext.open) return;
|
|
1911
2020
|
function onKeyDown(e) {
|
|
1912
2021
|
if (e.key === "Escape") {
|
|
@@ -1918,7 +2027,7 @@ var PortalContent = React16.forwardRef(
|
|
|
1918
2027
|
document.removeEventListener("keydown", onKeyDown);
|
|
1919
2028
|
};
|
|
1920
2029
|
}, [portalContext.open, portalContext.onOpenChange]);
|
|
1921
|
-
|
|
2030
|
+
React17.useEffect(() => {
|
|
1922
2031
|
if (!portalContext.open || !anchored) return;
|
|
1923
2032
|
function onClickOutside(e) {
|
|
1924
2033
|
const target = e.target;
|
|
@@ -1953,11 +2062,11 @@ var PortalContent = React16.forwardRef(
|
|
|
1953
2062
|
left: anchorPosition.left
|
|
1954
2063
|
} : {}
|
|
1955
2064
|
};
|
|
1956
|
-
const portalContent = /* @__PURE__ */
|
|
2065
|
+
const portalContent = /* @__PURE__ */ jsx17(
|
|
1957
2066
|
"div",
|
|
1958
2067
|
{
|
|
1959
2068
|
ref: setRefs,
|
|
1960
|
-
className:
|
|
2069
|
+
className: clsx16("portal", className),
|
|
1961
2070
|
"data-appearance": themeContext?.appearance,
|
|
1962
2071
|
"data-radius": themeContext?.radius,
|
|
1963
2072
|
"data-roundness": themeContext?.roundness ?? "theme",
|
|
@@ -1968,7 +2077,7 @@ var PortalContent = React16.forwardRef(
|
|
|
1968
2077
|
onClick: anchored ? void 0 : () => portalContext.onOpenChange?.(false),
|
|
1969
2078
|
style: combinedStyle,
|
|
1970
2079
|
...dataAttrs,
|
|
1971
|
-
children: /* @__PURE__ */
|
|
2080
|
+
children: /* @__PURE__ */ jsx17(
|
|
1972
2081
|
"div",
|
|
1973
2082
|
{
|
|
1974
2083
|
className: "portal-content",
|
|
@@ -1978,23 +2087,23 @@ var PortalContent = React16.forwardRef(
|
|
|
1978
2087
|
)
|
|
1979
2088
|
}
|
|
1980
2089
|
);
|
|
1981
|
-
const content = themeContext ? /* @__PURE__ */
|
|
2090
|
+
const content = themeContext ? /* @__PURE__ */ jsx17(ThemeContext.Provider, { value: themeContext, children: portalContent }) : portalContent;
|
|
1982
2091
|
return ReactDOM.createPortal(content, container);
|
|
1983
2092
|
}
|
|
1984
2093
|
);
|
|
1985
2094
|
PortalContent.displayName = "Portal.Content";
|
|
1986
2095
|
|
|
1987
2096
|
// src/components/portal/root/portal-root.tsx
|
|
1988
|
-
import * as
|
|
2097
|
+
import * as React19 from "react";
|
|
1989
2098
|
|
|
1990
2099
|
// src/components/portal/trigger/portal-trigger.tsx
|
|
1991
|
-
import * as
|
|
1992
|
-
import { jsx as
|
|
1993
|
-
var PortalTrigger =
|
|
2100
|
+
import * as React18 from "react";
|
|
2101
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
2102
|
+
var PortalTrigger = React18.forwardRef(
|
|
1994
2103
|
({ children, asChild, onClick, ...props }, ref) => {
|
|
1995
2104
|
const context = usePortalContext();
|
|
1996
|
-
const internalRef =
|
|
1997
|
-
|
|
2105
|
+
const internalRef = React18.useRef(null);
|
|
2106
|
+
React18.useEffect(() => {
|
|
1998
2107
|
if (internalRef.current) {
|
|
1999
2108
|
context.triggerRef.current = internalRef.current;
|
|
2000
2109
|
}
|
|
@@ -2003,7 +2112,7 @@ var PortalTrigger = React17.forwardRef(
|
|
|
2003
2112
|
context.onOpenChange?.(!context.open);
|
|
2004
2113
|
onClick?.(event);
|
|
2005
2114
|
};
|
|
2006
|
-
const setRefs =
|
|
2115
|
+
const setRefs = React18.useCallback(
|
|
2007
2116
|
(node) => {
|
|
2008
2117
|
internalRef.current = node;
|
|
2009
2118
|
if (typeof ref === "function") {
|
|
@@ -2015,14 +2124,14 @@ var PortalTrigger = React17.forwardRef(
|
|
|
2015
2124
|
},
|
|
2016
2125
|
[ref, context.triggerRef]
|
|
2017
2126
|
);
|
|
2018
|
-
if (asChild &&
|
|
2019
|
-
return
|
|
2127
|
+
if (asChild && React18.isValidElement(children)) {
|
|
2128
|
+
return React18.cloneElement(children, {
|
|
2020
2129
|
ref: setRefs,
|
|
2021
2130
|
onClick: handleClick,
|
|
2022
2131
|
...props
|
|
2023
2132
|
});
|
|
2024
2133
|
}
|
|
2025
|
-
return /* @__PURE__ */
|
|
2134
|
+
return /* @__PURE__ */ jsx18(
|
|
2026
2135
|
"button",
|
|
2027
2136
|
{
|
|
2028
2137
|
ref: setRefs,
|
|
@@ -2061,7 +2170,7 @@ var PortalRootPropsDefs = {
|
|
|
2061
2170
|
};
|
|
2062
2171
|
|
|
2063
2172
|
// src/components/portal/root/portal-root.tsx
|
|
2064
|
-
import { jsx as
|
|
2173
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2065
2174
|
var ALLOWED_CHILDREN4 = [
|
|
2066
2175
|
PortalTrigger.displayName,
|
|
2067
2176
|
PortalBackdrop.displayName,
|
|
@@ -2080,8 +2189,8 @@ var PortalRoot = (props) => {
|
|
|
2080
2189
|
defaultValue: defaultOpen,
|
|
2081
2190
|
onChange: onOpenChange
|
|
2082
2191
|
});
|
|
2083
|
-
const triggerRef =
|
|
2084
|
-
const value =
|
|
2192
|
+
const triggerRef = React19.useRef(null);
|
|
2193
|
+
const value = React19.useMemo(
|
|
2085
2194
|
() => ({
|
|
2086
2195
|
open,
|
|
2087
2196
|
onOpenChange: setOpen,
|
|
@@ -2093,7 +2202,7 @@ var PortalRoot = (props) => {
|
|
|
2093
2202
|
const validChildren = filterChildren(children, ALLOWED_CHILDREN4, {
|
|
2094
2203
|
parentDisplayName: PortalRoot.displayName
|
|
2095
2204
|
});
|
|
2096
|
-
return /* @__PURE__ */
|
|
2205
|
+
return /* @__PURE__ */ jsx19(PortalContext.Provider, { value, children: validChildren });
|
|
2097
2206
|
};
|
|
2098
2207
|
PortalRoot.displayName = "Portal.Root";
|
|
2099
2208
|
|
|
@@ -2109,17 +2218,138 @@ var Portal = {
|
|
|
2109
2218
|
Backdrop: PortalBackdrop
|
|
2110
2219
|
};
|
|
2111
2220
|
|
|
2112
|
-
// src/components/
|
|
2221
|
+
// src/components/progress-bar/fill/progress-bar-fill.tsx
|
|
2113
2222
|
import clsx17 from "clsx";
|
|
2114
|
-
import
|
|
2223
|
+
import { useContext as useContext4 } from "react";
|
|
2224
|
+
|
|
2225
|
+
// src/components/progress-bar/progress-bar-context.ts
|
|
2226
|
+
import React20 from "react";
|
|
2227
|
+
var ProgressBarContext = React20.createContext(null);
|
|
2228
|
+
|
|
2229
|
+
// src/components/progress-bar/fill/progress-bar-fill.props.ts
|
|
2230
|
+
var ProgressBarFillPropsDefs = {
|
|
2231
|
+
/**
|
|
2232
|
+
* The value of the progress bar (filled state).
|
|
2233
|
+
* Should be a number between 0 and 1 representing the percentage of completion.
|
|
2234
|
+
*/
|
|
2235
|
+
value: {
|
|
2236
|
+
type: "number"
|
|
2237
|
+
}
|
|
2238
|
+
};
|
|
2239
|
+
|
|
2240
|
+
// src/components/progress-bar/fill/progress-bar-fill.tsx
|
|
2241
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
2242
|
+
var ProgressBarFill = (props) => {
|
|
2243
|
+
const context = useContext4(ProgressBarContext);
|
|
2244
|
+
const { value, color, style, className, dataAttrs, ...rest } = getComponentProps(props, ProgressBarFillPropsDefs);
|
|
2245
|
+
return /* @__PURE__ */ jsx20(
|
|
2246
|
+
"div",
|
|
2247
|
+
{
|
|
2248
|
+
"data-color": color ?? context?.color,
|
|
2249
|
+
"data-variant": context?.variant,
|
|
2250
|
+
style: { ...style, width: `${(value ?? 0) / ((context?.totalValue ?? 0) > 1 ? context.totalValue : 1) * 100}%` },
|
|
2251
|
+
className: clsx17("progress-bar-fill", className),
|
|
2252
|
+
...dataAttrs,
|
|
2253
|
+
...rest
|
|
2254
|
+
}
|
|
2255
|
+
);
|
|
2256
|
+
};
|
|
2257
|
+
ProgressBarFill.displayName = "ProgressBar.Fill";
|
|
2258
|
+
|
|
2259
|
+
// src/components/progress-bar/root/progress-bar-root.tsx
|
|
2260
|
+
import clsx18 from "clsx";
|
|
2261
|
+
import React21, { isValidElement as isValidElement4, useMemo as useMemo5 } from "react";
|
|
2262
|
+
|
|
2263
|
+
// src/components/progress-bar/root/progress-bar-root.props.ts
|
|
2264
|
+
var ProgressBarVariants = ["solid", "outlined", "muted"];
|
|
2265
|
+
var ProgressBarRootPropsDefs = {
|
|
2266
|
+
/**
|
|
2267
|
+
* Sets the variant style of the progress bar ("solid", "outlined", or "muted").
|
|
2268
|
+
*/
|
|
2269
|
+
variant: {
|
|
2270
|
+
type: "enum",
|
|
2271
|
+
values: ProgressBarVariants,
|
|
2272
|
+
dataAttr: "variant"
|
|
2273
|
+
},
|
|
2274
|
+
/**
|
|
2275
|
+
* The value of the progress bar (filled state).
|
|
2276
|
+
* Should be a number between 0 and 1 representing the percentage of completion.
|
|
2277
|
+
*/
|
|
2278
|
+
value: {
|
|
2279
|
+
type: "number"
|
|
2280
|
+
}
|
|
2281
|
+
};
|
|
2282
|
+
|
|
2283
|
+
// src/components/progress-bar/root/progress-bar-root.tsx
|
|
2284
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
2285
|
+
var ALLOWED_CHILDREN5 = [ProgressBarFill.displayName];
|
|
2286
|
+
var ProgressBarRoot = (props) => {
|
|
2287
|
+
const { value, size, color, variant, className, dataAttrs, ...rest } = getComponentProps(
|
|
2288
|
+
props,
|
|
2289
|
+
ProgressBarRootPropsDefs,
|
|
2290
|
+
MarginPropDefs,
|
|
2291
|
+
SizePropDef
|
|
2292
|
+
);
|
|
2293
|
+
const validChildren = filterChildren(props.children, ALLOWED_CHILDREN5, {
|
|
2294
|
+
parentDisplayName: ProgressBarRoot.displayName
|
|
2295
|
+
});
|
|
2296
|
+
const { fills, totalValue } = useMemo5(() => {
|
|
2297
|
+
const fills2 = validChildren.filter(
|
|
2298
|
+
(child) => isValidElement4(child) && child.type.displayName === ProgressBarFill.displayName
|
|
2299
|
+
);
|
|
2300
|
+
if (fills2.length > 0) {
|
|
2301
|
+
const totalValue2 = fills2.reduce(
|
|
2302
|
+
(sum, child) => sum + (isValidElement4(child) ? child.props.value ?? 0 : 0),
|
|
2303
|
+
0
|
|
2304
|
+
);
|
|
2305
|
+
return {
|
|
2306
|
+
fills: fills2,
|
|
2307
|
+
totalValue: totalValue2
|
|
2308
|
+
};
|
|
2309
|
+
}
|
|
2310
|
+
return {
|
|
2311
|
+
fills: [/* @__PURE__ */ jsx21(ProgressBarFill, { color, value })],
|
|
2312
|
+
totalValue: value ?? 0
|
|
2313
|
+
};
|
|
2314
|
+
}, [validChildren, color, value]);
|
|
2315
|
+
return /* @__PURE__ */ jsx21(ProgressBarContext.Provider, { value: { color, variant, totalValue }, children: /* @__PURE__ */ jsx21(
|
|
2316
|
+
"div",
|
|
2317
|
+
{
|
|
2318
|
+
"data-size": size,
|
|
2319
|
+
"data-color": color,
|
|
2320
|
+
"data-variant": variant,
|
|
2321
|
+
className: clsx18("progress-bar-root", className),
|
|
2322
|
+
...dataAttrs,
|
|
2323
|
+
...rest,
|
|
2324
|
+
children: fills.map((fill, index) => /* @__PURE__ */ jsx21(React21.Fragment, { children: fill }, index))
|
|
2325
|
+
}
|
|
2326
|
+
) });
|
|
2327
|
+
};
|
|
2328
|
+
ProgressBarRoot.displayName = "ProgressBar.Root";
|
|
2329
|
+
|
|
2330
|
+
// src/components/progress-bar/progress-bar.tsx
|
|
2331
|
+
var ProgressBar = Object.assign(ProgressBarRoot, {
|
|
2332
|
+
/**
|
|
2333
|
+
* The root component for the Progress Bar.
|
|
2334
|
+
*/
|
|
2335
|
+
Root: ProgressBarRoot,
|
|
2336
|
+
/**
|
|
2337
|
+
* The fill component for the Progress Bar, representing the filled portion.
|
|
2338
|
+
*/
|
|
2339
|
+
Fill: ProgressBarFill
|
|
2340
|
+
});
|
|
2341
|
+
|
|
2342
|
+
// src/components/select/content/select-content.tsx
|
|
2343
|
+
import clsx20 from "clsx";
|
|
2344
|
+
import * as React25 from "react";
|
|
2115
2345
|
|
|
2116
2346
|
// src/components/select/select-context.tsx
|
|
2117
|
-
import * as
|
|
2118
|
-
var SelectContext =
|
|
2347
|
+
import * as React22 from "react";
|
|
2348
|
+
var SelectContext = React22.createContext(
|
|
2119
2349
|
null
|
|
2120
2350
|
);
|
|
2121
2351
|
function useSelectContext() {
|
|
2122
|
-
const context =
|
|
2352
|
+
const context = React22.useContext(SelectContext);
|
|
2123
2353
|
if (!context) {
|
|
2124
2354
|
throw new Error("Select components must be used within a Select.Root");
|
|
2125
2355
|
}
|
|
@@ -2127,9 +2357,9 @@ function useSelectContext() {
|
|
|
2127
2357
|
}
|
|
2128
2358
|
|
|
2129
2359
|
// src/components/select/utils/user-composed-refs.ts
|
|
2130
|
-
import * as
|
|
2360
|
+
import * as React23 from "react";
|
|
2131
2361
|
function useComposedRefs(...refs) {
|
|
2132
|
-
return
|
|
2362
|
+
return React23.useCallback(
|
|
2133
2363
|
(node) => {
|
|
2134
2364
|
refs.forEach((ref) => {
|
|
2135
2365
|
if (typeof ref === "function") {
|
|
@@ -2144,20 +2374,20 @@ function useComposedRefs(...refs) {
|
|
|
2144
2374
|
}
|
|
2145
2375
|
|
|
2146
2376
|
// src/components/select/viewport/select-viewport.tsx
|
|
2147
|
-
import
|
|
2148
|
-
import * as
|
|
2149
|
-
import { jsx as
|
|
2150
|
-
var SelectViewport =
|
|
2377
|
+
import clsx19 from "clsx";
|
|
2378
|
+
import * as React24 from "react";
|
|
2379
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
2380
|
+
var SelectViewport = React24.forwardRef(
|
|
2151
2381
|
(props, ref) => {
|
|
2152
2382
|
const { className, children, ...rest } = props;
|
|
2153
|
-
return /* @__PURE__ */
|
|
2383
|
+
return /* @__PURE__ */ jsx22("div", { ref, className: clsx19("select-viewport", className), ...rest, children });
|
|
2154
2384
|
}
|
|
2155
2385
|
);
|
|
2156
2386
|
SelectViewport.displayName = "Select.Viewport";
|
|
2157
2387
|
|
|
2158
2388
|
// src/components/select/content/select-content.tsx
|
|
2159
|
-
import { jsx as
|
|
2160
|
-
var SelectContent =
|
|
2389
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2390
|
+
var SelectContent = React25.forwardRef(
|
|
2161
2391
|
(props, forwardedRef) => {
|
|
2162
2392
|
const {
|
|
2163
2393
|
className,
|
|
@@ -2170,10 +2400,10 @@ var SelectContent = React22.forwardRef(
|
|
|
2170
2400
|
} = props;
|
|
2171
2401
|
const context = useSelectContext();
|
|
2172
2402
|
const composedRef = useComposedRefs(forwardedRef, context.contentRef);
|
|
2173
|
-
|
|
2403
|
+
React25.useEffect(() => {
|
|
2174
2404
|
context.itemValues.current = [];
|
|
2175
2405
|
}, [context.open]);
|
|
2176
|
-
|
|
2406
|
+
React25.useEffect(() => {
|
|
2177
2407
|
if (!context.open) return;
|
|
2178
2408
|
const handleClickOutside = (event) => {
|
|
2179
2409
|
const target = event.target;
|
|
@@ -2184,7 +2414,7 @@ var SelectContent = React22.forwardRef(
|
|
|
2184
2414
|
document.addEventListener("mousedown", handleClickOutside);
|
|
2185
2415
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
2186
2416
|
}, [context.open]);
|
|
2187
|
-
|
|
2417
|
+
React25.useEffect(() => {
|
|
2188
2418
|
if (!context.open) return;
|
|
2189
2419
|
const handleKeyDown = (event) => {
|
|
2190
2420
|
const items = context.itemValues.current;
|
|
@@ -2237,24 +2467,24 @@ var SelectContent = React22.forwardRef(
|
|
|
2237
2467
|
document.addEventListener("keydown", handleKeyDown);
|
|
2238
2468
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
2239
2469
|
}, [context.open, context.highlightedIndex]);
|
|
2240
|
-
const [contentWidth, setContentWidth] =
|
|
2470
|
+
const [contentWidth, setContentWidth] = React25.useState();
|
|
2241
2471
|
const labelInside = context.labelPosition === "inside";
|
|
2242
2472
|
const anchorRef = labelInside ? context.rootRef : context.triggerRef;
|
|
2243
|
-
|
|
2473
|
+
React25.useLayoutEffect(() => {
|
|
2244
2474
|
if (context.open && anchorRef.current) {
|
|
2245
2475
|
setContentWidth(anchorRef.current.getBoundingClientRect().width);
|
|
2246
2476
|
}
|
|
2247
2477
|
}, [context.open, context.labelPosition, anchorRef]);
|
|
2248
2478
|
if (!context.open) {
|
|
2249
|
-
return /* @__PURE__ */
|
|
2479
|
+
return /* @__PURE__ */ jsx23("div", { style: { display: "none" }, "aria-hidden": "true", children });
|
|
2250
2480
|
}
|
|
2251
|
-
return /* @__PURE__ */
|
|
2481
|
+
return /* @__PURE__ */ jsx23(
|
|
2252
2482
|
Portal.Root,
|
|
2253
2483
|
{
|
|
2254
2484
|
open: context.open,
|
|
2255
2485
|
onOpenChange: context.onOpenChange,
|
|
2256
2486
|
anchorRef,
|
|
2257
|
-
children: /* @__PURE__ */
|
|
2487
|
+
children: /* @__PURE__ */ jsx23(Portal.Content, { anchored: true, side, align, sideOffset: offset, children: /* @__PURE__ */ jsx23(
|
|
2258
2488
|
"div",
|
|
2259
2489
|
{
|
|
2260
2490
|
ref: composedRef,
|
|
@@ -2263,10 +2493,10 @@ var SelectContent = React22.forwardRef(
|
|
|
2263
2493
|
"data-side": side,
|
|
2264
2494
|
"data-align": align,
|
|
2265
2495
|
"data-trigger-variant": context.triggerVariant,
|
|
2266
|
-
className:
|
|
2496
|
+
className: clsx20("select-content", className),
|
|
2267
2497
|
style: { width: contentWidth },
|
|
2268
2498
|
...rest,
|
|
2269
|
-
children: /* @__PURE__ */
|
|
2499
|
+
children: /* @__PURE__ */ jsx23(SelectViewport, { children })
|
|
2270
2500
|
}
|
|
2271
2501
|
) })
|
|
2272
2502
|
}
|
|
@@ -2276,8 +2506,8 @@ var SelectContent = React22.forwardRef(
|
|
|
2276
2506
|
SelectContent.displayName = "Select.Content";
|
|
2277
2507
|
|
|
2278
2508
|
// src/components/select/group/select-group.tsx
|
|
2279
|
-
import
|
|
2280
|
-
import * as
|
|
2509
|
+
import clsx21 from "clsx";
|
|
2510
|
+
import * as React26 from "react";
|
|
2281
2511
|
|
|
2282
2512
|
// src/components/select/group/select-group.props.ts
|
|
2283
2513
|
var SelectGroupsPropDefs = {
|
|
@@ -2287,8 +2517,8 @@ var SelectGroupsPropDefs = {
|
|
|
2287
2517
|
};
|
|
2288
2518
|
|
|
2289
2519
|
// src/components/select/group/select-group.tsx
|
|
2290
|
-
import { jsx as
|
|
2291
|
-
var SelectGroup =
|
|
2520
|
+
import { jsx as jsx24, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2521
|
+
var SelectGroup = React26.forwardRef(
|
|
2292
2522
|
(props, ref) => {
|
|
2293
2523
|
const { className, children, dataAttrs, ...rest } = getComponentProps(
|
|
2294
2524
|
props,
|
|
@@ -2299,10 +2529,10 @@ var SelectGroup = React23.forwardRef(
|
|
|
2299
2529
|
{
|
|
2300
2530
|
ref,
|
|
2301
2531
|
role: "group",
|
|
2302
|
-
className:
|
|
2532
|
+
className: clsx21("select-group", className),
|
|
2303
2533
|
...rest,
|
|
2304
2534
|
children: [
|
|
2305
|
-
/* @__PURE__ */
|
|
2535
|
+
/* @__PURE__ */ jsx24(Text, { className: "select-group-label", disabled: true, children: props.title }),
|
|
2306
2536
|
children
|
|
2307
2537
|
]
|
|
2308
2538
|
}
|
|
@@ -2312,13 +2542,13 @@ var SelectGroup = React23.forwardRef(
|
|
|
2312
2542
|
SelectGroup.displayName = "Select.Group";
|
|
2313
2543
|
|
|
2314
2544
|
// src/components/select/item/select-item.tsx
|
|
2315
|
-
import
|
|
2316
|
-
import * as
|
|
2545
|
+
import clsx22 from "clsx";
|
|
2546
|
+
import * as React27 from "react";
|
|
2317
2547
|
|
|
2318
2548
|
// src/components/select/item/select-item-indicator.tsx
|
|
2319
|
-
import { jsx as
|
|
2549
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2320
2550
|
var SelectItemIndicator = () => {
|
|
2321
|
-
return /* @__PURE__ */
|
|
2551
|
+
return /* @__PURE__ */ jsx25("span", { className: "select-item-indicator", children: /* @__PURE__ */ jsx25(
|
|
2322
2552
|
"svg",
|
|
2323
2553
|
{
|
|
2324
2554
|
width: "20",
|
|
@@ -2326,7 +2556,7 @@ var SelectItemIndicator = () => {
|
|
|
2326
2556
|
viewBox: "0 0 15 15",
|
|
2327
2557
|
fill: "none",
|
|
2328
2558
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2329
|
-
children: /* @__PURE__ */
|
|
2559
|
+
children: /* @__PURE__ */ jsx25(
|
|
2330
2560
|
"path",
|
|
2331
2561
|
{
|
|
2332
2562
|
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",
|
|
@@ -2351,8 +2581,8 @@ var SelectItemPropDefs = {
|
|
|
2351
2581
|
};
|
|
2352
2582
|
|
|
2353
2583
|
// src/components/select/item/select-item.tsx
|
|
2354
|
-
import { jsx as
|
|
2355
|
-
var SelectItem =
|
|
2584
|
+
import { jsx as jsx26, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2585
|
+
var SelectItem = React27.forwardRef(
|
|
2356
2586
|
(props, ref) => {
|
|
2357
2587
|
const context = useSelectContext();
|
|
2358
2588
|
const { value, disabled, children, className, ...rest } = getComponentProps(
|
|
@@ -2360,12 +2590,12 @@ var SelectItem = React24.forwardRef(
|
|
|
2360
2590
|
SelectItemPropDefs
|
|
2361
2591
|
);
|
|
2362
2592
|
const selected = context.value === value;
|
|
2363
|
-
|
|
2593
|
+
React27.useEffect(() => {
|
|
2364
2594
|
if (selected && children) {
|
|
2365
2595
|
context.setDisplayValue(children);
|
|
2366
2596
|
}
|
|
2367
2597
|
}, [selected]);
|
|
2368
|
-
|
|
2598
|
+
React27.useEffect(() => {
|
|
2369
2599
|
if (!value) return;
|
|
2370
2600
|
if (!disabled) {
|
|
2371
2601
|
const values = context.itemValues.current;
|
|
@@ -2404,20 +2634,20 @@ var SelectItem = React24.forwardRef(
|
|
|
2404
2634
|
"data-state": selected ? "checked" : "unchecked",
|
|
2405
2635
|
"data-highlighted": isHighlighted ? "" : void 0,
|
|
2406
2636
|
"data-disabled": disabled ? "" : void 0,
|
|
2407
|
-
className:
|
|
2637
|
+
className: clsx22("select-item", className),
|
|
2408
2638
|
onClick: handleClick,
|
|
2409
2639
|
onMouseEnter: handleMouseEnter,
|
|
2410
2640
|
...rest,
|
|
2411
2641
|
children: [
|
|
2412
|
-
/* @__PURE__ */
|
|
2642
|
+
/* @__PURE__ */ jsx26(
|
|
2413
2643
|
Box,
|
|
2414
2644
|
{
|
|
2415
2645
|
style: { width: 24, height: 24, justifyContent: "center" },
|
|
2416
2646
|
className: "flex items-center",
|
|
2417
|
-
children: selected && /* @__PURE__ */
|
|
2647
|
+
children: selected && /* @__PURE__ */ jsx26(SelectItemIndicator, {})
|
|
2418
2648
|
}
|
|
2419
2649
|
),
|
|
2420
|
-
/* @__PURE__ */
|
|
2650
|
+
/* @__PURE__ */ jsx26(Text, { disabled, children })
|
|
2421
2651
|
]
|
|
2422
2652
|
}
|
|
2423
2653
|
);
|
|
@@ -2426,8 +2656,8 @@ var SelectItem = React24.forwardRef(
|
|
|
2426
2656
|
SelectItem.displayName = "Select.Item";
|
|
2427
2657
|
|
|
2428
2658
|
// src/components/select/label/select-label.tsx
|
|
2429
|
-
import
|
|
2430
|
-
import * as
|
|
2659
|
+
import clsx23 from "clsx";
|
|
2660
|
+
import * as React28 from "react";
|
|
2431
2661
|
|
|
2432
2662
|
// src/components/select/label/select-label.props.ts
|
|
2433
2663
|
var labelPositions2 = ["top", "left", "inside"];
|
|
@@ -2441,25 +2671,25 @@ var SelectLabelPropDefs = {
|
|
|
2441
2671
|
};
|
|
2442
2672
|
|
|
2443
2673
|
// src/components/select/label/select-label.tsx
|
|
2444
|
-
import { jsx as
|
|
2445
|
-
var SelectLabel =
|
|
2674
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
2675
|
+
var SelectLabel = React28.forwardRef(
|
|
2446
2676
|
(props, ref) => {
|
|
2447
2677
|
const context = useSelectContext();
|
|
2448
2678
|
const { className, children, position, dataAttrs } = getComponentProps(
|
|
2449
2679
|
props,
|
|
2450
2680
|
SelectLabelPropDefs
|
|
2451
2681
|
);
|
|
2452
|
-
|
|
2682
|
+
React28.useLayoutEffect(() => {
|
|
2453
2683
|
context.setLabelPosition?.(position ?? "top");
|
|
2454
2684
|
}, [position, context.setLabelPosition]);
|
|
2455
|
-
return /* @__PURE__ */
|
|
2685
|
+
return /* @__PURE__ */ jsx27(
|
|
2456
2686
|
"label",
|
|
2457
2687
|
{
|
|
2458
2688
|
ref,
|
|
2459
2689
|
htmlFor: context.labelId,
|
|
2460
|
-
className:
|
|
2690
|
+
className: clsx23("select-label", className),
|
|
2461
2691
|
...dataAttrs,
|
|
2462
|
-
children: /* @__PURE__ */
|
|
2692
|
+
children: /* @__PURE__ */ jsx27(Text, { disabled: context.disabled, children })
|
|
2463
2693
|
}
|
|
2464
2694
|
);
|
|
2465
2695
|
}
|
|
@@ -2467,36 +2697,36 @@ var SelectLabel = React25.forwardRef(
|
|
|
2467
2697
|
SelectLabel.displayName = "Select.Label";
|
|
2468
2698
|
|
|
2469
2699
|
// src/components/select/root/select-root.tsx
|
|
2470
|
-
import
|
|
2700
|
+
import clsx27 from "clsx";
|
|
2471
2701
|
import {
|
|
2472
2702
|
useId as useId2,
|
|
2473
2703
|
useLayoutEffect as useLayoutEffect3,
|
|
2474
|
-
useMemo as
|
|
2704
|
+
useMemo as useMemo6,
|
|
2475
2705
|
useRef as useRef5,
|
|
2476
2706
|
useState as useState6
|
|
2477
2707
|
} from "react";
|
|
2478
2708
|
|
|
2479
2709
|
// src/components/select/trigger/select-trigger.tsx
|
|
2480
|
-
import
|
|
2481
|
-
import * as
|
|
2710
|
+
import clsx26 from "clsx";
|
|
2711
|
+
import * as React30 from "react";
|
|
2482
2712
|
|
|
2483
2713
|
// src/components/select/value/select-value.tsx
|
|
2484
|
-
import
|
|
2485
|
-
import * as
|
|
2486
|
-
import { jsx as
|
|
2487
|
-
var SelectValue =
|
|
2714
|
+
import clsx24 from "clsx";
|
|
2715
|
+
import * as React29 from "react";
|
|
2716
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2717
|
+
var SelectValue = React29.forwardRef(
|
|
2488
2718
|
(props, ref) => {
|
|
2489
2719
|
const { className, placeholder: placeholderProp, ...rest } = props;
|
|
2490
2720
|
const context = useSelectContext();
|
|
2491
2721
|
const placeholder = placeholderProp ?? context.placeholder;
|
|
2492
|
-
return /* @__PURE__ */
|
|
2722
|
+
return /* @__PURE__ */ jsx28(
|
|
2493
2723
|
"span",
|
|
2494
2724
|
{
|
|
2495
2725
|
ref,
|
|
2496
|
-
className:
|
|
2726
|
+
className: clsx24("select-value", className),
|
|
2497
2727
|
"data-placeholder": !context.value ? "" : void 0,
|
|
2498
2728
|
...rest,
|
|
2499
|
-
children: /* @__PURE__ */
|
|
2729
|
+
children: /* @__PURE__ */ jsx28(Text, { disabled: context.disabled, children: context.displayValue || placeholder })
|
|
2500
2730
|
}
|
|
2501
2731
|
);
|
|
2502
2732
|
}
|
|
@@ -2504,21 +2734,21 @@ var SelectValue = React26.forwardRef(
|
|
|
2504
2734
|
SelectValue.displayName = "Select.Value";
|
|
2505
2735
|
|
|
2506
2736
|
// src/components/select/trigger/select-trigger-icon.tsx
|
|
2507
|
-
import
|
|
2508
|
-
import { jsx as
|
|
2737
|
+
import clsx25 from "clsx";
|
|
2738
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2509
2739
|
var SelectTriggerIcon = (props) => {
|
|
2510
2740
|
const { className, ...rest } = props;
|
|
2511
|
-
return /* @__PURE__ */
|
|
2741
|
+
return /* @__PURE__ */ jsx29(
|
|
2512
2742
|
"svg",
|
|
2513
2743
|
{
|
|
2514
|
-
className:
|
|
2744
|
+
className: clsx25("select-trigger-icon", className),
|
|
2515
2745
|
width: "20",
|
|
2516
2746
|
height: "20",
|
|
2517
2747
|
viewBox: "0 0 15 15",
|
|
2518
2748
|
fill: "none",
|
|
2519
2749
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2520
2750
|
...rest,
|
|
2521
|
-
children: /* @__PURE__ */
|
|
2751
|
+
children: /* @__PURE__ */ jsx29(
|
|
2522
2752
|
"path",
|
|
2523
2753
|
{
|
|
2524
2754
|
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",
|
|
@@ -2535,8 +2765,8 @@ var SelectTriggerIcon = (props) => {
|
|
|
2535
2765
|
var SelectTriggerPropsDefs = {};
|
|
2536
2766
|
|
|
2537
2767
|
// src/components/select/trigger/select-trigger.tsx
|
|
2538
|
-
import { jsx as
|
|
2539
|
-
var SelectTrigger =
|
|
2768
|
+
import { jsx as jsx30, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2769
|
+
var SelectTrigger = React30.forwardRef(
|
|
2540
2770
|
(props, forwardedRef) => {
|
|
2541
2771
|
const {
|
|
2542
2772
|
className,
|
|
@@ -2572,11 +2802,11 @@ var SelectTrigger = React27.forwardRef(
|
|
|
2572
2802
|
"data-state": context.open ? "open" : "closed",
|
|
2573
2803
|
"data-disabled": disabled ? "" : void 0,
|
|
2574
2804
|
"data-variant": context.triggerVariant,
|
|
2575
|
-
className:
|
|
2805
|
+
className: clsx26("select-trigger", className),
|
|
2576
2806
|
...dataAttrs,
|
|
2577
2807
|
children: [
|
|
2578
|
-
/* @__PURE__ */
|
|
2579
|
-
/* @__PURE__ */
|
|
2808
|
+
/* @__PURE__ */ jsx30(SelectValue, {}),
|
|
2809
|
+
/* @__PURE__ */ jsx30(SelectTriggerIcon, {})
|
|
2580
2810
|
]
|
|
2581
2811
|
}
|
|
2582
2812
|
);
|
|
@@ -2593,14 +2823,14 @@ var SelectTrigger = React27.forwardRef(
|
|
|
2593
2823
|
disabled,
|
|
2594
2824
|
"data-state": context.open ? "open" : "closed",
|
|
2595
2825
|
"data-disabled": disabled ? "" : void 0,
|
|
2596
|
-
className:
|
|
2826
|
+
className: clsx26("select-trigger", className),
|
|
2597
2827
|
onClick: handleClick,
|
|
2598
2828
|
onKeyDown: handleKeyDown,
|
|
2599
2829
|
"data-variant": context.triggerVariant,
|
|
2600
2830
|
...dataAttrs,
|
|
2601
2831
|
children: [
|
|
2602
|
-
/* @__PURE__ */
|
|
2603
|
-
/* @__PURE__ */
|
|
2832
|
+
/* @__PURE__ */ jsx30(SelectValue, {}),
|
|
2833
|
+
/* @__PURE__ */ jsx30(SelectTriggerIcon, {})
|
|
2604
2834
|
]
|
|
2605
2835
|
}
|
|
2606
2836
|
);
|
|
@@ -2640,8 +2870,8 @@ var SelectRootPropsDefs = {
|
|
|
2640
2870
|
};
|
|
2641
2871
|
|
|
2642
2872
|
// src/components/select/root/select-root.tsx
|
|
2643
|
-
import { jsx as
|
|
2644
|
-
var
|
|
2873
|
+
import { jsx as jsx31, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2874
|
+
var ALLOWED_CHILDREN6 = [
|
|
2645
2875
|
SelectLabel.displayName,
|
|
2646
2876
|
SelectTrigger.displayName,
|
|
2647
2877
|
SelectContent.displayName
|
|
@@ -2682,7 +2912,7 @@ var SelectRoot = (props) => {
|
|
|
2682
2912
|
const contentRef = useRef5(null);
|
|
2683
2913
|
const itemsRef = useRef5(/* @__PURE__ */ new Map());
|
|
2684
2914
|
const itemValues = useRef5([]);
|
|
2685
|
-
const contextValue =
|
|
2915
|
+
const contextValue = useMemo6(
|
|
2686
2916
|
() => ({
|
|
2687
2917
|
open,
|
|
2688
2918
|
value,
|
|
@@ -2724,7 +2954,7 @@ var SelectRoot = (props) => {
|
|
|
2724
2954
|
useLayoutEffect3(() => {
|
|
2725
2955
|
setTriggerVariant?.(variant ?? "outlined");
|
|
2726
2956
|
}, [variant, setTriggerVariant]);
|
|
2727
|
-
const validChildren = filterChildren(children,
|
|
2957
|
+
const validChildren = filterChildren(children, ALLOWED_CHILDREN6, {
|
|
2728
2958
|
parentDisplayName: SelectRoot.displayName
|
|
2729
2959
|
});
|
|
2730
2960
|
const labelInside = labelPosition === "inside";
|
|
@@ -2746,7 +2976,7 @@ var SelectRoot = (props) => {
|
|
|
2746
2976
|
}
|
|
2747
2977
|
};
|
|
2748
2978
|
if (labelInside) {
|
|
2749
|
-
return /* @__PURE__ */
|
|
2979
|
+
return /* @__PURE__ */ jsx31(SelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs8(
|
|
2750
2980
|
"button",
|
|
2751
2981
|
{
|
|
2752
2982
|
type: "button",
|
|
@@ -2758,26 +2988,26 @@ var SelectRoot = (props) => {
|
|
|
2758
2988
|
ref: rootRef,
|
|
2759
2989
|
"data-state": open ? "open" : "closed",
|
|
2760
2990
|
"data-disabled": disabled ? "" : void 0,
|
|
2761
|
-
className:
|
|
2991
|
+
className: clsx27("select-root", className),
|
|
2762
2992
|
onClick: handleClick,
|
|
2763
2993
|
onKeyDown: handleKeyDown,
|
|
2764
2994
|
...dataAttrs,
|
|
2765
2995
|
children: [
|
|
2766
2996
|
validChildren,
|
|
2767
|
-
name && /* @__PURE__ */
|
|
2997
|
+
name && /* @__PURE__ */ jsx31("input", { type: "hidden", name, value })
|
|
2768
2998
|
]
|
|
2769
2999
|
}
|
|
2770
3000
|
) });
|
|
2771
3001
|
}
|
|
2772
|
-
return /* @__PURE__ */
|
|
3002
|
+
return /* @__PURE__ */ jsx31(SelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs8(
|
|
2773
3003
|
Box,
|
|
2774
3004
|
{
|
|
2775
3005
|
ref: rootRef,
|
|
2776
|
-
className:
|
|
3006
|
+
className: clsx27("select-root", className),
|
|
2777
3007
|
...dataAttrs,
|
|
2778
3008
|
children: [
|
|
2779
3009
|
validChildren,
|
|
2780
|
-
name && /* @__PURE__ */
|
|
3010
|
+
name && /* @__PURE__ */ jsx31("input", { type: "hidden", name, value })
|
|
2781
3011
|
]
|
|
2782
3012
|
}
|
|
2783
3013
|
) });
|
|
@@ -2785,17 +3015,17 @@ var SelectRoot = (props) => {
|
|
|
2785
3015
|
SelectRoot.displayName = "Select.Root";
|
|
2786
3016
|
|
|
2787
3017
|
// src/components/select/separator/select-separator.tsx
|
|
2788
|
-
import
|
|
2789
|
-
import * as
|
|
2790
|
-
import { jsx as
|
|
2791
|
-
var SelectSeparator =
|
|
3018
|
+
import clsx28 from "clsx";
|
|
3019
|
+
import * as React31 from "react";
|
|
3020
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3021
|
+
var SelectSeparator = React31.forwardRef(
|
|
2792
3022
|
(props, ref) => {
|
|
2793
3023
|
const { className, ...rest } = props;
|
|
2794
|
-
return /* @__PURE__ */
|
|
3024
|
+
return /* @__PURE__ */ jsx32(
|
|
2795
3025
|
"div",
|
|
2796
3026
|
{
|
|
2797
3027
|
ref,
|
|
2798
|
-
className:
|
|
3028
|
+
className: clsx28("select-separator", className),
|
|
2799
3029
|
...rest
|
|
2800
3030
|
}
|
|
2801
3031
|
);
|
|
@@ -2816,7 +3046,7 @@ var Select = {
|
|
|
2816
3046
|
};
|
|
2817
3047
|
|
|
2818
3048
|
// src/components/separator/separator.tsx
|
|
2819
|
-
import
|
|
3049
|
+
import clsx29 from "clsx";
|
|
2820
3050
|
|
|
2821
3051
|
// src/components/separator/separator.props.ts
|
|
2822
3052
|
var directions = ["horizontal", "vertical"];
|
|
@@ -2847,16 +3077,16 @@ var SeparatorPropsDefs = {
|
|
|
2847
3077
|
};
|
|
2848
3078
|
|
|
2849
3079
|
// src/components/separator/separator.tsx
|
|
2850
|
-
import { jsx as
|
|
3080
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2851
3081
|
var Separator = (props) => {
|
|
2852
3082
|
const { className, dataAttrs, style } = getComponentProps(
|
|
2853
3083
|
props,
|
|
2854
3084
|
SeparatorPropsDefs
|
|
2855
3085
|
);
|
|
2856
|
-
return /* @__PURE__ */
|
|
3086
|
+
return /* @__PURE__ */ jsx33(
|
|
2857
3087
|
"div",
|
|
2858
3088
|
{
|
|
2859
|
-
className:
|
|
3089
|
+
className: clsx29("separator", className),
|
|
2860
3090
|
style,
|
|
2861
3091
|
...dataAttrs
|
|
2862
3092
|
}
|
|
@@ -2865,16 +3095,16 @@ var Separator = (props) => {
|
|
|
2865
3095
|
Separator.displayName = "Separator";
|
|
2866
3096
|
|
|
2867
3097
|
// src/components/theme/theme.tsx
|
|
2868
|
-
import * as
|
|
2869
|
-
import { jsx as
|
|
2870
|
-
var Theme =
|
|
2871
|
-
const context =
|
|
3098
|
+
import * as React32 from "react";
|
|
3099
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3100
|
+
var Theme = React32.forwardRef((props, ref) => {
|
|
3101
|
+
const context = React32.useContext(ThemeContext);
|
|
2872
3102
|
const isRoot = context === void 0;
|
|
2873
|
-
if (isRoot) return /* @__PURE__ */
|
|
2874
|
-
return /* @__PURE__ */
|
|
3103
|
+
if (isRoot) return /* @__PURE__ */ jsx34(ThemeRoot, { ...props, ref });
|
|
3104
|
+
return /* @__PURE__ */ jsx34(ThemeSub, { ...props, ref });
|
|
2875
3105
|
});
|
|
2876
3106
|
Theme.displayName = "Theme";
|
|
2877
|
-
var ThemeRoot =
|
|
3107
|
+
var ThemeRoot = React32.forwardRef((props, ref) => {
|
|
2878
3108
|
const {
|
|
2879
3109
|
appearance: themeAppearance,
|
|
2880
3110
|
radius: themeRadius,
|
|
@@ -2883,15 +3113,15 @@ var ThemeRoot = React29.forwardRef((props, ref) => {
|
|
|
2883
3113
|
children,
|
|
2884
3114
|
...rest
|
|
2885
3115
|
} = props;
|
|
2886
|
-
const [appearance, setAppearance] =
|
|
3116
|
+
const [appearance, setAppearance] = React32.useState(
|
|
2887
3117
|
themeAppearance ?? "light"
|
|
2888
3118
|
);
|
|
2889
|
-
const [radius, setRadius] =
|
|
2890
|
-
const [roundness2, setRoundness] =
|
|
3119
|
+
const [radius, setRadius] = React32.useState(themeRadius ?? "md");
|
|
3120
|
+
const [roundness2, setRoundness] = React32.useState(
|
|
2891
3121
|
themeRoundness ?? "3"
|
|
2892
3122
|
);
|
|
2893
|
-
const [spacing, setSpacing] =
|
|
2894
|
-
const value =
|
|
3123
|
+
const [spacing, setSpacing] = React32.useState(themeSpacing ?? "md");
|
|
3124
|
+
const value = React32.useMemo(
|
|
2895
3125
|
() => ({
|
|
2896
3126
|
appearance,
|
|
2897
3127
|
radius,
|
|
@@ -2904,7 +3134,7 @@ var ThemeRoot = React29.forwardRef((props, ref) => {
|
|
|
2904
3134
|
}),
|
|
2905
3135
|
[appearance, radius, roundness2, spacing]
|
|
2906
3136
|
);
|
|
2907
|
-
return /* @__PURE__ */
|
|
3137
|
+
return /* @__PURE__ */ jsx34(ThemeContext.Provider, { value, children: /* @__PURE__ */ jsx34(
|
|
2908
3138
|
"div",
|
|
2909
3139
|
{
|
|
2910
3140
|
ref,
|
|
@@ -2918,8 +3148,8 @@ var ThemeRoot = React29.forwardRef((props, ref) => {
|
|
|
2918
3148
|
) });
|
|
2919
3149
|
});
|
|
2920
3150
|
ThemeRoot.displayName = "ThemeRoot";
|
|
2921
|
-
var ThemeSub =
|
|
2922
|
-
const context =
|
|
3151
|
+
var ThemeSub = React32.forwardRef((props, ref) => {
|
|
3152
|
+
const context = React32.useContext(ThemeContext);
|
|
2923
3153
|
const {
|
|
2924
3154
|
appearance,
|
|
2925
3155
|
radius,
|
|
@@ -2942,7 +3172,7 @@ var ThemeSub = React29.forwardRef((props, ref) => {
|
|
|
2942
3172
|
onRoundnessChange: context.onRoundnessChange,
|
|
2943
3173
|
onSpacingChange: context.onSpacingChange
|
|
2944
3174
|
};
|
|
2945
|
-
return /* @__PURE__ */
|
|
3175
|
+
return /* @__PURE__ */ jsx34(ThemeContext.Provider, { value: contextProps, children: /* @__PURE__ */ jsx34(
|
|
2946
3176
|
"div",
|
|
2947
3177
|
{
|
|
2948
3178
|
ref,
|
|
@@ -2959,8 +3189,9 @@ var ThemeSub = React29.forwardRef((props, ref) => {
|
|
|
2959
3189
|
ThemeSub.displayName = "ThemeSub";
|
|
2960
3190
|
|
|
2961
3191
|
// src/components/theme/theme-control.tsx
|
|
2962
|
-
import {
|
|
2963
|
-
|
|
3192
|
+
import { useEffect as useEffect7, useState as useState8 } from "react";
|
|
3193
|
+
import { jsx as jsx35, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3194
|
+
function ThemeControl({ position = "bottom" }) {
|
|
2964
3195
|
const {
|
|
2965
3196
|
appearance,
|
|
2966
3197
|
onAppearanceChange,
|
|
@@ -2971,84 +3202,103 @@ function ThemeControl() {
|
|
|
2971
3202
|
spacing,
|
|
2972
3203
|
onSpacingChange
|
|
2973
3204
|
} = useTheme();
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
{
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
onValueChange: (change) => onAppearanceChange?.(change),
|
|
2981
|
-
children: [
|
|
2982
|
-
/* @__PURE__ */ jsx32(Select.Label, { position: "inside", children: "Theme Settings" }),
|
|
2983
|
-
/* @__PURE__ */ jsx32(Select.Trigger, {}),
|
|
2984
|
-
/* @__PURE__ */ jsxs9(Select.Content, { children: [
|
|
2985
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "light", children: "Light" }),
|
|
2986
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "dark", children: "Dark" })
|
|
2987
|
-
] })
|
|
2988
|
-
]
|
|
2989
|
-
}
|
|
2990
|
-
),
|
|
2991
|
-
/* @__PURE__ */ jsxs9(
|
|
2992
|
-
Select.Root,
|
|
2993
|
-
{
|
|
2994
|
-
variant: "solid",
|
|
2995
|
-
value: radius,
|
|
2996
|
-
onValueChange: (change) => onRadiusChange?.(change),
|
|
2997
|
-
children: [
|
|
2998
|
-
/* @__PURE__ */ jsx32(Select.Label, { position: "inside", children: "Radius" }),
|
|
2999
|
-
/* @__PURE__ */ jsx32(Select.Trigger, {}),
|
|
3000
|
-
/* @__PURE__ */ jsxs9(Select.Content, { children: [
|
|
3001
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "none", children: "None" }),
|
|
3002
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "xs", children: "XS" }),
|
|
3003
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "sm", children: "SM" }),
|
|
3004
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "md", children: "MD" }),
|
|
3005
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "lg", children: "LG" }),
|
|
3006
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "xl", children: "XL" }),
|
|
3007
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "full", children: "FULL" })
|
|
3008
|
-
] })
|
|
3009
|
-
]
|
|
3010
|
-
}
|
|
3011
|
-
),
|
|
3012
|
-
/* @__PURE__ */ jsxs9(
|
|
3013
|
-
Select.Root,
|
|
3014
|
-
{
|
|
3015
|
-
variant: "solid",
|
|
3016
|
-
value: roundness2,
|
|
3017
|
-
onValueChange: (change) => onRoundnessChange?.(change),
|
|
3018
|
-
children: [
|
|
3019
|
-
/* @__PURE__ */ jsx32(Select.Label, { className: "min-w-40!", position: "inside", children: "Roundness" }),
|
|
3020
|
-
/* @__PURE__ */ jsx32(Select.Trigger, {}),
|
|
3021
|
-
/* @__PURE__ */ jsxs9(Select.Content, { children: [
|
|
3022
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "1", children: "1" }),
|
|
3023
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "2", children: "2" }),
|
|
3024
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "3", children: "3" }),
|
|
3025
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "4", children: "4" }),
|
|
3026
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "5", children: "5" }),
|
|
3027
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "6", children: "6" })
|
|
3028
|
-
] })
|
|
3029
|
-
]
|
|
3030
|
-
}
|
|
3031
|
-
),
|
|
3032
|
-
/* @__PURE__ */ jsxs9(
|
|
3033
|
-
Select.Root,
|
|
3034
|
-
{
|
|
3035
|
-
variant: "solid",
|
|
3036
|
-
value: spacing,
|
|
3037
|
-
onValueChange: (change) => onSpacingChange?.(change),
|
|
3038
|
-
children: [
|
|
3039
|
-
/* @__PURE__ */ jsx32(Select.Label, { position: "inside", children: "Spacing" }),
|
|
3040
|
-
/* @__PURE__ */ jsx32(Select.Trigger, {}),
|
|
3041
|
-
/* @__PURE__ */ jsxs9(Select.Content, { children: [
|
|
3042
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "xs", children: "XS" }),
|
|
3043
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "sm", children: "SM" }),
|
|
3044
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "md", children: "MD" }),
|
|
3045
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "lg", children: "LG" }),
|
|
3046
|
-
/* @__PURE__ */ jsx32(Select.Item, { value: "xl", children: "XL" })
|
|
3047
|
-
] })
|
|
3048
|
-
]
|
|
3205
|
+
const [visible, setVisible] = useState8(false);
|
|
3206
|
+
useEffect7(() => {
|
|
3207
|
+
function handleKeyDown(event) {
|
|
3208
|
+
if (event.altKey && event.code === "KeyT") {
|
|
3209
|
+
event.preventDefault();
|
|
3210
|
+
setVisible(!visible);
|
|
3049
3211
|
}
|
|
3050
|
-
|
|
3051
|
-
|
|
3212
|
+
}
|
|
3213
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
3214
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
3215
|
+
}, [visible]);
|
|
3216
|
+
return /* @__PURE__ */ jsx35(Portal.Root, { open: visible, onOpenChange: setVisible, children: /* @__PURE__ */ jsx35(Portal.Content, { position, children: /* @__PURE__ */ jsxs9(
|
|
3217
|
+
Box,
|
|
3218
|
+
{
|
|
3219
|
+
m: "4",
|
|
3220
|
+
p: "4",
|
|
3221
|
+
className: "flex flex-col gap-2 border-[rgba(var(--border-color), 0.6)]",
|
|
3222
|
+
children: [
|
|
3223
|
+
/* @__PURE__ */ jsxs9(
|
|
3224
|
+
Select.Root,
|
|
3225
|
+
{
|
|
3226
|
+
variant: "solid",
|
|
3227
|
+
value: appearance,
|
|
3228
|
+
onValueChange: (change) => onAppearanceChange?.(change),
|
|
3229
|
+
children: [
|
|
3230
|
+
/* @__PURE__ */ jsx35(Select.Label, { position: "inside", children: "Theme Settings" }),
|
|
3231
|
+
/* @__PURE__ */ jsx35(Select.Trigger, {}),
|
|
3232
|
+
/* @__PURE__ */ jsxs9(Select.Content, { children: [
|
|
3233
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "light", children: "Light" }),
|
|
3234
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "dark", children: "Dark" })
|
|
3235
|
+
] })
|
|
3236
|
+
]
|
|
3237
|
+
}
|
|
3238
|
+
),
|
|
3239
|
+
/* @__PURE__ */ jsxs9(
|
|
3240
|
+
Select.Root,
|
|
3241
|
+
{
|
|
3242
|
+
variant: "solid",
|
|
3243
|
+
value: radius,
|
|
3244
|
+
onValueChange: (change) => onRadiusChange?.(change),
|
|
3245
|
+
children: [
|
|
3246
|
+
/* @__PURE__ */ jsx35(Select.Label, { position: "inside", children: "Radius" }),
|
|
3247
|
+
/* @__PURE__ */ jsx35(Select.Trigger, {}),
|
|
3248
|
+
/* @__PURE__ */ jsxs9(Select.Content, { children: [
|
|
3249
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "none", children: "None" }),
|
|
3250
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "xs", children: "XS" }),
|
|
3251
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "sm", children: "SM" }),
|
|
3252
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "md", children: "MD" }),
|
|
3253
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "lg", children: "LG" }),
|
|
3254
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "xl", children: "XL" }),
|
|
3255
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "full", children: "FULL" })
|
|
3256
|
+
] })
|
|
3257
|
+
]
|
|
3258
|
+
}
|
|
3259
|
+
),
|
|
3260
|
+
/* @__PURE__ */ jsxs9(
|
|
3261
|
+
Select.Root,
|
|
3262
|
+
{
|
|
3263
|
+
variant: "solid",
|
|
3264
|
+
value: roundness2,
|
|
3265
|
+
onValueChange: (change) => onRoundnessChange?.(change),
|
|
3266
|
+
children: [
|
|
3267
|
+
/* @__PURE__ */ jsx35(Select.Label, { className: "min-w-40!", position: "inside", children: "Roundness" }),
|
|
3268
|
+
/* @__PURE__ */ jsx35(Select.Trigger, {}),
|
|
3269
|
+
/* @__PURE__ */ jsxs9(Select.Content, { children: [
|
|
3270
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "1", children: "1" }),
|
|
3271
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "2", children: "2" }),
|
|
3272
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "3", children: "3" }),
|
|
3273
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "4", children: "4" }),
|
|
3274
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "5", children: "5" }),
|
|
3275
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "6", children: "6" })
|
|
3276
|
+
] })
|
|
3277
|
+
]
|
|
3278
|
+
}
|
|
3279
|
+
),
|
|
3280
|
+
/* @__PURE__ */ jsxs9(
|
|
3281
|
+
Select.Root,
|
|
3282
|
+
{
|
|
3283
|
+
variant: "solid",
|
|
3284
|
+
value: spacing,
|
|
3285
|
+
onValueChange: (change) => onSpacingChange?.(change),
|
|
3286
|
+
children: [
|
|
3287
|
+
/* @__PURE__ */ jsx35(Select.Label, { position: "inside", children: "Spacing" }),
|
|
3288
|
+
/* @__PURE__ */ jsx35(Select.Trigger, {}),
|
|
3289
|
+
/* @__PURE__ */ jsxs9(Select.Content, { children: [
|
|
3290
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "xs", children: "XS" }),
|
|
3291
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "sm", children: "SM" }),
|
|
3292
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "md", children: "MD" }),
|
|
3293
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "lg", children: "LG" }),
|
|
3294
|
+
/* @__PURE__ */ jsx35(Select.Item, { value: "xl", children: "XL" })
|
|
3295
|
+
] })
|
|
3296
|
+
]
|
|
3297
|
+
}
|
|
3298
|
+
)
|
|
3299
|
+
]
|
|
3300
|
+
}
|
|
3301
|
+
) }) });
|
|
3052
3302
|
}
|
|
3053
3303
|
export {
|
|
3054
3304
|
Accordion,
|
|
@@ -3057,7 +3307,9 @@ export {
|
|
|
3057
3307
|
Button,
|
|
3058
3308
|
Checkbox,
|
|
3059
3309
|
Container,
|
|
3310
|
+
Panel,
|
|
3060
3311
|
Portal,
|
|
3312
|
+
ProgressBar,
|
|
3061
3313
|
Select,
|
|
3062
3314
|
Separator,
|
|
3063
3315
|
Text,
|