@pixpilot/shadcn-ui 1.17.1 → 1.18.2

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/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_runtime1 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_runtime1.JSX.Element;
53
+ }): react_jsx_runtime0.JSX.Element;
54
54
  declare namespace ButtonExtended {
55
55
  var displayName: string;
56
56
  }
@@ -12,7 +12,7 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
12
12
 
13
13
  //#region src/ColorPickerBase/ColorPickerButton.tsx
14
14
  const ColorPickerButton = (props) => {
15
- const { slots, formatDisplayValue, placeholder = "Pick a color",...rest } = props;
15
+ const { slots, formatDisplayValue, placeholder = "Pick a color", onClear,...rest } = props;
16
16
  const { isPickerOpen, value, onValueChange } = require_color_picker_context.useColorPickerContext();
17
17
  if (process.env.NODE_ENV !== "production") {
18
18
  if (onValueChange === void 0) throw new Error("ColorPickerButton must be used within a ColorPickerRoot component");
@@ -35,14 +35,29 @@ const ColorPickerButton = (props) => {
35
35
  ...slots?.swatch
36
36
  })
37
37
  }),
38
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.InputGroupText, {
39
- className: "flex-1 text-left text-foreground pl-2",
38
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
39
+ className: "flex-1 min-w-0 block truncate text-left text-foreground pl-2",
40
40
  children: renderDisplayValue()
41
41
  }),
42
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.InputGroupAddon, {
42
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.InputGroupAddon, {
43
43
  align: "inline-end",
44
- className: "",
45
- children: isPickerOpen ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronUpIcon, { className: "size-4 opacity-50" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDownIcon, { className: "size-4 opacity-50" })
44
+ className: "gap-1",
45
+ children: [onClear != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
46
+ type: "button",
47
+ variant: "ghost",
48
+ size: "icon",
49
+ "aria-label": "Clear color",
50
+ ...slots?.clearButton,
51
+ className: (0, __pixpilot_shadcn.cn)("size-6 shrink-0 rounded-full", slots?.clearButton?.className),
52
+ onClick: (e) => {
53
+ slots?.clearButton?.onClick?.(e);
54
+ if (e.defaultPrevented) return;
55
+ e.preventDefault();
56
+ e.stopPropagation();
57
+ onClear();
58
+ },
59
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, { className: "size-4 opacity-50" })
60
+ }), isPickerOpen ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronUpIcon, { className: "size-4 opacity-50" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDownIcon, { className: "size-4 opacity-50" })]
46
61
  })
47
62
  ]
48
63
  })
@@ -1,12 +1,15 @@
1
- import { ColorPickerSwatch } from "./ColorPickerSwatch.cjs";
1
+ import { ColorPickerSwatch as ColorPickerSwatch$1 } from "./ColorPickerSwatch.cjs";
2
+ import { Button } from "@pixpilot/shadcn";
2
3
  import React from "react";
3
4
 
4
5
  //#region src/ColorPickerBase/ColorPickerButton.d.ts
5
6
  interface ColorPickerButtonProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'value'> {
6
7
  formatDisplayValue?: (value: string) => React.ReactNode;
7
8
  placeholder?: string;
9
+ onClear?: () => void;
8
10
  slots?: {
9
- swatch: React.ComponentProps<typeof ColorPickerSwatch>;
11
+ swatch?: React.ComponentProps<typeof ColorPickerSwatch$1>;
12
+ clearButton?: React.ComponentProps<typeof Button>;
10
13
  };
11
14
  }
12
15
  declare const ColorPickerButton: React.FC<ColorPickerButtonProps>;
@@ -1,12 +1,15 @@
1
- import { ColorPickerSwatch } from "./ColorPickerSwatch.js";
1
+ import { ColorPickerSwatch as ColorPickerSwatch$1 } from "./ColorPickerSwatch.js";
2
+ import { Button } from "@pixpilot/shadcn";
2
3
  import React from "react";
3
4
 
4
5
  //#region src/ColorPickerBase/ColorPickerButton.d.ts
5
6
  interface ColorPickerButtonProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'value'> {
6
7
  formatDisplayValue?: (value: string) => React.ReactNode;
7
8
  placeholder?: string;
9
+ onClear?: () => void;
8
10
  slots?: {
9
- swatch: React.ComponentProps<typeof ColorPickerSwatch>;
11
+ swatch?: React.ComponentProps<typeof ColorPickerSwatch$1>;
12
+ clearButton?: React.ComponentProps<typeof Button>;
10
13
  };
11
14
  }
12
15
  declare const ColorPickerButton: React.FC<ColorPickerButtonProps>;
@@ -1,13 +1,13 @@
1
1
  import { useColorPickerContext } from "./color-picker-context.js";
2
2
  import { ColorPickerSwatch as ColorPickerSwatch$1 } from "./ColorPickerSwatch.js";
3
- import { ColorPickerTrigger, InputGroup, InputGroupAddon, InputGroupText, cn } from "@pixpilot/shadcn";
4
- import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
3
+ import { Button, ColorPickerTrigger, InputGroup, InputGroupAddon, cn } from "@pixpilot/shadcn";
4
+ import { ChevronDownIcon, ChevronUpIcon, XIcon } from "lucide-react";
5
5
  import React from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
 
8
8
  //#region src/ColorPickerBase/ColorPickerButton.tsx
9
9
  const ColorPickerButton = (props) => {
10
- const { slots, formatDisplayValue, placeholder = "Pick a color",...rest } = props;
10
+ const { slots, formatDisplayValue, placeholder = "Pick a color", onClear,...rest } = props;
11
11
  const { isPickerOpen, value, onValueChange } = useColorPickerContext();
12
12
  if (onValueChange === void 0) throw new Error("ColorPickerButton must be used within a ColorPickerRoot component");
13
13
  const renderDisplayValue = () => {
@@ -28,14 +28,29 @@ const ColorPickerButton = (props) => {
28
28
  ...slots?.swatch
29
29
  })
30
30
  }),
31
- /* @__PURE__ */ jsx(InputGroupText, {
32
- className: "flex-1 text-left text-foreground pl-2",
31
+ /* @__PURE__ */ jsx("span", {
32
+ className: "flex-1 min-w-0 block truncate text-left text-foreground pl-2",
33
33
  children: renderDisplayValue()
34
34
  }),
35
- /* @__PURE__ */ jsx(InputGroupAddon, {
35
+ /* @__PURE__ */ jsxs(InputGroupAddon, {
36
36
  align: "inline-end",
37
- className: "",
38
- children: isPickerOpen ? /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4 opacity-50" }) : /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" })
37
+ className: "gap-1",
38
+ children: [onClear != null && /* @__PURE__ */ jsx(Button, {
39
+ type: "button",
40
+ variant: "ghost",
41
+ size: "icon",
42
+ "aria-label": "Clear color",
43
+ ...slots?.clearButton,
44
+ className: cn("size-6 shrink-0 rounded-full", slots?.clearButton?.className),
45
+ onClick: (e) => {
46
+ slots?.clearButton?.onClick?.(e);
47
+ if (e.defaultPrevented) return;
48
+ e.preventDefault();
49
+ e.stopPropagation();
50
+ onClear();
51
+ },
52
+ children: /* @__PURE__ */ jsx(XIcon, { className: "size-4 opacity-50" })
53
+ }), isPickerOpen ? /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4 opacity-50" }) : /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" })]
39
54
  })
40
55
  ]
41
56
  })
package/dist/Rating.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
2
2
  import * as React$1 from "react";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import * as class_variance_authority_types0 from "class-variance-authority/types";
@@ -35,7 +35,7 @@ declare function RatingButton({
35
35
  index,
36
36
  className,
37
37
  ...props
38
- }: RatingButtonProps): react_jsx_runtime5.JSX.Element;
38
+ }: RatingButtonProps): react_jsx_runtime6.JSX.Element;
39
39
  declare function Rating({
40
40
  value: valueProp,
41
41
  defaultValue,
@@ -52,6 +52,6 @@ declare function Rating({
52
52
  className,
53
53
  children,
54
54
  ...props
55
- }: React$1.PropsWithChildren<RatingProps>): react_jsx_runtime5.JSX.Element;
55
+ }: React$1.PropsWithChildren<RatingProps>): react_jsx_runtime6.JSX.Element;
56
56
  //#endregion
57
57
  export { Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps };
package/dist/Select.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime7 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
2
2
  import { Select, SelectContent } from "@pixpilot/shadcn";
3
3
  import React, { ComponentProps } from "react";
4
4
 
@@ -51,6 +51,6 @@ type BaseSelectProps = {
51
51
  required?: boolean;
52
52
  className?: string;
53
53
  } & Omit<ComponentProps<typeof Select>, 'value' | 'onValueChange' | 'children' | 'disabled' | 'name' | 'required'>;
54
- declare function Select$1(props: BaseSelectProps): react_jsx_runtime7.JSX.Element;
54
+ declare function Select$1(props: BaseSelectProps): react_jsx_runtime5.JSX.Element;
55
55
  //#endregion
56
56
  export { Select$1 as Select, SelectContentProps, SelectOption };
@@ -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_runtime8 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_runtime8.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_runtime12 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime11 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_runtime12.JSX.Element;
8
+ declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime11.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_runtime20 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime12 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_runtime20.JSX.Element;
8
+ declare function FileUploadRoot(props: FileUploadRootProps): react_jsx_runtime12.JSX.Element;
9
9
  declare namespace FileUploadRoot {
10
10
  var displayName: string;
11
11
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime13 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_runtime13.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_runtime15 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime20 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_runtime20.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_runtime19 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_runtime19.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_runtime16 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_runtime16.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/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_runtime17.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/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_runtime18.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_runtime15 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_runtime15.JSX.Element;
17
17
  declare namespace ThemeModeToggleButton {
18
18
  var displayName: string;
19
19
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/shadcn-ui",
3
3
  "type": "module",
4
- "version": "1.17.1",
4
+ "version": "1.18.2",
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.3"
50
+ "@pixpilot/shadcn": "1.2.5"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@storybook/react": "^8.6.18",
@@ -56,13 +56,15 @@
56
56
  "@types/react": "^19.2.14",
57
57
  "eslint": "^9.39.4",
58
58
  "jsdom": "^27.4.0",
59
+ "postcss": "^8.5.14",
59
60
  "react": "19.2.0",
60
61
  "react-dom": "19.2.0",
62
+ "tailwindcss": "^4.2.2",
61
63
  "tsdown": "^0.15.12",
62
64
  "typescript": "^5.9.3",
63
65
  "@internal/eslint-config": "0.3.0",
64
- "@internal/hooks": "0.0.0",
65
66
  "@internal/prettier-config": "0.0.1",
67
+ "@internal/hooks": "0.0.0",
66
68
  "@internal/tsconfig": "0.1.0",
67
69
  "@internal/tsdown-config": "0.1.0",
68
70
  "@internal/vitest-config": "0.1.0"