@lerianstudio/sindarian-ui 2.0.0-beta.17 → 2.0.0-beta.18

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.
@@ -1,13 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "default" | "plain" | "hoverLink" | "primary" | "secondary" | "tertiary" | "outline" | "link" | "destructive" | null | undefined;
4
+ variant?: "link" | "default" | "plain" | "hoverLink" | "primary" | "secondary" | "tertiary" | "outline" | "destructive" | null | undefined;
5
5
  fullWidth?: boolean | null | undefined;
6
- size?: "default" | "small" | null | undefined;
6
+ size?: "small" | "default" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  declare const iconVariants: (props?: ({
9
9
  position?: "end" | "start" | "far-end" | null | undefined;
10
- size?: "default" | "small" | null | undefined;
10
+ size?: "small" | "default" | null | undefined;
11
11
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
12
  export type ButtonProps = React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
13
13
  asChild?: boolean;
@@ -5,7 +5,7 @@ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogP
5
5
  declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element;
6
6
  declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element;
7
7
  declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element;
8
- declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
8
+ declare function DialogContent({ className, children, showCloseButton, onInteractOutside, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
9
9
  showCloseButton?: boolean;
10
10
  }): React.JSX.Element;
11
11
  declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.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SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAQpD;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,qBAQ1D;AAED,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EAClB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/dialog/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAKzD,iBAAS,MAAM,CAAC,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,qBAEnD;AAED,iBAAS,aAAa,CAAC,EACrB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,qBAEtD;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,MAAM,CAAC,qBAErD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAEpD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,qBAQtD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,eAAsB,EACtB,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IACxD,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,qBAyBA;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQzE;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAQpD;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,qBAQ1D;AAED,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EAClB,CAAA"}
@@ -63,8 +63,8 @@ function DialogClose({ ...props }) {
63
63
  function DialogOverlay({ className, ...props }) {
64
64
  return ((0, jsx_runtime_1.jsx)(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: (0, utils_1.cn)('dialog-overlay', className), ...props }));
65
65
  }
66
- function DialogContent({ className, children, showCloseButton = true, ...props }) {
67
- return ((0, jsx_runtime_1.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [(0, jsx_runtime_1.jsx)(DialogOverlay, {}), (0, jsx_runtime_1.jsxs)(DialogPrimitive.Content, { "data-slot": "dialog-content", className: (0, utils_1.cn)('dialog-content', !showCloseButton && '*:data-radix-dialog-close:hidden', className), ...props, children: [children, (0, jsx_runtime_1.jsxs)(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "dialog-close", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.X, { className: "size-4" }), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Close" })] })] })] }));
66
+ function DialogContent({ className, children, showCloseButton = true, onInteractOutside, ...props }) {
67
+ return ((0, jsx_runtime_1.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [(0, jsx_runtime_1.jsx)(DialogOverlay, {}), (0, jsx_runtime_1.jsxs)(DialogPrimitive.Content, { "data-slot": "dialog-content", className: (0, utils_1.cn)('dialog-content', !showCloseButton && '*:data-radix-dialog-close:hidden', className), onInteractOutside: (0, utils_1.keepOpenOnToast)(onInteractOutside), ...props, children: [children, (0, jsx_runtime_1.jsxs)(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "dialog-close", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.X, { className: "size-4" }), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Close" })] })] })] }));
68
68
  }
69
69
  function DialogHeader({ className, ...props }) {
70
70
  return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "dialog-header", className: (0, utils_1.cn)('dialog-header', className), ...props }));
@@ -2,7 +2,7 @@ import { type VariantProps } from 'class-variance-authority';
2
2
  import { buttonVariants } from '../button';
3
3
  export declare const iconButtonVariants: (props?: ({
4
4
  rounded?: boolean | null | undefined;
5
- size?: "default" | "small" | null | undefined;
5
+ size?: "small" | "default" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export type IconButtonProps = React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
8
8
  rounded?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/sheet/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,iBAAS,KAA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iB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,GAC1E,YAAY,CAAC,OAAO,aAAa,CAAC,CAAA;AAEpC,iBAAS,YAAY,CAAC,EACpB,IAAc,EACd,SAAS,EACT,QAAQ,EACR,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,iBAAiB,qBA6BnB;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWxE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWxE;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,qBAWnD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,qBAQzD;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,EACjB,CAAA"}
@@ -45,7 +45,6 @@ exports.SheetFooter = SheetFooter;
45
45
  exports.SheetTitle = SheetTitle;
46
46
  exports.SheetDescription = SheetDescription;
47
47
  const jsx_runtime_1 = require("react/jsx-runtime");
48
- const React = __importStar(require("react"));
49
48
  const SheetPrimitive = __importStar(require("@radix-ui/react-dialog"));
50
49
  const class_variance_authority_1 = require("class-variance-authority");
51
50
  const lucide_react_1 = require("lucide-react");
@@ -121,15 +120,7 @@ const sheetVariants = (0, class_variance_authority_1.cva)('fixed z-50 gap-4 bg-b
121
120
  }
122
121
  });
123
122
  function SheetContent({ side = 'right', className, children, onInteractOutside, ...props }) {
124
- const handleInteractOutside = React.useCallback((event) => {
125
- const target = event.target;
126
- if (target?.closest('[data-sonner-toaster]')) {
127
- event.preventDefault();
128
- return;
129
- }
130
- onInteractOutside?.(event);
131
- }, [onInteractOutside]);
132
- return ((0, jsx_runtime_1.jsxs)(SheetPortal, { children: [(0, jsx_runtime_1.jsx)(SheetOverlay, {}), (0, jsx_runtime_1.jsxs)(SheetPrimitive.Content, { "data-slot": "sheet-content", className: (0, utils_1.cn)('flex max-h-screen flex-col overflow-x-auto px-8 pb-0', sheetVariants({ side }), className), onInteractOutside: handleInteractOutside, ...props, children: [children, (0, jsx_runtime_1.jsxs)(SheetPrimitive.Close, { className: "data-[state=open]:bg-secondary ring-offset-background focus-visible:ring-ring absolute top-7 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.X, { className: "h-6 w-6" }), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Close" })] })] })] }));
123
+ return ((0, jsx_runtime_1.jsxs)(SheetPortal, { children: [(0, jsx_runtime_1.jsx)(SheetOverlay, {}), (0, jsx_runtime_1.jsxs)(SheetPrimitive.Content, { "data-slot": "sheet-content", className: (0, utils_1.cn)('flex max-h-screen flex-col overflow-x-auto px-8 pb-0', sheetVariants({ side }), className), onInteractOutside: (0, utils_1.keepOpenOnToast)(onInteractOutside), ...props, children: [children, (0, jsx_runtime_1.jsxs)(SheetPrimitive.Close, { className: "data-[state=open]:bg-secondary ring-offset-background focus-visible:ring-ring absolute top-7 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.X, { className: "h-6 w-6" }), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Close" })] })] })] }));
133
124
  }
134
125
  function SheetHeader({ className, ...props }) {
135
126
  return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "sheet-header", className: (0, utils_1.cn)('mb-4 flex flex-col space-y-2 text-center sm:text-left', className), ...props }));
@@ -1,3 +1,5 @@
1
+ import type { ComponentProps } from 'react';
2
+ import { Toaster as SonnerToaster } from 'sonner';
1
3
  type ToasterProps = {
2
4
  /**
3
5
  * Forces the toast theme. Omit it inside a `ThemeProvider` to follow the
@@ -5,7 +7,9 @@ type ToasterProps = {
5
7
  * leaving the light/dark call to sonner's own media query.
6
8
  */
7
9
  theme?: 'light' | 'dark' | 'system';
10
+ /** Where the toast stack sits on screen. Defaults to `'bottom-right'`. */
11
+ position?: ComponentProps<typeof SonnerToaster>['position'];
8
12
  };
9
- export declare function Toaster({ theme }: ToasterProps): import("react").JSX.Element;
13
+ export declare function Toaster({ theme, position }: ToasterProps): import("react").JSX.Element;
10
14
  export {};
11
15
  //# sourceMappingURL=toaster.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/toast/toaster.tsx"],"names":[],"mappings":"AAOA,KAAK,YAAY,GAAG;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;CACpC,CAAA;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,YAAY,+BAqB9C"}
1
+ {"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/toast/toaster.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAA;AAKjD,KAAK,YAAY,GAAG;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;IACnC,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC,UAAU,CAAC,CAAA;CAC5D,CAAA;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,QAAyB,EAAE,EAAE,YAAY,+BAqBzE"}
@@ -6,11 +6,11 @@ const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const sonner_1 = require("sonner");
7
7
  const use_toast_1 = require("../../../hooks/use-toast");
8
8
  const theme_provider_1 = require("../../../theme/theme-provider");
9
- function Toaster({ theme }) {
9
+ function Toaster({ theme, position = 'bottom-right' }) {
10
10
  // Optional read: a Toaster mounted outside any ThemeProvider must still
11
11
  // render, so this cannot go through `useTheme`, which throws.
12
12
  const themeContext = (0, theme_provider_1.useOptionalTheme)();
13
- return ((0, jsx_runtime_1.jsx)(sonner_1.Toaster, { theme: theme ?? themeContext?.resolvedTheme ?? 'system', position: "bottom-right", visibleToasts: 3, duration: use_toast_1.DEFAULT_DURATION, expand: false, closeButton: true, richColors: false, offset: 16, gap: 8, toastOptions: {
13
+ return ((0, jsx_runtime_1.jsx)(sonner_1.Toaster, { theme: theme ?? themeContext?.resolvedTheme ?? 'system', position: position, visibleToasts: 3, duration: use_toast_1.DEFAULT_DURATION, expand: false, closeButton: true, richColors: false, offset: 16, gap: 8, toastOptions: {
14
14
  className: 'font-sans !text-sm !font-medium'
15
15
  } }));
16
16
  }
@@ -1,13 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "plain" | "hoverLink" | "default" | "primary" | "secondary" | "tertiary" | "outline" | "link" | "destructive" | null | undefined;
4
+ variant?: "link" | "plain" | "hoverLink" | "default" | "primary" | "secondary" | "tertiary" | "outline" | "destructive" | null | undefined;
5
5
  fullWidth?: boolean | null | undefined;
6
- size?: "default" | "small" | null | undefined;
6
+ size?: "small" | "default" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  declare const iconVariants: (props?: ({
9
9
  position?: "end" | "start" | "far-end" | null | undefined;
10
- size?: "default" | "small" | null | undefined;
10
+ size?: "small" | "default" | null | undefined;
11
11
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
12
  export type ButtonProps = React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
13
13
  asChild?: boolean;
@@ -5,7 +5,7 @@ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogP
5
5
  declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element;
6
6
  declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element;
7
7
  declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element;
8
- declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
8
+ declare function DialogContent({ className, children, showCloseButton, onInteractOutside, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
9
9
  showCloseButton?: boolean;
10
10
  }): React.JSX.Element;
11
11
  declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/dialog/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAKzD,iBAAS,MAAM,CAAC,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,qBAEnD;AAED,iBAAS,aAAa,CAAC,EACrB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,qBAEtD;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,MAAM,CAAC,qBAErD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAEpD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,qBAQtD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IACxD,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,qBAwBA;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQzE;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAQpD;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,qBAQ1D;AAED,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EAClB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/dialog/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAK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CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,qBAQ1D;AAED,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EAClB,CAAA"}
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as DialogPrimitive from '@radix-ui/react-dialog';
4
4
  import { X } from 'lucide-react';
5
- import { cn } from '../../../lib/utils.js';
5
+ import { cn, keepOpenOnToast } from '../../../lib/utils.js';
6
6
  function Dialog({ ...props }) {
7
7
  return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
8
8
  }
@@ -18,8 +18,8 @@ function DialogClose({ ...props }) {
18
18
  function DialogOverlay({ className, ...props }) {
19
19
  return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn('dialog-overlay', className), ...props }));
20
20
  }
21
- function DialogContent({ className, children, showCloseButton = true, ...props }) {
22
- return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn('dialog-content', !showCloseButton && '*:data-radix-dialog-close:hidden', className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "dialog-close", children: [_jsx(X, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] }));
21
+ function DialogContent({ className, children, showCloseButton = true, onInteractOutside, ...props }) {
22
+ return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn('dialog-content', !showCloseButton && '*:data-radix-dialog-close:hidden', className), onInteractOutside: keepOpenOnToast(onInteractOutside), ...props, children: [children, _jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "dialog-close", children: [_jsx(X, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] }));
23
23
  }
24
24
  function DialogHeader({ className, ...props }) {
25
25
  return (_jsx("div", { "data-slot": "dialog-header", className: cn('dialog-header', className), ...props }));
@@ -2,7 +2,7 @@ import { type VariantProps } from 'class-variance-authority';
2
2
  import { buttonVariants } from '../button/index.js';
3
3
  export declare const iconButtonVariants: (props?: ({
4
4
  rounded?: boolean | null | undefined;
5
- size?: "default" | "small" | null | undefined;
5
+ size?: "small" | "default" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export type IconButtonProps = React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
8
8
  rounded?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/sheet/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,iBAAS,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,qBAE5E;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,qBAErD;AAED,iBAAS,UAAU,CAAC,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,qBAEnD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,MAAM,CAAC,qBAEpD;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAA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,CAAC,KAAK,CAAC,qBAWnD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,qBAQzD;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,EACjB,CAAA"}
@@ -1,10 +1,9 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from 'react';
4
3
  import * as SheetPrimitive from '@radix-ui/react-dialog';
5
4
  import { cva } from 'class-variance-authority';
6
5
  import { X } from 'lucide-react';
7
- import { cn } from '../../../lib/utils.js';
6
+ import { cn, keepOpenOnToast } from '../../../lib/utils.js';
8
7
  function Sheet({ ...props }) {
9
8
  return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
10
9
  }
@@ -76,15 +75,7 @@ const sheetVariants = cva('fixed z-50 gap-4 bg-background p-12 max-sm:px-4 shado
76
75
  }
77
76
  });
78
77
  function SheetContent({ side = 'right', className, children, onInteractOutside, ...props }) {
79
- const handleInteractOutside = React.useCallback((event) => {
80
- const target = event.target;
81
- if (target?.closest('[data-sonner-toaster]')) {
82
- event.preventDefault();
83
- return;
84
- }
85
- onInteractOutside?.(event);
86
- }, [onInteractOutside]);
87
- return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, { "data-slot": "sheet-content", className: cn('flex max-h-screen flex-col overflow-x-auto px-8 pb-0', sheetVariants({ side }), className), onInteractOutside: handleInteractOutside, ...props, children: [children, _jsxs(SheetPrimitive.Close, { className: "data-[state=open]:bg-secondary ring-offset-background focus-visible:ring-ring absolute top-7 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none", children: [_jsx(X, { className: "h-6 w-6" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] }));
78
+ return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, { "data-slot": "sheet-content", className: cn('flex max-h-screen flex-col overflow-x-auto px-8 pb-0', sheetVariants({ side }), className), onInteractOutside: keepOpenOnToast(onInteractOutside), ...props, children: [children, _jsxs(SheetPrimitive.Close, { className: "data-[state=open]:bg-secondary ring-offset-background focus-visible:ring-ring absolute top-7 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none", children: [_jsx(X, { className: "h-6 w-6" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] }));
88
79
  }
89
80
  function SheetHeader({ className, ...props }) {
90
81
  return (_jsx("div", { "data-slot": "sheet-header", className: cn('mb-4 flex flex-col space-y-2 text-center sm:text-left', className), ...props }));
@@ -1,3 +1,5 @@
1
+ import type { ComponentProps } from 'react';
2
+ import { Toaster as SonnerToaster } from 'sonner';
1
3
  type ToasterProps = {
2
4
  /**
3
5
  * Forces the toast theme. Omit it inside a `ThemeProvider` to follow the
@@ -5,7 +7,9 @@ type ToasterProps = {
5
7
  * leaving the light/dark call to sonner's own media query.
6
8
  */
7
9
  theme?: 'light' | 'dark' | 'system';
10
+ /** Where the toast stack sits on screen. Defaults to `'bottom-right'`. */
11
+ position?: ComponentProps<typeof SonnerToaster>['position'];
8
12
  };
9
- export declare function Toaster({ theme }: ToasterProps): import("react").JSX.Element;
13
+ export declare function Toaster({ theme, position }: ToasterProps): import("react").JSX.Element;
10
14
  export {};
11
15
  //# sourceMappingURL=toaster.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/toast/toaster.tsx"],"names":[],"mappings":"AAOA,KAAK,YAAY,GAAG;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;CACpC,CAAA;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,YAAY,+BAqB9C"}
1
+ {"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/toast/toaster.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAA;AAKjD,KAAK,YAAY,GAAG;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;IACnC,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC,UAAU,CAAC,CAAA;CAC5D,CAAA;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,QAAyB,EAAE,EAAE,YAAY,+BAqBzE"}
@@ -3,11 +3,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Toaster as SonnerToaster } from 'sonner';
4
4
  import { DEFAULT_DURATION } from '../../../hooks/use-toast.js';
5
5
  import { useOptionalTheme } from '../../../theme/theme-provider.js';
6
- export function Toaster({ theme }) {
6
+ export function Toaster({ theme, position = 'bottom-right' }) {
7
7
  // Optional read: a Toaster mounted outside any ThemeProvider must still
8
8
  // render, so this cannot go through `useTheme`, which throws.
9
9
  const themeContext = useOptionalTheme();
10
- return (_jsx(SonnerToaster, { theme: theme ?? themeContext?.resolvedTheme ?? 'system', position: "bottom-right", visibleToasts: 3, duration: DEFAULT_DURATION, expand: false, closeButton: true, richColors: false, offset: 16, gap: 8, toastOptions: {
10
+ return (_jsx(SonnerToaster, { theme: theme ?? themeContext?.resolvedTheme ?? 'system', position: position, visibleToasts: 3, duration: DEFAULT_DURATION, expand: false, closeButton: true, richColors: false, offset: 16, gap: 8, toastOptions: {
11
11
  className: 'font-sans !text-sm !font-medium'
12
12
  } }));
13
13
  }
@@ -1,3 +1,5 @@
1
1
  import { type ClassValue } from 'clsx';
2
2
  export declare function cn(...inputs: ClassValue[]): string;
3
+ /** Wraps a Radix `onInteractOutside` so a press on a toast never dismisses the layer under it. */
4
+ export declare function keepOpenOnToast<E extends Event>(onInteractOutside?: (event: E) => void): (event: E) => void;
3
5
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AA8B5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AA8B5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,CAAC,SAAS,KAAK,EAC7C,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,IAE9B,OAAO,CAAC,UASjB"}
@@ -29,3 +29,13 @@ const twMerge = extendTailwindMerge({
29
29
  export function cn(...inputs) {
30
30
  return twMerge(clsx(inputs));
31
31
  }
32
+ /** Wraps a Radix `onInteractOutside` so a press on a toast never dismisses the layer under it. */
33
+ export function keepOpenOnToast(onInteractOutside) {
34
+ return (event) => {
35
+ if (event.target?.closest('[data-sonner-toaster]')) {
36
+ event.preventDefault();
37
+ return;
38
+ }
39
+ onInteractOutside?.(event);
40
+ };
41
+ }
@@ -1,3 +1,5 @@
1
1
  import { type ClassValue } from 'clsx';
2
2
  export declare function cn(...inputs: ClassValue[]): string;
3
+ /** Wraps a Radix `onInteractOutside` so a press on a toast never dismisses the layer under it. */
4
+ export declare function keepOpenOnToast<E extends Event>(onInteractOutside?: (event: E) => void): (event: E) => void;
3
5
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AA8B5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AA8B5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,CAAC,SAAS,KAAK,EAC7C,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,IAE9B,OAAO,CAAC,UASjB"}
package/dist/lib/utils.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cn = cn;
4
+ exports.keepOpenOnToast = keepOpenOnToast;
4
5
  const clsx_1 = require("clsx");
5
6
  const tailwind_merge_1 = require("tailwind-merge");
6
7
  /**
@@ -32,3 +33,13 @@ const twMerge = (0, tailwind_merge_1.extendTailwindMerge)({
32
33
  function cn(...inputs) {
33
34
  return twMerge((0, clsx_1.clsx)(inputs));
34
35
  }
36
+ /** Wraps a Radix `onInteractOutside` so a press on a toast never dismisses the layer under it. */
37
+ function keepOpenOnToast(onInteractOutside) {
38
+ return (event) => {
39
+ if (event.target?.closest('[data-sonner-toaster]')) {
40
+ event.preventDefault();
41
+ return;
42
+ }
43
+ onInteractOutside?.(event);
44
+ };
45
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lerianstudio/sindarian-ui",
3
- "version": "2.0.0-beta.17",
3
+ "version": "2.0.0-beta.18",
4
4
  "description": "Sindarian UI - A UI library for Midaz Console",
5
5
  "license": "ISC",
6
6
  "author": {