@pixpilot/shadcn-ui 1.1.0 → 1.1.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.
Files changed (49) hide show
  1. package/dist/ColorPickerBase/ColorPickerBase.cjs +2 -2
  2. package/dist/ColorPickerBase/ColorPickerBase.js +1 -1
  3. package/dist/ColorPickerBase/ColorPickerButton.cjs +5 -5
  4. package/dist/ColorPickerBase/ColorPickerButton.js +5 -5
  5. package/dist/ColorPickerBase/ColorPickerCompactControls.cjs +2 -6
  6. package/dist/ColorPickerBase/ColorPickerCompactControls.js +1 -5
  7. package/dist/ColorPickerBase/ColorPickerControls.d.ts +3 -3
  8. package/dist/ColorPickerBase/ColorPickerControls.js +3 -3
  9. package/dist/ColorPickerBase/ColorPickerFullControls.cjs +2 -8
  10. package/dist/ColorPickerBase/ColorPickerFullControls.js +2 -8
  11. package/dist/ColorPickerBase/ColorPickerInput.cjs +5 -5
  12. package/dist/ColorPickerBase/ColorPickerInput.js +5 -5
  13. package/dist/ColorPickerBase/ColorPickerRoot.cjs +2 -2
  14. package/dist/ColorPickerBase/ColorPickerRoot.js +2 -2
  15. package/dist/ColorPickerBase/color-palette/{ColorPickerColorPalette.cjs → ColorPalette.cjs} +19 -13
  16. package/dist/ColorPickerBase/color-palette/{ColorPickerColorPalette.d.cts → ColorPalette.d.cts} +2 -3
  17. package/dist/ColorPickerBase/color-palette/{ColorPickerColorPalette.d.ts → ColorPalette.d.ts} +2 -3
  18. package/dist/ColorPickerBase/color-palette/ColorPalette.js +101 -0
  19. package/dist/ColorPickerBase/color-palette/PaletteButton.cjs +22 -0
  20. package/dist/ColorPickerBase/color-palette/PaletteButton.d.cts +10 -0
  21. package/dist/ColorPickerBase/color-palette/PaletteButton.d.ts +10 -0
  22. package/dist/ColorPickerBase/color-palette/PaletteButton.js +17 -0
  23. package/dist/ColorPickerBase/color-palette/PaletteSwatch.cjs +5 -4
  24. package/dist/ColorPickerBase/color-palette/PaletteSwatch.d.cts +11 -0
  25. package/dist/ColorPickerBase/color-palette/PaletteSwatch.d.ts +11 -0
  26. package/dist/ColorPickerBase/color-palette/PaletteSwatch.js +5 -4
  27. package/dist/ColorPickerBase/color-palette/index.cjs +3 -1
  28. package/dist/ColorPickerBase/color-palette/index.d.cts +3 -1
  29. package/dist/ColorPickerBase/color-palette/index.d.ts +3 -1
  30. package/dist/ColorPickerBase/color-palette/index.js +3 -1
  31. package/dist/ColorPickerBase/color-picker-context.cjs +1 -0
  32. package/dist/ColorPickerBase/color-picker-context.d.cts +2 -2
  33. package/dist/ColorPickerBase/color-picker-context.d.ts +2 -2
  34. package/dist/ColorPickerBase/color-picker-context.js +1 -0
  35. package/dist/ColorPickerBase/index.cjs +4 -2
  36. package/dist/ColorPickerBase/index.d.cts +3 -1
  37. package/dist/ColorPickerBase/index.d.ts +3 -1
  38. package/dist/ColorPickerBase/index.js +4 -2
  39. package/dist/dialog/Dialog.d.ts +4 -4
  40. package/dist/file-upload-inline/FileUploadInline.d.ts +2 -2
  41. package/dist/file-upload-root/FileUploadRoot.d.ts +2 -2
  42. package/dist/index.cjs +8 -3
  43. package/dist/index.d.cts +4 -2
  44. package/dist/index.d.ts +4 -2
  45. package/dist/index.js +4 -2
  46. package/package.json +3 -3
  47. package/dist/ColorPickerBase/PaletteButton.cjs +0 -20
  48. package/dist/ColorPickerBase/PaletteButton.js +0 -16
  49. package/dist/ColorPickerBase/color-palette/ColorPickerColorPalette.js +0 -95
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
5
- const require_ColorPickerColorPalette = require('./color-palette/ColorPickerColorPalette.cjs');
5
+ const require_ColorPalette = require('./color-palette/ColorPalette.cjs');
6
6
  require('./color-palette/index.cjs');
7
7
  const require_constants = require('./constants.cjs');
8
8
  const require_ColorPickerCompactControls = require('./ColorPickerCompactControls.cjs');
@@ -33,7 +33,7 @@ const ColorPickerBase = (props) => {
33
33
  });
34
34
  const [open, setOpen] = (0, react.useState)(false);
35
35
  const resolvedSections = sections ?? require_constants.DEFAULT_SECTIONS;
36
- let colors = presetColors || require_ColorPickerColorPalette.COMMON_COLORS;
36
+ let colors = presetColors || require_ColorPalette.COMMON_COLORS;
37
37
  const handleOpen = (0, react.useCallback)((isOpen) => {
38
38
  setOpen(isOpen);
39
39
  }, []);
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
 
4
- import { COMMON_COLORS } from "./color-palette/ColorPickerColorPalette.js";
4
+ import { COMMON_COLORS } from "./color-palette/ColorPalette.js";
5
5
  import "./color-palette/index.js";
6
6
  import { DEFAULT_COLOR, DEFAULT_SECTIONS } from "./constants.js";
7
7
  import { ColorPickerCompactControls } from "./ColorPickerCompactControls.js";
@@ -13,15 +13,15 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
13
13
  //#region src/ColorPickerBase/ColorPickerButton.tsx
14
14
  const ColorPickerButton = (props) => {
15
15
  const { slots, formatDisplayValue, placeholder = "Pick a color",...rest } = props;
16
- const { isPickerOpen, color, onColorChange } = require_color_picker_context.useColorPickerContext();
16
+ const { isPickerOpen, value, onValueChange } = require_color_picker_context.useColorPickerContext();
17
17
  if (process.env.NODE_ENV !== "production") {
18
- if (onColorChange === void 0) throw new Error("ColorPickerButton must be used within a ColorPickerRoot component");
18
+ if (onValueChange === void 0) throw new Error("ColorPickerButton must be used within a ColorPickerRoot component");
19
19
  }
20
20
  const renderDisplayValue = () => {
21
- if (color == null || color === "") return placeholder;
22
- return formatDisplayValue != null ? formatDisplayValue(color) : color;
21
+ if (value == null || value === "") return placeholder;
22
+ return formatDisplayValue != null ? formatDisplayValue(value) : value;
23
23
  };
24
- const currentcolor = color != null && color !== "" ? color : void 0;
24
+ const currentcolor = value != null && value !== "" ? value : void 0;
25
25
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerTrigger, {
26
26
  asChild: true,
27
27
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.InputGroup, {
@@ -8,13 +8,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region src/ColorPickerBase/ColorPickerButton.tsx
9
9
  const ColorPickerButton = (props) => {
10
10
  const { slots, formatDisplayValue, placeholder = "Pick a color",...rest } = props;
11
- const { isPickerOpen, color, onColorChange } = useColorPickerContext();
12
- if (onColorChange === void 0) throw new Error("ColorPickerButton must be used within a ColorPickerRoot component");
11
+ const { isPickerOpen, value, onValueChange } = useColorPickerContext();
12
+ if (onValueChange === void 0) throw new Error("ColorPickerButton must be used within a ColorPickerRoot component");
13
13
  const renderDisplayValue = () => {
14
- if (color == null || color === "") return placeholder;
15
- return formatDisplayValue != null ? formatDisplayValue(color) : color;
14
+ if (value == null || value === "") return placeholder;
15
+ return formatDisplayValue != null ? formatDisplayValue(value) : value;
16
16
  };
17
- const currentcolor = color != null && color !== "" ? color : void 0;
17
+ const currentcolor = value != null && value !== "" ? value : void 0;
18
18
  return /* @__PURE__ */ jsx(ColorPickerTrigger, {
19
19
  asChild: true,
20
20
  children: /* @__PURE__ */ jsxs(InputGroup, {
@@ -1,7 +1,6 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_ColorPickerColorPalette = require('./color-palette/ColorPickerColorPalette.cjs');
2
+ const require_ColorPalette = require('./color-palette/ColorPalette.cjs');
3
3
  require('./color-palette/index.cjs');
4
- const require_color_picker_context = require('./color-picker-context.cjs');
5
4
  const require_ColorPickerContent = require('./ColorPickerContent.cjs');
6
5
  const require_ColorPickerControls = require('./ColorPickerControls.cjs');
7
6
  const require_ColorPickerFormatControls = require('./ColorPickerFormatControls.cjs');
@@ -14,7 +13,6 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
14
13
  //#region src/ColorPickerBase/ColorPickerCompactControls.tsx
15
14
  const ColorPickerCompactControls = react.default.memo((props) => {
16
15
  const { presetColors, sections = require_constants.DEFAULT_SECTIONS,...rest } = props;
17
- const { onColorChange, color: currentColor } = require_color_picker_context.useColorPickerContext();
18
16
  const enabledSections = new Set(sections);
19
17
  const showPicker = enabledSections.has("picker");
20
18
  const showSwatch = enabledSections.has("swatch");
@@ -29,10 +27,8 @@ const ColorPickerCompactControls = react.default.memo((props) => {
29
27
  shouldShowPickerUi && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerControls.ColorPickerControls, {}),
30
28
  showSwatch && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
31
29
  className: "gap-2 flex flex-wrap",
32
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerColorPalette.ColorPickerColorPalette, {
30
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPalette.ColorPickerColorPalette, {
33
31
  presetColors,
34
- onChange: onColorChange,
35
- selectedColor: currentColor,
36
32
  onMoreColor: canTogglePickerUi ? () => setShowFullPicker(!showFullPicker) : void 0
37
33
  })
38
34
  }),
@@ -1,6 +1,5 @@
1
- import { ColorPickerColorPalette } from "./color-palette/ColorPickerColorPalette.js";
1
+ import { ColorPickerColorPalette } from "./color-palette/ColorPalette.js";
2
2
  import "./color-palette/index.js";
3
- import { useColorPickerContext } from "./color-picker-context.js";
4
3
  import { ColorPickerContent } from "./ColorPickerContent.js";
5
4
  import { ColorPickerControls } from "./ColorPickerControls.js";
6
5
  import { ColorPickerFormatControls } from "./ColorPickerFormatControls.js";
@@ -11,7 +10,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
11
10
  //#region src/ColorPickerBase/ColorPickerCompactControls.tsx
12
11
  const ColorPickerCompactControls = React.memo((props) => {
13
12
  const { presetColors, sections = DEFAULT_SECTIONS,...rest } = props;
14
- const { onColorChange, color: currentColor } = useColorPickerContext();
15
13
  const enabledSections = new Set(sections);
16
14
  const showPicker = enabledSections.has("picker");
17
15
  const showSwatch = enabledSections.has("swatch");
@@ -28,8 +26,6 @@ const ColorPickerCompactControls = React.memo((props) => {
28
26
  className: "gap-2 flex flex-wrap",
29
27
  children: /* @__PURE__ */ jsx(ColorPickerColorPalette, {
30
28
  presetColors,
31
- onChange: onColorChange,
32
- selectedColor: currentColor,
33
29
  onMoreColor: canTogglePickerUi ? () => setShowFullPicker(!showFullPicker) : void 0
34
30
  })
35
31
  }),
@@ -1,15 +1,15 @@
1
- import { ColorPickerAlphaSlider, ColorPickerArea, ColorPickerEyeDropper, ColorPickerHueSlider } from "@pixpilot/shadcn";
1
+ import { ColorPickerAlphaSlider, ColorPickerArea, ColorPickerEyeDropper as ColorPickerEyeDropper$1, ColorPickerHueSlider } from "@pixpilot/shadcn";
2
2
  import React from "react";
3
3
 
4
4
  //#region src/ColorPickerBase/ColorPickerControls.d.ts
5
5
  interface ColorPickerControlsProps extends React.ComponentProps<'div'> {
6
6
  slots?: {
7
7
  area: React.ComponentProps<typeof ColorPickerArea>;
8
- eyeDropper: React.ComponentProps<typeof ColorPickerEyeDropper>;
8
+ eyeDropper: React.ComponentProps<typeof ColorPickerEyeDropper$1>;
9
9
  hueSlider: React.ComponentProps<typeof ColorPickerHueSlider>;
10
10
  alphaSlider: React.ComponentProps<typeof ColorPickerAlphaSlider>;
11
11
  };
12
12
  }
13
13
  declare const ColorPickerControls: React.FC<ColorPickerControlsProps>;
14
14
  //#endregion
15
- export { ColorPickerAlphaSlider, ColorPickerArea, ColorPickerControls, ColorPickerControlsProps, ColorPickerEyeDropper, ColorPickerHueSlider };
15
+ export { ColorPickerAlphaSlider, ColorPickerArea, ColorPickerControls, ColorPickerControlsProps, ColorPickerEyeDropper$1 as ColorPickerEyeDropper, ColorPickerHueSlider };
@@ -1,4 +1,4 @@
1
- import { ColorPickerAlphaSlider, ColorPickerArea, ColorPickerEyeDropper, ColorPickerHueSlider, cn } from "@pixpilot/shadcn";
1
+ import { ColorPickerAlphaSlider, ColorPickerArea, ColorPickerEyeDropper as ColorPickerEyeDropper$1, ColorPickerHueSlider, cn } from "@pixpilot/shadcn";
2
2
  import React from "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
 
@@ -12,7 +12,7 @@ const ColorPickerControls = (props) => {
12
12
  children: [/* @__PURE__ */ jsx(ColorPickerArea, { ...slots?.area }), /* @__PURE__ */ jsxs("div", {
13
13
  "data-slot": "color-picker-controls-row",
14
14
  className: "flex items-center gap-2",
15
- children: [/* @__PURE__ */ jsx(ColorPickerEyeDropper, {
15
+ children: [/* @__PURE__ */ jsx(ColorPickerEyeDropper$1, {
16
16
  ...slots?.eyeDropper,
17
17
  className: cn("hidden xs:flex ", slots?.eyeDropper.className)
18
18
  }), /* @__PURE__ */ jsxs("div", {
@@ -26,4 +26,4 @@ const ColorPickerControls = (props) => {
26
26
  ColorPickerControls.displayName = "ColorPickerControls";
27
27
 
28
28
  //#endregion
29
- export { ColorPickerAlphaSlider, ColorPickerArea, ColorPickerControls, ColorPickerEyeDropper, ColorPickerHueSlider };
29
+ export { ColorPickerAlphaSlider, ColorPickerArea, ColorPickerControls, ColorPickerEyeDropper$1 as ColorPickerEyeDropper, ColorPickerHueSlider };
@@ -1,7 +1,6 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_ColorPickerColorPalette = require('./color-palette/ColorPickerColorPalette.cjs');
2
+ const require_ColorPalette = require('./color-palette/ColorPalette.cjs');
3
3
  require('./color-palette/index.cjs');
4
- const require_color_picker_context = require('./color-picker-context.cjs');
5
4
  const require_ColorPickerContent = require('./ColorPickerContent.cjs');
6
5
  const require_ColorPickerControls = require('./ColorPickerControls.cjs');
7
6
  const require_ColorPickerFormatControls = require('./ColorPickerFormatControls.cjs');
@@ -13,7 +12,6 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
13
12
  //#region src/ColorPickerBase/ColorPickerFullControls.tsx
14
13
  const ColorPickerFullControls = react.default.memo((props) => {
15
14
  const { presetColors, sections,...rest } = props;
16
- const { onColorChange, color: currentColor } = require_color_picker_context.useColorPickerContext();
17
15
  const enabledSections = new Set(sections);
18
16
  const showPicker = enabledSections.has("picker");
19
17
  const showSwatch = enabledSections.has("swatch");
@@ -25,11 +23,7 @@ const ColorPickerFullControls = react.default.memo((props) => {
25
23
  showPicker && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerControls.ColorPickerControls, {}),
26
24
  showSwatch && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
27
25
  className: "gap-2 flex flex-wrap",
28
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerColorPalette.ColorPickerColorPalette, {
29
- presetColors,
30
- onChange: onColorChange,
31
- selectedColor: currentColor
32
- })
26
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPalette.ColorPickerColorPalette, { presetColors })
33
27
  }),
34
28
  (showFormatSelect || showInput) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerFormatControls.ColorPickerFormatControls, {
35
29
  showFormatSelect,
@@ -1,6 +1,5 @@
1
- import { ColorPickerColorPalette } from "./color-palette/ColorPickerColorPalette.js";
1
+ import { ColorPickerColorPalette } from "./color-palette/ColorPalette.js";
2
2
  import "./color-palette/index.js";
3
- import { useColorPickerContext } from "./color-picker-context.js";
4
3
  import { ColorPickerContent } from "./ColorPickerContent.js";
5
4
  import { ColorPickerControls } from "./ColorPickerControls.js";
6
5
  import { ColorPickerFormatControls } from "./ColorPickerFormatControls.js";
@@ -10,7 +9,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
10
9
  //#region src/ColorPickerBase/ColorPickerFullControls.tsx
11
10
  const ColorPickerFullControls = React.memo((props) => {
12
11
  const { presetColors, sections,...rest } = props;
13
- const { onColorChange, color: currentColor } = useColorPickerContext();
14
12
  const enabledSections = new Set(sections);
15
13
  const showPicker = enabledSections.has("picker");
16
14
  const showSwatch = enabledSections.has("swatch");
@@ -22,11 +20,7 @@ const ColorPickerFullControls = React.memo((props) => {
22
20
  showPicker && /* @__PURE__ */ jsx(ColorPickerControls, {}),
23
21
  showSwatch && /* @__PURE__ */ jsx("div", {
24
22
  className: "gap-2 flex flex-wrap",
25
- children: /* @__PURE__ */ jsx(ColorPickerColorPalette, {
26
- presetColors,
27
- onChange: onColorChange,
28
- selectedColor: currentColor
29
- })
23
+ children: /* @__PURE__ */ jsx(ColorPickerColorPalette, { presetColors })
30
24
  }),
31
25
  (showFormatSelect || showInput) && /* @__PURE__ */ jsx(ColorPickerFormatControls, {
32
26
  showFormatSelect,
@@ -11,9 +11,9 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
11
11
  //#region src/ColorPickerBase/ColorPickerInput.tsx
12
12
  const ColorPickerInput = (props) => {
13
13
  const { slots, onChange,...rest } = props;
14
- const { isPickerOpen, color, onColorChange } = require_color_picker_context.useColorPickerContext();
14
+ const { isPickerOpen, value, onValueChange } = require_color_picker_context.useColorPickerContext();
15
15
  if (process.env.NODE_ENV !== "production") {
16
- if (onColorChange === void 0) throw new Error("ColorPickerInput must be used within a ColorPickerRoot component");
16
+ if (onValueChange === void 0) throw new Error("ColorPickerInput must be used within a ColorPickerRoot component");
17
17
  }
18
18
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerTrigger, {
19
19
  asChild: true,
@@ -22,11 +22,11 @@ const ColorPickerInput = (props) => {
22
22
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.InputGroupAddon, {
23
23
  align: "inline-start",
24
24
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerSwatch.ColorPickerSwatch, {
25
- color: color != null && color !== "" ? color : void 0,
25
+ color: value != null && value !== "" ? value : void 0,
26
26
  ...slots?.swatch
27
27
  })
28
28
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.InputGroupInput, {
29
- value: color ?? "",
29
+ value: value ?? "",
30
30
  ...rest,
31
31
  onPointerDown: (e) => {
32
32
  rest.onPointerDown?.(e);
@@ -39,7 +39,7 @@ const ColorPickerInput = (props) => {
39
39
  e.stopPropagation();
40
40
  },
41
41
  onChange: (e) => {
42
- onColorChange(e.target.value);
42
+ onValueChange(e.target.value);
43
43
  onChange?.(e);
44
44
  }
45
45
  })]
@@ -7,8 +7,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/ColorPickerBase/ColorPickerInput.tsx
8
8
  const ColorPickerInput$1 = (props) => {
9
9
  const { slots, onChange,...rest } = props;
10
- const { isPickerOpen, color, onColorChange } = useColorPickerContext();
11
- if (onColorChange === void 0) throw new Error("ColorPickerInput must be used within a ColorPickerRoot component");
10
+ const { isPickerOpen, value, onValueChange } = useColorPickerContext();
11
+ if (onValueChange === void 0) throw new Error("ColorPickerInput must be used within a ColorPickerRoot component");
12
12
  return /* @__PURE__ */ jsx(ColorPickerTrigger, {
13
13
  asChild: true,
14
14
  children: /* @__PURE__ */ jsxs(InputGroup, {
@@ -16,11 +16,11 @@ const ColorPickerInput$1 = (props) => {
16
16
  children: [/* @__PURE__ */ jsx(InputGroupAddon, {
17
17
  align: "inline-start",
18
18
  children: /* @__PURE__ */ jsx(ColorPickerSwatch$1, {
19
- color: color != null && color !== "" ? color : void 0,
19
+ color: value != null && value !== "" ? value : void 0,
20
20
  ...slots?.swatch
21
21
  })
22
22
  }), /* @__PURE__ */ jsx(InputGroupInput, {
23
- value: color ?? "",
23
+ value: value ?? "",
24
24
  ...rest,
25
25
  onPointerDown: (e) => {
26
26
  rest.onPointerDown?.(e);
@@ -33,7 +33,7 @@ const ColorPickerInput$1 = (props) => {
33
33
  e.stopPropagation();
34
34
  },
35
35
  onChange: (e) => {
36
- onColorChange(e.target.value);
36
+ onValueChange(e.target.value);
37
37
  onChange?.(e);
38
38
  }
39
39
  })]
@@ -33,8 +33,8 @@ const ColorPickerRoot = (props) => {
33
33
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_color_picker_context.Provider, {
34
34
  value: {
35
35
  isPickerOpen: open,
36
- color: currentValue,
37
- onColorChange: handleValueChange,
36
+ value: currentValue,
37
+ onValueChange: handleValueChange,
38
38
  openPicker: setOpen
39
39
  },
40
40
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPicker, {
@@ -29,8 +29,8 @@ const ColorPickerRoot = (props) => {
29
29
  return /* @__PURE__ */ jsx(Provider, {
30
30
  value: {
31
31
  isPickerOpen: open,
32
- color: currentValue,
33
- onColorChange: handleValueChange,
32
+ value: currentValue,
33
+ onValueChange: handleValueChange,
34
34
  openPicker: setOpen
35
35
  },
36
36
  children: /* @__PURE__ */ jsx(ColorPicker, {
@@ -1,5 +1,6 @@
1
1
  const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_PaletteButton = require('../PaletteButton.cjs');
2
+ const require_color_picker_context = require('../color-picker-context.cjs');
3
+ const require_PaletteButton = require('./PaletteButton.cjs');
3
4
  const require_PaletteSwatch = require('./PaletteSwatch.cjs');
4
5
  let __pixpilot_shadcn = require("@pixpilot/shadcn");
5
6
  __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
@@ -10,7 +11,7 @@ react = require_rolldown_runtime.__toESM(react);
10
11
  let react_jsx_runtime = require("react/jsx-runtime");
11
12
  react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
12
13
 
13
- //#region src/ColorPickerBase/color-palette/ColorPickerColorPalette.tsx
14
+ //#region src/ColorPickerBase/color-palette/ColorPalette.tsx
14
15
  const COMMON_COLORS = [
15
16
  {
16
17
  label: "Transparent",
@@ -78,20 +79,25 @@ const COMMON_COLORS = [
78
79
  }
79
80
  ];
80
81
  const ColorPickerColorPalette = (props) => {
81
- const { presetColors = COMMON_COLORS, onChange, selectedColor, onMoreColor,...rest } = props;
82
+ const { presetColors = COMMON_COLORS, enableEyeDropper, onMoreColor,...rest } = props;
83
+ const { value: selectedColor, onValueChange } = require_color_picker_context.useColorPickerContext();
82
84
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
83
85
  ...rest,
84
86
  className: (0, __pixpilot_shadcn.cn)("gap-2 flex flex-wrap", rest.className),
85
- children: [presetColors.map((color) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteSwatch.PaletteSwatch, {
86
- color,
87
- onSelect: onChange,
88
- selectedValue: selectedColor
89
- }, color.value)), onMoreColor && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteButton.PaletteButton, {
90
- onClick: onMoreColor,
91
- "aria-label": "Toggle full color picker",
92
- className: "flex items-center justify-center border-input bg-input hover:bg-accent hover:text-accent-foreground",
93
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Droplet, { className: "h-4 w-4" })
94
- })]
87
+ children: [
88
+ enableEyeDropper && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerEyeDropper, { className: require_PaletteButton.COLOR_PICKER_PALETTE_BUTTON_CLASSES }),
89
+ presetColors.map((color) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteSwatch.ColorPickerPaletteSwatch, {
90
+ color,
91
+ onSelect: onValueChange,
92
+ selectedValue: selectedColor
93
+ }, color.value)),
94
+ onMoreColor && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteButton.ColorPickerPaletteButton, {
95
+ onClick: onMoreColor,
96
+ "aria-label": "Toggle full color picker",
97
+ className: "flex items-center justify-center border-input bg-input hover:bg-accent hover:text-accent-foreground",
98
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Droplet, { className: "h-4 w-4" })
99
+ })
100
+ ]
95
101
  });
96
102
  };
97
103
  ColorPickerColorPalette.displayName = "ColorPickerColorPalette";
@@ -1,13 +1,12 @@
1
1
  import { PresetColor } from "../types.cjs";
2
2
  import React from "react";
3
3
 
4
- //#region src/ColorPickerBase/color-palette/ColorPickerColorPalette.d.ts
4
+ //#region src/ColorPickerBase/color-palette/ColorPalette.d.ts
5
5
  declare const COMMON_COLORS: PresetColor[];
6
6
  interface ColorPickerColorPaletteProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
7
7
  presetColors?: PresetColor[];
8
- onChange?: (color: string) => void;
9
- selectedColor?: string;
10
8
  onMoreColor?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
9
+ enableEyeDropper?: boolean;
11
10
  }
12
11
  declare const ColorPickerColorPalette: React.FC<ColorPickerColorPaletteProps>;
13
12
  //#endregion
@@ -1,13 +1,12 @@
1
1
  import { PresetColor } from "../types.js";
2
2
  import React from "react";
3
3
 
4
- //#region src/ColorPickerBase/color-palette/ColorPickerColorPalette.d.ts
4
+ //#region src/ColorPickerBase/color-palette/ColorPalette.d.ts
5
5
  declare const COMMON_COLORS: PresetColor[];
6
6
  interface ColorPickerColorPaletteProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
7
7
  presetColors?: PresetColor[];
8
- onChange?: (color: string) => void;
9
- selectedColor?: string;
10
8
  onMoreColor?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
9
+ enableEyeDropper?: boolean;
11
10
  }
12
11
  declare const ColorPickerColorPalette: React.FC<ColorPickerColorPaletteProps>;
13
12
  //#endregion
@@ -0,0 +1,101 @@
1
+ import { useColorPickerContext } from "../color-picker-context.js";
2
+ import { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton } from "./PaletteButton.js";
3
+ import { ColorPickerPaletteSwatch } from "./PaletteSwatch.js";
4
+ import { ColorPickerEyeDropper, cn } from "@pixpilot/shadcn";
5
+ import { Droplet } from "lucide-react";
6
+ import React from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+
9
+ //#region src/ColorPickerBase/color-palette/ColorPalette.tsx
10
+ const COMMON_COLORS = [
11
+ {
12
+ label: "Transparent",
13
+ value: "#00000000"
14
+ },
15
+ {
16
+ label: "Black",
17
+ value: "#000000"
18
+ },
19
+ {
20
+ label: "White",
21
+ value: "#FFFFFF"
22
+ },
23
+ {
24
+ label: "Gray",
25
+ value: "#808080"
26
+ },
27
+ {
28
+ label: "Red",
29
+ value: "#FF0000"
30
+ },
31
+ {
32
+ label: "Orange",
33
+ value: "#FFA500"
34
+ },
35
+ {
36
+ label: "Yellow",
37
+ value: "#FFFF00"
38
+ },
39
+ {
40
+ label: "Lime",
41
+ value: "#84CC16"
42
+ },
43
+ {
44
+ label: "Green",
45
+ value: "#22C55E"
46
+ },
47
+ {
48
+ label: "Teal",
49
+ value: "#14B8A6"
50
+ },
51
+ {
52
+ label: "Cyan",
53
+ value: "#00FFFF"
54
+ },
55
+ {
56
+ label: "Blue",
57
+ value: "#3B82F6"
58
+ },
59
+ {
60
+ label: "Indigo",
61
+ value: "#6366F1"
62
+ },
63
+ {
64
+ label: "Purple",
65
+ value: "#A855F7"
66
+ },
67
+ {
68
+ label: "Pink",
69
+ value: "#EC4899"
70
+ },
71
+ {
72
+ label: "Brown",
73
+ value: "#A52A2A"
74
+ }
75
+ ];
76
+ const ColorPickerColorPalette = (props) => {
77
+ const { presetColors = COMMON_COLORS, enableEyeDropper, onMoreColor,...rest } = props;
78
+ const { value: selectedColor, onValueChange } = useColorPickerContext();
79
+ return /* @__PURE__ */ jsxs("div", {
80
+ ...rest,
81
+ className: cn("gap-2 flex flex-wrap", rest.className),
82
+ children: [
83
+ enableEyeDropper && /* @__PURE__ */ jsx(ColorPickerEyeDropper, { className: COLOR_PICKER_PALETTE_BUTTON_CLASSES }),
84
+ presetColors.map((color) => /* @__PURE__ */ jsx(ColorPickerPaletteSwatch, {
85
+ color,
86
+ onSelect: onValueChange,
87
+ selectedValue: selectedColor
88
+ }, color.value)),
89
+ onMoreColor && /* @__PURE__ */ jsx(ColorPickerPaletteButton, {
90
+ onClick: onMoreColor,
91
+ "aria-label": "Toggle full color picker",
92
+ className: "flex items-center justify-center border-input bg-input hover:bg-accent hover:text-accent-foreground",
93
+ children: /* @__PURE__ */ jsx(Droplet, { className: "h-4 w-4" })
94
+ })
95
+ ]
96
+ });
97
+ };
98
+ ColorPickerColorPalette.displayName = "ColorPickerColorPalette";
99
+
100
+ //#endregion
101
+ export { COMMON_COLORS, ColorPickerColorPalette };
@@ -0,0 +1,22 @@
1
+ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
+ let __pixpilot_shadcn = require("@pixpilot/shadcn");
3
+ __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
4
+ let react = require("react");
5
+ react = require_rolldown_runtime.__toESM(react);
6
+ let react_jsx_runtime = require("react/jsx-runtime");
7
+ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
8
+
9
+ //#region src/ColorPickerBase/color-palette/PaletteButton.tsx
10
+ const COLOR_PICKER_PALETTE_BUTTON_CLASSES = "w-6.5 h-6.5 rounded border border-input focus:outline-none focus:ring-2 focus:ring-ring";
11
+ const ColorPickerPaletteButton = (props) => {
12
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
13
+ type: "button",
14
+ ...props,
15
+ className: (0, __pixpilot_shadcn.cn)(COLOR_PICKER_PALETTE_BUTTON_CLASSES, props.className)
16
+ });
17
+ };
18
+ ColorPickerPaletteButton.displayName = "PaletteButton";
19
+
20
+ //#endregion
21
+ exports.COLOR_PICKER_PALETTE_BUTTON_CLASSES = COLOR_PICKER_PALETTE_BUTTON_CLASSES;
22
+ exports.ColorPickerPaletteButton = ColorPickerPaletteButton;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+
3
+ //#region src/ColorPickerBase/color-palette/PaletteButton.d.ts
4
+ interface ColorPickerPaletteButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
+ style?: React.CSSProperties;
6
+ }
7
+ declare const COLOR_PICKER_PALETTE_BUTTON_CLASSES = "w-6.5 h-6.5 rounded border border-input focus:outline-none focus:ring-2 focus:ring-ring";
8
+ declare const ColorPickerPaletteButton: React.FC<ColorPickerPaletteButtonProps>;
9
+ //#endregion
10
+ export { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton, ColorPickerPaletteButtonProps };
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+
3
+ //#region src/ColorPickerBase/color-palette/PaletteButton.d.ts
4
+ interface ColorPickerPaletteButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
+ style?: React.CSSProperties;
6
+ }
7
+ declare const COLOR_PICKER_PALETTE_BUTTON_CLASSES = "w-6.5 h-6.5 rounded border border-input focus:outline-none focus:ring-2 focus:ring-ring";
8
+ declare const ColorPickerPaletteButton: React.FC<ColorPickerPaletteButtonProps>;
9
+ //#endregion
10
+ export { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton, ColorPickerPaletteButtonProps };
@@ -0,0 +1,17 @@
1
+ import { cn } from "@pixpilot/shadcn";
2
+ import React from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+
5
+ //#region src/ColorPickerBase/color-palette/PaletteButton.tsx
6
+ const COLOR_PICKER_PALETTE_BUTTON_CLASSES = "w-6.5 h-6.5 rounded border border-input focus:outline-none focus:ring-2 focus:ring-ring";
7
+ const ColorPickerPaletteButton = (props) => {
8
+ return /* @__PURE__ */ jsx("button", {
9
+ type: "button",
10
+ ...props,
11
+ className: cn(COLOR_PICKER_PALETTE_BUTTON_CLASSES, props.className)
12
+ });
13
+ };
14
+ ColorPickerPaletteButton.displayName = "PaletteButton";
15
+
16
+ //#endregion
17
+ export { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton };
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_PaletteButton = require('../PaletteButton.cjs');
2
+ const require_PaletteButton = require('./PaletteButton.cjs');
3
3
  let __pixpilot_shadcn = require("@pixpilot/shadcn");
4
4
  __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
5
5
  let react = require("react");
@@ -8,7 +8,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
8
8
  react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
9
9
 
10
10
  //#region src/ColorPickerBase/color-palette/PaletteSwatch.tsx
11
- const PaletteSwatch = ({ color, onSelect, className, selectedValue }) => {
11
+ const ColorPickerPaletteSwatch = ({ color, onSelect, className, selectedValue }) => {
12
12
  const colorValue = color?.value ?? "rgb(0,0,0,0)";
13
13
  const colorLabel = color?.label;
14
14
  const normalizeColor = (0, react.useCallback)((value) => {
@@ -26,7 +26,7 @@ const PaletteSwatch = ({ color, onSelect, className, selectedValue }) => {
26
26
  const handleClick = (0, react.useCallback)(() => {
27
27
  if (onSelect) onSelect(colorValue);
28
28
  }, [colorValue, onSelect]);
29
- const button = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteButton.PaletteButton, {
29
+ const button = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteButton.ColorPickerPaletteButton, {
30
30
  style: {
31
31
  backgroundImage: `linear-gradient(${colorValue}, ${colorValue}), repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%)`,
32
32
  backgroundSize: "auto, 8px 8px"
@@ -44,6 +44,7 @@ const PaletteSwatch = ({ color, onSelect, className, selectedValue }) => {
44
44
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: colorLabel })
45
45
  })] });
46
46
  };
47
+ ColorPickerPaletteSwatch.displayName = "ColorPickerPaletteSwatch";
47
48
 
48
49
  //#endregion
49
- exports.PaletteSwatch = PaletteSwatch;
50
+ exports.ColorPickerPaletteSwatch = ColorPickerPaletteSwatch;
@@ -0,0 +1,11 @@
1
+ import { PresetColor } from "../types.cjs";
2
+
3
+ //#region src/ColorPickerBase/color-palette/PaletteSwatch.d.ts
4
+ declare const ColorPickerPaletteSwatch: React.FC<{
5
+ color?: PresetColor;
6
+ onSelect?: (color: string) => void;
7
+ className?: string;
8
+ selectedValue?: string;
9
+ }>;
10
+ //#endregion
11
+ export { ColorPickerPaletteSwatch };
@@ -0,0 +1,11 @@
1
+ import { PresetColor } from "../types.js";
2
+
3
+ //#region src/ColorPickerBase/color-palette/PaletteSwatch.d.ts
4
+ declare const ColorPickerPaletteSwatch: React.FC<{
5
+ color?: PresetColor;
6
+ onSelect?: (color: string) => void;
7
+ className?: string;
8
+ selectedValue?: string;
9
+ }>;
10
+ //#endregion
11
+ export { ColorPickerPaletteSwatch };
@@ -1,10 +1,10 @@
1
- import { PaletteButton } from "../PaletteButton.js";
1
+ import { ColorPickerPaletteButton } from "./PaletteButton.js";
2
2
  import { Tooltip, TooltipContent, TooltipTrigger, cn, colorUtils } from "@pixpilot/shadcn";
3
3
  import { useCallback } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
 
6
6
  //#region src/ColorPickerBase/color-palette/PaletteSwatch.tsx
7
- const PaletteSwatch = ({ color, onSelect, className, selectedValue }) => {
7
+ const ColorPickerPaletteSwatch = ({ color, onSelect, className, selectedValue }) => {
8
8
  const colorValue = color?.value ?? "rgb(0,0,0,0)";
9
9
  const colorLabel = color?.label;
10
10
  const normalizeColor = useCallback((value) => {
@@ -22,7 +22,7 @@ const PaletteSwatch = ({ color, onSelect, className, selectedValue }) => {
22
22
  const handleClick = useCallback(() => {
23
23
  if (onSelect) onSelect(colorValue);
24
24
  }, [colorValue, onSelect]);
25
- const button = /* @__PURE__ */ jsx(PaletteButton, {
25
+ const button = /* @__PURE__ */ jsx(ColorPickerPaletteButton, {
26
26
  style: {
27
27
  backgroundImage: `linear-gradient(${colorValue}, ${colorValue}), repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%)`,
28
28
  backgroundSize: "auto, 8px 8px"
@@ -40,6 +40,7 @@ const PaletteSwatch = ({ color, onSelect, className, selectedValue }) => {
40
40
  children: /* @__PURE__ */ jsx("p", { children: colorLabel })
41
41
  })] });
42
42
  };
43
+ ColorPickerPaletteSwatch.displayName = "ColorPickerPaletteSwatch";
43
44
 
44
45
  //#endregion
45
- export { PaletteSwatch };
46
+ export { ColorPickerPaletteSwatch };
@@ -1 +1,3 @@
1
- const require_ColorPickerColorPalette = require('./ColorPickerColorPalette.cjs');
1
+ const require_PaletteButton = require('./PaletteButton.cjs');
2
+ const require_PaletteSwatch = require('./PaletteSwatch.cjs');
3
+ const require_ColorPalette = require('./ColorPalette.cjs');
@@ -1 +1,3 @@
1
- import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./ColorPickerColorPalette.cjs";
1
+ import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./ColorPalette.cjs";
2
+ import { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton, ColorPickerPaletteButtonProps } from "./PaletteButton.cjs";
3
+ import { ColorPickerPaletteSwatch } from "./PaletteSwatch.cjs";
@@ -1 +1,3 @@
1
- import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./ColorPickerColorPalette.js";
1
+ import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./ColorPalette.js";
2
+ import { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton, ColorPickerPaletteButtonProps } from "./PaletteButton.js";
3
+ import { ColorPickerPaletteSwatch } from "./PaletteSwatch.js";
@@ -1 +1,3 @@
1
- import { COMMON_COLORS, ColorPickerColorPalette } from "./ColorPickerColorPalette.js";
1
+ import { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton } from "./PaletteButton.js";
2
+ import { ColorPickerPaletteSwatch } from "./PaletteSwatch.js";
3
+ import { COMMON_COLORS, ColorPickerColorPalette } from "./ColorPalette.js";
@@ -8,6 +8,7 @@ const { Provider, Consumer } = ColorPickerContext;
8
8
  function useColorPickerContext() {
9
9
  return react.default.use(ColorPickerContext);
10
10
  }
11
+ ColorPickerContext.displayName = "ColorPickerContext";
11
12
 
12
13
  //#endregion
13
14
  exports.ColorPickerContext = ColorPickerContext;
@@ -3,8 +3,8 @@ import React from "react";
3
3
  //#region src/ColorPickerBase/color-picker-context.d.ts
4
4
  interface ColorPickerContextStates {
5
5
  isPickerOpen: boolean;
6
- color: string;
7
- onColorChange: (value: string) => void;
6
+ value: string;
7
+ onValueChange: (value: string) => void;
8
8
  openPicker: (open: boolean) => void;
9
9
  }
10
10
  declare const ColorPickerContext: React.Context<ColorPickerContextStates>;
@@ -3,8 +3,8 @@ import React from "react";
3
3
  //#region src/ColorPickerBase/color-picker-context.d.ts
4
4
  interface ColorPickerContextStates {
5
5
  isPickerOpen: boolean;
6
- color: string;
7
- onColorChange: (value: string) => void;
6
+ value: string;
7
+ onValueChange: (value: string) => void;
8
8
  openPicker: (open: boolean) => void;
9
9
  }
10
10
  declare const ColorPickerContext: React.Context<ColorPickerContextStates>;
@@ -6,6 +6,7 @@ const { Provider, Consumer } = ColorPickerContext;
6
6
  function useColorPickerContext() {
7
7
  return React.use(ColorPickerContext);
8
8
  }
9
+ ColorPickerContext.displayName = "ColorPickerContext";
9
10
 
10
11
  //#endregion
11
12
  export { ColorPickerContext, Consumer, Provider, useColorPickerContext };
@@ -1,7 +1,9 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_ColorPickerColorPalette = require('./color-palette/ColorPickerColorPalette.cjs');
3
- require('./color-palette/index.cjs');
4
2
  const require_color_picker_context = require('./color-picker-context.cjs');
3
+ const require_PaletteButton = require('./color-palette/PaletteButton.cjs');
4
+ const require_PaletteSwatch = require('./color-palette/PaletteSwatch.cjs');
5
+ const require_ColorPalette = require('./color-palette/ColorPalette.cjs');
6
+ require('./color-palette/index.cjs');
5
7
  const require_ColorPickerContent = require('./ColorPickerContent.cjs');
6
8
  const require_ColorPickerControls = require('./ColorPickerControls.cjs');
7
9
  const require_ColorPickerFormatInput = require('./ColorPickerFormatInput.cjs');
@@ -1,5 +1,7 @@
1
1
  import { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerRootProps, PresetColor } from "./types.cjs";
2
- import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./color-palette/ColorPickerColorPalette.cjs";
2
+ import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./color-palette/ColorPalette.cjs";
3
+ import { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton, ColorPickerPaletteButtonProps } from "./color-palette/PaletteButton.cjs";
4
+ import { ColorPickerPaletteSwatch } from "./color-palette/PaletteSwatch.cjs";
3
5
  import "./color-palette/index.cjs";
4
6
  import { ColorPickerContext, ColorPickerContextStates, Consumer, Provider, useColorPickerContext } from "./color-picker-context.cjs";
5
7
  import { ColorPickerBase } from "./ColorPickerBase.cjs";
@@ -1,5 +1,7 @@
1
1
  import { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerRootProps, PresetColor } from "./types.js";
2
- import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./color-palette/ColorPickerColorPalette.js";
2
+ import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./color-palette/ColorPalette.js";
3
+ import { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton, ColorPickerPaletteButtonProps } from "./color-palette/PaletteButton.js";
4
+ import { ColorPickerPaletteSwatch } from "./color-palette/PaletteSwatch.js";
3
5
  import "./color-palette/index.js";
4
6
  import { ColorPickerContext, ColorPickerContextStates, Consumer, Provider, useColorPickerContext } from "./color-picker-context.js";
5
7
  import { ColorPickerBase } from "./ColorPickerBase.js";
@@ -1,6 +1,8 @@
1
- import { COMMON_COLORS, ColorPickerColorPalette } from "./color-palette/ColorPickerColorPalette.js";
2
- import "./color-palette/index.js";
3
1
  import { ColorPickerContext, Consumer, Provider, useColorPickerContext } from "./color-picker-context.js";
2
+ import { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton } from "./color-palette/PaletteButton.js";
3
+ import { ColorPickerPaletteSwatch } from "./color-palette/PaletteSwatch.js";
4
+ import { COMMON_COLORS, ColorPickerColorPalette } from "./color-palette/ColorPalette.js";
5
+ import "./color-palette/index.js";
4
6
  import { ColorPickerContent } from "./ColorPickerContent.js";
5
7
  import { ColorPickerAlphaSlider, ColorPickerArea, ColorPickerControls, ColorPickerEyeDropper, ColorPickerHueSlider } from "./ColorPickerControls.js";
6
8
  import { ColorPickerFormatInput } from "./ColorPickerFormatInput.js";
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from "react";
2
- import * as react_jsx_runtime9 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime10 from "react/jsx-runtime";
3
3
  import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
4
4
 
5
5
  //#region src/dialog/Dialog.d.ts
@@ -9,14 +9,14 @@ declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<_radix_ui_re
9
9
  declare function DialogHeader({
10
10
  className,
11
11
  ...props
12
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
12
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime10.JSX.Element;
13
13
  declare function DialogBody({
14
14
  className,
15
15
  ...props
16
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
16
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime10.JSX.Element;
17
17
  declare function DialogFooter({
18
18
  className,
19
19
  ...props
20
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
20
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime10.JSX.Element;
21
21
  //#endregion
22
22
  export { DialogBody, DialogContent, DialogFooter, DialogHeader };
@@ -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_runtime9 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_runtime9.JSX.Element;
9
9
  //#endregion
10
10
  export { FileUploadInline };
@@ -1,11 +1,11 @@
1
1
  import { FileUploadRootProps } from "./types.js";
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
  }
package/dist/index.cjs CHANGED
@@ -12,8 +12,10 @@ const require_circle_loader = require('./circle-loader/circle-loader.cjs');
12
12
  require('./circle-loader/index.cjs');
13
13
  const require_CloseButtonRounded = require('./CloseButtonRounded.cjs');
14
14
  const require_CloseButtonAbsolute = require('./CloseButtonAbsolute.cjs');
15
- const require_ColorPickerColorPalette = require('./ColorPickerBase/color-palette/ColorPickerColorPalette.cjs');
16
15
  const require_color_picker_context = require('./ColorPickerBase/color-picker-context.cjs');
16
+ const require_PaletteButton = require('./ColorPickerBase/color-palette/PaletteButton.cjs');
17
+ const require_PaletteSwatch = require('./ColorPickerBase/color-palette/PaletteSwatch.cjs');
18
+ const require_ColorPalette = require('./ColorPickerBase/color-palette/ColorPalette.cjs');
17
19
  const require_ColorPickerContent = require('./ColorPickerBase/ColorPickerContent.cjs');
18
20
  const require_ColorPickerControls = require('./ColorPickerBase/ColorPickerControls.cjs');
19
21
  const require_ColorPickerFormatInput = require('./ColorPickerBase/ColorPickerFormatInput.cjs');
@@ -101,7 +103,8 @@ exports.ButtonExtended = require_ButtonExtended.ButtonExtended;
101
103
  exports.ButtonGroup = require_ButtonGroup.ButtonGroup;
102
104
  exports.ButtonGroupSeparator = require_ButtonGroup.ButtonGroupSeparator;
103
105
  exports.ButtonGroupText = require_ButtonGroup.ButtonGroupText;
104
- exports.COMMON_COLORS = require_ColorPickerColorPalette.COMMON_COLORS;
106
+ exports.COLOR_PICKER_PALETTE_BUTTON_CLASSES = require_PaletteButton.COLOR_PICKER_PALETTE_BUTTON_CLASSES;
107
+ exports.COMMON_COLORS = require_ColorPalette.COMMON_COLORS;
105
108
  exports.CircleLoader = require_circle_loader.CircleLoader;
106
109
  exports.CloseButtonAbsolute = require_CloseButtonAbsolute.CloseButtonAbsolute;
107
110
  exports.CloseButtonRounded = require_CloseButtonRounded.CloseButtonRounded;
@@ -110,7 +113,7 @@ exports.ColorPickerAlphaSlider = __pixpilot_shadcn.ColorPickerAlphaSlider;
110
113
  exports.ColorPickerArea = __pixpilot_shadcn.ColorPickerArea;
111
114
  exports.ColorPickerBase = require_ColorPickerBase.ColorPickerBase;
112
115
  exports.ColorPickerButton = require_ColorPickerButton.ColorPickerButton;
113
- exports.ColorPickerColorPalette = require_ColorPickerColorPalette.ColorPickerColorPalette;
116
+ exports.ColorPickerColorPalette = require_ColorPalette.ColorPickerColorPalette;
114
117
  exports.ColorPickerCompactControls = require_ColorPickerCompactControls.ColorPickerCompactControls;
115
118
  exports.ColorPickerContent = require_ColorPickerContent.ColorPickerContent;
116
119
  exports.ColorPickerContext = require_color_picker_context.ColorPickerContext;
@@ -124,6 +127,8 @@ exports.ColorPickerFormatSelect = __pixpilot_shadcn.ColorPickerFormatSelect;
124
127
  exports.ColorPickerFullControls = require_ColorPickerFullControls.ColorPickerFullControls;
125
128
  exports.ColorPickerHueSlider = __pixpilot_shadcn.ColorPickerHueSlider;
126
129
  exports.ColorPickerInput = require_ColorPickerInput.ColorPickerInput;
130
+ exports.ColorPickerPaletteButton = require_PaletteButton.ColorPickerPaletteButton;
131
+ exports.ColorPickerPaletteSwatch = require_PaletteSwatch.ColorPickerPaletteSwatch;
127
132
  exports.ColorPickerRoot = require_ColorPickerRoot.ColorPickerRoot;
128
133
  exports.ColorSelect = require_ColorSelect.ColorSelect;
129
134
  exports.Combobox = require_Combobox.Combobox;
package/dist/index.d.cts CHANGED
@@ -13,7 +13,9 @@ import "./circle-loader/index.cjs";
13
13
  import { CloseButtonRounded, CloseButtonRoundedProps } from "./CloseButtonRounded.cjs";
14
14
  import { CloseButtonAbsolute, PopoverCloseButtonProps } from "./CloseButtonAbsolute.cjs";
15
15
  import { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerRootProps, PresetColor } from "./ColorPickerBase/types.cjs";
16
- import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./ColorPickerBase/color-palette/ColorPickerColorPalette.cjs";
16
+ import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./ColorPickerBase/color-palette/ColorPalette.cjs";
17
+ import { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton, ColorPickerPaletteButtonProps } from "./ColorPickerBase/color-palette/PaletteButton.cjs";
18
+ import { ColorPickerPaletteSwatch } from "./ColorPickerBase/color-palette/PaletteSwatch.cjs";
17
19
  import { ColorPickerContext, ColorPickerContextStates, Consumer, Provider, useColorPickerContext } from "./ColorPickerBase/color-picker-context.cjs";
18
20
  import { ColorPickerBase } from "./ColorPickerBase/ColorPickerBase.cjs";
19
21
  import { ColorPickerButton, ColorPickerButtonProps } from "./ColorPickerBase/ColorPickerButton.cjs";
@@ -98,4 +100,4 @@ import "./toast/index.cjs";
98
100
  import { ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue } from "./ToggleGroup.cjs";
99
101
  import { isSvgMarkupString, svgMarkupToMaskUrl } from "./utils/svg.cjs";
100
102
  import { cn } from "@pixpilot/shadcn";
101
- export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertToastProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonExtended, ButtonExtendedLoaderProps, ButtonExtendedProps, ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, ButtonProps, COMMON_COLORS, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerButton, ColorPickerButtonProps, ColorPickerColorPalette, ColorPickerColorPaletteProps, ColorPickerCompactControls, ColorPickerCompactControlsProps, ColorPickerContent, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerContextStates, ColorPickerControls, ColorPickerControlsProps, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatControlsProps, ColorPickerFormatInput, ColorPickerFormatInputProps, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerFullControlsProps, ColorPickerHueSlider, ColorPickerInput, ColorPickerInputProps, ColorPickerProps, ColorPickerRoot, ColorPickerRootProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, FileUploadRoot, FileUploadRootItem, FileUploadRootItemProps, FileUploadRootProps, FileUploadRootPropsBaseProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoadingOverlay, LoadingOverlayProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverTrigger, PresetColor, Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectContentProps, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputInline, TagsInputInlineItem, TagsInputInlineProps, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastFunction, ToastMessage, Toaster, ToggleButton, ToggleButtonProps, ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue, ToolbarItems, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, useColorPickerContext, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
103
+ export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertToastProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonExtended, ButtonExtendedLoaderProps, ButtonExtendedProps, ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, ButtonProps, COLOR_PICKER_PALETTE_BUTTON_CLASSES, COMMON_COLORS, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerButton, ColorPickerButtonProps, ColorPickerColorPalette, ColorPickerColorPaletteProps, ColorPickerCompactControls, ColorPickerCompactControlsProps, ColorPickerContent, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerContextStates, ColorPickerControls, ColorPickerControlsProps, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatControlsProps, ColorPickerFormatInput, ColorPickerFormatInputProps, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerFullControlsProps, ColorPickerHueSlider, ColorPickerInput, ColorPickerInputProps, ColorPickerPaletteButton, ColorPickerPaletteButtonProps, ColorPickerPaletteSwatch, ColorPickerProps, ColorPickerRoot, ColorPickerRootProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, FileUploadRoot, FileUploadRootItem, FileUploadRootItemProps, FileUploadRootProps, FileUploadRootPropsBaseProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoadingOverlay, LoadingOverlayProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverTrigger, PresetColor, Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectContentProps, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputInline, TagsInputInlineItem, TagsInputInlineProps, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastFunction, ToastMessage, Toaster, ToggleButton, ToggleButtonProps, ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue, ToolbarItems, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, useColorPickerContext, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
package/dist/index.d.ts CHANGED
@@ -13,7 +13,9 @@ import "./circle-loader/index.js";
13
13
  import { CloseButtonRounded, CloseButtonRoundedProps } from "./CloseButtonRounded.js";
14
14
  import { CloseButtonAbsolute, PopoverCloseButtonProps } from "./CloseButtonAbsolute.js";
15
15
  import { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerRootProps, PresetColor } from "./ColorPickerBase/types.js";
16
- import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./ColorPickerBase/color-palette/ColorPickerColorPalette.js";
16
+ import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./ColorPickerBase/color-palette/ColorPalette.js";
17
+ import { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton, ColorPickerPaletteButtonProps } from "./ColorPickerBase/color-palette/PaletteButton.js";
18
+ import { ColorPickerPaletteSwatch } from "./ColorPickerBase/color-palette/PaletteSwatch.js";
17
19
  import { ColorPickerContext, ColorPickerContextStates, Consumer, Provider, useColorPickerContext } from "./ColorPickerBase/color-picker-context.js";
18
20
  import { ColorPickerBase } from "./ColorPickerBase/ColorPickerBase.js";
19
21
  import { ColorPickerButton, ColorPickerButtonProps } from "./ColorPickerBase/ColorPickerButton.js";
@@ -98,4 +100,4 @@ import "./toast/index.js";
98
100
  import { ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue } from "./ToggleGroup.js";
99
101
  import { isSvgMarkupString, svgMarkupToMaskUrl } from "./utils/svg.js";
100
102
  import { cn } from "@pixpilot/shadcn";
101
- export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertToastProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonExtended, ButtonExtendedLoaderProps, ButtonExtendedProps, ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, ButtonProps, COMMON_COLORS, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerButton, ColorPickerButtonProps, ColorPickerColorPalette, ColorPickerColorPaletteProps, ColorPickerCompactControls, ColorPickerCompactControlsProps, ColorPickerContent, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerContextStates, ColorPickerControls, ColorPickerControlsProps, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatControlsProps, ColorPickerFormatInput, ColorPickerFormatInputProps, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerFullControlsProps, ColorPickerHueSlider, ColorPickerInput, ColorPickerInputProps, ColorPickerProps, ColorPickerRoot, ColorPickerRootProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, FileUploadRoot, FileUploadRootItem, FileUploadRootItemProps, FileUploadRootProps, FileUploadRootPropsBaseProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoadingOverlay, LoadingOverlayProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverTrigger, PresetColor, Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectContentProps, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputInline, TagsInputInlineItem, TagsInputInlineProps, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastFunction, ToastMessage, Toaster, ToggleButton, ToggleButtonProps, ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue, ToolbarItems, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, useColorPickerContext, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
103
+ export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertToastProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonExtended, ButtonExtendedLoaderProps, ButtonExtendedProps, ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, ButtonProps, COLOR_PICKER_PALETTE_BUTTON_CLASSES, COMMON_COLORS, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerButton, ColorPickerButtonProps, ColorPickerColorPalette, ColorPickerColorPaletteProps, ColorPickerCompactControls, ColorPickerCompactControlsProps, ColorPickerContent, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerContextStates, ColorPickerControls, ColorPickerControlsProps, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatControlsProps, ColorPickerFormatInput, ColorPickerFormatInputProps, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerFullControlsProps, ColorPickerHueSlider, ColorPickerInput, ColorPickerInputProps, ColorPickerPaletteButton, ColorPickerPaletteButtonProps, ColorPickerPaletteSwatch, ColorPickerProps, ColorPickerRoot, ColorPickerRootProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, FileUploadRoot, FileUploadRootItem, FileUploadRootItemProps, FileUploadRootProps, FileUploadRootPropsBaseProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoadingOverlay, LoadingOverlayProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverTrigger, PresetColor, Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectContentProps, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputInline, TagsInputInlineItem, TagsInputInlineProps, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastFunction, ToastMessage, Toaster, ToggleButton, ToggleButtonProps, ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue, ToolbarItems, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, useColorPickerContext, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
package/dist/index.js CHANGED
@@ -11,8 +11,10 @@ import { CircleLoader } from "./circle-loader/circle-loader.js";
11
11
  import "./circle-loader/index.js";
12
12
  import { CloseButtonRounded } from "./CloseButtonRounded.js";
13
13
  import { CloseButtonAbsolute } from "./CloseButtonAbsolute.js";
14
- import { COMMON_COLORS, ColorPickerColorPalette } from "./ColorPickerBase/color-palette/ColorPickerColorPalette.js";
15
14
  import { ColorPickerContext, Consumer, Provider, useColorPickerContext } from "./ColorPickerBase/color-picker-context.js";
15
+ import { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton } from "./ColorPickerBase/color-palette/PaletteButton.js";
16
+ import { ColorPickerPaletteSwatch } from "./ColorPickerBase/color-palette/PaletteSwatch.js";
17
+ import { COMMON_COLORS, ColorPickerColorPalette } from "./ColorPickerBase/color-palette/ColorPalette.js";
16
18
  import { ColorPickerContent } from "./ColorPickerBase/ColorPickerContent.js";
17
19
  import { ColorPickerAlphaSlider, ColorPickerArea, ColorPickerControls, ColorPickerEyeDropper, ColorPickerHueSlider } from "./ColorPickerBase/ColorPickerControls.js";
18
20
  import { ColorPickerFormatInput } from "./ColorPickerBase/ColorPickerFormatInput.js";
@@ -91,4 +93,4 @@ import "./toast/index.js";
91
93
  import { ToggleGroup, ToggleGroupItem } from "./ToggleGroup.js";
92
94
  import { cn } from "@pixpilot/shadcn";
93
95
 
94
- export { AbsoluteFill, Alert, AvatarUpload, Button, ButtonExtended, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, COMMON_COLORS, CircleLoader, CloseButtonAbsolute, CloseButtonRounded, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerButton, ColorPickerColorPalette, ColorPickerCompactControls, ColorPickerContent, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerControls, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatInput, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerHueSlider, ColorPickerInput, ColorPickerRoot, ColorSelect, Combobox, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogTitle, DialogTrigger, FileUpload, FileUploadInline, FileUploadRoot, FileUploadRootItem, IconPicker, IconToggle, Input, Layout, LayoutFooter, LayoutHeader, LayoutMain, LoadingOverlay, Pagination, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Rating, RatingButton, RichTextEditor, ScaledPreview, Select, Slider, SliderInput, SliderSelect, Tabs, TabsContent, TabsContext, TabsList, TabsTrigger, TagsInput, TagsInputInline, ThemeModeDropdown, ThemeModeSwitchInside, ThemeModeSwitchOutside, ThemeModeToggleButton, ThemeProvider, Toaster, ToggleButton, ToggleGroup, ToggleGroupItem, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, useColorPickerContext, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
96
+ export { AbsoluteFill, Alert, AvatarUpload, Button, ButtonExtended, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, COLOR_PICKER_PALETTE_BUTTON_CLASSES, COMMON_COLORS, CircleLoader, CloseButtonAbsolute, CloseButtonRounded, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerButton, ColorPickerColorPalette, ColorPickerCompactControls, ColorPickerContent, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerControls, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatInput, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerHueSlider, ColorPickerInput, ColorPickerPaletteButton, ColorPickerPaletteSwatch, ColorPickerRoot, ColorSelect, Combobox, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogTitle, DialogTrigger, FileUpload, FileUploadInline, FileUploadRoot, FileUploadRootItem, IconPicker, IconToggle, Input, Layout, LayoutFooter, LayoutHeader, LayoutMain, LoadingOverlay, Pagination, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Rating, RatingButton, RichTextEditor, ScaledPreview, Select, Slider, SliderInput, SliderSelect, Tabs, TabsContent, TabsContext, TabsList, TabsTrigger, TagsInput, TagsInputInline, ThemeModeDropdown, ThemeModeSwitchInside, ThemeModeSwitchOutside, ThemeModeToggleButton, ThemeProvider, Toaster, ToggleButton, ToggleGroup, ToggleGroupItem, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, useColorPickerContext, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/shadcn-ui",
3
3
  "type": "module",
4
- "version": "1.1.0",
4
+ "version": "1.1.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",
@@ -61,11 +61,11 @@
61
61
  "tsdown": "^0.15.12",
62
62
  "typescript": "^5.9.3",
63
63
  "@internal/eslint-config": "0.3.0",
64
- "@internal/hooks": "0.0.0",
65
64
  "@internal/prettier-config": "0.0.1",
66
65
  "@internal/tsconfig": "0.1.0",
67
66
  "@internal/tsdown-config": "0.1.0",
68
- "@internal/vitest-config": "0.1.0"
67
+ "@internal/vitest-config": "0.1.0",
68
+ "@internal/hooks": "0.0.0"
69
69
  },
70
70
  "prettier": "@internal/prettier-config",
71
71
  "scripts": {
@@ -1,20 +0,0 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- let __pixpilot_shadcn = require("@pixpilot/shadcn");
3
- __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
4
- let react = require("react");
5
- react = require_rolldown_runtime.__toESM(react);
6
- let react_jsx_runtime = require("react/jsx-runtime");
7
- react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
8
-
9
- //#region src/ColorPickerBase/PaletteButton.tsx
10
- const PaletteButton = (props) => {
11
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
12
- type: "button",
13
- ...props,
14
- className: (0, __pixpilot_shadcn.cn)("w-6.5 h-6.5 rounded border border-input focus:outline-none focus:ring-2 focus:ring-ring", props.className)
15
- });
16
- };
17
- PaletteButton.displayName = "PaletteButton";
18
-
19
- //#endregion
20
- exports.PaletteButton = PaletteButton;
@@ -1,16 +0,0 @@
1
- import { cn } from "@pixpilot/shadcn";
2
- import React from "react";
3
- import { jsx } from "react/jsx-runtime";
4
-
5
- //#region src/ColorPickerBase/PaletteButton.tsx
6
- const PaletteButton = (props) => {
7
- return /* @__PURE__ */ jsx("button", {
8
- type: "button",
9
- ...props,
10
- className: cn("w-6.5 h-6.5 rounded border border-input focus:outline-none focus:ring-2 focus:ring-ring", props.className)
11
- });
12
- };
13
- PaletteButton.displayName = "PaletteButton";
14
-
15
- //#endregion
16
- export { PaletteButton };
@@ -1,95 +0,0 @@
1
- import { PaletteButton } from "../PaletteButton.js";
2
- import { PaletteSwatch } from "./PaletteSwatch.js";
3
- import { cn } from "@pixpilot/shadcn";
4
- import { Droplet } from "lucide-react";
5
- import React from "react";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
-
8
- //#region src/ColorPickerBase/color-palette/ColorPickerColorPalette.tsx
9
- const COMMON_COLORS = [
10
- {
11
- label: "Transparent",
12
- value: "#00000000"
13
- },
14
- {
15
- label: "Black",
16
- value: "#000000"
17
- },
18
- {
19
- label: "White",
20
- value: "#FFFFFF"
21
- },
22
- {
23
- label: "Gray",
24
- value: "#808080"
25
- },
26
- {
27
- label: "Red",
28
- value: "#FF0000"
29
- },
30
- {
31
- label: "Orange",
32
- value: "#FFA500"
33
- },
34
- {
35
- label: "Yellow",
36
- value: "#FFFF00"
37
- },
38
- {
39
- label: "Lime",
40
- value: "#84CC16"
41
- },
42
- {
43
- label: "Green",
44
- value: "#22C55E"
45
- },
46
- {
47
- label: "Teal",
48
- value: "#14B8A6"
49
- },
50
- {
51
- label: "Cyan",
52
- value: "#00FFFF"
53
- },
54
- {
55
- label: "Blue",
56
- value: "#3B82F6"
57
- },
58
- {
59
- label: "Indigo",
60
- value: "#6366F1"
61
- },
62
- {
63
- label: "Purple",
64
- value: "#A855F7"
65
- },
66
- {
67
- label: "Pink",
68
- value: "#EC4899"
69
- },
70
- {
71
- label: "Brown",
72
- value: "#A52A2A"
73
- }
74
- ];
75
- const ColorPickerColorPalette = (props) => {
76
- const { presetColors = COMMON_COLORS, onChange, selectedColor, onMoreColor,...rest } = props;
77
- return /* @__PURE__ */ jsxs("div", {
78
- ...rest,
79
- className: cn("gap-2 flex flex-wrap", rest.className),
80
- children: [presetColors.map((color) => /* @__PURE__ */ jsx(PaletteSwatch, {
81
- color,
82
- onSelect: onChange,
83
- selectedValue: selectedColor
84
- }, color.value)), onMoreColor && /* @__PURE__ */ jsx(PaletteButton, {
85
- onClick: onMoreColor,
86
- "aria-label": "Toggle full color picker",
87
- className: "flex items-center justify-center border-input bg-input hover:bg-accent hover:text-accent-foreground",
88
- children: /* @__PURE__ */ jsx(Droplet, { className: "h-4 w-4" })
89
- })]
90
- });
91
- };
92
- ColorPickerColorPalette.displayName = "ColorPickerColorPalette";
93
-
94
- //#endregion
95
- export { COMMON_COLORS, ColorPickerColorPalette };