@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
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import
|
|
3
|
-
import { unrefElement, tryOnScopeDispose, onClickOutside } from '@vueuse/core';
|
|
4
|
-
import { ref, watch, defineComponent, onBeforeUnmount } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
5
|
-
import { O as OrIconButton } from './OrIconButton-65962c1c.js';
|
|
6
|
-
import { O as OrOverlay } from './OrOverlay-47967a8b.js';
|
|
7
|
-
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
8
|
-
import { c as createInjector } from './browser-82dea9ed.js';
|
|
9
|
-
|
|
10
|
-
var OrModalSizes;
|
|
11
|
-
(function (OrModalSizes) {
|
|
12
|
-
OrModalSizes["tiny"] = "tiny";
|
|
13
|
-
OrModalSizes["small"] = "small";
|
|
14
|
-
OrModalSizes["medium"] = "medium";
|
|
15
|
-
OrModalSizes["large"] = "large";
|
|
16
|
-
OrModalSizes["fullScreen"] = "fullScreen";
|
|
17
|
-
})(OrModalSizes || (OrModalSizes = {}));
|
|
1
|
+
import { unrefElement, tryOnScopeDispose } from '@vueuse/core';
|
|
2
|
+
import { ref, watch } from 'vue';
|
|
18
3
|
|
|
19
4
|
/*!
|
|
20
5
|
* tabbable 6.0.1
|
|
@@ -1280,186 +1265,4 @@ function useFocusTrap(target, options = {}) {
|
|
|
1280
1265
|
};
|
|
1281
1266
|
}
|
|
1282
1267
|
|
|
1283
|
-
|
|
1284
|
-
name: 'OrModal',
|
|
1285
|
-
components: {
|
|
1286
|
-
OrIconButton,
|
|
1287
|
-
OrOverlay
|
|
1288
|
-
},
|
|
1289
|
-
props: {
|
|
1290
|
-
titleText: {
|
|
1291
|
-
type: String,
|
|
1292
|
-
required: false,
|
|
1293
|
-
default: null,
|
|
1294
|
-
validator: _.isString
|
|
1295
|
-
},
|
|
1296
|
-
showClose: {
|
|
1297
|
-
type: Boolean,
|
|
1298
|
-
default: true,
|
|
1299
|
-
validator: _.isBoolean
|
|
1300
|
-
},
|
|
1301
|
-
closeOnClickOutside: {
|
|
1302
|
-
type: Boolean,
|
|
1303
|
-
required: false,
|
|
1304
|
-
default: false,
|
|
1305
|
-
validator: _.isBoolean
|
|
1306
|
-
},
|
|
1307
|
-
size: {
|
|
1308
|
-
type: String,
|
|
1309
|
-
required: false,
|
|
1310
|
-
default: OrModalSizes.small
|
|
1311
|
-
},
|
|
1312
|
-
isOpen: {
|
|
1313
|
-
type: Boolean,
|
|
1314
|
-
required: true,
|
|
1315
|
-
validator: _.isBoolean
|
|
1316
|
-
},
|
|
1317
|
-
isWithoutOverlay: {
|
|
1318
|
-
type: Boolean,
|
|
1319
|
-
required: false,
|
|
1320
|
-
default: false,
|
|
1321
|
-
validator: _.isBoolean
|
|
1322
|
-
},
|
|
1323
|
-
trapFocus: {
|
|
1324
|
-
type: Boolean,
|
|
1325
|
-
default: true,
|
|
1326
|
-
validator: _.isBoolean
|
|
1327
|
-
}
|
|
1328
|
-
},
|
|
1329
|
-
emits: ['close'],
|
|
1330
|
-
setup(props, {
|
|
1331
|
-
emit
|
|
1332
|
-
}) {
|
|
1333
|
-
const overlay = ref();
|
|
1334
|
-
let container = ref(null);
|
|
1335
|
-
let trap = useFocusTrap(container, {
|
|
1336
|
-
immediate: props.trapFocus,
|
|
1337
|
-
fallbackFocus: '.container',
|
|
1338
|
-
allowOutsideClick: true
|
|
1339
|
-
});
|
|
1340
|
-
const handleClose = () => emit('close');
|
|
1341
|
-
onClickOutside(container, evt => {
|
|
1342
|
-
if (!evt.composedPath().includes(overlay.value.$el)) return;
|
|
1343
|
-
if (props.closeOnClickOutside) handleClose();
|
|
1344
|
-
});
|
|
1345
|
-
const toggleFocusTrap = isNeedToTrap => {
|
|
1346
|
-
if (isNeedToTrap && props.isOpen) {
|
|
1347
|
-
trap.activate();
|
|
1348
|
-
} else {
|
|
1349
|
-
trap === null || trap === void 0 ? void 0 : trap.deactivate();
|
|
1350
|
-
}
|
|
1351
|
-
};
|
|
1352
|
-
watch(() => props.trapFocus, toggleFocusTrap, {
|
|
1353
|
-
immediate: true
|
|
1354
|
-
});
|
|
1355
|
-
watch(() => props.isOpen, isOpen => {
|
|
1356
|
-
toggleFocusTrap(false);
|
|
1357
|
-
if (isOpen) {
|
|
1358
|
-
container = ref(null);
|
|
1359
|
-
} else {
|
|
1360
|
-
trap === null || trap === void 0 ? void 0 : trap.deactivate();
|
|
1361
|
-
}
|
|
1362
|
-
});
|
|
1363
|
-
onBeforeUnmount(() => {
|
|
1364
|
-
trap === null || trap === void 0 ? void 0 : trap.deactivate();
|
|
1365
|
-
});
|
|
1366
|
-
return {
|
|
1367
|
-
container,
|
|
1368
|
-
overlay,
|
|
1369
|
-
handleClose
|
|
1370
|
-
};
|
|
1371
|
-
},
|
|
1372
|
-
computed: {
|
|
1373
|
-
sizeClass() {
|
|
1374
|
-
return `is-${this.size}`;
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1377
|
-
});
|
|
1378
|
-
|
|
1379
|
-
/* script */
|
|
1380
|
-
const __vue_script__ = script;
|
|
1381
|
-
|
|
1382
|
-
/* template */
|
|
1383
|
-
var __vue_render__ = function () {
|
|
1384
|
-
var _vm = this;
|
|
1385
|
-
var _h = _vm.$createElement;
|
|
1386
|
-
var _c = _vm._self._c || _h;
|
|
1387
|
-
return _vm.isOpen ? _c('div', {
|
|
1388
|
-
staticClass: "or-modal"
|
|
1389
|
-
}, [_c('or-overlay', {
|
|
1390
|
-
ref: "overlay",
|
|
1391
|
-
attrs: {
|
|
1392
|
-
"is-active": "",
|
|
1393
|
-
"is-without-background": _vm.isWithoutOverlay
|
|
1394
|
-
}
|
|
1395
|
-
}, [_c('div', {
|
|
1396
|
-
ref: "container",
|
|
1397
|
-
class: [_vm.sizeClass, 'container', {
|
|
1398
|
-
'is-without-overlay': _vm.isWithoutOverlay
|
|
1399
|
-
}]
|
|
1400
|
-
}, [_vm._t("header", function () {
|
|
1401
|
-
return [_c('div', {
|
|
1402
|
-
staticClass: "header"
|
|
1403
|
-
}, [_vm._t("title", function () {
|
|
1404
|
-
return [_c('div', {
|
|
1405
|
-
staticClass: "title"
|
|
1406
|
-
}, [_vm._v("\n " + _vm._s(_vm.titleText) + "\n ")])];
|
|
1407
|
-
}), _vm._v(" "), _c('or-icon-button', {
|
|
1408
|
-
directives: [{
|
|
1409
|
-
name: "show",
|
|
1410
|
-
rawName: "v-show",
|
|
1411
|
-
value: _vm.showClose,
|
|
1412
|
-
expression: "showClose"
|
|
1413
|
-
}],
|
|
1414
|
-
attrs: {
|
|
1415
|
-
"icon": "close",
|
|
1416
|
-
"icon-color": "neutral-6"
|
|
1417
|
-
},
|
|
1418
|
-
on: {
|
|
1419
|
-
"click": _vm.handleClose
|
|
1420
|
-
}
|
|
1421
|
-
})], 2)];
|
|
1422
|
-
}), _vm._v(" "), _vm._t("content", function () {
|
|
1423
|
-
return [_c('div', {
|
|
1424
|
-
staticClass: "content"
|
|
1425
|
-
}, [_vm._t("default")], 2)];
|
|
1426
|
-
}), _vm._v(" "), _c('div', {
|
|
1427
|
-
directives: [{
|
|
1428
|
-
name: "show",
|
|
1429
|
-
rawName: "v-show",
|
|
1430
|
-
value: _vm.$slots.footer,
|
|
1431
|
-
expression: "$slots.footer"
|
|
1432
|
-
}],
|
|
1433
|
-
staticClass: "footer"
|
|
1434
|
-
}, [_vm._t("footer", null, {
|
|
1435
|
-
"close": _vm.handleClose
|
|
1436
|
-
})], 2)], 2)])], 1) : _vm._e();
|
|
1437
|
-
};
|
|
1438
|
-
var __vue_staticRenderFns__ = [];
|
|
1439
|
-
|
|
1440
|
-
/* style */
|
|
1441
|
-
const __vue_inject_styles__ = function (inject) {
|
|
1442
|
-
if (!inject) return;
|
|
1443
|
-
inject("data-v-1caff449_0", {
|
|
1444
|
-
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)}",
|
|
1445
|
-
map: undefined,
|
|
1446
|
-
media: undefined
|
|
1447
|
-
});
|
|
1448
|
-
};
|
|
1449
|
-
/* scoped */
|
|
1450
|
-
const __vue_scope_id__ = "data-v-1caff449";
|
|
1451
|
-
/* module identifier */
|
|
1452
|
-
const __vue_module_identifier__ = undefined;
|
|
1453
|
-
/* functional template */
|
|
1454
|
-
const __vue_is_functional_template__ = false;
|
|
1455
|
-
/* style inject SSR */
|
|
1456
|
-
|
|
1457
|
-
/* style inject shadow dom */
|
|
1458
|
-
|
|
1459
|
-
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
1460
|
-
render: __vue_render__,
|
|
1461
|
-
staticRenderFns: __vue_staticRenderFns__
|
|
1462
|
-
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, createInjector, undefined, undefined);
|
|
1463
|
-
var OrModal = __vue_component__;
|
|
1464
|
-
|
|
1465
|
-
export { OrModal as O, OrModalSizes as a };
|
|
1268
|
+
export { useFocusTrap as u };
|