@vkzstudio/muza-ui 1.5.0 → 1.5.2
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/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/index.js +16 -0
- package/dist/components/Alert/Alert.js +6 -6
- package/dist/components/Alert/index.js +4 -0
- package/dist/components/ArticleCard/ArticleCard.js +11 -11
- package/dist/components/ArticleCard/index.js +7 -0
- package/dist/components/Avatar/index.js +6 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +4 -4
- package/dist/components/Breadcrumb/index.js +10 -0
- package/dist/components/Button/Button.js +7 -7
- package/dist/components/Button/index.js +6 -0
- package/dist/components/ButtonArrow/index.js +5 -0
- package/dist/components/Calendar/Calendar.js +6 -6
- package/dist/components/Calendar/index.js +10 -0
- package/dist/components/Card/Card.js +7 -7
- package/dist/components/Card/index.js +5 -0
- package/dist/components/CardCheckboxAmount/CardCheckboxAmount.js +8 -8
- package/dist/components/CardCheckboxAmount/index.js +4 -0
- package/dist/components/Carousel/Carousel.js +5 -5
- package/dist/components/Carousel/index.js +9 -0
- package/dist/components/CategoryCard/CategoryCard.js +2 -2
- package/dist/components/CategoryCard/index.js +6 -0
- package/dist/components/CategoryIcon/index.js +5 -0
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/index.js +4 -0
- package/dist/components/Chip/Chip.js +5 -5
- package/dist/components/Chip/index.js +5 -0
- package/dist/components/DataTable/index.js +5 -0
- package/dist/components/DatePicker/DatePicker.js +18 -18
- package/dist/components/DatePicker/index.js +7 -0
- package/dist/components/DatePickerButton/DatePickerButton.js +5 -5
- package/dist/components/DatePickerButton/index.js +5 -0
- package/dist/components/Dialog/Dialog.js +21 -20
- package/dist/components/Dialog/index.js +13 -0
- package/dist/components/DotDivider/index.js +5 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +2 -2
- package/dist/components/DropdownMenu/index.js +14 -0
- package/dist/components/DropdownSearchMenu/DropdownSearchMenu.js +7 -6
- package/dist/components/DropdownSearchMenu/index.js +7 -0
- package/dist/components/EdgeButton/EdgeButton.js +1 -1
- package/dist/components/EdgeButton/index.js +5 -0
- package/dist/components/EmptyState/index.js +4 -0
- package/dist/components/ExpandableTable/ExpandableTable.js +13 -13
- package/dist/components/ExpandableTable/index.js +4 -0
- package/dist/components/FileUpload/FileItem.js +1 -1
- package/dist/components/FileUpload/FileUpload.js +7 -7
- package/dist/components/FileUpload/index.js +4 -0
- package/dist/components/Flex/Flex.js +5 -5
- package/dist/components/Flex/index.js +7 -0
- package/dist/components/FormField/FormField.js +9 -9
- package/dist/components/FormField/InputHint.js +4 -4
- package/dist/components/FormField/index.js +8 -0
- package/dist/components/HeartButton/index.js +5 -0
- package/dist/components/Icons/index.js +65 -0
- package/dist/components/InfoCard/InfoCard.js +45 -0
- package/dist/components/InfoCard/index.js +5 -0
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/index.js +4 -0
- package/dist/components/InputOTP/InputOTP.js +7 -7
- package/dist/components/InputOTP/index.js +7 -0
- package/dist/components/LanguageSwitcher/LanguageSwitcher.js +9 -9
- package/dist/components/LanguageSwitcher/index.js +6 -0
- package/dist/components/Lightbox/Lightbox.js +1 -1
- package/dist/components/Lightbox/index.js +8 -0
- package/dist/components/Loader/index.js +4 -0
- package/dist/components/LoginScreen/LoginScreen.js +4 -4
- package/dist/components/LoginScreen/index.js +8 -0
- package/dist/components/MultiSelect/MultiSelect.js +20 -20
- package/dist/components/MultiSelect/index.js +4 -0
- package/dist/components/MuzaUIProvider/MuzaUIProvider.js +5 -5
- package/dist/components/MuzaUIProvider/index.js +13 -0
- package/dist/components/MuzaUIProvider/theme/ThemeSetterModal.js +17 -17
- package/dist/components/OfferCard/OfferCard.js +11 -11
- package/dist/components/OfferCard/index.js +7 -0
- package/dist/components/PageContainer/index.js +5 -0
- package/dist/components/Pagination/Pagination.js +5 -5
- package/dist/components/Pagination/index.js +4 -0
- package/dist/components/PartnerCard/PartnerCard.js +10 -10
- package/dist/components/PartnerCard/index.js +6 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +18 -17
- package/dist/components/PasswordInput/PasswordInput.stories.d.ts +2 -0
- package/dist/components/PasswordInput/PasswordInput.stories.d.ts.map +1 -1
- package/dist/components/PasswordInput/index.js +4 -0
- package/dist/components/PhoneInput/CountrySelector.js +5 -5
- package/dist/components/PhoneInput/PhoneInput.js +8 -8
- package/dist/components/PhoneInput/index.js +4 -0
- package/dist/components/PinIndicator/index.js +4 -0
- package/dist/components/Popover/index.js +7 -0
- package/dist/components/Progress/index.js +5 -0
- package/dist/components/Radio/index.js +5 -0
- package/dist/components/Rating/Rating.js +5 -5
- package/dist/components/Rating/index.js +4 -0
- package/dist/components/RatingBlock/RatingBlock.js +2 -2
- package/dist/components/RatingBlock/index.js +4 -0
- package/dist/components/Reorderable/index.js +9 -0
- package/dist/components/ReorderableTable/ReorderableTable.js +7 -6
- package/dist/components/ReorderableTable/index.js +4 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.js +5 -5
- package/dist/components/ResponsiveLayoutTable/index.js +4 -0
- package/dist/components/SearchFilters/SearchFilters.js +11 -11
- package/dist/components/SearchFilters/index.js +5 -0
- package/dist/components/Searchbar/index.js +4 -0
- package/dist/components/SegmentedControl/index.js +5 -0
- package/dist/components/SegmentedIconControl/index.js +5 -0
- package/dist/components/Select/Select.js +17 -17
- package/dist/components/Select/index.js +4 -0
- package/dist/components/Sheet/Sheet.js +13 -12
- package/dist/components/Sheet/index.js +15 -0
- package/dist/components/Skeleton/index.js +4 -0
- package/dist/components/Slider/index.js +7 -0
- package/dist/components/SliderIndicators/index.js +4 -0
- package/dist/components/Stepper/Stepper.js +6 -6
- package/dist/components/Stepper/index.js +4 -0
- package/dist/components/SwipeButton/SwipeButton.js +14 -14
- package/dist/components/SwipeButton/index.js +4 -0
- package/dist/components/Switch/index.js +4 -0
- package/dist/components/Tag/index.js +5 -0
- package/dist/components/TextEditor/EditorToolbar.js +15 -15
- package/dist/components/TextEditor/LinkBubbleMenu.js +9 -9
- package/dist/components/TextEditor/TextEditor.js +12 -12
- package/dist/components/TextEditor/index.js +9 -0
- package/dist/components/Textarea/Textarea.js +1 -1
- package/dist/components/Textarea/index.js +4 -0
- package/dist/components/TimePicker/TimePicker.js +4 -4
- package/dist/components/TimePicker/index.js +4 -0
- package/dist/components/Toast/Toast.js +7 -7
- package/dist/components/Toast/index.js +7 -0
- package/dist/components/Toggle/index.js +5 -0
- package/dist/components/ToggleCheckButton/index.js +5 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +4 -4
- package/dist/components/ToggleGroup/index.js +5 -0
- package/dist/components/Tooltip/Tooltip.js +6 -6
- package/dist/components/Tooltip/index.js +7 -0
- package/dist/components/TransactionsListView/TransactionsListView.js +2 -2
- package/dist/components/TransactionsListView/index.js +5 -0
- package/dist/components/Typography/index.js +5 -0
- package/dist/components/TypographyLink/index.js +5 -0
- package/dist/components/UniversalFooter/UniversalFooter.js +2 -2
- package/dist/components/UniversalFooter/index.js +18 -0
- package/dist/components/VoucherCard/VoucherCard.js +2 -2
- package/dist/components/VoucherCard/index.js +7 -0
- package/dist/index.js +429 -429
- package/dist/utils/index.js +13 -0
- package/package.json +22 -5
|
@@ -2,12 +2,13 @@ import { jsx as o, jsxs as p } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as l } from "react";
|
|
3
3
|
import * as e from "@radix-ui/react-dialog";
|
|
4
4
|
import { cva as g } from "class-variance-authority";
|
|
5
|
-
import {
|
|
6
|
-
import { useMuzaTranslations as x } from "../../translations/TranslationContext.js";
|
|
5
|
+
import { useMuzaTranslations as y } from "../../translations/TranslationContext.js";
|
|
7
6
|
import { cn as i } from "../../utils/cn.js";
|
|
8
7
|
import { Flex as n } from "../Flex/Flex.js";
|
|
9
|
-
import
|
|
10
|
-
|
|
8
|
+
import "@solar-icons/react-perf";
|
|
9
|
+
import { XClose as x } from "../Icons/CustomIcons.js";
|
|
10
|
+
import { typographyVariants as N } from "../Typography/Typography.js";
|
|
11
|
+
const B = e.Root, H = e.Trigger, v = e.Portal, R = e.Close, M = e.Title, X = e.Description, c = l(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
11
12
|
e.Overlay,
|
|
12
13
|
{
|
|
13
14
|
ref: s,
|
|
@@ -95,7 +96,7 @@ const S = l(
|
|
|
95
96
|
closeAriaLabel: d,
|
|
96
97
|
...h
|
|
97
98
|
}, f) => {
|
|
98
|
-
const u =
|
|
99
|
+
const u = y(), b = d ?? u.sheet.closeAriaLabel;
|
|
99
100
|
return /* @__PURE__ */ p(
|
|
100
101
|
n,
|
|
101
102
|
{
|
|
@@ -114,7 +115,7 @@ const S = l(
|
|
|
114
115
|
{
|
|
115
116
|
className: i(
|
|
116
117
|
"text-text-primary min-w-0 flex-1",
|
|
117
|
-
|
|
118
|
+
N({
|
|
118
119
|
variant: "title",
|
|
119
120
|
size: "md",
|
|
120
121
|
weight: "medium",
|
|
@@ -129,7 +130,7 @@ const S = l(
|
|
|
129
130
|
{
|
|
130
131
|
className: "shrink-0 cursor-pointer transition-opacity focus-visible:focus-default disabled:pointer-events-none",
|
|
131
132
|
"aria-label": b,
|
|
132
|
-
children: /* @__PURE__ */ o(
|
|
133
|
+
children: /* @__PURE__ */ o(x, { className: "size-icon-medium" })
|
|
133
134
|
}
|
|
134
135
|
)
|
|
135
136
|
]
|
|
@@ -174,16 +175,16 @@ const k = l(
|
|
|
174
175
|
);
|
|
175
176
|
k.displayName = "SheetFooter";
|
|
176
177
|
export {
|
|
177
|
-
|
|
178
|
+
B as Sheet,
|
|
178
179
|
C as SheetBody,
|
|
179
|
-
|
|
180
|
+
R as SheetClose,
|
|
180
181
|
z as SheetContent,
|
|
181
|
-
|
|
182
|
+
X as SheetDescription,
|
|
182
183
|
k as SheetFooter,
|
|
183
184
|
S as SheetHeader,
|
|
184
185
|
c as SheetOverlay,
|
|
185
186
|
v as SheetPortal,
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
M as SheetTitle,
|
|
188
|
+
H as SheetTrigger,
|
|
188
189
|
w as sheetContentVariants
|
|
189
190
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Sheet as h, SheetBody as S, SheetClose as o, SheetContent as r, SheetDescription as n, SheetFooter as a, SheetHeader as i, SheetOverlay as l, SheetPortal as s, SheetTitle as C, SheetTrigger as d, sheetContentVariants as g } from "./Sheet.js";
|
|
2
|
+
export {
|
|
3
|
+
h as Sheet,
|
|
4
|
+
S as SheetBody,
|
|
5
|
+
o as SheetClose,
|
|
6
|
+
r as SheetContent,
|
|
7
|
+
n as SheetDescription,
|
|
8
|
+
a as SheetFooter,
|
|
9
|
+
i as SheetHeader,
|
|
10
|
+
l as SheetOverlay,
|
|
11
|
+
s as SheetPortal,
|
|
12
|
+
C as SheetTitle,
|
|
13
|
+
d as SheetTrigger,
|
|
14
|
+
g as sheetContentVariants
|
|
15
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as w, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useState as I, useEffect as M } from "react";
|
|
3
|
-
import { StepperButton as b } from "./StepperButton.js";
|
|
4
3
|
import { useMuzaTranslations as T } from "../../translations/TranslationContext.js";
|
|
5
|
-
import { cn as
|
|
4
|
+
import { cn as b } from "../../utils/cn.js";
|
|
6
5
|
import { MinusCircleBold as D, AddCircleBold as E } from "@solar-icons/react-perf";
|
|
7
6
|
import { Typography as Y } from "../Typography/Typography.js";
|
|
7
|
+
import { StepperButton as x } from "./StepperButton.js";
|
|
8
8
|
const P = ({
|
|
9
9
|
value: f,
|
|
10
10
|
defaultValue: p,
|
|
@@ -40,9 +40,9 @@ const P = ({
|
|
|
40
40
|
}
|
|
41
41
|
c || a(t), r == null || r(t);
|
|
42
42
|
};
|
|
43
|
-
return /* @__PURE__ */ w("div", { className:
|
|
43
|
+
return /* @__PURE__ */ w("div", { className: b("flex items-center gap-sm", N), children: [
|
|
44
44
|
/* @__PURE__ */ l(
|
|
45
|
-
|
|
45
|
+
x,
|
|
46
46
|
{
|
|
47
47
|
ariaLabel: k,
|
|
48
48
|
onClick: B,
|
|
@@ -58,7 +58,7 @@ const P = ({
|
|
|
58
58
|
size: "base",
|
|
59
59
|
weight: "medium",
|
|
60
60
|
component: "span",
|
|
61
|
-
className:
|
|
61
|
+
className: b(
|
|
62
62
|
"min-w-[1.75rem] text-center text-text-dark-primary-def",
|
|
63
63
|
{
|
|
64
64
|
"text-text-dark-secondary": e === i
|
|
@@ -69,7 +69,7 @@ const P = ({
|
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
71
|
/* @__PURE__ */ l(
|
|
72
|
-
|
|
72
|
+
x,
|
|
73
73
|
{
|
|
74
74
|
ariaLabel: y,
|
|
75
75
|
onClick: j,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs as b, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as D, useState as B, useEffect as N } from "react";
|
|
3
3
|
import { useDragControls as U, useMotionValue as _, useTransform as T, useMotionValueEvent as q, animate as u, motion as E } from "motion/react";
|
|
4
|
-
import {
|
|
5
|
-
import { swipeButtonProgressVariants as H } from "./swipeButtonProgressVariants.js";
|
|
6
|
-
import { swipeButtonSliderVariants as J } from "./swipeButtonSliderVariants.js";
|
|
7
|
-
import { swipeButtonVariants as Q } from "./swipeButtonVariants.js";
|
|
8
|
-
import { useMuzaTranslations as X } from "../../translations/TranslationContext.js";
|
|
9
|
-
import { DoubleArrowRight as Z } from "../Icons/CustomIcons.js";
|
|
4
|
+
import { useMuzaTranslations as G } from "../../translations/TranslationContext.js";
|
|
10
5
|
import { cn as y } from "../../utils/cn.js";
|
|
6
|
+
import { UnreadOutline as H } from "@solar-icons/react-perf";
|
|
7
|
+
import { DoubleArrowRight as J } from "../Icons/CustomIcons.js";
|
|
11
8
|
import { Typography as V } from "../Typography/Typography.js";
|
|
12
|
-
import {
|
|
9
|
+
import { SwipeLoadingIcon as Q } from "./SwipeLoadingIcon.js";
|
|
10
|
+
import { swipeButtonProgressVariants as X } from "./swipeButtonProgressVariants.js";
|
|
11
|
+
import { swipeButtonSliderVariants as Z } from "./swipeButtonSliderVariants.js";
|
|
12
|
+
import { swipeButtonVariants as ee } from "./swipeButtonVariants.js";
|
|
13
13
|
const de = ({
|
|
14
14
|
text: z,
|
|
15
15
|
successText: L,
|
|
@@ -26,7 +26,7 @@ const de = ({
|
|
|
26
26
|
onResetComplete: I,
|
|
27
27
|
className: C
|
|
28
28
|
}) => {
|
|
29
|
-
const v =
|
|
29
|
+
const v = G(), O = L ?? v.swipeButton.successText, R = M ?? v.swipeButton.loadingText, j = v.swipeButton.processingAriaLabel, K = D(null), l = D(null), d = D(null), [r, W] = B(0), [x, m] = B(!1), g = U(), n = _(0), Y = T(n, [0, r], [0, 1]), k = T(n, [0, r * 0.5], [1, 0]), P = T(
|
|
30
30
|
Y,
|
|
31
31
|
(e) => `calc(${e}*(100% - var(--slider-size) - 2px) + var(--slider-size))`
|
|
32
32
|
), c = !t && !a && !p || i;
|
|
@@ -82,7 +82,7 @@ const de = ({
|
|
|
82
82
|
"data-danger": h,
|
|
83
83
|
disabled: i,
|
|
84
84
|
className: y(
|
|
85
|
-
|
|
85
|
+
ee({ variant: w, size: o, loading: t, fullWidth: A, disabled: i }),
|
|
86
86
|
C
|
|
87
87
|
),
|
|
88
88
|
style: {
|
|
@@ -119,7 +119,7 @@ const de = ({
|
|
|
119
119
|
{
|
|
120
120
|
className: y(
|
|
121
121
|
"absolute rounded-full",
|
|
122
|
-
|
|
122
|
+
X({
|
|
123
123
|
variant: w,
|
|
124
124
|
interactive: c,
|
|
125
125
|
danger: h,
|
|
@@ -134,7 +134,7 @@ const de = ({
|
|
|
134
134
|
{
|
|
135
135
|
ref: d,
|
|
136
136
|
className: y(
|
|
137
|
-
|
|
137
|
+
Z({
|
|
138
138
|
variant: w,
|
|
139
139
|
interactive: c,
|
|
140
140
|
danger: h
|
|
@@ -157,9 +157,9 @@ const de = ({
|
|
|
157
157
|
} : { duration: 0.2 }
|
|
158
158
|
},
|
|
159
159
|
children: [
|
|
160
|
-
a && /* @__PURE__ */ s(
|
|
161
|
-
t && !a && /* @__PURE__ */ s(
|
|
162
|
-
!t && !a && /* @__PURE__ */ s(
|
|
160
|
+
a && /* @__PURE__ */ s(H, { className: "size-icon-small" }),
|
|
161
|
+
t && !a && /* @__PURE__ */ s(Q, { className: "size-icon-small" }),
|
|
162
|
+
!t && !a && /* @__PURE__ */ s(J, { className: "size-icon-small" })
|
|
163
163
|
]
|
|
164
164
|
}
|
|
165
165
|
)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as h, Fragment as m, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Flex as e } from "../Flex/Flex.js";
|
|
3
|
+
import { UndoLeftBold as B, UndoRightBold as L, TextBoldBold as A, TextItalicBold as T, TextCrossBold as i, LinkRoundBold as H, EraserBold as y } from "@solar-icons/react-perf";
|
|
4
|
+
import { TextH1 as F, TextH2 as w, TextH3 as I, BulletList as N, NumberList as S } from "../Icons/CustomIcons.js";
|
|
2
5
|
import { ToolbarButton as u } from "./ToolbarButton.js";
|
|
3
6
|
import { ToolbarSeparator as v } from "./ToolbarSeparator.js";
|
|
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 e } from "../Flex/Flex.js";
|
|
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,
|
|
9
9
|
toolbarConfig: c,
|
|
@@ -27,7 +27,7 @@ const O = ({
|
|
|
27
27
|
g(c.history, "undo") && /* @__PURE__ */ n(
|
|
28
28
|
u,
|
|
29
29
|
{
|
|
30
|
-
icon: /* @__PURE__ */ n(
|
|
30
|
+
icon: /* @__PURE__ */ n(B, {}),
|
|
31
31
|
onClick: () => l == null ? void 0 : l.chain().focus().undo().run(),
|
|
32
32
|
disabled: a || !(l != null && l.can().undo()),
|
|
33
33
|
label: s.undo
|
|
@@ -36,7 +36,7 @@ const O = ({
|
|
|
36
36
|
g(c.history, "redo") && /* @__PURE__ */ n(
|
|
37
37
|
u,
|
|
38
38
|
{
|
|
39
|
-
icon: /* @__PURE__ */ n(
|
|
39
|
+
icon: /* @__PURE__ */ n(L, {}),
|
|
40
40
|
onClick: () => l == null ? void 0 : l.chain().focus().redo().run(),
|
|
41
41
|
disabled: a || !(l != null && l.can().redo()),
|
|
42
42
|
label: s.redo
|
|
@@ -50,7 +50,7 @@ const O = ({
|
|
|
50
50
|
g(c.headings, 1) && /* @__PURE__ */ n(
|
|
51
51
|
u,
|
|
52
52
|
{
|
|
53
|
-
icon: /* @__PURE__ */ n(
|
|
53
|
+
icon: /* @__PURE__ */ n(F, {}),
|
|
54
54
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
55
55
|
active: l == null ? void 0 : l.isActive("heading", { level: 1 }),
|
|
56
56
|
disabled: a,
|
|
@@ -60,7 +60,7 @@ const O = ({
|
|
|
60
60
|
g(c.headings, 2) && /* @__PURE__ */ n(
|
|
61
61
|
u,
|
|
62
62
|
{
|
|
63
|
-
icon: /* @__PURE__ */ n(
|
|
63
|
+
icon: /* @__PURE__ */ n(w, {}),
|
|
64
64
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
65
65
|
active: l == null ? void 0 : l.isActive("heading", { level: 2 }),
|
|
66
66
|
disabled: a,
|
|
@@ -70,7 +70,7 @@ const O = ({
|
|
|
70
70
|
g(c.headings, 3) && /* @__PURE__ */ n(
|
|
71
71
|
u,
|
|
72
72
|
{
|
|
73
|
-
icon: /* @__PURE__ */ n(
|
|
73
|
+
icon: /* @__PURE__ */ n(I, {}),
|
|
74
74
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
75
75
|
active: l == null ? void 0 : l.isActive("heading", { level: 3 }),
|
|
76
76
|
disabled: a,
|
|
@@ -85,7 +85,7 @@ const O = ({
|
|
|
85
85
|
g(c.formatting, "bold") && /* @__PURE__ */ n(
|
|
86
86
|
u,
|
|
87
87
|
{
|
|
88
|
-
icon: /* @__PURE__ */ n(
|
|
88
|
+
icon: /* @__PURE__ */ n(A, {}),
|
|
89
89
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleBold().run(),
|
|
90
90
|
active: l == null ? void 0 : l.isActive("bold"),
|
|
91
91
|
disabled: a,
|
|
@@ -95,7 +95,7 @@ const O = ({
|
|
|
95
95
|
g(c.formatting, "italic") && /* @__PURE__ */ n(
|
|
96
96
|
u,
|
|
97
97
|
{
|
|
98
|
-
icon: /* @__PURE__ */ n(
|
|
98
|
+
icon: /* @__PURE__ */ n(T, {}),
|
|
99
99
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleItalic().run(),
|
|
100
100
|
active: l == null ? void 0 : l.isActive("italic"),
|
|
101
101
|
disabled: a,
|
|
@@ -105,7 +105,7 @@ const O = ({
|
|
|
105
105
|
g(c.formatting, "strikethrough") && /* @__PURE__ */ n(
|
|
106
106
|
u,
|
|
107
107
|
{
|
|
108
|
-
icon: /* @__PURE__ */ n(
|
|
108
|
+
icon: /* @__PURE__ */ n(i, {}),
|
|
109
109
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleStrike().run(),
|
|
110
110
|
active: l == null ? void 0 : l.isActive("strike"),
|
|
111
111
|
disabled: a,
|
|
@@ -120,7 +120,7 @@ const O = ({
|
|
|
120
120
|
g(c.lists, "bullet") && /* @__PURE__ */ n(
|
|
121
121
|
u,
|
|
122
122
|
{
|
|
123
|
-
icon: /* @__PURE__ */ n(
|
|
123
|
+
icon: /* @__PURE__ */ n(N, {}),
|
|
124
124
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleBulletList().run(),
|
|
125
125
|
active: l == null ? void 0 : l.isActive("bulletList"),
|
|
126
126
|
disabled: a,
|
|
@@ -130,7 +130,7 @@ const O = ({
|
|
|
130
130
|
g(c.lists, "ordered") && /* @__PURE__ */ n(
|
|
131
131
|
u,
|
|
132
132
|
{
|
|
133
|
-
icon: /* @__PURE__ */ n(
|
|
133
|
+
icon: /* @__PURE__ */ n(S, {}),
|
|
134
134
|
onClick: () => l == null ? void 0 : l.chain().focus().toggleOrderedList().run(),
|
|
135
135
|
active: l == null ? void 0 : l.isActive("orderedList"),
|
|
136
136
|
disabled: a,
|
|
@@ -144,7 +144,7 @@ const O = ({
|
|
|
144
144
|
/* @__PURE__ */ n(
|
|
145
145
|
u,
|
|
146
146
|
{
|
|
147
|
-
icon: /* @__PURE__ */ n(
|
|
147
|
+
icon: /* @__PURE__ */ n(H, {}),
|
|
148
148
|
onClick: x,
|
|
149
149
|
active: l == null ? void 0 : l.isActive("link"),
|
|
150
150
|
disabled: a,
|
|
@@ -157,7 +157,7 @@ const O = ({
|
|
|
157
157
|
/* @__PURE__ */ n(
|
|
158
158
|
u,
|
|
159
159
|
{
|
|
160
|
-
icon: /* @__PURE__ */ n(
|
|
160
|
+
icon: /* @__PURE__ */ n(y, {}),
|
|
161
161
|
onClick: () => l == null ? void 0 : l.chain().focus().unsetAllMarks().clearNodes().run(),
|
|
162
162
|
disabled: a,
|
|
163
163
|
label: s.clearFormatting
|
|
@@ -2,12 +2,12 @@ import { jsx as e, jsxs as n, Fragment as d } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as x } from "react";
|
|
3
3
|
import { BubbleMenu as y } from "@tiptap/react";
|
|
4
4
|
import "tippy.js/animations/shift-away.css";
|
|
5
|
+
import { cn as v } from "../../utils/cn.js";
|
|
5
6
|
import { Button as o } from "../Button/Button.js";
|
|
6
7
|
import { Flex as l } from "../Flex/Flex.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { typographyVariants as
|
|
10
|
-
import { Pen2Bold as z, TrashBinTrashBold as C } from "@solar-icons/react-perf";
|
|
8
|
+
import { Pen2Bold as B, TrashBinTrashBold as w } from "@solar-icons/react-perf";
|
|
9
|
+
import { Input as z } from "../Input/Input.js";
|
|
10
|
+
import { typographyVariants as C } from "../Typography/Typography.js";
|
|
11
11
|
const R = ({
|
|
12
12
|
editor: c,
|
|
13
13
|
containerRef: f,
|
|
@@ -53,7 +53,7 @@ const R = ({
|
|
|
53
53
|
className: "gap-lg rounded-xl bg-surface-base-secondary p-lg dropdown-shadow-default",
|
|
54
54
|
children: i ? /* @__PURE__ */ n(d, { children: [
|
|
55
55
|
/* @__PURE__ */ e(
|
|
56
|
-
|
|
56
|
+
z,
|
|
57
57
|
{
|
|
58
58
|
value: h,
|
|
59
59
|
onChange: (r) => b(r.target.value),
|
|
@@ -75,8 +75,8 @@ const R = ({
|
|
|
75
75
|
href: u,
|
|
76
76
|
target: "_blank",
|
|
77
77
|
rel: "noopener noreferrer",
|
|
78
|
-
className:
|
|
79
|
-
|
|
78
|
+
className: v(
|
|
79
|
+
C({
|
|
80
80
|
variant: "body",
|
|
81
81
|
size: "base",
|
|
82
82
|
weight: "medium",
|
|
@@ -93,7 +93,7 @@ const R = ({
|
|
|
93
93
|
{
|
|
94
94
|
variant: "link",
|
|
95
95
|
size: "icon",
|
|
96
|
-
icon: /* @__PURE__ */ e(
|
|
96
|
+
icon: /* @__PURE__ */ e(B, {}),
|
|
97
97
|
onClick: g,
|
|
98
98
|
"aria-label": t.editButton
|
|
99
99
|
}
|
|
@@ -104,7 +104,7 @@ const R = ({
|
|
|
104
104
|
variant: "link",
|
|
105
105
|
size: "icon",
|
|
106
106
|
danger: !0,
|
|
107
|
-
icon: /* @__PURE__ */ e(
|
|
107
|
+
icon: /* @__PURE__ */ e(w, {}),
|
|
108
108
|
onClick: k,
|
|
109
109
|
"aria-label": t.removeButton
|
|
110
110
|
}
|
|
@@ -6,13 +6,13 @@ import Z from "@tiptap/extension-placeholder";
|
|
|
6
6
|
import { useEditor as tt, EditorContent as et } from "@tiptap/react";
|
|
7
7
|
import rt from "@tiptap/starter-kit";
|
|
8
8
|
import { cva as ot } from "class-variance-authority";
|
|
9
|
-
import {
|
|
10
|
-
import { LinkBubbleMenu as it } from "./LinkBubbleMenu.js";
|
|
11
|
-
import { useLinkEditor as st } from "./useLinkEditor.js";
|
|
12
|
-
import { useMuzaTranslations as lt } from "../../translations/TranslationContext.js";
|
|
13
|
-
import { FormField as at } from "../FormField/FormField.js";
|
|
9
|
+
import { useMuzaTranslations as nt } from "../../translations/TranslationContext.js";
|
|
14
10
|
import { cn as x } from "../../utils/cn.js";
|
|
15
|
-
import {
|
|
11
|
+
import { FormField as it } from "../FormField/FormField.js";
|
|
12
|
+
import { typographyVariants as st } from "../Typography/Typography.js";
|
|
13
|
+
import { EditorToolbar as lt } from "./EditorToolbar.js";
|
|
14
|
+
import { LinkBubbleMenu as at } from "./LinkBubbleMenu.js";
|
|
15
|
+
import { useLinkEditor as ct } from "./useLinkEditor.js";
|
|
16
16
|
const mt = ot(
|
|
17
17
|
[
|
|
18
18
|
"overflow-hidden rounded-xl border bg-surface-base-secondary transition-colors",
|
|
@@ -61,7 +61,7 @@ const mt = ot(
|
|
|
61
61
|
maxLength: o,
|
|
62
62
|
showCharacterCount: j
|
|
63
63
|
}, A) => {
|
|
64
|
-
const _ =
|
|
64
|
+
const _ = nt(), [B, k] = G(0), m = {
|
|
65
65
|
history: s.history ?? !0,
|
|
66
66
|
headings: s.headings ?? !0,
|
|
67
67
|
formatting: s.formatting ?? !0,
|
|
@@ -162,11 +162,11 @@ const mt = ot(
|
|
|
162
162
|
}),
|
|
163
163
|
[t]
|
|
164
164
|
);
|
|
165
|
-
const r =
|
|
165
|
+
const r = ct(t), y = Q(null), $ = i ? "disabled" : a ? "error" : "default", I = typeof a == "string" ? a : void 0, K = `${Math.max(R, 200)}px`, W = j && o != null ? /* @__PURE__ */ p(
|
|
166
166
|
"span",
|
|
167
167
|
{
|
|
168
168
|
className: x(
|
|
169
|
-
|
|
169
|
+
st({
|
|
170
170
|
variant: "body",
|
|
171
171
|
weight: "regular",
|
|
172
172
|
size: "sm"
|
|
@@ -185,7 +185,7 @@ const mt = ot(
|
|
|
185
185
|
resize: S && !i ? "vertical" : "none"
|
|
186
186
|
};
|
|
187
187
|
return /* @__PURE__ */ l("div", { ref: y, children: /* @__PURE__ */ l(
|
|
188
|
-
|
|
188
|
+
it,
|
|
189
189
|
{
|
|
190
190
|
label: L,
|
|
191
191
|
hint: I || M,
|
|
@@ -197,7 +197,7 @@ const mt = ot(
|
|
|
197
197
|
labelRight: W,
|
|
198
198
|
children: /* @__PURE__ */ p("div", { className: mt({ state: $ }), children: [
|
|
199
199
|
O && /* @__PURE__ */ l(
|
|
200
|
-
|
|
200
|
+
lt,
|
|
201
201
|
{
|
|
202
202
|
editor: t,
|
|
203
203
|
toolbarConfig: m,
|
|
@@ -227,7 +227,7 @@ const mt = ot(
|
|
|
227
227
|
}
|
|
228
228
|
),
|
|
229
229
|
t && m.link && /* @__PURE__ */ l(
|
|
230
|
-
|
|
230
|
+
at,
|
|
231
231
|
{
|
|
232
232
|
editor: t,
|
|
233
233
|
containerRef: y,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TextEditor as t } from "./TextEditor.js";
|
|
2
|
+
import { ToolbarButton as e, toolbarButtonVariants as p } from "./ToolbarButton.js";
|
|
3
|
+
import { ToolbarSeparator as b } from "./ToolbarSeparator.js";
|
|
4
|
+
export {
|
|
5
|
+
t as TextEditor,
|
|
6
|
+
e as ToolbarButton,
|
|
7
|
+
b as ToolbarSeparator,
|
|
8
|
+
p as toolbarButtonVariants
|
|
9
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
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
3
|
import { cva as x } from "class-variance-authority";
|
|
4
|
-
import { FormField as D } from "../FormField/FormField.js";
|
|
5
4
|
import { cn as h } from "../../utils/cn.js";
|
|
5
|
+
import { FormField as D } from "../FormField/FormField.js";
|
|
6
6
|
import { typographyVariants as b } from "../Typography/Typography.js";
|
|
7
7
|
const E = x(
|
|
8
8
|
[
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { ClockCircleBold as i } from "@solar-icons/react-perf";
|
|
3
|
+
import { Input as m } from "../Input/Input.js";
|
|
4
4
|
const s = ({ placeholder: e, ...o }) => /* @__PURE__ */ t(
|
|
5
|
-
|
|
5
|
+
m,
|
|
6
6
|
{
|
|
7
7
|
type: e ? "text" : "time",
|
|
8
8
|
placeholder: e,
|
|
9
|
-
suffix: /* @__PURE__ */ t(
|
|
9
|
+
suffix: /* @__PURE__ */ t(i, { className: "size-icon-medium text-icon-dark-secondary-def" }),
|
|
10
10
|
onFocus: () => document.activeElement.type = "time",
|
|
11
11
|
...o
|
|
12
12
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { toast as c } from "sonner";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { cn as n } from "../../utils/cn.js";
|
|
5
|
+
import { DangerTriangleOutline as u, UnreadOutline as g } from "@solar-icons/react-perf";
|
|
6
|
+
import { XClose as x } from "../Icons/CustomIcons.js";
|
|
7
7
|
import { Typography as d } from "../Typography/Typography.js";
|
|
8
8
|
const T = (s) => c.custom((o) => /* @__PURE__ */ e(b, { id: o, ...s }), {
|
|
9
9
|
dismissible: s.closable,
|
|
@@ -22,7 +22,7 @@ const T = (s) => c.custom((o) => /* @__PURE__ */ e(b, { id: o, ...s }), {
|
|
|
22
22
|
}) => /* @__PURE__ */ m(
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
|
-
className:
|
|
25
|
+
className: n(
|
|
26
26
|
"flex items-center gap-comp-alert-gap-sm rounded-xl p-xl",
|
|
27
27
|
{
|
|
28
28
|
"bg-comp-toast-bg-warning text-comp-toast-text-warning": t === "warning",
|
|
@@ -35,8 +35,8 @@ const T = (s) => c.custom((o) => /* @__PURE__ */ e(b, { id: o, ...s }), {
|
|
|
35
35
|
children: [
|
|
36
36
|
/* @__PURE__ */ m("div", { className: "[&>svg]:size-comp-alert-ico-size", children: [
|
|
37
37
|
r,
|
|
38
|
-
!r && (t === "error" || t === "warning" || t === "info") && /* @__PURE__ */ e(
|
|
39
|
-
!r && t === "success" && /* @__PURE__ */ e(
|
|
38
|
+
!r && (t === "error" || t === "warning" || t === "info") && /* @__PURE__ */ e(u, {}),
|
|
39
|
+
!r && t === "success" && /* @__PURE__ */ e(g, {})
|
|
40
40
|
] }),
|
|
41
41
|
/* @__PURE__ */ e(
|
|
42
42
|
d,
|
|
@@ -58,7 +58,7 @@ const T = (s) => c.custom((o) => /* @__PURE__ */ e(b, { id: o, ...s }), {
|
|
|
58
58
|
onClick: () => {
|
|
59
59
|
c.dismiss(s), i == null || i();
|
|
60
60
|
},
|
|
61
|
-
children: /* @__PURE__ */ e(
|
|
61
|
+
children: /* @__PURE__ */ e(x, { className: "size-comp-alert-ico-size" })
|
|
62
62
|
}
|
|
63
63
|
)
|
|
64
64
|
]
|
|
@@ -2,8 +2,8 @@ import { jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import * as g from "react";
|
|
3
3
|
import * as l from "@radix-ui/react-toggle-group";
|
|
4
4
|
import "class-variance-authority";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { cn as m } from "../../utils/cn.js";
|
|
6
|
+
import { Toggle as p } from "../Toggle/Toggle.js";
|
|
7
7
|
const n = g.createContext({
|
|
8
8
|
variant: "default"
|
|
9
9
|
}), f = ({
|
|
@@ -16,7 +16,7 @@ const n = g.createContext({
|
|
|
16
16
|
{
|
|
17
17
|
"data-slot": "toggle-group",
|
|
18
18
|
"data-variant": t,
|
|
19
|
-
className:
|
|
19
|
+
className: m(
|
|
20
20
|
"group/toggle-group flex w-fit flex-wrap items-center gap-xs",
|
|
21
21
|
r
|
|
22
22
|
),
|
|
@@ -38,7 +38,7 @@ const n = g.createContext({
|
|
|
38
38
|
...o,
|
|
39
39
|
asChild: !0,
|
|
40
40
|
children: /* @__PURE__ */ e(
|
|
41
|
-
|
|
41
|
+
p,
|
|
42
42
|
{
|
|
43
43
|
variant: t ?? i.variant ?? void 0,
|
|
44
44
|
title: o.title,
|