@onereach/ui-components 2.68.0-beta.2062.0 → 2.68.0-beta.2064.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 (23) hide show
  1. package/dist/bundled/v2/{OrRichTextEditor-1b29b6a2.js → OrRichTextEditor-467ac046.js} +12 -4
  2. package/dist/bundled/v2/components/index.js +1 -1
  3. package/dist/bundled/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +11 -0
  4. package/dist/bundled/v2/components/or-rich-text-editor-v3/index.js +1 -1
  5. package/dist/bundled/v2/index.js +2 -2
  6. package/dist/bundled/v3/{OrRichTextEditor.vue_vue_type_script_lang-4a06e9f2.js → OrRichTextEditor.vue_vue_type_script_lang-ee577206.js} +11 -3
  7. package/dist/bundled/v3/components/index.js +1 -1
  8. package/dist/bundled/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +11 -0
  9. package/dist/bundled/v3/components/or-rich-text-editor-v3/index.js +1 -1
  10. package/dist/bundled/v3/index.js +3 -3
  11. package/dist/esm/v2/{OrRichTextEditor-9567f61e.js → OrRichTextEditor-8469dac4.js} +12 -4
  12. package/dist/esm/v2/components/index.js +1 -1
  13. package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +11 -0
  14. package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +1 -1
  15. package/dist/esm/v2/index.js +1 -1
  16. package/dist/esm/v3/{OrRichTextEditor-e84dbfe6.js → OrRichTextEditor-7528eb87.js} +11 -3
  17. package/dist/esm/v3/components/index.js +1 -1
  18. package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +11 -0
  19. package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +1 -1
  20. package/dist/esm/v3/index.js +1 -1
  21. package/package.json +1 -1
  22. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.ts +4 -1
  23. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +12 -0
@@ -79,6 +79,10 @@ var script = defineComponent({
79
79
  OrMenu: __vue_component__$4
80
80
  },
81
81
  inheritAttrs: false,
82
+ model: {
83
+ prop: 'modelValue',
84
+ event: 'update:modelValue'
85
+ },
82
86
  props: {
83
87
  modelValue: {
84
88
  type: String,
@@ -108,6 +112,10 @@ var script = defineComponent({
108
112
  markdownFormat: {
109
113
  type: Boolean,
110
114
  default: true
115
+ },
116
+ fullHeight: {
117
+ type: Boolean,
118
+ default: false
111
119
  }
112
120
  },
113
121
  emits: ['update:modelValue', 'input'],
@@ -338,10 +346,10 @@ var script = defineComponent({
338
346
  // Styles
339
347
  const classAttribute = useClassAttribute();
340
348
  const rootStyles = computed(() => {
341
- return ['or-rich-text-editor', classAttribute.value];
349
+ return ['or-rich-text-editor', classAttribute.value, ...(props.fullHeight ? ['h-full'] : [])];
342
350
  });
343
351
  const containerStyles = computed(() => {
344
- return [...EditorContainer];
352
+ return [...EditorContainer, ...(props.fullHeight ? ['h-full'] : [])];
345
353
  });
346
354
  const toolbarContainerStyles = computed(() => {
347
355
  return [...ToolbarContainer];
@@ -350,7 +358,7 @@ var script = defineComponent({
350
358
  return [...Toolbar];
351
359
  });
352
360
  const editorInputStyles = computed(() => {
353
- return ['tiptap-editor', ...EditorInput];
361
+ return ['tiptap-editor', ...(props.fullHeight ? ['h-full'] : []), ...EditorInput];
354
362
  });
355
363
  const toolbarButtonStyles = item => {
356
364
  return [
@@ -525,7 +533,7 @@ var __vue_staticRenderFns__ = [];
525
533
  /* style */
526
534
  const __vue_inject_styles__ = function (inject) {
527
535
  if (!inject) return;
528
- inject("data-v-7aa450ad_0", {
536
+ inject("data-v-3e00e82b_0", {
529
537
  source: ".tiptap-editor ol{margin:0 24px;list-style:decimal}.tiptap-editor ul{margin:0 24px;list-style:initial}.tiptap-editor pre{background-color:rgba(186,209,236,.3);padding:4px 8px;margin:4px 0;width:100%;border-radius:4px}.tiptap-editor blockquote{margin:8px 24px;padding:0 24px;border-left:4px solid #bad1ec}.tiptap-editor .is-editor-empty::before{content:attr(data-placeholder);height:0;pointer-events:none;float:left}",
530
538
  map: undefined,
531
539
  media: undefined
@@ -95,7 +95,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from '../useToast-0665
95
95
  export { _ as OrTooltip } from '../OrTooltip-614b016d.js';
96
96
  export { _ as OrTooltipContent } from '../OrTooltip.vue_rollup-plugin-vue_script-63559536.js';
97
97
  export { _ as OrTooltipV3 } from '../OrTooltip-3454c2e6.js';
98
- export { _ as OrRichTextEditorV3 } from '../OrRichTextEditor-9567f61e.js';
98
+ export { _ as OrRichTextEditorV3 } from '../OrRichTextEditor-8469dac4.js';
99
99
  import 'vue-demi';
100
100
  import 'lodash';
101
101
  import '../normalize-component-6e8e3d80.js';
@@ -64,6 +64,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
64
64
  type: BooleanConstructor;
65
65
  default: boolean;
66
66
  };
67
+ fullHeight: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
67
71
  }, import("@vue/composition-api").ExtractPropTypes<{
68
72
  modelValue: {
69
73
  type: StringConstructor;
@@ -94,6 +98,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
94
98
  type: BooleanConstructor;
95
99
  default: boolean;
96
100
  };
101
+ fullHeight: {
102
+ type: BooleanConstructor;
103
+ default: boolean;
104
+ };
97
105
  }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
98
106
  modelValue: string;
99
107
  value: string;
@@ -102,6 +110,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
102
110
  placeholder: string;
103
111
  autofocus: boolean;
104
112
  markdownFormat: boolean;
113
+ fullHeight: boolean;
105
114
  } & {} & {
106
115
  [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
107
116
  }, import("@vue/composition-api").ShallowUnwrapRef<{
@@ -146,6 +155,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
146
155
  placeholder: string;
147
156
  autofocus: boolean;
148
157
  markdownFormat: boolean;
158
+ fullHeight: boolean;
149
159
  } & {} & {
150
160
  [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
151
161
  }, {
@@ -156,5 +166,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
156
166
  placeholder: string;
157
167
  autofocus: boolean;
158
168
  markdownFormat: boolean;
169
+ fullHeight: boolean;
159
170
  }, true>);
160
171
  export default _default;
@@ -1,4 +1,4 @@
1
- export { _ as OrRichTextEditorV3 } from '../../OrRichTextEditor-9567f61e.js';
1
+ export { _ as OrRichTextEditorV3 } from '../../OrRichTextEditor-8469dac4.js';
2
2
  import 'vue-demi';
3
3
  import '../../useClassAttribute-47fdb016.js';
4
4
  import '@vueuse/core';
@@ -95,7 +95,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from './useToast-06654
95
95
  export { _ as OrTooltip } from './OrTooltip-614b016d.js';
96
96
  export { _ as OrTooltipContent } from './OrTooltip.vue_rollup-plugin-vue_script-63559536.js';
97
97
  export { _ as OrTooltipV3 } from './OrTooltip-3454c2e6.js';
98
- export { _ as OrRichTextEditorV3 } from './OrRichTextEditor-9567f61e.js';
98
+ export { _ as OrRichTextEditorV3 } from './OrRichTextEditor-8469dac4.js';
99
99
  export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
100
100
  export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
101
101
  export { u as useElevation } from './useElevation-31bfe1f6.js';
@@ -79,6 +79,10 @@ var script = defineComponent({
79
79
  OrMenu: script$4
80
80
  },
81
81
  inheritAttrs: false,
82
+ model: {
83
+ prop: 'modelValue',
84
+ event: 'update:modelValue'
85
+ },
82
86
  props: {
83
87
  modelValue: {
84
88
  type: String,
@@ -108,6 +112,10 @@ var script = defineComponent({
108
112
  markdownFormat: {
109
113
  type: Boolean,
110
114
  default: true
115
+ },
116
+ fullHeight: {
117
+ type: Boolean,
118
+ default: false
111
119
  }
112
120
  },
113
121
  emits: ['update:modelValue', 'input'],
@@ -338,10 +346,10 @@ var script = defineComponent({
338
346
  // Styles
339
347
  const classAttribute = useClassAttribute();
340
348
  const rootStyles = computed(() => {
341
- return ['or-rich-text-editor', classAttribute.value];
349
+ return ['or-rich-text-editor', classAttribute.value, ...(props.fullHeight ? ['h-full'] : [])];
342
350
  });
343
351
  const containerStyles = computed(() => {
344
- return [...EditorContainer];
352
+ return [...EditorContainer, ...(props.fullHeight ? ['h-full'] : [])];
345
353
  });
346
354
  const toolbarContainerStyles = computed(() => {
347
355
  return [...ToolbarContainer];
@@ -350,7 +358,7 @@ var script = defineComponent({
350
358
  return [...Toolbar];
351
359
  });
352
360
  const editorInputStyles = computed(() => {
353
- return ['tiptap-editor', ...EditorInput];
361
+ return ['tiptap-editor', ...(props.fullHeight ? ['h-full'] : []), ...EditorInput];
354
362
  });
355
363
  const toolbarButtonStyles = item => {
356
364
  return [
@@ -89,7 +89,7 @@ export { a as OrToastContainerV3, s as OrToastV3, t as TypesV3 } from '../types-
89
89
  export { p as PropsV3, a as useQueueV3, u as useToastV3 } from '../useToast-0665462d.js';
90
90
  export { s as OrTooltip, a as OrTooltipContent } from '../OrTooltip-78cd7f6b.js';
91
91
  export { s as OrTooltipV3 } from '../OrTooltip-1500a1cd.js';
92
- export { s as OrRichTextEditorV3 } from '../OrRichTextEditor-e84dbfe6.js';
92
+ export { s as OrRichTextEditorV3 } from '../OrRichTextEditor-7528eb87.js';
93
93
  import 'vue-demi';
94
94
  import 'lodash';
95
95
  import 'vue';
@@ -64,6 +64,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
64
64
  type: BooleanConstructor;
65
65
  default: boolean;
66
66
  };
67
+ fullHeight: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
67
71
  }, import("@vue/composition-api").ExtractPropTypes<{
68
72
  modelValue: {
69
73
  type: StringConstructor;
@@ -94,6 +98,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
94
98
  type: BooleanConstructor;
95
99
  default: boolean;
96
100
  };
101
+ fullHeight: {
102
+ type: BooleanConstructor;
103
+ default: boolean;
104
+ };
97
105
  }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
98
106
  modelValue: string;
99
107
  value: string;
@@ -102,6 +110,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
102
110
  placeholder: string;
103
111
  autofocus: boolean;
104
112
  markdownFormat: boolean;
113
+ fullHeight: boolean;
105
114
  } & {} & {
106
115
  [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
107
116
  }, import("@vue/composition-api").ShallowUnwrapRef<{
@@ -146,6 +155,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
146
155
  placeholder: string;
147
156
  autofocus: boolean;
148
157
  markdownFormat: boolean;
158
+ fullHeight: boolean;
149
159
  } & {} & {
150
160
  [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
151
161
  }, {
@@ -156,5 +166,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
156
166
  placeholder: string;
157
167
  autofocus: boolean;
158
168
  markdownFormat: boolean;
169
+ fullHeight: boolean;
159
170
  }, true>);
160
171
  export default _default;
@@ -1,4 +1,4 @@
1
- export { s as OrRichTextEditorV3 } from '../../OrRichTextEditor-e84dbfe6.js';
1
+ export { s as OrRichTextEditorV3 } from '../../OrRichTextEditor-7528eb87.js';
2
2
  import 'vue-demi';
3
3
  import '../../useClassAttribute-47fdb016.js';
4
4
  import '@vueuse/core';
@@ -89,7 +89,7 @@ export { a as OrToastContainerV3, s as OrToastV3, t as TypesV3 } from './types-9
89
89
  export { p as PropsV3, a as useQueueV3, u as useToastV3 } from './useToast-0665462d.js';
90
90
  export { s as OrTooltip, a as OrTooltipContent } from './OrTooltip-78cd7f6b.js';
91
91
  export { s as OrTooltipV3 } from './OrTooltip-1500a1cd.js';
92
- export { s as OrRichTextEditorV3 } from './OrRichTextEditor-e84dbfe6.js';
92
+ export { s as OrRichTextEditorV3 } from './OrRichTextEditor-7528eb87.js';
93
93
  export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
94
94
  export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
95
95
  export { u as useElevation } from './useElevation-31bfe1f6.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "2.68.0-beta.2062.0",
3
+ "version": "2.68.0-beta.2064.0",
4
4
  "description": "Vue components library for v2/3",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/auto/index.js",
@@ -21,6 +21,9 @@ export default {
21
21
  markdown: {
22
22
  control: { type: 'boolean' },
23
23
  },
24
+ fullHeight: {
25
+ control: { type: 'boolean' },
26
+ },
24
27
  },
25
28
 
26
29
  parameters: {
@@ -50,7 +53,7 @@ const Template: StoryFn<typeof OrRichTextEditor> = (args) => ({
50
53
  },
51
54
 
52
55
  template: `
53
- <div class="p-md">
56
+ <div class="p-md h-screen w-full">
54
57
  <OrRichTextEditor
55
58
  v-bind="args"
56
59
  v-model="text"
@@ -124,6 +124,11 @@ export default defineComponent({
124
124
 
125
125
  inheritAttrs: false,
126
126
 
127
+ model: {
128
+ prop: 'modelValue',
129
+ event: 'update:modelValue',
130
+ },
131
+
127
132
  props: {
128
133
  modelValue: {
129
134
  type: String,
@@ -154,6 +159,10 @@ export default defineComponent({
154
159
  type: Boolean,
155
160
  default: true,
156
161
  },
162
+ fullHeight: {
163
+ type: Boolean,
164
+ default: false,
165
+ },
157
166
  },
158
167
 
159
168
  emits: ['update:modelValue', 'input'],
@@ -413,12 +422,14 @@ export default defineComponent({
413
422
  return [
414
423
  'or-rich-text-editor',
415
424
  classAttribute.value,
425
+ ...props.fullHeight ? ['h-full'] : [],
416
426
  ];
417
427
  });
418
428
 
419
429
  const containerStyles = computed(() => {
420
430
  return [
421
431
  ...EditorContainer,
432
+ ...props.fullHeight ? ['h-full'] : [],
422
433
  ];
423
434
  });
424
435
 
@@ -437,6 +448,7 @@ export default defineComponent({
437
448
  const editorInputStyles = computed(() => {
438
449
  return [
439
450
  'tiptap-editor',
451
+ ...props.fullHeight ? ['h-full'] : [],
440
452
  ...EditorInput,
441
453
  ];
442
454
  });