@onereach/ui-components 4.4.0-beta.2680.0 → 4.4.0-beta.2690.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 (47) hide show
  1. package/dist/bundled/v2/components/OrCarousel/OrCarousel.js +6 -3
  2. package/dist/bundled/v2/components/OrCarousel/OrCarousel.vue.d.ts +1 -0
  3. package/dist/bundled/v2/components/OrCarousel/index.js +1 -1
  4. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +54 -20
  5. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +10 -0
  6. package/dist/bundled/v2/components/OrRichTextEditorV3/styles.js +1 -1
  7. package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +2 -1
  8. package/dist/bundled/v2/index.js +1 -1
  9. package/dist/bundled/v3/{OrCarousel.vue_vue_type_script_lang-188ca513.js → OrCarousel.vue_vue_type_script_lang-5222cb8d.js} +4 -0
  10. package/dist/bundled/v3/{OrRichTextEditor.vue_vue_type_script_lang-6d5a6b7e.js → OrRichTextEditor.vue_vue_type_script_lang-6cfb065a.js} +18 -18
  11. package/dist/bundled/v3/components/OrCarousel/OrCarousel.js +3 -3
  12. package/dist/bundled/v3/components/OrCarousel/OrCarousel.vue.d.ts +1 -0
  13. package/dist/bundled/v3/components/OrCarousel/index.js +2 -2
  14. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +27 -18
  15. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +10 -0
  16. package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +1 -1
  17. package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +1 -1
  18. package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +2 -1
  19. package/dist/bundled/v3/components/index.js +2 -2
  20. package/dist/bundled/v3/index.js +3 -3
  21. package/dist/esm/v2/{OrCarousel-5c2b2d10.js → OrCarousel-76dc2b7b.js} +3 -2
  22. package/dist/esm/v2/{OrRichTextEditor-cb50c4f6.js → OrRichTextEditor-10dc8ee2.js} +55 -21
  23. package/dist/esm/v2/{OrSelect-9c8f96b2.js → OrSelect-9d6b3363.js} +2 -1
  24. package/dist/esm/v2/components/index.js +4 -3
  25. package/dist/esm/v2/components/or-carousel/OrCarousel.vue.d.ts +1 -0
  26. package/dist/esm/v2/components/or-carousel/index.js +2 -1
  27. package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +10 -0
  28. package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +1 -1
  29. package/dist/esm/v2/components/or-select-v3/index.js +1 -1
  30. package/dist/esm/v2/index.js +4 -3
  31. package/dist/esm/v3/{OrCarousel-4fb775f8.js → OrCarousel-40f069d5.js} +2 -1
  32. package/dist/esm/v3/{OrRichTextEditor-c3560ddb.js → OrRichTextEditor-809824b9.js} +44 -35
  33. package/dist/esm/v3/{OrSelect-b1d7651a.js → OrSelect-3dbddc6b.js} +2 -1
  34. package/dist/esm/v3/components/index.js +4 -3
  35. package/dist/esm/v3/components/or-carousel/OrCarousel.vue.d.ts +1 -0
  36. package/dist/esm/v3/components/or-carousel/index.js +2 -1
  37. package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +10 -0
  38. package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +1 -1
  39. package/dist/esm/v3/components/or-select-v3/index.js +1 -1
  40. package/dist/esm/v3/index.js +4 -3
  41. package/package.json +2 -2
  42. package/src/components/or-carousel/OrCarousel.vue +2 -2
  43. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.ts +7 -3
  44. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +27 -20
  45. package/src/components/or-rich-text-editor-v3/styles.ts +1 -0
  46. package/src/components/or-select-v3/OrSelect.stories3.ts +39 -1
  47. package/src/components/or-select-v3/OrSelect.vue +1 -0
@@ -13,6 +13,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
13
13
  [x: number]: string;
14
14
  } | {}, true> | undefined>;
15
15
  moreButtonRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
16
+ textareaRef: import("@vue/composition-api").Ref<HTMLTextAreaElement | undefined>;
16
17
  moreRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
17
18
  menuRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
18
19
  [x: string]: ((...args: any[]) => any) | null;
@@ -48,6 +49,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
48
49
  isVisible: (value: string | Array<string>) => boolean;
49
50
  countOfNotVisibleTools: import("@vue/composition-api").Ref<number>;
50
51
  notVisibleTools: import("@vue/composition-api").ComputedRef<string[]>;
52
+ handleInput: (event: InputEvent) => void;
53
+ proxyModelValue: import("@vue/composition-api").WritableComputedRef<string>;
54
+ disableMarkdown: import("@vue/composition-api").Ref<boolean>;
55
+ sourceValue: import("@vue/composition-api").Ref<string>;
51
56
  }> & import("@vue/composition-api").Data, {}, {}, {
52
57
  modelValue: {
53
58
  type: StringConstructor;
@@ -153,6 +158,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
153
158
  [x: number]: string;
154
159
  } | {}, true> | undefined>;
155
160
  moreButtonRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
161
+ textareaRef: import("@vue/composition-api").Ref<HTMLTextAreaElement | undefined>;
156
162
  moreRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
157
163
  menuRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
158
164
  [x: string]: ((...args: any[]) => any) | null;
@@ -188,6 +194,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
188
194
  isVisible: (value: string | Array<string>) => boolean;
189
195
  countOfNotVisibleTools: import("@vue/composition-api").Ref<number>;
190
196
  notVisibleTools: import("@vue/composition-api").ComputedRef<string[]>;
197
+ handleInput: (event: InputEvent) => void;
198
+ proxyModelValue: import("@vue/composition-api").WritableComputedRef<string>;
199
+ disableMarkdown: import("@vue/composition-api").Ref<boolean>;
200
+ sourceValue: import("@vue/composition-api").Ref<string>;
191
201
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
192
202
  modelValue: string;
193
203
  toolbar: string[][];
@@ -1,4 +1,4 @@
1
- export { s as OrRichTextEditorV3 } from '../../OrRichTextEditor-c3560ddb.js';
1
+ export { s as OrRichTextEditorV3 } from '../../OrRichTextEditor-809824b9.js';
2
2
  import 'vue-demi';
3
3
  import '@vueuse/integrations/useFocusTrap';
4
4
  import '@vueuse/core';
@@ -1,4 +1,4 @@
1
- export { s as OrSelectV3 } from '../../OrSelect-b1d7651a.js';
1
+ export { s as OrSelectV3 } from '../../OrSelect-3dbddc6b.js';
2
2
  export { I as SelectSize } from '../../OrInputBox-ba40bbdf.js';
3
3
  import 'vue-demi';
4
4
  import '../../dropdown-open-e1f90e0a.js';
@@ -9,7 +9,7 @@ export { s as OrCard } from './OrCard-e3a5aea4.js';
9
9
  export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from './OrCardCollection-d79dac85.js';
10
10
  export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-b319b723.js';
11
11
  export { s as OrCardV3 } from './OrCard-cc82902c.js';
12
- export { s as OrCarousel } from './OrCarousel-4fb775f8.js';
12
+ export { s as OrCarousel } from './OrCarousel-40f069d5.js';
13
13
  export { s as OrCarouselItem } from './OrCarouselItem-8c7ccd0f.js';
14
14
  export { s as OrCheckbox } from './OrCheckbox-ab457011.js';
15
15
  export { s as OrCheckboxV3 } from './OrCheckbox-56d7b6eb.js';
@@ -71,7 +71,7 @@ export { s as OrSearch } from './OrSearch-f4ad73db.js';
71
71
  export { s as OrSearchV3 } from './OrSearch-e15c7fd2.js';
72
72
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-359fbf3a.js';
73
73
  export { s as OrSelect } from './OrSelect-6ff34196.js';
74
- export { s as OrSelectV3 } from './OrSelect-b1d7651a.js';
74
+ export { s as OrSelectV3 } from './OrSelect-3dbddc6b.js';
75
75
  export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-375c85a3.js';
76
76
  export { s as OrSidebarV3 } from './OrSidebar-bfd19c4c.js';
77
77
  export { O as OrSidebarPlacement } from './OrSidebarCollapseButton-63914891.js';
@@ -108,7 +108,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from './useToast-a1332
108
108
  export { s as OrTooltip } from './OrTooltip-89ce98e8.js';
109
109
  export { s as OrTooltipContent } from './OrTooltipContent-37a5f562.js';
110
110
  export { s as OrTooltipV3 } from './OrTooltip-4bb0054a.js';
111
- export { s as OrRichTextEditorV3 } from './OrRichTextEditor-c3560ddb.js';
111
+ export { s as OrRichTextEditorV3 } from './OrRichTextEditor-809824b9.js';
112
112
  export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-e1f90e0a.js';
113
113
  export { u as useControlAttributes, a as useIdAttribute } from './useIdAttribute-859439f0.js';
114
114
  export { u as useElevation } from './useElevation-b5a49746.js';
@@ -124,6 +124,7 @@ import 'vue';
124
124
  import './style-inject.es-4c6f2515.js';
125
125
  import '@vueuse/core';
126
126
  import '@splidejs/splide';
127
+ import '@splidejs/splide/dist/css/splide.min.css';
127
128
  import '@codemirror/state';
128
129
  import '@codemirror/view';
129
130
  import '@codemirror/commands';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "4.4.0-beta.2680.0",
3
+ "version": "4.4.0-beta.2690.0",
4
4
  "description": "Vue components library for v2/3",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/auto/index.js",
@@ -38,7 +38,7 @@
38
38
  "@codemirror/lang-json": "6.0.0",
39
39
  "@codemirror/lang-markdown": "6.0.1",
40
40
  "@floating-ui/dom": "0.3.1",
41
- "@onereach/styles": "^2.39.4-beta.2680.0",
41
+ "@onereach/styles": "^2.39.4-beta.2690.0",
42
42
  "@splidejs/splide": "4.0.6",
43
43
  "@tiptap/core": "2.0.2",
44
44
  "@tiptap/extension-blockquote": "2.0.2",
@@ -32,9 +32,11 @@
32
32
 
33
33
  <script lang="ts">
34
34
  import { Splide, ResponsiveOptions } from '@splidejs/splide';
35
+ import '@splidejs/splide/dist/css/splide.min.css';
35
36
  import { OrIcon } from '../or-icon';
36
37
  import { defineComponent, PropType, ref } from 'vue-demi';
37
38
  import { Direction, EVENTS, KeyBoard, Type } from './constants';
39
+
38
40
  export default defineComponent({
39
41
  name: 'OrCarousel',
40
42
  components: {
@@ -185,8 +187,6 @@ export default defineComponent({
185
187
  </script>
186
188
 
187
189
  <style lang="scss" scoped>
188
- @import '~@splidejs/splide/dist/css/splide.min.css';
189
-
190
190
  .or-carousel {
191
191
  &__track-container {
192
192
  position: relative;
@@ -131,8 +131,12 @@ Markdown.args = {
131
131
  placeholder: 'Write something...',
132
132
  format: 'markdown',
133
133
  modelValue: `
134
- **export**
135
- _export_
136
- ~export~
134
+ Executes Cypher queries in Graphs database.
135
+
136
+ ## **How can I use the Step?**
137
+
138
+ You can use the Step to manage graph databases in the **Graphs** service. The Step lets you execute Graph queries against the specific graph database.
139
+
140
+ > **Note:** The Step currently supports the [following queries](https://age.apache.org/age-manual/master/clauses/match.html)."
137
141
  `,
138
142
  };
@@ -54,7 +54,16 @@
54
54
  />
55
55
  </div>
56
56
  <div :class="['p-sm', { 'h-[calc(100%-32px)] md:h-[calc(100%-36px)]': fullHeight }]">
57
+ <textarea
58
+ v-show="disableMarkdown"
59
+ ref="textareaRef"
60
+ v-model="sourceValue"
61
+ :activated="disableMarkdown"
62
+ class="w-full h-full resize-none border-none outline-none bg-transparent"
63
+ @input="handleInput"
64
+ />
57
65
  <div
66
+ v-show="!disableMarkdown"
58
67
  ref="editorRef"
59
68
  :class="editorInputStyles"
60
69
  />
@@ -245,6 +254,7 @@ export default defineComponent({
245
254
  const root = ref<HTMLElement>();
246
255
  let editor = null as Editor | null;
247
256
  const editorRef = ref<HTMLDivElement>();
257
+ const textareaRef = ref<HTMLTextAreaElement>();
248
258
  const containerRef = ref<ComponentPublicInstance<HTMLInputElement>>();
249
259
  const toolbarRef = ref<ComponentPublicInstance<HTMLInputElement>>();
250
260
  const moreButtonRef = ref<HTMLDivElement>();
@@ -261,6 +271,7 @@ export default defineComponent({
261
271
  const text = ref<string>('');
262
272
  const link = ref<string>('');
263
273
  const countOfNotVisibleTools = ref<number>(0);
274
+ const sourceValue = ref<string>('');
264
275
 
265
276
  let trap: UseFocusTrapReturn = useFocusTrap(editorRef, {
266
277
  immediate: true,
@@ -456,26 +467,18 @@ export default defineComponent({
456
467
  return !notVisibleTools.value.includes(value);
457
468
  };
458
469
 
470
+ const handleInput = (event: InputEvent) => {
471
+ const target = event.target as HTMLTextAreaElement;
472
+ const value = target.value;
473
+ editor?.commands.setContent(deserialize(editor?.schema, value));
474
+ };
475
+
459
476
  const handleToolbarClick = (item: string, level?: number) => {
460
477
  switch (item) {
461
478
  case 'source':
462
479
  disableMarkdown.value = !disableMarkdown.value;
463
- editor?.setOptions({
464
- enableInputRules: !disableMarkdown.value,
465
- enablePasteRules: !disableMarkdown.value,
466
- });
467
-
468
- editor?.view.updateState(editor?.state.reconfigure({
469
- plugins: editor.extensionManager.plugins,
470
- }));
471
-
472
- if (disableMarkdown.value) {
473
- const content = serialize(editor?.schema, editor?.getJSON());
474
- editor?.commands.clearContent();
475
- editor?.commands.insertContent(content);
476
- } else {
477
- editor?.commands.setContent(deserialize(editor?.schema, editor?.getText()));
478
- }
480
+ textareaRef.value?.focus();
481
+ sourceValue.value = serialize(editor?.schema, editor?.getJSON());
479
482
  break;
480
483
  case 'bulletList':
481
484
  case 'orderedList':
@@ -647,6 +650,7 @@ export default defineComponent({
647
650
  containerRef,
648
651
  toolbarButtonRef,
649
652
  moreButtonRef,
653
+ textareaRef,
650
654
  moreRef,
651
655
  menuRef,
652
656
  iconsEnum,
@@ -672,6 +676,10 @@ export default defineComponent({
672
676
  isVisible,
673
677
  countOfNotVisibleTools,
674
678
  notVisibleTools,
679
+ handleInput,
680
+ proxyModelValue,
681
+ disableMarkdown,
682
+ sourceValue,
675
683
  };
676
684
  },
677
685
  });
@@ -694,7 +702,6 @@ export default defineComponent({
694
702
  }
695
703
  }
696
704
 
697
-
698
705
  ul {
699
706
  margin: 0 24px;
700
707
  list-style: initial;
@@ -703,7 +710,7 @@ export default defineComponent({
703
710
  blockquote {
704
711
  margin: 8px 24px;
705
712
  padding: 0 24px;
706
- border-left: 4px solid #bad1ec;
713
+ border-left: 4px solid theme('borderColor.primary-opacity-0-16');
707
714
  }
708
715
 
709
716
  .is-editor-empty::before {
@@ -726,14 +733,14 @@ export default defineComponent({
726
733
  }
727
734
 
728
735
  .cm-gutters {
729
- background-color: rgba(0, 95, 177, 0.08);
736
+ background-color: theme('backgroundColor.primary-opacity-0-12');
730
737
  border: none;
731
738
 
732
739
  .cm-gutterElement {
733
740
  padding: 0 10px;
734
741
 
735
742
  &.cm-activeLineGutter {
736
- background-color: rgba(0, 95, 177, 0.07)
743
+ background-color: theme('backgroundColor.primary-opacity-0-16');
737
744
  }
738
745
  }
739
746
  }
@@ -50,6 +50,7 @@ export const EditorInput: string[] = [
50
50
  // Typography
51
51
  'typography-body-2-regular',
52
52
  'text-on-background',
53
+ 'dark:text-on-background-dark',
53
54
  // Sizing
54
55
  'min-h-[88px]',
55
56
  ];
@@ -168,7 +168,7 @@ const Template: StoryFn<typeof OrSelect> = (args) => ({
168
168
 
169
169
  setup() {
170
170
  // State
171
- const model = ref<string | string[]>();
171
+ const model = ref<string | string[]>(args.modelValue);
172
172
  const searchOptions = ref<SelectOption[]>(args.options);
173
173
 
174
174
  // Handlers
@@ -468,3 +468,41 @@ WithLongStrings.args = {
468
468
 
469
469
  placeholder: 'Wery Wery Wery WeryWeryWeryWery Wery Wery long placeholder',
470
470
  };
471
+
472
+ export const MultipleReadonly = Template.bind({});
473
+
474
+ MultipleReadonly.args = {
475
+ ...Default.args,
476
+ readonly: true,
477
+ options: Array.from<string, SelectOption>([
478
+ 'Alfa',
479
+ 'Bravo',
480
+ 'Charlie',
481
+ 'Delta',
482
+ 'Echo',
483
+ ], (item) => ({
484
+ value: item.toLowerCase().replace(/\s/g, ''),
485
+ label: item,
486
+ })),
487
+ multiple: true,
488
+ modelValue: ['alfa', 'bravo'],
489
+ };
490
+ export const MultipleDisabled = Template.bind({});
491
+
492
+ MultipleDisabled.args = {
493
+ ...Default.args,
494
+ options: Array.from<string, SelectOption>([
495
+ 'Alfa',
496
+ 'Bravo',
497
+ 'Charlie',
498
+ 'Delta',
499
+ 'Echo',
500
+ ], (item) => ({
501
+ value: item.toLowerCase().replace(/\s/g, ''),
502
+ label: item,
503
+ })),
504
+ disabled: true,
505
+ multiple: true,
506
+ modelValue: ['alfa', 'bravo'],
507
+ paceholder: 'disabled placeholder',
508
+ };
@@ -48,6 +48,7 @@
48
48
  v-for="option in selection"
49
49
  :key="option.value"
50
50
  :variant="'reset'"
51
+ :disabled="disabled || readonly"
51
52
  @reset="deselect(option)"
52
53
  >
53
54
  {{ option.label }}