@momo-webplatform/mobase 0.0.3

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 (187) hide show
  1. package/README.md +23 -0
  2. package/package.json +154 -0
  3. package/publish/cjs/components/ui/button.js +60 -0
  4. package/publish/cjs/components/utils/SpinerIcon.js +7 -0
  5. package/publish/cjs/lib/utils.js +9 -0
  6. package/publish/cjs/src/components/Accordion/Accordion.js +44 -0
  7. package/publish/cjs/src/components/Accordion/index.js +8 -0
  8. package/publish/cjs/src/components/Alert/Alert.js +50 -0
  9. package/publish/cjs/src/components/AlertDialog/AlertDialog.js +62 -0
  10. package/publish/cjs/src/components/AlertDialog/index.js +14 -0
  11. package/publish/cjs/src/components/Avatar/Avatar.js +74 -0
  12. package/publish/cjs/src/components/Avatar/index.js +7 -0
  13. package/publish/cjs/src/components/Badge/Badge.js +24 -0
  14. package/publish/cjs/src/components/Button/Button.js +74 -0
  15. package/publish/cjs/src/components/Button/index.js +5 -0
  16. package/publish/cjs/src/components/Calendar/calendar.js +39 -0
  17. package/publish/cjs/src/components/Card/Card.js +47 -0
  18. package/publish/cjs/src/components/Checkbox/Checkbox.js +67 -0
  19. package/publish/cjs/src/components/Checkbox/index.js +9 -0
  20. package/publish/cjs/src/components/Collapsible/collapsible.js +33 -0
  21. package/publish/cjs/src/components/Command/command.js +62 -0
  22. package/publish/cjs/src/components/Dialog/dialog.js +57 -0
  23. package/publish/cjs/src/components/Drawer/drawer.js +57 -0
  24. package/publish/cjs/src/components/DropdownMenu/dropdownmenu.js +75 -0
  25. package/publish/cjs/src/components/HoverCard/hover-card.js +38 -0
  26. package/publish/cjs/src/components/IconButton/IconButton.js +67 -0
  27. package/publish/cjs/src/components/IconButton/index.js +5 -0
  28. package/publish/cjs/src/components/Input/input.js +34 -0
  29. package/publish/cjs/src/components/Label/Label.js +35 -0
  30. package/publish/cjs/src/components/Menubar/menubar.js +77 -0
  31. package/publish/cjs/src/components/NavigationMenu/navigation-menu.js +102 -0
  32. package/publish/cjs/src/components/Pagination/Pagination.js +52 -0
  33. package/publish/cjs/src/components/Popover/popover.js +37 -0
  34. package/publish/cjs/src/components/Progress/Progress.js +33 -0
  35. package/publish/cjs/src/components/RadioGroup/Radio.js +110 -0
  36. package/publish/cjs/src/components/RadioGroup/RadioGroup.js +53 -0
  37. package/publish/cjs/src/components/RadioGroup/index.js +6 -0
  38. package/publish/cjs/src/components/Select/Select.js +61 -0
  39. package/publish/cjs/src/components/Sheet/sheet.js +71 -0
  40. package/publish/cjs/src/components/Skeleton/skeleton.js +9 -0
  41. package/publish/cjs/src/components/Slider/slider.js +33 -0
  42. package/publish/cjs/src/components/Switch/Switch.js +54 -0
  43. package/publish/cjs/src/components/Switch/index.js +6 -0
  44. package/publish/cjs/src/components/Table/Table.js +53 -0
  45. package/publish/cjs/src/components/Tabs/Tabs.js +42 -0
  46. package/publish/cjs/src/components/Textarea/Textarea.js +14 -0
  47. package/publish/cjs/src/components/Toast/Toast.js +65 -0
  48. package/publish/cjs/src/components/Toast/toaster.js +14 -0
  49. package/publish/cjs/src/components/Toast/use-toast.js +155 -0
  50. package/publish/cjs/src/components/Tooltip/Tooltip.js +41 -0
  51. package/publish/cjs/src/helpers/clone-deep.js +15 -0
  52. package/publish/cjs/src/helpers/clone-deep.spec.js +22 -0
  53. package/publish/cjs/src/helpers/generic-forward-ref.js +5 -0
  54. package/publish/cjs/src/helpers/http.js +10 -0
  55. package/publish/cjs/src/helpers/is-client.js +7 -0
  56. package/publish/cjs/src/helpers/is-object.js +12 -0
  57. package/publish/cjs/src/helpers/is-object.spec.js +24 -0
  58. package/publish/cjs/src/helpers/merge-deep.js +29 -0
  59. package/publish/cjs/src/helpers/merge-deep.spec.js +56 -0
  60. package/publish/cjs/src/helpers/omit.js +16 -0
  61. package/publish/cjs/src/helpers/omit.spec.js +9 -0
  62. package/publish/cjs/src/index.js +19 -0
  63. package/publish/cjs/src/types/index.js +2 -0
  64. package/publish/cjs/tsconfig.lib.tsbuildinfo +1 -0
  65. package/publish/esm/components/ui/button.d.ts +11 -0
  66. package/publish/esm/components/ui/button.js +33 -0
  67. package/publish/esm/components/utils/SpinerIcon.d.ts +6 -0
  68. package/publish/esm/components/utils/SpinerIcon.js +5 -0
  69. package/publish/esm/lib/utils.d.ts +2 -0
  70. package/publish/esm/lib/utils.js +5 -0
  71. package/publish/esm/src/components/Accordion/Accordion.d.ts +20 -0
  72. package/publish/esm/src/components/Accordion/Accordion.js +15 -0
  73. package/publish/esm/src/components/Accordion/index.d.ts +2 -0
  74. package/publish/esm/src/components/Accordion/index.js +1 -0
  75. package/publish/esm/src/components/Alert/Alert.d.ts +8 -0
  76. package/publish/esm/src/components/Alert/Alert.js +22 -0
  77. package/publish/esm/src/components/AlertDialog/AlertDialog.d.ts +49 -0
  78. package/publish/esm/src/components/AlertDialog/AlertDialog.js +26 -0
  79. package/publish/esm/src/components/AlertDialog/index.d.ts +2 -0
  80. package/publish/esm/src/components/AlertDialog/index.js +5 -0
  81. package/publish/esm/src/components/Avatar/Avatar.d.ts +33 -0
  82. package/publish/esm/src/components/Avatar/Avatar.js +46 -0
  83. package/publish/esm/src/components/Avatar/index.d.ts +2 -0
  84. package/publish/esm/src/components/Avatar/index.js +1 -0
  85. package/publish/esm/src/components/Badge/Badge.d.ts +9 -0
  86. package/publish/esm/src/components/Badge/Badge.js +20 -0
  87. package/publish/esm/src/components/Button/Button.d.ts +26 -0
  88. package/publish/esm/src/components/Button/Button.js +44 -0
  89. package/publish/esm/src/components/Button/index.d.ts +2 -0
  90. package/publish/esm/src/components/Button/index.js +1 -0
  91. package/publish/esm/src/components/Calendar/calendar.d.ts +8 -0
  92. package/publish/esm/src/components/Calendar/calendar.js +36 -0
  93. package/publish/esm/src/components/Card/Card.d.ts +8 -0
  94. package/publish/esm/src/components/Card/Card.js +16 -0
  95. package/publish/esm/src/components/Checkbox/Checkbox.d.ts +40 -0
  96. package/publish/esm/src/components/Checkbox/Checkbox.js +36 -0
  97. package/publish/esm/src/components/Checkbox/index.d.ts +2 -0
  98. package/publish/esm/src/components/Checkbox/index.js +4 -0
  99. package/publish/esm/src/components/Collapsible/collapsible.d.ts +5 -0
  100. package/publish/esm/src/components/Collapsible/collapsible.js +5 -0
  101. package/publish/esm/src/components/Command/command.d.ts +50 -0
  102. package/publish/esm/src/components/Command/command.js +28 -0
  103. package/publish/esm/src/components/Dialog/dialog.d.ts +19 -0
  104. package/publish/esm/src/components/Dialog/dialog.js +22 -0
  105. package/publish/esm/src/components/Drawer/drawer.d.ts +24 -0
  106. package/publish/esm/src/components/Drawer/drawer.js +22 -0
  107. package/publish/esm/src/components/DropdownMenu/dropdownmenu.d.ts +27 -0
  108. package/publish/esm/src/components/DropdownMenu/dropdownmenu.js +35 -0
  109. package/publish/esm/src/components/HoverCard/hover-card.d.ts +6 -0
  110. package/publish/esm/src/components/HoverCard/hover-card.js +10 -0
  111. package/publish/esm/src/components/IconButton/IconButton.d.ts +22 -0
  112. package/publish/esm/src/components/IconButton/IconButton.js +40 -0
  113. package/publish/esm/src/components/IconButton/index.d.ts +2 -0
  114. package/publish/esm/src/components/IconButton/index.js +1 -0
  115. package/publish/esm/src/components/Input/input.d.ts +5 -0
  116. package/publish/esm/src/components/Input/input.js +8 -0
  117. package/publish/esm/src/components/Label/Label.d.ts +5 -0
  118. package/publish/esm/src/components/Label/Label.js +9 -0
  119. package/publish/esm/src/components/Menubar/menubar.d.ts +31 -0
  120. package/publish/esm/src/components/Menubar/menubar.js +36 -0
  121. package/publish/esm/src/components/NavigationMenu/navigation-menu.d.ts +13 -0
  122. package/publish/esm/src/components/NavigationMenu/navigation-menu.js +64 -0
  123. package/publish/esm/src/components/Pagination/Pagination.d.ts +19 -0
  124. package/publish/esm/src/components/Pagination/Pagination.js +20 -0
  125. package/publish/esm/src/components/Popover/popover.d.ts +6 -0
  126. package/publish/esm/src/components/Popover/popover.js +9 -0
  127. package/publish/esm/src/components/Progress/Progress.d.ts +4 -0
  128. package/publish/esm/src/components/Progress/Progress.js +7 -0
  129. package/publish/esm/src/components/RadioGroup/Radio.d.ts +22 -0
  130. package/publish/esm/src/components/RadioGroup/Radio.js +84 -0
  131. package/publish/esm/src/components/RadioGroup/RadioGroup.d.ts +44 -0
  132. package/publish/esm/src/components/RadioGroup/RadioGroup.js +25 -0
  133. package/publish/esm/src/components/RadioGroup/index.d.ts +2 -0
  134. package/publish/esm/src/components/RadioGroup/index.js +1 -0
  135. package/publish/esm/src/components/Select/Select.d.ts +13 -0
  136. package/publish/esm/src/components/Select/Select.js +26 -0
  137. package/publish/esm/src/components/Sheet/sheet.d.ts +25 -0
  138. package/publish/esm/src/components/Sheet/sheet.js +36 -0
  139. package/publish/esm/src/components/Skeleton/skeleton.d.ts +2 -0
  140. package/publish/esm/src/components/Skeleton/skeleton.js +6 -0
  141. package/publish/esm/src/components/Slider/slider.d.ts +4 -0
  142. package/publish/esm/src/components/Slider/slider.js +7 -0
  143. package/publish/esm/src/components/Switch/Switch.d.ts +37 -0
  144. package/publish/esm/src/components/Switch/Switch.js +26 -0
  145. package/publish/esm/src/components/Switch/index.d.ts +2 -0
  146. package/publish/esm/src/components/Switch/index.js +1 -0
  147. package/publish/esm/src/components/Table/Table.d.ts +10 -0
  148. package/publish/esm/src/components/Table/Table.js +20 -0
  149. package/publish/esm/src/components/Tabs/Tabs.d.ts +7 -0
  150. package/publish/esm/src/components/Tabs/Tabs.js +13 -0
  151. package/publish/esm/src/components/Textarea/Textarea.d.ts +5 -0
  152. package/publish/esm/src/components/Textarea/Textarea.js +8 -0
  153. package/publish/esm/src/components/Toast/Toast.d.ts +15 -0
  154. package/publish/esm/src/components/Toast/Toast.js +33 -0
  155. package/publish/esm/src/components/Toast/toaster.d.ts +1 -0
  156. package/publish/esm/src/components/Toast/toaster.js +10 -0
  157. package/publish/esm/src/components/Toast/use-toast.d.ts +44 -0
  158. package/publish/esm/src/components/Toast/use-toast.js +127 -0
  159. package/publish/esm/src/components/Tooltip/Tooltip.d.ts +8 -0
  160. package/publish/esm/src/components/Tooltip/Tooltip.js +11 -0
  161. package/publish/esm/src/helpers/clone-deep.d.ts +1 -0
  162. package/publish/esm/src/helpers/clone-deep.js +11 -0
  163. package/publish/esm/src/helpers/clone-deep.spec.d.ts +1 -0
  164. package/publish/esm/src/helpers/clone-deep.spec.js +20 -0
  165. package/publish/esm/src/helpers/generic-forward-ref.d.ts +5 -0
  166. package/publish/esm/src/helpers/generic-forward-ref.js +3 -0
  167. package/publish/esm/src/helpers/http.d.ts +1 -0
  168. package/publish/esm/src/helpers/http.js +6 -0
  169. package/publish/esm/src/helpers/is-client.d.ts +1 -0
  170. package/publish/esm/src/helpers/is-client.js +3 -0
  171. package/publish/esm/src/helpers/is-object.d.ts +6 -0
  172. package/publish/esm/src/helpers/is-object.js +8 -0
  173. package/publish/esm/src/helpers/is-object.spec.d.ts +1 -0
  174. package/publish/esm/src/helpers/is-object.spec.js +22 -0
  175. package/publish/esm/src/helpers/merge-deep.d.ts +7 -0
  176. package/publish/esm/src/helpers/merge-deep.js +25 -0
  177. package/publish/esm/src/helpers/merge-deep.spec.d.ts +1 -0
  178. package/publish/esm/src/helpers/merge-deep.spec.js +54 -0
  179. package/publish/esm/src/helpers/omit.d.ts +1 -0
  180. package/publish/esm/src/helpers/omit.js +12 -0
  181. package/publish/esm/src/helpers/omit.spec.d.ts +1 -0
  182. package/publish/esm/src/helpers/omit.spec.js +7 -0
  183. package/publish/esm/src/index.d.ts +3 -0
  184. package/publish/esm/src/index.js +3 -0
  185. package/publish/esm/src/types/index.d.ts +3 -0
  186. package/publish/esm/src/types/index.js +1 -0
  187. package/publish/esm/tsconfig.lib.tsbuildinfo +1 -0
@@ -0,0 +1,84 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { composeEventHandlers } from "@radix-ui/primitive";
4
+ import { useComposedRefs } from "@radix-ui/react-compose-refs";
5
+ import { createContextScope } from "@radix-ui/react-context";
6
+ import { useSize } from "@radix-ui/react-use-size";
7
+ import { usePrevious } from "@radix-ui/react-use-previous";
8
+ import { Presence } from "@radix-ui/react-presence";
9
+ import { Primitive } from "@radix-ui/react-primitive";
10
+ /* -------------------------------------------------------------------------------------------------
11
+ * Radio
12
+ * -----------------------------------------------------------------------------------------------*/
13
+ const RADIO_NAME = "Radio";
14
+ const [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);
15
+ const [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);
16
+ const Radio = React.forwardRef((props, forwardedRef) => {
17
+ const { __scopeRadio, name, checked = false, required, disabled, value = "on", onCheck, ...radioProps } = props;
18
+ const [button, setButton] = React.useState(null);
19
+ const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
20
+ const hasConsumerStoppedPropagationRef = React.useRef(false);
21
+ // We set this to true by default so that events bubble to forms without JS (SSR)
22
+ const isFormControl = button ? Boolean(button.closest("form")) : true;
23
+ return (_jsxs(RadioProvider, { scope: __scopeRadio, checked: checked, disabled: disabled, children: [_jsx(Primitive.button, { type: "button", role: "radio", "aria-checked": checked, "data-state": getState(checked), "data-disabled": disabled ? "" : undefined, disabled: disabled, value: value, ...radioProps, ref: composedRefs, onClick: composeEventHandlers(props.onClick, (event) => {
24
+ // radios cannot be unchecked so we only communicate a checked state
25
+ if (!checked)
26
+ onCheck?.();
27
+ if (isFormControl) {
28
+ hasConsumerStoppedPropagationRef.current =
29
+ event.isPropagationStopped();
30
+ // if radio is in a form, stop propagation from the button so that we only propagate
31
+ // one click event (from the input). We propagate changes from an input so that native
32
+ // form validation works and form events reflect radio updates.
33
+ if (!hasConsumerStoppedPropagationRef.current)
34
+ event.stopPropagation();
35
+ }
36
+ }) }), isFormControl && (_jsx(BubbleInput, { control: button, bubbles: !hasConsumerStoppedPropagationRef.current, name: name, value: value, checked: checked, required: required, disabled: disabled,
37
+ // We transform because the input is absolutely positioned but we have
38
+ // rendered it **after** the button. This pulls it back to sit on top
39
+ // of the button.
40
+ style: { transform: "translateX(-100%)" } }))] }));
41
+ });
42
+ Radio.displayName = RADIO_NAME;
43
+ /* -------------------------------------------------------------------------------------------------
44
+ * RadioIndicator
45
+ * -----------------------------------------------------------------------------------------------*/
46
+ const INDICATOR_NAME = "RadioIndicator";
47
+ const RadioIndicator = React.forwardRef((props, forwardedRef) => {
48
+ const { __scopeRadio, forceMount, ...indicatorProps } = props;
49
+ const context = useRadioContext(INDICATOR_NAME, __scopeRadio);
50
+ return (_jsx(Presence, { present: forceMount || context.checked, children: _jsx(Primitive.span, { "data-state": getState(context.checked), "data-disabled": context.disabled ? "" : undefined, ...indicatorProps, ref: forwardedRef }) }));
51
+ });
52
+ RadioIndicator.displayName = INDICATOR_NAME;
53
+ const BubbleInput = (props) => {
54
+ const { control, checked, bubbles = true, ...inputProps } = props;
55
+ const ref = React.useRef(null);
56
+ const prevChecked = usePrevious(checked);
57
+ const controlSize = useSize(control);
58
+ // Bubble checked change to parents (e.g form change event)
59
+ React.useEffect(() => {
60
+ const input = ref.current;
61
+ const inputProto = window.HTMLInputElement.prototype;
62
+ const descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked");
63
+ const setChecked = descriptor.set;
64
+ if (prevChecked !== checked && setChecked) {
65
+ const event = new Event("click", { bubbles });
66
+ setChecked.call(input, checked);
67
+ input.dispatchEvent(event);
68
+ }
69
+ }, [prevChecked, checked, bubbles]);
70
+ return (_jsx("input", { type: "radio", "aria-hidden": true, defaultChecked: checked, ...inputProps, tabIndex: -1, ref: ref, style: {
71
+ ...props.style,
72
+ ...controlSize,
73
+ position: "absolute",
74
+ pointerEvents: "none",
75
+ opacity: 0,
76
+ margin: 0,
77
+ } }));
78
+ };
79
+ function getState(checked) {
80
+ return checked ? "checked" : "unchecked";
81
+ }
82
+ export { createRadioScope,
83
+ //
84
+ Radio, RadioIndicator, };
@@ -0,0 +1,44 @@
1
+ import * as React from "react";
2
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
+ import * as RovingFocusGroup from "@radix-ui/react-roving-focus";
4
+ import { Primitive } from "@radix-ui/react-primitive";
5
+ import { Radio, RadioIndicator } from "./Radio";
6
+ import type * as Radix from "@radix-ui/react-primitive";
7
+ export declare const createRadioGroupContext: <ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType | undefined) => readonly [{
8
+ (props: ContextValueType & {
9
+ scope: import("@radix-ui/react-context").Scope<ContextValueType>;
10
+ children: React.ReactNode;
11
+ }): JSX.Element;
12
+ displayName: string;
13
+ }, (consumerName: string, scope: import("@radix-ui/react-context").Scope<ContextValueType | undefined>) => ContextValueType], createRadioGroupScope: import("@radix-ui/react-context").CreateScope;
14
+ type RadioGroupContextValue = {
15
+ name?: string;
16
+ required: boolean;
17
+ disabled: boolean;
18
+ value?: string;
19
+ onValueChange(value: string): void;
20
+ };
21
+ type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
22
+ type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
23
+ interface RadioGroupProps extends PrimitiveDivProps {
24
+ name?: RadioGroupContextValue["name"];
25
+ required?: Radix.ComponentPropsWithoutRef<typeof Radio>["required"];
26
+ disabled?: Radix.ComponentPropsWithoutRef<typeof Radio>["disabled"];
27
+ dir?: RovingFocusGroupProps["dir"];
28
+ orientation?: RovingFocusGroupProps["orientation"];
29
+ loop?: RovingFocusGroupProps["loop"];
30
+ defaultValue?: string;
31
+ value?: RadioGroupContextValue["value"];
32
+ onValueChange?: RadioGroupContextValue["onValueChange"];
33
+ }
34
+ type RadioIndicatorProps = Radix.ComponentPropsWithoutRef<typeof RadioIndicator>;
35
+ interface RadioGroupIndicatorProps extends RadioIndicatorProps {
36
+ }
37
+ type RadioProps = Radix.ComponentPropsWithoutRef<typeof Radio>;
38
+ interface RadioGroupItemProps extends Omit<RadioProps, "onCheck" | "name"> {
39
+ value: string;
40
+ }
41
+ declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
42
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
43
+ export type { RadioGroupProps, RadioGroupItemProps, RadioGroupIndicatorProps };
44
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,25 @@
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 { createContextScope } from "@radix-ui/react-context";
6
+ import { createRovingFocusGroupScope } from "@radix-ui/react-roving-focus";
7
+ import { cn } from "@/lib/utils";
8
+ import { createRadioScope } from "./Radio";
9
+ /* -------------------------------------------------------------------------------------------------
10
+ * RadioGroup
11
+ * -----------------------------------------------------------------------------------------------*/
12
+ const RADIO_GROUP_NAME = "RadioGroup";
13
+ export const [createRadioGroupContext, createRadioGroupScope] = createContextScope(RADIO_GROUP_NAME, [
14
+ createRovingFocusGroupScope,
15
+ createRadioScope,
16
+ ]);
17
+ const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
18
+ return (_jsx(RadioGroupPrimitive.Root, { className: cn("grid gap-4 text-base", props?.orientation === "horizontal" ? "grid-cols-2" : "", className), ...props, ref: ref }));
19
+ });
20
+ RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
21
+ const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
22
+ return (_jsx(RadioGroupPrimitive.Item, { ref: ref, className: cn("aspect-square h-4 w-4 data-[state=checked]:text-white disabled:data-[state=checked]:text-gray-500 disabled:bg-gray-300 disabled:border-none rounded-full border-2 disabled:data-[state=checked]:bg-gray-300 data-[state=checked]:bg-pink-500 border-gray-300 data-[state=checked]:border-none text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-default disabled:opacity-40", className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center w-full h-full rounded-full", children: _jsx(Circle, { className: "h-2 w-2 fill-current text-current" }) }) }));
23
+ });
24
+ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
25
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,2 @@
1
+ export { RadioGroup, RadioGroupItem } from "./RadioGroup";
2
+ export type { RadioGroupProps, RadioGroupItemProps, RadioGroupIndicatorProps, } from "./RadioGroup";
@@ -0,0 +1 @@
1
+ export { RadioGroup, RadioGroupItem } from "./RadioGroup";
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import * as SelectPrimitive from "@radix-ui/react-select";
3
+ declare const Select: React.FC<SelectPrimitive.SelectProps>;
4
+ declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
5
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
6
+ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { ChevronDownIcon, ChevronUpIcon, CheckIcon } from '@heroicons/react/solid';
4
+ import * as SelectPrimitive from "@radix-ui/react-select";
5
+ import { cn } from "@/lib/utils";
6
+ const Select = SelectPrimitive.Root;
7
+ const SelectGroup = SelectPrimitive.Group;
8
+ const SelectValue = SelectPrimitive.Value;
9
+ const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-gray-300 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-gray-500 focus:outline-none focus:ring-1 focus:ring-pink-200 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 text-gray-900", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "h-4 w-4 opacity-50" }) })] })));
10
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
11
+ 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(ChevronUpIcon, {}) })));
12
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
13
+ 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(ChevronDownIcon, {}) })));
14
+ SelectScrollDownButton.displayName =
15
+ SelectPrimitive.ScrollDownButton.displayName;
16
+ 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-md border border-gray-300 bg-white text-gray-900 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" &&
17
+ "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" &&
18
+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), _jsx(SelectScrollDownButton, {})] }) })));
19
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
20
+ const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold", className), ...props })));
21
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
22
+ 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-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "h-4 w-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
23
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
24
+ const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
25
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
26
+ export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
@@ -0,0 +1,25 @@
1
+ import * as React from "react";
2
+ import * as SheetPrimitive from "@radix-ui/react-dialog";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
5
+ declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
8
+ declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const sheetVariants: (props?: ({
10
+ side?: "left" | "right" | "bottom" | "top" | null | undefined;
11
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
12
+ interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
13
+ }
14
+ declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
15
+ declare const SheetHeader: {
16
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
17
+ displayName: string;
18
+ };
19
+ declare const SheetFooter: {
20
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
21
+ displayName: string;
22
+ };
23
+ declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
24
+ declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
25
+ export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as SheetPrimitive from "@radix-ui/react-dialog";
4
+ import { cva } from "class-variance-authority";
5
+ import { X } from "lucide-react";
6
+ import { cn } from "@/lib/utils";
7
+ const Sheet = SheetPrimitive.Root;
8
+ const SheetTrigger = SheetPrimitive.Trigger;
9
+ const SheetClose = SheetPrimitive.Close;
10
+ const SheetPortal = SheetPrimitive.Portal;
11
+ const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(SheetPrimitive.Overlay, { className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props, ref: ref })));
12
+ SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
13
+ const sheetVariants = cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", {
14
+ variants: {
15
+ side: {
16
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
17
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
18
+ left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
19
+ right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
20
+ },
21
+ },
22
+ defaultVariants: {
23
+ side: "right",
24
+ },
25
+ });
26
+ const SheetContent = React.forwardRef(({ side = "right", className, children, ...props }, ref) => (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, { ref: ref, className: cn(sheetVariants({ side }), className), ...props, children: [children, _jsxs(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
27
+ SheetContent.displayName = SheetPrimitive.Content.displayName;
28
+ const SheetHeader = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props }));
29
+ SheetHeader.displayName = "SheetHeader";
30
+ const SheetFooter = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
31
+ SheetFooter.displayName = "SheetFooter";
32
+ const SheetTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(SheetPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold text-foreground", className), ...props })));
33
+ SheetTitle.displayName = SheetPrimitive.Title.displayName;
34
+ const SheetDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(SheetPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
35
+ SheetDescription.displayName = SheetPrimitive.Description.displayName;
36
+ export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -0,0 +1,2 @@
1
+ declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
2
+ export { Skeleton };
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "@/lib/utils";
3
+ function Skeleton({ className, ...props }) {
4
+ return (_jsx("div", { className: cn("animate-pulse rounded-md bg-muted", className), ...props }));
5
+ }
6
+ export { Skeleton };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as SliderPrimitive from "@radix-ui/react-slider";
3
+ declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ export { Slider };
@@ -0,0 +1,7 @@
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-2 w-full grow overflow-hidden rounded-full bg-secondary", children: _jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }), _jsx(SliderPrimitive.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })] })));
6
+ Slider.displayName = SliderPrimitive.Root.displayName;
7
+ export { Slider };
@@ -0,0 +1,37 @@
1
+ import * as React from "react";
2
+ import * as SwitchPrimitives from "@radix-ui/react-switch";
3
+ import { Primitive } from "@radix-ui/react-primitive";
4
+ import type { Scope } from "@radix-ui/react-context";
5
+ import type * as Radix from "@radix-ui/react-primitive";
6
+ export declare const createSwitchContext: <ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType | undefined) => readonly [{
7
+ (props: ContextValueType & {
8
+ scope: Scope<ContextValueType>;
9
+ children: React.ReactNode;
10
+ }): JSX.Element;
11
+ displayName: string;
12
+ }, (consumerName: string, scope: Scope<ContextValueType | undefined>) => ContextValueType], createSwitchScope: import("@radix-ui/react-context").CreateScope;
13
+ type SwitchContextValue = {
14
+ checked: boolean;
15
+ disabled?: boolean;
16
+ };
17
+ export declare const SwitchProvider: {
18
+ (props: SwitchContextValue & {
19
+ scope: Scope<SwitchContextValue>;
20
+ children: React.ReactNode;
21
+ }): JSX.Element;
22
+ displayName: string;
23
+ }, useSwitchContext: (consumerName: string, scope: Scope<SwitchContextValue | undefined>) => SwitchContextValue;
24
+ type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
25
+ interface SwitchProps extends PrimitiveButtonProps {
26
+ checked?: boolean;
27
+ defaultChecked?: boolean;
28
+ required?: boolean;
29
+ onCheckedChange?(checked: boolean): void;
30
+ }
31
+ type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
32
+ interface SwitchThumbProps extends PrimitiveSpanProps {
33
+ }
34
+ declare const SwitchThumb: React.ForwardRefExoticComponent<SwitchThumbProps & React.RefAttributes<HTMLSpanElement>>;
35
+ declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
36
+ export { Switch, SwitchThumb };
37
+ export type { SwitchProps, SwitchThumbProps };
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as SwitchPrimitives from "@radix-ui/react-switch";
4
+ import { createContextScope } from "@radix-ui/react-context";
5
+ import { Primitive } from "@radix-ui/react-primitive";
6
+ import { cn } from "@/lib/utils";
7
+ const SWITCH_NAME = "Switch";
8
+ export const [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);
9
+ export const [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
10
+ function getState(checked) {
11
+ return checked ? "checked" : "unchecked";
12
+ }
13
+ /* -------------------------------------------------------------------------------------------------
14
+ * SwitchThumb
15
+ * -----------------------------------------------------------------------------------------------*/
16
+ const THUMB_NAME = "SwitchThumb";
17
+ const SwitchThumb = React.forwardRef((props, forwardedRef) => {
18
+ const { __scopeSwitch, ...thumbProps } = props;
19
+ const context = useSwitchContext(THUMB_NAME, __scopeSwitch);
20
+ return (_jsx(Primitive.span, { "data-state": getState(context.checked), "data-disabled": context.disabled ? "" : undefined, ...thumbProps, ref: forwardedRef }));
21
+ });
22
+ SwitchThumb.displayName = THUMB_NAME;
23
+ /* ---------------------------------------------------------------------------------------------- */
24
+ const Switch = React.forwardRef(({ className, ...props }, ref) => (_jsx(SwitchPrimitives.Root, { className: cn("peer inline-flex h-5 w-10 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-default disabled:opacity-20 data-[state=checked]:bg-pink-500 data-[state=unchecked]:bg-gray-400", className), ...props, ref: ref, children: _jsx(SwitchPrimitives.Thumb, { className: cn("pointer-events-none relative cik before:content-[''] before:absolute before:w-1.5 before:h-1.5 before:rounded-full before:bg-pink-600 before:-translate-x-1/2 before:translate-y-1 disabled:opacity-20 before:data-[state=unchecked]:bg-gray-400 block h-3.5 w-3.5 bg-white rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0.5") }) })));
25
+ Switch.displayName = SwitchPrimitives.Root.displayName;
26
+ export { Switch, SwitchThumb };
@@ -0,0 +1,2 @@
1
+ export { Switch, SwitchThumb } from "./Switch";
2
+ export type { SwitchProps, SwitchThumbProps } from "./Switch";
@@ -0,0 +1 @@
1
+ export { Switch, SwitchThumb } from "./Switch";
@@ -0,0 +1,10 @@
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, };
@@ -0,0 +1,20 @@
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("div", { className: "relative w-full overflow-auto", children: _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("[&_tr]:border-b", 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-muted/50 font-medium [&>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 transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className), ...props })));
13
+ TableRow.displayName = "TableRow";
14
+ const TableHead = React.forwardRef(({ className, ...props }, ref) => (_jsx("th", { ref: ref, className: cn("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&: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-4 align-middle [&: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-muted-foreground", className), ...props })));
19
+ TableCaption.displayName = "TableCaption";
20
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
+ declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
4
+ declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
5
+ import { cn } from "@/lib/utils";
6
+ const Tabs = TabsPrimitive.Root;
7
+ const TabsList = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.List, { ref: ref, className: cn("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", className), ...props })));
8
+ TabsList.displayName = TabsPrimitive.List.displayName;
9
+ const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Trigger, { ref: ref, className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", className), ...props })));
10
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
11
+ const TabsContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Content, { ref: ref, className: cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className), ...props })));
12
+ TabsContent.displayName = TabsPrimitive.Content.displayName;
13
+ export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
3
+ }
4
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
5
+ export { Textarea };
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "@/lib/utils";
3
+ import React from "react";
4
+ const Textarea = React.forwardRef(({ className, ...props }, ref) => {
5
+ return (_jsx("textarea", { className: cn("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className), ref: ref, ...props }));
6
+ });
7
+ Textarea.displayName = "Textarea";
8
+ export { Textarea };
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import * as ToastPrimitives from "@radix-ui/react-toast";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
5
+ declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
+ declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
7
+ variant?: "default" | "destructive" | null | undefined;
8
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
9
+ declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
10
+ declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
11
+ declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
14
+ type ToastActionElement = React.ReactElement<typeof ToastAction>;
15
+ export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as ToastPrimitives from "@radix-ui/react-toast";
4
+ import { cva } from "class-variance-authority";
5
+ import { X } from "lucide-react";
6
+ import { cn } from "@/lib/utils";
7
+ const ToastProvider = ToastPrimitives.Provider;
8
+ const ToastViewport = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Viewport, { ref: ref, className: cn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", className), ...props })));
9
+ ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
10
+ const toastVariants = cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", {
11
+ variants: {
12
+ variant: {
13
+ default: "border bg-background text-foreground",
14
+ destructive: "destructive group border-destructive bg-destructive text-destructive-foreground",
15
+ },
16
+ },
17
+ defaultVariants: {
18
+ variant: "default",
19
+ },
20
+ });
21
+ const Toast = React.forwardRef(({ className, variant, ...props }, ref) => {
22
+ return (_jsx(ToastPrimitives.Root, { ref: ref, className: cn(toastVariants({ variant }), className), ...props }));
23
+ });
24
+ Toast.displayName = ToastPrimitives.Root.displayName;
25
+ const ToastAction = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Action, { ref: ref, className: cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", className), ...props })));
26
+ ToastAction.displayName = ToastPrimitives.Action.displayName;
27
+ const ToastClose = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Close, { ref: ref, className: cn("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", className), "toast-close": "", ...props, children: _jsx(X, { className: "h-4 w-4" }) })));
28
+ ToastClose.displayName = ToastPrimitives.Close.displayName;
29
+ const ToastTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Title, { ref: ref, className: cn("text-sm font-semibold", className), ...props })));
30
+ ToastTitle.displayName = ToastPrimitives.Title.displayName;
31
+ const ToastDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Description, { ref: ref, className: cn("text-sm opacity-90", className), ...props })));
32
+ ToastDescription.displayName = ToastPrimitives.Description.displayName;
33
+ export { ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
@@ -0,0 +1 @@
1
+ export declare function Toaster(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, } from "@/src/components/Toast/Toast";
4
+ import { useToast } from "@/src/components/Toast/use-toast";
5
+ export function Toaster() {
6
+ const { toasts } = useToast();
7
+ return (_jsxs(ToastProvider, { children: [toasts.map(function ({ id, title, description, action, ...props }) {
8
+ return (_jsxs(Toast, { ...props, children: [_jsxs("div", { className: "grid gap-1", children: [title && _jsx(ToastTitle, { children: title }), description && (_jsx(ToastDescription, { children: description }))] }), action, _jsx(ToastClose, {})] }, id));
9
+ }), _jsx(ToastViewport, {})] }));
10
+ }
@@ -0,0 +1,44 @@
1
+ import * as React from "react";
2
+ import type { ToastActionElement, ToastProps } from "@/src/components/Toast/Toast";
3
+ type ToasterToast = ToastProps & {
4
+ id: string;
5
+ title?: React.ReactNode;
6
+ description?: React.ReactNode;
7
+ action?: ToastActionElement;
8
+ };
9
+ declare const actionTypes: {
10
+ readonly ADD_TOAST: "ADD_TOAST";
11
+ readonly UPDATE_TOAST: "UPDATE_TOAST";
12
+ readonly DISMISS_TOAST: "DISMISS_TOAST";
13
+ readonly REMOVE_TOAST: "REMOVE_TOAST";
14
+ };
15
+ type ActionType = typeof actionTypes;
16
+ type Action = {
17
+ type: ActionType["ADD_TOAST"];
18
+ toast: ToasterToast;
19
+ } | {
20
+ type: ActionType["UPDATE_TOAST"];
21
+ toast: Partial<ToasterToast>;
22
+ } | {
23
+ type: ActionType["DISMISS_TOAST"];
24
+ toastId?: ToasterToast["id"];
25
+ } | {
26
+ type: ActionType["REMOVE_TOAST"];
27
+ toastId?: ToasterToast["id"];
28
+ };
29
+ interface State {
30
+ toasts: ToasterToast[];
31
+ }
32
+ export declare const reducer: (state: State, action: Action) => State;
33
+ type Toast = Omit<ToasterToast, "id">;
34
+ declare function toast({ ...props }: Toast): {
35
+ id: string;
36
+ dismiss: () => void;
37
+ update: (props: ToasterToast) => void;
38
+ };
39
+ declare function useToast(): {
40
+ toast: typeof toast;
41
+ dismiss: (toastId?: string) => void;
42
+ toasts: ToasterToast[];
43
+ };
44
+ export { useToast, toast };