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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) hide show
  1. package/README.md +133 -133
  2. package/dist/globals.css +4 -4
  3. package/dist/lib/.storybook/main.d.ts +3 -0
  4. package/dist/lib/.storybook/manager.d.ts +1 -0
  5. package/dist/lib/.storybook/preview.d.ts +9 -0
  6. package/dist/lib/Typography/Header/index.d.ts +1 -1
  7. package/dist/lib/Typography/Text/index.d.ts +1 -1
  8. package/dist/lib/color/constants.d.ts +0 -15
  9. package/dist/lib/color/constants.js +0 -32
  10. package/dist/lib/color/constants.mjs.map +1 -1
  11. package/dist/lib/components/Accordion/index.d.ts +1 -0
  12. package/dist/lib/components/Accordion/index.js +18 -4
  13. package/dist/lib/components/Accordion/index.mjs +1 -1
  14. package/dist/lib/components/Accordion/index.mjs.map +1 -1
  15. package/dist/lib/components/AlertDialog/AlertDialogAction.d.ts +2 -2
  16. package/dist/lib/components/AlertDialog/AlertDialogCancel.d.ts +2 -2
  17. package/dist/lib/components/AlertDialog/AlertDialogContent.d.ts +1 -1
  18. package/dist/lib/components/AlertDialog/AlertDialogRoot.js +9 -6
  19. package/dist/lib/components/AlertDialog/AlertDialogRoot.mjs +2 -1
  20. package/dist/lib/components/AlertDialog/AlertDialogRoot.mjs.map +1 -1
  21. package/dist/lib/components/AlertDialog/AlertDialogTrigger.d.ts +2 -2
  22. package/dist/lib/components/AspectRatio/index.js +3 -1
  23. package/dist/lib/components/AspectRatio/index.mjs +1 -1
  24. package/dist/lib/components/AspectRatio/index.mjs.map +1 -1
  25. package/dist/lib/components/Avatar/index.d.ts +1 -1
  26. package/dist/lib/components/Avatar/index.js +9 -1
  27. package/dist/lib/components/Avatar/index.mjs +2 -1
  28. package/dist/lib/components/Avatar/index.mjs.map +1 -1
  29. package/dist/lib/components/Badge/index.d.ts +2 -2
  30. package/dist/lib/components/Badge/index.js +10 -1
  31. package/dist/lib/components/Badge/index.mjs +1 -1
  32. package/dist/lib/components/Badge/index.mjs.map +1 -1
  33. package/dist/lib/components/BubbleChart/index.js +1 -1
  34. package/dist/lib/components/BubbleChart/index.mjs.map +1 -1
  35. package/dist/lib/components/Button/index.d.ts +2 -2
  36. package/dist/lib/components/Button/index.js +10 -1
  37. package/dist/lib/components/Button/index.mjs +1 -1
  38. package/dist/lib/components/Button/index.mjs.map +1 -1
  39. package/dist/lib/components/Callout/CalloutRoot.d.ts +1 -1
  40. package/dist/lib/components/Callout/CalloutRoot.js +11 -3
  41. package/dist/lib/components/Callout/CalloutRoot.mjs +2 -1
  42. package/dist/lib/components/Callout/CalloutRoot.mjs.map +1 -1
  43. package/dist/lib/components/Card/index.d.ts +2 -2
  44. package/dist/lib/components/Card/index.js +8 -1
  45. package/dist/lib/components/Card/index.mjs +1 -1
  46. package/dist/lib/components/Card/index.mjs.map +1 -1
  47. package/dist/lib/components/Checkbox/index.d.ts +1 -1
  48. package/dist/lib/components/Checkbox/index.js +10 -2
  49. package/dist/lib/components/Checkbox/index.mjs +1 -1
  50. package/dist/lib/components/Checkbox/index.mjs.map +1 -1
  51. package/dist/lib/components/CheckboxCard/index.d.ts +1 -1
  52. package/dist/lib/components/CheckboxCard/index.js +8 -1
  53. package/dist/lib/components/CheckboxCard/index.mjs +1 -1
  54. package/dist/lib/components/CheckboxCard/index.mjs.map +1 -1
  55. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.js +11 -2
  56. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.mjs +2 -1
  57. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.mjs.map +1 -1
  58. package/dist/lib/components/ContextMenu/ContextMenuContent.d.ts +1 -1
  59. package/dist/lib/components/ContextMenu/ContextMenuItem.d.ts +1 -1
  60. package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.d.ts +1 -1
  61. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.js +1 -0
  62. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.mjs +1 -0
  63. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.mjs.map +1 -1
  64. package/dist/lib/components/ContextMenu/ContextMenuRoot.js +11 -2
  65. package/dist/lib/components/ContextMenu/ContextMenuRoot.mjs +2 -1
  66. package/dist/lib/components/ContextMenu/ContextMenuRoot.mjs.map +1 -1
  67. package/dist/lib/components/ContextMenu/ContextMenuSubContent.d.ts +1 -1
  68. package/dist/lib/components/DataList/DataListLabel.d.ts +1 -1
  69. package/dist/lib/components/DataList/DataListRoot.js +9 -2
  70. package/dist/lib/components/DataList/DataListRoot.mjs +2 -1
  71. package/dist/lib/components/DataList/DataListRoot.mjs.map +1 -1
  72. package/dist/lib/components/DataList/DataListValue.d.ts +1 -1
  73. package/dist/lib/components/Dialog/DialogAction.d.ts +1 -1
  74. package/dist/lib/components/Dialog/DialogCancel.d.ts +1 -1
  75. package/dist/lib/components/Dialog/DialogContent.d.ts +1 -1
  76. package/dist/lib/components/Dialog/DialogRoot.js +9 -1
  77. package/dist/lib/components/Dialog/DialogRoot.mjs +2 -1
  78. package/dist/lib/components/Dialog/DialogRoot.mjs.map +1 -1
  79. package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.d.ts +1 -1
  80. package/dist/lib/components/DropdownMenu/DropdownMenuContent.d.ts +1 -1
  81. package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +1 -1
  82. package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.d.ts +1 -1
  83. package/dist/lib/components/DropdownMenu/DropdownMenuRoot.js +10 -1
  84. package/dist/lib/components/DropdownMenu/DropdownMenuRoot.mjs +2 -1
  85. package/dist/lib/components/DropdownMenu/DropdownMenuRoot.mjs.map +1 -1
  86. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +1 -1
  87. package/dist/lib/components/HoverCard/HoverCardContent.d.ts +2 -2
  88. package/dist/lib/components/HoverCard/HoverCardRoot.js +10 -1
  89. package/dist/lib/components/HoverCard/HoverCardRoot.mjs +2 -1
  90. package/dist/lib/components/HoverCard/HoverCardRoot.mjs.map +1 -1
  91. package/dist/lib/components/IconButton/index.d.ts +1 -1
  92. package/dist/lib/components/IconButton/index.js +9 -1
  93. package/dist/lib/components/IconButton/index.mjs +1 -1
  94. package/dist/lib/components/IconButton/index.mjs.map +1 -1
  95. package/dist/lib/components/Inset/index.d.ts +1 -1
  96. package/dist/lib/components/Inset/index.js +7 -1
  97. package/dist/lib/components/Inset/index.mjs +1 -1
  98. package/dist/lib/components/Inset/index.mjs.map +1 -1
  99. package/dist/lib/components/Label/index.d.ts +1 -1
  100. package/dist/lib/components/Label/index.js +11 -3
  101. package/dist/lib/components/Label/index.mjs +1 -1
  102. package/dist/lib/components/Label/index.mjs.map +1 -1
  103. package/dist/lib/components/Menubar/MenubarContent.d.ts +1 -1
  104. package/dist/lib/components/Menubar/MenubarItem.d.ts +1 -1
  105. package/dist/lib/components/Menubar/MenubarItemIndicator.d.ts +1 -1
  106. package/dist/lib/components/Menubar/MenubarRadioGroup.js +1 -0
  107. package/dist/lib/components/Menubar/MenubarRadioGroup.mjs +1 -0
  108. package/dist/lib/components/Menubar/MenubarRadioGroup.mjs.map +1 -1
  109. package/dist/lib/components/Menubar/MenubarRoot.d.ts +1 -1
  110. package/dist/lib/components/Menubar/MenubarRoot.js +13 -3
  111. package/dist/lib/components/Menubar/MenubarRoot.mjs +2 -1
  112. package/dist/lib/components/Menubar/MenubarRoot.mjs.map +1 -1
  113. package/dist/lib/components/Menubar/MenubarSubContent.d.ts +1 -1
  114. package/dist/lib/components/Menubar/MenubarTrigger.d.ts +1 -1
  115. package/dist/lib/components/NavigationMenu/NavigationMenuContent.d.ts +1 -1
  116. package/dist/lib/components/NavigationMenu/NavigationMenuLink.d.ts +1 -1
  117. package/dist/lib/components/NavigationMenu/NavigationMenuList.d.ts +1 -1
  118. package/dist/lib/components/NavigationMenu/NavigationMenuRoot.js +11 -2
  119. package/dist/lib/components/NavigationMenu/NavigationMenuRoot.mjs +2 -1
  120. package/dist/lib/components/NavigationMenu/NavigationMenuRoot.mjs.map +1 -1
  121. package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.d.ts +1 -1
  122. package/dist/lib/components/NavigationMenu/NavigationMenuViewport.d.ts +2 -2
  123. package/dist/lib/components/Popover/PopoverClose.d.ts +1 -1
  124. package/dist/lib/components/Popover/PopoverContent.d.ts +1 -1
  125. package/dist/lib/components/Popover/PopoverRoot.js +8 -1
  126. package/dist/lib/components/Popover/PopoverRoot.mjs +2 -1
  127. package/dist/lib/components/Popover/PopoverRoot.mjs.map +1 -1
  128. package/dist/lib/components/Progress/index.d.ts +1 -1
  129. package/dist/lib/components/Progress/index.js +11 -1
  130. package/dist/lib/components/Progress/index.mjs +1 -1
  131. package/dist/lib/components/Progress/index.mjs.map +1 -1
  132. package/dist/lib/components/RadarChart/index.js +1 -1
  133. package/dist/lib/components/RadarChart/index.mjs.map +1 -1
  134. package/dist/lib/components/Radio/index.js +10 -4
  135. package/dist/lib/components/Radio/index.mjs +1 -1
  136. package/dist/lib/components/Radio/index.mjs.map +1 -1
  137. package/dist/lib/components/RadioCards/RadioCardsItem.d.ts +1 -1
  138. package/dist/lib/components/RadioCards/RadioCardsRoot.js +12 -2
  139. package/dist/lib/components/RadioCards/RadioCardsRoot.mjs +2 -1
  140. package/dist/lib/components/RadioCards/RadioCardsRoot.mjs.map +1 -1
  141. package/dist/lib/components/RadioGroup/RadioGroupRoot.js +11 -2
  142. package/dist/lib/components/RadioGroup/RadioGroupRoot.mjs +2 -1
  143. package/dist/lib/components/RadioGroup/RadioGroupRoot.mjs.map +1 -1
  144. package/dist/lib/components/ScrollArea/index.js +3 -1
  145. package/dist/lib/components/ScrollArea/index.mjs +1 -1
  146. package/dist/lib/components/ScrollArea/index.mjs.map +1 -1
  147. package/dist/lib/components/SegmentedControl/SegmentedControlRoot.js +7 -1
  148. package/dist/lib/components/SegmentedControl/SegmentedControlRoot.mjs +1 -1
  149. package/dist/lib/components/SegmentedControl/SegmentedControlRoot.mjs.map +1 -1
  150. package/dist/lib/components/Select/index.d.ts +4 -2
  151. package/dist/lib/components/Select/index.js +30 -13
  152. package/dist/lib/components/Select/index.mjs +1 -1
  153. package/dist/lib/components/Select/index.mjs.map +1 -1
  154. package/dist/lib/components/Separator/index.js +7 -1
  155. package/dist/lib/components/Separator/index.mjs +1 -1
  156. package/dist/lib/components/Separator/index.mjs.map +1 -1
  157. package/dist/lib/components/Skeleton/index.d.ts +1 -1
  158. package/dist/lib/components/Skeleton/index.js +4 -1
  159. package/dist/lib/components/Skeleton/index.mjs +1 -1
  160. package/dist/lib/components/Skeleton/index.mjs.map +1 -1
  161. package/dist/lib/components/Slider/index.d.ts +1 -1
  162. package/dist/lib/components/Slider/index.js +13 -5
  163. package/dist/lib/components/Slider/index.mjs +1 -1
  164. package/dist/lib/components/Slider/index.mjs.map +1 -1
  165. package/dist/lib/components/Spinner/index.js +3 -1
  166. package/dist/lib/components/Spinner/index.mjs +1 -1
  167. package/dist/lib/components/Spinner/index.mjs.map +1 -1
  168. package/dist/lib/components/TabNav/index.js +6 -4
  169. package/dist/lib/components/TabNav/index.mjs +1 -1
  170. package/dist/lib/components/TabNav/index.mjs.map +1 -1
  171. package/dist/lib/components/Table/index.d.ts +1 -1
  172. package/dist/lib/components/Table/index.js +7 -1
  173. package/dist/lib/components/Table/index.mjs +1 -1
  174. package/dist/lib/components/Table/index.mjs.map +1 -1
  175. package/dist/lib/components/Tabs/index.d.ts +1 -1
  176. package/dist/lib/components/Tabs/index.js +4 -4
  177. package/dist/lib/components/Tabs/index.mjs +1 -1
  178. package/dist/lib/components/Tabs/index.mjs.map +1 -1
  179. package/dist/lib/components/TextArea/index.d.ts +1 -1
  180. package/dist/lib/components/TextArea/index.js +11 -4
  181. package/dist/lib/components/TextArea/index.mjs +1 -1
  182. package/dist/lib/components/TextArea/index.mjs.map +1 -1
  183. package/dist/lib/components/TextField/index.d.ts +1 -1
  184. package/dist/lib/components/TextField/index.js +11 -4
  185. package/dist/lib/components/TextField/index.mjs +1 -1
  186. package/dist/lib/components/TextField/index.mjs.map +1 -1
  187. package/dist/lib/components/Toast/ToastActionButton.d.ts +1 -1
  188. package/dist/lib/components/Toast/ToastActionButton.js +2 -2
  189. package/dist/lib/components/Toast/ToastActionButton.mjs +1 -1
  190. package/dist/lib/components/Toast/ToastActionButton.mjs.map +1 -1
  191. package/dist/lib/components/Toast/ToastRoot.d.ts +1 -1
  192. package/dist/lib/components/Toast/ToastRoot.js +11 -3
  193. package/dist/lib/components/Toast/ToastRoot.mjs +2 -1
  194. package/dist/lib/components/Toast/ToastRoot.mjs.map +1 -1
  195. package/dist/lib/components/Toggle/ToggleWithText.d.ts +1 -1
  196. package/dist/lib/components/Toggle/ToggleWithText.js +9 -1
  197. package/dist/lib/components/Toggle/ToggleWithText.mjs +1 -1
  198. package/dist/lib/components/Toggle/ToggleWithText.mjs.map +1 -1
  199. package/dist/lib/components/Toggle/index.d.ts +1 -1
  200. package/dist/lib/components/Toggle/index.js +9 -1
  201. package/dist/lib/components/Toggle/index.mjs +1 -1
  202. package/dist/lib/components/Toggle/index.mjs.map +1 -1
  203. package/dist/lib/components/ToggleGroup/ToggleGroupRoot.js +10 -2
  204. package/dist/lib/components/ToggleGroup/ToggleGroupRoot.mjs +2 -1
  205. package/dist/lib/components/ToggleGroup/ToggleGroupRoot.mjs.map +1 -1
  206. package/dist/lib/components/ToggleSwitch/index.d.ts +1 -1
  207. package/dist/lib/components/ToggleSwitch/index.js +13 -1
  208. package/dist/lib/components/ToggleSwitch/index.mjs +1 -1
  209. package/dist/lib/components/ToggleSwitch/index.mjs.map +1 -1
  210. package/dist/lib/components/Tooltip/index.d.ts +2 -2
  211. package/dist/lib/components/Tooltip/index.js +13 -8
  212. package/dist/lib/components/Tooltip/index.mjs +1 -1
  213. package/dist/lib/components/Tooltip/index.mjs.map +1 -1
  214. package/dist/lib/constants.d.ts +0 -2
  215. package/dist/lib/constants.js +7 -31
  216. package/dist/lib/constants.mjs +1 -1
  217. package/dist/lib/constants.mjs.map +1 -1
  218. package/dist/lib/index.d.ts +1 -0
  219. package/dist/lib/index.js +1 -0
  220. package/dist/lib/index.mjs +1 -1
  221. package/dist/lib/theme/ThemeProvider.d.ts +16 -0
  222. package/dist/lib/theme/ThemeProvider.js +29 -0
  223. package/dist/lib/theme/ThemeProvider.mjs +3 -0
  224. package/dist/lib/theme/ThemeProvider.mjs.map +1 -0
  225. package/dist/lib/theme/index.d.ts +2 -0
  226. package/dist/lib/theme/index.js +2 -0
  227. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  228. package/dist/lib/utils/classPrefixes.js +1 -0
  229. package/dist/lib/utils/useDarkMode.js +1 -0
  230. package/dist/lib/utils/useDarkMode.mjs +1 -0
  231. package/dist/lib/utils/useDarkMode.mjs.map +1 -1
  232. package/dist/tailwind.config.js +4 -7
  233. package/dist/tsconfig.tsbuildinfo +1 -1
  234. package/package.json +141 -140
@@ -0,0 +1,3 @@
1
+ import type { StorybookConfig } from '@storybook/nextjs';
2
+ declare const config: StorybookConfig;
3
+ export default config;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { Preview } from '@storybook/react';
3
+ import '../src/app/globals.css';
4
+ import '../src/app/styles.css';
5
+ import '../src/app/stories.css';
6
+ import 'tailwindcss/tailwind.css';
7
+ declare const preview: Preview;
8
+ export default preview;
9
+ export declare const decorators: ((Story: any, context: any) => React.JSX.Element)[];
@@ -5,7 +5,7 @@ export interface HeaderProps extends VariantProps<typeof headerVariants> {
5
5
  color?: IColor;
6
6
  }
7
7
  declare let headerVariants: (props?: ({
8
- weight?: "bold" | "medium" | "regular" | "semibold" | null | undefined;
8
+ weight?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
9
9
  headers?: "h2" | "h3" | "h1" | "h4" | "h5" | "h6" | null | undefined;
10
10
  color?: string | null | undefined;
11
11
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -8,7 +8,7 @@ export interface TextProps extends VariantProps<typeof textVariants> {
8
8
  align?: 'left' | 'center' | 'right';
9
9
  }
10
10
  declare const textVariants: (props?: ({
11
- weight?: "bold" | "medium" | "regular" | "semibold" | "light" | null | undefined;
11
+ weight?: "medium" | "regular" | "semibold" | "bold" | "light" | null | undefined;
12
12
  color?: string | null | undefined;
13
13
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
14
14
  export declare const Text: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & TextProps & React.RefAttributes<HTMLSpanElement>>;
@@ -2,20 +2,6 @@ import { IColor, IAlphaColor, IDarkColor } from '../types';
2
2
  export declare const colorOptions: IColor[];
3
3
  export declare const alphaColorOptions: IAlphaColor[];
4
4
  export declare const darkColorOptions: IDarkColor[];
5
- export declare const alphaOptions: {
6
- 1: string;
7
- 2: string;
8
- 3: string;
9
- 4: string;
10
- 5: string;
11
- 6: string;
12
- 7: string;
13
- 8: string;
14
- 9: string;
15
- 10: string;
16
- 11: string;
17
- 12: string;
18
- };
19
5
  export declare const ColorStyle: Record<string, string>;
20
6
  export declare const DarkColorStyle: Record<string, string>;
21
7
  export declare const chartColorList: {
@@ -26,4 +12,3 @@ export declare const chartAlphaColorList: {
26
12
  sorting: string[];
27
13
  mixed: string[];
28
14
  };
29
- export declare const chartColorOptions: IColor[];
@@ -122,20 +122,6 @@ export var darkColorOptions = [
122
122
  'orangeDarkA',
123
123
  'whiteDark',
124
124
  ];
125
- export var alphaOptions = {
126
- 1: '1',
127
- 2: '2',
128
- 3: '6',
129
- 4: '9',
130
- 5: '12',
131
- 6: '15',
132
- 7: '20',
133
- 8: '27',
134
- 9: '45',
135
- 10: '50',
136
- 11: '62',
137
- 12: '89',
138
- };
139
125
  export var ColorStyle = {
140
126
  black: 'slate-12',
141
127
  white: '#ffffff',
@@ -276,21 +262,3 @@ export var chartAlphaColorList = {
276
262
  limeA[2],
277
263
  ],
278
264
  };
279
- export var chartColorOptions = [
280
- 'blue',
281
- 'crimson',
282
- 'teal',
283
- 'orange',
284
- 'purple',
285
- 'amber',
286
- 'slate',
287
- 'cyan',
288
- 'red',
289
- 'grass',
290
- 'brown',
291
- 'indigo',
292
- 'plum',
293
- 'yellow',
294
- 'sky',
295
- 'lime',
296
- ];
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","sources":["../../lib/color/constants.js"],"sourcesContent":["import { blue, crimson, teal, orange, purple, amber, slate, cyan, red, grass, brown, indigo, plum, yellow, sky, lime, } from './light';\nimport { blueA, crimsonA, tealA, orangeA, purpleA, amberA, slateA, cyanA, redA, grassA, brownA, indigoA, plumA, yellowA, skyA, limeA, } from './alpha';\nexport var colorOptions = [\n // 'black',\n 'slate',\n 'olive',\n 'sand',\n 'tomato',\n 'red',\n 'ruby',\n 'crimson',\n 'pink',\n 'plum',\n 'purple',\n 'violet',\n 'iris',\n 'indigo',\n 'blue',\n 'cyan',\n 'teal',\n 'jade',\n 'green',\n 'grass',\n 'brown',\n 'bronze',\n 'gold',\n 'sky',\n 'mint',\n 'lime',\n 'yellow',\n 'amber',\n 'orange',\n // 'white',\n];\nexport var alphaColorOptions = [\n 'slateA',\n 'oliveA',\n 'sandA',\n 'tomatoA',\n 'redA',\n 'rubyA',\n 'crimsonA',\n 'pinkA',\n 'plumA',\n 'purpleA',\n 'violetA',\n 'irisA',\n 'indigoA',\n 'blueA',\n 'cyanA',\n 'tealA',\n 'jadeA',\n 'greenA',\n 'grassA',\n 'brownA',\n 'bronzeA',\n 'goldA',\n 'skyA',\n 'mintA',\n 'limeA',\n 'yellowA',\n 'amberA',\n 'orangeA',\n];\nexport var darkColorOptions = [\n 'blackDark',\n 'slateDark',\n 'oliveDark',\n 'sandDark',\n 'tomatoDark',\n 'redDark',\n 'rubyDark',\n 'crimsonDark',\n 'pinkDark',\n 'plumDark',\n 'purpleDark',\n 'violetDark',\n 'irisDark',\n 'indigoDark',\n 'blueDark',\n 'cyanDark',\n 'tealDark',\n 'jadeDark',\n 'greenDark',\n 'grassDark',\n 'brownDark',\n 'bronzeDark',\n 'goldDark',\n 'skyDark',\n 'mintDark',\n 'limeDark',\n 'yellowDark',\n 'amberDark',\n 'orangeDark',\n 'slateDarkA',\n 'oliveDarkA',\n 'sandDarkA',\n 'tomatoDarkA',\n 'redDarkA',\n 'rubyDarkA',\n 'crimsonDarkA',\n 'pinkDarkA',\n 'plumDarkA',\n 'purpleDarkA',\n 'violetDarkA',\n 'irisDarkA',\n 'indigoDarkA',\n 'blueDarkA',\n 'cyanDarkA',\n 'tealDarkA',\n 'jadeDarkA',\n 'greenDarkA',\n 'grassDarkA',\n 'brownDarkA',\n 'bronzeDarkA',\n 'goldDarkA',\n 'skyDarkA',\n 'mintDarkA',\n 'limeDarkA',\n 'yellowDarkA',\n 'amberDarkA',\n 'orangeDarkA',\n 'whiteDark',\n];\nexport var alphaOptions = {\n 1: '1',\n 2: '2',\n 3: '6',\n 4: '9',\n 5: '12',\n 6: '15',\n 7: '20',\n 8: '27',\n 9: '45',\n 10: '50',\n 11: '62',\n 12: '89',\n};\nexport var ColorStyle = {\n black: 'slate-12',\n white: '#ffffff',\n slate: 'slate-9',\n olive: 'olive-9',\n sand: 'sand-9',\n tomato: 'tomato-9',\n red: 'red-9',\n ruby: 'ruby-9',\n crimson: 'crimson-9',\n pink: 'pink-9',\n plum: 'plum-9',\n purple: 'purple-9',\n violet: 'violet-9',\n iris: 'iris-9',\n indigo: 'indigo-9',\n blue: 'blue-9',\n cyan: 'cyan-9',\n teal: 'teal-9',\n jade: 'jade-9',\n green: 'green-9',\n grass: 'grass-9',\n brown: 'brown-9',\n bronze: 'bronze-9',\n gold: 'gold-9',\n sky: 'sky-9',\n mint: 'mint-9',\n lime: 'lime-9',\n yellow: 'yellow-9',\n amber: 'amber-9',\n orange: 'orange-9',\n};\nexport var DarkColorStyle = {\n blackDark: 'slateDark-12',\n whiteDark: 'slateDark-1',\n slateDark: 'slateDark-9',\n oliveDark: 'oliveDark-9',\n sandDark: 'sandDark-9',\n tomatoDark: 'tomatoDark-9',\n redDark: 'redDark-9',\n rubyDark: 'rubyDark-9',\n crimsonDark: 'crimsonDark-9',\n pinkDark: 'pinkDark-9',\n plumDark: 'plumDark-9',\n purpleDark: 'purpleDark-9',\n violetDark: 'violetDark-9',\n irisDark: 'irisDark-9',\n indigoDark: 'indigoDark-9',\n blueDark: 'blueDark-9',\n cyanDark: 'cyanDark-9',\n tealDark: 'tealDark-9',\n jadeDark: 'jadeDark-9',\n greenDark: 'greenDark-9',\n grassDark: 'grassDark-9',\n brownDark: 'brownDark-9',\n bronzeDark: 'bronzeDark-9',\n goldDark: 'goldDark-9',\n skyDark: 'skyDark-9',\n mintDark: 'mintDark-9',\n limeDark: 'limeDark-9',\n yellowDark: 'yellowDark-9',\n amberDark: 'amberDark-9',\n orangeDark: 'orangeDark-9',\n};\nexport var chartColorList = {\n sorting: [\n crimson[9],\n orange[9],\n amber[9],\n teal[9],\n blue[9],\n purple[9],\n slate[9],\n red[9],\n brown[9],\n yellow[9],\n lime[9],\n grass[9],\n sky[9],\n cyan[9],\n indigo[9],\n plum[9],\n ],\n mixed: [\n blue[9],\n crimson[9],\n teal[9],\n orange[9],\n purple[9],\n amber[9],\n slate[9],\n cyan[9],\n red[9],\n grass[9],\n brown[9],\n indigo[9],\n plum[9],\n yellow[9],\n sky[9],\n lime[9],\n ],\n};\nexport var chartAlphaColorList = {\n sorting: [\n crimsonA[2],\n orangeA[2],\n amberA[2],\n tealA[2],\n blueA[2],\n purpleA[2],\n slateA[2],\n redA[2],\n brownA[2],\n yellowA[2],\n limeA[2],\n grassA[2],\n skyA[2],\n cyanA[2],\n indigoA[2],\n plumA[2],\n ],\n mixed: [\n blueA[2],\n crimsonA[2],\n tealA[2],\n orangeA[2],\n purpleA[2],\n amberA[2],\n slateA[2],\n cyanA[2],\n redA[2],\n grassA[2],\n brownA[2],\n indigoA[2],\n plumA[2],\n yellowA[2],\n skyA[2],\n limeA[2],\n ],\n};\nexport var chartColorOptions = [\n 'blue',\n 'crimson',\n 'teal',\n 'orange',\n 'purple',\n 'amber',\n 'slate',\n 'cyan',\n 'red',\n 'grass',\n 'brown',\n 'indigo',\n 'plum',\n 'yellow',\n 'sky',\n 'lime',\n];\n"],"names":["ColorStyle","black","white","slate","olive","sand","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","bronze","gold","sky","mint","lime","yellow","amber","orange","DarkColorStyle","blackDark","whiteDark","slateDark","oliveDark","sandDark","tomatoDark","redDark","rubyDark","crimsonDark","pinkDark","plumDark","purpleDark","violetDark","irisDark","indigoDark","blueDark","cyanDark","tealDark","jadeDark","greenDark","grassDark","brownDark","bronzeDark","goldDark","skyDark","mintDark","limeDark","yellowDark","amberDark","orangeDark","chartColorList","sorting","mixed","chartAlphaColorList","crimsonA","orangeA","amberA","tealA","blueA","purpleA","slateA","redA","brownA","yellowA","limeA","grassA","skyA","cyanA","indigoA","plumA"],"mappings":"4ZA0IU,IAACA,EAAa,CACpBC,MAAO,WACPC,MAAO,UACPC,MAAO,UACPC,MAAO,UACPC,KAAM,SACNC,OAAQ,WACRC,IAAK,QACLC,KAAM,SACNC,QAAS,YACTC,KAAM,SACNC,KAAM,SACNC,OAAQ,WACRC,OAAQ,WACRC,KAAM,SACNC,OAAQ,WACRC,KAAM,SACNC,KAAM,SACNC,KAAM,SACNC,KAAM,SACNC,MAAO,UACPC,MAAO,UACPC,MAAO,UACPC,OAAQ,WACRC,KAAM,SACNC,IAAK,QACLC,KAAM,SACNC,KAAM,SACNC,OAAQ,WACRC,MAAO,UACPC,OAAQ,YAEDC,EAAiB,CACxBC,UAAW,eACXC,UAAW,cACXC,UAAW,cACXC,UAAW,cACXC,SAAU,aACVC,WAAY,eACZC,QAAS,YACTC,SAAU,aACVC,YAAa,gBACbC,SAAU,aACVC,SAAU,aACVC,WAAY,eACZC,WAAY,eACZC,SAAU,aACVC,WAAY,eACZC,SAAU,aACVC,SAAU,aACVC,SAAU,aACVC,SAAU,aACVC,UAAW,cACXC,UAAW,cACXC,UAAW,cACXC,WAAY,eACZC,SAAU,aACVC,QAAS,YACTC,SAAU,aACVC,SAAU,aACVC,WAAY,eACZC,UAAW,cACXC,WAAY,gBAELC,EAAiB,CACxBC,QAAS,CACLtD,EAAQ,GACRqB,EAAO,GACPD,EAAM,GACNX,EAAK,GACLF,EAAK,GACLJ,EAAO,GACPT,EAAM,GACNI,EAAI,GACJe,EAAM,GACNM,EAAO,GACPD,EAAK,GACLN,EAAM,GACNI,EAAI,GACJR,EAAK,GACLF,EAAO,GACPJ,EAAK,IAETqD,MAAO,CACHhD,EAAK,GACLP,EAAQ,GACRS,EAAK,GACLY,EAAO,GACPlB,EAAO,GACPiB,EAAM,GACN1B,EAAM,GACNc,EAAK,GACLV,EAAI,GACJc,EAAM,GACNC,EAAM,GACNP,EAAO,GACPJ,EAAK,GACLiB,EAAO,GACPH,EAAI,GACJE,EAAK,KAGFsC,EAAsB,CAC7BF,QAAS,CACLG,EAAS,GACTC,EAAQ,GACRC,EAAO,GACPC,EAAM,GACNC,EAAM,GACNC,EAAQ,GACRC,EAAO,GACPC,EAAK,GACLC,EAAO,GACPC,EAAQ,GACRC,EAAM,GACNC,EAAO,GACPC,EAAK,GACLC,EAAM,GACNC,EAAQ,GACRC,EAAM,IAEVjB,MAAO,CACHM,EAAM,GACNJ,EAAS,GACTG,EAAM,GACNF,EAAQ,GACRI,EAAQ,GACRH,EAAO,GACPI,EAAO,GACPO,EAAM,GACNN,EAAK,GACLI,EAAO,GACPH,EAAO,GACPM,EAAQ,GACRC,EAAM,GACNN,EAAQ,GACRG,EAAK,GACLF,EAAM"}
1
+ {"version":3,"file":"constants.mjs","sources":["../../lib/color/constants.js"],"sourcesContent":["import { blue, crimson, teal, orange, purple, amber, slate, cyan, red, grass, brown, indigo, plum, yellow, sky, lime, } from './light';\nimport { blueA, crimsonA, tealA, orangeA, purpleA, amberA, slateA, cyanA, redA, grassA, brownA, indigoA, plumA, yellowA, skyA, limeA, } from './alpha';\nexport var colorOptions = [\n // 'black',\n 'slate',\n 'olive',\n 'sand',\n 'tomato',\n 'red',\n 'ruby',\n 'crimson',\n 'pink',\n 'plum',\n 'purple',\n 'violet',\n 'iris',\n 'indigo',\n 'blue',\n 'cyan',\n 'teal',\n 'jade',\n 'green',\n 'grass',\n 'brown',\n 'bronze',\n 'gold',\n 'sky',\n 'mint',\n 'lime',\n 'yellow',\n 'amber',\n 'orange',\n // 'white',\n];\nexport var alphaColorOptions = [\n 'slateA',\n 'oliveA',\n 'sandA',\n 'tomatoA',\n 'redA',\n 'rubyA',\n 'crimsonA',\n 'pinkA',\n 'plumA',\n 'purpleA',\n 'violetA',\n 'irisA',\n 'indigoA',\n 'blueA',\n 'cyanA',\n 'tealA',\n 'jadeA',\n 'greenA',\n 'grassA',\n 'brownA',\n 'bronzeA',\n 'goldA',\n 'skyA',\n 'mintA',\n 'limeA',\n 'yellowA',\n 'amberA',\n 'orangeA',\n];\nexport var darkColorOptions = [\n 'blackDark',\n 'slateDark',\n 'oliveDark',\n 'sandDark',\n 'tomatoDark',\n 'redDark',\n 'rubyDark',\n 'crimsonDark',\n 'pinkDark',\n 'plumDark',\n 'purpleDark',\n 'violetDark',\n 'irisDark',\n 'indigoDark',\n 'blueDark',\n 'cyanDark',\n 'tealDark',\n 'jadeDark',\n 'greenDark',\n 'grassDark',\n 'brownDark',\n 'bronzeDark',\n 'goldDark',\n 'skyDark',\n 'mintDark',\n 'limeDark',\n 'yellowDark',\n 'amberDark',\n 'orangeDark',\n 'slateDarkA',\n 'oliveDarkA',\n 'sandDarkA',\n 'tomatoDarkA',\n 'redDarkA',\n 'rubyDarkA',\n 'crimsonDarkA',\n 'pinkDarkA',\n 'plumDarkA',\n 'purpleDarkA',\n 'violetDarkA',\n 'irisDarkA',\n 'indigoDarkA',\n 'blueDarkA',\n 'cyanDarkA',\n 'tealDarkA',\n 'jadeDarkA',\n 'greenDarkA',\n 'grassDarkA',\n 'brownDarkA',\n 'bronzeDarkA',\n 'goldDarkA',\n 'skyDarkA',\n 'mintDarkA',\n 'limeDarkA',\n 'yellowDarkA',\n 'amberDarkA',\n 'orangeDarkA',\n 'whiteDark',\n];\nexport var ColorStyle = {\n black: 'slate-12',\n white: '#ffffff',\n slate: 'slate-9',\n olive: 'olive-9',\n sand: 'sand-9',\n tomato: 'tomato-9',\n red: 'red-9',\n ruby: 'ruby-9',\n crimson: 'crimson-9',\n pink: 'pink-9',\n plum: 'plum-9',\n purple: 'purple-9',\n violet: 'violet-9',\n iris: 'iris-9',\n indigo: 'indigo-9',\n blue: 'blue-9',\n cyan: 'cyan-9',\n teal: 'teal-9',\n jade: 'jade-9',\n green: 'green-9',\n grass: 'grass-9',\n brown: 'brown-9',\n bronze: 'bronze-9',\n gold: 'gold-9',\n sky: 'sky-9',\n mint: 'mint-9',\n lime: 'lime-9',\n yellow: 'yellow-9',\n amber: 'amber-9',\n orange: 'orange-9',\n};\nexport var DarkColorStyle = {\n blackDark: 'slateDark-12',\n whiteDark: 'slateDark-1',\n slateDark: 'slateDark-9',\n oliveDark: 'oliveDark-9',\n sandDark: 'sandDark-9',\n tomatoDark: 'tomatoDark-9',\n redDark: 'redDark-9',\n rubyDark: 'rubyDark-9',\n crimsonDark: 'crimsonDark-9',\n pinkDark: 'pinkDark-9',\n plumDark: 'plumDark-9',\n purpleDark: 'purpleDark-9',\n violetDark: 'violetDark-9',\n irisDark: 'irisDark-9',\n indigoDark: 'indigoDark-9',\n blueDark: 'blueDark-9',\n cyanDark: 'cyanDark-9',\n tealDark: 'tealDark-9',\n jadeDark: 'jadeDark-9',\n greenDark: 'greenDark-9',\n grassDark: 'grassDark-9',\n brownDark: 'brownDark-9',\n bronzeDark: 'bronzeDark-9',\n goldDark: 'goldDark-9',\n skyDark: 'skyDark-9',\n mintDark: 'mintDark-9',\n limeDark: 'limeDark-9',\n yellowDark: 'yellowDark-9',\n amberDark: 'amberDark-9',\n orangeDark: 'orangeDark-9',\n};\nexport var chartColorList = {\n sorting: [\n crimson[9],\n orange[9],\n amber[9],\n teal[9],\n blue[9],\n purple[9],\n slate[9],\n red[9],\n brown[9],\n yellow[9],\n lime[9],\n grass[9],\n sky[9],\n cyan[9],\n indigo[9],\n plum[9],\n ],\n mixed: [\n blue[9],\n crimson[9],\n teal[9],\n orange[9],\n purple[9],\n amber[9],\n slate[9],\n cyan[9],\n red[9],\n grass[9],\n brown[9],\n indigo[9],\n plum[9],\n yellow[9],\n sky[9],\n lime[9],\n ],\n};\nexport var chartAlphaColorList = {\n sorting: [\n crimsonA[2],\n orangeA[2],\n amberA[2],\n tealA[2],\n blueA[2],\n purpleA[2],\n slateA[2],\n redA[2],\n brownA[2],\n yellowA[2],\n limeA[2],\n grassA[2],\n skyA[2],\n cyanA[2],\n indigoA[2],\n plumA[2],\n ],\n mixed: [\n blueA[2],\n crimsonA[2],\n tealA[2],\n orangeA[2],\n purpleA[2],\n amberA[2],\n slateA[2],\n cyanA[2],\n redA[2],\n grassA[2],\n brownA[2],\n indigoA[2],\n plumA[2],\n yellowA[2],\n skyA[2],\n limeA[2],\n ],\n};\n"],"names":["ColorStyle","black","white","slate","olive","sand","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","bronze","gold","sky","mint","lime","yellow","amber","orange","DarkColorStyle","blackDark","whiteDark","slateDark","oliveDark","sandDark","tomatoDark","redDark","rubyDark","crimsonDark","pinkDark","plumDark","purpleDark","violetDark","irisDark","indigoDark","blueDark","cyanDark","tealDark","jadeDark","greenDark","grassDark","brownDark","bronzeDark","goldDark","skyDark","mintDark","limeDark","yellowDark","amberDark","orangeDark","chartColorList","sorting","mixed","chartAlphaColorList","crimsonA","orangeA","amberA","tealA","blueA","purpleA","slateA","redA","brownA","yellowA","limeA","grassA","skyA","cyanA","indigoA","plumA"],"mappings":"4ZA4HU,IAACA,EAAa,CACpBC,MAAO,WACPC,MAAO,UACPC,MAAO,UACPC,MAAO,UACPC,KAAM,SACNC,OAAQ,WACRC,IAAK,QACLC,KAAM,SACNC,QAAS,YACTC,KAAM,SACNC,KAAM,SACNC,OAAQ,WACRC,OAAQ,WACRC,KAAM,SACNC,OAAQ,WACRC,KAAM,SACNC,KAAM,SACNC,KAAM,SACNC,KAAM,SACNC,MAAO,UACPC,MAAO,UACPC,MAAO,UACPC,OAAQ,WACRC,KAAM,SACNC,IAAK,QACLC,KAAM,SACNC,KAAM,SACNC,OAAQ,WACRC,MAAO,UACPC,OAAQ,YAEDC,EAAiB,CACxBC,UAAW,eACXC,UAAW,cACXC,UAAW,cACXC,UAAW,cACXC,SAAU,aACVC,WAAY,eACZC,QAAS,YACTC,SAAU,aACVC,YAAa,gBACbC,SAAU,aACVC,SAAU,aACVC,WAAY,eACZC,WAAY,eACZC,SAAU,aACVC,WAAY,eACZC,SAAU,aACVC,SAAU,aACVC,SAAU,aACVC,SAAU,aACVC,UAAW,cACXC,UAAW,cACXC,UAAW,cACXC,WAAY,eACZC,SAAU,aACVC,QAAS,YACTC,SAAU,aACVC,SAAU,aACVC,WAAY,eACZC,UAAW,cACXC,WAAY,gBAELC,EAAiB,CACxBC,QAAS,CACLtD,EAAQ,GACRqB,EAAO,GACPD,EAAM,GACNX,EAAK,GACLF,EAAK,GACLJ,EAAO,GACPT,EAAM,GACNI,EAAI,GACJe,EAAM,GACNM,EAAO,GACPD,EAAK,GACLN,EAAM,GACNI,EAAI,GACJR,EAAK,GACLF,EAAO,GACPJ,EAAK,IAETqD,MAAO,CACHhD,EAAK,GACLP,EAAQ,GACRS,EAAK,GACLY,EAAO,GACPlB,EAAO,GACPiB,EAAM,GACN1B,EAAM,GACNc,EAAK,GACLV,EAAI,GACJc,EAAM,GACNC,EAAM,GACNP,EAAO,GACPJ,EAAK,GACLiB,EAAO,GACPH,EAAI,GACJE,EAAK,KAGFsC,EAAsB,CAC7BF,QAAS,CACLG,EAAS,GACTC,EAAQ,GACRC,EAAO,GACPC,EAAM,GACNC,EAAM,GACNC,EAAQ,GACRC,EAAO,GACPC,EAAK,GACLC,EAAO,GACPC,EAAQ,GACRC,EAAM,GACNC,EAAO,GACPC,EAAK,GACLC,EAAM,GACNC,EAAQ,GACRC,EAAM,IAEVjB,MAAO,CACHM,EAAM,GACNJ,EAAS,GACTG,EAAM,GACNF,EAAQ,GACRI,EAAQ,GACRH,EAAO,GACPI,EAAO,GACPO,EAAM,GACNN,EAAK,GACLI,EAAO,GACPH,EAAO,GACPM,EAAQ,GACRC,EAAM,GACNN,EAAQ,GACRG,EAAK,GACLF,EAAM"}
@@ -8,6 +8,7 @@ export interface AccordionProps extends React.InputHTMLAttributes<HTMLInputEleme
8
8
  declare const accoridanVariants: (props?: ({
9
9
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
10
10
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
11
+ export declare const useAccordionContext: () => AccordionProps;
11
12
  export declare const Root: React.ForwardRefExoticComponent<((Omit<AccordionPrimitive.AccordionSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<AccordionPrimitive.AccordionMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & AccordionProps) & React.RefAttributes<HTMLDivElement>>;
12
13
  export declare const Item: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & AccordionProps & React.RefAttributes<HTMLDivElement>>;
13
14
  export declare const Trigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & AccordionProps & React.RefAttributes<HTMLButtonElement>>;
@@ -21,12 +21,13 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
- import React from 'react';
24
+ import React, { createContext, useContext } from 'react';
25
25
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
26
26
  import { ChevronDownIcon } from '@radix-ui/react-icons';
27
27
  import { cn } from '../../../lib/utils/utils';
28
28
  import { cva } from 'class-variance-authority';
29
29
  import { scalingVariants } from '../../../lib/constants';
30
+ import { useTheme } from '../../../lib/theme';
30
31
  var accoridanVariants = cva('', {
31
32
  variants: {
32
33
  scaling: __assign({}, scalingVariants),
@@ -35,9 +36,21 @@ var accoridanVariants = cva('', {
35
36
  scaling: '100%',
36
37
  },
37
38
  });
39
+ var AccordionContext = createContext({
40
+ scaling: '100%',
41
+ color: 'red',
42
+ });
43
+ export var useAccordionContext = function () {
44
+ return useContext(AccordionContext);
45
+ };
38
46
  export var Root = React.forwardRef(function (_a, forwardedRef) {
39
- var className = _a.className, children = _a.children, scaling = _a.scaling, rootProps = __rest(_a, ["className", "children", "scaling"]);
40
- return (_jsx(AccordionPrimitive.Root, __assign({ className: cn('w-[280px] rounded-md border border-slateA-4 dark:border-slateDarkA-4', accoridanVariants({ scaling: scaling }), className) }, rootProps, { ref: forwardedRef, children: children })));
47
+ var className = _a.className, children = _a.children, scaling = _a.scaling, _b = _a.color, color = _b === void 0 ? 'red' : _b, rootProps = __rest(_a, ["className", "children", "scaling", "color"]);
48
+ var theme = useTheme().theme;
49
+ var contextValue = {
50
+ scaling: theme.themeScaling || scaling,
51
+ color: theme.themeColor || color,
52
+ };
53
+ return (_jsx(AccordionContext.Provider, { value: contextValue, children: _jsx(AccordionPrimitive.Root, __assign({ className: cn('w-[280px] rounded-md border border-slateA-4 dark:border-slateDarkA-4', accoridanVariants({ scaling: contextValue.scaling }), className) }, rootProps, { ref: forwardedRef, children: children })) }));
41
54
  });
42
55
  Root.displayName = 'Accordion.Root';
43
56
  export var Item = React.forwardRef(function (_a, forwardedRef) {
@@ -46,7 +59,8 @@ export var Item = React.forwardRef(function (_a, forwardedRef) {
46
59
  });
47
60
  Item.displayName = 'Accordion.Item';
48
61
  export var Trigger = React.forwardRef(function (_a, forwardedRef) {
49
- var className = _a.className, children = _a.children, _b = _a.color, color = _b === void 0 ? 'red' : _b, rootProps = __rest(_a, ["className", "children", "color"]);
62
+ var className = _a.className, children = _a.children, rootProps = __rest(_a, ["className", "children"]);
63
+ var color = useAccordionContext().color;
50
64
  return (_jsx(AccordionPrimitive.Header, __assign({}, rootProps, { className: cn('flex', className), children: _jsxs(AccordionPrimitive.Trigger, __assign({}, rootProps, { ref: forwardedRef, className: cn("group flex h-[44px] w-[278px] cursor-default items-center justify-between px-[20px] py-[10px] text-base font-normal", "dark:bg-[#111113] text-".concat(color, "A-11 dark:text-").concat(color, "Dark-11 "), "hover:bg-".concat(color, "A-4 dark:hover:bg-").concat(color, "Dark-4 hover:text-").concat(color, "A-11 dark:hover:text-").concat(color, "DarkA-11"), "data-[state=open]:bg-".concat(color, "A-5 dark:data-[state=open]:bg-").concat(color, "DarkA-5"), "disabled:bg-slateA-3 disabled:text-slateA-8 disabled:dark:bg-slateDarkA-3 disabled:dark:text-slateDarkA-8", className), children: [children, _jsx(ChevronDownIcon, { className: "transition-transform duration-300 ease-[cubic-bezier(0.87,_0,_0.13,_1)] group-data-[state=open]:rotate-180", "aria-hidden": true })] })) })));
51
65
  });
52
66
  Trigger.displayName = 'Accordion.Trigger';
@@ -1,2 +1,2 @@
1
- import{jsx as r,jsxs as a}from"react/jsx-runtime";import e from"react";import*as t from"@radix-ui/react-accordion";import{ChevronDownIcon as o}from"@radix-ui/react-icons";import{cn as n}from"../../utils/utils.mjs";import{cva as s}from"class-variance-authority";import{scalingVariants as c}from"../../constants.mjs";var i=function(){return i=Object.assign||function(r){for(var a,e=1,t=arguments.length;e<t;e++)for(var o in a=arguments[e])Object.prototype.hasOwnProperty.call(a,o)&&(r[o]=a[o]);return r},i.apply(this,arguments)},l=function(r,a){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&a.indexOf(t)<0&&(e[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(r);o<t.length;o++)a.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(r,t[o])&&(e[t[o]]=r[t[o]])}return e},d=s("",{variants:{scaling:i({},c)},defaultVariants:{scaling:"100%"}}),m=e.forwardRef((function(a,e){var o=a.className,s=a.children,c=a.scaling,m=l(a,["className","children","scaling"]);return r(t.Root,i({className:n("w-[280px] rounded-md border border-slateA-4 dark:border-slateDarkA-4",d({scaling:c}),o)},m,{ref:e,children:s}))}));m.displayName="Accordion.Root";var p=e.forwardRef((function(a,e){var o=a.className,s=a.children,c=l(a,["className","children"]);return r(t.Item,i({},c,{ref:e,className:n("mt-px w-[278px] overflow-hidden first:mt-0 first:rounded-t last:rounded-b",o),children:s}))}));p.displayName="Accordion.Item";var f=e.forwardRef((function(e,s){var c=e.className,d=e.children,m=e.color,p=void 0===m?"red":m,f=l(e,["className","children","color"]);return r(t.Header,i({},f,{className:n("flex",c),children:a(t.Trigger,i({},f,{ref:s,className:n("group flex h-[44px] w-[278px] cursor-default items-center justify-between px-[20px] py-[10px] text-base font-normal","dark:bg-[#111113] text-".concat(p,"A-11 dark:text-").concat(p,"Dark-11 "),"hover:bg-".concat(p,"A-4 dark:hover:bg-").concat(p,"Dark-4 hover:text-").concat(p,"A-11 dark:hover:text-").concat(p,"DarkA-11"),"data-[state=open]:bg-".concat(p,"A-5 dark:data-[state=open]:bg-").concat(p,"DarkA-5"),"disabled:bg-slateA-3 disabled:text-slateA-8 disabled:dark:bg-slateDarkA-3 disabled:dark:text-slateDarkA-8",c),children:[d,r(o,{className:"transition-transform duration-300 ease-[cubic-bezier(0.87,_0,_0.13,_1)] group-data-[state=open]:rotate-180","aria-hidden":!0})]}))}))}));f.displayName="Accordion.Trigger";var u=e.forwardRef((function(a,e){var o=a.className,s=a.children,c=l(a,["className","children"]);return r(t.Content,i({},c,{ref:e,className:n("max-h-[800px] w-[278px] overflow-hidden border-t border-t-slateA-4 bg-slateA-2 text-[16px] text-slateA-11 data-[state=closed]:animate-slideUp data-[state=open]:animate-slideDown dark:border-t-slateDarkA-4 dark:bg-slateDarkA-2 dark:text-slateDarkA-11",o),children:r("div",{className:"h-auto max-h-[1000px] overflow-y-auto px-[20px] py-[15px] text-base font-normal",children:s})}))}));u.displayName="Accordion.Content";var x={Root:m,Item:p,Trigger:f,Content:u};export{u as Content,p as Item,m as Root,f as Trigger,x as default};
1
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";import a,{createContext as t,useContext as o}from"react";import*as n from"@radix-ui/react-accordion";import{ChevronDownIcon as c}from"@radix-ui/react-icons";import{cn as s}from"../../utils/utils.mjs";import{cva as i}from"class-variance-authority";import{scalingVariants as l}from"../../constants.mjs";import{useTheme as d}from"../../theme/ThemeProvider.mjs";var m=function(){return m=Object.assign||function(r){for(var e,a=1,t=arguments.length;a<t;a++)for(var o in e=arguments[a])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},m.apply(this,arguments)},p=function(r,e){var a={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(a[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(r);o<t.length;o++)e.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(r,t[o])&&(a[t[o]]=r[t[o]])}return a},f=i("",{variants:{scaling:m({},l)},defaultVariants:{scaling:"100%"}}),u=t({scaling:"100%",color:"red"}),h=function(){return o(u)},x=a.forwardRef((function(e,a){var t=e.className,o=e.children,c=e.scaling,i=e.color,l=void 0===i?"red":i,h=p(e,["className","children","scaling","color"]),x=d().theme,b={scaling:x.themeScaling||c,color:x.themeColor||l};return r(u.Provider,{value:b,children:r(n.Root,m({className:s("w-[280px] rounded-md border border-slateA-4 dark:border-slateDarkA-4",f({scaling:b.scaling}),t)},h,{ref:a,children:o}))})}));x.displayName="Accordion.Root";var b=a.forwardRef((function(e,a){var t=e.className,o=e.children,c=p(e,["className","children"]);return r(n.Item,m({},c,{ref:a,className:s("mt-px w-[278px] overflow-hidden first:mt-0 first:rounded-t last:rounded-b",t),children:o}))}));b.displayName="Accordion.Item";var g=a.forwardRef((function(a,t){var o=a.className,i=a.children,l=p(a,["className","children"]),d=h().color;return r(n.Header,m({},l,{className:s("flex",o),children:e(n.Trigger,m({},l,{ref:t,className:s("group flex h-[44px] w-[278px] cursor-default items-center justify-between px-[20px] py-[10px] text-base font-normal","dark:bg-[#111113] text-".concat(d,"A-11 dark:text-").concat(d,"Dark-11 "),"hover:bg-".concat(d,"A-4 dark:hover:bg-").concat(d,"Dark-4 hover:text-").concat(d,"A-11 dark:hover:text-").concat(d,"DarkA-11"),"data-[state=open]:bg-".concat(d,"A-5 dark:data-[state=open]:bg-").concat(d,"DarkA-5"),"disabled:bg-slateA-3 disabled:text-slateA-8 disabled:dark:bg-slateDarkA-3 disabled:dark:text-slateDarkA-8",o),children:[i,r(c,{className:"transition-transform duration-300 ease-[cubic-bezier(0.87,_0,_0.13,_1)] group-data-[state=open]:rotate-180","aria-hidden":!0})]}))}))}));g.displayName="Accordion.Trigger";var v=a.forwardRef((function(e,a){var t=e.className,o=e.children,c=p(e,["className","children"]);return r(n.Content,m({},c,{ref:a,className:s("max-h-[800px] w-[278px] overflow-hidden border-t border-t-slateA-4 bg-slateA-2 text-[16px] text-slateA-11 data-[state=closed]:animate-slideUp data-[state=open]:animate-slideDown dark:border-t-slateDarkA-4 dark:bg-slateDarkA-2 dark:text-slateDarkA-11",t),children:r("div",{className:"h-auto max-h-[1000px] overflow-y-auto px-[20px] py-[15px] text-base font-normal",children:o})}))}));v.displayName="Accordion.Content";var A={Root:x,Item:b,Trigger:g,Content:v};export{v as Content,b as Item,x as Root,g as Trigger,A as default,h as useAccordionContext};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../lib/components/Accordion/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { ChevronDownIcon } from '@radix-ui/react-icons';\nimport { cn } from '../../../lib/utils/utils';\nimport { cva } from 'class-variance-authority';\nimport { scalingVariants } from '../../../lib/constants';\nvar accoridanVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nexport var Root = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, scaling = _a.scaling, rootProps = __rest(_a, [\"className\", \"children\", \"scaling\"]);\n return (_jsx(AccordionPrimitive.Root, __assign({ className: cn('w-[280px] rounded-md border border-slateA-4 dark:border-slateDarkA-4', accoridanVariants({ scaling: scaling }), className) }, rootProps, { ref: forwardedRef, children: children })));\n});\nRoot.displayName = 'Accordion.Root';\nexport var Item = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, rootProps = __rest(_a, [\"className\", \"children\"]);\n return (_jsx(AccordionPrimitive.Item, __assign({}, rootProps, { ref: forwardedRef, className: cn('mt-px w-[278px] overflow-hidden first:mt-0 first:rounded-t last:rounded-b', className), children: children })));\n});\nItem.displayName = 'Accordion.Item';\nexport var Trigger = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, _b = _a.color, color = _b === void 0 ? 'red' : _b, rootProps = __rest(_a, [\"className\", \"children\", \"color\"]);\n return (_jsx(AccordionPrimitive.Header, __assign({}, rootProps, { className: cn('flex', className), children: _jsxs(AccordionPrimitive.Trigger, __assign({}, rootProps, { ref: forwardedRef, className: cn(\"group flex h-[44px] w-[278px] cursor-default items-center justify-between px-[20px] py-[10px] text-base font-normal\", \"dark:bg-[#111113] text-\".concat(color, \"A-11 dark:text-\").concat(color, \"Dark-11 \"), \"hover:bg-\".concat(color, \"A-4 dark:hover:bg-\").concat(color, \"Dark-4 hover:text-\").concat(color, \"A-11 dark:hover:text-\").concat(color, \"DarkA-11\"), \"data-[state=open]:bg-\".concat(color, \"A-5 dark:data-[state=open]:bg-\").concat(color, \"DarkA-5\"), \"disabled:bg-slateA-3 disabled:text-slateA-8 disabled:dark:bg-slateDarkA-3 disabled:dark:text-slateDarkA-8\", className), children: [children, _jsx(ChevronDownIcon, { className: \"transition-transform duration-300 ease-[cubic-bezier(0.87,_0,_0.13,_1)] group-data-[state=open]:rotate-180\", \"aria-hidden\": true })] })) })));\n});\nTrigger.displayName = 'Accordion.Trigger';\nexport var Content = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, rootProps = __rest(_a, [\"className\", \"children\"]);\n return (_jsx(AccordionPrimitive.Content, __assign({}, rootProps, { ref: forwardedRef, className: cn('max-h-[800px] w-[278px] overflow-hidden border-t border-t-slateA-4 bg-slateA-2 text-[16px] text-slateA-11 data-[state=closed]:animate-slideUp data-[state=open]:animate-slideDown dark:border-t-slateDarkA-4 dark:bg-slateDarkA-2 dark:text-slateDarkA-11', className), children: _jsx(\"div\", { className: \"h-auto max-h-[1000px] overflow-y-auto px-[20px] py-[15px] text-base font-normal\", children: children }) })));\n});\nContent.displayName = 'Accordion.Content';\nvar Accordion = {\n Root: Root,\n Item: Item,\n Trigger: Trigger,\n Content: Content,\n};\nexport default Accordion;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","accoridanVariants","cva","variants","scaling","scalingVariants","defaultVariants","Root","React","forwardRef","_a","forwardedRef","className","children","rootProps","_jsx","AccordionPrimitive","cn","ref","displayName","Item","Trigger","_b","color","Header","_jsxs","concat","ChevronDownIcon","Content","Accordion"],"mappings":"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"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../lib/components/Accordion/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { createContext, useContext } from 'react';\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { ChevronDownIcon } from '@radix-ui/react-icons';\nimport { cn } from '../../../lib/utils/utils';\nimport { cva } from 'class-variance-authority';\nimport { scalingVariants } from '../../../lib/constants';\nimport { useTheme } from '../../../lib/theme';\nvar accoridanVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nvar AccordionContext = createContext({\n scaling: '100%',\n color: 'red',\n});\nexport var useAccordionContext = function () {\n return useContext(AccordionContext);\n};\nexport var Root = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, scaling = _a.scaling, _b = _a.color, color = _b === void 0 ? 'red' : _b, rootProps = __rest(_a, [\"className\", \"children\", \"scaling\", \"color\"]);\n var theme = useTheme().theme;\n var contextValue = {\n scaling: theme.themeScaling || scaling,\n color: theme.themeColor || color,\n };\n return (_jsx(AccordionContext.Provider, { value: contextValue, children: _jsx(AccordionPrimitive.Root, __assign({ className: cn('w-[280px] rounded-md border border-slateA-4 dark:border-slateDarkA-4', accoridanVariants({ scaling: contextValue.scaling }), className) }, rootProps, { ref: forwardedRef, children: children })) }));\n});\nRoot.displayName = 'Accordion.Root';\nexport var Item = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, rootProps = __rest(_a, [\"className\", \"children\"]);\n return (_jsx(AccordionPrimitive.Item, __assign({}, rootProps, { ref: forwardedRef, className: cn('mt-px w-[278px] overflow-hidden first:mt-0 first:rounded-t last:rounded-b', className), children: children })));\n});\nItem.displayName = 'Accordion.Item';\nexport var Trigger = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, rootProps = __rest(_a, [\"className\", \"children\"]);\n var color = useAccordionContext().color;\n return (_jsx(AccordionPrimitive.Header, __assign({}, rootProps, { className: cn('flex', className), children: _jsxs(AccordionPrimitive.Trigger, __assign({}, rootProps, { ref: forwardedRef, className: cn(\"group flex h-[44px] w-[278px] cursor-default items-center justify-between px-[20px] py-[10px] text-base font-normal\", \"dark:bg-[#111113] text-\".concat(color, \"A-11 dark:text-\").concat(color, \"Dark-11 \"), \"hover:bg-\".concat(color, \"A-4 dark:hover:bg-\").concat(color, \"Dark-4 hover:text-\").concat(color, \"A-11 dark:hover:text-\").concat(color, \"DarkA-11\"), \"data-[state=open]:bg-\".concat(color, \"A-5 dark:data-[state=open]:bg-\").concat(color, \"DarkA-5\"), \"disabled:bg-slateA-3 disabled:text-slateA-8 disabled:dark:bg-slateDarkA-3 disabled:dark:text-slateDarkA-8\", className), children: [children, _jsx(ChevronDownIcon, { className: \"transition-transform duration-300 ease-[cubic-bezier(0.87,_0,_0.13,_1)] group-data-[state=open]:rotate-180\", \"aria-hidden\": true })] })) })));\n});\nTrigger.displayName = 'Accordion.Trigger';\nexport var Content = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, rootProps = __rest(_a, [\"className\", \"children\"]);\n return (_jsx(AccordionPrimitive.Content, __assign({}, rootProps, { ref: forwardedRef, className: cn('max-h-[800px] w-[278px] overflow-hidden border-t border-t-slateA-4 bg-slateA-2 text-[16px] text-slateA-11 data-[state=closed]:animate-slideUp data-[state=open]:animate-slideDown dark:border-t-slateDarkA-4 dark:bg-slateDarkA-2 dark:text-slateDarkA-11', className), children: _jsx(\"div\", { className: \"h-auto max-h-[1000px] overflow-y-auto px-[20px] py-[15px] text-base font-normal\", children: children }) })));\n});\nContent.displayName = 'Accordion.Content';\nvar Accordion = {\n Root: Root,\n Item: Item,\n Trigger: Trigger,\n Content: Content,\n};\nexport default Accordion;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","accoridanVariants","cva","variants","scaling","scalingVariants","defaultVariants","AccordionContext","createContext","color","useAccordionContext","useContext","Root","React","forwardRef","_a","forwardedRef","className","children","_b","rootProps","theme","useTheme","contextValue","themeScaling","themeColor","_jsx","Provider","value","AccordionPrimitive","cn","ref","displayName","Item","Trigger","Header","_jsxs","concat","ChevronDownIcon","Content","Accordion"],"mappings":"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"}
@@ -6,9 +6,9 @@ export interface AlertDialogActionProps extends VariantProps<typeof alertDialogA
6
6
  appearance?: IAppearance;
7
7
  }
8
8
  export declare const alertDialogActionVariants: (props?: ({
9
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
9
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
10
10
  size?: "small" | "medium" | "large" | "x-large" | null | undefined;
11
- weight?: "bold" | "medium" | "regular" | "semibold" | null | undefined;
11
+ weight?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
12
12
  color?: string | null | undefined;
13
13
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
14
14
  export declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>>;
@@ -6,8 +6,8 @@ export interface AlertDialogCancelProps extends VariantProps<typeof alertDialogC
6
6
  appearance?: IAppearance;
7
7
  }
8
8
  export declare const alertDialogCancelVariants: (props?: ({
9
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
9
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
10
10
  size?: "small" | "medium" | "large" | "x-large" | 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
  export declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
@@ -6,6 +6,6 @@ export interface AlertDialogContentProps extends VariantProps<typeof alertDialog
6
6
  export declare const alertDialogContentVariants: (props?: ({
7
7
  size?: "small" | "medium" | "large" | "x-large" | null | undefined;
8
8
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
9
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
9
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
10
10
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
11
11
  export declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
@@ -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 { forwardRef, createContext, useContext, useMemo, } from 'react';
25
+ import { forwardRef, createContext, useContext, } from 'react';
25
26
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
27
+ import { useTheme } from '../../../lib/theme';
26
28
  var AlertDialogContext = createContext({
27
29
  size: 'medium',
28
30
  scaling: '100%',
@@ -35,12 +37,13 @@ export var useAlertDialogContext = function () {
35
37
  };
36
38
  export var AlertDialogRoot = forwardRef(function (_a, ref) {
37
39
  var children = _a.children, radius = _a.radius, size = _a.size, scaling = _a.scaling, color = _a.color, props = __rest(_a, ["children", "radius", "size", "scaling", "color"]);
38
- var contextValue = useMemo(function () { return ({
39
- radius: radius,
40
+ var theme = useTheme().theme;
41
+ var contextValue = {
42
+ radius: theme.themeRadius || radius,
43
+ scaling: theme.themeScaling || scaling,
44
+ color: theme.themeColor || color,
40
45
  size: size,
41
- scaling: scaling,
42
- color: color,
43
- }); }, [radius, size, scaling, color]);
46
+ };
44
47
  return (_jsx(AlertDialogContext.Provider, { value: contextValue, children: _jsx("div", { ref: ref, children: _jsx(AlertDialogPrimitive.Root, __assign({}, props, { children: children })) }) }));
45
48
  });
46
49
  AlertDialogRoot.displayName = 'AlertDialog.Root';
@@ -1,2 +1,3 @@
1
- import{jsx as r}from"react/jsx-runtime";import{createContext as e,forwardRef as o,useMemo as t,useContext as i}from"react";import*as n from"@radix-ui/react-alert-dialog";var a=function(){return a=Object.assign||function(r){for(var e,o=1,t=arguments.length;o<t;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},a.apply(this,arguments)},l=function(r,e){var o={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(o[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(r);i<t.length;i++)e.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(o[t[i]]=r[t[i]])}return o},c=e({size:"medium",scaling:"100%",color:"red",radius:"medium",appearance:"solid"}),s=function(){return i(c)},u=o((function(e,o){var i=e.children,s=e.radius,u=e.size,p=e.scaling,d=e.color,f=l(e,["children","radius","size","scaling","color"]),m=t((function(){return{radius:s,size:u,scaling:p,color:d}}),[s,u,p,d]);return r(c.Provider,{value:m,children:r("div",{ref:o,children:r(n.Root,a({},f,{children:i}))})})}));u.displayName="AlertDialog.Root";export{u as AlertDialogRoot,s as useAlertDialogContext};
1
+ "use client";
2
+ import{jsx as r}from"react/jsx-runtime";import{createContext as e,forwardRef as o,useContext as t}from"react";import*as i from"@radix-ui/react-alert-dialog";import{useTheme as n}from"../../theme/ThemeProvider.mjs";var a=function(){return a=Object.assign||function(r){for(var e,o=1,t=arguments.length;o<t;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},a.apply(this,arguments)},l=function(r,e){var o={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(o[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(r);i<t.length;i++)e.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(o[t[i]]=r[t[i]])}return o},c=e({size:"medium",scaling:"100%",color:"red",radius:"medium",appearance:"solid"}),s=function(){return t(c)},m=o((function(e,o){var t=e.children,s=e.radius,m=e.size,p=e.scaling,u=e.color,d=l(e,["children","radius","size","scaling","color"]),f=n().theme,h={radius:f.themeRadius||s,scaling:f.themeScaling||p,color:f.themeColor||u,size:m};return r(c.Provider,{value:h,children:r("div",{ref:o,children:r(i.Root,a({},d,{children:t}))})})}));m.displayName="AlertDialog.Root";export{m as AlertDialogRoot,s as useAlertDialogContext};
2
3
  //# sourceMappingURL=AlertDialogRoot.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AlertDialogRoot.mjs","sources":["../../../lib/components/AlertDialog/AlertDialogRoot.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 * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\nvar AlertDialogContext = createContext({\n size: 'medium',\n scaling: '100%',\n color: 'red',\n radius: 'medium',\n appearance: 'solid',\n});\nexport var useAlertDialogContext = function () {\n return useContext(AlertDialogContext);\n};\nexport var AlertDialogRoot = forwardRef(function (_a, ref) {\n var children = _a.children, radius = _a.radius, size = _a.size, scaling = _a.scaling, color = _a.color, props = __rest(_a, [\"children\", \"radius\", \"size\", \"scaling\", \"color\"]);\n var contextValue = useMemo(function () { return ({\n radius: radius,\n size: size,\n scaling: scaling,\n color: color,\n }); }, [radius, size, scaling, color]);\n return (_jsx(AlertDialogContext.Provider, { value: contextValue, children: _jsx(\"div\", { ref: ref, children: _jsx(AlertDialogPrimitive.Root, __assign({}, props, { children: children })) }) }));\n});\nAlertDialogRoot.displayName = 'AlertDialog.Root';\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","AlertDialogContext","createContext","size","scaling","color","radius","appearance","useAlertDialogContext","useContext","AlertDialogRoot","forwardRef","_a","ref","children","props","contextValue","useMemo","_jsx","Provider","value","AlertDialogPrimitive","Root","displayName"],"mappings":"0KAAA,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,EAIIiB,EAAqBC,EAAc,CACnCC,KAAM,SACNC,QAAS,OACTC,MAAO,MACPC,OAAQ,SACRC,WAAY,UAELC,EAAwB,WAC/B,OAAOC,EAAWR,EACtB,EACWS,EAAkBC,GAAW,SAAUC,EAAIC,GAClD,IAAIC,EAAWF,EAAGE,SAAUR,EAASM,EAAGN,OAAQH,EAAOS,EAAGT,KAAMC,EAAUQ,EAAGR,QAASC,EAAQO,EAAGP,MAAOU,EAAQnB,EAAOgB,EAAI,CAAC,WAAY,SAAU,OAAQ,UAAW,UACjKI,EAAeC,GAAQ,WAAc,MAAQ,CAC7CX,OAAQA,EACRH,KAAMA,EACNC,QAASA,EACTC,MAAOA,EACR,GAAI,CAACC,EAAQH,EAAMC,EAASC,IAC/B,OAAQa,EAAKjB,EAAmBkB,SAAU,CAAEC,MAAOJ,EAAcF,SAAUI,EAAK,MAAO,CAAEL,IAAKA,EAAKC,SAAUI,EAAKG,EAAqBC,KAAMzC,EAAS,CAAE,EAAEkC,EAAO,CAAED,SAAUA,QACjL,IACAJ,EAAgBa,YAAc"}
1
+ {"version":3,"file":"AlertDialogRoot.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -7,10 +7,10 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
7
7
  appearance?: IAppearance;
8
8
  }
9
9
  declare const buttonVariants: (props?: ({
10
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
10
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
11
11
  size?: "small" | "medium" | "large" | "x-large" | null | undefined;
12
12
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
13
- weight?: "bold" | "medium" | "regular" | "semibold" | null | undefined;
13
+ weight?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
14
14
  color?: string | null | undefined;
15
15
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
16
16
  export declare const AlertDialogTrigger: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & ButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -26,6 +26,7 @@ import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
26
26
  import { cva } from 'class-variance-authority';
27
27
  import { cn } from '../../../lib/utils/utils';
28
28
  import { scalingVariants } from '../../../lib/constants';
29
+ import { useTheme } from '../../../lib/theme';
29
30
  export var aspectRatioVariants = cva('', {
30
31
  variants: {
31
32
  scaling: __assign({}, scalingVariants),
@@ -36,7 +37,8 @@ export var aspectRatioVariants = cva('', {
36
37
  });
37
38
  var AspectRatio = forwardRef(function (_a, ref) {
38
39
  var children = _a.children, className = _a.className, _b = _a.ratio, ratio = _b === void 0 ? 16 / 9 : _b, scaling = _a.scaling, props = __rest(_a, ["children", "className", "ratio", "scaling"]);
39
- return (_jsx(AspectRatioPrimitive.Root, __assign({ ratio: ratio, ref: ref }, props, { className: cn(aspectRatioVariants({ scaling: scaling }), className), children: children })));
40
+ var theme = useTheme().theme;
41
+ return (_jsx(AspectRatioPrimitive.Root, __assign({ ratio: ratio, ref: ref }, props, { className: cn(aspectRatioVariants({ scaling: theme.themeScaling || scaling }), className), children: children })));
40
42
  });
41
43
  AspectRatio.displayName = 'AspectRatio';
42
44
  export default AspectRatio;
@@ -1,2 +1,2 @@
1
- import{jsx as r}from"react/jsx-runtime";import{forwardRef as t}from"react";import*as a from"@radix-ui/react-aspect-ratio";import{cva as o}from"class-variance-authority";import{cn as e}from"../../utils/utils.mjs";import{scalingVariants as i}from"../../constants.mjs";var n=function(){return n=Object.assign||function(r){for(var t,a=1,o=arguments.length;a<o;a++)for(var e in t=arguments[a])Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e]);return r},n.apply(this,arguments)},s=function(r,t){var a={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(a[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var e=0;for(o=Object.getOwnPropertySymbols(r);e<o.length;e++)t.indexOf(o[e])<0&&Object.prototype.propertyIsEnumerable.call(r,o[e])&&(a[o[e]]=r[o[e]])}return a},c=o("",{variants:{scaling:n({},i)},defaultVariants:{scaling:"100%"}}),l=t((function(t,o){var i=t.children,l=t.className,p=t.ratio,f=void 0===p?16/9:p,m=t.scaling,u=s(t,["children","className","ratio","scaling"]);return r(a.Root,n({ratio:f,ref:o},u,{className:e(c({scaling:m}),l),children:i}))}));l.displayName="AspectRatio";export{c as aspectRatioVariants,l as default};
1
+ import{jsx as r}from"react/jsx-runtime";import{forwardRef as t}from"react";import*as e from"@radix-ui/react-aspect-ratio";import{cva as a}from"class-variance-authority";import{cn as o}from"../../utils/utils.mjs";import{scalingVariants as i}from"../../constants.mjs";import{useTheme as n}from"../../theme/ThemeProvider.mjs";var s=function(){return s=Object.assign||function(r){for(var t,e=1,a=arguments.length;e<a;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r},s.apply(this,arguments)},c=function(r,t){var e={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&t.indexOf(a)<0&&(e[a]=r[a]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(r);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(r,a[o])&&(e[a[o]]=r[a[o]])}return e},l=a("",{variants:{scaling:s({},i)},defaultVariants:{scaling:"100%"}}),m=t((function(t,a){var i=t.children,m=t.className,p=t.ratio,f=void 0===p?16/9:p,u=t.scaling,y=c(t,["children","className","ratio","scaling"]),h=n().theme;return r(e.Root,s({ratio:f,ref:a},y,{className:o(l({scaling:h.themeScaling||u}),m),children:i}))}));m.displayName="AspectRatio";export{l as aspectRatioVariants,m as default};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../lib/components/AspectRatio/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 * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { scalingVariants } from '../../../lib/constants';\nexport var aspectRatioVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nvar AspectRatio = forwardRef(function (_a, ref) {\n var children = _a.children, className = _a.className, _b = _a.ratio, ratio = _b === void 0 ? 16 / 9 : _b, scaling = _a.scaling, props = __rest(_a, [\"children\", \"className\", \"ratio\", \"scaling\"]);\n return (_jsx(AspectRatioPrimitive.Root, __assign({ ratio: ratio, ref: ref }, props, { className: cn(aspectRatioVariants({ scaling: scaling }), className), children: children })));\n});\nAspectRatio.displayName = 'AspectRatio';\nexport default AspectRatio;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","aspectRatioVariants","cva","variants","scaling","scalingVariants","defaultVariants","AspectRatio","forwardRef","_a","ref","children","className","_b","ratio","props","_jsx","AspectRatioPrimitive","Root","cn","displayName"],"mappings":"0QAAA,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,EAOWiB,EAAsBC,EAAI,GAAI,CACrCC,SAAU,CACNC,QAASvB,EAAS,CAAE,EAAEwB,IAE1BC,gBAAiB,CACbF,QAAS,UAGbG,EAAcC,GAAW,SAAUC,EAAIC,GACvC,IAAIC,EAAWF,EAAGE,SAAUC,EAAYH,EAAGG,UAAWC,EAAKJ,EAAGK,MAAOA,OAAe,IAAPD,EAAgB,GAAK,EAAIA,EAAIT,EAAUK,EAAGL,QAASW,EAAQnB,EAAOa,EAAI,CAAC,WAAY,YAAa,QAAS,YACtL,OAAQO,EAAKC,EAAqBC,KAAMrC,EAAS,CAAEiC,MAAOA,EAAOJ,IAAKA,GAAOK,EAAO,CAAEH,UAAWO,EAAGlB,EAAoB,CAAEG,QAASA,IAAYQ,GAAYD,SAAUA,IACzK,IACAJ,EAAYa,YAAc"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../lib/components/AspectRatio/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 * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { scalingVariants } from '../../../lib/constants';\nimport { useTheme } from '../../../lib/theme';\nexport var aspectRatioVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nvar AspectRatio = forwardRef(function (_a, ref) {\n var children = _a.children, className = _a.className, _b = _a.ratio, ratio = _b === void 0 ? 16 / 9 : _b, scaling = _a.scaling, props = __rest(_a, [\"children\", \"className\", \"ratio\", \"scaling\"]);\n var theme = useTheme().theme;\n return (_jsx(AspectRatioPrimitive.Root, __assign({ ratio: ratio, ref: ref }, props, { className: cn(aspectRatioVariants({ scaling: theme.themeScaling || scaling }), className), children: children })));\n});\nAspectRatio.displayName = 'AspectRatio';\nexport default AspectRatio;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","aspectRatioVariants","cva","variants","scaling","scalingVariants","defaultVariants","AspectRatio","forwardRef","_a","ref","children","className","_b","ratio","props","theme","useTheme","_jsx","AspectRatioPrimitive","Root","cn","themeScaling","displayName"],"mappings":"mUAAA,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,EAAsBC,EAAI,GAAI,CACrCC,SAAU,CACNC,QAASvB,EAAS,CAAE,EAAEwB,IAE1BC,gBAAiB,CACbF,QAAS,UAGbG,EAAcC,GAAW,SAAUC,EAAIC,GACvC,IAAIC,EAAWF,EAAGE,SAAUC,EAAYH,EAAGG,UAAWC,EAAKJ,EAAGK,MAAOA,OAAe,IAAPD,EAAgB,GAAK,EAAIA,EAAIT,EAAUK,EAAGL,QAASW,EAAQnB,EAAOa,EAAI,CAAC,WAAY,YAAa,QAAS,YAClLO,EAAQC,IAAWD,MACvB,OAAQE,EAAKC,EAAqBC,KAAMvC,EAAS,CAAEiC,MAAOA,EAAOJ,IAAKA,GAAOK,EAAO,CAAEH,UAAWS,EAAGpB,EAAoB,CAAEG,QAASY,EAAMM,cAAgBlB,IAAYQ,GAAYD,SAAUA,IAC/L,IACAJ,EAAYgB,YAAc"}
@@ -12,7 +12,7 @@ export interface AvatarProps extends VariantProps<typeof AvatarVariants> {
12
12
  delayMs?: number;
13
13
  }
14
14
  declare const AvatarVariants: (props?: ({
15
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
15
+ radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
16
16
  size?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | null | undefined;
17
17
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
18
18
  color?: string | 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++) {
@@ -26,6 +27,7 @@ import * as AvatarPrimitive from '@radix-ui/react-avatar';
26
27
  import { cva } from 'class-variance-authority';
27
28
  import { cn } from '../../../lib/utils/utils';
28
29
  import { appearanceStyle, primaryColorStyle, radiusVariants, scalingVariants } from '../../../lib/constants';
30
+ import { useTheme } from '../../../lib/theme/ThemeProvider';
29
31
  var AvatarVariants = cva('font-medium', {
30
32
  variants: {
31
33
  radius: __assign({}, radiusVariants['base']),
@@ -51,8 +53,14 @@ var AvatarVariants = cva('font-medium', {
51
53
  });
52
54
  var Avatar = forwardRef(function (_a, ref) {
53
55
  var className = _a.className, fallbackClassName = _a.fallbackClassName, radius = _a.radius, scaling = _a.scaling, size = _a.size, fallbackText = _a.fallbackText, imagePath = _a.imagePath, alt = _a.alt, _b = _a.appearance, appearance = _b === void 0 ? 'solid' : _b, _c = _a.color, color = _c === void 0 ? 'red' : _c, ariaLabel = _a.ariaLabel, ariaLabelledby = _a.ariaLabelledby, title = _a.title, _d = _a.delayMs, delayMs = _d === void 0 ? 300 : _d, props = __rest(_a, ["className", "fallbackClassName", "radius", "scaling", "size", "fallbackText", "imagePath", "alt", "appearance", "color", "ariaLabel", "ariaLabelledby", "title", "delayMs"]);
56
+ var theme = useTheme().theme;
57
+ var avatarStyle = {
58
+ radius: theme.themeRadius || radius,
59
+ scaling: theme.themeScaling || scaling,
60
+ color: theme.themeColor || color,
61
+ };
54
62
  var imgAltText = alt || ariaLabel || fallbackText || 'Avatar Image';
55
- return (_jsxs(AvatarPrimitive.Root, __assign({ className: cn("inline-flex select-none items-center justify-center overflow-hidden align-middle", AvatarVariants({ radius: radius, scaling: scaling, size: size, color: color }), appearanceStyle(appearance, color, false), className) }, props, { ref: ref, role: "img", "aria-label": ariaLabel || imgAltText, "aria-labelledby": ariaLabelledby, title: title || imgAltText, tabIndex: 0, children: [_jsx(AvatarPrimitive.Image, { className: "h-full w-full border-none object-cover", src: imagePath, alt: imgAltText, title: title || imgAltText }), _jsx(AvatarPrimitive.Fallback, { className: cn("leading-1 flex h-full w-full items-center justify-center", className), delayMs: delayMs, "aria-hidden": "true", children: fallbackText })] })));
63
+ return (_jsxs(AvatarPrimitive.Root, __assign({ className: cn("inline-flex select-none items-center justify-center overflow-hidden align-middle", AvatarVariants(avatarStyle), appearanceStyle(appearance, avatarStyle.color, false), className) }, props, { ref: ref, role: "img", "aria-label": ariaLabel || imgAltText, "aria-labelledby": ariaLabelledby, title: title || imgAltText, tabIndex: 0, children: [_jsx(AvatarPrimitive.Image, { className: "h-full w-full border-none object-cover", src: imagePath, alt: imgAltText, title: title || imgAltText }), _jsx(AvatarPrimitive.Fallback, { className: cn("leading-1 flex h-full w-full items-center justify-center", className), delayMs: delayMs, "aria-hidden": "true", children: fallbackText })] })));
56
64
  });
57
65
  Avatar.displayName = 'Avatar';
58
66
  export default Avatar;
@@ -1,2 +1,3 @@
1
- import{jsxs as e,jsx as a}from"react/jsx-runtime";import{forwardRef as t}from"react";import*as r from"@radix-ui/react-avatar";import{cva as l}from"class-variance-authority";import{cn as i}from"../../utils/utils.mjs";import{radiusVariants as o,scalingVariants as s,primaryColorStyle as n,appearanceStyle as p}from"../../constants.mjs";var c=function(){return c=Object.assign||function(e){for(var a,t=1,r=arguments.length;t<r;t++)for(var l in a=arguments[t])Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l]);return e},c.apply(this,arguments)},x=function(e,a){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&a.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(r=Object.getOwnPropertySymbols(e);l<r.length;l++)a.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(e,r[l])&&(t[r[l]]=e[r[l]])}return t},f=l("font-medium",{variants:{radius:c({},o.base),size:{1:"h-[24px] w-[24px] text-[12px]",2:"h-[32px] w-[32px] text-[14px]",3:"h-[40px] w-[40px] text-[16px]",4:"h-[48px] w-[48px] text-[18px]",5:"h-[64px] w-[64px] text-[24px]",6:"h-[80px] w-[80px] text-[28px]",7:"h-[96px] w-[96px] text-[28px]",8:"h-[128px] w-[128px] text-[35px]",9:"h-[160px] w-[160px] text-[60px]"},scaling:c({},s),color:n()},defaultVariants:{radius:"full",color:"red",size:"3"}}),m=t((function(t,l){var o=t.className;t.fallbackClassName;var s=t.radius,n=t.scaling,m=t.size,d=t.fallbackText,u=t.imagePath,b=t.alt,h=t.appearance,y=void 0===h?"solid":h,v=t.color,g=void 0===v?"red":v,w=t.ariaLabel,j=t.ariaLabelledby,O=t.title,N=t.delayMs,P=void 0===N?300:N,k=x(t,["className","fallbackClassName","radius","scaling","size","fallbackText","imagePath","alt","appearance","color","ariaLabel","ariaLabelledby","title","delayMs"]),z=b||w||d||"Avatar Image";return e(r.Root,c({className:i("inline-flex select-none items-center justify-center overflow-hidden align-middle",f({radius:s,scaling:n,size:m,color:g}),p(y,g,!1),o)},k,{ref:l,role:"img","aria-label":w||z,"aria-labelledby":j,title:O||z,tabIndex:0,children:[a(r.Image,{className:"h-full w-full border-none object-cover",src:u,alt:z,title:O||z}),a(r.Fallback,{className:i("leading-1 flex h-full w-full items-center justify-center",o),delayMs:P,"aria-hidden":"true",children:d})]}))}));m.displayName="Avatar";export{m as default};
1
+ "use client";
2
+ import{jsxs as e,jsx as a}from"react/jsx-runtime";import{forwardRef as t}from"react";import*as r from"@radix-ui/react-avatar";import{cva as l}from"class-variance-authority";import{cn as i}from"../../utils/utils.mjs";import{radiusVariants as o,scalingVariants as s,primaryColorStyle as n,appearanceStyle as p}from"../../constants.mjs";import{useTheme as c}from"../../theme/ThemeProvider.mjs";var x=function(){return x=Object.assign||function(e){for(var a,t=1,r=arguments.length;t<r;t++)for(var l in a=arguments[t])Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l]);return e},x.apply(this,arguments)},m=function(e,a){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&a.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(r=Object.getOwnPropertySymbols(e);l<r.length;l++)a.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(e,r[l])&&(t[r[l]]=e[r[l]])}return t},f=l("font-medium",{variants:{radius:x({},o.base),size:{1:"h-[24px] w-[24px] text-[12px]",2:"h-[32px] w-[32px] text-[14px]",3:"h-[40px] w-[40px] text-[16px]",4:"h-[48px] w-[48px] text-[18px]",5:"h-[64px] w-[64px] text-[24px]",6:"h-[80px] w-[80px] text-[28px]",7:"h-[96px] w-[96px] text-[28px]",8:"h-[128px] w-[128px] text-[35px]",9:"h-[160px] w-[160px] text-[60px]"},scaling:x({},s),color:n()},defaultVariants:{radius:"full",color:"red",size:"3"}}),d=t((function(t,l){var o=t.className;t.fallbackClassName;var s=t.radius,n=t.scaling;t.size;var d=t.fallbackText,u=t.imagePath,h=t.alt,b=t.appearance,y=void 0===b?"solid":b,v=t.color,g=void 0===v?"red":v,w=t.ariaLabel,j=t.ariaLabelledby,O=t.title,N=t.delayMs,P=void 0===N?300:N,k=m(t,["className","fallbackClassName","radius","scaling","size","fallbackText","imagePath","alt","appearance","color","ariaLabel","ariaLabelledby","title","delayMs"]),z=c().theme,I={radius:z.themeRadius||s,scaling:z.themeScaling||n,color:z.themeColor||g},L=h||w||d||"Avatar Image";return e(r.Root,x({className:i("inline-flex select-none items-center justify-center overflow-hidden align-middle",f(I),p(y,I.color,!1),o)},k,{ref:l,role:"img","aria-label":w||L,"aria-labelledby":j,title:O||L,tabIndex:0,children:[a(r.Image,{className:"h-full w-full border-none object-cover",src:u,alt:L,title:O||L}),a(r.Fallback,{className:i("leading-1 flex h-full w-full items-center justify-center",o),delayMs:P,"aria-hidden":"true",children:d})]}))}));d.displayName="Avatar";export{d as default};
2
3
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../lib/components/Avatar/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 * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { appearanceStyle, primaryColorStyle, radiusVariants, scalingVariants } from '../../../lib/constants';\nvar AvatarVariants = cva('font-medium', {\n variants: {\n radius: __assign({}, radiusVariants['base']),\n size: {\n '1': 'h-[24px] w-[24px] text-[12px]',\n '2': 'h-[32px] w-[32px] text-[14px]',\n '3': 'h-[40px] w-[40px] text-[16px]',\n '4': 'h-[48px] w-[48px] text-[18px]',\n '5': 'h-[64px] w-[64px] text-[24px]',\n '6': 'h-[80px] w-[80px] text-[28px]',\n '7': 'h-[96px] w-[96px] text-[28px]',\n '8': 'h-[128px] w-[128px] text-[35px]',\n '9': 'h-[160px] w-[160px] text-[60px]',\n },\n scaling: __assign({}, scalingVariants),\n color: primaryColorStyle(),\n },\n defaultVariants: {\n radius: 'full',\n color: 'red',\n size: '3',\n },\n});\nvar Avatar = forwardRef(function (_a, ref) {\n var className = _a.className, fallbackClassName = _a.fallbackClassName, radius = _a.radius, scaling = _a.scaling, size = _a.size, fallbackText = _a.fallbackText, imagePath = _a.imagePath, alt = _a.alt, _b = _a.appearance, appearance = _b === void 0 ? 'solid' : _b, _c = _a.color, color = _c === void 0 ? 'red' : _c, ariaLabel = _a.ariaLabel, ariaLabelledby = _a.ariaLabelledby, title = _a.title, _d = _a.delayMs, delayMs = _d === void 0 ? 300 : _d, props = __rest(_a, [\"className\", \"fallbackClassName\", \"radius\", \"scaling\", \"size\", \"fallbackText\", \"imagePath\", \"alt\", \"appearance\", \"color\", \"ariaLabel\", \"ariaLabelledby\", \"title\", \"delayMs\"]);\n var imgAltText = alt || ariaLabel || fallbackText || 'Avatar Image';\n return (_jsxs(AvatarPrimitive.Root, __assign({ className: cn(\"inline-flex select-none items-center justify-center overflow-hidden align-middle\", AvatarVariants({ radius: radius, scaling: scaling, size: size, color: color }), appearanceStyle(appearance, color, false), className) }, props, { ref: ref, role: \"img\", \"aria-label\": ariaLabel || imgAltText, \"aria-labelledby\": ariaLabelledby, title: title || imgAltText, tabIndex: 0, children: [_jsx(AvatarPrimitive.Image, { className: \"h-full w-full border-none object-cover\", src: imagePath, alt: imgAltText, title: title || imgAltText }), _jsx(AvatarPrimitive.Fallback, { className: cn(\"leading-1 flex h-full w-full items-center justify-center\", className), delayMs: delayMs, \"aria-hidden\": \"true\", children: fallbackText })] })));\n});\nAvatar.displayName = 'Avatar';\nexport default Avatar;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","AvatarVariants","cva","variants","radius","radiusVariants","size","scaling","scalingVariants","color","primaryColorStyle","defaultVariants","Avatar","forwardRef","_a","ref","className","fallbackClassName","fallbackText","imagePath","alt","_b","appearance","_c","ariaLabel","ariaLabelledby","title","_d","delayMs","props","imgAltText","_jsxs","AvatarPrimitive","Root","cn","appearanceStyle","role","tabIndex","children","_jsx","Image","src","Fallback","displayName"],"mappings":"8UAAA,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,EAAiBC,EAAI,cAAe,CACpCC,SAAU,CACNC,OAAQvB,EAAS,CAAA,EAAIwB,EAAqB,MAC1CC,KAAM,CACF,EAAK,gCACL,EAAK,gCACL,EAAK,gCACL,EAAK,gCACL,EAAK,gCACL,EAAK,gCACL,EAAK,gCACL,EAAK,kCACL,EAAK,mCAETC,QAAS1B,EAAS,CAAE,EAAE2B,GACtBC,MAAOC,KAEXC,gBAAiB,CACbP,OAAQ,OACRK,MAAO,MACPH,KAAM,OAGVM,EAASC,GAAW,SAAUC,EAAIC,GAC/B,IAACC,EAAYF,EAAGE,UAA+BF,EAAGG,kBAAkB,IAACb,EAASU,EAAGV,OAAQG,EAAUO,EAAGP,QAASD,EAAOQ,EAAGR,KAAMY,EAAeJ,EAAGI,aAAcC,EAAYL,EAAGK,UAAWC,EAAMN,EAAGM,IAAKC,EAAKP,EAAGQ,WAAYA,OAAoB,IAAPD,EAAgB,QAAUA,EAAIE,EAAKT,EAAGL,MAAOA,OAAe,IAAPc,EAAgB,MAAQA,EAAIC,EAAYV,EAAGU,UAAWC,EAAiBX,EAAGW,eAAgBC,EAAQZ,EAAGY,MAAOC,EAAKb,EAAGc,QAASA,OAAiB,IAAPD,EAAgB,IAAMA,EAAIE,EAAQjC,EAAOkB,EAAI,CAAC,YAAa,oBAAqB,SAAU,UAAW,OAAQ,eAAgB,YAAa,MAAO,aAAc,QAAS,YAAa,iBAAkB,QAAS,YACnnBgB,EAAaV,GAAOI,GAAaN,GAAgB,eACrD,OAAQa,EAAMC,EAAgBC,KAAMpD,EAAS,CAAEmC,UAAWkB,EAAG,mFAAoFjC,EAAe,CAAEG,OAAQA,EAAQG,QAASA,EAASD,KAAMA,EAAMG,MAAOA,IAAU0B,EAAgBb,EAAYb,GAAO,GAAQO,IAAca,EAAO,CAAEd,IAAKA,EAAKqB,KAAM,MAAO,aAAcZ,GAAaM,EAAY,kBAAmBL,EAAgBC,MAAOA,GAASI,EAAYO,SAAU,EAAGC,SAAU,CAACC,EAAKP,EAAgBQ,MAAO,CAAExB,UAAW,yCAA0CyB,IAAKtB,EAAWC,IAAKU,EAAYJ,MAAOA,GAASI,IAAeS,EAAKP,EAAgBU,SAAU,CAAE1B,UAAWkB,EAAG,2DAA4DlB,GAAYY,QAASA,EAAS,cAAe,OAAQU,SAAUpB,OACzvB,IACAN,EAAO+B,YAAc"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -8,10 +8,10 @@ export interface BadgeProps extends HTMLAttributes<HTMLDivElement>, VariantProps
8
8
  weight?: IWeight;
9
9
  }
10
10
  declare const BadgeVariants: (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
- weight?: "bold" | "medium" | "regular" | "semibold" | null | undefined;
14
+ weight?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
15
15
  color?: string | null | undefined;
16
16
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
17
17
  declare const Badge: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & BadgeProps & React.RefAttributes<HTMLDivElement>>;
@@ -25,6 +25,7 @@ import { forwardRef } from 'react';
25
25
  import { cva } from 'class-variance-authority';
26
26
  import { cn } from '../../../lib/utils/utils';
27
27
  import { appearanceStyle, primaryColorStyle, radiusVariants, scalingVariants, weightVariants, } from '../../../lib/constants';
28
+ import { useTheme } from '../../../lib/theme';
28
29
  var BadgeVariants = cva('inline-flex items-center transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 w-fit', {
29
30
  variants: {
30
31
  radius: __assign({}, radiusVariants['base']),
@@ -47,7 +48,15 @@ var BadgeVariants = cva('inline-flex items-center transition-colors focus:outlin
47
48
  });
48
49
  var Badge = forwardRef(function (_a, ref) {
49
50
  var className = _a.className, children = _a.children, radius = _a.radius, scaling = _a.scaling, weight = _a.weight, size = _a.size, _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", "weight", "size", "color", "appearance"]);
50
- var badgeClassName = cn(BadgeVariants({ radius: radius, scaling: scaling, weight: weight, size: size, color: color }), appearanceStyle(appearance, color, false), className);
51
+ var theme = useTheme().theme;
52
+ var badgeStyle = {
53
+ radius: theme.themeRadius || radius,
54
+ scaling: theme.themeScaling || scaling,
55
+ weight: theme.themeWeight || weight,
56
+ color: theme.themeColor || color,
57
+ size: size,
58
+ };
59
+ var badgeClassName = cn(BadgeVariants(badgeStyle), appearanceStyle(appearance, badgeStyle.color, false), className);
51
60
  return (_jsx("div", __assign({ ref: ref, className: badgeClassName }, props, { children: children })));
52
61
  });
53
62
  Badge.displayName = 'Badge';