@pixpilot/shadcn-ui 1.33.0 → 1.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/Button.d.cts +2 -2
  2. package/dist/ButtonExtended.d.cts +2 -2
  3. package/dist/Card.d.cts +3 -3
  4. package/dist/DatePicker.cjs +37 -19
  5. package/dist/DatePicker.d.cts +1 -0
  6. package/dist/DatePicker.d.ts +1 -0
  7. package/dist/DatePicker.js +38 -20
  8. package/dist/confirmation-dialog/ConfirmationDialog.cjs +4 -4
  9. package/dist/confirmation-dialog/ConfirmationDialog.d.cts +1 -1
  10. package/dist/confirmation-dialog/ConfirmationDialog.d.ts +1 -2
  11. package/dist/confirmation-dialog/ConfirmationDialog.js +4 -3
  12. package/dist/confirmation-dialog/confirmation-dialogs.cjs +7 -4
  13. package/dist/confirmation-dialog/confirmation-dialogs.d.cts +6 -1
  14. package/dist/confirmation-dialog/confirmation-dialogs.d.ts +6 -1
  15. package/dist/confirmation-dialog/confirmation-dialogs.js +7 -5
  16. package/dist/confirmation-dialog/index.d.cts +1 -1
  17. package/dist/confirmation-dialog/index.d.ts +1 -1
  18. package/dist/confirmation-dialog/index.js +1 -1
  19. package/dist/dialog/Dialog.d.cts +5 -5
  20. package/dist/dialog-provider/dialog-registry.cjs +17 -2
  21. package/dist/dialog-provider/dialog-registry.d.cts +28 -2
  22. package/dist/dialog-provider/dialog-registry.d.ts +28 -2
  23. package/dist/dialog-provider/dialog-registry.js +16 -3
  24. package/dist/dialog-provider/index.d.cts +2 -2
  25. package/dist/dialog-provider/index.d.ts +2 -2
  26. package/dist/dialog-provider/index.js +1 -1
  27. package/dist/dialog-provider/register-dialog.cjs +27 -4
  28. package/dist/dialog-provider/register-dialog.d.cts +17 -8
  29. package/dist/dialog-provider/register-dialog.d.ts +17 -8
  30. package/dist/dialog-provider/register-dialog.js +27 -5
  31. package/dist/file-upload/FileUpload.d.cts +2 -2
  32. package/dist/index.cjs +3 -0
  33. package/dist/index.d.cts +4 -4
  34. package/dist/index.d.ts +4 -4
  35. package/dist/index.js +3 -3
  36. package/dist/input/Input.d.cts +2 -2
  37. package/dist/tags-input/TagsInput.d.cts +2 -2
  38. package/dist/tags-input/TagsInput.d.ts +2 -2
  39. package/dist/tags-input/TagsInputInline.d.cts +2 -2
  40. package/dist/tags-input/TagsInputInline.d.ts +2 -2
  41. package/dist/theme-toggle/ThemeModeDropdown.d.cts +2 -2
  42. package/dist/theme-toggle/ThemeModeDropdown.d.ts +2 -2
  43. package/dist/theme-toggle/ThemeModeSwitchInside.d.cts +2 -2
  44. package/dist/theme-toggle/ThemeModeSwitchInside.d.ts +2 -2
  45. package/dist/theme-toggle/ThemeModeSwitchOutside.d.cts +2 -2
  46. package/dist/theme-toggle/ThemeModeSwitchOutside.d.ts +2 -2
  47. package/dist/theme-toggle/ThemeModeToggleButton.d.cts +2 -2
  48. package/dist/theme-toggle/ThemeModeToggleButton.d.ts +2 -2
  49. package/package.json +3 -3
package/dist/Button.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
2
2
  import { Button, Tooltip, TooltipContent, TooltipTrigger, buttonVariants } from "@pixpilot/shadcn";
3
3
  import React from "react";
4
4
  import { VariantProps } from "class-variance-authority";
@@ -27,7 +27,7 @@ interface ButtonProps extends React.ComponentProps<typeof Button>, VariantProps<
27
27
  }
28
28
  declare function Button$1(props: ButtonProps & {
29
29
  ref?: React.Ref<HTMLButtonElement>;
30
- }): react_jsx_runtime0.JSX.Element;
30
+ }): react_jsx_runtime1.JSX.Element;
31
31
  declare namespace Button$1 {
32
32
  var displayName: string;
33
33
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime3 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
2
  import { Button, Tooltip, TooltipContent, TooltipTrigger, buttonVariants } from "@pixpilot/shadcn";
3
3
  import React from "react";
4
4
  import { VariantProps } from "class-variance-authority";
@@ -50,7 +50,7 @@ interface ButtonExtendedProps extends React.ComponentProps<typeof Button>, Varia
50
50
  }
51
51
  declare function ButtonExtended(props: ButtonExtendedProps & {
52
52
  ref?: React.Ref<HTMLButtonElement>;
53
- }): react_jsx_runtime3.JSX.Element;
53
+ }): react_jsx_runtime0.JSX.Element;
54
54
  declare namespace ButtonExtended {
55
55
  var displayName: string;
56
56
  }
package/dist/Card.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
2
2
  import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@pixpilot/shadcn";
3
3
  import React from "react";
4
4
 
@@ -6,10 +6,10 @@ import React from "react";
6
6
  declare function CardTitle$1({
7
7
  className,
8
8
  ...props
9
- }: React.ComponentProps<typeof CardTitle>): react_jsx_runtime1.JSX.Element;
9
+ }: React.ComponentProps<typeof CardTitle>): react_jsx_runtime2.JSX.Element;
10
10
  declare function CardHeader$1({
11
11
  className,
12
12
  ...props
13
- }: React.ComponentProps<typeof CardHeader>): react_jsx_runtime1.JSX.Element;
13
+ }: React.ComponentProps<typeof CardHeader>): react_jsx_runtime2.JSX.Element;
14
14
  //#endregion
15
15
  export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader$1 as CardHeader, CardTitle$1 as CardTitle };
@@ -13,25 +13,43 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
13
13
 
14
14
  //#region src/DatePicker.tsx
15
15
  function DatePicker(props) {
16
- const { id, value, onChange, placeholder = "Pick a date",...calendarProps } = props;
17
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Popover, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PopoverTrigger, {
18
- asChild: true,
19
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Button, {
20
- id,
21
- variant: "outline",
22
- className: (0, __pixpilot_shadcn.cn)("w-full justify-start text-left font-normal", !value && "text-muted-foreground"),
23
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CalendarIcon, { className: "mr-2 h-4 w-4" }), value ? value.toLocaleDateString() : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: placeholder })]
24
- })
25
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PopoverContent, {
26
- className: "w-auto p-0",
27
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Calendar, {
28
- mode: "single",
29
- selected: value,
30
- onSelect: onChange,
31
- initialFocus: true,
32
- ...calendarProps
33
- })
34
- })] });
16
+ const { id, value, onChange, placeholder = "Pick a date", showClearButton = true,...calendarProps } = props;
17
+ const [open, setOpen] = react.default.useState(false);
18
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
19
+ className: "relative flex items-center",
20
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Popover, {
21
+ open,
22
+ onOpenChange: setOpen,
23
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PopoverTrigger, {
24
+ asChild: true,
25
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Button, {
26
+ id,
27
+ variant: "outline",
28
+ className: (0, __pixpilot_shadcn.cn)("w-full justify-start text-left font-normal", !value && "text-muted-foreground", showClearButton && value && "pr-8"),
29
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CalendarIcon, { className: "mr-2 h-4 w-4" }), value ? value.toLocaleDateString() : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: placeholder })]
30
+ })
31
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PopoverContent, {
32
+ className: "w-auto p-0",
33
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Calendar, {
34
+ mode: "single",
35
+ selected: value,
36
+ onSelect: (date) => {
37
+ onChange?.(date);
38
+ setOpen(false);
39
+ },
40
+ initialFocus: true,
41
+ ...calendarProps
42
+ })
43
+ })]
44
+ }), showClearButton && value && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
45
+ type: "button",
46
+ "data-slot": "clear-button",
47
+ onClick: () => onChange?.(void 0),
48
+ className: "absolute right-2 text-muted-foreground hover:text-foreground",
49
+ "aria-label": "Clear date",
50
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, { className: "h-4 w-4" })
51
+ })]
52
+ });
35
53
  }
36
54
  DatePicker.displayName = "DatePicker";
37
55
 
@@ -8,6 +8,7 @@ type DatePickerProps = {
8
8
  value?: Date;
9
9
  onChange?: (date: Date | undefined) => void;
10
10
  placeholder?: string;
11
+ showClearButton?: boolean;
11
12
  } & Omit<ComponentProps<typeof Calendar>, 'selected' | 'onSelect' | 'mode'>;
12
13
  declare function DatePicker(props: DatePickerProps): react_jsx_runtime6.JSX.Element;
13
14
  declare namespace DatePicker {
@@ -8,6 +8,7 @@ type DatePickerProps = {
8
8
  value?: Date;
9
9
  onChange?: (date: Date | undefined) => void;
10
10
  placeholder?: string;
11
+ showClearButton?: boolean;
11
12
  } & Omit<ComponentProps<typeof Calendar>, 'selected' | 'onSelect' | 'mode'>;
12
13
  declare function DatePicker(props: DatePickerProps): react_jsx_runtime6.JSX.Element;
13
14
  declare namespace DatePicker {
@@ -2,31 +2,49 @@
2
2
 
3
3
 
4
4
  import { Button, Calendar, Popover, PopoverContent, PopoverTrigger, cn } from "@pixpilot/shadcn";
5
- import { CalendarIcon } from "lucide-react";
5
+ import { CalendarIcon, XIcon } from "lucide-react";
6
6
  import React from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
 
9
9
  //#region src/DatePicker.tsx
10
10
  function DatePicker(props) {
11
- const { id, value, onChange, placeholder = "Pick a date",...calendarProps } = props;
12
- return /* @__PURE__ */ jsxs(Popover, { children: [/* @__PURE__ */ jsx(PopoverTrigger, {
13
- asChild: true,
14
- children: /* @__PURE__ */ jsxs(Button, {
15
- id,
16
- variant: "outline",
17
- className: cn("w-full justify-start text-left font-normal", !value && "text-muted-foreground"),
18
- children: [/* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }), value ? value.toLocaleDateString() : /* @__PURE__ */ jsx("span", { children: placeholder })]
19
- })
20
- }), /* @__PURE__ */ jsx(PopoverContent, {
21
- className: "w-auto p-0",
22
- children: /* @__PURE__ */ jsx(Calendar, {
23
- mode: "single",
24
- selected: value,
25
- onSelect: onChange,
26
- initialFocus: true,
27
- ...calendarProps
28
- })
29
- })] });
11
+ const { id, value, onChange, placeholder = "Pick a date", showClearButton = true,...calendarProps } = props;
12
+ const [open, setOpen] = React.useState(false);
13
+ return /* @__PURE__ */ jsxs("div", {
14
+ className: "relative flex items-center",
15
+ children: [/* @__PURE__ */ jsxs(Popover, {
16
+ open,
17
+ onOpenChange: setOpen,
18
+ children: [/* @__PURE__ */ jsx(PopoverTrigger, {
19
+ asChild: true,
20
+ children: /* @__PURE__ */ jsxs(Button, {
21
+ id,
22
+ variant: "outline",
23
+ className: cn("w-full justify-start text-left font-normal", !value && "text-muted-foreground", showClearButton && value && "pr-8"),
24
+ children: [/* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }), value ? value.toLocaleDateString() : /* @__PURE__ */ jsx("span", { children: placeholder })]
25
+ })
26
+ }), /* @__PURE__ */ jsx(PopoverContent, {
27
+ className: "w-auto p-0",
28
+ children: /* @__PURE__ */ jsx(Calendar, {
29
+ mode: "single",
30
+ selected: value,
31
+ onSelect: (date) => {
32
+ onChange?.(date);
33
+ setOpen(false);
34
+ },
35
+ initialFocus: true,
36
+ ...calendarProps
37
+ })
38
+ })]
39
+ }), showClearButton && value && /* @__PURE__ */ jsx("button", {
40
+ type: "button",
41
+ "data-slot": "clear-button",
42
+ onClick: () => onChange?.(void 0),
43
+ className: "absolute right-2 text-muted-foreground hover:text-foreground",
44
+ "aria-label": "Clear date",
45
+ children: /* @__PURE__ */ jsx(XIcon, { className: "h-4 w-4" })
46
+ })]
47
+ });
30
48
  }
31
49
  DatePicker.displayName = "DatePicker";
32
50
 
@@ -1,12 +1,12 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
2
  const require_get_id = require('../utils/get-id.cjs');
3
3
  const require_variant_config = require('../variant-config.cjs');
4
+ const require_dialog_registry = require('../dialog-provider/dialog-registry.cjs');
5
+ require('../dialog-provider/index.cjs');
4
6
  let __pixpilot_shadcn = require("@pixpilot/shadcn");
5
7
  __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
6
8
  let react_jsx_runtime = require("react/jsx-runtime");
7
9
  react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
8
- let __ebay_nice_modal_react = require("@ebay/nice-modal-react");
9
- __ebay_nice_modal_react = require_rolldown_runtime.__toESM(__ebay_nice_modal_react);
10
10
 
11
11
  //#region src/confirmation-dialog/ConfirmationDialog.tsx
12
12
  const variantMap = {
@@ -15,9 +15,9 @@ const variantMap = {
15
15
  primary: "info",
16
16
  default: "default"
17
17
  };
18
- const ConfirmationDialog = __ebay_nice_modal_react.default.create((props) => {
18
+ const ConfirmationDialog = require_dialog_registry.dialog.create((props) => {
19
19
  const { id, title = "Confirmation Dialog", variant, showIcon = true } = props;
20
- const modal = (0, __ebay_nice_modal_react.useModal)();
20
+ const modal = require_dialog_registry.dialog.useDialog();
21
21
  const handleConfirm = () => {
22
22
  props.onConfirm?.();
23
23
  modal.resolve(true);
@@ -1,4 +1,4 @@
1
- import "react";
1
+ import "../index.cjs";
2
2
 
3
3
  //#region src/confirmation-dialog/ConfirmationDialog.d.ts
4
4
  type ConfirmationDialogVariant = 'destructive' | 'warning' | 'primary' | 'default';
@@ -1,5 +1,4 @@
1
- import "react";
2
- import "@ebay/nice-modal-react";
1
+ import "../index.js";
3
2
 
4
3
  //#region src/confirmation-dialog/ConfirmationDialog.d.ts
5
4
  type ConfirmationDialogVariant = 'destructive' | 'warning' | 'primary' | 'default';
@@ -1,8 +1,9 @@
1
1
  import { getId } from "../utils/get-id.js";
2
2
  import { variantConfig } from "../variant-config.js";
3
+ import { dialog } from "../dialog-provider/dialog-registry.js";
4
+ import "../dialog-provider/index.js";
3
5
  import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, cn } from "@pixpilot/shadcn";
4
6
  import { jsx, jsxs } from "react/jsx-runtime";
5
- import NiceModal, { useModal } from "@ebay/nice-modal-react";
6
7
 
7
8
  //#region src/confirmation-dialog/ConfirmationDialog.tsx
8
9
  const variantMap = {
@@ -11,9 +12,9 @@ const variantMap = {
11
12
  primary: "info",
12
13
  default: "default"
13
14
  };
14
- const ConfirmationDialog = NiceModal.create((props) => {
15
+ const ConfirmationDialog = dialog.create((props) => {
15
16
  const { id, title = "Confirmation Dialog", variant, showIcon = true } = props;
16
- const modal = useModal();
17
+ const modal = dialog.useDialog();
17
18
  const handleConfirm = () => {
18
19
  props.onConfirm?.();
19
20
  modal.resolve(true);
@@ -1,12 +1,15 @@
1
- const require_dialog_registry = require('../dialog-provider/dialog-registry.cjs');
2
- require('../dialog-provider/index.cjs');
3
1
  const require_ConfirmationDialog = require('./ConfirmationDialog.cjs');
4
2
 
5
3
  //#region src/confirmation-dialog/confirmation-dialogs.tsx
6
4
  async function showConfirmDialog(props) {
7
- const id = crypto.randomUUID();
8
- return require_dialog_registry.dialog.register(id, require_ConfirmationDialog.default).show(props);
5
+ return require_ConfirmationDialog.default.show(props);
9
6
  }
7
+ const confirmDialog = {
8
+ show: showConfirmDialog,
9
+ hide: require_ConfirmationDialog.default.hide,
10
+ remove: require_ConfirmationDialog.default.remove
11
+ };
10
12
 
11
13
  //#endregion
14
+ exports.confirmDialog = confirmDialog;
12
15
  exports.showConfirmDialog = showConfirmDialog;
@@ -3,5 +3,10 @@ import { ConfirmationDialogProps } from "./ConfirmationDialog.cjs";
3
3
  //#region src/confirmation-dialog/confirmation-dialogs.d.ts
4
4
  interface ConfirmDialog extends ConfirmationDialogProps {}
5
5
  declare function showConfirmDialog(props: ConfirmDialog): Promise<boolean>;
6
+ declare const confirmDialog: {
7
+ show: typeof showConfirmDialog;
8
+ hide: <TResult = unknown>() => Promise<TResult>;
9
+ remove: () => void;
10
+ };
6
11
  //#endregion
7
- export { showConfirmDialog };
12
+ export { confirmDialog, showConfirmDialog };
@@ -3,5 +3,10 @@ import { ConfirmationDialogProps } from "./ConfirmationDialog.js";
3
3
  //#region src/confirmation-dialog/confirmation-dialogs.d.ts
4
4
  interface ConfirmDialog extends ConfirmationDialogProps {}
5
5
  declare function showConfirmDialog(props: ConfirmDialog): Promise<boolean>;
6
+ declare const confirmDialog: {
7
+ show: typeof showConfirmDialog;
8
+ hide: <TResult = unknown>() => Promise<TResult>;
9
+ remove: () => void;
10
+ };
6
11
  //#endregion
7
- export { showConfirmDialog };
12
+ export { confirmDialog, showConfirmDialog };
@@ -1,12 +1,14 @@
1
- import { dialog } from "../dialog-provider/dialog-registry.js";
2
- import "../dialog-provider/index.js";
3
1
  import ConfirmationDialog_default from "./ConfirmationDialog.js";
4
2
 
5
3
  //#region src/confirmation-dialog/confirmation-dialogs.tsx
6
4
  async function showConfirmDialog(props) {
7
- const id = crypto.randomUUID();
8
- return dialog.register(id, ConfirmationDialog_default).show(props);
5
+ return ConfirmationDialog_default.show(props);
9
6
  }
7
+ const confirmDialog = {
8
+ show: showConfirmDialog,
9
+ hide: ConfirmationDialog_default.hide,
10
+ remove: ConfirmationDialog_default.remove
11
+ };
10
12
 
11
13
  //#endregion
12
- export { showConfirmDialog };
14
+ export { confirmDialog, showConfirmDialog };
@@ -1,2 +1,2 @@
1
1
  import { ConfirmationDialogProps, ConfirmationDialogVariant } from "./ConfirmationDialog.cjs";
2
- import { showConfirmDialog } from "./confirmation-dialogs.cjs";
2
+ import { confirmDialog, showConfirmDialog } from "./confirmation-dialogs.cjs";
@@ -1,2 +1,2 @@
1
1
  import { ConfirmationDialogProps, ConfirmationDialogVariant } from "./ConfirmationDialog.js";
2
- import { showConfirmDialog } from "./confirmation-dialogs.js";
2
+ import { confirmDialog, showConfirmDialog } from "./confirmation-dialogs.js";
@@ -2,4 +2,4 @@
2
2
 
3
3
 
4
4
  import "./ConfirmationDialog.js";
5
- import { showConfirmDialog } from "./confirmation-dialogs.js";
5
+ import { confirmDialog, showConfirmDialog } from "./confirmation-dialogs.js";
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime11 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime10 from "react/jsx-runtime";
2
2
  import { DialogClose, DialogContent } from "@pixpilot/shadcn";
3
3
  import * as React$1 from "react";
4
4
 
@@ -10,18 +10,18 @@ declare const DialogContent$1: React$1.ForwardRefExoticComponent<DialogContentPr
10
10
  declare function DialogHeader({
11
11
  className,
12
12
  ...props
13
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime11.JSX.Element;
13
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime10.JSX.Element;
14
14
  declare function DialogBody({
15
15
  className,
16
16
  ...props
17
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime11.JSX.Element;
17
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime10.JSX.Element;
18
18
  declare function DialogFooter({
19
19
  className,
20
20
  ...props
21
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime11.JSX.Element;
21
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime10.JSX.Element;
22
22
  declare function DialogClose$1({
23
23
  className,
24
24
  ...props
25
- }: React$1.ComponentPropsWithoutRef<typeof DialogClose>): react_jsx_runtime11.JSX.Element;
25
+ }: React$1.ComponentPropsWithoutRef<typeof DialogClose>): react_jsx_runtime10.JSX.Element;
26
26
  //#endregion
27
27
  export { DialogBody, DialogClose$1 as DialogClose, DialogContent$1 as DialogContent, DialogContentProps, DialogFooter, DialogHeader };
@@ -5,6 +5,17 @@ let __ebay_nice_modal_react = require("@ebay/nice-modal-react");
5
5
  __ebay_nice_modal_react = require_rolldown_runtime.__toESM(__ebay_nice_modal_react);
6
6
 
7
7
  //#region src/dialog-provider/dialog-registry.ts
8
+ const useDialog = __ebay_nice_modal_react.useModal;
9
+ function createDialog(component) {
10
+ const CreatedDialog = __ebay_nice_modal_react.default.create(component);
11
+ return Object.assign(CreatedDialog, {
12
+ show: async (props) => __ebay_nice_modal_react.default.show(CreatedDialog, props),
13
+ hide: async () => __ebay_nice_modal_react.default.hide(CreatedDialog),
14
+ remove: () => {
15
+ __ebay_nice_modal_react.default.remove(CreatedDialog);
16
+ }
17
+ });
18
+ }
8
19
  /**
9
20
  * Hides a registered dialog by id.
10
21
  *
@@ -71,15 +82,19 @@ function unregisterDialog(id) {
71
82
  * ```
72
83
  */
73
84
  const dialog = {
85
+ create: createDialog,
74
86
  hide: hideDialog,
75
87
  register: require_register_dialog.registerDialog,
76
88
  remove: removeDialog,
77
89
  show: require_show_dialog.showDialog,
78
- unregister: unregisterDialog
90
+ unregister: unregisterDialog,
91
+ useDialog
79
92
  };
80
93
 
81
94
  //#endregion
95
+ exports.createDialog = createDialog;
82
96
  exports.dialog = dialog;
83
97
  exports.hideDialog = hideDialog;
84
98
  exports.removeDialog = removeDialog;
85
- exports.unregisterDialog = unregisterDialog;
99
+ exports.unregisterDialog = unregisterDialog;
100
+ exports.useDialog = useDialog;
@@ -1,8 +1,16 @@
1
1
  import { registerDialog } from "./register-dialog.cjs";
2
2
  import { showDialog } from "./show-dialog.cjs";
3
+ import { ComponentType, FC } from "react";
4
+ import { NiceModalHocProps, useModal } from "@ebay/nice-modal-react";
3
5
 
4
6
  //#region src/dialog-provider/dialog-registry.d.ts
5
-
7
+ declare const useDialog: typeof useModal;
8
+ interface CreatedDialog<TProps extends object> extends FC<TProps & NiceModalHocProps> {
9
+ show: <TResult = unknown>(props?: TProps) => Promise<TResult>;
10
+ hide: <TResult = unknown>() => Promise<TResult>;
11
+ remove: () => void;
12
+ }
13
+ declare function createDialog<TProps extends object>(component: ComponentType<TProps>): CreatedDialog<TProps>;
6
14
  /**
7
15
  * Hides a registered dialog by id.
8
16
  *
@@ -57,6 +65,23 @@ interface DialogRegistry {
57
65
  * ```
58
66
  */
59
67
  register: typeof registerDialog;
68
+ /**
69
+ * Creates a custom NiceModal dialog component with controller helpers.
70
+ *
71
+ * Use this for dialogs that need to control `useDialog()` directly. For simple
72
+ * shadcn dialogs, prefer `dialog.register(...)`.
73
+ *
74
+ * Usage:
75
+ * ```ts
76
+ * const CustomDialog = dialog.create((props) => {
77
+ * const modal = dialog.useDialog();
78
+ * return <Dialog open={modal.visible} onOpenChange={(open) => !open && modal.hide()} />;
79
+ * });
80
+ *
81
+ * await CustomDialog.show({ projectId: 'project-1' });
82
+ * ```
83
+ */
84
+ create: typeof createDialog;
60
85
  /**
61
86
  * Shows a registered dialog by id with generic props.
62
87
  *
@@ -101,6 +126,7 @@ interface DialogRegistry {
101
126
  * ```
102
127
  */
103
128
  unregister: typeof unregisterDialog;
129
+ useDialog: typeof useDialog;
104
130
  }
105
131
  /**
106
132
  * Convenience registry facade for dialog operations.
@@ -121,4 +147,4 @@ interface DialogRegistry {
121
147
  */
122
148
  declare const dialog: DialogRegistry;
123
149
  //#endregion
124
- export { DialogRegistry, dialog, hideDialog, removeDialog, unregisterDialog };
150
+ export { CreatedDialog, DialogRegistry, createDialog, dialog, hideDialog, removeDialog, unregisterDialog, useDialog };
@@ -1,8 +1,16 @@
1
1
  import { registerDialog } from "./register-dialog.js";
2
2
  import { showDialog } from "./show-dialog.js";
3
+ import { ComponentType, FC } from "react";
4
+ import { NiceModalHocProps, useModal } from "@ebay/nice-modal-react";
3
5
 
4
6
  //#region src/dialog-provider/dialog-registry.d.ts
5
-
7
+ declare const useDialog: typeof useModal;
8
+ interface CreatedDialog<TProps extends object> extends FC<TProps & NiceModalHocProps> {
9
+ show: <TResult = unknown>(props?: TProps) => Promise<TResult>;
10
+ hide: <TResult = unknown>() => Promise<TResult>;
11
+ remove: () => void;
12
+ }
13
+ declare function createDialog<TProps extends object>(component: ComponentType<TProps>): CreatedDialog<TProps>;
6
14
  /**
7
15
  * Hides a registered dialog by id.
8
16
  *
@@ -57,6 +65,23 @@ interface DialogRegistry {
57
65
  * ```
58
66
  */
59
67
  register: typeof registerDialog;
68
+ /**
69
+ * Creates a custom NiceModal dialog component with controller helpers.
70
+ *
71
+ * Use this for dialogs that need to control `useDialog()` directly. For simple
72
+ * shadcn dialogs, prefer `dialog.register(...)`.
73
+ *
74
+ * Usage:
75
+ * ```ts
76
+ * const CustomDialog = dialog.create((props) => {
77
+ * const modal = dialog.useDialog();
78
+ * return <Dialog open={modal.visible} onOpenChange={(open) => !open && modal.hide()} />;
79
+ * });
80
+ *
81
+ * await CustomDialog.show({ projectId: 'project-1' });
82
+ * ```
83
+ */
84
+ create: typeof createDialog;
60
85
  /**
61
86
  * Shows a registered dialog by id with generic props.
62
87
  *
@@ -101,6 +126,7 @@ interface DialogRegistry {
101
126
  * ```
102
127
  */
103
128
  unregister: typeof unregisterDialog;
129
+ useDialog: typeof useDialog;
104
130
  }
105
131
  /**
106
132
  * Convenience registry facade for dialog operations.
@@ -121,4 +147,4 @@ interface DialogRegistry {
121
147
  */
122
148
  declare const dialog: DialogRegistry;
123
149
  //#endregion
124
- export { DialogRegistry, dialog, hideDialog, removeDialog, unregisterDialog };
150
+ export { CreatedDialog, DialogRegistry, createDialog, dialog, hideDialog, removeDialog, unregisterDialog, useDialog };
@@ -1,8 +1,19 @@
1
1
  import { registerDialog } from "./register-dialog.js";
2
2
  import { showDialog } from "./show-dialog.js";
3
- import NiceModal, { unregister } from "@ebay/nice-modal-react";
3
+ import NiceModal, { unregister, useModal } from "@ebay/nice-modal-react";
4
4
 
5
5
  //#region src/dialog-provider/dialog-registry.ts
6
+ const useDialog = useModal;
7
+ function createDialog(component) {
8
+ const CreatedDialog = NiceModal.create(component);
9
+ return Object.assign(CreatedDialog, {
10
+ show: async (props) => NiceModal.show(CreatedDialog, props),
11
+ hide: async () => NiceModal.hide(CreatedDialog),
12
+ remove: () => {
13
+ NiceModal.remove(CreatedDialog);
14
+ }
15
+ });
16
+ }
6
17
  /**
7
18
  * Hides a registered dialog by id.
8
19
  *
@@ -69,12 +80,14 @@ function unregisterDialog(id) {
69
80
  * ```
70
81
  */
71
82
  const dialog = {
83
+ create: createDialog,
72
84
  hide: hideDialog,
73
85
  register: registerDialog,
74
86
  remove: removeDialog,
75
87
  show: showDialog,
76
- unregister: unregisterDialog
88
+ unregister: unregisterDialog,
89
+ useDialog
77
90
  };
78
91
 
79
92
  //#endregion
80
- export { dialog, hideDialog, removeDialog, unregisterDialog };
93
+ export { createDialog, dialog, hideDialog, removeDialog, unregisterDialog, useDialog };
@@ -1,4 +1,4 @@
1
- import { RegisteredDialog, RegisteredDialogShowProps, registerDialog } from "./register-dialog.cjs";
1
+ import { RegisteredDialog, RegisteredDialogInjectedProps, RegisteredDialogShowProps, registerDialog } from "./register-dialog.cjs";
2
2
  import { ShowDialogProps, showDialog } from "./show-dialog.cjs";
3
- import { DialogRegistry, dialog, hideDialog, removeDialog, unregisterDialog } from "./dialog-registry.cjs";
3
+ import { CreatedDialog, DialogRegistry, createDialog, dialog, hideDialog, removeDialog, unregisterDialog, useDialog } from "./dialog-registry.cjs";
4
4
  import { DialogProvider, DialogProviderProps } from "./DialogProvider.cjs";
@@ -1,4 +1,4 @@
1
- import { RegisteredDialog, RegisteredDialogShowProps, registerDialog } from "./register-dialog.js";
1
+ import { RegisteredDialog, RegisteredDialogInjectedProps, RegisteredDialogShowProps, registerDialog } from "./register-dialog.js";
2
2
  import { ShowDialogProps, showDialog } from "./show-dialog.js";
3
- import { DialogRegistry, dialog, hideDialog, removeDialog, unregisterDialog } from "./dialog-registry.js";
3
+ import { CreatedDialog, DialogRegistry, createDialog, dialog, hideDialog, removeDialog, unregisterDialog, useDialog } from "./dialog-registry.js";
4
4
  import { DialogProvider, DialogProviderProps } from "./DialogProvider.js";
@@ -1,4 +1,4 @@
1
1
  import { registerDialog } from "./register-dialog.js";
2
2
  import { showDialog } from "./show-dialog.js";
3
- import { dialog, hideDialog, removeDialog, unregisterDialog } from "./dialog-registry.js";
3
+ import { createDialog, dialog, hideDialog, removeDialog, unregisterDialog, useDialog } from "./dialog-registry.js";
4
4
  import { DialogProvider } from "./DialogProvider.js";
@@ -1,16 +1,21 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ let react = require("react");
3
+ react = require_rolldown_runtime.__toESM(react);
2
4
  let __ebay_nice_modal_react = require("@ebay/nice-modal-react");
3
5
  __ebay_nice_modal_react = require_rolldown_runtime.__toESM(__ebay_nice_modal_react);
4
6
 
5
7
  //#region src/dialog-provider/register-dialog.ts
6
8
  /**
7
- * Registers a NiceModal dialog component and returns a typed controller for it.
9
+ * Registers a dialog component and returns a typed controller for it.
8
10
  *
9
11
  * Use this when a dialog has a known component and you want type-safe props for
10
- * default values and `show(...)` calls.
12
+ * default values and `show(...)` calls. The component is wrapped with
13
+ * NiceModal automatically, and receives controlled `open` and `onOpenChange`
14
+ * props.
11
15
  *
12
16
  * @param id - Stable dialog id used by NiceModal and by generic `showDialog`.
13
- * @param component - Dialog component, usually created with `NiceModal.create`.
17
+ * @param component - Dialog component. Use `dialog.create(...)` instead when a
18
+ * component needs custom NiceModal lifecycle behavior.
14
19
  * @param defaultProps - Optional component props registered as defaults.
15
20
  * @returns A controller with `id`, `show`, `hide`, and `remove` helpers.
16
21
  *
@@ -26,7 +31,25 @@ __ebay_nice_modal_react = require_rolldown_runtime.__toESM(__ebay_nice_modal_rea
26
31
  * ```
27
32
  */
28
33
  function registerDialog(id, component, defaultProps) {
29
- __ebay_nice_modal_react.default.register(id, component, defaultProps);
34
+ const WrappedDialog = __ebay_nice_modal_react.default.create((props) => {
35
+ const modal = (0, __ebay_nice_modal_react.useModal)();
36
+ const { open: _open, onOpenChange,...componentProps } = props;
37
+ const Component = component;
38
+ const handleClose = (result) => {
39
+ modal.resolve(result);
40
+ modal.hide();
41
+ };
42
+ return react.default.createElement(Component, {
43
+ ...componentProps,
44
+ open: modal.visible,
45
+ onOpenChange: (isOpen) => {
46
+ onOpenChange?.(isOpen);
47
+ if (!isOpen) handleClose("Closed");
48
+ }
49
+ });
50
+ });
51
+ WrappedDialog.displayName = `RegisteredDialog(${component.displayName ?? component.name ?? id})`;
52
+ __ebay_nice_modal_react.default.register(id, WrappedDialog, defaultProps);
30
53
  return {
31
54
  id,
32
55
  show: async (props) => __ebay_nice_modal_react.default.show(id, props),
@@ -3,12 +3,18 @@ import { NiceModalHocProps } from "@ebay/nice-modal-react";
3
3
 
4
4
  //#region src/dialog-provider/register-dialog.d.ts
5
5
  type NiceModalInjectedKeys = keyof NiceModalHocProps;
6
+ type DialogInjectedKeys = 'open' | 'onOpenChange';
7
+ type RegisteredDialogInjectedKeys = NiceModalInjectedKeys | DialogInjectedKeys;
8
+ interface RegisteredDialogInjectedProps {
9
+ open?: boolean;
10
+ onOpenChange?: (isOpen: boolean) => void;
11
+ }
6
12
  type Pretty<TValue> = { [TKey in keyof TValue]: TValue[TKey] } & {};
7
- type OptionalNiceModalProps<TProps extends object> = Pretty<Omit<TProps, Extract<keyof TProps, NiceModalInjectedKeys>> & Partial<Pick<TProps, Extract<keyof TProps, NiceModalInjectedKeys>>>>;
13
+ type OptionalRegisteredDialogProps<TProps extends object> = Pretty<Omit<TProps, Extract<keyof TProps, RegisteredDialogInjectedKeys>> & Partial<Pick<TProps, Extract<keyof TProps, RegisteredDialogInjectedKeys>>>>;
8
14
  type DefaultedDialogProps<TProps extends object, TDefaultProps extends Partial<TProps>> = Pretty<Omit<TProps, keyof TDefaultProps> & Partial<Pick<TProps, Extract<keyof TProps, keyof TDefaultProps>>>>;
9
15
  type EmptyDialogDefaultProps = Record<never, never>;
10
- type RegisteredDialogShowProps<TProps extends object, TDefaultProps extends Partial<OptionalNiceModalProps<TProps>> = EmptyDialogDefaultProps> = DefaultedDialogProps<OptionalNiceModalProps<TProps>, TDefaultProps>;
11
- interface RegisteredDialog<TProps extends object, TDefaultProps extends Partial<OptionalNiceModalProps<TProps>> = EmptyDialogDefaultProps> {
16
+ type RegisteredDialogShowProps<TProps extends object, TDefaultProps extends Partial<OptionalRegisteredDialogProps<TProps>> = EmptyDialogDefaultProps> = DefaultedDialogProps<OptionalRegisteredDialogProps<TProps>, TDefaultProps>;
17
+ interface RegisteredDialog<TProps extends object, TDefaultProps extends Partial<OptionalRegisteredDialogProps<TProps>> = EmptyDialogDefaultProps> {
12
18
  /**
13
19
  * The stable NiceModal id used to register, show, hide, and remove this dialog.
14
20
  *
@@ -63,13 +69,16 @@ interface RegisteredDialog<TProps extends object, TDefaultProps extends Partial<
63
69
  remove: () => void;
64
70
  }
65
71
  /**
66
- * Registers a NiceModal dialog component and returns a typed controller for it.
72
+ * Registers a dialog component and returns a typed controller for it.
67
73
  *
68
74
  * Use this when a dialog has a known component and you want type-safe props for
69
- * default values and `show(...)` calls.
75
+ * default values and `show(...)` calls. The component is wrapped with
76
+ * NiceModal automatically, and receives controlled `open` and `onOpenChange`
77
+ * props.
70
78
  *
71
79
  * @param id - Stable dialog id used by NiceModal and by generic `showDialog`.
72
- * @param component - Dialog component, usually created with `NiceModal.create`.
80
+ * @param component - Dialog component. Use `dialog.create(...)` instead when a
81
+ * component needs custom NiceModal lifecycle behavior.
73
82
  * @param defaultProps - Optional component props registered as defaults.
74
83
  * @returns A controller with `id`, `show`, `hide`, and `remove` helpers.
75
84
  *
@@ -84,6 +93,6 @@ interface RegisteredDialog<TProps extends object, TDefaultProps extends Partial<
84
93
  * });
85
94
  * ```
86
95
  */
87
- declare function registerDialog<TProps extends object, TDefaultProps extends Partial<OptionalNiceModalProps<TProps>> = EmptyDialogDefaultProps>(id: string, component: React.FC<TProps>, defaultProps?: TDefaultProps): RegisteredDialog<TProps, TDefaultProps>;
96
+ declare function registerDialog<TProps extends object, TDefaultProps extends Partial<OptionalRegisteredDialogProps<TProps>> = EmptyDialogDefaultProps>(id: string, component: React.FC<TProps>, defaultProps?: TDefaultProps): RegisteredDialog<TProps, TDefaultProps>;
88
97
  //#endregion
89
- export { RegisteredDialog, RegisteredDialogShowProps, registerDialog };
98
+ export { RegisteredDialog, RegisteredDialogInjectedProps, RegisteredDialogShowProps, registerDialog };
@@ -3,12 +3,18 @@ import { NiceModalHocProps } from "@ebay/nice-modal-react";
3
3
 
4
4
  //#region src/dialog-provider/register-dialog.d.ts
5
5
  type NiceModalInjectedKeys = keyof NiceModalHocProps;
6
+ type DialogInjectedKeys = 'open' | 'onOpenChange';
7
+ type RegisteredDialogInjectedKeys = NiceModalInjectedKeys | DialogInjectedKeys;
8
+ interface RegisteredDialogInjectedProps {
9
+ open?: boolean;
10
+ onOpenChange?: (isOpen: boolean) => void;
11
+ }
6
12
  type Pretty<TValue> = { [TKey in keyof TValue]: TValue[TKey] } & {};
7
- type OptionalNiceModalProps<TProps extends object> = Pretty<Omit<TProps, Extract<keyof TProps, NiceModalInjectedKeys>> & Partial<Pick<TProps, Extract<keyof TProps, NiceModalInjectedKeys>>>>;
13
+ type OptionalRegisteredDialogProps<TProps extends object> = Pretty<Omit<TProps, Extract<keyof TProps, RegisteredDialogInjectedKeys>> & Partial<Pick<TProps, Extract<keyof TProps, RegisteredDialogInjectedKeys>>>>;
8
14
  type DefaultedDialogProps<TProps extends object, TDefaultProps extends Partial<TProps>> = Pretty<Omit<TProps, keyof TDefaultProps> & Partial<Pick<TProps, Extract<keyof TProps, keyof TDefaultProps>>>>;
9
15
  type EmptyDialogDefaultProps = Record<never, never>;
10
- type RegisteredDialogShowProps<TProps extends object, TDefaultProps extends Partial<OptionalNiceModalProps<TProps>> = EmptyDialogDefaultProps> = DefaultedDialogProps<OptionalNiceModalProps<TProps>, TDefaultProps>;
11
- interface RegisteredDialog<TProps extends object, TDefaultProps extends Partial<OptionalNiceModalProps<TProps>> = EmptyDialogDefaultProps> {
16
+ type RegisteredDialogShowProps<TProps extends object, TDefaultProps extends Partial<OptionalRegisteredDialogProps<TProps>> = EmptyDialogDefaultProps> = DefaultedDialogProps<OptionalRegisteredDialogProps<TProps>, TDefaultProps>;
17
+ interface RegisteredDialog<TProps extends object, TDefaultProps extends Partial<OptionalRegisteredDialogProps<TProps>> = EmptyDialogDefaultProps> {
12
18
  /**
13
19
  * The stable NiceModal id used to register, show, hide, and remove this dialog.
14
20
  *
@@ -63,13 +69,16 @@ interface RegisteredDialog<TProps extends object, TDefaultProps extends Partial<
63
69
  remove: () => void;
64
70
  }
65
71
  /**
66
- * Registers a NiceModal dialog component and returns a typed controller for it.
72
+ * Registers a dialog component and returns a typed controller for it.
67
73
  *
68
74
  * Use this when a dialog has a known component and you want type-safe props for
69
- * default values and `show(...)` calls.
75
+ * default values and `show(...)` calls. The component is wrapped with
76
+ * NiceModal automatically, and receives controlled `open` and `onOpenChange`
77
+ * props.
70
78
  *
71
79
  * @param id - Stable dialog id used by NiceModal and by generic `showDialog`.
72
- * @param component - Dialog component, usually created with `NiceModal.create`.
80
+ * @param component - Dialog component. Use `dialog.create(...)` instead when a
81
+ * component needs custom NiceModal lifecycle behavior.
73
82
  * @param defaultProps - Optional component props registered as defaults.
74
83
  * @returns A controller with `id`, `show`, `hide`, and `remove` helpers.
75
84
  *
@@ -84,6 +93,6 @@ interface RegisteredDialog<TProps extends object, TDefaultProps extends Partial<
84
93
  * });
85
94
  * ```
86
95
  */
87
- declare function registerDialog<TProps extends object, TDefaultProps extends Partial<OptionalNiceModalProps<TProps>> = EmptyDialogDefaultProps>(id: string, component: React.FC<TProps>, defaultProps?: TDefaultProps): RegisteredDialog<TProps, TDefaultProps>;
96
+ declare function registerDialog<TProps extends object, TDefaultProps extends Partial<OptionalRegisteredDialogProps<TProps>> = EmptyDialogDefaultProps>(id: string, component: React.FC<TProps>, defaultProps?: TDefaultProps): RegisteredDialog<TProps, TDefaultProps>;
88
97
  //#endregion
89
- export { RegisteredDialog, RegisteredDialogShowProps, registerDialog };
98
+ export { RegisteredDialog, RegisteredDialogInjectedProps, RegisteredDialogShowProps, registerDialog };
@@ -1,14 +1,18 @@
1
- import NiceModal from "@ebay/nice-modal-react";
1
+ import React from "react";
2
+ import NiceModal, { useModal } from "@ebay/nice-modal-react";
2
3
 
3
4
  //#region src/dialog-provider/register-dialog.ts
4
5
  /**
5
- * Registers a NiceModal dialog component and returns a typed controller for it.
6
+ * Registers a dialog component and returns a typed controller for it.
6
7
  *
7
8
  * Use this when a dialog has a known component and you want type-safe props for
8
- * default values and `show(...)` calls.
9
+ * default values and `show(...)` calls. The component is wrapped with
10
+ * NiceModal automatically, and receives controlled `open` and `onOpenChange`
11
+ * props.
9
12
  *
10
13
  * @param id - Stable dialog id used by NiceModal and by generic `showDialog`.
11
- * @param component - Dialog component, usually created with `NiceModal.create`.
14
+ * @param component - Dialog component. Use `dialog.create(...)` instead when a
15
+ * component needs custom NiceModal lifecycle behavior.
12
16
  * @param defaultProps - Optional component props registered as defaults.
13
17
  * @returns A controller with `id`, `show`, `hide`, and `remove` helpers.
14
18
  *
@@ -24,7 +28,25 @@ import NiceModal from "@ebay/nice-modal-react";
24
28
  * ```
25
29
  */
26
30
  function registerDialog(id, component, defaultProps) {
27
- NiceModal.register(id, component, defaultProps);
31
+ const WrappedDialog = NiceModal.create((props) => {
32
+ const modal = useModal();
33
+ const { open: _open, onOpenChange,...componentProps } = props;
34
+ const Component = component;
35
+ const handleClose = (result) => {
36
+ modal.resolve(result);
37
+ modal.hide();
38
+ };
39
+ return React.createElement(Component, {
40
+ ...componentProps,
41
+ open: modal.visible,
42
+ onOpenChange: (isOpen) => {
43
+ onOpenChange?.(isOpen);
44
+ if (!isOpen) handleClose("Closed");
45
+ }
46
+ });
47
+ });
48
+ WrappedDialog.displayName = `RegisteredDialog(${component.displayName ?? component.name ?? id})`;
49
+ NiceModal.register(id, WrappedDialog, defaultProps);
28
50
  return {
29
51
  id,
30
52
  show: async (props) => NiceModal.show(id, props),
@@ -1,7 +1,7 @@
1
1
  import { FileUploadProps } from "./types/index.cjs";
2
- import * as react_jsx_runtime10 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime17 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/file-upload/FileUpload.d.ts
5
- declare function FileUpload(props: FileUploadProps): react_jsx_runtime10.JSX.Element;
5
+ declare function FileUpload(props: FileUploadProps): react_jsx_runtime17.JSX.Element;
6
6
  //#endregion
7
7
  export { FileUpload };
package/dist/index.cjs CHANGED
@@ -212,6 +212,8 @@ Object.defineProperty(exports, 'ToggleGroupItem', {
212
212
  }
213
213
  });
214
214
  exports.cn = __pixpilot_shadcn.cn;
215
+ exports.confirmDialog = require_confirmation_dialogs.confirmDialog;
216
+ exports.createDialog = require_dialog_registry.createDialog;
215
217
  exports.dialog = require_dialog_registry.dialog;
216
218
  exports.getId = require_get_id.getId;
217
219
  exports.hideDialog = require_dialog_registry.hideDialog;
@@ -225,6 +227,7 @@ exports.toast = require_toast.toast;
225
227
  exports.unregisterDialog = require_dialog_registry.unregisterDialog;
226
228
  exports.useColorPickerContext = require_color_picker_context.useColorPickerContext;
227
229
  exports.useDelayedVisibility = require_use_delayed_visibility.useDelayedVisibility;
230
+ exports.useDialog = require_dialog_registry.useDialog;
228
231
  exports.useMediaQuery = require_use_media_query.useMediaQuery;
229
232
  exports.useSelectKeyboard = require_use_select_keyboard.useSelectKeyboard;
230
233
  exports.useTabsContext = require_TabsContext.useTabsContext;
package/dist/index.d.cts CHANGED
@@ -35,15 +35,15 @@ import "./ColorPickerBase/index.cjs";
35
35
  import { BaseColorSelectProps, ColorSelect, ColorSelectOption } from "./ColorSelect.cjs";
36
36
  import { Combobox } from "./Combobox.cjs";
37
37
  import { ConfirmationDialogProps, ConfirmationDialogVariant } from "./confirmation-dialog/ConfirmationDialog.cjs";
38
- import { showConfirmDialog } from "./confirmation-dialog/confirmation-dialogs.cjs";
38
+ import { confirmDialog, showConfirmDialog } from "./confirmation-dialog/confirmation-dialogs.cjs";
39
39
  import "./confirmation-dialog/index.cjs";
40
40
  import { ContentCard } from "./ContentCard.cjs";
41
41
  import { DatePicker, DatePickerProps } from "./DatePicker.cjs";
42
42
  import { DialogBody, DialogClose, DialogContent, DialogContentProps, DialogFooter, DialogHeader } from "./dialog/Dialog.cjs";
43
43
  import { Dialog, DialogDescription, DialogTitle, DialogTrigger } from "./dialog/index.cjs";
44
- import { RegisteredDialog, RegisteredDialogShowProps, registerDialog } from "./dialog-provider/register-dialog.cjs";
44
+ import { RegisteredDialog, RegisteredDialogInjectedProps, RegisteredDialogShowProps, registerDialog } from "./dialog-provider/register-dialog.cjs";
45
45
  import { ShowDialogProps, showDialog } from "./dialog-provider/show-dialog.cjs";
46
- import { DialogRegistry, dialog, hideDialog, removeDialog, unregisterDialog } from "./dialog-provider/dialog-registry.cjs";
46
+ import { CreatedDialog, DialogRegistry, createDialog, dialog, hideDialog, removeDialog, unregisterDialog, useDialog } from "./dialog-provider/dialog-registry.cjs";
47
47
  import { DialogProvider, DialogProviderProps } from "./dialog-provider/DialogProvider.cjs";
48
48
  import "./dialog-provider/index.cjs";
49
49
  import { FileUploadRootItem, FileUploadRootItemProps } from "./file-upload-root/FileUploadRootItem.cjs";
@@ -108,4 +108,4 @@ import { ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, T
108
108
  import { getId } from "./utils/get-id.cjs";
109
109
  import { isSvgMarkupString, svgMarkupToMaskUrl } from "./utils/svg.cjs";
110
110
  import { cn } from "@pixpilot/shadcn";
111
- export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertToastProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonExtended, ButtonExtendedLoaderProps, ButtonExtendedProps, ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, ButtonProps, COLOR_PICKER_PALETTE_BUTTON_CLASSES, COMMON_COLORS, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerButton, ColorPickerButtonProps, ColorPickerColorPalette, ColorPickerColorPaletteProps, ColorPickerCompactControls, ColorPickerCompactControlsProps, ColorPickerContent, ColorPickerContentProps, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerContextStates, ColorPickerControls, ColorPickerControlsProps, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatControlsProps, ColorPickerFormatInput, ColorPickerFormatInputProps, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerFullControlsProps, ColorPickerHueSlider, ColorPickerInput, ColorPickerInputProps, ColorPickerPaletteButton, ColorPickerPaletteButtonProps, ColorPickerPaletteSwatch, ColorPickerProps, ColorPickerResetOptions, ColorPickerRoot, ColorPickerRootProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ConfirmationDialogVariant, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogRegistry, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadCallbacks, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, FileUploadRoot, FileUploadRootItem, FileUploadRootItemProps, FileUploadRootProps, FileUploadRootPropsBaseProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoadingOverlay, LoadingOverlayProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverContentUnstyled, PopoverTrigger, PresetColor, Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps, RegisteredDialog, RegisteredDialogShowProps, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectContentProps, SelectOption, ShowDialogProps, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputInline, TagsInputInlineItem, TagsInputInlineProps, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastFunction, ToastMessage, Toaster, ToggleButton, ToggleButtonProps, ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue, ToolbarItems, UseDelayedVisibilityOptions, UseDelayedVisibilityResult, cn, dialog, getId, hideDialog, isSvgMarkupString, registerDialog, removeDialog, showConfirmDialog, showDialog, svgMarkupToMaskUrl, toast, unregisterDialog, useColorPickerContext, useDelayedVisibility, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
111
+ export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertToastProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonExtended, ButtonExtendedLoaderProps, ButtonExtendedProps, ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, ButtonProps, COLOR_PICKER_PALETTE_BUTTON_CLASSES, COMMON_COLORS, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerButton, ColorPickerButtonProps, ColorPickerColorPalette, ColorPickerColorPaletteProps, ColorPickerCompactControls, ColorPickerCompactControlsProps, ColorPickerContent, ColorPickerContentProps, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerContextStates, ColorPickerControls, ColorPickerControlsProps, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatControlsProps, ColorPickerFormatInput, ColorPickerFormatInputProps, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerFullControlsProps, ColorPickerHueSlider, ColorPickerInput, ColorPickerInputProps, ColorPickerPaletteButton, ColorPickerPaletteButtonProps, ColorPickerPaletteSwatch, ColorPickerProps, ColorPickerResetOptions, ColorPickerRoot, ColorPickerRootProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ConfirmationDialogVariant, ContentCard, CreatedDialog, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogRegistry, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadCallbacks, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, FileUploadRoot, FileUploadRootItem, FileUploadRootItemProps, FileUploadRootProps, FileUploadRootPropsBaseProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoadingOverlay, LoadingOverlayProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverContentUnstyled, PopoverTrigger, PresetColor, Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps, RegisteredDialog, RegisteredDialogInjectedProps, RegisteredDialogShowProps, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectContentProps, SelectOption, ShowDialogProps, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputInline, TagsInputInlineItem, TagsInputInlineProps, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastFunction, ToastMessage, Toaster, ToggleButton, ToggleButtonProps, ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue, ToolbarItems, UseDelayedVisibilityOptions, UseDelayedVisibilityResult, cn, confirmDialog, createDialog, dialog, getId, hideDialog, isSvgMarkupString, registerDialog, removeDialog, showConfirmDialog, showDialog, svgMarkupToMaskUrl, toast, unregisterDialog, useColorPickerContext, useDelayedVisibility, useDialog, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
package/dist/index.d.ts CHANGED
@@ -35,15 +35,15 @@ import "./ColorPickerBase/index.js";
35
35
  import { BaseColorSelectProps, ColorSelect, ColorSelectOption } from "./ColorSelect.js";
36
36
  import { Combobox } from "./Combobox.js";
37
37
  import { ConfirmationDialogProps, ConfirmationDialogVariant } from "./confirmation-dialog/ConfirmationDialog.js";
38
- import { showConfirmDialog } from "./confirmation-dialog/confirmation-dialogs.js";
38
+ import { confirmDialog, showConfirmDialog } from "./confirmation-dialog/confirmation-dialogs.js";
39
39
  import "./confirmation-dialog/index.js";
40
40
  import { ContentCard } from "./ContentCard.js";
41
41
  import { DatePicker, DatePickerProps } from "./DatePicker.js";
42
42
  import { DialogBody, DialogClose, DialogContent, DialogContentProps, DialogFooter, DialogHeader } from "./dialog/Dialog.js";
43
43
  import { Dialog, DialogDescription, DialogTitle, DialogTrigger } from "./dialog/index.js";
44
- import { RegisteredDialog, RegisteredDialogShowProps, registerDialog } from "./dialog-provider/register-dialog.js";
44
+ import { RegisteredDialog, RegisteredDialogInjectedProps, RegisteredDialogShowProps, registerDialog } from "./dialog-provider/register-dialog.js";
45
45
  import { ShowDialogProps, showDialog } from "./dialog-provider/show-dialog.js";
46
- import { DialogRegistry, dialog, hideDialog, removeDialog, unregisterDialog } from "./dialog-provider/dialog-registry.js";
46
+ import { CreatedDialog, DialogRegistry, createDialog, dialog, hideDialog, removeDialog, unregisterDialog, useDialog } from "./dialog-provider/dialog-registry.js";
47
47
  import { DialogProvider, DialogProviderProps } from "./dialog-provider/DialogProvider.js";
48
48
  import "./dialog-provider/index.js";
49
49
  import { FileUploadRootItem, FileUploadRootItemProps } from "./file-upload-root/FileUploadRootItem.js";
@@ -108,4 +108,4 @@ import { ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, T
108
108
  import { getId } from "./utils/get-id.js";
109
109
  import { isSvgMarkupString, svgMarkupToMaskUrl } from "./utils/svg.js";
110
110
  import { cn } from "@pixpilot/shadcn";
111
- export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertToastProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonExtended, ButtonExtendedLoaderProps, ButtonExtendedProps, ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, ButtonProps, COLOR_PICKER_PALETTE_BUTTON_CLASSES, COMMON_COLORS, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerButton, ColorPickerButtonProps, ColorPickerColorPalette, ColorPickerColorPaletteProps, ColorPickerCompactControls, ColorPickerCompactControlsProps, ColorPickerContent, ColorPickerContentProps, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerContextStates, ColorPickerControls, ColorPickerControlsProps, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatControlsProps, ColorPickerFormatInput, ColorPickerFormatInputProps, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerFullControlsProps, ColorPickerHueSlider, ColorPickerInput, ColorPickerInputProps, ColorPickerPaletteButton, ColorPickerPaletteButtonProps, ColorPickerPaletteSwatch, ColorPickerProps, ColorPickerResetOptions, ColorPickerRoot, ColorPickerRootProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ConfirmationDialogVariant, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogRegistry, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadCallbacks, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, FileUploadRoot, FileUploadRootItem, FileUploadRootItemProps, FileUploadRootProps, FileUploadRootPropsBaseProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoadingOverlay, LoadingOverlayProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverContentUnstyled, PopoverTrigger, PresetColor, Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps, RegisteredDialog, RegisteredDialogShowProps, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectContentProps, SelectOption, ShowDialogProps, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputInline, TagsInputInlineItem, TagsInputInlineProps, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastFunction, ToastMessage, Toaster, ToggleButton, ToggleButtonProps, ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue, ToolbarItems, UseDelayedVisibilityOptions, UseDelayedVisibilityResult, cn, dialog, getId, hideDialog, isSvgMarkupString, registerDialog, removeDialog, showConfirmDialog, showDialog, svgMarkupToMaskUrl, toast, unregisterDialog, useColorPickerContext, useDelayedVisibility, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
111
+ export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertToastProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonExtended, ButtonExtendedLoaderProps, ButtonExtendedProps, ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, ButtonProps, COLOR_PICKER_PALETTE_BUTTON_CLASSES, COMMON_COLORS, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerButton, ColorPickerButtonProps, ColorPickerColorPalette, ColorPickerColorPaletteProps, ColorPickerCompactControls, ColorPickerCompactControlsProps, ColorPickerContent, ColorPickerContentProps, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerContextStates, ColorPickerControls, ColorPickerControlsProps, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatControlsProps, ColorPickerFormatInput, ColorPickerFormatInputProps, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerFullControlsProps, ColorPickerHueSlider, ColorPickerInput, ColorPickerInputProps, ColorPickerPaletteButton, ColorPickerPaletteButtonProps, ColorPickerPaletteSwatch, ColorPickerProps, ColorPickerResetOptions, ColorPickerRoot, ColorPickerRootProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ConfirmationDialogVariant, ContentCard, CreatedDialog, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogRegistry, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadCallbacks, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, FileUploadRoot, FileUploadRootItem, FileUploadRootItemProps, FileUploadRootProps, FileUploadRootPropsBaseProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoadingOverlay, LoadingOverlayProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverContentUnstyled, PopoverTrigger, PresetColor, Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps, RegisteredDialog, RegisteredDialogInjectedProps, RegisteredDialogShowProps, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectContentProps, SelectOption, ShowDialogProps, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputInline, TagsInputInlineItem, TagsInputInlineProps, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastFunction, ToastMessage, Toaster, ToggleButton, ToggleButtonProps, ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue, ToolbarItems, UseDelayedVisibilityOptions, UseDelayedVisibilityResult, cn, confirmDialog, createDialog, dialog, getId, hideDialog, isSvgMarkupString, registerDialog, removeDialog, showConfirmDialog, showDialog, svgMarkupToMaskUrl, toast, unregisterDialog, useColorPickerContext, useDelayedVisibility, useDialog, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
package/dist/index.js CHANGED
@@ -36,10 +36,10 @@ import { ColorSelect } from "./ColorSelect.js";
36
36
  import { Combobox } from "./Combobox.js";
37
37
  import { registerDialog } from "./dialog-provider/register-dialog.js";
38
38
  import { showDialog } from "./dialog-provider/show-dialog.js";
39
- import { dialog, hideDialog, removeDialog, unregisterDialog } from "./dialog-provider/dialog-registry.js";
39
+ import { createDialog, dialog, hideDialog, removeDialog, unregisterDialog, useDialog } from "./dialog-provider/dialog-registry.js";
40
40
  import { DialogProvider } from "./dialog-provider/DialogProvider.js";
41
41
  import "./dialog-provider/index.js";
42
- import { showConfirmDialog } from "./confirmation-dialog/confirmation-dialogs.js";
42
+ import { confirmDialog, showConfirmDialog } from "./confirmation-dialog/confirmation-dialogs.js";
43
43
  import "./confirmation-dialog/index.js";
44
44
  import { ContentCard } from "./ContentCard.js";
45
45
  import { DatePicker } from "./DatePicker.js";
@@ -100,4 +100,4 @@ import "./toast/index.js";
100
100
  import { ToggleGroup, ToggleGroupItem } from "./ToggleGroup.js";
101
101
  import { cn } from "@pixpilot/shadcn";
102
102
 
103
- export { AbsoluteFill, Alert, AvatarUpload, Button, ButtonExtended, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, COLOR_PICKER_PALETTE_BUTTON_CLASSES, COMMON_COLORS, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CircleLoader, CloseButtonAbsolute, CloseButtonRounded, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerButton, ColorPickerColorPalette, ColorPickerCompactControls, ColorPickerContent, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerControls, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatInput, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerHueSlider, ColorPickerInput, ColorPickerPaletteButton, ColorPickerPaletteSwatch, ColorPickerRoot, ColorSelect, Combobox, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogTitle, DialogTrigger, FileUpload, FileUploadInline, FileUploadRoot, FileUploadRootItem, IconPicker, IconToggle, Input, Layout, LayoutFooter, LayoutHeader, LayoutMain, LoadingOverlay, Pagination, Popover, PopoverAnchor, PopoverContent, PopoverContentUnstyled, PopoverTrigger, Rating, RatingButton, RichTextEditor, ScaledPreview, Select, Slider, SliderInput, SliderSelect, Tabs, TabsContent, TabsContext, TabsList, TabsTrigger, TagsInput, TagsInputInline, ThemeModeDropdown, ThemeModeSwitchInside, ThemeModeSwitchOutside, ThemeModeToggleButton, ThemeProvider, Toaster, ToggleButton, ToggleGroup, ToggleGroupItem, cn, dialog, getId, hideDialog, isSvgMarkupString, registerDialog, removeDialog, showConfirmDialog, showDialog, svgMarkupToMaskUrl, toast, unregisterDialog, useColorPickerContext, useDelayedVisibility, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
103
+ export { AbsoluteFill, Alert, AvatarUpload, Button, ButtonExtended, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, COLOR_PICKER_PALETTE_BUTTON_CLASSES, COMMON_COLORS, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CircleLoader, CloseButtonAbsolute, CloseButtonRounded, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerButton, ColorPickerColorPalette, ColorPickerCompactControls, ColorPickerContent, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerControls, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatInput, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerHueSlider, ColorPickerInput, ColorPickerPaletteButton, ColorPickerPaletteSwatch, ColorPickerRoot, ColorSelect, Combobox, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogTitle, DialogTrigger, FileUpload, FileUploadInline, FileUploadRoot, FileUploadRootItem, IconPicker, IconToggle, Input, Layout, LayoutFooter, LayoutHeader, LayoutMain, LoadingOverlay, Pagination, Popover, PopoverAnchor, PopoverContent, PopoverContentUnstyled, PopoverTrigger, Rating, RatingButton, RichTextEditor, ScaledPreview, Select, Slider, SliderInput, SliderSelect, Tabs, TabsContent, TabsContext, TabsList, TabsTrigger, TagsInput, TagsInputInline, ThemeModeDropdown, ThemeModeSwitchInside, ThemeModeSwitchOutside, ThemeModeToggleButton, ThemeProvider, Toaster, ToggleButton, ToggleGroup, ToggleGroupItem, cn, confirmDialog, createDialog, dialog, getId, hideDialog, isSvgMarkupString, registerDialog, removeDialog, showConfirmDialog, showDialog, svgMarkupToMaskUrl, toast, unregisterDialog, useColorPickerContext, useDelayedVisibility, useDialog, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime17 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime14 from "react/jsx-runtime";
2
2
  import { InputProps } from "@pixpilot/shadcn";
3
3
  import * as React$1 from "react";
4
4
 
@@ -10,6 +10,6 @@ type InputProps$1 = InputProps & {
10
10
  prefixClassName?: string;
11
11
  suffixClassName?: string;
12
12
  };
13
- declare function Input(props: InputProps$1): react_jsx_runtime17.JSX.Element;
13
+ declare function Input(props: InputProps$1): react_jsx_runtime14.JSX.Element;
14
14
  //#endregion
15
15
  export { Input, InputProps$1 as InputProps };
@@ -1,5 +1,5 @@
1
1
  import { CommandOptionListItem } from "../CommandOptionList.cjs";
2
- import * as react_jsx_runtime23 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime19 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/tags-input/TagsInput.d.ts
5
5
  interface TagsInputProps {
@@ -59,6 +59,6 @@ declare function TagsInput({
59
59
  addOnTab,
60
60
  onValidate,
61
61
  addButtonVisibility
62
- }: TagsInputProps): react_jsx_runtime23.JSX.Element;
62
+ }: TagsInputProps): react_jsx_runtime19.JSX.Element;
63
63
  //#endregion
64
64
  export { TagsInput, TagsInputProps };
@@ -1,5 +1,5 @@
1
1
  import { CommandOptionListItem } from "../CommandOptionList.js";
2
- import * as react_jsx_runtime20 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime18 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/tags-input/TagsInput.d.ts
5
5
  interface TagsInputProps {
@@ -59,6 +59,6 @@ declare function TagsInput({
59
59
  addOnTab,
60
60
  onValidate,
61
61
  addButtonVisibility
62
- }: TagsInputProps): react_jsx_runtime20.JSX.Element;
62
+ }: TagsInputProps): react_jsx_runtime18.JSX.Element;
63
63
  //#endregion
64
64
  export { TagsInput, TagsInputProps };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime22 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime18 from "react/jsx-runtime";
2
2
  import { ChangeEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, Ref } from "react";
3
3
 
4
4
  //#region src/tags-input/TagsInputInline.d.ts
@@ -77,6 +77,6 @@ declare function TagsInputInline({
77
77
  canAddCurrentValue,
78
78
  onAddCurrentInput,
79
79
  showClear
80
- }: TagsInputInlineProps): react_jsx_runtime22.JSX.Element;
80
+ }: TagsInputInlineProps): react_jsx_runtime18.JSX.Element;
81
81
  //#endregion
82
82
  export { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps };
@@ -1,5 +1,5 @@
1
1
  import { ChangeEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, Ref } from "react";
2
- import * as react_jsx_runtime18 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime19 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/tags-input/TagsInputInline.d.ts
5
5
  interface TagsInputInlineItem {
@@ -77,6 +77,6 @@ declare function TagsInputInline({
77
77
  canAddCurrentValue,
78
78
  onAddCurrentInput,
79
79
  showClear
80
- }: TagsInputInlineProps): react_jsx_runtime18.JSX.Element;
80
+ }: TagsInputInlineProps): react_jsx_runtime19.JSX.Element;
81
81
  //#endregion
82
82
  export { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime19 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime21 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeDropdown.d.ts
4
4
  interface ThemeModeDropdownProps {
@@ -18,7 +18,7 @@ interface ThemeModeDropdownProps {
18
18
  * Provides Light / Dark / System options.
19
19
  * Pure component - requires themeValue and onChange props.
20
20
  */
21
- declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime19.JSX.Element;
21
+ declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime21.JSX.Element;
22
22
  declare namespace ThemeModeDropdown {
23
23
  var displayName: string;
24
24
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime21 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime20 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeDropdown.d.ts
4
4
  interface ThemeModeDropdownProps {
@@ -18,7 +18,7 @@ interface ThemeModeDropdownProps {
18
18
  * Provides Light / Dark / System options.
19
19
  * Pure component - requires themeValue and onChange props.
20
20
  */
21
- declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime21.JSX.Element;
21
+ declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime20.JSX.Element;
22
22
  declare namespace ThemeModeDropdown {
23
23
  var displayName: string;
24
24
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime20 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime22 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeSwitchInside.d.ts
4
4
  type ThemeModeSwitchInsideSize = 'sm' | 'md' | 'lg';
@@ -26,7 +26,7 @@ interface ThemeModeSwitchInsideProps {
26
26
  * Icons are embedded within the switch control.
27
27
  * Pure component - requires value and onChange props.
28
28
  */
29
- declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime20.JSX.Element;
29
+ declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime22.JSX.Element;
30
30
  declare namespace ThemeModeSwitchInside {
31
31
  var displayName: string;
32
32
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime22 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime21 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeSwitchInside.d.ts
4
4
  type ThemeModeSwitchInsideSize = 'sm' | 'md' | 'lg';
@@ -26,7 +26,7 @@ interface ThemeModeSwitchInsideProps {
26
26
  * Icons are embedded within the switch control.
27
27
  * Pure component - requires value and onChange props.
28
28
  */
29
- declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime22.JSX.Element;
29
+ declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime21.JSX.Element;
30
30
  declare namespace ThemeModeSwitchInside {
31
31
  var displayName: string;
32
32
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime21 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime23 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeSwitchOutside.d.ts
4
4
  interface ThemeModeSwitchOutsideProps {
@@ -23,7 +23,7 @@ interface ThemeModeSwitchOutsideProps {
23
23
  * Icons flank the switch control on either side.
24
24
  * Pure component - requires value and onChange props.
25
25
  */
26
- declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime21.JSX.Element;
26
+ declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime23.JSX.Element;
27
27
  declare namespace ThemeModeSwitchOutside {
28
28
  var displayName: string;
29
29
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime23 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime22 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeSwitchOutside.d.ts
4
4
  interface ThemeModeSwitchOutsideProps {
@@ -23,7 +23,7 @@ interface ThemeModeSwitchOutsideProps {
23
23
  * Icons flank the switch control on either side.
24
24
  * Pure component - requires value and onChange props.
25
25
  */
26
- declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime23.JSX.Element;
26
+ declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime22.JSX.Element;
27
27
  declare namespace ThemeModeSwitchOutside {
28
28
  var displayName: string;
29
29
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime18 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime20 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeToggleButton.d.ts
4
4
  interface ThemeModeToggleButtonProps {
@@ -14,7 +14,7 @@ interface ThemeModeToggleButtonProps {
14
14
  * Light/Dark toggle button.
15
15
  * Pure component - toggles between light and dark.
16
16
  */
17
- declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime18.JSX.Element;
17
+ declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime20.JSX.Element;
18
18
  declare namespace ThemeModeToggleButton {
19
19
  var displayName: string;
20
20
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime19 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime23 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeToggleButton.d.ts
4
4
  interface ThemeModeToggleButtonProps {
@@ -14,7 +14,7 @@ interface ThemeModeToggleButtonProps {
14
14
  * Light/Dark toggle button.
15
15
  * Pure component - toggles between light and dark.
16
16
  */
17
- declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime19.JSX.Element;
17
+ declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime23.JSX.Element;
18
18
  declare namespace ThemeModeToggleButton {
19
19
  var displayName: string;
20
20
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/shadcn-ui",
3
3
  "type": "module",
4
- "version": "1.33.0",
4
+ "version": "1.35.0",
5
5
  "description": "Custom UI components and utilities built with shadcn/ui.",
6
6
  "author": "m.doaie <m.doaie@hotmail.com>",
7
7
  "license": "MIT",
@@ -65,11 +65,11 @@
65
65
  "tsdown": "^0.15.12",
66
66
  "typescript": "^5.9.3",
67
67
  "@internal/eslint-config": "0.3.0",
68
- "@internal/hooks": "0.0.0",
69
68
  "@internal/prettier-config": "0.0.1",
70
69
  "@internal/tsconfig": "0.1.0",
71
70
  "@internal/tsdown-config": "0.1.0",
72
- "@internal/vitest-config": "0.1.0"
71
+ "@internal/vitest-config": "0.1.0",
72
+ "@internal/hooks": "0.0.0"
73
73
  },
74
74
  "prettier": "@internal/prettier-config",
75
75
  "scripts": {