@onereach/ui-components 2.68.0-beta.2008.0 → 2.68.0-beta.2016.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.
Files changed (81) hide show
  1. package/dist/bundled/v2/{OrCode-b9332066.js → OrCode-edc7a1f5.js} +115 -2
  2. package/dist/bundled/v2/{OrConfirm-19758dae.js → OrConfirm-56d01cff.js} +1 -1
  3. package/dist/bundled/{v3/useFocusTrap-d21726e3.js → v2/OrModal-a5411b0d.js} +200 -3
  4. package/dist/bundled/v2/components/index.d.ts +0 -1
  5. package/dist/bundled/v2/components/index.js +3 -7
  6. package/dist/bundled/v2/components/or-code/index.js +2 -4
  7. package/dist/bundled/v2/components/or-confirm/index.js +2 -3
  8. package/dist/bundled/v2/components/or-input-box-v3/OrInputBox.vue.d.ts +1 -1
  9. package/dist/bundled/v2/components/or-modal/index.js +1 -2
  10. package/dist/bundled/v2/index.js +4 -8
  11. package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-5fe573eb.js → OrCode.vue_vue_type_script_lang-ef5e7f04.js} +116 -3
  12. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-4451e782.js → OrConfirm.vue_vue_type_script_lang-0f16fc67.js} +2 -2
  13. package/dist/bundled/v3/{OrModal-bbabef06.js → OrModal-868160ef.js} +1 -1
  14. package/dist/bundled/{v2/useFocusTrap-d744652a.js → v3/OrModal.vue_vue_type_script_lang-a1ed2ebb.js} +126 -4
  15. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-2fdbd2f2.js → OrTabs.vue_vue_type_script_lang-ca57f9d9.js} +36 -10
  16. package/dist/bundled/v3/components/index.d.ts +0 -1
  17. package/dist/bundled/v3/components/index.js +5 -10
  18. package/dist/bundled/v3/components/or-code/index.js +3 -5
  19. package/dist/bundled/v3/components/or-confirm/index.js +3 -4
  20. package/dist/bundled/v3/components/or-input-box-v3/OrInputBox.vue.d.ts +1 -1
  21. package/dist/bundled/v3/components/or-modal/index.js +1 -2
  22. package/dist/bundled/v3/components/or-tabs-v3/index.js +1 -2
  23. package/dist/bundled/v3/index.js +182 -278
  24. package/dist/esm/v2/components/index.d.ts +0 -1
  25. package/dist/esm/v2/components/index.js +0 -19
  26. package/dist/esm/v2/components/or-input-box-v3/OrInputBox.vue.d.ts +1 -1
  27. package/dist/esm/v2/index.js +0 -19
  28. package/dist/esm/v3/OrInput-4f55c0eb.js +1 -1
  29. package/dist/esm/v3/{OrInputBox-634230b1.js → OrInputBox-542d2f2c.js} +1 -1
  30. package/dist/esm/v3/OrSearch-d74891a5.js +1 -1
  31. package/dist/esm/v3/OrSelect-b3a233cc.js +1 -1
  32. package/dist/esm/v3/OrTextarea-98895b2a.js +1 -1
  33. package/dist/esm/v3/components/index.d.ts +0 -1
  34. package/dist/esm/v3/components/index.js +1 -20
  35. package/dist/esm/v3/components/or-card-collection-v3/index.js +1 -1
  36. package/dist/esm/v3/components/or-confirm-v3/index.js +1 -1
  37. package/dist/esm/v3/components/or-input-box-v3/OrInputBox.vue.d.ts +1 -1
  38. package/dist/esm/v3/components/or-input-box-v3/index.js +2 -2
  39. package/dist/esm/v3/components/or-input-v3/index.js +1 -1
  40. package/dist/esm/v3/components/or-search-v3/index.js +1 -1
  41. package/dist/esm/v3/components/or-select-v3/index.js +1 -1
  42. package/dist/esm/v3/components/or-textarea-v3/index.js +1 -1
  43. package/dist/esm/v3/index.js +1 -20
  44. package/package.json +10 -20
  45. package/src/components/index.ts +0 -1
  46. package/src/components/or-input-box-v3/OrInputBox.vue +1 -1
  47. package/src/utils/functions/text.ts +2 -2
  48. package/dist/bundled/v2/OrModal-71d33219.js +0 -202
  49. package/dist/bundled/v2/OrRichTextEditor-4a41e294.js +0 -36832
  50. package/dist/bundled/v2/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.d.ts +0 -12
  51. package/dist/bundled/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -149
  52. package/dist/bundled/v2/components/or-rich-text-editor-v3/index.d.ts +0 -1
  53. package/dist/bundled/v2/components/or-rich-text-editor-v3/index.js +0 -25
  54. package/dist/bundled/v2/components/or-rich-text-editor-v3/styles.d.ts +0 -6
  55. package/dist/bundled/v2/index.es-3f39f316.js +0 -115
  56. package/dist/bundled/v3/OrMenu-08aa60de.js +0 -29
  57. package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-a599dfe7.js +0 -128
  58. package/dist/bundled/v3/OrRichTextEditor.vue_vue_type_script_lang-f5d3e39b.js +0 -36712
  59. package/dist/bundled/v3/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.d.ts +0 -12
  60. package/dist/bundled/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -149
  61. package/dist/bundled/v3/components/or-rich-text-editor-v3/index.d.ts +0 -1
  62. package/dist/bundled/v3/components/or-rich-text-editor-v3/index.js +0 -26
  63. package/dist/bundled/v3/components/or-rich-text-editor-v3/styles.d.ts +0 -6
  64. package/dist/bundled/v3/index.es-3f39f316.js +0 -115
  65. package/dist/esm/v2/OrRichTextEditor-11967cd9.js +0 -520
  66. package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.d.ts +0 -12
  67. package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -149
  68. package/dist/esm/v2/components/or-rich-text-editor-v3/index.d.ts +0 -1
  69. package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +0 -39
  70. package/dist/esm/v2/components/or-rich-text-editor-v3/styles.d.ts +0 -6
  71. package/dist/esm/v3/OrRichTextEditor-ad5f24ba.js +0 -490
  72. package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.d.ts +0 -12
  73. package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -149
  74. package/dist/esm/v3/components/or-rich-text-editor-v3/index.d.ts +0 -1
  75. package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +0 -38
  76. package/dist/esm/v3/components/or-rich-text-editor-v3/styles.d.ts +0 -6
  77. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.docs.mdx +0 -16
  78. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.ts +0 -62
  79. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +0 -526
  80. package/src/components/or-rich-text-editor-v3/index.ts +0 -1
  81. package/src/components/or-rich-text-editor-v3/styles.ts +0 -65
@@ -1,526 +0,0 @@
1
- <template>
2
- <div
3
- ref="root"
4
- v-bind="$attrs"
5
- :class="rootStyles"
6
- >
7
- <or-label>
8
- {{ description }}
9
- </or-label>
10
- <div
11
- ref="containerRef"
12
- :class="containerStyles"
13
- @click="handleEditorClick()"
14
- >
15
- <div :class="toolbarContainerStyles">
16
- <div
17
- v-for="tool in toolbar"
18
- :key="tool"
19
- :class="toolbarStyles"
20
- >
21
- <div
22
- v-for="item in tool"
23
- :key="item"
24
- :class="toolbarButtonStyles(item)"
25
- class="-my-xs"
26
- >
27
- <or-icon-button
28
- v-if="item==='heading'"
29
- ref="toolbarButtonRef"
30
- :tooltip="{text: item, placement: 'top'}"
31
- :icon="{icon: headingIcon, variant: 'inherit', size: 'm'}"
32
- @click="menuRef.open()"
33
- />
34
- <or-icon-button
35
- v-else
36
- :tooltip="{text: iconTooltipsEnum[item], placement: 'top'}"
37
- :icon="{icon: iconsEnum[item], variant: 'inherit', size: 'm'}"
38
- @click="handleToolbarClick(item)"
39
- />
40
- </div>
41
- </div>
42
- </div>
43
- <div
44
- ref="editorRef"
45
- :class="editorInputStyles"
46
- />
47
- </div>
48
- <or-menu
49
- v-if="toolbarButtonRef"
50
- ref="menuRef"
51
- :trigger="toolbarButtonRef[getIndexOfHeading].root"
52
- placement="bottom-start"
53
- >
54
- <or-menu-item
55
- v-for="heading in headingLevels"
56
- :key="heading"
57
- @click="handleToolbarClick('heading', heading)"
58
- >
59
- Heading {{ heading }}
60
- </or-menu-item>
61
- <or-menu-item
62
- @click="handleToolbarClick('heading')"
63
- >
64
- None
65
- </or-menu-item>
66
- </or-menu>
67
- </div>
68
- </template>
69
-
70
- <script lang="ts">
71
- import { defineComponent, ref, onMounted, onBeforeUnmount, computed, watch } from 'vue-demi';
72
- import { useClassAttribute } from '../../hooks';
73
- import { useFocusTrap, UseFocusTrapReturn } from '@vueuse/integrations/useFocusTrap';
74
-
75
- import {
76
- MarkdownSerializer as ProseMirrorMarkdownSerializer,
77
- defaultMarkdownSerializer,
78
- } from 'prosemirror-markdown';
79
- import { DOMParser as ProseMirrorDOMParser, Node, Mark } from 'prosemirror-model';
80
- import { marked } from 'marked';
81
-
82
- import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
83
- import { OrLabelV3 as OrLabel } from '../or-label-v3';
84
- import { OrMenuV3 as OrMenu } from '../or-menu-v3';
85
- import { OrMenuItemV3 as OrMenuItem } from '../or-menu-item-v3';
86
-
87
- import {
88
- EditorContainer,
89
- ToolbarContainer,
90
- Toolbar,
91
- ToolbarButtonActive,
92
- ToolbarButton,
93
- EditorInput,
94
- } from './styles';
95
-
96
- import { Editor, mergeAttributes } from '@tiptap/core';
97
- import StarterKit from '@tiptap/starter-kit';
98
- import Underline from '@tiptap/extension-underline';
99
- import Link from '@tiptap/extension-link';
100
- import Highlight from '@tiptap/extension-highlight';
101
- import Heading, { Level } from '@tiptap/extension-heading';
102
- import Placeholder from '@tiptap/extension-placeholder';
103
- import Paragraph from '@tiptap/extension-paragraph';
104
- import BulletList from '@tiptap/extension-bullet-list';
105
- import ListItem from '@tiptap/extension-list-item';
106
- import OrderedList from '@tiptap/extension-ordered-list';
107
- import Strike from '@tiptap/extension-strike';
108
- import Italic from '@tiptap/extension-italic';
109
- import HardBreak from '@tiptap/extension-hard-break';
110
- import Bold from '@tiptap/extension-bold';
111
-
112
- export default defineComponent({
113
- name: 'OrRichTextEditor',
114
-
115
- components: {
116
- OrIconButton,
117
- OrLabel,
118
- OrMenuItem,
119
- OrMenu,
120
- },
121
-
122
- inheritAttrs: false,
123
-
124
- props: {
125
- modelValue: {
126
- type: String,
127
- default: '',
128
- required: false,
129
- },
130
- toolbar: {
131
- type: Array,
132
- default: () => [['heading'], ['bold', 'italic', 'strike'], ['underline', 'highlight'], ['link'], ['bulletList', 'orderedList'], ['undo', 'redo']],
133
- },
134
- description: {
135
- type: String,
136
- default: '',
137
- },
138
- placeholder: {
139
- type: String,
140
- default: 'Write something...',
141
- },
142
- autofocus: {
143
- type: Boolean,
144
- default: false,
145
- },
146
- markdownFormat: {
147
- type: Boolean,
148
- default: true,
149
- },
150
- },
151
-
152
- emits: ['update:modelValue'],
153
-
154
- setup(props, { emit }) {
155
- // Refs
156
- let editor = null as Editor | null;
157
- const editorRef = ref<HTMLDivElement>();
158
- const containerRef = ref<HTMLDivElement>();
159
- const toolbarButtonRef = ref<InstanceType<typeof OrIconButton>>();
160
- const menuRef = ref<InstanceType<typeof OrMenu>>();
161
- const isActive = ref<{[key: string]: boolean;}>({});
162
- const headingLevels = [1, 2, 3, 4] as Level[];
163
- const previousHeadingLevel = ref<Level>();
164
- const activeHeadingLevel = ref<number>(0);
165
- const markdownOutput = ref<string>('');
166
- let trap: UseFocusTrapReturn = useFocusTrap(editorRef, {
167
- immediate: true,
168
- fallbackFocus: '.container',
169
- allowOutsideClick: true,
170
- });
171
- const iconsEnum = ref<{[key: string]: string;}>({
172
- bold: 'format_bold',
173
- italic: 'format_italic',
174
- underline: 'format_underlined',
175
- strike: 'format_strikethrough',
176
- bulletList: 'format_list_bulleted',
177
- orderedList: 'format_list_numbered',
178
- link: 'link',
179
- highlight: 'highlight',
180
- redo: 'redo',
181
- undo: 'undo',
182
- });
183
- const iconTooltipsEnum = ref<{[key: string]: string;}>({
184
- bold: 'Bold',
185
- italic: 'Italic',
186
- underline: 'Underline',
187
- strike: 'Strike',
188
- bulletList: 'Bulleted List',
189
- orderedList: 'Numbered List',
190
- link: 'Link',
191
- highlight: 'Highlight',
192
- redo: 'Redo',
193
- undo: 'Undo',
194
- });
195
-
196
- const serializerMarks = {
197
- ...defaultMarkdownSerializer.marks,
198
- [Bold.name]: defaultMarkdownSerializer.marks.strong,
199
- [Strike.name]: {
200
- open: '~~',
201
- close: '~~',
202
- mixable: true,
203
- expelEnclosingWhitespace: true,
204
- },
205
- [Italic.name]: {
206
- open: '_',
207
- close: '_',
208
- mixable: true,
209
- expelEnclosingWhitespace: true,
210
- },
211
- [Highlight.name]: {
212
- open: '==',
213
- close: '==',
214
- mixable: true,
215
- expelEnclosingWhitespace: true,
216
- },
217
- [Link.name]: {
218
- open(state: any, mark: Mark, parent: Node, index: number) {
219
- return isPlainURL(mark, parent, index, 1) ? '<' : '[';
220
- },
221
- close(state: any, mark: Mark, parent: Node, index: number) {
222
- const href = mark.attrs.canonicalSrc || mark.attrs.href;
223
-
224
- return isPlainURL(mark, parent, index, -1)
225
- ? '>'
226
- : `](${state.esc(href)}${
227
- mark.attrs.title ? ` ${state.quote(mark.attrs.title)}` : ''
228
- })`;
229
- },
230
- },
231
- };
232
-
233
- const serializerNodes = {
234
- ...defaultMarkdownSerializer.nodes,
235
- [Paragraph.name]: defaultMarkdownSerializer.nodes.paragraph,
236
- [BulletList.name]: defaultMarkdownSerializer.nodes.bullet_list,
237
- [ListItem.name]: defaultMarkdownSerializer.nodes.list_item,
238
- [OrderedList.name]: defaultMarkdownSerializer.nodes.ordered_list,
239
- [HardBreak.name]: defaultMarkdownSerializer.nodes.hard_break,
240
- };
241
-
242
- onMounted(() => {
243
- editor = new Editor({
244
- onUpdate: ({ editor }) => {
245
- setActiveFormats();
246
- const html = editor.getHTML();
247
- const text = editor.getText();
248
- if (props.markdownFormat) {
249
- markdownOutput.value = serialize(editor.schema, editor.getJSON());
250
- emit('update:modelValue', markdownOutput.value);
251
- } else {
252
- emit('update:modelValue', text === '' ? text : html);
253
- }
254
- },
255
- onCreate: ({ editor }) => {
256
- if (props.markdownFormat) {
257
- const deserialized = deserialize(editor.schema, props.modelValue);
258
- editor.commands.setContent(deserialized);
259
- } else {
260
- editor.commands.setContent(props.modelValue);
261
- }
262
- },
263
- element: editorRef.value,
264
- autofocus: props.autofocus,
265
- extensions: [
266
- StarterKit.configure({
267
- heading: false,
268
- }),
269
- Heading.configure({ levels: headingLevels }).extend({
270
- levels: headingLevels,
271
- renderHTML({ node, HTMLAttributes }) {
272
- return [
273
- 'h' + node.attrs.level,
274
- mergeAttributes(HTMLAttributes, {
275
- class: `typography-headline-${node.attrs.level}`,
276
- }),
277
- 0,
278
- ];
279
- },
280
- }),
281
- Underline,
282
- Link.configure({
283
- openOnClick: true,
284
- linkOnPaste: true,
285
- autolink: false,
286
- protocols: ['ftp', 'mailto', 'http', 'https'],
287
- validate: href => /^https?:\/\//.test(href),
288
- HTMLAttributes: {
289
- class: 'text-primary cursor-pointer',
290
- },
291
- }),
292
- Highlight,
293
- Placeholder
294
- .configure({
295
- placeholder: props.placeholder,
296
- emptyEditorClass: 'is-editor-empty text-outline',
297
- }),
298
- ],
299
- editorProps: {
300
- attributes: {
301
- class: 'focus:outline-none',
302
- },
303
- },
304
- });
305
- setActiveFormats();
306
- });
307
-
308
- onBeforeUnmount(() => {
309
- editor?.destroy();
310
- });
311
-
312
- trap.activate();
313
-
314
- // Computed
315
- const getIndexOfHeading = computed(() => {
316
- return props.toolbar.flat().indexOf('heading');
317
- });
318
-
319
- const headingIcon = computed(() => {
320
- if (activeHeadingLevel.value && isActive.value.heading) {
321
- return `format_h${activeHeadingLevel.value}`;
322
- }
323
- return 'format_paragraph';
324
- });
325
-
326
- // Methods
327
- const handleEditorClick = () => {
328
- setActiveFormats();
329
- editor?.commands.focus();
330
- };
331
-
332
- const handleToolbarClick = (item: string, level?: number) => {
333
- if (item === 'bulletList' || item === 'orderedList') {
334
- item === 'bulletList' ? editor?.commands.toggleBulletList() : editor?.commands.toggleOrderedList();
335
- }
336
- else if (item === 'link') {
337
- setLink();
338
- }
339
- else if (item === 'heading') {
340
- if (!level) {
341
- editor?.commands.toggleHeading({ level: previousHeadingLevel.value as Level });
342
- activeHeadingLevel.value = 0;
343
- } else {
344
- activeHeadingLevel.value = level;
345
- previousHeadingLevel.value = level as Level;
346
- editor?.commands.toggleHeading({ level: level as Level });
347
- }
348
- editor?.commands.focus();
349
- }
350
- else if (item === 'undo' || item === 'redo') {
351
- item === 'undo' ? editor?.commands.undo() : editor?.commands.redo();
352
- }
353
- else {
354
- editor?.chain().focus().toggleMark(item).run();
355
- }
356
- };
357
-
358
- const setLink = () => {
359
- const previousUrl = editor?.getAttributes('link').href;
360
- const url = window.prompt('URL', previousUrl);
361
-
362
- // cancelled
363
- if (url === null) {
364
- return;
365
- }
366
-
367
- // empty
368
- if (url === '') {
369
- editor?.chain().focus().extendMarkRange('link').unsetLink().run();
370
- return;
371
- }
372
-
373
- // update link
374
- editor?.chain()
375
- .focus()
376
- .extendMarkRange('link')
377
- .setLink({ href: url })
378
- .run();
379
- };
380
-
381
- const setActiveFormats = () => {
382
- const toolbarList = props.toolbar.flat() as string[];
383
- toolbarList.forEach((item) => {
384
- isActive.value[item] = editor?.isActive(item) || false;
385
- });
386
- };
387
-
388
- // Styles
389
- const classAttribute = useClassAttribute();
390
-
391
- const rootStyles = computed(() => {
392
- return [
393
- 'or-rich-text-editor',
394
- classAttribute.value,
395
- ];
396
- });
397
-
398
- const containerStyles = computed(() => {
399
- return [
400
- ...EditorContainer,
401
- ];
402
- });
403
-
404
- const toolbarContainerStyles = computed(() => {
405
- return [
406
- ...ToolbarContainer,
407
- ];
408
- });
409
-
410
- const toolbarStyles = computed(() => {
411
- return [
412
- ...Toolbar,
413
- ];
414
- });
415
-
416
- const editorInputStyles = computed(() => {
417
- return [
418
- 'tiptap-editor',
419
- ...EditorInput,
420
- ];
421
- });
422
-
423
- const toolbarButtonStyles = (item: string) => {
424
- return [
425
- // Layout
426
- 'flex',
427
- // Spacing
428
- 'gap-md',
429
- ...isActive.value[item] ? ToolbarButtonActive : ToolbarButton,
430
- ];
431
- };
432
-
433
- const isPlainURL = (link: Mark, parent: Node, index: number, side: number) => {
434
- if (link.attrs.title || !/^\w+:/.test(link.attrs.href)) return false;
435
- const content = parent.child(index + (side < 0 ? -1 : 0));
436
- if (
437
- !content.isText ||
438
- content.text !== link.attrs.href ||
439
- content.marks[content.marks.length - 1] !== link
440
- )
441
- return false;
442
- if (index === (side < 0 ? 1 : parent.childCount - 1)) return true;
443
- const next = parent.child(index + (side < 0 ? -2 : 1));
444
- return !link.isInSet(next.marks);
445
- };
446
-
447
- const serialize = (schema: any, content: any) => {
448
- const proseMirrorDocument = schema.nodeFromJSON(content);
449
- const serializer = new ProseMirrorMarkdownSerializer(
450
- serializerNodes,
451
- serializerMarks,
452
- );
453
-
454
- return serializer.serialize(proseMirrorDocument);
455
- };
456
-
457
- const deserialize = (schema: any, content: any) => {
458
- const html = marked.parse(content);
459
-
460
- if (!html) return null;
461
-
462
- const parser = new DOMParser();
463
- const { body } = parser.parseFromString(html, 'text/html');
464
-
465
- // append original source as a comment that nodes can access
466
- body.append(document.createComment(content));
467
-
468
- const state = ProseMirrorDOMParser.fromSchema(schema).parse(body);
469
- return state.toJSON();
470
- };
471
-
472
- //Effects
473
- watch(() => props.modelValue, (value) => {
474
- if (value !== editor?.getHTML() && !props.markdownFormat) {
475
- editor?.commands.setContent(value);
476
- }
477
- if (props.markdownFormat && value !== markdownOutput.value) {
478
- editor?.commands.setContent(markdownOutput.value);
479
- }
480
- });
481
-
482
- return {
483
- editor,
484
- editorRef,
485
- containerRef,
486
- toolbarButtonRef,
487
- menuRef,
488
- iconsEnum,
489
- handleToolbarClick,
490
- handleEditorClick,
491
- isActive,
492
- iconTooltipsEnum,
493
- containerStyles,
494
- toolbarContainerStyles,
495
- toolbarStyles,
496
- rootStyles,
497
- toolbarButtonStyles,
498
- editorInputStyles,
499
- getIndexOfHeading,
500
- headingLevels,
501
- headingIcon,
502
- };
503
- },
504
- });
505
- </script>
506
-
507
- <style lang="scss">
508
- .tiptap-editor {
509
- ol { //see if editor can not inherit it
510
- margin: 0 24px;
511
- list-style: decimal;
512
- }
513
-
514
- ul {
515
- margin: 0 24px;
516
- list-style: initial;
517
- }
518
-
519
- .is-editor-empty::before {
520
- content: attr(data-placeholder);
521
- height: 0;
522
- pointer-events: none;
523
- float: left;
524
- }
525
- }
526
- </style>
@@ -1 +0,0 @@
1
- export { default as OrRichTextEditorV3 } from './OrRichTextEditor.vue';
@@ -1,65 +0,0 @@
1
- export const EditorContainer: string[] = [
2
- // Colors
3
- 'border-outline',
4
- 'dark:border-outline-dark',
5
- 'focus-within:theme-border-1-primary',
6
- 'dark:focus-within:theme-border-1-primary-dark',
7
- 'focus-within:bg-primary-opacity-0-08',
8
- 'dark:focus-within:bg-primary-opacity-0-08-dark',
9
- 'focus-within:theme-outline-primary',
10
- 'dark:focus-within:theme-outline-primary-dark',
11
-
12
- // Sizing
13
- 'border-1',
14
- 'rounded-md',
15
- ];
16
-
17
- export const ToolbarContainer: string[] = [
18
- // Layout
19
- 'flex',
20
- //Spacing
21
- 'py-sm',
22
- //Sizing
23
- 'border-b-1',
24
- //Colors
25
- 'border-b-outline',
26
- 'dark:border-b-outline-dark',
27
- ];
28
-
29
- export const Toolbar: string[] = [
30
- // Layout
31
- 'flex',
32
- // Spacing
33
- 'px-sm',
34
- 'gap-md',
35
- // Sizing
36
- 'border-r-1',
37
- //Colors
38
- 'border-r-disabled',
39
- 'dark:border-r-outline-dark',
40
- // Last child
41
- 'last-of-type:border-none',
42
- ];
43
-
44
- export const ToolbarButton: string[] = [
45
- // Typography
46
- 'text-on-disabled',
47
- 'dark:text-outline-dark',
48
- ];
49
-
50
- export const ToolbarButtonActive: string[] = [
51
- // Typography
52
- 'text-on-background',
53
- 'dark:text-on-background-dark',
54
- ];
55
-
56
- export const EditorInput: string[] = [
57
- // Spacing
58
- 'p-sm',
59
- // Typography
60
- 'typography-body-2-regular',
61
- 'text-on-background',
62
- 'dark:text-on-background-dark',
63
- // Sizing
64
- 'min-h-[88px]',
65
- ];