@indielayer/ui 1.0.0-alpha.6 → 1.0.0-alpha.9
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/lib/index.cjs.js +2 -2
- package/lib/index.es.js +111 -80
- package/lib/style.css +1 -1
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/icon/Icon.vue +1 -1
- package/src/components/menu/MenuItem.vue +2 -7
- package/src/components/notifications/Notifications.vue +2 -0
- package/src/components/tab/Tab.vue +8 -13
- package/src/create.ts +1 -1
- package/src/version.ts +1 -1
package/lib/index.es.js
CHANGED
|
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { inject, defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, normalizeStyle, withCtx, createElementBlock, renderSlot, createCommentVNode, Fragment, pushScopeId, popScopeId, createElementVNode, ref, watchEffect, mergeProps, watch, resolveComponent, toDisplayString, createVNode, renderList, createTextVNode, provide, onMounted, onUnmounted, withKeys, withModifiers, withDirectives, vModelCheckbox, Transition, vShow, getCurrentScope, onScopeDispose, getCurrentInstance, onBeforeMount, nextTick, unref, reactive, toRefs, Teleport, toHandlers,
|
|
20
|
+
import { inject, defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, normalizeStyle, withCtx, createElementBlock, renderSlot, createCommentVNode, Fragment, pushScopeId, popScopeId, createElementVNode, ref, watchEffect, mergeProps, watch, resolveComponent, toDisplayString, createVNode, renderList, createTextVNode, provide, onMounted, onUnmounted, withKeys, withModifiers, withDirectives, vModelCheckbox, Transition, vShow, getCurrentScope, onScopeDispose, getCurrentInstance, onBeforeMount, nextTick, unref, reactive, toRefs, Teleport, toHandlers, TransitionGroup, useCssModule, vModelRadio, vModelSelect, onBeforeUnmount } from "vue";
|
|
21
21
|
const isHex = (hex) => /^#(?:[A-Fa-f0-9]{3}){1,2}$/.test(hex);
|
|
22
22
|
const isRGB = (rgb) => /^rgb[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*(?:,(?![)])|(?=[)]))){3}[)]$/.test(rgb);
|
|
23
23
|
const isRGBA = (rgba) => /^^rgba[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*,){3}\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/.test(rgba);
|
|
@@ -365,7 +365,7 @@ const tailwindColors = Object.freeze({
|
|
|
365
365
|
900: "#881337"
|
|
366
366
|
}
|
|
367
367
|
});
|
|
368
|
-
var version = "1.0.0-alpha.
|
|
368
|
+
var version = "1.0.0-alpha.9";
|
|
369
369
|
const injectTabKey = Symbol();
|
|
370
370
|
const injectFormKey = Symbol();
|
|
371
371
|
const injectIconsKey = Symbol();
|
|
@@ -656,7 +656,7 @@ const _sfc_main$H = defineComponent({
|
|
|
656
656
|
const computedViewBox = ref(props.viewBox);
|
|
657
657
|
const attrs = ref({});
|
|
658
658
|
watchEffect(() => {
|
|
659
|
-
const injectedIcon = icons[props.icon];
|
|
659
|
+
const injectedIcon = icons && icons[props.icon];
|
|
660
660
|
isWrapSVG.value = false;
|
|
661
661
|
computedIcon.value = injectedIcon;
|
|
662
662
|
if (injectedIcon) {
|
|
@@ -2405,6 +2405,48 @@ function useScroll(element, options = {}) {
|
|
|
2405
2405
|
directions
|
|
2406
2406
|
};
|
|
2407
2407
|
}
|
|
2408
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
2409
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
2410
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
2411
|
+
var __objRest$1 = (source, exclude) => {
|
|
2412
|
+
var target = {};
|
|
2413
|
+
for (var prop in source)
|
|
2414
|
+
if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2415
|
+
target[prop] = source[prop];
|
|
2416
|
+
if (source != null && __getOwnPropSymbols$6)
|
|
2417
|
+
for (var prop of __getOwnPropSymbols$6(source)) {
|
|
2418
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
|
|
2419
|
+
target[prop] = source[prop];
|
|
2420
|
+
}
|
|
2421
|
+
return target;
|
|
2422
|
+
};
|
|
2423
|
+
function useMutationObserver(target, callback, options) {
|
|
2424
|
+
const _a2 = options, { window: window2 = defaultWindow } = _a2, mutationOptions = __objRest$1(_a2, ["window"]);
|
|
2425
|
+
let observer;
|
|
2426
|
+
const isSupported = window2 && "MutationObserver" in window2;
|
|
2427
|
+
const cleanup = () => {
|
|
2428
|
+
if (observer) {
|
|
2429
|
+
observer.disconnect();
|
|
2430
|
+
observer = void 0;
|
|
2431
|
+
}
|
|
2432
|
+
};
|
|
2433
|
+
const stopWatch = watch(() => unrefElement(target), (el) => {
|
|
2434
|
+
cleanup();
|
|
2435
|
+
if (isSupported && window2 && el) {
|
|
2436
|
+
observer = new MutationObserver(callback);
|
|
2437
|
+
observer.observe(el, mutationOptions);
|
|
2438
|
+
}
|
|
2439
|
+
}, { immediate: true });
|
|
2440
|
+
const stop = () => {
|
|
2441
|
+
cleanup();
|
|
2442
|
+
stopWatch();
|
|
2443
|
+
};
|
|
2444
|
+
tryOnScopeDispose(stop);
|
|
2445
|
+
return {
|
|
2446
|
+
isSupported,
|
|
2447
|
+
stop
|
|
2448
|
+
};
|
|
2449
|
+
}
|
|
2408
2450
|
var SwipeDirection;
|
|
2409
2451
|
(function(SwipeDirection2) {
|
|
2410
2452
|
SwipeDirection2["UP"] = "UP";
|
|
@@ -3244,22 +3286,16 @@ const _sfc_main$p = defineComponent({
|
|
|
3244
3286
|
});
|
|
3245
3287
|
const cItem = computed(() => __spreadValues(__spreadValues({}, props), props.item));
|
|
3246
3288
|
const htmlTag = cItem.value.to || cItem.value.href ? "x-link" : "div";
|
|
3247
|
-
const isSupported = window && "MutationObserver" in window;
|
|
3248
|
-
const classObserver = isSupported ? new MutationObserver(check) : null;
|
|
3249
3289
|
onMounted(() => {
|
|
3250
3290
|
if (!elRef.value)
|
|
3251
3291
|
return;
|
|
3252
3292
|
check();
|
|
3253
|
-
if (
|
|
3254
|
-
|
|
3293
|
+
if (htmlTag === "x-link")
|
|
3294
|
+
useMutationObserver(elRef.value.$el, check, {
|
|
3255
3295
|
attributes: true,
|
|
3256
3296
|
attributeFilter: ["class"]
|
|
3257
3297
|
});
|
|
3258
3298
|
});
|
|
3259
|
-
onBeforeUnmount(() => {
|
|
3260
|
-
if (classObserver)
|
|
3261
|
-
classObserver.disconnect();
|
|
3262
|
-
});
|
|
3263
3299
|
function onItemClick(e) {
|
|
3264
3300
|
if (cItem.value.disabled) {
|
|
3265
3301
|
e.stopPropagation();
|
|
@@ -3444,7 +3480,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3444
3480
|
const cssModules$2 = {
|
|
3445
3481
|
"$style": style0$2
|
|
3446
3482
|
};
|
|
3447
|
-
var XMenuItem = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$p], ["__cssModules", cssModules$2], ["__scopeId", "data-v-
|
|
3483
|
+
var XMenuItem = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$p], ["__cssModules", cssModules$2], ["__scopeId", "data-v-295f8cb3"]]);
|
|
3448
3484
|
const _sfc_main$o = defineComponent({
|
|
3449
3485
|
name: "XMenu",
|
|
3450
3486
|
components: {
|
|
@@ -3717,14 +3753,23 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3717
3753
|
]);
|
|
3718
3754
|
}
|
|
3719
3755
|
var Modal = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n]]);
|
|
3756
|
+
const _sfc_main$m = defineComponent({
|
|
3757
|
+
name: "XSpacer"
|
|
3758
|
+
});
|
|
3759
|
+
const _hoisted_1$e = { class: "flex-grow" };
|
|
3760
|
+
function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3761
|
+
return openBlock(), createElementBlock("div", _hoisted_1$e);
|
|
3762
|
+
}
|
|
3763
|
+
var XSpacer = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$m]]);
|
|
3720
3764
|
const validators$4 = {
|
|
3721
3765
|
align: ["left", "right"],
|
|
3722
3766
|
position: ["bottom", "top"]
|
|
3723
3767
|
};
|
|
3724
|
-
const _sfc_main$
|
|
3768
|
+
const _sfc_main$l = defineComponent({
|
|
3725
3769
|
name: "XNotifications",
|
|
3726
3770
|
components: {
|
|
3727
|
-
XIcon
|
|
3771
|
+
XIcon,
|
|
3772
|
+
XSpacer
|
|
3728
3773
|
},
|
|
3729
3774
|
validators: validators$4,
|
|
3730
3775
|
props: __spreadProps(__spreadValues({}, useColors.props("primary")), {
|
|
@@ -3872,14 +3917,14 @@ const _sfc_main$m = defineComponent({
|
|
|
3872
3917
|
};
|
|
3873
3918
|
}
|
|
3874
3919
|
});
|
|
3875
|
-
const _hoisted_1$
|
|
3920
|
+
const _hoisted_1$d = { class: "flex items-center rounded-md px-4 py-3 bg-gray-800 dark:bg-gray-50 text-white dark:text-gray-900" };
|
|
3876
3921
|
const _hoisted_2$a = { class: "flex items-center flex-wrap" };
|
|
3877
3922
|
const _hoisted_3$8 = {
|
|
3878
3923
|
key: 0,
|
|
3879
3924
|
class: "font-semibold mr-2"
|
|
3880
3925
|
};
|
|
3881
3926
|
const _hoisted_4$7 = ["onClick"];
|
|
3882
|
-
function _sfc_render$
|
|
3927
|
+
function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3883
3928
|
const _component_x_icon = resolveComponent("x-icon");
|
|
3884
3929
|
const _component_x_spacer = resolveComponent("x-spacer");
|
|
3885
3930
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
@@ -3919,7 +3964,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3919
3964
|
]]),
|
|
3920
3965
|
style: normalizeStyle(notification.style)
|
|
3921
3966
|
}, [
|
|
3922
|
-
createElementVNode("div", _hoisted_1$
|
|
3967
|
+
createElementVNode("div", _hoisted_1$d, [
|
|
3923
3968
|
notification.icon ? (openBlock(), createBlock(_component_x_icon, {
|
|
3924
3969
|
key: 0,
|
|
3925
3970
|
filled: "",
|
|
@@ -3955,8 +4000,8 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3955
4000
|
]))
|
|
3956
4001
|
], 64);
|
|
3957
4002
|
}
|
|
3958
|
-
var Notifications = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3959
|
-
const _sfc_main$
|
|
4003
|
+
var Notifications = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l]]);
|
|
4004
|
+
const _sfc_main$k = defineComponent({
|
|
3960
4005
|
name: "XPaginationItem",
|
|
3961
4006
|
components: {
|
|
3962
4007
|
XButton
|
|
@@ -3988,7 +4033,7 @@ const _sfc_main$l = defineComponent({
|
|
|
3988
4033
|
};
|
|
3989
4034
|
}
|
|
3990
4035
|
});
|
|
3991
|
-
function _sfc_render$
|
|
4036
|
+
function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3992
4037
|
const _component_x_button = resolveComponent("x-button");
|
|
3993
4038
|
return openBlock(), createElementBlock("li", null, [
|
|
3994
4039
|
createVNode(_component_x_button, {
|
|
@@ -4006,8 +4051,8 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4006
4051
|
}, 8, ["to", "size", "class", "outlined", "color"])
|
|
4007
4052
|
]);
|
|
4008
4053
|
}
|
|
4009
|
-
var XPaginationItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4010
|
-
const _sfc_main$
|
|
4054
|
+
var XPaginationItem = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$k]]);
|
|
4055
|
+
const _sfc_main$j = defineComponent({
|
|
4011
4056
|
name: "XPagination",
|
|
4012
4057
|
components: {
|
|
4013
4058
|
XIcon,
|
|
@@ -4108,7 +4153,7 @@ const _sfc_main$k = defineComponent({
|
|
|
4108
4153
|
};
|
|
4109
4154
|
}
|
|
4110
4155
|
});
|
|
4111
|
-
const _hoisted_1$
|
|
4156
|
+
const _hoisted_1$c = {
|
|
4112
4157
|
key: 0,
|
|
4113
4158
|
class: "flex items-center"
|
|
4114
4159
|
};
|
|
@@ -4120,12 +4165,12 @@ const _hoisted_5$3 = {
|
|
|
4120
4165
|
class: "flex items-center space-x-2"
|
|
4121
4166
|
};
|
|
4122
4167
|
const _hoisted_6$3 = ["onClick"];
|
|
4123
|
-
function _sfc_render$
|
|
4168
|
+
function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4124
4169
|
const _component_x_button = resolveComponent("x-button");
|
|
4125
4170
|
const _component_x_input = resolveComponent("x-input");
|
|
4126
4171
|
const _component_x_pagination_item = resolveComponent("x-pagination-item");
|
|
4127
4172
|
const _component_x_icon = resolveComponent("x-icon");
|
|
4128
|
-
return _ctx.variant === "quick" ? (openBlock(), createElementBlock("ul", _hoisted_1$
|
|
4173
|
+
return _ctx.variant === "quick" ? (openBlock(), createElementBlock("ul", _hoisted_1$c, [
|
|
4129
4174
|
createVNode(_component_x_button, {
|
|
4130
4175
|
icon: _ctx.prevIcon,
|
|
4131
4176
|
size: _ctx.quickButtonSize,
|
|
@@ -4201,7 +4246,7 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4201
4246
|
}), 128))
|
|
4202
4247
|
], 4)) : createCommentVNode("", true);
|
|
4203
4248
|
}
|
|
4204
|
-
var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4249
|
+
var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j]]);
|
|
4205
4250
|
const popover = "_popover_2vipi_2";
|
|
4206
4251
|
const popoverContent = "_popoverContent_2vipi_3";
|
|
4207
4252
|
const popoverTop = "_popoverTop_2vipi_8";
|
|
@@ -4223,7 +4268,7 @@ const validators$3 = {
|
|
|
4223
4268
|
align: ["bottom", "center", "left", "right", "top"],
|
|
4224
4269
|
position: ["bottom", "left", "right", "top"]
|
|
4225
4270
|
};
|
|
4226
|
-
const _sfc_main$
|
|
4271
|
+
const _sfc_main$i = defineComponent({
|
|
4227
4272
|
name: "XPopover",
|
|
4228
4273
|
validators: validators$3,
|
|
4229
4274
|
props: {
|
|
@@ -4315,7 +4360,7 @@ const _sfc_main$j = defineComponent({
|
|
|
4315
4360
|
};
|
|
4316
4361
|
}
|
|
4317
4362
|
});
|
|
4318
|
-
function _sfc_render$
|
|
4363
|
+
function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4319
4364
|
return openBlock(), createElementBlock("div", {
|
|
4320
4365
|
ref: "elRef",
|
|
4321
4366
|
class: normalizeClass(["inline-block relative", [
|
|
@@ -4345,8 +4390,8 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4345
4390
|
const cssModules$1 = {
|
|
4346
4391
|
"$style": style0$1
|
|
4347
4392
|
};
|
|
4348
|
-
var XPopover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4349
|
-
const _sfc_main$
|
|
4393
|
+
var XPopover = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$i], ["__cssModules", cssModules$1]]);
|
|
4394
|
+
const _sfc_main$h = defineComponent({
|
|
4350
4395
|
name: "XPopoverContainer",
|
|
4351
4396
|
props: {
|
|
4352
4397
|
tag: {
|
|
@@ -4355,7 +4400,7 @@ const _sfc_main$i = defineComponent({
|
|
|
4355
4400
|
}
|
|
4356
4401
|
}
|
|
4357
4402
|
});
|
|
4358
|
-
function _sfc_render$
|
|
4403
|
+
function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4359
4404
|
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), { class: "block w-full bg-white dark:bg-gray-700 shadow-lg rounded-md border border-gray-200 dark:border-gray-800" }, {
|
|
4360
4405
|
default: withCtx(() => [
|
|
4361
4406
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -4363,8 +4408,8 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4363
4408
|
_: 3
|
|
4364
4409
|
});
|
|
4365
4410
|
}
|
|
4366
|
-
var XPopoverContainer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4367
|
-
const _sfc_main$
|
|
4411
|
+
var XPopoverContainer = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h]]);
|
|
4412
|
+
const _sfc_main$g = defineComponent({
|
|
4368
4413
|
name: "XProgress",
|
|
4369
4414
|
props: __spreadProps(__spreadValues({}, useColors.props("primary")), {
|
|
4370
4415
|
percentage: {
|
|
@@ -4399,7 +4444,7 @@ const _sfc_main$h = defineComponent({
|
|
|
4399
4444
|
};
|
|
4400
4445
|
}
|
|
4401
4446
|
});
|
|
4402
|
-
function _sfc_render$
|
|
4447
|
+
function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4403
4448
|
return openBlock(), createElementBlock("div", {
|
|
4404
4449
|
class: normalizeClass(["relative rounded bg-gray-100 dark:bg-gray-700 overflow-hidden pointer-events-none", [_ctx.thick ? "h-1.5" : "h-1"]]),
|
|
4405
4450
|
style: normalizeStyle(_ctx.style)
|
|
@@ -4422,11 +4467,11 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4422
4467
|
}, null, 6)) : createCommentVNode("", true)
|
|
4423
4468
|
], 6);
|
|
4424
4469
|
}
|
|
4425
|
-
var XProgress = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4470
|
+
var XProgress = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g]]);
|
|
4426
4471
|
var style0 = {
|
|
4427
4472
|
"radio--glow": "_radio--glow_14rlz_1"
|
|
4428
4473
|
};
|
|
4429
|
-
const _sfc_main$
|
|
4474
|
+
const _sfc_main$f = defineComponent({
|
|
4430
4475
|
name: "XRadio",
|
|
4431
4476
|
components: {
|
|
4432
4477
|
XSpinner
|
|
@@ -4523,7 +4568,7 @@ const _sfc_main$g = defineComponent({
|
|
|
4523
4568
|
}
|
|
4524
4569
|
});
|
|
4525
4570
|
const _withScopeId = (n) => (pushScopeId("data-v-4e34dad2"), n = n(), popScopeId(), n);
|
|
4526
|
-
const _hoisted_1$
|
|
4571
|
+
const _hoisted_1$b = ["aria-selected", "aria-disabled"];
|
|
4527
4572
|
const _hoisted_2$8 = ["name", "required", "disabled"];
|
|
4528
4573
|
const _hoisted_3$6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("circle", {
|
|
4529
4574
|
cx: "10",
|
|
@@ -4535,7 +4580,7 @@ const _hoisted_4$5 = [
|
|
|
4535
4580
|
];
|
|
4536
4581
|
const _hoisted_5$2 = ["textContent"];
|
|
4537
4582
|
const _hoisted_6$2 = ["textContent"];
|
|
4538
|
-
function _sfc_render$
|
|
4583
|
+
function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4539
4584
|
const _component_x_spinner = resolveComponent("x-spinner");
|
|
4540
4585
|
return openBlock(), createElementBlock("label", {
|
|
4541
4586
|
ref: "elRef",
|
|
@@ -4613,13 +4658,13 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4613
4658
|
class: "text-sm text-red-500 mt-1",
|
|
4614
4659
|
textContent: toDisplayString(_ctx.errorInternal)
|
|
4615
4660
|
}, null, 8, _hoisted_6$2)) : createCommentVNode("", true)
|
|
4616
|
-
], 44, _hoisted_1$
|
|
4661
|
+
], 44, _hoisted_1$b);
|
|
4617
4662
|
}
|
|
4618
4663
|
const cssModules = {
|
|
4619
4664
|
"$style": style0
|
|
4620
4665
|
};
|
|
4621
|
-
var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4622
|
-
const _sfc_main$
|
|
4666
|
+
var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f], ["__cssModules", cssModules], ["__scopeId", "data-v-4e34dad2"]]);
|
|
4667
|
+
const _sfc_main$e = defineComponent({
|
|
4623
4668
|
name: "XTag",
|
|
4624
4669
|
props: __spreadProps(__spreadValues(__spreadValues({}, useCommon.props()), useColors.props("gray")), {
|
|
4625
4670
|
tag: {
|
|
@@ -4662,7 +4707,7 @@ const _sfc_main$f = defineComponent({
|
|
|
4662
4707
|
};
|
|
4663
4708
|
}
|
|
4664
4709
|
});
|
|
4665
|
-
const _hoisted_1$
|
|
4710
|
+
const _hoisted_1$a = {
|
|
4666
4711
|
key: 0,
|
|
4667
4712
|
class: "flex items-center"
|
|
4668
4713
|
};
|
|
@@ -4670,7 +4715,7 @@ const _hoisted_2$7 = /* @__PURE__ */ createElementVNode("path", { d: "M6 18L18 6
|
|
|
4670
4715
|
const _hoisted_3$5 = [
|
|
4671
4716
|
_hoisted_2$7
|
|
4672
4717
|
];
|
|
4673
|
-
function _sfc_render$
|
|
4718
|
+
function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4674
4719
|
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
|
4675
4720
|
class: normalizeClass([
|
|
4676
4721
|
"inline-flex items-center leading-none whitespace-nowrap text-[color:var(--x-text)] dark:text-[color:var(--x-dark-text)] border-[color:var(--x-border)",
|
|
@@ -4683,7 +4728,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4683
4728
|
style: normalizeStyle(_ctx.styles)
|
|
4684
4729
|
}, {
|
|
4685
4730
|
default: withCtx(() => [
|
|
4686
|
-
_ctx.removable ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
4731
|
+
_ctx.removable ? (openBlock(), createElementBlock("span", _hoisted_1$a, [
|
|
4687
4732
|
renderSlot(_ctx.$slots, "default"),
|
|
4688
4733
|
(openBlock(), createElementBlock("svg", {
|
|
4689
4734
|
width: "24",
|
|
@@ -4702,8 +4747,8 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4702
4747
|
_: 3
|
|
4703
4748
|
}, 8, ["style", "class"]);
|
|
4704
4749
|
}
|
|
4705
|
-
var XTag = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4706
|
-
const _sfc_main$
|
|
4750
|
+
var XTag = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e]]);
|
|
4751
|
+
const _sfc_main$d = defineComponent({
|
|
4707
4752
|
name: "XSelect",
|
|
4708
4753
|
components: {
|
|
4709
4754
|
XTag,
|
|
@@ -4936,7 +4981,7 @@ const _sfc_main$e = defineComponent({
|
|
|
4936
4981
|
});
|
|
4937
4982
|
}
|
|
4938
4983
|
});
|
|
4939
|
-
const _hoisted_1$
|
|
4984
|
+
const _hoisted_1$9 = ["textContent"];
|
|
4940
4985
|
const _hoisted_2$6 = { class: "relative" };
|
|
4941
4986
|
const _hoisted_3$4 = {
|
|
4942
4987
|
key: 0,
|
|
@@ -4956,7 +5001,7 @@ const _hoisted_10 = [
|
|
|
4956
5001
|
];
|
|
4957
5002
|
const _hoisted_11 = ["textContent"];
|
|
4958
5003
|
const _hoisted_12 = ["textContent"];
|
|
4959
|
-
function _sfc_render$
|
|
5004
|
+
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4960
5005
|
const _component_x_tag = resolveComponent("x-tag");
|
|
4961
5006
|
const _component_x_menu_item = resolveComponent("x-menu-item");
|
|
4962
5007
|
const _component_x_popover_container = resolveComponent("x-popover-container");
|
|
@@ -4971,7 +5016,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4971
5016
|
key: 0,
|
|
4972
5017
|
class: normalizeClass(["font-medium text-gray-800 dark:text-gray-200 mb-1", _ctx.labelClasses]),
|
|
4973
5018
|
textContent: toDisplayString(_ctx.label)
|
|
4974
|
-
}, null, 10, _hoisted_1$
|
|
5019
|
+
}, null, 10, _hoisted_1$9)) : createCommentVNode("", true),
|
|
4975
5020
|
createElementVNode("div", _hoisted_2$6, [
|
|
4976
5021
|
createVNode(_component_x_popover, {
|
|
4977
5022
|
ref: "popoverRef",
|
|
@@ -5088,8 +5133,8 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5088
5133
|
}, null, 8, _hoisted_12)) : createCommentVNode("", true)
|
|
5089
5134
|
], 2);
|
|
5090
5135
|
}
|
|
5091
|
-
var Select = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5092
|
-
const _sfc_main$
|
|
5136
|
+
var Select = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d]]);
|
|
5137
|
+
const _sfc_main$c = defineComponent({
|
|
5093
5138
|
name: "XSkeleton",
|
|
5094
5139
|
props: {
|
|
5095
5140
|
tag: {
|
|
@@ -5098,17 +5143,17 @@ const _sfc_main$d = defineComponent({
|
|
|
5098
5143
|
}
|
|
5099
5144
|
}
|
|
5100
5145
|
});
|
|
5101
|
-
const _hoisted_1$
|
|
5102
|
-
function _sfc_render$
|
|
5146
|
+
const _hoisted_1$8 = /* @__PURE__ */ createTextVNode(" \u200B ");
|
|
5147
|
+
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5103
5148
|
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), { class: "animate-pulse bg-gray-300 dark:bg-gray-600 rounded-md" }, {
|
|
5104
5149
|
default: withCtx(() => [
|
|
5105
|
-
_hoisted_1$
|
|
5150
|
+
_hoisted_1$8
|
|
5106
5151
|
]),
|
|
5107
5152
|
_: 1
|
|
5108
5153
|
});
|
|
5109
5154
|
}
|
|
5110
|
-
var Skeleton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5111
|
-
const _sfc_main$
|
|
5155
|
+
var Skeleton = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c]]);
|
|
5156
|
+
const _sfc_main$b = defineComponent({
|
|
5112
5157
|
name: "XSlider",
|
|
5113
5158
|
components: {
|
|
5114
5159
|
XProgress
|
|
@@ -5256,11 +5301,11 @@ const _sfc_main$c = defineComponent({
|
|
|
5256
5301
|
});
|
|
5257
5302
|
}
|
|
5258
5303
|
});
|
|
5259
|
-
const _hoisted_1$
|
|
5304
|
+
const _hoisted_1$7 = ["textContent"];
|
|
5260
5305
|
const _hoisted_2$5 = { class: "flex items-center relative w-full" };
|
|
5261
5306
|
const _hoisted_3$3 = { class: "-mx-2" };
|
|
5262
5307
|
const _hoisted_4$3 = ["textContent"];
|
|
5263
|
-
function _sfc_render$
|
|
5308
|
+
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5264
5309
|
const _component_x_progress = resolveComponent("x-progress");
|
|
5265
5310
|
return openBlock(), createElementBlock("label", {
|
|
5266
5311
|
ref: "elRef",
|
|
@@ -5272,7 +5317,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5272
5317
|
key: 0,
|
|
5273
5318
|
class: normalizeClass(["font-medium text-gray-800 dark:text-gray-200 mb-1", _ctx.labelClasses]),
|
|
5274
5319
|
textContent: toDisplayString(_ctx.label)
|
|
5275
|
-
}, null, 10, _hoisted_1$
|
|
5320
|
+
}, null, 10, _hoisted_1$7)) : createCommentVNode("", true),
|
|
5276
5321
|
createElementVNode("div", _hoisted_2$5, [
|
|
5277
5322
|
renderSlot(_ctx.$slots, "prefix", { value: _ctx.value }),
|
|
5278
5323
|
createElementVNode("div", {
|
|
@@ -5303,15 +5348,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5303
5348
|
}, null, 8, _hoisted_4$3)) : createCommentVNode("", true)
|
|
5304
5349
|
], 6);
|
|
5305
5350
|
}
|
|
5306
|
-
var Slider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5307
|
-
const _sfc_main$b = defineComponent({
|
|
5308
|
-
name: "XSpacer"
|
|
5309
|
-
});
|
|
5310
|
-
const _hoisted_1$7 = { class: "flex-grow" };
|
|
5311
|
-
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5312
|
-
return openBlock(), createElementBlock("div", _hoisted_1$7);
|
|
5313
|
-
}
|
|
5314
|
-
var Spacer = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b]]);
|
|
5351
|
+
var Slider = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b]]);
|
|
5315
5352
|
const _sfc_main$a = defineComponent({
|
|
5316
5353
|
name: "XTableHead"
|
|
5317
5354
|
});
|
|
@@ -5713,23 +5750,17 @@ const _sfc_main$4 = defineComponent({
|
|
|
5713
5750
|
grow: false
|
|
5714
5751
|
})
|
|
5715
5752
|
});
|
|
5716
|
-
const isSupported = window && "MutationObserver" in window;
|
|
5717
|
-
const mutationObserver = isSupported ? new MutationObserver(check) : null;
|
|
5718
5753
|
const cExact = computed(() => tabs.state.exact || props.exact);
|
|
5719
5754
|
const cSize = computed(() => props.size || tabs.state.size);
|
|
5720
5755
|
onMounted(() => {
|
|
5721
5756
|
teleportTo.value = tabs.tabsContentRef.value;
|
|
5722
|
-
if (props.to)
|
|
5757
|
+
if (props.to) {
|
|
5723
5758
|
check();
|
|
5724
|
-
|
|
5725
|
-
mutationObserver == null ? void 0 : mutationObserver.observe(elRef.value.$el, {
|
|
5759
|
+
useMutationObserver(elRef.value.$el, check, {
|
|
5726
5760
|
attributes: true,
|
|
5727
5761
|
attributeFilter: ["class"]
|
|
5728
5762
|
});
|
|
5729
|
-
|
|
5730
|
-
onBeforeUnmount(() => {
|
|
5731
|
-
if (mutationObserver)
|
|
5732
|
-
mutationObserver.disconnect();
|
|
5763
|
+
}
|
|
5733
5764
|
});
|
|
5734
5765
|
function check() {
|
|
5735
5766
|
var _a2;
|
|
@@ -6287,7 +6318,7 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
6287
6318
|
XSelect: Select,
|
|
6288
6319
|
XSkeleton: Skeleton,
|
|
6289
6320
|
XSlider: Slider,
|
|
6290
|
-
XSpacer
|
|
6321
|
+
XSpacer,
|
|
6291
6322
|
XSpinner,
|
|
6292
6323
|
XTable: Table,
|
|
6293
6324
|
XTableBody: TableBody,
|
|
@@ -6319,7 +6350,7 @@ const create = (createOptions = {}) => {
|
|
|
6319
6350
|
app.component(`${options.prefix}${component.name.slice(1)}`, component);
|
|
6320
6351
|
});
|
|
6321
6352
|
app.provide(injectColorsKey, options.colors);
|
|
6322
|
-
app.provide(injectIconsKey, options.icons);
|
|
6353
|
+
app.provide(injectIconsKey, options.icons || {});
|
|
6323
6354
|
};
|
|
6324
6355
|
return {
|
|
6325
6356
|
install: install2
|
|
@@ -6328,4 +6359,4 @@ const create = (createOptions = {}) => {
|
|
|
6328
6359
|
var install = create({
|
|
6329
6360
|
components: Object.keys(components).map((key) => components[key])
|
|
6330
6361
|
});
|
|
6331
|
-
export { Alert as XAlert, Avatar as XAvatar, Badge as XBadge, Breadcrumbs as XBreadcrumbs, XButton, ButtonGroup as XButtonGroup, Card as XCard, Checkbox as XCheckbox, XCollapse, Container as XContainer, XDivider, Drawer as XDrawer, Form as XForm, XIcon, Image$1 as XImage, Input as XInput, XLink, Menu as XMenu, XMenuItem, Modal as XModal, Notifications as XNotifications, Pagination as XPagination, XPaginationItem, XPopover, XPopoverContainer, XProgress, Radio as XRadio, XScroll, Select as XSelect, Skeleton as XSkeleton, Slider as XSlider,
|
|
6362
|
+
export { Alert as XAlert, Avatar as XAvatar, Badge as XBadge, Breadcrumbs as XBreadcrumbs, XButton, ButtonGroup as XButtonGroup, Card as XCard, Checkbox as XCheckbox, XCollapse, Container as XContainer, XDivider, Drawer as XDrawer, Form as XForm, XIcon, Image$1 as XImage, Input as XInput, XLink, Menu as XMenu, XMenuItem, Modal as XModal, Notifications as XNotifications, Pagination as XPagination, XPaginationItem, XPopover, XPopoverContainer, XProgress, Radio as XRadio, XScroll, Select as XSelect, Skeleton as XSkeleton, Slider as XSlider, XSpacer, XSpinner, Tab as XTab, TabGroup as XTabGroup, Table as XTable, TableBody as XTableBody, TableCell as XTableCell, TableHead as XTableHead, TableHeader as XTableHeader, TableRow as XTableRow, XTag, Textarea as XTextarea, Toggle as XToggle, Tooltip as XTooltip, tailwindColors as colors, create as createUI, install as default, injectButtonGroupKey, injectColorsKey, injectFormKey, injectIconsKey, injectNotificationKey, injectTabKey, useCSS, useColors, useCommon, useInputtable, useInteractive, useNotification, version };
|
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._alert_1sdha_2[data-v-35ce54d8]{color:var(--x-alert-text);background-color:var(--x-alert-bg);border-color:var(--x-alert-border)}._alert--glow_1sdha_1[data-v-35ce54d8]{box-shadow:0 0 #000,0 0 #000,0 10px 15px -3px var(--x-alert-glow),0 4px 6px -4px var(--x-alert-glow)}.dark ._alert_1sdha_2[data-v-35ce54d8]{color:var(--x-dark-alert-text, var(--x-alert-text));background-color:var(--x-dark-alert-bg, var(--x-alert-bg));border-color:var(--x-dark-alert-border, var(--x-alert-border))}._avatar_v7jzc_2[data-v-243016db]{color:var(--x-avatar-text);background-color:var(--x-avatar-bg);border-color:var(--x-avatar-border)}.dark ._avatar_v7jzc_2[data-v-243016db]{color:var(--x-dark-avatar-text, var(--x-avatar-text));background-color:var(--x-dark-avatar-bg, var(--x-avatar-bg));border-color:var(--x-dark-avatar-border, var(--x-avatar-border))}._button_1sbr9_2[data-v-6cb75733]{color:var(--x-button-text);background-color:var(--x-button-bg);border-color:var(--x-button-border)}._button--glow_1sbr9_1[data-v-6cb75733]{box-shadow:0 0 #000,0 0 #000,0 10px 15px -3px var(--x-button-glow),0 4px 6px -4px var(--x-button-glow)}._button_1sbr9_2[data-v-6cb75733]:hover{color:var(--x-button-text-hover, var(--x-button-text));background-color:var(--x-button-bg-hover, var(--x-button-bg));border-color:var(--x-button-border-hover, var(--x-button-border))}._button_1sbr9_2[data-v-6cb75733]:active{color:var(--x-button-text-active, var(--x-button-text));background-color:var(--x-button-bg-active, var(--x-button-bg));border-color:var(--x-button-border-active, var(--x-button-border))}.dark ._button_1sbr9_2[data-v-6cb75733]{color:var(--x-dark-button-text, var(--x-button-text));background-color:var(--x-dark-button-bg, var(--x-button-bg));border-color:var(--x-dark-button-border, var(--x-button-border))}.dark ._button_1sbr9_2[data-v-6cb75733]:hover{color:var(--x-dark-button-text-hover, var(--x-dark-button-text, var(--x-button-text)));background-color:var(--x-dark-button-bg-hover, var(--x-dark-button-bg, var(--x-button-bg)));border-color:var(--x-dark-button-border-hover, var(--x-dark-button-border, var(--x-button-border)))}.dark ._button_1sbr9_2[data-v-6cb75733]:active{color:var(--x-dark-button-text-active, var(--x-dark-button-text));background-color:var(--x-dark-button-bg-active, var(--x-dark-button-bg, var(--x-button-bg)));border-color:var(--x-dark-button-border-active, var(--x-dark-button-border, var(--x-button-border)))}._button-group_s7fyl_2:not(._button-group--rounded_s7fyl_1)>:first-child{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem;border-left-width:1px}._button-group_s7fyl_2:not(._button-group--rounded_s7fyl_1)>:last-child{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}._button-group--rounded_s7fyl_1>:first-of-type{border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-left-width:1px}._button-group--rounded_s7fyl_1>:last-child{border-top-right-radius:9999px;border-bottom-right-radius:9999px}._checkbox--glow_1dz66_1[data-v-05f49cb5]{box-shadow:0 0 #000,0 0 #000,0 10px 15px -3px var(--x-glow),0 4px 6px -4px var(--x-glow)}._scrollWrap_1k3q9_2[data-v-7362ac18]:before,._scrollWrap_1k3q9_2[data-v-7362ac18]:after{content:"";pointer-events:none;position:absolute;z-index:1;transition:box-shadow .2s}._scrollWrap_1k3q9_2._horizontal_1k3q9_11[data-v-7362ac18]:before,._scrollWrap_1k3q9_2._horizontal_1k3q9_11[data-v-7362ac18]:after{top:0;bottom:0;width:20px}._scrollWrap_1k3q9_2._vertical_1k3q9_17[data-v-7362ac18]:before,._scrollWrap_1k3q9_2._vertical_1k3q9_17[data-v-7362ac18]:after{right:0;left:0;height:20px}._scrollWrap_1k3q9_2._horizontal_1k3q9_11[data-v-7362ac18]:before{left:0}._scrollWrap_1k3q9_2._horizontal_1k3q9_11[data-v-7362ac18]:after{right:0}._scrollWrap_1k3q9_2._vertical_1k3q9_17[data-v-7362ac18]:before{top:0}._scrollWrap_1k3q9_2._vertical_1k3q9_17[data-v-7362ac18]:after{bottom:0}._scrollWrap_1k3q9_2._shadow-left_1k3q9_36[data-v-7362ac18]:before{box-shadow:inset 12px 0 10px -10px #00000012}._scrollWrap_1k3q9_2._shadow-right_1k3q9_40[data-v-7362ac18]:after{box-shadow:inset -12px 0 10px -10px #00000012}._scrollWrap_1k3q9_2._shadow-top_1k3q9_44[data-v-7362ac18]:before{box-shadow:inset 0 12px 10px -10px #00000012}._scrollWrap_1k3q9_2._shadow-bottom_1k3q9_48[data-v-7362ac18]:after{box-shadow:inset 0 -12px 10px -10px #00000012}._hideScroll_1k3q9_53[data-v-7362ac18]{-ms-overflow-style:auto;scrollbar-width:none}._hideScroll_1k3q9_53[data-v-7362ac18]::-webkit-scrollbar{display:none}._link--shadow_1tilo_1[data-v-af336fea]{box-shadow:inset 0 -.315em 0 0 var(--x-shadow)}._link--shadow_1tilo_1[data-v-af336fea]:hover{box-shadow:inset 0 -1.125em 0 0 var(--x-shadow)}.dark ._link--shadow_1tilo_1[data-v-af336fea]{box-shadow:inset 0 -.315em 0 0 var(--x-dark-shadow)}.dark ._link--shadow_1tilo_1[data-v-af336fea]:hover{box-shadow:inset 0 -1.125em 0 0 var(--x-dark-shadow)}._menu-item_1v1kj_2[data-v-
|
|
1
|
+
._alert_1sdha_2[data-v-35ce54d8]{color:var(--x-alert-text);background-color:var(--x-alert-bg);border-color:var(--x-alert-border)}._alert--glow_1sdha_1[data-v-35ce54d8]{box-shadow:0 0 #000,0 0 #000,0 10px 15px -3px var(--x-alert-glow),0 4px 6px -4px var(--x-alert-glow)}.dark ._alert_1sdha_2[data-v-35ce54d8]{color:var(--x-dark-alert-text, var(--x-alert-text));background-color:var(--x-dark-alert-bg, var(--x-alert-bg));border-color:var(--x-dark-alert-border, var(--x-alert-border))}._avatar_v7jzc_2[data-v-243016db]{color:var(--x-avatar-text);background-color:var(--x-avatar-bg);border-color:var(--x-avatar-border)}.dark ._avatar_v7jzc_2[data-v-243016db]{color:var(--x-dark-avatar-text, var(--x-avatar-text));background-color:var(--x-dark-avatar-bg, var(--x-avatar-bg));border-color:var(--x-dark-avatar-border, var(--x-avatar-border))}._button_1sbr9_2[data-v-6cb75733]{color:var(--x-button-text);background-color:var(--x-button-bg);border-color:var(--x-button-border)}._button--glow_1sbr9_1[data-v-6cb75733]{box-shadow:0 0 #000,0 0 #000,0 10px 15px -3px var(--x-button-glow),0 4px 6px -4px var(--x-button-glow)}._button_1sbr9_2[data-v-6cb75733]:hover{color:var(--x-button-text-hover, var(--x-button-text));background-color:var(--x-button-bg-hover, var(--x-button-bg));border-color:var(--x-button-border-hover, var(--x-button-border))}._button_1sbr9_2[data-v-6cb75733]:active{color:var(--x-button-text-active, var(--x-button-text));background-color:var(--x-button-bg-active, var(--x-button-bg));border-color:var(--x-button-border-active, var(--x-button-border))}.dark ._button_1sbr9_2[data-v-6cb75733]{color:var(--x-dark-button-text, var(--x-button-text));background-color:var(--x-dark-button-bg, var(--x-button-bg));border-color:var(--x-dark-button-border, var(--x-button-border))}.dark ._button_1sbr9_2[data-v-6cb75733]:hover{color:var(--x-dark-button-text-hover, var(--x-dark-button-text, var(--x-button-text)));background-color:var(--x-dark-button-bg-hover, var(--x-dark-button-bg, var(--x-button-bg)));border-color:var(--x-dark-button-border-hover, var(--x-dark-button-border, var(--x-button-border)))}.dark ._button_1sbr9_2[data-v-6cb75733]:active{color:var(--x-dark-button-text-active, var(--x-dark-button-text));background-color:var(--x-dark-button-bg-active, var(--x-dark-button-bg, var(--x-button-bg)));border-color:var(--x-dark-button-border-active, var(--x-dark-button-border, var(--x-button-border)))}._button-group_s7fyl_2:not(._button-group--rounded_s7fyl_1)>:first-child{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem;border-left-width:1px}._button-group_s7fyl_2:not(._button-group--rounded_s7fyl_1)>:last-child{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}._button-group--rounded_s7fyl_1>:first-of-type{border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-left-width:1px}._button-group--rounded_s7fyl_1>:last-child{border-top-right-radius:9999px;border-bottom-right-radius:9999px}._checkbox--glow_1dz66_1[data-v-05f49cb5]{box-shadow:0 0 #000,0 0 #000,0 10px 15px -3px var(--x-glow),0 4px 6px -4px var(--x-glow)}._scrollWrap_1k3q9_2[data-v-7362ac18]:before,._scrollWrap_1k3q9_2[data-v-7362ac18]:after{content:"";pointer-events:none;position:absolute;z-index:1;transition:box-shadow .2s}._scrollWrap_1k3q9_2._horizontal_1k3q9_11[data-v-7362ac18]:before,._scrollWrap_1k3q9_2._horizontal_1k3q9_11[data-v-7362ac18]:after{top:0;bottom:0;width:20px}._scrollWrap_1k3q9_2._vertical_1k3q9_17[data-v-7362ac18]:before,._scrollWrap_1k3q9_2._vertical_1k3q9_17[data-v-7362ac18]:after{right:0;left:0;height:20px}._scrollWrap_1k3q9_2._horizontal_1k3q9_11[data-v-7362ac18]:before{left:0}._scrollWrap_1k3q9_2._horizontal_1k3q9_11[data-v-7362ac18]:after{right:0}._scrollWrap_1k3q9_2._vertical_1k3q9_17[data-v-7362ac18]:before{top:0}._scrollWrap_1k3q9_2._vertical_1k3q9_17[data-v-7362ac18]:after{bottom:0}._scrollWrap_1k3q9_2._shadow-left_1k3q9_36[data-v-7362ac18]:before{box-shadow:inset 12px 0 10px -10px #00000012}._scrollWrap_1k3q9_2._shadow-right_1k3q9_40[data-v-7362ac18]:after{box-shadow:inset -12px 0 10px -10px #00000012}._scrollWrap_1k3q9_2._shadow-top_1k3q9_44[data-v-7362ac18]:before{box-shadow:inset 0 12px 10px -10px #00000012}._scrollWrap_1k3q9_2._shadow-bottom_1k3q9_48[data-v-7362ac18]:after{box-shadow:inset 0 -12px 10px -10px #00000012}._hideScroll_1k3q9_53[data-v-7362ac18]{-ms-overflow-style:auto;scrollbar-width:none}._hideScroll_1k3q9_53[data-v-7362ac18]::-webkit-scrollbar{display:none}._link--shadow_1tilo_1[data-v-af336fea]{box-shadow:inset 0 -.315em 0 0 var(--x-shadow)}._link--shadow_1tilo_1[data-v-af336fea]:hover{box-shadow:inset 0 -1.125em 0 0 var(--x-shadow)}.dark ._link--shadow_1tilo_1[data-v-af336fea]{box-shadow:inset 0 -.315em 0 0 var(--x-dark-shadow)}.dark ._link--shadow_1tilo_1[data-v-af336fea]:hover{box-shadow:inset 0 -1.125em 0 0 var(--x-dark-shadow)}._menu-item_1v1kj_2[data-v-295f8cb3]{color:var(--x-text);background-color:var(--x-bg)}._menu-item_1v1kj_2[data-v-295f8cb3]:before{content:"";position:absolute;left:-1px;height:100%;width:1px;background-color:transparent}._menu-item_1v1kj_2[data-v-295f8cb3]:hover{color:var(--x-text-hover, var(--x-text));background-color:var(--x-bg-hover, var(--x-bg))}.dark ._menu-item_1v1kj_2[data-v-295f8cb3]{color:var(--x-dark-text);background:var(--x-dark-bg)}.dark ._menu-item_1v1kj_2[data-v-295f8cb3]:hover{color:var(--x-dark-text-hover, var(--x-dark-text));background-color:var(--x-dark-bg-hover, var(--x-dark-bg))}.x-menu-inner ._menu-item_1v1kj_2[data-v-295f8cb3]:hover:before,.x-menu-inner ._menu-item--active_1v1kj_1[data-v-295f8cb3]:before{background-color:var(--x-border-hover)}._popover_2vipi_2 ._popoverContent_2vipi_3{visibility:hidden;transition-duration:.1s;transition-timing-function:cubic-bezier(.4,0,1,1)}._popover_2vipi_2 ._popoverTop_2vipi_8{--tw-translate-y: .5rem}._popover_2vipi_2 ._popoverRight_2vipi_11{--tw-translate-x: -.5rem}._popover_2vipi_2 ._popoverBottom_2vipi_14{--tw-translate-y: -.25rem}._popover_2vipi_2 ._popoverLeft_2vipi_17{--tw-translate-x: .5rem}._popover_2vipi_2._hover_2vipi_21:hover ._popoverContent_2vipi_3,._popover_2vipi_2._is-open_2vipi_22 ._popoverContent_2vipi_3{visibility:visible;transition-duration:.15s;transition-timing-function:cubic-bezier(0,0,.2,1)}._popover_2vipi_2._hover_2vipi_21:hover ._popoverTop_2vipi_8,._popover_2vipi_2._is-open_2vipi_22 ._popoverTop_2vipi_8{--tw-translate-y: .25rem}._popover_2vipi_2._hover_2vipi_21:hover ._popoverRight_2vipi_11,._popover_2vipi_2._is-open_2vipi_22 ._popoverRight_2vipi_11{--tw-translate-x: 0px}._popover_2vipi_2._hover_2vipi_21:hover ._popoverBottom_2vipi_14,._popover_2vipi_2._is-open_2vipi_22 ._popoverBottom_2vipi_14{--tw-translate-y: .25rem}._popover_2vipi_2._hover_2vipi_21:hover ._popoverLeft_2vipi_17,._popover_2vipi_2._is-open_2vipi_22 ._popoverLeft_2vipi_17{--tw-translate-x: 0px}._radio--glow_14rlz_1[data-v-4e34dad2]{box-shadow:0 0 #000,0 0 #000,0 10px 15px -3px var(--x-glow),0 4px 6px -4px var(--x-glow)}
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.0.0-alpha.
|
|
1
|
+
declare const _default: "1.0.0-alpha.9";
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { defineComponent, ref, computed, watch, onMounted, onBeforeUnmount } from 'vue'
|
|
3
|
+
import { useMutationObserver } from '@vueuse/core'
|
|
3
4
|
import { useCSS } from '../../composables/css'
|
|
4
5
|
import { useColors } from '../../composables/colors'
|
|
5
6
|
import { useCommon } from '../../composables/common'
|
|
@@ -59,24 +60,18 @@ export default defineComponent({
|
|
|
59
60
|
}))
|
|
60
61
|
|
|
61
62
|
const htmlTag = cItem.value.to || cItem.value.href ? 'x-link' : 'div'
|
|
62
|
-
const isSupported = window && 'MutationObserver' in window
|
|
63
|
-
const classObserver = isSupported ? new MutationObserver(check) : null
|
|
64
63
|
|
|
65
64
|
onMounted(() => {
|
|
66
65
|
if (!elRef.value) return
|
|
67
66
|
|
|
68
67
|
check()
|
|
69
68
|
|
|
70
|
-
if (
|
|
69
|
+
if (htmlTag === 'x-link') useMutationObserver(elRef.value.$el, check, {
|
|
71
70
|
attributes: true,
|
|
72
71
|
attributeFilter: ['class'],
|
|
73
72
|
})
|
|
74
73
|
})
|
|
75
74
|
|
|
76
|
-
onBeforeUnmount(() => {
|
|
77
|
-
if (classObserver) classObserver.disconnect()
|
|
78
|
-
})
|
|
79
|
-
|
|
80
75
|
function onItemClick(e: Event) {
|
|
81
76
|
if (cItem.value.disabled) {
|
|
82
77
|
e.stopPropagation()
|
|
@@ -5,6 +5,7 @@ import { useColors } from '../../composables/colors'
|
|
|
5
5
|
import { useCSS } from '../../composables/css'
|
|
6
6
|
|
|
7
7
|
import XIcon from '../../components/icon/Icon.vue'
|
|
8
|
+
import XSpacer from '../../components/spacer/Spacer.vue'
|
|
8
9
|
|
|
9
10
|
const validators = {
|
|
10
11
|
align: ['left','right'],
|
|
@@ -37,6 +38,7 @@ export default defineComponent({
|
|
|
37
38
|
|
|
38
39
|
components: {
|
|
39
40
|
XIcon,
|
|
41
|
+
XSpacer,
|
|
40
42
|
},
|
|
41
43
|
|
|
42
44
|
validators,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { defineComponent, inject, reactive, computed, toRefs, ref, onMounted, onBeforeUnmount } from 'vue'
|
|
3
|
+
import { useMutationObserver } from '@vueuse/core'
|
|
3
4
|
import { injectTabKey } from '../../composables/keys'
|
|
4
5
|
import { useCommon } from '../../composables/common'
|
|
5
6
|
import XIcon from '../icon/Icon.vue'
|
|
@@ -45,25 +46,19 @@ export default defineComponent({
|
|
|
45
46
|
}),
|
|
46
47
|
})
|
|
47
48
|
|
|
48
|
-
const isSupported = window && 'MutationObserver' in window
|
|
49
|
-
const mutationObserver = isSupported ? new MutationObserver(check) : null
|
|
50
|
-
|
|
51
49
|
const cExact = computed(() => tabs.state.exact || props.exact)
|
|
52
50
|
const cSize = computed(() => props.size || tabs.state.size)
|
|
53
51
|
|
|
54
52
|
onMounted(() => {
|
|
55
53
|
teleportTo.value = tabs.tabsContentRef.value
|
|
56
54
|
|
|
57
|
-
if (props.to)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
onBeforeUnmount(() => {
|
|
66
|
-
if (mutationObserver) mutationObserver.disconnect()
|
|
55
|
+
if (props.to) {
|
|
56
|
+
check()
|
|
57
|
+
useMutationObserver(elRef.value.$el, check, {
|
|
58
|
+
attributes: true,
|
|
59
|
+
attributeFilter: ['class'],
|
|
60
|
+
})
|
|
61
|
+
}
|
|
67
62
|
})
|
|
68
63
|
|
|
69
64
|
function check() {
|