@pixpilot/shadcn-ui 0.24.0 → 0.25.1

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.
@@ -14,7 +14,7 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
14
14
 
15
15
  //#region src/ColorPickerBase/ColorPickerCompact.tsx
16
16
  const ColorPickerCompact = react.default.memo((props) => {
17
- const { onValueChange, presetColors, sections, currentValue } = props;
17
+ const { onValueChange, presetColors, sections, currentValue,...rest } = props;
18
18
  const enabledSections = new Set(sections);
19
19
  const showPicker = enabledSections.has("picker");
20
20
  const showSwatch = enabledSections.has("swatch");
@@ -23,32 +23,35 @@ const ColorPickerCompact = react.default.memo((props) => {
23
23
  const [showFullPicker, setShowFullPicker] = (0, react.useState)(false);
24
24
  const shouldShowPickerUi = showPicker && (showSwatch ? showFullPicker : true);
25
25
  const canTogglePickerUi = showPicker && showSwatch;
26
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_ColorPickerContent.ColorPickerContent, { children: [
27
- shouldShowPickerUi && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerArea, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
28
- className: "flex items-center gap-2",
29
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerEyeDropper, { className: "hidden xs:flex " }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
30
- className: "flex-1 space-y-2",
31
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerHueSlider, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerAlphaSlider, {})]
32
- })]
33
- })] }),
34
- showSwatch && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
35
- className: "gap-2 flex flex-wrap",
36
- children: [presetColors.map((color) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteSwatch.PaletteSwatch, {
37
- color,
38
- onSelect: onValueChange,
39
- selectedValue: currentValue
40
- }, color.value)), canTogglePickerUi && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteButton.PaletteButton, {
41
- onClick: () => setShowFullPicker(!showFullPicker),
42
- "aria-label": "Toggle full color picker",
43
- className: "flex items-center justify-center border-input bg-input hover:bg-accent hover:text-accent-foreground",
44
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Droplet, { className: "h-4 w-4" })
45
- })]
46
- }),
47
- (showFormatSelect || showInput) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
48
- className: "flex items-center gap-2 w-full",
49
- children: [showFormatSelect && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerFormatSelect, {}), showInput && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerInput.ColorPickerInput, {})]
50
- })
51
- ] });
26
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_ColorPickerContent.ColorPickerContent, {
27
+ ...rest,
28
+ children: [
29
+ shouldShowPickerUi && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerArea, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
30
+ className: "flex items-center gap-2",
31
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerEyeDropper, { className: "hidden xs:flex " }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
32
+ className: "flex-1 space-y-2",
33
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerHueSlider, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerAlphaSlider, {})]
34
+ })]
35
+ })] }),
36
+ showSwatch && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
37
+ className: "gap-2 flex flex-wrap",
38
+ children: [presetColors.map((color) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteSwatch.PaletteSwatch, {
39
+ color,
40
+ onSelect: onValueChange,
41
+ selectedValue: currentValue
42
+ }, color.value)), canTogglePickerUi && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteButton.PaletteButton, {
43
+ onClick: () => setShowFullPicker(!showFullPicker),
44
+ "aria-label": "Toggle full color picker",
45
+ className: "flex items-center justify-center border-input bg-input hover:bg-accent hover:text-accent-foreground",
46
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Droplet, { className: "h-4 w-4" })
47
+ })]
48
+ }),
49
+ (showFormatSelect || showInput) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
50
+ className: "flex items-center gap-2 w-full",
51
+ children: [showFormatSelect && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerFormatSelect, {}), showInput && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerInput.ColorPickerInput, {})]
52
+ })
53
+ ]
54
+ });
52
55
  });
53
56
  ColorPickerCompact.displayName = "ColorPickerCompact";
54
57
 
@@ -9,7 +9,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
 
10
10
  //#region src/ColorPickerBase/ColorPickerCompact.tsx
11
11
  const ColorPickerCompact = React.memo((props) => {
12
- const { onValueChange, presetColors, sections, currentValue } = props;
12
+ const { onValueChange, presetColors, sections, currentValue,...rest } = props;
13
13
  const enabledSections = new Set(sections);
14
14
  const showPicker = enabledSections.has("picker");
15
15
  const showSwatch = enabledSections.has("swatch");
@@ -18,32 +18,35 @@ const ColorPickerCompact = React.memo((props) => {
18
18
  const [showFullPicker, setShowFullPicker] = useState(false);
19
19
  const shouldShowPickerUi = showPicker && (showSwatch ? showFullPicker : true);
20
20
  const canTogglePickerUi = showPicker && showSwatch;
21
- return /* @__PURE__ */ jsxs(ColorPickerContent$1, { children: [
22
- shouldShowPickerUi && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ColorPickerArea, {}), /* @__PURE__ */ jsxs("div", {
23
- className: "flex items-center gap-2",
24
- children: [/* @__PURE__ */ jsx(ColorPickerEyeDropper, { className: "hidden xs:flex " }), /* @__PURE__ */ jsxs("div", {
25
- className: "flex-1 space-y-2",
26
- children: [/* @__PURE__ */ jsx(ColorPickerHueSlider, {}), /* @__PURE__ */ jsx(ColorPickerAlphaSlider, {})]
27
- })]
28
- })] }),
29
- showSwatch && /* @__PURE__ */ jsxs("div", {
30
- className: "gap-2 flex flex-wrap",
31
- children: [presetColors.map((color) => /* @__PURE__ */ jsx(PaletteSwatch, {
32
- color,
33
- onSelect: onValueChange,
34
- selectedValue: currentValue
35
- }, color.value)), canTogglePickerUi && /* @__PURE__ */ jsx(PaletteButton, {
36
- onClick: () => setShowFullPicker(!showFullPicker),
37
- "aria-label": "Toggle full color picker",
38
- className: "flex items-center justify-center border-input bg-input hover:bg-accent hover:text-accent-foreground",
39
- children: /* @__PURE__ */ jsx(Droplet, { className: "h-4 w-4" })
40
- })]
41
- }),
42
- (showFormatSelect || showInput) && /* @__PURE__ */ jsxs("div", {
43
- className: "flex items-center gap-2 w-full",
44
- children: [showFormatSelect && /* @__PURE__ */ jsx(ColorPickerFormatSelect, {}), showInput && /* @__PURE__ */ jsx(ColorPickerInput$1, {})]
45
- })
46
- ] });
21
+ return /* @__PURE__ */ jsxs(ColorPickerContent$1, {
22
+ ...rest,
23
+ children: [
24
+ shouldShowPickerUi && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ColorPickerArea, {}), /* @__PURE__ */ jsxs("div", {
25
+ className: "flex items-center gap-2",
26
+ children: [/* @__PURE__ */ jsx(ColorPickerEyeDropper, { className: "hidden xs:flex " }), /* @__PURE__ */ jsxs("div", {
27
+ className: "flex-1 space-y-2",
28
+ children: [/* @__PURE__ */ jsx(ColorPickerHueSlider, {}), /* @__PURE__ */ jsx(ColorPickerAlphaSlider, {})]
29
+ })]
30
+ })] }),
31
+ showSwatch && /* @__PURE__ */ jsxs("div", {
32
+ className: "gap-2 flex flex-wrap",
33
+ children: [presetColors.map((color) => /* @__PURE__ */ jsx(PaletteSwatch, {
34
+ color,
35
+ onSelect: onValueChange,
36
+ selectedValue: currentValue
37
+ }, color.value)), canTogglePickerUi && /* @__PURE__ */ jsx(PaletteButton, {
38
+ onClick: () => setShowFullPicker(!showFullPicker),
39
+ "aria-label": "Toggle full color picker",
40
+ className: "flex items-center justify-center border-input bg-input hover:bg-accent hover:text-accent-foreground",
41
+ children: /* @__PURE__ */ jsx(Droplet, { className: "h-4 w-4" })
42
+ })]
43
+ }),
44
+ (showFormatSelect || showInput) && /* @__PURE__ */ jsxs("div", {
45
+ className: "flex items-center gap-2 w-full",
46
+ children: [showFormatSelect && /* @__PURE__ */ jsx(ColorPickerFormatSelect, {}), showInput && /* @__PURE__ */ jsx(ColorPickerInput$1, {})]
47
+ })
48
+ ]
49
+ });
47
50
  });
48
51
  ColorPickerCompact.displayName = "ColorPickerCompact";
49
52
 
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
2
2
  import { Card } from "@pixpilot/shadcn";
3
3
  import React, { ReactNode } from "react";
4
4
 
@@ -8,7 +8,7 @@ interface SectionCardProps extends React.ComponentProps<typeof Card> {
8
8
  children: ReactNode;
9
9
  marginBottom?: boolean;
10
10
  }
11
- declare function ContentCard(props: SectionCardProps): react_jsx_runtime2.JSX.Element;
11
+ declare function ContentCard(props: SectionCardProps): react_jsx_runtime3.JSX.Element;
12
12
  declare namespace ContentCard {
13
13
  var displayName: string;
14
14
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime3 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
2
2
  import { Calendar } from "@pixpilot/shadcn";
3
3
  import { ComponentProps } from "react";
4
4
 
@@ -8,7 +8,7 @@ type DatePickerProps = {
8
8
  onChange?: (date: Date | undefined) => void;
9
9
  placeholder?: string;
10
10
  } & Omit<ComponentProps<typeof Calendar>, 'selected' | 'onSelect' | 'mode'>;
11
- declare function DatePicker(props: DatePickerProps): react_jsx_runtime3.JSX.Element;
11
+ declare function DatePicker(props: DatePickerProps): react_jsx_runtime2.JSX.Element;
12
12
  declare namespace DatePicker {
13
13
  var displayName: string;
14
14
  }
@@ -1,7 +1,7 @@
1
1
  import { FileUploadProps } from "./types/index.cjs";
2
- import * as react_jsx_runtime7 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/file-upload/FileUpload.d.ts
5
- declare function FileUpload(props: FileUploadProps): react_jsx_runtime7.JSX.Element;
5
+ declare function FileUpload(props: FileUploadProps): react_jsx_runtime9.JSX.Element;
6
6
  //#endregion
7
7
  export { FileUpload };
@@ -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_runtime7 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_runtime7.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_runtime7 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_runtime7.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_runtime7 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime8 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_runtime7.JSX.Element;
8
+ declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime8.JSX.Element;
9
9
  //#endregion
10
10
  export { FileUploadInline };
@@ -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 { 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_runtime9.JSX.Element;
13
+ declare function Input(props: InputProps$1): react_jsx_runtime8.JSX.Element;
14
14
  //#endregion
15
15
  export { Input, InputProps$1 as InputProps };
@@ -1,6 +1,6 @@
1
1
  import { InputProps } from "@pixpilot/shadcn";
2
2
  import * as React$1 from "react";
3
- import * as react_jsx_runtime8 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/input/Input.d.ts
6
6
  type InputProps$1 = InputProps & {
@@ -10,6 +10,6 @@ type InputProps$1 = InputProps & {
10
10
  prefixClassName?: string;
11
11
  suffixClassName?: string;
12
12
  };
13
- declare function Input$1(props: InputProps$1): react_jsx_runtime8.JSX.Element;
13
+ declare function Input$1(props: InputProps$1): react_jsx_runtime9.JSX.Element;
14
14
  //#endregion
15
15
  export { Input$1 as Input, InputProps$1 as InputProps };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/shadcn-ui",
3
3
  "type": "module",
4
- "version": "0.24.0",
4
+ "version": "0.25.1",
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",
@@ -57,10 +57,10 @@
57
57
  "react-dom": "19.2.0",
58
58
  "tsdown": "^0.15.12",
59
59
  "typescript": "^5.9.3",
60
- "@internal/prettier-config": "0.0.1",
61
- "@internal/tsconfig": "0.1.0",
62
60
  "@internal/eslint-config": "0.3.0",
63
61
  "@internal/hooks": "0.0.0",
62
+ "@internal/prettier-config": "0.0.1",
63
+ "@internal/tsconfig": "0.1.0",
64
64
  "@internal/tsdown-config": "0.1.0",
65
65
  "@internal/vitest-config": "0.1.0"
66
66
  },