@sqlrooms/ui 0.7.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/dist/components/button.d.ts +1 -1
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +1 -0
- package/dist/components/button.js.map +1 -1
- package/dist/components/error-pane.d.ts.map +1 -1
- package/dist/components/error-pane.js +1 -1
- package/dist/components/error-pane.js.map +1 -1
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/resizable.d.ts.map +1 -1
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/hooks/useDisclosure.d.ts +33 -3
- package/dist/hooks/useDisclosure.d.ts.map +1 -1
- package/dist/hooks/useDisclosure.js +31 -0
- package/dist/hooks/useDisclosure.js.map +1 -1
- package/dist/hooks/useRelativeCoordinates.d.ts.map +1 -1
- package/dist/tailwind-preset.d.ts.map +1 -1
- package/dist/tailwind-preset.js +91 -1
- package/dist/tailwind-preset.js.map +1 -1
- package/package.json +2 -2
|
@@ -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;;;
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.tsx"],"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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,
|
|
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
|
|
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,CAAC;AAC/B,OAAO,EAAC,EAAE,EAAC,MAAM,cAAc,CAAC;AAChC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAYhC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CACE,EACE,SAAS,EACT,KAAK,EACL,KAAK,GAAG,sBAAsB,EAC9B,IAAI,GAAG;8EACiE,EACxE,OAAO,EACP,OAAO,GAAG,KAAK,EACf,WAAW,EACX,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,OAAO,CACL,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,KAC3C,KAAK,YAET,MAAC,KAAK,IACJ,OAAO,EAAC,aAAa,EACrB,SAAS,EAAE,EAAE,CACX,wGAAwG,EACxG,CAAC,KAAK,IAAI,eAAe,CAC1B,aAED,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,iBAAiB,IAAC,SAAS,EAAC,0BAA0B,GAAG,GACtD,EACN,KAAC,UAAU,IAAC,SAAS,EAAC,
|
|
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,CAAC;AAC/B,OAAO,EAAC,EAAE,EAAC,MAAM,cAAc,CAAC;AAChC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAYhC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CACE,EACE,SAAS,EACT,KAAK,EACL,KAAK,GAAG,sBAAsB,EAC9B,IAAI,GAAG;8EACiE,EACxE,OAAO,EACP,OAAO,GAAG,KAAK,EACf,WAAW,EACX,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,OAAO,CACL,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,KAC3C,KAAK,YAET,MAAC,KAAK,IACJ,OAAO,EAAC,aAAa,EACrB,SAAS,EAAE,EAAE,CACX,wGAAwG,EACxG,CAAC,KAAK,IAAI,eAAe,CAC1B,aAED,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,iBAAiB,IAAC,SAAS,EAAC,0BAA0B,GAAG,GACtD,EACN,KAAC,UAAU,IAAC,SAAS,EAAC,8BAA8B,YACjD,KAAK,GACK,EACb,MAAC,gBAAgB,IAAC,SAAS,EAAC,oCAAoC,aAC9D,YAAG,SAAS,EAAC,gBAAgB,YAAE,IAAI,GAAK,EACvC,OAAO,IAAI,CACV,cAAK,SAAS,EAAC,WAAW,YACxB,eAAK,SAAS,EAAC,2BAA2B,aACvC,OAAO,IAAI,CACV,MAAC,MAAM,IACL,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,0BAA0B,aAEpC,KAAC,aAAa,IAAC,SAAS,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,
|
|
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,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,cAEC,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAI7D,QAAA,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"resizable.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;;;;;;;;;;;;;;;sBAyBkn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AS,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
|
|
1
|
+
export interface UseDisclosureReturnValue {
|
|
2
2
|
isOpen: boolean;
|
|
3
3
|
onOpen: () => void;
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
onToggle: () => void;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
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,
|
|
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\
|
|
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,
|
|
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"}
|
|
@@ -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;
|
|
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"}
|
package/dist/tailwind-preset.js
CHANGED
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"tailwind-preset.js","sourceRoot":"","sources":["../src/tailwind-preset.ts"],"names":[],"mappings":"AACA,O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N,GAAG,EAAE;wBACH,KAAK,EAAE,wBAAwB;wBAC/B,GAAG,EAAE;4BACH,eAAe,EAAE,mBAAmB;4BACpC,KAAK,EAAE,8BAA8B;yBACtC;wBACD,IAAI,EAAE;4BACJ,eAAe,EAAE,mBAAmB;4BACpC,KAAK,EAAE,8BAA8B;yBACtC;wBACD,wBAAwB,EAAE;4BACxB,KAAK,EAAE,wBAAwB;yBAChC;wBACD,UAAU,EAAE;4BACV,eAAe,EAAE,oBAAoB;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.
|
|
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": "
|
|
65
|
+
"gitHead": "99b46a96ab900e6b005bcd30cfbfe7b3c9d51f8d"
|
|
66
66
|
}
|