@lotte-innovate/ui-component-test 0.0.152 → 0.0.153
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/lib/components/SideBar/index.js +3 -3
- package/dist/lib/components/SideBar/index.mjs +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/lib/utils/useWindowSize.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/lib/utils/useWindowSize.mjs +0 -2
- package/dist/lib/utils/useWindowSize.mjs.map +0 -1
@@ -28,7 +28,7 @@ import { cn } from '../../../lib/utils/utils';
|
|
28
28
|
import { bgColorStyle, scalingVariants } from '../../../lib/constants';
|
29
29
|
import { useTheme } from '../../../lib/theme';
|
30
30
|
import * as ReactProSidebar from 'react-pro-sidebar';
|
31
|
-
import { useWindowSize } from '../../../lib/utils/useWindowSize';
|
31
|
+
// import { useWindowSize } from '../../../lib/utils/useWindowSize';
|
32
32
|
import * as alphaColors from '../../../lib/color/alpha';
|
33
33
|
var sidebarVariants = cva('', {
|
34
34
|
variants: {
|
@@ -40,12 +40,12 @@ export var Root = React.forwardRef(function (_a, forwardedRef) {
|
|
40
40
|
var _b;
|
41
41
|
var scaling = _a.scaling, size = _a.size, color = _a.color, className = _a.className, children = _a.children, props = __rest(_a, ["scaling", "size", "color", "className", "children"]);
|
42
42
|
var theme = useTheme().theme;
|
43
|
-
|
43
|
+
// const windowSize = useWindowSize();
|
44
44
|
var sidebarStyle = {
|
45
45
|
scaling: scaling !== null && scaling !== void 0 ? scaling : theme.themeScaling,
|
46
46
|
color: (_b = color !== null && color !== void 0 ? color : theme.themeColor) !== null && _b !== void 0 ? _b : 'slate',
|
47
47
|
};
|
48
|
-
return (_jsx(ReactProSidebar.Sidebar, __assign({ className: cn("bg-".concat(sidebarStyle.color, "A-6 dark:bg-").concat(sidebarStyle.color, "DarkA-6"), sidebarVariants({ scaling: sidebarStyle.scaling }), className) }, props, {
|
48
|
+
return (_jsx(ReactProSidebar.Sidebar, __assign({ className: cn("bg-".concat(sidebarStyle.color, "A-6 dark:bg-").concat(sidebarStyle.color, "DarkA-6"), sidebarVariants({ scaling: sidebarStyle.scaling }), className) }, props, { children: children })));
|
49
49
|
});
|
50
50
|
Root.displayName = 'Sidebar.Root';
|
51
51
|
export var Menu = React.forwardRef(function (_a, forwardedRef) {
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsx as
|
2
|
+
import{jsx as r}from"react/jsx-runtime";import e from"react";import{cva as a}from"class-variance-authority";import{cn as o}from"../../utils/utils.mjs";import{scalingVariants as l,bgColorStyle as n}from"../../constants.mjs";import{useTheme as t}from"../../theme/ThemeProvider.mjs";import*as c from"react-pro-sidebar";import*as i from"../../color/alpha.mjs";var s=function(){return s=Object.assign||function(r){for(var e,a=1,o=arguments.length;a<o;a++)for(var l in e=arguments[a])Object.prototype.hasOwnProperty.call(e,l)&&(r[l]=e[l]);return r},s.apply(this,arguments)},m=function(r,e){var a={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(a[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(r);l<o.length;l++)e.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(r,o[l])&&(a[o[l]]=r[o[l]])}return a},u=a("",{variants:{scaling:s({},l),color:n()}}),d=e.forwardRef((function(e,a){var l,n=e.scaling;e.size;var i=e.color,d=e.className,p=e.children,f=m(e,["scaling","size","color","className","children"]),h=t().theme,g={scaling:null!=n?n:h.themeScaling,color:null!==(l=null!=i?i:h.themeColor)&&void 0!==l?l:"slate"};return r(c.Sidebar,s({className:o("bg-".concat(g.color,"A-6 dark:bg-").concat(g.color,"DarkA-6"),u({scaling:g.scaling}),d)},f,{children:p}))}));d.displayName="Sidebar.Root";var p=e.forwardRef((function(e,a){var o,l=e.scaling,n=e.size,u=e.color;e.className;var d=e.menuItemStyles,p=e.children,f=m(e,["scaling","size","color","className","menuItemStyles","children"]),h="50px",g="16px";"small"==n&&(h="40px",g="14px"),"large"==n&&(h="60px",g="18px");var v=t().theme,b={scaling:null!=l?l:v.themeScaling,color:null!==(o=null!=u?u:v.themeColor)&&void 0!==o?o:"slate"},y="".concat(b.color,"A"),S=i[y];return r(c.Menu,s({menuItemStyles:s({button:function(r){r.level;var e=r.active;return r.disabled,r.open,{height:h,fontSize:g,backgroundColor:e?S[5]:"","&:hover":{backgroundColor:S[3]}}}},d)},f,{children:p}))}));p.displayName="Sidebar.Menu";var f=e.forwardRef((function(e,a){e.scaling,e.size,e.color,e.className;var o=e.children,l=m(e,["scaling","size","color","className","children"]);return r(c.MenuItem,s({},l,{children:o}))}));f.displayName="Sidebar.Item";var h=e.forwardRef((function(e,a){e.scaling,e.size,e.color,e.className;var o=e.children,l=m(e,["scaling","size","color","className","children"]);return r(c.SubMenu,s({},l,{children:o}))}));h.displayName="Sidebar.SubMenu";var g={Root:d,Menu:p,Item:f,SubMenu:h};export{f as Item,p as Menu,d as Root,h as SubMenu,g as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|