@pixpilot/shadcn-ui 0.19.0 → 0.21.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.
Files changed (46) hide show
  1. package/dist/ColorPickerBase/ColorPickerBase.cjs +64 -16
  2. package/dist/ColorPickerBase/ColorPickerBase.js +64 -16
  3. package/dist/ColorPickerBase/ColorPickerCompact.cjs +1 -1
  4. package/dist/ColorPickerBase/ColorPickerCompact.js +1 -1
  5. package/dist/ColorPickerBase/ColorPickerFull.cjs +1 -1
  6. package/dist/ColorPickerBase/ColorPickerFull.js +1 -1
  7. package/dist/ColorPickerBase/PaletteSwatch.cjs +16 -4
  8. package/dist/ColorPickerBase/PaletteSwatch.js +16 -5
  9. package/dist/ColorPickerBase/index.d.ts +1 -1
  10. package/dist/ColorPickerBase/types.d.cts +6 -2
  11. package/dist/ColorPickerBase/types.d.ts +6 -2
  12. package/dist/ColorSelect.cjs +64 -0
  13. package/dist/ColorSelect.d.cts +20 -0
  14. package/dist/ColorSelect.d.ts +20 -0
  15. package/dist/ColorSelect.js +60 -0
  16. package/dist/ContentCard.d.cts +2 -2
  17. package/dist/ContentCard.d.ts +2 -2
  18. package/dist/DatePicker.d.cts +2 -2
  19. package/dist/DatePicker.d.ts +2 -2
  20. package/dist/Select.cjs +9 -16
  21. package/dist/Select.d.cts +2 -2
  22. package/dist/Select.d.ts +2 -2
  23. package/dist/Select.js +9 -16
  24. package/dist/ThemeToggle.d.cts +2 -2
  25. package/dist/ThemeToggle.d.ts +2 -2
  26. package/dist/file-upload/FileUpload.d.cts +2 -2
  27. package/dist/file-upload/FileUpload.d.ts +2 -2
  28. package/dist/file-upload-inline/FileUploadInline.d.cts +2 -2
  29. package/dist/file-upload-inline/FileUploadInline.d.ts +2 -2
  30. package/dist/hooks/index.cjs +1 -0
  31. package/dist/hooks/index.d.cts +2 -0
  32. package/dist/hooks/index.d.ts +2 -1
  33. package/dist/hooks/index.js +1 -0
  34. package/dist/hooks/use-select-keyboard.cjs +37 -0
  35. package/dist/hooks/use-select-keyboard.d.cts +27 -0
  36. package/dist/hooks/use-select-keyboard.d.ts +27 -0
  37. package/dist/hooks/use-select-keyboard.js +35 -0
  38. package/dist/index.cjs +4 -0
  39. package/dist/index.d.cts +5 -2
  40. package/dist/index.d.ts +4 -2
  41. package/dist/index.js +3 -1
  42. package/dist/input/Input.d.cts +2 -2
  43. package/dist/input/Input.d.ts +2 -2
  44. package/dist/tags-input.d.cts +2 -2
  45. package/dist/tags-input.d.ts +2 -2
  46. package/package.json +1 -1
@@ -15,22 +15,70 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
15
15
 
16
16
  //#region src/ColorPickerBase/ColorPickerBase.tsx
17
17
  const commonColors = [
18
- "#00000000",
19
- "#000000",
20
- "#FFFFFF",
21
- "#808080",
22
- "#FF0000",
23
- "#FFA500",
24
- "#FFFF00",
25
- "#84CC16",
26
- "#22C55E",
27
- "#14B8A6",
28
- "#00FFFF",
29
- "#3B82F6",
30
- "#6366F1",
31
- "#A855F7",
32
- "#EC4899",
33
- "#A52A2A"
18
+ {
19
+ label: "Transparent",
20
+ value: "#00000000"
21
+ },
22
+ {
23
+ label: "Black",
24
+ value: "#000000"
25
+ },
26
+ {
27
+ label: "White",
28
+ value: "#FFFFFF"
29
+ },
30
+ {
31
+ label: "Gray",
32
+ value: "#808080"
33
+ },
34
+ {
35
+ label: "Red",
36
+ value: "#FF0000"
37
+ },
38
+ {
39
+ label: "Orange",
40
+ value: "#FFA500"
41
+ },
42
+ {
43
+ label: "Yellow",
44
+ value: "#FFFF00"
45
+ },
46
+ {
47
+ label: "Lime",
48
+ value: "#84CC16"
49
+ },
50
+ {
51
+ label: "Green",
52
+ value: "#22C55E"
53
+ },
54
+ {
55
+ label: "Teal",
56
+ value: "#14B8A6"
57
+ },
58
+ {
59
+ label: "Cyan",
60
+ value: "#00FFFF"
61
+ },
62
+ {
63
+ label: "Blue",
64
+ value: "#3B82F6"
65
+ },
66
+ {
67
+ label: "Indigo",
68
+ value: "#6366F1"
69
+ },
70
+ {
71
+ label: "Purple",
72
+ value: "#A855F7"
73
+ },
74
+ {
75
+ label: "Pink",
76
+ value: "#EC4899"
77
+ },
78
+ {
79
+ label: "Brown",
80
+ value: "#A52A2A"
81
+ }
34
82
  ];
35
83
  const DEFAULT_COLOR = "#000000";
36
84
  const ColorPickerBase = (props) => {
@@ -11,22 +11,70 @@ import { jsx, jsxs } from "react/jsx-runtime";
11
11
 
12
12
  //#region src/ColorPickerBase/ColorPickerBase.tsx
13
13
  const commonColors = [
14
- "#00000000",
15
- "#000000",
16
- "#FFFFFF",
17
- "#808080",
18
- "#FF0000",
19
- "#FFA500",
20
- "#FFFF00",
21
- "#84CC16",
22
- "#22C55E",
23
- "#14B8A6",
24
- "#00FFFF",
25
- "#3B82F6",
26
- "#6366F1",
27
- "#A855F7",
28
- "#EC4899",
29
- "#A52A2A"
14
+ {
15
+ label: "Transparent",
16
+ value: "#00000000"
17
+ },
18
+ {
19
+ label: "Black",
20
+ value: "#000000"
21
+ },
22
+ {
23
+ label: "White",
24
+ value: "#FFFFFF"
25
+ },
26
+ {
27
+ label: "Gray",
28
+ value: "#808080"
29
+ },
30
+ {
31
+ label: "Red",
32
+ value: "#FF0000"
33
+ },
34
+ {
35
+ label: "Orange",
36
+ value: "#FFA500"
37
+ },
38
+ {
39
+ label: "Yellow",
40
+ value: "#FFFF00"
41
+ },
42
+ {
43
+ label: "Lime",
44
+ value: "#84CC16"
45
+ },
46
+ {
47
+ label: "Green",
48
+ value: "#22C55E"
49
+ },
50
+ {
51
+ label: "Teal",
52
+ value: "#14B8A6"
53
+ },
54
+ {
55
+ label: "Cyan",
56
+ value: "#00FFFF"
57
+ },
58
+ {
59
+ label: "Blue",
60
+ value: "#3B82F6"
61
+ },
62
+ {
63
+ label: "Indigo",
64
+ value: "#6366F1"
65
+ },
66
+ {
67
+ label: "Purple",
68
+ value: "#A855F7"
69
+ },
70
+ {
71
+ label: "Pink",
72
+ value: "#EC4899"
73
+ },
74
+ {
75
+ label: "Brown",
76
+ value: "#A52A2A"
77
+ }
30
78
  ];
31
79
  const DEFAULT_COLOR = "#000000";
32
80
  const ColorPickerBase = (props) => {
@@ -31,7 +31,7 @@ const ColorPickerCompact = react.default.memo((props) => {
31
31
  children: [presetColors.map((color) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteSwatch.PaletteSwatch, {
32
32
  color,
33
33
  onSelect: onValueChange
34
- }, color)), layout === "compact" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteButton.PaletteButton, {
34
+ }, color.value)), layout === "compact" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteButton.PaletteButton, {
35
35
  onClick: () => setShowFullPicker(!showFullPicker),
36
36
  "aria-label": "Toggle full color picker",
37
37
  className: "flex items-center justify-center border-input bg-input hover:bg-accent hover:text-accent-foreground",
@@ -26,7 +26,7 @@ const ColorPickerCompact = React.memo((props) => {
26
26
  children: [presetColors.map((color) => /* @__PURE__ */ jsx(PaletteSwatch, {
27
27
  color,
28
28
  onSelect: onValueChange
29
- }, color)), layout === "compact" && /* @__PURE__ */ jsx(PaletteButton, {
29
+ }, color.value)), layout === "compact" && /* @__PURE__ */ jsx(PaletteButton, {
30
30
  onClick: () => setShowFullPicker(!showFullPicker),
31
31
  "aria-label": "Toggle full color picker",
32
32
  className: "flex items-center justify-center border-input bg-input hover:bg-accent hover:text-accent-foreground",
@@ -25,7 +25,7 @@ const ColorPickerFull = react.default.memo((props) => {
25
25
  children: presetColors.map((color) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteSwatch.PaletteSwatch, {
26
26
  color,
27
27
  onSelect: onValueChange
28
- }, color))
28
+ }, color.value))
29
29
  }),
30
30
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
31
31
  className: "flex items-center gap-2 w-full",
@@ -21,7 +21,7 @@ const ColorPickerFull = React.memo((props) => {
21
21
  children: presetColors.map((color) => /* @__PURE__ */ jsx(PaletteSwatch, {
22
22
  color,
23
23
  onSelect: onValueChange
24
- }, color))
24
+ }, color.value))
25
25
  }),
26
26
  /* @__PURE__ */ jsxs("div", {
27
27
  className: "flex items-center gap-2 w-full",
@@ -1,5 +1,7 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
2
  const require_PaletteButton = require('./PaletteButton.cjs');
3
+ let __pixpilot_shadcn = require("@pixpilot/shadcn");
4
+ __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
3
5
  let react = require("react");
4
6
  react = require_rolldown_runtime.__toESM(react);
5
7
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -7,17 +9,27 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
7
9
 
8
10
  //#region src/ColorPickerBase/PaletteSwatch.tsx
9
11
  const PaletteSwatch = ({ color, onSelect, className }) => {
12
+ const colorValue = color?.value ?? "rgb(0,0,0,0)";
13
+ const colorLabel = color?.label;
10
14
  const handleClick = (0, react.useCallback)(() => {
11
- if (onSelect) onSelect(color ?? "rgb(0,0,0,0)");
12
- }, [color, onSelect]);
13
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteButton.PaletteButton, {
15
+ if (onSelect) onSelect(colorValue);
16
+ }, [colorValue, onSelect]);
17
+ const button = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteButton.PaletteButton, {
14
18
  style: {
15
- backgroundImage: `linear-gradient(${color}, ${color}), repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%)`,
19
+ backgroundImage: `linear-gradient(${colorValue}, ${colorValue}), repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%)`,
16
20
  backgroundSize: "auto, 8px 8px"
17
21
  },
18
22
  className,
19
23
  onClick: handleClick
20
24
  });
25
+ if (colorLabel === null || colorLabel === void 0 || colorLabel === "") return button;
26
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Tooltip, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TooltipTrigger, {
27
+ asChild: true,
28
+ children: button
29
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TooltipContent, {
30
+ side: "top",
31
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: colorLabel })
32
+ })] });
21
33
  };
22
34
 
23
35
  //#endregion
@@ -1,20 +1,31 @@
1
1
  import { PaletteButton } from "./PaletteButton.js";
2
+ import { Tooltip, TooltipContent, TooltipTrigger } from "@pixpilot/shadcn";
2
3
  import { useCallback } from "react";
3
- import { jsx } from "react/jsx-runtime";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
4
5
 
5
6
  //#region src/ColorPickerBase/PaletteSwatch.tsx
6
7
  const PaletteSwatch = ({ color, onSelect, className }) => {
8
+ const colorValue = color?.value ?? "rgb(0,0,0,0)";
9
+ const colorLabel = color?.label;
7
10
  const handleClick = useCallback(() => {
8
- if (onSelect) onSelect(color ?? "rgb(0,0,0,0)");
9
- }, [color, onSelect]);
10
- return /* @__PURE__ */ jsx(PaletteButton, {
11
+ if (onSelect) onSelect(colorValue);
12
+ }, [colorValue, onSelect]);
13
+ const button = /* @__PURE__ */ jsx(PaletteButton, {
11
14
  style: {
12
- backgroundImage: `linear-gradient(${color}, ${color}), repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%)`,
15
+ backgroundImage: `linear-gradient(${colorValue}, ${colorValue}), repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%)`,
13
16
  backgroundSize: "auto, 8px 8px"
14
17
  },
15
18
  className,
16
19
  onClick: handleClick
17
20
  });
21
+ if (colorLabel === null || colorLabel === void 0 || colorLabel === "") return button;
22
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
23
+ asChild: true,
24
+ children: button
25
+ }), /* @__PURE__ */ jsx(TooltipContent, {
26
+ side: "top",
27
+ children: /* @__PURE__ */ jsx("p", { children: colorLabel })
28
+ })] });
18
29
  };
19
30
 
20
31
  //#endregion
@@ -1,2 +1,2 @@
1
- import { ColorPickerBaseProps } from "./types.js";
1
+ import { ColorPickerBaseProps, PresetColor } from "./types.js";
2
2
  import { ColorPickerBase } from "./ColorPickerBase.js";
@@ -1,10 +1,14 @@
1
1
  import { ColorPickerProps } from "@pixpilot/shadcn";
2
2
 
3
3
  //#region src/ColorPickerBase/types.d.ts
4
+ interface PresetColor {
5
+ label: string;
6
+ value: string;
7
+ }
4
8
  interface ColorPickerBaseProps extends Omit<ColorPickerProps, 'onChange' | 'children'> {
5
9
  value?: string;
6
10
  onChange?: (value: string) => void;
7
- presetColors?: string[];
11
+ presetColors?: PresetColor[];
8
12
  layout?: 'full' | 'compact';
9
13
  children: (props: {
10
14
  value?: string;
@@ -13,4 +17,4 @@ interface ColorPickerBaseProps extends Omit<ColorPickerProps, 'onChange' | 'chil
13
17
  }) => React.ReactNode;
14
18
  }
15
19
  //#endregion
16
- export { ColorPickerBaseProps };
20
+ export { ColorPickerBaseProps, PresetColor };
@@ -1,10 +1,14 @@
1
1
  import { ColorPickerProps } from "@pixpilot/shadcn";
2
2
 
3
3
  //#region src/ColorPickerBase/types.d.ts
4
+ interface PresetColor {
5
+ label: string;
6
+ value: string;
7
+ }
4
8
  interface ColorPickerBaseProps extends Omit<ColorPickerProps, 'onChange' | 'children'> {
5
9
  value?: string;
6
10
  onChange?: (value: string) => void;
7
- presetColors?: string[];
11
+ presetColors?: PresetColor[];
8
12
  layout?: 'full' | 'compact';
9
13
  children: (props: {
10
14
  value?: string;
@@ -13,4 +17,4 @@ interface ColorPickerBaseProps extends Omit<ColorPickerProps, 'onChange' | 'chil
13
17
  }) => React.ReactNode;
14
18
  }
15
19
  //#endregion
16
- export { ColorPickerBaseProps };
20
+ export { ColorPickerBaseProps, PresetColor };
@@ -0,0 +1,64 @@
1
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
+ const require_use_select_keyboard = require('./hooks/use-select-keyboard.cjs');
3
+ let __pixpilot_shadcn = require("@pixpilot/shadcn");
4
+ __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
5
+ let react = require("react");
6
+ react = require_rolldown_runtime.__toESM(react);
7
+ let react_jsx_runtime = require("react/jsx-runtime");
8
+ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
9
+
10
+ //#region src/ColorSelect.tsx
11
+ function ColorSelect(props) {
12
+ const { options, value = "", onChange, placeholder, contentProps, keyboardMode = "dropdown", open: openProp, onOpenChange: onOpenChangeProp,...restProps } = props;
13
+ const [uncontrolledOpen, setUncontrolledOpen] = react.default.useState(false);
14
+ const open = openProp ?? uncontrolledOpen;
15
+ const handleOpenChange = (nextOpen) => {
16
+ if (openProp === void 0) setUncontrolledOpen(nextOpen);
17
+ onOpenChangeProp?.(nextOpen);
18
+ };
19
+ const { handleTriggerKeyDown } = require_use_select_keyboard.useSelectKeyboard({
20
+ options,
21
+ value,
22
+ onChange,
23
+ keyboardMode,
24
+ open,
25
+ getValue: (option) => option.value
26
+ });
27
+ const selectedOption = options?.find((option) => option.value === value);
28
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Select, {
29
+ value,
30
+ onValueChange: onChange,
31
+ open,
32
+ onOpenChange: handleOpenChange,
33
+ ...restProps,
34
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.SelectTrigger, {
35
+ className: "w-full",
36
+ onKeyDown: handleTriggerKeyDown,
37
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.SelectValue, {
38
+ placeholder,
39
+ children: selectedOption && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
40
+ className: "flex items-center gap-2",
41
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
42
+ className: "h-4 w-4 rounded border border-gray-300",
43
+ style: { backgroundColor: selectedOption.value }
44
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: selectedOption.label })]
45
+ })
46
+ })
47
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.SelectContent, {
48
+ ...contentProps,
49
+ children: options?.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.SelectItem, {
50
+ value: option.value,
51
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
52
+ className: "flex items-center gap-2",
53
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
54
+ className: "h-4 w-4 rounded border border-gray-300",
55
+ style: { backgroundColor: option.value }
56
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: option.label })]
57
+ })
58
+ }, option.value))
59
+ })]
60
+ });
61
+ }
62
+
63
+ //#endregion
64
+ exports.ColorSelect = ColorSelect;
@@ -0,0 +1,20 @@
1
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
2
+ import { Select, SelectContent } from "@pixpilot/shadcn";
3
+ import React, { ComponentProps } from "react";
4
+
5
+ //#region src/ColorSelect.d.ts
6
+ interface ColorSelectOption {
7
+ label: string;
8
+ value: string;
9
+ }
10
+ type BaseColorSelectProps = {
11
+ options?: ColorSelectOption[];
12
+ contentProps?: React.ComponentProps<typeof SelectContent>;
13
+ value?: string;
14
+ onChange?: (value: string) => void;
15
+ placeholder?: string;
16
+ keyboardMode?: 'cycle' | 'dropdown';
17
+ } & Omit<ComponentProps<typeof Select>, 'value' | 'onValueChange' | 'children'>;
18
+ declare function ColorSelect(props: BaseColorSelectProps): react_jsx_runtime1.JSX.Element;
19
+ //#endregion
20
+ export { BaseColorSelectProps, ColorSelect, ColorSelectOption };
@@ -0,0 +1,20 @@
1
+ import { Select, SelectContent } from "@pixpilot/shadcn";
2
+ import React, { ComponentProps } from "react";
3
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
4
+
5
+ //#region src/ColorSelect.d.ts
6
+ interface ColorSelectOption {
7
+ label: string;
8
+ value: string;
9
+ }
10
+ type BaseColorSelectProps = {
11
+ options?: ColorSelectOption[];
12
+ contentProps?: React.ComponentProps<typeof SelectContent>;
13
+ value?: string;
14
+ onChange?: (value: string) => void;
15
+ placeholder?: string;
16
+ keyboardMode?: 'cycle' | 'dropdown';
17
+ } & Omit<ComponentProps<typeof Select>, 'value' | 'onValueChange' | 'children'>;
18
+ declare function ColorSelect(props: BaseColorSelectProps): react_jsx_runtime1.JSX.Element;
19
+ //#endregion
20
+ export { BaseColorSelectProps, ColorSelect, ColorSelectOption };
@@ -0,0 +1,60 @@
1
+ import { useSelectKeyboard } from "./hooks/use-select-keyboard.js";
2
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@pixpilot/shadcn";
3
+ import React from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region src/ColorSelect.tsx
7
+ function ColorSelect(props) {
8
+ const { options, value = "", onChange, placeholder, contentProps, keyboardMode = "dropdown", open: openProp, onOpenChange: onOpenChangeProp,...restProps } = props;
9
+ const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);
10
+ const open = openProp ?? uncontrolledOpen;
11
+ const handleOpenChange = (nextOpen) => {
12
+ if (openProp === void 0) setUncontrolledOpen(nextOpen);
13
+ onOpenChangeProp?.(nextOpen);
14
+ };
15
+ const { handleTriggerKeyDown } = useSelectKeyboard({
16
+ options,
17
+ value,
18
+ onChange,
19
+ keyboardMode,
20
+ open,
21
+ getValue: (option) => option.value
22
+ });
23
+ const selectedOption = options?.find((option) => option.value === value);
24
+ return /* @__PURE__ */ jsxs(Select, {
25
+ value,
26
+ onValueChange: onChange,
27
+ open,
28
+ onOpenChange: handleOpenChange,
29
+ ...restProps,
30
+ children: [/* @__PURE__ */ jsx(SelectTrigger, {
31
+ className: "w-full",
32
+ onKeyDown: handleTriggerKeyDown,
33
+ children: /* @__PURE__ */ jsx(SelectValue, {
34
+ placeholder,
35
+ children: selectedOption && /* @__PURE__ */ jsxs("div", {
36
+ className: "flex items-center gap-2",
37
+ children: [/* @__PURE__ */ jsx("div", {
38
+ className: "h-4 w-4 rounded border border-gray-300",
39
+ style: { backgroundColor: selectedOption.value }
40
+ }), /* @__PURE__ */ jsx("span", { children: selectedOption.label })]
41
+ })
42
+ })
43
+ }), /* @__PURE__ */ jsx(SelectContent, {
44
+ ...contentProps,
45
+ children: options?.map((option) => /* @__PURE__ */ jsx(SelectItem, {
46
+ value: option.value,
47
+ children: /* @__PURE__ */ jsxs("div", {
48
+ className: "flex items-center gap-2",
49
+ children: [/* @__PURE__ */ jsx("div", {
50
+ className: "h-4 w-4 rounded border border-gray-300",
51
+ style: { backgroundColor: option.value }
52
+ }), /* @__PURE__ */ jsx("span", { children: option.label })]
53
+ })
54
+ }, option.value))
55
+ })]
56
+ });
57
+ }
58
+
59
+ //#endregion
60
+ export { ColorSelect };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime2 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_runtime1.JSX.Element;
11
+ declare function ContentCard(props: SectionCardProps): react_jsx_runtime2.JSX.Element;
12
12
  declare namespace ContentCard {
13
13
  var displayName: string;
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import { Card } from "@pixpilot/shadcn";
2
2
  import React, { ReactNode } from "react";
3
- import * as react_jsx_runtime1 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/ContentCard.d.ts
6
6
  interface SectionCardProps extends React.ComponentProps<typeof Card> {
@@ -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_runtime1.JSX.Element;
11
+ declare function ContentCard(props: SectionCardProps): react_jsx_runtime2.JSX.Element;
12
12
  declare namespace ContentCard {
13
13
  var displayName: string;
14
14
  }
@@ -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 { 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_runtime2.JSX.Element;
11
+ declare function DatePicker(props: DatePickerProps): react_jsx_runtime3.JSX.Element;
12
12
  declare namespace DatePicker {
13
13
  var displayName: string;
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import { Calendar } from "@pixpilot/shadcn";
2
2
  import { ComponentProps } from "react";
3
- import * as react_jsx_runtime2 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/DatePicker.d.ts
6
6
  type DatePickerProps = {
@@ -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_runtime2.JSX.Element;
11
+ declare function DatePicker(props: DatePickerProps): react_jsx_runtime3.JSX.Element;
12
12
  declare namespace DatePicker {
13
13
  var displayName: string;
14
14
  }
package/dist/Select.cjs CHANGED
@@ -1,4 +1,5 @@
1
1
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
+ const require_use_select_keyboard = require('./hooks/use-select-keyboard.cjs');
2
3
  let __pixpilot_shadcn = require("@pixpilot/shadcn");
3
4
  __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
4
5
  let react = require("react");
@@ -15,22 +16,14 @@ function Select(props) {
15
16
  if (openProp === void 0) setUncontrolledOpen(nextOpen);
16
17
  onOpenChangeProp?.(nextOpen);
17
18
  };
18
- const handleTriggerKeyDown = (event) => {
19
- if (keyboardMode !== "cycle") return;
20
- if (open) return;
21
- if (event.key !== "ArrowDown" && event.key !== "ArrowUp") return;
22
- event.preventDefault();
23
- event.stopPropagation();
24
- if (!options || options.length === 0) return;
25
- const currentIndex = options.findIndex((option) => String(option.value) === value);
26
- const optionCount = options.length;
27
- let nextIndex = 0;
28
- if (event.key === "ArrowDown") nextIndex = currentIndex >= 0 ? (currentIndex + 1) % optionCount : 0;
29
- else nextIndex = currentIndex >= 0 ? (currentIndex - 1 + optionCount) % optionCount : optionCount - 1;
30
- const nextValue = String(options[nextIndex]?.value ?? "");
31
- if (!nextValue || nextValue === value) return;
32
- onChange?.(nextValue);
33
- };
19
+ const { handleTriggerKeyDown } = require_use_select_keyboard.useSelectKeyboard({
20
+ options,
21
+ value,
22
+ onChange,
23
+ keyboardMode,
24
+ open,
25
+ getValue: (option) => String(option.value)
26
+ });
34
27
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Select, {
35
28
  value,
36
29
  onValueChange: onChange,
package/dist/Select.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime3 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime4 from "react/jsx-runtime";
2
2
  import { Select, SelectContent } from "@pixpilot/shadcn";
3
3
  import React, { ComponentProps } from "react";
4
4
 
@@ -15,6 +15,6 @@ type BaseSelectProps = {
15
15
  placeholder?: string;
16
16
  keyboardMode?: 'cycle' | 'dropdown';
17
17
  } & Omit<ComponentProps<typeof Select>, 'value' | 'onValueChange' | 'children'>;
18
- declare function Select$1(props: BaseSelectProps): react_jsx_runtime3.JSX.Element;
18
+ declare function Select$1(props: BaseSelectProps): react_jsx_runtime4.JSX.Element;
19
19
  //#endregion
20
20
  export { Select$1 as Select, SelectOption };
package/dist/Select.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Select, SelectContent } from "@pixpilot/shadcn";
2
2
  import React, { ComponentProps } from "react";
3
- import * as react_jsx_runtime3 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime4 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/Select.d.ts
6
6
  interface SelectOption {
@@ -15,6 +15,6 @@ type BaseSelectProps = {
15
15
  placeholder?: string;
16
16
  keyboardMode?: 'cycle' | 'dropdown';
17
17
  } & Omit<ComponentProps<typeof Select>, 'value' | 'onValueChange' | 'children'>;
18
- declare function Select$1(props: BaseSelectProps): react_jsx_runtime3.JSX.Element;
18
+ declare function Select$1(props: BaseSelectProps): react_jsx_runtime4.JSX.Element;
19
19
  //#endregion
20
20
  export { Select$1 as Select, SelectOption };
package/dist/Select.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { useSelectKeyboard } from "./hooks/use-select-keyboard.js";
1
2
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@pixpilot/shadcn";
2
3
  import React from "react";
3
4
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -11,22 +12,14 @@ function Select$1(props) {
11
12
  if (openProp === void 0) setUncontrolledOpen(nextOpen);
12
13
  onOpenChangeProp?.(nextOpen);
13
14
  };
14
- const handleTriggerKeyDown = (event) => {
15
- if (keyboardMode !== "cycle") return;
16
- if (open) return;
17
- if (event.key !== "ArrowDown" && event.key !== "ArrowUp") return;
18
- event.preventDefault();
19
- event.stopPropagation();
20
- if (!options || options.length === 0) return;
21
- const currentIndex = options.findIndex((option) => String(option.value) === value);
22
- const optionCount = options.length;
23
- let nextIndex = 0;
24
- if (event.key === "ArrowDown") nextIndex = currentIndex >= 0 ? (currentIndex + 1) % optionCount : 0;
25
- else nextIndex = currentIndex >= 0 ? (currentIndex - 1 + optionCount) % optionCount : optionCount - 1;
26
- const nextValue = String(options[nextIndex]?.value ?? "");
27
- if (!nextValue || nextValue === value) return;
28
- onChange?.(nextValue);
29
- };
15
+ const { handleTriggerKeyDown } = useSelectKeyboard({
16
+ options,
17
+ value,
18
+ onChange,
19
+ keyboardMode,
20
+ open,
21
+ getValue: (option) => String(option.value)
22
+ });
30
23
  return /* @__PURE__ */ jsxs(Select, {
31
24
  value,
32
25
  onValueChange: onChange,
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/ThemeToggle.d.ts
4
- declare function ThemeToggle(): react_jsx_runtime5.JSX.Element;
4
+ declare function ThemeToggle(): react_jsx_runtime6.JSX.Element;
5
5
  //#endregion
6
6
  export { ThemeToggle };
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/ThemeToggle.d.ts
4
- declare function ThemeToggle(): react_jsx_runtime5.JSX.Element;
4
+ declare function ThemeToggle(): react_jsx_runtime6.JSX.Element;
5
5
  //#endregion
6
6
  export { ThemeToggle };
@@ -1,7 +1,7 @@
1
1
  import { FileUploadProps } from "./types/index.cjs";
2
- import * as react_jsx_runtime6 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_runtime6.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_runtime6 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_runtime6.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_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,10 +1,10 @@
1
1
  import { FileUploadInlineProps } from "./types.js";
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 +1,2 @@
1
+ const require_use_select_keyboard = require('./use-select-keyboard.cjs');
1
2
  const require_use_media_query = require('./use-media-query.cjs');
@@ -0,0 +1,2 @@
1
+ import { useMediaQuery } from "./use-media-query.cjs";
2
+ import { useSelectKeyboard } from "./use-select-keyboard.cjs";
@@ -1 +1,2 @@
1
- import { useMediaQuery } from "./use-media-query.js";
1
+ import { useMediaQuery } from "./use-media-query.js";
2
+ import { useSelectKeyboard } from "./use-select-keyboard.js";
@@ -1 +1,2 @@
1
+ import { useSelectKeyboard } from "./use-select-keyboard.js";
1
2
  import { useMediaQuery } from "./use-media-query.js";
@@ -0,0 +1,37 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ let react = require("react");
3
+ react = require_rolldown_runtime.__toESM(react);
4
+
5
+ //#region src/hooks/use-select-keyboard.ts
6
+ /**
7
+ * Hook to handle keyboard navigation for select components
8
+ * Supports cycling through options with arrow keys when closed
9
+ */
10
+ function useSelectKeyboard({ options, value, onChange, keyboardMode = "dropdown", open, getValue }) {
11
+ return { handleTriggerKeyDown: react.default.useCallback((event) => {
12
+ if (keyboardMode !== "cycle") return;
13
+ if (open) return;
14
+ if (event.key !== "ArrowDown" && event.key !== "ArrowUp") return;
15
+ event.preventDefault();
16
+ event.stopPropagation();
17
+ if (!options || options.length === 0) return;
18
+ const currentIndex = options.findIndex((option) => getValue(option) === value);
19
+ const optionCount = options.length;
20
+ let nextIndex = 0;
21
+ if (event.key === "ArrowDown") nextIndex = currentIndex >= 0 ? (currentIndex + 1) % optionCount : 0;
22
+ else nextIndex = currentIndex >= 0 ? (currentIndex - 1 + optionCount) % optionCount : optionCount - 1;
23
+ const nextValue = getValue(options[nextIndex]);
24
+ if (!nextValue || nextValue === value) return;
25
+ onChange?.(nextValue);
26
+ }, [
27
+ keyboardMode,
28
+ open,
29
+ options,
30
+ value,
31
+ onChange,
32
+ getValue
33
+ ]) };
34
+ }
35
+
36
+ //#endregion
37
+ exports.useSelectKeyboard = useSelectKeyboard;
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+
3
+ //#region src/hooks/use-select-keyboard.d.ts
4
+ interface UseSelectKeyboardProps<T> {
5
+ options?: T[];
6
+ value: string;
7
+ onChange?: (value: string) => void;
8
+ keyboardMode?: 'cycle' | 'dropdown';
9
+ open: boolean;
10
+ getValue: (option: T) => string;
11
+ }
12
+ /**
13
+ * Hook to handle keyboard navigation for select components
14
+ * Supports cycling through options with arrow keys when closed
15
+ */
16
+ declare function useSelectKeyboard<T>({
17
+ options,
18
+ value,
19
+ onChange,
20
+ keyboardMode,
21
+ open,
22
+ getValue
23
+ }: UseSelectKeyboardProps<T>): {
24
+ handleTriggerKeyDown: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
25
+ };
26
+ //#endregion
27
+ export { useSelectKeyboard };
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+
3
+ //#region src/hooks/use-select-keyboard.d.ts
4
+ interface UseSelectKeyboardProps<T> {
5
+ options?: T[];
6
+ value: string;
7
+ onChange?: (value: string) => void;
8
+ keyboardMode?: 'cycle' | 'dropdown';
9
+ open: boolean;
10
+ getValue: (option: T) => string;
11
+ }
12
+ /**
13
+ * Hook to handle keyboard navigation for select components
14
+ * Supports cycling through options with arrow keys when closed
15
+ */
16
+ declare function useSelectKeyboard<T>({
17
+ options,
18
+ value,
19
+ onChange,
20
+ keyboardMode,
21
+ open,
22
+ getValue
23
+ }: UseSelectKeyboardProps<T>): {
24
+ handleTriggerKeyDown: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
25
+ };
26
+ //#endregion
27
+ export { useSelectKeyboard };
@@ -0,0 +1,35 @@
1
+ import React from "react";
2
+
3
+ //#region src/hooks/use-select-keyboard.ts
4
+ /**
5
+ * Hook to handle keyboard navigation for select components
6
+ * Supports cycling through options with arrow keys when closed
7
+ */
8
+ function useSelectKeyboard({ options, value, onChange, keyboardMode = "dropdown", open, getValue }) {
9
+ return { handleTriggerKeyDown: React.useCallback((event) => {
10
+ if (keyboardMode !== "cycle") return;
11
+ if (open) return;
12
+ if (event.key !== "ArrowDown" && event.key !== "ArrowUp") return;
13
+ event.preventDefault();
14
+ event.stopPropagation();
15
+ if (!options || options.length === 0) return;
16
+ const currentIndex = options.findIndex((option) => getValue(option) === value);
17
+ const optionCount = options.length;
18
+ let nextIndex = 0;
19
+ if (event.key === "ArrowDown") nextIndex = currentIndex >= 0 ? (currentIndex + 1) % optionCount : 0;
20
+ else nextIndex = currentIndex >= 0 ? (currentIndex - 1 + optionCount) % optionCount : optionCount - 1;
21
+ const nextValue = getValue(options[nextIndex]);
22
+ if (!nextValue || nextValue === value) return;
23
+ onChange?.(nextValue);
24
+ }, [
25
+ keyboardMode,
26
+ open,
27
+ options,
28
+ value,
29
+ onChange,
30
+ getValue
31
+ ]) };
32
+ }
33
+
34
+ //#endregion
35
+ export { useSelectKeyboard };
package/dist/index.cjs CHANGED
@@ -14,6 +14,8 @@ const require_ColorPickerBase = require('./ColorPickerBase/ColorPickerBase.cjs')
14
14
  require('./ColorPickerBase/index.cjs');
15
15
  const require_ColorPicker = require('./ColorPicker/ColorPicker.cjs');
16
16
  require('./ColorPicker/index.cjs');
17
+ const require_use_select_keyboard = require('./hooks/use-select-keyboard.cjs');
18
+ const require_ColorSelect = require('./ColorSelect.cjs');
17
19
  const require_Combobox = require('./Combobox.cjs');
18
20
  const require_confirmation_dialogs = require('./confirmation-dialog/confirmation-dialogs.cjs');
19
21
  const require_DialogProvider = require('./confirmation-dialog/DialogProvider.cjs');
@@ -68,6 +70,7 @@ exports.CloseButtonAbsolute = require_CloseButtonAbsolute.CloseButtonAbsolute;
68
70
  exports.CloseButtonRounded = require_CloseButtonRounded.CloseButtonRounded;
69
71
  exports.ColorPicker = require_ColorPicker.ColorPicker;
70
72
  exports.ColorPickerBase = require_ColorPickerBase.ColorPickerBase;
73
+ exports.ColorSelect = require_ColorSelect.ColorSelect;
71
74
  exports.Combobox = require_Combobox.Combobox;
72
75
  exports.ContentCard = require_ContentCard.ContentCard;
73
76
  exports.DEFAULT_ALERT_DURATION = require_toast.DEFAULT_ALERT_DURATION;
@@ -105,6 +108,7 @@ exports.toastInfo = require_toast.toastInfo;
105
108
  exports.toastSuccess = require_toast.toastSuccess;
106
109
  exports.toastWarning = require_toast.toastWarning;
107
110
  exports.useMediaQuery = require_use_media_query.useMediaQuery;
111
+ exports.useSelectKeyboard = require_use_select_keyboard.useSelectKeyboard;
108
112
  exports.useTabsContext = require_TabsContext.useTabsContext;
109
113
  Object.defineProperty(exports, 'useTheme', {
110
114
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -10,9 +10,10 @@ import { CircleLoader, CircleLoaderProps } from "./circle-loader/circle-loader.c
10
10
  import "./circle-loader/index.cjs";
11
11
  import { CloseButtonRounded, CloseButtonRoundedProps } from "./CloseButtonRounded.cjs";
12
12
  import { CloseButtonAbsolute, PopoverCloseButtonProps } from "./CloseButtonAbsolute.cjs";
13
- import { ColorPickerBaseProps } from "./ColorPickerBase/types.cjs";
13
+ import { ColorPickerBaseProps, PresetColor } from "./ColorPickerBase/types.cjs";
14
14
  import { ColorPickerBase } from "./ColorPickerBase/ColorPickerBase.cjs";
15
15
  import { ColorPicker, ColorPickerProps } from "./ColorPicker/ColorPicker.cjs";
16
+ import { BaseColorSelectProps, ColorSelect, ColorSelectOption } from "./ColorSelect.cjs";
16
17
  import { Combobox } from "./Combobox.cjs";
17
18
  import { ConfirmationDialogProps } from "./confirmation-dialog/ConfirmationDialog.cjs";
18
19
  import { showConfirmDialog } from "./confirmation-dialog/confirmation-dialogs.cjs";
@@ -24,6 +25,8 @@ import { FileUploadInlineBaseProps, FileUploadInlineProps } from "./file-upload-
24
25
  import { FileUploadInline } from "./file-upload-inline/FileUploadInline.cjs";
25
26
  import "./file-upload-inline/index.cjs";
26
27
  import { useMediaQuery } from "./hooks/use-media-query.cjs";
28
+ import { useSelectKeyboard } from "./hooks/use-select-keyboard.cjs";
29
+ import "./hooks/index.cjs";
27
30
  import { IconProvider, IconProviderLoader, IconProviderProps } from "./icon-selector/types.cjs";
28
31
  import { IconPicker, IconPickerProps, IconPickerVariant } from "./icon-selector/IconPicker.cjs";
29
32
  import "./icon-selector/index.cjs";
@@ -59,4 +62,4 @@ import { ThemeToggle } from "./ThemeToggle.cjs";
59
62
  import { DEFAULT_ALERT_DURATION, ToastMessage, toast, toastError, toastInfo, toastSuccess, toastWarning } from "./toast/toast.cjs";
60
63
  import "./toast/index.cjs";
61
64
  import { cn } from "@pixpilot/shadcn";
62
- export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonLoaderProps, ButtonProps, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerBase, ColorPickerBaseProps, ColorPickerProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, DialogProvider, DialogProviderProps, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoaderProps, LoadingOverlay, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, PopoverCloseButtonProps, RichTextEditor, RichTextEditorProps, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputProps, ThemeProvider, ThemeProviderProps, ThemeToggle, ToastMessage, ToolbarOption, cn, showConfirmDialog, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useTabsContext, useTheme };
65
+ export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonLoaderProps, ButtonProps, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerBase, ColorPickerBaseProps, ColorPickerProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, DialogProvider, DialogProviderProps, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoaderProps, LoadingOverlay, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, PopoverCloseButtonProps, PresetColor, RichTextEditor, RichTextEditorProps, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputProps, ThemeProvider, ThemeProviderProps, ThemeToggle, ToastMessage, ToolbarOption, cn, showConfirmDialog, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
package/dist/index.d.ts CHANGED
@@ -10,11 +10,12 @@ import { CircleLoader, CircleLoaderProps } from "./circle-loader/circle-loader.j
10
10
  import "./circle-loader/index.js";
11
11
  import { CloseButtonRounded, CloseButtonRoundedProps } from "./CloseButtonRounded.js";
12
12
  import { CloseButtonAbsolute, PopoverCloseButtonProps } from "./CloseButtonAbsolute.js";
13
- import { ColorPickerBaseProps } from "./ColorPickerBase/types.js";
13
+ import { ColorPickerBaseProps, PresetColor } from "./ColorPickerBase/types.js";
14
14
  import { ColorPickerBase } from "./ColorPickerBase/ColorPickerBase.js";
15
15
  import "./ColorPickerBase/index.js";
16
16
  import { ColorPicker, ColorPickerProps } from "./ColorPicker/ColorPicker.js";
17
17
  import "./ColorPicker/index.js";
18
+ import { BaseColorSelectProps, ColorSelect, ColorSelectOption } from "./ColorSelect.js";
18
19
  import { Combobox } from "./Combobox.js";
19
20
  import { ConfirmationDialogProps } from "./confirmation-dialog/ConfirmationDialog.js";
20
21
  import { showConfirmDialog } from "./confirmation-dialog/confirmation-dialogs.js";
@@ -26,6 +27,7 @@ import { FileUploadInlineBaseProps, FileUploadInlineProps } from "./file-upload-
26
27
  import { FileUploadInline } from "./file-upload-inline/FileUploadInline.js";
27
28
  import "./file-upload-inline/index.js";
28
29
  import { useMediaQuery } from "./hooks/use-media-query.js";
30
+ import { useSelectKeyboard } from "./hooks/use-select-keyboard.js";
29
31
  import "./hooks/index.js";
30
32
  import { IconProvider, IconProviderLoader, IconProviderProps } from "./icon-selector/types.js";
31
33
  import { IconPicker, IconPickerProps, IconPickerVariant } from "./icon-selector/IconPicker.js";
@@ -62,4 +64,4 @@ import { ThemeToggle } from "./ThemeToggle.js";
62
64
  import { DEFAULT_ALERT_DURATION, ToastMessage, toast, toastError, toastInfo, toastSuccess, toastWarning } from "./toast/toast.js";
63
65
  import "./toast/index.js";
64
66
  import { cn } from "@pixpilot/shadcn";
65
- export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonLoaderProps, ButtonProps, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerBase, ColorPickerBaseProps, ColorPickerProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, DialogProvider, DialogProviderProps, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoaderProps, LoadingOverlay, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, PopoverCloseButtonProps, RichTextEditor, RichTextEditorProps, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputProps, ThemeProvider, ThemeProviderProps, ThemeToggle, ToastMessage, ToolbarOption, cn, showConfirmDialog, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useTabsContext, useTheme };
67
+ export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonLoaderProps, ButtonProps, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerBase, ColorPickerBaseProps, ColorPickerProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, DialogProvider, DialogProviderProps, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoaderProps, LoadingOverlay, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, PopoverCloseButtonProps, PresetColor, RichTextEditor, RichTextEditorProps, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputProps, ThemeProvider, ThemeProviderProps, ThemeToggle, ToastMessage, ToolbarOption, cn, showConfirmDialog, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
package/dist/index.js CHANGED
@@ -13,6 +13,8 @@ import { ColorPickerBase } from "./ColorPickerBase/ColorPickerBase.js";
13
13
  import "./ColorPickerBase/index.js";
14
14
  import { ColorPicker } from "./ColorPicker/ColorPicker.js";
15
15
  import "./ColorPicker/index.js";
16
+ import { useSelectKeyboard } from "./hooks/use-select-keyboard.js";
17
+ import { ColorSelect } from "./ColorSelect.js";
16
18
  import { Combobox } from "./Combobox.js";
17
19
  import { showConfirmDialog } from "./confirmation-dialog/confirmation-dialogs.js";
18
20
  import { DialogProvider } from "./confirmation-dialog/DialogProvider.js";
@@ -57,4 +59,4 @@ import { DEFAULT_ALERT_DURATION, toast, toastError, toastInfo, toastSuccess, toa
57
59
  import "./toast/index.js";
58
60
  import { cn } from "@pixpilot/shadcn";
59
61
 
60
- export { AbsoluteFill, Alert, AvatarUpload, Button, CircleLoader, CloseButtonAbsolute, CloseButtonRounded, ColorPicker, ColorPickerBase, Combobox, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DialogProvider, FileUpload, FileUploadInline, IconPicker, Input, Layout, LayoutFooter, LayoutHeader, LayoutMain, LoadingOverlay, Pagination, RichTextEditor, ScaledPreview, Select, Slider, SliderInput, SliderSelect, Tabs, TabsContent, TabsContext, TabsList, TabsTrigger, TagsInput, ThemeProvider, ThemeToggle, cn, showConfirmDialog, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useTabsContext, useTheme };
62
+ export { AbsoluteFill, Alert, AvatarUpload, Button, CircleLoader, CloseButtonAbsolute, CloseButtonRounded, ColorPicker, ColorPickerBase, ColorSelect, Combobox, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DialogProvider, FileUpload, FileUploadInline, IconPicker, Input, Layout, LayoutFooter, LayoutHeader, LayoutMain, LoadingOverlay, Pagination, RichTextEditor, ScaledPreview, Select, Slider, SliderInput, SliderSelect, Tabs, TabsContent, TabsContext, TabsList, TabsTrigger, TagsInput, ThemeProvider, ThemeToggle, cn, showConfirmDialog, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime8 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime7 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_runtime8.JSX.Element;
13
+ declare function Input(props: InputProps$1): react_jsx_runtime7.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_runtime7 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_runtime7.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 };
@@ -1,5 +1,5 @@
1
1
  import { CommandOptionListItem } from "./CommandOptionList.cjs";
2
- import * as react_jsx_runtime4 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/tags-input.d.ts
5
5
  interface TagsInputProps {
@@ -55,6 +55,6 @@ declare function TagsInput({
55
55
  addOnPaste,
56
56
  addOnTab,
57
57
  onValidate
58
- }: TagsInputProps): react_jsx_runtime4.JSX.Element;
58
+ }: TagsInputProps): react_jsx_runtime5.JSX.Element;
59
59
  //#endregion
60
60
  export { TagsInput, TagsInputProps };
@@ -1,5 +1,5 @@
1
1
  import { CommandOptionListItem } from "./CommandOptionList.js";
2
- import * as react_jsx_runtime4 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/tags-input.d.ts
5
5
  interface TagsInputProps {
@@ -55,6 +55,6 @@ declare function TagsInput({
55
55
  addOnPaste,
56
56
  addOnTab,
57
57
  onValidate
58
- }: TagsInputProps): react_jsx_runtime4.JSX.Element;
58
+ }: TagsInputProps): react_jsx_runtime5.JSX.Element;
59
59
  //#endregion
60
60
  export { TagsInput, TagsInputProps };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/shadcn-ui",
3
3
  "type": "module",
4
- "version": "0.19.0",
4
+ "version": "0.21.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",