@lotte-innovate/ui-component-test 0.2.39 → 0.2.40
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/lib/components/Modal/ModalTitle.d.ts +3 -0
- package/dist/lib/components/Modal/ModalTitle.js +17 -3
- package/dist/lib/components/Modal/ModalTitle.mjs +1 -1
- package/dist/lib/components/Modal/index.mjs.map +1 -1
- package/dist/lib/components/SideBar/index.mjs +1 -1
- package/dist/lib/components/Tabs/DynamicTabs.mjs +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/lib/_virtual/_commonjsHelpers.mjs +0 -2
- package/dist/lib/_virtual/_commonjsHelpers.mjs.map +0 -1
- package/dist/lib/_virtual/index.mjs +0 -2
- package/dist/lib/_virtual/index.mjs.map +0 -1
- package/dist/lib/_virtual/index2.mjs +0 -2
- package/dist/lib/_virtual/index2.mjs.map +0 -1
- package/dist/lib/_virtual/index3.mjs +0 -2
- package/dist/lib/_virtual/index3.mjs.map +0 -1
- package/dist/lib/_virtual/react-is.development.mjs +0 -2
- package/dist/lib/_virtual/react-is.development.mjs.map +0 -1
- package/dist/lib/_virtual/react-is.production.min.mjs +0 -2
- package/dist/lib/_virtual/react-is.production.min.mjs.map +0 -1
- package/dist/lib/node_modules/object-assign/index.mjs +0 -7
- package/dist/lib/node_modules/object-assign/index.mjs.map +0 -1
- package/dist/lib/node_modules/prop-types/checkPropTypes.mjs +0 -2
- package/dist/lib/node_modules/prop-types/checkPropTypes.mjs.map +0 -1
- package/dist/lib/node_modules/prop-types/factoryWithThrowingShims.mjs +0 -2
- package/dist/lib/node_modules/prop-types/factoryWithThrowingShims.mjs.map +0 -1
- package/dist/lib/node_modules/prop-types/factoryWithTypeCheckers.mjs +0 -2
- package/dist/lib/node_modules/prop-types/factoryWithTypeCheckers.mjs.map +0 -1
- package/dist/lib/node_modules/prop-types/index.mjs +0 -2
- package/dist/lib/node_modules/prop-types/index.mjs.map +0 -1
- package/dist/lib/node_modules/prop-types/lib/ReactPropTypesSecret.mjs +0 -2
- package/dist/lib/node_modules/prop-types/lib/ReactPropTypesSecret.mjs.map +0 -1
- package/dist/lib/node_modules/prop-types/lib/has.mjs +0 -2
- package/dist/lib/node_modules/prop-types/lib/has.mjs.map +0 -1
- package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.mjs +0 -10
- package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.mjs.map +0 -1
- package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.mjs +0 -10
- package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.mjs.map +0 -1
- package/dist/lib/node_modules/prop-types/node_modules/react-is/index.mjs +0 -2
- package/dist/lib/node_modules/prop-types/node_modules/react-is/index.mjs.map +0 -1
- package/dist/lib/node_modules/react-pro-sidebar/dist/index.es.mjs +0 -21
- package/dist/lib/node_modules/react-pro-sidebar/dist/index.es.mjs.map +0 -1
- package/dist/lib/node_modules/react-tabs/esm/components/Tab.mjs +0 -2
- package/dist/lib/node_modules/react-tabs/esm/components/Tab.mjs.map +0 -1
- package/dist/lib/node_modules/react-tabs/esm/components/TabList.mjs +0 -2
- package/dist/lib/node_modules/react-tabs/esm/components/TabList.mjs.map +0 -1
- package/dist/lib/node_modules/react-tabs/esm/components/TabPanel.mjs +0 -2
- package/dist/lib/node_modules/react-tabs/esm/components/TabPanel.mjs.map +0 -1
- package/dist/lib/node_modules/react-tabs/esm/components/Tabs.mjs +0 -2
- package/dist/lib/node_modules/react-tabs/esm/components/Tabs.mjs.map +0 -1
- package/dist/lib/node_modules/react-tabs/esm/components/UncontrolledTabs.mjs +0 -2
- package/dist/lib/node_modules/react-tabs/esm/components/UncontrolledTabs.mjs.map +0 -1
- package/dist/lib/node_modules/react-tabs/esm/helpers/childrenDeepMap.mjs +0 -2
- package/dist/lib/node_modules/react-tabs/esm/helpers/childrenDeepMap.mjs.map +0 -1
- package/dist/lib/node_modules/react-tabs/esm/helpers/count.mjs +0 -2
- package/dist/lib/node_modules/react-tabs/esm/helpers/count.mjs.map +0 -1
- package/dist/lib/node_modules/react-tabs/esm/helpers/elementTypes.mjs +0 -2
- package/dist/lib/node_modules/react-tabs/esm/helpers/elementTypes.mjs.map +0 -1
- package/dist/lib/node_modules/react-tabs/esm/helpers/propTypes.mjs +0 -2
- package/dist/lib/node_modules/react-tabs/esm/helpers/propTypes.mjs.map +0 -1
@@ -5,4 +5,7 @@ export interface ModalTitleProps extends VariantProps<typeof modalTitleVariants>
|
|
5
5
|
export declare const modalTitleVariants: (props?: ({
|
6
6
|
size?: "small" | "medium" | "large" | "x-large" | null | undefined;
|
7
7
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
8
|
+
export declare const modalCloseVariants: (props?: ({
|
9
|
+
size?: "small" | "medium" | "large" | "x-large" | null | undefined;
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
8
11
|
export declare const ModalTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & ModalTitleProps & React.RefAttributes<HTMLDivElement>>;
|
@@ -24,11 +24,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
24
24
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
25
25
|
import { forwardRef, useContext } from 'react';
|
26
26
|
import { cva } from 'class-variance-authority';
|
27
|
+
import { Dialog as DialogTheme } from '@radix-ui/themes';
|
27
28
|
import { Cross2Icon } from '@radix-ui/react-icons';
|
28
29
|
import { ModalContext } from './ModalRoot';
|
29
|
-
import { IconButton, Modal } from '../../../lib';
|
30
30
|
import { cn } from '../../../lib/utils/utils';
|
31
|
-
|
31
|
+
import { IconButton } from '../../../lib';
|
32
|
+
export var modalTitleVariants = cva('m-0', {
|
32
33
|
variants: {
|
33
34
|
size: {
|
34
35
|
small: 'text-sm',
|
@@ -41,9 +42,22 @@ export var modalTitleVariants = cva('flex items-center justify-between border bo
|
|
41
42
|
size: 'medium',
|
42
43
|
},
|
43
44
|
});
|
45
|
+
export var modalCloseVariants = cva("inline-flex items-center justify-center bg-transparent text-slate-11 outline-none hover:cursor-pointer hover:bg-transparent active:border-none active:bg-transparent dark:bg-transparent dark:text-slateDark-11 dark:hover:bg-transparent dark:active:bg-transparent", {
|
46
|
+
variants: {
|
47
|
+
size: {
|
48
|
+
small: 'w-[24px] h-[24px]',
|
49
|
+
medium: 'w-[32px] h-[32px]',
|
50
|
+
large: 'w-[32px] h-[32px]',
|
51
|
+
'x-large': 'w-[40px] h-[40px]',
|
52
|
+
},
|
53
|
+
},
|
54
|
+
defaultVariants: {
|
55
|
+
size: 'medium',
|
56
|
+
},
|
57
|
+
});
|
44
58
|
export var ModalTitle = forwardRef(function (_a, ref) {
|
45
59
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
46
60
|
var size = useContext(ModalContext).size;
|
47
|
-
return (_jsxs("div", __assign({ ref: ref, className:
|
61
|
+
return (_jsxs("div", __assign({ ref: ref, className: "flex items-center justify-between border border-slate-5 p-4 font-bold text-slate-12 dark:border-slateDark-5 dark:text-slateDark-12" }, props, { children: [_jsx(DialogTheme.Title, { className: cn(modalTitleVariants({ size: size }), className), children: children }), _jsx(DialogTheme.Close, { className: modalCloseVariants({ size: size }), children: _jsx(IconButton, { "aria-label": "Close", className: "p-0 hover:text-slate-12 dark:hover:text-slateDark-12", size: size, children: _jsx(Cross2Icon, {}) }) })] })));
|
48
62
|
});
|
49
63
|
ModalTitle.displayName = 'Modal.Title';
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsxs as o,jsx as t}from"react/jsx-runtime";import{forwardRef as e,useContext as r}from"react";import{cva as i}from"class-variance-authority";import{
|
2
|
+
import{jsxs as o,jsx as t}from"react/jsx-runtime";import{forwardRef as e,useContext as r}from"react";import{cva as i}from"class-variance-authority";import{Dialog as m}from"@radix-ui/themes";import{Cross2Icon as n}from"@radix-ui/react-icons";import{ModalContext as a}from"./ModalRoot.mjs";import{cn as p}from"../../utils/utils.mjs";import"../Accordion/index.mjs";import"../AlertDialog/AlertDialogRoot.mjs";import"../AlertDialog/AlertDialogTrigger.mjs";import"../AlertDialog/AlertDialogContent.mjs";import"../AlertDialog/AlertDialogTitle.mjs";import"../AlertDialog/AlertDialogDescription.mjs";import"../AlertDialog/AlertDialogCancel.mjs";import"../AlertDialog/AlertDialogAction.mjs";import"../AspectRatio/index.mjs";import"../Avatar/index.mjs";import"../Badge/index.mjs";import"../Breadcrumb/BreadcrumbRoot.mjs";import"../Breadcrumb/BreadcrumbItem.mjs";import"../Breadcrumb/BreadcrumbLink.mjs";import"../Breadcrumb/BreadcrumbList.mjs";import"../Breadcrumb/BreadcrumbPage.mjs";import"../Breadcrumb/BreadcrumbSeparator.mjs";import"../Breadcrumb/BreadcrumbEllipsis.mjs";import"../Button/index.mjs";import"../Calendar/index.mjs";import"../Callout/CalloutRoot.mjs";import"../Callout/CalloutText.mjs";import"../Callout/CalloutIcon.mjs";import"../Card/index.mjs";import"../Checkbox/index.mjs";import"../CheckboxCard/index.mjs";import"../CheckboxGroup/CheckboxGroupRoot.mjs";import"../CheckboxGroup/CheckboxGroupItem.mjs";import"../ContextMenu/ContextMenuRoot.mjs";import"../ContextMenu/ContextMenuContent.mjs";import"../ContextMenu/ContextMenuCheckboxItem.mjs";import"../ContextMenu/ContextMenuGroup.mjs";import"../ContextMenu/ContextMenuItem.mjs";import"../ContextMenu/ContextMenuItemIndicator.mjs";import"../ContextMenu/ContextMenuLabel.mjs";import"../ContextMenu/ContextMenuTrigger.mjs";import"../ContextMenu/ContextMenuRadioGroup.mjs";import"../ContextMenu/ContextMenuRadioItem.mjs";import"../ContextMenu/ContextMenuSeparator.mjs";import"../ContextMenu/ContextMenuSubTrigger.mjs";import"../ContextMenu/ContextMenuSubContent.mjs";import"../Collapsible/index.mjs";import"../DataList/DataListRoot.mjs";import"../DataList/DataListItem.mjs";import"../DataList/DataListLabel.mjs";import"../DataList/DataListValue.mjs";import"../Datepicker/index.mjs";import"../Dialog/DialogRoot.mjs";import"../Dialog/DialogTrigger.mjs";import"../Dialog/DialogContent.mjs";import"../Dialog/DialogTitle.mjs";import"../Dialog/DialogDescription.mjs";import"../Dialog/DialogSlot.mjs";import"../Dialog/DialogCancel.mjs";import"../Dialog/DialogAction.mjs";import"../DropdownMenu/DropdownMenuRoot.mjs";import"../DropdownMenu/DropdownMenuTrigger.mjs";import"../DropdownMenu/DropdownMenuContent.mjs";import"../DropdownMenu/DropdownMenuLable.mjs";import"../DropdownMenu/DropdownMenuItem.mjs";import"../DropdownMenu/DropdownMenuSeparator.mjs";import"../DropdownMenu/DropdownMenuCheckboxItem.mjs";import"../DropdownMenu/DropdonMenuRadioGroup.mjs";import"../DropdownMenu/DropdownMenuRadioItem.mjs";import"../DropdownMenu/DropdownMenuSub.mjs";import"../DropdownMenu/DropdownMenuSubTrigger.mjs";import"../DropdownMenu/DropdonMenuSubContent.mjs";import"../DropdownMenu/DropdownMenuItemIndicator.mjs";import"../Tabs/DynamicTabs.mjs";import"../Footer/index.mjs";import"../Gnb/GnbRoot.mjs";import"../Gnb/GnbLogo.mjs";import"../Gnb/GnbMenu.mjs";import"../Gnb/GnbMenuItem.mjs";import"../Gnb/GnbInfo.mjs";import"../HoverCard/HoverCardRoot.mjs";import"../HoverCard/HoverCardTrigger.mjs";import"../HoverCard/HoverCardContent.mjs";import{IconButton as s}from"../IconButton/index.mjs";import"../Inset/index.mjs";import"../Label/index.mjs";import"../Menubar/MenubarRoot.mjs";import"../Menubar/MenubarMenu.mjs";import"../Menubar/MenubarTrigger.mjs";import"../Menubar/MenubarContent.mjs";import"../Menubar/MenubarItem.mjs";import"../Menubar/MenubarSeparator.mjs";import"../Menubar/MenubarSub.mjs";import"../Menubar/MenubarSubTrigger.mjs";import"../Menubar/MenubarSubContent.mjs";import"../Menubar/MenubarCheckboxItem.mjs";import"../Menubar/MenubarItemIndicator.mjs";import"../Menubar/MenubarRadioGroup.mjs";import"../Menubar/MenubarRadioItem.mjs";import"./ModalTrigger.mjs";import"./ModalContent.mjs";import"./ModalDescription.mjs";import"./ModalFooter.mjs";import"./ModalCancel.mjs";import"./ModalAction.mjs";import"../NavigationMenu/NavigationMenuRoot.mjs";import"../NavigationMenu/NavigationMenuList.mjs";import"../NavigationMenu/NavigationMenuItem.mjs";import"../NavigationMenu/NavigationMenuTrigger.mjs";import"../NavigationMenu/NavigationMenuContent.mjs";import"../NavigationMenu/NavigationMenuViewport.mjs";import"../NavigationMenu/NavigationMenuIndicator.mjs";import"../NavigationMenu/NavigationMenuLink.mjs";import"../Popover/PopoverRoot.mjs";import"../Popover/PopoverTrigger.mjs";import"../Popover/PopoverContent.mjs";import"../Popover/PopoverClose.mjs";import"../Progress/index.mjs";import"../Radio/index.mjs";import"../RadioCards/RadioCardsRoot.mjs";import"../RadioCards/RadioCardsItem.mjs";import"../RadioGroup/RadioGroupRoot.mjs";import"../RadioGroup/RadioGroupItem.mjs";import"../ScrollArea/index.mjs";import"../SegmentedControl/SegmentedControlRoot.mjs";import"../SegmentedControl/SegmentedControlItem.mjs";import"../Select/index.mjs";import"../Separator/index.mjs";import"../SideBar/index.mjs";import"../Skeleton/index.mjs";import"../Slider/index.mjs";import"../Spinner/index.mjs";import"../Table/index.mjs";import"../TabNav/index.mjs";import"../Tabs/index.mjs";import"../TextArea/index.mjs";import"../TextField/index.mjs";import"../Timeline/TimelineRoot.mjs";import"../Timeline/TimelineItem.mjs";import"../Timeline/TimelineConnector.mjs";import"../Timeline/TimelineHeader.mjs";import"../Timeline/TimelineTime.mjs";import"../Timeline/TimelineIcon.mjs";import"../Timeline/TimelineTitle.mjs";import"../Timeline/TimelineContent.mjs";import"../Timeline/TimelineDescription.mjs";import"../Toast/ToastRoot.mjs";import"../Toast/ToastTitle.mjs";import"../Toast/ToastDescription.mjs";import"../Toast/ToastActionButton.mjs";import"../Toggle/index.mjs";import"../Toggle/ToggleWithText.mjs";import"../ToggleGroup/ToggleGroupRoot.mjs";import"../ToggleGroup/ToggleGroupItem.mjs";import"../ToggleSwitch/index.mjs";import"../Tooltip/index.mjs";import"../BarChart/index.mjs";import"../BubbleChart/index.mjs";import"../RadarChart/index.mjs";import"../LineChart/index.mjs";import"../PieChart/index.mjs";import"../DoughnutChart/index.mjs";import"../Grid/index.mjs";import"../Grid/useGrid.mjs";import"../../Typography/Header/index.mjs";import"../../Typography/Text/index.mjs";import"../../theme/ThemeProvider.mjs";var l=function(){return l=Object.assign||function(o){for(var t,e=1,r=arguments.length;e<r;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(o[i]=t[i]);return o},l.apply(this,arguments)},u=function(o,t){var e={};for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&t.indexOf(r)<0&&(e[r]=o[r]);if(null!=o&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(o);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(o,r[i])&&(e[r[i]]=o[r[i]])}return e},j=i("m-0",{variants:{size:{small:"text-sm",medium:"text-lg",large:"text-xl","x-large":"text-2xl"}},defaultVariants:{size:"medium"}}),d=i("inline-flex items-center justify-center bg-transparent text-slate-11 outline-none hover:cursor-pointer hover:bg-transparent active:border-none active:bg-transparent dark:bg-transparent dark:text-slateDark-11 dark:hover:bg-transparent dark:active:bg-transparent",{variants:{size:{small:"w-[24px] h-[24px]",medium:"w-[32px] h-[32px]",large:"w-[32px] h-[32px]","x-large":"w-[40px] h-[40px]"}},defaultVariants:{size:"medium"}}),g=e((function(e,i){var g=e.children,x=e.className,M=u(e,["children","className"]),b=r(a).size;return o("div",l({ref:i,className:"flex items-center justify-between border border-slate-5 p-4 font-bold text-slate-12 dark:border-slateDark-5 dark:text-slateDark-12"},M,{children:[t(m.Title,{className:p(j({size:b}),x),children:g}),t(m.Close,{className:d({size:b}),children:t(s,{"aria-label":"Close",className:"p-0 hover:text-slate-12 dark:hover:text-slateDark-12",size:b,children:t(n,{})})})]}))}));g.displayName="Modal.Title";export{g as ModalTitle,d as modalCloseVariants,j as modalTitleVariants};
|
3
3
|
//# sourceMappingURL=ModalTitle.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Modal/index.js"],"sourcesContent":["import { ModalRoot } from './ModalRoot';\nimport { ModalTrigger } from './ModalTrigger';\nimport { ModalContent } from './ModalContent';\nimport { ModalTitle } from './ModalTitle';\nimport { ModalDescription } from './ModalDescription';\nimport { ModalFooter } from './ModalFooter';\nimport { ModalCancel } from './ModalCancel';\nimport { ModalAction } from './ModalAction';\nvar Modal = {\n Root: ModalRoot,\n Trigger: ModalTrigger,\n Content: ModalContent,\n Title: ModalTitle,\n Description: ModalDescription,\n Footer: ModalFooter,\n Cancel: ModalCancel,\n Action: ModalAction,\n};\nexport default Modal;\n"],"names":["Modal
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Modal/index.js"],"sourcesContent":["import { ModalRoot } from './ModalRoot';\nimport { ModalTrigger } from './ModalTrigger';\nimport { ModalContent } from './ModalContent';\nimport { ModalTitle } from './ModalTitle';\nimport { ModalDescription } from './ModalDescription';\nimport { ModalFooter } from './ModalFooter';\nimport { ModalCancel } from './ModalCancel';\nimport { ModalAction } from './ModalAction';\nvar Modal = {\n Root: ModalRoot,\n Trigger: ModalTrigger,\n Content: ModalContent,\n Title: ModalTitle,\n Description: ModalDescription,\n Footer: ModalFooter,\n Cancel: ModalCancel,\n Action: ModalAction,\n};\nexport default Modal;\n"],"names":["Modal","Root","ModalRoot","Trigger","ModalTrigger","Content","ModalContent","Title","ModalTitle","Description","ModalDescription","Footer","ModalFooter","Cancel","ModalCancel","Action","ModalAction"],"mappings":"wYAQG,IAACA,EAAQ,CACRC,KAAMC,EACNC,QAASC,EACTC,QAASC,EACTC,MAAOC,EACPC,YAAaC,EACbC,OAAQC,EACRC,OAAQC,EACRC,OAAQC"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import r from"react";import{cva as o}from"class-variance-authority";import{cn as a}from"../../utils/utils.mjs";import{scalingVariants as l,bgColorStyle as n}from"../../constants.mjs";import{useTheme as t}from"../../theme/ThemeProvider.mjs";import
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import r from"react";import{cva as o}from"class-variance-authority";import{cn as a}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{useWindowSize as i}from"../../utils/useWindowSize.mjs";import*as s from"../../color/alpha.mjs";var m=function(){return m=Object.assign||function(e){for(var r,o=1,a=arguments.length;o<a;o++)for(var l in r=arguments[o])Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l]);return e},m.apply(this,arguments)},u=function(e,r){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(a=Object.getOwnPropertySymbols(e);l<a.length;l++)r.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(o[a[l]]=e[a[l]])}return o},d=o("",{variants:{scaling:m({},l),color:n()}}),p=r.forwardRef((function(r,o){var l,n=r.scaling;r.size;var s=r.color,p=r.className,f=r.children,h=u(r,["scaling","size","color","className","children"]),v=t().theme,g=i(),b={scaling:null!=n?n:v.themeScaling,color:null!==(l=null!=s?s:v.themeColor)&&void 0!==l?l:"slate"};return e(c.Sidebar,m({className:a("bg-".concat(b.color,"A-6 dark:bg-").concat(b.color,"DarkA-6"),d({scaling:b.scaling}),p)},h,{collapsed:void 0===h.collapsed?g<=250:h.collapsed,children:f}))}));p.displayName="Sidebar.Root";var f=r.forwardRef((function(r,o){var a,l=r.scaling,n=r.size,i=r.color;r.className;var d=r.menuItemStyles,p=r.children,f=u(r,["scaling","size","color","className","menuItemStyles","children"]),h="50px",v="16px";"small"==n&&(h="40px",v="14px"),"large"==n&&(h="60px",v="18px");var g=t().theme,b={scaling:null!=l?l:g.themeScaling,color:null!==(a=null!=i?i:g.themeColor)&&void 0!==a?a:"slate"},y="".concat(b.color,"A"),S=s[y];return e(c.Menu,m({menuItemStyles:m({button:function(e){e.level;var r=e.active;return e.disabled,e.open,{height:h,fontSize:v,backgroundColor:r?S[5]:"","&:hover":{backgroundColor:S[3]}}}},d)},f,{children:p}))}));f.displayName="Sidebar.Menu";var h=r.forwardRef((function(r,o){r.scaling,r.size,r.color,r.className;var a=r.children,l=u(r,["scaling","size","color","className","children"]);return e(c.MenuItem,m({},l,{children:a}))}));h.displayName="Sidebar.Item";var v=r.forwardRef((function(r,o){r.scaling,r.size,r.color,r.className;var a=r.children,l=u(r,["scaling","size","color","className","children"]);return e(c.SubMenu,m({},l,{children:a}))}));v.displayName="Sidebar.SubMenu";var g={Root:p,Menu:f,Item:h,SubMenu:v};export{h as Item,f as Menu,p as Root,v as SubMenu,g as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{Cross1Icon as
|
2
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{Cross1Icon as l,TrashIcon as n,ChevronLeftIcon as r,ChevronRightIcon as o}from"@radix-ui/react-icons";import{cva as a}from"class-variance-authority";import{weightVariants as i,scalingVariants as c,bgColorStyle as s}from"../../constants.mjs";import d,{useState as m,useEffect as u}from"react";import{Tabs as p,TabList as f,Tab as h,TabPanel as b}from"react-tabs";import{IconButton as v}from"../IconButton/index.mjs";import{cn as x}from"../../utils/utils.mjs";import{useTheme as g}from"../../theme/ThemeProvider.mjs";var y=function(){return y=Object.assign||function(e){for(var t,l=1,n=arguments.length;l<n;l++)for(var r in t=arguments[l])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},y.apply(this,arguments)},j=function(e,t){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(l[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(l[n[r]]=e[n[r]])}return l},w=a("",{variants:{weight:y({},i),scaling:y({},c),color:s()}}),k=d.forwardRef((function(a,i){var c,s=a.tabData,d=a.scaling,k=a.color,O=a.setTabData,C=a.defaultTab,D=a.onDeleteTab,T=a.onDeleteAllTabs,N=a.onSelect;a.maxCount;var S=a.className,A=j(a,["tabData","scaling","color","setTabData","defaultTab","onDeleteTab","onDeleteAllTabs","onSelect","maxCount","className"]),P=m(0),z=P[0],I=P[1],B=g().theme,E={scaling:null!=d?d:B.themeScaling,color:null!==(c=null!=k?k:B.themeColor)&&void 0!==c?c:"slate"};return u((function(){s.length>20&&O(s.slice(0,20))}),[s]),e(p,y({selectedIndex:z,className:x("flex w-full text-slate-12",w({scaling:E.scaling}),S),onSelect:function(e,t,l){I(e),N&&N(e,t,l)}},A,{children:[t(f,{className:"mb-[10px] flex flex-1 overflow-x-auto overflow-y-hidden p-0",children:s.map((function(n,r){return t(h,{className:x("relative bottom-[-1px] inline-block w-[50px] max-w-[350px] flex-1 cursor-pointer list-none aria-selected:rounded-t-lg aria-selected:border aria-selected:border-b-0 aria-selected:border-slateA-8 aria-selected:bg-slate-1"),onClick:function(e){var t,l;return(null===(t=n.title)||void 0===t?void 0:t.onClick)&&(null===(l=n.title)||void 0===l?void 0:l.onClick(n))},children:e("div",{className:x("mx-[3px] my-[2px] flex justify-between rounded-lg px-[9px] py-[4px]","hover:bg-".concat(E.color,"A-6 hover:dark:bg-").concat(E.color,"DarkA-6")),children:[t("div",{className:"flex-1 overflow-hidden truncate text-ellipsis",children:n.title.children()}),((null==s?void 0:s.length)<15||z==r)&&t(v,{size:"small",appearance:"ghost",color:E.color,scaling:E.scaling,onClick:function(){var e=s.filter((function(e){return e.key!==n.key}));O(C&&0==e.length?[C]:e),0==e.length?I(0):z-1>=0&&I(z-1),D&&D(n)},children:t(l,{})})]})},r)}))}),s.map((function(e,l){var n;return t(b,{children:null===(n=null==e?void 0:e.content)||void 0===n?void 0:n.children()},l)})),e("div",{className:"right-5 mb-[10px] flex justify-end p-0 px-3 py-2",children:[t(v,{size:"small",appearance:"ghost",onClick:function(){I(0),O(C?[C]:[]),T&&T()},children:t(n,{})}),t(v,{size:"small",appearance:"ghost",onClick:function(){return z-1>=0&&I(z-1)},children:t(r,{})}),t(v,{size:"small",appearance:"ghost",onClick:function(){return z+1<s.length&&I(z+1)},children:t(o,{})})]})]}))}));k.displayName="DynamicTabs";export{k as default};
|
3
3
|
//# sourceMappingURL=DynamicTabs.mjs.map
|