@sqlrooms/ui 0.6.0 → 0.8.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.
package/README.md ADDED
@@ -0,0 +1,111 @@
1
+ A comprehensive UI component library for SQLRooms applications, built on top of React and Tailwind CSS. This package provides a collection of reusable, accessible, and customizable components designed to create consistent and beautiful user interfaces.
2
+
3
+ This library is based on [shadcn/ui](https://ui.shadcn.com/), a collection of beautifully designed, accessible components that can be copied and pasted into your apps.
4
+
5
+ ## Features
6
+
7
+ - 🎨 **Modern Design**: Clean, modern components following design best practices
8
+ - ♿ **Accessibility**: Components built with accessibility in mind
9
+ - 🌗 **Theming**: Support for light and dark modes
10
+ - 📱 **Responsive**: Mobile-friendly components that adapt to different screen sizes
11
+ - 🧩 **Composable**: Components designed to work together seamlessly
12
+ - 🔄 **React Hooks**: Useful hooks for common UI patterns
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install @sqlrooms/ui
18
+ # or
19
+ yarn add @sqlrooms/ui
20
+ ```
21
+
22
+ ## Basic Usage
23
+
24
+ ### Using Components
25
+
26
+ ```tsx
27
+ import {Button, Card, Input} from '@sqlrooms/ui';
28
+
29
+ function LoginForm() {
30
+ return (
31
+ <Card className="p-6 max-w-md mx-auto">
32
+ <h2 className="text-2xl font-bold mb-4">Login</h2>
33
+ <form>
34
+ <div className="space-y-4">
35
+ <div>
36
+ <Input type="email" placeholder="Email" required />
37
+ </div>
38
+ <div>
39
+ <Input type="password" placeholder="Password" required />
40
+ </div>
41
+ <Button type="submit" className="w-full">
42
+ Sign In
43
+ </Button>
44
+ </div>
45
+ </form>
46
+ </Card>
47
+ );
48
+ }
49
+ ```
50
+
51
+ ### Using Hooks
52
+
53
+ ```tsx
54
+ import {useToast, useDisclosure} from '@sqlrooms/ui';
55
+
56
+ function MyComponent() {
57
+ const {toast} = useToast();
58
+ const {isOpen, onOpen, onClose} = useDisclosure();
59
+
60
+ const handleAction = () => {
61
+ // Perform some action
62
+ toast({
63
+ title: 'Success!',
64
+ description: 'Your action was completed successfully.',
65
+ variant: 'success',
66
+ });
67
+ onClose();
68
+ };
69
+
70
+ return (
71
+ <div>
72
+ <Button onClick={onOpen}>Open Dialog</Button>
73
+ <Dialog open={isOpen} onOpenChange={onClose}>
74
+ <DialogContent>
75
+ <DialogHeader>
76
+ <DialogTitle>Confirm Action</DialogTitle>
77
+ <DialogDescription>
78
+ Are you sure you want to perform this action?
79
+ </DialogDescription>
80
+ </DialogHeader>
81
+ <DialogFooter>
82
+ <Button variant="outline" onClick={onClose}>
83
+ Cancel
84
+ </Button>
85
+ <Button onClick={handleAction}>Confirm</Button>
86
+ </DialogFooter>
87
+ </DialogContent>
88
+ </Dialog>
89
+ </div>
90
+ );
91
+ }
92
+ ```
93
+
94
+ ## Available Components
95
+
96
+ - **Layout**: Card, Resizable, Tabs
97
+ - **Forms**: Button, Checkbox, Input, Select, Slider, Switch, Textarea
98
+ - **Feedback**: Alert, Progress, Spinner, Toast
99
+ - **Navigation**: Accordion, Breadcrumb, Dropdown Menu
100
+ - **Overlay**: Dialog, Popover, Tooltip
101
+ - **Data Display**: Badge, Table
102
+ - **Utility**: Error Boundary, Theme Switch
103
+
104
+ ## Advanced Features
105
+
106
+ - **Component Composition**: Build complex UIs by composing simple components
107
+ - **Form Handling**: Integrated with React Hook Form for easy form management
108
+ - **Custom Styling**: Extend components with custom styles using Tailwind CSS
109
+ - **Animation**: Smooth transitions and animations for interactive elements
110
+
111
+ For more information, visit the SQLRooms documentation.
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
3
  declare const buttonVariants: (props?: ({
4
4
  variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
5
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | "xs" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
8
  asChild?: boolean;
@@ -1 +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"}
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;;;8EA4BnB,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"}
@@ -18,6 +18,7 @@ const buttonVariants = cva('inline-flex items-center justify-center gap-2 whites
18
18
  sm: 'h-9 rounded-md px-3',
19
19
  lg: 'h-11 rounded-md px-8',
20
20
  icon: 'h-10 w-10',
21
+ xs: 'h-8 rounded-md px-2 text-xs',
21
22
  },
22
23
  },
23
24
  defaultVariants: {
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","source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C,CAAC","sourcesContent":["import * as React from 'react';\nimport {Slot} from '@radix-ui/react-slot';\nimport {cva, type VariantProps} from 'class-variance-authority';\nimport {cn} from '../lib/utils';\n\nconst buttonVariants = cva(\n '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',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90',\n outline:\n 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-10 px-4 py-2',\n sm: 'h-9 rounded-md px-3',\n lg: 'h-11 rounded-md px-8',\n icon: 'h-10 w-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({className, variant, size, asChild = false, ...props}, ref) => {\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp\n className={cn(buttonVariants({variant, size, className}))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = 'Button_';\n\nexport {Button, buttonVariants};\n"]}
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,IAAI,EAAC,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAC,GAAG,EAAoB,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAC,EAAE,EAAC,MAAM,cAAc,CAAC;AAEhC,MAAM,cAAc,GAAG,GAAG,CACxB,0VAA0V,EAC1V;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,wDAAwD;YACjE,WAAW,EACT,oEAAoE;YACtE,OAAO,EACL,gFAAgF;YAClF,SAAS,EACP,8DAA8D;YAChE,KAAK,EAAE,8CAA8C;YACrD,IAAI,EAAE,iDAAiD;SACxD;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,gBAAgB;YACzB,EAAE,EAAE,qBAAqB;YACzB,EAAE,EAAE,sBAAsB;YAC1B,IAAI,EAAE,WAAW;YACjB,EAAE,EAAE,6BAA6B;SAClC;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAC;AAQF,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAC7B,CAAC,EAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,KAAK,EAAC,EAAE,GAAG,EAAE,EAAE;IAC7D,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;IACvC,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAC,CAAC,CAAC,EACzD,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC;AAE/B,OAAO,EAAC,MAAM,EAAE,cAAc,EAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport {Slot} from '@radix-ui/react-slot';\nimport {cva, type VariantProps} from 'class-variance-authority';\nimport {cn} from '../lib/utils';\n\nconst buttonVariants = cva(\n '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',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90',\n outline:\n 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-10 px-4 py-2',\n sm: 'h-9 rounded-md px-3',\n lg: 'h-11 rounded-md px-8',\n icon: 'h-10 w-10',\n xs: 'h-8 rounded-md px-2 text-xs',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({className, variant, size, asChild = false, ...props}, ref) => {\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp\n className={cn(buttonVariants({variant, size, className}))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = 'Button_';\n\nexport {Button, buttonVariants};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"error-pane.d.ts","sourceRoot":"","sources":["../../src/components/error-pane.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACnE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,SAAS,uFA4Dd,CAAC;AAIF,OAAO,EAAC,SAAS,EAAC,CAAC"}
1
+ {"version":3,"file":"error-pane.d.ts","sourceRoot":"","sources":["../../src/components/error-pane.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACnE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,SAAS,uFA8Dd,CAAC;AAIF,OAAO,EAAC,SAAS,EAAC,CAAC"}
@@ -6,7 +6,7 @@ import { cn } from '../lib/utils';
6
6
  import { Button } from './button';
7
7
  const ErrorPane = React.forwardRef(({ className, embed, title = 'Something went wrong', text = `We are sorry, but something unexpected happened. We were notified
8
8
  and will be working on resolving the issue as soon as possible.`, onRetry, actions = false, onGoToStart, ...props }, ref) => {
9
- return (_jsx("div", { ref: ref, className: cn('flex justify-center', className), ...props, children: _jsxs(Alert, { variant: "destructive", className: cn('flex min-h-[200px] max-w-[450px] flex-col items-center justify-center rounded-lg px-6 py-6 text-center', !embed && 'min-w-[350px]'), children: [_jsx("div", { className: "mb-4", children: _jsx(TriangleAlertIcon, { className: "h-8 w-8 text-destructive" }) }), _jsx(AlertTitle, { className: "mb-1 text-xl", children: title }), _jsxs(AlertDescription, { className: "mt-3 max-w-sm px-2", children: [_jsx("p", { className: "mb-5 text-left", children: text }), actions && (_jsx("div", { className: "mt-6 mb-3", children: _jsxs("div", { className: "flex justify-center gap-2", children: [onRetry && (_jsxs(Button, { size: "sm", onClick: onRetry, className: "inline-flex items-center", children: [_jsx(RotateCcwIcon, { className: "mr-2 h-4 w-4" }), "Retry"] })), !embed && onGoToStart && (_jsx(Button, { size: "sm", onClick: onGoToStart, children: "Go to start page" }))] }) }))] })] }) }));
9
+ return (_jsx("div", { ref: ref, className: cn('flex justify-center', className), ...props, children: _jsxs(Alert, { variant: "destructive", className: cn('flex min-h-[200px] max-w-[450px] flex-col items-center justify-center rounded-lg px-6 py-6 text-center', !embed && 'min-w-[350px]'), children: [_jsx("div", { className: "mb-4", children: _jsx(TriangleAlertIcon, { className: "text-destructive h-8 w-8" }) }), _jsx(AlertTitle, { className: "text-foreground mb-1 text-xl", children: title }), _jsxs(AlertDescription, { className: "text-foreground mt-3 max-w-sm px-2", children: [_jsx("p", { className: "mb-5 text-left", children: text }), actions && (_jsx("div", { className: "mb-3 mt-6", children: _jsxs("div", { className: "flex justify-center gap-2", children: [onRetry && (_jsxs(Button, { size: "sm", onClick: onRetry, className: "inline-flex items-center", children: [_jsx(RotateCcwIcon, { className: "mr-2 h-4 w-4" }), "Retry"] })), !embed && onGoToStart && (_jsx(Button, { size: "sm", onClick: onGoToStart, children: "Go to start page" }))] }) }))] })] }) }));
10
10
  });
11
11
  ErrorPane.displayName = 'ErrorPane';
12
12
  export { ErrorPane };
@@ -1 +1 @@
1
- {"version":3,"file":"error-pane.js","sourceRoot":"","sources":["../../src/components/error-pane.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAC,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAC,aAAa,EAAE,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,KAAK,MAAM,OAAO,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,WAAW,GAAG,WAAW,CAAC;AAEpC,OAAO,EAAC,SAAS,EAAC,CAAC","sourcesContent":["import {Alert, AlertDescription, AlertTitle} from './alert';\nimport {RotateCcwIcon, TriangleAlertIcon} from 'lucide-react';\nimport * as React from 'react';\nimport {cn} from '../lib/utils';\nimport {Button} from './button';\n\ninterface ErrorPaneProps extends React.HTMLAttributes<HTMLDivElement> {\n embed?: boolean;\n error?: string | Error | unknown;\n title?: string;\n text?: string;\n onRetry?: () => void;\n onGoToStart?: () => void;\n actions?: boolean;\n}\n\nconst ErrorPane = React.forwardRef<HTMLDivElement, ErrorPaneProps>(\n (\n {\n className,\n embed,\n title = 'Something went wrong',\n text = `We are sorry, but something unexpected happened. We were notified\n and will be working on resolving the issue as soon as possible.`,\n onRetry,\n actions = false,\n onGoToStart,\n ...props\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n className={cn('flex justify-center', className)}\n {...props}\n >\n <Alert\n variant=\"destructive\"\n className={cn(\n 'flex min-h-[200px] max-w-[450px] flex-col items-center justify-center rounded-lg px-6 py-6 text-center',\n !embed && 'min-w-[350px]',\n )}\n >\n <div className=\"mb-4\">\n <TriangleAlertIcon className=\"h-8 w-8 text-destructive\" />\n </div>\n <AlertTitle className=\"mb-1 text-xl\">{title}</AlertTitle>\n <AlertDescription className=\"mt-3 max-w-sm px-2\">\n <p className=\"mb-5 text-left\">{text}</p>\n {actions && (\n <div className=\"mt-6 mb-3\">\n <div className=\"flex justify-center gap-2\">\n {onRetry && (\n <Button\n size=\"sm\"\n onClick={onRetry}\n className=\"inline-flex items-center\"\n >\n <RotateCcwIcon className=\"mr-2 h-4 w-4\" />\n Retry\n </Button>\n )}\n {!embed && onGoToStart && (\n <Button size=\"sm\" onClick={onGoToStart}>\n Go to start page\n </Button>\n )}\n </div>\n </div>\n )}\n </AlertDescription>\n </Alert>\n </div>\n );\n },\n);\n\nErrorPane.displayName = 'ErrorPane';\n\nexport {ErrorPane};\n"]}
1
+ {"version":3,"file":"error-p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S,EAAC,cAAc,GAAG,aAEnC,CACV,EACA,CAAC,KAAK,IAAI,WAAW,IAAI,CACxB,KAAC,MAAM,IAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,WAAW,iCAE7B,CACV,IACG,GACF,CACP,IACgB,IACb,GACJ,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,OAAO,EAAC,SAAS,EAAC,CAAC","sourcesContent":["import {Alert, AlertDescription, AlertTitle} from './alert';\nimport {RotateCcwIcon, TriangleAlertIcon} from 'lucide-react';\nimport * as React from 'react';\nimport {cn} from '../lib/utils';\nimport {Button} from './button';\n\ninterface ErrorPaneProps extends React.HTMLAttributes<HTMLDivElement> {\n embed?: boolean;\n error?: string | Error | unknown;\n title?: string;\n text?: string;\n onRetry?: () => void;\n onGoToStart?: () => void;\n actions?: boolean;\n}\n\nconst ErrorPane = React.forwardRef<HTMLDivElement, ErrorPaneProps>(\n (\n {\n className,\n embed,\n title = 'Something went wrong',\n text = `We are sorry, but something unexpected happened. We were notified\n and will be working on resolving the issue as soon as possible.`,\n onRetry,\n actions = false,\n onGoToStart,\n ...props\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n className={cn('flex justify-center', className)}\n {...props}\n >\n <Alert\n variant=\"destructive\"\n className={cn(\n 'flex min-h-[200px] max-w-[450px] flex-col items-center justify-center rounded-lg px-6 py-6 text-center',\n !embed && 'min-w-[350px]',\n )}\n >\n <div className=\"mb-4\">\n <TriangleAlertIcon className=\"text-destructive h-8 w-8\" />\n </div>\n <AlertTitle className=\"text-foreground mb-1 text-xl\">\n {title}\n </AlertTitle>\n <AlertDescription className=\"text-foreground mt-3 max-w-sm px-2\">\n <p className=\"mb-5 text-left\">{text}</p>\n {actions && (\n <div className=\"mb-3 mt-6\">\n <div className=\"flex justify-center gap-2\">\n {onRetry && (\n <Button\n size=\"sm\"\n onClick={onRetry}\n className=\"inline-flex items-center\"\n >\n <RotateCcwIcon className=\"mr-2 h-4 w-4\" />\n Retry\n </Button>\n )}\n {!embed && onGoToStart && (\n <Button size=\"sm\" onClick={onGoToStart}>\n Go to start page\n </Button>\n )}\n </div>\n </div>\n )}\n </AlertDescription>\n </Alert>\n </div>\n );\n },\n);\n\nErrorPane.displayName = 'ErrorPane';\n\nexport {ErrorPane};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/components/form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAEL,eAAe,EACf,SAAS,EACT,WAAW,EAGZ,MAAM,iBAAiB,CAAC;AAKzB,QAAA,MAAM,IAAI,wNAgFW,MAAQ,GAAE,CAAC,OAAO,AAhFd,CAAC;AAa1B,QAAA,MAAM,SAAS,GACb,YAAY,SAAS,WAAW,gBAChC,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,0CAGpC,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,4CAMtC,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;CAqBjB,CAAC;AAUF,QAAA,MAAM,QAAQ,6GAWZ,CAAC;AAGH,QAAA,MAAM,SAAS,yJAcb,CAAC;AAGH,QAAA,MAAM,WAAW,8JAmBf,CAAC;AAGH,QAAA,MAAM,eAAe,yHAcnB,CAAC;AAGH,QAAA,MAAM,WAAW,yHAqBf,CAAC;AAGH,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACX,SAAS,GACV,CAAC"}
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/components/form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAEL,eAAe,E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d.ts","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAI7D,QAAA,MAAM,mBAAmB,GAAI,yBAG1B,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,UAAU,CAAC,4CAQ5D,CAAC;AAEF,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;sBAyBknE,OAAO;4EAzB9lE,CAAC;AAEhD,QAAA,MAAM,eAAe,GAAI,qCAItB,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,iBAAiB,CAAC,GAAG;IACrE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,4CAcA,CAAC;AAEF,OAAO,EAAC,mBAAmB,EAAE,cAAc,EAAE,eAAe,EAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-toast.d.ts","sourceRoot":"","sources":["../../src/hooks/use-toast.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,kBAAkB,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAKxE,KAAK,YAAY,GAAG,UAAU,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B,CAAC;AAEF,QAAA,MAAM,WAAW;;;;;CAKP,CAAC;AASX,KAAK,UAAU,GAAG,OAAO,WAAW,CAAC;AAErC,KAAK,MAAM,GACP;IACE,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IAC9B,KAAK,EAAE,YAAY,CAAC;CACrB,GACD;IACE,IAAI,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IACjC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CAC9B,GACD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IAAI,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IACjC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;CAC9B,CAAC;AAEN,UAAU,KAAK;IACb,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB;AAoBD,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,EAAE,QAAQ,MAAM,KAAG,KAqDtD,CAAC;AAaF,KAAK,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAEtC,iBAAS,KAAK,CAAC,EAAC,GAAG,KAAK,EAAC,EAAE,KAAK;;;oBAGP,YAAY;EAwBpC;AAED,iBAAS,QAAQ;;wBAgBO,MAAM;YAtIpB,YAAY,EAAE;EAwIvB;AAED,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,CAAC"}
@@ -1,9 +1,39 @@
1
- interface UseDisclosureReturn {
1
+ export interface UseDisclosureReturnValue {
2
2
  isOpen: boolean;
3
3
  onOpen: () => void;
4
4
  onClose: () => void;
5
5
  onToggle: () => void;
6
6
  }
7
- export declare function useDisclosure(initialState?: boolean): UseDisclosureReturn;
8
- export {};
7
+ /**
8
+ * A custom hook for managing disclosure state (open/closed).
9
+ *
10
+ * @param initialState - The initial state of the disclosure (default: false)
11
+ * @returns An object containing the disclosure state and methods to control it
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * import { useDisclosure } from '@your-package/ui';
16
+ *
17
+ * function Modal() {
18
+ * const { isOpen, onOpen, onClose, onToggle } = useDisclosure();
19
+ *
20
+ * return (
21
+ * <>
22
+ * <button onClick={onOpen}>Open Modal</button>
23
+ *
24
+ * {isOpen && (
25
+ * <div className="modal">
26
+ * <div className="modal-content">
27
+ * <h2>Modal Title</h2>
28
+ * <p>Modal content goes here...</p>
29
+ * <button onClick={onClose}>Close</button>
30
+ * </div>
31
+ * </div>
32
+ * )}
33
+ * </>
34
+ * );
35
+ * }
36
+ * ```
37
+ */
38
+ export declare function useDisclosure(initialState?: boolean): UseDisclosureReturnValue;
9
39
  //# sourceMappingURL=useDisclosure.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDisclosure.d.ts","sourceRoot":"","sources":["../../src/hooks/useDisclosure.ts"],"names":[],"mappings":"AAEA,UAAU,mBAAmB;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,aAAa,CAAC,YAAY,UAAQ,GAAG,mBAAmB,CAgBvE"}
1
+ {"version":3,"file":"useDisclosure.d.ts","sourceRoot":"","sources":["../../src/hooks/useDisclosure.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,aAAa,CAAC,YAAY,UAAQ,GAAG,wBAAwB,CAgB5E"}
@@ -1,4 +1,35 @@
1
1
  import { useState, useCallback } from 'react';
2
+ /**
3
+ * A custom hook for managing disclosure state (open/closed).
4
+ *
5
+ * @param initialState - The initial state of the disclosure (default: false)
6
+ * @returns An object containing the disclosure state and methods to control it
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * import { useDisclosure } from '@your-package/ui';
11
+ *
12
+ * function Modal() {
13
+ * const { isOpen, onOpen, onClose, onToggle } = useDisclosure();
14
+ *
15
+ * return (
16
+ * <>
17
+ * <button onClick={onOpen}>Open Modal</button>
18
+ *
19
+ * {isOpen && (
20
+ * <div className="modal">
21
+ * <div className="modal-content">
22
+ * <h2>Modal Title</h2>
23
+ * <p>Modal content goes here...</p>
24
+ * <button onClick={onClose}>Close</button>
25
+ * </div>
26
+ * </div>
27
+ * )}
28
+ * </>
29
+ * );
30
+ * }
31
+ * ```
32
+ */
2
33
  export function useDisclosure(initialState = false) {
3
34
  const [isOpen, setIsOpen] = useState(initialState);
4
35
  const onOpen = useCallback(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"useDisclosure.js","sourceRoot":"","sources":["../../src/hooks/useDisclosure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,WAAW,EAAC,MAAM,OAAO,CAAC;AAS5C,MAAM,UAAU,aAAa,CAAC,YAAY,GAAG,KAAK;IAChD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEnD,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9B,SAAS,CAAC,IAAI,CAAC,CAAC;IAClB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE;QAC/B,SAAS,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QAChC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAC,CAAC;AAC7C,CAAC","sourcesContent":["import {useState, useCallback} from 'react';\n\ninterface UseDisclosureReturn {\n isOpen: boolean;\n onOpen: () => void;\n onClose: () => void;\n onToggle: () => void;\n}\n\nexport function useDisclosure(initialState = false): UseDisclosureReturn {\n const [isOpen, setIsOpen] = useState(initialState);\n\n const onOpen = useCallback(() => {\n setIsOpen(true);\n }, []);\n\n const onClose = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n const onToggle = useCallback(() => {\n setIsOpen((prev) => !prev);\n }, []);\n\n return {isOpen, onOpen, onClose, onToggle};\n}\n"]}
1
+ {"version":3,"file":"useDisclosure.js","sourceRoot":"","sources":["../../src/hooks/useDisclosure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,WAAW,EAAC,MAAM,OAAO,CAAC;AAS5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,UAAU,aAAa,CAAC,YAAY,GAAG,KAAK;IAChD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEnD,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9B,SAAS,CAAC,IAAI,CAAC,CAAC;IAClB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE;QAC/B,SAAS,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QAChC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAC,CAAC;AAC7C,CAAC","sourcesContent":["import {useState, useCallback} from 'react';\n\nexport interface UseDisclosureReturnValue {\n isOpen: boolean;\n onOpen: () => void;\n onClose: () => void;\n onToggle: () => void;\n}\n\n/**\n * A custom hook for managing disclosure state (open/closed).\n *\n * @param initialState - The initial state of the disclosure (default: false)\n * @returns An object containing the disclosure state and methods to control it\n *\n * @example\n * ```tsx\n * import { useDisclosure } from '@your-package/ui';\n *\n * function Modal() {\n * const { isOpen, onOpen, onClose, onToggle } = useDisclosure();\n *\n * return (\n * <>\n * <button onClick={onOpen}>Open Modal</button>\n *\n * {isOpen && (\n * <div className=\"modal\">\n * <div className=\"modal-content\">\n * <h2>Modal Title</h2>\n * <p>Modal content goes here...</p>\n * <button onClick={onClose}>Close</button>\n * </div>\n * </div>\n * )}\n * </>\n * );\n * }\n * ```\n */\nexport function useDisclosure(initialState = false): UseDisclosureReturnValue {\n const [isOpen, setIsOpen] = useState(initialState);\n\n const onOpen = useCallback(() => {\n setIsOpen(true);\n }, []);\n\n const onClose = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n const onToggle = useCallback(() => {\n setIsOpen((prev) => !prev);\n }, []);\n\n return {isOpen, onOpen, onClose, onToggle};\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useRelativeCoordinates.d.ts","sourceRoot":"","sources":["../../src/hooks/useRelativeCoordinates.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,sBAAsB,iBACnB,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,SAGpC,MAAM,KAAK,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAO1C,CAAC"}
1
+ {"version":3,"file":"useRelativeCoordinates.d.ts","sourceRoot":"","sources":["../../src/hooks/useRelativeCoordinates.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,sBAAsB,GACjC,cAAc,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,SAGpC,MAAM,KAAK,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAO1C,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * {@include ../README.md}
3
+ * @packageDocumentation
4
+ */
1
5
  export * from './components/accordion';
2
6
  export * from './components/alert';
3
7
  export * from './components/badge';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * {@include ../README.md}
3
+ * @packageDocumentation
4
+ */
1
5
  export * from './components/accordion';
2
6
  export * from './components/alert';
3
7
  export * from './components/badge';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC","sourcesContent":["export * from './components/accordion';\nexport * from './components/alert';\nexport * from './components/badge';\nexport * from './components/breadcrumb';\nexport * from './components/button';\nexport * from './components/card';\nexport * from './components/checkbox';\nexport * from './components/dialog';\nexport * from './components/dropdown-menu';\nexport * from './components/editable-text';\nexport * from './components/error-boundary';\nexport * from './components/error-pane';\nexport * from './components/form';\nexport * from './components/input';\nexport * from './components/label';\nexport * from './components/popover';\nexport * from './components/progress';\nexport * from './components/progress-modal';\nexport * from './components/resizable';\nexport * from './components/select';\nexport * from './components/skeleton';\nexport * from './components/skeleton-pane';\nexport * from './components/spinner';\nexport * from './components/spinner-pane';\nexport * from './components/switch';\nexport * from './components/theme-switch';\nexport * from './components/table';\nexport * from './components/tabs';\nexport * from './components/textarea';\nexport * from './components/toast';\nexport * from './components/toaster';\nexport * from './components/tooltip';\nexport * from './hooks/use-toast';\nexport * from './hooks/useDisclosure';\nexport * from './hooks/useAspectRatioDimensions';\nexport * from './hooks/useRelativeCoordinates';\nexport * from './lib/utils';\nexport * from './tailwind-preset';\nexport * from './theme/theme-provider';\nexport * from './components/slider';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC","sourcesContent":["/**\n * {@include ../README.md}\n * @packageDocumentation\n */\n\nexport * from './components/accordion';\nexport * from './components/alert';\nexport * from './components/badge';\nexport * from './components/breadcrumb';\nexport * from './components/button';\nexport * from './components/card';\nexport * from './components/checkbox';\nexport * from './components/dialog';\nexport * from './components/dropdown-menu';\nexport * from './components/editable-text';\nexport * from './components/error-boundary';\nexport * from './components/error-pane';\nexport * from './components/form';\nexport * from './components/input';\nexport * from './components/label';\nexport * from './components/popover';\nexport * from './components/progress';\nexport * from './components/progress-modal';\nexport * from './components/resizable';\nexport * from './components/select';\nexport * from './components/skeleton';\nexport * from './components/skeleton-pane';\nexport * from './components/spinner';\nexport * from './components/spinner-pane';\nexport * from './components/switch';\nexport * from './components/theme-switch';\nexport * from './components/table';\nexport * from './components/tabs';\nexport * from './components/textarea';\nexport * from './components/toast';\nexport * from './components/toaster';\nexport * from './components/tooltip';\nexport * from './hooks/use-toast';\nexport * from './hooks/useDisclosure';\nexport * from './hooks/useAspectRatioDimensions';\nexport * from './hooks/useRelativeCoordinates';\nexport * from './lib/utils';\nexport * from './tailwind-preset';\nexport * from './theme/theme-provider';\nexport * from './components/slider';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"tailwind-preset.d.ts","sourceRoot":"","sources":["../src/tailwind-preset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,eAAO,MAAM,sBAAsB,gBAEhC;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,KAAG,OAAO,CAAC,MAAM,CAgDhB,CAAC"}
1
+ {"version":3,"file":"tailwind-preset.d.ts","sourceRoot":"","sources":["../src/tailwind-preset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAInC,eAAO,MAAM,sBAAsB,GAAI,aAEpC;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,KAAG,OAAO,CAAC,MAAM,CAyIhB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import tailwindAnimate from 'tailwindcss-animate';
2
+ import typography from '@tailwindcss/typography';
2
3
  export const sqlroomsTailwindPreset = ({ prefix = '', }) => ({
3
4
  prefix,
4
5
  darkMode: ['class'],
@@ -44,8 +45,97 @@ export const sqlroomsTailwindPreset = ({ prefix = '', }) => ({
44
45
  md: `calc(var(--radius) - 2px)`,
45
46
  sm: 'calc(var(--radius) - 4px)',
46
47
  },
48
+ typography: {
49
+ DEFAULT: {
50
+ css: {
51
+ // Improve spacing and styling for lists
52
+ 'ul, ol': {
53
+ paddingLeft: '1.5em',
54
+ marginTop: '0.75em',
55
+ marginBottom: '0.75em',
56
+ },
57
+ 'ul > li, ol > li': {
58
+ marginTop: '0.25em',
59
+ marginBottom: '0.25em',
60
+ },
61
+ // Better styling for code blocks
62
+ pre: {
63
+ backgroundColor: 'hsl(var(--muted))',
64
+ color: 'hsl(var(--muted-foreground))',
65
+ borderRadius: 'var(--radius)',
66
+ padding: '1em',
67
+ overflowX: 'auto',
68
+ },
69
+ code: {
70
+ backgroundColor: 'hsl(var(--muted))',
71
+ color: 'hsl(var(--muted-foreground))',
72
+ borderRadius: '0.25em',
73
+ padding: '0.2em 0.4em',
74
+ fontSize: '0.875em',
75
+ },
76
+ // Better styling for blockquotes
77
+ blockquote: {
78
+ borderLeftColor: 'hsl(var(--border))',
79
+ fontStyle: 'normal',
80
+ color: 'hsl(var(--muted-foreground))',
81
+ },
82
+ // Harmonize heading styles
83
+ 'h1, h2, h3, h4, h5, h6': {
84
+ color: 'hsl(var(--foreground))',
85
+ fontWeight: '600',
86
+ },
87
+ // Better link styling
88
+ a: {
89
+ color: 'hsl(var(--primary))',
90
+ textDecoration: 'none',
91
+ '&:hover': {
92
+ textDecoration: 'underline',
93
+ },
94
+ },
95
+ // Better table styling
96
+ table: {
97
+ width: '100%',
98
+ tableLayout: 'auto',
99
+ textAlign: 'left',
100
+ borderCollapse: 'collapse',
101
+ },
102
+ th: {
103
+ fontWeight: '600',
104
+ borderBottomWidth: '2px',
105
+ borderColor: 'hsl(var(--border))',
106
+ padding: '0.5em',
107
+ },
108
+ td: {
109
+ borderBottomWidth: '1px',
110
+ borderColor: 'hsl(var(--border))',
111
+ padding: '0.5em',
112
+ },
113
+ },
114
+ },
115
+ // Adjust typography for dark mode
116
+ invert: {
117
+ css: {
118
+ color: 'hsl(var(--foreground))',
119
+ pre: {
120
+ backgroundColor: 'hsl(var(--muted))',
121
+ color: 'hsl(var(--muted-foreground))',
122
+ },
123
+ code: {
124
+ backgroundColor: 'hsl(var(--muted))',
125
+ color: 'hsl(var(--muted-foreground))',
126
+ },
127
+ 'h1, h2, h3, h4, h5, h6': {
128
+ color: 'hsl(var(--foreground))',
129
+ },
130
+ blockquote: {
131
+ borderLeftColor: 'hsl(var(--border))',
132
+ color: 'hsl(var(--muted-foreground))',
133
+ },
134
+ },
135
+ },
136
+ },
47
137
  },
48
138
  },
49
- plugins: [tailwindAnimate],
139
+ plugins: [tailwindAnimate, typography],
50
140
  });
51
141
  //# sourceMappingURL=tailwind-preset.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tailwind-preset.js","sourceRoot":"","sources":["../src/tailwind-preset.ts"],"names":[],"mappings":"AACA,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,MAAM,GAAG,EAAE,GAGZ,EAAmB,EAAE,CAAC,CAAC;IACtB,MAAM;IACN,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,KAAK,EAAE;QACL,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,MAAM,EAAE,oBAAoB;gBAC5B,KAAK,EAAE,mBAAmB;gBAC1B,IAAI,EAAE,kBAAkB;gBACxB,UAAU,EAAE,wBAAwB;gBACpC,UAAU,EAAE,wBAAwB;gBACpC,OAAO,EAAE;oBACP,OAAO,EAAE,qBAAqB;oBAC9B,UAAU,EAAE,gCAAgC;iBAC7C;gBACD,SAAS,EAAE;oBACT,OAAO,EAAE,uBAAuB;oBAChC,UAAU,EAAE,kCAAkC;iBAC/C;gBACD,WAAW,EAAE;oBACX,OAAO,EAAE,yBAAyB;oBAClC,UAAU,EAAE,oCAAoC;iBACjD;gBACD,KAAK,EAAE;oBACL,OAAO,EAAE,mBAAmB;oBAC5B,UAAU,EAAE,8BAA8B;iBAC3C;gBACD,MAAM,EAAE;oBACN,OAAO,EAAE,oBAAoB;oBAC7B,UAAU,EAAE,+BAA+B;iBAC5C;gBACD,OAAO,EAAE;oBACP,OAAO,EAAE,qBAAqB;oBAC9B,UAAU,EAAE,gCAAgC;iBAC7C;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,kBAAkB;oBAC3B,UAAU,EAAE,6BAA6B;iBAC1C;aACF;YACD,YAAY,EAAE;gBACZ,EAAE,EAAE,eAAe;gBACnB,EAAE,EAAE,2BAA2B;gBAC/B,EAAE,EAAE,2BAA2B;aAChC;SACF;KACF;IACD,OAAO,EAAE,CAAC,eAAe,CAAC;CAC3B,CAAC,CAAC","sourcesContent":["import {Config} from 'tailwindcss';\nimport tailwindAnimate from 'tailwindcss-animate';\nexport const sqlroomsTailwindPreset = ({\n prefix = '',\n}: {\n prefix?: string;\n}): Partial<Config> => ({\n prefix,\n darkMode: ['class'],\n theme: {\n extend: {\n colors: {\n border: 'hsl(var(--border))',\n input: 'hsl(var(--input))',\n ring: 'hsl(var(--ring))',\n background: 'hsl(var(--background))',\n foreground: 'hsl(var(--foreground))',\n primary: {\n DEFAULT: 'hsl(var(--primary))',\n foreground: 'hsl(var(--primary-foreground))',\n },\n secondary: {\n DEFAULT: 'hsl(var(--secondary))',\n foreground: 'hsl(var(--secondary-foreground))',\n },\n destructive: {\n DEFAULT: 'hsl(var(--destructive))',\n foreground: 'hsl(var(--destructive-foreground))',\n },\n muted: {\n DEFAULT: 'hsl(var(--muted))',\n foreground: 'hsl(var(--muted-foreground))',\n },\n accent: {\n DEFAULT: 'hsl(var(--accent))',\n foreground: 'hsl(var(--accent-foreground))',\n },\n popover: {\n DEFAULT: 'hsl(var(--popover))',\n foreground: 'hsl(var(--popover-foreground))',\n },\n card: {\n DEFAULT: 'hsl(var(--card))',\n foreground: 'hsl(var(--card-foreground))',\n },\n },\n borderRadius: {\n lg: `var(--radius)`,\n md: `calc(var(--radius) - 2px)`,\n sm: 'calc(var(--radius) - 4px)',\n },\n },\n },\n plugins: [tailwindAnimate],\n});\n"]}
1
+ {"version":3,"file":"tailwind-preset.js","sourceRoot":"","sources":["../src/tailwind-preset.ts"],"names":[],"mappings":"AACA,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,MAAM,GAAG,EAAE,GAGZ,EAAmB,EAAE,CAAC,CAAC;IACtB,MAAM;IACN,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,KAAK,EAAE;QACL,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,MAAM,EAAE,oBAAoB;gB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B;4BACrC,KAAK,EAAE,8BAA8B;yBACtC;qBACF;iBACF;aACF;SACF;KACF;IACD,OAAO,EAAE,CAAC,eAAe,EAAE,UAAU,CAAC;CACvC,CAAC,CAAC","sourcesContent":["import {Config} from 'tailwindcss';\nimport tailwindAnimate from 'tailwindcss-animate';\nimport typography from '@tailwindcss/typography';\n\nexport const sqlroomsTailwindPreset = ({\n prefix = '',\n}: {\n prefix?: string;\n}): Partial<Config> => ({\n prefix,\n darkMode: ['class'],\n theme: {\n extend: {\n colors: {\n border: 'hsl(var(--border))',\n input: 'hsl(var(--input))',\n ring: 'hsl(var(--ring))',\n background: 'hsl(var(--background))',\n foreground: 'hsl(var(--foreground))',\n primary: {\n DEFAULT: 'hsl(var(--primary))',\n foreground: 'hsl(var(--primary-foreground))',\n },\n secondary: {\n DEFAULT: 'hsl(var(--secondary))',\n foreground: 'hsl(var(--secondary-foreground))',\n },\n destructive: {\n DEFAULT: 'hsl(var(--destructive))',\n foreground: 'hsl(var(--destructive-foreground))',\n },\n muted: {\n DEFAULT: 'hsl(var(--muted))',\n foreground: 'hsl(var(--muted-foreground))',\n },\n accent: {\n DEFAULT: 'hsl(var(--accent))',\n foreground: 'hsl(var(--accent-foreground))',\n },\n popover: {\n DEFAULT: 'hsl(var(--popover))',\n foreground: 'hsl(var(--popover-foreground))',\n },\n card: {\n DEFAULT: 'hsl(var(--card))',\n foreground: 'hsl(var(--card-foreground))',\n },\n },\n borderRadius: {\n lg: `var(--radius)`,\n md: `calc(var(--radius) - 2px)`,\n sm: 'calc(var(--radius) - 4px)',\n },\n typography: {\n DEFAULT: {\n css: {\n // Improve spacing and styling for lists\n 'ul, ol': {\n paddingLeft: '1.5em',\n marginTop: '0.75em',\n marginBottom: '0.75em',\n },\n 'ul > li, ol > li': {\n marginTop: '0.25em',\n marginBottom: '0.25em',\n },\n // Better styling for code blocks\n pre: {\n backgroundColor: 'hsl(var(--muted))',\n color: 'hsl(var(--muted-foreground))',\n borderRadius: 'var(--radius)',\n padding: '1em',\n overflowX: 'auto',\n },\n code: {\n backgroundColor: 'hsl(var(--muted))',\n color: 'hsl(var(--muted-foreground))',\n borderRadius: '0.25em',\n padding: '0.2em 0.4em',\n fontSize: '0.875em',\n },\n // Better styling for blockquotes\n blockquote: {\n borderLeftColor: 'hsl(var(--border))',\n fontStyle: 'normal',\n color: 'hsl(var(--muted-foreground))',\n },\n // Harmonize heading styles\n 'h1, h2, h3, h4, h5, h6': {\n color: 'hsl(var(--foreground))',\n fontWeight: '600',\n },\n // Better link styling\n a: {\n color: 'hsl(var(--primary))',\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n // Better table styling\n table: {\n width: '100%',\n tableLayout: 'auto',\n textAlign: 'left',\n borderCollapse: 'collapse',\n },\n th: {\n fontWeight: '600',\n borderBottomWidth: '2px',\n borderColor: 'hsl(var(--border))',\n padding: '0.5em',\n },\n td: {\n borderBottomWidth: '1px',\n borderColor: 'hsl(var(--border))',\n padding: '0.5em',\n },\n },\n },\n // Adjust typography for dark mode\n invert: {\n css: {\n color: 'hsl(var(--foreground))',\n pre: {\n backgroundColor: 'hsl(var(--muted))',\n color: 'hsl(var(--muted-foreground))',\n },\n code: {\n backgroundColor: 'hsl(var(--muted))',\n color: 'hsl(var(--muted-foreground))',\n },\n 'h1, h2, h3, h4, h5, h6': {\n color: 'hsl(var(--foreground))',\n },\n blockquote: {\n borderLeftColor: 'hsl(var(--border))',\n color: 'hsl(var(--muted-foreground))',\n },\n },\n },\n },\n },\n },\n plugins: [tailwindAnimate, typography],\n});\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sqlrooms/ui",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "author": "Ilya Boyandin <ilya@boyandin.me>",
@@ -62,5 +62,5 @@
62
62
  "autoprefixer": "^10.4.20",
63
63
  "tailwindcss": "^3.4.17"
64
64
  },
65
- "gitHead": "f46dfe6b5d135e1a039b49b3ba71cda7150eab0f"
65
+ "gitHead": "99b46a96ab900e6b005bcd30cfbfe7b3c9d51f8d"
66
66
  }