analytica-frontend-lib 1.0.37 → 1.0.38
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/DropdownMenu/index.d.mts +16 -8
- package/dist/DropdownMenu/index.d.ts +16 -8
- package/dist/DropdownMenu/index.js +122 -45
- package/dist/DropdownMenu/index.js.map +1 -1
- package/dist/DropdownMenu/index.mjs +122 -45
- package/dist/DropdownMenu/index.mjs.map +1 -1
- package/dist/Select/index.d.mts +51 -0
- package/dist/Select/index.d.ts +51 -0
- package/dist/Select/index.js +323 -0
- package/dist/Select/index.js.map +1 -0
- package/dist/Select/index.mjs +300 -0
- package/dist/Select/index.mjs.map +1 -0
- package/dist/index.css +5 -9
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +3 -44
- package/dist/index.d.ts +3 -44
- package/dist/index.js +52 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +52 -34
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +5 -9
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1872,26 +1872,32 @@ var DropdownMenu = ({ children, open, onOpenChange }) => {
|
|
|
1872
1872
|
}, []);
|
|
1873
1873
|
return /* @__PURE__ */ jsx20("div", { className: "relative", ref: menuRef, children: injectStore(children, store) });
|
|
1874
1874
|
};
|
|
1875
|
-
var DropdownMenuTrigger =
|
|
1875
|
+
var DropdownMenuTrigger = ({
|
|
1876
|
+
className,
|
|
1877
|
+
children,
|
|
1878
|
+
onClick,
|
|
1879
|
+
store: externalStore,
|
|
1880
|
+
...props
|
|
1881
|
+
}) => {
|
|
1876
1882
|
const store = useDropdownStore(externalStore);
|
|
1877
1883
|
const open = useStore(store, (s) => s.open);
|
|
1878
1884
|
const toggleOpen = () => store.setState({ open: !open });
|
|
1879
1885
|
return /* @__PURE__ */ jsx20(
|
|
1880
|
-
|
|
1886
|
+
Button_default,
|
|
1881
1887
|
{
|
|
1882
|
-
|
|
1883
|
-
className: `border border-border-200 cursor-pointer bg-background-muted hover:bg-background-200 transition-colors px-4 py-2 rounded-sm ${className}`,
|
|
1888
|
+
variant: "outline",
|
|
1884
1889
|
onClick: (e) => {
|
|
1885
1890
|
e.stopPropagation();
|
|
1886
1891
|
toggleOpen();
|
|
1887
1892
|
if (onClick) onClick(e);
|
|
1888
1893
|
},
|
|
1889
1894
|
"aria-expanded": open,
|
|
1895
|
+
className: `${className}`,
|
|
1890
1896
|
...props,
|
|
1891
1897
|
children
|
|
1892
1898
|
}
|
|
1893
1899
|
);
|
|
1894
|
-
}
|
|
1900
|
+
};
|
|
1895
1901
|
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
1896
1902
|
var ITEM_SIZE_CLASSES = {
|
|
1897
1903
|
small: "text-sm",
|
|
@@ -1908,6 +1914,10 @@ var ALIGN_CLASSES = {
|
|
|
1908
1914
|
center: "left-1/2 -translate-x-1/2",
|
|
1909
1915
|
end: "right-0"
|
|
1910
1916
|
};
|
|
1917
|
+
var MENUCONTENT_VARIANT_CLASSES = {
|
|
1918
|
+
menu: "p-1",
|
|
1919
|
+
profile: "p-6"
|
|
1920
|
+
};
|
|
1911
1921
|
var MenuLabel = forwardRef9(({ className, inset, store: _store, ...props }, ref) => {
|
|
1912
1922
|
return /* @__PURE__ */ jsx20(
|
|
1913
1923
|
"div",
|
|
@@ -1924,6 +1934,7 @@ var MenuContent = forwardRef9(
|
|
|
1924
1934
|
className,
|
|
1925
1935
|
align = "start",
|
|
1926
1936
|
side = "bottom",
|
|
1937
|
+
variant = "menu",
|
|
1927
1938
|
sideOffset = 4,
|
|
1928
1939
|
children,
|
|
1929
1940
|
store: externalStore,
|
|
@@ -1946,15 +1957,17 @@ var MenuContent = forwardRef9(
|
|
|
1946
1957
|
const horizontal = ALIGN_CLASSES[align];
|
|
1947
1958
|
return `absolute ${vertical} ${horizontal}`;
|
|
1948
1959
|
};
|
|
1960
|
+
const variantClasses = MENUCONTENT_VARIANT_CLASSES[variant];
|
|
1949
1961
|
return /* @__PURE__ */ jsx20(
|
|
1950
1962
|
"div",
|
|
1951
1963
|
{
|
|
1952
1964
|
ref,
|
|
1953
1965
|
role: "menu",
|
|
1954
1966
|
className: `
|
|
1955
|
-
bg-background z-50 min-w-[210px] overflow-hidden rounded-md border bg-popover
|
|
1967
|
+
bg-background z-50 min-w-[210px] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md border-border-100
|
|
1956
1968
|
${open ? "animate-in fade-in-0 zoom-in-95" : "animate-out fade-out-0 zoom-out-95"}
|
|
1957
1969
|
${getPositionClasses()}
|
|
1970
|
+
${variantClasses}
|
|
1958
1971
|
${className}
|
|
1959
1972
|
`,
|
|
1960
1973
|
style: {
|
|
@@ -1997,7 +2010,7 @@ var MenuItem = forwardRef9(
|
|
|
1997
2010
|
};
|
|
1998
2011
|
const getVariantClasses = () => {
|
|
1999
2012
|
if (variant === "profile") {
|
|
2000
|
-
return "relative flex flex-row justify-between select-none items-center gap-2 rounded-sm p-
|
|
2013
|
+
return "relative flex flex-row justify-between select-none items-center gap-2 rounded-sm p-4 text-sm outline-none transition-colors [&>svg]:size-6 [&>svg]:shrink-0";
|
|
2001
2014
|
}
|
|
2002
2015
|
return "relative flex select-none items-center gap-2 rounded-sm p-3 text-sm outline-none transition-colors [&>svg]:size-4 [&>svg]:shrink-0";
|
|
2003
2016
|
};
|
|
@@ -2026,7 +2039,7 @@ var MenuItem = forwardRef9(
|
|
|
2026
2039
|
...props,
|
|
2027
2040
|
children: [
|
|
2028
2041
|
iconLeft,
|
|
2029
|
-
children,
|
|
2042
|
+
/* @__PURE__ */ jsx20("span", { className: "w-full text-md", children }),
|
|
2030
2043
|
iconRight
|
|
2031
2044
|
]
|
|
2032
2045
|
}
|
|
@@ -2101,29 +2114,33 @@ var ProfileMenuSection = forwardRef9(({ className, children, store: _store, ...p
|
|
|
2101
2114
|
);
|
|
2102
2115
|
});
|
|
2103
2116
|
ProfileMenuSection.displayName = "ProfileMenuSection";
|
|
2104
|
-
var ProfileMenuFooter =
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
)
|
|
2117
|
+
var ProfileMenuFooter = ({
|
|
2118
|
+
className,
|
|
2119
|
+
disabled = false,
|
|
2120
|
+
onClick,
|
|
2121
|
+
store: externalStore,
|
|
2122
|
+
...props
|
|
2123
|
+
}) => {
|
|
2124
|
+
const store = useDropdownStore(externalStore);
|
|
2125
|
+
const setOpen = useStore(store, (s) => s.setOpen);
|
|
2126
|
+
return /* @__PURE__ */ jsxs15(
|
|
2127
|
+
Button_default,
|
|
2128
|
+
{
|
|
2129
|
+
variant: "outline",
|
|
2130
|
+
className: `w-full ${className}`,
|
|
2131
|
+
disabled,
|
|
2132
|
+
onClick: (e) => {
|
|
2133
|
+
setOpen(false);
|
|
2134
|
+
onClick?.(e);
|
|
2135
|
+
},
|
|
2136
|
+
...props,
|
|
2137
|
+
children: [
|
|
2138
|
+
/* @__PURE__ */ jsx20("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ jsx20(SignOut, {}) }),
|
|
2139
|
+
/* @__PURE__ */ jsx20("span", { children: "Sair" })
|
|
2140
|
+
]
|
|
2141
|
+
}
|
|
2142
|
+
);
|
|
2143
|
+
};
|
|
2127
2144
|
ProfileMenuFooter.displayName = "ProfileMenuFooter";
|
|
2128
2145
|
var DropdownMenu_default = DropdownMenu;
|
|
2129
2146
|
|
|
@@ -2313,8 +2330,9 @@ var SelectTrigger = forwardRef10(
|
|
|
2313
2330
|
ref,
|
|
2314
2331
|
className: `
|
|
2315
2332
|
flex h-9 min-w-[220px] w-full items-center justify-between border-border-300 px-3 py-2
|
|
2316
|
-
${invalid && "border-indicator-error"}
|
|
2317
|
-
${disabled ? "cursor-not-allowed text-text-400 pointer-events-none opacity-50" : "cursor-pointer hover:bg-background-50
|
|
2333
|
+
${invalid && "border-indicator-error text-text-600"}
|
|
2334
|
+
${disabled ? "cursor-not-allowed text-text-400 pointer-events-none opacity-50" : "cursor-pointer hover:bg-background-50 focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground"}
|
|
2335
|
+
${!invalid && !disabled ? "text-text-700" : ""}
|
|
2318
2336
|
${variantClasses}
|
|
2319
2337
|
${className}
|
|
2320
2338
|
`,
|
|
@@ -2349,7 +2367,7 @@ var SelectContent = forwardRef10(
|
|
|
2349
2367
|
const store = useSelectStore(externalStore);
|
|
2350
2368
|
const open = useStore2(store, (s) => s.open);
|
|
2351
2369
|
if (!open) return null;
|
|
2352
|
-
const getPositionClasses = () => `absolute ${SIDE_CLASSES2[side]} ${ALIGN_CLASSES2[align]}`;
|
|
2370
|
+
const getPositionClasses = () => `w-full min-w-full absolute ${SIDE_CLASSES2[side]} ${ALIGN_CLASSES2[align]}`;
|
|
2353
2371
|
return /* @__PURE__ */ jsx21(
|
|
2354
2372
|
"div",
|
|
2355
2373
|
{
|