@lotte-innovate/ui-component-test 0.1.65 → 0.1.67

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) hide show
  1. package/README.md +133 -133
  2. package/dist/globals.css +4 -4
  3. package/dist/lib/.storybook/main.d.ts +3 -0
  4. package/dist/lib/.storybook/manager.d.ts +1 -0
  5. package/dist/lib/.storybook/preview.d.ts +9 -0
  6. package/dist/lib/Typography/Header/index.d.ts +1 -1
  7. package/dist/lib/Typography/Text/index.d.ts +1 -1
  8. package/dist/lib/color/constants.d.ts +0 -15
  9. package/dist/lib/color/constants.js +0 -32
  10. package/dist/lib/color/constants.mjs.map +1 -1
  11. package/dist/lib/components/Accordion/index.d.ts +1 -0
  12. package/dist/lib/components/Accordion/index.js +18 -4
  13. package/dist/lib/components/Accordion/index.mjs +1 -1
  14. package/dist/lib/components/Accordion/index.mjs.map +1 -1
  15. package/dist/lib/components/AlertDialog/AlertDialogAction.d.ts +2 -2
  16. package/dist/lib/components/AlertDialog/AlertDialogCancel.d.ts +2 -2
  17. package/dist/lib/components/AlertDialog/AlertDialogContent.d.ts +1 -1
  18. package/dist/lib/components/AlertDialog/AlertDialogRoot.js +9 -6
  19. package/dist/lib/components/AlertDialog/AlertDialogRoot.mjs +2 -1
  20. package/dist/lib/components/AlertDialog/AlertDialogRoot.mjs.map +1 -1
  21. package/dist/lib/components/AlertDialog/AlertDialogTrigger.d.ts +2 -2
  22. package/dist/lib/components/AspectRatio/index.js +3 -1
  23. package/dist/lib/components/AspectRatio/index.mjs +1 -1
  24. package/dist/lib/components/AspectRatio/index.mjs.map +1 -1
  25. package/dist/lib/components/Avatar/index.d.ts +1 -1
  26. package/dist/lib/components/Avatar/index.js +9 -1
  27. package/dist/lib/components/Avatar/index.mjs +2 -1
  28. package/dist/lib/components/Avatar/index.mjs.map +1 -1
  29. package/dist/lib/components/Badge/index.d.ts +2 -2
  30. package/dist/lib/components/Badge/index.js +10 -1
  31. package/dist/lib/components/Badge/index.mjs +1 -1
  32. package/dist/lib/components/Badge/index.mjs.map +1 -1
  33. package/dist/lib/components/BubbleChart/index.js +1 -1
  34. package/dist/lib/components/BubbleChart/index.mjs.map +1 -1
  35. package/dist/lib/components/Button/index.d.ts +2 -2
  36. package/dist/lib/components/Button/index.js +10 -1
  37. package/dist/lib/components/Button/index.mjs +1 -1
  38. package/dist/lib/components/Button/index.mjs.map +1 -1
  39. package/dist/lib/components/Callout/CalloutRoot.d.ts +1 -1
  40. package/dist/lib/components/Callout/CalloutRoot.js +11 -3
  41. package/dist/lib/components/Callout/CalloutRoot.mjs +2 -1
  42. package/dist/lib/components/Callout/CalloutRoot.mjs.map +1 -1
  43. package/dist/lib/components/Card/index.d.ts +2 -2
  44. package/dist/lib/components/Card/index.js +8 -1
  45. package/dist/lib/components/Card/index.mjs +1 -1
  46. package/dist/lib/components/Card/index.mjs.map +1 -1
  47. package/dist/lib/components/Checkbox/index.d.ts +1 -1
  48. package/dist/lib/components/Checkbox/index.js +10 -2
  49. package/dist/lib/components/Checkbox/index.mjs +1 -1
  50. package/dist/lib/components/Checkbox/index.mjs.map +1 -1
  51. package/dist/lib/components/CheckboxCard/index.d.ts +1 -1
  52. package/dist/lib/components/CheckboxCard/index.js +8 -1
  53. package/dist/lib/components/CheckboxCard/index.mjs +1 -1
  54. package/dist/lib/components/CheckboxCard/index.mjs.map +1 -1
  55. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.js +11 -2
  56. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.mjs +2 -1
  57. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.mjs.map +1 -1
  58. package/dist/lib/components/ContextMenu/ContextMenuContent.d.ts +1 -1
  59. package/dist/lib/components/ContextMenu/ContextMenuItem.d.ts +1 -1
  60. package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.d.ts +1 -1
  61. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.js +1 -0
  62. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.mjs +1 -0
  63. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.mjs.map +1 -1
  64. package/dist/lib/components/ContextMenu/ContextMenuRoot.js +11 -2
  65. package/dist/lib/components/ContextMenu/ContextMenuRoot.mjs +2 -1
  66. package/dist/lib/components/ContextMenu/ContextMenuRoot.mjs.map +1 -1
  67. package/dist/lib/components/ContextMenu/ContextMenuSubContent.d.ts +1 -1
  68. package/dist/lib/components/DataList/DataListLabel.d.ts +1 -1
  69. package/dist/lib/components/DataList/DataListRoot.js +9 -2
  70. package/dist/lib/components/DataList/DataListRoot.mjs +2 -1
  71. package/dist/lib/components/DataList/DataListRoot.mjs.map +1 -1
  72. package/dist/lib/components/DataList/DataListValue.d.ts +1 -1
  73. package/dist/lib/components/Dialog/DialogAction.d.ts +1 -1
  74. package/dist/lib/components/Dialog/DialogCancel.d.ts +1 -1
  75. package/dist/lib/components/Dialog/DialogContent.d.ts +1 -1
  76. package/dist/lib/components/Dialog/DialogRoot.js +9 -1
  77. package/dist/lib/components/Dialog/DialogRoot.mjs +2 -1
  78. package/dist/lib/components/Dialog/DialogRoot.mjs.map +1 -1
  79. package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.d.ts +1 -1
  80. package/dist/lib/components/DropdownMenu/DropdownMenuContent.d.ts +1 -1
  81. package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +1 -1
  82. package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.d.ts +1 -1
  83. package/dist/lib/components/DropdownMenu/DropdownMenuRoot.js +10 -1
  84. package/dist/lib/components/DropdownMenu/DropdownMenuRoot.mjs +2 -1
  85. package/dist/lib/components/DropdownMenu/DropdownMenuRoot.mjs.map +1 -1
  86. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +1 -1
  87. package/dist/lib/components/HoverCard/HoverCardContent.d.ts +2 -2
  88. package/dist/lib/components/HoverCard/HoverCardRoot.js +10 -1
  89. package/dist/lib/components/HoverCard/HoverCardRoot.mjs +2 -1
  90. package/dist/lib/components/HoverCard/HoverCardRoot.mjs.map +1 -1
  91. package/dist/lib/components/IconButton/index.d.ts +1 -1
  92. package/dist/lib/components/IconButton/index.js +9 -1
  93. package/dist/lib/components/IconButton/index.mjs +1 -1
  94. package/dist/lib/components/IconButton/index.mjs.map +1 -1
  95. package/dist/lib/components/Inset/index.d.ts +1 -1
  96. package/dist/lib/components/Inset/index.js +7 -1
  97. package/dist/lib/components/Inset/index.mjs +1 -1
  98. package/dist/lib/components/Inset/index.mjs.map +1 -1
  99. package/dist/lib/components/Label/index.d.ts +1 -1
  100. package/dist/lib/components/Label/index.js +11 -3
  101. package/dist/lib/components/Label/index.mjs +1 -1
  102. package/dist/lib/components/Label/index.mjs.map +1 -1
  103. package/dist/lib/components/Menubar/MenubarContent.d.ts +1 -1
  104. package/dist/lib/components/Menubar/MenubarItem.d.ts +1 -1
  105. package/dist/lib/components/Menubar/MenubarItemIndicator.d.ts +1 -1
  106. package/dist/lib/components/Menubar/MenubarRadioGroup.js +1 -0
  107. package/dist/lib/components/Menubar/MenubarRadioGroup.mjs +1 -0
  108. package/dist/lib/components/Menubar/MenubarRadioGroup.mjs.map +1 -1
  109. package/dist/lib/components/Menubar/MenubarRoot.d.ts +1 -1
  110. package/dist/lib/components/Menubar/MenubarRoot.js +13 -3
  111. package/dist/lib/components/Menubar/MenubarRoot.mjs +2 -1
  112. package/dist/lib/components/Menubar/MenubarRoot.mjs.map +1 -1
  113. package/dist/lib/components/Menubar/MenubarSubContent.d.ts +1 -1
  114. package/dist/lib/components/Menubar/MenubarTrigger.d.ts +1 -1
  115. package/dist/lib/components/NavigationMenu/NavigationMenuContent.d.ts +1 -1
  116. package/dist/lib/components/NavigationMenu/NavigationMenuLink.d.ts +1 -1
  117. package/dist/lib/components/NavigationMenu/NavigationMenuList.d.ts +1 -1
  118. package/dist/lib/components/NavigationMenu/NavigationMenuRoot.js +11 -2
  119. package/dist/lib/components/NavigationMenu/NavigationMenuRoot.mjs +2 -1
  120. package/dist/lib/components/NavigationMenu/NavigationMenuRoot.mjs.map +1 -1
  121. package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.d.ts +1 -1
  122. package/dist/lib/components/NavigationMenu/NavigationMenuViewport.d.ts +2 -2
  123. package/dist/lib/components/Popover/PopoverClose.d.ts +1 -1
  124. package/dist/lib/components/Popover/PopoverContent.d.ts +1 -1
  125. package/dist/lib/components/Popover/PopoverRoot.js +8 -1
  126. package/dist/lib/components/Popover/PopoverRoot.mjs +2 -1
  127. package/dist/lib/components/Popover/PopoverRoot.mjs.map +1 -1
  128. package/dist/lib/components/Progress/index.d.ts +1 -1
  129. package/dist/lib/components/Progress/index.js +11 -1
  130. package/dist/lib/components/Progress/index.mjs +1 -1
  131. package/dist/lib/components/Progress/index.mjs.map +1 -1
  132. package/dist/lib/components/RadarChart/index.js +1 -1
  133. package/dist/lib/components/RadarChart/index.mjs.map +1 -1
  134. package/dist/lib/components/Radio/index.js +10 -4
  135. package/dist/lib/components/Radio/index.mjs +1 -1
  136. package/dist/lib/components/Radio/index.mjs.map +1 -1
  137. package/dist/lib/components/RadioCards/RadioCardsItem.d.ts +1 -1
  138. package/dist/lib/components/RadioCards/RadioCardsRoot.js +12 -2
  139. package/dist/lib/components/RadioCards/RadioCardsRoot.mjs +2 -1
  140. package/dist/lib/components/RadioCards/RadioCardsRoot.mjs.map +1 -1
  141. package/dist/lib/components/RadioGroup/RadioGroupRoot.js +11 -2
  142. package/dist/lib/components/RadioGroup/RadioGroupRoot.mjs +2 -1
  143. package/dist/lib/components/RadioGroup/RadioGroupRoot.mjs.map +1 -1
  144. package/dist/lib/components/ScrollArea/index.js +3 -1
  145. package/dist/lib/components/ScrollArea/index.mjs +1 -1
  146. package/dist/lib/components/ScrollArea/index.mjs.map +1 -1
  147. package/dist/lib/components/SegmentedControl/SegmentedControlRoot.js +7 -1
  148. package/dist/lib/components/SegmentedControl/SegmentedControlRoot.mjs +1 -1
  149. package/dist/lib/components/SegmentedControl/SegmentedControlRoot.mjs.map +1 -1
  150. package/dist/lib/components/Select/index.d.ts +4 -2
  151. package/dist/lib/components/Select/index.js +30 -13
  152. package/dist/lib/components/Select/index.mjs +1 -1
  153. package/dist/lib/components/Select/index.mjs.map +1 -1
  154. package/dist/lib/components/Separator/index.js +7 -1
  155. package/dist/lib/components/Separator/index.mjs +1 -1
  156. package/dist/lib/components/Separator/index.mjs.map +1 -1
  157. package/dist/lib/components/Skeleton/index.d.ts +1 -1
  158. package/dist/lib/components/Skeleton/index.js +4 -1
  159. package/dist/lib/components/Skeleton/index.mjs +1 -1
  160. package/dist/lib/components/Skeleton/index.mjs.map +1 -1
  161. package/dist/lib/components/Slider/index.d.ts +1 -1
  162. package/dist/lib/components/Slider/index.js +13 -5
  163. package/dist/lib/components/Slider/index.mjs +1 -1
  164. package/dist/lib/components/Slider/index.mjs.map +1 -1
  165. package/dist/lib/components/Spinner/index.js +3 -1
  166. package/dist/lib/components/Spinner/index.mjs +1 -1
  167. package/dist/lib/components/Spinner/index.mjs.map +1 -1
  168. package/dist/lib/components/TabNav/index.js +6 -4
  169. package/dist/lib/components/TabNav/index.mjs +1 -1
  170. package/dist/lib/components/TabNav/index.mjs.map +1 -1
  171. package/dist/lib/components/Table/index.d.ts +1 -1
  172. package/dist/lib/components/Table/index.js +7 -1
  173. package/dist/lib/components/Table/index.mjs +1 -1
  174. package/dist/lib/components/Table/index.mjs.map +1 -1
  175. package/dist/lib/components/Tabs/index.d.ts +1 -1
  176. package/dist/lib/components/Tabs/index.js +4 -4
  177. package/dist/lib/components/Tabs/index.mjs +1 -1
  178. package/dist/lib/components/Tabs/index.mjs.map +1 -1
  179. package/dist/lib/components/TextArea/index.d.ts +1 -1
  180. package/dist/lib/components/TextArea/index.js +11 -4
  181. package/dist/lib/components/TextArea/index.mjs +1 -1
  182. package/dist/lib/components/TextArea/index.mjs.map +1 -1
  183. package/dist/lib/components/TextField/index.d.ts +1 -1
  184. package/dist/lib/components/TextField/index.js +11 -4
  185. package/dist/lib/components/TextField/index.mjs +1 -1
  186. package/dist/lib/components/TextField/index.mjs.map +1 -1
  187. package/dist/lib/components/Toast/ToastActionButton.d.ts +1 -1
  188. package/dist/lib/components/Toast/ToastActionButton.js +2 -2
  189. package/dist/lib/components/Toast/ToastActionButton.mjs +1 -1
  190. package/dist/lib/components/Toast/ToastActionButton.mjs.map +1 -1
  191. package/dist/lib/components/Toast/ToastRoot.d.ts +1 -1
  192. package/dist/lib/components/Toast/ToastRoot.js +11 -3
  193. package/dist/lib/components/Toast/ToastRoot.mjs +2 -1
  194. package/dist/lib/components/Toast/ToastRoot.mjs.map +1 -1
  195. package/dist/lib/components/Toggle/ToggleWithText.d.ts +1 -1
  196. package/dist/lib/components/Toggle/ToggleWithText.js +9 -1
  197. package/dist/lib/components/Toggle/ToggleWithText.mjs +1 -1
  198. package/dist/lib/components/Toggle/ToggleWithText.mjs.map +1 -1
  199. package/dist/lib/components/Toggle/index.d.ts +1 -1
  200. package/dist/lib/components/Toggle/index.js +9 -1
  201. package/dist/lib/components/Toggle/index.mjs +1 -1
  202. package/dist/lib/components/Toggle/index.mjs.map +1 -1
  203. package/dist/lib/components/ToggleGroup/ToggleGroupRoot.js +10 -2
  204. package/dist/lib/components/ToggleGroup/ToggleGroupRoot.mjs +2 -1
  205. package/dist/lib/components/ToggleGroup/ToggleGroupRoot.mjs.map +1 -1
  206. package/dist/lib/components/ToggleSwitch/index.d.ts +1 -1
  207. package/dist/lib/components/ToggleSwitch/index.js +13 -1
  208. package/dist/lib/components/ToggleSwitch/index.mjs +1 -1
  209. package/dist/lib/components/ToggleSwitch/index.mjs.map +1 -1
  210. package/dist/lib/components/Tooltip/index.d.ts +2 -2
  211. package/dist/lib/components/Tooltip/index.js +13 -8
  212. package/dist/lib/components/Tooltip/index.mjs +1 -1
  213. package/dist/lib/components/Tooltip/index.mjs.map +1 -1
  214. package/dist/lib/constants.d.ts +0 -2
  215. package/dist/lib/constants.js +7 -31
  216. package/dist/lib/constants.mjs +1 -1
  217. package/dist/lib/constants.mjs.map +1 -1
  218. package/dist/lib/index.d.ts +1 -0
  219. package/dist/lib/index.js +1 -0
  220. package/dist/lib/index.mjs +1 -1
  221. package/dist/lib/theme/ThemeProvider.d.ts +16 -0
  222. package/dist/lib/theme/ThemeProvider.js +29 -0
  223. package/dist/lib/theme/ThemeProvider.mjs +3 -0
  224. package/dist/lib/theme/ThemeProvider.mjs.map +1 -0
  225. package/dist/lib/theme/index.d.ts +2 -0
  226. package/dist/lib/theme/index.js +2 -0
  227. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  228. package/dist/lib/utils/classPrefixes.js +1 -0
  229. package/dist/lib/utils/useDarkMode.js +1 -0
  230. package/dist/lib/utils/useDarkMode.mjs +1 -0
  231. package/dist/lib/utils/useDarkMode.mjs.map +1 -1
  232. package/dist/tailwind.config.js +4 -7
  233. package/dist/tsconfig.tsbuildinfo +1 -1
  234. package/package.json +141 -140
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import r,{forwardRef as t,Children as a}from"react";import{cva as i}from"class-variance-authority";import*as o from"@radix-ui/react-toggle";import{radiusVariants as n,scalingVariants as s,toggleAppearanceStyle as l}from"../../constants.mjs";import{cn as c}from"../../utils/utils.mjs";export{ToggleWithText}from"./ToggleWithText.mjs";var m=function(){return m=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},m.apply(this,arguments)},p=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},u=i('grid place-content-center items-center justify-center box-border"',{variants:{radius:m({},n.base),size:{small:"w-6 h-6 p-[6px]",medium:"w-8 h-8 p-2",large:"w-10 h-10 p-[11px]"},scaling:m({},s)},defaultVariants:{radius:"medium",size:"medium",scaling:"100%"}}),d={small:"w-[14px]",medium:"w-4",large:"w-[18px]"},f=t((function(t,i){var n=t.className,s=t.children,f=t.radius,g=t.size,y=void 0===g?"medium":g,h=t.scaling,x=t.color,b=void 0===x?"red":x,v=t.appearance,O=void 0===v?"surface":v,j=p(t,["className","children","radius","size","scaling","color","appearance"]);return e(o.Root,m({ref:i,className:c(u({radius:f,size:y,scaling:h}),l(O,b,!0,"data-[state=on]:"),n)},j,{children:a.map(s,(function(e){return r.cloneElement(e,{className:d[y]})}))}))}));f.displayName="Toggle";export{d as IconScaling,f as Toggle,f as default};
1
+ import{jsx as e}from"react/jsx-runtime";import r,{forwardRef as t,Children as a}from"react";import{cva as o}from"class-variance-authority";import*as i from"@radix-ui/react-toggle";import{radiusVariants as n,scalingVariants as s,toggleAppearanceStyle as l}from"../../constants.mjs";import{cn as m}from"../../utils/utils.mjs";import{useTheme as c}from"../../theme/ThemeProvider.mjs";export{ToggleWithText}from"./ToggleWithText.mjs";var p=function(){return p=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},p.apply(this,arguments)},u=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 o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)r.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(t[a[o]]=e[a[o]])}return t},d=o('grid place-content-center items-center justify-center box-border"',{variants:{radius:p({},n.base),size:{small:"w-6 h-6 p-[6px]",medium:"w-8 h-8 p-2",large:"w-10 h-10 p-[11px]"},scaling:p({},s)},defaultVariants:{radius:"medium",size:"medium",scaling:"100%"}}),f={small:"w-[14px]",medium:"w-4",large:"w-[18px]"},g=t((function(t,o){var n=t.className,s=t.children,g=t.radius,h=t.size,y=void 0===h?"medium":h,v=t.scaling,x=t.color,b=void 0===x?"red":x,j=t.appearance,O=void 0===j?"surface":j,w=u(t,["className","children","radius","size","scaling","color","appearance"]),T=c().theme,z={radius:T.themeRadius||g,scaling:T.themeScaling||v,color:T.themeColor||b,size:y};return e(i.Root,p({ref:o,className:m(d(z),l(O,z.color,!0,"data-[state=on]:"),n)},w,{children:a.map(s,(function(e){return r.cloneElement(e,{className:f[y]})}))}))}));g.displayName="Toggle";export{f as IconScaling,g as Toggle,g as default};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../lib/components/Toggle/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { Children, forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport * as TogglePrimitive from '@radix-ui/react-toggle';\nimport { radiusVariants, scalingVariants, toggleAppearanceStyle } from '../../../lib/constants';\nimport { cn } from '../../../lib/utils/utils';\nexport * from './ToggleWithText';\nvar toggleVariants = cva('grid place-content-center items-center justify-center box-border\"', {\n variants: {\n radius: __assign({}, radiusVariants['base']),\n size: {\n small: 'w-6 h-6 p-[6px]',\n medium: 'w-8 h-8 p-2',\n large: 'w-10 h-10 p-[11px]',\n },\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n radius: 'medium',\n size: 'medium',\n scaling: '100%',\n },\n});\nexport var IconScaling = {\n small: 'w-[14px]',\n medium: 'w-4',\n large: 'w-[18px]',\n};\nexport var Toggle = forwardRef(function (_a, ref) {\n var className = _a.className, children = _a.children, radius = _a.radius, _b = _a.size, size = _b === void 0 ? 'medium' : _b, scaling = _a.scaling, _c = _a.color, color = _c === void 0 ? 'red' : _c, _d = _a.appearance, appearance = _d === void 0 ? 'surface' : _d, props = __rest(_a, [\"className\", \"children\", \"radius\", \"size\", \"scaling\", \"color\", \"appearance\"]);\n return (_jsx(TogglePrimitive.Root, __assign({ ref: ref, className: cn(toggleVariants({ radius: radius, size: size, scaling: scaling }), toggleAppearanceStyle(appearance, color, true, 'data-[state=on]:'), className) }, props, { children: Children.map(children, function (child) {\n return React.cloneElement(child, { className: IconScaling[size] });\n }) })));\n});\nToggle.displayName = 'Toggle';\nexport default Toggle;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","toggleVariants","cva","variants","radius","radiusVariants","size","small","medium","large","scaling","scalingVariants","defaultVariants","IconScaling","Toggle","forwardRef","_a","ref","className","children","_b","_c","color","_d","appearance","props","_jsx","TogglePrimitive","Root","cn","toggleAppearanceStyle","Children","map","child","React","cloneElement","displayName"],"mappings":"qXAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UAChC,EAC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,EAAQE,KAAMA,EAAMI,QAASA,IAAYoB,EAAsBN,EAAYF,GAAO,EAAM,oBAAqBJ,IAAcO,EAAO,CAAEN,SAAUY,EAASC,IAAIb,GAAU,SAAUc,GACtQ,OAAOC,EAAMC,aAAaF,EAAO,CAAEf,UAAWL,EAAYP,IACtE,MACA,IACAQ,EAAOsB,YAAc"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../lib/components/Toggle/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { Children, forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport * as TogglePrimitive from '@radix-ui/react-toggle';\nimport { radiusVariants, scalingVariants, toggleAppearanceStyle } from '../../../lib/constants';\nimport { cn } from '../../../lib/utils/utils';\nimport { useTheme } from '../../../lib/theme';\nexport * from './ToggleWithText';\nvar toggleVariants = cva('grid place-content-center items-center justify-center box-border\"', {\n variants: {\n radius: __assign({}, radiusVariants['base']),\n size: {\n small: 'w-6 h-6 p-[6px]',\n medium: 'w-8 h-8 p-2',\n large: 'w-10 h-10 p-[11px]',\n },\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n radius: 'medium',\n size: 'medium',\n scaling: '100%',\n },\n});\nexport var IconScaling = {\n small: 'w-[14px]',\n medium: 'w-4',\n large: 'w-[18px]',\n};\nexport var Toggle = forwardRef(function (_a, ref) {\n var className = _a.className, children = _a.children, radius = _a.radius, _b = _a.size, size = _b === void 0 ? 'medium' : _b, scaling = _a.scaling, _c = _a.color, color = _c === void 0 ? 'red' : _c, _d = _a.appearance, appearance = _d === void 0 ? 'surface' : _d, props = __rest(_a, [\"className\", \"children\", \"radius\", \"size\", \"scaling\", \"color\", \"appearance\"]);\n var theme = useTheme().theme;\n var contextValue = {\n radius: theme.themeRadius || radius,\n scaling: theme.themeScaling || scaling,\n color: theme.themeColor || color,\n size: size,\n };\n return (_jsx(TogglePrimitive.Root, __assign({ ref: ref, className: cn(toggleVariants(contextValue), toggleAppearanceStyle(appearance, contextValue.color, true, 'data-[state=on]:'), className) }, props, { children: Children.map(children, function (child) {\n return React.cloneElement(child, { className: IconScaling[size] });\n }) })));\n});\nToggle.displayName = 'Toggle';\nexport default Toggle;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","toggleVariants","cva","variants","radius","radiusVariants","size","small","medium","large","scaling","scalingVariants","defaultVariants","IconScaling","Toggle","forwardRef","_a","ref","className","children","_b","_c","color","_d","appearance","props","theme","useTheme","contextValue","themeRadius","themeScaling","themeColor","_jsx","TogglePrimitive","Root","cn","toggleAppearanceStyle","Children","map","child","React","cloneElement","displayName"],"mappings":"8aAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UAChC,EACIQ,EAAkC,SA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K,YAAcT,EAC3BhB,KAAMA,GAEV,OAAQ0B,EAAKC,EAAgBC,KAAMrD,EAAS,CAAEoC,IAAKA,EAAKC,UAAWiB,EAAGlC,EAAe2B,GAAeQ,EAAsBZ,EAAYI,EAAaN,OAAO,EAAM,oBAAqBJ,IAAcO,EAAO,CAAEN,SAAUkB,EAASC,IAAInB,GAAU,SAAUoB,GAC/O,OAAOC,EAAMC,aAAaF,EAAO,CAAErB,UAAWL,EAAYP,IACtE,MACA,IACAQ,EAAO4B,YAAc"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  var __assign = (this && this.__assign) || function () {
2
3
  __assign = Object.assign || function(t) {
3
4
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -26,6 +27,7 @@ import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
26
27
  import { cva } from 'class-variance-authority';
27
28
  import { scalingVariants } from '../../../lib/constants';
28
29
  import { cn } from '../../../lib/utils/utils';
30
+ import { useTheme } from '../../../lib/theme';
29
31
  var toggleVariants = cva('inline-flex', {
30
32
  variants: {
31
33
  scaling: __assign({}, scalingVariants),
@@ -41,8 +43,14 @@ export var ToggleGroupContext = createContext({
41
43
  });
42
44
  export var ToggleGroupRoot = forwardRef(function (_a, ref) {
43
45
  var className = _a.className, children = _a.children, scaling = _a.scaling, size = _a.size, color = _a.color, appearance = _a.appearance, props = __rest(_a, ["className", "children", "scaling", "size", "color", "appearance"]);
46
+ var theme = useTheme().theme;
44
47
  var type = __assign({}, props).type;
45
- var contextValue = { size: size, color: color, appearance: appearance };
46
- return (_jsx(ToggleGroupContext.Provider, { value: contextValue, children: type === 'single' ? (_jsx(ToggleGroupPrimitive.Root, __assign({ className: cn(toggleVariants({ scaling: scaling }), className) }, props, { ref: ref, children: children }))) : (_jsx(ToggleGroupPrimitive.Root, __assign({ className: cn(toggleVariants({ scaling: scaling }), className) }, props, { ref: ref, children: children }))) }));
48
+ var contextValue = {
49
+ scaling: theme.themeScaling || scaling,
50
+ color: theme.themeColor || color,
51
+ size: size,
52
+ appearance: appearance,
53
+ };
54
+ return (_jsx(ToggleGroupContext.Provider, { value: contextValue, children: type === 'single' ? (_jsx(ToggleGroupPrimitive.Root, __assign({ className: cn(toggleVariants(contextValue), className) }, props, { ref: ref, children: children }))) : (_jsx(ToggleGroupPrimitive.Root, __assign({ className: cn(toggleVariants(contextValue), className) }, props, { ref: ref, children: children }))) }));
47
55
  });
48
56
  ToggleGroupRoot.displayName = 'ToggleGroup.Root';
@@ -1,2 +1,3 @@
1
- import{jsx as r}from"react/jsx-runtime";import{createContext as e,forwardRef as a}from"react";import*as t from"@radix-ui/react-toggle-group";import{cva as o}from"class-variance-authority";import{scalingVariants as n}from"../../constants.mjs";import{cn as i}from"../../utils/utils.mjs";var c=function(){return c=Object.assign||function(r){for(var e,a=1,t=arguments.length;a<t;a++)for(var o in e=arguments[a])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},c.apply(this,arguments)},l=function(r,e){var a={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(a[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(r);o<t.length;o++)e.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(r,t[o])&&(a[t[o]]=r[t[o]])}return a},s=o("inline-flex",{variants:{scaling:c({},n)},defaultVariants:{scaling:"100%"}}),p=e({size:"medium",color:"red",appearance:"surface"}),m=a((function(e,a){var o=e.className,n=e.children,m=e.scaling,f=e.size,u=e.color,g=e.appearance,y=l(e,["className","children","scaling","size","color","appearance"]),d=(c({},y).type,{size:f,color:u,appearance:g});return r(p.Provider,{value:d,children:r(t.Root,c({className:i(s({scaling:m}),o)},y,{ref:a,children:n}))})}));m.displayName="ToggleGroup.Root";export{p as ToggleGroupContext,m as ToggleGroupRoot};
1
+ "use client";
2
+ import{jsx as r}from"react/jsx-runtime";import{createContext as e,forwardRef as t}from"react";import*as o from"@radix-ui/react-toggle-group";import{cva as a}from"class-variance-authority";import{scalingVariants as n}from"../../constants.mjs";import{cn as i}from"../../utils/utils.mjs";import{useTheme as c}from"../../theme/ThemeProvider.mjs";var l=function(){return l=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var a in e=arguments[t])Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r},l.apply(this,arguments)},s=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(r);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(r,o[a])&&(t[o[a]]=r[o[a]])}return t},p=a("inline-flex",{variants:{scaling:l({},n)},defaultVariants:{scaling:"100%"}}),m=e({size:"medium",color:"red",appearance:"surface"}),f=t((function(e,t){var a=e.className,n=e.children,f=e.scaling,u=e.size,g=e.color,h=e.appearance,y=s(e,["className","children","scaling","size","color","appearance"]),d=c().theme,v=(l({},y).type,{scaling:d.themeScaling||f,color:d.themeColor||g,size:u,appearance:h});return r(m.Provider,{value:v,children:r(o.Root,l({className:i(p(v),a)},y,{ref:t,children:n}))})}));f.displayName="ToggleGroup.Root";export{m as ToggleGroupContext,f as ToggleGroupRoot};
2
3
  //# sourceMappingURL=ToggleGroupRoot.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleGroupRoot.mjs","sources":["../../../lib/components/ToggleGroup/ToggleGroupRoot.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { createContext, forwardRef } from 'react';\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { cva } from 'class-variance-authority';\nimport { scalingVariants } from '../../../lib/constants';\nimport { cn } from '../../../lib/utils/utils';\nvar toggleVariants = cva('inline-flex', {\n variants: {\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nexport var ToggleGroupContext = createContext({\n size: 'medium',\n color: 'red',\n appearance: 'surface',\n});\nexport var ToggleGroupRoot = forwardRef(function (_a, ref) {\n var className = _a.className, children = _a.children, scaling = _a.scaling, size = _a.size, color = _a.color, appearance = _a.appearance, props = __rest(_a, [\"className\", \"children\", \"scaling\", \"size\", \"color\", \"appearance\"]);\n var type = __assign({}, props).type;\n var contextValue = { size: size, color: color, appearance: appearance };\n return (_jsx(ToggleGroupContext.Provider, { value: contextValue, children: type === 'single' ? (_jsx(ToggleGroupPrimitive.Root, __assign({ className: cn(toggleVariants({ scaling: scaling }), className) }, props, { ref: ref, children: children }))) : (_jsx(ToggleGroupPrimitive.Root, __assign({ className: cn(toggleVariants({ scaling: scaling }), className) }, props, { ref: ref, children: children }))) }));\n});\nToggleGroupRoot.displayName = 'ToggleGroup.Root';\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","toggleVariants","cva","variants","scaling","scalingVariants","defaultVariants","ToggleGroupContext","createContext","size","color","appearance","ToggleGroupRoot","forwardRef","_a","ref","className","children","props","contextValue","type","_jsx","Provider","value","ToggleGroup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AAEqC,GAAOE,KACZ,CAAEX,KAAMA,EAAMC,MAAOA,EAAOC,WAAYA,IAC3D,OAAQU,EAAKd,EAAmBe,SAAU,CAAEC,MAAOJ,EAAcF,SAA+BI,EAAKG,EAAqBC,KAAM5C,EAAS,CAAEmC,UAAWU,EAAGzB,EAAe,CAAEG,QAASA,IAAYY,IAAcE,EAAO,CAAEH,IAAKA,EAAKE,SAAUA,MAC9O,IACAL,EAAgBe,YAAc"}
1
+ {"version":3,"file":"ToggleGroupRoot.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -6,7 +6,7 @@ export interface ToggleSwitchProps extends VariantProps<typeof toggleSwitchVaria
6
6
  }
7
7
  declare const toggleSwitchVariants: (props?: ({
8
8
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
9
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
9
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
10
10
  size?: "small" | "medium" | "large" | null | undefined;
11
11
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
12
12
  export declare const ToggleSwitch: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/themes").SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref">, "size"> & ToggleSwitchProps & React.RefAttributes<HTMLButtonElement>>;
@@ -27,6 +27,7 @@ import { cn } from '../../../lib/utils/utils';
27
27
  import { radiusVariants, scalingVariants } from '../../../lib/constants';
28
28
  import { Switch as SwitchTheme, Theme } from '@radix-ui/themes';
29
29
  import { Text } from '../../../lib/Typography/Text';
30
+ import { useTheme } from '../../../lib/theme';
30
31
  var toggleSwitchVariants = cva('', {
31
32
  variants: {
32
33
  scaling: __assign({}, scalingVariants),
@@ -58,6 +59,7 @@ var SwitchLabelVariants = cva('flex items-center justify-start text-slate-12 fon
58
59
  });
59
60
  export var ToggleSwitch = React.forwardRef(function (_a, forwardedRef) {
60
61
  var className = _a.className, _b = _a.color, color = _b === void 0 ? 'red' : _b, scaling = _a.scaling, size = _a.size, _c = _a.appearance, appearance = _c === void 0 ? 'surface' : _c, radius = _a.radius, tabIndex = _a.tabIndex, children = _a.children, switchProps = __rest(_a, ["className", "color", "scaling", "size", "appearance", "radius", "tabIndex", "children"]);
62
+ var theme = useTheme().theme;
61
63
  if (radius === 'medium' || radius === 'large')
62
64
  radius = 'full';
63
65
  var sizeTheme = '2';
@@ -65,7 +67,17 @@ export var ToggleSwitch = React.forwardRef(function (_a, forwardedRef) {
65
67
  sizeTheme = '1';
66
68
  if (size === 'large')
67
69
  sizeTheme = '3';
68
- return (_jsx(Theme, { className: "flex", accentColor: color, hasBackground: false, children: _jsxs(Text, { as: "label", className: cn('flex items-center', SwitchLabelVariants({ size: size, scaling: scaling })), children: [_jsx(SwitchTheme, __assign({ ref: forwardedRef }, switchProps, { variant: appearance, radius: radius, size: sizeTheme, color: color, className: cn(toggleSwitchVariants({ scaling: scaling, radius: radius, size: size }), className), "aria-label": "Switch" })), children] }) }));
70
+ var contextValue = {
71
+ radius: theme.themeRadius || radius,
72
+ scaling: theme.themeScaling || scaling,
73
+ color: theme.themeColor || color,
74
+ size: size,
75
+ };
76
+ return (
77
+ // @ts-ignore
78
+ _jsx(Theme, { className: "flex", accentColor: contextValue.color, hasBackground: false, children: _jsxs(Text, { as: "label", className: cn('flex items-center', SwitchLabelVariants({ size: size, scaling: contextValue.scaling })), children: [_jsx(SwitchTheme, __assign({ ref: forwardedRef }, switchProps, { variant: appearance, radius: contextValue.radius, size: sizeTheme,
79
+ // @ts-ignore
80
+ color: contextValue.color, className: cn(toggleSwitchVariants(contextValue), className), "aria-label": "Switch" })), children] }) }));
69
81
  });
70
82
  ToggleSwitch.displayName = 'ToggleSwitch';
71
83
  export default ToggleSwitch;
@@ -1,2 +1,2 @@
1
- import{jsx as a,jsxs as e}from"react/jsx-runtime";import r from"react";import{cva as t}from"class-variance-authority";import{cn as i}from"../../utils/utils.mjs";import{scalingVariants as s,radiusVariants as l}from"../../constants.mjs";import{Theme as n,Switch as o}from"@radix-ui/themes";import{Text as c}from"../../Typography/Text/index.mjs";var m=function(){return m=Object.assign||function(a){for(var e,r=1,t=arguments.length;r<t;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(a[i]=e[i]);return a},m.apply(this,arguments)},p=function(a,e){var r={};for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&e.indexOf(t)<0&&(r[t]=a[t]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(a);i<t.length;i++)e.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(a,t[i])&&(r[t[i]]=a[t[i]])}return r},u=t("",{variants:{scaling:m({},s),radius:m({},l.base),size:{small:"w-[28px] h-[16px]",medium:"w-[35px] h-[20px]",large:"w-[42px] h-[24px]"}},defaultVariants:{radius:"full",size:"medium"}}),f=t("flex items-center justify-start text-slate-12 font-normal dark:text-white",{variants:{size:{small:"text-xs gap-2",medium:"text-sm gap-2",large:"text-base gap-3"},scaling:m({},s)},defaultVariants:{size:"medium",scaling:"100%"}}),d=r.forwardRef((function(r,t){var s=r.className,l=r.color,d=void 0===l?"red":l,x=r.scaling,g=r.size,h=r.appearance,y=void 0===h?"surface":h,b=r.radius;r.tabIndex;var v=r.children,O=p(r,["className","color","scaling","size","appearance","radius","tabIndex","children"]);"medium"!==b&&"large"!==b||(b="full");var j="2";return"small"===g&&(j="1"),"large"===g&&(j="3"),a(n,{className:"flex",accentColor:d,hasBackground:!1,children:e(c,{as:"label",className:i("flex items-center",f({size:g,scaling:x})),children:[a(o,m({ref:t},O,{variant:y,radius:b,size:j,color:d,className:i(u({scaling:x,radius:b,size:g}),s),"aria-label":"Switch"})),v]})})}));d.displayName="ToggleSwitch";export{d as ToggleSwitch,d as default};
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import r from"react";import{cva as t}from"class-variance-authority";import{cn as i}from"../../utils/utils.mjs";import{scalingVariants as s,radiusVariants as l}from"../../constants.mjs";import{Theme as o,Switch as n}from"@radix-ui/themes";import{Text as m}from"../../Typography/Text/index.mjs";import{useTheme as c}from"../../theme/ThemeProvider.mjs";var p=function(){return p=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var i in a=arguments[r])Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i]);return e},p.apply(this,arguments)},u=function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(e);i<t.length;i++)a.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(r[t[i]]=e[t[i]])}return r},f=t("",{variants:{scaling:p({},s),radius:p({},l.base),size:{small:"w-[28px] h-[16px]",medium:"w-[35px] h-[20px]",large:"w-[42px] h-[24px]"}},defaultVariants:{radius:"full",size:"medium"}}),d=t("flex items-center justify-start text-slate-12 font-normal dark:text-white",{variants:{size:{small:"text-xs gap-2",medium:"text-sm gap-2",large:"text-base gap-3"},scaling:p({},s)},defaultVariants:{size:"medium",scaling:"100%"}}),g=r.forwardRef((function(r,t){var s=r.className,l=r.color,g=void 0===l?"red":l,h=r.scaling,x=r.size,v=r.appearance,y=void 0===v?"surface":v,b=r.radius;r.tabIndex;var j=r.children,O=u(r,["className","color","scaling","size","appearance","radius","tabIndex","children"]),w=c().theme;"medium"!==b&&"large"!==b||(b="full");var z="2";"small"===x&&(z="1"),"large"===x&&(z="3");var N={radius:w.themeRadius||b,scaling:w.themeScaling||h,color:w.themeColor||g,size:x};return e(o,{className:"flex",accentColor:N.color,hasBackground:!1,children:a(m,{as:"label",className:i("flex items-center",d({size:x,scaling:N.scaling})),children:[e(n,p({ref:t},O,{variant:y,radius:N.radius,size:z,color:N.color,className:i(f(N),s),"aria-label":"Switch"})),j]})})}));g.displayName="ToggleSwitch";export{g as ToggleSwitch,g as default};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../lib/components/ToggleSwitch/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { radiusVariants, scalingVariants } from '../../../lib/constants';\nimport { Switch as SwitchTheme, Theme } from '@radix-ui/themes';\nimport { Text } from '../../../lib/Typography/Text';\nvar toggleSwitchVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n radius: __assign({}, radiusVariants['base']),\n size: {\n small: 'w-[28px] h-[16px]',\n medium: 'w-[35px] h-[20px]',\n large: 'w-[42px] h-[24px]',\n },\n },\n defaultVariants: {\n radius: 'full',\n size: 'medium',\n },\n});\nvar SwitchLabelVariants = cva('flex items-center justify-start text-slate-12 font-normal dark:text-white', {\n variants: {\n size: {\n small: 'text-xs gap-2',\n medium: 'text-sm gap-2',\n large: 'text-base gap-3',\n },\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n size: 'medium',\n scaling: '100%',\n },\n});\nexport var ToggleSwitch = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, _b = _a.color, color = _b === void 0 ? 'red' : _b, scaling = _a.scaling, size = _a.size, _c = _a.appearance, appearance = _c === void 0 ? 'surface' : _c, radius = _a.radius, tabIndex = _a.tabIndex, children = _a.children, switchProps = __rest(_a, [\"className\", \"color\", \"scaling\", \"size\", \"appearance\", \"radius\", \"tabIndex\", \"children\"]);\n if (radius === 'medium' || radius === 'large')\n radius = 'full';\n var sizeTheme = '2';\n if (size === 'small')\n sizeTheme = '1';\n if (size === 'large')\n sizeTheme = '3';\n return (_jsx(Theme, { className: \"flex\", accentColor: color, hasBackground: false, children: _jsxs(Text, { as: \"label\", className: cn('flex items-center', SwitchLabelVariants({ size: size, scaling: scaling })), children: [_jsx(SwitchTheme, __assign({ ref: forwardedRef }, switchProps, { variant: appearance, radius: radius, size: sizeTheme, color: color, className: cn(toggleSwitchVariants({ scaling: scaling, radius: radius, size: size }), className), \"aria-label\": \"Switch\" })), children] }) }));\n});\nToggleSwitch.displayName = 'ToggleSwitch';\nexport default ToggleSwitch;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","toggleSwitchVariants","cva","variants","scaling","scalingVariants","radius","radiusVariants","size","small","medium","large","defaultVariants","SwitchLabelVariants","ToggleSwitch","React","forwardRef","_a","forwardedRef","className","_b","color","_c","appearance","tabIndex","children","switchProps","sizeTheme","_jsx","Theme","accentColor","hasBackground","_jsxs","Text","as","cn","SwitchTheme","ref","variant","displayName"],"mappings":"uVAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UACh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,WAAY,aACpV,WAAXX,GAAkC,UAAXA,IACvBA,EAAS,QACb,IAAIqB,EAAY,IAKhB,MAJa,UAATnB,IACAmB,EAAY,KACH,UAATnB,IACAmB,EAAY,KACRC,EAAKC,EAAO,CAAEV,UAAW,OAAQW,YAAaT,EAAOU,eAAe,EAAON,SAAUO,EAAMC,EAAM,CAAEC,GAAI,QAASf,UAAWgB,EAAG,oBAAqBtB,EAAoB,CAAEL,KAAMA,EAAMJ,QAASA,KAAaqB,SAAU,CAACG,EAAKQ,EAAavD,EAAS,CAAEwD,IAAKnB,GAAgBQ,EAAa,CAAEY,QAASf,EAAYjB,OAAQA,EAAQE,KAAMmB,EAAWN,MAAOA,EAAOF,UAAWgB,EAAGlC,EAAqB,CAAEG,QAASA,EAASE,OAAQA,EAAQE,KAAMA,IAASW,GAAY,aAAc,YAAcM,MACre,IACAX,EAAayB,YAAc"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../lib/components/ToggleSwitch/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { radiusVariants, scalingVariants } from '../../../lib/constants';\nimport { Switch as SwitchTheme, Theme } from '@radix-ui/themes';\nimport { Text } from '../../../lib/Typography/Text';\nimport { useTheme } from '../../../lib/theme';\nvar toggleSwitchVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n radius: __assign({}, radiusVariants['base']),\n size: {\n small: 'w-[28px] h-[16px]',\n medium: 'w-[35px] h-[20px]',\n large: 'w-[42px] h-[24px]',\n },\n },\n defaultVariants: {\n radius: 'full',\n size: 'medium',\n },\n});\nvar SwitchLabelVariants = cva('flex items-center justify-start text-slate-12 font-normal dark:text-white', {\n variants: {\n size: {\n small: 'text-xs gap-2',\n medium: 'text-sm gap-2',\n large: 'text-base gap-3',\n },\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n size: 'medium',\n scaling: '100%',\n },\n});\nexport var ToggleSwitch = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, _b = _a.color, color = _b === void 0 ? 'red' : _b, scaling = _a.scaling, size = _a.size, _c = _a.appearance, appearance = _c === void 0 ? 'surface' : _c, radius = _a.radius, tabIndex = _a.tabIndex, children = _a.children, switchProps = __rest(_a, [\"className\", \"color\", \"scaling\", \"size\", \"appearance\", \"radius\", \"tabIndex\", \"children\"]);\n var theme = useTheme().theme;\n if (radius === 'medium' || radius === 'large')\n radius = 'full';\n var sizeTheme = '2';\n if (size === 'small')\n sizeTheme = '1';\n if (size === 'large')\n sizeTheme = '3';\n var contextValue = {\n radius: theme.themeRadius || radius,\n scaling: theme.themeScaling || scaling,\n color: theme.themeColor || color,\n size: size,\n };\n return (\n // @ts-ignore\n _jsx(Theme, { className: \"flex\", accentColor: contextValue.color, hasBackground: false, children: _jsxs(Text, { as: \"label\", className: cn('flex items-center', SwitchLabelVariants({ size: size, scaling: contextValue.scaling })), children: [_jsx(SwitchTheme, __assign({ ref: forwardedRef }, switchProps, { variant: appearance, radius: contextValue.radius, size: sizeTheme, \n // @ts-ignore\n color: contextValue.color, className: cn(toggleSwitchVariants(contextValue), className), \"aria-label\": \"Switch\" })), children] }) }));\n});\nToggleSwitch.displayName = 'ToggleSwitch';\nexport default ToggleSwitch;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","toggleSwitchVariants","cva","variants","scaling","scalingVariants","radius","radiusVariants","size","small","medium","large","defaultVariants","SwitchLabelVariants","ToggleSwitch","React","forwardRef","_a","forwardedRef","className","_b","color","_c","appearance","tabIndex","children","switchProps","theme","useTheme","sizeTheme","contextValue","themeRadius","themeScaling","themeColor","_jsx","Theme","accentColor","hasBackground","_jsxs","Text","as","cn","SwitchTheme","ref","variant","displayName"],"mappings":"gZAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UAChC,EACIQ,EAAkC,SAAUX,EAAGY,GAC/C,IAAIb,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMO,EAAEC,QAAQR,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOiB,sBACtB,KAAIb,EAAI,EAAb,IAAgBI,EAAIR,OAAOiB,sBAAsBd,GAAIC,EAAII,EAAED,OAAQH,IAC3DW,EAAEC,QAAQR,EAAEJ,IAAM,GAAKJ,OAAOS,UAAUS,qBAAqBP,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACX,EASIiB,EAAuBC,EAAI,GAAI,CAC/BC,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S,CAAE8D,IAAKzB,GAAgBQ,EAAa,CAAEkB,QAASrB,EAAYjB,OAAQwB,EAAaxB,OAAQE,KAAMqB,EAEzVR,MAAOS,EAAaT,MAAOF,UAAWsB,EAAGxC,EAAqB6B,GAAeX,GAAY,aAAc,YAAcM,MACzI,IACAX,EAAa+B,YAAc"}
@@ -11,8 +11,8 @@ export interface TooltipProps extends React.InputHTMLAttributes<HTMLInputElement
11
11
  side?: 'top' | 'right' | 'bottom' | 'left';
12
12
  }
13
13
  declare const tooltipVariants: (props?: ({
14
- weight?: "bold" | "medium" | "regular" | "semibold" | null | undefined;
15
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
14
+ weight?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
15
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
16
16
  color?: string | null | undefined;
17
17
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
18
18
  declare const Tooltip: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipProps & TooltipProps & React.RefAttributes<never>>;
@@ -27,6 +27,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
27
27
  import { cva } from 'class-variance-authority';
28
28
  import { cn } from '../../../lib/utils/utils';
29
29
  import { primaryColorStyle, radiusVariants, weightVariants } from '../../../lib/constants';
30
+ import { useTheme } from '../../../lib/theme';
30
31
  var tooltipVariants = cva('bg-slate-12 text-slate-1 dark:bg-slateDark-12 dark:text-slateDark-1 data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade select-none rounded-[4px] px-[9px] py-[6px] text-[12px] leading-none shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] will-change-[transform,opacity]', {
31
32
  variants: {
32
33
  weight: __assign({}, weightVariants),
@@ -35,15 +36,19 @@ var tooltipVariants = cva('bg-slate-12 text-slate-1 dark:bg-slateDark-12 dark:te
35
36
  },
36
37
  });
37
38
  var Tooltip = React.forwardRef(function (_a, ref) {
38
- var content = _a.content, weight = _a.weight, color = _a.color, radius = _a.radius, children = _a.children, defaultOpen = _a.defaultOpen, open = _a.open, className = _a.className, side = _a.side, onOpenChange = _a.onOpenChange, props = __rest(_a, ["content", "weight", "color", "radius", "children", "defaultOpen", "open", "className", "side", "onOpenChange"]);
39
- if (!side)
40
- side = 'top';
41
- if (radius === 'full')
42
- radius = 'large';
43
- var arrowColor = color
44
- ? "fill-".concat(color, "-9 dark:fill-").concat(color, "Dark-9")
39
+ var content = _a.content, weight = _a.weight, color = _a.color, radius = _a.radius, children = _a.children, defaultOpen = _a.defaultOpen, open = _a.open, className = _a.className, _b = _a.side, side = _b === void 0 ? 'top' : _b, onOpenChange = _a.onOpenChange, props = __rest(_a, ["content", "weight", "color", "radius", "children", "defaultOpen", "open", "className", "side", "onOpenChange"]);
40
+ var theme = useTheme().theme;
41
+ var contextValue = {
42
+ radius: theme.themeRadius || radius,
43
+ color: theme.themeColor || color,
44
+ weight: theme.themeWeight || weight,
45
+ };
46
+ if (contextValue.radius === 'full')
47
+ contextValue.radius = 'large';
48
+ var arrowColor = contextValue.color
49
+ ? "fill-".concat(contextValue.color, "-9 dark:fill-").concat(contextValue.color, "Dark-9")
45
50
  : 'fill-slate-12 dark:fill-slateDark-12';
46
- return (_jsx(TooltipPrimitive.Provider, { children: _jsxs(TooltipPrimitive.Root, { open: open, defaultOpen: defaultOpen, onOpenChange: onOpenChange, children: [_jsx(TooltipPrimitive.Trigger, { className: "cursor-pointer text-slate-12 dark:text-slateDark-12", asChild: true, children: children }), _jsxs(TooltipPrimitive.Content, __assign({ align: "center" }, props, { side: side, className: cn('mr-2', tooltipVariants({ weight: weight, radius: radius, color: color }), className), sideOffset: 5, children: [content, _jsx(TooltipPrimitive.Arrow, { width: 11, height: 5, className: arrowColor })] }))] }) }));
51
+ return (_jsx(TooltipPrimitive.Provider, { children: _jsxs(TooltipPrimitive.Root, { open: open, defaultOpen: defaultOpen, onOpenChange: onOpenChange, children: [_jsx(TooltipPrimitive.Trigger, { className: "cursor-pointer text-slate-12 dark:text-slateDark-12", asChild: true, children: children }), _jsxs(TooltipPrimitive.Content, __assign({ align: "center" }, props, { side: side, className: cn('mr-2', tooltipVariants(contextValue), className), sideOffset: 5, children: [content, _jsx(TooltipPrimitive.Arrow, { width: 11, height: 5, className: arrowColor })] }))] }) }));
47
52
  });
48
53
  Tooltip.displayName = 'Tooltip';
49
54
  export default Tooltip;
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import a from"react";import*as r from"@radix-ui/react-tooltip";import{cva as n}from"class-variance-authority";import{cn as o}from"../../utils/utils.mjs";import{weightVariants as l,radiusVariants as i,primaryColorStyle as d}from"../../constants.mjs";var s=function(){return s=Object.assign||function(e){for(var t,a=1,r=arguments.length;a<r;a++)for(var n in t=arguments[a])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)},p=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]])}return a},c=n("bg-slate-12 text-slate-1 dark:bg-slateDark-12 dark:text-slateDark-1 data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade select-none rounded-[4px] px-[9px] py-[6px] text-[12px] leading-none shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] will-change-[transform,opacity]",{variants:{weight:s({},l),radius:s({},i["extra-large"]),color:d()}}),f=a.forwardRef((function(a,n){var l=a.content,i=a.weight,d=a.color,f=a.radius,m=a.children,h=a.defaultOpen,u=a.open,g=a.className,x=a.side,y=a.onOpenChange,O=p(a,["content","weight","color","radius","children","defaultOpen","open","className","side","onOpenChange"]);x||(x="top"),"full"===f&&(f="large");var _=d?"fill-".concat(d,"-9 dark:fill-").concat(d,"Dark-9"):"fill-slate-12 dark:fill-slateDark-12";return e(r.Provider,{children:t(r.Root,{open:u,defaultOpen:h,onOpenChange:y,children:[e(r.Trigger,{className:"cursor-pointer text-slate-12 dark:text-slateDark-12",asChild:!0,children:m}),t(r.Content,s({align:"center"},O,{side:x,className:o("mr-2",c({weight:i,radius:f,color:d}),g),sideOffset:5,children:[l,e(r.Arrow,{width:11,height:5,className:_})]}))]})})}));f.displayName="Tooltip";export{f as default};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import a from"react";import*as r from"@radix-ui/react-tooltip";import{cva as o}from"class-variance-authority";import{cn as n}from"../../utils/utils.mjs";import{weightVariants as i,radiusVariants as l,primaryColorStyle as d}from"../../constants.mjs";import{useTheme as s}from"../../theme/ThemeProvider.mjs";var p=function(){return p=Object.assign||function(e){for(var t,a=1,r=arguments.length;a<r;a++)for(var o in t=arguments[a])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)},c=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(a[r[o]]=e[r[o]])}return a},m=o("bg-slate-12 text-slate-1 dark:bg-slateDark-12 dark:text-slateDark-1 data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade select-none rounded-[4px] px-[9px] py-[6px] text-[12px] leading-none shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] will-change-[transform,opacity]",{variants:{weight:p({},i),radius:p({},l["extra-large"]),color:d()}}),f=a.forwardRef((function(a,o){var i=a.content,l=a.weight,d=a.color,f=a.radius,h=a.children,u=a.defaultOpen,g=a.open,x=a.className,y=a.side,O=void 0===y?"top":y,_=a.onOpenChange,w=c(a,["content","weight","color","radius","children","defaultOpen","open","className","side","onOpenChange"]),v=s().theme,b={radius:v.themeRadius||f,color:v.themeColor||d,weight:v.themeWeight||l};"full"===b.radius&&(b.radius="large");var j=b.color?"fill-".concat(b.color,"-9 dark:fill-").concat(b.color,"Dark-9"):"fill-slate-12 dark:fill-slateDark-12";return e(r.Provider,{children:t(r.Root,{open:g,defaultOpen:u,onOpenChange:_,children:[e(r.Trigger,{className:"cursor-pointer text-slate-12 dark:text-slateDark-12",asChild:!0,children:h}),t(r.Content,p({align:"center"},w,{side:O,className:n("mr-2",m(b),x),sideOffset:5,children:[i,e(r.Arrow,{width:11,height:5,className:j})]}))]})})}));f.displayName="Tooltip";export{f as default};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../lib/components/Tooltip/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n// your-tooltip.jsx\nimport React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { primaryColorStyle, radiusVariants, weightVariants } from '../../../lib/constants';\nvar tooltipVariants = cva('bg-slate-12 text-slate-1 dark:bg-slateDark-12 dark:text-slateDark-1 data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade select-none rounded-[4px] px-[9px] py-[6px] text-[12px] leading-none shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] will-change-[transform,opacity]', {\n variants: {\n weight: __assign({}, weightVariants),\n radius: __assign({}, radiusVariants['extra-large']),\n color: primaryColorStyle(),\n },\n});\nvar Tooltip = React.forwardRef(function (_a, ref) {\n var content = _a.content, weight = _a.weight, color = _a.color, radius = _a.radius, children = _a.children, defaultOpen = _a.defaultOpen, open = _a.open, className = _a.className, side = _a.side, onOpenChange = _a.onOpenChange, props = __rest(_a, [\"content\", \"weight\", \"color\", \"radius\", \"children\", \"defaultOpen\", \"open\", \"className\", \"side\", \"onOpenChange\"]);\n if (!side)\n side = 'top';\n if (radius === 'full')\n radius = 'large';\n var arrowColor = color\n ? \"fill-\".concat(color, \"-9 dark:fill-\").concat(color, \"Dark-9\")\n : 'fill-slate-12 dark:fill-slateDark-12';\n return (_jsx(TooltipPrimitive.Provider, { children: _jsxs(TooltipPrimitive.Root, { open: open, defaultOpen: defaultOpen, onOpenChange: onOpenChange, children: [_jsx(TooltipPrimitive.Trigger, { className: \"cursor-pointer text-slate-12 dark:text-slateDark-12\", asChild: true, children: children }), _jsxs(TooltipPrimitive.Content, __assign({ align: \"center\" }, props, { side: side, className: cn('mr-2', tooltipVariants({ weight: weight, radius: radius, color: color }), className), sideOffset: 5, children: [content, _jsx(TooltipPrimitive.Arrow, { width: 11, height: 5, className: arrowColor })] }))] }) }));\n});\nTooltip.displayName = 'Tooltip';\nexport default Tooltip;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","tooltipVariants","cva","variants","weight","weightVariants","radius","radiusVariants","color","primaryColorStyle","Tooltip","React","forwardRef","_a","ref","content","children","defaultOpen","open","className","side","onOpenChange","props","arrowColor","concat","_jsx","TooltipPrimitive","Provider","_jsxs","Root","Trigger","asChild","Content","align","cn","sideOffset","Arrow","width","height","displayName"],"mappings":"2SAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UAChC,EACIQ,EAAkC,SAAUX,EAAGY,GAC/C,IAAIb,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMO,EAAEC,QAAQR,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOiB,sBACtB,KAAIb,EAAI,EAAb,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,SAAU,CAACD,EAASU,EAAKC,EAAiBU,MAAO,CAAEC,MAAO,GAAIC,OAAQ,EAAGnB,UAAWI,YACxkB,IACAb,EAAQ6B,YAAc"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../lib/components/Tooltip/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n// your-tooltip.jsx\nimport React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { primaryColorStyle, radiusVariants, weightVariants } from '../../../lib/constants';\nimport { useTheme } from '../../../lib/theme';\nvar tooltipVariants = cva('bg-slate-12 text-slate-1 dark:bg-slateDark-12 dark:text-slateDark-1 data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade select-none rounded-[4px] px-[9px] py-[6px] text-[12px] leading-none shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] will-change-[transform,opacity]', {\n variants: {\n weight: __assign({}, weightVariants),\n radius: __assign({}, radiusVariants['extra-large']),\n color: primaryColorStyle(),\n },\n});\nvar Tooltip = React.forwardRef(function (_a, ref) {\n var content = _a.content, weight = _a.weight, color = _a.color, radius = _a.radius, children = _a.children, defaultOpen = _a.defaultOpen, open = _a.open, className = _a.className, _b = _a.side, side = _b === void 0 ? 'top' : _b, onOpenChange = _a.onOpenChange, props = __rest(_a, [\"content\", \"weight\", \"color\", \"radius\", \"children\", \"defaultOpen\", \"open\", \"className\", \"side\", \"onOpenChange\"]);\n var theme = useTheme().theme;\n var contextValue = {\n radius: theme.themeRadius || radius,\n color: theme.themeColor || color,\n weight: theme.themeWeight || weight,\n };\n if (contextValue.radius === 'full')\n contextValue.radius = 'large';\n var arrowColor = contextValue.color\n ? \"fill-\".concat(contextValue.color, \"-9 dark:fill-\").concat(contextValue.color, \"Dark-9\")\n : 'fill-slate-12 dark:fill-slateDark-12';\n return (_jsx(TooltipPrimitive.Provider, { children: _jsxs(TooltipPrimitive.Root, { open: open, defaultOpen: defaultOpen, onOpenChange: onOpenChange, children: [_jsx(TooltipPrimitive.Trigger, { className: \"cursor-pointer text-slate-12 dark:text-slateDark-12\", asChild: true, children: children }), _jsxs(TooltipPrimitive.Content, __assign({ align: \"center\" }, props, { side: side, className: cn('mr-2', tooltipVariants(contextValue), className), sideOffset: 5, children: [content, _jsx(TooltipPrimitive.Arrow, { width: 11, height: 5, className: arrowColor })] }))] }) }));\n});\nTooltip.displayName = 'Tooltip';\nexport default Tooltip;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","tooltipVariants","cva","variants","weight","weightVariants","radius","radiusVariants","color","primaryColorStyle","Tooltip","React","forwardRef","_a","ref","content","children","defaultOpen","open","className","_b","side","onOpenChange","props","theme","useTheme","contextValue","themeRadius","themeColor","themeWeight","arrowColor","concat","_jsx","TooltipPrimitive","Provider","_j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D,EAAgB,MAAQA,EAAIE,EAAeT,EAAGS,aAAcC,EAAQ3B,EAAOiB,EAAI,CAAC,UAAW,SAAU,QAAS,SAAU,WAAY,cAAe,OAAQ,YAAa,OAAQ,iBACrXW,EAAQC,IAAWD,MACnBE,EAAe,CACfpB,OAAQkB,EAAMG,aAAerB,EAC7BE,MAAOgB,EAAMI,YAAcpB,EAC3BJ,OAAQoB,EAAMK,aAAezB,GAEL,SAAxBsB,EAAapB,SACboB,EAAapB,OAAS,SAC1B,IAAIwB,EAAaJ,EAAalB,MACxB,QAAQuB,OAAOL,EAAalB,MAAO,iBAAiBuB,OAAOL,EAAalB,MAAO,UAC/E,uCACN,OAAQwB,EAAKC,EAAiBC,SAAU,CAAElB,SAAUmB,EAAMF,EAAiBG,KAAM,CAAElB,KAAMA,EAAMD,YAAaA,EAAaK,aAAcA,EAAcN,SAAU,CAACgB,EAAKC,EAAiBI,QAAS,CAAElB,UAAW,sDAAuDmB,SAAS,EAAMtB,SAAUA,IAAamB,EAAMF,EAAiBM,QAAS1D,EAAS,CAAE2D,MAAO,UAAYjB,EAAO,CAAEF,KAAMA,EAAMF,UAAWsB,EAAG,OAAQxC,EAAgByB,GAAeP,GAAYuB,WAAY,EAAG1B,SAAU,CAACD,EAASiB,EAAKC,EAAiBU,MAAO,CAAEC,MAAO,GAAIC,OAAQ,EAAG1B,UAAWW,YACpiB,IACApB,EAAQoC,YAAc"}
@@ -220,7 +220,6 @@ export declare const commonArgTypes: {
220
220
  };
221
221
  };
222
222
  };
223
- export declare const chartColorStyle: () => Record<string, string>;
224
223
  export declare const chartTitleArgTypes: {
225
224
  title: {
226
225
  description: string;
@@ -650,6 +649,5 @@ export declare const textColorStyle: () => Record<string, string>;
650
649
  export declare const appearanceStyle: (type: string, color: string, isClickable?: boolean) => string;
651
650
  export declare const toggleAppearanceStyle: (type: string, color: string, isClickable?: boolean, stateOn?: string) => string;
652
651
  export declare const menuItemAppearanceStyle: (type: 'solid' | 'soft' | 'ghost', color: string) => string;
653
- export declare const switchCheckedApperanceStyle: (type: string, color: string) => string;
654
652
  export declare const checkboxAppearanceStyle: (type: string, color: string, indeterminate: boolean) => string;
655
653
  export declare const selectAppearanceStyle: (type: 'classic' | 'surface' | 'soft' | 'ghost', color: string) => string;
@@ -1,5 +1,4 @@
1
- import { ColorStyle, DarkColorStyle, colorOptions, chartColorOptions } from '../lib/color/constants';
2
- import * as lightColors from '../lib/color/light';
1
+ import { ColorStyle, DarkColorStyle, colorOptions } from '../lib/color/constants';
3
2
  export var radiusOptions = ['none', 'small', 'medium', 'large', 'full'];
4
3
  export var typoSizeOptions = ['1', '2', '3', '4', '5', '6', '7', '8', '9'];
5
4
  export var scalingOptions = ['90%', '95%', '100%', '105%', '110%'];
@@ -191,14 +190,6 @@ export var commonArgTypes = {
191
190
  },
192
191
  },
193
192
  };
194
- export var chartColorStyle = function () {
195
- var colorValues = lightColors;
196
- var colorMappings = {};
197
- chartColorOptions.forEach(function (color) {
198
- colorMappings[color] = colorValues[color][9];
199
- });
200
- return colorMappings;
201
- };
202
193
  export var chartTitleArgTypes = {
203
194
  title: {
204
195
  description: '차트 타이틀',
@@ -640,7 +631,7 @@ export var toggleAppearanceStyle = function (type, color, isClickable, stateOn)
640
631
  },
641
632
  dark: {
642
633
  default: "dark:bg-".concat(darkColor, "-9 dark:border-").concat(darkColor, "-9 dark:text-slateDark-1"),
643
- hover: "dark:hover:bg-".concat(darkColor, "-10 dark:hover:border-").concat(darkColor, "-9 dark:hover:text-slateDark-1 ").concat(stateOn, "dark:hover:bg-").concat(darkColor, "-10 ").concat(stateOn, "dark:hover:border-").concat(darkColor, "-9 ").concat(stateOn, "dark:hover:text-slateDark-1"),
634
+ hover: "dark:hover:bg-".concat(darkColor, "-10 dark:hover:border-").concat(darkColor, "-9 dark:hover:text-slateDark-1 dark:").concat(stateOn, "hover:bg-").concat(darkColor, "-10 dark:").concat(stateOn, "hover:border-").concat(darkColor, "-9 dark:").concat(stateOn, "hover:text-slateDark-1"),
644
635
  active: "dark:".concat(stateOn, "bg-").concat(darkColor, "-9 dark:").concat(stateOn, "border-").concat(darkColor, "-9 dark:").concat(stateOn, "text-slateDark-1"),
645
636
  disable: "dark:disabled:bg-slateDarkA-3 dark:disabled:border-slateDark-4 dark:disabled:text-slateDarkA-8",
646
637
  },
@@ -654,7 +645,7 @@ export var toggleAppearanceStyle = function (type, color, isClickable, stateOn)
654
645
  },
655
646
  dark: {
656
647
  default: "dark:bg-".concat(darkColor, "-9 dark:text-slateDark-1"),
657
- hover: "dark:hover:bg-".concat(darkColor, "-10 dark:hover:text-slateDark-1 ").concat(stateOn, "dark:hover:bg-").concat(darkColor, "-10 ").concat(stateOn, "dark:hover:text-slateDark-1"),
648
+ hover: "dark:hover:bg-".concat(darkColor, "-10 dark:hover:text-slateDark-1 dark:").concat(stateOn, "hover:bg-").concat(darkColor, "-10 dark:").concat(stateOn, "hover:text-slateDark-1"),
658
649
  active: "dark:".concat(stateOn, "bg-").concat(darkColor, "-10 dark:").concat(stateOn, "text-slateDark-1 dark:").concat(stateOn, "opacity-[.92]"),
659
650
  disable: "dark:disabled:bg-slateDarkA-3 disabled:text-slateDarkA-8",
660
651
  },
@@ -668,7 +659,7 @@ export var toggleAppearanceStyle = function (type, color, isClickable, stateOn)
668
659
  },
669
660
  dark: {
670
661
  default: "dark:bg-".concat(darkColor, "A-3 dark:text-").concat(darkColor, "A-11"),
671
- hover: "dark:hover:bg-".concat(darkColor, "A-4 dark:hover:text-").concat(darkColor, "A-11 ").concat(stateOn, "dark:hover:bg-").concat(darkColor, "A-4 ").concat(stateOn, "dark:hover:text-").concat(darkColor, "A-11"),
662
+ hover: "dark:hover:bg-".concat(darkColor, "A-4 dark:hover:text-").concat(darkColor, "A-11 dark:").concat(stateOn, "hover:bg-").concat(darkColor, "A-4 dark:").concat(stateOn, "hover:text-").concat(darkColor, "A-11"),
672
663
  active: "dark:".concat(stateOn, "bg-").concat(darkColor, "A-5 dark:").concat(stateOn, "text-").concat(darkColor, "A-11 dark:").concat(stateOn, "opacity-[.92]"),
673
664
  disable: "dark:disabled:bg-slateDarkA-3 dark:disabled:text-slateDarkA-8",
674
665
  },
@@ -682,7 +673,7 @@ export var toggleAppearanceStyle = function (type, color, isClickable, stateOn)
682
673
  },
683
674
  dark: {
684
675
  default: "dark:bg-".concat(darkColor, "A-2 dark:border-").concat(darkColor, "A-7 dark:text-").concat(darkColor, "A-11"),
685
- hover: "dark:hover:bg-".concat(darkColor, "A-2 dark:hover:border-").concat(darkColor, "A-8 dark:hover:text-").concat(darkColor, "A-11 ").concat(stateOn, "dark:hover:bg-").concat(darkColor, "A-2 ").concat(stateOn, "dark:hover:border-").concat(darkColor, "A-8 ").concat(stateOn, "dark:hover:text-").concat(darkColor, "A-11"),
676
+ hover: "dark:hover:bg-".concat(darkColor, "A-2 dark:hover:border-").concat(darkColor, "A-8 dark:hover:text-").concat(darkColor, "A-11 dark:").concat(stateOn, "hover:bg-").concat(darkColor, "A-2 dark:").concat(stateOn, "hover:border-").concat(darkColor, "A-8 dark:").concat(stateOn, "hover:text-").concat(darkColor, "A-11"),
686
677
  active: "dark:".concat(stateOn, "bg-").concat(darkColor, "A-3 dark:").concat(stateOn, "border-").concat(darkColor, "A-8 dark:").concat(stateOn, "text-").concat(darkColor, "A-11 dark:").concat(stateOn, "opacity-[.92]"),
687
678
  disable: "dark:disabled:bg-slateDarkA-2 dark:disabled:border-slateDarkA-6 dark:disabled:text-slateDarkA-8",
688
679
  },
@@ -696,7 +687,7 @@ export var toggleAppearanceStyle = function (type, color, isClickable, stateOn)
696
687
  },
697
688
  dark: {
698
689
  default: "dark:border-".concat(darkColor, "A-8 dark:text-").concat(darkColor, "A-11"),
699
- hover: "dark:hover:bg-".concat(darkColor, "A-2 dark:hover:border-").concat(darkColor, "A-8 dark:hover:text-").concat(darkColor, "A-11 ").concat(stateOn, "dark:hover:bg-").concat(darkColor, "A-2 ").concat(stateOn, "dark:hover:border-").concat(darkColor, "A-8 ").concat(stateOn, "dark:hover:text-").concat(darkColor, "A-11"),
690
+ hover: "dark:hover:bg-".concat(darkColor, "A-2 dark:hover:border-").concat(darkColor, "A-8 dark:hover:text-").concat(darkColor, "A-11 dark:").concat(stateOn, "hover:bg-").concat(darkColor, "A-2 dark:").concat(stateOn, "hover:border-").concat(darkColor, "A-8 dark:").concat(stateOn, "hover:text-").concat(darkColor, "A-11"),
700
691
  active: "dark:".concat(stateOn, "bg-").concat(darkColor, "A-3 dark:").concat(stateOn, "border-").concat(darkColor, "A-8 dark:").concat(stateOn, "text-").concat(darkColor, "A-11 dark:").concat(stateOn, "opacity-[.92]"),
701
692
  disable: "dark:disabled:border-slateDarkA-7 dark:disabled:text-slateDarkA-8",
702
693
  },
@@ -710,7 +701,7 @@ export var toggleAppearanceStyle = function (type, color, isClickable, stateOn)
710
701
  },
711
702
  dark: {
712
703
  default: "dark:bg-transparent dark:text-".concat(darkColor, "A-11"),
713
- hover: "dark:hover:bg-".concat(darkColor, "A-3 dark:hover:text-").concat(darkColor, "A-11 ").concat(stateOn, "dark:hover:bg-").concat(darkColor, "A-3 ").concat(stateOn, "dark:hover:text-").concat(darkColor, "A-11"),
704
+ hover: "dark:hover:bg-".concat(darkColor, "A-3 dark:hover:text-").concat(darkColor, "A-11 dark:").concat(stateOn, "hover:bg-").concat(darkColor, "A-3 dark:").concat(stateOn, "hover:text-").concat(darkColor, "A-11"),
714
705
  active: "dark:".concat(stateOn, "bg-").concat(darkColor, "A-4 dark:").concat(stateOn, "text-").concat(darkColor, "A-11 dark:").concat(stateOn, "opacity-[.92]"),
715
706
  disable: "dark:disabled:text-slateDarkA-8",
716
707
  },
@@ -748,21 +739,6 @@ export var menuItemAppearanceStyle = function (type, color) {
748
739
  }
749
740
  return appearanceStyle;
750
741
  };
751
- export var switchCheckedApperanceStyle = function (type, color) {
752
- var softStyle = "data-[state=checked]:bg-".concat(color, "A-3 data-[state=unchecked]:bg-").concat(color, "A-2 ");
753
- var surfaceStyle = "data-[state=checked]:bg-".concat(color, "A-2 border border-solid border-").concat(color, "A-7 data-[state=unchecked]:bg-slateA-2 data-[state=unchecked]:bg-slateA-6 ");
754
- var classicStyle = "data-[state=checked]:bg-".concat(color, "-9 text-white border border-solid border-").concat(color, "-9 shadow-custom-1 shadow-custom-2 shadow-custom-3 data-[state=unchecked]:border-slate-4 data-[state=unchecked]:bg-slateA-3 data-[state=unchecked]:text-slateA-8");
755
- switch (type) {
756
- case 'classic':
757
- return classicStyle;
758
- case 'soft':
759
- return softStyle;
760
- case 'surface':
761
- return surfaceStyle;
762
- default:
763
- return '';
764
- }
765
- };
766
742
  export var checkboxAppearanceStyle = function (type, color, indeterminate) {
767
743
  var darkColor = "".concat(color, "Dark");
768
744
  var surface = {
@@ -1,2 +1,2 @@
1
- import{ColorStyle as a,DarkColorStyle as e}from"./color/constants.mjs";var t={small:{none:"rounded-none",small:"rounded-[3px]",medium:"rounded",large:"rounded",full:"rounded"},base:{none:"rounded-none",small:"rounded-[3px]",medium:"rounded",large:"rounded-md",full:"rounded-full"},large:{none:"rounded-none",small:"rounded",medium:"rounded-lg",large:"rounded-xl",full:"rounded-2xl"},"extra-large":{none:"rounded-none",small:"rounded",medium:"rounded-lg",large:"rounded-xl",full:"rounded-xl"},"menu-item":{none:"rounded-none",small:"rounded-[1px]",medium:"rounded-sm",large:"rounded",full:"rounded"}},c={regular:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},r={"90%":"scale-90","95%":"scale-95","100%":"scale-100","105%":"scale-105","110%":"scale-110"},d=["sky","mint","lime","yellow","amber","orange","white"],o=function(){var t={};for(var c in a){var r="".concat(c,"Dark");t[c]=d.includes(c)?"bg-".concat(a[c]," text-slate-12 dark:bg-").concat(e[r]," dark:text-slateDark-12"):"bg-".concat(a[c]," text-white dark:bg-").concat(e[r]," dark:text-slateDark-1")}return t},n=function(){var t={};for(var c in a){var r="".concat(c,"Dark");t[c]="bg-".concat(a[c]," dark:bg-").concat(e[r])}return t},b=function(){var t={};for(var c in a){var r="".concat(c,"Dark");t[c]="text-".concat(a[c]," dark:text-").concat(e[r])}return t},s=function(a,e){var t="";return t+="".concat(a.light.default," ").concat(a.dark.default),e&&(t+=" ".concat(a.light.hover," ").concat(a.light.active," ").concat(a.light.disable," ").concat(a.dark.hover," ").concat(a.dark.active," ").concat(a.dark.disable)),t},l=function(a,e,t){void 0===t&&(t=!0);var c="".concat(e,"Dark"),r={light:{default:"bg-".concat(e,"-9 border border-solid border-").concat(e,"-9 shadow-button-classic"),hover:"hover:bg-".concat(e,"-10 hover:border-").concat(e,"-9"),active:"active:bg-".concat(e,"-9 active:border-").concat(e,"-9"),disable:"disabled:bg-slateA-3 disabled:border-slate-4 disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(c,"-9 dark:border-").concat(c,"-9 dark:shadow-button-dark-classic"),hover:"dark:hover:bg-".concat(c,"-10 dark:hover:border-").concat(c,"-9"),active:"dark:active:bg-".concat(c,"-9 dark:active:border-").concat(c,"-9"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:border-slateDark-4 dark:disabled:text-slateDarkA-8"}},d={light:{default:"bg-".concat(e,"-9 border-none"),hover:"hover:bg-".concat(e,"-10 hover:border-none"),active:"active:bg-".concat(e,"-10 active:border-none active:opacity-[.92]"),disable:"disabled:bg-slateA-3 disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(c,"-9"),hover:"dark:hover:bg-".concat(c,"-10"),active:"dark:active:bg-".concat(c,"-10 dark:active:opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:text-slateDarkA-8"}},o={light:{default:"bg-".concat(e,"A-3 border-none text-").concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-4 hover:border-none hover:text-").concat(e,"A-11"),active:"active:bg-".concat(e,"A-5 active:border-none active:text-").concat(e,"A-11 active:opacity-[.92]"),disable:"disabled:bg-slateA-3 disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(c,"A-3 dark:text-").concat(c,"A-11"),hover:"dark:hover:bg-".concat(c,"A-4 dark:hover:text-").concat(c,"A-11"),active:"dark:active:bg-".concat(c,"A-5 dark:active:text-").concat(c,"A-11 dark:active:opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:text-slateDarkA-8"}},n={light:{default:"bg-".concat(e,"A-2 border border-solid border-").concat(e,"A-7 text-").concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-2 hover:border-").concat(e,"A-8 hover:text-").concat(e,"A-11"),active:"active:bg-".concat(e,"A-3 active:border-").concat(e,"A-8 active:text-").concat(e,"A-11 active:opacity-[.92]"),disable:"disabled:bg-slateA-2 disabled:border-slateA-6 disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(c,"A-2 dark:border-").concat(c,"A-7 dark:text-").concat(c,"A-11"),hover:"dark:hover:bg-".concat(c,"A-2 dark:hover:border-").concat(c,"A-8 dark:hover:text-").concat(c,"A-11"),active:"dark:active:bg-".concat(c,"A-3 dark:active:border-").concat(c,"A-8 dark:active:text-").concat(c,"A-11 dark:active:opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-2 dark:disabled:border-slateDarkA-6 dark:disabled:text-slateDarkA-8"}},b={light:{default:"bg-transparent border border-solid border-".concat(e,"A-8 text-").concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-2 hover:border-").concat(e,"A-8 hover:text-").concat(e,"A-11"),active:"active:bg-".concat(e,"A-3 active:border-").concat(e,"A-8 active:text-").concat(e,"A-11"),disable:"disabled:bg-transparent disabled:border-slateA-7 disabled:text-slateA-8"},dark:{default:"dark:border-".concat(c,"A-8 dark:bg-transparent dark:text-").concat(c,"A-11"),hover:"dark:hover:bg-".concat(c,"A-2 dark:hover:border-").concat(c,"A-8 dark:hover:text-").concat(c,"A-11"),active:"dark:active:bg-".concat(c,"A-3 dark:active:border-").concat(c,"A-8 dark:active:text-").concat(c,"A-11 dark:active:opacity-[.92]"),disable:"dark:disabled:border-slateDarkA-7 dark:disabled:bg-transparent dark:disabled:text-slateDarkA-8 "}},l={light:{default:"bg-transparent border-none text-".concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-3 hover:border-none hover:text-").concat(e,"A-11"),active:"active:bg-".concat(e,"A-4 active:border-none active:text-").concat(e,"A-11 active:opacity-[.92]"),disable:"disabled:bg-transparent disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-transparent dark:text-".concat(c,"A-11"),hover:"dark:hover:bg-".concat(c,"A-3 dark:hover:text-").concat(c,"A-11"),active:"dark:active:bg-".concat(c,"A-4 dark:active:text-").concat(c,"A-11 dark:active:opacity-[.92]"),disable:"dark:disabled:text-slateDarkA-8"}};switch(a){case"classic":return s(r,t);case"solid":return s(d,t);case"soft":return s(o,t);case"surface":return s(n,t);case"outline":return s(b,t);case"ghost":return s(l,t);default:return""}},k=function(a,e,t,c){void 0===t&&(t=!0),void 0===c&&(c="");var r="".concat(e,"Dark"),d={light:{default:"bg-".concat(e,"-9 border border-solid border-").concat(e,"-9 text-white shadow-button-classic"),hover:"hover:bg-".concat(e,"-10 hover:border-").concat(e,"-9 hover:text-white ").concat(c,"hover:bg-").concat(e,"-10 ").concat(c,"hover:border-").concat(e,"-9 ").concat(c,"hover:text-white"),active:"".concat(c,"bg-").concat(e,"-9 ").concat(c,"border-").concat(e,"-9 ").concat(c,"text-white"),disable:"disabled:bg-slateA-3 disabled:border-slate-4 disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(r,"-9 dark:border-").concat(r,"-9 dark:text-slateDark-1"),hover:"dark:hover:bg-".concat(r,"-10 dark:hover:border-").concat(r,"-9 dark:hover:text-slateDark-1 ").concat(c,"dark:hover:bg-").concat(r,"-10 ").concat(c,"dark:hover:border-").concat(r,"-9 ").concat(c,"dark:hover:text-slateDark-1"),active:"dark:".concat(c,"bg-").concat(r,"-9 dark:").concat(c,"border-").concat(r,"-9 dark:").concat(c,"text-slateDark-1"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:border-slateDark-4 dark:disabled:text-slateDarkA-8"}},o={light:{default:"bg-".concat(e,"-9 border-none text-white"),hover:"hover:bg-".concat(e,"-10 hover:border-none hover:text-white ").concat(c,"hover:bg-").concat(e,"-10 ").concat(c,"hover:border-none ").concat(c,"hover:text-white"),active:"".concat(c,"bg-").concat(e,"-10 ").concat(c,"border-none ").concat(c,"text-white ").concat(c,"opacity-[.92]"),disable:"disabled:bg-slateA-3 disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(r,"-9 dark:text-slateDark-1"),hover:"dark:hover:bg-".concat(r,"-10 dark:hover:text-slateDark-1 ").concat(c,"dark:hover:bg-").concat(r,"-10 ").concat(c,"dark:hover:text-slateDark-1"),active:"dark:".concat(c,"bg-").concat(r,"-10 dark:").concat(c,"text-slateDark-1 dark:").concat(c,"opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-3 disabled:text-slateDarkA-8"}},n={light:{default:"bg-".concat(e,"A-3 border-none text-").concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-4 hover:border-none hover:text-").concat(e,"A-11 ").concat(c,"hover:bg-").concat(e,"A-4 ").concat(c,"hover:border-none ").concat(c,"hover:text-").concat(e,"A-11"),active:"".concat(c,"bg-").concat(e,"A-5 ").concat(c,"border-none ").concat(c,"text-").concat(e,"A-11 ").concat(c,"opacity-[.92]"),disable:"disabled:bg-slateA-3 disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(r,"A-3 dark:text-").concat(r,"A-11"),hover:"dark:hover:bg-".concat(r,"A-4 dark:hover:text-").concat(r,"A-11 ").concat(c,"dark:hover:bg-").concat(r,"A-4 ").concat(c,"dark:hover:text-").concat(r,"A-11"),active:"dark:".concat(c,"bg-").concat(r,"A-5 dark:").concat(c,"text-").concat(r,"A-11 dark:").concat(c,"opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:text-slateDarkA-8"}},b={light:{default:"bg-".concat(e,"A-2 border border-solid border-").concat(e,"A-7 text-").concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-2 hover:border-").concat(e,"A-8 hover:text-").concat(e,"A-11 ").concat(c,"hover:bg-").concat(e,"A-2 ").concat(c,"hover:border-").concat(e,"A-8 ").concat(c,"hover:text-").concat(e,"A-11"),active:"".concat(c,"bg-").concat(e,"A-3 ").concat(c,"border-").concat(e,"A-8 ").concat(c,"text-").concat(e,"A-11 ").concat(c,"opacity-[.92]"),disable:"disabled:bg-slatDarkeA-2 disabled:border-slateDarkA-6 disabled:text-slateDarkA-8"},dark:{default:"dark:bg-".concat(r,"A-2 dark:border-").concat(r,"A-7 dark:text-").concat(r,"A-11"),hover:"dark:hover:bg-".concat(r,"A-2 dark:hover:border-").concat(r,"A-8 dark:hover:text-").concat(r,"A-11 ").concat(c,"dark:hover:bg-").concat(r,"A-2 ").concat(c,"dark:hover:border-").concat(r,"A-8 ").concat(c,"dark:hover:text-").concat(r,"A-11"),active:"dark:".concat(c,"bg-").concat(r,"A-3 dark:").concat(c,"border-").concat(r,"A-8 dark:").concat(c,"text-").concat(r,"A-11 dark:").concat(c,"opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-2 dark:disabled:border-slateDarkA-6 dark:disabled:text-slateDarkA-8"}},l={light:{default:"bg-transparent border border-solid border-".concat(e,"A-8 text-").concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-2 hover:border-").concat(e,"A-8 hover:text-").concat(e,"A-11 ").concat(c,"hover:bg-").concat(e,"A-2 ").concat(c,"hover:border-").concat(e,"A-8 ").concat(c,"hover:text-").concat(e,"A-11"),active:"".concat(c,"bg-").concat(e,"A-3 ").concat(c,"border-").concat(e,"A-8 ").concat(c,"text-").concat(e,"A-11"),disable:"disabled:bg-transparent disabled:border-slateA-7 disabled:text-slateA-8"},dark:{default:"dark:border-".concat(r,"A-8 dark:text-").concat(r,"A-11"),hover:"dark:hover:bg-".concat(r,"A-2 dark:hover:border-").concat(r,"A-8 dark:hover:text-").concat(r,"A-11 ").concat(c,"dark:hover:bg-").concat(r,"A-2 ").concat(c,"dark:hover:border-").concat(r,"A-8 ").concat(c,"dark:hover:text-").concat(r,"A-11"),active:"dark:".concat(c,"bg-").concat(r,"A-3 dark:").concat(c,"border-").concat(r,"A-8 dark:").concat(c,"text-").concat(r,"A-11 dark:").concat(c,"opacity-[.92]"),disable:"dark:disabled:border-slateDarkA-7 dark:disabled:text-slateDarkA-8"}},k={light:{default:"bg-transparent border-none text-".concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-3 hover:border-none hover:text-").concat(e,"A-11 ").concat(c,"hover:bg-").concat(e,"A-3 ").concat(c,"hover:border-none ").concat(c,"hover:text-").concat(e,"A-11"),active:"".concat(c,"bg-").concat(e,"A-4 ").concat(c,"border-none ").concat(c,"text-").concat(e,"A-11 ").concat(c,"opacity-[.92]"),disable:"disabled:bg-transparent disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-transparent dark:text-".concat(r,"A-11"),hover:"dark:hover:bg-".concat(r,"A-3 dark:hover:text-").concat(r,"A-11 ").concat(c,"dark:hover:bg-").concat(r,"A-3 ").concat(c,"dark:hover:text-").concat(r,"A-11"),active:"dark:".concat(c,"bg-").concat(r,"A-4 dark:").concat(c,"text-").concat(r,"A-11 dark:").concat(c,"opacity-[.92]"),disable:"dark:disabled:text-slateDarkA-8"}};switch(a){case"classic":return s(d,t);case"solid":return s(o,t);case"soft":return s(n,t);case"surface":return s(b,t);case"outline":return s(l,t);case"ghost":return s(k,t);default:return""}},i=function(a,e){var t="";return"solid"===a&&(t="hover:bg-".concat(e,"-9 dark:hover:bg-").concat(e,"Dark-9 "),t+=d.includes(e)?"hover:text-slateA-11 dark:hover:text-white":"hover:text-white dark:hover:text-white"),"soft"===a&&(t="hover:bg-".concat(e,"A-4 dark:hover-bg-").concat(e,"DarkA-4")),"ghost"===a&&(t="hover:bg-".concat(e,"-3 dark:hover:bg-").concat(e,"Dark-3")),t},v=function(a,e,t){var c="".concat(e,"Dark"),r={light:{default:"border data-[state=unchecked]:bg-transparent data-[state=unchecked]:border-slateA-7\n data-[state=checked]:bg-".concat(e,"-9 data-[state=checked]:border-none data-[state=checked]:text-slate-1"),hover:"hover:data-[state=unchecked]:bg-transparent hover:data-[state=unchecked]:border-slateA-8\n hover:data-[state=checked]:bg-".concat(e,"-10 hover:data-[state=checked]:border-none hover:data-[state=checked]:text-white"),active:"active:data-[state=unchecked]:bg-transparent active:data-[state=unchecked]:border-slateA-9\n active:data-[state=checked]:bg-".concat(e,"-10 active:data-[state=checked]:border-none active:data-[state=checked]:text-white"),disable:"disabled:data-[state=unchecked]:bg-slateA-3 disabled:data-[state=unchecked]:border-slateA-6\n disabled:data-[state=checked]:bg-slateA-3 disabled:data-[state=checked]:border-slateA-6 disabled:data-[state=checked]:text-slateA-8"},dark:{default:"dark:data-[state=unchecked]:border-slateDarkA-7\n dark:data-[state=checked]:bg-".concat(c,"-9 dark:data-[state=checked]:text-#111113"),hover:"dark:hover:data-[state=unchecked]:border-slateDarkA-8\n dark:hover:data-[state=checked]:bg-".concat(c,"-10 dark:hover:data-[state=checked]:text-#111113"),active:"dark:active:data-[state=unchecked]:border-slateDarkA-9\n dark:active:data-[state=checked]:bg-".concat(c,"-10 dark:active:data-[state=checked]:text-#111113"),disable:"dark:disabled:data-[state=unchecked]:bg-slateDarkA-3 dark:disabled:data-[state=unchecked]:border-slateDarkA-6\n dark:disabled:data-[state=checked]:bg-slateDarkA-3 dark:disabled:data-[state=checked]:border-slateDarkA-6 dark:disabled:data-[state=checked]:text-slateDarkA-8"}},d={light:{default:"data-[state=unchecked]:bg-".concat(e,"A-5 data-[state=unchecked]:border-none\n data-[state=checked]:bg-").concat(e,"A-5 data-[state=checked]:border-none data-[state=checked]:text-").concat(e,"-11"),hover:"hover:data-[state=unchecked]:bg-".concat(e,"A-6 hover:data-[state=unchecked]:border-none\n hover:data-[state=checked]:bg-").concat(e,"A-6 hover:data-[state=checked]:border-none hover:data-[state=checked]:text-").concat(e,"-11"),active:"active:data-[state=unchecked]:bg-".concat(e,"A-7 active:data-[state=unchecked]:border-none\n active:data-[state=checked]:bg-").concat(e,"A-7 active:data-[state=checked]:border-none active:data-[state=checked]:text-").concat(e,"-11"),disable:"disabled:data-[state=unchecked]:bg-slateA-3 disabled:data-[state=unchecked]:border-none\n disabled:data-[state=checked]:bg-slateA-3 disabled:data-[state=checked]:border-none disabled:data-[state=checked]:text-slateA-8"},dark:{default:"dark:data-[state=unchecked]:bg-".concat(c,"A-5\n dark:data-[state=checked]:bg-").concat(c,"A-5 dark:data-[state=checked]:text-").concat(c,"-11"),hover:"dark:hover:data-[state=unchecked]:bg-".concat(c,"A-6\n dark:hover:data-[state=checked]:bg-").concat(c,"A-6 dark:hover:data-[state=checked]:text-").concat(c,"-11"),active:"dark:active:data-[state=unchecked]:bg-".concat(c,"A-7\n dark:active:data-[state=checked]:bg-").concat(c,"A-7 dark:active:data-[state=checked]:text-").concat(c,"-11"),disable:"dark:disabled:data-[state=unchecked]:bg-slateDarkA-3\n dark:disabled:data-[state=checked]:bg-slateDarkA-3 dark:disabled:data-[state=checked]:text-slateDarkA-8"}},o={light:{default:"border bg-".concat(e,"A-2 border-").concat(e,"A-7 text-").concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-2 hover:border-").concat(e,"A-8 hover:text-").concat(e,"A-11"),active:"active:bg-".concat(e,"A-3 active:border-").concat(e,"A-8 active:text-").concat(e,"A-11"),disable:"disabled:bg-slateA-3 disabled:border-slateA-6 disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(c,"A-2 dark:border-").concat(c,"A-7 dark:text-").concat(c,"A-11"),hover:"dark:hover:bg-".concat(c,"A-2 dark:hover:border-").concat(c,"A-8 dark:hover:text-").concat(c,"A-11"),active:"dark:active:bg-".concat(c,"A-3 dark:active:border-").concat(c,"A-8 dark:active:text-").concat(c,"A-11"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:border-slateDarkA-6 dark:disabled:text-slateDarkA-8"}},n={light:{default:"border bg-transparent border-".concat(e,"A-6 text-").concat(e,"A-11"),hover:"hover:bg-transparent hover:border-".concat(e,"A-6 hover:text-").concat(e,"A-11"),active:"active:bg-transparent active:border-".concat(e,"A-6 active:text-").concat(e,"A-11"),disable:"disabled:bg-slateA-3 disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:border-".concat(c,"A-6 dark:text-").concat(c,"A-11"),hover:"dark:hover:border-".concat(c,"A-6 dark:hover:text-").concat(c,"A-11"),active:"dark:active:border-".concat(c,"A-6 dark:active:text-").concat(c,"A-11"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:text-slateDarkA-8"}};switch(a){case"classic":return t?s(o,!0):"".concat(s(r,!0)," data-[state=checked]:shadow-checkbox-classic data-[state=unchecked]:shadow-checkbox-classic\n dark:data-[state=checked]:shadow-checkbox-classic dark:data-[state=unchecked]:shadow-checkbox-classic");case"soft":return s(t?n:d,!0);case"surface":return s(t?o:r,!0);default:return s(r,!0)}},h=function(a,e){var t="".concat(e,"Dark"),c={light:{default:"bg-[#FFFFFF] border border-slateA-7 data-placeholder:text-slateA-10 text-slateA-12",hover:"hover:bg-[#FFFFFF] hover:border hover:border-slateA-8 hover:text-slateA-10",active:"active:bg-".concat(e,"A-3 active:border-").concat(e,"A-8 active:text-slateA-10 active:opacity-[.92]"),disable:"disabled:bg-slateA-2 disabled:border-slateA-6 disabled:text-slateA-8"},dark:{default:"dark:bg-[#111113] dark:border dark:data-placeholder:border-slateDarkA-7 dark:data-placeholder:text-slateDarkA-9 dark:border-slateDarkA-7 dark:text-slateDarkA-12",hover:"dark:hover:bg-[#111113] dark:hover:border dark:hover:border-slateDarkA-8 dark:hover:text-slateDarkA-10",active:"dark:active:bg-".concat(t,"A-3 dark:active:border dark:active:border-").concat(t,"A-8 dark:active:text-slateDarkA-10 dark:active:opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-2 dark:disabled:border dark:disabled:border-slateDarkA-6 dark:disabled:text-slateDarkA-8"}},r={light:{default:"bg-".concat(e,"A-3 border-none data-placeholder:text-").concat(e,"A-12/[.5] text-").concat(e,"A-12"),hover:"hover:bg-".concat(e,"A-4 hover:border-none hover:text-").concat(e,"A-12/[.5]"),active:"active:bg-".concat(e,"A-5 active:border-none active:text-").concat(e,"A-12/[.5] active:opacity-[.92]"),disable:"disabled:bg-slateA-3 disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(t,"A-3 dark:border-none dark:data-placeholder:text-").concat(t,"A-12/[.5] dark:text-").concat(t,"A-12 "),hover:"dark:hover:bg-".concat(t,"A-4 dark:hover:border-none dark:hover:text-").concat(t,"A-12/[.5]"),active:"dark:active:bg-".concat(t,"A-5 dark:active:border-none dark:active:text-").concat(t,"A-12/[.5] dark:active:opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:border-none dark:disabled:text-slateDarkA-8"}},d={light:{default:"bg-transparent border-none data-placeholder:text-".concat(e,"A-12/[.5] text-").concat(e,"A-12"),hover:"hover:bg-".concat(e,"A-3 hover:border-none hover:text-").concat(e,"A-1/[.5]"),active:"active:bg-".concat(e,"A-4 active:border-none active:text-").concat(e,"A-12/[.5] active:opacity-[.92]"),disable:"disabled:bg-transparent disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-transparent dark:border-none dark:data-placeholder:text-".concat(t,"A-12/[.5] dark:text-").concat(t,"A-12"),hover:"dark:hover:bg-".concat(t,"A-3 dark:hover:border-none dark:hover:text-").concat(t,"A-12/[.5]"),active:"dark:active:bg-".concat(t,"A-4 dark:active:border-none dark:active:text-").concat(t,"A-12/[.5] dark:active:opacity-[.92]"),disable:"dark:disabled:text-slateDarkA-8 dark:disabled:border-none"}},o=function(a){var e="";return e+="".concat(a.light.default," ").concat(a.dark.default," ").concat(a.light.hover," ").concat(a.light.active," ").concat(a.light.disable," ").concat(a.dark.hover," ").concat(a.dark.active," ").concat(a.dark.disable)};switch(a){case"classic":return o({light:{default:"bg-slateA-2 border border-slate-4 data-placeholder:text-slateA-10 text-slateA-12",hover:"hover:bg-slateA-3 hover:border hover:border-slate-4 hover:text-slateA-10",active:"active:bg-slateA-4 active:border active:border-slate-6 active:text-slateA-10",disable:"disabled:bg-slateA-3 disabled:border disabled:border-slate-4 disabled:text-slateA-8"},dark:{default:"dark:bg-slateDarkA-2 dark:border-slateDark-4 dark:data-placeholder:text-slateDarkA-10 dark:text-slateDarkA-12",hover:"dark:hover:bg-slateDarkA-3 dark:hover:border-slateDark-4 dark:hover:text-slateDarkA-10",active:"dark:active:bg-slateDarkA-4 dark:active:border-slateDark-6 dark:active:text-slateDarkA-10",disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:border-slateDark-4 dark:disabled:text-slateDarkA-8"}});case"soft":return o(r);case"surface":return o(c);case"ghost":return o(d);default:return""}};export{l as appearanceStyle,n as bgColorStyle,d as blackText,v as checkboxAppearanceStyle,i as menuItemAppearanceStyle,o as primaryColorStyle,t as radiusVariants,r as scalingVariants,h as selectAppearanceStyle,b as textColorStyle,k as toggleAppearanceStyle,c as weightVariants};
1
+ import{ColorStyle as a,DarkColorStyle as e}from"./color/constants.mjs";var t={small:{none:"rounded-none",small:"rounded-[3px]",medium:"rounded",large:"rounded",full:"rounded"},base:{none:"rounded-none",small:"rounded-[3px]",medium:"rounded",large:"rounded-md",full:"rounded-full"},large:{none:"rounded-none",small:"rounded",medium:"rounded-lg",large:"rounded-xl",full:"rounded-2xl"},"extra-large":{none:"rounded-none",small:"rounded",medium:"rounded-lg",large:"rounded-xl",full:"rounded-xl"},"menu-item":{none:"rounded-none",small:"rounded-[1px]",medium:"rounded-sm",large:"rounded",full:"rounded"}},c={regular:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},r={"90%":"scale-90","95%":"scale-95","100%":"scale-100","105%":"scale-105","110%":"scale-110"},d=["sky","mint","lime","yellow","amber","orange","white"],o=function(){var t={};for(var c in a){var r="".concat(c,"Dark");t[c]=d.includes(c)?"bg-".concat(a[c]," text-slate-12 dark:bg-").concat(e[r]," dark:text-slateDark-12"):"bg-".concat(a[c]," text-white dark:bg-").concat(e[r]," dark:text-slateDark-1")}return t},n=function(){var t={};for(var c in a){var r="".concat(c,"Dark");t[c]="bg-".concat(a[c]," dark:bg-").concat(e[r])}return t},b=function(){var t={};for(var c in a){var r="".concat(c,"Dark");t[c]="text-".concat(a[c]," dark:text-").concat(e[r])}return t},s=function(a,e){var t="";return t+="".concat(a.light.default," ").concat(a.dark.default),e&&(t+=" ".concat(a.light.hover," ").concat(a.light.active," ").concat(a.light.disable," ").concat(a.dark.hover," ").concat(a.dark.active," ").concat(a.dark.disable)),t},l=function(a,e,t){void 0===t&&(t=!0);var c="".concat(e,"Dark"),r={light:{default:"bg-".concat(e,"-9 border border-solid border-").concat(e,"-9 shadow-button-classic"),hover:"hover:bg-".concat(e,"-10 hover:border-").concat(e,"-9"),active:"active:bg-".concat(e,"-9 active:border-").concat(e,"-9"),disable:"disabled:bg-slateA-3 disabled:border-slate-4 disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(c,"-9 dark:border-").concat(c,"-9 dark:shadow-button-dark-classic"),hover:"dark:hover:bg-".concat(c,"-10 dark:hover:border-").concat(c,"-9"),active:"dark:active:bg-".concat(c,"-9 dark:active:border-").concat(c,"-9"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:border-slateDark-4 dark:disabled:text-slateDarkA-8"}},d={light:{default:"bg-".concat(e,"-9 border-none"),hover:"hover:bg-".concat(e,"-10 hover:border-none"),active:"active:bg-".concat(e,"-10 active:border-none active:opacity-[.92]"),disable:"disabled:bg-slateA-3 disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(c,"-9"),hover:"dark:hover:bg-".concat(c,"-10"),active:"dark:active:bg-".concat(c,"-10 dark:active:opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:text-slateDarkA-8"}},o={light:{default:"bg-".concat(e,"A-3 border-none text-").concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-4 hover:border-none hover:text-").concat(e,"A-11"),active:"active:bg-".concat(e,"A-5 active:border-none active:text-").concat(e,"A-11 active:opacity-[.92]"),disable:"disabled:bg-slateA-3 disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(c,"A-3 dark:text-").concat(c,"A-11"),hover:"dark:hover:bg-".concat(c,"A-4 dark:hover:text-").concat(c,"A-11"),active:"dark:active:bg-".concat(c,"A-5 dark:active:text-").concat(c,"A-11 dark:active:opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:text-slateDarkA-8"}},n={light:{default:"bg-".concat(e,"A-2 border border-solid border-").concat(e,"A-7 text-").concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-2 hover:border-").concat(e,"A-8 hover:text-").concat(e,"A-11"),active:"active:bg-".concat(e,"A-3 active:border-").concat(e,"A-8 active:text-").concat(e,"A-11 active:opacity-[.92]"),disable:"disabled:bg-slateA-2 disabled:border-slateA-6 disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(c,"A-2 dark:border-").concat(c,"A-7 dark:text-").concat(c,"A-11"),hover:"dark:hover:bg-".concat(c,"A-2 dark:hover:border-").concat(c,"A-8 dark:hover:text-").concat(c,"A-11"),active:"dark:active:bg-".concat(c,"A-3 dark:active:border-").concat(c,"A-8 dark:active:text-").concat(c,"A-11 dark:active:opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-2 dark:disabled:border-slateDarkA-6 dark:disabled:text-slateDarkA-8"}},b={light:{default:"bg-transparent border border-solid border-".concat(e,"A-8 text-").concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-2 hover:border-").concat(e,"A-8 hover:text-").concat(e,"A-11"),active:"active:bg-".concat(e,"A-3 active:border-").concat(e,"A-8 active:text-").concat(e,"A-11"),disable:"disabled:bg-transparent disabled:border-slateA-7 disabled:text-slateA-8"},dark:{default:"dark:border-".concat(c,"A-8 dark:bg-transparent dark:text-").concat(c,"A-11"),hover:"dark:hover:bg-".concat(c,"A-2 dark:hover:border-").concat(c,"A-8 dark:hover:text-").concat(c,"A-11"),active:"dark:active:bg-".concat(c,"A-3 dark:active:border-").concat(c,"A-8 dark:active:text-").concat(c,"A-11 dark:active:opacity-[.92]"),disable:"dark:disabled:border-slateDarkA-7 dark:disabled:bg-transparent dark:disabled:text-slateDarkA-8 "}},l={light:{default:"bg-transparent border-none text-".concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-3 hover:border-none hover:text-").concat(e,"A-11"),active:"active:bg-".concat(e,"A-4 active:border-none active:text-").concat(e,"A-11 active:opacity-[.92]"),disable:"disabled:bg-transparent disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-transparent dark:text-".concat(c,"A-11"),hover:"dark:hover:bg-".concat(c,"A-3 dark:hover:text-").concat(c,"A-11"),active:"dark:active:bg-".concat(c,"A-4 dark:active:text-").concat(c,"A-11 dark:active:opacity-[.92]"),disable:"dark:disabled:text-slateDarkA-8"}};switch(a){case"classic":return s(r,t);case"solid":return s(d,t);case"soft":return s(o,t);case"surface":return s(n,t);case"outline":return s(b,t);case"ghost":return s(l,t);default:return""}},k=function(a,e,t,c){void 0===t&&(t=!0),void 0===c&&(c="");var r="".concat(e,"Dark"),d={light:{default:"bg-".concat(e,"-9 border border-solid border-").concat(e,"-9 text-white shadow-button-classic"),hover:"hover:bg-".concat(e,"-10 hover:border-").concat(e,"-9 hover:text-white ").concat(c,"hover:bg-").concat(e,"-10 ").concat(c,"hover:border-").concat(e,"-9 ").concat(c,"hover:text-white"),active:"".concat(c,"bg-").concat(e,"-9 ").concat(c,"border-").concat(e,"-9 ").concat(c,"text-white"),disable:"disabled:bg-slateA-3 disabled:border-slate-4 disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(r,"-9 dark:border-").concat(r,"-9 dark:text-slateDark-1"),hover:"dark:hover:bg-".concat(r,"-10 dark:hover:border-").concat(r,"-9 dark:hover:text-slateDark-1 dark:").concat(c,"hover:bg-").concat(r,"-10 dark:").concat(c,"hover:border-").concat(r,"-9 dark:").concat(c,"hover:text-slateDark-1"),active:"dark:".concat(c,"bg-").concat(r,"-9 dark:").concat(c,"border-").concat(r,"-9 dark:").concat(c,"text-slateDark-1"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:border-slateDark-4 dark:disabled:text-slateDarkA-8"}},o={light:{default:"bg-".concat(e,"-9 border-none text-white"),hover:"hover:bg-".concat(e,"-10 hover:border-none hover:text-white ").concat(c,"hover:bg-").concat(e,"-10 ").concat(c,"hover:border-none ").concat(c,"hover:text-white"),active:"".concat(c,"bg-").concat(e,"-10 ").concat(c,"border-none ").concat(c,"text-white ").concat(c,"opacity-[.92]"),disable:"disabled:bg-slateA-3 disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(r,"-9 dark:text-slateDark-1"),hover:"dark:hover:bg-".concat(r,"-10 dark:hover:text-slateDark-1 dark:").concat(c,"hover:bg-").concat(r,"-10 dark:").concat(c,"hover:text-slateDark-1"),active:"dark:".concat(c,"bg-").concat(r,"-10 dark:").concat(c,"text-slateDark-1 dark:").concat(c,"opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-3 disabled:text-slateDarkA-8"}},n={light:{default:"bg-".concat(e,"A-3 border-none text-").concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-4 hover:border-none hover:text-").concat(e,"A-11 ").concat(c,"hover:bg-").concat(e,"A-4 ").concat(c,"hover:border-none ").concat(c,"hover:text-").concat(e,"A-11"),active:"".concat(c,"bg-").concat(e,"A-5 ").concat(c,"border-none ").concat(c,"text-").concat(e,"A-11 ").concat(c,"opacity-[.92]"),disable:"disabled:bg-slateA-3 disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(r,"A-3 dark:text-").concat(r,"A-11"),hover:"dark:hover:bg-".concat(r,"A-4 dark:hover:text-").concat(r,"A-11 dark:").concat(c,"hover:bg-").concat(r,"A-4 dark:").concat(c,"hover:text-").concat(r,"A-11"),active:"dark:".concat(c,"bg-").concat(r,"A-5 dark:").concat(c,"text-").concat(r,"A-11 dark:").concat(c,"opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:text-slateDarkA-8"}},b={light:{default:"bg-".concat(e,"A-2 border border-solid border-").concat(e,"A-7 text-").concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-2 hover:border-").concat(e,"A-8 hover:text-").concat(e,"A-11 ").concat(c,"hover:bg-").concat(e,"A-2 ").concat(c,"hover:border-").concat(e,"A-8 ").concat(c,"hover:text-").concat(e,"A-11"),active:"".concat(c,"bg-").concat(e,"A-3 ").concat(c,"border-").concat(e,"A-8 ").concat(c,"text-").concat(e,"A-11 ").concat(c,"opacity-[.92]"),disable:"disabled:bg-slatDarkeA-2 disabled:border-slateDarkA-6 disabled:text-slateDarkA-8"},dark:{default:"dark:bg-".concat(r,"A-2 dark:border-").concat(r,"A-7 dark:text-").concat(r,"A-11"),hover:"dark:hover:bg-".concat(r,"A-2 dark:hover:border-").concat(r,"A-8 dark:hover:text-").concat(r,"A-11 dark:").concat(c,"hover:bg-").concat(r,"A-2 dark:").concat(c,"hover:border-").concat(r,"A-8 dark:").concat(c,"hover:text-").concat(r,"A-11"),active:"dark:".concat(c,"bg-").concat(r,"A-3 dark:").concat(c,"border-").concat(r,"A-8 dark:").concat(c,"text-").concat(r,"A-11 dark:").concat(c,"opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-2 dark:disabled:border-slateDarkA-6 dark:disabled:text-slateDarkA-8"}},l={light:{default:"bg-transparent border border-solid border-".concat(e,"A-8 text-").concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-2 hover:border-").concat(e,"A-8 hover:text-").concat(e,"A-11 ").concat(c,"hover:bg-").concat(e,"A-2 ").concat(c,"hover:border-").concat(e,"A-8 ").concat(c,"hover:text-").concat(e,"A-11"),active:"".concat(c,"bg-").concat(e,"A-3 ").concat(c,"border-").concat(e,"A-8 ").concat(c,"text-").concat(e,"A-11"),disable:"disabled:bg-transparent disabled:border-slateA-7 disabled:text-slateA-8"},dark:{default:"dark:border-".concat(r,"A-8 dark:text-").concat(r,"A-11"),hover:"dark:hover:bg-".concat(r,"A-2 dark:hover:border-").concat(r,"A-8 dark:hover:text-").concat(r,"A-11 dark:").concat(c,"hover:bg-").concat(r,"A-2 dark:").concat(c,"hover:border-").concat(r,"A-8 dark:").concat(c,"hover:text-").concat(r,"A-11"),active:"dark:".concat(c,"bg-").concat(r,"A-3 dark:").concat(c,"border-").concat(r,"A-8 dark:").concat(c,"text-").concat(r,"A-11 dark:").concat(c,"opacity-[.92]"),disable:"dark:disabled:border-slateDarkA-7 dark:disabled:text-slateDarkA-8"}},k={light:{default:"bg-transparent border-none text-".concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-3 hover:border-none hover:text-").concat(e,"A-11 ").concat(c,"hover:bg-").concat(e,"A-3 ").concat(c,"hover:border-none ").concat(c,"hover:text-").concat(e,"A-11"),active:"".concat(c,"bg-").concat(e,"A-4 ").concat(c,"border-none ").concat(c,"text-").concat(e,"A-11 ").concat(c,"opacity-[.92]"),disable:"disabled:bg-transparent disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-transparent dark:text-".concat(r,"A-11"),hover:"dark:hover:bg-".concat(r,"A-3 dark:hover:text-").concat(r,"A-11 dark:").concat(c,"hover:bg-").concat(r,"A-3 dark:").concat(c,"hover:text-").concat(r,"A-11"),active:"dark:".concat(c,"bg-").concat(r,"A-4 dark:").concat(c,"text-").concat(r,"A-11 dark:").concat(c,"opacity-[.92]"),disable:"dark:disabled:text-slateDarkA-8"}};switch(a){case"classic":return s(d,t);case"solid":return s(o,t);case"soft":return s(n,t);case"surface":return s(b,t);case"outline":return s(l,t);case"ghost":return s(k,t);default:return""}},i=function(a,e){var t="";return"solid"===a&&(t="hover:bg-".concat(e,"-9 dark:hover:bg-").concat(e,"Dark-9 "),t+=d.includes(e)?"hover:text-slateA-11 dark:hover:text-white":"hover:text-white dark:hover:text-white"),"soft"===a&&(t="hover:bg-".concat(e,"A-4 dark:hover-bg-").concat(e,"DarkA-4")),"ghost"===a&&(t="hover:bg-".concat(e,"-3 dark:hover:bg-").concat(e,"Dark-3")),t},v=function(a,e,t){var c="".concat(e,"Dark"),r={light:{default:"border data-[state=unchecked]:bg-transparent data-[state=unchecked]:border-slateA-7\n data-[state=checked]:bg-".concat(e,"-9 data-[state=checked]:border-none data-[state=checked]:text-slate-1"),hover:"hover:data-[state=unchecked]:bg-transparent hover:data-[state=unchecked]:border-slateA-8\n hover:data-[state=checked]:bg-".concat(e,"-10 hover:data-[state=checked]:border-none hover:data-[state=checked]:text-white"),active:"active:data-[state=unchecked]:bg-transparent active:data-[state=unchecked]:border-slateA-9\n active:data-[state=checked]:bg-".concat(e,"-10 active:data-[state=checked]:border-none active:data-[state=checked]:text-white"),disable:"disabled:data-[state=unchecked]:bg-slateA-3 disabled:data-[state=unchecked]:border-slateA-6\n disabled:data-[state=checked]:bg-slateA-3 disabled:data-[state=checked]:border-slateA-6 disabled:data-[state=checked]:text-slateA-8"},dark:{default:"dark:data-[state=unchecked]:border-slateDarkA-7\n dark:data-[state=checked]:bg-".concat(c,"-9 dark:data-[state=checked]:text-#111113"),hover:"dark:hover:data-[state=unchecked]:border-slateDarkA-8\n dark:hover:data-[state=checked]:bg-".concat(c,"-10 dark:hover:data-[state=checked]:text-#111113"),active:"dark:active:data-[state=unchecked]:border-slateDarkA-9\n dark:active:data-[state=checked]:bg-".concat(c,"-10 dark:active:data-[state=checked]:text-#111113"),disable:"dark:disabled:data-[state=unchecked]:bg-slateDarkA-3 dark:disabled:data-[state=unchecked]:border-slateDarkA-6\n dark:disabled:data-[state=checked]:bg-slateDarkA-3 dark:disabled:data-[state=checked]:border-slateDarkA-6 dark:disabled:data-[state=checked]:text-slateDarkA-8"}},d={light:{default:"data-[state=unchecked]:bg-".concat(e,"A-5 data-[state=unchecked]:border-none\n data-[state=checked]:bg-").concat(e,"A-5 data-[state=checked]:border-none data-[state=checked]:text-").concat(e,"-11"),hover:"hover:data-[state=unchecked]:bg-".concat(e,"A-6 hover:data-[state=unchecked]:border-none\n hover:data-[state=checked]:bg-").concat(e,"A-6 hover:data-[state=checked]:border-none hover:data-[state=checked]:text-").concat(e,"-11"),active:"active:data-[state=unchecked]:bg-".concat(e,"A-7 active:data-[state=unchecked]:border-none\n active:data-[state=checked]:bg-").concat(e,"A-7 active:data-[state=checked]:border-none active:data-[state=checked]:text-").concat(e,"-11"),disable:"disabled:data-[state=unchecked]:bg-slateA-3 disabled:data-[state=unchecked]:border-none\n disabled:data-[state=checked]:bg-slateA-3 disabled:data-[state=checked]:border-none disabled:data-[state=checked]:text-slateA-8"},dark:{default:"dark:data-[state=unchecked]:bg-".concat(c,"A-5\n dark:data-[state=checked]:bg-").concat(c,"A-5 dark:data-[state=checked]:text-").concat(c,"-11"),hover:"dark:hover:data-[state=unchecked]:bg-".concat(c,"A-6\n dark:hover:data-[state=checked]:bg-").concat(c,"A-6 dark:hover:data-[state=checked]:text-").concat(c,"-11"),active:"dark:active:data-[state=unchecked]:bg-".concat(c,"A-7\n dark:active:data-[state=checked]:bg-").concat(c,"A-7 dark:active:data-[state=checked]:text-").concat(c,"-11"),disable:"dark:disabled:data-[state=unchecked]:bg-slateDarkA-3\n dark:disabled:data-[state=checked]:bg-slateDarkA-3 dark:disabled:data-[state=checked]:text-slateDarkA-8"}},o={light:{default:"border bg-".concat(e,"A-2 border-").concat(e,"A-7 text-").concat(e,"A-11"),hover:"hover:bg-".concat(e,"A-2 hover:border-").concat(e,"A-8 hover:text-").concat(e,"A-11"),active:"active:bg-".concat(e,"A-3 active:border-").concat(e,"A-8 active:text-").concat(e,"A-11"),disable:"disabled:bg-slateA-3 disabled:border-slateA-6 disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(c,"A-2 dark:border-").concat(c,"A-7 dark:text-").concat(c,"A-11"),hover:"dark:hover:bg-".concat(c,"A-2 dark:hover:border-").concat(c,"A-8 dark:hover:text-").concat(c,"A-11"),active:"dark:active:bg-".concat(c,"A-3 dark:active:border-").concat(c,"A-8 dark:active:text-").concat(c,"A-11"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:border-slateDarkA-6 dark:disabled:text-slateDarkA-8"}},n={light:{default:"border bg-transparent border-".concat(e,"A-6 text-").concat(e,"A-11"),hover:"hover:bg-transparent hover:border-".concat(e,"A-6 hover:text-").concat(e,"A-11"),active:"active:bg-transparent active:border-".concat(e,"A-6 active:text-").concat(e,"A-11"),disable:"disabled:bg-slateA-3 disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:border-".concat(c,"A-6 dark:text-").concat(c,"A-11"),hover:"dark:hover:border-".concat(c,"A-6 dark:hover:text-").concat(c,"A-11"),active:"dark:active:border-".concat(c,"A-6 dark:active:text-").concat(c,"A-11"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:text-slateDarkA-8"}};switch(a){case"classic":return t?s(o,!0):"".concat(s(r,!0)," data-[state=checked]:shadow-checkbox-classic data-[state=unchecked]:shadow-checkbox-classic\n dark:data-[state=checked]:shadow-checkbox-classic dark:data-[state=unchecked]:shadow-checkbox-classic");case"soft":return s(t?n:d,!0);case"surface":return s(t?o:r,!0);default:return s(r,!0)}},h=function(a,e){var t="".concat(e,"Dark"),c={light:{default:"bg-[#FFFFFF] border border-slateA-7 data-placeholder:text-slateA-10 text-slateA-12",hover:"hover:bg-[#FFFFFF] hover:border hover:border-slateA-8 hover:text-slateA-10",active:"active:bg-".concat(e,"A-3 active:border-").concat(e,"A-8 active:text-slateA-10 active:opacity-[.92]"),disable:"disabled:bg-slateA-2 disabled:border-slateA-6 disabled:text-slateA-8"},dark:{default:"dark:bg-[#111113] dark:border dark:data-placeholder:border-slateDarkA-7 dark:data-placeholder:text-slateDarkA-9 dark:border-slateDarkA-7 dark:text-slateDarkA-12",hover:"dark:hover:bg-[#111113] dark:hover:border dark:hover:border-slateDarkA-8 dark:hover:text-slateDarkA-10",active:"dark:active:bg-".concat(t,"A-3 dark:active:border dark:active:border-").concat(t,"A-8 dark:active:text-slateDarkA-10 dark:active:opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-2 dark:disabled:border dark:disabled:border-slateDarkA-6 dark:disabled:text-slateDarkA-8"}},r={light:{default:"bg-".concat(e,"A-3 border-none data-placeholder:text-").concat(e,"A-12/[.5] text-").concat(e,"A-12"),hover:"hover:bg-".concat(e,"A-4 hover:border-none hover:text-").concat(e,"A-12/[.5]"),active:"active:bg-".concat(e,"A-5 active:border-none active:text-").concat(e,"A-12/[.5] active:opacity-[.92]"),disable:"disabled:bg-slateA-3 disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-".concat(t,"A-3 dark:border-none dark:data-placeholder:text-").concat(t,"A-12/[.5] dark:text-").concat(t,"A-12 "),hover:"dark:hover:bg-".concat(t,"A-4 dark:hover:border-none dark:hover:text-").concat(t,"A-12/[.5]"),active:"dark:active:bg-".concat(t,"A-5 dark:active:border-none dark:active:text-").concat(t,"A-12/[.5] dark:active:opacity-[.92]"),disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:border-none dark:disabled:text-slateDarkA-8"}},d={light:{default:"bg-transparent border-none data-placeholder:text-".concat(e,"A-12/[.5] text-").concat(e,"A-12"),hover:"hover:bg-".concat(e,"A-3 hover:border-none hover:text-").concat(e,"A-1/[.5]"),active:"active:bg-".concat(e,"A-4 active:border-none active:text-").concat(e,"A-12/[.5] active:opacity-[.92]"),disable:"disabled:bg-transparent disabled:border-none disabled:text-slateA-8"},dark:{default:"dark:bg-transparent dark:border-none dark:data-placeholder:text-".concat(t,"A-12/[.5] dark:text-").concat(t,"A-12"),hover:"dark:hover:bg-".concat(t,"A-3 dark:hover:border-none dark:hover:text-").concat(t,"A-12/[.5]"),active:"dark:active:bg-".concat(t,"A-4 dark:active:border-none dark:active:text-").concat(t,"A-12/[.5] dark:active:opacity-[.92]"),disable:"dark:disabled:text-slateDarkA-8 dark:disabled:border-none"}},o=function(a){var e="";return e+="".concat(a.light.default," ").concat(a.dark.default," ").concat(a.light.hover," ").concat(a.light.active," ").concat(a.light.disable," ").concat(a.dark.hover," ").concat(a.dark.active," ").concat(a.dark.disable)};switch(a){case"classic":return o({light:{default:"bg-slateA-2 border border-slate-4 data-placeholder:text-slateA-10 text-slateA-12",hover:"hover:bg-slateA-3 hover:border hover:border-slate-4 hover:text-slateA-10",active:"active:bg-slateA-4 active:border active:border-slate-6 active:text-slateA-10",disable:"disabled:bg-slateA-3 disabled:border disabled:border-slate-4 disabled:text-slateA-8"},dark:{default:"dark:bg-slateDarkA-2 dark:border-slateDark-4 dark:data-placeholder:text-slateDarkA-10 dark:text-slateDarkA-12",hover:"dark:hover:bg-slateDarkA-3 dark:hover:border-slateDark-4 dark:hover:text-slateDarkA-10",active:"dark:active:bg-slateDarkA-4 dark:active:border-slateDark-6 dark:active:text-slateDarkA-10",disable:"dark:disabled:bg-slateDarkA-3 dark:disabled:border-slateDark-4 dark:disabled:text-slateDarkA-8"}});case"soft":return o(r);case"surface":return o(c);case"ghost":return o(d);default:return""}};export{l as appearanceStyle,n as bgColorStyle,d as blackText,v as checkboxAppearanceStyle,i as menuItemAppearanceStyle,o as primaryColorStyle,t as radiusVariants,r as scalingVariants,h as selectAppearanceStyle,b as textColorStyle,k as toggleAppearanceStyle,c as weightVariants};
2
2
  //# sourceMappingURL=constants.mjs.map