@vkzstudio/muza-ui 1.0.11 → 1.0.13
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.d.ts +57 -4
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.js +1 -4
- package/dist/components/Accordion/Accordion.stories.d.ts.map +1 -1
- package/dist/components/Alert/Alert.d.ts +13 -2
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Alert/Alert.js +4 -4
- package/dist/components/Alert/Alert.stories.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +12 -1
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.stories.d.ts.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +23 -8
- package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +3 -12
- package/dist/components/Button/Button.d.ts +30 -0
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.d.ts +39 -3
- package/dist/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +1 -1
- package/dist/components/Calendar/utils/formatDate.d.ts +4 -0
- package/dist/components/Calendar/utils/formatDate.d.ts.map +1 -1
- package/dist/components/Calendar/utils/formatDateRange.d.ts +5 -0
- package/dist/components/Calendar/utils/formatDateRange.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +25 -3
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/dist/components/Chip/Chip.d.ts +3 -6
- package/dist/components/Chip/Chip.d.ts.map +1 -1
- package/dist/components/Chip/Chip.js +6 -6
- package/dist/components/Chip/Chip.stories.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts +40 -1
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.js +1 -1
- package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -1
- package/dist/components/DataTable/index.d.ts +1 -1
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +59 -4
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +7 -7
- package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/utils/getDateRange.d.ts +9 -0
- package/dist/components/DatePicker/utils/getDateRange.d.ts.map +1 -1
- package/dist/components/DatePicker/utils/getDateRange.js +28 -15
- package/dist/components/Dialog/Dialog.d.ts +39 -2
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.js +176 -60
- package/dist/components/Dialog/Dialog.stories.d.ts +2 -0
- package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +73 -11
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +2 -8
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +10 -26
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/components/EdgeButton/EdgeButton.d.ts +18 -0
- package/dist/components/EdgeButton/EdgeButton.d.ts.map +1 -1
- package/dist/components/EdgeButton/EdgeButton.js +4 -4
- package/dist/components/EdgeButton/EdgeButton.stories.d.ts.map +1 -1
- package/dist/components/EdgeButton/index.d.ts +1 -1
- package/dist/components/EdgeButton/index.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts +10 -0
- package/dist/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.js +6 -6
- package/dist/components/EmptyState/EmptyState.stories.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.d.ts +54 -0
- package/dist/components/ExpandableTable/ExpandableTable.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.js +2 -2
- package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts +0 -3
- package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts.map +1 -1
- package/dist/components/ExpandableTable/Table.js +1 -1
- package/dist/components/ExpandableTable/index.d.ts +1 -1
- package/dist/components/ExpandableTable/index.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.js +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +51 -0
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/FileUpload/FileUpload.stories.d.ts.map +1 -1
- package/dist/components/FileUpload/index.d.ts +1 -1
- package/dist/components/FileUpload/index.d.ts.map +1 -1
- package/dist/components/Flex/Flex.d.ts +49 -1
- package/dist/components/Flex/Flex.d.ts.map +1 -1
- package/dist/components/Flex/Flex.stories.d.ts.map +1 -1
- package/dist/components/Flex/index.d.ts +1 -1
- package/dist/components/Flex/index.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.d.ts +166 -1
- package/dist/components/Icons/CustomIcons.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.js +110 -97
- package/dist/components/InfoCard/InfoCard.d.ts +17 -0
- package/dist/components/InfoCard/InfoCard.d.ts.map +1 -0
- package/dist/components/InfoCard/index.d.ts +2 -0
- package/dist/components/InfoCard/index.d.ts.map +1 -0
- package/dist/components/Input/Input.d.ts +26 -0
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts +16 -0
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts.map +1 -1
- package/dist/components/Lightbox/Lightbox.d.ts +15 -2
- package/dist/components/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/components/Lightbox/Lightbox.js +22 -20
- package/dist/components/Loader/Loader.d.ts +3 -0
- package/dist/components/Loader/Loader.d.ts.map +1 -1
- package/dist/components/Loader/Loader.stories.d.ts.map +1 -1
- package/dist/components/LoginScreen/LoginScreen.d.ts +18 -0
- package/dist/components/LoginScreen/LoginScreen.d.ts.map +1 -1
- package/dist/components/LoginScreen/LoginScreen.stories.d.ts.map +1 -1
- package/dist/components/LoginScreen/LoginScreenItem.d.ts +5 -0
- package/dist/components/LoginScreen/LoginScreenItem.d.ts.map +1 -1
- package/dist/components/LoginScreen/index.d.ts +2 -2
- package/dist/components/LoginScreen/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +25 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +8 -8
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts.map +1 -1
- package/dist/components/MuzaUIProvider/MuzaUIProvider.d.ts +26 -1
- package/dist/components/MuzaUIProvider/MuzaUIProvider.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.d.ts +5 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.stories.d.ts.map +1 -1
- package/dist/components/PinIndicator/PinIndicator.d.ts +15 -0
- package/dist/components/PinIndicator/PinIndicator.d.ts.map +1 -1
- package/dist/components/PinIndicator/PinIndicator.stories.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +36 -1
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/components/Radio/Radio.d.ts +28 -3
- package/dist/components/Radio/Radio.d.ts.map +1 -1
- package/dist/components/Radio/Radio.js +2 -5
- package/dist/components/Radio/Radio.stories.d.ts.map +1 -1
- package/dist/components/Reorderable/Reorderable.d.ts +79 -30
- package/dist/components/Reorderable/Reorderable.d.ts.map +1 -1
- package/dist/components/Reorderable/Reorderable.js +162 -143
- package/dist/components/Reorderable/Reorderable.stories.d.ts +1 -0
- package/dist/components/Reorderable/Reorderable.stories.d.ts.map +1 -1
- package/dist/components/Reorderable/index.d.ts +1 -1
- package/dist/components/Reorderable/index.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.d.ts +47 -13
- package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.js +44 -43
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts +1 -0
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -1
- package/dist/components/ReorderableTable/index.d.ts +1 -1
- package/dist/components/ReorderableTable/index.d.ts.map +1 -1
- package/dist/components/Searchbar/Searchbar.d.ts +11 -0
- package/dist/components/Searchbar/Searchbar.d.ts.map +1 -1
- package/dist/components/Searchbar/Searchbar.stories.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +35 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.stories.d.ts.map +1 -1
- package/dist/components/SegmentedControl/index.d.ts +1 -1
- package/dist/components/SegmentedControl/index.d.ts.map +1 -1
- package/dist/components/SegmentedIconControl/SegmentedIconControl.d.ts +38 -1
- package/dist/components/SegmentedIconControl/SegmentedIconControl.d.ts.map +1 -1
- package/dist/components/SegmentedIconControl/SegmentedIconControl.stories.d.ts.map +1 -1
- package/dist/components/SegmentedIconControl/index.d.ts +1 -1
- package/dist/components/SegmentedIconControl/index.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +25 -0
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +9 -6
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.stories.d.ts.map +1 -1
- package/dist/components/SliderIndicators/SliderIndicators.d.ts +9 -0
- package/dist/components/SliderIndicators/SliderIndicators.d.ts.map +1 -1
- package/dist/components/SliderIndicators/SliderIndicators.stories.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.d.ts +38 -0
- package/dist/components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.js +5 -5
- package/dist/components/Stepper/Stepper.stories.d.ts.map +1 -1
- package/dist/components/Stepper/index.d.ts +1 -1
- package/dist/components/Stepper/index.d.ts.map +1 -1
- package/dist/components/SwipeButton/SwipeButton.d.ts +39 -0
- package/dist/components/SwipeButton/SwipeButton.d.ts.map +1 -1
- package/dist/components/SwipeButton/SwipeButton.js +1 -1
- package/dist/components/SwipeButton/SwipeButton.stories.d.ts +0 -43
- package/dist/components/SwipeButton/SwipeButton.stories.d.ts.map +1 -1
- package/dist/components/SwipeButton/index.d.ts +1 -1
- package/dist/components/SwipeButton/index.d.ts.map +1 -1
- package/dist/components/Switch/Switch.d.ts +19 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Switch/Switch.stories.d.ts.map +1 -1
- package/dist/components/Tag/Tag.d.ts +17 -1
- package/dist/components/Tag/Tag.d.ts.map +1 -1
- package/dist/components/Tag/Tag.js +4 -4
- package/dist/components/Tag/Tag.stories.d.ts.map +1 -1
- package/dist/components/TextEditor/EditorToolbar.js +1 -1
- package/dist/components/TextEditor/LinkBubbleMenu.d.ts +4 -1
- package/dist/components/TextEditor/LinkBubbleMenu.d.ts.map +1 -1
- package/dist/components/TextEditor/LinkBubbleMenu.js +116 -92
- package/dist/components/TextEditor/TextEditor.d.ts +5 -2
- package/dist/components/TextEditor/TextEditor.d.ts.map +1 -1
- package/dist/components/TextEditor/TextEditor.js +129 -121
- package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts +9 -2
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.stories.d.ts.map +1 -1
- package/dist/components/TimePicker/TimePicker.d.ts +23 -1
- package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/components/TimePicker/TimePicker.js +1 -4
- package/dist/components/TimePicker/TimePicker.stories.d.ts.map +1 -1
- package/dist/components/Toast/Toast.d.ts +21 -1
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toast/Toast.js +7 -7
- package/dist/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/components/Toast/ToastContainer.d.ts +12 -1
- package/dist/components/Toast/ToastContainer.d.ts.map +1 -1
- package/dist/components/Toast/index.d.ts +1 -1
- package/dist/components/Toast/index.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.d.ts +17 -1
- package/dist/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.js +6 -6
- package/dist/components/Toggle/Toggle.stories.d.ts.map +1 -1
- package/dist/components/Toggle/index.d.ts +1 -1
- package/dist/components/Toggle/index.d.ts.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +52 -4
- package/dist/components/ToggleGroup/ToggleGroup.d.ts.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts.map +1 -1
- package/dist/components/ToggleGroup/index.d.ts +1 -1
- package/dist/components/ToggleGroup/index.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +38 -3
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +5 -7
- package/dist/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/components/Typography/Typography.d.ts +18 -1
- package/dist/components/Typography/Typography.d.ts.map +1 -1
- package/dist/components/Typography/Typography.stories.d.ts.map +1 -1
- package/dist/components/Typography/index.d.ts +1 -1
- package/dist/components/Typography/index.d.ts.map +1 -1
- package/dist/index.js +191 -184
- package/dist/muza-ui.css +1 -1
- package/dist/styles/token-sizes.css +4 -0
- package/llms-full.md +581 -0
- package/llms.txt +36 -0
- package/package.json +4 -3
- package/CLAUDE_CONSUMER.md +0 -238
|
@@ -1,97 +1,121 @@
|
|
|
1
|
-
import { jsx as e, jsxs as n, Fragment as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
]
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
direction: "column",
|
|
39
|
-
className: "gap-2 rounded-xl bg-surface-base-secondary p-3 shadow-lg",
|
|
40
|
-
children: u ? /* @__PURE__ */ n(f, { children: [
|
|
41
|
-
/* @__PURE__ */ e(
|
|
42
|
-
"input",
|
|
1
|
+
import { jsx as e, jsxs as n, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as x } from "react";
|
|
3
|
+
import { BubbleMenu as y } from "../../node_modules/@tiptap/react/dist/index.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { Button as o } from "../Button/Button.js";
|
|
6
|
+
import { Flex as l } from "../Flex/Flex.js";
|
|
7
|
+
import { Input as v } from "../Input/Input.js";
|
|
8
|
+
import { cn as B } from "../../utils/cn.js";
|
|
9
|
+
import { typographyVariants as w } from "../Typography/Typography.js";
|
|
10
|
+
import { Pen2Bold as z, TrashBinTrashBold as C } from "@solar-icons/react-perf";
|
|
11
|
+
const R = ({
|
|
12
|
+
editor: c,
|
|
13
|
+
containerRef: f,
|
|
14
|
+
linkUrl: h,
|
|
15
|
+
isEditingLink: i,
|
|
16
|
+
onUrlChange: b,
|
|
17
|
+
onEdit: g,
|
|
18
|
+
onSave: s,
|
|
19
|
+
onRemove: k,
|
|
20
|
+
onCancel: p,
|
|
21
|
+
translations: t
|
|
22
|
+
}) => {
|
|
23
|
+
const m = x(""), a = c.getAttributes("link").href;
|
|
24
|
+
a && (m.current = a);
|
|
25
|
+
const u = a || m.current;
|
|
26
|
+
return /* @__PURE__ */ e(
|
|
27
|
+
y,
|
|
28
|
+
{
|
|
29
|
+
editor: c,
|
|
30
|
+
tippyOptions: {
|
|
31
|
+
duration: [150, 100],
|
|
32
|
+
animation: "shift-away",
|
|
33
|
+
placement: "top",
|
|
34
|
+
interactive: !0,
|
|
35
|
+
appendTo: () => f.current ?? document.body,
|
|
36
|
+
popperOptions: {
|
|
37
|
+
modifiers: [
|
|
43
38
|
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
t.key === "Enter" && (t.preventDefault(), l()), t.key === "Escape" && i();
|
|
49
|
-
},
|
|
50
|
-
placeholder: "https://...",
|
|
51
|
-
className: "w-64 rounded-lg border border-comp-input-stroke-def bg-comp-input-fill-def px-3 py-2 text-sm outline-none focus:border-comp-input-stroke-focused",
|
|
52
|
-
autoFocus: !0
|
|
39
|
+
name: "flip",
|
|
40
|
+
options: {
|
|
41
|
+
fallbackPlacements: ["bottom"]
|
|
42
|
+
}
|
|
53
43
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
shouldShow: ({ editor: r }) => r.isActive("link"),
|
|
48
|
+
children: /* @__PURE__ */ e(
|
|
49
|
+
l,
|
|
50
|
+
{
|
|
51
|
+
direction: i ? "column" : "row",
|
|
52
|
+
align: i ? "end" : "center",
|
|
53
|
+
className: "gap-lg rounded-xl bg-surface-base-secondary p-lg dropdown-shadow-default",
|
|
54
|
+
children: i ? /* @__PURE__ */ n(d, { children: [
|
|
55
|
+
/* @__PURE__ */ e(
|
|
56
|
+
v,
|
|
57
|
+
{
|
|
58
|
+
value: h,
|
|
59
|
+
onChange: (r) => b(r.target.value),
|
|
60
|
+
onKeyDown: (r) => {
|
|
61
|
+
r.key === "Enter" && (r.preventDefault(), s()), r.key === "Escape" && p();
|
|
62
|
+
},
|
|
63
|
+
placeholder: "https://",
|
|
64
|
+
autoFocus: !0
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ n(l, { className: "gap-sm", children: [
|
|
68
|
+
/* @__PURE__ */ e(o, { size: "xs", variant: "primary", ghost: !0, onClick: p, children: t.cancelButton }),
|
|
69
|
+
/* @__PURE__ */ e(o, { size: "xs", onClick: s, children: t.saveButton })
|
|
70
|
+
] })
|
|
71
|
+
] }) : /* @__PURE__ */ n(d, { children: [
|
|
72
|
+
/* @__PURE__ */ e(
|
|
73
|
+
"a",
|
|
74
|
+
{
|
|
75
|
+
href: u,
|
|
76
|
+
target: "_blank",
|
|
77
|
+
rel: "noopener noreferrer",
|
|
78
|
+
className: B(
|
|
79
|
+
w({
|
|
80
|
+
variant: "body",
|
|
81
|
+
size: "base",
|
|
82
|
+
weight: "medium",
|
|
83
|
+
fixY: !0
|
|
84
|
+
}),
|
|
85
|
+
"min-w-0 flex-1 truncate text-text-brand-def hover:underline"
|
|
86
|
+
),
|
|
87
|
+
children: u
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ n(l, { className: "shrink-0 gap-2xs", children: [
|
|
91
|
+
/* @__PURE__ */ e(
|
|
92
|
+
o,
|
|
93
|
+
{
|
|
94
|
+
variant: "link",
|
|
95
|
+
size: "icon",
|
|
96
|
+
icon: /* @__PURE__ */ e(z, {}),
|
|
97
|
+
onClick: g,
|
|
98
|
+
"aria-label": t.editButton
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ e(
|
|
102
|
+
o,
|
|
103
|
+
{
|
|
104
|
+
variant: "link",
|
|
105
|
+
size: "icon",
|
|
106
|
+
danger: !0,
|
|
107
|
+
icon: /* @__PURE__ */ e(C, {}),
|
|
108
|
+
onClick: k,
|
|
109
|
+
"aria-label": t.removeButton
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] })
|
|
58
113
|
] })
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
target: "_blank",
|
|
65
|
-
rel: "noopener noreferrer",
|
|
66
|
-
className: "max-w-48 flex-1 truncate text-sm text-text-brand-def hover:underline",
|
|
67
|
-
children: o.getAttributes("link").href
|
|
68
|
-
}
|
|
69
|
-
),
|
|
70
|
-
/* @__PURE__ */ e(
|
|
71
|
-
"button",
|
|
72
|
-
{
|
|
73
|
-
type: "button",
|
|
74
|
-
onClick: d,
|
|
75
|
-
className: "cursor-pointer rounded p-1 text-text-brand-def hover:bg-surface-base-tertiary",
|
|
76
|
-
"aria-label": r.editButton,
|
|
77
|
-
children: /* @__PURE__ */ e(h, { className: "size-icon-xsmall" })
|
|
78
|
-
}
|
|
79
|
-
),
|
|
80
|
-
/* @__PURE__ */ e(
|
|
81
|
-
"button",
|
|
82
|
-
{
|
|
83
|
-
type: "button",
|
|
84
|
-
onClick: m,
|
|
85
|
-
className: "cursor-pointer rounded p-1 text-text-brand-def hover:bg-surface-base-tertiary",
|
|
86
|
-
"aria-label": r.removeButton,
|
|
87
|
-
children: /* @__PURE__ */ e(x, { className: "size-icon-xsmall" })
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
] })
|
|
91
|
-
}
|
|
92
|
-
)
|
|
93
|
-
}
|
|
94
|
-
);
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
};
|
|
95
119
|
export {
|
|
96
|
-
|
|
120
|
+
R as LinkBubbleMenu
|
|
97
121
|
};
|
|
@@ -114,8 +114,11 @@ export interface TextEditorProps {
|
|
|
114
114
|
* <TextEditor extensions={[Mention.configure({ ... })]} />
|
|
115
115
|
*/
|
|
116
116
|
extensions?: AnyExtension[];
|
|
117
|
-
/**
|
|
118
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Minimum height of the content area in pixels. Clamped to a minimum of 220px
|
|
119
|
+
* to ensure the link bubble menu has enough space. Default: 220
|
|
120
|
+
*/
|
|
121
|
+
minHeight?: number;
|
|
119
122
|
/** Maximum height of the content area (enables scrolling) */
|
|
120
123
|
maxHeight?: number | string;
|
|
121
124
|
/** Enables vertical resizing. Default: true */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/TextEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/TextEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAGhD,OAAO,EAAE,KAAK,MAAM,EAA4B,MAAM,eAAe,CAAA;AAkBrE,gCAAgC;AAChC,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,CAAA;AAElC,+BAA+B;AAC/B,KAAK,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAE7B,wCAAwC;AACxC,KAAK,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,eAAe,CAAA;AAEzD,6BAA6B;AAC7B,KAAK,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEpC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,uBAAuB;IACtC,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,GAAG,WAAW,EAAE,CAAA;IACjC,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,GAAG,YAAY,EAAE,CAAA;IACnC,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,GAAG,cAAc,EAAE,CAAA;IACvC,wDAAwD;IACxD,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,EAAE,CAAA;IAC5B,iFAAiF;IACjF,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,kDAAkD;IAClD,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,aAAa;IAC5B,4CAA4C;IAC5C,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,yBAAyB;IACzB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,oCAAoC;IACpC,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,MAAM,CAAA;IACrB,gDAAgD;IAChD,OAAO,EAAE,MAAM,MAAM,CAAA;IACrB,gDAAgD;IAChD,OAAO,EAAE,MAAM,OAAO,CAAA;IACtB,+CAA+C;IAC/C,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,uBAAuB,CAAA;IACjC,4DAA4D;IAC5D,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,YAAY,EAAE,CAAA;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,0DAA0D;IAC1D,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAwBD,QAAA,MAAM,UAAU,2GAyQf,CAAA;AAID,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Link as
|
|
4
|
-
import { Placeholder as
|
|
5
|
-
import { useEditor as
|
|
6
|
-
import { StarterKit as
|
|
7
|
-
import { cva as
|
|
8
|
-
import { EditorToolbar as
|
|
9
|
-
import { LinkBubbleMenu as
|
|
10
|
-
import { useLinkEditor as
|
|
11
|
-
import { useMuzaTranslations as
|
|
1
|
+
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as I, useEffect as T, useImperativeHandle as O, useRef as $ } from "react";
|
|
3
|
+
import { Link as K } from "../../node_modules/@tiptap/extension-link/dist/index.js";
|
|
4
|
+
import { Placeholder as W } from "../../node_modules/@tiptap/extension-placeholder/dist/index.js";
|
|
5
|
+
import { useEditor as Y, EditorContent as q } from "../../node_modules/@tiptap/react/dist/index.js";
|
|
6
|
+
import { StarterKit as D } from "../../node_modules/@tiptap/starter-kit/dist/index.js";
|
|
7
|
+
import { cva as G } from "class-variance-authority";
|
|
8
|
+
import { EditorToolbar as J } from "./EditorToolbar.js";
|
|
9
|
+
import { LinkBubbleMenu as Q } from "./LinkBubbleMenu.js";
|
|
10
|
+
import { useLinkEditor as X } from "./useLinkEditor.js";
|
|
11
|
+
import { useMuzaTranslations as Z } from "../../translations/TranslationContext.js";
|
|
12
|
+
import { cn as d } from "../../utils/cn.js";
|
|
12
13
|
import { Flex as L } from "../Flex/Flex.js";
|
|
13
14
|
import { Typography as E } from "../Typography/Typography.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
const ot = q(
|
|
15
|
+
import { TooltipProvider as tt, Tooltip as et, TooltipTrigger as rt, TooltipContent as ot } from "../Tooltip/Tooltip.js";
|
|
16
|
+
import { InfoCircleBold as it } from "@solar-icons/react-perf";
|
|
17
|
+
const nt = G(
|
|
18
18
|
[
|
|
19
19
|
"overflow-hidden rounded-xl border bg-surface-base-secondary transition-colors",
|
|
20
20
|
"focus-within:border-comp-texteditor-stroke-focused",
|
|
@@ -33,41 +33,41 @@ const ot = q(
|
|
|
33
33
|
state: "default"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
),
|
|
36
|
+
), st = I(
|
|
37
37
|
({
|
|
38
38
|
value: s,
|
|
39
39
|
defaultValue: C,
|
|
40
40
|
onChange: p,
|
|
41
|
-
onBlur:
|
|
42
|
-
onFocus:
|
|
43
|
-
placeholder:
|
|
41
|
+
onBlur: M,
|
|
42
|
+
onFocus: w,
|
|
43
|
+
placeholder: H = "",
|
|
44
44
|
label: x,
|
|
45
|
-
hint:
|
|
46
|
-
infoTooltip:
|
|
45
|
+
hint: u,
|
|
46
|
+
infoTooltip: h,
|
|
47
47
|
disabled: i = !1,
|
|
48
48
|
readOnly: f = !1,
|
|
49
49
|
error: a,
|
|
50
50
|
toolbar: n = {},
|
|
51
|
-
toolbarExtra:
|
|
52
|
-
extensions:
|
|
53
|
-
minHeight:
|
|
51
|
+
toolbarExtra: g,
|
|
52
|
+
extensions: z = [],
|
|
53
|
+
minHeight: N = 200,
|
|
54
54
|
maxHeight: m,
|
|
55
|
-
resizable:
|
|
56
|
-
className:
|
|
57
|
-
contentClassName:
|
|
55
|
+
resizable: P = !0,
|
|
56
|
+
className: R,
|
|
57
|
+
contentClassName: U,
|
|
58
58
|
unstyled: S = !1,
|
|
59
59
|
editorClassName: V
|
|
60
60
|
}, j) => {
|
|
61
|
-
const
|
|
61
|
+
const k = Z(), c = {
|
|
62
62
|
history: n.history ?? !0,
|
|
63
63
|
headings: n.headings ?? !0,
|
|
64
64
|
formatting: n.formatting ?? !0,
|
|
65
65
|
lists: n.lists ?? !0,
|
|
66
66
|
link: n.link ?? !0,
|
|
67
67
|
clearFormatting: n.clearFormatting ?? !0
|
|
68
|
-
}, A = !!
|
|
68
|
+
}, A = !!g || Object.values(c).some((e) => e !== !1), t = Y({
|
|
69
69
|
extensions: [
|
|
70
|
-
|
|
70
|
+
D.configure({
|
|
71
71
|
heading: { levels: [1, 2, 3] },
|
|
72
72
|
bulletList: {
|
|
73
73
|
HTMLAttributes: { class: "list-disc ml-6" }
|
|
@@ -77,7 +77,7 @@ const ot = q(
|
|
|
77
77
|
}
|
|
78
78
|
}),
|
|
79
79
|
...c.link ? [
|
|
80
|
-
|
|
80
|
+
K.configure({
|
|
81
81
|
openOnClick: !1,
|
|
82
82
|
autolink: !0,
|
|
83
83
|
linkOnPaste: !0,
|
|
@@ -87,19 +87,19 @@ const ot = q(
|
|
|
87
87
|
}
|
|
88
88
|
})
|
|
89
89
|
] : [],
|
|
90
|
-
|
|
91
|
-
placeholder:
|
|
90
|
+
W.configure({
|
|
91
|
+
placeholder: ({ editor: e }) => e.state.doc.textContent.length === 0 ? H : ""
|
|
92
92
|
}),
|
|
93
|
-
...
|
|
93
|
+
...z
|
|
94
94
|
],
|
|
95
95
|
content: s ?? C ?? "",
|
|
96
96
|
editable: !i && !f,
|
|
97
|
-
onUpdate: ({ editor:
|
|
98
|
-
const b =
|
|
97
|
+
onUpdate: ({ editor: e }) => {
|
|
98
|
+
const b = e.getText().trim(), v = e.getHTML();
|
|
99
99
|
p == null || p(b.length === 0 ? "" : v);
|
|
100
100
|
},
|
|
101
|
-
onBlur:
|
|
102
|
-
onFocus:
|
|
101
|
+
onBlur: M,
|
|
102
|
+
onFocus: w,
|
|
103
103
|
editorProps: {
|
|
104
104
|
attributes: {
|
|
105
105
|
class: d(
|
|
@@ -122,7 +122,7 @@ const ot = q(
|
|
|
122
122
|
"[&_li]:my-1",
|
|
123
123
|
"[&_hr]:my-3xl [&_hr]:border-stroke-base-secondary"
|
|
124
124
|
],
|
|
125
|
-
// Placeholder (
|
|
125
|
+
// Placeholder (only when the entire editor is empty — controlled via placeholder function)
|
|
126
126
|
"[&_.is-empty]:before:content-[attr(data-placeholder)] [&_.is-empty]:before:text-comp-input-text-placeholder [&_.is-empty]:before:float-left [&_.is-empty]:before:h-0 [&_.is-empty]:before:pointer-events-none",
|
|
127
127
|
V
|
|
128
128
|
),
|
|
@@ -135,12 +135,12 @@ const ot = q(
|
|
|
135
135
|
});
|
|
136
136
|
T(() => {
|
|
137
137
|
if (t && s !== void 0) {
|
|
138
|
-
const
|
|
139
|
-
(s || "<p></p>") !== (
|
|
138
|
+
const e = t.getHTML();
|
|
139
|
+
(s || "<p></p>") !== (e || "<p></p>") && t.commands.setContent(s, !1);
|
|
140
140
|
}
|
|
141
141
|
}, [t, s]), T(() => {
|
|
142
142
|
t && t.setEditable(!i && !f);
|
|
143
|
-
}, [t, i, f]),
|
|
143
|
+
}, [t, i, f]), O(
|
|
144
144
|
j,
|
|
145
145
|
() => ({
|
|
146
146
|
editor: t,
|
|
@@ -149,92 +149,100 @@ const ot = q(
|
|
|
149
149
|
getHTML: () => (t == null ? void 0 : t.getHTML()) ?? "",
|
|
150
150
|
getText: () => (t == null ? void 0 : t.getText()) ?? "",
|
|
151
151
|
isEmpty: () => (t == null ? void 0 : t.isEmpty) ?? !0,
|
|
152
|
-
setContent: (
|
|
152
|
+
setContent: (e) => t == null ? void 0 : t.commands.setContent(e)
|
|
153
153
|
}),
|
|
154
154
|
[t]
|
|
155
155
|
);
|
|
156
|
-
const
|
|
157
|
-
minHeight:
|
|
156
|
+
const o = X(t), y = $(null), B = i ? "disabled" : a ? "error" : "default", _ = typeof a == "string" ? a : void 0, F = {
|
|
157
|
+
minHeight: `${Math.max(N, 200)}px`,
|
|
158
158
|
maxHeight: m ? typeof m == "number" ? `${m}px` : m : void 0,
|
|
159
|
-
resize:
|
|
159
|
+
resize: P && !i ? "vertical" : "none"
|
|
160
160
|
};
|
|
161
|
-
return /* @__PURE__ */
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
] }),
|
|
179
|
-
/* @__PURE__ */ l("div", { className: ot({ state: B }), children: [
|
|
180
|
-
A && /* @__PURE__ */ e(
|
|
181
|
-
D,
|
|
182
|
-
{
|
|
183
|
-
editor: t,
|
|
184
|
-
toolbarConfig: c,
|
|
185
|
-
disabled: i,
|
|
186
|
-
translations: y.textEditor,
|
|
187
|
-
onLinkClick: r.handleLinkToolbarClick,
|
|
188
|
-
toolbarExtra: k
|
|
189
|
-
}
|
|
190
|
-
),
|
|
191
|
-
/* @__PURE__ */ l(
|
|
192
|
-
"div",
|
|
193
|
-
{
|
|
194
|
-
className: d(
|
|
195
|
-
"relative overflow-auto px-2xl py-xl",
|
|
196
|
-
"mr-[calc(var(--spacing-xl)/2)]",
|
|
197
|
-
"pr-[calc(var(--spacing-2xl)-var(--spacing-xl)/2)]",
|
|
198
|
-
// Compensate for scrollbar offset
|
|
199
|
-
P
|
|
161
|
+
return /* @__PURE__ */ r("div", { ref: y, children: /* @__PURE__ */ l(
|
|
162
|
+
L,
|
|
163
|
+
{
|
|
164
|
+
direction: "column",
|
|
165
|
+
className: d("gap-comp-input-gap", R),
|
|
166
|
+
children: [
|
|
167
|
+
x && /* @__PURE__ */ l(L, { align: "center", gap: "2xs", children: [
|
|
168
|
+
/* @__PURE__ */ r(
|
|
169
|
+
E,
|
|
170
|
+
{
|
|
171
|
+
component: "label",
|
|
172
|
+
weight: "regular",
|
|
173
|
+
size: "sm",
|
|
174
|
+
className: "text-comp-select-text-primary",
|
|
175
|
+
fixY: !0,
|
|
176
|
+
children: x
|
|
177
|
+
}
|
|
200
178
|
),
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
179
|
+
h && /* @__PURE__ */ r(tt, { children: /* @__PURE__ */ l(et, { children: [
|
|
180
|
+
/* @__PURE__ */ r(rt, { asChild: !0, children: /* @__PURE__ */ r(it, { className: "cursor-help text-comp-info-ico-def hover:text-comp-info-ico-hover" }) }),
|
|
181
|
+
/* @__PURE__ */ r(ot, { children: h })
|
|
182
|
+
] }) })
|
|
183
|
+
] }),
|
|
184
|
+
/* @__PURE__ */ l("div", { className: nt({ state: B }), children: [
|
|
185
|
+
A && /* @__PURE__ */ r(
|
|
186
|
+
J,
|
|
187
|
+
{
|
|
188
|
+
editor: t,
|
|
189
|
+
toolbarConfig: c,
|
|
190
|
+
disabled: i,
|
|
191
|
+
translations: k.textEditor,
|
|
192
|
+
onLinkClick: o.handleLinkToolbarClick,
|
|
193
|
+
toolbarExtra: g
|
|
194
|
+
}
|
|
195
|
+
),
|
|
196
|
+
/* @__PURE__ */ l(
|
|
197
|
+
"div",
|
|
198
|
+
{
|
|
199
|
+
className: d(
|
|
200
|
+
"relative overflow-auto px-2xl py-xl",
|
|
201
|
+
"mr-[calc(var(--spacing-xl)/2)]",
|
|
202
|
+
"pr-[calc(var(--spacing-2xl)-var(--spacing-xl)/2)]",
|
|
203
|
+
// Compensate for scrollbar offset
|
|
204
|
+
U
|
|
205
|
+
),
|
|
206
|
+
style: F,
|
|
207
|
+
children: [
|
|
208
|
+
/* @__PURE__ */ r(q, { editor: t, className: "h-full w-full" }),
|
|
209
|
+
t && c.link && /* @__PURE__ */ r(
|
|
210
|
+
Q,
|
|
211
|
+
{
|
|
212
|
+
editor: t,
|
|
213
|
+
containerRef: y,
|
|
214
|
+
linkUrl: o.linkUrl,
|
|
215
|
+
isEditingLink: o.isEditingLink,
|
|
216
|
+
onUrlChange: o.setLinkUrl,
|
|
217
|
+
onEdit: o.handleOpenLinkEdit,
|
|
218
|
+
onSave: o.handleSaveLink,
|
|
219
|
+
onRemove: o.handleRemoveLink,
|
|
220
|
+
onCancel: o.handleCancelEdit,
|
|
221
|
+
translations: k.textEditor
|
|
222
|
+
}
|
|
223
|
+
)
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
)
|
|
227
|
+
] }),
|
|
228
|
+
(u || _) && /* @__PURE__ */ r(
|
|
229
|
+
E,
|
|
230
|
+
{
|
|
231
|
+
component: "span",
|
|
232
|
+
size: "sm",
|
|
233
|
+
weight: "regular",
|
|
234
|
+
className: d("text-comp-select-text-secondary", {
|
|
235
|
+
"text-comp-input-text-error": a
|
|
236
|
+
}),
|
|
237
|
+
children: _ || u
|
|
238
|
+
}
|
|
239
|
+
)
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
) });
|
|
235
243
|
}
|
|
236
244
|
);
|
|
237
|
-
|
|
245
|
+
st.displayName = "TextEditor";
|
|
238
246
|
export {
|
|
239
|
-
|
|
247
|
+
st as TextEditor
|
|
240
248
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/TextEditor.stories.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAO3D,OAAO,EACL,UAAU,EAIX,MAAM,SAAS,CAAA;AAEhB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"TextEditor.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/TextEditor.stories.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAO3D,OAAO,EACL,UAAU,EAIX,MAAM,SAAS,CAAA;AAEhB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAgIjC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAA;AAGxC,eAAO,MAAM,OAAO,EAAE,KAerB,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,KA4BxB,CAAA;AAGD,eAAO,MAAM,mBAAmB,EAAE,KAmCjC,CAAA;AAGD,eAAO,MAAM,SAAS,EAAE,KA6DvB,CAAA;AAGD,eAAO,MAAM,kBAAkB,EAAE,KAsBhC,CAAA;AAGD,eAAO,MAAM,cAAc,EAAE,KAsB5B,CAAA;AAGD,eAAO,MAAM,gBAAgB,EAAE,KAsC9B,CAAA;AAGD,eAAO,MAAM,YAAY,EAAE,KAmC1B,CAAA;AAGD,eAAO,MAAM,mBAAmB,EAAE,KAsCjC,CAAA;AAqKD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,EAAE,KAwD1B,CAAA;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,mBAAmB,EAAE,KA0DjC,CAAA;AAGD,eAAO,MAAM,QAAQ,EAAE,KA6CtB,CAAA;AAGD,eAAO,MAAM,mBAAmB,EAAE,KA0CjC,CAAA"}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
|
-
|
|
2
|
+
/** Props for the Textarea component. */
|
|
3
|
+
export interface TextareaProps extends ComponentProps<'textarea'> {
|
|
4
|
+
/** Controls manual resize behavior via drag handle. @default 'none' */
|
|
3
5
|
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
6
|
+
/** Label text displayed above the textarea. */
|
|
4
7
|
label?: string;
|
|
8
|
+
/** Helper text displayed below the textarea. Replaced by errorMessage when error is true. */
|
|
5
9
|
hint?: string;
|
|
10
|
+
/** Applies error border styling. @default false */
|
|
6
11
|
error?: boolean;
|
|
12
|
+
/** Error message displayed below textarea when error is true. Overrides hint text. */
|
|
7
13
|
errorMessage?: string;
|
|
14
|
+
/** Name attribute for form submission. */
|
|
8
15
|
name?: string;
|
|
16
|
+
/** Automatically grows textarea height to fit content. @default false */
|
|
9
17
|
autoResize?: boolean;
|
|
10
18
|
}
|
|
11
19
|
export declare const Textarea: import('react').ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
12
|
-
export {};
|
|
13
20
|
//# sourceMappingURL=Textarea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAA6B,MAAM,OAAO,CAAA;AAyCtE,
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAA6B,MAAM,OAAO,CAAA;AAyCtE,wCAAwC;AACxC,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,UAAU,CAAC;IAC/D,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAA;IACpD,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6FAA6F;IAC7F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,eAAO,MAAM,QAAQ,4HA0EpB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,
|
|
1
|
+
{"version":3,"file":"Textarea.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CA8F/B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAEtC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAe9B,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAgBpB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAiBnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAiBxB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAiB9B,CAAA"}
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
import { InputProps } from '../Input';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Props for the TimePicker component.
|
|
4
|
+
* Extends Input props except `type` (fixed to time) and `suffix` (fixed to clock icon).
|
|
5
|
+
*/
|
|
6
|
+
export interface TimePickerProps extends Omit<InputProps, 'type' | 'suffix'> {
|
|
7
|
+
/** Placeholder text shown before focus. Input switches to native time picker on focus. */
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
/** Label text displayed above the time picker. */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Helper text displayed below the time picker. */
|
|
12
|
+
hint?: string;
|
|
13
|
+
/** Controls height and padding. @default 'base' */
|
|
14
|
+
size?: 'sm' | 'base' | 'lg';
|
|
15
|
+
/** Applies error border styling. @default false */
|
|
16
|
+
error?: boolean;
|
|
17
|
+
/** Prevents interaction and applies disabled styling. */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Makes the input read-only but still visible. */
|
|
20
|
+
readOnly?: boolean;
|
|
21
|
+
/** Marks the field as required in form validation. */
|
|
22
|
+
required?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const TimePicker: ({ placeholder, ...props }: TimePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
25
|
export { TimePicker };
|
|
4
26
|
//# sourceMappingURL=TimePicker.d.ts.map
|