@pixpilot/shadcn-ui 0.25.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ColorPickerBase/ColorPickerCompact.cjs +30 -27
- package/dist/ColorPickerBase/ColorPickerCompact.js +30 -27
- package/dist/ContentCard.d.cts +2 -2
- package/dist/DatePicker.d.cts +2 -2
- package/dist/file-upload-inline/FileUploadInline.d.cts +2 -2
- package/dist/input/Input.d.cts +2 -2
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
|
14
14
|
|
|
15
15
|
//#region src/ColorPickerBase/ColorPickerCompact.tsx
|
|
16
16
|
const ColorPickerCompact = react.default.memo((props) => {
|
|
17
|
-
const { onValueChange, presetColors, sections, currentValue } = props;
|
|
17
|
+
const { onValueChange, presetColors, sections, currentValue,...rest } = props;
|
|
18
18
|
const enabledSections = new Set(sections);
|
|
19
19
|
const showPicker = enabledSections.has("picker");
|
|
20
20
|
const showSwatch = enabledSections.has("swatch");
|
|
@@ -23,32 +23,35 @@ const ColorPickerCompact = react.default.memo((props) => {
|
|
|
23
23
|
const [showFullPicker, setShowFullPicker] = (0, react.useState)(false);
|
|
24
24
|
const shouldShowPickerUi = showPicker && (showSwatch ? showFullPicker : true);
|
|
25
25
|
const canTogglePickerUi = showPicker && showSwatch;
|
|
26
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_ColorPickerContent.ColorPickerContent, {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
className: "flex-
|
|
31
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
26
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_ColorPickerContent.ColorPickerContent, {
|
|
27
|
+
...rest,
|
|
28
|
+
children: [
|
|
29
|
+
shouldShowPickerUi && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerArea, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
30
|
+
className: "flex items-center gap-2",
|
|
31
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerEyeDropper, { className: "hidden xs:flex " }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
32
|
+
className: "flex-1 space-y-2",
|
|
33
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerHueSlider, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerAlphaSlider, {})]
|
|
34
|
+
})]
|
|
35
|
+
})] }),
|
|
36
|
+
showSwatch && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
37
|
+
className: "gap-2 flex flex-wrap",
|
|
38
|
+
children: [presetColors.map((color) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteSwatch.PaletteSwatch, {
|
|
39
|
+
color,
|
|
40
|
+
onSelect: onValueChange,
|
|
41
|
+
selectedValue: currentValue
|
|
42
|
+
}, color.value)), canTogglePickerUi && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PaletteButton.PaletteButton, {
|
|
43
|
+
onClick: () => setShowFullPicker(!showFullPicker),
|
|
44
|
+
"aria-label": "Toggle full color picker",
|
|
45
|
+
className: "flex items-center justify-center border-input bg-input hover:bg-accent hover:text-accent-foreground",
|
|
46
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Droplet, { className: "h-4 w-4" })
|
|
47
|
+
})]
|
|
48
|
+
}),
|
|
49
|
+
(showFormatSelect || showInput) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
50
|
+
className: "flex items-center gap-2 w-full",
|
|
51
|
+
children: [showFormatSelect && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.ColorPickerFormatSelect, {}), showInput && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ColorPickerInput.ColorPickerInput, {})]
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
52
55
|
});
|
|
53
56
|
ColorPickerCompact.displayName = "ColorPickerCompact";
|
|
54
57
|
|
|
@@ -9,7 +9,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
|
|
10
10
|
//#region src/ColorPickerBase/ColorPickerCompact.tsx
|
|
11
11
|
const ColorPickerCompact = React.memo((props) => {
|
|
12
|
-
const { onValueChange, presetColors, sections, currentValue } = props;
|
|
12
|
+
const { onValueChange, presetColors, sections, currentValue,...rest } = props;
|
|
13
13
|
const enabledSections = new Set(sections);
|
|
14
14
|
const showPicker = enabledSections.has("picker");
|
|
15
15
|
const showSwatch = enabledSections.has("swatch");
|
|
@@ -18,32 +18,35 @@ const ColorPickerCompact = React.memo((props) => {
|
|
|
18
18
|
const [showFullPicker, setShowFullPicker] = useState(false);
|
|
19
19
|
const shouldShowPickerUi = showPicker && (showSwatch ? showFullPicker : true);
|
|
20
20
|
const canTogglePickerUi = showPicker && showSwatch;
|
|
21
|
-
return /* @__PURE__ */ jsxs(ColorPickerContent$1, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
className: "flex-
|
|
26
|
-
children: [/* @__PURE__ */ jsx(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
21
|
+
return /* @__PURE__ */ jsxs(ColorPickerContent$1, {
|
|
22
|
+
...rest,
|
|
23
|
+
children: [
|
|
24
|
+
shouldShowPickerUi && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ColorPickerArea, {}), /* @__PURE__ */ jsxs("div", {
|
|
25
|
+
className: "flex items-center gap-2",
|
|
26
|
+
children: [/* @__PURE__ */ jsx(ColorPickerEyeDropper, { className: "hidden xs:flex " }), /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
className: "flex-1 space-y-2",
|
|
28
|
+
children: [/* @__PURE__ */ jsx(ColorPickerHueSlider, {}), /* @__PURE__ */ jsx(ColorPickerAlphaSlider, {})]
|
|
29
|
+
})]
|
|
30
|
+
})] }),
|
|
31
|
+
showSwatch && /* @__PURE__ */ jsxs("div", {
|
|
32
|
+
className: "gap-2 flex flex-wrap",
|
|
33
|
+
children: [presetColors.map((color) => /* @__PURE__ */ jsx(PaletteSwatch, {
|
|
34
|
+
color,
|
|
35
|
+
onSelect: onValueChange,
|
|
36
|
+
selectedValue: currentValue
|
|
37
|
+
}, color.value)), canTogglePickerUi && /* @__PURE__ */ jsx(PaletteButton, {
|
|
38
|
+
onClick: () => setShowFullPicker(!showFullPicker),
|
|
39
|
+
"aria-label": "Toggle full color picker",
|
|
40
|
+
className: "flex items-center justify-center border-input bg-input hover:bg-accent hover:text-accent-foreground",
|
|
41
|
+
children: /* @__PURE__ */ jsx(Droplet, { className: "h-4 w-4" })
|
|
42
|
+
})]
|
|
43
|
+
}),
|
|
44
|
+
(showFormatSelect || showInput) && /* @__PURE__ */ jsxs("div", {
|
|
45
|
+
className: "flex items-center gap-2 w-full",
|
|
46
|
+
children: [showFormatSelect && /* @__PURE__ */ jsx(ColorPickerFormatSelect, {}), showInput && /* @__PURE__ */ jsx(ColorPickerInput$1, {})]
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
});
|
|
47
50
|
});
|
|
48
51
|
ColorPickerCompact.displayName = "ColorPickerCompact";
|
|
49
52
|
|
package/dist/ContentCard.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
2
2
|
import { Card } from "@pixpilot/shadcn";
|
|
3
3
|
import React, { ReactNode } from "react";
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ interface SectionCardProps extends React.ComponentProps<typeof Card> {
|
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
marginBottom?: boolean;
|
|
10
10
|
}
|
|
11
|
-
declare function ContentCard(props: SectionCardProps):
|
|
11
|
+
declare function ContentCard(props: SectionCardProps): react_jsx_runtime3.JSX.Element;
|
|
12
12
|
declare namespace ContentCard {
|
|
13
13
|
var displayName: string;
|
|
14
14
|
}
|
package/dist/DatePicker.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
2
2
|
import { Calendar } from "@pixpilot/shadcn";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ type DatePickerProps = {
|
|
|
8
8
|
onChange?: (date: Date | undefined) => void;
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
} & Omit<ComponentProps<typeof Calendar>, 'selected' | 'onSelect' | 'mode'>;
|
|
11
|
-
declare function DatePicker(props: DatePickerProps):
|
|
11
|
+
declare function DatePicker(props: DatePickerProps): react_jsx_runtime2.JSX.Element;
|
|
12
12
|
declare namespace DatePicker {
|
|
13
13
|
var displayName: string;
|
|
14
14
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FileUploadInlineProps } from "./types.cjs";
|
|
2
|
-
import * as
|
|
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):
|
|
8
|
+
declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime7.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { FileUploadInline };
|
package/dist/input/Input.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
2
2
|
import { InputProps } from "@pixpilot/shadcn";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
|
|
@@ -10,6 +10,6 @@ type InputProps$1 = InputProps & {
|
|
|
10
10
|
prefixClassName?: string;
|
|
11
11
|
suffixClassName?: string;
|
|
12
12
|
};
|
|
13
|
-
declare function Input(props: InputProps$1):
|
|
13
|
+
declare function Input(props: InputProps$1): react_jsx_runtime8.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Input, InputProps$1 as InputProps };
|
package/package.json
CHANGED