@pixpilot/shadcn-ui 3.7.0 → 3.9.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/absolute-fill/AbsoluteFill.d.cts +2 -2
- package/dist/absolute-fill/AbsoluteFill.d.ts +2 -2
- package/dist/button/Button.d.cts +2 -2
- package/dist/button/Button.d.ts +2 -2
- package/dist/button-extended/ButtonExtended.d.cts +2 -2
- package/dist/card/Card.d.cts +3 -3
- package/dist/color-select/ColorSelect.d.cts +2 -2
- package/dist/content-card/ContentCard.d.cts +2 -2
- package/dist/content-card/ContentCard.d.ts +2 -2
- package/dist/date-picker/DatePicker.d.cts +2 -2
- package/dist/date-picker/DatePicker.d.ts +2 -2
- package/dist/dialog/Dialog.d.cts +5 -5
- package/dist/dialog/Dialog.d.ts +5 -5
- package/dist/drawer/Drawer.d.cts +6 -6
- package/dist/drawer/Drawer.d.ts +6 -6
- 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/input/Input.d.cts +2 -2
- package/dist/input/Input.d.ts +2 -2
- package/dist/rating/Rating.d.cts +3 -3
- package/dist/rich-text-editor/RichTextEditor.cjs +34 -14
- package/dist/rich-text-editor/RichTextEditor.d.cts +20 -1
- package/dist/rich-text-editor/RichTextEditor.d.ts +20 -1
- package/dist/rich-text-editor/RichTextEditor.js +33 -14
- package/dist/rich-text-editor/mcp.js +14 -1
- package/dist/tags-input/TagsInput.d.cts +2 -2
- package/dist/tags-input/TagsInputInline.d.cts +2 -2
- package/dist/theme-toggle/ThemeModeDropdown.d.cts +2 -2
- package/dist/theme-toggle/ThemeModeSwitchInside.d.cts +2 -2
- package/dist/theme-toggle/ThemeModeSwitchOutside.d.cts +2 -2
- package/dist/theme-toggle/ThemeModeToggleButton.d.cts +2 -2
- package/package.json +5 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime28 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/absolute-fill/AbsoluteFill.d.ts
|
|
@@ -10,7 +10,7 @@ import React from "react";
|
|
|
10
10
|
*/
|
|
11
11
|
declare function AbsoluteFill(props: React.HTMLAttributes<HTMLDivElement> & {
|
|
12
12
|
ref?: React.Ref<HTMLDivElement>;
|
|
13
|
-
}):
|
|
13
|
+
}): react_jsx_runtime28.JSX.Element;
|
|
14
14
|
declare namespace AbsoluteFill {
|
|
15
15
|
var displayName: string;
|
|
16
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/absolute-fill/AbsoluteFill.d.ts
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
10
10
|
*/
|
|
11
11
|
declare function AbsoluteFill(props: React.HTMLAttributes<HTMLDivElement> & {
|
|
12
12
|
ref?: React.Ref<HTMLDivElement>;
|
|
13
|
-
}):
|
|
13
|
+
}): react_jsx_runtime1.JSX.Element;
|
|
14
14
|
declare namespace AbsoluteFill {
|
|
15
15
|
var displayName: string;
|
|
16
16
|
}
|
package/dist/button/Button.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime4 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_runtime4.JSX.Element;
|
|
31
31
|
declare namespace Button$1 {
|
|
32
32
|
var displayName: string;
|
|
33
33
|
}
|
package/dist/button/Button.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button, Tooltip, TooltipContent, TooltipTrigger, buttonVariants } from "@pixpilot/shadcn";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
|
|
6
6
|
//#region src/button/Button.d.ts
|
|
@@ -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_runtime2 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_runtime2.JSX.Element;
|
|
54
54
|
declare namespace ButtonExtended {
|
|
55
55
|
var displayName: string;
|
|
56
56
|
}
|
package/dist/card/Card.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@pixpilot/shadcn";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
@@ -6,10 +6,10 @@ import React from "react";
|
|
|
6
6
|
declare function CardTitle$1({
|
|
7
7
|
className,
|
|
8
8
|
...props
|
|
9
|
-
}: React.ComponentProps<typeof CardTitle>):
|
|
9
|
+
}: React.ComponentProps<typeof CardTitle>): react_jsx_runtime0.JSX.Element;
|
|
10
10
|
declare function CardHeader$1({
|
|
11
11
|
className,
|
|
12
12
|
...props
|
|
13
|
-
}: React.ComponentProps<typeof CardHeader>):
|
|
13
|
+
}: React.ComponentProps<typeof CardHeader>): react_jsx_runtime0.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader$1 as CardHeader, CardTitle$1 as CardTitle };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
2
|
import { Select, SelectContent } from "@pixpilot/shadcn";
|
|
3
3
|
import React, { ComponentProps } from "react";
|
|
4
4
|
|
|
@@ -17,6 +17,6 @@ type BaseColorSelectProps = {
|
|
|
17
17
|
keyboardMode?: 'cycle' | 'dropdown';
|
|
18
18
|
className?: string;
|
|
19
19
|
} & Omit<ComponentProps<typeof Select>, 'value' | 'onValueChange' | 'children'>;
|
|
20
|
-
declare function ColorSelect(props: BaseColorSelectProps):
|
|
20
|
+
declare function ColorSelect(props: BaseColorSelectProps): react_jsx_runtime1.JSX.Element;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { BaseColorSelectProps, ColorSelect, ColorSelectOption };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Card } from "../card/Card.cjs";
|
|
2
2
|
import "../card/index.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
4
4
|
import React, { ReactNode } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/content-card/ContentCard.d.ts
|
|
@@ -9,7 +9,7 @@ interface SectionCardProps extends React.ComponentProps<typeof Card> {
|
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
marginBottom?: boolean;
|
|
11
11
|
}
|
|
12
|
-
declare function ContentCard(props: SectionCardProps):
|
|
12
|
+
declare function ContentCard(props: SectionCardProps): react_jsx_runtime7.JSX.Element;
|
|
13
13
|
declare namespace ContentCard {
|
|
14
14
|
var displayName: string;
|
|
15
15
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Card } from "../card/Card.js";
|
|
2
2
|
import "../card/index.js";
|
|
3
3
|
import React, { ReactNode } from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/content-card/ContentCard.d.ts
|
|
7
7
|
interface SectionCardProps extends React.ComponentProps<typeof Card> {
|
|
@@ -9,7 +9,7 @@ interface SectionCardProps extends React.ComponentProps<typeof Card> {
|
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
marginBottom?: boolean;
|
|
11
11
|
}
|
|
12
|
-
declare function ContentCard(props: SectionCardProps):
|
|
12
|
+
declare function ContentCard(props: SectionCardProps): react_jsx_runtime19.JSX.Element;
|
|
13
13
|
declare namespace ContentCard {
|
|
14
14
|
var displayName: string;
|
|
15
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
2
2
|
import { Calendar } from "@pixpilot/shadcn";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ type DatePickerProps = {
|
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
showClearButton?: boolean;
|
|
12
12
|
} & Omit<ComponentProps<typeof Calendar>, 'selected' | 'onSelect' | 'mode'>;
|
|
13
|
-
declare function DatePicker(props: DatePickerProps):
|
|
13
|
+
declare function DatePicker(props: DatePickerProps): react_jsx_runtime13.JSX.Element;
|
|
14
14
|
declare namespace DatePicker {
|
|
15
15
|
var displayName: string;
|
|
16
16
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Calendar } from "@pixpilot/shadcn";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/date-picker/DatePicker.d.ts
|
|
6
6
|
type DatePickerProps = {
|
|
@@ -10,7 +10,7 @@ type DatePickerProps = {
|
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
showClearButton?: boolean;
|
|
12
12
|
} & Omit<ComponentProps<typeof Calendar>, 'selected' | 'onSelect' | 'mode'>;
|
|
13
|
-
declare function DatePicker(props: DatePickerProps):
|
|
13
|
+
declare function DatePicker(props: DatePickerProps): react_jsx_runtime18.JSX.Element;
|
|
14
14
|
declare namespace DatePicker {
|
|
15
15
|
var displayName: string;
|
|
16
16
|
}
|
package/dist/dialog/Dialog.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
2
2
|
import { DialogClose, DialogContent } from "@pixpilot/shadcn";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
|
|
@@ -7,12 +7,12 @@ interface DialogContentProps extends React$1.ComponentPropsWithoutRef<typeof Dia
|
|
|
7
7
|
fullscreen?: boolean;
|
|
8
8
|
}
|
|
9
9
|
declare const DialogContent$1: React$1.ForwardRefExoticComponent<DialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
declare function DialogHeader(props: React$1.HTMLAttributes<HTMLDivElement>):
|
|
11
|
-
declare function DialogBody(props: React$1.HTMLAttributes<HTMLDivElement>):
|
|
12
|
-
declare function DialogFooter(props: React$1.HTMLAttributes<HTMLDivElement>):
|
|
10
|
+
declare function DialogHeader(props: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime14.JSX.Element;
|
|
11
|
+
declare function DialogBody(props: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime14.JSX.Element;
|
|
12
|
+
declare function DialogFooter(props: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime14.JSX.Element;
|
|
13
13
|
declare function DialogClose$1({
|
|
14
14
|
className,
|
|
15
15
|
...props
|
|
16
|
-
}: React$1.ComponentPropsWithoutRef<typeof DialogClose>):
|
|
16
|
+
}: React$1.ComponentPropsWithoutRef<typeof DialogClose>): react_jsx_runtime14.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { DialogBody, DialogClose$1 as DialogClose, DialogContent$1 as DialogContent, DialogContentProps, DialogFooter, DialogHeader };
|
package/dist/dialog/Dialog.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { DialogClose, DialogContent } from "@pixpilot/shadcn";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/dialog/Dialog.d.ts
|
|
6
6
|
interface DialogContentProps extends React$1.ComponentPropsWithoutRef<typeof DialogContent> {
|
|
7
7
|
fullscreen?: boolean;
|
|
8
8
|
}
|
|
9
9
|
declare const DialogContent$1: React$1.ForwardRefExoticComponent<DialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
declare function DialogHeader$1(props: React$1.HTMLAttributes<HTMLDivElement>):
|
|
11
|
-
declare function DialogBody(props: React$1.HTMLAttributes<HTMLDivElement>):
|
|
12
|
-
declare function DialogFooter$1(props: React$1.HTMLAttributes<HTMLDivElement>):
|
|
10
|
+
declare function DialogHeader$1(props: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime13.JSX.Element;
|
|
11
|
+
declare function DialogBody(props: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime13.JSX.Element;
|
|
12
|
+
declare function DialogFooter$1(props: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime13.JSX.Element;
|
|
13
13
|
declare function DialogClose$1({
|
|
14
14
|
className,
|
|
15
15
|
...props
|
|
16
|
-
}: React$1.ComponentPropsWithoutRef<typeof DialogClose>):
|
|
16
|
+
}: React$1.ComponentPropsWithoutRef<typeof DialogClose>): react_jsx_runtime13.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { DialogBody, DialogClose$1 as DialogClose, DialogContent$1 as DialogContent, DialogContentProps, DialogFooter$1 as DialogFooter, DialogHeader$1 as DialogHeader };
|
package/dist/drawer/Drawer.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
2
2
|
import { Drawer, DrawerClose, DrawerContent } from "@pixpilot/shadcn";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
|
|
@@ -22,7 +22,7 @@ type DrawerProps = React$1.ComponentProps<typeof Drawer> & NoDragProps;
|
|
|
22
22
|
declare function Drawer$1({
|
|
23
23
|
noDrag,
|
|
24
24
|
...props
|
|
25
|
-
}: DrawerProps):
|
|
25
|
+
}: DrawerProps): react_jsx_runtime8.JSX.Element;
|
|
26
26
|
type DrawerContentProps = React$1.ComponentPropsWithoutRef<typeof DrawerContent> & NoDragProps & {
|
|
27
27
|
/**
|
|
28
28
|
* Detach the drawer from the viewport edges: adds a gap on every side and
|
|
@@ -44,19 +44,19 @@ declare const DrawerContent$1: React$1.ForwardRefExoticComponent<Omit<Omit<_radi
|
|
|
44
44
|
declare function DrawerHeader({
|
|
45
45
|
noDrag,
|
|
46
46
|
...props
|
|
47
|
-
}: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps):
|
|
47
|
+
}: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps): react_jsx_runtime8.JSX.Element;
|
|
48
48
|
declare function DrawerBody({
|
|
49
49
|
noDrag,
|
|
50
50
|
...props
|
|
51
|
-
}: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps):
|
|
51
|
+
}: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps): react_jsx_runtime8.JSX.Element;
|
|
52
52
|
declare function DrawerFooter({
|
|
53
53
|
noDrag,
|
|
54
54
|
...props
|
|
55
|
-
}: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps):
|
|
55
|
+
}: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps): react_jsx_runtime8.JSX.Element;
|
|
56
56
|
declare function DrawerClose$1({
|
|
57
57
|
className,
|
|
58
58
|
noDrag,
|
|
59
59
|
...props
|
|
60
|
-
}: React$1.ComponentPropsWithoutRef<typeof DrawerClose> & NoDragProps):
|
|
60
|
+
}: React$1.ComponentPropsWithoutRef<typeof DrawerClose> & NoDragProps): react_jsx_runtime8.JSX.Element;
|
|
61
61
|
//#endregion
|
|
62
62
|
export { Drawer$1 as Drawer, DrawerBody, DrawerClose$1 as DrawerClose, DrawerContent$1 as DrawerContent, DrawerContentProps, DrawerFooter, DrawerHeader, DrawerProps };
|
package/dist/drawer/Drawer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Drawer, DrawerClose, DrawerContent } from "@pixpilot/shadcn";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
4
4
|
import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
|
|
5
5
|
|
|
6
6
|
//#region src/drawer/Drawer.d.ts
|
|
@@ -22,7 +22,7 @@ type DrawerProps = React$1.ComponentProps<typeof Drawer> & NoDragProps;
|
|
|
22
22
|
declare function Drawer$1({
|
|
23
23
|
noDrag,
|
|
24
24
|
...props
|
|
25
|
-
}: DrawerProps):
|
|
25
|
+
}: DrawerProps): react_jsx_runtime8.JSX.Element;
|
|
26
26
|
type DrawerContentProps = React$1.ComponentPropsWithoutRef<typeof DrawerContent> & NoDragProps & {
|
|
27
27
|
/**
|
|
28
28
|
* Detach the drawer from the viewport edges: adds a gap on every side and
|
|
@@ -44,19 +44,19 @@ declare const DrawerContent$1: React$1.ForwardRefExoticComponent<Omit<Omit<_radi
|
|
|
44
44
|
declare function DrawerHeader({
|
|
45
45
|
noDrag,
|
|
46
46
|
...props
|
|
47
|
-
}: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps):
|
|
47
|
+
}: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps): react_jsx_runtime8.JSX.Element;
|
|
48
48
|
declare function DrawerBody({
|
|
49
49
|
noDrag,
|
|
50
50
|
...props
|
|
51
|
-
}: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps):
|
|
51
|
+
}: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps): react_jsx_runtime8.JSX.Element;
|
|
52
52
|
declare function DrawerFooter({
|
|
53
53
|
noDrag,
|
|
54
54
|
...props
|
|
55
|
-
}: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps):
|
|
55
|
+
}: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps): react_jsx_runtime8.JSX.Element;
|
|
56
56
|
declare function DrawerClose$1({
|
|
57
57
|
className,
|
|
58
58
|
noDrag,
|
|
59
59
|
...props
|
|
60
|
-
}: React$1.ComponentPropsWithoutRef<typeof DrawerClose> & NoDragProps):
|
|
60
|
+
}: React$1.ComponentPropsWithoutRef<typeof DrawerClose> & NoDragProps): react_jsx_runtime8.JSX.Element;
|
|
61
61
|
//#endregion
|
|
62
62
|
export { Drawer$1 as Drawer, DrawerBody, DrawerClose$1 as DrawerClose, DrawerContent$1 as DrawerContent, DrawerContentProps, DrawerFooter, DrawerHeader, DrawerProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FileUploadProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime6 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_runtime6.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_runtime19 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_runtime19.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_runtime6 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_runtime6.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_runtime18 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_runtime18.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_runtime7 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_runtime7.JSX.Element;
|
|
9
9
|
declare namespace FileUploadRoot {
|
|
10
10
|
var displayName: string;
|
|
11
11
|
}
|
package/dist/input/Input.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime3 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_runtime3.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Input, InputProps$1 as InputProps };
|
package/dist/input/Input.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputProps } from "@pixpilot/shadcn";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime17 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):
|
|
13
|
+
declare function Input$1(props: InputProps$1): react_jsx_runtime17.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Input$1 as Input, InputProps$1 as InputProps };
|
package/dist/rating/Rating.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime20 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_runtime20.JSX.Element;
|
|
39
39
|
declare function Rating({
|
|
40
40
|
value: valueProp,
|
|
41
41
|
defaultValue,
|
|
@@ -53,6 +53,6 @@ declare function Rating({
|
|
|
53
53
|
children,
|
|
54
54
|
id,
|
|
55
55
|
...props
|
|
56
|
-
}: React$1.PropsWithChildren<RatingProps>):
|
|
56
|
+
}: React$1.PropsWithChildren<RatingProps>): react_jsx_runtime20.JSX.Element;
|
|
57
57
|
//#endregion
|
|
58
58
|
export { Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps };
|
|
@@ -12,6 +12,8 @@ let __tiptap_extension_placeholder = require("@tiptap/extension-placeholder");
|
|
|
12
12
|
__tiptap_extension_placeholder = require_rolldown_runtime.__toESM(__tiptap_extension_placeholder);
|
|
13
13
|
let __tiptap_extension_text_align = require("@tiptap/extension-text-align");
|
|
14
14
|
__tiptap_extension_text_align = require_rolldown_runtime.__toESM(__tiptap_extension_text_align);
|
|
15
|
+
let __tiptap_extensions_character_count = require("@tiptap/extensions/character-count");
|
|
16
|
+
__tiptap_extensions_character_count = require_rolldown_runtime.__toESM(__tiptap_extensions_character_count);
|
|
15
17
|
let __tiptap_react = require("@tiptap/react");
|
|
16
18
|
__tiptap_react = require_rolldown_runtime.__toESM(__tiptap_react);
|
|
17
19
|
let __tiptap_starter_kit = require("@tiptap/starter-kit");
|
|
@@ -66,7 +68,7 @@ function useEditorProps(slots, customEditorProps, openOnClick = false) {
|
|
|
66
68
|
openOnClick
|
|
67
69
|
]);
|
|
68
70
|
}
|
|
69
|
-
const RichTextEditor = ({ value, onChange, extensions = defaultExtensions, editable = true, slots, showToolbar = true, toolbarItems = defaultToolbarItems, editorProps: customEditorProps, immediatelyRender = false, tooltipMode = "native", placeholder, allowLinkTarget = false, openOnClick = false, className }) => {
|
|
71
|
+
const RichTextEditor = ({ value, onChange, extensions = defaultExtensions, editable = true, slots, showToolbar = true, toolbarItems = defaultToolbarItems, editorProps: customEditorProps, immediatelyRender = false, tooltipMode = "native", placeholder, maxLength, autoFocus = false, allowLinkTarget = false, openOnClick = false, className }) => {
|
|
70
72
|
const [renderTick, forceRender] = react.default.useReducer((x) => x + 1, 0);
|
|
71
73
|
const mergedEditorProps = useEditorProps(slots, customEditorProps, openOnClick);
|
|
72
74
|
const onChangeRef = react.default.useRef(onChange);
|
|
@@ -88,14 +90,17 @@ const RichTextEditor = ({ value, onChange, extensions = defaultExtensions, edita
|
|
|
88
90
|
__tiptap_extension_text_align.default.configure({ types: ["heading", "paragraph"] })
|
|
89
91
|
];
|
|
90
92
|
if (placeholder != null) baseExtensions.push(__tiptap_extension_placeholder.default.configure({ placeholder }));
|
|
93
|
+
if (maxLength != null) baseExtensions.push(__tiptap_extensions_character_count.CharacterCount.configure({ limit: maxLength }));
|
|
91
94
|
return baseExtensions.concat(extensions);
|
|
92
95
|
}, [
|
|
93
96
|
extensions,
|
|
94
97
|
placeholder,
|
|
98
|
+
maxLength,
|
|
95
99
|
openOnClick
|
|
96
100
|
]),
|
|
97
101
|
content: value,
|
|
98
102
|
editable,
|
|
103
|
+
autofocus: autoFocus,
|
|
99
104
|
onUpdate: handleChange,
|
|
100
105
|
immediatelyRender,
|
|
101
106
|
editorProps: mergedEditorProps
|
|
@@ -117,29 +122,44 @@ const RichTextEditor = ({ value, onChange, extensions = defaultExtensions, edita
|
|
|
117
122
|
};
|
|
118
123
|
}, [editorInstance]);
|
|
119
124
|
if (editorInstance == null) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
125
|
+
"data-slot": "rich-text-editor",
|
|
120
126
|
className: (0, __pixpilot_shadcn.cn)("flex flex-col overflow-hidden border rounded-md bg-background", slots?.root?.className),
|
|
121
127
|
children: [showToolbar && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: (0, __pixpilot_shadcn.cn)("flex flex-wrap items-center gap-1 border-b p-2 h-10 shrink-0", slots?.toolbar?.className) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
122
128
|
className: (0, __pixpilot_shadcn.cn)("flex-1 overflow-y-auto min-h-[200px] p-4 text-sm leading-relaxed", slots?.content?.className),
|
|
123
129
|
children: "Loading editor..."
|
|
124
130
|
})]
|
|
125
131
|
});
|
|
132
|
+
const characterCount = maxLength == null ? 0 : editorInstance.storage.characterCount.characters();
|
|
126
133
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
134
|
+
"data-slot": "rich-text-editor",
|
|
127
135
|
className: (0, __pixpilot_shadcn.cn)("flex flex-col overflow-hidden border rounded-md bg-background", slots?.root?.className, className),
|
|
128
|
-
children: [
|
|
129
|
-
|
|
130
|
-
toolbarItems,
|
|
131
|
-
slots,
|
|
132
|
-
showToolbar,
|
|
133
|
-
renderTick,
|
|
134
|
-
tooltipMode,
|
|
135
|
-
allowLinkTarget
|
|
136
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
137
|
-
className: "flex-1 min-h-0 overflow-y-auto",
|
|
138
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__tiptap_react.EditorContent, {
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_RichTextEditorToolbar.RichTextEditorToolbar, {
|
|
139
138
|
editor: editorInstance,
|
|
140
|
-
|
|
139
|
+
toolbarItems,
|
|
140
|
+
slots,
|
|
141
|
+
showToolbar,
|
|
142
|
+
renderTick,
|
|
143
|
+
tooltipMode,
|
|
144
|
+
allowLinkTarget
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
147
|
+
className: "flex-1 min-h-0 overflow-y-auto",
|
|
148
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__tiptap_react.EditorContent, {
|
|
149
|
+
editor: editorInstance,
|
|
150
|
+
"data-slot": "editor-content"
|
|
151
|
+
})
|
|
152
|
+
}),
|
|
153
|
+
maxLength != null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
154
|
+
"data-slot": "character-count",
|
|
155
|
+
className: (0, __pixpilot_shadcn.cn)("shrink-0 border-t px-3 py-1.5 text-xs tabular-nums text-muted-foreground text-right", characterCount >= maxLength && "text-destructive", slots?.characterCount?.className),
|
|
156
|
+
children: [
|
|
157
|
+
characterCount,
|
|
158
|
+
" / ",
|
|
159
|
+
maxLength
|
|
160
|
+
]
|
|
141
161
|
})
|
|
142
|
-
|
|
162
|
+
]
|
|
143
163
|
});
|
|
144
164
|
};
|
|
145
165
|
RichTextEditor.displayName = "RichTextEditor";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ToolbarButtonTooltipMode } from "./ToolbarButton.cjs";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { Editor, Extensions } from "@tiptap/core";
|
|
3
|
+
import { Editor, Extensions, FocusPosition } from "@tiptap/core";
|
|
4
4
|
import { UseEditorOptions } from "@tiptap/react";
|
|
5
5
|
|
|
6
6
|
//#region src/rich-text-editor/RichTextEditor.d.ts
|
|
@@ -27,6 +27,9 @@ interface RichTextEditorSlots {
|
|
|
27
27
|
content?: {
|
|
28
28
|
className?: string;
|
|
29
29
|
};
|
|
30
|
+
characterCount?: {
|
|
31
|
+
className?: string;
|
|
32
|
+
};
|
|
30
33
|
}
|
|
31
34
|
interface RichTextEditorProps {
|
|
32
35
|
/**
|
|
@@ -58,6 +61,7 @@ interface RichTextEditorProps {
|
|
|
58
61
|
* - `slots.toolbar.button.className`: each toolbar button
|
|
59
62
|
* - `slots.toolbar.separator.className`: separators (`|`)
|
|
60
63
|
* - `slots.content.className`: editor content area (merged into TipTap `editorProps.attributes.class`)
|
|
64
|
+
* - `slots.characterCount.className`: character counter shown when `maxLength` is set
|
|
61
65
|
*/
|
|
62
66
|
slots?: RichTextEditorSlots;
|
|
63
67
|
/**
|
|
@@ -89,6 +93,21 @@ interface RichTextEditorProps {
|
|
|
89
93
|
* Placeholder text to show when the editor is empty
|
|
90
94
|
*/
|
|
91
95
|
placeholder?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Maximum number of characters allowed in the editor. When set, input beyond
|
|
98
|
+
* the limit is rejected and a `current / max` counter is rendered below the
|
|
99
|
+
* content area.
|
|
100
|
+
*
|
|
101
|
+
* The count is based on the plain text content, not the HTML markup.
|
|
102
|
+
*/
|
|
103
|
+
maxLength?: number;
|
|
104
|
+
/**
|
|
105
|
+
* Whether the editor should receive focus on mount, and where the cursor is
|
|
106
|
+
* placed. `true` is equivalent to `'start'`; a number places the cursor at
|
|
107
|
+
* that document position.
|
|
108
|
+
* @default false
|
|
109
|
+
*/
|
|
110
|
+
autoFocus?: FocusPosition;
|
|
92
111
|
/**
|
|
93
112
|
* Whether the link popover should expose target controls.
|
|
94
113
|
* When false, links are always written without `target` and `rel`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ToolbarButtonTooltipMode } from "./ToolbarButton.js";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { UseEditorOptions } from "@tiptap/react";
|
|
4
|
-
import { Editor, Extensions } from "@tiptap/core";
|
|
4
|
+
import { Editor, Extensions, FocusPosition } from "@tiptap/core";
|
|
5
5
|
|
|
6
6
|
//#region src/rich-text-editor/RichTextEditor.d.ts
|
|
7
7
|
type EditorProps = Editor['options']['editorProps'];
|
|
@@ -27,6 +27,9 @@ interface RichTextEditorSlots {
|
|
|
27
27
|
content?: {
|
|
28
28
|
className?: string;
|
|
29
29
|
};
|
|
30
|
+
characterCount?: {
|
|
31
|
+
className?: string;
|
|
32
|
+
};
|
|
30
33
|
}
|
|
31
34
|
interface RichTextEditorProps {
|
|
32
35
|
/**
|
|
@@ -58,6 +61,7 @@ interface RichTextEditorProps {
|
|
|
58
61
|
* - `slots.toolbar.button.className`: each toolbar button
|
|
59
62
|
* - `slots.toolbar.separator.className`: separators (`|`)
|
|
60
63
|
* - `slots.content.className`: editor content area (merged into TipTap `editorProps.attributes.class`)
|
|
64
|
+
* - `slots.characterCount.className`: character counter shown when `maxLength` is set
|
|
61
65
|
*/
|
|
62
66
|
slots?: RichTextEditorSlots;
|
|
63
67
|
/**
|
|
@@ -89,6 +93,21 @@ interface RichTextEditorProps {
|
|
|
89
93
|
* Placeholder text to show when the editor is empty
|
|
90
94
|
*/
|
|
91
95
|
placeholder?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Maximum number of characters allowed in the editor. When set, input beyond
|
|
98
|
+
* the limit is rejected and a `current / max` counter is rendered below the
|
|
99
|
+
* content area.
|
|
100
|
+
*
|
|
101
|
+
* The count is based on the plain text content, not the HTML markup.
|
|
102
|
+
*/
|
|
103
|
+
maxLength?: number;
|
|
104
|
+
/**
|
|
105
|
+
* Whether the editor should receive focus on mount, and where the cursor is
|
|
106
|
+
* placed. `true` is equivalent to `'start'`; a number places the cursor at
|
|
107
|
+
* that document position.
|
|
108
|
+
* @default false
|
|
109
|
+
*/
|
|
110
|
+
autoFocus?: FocusPosition;
|
|
92
111
|
/**
|
|
93
112
|
* Whether the link popover should expose target controls.
|
|
94
113
|
* When false, links are always written without `target` and `rel`.
|
|
@@ -5,6 +5,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
import Link from "@tiptap/extension-link";
|
|
6
6
|
import Placeholder from "@tiptap/extension-placeholder";
|
|
7
7
|
import TextAlign from "@tiptap/extension-text-align";
|
|
8
|
+
import { CharacterCount } from "@tiptap/extensions/character-count";
|
|
8
9
|
import { EditorContent, useEditor } from "@tiptap/react";
|
|
9
10
|
import StarterKit from "@tiptap/starter-kit";
|
|
10
11
|
|
|
@@ -57,7 +58,7 @@ function useEditorProps(slots, customEditorProps, openOnClick = false) {
|
|
|
57
58
|
openOnClick
|
|
58
59
|
]);
|
|
59
60
|
}
|
|
60
|
-
const RichTextEditor = ({ value, onChange, extensions = defaultExtensions, editable = true, slots, showToolbar = true, toolbarItems = defaultToolbarItems, editorProps: customEditorProps, immediatelyRender = false, tooltipMode = "native", placeholder, allowLinkTarget = false, openOnClick = false, className }) => {
|
|
61
|
+
const RichTextEditor = ({ value, onChange, extensions = defaultExtensions, editable = true, slots, showToolbar = true, toolbarItems = defaultToolbarItems, editorProps: customEditorProps, immediatelyRender = false, tooltipMode = "native", placeholder, maxLength, autoFocus = false, allowLinkTarget = false, openOnClick = false, className }) => {
|
|
61
62
|
const [renderTick, forceRender] = React.useReducer((x) => x + 1, 0);
|
|
62
63
|
const mergedEditorProps = useEditorProps(slots, customEditorProps, openOnClick);
|
|
63
64
|
const onChangeRef = React.useRef(onChange);
|
|
@@ -79,14 +80,17 @@ const RichTextEditor = ({ value, onChange, extensions = defaultExtensions, edita
|
|
|
79
80
|
TextAlign.configure({ types: ["heading", "paragraph"] })
|
|
80
81
|
];
|
|
81
82
|
if (placeholder != null) baseExtensions.push(Placeholder.configure({ placeholder }));
|
|
83
|
+
if (maxLength != null) baseExtensions.push(CharacterCount.configure({ limit: maxLength }));
|
|
82
84
|
return baseExtensions.concat(extensions);
|
|
83
85
|
}, [
|
|
84
86
|
extensions,
|
|
85
87
|
placeholder,
|
|
88
|
+
maxLength,
|
|
86
89
|
openOnClick
|
|
87
90
|
]),
|
|
88
91
|
content: value,
|
|
89
92
|
editable,
|
|
93
|
+
autofocus: autoFocus,
|
|
90
94
|
onUpdate: handleChange,
|
|
91
95
|
immediatelyRender,
|
|
92
96
|
editorProps: mergedEditorProps
|
|
@@ -108,29 +112,44 @@ const RichTextEditor = ({ value, onChange, extensions = defaultExtensions, edita
|
|
|
108
112
|
};
|
|
109
113
|
}, [editorInstance]);
|
|
110
114
|
if (editorInstance == null) return /* @__PURE__ */ jsxs("div", {
|
|
115
|
+
"data-slot": "rich-text-editor",
|
|
111
116
|
className: cn("flex flex-col overflow-hidden border rounded-md bg-background", slots?.root?.className),
|
|
112
117
|
children: [showToolbar && /* @__PURE__ */ jsx("div", { className: cn("flex flex-wrap items-center gap-1 border-b p-2 h-10 shrink-0", slots?.toolbar?.className) }), /* @__PURE__ */ jsx("div", {
|
|
113
118
|
className: cn("flex-1 overflow-y-auto min-h-[200px] p-4 text-sm leading-relaxed", slots?.content?.className),
|
|
114
119
|
children: "Loading editor..."
|
|
115
120
|
})]
|
|
116
121
|
});
|
|
122
|
+
const characterCount = maxLength == null ? 0 : editorInstance.storage.characterCount.characters();
|
|
117
123
|
return /* @__PURE__ */ jsxs("div", {
|
|
124
|
+
"data-slot": "rich-text-editor",
|
|
118
125
|
className: cn("flex flex-col overflow-hidden border rounded-md bg-background", slots?.root?.className, className),
|
|
119
|
-
children: [
|
|
120
|
-
|
|
121
|
-
toolbarItems,
|
|
122
|
-
slots,
|
|
123
|
-
showToolbar,
|
|
124
|
-
renderTick,
|
|
125
|
-
tooltipMode,
|
|
126
|
-
allowLinkTarget
|
|
127
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
128
|
-
className: "flex-1 min-h-0 overflow-y-auto",
|
|
129
|
-
children: /* @__PURE__ */ jsx(EditorContent, {
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ jsx(RichTextEditorToolbar, {
|
|
130
128
|
editor: editorInstance,
|
|
131
|
-
|
|
129
|
+
toolbarItems,
|
|
130
|
+
slots,
|
|
131
|
+
showToolbar,
|
|
132
|
+
renderTick,
|
|
133
|
+
tooltipMode,
|
|
134
|
+
allowLinkTarget
|
|
135
|
+
}),
|
|
136
|
+
/* @__PURE__ */ jsx("div", {
|
|
137
|
+
className: "flex-1 min-h-0 overflow-y-auto",
|
|
138
|
+
children: /* @__PURE__ */ jsx(EditorContent, {
|
|
139
|
+
editor: editorInstance,
|
|
140
|
+
"data-slot": "editor-content"
|
|
141
|
+
})
|
|
142
|
+
}),
|
|
143
|
+
maxLength != null && /* @__PURE__ */ jsxs("div", {
|
|
144
|
+
"data-slot": "character-count",
|
|
145
|
+
className: cn("shrink-0 border-t px-3 py-1.5 text-xs tabular-nums text-muted-foreground text-right", characterCount >= maxLength && "text-destructive", slots?.characterCount?.className),
|
|
146
|
+
children: [
|
|
147
|
+
characterCount,
|
|
148
|
+
" / ",
|
|
149
|
+
maxLength
|
|
150
|
+
]
|
|
132
151
|
})
|
|
133
|
-
|
|
152
|
+
]
|
|
134
153
|
});
|
|
135
154
|
};
|
|
136
155
|
RichTextEditor.displayName = "RichTextEditor";
|
|
@@ -27,8 +27,17 @@ const meta = {
|
|
|
27
27
|
toolbarItems: "Explicit toolbar items: predefined command strings, \"|\" separators, or custom button objects.",
|
|
28
28
|
extensions: "Additional TipTap extensions appended to the built-in ones (StarterKit, Link, TextAlign, Placeholder). Accepts any TipTap Extension, Node, or Mark — official packages or your own custom ones. See the \"Add a custom extension\" example.",
|
|
29
29
|
editorProps: "Custom TipTap editorProps merged into the defaults.",
|
|
30
|
-
slots: "Class overrides for the root, toolbar (and its buttons/separators), and
|
|
30
|
+
slots: "Class overrides for the root, toolbar (and its buttons/separators), content area, and character counter.",
|
|
31
31
|
placeholder: "Placeholder text shown when the editor is empty.",
|
|
32
|
+
maxLength: {
|
|
33
|
+
description: "Maximum number of characters allowed. Input beyond the limit is rejected and a \"current / max\" counter is rendered below the content area. Counts plain text, not HTML markup.",
|
|
34
|
+
type: "number"
|
|
35
|
+
},
|
|
36
|
+
autoFocus: {
|
|
37
|
+
description: "Focus the editor on mount and choose where the cursor lands. `true` behaves like \"start\"; a number is a document position.",
|
|
38
|
+
type: `boolean | 'start' | 'end' | 'all' | number | null`,
|
|
39
|
+
defaultValue: "false"
|
|
40
|
+
},
|
|
32
41
|
tooltipMode: {
|
|
33
42
|
description: "How toolbar button tooltips are rendered.",
|
|
34
43
|
type: "ToolbarButtonTooltipMode",
|
|
@@ -67,6 +76,10 @@ const meta = {
|
|
|
67
76
|
title: "Custom toolbar",
|
|
68
77
|
code: "<RichTextEditor value={html} onChange={setHtml} toolbarItems={[\"bold\", \"italic\", \"|\", \"bulletList\"]} />"
|
|
69
78
|
},
|
|
79
|
+
{
|
|
80
|
+
title: "Limit the content length",
|
|
81
|
+
code: "<RichTextEditor value={html} onChange={setHtml} maxLength={280} />"
|
|
82
|
+
},
|
|
70
83
|
{
|
|
71
84
|
title: "Add an official extension",
|
|
72
85
|
code: `// npm i @tiptap/extension-highlight
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CommandOptionListItem } from "../command-option-list/CommandOptionList.cjs";
|
|
2
2
|
import { TagsInputInline } from "./TagsInputInline.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
4
4
|
import { ComponentProps } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/tags-input/TagsInput.d.ts
|
|
@@ -32,6 +32,6 @@ interface TagsInputProps extends Omit<ComponentProps<typeof TagsInputInline>, 'o
|
|
|
32
32
|
* - Options support with dropdown (like Select)
|
|
33
33
|
* - freeSolo mode for custom tags (like MUI Autocomplete)
|
|
34
34
|
*/
|
|
35
|
-
declare function TagsInput(props: TagsInputProps):
|
|
35
|
+
declare function TagsInput(props: TagsInputProps): react_jsx_runtime22.JSX.Element;
|
|
36
36
|
//#endregion
|
|
37
37
|
export { TagsInput, TagsInputProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime23 from "react/jsx-runtime";
|
|
2
2
|
import { ChangeEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, Ref } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/tags-input/TagsInputInline.d.ts
|
|
@@ -77,6 +77,6 @@ declare function TagsInputInline({
|
|
|
77
77
|
canAddCurrentValue,
|
|
78
78
|
onAddCurrentInput,
|
|
79
79
|
showClear
|
|
80
|
-
}: TagsInputInlineProps):
|
|
80
|
+
}: TagsInputInlineProps): react_jsx_runtime23.JSX.Element;
|
|
81
81
|
//#endregion
|
|
82
82
|
export { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime24 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeDropdown.d.ts
|
|
4
4
|
interface ThemeModeDropdownProps {
|
|
@@ -18,7 +18,7 @@ interface ThemeModeDropdownProps {
|
|
|
18
18
|
* Provides Light / Dark / System options.
|
|
19
19
|
* Pure component - requires themeValue and onChange props.
|
|
20
20
|
*/
|
|
21
|
-
declare function ThemeModeDropdown(props: ThemeModeDropdownProps):
|
|
21
|
+
declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime24.JSX.Element;
|
|
22
22
|
declare namespace ThemeModeDropdown {
|
|
23
23
|
var displayName: string;
|
|
24
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime25 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeSwitchInside.d.ts
|
|
4
4
|
type ThemeModeSwitchInsideSize = 'sm' | 'md' | 'lg';
|
|
@@ -26,7 +26,7 @@ interface ThemeModeSwitchInsideProps {
|
|
|
26
26
|
* Icons are embedded within the switch control.
|
|
27
27
|
* Pure component - requires value and onChange props.
|
|
28
28
|
*/
|
|
29
|
-
declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps):
|
|
29
|
+
declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime25.JSX.Element;
|
|
30
30
|
declare namespace ThemeModeSwitchInside {
|
|
31
31
|
var displayName: string;
|
|
32
32
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeSwitchOutside.d.ts
|
|
4
4
|
interface ThemeModeSwitchOutsideProps {
|
|
@@ -23,7 +23,7 @@ interface ThemeModeSwitchOutsideProps {
|
|
|
23
23
|
* Icons flank the switch control on either side.
|
|
24
24
|
* Pure component - requires value and onChange props.
|
|
25
25
|
*/
|
|
26
|
-
declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps):
|
|
26
|
+
declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime26.JSX.Element;
|
|
27
27
|
declare namespace ThemeModeSwitchOutside {
|
|
28
28
|
var displayName: string;
|
|
29
29
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime27 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeToggleButton.d.ts
|
|
4
4
|
interface ThemeModeToggleButtonProps {
|
|
@@ -14,7 +14,7 @@ interface ThemeModeToggleButtonProps {
|
|
|
14
14
|
* Light/Dark toggle button.
|
|
15
15
|
* Pure component - toggles between light and dark.
|
|
16
16
|
*/
|
|
17
|
-
declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps):
|
|
17
|
+
declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime27.JSX.Element;
|
|
18
18
|
declare namespace ThemeModeToggleButton {
|
|
19
19
|
var displayName: string;
|
|
20
20
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixpilot/shadcn-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.9.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",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"@tiptap/extension-link": "^3.22.3",
|
|
47
47
|
"@tiptap/extension-placeholder": "^3.22.3",
|
|
48
48
|
"@tiptap/extension-text-align": "^3.22.3",
|
|
49
|
+
"@tiptap/extensions": "^3.22.3",
|
|
49
50
|
"@tiptap/react": "^3.22.3",
|
|
50
51
|
"@tiptap/starter-kit": "^3.22.3",
|
|
51
52
|
"class-variance-authority": "^0.7.1",
|
|
@@ -71,13 +72,13 @@
|
|
|
71
72
|
"tsdown": "^0.15.12",
|
|
72
73
|
"tsx": "^4.21.0",
|
|
73
74
|
"typescript": "^5.9.3",
|
|
74
|
-
"@internal/hooks": "0.0.0",
|
|
75
75
|
"@internal/eslint-config": "0.3.0",
|
|
76
76
|
"@internal/mcp": "0.0.0",
|
|
77
|
+
"@internal/hooks": "0.0.0",
|
|
77
78
|
"@internal/prettier-config": "0.0.1",
|
|
78
79
|
"@internal/tsconfig": "0.1.0",
|
|
79
|
-
"@internal/
|
|
80
|
-
"@internal/
|
|
80
|
+
"@internal/vitest-config": "0.1.0",
|
|
81
|
+
"@internal/tsdown-config": "0.1.0"
|
|
81
82
|
},
|
|
82
83
|
"prettier": "@internal/prettier-config",
|
|
83
84
|
"scripts": {
|