@lotte-innovate/ui-component-test 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. package/README.md +71 -71
  2. package/dist/globals.css +4 -4
  3. package/dist/lib/components/Accordion/index.d.ts +10 -4
  4. package/dist/lib/components/Accordion/index.js +17 -11
  5. package/dist/lib/components/AlertDialog/AlertDialogAction.js +1 -1
  6. package/dist/lib/components/AlertDialog/AlertDialogCancel.js +1 -1
  7. package/dist/lib/components/AlertDialog/AlertDialogContent.js +2 -2
  8. package/dist/lib/components/AlertDialog/AlertDialogRoot.d.ts +1 -1
  9. package/dist/lib/components/AlertDialog/AlertDialogRoot.js +7 -2
  10. package/dist/lib/components/AlertDialog/AlertDialogTrigger.js +1 -1
  11. package/dist/lib/components/Avatar/index.d.ts +3 -0
  12. package/dist/lib/components/Avatar/index.js +3 -2
  13. package/dist/lib/components/BarChart/index.d.ts +5 -3
  14. package/dist/lib/components/BarChart/index.js +12 -1
  15. package/dist/lib/components/BubbleChart/index.d.ts +3 -0
  16. package/dist/lib/components/Callout/CalloutIcon.js +3 -3
  17. package/dist/lib/components/Callout/CalloutRoot.d.ts +18 -0
  18. package/dist/lib/components/Callout/CalloutRoot.js +72 -0
  19. package/dist/lib/components/Callout/CalloutText.js +2 -2
  20. package/dist/lib/components/Callout/index.d.ts +6 -19
  21. package/dist/lib/components/Callout/index.js +7 -73
  22. package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.js +2 -2
  23. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.d.ts +16 -0
  24. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.js +34 -0
  25. package/dist/lib/components/CheckboxGroup/index.d.ts +5 -16
  26. package/dist/lib/components/CheckboxGroup/index.js +3 -34
  27. package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.d.ts +1 -1
  28. package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.js +4 -2
  29. package/dist/lib/components/ContextMenu/ContextMenuContent.js +2 -2
  30. package/dist/lib/components/ContextMenu/ContextMenuGroup.d.ts +1 -1
  31. package/dist/lib/components/ContextMenu/ContextMenuGroup.js +1 -1
  32. package/dist/lib/components/ContextMenu/ContextMenuItem.js +2 -2
  33. package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.js +2 -2
  34. package/dist/lib/components/ContextMenu/ContextMenuLabel.js +2 -2
  35. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.js +1 -1
  36. package/dist/lib/components/ContextMenu/ContextMenuRadioItem.d.ts +1 -1
  37. package/dist/lib/components/ContextMenu/ContextMenuRadioItem.js +5 -2
  38. package/dist/lib/components/ContextMenu/ContextMenuRoot.d.ts +13 -0
  39. package/dist/lib/components/ContextMenu/ContextMenuRoot.js +42 -0
  40. package/dist/lib/components/ContextMenu/ContextMenuSeparator.js +1 -1
  41. package/dist/lib/components/ContextMenu/ContextMenuSubContent.js +4 -3
  42. package/dist/lib/components/ContextMenu/ContextMenuSubTrigger.js +2 -2
  43. package/dist/lib/components/ContextMenu/ContextMenuTrigger.d.ts +1 -1
  44. package/dist/lib/components/ContextMenu/ContextMenuTrigger.js +2 -2
  45. package/dist/lib/components/ContextMenu/index.d.ts +16 -24
  46. package/dist/lib/components/ContextMenu/index.js +27 -52
  47. package/dist/lib/components/DataList/DataListItem.js +2 -2
  48. package/dist/lib/components/DataList/DataListLabel.js +2 -2
  49. package/dist/lib/components/DataList/DataListRoot.d.ts +14 -0
  50. package/dist/lib/components/DataList/DataListRoot.js +54 -0
  51. package/dist/lib/components/DataList/DataListValue.js +2 -2
  52. package/dist/lib/components/DataList/index.d.ts +7 -16
  53. package/dist/lib/components/DataList/index.js +5 -56
  54. package/dist/lib/components/Dialog/DialogAction.d.ts +0 -2
  55. package/dist/lib/components/Dialog/DialogAction.js +7 -5
  56. package/dist/lib/components/Dialog/DialogCancel.js +5 -3
  57. package/dist/lib/components/Dialog/DialogContent.js +5 -3
  58. package/dist/lib/components/Dialog/DialogDescription.js +5 -3
  59. package/dist/lib/components/Dialog/DialogRoot.d.ts +12 -0
  60. package/dist/lib/components/Dialog/DialogRoot.js +37 -0
  61. package/dist/lib/components/Dialog/DialogSlot.js +5 -3
  62. package/dist/lib/components/Dialog/DialogTitle.js +5 -3
  63. package/dist/lib/components/Dialog/DialogTrigger.js +1 -1
  64. package/dist/lib/components/Dialog/index.d.ts +11 -17
  65. package/dist/lib/components/Dialog/index.js +17 -36
  66. package/dist/lib/components/DoughnutChart/index.js +9 -18
  67. package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.d.ts +0 -5
  68. package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.js +3 -4
  69. package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.js +5 -3
  70. package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +1 -1
  71. package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.js +7 -4
  72. package/dist/lib/components/DropdownMenu/DropdownMenuContent.js +5 -3
  73. package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +2 -0
  74. package/dist/lib/components/DropdownMenu/DropdownMenuItem.js +5 -3
  75. package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.js +5 -3
  76. package/dist/lib/components/DropdownMenu/DropdownMenuLable.d.ts +0 -1
  77. package/dist/lib/components/DropdownMenu/DropdownMenuLable.js +5 -6
  78. package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.d.ts +4 -2
  79. package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.js +8 -6
  80. package/dist/lib/components/DropdownMenu/DropdownMenuRoot.d.ts +12 -0
  81. package/dist/lib/components/DropdownMenu/DropdownMenuRoot.js +38 -0
  82. package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.js +1 -1
  83. package/dist/lib/components/DropdownMenu/DropdownMenuSub.js +1 -1
  84. package/dist/lib/components/DropdownMenu/DropdownMenuSubTrigger.js +5 -3
  85. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +2 -1
  86. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.js +5 -3
  87. package/dist/lib/components/DropdownMenu/index.d.ts +16 -22
  88. package/dist/lib/components/DropdownMenu/index.js +27 -41
  89. package/dist/lib/components/HoverCard/HoverCardContent.js +5 -3
  90. package/dist/lib/components/HoverCard/HoverCardRoot.d.ts +8 -0
  91. package/dist/lib/components/HoverCard/HoverCardRoot.js +38 -0
  92. package/dist/lib/components/HoverCard/HoverCardTrigger.js +1 -1
  93. package/dist/lib/components/HoverCard/index.d.ts +6 -9
  94. package/dist/lib/components/HoverCard/index.js +7 -31
  95. package/dist/lib/components/LineChart/index.d.ts +87 -0
  96. package/dist/lib/components/LineChart/index.js +58 -0
  97. package/dist/lib/components/Menubar/MenubarCheckboxItem.js +2 -2
  98. package/dist/lib/components/Menubar/MenubarContent.js +2 -2
  99. package/dist/lib/components/Menubar/MenubarItem.js +2 -2
  100. package/dist/lib/components/Menubar/MenubarItemIndicator.js +2 -2
  101. package/dist/lib/components/Menubar/MenubarMenu.js +1 -1
  102. package/dist/lib/components/Menubar/MenubarRadioGroup.js +1 -1
  103. package/dist/lib/components/Menubar/MenubarRadioItem.js +2 -2
  104. package/dist/lib/components/Menubar/MenubarRoot.d.ts +19 -0
  105. package/dist/lib/components/Menubar/MenubarRoot.js +61 -0
  106. package/dist/lib/components/Menubar/MenubarSeparator.js +1 -1
  107. package/dist/lib/components/Menubar/MenubarSub.js +1 -1
  108. package/dist/lib/components/Menubar/MenubarSubContent.js +2 -2
  109. package/dist/lib/components/Menubar/MenubarSubTrigger.js +2 -2
  110. package/dist/lib/components/Menubar/MenubarTrigger.js +2 -2
  111. package/dist/lib/components/Menubar/index.d.ts +16 -30
  112. package/dist/lib/components/Menubar/index.js +27 -71
  113. package/dist/lib/components/NavigationMenu/NavigationMenuContent.js +2 -2
  114. package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.js +1 -1
  115. package/dist/lib/components/NavigationMenu/NavigationMenuItem.js +1 -1
  116. package/dist/lib/components/NavigationMenu/NavigationMenuLink.js +2 -2
  117. package/dist/lib/components/NavigationMenu/NavigationMenuList.js +2 -2
  118. package/dist/lib/components/NavigationMenu/NavigationMenuRoot.d.ts +14 -0
  119. package/dist/lib/components/NavigationMenu/NavigationMenuRoot.js +43 -0
  120. package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.js +2 -2
  121. package/dist/lib/components/NavigationMenu/NavigationMenuViewport.js +2 -2
  122. package/dist/lib/components/NavigationMenu/index.d.ts +11 -20
  123. package/dist/lib/components/NavigationMenu/index.js +9 -49
  124. package/dist/lib/components/PieChart/index.js +9 -18
  125. package/dist/lib/components/Popover/PopoverClose.js +5 -3
  126. package/dist/lib/components/Popover/PopoverContent.js +5 -3
  127. package/dist/lib/components/Popover/PopoverRoot.d.ts +9 -0
  128. package/dist/lib/components/Popover/PopoverRoot.js +36 -0
  129. package/dist/lib/components/Popover/PopoverTrigger.js +1 -1
  130. package/dist/lib/components/Popover/index.d.ts +7 -11
  131. package/dist/lib/components/Popover/index.js +9 -32
  132. package/dist/lib/components/RadioCards/RadioCardsItem.js +5 -3
  133. package/dist/lib/components/RadioCards/RadioCardsRoot.d.ts +14 -0
  134. package/dist/lib/components/RadioCards/RadioCardsRoot.js +46 -0
  135. package/dist/lib/components/RadioCards/index.d.ts +5 -13
  136. package/dist/lib/components/RadioCards/index.js +5 -41
  137. package/dist/lib/components/RadioGroup/RadioGroupItem.js +5 -3
  138. package/dist/lib/components/RadioGroup/RadioGroupRoot.d.ts +16 -0
  139. package/dist/lib/components/RadioGroup/RadioGroupRoot.js +53 -0
  140. package/dist/lib/components/RadioGroup/index.d.ts +5 -15
  141. package/dist/lib/components/RadioGroup/index.js +5 -49
  142. package/dist/lib/components/SegmentedControl/SegmentedControlItem.js +1 -1
  143. package/dist/lib/components/SegmentedControl/SegmentedControlRoot.d.ts +14 -0
  144. package/dist/lib/components/SegmentedControl/SegmentedControlRoot.js +47 -0
  145. package/dist/lib/components/SegmentedControl/index.d.ts +5 -14
  146. package/dist/lib/components/SegmentedControl/index.js +5 -46
  147. package/dist/lib/components/Select/index.d.ts +16 -7
  148. package/dist/lib/components/Select/index.js +23 -14
  149. package/dist/lib/components/TabNav/index.d.ts +6 -2
  150. package/dist/lib/components/TabNav/index.js +9 -5
  151. package/dist/lib/components/Table/index.d.ts +16 -7
  152. package/dist/lib/components/Table/index.js +23 -14
  153. package/dist/lib/components/Tabs/index.d.ts +10 -4
  154. package/dist/lib/components/Tabs/index.js +15 -9
  155. package/dist/lib/components/TextField/index.d.ts +6 -2
  156. package/dist/lib/components/TextField/index.js +8 -4
  157. package/dist/lib/components/Toast/ToastActionButton.js +2 -2
  158. package/dist/lib/components/Toast/ToastDescription.js +2 -2
  159. package/dist/lib/components/Toast/ToastRoot.d.ts +27 -0
  160. package/dist/lib/components/Toast/ToastRoot.js +90 -0
  161. package/dist/lib/components/Toast/ToastTitle.js +2 -2
  162. package/dist/lib/components/Toast/index.d.ts +7 -29
  163. package/dist/lib/components/Toast/index.js +9 -92
  164. package/dist/lib/components/ToggleGroup/{toggleGroupItem.js → ToggleGroupItem.js} +6 -4
  165. package/dist/lib/components/ToggleGroup/ToggleGroupRoot.d.ts +18 -0
  166. package/dist/lib/components/ToggleGroup/ToggleGroupRoot.js +47 -0
  167. package/dist/lib/components/ToggleGroup/index.d.ts +5 -19
  168. package/dist/lib/components/ToggleGroup/index.js +5 -41
  169. package/dist/lib/components/Tooltip/index.d.ts +3 -3
  170. package/dist/lib/components/Tooltip/index.js +3 -2
  171. package/dist/lib/components/index.d.ts +1 -0
  172. package/dist/lib/components/index.js +1 -0
  173. package/dist/lib/constants.d.ts +0 -9
  174. package/dist/lib/constants.js +0 -7
  175. package/package.json +131 -132
  176. /package/dist/lib/components/ToggleGroup/{toggleGroupItem.d.ts → ToggleGroupItem.d.ts} +0 -0
@@ -9,8 +9,14 @@ export interface AccordionProps extends React.InputHTMLAttributes<HTMLInputEleme
9
9
  declare const accoridanVariants: (props?: ({
10
10
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
11
11
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
12
- export declare const Accordion: React.ForwardRefExoticComponent<((Omit<AccordionPrimitive.AccordionSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<AccordionPrimitive.AccordionMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & AccordionProps) & React.RefAttributes<HTMLDivElement>>;
13
- export declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & AccordionProps & React.RefAttributes<HTMLDivElement>>;
14
- export declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & AccordionProps & React.RefAttributes<HTMLButtonElement>>;
15
- export declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & AccordionProps & React.RefAttributes<HTMLDivElement>>;
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>>;
13
+ export declare const Item: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & AccordionProps & React.RefAttributes<HTMLDivElement>>;
14
+ export declare const Trigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & AccordionProps & React.RefAttributes<HTMLButtonElement>>;
15
+ export declare const Content: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & AccordionProps & React.RefAttributes<HTMLDivElement>>;
16
+ declare const Accordion: {
17
+ Root: React.ForwardRefExoticComponent<((Omit<AccordionPrimitive.AccordionSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<AccordionPrimitive.AccordionMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & AccordionProps) & React.RefAttributes<HTMLDivElement>>;
18
+ Item: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & AccordionProps & React.RefAttributes<HTMLDivElement>>;
19
+ Trigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & AccordionProps & React.RefAttributes<HTMLButtonElement>>;
20
+ Content: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & AccordionProps & React.RefAttributes<HTMLDivElement>>;
21
+ };
16
22
  export default Accordion;
@@ -35,24 +35,30 @@ var accoridanVariants = cva('', {
35
35
  scaling: '100%',
36
36
  },
37
37
  });
38
- export var Accordion = React.forwardRef(function (_a, forwardedRef) {
38
+ export var Root = React.forwardRef(function (_a, forwardedRef) {
39
39
  var className = _a.className, children = _a.children, scaling = _a.scaling, rootProps = __rest(_a, ["className", "children", "scaling"]);
40
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 })));
41
41
  });
42
- Accordion.displayName = 'AccordionRoot';
43
- export var AccordionItem = React.forwardRef(function (_a, forwardedRef) {
42
+ Root.displayName = 'Accordion.Root';
43
+ export var Item = React.forwardRef(function (_a, forwardedRef) {
44
44
  var className = _a.className, children = _a.children, rootProps = __rest(_a, ["className", "children"]);
45
- return (_jsx(AccordionPrimitive.Item, __assign({}, rootProps, { ref: forwardedRef, className: cn('w-[278px] mt-px overflow-hidden first:mt-0 first:rounded-t last:rounded-b ', className), children: children })));
45
+ 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 })));
46
46
  });
47
- AccordionItem.displayName = 'AccordionItem';
48
- export var AccordionTrigger = React.forwardRef(function (_a, forwardedRef) {
47
+ Item.displayName = 'Accordion.Item';
48
+ export var Trigger = React.forwardRef(function (_a, forwardedRef) {
49
49
  var className = _a.className, children = _a.children, _b = _a.color, color = _b === void 0 ? 'red' : _b, rootProps = __rest(_a, ["className", "children", "color"]);
50
- return (_jsx(AccordionPrimitive.Header, __assign({}, rootProps, { className: cn('flex', className), children: _jsxs(AccordionPrimitive.Trigger, __assign({}, rootProps, { ref: forwardedRef, className: cn(" w-[278px] group flex h-[44px] cursor-default items-center justify-between py-[10px] px-[20px] 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:dark:bg-slateDarkA-3 disabled:text-slateA-3 disabled:dark:text-slateDarkA-8", className), children: [children, _jsx(ChevronDownIcon, { className: "ease-[cubic-bezier(0.87,_0,_0.13,_1)] transition-transform duration-300 group-data-[state=open]:rotate-180", "aria-hidden": true })] })) })));
50
+ 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
51
  });
52
- AccordionTrigger.displayName = 'AccordionTrigger';
53
- export var AccordionContent = React.forwardRef(function (_a, forwardedRef) {
52
+ Trigger.displayName = 'Accordion.Trigger';
53
+ export var Content = React.forwardRef(function (_a, forwardedRef) {
54
54
  var className = _a.className, children = _a.children, rootProps = __rest(_a, ["className", "children"]);
55
- return (_jsx(AccordionPrimitive.Content, __assign({}, rootProps, { ref: forwardedRef, className: cn('w-[278px] max-h-[800px] bg-slateA-2 dark:bg-slateDarkA-2 border-t border-t-slateA-4 dark:border-t-slateDarkA-4 text-slateA-11 dark:text-slateDarkA-11 data-[state=open]:animate-slideDown data-[state=closed]:animate-slideUp overflow-hidden text-[16px]', className), children: _jsx("div", { className: "px-[20px] py-[15px] text-base font-normal h-auto max-h-[1000px] overflow-y-auto", children: children }) })));
55
+ 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 }) })));
56
56
  });
57
- AccordionContent.displayName = 'AccordionContent';
57
+ Content.displayName = 'Accordion.Content';
58
+ var Accordion = {
59
+ Root: Root,
60
+ Item: Item,
61
+ Trigger: Trigger,
62
+ Content: Content,
63
+ };
58
64
  export default Accordion;
@@ -54,7 +54,7 @@ export var alertDialogActionVariants = cva("inline-flex items-center justify-cen
54
54
  });
55
55
  export var AlertDialogAction = forwardRef(function (_a, ref) {
56
56
  var className = _a.className, children = _a.children, weight = _a.weight, props = __rest(_a, ["className", "children", "weight"]);
57
- var _b = useAlertDialogContext(), size = _b.size, radius = _b.radius, _c = _b.color, color = _c === void 0 ? 'red' : _c, _d = _b.appearance, appearance = _d === void 0 ? 'solid' : _d;
57
+ var _b = useAlertDialogContext(), radius = _b.radius, size = _b.size, _c = _b.color, color = _c === void 0 ? 'red' : _c, _d = _b.appearance, appearance = _d === void 0 ? 'solid' : _d;
58
58
  var buttonClassName = cn(alertDialogActionVariants({ radius: radius, size: size, weight: weight, color: color }), appearanceStyle(appearance, color), className);
59
59
  return (_jsx(AlertDialogPrimitive.Action, __assign({ ref: ref, className: buttonClassName }, props, { children: children })));
60
60
  });
@@ -52,7 +52,7 @@ export var alertDialogCancelVariants = cva("inline-flex justify-center items-cen
52
52
  });
53
53
  export var AlertDialogCancel = forwardRef(function (_a, ref) {
54
54
  var className = _a.className, children = _a.children, weight = _a.weight, props = __rest(_a, ["className", "children", "weight"]);
55
- var _b = useAlertDialogContext(), size = _b.size, radius = _b.radius, _c = _b.appearance, appearance = _c === void 0 ? 'solid' : _c;
55
+ var _b = useAlertDialogContext(), radius = _b.radius, size = _b.size, _c = _b.appearance, appearance = _c === void 0 ? 'solid' : _c;
56
56
  var disabledButtonStyle = "border-none text-slate-11 bg-slate-3 \n active:bg-slate-4 active:border-none hover:cursor-pointer hover:bg-slateA-4\n dark:text-slateDark-11 dark:bg-slateDark-3 dark:hover:bg-slateDarkA-4";
57
57
  var buttonClassName = cn(alertDialogCancelVariants({ radius: radius, size: size, weight: weight }), appearanceStyle(appearance, 'slate'), disabledButtonStyle, className);
58
58
  return (_jsx(AlertDialogPrimitive.Cancel, __assign({ ref: ref }, props, { className: buttonClassName, children: children })));
@@ -44,8 +44,8 @@ export var alertDialogContentVariants = cva("fixed max-h-[85vh] top-[50%] left-[
44
44
  },
45
45
  });
46
46
  export var AlertDialogContent = forwardRef(function (_a, ref) {
47
- var className = _a.className, children = _a.children, scaling = _a.scaling, props = __rest(_a, ["className", "children", "scaling"]);
48
- var _b = useAlertDialogContext(), radius = _b.radius, size = _b.size;
47
+ var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
48
+ var _b = useAlertDialogContext(), radius = _b.radius, size = _b.size, scaling = _b.scaling;
49
49
  return (_jsxs(AlertDialogPrimitive.Portal, { children: [_jsx(AlertDialogPrimitive.Overlay, { className: "fixed data-[state=open]:animate-overlayShow inset-0" }), _jsx(AlertDialogPrimitive.Content, __assign({ className: cn(alertDialogContentVariants({ radius: radius, size: size, scaling: scaling }), className), ref: ref }, props, { children: children }))] }));
50
50
  });
51
51
  AlertDialogContent.displayName = 'AlertDialog.Content';
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
3
3
  import { VariantProps } from 'class-variance-authority';
4
+ import { IAppearance, IColor } from '../../../lib/types';
4
5
  import { alertDialogContentVariants } from './AlertDialogContent';
5
6
  import { alertDialogTitleVariants } from './AlertDialogTitle';
6
7
  import { alertDialogDescriptionVariants } from './AlertDialogDescription';
7
8
  import { alertDialogActionVariants } from './AlertDialogAction';
8
- import { IAppearance, IColor } from '../../../lib/types';
9
9
  export interface AlertDialogProps extends VariantProps<typeof alertDialogContentVariants>, VariantProps<typeof alertDialogTitleVariants>, VariantProps<typeof alertDialogDescriptionVariants>, VariantProps<typeof alertDialogActionVariants> {
10
10
  titleText?: string;
11
11
  contentText?: string;
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
- import { forwardRef, createContext, useContext } from 'react';
24
+ import { forwardRef, createContext, useContext, useMemo, } from 'react';
25
25
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
26
26
  var AlertDialogContext = createContext({
27
27
  size: 'medium',
@@ -35,7 +35,12 @@ export var useAlertDialogContext = function () {
35
35
  };
36
36
  export var AlertDialogRoot = forwardRef(function (_a, ref) {
37
37
  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 = { radius: radius, size: size, scaling: scaling, color: color };
38
+ var contextValue = useMemo(function () { return ({
39
+ radius: radius,
40
+ size: size,
41
+ scaling: scaling,
42
+ color: color,
43
+ }); }, [radius, size, scaling, color]);
39
44
  return (_jsx(AlertDialogContext.Provider, { value: contextValue, children: _jsx("div", { ref: ref, children: _jsx(AlertDialogPrimitive.Root, __assign({}, props, { children: children })) }) }));
40
45
  });
41
46
  AlertDialogRoot.displayName = 'AlertDialog.Root';
@@ -24,8 +24,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { forwardRef } from 'react';
25
25
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
26
26
  import { cva } from 'class-variance-authority';
27
- import { radiusVariants, scalingVariants, weightVariants, primaryColorStyle, appearanceStyle, } from '../../../lib/constants';
28
27
  import { cn } from '../../../lib/utils/utils';
28
+ import { radiusVariants, scalingVariants, weightVariants, primaryColorStyle, appearanceStyle, } from '../../../lib/constants';
29
29
  var buttonVariants = cva("inline-flex items-center transition-colors focus:outline-none hover:cursor-pointer\n disabled:cursor-not-allowed disabled:bg-slate-3 disabled:text-slate-8", {
30
30
  variants: {
31
31
  radius: __assign({}, radiusVariants['base']),
@@ -6,6 +6,9 @@ export interface AvatarProps extends VariantProps<typeof AvatarVariants> {
6
6
  fallbackText?: string;
7
7
  appearance?: 'solid' | 'soft';
8
8
  fallbackClassName?: string;
9
+ ariaLabel?: string;
10
+ ariaLabelledby?: string;
11
+ title?: string;
9
12
  }
10
13
  declare const AvatarVariants: (props?: ({
11
14
  radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
@@ -50,8 +50,9 @@ var AvatarVariants = cva('font-medium', {
50
50
  },
51
51
  });
52
52
  var Avatar = forwardRef(function (_a, ref) {
53
- 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, props = __rest(_a, ["className", "fallbackClassName", "radius", "scaling", "size", "fallbackText", "imagePath", "alt", "appearance", "color"]);
54
- 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, children: [_jsx(AvatarPrimitive.Image, { className: "h-full w-full object-cover border-none", src: imagePath, alt: alt }), _jsx(AvatarPrimitive.Fallback, { className: cn("leading-1 flex h-full w-full items-center justify-center", className), delayMs: 300, children: fallbackText })] })));
53
+ 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, props = __rest(_a, ["className", "fallbackClassName", "radius", "scaling", "size", "fallbackText", "imagePath", "alt", "appearance", "color", "ariaLabel", "ariaLabelledby", "title"]);
54
+ 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 object-cover border-none", 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: 300, "aria-hidden": "true", children: fallbackText })] })));
55
56
  });
56
57
  Avatar.displayName = 'Avatar';
57
58
  export default Avatar;
@@ -8,6 +8,8 @@ export interface BorderRadius {
8
8
  }
9
9
  export interface BarChartProps extends VariantProps<typeof barChartVariants> {
10
10
  labels?: string[];
11
+ isColorMixed?: boolean;
12
+ appearance?: 'solid' | 'soft';
11
13
  title?: {
12
14
  text?: string | string[];
13
15
  display?: boolean;
@@ -54,8 +56,8 @@ export interface BarChartProps extends VariantProps<typeof barChartVariants> {
54
56
  y: number;
55
57
  r: number;
56
58
  }[];
57
- backgroundColor?: string;
58
- borderColor?: string;
59
+ backgroundColor?: string[];
60
+ borderColor?: string[];
59
61
  borderWidth?: number;
60
62
  hoverBackgroundColor?: string;
61
63
  hoverBorderColor?: string;
@@ -73,7 +75,7 @@ declare const barChartVariants: (props?: ({
73
75
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
74
76
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
75
77
  export declare const BarChart: {
76
- ({ className, title, datasets, labels, scaling, legend, width, height, indexAxis, ...props }: BarChartProps): import("react/jsx-runtime").JSX.Element;
78
+ ({ className, title, datasets, labels, scaling, legend, width, height, indexAxis, appearance, isColorMixed, ...props }: BarChartProps): import("react/jsx-runtime").JSX.Element;
77
79
  displayName: string;
78
80
  };
79
81
  export {};
@@ -26,6 +26,7 @@ import { Chart as ChartJS, CategoryScale, LinearScale, BarElement, Tooltip, Lege
26
26
  import { scalingVariants } from '../../../lib/constants';
27
27
  import { cva } from 'class-variance-authority';
28
28
  import { cn } from '../../../lib/utils/utils';
29
+ import { chartAlphaColorList, chartColorList } from '../../../lib/color/constants';
29
30
  ChartJS.register(CategoryScale, LinearScale, BarElement, Tooltip, Legend);
30
31
  var barChartVariants = cva('', {
31
32
  variants: {
@@ -36,7 +37,17 @@ var barChartVariants = cva('', {
36
37
  },
37
38
  });
38
39
  export var BarChart = function (_a) {
39
- var className = _a.className, title = _a.title, datasets = _a.datasets, labels = _a.labels, scaling = _a.scaling, legend = _a.legend, width = _a.width, height = _a.height, indexAxis = _a.indexAxis, props = __rest(_a, ["className", "title", "datasets", "labels", "scaling", "legend", "width", "height", "indexAxis"]);
40
+ var className = _a.className, title = _a.title, datasets = _a.datasets, labels = _a.labels, scaling = _a.scaling, legend = _a.legend, width = _a.width, height = _a.height, indexAxis = _a.indexAxis, _b = _a.appearance, appearance = _b === void 0 ? 'solid' : _b, _c = _a.isColorMixed, isColorMixed = _c === void 0 ? true : _c, props = __rest(_a, ["className", "title", "datasets", "labels", "scaling", "legend", "width", "height", "indexAxis", "appearance", "isColorMixed"]);
41
+ datasets.forEach(function (dataset, index) {
42
+ if (!dataset.backgroundColor) {
43
+ if (isColorMixed) {
44
+ datasets[index] = __assign(__assign({}, dataset), { backgroundColor: appearance === 'solid' ? chartColorList.mixed : chartAlphaColorList.mixed, borderColor: chartColorList.mixed });
45
+ }
46
+ else {
47
+ datasets[index] = __assign(__assign({}, dataset), { backgroundColor: appearance === 'solid' ? chartColorList.sorting : chartAlphaColorList.sorting, borderColor: chartColorList.sorting });
48
+ }
49
+ }
50
+ });
40
51
  return (_jsx(Bar, __assign({ data: { labels: labels, datasets: datasets }, options: {
41
52
  plugins: {
42
53
  title: title,
@@ -15,6 +15,9 @@ export interface BubbleChartProps extends VariantProps<typeof bubbleChartVariant
15
15
  hoverBorderColor?: string;
16
16
  hoverBorderWidth?: number;
17
17
  pointStyle?: PointStyle;
18
+ rotation?: number;
19
+ radius?: number;
20
+ order?: number;
18
21
  }[];
19
22
  options?: {};
20
23
  className?: string;
@@ -24,10 +24,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
24
  import { forwardRef } from 'react';
25
25
  import { Callout as CalloutTheme } from '@radix-ui/themes';
26
26
  import { cva } from 'class-variance-authority';
27
- import { cn } from '../../../lib/utils/utils';
28
27
  import { ExclamationTriangleIcon, InfoCircledIcon, LockClosedIcon, CheckCircledIcon, } from '@radix-ui/react-icons';
29
28
  import { scalingVariants } from '../../../lib/constants';
30
- import { useCalloutContext } from '.';
29
+ import { cn } from '../../../lib/utils/utils';
30
+ import { useCalloutContext } from './CalloutRoot';
31
31
  var calloutIconVariants = cva('flex items-center text-slate-12 dark:text-slateDark-12', {
32
32
  variants: {
33
33
  scaling: __assign({}, scalingVariants),
@@ -54,4 +54,4 @@ export var CalloutIcon = forwardRef(function (_a, ref) {
54
54
  var _b = useCalloutContext(), scaling = _b.scaling, size = _b.size, color = _b.color;
55
55
  return (_jsxs(CalloutTheme.Icon, __assign({ ref: ref, className: cn(calloutIconVariants({ color: color, size: size, scaling: scaling }), className) }, props, { children: [iconType === 'danger' && _jsx(ExclamationTriangleIcon, {}), iconType === 'warning' && _jsx(LockClosedIcon, {}), iconType === 'success' && _jsx(CheckCircledIcon, {}), iconType === 'information' && _jsx(InfoCircledIcon, {}), children] })));
56
56
  });
57
- CalloutIcon.displayName = 'CalloutIcon';
57
+ CalloutIcon.displayName = 'Callout.Icon';
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { calloutTextVariants } from './CalloutText';
4
+ import { IAppearance } from '../../../lib/types';
5
+ export interface CalloutProps extends VariantProps<typeof calloutVariants>, VariantProps<typeof calloutTextVariants> {
6
+ contentText?: string;
7
+ appearance?: Exclude<IAppearance, 'classic' | 'ghost' | 'solid'>;
8
+ color?: 'danger' | 'warning' | 'success' | 'information' | null;
9
+ }
10
+ declare const calloutVariants: (props?: ({
11
+ radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
12
+ size?: "small" | "medium" | "large" | null | undefined;
13
+ scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
14
+ color?: "danger" | "warning" | "success" | "information" | null | undefined;
15
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
16
+ export declare const useCalloutContext: () => CalloutProps;
17
+ export declare const CalloutRoot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & CalloutProps & React.RefAttributes<HTMLDivElement>>;
18
+ export {};
@@ -0,0 +1,72 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { forwardRef, createContext, useContext, useMemo, } from 'react';
25
+ import { Callout as CalloutTheme } from '@radix-ui/themes';
26
+ import { cva } from 'class-variance-authority';
27
+ import { cn } from '../../../lib/utils/utils';
28
+ import { appearanceStyle, radiusVariants, scalingVariants } from '../../../lib/constants';
29
+ var calloutVariants = cva('flex w-fit max-w-[600px]', {
30
+ variants: {
31
+ radius: __assign({}, radiusVariants['large']),
32
+ size: {
33
+ small: 'min-h-[44px] p-3',
34
+ medium: 'min-h-[52px] p-4',
35
+ large: 'min-h-[72px] p-6',
36
+ },
37
+ scaling: __assign({}, scalingVariants),
38
+ color: {
39
+ danger: 'bg-red-3 dark:bg-redDark-3',
40
+ warning: 'bg-amber-3 dark:bg-amberDark-3',
41
+ success: 'bg-green-3 dark:bg-greenDark-3',
42
+ information: 'bg-sky-3 dark:bg-skyDark-3',
43
+ },
44
+ },
45
+ defaultVariants: {
46
+ radius: 'medium',
47
+ scaling: '100%',
48
+ color: 'information',
49
+ size: 'medium',
50
+ },
51
+ });
52
+ var CalloutContext = createContext({
53
+ size: 'medium',
54
+ scaling: '100%',
55
+ color: null,
56
+ });
57
+ export var useCalloutContext = function () {
58
+ return useContext(CalloutContext);
59
+ };
60
+ export var CalloutRoot = forwardRef(function (_a, ref) {
61
+ var children = _a.children, className = _a.className, radius = _a.radius, scaling = _a.scaling, size = _a.size, _b = _a.color, color = _b === void 0 ? 'information' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'soft' : _c, props = __rest(_a, ["children", "className", "radius", "scaling", "size", "color", "appearance"]);
62
+ var colorMap = {
63
+ danger: 'red',
64
+ information: 'sky',
65
+ success: 'green',
66
+ warning: 'amber',
67
+ };
68
+ var calloutClassName = cn(calloutVariants({ radius: radius, scaling: scaling, size: size, color: color }), appearanceStyle(appearance, colorMap[color], false), className);
69
+ var contextValue = useMemo(function () { return ({ size: size, scaling: scaling, color: color }); }, [size, scaling, color]);
70
+ return (_jsx(CalloutContext.Provider, { value: contextValue, children: _jsx(CalloutTheme.Root, __assign({ ref: ref }, props, { className: calloutClassName, children: children })) }));
71
+ });
72
+ CalloutRoot.displayName = 'Callout.Root';
@@ -24,7 +24,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { forwardRef } from 'react';
25
25
  import { cva } from 'class-variance-authority';
26
26
  import { cn } from '../../../lib/utils/utils';
27
- import { useCalloutContext } from '.';
27
+ import { useCalloutContext } from './CalloutRoot';
28
28
  export var calloutTextVariants = cva('break-words font-normal text-slate-12 dark:text-slateDark-12 ', {
29
29
  variants: {
30
30
  size: {
@@ -49,4 +49,4 @@ export var CalloutText = forwardRef(function (_a, ref) {
49
49
  var _b = useCalloutContext(), size = _b.size, color = _b.color;
50
50
  return (_jsx("p", __assign({ ref: ref, className: cn(calloutTextVariants({ size: size, color: color }), className) }, props, { children: contentText !== null && contentText !== void 0 ? contentText : children })));
51
51
  });
52
- CalloutText.displayName = 'CalloutText';
52
+ CalloutText.displayName = 'Callout.Text';
@@ -1,20 +1,7 @@
1
- import React from 'react';
2
- import { VariantProps } from 'class-variance-authority';
3
- import { calloutTextVariants } from './CalloutText';
4
- import { IAppearance } from '../../../lib/types';
5
- export * from './CalloutIcon';
6
- export * from './CalloutText';
7
- export interface CalloutProps extends VariantProps<typeof calloutVariants>, VariantProps<typeof calloutTextVariants> {
8
- contentText?: string;
9
- appearance?: Exclude<IAppearance, 'classic' | 'ghost' | 'solid'>;
10
- color?: 'danger' | 'warning' | 'success' | 'information' | null;
11
- }
12
- declare const calloutVariants: (props?: ({
13
- radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
14
- size?: "small" | "medium" | "large" | null | undefined;
15
- scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
16
- color?: "danger" | "warning" | "success" | "information" | null | undefined;
17
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
18
- export declare const useCalloutContext: () => CalloutProps;
19
- export declare const Callout: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & CalloutProps & React.RefAttributes<HTMLDivElement>>;
1
+ /// <reference types="react" />
2
+ declare const Callout: {
3
+ Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("./CalloutRoot").CalloutProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ Text: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("./CalloutText").CalloutTextProps & import("react").RefAttributes<HTMLParagraphElement>>;
5
+ Icon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("./CalloutIcon").CalloutIconProps & import("react").RefAttributes<HTMLDivElement>>;
6
+ };
20
7
  export default Callout;
@@ -1,75 +1,9 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
1
+ import { CalloutRoot as Root } from './CalloutRoot';
2
+ import { CalloutText as Text } from './CalloutText';
3
+ import { CalloutIcon as Icon } from './CalloutIcon';
4
+ var Callout = {
5
+ Root: Root,
6
+ Text: Text,
7
+ Icon: Icon
11
8
  };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { jsx as _jsx } from "react/jsx-runtime";
24
- import { forwardRef, createContext, useContext, } from 'react';
25
- import { Callout as CalloutTheme } from '@radix-ui/themes';
26
- import { cva } from 'class-variance-authority';
27
- import { cn } from '../../../lib/utils/utils';
28
- import { appearanceStyle, radiusVariants, scalingVariants } from '../../../lib/constants';
29
- export * from './CalloutIcon';
30
- export * from './CalloutText';
31
- var calloutVariants = cva('flex w-fit max-w-[600px]', {
32
- variants: {
33
- radius: __assign({}, radiusVariants['large']),
34
- size: {
35
- small: 'min-h-[44px] p-3',
36
- medium: 'min-h-[52px] p-4',
37
- large: 'min-h-[72px] p-6',
38
- },
39
- scaling: __assign({}, scalingVariants),
40
- color: {
41
- danger: 'bg-red-3 dark:bg-redDark-3',
42
- warning: 'bg-amber-3 dark:bg-amberDark-3',
43
- success: 'bg-green-3 dark:bg-greenDark-3',
44
- information: 'bg-sky-3 dark:bg-skyDark-3',
45
- },
46
- },
47
- defaultVariants: {
48
- radius: 'medium',
49
- scaling: '100%',
50
- color: 'information',
51
- size: 'medium',
52
- },
53
- });
54
- var CalloutContext = createContext({
55
- size: 'medium',
56
- scaling: '100%',
57
- color: null,
58
- });
59
- export var useCalloutContext = function () {
60
- return useContext(CalloutContext);
61
- };
62
- export var Callout = forwardRef(function (_a, ref) {
63
- var children = _a.children, className = _a.className, radius = _a.radius, scaling = _a.scaling, size = _a.size, _b = _a.color, color = _b === void 0 ? 'information' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'soft' : _c, props = __rest(_a, ["children", "className", "radius", "scaling", "size", "color", "appearance"]);
64
- var colorMap = {
65
- danger: 'red',
66
- information: 'sky',
67
- success: 'green',
68
- warning: 'amber',
69
- };
70
- var calloutClassName = cn(calloutVariants({ radius: radius, scaling: scaling, size: size, color: color }), appearanceStyle(appearance, colorMap[color], false), className);
71
- var contextValue = { size: size, scaling: scaling, color: color };
72
- return (_jsx(CalloutContext.Provider, { value: contextValue, children: _jsx(CalloutTheme.Root, __assign({ ref: ref }, props, { className: calloutClassName, children: children })) }));
73
- });
74
- Callout.displayName = 'Callout';
75
9
  export default Callout;
@@ -23,11 +23,11 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { forwardRef } from 'react';
25
25
  import Checkbox from '../../../lib/components/Checkbox';
26
- import { useCheckboxGroupContext } from '.';
26
+ import { useCheckboxGroupContext } from './CheckboxGroupRoot';
27
27
  export var CheckboxGroupItem = forwardRef(function (_a, ref) {
28
28
  var className = _a.className, children = _a.children, value = _a.value, id = _a.id, defaultValue = _a.defaultValue, props = __rest(_a, ["className", "children", "value", "id", "defaultValue"]);
29
29
  var _b = useCheckboxGroupContext(), scaling = _b.scaling, size = _b.size, color = _b.color, radius = _b.radius, appearance = _b.appearance;
30
30
  return (_jsx("div", { className: "flex", children: _jsx(Checkbox, __assign({ className: className, ref: ref, id: id, defaultChecked: defaultValue == id, scaling: scaling, radius: radius, color: color, size: size, appearance: appearance }, props, { children: children })) }));
31
31
  });
32
- CheckboxGroupItem.displayName = 'CheckboxGroupItem';
32
+ CheckboxGroupItem.displayName = 'CheckboxGroup.Item';
33
33
  export default CheckboxGroupItem;
@@ -0,0 +1,16 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { CheckboxVariants } from '../../../lib/components/Checkbox';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import { IAppearance, IColor } from '../../../lib/types';
5
+ export interface CheckboxGroupRootProps extends VariantProps<typeof CheckboxGroupVariants>, VariantProps<typeof CheckboxVariants> {
6
+ children?: ReactNode;
7
+ defaultValue?: string[];
8
+ color?: IColor;
9
+ appearance?: Exclude<IAppearance, 'ghost' | 'outline' | 'solid'>;
10
+ }
11
+ export declare const CheckboxGroupVariants: (props?: ({
12
+ size?: "small" | "medium" | "large" | null | undefined;
13
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
14
+ export declare const useCheckboxGroupContext: () => CheckboxGroupRootProps;
15
+ export declare const CheckboxGroupRoot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & CheckboxGroupRootProps & React.RefAttributes<HTMLDivElement>>;
16
+ export default CheckboxGroupRoot;
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React, { Children, createContext, forwardRef, useContext, useMemo, } from 'react';
3
+ import { CheckboxGroup as CheckboxGroupTheme } from '@radix-ui/themes';
4
+ import { cva } from 'class-variance-authority';
5
+ import { cn } from '../../../lib/utils/utils';
6
+ export var CheckboxGroupVariants = cva("", {
7
+ variants: {
8
+ size: {
9
+ small: 'space-y-1',
10
+ medium: 'space-y-2',
11
+ large: 'space-y-3',
12
+ },
13
+ },
14
+ defaultVariants: {
15
+ size: 'medium',
16
+ },
17
+ });
18
+ var CheckboxGroupContext = createContext({
19
+ size: 'medium',
20
+ color: 'red',
21
+ scaling: '100%',
22
+ radius: 'medium',
23
+ appearance: 'surface',
24
+ });
25
+ export var useCheckboxGroupContext = function () {
26
+ return useContext(CheckboxGroupContext);
27
+ };
28
+ export var CheckboxGroupRoot = forwardRef(function (_a, ref) {
29
+ var className = _a.className, children = _a.children, defaultValue = _a.defaultValue, scaling = _a.scaling, size = _a.size, color = _a.color, radius = _a.radius, appearance = _a.appearance;
30
+ var contextValue = useMemo(function () { return ({ scaling: scaling, size: size, color: color, radius: radius, appearance: appearance }); }, [scaling, size, color, radius, appearance]);
31
+ return (_jsx(CheckboxGroupContext.Provider, { value: contextValue, children: _jsx(CheckboxGroupTheme.Root, { ref: ref, defaultValue: defaultValue, className: cn(CheckboxGroupVariants({ size: size }), className), children: Children.map(children, function (child) { return React.cloneElement(child, { defaultValue: defaultValue }); }) }) }));
32
+ });
33
+ CheckboxGroupRoot.displayName = 'CheckboxGroup.Root';
34
+ export default CheckboxGroupRoot;
@@ -1,17 +1,6 @@
1
- import React, { ReactNode } from 'react';
2
- import { CheckboxVariants } from '../../../lib/components/Checkbox';
3
- import { VariantProps } from 'class-variance-authority';
4
- import { IAppearance, IColor } from '../../../lib/types';
5
- export * from './CheckboxGroupItem';
6
- export interface CheckboxGroupRootProps extends VariantProps<typeof CheckboxGroupVariants>, VariantProps<typeof CheckboxVariants> {
7
- children?: ReactNode;
8
- defaultValue?: string[] | undefined;
9
- color?: IColor;
10
- appearance?: Exclude<IAppearance, 'ghost' | 'outline' | 'solid'>;
11
- }
12
- export declare const CheckboxGroupVariants: (props?: ({
13
- size?: "small" | "medium" | "large" | null | undefined;
14
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
15
- export declare const useCheckboxGroupContext: () => CheckboxGroupRootProps;
16
- export declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & CheckboxGroupRootProps & React.RefAttributes<HTMLDivElement>>;
1
+ /// <reference types="react" />
2
+ declare const CheckboxGroup: {
3
+ Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("./CheckboxGroupRoot").CheckboxGroupRootProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ Item: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-checkbox").CheckboxProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("../../../lib/components/Checkbox").CheckboxProps & import("react").RefAttributes<HTMLButtonElement>>;
5
+ };
17
6
  export default CheckboxGroup;