@pixpilot/shadcn-ui 1.19.4 → 1.20.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.
@@ -39,6 +39,7 @@ const ColorPickerButton = (props) => {
39
39
  align: "inline-start",
40
40
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerSwatch.ColorPickerSwatch, {
41
41
  color: swatchColor,
42
+ resetOptions,
42
43
  ...slots?.swatch,
43
44
  children: swatchChildren
44
45
  })
@@ -1,6 +1,4 @@
1
- import { ColorPickerResetOptions } from "./types.cjs";
2
- import { ColorPickerSwatch as ColorPickerSwatch$1 } from "./ColorPickerSwatch.cjs";
3
- import { Button } from "@pixpilot/shadcn";
1
+ import { ColorPickerResetOptions, ColorPickerSlots } from "./types.cjs";
4
2
  import React from "react";
5
3
 
6
4
  //#region src/ColorPickerBase/ColorPickerButton.d.ts
@@ -9,10 +7,7 @@ interface ColorPickerButtonProps extends Omit<React.ComponentPropsWithoutRef<'di
9
7
  placeholder?: string;
10
8
  onClear?: () => void;
11
9
  resetOptions?: ColorPickerResetOptions;
12
- slots?: {
13
- swatch?: React.ComponentProps<typeof ColorPickerSwatch$1>;
14
- clearButton?: React.ComponentProps<typeof Button>;
15
- };
10
+ slots?: ColorPickerSlots;
16
11
  }
17
12
  declare const ColorPickerButton: React.FC<ColorPickerButtonProps>;
18
13
  //#endregion
@@ -1,6 +1,4 @@
1
- import { ColorPickerResetOptions } from "./types.js";
2
- import { ColorPickerSwatch as ColorPickerSwatch$1 } from "./ColorPickerSwatch.js";
3
- import { Button } from "@pixpilot/shadcn";
1
+ import { ColorPickerResetOptions, ColorPickerSlots } from "./types.js";
4
2
  import React from "react";
5
3
 
6
4
  //#region src/ColorPickerBase/ColorPickerButton.d.ts
@@ -9,10 +7,7 @@ interface ColorPickerButtonProps extends Omit<React.ComponentPropsWithoutRef<'di
9
7
  placeholder?: string;
10
8
  onClear?: () => void;
11
9
  resetOptions?: ColorPickerResetOptions;
12
- slots?: {
13
- swatch?: React.ComponentProps<typeof ColorPickerSwatch$1>;
14
- clearButton?: React.ComponentProps<typeof Button>;
15
- };
10
+ slots?: ColorPickerSlots;
16
11
  }
17
12
  declare const ColorPickerButton: React.FC<ColorPickerButtonProps>;
18
13
  //#endregion
@@ -32,6 +32,7 @@ const ColorPickerButton = (props) => {
32
32
  align: "inline-start",
33
33
  children: /* @__PURE__ */ jsx(ColorPickerSwatch$1, {
34
34
  color: swatchColor,
35
+ resetOptions,
35
36
  ...slots?.swatch,
36
37
  children: swatchChildren
37
38
  })
@@ -34,6 +34,7 @@ const ColorPickerInput = (props) => {
34
34
  align: "inline-start",
35
35
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerSwatch.ColorPickerSwatch, {
36
36
  color: swatchColor,
37
+ resetOptions,
37
38
  ...slots?.swatch,
38
39
  children: swatchChildren
39
40
  })
@@ -1,17 +1,12 @@
1
- import { ColorPickerResetOptions } from "./types.cjs";
2
- import { ColorPickerSwatch as ColorPickerSwatch$1 } from "./ColorPickerSwatch.cjs";
3
- import { Button } from "@pixpilot/shadcn";
1
+ import { ColorPickerResetOptions, ColorPickerSlots } from "./types.cjs";
4
2
  import React from "react";
5
3
 
6
4
  //#region src/ColorPickerBase/ColorPickerInput.d.ts
7
5
  interface ColorPickerInputProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'value'> {
8
6
  onClear?: () => void;
9
7
  resetOptions?: ColorPickerResetOptions;
10
- slots?: {
11
- swatch?: React.ComponentProps<typeof ColorPickerSwatch$1>;
12
- clearButton?: React.ComponentProps<typeof Button>;
13
- };
8
+ slots?: ColorPickerSlots;
14
9
  }
15
- declare const ColorPickerInput$1: React.FC<ColorPickerInputProps>;
10
+ declare const ColorPickerInput: React.FC<ColorPickerInputProps>;
16
11
  //#endregion
17
- export { ColorPickerInput$1 as ColorPickerInput, ColorPickerInputProps };
12
+ export { ColorPickerInput, ColorPickerInputProps };
@@ -1,17 +1,12 @@
1
- import { ColorPickerResetOptions } from "./types.js";
2
- import { ColorPickerSwatch as ColorPickerSwatch$1 } from "./ColorPickerSwatch.js";
3
- import { Button } from "@pixpilot/shadcn";
1
+ import { ColorPickerResetOptions, ColorPickerSlots } from "./types.js";
4
2
  import React from "react";
5
3
 
6
4
  //#region src/ColorPickerBase/ColorPickerInput.d.ts
7
5
  interface ColorPickerInputProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'value'> {
8
6
  onClear?: () => void;
9
7
  resetOptions?: ColorPickerResetOptions;
10
- slots?: {
11
- swatch?: React.ComponentProps<typeof ColorPickerSwatch$1>;
12
- clearButton?: React.ComponentProps<typeof Button>;
13
- };
8
+ slots?: ColorPickerSlots;
14
9
  }
15
- declare const ColorPickerInput$1: React.FC<ColorPickerInputProps>;
10
+ declare const ColorPickerInput: React.FC<ColorPickerInputProps>;
16
11
  //#endregion
17
- export { ColorPickerInput$1 as ColorPickerInput, ColorPickerInputProps };
12
+ export { ColorPickerInput, ColorPickerInputProps };
@@ -27,6 +27,7 @@ const ColorPickerInput$1 = (props) => {
27
27
  align: "inline-start",
28
28
  children: /* @__PURE__ */ jsx(ColorPickerSwatch$1, {
29
29
  color: swatchColor,
30
+ resetOptions,
30
31
  ...slots?.swatch,
31
32
  children: swatchChildren
32
33
  })
@@ -8,8 +8,10 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
8
8
 
9
9
  //#region src/ColorPickerBase/ColorPickerSwatch.tsx
10
10
  const ColorPickerSwatch = (props) => {
11
+ const { resetOptions } = props;
11
12
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerSwatch, {
12
13
  ...props,
14
+ style: { backgroundColor: props.color === resetOptions?.value ? resetOptions?.swatchColor : props.color },
13
15
  className: (0, __pixpilot_shadcn.cn)("rounded-sm w-6.5 h-6.5 p-0 -ml-1 cursor-pointer relative flex items-center justify-center", props.className)
14
16
  });
15
17
  };
@@ -4,8 +4,10 @@ import { jsx } from "react/jsx-runtime";
4
4
 
5
5
  //#region src/ColorPickerBase/ColorPickerSwatch.tsx
6
6
  const ColorPickerSwatch$1 = (props) => {
7
+ const { resetOptions } = props;
7
8
  return /* @__PURE__ */ jsx(ColorPickerSwatch, {
8
9
  ...props,
10
+ style: { backgroundColor: props.color === resetOptions?.value ? resetOptions?.swatchColor : props.color },
9
11
  className: cn("rounded-sm w-6.5 h-6.5 p-0 -ml-1 cursor-pointer relative flex items-center justify-center", props.className)
10
12
  });
11
13
  };
@@ -1,5 +1,5 @@
1
- import { ColorPickerContent, ColorPickerProps } from "@pixpilot/shadcn";
2
- import { ReactNode } from "react";
1
+ import { Button, ColorPickerContent, ColorPickerProps, ColorPickerSwatch } from "@pixpilot/shadcn";
2
+ import { ComponentProps, ReactNode } from "react";
3
3
 
4
4
  //#region src/ColorPickerBase/types.d.ts
5
5
  interface PresetColor {
@@ -43,5 +43,9 @@ interface ColorPickerResetOptions {
43
43
  tooltip?: string;
44
44
  swatchColor?: string;
45
45
  }
46
+ interface ColorPickerSlots {
47
+ swatch?: ComponentProps<typeof ColorPickerSwatch>;
48
+ clearButton?: ComponentProps<typeof Button>;
49
+ }
46
50
  //#endregion
47
- export { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerContentProps, ColorPickerContentWrapperProps, ColorPickerResetOptions, ColorPickerRootProps, PresetColor };
51
+ export { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerContentProps, ColorPickerContentWrapperProps, ColorPickerResetOptions, ColorPickerRootProps, ColorPickerSlots, PresetColor };
@@ -1,5 +1,5 @@
1
- import { ColorPickerContent, ColorPickerProps } from "@pixpilot/shadcn";
2
- import { ReactNode } from "react";
1
+ import { Button, ColorPickerContent, ColorPickerProps, ColorPickerSwatch } from "@pixpilot/shadcn";
2
+ import { ComponentProps, ReactNode } from "react";
3
3
 
4
4
  //#region src/ColorPickerBase/types.d.ts
5
5
  interface PresetColor {
@@ -43,5 +43,9 @@ interface ColorPickerResetOptions {
43
43
  tooltip?: string;
44
44
  swatchColor?: string;
45
45
  }
46
+ interface ColorPickerSlots {
47
+ swatch?: ComponentProps<typeof ColorPickerSwatch>;
48
+ clearButton?: ComponentProps<typeof Button>;
49
+ }
46
50
  //#endregion
47
- export { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerContentProps, ColorPickerContentWrapperProps, ColorPickerResetOptions, ColorPickerRootProps, PresetColor };
51
+ export { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerContentProps, ColorPickerContentWrapperProps, ColorPickerResetOptions, ColorPickerRootProps, ColorPickerSlots, PresetColor };
@@ -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,7 +1,7 @@
1
1
  import { FileUploadProps } from "./types/index.js";
2
- import * as react_jsx_runtime9 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/file-upload/FileUpload.d.ts
5
- declare function FileUpload(props: FileUploadProps): react_jsx_runtime9.JSX.Element;
5
+ declare function FileUpload(props: FileUploadProps): react_jsx_runtime8.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_runtime17 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_runtime17.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_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,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_runtime18 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_runtime18.JSX.Element;
9
9
  declare namespace FileUploadRoot {
10
10
  var displayName: string;
11
11
  }
@@ -1,11 +1,11 @@
1
1
  import { FileUploadRootProps } from "./types.js";
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-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_runtime8.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,4 +1,4 @@
1
- import * as react_jsx_runtime13 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime12 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_runtime12.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_runtime19 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_runtime19.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_runtime20 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_runtime20.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_runtime13 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_runtime13.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_runtime14 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_runtime14.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_runtime15 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_runtime15.JSX.Element;
26
26
  declare namespace ThemeModeSwitchOutside {
27
27
  var displayName: string;
28
28
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/shadcn-ui",
3
3
  "type": "module",
4
- "version": "1.19.4",
4
+ "version": "1.20.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,11 +63,11 @@
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
66
  "@internal/hooks": "0.0.0",
67
+ "@internal/eslint-config": "0.3.0",
68
68
  "@internal/prettier-config": "0.0.1",
69
- "@internal/tsconfig": "0.1.0",
70
69
  "@internal/tsdown-config": "0.1.0",
70
+ "@internal/tsconfig": "0.1.0",
71
71
  "@internal/vitest-config": "0.1.0"
72
72
  },
73
73
  "prettier": "@internal/prettier-config",
@@ -1,8 +0,0 @@
1
- import { ColorPickerSwatch } from "@pixpilot/shadcn";
2
- import React from "react";
3
-
4
- //#region src/ColorPickerBase/ColorPickerSwatch.d.ts
5
- interface ColorPickerSwatchProps extends React.ComponentProps<typeof ColorPickerSwatch> {}
6
- declare const ColorPickerSwatch$1: React.FC<ColorPickerSwatchProps>;
7
- //#endregion
8
- export { ColorPickerSwatch$1 as ColorPickerSwatch };
@@ -1,8 +0,0 @@
1
- import { ColorPickerSwatch } from "@pixpilot/shadcn";
2
- import React from "react";
3
-
4
- //#region src/ColorPickerBase/ColorPickerSwatch.d.ts
5
- interface ColorPickerSwatchProps extends React.ComponentProps<typeof ColorPickerSwatch> {}
6
- declare const ColorPickerSwatch$1: React.FC<ColorPickerSwatchProps>;
7
- //#endregion
8
- export { ColorPickerSwatch$1 as ColorPickerSwatch };