@vkzstudio/muza-ui 1.0.28 → 1.0.30
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/components/Calendar/Calendar.d.ts +3 -1
- package/dist/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +129 -120
- package/dist/components/Checkbox/Checkbox.d.ts +4 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +46 -41
- package/dist/components/Checkbox/Checkbox.stories.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +2 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +51 -49
- package/dist/components/DatePicker/DatePicker.stories.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.js +79 -55
- package/dist/components/MultiSelect/MultiSelect.d.ts +2 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +34 -32
- package/dist/components/Radio/Radio.d.ts +3 -1
- package/dist/components/Radio/Radio.d.ts.map +1 -1
- package/dist/components/Radio/Radio.js +10 -9
- package/dist/components/Radio/Radio.stories.d.ts +1 -0
- package/dist/components/Radio/Radio.stories.d.ts.map +1 -1
- package/dist/components/TextEditor/EditorToolbar.js +35 -35
- package/dist/components/TextEditor/TextEditor.js +10 -10
- package/dist/components/Textarea/Textarea.js +10 -10
- package/dist/muza-ui.css +1 -1
- package/dist/styles/token-colors.css +1 -10
- package/dist/styles/token-sizes.css +20 -0
- package/package.json +164 -164
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as r, jsxs as u } from "react/jsx-runtime";
|
|
2
|
-
import f, { forwardRef as
|
|
2
|
+
import f, { forwardRef as $, useId as P, useMemo as T, useRef as _, useEffect as B } from "react";
|
|
3
3
|
import { triggerWrapperVariants as L } from "../Select/utils.js";
|
|
4
|
-
import { useMuzaTranslations as
|
|
4
|
+
import { useMuzaTranslations as U } from "../../translations/TranslationContext.js";
|
|
5
5
|
import { Tag as p } from "../Tag/Tag.js";
|
|
6
|
-
import { FormField as
|
|
7
|
-
import { DropdownMenu as
|
|
8
|
-
import { Typography as
|
|
9
|
-
import { AltArrowUpOutline as
|
|
10
|
-
import { cn as
|
|
11
|
-
const
|
|
6
|
+
import { FormField as G } from "../FormField/FormField.js";
|
|
7
|
+
import { DropdownMenu as H, DropdownMenuTrigger as J, DropdownMenuContent as K, DropdownMenuCheckboxItem as Q } from "../DropdownMenu/DropdownMenu.js";
|
|
8
|
+
import { Typography as X } from "../Typography/Typography.js";
|
|
9
|
+
import { AltArrowUpOutline as Y } from "@solar-icons/react-perf";
|
|
10
|
+
import { cn as Z } from "../../utils/cn.js";
|
|
11
|
+
const ee = $(
|
|
12
12
|
(I, h) => {
|
|
13
|
-
const z =
|
|
13
|
+
const z = U(), {
|
|
14
14
|
label: x,
|
|
15
15
|
hint: g,
|
|
16
16
|
error: b,
|
|
17
|
-
options:
|
|
17
|
+
options: o,
|
|
18
18
|
onChange: l,
|
|
19
19
|
value: t,
|
|
20
|
-
disabled:
|
|
20
|
+
disabled: c,
|
|
21
21
|
prefix: d,
|
|
22
22
|
maxNumberOfVisibleTags: i = 2,
|
|
23
23
|
size: D,
|
|
@@ -25,8 +25,9 @@ const Z = V(
|
|
|
25
25
|
required: v,
|
|
26
26
|
disableRequiredAsterisk: W,
|
|
27
27
|
labelExtra: k,
|
|
28
|
-
infoTooltip: A
|
|
29
|
-
|
|
28
|
+
infoTooltip: A,
|
|
29
|
+
collisionPadding: C
|
|
30
|
+
} = I, w = S ?? z.select.placeholder, N = P(), O = x ? `${N}-label` : void 0, j = g ? `${N}-hint` : void 0, M = T(() => new Map(o.map((e) => [e.value, e.label])), [o]), q = T(() => {
|
|
30
31
|
const e = t && t.map((n) => M.get(n));
|
|
31
32
|
return e != null && e.length ? e.length <= i ? /* @__PURE__ */ r("div", { className: "flex flex-1 items-start justify-start gap-xs", children: e.map((n, s) => /* @__PURE__ */ r(p, { variant: "info", className: "max-w-[72px]", children: n }, s)) }) : /* @__PURE__ */ r("div", { className: "flex flex-1 items-center gap-xs", children: [
|
|
32
33
|
...e.slice(0, i).map((n, s) => /* @__PURE__ */ r(
|
|
@@ -43,7 +44,7 @@ const Z = V(
|
|
|
43
44
|
"+"
|
|
44
45
|
] }, "more")
|
|
45
46
|
] }) : /* @__PURE__ */ r(
|
|
46
|
-
|
|
47
|
+
X,
|
|
47
48
|
{
|
|
48
49
|
size: "input",
|
|
49
50
|
className: "grow-1 fix-y-text truncate text-left text-comp-select-text-placeholder",
|
|
@@ -52,10 +53,10 @@ const Z = V(
|
|
|
52
53
|
children: w
|
|
53
54
|
}
|
|
54
55
|
);
|
|
55
|
-
}, [t, w, i, M]), [y,
|
|
56
|
+
}, [t, w, i, M]), [y, E] = f.useState(!1), [R, F] = f.useState(0), m = f.useRef(!1), V = _(null), a = (typeof h == "function" ? null : h) ?? V;
|
|
56
57
|
return B(() => {
|
|
57
58
|
const e = () => {
|
|
58
|
-
a.current &&
|
|
59
|
+
a.current && F(a.current.offsetWidth);
|
|
59
60
|
};
|
|
60
61
|
e();
|
|
61
62
|
const n = new ResizeObserver(e);
|
|
@@ -63,32 +64,32 @@ const Z = V(
|
|
|
63
64
|
n.disconnect();
|
|
64
65
|
};
|
|
65
66
|
}, [a]), /* @__PURE__ */ r(
|
|
66
|
-
|
|
67
|
+
G,
|
|
67
68
|
{
|
|
68
69
|
label: x,
|
|
69
70
|
hint: g,
|
|
70
71
|
error: b,
|
|
71
72
|
required: v,
|
|
72
73
|
disableRequiredAsterisk: W,
|
|
73
|
-
labelId:
|
|
74
|
-
hintId:
|
|
74
|
+
labelId: O,
|
|
75
|
+
hintId: j,
|
|
75
76
|
labelExtra: k,
|
|
76
77
|
infoTooltip: A,
|
|
77
78
|
children: /* @__PURE__ */ u(
|
|
78
|
-
|
|
79
|
+
H,
|
|
79
80
|
{
|
|
80
81
|
onOpenChange: (e) => {
|
|
81
|
-
|
|
82
|
+
E(e);
|
|
82
83
|
},
|
|
83
84
|
children: [
|
|
84
|
-
/* @__PURE__ */ r(
|
|
85
|
+
/* @__PURE__ */ r(J, { disabled: c, asChild: !0, children: /* @__PURE__ */ r(
|
|
85
86
|
"button",
|
|
86
87
|
{
|
|
87
88
|
ref: a,
|
|
88
89
|
type: "button",
|
|
89
90
|
role: "input",
|
|
90
91
|
tabIndex: 0,
|
|
91
|
-
disabled:
|
|
92
|
+
disabled: c,
|
|
92
93
|
"aria-required": v,
|
|
93
94
|
className: L({
|
|
94
95
|
size: D,
|
|
@@ -100,15 +101,15 @@ const Z = V(
|
|
|
100
101
|
d && /* @__PURE__ */ r(
|
|
101
102
|
"span",
|
|
102
103
|
{
|
|
103
|
-
className:
|
|
104
|
+
className: c ? "text-comp-select-icon-disabled" : "text-comp-select-icon-brand-def",
|
|
104
105
|
children: d
|
|
105
106
|
}
|
|
106
107
|
),
|
|
107
|
-
|
|
108
|
+
q,
|
|
108
109
|
/* @__PURE__ */ r(
|
|
109
|
-
|
|
110
|
+
Y,
|
|
110
111
|
{
|
|
111
|
-
className:
|
|
112
|
+
className: Z(
|
|
112
113
|
"transition-transform duration-200",
|
|
113
114
|
y ? "rotate-0" : "rotate-180"
|
|
114
115
|
)
|
|
@@ -118,7 +119,7 @@ const Z = V(
|
|
|
118
119
|
}
|
|
119
120
|
) }),
|
|
120
121
|
/* @__PURE__ */ r(
|
|
121
|
-
|
|
122
|
+
K,
|
|
122
123
|
{
|
|
123
124
|
className: "mt-1",
|
|
124
125
|
style: {
|
|
@@ -127,8 +128,9 @@ const Z = V(
|
|
|
127
128
|
onCloseAutoFocus: (e) => {
|
|
128
129
|
m.current || e.preventDefault(), m.current = !1;
|
|
129
130
|
},
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
collisionPadding: C,
|
|
132
|
+
children: o.map((e) => /* @__PURE__ */ r(
|
|
133
|
+
Q,
|
|
132
134
|
{
|
|
133
135
|
checked: t == null ? void 0 : t.includes(e.value),
|
|
134
136
|
disabled: e.disabled,
|
|
@@ -149,7 +151,7 @@ const Z = V(
|
|
|
149
151
|
);
|
|
150
152
|
}
|
|
151
153
|
);
|
|
152
|
-
|
|
154
|
+
ee.displayName = "MultiSelect";
|
|
153
155
|
export {
|
|
154
|
-
|
|
156
|
+
ee as MultiSelect
|
|
155
157
|
};
|
|
@@ -27,8 +27,10 @@ export interface RadioGroupItemProps extends React.ComponentProps<typeof RadioGr
|
|
|
27
27
|
label?: string;
|
|
28
28
|
/** Secondary text displayed below the primary label in lighter styling. */
|
|
29
29
|
secondaryLabel?: string;
|
|
30
|
+
/** Font weight for the primary label. When `secondaryLabel` is present, primary is always medium. @default 'regular' */
|
|
31
|
+
weight?: 'regular' | 'medium';
|
|
30
32
|
}
|
|
31
33
|
declare const RadioGroup: ({ className, ...props }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
declare const RadioGroupItem: ({ className, id, label, secondaryLabel, disabled, ...props }: RadioGroupItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
declare const RadioGroupItem: ({ className, id, label, secondaryLabel, disabled, weight, ...props }: RadioGroupItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
35
|
export { RadioGroup, RadioGroupItem };
|
|
34
36
|
//# sourceMappingURL=Radio.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAIlE;;;GAGG;AACH,MAAM,WAAW,eACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC;IAC7D,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kDAAkD;IAClD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,mBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC;IAC7D,mGAAmG;IACnG,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAIlE;;;GAGG;AACH,MAAM,WAAW,eACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC;IAC7D,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kDAAkD;IAClD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,mBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC;IAC7D,mGAAmG;IACnG,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,wHAAwH;IACxH,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;CAC9B;AAED,QAAA,MAAM,UAAU,GAAI,yBAAyB,eAAe,4CAQ3D,CAAA;AAED,QAAA,MAAM,cAAc,GAAI,sEAQrB,mBAAmB,4CAgErB,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as b from "react";
|
|
3
3
|
import * as s from "@radix-ui/react-radio-group";
|
|
4
4
|
import { cn as t } from "../../utils/cn.js";
|
|
5
5
|
import { Typography as m } from "../Typography/Typography.js";
|
|
6
|
-
const
|
|
6
|
+
const g = ({ className: i, ...a }) => /* @__PURE__ */ r(
|
|
7
7
|
s.Root,
|
|
8
8
|
{
|
|
9
9
|
"data-slot": "radio-group",
|
|
10
10
|
className: t(i),
|
|
11
11
|
...a
|
|
12
12
|
}
|
|
13
|
-
),
|
|
13
|
+
), k = ({
|
|
14
14
|
className: i,
|
|
15
15
|
id: a,
|
|
16
16
|
label: c,
|
|
17
17
|
secondaryLabel: e,
|
|
18
18
|
disabled: o,
|
|
19
|
-
|
|
19
|
+
weight: l = "regular",
|
|
20
|
+
...f
|
|
20
21
|
}) => {
|
|
21
|
-
const
|
|
22
|
+
const p = b.useId(), d = a || p;
|
|
22
23
|
return /* @__PURE__ */ n("div", { className: "isolate flex items-start gap-sm", children: [
|
|
23
24
|
/* @__PURE__ */ r(
|
|
24
25
|
s.Item,
|
|
@@ -35,7 +36,7 @@ const x = ({ className: i, ...a }) => /* @__PURE__ */ r(
|
|
|
35
36
|
),
|
|
36
37
|
id: d,
|
|
37
38
|
disabled: o,
|
|
38
|
-
...
|
|
39
|
+
...f,
|
|
39
40
|
children: /* @__PURE__ */ r(
|
|
40
41
|
s.Indicator,
|
|
41
42
|
{
|
|
@@ -63,7 +64,7 @@ const x = ({ className: i, ...a }) => /* @__PURE__ */ r(
|
|
|
63
64
|
{
|
|
64
65
|
component: "span",
|
|
65
66
|
variant: "body",
|
|
66
|
-
weight: e != null && e.length ? "medium" :
|
|
67
|
+
weight: e != null && e.length ? "medium" : l,
|
|
67
68
|
size: "base",
|
|
68
69
|
children: c
|
|
69
70
|
}
|
|
@@ -87,6 +88,6 @@ const x = ({ className: i, ...a }) => /* @__PURE__ */ r(
|
|
|
87
88
|
] });
|
|
88
89
|
};
|
|
89
90
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
g as RadioGroup,
|
|
92
|
+
k as RadioGroupItem
|
|
92
93
|
};
|
|
@@ -5,5 +5,6 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof RadioGroupItem>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const Playground: Story;
|
|
8
|
+
export declare const MediumWeight: Story;
|
|
8
9
|
export declare const WithSecondaryLabel: Story;
|
|
9
10
|
//# sourceMappingURL=Radio.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/Radio.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAc,cAAc,EAAE,MAAM,SAAS,CAAA;AAEpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,
|
|
1
|
+
{"version":3,"file":"Radio.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/Radio.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAc,cAAc,EAAE,MAAM,SAAS,CAAA;AAEpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAwDrC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAA;AAE5C,eAAO,MAAM,OAAO,EAAE,KAqBrB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KA0BxB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAmB1B,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KA6BhC,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ToolbarButton as
|
|
3
|
-
import { ToolbarSeparator as
|
|
1
|
+
import { jsxs as h, Fragment as m, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { ToolbarButton as u } from "./ToolbarButton.js";
|
|
3
|
+
import { ToolbarSeparator as v } from "./ToolbarSeparator.js";
|
|
4
4
|
import { TextH1 as B, TextH2 as L, TextH3 as A, BulletList as T, NumberList as i } from "../Icons/CustomIcons.js";
|
|
5
|
-
import { Flex as
|
|
5
|
+
import { Flex as e } from "../Flex/Flex.js";
|
|
6
6
|
import { UndoLeftBold as H, UndoRightBold as y, TextBoldBold as F, TextItalicBold as w, TextCrossBold as I, LinkRoundBold as N, EraserBold as S } from "@solar-icons/react-perf";
|
|
7
7
|
const O = ({
|
|
8
8
|
editor: l,
|
|
@@ -13,19 +13,19 @@ const O = ({
|
|
|
13
13
|
toolbarExtra: p
|
|
14
14
|
}) => {
|
|
15
15
|
const g = (k, f) => typeof k == "boolean" ? k : k.includes(f);
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
|
|
16
|
+
return /* @__PURE__ */ h(
|
|
17
|
+
e,
|
|
18
18
|
{
|
|
19
19
|
wrap: "wrap",
|
|
20
20
|
align: "center",
|
|
21
21
|
gap: "md",
|
|
22
22
|
padding: { px: "2xl", py: "md" },
|
|
23
|
-
className: "border-b border-comp-
|
|
23
|
+
className: "border-b border-comp-input-stroke-def",
|
|
24
24
|
children: [
|
|
25
|
-
c.history !== !1 && /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
25
|
+
c.history !== !1 && /* @__PURE__ */ h(m, { children: [
|
|
26
|
+
/* @__PURE__ */ h(e, { align: "center", gap: "3xs", children: [
|
|
27
27
|
g(c.history, "undo") && /* @__PURE__ */ n(
|
|
28
|
-
|
|
28
|
+
u,
|
|
29
29
|
{
|
|
30
30
|
icon: /* @__PURE__ */ n(H, {}),
|
|
31
31
|
onClick: () => l == null ? void 0 : l.chain().focus().undo().run(),
|
|
@@ -34,7 +34,7 @@ const O = ({
|
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
36
|
g(c.history, "redo") && /* @__PURE__ */ n(
|
|
37
|
-
|
|
37
|
+
u,
|
|
38
38
|
{
|
|
39
39
|
icon: /* @__PURE__ */ n(y, {}),
|
|
40
40
|
onClick: () => l == null ? void 0 : l.chain().focus().redo().run(),
|
|
@@ -43,12 +43,12 @@ const O = ({
|
|
|
43
43
|
}
|
|
44
44
|
)
|
|
45
45
|
] }),
|
|
46
|
-
/* @__PURE__ */ n(
|
|
46
|
+
/* @__PURE__ */ n(v, {})
|
|
47
47
|
] }),
|
|
48
|
-
c.headings !== !1 && /* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */
|
|
48
|
+
c.headings !== !1 && /* @__PURE__ */ h(m, { children: [
|
|
49
|
+
/* @__PURE__ */ h(e, { align: "center", gap: "3xs", children: [
|
|
50
50
|
g(c.headings, 1) && /* @__PURE__ */ n(
|
|
51
|
-
|
|
51
|
+
u,
|
|
52
52
|
{
|
|
53
53
|
icon: /* @__PURE__ */ n(B, {}),
|
|
54
54
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
@@ -58,7 +58,7 @@ const O = ({
|
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
60
|
g(c.headings, 2) && /* @__PURE__ */ n(
|
|
61
|
-
|
|
61
|
+
u,
|
|
62
62
|
{
|
|
63
63
|
icon: /* @__PURE__ */ n(L, {}),
|
|
64
64
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
@@ -68,7 +68,7 @@ const O = ({
|
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
70
|
g(c.headings, 3) && /* @__PURE__ */ n(
|
|
71
|
-
|
|
71
|
+
u,
|
|
72
72
|
{
|
|
73
73
|
icon: /* @__PURE__ */ n(A, {}),
|
|
74
74
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
@@ -78,12 +78,12 @@ const O = ({
|
|
|
78
78
|
}
|
|
79
79
|
)
|
|
80
80
|
] }),
|
|
81
|
-
/* @__PURE__ */ n(
|
|
81
|
+
/* @__PURE__ */ n(v, {})
|
|
82
82
|
] }),
|
|
83
|
-
c.formatting !== !1 && /* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
83
|
+
c.formatting !== !1 && /* @__PURE__ */ h(m, { children: [
|
|
84
|
+
/* @__PURE__ */ h(e, { align: "center", gap: "3xs", children: [
|
|
85
85
|
g(c.formatting, "bold") && /* @__PURE__ */ n(
|
|
86
|
-
|
|
86
|
+
u,
|
|
87
87
|
{
|
|
88
88
|
icon: /* @__PURE__ */ n(F, {}),
|
|
89
89
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleBold().run(),
|
|
@@ -93,7 +93,7 @@ const O = ({
|
|
|
93
93
|
}
|
|
94
94
|
),
|
|
95
95
|
g(c.formatting, "italic") && /* @__PURE__ */ n(
|
|
96
|
-
|
|
96
|
+
u,
|
|
97
97
|
{
|
|
98
98
|
icon: /* @__PURE__ */ n(w, {}),
|
|
99
99
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleItalic().run(),
|
|
@@ -103,7 +103,7 @@ const O = ({
|
|
|
103
103
|
}
|
|
104
104
|
),
|
|
105
105
|
g(c.formatting, "strikethrough") && /* @__PURE__ */ n(
|
|
106
|
-
|
|
106
|
+
u,
|
|
107
107
|
{
|
|
108
108
|
icon: /* @__PURE__ */ n(I, {}),
|
|
109
109
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleStrike().run(),
|
|
@@ -113,12 +113,12 @@ const O = ({
|
|
|
113
113
|
}
|
|
114
114
|
)
|
|
115
115
|
] }),
|
|
116
|
-
/* @__PURE__ */ n(
|
|
116
|
+
/* @__PURE__ */ n(v, {})
|
|
117
117
|
] }),
|
|
118
|
-
c.lists !== !1 && /* @__PURE__ */
|
|
119
|
-
/* @__PURE__ */
|
|
118
|
+
c.lists !== !1 && /* @__PURE__ */ h(m, { children: [
|
|
119
|
+
/* @__PURE__ */ h(e, { align: "center", gap: "3xs", children: [
|
|
120
120
|
g(c.lists, "bullet") && /* @__PURE__ */ n(
|
|
121
|
-
|
|
121
|
+
u,
|
|
122
122
|
{
|
|
123
123
|
icon: /* @__PURE__ */ n(T, {}),
|
|
124
124
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleBulletList().run(),
|
|
@@ -128,7 +128,7 @@ const O = ({
|
|
|
128
128
|
}
|
|
129
129
|
),
|
|
130
130
|
g(c.lists, "ordered") && /* @__PURE__ */ n(
|
|
131
|
-
|
|
131
|
+
u,
|
|
132
132
|
{
|
|
133
133
|
icon: /* @__PURE__ */ n(i, {}),
|
|
134
134
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleOrderedList().run(),
|
|
@@ -138,11 +138,11 @@ const O = ({
|
|
|
138
138
|
}
|
|
139
139
|
)
|
|
140
140
|
] }),
|
|
141
|
-
/* @__PURE__ */ n(
|
|
141
|
+
/* @__PURE__ */ n(v, {})
|
|
142
142
|
] }),
|
|
143
|
-
c.link && /* @__PURE__ */
|
|
143
|
+
c.link && /* @__PURE__ */ h(m, { children: [
|
|
144
144
|
/* @__PURE__ */ n(
|
|
145
|
-
|
|
145
|
+
u,
|
|
146
146
|
{
|
|
147
147
|
icon: /* @__PURE__ */ n(N, {}),
|
|
148
148
|
onClick: x,
|
|
@@ -151,11 +151,11 @@ const O = ({
|
|
|
151
151
|
label: s.insertLink
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
/* @__PURE__ */ n(
|
|
154
|
+
/* @__PURE__ */ n(v, {})
|
|
155
155
|
] }),
|
|
156
|
-
c.clearFormatting && /* @__PURE__ */
|
|
156
|
+
c.clearFormatting && /* @__PURE__ */ h(m, { children: [
|
|
157
157
|
/* @__PURE__ */ n(
|
|
158
|
-
|
|
158
|
+
u,
|
|
159
159
|
{
|
|
160
160
|
icon: /* @__PURE__ */ n(S, {}),
|
|
161
161
|
onClick: () => l == null ? void 0 : l.chain().focus().unsetAllMarks().clearNodes().run(),
|
|
@@ -163,7 +163,7 @@ const O = ({
|
|
|
163
163
|
label: s.clearFormatting
|
|
164
164
|
}
|
|
165
165
|
),
|
|
166
|
-
p && /* @__PURE__ */ n(
|
|
166
|
+
p && /* @__PURE__ */ n(v, {})
|
|
167
167
|
] }),
|
|
168
168
|
p
|
|
169
169
|
]
|
|
@@ -14,16 +14,16 @@ import { cn as b } from "../../utils/cn.js";
|
|
|
14
14
|
const et = J(
|
|
15
15
|
[
|
|
16
16
|
"overflow-hidden rounded-xl border bg-surface-base-secondary transition-colors",
|
|
17
|
-
"focus-within:border-comp-
|
|
17
|
+
"focus-within:border-comp-input-stroke-focused",
|
|
18
18
|
"pb-[calc(var(--spacing-xl)/2)]"
|
|
19
19
|
// Offset scrollbar to make resize handle visible
|
|
20
20
|
],
|
|
21
21
|
{
|
|
22
22
|
variants: {
|
|
23
23
|
state: {
|
|
24
|
-
default: "border-comp-
|
|
25
|
-
disabled: "cursor-not-allowed border-comp-
|
|
26
|
-
error: "border-comp-
|
|
24
|
+
default: "border-comp-input-stroke-def hover:border-comp-input-stroke-hover",
|
|
25
|
+
disabled: "cursor-not-allowed border-comp-input-stroke-disabled opacity-60",
|
|
26
|
+
error: "border-comp-input-stroke-error"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
defaultVariants: {
|
|
@@ -34,7 +34,7 @@ const et = J(
|
|
|
34
34
|
({
|
|
35
35
|
value: i,
|
|
36
36
|
defaultValue: g,
|
|
37
|
-
onChange:
|
|
37
|
+
onChange: c,
|
|
38
38
|
onBlur: y,
|
|
39
39
|
onFocus: v,
|
|
40
40
|
placeholder: L = "",
|
|
@@ -42,7 +42,7 @@ const et = J(
|
|
|
42
42
|
hint: T,
|
|
43
43
|
infoTooltip: C,
|
|
44
44
|
disabled: o = !1,
|
|
45
|
-
readOnly:
|
|
45
|
+
readOnly: d = !1,
|
|
46
46
|
required: M,
|
|
47
47
|
disableRequiredAsterisk: H,
|
|
48
48
|
error: l,
|
|
@@ -92,10 +92,10 @@ const et = J(
|
|
|
92
92
|
...w
|
|
93
93
|
],
|
|
94
94
|
content: i ?? g ?? "",
|
|
95
|
-
editable: !o && !
|
|
95
|
+
editable: !o && !d,
|
|
96
96
|
onUpdate: ({ editor: e }) => {
|
|
97
97
|
const x = e.getText().trim(), h = e.getHTML();
|
|
98
|
-
|
|
98
|
+
c == null || c(x.length === 0 ? "" : h);
|
|
99
99
|
},
|
|
100
100
|
onBlur: y,
|
|
101
101
|
onFocus: v,
|
|
@@ -138,8 +138,8 @@ const et = J(
|
|
|
138
138
|
(i || "<p></p>") !== (e || "<p></p>") && t.commands.setContent(i, !1);
|
|
139
139
|
}
|
|
140
140
|
}, [t, i]), _(() => {
|
|
141
|
-
t && t.setEditable(!o && !
|
|
142
|
-
}, [t, o,
|
|
141
|
+
t && t.setEditable(!o && !d);
|
|
142
|
+
}, [t, o, d]), $(
|
|
143
143
|
S,
|
|
144
144
|
() => ({
|
|
145
145
|
editor: t,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as G, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as H, useId as U, useRef as W, useState as B } from "react";
|
|
3
|
-
import { cva as
|
|
3
|
+
import { cva as x } from "class-variance-authority";
|
|
4
4
|
import { FormField as D } from "../FormField/FormField.js";
|
|
5
|
-
import { cn as
|
|
5
|
+
import { cn as h } from "../../utils/cn.js";
|
|
6
6
|
import { typographyVariants as b } from "../Typography/Typography.js";
|
|
7
|
-
const E =
|
|
7
|
+
const E = x(
|
|
8
8
|
[
|
|
9
9
|
b({
|
|
10
10
|
variant: "body",
|
|
@@ -36,10 +36,10 @@ const E = h(
|
|
|
36
36
|
resize: "none"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
), J =
|
|
39
|
+
), J = x(
|
|
40
40
|
[
|
|
41
|
-
"overflow-hidden rounded-xl border
|
|
42
|
-
"focus-within:border-comp-
|
|
41
|
+
"overflow-hidden rounded-xl border bg-comp-input-fill-def transition-colors",
|
|
42
|
+
"focus-within:border-comp-input-stroke-focused",
|
|
43
43
|
"pb-[calc(var(--spacing-xl)/2)]",
|
|
44
44
|
// Offset scrollbar to make resize handle visible
|
|
45
45
|
"flex"
|
|
@@ -47,9 +47,9 @@ const E = h(
|
|
|
47
47
|
{
|
|
48
48
|
variants: {
|
|
49
49
|
state: {
|
|
50
|
-
default: "border-comp-
|
|
50
|
+
default: "border-comp-input-stroke-def hover:border-comp-input-stroke-hover",
|
|
51
51
|
disabled: "cursor-not-allowed border-comp-input-stroke-disabled bg-comp-input-fill-disabled",
|
|
52
|
-
error: "border-comp-
|
|
52
|
+
error: "border-comp-input-stroke-error"
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
defaultVariants: {
|
|
@@ -85,7 +85,7 @@ const E = h(
|
|
|
85
85
|
}, C = R && i.maxLength != null ? /* @__PURE__ */ G(
|
|
86
86
|
"span",
|
|
87
87
|
{
|
|
88
|
-
className:
|
|
88
|
+
className: h(
|
|
89
89
|
b({
|
|
90
90
|
variant: "body",
|
|
91
91
|
weight: "regular",
|
|
@@ -122,7 +122,7 @@ const E = h(
|
|
|
122
122
|
id: r,
|
|
123
123
|
required: o,
|
|
124
124
|
"aria-required": o,
|
|
125
|
-
className:
|
|
125
|
+
className: h(
|
|
126
126
|
E({ error: e, resize: z, autoResize: s }),
|
|
127
127
|
g
|
|
128
128
|
),
|