@lotte-innovate/ui-component-test 0.0.157 → 0.0.158

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. package/README.md +8 -9
  2. package/dist/globals.css +2 -2
  3. package/dist/lib/Typography/Text/index.mjs +1 -1
  4. package/dist/lib/color/constants.js +1 -1
  5. package/dist/lib/color/constants.mjs +1 -1
  6. package/dist/lib/color/constants.mjs.map +1 -1
  7. package/dist/lib/components/Avatar/index.js +1 -0
  8. package/dist/lib/components/Avatar/index.mjs +1 -1
  9. package/dist/lib/components/Badge/index.js +3 -3
  10. package/dist/lib/components/Badge/index.mjs +1 -1
  11. package/dist/lib/components/Box/index.js +2 -2
  12. package/dist/lib/components/Box/index.mjs +1 -1
  13. package/dist/lib/components/Box/index.mjs.map +1 -1
  14. package/dist/lib/components/Breadcrumb/BreadcrumbLink.js +2 -2
  15. package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs +1 -1
  16. package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +1 -1
  17. package/dist/lib/components/Breadcrumb/BreadcrumbPage.js +3 -3
  18. package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs +1 -1
  19. package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +1 -1
  20. package/dist/lib/components/Breadcrumb/BreadcrumbRoot.js +2 -2
  21. package/dist/lib/components/Breadcrumb/BreadcrumbRoot.mjs +1 -1
  22. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.d.ts +1 -1
  23. package/dist/lib/components/CheckboxGroup/index.d.ts +1 -1
  24. package/dist/lib/components/Container/index.js +2 -2
  25. package/dist/lib/components/Container/index.mjs +1 -1
  26. package/dist/lib/components/Container/index.mjs.map +1 -1
  27. package/dist/lib/components/Datepicker/index.d.ts +2 -1
  28. package/dist/lib/components/Datepicker/index.js +6 -3
  29. package/dist/lib/components/Datepicker/index.mjs +1 -1
  30. package/dist/lib/components/Dialog/DialogAction.mjs +1 -1
  31. package/dist/lib/components/Dialog/DialogCancel.js +1 -1
  32. package/dist/lib/components/Dialog/DialogCancel.mjs +1 -1
  33. package/dist/lib/components/Dialog/DialogContent.js +1 -1
  34. package/dist/lib/components/Dialog/DialogContent.mjs +1 -1
  35. package/dist/lib/components/Dialog/DialogRoot.d.ts +2 -2
  36. package/dist/lib/components/Dialog/DialogTrigger.js +1 -0
  37. package/dist/lib/components/Dialog/DialogTrigger.mjs +1 -0
  38. package/dist/lib/components/Dialog/DialogTrigger.mjs.map +1 -1
  39. package/dist/lib/components/Dialog/index.d.ts +1 -1
  40. package/dist/lib/components/Dialog/index.js +16 -16
  41. package/dist/lib/components/Dialog/index.mjs.map +1 -1
  42. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.js +3 -3
  43. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.mjs +1 -1
  44. package/dist/lib/components/Editor/index.d.ts +0 -1
  45. package/dist/lib/components/Editor/index.js +11 -2
  46. package/dist/lib/components/Editor/index.mjs +1 -1
  47. package/dist/lib/components/Flex/index.js +2 -2
  48. package/dist/lib/components/Flex/index.mjs +1 -1
  49. package/dist/lib/components/Flex/index.mjs.map +1 -1
  50. package/dist/lib/components/Gnb/GnbInfo.js +2 -2
  51. package/dist/lib/components/Gnb/GnbInfo.mjs +1 -1
  52. package/dist/lib/components/Gnb/GnbLogo.js +1 -1
  53. package/dist/lib/components/Gnb/GnbLogo.mjs +1 -1
  54. package/dist/lib/components/Gnb/GnbLogo.mjs.map +1 -1
  55. package/dist/lib/components/Gnb/GnbMenuItem.js +1 -1
  56. package/dist/lib/components/Gnb/GnbMenuItem.mjs +1 -1
  57. package/dist/lib/components/Grid/NumberingPagination.js +64 -22
  58. package/dist/lib/components/Grid/NumberingPagination.mjs +1 -1
  59. package/dist/lib/components/Grid/NumberingPagination.mjs.map +1 -1
  60. package/dist/lib/components/Grid/index.d.ts +1 -0
  61. package/dist/lib/components/Grid/index.js +57 -39
  62. package/dist/lib/components/Grid/index.mjs +1 -1
  63. package/dist/lib/components/Grid/useGrid.js +30 -14
  64. package/dist/lib/components/Grid/useGrid.mjs +1 -1
  65. package/dist/lib/components/IconButton/index.js +10 -10
  66. package/dist/lib/components/IconButton/index.mjs +1 -1
  67. package/dist/lib/components/Modal/ModalAction.js +1 -1
  68. package/dist/lib/components/Modal/ModalAction.mjs +1 -1
  69. package/dist/lib/components/Modal/ModalCancel.mjs +1 -1
  70. package/dist/lib/components/Modal/ModalTitle.js +1 -1
  71. package/dist/lib/components/Modal/ModalTitle.mjs +1 -1
  72. package/dist/lib/components/Radio/index.js +3 -2
  73. package/dist/lib/components/Radio/index.mjs +1 -1
  74. package/dist/lib/components/SearchBar/index.js +2 -2
  75. package/dist/lib/components/SearchBar/index.mjs +1 -1
  76. package/dist/lib/components/Select/index.d.ts +2 -2
  77. package/dist/lib/components/Select/index.js +1 -1
  78. package/dist/lib/components/Select/index.mjs +1 -1
  79. package/dist/lib/components/SideBar/index.d.ts +27 -0
  80. package/dist/lib/components/SideBar/index.js +17 -4
  81. package/dist/lib/components/SideBar/index.mjs +1 -1
  82. package/dist/lib/components/Table/index.d.ts +1 -1
  83. package/dist/lib/components/Table/index.js +17 -10
  84. package/dist/lib/components/Table/index.mjs +1 -1
  85. package/dist/lib/components/Tabs/DynamicTabs.d.ts +4 -2
  86. package/dist/lib/components/Tabs/DynamicTabs.js +21 -16
  87. package/dist/lib/components/Tabs/DynamicTabs.mjs +1 -1
  88. package/dist/lib/components/TextField/index.js +3 -5
  89. package/dist/lib/components/TextField/index.mjs +1 -1
  90. package/dist/lib/components/Tree/index.d.ts +1 -0
  91. package/dist/lib/components/Tree/index.js +22 -1
  92. package/dist/lib/components/Tree/index.mjs +1 -1
  93. package/dist/lib/components/Tree/index.mjs.map +1 -1
  94. package/dist/lib/index.mjs +1 -1
  95. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  96. package/dist/lib/utils/useLoadTinyMCE.d.ts +1 -37
  97. package/dist/lib/utils/useLoadTinyMCE.js +151 -36
  98. package/dist/lib/utils/useLoadTinyMCE.mjs +2 -0
  99. package/dist/lib/utils/useLoadTinyMCE.mjs.map +1 -0
  100. package/dist/tsconfig.tsbuildinfo +1 -1
  101. package/package.json +1 -1
  102. package/dist/lib/is-client-ctx.d.ts +0 -4
  103. package/dist/lib/is-client-ctx.js +0 -11
  104. package/dist/lib/is-client-ctx.mjs +0 -2
  105. package/dist/lib/is-client-ctx.mjs.map +0 -1
@@ -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{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"../Box/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"../Container/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"../Editor/index.mjs";import"../Flex/index.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"../GridLayout/index.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"../SearchBar/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"../Tree/index.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)},j=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},u=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"}}),x=e((function(e,i){var x=e.children,g=e.className,M=j(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(u({size:b}),g),children:x}),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,{})})})]}))}));x.displayName="Modal.Title";export{x as ModalTitle,d as modalCloseVariants,u as modalTitleVariants};
2
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as t,useContext as a}from"react";import{cva as i}from"class-variance-authority";import{Dialog as n}from"@radix-ui/themes";import{IconButton as s}from"../IconButton/index.mjs";import{Cross2Icon as o}from"@radix-ui/react-icons";import{ModalContext as l}from"./ModalRoot.mjs";import{cn as m}from"../../utils/utils.mjs";var p=function(){return p=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},p.apply(this,arguments)},c=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)r.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(t[a[i]]=e[a[i]])}return t},d=i("m-0",{variants:{size:{small:"text-sm",medium:"text-lg",large:"text-xl","x-large":"text-2xl"}},defaultVariants:{size:"medium"}}),x=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"}}),f=t((function(t,i){var f=t.children,u=t.className,b=c(t,["children","className"]),h=a(l).size;return e("div",p({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"},b,{children:[r(n.Title,{className:m(d({size:h}),u),children:f}),r(n.Close,{className:x({size:h}),children:r(s,{"aria-label":"Close",className:"p-0 hover:text-slate-12 dark:hover:text-slateDark-12",size:h,children:r(o,{})})})]}))}));f.displayName="Modal.Title";export{f as ModalTitle,x as modalCloseVariants,d as modalTitleVariants};
3
3
  //# sourceMappingURL=ModalTitle.mjs.map
@@ -24,8 +24,9 @@ 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 } from 'react';
26
26
  import { cva } from 'class-variance-authority';
27
- import { Theme, Radio as RadioTheme, Flex } from '@radix-ui/themes';
28
- import { Text } from '../../../lib/Typography/Text';
27
+ import { Theme, Radio as RadioTheme } from '@radix-ui/themes';
28
+ import Flex from '../../../lib/components/Flex';
29
+ import Text from '../../../lib/Typography/Text';
29
30
  import { cn } from '../../../lib/utils/utils';
30
31
  import { useTheme } from '../../../lib/theme';
31
32
  import { MAIN_COLOR } from '../../../lib/color/constants';
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{forwardRef as a}from"react";import{cva as t}from"class-variance-authority";import{Theme as o,Flex as l,Radio as i}from"@radix-ui/themes";import{Text as n}from"../../Typography/Text/index.mjs";import{cn as s}from"../../utils/utils.mjs";import{useTheme as c}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as m}from"../../color/constants.mjs";var p=function(){return p=Object.assign||function(e){for(var r,a=1,t=arguments.length;a<t;a++)for(var o in r=arguments[a])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},p.apply(this,arguments)},u=function(e,r){var a={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(a[t[o]]=e[t[o]])}return a},f=t("font-normal",{variants:{size:{small:"text-[12px] gap-2",medium:"text-[14px] gap-2",large:"text-[16px] gap-3"}},defaultVariants:{size:"medium"}}),d=a((function(a,t){var d,h=a.value,v=a.scaling,g=a.color,y=a.size,x=void 0===y?"medium":y,O=a.appearance,b=void 0===O?"surface":O,j=a.children,z=a.className,P=u(a,["value","scaling","color","size","appearance","children","className"]),w=c().theme,N="2";"small"===x&&(N="1"),"large"===x&&(N="3");var C={scaling:null!=v?v:w.themeScaling,color:null!==(d=null!=g?g:w.themeColor)&&void 0!==d?d:m};return e(o,{accentColor:C.color,scaling:C.scaling,children:e(l,{asChild:!0,className:s(f({size:x}),z),children:r(n,{as:"label",size:N,color:"black",children:[e(i,p({ref:t,value:h,variant:b,size:N},P)),j]})})})}));d.displayName="Radio";export{d as Radio,d as default};
2
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{forwardRef as a}from"react";import{cva as t}from"class-variance-authority";import{Theme as o,Radio as l}from"@radix-ui/themes";import{Flex as i}from"../Flex/index.mjs";import{Text as n}from"../../Typography/Text/index.mjs";import{cn as s}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as c}from"../../color/constants.mjs";var p=function(){return p=Object.assign||function(e){for(var r,a=1,t=arguments.length;a<t;a++)for(var o in r=arguments[a])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},p.apply(this,arguments)},u=function(e,r){var a={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(a[t[o]]=e[t[o]])}return a},f=t("font-normal",{variants:{size:{small:"text-[12px] gap-2",medium:"text-[14px] gap-2",large:"text-[16px] gap-3"}},defaultVariants:{size:"medium"}}),d=a((function(a,t){var d,h=a.value,v=a.scaling,g=a.color,y=a.size,x=void 0===y?"medium":y,j=a.appearance,O=void 0===j?"surface":j,b=a.children,z=a.className,P=u(a,["value","scaling","color","size","appearance","children","className"]),w=m().theme,N="2";"small"===x&&(N="1"),"large"===x&&(N="3");var C={scaling:null!=v?v:w.themeScaling,color:null!==(d=null!=g?g:w.themeColor)&&void 0!==d?d:c};return e(o,{accentColor:C.color,scaling:C.scaling,children:e(i,{asChild:!0,className:s(f({size:x}),z),children:r(n,{as:"label",size:N,color:"black",children:[e(l,p({ref:t,value:h,variant:O,size:N},P)),b]})})})}));d.displayName="Radio";export{d as Radio,d as default};
3
3
  //# sourceMappingURL=index.mjs.map
@@ -73,10 +73,10 @@ export var SearchBar = forwardRef(function (_a, ref) {
73
73
  setInitSetting(true);
74
74
  }
75
75
  }, [children]);
76
- return (_jsxs("div", { ref: ref, children: [children && (_jsxs("div", { className: "flex h-0 w-full gap-3 pr-2 opacity-0", children: [_jsx("div", { className: "flex flex-wrap gap-3 overflow-hidden bg-redA-3 px-2", ref: containerRef, children: children }), _jsxs("div", { className: "flex gap-2", children: [SubmitButton ? (SubmitButton) : (_jsx(IconButton, { size: size, children: _jsx(MagnifyingGlassIcon, {}) })), ReloadButton ? (ReloadButton) : (_jsx(IconButton, { size: size, children: _jsx(ReloadIcon, {}) })), _jsx(IconButton, { size: size, children: _jsx(ReloadIcon, {}) })] })] })), _jsxs(Collapsible.Root, __assign({ className: cn('grid w-full gap-3', SearchBarVariants({ scaling: contextValue.scaling }), className), onOpenChange: setOpen }, props, { children: [_jsxs("div", { className: "flex w-full justify-between", children: [_jsx("div", { className: "flex", children: children &&
76
+ return (_jsxs("div", { ref: ref, children: [children && (_jsxs("div", { className: "flex h-0 w-full gap-3 pr-2 opacity-0", children: [_jsx("div", { className: "flex flex-wrap gap-3 overflow-hidden bg-redA-3 px-2", ref: containerRef, children: children }), _jsxs("div", { className: "flex gap-2", children: [ReloadButton ? (ReloadButton) : (_jsx(IconButton, { size: size, children: _jsx(ReloadIcon, {}) })), SubmitButton ? (SubmitButton) : (_jsx(IconButton, { size: size, children: _jsx(MagnifyingGlassIcon, {}) })), _jsx(IconButton, { size: size, children: _jsx(ReloadIcon, {}) })] })] })), _jsxs(Collapsible.Root, __assign({ className: cn('grid w-full', SearchBarVariants({ scaling: contextValue.scaling }), className), onOpenChange: setOpen }, props, { children: [_jsxs("div", { className: "flex w-full justify-between", children: [_jsx("div", { className: "flex gap-3", children: children &&
77
77
  React.Children.map(children, function (child, index) {
78
78
  return firstLineIndices.includes(index) ? child : null;
79
- }) }), _jsxs("div", { className: "flex gap-2", children: [SubmitButton ? (SubmitButton) : (_jsx(IconButton, { onClick: onClickSubmit, size: size, color: contextValue.color, children: _jsx(MagnifyingGlassIcon, {}) })), ReloadButton ? (ReloadButton) : (_jsx(IconButton, { onClick: onClickReload, size: size, color: contextValue.color, children: _jsx(ReloadIcon, {}) })), secondLineIndices.length > 0 && (_jsx(Collapsible.Trigger, { open: open, size: size, color: contextValue.color }))] })] }), _jsx(Collapsible.Content, { className: "flex gap-3", children: children &&
79
+ }) }), _jsxs("div", { className: "flex gap-2", children: [ReloadButton ? (ReloadButton) : (_jsx(IconButton, { onClick: onClickReload, size: size, color: contextValue.color, children: _jsx(ReloadIcon, {}) })), SubmitButton ? (SubmitButton) : (_jsx(IconButton, { onClick: onClickSubmit, size: size, color: contextValue.color, children: _jsx(MagnifyingGlassIcon, {}) })), secondLineIndices.length > 0 && (_jsx(Collapsible.Trigger, { open: open, size: size, color: contextValue.color }))] })] }), _jsx(Collapsible.Content, { className: "flex gap-3 pt-2", children: children &&
80
80
  React.Children.map(children, function (child, index) {
81
81
  return secondLineIndices.includes(index) ? child : null;
82
82
  }) })] }))] }));
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsxs as e,jsx as r}from"react/jsx-runtime";import l,{forwardRef as n,useRef as i,useState as o,useEffect as t}from"react";import{cva as c}from"class-variance-authority";import{scalingVariants as a}from"../../constants.mjs";import{cn as s}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import u from"../Collapsible/index.mjs";import{IconButton as d}from"../IconButton/index.mjs";import{MagnifyingGlassIcon as f,ReloadIcon as p}from"@radix-ui/react-icons";var h=function(){return h=Object.assign||function(e){for(var r,l=1,n=arguments.length;l<n;l++)for(var i in r=arguments[l])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},h.apply(this,arguments)},g=function(e,r){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(l[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(l[n[i]]=e[n[i]])}return l},v=c("",{variants:{scaling:h({},a)},defaultVariants:{scaling:"100%"}}),y=n((function(n,c){var a=n.className,y=n.children,b=n.scaling,x=n.size,C=n.color,j=n.onClickSubmit,O=n.onClickReload,N=n.SubmitButton,w=n.ReloadButton,z=g(n,["className","children","scaling","size","color","onClickSubmit","onClickReload","SubmitButton","ReloadButton"]),B=i(null),S=m().theme,R={scaling:null!=b?b:S.themeScaling,color:null!=C?C:S.themeColor,size:x},k=o([]),P=k[0],A=k[1],E=o([]),I=E[0],T=E[1],V=o(!1),q=V[0],D=V[1],F=o(!1);F[0];var G=F[1];return t((function(){if(y){G(!1);var e=B.current,r=Array.from(e.children),l=r[0].getBoundingClientRect().top,n=[],i=[];r.forEach((function(e,r){e.getBoundingClientRect().top===l?n.push(r):i.push(r)})),A(n),T(i),G(!0)}}),[y]),e("div",{ref:c,children:[y&&e("div",{className:"flex h-0 w-full gap-3 pr-2 opacity-0",children:[r("div",{className:"flex flex-wrap gap-3 overflow-hidden bg-redA-3 px-2",ref:B,children:y}),e("div",{className:"flex gap-2",children:[N||r(d,{size:x,children:r(f,{})}),w||r(d,{size:x,children:r(p,{})}),r(d,{size:x,children:r(p,{})})]})]}),e(u.Root,h({className:s("grid w-full gap-3",v({scaling:R.scaling}),a),onOpenChange:D},z,{children:[e("div",{className:"flex w-full justify-between",children:[r("div",{className:"flex",children:y&&l.Children.map(y,(function(e,r){return P.includes(r)?e:null}))}),e("div",{className:"flex gap-2",children:[N||r(d,{onClick:j,size:x,color:R.color,children:r(f,{})}),w||r(d,{onClick:O,size:x,color:R.color,children:r(p,{})}),I.length>0&&r(u.Trigger,{open:q,size:x,color:R.color})]})]}),r(u.Content,{className:"flex gap-3",children:y&&l.Children.map(y,(function(e,r){return I.includes(r)?e:null}))})]}))]})}));y.displayName="SearchBar";export{y as SearchBar,v as SearchBarVariants,y as default};
2
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import l,{forwardRef as n,useRef as i,useState as o,useEffect as t}from"react";import{cva as c}from"class-variance-authority";import{scalingVariants as a}from"../../constants.mjs";import{cn as s}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import u from"../Collapsible/index.mjs";import{IconButton as d}from"../IconButton/index.mjs";import{ReloadIcon as f,MagnifyingGlassIcon as p}from"@radix-ui/react-icons";var h=function(){return h=Object.assign||function(e){for(var r,l=1,n=arguments.length;l<n;l++)for(var i in r=arguments[l])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},h.apply(this,arguments)},g=function(e,r){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(l[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(l[n[i]]=e[n[i]])}return l},v=c("",{variants:{scaling:h({},a)},defaultVariants:{scaling:"100%"}}),y=n((function(n,c){var a=n.className,y=n.children,b=n.scaling,x=n.size,C=n.color,j=n.onClickSubmit,O=n.onClickReload,N=n.SubmitButton,w=n.ReloadButton,z=g(n,["className","children","scaling","size","color","onClickSubmit","onClickReload","SubmitButton","ReloadButton"]),B=i(null),S=m().theme,R={scaling:null!=b?b:S.themeScaling,color:null!=C?C:S.themeColor,size:x},k=o([]),P=k[0],A=k[1],E=o([]),I=E[0],T=E[1],V=o(!1),q=V[0],D=V[1],F=o(!1);F[0];var G=F[1];return t((function(){if(y){G(!1);var e=B.current,r=Array.from(e.children),l=r[0].getBoundingClientRect().top,n=[],i=[];r.forEach((function(e,r){e.getBoundingClientRect().top===l?n.push(r):i.push(r)})),A(n),T(i),G(!0)}}),[y]),e("div",{ref:c,children:[y&&e("div",{className:"flex h-0 w-full gap-3 pr-2 opacity-0",children:[r("div",{className:"flex flex-wrap gap-3 overflow-hidden bg-redA-3 px-2",ref:B,children:y}),e("div",{className:"flex gap-2",children:[w||r(d,{size:x,children:r(f,{})}),N||r(d,{size:x,children:r(p,{})}),r(d,{size:x,children:r(f,{})})]})]}),e(u.Root,h({className:s("grid w-full",v({scaling:R.scaling}),a),onOpenChange:D},z,{children:[e("div",{className:"flex w-full justify-between",children:[r("div",{className:"flex gap-3",children:y&&l.Children.map(y,(function(e,r){return P.includes(r)?e:null}))}),e("div",{className:"flex gap-2",children:[w||r(d,{onClick:O,size:x,color:R.color,children:r(f,{})}),N||r(d,{onClick:j,size:x,color:R.color,children:r(p,{})}),I.length>0&&r(u.Trigger,{open:q,size:x,color:R.color})]})]}),r(u.Content,{className:"flex gap-3 pt-2",children:y&&l.Children.map(y,(function(e,r){return I.includes(r)?e:null}))})]}))]})}));y.displayName="SearchBar";export{y as SearchBar,v as SearchBarVariants,y as default};
3
3
  //# sourceMappingURL=index.mjs.map
@@ -17,7 +17,7 @@ declare const selectVariants: (props?: ({
17
17
  radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
18
18
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
19
19
  export declare const useSelectContext: () => SelectProps;
20
- export declare const Root: React.ForwardRefExoticComponent<SelectTheme.RootProps & SelectProps & React.RefAttributes<never>>;
20
+ export declare const Root: React.ForwardRefExoticComponent<Omit<SelectTheme.RootProps, "size"> & SelectProps & React.RefAttributes<never>>;
21
21
  export declare const Trigger: React.ForwardRefExoticComponent<Omit<SelectTheme.TriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & SelectProps & React.RefAttributes<HTMLButtonElement>>;
22
22
  export declare const Content: React.ForwardRefExoticComponent<Omit<SelectTheme.ContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
23
23
  export declare const Item: React.ForwardRefExoticComponent<Omit<SelectTheme.ItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
@@ -25,7 +25,7 @@ export declare const Group: React.ForwardRefExoticComponent<Omit<SelectTheme.Gro
25
25
  export declare const Label: React.ForwardRefExoticComponent<Omit<SelectTheme.LabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
26
26
  export declare const Separator: React.ForwardRefExoticComponent<Omit<SelectTheme.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
27
27
  declare const Select: {
28
- Root: React.ForwardRefExoticComponent<SelectTheme.RootProps & SelectProps & React.RefAttributes<never>>;
28
+ Root: React.ForwardRefExoticComponent<Omit<SelectTheme.RootProps, "size"> & SelectProps & React.RefAttributes<never>>;
29
29
  Trigger: React.ForwardRefExoticComponent<Omit<SelectTheme.TriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & SelectProps & React.RefAttributes<HTMLButtonElement>>;
30
30
  Content: React.ForwardRefExoticComponent<Omit<SelectTheme.ContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
31
31
  Item: React.ForwardRefExoticComponent<Omit<SelectTheme.ItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
@@ -76,7 +76,7 @@ Trigger.displayName = 'Select.Trigger';
76
76
  export var Content = React.forwardRef(function (_a, forwardedRef) {
77
77
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
78
78
  var _b = useSelectContext(), radius = _b.radius, color = _b.color;
79
- return (_jsx(SelectTheme.Content, __assign({ ref: forwardedRef, color: color, position: "popper", className: cn(selectVariants({ radius: radius == 'full' ? 'large' : radius }), className) }, props, { children: children })));
79
+ return (_jsx(SelectTheme.Content, __assign({ ref: forwardedRef, color: color, position: "popper", className: cn(selectVariants({ radius: radius == 'full' ? 'large' : radius }), 'z-10', className) }, props, { children: children })));
80
80
  });
81
81
  Content.displayName = 'Select.Content';
82
82
  export var Item = React.forwardRef(function (_a, forwardedRef) {
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as r}from"react/jsx-runtime";import e,{createContext as a,useContext as l}from"react";import{Theme as i,Select as n}from"@radix-ui/themes";import{cva as c}from"class-variance-authority";import{cn as o}from"../../utils/utils.mjs";import{radiusVariants as s,selectAppearanceStyle as t}from"../../constants.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as d}from"../../color/constants.mjs";var u=function(){return u=Object.assign||function(r){for(var e,a=1,l=arguments.length;a<l;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},u.apply(this,arguments)},f=function(r,e){var a={};for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&e.indexOf(l)<0&&(a[l]=r[l]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(l=Object.getOwnPropertySymbols(r);i<l.length;i++)e.indexOf(l[i])<0&&Object.prototype.propertyIsEnumerable.call(r,l[i])&&(a[l[i]]=r[l[i]])}return a},p=c("",{variants:{radius:u({},s.base)},defaultVariants:{radius:"medium"}}),h=a({size:"medium",scaling:"100%",color:d,radius:"medium",appearance:"classic"}),v=function(){return l(h)},N=e.forwardRef((function(e,a){var l,c=e.scaling,o=e.size,s=e.color,t=e.radius,p=e.appearance,v=e.children,N=f(e,["scaling","size","color","radius","appearance","children"]),g=m().theme,y="2";"small"===o&&(y="1"),"large"===o&&(y="3");var S={scaling:null!=c?c:g.themeScaling,color:null!==(l=null!=s?s:g.themeColor)&&void 0!==l?l:d,radius:null!=t?t:g.themeRadius,size:o,sizeTheme:y,appearance:p};return r(h.Provider,{value:S,children:r(i,{scaling:S.scaling,accentColor:S.color,hasBackground:!1,children:r("div",{ref:a,children:r(n.Root,u({size:y},N,{children:v}))})})})}));N.displayName="Select.Root";var g=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]),s=v(),m=s.radius,d=void 0===m?"medium":m,h=s.color,N=s.appearance,g=void 0===N?"classic":N;return r(n.Trigger,u({ref:a,variant:g,radius:d,className:o(p({radius:d}),t(g,h),i)},c,{children:l}))}));g.displayName="Select.Trigger";var y=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]),s=v(),t=s.radius,m=s.color;return r(n.Content,u({ref:a,color:m,position:"popper",className:o(p({radius:"full"==t?"large":t}),i)},c,{children:l}))}));y.displayName="Select.Content";var S=e.forwardRef((function(e,a){var l=e.value,i=e.children,c=e.className,s=f(e,["value","children","className"]),t=v().radius;return r(n.Item,u({ref:a,value:l},s,{className:o(p({radius:t}),c),children:i}))}));S.displayName="Select.Item";var b=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]);return r(n.Group,u({ref:a},c,{className:i,children:l}))}));b.displayName="Select.Group";var O=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]);return r(n.Label,u({ref:a},c,{className:i,children:l}))}));O.displayName="Select.Label";var j=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]);return r(n.Separator,u({ref:a},c,{className:i,children:l}))}));j.displayName="Select.Separator";var w={Root:N,Trigger:g,Content:y,Item:S,Group:b,Label:O,Separator:j};export{y as Content,b as Group,S as Item,O as Label,N as Root,j as Separator,g as Trigger,w as default,v as useSelectContext};
2
+ import{jsx as r}from"react/jsx-runtime";import e,{createContext as a,useContext as l}from"react";import{Theme as i,Select as n}from"@radix-ui/themes";import{cva as c}from"class-variance-authority";import{cn as o}from"../../utils/utils.mjs";import{radiusVariants as s,selectAppearanceStyle as t}from"../../constants.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as d}from"../../color/constants.mjs";var u=function(){return u=Object.assign||function(r){for(var e,a=1,l=arguments.length;a<l;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},u.apply(this,arguments)},f=function(r,e){var a={};for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&e.indexOf(l)<0&&(a[l]=r[l]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(l=Object.getOwnPropertySymbols(r);i<l.length;i++)e.indexOf(l[i])<0&&Object.prototype.propertyIsEnumerable.call(r,l[i])&&(a[l[i]]=r[l[i]])}return a},p=c("",{variants:{radius:u({},s.base)},defaultVariants:{radius:"medium"}}),h=a({size:"medium",scaling:"100%",color:d,radius:"medium",appearance:"classic"}),v=function(){return l(h)},N=e.forwardRef((function(e,a){var l,c=e.scaling,o=e.size,s=e.color,t=e.radius,p=e.appearance,v=e.children,N=f(e,["scaling","size","color","radius","appearance","children"]),g=m().theme,y="2";"small"===o&&(y="1"),"large"===o&&(y="3");var S={scaling:null!=c?c:g.themeScaling,color:null!==(l=null!=s?s:g.themeColor)&&void 0!==l?l:d,radius:null!=t?t:g.themeRadius,size:o,sizeTheme:y,appearance:p};return r(h.Provider,{value:S,children:r(i,{scaling:S.scaling,accentColor:S.color,hasBackground:!1,children:r("div",{ref:a,children:r(n.Root,u({size:y},N,{children:v}))})})})}));N.displayName="Select.Root";var g=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]),s=v(),m=s.radius,d=void 0===m?"medium":m,h=s.color,N=s.appearance,g=void 0===N?"classic":N;return r(n.Trigger,u({ref:a,variant:g,radius:d,className:o(p({radius:d}),t(g,h),i)},c,{children:l}))}));g.displayName="Select.Trigger";var y=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]),s=v(),t=s.radius,m=s.color;return r(n.Content,u({ref:a,color:m,position:"popper",className:o(p({radius:"full"==t?"large":t}),"z-10",i)},c,{children:l}))}));y.displayName="Select.Content";var S=e.forwardRef((function(e,a){var l=e.value,i=e.children,c=e.className,s=f(e,["value","children","className"]),t=v().radius;return r(n.Item,u({ref:a,value:l},s,{className:o(p({radius:t}),c),children:i}))}));S.displayName="Select.Item";var b=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]);return r(n.Group,u({ref:a},c,{className:i,children:l}))}));b.displayName="Select.Group";var O=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]);return r(n.Label,u({ref:a},c,{className:i,children:l}))}));O.displayName="Select.Label";var j=e.forwardRef((function(e,a){var l=e.children,i=e.className,c=f(e,["children","className"]);return r(n.Separator,u({ref:a},c,{className:i,children:l}))}));j.displayName="Select.Separator";var w={Root:N,Trigger:g,Content:y,Item:S,Group:b,Label:O,Separator:j};export{y as Content,b as Group,S as Item,O as Label,N as Root,j as Separator,g as Trigger,w as default,v as useSelectContext};
3
3
  //# sourceMappingURL=index.mjs.map
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import * as ReactProSidebar from 'react-pro-sidebar';
4
+ import { IRadius } from '../../../lib/types';
4
5
  export interface SidebarProps extends VariantProps<typeof sidebarVariants> {
5
6
  size?: 'small' | 'medium' | 'large' | 'fill-large';
7
+ radius?: IRadius;
6
8
  }
7
9
  declare const sidebarVariants: (props?: ({
8
10
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
@@ -17,5 +19,30 @@ declare const Sidebar: {
17
19
  Menu: React.ForwardRefExoticComponent<Omit<Omit<ReactProSidebar.MenuProps & React.RefAttributes<HTMLMenuElement>, "ref">, "size"> & SidebarProps & React.RefAttributes<HTMLMenuElement>>;
18
20
  Item: React.ForwardRefExoticComponent<Omit<Omit<ReactProSidebar.MenuItemProps & React.RefAttributes<HTMLLIElement>, "ref">, "size"> & SidebarProps & React.RefAttributes<HTMLLIElement>>;
19
21
  SubMenu: React.ForwardRefExoticComponent<Omit<Omit<ReactProSidebar.SubMenuProps & React.RefAttributes<HTMLLIElement>, "ref">, "size"> & SidebarProps & React.RefAttributes<HTMLLIElement>>;
22
+ menuClasses: {
23
+ root: string;
24
+ menuItemRoot: string;
25
+ subMenuRoot: string;
26
+ button: string;
27
+ prefix: string;
28
+ suffix: string;
29
+ label: string;
30
+ icon: string;
31
+ subMenuContent: string;
32
+ SubMenuExpandIcon: string;
33
+ disabled: string;
34
+ active: string;
35
+ open: string;
36
+ };
37
+ sidebarClasses: {
38
+ root: string;
39
+ container: string;
40
+ image: string;
41
+ backdrop: string;
42
+ collapsed: string;
43
+ toggled: string;
44
+ rtl: string;
45
+ broken: string;
46
+ };
20
47
  };
21
48
  export default Sidebar;
@@ -28,6 +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 { menuClasses, sidebarClasses } from 'react-pro-sidebar';
31
32
  import { useWindowSize } from '../../../lib/utils/useWindowSize';
32
33
  import * as alphaColors from '../../../lib/color/alpha';
33
34
  var sidebarVariants = cva('', {
@@ -50,8 +51,9 @@ export var Root = React.forwardRef(function (_a, forwardedRef) {
50
51
  Root.displayName = 'Sidebar.Root';
51
52
  export var Menu = React.forwardRef(function (_a, forwardedRef) {
52
53
  var _b;
53
- var scaling = _a.scaling, size = _a.size, color = _a.color, className = _a.className, menuItemStyles = _a.menuItemStyles, children = _a.children, props = __rest(_a, ["scaling", "size", "color", "className", "menuItemStyles", "children"]);
54
+ var scaling = _a.scaling, size = _a.size, color = _a.color, radius = _a.radius, className = _a.className, menuItemStyles = _a.menuItemStyles, children = _a.children, props = __rest(_a, ["scaling", "size", "color", "radius", "className", "menuItemStyles", "children"]);
54
55
  var heigthSize = '50px';
56
+ var radiusSize = '0px';
55
57
  var fontSize = '16px';
56
58
  if (size == 'small') {
57
59
  heigthSize = '40px';
@@ -61,6 +63,14 @@ export var Menu = React.forwardRef(function (_a, forwardedRef) {
61
63
  heigthSize = '60px';
62
64
  fontSize = '18px';
63
65
  }
66
+ if (radius == 'small')
67
+ radiusSize = '3px';
68
+ if (radius == 'medium')
69
+ radiusSize = '4px';
70
+ if (radius == 'large')
71
+ radiusSize = '6px';
72
+ if (radius == 'full')
73
+ radiusSize = '9999px';
64
74
  var theme = useTheme().theme;
65
75
  var sidebarStyle = {
66
76
  scaling: scaling !== null && scaling !== void 0 ? scaling : theme.themeScaling,
@@ -68,11 +78,12 @@ export var Menu = React.forwardRef(function (_a, forwardedRef) {
68
78
  };
69
79
  var colorKey = "".concat(sidebarStyle.color, "A");
70
80
  var colorValue = alphaColors[colorKey];
71
- return (_jsx(ReactProSidebar.Menu, __assign({ menuItemStyles: __assign({ button: function (_a) {
81
+ return (_jsx(ReactProSidebar.Menu, __assign({ className: className, menuItemStyles: __assign({ button: function (_a) {
72
82
  var level = _a.level, active = _a.active, disabled = _a.disabled, open = _a.open;
73
83
  return {
74
84
  height: heigthSize,
75
85
  fontSize: fontSize,
86
+ borderRadius: radiusSize,
76
87
  backgroundColor: active ? colorValue[5] : '',
77
88
  '&:hover': {
78
89
  backgroundColor: colorValue[3],
@@ -83,12 +94,12 @@ export var Menu = React.forwardRef(function (_a, forwardedRef) {
83
94
  Menu.displayName = 'Sidebar.Menu';
84
95
  export var Item = React.forwardRef(function (_a, forwardedRef) {
85
96
  var scaling = _a.scaling, size = _a.size, color = _a.color, className = _a.className, children = _a.children, props = __rest(_a, ["scaling", "size", "color", "className", "children"]);
86
- return _jsx(ReactProSidebar.MenuItem, __assign({}, props, { children: children }));
97
+ return (_jsx(ReactProSidebar.MenuItem, __assign({ className: className }, props, { children: children })));
87
98
  });
88
99
  Item.displayName = 'Sidebar.Item';
89
100
  export var SubMenu = React.forwardRef(function (_a, forwardedRef) {
90
101
  var scaling = _a.scaling, size = _a.size, color = _a.color, className = _a.className, children = _a.children, props = __rest(_a, ["scaling", "size", "color", "className", "children"]);
91
- return _jsx(ReactProSidebar.SubMenu, __assign({}, props, { children: children }));
102
+ return (_jsx(ReactProSidebar.SubMenu, __assign({ className: className }, props, { children: children })));
92
103
  });
93
104
  SubMenu.displayName = 'Sidebar.SubMenu';
94
105
  var Sidebar = {
@@ -96,5 +107,7 @@ var Sidebar = {
96
107
  Menu: Menu,
97
108
  Item: Item,
98
109
  SubMenu: SubMenu,
110
+ menuClasses: menuClasses,
111
+ sidebarClasses: sidebarClasses,
99
112
  };
100
113
  export default Sidebar;
@@ -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*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};
2
+ import{jsx as e}from"react/jsx-runtime";import r from"react";import{cva as a}from"class-variance-authority";import{cn as l}from"../../utils/utils.mjs";import{scalingVariants as o,bgColorStyle as s}from"../../constants.mjs";import{useTheme as n}from"../../theme/ThemeProvider.mjs";import*as i from"react-pro-sidebar";import{menuClasses as t,sidebarClasses as c}from"react-pro-sidebar";import{useWindowSize as m}from"../../utils/useWindowSize.mjs";import*as u from"../../color/alpha.mjs";var d=function(){return d=Object.assign||function(e){for(var r,a=1,l=arguments.length;a<l;a++)for(var o in r=arguments[a])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},d.apply(this,arguments)},p=function(e,r){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&r.indexOf(l)<0&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(l=Object.getOwnPropertySymbols(e);o<l.length;o++)r.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(e,l[o])&&(a[l[o]]=e[l[o]])}return a},f=a("",{variants:{scaling:d({},o),color:s()}}),h=r.forwardRef((function(r,a){var o,s=r.scaling;r.size;var t=r.color,c=r.className,u=r.children,h=p(r,["scaling","size","color","className","children"]),b=n().theme,g=m(),v={scaling:null!=s?s:b.themeScaling,color:null!==(o=null!=t?t:b.themeColor)&&void 0!==o?o:"slate"};return e(i.Sidebar,d({className:l("bg-".concat(v.color,"A-6 dark:bg-").concat(v.color,"DarkA-6"),f({scaling:v.scaling}),c)},h,{collapsed:void 0===h.collapsed?g<=250:h.collapsed,children:u}))}));h.displayName="Sidebar.Root";var b=r.forwardRef((function(r,a){var l,o=r.scaling,s=r.size,t=r.color,c=r.radius,m=r.className,f=r.menuItemStyles,h=r.children,b=p(r,["scaling","size","color","radius","className","menuItemStyles","children"]),g="50px",v="0px",y="16px";"small"==s&&(g="40px",y="14px"),"large"==s&&(g="60px",y="18px"),"small"==c&&(v="3px"),"medium"==c&&(v="4px"),"large"==c&&(v="6px"),"full"==c&&(v="9999px");var S=n().theme,N={scaling:null!=o?o:S.themeScaling,color:null!==(l=null!=t?t:S.themeColor)&&void 0!==l?l:"slate"},x="".concat(N.color,"A"),j=u[x];return e(i.Menu,d({className:m,menuItemStyles:d({button:function(e){e.level;var r=e.active;return e.disabled,e.open,{height:g,fontSize:y,borderRadius:v,backgroundColor:r?j[5]:"","&:hover":{backgroundColor:j[3]}}}},f)},b,{children:h}))}));b.displayName="Sidebar.Menu";var g=r.forwardRef((function(r,a){r.scaling,r.size,r.color;var l=r.className,o=r.children,s=p(r,["scaling","size","color","className","children"]);return e(i.MenuItem,d({className:l},s,{children:o}))}));g.displayName="Sidebar.Item";var v=r.forwardRef((function(r,a){r.scaling,r.size,r.color;var l=r.className,o=r.children,s=p(r,["scaling","size","color","className","children"]);return e(i.SubMenu,d({className:l},s,{children:o}))}));v.displayName="Sidebar.SubMenu";var y={Root:h,Menu:b,Item:g,SubMenu:v,menuClasses:t,sidebarClasses:c};export{g as Item,b as Menu,h as Root,v as SubMenu,y as default};
3
3
  //# sourceMappingURL=index.mjs.map
@@ -5,7 +5,7 @@ import { Table as TableTheme } from '@radix-ui/themes';
5
5
  export interface TableProps extends VariantProps<typeof tableVariants> {
6
6
  color?: IColor;
7
7
  appearance?: 'ghost' | 'surface';
8
- size?: 'small' | 'medium' | 'large';
8
+ size?: 'x-small' | 'small' | 'medium' | 'large';
9
9
  }
10
10
  declare const tableVariants: (props?: ({
11
11
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
@@ -28,6 +28,7 @@ import { Table as TableTheme, Theme } from '@radix-ui/themes';
28
28
  import { cn } from '../../../lib/utils/utils';
29
29
  import { radiusVariants, scalingVariants } from '../../../lib/constants';
30
30
  import { useTheme } from '../../../lib/theme';
31
+ var rootSize = 'medium';
31
32
  var tableVariants = cva('', {
32
33
  variants: {
33
34
  scaling: __assign({}, scalingVariants),
@@ -40,15 +41,21 @@ var tableVariants = cva('', {
40
41
  var tableRowVariants = cva('', {
41
42
  variants: {
42
43
  size: {
43
- small: 'h-[36px]',
44
- medium: 'h-[44px]',
45
- large: 'h-[48px] p-3',
44
+ 'x-small': 'h-[32px] text-[12px] p-[8px]',
45
+ small: 'h-[36px] text-[14px] p-[8px]',
46
+ medium: 'h-[44px] text-[14px] p-[8px]',
47
+ large: 'h-[48px] text-[14px] p-[12px]',
46
48
  },
47
49
  },
50
+ defaultVariants: {
51
+ size: 'medium',
52
+ },
48
53
  });
49
54
  export var Root = React.forwardRef(function (_a, ref) {
50
55
  var className = _a.className, children = _a.children, appearance = _a.appearance, scaling = _a.scaling, size = _a.size, radius = _a.radius, tableProps = __rest(_a, ["className", "children", "appearance", "scaling", "size", "radius"]);
51
56
  var theme = useTheme().theme;
57
+ if (size)
58
+ rootSize = size;
52
59
  var sizeTheme = '2';
53
60
  if (size === 'small')
54
61
  sizeTheme = '1';
@@ -63,7 +70,7 @@ export var Root = React.forwardRef(function (_a, ref) {
63
70
  });
64
71
  Root.displayName = 'Table.Root';
65
72
  export var Header = React.forwardRef(function (_a, forwardedRef) {
66
- var className = _a.className, children = _a.children, scaling = _a.scaling, props = __rest(_a, ["className", "children", "scaling"]);
73
+ var className = _a.className, children = _a.children, scaling = _a.scaling, size = _a.size, props = __rest(_a, ["className", "children", "scaling", "size"]);
67
74
  return (_jsx(TableTheme.Header, __assign({ ref: forwardedRef, className: cn('', tableVariants({ scaling: scaling }), className) }, props, { children: children })));
68
75
  });
69
76
  Header.displayName = 'Table.Header';
@@ -73,23 +80,23 @@ export var Body = React.forwardRef(function (_a, forwardedRef) {
73
80
  });
74
81
  Body.displayName = 'Table.Body';
75
82
  export var Row = React.forwardRef(function (_a, forwardedRef) {
76
- var className = _a.className, children = _a.children, scaling = _a.scaling, props = __rest(_a, ["className", "children", "scaling"]);
83
+ var className = _a.className, children = _a.children, scaling = _a.scaling, size = _a.size, props = __rest(_a, ["className", "children", "scaling", "size"]);
77
84
  return (_jsx(TableTheme.Row, __assign({ ref: forwardedRef, className: cn('', tableVariants({ scaling: scaling }), className) }, props, { children: children })));
78
85
  });
79
86
  Row.displayName = 'Table.Row';
80
87
  export var Cell = React.forwardRef(function (_a, forwardedRef) {
81
- var className = _a.className, children = _a.children, scaling = _a.scaling, cellProps = __rest(_a, ["className", "children", "scaling"]);
82
- return (_jsx(TableTheme.Cell, __assign({ className: cn('', tableVariants({ scaling: scaling }), className) }, cellProps, { ref: forwardedRef, children: children })));
88
+ var className = _a.className, children = _a.children, scaling = _a.scaling, size = _a.size, cellProps = __rest(_a, ["className", "children", "scaling", "size"]);
89
+ return (_jsx(TableTheme.Cell, __assign({ className: cn(tableRowVariants({ size: rootSize }), tableVariants({ scaling: scaling }), className) }, cellProps, { ref: forwardedRef, children: children })));
83
90
  });
84
91
  Cell.displayName = 'Table.Cell';
85
92
  export var ColumnHeaderCell = React.forwardRef(function (_a, forwardedRef) {
86
93
  var className = _a.className, children = _a.children, scaling = _a.scaling, size = _a.size, props = __rest(_a, ["className", "children", "scaling", "size"]);
87
- return (_jsx(TableTheme.ColumnHeaderCell, __assign({ ref: forwardedRef, className: cn('', tableVariants({ scaling: scaling }), tableRowVariants({ size: size }), className) }, props, { children: children })));
94
+ return (_jsx(TableTheme.ColumnHeaderCell, __assign({ ref: forwardedRef, className: cn('', tableVariants({ scaling: scaling }), tableRowVariants({ size: rootSize }), className) }, props, { children: children })));
88
95
  });
89
96
  ColumnHeaderCell.displayName = 'Table.ColumnHeaderCell';
90
97
  export var RowHeaderCell = React.forwardRef(function (_a, forwardedRef) {
91
- var className = _a.className, children = _a.children, scaling = _a.scaling, props = __rest(_a, ["className", "children", "scaling"]);
92
- return (_jsx(TableTheme.RowHeaderCell, __assign({ ref: forwardedRef, className: cn('', tableVariants({ scaling: scaling }), className) }, props, { children: children })));
98
+ var className = _a.className, children = _a.children, scaling = _a.scaling, size = _a.size, props = __rest(_a, ["className", "children", "scaling", "size"]);
99
+ return (_jsx(TableTheme.RowHeaderCell, __assign({ ref: forwardedRef, className: cn('', tableVariants({ scaling: scaling }), tableRowVariants({ size: rootSize }), className) }, props, { children: children })));
93
100
  });
94
101
  RowHeaderCell.displayName = 'Table.RowHeaderCell';
95
102
  var Table = {
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as a}from"react/jsx-runtime";import e from"react";import{cva as r}from"class-variance-authority";import{Theme as l,Table as s}from"@radix-ui/themes";import{cn as n}from"../../utils/utils.mjs";import{scalingVariants as i,radiusVariants as c}from"../../constants.mjs";import{useTheme as t}from"../../theme/ThemeProvider.mjs";var o=function(){return o=Object.assign||function(a){for(var e,r=1,l=arguments.length;r<l;r++)for(var s in e=arguments[r])Object.prototype.hasOwnProperty.call(e,s)&&(a[s]=e[s]);return a},o.apply(this,arguments)},m=function(a,e){var r={};for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&e.indexOf(l)<0&&(r[l]=a[l]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(l=Object.getOwnPropertySymbols(a);s<l.length;s++)e.indexOf(l[s])<0&&Object.prototype.propertyIsEnumerable.call(a,l[s])&&(r[l[s]]=a[l[s]])}return r},d=r("",{variants:{scaling:o({},i),radius:o({},c.base)},defaultVariants:{scaling:"100%"}}),f=r("",{variants:{size:{small:"h-[36px]",medium:"h-[44px]",large:"h-[48px] p-3"}}}),u=e.forwardRef((function(e,r){var i=e.className,c=e.children,f=e.appearance,u=e.scaling,h=e.size,p=e.radius,g=m(e,["className","children","appearance","scaling","size","radius"]),N=t().theme,v="2";"small"===h&&(v="1"),"large"===h&&(v="3");var y=null!=p?p:N.themeRadius,b={scaling:null!=u?u:N.themeScaling,radius:"full"===y?"large":y};return a(l,{hasBackground:!1,children:a(s.Root,o({ref:r,className:n(d(b),i),variant:f,size:v},g,{children:c}))})}));u.displayName="Table.Root";var h=e.forwardRef((function(e,r){var l=e.className,i=e.children,c=e.scaling,t=m(e,["className","children","scaling"]);return a(s.Header,o({ref:r,className:n("",d({scaling:c}),l)},t,{children:i}))}));h.displayName="Table.Header";var p=e.forwardRef((function(e,r){var l=e.className,i=e.children,c=e.scaling,t=m(e,["className","children","scaling"]);return a(s.Body,o({ref:r,className:n("",d({scaling:c}),l)},t,{children:i}))}));p.displayName="Table.Body";var g=e.forwardRef((function(e,r){var l=e.className,i=e.children,c=e.scaling,t=m(e,["className","children","scaling"]);return a(s.Row,o({ref:r,className:n("",d({scaling:c}),l)},t,{children:i}))}));g.displayName="Table.Row";var N=e.forwardRef((function(e,r){var l=e.className,i=e.children,c=e.scaling,t=m(e,["className","children","scaling"]);return a(s.Cell,o({className:n("",d({scaling:c}),l)},t,{ref:r,children:i}))}));N.displayName="Table.Cell";var v=e.forwardRef((function(e,r){var l=e.className,i=e.children,c=e.scaling,t=e.size,u=m(e,["className","children","scaling","size"]);return a(s.ColumnHeaderCell,o({ref:r,className:n("",d({scaling:c}),f({size:t}),l)},u,{children:i}))}));v.displayName="Table.ColumnHeaderCell";var y=e.forwardRef((function(e,r){var l=e.className,i=e.children,c=e.scaling,t=m(e,["className","children","scaling"]);return a(s.RowHeaderCell,o({ref:r,className:n("",d({scaling:c}),l)},t,{children:i}))}));y.displayName="Table.RowHeaderCell";var b={Root:u,Header:h,Body:p,Row:g,Cell:N,ColumnHeaderCell:v,RowHeaderCell:y};export{p as Body,N as Cell,v as ColumnHeaderCell,h as Header,u as Root,g as Row,y as RowHeaderCell,b as default};
2
+ import{jsx as e}from"react/jsx-runtime";import a from"react";import{cva as r}from"class-variance-authority";import{Theme as l,Table as s}from"@radix-ui/themes";import{cn as i}from"../../utils/utils.mjs";import{scalingVariants as n,radiusVariants as c}from"../../constants.mjs";import{useTheme as t}from"../../theme/ThemeProvider.mjs";var o=function(){return o=Object.assign||function(e){for(var a,r=1,l=arguments.length;r<l;r++)for(var s in a=arguments[r])Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s]);return e},o.apply(this,arguments)},m=function(e,a){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&a.indexOf(l)<0&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(l=Object.getOwnPropertySymbols(e);s<l.length;s++)a.indexOf(l[s])<0&&Object.prototype.propertyIsEnumerable.call(e,l[s])&&(r[l[s]]=e[l[s]])}return r},d="medium",f=r("",{variants:{scaling:o({},n),radius:o({},c.base)},defaultVariants:{scaling:"100%"}}),p=r("",{variants:{size:{"x-small":"h-[32px] text-[12px] p-[8px]",small:"h-[36px] text-[14px] p-[8px]",medium:"h-[44px] text-[14px] p-[8px]",large:"h-[48px] text-[14px] p-[12px]"}},defaultVariants:{size:"medium"}}),u=a.forwardRef((function(a,r){var n=a.className,c=a.children,p=a.appearance,u=a.scaling,h=a.size,g=a.radius,v=m(a,["className","children","appearance","scaling","size","radius"]),N=t().theme;h&&(d=h);var y="2";"small"===h&&(y="1"),"large"===h&&(y="3");var x=null!=g?g:N.themeRadius,b={scaling:null!=u?u:N.themeScaling,radius:"full"===x?"large":x};return e(l,{hasBackground:!1,children:e(s.Root,o({ref:r,className:i(f(b),n),variant:p,size:y},v,{children:c}))})}));u.displayName="Table.Root";var h=a.forwardRef((function(a,r){var l=a.className,n=a.children,c=a.scaling;a.size;var t=m(a,["className","children","scaling","size"]);return e(s.Header,o({ref:r,className:i("",f({scaling:c}),l)},t,{children:n}))}));h.displayName="Table.Header";var g=a.forwardRef((function(a,r){var l=a.className,n=a.children,c=a.scaling,t=m(a,["className","children","scaling"]);return e(s.Body,o({ref:r,className:i("",f({scaling:c}),l)},t,{children:n}))}));g.displayName="Table.Body";var v=a.forwardRef((function(a,r){var l=a.className,n=a.children,c=a.scaling;a.size;var t=m(a,["className","children","scaling","size"]);return e(s.Row,o({ref:r,className:i("",f({scaling:c}),l)},t,{children:n}))}));v.displayName="Table.Row";var N=a.forwardRef((function(a,r){var l=a.className,n=a.children,c=a.scaling;a.size;var t=m(a,["className","children","scaling","size"]);return e(s.Cell,o({className:i(p({size:d}),f({scaling:c}),l)},t,{ref:r,children:n}))}));N.displayName="Table.Cell";var y=a.forwardRef((function(a,r){var l=a.className,n=a.children,c=a.scaling;a.size;var t=m(a,["className","children","scaling","size"]);return e(s.ColumnHeaderCell,o({ref:r,className:i("",f({scaling:c}),p({size:d}),l)},t,{children:n}))}));y.displayName="Table.ColumnHeaderCell";var x=a.forwardRef((function(a,r){var l=a.className,n=a.children,c=a.scaling;a.size;var t=m(a,["className","children","scaling","size"]);return e(s.RowHeaderCell,o({ref:r,className:i("",f({scaling:c}),p({size:d}),l)},t,{children:n}))}));x.displayName="Table.RowHeaderCell";var b={Root:u,Header:h,Body:g,Row:v,Cell:N,ColumnHeaderCell:y,RowHeaderCell:x};export{g as Body,N as Cell,y as ColumnHeaderCell,h as Header,u as Root,v as Row,x as RowHeaderCell,b as default};
3
3
  //# sourceMappingURL=index.mjs.map
@@ -15,8 +15,9 @@ export interface TabsProps extends VariantProps<typeof dynamivTabsVariants> {
15
15
  defaultValue?: string;
16
16
  color?: IColor;
17
17
  tabData: TabProp[];
18
- defaultTab?: TabProp;
19
- setTabData: React.Dispatch<React.SetStateAction<TabProp[]>>;
18
+ focusedInx: number;
19
+ onChangeFocusedInx: (inx: number) => void;
20
+ onChangeTabs: (tabs: TabProp[]) => void;
20
21
  onDeleteTab?: (tab: any) => void;
21
22
  onDeleteAllTabs?: () => void;
22
23
  maxCount?: number;
@@ -24,6 +25,7 @@ export interface TabsProps extends VariantProps<typeof dynamivTabsVariants> {
24
25
  declare const dynamivTabsVariants: (props?: ({
25
26
  weight?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
26
27
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
28
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
27
29
  color?: string | null | undefined;
28
30
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
29
31
  declare const DynamicTabs: React.ForwardRefExoticComponent<import("react-tabs").TabsProps & TabsProps & React.RefAttributes<never>>;
@@ -25,7 +25,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
25
  import { ChevronLeftIcon, ChevronRightIcon, Cross1Icon, TrashIcon } from '@radix-ui/react-icons';
26
26
  import { cva } from 'class-variance-authority';
27
27
  import { bgColorStyle, scalingVariants, weightVariants } from '../../../lib/constants';
28
- import React, { useEffect, useState } from 'react';
28
+ import React, { useEffect } from 'react';
29
29
  import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
30
30
  import IconButton from '../IconButton';
31
31
  import { cn } from '../../../lib/utils/utils';
@@ -34,13 +34,19 @@ var dynamivTabsVariants = cva('', {
34
34
  variants: {
35
35
  weight: __assign({}, weightVariants),
36
36
  scaling: __assign({}, scalingVariants),
37
+ radius: {
38
+ none: 'rounded-t-none',
39
+ small: 'rounded-t-[3px]',
40
+ medium: 'rounded-t',
41
+ large: 'rounded-t-md',
42
+ full: 'rounded-t-lg',
43
+ },
37
44
  color: bgColorStyle(),
38
45
  },
39
46
  });
40
47
  var DynamicTabs = React.forwardRef(function (_a, ref) {
41
48
  var _b;
42
- var tabData = _a.tabData, scaling = _a.scaling, color = _a.color, setTabData = _a.setTabData, defaultTab = _a.defaultTab, onDeleteTab = _a.onDeleteTab, onDeleteAllTabs = _a.onDeleteAllTabs, onSelect = _a.onSelect, maxCount = _a.maxCount, className = _a.className, rootProps = __rest(_a, ["tabData", "scaling", "color", "setTabData", "defaultTab", "onDeleteTab", "onDeleteAllTabs", "onSelect", "maxCount", "className"]);
43
- var _c = useState(0), selectedInx = _c[0], setselectedInx = _c[1];
49
+ var tabData = _a.tabData, scaling = _a.scaling, color = _a.color, _c = _a.radius, radius = _c === void 0 ? 'none' : _c, focusedInx = _a.focusedInx, onChangeFocusedInx = _a.onChangeFocusedInx, onChangeTabs = _a.onChangeTabs, onDeleteTab = _a.onDeleteTab, onDeleteAllTabs = _a.onDeleteAllTabs, onSelect = _a.onSelect, maxCount = _a.maxCount, className = _a.className, rootProps = __rest(_a, ["tabData", "scaling", "color", "radius", "focusedInx", "onChangeFocusedInx", "onChangeTabs", "onDeleteTab", "onDeleteAllTabs", "onSelect", "maxCount", "className"]);
44
50
  var theme = useTheme().theme;
45
51
  var dynamicTabsStyle = {
46
52
  scaling: scaling !== null && scaling !== void 0 ? scaling : theme.themeScaling,
@@ -48,26 +54,25 @@ var DynamicTabs = React.forwardRef(function (_a, ref) {
48
54
  };
49
55
  useEffect(function () {
50
56
  if (tabData.length > 20)
51
- setTabData(tabData.slice(0, 20));
57
+ onChangeTabs(tabData.slice(0, 20));
52
58
  }, [tabData]);
53
- return (_jsxs(Tabs, __assign({ selectedIndex: selectedInx, className: cn('flex w-full text-slate-12', dynamivTabsVariants({ scaling: dynamicTabsStyle.scaling }), className), onSelect: function (index, last, event) {
54
- setselectedInx(index);
59
+ return (_jsxs(Tabs, __assign({ selectedIndex: focusedInx, className: cn('flex w-full text-slate-11', dynamivTabsVariants({ scaling: dynamicTabsStyle.scaling }), className), onSelect: function (index, last, event) {
55
60
  onSelect && onSelect(index, last, event);
56
- } }, rootProps, { children: [_jsx(TabList, { className: "mb-[10px] flex flex-1 overflow-x-auto overflow-y-hidden p-0", children: tabData.map(function (tab, index) { return (_jsx(Tab, { className: cn('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 _a, _b; return ((_a = tab.title) === null || _a === void 0 ? void 0 : _a.onClick) && ((_b = tab.title) === null || _b === void 0 ? void 0 : _b.onClick(tab)); }, children: _jsxs("div", { className: cn('mx-[3px] my-[2px] flex justify-between rounded-lg px-[9px] py-[4px]', "hover:bg-".concat(dynamicTabsStyle.color, "A-6 hover:dark:bg-").concat(dynamicTabsStyle.color, "DarkA-6")), children: [_jsx("div", { className: "flex-1 overflow-hidden truncate text-ellipsis", children: tab.title.children() }), ((tabData === null || tabData === void 0 ? void 0 : tabData.length) < 15 || selectedInx == index) && (_jsx(IconButton, { size: "small", appearance: "ghost", color: dynamicTabsStyle.color, scaling: dynamicTabsStyle.scaling, onClick: function () {
61
+ } }, rootProps, { children: [_jsx(TabList, { className: "flex h-[32px] flex-1 overflow-x-auto overflow-y-hidden border-b border-slateA-7 p-0", children: tabData.map(function (tab, index) { return (_jsx(Tab, { className: cn('relative bottom-[-1px] inline-block w-[50px] max-w-[150px] flex-1 cursor-pointer list-none border-y border-r border-slateA-7 bg-slate-2 text-slate-11 aria-selected:border-b-0 aria-selected:border-slateA-8 aria-selected:bg-slate-1 aria-selected:text-slate-12', dynamivTabsVariants({ radius: radius })), onClick: function (e) { var _a, _b; return ((_a = tab.title) === null || _a === void 0 ? void 0 : _a.onClick) && ((_b = tab.title) === null || _b === void 0 ? void 0 : _b.onClick(tab)); }, children: _jsxs("div", { className: cn('mx-[3px] my-[2px] flex items-center justify-between rounded-lg px-[5px]', "hover:bg-".concat(dynamicTabsStyle.color, "A-6 hover:dark:bg-").concat(dynamicTabsStyle.color, "DarkA-6")), children: [_jsx("div", { className: "flex-1 overflow-hidden truncate text-ellipsis", onClick: function () { return onChangeFocusedInx(index); }, children: tab.title.children() }), ((tabData === null || tabData === void 0 ? void 0 : tabData.length) < 15 || focusedInx == index) && (_jsx(IconButton, { appearance: "ghost", size: "small", color: dynamicTabsStyle.color, scaling: dynamicTabsStyle.scaling, onClick: function () {
57
62
  var filtered = tabData.filter(function (el) { return el.key !== tab.key; });
58
- setTabData(defaultTab && filtered.length == 0 ? [defaultTab] : filtered);
59
- filtered.length == 0
60
- ? setselectedInx(0)
61
- : selectedInx - 1 >= 0 && setselectedInx(selectedInx - 1);
62
- onDeleteTab && onDeleteTab(tab);
63
+ onChangeTabs(filtered);
64
+ focusedInx === filtered.length &&
65
+ focusedInx > 0 &&
66
+ onChangeFocusedInx(focusedInx - 1);
67
+ onDeleteTab && onDeleteTab({ deleteTab: tab });
63
68
  }, children: _jsx(Cross1Icon, {}) }))] }) }, index)); }) }), tabData.map(function (tab, index) {
64
69
  var _a;
65
70
  return (_jsx(TabPanel, { children: (_a = tab === null || tab === void 0 ? void 0 : tab.content) === null || _a === void 0 ? void 0 : _a.children() }, index));
66
- }), _jsxs("div", { className: "right-5 mb-[10px] flex justify-end p-0 px-3 py-2", children: [_jsx(IconButton, { size: "small", appearance: "ghost", onClick: function () {
67
- setselectedInx(0);
68
- setTabData(defaultTab ? [defaultTab] : []);
71
+ }), _jsxs("div", { className: "right-5 flex justify-end border-b border-slateA-7 p-0", children: [_jsx(IconButton, { appearance: "ghost", size: "small", onClick: function () { return focusedInx - 1 >= 0 && onChangeFocusedInx(focusedInx - 1); }, children: _jsx(ChevronLeftIcon, {}) }), _jsx(IconButton, { appearance: "ghost", size: "small", onClick: function () { return focusedInx + 1 < tabData.length && onChangeFocusedInx(focusedInx + 1); }, children: _jsx(ChevronRightIcon, {}) }), _jsx(IconButton, { appearance: "ghost", size: "small", onClick: function () {
72
+ onChangeFocusedInx(0);
73
+ onChangeTabs([]);
69
74
  onDeleteAllTabs && onDeleteAllTabs();
70
- }, children: _jsx(TrashIcon, {}) }), _jsx(IconButton, { size: "small", appearance: "ghost", onClick: function () { return selectedInx - 1 >= 0 && setselectedInx(selectedInx - 1); }, children: _jsx(ChevronLeftIcon, {}) }), _jsx(IconButton, { size: "small", appearance: "ghost", onClick: function () { return selectedInx + 1 < tabData.length && setselectedInx(selectedInx + 1); }, children: _jsx(ChevronRightIcon, {}) })] })] })));
75
+ }, children: _jsx(TrashIcon, {}) })] })] })));
71
76
  });
72
77
  DynamicTabs.displayName = 'DynamicTabs';
73
78
  export default DynamicTabs;
@@ -1,3 +1,3 @@
1
1
  "use client";
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};
2
+ import{jsxs as e,jsx as n}from"react/jsx-runtime";import{Cross1Icon as r,ChevronLeftIcon as t,ChevronRightIcon as o,TrashIcon as l}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,{useEffect as u}from"react";import{Tabs as m,TabList as f,Tab as p,TabPanel as h}from"react-tabs";import{IconButton as b}from"../IconButton/index.mjs";import{cn as x}from"../../utils/utils.mjs";import{useTheme as g}from"../../theme/ThemeProvider.mjs";var v=function(){return v=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},v.apply(this,arguments)},y=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)n.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(r[t[o]]=e[t[o]])}return r},C=a("",{variants:{weight:v({},i),scaling:v({},c),radius:{none:"rounded-t-none",small:"rounded-t-[3px]",medium:"rounded-t",large:"rounded-t-md",full:"rounded-t-lg"},color:s()}}),j=d.forwardRef((function(a,i){var c,s=a.tabData,d=a.scaling,j=a.color,k=a.radius,w=void 0===k?"none":k,O=a.focusedInx,N=a.onChangeFocusedInx,T=a.onChangeTabs,A=a.onDeleteTab,D=a.onDeleteAllTabs,I=a.onSelect;a.maxCount;var S=a.className,P=y(a,["tabData","scaling","color","radius","focusedInx","onChangeFocusedInx","onChangeTabs","onDeleteTab","onDeleteAllTabs","onSelect","maxCount","className"]),z=g().theme,F={scaling:null!=d?d:z.themeScaling,color:null!==(c=null!=j?j:z.themeColor)&&void 0!==c?c:"slate"};return u((function(){s.length>20&&T(s.slice(0,20))}),[s]),e(m,v({selectedIndex:O,className:x("flex w-full text-slate-11",C({scaling:F.scaling}),S),onSelect:function(e,n,r){I&&I(e,n,r)}},P,{children:[n(f,{className:"flex h-[32px] flex-1 overflow-x-auto overflow-y-hidden border-b border-slateA-7 p-0",children:s.map((function(t,o){return n(p,{className:x("relative bottom-[-1px] inline-block w-[50px] max-w-[150px] flex-1 cursor-pointer list-none border-y border-r border-slateA-7 bg-slate-2 text-slate-11 aria-selected:border-b-0 aria-selected:border-slateA-8 aria-selected:bg-slate-1 aria-selected:text-slate-12",C({radius:w})),onClick:function(e){var n,r;return(null===(n=t.title)||void 0===n?void 0:n.onClick)&&(null===(r=t.title)||void 0===r?void 0:r.onClick(t))},children:e("div",{className:x("mx-[3px] my-[2px] flex items-center justify-between rounded-lg px-[5px]","hover:bg-".concat(F.color,"A-6 hover:dark:bg-").concat(F.color,"DarkA-6")),children:[n("div",{className:"flex-1 overflow-hidden truncate text-ellipsis",onClick:function(){return N(o)},children:t.title.children()}),((null==s?void 0:s.length)<15||O==o)&&n(b,{appearance:"ghost",size:"small",color:F.color,scaling:F.scaling,onClick:function(){var e=s.filter((function(e){return e.key!==t.key}));T(e),O===e.length&&O>0&&N(O-1),A&&A({deleteTab:t})},children:n(r,{})})]})},o)}))}),s.map((function(e,r){var t;return n(h,{children:null===(t=null==e?void 0:e.content)||void 0===t?void 0:t.children()},r)})),e("div",{className:"right-5 flex justify-end border-b border-slateA-7 p-0",children:[n(b,{appearance:"ghost",size:"small",onClick:function(){return O-1>=0&&N(O-1)},children:n(t,{})}),n(b,{appearance:"ghost",size:"small",onClick:function(){return O+1<s.length&&N(O+1)},children:n(o,{})}),n(b,{appearance:"ghost",size:"small",onClick:function(){N(0),T([]),D&&D()},children:n(l,{})})]})]}))}));j.displayName="DynamicTabs";export{j as default};
3
3
  //# sourceMappingURL=DynamicTabs.mjs.map
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  }
22
22
  return t;
23
23
  };
24
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
25
  import React, { useState } from 'react';
26
26
  import { cva } from 'class-variance-authority';
27
27
  import { cn } from '../../../lib/utils/utils';
@@ -32,7 +32,6 @@ import { MAIN_COLOR } from '../../../lib/color/constants';
32
32
  import Text from '../../../lib/Typography/Text';
33
33
  import IconButton from '../IconButton';
34
34
  import { EyeClosedIcon, EyeOpenIcon } from '@radix-ui/react-icons';
35
- import { useIsClient } from '../../../lib/is-client-ctx';
36
35
  var textFieldVariants = cva('', {
37
36
  variants: {
38
37
  radius: __assign({}, radiusVariants['base']),
@@ -63,9 +62,8 @@ export var Root = React.forwardRef(function (_a, forwardedRef) {
63
62
  message = '숫자만 입력 가능합니다.';
64
63
  if (validationType == 'email')
65
64
  message = '이메일 형식에 어긋납니다.';
66
- var isClient = useIsClient();
67
- if (!isClient)
68
- return _jsx(_Fragment, {});
65
+ if ((textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.type) == 'password')
66
+ delete textFieldProps['type'];
69
67
  return (_jsxs("div", { children: [_jsx(Theme, { scaling: contextValue.scaling, accentColor: contextValue.color, hasBackground: false, children: _jsxs(TextFieldTheme.Root, __assign({ ref: forwardedRef, variant: appearance, size: sizeTheme, type: validationType !== 'password' || isMouseDown ? 'text' : 'password', radius: contextValue.radius, color: contextValue.color, className: cn(textFieldVariants({ radius: contextValue.radius }), className), onChange: function (e) {
70
68
  if (e.target.value && regex) {
71
69
  setShowMessage(true);