@pixpilot/shadcn-ui 1.11.0 → 1.12.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 (32) hide show
  1. package/dist/Alert.cjs +9 -40
  2. package/dist/Alert.d.cts +2 -2
  3. package/dist/Alert.d.ts +2 -2
  4. package/dist/Alert.js +9 -39
  5. package/dist/confirmation-dialog/ConfirmationDialog.cjs +16 -2
  6. package/dist/confirmation-dialog/ConfirmationDialog.d.cts +4 -1
  7. package/dist/confirmation-dialog/ConfirmationDialog.d.ts +4 -1
  8. package/dist/confirmation-dialog/ConfirmationDialog.js +17 -3
  9. package/dist/dialog/Dialog.d.cts +4 -4
  10. package/dist/file-upload/FileUpload.d.cts +2 -2
  11. package/dist/file-upload-inline/FileUploadInline.d.cts +2 -2
  12. package/dist/file-upload-root/FileUploadRoot.d.cts +2 -2
  13. package/dist/index.d.cts +2 -1
  14. package/dist/index.d.ts +2 -1
  15. package/dist/input/Input.d.cts +2 -2
  16. package/dist/tags-input/TagsInput.d.cts +2 -2
  17. package/dist/tags-input/TagsInput.d.ts +2 -2
  18. package/dist/tags-input/TagsInputInline.d.cts +2 -2
  19. package/dist/tags-input/TagsInputInline.d.ts +2 -2
  20. package/dist/theme-toggle/ThemeModeDropdown.d.cts +2 -2
  21. package/dist/theme-toggle/ThemeModeDropdown.d.ts +2 -2
  22. package/dist/theme-toggle/ThemeModeSwitchInside.d.cts +2 -2
  23. package/dist/theme-toggle/ThemeModeSwitchInside.d.ts +2 -2
  24. package/dist/theme-toggle/ThemeModeSwitchOutside.d.cts +2 -2
  25. package/dist/theme-toggle/ThemeModeSwitchOutside.d.ts +2 -2
  26. package/dist/theme-toggle/ThemeModeToggleButton.d.cts +2 -2
  27. package/dist/theme-toggle/ThemeModeToggleButton.d.ts +2 -2
  28. package/dist/variant-config.cjs +40 -0
  29. package/dist/variant-config.d.cts +6 -0
  30. package/dist/variant-config.d.ts +6 -0
  31. package/dist/variant-config.js +38 -0
  32. package/package.json +2 -2
package/dist/Alert.cjs CHANGED
@@ -1,51 +1,20 @@
1
1
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
2
  const require_utils = require('./shadcn/src/lib/utils.cjs');
3
+ const require_variant_config = require('./variant-config.cjs');
3
4
  let __pixpilot_shadcn = require("@pixpilot/shadcn");
4
5
  __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
5
- let lucide_react = require("lucide-react");
6
- lucide_react = require_rolldown_runtime.__toESM(lucide_react);
7
6
  let react = require("react");
8
7
  react = require_rolldown_runtime.__toESM(react);
9
8
  let react_jsx_runtime = require("react/jsx-runtime");
10
9
  react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
11
10
 
12
11
  //#region src/Alert.tsx
13
- const iconClass = require_utils.cn("t-0 size-4");
14
- const colors = {
15
- error: {
16
- descClass: "text-destructive",
17
- textClass: "text-destructive",
18
- class: require_utils.cn("border-current/80!"),
19
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.OctagonAlertIcon, { className: iconClass })
20
- },
21
- warning: {
22
- descClass: "text-amber-600/80 dark:text-amber-400/80",
23
- textClass: "text-amber-600 dark:border-amber-400 dark:text-amber-400",
24
- class: require_utils.cn("border-current/80!"),
25
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CircleAlertIcon, { className: iconClass })
26
- },
27
- info: {
28
- descClass: "text-sky-600/80 dark:text-sky-400/80",
29
- textClass: "text-sky-600 dark:border-sky-400 dark:text-sky-400",
30
- class: require_utils.cn("border-current/80!"),
31
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CircleAlertIcon, { className: iconClass })
32
- },
33
- success: {
34
- descClass: "text-green-600/80 dark:text-green-400/80",
35
- textClass: "text-green-600 dark:border-green-400 dark:text-green-400",
36
- class: require_utils.cn("border-current/80!"),
37
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CircleCheckBigIcon, { className: iconClass })
38
- },
39
- default: {
40
- descClass: "text-foreground/80",
41
- textClass: "text-foreground",
42
- class: require_utils.cn("border-current/60!"),
43
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CircleAlertIcon, { className: iconClass })
44
- }
45
- };
46
12
  function getIcon(icon, variant) {
47
13
  if (icon === false) return null;
48
- if (icon === void 0 || icon === true) return colors[variant ?? "default"].icon;
14
+ if (icon === void 0 || icon === true) {
15
+ const { IconComponent } = require_variant_config.variantConfig[variant ?? "default"];
16
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconComponent, { className: "t-0 size-4" });
17
+ }
49
18
  return icon;
50
19
  }
51
20
  const Alert = (props) => {
@@ -53,11 +22,11 @@ const Alert = (props) => {
53
22
  const msgIcon = getIcon(icon, variant);
54
23
  const hasTitle = title != null && title.trim() !== "";
55
24
  const hasContent = hasTitle || description != null;
56
- const variantConfig = colors[variant] ?? colors.default;
25
+ const config = require_variant_config.variantConfig[variant] ?? require_variant_config.variantConfig.default;
57
26
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Alert, {
58
27
  ...rest,
59
28
  variant: "destructive",
60
- className: require_utils.cn("bg-card border-accent! flex justify-between rounded-sm border-0 border-l-4", msgIcon ? "flex-row" : "flex-col", variantConfig.class, variantConfig.textClass, className),
29
+ className: require_utils.cn("bg-card border-accent! flex justify-between rounded-sm border-0 border-l-4", msgIcon ? "flex-row" : "flex-col", config.borderClass, config.textClass, className),
61
30
  children: [
62
31
  msgIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
63
32
  className: require_utils.cn("mr-3 flex items-start pt-0.5"),
@@ -66,10 +35,10 @@ const Alert = (props) => {
66
35
  hasContent && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
67
36
  className: "flex flex-1 flex-col gap-1",
68
37
  children: [hasTitle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.AlertTitle, {
69
- className: require_utils.cn(variantConfig.textClass, { "block!": !hasTitle }),
38
+ className: require_utils.cn(config.textClass, { "block!": !hasTitle }),
70
39
  children: title
71
40
  }), description != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.AlertDescription, {
72
- className: require_utils.cn(variantConfig.descClass, !hasTitle && variantConfig.textClass, "whitespace-pre-wrap"),
41
+ className: require_utils.cn(config.descClass, !hasTitle && config.textClass, "whitespace-pre-wrap"),
73
42
  children: description
74
43
  })]
75
44
  }),
package/dist/Alert.d.cts CHANGED
@@ -1,7 +1,7 @@
1
+ import { AlertVariant } from "./variant-config.cjs";
1
2
  import React from "react";
2
3
 
3
4
  //#region src/Alert.d.ts
4
- type AlertVariant = 'error' | 'info' | 'warning' | 'success' | 'default';
5
5
  interface AlertBaseProps {
6
6
  variant?: AlertVariant;
7
7
  description?: React.ReactNode;
@@ -13,4 +13,4 @@ interface AlertBaseProps {
13
13
  interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, AlertBaseProps {}
14
14
  declare const Alert: React.FC<AlertProps>;
15
15
  //#endregion
16
- export { Alert, AlertBaseProps, AlertProps, AlertVariant };
16
+ export { Alert, AlertBaseProps, AlertProps };
package/dist/Alert.d.ts CHANGED
@@ -1,7 +1,7 @@
1
+ import { AlertVariant } from "./variant-config.js";
1
2
  import React from "react";
2
3
 
3
4
  //#region src/Alert.d.ts
4
- type AlertVariant = 'error' | 'info' | 'warning' | 'success' | 'default';
5
5
  interface AlertBaseProps {
6
6
  variant?: AlertVariant;
7
7
  description?: React.ReactNode;
@@ -13,4 +13,4 @@ interface AlertBaseProps {
13
13
  interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, AlertBaseProps {}
14
14
  declare const Alert: React.FC<AlertProps>;
15
15
  //#endregion
16
- export { Alert, AlertBaseProps, AlertProps, AlertVariant };
16
+ export { Alert, AlertBaseProps, AlertProps };
package/dist/Alert.js CHANGED
@@ -1,46 +1,16 @@
1
1
  import { cn as cn$1 } from "./shadcn/src/lib/utils.js";
2
+ import { variantConfig } from "./variant-config.js";
2
3
  import { Alert, AlertDescription, AlertTitle } from "@pixpilot/shadcn";
3
- import { CircleAlertIcon, CircleCheckBigIcon, OctagonAlertIcon } from "lucide-react";
4
4
  import React from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
 
7
7
  //#region src/Alert.tsx
8
- const iconClass = cn$1("t-0 size-4");
9
- const colors = {
10
- error: {
11
- descClass: "text-destructive",
12
- textClass: "text-destructive",
13
- class: cn$1("border-current/80!"),
14
- icon: /* @__PURE__ */ jsx(OctagonAlertIcon, { className: iconClass })
15
- },
16
- warning: {
17
- descClass: "text-amber-600/80 dark:text-amber-400/80",
18
- textClass: "text-amber-600 dark:border-amber-400 dark:text-amber-400",
19
- class: cn$1("border-current/80!"),
20
- icon: /* @__PURE__ */ jsx(CircleAlertIcon, { className: iconClass })
21
- },
22
- info: {
23
- descClass: "text-sky-600/80 dark:text-sky-400/80",
24
- textClass: "text-sky-600 dark:border-sky-400 dark:text-sky-400",
25
- class: cn$1("border-current/80!"),
26
- icon: /* @__PURE__ */ jsx(CircleAlertIcon, { className: iconClass })
27
- },
28
- success: {
29
- descClass: "text-green-600/80 dark:text-green-400/80",
30
- textClass: "text-green-600 dark:border-green-400 dark:text-green-400",
31
- class: cn$1("border-current/80!"),
32
- icon: /* @__PURE__ */ jsx(CircleCheckBigIcon, { className: iconClass })
33
- },
34
- default: {
35
- descClass: "text-foreground/80",
36
- textClass: "text-foreground",
37
- class: cn$1("border-current/60!"),
38
- icon: /* @__PURE__ */ jsx(CircleAlertIcon, { className: iconClass })
39
- }
40
- };
41
8
  function getIcon(icon, variant) {
42
9
  if (icon === false) return null;
43
- if (icon === void 0 || icon === true) return colors[variant ?? "default"].icon;
10
+ if (icon === void 0 || icon === true) {
11
+ const { IconComponent } = variantConfig[variant ?? "default"];
12
+ return /* @__PURE__ */ jsx(IconComponent, { className: "t-0 size-4" });
13
+ }
44
14
  return icon;
45
15
  }
46
16
  const Alert$1 = (props) => {
@@ -48,11 +18,11 @@ const Alert$1 = (props) => {
48
18
  const msgIcon = getIcon(icon, variant);
49
19
  const hasTitle = title != null && title.trim() !== "";
50
20
  const hasContent = hasTitle || description != null;
51
- const variantConfig = colors[variant] ?? colors.default;
21
+ const config = variantConfig[variant] ?? variantConfig.default;
52
22
  return /* @__PURE__ */ jsxs(Alert, {
53
23
  ...rest,
54
24
  variant: "destructive",
55
- className: cn$1("bg-card border-accent! flex justify-between rounded-sm border-0 border-l-4", msgIcon ? "flex-row" : "flex-col", variantConfig.class, variantConfig.textClass, className),
25
+ className: cn$1("bg-card border-accent! flex justify-between rounded-sm border-0 border-l-4", msgIcon ? "flex-row" : "flex-col", config.borderClass, config.textClass, className),
56
26
  children: [
57
27
  msgIcon && /* @__PURE__ */ jsx("div", {
58
28
  className: cn$1("mr-3 flex items-start pt-0.5"),
@@ -61,10 +31,10 @@ const Alert$1 = (props) => {
61
31
  hasContent && /* @__PURE__ */ jsxs("div", {
62
32
  className: "flex flex-1 flex-col gap-1",
63
33
  children: [hasTitle && /* @__PURE__ */ jsx(AlertTitle, {
64
- className: cn$1(variantConfig.textClass, { "block!": !hasTitle }),
34
+ className: cn$1(config.textClass, { "block!": !hasTitle }),
65
35
  children: title
66
36
  }), description != null && /* @__PURE__ */ jsx(AlertDescription, {
67
- className: cn$1(variantConfig.descClass, !hasTitle && variantConfig.textClass, "whitespace-pre-wrap"),
37
+ className: cn$1(config.descClass, !hasTitle && config.textClass, "whitespace-pre-wrap"),
68
38
  children: description
69
39
  })]
70
40
  }),
@@ -1,4 +1,5 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ const require_variant_config = require('../variant-config.cjs');
2
3
  let __pixpilot_shadcn = require("@pixpilot/shadcn");
3
4
  __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
4
5
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -8,7 +9,7 @@ __ebay_nice_modal_react = require_rolldown_runtime.__toESM(__ebay_nice_modal_rea
8
9
 
9
10
  //#region src/confirmation-dialog/ConfirmationDialog.tsx
10
11
  const ConfirmationDialog = __ebay_nice_modal_react.default.create((props) => {
11
- const { title = "Confirmation Dialog" } = props;
12
+ const { title = "Confirmation Dialog", variant, showIcon = true } = props;
12
13
  const modal = (0, __ebay_nice_modal_react.useModal)();
13
14
  const handleConfirm = () => {
14
15
  props.onConfirm?.();
@@ -23,10 +24,22 @@ const ConfirmationDialog = __ebay_nice_modal_react.default.create((props) => {
23
24
  const onOpenChange = (isOpen) => {
24
25
  if (!isOpen) handleCancel();
25
26
  };
27
+ const config = variant != null ? require_variant_config.variantConfig[variant] : null;
28
+ const shouldShowIcon = showIcon && variant != null && variant !== "default";
29
+ const confirmButtonVariant = variant === "error" ? "destructive" : "default";
26
30
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Dialog, {
27
31
  open: modal.visible,
28
32
  onOpenChange,
29
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.DialogContent, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.DialogHeader, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.DialogTitle, { children: title }), props.description != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.DialogDescription, { children: props.description })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.DialogFooter, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.DialogClose, {
33
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.DialogContent, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.DialogHeader, {
34
+ className: "mb-3",
35
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.DialogTitle, {
36
+ className: (0, __pixpilot_shadcn.cn)("flex items-center gap-2", config?.textClass),
37
+ children: [shouldShowIcon && config != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(config.IconComponent, { className: "size-5 shrink-0" }), title]
38
+ }), props.description != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.DialogDescription, {
39
+ className: "mt-3",
40
+ children: props.description
41
+ })]
42
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.DialogFooter, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.DialogClose, {
30
43
  asChild: true,
31
44
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
32
45
  variant: "outline",
@@ -34,6 +47,7 @@ const ConfirmationDialog = __ebay_nice_modal_react.default.create((props) => {
34
47
  children: props.cancelText ?? "Cancel"
35
48
  })
36
49
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
50
+ variant: confirmButtonVariant,
37
51
  onClick: handleConfirm,
38
52
  children: props.confirmText ?? "Confirm"
39
53
  })] })] })
@@ -1,13 +1,16 @@
1
+ import { AlertVariant } from "../variant-config.cjs";
1
2
  import "react";
2
3
 
3
4
  //#region src/confirmation-dialog/ConfirmationDialog.d.ts
4
5
  interface ConfirmationDialogProps {
5
6
  title: string;
6
- description?: string;
7
+ description?: string | React.ReactNode;
7
8
  confirmText?: string;
8
9
  cancelText?: string;
9
10
  onConfirm?: () => void;
10
11
  onCancel?: () => void;
12
+ variant?: AlertVariant;
13
+ showIcon?: boolean;
11
14
  }
12
15
  //#endregion
13
16
  export { ConfirmationDialogProps };
@@ -1,14 +1,17 @@
1
+ import { AlertVariant } from "../variant-config.js";
1
2
  import "react";
2
3
  import "@ebay/nice-modal-react";
3
4
 
4
5
  //#region src/confirmation-dialog/ConfirmationDialog.d.ts
5
6
  interface ConfirmationDialogProps {
6
7
  title: string;
7
- description?: string;
8
+ description?: string | React.ReactNode;
8
9
  confirmText?: string;
9
10
  cancelText?: string;
10
11
  onConfirm?: () => void;
11
12
  onCancel?: () => void;
13
+ variant?: AlertVariant;
14
+ showIcon?: boolean;
12
15
  }
13
16
  //#endregion
14
17
  export { ConfirmationDialogProps };
@@ -1,10 +1,11 @@
1
- import { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@pixpilot/shadcn";
1
+ import { variantConfig } from "../variant-config.js";
2
+ import { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, cn } from "@pixpilot/shadcn";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
4
  import NiceModal, { useModal } from "@ebay/nice-modal-react";
4
5
 
5
6
  //#region src/confirmation-dialog/ConfirmationDialog.tsx
6
7
  const ConfirmationDialog = NiceModal.create((props) => {
7
- const { title = "Confirmation Dialog" } = props;
8
+ const { title = "Confirmation Dialog", variant, showIcon = true } = props;
8
9
  const modal = useModal();
9
10
  const handleConfirm = () => {
10
11
  props.onConfirm?.();
@@ -19,10 +20,22 @@ const ConfirmationDialog = NiceModal.create((props) => {
19
20
  const onOpenChange = (isOpen) => {
20
21
  if (!isOpen) handleCancel();
21
22
  };
23
+ const config = variant != null ? variantConfig[variant] : null;
24
+ const shouldShowIcon = showIcon && variant != null && variant !== "default";
25
+ const confirmButtonVariant = variant === "error" ? "destructive" : "default";
22
26
  return /* @__PURE__ */ jsx(Dialog, {
23
27
  open: modal.visible,
24
28
  onOpenChange,
25
- children: /* @__PURE__ */ jsxs(DialogContent, { children: [/* @__PURE__ */ jsxs(DialogHeader, { children: [/* @__PURE__ */ jsx(DialogTitle, { children: title }), props.description != null && /* @__PURE__ */ jsx(DialogDescription, { children: props.description })] }), /* @__PURE__ */ jsxs(DialogFooter, { children: [/* @__PURE__ */ jsx(DialogClose, {
29
+ children: /* @__PURE__ */ jsxs(DialogContent, { children: [/* @__PURE__ */ jsxs(DialogHeader, {
30
+ className: "mb-3",
31
+ children: [/* @__PURE__ */ jsxs(DialogTitle, {
32
+ className: cn("flex items-center gap-2", config?.textClass),
33
+ children: [shouldShowIcon && config != null && /* @__PURE__ */ jsx(config.IconComponent, { className: "size-5 shrink-0" }), title]
34
+ }), props.description != null && /* @__PURE__ */ jsx(DialogDescription, {
35
+ className: "mt-3",
36
+ children: props.description
37
+ })]
38
+ }), /* @__PURE__ */ jsxs(DialogFooter, { children: [/* @__PURE__ */ jsx(DialogClose, {
26
39
  asChild: true,
27
40
  children: /* @__PURE__ */ jsx(Button, {
28
41
  variant: "outline",
@@ -30,6 +43,7 @@ const ConfirmationDialog = NiceModal.create((props) => {
30
43
  children: props.cancelText ?? "Cancel"
31
44
  })
32
45
  }), /* @__PURE__ */ jsx(Button, {
46
+ variant: confirmButtonVariant,
33
47
  onClick: handleConfirm,
34
48
  children: props.confirmText ?? "Confirm"
35
49
  })] })] })
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime9 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
2
2
  import { DialogContent } from "@pixpilot/shadcn";
3
3
  import * as React$1 from "react";
4
4
  import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
@@ -13,14 +13,14 @@ declare const DialogContent$1: React$1.ForwardRefExoticComponent<Omit<_radix_ui_
13
13
  declare function DialogHeader({
14
14
  className,
15
15
  ...props
16
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
16
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime8.JSX.Element;
17
17
  declare function DialogBody({
18
18
  className,
19
19
  ...props
20
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
20
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime8.JSX.Element;
21
21
  declare function DialogFooter({
22
22
  className,
23
23
  ...props
24
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
24
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime8.JSX.Element;
25
25
  //#endregion
26
26
  export { DialogBody, DialogContent$1 as DialogContent, DialogContentProps, DialogFooter, DialogHeader };
@@ -1,7 +1,7 @@
1
1
  import { FileUploadProps } from "./types/index.cjs";
2
- import * as react_jsx_runtime20 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime13 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/file-upload/FileUpload.d.ts
5
- declare function FileUpload(props: FileUploadProps): react_jsx_runtime20.JSX.Element;
5
+ declare function FileUpload(props: FileUploadProps): react_jsx_runtime13.JSX.Element;
6
6
  //#endregion
7
7
  export { FileUpload };
@@ -1,10 +1,10 @@
1
1
  import { FileUploadInlineProps } from "./types.cjs";
2
- import * as react_jsx_runtime8 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime12 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/file-upload-inline/FileUploadInline.d.ts
5
5
  /**
6
6
  * FileUploadInline - An inline file upload component using FileUpload primitives
7
7
  */
8
- declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime8.JSX.Element;
8
+ declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime12.JSX.Element;
9
9
  //#endregion
10
10
  export { FileUploadInline };
@@ -1,11 +1,11 @@
1
1
  import { FileUploadRootProps } from "./types.cjs";
2
- import * as react_jsx_runtime13 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime14 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/file-upload-root/FileUploadRoot.d.ts
5
5
  /**
6
6
  * FileUploadInline - An inline file upload component using FileUpload primitives
7
7
  */
8
- declare function FileUploadRoot(props: FileUploadRootProps): react_jsx_runtime13.JSX.Element;
8
+ declare function FileUploadRoot(props: FileUploadRootProps): react_jsx_runtime14.JSX.Element;
9
9
  declare namespace FileUploadRoot {
10
10
  var displayName: string;
11
11
  }
package/dist/index.d.cts CHANGED
@@ -2,7 +2,8 @@ import { FileMetadata, FileUploadBaseProps, FileUploadCallbacks, FileUploadProgr
2
2
  import { FileUpload } from "./file-upload/FileUpload.cjs";
3
3
  import "./file-upload/index.cjs";
4
4
  import { AbsoluteFill } from "./AbsoluteFill.cjs";
5
- import { Alert, AlertBaseProps, AlertProps, AlertVariant } from "./Alert.cjs";
5
+ import { AlertVariant } from "./variant-config.cjs";
6
+ import { Alert, AlertBaseProps, AlertProps } from "./Alert.cjs";
6
7
  import { AvatarUpload, AvatarUploadProps } from "./avatar-upload/AvatarUpload.cjs";
7
8
  import "./avatar-upload/index.cjs";
8
9
  import { Button, ButtonProps } from "./Button.cjs";
package/dist/index.d.ts CHANGED
@@ -2,7 +2,8 @@ import { FileMetadata, FileUploadBaseProps, FileUploadCallbacks, FileUploadProgr
2
2
  import { FileUpload } from "./file-upload/FileUpload.js";
3
3
  import "./file-upload/index.js";
4
4
  import { AbsoluteFill } from "./AbsoluteFill.js";
5
- import { Alert, AlertBaseProps, AlertProps, AlertVariant } from "./Alert.js";
5
+ import { AlertVariant } from "./variant-config.js";
6
+ import { Alert, AlertBaseProps, AlertProps } from "./Alert.js";
6
7
  import { AvatarUpload, AvatarUploadProps } from "./avatar-upload/AvatarUpload.js";
7
8
  import "./avatar-upload/index.js";
8
9
  import { Button, ButtonProps } from "./Button.js";
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime12 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime11 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_runtime12.JSX.Element;
13
+ declare function Input(props: InputProps$1): react_jsx_runtime11.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_runtime15 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime16 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/tags-input/TagsInput.d.ts
5
5
  interface TagsInputProps {
@@ -57,6 +57,6 @@ declare function TagsInput({
57
57
  addOnTab,
58
58
  onValidate,
59
59
  addButtonVisibility
60
- }: TagsInputProps): react_jsx_runtime15.JSX.Element;
60
+ }: TagsInputProps): react_jsx_runtime16.JSX.Element;
61
61
  //#endregion
62
62
  export { TagsInput, TagsInputProps };
@@ -1,5 +1,5 @@
1
1
  import { CommandOptionListItem } from "../CommandOptionList.js";
2
- import * as react_jsx_runtime16 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime15 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/tags-input/TagsInput.d.ts
5
5
  interface TagsInputProps {
@@ -57,6 +57,6 @@ declare function TagsInput({
57
57
  addOnTab,
58
58
  onValidate,
59
59
  addButtonVisibility
60
- }: TagsInputProps): react_jsx_runtime16.JSX.Element;
60
+ }: TagsInputProps): react_jsx_runtime15.JSX.Element;
61
61
  //#endregion
62
62
  export { TagsInput, TagsInputProps };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime14 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime15 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
@@ -75,6 +75,6 @@ declare function TagsInputInline({
75
75
  canAddCurrentValue,
76
76
  onAddCurrentInput,
77
77
  showClear
78
- }: TagsInputInlineProps): react_jsx_runtime14.JSX.Element;
78
+ }: TagsInputInlineProps): react_jsx_runtime15.JSX.Element;
79
79
  //#endregion
80
80
  export { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps };
@@ -1,5 +1,5 @@
1
1
  import { ChangeEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, Ref } from "react";
2
- import * as react_jsx_runtime15 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime16 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/tags-input/TagsInputInline.d.ts
5
5
  interface TagsInputInlineItem {
@@ -75,6 +75,6 @@ declare function TagsInputInline({
75
75
  canAddCurrentValue,
76
76
  onAddCurrentInput,
77
77
  showClear
78
- }: TagsInputInlineProps): react_jsx_runtime15.JSX.Element;
78
+ }: TagsInputInlineProps): react_jsx_runtime16.JSX.Element;
79
79
  //#endregion
80
80
  export { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime17 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime18 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeDropdown.d.ts
4
4
  interface ThemeModeDropdownProps {
@@ -17,7 +17,7 @@ interface ThemeModeDropdownProps {
17
17
  * Provides Light / Dark / System options.
18
18
  * Pure component - requires themeValue and onChange props.
19
19
  */
20
- declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime17.JSX.Element;
20
+ declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime18.JSX.Element;
21
21
  declare namespace ThemeModeDropdown {
22
22
  var displayName: string;
23
23
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime18 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime17 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeDropdown.d.ts
4
4
  interface ThemeModeDropdownProps {
@@ -17,7 +17,7 @@ interface ThemeModeDropdownProps {
17
17
  * Provides Light / Dark / System options.
18
18
  * Pure component - requires themeValue and onChange props.
19
19
  */
20
- declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime18.JSX.Element;
20
+ declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime17.JSX.Element;
21
21
  declare namespace ThemeModeDropdown {
22
22
  var displayName: string;
23
23
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime18 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime19 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeSwitchInside.d.ts
4
4
  type ThemeModeSwitchInsideSize = 'sm' | 'md' | 'lg';
@@ -25,7 +25,7 @@ interface ThemeModeSwitchInsideProps {
25
25
  * Icons are embedded within the switch control.
26
26
  * Pure component - requires value and onChange props.
27
27
  */
28
- declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime18.JSX.Element;
28
+ declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime19.JSX.Element;
29
29
  declare namespace ThemeModeSwitchInside {
30
30
  var displayName: string;
31
31
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime19 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime18 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeSwitchInside.d.ts
4
4
  type ThemeModeSwitchInsideSize = 'sm' | 'md' | 'lg';
@@ -25,7 +25,7 @@ interface ThemeModeSwitchInsideProps {
25
25
  * Icons are embedded within the switch control.
26
26
  * Pure component - requires value and onChange props.
27
27
  */
28
- declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime19.JSX.Element;
28
+ declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime18.JSX.Element;
29
29
  declare namespace ThemeModeSwitchInside {
30
30
  var displayName: string;
31
31
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime19 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime20 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeSwitchOutside.d.ts
4
4
  interface ThemeModeSwitchOutsideProps {
@@ -22,7 +22,7 @@ interface ThemeModeSwitchOutsideProps {
22
22
  * Icons flank the switch control on either side.
23
23
  * Pure component - requires value and onChange props.
24
24
  */
25
- declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime19.JSX.Element;
25
+ declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime20.JSX.Element;
26
26
  declare namespace ThemeModeSwitchOutside {
27
27
  var displayName: string;
28
28
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime20 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime19 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeSwitchOutside.d.ts
4
4
  interface ThemeModeSwitchOutsideProps {
@@ -22,7 +22,7 @@ interface ThemeModeSwitchOutsideProps {
22
22
  * Icons flank the switch control on either side.
23
23
  * Pure component - requires value and onChange props.
24
24
  */
25
- declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime20.JSX.Element;
25
+ declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime19.JSX.Element;
26
26
  declare namespace ThemeModeSwitchOutside {
27
27
  var displayName: string;
28
28
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime16 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime17 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeToggleButton.d.ts
4
4
  interface ThemeModeToggleButtonProps {
@@ -13,7 +13,7 @@ interface ThemeModeToggleButtonProps {
13
13
  * Light/Dark toggle button.
14
14
  * Pure component - toggles between light and dark.
15
15
  */
16
- declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime16.JSX.Element;
16
+ declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime17.JSX.Element;
17
17
  declare namespace ThemeModeToggleButton {
18
18
  var displayName: string;
19
19
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime17 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 {
@@ -13,7 +13,7 @@ interface ThemeModeToggleButtonProps {
13
13
  * Light/Dark toggle button.
14
14
  * Pure component - toggles between light and dark.
15
15
  */
16
- declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime17.JSX.Element;
16
+ declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime20.JSX.Element;
17
17
  declare namespace ThemeModeToggleButton {
18
18
  var displayName: string;
19
19
  }
@@ -0,0 +1,40 @@
1
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
+ let lucide_react = require("lucide-react");
3
+ lucide_react = require_rolldown_runtime.__toESM(lucide_react);
4
+
5
+ //#region src/variant-config.tsx
6
+ const variantConfig = {
7
+ error: {
8
+ textClass: "text-destructive",
9
+ descClass: "text-destructive",
10
+ borderClass: "border-current/80!",
11
+ IconComponent: lucide_react.OctagonAlertIcon
12
+ },
13
+ warning: {
14
+ textClass: "text-amber-600 dark:border-amber-400 dark:text-amber-400",
15
+ descClass: "text-amber-600/80 dark:text-amber-400/80",
16
+ borderClass: "border-current/80!",
17
+ IconComponent: lucide_react.CircleAlertIcon
18
+ },
19
+ info: {
20
+ textClass: "text-sky-600 dark:border-sky-400 dark:text-sky-400",
21
+ descClass: "text-sky-600/80 dark:text-sky-400/80",
22
+ borderClass: "border-current/80!",
23
+ IconComponent: lucide_react.CircleAlertIcon
24
+ },
25
+ success: {
26
+ textClass: "text-green-600 dark:border-green-400 dark:text-green-400",
27
+ descClass: "text-green-600/80 dark:text-green-400/80",
28
+ borderClass: "border-current/80!",
29
+ IconComponent: lucide_react.CircleCheckBigIcon
30
+ },
31
+ default: {
32
+ textClass: "text-foreground",
33
+ descClass: "text-foreground/80",
34
+ borderClass: "border-current/60!",
35
+ IconComponent: lucide_react.CircleAlertIcon
36
+ }
37
+ };
38
+
39
+ //#endregion
40
+ exports.variantConfig = variantConfig;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+
3
+ //#region src/variant-config.d.ts
4
+ type AlertVariant = 'error' | 'info' | 'warning' | 'success' | 'default';
5
+ //#endregion
6
+ export { AlertVariant };
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+
3
+ //#region src/variant-config.d.ts
4
+ type AlertVariant = 'error' | 'info' | 'warning' | 'success' | 'default';
5
+ //#endregion
6
+ export { AlertVariant };
@@ -0,0 +1,38 @@
1
+ import { CircleAlertIcon, CircleCheckBigIcon, OctagonAlertIcon } from "lucide-react";
2
+
3
+ //#region src/variant-config.tsx
4
+ const variantConfig = {
5
+ error: {
6
+ textClass: "text-destructive",
7
+ descClass: "text-destructive",
8
+ borderClass: "border-current/80!",
9
+ IconComponent: OctagonAlertIcon
10
+ },
11
+ warning: {
12
+ textClass: "text-amber-600 dark:border-amber-400 dark:text-amber-400",
13
+ descClass: "text-amber-600/80 dark:text-amber-400/80",
14
+ borderClass: "border-current/80!",
15
+ IconComponent: CircleAlertIcon
16
+ },
17
+ info: {
18
+ textClass: "text-sky-600 dark:border-sky-400 dark:text-sky-400",
19
+ descClass: "text-sky-600/80 dark:text-sky-400/80",
20
+ borderClass: "border-current/80!",
21
+ IconComponent: CircleAlertIcon
22
+ },
23
+ success: {
24
+ textClass: "text-green-600 dark:border-green-400 dark:text-green-400",
25
+ descClass: "text-green-600/80 dark:text-green-400/80",
26
+ borderClass: "border-current/80!",
27
+ IconComponent: CircleCheckBigIcon
28
+ },
29
+ default: {
30
+ textClass: "text-foreground",
31
+ descClass: "text-foreground/80",
32
+ borderClass: "border-current/60!",
33
+ IconComponent: CircleAlertIcon
34
+ }
35
+ };
36
+
37
+ //#endregion
38
+ export { variantConfig };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/shadcn-ui",
3
3
  "type": "module",
4
- "version": "1.11.0",
4
+ "version": "1.12.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",
@@ -47,7 +47,7 @@
47
47
  "pretty-bytes": "^7.1.0",
48
48
  "react-responsive": "^10.0.1",
49
49
  "sonner": "2.0.7",
50
- "@pixpilot/shadcn": "1.2.1"
50
+ "@pixpilot/shadcn": "1.2.2"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@storybook/react": "^8.6.14",