@onereach/ui-components 2.69.5 → 2.69.6
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.
- package/dist/bundled/v2/{OrCode-edc7a1f5.js → OrCode-fc6876ec.js} +56 -17
- package/dist/bundled/v2/OrEmptyState-9fb413f9.js +160 -0
- package/dist/bundled/v2/components/index.d.ts +1 -0
- package/dist/bundled/v2/components/index.js +2 -1
- package/dist/bundled/v2/components/or-code/index.js +1 -1
- package/dist/bundled/v2/components/or-empty-state-v3/OrEmptyState.vue.d.ts +1 -1
- package/dist/bundled/v2/components/or-empty-state-v3/index.js +3 -159
- package/dist/bundled/v2/components/or-input-box-v3/OrInputBox.vue.d.ts +1 -2
- package/dist/bundled/v2/index.js +2 -1
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-ef5e7f04.js → OrCode.vue_vue_type_script_lang-c55de81d.js} +53 -14
- package/dist/bundled/v3/OrEmptyState.vue_vue_type_script_lang-da7d6c42.js +111 -0
- package/dist/bundled/v3/components/index.d.ts +1 -0
- package/dist/bundled/v3/components/index.js +2 -1
- package/dist/bundled/v3/components/or-code/index.js +1 -1
- package/dist/bundled/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +1 -1
- package/dist/bundled/v3/components/or-empty-state-v3/index.js +2 -134
- package/dist/bundled/v3/components/or-input-box-v3/OrInputBox.vue.d.ts +1 -2
- package/dist/bundled/v3/index.js +214 -189
- package/dist/esm/v2/{OrCode-41dd5f9b.js → OrCode-d4400b42.js} +6 -4
- package/dist/esm/v2/OrEmptyState-2481f13f.js +158 -0
- package/dist/esm/v2/components/index.d.ts +1 -0
- package/dist/esm/v2/components/index.js +4 -1
- package/dist/esm/v2/components/or-code/index.js +3 -1
- package/dist/esm/v2/components/or-empty-state-v3/OrEmptyState.vue.d.ts +1 -1
- package/dist/esm/v2/components/or-empty-state-v3/index.js +3 -158
- package/dist/esm/v2/components/or-input-box-v3/OrInputBox.vue.d.ts +1 -2
- package/dist/esm/v2/index.js +4 -1
- package/dist/esm/v3/OrCardCollection-2a6514f3.js +1 -1
- package/dist/esm/v3/{OrCode-ee19a5e6.js → OrCode-5ed69c23.js} +3 -1
- package/dist/esm/v3/OrEmptyState-bb8e3145.js +135 -0
- package/dist/esm/v3/OrInput-41691fb3.js +1 -1
- package/dist/esm/v3/{OrInputBox-5247ab25.js → OrInputBox-6d1b6059.js} +1 -1
- package/dist/esm/v3/OrSearch-e5a2e93e.js +1 -1
- package/dist/esm/v3/OrSelect-7e813982.js +1 -1
- package/dist/esm/v3/OrTextarea-bb9ef3f2.js +1 -1
- package/dist/esm/v3/components/index.d.ts +1 -0
- package/dist/esm/v3/components/index.js +5 -2
- package/dist/esm/v3/components/or-card-collection-v3/index.js +1 -1
- package/dist/esm/v3/components/or-code/index.js +3 -1
- package/dist/esm/v3/components/or-confirm-v3/index.js +1 -1
- package/dist/esm/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +1 -1
- package/dist/esm/v3/components/or-empty-state-v3/index.js +3 -135
- package/dist/esm/v3/components/or-input-box-v3/OrInputBox.vue.d.ts +1 -2
- package/dist/esm/v3/components/or-input-box-v3/index.js +2 -2
- package/dist/esm/v3/components/or-input-v3/index.js +1 -1
- package/dist/esm/v3/components/or-search-v3/index.js +1 -1
- package/dist/esm/v3/components/or-select-v3/index.js +1 -1
- package/dist/esm/v3/components/or-textarea-v3/index.js +1 -1
- package/dist/esm/v3/index.js +5 -2
- package/package.json +3 -2
- package/src/components/index.ts +1 -0
- package/src/components/or-card/OrCard.stories.ts +1 -1
- package/src/components/or-card-collection/OrCardCollection.stories.ts +1 -1
- package/src/components/or-code/OrCode.vue +3 -1
- package/src/components/or-empty-state-v3/OrEmptyState.vue +16 -10
- package/src/components/or-input-box-v3/OrInputBox.vue +1 -2
- package/src/components/or-teleport-v3/OrTeleport.stories3.ts +1 -1
|
@@ -17853,7 +17853,11 @@ Comment or uncomment the current selection. Will use line comments
|
|
|
17853
17853
|
if available, otherwise falling back to block comments.
|
|
17854
17854
|
*/
|
|
17855
17855
|
const toggleComment = target => {
|
|
17856
|
-
let
|
|
17856
|
+
let {
|
|
17857
|
+
state
|
|
17858
|
+
} = target,
|
|
17859
|
+
line = state.doc.lineAt(state.selection.main.head),
|
|
17860
|
+
config = getConfig(target.state, line.from);
|
|
17857
17861
|
return config.line ? toggleLineComment(target) : config.block ? toggleBlockCommentByLine(target) : false;
|
|
17858
17862
|
};
|
|
17859
17863
|
function command(f, option) {
|
|
@@ -17887,7 +17891,7 @@ Comment or uncomment the lines around the current selection using
|
|
|
17887
17891
|
block comments.
|
|
17888
17892
|
*/
|
|
17889
17893
|
const toggleBlockCommentByLine = /*@__PURE__*/command((o, s) => changeBlockComment(o, s, selectedLineRanges(s)), 0 /* CommentOption.Toggle */);
|
|
17890
|
-
function getConfig(state, pos
|
|
17894
|
+
function getConfig(state, pos) {
|
|
17891
17895
|
let data = state.languageDataAt("commentTokens", pos);
|
|
17892
17896
|
return data.length ? data[0] : {};
|
|
17893
17897
|
}
|
|
@@ -18009,7 +18013,7 @@ function changeLineComment(option, state, ranges = state.selection.ranges) {
|
|
|
18009
18013
|
let line = state.doc.lineAt(pos);
|
|
18010
18014
|
if (line.from > prevLine && (from == to || to > line.from)) {
|
|
18011
18015
|
prevLine = line.from;
|
|
18012
|
-
let token = getConfig(state,
|
|
18016
|
+
let token = getConfig(state, line.from).line;
|
|
18013
18017
|
if (!token) continue;
|
|
18014
18018
|
let indent = /^\s*/.exec(line.text)[0].length;
|
|
18015
18019
|
let empty = indent == line.length;
|
|
@@ -18506,24 +18510,48 @@ const cursorLineUp = view => cursorByLine(view, false);
|
|
|
18506
18510
|
Move the selection one line down.
|
|
18507
18511
|
*/
|
|
18508
18512
|
const cursorLineDown = view => cursorByLine(view, true);
|
|
18509
|
-
function
|
|
18510
|
-
|
|
18513
|
+
function pageInfo(view) {
|
|
18514
|
+
let selfScroll = view.scrollDOM.clientHeight < view.scrollDOM.scrollHeight - 2;
|
|
18515
|
+
let marginTop = 0,
|
|
18516
|
+
marginBottom = 0,
|
|
18517
|
+
height;
|
|
18518
|
+
if (selfScroll) {
|
|
18519
|
+
for (let source of view.state.facet(EditorView.scrollMargins)) {
|
|
18520
|
+
let margins = source(view);
|
|
18521
|
+
if (margins === null || margins === void 0 ? void 0 : margins.top) marginTop = Math.max(margins === null || margins === void 0 ? void 0 : margins.top, marginTop);
|
|
18522
|
+
if (margins === null || margins === void 0 ? void 0 : margins.bottom) marginBottom = Math.max(margins === null || margins === void 0 ? void 0 : margins.bottom, marginBottom);
|
|
18523
|
+
}
|
|
18524
|
+
height = view.scrollDOM.clientHeight - marginTop - marginBottom;
|
|
18525
|
+
} else {
|
|
18526
|
+
height = (view.dom.ownerDocument.defaultView || window).innerHeight;
|
|
18527
|
+
}
|
|
18528
|
+
return {
|
|
18529
|
+
marginTop,
|
|
18530
|
+
marginBottom,
|
|
18531
|
+
selfScroll,
|
|
18532
|
+
height: Math.max(view.defaultLineHeight, height - 5)
|
|
18533
|
+
};
|
|
18511
18534
|
}
|
|
18512
18535
|
function cursorByPage(view, forward) {
|
|
18536
|
+
let page = pageInfo(view);
|
|
18513
18537
|
let {
|
|
18514
18538
|
state
|
|
18515
18539
|
} = view,
|
|
18516
18540
|
selection = updateSel(state.selection, range => {
|
|
18517
|
-
return range.empty ? view.moveVertically(range, forward,
|
|
18541
|
+
return range.empty ? view.moveVertically(range, forward, page.height) : rangeEnd(range, forward);
|
|
18518
18542
|
});
|
|
18519
18543
|
if (selection.eq(state.selection)) return false;
|
|
18520
|
-
let startPos = view.coordsAtPos(state.selection.main.head);
|
|
18521
|
-
let scrollRect = view.scrollDOM.getBoundingClientRect();
|
|
18522
18544
|
let effect;
|
|
18523
|
-
if (
|
|
18524
|
-
|
|
18525
|
-
|
|
18526
|
-
|
|
18545
|
+
if (page.selfScroll) {
|
|
18546
|
+
let startPos = view.coordsAtPos(state.selection.main.head);
|
|
18547
|
+
let scrollRect = view.scrollDOM.getBoundingClientRect();
|
|
18548
|
+
let scrollTop = scrollRect.top + page.marginTop,
|
|
18549
|
+
scrollBottom = scrollRect.bottom - page.marginBottom;
|
|
18550
|
+
if (startPos && startPos.top > scrollTop && startPos.bottom < scrollBottom) effect = EditorView.scrollIntoView(selection.main.head, {
|
|
18551
|
+
y: "start",
|
|
18552
|
+
yMargin: startPos.top - scrollTop
|
|
18553
|
+
});
|
|
18554
|
+
}
|
|
18527
18555
|
view.dispatch(setSel(state, selection), {
|
|
18528
18556
|
effects: effect
|
|
18529
18557
|
});
|
|
@@ -18649,7 +18677,7 @@ Move the selection head one line down.
|
|
|
18649
18677
|
*/
|
|
18650
18678
|
const selectLineDown = view => selectByLine(view, true);
|
|
18651
18679
|
function selectByPage(view, forward) {
|
|
18652
|
-
return extendSel(view, range => view.moveVertically(range, forward,
|
|
18680
|
+
return extendSel(view, range => view.moveVertically(range, forward, pageInfo(view).height));
|
|
18653
18681
|
}
|
|
18654
18682
|
/**
|
|
18655
18683
|
Move the selection head one page up.
|
|
@@ -19584,6 +19612,17 @@ const defaultKeymap = /*@__PURE__*/[{
|
|
|
19584
19612
|
key: "Alt-A",
|
|
19585
19613
|
run: toggleBlockComment
|
|
19586
19614
|
}].concat(standardKeymap);
|
|
19615
|
+
/**
|
|
19616
|
+
A binding that binds Tab to [`indentMore`](https://codemirror.net/6/docs/ref/#commands.indentMore) and
|
|
19617
|
+
Shift-Tab to [`indentLess`](https://codemirror.net/6/docs/ref/#commands.indentLess).
|
|
19618
|
+
Please see the [Tab example](../../examples/tab/) before using
|
|
19619
|
+
this.
|
|
19620
|
+
*/
|
|
19621
|
+
const indentWithTab = {
|
|
19622
|
+
key: "Tab",
|
|
19623
|
+
run: indentMore,
|
|
19624
|
+
shift: indentLess
|
|
19625
|
+
};
|
|
19587
19626
|
|
|
19588
19627
|
function crelt() {
|
|
19589
19628
|
var elt = arguments[0];
|
|
@@ -29504,7 +29543,7 @@ var script = defineComponent({
|
|
|
29504
29543
|
}
|
|
29505
29544
|
}),
|
|
29506
29545
|
// line wrapping
|
|
29507
|
-
lineWrapping ? EditorView.lineWrapping : undefined]);
|
|
29546
|
+
lineWrapping ? EditorView.lineWrapping : undefined, keymap.of([indentWithTab])]);
|
|
29508
29547
|
// Append Extensions (such as basic-setup)
|
|
29509
29548
|
if (this.extensions.length !== 0) _.merge(ext, this.extensions);
|
|
29510
29549
|
return ext;
|
|
@@ -29667,14 +29706,14 @@ var __vue_staticRenderFns__ = [];
|
|
|
29667
29706
|
/* style */
|
|
29668
29707
|
const __vue_inject_styles__ = function (inject) {
|
|
29669
29708
|
if (!inject) return;
|
|
29670
|
-
inject("data-v-
|
|
29671
|
-
source: "@keyframes spinAround-data-v-
|
|
29709
|
+
inject("data-v-2056db5f_0", {
|
|
29710
|
+
source: "@keyframes spinAround-data-v-2056db5f{from{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes fade-data-v-2056db5f{from{opacity:1}to{opacity:0}}.or-code .fullscreen-button[data-v-2056db5f]{width:2.25rem;height:2.25rem}.or-code .fullscreen-button>.or-icon[data-v-2056db5f]{font-size:1.5rem}.or-code .footer .or-code-error[data-v-2056db5f],.or-code .footer .or-code-hint[data-v-2056db5f]{flex-shrink:1;transition-timing-function:var(--t-func);transition-duration:var(--t-duration);transition-property:height,opacity}.header[data-v-2056db5f]{display:flex;flex-direction:row;align-items:center;height:36px}.header .actions[data-v-2056db5f]{margin-left:auto}.header .actions[data-v-2056db5f]:not(.is-visible){display:none}.or-code-editor[data-v-2056db5f]{min-height:calc(1.4em + 8px);overflow:auto;font-size:var(--fs-0);border:1px solid var(--c-neutral-2);border-radius:var(--s-2)}.or-code-editor.is-invalid[data-v-2056db5f]{border-color:var(--c-error)}.or-code-editor[data-v-2056db5f]> *{width:100%;height:100%}.or-code[data-v-2056db5f],.or-modal[data-v-2056db5f] .content{display:flex;flex-direction:column}.or-code .or-code-editor[data-v-2056db5f],.or-modal[data-v-2056db5f] .content .or-code-editor{flex-grow:1;text-align:left!important}",
|
|
29672
29711
|
map: undefined,
|
|
29673
29712
|
media: undefined
|
|
29674
29713
|
});
|
|
29675
29714
|
};
|
|
29676
29715
|
/* scoped */
|
|
29677
|
-
const __vue_scope_id__ = "data-v-
|
|
29716
|
+
const __vue_scope_id__ = "data-v-2056db5f";
|
|
29678
29717
|
/* module identifier */
|
|
29679
29718
|
const __vue_module_identifier__ = undefined;
|
|
29680
29719
|
/* functional template */
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import './index-fa6eb4ca.js';
|
|
2
|
+
import { defineComponent, ref, computed } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
3
|
+
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
4
|
+
|
|
5
|
+
var EmptyStateSize;
|
|
6
|
+
(function (EmptyStateSize) {
|
|
7
|
+
EmptyStateSize["L"] = "l";
|
|
8
|
+
EmptyStateSize["M"] = "m";
|
|
9
|
+
})(EmptyStateSize || (EmptyStateSize = {}));
|
|
10
|
+
|
|
11
|
+
const EmptyStateRoot = [
|
|
12
|
+
// Layout
|
|
13
|
+
'grow', 'flex', 'flex-col', 'justify-center', 'items-center',
|
|
14
|
+
// Box
|
|
15
|
+
'w-full',
|
|
16
|
+
// Sizing
|
|
17
|
+
'gap-sm'];
|
|
18
|
+
const EmptyStateImage = [
|
|
19
|
+
// Sizing
|
|
20
|
+
'mb-sm'];
|
|
21
|
+
const EmptyStateImageSizes = {
|
|
22
|
+
[EmptyStateSize.L]: [
|
|
23
|
+
// Box
|
|
24
|
+
'h-3xl'],
|
|
25
|
+
[EmptyStateSize.M]: [
|
|
26
|
+
// Box
|
|
27
|
+
'h-2xl']
|
|
28
|
+
};
|
|
29
|
+
const EmptyStateHeading = [
|
|
30
|
+
// Theme
|
|
31
|
+
'theme-foreground-default', 'dark:theme-foreground-default-dark'];
|
|
32
|
+
const EmptyStateHeadingSizes = {
|
|
33
|
+
[EmptyStateSize.L]: [
|
|
34
|
+
// Typography
|
|
35
|
+
'typography-headline-2'],
|
|
36
|
+
[EmptyStateSize.M]: [
|
|
37
|
+
// Typography
|
|
38
|
+
'typography-headline-4']
|
|
39
|
+
};
|
|
40
|
+
const EmptyStateText = ['text-center',
|
|
41
|
+
// Theme
|
|
42
|
+
'text-outline', 'dark:text-outline-dark'];
|
|
43
|
+
const EmptyStateContent = EmptyStateText;
|
|
44
|
+
const EmptyStateTextSizes = {
|
|
45
|
+
[EmptyStateSize.L]: [
|
|
46
|
+
// Typography
|
|
47
|
+
'typography-body-2-regular'],
|
|
48
|
+
[EmptyStateSize.M]: [
|
|
49
|
+
// Typography
|
|
50
|
+
'typography-caption-regular']
|
|
51
|
+
};
|
|
52
|
+
const EmptyStateContentSizes = EmptyStateTextSizes;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The component to display when there is no content on a page,
|
|
56
|
+
* no records found or selected, or while the data is being loaded.
|
|
57
|
+
* Provides a hint to the user on what to do.
|
|
58
|
+
* Consists of text message, optional icon and optional loader.
|
|
59
|
+
*/
|
|
60
|
+
var script = defineComponent({
|
|
61
|
+
name: 'OrEmptyState',
|
|
62
|
+
props: {
|
|
63
|
+
/**
|
|
64
|
+
* Size of the component, affects font and icon size.
|
|
65
|
+
* Use Large if the component takes all screen space,
|
|
66
|
+
* and Medium if it is a part of the complex layout.
|
|
67
|
+
*/
|
|
68
|
+
size: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: EmptyStateSize.M
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* The heading of the empty state block.
|
|
74
|
+
*/
|
|
75
|
+
heading: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: ''
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* Additional text such as a hint for a user with proposed next steps.
|
|
81
|
+
*/
|
|
82
|
+
text: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: ''
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* Path to the image to display above the heading.
|
|
88
|
+
* Image height is fixed depending on `size` prop, width is undefined to preserve aspect ratio.
|
|
89
|
+
*/
|
|
90
|
+
imageSrc: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: undefined
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
setup(props) {
|
|
96
|
+
const root = ref();
|
|
97
|
+
const rootClasses = computed(() => ['or-empty-state', ...EmptyStateRoot]);
|
|
98
|
+
const imageClasses = computed(() => ['or-empty-state_image', ...EmptyStateImage, ...EmptyStateImageSizes[props.size]]);
|
|
99
|
+
const headingClasses = computed(() => ['or-empty-state_heading', ...EmptyStateHeading, ...EmptyStateHeadingSizes[props.size]]);
|
|
100
|
+
const textClasses = computed(() => ['or-empty-state_text', ...EmptyStateText, ...EmptyStateTextSizes[props.size]]);
|
|
101
|
+
const slotClasses = computed(() => ['or-empty-state_content', ...EmptyStateContent, ...EmptyStateContentSizes[props.size]]);
|
|
102
|
+
return {
|
|
103
|
+
root,
|
|
104
|
+
rootClasses,
|
|
105
|
+
imageClasses,
|
|
106
|
+
headingClasses,
|
|
107
|
+
textClasses,
|
|
108
|
+
slotClasses
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
/* script */
|
|
114
|
+
const __vue_script__ = script;
|
|
115
|
+
|
|
116
|
+
/* template */
|
|
117
|
+
var __vue_render__ = function () {
|
|
118
|
+
var _vm = this;
|
|
119
|
+
var _h = _vm.$createElement;
|
|
120
|
+
var _c = _vm._self._c || _h;
|
|
121
|
+
return _c('div', {
|
|
122
|
+
ref: "root",
|
|
123
|
+
class: _vm.rootClasses
|
|
124
|
+
}, [_vm.imageSrc ? _c('img', {
|
|
125
|
+
class: _vm.imageClasses,
|
|
126
|
+
attrs: {
|
|
127
|
+
"src": _vm.imageSrc,
|
|
128
|
+
"alt": ""
|
|
129
|
+
}
|
|
130
|
+
}) : _vm._e(), _vm._v(" "), _c('div', {
|
|
131
|
+
class: _vm.headingClasses
|
|
132
|
+
}, [_vm._v("\n " + _vm._s(_vm.heading) + "\n ")]), _vm._v(" "), _vm.$slots.default ? _c('div', {
|
|
133
|
+
class: _vm.slotClasses
|
|
134
|
+
}, [_vm._t("default")], 2) : _vm._e(), _vm._v(" "), _c('div', {
|
|
135
|
+
class: _vm.textClasses
|
|
136
|
+
}, [_vm._v("\n " + _vm._s(_vm.text) + "\n ")])]);
|
|
137
|
+
};
|
|
138
|
+
var __vue_staticRenderFns__ = [];
|
|
139
|
+
|
|
140
|
+
/* style */
|
|
141
|
+
const __vue_inject_styles__ = undefined;
|
|
142
|
+
/* scoped */
|
|
143
|
+
const __vue_scope_id__ = undefined;
|
|
144
|
+
/* module identifier */
|
|
145
|
+
const __vue_module_identifier__ = undefined;
|
|
146
|
+
/* functional template */
|
|
147
|
+
const __vue_is_functional_template__ = false;
|
|
148
|
+
/* style inject */
|
|
149
|
+
|
|
150
|
+
/* style inject SSR */
|
|
151
|
+
|
|
152
|
+
/* style inject shadow dom */
|
|
153
|
+
|
|
154
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
155
|
+
render: __vue_render__,
|
|
156
|
+
staticRenderFns: __vue_staticRenderFns__
|
|
157
|
+
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
158
|
+
var __vue_component__$1 = __vue_component__;
|
|
159
|
+
|
|
160
|
+
export { EmptyStateSize as E, __vue_component__$1 as _ };
|
|
@@ -21,6 +21,7 @@ export * from './or-date-time-picker';
|
|
|
21
21
|
export * from './or-error';
|
|
22
22
|
export * from './or-error-tag-v3';
|
|
23
23
|
export * from './or-error-v3';
|
|
24
|
+
export * from './or-empty-state-v3';
|
|
24
25
|
export * from './or-expansion-panel-v3';
|
|
25
26
|
export * from './or-fab-v3';
|
|
26
27
|
export * from './or-floating';
|
|
@@ -15,7 +15,7 @@ export { O as OrCheckbox } from '../OrCheckbox-4cbddd67.js';
|
|
|
15
15
|
export { O as OrCheckboxV3 } from '../OrCheckbox-dbef9f9a.js';
|
|
16
16
|
export { O as OrChip } from '../OrChip-000fe7b5.js';
|
|
17
17
|
export { _ as OrChips } from '../OrChips-890b8476.js';
|
|
18
|
-
export { _ as OrCode, O as OrCodeLanguages } from '../OrCode-
|
|
18
|
+
export { _ as OrCode, O as OrCodeLanguages } from '../OrCode-fc6876ec.js';
|
|
19
19
|
export { O as OrCollapse } from '../OrCollapse-3aa9a9b7.js';
|
|
20
20
|
export { _ 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-a1a37e83.js';
|
|
21
21
|
export { _ as OrConfirm } from '../OrConfirm-56d01cff.js';
|
|
@@ -24,6 +24,7 @@ export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemType
|
|
|
24
24
|
export { O as OrError } from '../OrError-31503e4c.js';
|
|
25
25
|
export { _ as OrErrorTagV3 } from '../OrErrorTag-d0c5bcf4.js';
|
|
26
26
|
export { O as OrErrorV3 } from '../OrError-aad17598.js';
|
|
27
|
+
export { E as EmptyStateSize, _ as OrEmptyStateV3 } from '../OrEmptyState-9fb413f9.js';
|
|
27
28
|
export { a as ExpansionPanelColor, E as ExpansionPanelVariant, O as OrExpansionPanelV3 } from '../OrExpansionPanel-995caa85.js';
|
|
28
29
|
export { F as FabColor, _ as OrFabV3 } from '../OrFab-7cc75893.js';
|
|
29
30
|
export { O as OrFloating, b as OrFloatingHideStrategy, a as OrFloatingPlacements } from '../OrFloating-554d6f58.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
import { EmptyStateSize } from '
|
|
2
|
+
import { EmptyStateSize } from './props';
|
|
3
3
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
4
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
5
5
|
rootClasses: import("@vue/composition-api").ComputedRef<string[]>;
|
|
@@ -1,161 +1,5 @@
|
|
|
1
|
+
export { E as EmptyStateSize, _ as OrEmptyStateV3 } from '../../OrEmptyState-9fb413f9.js';
|
|
1
2
|
import '../../index-fa6eb4ca.js';
|
|
2
|
-
import { defineComponent, ref, computed } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
3
|
-
import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
|
|
4
3
|
import 'vue';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
(function (EmptyStateSize) {
|
|
8
|
-
EmptyStateSize["L"] = "l";
|
|
9
|
-
EmptyStateSize["M"] = "m";
|
|
10
|
-
})(EmptyStateSize || (EmptyStateSize = {}));
|
|
11
|
-
|
|
12
|
-
const EmptyStateRoot = [
|
|
13
|
-
// Layout
|
|
14
|
-
'grow', 'flex', 'flex-col', 'justify-center', 'items-center',
|
|
15
|
-
// Box
|
|
16
|
-
'w-full',
|
|
17
|
-
// Sizing
|
|
18
|
-
'gap-sm'];
|
|
19
|
-
const EmptyStateImage = [
|
|
20
|
-
// Sizing
|
|
21
|
-
'mb-sm'];
|
|
22
|
-
const EmptyStateImageSizes = {
|
|
23
|
-
[EmptyStateSize.L]: [
|
|
24
|
-
// Box
|
|
25
|
-
'h-3xl'],
|
|
26
|
-
[EmptyStateSize.M]: [
|
|
27
|
-
// Box
|
|
28
|
-
'h-2xl']
|
|
29
|
-
};
|
|
30
|
-
const EmptyStateHeading = [
|
|
31
|
-
// Theme
|
|
32
|
-
'theme-foreground-default', 'dark:theme-foreground-default-dark'];
|
|
33
|
-
const EmptyStateHeadingSizes = {
|
|
34
|
-
[EmptyStateSize.L]: [
|
|
35
|
-
// Typography
|
|
36
|
-
'typography-headline-2'],
|
|
37
|
-
[EmptyStateSize.M]: [
|
|
38
|
-
// Typography
|
|
39
|
-
'typography-headline-4']
|
|
40
|
-
};
|
|
41
|
-
const EmptyStateText = ['text-center',
|
|
42
|
-
// Theme
|
|
43
|
-
'text-outline', 'dark:text-outline-dark'];
|
|
44
|
-
const EmptyStateContent = EmptyStateText;
|
|
45
|
-
const EmptyStateTextSizes = {
|
|
46
|
-
[EmptyStateSize.L]: [
|
|
47
|
-
// Typography
|
|
48
|
-
'typography-body-2-regular'],
|
|
49
|
-
[EmptyStateSize.M]: [
|
|
50
|
-
// Typography
|
|
51
|
-
'typography-caption-regular']
|
|
52
|
-
};
|
|
53
|
-
const EmptyStateContentSizes = EmptyStateTextSizes;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* The component to display when there is no content on a page,
|
|
57
|
-
* no records found or selected, or while the data is being loaded.
|
|
58
|
-
* Provides a hint to the user on what to do.
|
|
59
|
-
* Consists of text message, optional icon and optional loader.
|
|
60
|
-
*/
|
|
61
|
-
var script = defineComponent({
|
|
62
|
-
name: 'OrEmptyState',
|
|
63
|
-
props: {
|
|
64
|
-
/**
|
|
65
|
-
* Size of the component, affects font and icon size.
|
|
66
|
-
* Use Large if the component takes all screen space,
|
|
67
|
-
* and Medium if it is a part of the complex layout.
|
|
68
|
-
*/
|
|
69
|
-
size: {
|
|
70
|
-
type: String,
|
|
71
|
-
default: EmptyStateSize.M
|
|
72
|
-
},
|
|
73
|
-
/**
|
|
74
|
-
* The heading of the empty state block.
|
|
75
|
-
*/
|
|
76
|
-
heading: {
|
|
77
|
-
type: String,
|
|
78
|
-
default: ''
|
|
79
|
-
},
|
|
80
|
-
/**
|
|
81
|
-
* Additional text such as a hint for a user with proposed next steps.
|
|
82
|
-
*/
|
|
83
|
-
text: {
|
|
84
|
-
type: String,
|
|
85
|
-
default: ''
|
|
86
|
-
},
|
|
87
|
-
/**
|
|
88
|
-
* Path to the image to display above the heading.
|
|
89
|
-
* Image height is fixed depending on `size` prop, width is undefined to preserve aspect ratio.
|
|
90
|
-
*/
|
|
91
|
-
imageSrc: {
|
|
92
|
-
type: String,
|
|
93
|
-
default: undefined
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
setup(props) {
|
|
97
|
-
const root = ref();
|
|
98
|
-
const rootClasses = computed(() => ['or-empty-state', ...EmptyStateRoot]);
|
|
99
|
-
const imageClasses = computed(() => ['or-empty-state_image', ...EmptyStateImage, ...EmptyStateImageSizes[props.size]]);
|
|
100
|
-
const headingClasses = computed(() => ['or-empty-state_heading', ...EmptyStateHeading, ...EmptyStateHeadingSizes[props.size]]);
|
|
101
|
-
const textClasses = computed(() => ['or-empty-state_text', ...EmptyStateText, ...EmptyStateTextSizes[props.size]]);
|
|
102
|
-
const slotClasses = computed(() => ['or-empty-state_content', ...EmptyStateContent, ...EmptyStateContentSizes[props.size]]);
|
|
103
|
-
return {
|
|
104
|
-
root,
|
|
105
|
-
rootClasses,
|
|
106
|
-
imageClasses,
|
|
107
|
-
headingClasses,
|
|
108
|
-
textClasses,
|
|
109
|
-
slotClasses
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
/* script */
|
|
115
|
-
const __vue_script__ = script;
|
|
116
|
-
|
|
117
|
-
/* template */
|
|
118
|
-
var __vue_render__ = function () {
|
|
119
|
-
var _vm = this;
|
|
120
|
-
var _h = _vm.$createElement;
|
|
121
|
-
var _c = _vm._self._c || _h;
|
|
122
|
-
return _c('div', {
|
|
123
|
-
ref: "root",
|
|
124
|
-
class: _vm.rootClasses
|
|
125
|
-
}, [_vm.imageSrc ? _c('img', {
|
|
126
|
-
class: _vm.imageClasses,
|
|
127
|
-
attrs: {
|
|
128
|
-
"src": _vm.imageSrc,
|
|
129
|
-
"alt": ""
|
|
130
|
-
}
|
|
131
|
-
}) : _vm._e(), _vm._v(" "), _c('div', {
|
|
132
|
-
class: _vm.headingClasses
|
|
133
|
-
}, [_vm._v("\n " + _vm._s(_vm.heading) + "\n ")]), _vm._v(" "), _vm.$slots.default ? _c('div', {
|
|
134
|
-
class: _vm.slotClasses
|
|
135
|
-
}, [_vm._t("default")], 2) : _vm._e(), _vm._v(" "), _c('div', {
|
|
136
|
-
class: _vm.textClasses
|
|
137
|
-
}, [_vm._v("\n " + _vm._s(_vm.text) + "\n ")])]);
|
|
138
|
-
};
|
|
139
|
-
var __vue_staticRenderFns__ = [];
|
|
140
|
-
|
|
141
|
-
/* style */
|
|
142
|
-
const __vue_inject_styles__ = undefined;
|
|
143
|
-
/* scoped */
|
|
144
|
-
const __vue_scope_id__ = undefined;
|
|
145
|
-
/* module identifier */
|
|
146
|
-
const __vue_module_identifier__ = undefined;
|
|
147
|
-
/* functional template */
|
|
148
|
-
const __vue_is_functional_template__ = false;
|
|
149
|
-
/* style inject */
|
|
150
|
-
|
|
151
|
-
/* style inject SSR */
|
|
152
|
-
|
|
153
|
-
/* style inject shadow dom */
|
|
154
|
-
|
|
155
|
-
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
156
|
-
render: __vue_render__,
|
|
157
|
-
staticRenderFns: __vue_staticRenderFns__
|
|
158
|
-
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
159
|
-
var __vue_component__$1 = __vue_component__;
|
|
160
|
-
|
|
161
|
-
export { EmptyStateSize, __vue_component__$1 as OrEmptyStateV3 };
|
|
4
|
+
import '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
5
|
+
import '../../normalize-component-6e8e3d80.js';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
import { InputBoxVariant } from '
|
|
3
|
-
import { InputBoxSize } from './props';
|
|
2
|
+
import { InputBoxSize, InputBoxVariant } from './props';
|
|
4
3
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
5
4
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
6
5
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
package/dist/bundled/v2/index.js
CHANGED
|
@@ -20,7 +20,7 @@ export { O as OrCheckbox } from './OrCheckbox-4cbddd67.js';
|
|
|
20
20
|
export { O as OrCheckboxV3 } from './OrCheckbox-dbef9f9a.js';
|
|
21
21
|
export { O as OrChip } from './OrChip-000fe7b5.js';
|
|
22
22
|
export { _ as OrChips } from './OrChips-890b8476.js';
|
|
23
|
-
export { _ as OrCode, O as OrCodeLanguages } from './OrCode-
|
|
23
|
+
export { _ as OrCode, O as OrCodeLanguages } from './OrCode-fc6876ec.js';
|
|
24
24
|
export { O as OrCollapse } from './OrCollapse-3aa9a9b7.js';
|
|
25
25
|
export { _ 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-a1a37e83.js';
|
|
26
26
|
export { _ as OrConfirm } from './OrConfirm-56d01cff.js';
|
|
@@ -29,6 +29,7 @@ export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemType
|
|
|
29
29
|
export { O as OrError } from './OrError-31503e4c.js';
|
|
30
30
|
export { _ as OrErrorTagV3 } from './OrErrorTag-d0c5bcf4.js';
|
|
31
31
|
export { O as OrErrorV3 } from './OrError-aad17598.js';
|
|
32
|
+
export { E as EmptyStateSize, _ as OrEmptyStateV3 } from './OrEmptyState-9fb413f9.js';
|
|
32
33
|
export { a as ExpansionPanelColor, E as ExpansionPanelVariant, O as OrExpansionPanelV3 } from './OrExpansionPanel-995caa85.js';
|
|
33
34
|
export { F as FabColor, _ as OrFabV3 } from './OrFab-7cc75893.js';
|
|
34
35
|
export { O as OrFloating, b as OrFloatingHideStrategy, a as OrFloatingPlacements } from './OrFloating-554d6f58.js';
|
|
@@ -17855,7 +17855,11 @@ 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
|
|
17858
|
+
let {
|
|
17859
|
+
state
|
|
17860
|
+
} = target,
|
|
17861
|
+
line = state.doc.lineAt(state.selection.main.head),
|
|
17862
|
+
config = getConfig(target.state, line.from);
|
|
17859
17863
|
return config.line ? toggleLineComment(target) : config.block ? toggleBlockCommentByLine(target) : false;
|
|
17860
17864
|
};
|
|
17861
17865
|
function command(f, option) {
|
|
@@ -17889,7 +17893,7 @@ Comment or uncomment the lines around the current selection using
|
|
|
17889
17893
|
block comments.
|
|
17890
17894
|
*/
|
|
17891
17895
|
const toggleBlockCommentByLine = /*@__PURE__*/command((o, s) => changeBlockComment(o, s, selectedLineRanges(s)), 0 /* CommentOption.Toggle */);
|
|
17892
|
-
function getConfig(state, pos
|
|
17896
|
+
function getConfig(state, pos) {
|
|
17893
17897
|
let data = state.languageDataAt("commentTokens", pos);
|
|
17894
17898
|
return data.length ? data[0] : {};
|
|
17895
17899
|
}
|
|
@@ -18011,7 +18015,7 @@ function changeLineComment(option, state, ranges = state.selection.ranges) {
|
|
|
18011
18015
|
let line = state.doc.lineAt(pos);
|
|
18012
18016
|
if (line.from > prevLine && (from == to || to > line.from)) {
|
|
18013
18017
|
prevLine = line.from;
|
|
18014
|
-
let token = getConfig(state,
|
|
18018
|
+
let token = getConfig(state, line.from).line;
|
|
18015
18019
|
if (!token) continue;
|
|
18016
18020
|
let indent = /^\s*/.exec(line.text)[0].length;
|
|
18017
18021
|
let empty = indent == line.length;
|
|
@@ -18508,24 +18512,48 @@ const cursorLineUp = view => cursorByLine(view, false);
|
|
|
18508
18512
|
Move the selection one line down.
|
|
18509
18513
|
*/
|
|
18510
18514
|
const cursorLineDown = view => cursorByLine(view, true);
|
|
18511
|
-
function
|
|
18512
|
-
|
|
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
|
+
};
|
|
18513
18536
|
}
|
|
18514
18537
|
function cursorByPage(view, forward) {
|
|
18538
|
+
let page = pageInfo(view);
|
|
18515
18539
|
let {
|
|
18516
18540
|
state
|
|
18517
18541
|
} = view,
|
|
18518
18542
|
selection = updateSel(state.selection, range => {
|
|
18519
|
-
return range.empty ? view.moveVertically(range, forward,
|
|
18543
|
+
return range.empty ? view.moveVertically(range, forward, page.height) : rangeEnd(range, forward);
|
|
18520
18544
|
});
|
|
18521
18545
|
if (selection.eq(state.selection)) return false;
|
|
18522
|
-
let startPos = view.coordsAtPos(state.selection.main.head);
|
|
18523
|
-
let scrollRect = view.scrollDOM.getBoundingClientRect();
|
|
18524
18546
|
let effect;
|
|
18525
|
-
if (
|
|
18526
|
-
|
|
18527
|
-
|
|
18528
|
-
|
|
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
|
+
}
|
|
18529
18557
|
view.dispatch(setSel(state, selection), {
|
|
18530
18558
|
effects: effect
|
|
18531
18559
|
});
|
|
@@ -18651,7 +18679,7 @@ Move the selection head one line down.
|
|
|
18651
18679
|
*/
|
|
18652
18680
|
const selectLineDown = view => selectByLine(view, true);
|
|
18653
18681
|
function selectByPage(view, forward) {
|
|
18654
|
-
return extendSel(view, range => view.moveVertically(range, forward,
|
|
18682
|
+
return extendSel(view, range => view.moveVertically(range, forward, pageInfo(view).height));
|
|
18655
18683
|
}
|
|
18656
18684
|
/**
|
|
18657
18685
|
Move the selection head one page up.
|
|
@@ -19586,6 +19614,17 @@ const defaultKeymap = /*@__PURE__*/[{
|
|
|
19586
19614
|
key: "Alt-A",
|
|
19587
19615
|
run: toggleBlockComment
|
|
19588
19616
|
}].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
|
+
};
|
|
19589
19628
|
|
|
19590
19629
|
function crelt() {
|
|
19591
19630
|
var elt = arguments[0];
|
|
@@ -29506,7 +29545,7 @@ var script = defineComponent({
|
|
|
29506
29545
|
}
|
|
29507
29546
|
}),
|
|
29508
29547
|
// line wrapping
|
|
29509
|
-
lineWrapping ? EditorView.lineWrapping : undefined]);
|
|
29548
|
+
lineWrapping ? EditorView.lineWrapping : undefined, keymap.of([indentWithTab])]);
|
|
29510
29549
|
// Append Extensions (such as basic-setup)
|
|
29511
29550
|
if (this.extensions.length !== 0) _.merge(ext, this.extensions);
|
|
29512
29551
|
return ext;
|