@pixpilot/shadcn-ui 1.24.0 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Alert.cjs CHANGED
@@ -22,28 +22,32 @@ const Alert = (props) => {
22
22
  const msgIcon = getIcon(icon, variant);
23
23
  const hasTitle = title != null && title.trim() !== "";
24
24
  const hasContent = hasTitle || description != null;
25
+ const hasStructuredLayout = Boolean(msgIcon || hasContent);
25
26
  const config = require_variant_config.variantConfig[variant] ?? require_variant_config.variantConfig.default;
26
27
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Alert, {
27
28
  ...rest,
28
29
  variant: "destructive",
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),
30
- children: [
31
- msgIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
32
- className: require_utils.cn("mr-3 flex items-start pt-0.5"),
30
+ className: require_utils.cn("flex flex-col items-stretch bg-card border-accent! rounded-sm border-0 border-l-4", config.borderClass, config.textClass, className),
31
+ children: [hasStructuredLayout && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
32
+ className: require_utils.cn("col-span-full flex w-full min-w-0 items-start", msgIcon ? "flex-row" : "flex-col"),
33
+ children: [msgIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
34
+ className: require_utils.cn("mr-3 flex shrink-0 items-start pt-0.5"),
33
35
  children: msgIcon
34
- }),
35
- hasContent && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
36
- className: "flex flex-1 flex-col gap-1",
37
- children: [hasTitle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.AlertTitle, {
38
- className: require_utils.cn(config.textClass, { "block!": !hasTitle }),
39
- children: title
40
- }), description != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.AlertDescription, {
41
- className: require_utils.cn(config.descClass, !hasTitle && config.textClass, "whitespace-pre-wrap"),
42
- children: description
43
- })]
44
- }),
45
- children
46
- ]
36
+ }), (hasContent || children != null) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
37
+ className: "flex w-full min-w-0 flex-1 flex-col gap-1",
38
+ children: [
39
+ hasTitle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.AlertTitle, {
40
+ className: require_utils.cn(config.textClass, { "block!": !hasTitle }),
41
+ children: title
42
+ }),
43
+ description != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.AlertDescription, {
44
+ className: require_utils.cn(config.descClass, !hasTitle && config.textClass, "whitespace-pre-wrap"),
45
+ children: description
46
+ }),
47
+ children
48
+ ]
49
+ })]
50
+ }), !hasStructuredLayout && children]
47
51
  });
48
52
  };
49
53
  Alert.displayName = "Alert";
package/dist/Alert.js CHANGED
@@ -18,28 +18,32 @@ const Alert$1 = (props) => {
18
18
  const msgIcon = getIcon(icon, variant);
19
19
  const hasTitle = title != null && title.trim() !== "";
20
20
  const hasContent = hasTitle || description != null;
21
+ const hasStructuredLayout = Boolean(msgIcon || hasContent);
21
22
  const config = variantConfig[variant] ?? variantConfig.default;
22
23
  return /* @__PURE__ */ jsxs(Alert, {
23
24
  ...rest,
24
25
  variant: "destructive",
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),
26
- children: [
27
- msgIcon && /* @__PURE__ */ jsx("div", {
28
- className: cn$1("mr-3 flex items-start pt-0.5"),
26
+ className: cn$1("flex flex-col items-stretch bg-card border-accent! rounded-sm border-0 border-l-4", config.borderClass, config.textClass, className),
27
+ children: [hasStructuredLayout && /* @__PURE__ */ jsxs("div", {
28
+ className: cn$1("col-span-full flex w-full min-w-0 items-start", msgIcon ? "flex-row" : "flex-col"),
29
+ children: [msgIcon && /* @__PURE__ */ jsx("div", {
30
+ className: cn$1("mr-3 flex shrink-0 items-start pt-0.5"),
29
31
  children: msgIcon
30
- }),
31
- hasContent && /* @__PURE__ */ jsxs("div", {
32
- className: "flex flex-1 flex-col gap-1",
33
- children: [hasTitle && /* @__PURE__ */ jsx(AlertTitle, {
34
- className: cn$1(config.textClass, { "block!": !hasTitle }),
35
- children: title
36
- }), description != null && /* @__PURE__ */ jsx(AlertDescription, {
37
- className: cn$1(config.descClass, !hasTitle && config.textClass, "whitespace-pre-wrap"),
38
- children: description
39
- })]
40
- }),
41
- children
42
- ]
32
+ }), (hasContent || children != null) && /* @__PURE__ */ jsxs("div", {
33
+ className: "flex w-full min-w-0 flex-1 flex-col gap-1",
34
+ children: [
35
+ hasTitle && /* @__PURE__ */ jsx(AlertTitle, {
36
+ className: cn$1(config.textClass, { "block!": !hasTitle }),
37
+ children: title
38
+ }),
39
+ description != null && /* @__PURE__ */ jsx(AlertDescription, {
40
+ className: cn$1(config.descClass, !hasTitle && config.textClass, "whitespace-pre-wrap"),
41
+ children: description
42
+ }),
43
+ children
44
+ ]
45
+ })]
46
+ }), !hasStructuredLayout && children]
43
47
  });
44
48
  };
45
49
  Alert$1.displayName = "Alert";
package/dist/Rating.d.cts CHANGED
@@ -10,7 +10,7 @@ interface RatingOption {
10
10
  value: number;
11
11
  }
12
12
  declare const ratingVariants: (props?: ({
13
- size?: "default" | "sm" | "lg" | "xl" | null | undefined;
13
+ size?: "sm" | "default" | "lg" | "xl" | null | undefined;
14
14
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
15
15
  type RatingSize = VariantProps<typeof ratingVariants>['size'];
16
16
  type IconType = 'star' | 'circle';
package/dist/Rating.d.ts CHANGED
@@ -10,7 +10,7 @@ interface RatingOption {
10
10
  value: number;
11
11
  }
12
12
  declare const ratingVariants: (props?: ({
13
- size?: "default" | "sm" | "lg" | "xl" | null | undefined;
13
+ size?: "sm" | "default" | "lg" | "xl" | null | undefined;
14
14
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
15
15
  type RatingSize = VariantProps<typeof ratingVariants>['size'];
16
16
  type IconType = 'star' | 'circle';
@@ -1,6 +1,6 @@
1
1
  import { DialogContent } from "@pixpilot/shadcn";
2
2
  import * as React$1 from "react";
3
- import * as react_jsx_runtime10 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
4
4
  import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
5
5
 
6
6
  //#region src/dialog/Dialog.d.ts
@@ -13,14 +13,14 @@ declare const DialogContent$1: React$1.ForwardRefExoticComponent<Omit<_radix_ui_
13
13
  declare function DialogHeader$1({
14
14
  className,
15
15
  ...props
16
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime10.JSX.Element;
16
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
17
17
  declare function DialogBody({
18
18
  className,
19
19
  ...props
20
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime10.JSX.Element;
20
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
21
21
  declare function DialogFooter$1({
22
22
  className,
23
23
  ...props
24
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime10.JSX.Element;
24
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
25
25
  //#endregion
26
26
  export { DialogBody, DialogContent$1 as DialogContent, DialogContentProps, DialogFooter$1 as DialogFooter, DialogHeader$1 as DialogHeader };
@@ -1,10 +1,10 @@
1
1
  import { FileUploadInlineProps } from "./types.cjs";
2
- import * as react_jsx_runtime13 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_runtime13.JSX.Element;
8
+ declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime12.JSX.Element;
9
9
  //#endregion
10
10
  export { FileUploadInline };
@@ -1,10 +1,10 @@
1
1
  import { FileUploadInlineProps } from "./types.js";
2
- import * as react_jsx_runtime9 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_runtime9.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_runtime12 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime13 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_runtime12.JSX.Element;
8
+ declare function FileUploadRoot(props: FileUploadRootProps): react_jsx_runtime13.JSX.Element;
9
9
  declare namespace FileUploadRoot {
10
10
  var displayName: string;
11
11
  }
@@ -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 {
@@ -59,6 +59,6 @@ declare function TagsInput({
59
59
  addOnTab,
60
60
  onValidate,
61
61
  addButtonVisibility
62
- }: TagsInputProps): react_jsx_runtime15.JSX.Element;
62
+ }: TagsInputProps): react_jsx_runtime16.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_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 {
@@ -59,6 +59,6 @@ declare function TagsInput({
59
59
  addOnTab,
60
60
  onValidate,
61
61
  addButtonVisibility
62
- }: TagsInputProps): react_jsx_runtime16.JSX.Element;
62
+ }: TagsInputProps): react_jsx_runtime15.JSX.Element;
63
63
  //#endregion
64
64
  export { TagsInput, TagsInputProps };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime16 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
@@ -77,6 +77,6 @@ declare function TagsInputInline({
77
77
  canAddCurrentValue,
78
78
  onAddCurrentInput,
79
79
  showClear
80
- }: TagsInputInlineProps): react_jsx_runtime16.JSX.Element;
80
+ }: TagsInputInlineProps): react_jsx_runtime15.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_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 {
@@ -77,6 +77,6 @@ declare function TagsInputInline({
77
77
  canAddCurrentValue,
78
78
  onAddCurrentInput,
79
79
  showClear
80
- }: TagsInputInlineProps): react_jsx_runtime15.JSX.Element;
80
+ }: TagsInputInlineProps): react_jsx_runtime16.JSX.Element;
81
81
  //#endregion
82
82
  export { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps };
@@ -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 {
@@ -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_runtime18.JSX.Element;
21
+ declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime17.JSX.Element;
22
22
  declare namespace ThemeModeDropdown {
23
23
  var displayName: string;
24
24
  }
@@ -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/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_runtime19.JSX.Element;
29
+ declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime20.JSX.Element;
30
30
  declare namespace ThemeModeSwitchInside {
31
31
  var displayName: string;
32
32
  }
@@ -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 {
@@ -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_runtime20.JSX.Element;
26
+ declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime19.JSX.Element;
27
27
  declare namespace ThemeModeSwitchOutside {
28
28
  var displayName: string;
29
29
  }
@@ -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/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_runtime17.JSX.Element;
17
+ declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime18.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.24.0",
4
+ "version": "1.25.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",
@@ -63,12 +63,12 @@
63
63
  "tailwindcss": "^4.2.2",
64
64
  "tsdown": "^0.15.12",
65
65
  "typescript": "^5.9.3",
66
+ "@internal/eslint-config": "0.3.0",
67
+ "@internal/hooks": "0.0.0",
66
68
  "@internal/prettier-config": "0.0.1",
67
69
  "@internal/tsconfig": "0.1.0",
68
- "@internal/tsdown-config": "0.1.0",
69
70
  "@internal/vitest-config": "0.1.0",
70
- "@internal/hooks": "0.0.0",
71
- "@internal/eslint-config": "0.3.0"
71
+ "@internal/tsdown-config": "0.1.0"
72
72
  },
73
73
  "prettier": "@internal/prettier-config",
74
74
  "scripts": {