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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. package/README.md +133 -133
  2. package/dist/globals.css +4 -4
  3. package/dist/lib/Typography/Header/index.d.ts +1 -1
  4. package/dist/lib/Typography/Text/index.d.ts +1 -1
  5. package/dist/lib/components/Accordion/index.d.ts +1 -0
  6. package/dist/lib/components/Accordion/index.js +18 -4
  7. package/dist/lib/components/Accordion/index.mjs +1 -1
  8. package/dist/lib/components/Accordion/index.mjs.map +1 -1
  9. package/dist/lib/components/AlertDialog/AlertDialogAction.d.ts +2 -2
  10. package/dist/lib/components/AlertDialog/AlertDialogCancel.d.ts +2 -2
  11. package/dist/lib/components/AlertDialog/AlertDialogContent.d.ts +1 -1
  12. package/dist/lib/components/AlertDialog/AlertDialogRoot.js +9 -6
  13. package/dist/lib/components/AlertDialog/AlertDialogRoot.mjs +2 -1
  14. package/dist/lib/components/AlertDialog/AlertDialogRoot.mjs.map +1 -1
  15. package/dist/lib/components/AlertDialog/AlertDialogTrigger.d.ts +2 -2
  16. package/dist/lib/components/AspectRatio/index.js +3 -1
  17. package/dist/lib/components/AspectRatio/index.mjs +1 -1
  18. package/dist/lib/components/AspectRatio/index.mjs.map +1 -1
  19. package/dist/lib/components/Avatar/index.d.ts +1 -1
  20. package/dist/lib/components/Avatar/index.js +9 -1
  21. package/dist/lib/components/Avatar/index.mjs +2 -1
  22. package/dist/lib/components/Avatar/index.mjs.map +1 -1
  23. package/dist/lib/components/Badge/index.d.ts +2 -2
  24. package/dist/lib/components/Badge/index.js +10 -1
  25. package/dist/lib/components/Badge/index.mjs +1 -1
  26. package/dist/lib/components/Badge/index.mjs.map +1 -1
  27. package/dist/lib/components/Button/index.d.ts +2 -2
  28. package/dist/lib/components/Button/index.js +10 -1
  29. package/dist/lib/components/Button/index.mjs +1 -1
  30. package/dist/lib/components/Button/index.mjs.map +1 -1
  31. package/dist/lib/components/Callout/CalloutRoot.d.ts +1 -1
  32. package/dist/lib/components/Callout/CalloutRoot.js +11 -3
  33. package/dist/lib/components/Callout/CalloutRoot.mjs +2 -1
  34. package/dist/lib/components/Callout/CalloutRoot.mjs.map +1 -1
  35. package/dist/lib/components/Card/index.d.ts +2 -2
  36. package/dist/lib/components/Card/index.js +8 -1
  37. package/dist/lib/components/Card/index.mjs +1 -1
  38. package/dist/lib/components/Card/index.mjs.map +1 -1
  39. package/dist/lib/components/Checkbox/index.d.ts +1 -1
  40. package/dist/lib/components/Checkbox/index.js +10 -2
  41. package/dist/lib/components/Checkbox/index.mjs +1 -1
  42. package/dist/lib/components/Checkbox/index.mjs.map +1 -1
  43. package/dist/lib/components/CheckboxCard/index.d.ts +1 -1
  44. package/dist/lib/components/CheckboxCard/index.js +8 -1
  45. package/dist/lib/components/CheckboxCard/index.mjs +1 -1
  46. package/dist/lib/components/CheckboxCard/index.mjs.map +1 -1
  47. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.js +11 -2
  48. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.mjs +2 -1
  49. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.mjs.map +1 -1
  50. package/dist/lib/components/ContextMenu/ContextMenuContent.d.ts +1 -1
  51. package/dist/lib/components/ContextMenu/ContextMenuItem.d.ts +1 -1
  52. package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.d.ts +1 -1
  53. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.js +1 -0
  54. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.mjs +1 -0
  55. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.mjs.map +1 -1
  56. package/dist/lib/components/ContextMenu/ContextMenuRoot.js +11 -2
  57. package/dist/lib/components/ContextMenu/ContextMenuRoot.mjs +2 -1
  58. package/dist/lib/components/ContextMenu/ContextMenuRoot.mjs.map +1 -1
  59. package/dist/lib/components/ContextMenu/ContextMenuSubContent.d.ts +1 -1
  60. package/dist/lib/components/DataList/DataListLabel.d.ts +1 -1
  61. package/dist/lib/components/DataList/DataListRoot.js +9 -2
  62. package/dist/lib/components/DataList/DataListRoot.mjs +2 -1
  63. package/dist/lib/components/DataList/DataListRoot.mjs.map +1 -1
  64. package/dist/lib/components/DataList/DataListValue.d.ts +1 -1
  65. package/dist/lib/components/Dialog/DialogAction.d.ts +1 -1
  66. package/dist/lib/components/Dialog/DialogCancel.d.ts +1 -1
  67. package/dist/lib/components/Dialog/DialogContent.d.ts +1 -1
  68. package/dist/lib/components/Dialog/DialogRoot.js +9 -1
  69. package/dist/lib/components/Dialog/DialogRoot.mjs +2 -1
  70. package/dist/lib/components/Dialog/DialogRoot.mjs.map +1 -1
  71. package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.d.ts +1 -1
  72. package/dist/lib/components/DropdownMenu/DropdownMenuContent.d.ts +1 -1
  73. package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +1 -1
  74. package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.d.ts +1 -1
  75. package/dist/lib/components/DropdownMenu/DropdownMenuRoot.js +10 -1
  76. package/dist/lib/components/DropdownMenu/DropdownMenuRoot.mjs +2 -1
  77. package/dist/lib/components/DropdownMenu/DropdownMenuRoot.mjs.map +1 -1
  78. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +1 -1
  79. package/dist/lib/components/HoverCard/HoverCardContent.d.ts +2 -2
  80. package/dist/lib/components/HoverCard/HoverCardRoot.js +10 -1
  81. package/dist/lib/components/HoverCard/HoverCardRoot.mjs +2 -1
  82. package/dist/lib/components/HoverCard/HoverCardRoot.mjs.map +1 -1
  83. package/dist/lib/components/IconButton/index.d.ts +1 -1
  84. package/dist/lib/components/IconButton/index.js +9 -1
  85. package/dist/lib/components/IconButton/index.mjs +1 -1
  86. package/dist/lib/components/IconButton/index.mjs.map +1 -1
  87. package/dist/lib/components/Inset/index.d.ts +1 -1
  88. package/dist/lib/components/Inset/index.js +7 -1
  89. package/dist/lib/components/Inset/index.mjs +1 -1
  90. package/dist/lib/components/Inset/index.mjs.map +1 -1
  91. package/dist/lib/components/Label/index.d.ts +1 -1
  92. package/dist/lib/components/Label/index.js +11 -3
  93. package/dist/lib/components/Label/index.mjs +1 -1
  94. package/dist/lib/components/Label/index.mjs.map +1 -1
  95. package/dist/lib/components/Menubar/MenubarContent.d.ts +1 -1
  96. package/dist/lib/components/Menubar/MenubarItem.d.ts +1 -1
  97. package/dist/lib/components/Menubar/MenubarItemIndicator.d.ts +1 -1
  98. package/dist/lib/components/Menubar/MenubarRadioGroup.js +1 -0
  99. package/dist/lib/components/Menubar/MenubarRadioGroup.mjs +1 -0
  100. package/dist/lib/components/Menubar/MenubarRadioGroup.mjs.map +1 -1
  101. package/dist/lib/components/Menubar/MenubarRoot.d.ts +1 -1
  102. package/dist/lib/components/Menubar/MenubarRoot.js +13 -3
  103. package/dist/lib/components/Menubar/MenubarRoot.mjs +2 -1
  104. package/dist/lib/components/Menubar/MenubarRoot.mjs.map +1 -1
  105. package/dist/lib/components/Menubar/MenubarSubContent.d.ts +1 -1
  106. package/dist/lib/components/Menubar/MenubarTrigger.d.ts +1 -1
  107. package/dist/lib/components/NavigationMenu/NavigationMenuContent.d.ts +1 -1
  108. package/dist/lib/components/NavigationMenu/NavigationMenuLink.d.ts +1 -1
  109. package/dist/lib/components/NavigationMenu/NavigationMenuList.d.ts +1 -1
  110. package/dist/lib/components/NavigationMenu/NavigationMenuRoot.js +11 -2
  111. package/dist/lib/components/NavigationMenu/NavigationMenuRoot.mjs +2 -1
  112. package/dist/lib/components/NavigationMenu/NavigationMenuRoot.mjs.map +1 -1
  113. package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.d.ts +1 -1
  114. package/dist/lib/components/NavigationMenu/NavigationMenuViewport.d.ts +2 -2
  115. package/dist/lib/components/Popover/PopoverClose.d.ts +1 -1
  116. package/dist/lib/components/Popover/PopoverContent.d.ts +1 -1
  117. package/dist/lib/components/Popover/PopoverRoot.js +8 -1
  118. package/dist/lib/components/Popover/PopoverRoot.mjs +2 -1
  119. package/dist/lib/components/Popover/PopoverRoot.mjs.map +1 -1
  120. package/dist/lib/components/Progress/index.d.ts +1 -1
  121. package/dist/lib/components/Progress/index.js +11 -1
  122. package/dist/lib/components/Progress/index.mjs +1 -1
  123. package/dist/lib/components/Progress/index.mjs.map +1 -1
  124. package/dist/lib/components/Radio/index.js +10 -4
  125. package/dist/lib/components/Radio/index.mjs +1 -1
  126. package/dist/lib/components/Radio/index.mjs.map +1 -1
  127. package/dist/lib/components/RadioCards/RadioCardsItem.d.ts +1 -1
  128. package/dist/lib/components/RadioCards/RadioCardsRoot.js +12 -2
  129. package/dist/lib/components/RadioCards/RadioCardsRoot.mjs +2 -1
  130. package/dist/lib/components/RadioCards/RadioCardsRoot.mjs.map +1 -1
  131. package/dist/lib/components/RadioGroup/RadioGroupRoot.js +11 -2
  132. package/dist/lib/components/RadioGroup/RadioGroupRoot.mjs +2 -1
  133. package/dist/lib/components/RadioGroup/RadioGroupRoot.mjs.map +1 -1
  134. package/dist/lib/components/ScrollArea/index.js +3 -1
  135. package/dist/lib/components/ScrollArea/index.mjs +1 -1
  136. package/dist/lib/components/ScrollArea/index.mjs.map +1 -1
  137. package/dist/lib/components/SegmentedControl/SegmentedControlRoot.js +7 -1
  138. package/dist/lib/components/SegmentedControl/SegmentedControlRoot.mjs +1 -1
  139. package/dist/lib/components/SegmentedControl/SegmentedControlRoot.mjs.map +1 -1
  140. package/dist/lib/components/Select/index.d.ts +4 -2
  141. package/dist/lib/components/Select/index.js +30 -13
  142. package/dist/lib/components/Select/index.mjs +1 -1
  143. package/dist/lib/components/Select/index.mjs.map +1 -1
  144. package/dist/lib/components/Separator/index.js +7 -1
  145. package/dist/lib/components/Separator/index.mjs +1 -1
  146. package/dist/lib/components/Separator/index.mjs.map +1 -1
  147. package/dist/lib/components/Skeleton/index.d.ts +1 -1
  148. package/dist/lib/components/Skeleton/index.js +4 -1
  149. package/dist/lib/components/Skeleton/index.mjs +1 -1
  150. package/dist/lib/components/Skeleton/index.mjs.map +1 -1
  151. package/dist/lib/components/Slider/index.d.ts +1 -1
  152. package/dist/lib/components/Slider/index.js +13 -5
  153. package/dist/lib/components/Slider/index.mjs +1 -1
  154. package/dist/lib/components/Slider/index.mjs.map +1 -1
  155. package/dist/lib/components/Spinner/index.js +3 -1
  156. package/dist/lib/components/Spinner/index.mjs +1 -1
  157. package/dist/lib/components/Spinner/index.mjs.map +1 -1
  158. package/dist/lib/components/TabNav/index.js +6 -4
  159. package/dist/lib/components/TabNav/index.mjs +1 -1
  160. package/dist/lib/components/TabNav/index.mjs.map +1 -1
  161. package/dist/lib/components/Table/index.d.ts +1 -1
  162. package/dist/lib/components/Table/index.js +7 -1
  163. package/dist/lib/components/Table/index.mjs +1 -1
  164. package/dist/lib/components/Table/index.mjs.map +1 -1
  165. package/dist/lib/components/Tabs/index.d.ts +1 -1
  166. package/dist/lib/components/Tabs/index.js +4 -4
  167. package/dist/lib/components/Tabs/index.mjs +1 -1
  168. package/dist/lib/components/Tabs/index.mjs.map +1 -1
  169. package/dist/lib/components/TextArea/index.d.ts +1 -1
  170. package/dist/lib/components/TextArea/index.js +11 -4
  171. package/dist/lib/components/TextArea/index.mjs +1 -1
  172. package/dist/lib/components/TextArea/index.mjs.map +1 -1
  173. package/dist/lib/components/TextField/index.d.ts +1 -1
  174. package/dist/lib/components/TextField/index.js +11 -4
  175. package/dist/lib/components/TextField/index.mjs +1 -1
  176. package/dist/lib/components/TextField/index.mjs.map +1 -1
  177. package/dist/lib/components/Toast/ToastActionButton.d.ts +1 -1
  178. package/dist/lib/components/Toast/ToastActionButton.js +2 -2
  179. package/dist/lib/components/Toast/ToastActionButton.mjs +1 -1
  180. package/dist/lib/components/Toast/ToastActionButton.mjs.map +1 -1
  181. package/dist/lib/components/Toast/ToastRoot.d.ts +1 -1
  182. package/dist/lib/components/Toast/ToastRoot.js +11 -3
  183. package/dist/lib/components/Toast/ToastRoot.mjs +2 -1
  184. package/dist/lib/components/Toast/ToastRoot.mjs.map +1 -1
  185. package/dist/lib/components/Toggle/ToggleWithText.d.ts +1 -1
  186. package/dist/lib/components/Toggle/ToggleWithText.js +9 -1
  187. package/dist/lib/components/Toggle/ToggleWithText.mjs +1 -1
  188. package/dist/lib/components/Toggle/ToggleWithText.mjs.map +1 -1
  189. package/dist/lib/components/Toggle/index.d.ts +1 -1
  190. package/dist/lib/components/Toggle/index.js +9 -1
  191. package/dist/lib/components/Toggle/index.mjs +1 -1
  192. package/dist/lib/components/Toggle/index.mjs.map +1 -1
  193. package/dist/lib/components/ToggleGroup/ToggleGroupRoot.js +10 -2
  194. package/dist/lib/components/ToggleGroup/ToggleGroupRoot.mjs +2 -1
  195. package/dist/lib/components/ToggleGroup/ToggleGroupRoot.mjs.map +1 -1
  196. package/dist/lib/components/ToggleSwitch/index.d.ts +1 -1
  197. package/dist/lib/components/ToggleSwitch/index.js +13 -1
  198. package/dist/lib/components/ToggleSwitch/index.mjs +1 -1
  199. package/dist/lib/components/ToggleSwitch/index.mjs.map +1 -1
  200. package/dist/lib/components/Tooltip/index.d.ts +2 -2
  201. package/dist/lib/components/Tooltip/index.js +13 -8
  202. package/dist/lib/components/Tooltip/index.mjs +1 -1
  203. package/dist/lib/components/Tooltip/index.mjs.map +1 -1
  204. package/dist/lib/index.d.ts +1 -0
  205. package/dist/lib/index.js +1 -0
  206. package/dist/lib/index.mjs +1 -1
  207. package/dist/lib/theme/ThemeProvider.d.ts +16 -0
  208. package/dist/lib/theme/ThemeProvider.js +29 -0
  209. package/dist/lib/theme/ThemeProvider.mjs +3 -0
  210. package/dist/lib/theme/ThemeProvider.mjs.map +1 -0
  211. package/dist/lib/theme/index.d.ts +2 -0
  212. package/dist/lib/theme/index.js +2 -0
  213. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  214. package/dist/lib/utils/useDarkMode.js +1 -0
  215. package/dist/lib/utils/useDarkMode.mjs +1 -0
  216. package/dist/lib/utils/useDarkMode.mjs.map +1 -1
  217. package/dist/tsconfig.tsbuildinfo +1 -1
  218. package/package.json +141 -141
  219. package/dist/.storybook/main.d.ts +0 -3
  220. package/dist/.storybook/main.js +0 -22
  221. package/dist/.storybook/manager.d.ts +0 -1
  222. package/dist/.storybook/manager.js +0 -12
  223. package/dist/.storybook/preview.d.ts +0 -8
  224. package/dist/.storybook/preview.js +0 -81
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../lib/components/Button/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 { forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { radiusVariants, weightVariants, primaryColorStyle, appearanceStyle, scalingVariants, } from '../../../lib/constants';\nvar buttonVariants = cva(\"inline-flex items-center w-fit transition-colors focus:outline-none hover:cursor-pointer\\n disabled:cursor-not-allowed disabled:bg-slate-3 disabled:text-slate-8 justify-center\", {\n variants: {\n radius: __assign({}, radiusVariants['base']),\n size: {\n 'x-small': 'text-xs min-w-[36px] h-[20px] px-1.5',\n small: 'text-xs min-w-[40px] h-[24px] px-2',\n medium: 'text-sm min-w-[50px] h-[32px] px-3',\n large: 'text-base min-w-[62px] h-[40px] px-4',\n 'x-large': 'text-lg min-w-[82px] h-[48px] px-6',\n },\n scaling: __assign({}, scalingVariants),\n weight: __assign({}, weightVariants),\n color: primaryColorStyle(),\n },\n defaultVariants: {\n radius: 'medium',\n scaling: '100%',\n weight: 'medium',\n color: 'red',\n size: 'medium',\n },\n});\nexport var Button = forwardRef(function (_a, ref) {\n var className = _a.className, children = _a.children, radius = _a.radius, scaling = _a.scaling, size = _a.size, weight = _a.weight, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, props = __rest(_a, [\"className\", \"children\", \"radius\", \"scaling\", \"size\", \"weight\", \"color\", \"appearance\"]);\n var buttonClassName = cn(buttonVariants({ radius: radius, scaling: scaling, size: size, weight: weight, color: color }), appearanceStyle(appearance, color, true), className);\n return (_jsx(\"button\", __assign({ ref: ref, className: buttonClassName }, props, { children: children })));\n});\nButton.displayName = 'Button';\nexport default Button;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","buttonVariants","cva","variants","radius","radiusVariants","size","small","medium","large","scaling","scalingVariants","weight","weightVariants","color","primaryColorStyle","defaultVariants","Button","forwardRef","_a","ref","className","children","_b","_c","appearance","props","buttonClassName","cn","appearanceStyle","_jsx","displayName"],"mappings":"+SAAA,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,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AAKA,EAAKC,UAAWM,GAAmBD,EAAO,CAAEJ,SAAUA,IACjG,IACAL,EAAOc,YAAc"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../lib/components/Button/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 { forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { radiusVariants, weightVariants, primaryColorStyle, appearanceStyle, scalingVariants, } from '../../../lib/constants';\nimport { useTheme } from '../../../lib/theme';\nvar buttonVariants = cva(\"inline-flex items-center w-fit transition-colors focus:outline-none hover:cursor-pointer\\n disabled:cursor-not-allowed disabled:bg-slate-3 disabled:text-slate-8 justify-center\", {\n variants: {\n radius: __assign({}, radiusVariants['base']),\n size: {\n 'x-small': 'text-xs min-w-[36px] h-[20px] px-1.5',\n small: 'text-xs min-w-[40px] h-[24px] px-2',\n medium: 'text-sm min-w-[50px] h-[32px] px-3',\n large: 'text-base min-w-[62px] h-[40px] px-4',\n 'x-large': 'text-lg min-w-[82px] h-[48px] px-6',\n },\n scaling: __assign({}, scalingVariants),\n weight: __assign({}, weightVariants),\n color: primaryColorStyle(),\n },\n defaultVariants: {\n radius: 'medium',\n scaling: '100%',\n weight: 'medium',\n color: 'red',\n size: 'medium',\n },\n});\nexport var Button = forwardRef(function (_a, ref) {\n var className = _a.className, children = _a.children, radius = _a.radius, scaling = _a.scaling, size = _a.size, weight = _a.weight, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, props = __rest(_a, [\"className\", \"children\", \"radius\", \"scaling\", \"size\", \"weight\", \"color\", \"appearance\"]);\n var theme = useTheme().theme;\n var buttonStyle = {\n radius: theme.themeRadius || radius,\n scaling: theme.themeScaling || scaling,\n weight: theme.themeWeight || weight,\n color: theme.themeColor || color,\n size: size,\n };\n var buttonClassName = cn(buttonVariants(buttonStyle), appearanceStyle(appearance, buttonStyle.color, true), className);\n return (_jsx(\"button\", __assign({ ref: ref, className: buttonClassName }, props, { children: children })));\n});\nButton.displayName = 'Button';\nexport default Button;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","buttonVariants","cva","variants","radius","radiusVariants","size","small","medium","large","scaling","scalingVariants","weight","weightVariants","color","primaryColorStyle","defaultVariants","Button","forwardRef","_a","ref","className","children","_b","_c","appearance","props","theme","useTheme","buttonStyle","themeRadius","themeScaling","themeWeight","themeColor","buttonClassName","cn","appearanceStyle","_jsx","displayName"],"mappings":"wWAAA,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,EAAO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,EAAMM,YAAcnB,EAC3BR,KAAMA,GAEN4B,EAAkBC,EAAGlC,EAAe4B,GAAcO,EAAgBX,EAAYI,EAAYf,OAAO,GAAOO,GAC5G,OAAQgB,EAAK,SAAUxD,EAAS,CAAEuC,IAAKA,EAAKC,UAAWa,GAAmBR,EAAO,CAAEJ,SAAUA,IACjG,IACAL,EAAOqB,YAAc"}
@@ -8,7 +8,7 @@ export interface CalloutProps extends VariantProps<typeof calloutVariants>, Vari
8
8
  color?: 'danger' | 'warning' | 'success' | 'information' | null;
9
9
  }
10
10
  declare const calloutVariants: (props?: ({
11
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
11
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
12
12
  size?: "small" | "medium" | "large" | null | undefined;
13
13
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
14
14
  color?: "danger" | "warning" | "success" | "information" | null | undefined;
@@ -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++) {
@@ -21,11 +22,12 @@ var __rest = (this && this.__rest) || function (s, e) {
21
22
  return t;
22
23
  };
23
24
  import { jsx as _jsx } from "react/jsx-runtime";
24
- import { forwardRef, createContext, useContext, useMemo, } from 'react';
25
+ import { forwardRef, createContext, useContext, } from 'react';
25
26
  import { Callout as CalloutTheme } from '@radix-ui/themes';
26
27
  import { cva } from 'class-variance-authority';
27
28
  import { cn } from '../../../lib/utils/utils';
28
29
  import { appearanceStyle, radiusVariants, scalingVariants } from '../../../lib/constants';
30
+ import { useTheme } from '../../../lib/theme';
29
31
  var calloutVariants = cva('flex w-fit max-w-[600px]', {
30
32
  variants: {
31
33
  radius: __assign({}, radiusVariants['large']),
@@ -59,14 +61,20 @@ export var useCalloutContext = function () {
59
61
  };
60
62
  export var CalloutRoot = forwardRef(function (_a, ref) {
61
63
  var children = _a.children, className = _a.className, radius = _a.radius, scaling = _a.scaling, size = _a.size, _b = _a.color, color = _b === void 0 ? 'information' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'soft' : _c, props = __rest(_a, ["children", "className", "radius", "scaling", "size", "color", "appearance"]);
64
+ var theme = useTheme().theme;
62
65
  var colorMap = {
63
66
  danger: 'red',
64
67
  information: 'sky',
65
68
  success: 'green',
66
69
  warning: 'amber',
67
70
  };
68
- var calloutClassName = cn(calloutVariants({ radius: radius, scaling: scaling, size: size, color: color }), appearanceStyle(appearance, colorMap[color], false), className);
69
- var contextValue = useMemo(function () { return ({ size: size, scaling: scaling, color: color }); }, [size, scaling, color]);
71
+ var contextValue = {
72
+ size: size,
73
+ color: color,
74
+ scaling: theme.themeScaling || scaling,
75
+ radius: theme.themeRadius || radius,
76
+ };
77
+ var calloutClassName = cn(calloutVariants(contextValue), appearanceStyle(appearance, colorMap[color], false), className);
70
78
  return (_jsx(CalloutContext.Provider, { value: contextValue, children: _jsx(CalloutTheme.Root, __assign({ ref: ref }, props, { className: calloutClassName, children: children })) }));
71
79
  });
72
80
  CalloutRoot.displayName = 'Callout.Root';
@@ -1,2 +1,3 @@
1
- import{jsx as r}from"react/jsx-runtime";import{createContext as e,forwardRef as a,useMemo as i,useContext as n}from"react";import{Callout as o}from"@radix-ui/themes";import{cva as t}from"class-variance-authority";import{cn as s}from"../../utils/utils.mjs";import{radiusVariants as l,scalingVariants as c,appearanceStyle as m}from"../../constants.mjs";var u=function(){return u=Object.assign||function(r){for(var e,a=1,i=arguments.length;a<i;a++)for(var n in e=arguments[a])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},u.apply(this,arguments)},p=function(r,e){var a={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(a[i]=r[i]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(r);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(r,i[n])&&(a[i[n]]=r[i[n]])}return a},d=t("flex w-fit max-w-[600px]",{variants:{radius:u({},l.large),size:{small:"min-h-[44px] p-3",medium:"min-h-[52px] p-4",large:"min-h-[72px] p-6"},scaling:u({},c),color:{danger:"bg-redA-3 dark:bg-redDarkA-3",warning:"bg-amberA-3 dark:bg-amberDarkA-3",success:"bg-greenA-3 dark:bg-greenDarkA-3",information:"bg-skyA-3 dark:bg-skyDarkA-3"}},defaultVariants:{radius:"medium",scaling:"100%",color:"information",size:"medium"}}),f=e({size:"medium",scaling:"100%",color:null}),g=function(){return n(f)},b=a((function(e,a){var n=e.children,t=e.className,l=e.radius,c=e.scaling,g=e.size,b=e.color,y=void 0===b?"information":b,h=e.appearance,v=void 0===h?"soft":h,O=p(e,["children","className","radius","scaling","size","color","appearance"]),k=s(d({radius:l,scaling:c,size:g,color:y}),m(v,{danger:"red",information:"sky",success:"green",warning:"amber"}[y],!1),t),x=i((function(){return{size:g,scaling:c,color:y}}),[g,c,y]);return r(f.Provider,{value:x,children:r(o.Root,u({ref:a},O,{className:k,children:n}))})}));b.displayName="Callout.Root";export{b as CalloutRoot,g as useCalloutContext};
1
+ "use client";
2
+ import{jsx as r}from"react/jsx-runtime";import{createContext as e,forwardRef as a,useContext as i}from"react";import{Callout as o}from"@radix-ui/themes";import{cva as n}from"class-variance-authority";import{cn as t}from"../../utils/utils.mjs";import{radiusVariants as s,scalingVariants as m,appearanceStyle as l}from"../../constants.mjs";import{useTheme as c}from"../../theme/ThemeProvider.mjs";var p=function(){return p=Object.assign||function(r){for(var e,a=1,i=arguments.length;a<i;a++)for(var o in e=arguments[a])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},p.apply(this,arguments)},u=function(r,e){var a={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(a[i]=r[i]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(r);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(r,i[o])&&(a[i[o]]=r[i[o]])}return a},d=n("flex w-fit max-w-[600px]",{variants:{radius:p({},s.large),size:{small:"min-h-[44px] p-3",medium:"min-h-[52px] p-4",large:"min-h-[72px] p-6"},scaling:p({},m),color:{danger:"bg-redA-3 dark:bg-redDarkA-3",warning:"bg-amberA-3 dark:bg-amberDarkA-3",success:"bg-greenA-3 dark:bg-greenDarkA-3",information:"bg-skyA-3 dark:bg-skyDarkA-3"}},defaultVariants:{radius:"medium",scaling:"100%",color:"information",size:"medium"}}),f=e({size:"medium",scaling:"100%",color:null}),g=function(){return i(f)},b=a((function(e,a){var i=e.children,n=e.className,s=e.radius,m=e.scaling,g=e.size,b=e.color,h=void 0===b?"information":b,y=e.appearance,v=void 0===y?"soft":y,O=u(e,["children","className","radius","scaling","size","color","appearance"]),k=c().theme,x={size:g,color:h,scaling:k.themeScaling||m,radius:k.themeRadius||s},j=t(d(x),l(v,{danger:"red",information:"sky",success:"green",warning:"amber"}[h],!1),n);return r(f.Provider,{value:x,children:r(o.Root,p({ref:a},O,{className:j,children:i}))})}));b.displayName="Callout.Root";export{b as CalloutRoot,g as useCalloutContext};
2
3
  //# sourceMappingURL=CalloutRoot.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CalloutRoot.mjs","sources":["../../../lib/components/Callout/CalloutRoot.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 { forwardRef, createContext, useContext, useMemo, } from 'react';\nimport { Callout as CalloutTheme } from '@radix-ui/themes';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { appearanceStyle, radiusVariants, scalingVariants } from '../../../lib/constants';\nvar calloutVariants = cva('flex w-fit max-w-[600px]', {\n variants: {\n radius: __assign({}, radiusVariants['large']),\n size: {\n small: 'min-h-[44px] p-3',\n medium: 'min-h-[52px] p-4',\n large: 'min-h-[72px] p-6',\n },\n scaling: __assign({}, scalingVariants),\n color: {\n danger: 'bg-redA-3 dark:bg-redDarkA-3',\n warning: 'bg-amberA-3 dark:bg-amberDarkA-3',\n success: 'bg-greenA-3 dark:bg-greenDarkA-3',\n information: 'bg-skyA-3 dark:bg-skyDarkA-3',\n },\n },\n defaultVariants: {\n radius: 'medium',\n scaling: '100%',\n color: 'information',\n size: 'medium',\n },\n});\nvar CalloutContext = createContext({\n size: 'medium',\n scaling: '100%',\n color: null,\n});\nexport var useCalloutContext = function () {\n return useContext(CalloutContext);\n};\nexport var CalloutRoot = forwardRef(function (_a, ref) {\n var children = _a.children, className = _a.className, radius = _a.radius, scaling = _a.scaling, size = _a.size, _b = _a.color, color = _b === void 0 ? 'information' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'soft' : _c, props = __rest(_a, [\"children\", \"className\", \"radius\", \"scaling\", \"size\", \"color\", \"appearance\"]);\n var colorMap = {\n danger: 'red',\n information: 'sky',\n success: 'green',\n warning: 'amber',\n };\n var calloutClassName = cn(calloutVariants({ radius: radius, scaling: scaling, size: size, color: color }), appearanceStyle(appearance, colorMap[color], false), className);\n var contextValue = useMemo(function () { return ({ size: size, scaling: scaling, color: color }); }, [size, scaling, color]);\n return (_jsx(CalloutContext.Provider, { value: contextValue, children: _jsx(CalloutTheme.Root, __assign({ ref: ref }, props, { className: calloutClassName, children: children })) }));\n});\nCalloutRoot.displayName = 'Callout.Root';\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","calloutVariants","cva","variants","radius","radiusVariants","size","small","medium","large","scaling","scalingVariants","color","danger","warning","success","information","defaultVariants","CalloutContext","createContext","useCalloutContext","useContext","CalloutRoot","forwardRef","_a","ref","children","className","_b","_c","appearance","props","calloutClassName","cn","appearanceStyle","contextValue","useMemo","_jsx","Provider","value","CalloutTheme","Root","displayName"],"mappings":"+VAAA,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,EAOIiB,EAAkBC,EAAI,2BAA4B,CAClDC,SAAU,CACNC,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sourcesContent":[],"names":[],"mappings":";"}
@@ -5,10 +5,10 @@ export interface CardProps extends VariantProps<typeof cardVariants> {
5
5
  appearance?: Exclude<IAppearance, 'solid' | 'outline'>;
6
6
  }
7
7
  declare const cardVariants: (props?: ({
8
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
8
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
9
9
  size?: "small" | "medium" | "large" | null | undefined;
10
10
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
11
- weight?: "bold" | "medium" | "regular" | "semibold" | null | undefined;
11
+ weight?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
12
12
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
13
13
  declare const Card: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & CardProps & React.RefAttributes<HTMLDivElement>>;
14
14
  export default Card;
@@ -25,6 +25,7 @@ import { forwardRef } from 'react';
25
25
  import { cva } from 'class-variance-authority';
26
26
  import { scalingVariants, weightVariants } from '../../../lib/constants';
27
27
  import { cn } from '../../../lib/utils/utils';
28
+ import { useTheme } from '../../../lib/theme';
28
29
  var cardVariants = cva("border border-slate-6 flex items-center text-slate-12\n dark:border-slateDarkA-6 dark:text-slateDarkA-12\n ", {
29
30
  variants: {
30
31
  radius: {
@@ -51,6 +52,7 @@ var cardVariants = cva("border border-slate-6 flex items-center text-slate-12\n
51
52
  });
52
53
  var Card = forwardRef(function (_a, ref) {
53
54
  var children = _a.children, className = _a.className, radius = _a.radius, scaling = _a.scaling, size = _a.size, color = _a.color, weight = _a.weight, _b = _a.appearance, appearance = _b === void 0 ? 'surface' : _b, props = __rest(_a, ["children", "className", "radius", "scaling", "size", "color", "weight", "appearance"]);
55
+ var theme = useTheme().theme;
54
56
  var appearanceClassName = '';
55
57
  if (appearance === 'classic') {
56
58
  appearanceClassName = 'shadow-card-classic dark:shadow-card-dark-classic';
@@ -58,7 +60,12 @@ var Card = forwardRef(function (_a, ref) {
58
60
  if (appearance === 'ghost') {
59
61
  appearanceClassName = 'border-transparent';
60
62
  }
61
- return (_jsx("div", __assign({ className: cn(cardVariants({ radius: radius, scaling: scaling, size: size }), appearanceClassName, className), ref: ref }, props, { children: children })));
63
+ var cardStyle = {
64
+ radius: theme.themeRadius || radius,
65
+ scaling: theme.themeScaling || scaling,
66
+ size: size,
67
+ };
68
+ return (_jsx("div", __assign({ className: cn(cardVariants(cardStyle), appearanceClassName, className), ref: ref }, props, { children: children })));
62
69
  });
63
70
  Card.displayName = 'Card';
64
71
  export default Card;
@@ -1,2 +1,2 @@
1
- import{jsx as r}from"react/jsx-runtime";import{forwardRef as e}from"react";import{cva as a}from"class-variance-authority";import{scalingVariants as t,weightVariants as s}from"../../constants.mjs";import{cn as i}from"../../utils/utils.mjs";var n=function(){return n=Object.assign||function(r){for(var e,a=1,t=arguments.length;a<t;a++)for(var s in e=arguments[a])Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s]);return r},n.apply(this,arguments)},o=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 s=0;for(t=Object.getOwnPropertySymbols(r);s<t.length;s++)e.indexOf(t[s])<0&&Object.prototype.propertyIsEnumerable.call(r,t[s])&&(a[t[s]]=r[t[s]])}return a},l=a("border border-slate-6 flex items-center text-slate-12\n dark:border-slateDarkA-6 dark:text-slateDarkA-12\n ",{variants:{radius:{none:"rounded-none",small:"rounded-[3px]",medium:"rounded",large:"rounded-md",full:"rounded-md"},size:{small:"text-sm min-h-[64px] w-[300px] p-3 space-x-3",medium:"text-base min-h-[80px] w-[350px] p-4 space-x-4",large:"text-lg min-h-[112px] w-[400px] p-8 space-x-8"},scaling:n({},t),weight:n({},s)},defaultVariants:{radius:"medium",scaling:"100%",size:"medium",weight:"medium"}}),c=e((function(e,a){var t=e.children,s=e.className,c=e.radius,d=e.scaling,p=e.size;e.color,e.weight;var m=e.appearance,u=void 0===m?"surface":m,f=o(e,["children","className","radius","scaling","size","color","weight","appearance"]),x="";return"classic"===u&&(x="shadow-card-classic dark:shadow-card-dark-classic"),"ghost"===u&&(x="border-transparent"),r("div",n({className:i(l({radius:c,scaling:d,size:p}),x,s),ref:a},f,{children:t}))}));c.displayName="Card";export{c as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{forwardRef as r}from"react";import{cva as a}from"class-variance-authority";import{scalingVariants as t,weightVariants as s}from"../../constants.mjs";import{cn as i}from"../../utils/utils.mjs";import{useTheme as n}from"../../theme/ThemeProvider.mjs";var o=function(){return o=Object.assign||function(e){for(var r,a=1,t=arguments.length;a<t;a++)for(var s in r=arguments[a])Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s]);return e},o.apply(this,arguments)},l=function(e,r){var a={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(t=Object.getOwnPropertySymbols(e);s<t.length;s++)r.indexOf(t[s])<0&&Object.prototype.propertyIsEnumerable.call(e,t[s])&&(a[t[s]]=e[t[s]])}return a},c=a("border border-slate-6 flex items-center text-slate-12\n dark:border-slateDarkA-6 dark:text-slateDarkA-12\n ",{variants:{radius:{none:"rounded-none",small:"rounded-[3px]",medium:"rounded",large:"rounded-md",full:"rounded-md"},size:{small:"text-sm min-h-[64px] w-[300px] p-3 space-x-3",medium:"text-base min-h-[80px] w-[350px] p-4 space-x-4",large:"text-lg min-h-[112px] w-[400px] p-8 space-x-8"},scaling:o({},t),weight:o({},s)},defaultVariants:{radius:"medium",scaling:"100%",size:"medium",weight:"medium"}}),d=r((function(r,a){var t=r.children,s=r.className,d=r.radius,m=r.scaling,p=r.size;r.color,r.weight;var u=r.appearance,f=void 0===u?"surface":u,h=l(r,["children","className","radius","scaling","size","color","weight","appearance"]),x=n().theme,g="";"classic"===f&&(g="shadow-card-classic dark:shadow-card-dark-classic"),"ghost"===f&&(g="border-transparent");var b={radius:x.themeRadius||d,scaling:x.themeScaling||m,size:p};return e("div",o({className:i(c(b),g,s),ref:a},h,{children:t}))}));d.displayName="Card";export{d as default};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../lib/components/Card/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 { forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { scalingVariants, weightVariants } from '../../../lib/constants';\nimport { cn } from '../../../lib/utils/utils';\nvar cardVariants = cva(\"border border-slate-6 flex items-center text-slate-12\\n dark:border-slateDarkA-6 dark:text-slateDarkA-12\\n \", {\n variants: {\n radius: {\n none: 'rounded-none',\n small: 'rounded-[3px]',\n medium: 'rounded',\n large: 'rounded-md',\n full: 'rounded-md',\n },\n size: {\n small: 'text-sm min-h-[64px] w-[300px] p-3 space-x-3',\n medium: 'text-base min-h-[80px] w-[350px] p-4 space-x-4',\n large: 'text-lg min-h-[112px] w-[400px] p-8 space-x-8',\n },\n scaling: __assign({}, scalingVariants),\n weight: __assign({}, weightVariants),\n },\n defaultVariants: {\n radius: 'medium',\n scaling: '100%',\n size: 'medium',\n weight: 'medium',\n },\n});\nvar Card = forwardRef(function (_a, ref) {\n var children = _a.children, className = _a.className, radius = _a.radius, scaling = _a.scaling, size = _a.size, color = _a.color, weight = _a.weight, _b = _a.appearance, appearance = _b === void 0 ? 'surface' : _b, props = __rest(_a, [\"children\", \"className\", \"radius\", \"scaling\", \"size\", \"color\", \"weight\", \"appearance\"]);\n var appearanceClassName = '';\n if (appearance === 'classic') {\n appearanceClassName = 'shadow-card-classic dark:shadow-card-dark-classic';\n }\n if (appearance === 'ghost') {\n appearanceClassName = 'border-transparent';\n }\n return (_jsx(\"div\", __assign({ className: cn(cardVariants({ radius: radius, scaling: scaling, size: size }), appearanceClassName, className), ref: ref }, props, { children: children })));\n});\nCard.displayName = 'Card';\nexport default Card;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","cardVariants","cva","variants","radius","none","small","medium","large","full","size","scaling","scalingVariants","weight","weightVariants","defaultVariants","Card","forwardRef","_a","ref","children","className","color","_b","appearance","props","appearanceClassName","_jsx","cn","displayName"],"mappings":"+OAAA,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,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../../lib/components/Card/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 { forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { scalingVariants, weightVariants } from '../../../lib/constants';\nimport { cn } from '../../../lib/utils/utils';\nimport { useTheme } from '../../../lib/theme';\nvar cardVariants = cva(\"border border-slate-6 flex items-center text-slate-12\\n dark:border-slateDarkA-6 dark:text-slateDarkA-12\\n \", {\n variants: {\n radius: {\n none: 'rounded-none',\n small: 'rounded-[3px]',\n medium: 'rounded',\n large: 'rounded-md',\n full: 'rounded-md',\n },\n size: {\n small: 'text-sm min-h-[64px] w-[300px] p-3 space-x-3',\n medium: 'text-base min-h-[80px] w-[350px] p-4 space-x-4',\n large: 'text-lg min-h-[112px] w-[400px] p-8 space-x-8',\n },\n scaling: __assign({}, scalingVariants),\n weight: __assign({}, weightVariants),\n },\n defaultVariants: {\n radius: 'medium',\n scaling: '100%',\n size: 'medium',\n weight: 'medium',\n },\n});\nvar Card = forwardRef(function (_a, ref) {\n var children = _a.children, className = _a.className, radius = _a.radius, scaling = _a.scaling, size = _a.size, color = _a.color, weight = _a.weight, _b = _a.appearance, appearance = _b === void 0 ? 'surface' : _b, props = __rest(_a, [\"children\", \"className\", \"radius\", \"scaling\", \"size\", \"color\", \"weight\", \"appearance\"]);\n var theme = useTheme().theme;\n var appearanceClassName = '';\n if (appearance === 'classic') {\n appearanceClassName = 'shadow-card-classic dark:shadow-card-dark-classic';\n }\n if (appearance === 'ghost') {\n appearanceClassName = 'border-transparent';\n }\n var cardStyle = {\n radius: theme.themeRadius || radius,\n scaling: theme.themeScaling || scaling,\n size: size,\n };\n return (_jsx(\"div\", __assign({ className: cn(cardVariants(cardStyle), appearanceClassName, className), ref: ref }, props, { children: children })));\n});\nCard.displayName = 'Card';\nexport default Card;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","cardVariants","cva","variants","radius","none","small","medium","large","full","size","scaling","scalingVariants","weight","weightVariants","defaultVariants","Card","forwardRef","_a","ref","children","className","color","_b","appearance","props","theme","useTheme","appearanceClassName","cardStyle","themeRadius","themeScaling","_jsx","cn","displayName"],"mappings":"wSAAA,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,O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Variants: (props?: ({
12
12
  size?: "small" | "medium" | "large" | null | undefined;
13
13
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
14
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
14
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
15
15
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
16
16
  export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
17
17
  export default Checkbox;
@@ -28,6 +28,7 @@ import { CheckIcon, MinusIcon } from '@radix-ui/react-icons';
28
28
  import { Label } from '../../../lib/components/Label';
29
29
  import { cn } from '../../../lib/utils/utils';
30
30
  import { checkboxAppearanceStyle, radiusVariants, scalingVariants, textColorStyle, } from '../../../lib/constants';
31
+ import { useTheme } from '../../../lib/theme';
31
32
  export var CheckboxVariants = cva("peer ring-offset-background", {
32
33
  variants: {
33
34
  size: {
@@ -82,8 +83,15 @@ var CheckboxLabelVariants = cva('', {
82
83
  });
83
84
  export var Checkbox = forwardRef(function (_a, ref) {
84
85
  var id = _a.id, className = _a.className, children = _a.children, scaling = _a.scaling, radius = _a.radius, size = _a.size, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'surface' : _c, _d = _a.indeterminate, indeterminate = _d === void 0 ? false : _d, props = __rest(_a, ["id", "className", "children", "scaling", "radius", "size", "color", "appearance", "indeterminate"]);
85
- var checkboxClassName = cn(CheckboxVariants({ scaling: scaling, size: size, radius: radius }), checkboxAppearanceStyle(appearance, color, indeterminate), className);
86
- return (_jsxs("div", { className: "flex items-center", children: [_jsx(CheckboxPrimitive.Root, __assign({ id: id, ref: ref, className: checkboxClassName }, props, { children: _jsx(CheckboxPrimitive.Indicator, { className: cn('flex items-center justify-center text-current stroke-[0.5px]'), children: indeterminate ? (_jsx(MinusIcon, { className: cn(CheckboxIndicatorVariants({ scaling: scaling, size: size }), 'w-3') })) : (_jsx(CheckIcon, { className: cn(CheckboxIndicatorVariants({ scaling: scaling, size: size })) })) }) })), children && (_jsx(Label, { className: cn(CheckboxLabelVariants({ scaling: scaling, size: size }), className), htmlFor: id, children: children }))] }));
86
+ var theme = useTheme().theme;
87
+ var checkboxStyle = {
88
+ radius: theme.themeRadius || radius,
89
+ scaling: theme.themeScaling || scaling,
90
+ color: theme.themeColor || color,
91
+ size: size,
92
+ };
93
+ var checkboxClassName = cn(CheckboxVariants(checkboxStyle), checkboxAppearanceStyle(appearance, checkboxStyle.color, indeterminate), className);
94
+ return (_jsxs("div", { className: "flex items-center", children: [_jsx(CheckboxPrimitive.Root, __assign({ id: id, ref: ref, className: checkboxClassName }, props, { children: _jsx(CheckboxPrimitive.Indicator, { className: cn('flex items-center justify-center stroke-[0.5px] text-current'), children: indeterminate ? (_jsx(MinusIcon, { className: cn(CheckboxIndicatorVariants({ scaling: scaling, size: size }), 'w-3') })) : (_jsx(CheckIcon, { className: cn(CheckboxIndicatorVariants({ scaling: scaling, size: size })) })) }) })), children && (_jsx(Label, { className: cn(CheckboxLabelVariants({ scaling: scaling, size: size }), className), htmlFor: id, children: children }))] }));
87
95
  });
88
96
  Checkbox.displayName = 'Checkbox';
89
97
  export default Checkbox;
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as a}from"react";import{cva as i}from"class-variance-authority";import*as s from"@radix-ui/react-checkbox";import{MinusIcon as t,CheckIcon as l}from"@radix-ui/react-icons";import{Label as c}from"../Label/index.mjs";import{cn as n}from"../../utils/utils.mjs";import{radiusVariants as m,scalingVariants as o,textColorStyle as d,checkboxAppearanceStyle as u}from"../../constants.mjs";var f=function(){return f=Object.assign||function(e){for(var r,a=1,i=arguments.length;a<i;a++)for(var s in r=arguments[a])Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s]);return e},f.apply(this,arguments)},p=function(e,r){var a={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(a[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)r.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(a[i[s]]=e[i[s]])}return a},g=i("peer ring-offset-background",{variants:{size:{small:"h-3.5 w-3.5 mr-2",medium:"h-4 w-4 mr-2",large:"h-5 w-5 mr-3"},scaling:{"90%":"scale-90 mr-1.5","95%":"scale-95 mr-2","100%":"scale-100 mr-2","105%":"scale-105 mr-2.5","110%":"scale-110 mr-3"},radius:f({},m.small)},defaultVariants:{radius:"medium",size:"medium",scaling:"100%"}}),h=i("stroke-current",{variants:{size:{small:"w-3.5",medium:"w-4",large:"w-5"},scaling:f({},o)},defaultVariants:{size:"medium",scaling:"100%"}}),x=i("",{variants:{size:{small:"text-xs",medium:"text-sm",large:"text-base"},scaling:f({},o),color:d()},defaultVariants:{size:"medium",scaling:"100%",color:"black"}}),b=a((function(a,i){var m=a.id,o=a.className,d=a.children,b=a.scaling,v=a.radius,y=a.size,z=a.color,O=void 0===z?"red":z,j=a.appearance,w=void 0===j?"surface":j,N=a.indeterminate,k=void 0!==N&&N,P=p(a,["id","className","children","scaling","radius","size","color","appearance","indeterminate"]),V=n(g({scaling:b,size:y,radius:v}),u(w,O,k),o);return e("div",{className:"flex items-center",children:[r(s.Root,f({id:m,ref:i,className:V},P,{children:r(s.Indicator,{className:n("flex items-center justify-center text-current stroke-[0.5px]"),children:k?r(t,{className:n(h({scaling:b,size:y}),"w-3")}):r(l,{className:n(h({scaling:b,size:y}))})})})),d&&r(c,{className:n(x({scaling:b,size:y}),o),htmlFor:m,children:d})]})}));b.displayName="Checkbox";export{b as Checkbox,g as CheckboxVariants,b as default};
1
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as a}from"react";import{cva as i}from"class-variance-authority";import*as s from"@radix-ui/react-checkbox";import{MinusIcon as t,CheckIcon as l}from"@radix-ui/react-icons";import{Label as c}from"../Label/index.mjs";import{cn as m}from"../../utils/utils.mjs";import{radiusVariants as o,scalingVariants as n,textColorStyle as d,checkboxAppearanceStyle as u}from"../../constants.mjs";import{useTheme as f}from"../../theme/ThemeProvider.mjs";var p=function(){return p=Object.assign||function(e){for(var r,a=1,i=arguments.length;a<i;a++)for(var s in r=arguments[a])Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s]);return e},p.apply(this,arguments)},h=function(e,r){var a={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(a[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)r.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(a[i[s]]=e[i[s]])}return a},g=i("peer ring-offset-background",{variants:{size:{small:"h-3.5 w-3.5 mr-2",medium:"h-4 w-4 mr-2",large:"h-5 w-5 mr-3"},scaling:{"90%":"scale-90 mr-1.5","95%":"scale-95 mr-2","100%":"scale-100 mr-2","105%":"scale-105 mr-2.5","110%":"scale-110 mr-3"},radius:p({},o.small)},defaultVariants:{radius:"medium",size:"medium",scaling:"100%"}}),x=i("stroke-current",{variants:{size:{small:"w-3.5",medium:"w-4",large:"w-5"},scaling:p({},n)},defaultVariants:{size:"medium",scaling:"100%"}}),v=i("",{variants:{size:{small:"text-xs",medium:"text-sm",large:"text-base"},scaling:p({},n),color:d()},defaultVariants:{size:"medium",scaling:"100%",color:"black"}}),b=a((function(a,i){var o=a.id,n=a.className,d=a.children,b=a.scaling,y=a.radius,j=a.size,z=a.color,O=void 0===z?"red":z,w=a.appearance,N=void 0===w?"surface":w,k=a.indeterminate,P=void 0!==k&&k,S=h(a,["id","className","children","scaling","radius","size","color","appearance","indeterminate"]),V=f().theme,C={radius:V.themeRadius||y,scaling:V.themeScaling||b,color:V.themeColor||O,size:j},I=m(g(C),u(N,C.color,P),n);return e("div",{className:"flex items-center",children:[r(s.Root,p({id:o,ref:i,className:I},S,{children:r(s.Indicator,{className:m("flex items-center justify-center stroke-[0.5px] text-current"),children:P?r(t,{className:m(x({scaling:b,size:j}),"w-3")}):r(l,{className:m(x({scaling:b,size:j}))})})})),d&&r(c,{className:m(v({scaling:b,size:j}),n),htmlFor:o,children:d})]})}));b.displayName="Checkbox";export{b as Checkbox,g as CheckboxVariants,b as default};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../lib/components/Checkbox/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 { forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { CheckIcon, MinusIcon } from '@radix-ui/react-icons';\nimport { Label } from '../../../lib/components/Label';\nimport { cn } from '../../../lib/utils/utils';\nimport { checkboxAppearanceStyle, radiusVariants, scalingVariants, textColorStyle, } from '../../../lib/constants';\nexport var CheckboxVariants = cva(\"peer ring-offset-background\", {\n variants: {\n size: {\n small: 'h-3.5 w-3.5 mr-2',\n medium: 'h-4 w-4 mr-2',\n large: 'h-5 w-5 mr-3',\n },\n scaling: {\n '90%': 'scale-90 mr-1.5',\n '95%': 'scale-95 mr-2',\n '100%': 'scale-100 mr-2',\n '105%': 'scale-105 mr-2.5',\n '110%': 'scale-110 mr-3',\n },\n radius: __assign({}, radiusVariants['small']),\n },\n defaultVariants: {\n radius: 'medium',\n size: 'medium',\n scaling: '100%',\n },\n});\nvar CheckboxIndicatorVariants = cva('stroke-current', {\n variants: {\n size: {\n small: 'w-3.5',\n medium: 'w-4',\n large: 'w-5',\n },\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n size: 'medium',\n scaling: '100%',\n },\n});\nvar CheckboxLabelVariants = cva('', {\n variants: {\n size: {\n small: 'text-xs',\n medium: 'text-sm',\n large: 'text-base',\n },\n scaling: __assign({}, scalingVariants),\n color: textColorStyle(),\n },\n defaultVariants: {\n size: 'medium',\n scaling: '100%',\n color: 'black',\n },\n});\nexport var Checkbox = forwardRef(function (_a, ref) {\n var id = _a.id, className = _a.className, children = _a.children, scaling = _a.scaling, radius = _a.radius, size = _a.size, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'surface' : _c, _d = _a.indeterminate, indeterminate = _d === void 0 ? false : _d, props = __rest(_a, [\"id\", \"className\", \"children\", \"scaling\", \"radius\", \"size\", \"color\", \"appearance\", \"indeterminate\"]);\n var checkboxClassName = cn(CheckboxVariants({ scaling: scaling, size: size, radius: radius }), checkboxAppearanceStyle(appearance, color, indeterminate), className);\n return (_jsxs(\"div\", { className: \"flex items-center\", children: [_jsx(CheckboxPrimitive.Root, __assign({ id: id, ref: ref, className: checkboxClassName }, props, { children: _jsx(CheckboxPrimitive.Indicator, { className: cn('flex items-center justify-center text-current stroke-[0.5px]'), children: indeterminate ? (_jsx(MinusIcon, { className: cn(CheckboxIndicatorVariants({ scaling: scaling, size: size }), 'w-3') })) : (_jsx(CheckIcon, { className: cn(CheckboxIndicatorVariants({ scaling: scaling, size: size })) })) }) })), children && (_jsx(Label, { className: cn(CheckboxLabelVariants({ scaling: scaling, size: size }), className), htmlFor: id, children: children }))] }));\n});\nCheckbox.displayName = 'Checkbox';\nexport default Checkbox;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","CheckboxVariants","cva","variants","size","small","medium","large","scaling","radius","radiusVariants","defaultVariants","CheckboxIndicatorVariants","scalingVariants","CheckboxLabelVariants","color","textColorStyle","Checkbox","forwardRef","_a","ref","id","className","children","_b","_c","appearance","_d","indeterminate","props","checkboxClassName","cn","checkboxAppearanceStyle","_jsxs","_jsx","CheckboxPrimitive","Root","Indicator","MinusIcon","CheckIcon","Label","htmlFor","displayName"],"mappings":"icAAA,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,EAAE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AAO,CAAEX,UAAW,oBAAqBC,SAAU,CAACW,EAAKC,EAAkBC,KAAMvD,EAAS,CAAEwC,GAAIA,EAAID,IAAKA,EAAKE,UAAWQ,GAAqBD,EAAO,CAAEN,SAAUW,EAAKC,EAAkBE,UAAW,CAAEf,UAAWS,EAAG,gEAAiER,SAAUK,EAAiBM,EAAKI,EAAW,CAAEhB,UAAWS,EAAGnB,EAA0B,CAAEJ,QAASA,EAASJ,KAAMA,IAAS,SAAc8B,EAAKK,EAAW,CAAEjB,UAAWS,EAAGnB,EAA0B,CAAEJ,QAASA,EAASJ,KAAMA,YAAqBmB,GAAaW,EAAKM,EAAO,CAAElB,UAAWS,EAAGjB,EAAsB,CAAEN,QAASA,EAASJ,KAAMA,IAASkB,GAAYmB,QAASpB,EAAIE,SAAUA,MAC1pB,IACAN,EAASyB,YAAc"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../lib/components/Checkbox/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 { forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { CheckIcon, MinusIcon } from '@radix-ui/react-icons';\nimport { Label } from '../../../lib/components/Label';\nimport { cn } from '../../../lib/utils/utils';\nimport { checkboxAppearanceStyle, radiusVariants, scalingVariants, textColorStyle, } from '../../../lib/constants';\nimport { useTheme } from '../../../lib/theme';\nexport var CheckboxVariants = cva(\"peer ring-offset-background\", {\n variants: {\n size: {\n small: 'h-3.5 w-3.5 mr-2',\n medium: 'h-4 w-4 mr-2',\n large: 'h-5 w-5 mr-3',\n },\n scaling: {\n '90%': 'scale-90 mr-1.5',\n '95%': 'scale-95 mr-2',\n '100%': 'scale-100 mr-2',\n '105%': 'scale-105 mr-2.5',\n '110%': 'scale-110 mr-3',\n },\n radius: __assign({}, radiusVariants['small']),\n },\n defaultVariants: {\n radius: 'medium',\n size: 'medium',\n scaling: '100%',\n },\n});\nvar CheckboxIndicatorVariants = cva('stroke-current', {\n variants: {\n size: {\n small: 'w-3.5',\n medium: 'w-4',\n large: 'w-5',\n },\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n size: 'medium',\n scaling: '100%',\n },\n});\nvar CheckboxLabelVariants = cva('', {\n variants: {\n size: {\n small: 'text-xs',\n medium: 'text-sm',\n large: 'text-base',\n },\n scaling: __assign({}, scalingVariants),\n color: textColorStyle(),\n },\n defaultVariants: {\n size: 'medium',\n scaling: '100%',\n color: 'black',\n },\n});\nexport var Checkbox = forwardRef(function (_a, ref) {\n var id = _a.id, className = _a.className, children = _a.children, scaling = _a.scaling, radius = _a.radius, size = _a.size, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'surface' : _c, _d = _a.indeterminate, indeterminate = _d === void 0 ? false : _d, props = __rest(_a, [\"id\", \"className\", \"children\", \"scaling\", \"radius\", \"size\", \"color\", \"appearance\", \"indeterminate\"]);\n var theme = useTheme().theme;\n var checkboxStyle = {\n radius: theme.themeRadius || radius,\n scaling: theme.themeScaling || scaling,\n color: theme.themeColor || color,\n size: size,\n };\n var checkboxClassName = cn(CheckboxVariants(checkboxStyle), checkboxAppearanceStyle(appearance, checkboxStyle.color, indeterminate), className);\n return (_jsxs(\"div\", { className: \"flex items-center\", children: [_jsx(CheckboxPrimitive.Root, __assign({ id: id, ref: ref, className: checkboxClassName }, props, { children: _jsx(CheckboxPrimitive.Indicator, { className: cn('flex items-center justify-center stroke-[0.5px] text-current'), children: indeterminate ? (_jsx(MinusIcon, { className: cn(CheckboxIndicatorVariants({ scaling: scaling, size: size }), 'w-3') })) : (_jsx(CheckIcon, { className: cn(CheckboxIndicatorVariants({ scaling: scaling, size: size })) })) }) })), children && (_jsx(Label, { className: cn(CheckboxLabelVariants({ scaling: scaling, size: size }), className), htmlFor: id, children: children }))] }));\n});\nCheckbox.displayName = 'Checkbox';\nexport default Checkbox;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","CheckboxVariants","cva","variants","size","small","medium","large","scaling","radius","radiusVariants","defaultVariants","CheckboxIndicatorVariants","scalingVariants","CheckboxLabelVariants","color","textColorStyle","Checkbox","forwardRef","_a","ref","id","className","children","_b","_c","appearance","_d","indeterminate","props","theme","useTheme","checkboxStyle","themeRadius","themeScaling","themeColor","checkboxClassName","cn","checkboxAppearanceStyle","_jsxs","_jsx","CheckboxPrimitive","Root","Indicator","MinusIcon","CheckIcon","Label","htmlFor","displayName"],"mappings":"0fAAA,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,EAAO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,IAAPS,EAAgB,MAAQA,EAAIC,EAAKN,EAAGO,WAAYA,OAAoB,IAAPD,EAAgB,UAAYA,EAAIE,EAAKR,EAAGS,cAAeA,OAAuB,IAAPD,GAAwBA,EAAIE,EAAQjC,EAAOuB,EAAI,CAAC,KAAM,YAAa,WAAY,UAAW,SAAU,OAAQ,QAAS,aAAc,kBACtZW,EAAQC,IAAWD,MACnBE,EAAgB,CAChBvB,OAAQqB,EAAMG,aAAexB,EAC7BD,QAASsB,EAAMI,cAAgB1B,EAC/BO,MAAOe,EAAMK,YAAcpB,EAC3BX,KAAMA,GAENgC,EAAoBC,EAAGpC,EAAiB+B,GAAgBM,EAAwBZ,EAAYM,EAAcjB,MAAOa,GAAgBN,GACrI,OAAQiB,EAAM,MAAO,CAAEjB,UAAW,oBAAqBC,SAAU,CAACiB,EAAKC,EAAkBC,KAAM7D,EAAS,CAAEwC,GAAIA,EAAID,IAAKA,EAAKE,UAAWc,GAAqBP,EAAO,CAAEN,SAAUiB,EAAKC,EAAkBE,UAAW,CAAErB,UAAWe,EAAG,gEAAiEd,SAAUK,EAAiBY,EAAKI,EAAW,CAAEtB,UAAWe,EAAGzB,EAA0B,CAAEJ,QAASA,EAASJ,KAAMA,IAAS,SAAcoC,EAAKK,EAAW,CAAEvB,UAAWe,EAAGzB,EAA0B,CAAEJ,QAASA,EAASJ,KAAMA,YAAqBmB,GAAaiB,EAAKM,EAAO,CAAExB,UAAWe,EAAGvB,EAAsB,CAAEN,QAASA,EAASJ,KAAMA,IAASkB,GAAYyB,QAAS1B,EAAIE,SAAUA,MAC1pB,IACAN,EAAS+B,YAAc"}
@@ -12,7 +12,7 @@ export interface CheckboxCardProps extends React.HTMLAttributes<HTMLDivElement>,
12
12
  ariaDisabled?: boolean;
13
13
  }
14
14
  export declare const CheckboxCardVariants: (props?: ({
15
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
15
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
16
16
  size?: "small" | "medium" | "large" | null | undefined;
17
17
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
18
18
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -27,6 +27,7 @@ import Checkbox from '../../../lib/components/Checkbox';
27
27
  import { Label } from '../../../lib/components/Label';
28
28
  import { cn } from '../../../lib/utils/utils';
29
29
  import { scalingVariants } from '../../../lib/constants';
30
+ import { useTheme } from '../../../lib/theme';
30
31
  export var CheckboxCardVariants = cva("flex justify-between space-x-2 w-fit min-w-[200px] border border-slate-7 text-slate-12\n hover:border-slate-8 hover:cursor-pointer aria-disabled:bg-slate-3 aria-disabled:cursor-not-allowed aria-disabled:text-slateA-9\n dark:border-slateDark-6 dark:text-slateDark-12 dark:hover:border-slateDark-7\n dark:aria-disabled:bg-slateDark-3 dark:aria-disabled:text-slateDarkA-8", {
31
32
  variants: {
32
33
  radius: {
@@ -51,7 +52,13 @@ export var CheckboxCardVariants = cva("flex justify-between space-x-2 w-fit min-
51
52
  });
52
53
  var CheckboxCard = forwardRef(function (_a, ref) {
53
54
  var className = _a.className, children = _a.children, size = _a.size, scaling = _a.scaling, radius = _a.radius, color = _a.color, _b = _a.appearance, appearance = _b === void 0 ? 'surface' : _b, id = _a.id, disabled = _a.disabled, props = __rest(_a, ["className", "children", "size", "scaling", "radius", "color", "appearance", "id", "disabled"]);
54
- var labelClassName = cn(CheckboxCardVariants({ size: size, radius: radius, scaling: scaling }), appearance === 'classic' ? 'shadow-card-classic dark:shadow-card-dark-classic' : '', className);
55
+ var theme = useTheme().theme;
56
+ var checkboxCardStyle = {
57
+ radius: theme.themeRadius || radius,
58
+ scaling: theme.themeScaling || scaling,
59
+ size: size,
60
+ };
61
+ var labelClassName = cn(CheckboxCardVariants(checkboxCardStyle), appearance === 'classic' ? 'shadow-card-classic dark:shadow-card-dark-classic' : '', className);
55
62
  return (_jsxs(Label, { htmlFor: id, className: labelClassName, "aria-disabled": disabled, children: [children, _jsx(Checkbox, __assign({ className: "mr-0", ref: ref, id: id, size: size, scaling: scaling, radius: radius, color: color, disabled: disabled, appearance: appearance === 'classic' ? 'classic' : 'surface' }, props))] }));
56
63
  });
57
64
  CheckboxCard.displayName = 'CheckboxCard';
@@ -1,2 +1,2 @@
1
- import{jsxs as a,jsx as r}from"react/jsx-runtime";import{forwardRef as e}from"react";import{cva as s}from"class-variance-authority";import{Checkbox as t}from"../Checkbox/index.mjs";import{Label as i}from"../Label/index.mjs";import{cn as l}from"../../utils/utils.mjs";import{scalingVariants as d}from"../../constants.mjs";var o=function(){return o=Object.assign||function(a){for(var r,e=1,s=arguments.length;e<s;e++)for(var t in r=arguments[e])Object.prototype.hasOwnProperty.call(r,t)&&(a[t]=r[t]);return a},o.apply(this,arguments)},n=function(a,r){var e={};for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&r.indexOf(s)<0&&(e[s]=a[s]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(s=Object.getOwnPropertySymbols(a);t<s.length;t++)r.indexOf(s[t])<0&&Object.prototype.propertyIsEnumerable.call(a,s[t])&&(e[s[t]]=a[s[t]])}return e},c=s("flex justify-between space-x-2 w-fit min-w-[200px] border border-slate-7 text-slate-12\n hover:border-slate-8 hover:cursor-pointer aria-disabled:bg-slate-3 aria-disabled:cursor-not-allowed aria-disabled:text-slateA-9\n dark:border-slateDark-6 dark:text-slateDark-12 dark:hover:border-slateDark-7\n dark:aria-disabled:bg-slateDark-3 dark:aria-disabled:text-slateDarkA-8",{variants:{radius:{none:"rounded-none",small:"rounded-[3px]",medium:"rounded",large:"rounded-md",full:"rounded-md"},size:{small:"text-sm px-3 py-2.5",medium:"text-sm px-4 py-3.5",large:"text-base px-6 py-[20px]"},scaling:o({},d)},defaultVariants:{radius:"medium",scaling:"100%",size:"medium"}}),m=e((function(e,s){var d=e.className,m=e.children,p=e.size,u=e.scaling,b=e.radius,f=e.color,x=e.appearance,y=void 0===x?"surface":x,h=e.id,g=e.disabled,k=n(e,["className","children","size","scaling","radius","color","appearance","id","disabled"]),v=l(c({size:p,radius:b,scaling:u}),"classic"===y?"shadow-card-classic dark:shadow-card-dark-classic":"",d);return a(i,{htmlFor:h,className:v,"aria-disabled":g,children:[m,r(t,o({className:"mr-0",ref:s,id:h,size:p,scaling:u,radius:b,color:f,disabled:g,appearance:"classic"===y?"classic":"surface"},k))]})}));m.displayName="CheckboxCard";export{c as CheckboxCardVariants,m as default};
1
+ import{jsxs as e,jsx as a}from"react/jsx-runtime";import{forwardRef as r}from"react";import{cva as s}from"class-variance-authority";import{Checkbox as t}from"../Checkbox/index.mjs";import{Label as i}from"../Label/index.mjs";import{cn as o}from"../../utils/utils.mjs";import{scalingVariants as d}from"../../constants.mjs";import{useTheme as l}from"../../theme/ThemeProvider.mjs";var n=function(){return n=Object.assign||function(e){for(var a,r=1,s=arguments.length;r<s;r++)for(var t in a=arguments[r])Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t]);return e},n.apply(this,arguments)},c=function(e,a){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&a.indexOf(s)<0&&(r[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(s=Object.getOwnPropertySymbols(e);t<s.length;t++)a.indexOf(s[t])<0&&Object.prototype.propertyIsEnumerable.call(e,s[t])&&(r[s[t]]=e[s[t]])}return r},m=s("flex justify-between space-x-2 w-fit min-w-[200px] border border-slate-7 text-slate-12\n hover:border-slate-8 hover:cursor-pointer aria-disabled:bg-slate-3 aria-disabled:cursor-not-allowed aria-disabled:text-slateA-9\n dark:border-slateDark-6 dark:text-slateDark-12 dark:hover:border-slateDark-7\n dark:aria-disabled:bg-slateDark-3 dark:aria-disabled:text-slateDarkA-8",{variants:{radius:{none:"rounded-none",small:"rounded-[3px]",medium:"rounded",large:"rounded-md",full:"rounded-md"},size:{small:"text-sm px-3 py-2.5",medium:"text-sm px-4 py-3.5",large:"text-base px-6 py-[20px]"},scaling:n({},d)},defaultVariants:{radius:"medium",scaling:"100%",size:"medium"}}),p=r((function(r,s){var d=r.className,p=r.children,u=r.size,b=r.scaling,f=r.radius,x=r.color,h=r.appearance,y=void 0===h?"surface":h,g=r.id,k=r.disabled,v=c(r,["className","children","size","scaling","radius","color","appearance","id","disabled"]),j=l().theme,O={radius:j.themeRadius||f,scaling:j.themeScaling||b,size:u},w=o(m(O),"classic"===y?"shadow-card-classic dark:shadow-card-dark-classic":"",d);return e(i,{htmlFor:g,className:w,"aria-disabled":k,children:[p,a(t,n({className:"mr-0",ref:s,id:g,size:u,scaling:b,radius:f,color:x,disabled:k,appearance:"classic"===y?"classic":"surface"},v))]})}));p.displayName="CheckboxCard";export{m as CheckboxCardVariants,p as default};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../lib/components/CheckboxCard/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 { forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport Checkbox from '../../../lib/components/Checkbox';\nimport { Label } from '../../../lib/components/Label';\nimport { cn } from '../../../lib/utils/utils';\nimport { scalingVariants } from '../../../lib/constants';\nexport var CheckboxCardVariants = cva(\"flex justify-between space-x-2 w-fit min-w-[200px] border border-slate-7 text-slate-12\\n hover:border-slate-8 hover:cursor-pointer aria-disabled:bg-slate-3 aria-disabled:cursor-not-allowed aria-disabled:text-slateA-9\\n dark:border-slateDark-6 dark:text-slateDark-12 dark:hover:border-slateDark-7\\n dark:aria-disabled:bg-slateDark-3 dark:aria-disabled:text-slateDarkA-8\", {\n variants: {\n radius: {\n none: 'rounded-none',\n small: 'rounded-[3px]',\n medium: 'rounded',\n large: 'rounded-md',\n full: 'rounded-md',\n },\n size: {\n small: 'text-sm px-3 py-2.5',\n medium: 'text-sm px-4 py-3.5',\n large: 'text-base px-6 py-[20px]',\n },\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n radius: 'medium',\n scaling: '100%',\n size: 'medium',\n },\n});\nvar CheckboxCard = forwardRef(function (_a, ref) {\n var className = _a.className, children = _a.children, size = _a.size, scaling = _a.scaling, radius = _a.radius, color = _a.color, _b = _a.appearance, appearance = _b === void 0 ? 'surface' : _b, id = _a.id, disabled = _a.disabled, props = __rest(_a, [\"className\", \"children\", \"size\", \"scaling\", \"radius\", \"color\", \"appearance\", \"id\", \"disabled\"]);\n var labelClassName = cn(CheckboxCardVariants({ size: size, radius: radius, scaling: scaling }), appearance === 'classic' ? 'shadow-card-classic dark:shadow-card-dark-classic' : '', className);\n return (_jsxs(Label, { htmlFor: id, className: labelClassName, \"aria-disabled\": disabled, children: [children, _jsx(Checkbox, __assign({ className: \"mr-0\", ref: ref, id: id, size: size, scaling: scaling, radius: radius, color: color, disabled: disabled, appearance: appearance === 'classic' ? 'classic' : 'surface' }, props))] }));\n});\nCheckboxCard.displayName = 'CheckboxCard';\nexport default CheckboxCard;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","CheckboxCardVariants","cva","variants","radius","none","small","medium","large","full","size","scaling","scalingVariants","defaultVariants","CheckboxCard","forwardRef","_a","ref","className","children","color","_b","appearance","id","disabled","props","labelClassName","cn","_jsxs","Label","htmlFor","_jsx","Checkbox","displayName"],"mappings":"iUAAA,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,EAQWiB,EAAuBC,EAAI,4XAA6X,CAC/ZC,SAAU,CACNC,OAAQ,CACJC,KAAM,eACNC,MAAO,gBACPC,OAAQ,UACRC,MAAO,aACPC,KAAM,cAEVC,KAAM,CACFJ,MAAO,sBACPC,OAAQ,sBACRC,MAAO,4BAEXG,QAAS9B,EAAS,CAAE,EAAE+B,IAE1BC,gBAAiB,CACbT,OAAQ,SACRO,QAAS,OACTD,KAAM,YAGVI,EAAeC,GAAW,SAAUC,EAAIC,GACxC,IAAIC,EAAYF,EAAGE,UAAWC,EAAWH,EAAGG,SAAUT,EAAOM,EAAGN,KAAMC,EAAUK,EAAGL,QAASP,EAASY,EAAGZ,OAAQgB,EAAQJ,EAAGI,MAAOC,EAAKL,EAAGM,WAAYA,OAAoB,IAAPD,EAAgB,UAAYA,EAAIE,EAAKP,EAAGO,GAAIC,EAAWR,EAAGQ,SAAUC,EAAQ7B,EAAOoB,EAAI,CAAC,YAAa,WAAY,OAAQ,UAAW,SAAU,QAAS,aAAc,KAAM,aAC1UU,EAAiBC,EAAG1B,EAAqB,CAAES,KAAMA,EAAMN,OAAQA,EAAQO,QAASA,IAA2B,YAAfW,EAA2B,oDAAsD,GAAIJ,GACrL,OAAQU,EAAMC,EAAO,CAAEC,QAASP,EAAIL,UAAWQ,EAAgB,gBAAiBF,EAAUL,SAAU,CAACA,EAAUY,EAAKC,EAAUnD,EAAS,CAAEqC,UAAW,OAAQD,IAAKA,EAAKM,GAAIA,EAAIb,KAAMA,EAAMC,QAASA,EAASP,OAAQA,EAAQgB,MAAOA,EAAOI,SAAUA,EAAUF,WAA2B,YAAfA,EAA2B,UAAY,WAAaG,MAClU,IACAX,EAAamB,YAAc"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../lib/components/CheckboxCard/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 { forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport Checkbox from '../../../lib/components/Checkbox';\nimport { Label } from '../../../lib/components/Label';\nimport { cn } from '../../../lib/utils/utils';\nimport { scalingVariants } from '../../../lib/constants';\nimport { useTheme } from '../../../lib/theme';\nexport var CheckboxCardVariants = cva(\"flex justify-between space-x-2 w-fit min-w-[200px] border border-slate-7 text-slate-12\\n hover:border-slate-8 hover:cursor-pointer aria-disabled:bg-slate-3 aria-disabled:cursor-not-allowed aria-disabled:text-slateA-9\\n dark:border-slateDark-6 dark:text-slateDark-12 dark:hover:border-slateDark-7\\n dark:aria-disabled:bg-slateDark-3 dark:aria-disabled:text-slateDarkA-8\", {\n variants: {\n radius: {\n none: 'rounded-none',\n small: 'rounded-[3px]',\n medium: 'rounded',\n large: 'rounded-md',\n full: 'rounded-md',\n },\n size: {\n small: 'text-sm px-3 py-2.5',\n medium: 'text-sm px-4 py-3.5',\n large: 'text-base px-6 py-[20px]',\n },\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n radius: 'medium',\n scaling: '100%',\n size: 'medium',\n },\n});\nvar CheckboxCard = forwardRef(function (_a, ref) {\n var className = _a.className, children = _a.children, size = _a.size, scaling = _a.scaling, radius = _a.radius, color = _a.color, _b = _a.appearance, appearance = _b === void 0 ? 'surface' : _b, id = _a.id, disabled = _a.disabled, props = __rest(_a, [\"className\", \"children\", \"size\", \"scaling\", \"radius\", \"color\", \"appearance\", \"id\", \"disabled\"]);\n var theme = useTheme().theme;\n var checkboxCardStyle = {\n radius: theme.themeRadius || radius,\n scaling: theme.themeScaling || scaling,\n size: size,\n };\n var labelClassName = cn(CheckboxCardVariants(checkboxCardStyle), appearance === 'classic' ? 'shadow-card-classic dark:shadow-card-dark-classic' : '', className);\n return (_jsxs(Label, { htmlFor: id, className: labelClassName, \"aria-disabled\": disabled, children: [children, _jsx(Checkbox, __assign({ className: \"mr-0\", ref: ref, id: id, size: size, scaling: scaling, radius: radius, color: color, disabled: disabled, appearance: appearance === 'classic' ? 'classic' : 'surface' }, props))] }));\n});\nCheckboxCard.displayName = 'CheckboxCard';\nexport default CheckboxCard;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","CheckboxCardVariants","cva","variants","radius","none","small","medium","large","full","size","scaling","scalingVariants","defaultVariants","CheckboxCard","forwardRef","_a","ref","className","children","color","_b","appearance","id","disabled","props","theme","useTheme","checkboxCardStyle","themeRadius","themeScaling","labelClassName","cn","_jsxs","Label","htmlFor","_jsx","Checkbox","displayName"],"mappings":"0XAAA,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,EASWiB,EAAuBC,EAAI,4XAA6X,CAC/ZC,SAAU,CACNC,OAAQ,CACJC,KAAM,eACNC,MAAO,gBACPC,OAAQ,UACRC,MAAO,aACPC,KAAM,cAEVC,KAAM,CACFJ,MAAO,sBACPC,OAAQ,sBACRC,MAAO,4BAEXG,QAAS9B,EAAS,CAAE,EAAE+B,IAE1BC,gBAAiB,CACbT,OAAQ,SACRO,QAAS,OACTD,KAAM,YAGVI,EAAeC,GAAW,SAAUC,EAAIC,GACxC,IAAIC,EAAYF,EAAGE,UAAWC,EAAWH,EAAGG,SAAUT,EAAOM,EAAGN,KAAMC,EAAUK,EAAGL,QAASP,EAASY,EAAGZ,OAAQgB,EAAQJ,EAAGI,MAAOC,EAAKL,EAAGM,WAAYA,OAAoB,IAAPD,EAAgB,UAAYA,EAAIE,EAAKP,EAAGO,GAAIC,EAAWR,EAAGQ,SAAUC,EAAQ7B,EAAOoB,EAAI,CAAC,YAAa,WAAY,OAAQ,UAAW,SAAU,QAAS,aAAc,KAAM,aAC1UU,EAAQC,IAAWD,MACnBE,EAAoB,CACpBxB,OAAQsB,EAAMG,aAAezB,EAC7BO,QAASe,EAAMI,cAAgBnB,EAC/BD,KAAMA,GAENqB,EAAiBC,EAAG/B,EAAqB2B,GAAmC,YAAfN,EAA2B,oDAAsD,GAAIJ,GACtJ,OAAQe,EAAMC,EAAO,CAAEC,QAASZ,EAAIL,UAAWa,EAAgB,gBAAiBP,EAAUL,SAAU,CAACA,EAAUiB,EAAKC,EAAUxD,EAAS,CAAEqC,UAAW,OAAQD,IAAKA,EAAKM,GAAIA,EAAIb,KAAMA,EAAMC,QAASA,EAASP,OAAQA,EAAQgB,MAAOA,EAAOI,SAAUA,EAAUF,WAA2B,YAAfA,EAA2B,UAAY,WAAaG,MAClU,IACAX,EAAawB,YAAc"}
@@ -1,8 +1,10 @@
1
+ 'use client';
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import React, { Children, createContext, forwardRef, useContext, useMemo, } from 'react';
3
+ import React, { Children, createContext, forwardRef, useContext, } from 'react';
3
4
  import { CheckboxGroup as CheckboxGroupTheme } from '@radix-ui/themes';
4
5
  import { cva } from 'class-variance-authority';
5
6
  import { cn } from '../../../lib/utils/utils';
7
+ import { useTheme } from '../../../lib/theme';
6
8
  export var CheckboxGroupVariants = cva("", {
7
9
  variants: {
8
10
  size: {
@@ -27,7 +29,14 @@ export var useCheckboxGroupContext = function () {
27
29
  };
28
30
  export var CheckboxGroupRoot = forwardRef(function (_a, ref) {
29
31
  var className = _a.className, children = _a.children, defaultValue = _a.defaultValue, scaling = _a.scaling, size = _a.size, color = _a.color, radius = _a.radius, appearance = _a.appearance;
30
- var contextValue = useMemo(function () { return ({ scaling: scaling, size: size, color: color, radius: radius, appearance: appearance }); }, [scaling, size, color, radius, appearance]);
32
+ var theme = useTheme().theme;
33
+ var contextValue = {
34
+ radius: theme.themeRadius || radius,
35
+ scaling: theme.themeScaling || scaling,
36
+ color: theme.themeColor || color,
37
+ size: size,
38
+ appearance: appearance,
39
+ };
31
40
  return (_jsx(CheckboxGroupContext.Provider, { value: contextValue, children: _jsx(CheckboxGroupTheme.Root, { ref: ref, defaultValue: defaultValue, className: cn(CheckboxGroupVariants({ size: size }), className), children: Children.map(children, function (child) { return React.cloneElement(child, { defaultValue: defaultValue }); }) }) }));
32
41
  });
33
42
  CheckboxGroupRoot.displayName = 'CheckboxGroup.Root';
@@ -1,2 +1,3 @@
1
- import{jsx as e}from"react/jsx-runtime";import a,{createContext as r,forwardRef as i,useMemo as s,Children as t,useContext as u}from"react";import{CheckboxGroup as o}from"@radix-ui/themes";import{cva as l}from"class-variance-authority";import{cn as c}from"../../utils/utils.mjs";var m=l("",{variants:{size:{small:"space-y-1",medium:"space-y-2",large:"space-y-3"}},defaultVariants:{size:"medium"}}),n=r({size:"medium",color:"red",scaling:"100%",radius:"medium",appearance:"surface"}),d=function(){return u(n)},p=i((function(r,i){var u=r.className,l=r.children,d=r.defaultValue,p=r.scaling,f=r.size,h=r.color,v=r.radius,z=r.appearance,y=s((function(){return{scaling:p,size:f,color:h,radius:v,appearance:z}}),[p,f,h,v,z]);return e(n.Provider,{value:y,children:e(o.Root,{ref:i,defaultValue:d,className:c(m({size:f}),u),children:t.map(l,(function(e){return a.cloneElement(e,{defaultValue:d})}))})})}));p.displayName="CheckboxGroup.Root";export{p as CheckboxGroupRoot,m as CheckboxGroupVariants,p as default,d as useCheckboxGroupContext};
1
+ "use client";
2
+ import{jsx as e}from"react/jsx-runtime";import a,{createContext as r,forwardRef as i,Children as m,useContext as t}from"react";import{CheckboxGroup as o}from"@radix-ui/themes";import{cva as s}from"class-variance-authority";import{cn as l}from"../../utils/utils.mjs";import{useTheme as u}from"../../theme/ThemeProvider.mjs";var c=s("",{variants:{size:{small:"space-y-1",medium:"space-y-2",large:"space-y-3"}},defaultVariants:{size:"medium"}}),n=r({size:"medium",color:"red",scaling:"100%",radius:"medium",appearance:"surface"}),d=function(){return t(n)},p=i((function(r,i){var t=r.className,s=r.children,d=r.defaultValue,p=r.scaling,f=r.size,h=r.color,v=r.radius,z=r.appearance,g=u().theme,y={radius:g.themeRadius||v,scaling:g.themeScaling||p,color:g.themeColor||h,size:f,appearance:z};return e(n.Provider,{value:y,children:e(o.Root,{ref:i,defaultValue:d,className:l(c({size:f}),t),children:m.map(s,(function(e){return a.cloneElement(e,{defaultValue:d})}))})})}));p.displayName="CheckboxGroup.Root";export{p as CheckboxGroupRoot,c as CheckboxGroupVariants,p as default,d as useCheckboxGroupContext};
2
3
  //# sourceMappingURL=CheckboxGroupRoot.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxGroupRoot.mjs","sources":["../../../lib/components/CheckboxGroup/CheckboxGroupRoot.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { Children, createContext, forwardRef, useContext, useMemo, } from 'react';\nimport { CheckboxGroup as CheckboxGroupTheme } from '@radix-ui/themes';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nexport var CheckboxGroupVariants = cva(\"\", {\n variants: {\n size: {\n small: 'space-y-1',\n medium: 'space-y-2',\n large: 'space-y-3',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\nvar CheckboxGroupContext = createContext({\n size: 'medium',\n color: 'red',\n scaling: '100%',\n radius: 'medium',\n appearance: 'surface',\n});\nexport var useCheckboxGroupContext = function () {\n return useContext(CheckboxGroupContext);\n};\nexport var CheckboxGroupRoot = forwardRef(function (_a, ref) {\n var className = _a.className, children = _a.children, defaultValue = _a.defaultValue, scaling = _a.scaling, size = _a.size, color = _a.color, radius = _a.radius, appearance = _a.appearance;\n var contextValue = useMemo(function () { return ({ scaling: scaling, size: size, color: color, radius: radius, appearance: appearance }); }, [scaling, size, color, radius, appearance]);\n return (_jsx(CheckboxGroupContext.Provider, { value: contextValue, children: _jsx(CheckboxGroupTheme.Root, { ref: ref, defaultValue: defaultValue, className: cn(CheckboxGroupVariants({ size: size }), className), children: Children.map(children, function (child) { return React.cloneElement(child, { defaultValue: defaultValue }); }) }) }));\n});\nCheckboxGroupRoot.displayName = 'CheckboxGroup.Root';\nexport default CheckboxGroupRoot;\n"],"names":["CheckboxGroupVariants","cva","variants","size","small","medium","large","defaultVariants","CheckboxGroupContext","createContext","color","scaling","radius","appearance","useCheckboxGroupContext","useContext","CheckboxGroupRoot","forwardRef","_a","ref","className","children","defaultValue","contextValue","useMemo","_jsx","Provider","value","CheckboxGroupTheme","Root","cn","Children","map","child","React","cloneElement","displayName"],"mappings":"uRAKU,IAACA,EAAwBC,EAAI,GAAI,CACvCC,SAAU,CACNC,KAAM,CACFC,MAAO,YACPC,OAAQ,YACRC,MAAO,cAGfC,gBAAiB,CACbJ,KAAM,YAGVK,EAAuBC,EAAc,CACrCN,KAAM,SACNO,MAAO,MACPC,QAAS,OACTC,OAAQ,SACRC,WAAY,YAELC,EAA0B,WACjC,OAAOC,EAAWP,EACtB,EACWQ,EAAoBC,GAAW,SAAUC,EAAIC,GACpD,IAAIC,EAAYF,EAAGE,UAAWC,EAAWH,EAAGG,SAAUC,EAAeJ,EAAGI,aAAcX,EAAUO,EAAGP,QAASR,EAAOe,EAAGf,KAAMO,EAAQQ,EAAGR,MAAOE,EAASM,EAAGN,OAAQC,EAAaK,EAAGL,WAC9KU,EAAeC,GAAQ,WAAc,OAAUb,QAASA,EAASR,KAAMA,EAAMO,MAAOA,EAAOE,OAAQA,EAAQC,WAAYA,EAAc,GAAI,CAACF,EAASR,EAAMO,EAAOE,EAAQC,IAC5K,OAAQY,EAAKjB,EAAqBkB,SAAU,CAAEC,MAAOJ,EAAcF,SAAUI,EAAKG,EAAmBC,KAAM,CAAEV,IAAKA,EAAKG,aAAcA,EAAcF,UAAWU,EAAG9B,EAAsB,CAAEG,KAAMA,IAASiB,GAAYC,SAAUU,EAASC,IAAIX,GAAU,SAAUY,GAAS,OAAOC,EAAMC,aAAaF,EAAO,CAAEX,aAAcA,GAAkB,OAC/U,IACAN,EAAkBoB,YAAc"}
1
+ {"version":3,"file":"CheckboxGroupRoot.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
4
4
  export interface ContextMenuContentProps extends VariantProps<typeof contextMenuContentVariants> {
5
5
  }
6
6
  export declare const contextMenuContentVariants: (props?: ({
7
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
7
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
8
8
  size?: "small" | "medium" | null | undefined;
9
9
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
10
10
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -6,7 +6,7 @@ export interface ContextMenuItemProps extends VariantProps<typeof contextMenuIte
6
6
  shortcut?: string;
7
7
  }
8
8
  export declare const contextMenuItemVariants: (props?: ({
9
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
9
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
10
10
  size?: "small" | "medium" | null | undefined;
11
11
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
12
12
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
4
4
  export interface ContextMenuItemIndicatorProps extends VariantProps<typeof contextMenuItemIndicatorVariants> {
5
5
  }
6
6
  export declare const contextMenuItemIndicatorVariants: (props?: ({
7
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
7
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
8
8
  size?: "small" | "medium" | null | undefined;
9
9
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
10
10
  export declare const ContextMenuItemIndicator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>, "ref"> & ContextMenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
@@ -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++) {
@@ -1,2 +1,3 @@
1
+ "use client";
1
2
  import{jsx as e}from"react/jsx-runtime";import{createContext as r,forwardRef as t}from"react";import*as n from"@radix-ui/react-context-menu";var o=function(){return o=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},o.apply(this,arguments)},a=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},l=r({selectedValue:""}),c=t((function(r,t){var c=r.className,i=r.children,u=r.value,p=a(r,["className","children","value"]);return e(n.RadioGroup,o({ref:t,className:c},p,{children:e(l.Provider,{value:{selectedValue:null!=u?u:""},children:i})}))}));c.displayName="ContextMenu.RadioGroup";export{c as ContextMenuRadioGroup,l as RadioContext};
2
3
  //# sourceMappingURL=ContextMenuRadioGroup.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuRadioGroup.mjs","sources":["../../../lib/components/ContextMenu/ContextMenuRadioGroup.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 ContextMenuPrimitive from '@radix-ui/react-context-menu';\nexport var RadioContext = createContext({ selectedValue: '' });\nexport var ContextMenuRadioGroup = forwardRef(function (_a, ref) {\n var className = _a.className, children = _a.children, value = _a.value, props = __rest(_a, [\"className\", \"children\", \"value\"]);\n return (_jsx(ContextMenuPrimitive.RadioGroup, __assign({ ref: ref, className: className }, props, { children: _jsx(RadioContext.Provider, { value: { selectedValue: value !== null && value !== void 0 ? value : '' }, children: children }) })));\n});\nContextMenuRadioGroup.displayName = 'ContextMenu.RadioGroup';\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","RadioContext","createContext","selectedValue","ContextMenuRadioGroup","forwardRef","_a","ref","className","children","value","props","_jsx","ContextMenuPrimitive","RadioGroup","Provider","displayName"],"mappings":"6IAAA,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,EAIWiB,EAAeC,EAAc,CAAEC,cAAe,KAC9CC,EAAwBC,GAAW,SAAUC,EAAIC,GACxD,IAAIC,EAAYF,EAAGE,UAAWC,EAAWH,EAAGG,SAAUC,EAAQJ,EAAGI,MAAOC,EAAQf,EAAOU,EAAI,CAAC,YAAa,WAAY,UACrH,OAAQM,EAAKC,EAAqBC,WAAYjC,EAAS,CAAE0B,IAAKA,EAAKC,UAAWA,GAAaG,EAAO,CAAEF,SAAUG,EAAKX,EAAac,SAAU,CAAEL,MAAO,CAAEP,cAAeO,QAAqCA,EAAQ,IAAMD,SAAUA,MACrO,IACAL,EAAsBY,YAAc"}
1
+ {"version":3,"file":"ContextMenuRadioGroup.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -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++) {
@@ -21,8 +22,9 @@ var __rest = (this && this.__rest) || function (s, e) {
21
22
  return t;
22
23
  };
23
24
  import { jsx as _jsx } from "react/jsx-runtime";
24
- import { createContext, forwardRef, useContext, useMemo, } from 'react';
25
+ import { createContext, forwardRef, useContext, } from 'react';
25
26
  import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
27
+ import { useTheme } from '../../../lib/theme';
26
28
  var ContextMenuContext = createContext({
27
29
  radius: 'medium',
28
30
  scaling: '100%',
@@ -35,7 +37,14 @@ export var useContextMenuContext = function () {
35
37
  };
36
38
  export var ContextMenuRoot = forwardRef(function (_a, ref) {
37
39
  var children = _a.children, radius = _a.radius, size = _a.size, scaling = _a.scaling, color = _a.color, appearance = _a.appearance, props = __rest(_a, ["children", "radius", "size", "scaling", "color", "appearance"]);
38
- var contextValue = useMemo(function () { return ({ radius: radius, size: size, scaling: scaling, color: color, appearance: appearance }); }, [radius, size, scaling, color, appearance]);
40
+ var theme = useTheme().theme;
41
+ var contextValue = {
42
+ radius: theme.themeRadius || radius,
43
+ scaling: theme.themeScaling || scaling,
44
+ color: theme.themeColor || color,
45
+ size: size,
46
+ appearance: appearance,
47
+ };
39
48
  return (_jsx(ContextMenuContext.Provider, { value: contextValue, children: _jsx("div", { ref: ref, children: _jsx(ContextMenuPrimitive.Root, __assign({}, props, { children: children })) }) }));
40
49
  });
41
50
  ContextMenuRoot.displayName = 'ContextMenu.Root';
@@ -1,2 +1,3 @@
1
- import{jsx as r}from"react/jsx-runtime";import{createContext as e,forwardRef as n,useMemo as t,useContext as o}from"react";import*as a from"@radix-ui/react-context-menu";var i=function(){return i=Object.assign||function(r){for(var e,n=1,t=arguments.length;n<t;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},i.apply(this,arguments)},c=function(r,e){var n={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(n[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])&&(n[t[o]]=r[t[o]])}return n},l=e({radius:"medium",scaling:"100%",size:"medium",color:"red",appearance:"solid"}),p=function(){return o(l)},u=n((function(e,n){var o=e.children,p=e.radius,u=e.size,s=e.scaling,d=e.color,f=e.appearance,m=c(e,["children","radius","size","scaling","color","appearance"]),y=t((function(){return{radius:p,size:u,scaling:s,color:d,appearance:f}}),[p,u,s,d,f]);return r(l.Provider,{value:y,children:r("div",{ref:n,children:r(a.Root,i({},m,{children:o}))})})}));u.displayName="ContextMenu.Root";export{u as ContextMenuRoot,u as default,p as useContextMenuContext};
1
+ "use client";
2
+ import{jsx as e}from"react/jsx-runtime";import{createContext as r,forwardRef as t,useContext as o}from"react";import*as n from"@radix-ui/react-context-menu";import{useTheme as a}from"../../theme/ThemeProvider.mjs";var i=function(){return i=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},i.apply(this,arguments)},c=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)r.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(t[o[n]]=e[o[n]])}return t},l=r({radius:"medium",scaling:"100%",size:"medium",color:"red",appearance:"solid"}),p=function(){return o(l)},s=t((function(r,t){var o=r.children,p=r.radius,s=r.size,u=r.scaling,m=r.color,d=r.appearance,f=c(r,["children","radius","size","scaling","color","appearance"]),h=a().theme,y={radius:h.themeRadius||p,scaling:h.themeScaling||u,color:h.themeColor||m,size:s,appearance:d};return e(l.Provider,{value:y,children:e("div",{ref:t,children:e(n.Root,i({},f,{children:o}))})})}));s.displayName="ContextMenu.Root";export{s as ContextMenuRoot,s as default,p as useContextMenuContext};
2
3
  //# sourceMappingURL=ContextMenuRoot.mjs.map