@xjur-ui/react 1.0.2 → 1.0.4
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/.turbo/turbo-build.log +26 -16
- package/CHANGELOG.md +20 -0
- package/dist/components/avatar-group.d.ts +34 -0
- package/dist/components/avatar-group.js +179 -0
- package/dist/components/avatar.js +1 -0
- package/dist/components/chip.js +1 -0
- package/dist/components/date-picker.js +1 -1
- package/dist/components/divider.js +2 -1
- package/dist/components/dropdown-menu.js +3 -2
- package/dist/components/icon.d.ts +1 -1
- package/dist/components/icon.js +5 -1
- package/dist/components/input.js +1 -1
- package/dist/components/otp-input.js +1 -1
- package/dist/components/rich-editor.d.ts +25 -0
- package/dist/components/rich-editor.js +723 -0
- package/dist/components/search-input.js +1 -1
- package/dist/components/select.js +2 -2
- package/dist/components/skeleton.d.ts +6 -0
- package/dist/components/skeleton.js +16 -0
- package/dist/components/table.d.ts +17 -0
- package/dist/components/table.js +196 -0
- package/dist/components/tooltip.d.ts +11 -0
- package/dist/components/tooltip.js +58 -0
- package/dist/components/typography.d.ts +1 -1
- package/dist/index.css +401 -23
- package/package.json +14 -2
- package/src/components/avatar-group.tsx +76 -0
- package/src/components/avatar.tsx +1 -0
- package/src/components/date-picker.tsx +1 -1
- package/src/components/divider.tsx +2 -1
- package/src/components/dropdown-menu.tsx +1 -1
- package/src/components/input.tsx +1 -1
- package/src/components/otp-input.tsx +1 -1
- package/src/components/rich-editor.tsx +371 -0
- package/src/components/search-input.tsx +1 -2
- package/src/components/select.tsx +1 -1
- package/src/components/skeleton.tsx +12 -0
- package/src/components/table.tsx +160 -0
- package/src/components/tooltip.tsx +63 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-os.ts +32 -0
- package/src/resources/icons.ts +5 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @xjur-ui/react@1.0.
|
|
2
|
+
> @xjur-ui/react@1.0.3 build
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
|
-
CLI Building entry: src/index.ts, src/components/avatar.tsx, src/components/badge.tsx, src/components/button.tsx, src/components/calendar.tsx, src/components/checkbox.tsx, src/components/chip.tsx, src/components/collapsible.tsx, src/components/date-picker.tsx, src/components/divider.tsx, src/components/dropdown-menu.tsx, src/components/icon.tsx, src/components/input.tsx, src/components/list.tsx, src/components/logo.tsx, src/components/otp-input.tsx, src/components/radio.tsx, src/components/search-input.tsx, src/components/select.tsx, src/components/sheet.tsx, src/components/switch.tsx, src/components/tabs.tsx, src/components/tag.tsx, src/components/typography.tsx
|
|
5
|
+
CLI Building entry: src/index.ts, src/components/avatar-group.tsx, src/components/avatar.tsx, src/components/badge.tsx, src/components/button.tsx, src/components/calendar.tsx, src/components/checkbox.tsx, src/components/chip.tsx, src/components/collapsible.tsx, src/components/date-picker.tsx, src/components/divider.tsx, src/components/dropdown-menu.tsx, src/components/icon.tsx, src/components/input.tsx, src/components/list.tsx, src/components/logo.tsx, src/components/otp-input.tsx, src/components/radio.tsx, src/components/rich-editor.tsx, src/components/search-input.tsx, src/components/select.tsx, src/components/sheet.tsx, src/components/skeleton.tsx, src/components/switch.tsx, src/components/table.tsx, src/components/tabs.tsx, src/components/tag.tsx, src/components/tooltip.tsx, src/components/typography.tsx
|
|
6
6
|
CLI Using tsconfig: tsconfig.json
|
|
7
7
|
CLI tsup v8.5.0
|
|
8
8
|
CLI Using tsup config: /home/vsts/work/1/s/packages/react/tsup.config.ts
|
|
@@ -11,33 +11,39 @@ CLI Cleaning output folder
|
|
|
11
11
|
ESM Build start
|
|
12
12
|
DTS Build start
|
|
13
13
|
ESM dist/index.js 0 B
|
|
14
|
-
ESM dist/components/avatar.js
|
|
15
|
-
ESM dist/index.css
|
|
14
|
+
ESM dist/components/avatar-group.js 4.98 KB
|
|
15
|
+
ESM dist/index.css 63.18 KB
|
|
16
|
+
ESM dist/components/avatar.js 1.38 KB
|
|
16
17
|
ESM dist/components/badge.js 3.08 KB
|
|
17
18
|
ESM dist/components/button.js 2.73 KB
|
|
18
19
|
ESM dist/components/calendar.js 19.27 KB
|
|
19
20
|
ESM dist/components/checkbox.js 4.64 KB
|
|
20
|
-
ESM dist/components/chip.js 6.
|
|
21
|
+
ESM dist/components/chip.js 6.49 KB
|
|
21
22
|
ESM dist/components/collapsible.js 998.00 B
|
|
22
|
-
ESM dist/components/
|
|
23
|
-
ESM dist/components/
|
|
24
|
-
ESM dist/components/dropdown-menu.js 7.
|
|
25
|
-
ESM dist/components/icon.js 2.
|
|
26
|
-
ESM dist/components/input.js 8.
|
|
23
|
+
ESM dist/components/divider.js 708.00 B
|
|
24
|
+
ESM dist/components/date-picker.js 6.87 KB
|
|
25
|
+
ESM dist/components/dropdown-menu.js 7.23 KB
|
|
26
|
+
ESM dist/components/icon.js 2.80 KB
|
|
27
|
+
ESM dist/components/input.js 8.04 KB
|
|
27
28
|
ESM dist/components/list.js 4.34 KB
|
|
28
29
|
ESM dist/components/logo.js 20.93 KB
|
|
29
|
-
ESM dist/components/otp-input.js
|
|
30
|
+
ESM dist/components/otp-input.js 993.00 B
|
|
30
31
|
ESM dist/components/radio.js 4.52 KB
|
|
31
|
-
ESM dist/components/
|
|
32
|
-
ESM dist/components/
|
|
32
|
+
ESM dist/components/rich-editor.js 20.54 KB
|
|
33
|
+
ESM dist/components/search-input.js 7.67 KB
|
|
34
|
+
ESM dist/components/select.js 15.37 KB
|
|
33
35
|
ESM dist/components/sheet.js 6.89 KB
|
|
36
|
+
ESM dist/components/skeleton.js 349.00 B
|
|
34
37
|
ESM dist/components/switch.js 1.13 KB
|
|
38
|
+
ESM dist/components/table.js 4.35 KB
|
|
35
39
|
ESM dist/components/tabs.js 1.43 KB
|
|
36
40
|
ESM dist/components/tag.js 4.77 KB
|
|
41
|
+
ESM dist/components/tooltip.js 1.96 KB
|
|
37
42
|
ESM dist/components/typography.js 2.21 KB
|
|
38
|
-
ESM ⚡️ Build success in
|
|
39
|
-
DTS ⚡️ Build success in
|
|
43
|
+
ESM ⚡️ Build success in 1411ms
|
|
44
|
+
DTS ⚡️ Build success in 6457ms
|
|
40
45
|
DTS dist/index.d.ts 13.00 B
|
|
46
|
+
DTS dist/components/avatar-group.d.ts 815.00 B
|
|
41
47
|
DTS dist/components/badge.d.ts 607.00 B
|
|
42
48
|
DTS dist/components/calendar.d.ts 448.00 B
|
|
43
49
|
DTS dist/components/checkbox.d.ts 305.00 B
|
|
@@ -50,14 +56,18 @@ DTS dist/components/divider.d.ts 336.00 B
|
|
|
50
56
|
DTS dist/components/logo.d.ts 373.00 B
|
|
51
57
|
DTS dist/components/otp-input.d.ts 662.00 B
|
|
52
58
|
DTS dist/components/radio.d.ts 531.00 B
|
|
59
|
+
DTS dist/components/rich-editor.d.ts 1.73 KB
|
|
53
60
|
DTS dist/components/select.d.ts 2.48 KB
|
|
54
61
|
DTS dist/components/list.d.ts 1.28 KB
|
|
55
62
|
DTS dist/components/search-input.d.ts 1.10 KB
|
|
56
63
|
DTS dist/components/button.d.ts 872.00 B
|
|
57
64
|
DTS dist/components/sheet.d.ts 1.62 KB
|
|
65
|
+
DTS dist/components/skeleton.d.ts 225.00 B
|
|
58
66
|
DTS dist/components/switch.d.ts 300.00 B
|
|
67
|
+
DTS dist/components/table.d.ts 1.28 KB
|
|
59
68
|
DTS dist/components/tabs.d.ts 737.00 B
|
|
60
69
|
DTS dist/components/tag.d.ts 1.07 KB
|
|
70
|
+
DTS dist/components/tooltip.d.ts 808.00 B
|
|
61
71
|
DTS dist/components/typography.d.ts 993.00 B
|
|
62
72
|
DTS dist/components/input.d.ts 2.12 KB
|
|
63
|
-
DTS dist/components/icon.d.ts 2.
|
|
73
|
+
DTS dist/components/icon.d.ts 2.32 KB
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @xjur-ui/react
|
|
2
2
|
|
|
3
|
+
## 1.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 05ff877: Adiciona tooltip
|
|
8
|
+
- 92ace06: Add rich text area editor
|
|
9
|
+
- fd4127f: Release
|
|
10
|
+
- 6436dc8: Adiciona componente skeleton
|
|
11
|
+
- Updated dependencies [fd4127f]
|
|
12
|
+
- Updated dependencies [6436dc8]
|
|
13
|
+
- @xjur-ui/util@1.0.2
|
|
14
|
+
- @xjur-ui/styles@1.0.2
|
|
15
|
+
|
|
16
|
+
## 1.0.3
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- fb1a2db: Create avatar group component
|
|
21
|
+
- 31a7409: Adiciona componente de tabela
|
|
22
|
+
|
|
3
23
|
## 1.0.2
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface AvatarGroupProps {
|
|
4
|
+
/**
|
|
5
|
+
* Lista de avatares para exibir
|
|
6
|
+
*/
|
|
7
|
+
avatars: Array<{
|
|
8
|
+
src?: string;
|
|
9
|
+
alt?: string;
|
|
10
|
+
fallback?: string;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Número máximo de avatares a exibir antes de mostrar o indicador de overflow
|
|
14
|
+
* @default 3
|
|
15
|
+
*/
|
|
16
|
+
max?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Tamanho dos avatares
|
|
19
|
+
* @default 'md'
|
|
20
|
+
*/
|
|
21
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
22
|
+
/**
|
|
23
|
+
* Classe CSS adicional
|
|
24
|
+
*/
|
|
25
|
+
className?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Espaçamento entre os avatares (em pixels)
|
|
28
|
+
* @default -8
|
|
29
|
+
*/
|
|
30
|
+
spacing?: number;
|
|
31
|
+
}
|
|
32
|
+
declare function AvatarGroup({ avatars, max, size, className }: AvatarGroupProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
export { AvatarGroup, type AvatarGroupProps };
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// src/components/avatar-group.tsx
|
|
2
|
+
import { cx as cx2 } from "@xjur-ui/util";
|
|
3
|
+
|
|
4
|
+
// src/components/avatar.tsx
|
|
5
|
+
import "react";
|
|
6
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
7
|
+
import { cx } from "@xjur-ui/util";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function AvatarRoot({
|
|
10
|
+
className,
|
|
11
|
+
size = "md",
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
AvatarPrimitive.Root,
|
|
16
|
+
{
|
|
17
|
+
className: cx(
|
|
18
|
+
"rounded-circle relative flex shrink-0 overflow-hidden",
|
|
19
|
+
"data-[size=lg]:size-large-8x data-[size=md]:size-large-4x data-[size=sm]:size-large-2x data-[size=xs]:size-large-1x",
|
|
20
|
+
"data-[size=lg]:text-size-headline-md data-[size=md]:text-size-label-lg data-[size=sm]:text-size-label-sm data-[size=xs]:text-size-label-sm",
|
|
21
|
+
className
|
|
22
|
+
),
|
|
23
|
+
"data-size": size,
|
|
24
|
+
"data-slot": "avatar",
|
|
25
|
+
...props
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
function AvatarImage({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
AvatarPrimitive.Image,
|
|
35
|
+
{
|
|
36
|
+
className: cx("aspect-square size-full", className),
|
|
37
|
+
"data-slot": "avatar-image",
|
|
38
|
+
...props
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
function AvatarFallback({
|
|
43
|
+
className,
|
|
44
|
+
...props
|
|
45
|
+
}) {
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
AvatarPrimitive.Fallback,
|
|
48
|
+
{
|
|
49
|
+
className: cx(
|
|
50
|
+
"bg-alt-1 rounded-circle flex size-full items-center justify-center font-medium text-white",
|
|
51
|
+
className
|
|
52
|
+
),
|
|
53
|
+
"data-slot": "avatar-fallback",
|
|
54
|
+
...props
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// src/components/typography.tsx
|
|
60
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
61
|
+
import { cva } from "@xjur-ui/util";
|
|
62
|
+
import { memo } from "react";
|
|
63
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
64
|
+
var typographyVariants = cva("", {
|
|
65
|
+
variants: {
|
|
66
|
+
variant: {
|
|
67
|
+
body: "",
|
|
68
|
+
label: "",
|
|
69
|
+
title: "",
|
|
70
|
+
headline: ""
|
|
71
|
+
},
|
|
72
|
+
size: {
|
|
73
|
+
"sm-2x": "",
|
|
74
|
+
"sm-1x": "",
|
|
75
|
+
sm: "",
|
|
76
|
+
md: "",
|
|
77
|
+
lg: ""
|
|
78
|
+
},
|
|
79
|
+
weight: {
|
|
80
|
+
thin: "font-thin",
|
|
81
|
+
extraLight: "font-extralight",
|
|
82
|
+
light: "font-light",
|
|
83
|
+
normal: "font-normal",
|
|
84
|
+
medium: "font-medium",
|
|
85
|
+
semibold: "font-semibold",
|
|
86
|
+
bold: "font-bold",
|
|
87
|
+
extraBold: "font-extrabold",
|
|
88
|
+
black: "font-black"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
compoundVariants: [
|
|
92
|
+
{ variant: "body", size: "sm-1x", class: "text-size-body-sm-1x" },
|
|
93
|
+
{ variant: "body", size: "sm", class: "text-size-body-sm" },
|
|
94
|
+
{ variant: "body", size: "md", class: "text-size-body-md" },
|
|
95
|
+
{ variant: "body", size: "lg", class: "text-size-body-lg" },
|
|
96
|
+
{ variant: "label", size: "sm-2x", class: "text-size-label-sm-2x" },
|
|
97
|
+
{ variant: "label", size: "sm-1x", class: "text-size-label-sm-1x" },
|
|
98
|
+
{ variant: "label", size: "sm", class: "text-size-label-sm" },
|
|
99
|
+
{ variant: "label", size: "md", class: "text-size-label-md" },
|
|
100
|
+
{ variant: "label", size: "lg", class: "text-size-label-lg" },
|
|
101
|
+
{ variant: "title", size: "sm", class: "text-size-title-sm" },
|
|
102
|
+
{ variant: "title", size: "md", class: "text-size-title-md" },
|
|
103
|
+
{ variant: "title", size: "lg", class: "text-size-title-lg" },
|
|
104
|
+
{ variant: "headline", size: "sm", class: "text-size-headline-sm" },
|
|
105
|
+
{ variant: "headline", size: "md", class: "text-size-headline-md" },
|
|
106
|
+
{ variant: "headline", size: "lg", class: "text-size-headline-lg" }
|
|
107
|
+
],
|
|
108
|
+
defaultVariants: {
|
|
109
|
+
variant: "body",
|
|
110
|
+
size: "md",
|
|
111
|
+
weight: "normal"
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
var Typography = memo(
|
|
115
|
+
({
|
|
116
|
+
variant,
|
|
117
|
+
size,
|
|
118
|
+
weight,
|
|
119
|
+
asChild,
|
|
120
|
+
className,
|
|
121
|
+
...props
|
|
122
|
+
}) => {
|
|
123
|
+
const Component = asChild ? Slot : "span";
|
|
124
|
+
return /* @__PURE__ */ jsx2(
|
|
125
|
+
Component,
|
|
126
|
+
{
|
|
127
|
+
className: typographyVariants({ variant, size, weight, className }),
|
|
128
|
+
...props
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
Typography.displayName = "Typography";
|
|
134
|
+
|
|
135
|
+
// src/components/avatar-group.tsx
|
|
136
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
137
|
+
function AvatarGroup({
|
|
138
|
+
avatars,
|
|
139
|
+
max = 3,
|
|
140
|
+
size = "md",
|
|
141
|
+
className
|
|
142
|
+
}) {
|
|
143
|
+
const visibleAvatars = avatars.slice(0, max);
|
|
144
|
+
const remainingCount = avatars.length - max;
|
|
145
|
+
return /* @__PURE__ */ jsxs(
|
|
146
|
+
"div",
|
|
147
|
+
{
|
|
148
|
+
className: cx2("-space-x-small-1x flex items-center", className),
|
|
149
|
+
"data-slot": "avatar-group",
|
|
150
|
+
children: [
|
|
151
|
+
visibleAvatars.map((avatar, index) => /* @__PURE__ */ jsxs(
|
|
152
|
+
AvatarRoot,
|
|
153
|
+
{
|
|
154
|
+
className: "border-icon-neutral-5 border-2",
|
|
155
|
+
size,
|
|
156
|
+
children: [
|
|
157
|
+
avatar.src && /* @__PURE__ */ jsx3(
|
|
158
|
+
AvatarImage,
|
|
159
|
+
{
|
|
160
|
+
alt: avatar.alt || `Avatar ${index + 1}`,
|
|
161
|
+
src: avatar.src
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
/* @__PURE__ */ jsx3(AvatarFallback, { children: avatar.fallback || `A${index + 1}` })
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
index
|
|
168
|
+
)),
|
|
169
|
+
remainingCount > 0 && /* @__PURE__ */ jsx3(AvatarRoot, { className: "bg-layer-1-hover", size, children: /* @__PURE__ */ jsx3(AvatarFallback, { className: "bg-layer-1-hover font-medium", children: /* @__PURE__ */ jsxs(Typography, { className: "text-neutral-dark", weight: "medium", children: [
|
|
170
|
+
"+",
|
|
171
|
+
remainingCount
|
|
172
|
+
] }) }) })
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
export {
|
|
178
|
+
AvatarGroup
|
|
179
|
+
};
|
|
@@ -14,6 +14,7 @@ function AvatarRoot({
|
|
|
14
14
|
className: cx(
|
|
15
15
|
"rounded-circle relative flex shrink-0 overflow-hidden",
|
|
16
16
|
"data-[size=lg]:size-large-8x data-[size=md]:size-large-4x data-[size=sm]:size-large-2x data-[size=xs]:size-large-1x",
|
|
17
|
+
"data-[size=lg]:text-size-headline-md data-[size=md]:text-size-label-lg data-[size=sm]:text-size-label-sm data-[size=xs]:text-size-label-sm",
|
|
17
18
|
className
|
|
18
19
|
),
|
|
19
20
|
"data-size": size,
|
package/dist/components/chip.js
CHANGED
|
@@ -116,6 +116,7 @@ function AvatarRoot({
|
|
|
116
116
|
className: cx2(
|
|
117
117
|
"rounded-circle relative flex shrink-0 overflow-hidden",
|
|
118
118
|
"data-[size=lg]:size-large-8x data-[size=md]:size-large-4x data-[size=sm]:size-large-2x data-[size=xs]:size-large-1x",
|
|
119
|
+
"data-[size=lg]:text-size-headline-md data-[size=md]:text-size-label-lg data-[size=sm]:text-size-label-sm data-[size=xs]:text-size-label-sm",
|
|
119
120
|
className
|
|
120
121
|
),
|
|
121
122
|
"data-size": size,
|
|
@@ -94,7 +94,7 @@ function DatePickerTrigger({
|
|
|
94
94
|
className,
|
|
95
95
|
"group h-large-4x rounded-small-1x gap-small py-small_1x-alt px-small relative flex w-full cursor-pointer items-center",
|
|
96
96
|
"bg-layer-2-idle border-border-layer-2 hover:border-border-layer-3 border",
|
|
97
|
-
"data-[state=open]:border-primary-idle
|
|
97
|
+
"data-[state=open]:border-primary-idle",
|
|
98
98
|
"has-[input:not(:placeholder-shown)]:text-primary-idle",
|
|
99
99
|
"has-[input:not(:placeholder-shown)]:border-primary-idle"
|
|
100
100
|
),
|
|
@@ -13,7 +13,8 @@ function Divider({
|
|
|
13
13
|
SeparatorPrimitive.Root,
|
|
14
14
|
{
|
|
15
15
|
className: cx(
|
|
16
|
-
"bg-border-layer-2 shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full
|
|
16
|
+
"bg-border-layer-2 shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full",
|
|
17
|
+
"data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
17
18
|
className
|
|
18
19
|
),
|
|
19
20
|
"data-slot": "separator",
|
|
@@ -191,7 +191,8 @@ function Divider({
|
|
|
191
191
|
SeparatorPrimitive.Root,
|
|
192
192
|
{
|
|
193
193
|
className: cx2(
|
|
194
|
-
"bg-border-layer-2 shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full
|
|
194
|
+
"bg-border-layer-2 shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full",
|
|
195
|
+
"data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
195
196
|
className
|
|
196
197
|
),
|
|
197
198
|
"data-slot": "separator",
|
|
@@ -238,7 +239,7 @@ function DropdownMenuContent({
|
|
|
238
239
|
{
|
|
239
240
|
align,
|
|
240
241
|
className: cx3(
|
|
241
|
-
"group z-10 max-h-[var(--radix-popover-content-available-height)] max-w-[var(--radix-popover-trigger-width)] min-w-[
|
|
242
|
+
"group z-10 max-h-[var(--radix-popover-content-available-height)] max-w-[var(--radix-popover-trigger-width)] min-w-[var(--radix-popover-trigger-width)]",
|
|
242
243
|
className
|
|
243
244
|
),
|
|
244
245
|
"data-slot": "dropdown-menu-content",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
3
|
|
|
4
|
-
declare const icons: readonly ["account_balance", "ad_units", "add_a_photo", "add", "adjust", "archive", "arrow_downward_alt", "arrow_downward", "arrow_drop_down", "arrow_drop_up", "arrow_split", "arrow_upward_alt", "arrow_upward", "attach_file", "attach_money", "autorenew", "brightness_1", "calendar_today", "call", "chat_bubble", "check_circle", "check", "chevron_left", "chevron_right", "close", "collapse_all", "contacts", "content_copy", "dangerous", "dashboard", "delete", "download", "draft", "drafts", "drag_handle", "drag_indicator", "edit_document", "edit_square", "edit", "error", "expand_all", "file_export", "filter_alt", "filter_list", "first_page", "flag_2", "folder_open", "folder", "format_bold", "format_italic", "format_italic", "format_size", "format_strikethrough", "gavel", "group", "headphones", "help", "hourglass_bottom", "imagesmode", "import_contacts", "inbox", "info", "inventory_2", "keep", "keep", "keyboard_arrow_down", "keyboard_arrow_up", "keyboard_return", "label_off", "label", "last_page", "left_panel_close", "left_panel_open", "link_off", "link", "linked_services", "list", "location_on", "lock", "logout", "mail", "menu", "mic", "more_vert", "notifications", "numbers", "person_add", "person_off", "person", "play_circle", "progress_activity", "question_mark", "radio_button_unchecked", "refresh", "remove", "reply", "right_panel_close", "right_panel_open", "schedule", "search", "sell", "send", "settings", "share", "smart_display", "star", "star", "swap_vert", "thumb_down", "thumb_up", "tune", "unarchive", "undo", "upload", "verified_user", "videocam", "view_list", "view_module", "view_object_track", "visibility_off", "visibility", "warning", "wifi_2_bar", "wifi_off", "wifi", "work", "workspaces", "article", "id_card", "badge", "home", "save", "code", "favorite", "analytics", "reports", "event", "account_circle", "history", "security", "bar_chart", "category"];
|
|
4
|
+
declare const icons: readonly ["account_balance", "ad_units", "add_a_photo", "add", "adjust", "archive", "arrow_downward_alt", "arrow_downward", "arrow_drop_down", "arrow_drop_up", "arrow_split", "arrow_upward_alt", "arrow_upward", "attach_file", "attach_money", "autorenew", "brightness_1", "calendar_today", "call", "chat_bubble", "check_circle", "check", "chevron_left", "chevron_right", "close", "collapse_all", "contacts", "content_copy", "dangerous", "dashboard", "delete", "download", "draft", "drafts", "drag_handle", "drag_indicator", "edit_document", "edit_square", "edit", "error", "expand_all", "file_export", "filter_alt", "filter_list", "first_page", "flag_2", "folder_open", "folder", "format_bold", "format_italic", "format_italic", "format_size", "format_strikethrough", "gavel", "group", "headphones", "help", "hourglass_bottom", "imagesmode", "import_contacts", "inbox", "info", "inventory_2", "keep", "keep", "keyboard_arrow_down", "keyboard_arrow_up", "keyboard_return", "label_off", "label", "last_page", "left_panel_close", "left_panel_open", "link_off", "link", "linked_services", "list", "location_on", "lock", "logout", "mail", "menu", "mic", "more_vert", "notifications", "numbers", "person_add", "person_off", "person", "play_circle", "progress_activity", "question_mark", "radio_button_unchecked", "refresh", "remove", "reply", "right_panel_close", "right_panel_open", "schedule", "search", "sell", "send", "settings", "share", "smart_display", "star", "star", "swap_vert", "thumb_down", "thumb_up", "tune", "unarchive", "undo", "upload", "verified_user", "videocam", "view_list", "view_module", "view_object_track", "visibility_off", "visibility", "warning", "wifi_2_bar", "wifi_off", "wifi", "work", "workspaces", "article", "id_card", "badge", "home", "save", "code", "favorite", "analytics", "reports", "event", "account_circle", "history", "security", "bar_chart", "category", "format_underlined", "format_list_bulleted", "format_list_numbered", "redo"];
|
|
5
5
|
type IconType = (typeof icons)[number];
|
|
6
6
|
|
|
7
7
|
type IconProps = {
|
package/dist/components/icon.js
CHANGED
package/dist/components/input.js
CHANGED
|
@@ -108,7 +108,7 @@ function InputContent({ className, ...props }) {
|
|
|
108
108
|
const variants = cva(
|
|
109
109
|
[
|
|
110
110
|
"relative h-large-4x rounded-small-1x gap-small py-small_1x-alt px-small flex items-center w-full",
|
|
111
|
-
"focus-within:border-primary-idle focus-within:
|
|
111
|
+
"focus-within:border-primary-idle focus-within:border",
|
|
112
112
|
"group-has-[div[data-slot=input-right-action-slot]]:rounded-r-none",
|
|
113
113
|
"group-has-[div[data-slot=input-left-action-slot]]:rounded-l-none"
|
|
114
114
|
],
|
|
@@ -26,7 +26,7 @@ function Input2({
|
|
|
26
26
|
className: cx(
|
|
27
27
|
className,
|
|
28
28
|
"text-neutral-dark h-large-6x bg-layer-2-hover rounded-small-1x w-full text-center outline-0",
|
|
29
|
-
"focus-within:border-primary-idle focus-within:
|
|
29
|
+
"focus-within:border-primary-idle focus-within:border"
|
|
30
30
|
),
|
|
31
31
|
...props
|
|
32
32
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { EditorOptions, Extension, EditorContent } from '@tiptap/react';
|
|
4
|
+
export { useCurrentEditor as useRichTextEditor, useEditorState as useRichTextEditorState } from '@tiptap/react';
|
|
5
|
+
import { ButtonProps } from './button.js';
|
|
6
|
+
import 'class-variance-authority/types';
|
|
7
|
+
import '@xjur-ui/util';
|
|
8
|
+
|
|
9
|
+
declare function RichEditorRoot({ className, editorOptions, ...props }: ComponentProps<'div'> & {
|
|
10
|
+
editorOptions?: Partial<Omit<EditorOptions, 'extensions'> & {
|
|
11
|
+
extensions?: Extension[];
|
|
12
|
+
}>;
|
|
13
|
+
}): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function RichEditorContent({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function RichEditorCaption({ className, ...props }: ComponentProps<'p'>): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function RichEditorAreaText({ className, ...props }: Omit<ComponentProps<typeof EditorContent>, 'editor'>): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function RichEditorToolbar({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
18
|
+
declare function ToolbarButton({ appearance, variant, onMouseDown, onPointerDown, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
type ToggleButtonName = 'bold' | 'italic' | 'underline' | 'strike' | 'bulletList' | 'orderedList' | 'undo' | 'redo';
|
|
20
|
+
declare function ToggleButton({ name, ...props }: ButtonProps & {
|
|
21
|
+
name: ToggleButtonName;
|
|
22
|
+
}): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare function HeadingButton({ appearance, variant, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
export { HeadingButton, RichEditorAreaText, RichEditorCaption, RichEditorContent, RichEditorRoot, RichEditorToolbar, ToggleButton, ToolbarButton };
|