@lotte-innovate/ui-component-test 0.2.68 → 0.2.70
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/lib/components/SideBar/index.js +1 -3
- package/dist/lib/components/SideBar/index.mjs +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/lib/utils/useWindowSize.d.ts +0 -1
- package/dist/lib/utils/useWindowSize.js +18 -17
- 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,6 @@ 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';
|
32
31
|
import * as alphaColors from '../../../lib/color/alpha';
|
33
32
|
var sidebarVariants = cva('', {
|
34
33
|
variants: {
|
@@ -40,12 +39,11 @@ export var Root = React.forwardRef(function (_a, forwardedRef) {
|
|
40
39
|
var _b;
|
41
40
|
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
41
|
var theme = useTheme().theme;
|
43
|
-
var windowSize = useWindowSize();
|
44
42
|
var sidebarStyle = {
|
45
43
|
scaling: scaling !== null && scaling !== void 0 ? scaling : theme.themeScaling,
|
46
44
|
color: (_b = color !== null && color !== void 0 ? color : theme.themeColor) !== null && _b !== void 0 ? _b : 'slate',
|
47
45
|
};
|
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, { collapsed: props.collapsed
|
46
|
+
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, { collapsed: props.collapsed, children: children })));
|
49
47
|
});
|
50
48
|
Root.displayName = 'Sidebar.Root';
|
51
49
|
export var Menu = React.forwardRef(function (_a, forwardedRef) {
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import r from"react";import{cva as
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import r 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(e){for(var r,a=1,o=arguments.length;a<o;a++)for(var l in r=arguments[a])Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l]);return e},s.apply(this,arguments)},m=function(e,r){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)r.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(a[o[l]]=e[o[l]])}return a},u=a("",{variants:{scaling:s({},l),color:n()}}),d=r.forwardRef((function(r,a){var l,n=r.scaling;r.size;var i=r.color,d=r.className,p=r.children,f=m(r,["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 e(c.Sidebar,s({className:o("bg-".concat(g.color,"A-6 dark:bg-").concat(g.color,"DarkA-6"),u({scaling:g.scaling}),d)},f,{collapsed:f.collapsed,children:p}))}));d.displayName="Sidebar.Root";var p=r.forwardRef((function(r,a){var o,l=r.scaling,n=r.size,u=r.color;r.className;var d=r.menuItemStyles,p=r.children,f=m(r,["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 e(c.Menu,s({menuItemStyles:s({button:function(e){e.level;var r=e.active;return e.disabled,e.open,{height:h,fontSize:g,backgroundColor:r?S[5]:"","&:hover":{backgroundColor:S[3]}}}},d)},f,{children:p}))}));p.displayName="Sidebar.Menu";var f=r.forwardRef((function(r,a){r.scaling,r.size,r.color,r.className;var o=r.children,l=m(r,["scaling","size","color","className","children"]);return e(c.MenuItem,s({},l,{children:o}))}));f.displayName="Sidebar.Item";var h=r.forwardRef((function(r,a){r.scaling,r.size,r.color,r.className;var o=r.children,l=m(r,["scaling","size","color","className","children"]);return e(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
|