@onereach/ui-components 2.68.0-beta.2002.0 → 2.68.0-beta.2008.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.
- package/dist/bundled/v2/{OrCode-0cd991a1.js → OrCode-b9332066.js} +1 -1
- package/dist/bundled/v2/{OrConfirm-56d01cff.js → OrConfirm-19758dae.js} +1 -1
- package/dist/bundled/v2/OrModal-71d33219.js +202 -0
- package/dist/bundled/v2/{OrRichTextEditor-898d67d5.js → OrRichTextEditor-4a41e294.js} +14 -10
- package/dist/bundled/v2/components/index.js +5 -4
- package/dist/bundled/v2/components/or-code/index.js +3 -2
- package/dist/bundled/v2/components/or-confirm/index.js +3 -2
- package/dist/bundled/v2/components/or-modal/index.js +2 -1
- package/dist/bundled/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +5 -5
- package/dist/bundled/v2/components/or-rich-text-editor-v3/index.js +3 -2
- package/dist/bundled/v2/index.js +5 -4
- package/dist/bundled/{v3/OrModal.vue_vue_type_script_lang-a1ed2ebb.js → v2/useFocusTrap-d744652a.js} +4 -126
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-6c5f94a6.js → OrCode.vue_vue_type_script_lang-5fe573eb.js} +2 -2
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-0f16fc67.js → OrConfirm.vue_vue_type_script_lang-4451e782.js} +2 -2
- package/dist/bundled/v3/{OrModal-868160ef.js → OrModal-bbabef06.js} +1 -1
- package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-a599dfe7.js +128 -0
- package/dist/bundled/v3/{OrRichTextEditor.vue_vue_type_script_lang-2e607f79.js → OrRichTextEditor.vue_vue_type_script_lang-f5d3e39b.js} +13 -9
- package/dist/bundled/v3/components/index.js +6 -5
- package/dist/bundled/v3/components/or-code/index.js +4 -3
- package/dist/bundled/v3/components/or-confirm/index.js +4 -3
- package/dist/bundled/v3/components/or-modal/index.js +2 -1
- package/dist/bundled/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +5 -5
- package/dist/bundled/v3/components/or-rich-text-editor-v3/index.js +3 -2
- package/dist/bundled/v3/index.js +9 -8
- package/dist/bundled/{v2/OrModal-a5411b0d.js → v3/useFocusTrap-d21726e3.js} +3 -200
- package/dist/esm/v2/{OrRichTextEditor-6bc37dc4.js → OrRichTextEditor-11967cd9.js} +14 -10
- package/dist/esm/v2/components/index.js +1 -1
- package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +5 -5
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +2 -1
- package/dist/esm/v2/index.js +1 -1
- package/dist/esm/v3/{OrRichTextEditor-a5d38e89.js → OrRichTextEditor-ad5f24ba.js} +13 -9
- package/dist/esm/v3/components/index.js +1 -1
- package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +5 -5
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +2 -1
- package/dist/esm/v3/index.js +1 -1
- package/package.json +1 -1
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +17 -11
|
@@ -4,7 +4,7 @@ import _ from 'lodash';
|
|
|
4
4
|
import './index-fa6eb4ca.js';
|
|
5
5
|
import { O as OrTeleport } from './OrTeleportVue2-3544f185.js';
|
|
6
6
|
import { O as OrIconButton } from './OrIconButton-65962c1c.js';
|
|
7
|
-
import { O as OrModal } from './OrModal-
|
|
7
|
+
import { O as OrModal } from './OrModal-71d33219.js';
|
|
8
8
|
import { O as OrError } from './OrError-31503e4c.js';
|
|
9
9
|
import { O as OrHint } from './OrHint-fabea4cf.js';
|
|
10
10
|
import { O as OrLabel } from './OrLabel-74c73ba4.js';
|
|
@@ -2,7 +2,7 @@ import './index-fa6eb4ca.js';
|
|
|
2
2
|
import { useMagicKeys, useActiveElement, whenever } from '@vueuse/core';
|
|
3
3
|
import { l as logicAnd } from './index-17f264f9.js';
|
|
4
4
|
import { O as OrButton } from './OrButton-705cd0bd.js';
|
|
5
|
-
import { O as OrModal, a as OrModalSizes } from './OrModal-
|
|
5
|
+
import { O as OrModal, a as OrModalSizes } from './OrModal-71d33219.js';
|
|
6
6
|
import { O as OrInput } from './OrInput-08f2f666.js';
|
|
7
7
|
import { a as BUTTON_COLOR } from './constants-c5d1139f.js';
|
|
8
8
|
import { defineComponent, ref, computed } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import './index-fa6eb4ca.js';
|
|
2
|
+
import _ from 'lodash';
|
|
3
|
+
import { onClickOutside } from '@vueuse/core';
|
|
4
|
+
import { u as useFocusTrap } from './useFocusTrap-d744652a.js';
|
|
5
|
+
import { O as OrIconButton } from './OrIconButton-65962c1c.js';
|
|
6
|
+
import { O as OrOverlay } from './OrOverlay-47967a8b.js';
|
|
7
|
+
import { defineComponent, ref, watch, onBeforeUnmount } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
8
|
+
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
9
|
+
import { c as createInjector } from './browser-82dea9ed.js';
|
|
10
|
+
|
|
11
|
+
var OrModalSizes;
|
|
12
|
+
(function (OrModalSizes) {
|
|
13
|
+
OrModalSizes["tiny"] = "tiny";
|
|
14
|
+
OrModalSizes["small"] = "small";
|
|
15
|
+
OrModalSizes["medium"] = "medium";
|
|
16
|
+
OrModalSizes["large"] = "large";
|
|
17
|
+
OrModalSizes["fullScreen"] = "fullScreen";
|
|
18
|
+
})(OrModalSizes || (OrModalSizes = {}));
|
|
19
|
+
|
|
20
|
+
var script = defineComponent({
|
|
21
|
+
name: 'OrModal',
|
|
22
|
+
components: {
|
|
23
|
+
OrIconButton,
|
|
24
|
+
OrOverlay
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
titleText: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: false,
|
|
30
|
+
default: null,
|
|
31
|
+
validator: _.isString
|
|
32
|
+
},
|
|
33
|
+
showClose: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: true,
|
|
36
|
+
validator: _.isBoolean
|
|
37
|
+
},
|
|
38
|
+
closeOnClickOutside: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
required: false,
|
|
41
|
+
default: false,
|
|
42
|
+
validator: _.isBoolean
|
|
43
|
+
},
|
|
44
|
+
size: {
|
|
45
|
+
type: String,
|
|
46
|
+
required: false,
|
|
47
|
+
default: OrModalSizes.small
|
|
48
|
+
},
|
|
49
|
+
isOpen: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
required: true,
|
|
52
|
+
validator: _.isBoolean
|
|
53
|
+
},
|
|
54
|
+
isWithoutOverlay: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
required: false,
|
|
57
|
+
default: false,
|
|
58
|
+
validator: _.isBoolean
|
|
59
|
+
},
|
|
60
|
+
trapFocus: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: true,
|
|
63
|
+
validator: _.isBoolean
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
emits: ['close'],
|
|
67
|
+
setup(props, {
|
|
68
|
+
emit
|
|
69
|
+
}) {
|
|
70
|
+
const overlay = ref();
|
|
71
|
+
let container = ref(null);
|
|
72
|
+
let trap = useFocusTrap(container, {
|
|
73
|
+
immediate: props.trapFocus,
|
|
74
|
+
fallbackFocus: '.container',
|
|
75
|
+
allowOutsideClick: true
|
|
76
|
+
});
|
|
77
|
+
const handleClose = () => emit('close');
|
|
78
|
+
onClickOutside(container, evt => {
|
|
79
|
+
if (!evt.composedPath().includes(overlay.value.$el)) return;
|
|
80
|
+
if (props.closeOnClickOutside) handleClose();
|
|
81
|
+
});
|
|
82
|
+
const toggleFocusTrap = isNeedToTrap => {
|
|
83
|
+
if (isNeedToTrap && props.isOpen) {
|
|
84
|
+
trap.activate();
|
|
85
|
+
} else {
|
|
86
|
+
trap === null || trap === void 0 ? void 0 : trap.deactivate();
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
watch(() => props.trapFocus, toggleFocusTrap, {
|
|
90
|
+
immediate: true
|
|
91
|
+
});
|
|
92
|
+
watch(() => props.isOpen, isOpen => {
|
|
93
|
+
toggleFocusTrap(false);
|
|
94
|
+
if (isOpen) {
|
|
95
|
+
container = ref(null);
|
|
96
|
+
} else {
|
|
97
|
+
trap === null || trap === void 0 ? void 0 : trap.deactivate();
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
onBeforeUnmount(() => {
|
|
101
|
+
trap === null || trap === void 0 ? void 0 : trap.deactivate();
|
|
102
|
+
});
|
|
103
|
+
return {
|
|
104
|
+
container,
|
|
105
|
+
overlay,
|
|
106
|
+
handleClose
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
computed: {
|
|
110
|
+
sizeClass() {
|
|
111
|
+
return `is-${this.size}`;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
/* script */
|
|
117
|
+
const __vue_script__ = script;
|
|
118
|
+
|
|
119
|
+
/* template */
|
|
120
|
+
var __vue_render__ = function () {
|
|
121
|
+
var _vm = this;
|
|
122
|
+
var _h = _vm.$createElement;
|
|
123
|
+
var _c = _vm._self._c || _h;
|
|
124
|
+
return _vm.isOpen ? _c('div', {
|
|
125
|
+
staticClass: "or-modal"
|
|
126
|
+
}, [_c('or-overlay', {
|
|
127
|
+
ref: "overlay",
|
|
128
|
+
attrs: {
|
|
129
|
+
"is-active": "",
|
|
130
|
+
"is-without-background": _vm.isWithoutOverlay
|
|
131
|
+
}
|
|
132
|
+
}, [_c('div', {
|
|
133
|
+
ref: "container",
|
|
134
|
+
class: [_vm.sizeClass, 'container', {
|
|
135
|
+
'is-without-overlay': _vm.isWithoutOverlay
|
|
136
|
+
}]
|
|
137
|
+
}, [_vm._t("header", function () {
|
|
138
|
+
return [_c('div', {
|
|
139
|
+
staticClass: "header"
|
|
140
|
+
}, [_vm._t("title", function () {
|
|
141
|
+
return [_c('div', {
|
|
142
|
+
staticClass: "title"
|
|
143
|
+
}, [_vm._v("\n " + _vm._s(_vm.titleText) + "\n ")])];
|
|
144
|
+
}), _vm._v(" "), _c('or-icon-button', {
|
|
145
|
+
directives: [{
|
|
146
|
+
name: "show",
|
|
147
|
+
rawName: "v-show",
|
|
148
|
+
value: _vm.showClose,
|
|
149
|
+
expression: "showClose"
|
|
150
|
+
}],
|
|
151
|
+
attrs: {
|
|
152
|
+
"icon": "close",
|
|
153
|
+
"icon-color": "neutral-6"
|
|
154
|
+
},
|
|
155
|
+
on: {
|
|
156
|
+
"click": _vm.handleClose
|
|
157
|
+
}
|
|
158
|
+
})], 2)];
|
|
159
|
+
}), _vm._v(" "), _vm._t("content", function () {
|
|
160
|
+
return [_c('div', {
|
|
161
|
+
staticClass: "content"
|
|
162
|
+
}, [_vm._t("default")], 2)];
|
|
163
|
+
}), _vm._v(" "), _c('div', {
|
|
164
|
+
directives: [{
|
|
165
|
+
name: "show",
|
|
166
|
+
rawName: "v-show",
|
|
167
|
+
value: _vm.$slots.footer,
|
|
168
|
+
expression: "$slots.footer"
|
|
169
|
+
}],
|
|
170
|
+
staticClass: "footer"
|
|
171
|
+
}, [_vm._t("footer", null, {
|
|
172
|
+
"close": _vm.handleClose
|
|
173
|
+
})], 2)], 2)])], 1) : _vm._e();
|
|
174
|
+
};
|
|
175
|
+
var __vue_staticRenderFns__ = [];
|
|
176
|
+
|
|
177
|
+
/* style */
|
|
178
|
+
const __vue_inject_styles__ = function (inject) {
|
|
179
|
+
if (!inject) return;
|
|
180
|
+
inject("data-v-1caff449_0", {
|
|
181
|
+
source: "@keyframes spinAround-data-v-1caff449{from{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes fade-data-v-1caff449{from{opacity:1}to{opacity:0}}.or-modal[data-v-1caff449]{position:fixed;top:0;left:0;z-index:50;width:100%;height:100%}.or-modal .or-overlay[data-v-1caff449]{align-items:center;justify-content:center}.or-modal .container[data-v-1caff449]{position:absolute;display:flex;flex-flow:column;max-width:100%;max-height:80%;background-color:var(--c-neutral-0);border-radius:var(--s-2);outline:0}.or-modal .container.is-without-overlay[data-v-1caff449]{box-shadow:0 .125rem .5rem 0 rgba(0,0,0,.1)}.or-modal .container.is-fullScreen[data-v-1caff449]{width:calc(100% - var(--s-7));height:calc(100% - var(--s-7));max-height:calc(100% - var(--s-7));margin:0 auto}.or-modal .container.is-tiny[data-v-1caff449]{width:320px}.or-modal .container.is-small[data-v-1caff449]{width:480px}.or-modal .container.is-medium[data-v-1caff449]{width:700px}.or-modal .container.is-large[data-v-1caff449]{width:1049px}.or-modal .container .header[data-v-1caff449]{display:flex;justify-content:space-between;padding:24px 24px 20px 24px;border-radius:var(--s-2) var(--s-2) 0 0}.or-modal .container .header .title[data-v-1caff449]{font-size:1.125rem;font-weight:700}.or-modal .container .content[data-v-1caff449]{flex-grow:1;padding:0 24px 24px 24px;overflow:auto}.or-modal .container .footer[data-v-1caff449]{padding:16px 24px 24px 24px;border-radius:0 0 var(--s-2) var(--s-2);box-shadow:0 -3px 4px 0 rgba(0,0,0,.08)}",
|
|
182
|
+
map: undefined,
|
|
183
|
+
media: undefined
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
/* scoped */
|
|
187
|
+
const __vue_scope_id__ = "data-v-1caff449";
|
|
188
|
+
/* module identifier */
|
|
189
|
+
const __vue_module_identifier__ = undefined;
|
|
190
|
+
/* functional template */
|
|
191
|
+
const __vue_is_functional_template__ = false;
|
|
192
|
+
/* style inject SSR */
|
|
193
|
+
|
|
194
|
+
/* style inject shadow dom */
|
|
195
|
+
|
|
196
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
197
|
+
render: __vue_render__,
|
|
198
|
+
staticRenderFns: __vue_staticRenderFns__
|
|
199
|
+
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, createInjector, undefined, undefined);
|
|
200
|
+
var OrModal = __vue_component__;
|
|
201
|
+
|
|
202
|
+
export { OrModal as O, OrModalSizes as a };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import './index-fa6eb4ca.js';
|
|
2
|
+
import { u as useFocusTrap } from './useFocusTrap-d744652a.js';
|
|
2
3
|
import require$$8 from 'node:punycode';
|
|
3
4
|
import { k as keyName, b as base } from './index.es-3f39f316.js';
|
|
4
5
|
import { O as OrIconButton } from './OrIconButton-2bf36347.js';
|
|
@@ -36398,7 +36399,7 @@ var script = defineComponent({
|
|
|
36398
36399
|
},
|
|
36399
36400
|
description: {
|
|
36400
36401
|
type: String,
|
|
36401
|
-
default: '
|
|
36402
|
+
default: ''
|
|
36402
36403
|
},
|
|
36403
36404
|
placeholder: {
|
|
36404
36405
|
type: String,
|
|
@@ -36408,7 +36409,7 @@ var script = defineComponent({
|
|
|
36408
36409
|
type: Boolean,
|
|
36409
36410
|
default: false
|
|
36410
36411
|
},
|
|
36411
|
-
|
|
36412
|
+
markdownFormat: {
|
|
36412
36413
|
type: Boolean,
|
|
36413
36414
|
default: true
|
|
36414
36415
|
}
|
|
@@ -36428,6 +36429,11 @@ var script = defineComponent({
|
|
|
36428
36429
|
const previousHeadingLevel = ref();
|
|
36429
36430
|
const activeHeadingLevel = ref(0);
|
|
36430
36431
|
const markdownOutput = ref('');
|
|
36432
|
+
let trap = useFocusTrap(editorRef, {
|
|
36433
|
+
immediate: true,
|
|
36434
|
+
fallbackFocus: '.container',
|
|
36435
|
+
allowOutsideClick: true
|
|
36436
|
+
});
|
|
36431
36437
|
const iconsEnum = ref({
|
|
36432
36438
|
bold: 'format_bold',
|
|
36433
36439
|
italic: 'format_italic',
|
|
@@ -36499,7 +36505,7 @@ var script = defineComponent({
|
|
|
36499
36505
|
setActiveFormats();
|
|
36500
36506
|
const html = editor.getHTML();
|
|
36501
36507
|
const text = editor.getText();
|
|
36502
|
-
if (props.
|
|
36508
|
+
if (props.markdownFormat) {
|
|
36503
36509
|
markdownOutput.value = serialize(editor.schema, editor.getJSON());
|
|
36504
36510
|
emit('update:modelValue', markdownOutput.value);
|
|
36505
36511
|
} else {
|
|
@@ -36509,10 +36515,8 @@ var script = defineComponent({
|
|
|
36509
36515
|
onCreate: ({
|
|
36510
36516
|
editor
|
|
36511
36517
|
}) => {
|
|
36512
|
-
if (props.
|
|
36518
|
+
if (props.markdownFormat) {
|
|
36513
36519
|
const deserialized = deserialize(editor.schema, props.modelValue);
|
|
36514
|
-
// const deserialized = defaultMarkdownParser.parse(props.modelValue);
|
|
36515
|
-
// editor.view.state.doc = deserialized as Node;
|
|
36516
36520
|
editor.commands.setContent(deserialized);
|
|
36517
36521
|
} else {
|
|
36518
36522
|
editor.commands.setContent(props.modelValue);
|
|
@@ -36558,6 +36562,7 @@ var script = defineComponent({
|
|
|
36558
36562
|
onBeforeUnmount(() => {
|
|
36559
36563
|
editor === null || editor === void 0 ? void 0 : editor.destroy();
|
|
36560
36564
|
});
|
|
36565
|
+
trap.activate();
|
|
36561
36566
|
// Computed
|
|
36562
36567
|
const getIndexOfHeading = computed(() => {
|
|
36563
36568
|
return props.toolbar.flat().indexOf('heading');
|
|
@@ -36659,7 +36664,6 @@ var script = defineComponent({
|
|
|
36659
36664
|
return serializer.serialize(proseMirrorDocument);
|
|
36660
36665
|
};
|
|
36661
36666
|
const deserialize = (schema, content) => {
|
|
36662
|
-
// const html = defaultMarkdownParser.parse(content);
|
|
36663
36667
|
const html = marked.parse(content);
|
|
36664
36668
|
if (!html) return null;
|
|
36665
36669
|
const parser = new DOMParser();
|
|
@@ -36673,10 +36677,10 @@ var script = defineComponent({
|
|
|
36673
36677
|
};
|
|
36674
36678
|
//Effects
|
|
36675
36679
|
watch(() => props.modelValue, value => {
|
|
36676
|
-
if (value !== (editor === null || editor === void 0 ? void 0 : editor.getHTML()) && !props.
|
|
36680
|
+
if (value !== (editor === null || editor === void 0 ? void 0 : editor.getHTML()) && !props.markdownFormat) {
|
|
36677
36681
|
editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
|
|
36678
36682
|
}
|
|
36679
|
-
if (props.
|
|
36683
|
+
if (props.markdownFormat && value !== markdownOutput.value) {
|
|
36680
36684
|
editor === null || editor === void 0 ? void 0 : editor.commands.setContent(markdownOutput.value);
|
|
36681
36685
|
}
|
|
36682
36686
|
});
|
|
@@ -36803,7 +36807,7 @@ var __vue_staticRenderFns__ = [];
|
|
|
36803
36807
|
/* style */
|
|
36804
36808
|
const __vue_inject_styles__ = function (inject) {
|
|
36805
36809
|
if (!inject) return;
|
|
36806
|
-
inject("data-v-
|
|
36810
|
+
inject("data-v-2c13389b_0", {
|
|
36807
36811
|
source: ".tiptap-editor ol{margin:0 24px;list-style:decimal}.tiptap-editor ul{margin:0 24px;list-style:initial}.tiptap-editor .is-editor-empty::before{content:attr(data-placeholder);height:0;pointer-events:none;float:left}",
|
|
36808
36812
|
map: undefined,
|
|
36809
36813
|
media: undefined
|
|
@@ -15,10 +15,10 @@ export { O as OrCheckbox } from '../OrCheckbox-f97a57b9.js';
|
|
|
15
15
|
export { O as OrCheckboxV3 } from '../OrCheckbox-5b499fc5.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-b9332066.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
|
-
export { _ as OrConfirm } from '../OrConfirm-
|
|
21
|
+
export { _ as OrConfirm } from '../OrConfirm-19758dae.js';
|
|
22
22
|
export { C as ConfirmType, _ as OrConfirmV3 } from '../OrConfirm-22c7622d.js';
|
|
23
23
|
export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker-e212f892.js';
|
|
24
24
|
export { O as OrError } from '../OrError-31503e4c.js';
|
|
@@ -51,7 +51,7 @@ export { a as LoaderColor, b as LoaderSize, L as LoaderVariant, O as OrLoaderV3
|
|
|
51
51
|
export { O as OrMenuItemV3 } from '../OrMenuItem-f89dfc77.js';
|
|
52
52
|
export { O as OrMenuV3 } from '../OrMenu-5ac06751.js';
|
|
53
53
|
export { P as MenuPlacement, O as OrPopoverV3, P as PopoverPlacement, a as PopoverVariant, P as TooltipPlacement } from '../OrPopover-2f48b854.js';
|
|
54
|
-
export { O as OrModal, a as OrModalSizes } from '../OrModal-
|
|
54
|
+
export { O as OrModal, a as OrModalSizes } from '../OrModal-71d33219.js';
|
|
55
55
|
export { M as ModalSize, _ as OrModalV3 } from '../OrModal-387348ca.js';
|
|
56
56
|
export { a as OR_NOTIFICATION_SIZE, O as OR_NOTIFICATION_TYPE, _ as OrNotification } from '../OrNotification-3909aaf2.js';
|
|
57
57
|
export { N as NotificationVariant, _ as OrNotificationV3 } from '../OrNotification-1fa0b14e.js';
|
|
@@ -95,7 +95,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from '../useToast-3a3d
|
|
|
95
95
|
export { O as OrTooltip } from '../OrTooltip-dfea7af2.js';
|
|
96
96
|
export { O as OrTooltipContent } from '../OrTooltipContent-f0fd5f75.js';
|
|
97
97
|
export { O as OrTooltipV3 } from '../OrTooltip-d1764f37.js';
|
|
98
|
-
export { _ as OrRichTextEditorV3 } from '../OrRichTextEditor-
|
|
98
|
+
export { _ as OrRichTextEditorV3 } from '../OrRichTextEditor-4a41e294.js';
|
|
99
99
|
import '../index-fa6eb4ca.js';
|
|
100
100
|
import 'vue';
|
|
101
101
|
import '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
@@ -114,6 +114,7 @@ import '../useToggle-6166bd53.js';
|
|
|
114
114
|
import '../v4-cf8987a3.js';
|
|
115
115
|
import '../useResponsive-e13dfbb0.js';
|
|
116
116
|
import '../useElevation-aac032f4.js';
|
|
117
|
+
import '../useFocusTrap-d744652a.js';
|
|
117
118
|
import '../dropdown-open-e2a93aaf.js';
|
|
118
119
|
import '../useOverflow-43299d81.js';
|
|
119
120
|
import 'portal-vue/dist/portal-vue.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { _ as OrCode, O as OrCodeLanguages } from '../../OrCode-
|
|
1
|
+
export { _ as OrCode, O as OrCodeLanguages } from '../../OrCode-b9332066.js';
|
|
2
2
|
import '@vueuse/core';
|
|
3
3
|
import '../../index.es-3f39f316.js';
|
|
4
4
|
import 'lodash';
|
|
@@ -19,7 +19,8 @@ import '../../constants-c5d1139f.js';
|
|
|
19
19
|
import '../../OrIcon-10ec459c.js';
|
|
20
20
|
import '../../px-to-rem-0b26b83e.js';
|
|
21
21
|
import '../../OrLoader-05057239.js';
|
|
22
|
-
import '../../OrModal-
|
|
22
|
+
import '../../OrModal-71d33219.js';
|
|
23
|
+
import '../../useFocusTrap-d744652a.js';
|
|
23
24
|
import '../../OrOverlay-47967a8b.js';
|
|
24
25
|
import '../../OrError-31503e4c.js';
|
|
25
26
|
import '../../OrHint-fabea4cf.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { _ as OrConfirm } from '../../OrConfirm-
|
|
1
|
+
export { _ as OrConfirm } from '../../OrConfirm-19758dae.js';
|
|
2
2
|
import '../../index-fa6eb4ca.js';
|
|
3
3
|
import 'vue';
|
|
4
4
|
import '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
@@ -18,7 +18,8 @@ import '../../OrTeleportVue2-3544f185.js';
|
|
|
18
18
|
import 'portal-vue/dist/portal-vue.esm.js';
|
|
19
19
|
import '../../dom-3a15d036.js';
|
|
20
20
|
import '../../OrLoader-05057239.js';
|
|
21
|
-
import '../../OrModal-
|
|
21
|
+
import '../../OrModal-71d33219.js';
|
|
22
|
+
import '../../useFocusTrap-d744652a.js';
|
|
22
23
|
import '../../OrIconButton-65962c1c.js';
|
|
23
24
|
import '../../OrTooltip-dfea7af2.js';
|
|
24
25
|
import '../../OrOverlay-47967a8b.js';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export { O as OrModal, a as OrModalSizes } from '../../OrModal-
|
|
1
|
+
export { O as OrModal, a as OrModalSizes } from '../../OrModal-71d33219.js';
|
|
2
2
|
import '../../index-fa6eb4ca.js';
|
|
3
3
|
import 'vue';
|
|
4
4
|
import '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
5
5
|
import 'lodash';
|
|
6
6
|
import '@vueuse/core';
|
|
7
|
+
import '../../useFocusTrap-d744652a.js';
|
|
7
8
|
import '../../OrIconButton-65962c1c.js';
|
|
8
9
|
import '../../OrTooltip-dfea7af2.js';
|
|
9
10
|
import '../../OrTooltipContent-f0fd5f75.js';
|
|
@@ -56,7 +56,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
56
56
|
type: BooleanConstructor;
|
|
57
57
|
default: boolean;
|
|
58
58
|
};
|
|
59
|
-
|
|
59
|
+
markdownFormat: {
|
|
60
60
|
type: BooleanConstructor;
|
|
61
61
|
default: boolean;
|
|
62
62
|
};
|
|
@@ -82,7 +82,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
82
82
|
type: BooleanConstructor;
|
|
83
83
|
default: boolean;
|
|
84
84
|
};
|
|
85
|
-
|
|
85
|
+
markdownFormat: {
|
|
86
86
|
type: BooleanConstructor;
|
|
87
87
|
default: boolean;
|
|
88
88
|
};
|
|
@@ -92,7 +92,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
92
92
|
description: string;
|
|
93
93
|
placeholder: string;
|
|
94
94
|
autofocus: boolean;
|
|
95
|
-
|
|
95
|
+
markdownFormat: boolean;
|
|
96
96
|
} & {} & {
|
|
97
97
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
98
98
|
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
@@ -135,7 +135,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
135
135
|
description: string;
|
|
136
136
|
placeholder: string;
|
|
137
137
|
autofocus: boolean;
|
|
138
|
-
|
|
138
|
+
markdownFormat: boolean;
|
|
139
139
|
} & {} & {
|
|
140
140
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
141
141
|
}, {
|
|
@@ -144,6 +144,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
144
144
|
description: string;
|
|
145
145
|
placeholder: string;
|
|
146
146
|
autofocus: boolean;
|
|
147
|
-
|
|
147
|
+
markdownFormat: boolean;
|
|
148
148
|
}, true>);
|
|
149
149
|
export default _default;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
export { _ as OrRichTextEditorV3 } from '../../OrRichTextEditor-
|
|
1
|
+
export { _ as OrRichTextEditorV3 } from '../../OrRichTextEditor-4a41e294.js';
|
|
2
2
|
import '../../index-fa6eb4ca.js';
|
|
3
3
|
import 'vue';
|
|
4
4
|
import '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
5
|
+
import '../../useFocusTrap-d744652a.js';
|
|
6
|
+
import '@vueuse/core';
|
|
5
7
|
import 'node:punycode';
|
|
6
8
|
import '../../index.es-3f39f316.js';
|
|
7
9
|
import '../../OrIconButton-2bf36347.js';
|
|
@@ -9,7 +11,6 @@ import '../../OrIcon-ce8fd08b.js';
|
|
|
9
11
|
import '../../useClassAttribute-9bf33346.js';
|
|
10
12
|
import '../../normalize-component-6e8e3d80.js';
|
|
11
13
|
import '../../OrTooltip-d1764f37.js';
|
|
12
|
-
import '@vueuse/core';
|
|
13
14
|
import '../../OrPopover-2f48b854.js';
|
|
14
15
|
import '../../floating-ui.dom.esm-83eba816.js';
|
|
15
16
|
import '../../OrBottomSheet-7b5760dc.js';
|
package/dist/bundled/v2/index.js
CHANGED
|
@@ -20,10 +20,10 @@ export { O as OrCheckbox } from './OrCheckbox-f97a57b9.js';
|
|
|
20
20
|
export { O as OrCheckboxV3 } from './OrCheckbox-5b499fc5.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-b9332066.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
|
-
export { _ as OrConfirm } from './OrConfirm-
|
|
26
|
+
export { _ as OrConfirm } from './OrConfirm-19758dae.js';
|
|
27
27
|
export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-22c7622d.js';
|
|
28
28
|
export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-e212f892.js';
|
|
29
29
|
export { O as OrError } from './OrError-31503e4c.js';
|
|
@@ -56,7 +56,7 @@ export { a as LoaderColor, b as LoaderSize, L as LoaderVariant, O as OrLoaderV3
|
|
|
56
56
|
export { O as OrMenuItemV3 } from './OrMenuItem-f89dfc77.js';
|
|
57
57
|
export { O as OrMenuV3 } from './OrMenu-5ac06751.js';
|
|
58
58
|
export { P as MenuPlacement, O as OrPopoverV3, P as PopoverPlacement, a as PopoverVariant, P as TooltipPlacement } from './OrPopover-2f48b854.js';
|
|
59
|
-
export { O as OrModal, a as OrModalSizes } from './OrModal-
|
|
59
|
+
export { O as OrModal, a as OrModalSizes } from './OrModal-71d33219.js';
|
|
60
60
|
export { M as ModalSize, _ as OrModalV3 } from './OrModal-387348ca.js';
|
|
61
61
|
export { a as OR_NOTIFICATION_SIZE, O as OR_NOTIFICATION_TYPE, _ as OrNotification } from './OrNotification-3909aaf2.js';
|
|
62
62
|
export { N as NotificationVariant, _ as OrNotificationV3 } from './OrNotification-1fa0b14e.js';
|
|
@@ -98,7 +98,7 @@ export { _ as OrToastContainerV3, O as OrToastV3, t as TypesV3 } from './types-4
|
|
|
98
98
|
export { O as OrTooltip } from './OrTooltip-dfea7af2.js';
|
|
99
99
|
export { O as OrTooltipContent } from './OrTooltipContent-f0fd5f75.js';
|
|
100
100
|
export { O as OrTooltipV3 } from './OrTooltip-d1764f37.js';
|
|
101
|
-
export { _ as OrRichTextEditorV3 } from './OrRichTextEditor-
|
|
101
|
+
export { _ as OrRichTextEditorV3 } from './OrRichTextEditor-4a41e294.js';
|
|
102
102
|
export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-e2a93aaf.js';
|
|
103
103
|
export { u as useClassAttribute } from './useClassAttribute-9bf33346.js';
|
|
104
104
|
export { u as useElevation } from './useElevation-aac032f4.js';
|
|
@@ -116,6 +116,7 @@ import './dom-3a15d036.js';
|
|
|
116
116
|
import './index-17f264f9.js';
|
|
117
117
|
import './floating-ui.dom.esm-83eba816.js';
|
|
118
118
|
import './v4-cf8987a3.js';
|
|
119
|
+
import './useFocusTrap-d744652a.js';
|
|
119
120
|
import 'portal-vue/dist/portal-vue.esm.js';
|
|
120
121
|
import 'portal-vue';
|
|
121
122
|
import 'node:punycode';
|
package/dist/bundled/{v3/OrModal.vue_vue_type_script_lang-a1ed2ebb.js → v2/useFocusTrap-d744652a.js}
RENAMED
|
@@ -1,32 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import './OrIconButton-e637158e.js';
|
|
5
|
-
import { s as script$1 } from './OrOverlay.vue_vue_type_script_lang-b9bf5e50.js';
|
|
6
|
-
import { s as styleInject } from './style-inject.es-4c6f2515.js';
|
|
7
|
-
import { s as script$2 } from './OrIconButton.vue_vue_type_script_lang-40547ab0.js';
|
|
8
|
-
|
|
9
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10
|
-
return openBlock(), createElementBlock("div", {
|
|
11
|
-
class: normalizeClass(["or-overlay", _ctx.states])
|
|
12
|
-
}, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
var css_248z = "/**\n * A simple way to manage mobile breakpoints described in https://davidwalsh.name/write-media-queries-sass.\n * Can be further extended using following approach https://rimdev.io/making-media-query-mixins-with-sass/\n */\n@keyframes spinAround-34f88318 {\nfrom {\n transform: rotate(0);\n}\nto {\n transform: rotate(359deg);\n}\n}\n@keyframes fade-34f88318 {\nfrom {\n opacity: 1;\n}\nto {\n opacity: 0;\n}\n}\n.or-overlay[data-v-34f88318] {\n display: none;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 25;\n}\n.or-overlay[data-v-34f88318]:not(.without-background) {\n background-color: rgba(30, 35, 43, 0.8);\n}\n.or-overlay.active[data-v-34f88318] {\n display: flex;\n}\n.or-overlay.page[data-v-34f88318] {\n position: fixed;\n height: 100vh;\n width: 100vw;\n}";
|
|
16
|
-
styleInject(css_248z);
|
|
17
|
-
|
|
18
|
-
script$1.render = render;
|
|
19
|
-
script$1.__scopeId = "data-v-34f88318";
|
|
20
|
-
script$1.__file = "src/components/or-overlay/OrOverlay.vue";
|
|
21
|
-
|
|
22
|
-
var OrModalSizes;
|
|
23
|
-
(function (OrModalSizes) {
|
|
24
|
-
OrModalSizes["tiny"] = "tiny";
|
|
25
|
-
OrModalSizes["small"] = "small";
|
|
26
|
-
OrModalSizes["medium"] = "medium";
|
|
27
|
-
OrModalSizes["large"] = "large";
|
|
28
|
-
OrModalSizes["fullScreen"] = "fullScreen";
|
|
29
|
-
})(OrModalSizes || (OrModalSizes = {}));
|
|
1
|
+
import { unrefElement, tryOnScopeDispose } from '@vueuse/core';
|
|
2
|
+
import './index-fa6eb4ca.js';
|
|
3
|
+
import { ref, watch } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
30
4
|
|
|
31
5
|
/*!
|
|
32
6
|
* tabbable 6.0.1
|
|
@@ -1292,100 +1266,4 @@ function useFocusTrap(target, options = {}) {
|
|
|
1292
1266
|
};
|
|
1293
1267
|
}
|
|
1294
1268
|
|
|
1295
|
-
|
|
1296
|
-
name: 'OrModal',
|
|
1297
|
-
components: {
|
|
1298
|
-
OrIconButton: script$2,
|
|
1299
|
-
OrOverlay: script$1
|
|
1300
|
-
},
|
|
1301
|
-
props: {
|
|
1302
|
-
titleText: {
|
|
1303
|
-
type: String,
|
|
1304
|
-
required: false,
|
|
1305
|
-
default: null,
|
|
1306
|
-
validator: _.isString
|
|
1307
|
-
},
|
|
1308
|
-
showClose: {
|
|
1309
|
-
type: Boolean,
|
|
1310
|
-
default: true,
|
|
1311
|
-
validator: _.isBoolean
|
|
1312
|
-
},
|
|
1313
|
-
closeOnClickOutside: {
|
|
1314
|
-
type: Boolean,
|
|
1315
|
-
required: false,
|
|
1316
|
-
default: false,
|
|
1317
|
-
validator: _.isBoolean
|
|
1318
|
-
},
|
|
1319
|
-
size: {
|
|
1320
|
-
type: String,
|
|
1321
|
-
required: false,
|
|
1322
|
-
default: OrModalSizes.small
|
|
1323
|
-
},
|
|
1324
|
-
isOpen: {
|
|
1325
|
-
type: Boolean,
|
|
1326
|
-
required: true,
|
|
1327
|
-
validator: _.isBoolean
|
|
1328
|
-
},
|
|
1329
|
-
isWithoutOverlay: {
|
|
1330
|
-
type: Boolean,
|
|
1331
|
-
required: false,
|
|
1332
|
-
default: false,
|
|
1333
|
-
validator: _.isBoolean
|
|
1334
|
-
},
|
|
1335
|
-
trapFocus: {
|
|
1336
|
-
type: Boolean,
|
|
1337
|
-
default: true,
|
|
1338
|
-
validator: _.isBoolean
|
|
1339
|
-
}
|
|
1340
|
-
},
|
|
1341
|
-
emits: ['close'],
|
|
1342
|
-
setup(props, {
|
|
1343
|
-
emit
|
|
1344
|
-
}) {
|
|
1345
|
-
const overlay = ref();
|
|
1346
|
-
let container = ref(null);
|
|
1347
|
-
let trap = useFocusTrap(container, {
|
|
1348
|
-
immediate: props.trapFocus,
|
|
1349
|
-
fallbackFocus: '.container',
|
|
1350
|
-
allowOutsideClick: true
|
|
1351
|
-
});
|
|
1352
|
-
const handleClose = () => emit('close');
|
|
1353
|
-
onClickOutside(container, evt => {
|
|
1354
|
-
if (!evt.composedPath().includes(overlay.value.$el)) return;
|
|
1355
|
-
if (props.closeOnClickOutside) handleClose();
|
|
1356
|
-
});
|
|
1357
|
-
const toggleFocusTrap = isNeedToTrap => {
|
|
1358
|
-
if (isNeedToTrap && props.isOpen) {
|
|
1359
|
-
trap.activate();
|
|
1360
|
-
} else {
|
|
1361
|
-
trap === null || trap === void 0 ? void 0 : trap.deactivate();
|
|
1362
|
-
}
|
|
1363
|
-
};
|
|
1364
|
-
watch(() => props.trapFocus, toggleFocusTrap, {
|
|
1365
|
-
immediate: true
|
|
1366
|
-
});
|
|
1367
|
-
watch(() => props.isOpen, isOpen => {
|
|
1368
|
-
toggleFocusTrap(false);
|
|
1369
|
-
if (isOpen) {
|
|
1370
|
-
container = ref(null);
|
|
1371
|
-
} else {
|
|
1372
|
-
trap === null || trap === void 0 ? void 0 : trap.deactivate();
|
|
1373
|
-
}
|
|
1374
|
-
});
|
|
1375
|
-
onBeforeUnmount(() => {
|
|
1376
|
-
trap === null || trap === void 0 ? void 0 : trap.deactivate();
|
|
1377
|
-
});
|
|
1378
|
-
return {
|
|
1379
|
-
container,
|
|
1380
|
-
overlay,
|
|
1381
|
-
handleClose
|
|
1382
|
-
};
|
|
1383
|
-
},
|
|
1384
|
-
computed: {
|
|
1385
|
-
sizeClass() {
|
|
1386
|
-
return `is-${this.size}`;
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
});
|
|
1390
|
-
|
|
1391
|
-
export { OrModalSizes as O, script as s };
|
|
1269
|
+
export { useFocusTrap as u };
|
|
@@ -4,8 +4,8 @@ import _ from 'lodash';
|
|
|
4
4
|
import { defineComponent, ref } from 'vue';
|
|
5
5
|
import { s as script$3 } from './OrTeleportVue3-012351e1.js';
|
|
6
6
|
import './OrIconButton-e637158e.js';
|
|
7
|
-
import './OrModal-
|
|
8
|
-
import { s as script$2 } from './OrModal.vue_vue_type_script_lang-
|
|
7
|
+
import './OrModal-bbabef06.js';
|
|
8
|
+
import { s as script$2 } from './OrModal.vue_vue_type_script_lang-a599dfe7.js';
|
|
9
9
|
import './OrError-b43ebad8.js';
|
|
10
10
|
import './OrHint-c9114268.js';
|
|
11
11
|
import './OrLabel-e412c532.js';
|
|
@@ -2,10 +2,10 @@ import { defineComponent, ref, computed } from 'vue';
|
|
|
2
2
|
import { useMagicKeys, useActiveElement, whenever } from '@vueuse/core';
|
|
3
3
|
import { l as logicAnd } from './index-01519e46.js';
|
|
4
4
|
import './OrButton-ec723bb7.js';
|
|
5
|
-
import './OrModal-
|
|
5
|
+
import './OrModal-bbabef06.js';
|
|
6
6
|
import { s as script$3 } from './OrInput-7d4b571a.js';
|
|
7
7
|
import { a as BUTTON_COLOR } from './constants-c5d1139f.js';
|
|
8
|
-
import { s as script$2, O as OrModalSizes } from './OrModal.vue_vue_type_script_lang-
|
|
8
|
+
import { s as script$2, O as OrModalSizes } from './OrModal.vue_vue_type_script_lang-a599dfe7.js';
|
|
9
9
|
import { s as script$1 } from './OrButton.vue_vue_type_script_lang-ffc66d00.js';
|
|
10
10
|
|
|
11
11
|
var script = defineComponent({
|