@ultraviolet/ui 3.16.0 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_@oxc-project_runtime@0.130.0/helpers/asyncToGenerator.js +34 -0
- package/dist/_virtual/_@oxc-project_runtime@0.130.0/helpers/extends.js +17 -0
- package/dist/_virtual/_@oxc-project_runtime@0.130.0/helpers/objectDestructuringEmpty.js +11 -0
- package/dist/components/Avatar/styles.css.js +2 -0
- package/dist/components/Checkbox/styles.css.js +2 -0
- package/dist/components/Description/index.d.ts +2 -3
- package/dist/components/Description/index.d.ts.map +1 -1
- package/dist/components/Description/index.js +1 -0
- package/dist/components/FileInput/__mock__/mockFile.d.ts +3 -0
- package/dist/components/FileInput/__mock__/mockFile.d.ts.map +1 -0
- package/dist/components/FileInput/components/List.d.ts.map +1 -1
- package/dist/components/FileInput/components/List.js +13 -11
- package/dist/components/FileInput/helpers.d.ts +5 -1
- package/dist/components/FileInput/helpers.d.ts.map +1 -1
- package/dist/components/FileInput/helpers.js +65 -3
- package/dist/components/FileInput/index.d.ts +1 -1
- package/dist/components/FileInput/index.d.ts.map +1 -1
- package/dist/components/FileInput/index.js +34 -24
- package/dist/components/FileInput/styles.css.d.ts +1 -0
- package/dist/components/FileInput/styles.css.d.ts.map +1 -1
- package/dist/components/FileInput/styles.css.js +8 -7
- package/dist/components/FileInput/types.d.ts +13 -6
- package/dist/components/FileInput/types.d.ts.map +1 -1
- package/dist/components/Key/constants.d.ts +6 -6
- package/dist/components/Key/constants.d.ts.map +1 -1
- package/dist/components/Modal/ModalContent.d.ts +1 -1
- package/dist/components/Modal/ModalContent.d.ts.map +1 -1
- package/dist/components/Modal/ModalContent.js +2 -2
- package/dist/components/Modal/index.d.ts +9 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +5 -26
- package/dist/components/Modal/styles.css.d.ts.map +1 -1
- package/dist/components/NumberInput/index.d.ts.map +1 -1
- package/dist/components/NumberInput/index.js +0 -1
- package/dist/components/PhoneInput/PhoneInput.d.ts +36 -0
- package/dist/components/PhoneInput/PhoneInput.d.ts.map +1 -0
- package/dist/components/PhoneInput/PhoneInput.js +151 -0
- package/dist/components/PhoneInput/constants.d.ts +6 -0
- package/dist/components/PhoneInput/constants.d.ts.map +1 -0
- package/dist/components/PhoneInput/index.d.ts +2 -0
- package/dist/components/PhoneInput/index.d.ts.map +1 -0
- package/dist/components/PhoneInput/index.js +9 -0
- package/dist/components/PhoneInput/styles.css.d.ts +7 -0
- package/dist/components/PhoneInput/styles.css.d.ts.map +1 -0
- package/dist/components/PhoneInput/styles.css.js +22 -0
- package/dist/components/PhoneInput/styles.css.ts.vanilla.js +8 -0
- package/dist/components/Popup/styles.css.js +2 -0
- package/dist/components/ProgressBar/styles.css.js +2 -0
- package/dist/components/SelectInput/components/Dropdown/AddOption.d.ts +1 -1
- package/dist/components/SelectInput/components/Dropdown/AddOption.d.ts.map +1 -1
- package/dist/components/SelectInput/components/Dropdown/Content.d.ts.map +1 -1
- package/dist/components/SelectInput/components/Dropdown/Content.js +3 -8
- package/dist/components/SelectInput/components/Dropdown/Item.d.ts +1 -1
- package/dist/components/SelectInput/components/Dropdown/Item.d.ts.map +1 -1
- package/dist/components/SelectInput/components/Dropdown/Option.d.ts +1 -1
- package/dist/components/SelectInput/components/Dropdown/Option.d.ts.map +1 -1
- package/dist/components/SelectInput/components/Dropdown/Option.js +1 -5
- package/dist/components/SelectInput/components/Dropdown/SelectAll.d.ts +1 -1
- package/dist/components/SelectInput/components/Dropdown/SelectAll.d.ts.map +1 -1
- package/dist/components/SelectInput/components/Dropdown/SelectAll.js +1 -1
- package/dist/components/SelectInput/components/SelectBar/SelectBar.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectBar/SelectBar.js +1 -5
- package/dist/components/SelectInput/components/SelectBar/Values.d.ts +1 -1
- package/dist/components/SelectInput/components/SelectBar/Values.d.ts.map +1 -1
- package/dist/components/SelectInput/index.d.ts.map +1 -1
- package/dist/components/SelectInput/index.js +0 -1
- package/dist/components/SelectableCard/styles.css.js +2 -0
- package/dist/components/SelectableCardOptionGroup/SelectableCardOptionGroup.js +1 -2
- package/dist/components/Table/styles.css.js +2 -0
- package/dist/components/TagInput/index.d.ts.map +1 -1
- package/dist/components/TagInput/index.js +1 -2
- package/dist/components/Text/index.d.ts +3 -2
- package/dist/components/Text/index.d.ts.map +1 -1
- package/dist/components/Text/index.js +2 -1
- package/dist/components/Text/style.css.js +2 -0
- package/dist/components/TextInput/index.d.ts.map +1 -1
- package/dist/components/TextInput/index.js +0 -1
- package/dist/components/TextInput/styles.css.d.ts.map +1 -1
- package/dist/components/TimeInput/index.js +0 -1
- package/dist/components/Toaster/Toaster.js +1 -1
- package/dist/components/Toaster/components/Button.js +34 -0
- package/dist/components/Toaster/components/Link.js +26 -0
- package/dist/components/Toaster/index.js +12 -2
- package/dist/components/Toggle/index.d.ts.map +1 -1
- package/dist/components/Toggle/index.js +1 -2
- package/dist/components/UnitInput/index.d.ts.map +1 -1
- package/dist/components/UnitInput/index.js +0 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -1
- package/dist/composition.js +4 -1
- package/dist/compositions/CodeEditor/styles.css.d.ts.map +1 -1
- package/dist/compositions/Navigation/styles.css.js +4 -0
- package/dist/compositions/Navigation/variables.css.js +0 -2
- package/dist/compositions/OfferList/components/Row.js +1 -1
- package/dist/compositions/OptionSelector/index.d.ts.map +1 -1
- package/dist/compositions/OptionSelector/index.js +0 -2
- package/dist/compositions/OptionSelector/styles.css.js +0 -14
- package/dist/compositions/RichTextInput/Toolbar.d.ts +9 -0
- package/dist/compositions/RichTextInput/Toolbar.d.ts.map +1 -0
- package/dist/compositions/RichTextInput/Toolbar.js +142 -0
- package/dist/compositions/RichTextInput/editorCore.d.ts +11 -0
- package/dist/compositions/RichTextInput/editorCore.d.ts.map +1 -0
- package/dist/compositions/RichTextInput/editorCore.js +64 -0
- package/dist/compositions/RichTextInput/helpers.d.ts +6 -0
- package/dist/compositions/RichTextInput/helpers.d.ts.map +1 -0
- package/dist/compositions/RichTextInput/helpers.js +21 -0
- package/dist/compositions/RichTextInput/index.d.ts +28 -0
- package/dist/compositions/RichTextInput/index.d.ts.map +1 -0
- package/dist/compositions/RichTextInput/index.js +129 -0
- package/dist/compositions/RichTextInput/styles.css.d.ts +69 -0
- package/dist/compositions/RichTextInput/styles.css.d.ts.map +1 -0
- package/dist/compositions/RichTextInput/styles.css.js +67 -0
- package/dist/compositions/RichTextInput/styles.css.ts.vanilla.js +8 -0
- package/dist/compositions/SteppedListCard/styles.css.js +0 -2
- package/dist/compositions/index.d.ts +1 -0
- package/dist/compositions/index.d.ts.map +1 -1
- package/dist/compositions/index.js +2 -0
- package/dist/index.js +3 -1
- package/dist/ui.css +1 -1
- package/package.json +16 -8
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { Stack, init_Stack } from "../../components/Stack/index.js";
|
|
3
|
+
import { Button, init_Button } from "../../components/Button/index.js";
|
|
4
|
+
import { init_helpers, isSelectionInNodeType } from "./helpers.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { useEditorEventCallback, useEditorState } from "@handlewithcare/react-prosemirror";
|
|
7
|
+
import { BoldIcon, ItalicIcon, ListBulletIcon, ListNumberIcon, UnderlineIcon } from "@ultraviolet/icons";
|
|
8
|
+
import { toggleMark } from "prosemirror-commands";
|
|
9
|
+
import { liftListItem, wrapInList } from "prosemirror-schema-list";
|
|
10
|
+
|
|
11
|
+
//#region src/compositions/RichTextInput/Toolbar.tsx
|
|
12
|
+
var isMarkActive, Toolbar;
|
|
13
|
+
var init_Toolbar = __esmMin(() => {
|
|
14
|
+
init_Button();
|
|
15
|
+
init_Stack();
|
|
16
|
+
init_helpers();
|
|
17
|
+
isMarkActive = (state, markType) => {
|
|
18
|
+
if (!markType) return false;
|
|
19
|
+
const { from, $from, to, empty } = state.selection;
|
|
20
|
+
if (empty) {
|
|
21
|
+
var _state$storedMarks;
|
|
22
|
+
const marks = (_state$storedMarks = state.storedMarks) !== null && _state$storedMarks !== void 0 ? _state$storedMarks : $from.marks();
|
|
23
|
+
return Boolean(markType.isInSet(marks));
|
|
24
|
+
}
|
|
25
|
+
return state.doc.rangeHasMark(from, to, markType);
|
|
26
|
+
};
|
|
27
|
+
Toolbar = ({ disabled, showList, showMarks, size }) => {
|
|
28
|
+
const editorState = useEditorState();
|
|
29
|
+
const runCommand = useEditorEventCallback((view, command) => {
|
|
30
|
+
command(view.state, view.dispatch);
|
|
31
|
+
});
|
|
32
|
+
const runCommandOnEnter = (event, command) => {
|
|
33
|
+
if (event.key !== "Enter") return;
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
runCommand(command);
|
|
36
|
+
};
|
|
37
|
+
const strongMark = editorState.schema.marks["strong"];
|
|
38
|
+
const emMark = editorState.schema.marks["em"];
|
|
39
|
+
const underlineMark = editorState.schema.marks["underline"];
|
|
40
|
+
const bulletList = editorState.schema.nodes["bullet_list"];
|
|
41
|
+
const orderedList = editorState.schema.nodes["ordered_list"];
|
|
42
|
+
const listItem = editorState.schema.nodes["list_item"];
|
|
43
|
+
const isInBulletList = isSelectionInNodeType(editorState, bulletList);
|
|
44
|
+
const isInOrderedList = isSelectionInNodeType(editorState, orderedList);
|
|
45
|
+
const buttonSize = size === "small" ? "xsmall" : "small";
|
|
46
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
47
|
+
alignItems: "center",
|
|
48
|
+
direction: "row",
|
|
49
|
+
gap: 1,
|
|
50
|
+
role: "toolbar",
|
|
51
|
+
children: [showMarks ? /* @__PURE__ */ jsxs(Stack, {
|
|
52
|
+
alignItems: "center",
|
|
53
|
+
direction: "row",
|
|
54
|
+
gap: 1,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsx(Button, {
|
|
57
|
+
"aria-label": "Bold",
|
|
58
|
+
disabled,
|
|
59
|
+
size: buttonSize,
|
|
60
|
+
variant: isMarkActive(editorState, strongMark) ? "filled" : "ghost",
|
|
61
|
+
sentiment: "neutral",
|
|
62
|
+
onMouseDown: (event) => {
|
|
63
|
+
event.preventDefault();
|
|
64
|
+
if (strongMark) runCommand(toggleMark(strongMark));
|
|
65
|
+
},
|
|
66
|
+
onKeyDown: (event) => {
|
|
67
|
+
if (strongMark) runCommandOnEnter(event, toggleMark(strongMark));
|
|
68
|
+
},
|
|
69
|
+
children: /* @__PURE__ */ jsx(BoldIcon, {})
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ jsx(Button, {
|
|
72
|
+
"aria-label": "Italic",
|
|
73
|
+
disabled,
|
|
74
|
+
size: buttonSize,
|
|
75
|
+
variant: isMarkActive(editorState, emMark) ? "filled" : "ghost",
|
|
76
|
+
sentiment: "neutral",
|
|
77
|
+
onMouseDown: (event) => {
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
if (emMark) runCommand(toggleMark(emMark));
|
|
80
|
+
},
|
|
81
|
+
onKeyDown: (event) => {
|
|
82
|
+
if (emMark) runCommandOnEnter(event, toggleMark(emMark));
|
|
83
|
+
},
|
|
84
|
+
children: /* @__PURE__ */ jsx(ItalicIcon, {})
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ jsx(Button, {
|
|
87
|
+
"aria-label": "Underline",
|
|
88
|
+
disabled,
|
|
89
|
+
size: buttonSize,
|
|
90
|
+
variant: isMarkActive(editorState, underlineMark) ? "filled" : "ghost",
|
|
91
|
+
sentiment: "neutral",
|
|
92
|
+
onMouseDown: (event) => {
|
|
93
|
+
event.preventDefault();
|
|
94
|
+
if (underlineMark) runCommand(toggleMark(underlineMark));
|
|
95
|
+
},
|
|
96
|
+
onKeyDown: (event) => {
|
|
97
|
+
if (underlineMark) runCommandOnEnter(event, toggleMark(underlineMark));
|
|
98
|
+
},
|
|
99
|
+
children: /* @__PURE__ */ jsx(UnderlineIcon, {})
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
}) : null, showList ? /* @__PURE__ */ jsxs(Stack, {
|
|
103
|
+
alignItems: "center",
|
|
104
|
+
direction: "row",
|
|
105
|
+
gap: 1,
|
|
106
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
107
|
+
"aria-label": "Bullet List",
|
|
108
|
+
disabled: disabled || isInOrderedList,
|
|
109
|
+
size: buttonSize,
|
|
110
|
+
variant: isInBulletList ? "filled" : "ghost",
|
|
111
|
+
sentiment: "neutral",
|
|
112
|
+
onMouseDown: (event) => {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
runCommand(isInBulletList ? liftListItem(listItem) : wrapInList(bulletList));
|
|
115
|
+
},
|
|
116
|
+
onKeyDown: (event) => {
|
|
117
|
+
runCommandOnEnter(event, isInBulletList ? liftListItem(listItem) : wrapInList(bulletList));
|
|
118
|
+
},
|
|
119
|
+
children: /* @__PURE__ */ jsx(ListBulletIcon, {})
|
|
120
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
121
|
+
"aria-label": "Ordered List",
|
|
122
|
+
disabled: disabled || isInBulletList,
|
|
123
|
+
size: buttonSize,
|
|
124
|
+
variant: isInOrderedList ? "filled" : "ghost",
|
|
125
|
+
sentiment: "neutral",
|
|
126
|
+
onMouseDown: (event) => {
|
|
127
|
+
event.preventDefault();
|
|
128
|
+
runCommand(isInOrderedList ? liftListItem(listItem) : wrapInList(orderedList));
|
|
129
|
+
},
|
|
130
|
+
onKeyDown: (event) => {
|
|
131
|
+
runCommandOnEnter(event, isInOrderedList ? liftListItem(listItem) : wrapInList(orderedList));
|
|
132
|
+
},
|
|
133
|
+
children: /* @__PURE__ */ jsx(ListNumberIcon, {})
|
|
134
|
+
})]
|
|
135
|
+
}) : null]
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
//#endregion
|
|
141
|
+
init_Toolbar();
|
|
142
|
+
export { Toolbar, init_Toolbar };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Schema } from 'prosemirror-model';
|
|
2
|
+
import type { Node } from 'prosemirror-model';
|
|
3
|
+
import { EditorState } from 'prosemirror-state';
|
|
4
|
+
import type { Plugin } from 'prosemirror-state';
|
|
5
|
+
export declare const editorSchema: Schema;
|
|
6
|
+
export declare const listItemNode: import("prosemirror-model").NodeType;
|
|
7
|
+
export declare const createPlugins: () => Plugin<any>[];
|
|
8
|
+
export declare const createEditorState: (doc: Node) => EditorState;
|
|
9
|
+
export declare const docFromHtml: (html: string | undefined, schema?: Schema) => Node;
|
|
10
|
+
export declare const editorDocToHtml: (doc: Node, schema?: Schema) => string;
|
|
11
|
+
//# sourceMappingURL=editorCore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editorCore.d.ts","sourceRoot":"","sources":["../../../src/compositions/RichTextInput/editorCore.ts"],"names":[],"mappings":"AAGA,OAAO,EAA4B,MAAM,EAAE,MAAM,mBAAmB,CAAA;AACpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAG7C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAK/C,eAAO,MAAM,YAAY,EAAE,MAYzB,CAAA;AAEF,eAAO,MAAM,YAAY,sCAAkC,CAAA;AAI3D,eAAO,MAAM,aAAa,qBAgCzB,CAAA;AAED,eAAO,MAAM,iBAAiB,QAAS,IAAI,gBAKvC,CAAA;AAEJ,eAAO,MAAM,WAAW,SAAU,MAAM,GAAG,SAAS,WAAU,MAAM,KAAkB,IAerF,CAAA;AAED,eAAO,MAAM,eAAe,QAAS,IAAI,WAAU,MAAM,KAAkB,MAU1E,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { createToggleListCommand, escapeHtml, init_helpers } from "./helpers.js";
|
|
3
|
+
import { reactKeys } from "@handlewithcare/react-prosemirror";
|
|
4
|
+
import { baseKeymap, toggleMark } from "prosemirror-commands";
|
|
5
|
+
import { keymap } from "prosemirror-keymap";
|
|
6
|
+
import { DOMParser, DOMSerializer, Schema } from "prosemirror-model";
|
|
7
|
+
import { schema } from "prosemirror-schema-basic";
|
|
8
|
+
import { addListNodes, splitListItem } from "prosemirror-schema-list";
|
|
9
|
+
import { EditorState } from "prosemirror-state";
|
|
10
|
+
|
|
11
|
+
//#region src/compositions/RichTextInput/editorCore.ts
|
|
12
|
+
var nodesWithLists, editorSchema, listItemNode, bulletListNode, orderedListNode, createPlugins, createEditorState, docFromHtml, editorDocToHtml;
|
|
13
|
+
var init_editorCore = __esmMin(() => {
|
|
14
|
+
init_helpers();
|
|
15
|
+
nodesWithLists = addListNodes(schema.spec.nodes.remove("image"), "paragraph block*", "block");
|
|
16
|
+
editorSchema = new Schema({
|
|
17
|
+
nodes: nodesWithLists,
|
|
18
|
+
marks: schema.spec.marks.addToEnd("underline", {
|
|
19
|
+
parseDOM: [{ tag: "u" }, {
|
|
20
|
+
style: "text-decoration",
|
|
21
|
+
getAttrs: (value) => value === "underline" ? null : false
|
|
22
|
+
}],
|
|
23
|
+
toDOM: () => ["u", 0]
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
listItemNode = editorSchema.nodes["list_item"];
|
|
27
|
+
bulletListNode = editorSchema.nodes["bullet_list"];
|
|
28
|
+
orderedListNode = editorSchema.nodes["ordered_list"];
|
|
29
|
+
createPlugins = () => {
|
|
30
|
+
const plugins = [reactKeys()];
|
|
31
|
+
if (editorSchema.marks["strong"]) plugins.push(keymap({ "Mod-b": toggleMark(editorSchema.marks["strong"]) }));
|
|
32
|
+
if (editorSchema.marks["em"]) plugins.push(keymap({ "Mod-i": toggleMark(editorSchema.marks["em"]) }));
|
|
33
|
+
if (editorSchema.marks["underline"]) plugins.push(keymap({ "Mod-u": toggleMark(editorSchema.marks["underline"]) }));
|
|
34
|
+
if (bulletListNode) plugins.push(keymap({ "Mod-Shift-8": createToggleListCommand(listItemNode, bulletListNode) }));
|
|
35
|
+
if (orderedListNode) plugins.push(keymap({ "Mod-Shift-9": createToggleListCommand(listItemNode, orderedListNode) }));
|
|
36
|
+
if (listItemNode) plugins.push(keymap({ Enter: splitListItem(listItemNode) }));
|
|
37
|
+
plugins.push(keymap(baseKeymap));
|
|
38
|
+
return plugins;
|
|
39
|
+
};
|
|
40
|
+
createEditorState = (doc) => EditorState.create({
|
|
41
|
+
schema: editorSchema,
|
|
42
|
+
doc,
|
|
43
|
+
plugins: createPlugins()
|
|
44
|
+
});
|
|
45
|
+
docFromHtml = (html, schema = editorSchema) => {
|
|
46
|
+
const normalizedHtml = html !== null && html !== void 0 ? html : "";
|
|
47
|
+
if (normalizedHtml.trim() === "") return schema.nodes["doc"].createAndFill();
|
|
48
|
+
if (typeof document === "undefined") return schema.nodes["doc"].createAndFill();
|
|
49
|
+
const container = document.createElement("div");
|
|
50
|
+
container.innerHTML = normalizedHtml.includes("<") ? normalizedHtml : `<p>${escapeHtml(normalizedHtml)}</p>`;
|
|
51
|
+
return DOMParser.fromSchema(schema).parse(container);
|
|
52
|
+
};
|
|
53
|
+
editorDocToHtml = (doc, schema = editorSchema) => {
|
|
54
|
+
if (typeof document === "undefined") return "";
|
|
55
|
+
const serializer = DOMSerializer.fromSchema(schema);
|
|
56
|
+
const wrap = document.createElement("div");
|
|
57
|
+
wrap.appendChild(serializer.serializeFragment(doc.content));
|
|
58
|
+
return wrap.innerHTML;
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
init_editorCore();
|
|
64
|
+
export { createEditorState, docFromHtml, editorDocToHtml, editorSchema, init_editorCore };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { NodeType } from 'prosemirror-model';
|
|
2
|
+
import type { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
+
export declare const escapeHtml: (text: string) => string;
|
|
4
|
+
export declare const isSelectionInNodeType: (state: EditorState, nodeType: NodeType) => boolean;
|
|
5
|
+
export declare const createToggleListCommand: (listItemType: NodeType, listType: NodeType) => (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;
|
|
6
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/compositions/RichTextInput/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEjE,eAAO,MAAM,UAAU,SAAU,MAAM,WAMT,CAAA;AAE9B,eAAO,MAAM,qBAAqB,UAAW,WAAW,YAAY,QAAQ,YAU3E,CAAA;AAED,eAAO,MAAM,uBAAuB,iBACnB,QAAQ,YAAY,QAAQ,aAAa,WAAW,aAAa,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,YAKxG,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { liftListItem, wrapInList } from "prosemirror-schema-list";
|
|
3
|
+
|
|
4
|
+
//#region src/compositions/RichTextInput/helpers.ts
|
|
5
|
+
var escapeHtml, isSelectionInNodeType, createToggleListCommand;
|
|
6
|
+
var init_helpers = __esmMin(() => {
|
|
7
|
+
escapeHtml = (text) => text.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
8
|
+
isSelectionInNodeType = (state, nodeType) => {
|
|
9
|
+
const { $from } = state.selection;
|
|
10
|
+
for (let d = $from.depth; d > 0; d -= 1) if ($from.node(d).type === nodeType) return true;
|
|
11
|
+
return false;
|
|
12
|
+
};
|
|
13
|
+
createToggleListCommand = (listItemType, listType) => (state, dispatch) => {
|
|
14
|
+
const isInListItem = isSelectionInNodeType(state, listItemType);
|
|
15
|
+
return (isSelectionInNodeType(state, listType) && isInListItem ? liftListItem(listItemType) : wrapInList(listType))(state, dispatch);
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
init_helpers();
|
|
21
|
+
export { createToggleListCommand, escapeHtml, init_helpers, isSelectionInNodeType };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { CSSProperties, DOMAttributes, ReactNode } from 'react';
|
|
2
|
+
export type RichTextInputProps = {
|
|
3
|
+
'aria-label'?: string;
|
|
4
|
+
'aria-describedby'?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
'data-testid'?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
error?: string;
|
|
10
|
+
helper?: ReactNode;
|
|
11
|
+
label?: string;
|
|
12
|
+
labelDescription?: ReactNode;
|
|
13
|
+
id?: string;
|
|
14
|
+
rows?: number;
|
|
15
|
+
size?: 'large' | 'medium' | 'small';
|
|
16
|
+
maxRows?: number;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
onBlur?: DOMAttributes<HTMLElement>['onBlur'];
|
|
19
|
+
onChange?: (value: string) => void;
|
|
20
|
+
onFocus?: DOMAttributes<HTMLElement>['onFocus'];
|
|
21
|
+
style?: CSSProperties;
|
|
22
|
+
success?: string;
|
|
23
|
+
value?: string;
|
|
24
|
+
showList?: boolean;
|
|
25
|
+
showMarks?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export declare const RichTextInput: ({ value, onChange, onBlur, onFocus, disabled, readOnly, error, helper, success, className, style, size, label, labelDescription, rows, maxRows, id, 'data-testid': dataTestId, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, showMarks, showList, required, }: RichTextInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/compositions/RichTextInput/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAWpE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,SAAS,CAAA;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAA;IAC7C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,OAAO,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,SAAS,CAAC,CAAA;IAC/C,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,aAAa,kRAwBvB,kBAAkB,4CAoFpB,CAAA"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { _objectSpread2, init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
|
|
4
|
+
import { Stack, init_Stack } from "../../components/Stack/index.js";
|
|
5
|
+
import { hasHelperText, init_hasHelperText } from "../../helpers/hasHelperText.js";
|
|
6
|
+
import { Description, init_Description } from "../../components/Description/index.js";
|
|
7
|
+
import { Label, init_Label } from "../../components/Label/index.js";
|
|
8
|
+
import { createEditorState, docFromHtml, editorDocToHtml, editorSchema, init_editorCore } from "./editorCore.js";
|
|
9
|
+
import { Toolbar, init_Toolbar } from "./Toolbar.js";
|
|
10
|
+
import { docRegionMaxHeightVar, docRegionMinHeightVar, init_styles_css, richTextInputStyle } from "./styles.css.js";
|
|
11
|
+
import { useId, useState } from "react";
|
|
12
|
+
import { theme } from "@ultraviolet/themes";
|
|
13
|
+
import { cn } from "@ultraviolet/utils";
|
|
14
|
+
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { ProseMirror, ProseMirrorDoc } from "@handlewithcare/react-prosemirror";
|
|
17
|
+
import { AlertCircleIcon, CheckCircleIcon } from "@ultraviolet/icons";
|
|
18
|
+
|
|
19
|
+
//#region src/compositions/RichTextInput/index.tsx
|
|
20
|
+
var RICH_TEXT_EDITOR_LINE_HEIGHT_EM, RichTextInput;
|
|
21
|
+
var init_RichTextInput = __esmMin(() => {
|
|
22
|
+
init_Description();
|
|
23
|
+
init_Label();
|
|
24
|
+
init_Stack();
|
|
25
|
+
init_hasHelperText();
|
|
26
|
+
init_editorCore();
|
|
27
|
+
init_Toolbar();
|
|
28
|
+
init_styles_css();
|
|
29
|
+
init_objectSpread2();
|
|
30
|
+
RICH_TEXT_EDITOR_LINE_HEIGHT_EM = 1.5;
|
|
31
|
+
RichTextInput = ({ value = "", onChange, onBlur, onFocus, disabled = false, readOnly = false, error, helper, success, className, style, size = "large", label, labelDescription, rows = 5, maxRows = 10, id, "data-testid": dataTestId, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, showMarks = true, showList = true, required = false }) => {
|
|
32
|
+
const localId = useId();
|
|
33
|
+
const inputId = id !== null && id !== void 0 ? id : `rich-text-input-${localId}`;
|
|
34
|
+
const descriptionId = `${inputId}-description`;
|
|
35
|
+
const labelId = `${inputId}-label`;
|
|
36
|
+
const isEditable = !disabled && !readOnly;
|
|
37
|
+
const lineHeightEm = RICH_TEXT_EDITOR_LINE_HEIGHT_EM;
|
|
38
|
+
const padding = theme.space[1];
|
|
39
|
+
const minHeight = `calc(${lineHeightEm}em * ${rows} + 2 * ${padding})`;
|
|
40
|
+
const maxHeight = typeof maxRows === "number" ? `calc(${lineHeightEm}em * ${maxRows} + 2 * ${padding})` : "none";
|
|
41
|
+
const [editorState, setEditorState] = useState(() => createEditorState(docFromHtml(value, editorSchema)));
|
|
42
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
43
|
+
gap: "0.5",
|
|
44
|
+
children: [
|
|
45
|
+
label ? /* @__PURE__ */ jsx(Label, {
|
|
46
|
+
htmlFor: inputId,
|
|
47
|
+
id: labelId,
|
|
48
|
+
required,
|
|
49
|
+
labelDescription,
|
|
50
|
+
children: label
|
|
51
|
+
}) : null,
|
|
52
|
+
/* @__PURE__ */ jsx(Stack, {
|
|
53
|
+
className: cn(richTextInputStyle.editorSurface({
|
|
54
|
+
disabled,
|
|
55
|
+
readonly: readOnly,
|
|
56
|
+
error: !!error && !disabled,
|
|
57
|
+
success: !!success && !error && !disabled
|
|
58
|
+
}), className),
|
|
59
|
+
style,
|
|
60
|
+
children: /* @__PURE__ */ jsxs(ProseMirror, {
|
|
61
|
+
dispatchTransaction: (transaction) => {
|
|
62
|
+
if (!isEditable) return;
|
|
63
|
+
setEditorState((prev) => {
|
|
64
|
+
const next = prev.apply(transaction);
|
|
65
|
+
if (!prev.doc.eq(next.doc)) {
|
|
66
|
+
const isEmpty = next.doc.textContent.trim() === "";
|
|
67
|
+
onChange === null || onChange === void 0 || onChange(isEmpty ? "" : editorDocToHtml(next.doc, editorSchema));
|
|
68
|
+
}
|
|
69
|
+
return next;
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
state: editorState,
|
|
73
|
+
static: !isEditable,
|
|
74
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
75
|
+
className: richTextInputStyle.toolbarRow,
|
|
76
|
+
children: /* @__PURE__ */ jsx(Toolbar, {
|
|
77
|
+
showList,
|
|
78
|
+
showMarks,
|
|
79
|
+
disabled: disabled || readOnly,
|
|
80
|
+
size
|
|
81
|
+
})
|
|
82
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
83
|
+
className: richTextInputStyle.wrapper,
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ jsx(ProseMirrorDoc, {
|
|
86
|
+
"aria-labelledby": labelId,
|
|
87
|
+
"aria-describedby": ariaDescribedBy || (hasHelperText(helper, error, success) ? descriptionId : void 0),
|
|
88
|
+
"aria-invalid": error ? "true" : void 0,
|
|
89
|
+
"aria-disabled": disabled ? "true" : void 0,
|
|
90
|
+
"aria-readonly": readOnly ? "true" : void 0,
|
|
91
|
+
"aria-label": ariaLabel,
|
|
92
|
+
className: richTextInputStyle.docRegion,
|
|
93
|
+
"data-testid": dataTestId,
|
|
94
|
+
id: inputId,
|
|
95
|
+
role: "textbox",
|
|
96
|
+
style: _objectSpread2({}, assignInlineVars({
|
|
97
|
+
[docRegionMaxHeightVar]: maxHeight !== null && maxHeight !== void 0 ? maxHeight : "none",
|
|
98
|
+
[docRegionMinHeightVar]: minHeight
|
|
99
|
+
})),
|
|
100
|
+
onBlur,
|
|
101
|
+
onFocus
|
|
102
|
+
}),
|
|
103
|
+
error ? /* @__PURE__ */ jsx(AlertCircleIcon, {
|
|
104
|
+
className: richTextInputStyle.statusIcon,
|
|
105
|
+
sentiment: "danger"
|
|
106
|
+
}) : null,
|
|
107
|
+
success ? /* @__PURE__ */ jsx(CheckCircleIcon, {
|
|
108
|
+
className: richTextInputStyle.statusIcon,
|
|
109
|
+
sentiment: "success"
|
|
110
|
+
}) : null
|
|
111
|
+
]
|
|
112
|
+
})]
|
|
113
|
+
})
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ jsx(Description, {
|
|
116
|
+
id: descriptionId,
|
|
117
|
+
error,
|
|
118
|
+
success,
|
|
119
|
+
disabled,
|
|
120
|
+
helper
|
|
121
|
+
})
|
|
122
|
+
]
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
//#endregion
|
|
128
|
+
init_RichTextInput();
|
|
129
|
+
export { RichTextInput, init_RichTextInput };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export declare const docRegionMaxHeightVar: `var(--${string})`;
|
|
2
|
+
export declare const docRegionMinHeightVar: `var(--${string})`;
|
|
3
|
+
export declare const wrapper: string;
|
|
4
|
+
export declare const statusIcon: string;
|
|
5
|
+
export declare const toolbarRow: string;
|
|
6
|
+
export declare const docRegion: string;
|
|
7
|
+
export declare const editorSurface: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
8
|
+
disabled: {
|
|
9
|
+
true: {
|
|
10
|
+
background: `var(--${string})`;
|
|
11
|
+
borderColor: `var(--${string})`;
|
|
12
|
+
color: `var(--${string})`;
|
|
13
|
+
};
|
|
14
|
+
false: {};
|
|
15
|
+
};
|
|
16
|
+
readonly: {
|
|
17
|
+
true: {
|
|
18
|
+
vars: {
|
|
19
|
+
[x: string]: `var(--${string})`;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
false: {};
|
|
23
|
+
};
|
|
24
|
+
error: {
|
|
25
|
+
true: {
|
|
26
|
+
borderColor: `var(--${string})`;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
success: {
|
|
30
|
+
true: {
|
|
31
|
+
borderColor: `var(--${string})`;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
export declare const richTextInputStyle: {
|
|
36
|
+
docRegion: string;
|
|
37
|
+
editorSurface: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
38
|
+
disabled: {
|
|
39
|
+
true: {
|
|
40
|
+
background: `var(--${string})`;
|
|
41
|
+
borderColor: `var(--${string})`;
|
|
42
|
+
color: `var(--${string})`;
|
|
43
|
+
};
|
|
44
|
+
false: {};
|
|
45
|
+
};
|
|
46
|
+
readonly: {
|
|
47
|
+
true: {
|
|
48
|
+
vars: {
|
|
49
|
+
[x: string]: `var(--${string})`;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
false: {};
|
|
53
|
+
};
|
|
54
|
+
error: {
|
|
55
|
+
true: {
|
|
56
|
+
borderColor: `var(--${string})`;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
success: {
|
|
60
|
+
true: {
|
|
61
|
+
borderColor: `var(--${string})`;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
}>;
|
|
65
|
+
statusIcon: string;
|
|
66
|
+
wrapper: string;
|
|
67
|
+
toolbarRow: string;
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=styles.css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/compositions/RichTextInput/styles.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB,oBAAc,CAAA;AAChD,eAAO,MAAM,qBAAqB,oBAAc,CAAA;AAGhD,eAAO,MAAM,OAAO,QAGlB,CAAA;AAEF,eAAO,MAAM,UAAU,QAIrB,CAAA;AAEF,eAAO,MAAM,UAAU,QAIrB,CAAA;AAEF,eAAO,MAAM,SAAS,QAepB,CAAA;AAEF,eAAO,MAAM,aAAa;;QAepB,IAAI;YACF,UAAU;YACV,WAAW;YACX,KAAK;;QAEP,KAAK;;;;;;;;;;;QAWL,IAAI;YACF,WAAW;;;;QAIb,IAAI;YACF,WAAW;;;EAwBjB,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;YAhDzB,IAAI;gBACF,UAAU;gBACV,WAAW;gBACX,KAAK;;YAEP,KAAK;;;;;;;;;;;YAWL,IAAI;gBACF,WAAW;;;;YAIb,IAAI;gBACF,WAAW;;;;;;;CAgClB,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { init_styles_css_ts_vanilla } from "./styles.css.ts.vanilla.js";
|
|
3
|
+
import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
4
|
+
|
|
5
|
+
//#region src/compositions/RichTextInput/styles.css.ts
|
|
6
|
+
var docRegionMaxHeightVar, docRegionMinHeightVar, editorSurface, richTextInputStyle;
|
|
7
|
+
var init_styles_css = __esmMin(() => {
|
|
8
|
+
init_styles_css_ts_vanilla();
|
|
9
|
+
docRegionMaxHeightVar = "var(--uv_nb9uyi0)";
|
|
10
|
+
docRegionMinHeightVar = "var(--uv_nb9uyi1)";
|
|
11
|
+
editorSurface = createRuntimeFn({
|
|
12
|
+
defaultClassName: "uv_nb9uyi7",
|
|
13
|
+
variantClassNames: {
|
|
14
|
+
disabled: {
|
|
15
|
+
true: "uv_nb9uyi8",
|
|
16
|
+
false: "uv_nb9uyi9"
|
|
17
|
+
},
|
|
18
|
+
readonly: {
|
|
19
|
+
true: "uv_nb9uyia",
|
|
20
|
+
false: "uv_nb9uyib"
|
|
21
|
+
},
|
|
22
|
+
error: { true: "uv_nb9uyic" },
|
|
23
|
+
success: { true: "uv_nb9uyid" }
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
error: false,
|
|
27
|
+
success: false
|
|
28
|
+
},
|
|
29
|
+
compoundVariants: [[{
|
|
30
|
+
disabled: false,
|
|
31
|
+
readonly: false
|
|
32
|
+
}, "uv_nb9uyie"]]
|
|
33
|
+
});
|
|
34
|
+
richTextInputStyle = {
|
|
35
|
+
docRegion: "uv_nb9uyi6",
|
|
36
|
+
editorSurface: createRuntimeFn({
|
|
37
|
+
defaultClassName: "uv_nb9uyi7",
|
|
38
|
+
variantClassNames: {
|
|
39
|
+
disabled: {
|
|
40
|
+
true: "uv_nb9uyi8",
|
|
41
|
+
false: "uv_nb9uyi9"
|
|
42
|
+
},
|
|
43
|
+
readonly: {
|
|
44
|
+
true: "uv_nb9uyia",
|
|
45
|
+
false: "uv_nb9uyib"
|
|
46
|
+
},
|
|
47
|
+
error: { true: "uv_nb9uyic" },
|
|
48
|
+
success: { true: "uv_nb9uyid" }
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
error: false,
|
|
52
|
+
success: false
|
|
53
|
+
},
|
|
54
|
+
compoundVariants: [[{
|
|
55
|
+
disabled: false,
|
|
56
|
+
readonly: false
|
|
57
|
+
}, "uv_nb9uyie"]]
|
|
58
|
+
}),
|
|
59
|
+
statusIcon: "uv_nb9uyi4",
|
|
60
|
+
wrapper: "uv_nb9uyi3",
|
|
61
|
+
toolbarRow: "uv_nb9uyi5"
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
//#endregion
|
|
66
|
+
init_styles_css();
|
|
67
|
+
export { docRegionMaxHeightVar, docRegionMinHeightVar, init_styles_css, richTextInputStyle };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region src/compositions/RichTextInput/styles.css.ts.vanilla.css
|
|
4
|
+
var init_styles_css_ts_vanilla = __esmMin(() => {});
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
init_styles_css_ts_vanilla();
|
|
8
|
+
export { init_styles_css_ts_vanilla };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_themes_css_js_vanilla } from "../../themes/dist/vanilla/themes.css.js.vanilla.js";
|
|
3
2
|
import { init_styles_css_ts_vanilla } from "./styles.css.ts.vanilla.js";
|
|
4
3
|
|
|
5
4
|
//#region src/compositions/SteppedListCard/styles.css.ts
|
|
6
5
|
var steppedListCardStyle;
|
|
7
6
|
var init_styles_css = __esmMin(() => {
|
|
8
|
-
init_themes_css_js_vanilla();
|
|
9
7
|
init_styles_css_ts_vanilla();
|
|
10
8
|
steppedListCardStyle = {
|
|
11
9
|
steppedListCard: "uv_1q0npw30",
|
|
@@ -9,6 +9,7 @@ export { InfoTable } from './InfoTable';
|
|
|
9
9
|
export { Navigation, NavigationProvider, useNavigation } from './Navigation';
|
|
10
10
|
export { OfferList } from './OfferList';
|
|
11
11
|
export { OptionSelector } from './OptionSelector';
|
|
12
|
+
export { RichTextInput } from './RichTextInput';
|
|
12
13
|
export { OrderSummary } from './OrderSummary';
|
|
13
14
|
export { Plans } from './Plans';
|
|
14
15
|
export { SteppedListCard } from './SteppedListCard';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compositions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compositions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA"}
|
|
@@ -12,6 +12,7 @@ import { FAQ, init_FAQ } from "./FAQ/index.js";
|
|
|
12
12
|
import { InfoTable, init_InfoTable } from "./InfoTable/index.js";
|
|
13
13
|
import { OfferList, init_OfferList } from "./OfferList/index.js";
|
|
14
14
|
import { OptionSelector, init_OptionSelector } from "./OptionSelector/index.js";
|
|
15
|
+
import { RichTextInput, init_RichTextInput } from "./RichTextInput/index.js";
|
|
15
16
|
import { OrderSummary, init_OrderSummary } from "./OrderSummary/index.js";
|
|
16
17
|
import { Plans, init_Plans } from "./Plans/index.js";
|
|
17
18
|
import { SteppedListCard, init_SteppedListCard } from "./SteppedListCard/index.js";
|
|
@@ -29,6 +30,7 @@ var init_compositions = __esmMin(() => {
|
|
|
29
30
|
init_Navigation();
|
|
30
31
|
init_OfferList();
|
|
31
32
|
init_OptionSelector();
|
|
33
|
+
init_RichTextInput();
|
|
32
34
|
init_OrderSummary();
|
|
33
35
|
init_Plans();
|
|
34
36
|
init_SteppedListCard();
|
package/dist/index.js
CHANGED
|
@@ -96,6 +96,7 @@ import { GlobalAlert } from "./components/GlobalAlert/index.js";
|
|
|
96
96
|
import { InfiniteScroll } from "./components/InfiniteScroll/index.js";
|
|
97
97
|
import { lineChartStyle } from "./components/LineChart/styles.css.js";
|
|
98
98
|
import { LineChart } from "./components/LineChart/index.js";
|
|
99
|
+
import { PhoneInput } from "./components/PhoneInput/PhoneInput.js";
|
|
99
100
|
import { meterStyle } from "./components/Meter/styles.css.js";
|
|
100
101
|
import { Meter } from "./components/Meter/index.js";
|
|
101
102
|
import { noticeStyle } from "./components/Notice/styles.css.js";
|
|
@@ -147,6 +148,7 @@ import { TimeInput } from "./components/TimeInput/index.js";
|
|
|
147
148
|
import { toasterStyle } from "./components/Toaster/styles.css.js";
|
|
148
149
|
import { toast } from "./components/Toaster/Toaster.js";
|
|
149
150
|
import { ToastContainer } from "./components/Toaster/ToasterContainer.js";
|
|
151
|
+
import { Toast } from "./components/Toaster/index.js";
|
|
150
152
|
import { toggleGroupStyle } from "./components/ToggleGroup/styles.css.js";
|
|
151
153
|
import { ToggleGroup } from "./components/ToggleGroup/index.js";
|
|
152
154
|
import { treeMapChartStyle } from "./components/TreeMapChart/styles.css.js";
|
|
@@ -174,4 +176,4 @@ var init_src = __esmMin(() => {
|
|
|
174
176
|
|
|
175
177
|
//#endregion
|
|
176
178
|
init_src();
|
|
177
|
-
export { ActionBar, Alert, Avatar, Badge, Banner, BarChart, BarStack, Breadcrumbs, Bullet, Button, Card, Carousel, Checkbox, CheckboxGroup, CheckboxGroupCheckbox, Chip, CopyButton, DateInput, Dialog, Drawer, EmptyState, Expandable, ExpandableCard, FileInput, GlobalAlert, InfiniteScroll, Key, Label, LineChart, Link, List, Loader, Menu, Meter, Modal, Notice, NotificationContainer, NumberInput, Pagination, PasswordCheck, PieChart, Popover, Popup, ProgressBar, Radio, RadioGroup, Row, SearchInput, SelectInput, SelectableCard, SelectableCardGroup, SelectableCardOptionGroup, Separator, Skeleton, Slider, Snippet, Stack, Status, StepList, Stepper, SwitchButton, Table, Tabs, Tag, TagInput, TagList, Text, TextArea, TextInput, ThemeProvider, TimeInput, ToastContainer, Toggle, ToggleGroup, Tooltip, TreeMapChart, UnitInput, VerificationCode, actionBarStyle, alertStyle, avatarStyle, badgeStyle, bannerStyle, barChartStyle, barStackStyle, bounce, bounce$1 as bounceDefault, breadcrumbsStyle, bulletStyle, buttonStyle, cardStyle, carouselStyle, checkboxGroupStyle, checkboxStyle, chipStyle, consoleDarkTheme as darkTheme, dateInputStyle, dialogStyle, down, drawerStyle, emptyStateStyle, expandableCardStyle, expandableStyle, extendTheme, fadeIn, fadeIn$1 as fadeInDefault, fadeOut, fadeOut$1 as fadeOutDefault, fileInputStyle, flash, flash$1 as flashDefault, getUUID, globalAlertStyle, keyStyle, labelStyle, lineChartStyle, linkStyle, listStyle, loaderStyle, menuStyle, meterStyle, modalStyle, normalize, noticeStyle, notification, notificationStyle, numberInputStyle, paginationStyle, passwordCheckStyle, pieChartStyle, ping, ping$1 as pingDefault, popoverStyle, popupStyle, progressBarStyle, pulse, pulse$1 as pulseDefault, quickScaleDown, quickScaleDown$1 as quickScaleDownDefault, radioGRoupStyle, radioStyle, rowStyle, scaleBack, scaleBack$1 as scaleBackDefault, scaleDown, scaleDown$1 as scaleDownDefault, scaleForward, scaleForward$1 as scaleForwardDefault, scaleUp, scaleUp$1 as scaleUpDefault, searchInputStyle, selectInputStyle, selectableCardGroupStyle, selectableCardOptionGroupStyle, selectableCardStyle, separatorStyle, skeletonStyle, sketchIn, sketchIn$1 as sketchInDefault, sketchOut, sketchOut$1 as sketchOutDefault, slideDownLarge, slideDownLarge$1 as slideDownLargeDefault, slideFromBottom, slideFromBottom$1 as slideFromBottomDefault, slideFromLeft, slideFromLeft$1 as slideFromLeftDefault, slideFromRight, slideFromRight$1 as slideFromRightDefault, slideFromTop, slideFromTop$1 as slideFromTopDefault, slideToBottom, slideToBottom$1 as slideToBottomDefault, slideToLeft, slideToLeft$1 as slideToLeftDefault, slideToRight, slideToRight$1 as slideToRightDefault, slideToTop, slideToTop$1 as slideToTopDefault, slideUpLarge, slideUpLarge$1 as slideUpLargeDefault, sliderStyle, snippetStyle, stackStyle, statusStyle, stepListStyle, stepperStyle, switchButtonStyle, tableStyle, tabsStyle, tagInputStyle, tagListStyle, tagStyle, textAreaStyle, textInputStyle, textStyle, theme_default as theme, timeInputStyle, toast, toasterStyle, toggleGroupStyle, toggleStyle, tooltipStyle, treeMapChartStyle, unfoldIn, unfoldIn$1 as unfoldInDefault, unfoldOut, unfoldOut$1 as unfoldOutDefault, unitInputStyle, up, useTheme, verificationCodeStyle, zoomIn, zoomIn$1 as zoomInDefault, zoomOut, zoomOut$1 as zoomOutDefault };
|
|
179
|
+
export { ActionBar, Alert, Avatar, Badge, Banner, BarChart, BarStack, Breadcrumbs, Bullet, Button, Card, Carousel, Checkbox, CheckboxGroup, CheckboxGroupCheckbox, Chip, CopyButton, DateInput, Dialog, Drawer, EmptyState, Expandable, ExpandableCard, FileInput, GlobalAlert, InfiniteScroll, Key, Label, LineChart, Link, List, Loader, Menu, Meter, Modal, Notice, NotificationContainer, NumberInput, Pagination, PasswordCheck, PhoneInput, PieChart, Popover, Popup, ProgressBar, Radio, RadioGroup, Row, SearchInput, SelectInput, SelectableCard, SelectableCardGroup, SelectableCardOptionGroup, Separator, Skeleton, Slider, Snippet, Stack, Status, StepList, Stepper, SwitchButton, Table, Tabs, Tag, TagInput, TagList, Text, TextArea, TextInput, ThemeProvider, TimeInput, Toast, ToastContainer, Toggle, ToggleGroup, Tooltip, TreeMapChart, UnitInput, VerificationCode, actionBarStyle, alertStyle, avatarStyle, badgeStyle, bannerStyle, barChartStyle, barStackStyle, bounce, bounce$1 as bounceDefault, breadcrumbsStyle, bulletStyle, buttonStyle, cardStyle, carouselStyle, checkboxGroupStyle, checkboxStyle, chipStyle, consoleDarkTheme as darkTheme, dateInputStyle, dialogStyle, down, drawerStyle, emptyStateStyle, expandableCardStyle, expandableStyle, extendTheme, fadeIn, fadeIn$1 as fadeInDefault, fadeOut, fadeOut$1 as fadeOutDefault, fileInputStyle, flash, flash$1 as flashDefault, getUUID, globalAlertStyle, keyStyle, labelStyle, lineChartStyle, linkStyle, listStyle, loaderStyle, menuStyle, meterStyle, modalStyle, normalize, noticeStyle, notification, notificationStyle, numberInputStyle, paginationStyle, passwordCheckStyle, pieChartStyle, ping, ping$1 as pingDefault, popoverStyle, popupStyle, progressBarStyle, pulse, pulse$1 as pulseDefault, quickScaleDown, quickScaleDown$1 as quickScaleDownDefault, radioGRoupStyle, radioStyle, rowStyle, scaleBack, scaleBack$1 as scaleBackDefault, scaleDown, scaleDown$1 as scaleDownDefault, scaleForward, scaleForward$1 as scaleForwardDefault, scaleUp, scaleUp$1 as scaleUpDefault, searchInputStyle, selectInputStyle, selectableCardGroupStyle, selectableCardOptionGroupStyle, selectableCardStyle, separatorStyle, skeletonStyle, sketchIn, sketchIn$1 as sketchInDefault, sketchOut, sketchOut$1 as sketchOutDefault, slideDownLarge, slideDownLarge$1 as slideDownLargeDefault, slideFromBottom, slideFromBottom$1 as slideFromBottomDefault, slideFromLeft, slideFromLeft$1 as slideFromLeftDefault, slideFromRight, slideFromRight$1 as slideFromRightDefault, slideFromTop, slideFromTop$1 as slideFromTopDefault, slideToBottom, slideToBottom$1 as slideToBottomDefault, slideToLeft, slideToLeft$1 as slideToLeftDefault, slideToRight, slideToRight$1 as slideToRightDefault, slideToTop, slideToTop$1 as slideToTopDefault, slideUpLarge, slideUpLarge$1 as slideUpLargeDefault, sliderStyle, snippetStyle, stackStyle, statusStyle, stepListStyle, stepperStyle, switchButtonStyle, tableStyle, tabsStyle, tagInputStyle, tagListStyle, tagStyle, textAreaStyle, textInputStyle, textStyle, theme_default as theme, timeInputStyle, toast, toasterStyle, toggleGroupStyle, toggleStyle, tooltipStyle, treeMapChartStyle, unfoldIn, unfoldIn$1 as unfoldInDefault, unfoldOut, unfoldOut$1 as unfoldOutDefault, unitInputStyle, up, useTheme, verificationCodeStyle, zoomIn, zoomIn$1 as zoomInDefault, zoomOut, zoomOut$1 as zoomOutDefault };
|