@onereach/ui-components 2.68.0-beta.2003.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-edc7a1f5.js → OrCode-b9332066.js} +2 -115
- 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-4a41e294.js +36832 -0
- package/dist/bundled/v2/components/index.d.ts +1 -0
- package/dist/bundled/v2/components/index.js +7 -3
- package/dist/bundled/v2/components/or-code/index.js +4 -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.stories3.d.ts +12 -0
- package/dist/bundled/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +149 -0
- package/dist/bundled/v2/components/or-rich-text-editor-v3/index.d.ts +1 -0
- package/dist/bundled/v2/components/or-rich-text-editor-v3/index.js +25 -0
- package/dist/bundled/v2/components/or-rich-text-editor-v3/styles.d.ts +6 -0
- package/dist/bundled/v2/index.es-3f39f316.js +115 -0
- package/dist/bundled/v2/index.js +8 -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-ef5e7f04.js → OrCode.vue_vue_type_script_lang-5fe573eb.js} +3 -116
- 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/OrMenu-08aa60de.js +29 -0
- 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-f5d3e39b.js +36712 -0
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-ca57f9d9.js → OrTabs.vue_vue_type_script_lang-2fdbd2f2.js} +10 -36
- package/dist/bundled/v3/components/index.d.ts +1 -0
- package/dist/bundled/v3/components/index.js +10 -5
- package/dist/bundled/v3/components/or-code/index.js +5 -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.stories3.d.ts +12 -0
- package/dist/bundled/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +149 -0
- package/dist/bundled/v3/components/or-rich-text-editor-v3/index.d.ts +1 -0
- package/dist/bundled/v3/components/or-rich-text-editor-v3/index.js +26 -0
- package/dist/bundled/v3/components/or-rich-text-editor-v3/styles.d.ts +6 -0
- package/dist/bundled/v3/components/or-tabs-v3/index.js +2 -1
- package/dist/bundled/v3/index.es-3f39f316.js +115 -0
- package/dist/bundled/v3/index.js +278 -182
- package/dist/bundled/{v2/OrModal-a5411b0d.js → v3/useFocusTrap-d21726e3.js} +3 -200
- package/dist/esm/v2/OrRichTextEditor-11967cd9.js +520 -0
- package/dist/esm/v2/components/index.d.ts +1 -0
- package/dist/esm/v2/components/index.js +19 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.d.ts +12 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +149 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +39 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/styles.d.ts +6 -0
- package/dist/esm/v2/index.js +19 -0
- package/dist/esm/v3/OrRichTextEditor-ad5f24ba.js +490 -0
- package/dist/esm/v3/components/index.d.ts +1 -0
- package/dist/esm/v3/components/index.js +19 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.d.ts +12 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +149 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +38 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/styles.d.ts +6 -0
- package/dist/esm/v3/index.js +19 -0
- package/package.json +19 -1
- package/src/components/index.ts +1 -0
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.docs.mdx +16 -0
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.ts +62 -0
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +526 -0
- package/src/components/or-rich-text-editor-v3/index.ts +1 -0
- package/src/components/or-rich-text-editor-v3/styles.ts +65 -0
- package/dist/bundled/v2/components/or-empty-state-v3/OrEmptyState.stories3.d.ts +0 -39
- package/dist/bundled/v2/components/or-empty-state-v3/OrEmptyState.vue.d.ts +0 -109
- package/dist/bundled/v2/components/or-empty-state-v3/index.d.ts +0 -2
- package/dist/bundled/v2/components/or-empty-state-v3/index.js +0 -131
- package/dist/bundled/v2/components/or-empty-state-v3/types.d.ts +0 -2
- package/dist/bundled/v3/components/or-empty-state-v3/OrEmptyState.stories3.d.ts +0 -39
- package/dist/bundled/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +0 -109
- package/dist/bundled/v3/components/or-empty-state-v3/index.d.ts +0 -2
- package/dist/bundled/v3/components/or-empty-state-v3/index.js +0 -111
- package/dist/bundled/v3/components/or-empty-state-v3/types.d.ts +0 -2
- package/dist/esm/v2/components/or-empty-state-v3/OrEmptyState.stories3.d.ts +0 -39
- package/dist/esm/v2/components/or-empty-state-v3/OrEmptyState.vue.d.ts +0 -109
- package/dist/esm/v2/components/or-empty-state-v3/index.d.ts +0 -2
- package/dist/esm/v2/components/or-empty-state-v3/index.js +0 -129
- package/dist/esm/v2/components/or-empty-state-v3/types.d.ts +0 -2
- package/dist/esm/v3/components/or-empty-state-v3/OrEmptyState.stories3.d.ts +0 -39
- package/dist/esm/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +0 -109
- package/dist/esm/v3/components/or-empty-state-v3/index.d.ts +0 -2
- package/dist/esm/v3/components/or-empty-state-v3/index.js +0 -111
- package/dist/esm/v3/components/or-empty-state-v3/types.d.ts +0 -2
- package/src/components/or-empty-state-v3/OrEmptyState.stories3.ts +0 -203
- package/src/components/or-empty-state-v3/OrEmptyState.vue +0 -101
- package/src/components/or-empty-state-v3/index.ts +0 -2
- package/src/components/or-empty-state-v3/types.ts +0 -3
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 };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useElementHover } from '@vueuse/core';
|
|
2
|
+
import { k as keyName, b as base, s as shift } from './index.es-3f39f316.js';
|
|
2
3
|
import _ from 'lodash';
|
|
3
4
|
import { defineComponent, ref } from 'vue';
|
|
4
5
|
import { s as script$3 } from './OrTeleportVue3-012351e1.js';
|
|
5
6
|
import './OrIconButton-e637158e.js';
|
|
6
|
-
import './OrModal-
|
|
7
|
-
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';
|
|
8
9
|
import './OrError-b43ebad8.js';
|
|
9
10
|
import './OrHint-c9114268.js';
|
|
10
11
|
import './OrLabel-e412c532.js';
|
|
@@ -3924,120 +3925,6 @@ class StyleSet {
|
|
|
3924
3925
|
// example to create a media query you can do `{"@media screen and
|
|
3925
3926
|
// (min-width: 400px)": {...}}`.
|
|
3926
3927
|
|
|
3927
|
-
var base = {
|
|
3928
|
-
8: "Backspace",
|
|
3929
|
-
9: "Tab",
|
|
3930
|
-
10: "Enter",
|
|
3931
|
-
12: "NumLock",
|
|
3932
|
-
13: "Enter",
|
|
3933
|
-
16: "Shift",
|
|
3934
|
-
17: "Control",
|
|
3935
|
-
18: "Alt",
|
|
3936
|
-
20: "CapsLock",
|
|
3937
|
-
27: "Escape",
|
|
3938
|
-
32: " ",
|
|
3939
|
-
33: "PageUp",
|
|
3940
|
-
34: "PageDown",
|
|
3941
|
-
35: "End",
|
|
3942
|
-
36: "Home",
|
|
3943
|
-
37: "ArrowLeft",
|
|
3944
|
-
38: "ArrowUp",
|
|
3945
|
-
39: "ArrowRight",
|
|
3946
|
-
40: "ArrowDown",
|
|
3947
|
-
44: "PrintScreen",
|
|
3948
|
-
45: "Insert",
|
|
3949
|
-
46: "Delete",
|
|
3950
|
-
59: ";",
|
|
3951
|
-
61: "=",
|
|
3952
|
-
91: "Meta",
|
|
3953
|
-
92: "Meta",
|
|
3954
|
-
106: "*",
|
|
3955
|
-
107: "+",
|
|
3956
|
-
108: ",",
|
|
3957
|
-
109: "-",
|
|
3958
|
-
110: ".",
|
|
3959
|
-
111: "/",
|
|
3960
|
-
144: "NumLock",
|
|
3961
|
-
145: "ScrollLock",
|
|
3962
|
-
160: "Shift",
|
|
3963
|
-
161: "Shift",
|
|
3964
|
-
162: "Control",
|
|
3965
|
-
163: "Control",
|
|
3966
|
-
164: "Alt",
|
|
3967
|
-
165: "Alt",
|
|
3968
|
-
173: "-",
|
|
3969
|
-
186: ";",
|
|
3970
|
-
187: "=",
|
|
3971
|
-
188: ",",
|
|
3972
|
-
189: "-",
|
|
3973
|
-
190: ".",
|
|
3974
|
-
191: "/",
|
|
3975
|
-
192: "`",
|
|
3976
|
-
219: "[",
|
|
3977
|
-
220: "\\",
|
|
3978
|
-
221: "]",
|
|
3979
|
-
222: "'"
|
|
3980
|
-
};
|
|
3981
|
-
var shift = {
|
|
3982
|
-
48: ")",
|
|
3983
|
-
49: "!",
|
|
3984
|
-
50: "@",
|
|
3985
|
-
51: "#",
|
|
3986
|
-
52: "$",
|
|
3987
|
-
53: "%",
|
|
3988
|
-
54: "^",
|
|
3989
|
-
55: "&",
|
|
3990
|
-
56: "*",
|
|
3991
|
-
57: "(",
|
|
3992
|
-
59: ":",
|
|
3993
|
-
61: "+",
|
|
3994
|
-
173: "_",
|
|
3995
|
-
186: ":",
|
|
3996
|
-
187: "+",
|
|
3997
|
-
188: "<",
|
|
3998
|
-
189: "_",
|
|
3999
|
-
190: ">",
|
|
4000
|
-
191: "?",
|
|
4001
|
-
192: "~",
|
|
4002
|
-
219: "{",
|
|
4003
|
-
220: "|",
|
|
4004
|
-
221: "}",
|
|
4005
|
-
222: "\""
|
|
4006
|
-
};
|
|
4007
|
-
var chrome$1 = typeof navigator != "undefined" && /Chrome\/(\d+)/.exec(navigator.userAgent);
|
|
4008
|
-
typeof navigator != "undefined" && /Gecko\/\d+/.test(navigator.userAgent);
|
|
4009
|
-
var mac = typeof navigator != "undefined" && /Mac/.test(navigator.platform);
|
|
4010
|
-
var ie$1 = typeof navigator != "undefined" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
4011
|
-
var brokenModifierNames = mac || chrome$1 && +chrome$1[1] < 57;
|
|
4012
|
-
|
|
4013
|
-
// Fill in the digit keys
|
|
4014
|
-
for (var i = 0; i < 10; i++) base[48 + i] = base[96 + i] = String(i);
|
|
4015
|
-
|
|
4016
|
-
// The function keys
|
|
4017
|
-
for (var i = 1; i <= 24; i++) base[i + 111] = "F" + i;
|
|
4018
|
-
|
|
4019
|
-
// And the alphabetic keys
|
|
4020
|
-
for (var i = 65; i <= 90; i++) {
|
|
4021
|
-
base[i] = String.fromCharCode(i + 32);
|
|
4022
|
-
shift[i] = String.fromCharCode(i);
|
|
4023
|
-
}
|
|
4024
|
-
|
|
4025
|
-
// For each code that doesn't have a shift-equivalent, copy the base name
|
|
4026
|
-
for (var code in base) if (!shift.hasOwnProperty(code)) shift[code] = base[code];
|
|
4027
|
-
function keyName(event) {
|
|
4028
|
-
var ignoreKey = brokenModifierNames && (event.ctrlKey || event.altKey || event.metaKey) || ie$1 && event.shiftKey && event.key && event.key.length == 1 || event.key == "Unidentified";
|
|
4029
|
-
var name = !ignoreKey && event.key || (event.shiftKey ? shift : base)[event.keyCode] || event.key || "Unidentified";
|
|
4030
|
-
// Edge sometimes produces wrong names (Issue #3)
|
|
4031
|
-
if (name == "Esc") name = "Escape";
|
|
4032
|
-
if (name == "Del") name = "Delete";
|
|
4033
|
-
// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8860571/
|
|
4034
|
-
if (name == "Left") name = "ArrowLeft";
|
|
4035
|
-
if (name == "Up") name = "ArrowUp";
|
|
4036
|
-
if (name == "Right") name = "ArrowRight";
|
|
4037
|
-
if (name == "Down") name = "ArrowDown";
|
|
4038
|
-
return name;
|
|
4039
|
-
}
|
|
4040
|
-
|
|
4041
3928
|
function getSelection(root) {
|
|
4042
3929
|
let target;
|
|
4043
3930
|
// Browsers differ on whether shadow roots have a getSelection
|
|
@@ -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({
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { s as script } from './OrMenu.vue_vue_type_script_lang-bae45062.js';
|
|
2
|
+
import { resolveComponent, openBlock, createElementBlock, mergeProps, createVNode, withCtx, createElementVNode, normalizeClass, withModifiers, renderSlot } from 'vue';
|
|
3
|
+
|
|
4
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5
|
+
const _component_OrPopover = resolveComponent("OrPopover");
|
|
6
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
7
|
+
ref: "root"
|
|
8
|
+
}, _ctx.$attrs, {
|
|
9
|
+
class: _ctx.rootStyles
|
|
10
|
+
}), [createVNode(_component_OrPopover, {
|
|
11
|
+
ref: "popover",
|
|
12
|
+
variant: 'auto',
|
|
13
|
+
trigger: _ctx.trigger,
|
|
14
|
+
placement: _ctx.placement,
|
|
15
|
+
"full-width": false,
|
|
16
|
+
"disable-default-styles": false,
|
|
17
|
+
"onUpdate:state": _cache[1] || (_cache[1] = $event => _ctx.$emit('update:state', $event))
|
|
18
|
+
}, {
|
|
19
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
20
|
+
class: normalizeClass(_ctx.bodyStyles),
|
|
21
|
+
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onClick && _ctx.onClick(...args), ["stop"]))
|
|
22
|
+
}, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */)]),
|
|
23
|
+
|
|
24
|
+
_: 3 /* FORWARDED */
|
|
25
|
+
}, 8 /* PROPS */, ["trigger", "placement"])], 16 /* FULL_PROPS */);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
script.render = render;
|
|
29
|
+
script.__file = "src/components/or-menu-v3/OrMenu.vue";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as script } from './OrModal.vue_vue_type_script_lang-
|
|
1
|
+
import { s as script } from './OrModal.vue_vue_type_script_lang-a599dfe7.js';
|
|
2
2
|
import { resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, normalizeClass, renderSlot, toDisplayString, withDirectives, vShow, createCommentVNode } from 'vue';
|
|
3
3
|
import { s as styleInject } from './style-inject.es-4c6f2515.js';
|
|
4
4
|
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { openBlock, createElementBlock, normalizeClass, renderSlot, defineComponent, ref, watch, onBeforeUnmount } from 'vue';
|
|
2
|
+
import _ from 'lodash';
|
|
3
|
+
import { onClickOutside } from '@vueuse/core';
|
|
4
|
+
import { u as useFocusTrap } from './useFocusTrap-d21726e3.js';
|
|
5
|
+
import './OrIconButton-e637158e.js';
|
|
6
|
+
import { s as script$1 } from './OrOverlay.vue_vue_type_script_lang-b9bf5e50.js';
|
|
7
|
+
import { s as styleInject } from './style-inject.es-4c6f2515.js';
|
|
8
|
+
import { s as script$2 } from './OrIconButton.vue_vue_type_script_lang-40547ab0.js';
|
|
9
|
+
|
|
10
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11
|
+
return openBlock(), createElementBlock("div", {
|
|
12
|
+
class: normalizeClass(["or-overlay", _ctx.states])
|
|
13
|
+
}, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
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}";
|
|
17
|
+
styleInject(css_248z);
|
|
18
|
+
|
|
19
|
+
script$1.render = render;
|
|
20
|
+
script$1.__scopeId = "data-v-34f88318";
|
|
21
|
+
script$1.__file = "src/components/or-overlay/OrOverlay.vue";
|
|
22
|
+
|
|
23
|
+
var OrModalSizes;
|
|
24
|
+
(function (OrModalSizes) {
|
|
25
|
+
OrModalSizes["tiny"] = "tiny";
|
|
26
|
+
OrModalSizes["small"] = "small";
|
|
27
|
+
OrModalSizes["medium"] = "medium";
|
|
28
|
+
OrModalSizes["large"] = "large";
|
|
29
|
+
OrModalSizes["fullScreen"] = "fullScreen";
|
|
30
|
+
})(OrModalSizes || (OrModalSizes = {}));
|
|
31
|
+
|
|
32
|
+
var script = defineComponent({
|
|
33
|
+
name: 'OrModal',
|
|
34
|
+
components: {
|
|
35
|
+
OrIconButton: script$2,
|
|
36
|
+
OrOverlay: script$1
|
|
37
|
+
},
|
|
38
|
+
props: {
|
|
39
|
+
titleText: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: false,
|
|
42
|
+
default: null,
|
|
43
|
+
validator: _.isString
|
|
44
|
+
},
|
|
45
|
+
showClose: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: true,
|
|
48
|
+
validator: _.isBoolean
|
|
49
|
+
},
|
|
50
|
+
closeOnClickOutside: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
required: false,
|
|
53
|
+
default: false,
|
|
54
|
+
validator: _.isBoolean
|
|
55
|
+
},
|
|
56
|
+
size: {
|
|
57
|
+
type: String,
|
|
58
|
+
required: false,
|
|
59
|
+
default: OrModalSizes.small
|
|
60
|
+
},
|
|
61
|
+
isOpen: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
required: true,
|
|
64
|
+
validator: _.isBoolean
|
|
65
|
+
},
|
|
66
|
+
isWithoutOverlay: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
required: false,
|
|
69
|
+
default: false,
|
|
70
|
+
validator: _.isBoolean
|
|
71
|
+
},
|
|
72
|
+
trapFocus: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: true,
|
|
75
|
+
validator: _.isBoolean
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
emits: ['close'],
|
|
79
|
+
setup(props, {
|
|
80
|
+
emit
|
|
81
|
+
}) {
|
|
82
|
+
const overlay = ref();
|
|
83
|
+
let container = ref(null);
|
|
84
|
+
let trap = useFocusTrap(container, {
|
|
85
|
+
immediate: props.trapFocus,
|
|
86
|
+
fallbackFocus: '.container',
|
|
87
|
+
allowOutsideClick: true
|
|
88
|
+
});
|
|
89
|
+
const handleClose = () => emit('close');
|
|
90
|
+
onClickOutside(container, evt => {
|
|
91
|
+
if (!evt.composedPath().includes(overlay.value.$el)) return;
|
|
92
|
+
if (props.closeOnClickOutside) handleClose();
|
|
93
|
+
});
|
|
94
|
+
const toggleFocusTrap = isNeedToTrap => {
|
|
95
|
+
if (isNeedToTrap && props.isOpen) {
|
|
96
|
+
trap.activate();
|
|
97
|
+
} else {
|
|
98
|
+
trap === null || trap === void 0 ? void 0 : trap.deactivate();
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
watch(() => props.trapFocus, toggleFocusTrap, {
|
|
102
|
+
immediate: true
|
|
103
|
+
});
|
|
104
|
+
watch(() => props.isOpen, isOpen => {
|
|
105
|
+
toggleFocusTrap(false);
|
|
106
|
+
if (isOpen) {
|
|
107
|
+
container = ref(null);
|
|
108
|
+
} else {
|
|
109
|
+
trap === null || trap === void 0 ? void 0 : trap.deactivate();
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
onBeforeUnmount(() => {
|
|
113
|
+
trap === null || trap === void 0 ? void 0 : trap.deactivate();
|
|
114
|
+
});
|
|
115
|
+
return {
|
|
116
|
+
container,
|
|
117
|
+
overlay,
|
|
118
|
+
handleClose
|
|
119
|
+
};
|
|
120
|
+
},
|
|
121
|
+
computed: {
|
|
122
|
+
sizeClass() {
|
|
123
|
+
return `is-${this.size}`;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
export { OrModalSizes as O, script as s };
|