@pixpilot/shadcn-ui 1.18.2 → 1.19.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.
- package/dist/Button.d.cts +2 -2
- package/dist/ButtonExtended.d.cts +2 -2
- package/dist/ColorPicker/ColorPicker.cjs +9 -3
- package/dist/ColorPicker/ColorPicker.d.cts +2 -2
- package/dist/ColorPicker/ColorPicker.d.ts +2 -2
- package/dist/ColorPicker/ColorPicker.js +9 -3
- package/dist/ColorPickerBase/ColorPickerButton.cjs +21 -6
- package/dist/ColorPickerBase/ColorPickerButton.d.cts +2 -0
- package/dist/ColorPickerBase/ColorPickerButton.d.ts +2 -0
- package/dist/ColorPickerBase/ColorPickerButton.js +21 -6
- package/dist/ColorPickerBase/ColorPickerInput.cjs +68 -26
- package/dist/ColorPickerBase/ColorPickerInput.d.cts +9 -4
- package/dist/ColorPickerBase/ColorPickerInput.d.ts +9 -4
- package/dist/ColorPickerBase/ColorPickerInput.js +68 -27
- package/dist/ColorPickerBase/ColorPickerSwatch.cjs +1 -1
- package/dist/ColorPickerBase/ColorPickerSwatch.js +1 -1
- package/dist/ColorPickerBase/hooks/use-color-picker-reset-options.cjs +34 -0
- package/dist/ColorPickerBase/hooks/use-color-picker-reset-options.js +31 -0
- package/dist/ColorPickerBase/index.d.cts +1 -1
- package/dist/ColorPickerBase/index.d.ts +1 -1
- package/dist/ColorPickerBase/types.d.cts +8 -1
- package/dist/ColorPickerBase/types.d.ts +8 -1
- package/dist/Rating.d.cts +3 -3
- package/dist/Select.d.cts +2 -2
- package/dist/dialog/Dialog.d.cts +4 -4
- package/dist/file-upload/FileUpload.d.cts +2 -2
- package/dist/file-upload-inline/FileUploadInline.d.cts +2 -2
- package/dist/file-upload-inline/FileUploadInline.d.ts +2 -2
- package/dist/file-upload-root/FileUploadRoot.d.cts +2 -2
- package/dist/file-upload-root/FileUploadRoot.d.ts +2 -2
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/tags-input/TagsInput.d.ts +2 -2
- package/dist/tags-input/TagsInputInline.d.ts +2 -2
- package/dist/theme-toggle/ThemeModeDropdown.d.ts +2 -2
- package/dist/theme-toggle/ThemeModeSwitchInside.d.ts +2 -2
- package/dist/theme-toggle/ThemeModeSwitchOutside.d.ts +2 -2
- package/dist/theme-toggle/ThemeModeToggleButton.d.ts +2 -2
- package/package.json +4 -3
package/dist/Button.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
import { Button, Tooltip, TooltipContent, TooltipTrigger, buttonVariants } from "@pixpilot/shadcn";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
@@ -27,7 +27,7 @@ interface ButtonProps extends React.ComponentProps<typeof Button>, VariantProps<
|
|
|
27
27
|
}
|
|
28
28
|
declare function Button$1(props: ButtonProps & {
|
|
29
29
|
ref?: React.Ref<HTMLButtonElement>;
|
|
30
|
-
}):
|
|
30
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
31
31
|
declare namespace Button$1 {
|
|
32
32
|
var displayName: string;
|
|
33
33
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
2
|
import { Button, Tooltip, TooltipContent, TooltipTrigger, buttonVariants } from "@pixpilot/shadcn";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
@@ -50,7 +50,7 @@ interface ButtonExtendedProps extends React.ComponentProps<typeof Button>, Varia
|
|
|
50
50
|
}
|
|
51
51
|
declare function ButtonExtended(props: ButtonExtendedProps & {
|
|
52
52
|
ref?: React.Ref<HTMLButtonElement>;
|
|
53
|
-
}):
|
|
53
|
+
}): react_jsx_runtime1.JSX.Element;
|
|
54
54
|
declare namespace ButtonExtended {
|
|
55
55
|
var displayName: string;
|
|
56
56
|
}
|
|
@@ -11,11 +11,17 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
|
11
11
|
|
|
12
12
|
//#region src/ColorPicker/ColorPicker.tsx
|
|
13
13
|
const ColorPicker = (props) => {
|
|
14
|
-
const { variant = "input", formatDisplayValue,...rest } = props;
|
|
15
|
-
const Input = variant === "input" ? require_ColorPickerInput.ColorPickerInput : require_ColorPickerButton.ColorPickerButton;
|
|
14
|
+
const { variant = "input", formatDisplayValue, placeholder, resetOptions,...rest } = props;
|
|
16
15
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerBase.ColorPickerBase, {
|
|
17
16
|
...rest,
|
|
18
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
17
|
+
children: variant === "input" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerInput.ColorPickerInput, {
|
|
18
|
+
placeholder,
|
|
19
|
+
resetOptions
|
|
20
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerButton.ColorPickerButton, {
|
|
21
|
+
placeholder,
|
|
22
|
+
formatDisplayValue,
|
|
23
|
+
resetOptions
|
|
24
|
+
})
|
|
19
25
|
});
|
|
20
26
|
};
|
|
21
27
|
ColorPicker.displayName = "ColorPicker";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ColorPickerBaseProps } from "../ColorPickerBase/types.cjs";
|
|
2
|
-
import "../ColorPickerBase/index.cjs";
|
|
1
|
+
import { ColorPickerBaseProps, ColorPickerResetOptions } from "../ColorPickerBase/types.cjs";
|
|
3
2
|
|
|
4
3
|
//#region src/ColorPicker/ColorPicker.d.ts
|
|
5
4
|
interface ColorPickerProps extends Omit<ColorPickerBaseProps, 'children'> {
|
|
6
5
|
variant?: 'button' | 'input';
|
|
7
6
|
placeholder?: string;
|
|
8
7
|
formatDisplayValue?: (value: string) => React.ReactNode;
|
|
8
|
+
resetOptions?: ColorPickerResetOptions;
|
|
9
9
|
}
|
|
10
10
|
declare const ColorPicker: React.FC<ColorPickerProps>;
|
|
11
11
|
//#endregion
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ColorPickerBaseProps } from "../ColorPickerBase/types.js";
|
|
2
|
-
import "../ColorPickerBase/index.js";
|
|
1
|
+
import { ColorPickerBaseProps, ColorPickerResetOptions } from "../ColorPickerBase/types.js";
|
|
3
2
|
|
|
4
3
|
//#region src/ColorPicker/ColorPicker.d.ts
|
|
5
4
|
interface ColorPickerProps extends Omit<ColorPickerBaseProps, 'children'> {
|
|
6
5
|
variant?: 'button' | 'input';
|
|
7
6
|
placeholder?: string;
|
|
8
7
|
formatDisplayValue?: (value: string) => React.ReactNode;
|
|
8
|
+
resetOptions?: ColorPickerResetOptions;
|
|
9
9
|
}
|
|
10
10
|
declare const ColorPicker: React.FC<ColorPickerProps>;
|
|
11
11
|
//#endregion
|
|
@@ -9,11 +9,17 @@ import { jsx } from "react/jsx-runtime";
|
|
|
9
9
|
|
|
10
10
|
//#region src/ColorPicker/ColorPicker.tsx
|
|
11
11
|
const ColorPicker = (props) => {
|
|
12
|
-
const { variant = "input", formatDisplayValue,...rest } = props;
|
|
13
|
-
const Input = variant === "input" ? ColorPickerInput : ColorPickerButton;
|
|
12
|
+
const { variant = "input", formatDisplayValue, placeholder, resetOptions,...rest } = props;
|
|
14
13
|
return /* @__PURE__ */ jsx(ColorPickerBase, {
|
|
15
14
|
...rest,
|
|
16
|
-
children: /* @__PURE__ */ jsx(
|
|
15
|
+
children: variant === "input" ? /* @__PURE__ */ jsx(ColorPickerInput, {
|
|
16
|
+
placeholder,
|
|
17
|
+
resetOptions
|
|
18
|
+
}) : /* @__PURE__ */ jsx(ColorPickerButton, {
|
|
19
|
+
placeholder,
|
|
20
|
+
formatDisplayValue,
|
|
21
|
+
resetOptions
|
|
22
|
+
})
|
|
17
23
|
});
|
|
18
24
|
};
|
|
19
25
|
ColorPicker.displayName = "ColorPicker";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_color_picker_context = require('./color-picker-context.cjs');
|
|
3
3
|
const require_ColorPickerSwatch = require('./ColorPickerSwatch.cjs');
|
|
4
|
+
const require_use_color_picker_reset_options = require('./hooks/use-color-picker-reset-options.cjs');
|
|
4
5
|
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
5
6
|
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
6
7
|
let lucide_react = require("lucide-react");
|
|
@@ -12,27 +13,35 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
|
12
13
|
|
|
13
14
|
//#region src/ColorPickerBase/ColorPickerButton.tsx
|
|
14
15
|
const ColorPickerButton = (props) => {
|
|
15
|
-
const { slots, formatDisplayValue, placeholder = "Pick a color", onClear,...rest } = props;
|
|
16
|
-
const { isPickerOpen,
|
|
16
|
+
const { slots, formatDisplayValue, placeholder = "Pick a color", onClear, resetOptions, title,...rest } = props;
|
|
17
|
+
const { isPickerOpen, onValueChange } = require_color_picker_context.useColorPickerContext();
|
|
18
|
+
const { value, isResettable, isResetValue, resetLabel, resetTooltip, resetIcon, handleClear, showClearButton } = require_use_color_picker_reset_options.useColorPickerResetOptions({
|
|
19
|
+
resetOptions,
|
|
20
|
+
onClear
|
|
21
|
+
});
|
|
17
22
|
if (process.env.NODE_ENV !== "production") {
|
|
18
23
|
if (onValueChange === void 0) throw new Error("ColorPickerButton must be used within a ColorPickerRoot component");
|
|
19
24
|
}
|
|
20
25
|
const renderDisplayValue = () => {
|
|
26
|
+
if (isResetValue) return resetLabel;
|
|
21
27
|
if (value == null || value === "") return placeholder;
|
|
22
28
|
return formatDisplayValue != null ? formatDisplayValue(value) : value;
|
|
23
29
|
};
|
|
24
|
-
const currentcolor = value != null && value !== "" ? value : void 0;
|
|
30
|
+
const currentcolor = !isResetValue && value != null && value !== "" ? value : void 0;
|
|
31
|
+
const swatchChildren = isResetValue ? resetIcon ?? slots?.swatch?.children : void 0;
|
|
25
32
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerTrigger, {
|
|
26
33
|
asChild: true,
|
|
27
34
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.InputGroup, {
|
|
28
35
|
...rest,
|
|
36
|
+
title: isResettable ? resetTooltip : title,
|
|
29
37
|
className: (0, __pixpilot_shadcn.cn)("dark:hover:bg-input/50 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer", rest.className),
|
|
30
38
|
children: [
|
|
31
39
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.InputGroupAddon, {
|
|
32
40
|
align: "inline-start",
|
|
33
41
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerSwatch.ColorPickerSwatch, {
|
|
34
42
|
color: currentcolor,
|
|
35
|
-
...slots?.swatch
|
|
43
|
+
...slots?.swatch,
|
|
44
|
+
children: swatchChildren
|
|
36
45
|
})
|
|
37
46
|
}),
|
|
38
47
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -42,19 +51,25 @@ const ColorPickerButton = (props) => {
|
|
|
42
51
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.InputGroupAddon, {
|
|
43
52
|
align: "inline-end",
|
|
44
53
|
className: "gap-1",
|
|
45
|
-
children: [
|
|
54
|
+
children: [showClearButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
|
|
46
55
|
type: "button",
|
|
47
56
|
variant: "ghost",
|
|
48
57
|
size: "icon",
|
|
49
58
|
"aria-label": "Clear color",
|
|
50
59
|
...slots?.clearButton,
|
|
51
60
|
className: (0, __pixpilot_shadcn.cn)("size-6 shrink-0 rounded-full", slots?.clearButton?.className),
|
|
61
|
+
onPointerDown: (e) => {
|
|
62
|
+
slots?.clearButton?.onPointerDown?.(e);
|
|
63
|
+
if (e.defaultPrevented) return;
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
e.stopPropagation();
|
|
66
|
+
},
|
|
52
67
|
onClick: (e) => {
|
|
53
68
|
slots?.clearButton?.onClick?.(e);
|
|
54
69
|
if (e.defaultPrevented) return;
|
|
55
70
|
e.preventDefault();
|
|
56
71
|
e.stopPropagation();
|
|
57
|
-
|
|
72
|
+
handleClear?.();
|
|
58
73
|
},
|
|
59
74
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, { className: "size-4 opacity-50" })
|
|
60
75
|
}), isPickerOpen ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronUpIcon, { className: "size-4 opacity-50" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDownIcon, { className: "size-4 opacity-50" })]
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ColorPickerResetOptions } from "./types.cjs";
|
|
1
2
|
import { ColorPickerSwatch as ColorPickerSwatch$1 } from "./ColorPickerSwatch.cjs";
|
|
2
3
|
import { Button } from "@pixpilot/shadcn";
|
|
3
4
|
import React from "react";
|
|
@@ -7,6 +8,7 @@ interface ColorPickerButtonProps extends Omit<React.ComponentPropsWithoutRef<'di
|
|
|
7
8
|
formatDisplayValue?: (value: string) => React.ReactNode;
|
|
8
9
|
placeholder?: string;
|
|
9
10
|
onClear?: () => void;
|
|
11
|
+
resetOptions?: ColorPickerResetOptions;
|
|
10
12
|
slots?: {
|
|
11
13
|
swatch?: React.ComponentProps<typeof ColorPickerSwatch$1>;
|
|
12
14
|
clearButton?: React.ComponentProps<typeof Button>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ColorPickerResetOptions } from "./types.js";
|
|
1
2
|
import { ColorPickerSwatch as ColorPickerSwatch$1 } from "./ColorPickerSwatch.js";
|
|
2
3
|
import { Button } from "@pixpilot/shadcn";
|
|
3
4
|
import React from "react";
|
|
@@ -7,6 +8,7 @@ interface ColorPickerButtonProps extends Omit<React.ComponentPropsWithoutRef<'di
|
|
|
7
8
|
formatDisplayValue?: (value: string) => React.ReactNode;
|
|
8
9
|
placeholder?: string;
|
|
9
10
|
onClear?: () => void;
|
|
11
|
+
resetOptions?: ColorPickerResetOptions;
|
|
10
12
|
slots?: {
|
|
11
13
|
swatch?: React.ComponentProps<typeof ColorPickerSwatch$1>;
|
|
12
14
|
clearButton?: React.ComponentProps<typeof Button>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useColorPickerContext } from "./color-picker-context.js";
|
|
2
2
|
import { ColorPickerSwatch as ColorPickerSwatch$1 } from "./ColorPickerSwatch.js";
|
|
3
|
+
import { useColorPickerResetOptions } from "./hooks/use-color-picker-reset-options.js";
|
|
3
4
|
import { Button, ColorPickerTrigger, InputGroup, InputGroupAddon, cn } from "@pixpilot/shadcn";
|
|
4
5
|
import { ChevronDownIcon, ChevronUpIcon, XIcon } from "lucide-react";
|
|
5
6
|
import React from "react";
|
|
@@ -7,25 +8,33 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
8
|
|
|
8
9
|
//#region src/ColorPickerBase/ColorPickerButton.tsx
|
|
9
10
|
const ColorPickerButton = (props) => {
|
|
10
|
-
const { slots, formatDisplayValue, placeholder = "Pick a color", onClear,...rest } = props;
|
|
11
|
-
const { isPickerOpen,
|
|
11
|
+
const { slots, formatDisplayValue, placeholder = "Pick a color", onClear, resetOptions, title,...rest } = props;
|
|
12
|
+
const { isPickerOpen, onValueChange } = useColorPickerContext();
|
|
13
|
+
const { value, isResettable, isResetValue, resetLabel, resetTooltip, resetIcon, handleClear, showClearButton } = useColorPickerResetOptions({
|
|
14
|
+
resetOptions,
|
|
15
|
+
onClear
|
|
16
|
+
});
|
|
12
17
|
if (onValueChange === void 0) throw new Error("ColorPickerButton must be used within a ColorPickerRoot component");
|
|
13
18
|
const renderDisplayValue = () => {
|
|
19
|
+
if (isResetValue) return resetLabel;
|
|
14
20
|
if (value == null || value === "") return placeholder;
|
|
15
21
|
return formatDisplayValue != null ? formatDisplayValue(value) : value;
|
|
16
22
|
};
|
|
17
|
-
const currentcolor = value != null && value !== "" ? value : void 0;
|
|
23
|
+
const currentcolor = !isResetValue && value != null && value !== "" ? value : void 0;
|
|
24
|
+
const swatchChildren = isResetValue ? resetIcon ?? slots?.swatch?.children : void 0;
|
|
18
25
|
return /* @__PURE__ */ jsx(ColorPickerTrigger, {
|
|
19
26
|
asChild: true,
|
|
20
27
|
children: /* @__PURE__ */ jsxs(InputGroup, {
|
|
21
28
|
...rest,
|
|
29
|
+
title: isResettable ? resetTooltip : title,
|
|
22
30
|
className: cn("dark:hover:bg-input/50 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer", rest.className),
|
|
23
31
|
children: [
|
|
24
32
|
/* @__PURE__ */ jsx(InputGroupAddon, {
|
|
25
33
|
align: "inline-start",
|
|
26
34
|
children: /* @__PURE__ */ jsx(ColorPickerSwatch$1, {
|
|
27
35
|
color: currentcolor,
|
|
28
|
-
...slots?.swatch
|
|
36
|
+
...slots?.swatch,
|
|
37
|
+
children: swatchChildren
|
|
29
38
|
})
|
|
30
39
|
}),
|
|
31
40
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -35,19 +44,25 @@ const ColorPickerButton = (props) => {
|
|
|
35
44
|
/* @__PURE__ */ jsxs(InputGroupAddon, {
|
|
36
45
|
align: "inline-end",
|
|
37
46
|
className: "gap-1",
|
|
38
|
-
children: [
|
|
47
|
+
children: [showClearButton && /* @__PURE__ */ jsx(Button, {
|
|
39
48
|
type: "button",
|
|
40
49
|
variant: "ghost",
|
|
41
50
|
size: "icon",
|
|
42
51
|
"aria-label": "Clear color",
|
|
43
52
|
...slots?.clearButton,
|
|
44
53
|
className: cn("size-6 shrink-0 rounded-full", slots?.clearButton?.className),
|
|
54
|
+
onPointerDown: (e) => {
|
|
55
|
+
slots?.clearButton?.onPointerDown?.(e);
|
|
56
|
+
if (e.defaultPrevented) return;
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
e.stopPropagation();
|
|
59
|
+
},
|
|
45
60
|
onClick: (e) => {
|
|
46
61
|
slots?.clearButton?.onClick?.(e);
|
|
47
62
|
if (e.defaultPrevented) return;
|
|
48
63
|
e.preventDefault();
|
|
49
64
|
e.stopPropagation();
|
|
50
|
-
|
|
65
|
+
handleClear?.();
|
|
51
66
|
},
|
|
52
67
|
children: /* @__PURE__ */ jsx(XIcon, { className: "size-4 opacity-50" })
|
|
53
68
|
}), isPickerOpen ? /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4 opacity-50" }) : /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" })]
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_color_picker_context = require('./color-picker-context.cjs');
|
|
3
3
|
const require_ColorPickerSwatch = require('./ColorPickerSwatch.cjs');
|
|
4
|
+
const require_use_color_picker_reset_options = require('./hooks/use-color-picker-reset-options.cjs');
|
|
4
5
|
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
5
6
|
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
7
|
+
let lucide_react = require("lucide-react");
|
|
8
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
6
9
|
let react = require("react");
|
|
7
10
|
react = require_rolldown_runtime.__toESM(react);
|
|
8
11
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -10,39 +13,78 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
|
10
13
|
|
|
11
14
|
//#region src/ColorPickerBase/ColorPickerInput.tsx
|
|
12
15
|
const ColorPickerInput = (props) => {
|
|
13
|
-
const { slots, onChange,...rest } = props;
|
|
14
|
-
const { isPickerOpen,
|
|
16
|
+
const { slots, onChange, onClear, resetOptions, placeholder, title,...rest } = props;
|
|
17
|
+
const { isPickerOpen, onValueChange } = require_color_picker_context.useColorPickerContext();
|
|
18
|
+
const { value, isResettable, isResetValue, resetLabel, resetTooltip, resetIcon, handleClear, showClearButton } = require_use_color_picker_reset_options.useColorPickerResetOptions({
|
|
19
|
+
resetOptions,
|
|
20
|
+
onClear
|
|
21
|
+
});
|
|
15
22
|
if (process.env.NODE_ENV !== "production") {
|
|
16
23
|
if (onValueChange === void 0) throw new Error("ColorPickerInput must be used within a ColorPickerRoot component");
|
|
17
24
|
}
|
|
25
|
+
const currentcolor = !isResetValue && value != null && value !== "" ? value : void 0;
|
|
26
|
+
const inputValue = isResetValue ? "" : value ?? "";
|
|
27
|
+
const inputPlaceholder = isResetValue ? resetLabel : placeholder;
|
|
28
|
+
const swatchChildren = isResetValue ? resetIcon ?? slots?.swatch?.children : void 0;
|
|
18
29
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerTrigger, {
|
|
19
30
|
asChild: true,
|
|
20
31
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.InputGroup, {
|
|
21
32
|
className: "w-full",
|
|
22
|
-
children: [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.InputGroupAddon, {
|
|
35
|
+
align: "inline-start",
|
|
36
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerSwatch.ColorPickerSwatch, {
|
|
37
|
+
color: currentcolor,
|
|
38
|
+
...slots?.swatch,
|
|
39
|
+
children: swatchChildren
|
|
40
|
+
})
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.InputGroupInput, {
|
|
43
|
+
value: inputValue,
|
|
44
|
+
...rest,
|
|
45
|
+
title: isResettable ? resetTooltip : title,
|
|
46
|
+
placeholder: inputPlaceholder,
|
|
47
|
+
onPointerDown: (e) => {
|
|
48
|
+
rest.onPointerDown?.(e);
|
|
49
|
+
if (isPickerOpen) return;
|
|
50
|
+
e.stopPropagation();
|
|
51
|
+
},
|
|
52
|
+
onClick: (e) => {
|
|
53
|
+
rest.onClick?.(e);
|
|
54
|
+
if (isPickerOpen) return;
|
|
55
|
+
e.stopPropagation();
|
|
56
|
+
},
|
|
57
|
+
onChange: (e) => {
|
|
58
|
+
onValueChange(e.target.value);
|
|
59
|
+
onChange?.(e);
|
|
60
|
+
}
|
|
61
|
+
}),
|
|
62
|
+
showClearButton ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.InputGroupAddon, {
|
|
63
|
+
align: "inline-end",
|
|
64
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
|
|
65
|
+
type: "button",
|
|
66
|
+
variant: "ghost",
|
|
67
|
+
size: "icon",
|
|
68
|
+
"aria-label": "Clear color",
|
|
69
|
+
...slots?.clearButton,
|
|
70
|
+
className: (0, __pixpilot_shadcn.cn)("size-6 shrink-0 rounded-full", slots?.clearButton?.className),
|
|
71
|
+
onPointerDown: (e) => {
|
|
72
|
+
slots?.clearButton?.onPointerDown?.(e);
|
|
73
|
+
if (e.defaultPrevented) return;
|
|
74
|
+
e.preventDefault();
|
|
75
|
+
e.stopPropagation();
|
|
76
|
+
},
|
|
77
|
+
onClick: (e) => {
|
|
78
|
+
slots?.clearButton?.onClick?.(e);
|
|
79
|
+
if (e.defaultPrevented) return;
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
e.stopPropagation();
|
|
82
|
+
handleClear?.();
|
|
83
|
+
},
|
|
84
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, { className: "size-4 opacity-50" })
|
|
85
|
+
})
|
|
86
|
+
}) : null
|
|
87
|
+
]
|
|
46
88
|
})
|
|
47
89
|
});
|
|
48
90
|
};
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColorPickerResetOptions } from "./types.cjs";
|
|
2
|
+
import { ColorPickerSwatch as ColorPickerSwatch$1 } from "./ColorPickerSwatch.cjs";
|
|
3
|
+
import { Button } from "@pixpilot/shadcn";
|
|
2
4
|
import React from "react";
|
|
3
5
|
|
|
4
6
|
//#region src/ColorPickerBase/ColorPickerInput.d.ts
|
|
5
7
|
interface ColorPickerInputProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'value'> {
|
|
8
|
+
onClear?: () => void;
|
|
9
|
+
resetOptions?: ColorPickerResetOptions;
|
|
6
10
|
slots?: {
|
|
7
|
-
swatch
|
|
11
|
+
swatch?: React.ComponentProps<typeof ColorPickerSwatch$1>;
|
|
12
|
+
clearButton?: React.ComponentProps<typeof Button>;
|
|
8
13
|
};
|
|
9
14
|
}
|
|
10
|
-
declare const ColorPickerInput: React.FC<ColorPickerInputProps>;
|
|
15
|
+
declare const ColorPickerInput$1: React.FC<ColorPickerInputProps>;
|
|
11
16
|
//#endregion
|
|
12
|
-
export { ColorPickerInput, ColorPickerInputProps };
|
|
17
|
+
export { ColorPickerInput$1 as ColorPickerInput, ColorPickerInputProps };
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColorPickerResetOptions } from "./types.js";
|
|
2
|
+
import { ColorPickerSwatch as ColorPickerSwatch$1 } from "./ColorPickerSwatch.js";
|
|
3
|
+
import { Button } from "@pixpilot/shadcn";
|
|
2
4
|
import React from "react";
|
|
3
5
|
|
|
4
6
|
//#region src/ColorPickerBase/ColorPickerInput.d.ts
|
|
5
7
|
interface ColorPickerInputProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'value'> {
|
|
8
|
+
onClear?: () => void;
|
|
9
|
+
resetOptions?: ColorPickerResetOptions;
|
|
6
10
|
slots?: {
|
|
7
|
-
swatch
|
|
11
|
+
swatch?: React.ComponentProps<typeof ColorPickerSwatch$1>;
|
|
12
|
+
clearButton?: React.ComponentProps<typeof Button>;
|
|
8
13
|
};
|
|
9
14
|
}
|
|
10
|
-
declare const ColorPickerInput: React.FC<ColorPickerInputProps>;
|
|
15
|
+
declare const ColorPickerInput$1: React.FC<ColorPickerInputProps>;
|
|
11
16
|
//#endregion
|
|
12
|
-
export { ColorPickerInput, ColorPickerInputProps };
|
|
17
|
+
export { ColorPickerInput$1 as ColorPickerInput, ColorPickerInputProps };
|
|
@@ -1,42 +1,83 @@
|
|
|
1
1
|
import { useColorPickerContext } from "./color-picker-context.js";
|
|
2
2
|
import { ColorPickerSwatch as ColorPickerSwatch$1 } from "./ColorPickerSwatch.js";
|
|
3
|
-
import {
|
|
3
|
+
import { useColorPickerResetOptions } from "./hooks/use-color-picker-reset-options.js";
|
|
4
|
+
import { Button, ColorPickerTrigger, InputGroup, InputGroupAddon, InputGroupInput, cn } from "@pixpilot/shadcn";
|
|
5
|
+
import { XIcon } from "lucide-react";
|
|
4
6
|
import React from "react";
|
|
5
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
8
|
|
|
7
9
|
//#region src/ColorPickerBase/ColorPickerInput.tsx
|
|
8
10
|
const ColorPickerInput$1 = (props) => {
|
|
9
|
-
const { slots, onChange,...rest } = props;
|
|
10
|
-
const { isPickerOpen,
|
|
11
|
+
const { slots, onChange, onClear, resetOptions, placeholder, title,...rest } = props;
|
|
12
|
+
const { isPickerOpen, onValueChange } = useColorPickerContext();
|
|
13
|
+
const { value, isResettable, isResetValue, resetLabel, resetTooltip, resetIcon, handleClear, showClearButton } = useColorPickerResetOptions({
|
|
14
|
+
resetOptions,
|
|
15
|
+
onClear
|
|
16
|
+
});
|
|
11
17
|
if (onValueChange === void 0) throw new Error("ColorPickerInput must be used within a ColorPickerRoot component");
|
|
18
|
+
const currentcolor = !isResetValue && value != null && value !== "" ? value : void 0;
|
|
19
|
+
const inputValue = isResetValue ? "" : value ?? "";
|
|
20
|
+
const inputPlaceholder = isResetValue ? resetLabel : placeholder;
|
|
21
|
+
const swatchChildren = isResetValue ? resetIcon ?? slots?.swatch?.children : void 0;
|
|
12
22
|
return /* @__PURE__ */ jsx(ColorPickerTrigger, {
|
|
13
23
|
asChild: true,
|
|
14
24
|
children: /* @__PURE__ */ jsxs(InputGroup, {
|
|
15
25
|
className: "w-full",
|
|
16
|
-
children: [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsx(InputGroupAddon, {
|
|
28
|
+
align: "inline-start",
|
|
29
|
+
children: /* @__PURE__ */ jsx(ColorPickerSwatch$1, {
|
|
30
|
+
color: currentcolor,
|
|
31
|
+
...slots?.swatch,
|
|
32
|
+
children: swatchChildren
|
|
33
|
+
})
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ jsx(InputGroupInput, {
|
|
36
|
+
value: inputValue,
|
|
37
|
+
...rest,
|
|
38
|
+
title: isResettable ? resetTooltip : title,
|
|
39
|
+
placeholder: inputPlaceholder,
|
|
40
|
+
onPointerDown: (e) => {
|
|
41
|
+
rest.onPointerDown?.(e);
|
|
42
|
+
if (isPickerOpen) return;
|
|
43
|
+
e.stopPropagation();
|
|
44
|
+
},
|
|
45
|
+
onClick: (e) => {
|
|
46
|
+
rest.onClick?.(e);
|
|
47
|
+
if (isPickerOpen) return;
|
|
48
|
+
e.stopPropagation();
|
|
49
|
+
},
|
|
50
|
+
onChange: (e) => {
|
|
51
|
+
onValueChange(e.target.value);
|
|
52
|
+
onChange?.(e);
|
|
53
|
+
}
|
|
54
|
+
}),
|
|
55
|
+
showClearButton ? /* @__PURE__ */ jsx(InputGroupAddon, {
|
|
56
|
+
align: "inline-end",
|
|
57
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
58
|
+
type: "button",
|
|
59
|
+
variant: "ghost",
|
|
60
|
+
size: "icon",
|
|
61
|
+
"aria-label": "Clear color",
|
|
62
|
+
...slots?.clearButton,
|
|
63
|
+
className: cn("size-6 shrink-0 rounded-full", slots?.clearButton?.className),
|
|
64
|
+
onPointerDown: (e) => {
|
|
65
|
+
slots?.clearButton?.onPointerDown?.(e);
|
|
66
|
+
if (e.defaultPrevented) return;
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
e.stopPropagation();
|
|
69
|
+
},
|
|
70
|
+
onClick: (e) => {
|
|
71
|
+
slots?.clearButton?.onClick?.(e);
|
|
72
|
+
if (e.defaultPrevented) return;
|
|
73
|
+
e.preventDefault();
|
|
74
|
+
e.stopPropagation();
|
|
75
|
+
handleClear?.();
|
|
76
|
+
},
|
|
77
|
+
children: /* @__PURE__ */ jsx(XIcon, { className: "size-4 opacity-50" })
|
|
78
|
+
})
|
|
79
|
+
}) : null
|
|
80
|
+
]
|
|
40
81
|
})
|
|
41
82
|
});
|
|
42
83
|
};
|
|
@@ -10,7 +10,7 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
|
10
10
|
const ColorPickerSwatch = (props) => {
|
|
11
11
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerSwatch, {
|
|
12
12
|
...props,
|
|
13
|
-
className: (0, __pixpilot_shadcn.cn)("rounded-sm w-6.5 h-6.5 p-0 -ml-1 cursor-pointer", props.className)
|
|
13
|
+
className: (0, __pixpilot_shadcn.cn)("rounded-sm w-6.5 h-6.5 p-0 -ml-1 cursor-pointer relative flex items-center justify-center", props.className)
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
ColorPickerSwatch.displayName = "ColorPickerSwatch";
|
|
@@ -6,7 +6,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
6
6
|
const ColorPickerSwatch$1 = (props) => {
|
|
7
7
|
return /* @__PURE__ */ jsx(ColorPickerSwatch, {
|
|
8
8
|
...props,
|
|
9
|
-
className: cn("rounded-sm w-6.5 h-6.5 p-0 -ml-1 cursor-pointer", props.className)
|
|
9
|
+
className: cn("rounded-sm w-6.5 h-6.5 p-0 -ml-1 cursor-pointer relative flex items-center justify-center", props.className)
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
12
|
ColorPickerSwatch$1.displayName = "ColorPickerSwatch";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_color_picker_context = require('../color-picker-context.cjs');
|
|
3
|
+
let react = require("react");
|
|
4
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
5
|
+
let __pixpilot_string = require("@pixpilot/string");
|
|
6
|
+
__pixpilot_string = require_rolldown_runtime.__toESM(__pixpilot_string);
|
|
7
|
+
|
|
8
|
+
//#region src/ColorPickerBase/hooks/use-color-picker-reset-options.ts
|
|
9
|
+
function useColorPickerResetOptions(params) {
|
|
10
|
+
const { resetOptions, onClear } = params;
|
|
11
|
+
const { value, onValueChange } = require_color_picker_context.useColorPickerContext();
|
|
12
|
+
const isResettable = resetOptions != null;
|
|
13
|
+
const isResetValue = value === resetOptions?.value;
|
|
14
|
+
const resetLabel = resetOptions?.label ?? (0, __pixpilot_string.capitalize)(resetOptions?.value ?? "");
|
|
15
|
+
const resetIcon = resetOptions?.icon;
|
|
16
|
+
const resetTooltip = resetOptions?.tooltip ?? (0, __pixpilot_string.capitalize)(resetLabel);
|
|
17
|
+
const handleReset = react.default.useCallback(() => {
|
|
18
|
+
if (resetOptions != null) onValueChange(resetOptions.value);
|
|
19
|
+
}, [onValueChange, resetOptions]);
|
|
20
|
+
const handleClear = onClear ?? (isResettable ? handleReset : void 0);
|
|
21
|
+
return {
|
|
22
|
+
value,
|
|
23
|
+
isResettable,
|
|
24
|
+
isResetValue,
|
|
25
|
+
resetLabel,
|
|
26
|
+
resetTooltip,
|
|
27
|
+
resetIcon,
|
|
28
|
+
handleClear,
|
|
29
|
+
showClearButton: handleClear != null && (onClear != null || isResetValue === false)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
exports.useColorPickerResetOptions = useColorPickerResetOptions;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useColorPickerContext } from "../color-picker-context.js";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { capitalize } from "@pixpilot/string";
|
|
4
|
+
|
|
5
|
+
//#region src/ColorPickerBase/hooks/use-color-picker-reset-options.ts
|
|
6
|
+
function useColorPickerResetOptions(params) {
|
|
7
|
+
const { resetOptions, onClear } = params;
|
|
8
|
+
const { value, onValueChange } = useColorPickerContext();
|
|
9
|
+
const isResettable = resetOptions != null;
|
|
10
|
+
const isResetValue = value === resetOptions?.value;
|
|
11
|
+
const resetLabel = resetOptions?.label ?? capitalize(resetOptions?.value ?? "");
|
|
12
|
+
const resetIcon = resetOptions?.icon;
|
|
13
|
+
const resetTooltip = resetOptions?.tooltip ?? capitalize(resetLabel);
|
|
14
|
+
const handleReset = React.useCallback(() => {
|
|
15
|
+
if (resetOptions != null) onValueChange(resetOptions.value);
|
|
16
|
+
}, [onValueChange, resetOptions]);
|
|
17
|
+
const handleClear = onClear ?? (isResettable ? handleReset : void 0);
|
|
18
|
+
return {
|
|
19
|
+
value,
|
|
20
|
+
isResettable,
|
|
21
|
+
isResetValue,
|
|
22
|
+
resetLabel,
|
|
23
|
+
resetTooltip,
|
|
24
|
+
resetIcon,
|
|
25
|
+
handleClear,
|
|
26
|
+
showClearButton: handleClear != null && (onClear != null || isResetValue === false)
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { useColorPickerResetOptions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerRootProps, PresetColor } from "./types.cjs";
|
|
1
|
+
import { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerContentProps, ColorPickerResetOptions, ColorPickerRootProps, PresetColor } from "./types.cjs";
|
|
2
2
|
import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./color-palette/ColorPalette.cjs";
|
|
3
3
|
import { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton, ColorPickerPaletteButtonProps } from "./color-palette/PaletteButton.cjs";
|
|
4
4
|
import { ColorPickerPaletteSwatch } from "./color-palette/PaletteSwatch.cjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerRootProps, PresetColor } from "./types.js";
|
|
1
|
+
import { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerContentProps, ColorPickerResetOptions, ColorPickerRootProps, PresetColor } from "./types.js";
|
|
2
2
|
import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./color-palette/ColorPalette.js";
|
|
3
3
|
import { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton, ColorPickerPaletteButtonProps } from "./color-palette/PaletteButton.js";
|
|
4
4
|
import { ColorPickerPaletteSwatch } from "./color-palette/PaletteSwatch.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ColorPickerContent, ColorPickerProps } from "@pixpilot/shadcn";
|
|
2
|
+
import { ReactNode } from "react";
|
|
2
3
|
|
|
3
4
|
//#region src/ColorPickerBase/types.d.ts
|
|
4
5
|
interface PresetColor {
|
|
@@ -35,5 +36,11 @@ interface ColorPickerBaseProps extends Omit<ColorPickerProps, 'onChange' | 'chil
|
|
|
35
36
|
isPickerOpen: boolean;
|
|
36
37
|
}) => React.ReactNode);
|
|
37
38
|
}
|
|
39
|
+
interface ColorPickerResetOptions {
|
|
40
|
+
value: string;
|
|
41
|
+
label?: string;
|
|
42
|
+
icon?: ReactNode;
|
|
43
|
+
tooltip?: string;
|
|
44
|
+
}
|
|
38
45
|
//#endregion
|
|
39
|
-
export { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerContentProps, ColorPickerContentWrapperProps, ColorPickerRootProps, PresetColor };
|
|
46
|
+
export { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerContentProps, ColorPickerContentWrapperProps, ColorPickerResetOptions, ColorPickerRootProps, PresetColor };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ColorPickerContent, ColorPickerProps } from "@pixpilot/shadcn";
|
|
2
|
+
import { ReactNode } from "react";
|
|
2
3
|
|
|
3
4
|
//#region src/ColorPickerBase/types.d.ts
|
|
4
5
|
interface PresetColor {
|
|
@@ -35,5 +36,11 @@ interface ColorPickerBaseProps extends Omit<ColorPickerProps, 'onChange' | 'chil
|
|
|
35
36
|
isPickerOpen: boolean;
|
|
36
37
|
}) => React.ReactNode);
|
|
37
38
|
}
|
|
39
|
+
interface ColorPickerResetOptions {
|
|
40
|
+
value: string;
|
|
41
|
+
label?: string;
|
|
42
|
+
icon?: ReactNode;
|
|
43
|
+
tooltip?: string;
|
|
44
|
+
}
|
|
38
45
|
//#endregion
|
|
39
|
-
export { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerContentProps, ColorPickerContentWrapperProps, ColorPickerRootProps, PresetColor };
|
|
46
|
+
export { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerContentProps, ColorPickerContentWrapperProps, ColorPickerResetOptions, ColorPickerRootProps, PresetColor };
|
package/dist/Rating.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
@@ -35,7 +35,7 @@ declare function RatingButton({
|
|
|
35
35
|
index,
|
|
36
36
|
className,
|
|
37
37
|
...props
|
|
38
|
-
}: RatingButtonProps):
|
|
38
|
+
}: RatingButtonProps): react_jsx_runtime5.JSX.Element;
|
|
39
39
|
declare function Rating({
|
|
40
40
|
value: valueProp,
|
|
41
41
|
defaultValue,
|
|
@@ -52,6 +52,6 @@ declare function Rating({
|
|
|
52
52
|
className,
|
|
53
53
|
children,
|
|
54
54
|
...props
|
|
55
|
-
}: React$1.PropsWithChildren<RatingProps>):
|
|
55
|
+
}: React$1.PropsWithChildren<RatingProps>): react_jsx_runtime5.JSX.Element;
|
|
56
56
|
//#endregion
|
|
57
57
|
export { Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps };
|
package/dist/Select.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
2
2
|
import { Select, SelectContent } from "@pixpilot/shadcn";
|
|
3
3
|
import React, { ComponentProps } from "react";
|
|
4
4
|
|
|
@@ -51,6 +51,6 @@ type BaseSelectProps = {
|
|
|
51
51
|
required?: boolean;
|
|
52
52
|
className?: string;
|
|
53
53
|
} & Omit<ComponentProps<typeof Select>, 'value' | 'onValueChange' | 'children' | 'disabled' | 'name' | 'required'>;
|
|
54
|
-
declare function Select$1(props: BaseSelectProps):
|
|
54
|
+
declare function Select$1(props: BaseSelectProps): react_jsx_runtime7.JSX.Element;
|
|
55
55
|
//#endregion
|
|
56
56
|
export { Select$1 as Select, SelectContentProps, SelectOption };
|
package/dist/dialog/Dialog.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
2
2
|
import { DialogContent } from "@pixpilot/shadcn";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
|
|
@@ -13,14 +13,14 @@ declare const DialogContent$1: React$1.ForwardRefExoticComponent<Omit<_radix_ui_
|
|
|
13
13
|
declare function DialogHeader({
|
|
14
14
|
className,
|
|
15
15
|
...props
|
|
16
|
-
}: React$1.HTMLAttributes<HTMLDivElement>):
|
|
16
|
+
}: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
|
|
17
17
|
declare function DialogBody({
|
|
18
18
|
className,
|
|
19
19
|
...props
|
|
20
|
-
}: React$1.HTMLAttributes<HTMLDivElement>):
|
|
20
|
+
}: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
|
|
21
21
|
declare function DialogFooter({
|
|
22
22
|
className,
|
|
23
23
|
...props
|
|
24
|
-
}: React$1.HTMLAttributes<HTMLDivElement>):
|
|
24
|
+
}: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { DialogBody, DialogContent$1 as DialogContent, DialogContentProps, DialogFooter, DialogHeader };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FileUploadProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
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):
|
|
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
|
|
2
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/file-upload-inline/FileUploadInline.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* FileUploadInline - An inline file upload component using FileUpload primitives
|
|
7
7
|
*/
|
|
8
|
-
declare function FileUploadInline(props: FileUploadInlineProps):
|
|
8
|
+
declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime12.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { FileUploadInline };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FileUploadInlineProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime13 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):
|
|
8
|
+
declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime13.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { FileUploadInline };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FileUploadRootProps } from "./types.cjs";
|
|
2
|
-
import * as
|
|
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):
|
|
8
|
+
declare function FileUploadRoot(props: FileUploadRootProps): react_jsx_runtime13.JSX.Element;
|
|
9
9
|
declare namespace FileUploadRoot {
|
|
10
10
|
var displayName: string;
|
|
11
11
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FileUploadRootProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/file-upload-root/FileUploadRoot.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* FileUploadInline - An inline file upload component using FileUpload primitives
|
|
7
7
|
*/
|
|
8
|
-
declare function FileUploadRoot(props: FileUploadRootProps):
|
|
8
|
+
declare function FileUploadRoot(props: FileUploadRootProps): react_jsx_runtime12.JSX.Element;
|
|
9
9
|
declare namespace FileUploadRoot {
|
|
10
10
|
var displayName: string;
|
|
11
11
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -13,7 +13,9 @@ import { CircleLoader, CircleLoaderProps } from "./circle-loader/circle-loader.c
|
|
|
13
13
|
import "./circle-loader/index.cjs";
|
|
14
14
|
import { CloseButtonRounded, CloseButtonRoundedProps } from "./CloseButtonRounded.cjs";
|
|
15
15
|
import { CloseButtonAbsolute, PopoverCloseButtonProps } from "./CloseButtonAbsolute.cjs";
|
|
16
|
-
import { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerRootProps, PresetColor } from "./ColorPickerBase/types.cjs";
|
|
16
|
+
import { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerContentProps, ColorPickerResetOptions, ColorPickerRootProps, PresetColor } from "./ColorPickerBase/types.cjs";
|
|
17
|
+
import { ColorPicker, ColorPickerProps } from "./ColorPicker/ColorPicker.cjs";
|
|
18
|
+
import "./ColorPicker/index.cjs";
|
|
17
19
|
import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./ColorPickerBase/color-palette/ColorPalette.cjs";
|
|
18
20
|
import { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton, ColorPickerPaletteButtonProps } from "./ColorPickerBase/color-palette/PaletteButton.cjs";
|
|
19
21
|
import { ColorPickerPaletteSwatch } from "./ColorPickerBase/color-palette/PaletteSwatch.cjs";
|
|
@@ -29,8 +31,6 @@ import { ColorPickerFullControls, ColorPickerFullControlsProps } from "./ColorPi
|
|
|
29
31
|
import { ColorPickerInput, ColorPickerInputProps } from "./ColorPickerBase/ColorPickerInput.cjs";
|
|
30
32
|
import { ColorPickerRoot } from "./ColorPickerBase/ColorPickerRoot.cjs";
|
|
31
33
|
import "./ColorPickerBase/index.cjs";
|
|
32
|
-
import { ColorPicker, ColorPickerProps } from "./ColorPicker/ColorPicker.cjs";
|
|
33
|
-
import "./ColorPicker/index.cjs";
|
|
34
34
|
import { BaseColorSelectProps, ColorSelect, ColorSelectOption } from "./ColorSelect.cjs";
|
|
35
35
|
import { Combobox } from "./Combobox.cjs";
|
|
36
36
|
import { ConfirmationDialogProps, ConfirmationDialogVariant } from "./confirmation-dialog/ConfirmationDialog.cjs";
|
|
@@ -101,4 +101,4 @@ import "./toast/index.cjs";
|
|
|
101
101
|
import { ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue } from "./ToggleGroup.cjs";
|
|
102
102
|
import { isSvgMarkupString, svgMarkupToMaskUrl } from "./utils/svg.cjs";
|
|
103
103
|
import { cn } from "@pixpilot/shadcn";
|
|
104
|
-
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, ConfirmationDialogVariant, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadCallbacks, 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, PopoverContentUnstyled, 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 };
|
|
104
|
+
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, ColorPickerContentProps, 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, ColorPickerResetOptions, ColorPickerRoot, ColorPickerRootProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ConfirmationDialogVariant, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadCallbacks, 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, PopoverContentUnstyled, 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 { CircleLoader, CircleLoaderProps } from "./circle-loader/circle-loader.j
|
|
|
13
13
|
import "./circle-loader/index.js";
|
|
14
14
|
import { CloseButtonRounded, CloseButtonRoundedProps } from "./CloseButtonRounded.js";
|
|
15
15
|
import { CloseButtonAbsolute, PopoverCloseButtonProps } from "./CloseButtonAbsolute.js";
|
|
16
|
-
import { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerRootProps, PresetColor } from "./ColorPickerBase/types.js";
|
|
16
|
+
import { ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerContentProps, ColorPickerResetOptions, ColorPickerRootProps, PresetColor } from "./ColorPickerBase/types.js";
|
|
17
|
+
import { ColorPicker, ColorPickerProps } from "./ColorPicker/ColorPicker.js";
|
|
18
|
+
import "./ColorPicker/index.js";
|
|
17
19
|
import { COMMON_COLORS, ColorPickerColorPalette, ColorPickerColorPaletteProps } from "./ColorPickerBase/color-palette/ColorPalette.js";
|
|
18
20
|
import { COLOR_PICKER_PALETTE_BUTTON_CLASSES, ColorPickerPaletteButton, ColorPickerPaletteButtonProps } from "./ColorPickerBase/color-palette/PaletteButton.js";
|
|
19
21
|
import { ColorPickerPaletteSwatch } from "./ColorPickerBase/color-palette/PaletteSwatch.js";
|
|
@@ -29,8 +31,6 @@ import { ColorPickerFullControls, ColorPickerFullControlsProps } from "./ColorPi
|
|
|
29
31
|
import { ColorPickerInput, ColorPickerInputProps } from "./ColorPickerBase/ColorPickerInput.js";
|
|
30
32
|
import { ColorPickerRoot } from "./ColorPickerBase/ColorPickerRoot.js";
|
|
31
33
|
import "./ColorPickerBase/index.js";
|
|
32
|
-
import { ColorPicker, ColorPickerProps } from "./ColorPicker/ColorPicker.js";
|
|
33
|
-
import "./ColorPicker/index.js";
|
|
34
34
|
import { BaseColorSelectProps, ColorSelect, ColorSelectOption } from "./ColorSelect.js";
|
|
35
35
|
import { Combobox } from "./Combobox.js";
|
|
36
36
|
import { ConfirmationDialogProps, ConfirmationDialogVariant } from "./confirmation-dialog/ConfirmationDialog.js";
|
|
@@ -101,4 +101,4 @@ import "./toast/index.js";
|
|
|
101
101
|
import { ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue } from "./ToggleGroup.js";
|
|
102
102
|
import { isSvgMarkupString, svgMarkupToMaskUrl } from "./utils/svg.js";
|
|
103
103
|
import { cn } from "@pixpilot/shadcn";
|
|
104
|
-
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, ConfirmationDialogVariant, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadCallbacks, 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, PopoverContentUnstyled, 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 };
|
|
104
|
+
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, ColorPickerContentProps, 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, ColorPickerResetOptions, ColorPickerRoot, ColorPickerRootProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ConfirmationDialogVariant, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadCallbacks, 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, PopoverContentUnstyled, 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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommandOptionListItem } from "../CommandOptionList.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/tags-input/TagsInput.d.ts
|
|
5
5
|
interface TagsInputProps {
|
|
@@ -57,6 +57,6 @@ declare function TagsInput({
|
|
|
57
57
|
addOnTab,
|
|
58
58
|
onValidate,
|
|
59
59
|
addButtonVisibility
|
|
60
|
-
}: TagsInputProps):
|
|
60
|
+
}: TagsInputProps): react_jsx_runtime15.JSX.Element;
|
|
61
61
|
//#endregion
|
|
62
62
|
export { TagsInput, TagsInputProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, Ref } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/tags-input/TagsInputInline.d.ts
|
|
5
5
|
interface TagsInputInlineItem {
|
|
@@ -75,6 +75,6 @@ declare function TagsInputInline({
|
|
|
75
75
|
canAddCurrentValue,
|
|
76
76
|
onAddCurrentInput,
|
|
77
77
|
showClear
|
|
78
|
-
}: TagsInputInlineProps):
|
|
78
|
+
}: TagsInputInlineProps): react_jsx_runtime16.JSX.Element;
|
|
79
79
|
//#endregion
|
|
80
80
|
export { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeDropdown.d.ts
|
|
4
4
|
interface ThemeModeDropdownProps {
|
|
@@ -17,7 +17,7 @@ interface ThemeModeDropdownProps {
|
|
|
17
17
|
* Provides Light / Dark / System options.
|
|
18
18
|
* Pure component - requires themeValue and onChange props.
|
|
19
19
|
*/
|
|
20
|
-
declare function ThemeModeDropdown(props: ThemeModeDropdownProps):
|
|
20
|
+
declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime17.JSX.Element;
|
|
21
21
|
declare namespace ThemeModeDropdown {
|
|
22
22
|
var displayName: string;
|
|
23
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeSwitchInside.d.ts
|
|
4
4
|
type ThemeModeSwitchInsideSize = 'sm' | 'md' | 'lg';
|
|
@@ -25,7 +25,7 @@ interface ThemeModeSwitchInsideProps {
|
|
|
25
25
|
* Icons are embedded within the switch control.
|
|
26
26
|
* Pure component - requires value and onChange props.
|
|
27
27
|
*/
|
|
28
|
-
declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps):
|
|
28
|
+
declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime18.JSX.Element;
|
|
29
29
|
declare namespace ThemeModeSwitchInside {
|
|
30
30
|
var displayName: string;
|
|
31
31
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeSwitchOutside.d.ts
|
|
4
4
|
interface ThemeModeSwitchOutsideProps {
|
|
@@ -22,7 +22,7 @@ interface ThemeModeSwitchOutsideProps {
|
|
|
22
22
|
* Icons flank the switch control on either side.
|
|
23
23
|
* Pure component - requires value and onChange props.
|
|
24
24
|
*/
|
|
25
|
-
declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps):
|
|
25
|
+
declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime19.JSX.Element;
|
|
26
26
|
declare namespace ThemeModeSwitchOutside {
|
|
27
27
|
var displayName: string;
|
|
28
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeToggleButton.d.ts
|
|
4
4
|
interface ThemeModeToggleButtonProps {
|
|
@@ -13,7 +13,7 @@ interface ThemeModeToggleButtonProps {
|
|
|
13
13
|
* Light/Dark toggle button.
|
|
14
14
|
* Pure component - toggles between light and dark.
|
|
15
15
|
*/
|
|
16
|
-
declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps):
|
|
16
|
+
declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime20.JSX.Element;
|
|
17
17
|
declare namespace ThemeModeToggleButton {
|
|
18
18
|
var displayName: string;
|
|
19
19
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixpilot/shadcn-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.19.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",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"@iconify-json/mdi": "^1.2.3",
|
|
34
34
|
"@iconify/react": "^6.0.2",
|
|
35
35
|
"@pixpilot/hash": "^0.2.0",
|
|
36
|
+
"@pixpilot/string": "^3.0.0",
|
|
36
37
|
"@tailwindcss/typography": "^0.5.19",
|
|
37
38
|
"@tanstack/react-virtual": "^3.13.23",
|
|
38
39
|
"@tiptap/core": "^3.22.3",
|
|
@@ -63,10 +64,10 @@
|
|
|
63
64
|
"tsdown": "^0.15.12",
|
|
64
65
|
"typescript": "^5.9.3",
|
|
65
66
|
"@internal/eslint-config": "0.3.0",
|
|
66
|
-
"@internal/prettier-config": "0.0.1",
|
|
67
67
|
"@internal/hooks": "0.0.0",
|
|
68
|
-
"@internal/
|
|
68
|
+
"@internal/prettier-config": "0.0.1",
|
|
69
69
|
"@internal/tsdown-config": "0.1.0",
|
|
70
|
+
"@internal/tsconfig": "0.1.0",
|
|
70
71
|
"@internal/vitest-config": "0.1.0"
|
|
71
72
|
},
|
|
72
73
|
"prettier": "@internal/prettier-config",
|