@a2v2ai/uikit 0.0.36 → 0.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/Alert/Alert.stories.tsx +121 -0
  2. package/Alert/Alert.tsx +71 -0
  3. package/AlertDialog/AlertDialog.stories.tsx +665 -0
  4. package/AlertDialog/AlertDialog.tsx +241 -0
  5. package/Avatar/Avatar.stories.tsx +128 -0
  6. package/Avatar/Avatar.tsx +71 -0
  7. package/Badge/Badge.stories.tsx +76 -0
  8. package/Badge/Badge.tsx +39 -0
  9. package/Breadcrumb/Breadcrumb.stories.tsx +231 -0
  10. package/Breadcrumb/Breadcrumb.tsx +114 -0
  11. package/Button/Button.stories.tsx +684 -0
  12. package/Button/Button.tsx +107 -0
  13. package/Calendar/Calendar.stories.tsx +291 -0
  14. package/Calendar/Calendar.tsx +246 -0
  15. package/Card/Card.stories.tsx +136 -0
  16. package/Card/Card.tsx +96 -0
  17. package/Carousel/Carousel.stories.tsx +256 -0
  18. package/Carousel/Carousel.tsx +301 -0
  19. package/ChatBubble/ChatBubble.stories.tsx +339 -0
  20. package/ChatBubble/ChatBubble.tsx +179 -0
  21. package/Checkbox/Checkbox.stories.tsx +137 -0
  22. package/Checkbox/Checkbox.tsx +53 -0
  23. package/DataTable/DataTable.stories.tsx +400 -0
  24. package/DataTable/DataTable.tsx +207 -0
  25. package/Drawer/Drawer.stories.tsx +721 -0
  26. package/Drawer/Drawer.tsx +201 -0
  27. package/DropdownMenu/DropdownMenu.stories.tsx +251 -0
  28. package/DropdownMenu/DropdownMenu.tsx +199 -0
  29. package/ErrorMessage/ErrorMessage.stories.tsx +159 -0
  30. package/ErrorMessage/ErrorMessage.tsx +55 -0
  31. package/Flex/Flex.stories.tsx +390 -0
  32. package/Flex/Flex.tsx +102 -0
  33. package/IconButton/IconButton.stories.tsx +566 -0
  34. package/IconButton/IconButton.tsx +95 -0
  35. package/Input/Input.stories.tsx +566 -0
  36. package/Input/Input.tsx +168 -0
  37. package/InputOTP/InputOTP.stories.tsx +246 -0
  38. package/InputOTP/InputOTP.tsx +127 -0
  39. package/Label/Label.stories.tsx +110 -0
  40. package/Label/Label.tsx +44 -0
  41. package/Loader/Loader.stories.tsx +170 -0
  42. package/Loader/Loader.tsx +62 -0
  43. package/Menubar/Menubar.stories.tsx +382 -0
  44. package/Menubar/Menubar.tsx +274 -0
  45. package/Menubar/index.ts +18 -0
  46. package/Pagination/Pagination.stories.tsx +196 -0
  47. package/Pagination/Pagination.tsx +122 -0
  48. package/Popover/Popover.stories.tsx +133 -0
  49. package/Popover/Popover.tsx +31 -0
  50. package/Progress/Progress.stories.tsx +146 -0
  51. package/Progress/Progress.tsx +67 -0
  52. package/RadioGroup/RadioGroup.stories.tsx +159 -0
  53. package/RadioGroup/RadioGroup.tsx +68 -0
  54. package/ScrollArea/ScrollArea.stories.tsx +136 -0
  55. package/ScrollArea/ScrollArea.tsx +46 -0
  56. package/Select/Select.stories.tsx +378 -0
  57. package/Select/Select.tsx +230 -0
  58. package/Separator/Separator.stories.tsx +110 -0
  59. package/Separator/Separator.tsx +29 -0
  60. package/Sidebar/Sidebar.stories.tsx +340 -0
  61. package/Sidebar/Sidebar.tsx +414 -0
  62. package/Sidebar/index.ts +28 -0
  63. package/Skeleton/Skeleton.stories.tsx +117 -0
  64. package/Skeleton/Skeleton.tsx +16 -0
  65. package/Slider/Slider.stories.tsx +216 -0
  66. package/Slider/Slider.tsx +29 -0
  67. package/Spinner/Spinner.stories.tsx +210 -0
  68. package/Spinner/Spinner.tsx +78 -0
  69. package/Switch/Switch.stories.tsx +146 -0
  70. package/Switch/Switch.tsx +59 -0
  71. package/Table/Table.stories.tsx +510 -0
  72. package/Table/Table.tsx +114 -0
  73. package/Tabs/Tabs.stories.tsx +197 -0
  74. package/Tabs/Tabs.tsx +74 -0
  75. package/Textarea/Textarea.stories.tsx +187 -0
  76. package/Textarea/Textarea.tsx +73 -0
  77. package/Toast/Toast.stories.tsx +285 -0
  78. package/Toast/Toast.tsx +59 -0
  79. package/Tooltip/Tooltip.stories.tsx +463 -0
  80. package/Tooltip/Tooltip.tsx +96 -0
  81. package/Typography/Typography.stories.tsx +425 -0
  82. package/Typography/Typography.tsx +106 -0
  83. package/helpers.ts +5 -0
  84. package/{icons.js → icons.ts} +1 -1
  85. package/index.ts +217 -0
  86. package/lib/typography-types.ts +223 -0
  87. package/lib/utils.ts +15 -0
  88. package/package.json +36 -33
  89. package/tsconfig.json +22 -0
  90. package/Alert/Alert.d.ts +0 -13
  91. package/Alert/Alert.js +0 -25
  92. package/AlertDialog/AlertDialog.d.ts +0 -43
  93. package/AlertDialog/AlertDialog.js +0 -71
  94. package/Avatar/Avatar.d.ts +0 -14
  95. package/Avatar/Avatar.js +0 -25
  96. package/Badge/Badge.d.ts +0 -11
  97. package/Badge/Badge.js +0 -23
  98. package/Breadcrumb/Breadcrumb.d.ts +0 -19
  99. package/Breadcrumb/Breadcrumb.js +0 -23
  100. package/Button/Button.d.ts +0 -23
  101. package/Button/Button.js +0 -52
  102. package/Calendar/Calendar.d.ts +0 -20
  103. package/Calendar/Calendar.js +0 -78
  104. package/Card/Card.d.ts +0 -16
  105. package/Card/Card.js +0 -28
  106. package/Carousel/Carousel.d.ts +0 -37
  107. package/Carousel/Carousel.js +0 -132
  108. package/ChatBubble/ChatBubble.d.ts +0 -33
  109. package/ChatBubble/ChatBubble.js +0 -107
  110. package/Checkbox/Checkbox.d.ts +0 -12
  111. package/Checkbox/Checkbox.js +0 -20
  112. package/DataTable/DataTable.d.ts +0 -35
  113. package/DataTable/DataTable.js +0 -51
  114. package/Dialog/Dialog.d.ts +0 -35
  115. package/Dialog/Dialog.js +0 -130
  116. package/Drawer/Drawer.d.ts +0 -33
  117. package/Drawer/Drawer.js +0 -55
  118. package/DropdownMenu/DropdownMenu.d.ts +0 -27
  119. package/DropdownMenu/DropdownMenu.js +0 -35
  120. package/ErrorMessage/ErrorMessage.d.ts +0 -27
  121. package/ErrorMessage/ErrorMessage.js +0 -14
  122. package/Flex/Flex.d.ts +0 -31
  123. package/Flex/Flex.js +0 -64
  124. package/IconButton/IconButton.d.ts +0 -23
  125. package/IconButton/IconButton.js +0 -48
  126. package/Input/Input.d.ts +0 -27
  127. package/Input/Input.js +0 -42
  128. package/InputOTP/InputOTP.d.ts +0 -20
  129. package/InputOTP/InputOTP.js +0 -44
  130. package/Label/Label.d.ts +0 -13
  131. package/Label/Label.js +0 -19
  132. package/Loader/Loader.d.ts +0 -21
  133. package/Loader/Loader.js +0 -30
  134. package/Menubar/Menubar.d.ts +0 -26
  135. package/Menubar/Menubar.js +0 -54
  136. package/Menubar/index.d.ts +0 -1
  137. package/Menubar/index.js +0 -1
  138. package/Pagination/Pagination.d.ts +0 -35
  139. package/Pagination/Pagination.js +0 -37
  140. package/Popover/Popover.d.ts +0 -7
  141. package/Popover/Popover.js +0 -10
  142. package/Progress/Progress.d.ts +0 -17
  143. package/Progress/Progress.js +0 -33
  144. package/RadioGroup/RadioGroup.d.ts +0 -13
  145. package/RadioGroup/RadioGroup.js +0 -26
  146. package/ScrollArea/ScrollArea.d.ts +0 -5
  147. package/ScrollArea/ScrollArea.js +0 -11
  148. package/Select/Select.d.ts +0 -29
  149. package/Select/Select.js +0 -50
  150. package/Separator/Separator.d.ts +0 -4
  151. package/Separator/Separator.js +0 -7
  152. package/Sidebar/Sidebar.d.ts +0 -48
  153. package/Sidebar/Sidebar.js +0 -116
  154. package/Sidebar/index.d.ts +0 -2
  155. package/Sidebar/index.js +0 -1
  156. package/Skeleton/Skeleton.d.ts +0 -4
  157. package/Skeleton/Skeleton.js +0 -7
  158. package/Slider/Slider.d.ts +0 -6
  159. package/Slider/Slider.js +0 -7
  160. package/Spinner/Spinner.d.ts +0 -19
  161. package/Spinner/Spinner.js +0 -31
  162. package/Switch/Switch.d.ts +0 -12
  163. package/Switch/Switch.js +0 -30
  164. package/Table/Table.d.ts +0 -10
  165. package/Table/Table.js +0 -20
  166. package/Tabs/Tabs.d.ts +0 -15
  167. package/Tabs/Tabs.js +0 -24
  168. package/Textarea/Textarea.d.ts +0 -19
  169. package/Textarea/Textarea.js +0 -31
  170. package/Toast/Toast.d.ts +0 -12
  171. package/Toast/Toast.js +0 -25
  172. package/Tooltip/Tooltip.d.ts +0 -17
  173. package/Tooltip/Tooltip.js +0 -29
  174. package/Typography/Typography.d.ts +0 -20
  175. package/Typography/Typography.js +0 -43
  176. package/helpers.d.ts +0 -4
  177. package/helpers.js +0 -5
  178. package/icons.d.ts +0 -1
  179. package/index.d.ts +0 -42
  180. package/index.js +0 -45
  181. package/lib/typography-types.d.ts +0 -4
  182. package/lib/typography-types.js +0 -90
  183. package/lib/utils.d.ts +0 -3
  184. package/lib/utils.js +0 -14
  185. package/tmpclaude-2407-cwd +0 -1
@@ -1,26 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
4
- import { Circle } from "lucide-react";
5
- import { cva } from "class-variance-authority";
6
- import { cn } from "../lib/utils";
7
- const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
8
- return (_jsx(RadioGroupPrimitive.Root, { className: cn("grid gap-2", className), ...props, ref: ref }));
9
- });
10
- RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
11
- const radioGroupItemVariants = cva("aspect-square rounded-full border border-grey-300 bg-white text-main-950 ring-offset-white focus:outline-none focus-visible:ring-2 focus-visible:ring-main-950 focus-visible:ring-offset-2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-main-950", {
12
- variants: {
13
- size: {
14
- small: "size-4",
15
- regular: "size-5",
16
- },
17
- },
18
- defaultVariants: {
19
- size: "regular",
20
- },
21
- });
22
- const RadioGroupItem = React.forwardRef(({ className, size, ...props }, ref) => {
23
- return (_jsx(RadioGroupPrimitive.Item, { ref: ref, className: cn(radioGroupItemVariants({ size }), className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: _jsx(Circle, { className: cn("fill-main-950 text-main-950", size === "small" ? "size-2" : "size-2.5") }) }) }));
24
- });
25
- RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
26
- export { RadioGroup, RadioGroupItem, radioGroupItemVariants };
@@ -1,5 +0,0 @@
1
- import * as React from "react";
2
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
3
- declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
- declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
- export { ScrollArea, ScrollBar };
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
4
- import { cn } from "../lib/utils";
5
- const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(ScrollAreaPrimitive.Root, { ref: ref, className: cn("relative overflow-hidden", className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] })));
6
- ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
7
- const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { ref: ref, orientation: orientation, className: cn("flex touch-none select-none transition-colors", orientation === "vertical" &&
8
- "h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" &&
9
- "h-2.5 flex-col border-t border-t-transparent p-[1px]", className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-grey-300" }) })));
10
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
11
- export { ScrollArea, ScrollBar };
@@ -1,29 +0,0 @@
1
- import * as React from "react";
2
- import * as SelectPrimitive from "@radix-ui/react-select";
3
- import { type TextVariant, type TextColor } from "../lib/typography-types";
4
- type SelectTriggerSize = "small" | "regular" | "large";
5
- type SelectTriggerVariant = "default" | "error";
6
- declare const Select: React.FC<SelectPrimitive.SelectProps>;
7
- declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
8
- declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
9
- declare const selectTriggerVariants: (props?: ({
10
- size?: "small" | "regular" | "large" | null | undefined;
11
- variant?: "default" | "error" | null | undefined;
12
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
- export interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {
14
- size?: SelectTriggerSize;
15
- variant?: SelectTriggerVariant;
16
- label?: string;
17
- labelVariant?: TextVariant;
18
- labelColor?: TextColor;
19
- error?: string;
20
- }
21
- declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
22
- declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
- declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
24
- declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
25
- declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
26
- declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
27
- declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
28
- export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, selectTriggerVariants, };
29
- export type { SelectTriggerSize, SelectTriggerVariant };
package/Select/Select.js DELETED
@@ -1,50 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as SelectPrimitive from "@radix-ui/react-select";
4
- import { Check, ChevronDown, ChevronUp } from "lucide-react";
5
- import { cva } from "class-variance-authority";
6
- import { cn } from "../lib/utils";
7
- import { Typography } from "../Typography/Typography";
8
- import { Label } from "../Label/Label";
9
- import {} from "../lib/typography-types";
10
- const Select = SelectPrimitive.Root;
11
- const SelectGroup = SelectPrimitive.Group;
12
- const SelectValue = SelectPrimitive.Value;
13
- const selectTriggerVariants = cva("flex w-full items-center justify-between whitespace-nowrap border bg-white text-main-950 ring-offset-white placeholder:text-grey-400 focus:outline-none focus:ring-2 focus:ring-offset-2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", {
14
- variants: {
15
- size: {
16
- small: "h-8 px-3 text-sm rounded-md",
17
- regular: "h-9 px-3 text-sm rounded-lg",
18
- large: "h-10 px-3 text-base rounded-lg",
19
- },
20
- variant: {
21
- default: "border-grey-300 focus:ring-main-950",
22
- error: "border-error-500 focus:ring-error-200",
23
- },
24
- },
25
- defaultVariants: {
26
- size: "regular",
27
- variant: "default",
28
- },
29
- });
30
- const SelectTrigger = React.forwardRef(({ className, size, variant, label, labelVariant = "body2", labelColor = "main-800", error, children, id, ...props }, ref) => {
31
- const computedVariant = error ? "error" : variant;
32
- return (_jsxs("div", { className: "flex flex-col gap-2 w-full", children: [label && (_jsx(Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), _jsxs(SelectPrimitive.Trigger, { ref: ref, id: id, className: cn(selectTriggerVariants({ size, variant: computedVariant }), className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDown, { className: "size-4 opacity-50" }) })] }), error && (_jsx(Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
33
- });
34
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
35
- const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronUp, { className: "size-4" }) })));
36
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
37
- const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollDownButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronDown, { className: "size-4" }) })));
38
- SelectScrollDownButton.displayName =
39
- SelectPrimitive.ScrollDownButton.displayName;
40
- const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { ref: ref, className: cn("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-lg border border-grey-200 bg-white text-main-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" &&
41
- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" &&
42
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), _jsx(SelectScrollDownButton, {})] }) })));
43
- SelectContent.displayName = SelectPrimitive.Content.displayName;
44
- const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold text-grey-500", className), ...props })));
45
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
46
- const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Item, { ref: ref, className: cn("relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-grey-100 focus:text-main-950 data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(Check, { className: "size-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
47
- SelectItem.displayName = SelectPrimitive.Item.displayName;
48
- const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-grey-100", className), ...props })));
49
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
50
- export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, selectTriggerVariants, };
@@ -1,4 +0,0 @@
1
- import * as React from "react";
2
- import * as SeparatorPrimitive from "@radix-ui/react-separator";
3
- declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
- export { Separator };
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as SeparatorPrimitive from "@radix-ui/react-separator";
4
- import { cn } from "../lib/utils";
5
- const Separator = React.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (_jsx(SeparatorPrimitive.Root, { ref: ref, decorative: decorative, orientation: orientation, className: cn("shrink-0 bg-grey-200", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className), ...props })));
6
- Separator.displayName = SeparatorPrimitive.Root.displayName;
7
- export { Separator };
@@ -1,48 +0,0 @@
1
- import * as React from "react";
2
- import { type VariantProps } from "class-variance-authority";
3
- interface SidebarContextValue {
4
- collapsed: boolean;
5
- setCollapsed: (collapsed: boolean) => void;
6
- }
7
- declare function useSidebar(): SidebarContextValue;
8
- export interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
9
- collapsed?: boolean;
10
- onCollapsedChange?: (collapsed: boolean) => void;
11
- defaultCollapsed?: boolean;
12
- }
13
- declare const Sidebar: React.ForwardRefExoticComponent<SidebarProps & React.RefAttributes<HTMLDivElement>>;
14
- export type SidebarHeaderProps = React.HTMLAttributes<HTMLDivElement>;
15
- declare const SidebarHeader: React.ForwardRefExoticComponent<SidebarHeaderProps & React.RefAttributes<HTMLDivElement>>;
16
- export type SidebarContentProps = React.HTMLAttributes<HTMLDivElement>;
17
- declare const SidebarContent: React.ForwardRefExoticComponent<SidebarContentProps & React.RefAttributes<HTMLDivElement>>;
18
- export type SidebarFooterProps = React.HTMLAttributes<HTMLDivElement>;
19
- declare const SidebarFooter: React.ForwardRefExoticComponent<SidebarFooterProps & React.RefAttributes<HTMLDivElement>>;
20
- export type SidebarGroupProps = React.HTMLAttributes<HTMLDivElement>;
21
- declare const SidebarGroup: React.ForwardRefExoticComponent<SidebarGroupProps & React.RefAttributes<HTMLDivElement>>;
22
- export type SidebarGroupLabelProps = React.HTMLAttributes<HTMLDivElement>;
23
- declare const SidebarGroupLabel: React.ForwardRefExoticComponent<SidebarGroupLabelProps & React.RefAttributes<HTMLDivElement>>;
24
- declare const sidebarMenuItemVariants: (props?: ({
25
- active?: boolean | null | undefined;
26
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
27
- export interface SidebarMenuItemProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof sidebarMenuItemVariants> {
28
- icon?: React.ReactNode;
29
- label: string;
30
- labelClassName?: string;
31
- badge?: React.ReactNode;
32
- hasChildren?: boolean;
33
- expanded?: boolean;
34
- onExpandedChange?: (expanded: boolean) => void;
35
- }
36
- declare const SidebarMenuItem: React.ForwardRefExoticComponent<SidebarMenuItemProps & React.RefAttributes<HTMLDivElement>>;
37
- declare const sidebarSubMenuItemVariants: (props?: ({
38
- active?: boolean | null | undefined;
39
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
40
- export interface SidebarSubMenuItemProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof sidebarSubMenuItemVariants> {
41
- label: string;
42
- }
43
- declare const SidebarSubMenuItem: React.ForwardRefExoticComponent<SidebarSubMenuItemProps & React.RefAttributes<HTMLDivElement>>;
44
- export type SidebarSeparatorProps = React.HTMLAttributes<HTMLDivElement>;
45
- declare const SidebarSeparator: React.ForwardRefExoticComponent<SidebarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
46
- export type SidebarToggleProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
47
- declare const SidebarToggle: React.ForwardRefExoticComponent<SidebarToggleProps & React.RefAttributes<HTMLButtonElement>>;
48
- export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarMenuItem, SidebarSubMenuItem, SidebarSeparator, SidebarToggle, useSidebar, sidebarMenuItemVariants, sidebarSubMenuItemVariants, };
@@ -1,116 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import { cva } from "class-variance-authority";
4
- import { ChevronDown, ChevronRight } from "lucide-react";
5
- import { cn } from "../lib/utils";
6
- const SidebarContext = React.createContext(undefined);
7
- function useSidebar() {
8
- const context = React.useContext(SidebarContext);
9
- if (!context) {
10
- throw new Error("useSidebar must be used within a Sidebar");
11
- }
12
- return context;
13
- }
14
- const Sidebar = React.forwardRef(({ className, collapsed: controlledCollapsed, onCollapsedChange, defaultCollapsed = false, children, ...props }, ref) => {
15
- const [uncontrolledCollapsed, setUncontrolledCollapsed] = React.useState(defaultCollapsed);
16
- const isControlled = controlledCollapsed !== undefined;
17
- const collapsed = isControlled ? controlledCollapsed : uncontrolledCollapsed;
18
- const setCollapsed = React.useCallback((value) => {
19
- if (!isControlled) {
20
- setUncontrolledCollapsed(value);
21
- }
22
- onCollapsedChange?.(value);
23
- }, [isControlled, onCollapsedChange]);
24
- return (_jsx(SidebarContext.Provider, { value: { collapsed, setCollapsed }, children: _jsx("div", { ref: ref, "data-slot": "sidebar", "data-collapsed": collapsed, className: cn("flex h-full flex-col bg-white border-r border-grey-200 transition-all duration-300", collapsed ? "w-[52px]" : "w-[240px]", className), ...props, children: children }) }));
25
- });
26
- Sidebar.displayName = "Sidebar";
27
- const SidebarHeader = React.forwardRef(({ className, children, ...props }, ref) => {
28
- const { collapsed } = useSidebar();
29
- return (_jsx("div", { ref: ref, "data-slot": "sidebar-header", className: cn("flex shrink-0 items-center", collapsed ? "justify-center p-2" : "p-4", className), ...props, children: children }));
30
- });
31
- SidebarHeader.displayName = "SidebarHeader";
32
- const SidebarContent = React.forwardRef(({ className, children, ...props }, ref) => {
33
- const { collapsed } = useSidebar();
34
- return (_jsx("div", { ref: ref, "data-slot": "sidebar-content", className: cn("flex-1 overflow-y-auto", collapsed ? "px-2 py-4" : "p-4", className), ...props, children: children }));
35
- });
36
- SidebarContent.displayName = "SidebarContent";
37
- const SidebarFooter = React.forwardRef(({ className, children, ...props }, ref) => {
38
- const { collapsed } = useSidebar();
39
- return (_jsx("div", { ref: ref, "data-slot": "sidebar-footer", className: cn("flex shrink-0 items-center border-t border-grey-200", collapsed ? "justify-center p-2" : "p-4", className), ...props, children: children }));
40
- });
41
- SidebarFooter.displayName = "SidebarFooter";
42
- const SidebarGroup = React.forwardRef(({ className, children, ...props }, ref) => {
43
- const { collapsed } = useSidebar();
44
- return (_jsx("div", { ref: ref, "data-slot": "sidebar-group", className: cn("flex flex-col", collapsed ? "gap-1" : "gap-0.5", className), ...props, children: children }));
45
- });
46
- SidebarGroup.displayName = "SidebarGroup";
47
- const SidebarGroupLabel = React.forwardRef(({ className, children, ...props }, ref) => {
48
- const { collapsed } = useSidebar();
49
- if (collapsed)
50
- return null;
51
- return (_jsx("div", { ref: ref, "data-slot": "sidebar-group-label", className: cn("px-3 py-2 text-xs font-normal text-grey-500", className), ...props, children: children }));
52
- });
53
- SidebarGroupLabel.displayName = "SidebarGroupLabel";
54
- /* -----------------------------------------------------------------------------
55
- * SidebarMenuItem
56
- * -------------------------------------------------------------------------- */
57
- const sidebarMenuItemVariants = cva("flex items-center gap-2 px-3 py-2 rounded-md text-sm font-normal cursor-pointer transition-colors outline-none", {
58
- variants: {
59
- active: {
60
- true: "bg-grey-100 text-grey-900",
61
- false: "text-grey-600 hover:bg-grey-50",
62
- },
63
- },
64
- defaultVariants: {
65
- active: false,
66
- },
67
- });
68
- const SidebarMenuItem = React.forwardRef(({ className, icon, label, labelClassName, badge, active, hasChildren, expanded, onExpandedChange, children, onClick, ...props }, ref) => {
69
- const { collapsed } = useSidebar();
70
- const [internalExpanded, setInternalExpanded] = React.useState(expanded ?? false);
71
- const isExpanded = expanded !== undefined ? expanded : internalExpanded;
72
- const handleClick = (e) => {
73
- if (hasChildren) {
74
- const newExpanded = !isExpanded;
75
- setInternalExpanded(newExpanded);
76
- onExpandedChange?.(newExpanded);
77
- }
78
- onClick?.(e);
79
- };
80
- if (collapsed) {
81
- return (_jsx("div", { ref: ref, "data-slot": "sidebar-menu-item", className: cn("flex items-center justify-center size-9 rounded-lg cursor-pointer transition-colors mx-auto", active ? "bg-grey-100 text-grey-900" : "text-grey-600 hover:bg-grey-50", className), onClick: onClick, ...props, children: icon && _jsx("span", { className: "size-4", children: icon }) }));
82
- }
83
- return (_jsxs("div", { "data-slot": "sidebar-menu-item-wrapper", children: [_jsxs("div", { ref: ref, "data-slot": "sidebar-menu-item", className: cn(sidebarMenuItemVariants({ active }), className), onClick: handleClick, ...props, children: [icon && _jsx("span", { className: "size-4 shrink-0", children: icon }), _jsx("span", { className: cn("flex-1 truncate", labelClassName), children: label }), badge && _jsx("span", { className: "shrink-0", children: badge }), hasChildren && (_jsx("span", { className: "size-4 shrink-0 text-grey-400", children: isExpanded ? _jsx(ChevronDown, { className: "size-4" }) : _jsx(ChevronRight, { className: "size-4" }) }))] }), hasChildren && isExpanded && children && (_jsx("div", { className: "ml-6 mt-1 flex flex-col", children: children }))] }));
84
- });
85
- SidebarMenuItem.displayName = "SidebarMenuItem";
86
- /* -----------------------------------------------------------------------------
87
- * SidebarSubMenuItem
88
- * -------------------------------------------------------------------------- */
89
- const sidebarSubMenuItemVariants = cva("flex items-center px-3 py-2 rounded-md text-sm font-normal cursor-pointer transition-colors outline-none", {
90
- variants: {
91
- active: {
92
- true: "bg-grey-100 text-grey-900",
93
- false: "text-grey-500 hover:bg-grey-50 hover:text-grey-700",
94
- },
95
- },
96
- defaultVariants: {
97
- active: false,
98
- },
99
- });
100
- const SidebarSubMenuItem = React.forwardRef(({ className, label, active, ...props }, ref) => {
101
- return (_jsx("div", { ref: ref, "data-slot": "sidebar-sub-menu-item", className: cn(sidebarSubMenuItemVariants({ active }), className), ...props, children: _jsx("span", { className: "truncate", children: label }) }));
102
- });
103
- SidebarSubMenuItem.displayName = "SidebarSubMenuItem";
104
- const SidebarSeparator = React.forwardRef(({ className, ...props }, ref) => {
105
- return (_jsx("div", { ref: ref, "data-slot": "sidebar-separator", className: cn("my-2 h-px bg-grey-200", className), ...props }));
106
- });
107
- SidebarSeparator.displayName = "SidebarSeparator";
108
- const SidebarToggle = React.forwardRef(({ className, children, ...props }, ref) => {
109
- const { collapsed, setCollapsed } = useSidebar();
110
- return (_jsx("button", { ref: ref, "data-slot": "sidebar-toggle", type: "button", className: cn("flex items-center justify-center p-2 rounded-md text-grey-500 hover:bg-grey-100 hover:text-grey-700 transition-colors", className), onClick: () => setCollapsed(!collapsed), ...props, children: children }));
111
- });
112
- SidebarToggle.displayName = "SidebarToggle";
113
- /* -----------------------------------------------------------------------------
114
- * Exports
115
- * -------------------------------------------------------------------------- */
116
- export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarMenuItem, SidebarSubMenuItem, SidebarSeparator, SidebarToggle, useSidebar, sidebarMenuItemVariants, sidebarSubMenuItemVariants, };
@@ -1,2 +0,0 @@
1
- export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarMenuItem, SidebarSubMenuItem, SidebarSeparator, SidebarToggle, useSidebar, sidebarMenuItemVariants, sidebarSubMenuItemVariants, } from "./Sidebar";
2
- export type { SidebarProps, SidebarHeaderProps, SidebarContentProps, SidebarFooterProps, SidebarGroupProps, SidebarGroupLabelProps, SidebarMenuItemProps, SidebarSubMenuItemProps, SidebarSeparatorProps, SidebarToggleProps, } from "./Sidebar";
package/Sidebar/index.js DELETED
@@ -1 +0,0 @@
1
- export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarMenuItem, SidebarSubMenuItem, SidebarSeparator, SidebarToggle, useSidebar, sidebarMenuItemVariants, sidebarSubMenuItemVariants, } from "./Sidebar";
@@ -1,4 +0,0 @@
1
- import * as React from "react";
2
- export type SkeletonProps = React.HTMLAttributes<HTMLDivElement>;
3
- declare function Skeleton({ className, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
4
- export { Skeleton };
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import { cn } from "../lib/utils";
4
- function Skeleton({ className, ...props }) {
5
- return (_jsx("div", { className: cn("animate-pulse rounded-md bg-grey-100", className), ...props }));
6
- }
7
- export { Skeleton };
@@ -1,6 +0,0 @@
1
- import * as React from "react";
2
- import * as SliderPrimitive from "@radix-ui/react-slider";
3
- export interface SliderProps extends React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {
4
- }
5
- declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;
6
- export { Slider };
package/Slider/Slider.js DELETED
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as SliderPrimitive from "@radix-ui/react-slider";
4
- import { cn } from "../lib/utils";
5
- const Slider = React.forwardRef(({ className, ...props }, ref) => (_jsxs(SliderPrimitive.Root, { ref: ref, className: cn("relative flex w-full touch-none select-none items-center", className), ...props, children: [_jsx(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-grey-300", children: _jsx(SliderPrimitive.Range, { className: "absolute h-full bg-main-900" }) }), _jsx(SliderPrimitive.Thumb, { className: "block size-3 rounded-full border border-main-900 bg-white shadow transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-600 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })] })));
6
- Slider.displayName = SliderPrimitive.Root.displayName;
7
- export { Slider };
@@ -1,19 +0,0 @@
1
- import * as React from "react";
2
- type SpinnerSize = "sm" | "default" | "md" | "lg" | "xl";
3
- type SpinnerVariant = "default" | "primary" | "secondary" | "muted" | "white";
4
- declare const spinnerVariants: (props?: ({
5
- size?: "default" | "sm" | "lg" | "md" | "xl" | null | undefined;
6
- variant?: "default" | "secondary" | "primary" | "white" | "muted" | null | undefined;
7
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
- export interface SpinnerProps extends React.SVGAttributes<SVGSVGElement> {
9
- size?: SpinnerSize;
10
- variant?: SpinnerVariant;
11
- /**
12
- * Screen reader label for accessibility
13
- * @default "Loading"
14
- */
15
- label?: string;
16
- }
17
- declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<SVGSVGElement>>;
18
- export { Spinner, spinnerVariants };
19
- export type { SpinnerSize, SpinnerVariant };
@@ -1,31 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import { cva } from "class-variance-authority";
4
- import { cn } from "../lib/utils";
5
- const spinnerVariants = cva("animate-spin", {
6
- variants: {
7
- size: {
8
- sm: "size-4",
9
- default: "size-6",
10
- md: "size-8",
11
- lg: "size-12",
12
- xl: "size-16",
13
- },
14
- variant: {
15
- default: "text-accent-500",
16
- primary: "text-accent-500",
17
- secondary: "text-grey-500",
18
- muted: "text-grey-400",
19
- white: "text-white",
20
- },
21
- },
22
- defaultVariants: {
23
- size: "default",
24
- variant: "default",
25
- },
26
- });
27
- const Spinner = React.forwardRef(({ className, size, variant, label = "Loading", ...props }, ref) => {
28
- return (_jsxs("svg", { ref: ref, className: cn(spinnerVariants({ size, variant, className })), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", role: "status", "aria-label": label, ...props, children: [_jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), _jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }));
29
- });
30
- Spinner.displayName = "Spinner";
31
- export { Spinner, spinnerVariants };
@@ -1,12 +0,0 @@
1
- import * as React from "react";
2
- import * as SwitchPrimitive from "@radix-ui/react-switch";
3
- type SwitchSize = "small" | "regular";
4
- declare const switchVariants: (props?: ({
5
- size?: "small" | "regular" | null | undefined;
6
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
- export interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root> {
8
- size?: SwitchSize;
9
- }
10
- declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
11
- export { Switch, switchVariants };
12
- export type { SwitchSize };
package/Switch/Switch.js DELETED
@@ -1,30 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as SwitchPrimitive from "@radix-ui/react-switch";
4
- import { cva } from "class-variance-authority";
5
- import { cn } from "../lib/utils";
6
- const switchVariants = cva("peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-600 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent-600 data-[state=unchecked]:bg-grey-200", {
7
- variants: {
8
- size: {
9
- small: "h-5 w-9",
10
- regular: "h-6 w-11",
11
- },
12
- },
13
- defaultVariants: {
14
- size: "regular",
15
- },
16
- });
17
- const switchThumbVariants = cva("pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=unchecked]:translate-x-0", {
18
- variants: {
19
- size: {
20
- small: "size-4 data-[state=checked]:translate-x-4",
21
- regular: "size-5 data-[state=checked]:translate-x-5",
22
- },
23
- },
24
- defaultVariants: {
25
- size: "regular",
26
- },
27
- });
28
- const Switch = React.forwardRef(({ className, size, ...props }, ref) => (_jsx(SwitchPrimitive.Root, { className: cn(switchVariants({ size }), className), ...props, ref: ref, children: _jsx(SwitchPrimitive.Thumb, { className: cn(switchThumbVariants({ size })) }) })));
29
- Switch.displayName = SwitchPrimitive.Root.displayName;
30
- export { Switch, switchVariants };
package/Table/Table.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import * as React from "react";
2
- declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
3
- declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
4
- declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
5
- declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
6
- declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
7
- declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
8
- declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
9
- declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
10
- export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
package/Table/Table.js DELETED
@@ -1,20 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import { cn } from "../lib/utils";
4
- const Table = React.forwardRef(({ className, ...props }, ref) => (_jsx("table", { ref: ref, className: cn("w-full caption-bottom text-sm", className), ...props })));
5
- Table.displayName = "Table";
6
- const TableHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("thead", { ref: ref, className: cn("bg-background-neutral-200 [&_tr]:border-b [&_tr]:hover:bg-background-neutral-200", className), ...props })));
7
- TableHeader.displayName = "TableHeader";
8
- const TableBody = React.forwardRef(({ className, ...props }, ref) => (_jsx("tbody", { ref: ref, className: cn("[&_tr:last-child]:border-0", className), ...props })));
9
- TableBody.displayName = "TableBody";
10
- const TableFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("tfoot", { ref: ref, className: cn("border-t bg-background-neutral-200 font-medium text-main-900 [&>tr]:last:border-b-0", className), ...props })));
11
- TableFooter.displayName = "TableFooter";
12
- const TableRow = React.forwardRef(({ className, ...props }, ref) => (_jsx("tr", { ref: ref, className: cn("border-b border-grey-200 transition-colors hover:bg-grey-50 data-[state=selected]:bg-grey-100", className), ...props })));
13
- TableRow.displayName = "TableRow";
14
- const TableHead = React.forwardRef(({ className, ...props }, ref) => (_jsx("th", { ref: ref, className: cn("h-10 px-3 text-left align-middle font-normal text-main-900 [&:has([role=checkbox])]:pr-0", className), ...props })));
15
- TableHead.displayName = "TableHead";
16
- const TableCell = React.forwardRef(({ className, ...props }, ref) => (_jsx("td", { ref: ref, className: cn("p-3 align-middle text-main-600 [&:has([role=checkbox])]:pr-0", className), ...props })));
17
- TableCell.displayName = "TableCell";
18
- const TableCaption = React.forwardRef(({ className, ...props }, ref) => (_jsx("caption", { ref: ref, className: cn("mt-4 text-sm text-main-600", className), ...props })));
19
- TableCaption.displayName = "TableCaption";
20
- export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
package/Tabs/Tabs.d.ts DELETED
@@ -1,15 +0,0 @@
1
- import * as React from "react";
2
- import * as TabsPrimitive from "@radix-ui/react-tabs";
3
- type TabsListVariant = "default" | "outline";
4
- declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
5
- declare const tabsListVariants: (props?: ({
6
- variant?: "default" | "outline" | null | undefined;
7
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
- export interface TabsListProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> {
9
- variant?: TabsListVariant;
10
- }
11
- declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
12
- declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
13
- declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
- export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
15
- export type { TabsListVariant };
package/Tabs/Tabs.js DELETED
@@ -1,24 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as TabsPrimitive from "@radix-ui/react-tabs";
4
- import { cva } from "class-variance-authority";
5
- import { cn } from "../lib/utils";
6
- const Tabs = TabsPrimitive.Root;
7
- const tabsListVariants = cva("inline-flex items-center justify-center rounded-lg bg-grey-100 p-1 text-grey-500", {
8
- variants: {
9
- variant: {
10
- default: "bg-grey-100",
11
- outline: "bg-transparent border border-grey-200",
12
- },
13
- },
14
- defaultVariants: {
15
- variant: "default",
16
- },
17
- });
18
- const TabsList = React.forwardRef(({ className, variant, ...props }, ref) => (_jsx(TabsPrimitive.List, { ref: ref, className: cn(tabsListVariants({ variant }), className), ...props })));
19
- TabsList.displayName = TabsPrimitive.List.displayName;
20
- const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Trigger, { ref: ref, className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-main-950 focus-visible:ring-offset-2 cursor-pointer disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-main-950 data-[state=active]:shadow-sm", className), ...props })));
21
- TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
22
- const TabsContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Content, { ref: ref, className: cn("mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-main-950 focus-visible:ring-offset-2", className), ...props })));
23
- TabsContent.displayName = TabsPrimitive.Content.displayName;
24
- export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
@@ -1,19 +0,0 @@
1
- import * as React from "react";
2
- import { type TextVariant, type TextColor } from "../lib/typography-types";
3
- type TextareaVariant = "default" | "error";
4
- type TextareaResize = "none" | "vertical" | "horizontal" | "both";
5
- declare const textareaVariants: (props?: ({
6
- variant?: "default" | "error" | null | undefined;
7
- resize?: "none" | "both" | "horizontal" | "vertical" | null | undefined;
8
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
- export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
10
- variant?: TextareaVariant;
11
- resize?: TextareaResize;
12
- label?: string;
13
- labelVariant?: TextVariant;
14
- labelColor?: TextColor;
15
- error?: string;
16
- }
17
- declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
18
- export { Textarea, textareaVariants };
19
- export type { TextareaVariant, TextareaResize };
@@ -1,31 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import { cva } from "class-variance-authority";
4
- import { cn } from "../lib/utils";
5
- import { Label } from "../Label/Label";
6
- import { Typography } from "../Typography/Typography";
7
- import {} from "../lib/typography-types";
8
- const textareaVariants = cva("flex min-h-[80px] w-full rounded-lg border bg-white px-3 py-2 text-sm font-normal font-sans transition-colors placeholder:text-grey-400 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-grey-50", {
9
- variants: {
10
- variant: {
11
- default: "border-grey-300 focus-visible:border-grey-300 focus-visible:ring-[3px] focus-visible:ring-grey-300/50",
12
- error: "border-error-500 focus-visible:border-error-500 focus-visible:ring-[3px] focus-visible:ring-error-200",
13
- },
14
- resize: {
15
- none: "resize-none",
16
- vertical: "resize-y",
17
- horizontal: "resize-x",
18
- both: "resize",
19
- },
20
- },
21
- defaultVariants: {
22
- variant: "default",
23
- resize: "vertical",
24
- },
25
- });
26
- const Textarea = React.forwardRef(({ className, variant, resize, label, labelVariant = "body2", labelColor = "main-800", error, id, ...props }, ref) => {
27
- const computedVariant = error ? "error" : variant;
28
- return (_jsxs("div", { className: "flex flex-col gap-2 w-full", children: [label && (_jsx(Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), _jsx("textarea", { id: id, className: cn(textareaVariants({ variant: computedVariant, resize }), className), ref: ref, ...props }), error && (_jsx(Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
29
- });
30
- Textarea.displayName = "Textarea";
31
- export { Textarea, textareaVariants };
package/Toast/Toast.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import { toast, type ToasterProps } from "sonner";
2
- type ToastTheme = "light" | "dark" | "system";
3
- export interface ToastProps extends ToasterProps {
4
- /**
5
- * Theme for the toaster
6
- * @default "light"
7
- */
8
- theme?: ToastTheme;
9
- }
10
- declare const Toaster: ({ theme, ...props }: ToastProps) => import("react/jsx-runtime").JSX.Element;
11
- export { Toaster, toast };
12
- export type { ToastTheme };