@sqlrooms/ui 0.0.0

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 (164) hide show
  1. package/.turbo/turbo-build.log +8 -0
  2. package/.turbo/turbo-lint.log +10 -0
  3. package/CHANGELOG.md +8 -0
  4. package/LICENSE.md +9 -0
  5. package/components.json +21 -0
  6. package/dist/components/DefaultErrorBoundary.d.ts +2 -0
  7. package/dist/components/DefaultErrorBoundary.d.ts.map +1 -0
  8. package/dist/components/DefaultErrorBoundary.js +1 -0
  9. package/dist/components/ProgressModal.d.ts +10 -0
  10. package/dist/components/ProgressModal.d.ts.map +1 -0
  11. package/dist/components/ProgressModal.js +7 -0
  12. package/dist/components/accordion.d.ts +8 -0
  13. package/dist/components/accordion.d.ts.map +1 -0
  14. package/dist/components/accordion.js +13 -0
  15. package/dist/components/alert.d.ts +9 -0
  16. package/dist/components/alert.d.ts.map +1 -0
  17. package/dist/components/alert.js +22 -0
  18. package/dist/components/badge.d.ts +10 -0
  19. package/dist/components/badge.d.ts.map +1 -0
  20. package/dist/components/badge.js +20 -0
  21. package/dist/components/breadcrumb.d.ts +20 -0
  22. package/dist/components/breadcrumb.d.ts.map +1 -0
  23. package/dist/components/breadcrumb.js +23 -0
  24. package/dist/components/button.d.ts +12 -0
  25. package/dist/components/button.d.ts.map +1 -0
  26. package/dist/components/button.js +33 -0
  27. package/dist/components/card.d.ts +9 -0
  28. package/dist/components/card.d.ts.map +1 -0
  29. package/dist/components/card.js +16 -0
  30. package/dist/components/checkbox.d.ts +5 -0
  31. package/dist/components/checkbox.d.ts.map +1 -0
  32. package/dist/components/checkbox.js +8 -0
  33. package/dist/components/dialog.d.ts +20 -0
  34. package/dist/components/dialog.d.ts.map +1 -0
  35. package/dist/components/dialog.js +22 -0
  36. package/dist/components/dropdown-menu.d.ts +28 -0
  37. package/dist/components/dropdown-menu.d.ts.map +1 -0
  38. package/dist/components/dropdown-menu.js +35 -0
  39. package/dist/components/editable-text.d.ts +53 -0
  40. package/dist/components/editable-text.d.ts.map +1 -0
  41. package/dist/components/editable-text.js +87 -0
  42. package/dist/components/error-boundary.d.ts +19 -0
  43. package/dist/components/error-boundary.d.ts.map +1 -0
  44. package/dist/components/error-boundary.js +26 -0
  45. package/dist/components/error-pane.d.ts +13 -0
  46. package/dist/components/error-pane.d.ts.map +1 -0
  47. package/dist/components/error-pane.js +12 -0
  48. package/dist/components/form.d.ts +24 -0
  49. package/dist/components/form.d.ts.map +1 -0
  50. package/dist/components/form.js +62 -0
  51. package/dist/components/index.d.ts +2 -0
  52. package/dist/components/index.d.ts.map +1 -0
  53. package/dist/components/index.js +1 -0
  54. package/dist/components/input.d.ts +4 -0
  55. package/dist/components/input.d.ts.map +1 -0
  56. package/dist/components/input.js +8 -0
  57. package/dist/components/label.d.ts +6 -0
  58. package/dist/components/label.d.ts.map +1 -0
  59. package/dist/components/label.js +9 -0
  60. package/dist/components/popover.d.ts +8 -0
  61. package/dist/components/popover.d.ts.map +1 -0
  62. package/dist/components/popover.js +10 -0
  63. package/dist/components/progress-modal.d.ts +10 -0
  64. package/dist/components/progress-modal.d.ts.map +1 -0
  65. package/dist/components/progress-modal.js +8 -0
  66. package/dist/components/progress.d.ts +5 -0
  67. package/dist/components/progress.d.ts.map +1 -0
  68. package/dist/components/progress.js +7 -0
  69. package/dist/components/resizable.d.ts +24 -0
  70. package/dist/components/resizable.d.ts.map +1 -0
  71. package/dist/components/resizable.js +8 -0
  72. package/dist/components/select.d.ts +14 -0
  73. package/dist/components/select.d.ts.map +1 -0
  74. package/dist/components/select.js +26 -0
  75. package/dist/components/skeleton-pane.d.ts +10 -0
  76. package/dist/components/skeleton-pane.d.ts.map +1 -0
  77. package/dist/components/skeleton-pane.js +17 -0
  78. package/dist/components/skeleton.d.ts +3 -0
  79. package/dist/components/skeleton.d.ts.map +1 -0
  80. package/dist/components/skeleton.js +6 -0
  81. package/dist/components/spinner-pane.d.ts +10 -0
  82. package/dist/components/spinner-pane.d.ts.map +1 -0
  83. package/dist/components/spinner-pane.js +17 -0
  84. package/dist/components/spinner.d.ts +8 -0
  85. package/dist/components/spinner.d.ts.map +1 -0
  86. package/dist/components/spinner.js +9 -0
  87. package/dist/components/switch.d.ts +5 -0
  88. package/dist/components/switch.d.ts.map +1 -0
  89. package/dist/components/switch.js +7 -0
  90. package/dist/components/table.d.ts +20 -0
  91. package/dist/components/table.d.ts.map +1 -0
  92. package/dist/components/table.js +20 -0
  93. package/dist/components/tabs.d.ts +8 -0
  94. package/dist/components/tabs.d.ts.map +1 -0
  95. package/dist/components/tabs.js +12 -0
  96. package/dist/components/textarea.d.ts +4 -0
  97. package/dist/components/textarea.d.ts.map +1 -0
  98. package/dist/components/textarea.js +8 -0
  99. package/dist/components/toast.d.ts +16 -0
  100. package/dist/components/toast.d.ts.map +1 -0
  101. package/dist/components/toast.js +33 -0
  102. package/dist/components/toaster.d.ts +2 -0
  103. package/dist/components/toaster.d.ts.map +1 -0
  104. package/dist/components/toaster.js +9 -0
  105. package/dist/components/tooltip.d.ts +8 -0
  106. package/dist/components/tooltip.d.ts.map +1 -0
  107. package/dist/components/tooltip.js +10 -0
  108. package/dist/hooks/use-toast.d.ts +45 -0
  109. package/dist/hooks/use-toast.d.ts.map +1 -0
  110. package/dist/hooks/use-toast.js +128 -0
  111. package/dist/hooks/useDisclosure.d.ts +9 -0
  112. package/dist/hooks/useDisclosure.d.ts.map +1 -0
  113. package/dist/hooks/useDisclosure.js +14 -0
  114. package/dist/index.d.ts +36 -0
  115. package/dist/index.d.ts.map +1 -0
  116. package/dist/index.js +35 -0
  117. package/dist/lib/utils.d.ts +3 -0
  118. package/dist/lib/utils.d.ts.map +1 -0
  119. package/dist/lib/utils.js +5 -0
  120. package/dist/tailwind-preset.css +68 -0
  121. package/dist/tailwind-preset.d.ts +5 -0
  122. package/dist/tailwind-preset.d.ts.map +1 -0
  123. package/dist/tailwind-preset.js +50 -0
  124. package/dist/tsconfig.tsbuildinfo +1 -0
  125. package/eslint.config.js +4 -0
  126. package/package.json +59 -0
  127. package/src/components/accordion.tsx +55 -0
  128. package/src/components/alert.tsx +59 -0
  129. package/src/components/badge.tsx +34 -0
  130. package/src/components/breadcrumb.tsx +115 -0
  131. package/src/components/button.tsx +55 -0
  132. package/src/components/card.tsx +76 -0
  133. package/src/components/checkbox.tsx +28 -0
  134. package/src/components/dialog.tsx +120 -0
  135. package/src/components/dropdown-menu.tsx +199 -0
  136. package/src/components/editable-text.tsx +199 -0
  137. package/src/components/error-boundary.tsx +48 -0
  138. package/src/components/error-pane.tsx +81 -0
  139. package/src/components/form.tsx +176 -0
  140. package/src/components/input.tsx +22 -0
  141. package/src/components/label.tsx +24 -0
  142. package/src/components/popover.tsx +31 -0
  143. package/src/components/progress-modal.tsx +33 -0
  144. package/src/components/progress.tsx +26 -0
  145. package/src/components/resizable.tsx +43 -0
  146. package/src/components/select.tsx +157 -0
  147. package/src/components/skeleton-pane.tsx +45 -0
  148. package/src/components/skeleton.tsx +12 -0
  149. package/src/components/spinner-pane.tsx +44 -0
  150. package/src/components/spinner.tsx +16 -0
  151. package/src/components/switch.tsx +27 -0
  152. package/src/components/table.tsx +136 -0
  153. package/src/components/tabs.tsx +53 -0
  154. package/src/components/textarea.tsx +21 -0
  155. package/src/components/toast.tsx +127 -0
  156. package/src/components/toaster.tsx +33 -0
  157. package/src/components/tooltip.tsx +29 -0
  158. package/src/hooks/use-toast.ts +191 -0
  159. package/src/hooks/useDisclosure.ts +26 -0
  160. package/src/index.ts +35 -0
  161. package/src/lib/utils.ts +6 -0
  162. package/src/tailwind-preset.css +68 -0
  163. package/src/tailwind-preset.ts +55 -0
  164. package/tsconfig.json +12 -0
@@ -0,0 +1,8 @@
1
+
2
+ > @sqlrooms/ui@0.0.0 build /Users/ilya/Workspace/sqlrooms/packages/ui
3
+ > tsc && npm run copy-tailwind-preset
4
+
5
+
6
+ > @sqlrooms/ui@0.0.0 copy-tailwind-preset
7
+ > cp src/tailwind-preset.css dist/tailwind-preset.css
8
+
@@ -0,0 +1,10 @@
1
+
2
+ > @sqlrooms/ui@0.0.0 lint /Users/ilya/Workspace/sqlrooms/packages/ui
3
+ > eslint .
4
+
5
+
6
+ /Users/ilya/Workspace/sqlrooms/packages/ui/src/hooks/use-toast.ts
7
+ 18:7 warning 'actionTypes' is assigned a value but only used as a type @typescript-eslint/no-unused-vars
8
+
9
+ ✖ 1 problem (0 errors, 1 warning)
10
+
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+
7
+
8
+ **Note:** Version bump only for package @sqlrooms/ui
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright 2025 Ilya Boyandin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": false,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "src/tailwind-preset.ts",
8
+ "css": "src/index.css",
9
+ "baseColor": "zinc",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "aliases": {
14
+ "components": "@/ui/components",
15
+ "utils": "@/ui/lib/utils",
16
+ "hooks": "@/ui/hooks",
17
+ "lib": "@/ui/lib",
18
+ "ui": "@/ui/components"
19
+ },
20
+ "iconLibrary": "lucide"
21
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DefaultErrorBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/components/DefaultErrorBoundary.tsx"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ type Props = {
3
+ isOpen: boolean;
4
+ title?: string;
5
+ loadingStage?: string;
6
+ progress?: number;
7
+ };
8
+ declare const ProgressModal: FC<Props>;
9
+ export default ProgressModal;
10
+ //# sourceMappingURL=ProgressModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProgressModal.d.ts","sourceRoot":"","sources":["../../src/components/ProgressModal.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AAEzB,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,KAAK,CAmB5B,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Dialog, DialogContent, DialogHeader, DialogTitle, Progress, } from '@sqlrooms/ui';
3
+ const ProgressModal = (props) => {
4
+ const { isOpen, title, loadingStage, progress } = props;
5
+ return (_jsx(Dialog, { open: isOpen, onOpenChange: () => { }, children: _jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: title ?? '' }) }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Progress, { value: progress, className: "w-full" }), _jsxs("div", { className: "flex justify-between text-sm text-muted-foreground", children: [_jsx("span", { children: loadingStage ?? '' }), progress ? _jsxs("span", { children: [progress, "%"] }) : null] })] })] }) }));
6
+ };
7
+ export default ProgressModal;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
+ declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
4
+ declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
8
+ //# sourceMappingURL=accordion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../src/components/accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAKhE,QAAA,MAAM,SAAS,8JAA0B,CAAC;AAE1C,QAAA,MAAM,aAAa,iKASjB,CAAC;AAGH,QAAA,MAAM,gBAAgB,0KAiBpB,CAAC;AAGH,QAAA,MAAM,gBAAgB,oKAWpB,CAAC;AAGH,OAAO,EAAC,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
4
+ import { ChevronDown } from 'lucide-react';
5
+ import { cn } from '../lib/utils';
6
+ const Accordion = AccordionPrimitive.Root;
7
+ const AccordionItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(AccordionPrimitive.Item, { ref: ref, className: cn('border-b', className), ...props })));
8
+ AccordionItem.displayName = 'AccordionItem';
9
+ const AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { ref: ref, className: cn('flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180', className), ...props, children: [children, _jsx(ChevronDown, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })] }) })));
10
+ AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
11
+ const AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsx(AccordionPrimitive.Content, { ref: ref, className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", ...props, children: _jsx("div", { className: cn('pb-4 pt-0', className), children: children }) })));
12
+ AccordionContent.displayName = AccordionPrimitive.Content.displayName;
13
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
4
+ variant?: "default" | "destructive" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
7
+ declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
8
+ export { Alert, AlertTitle, AlertDescription };
9
+ //# sourceMappingURL=alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAM,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAoBhE,QAAA,MAAM,KAAK;;sHAUT,CAAC;AAGH,QAAA,MAAM,UAAU,uHASd,CAAC;AAGH,QAAA,MAAM,gBAAgB,yHASpB,CAAC;AAGH,OAAO,EAAC,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx } 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 alertVariants = cva('relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7', {
6
+ variants: {
7
+ variant: {
8
+ default: 'bg-background text-foreground',
9
+ destructive: 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',
10
+ },
11
+ },
12
+ defaultVariants: {
13
+ variant: 'default',
14
+ },
15
+ });
16
+ const Alert = React.forwardRef(({ className, variant, ...props }, ref) => (_jsx("div", { ref: ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props })));
17
+ Alert.displayName = 'Alert';
18
+ const AlertTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("h5", { ref: ref, className: cn('mb-1 font-medium leading-none tracking-tight', className), ...props })));
19
+ AlertTitle.displayName = 'AlertTitle';
20
+ const AlertDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('text-sm [&_p]:leading-relaxed', className), ...props })));
21
+ AlertDescription.displayName = 'AlertDescription';
22
+ export { Alert, AlertTitle, AlertDescription };
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "secondary" | "outline" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
+ }
8
+ declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
9
+ export { Badge, badgeVariants };
10
+ //# sourceMappingURL=badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAM,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAIhE,QAAA,MAAM,aAAa;;8EAkBlB,CAAC;AAEF,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEzC,iBAAS,KAAK,CAAC,EAAC,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAC,EAAE,UAAU,2CAExD;AAED,OAAO,EAAC,KAAK,EAAE,aAAa,EAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from 'class-variance-authority';
3
+ import { cn } from '../lib/utils';
4
+ const badgeVariants = cva('inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', {
5
+ variants: {
6
+ variant: {
7
+ default: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',
8
+ secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
9
+ destructive: 'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',
10
+ outline: 'text-foreground',
11
+ },
12
+ },
13
+ defaultVariants: {
14
+ variant: 'default',
15
+ },
16
+ });
17
+ function Badge({ className, variant, ...props }) {
18
+ return _jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
19
+ }
20
+ export { Badge, badgeVariants };
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
3
+ separator?: React.ReactNode;
4
+ } & React.RefAttributes<HTMLElement>>;
5
+ declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
+ declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
7
+ declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
8
+ asChild?: boolean;
9
+ } & React.RefAttributes<HTMLAnchorElement>>;
10
+ declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
11
+ declare const BreadcrumbSeparator: {
12
+ ({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
13
+ displayName: string;
14
+ };
15
+ declare const BreadcrumbEllipsis: {
16
+ ({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
17
+ displayName: string;
18
+ };
19
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
20
+ //# sourceMappingURL=breadcrumb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/components/breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,QAAA,MAAM,UAAU;gBAGA,KAAK,CAAC,SAAS;qCAE6C,CAAC;AAG7E,QAAA,MAAM,cAAc,2KAYlB,CAAC;AAGH,QAAA,MAAM,cAAc,kKASlB,CAAC;AAGH,QAAA,MAAM,cAAc;cAGN,OAAO;2CAYnB,CAAC;AAGH,QAAA,MAAM,cAAc,sKAYlB,CAAC;AAGH,QAAA,MAAM,mBAAmB;wCAItB,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC;;CAS5B,CAAC;AAGF,QAAA,MAAM,kBAAkB;8BAGrB,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;;CAU9B,CAAC;AAGF,OAAO,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { Slot } from '@radix-ui/react-slot';
4
+ import { ChevronRight, MoreHorizontal } from 'lucide-react';
5
+ import { cn } from '../lib/utils';
6
+ const Breadcrumb = React.forwardRef(({ ...props }, ref) => _jsx("nav", { ref: ref, "aria-label": "breadcrumb", ...props }));
7
+ Breadcrumb.displayName = 'Breadcrumb';
8
+ const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => (_jsx("ol", { ref: ref, className: cn('flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5', className), ...props })));
9
+ BreadcrumbList.displayName = 'BreadcrumbList';
10
+ const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => (_jsx("li", { ref: ref, className: cn('inline-flex items-center gap-1.5', className), ...props })));
11
+ BreadcrumbItem.displayName = 'BreadcrumbItem';
12
+ const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
13
+ const Comp = asChild ? Slot : 'a';
14
+ return (_jsx(Comp, { ref: ref, className: cn('transition-colors hover:text-foreground', className), ...props }));
15
+ });
16
+ BreadcrumbLink.displayName = 'BreadcrumbLink';
17
+ const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => (_jsx("span", { ref: ref, role: "link", "aria-disabled": "true", "aria-current": "page", className: cn('font-normal text-foreground', className), ...props })));
18
+ BreadcrumbPage.displayName = 'BreadcrumbPage';
19
+ const BreadcrumbSeparator = ({ children, className, ...props }) => (_jsx("li", { role: "presentation", "aria-hidden": "true", className: cn('[&>svg]:w-3.5 [&>svg]:h-3.5', className), ...props, children: children ?? _jsx(ChevronRight, {}) }));
20
+ BreadcrumbSeparator.displayName = 'BreadcrumbSeparator';
21
+ const BreadcrumbEllipsis = ({ className, ...props }) => (_jsxs("span", { role: "presentation", "aria-hidden": "true", className: cn('flex h-9 w-9 items-center justify-center', className), ...props, children: [_jsx(MoreHorizontal, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "More" })] }));
22
+ BreadcrumbEllipsis.displayName = 'BreadcrumbElipssis';
23
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ asChild?: boolean;
9
+ }
10
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export { Button, buttonVariants };
12
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAM,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAGhE,QAAA,MAAM,cAAc;;;8EA2BnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,uFAWX,CAAC;AAGF,OAAO,EAAC,MAAM,EAAE,cAAc,EAAC,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { Slot } from '@radix-ui/react-slot';
4
+ import { cva } from 'class-variance-authority';
5
+ import { cn } from '../lib/utils';
6
+ const buttonVariants = cva('inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium 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 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', {
7
+ variants: {
8
+ variant: {
9
+ default: 'bg-primary text-primary-foreground hover:bg-primary/90',
10
+ destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
11
+ outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
12
+ secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
13
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
14
+ link: 'text-primary underline-offset-4 hover:underline',
15
+ },
16
+ size: {
17
+ default: 'h-10 px-4 py-2',
18
+ sm: 'h-9 rounded-md px-3',
19
+ lg: 'h-11 rounded-md px-8',
20
+ icon: 'h-10 w-10',
21
+ },
22
+ },
23
+ defaultVariants: {
24
+ variant: 'default',
25
+ size: 'default',
26
+ },
27
+ });
28
+ const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
29
+ const Comp = asChild ? Slot : 'button';
30
+ return (_jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props }));
31
+ });
32
+ Button.displayName = 'Button_';
33
+ export { Button, buttonVariants };
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
+ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
8
+ export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
9
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,IAAI,6GAYR,CAAC;AAGH,QAAA,MAAM,UAAU,6GASd,CAAC;AAGH,QAAA,MAAM,SAAS,6GASb,CAAC;AAGH,QAAA,MAAM,eAAe,6GASnB,CAAC;AAGH,QAAA,MAAM,WAAW,6GAKf,CAAC;AAGH,QAAA,MAAM,UAAU,6GASd,CAAC;AAGH,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { cn } from '../lib/utils';
4
+ const Card = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('rounded-xl border bg-card text-card-foreground shadow', className), ...props })));
5
+ Card.displayName = 'Card';
6
+ const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('flex flex-col space-y-1.5 p-6', className), ...props })));
7
+ CardHeader.displayName = 'CardHeader';
8
+ const CardTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('font-semibold leading-none tracking-tight', className), ...props })));
9
+ CardTitle.displayName = 'CardTitle';
10
+ const CardDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('text-sm text-muted-foreground', className), ...props })));
11
+ CardDescription.displayName = 'CardDescription';
12
+ const CardContent = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('p-6 pt-0', className), ...props })));
13
+ CardContent.displayName = 'CardContent';
14
+ const CardFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('flex items-center p-6 pt-0', className), ...props })));
15
+ CardFooter.displayName = 'CardFooter';
16
+ export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
+ declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export { Checkbox };
5
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAK9D,QAAA,MAAM,QAAQ,iKAkBZ,CAAC;AAGH,OAAO,EAAC,QAAQ,EAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
4
+ import { Check } from 'lucide-react';
5
+ import { cn } from '../lib/utils';
6
+ const Checkbox = React.forwardRef(({ className, ...props }, ref) => (_jsx(CheckboxPrimitive.Root, { ref: ref, className: cn('peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground', className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { className: cn('flex items-center justify-center text-current'), children: _jsx(Check, { className: "h-4 w-4" }) }) })));
7
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
8
+ export { Checkbox };
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DialogHeader: {
10
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
11
+ displayName: string;
12
+ };
13
+ declare const DialogFooter: {
14
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
17
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
18
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
19
+ export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
20
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAK1D,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,QAAA,MAAM,aAAa,8GAA0B,CAAC;AAE9C,QAAA,MAAM,YAAY,6CAAyB,CAAC;AAE5C,QAAA,MAAM,WAAW,4GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,8JAYjB,CAAC;AAGH,QAAA,MAAM,aAAa,8JAqBjB,CAAC;AAGH,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,WAAW,oKAYf,CAAC;AAGH,QAAA,MAAM,iBAAiB,8KASrB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+ import { X } from 'lucide-react';
5
+ import { cn } from '../lib/utils';
6
+ const Dialog = DialogPrimitive.Root;
7
+ const DialogTrigger = DialogPrimitive.Trigger;
8
+ const DialogPortal = DialogPrimitive.Portal;
9
+ const DialogClose = DialogPrimitive.Close;
10
+ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, 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 })));
11
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
12
+ const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn('fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg', className), ...props, children: [children, _jsxs(DialogPrimitive.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-accent data-[state=open]:text-muted-foreground", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
13
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
14
+ const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col space-y-1.5 text-center sm:text-left', className), ...props }));
15
+ DialogHeader.displayName = 'DialogHeader';
16
+ const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
17
+ DialogFooter.displayName = 'DialogFooter';
18
+ const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn('text-lg font-semibold leading-none tracking-tight', className), ...props })));
19
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
20
+ const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn('text-sm text-muted-foreground', className), ...props })));
21
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
22
+ export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -0,0 +1,28 @@
1
+ import * as React from 'react';
2
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
4
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
7
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
8
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
+ inset?: boolean;
16
+ } & React.RefAttributes<HTMLDivElement>>;
17
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
+ inset?: boolean;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const DropdownMenuShortcut: {
24
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
25
+ displayName: string;
26
+ };
27
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
28
+ //# sourceMappingURL=dropdown-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/components/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AAKvE,QAAA,MAAM,YAAY,mDAA6B,CAAC;AAEhD,QAAA,MAAM,mBAAmB,0HAAgC,CAAC;AAE1D,QAAA,MAAM,iBAAiB,qHAA8B,CAAC;AAEtD,QAAA,MAAM,kBAAkB,yDAA+B,CAAC;AAExD,QAAA,MAAM,eAAe,sDAA4B,CAAC;AAElD,QAAA,MAAM,sBAAsB,0HAAmC,CAAC;AAEhE,QAAA,MAAM,sBAAsB;YAGhB,OAAO;wCAejB,CAAC;AAIH,QAAA,MAAM,sBAAsB,6KAY1B,CAAC;AAIH,QAAA,MAAM,mBAAmB,0KAgBvB,CAAC;AAGH,QAAA,MAAM,gBAAgB;YAGV,OAAO;wCAYjB,CAAC;AAGH,QAAA,MAAM,wBAAwB,+KAoB5B,CAAC;AAIH,QAAA,MAAM,qBAAqB,4KAmBzB,CAAC;AAGH,QAAA,MAAM,iBAAiB;YAGX,OAAO;wCAYjB,CAAC;AAGH,QAAA,MAAM,qBAAqB,4KASzB,CAAC;AAGH,QAAA,MAAM,oBAAoB;8BAGvB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAOvC,CAAC;AAGF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
+ import { Check, ChevronRight, Circle } from 'lucide-react';
5
+ import { cn } from '../lib/utils';
6
+ const DropdownMenu = DropdownMenuPrimitive.Root;
7
+ const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
8
+ const DropdownMenuGroup = DropdownMenuPrimitive.Group;
9
+ const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
10
+ const DropdownMenuSub = DropdownMenuPrimitive.Sub;
11
+ const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
12
+ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn('flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', inset && 'pl-8', className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto" })] })));
13
+ DropdownMenuSubTrigger.displayName =
14
+ DropdownMenuPrimitive.SubTrigger.displayName;
15
+ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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', className), ...props })));
16
+ DropdownMenuSubContent.displayName =
17
+ DropdownMenuPrimitive.SubContent.displayName;
18
+ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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', className), ...props }) })));
19
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
20
+ const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Item, { ref: ref, className: cn('relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0', inset && 'pl-8', className), ...props })));
21
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
22
+ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), checked: checked, ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
23
+ DropdownMenuCheckboxItem.displayName =
24
+ DropdownMenuPrimitive.CheckboxItem.displayName;
25
+ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.RadioItem, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
26
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
27
+ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Label, { ref: ref, className: cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className), ...props })));
28
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
29
+ const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, className: cn('-mx-1 my-1 h-px bg-muted', className), ...props })));
30
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
31
+ const DropdownMenuShortcut = ({ className, ...props }) => {
32
+ return (_jsx("span", { className: cn('ml-auto text-xs tracking-widest opacity-60', className), ...props }));
33
+ };
34
+ DropdownMenuShortcut.displayName = 'DropdownMenuShortcut';
35
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
@@ -0,0 +1,53 @@
1
+ import { FC } from 'react';
2
+ /**
3
+ * Component that allows the user to edit a string.
4
+ *
5
+ * The editing mode can be controlled (the mode is managed by the parent component)
6
+ * or uncontrolled (managed by the component itself).
7
+ *
8
+ * Controlled mode example:
9
+ * ```
10
+ * const [text, setText] = useState('');
11
+ * const [isEditing, setEditing] = useState(false);
12
+ * ...
13
+ * <EditableText
14
+ * value={text}
15
+ * onChange={setText}
16
+ * isEditing={isEditing}
17
+ * onEditingChange={setEditing}
18
+ * />
19
+ * ```
20
+ *
21
+ * Uncontrolled mode example:
22
+ * ```
23
+ * const [text, setText] = useState('');
24
+ * ...
25
+ * <EditableText
26
+ * value={text}
27
+ * onChange={setText}
28
+ * defaultEditing={false}
29
+ * />
30
+ * ```
31
+ */
32
+ type Props = {
33
+ className?: string;
34
+ isReadOnly?: boolean;
35
+ value: string;
36
+ minWidth?: number;
37
+ maxWidth?: number;
38
+ placeholder?: string;
39
+ onChange: (text: string) => void;
40
+ /**
41
+ * The editing state when it is initially rendered. Use when you do not need to control its editing state
42
+ * in the parent component.
43
+ **/
44
+ defaultEditing?: boolean;
45
+ /**
46
+ * The controlled editing state of the component. Must be used in conjunction with onEditingChange.
47
+ **/
48
+ isEditing?: boolean;
49
+ onEditingChange?: (isEditing: boolean) => void;
50
+ };
51
+ export declare const EditableText: FC<Props>;
52
+ export {};
53
+ //# sourceMappingURL=editable-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editable-text.d.ts","sourceRoot":"","sources":["../../src/components/editable-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,EAAE,EAA2C,MAAM,OAAO,CAAC;AAKhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEjC;;;QAGI;IACJ,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;QAEI;IACJ,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAChD,CAAC;AAIF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,KAAK,CA0IlC,CAAC"}