@onereach/ui-components 2.69.5-beta.2146.0 → 2.69.5

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 (51) hide show
  1. package/dist/bundled/v2/{OrCardCollection-f622df47.js → OrCardCollection-c4209a92.js} +13 -9
  2. package/dist/bundled/v2/{OrCode-fc6876ec.js → OrCode-edc7a1f5.js} +17 -56
  3. package/dist/bundled/v2/{OrSearch-a11b3621.js → OrSearch-76b002cf.js} +1 -1
  4. package/dist/bundled/v2/components/index.js +3 -3
  5. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +5 -0
  6. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +22 -0
  7. package/dist/bundled/v2/components/or-card-collection-v3/index.js +2 -2
  8. package/dist/bundled/v2/components/or-code/index.js +1 -1
  9. package/dist/bundled/v2/components/or-search-v3/OrSearch.vue.d.ts +2 -2
  10. package/dist/bundled/v2/components/or-search-v3/index.js +1 -1
  11. package/dist/bundled/v2/index.js +4 -4
  12. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-15645a65.js → OrCardCollection.vue_vue_type_script_lang-9a2ae9a3.js} +10 -2
  13. package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-c55de81d.js → OrCode.vue_vue_type_script_lang-ef5e7f04.js} +14 -53
  14. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-0ae8a6dd.js → OrSearch.vue_vue_type_script_lang-014ad470.js} +1 -1
  15. package/dist/bundled/v3/components/index.js +3 -3
  16. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +5 -0
  17. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +22 -0
  18. package/dist/bundled/v3/components/or-card-collection-v3/index.js +2 -2
  19. package/dist/bundled/v3/components/or-code/index.js +1 -1
  20. package/dist/bundled/v3/components/or-search-v3/OrSearch.vue.d.ts +2 -2
  21. package/dist/bundled/v3/components/or-search-v3/index.js +1 -1
  22. package/dist/bundled/v3/index.js +10 -9
  23. package/dist/esm/v2/{OrCardCollection-43aa4a3c.js → OrCardCollection-57d11adf.js} +13 -9
  24. package/dist/esm/v2/{OrCode-d4400b42.js → OrCode-41dd5f9b.js} +4 -6
  25. package/dist/esm/v2/{OrSearch-62d91301.js → OrSearch-2f260b09.js} +1 -1
  26. package/dist/esm/v2/components/index.js +3 -5
  27. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +5 -0
  28. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +22 -0
  29. package/dist/esm/v2/components/or-card-collection-v3/index.js +2 -2
  30. package/dist/esm/v2/components/or-code/index.js +1 -3
  31. package/dist/esm/v2/components/or-search-v3/OrSearch.vue.d.ts +2 -2
  32. package/dist/esm/v2/components/or-search-v3/index.js +1 -1
  33. package/dist/esm/v2/index.js +3 -5
  34. package/dist/esm/v3/{OrCardCollection-6b5e6b76.js → OrCardCollection-2a6514f3.js} +14 -5
  35. package/dist/esm/v3/{OrCode-5ed69c23.js → OrCode-ee19a5e6.js} +1 -3
  36. package/dist/esm/v3/{OrSearch-aafb93b4.js → OrSearch-e5a2e93e.js} +1 -1
  37. package/dist/esm/v3/components/index.js +3 -5
  38. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +5 -0
  39. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +22 -0
  40. package/dist/esm/v3/components/or-card-collection-v3/index.js +2 -2
  41. package/dist/esm/v3/components/or-code/index.js +1 -3
  42. package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +2 -2
  43. package/dist/esm/v3/components/or-search-v3/index.js +1 -1
  44. package/dist/esm/v3/index.js +3 -5
  45. package/package.json +3 -3
  46. package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +16 -0
  47. package/src/components/or-card-collection-v3/OrCardCollection.vue +13 -1
  48. package/src/components/or-card-collection-v3/styles.ts +3 -1
  49. package/src/components/or-code/OrCode.vue +1 -3
  50. package/src/components/or-search-v3/OrSearch.stories3.ts +1 -1
  51. package/src/components/or-search-v3/OrSearch.vue +1 -1
@@ -7,7 +7,7 @@ import { s as script$5 } from './OrMenu.vue_vue_type_script_lang-2446a69a.js';
7
7
  import './OrMenuItem-4feaba6c.js';
8
8
  import { s as script$6 } from './OrMenuItem.vue_vue_type_script_lang-0ffaef05.js';
9
9
  import './OrIcon-d878b768.js';
10
- import { s as script$2 } from './OrSearch.vue_vue_type_script_lang-0ae8a6dd.js';
10
+ import { s as script$2 } from './OrSearch.vue_vue_type_script_lang-014ad470.js';
11
11
  import { u as useClassAttribute } from './useClassAttribute-00888f78.js';
12
12
  import { s as script$4 } from './OrButton.vue_vue_type_script_lang-b0dc31ca.js';
13
13
  import { s as script$7 } from './OrIcon.vue_vue_type_script_lang-a119a715.js';
@@ -38,7 +38,7 @@ const CardCollectionContentViews = {
38
38
  'grid': [
39
39
  // Layout
40
40
  'sm:grid-cols-1', 'md:grid-cols-2', 'lg:grid-cols-4', 'xl:grid-cols-6'],
41
- 'list': []
41
+ 'list': ['grid-cols-1']
42
42
  };
43
43
 
44
44
  var script$1 = defineComponent({
@@ -156,6 +156,14 @@ var script = defineComponent({
156
156
  search: {
157
157
  type: String,
158
158
  default: ''
159
+ },
160
+ searchPlaceholder: {
161
+ type: String,
162
+ default: undefined
163
+ },
164
+ searchDebounce: {
165
+ type: Number,
166
+ default: undefined
159
167
  }
160
168
  },
161
169
  emits: ['viewChange', 'sortChange', 'searchChange'],
@@ -17855,11 +17855,7 @@ Comment or uncomment the current selection. Will use line comments
17855
17855
  if available, otherwise falling back to block comments.
17856
17856
  */
17857
17857
  const toggleComment = target => {
17858
- let {
17859
- state
17860
- } = target,
17861
- line = state.doc.lineAt(state.selection.main.head),
17862
- config = getConfig(target.state, line.from);
17858
+ let config = getConfig(target.state);
17863
17859
  return config.line ? toggleLineComment(target) : config.block ? toggleBlockCommentByLine(target) : false;
17864
17860
  };
17865
17861
  function command(f, option) {
@@ -17893,7 +17889,7 @@ Comment or uncomment the lines around the current selection using
17893
17889
  block comments.
17894
17890
  */
17895
17891
  const toggleBlockCommentByLine = /*@__PURE__*/command((o, s) => changeBlockComment(o, s, selectedLineRanges(s)), 0 /* CommentOption.Toggle */);
17896
- function getConfig(state, pos) {
17892
+ function getConfig(state, pos = state.selection.main.head) {
17897
17893
  let data = state.languageDataAt("commentTokens", pos);
17898
17894
  return data.length ? data[0] : {};
17899
17895
  }
@@ -18015,7 +18011,7 @@ function changeLineComment(option, state, ranges = state.selection.ranges) {
18015
18011
  let line = state.doc.lineAt(pos);
18016
18012
  if (line.from > prevLine && (from == to || to > line.from)) {
18017
18013
  prevLine = line.from;
18018
- let token = getConfig(state, line.from).line;
18014
+ let token = getConfig(state, pos).line;
18019
18015
  if (!token) continue;
18020
18016
  let indent = /^\s*/.exec(line.text)[0].length;
18021
18017
  let empty = indent == line.length;
@@ -18512,48 +18508,24 @@ const cursorLineUp = view => cursorByLine(view, false);
18512
18508
  Move the selection one line down.
18513
18509
  */
18514
18510
  const cursorLineDown = view => cursorByLine(view, true);
18515
- function pageInfo(view) {
18516
- let selfScroll = view.scrollDOM.clientHeight < view.scrollDOM.scrollHeight - 2;
18517
- let marginTop = 0,
18518
- marginBottom = 0,
18519
- height;
18520
- if (selfScroll) {
18521
- for (let source of view.state.facet(EditorView.scrollMargins)) {
18522
- let margins = source(view);
18523
- if (margins === null || margins === void 0 ? void 0 : margins.top) marginTop = Math.max(margins === null || margins === void 0 ? void 0 : margins.top, marginTop);
18524
- if (margins === null || margins === void 0 ? void 0 : margins.bottom) marginBottom = Math.max(margins === null || margins === void 0 ? void 0 : margins.bottom, marginBottom);
18525
- }
18526
- height = view.scrollDOM.clientHeight - marginTop - marginBottom;
18527
- } else {
18528
- height = (view.dom.ownerDocument.defaultView || window).innerHeight;
18529
- }
18530
- return {
18531
- marginTop,
18532
- marginBottom,
18533
- selfScroll,
18534
- height: Math.max(view.defaultLineHeight, height - 5)
18535
- };
18511
+ function pageHeight(view) {
18512
+ return Math.max(view.defaultLineHeight, Math.min(view.dom.clientHeight, innerHeight) - 5);
18536
18513
  }
18537
18514
  function cursorByPage(view, forward) {
18538
- let page = pageInfo(view);
18539
18515
  let {
18540
18516
  state
18541
18517
  } = view,
18542
18518
  selection = updateSel(state.selection, range => {
18543
- return range.empty ? view.moveVertically(range, forward, page.height) : rangeEnd(range, forward);
18519
+ return range.empty ? view.moveVertically(range, forward, pageHeight(view)) : rangeEnd(range, forward);
18544
18520
  });
18545
18521
  if (selection.eq(state.selection)) return false;
18522
+ let startPos = view.coordsAtPos(state.selection.main.head);
18523
+ let scrollRect = view.scrollDOM.getBoundingClientRect();
18546
18524
  let effect;
18547
- if (page.selfScroll) {
18548
- let startPos = view.coordsAtPos(state.selection.main.head);
18549
- let scrollRect = view.scrollDOM.getBoundingClientRect();
18550
- let scrollTop = scrollRect.top + page.marginTop,
18551
- scrollBottom = scrollRect.bottom - page.marginBottom;
18552
- if (startPos && startPos.top > scrollTop && startPos.bottom < scrollBottom) effect = EditorView.scrollIntoView(selection.main.head, {
18553
- y: "start",
18554
- yMargin: startPos.top - scrollTop
18555
- });
18556
- }
18525
+ if (startPos && startPos.top > scrollRect.top && startPos.bottom < scrollRect.bottom && startPos.top - scrollRect.top <= view.scrollDOM.scrollHeight - view.scrollDOM.scrollTop - view.scrollDOM.clientHeight) effect = EditorView.scrollIntoView(selection.main.head, {
18526
+ y: "start",
18527
+ yMargin: startPos.top - scrollRect.top
18528
+ });
18557
18529
  view.dispatch(setSel(state, selection), {
18558
18530
  effects: effect
18559
18531
  });
@@ -18679,7 +18651,7 @@ Move the selection head one line down.
18679
18651
  */
18680
18652
  const selectLineDown = view => selectByLine(view, true);
18681
18653
  function selectByPage(view, forward) {
18682
- return extendSel(view, range => view.moveVertically(range, forward, pageInfo(view).height));
18654
+ return extendSel(view, range => view.moveVertically(range, forward, pageHeight(view)));
18683
18655
  }
18684
18656
  /**
18685
18657
  Move the selection head one page up.
@@ -19614,17 +19586,6 @@ const defaultKeymap = /*@__PURE__*/[{
19614
19586
  key: "Alt-A",
19615
19587
  run: toggleBlockComment
19616
19588
  }].concat(standardKeymap);
19617
- /**
19618
- A binding that binds Tab to [`indentMore`](https://codemirror.net/6/docs/ref/#commands.indentMore) and
19619
- Shift-Tab to [`indentLess`](https://codemirror.net/6/docs/ref/#commands.indentLess).
19620
- Please see the [Tab example](../../examples/tab/) before using
19621
- this.
19622
- */
19623
- const indentWithTab = {
19624
- key: "Tab",
19625
- run: indentMore,
19626
- shift: indentLess
19627
- };
19628
19589
 
19629
19590
  function crelt() {
19630
19591
  var elt = arguments[0];
@@ -29545,7 +29506,7 @@ var script = defineComponent({
29545
29506
  }
29546
29507
  }),
29547
29508
  // line wrapping
29548
- lineWrapping ? EditorView.lineWrapping : undefined, keymap.of([indentWithTab])]);
29509
+ lineWrapping ? EditorView.lineWrapping : undefined]);
29549
29510
  // Append Extensions (such as basic-setup)
29550
29511
  if (this.extensions.length !== 0) _.merge(ext, this.extensions);
29551
29512
  return ext;
@@ -23,7 +23,7 @@ var script = defineComponent({
23
23
  },
24
24
  placeholder: {
25
25
  type: String,
26
- default: undefined
26
+ default: 'Search'
27
27
  },
28
28
  debounce: {
29
29
  type: Number,
@@ -8,14 +8,14 @@ export { a as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, b as BUTTON_SIZE, B as BUTT
8
8
  export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from '../OrButton.vue_vue_type_script_lang-b0dc31ca.js';
9
9
  export { s as OrCard } from '../OrCard.vue_vue_type_script_lang-90ba001b.js';
10
10
  export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from '../OrCardCollection.vue_vue_type_script_lang-d8124dda.js';
11
- export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollection.vue_vue_type_script_lang-15645a65.js';
11
+ export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollection.vue_vue_type_script_lang-9a2ae9a3.js';
12
12
  export { s as OrCardV3 } from '../OrCard.vue_vue_type_script_lang-165de137.js';
13
13
  export { a as OrCarousel, s as OrCarouselItem } from '../OrCarouselItem.vue_vue_type_script_lang-ad286afc.js';
14
14
  export { s as OrCheckbox } from '../OrCheckbox.vue_vue_type_script_lang-d8a66818.js';
15
15
  export { s as OrCheckboxV3 } from '../OrCheckbox.vue_vue_type_script_lang-8b36e06c.js';
16
16
  export { s as OrChip } from '../OrChip-5d502431.js';
17
17
  export { s as OrChips } from '../OrChips.vue_vue_type_script_lang-69917e34.js';
18
- export { s as OrCode, O as OrCodeLanguages } from '../OrCode.vue_vue_type_script_lang-c55de81d.js';
18
+ export { s as OrCode, O as OrCodeLanguages } from '../OrCode.vue_vue_type_script_lang-ef5e7f04.js';
19
19
  export { s as OrCollapse } from '../OrCollapse.vue_vue_type_script_lang-65cbb754.js';
20
20
  export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from '../OrColorPicker.vue_vue_type_script_lang-4141378d.js';
21
21
  export { s as OrConfirm } from '../OrConfirm.vue_vue_type_script_lang-0f16fc67.js';
@@ -63,7 +63,7 @@ export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from '../OrP
63
63
  export { s as OrRadio } from '../OrRadio.vue_vue_type_script_lang-c956b54b.js';
64
64
  export { s as OrRadioGroup } from '../OrRadioGroup.vue_vue_type_script_lang-caea7bcb.js';
65
65
  export { s as OrRadioV3 } from '../OrRadio.vue_vue_type_script_lang-2e666a56.js';
66
- export { s as OrSearchV3 } from '../OrSearch.vue_vue_type_script_lang-0ae8a6dd.js';
66
+ export { s as OrSearchV3 } from '../OrSearch.vue_vue_type_script_lang-014ad470.js';
67
67
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl.vue_vue_type_script_lang-579406f5.js';
68
68
  export { s as OrSelect } from '../OrSelect.vue_vue_type_script_lang-26c0a70a.js';
69
69
  export { s as OrSelectV3 } from '../OrSelect.vue_vue_type_script_lang-15285ce4.js';
@@ -20,3 +20,8 @@ export declare const OverrideViewContainer: StoryFn<typeof OrCardCollection>;
20
20
  export declare const ExtraViewMode: StoryFn<typeof OrCardCollection>;
21
21
  export declare const WithLink: StoryFn<typeof OrCardCollection>;
22
22
  export declare const EmptySearchResults: StoryFn<typeof OrCardCollection>;
23
+ export declare const CustomizeSearch: StoryFn<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
24
+ [x: string]: ((...args: any[]) => any) | null;
25
+ } | string[], {} & {}, {
26
+ [x: number]: string;
27
+ } | {}, true>)>;
@@ -47,6 +47,14 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
47
47
  type: StringConstructor;
48
48
  default: string;
49
49
  };
50
+ searchPlaceholder: {
51
+ type: StringConstructor;
52
+ default: undefined;
53
+ };
54
+ searchDebounce: {
55
+ type: NumberConstructor;
56
+ default: undefined;
57
+ };
50
58
  }, import("@vue/composition-api").ExtractPropTypes<{
51
59
  items: {
52
60
  type: PropType<CardCollectionItem[]>;
@@ -72,6 +80,14 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
72
80
  type: StringConstructor;
73
81
  default: string;
74
82
  };
83
+ searchPlaceholder: {
84
+ type: StringConstructor;
85
+ default: undefined;
86
+ };
87
+ searchDebounce: {
88
+ type: NumberConstructor;
89
+ default: undefined;
90
+ };
75
91
  }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
76
92
  search: string;
77
93
  sort: string;
@@ -79,6 +95,8 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
79
95
  view: string;
80
96
  viewModes: ViewMode[];
81
97
  sortOptions: SortOption[];
98
+ searchPlaceholder: string;
99
+ searchDebounce: number;
82
100
  } & {} & {
83
101
  [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
84
102
  }, import("@vue/composition-api").ShallowUnwrapRef<{
@@ -110,6 +128,8 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
110
128
  view: string;
111
129
  viewModes: ViewMode[];
112
130
  sortOptions: SortOption[];
131
+ searchPlaceholder: string;
132
+ searchDebounce: number;
113
133
  } & {} & {
114
134
  [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
115
135
  }, {
@@ -119,5 +139,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
119
139
  view: string;
120
140
  viewModes: ViewMode[];
121
141
  sortOptions: SortOption[];
142
+ searchPlaceholder: string;
143
+ searchDebounce: number;
122
144
  }, true>);
123
145
  export default _default;
@@ -1,4 +1,4 @@
1
- export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../../OrCardCollection.vue_vue_type_script_lang-15645a65.js';
1
+ export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../../OrCardCollection.vue_vue_type_script_lang-9a2ae9a3.js';
2
2
  import 'vue';
3
3
  import '../../OrIconButton-1581013c.js';
4
4
  import '../../OrIconButton.vue_vue_type_script_lang-f6f801ff.js';
@@ -23,7 +23,7 @@ import '../../OrMenu-f26e8e55.js';
23
23
  import '../../OrMenu.vue_vue_type_script_lang-2446a69a.js';
24
24
  import '../../OrMenuItem-4feaba6c.js';
25
25
  import '../../OrMenuItem.vue_vue_type_script_lang-0ffaef05.js';
26
- import '../../OrSearch.vue_vue_type_script_lang-0ae8a6dd.js';
26
+ import '../../OrSearch.vue_vue_type_script_lang-014ad470.js';
27
27
  import '../../OrInput-fa782fc1.js';
28
28
  import '../../OrInput.vue_vue_type_script_lang-f6d793d3.js';
29
29
  import '../../OrHint-9592499e.js';
@@ -1,4 +1,4 @@
1
- export { s as OrCode, O as OrCodeLanguages } from '../../OrCode.vue_vue_type_script_lang-c55de81d.js';
1
+ export { s as OrCode, O as OrCodeLanguages } from '../../OrCode.vue_vue_type_script_lang-ef5e7f04.js';
2
2
  import '@vueuse/core';
3
3
  import 'lodash';
4
4
  import 'vue';
@@ -22,7 +22,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
22
22
  };
23
23
  placeholder: {
24
24
  type: StringConstructor;
25
- default: undefined;
25
+ default: string;
26
26
  };
27
27
  debounce: {
28
28
  type: NumberConstructor;
@@ -48,7 +48,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
48
48
  };
49
49
  placeholder: {
50
50
  type: StringConstructor;
51
- default: undefined;
51
+ default: string;
52
52
  };
53
53
  debounce: {
54
54
  type: NumberConstructor;
@@ -1,4 +1,4 @@
1
- export { s as OrSearchV3 } from '../../OrSearch.vue_vue_type_script_lang-0ae8a6dd.js';
1
+ export { s as OrSearchV3 } from '../../OrSearch.vue_vue_type_script_lang-014ad470.js';
2
2
  export { a as SearchSize } from '../../OrInputBox.vue_vue_type_script_lang-5ee4ee45.js';
3
3
  import 'vue';
4
4
  import '@vueuse/core';