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