@indielayer/ui 1.0.0-alpha.0 → 1.0.0-alpha.2
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/README.md +26 -10
- package/lib/components/avatar/Avatar.vue.d.ts +2 -2
- package/lib/components/badge/Badge.vue.d.ts +2 -2
- package/lib/components/button/Button.vue.d.ts +2 -2
- package/lib/components/button/ButtonGroup.vue.d.ts +2 -2
- package/lib/components/checkbox/Checkbox.vue.d.ts +5 -4
- package/lib/components/drawer/Drawer.vue.d.ts +1 -1
- package/lib/components/icon/Icon.vue.d.ts +2 -2
- package/lib/components/index.d.ts +2 -2
- package/lib/components/input/Input.vue.d.ts +4 -3
- package/lib/components/menu/Menu.vue.d.ts +2 -2
- package/lib/components/menu/MenuItem.vue.d.ts +3 -3
- package/lib/components/notifications/Notifications.vue.d.ts +2 -2
- package/lib/components/pagination/Pagination.vue.d.ts +3 -2
- package/lib/components/pagination/PaginationItem.vue.d.ts +2 -2
- package/lib/components/radio/Radio.vue.d.ts +3 -3
- package/lib/components/select/Select.vue.d.ts +4 -3
- package/lib/components/slider/Slider.vue.d.ts +3 -3
- package/lib/components/spacer/Spacer.vue.d.ts +1 -1
- package/lib/components/spinner/Spinner.vue.d.ts +2 -2
- package/lib/components/{tabs → tab}/Tab.vue.d.ts +2 -2
- package/lib/components/{tabs/Tabs.vue.d.ts → tab/TabGroup.vue.d.ts} +0 -0
- package/lib/components/table/TableBody.vue.d.ts +1 -1
- package/lib/components/table/TableHead.vue.d.ts +1 -1
- package/lib/components/tag/Tag.vue.d.ts +2 -2
- package/lib/components/textarea/Textarea.vue.d.ts +4 -12
- package/lib/components/toggle/Toggle.vue.d.ts +3 -3
- package/lib/composables/colors.d.ts +1 -1
- package/lib/composables/css.d.ts +4 -4
- package/lib/composables/keys.d.ts +1 -0
- package/lib/create.d.ts +11 -0
- package/lib/index.cjs.js +2 -2
- package/lib/index.d.ts +2 -0
- package/lib/index.es.js +183 -107
- package/lib/install.d.ts +4 -6
- package/lib/nuxt.js +15 -16
- package/lib/nuxt.plugin.js +8 -0
- package/lib/style.css +1 -1
- package/lib/version.d.ts +1 -1
- package/package.json +19 -15
- package/src/components/alert/Alert.vue +164 -0
- package/src/components/avatar/Avatar.vue +137 -0
- package/src/components/badge/Badge.vue +107 -0
- package/src/components/breadcrumbs/Breadcrumbs.vue +60 -0
- package/src/components/button/Button.vue +433 -0
- package/src/components/button/ButtonGroup.vue +73 -0
- package/src/components/card/Card.vue +25 -0
- package/src/components/checkbox/Checkbox.vue +205 -0
- package/src/components/collapse/Collapse.vue +181 -0
- package/src/components/container/Container.vue +23 -0
- package/src/components/divider/Divider.vue +52 -0
- package/src/components/drawer/Drawer.vue +244 -0
- package/src/components/form/Form.vue +111 -0
- package/src/components/icon/Icon.vue +56 -0
- package/src/components/image/Image.vue +36 -0
- package/src/components/index.ts +45 -0
- package/src/components/input/Input.vue +198 -0
- package/src/components/link/Link.vue +110 -0
- package/src/components/menu/Menu.vue +118 -0
- package/src/components/menu/MenuItem.vue +277 -0
- package/src/components/modal/Modal.vue +175 -0
- package/src/components/notifications/Notifications.vue +318 -0
- package/src/components/pagination/Pagination.vue +181 -0
- package/src/components/pagination/PaginationItem.vue +58 -0
- package/src/components/popover/Popover.vue +194 -0
- package/src/components/popover/PopoverContainer.vue +23 -0
- package/src/components/progress/Progress.vue +86 -0
- package/src/components/radio/Radio.vue +220 -0
- package/src/components/scroll/Scroll.vue +143 -0
- package/src/components/select/Select.vue +408 -0
- package/src/components/skeleton/Skeleton.vue +23 -0
- package/src/components/slider/Slider.vue +240 -0
- package/src/components/spacer/Spacer.vue +11 -0
- package/src/components/spinner/Spinner.vue +45 -0
- package/src/components/tab/Tab.vue +100 -0
- package/src/components/tab/TabGroup.vue +151 -0
- package/src/components/table/Table.vue +172 -0
- package/src/components/table/TableBody.vue +13 -0
- package/src/components/table/TableCell.vue +78 -0
- package/src/components/table/TableHead.vue +15 -0
- package/src/components/table/TableHeader.vue +94 -0
- package/src/components/table/TableRow.vue +43 -0
- package/src/components/tag/Tag.vue +98 -0
- package/src/components/textarea/Textarea.vue +156 -0
- package/src/components/toggle/Toggle.vue +144 -0
- package/src/components/tooltip/Tooltip.vue +26 -0
- package/src/composables/colors-utils.ts +378 -0
- package/src/composables/colors.ts +82 -0
- package/src/composables/common.ts +20 -0
- package/src/composables/css.ts +45 -0
- package/src/composables/index.ts +7 -0
- package/src/composables/inputtable.ts +128 -0
- package/src/composables/interactive.ts +16 -0
- package/src/composables/keys.ts +8 -0
- package/src/composables/notification.ts +10 -0
- package/src/create.ts +36 -0
- package/src/exports/nuxt.js +32 -0
- package/src/exports/nuxt.plugin.js +8 -0
- package/src/exports/tailwind.preset.js +55 -0
- package/src/index.ts +8 -0
- package/src/install.ts +8 -0
- package/src/shims-vue.d.ts +6 -0
- package/src/version.ts +1 -0
package/lib/index.es.js
CHANGED
|
@@ -17,8 +17,7 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, normalizeStyle, withCtx, createElementBlock, renderSlot, createCommentVNode, Fragment, pushScopeId, popScopeId, createElementVNode,
|
|
21
|
-
var version = "0.2.4";
|
|
20
|
+
import { inject, defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, normalizeStyle, withCtx, createElementBlock, renderSlot, createCommentVNode, Fragment, pushScopeId, popScopeId, createElementVNode, ref, watch, resolveComponent, toDisplayString, createVNode, renderList, createTextVNode, provide, onMounted, onUnmounted, withKeys, withModifiers, withDirectives, vModelCheckbox, Transition, vShow, getCurrentScope, onScopeDispose, getCurrentInstance, onBeforeMount, nextTick, unref, reactive, toRefs, watchEffect, Teleport, mergeProps, toHandlers, onBeforeUnmount, TransitionGroup, useCssModule, vModelRadio, vModelSelect } from "vue";
|
|
22
21
|
const isHex = (hex) => /^#(?:[A-Fa-f0-9]{3}){1,2}$/.test(hex);
|
|
23
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);
|
|
24
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);
|
|
@@ -48,23 +47,6 @@ const colorShade = (color, percentage) => {
|
|
|
48
47
|
const blue = calcPrimary(b);
|
|
49
48
|
return "rgb" + (a ? "a(" : "(") + red + "," + green + "," + blue + (a ? "," + a : ")");
|
|
50
49
|
};
|
|
51
|
-
const shades = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
|
|
52
|
-
const indielayerColors = ["primary", "secondary", "success", "warning", "error"];
|
|
53
|
-
function calculateColors() {
|
|
54
|
-
const customColors2 = {};
|
|
55
|
-
const e = document.createElement("div");
|
|
56
|
-
document.body.appendChild(e);
|
|
57
|
-
indielayerColors.forEach((color) => {
|
|
58
|
-
const c = __spreadValues({}, tailwindColors.gray);
|
|
59
|
-
shades.forEach((shade) => {
|
|
60
|
-
e.className = `bg-${color}-${shade}`;
|
|
61
|
-
c[shade] = window.getComputedStyle(e, null).getPropertyValue("background-color");
|
|
62
|
-
});
|
|
63
|
-
customColors2[color] = c;
|
|
64
|
-
});
|
|
65
|
-
e.remove();
|
|
66
|
-
return customColors2;
|
|
67
|
-
}
|
|
68
50
|
Object.freeze([
|
|
69
51
|
"bg-primary-50",
|
|
70
52
|
"bg-primary-100",
|
|
@@ -383,11 +365,23 @@ const tailwindColors = Object.freeze({
|
|
|
383
365
|
900: "#881337"
|
|
384
366
|
}
|
|
385
367
|
});
|
|
386
|
-
|
|
368
|
+
var version = "1.0.0-alpha.1";
|
|
369
|
+
const injectTabKey = Symbol();
|
|
370
|
+
const injectFormKey = Symbol();
|
|
371
|
+
const injectIconsKey = Symbol();
|
|
372
|
+
const injectColorsKey = Symbol();
|
|
373
|
+
const injectButtonGroupKey = Symbol();
|
|
374
|
+
const injectNotificationKey = Symbol();
|
|
387
375
|
const colorCache = {};
|
|
376
|
+
const defaultColors = {
|
|
377
|
+
primary: tailwindColors.sky,
|
|
378
|
+
secondary: tailwindColors.slate,
|
|
379
|
+
success: tailwindColors.green,
|
|
380
|
+
warning: tailwindColors.yellow,
|
|
381
|
+
error: tailwindColors.red
|
|
382
|
+
};
|
|
388
383
|
const useColors = () => {
|
|
389
|
-
|
|
390
|
-
customColors = calculateColors();
|
|
384
|
+
const customColors = inject(injectColorsKey) || defaultColors;
|
|
391
385
|
const getTailwindColor = (color) => tailwindColors[color];
|
|
392
386
|
const getColorOpacity = (color, opacity) => setOpacity(color, opacity);
|
|
393
387
|
const getPalette = (color) => {
|
|
@@ -470,6 +464,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
470
464
|
return target;
|
|
471
465
|
};
|
|
472
466
|
const _sfc_main$I = defineComponent({
|
|
467
|
+
name: "XAlert",
|
|
473
468
|
props: __spreadProps(__spreadValues({}, useColors.props()), {
|
|
474
469
|
tag: {
|
|
475
470
|
type: String,
|
|
@@ -536,7 +531,7 @@ const _sfc_main$I = defineComponent({
|
|
|
536
531
|
};
|
|
537
532
|
}
|
|
538
533
|
});
|
|
539
|
-
const _withScopeId$3 = (n) => (pushScopeId("data-v-
|
|
534
|
+
const _withScopeId$3 = (n) => (pushScopeId("data-v-35ce54d8"), n = n(), popScopeId(), n);
|
|
540
535
|
const _hoisted_1$u = {
|
|
541
536
|
key: 0,
|
|
542
537
|
class: "flex-none pr-2"
|
|
@@ -569,7 +564,7 @@ const _hoisted_6$7 = {
|
|
|
569
564
|
key: 3,
|
|
570
565
|
d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
|
|
571
566
|
};
|
|
572
|
-
const _hoisted_7$
|
|
567
|
+
const _hoisted_7$2 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("div", { class: "flex-grow" }, null, -1));
|
|
573
568
|
const _hoisted_8$2 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("path", { d: "M6 18L18 6M6 6l12 12" }, null, -1));
|
|
574
569
|
const _hoisted_9$1 = [
|
|
575
570
|
_hoisted_8$2
|
|
@@ -593,7 +588,7 @@ function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
593
588
|
])) : createCommentVNode("", true),
|
|
594
589
|
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
595
590
|
_ctx.removable ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
596
|
-
_hoisted_7$
|
|
591
|
+
_hoisted_7$2,
|
|
597
592
|
(openBlock(), createElementBlock("svg", {
|
|
598
593
|
width: "24",
|
|
599
594
|
height: "24",
|
|
@@ -614,7 +609,7 @@ function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
614
609
|
const cssModules$9 = {
|
|
615
610
|
"$style": style0$9
|
|
616
611
|
};
|
|
617
|
-
var Alert = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$I], ["__cssModules", cssModules$9], ["__scopeId", "data-v-
|
|
612
|
+
var Alert = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$I], ["__cssModules", cssModules$9], ["__scopeId", "data-v-35ce54d8"]]);
|
|
618
613
|
const useCommon = () => {
|
|
619
614
|
};
|
|
620
615
|
const validators$5 = Object.freeze({
|
|
@@ -627,12 +622,8 @@ useCommon.props = () => ({
|
|
|
627
622
|
}
|
|
628
623
|
});
|
|
629
624
|
useCommon.validators = () => __spreadValues({}, validators$5);
|
|
630
|
-
const injectTabKey = Symbol();
|
|
631
|
-
const injectFormKey = Symbol();
|
|
632
|
-
const injectIconsKey = Symbol();
|
|
633
|
-
const injectButtonGroupKey = Symbol();
|
|
634
|
-
const injectNotificationKey = Symbol();
|
|
635
625
|
const _sfc_main$H = defineComponent({
|
|
626
|
+
name: "XIcon",
|
|
636
627
|
validators: __spreadValues({}, useCommon.validators()),
|
|
637
628
|
props: __spreadProps(__spreadValues({}, useCommon.props()), {
|
|
638
629
|
icon: {
|
|
@@ -683,6 +674,7 @@ var style0$8 = {
|
|
|
683
674
|
avatar
|
|
684
675
|
};
|
|
685
676
|
const _sfc_main$G = defineComponent({
|
|
677
|
+
name: "XAvatar",
|
|
686
678
|
components: {
|
|
687
679
|
XIcon
|
|
688
680
|
},
|
|
@@ -794,8 +786,9 @@ function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
794
786
|
const cssModules$8 = {
|
|
795
787
|
"$style": style0$8
|
|
796
788
|
};
|
|
797
|
-
var Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$G], ["__cssModules", cssModules$8], ["__scopeId", "data-v-
|
|
789
|
+
var Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$G], ["__cssModules", cssModules$8], ["__scopeId", "data-v-243016db"]]);
|
|
798
790
|
const _sfc_main$F = defineComponent({
|
|
791
|
+
name: "XBadge",
|
|
799
792
|
props: __spreadProps(__spreadValues(__spreadValues({}, useCommon.props()), useColors.props("primary")), {
|
|
800
793
|
tag: {
|
|
801
794
|
type: String,
|
|
@@ -893,6 +886,7 @@ function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
893
886
|
}
|
|
894
887
|
var Badge = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$F]]);
|
|
895
888
|
const _sfc_main$E = defineComponent({
|
|
889
|
+
name: "XBreadcrumbs",
|
|
896
890
|
props: {
|
|
897
891
|
items: Array,
|
|
898
892
|
icon: String,
|
|
@@ -969,8 +963,8 @@ var Breadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_rend
|
|
|
969
963
|
const useInteractive = (el) => {
|
|
970
964
|
return {
|
|
971
965
|
focus: () => {
|
|
972
|
-
var _a2,
|
|
973
|
-
(
|
|
966
|
+
var _a2, _b;
|
|
967
|
+
(_b = (_a2 = el.value) == null ? void 0 : _a2.focus) == null ? void 0 : _b.call(_a2);
|
|
974
968
|
}
|
|
975
969
|
};
|
|
976
970
|
};
|
|
@@ -979,6 +973,7 @@ useInteractive.props = () => ({
|
|
|
979
973
|
loading: Boolean
|
|
980
974
|
});
|
|
981
975
|
const _sfc_main$D = defineComponent({
|
|
976
|
+
name: "XSpinner",
|
|
982
977
|
components: {
|
|
983
978
|
XIcon
|
|
984
979
|
},
|
|
@@ -1021,6 +1016,7 @@ var style0$7 = {
|
|
|
1021
1016
|
"button--glow": "_button--glow_1sbr9_1"
|
|
1022
1017
|
};
|
|
1023
1018
|
const _sfc_main$C = defineComponent({
|
|
1019
|
+
name: "XButton",
|
|
1024
1020
|
components: {
|
|
1025
1021
|
XIcon,
|
|
1026
1022
|
XSpinner
|
|
@@ -1366,12 +1362,13 @@ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1366
1362
|
const cssModules$7 = {
|
|
1367
1363
|
"$style": style0$7
|
|
1368
1364
|
};
|
|
1369
|
-
var XButton = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$C], ["__cssModules", cssModules$7], ["__scopeId", "data-v-
|
|
1365
|
+
var XButton = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$C], ["__cssModules", cssModules$7], ["__scopeId", "data-v-d8eeb328"]]);
|
|
1370
1366
|
var style0$6 = {
|
|
1371
1367
|
"button-group": "_button-group_s7fyl_2",
|
|
1372
1368
|
"button-group--rounded": "_button-group--rounded_s7fyl_1"
|
|
1373
1369
|
};
|
|
1374
1370
|
const _sfc_main$B = defineComponent({
|
|
1371
|
+
name: "XButtonGroup",
|
|
1375
1372
|
validators: __spreadValues({}, useCommon.validators()),
|
|
1376
1373
|
props: __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, useCommon.props()), useColors.props()), useInteractive.props()), {
|
|
1377
1374
|
tag: {
|
|
@@ -1408,6 +1405,7 @@ const cssModules$6 = {
|
|
|
1408
1405
|
};
|
|
1409
1406
|
var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$B], ["__cssModules", cssModules$6]]);
|
|
1410
1407
|
const _sfc_main$A = defineComponent({
|
|
1408
|
+
name: "XCard",
|
|
1411
1409
|
props: {
|
|
1412
1410
|
tag: {
|
|
1413
1411
|
type: String,
|
|
@@ -1529,6 +1527,7 @@ var style0$5 = {
|
|
|
1529
1527
|
"checkbox--glow": "_checkbox--glow_1dz66_1"
|
|
1530
1528
|
};
|
|
1531
1529
|
const _sfc_main$z = defineComponent({
|
|
1530
|
+
name: "XCheckbox",
|
|
1532
1531
|
components: {
|
|
1533
1532
|
XSpinner
|
|
1534
1533
|
},
|
|
@@ -1627,7 +1626,7 @@ const _sfc_main$z = defineComponent({
|
|
|
1627
1626
|
});
|
|
1628
1627
|
}
|
|
1629
1628
|
});
|
|
1630
|
-
const _withScopeId$2 = (n) => (pushScopeId("data-v-
|
|
1629
|
+
const _withScopeId$2 = (n) => (pushScopeId("data-v-54fce636"), n = n(), popScopeId(), n);
|
|
1631
1630
|
const _hoisted_1$p = { class: "inline-block relative cursor-pointer align-middle mb-1 pb-2" };
|
|
1632
1631
|
const _hoisted_2$g = ["aria-checked", "aria-disabled", "disabled", "name", "required"];
|
|
1633
1632
|
const _hoisted_3$d = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("path", { d: "M0 11l2-2 5 5L18 3l2 2L7 18z" }, null, -1));
|
|
@@ -1692,7 +1691,7 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1692
1691
|
], 34),
|
|
1693
1692
|
_ctx.errorInternal ? (openBlock(), createElementBlock("p", {
|
|
1694
1693
|
key: 0,
|
|
1695
|
-
class: "text-sm text-
|
|
1694
|
+
class: "text-sm text-red-500 mt-1",
|
|
1696
1695
|
textContent: toDisplayString(_ctx.errorInternal)
|
|
1697
1696
|
}, null, 8, _hoisted_6$6)) : createCommentVNode("", true)
|
|
1698
1697
|
]);
|
|
@@ -1700,8 +1699,9 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1700
1699
|
const cssModules$5 = {
|
|
1701
1700
|
"$style": style0$5
|
|
1702
1701
|
};
|
|
1703
|
-
var Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$z], ["__cssModules", cssModules$5], ["__scopeId", "data-v-
|
|
1702
|
+
var Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$z], ["__cssModules", cssModules$5], ["__scopeId", "data-v-54fce636"]]);
|
|
1704
1703
|
const _sfc_main$y = defineComponent({
|
|
1704
|
+
name: "XCollapse",
|
|
1705
1705
|
components: {
|
|
1706
1706
|
XIcon
|
|
1707
1707
|
},
|
|
@@ -1879,6 +1879,7 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1879
1879
|
}
|
|
1880
1880
|
var XCollapse = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$y]]);
|
|
1881
1881
|
const _sfc_main$x = defineComponent({
|
|
1882
|
+
name: "XContainer",
|
|
1882
1883
|
props: {
|
|
1883
1884
|
tag: {
|
|
1884
1885
|
type: String,
|
|
@@ -1896,6 +1897,7 @@ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1896
1897
|
}
|
|
1897
1898
|
var Container = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$x]]);
|
|
1898
1899
|
const _sfc_main$w = defineComponent({
|
|
1900
|
+
name: "XDivider",
|
|
1899
1901
|
props: {
|
|
1900
1902
|
label: String,
|
|
1901
1903
|
vertical: Boolean
|
|
@@ -1947,10 +1949,12 @@ function tryOnScopeDispose(fn) {
|
|
|
1947
1949
|
}
|
|
1948
1950
|
return false;
|
|
1949
1951
|
}
|
|
1952
|
+
var _a;
|
|
1950
1953
|
const isClient = typeof window !== "undefined";
|
|
1951
1954
|
const isString = (val) => typeof val === "string";
|
|
1952
1955
|
const noop = () => {
|
|
1953
1956
|
};
|
|
1957
|
+
isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
1954
1958
|
function createFilterWrapper(filter, fn) {
|
|
1955
1959
|
function wrapper(...args) {
|
|
1956
1960
|
filter(() => fn.apply(this, args), { fn, thisArg: this, args });
|
|
@@ -1992,7 +1996,7 @@ function debounceFilter(ms, options = {}) {
|
|
|
1992
1996
|
function throttleFilter(ms, trailing = true, leading = true) {
|
|
1993
1997
|
let lastExec = 0;
|
|
1994
1998
|
let timer;
|
|
1995
|
-
let
|
|
1999
|
+
let isLeading = true;
|
|
1996
2000
|
const clear = () => {
|
|
1997
2001
|
if (timer) {
|
|
1998
2002
|
clearTimeout(timer);
|
|
@@ -2007,24 +2011,20 @@ function throttleFilter(ms, trailing = true, leading = true) {
|
|
|
2007
2011
|
lastExec = Date.now();
|
|
2008
2012
|
return invoke();
|
|
2009
2013
|
}
|
|
2010
|
-
if (elapsed > duration) {
|
|
2014
|
+
if (elapsed > duration && (leading || !isLeading)) {
|
|
2011
2015
|
lastExec = Date.now();
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
else
|
|
2015
|
-
invoke();
|
|
2016
|
-
}
|
|
2017
|
-
if (trailing) {
|
|
2016
|
+
invoke();
|
|
2017
|
+
} else if (trailing) {
|
|
2018
2018
|
timer = setTimeout(() => {
|
|
2019
2019
|
lastExec = Date.now();
|
|
2020
|
-
|
|
2021
|
-
preventLeading = true;
|
|
2020
|
+
isLeading = true;
|
|
2022
2021
|
clear();
|
|
2023
2022
|
invoke();
|
|
2024
2023
|
}, duration);
|
|
2025
2024
|
}
|
|
2026
2025
|
if (!leading && !timer)
|
|
2027
|
-
timer = setTimeout(() =>
|
|
2026
|
+
timer = setTimeout(() => isLeading = true, duration);
|
|
2027
|
+
isLeading = false;
|
|
2028
2028
|
};
|
|
2029
2029
|
return filter;
|
|
2030
2030
|
}
|
|
@@ -2129,10 +2129,11 @@ function onClickOutside(target, handler, options = {}) {
|
|
|
2129
2129
|
}
|
|
2130
2130
|
function useMediaQuery(query, options = {}) {
|
|
2131
2131
|
const { window: window2 = defaultWindow } = options;
|
|
2132
|
+
const isSupported = Boolean(window2 && "matchMedia" in window2);
|
|
2132
2133
|
let mediaQuery;
|
|
2133
2134
|
const matches = ref(false);
|
|
2134
2135
|
const update = () => {
|
|
2135
|
-
if (!
|
|
2136
|
+
if (!isSupported)
|
|
2136
2137
|
return;
|
|
2137
2138
|
if (!mediaQuery)
|
|
2138
2139
|
mediaQuery = window2.matchMedia(query);
|
|
@@ -2429,8 +2430,6 @@ function checkPassiveEventSupport(document2) {
|
|
|
2429
2430
|
document2.removeEventListener("x", noop);
|
|
2430
2431
|
return supportsPassive;
|
|
2431
2432
|
}
|
|
2432
|
-
var _a, _b;
|
|
2433
|
-
isClient && (window == null ? void 0 : window.navigator) && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.platform) && /iP(ad|hone|od)/.test((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.platform);
|
|
2434
2433
|
const scrollWrap = "_scrollWrap_1k3q9_2";
|
|
2435
2434
|
const horizontal = "_horizontal_1k3q9_11";
|
|
2436
2435
|
const vertical = "_vertical_1k3q9_17";
|
|
@@ -2446,6 +2445,7 @@ var style0$4 = {
|
|
|
2446
2445
|
hideScroll
|
|
2447
2446
|
};
|
|
2448
2447
|
const _sfc_main$v = defineComponent({
|
|
2448
|
+
name: "XScroll",
|
|
2449
2449
|
props: {
|
|
2450
2450
|
shadow: Boolean,
|
|
2451
2451
|
horizontal: Boolean,
|
|
@@ -2515,8 +2515,9 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2515
2515
|
const cssModules$4 = {
|
|
2516
2516
|
"$style": style0$4
|
|
2517
2517
|
};
|
|
2518
|
-
var XScroll = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$v], ["__cssModules", cssModules$4], ["__scopeId", "data-v-
|
|
2518
|
+
var XScroll = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$v], ["__cssModules", cssModules$4], ["__scopeId", "data-v-ff88aa62"]]);
|
|
2519
2519
|
const _sfc_main$u = defineComponent({
|
|
2520
|
+
name: "XDrawer",
|
|
2520
2521
|
components: {
|
|
2521
2522
|
XScroll
|
|
2522
2523
|
},
|
|
@@ -2737,6 +2738,7 @@ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2737
2738
|
}
|
|
2738
2739
|
var Drawer = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$u]]);
|
|
2739
2740
|
const _sfc_main$t = defineComponent({
|
|
2741
|
+
name: "XForm",
|
|
2740
2742
|
inheritAttrs: false,
|
|
2741
2743
|
props: {
|
|
2742
2744
|
autoValidate: {
|
|
@@ -2822,6 +2824,7 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2822
2824
|
var Form = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$t]]);
|
|
2823
2825
|
const fallback = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";
|
|
2824
2826
|
const _sfc_main$s = defineComponent({
|
|
2827
|
+
name: "XImage",
|
|
2825
2828
|
props: {
|
|
2826
2829
|
src: String
|
|
2827
2830
|
},
|
|
@@ -2851,6 +2854,7 @@ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2851
2854
|
}
|
|
2852
2855
|
var Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$s]]);
|
|
2853
2856
|
const _sfc_main$r = defineComponent({
|
|
2857
|
+
name: "XInput",
|
|
2854
2858
|
validators: __spreadValues({}, useCommon.validators()),
|
|
2855
2859
|
props: __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, useCommon.props()), useInteractive.props()), useInputtable.props()), {
|
|
2856
2860
|
showPasswordToggle: {
|
|
@@ -2902,6 +2906,10 @@ const _sfc_main$r = defineComponent({
|
|
|
2902
2906
|
return "px-5 py-4 text-xl";
|
|
2903
2907
|
return "px-3 py-2";
|
|
2904
2908
|
});
|
|
2909
|
+
const css = useCSS("input");
|
|
2910
|
+
const colors = useColors();
|
|
2911
|
+
const color = colors.getPalette("primary");
|
|
2912
|
+
const style = css.get("border", color[500]);
|
|
2905
2913
|
function onChange(e) {
|
|
2906
2914
|
if (!e.target)
|
|
2907
2915
|
return;
|
|
@@ -2926,6 +2934,7 @@ const _sfc_main$r = defineComponent({
|
|
|
2926
2934
|
currentType,
|
|
2927
2935
|
labelClasses,
|
|
2928
2936
|
sizeClasses,
|
|
2937
|
+
style,
|
|
2929
2938
|
elRef,
|
|
2930
2939
|
onChange,
|
|
2931
2940
|
togglePasswordVisibility
|
|
@@ -2941,7 +2950,7 @@ const _hoisted_6$4 = {
|
|
|
2941
2950
|
key: 1,
|
|
2942
2951
|
d: "M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"
|
|
2943
2952
|
};
|
|
2944
|
-
const _hoisted_7$
|
|
2953
|
+
const _hoisted_7$1 = ["textContent"];
|
|
2945
2954
|
const _hoisted_8$1 = ["textContent"];
|
|
2946
2955
|
function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2947
2956
|
const _component_x_icon = resolveComponent("x-icon");
|
|
@@ -2962,17 +2971,18 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2962
2971
|
}, null, 8, ["size", "icon"])) : createCommentVNode("", true),
|
|
2963
2972
|
createElementVNode("input", mergeProps({
|
|
2964
2973
|
ref: "elRef",
|
|
2965
|
-
class: ["appearance-none block w-full placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none
|
|
2974
|
+
class: ["appearance-none block w-full placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none transition-colors duration-150 ease-in-out border-gray-300 hover:border-gray-400 dark:border-gray-700 border shadow-sm rounded-md focus:border-[color:var(--x-input-border)]", [
|
|
2966
2975
|
_ctx.sizeClasses,
|
|
2967
2976
|
_ctx.disabled ? "bg-gray-100 dark:bg-gray-700 text-gray-500 cursor-not-allowed" : "bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200",
|
|
2968
2977
|
_ctx.type === "password" ? "pr-9" : "",
|
|
2969
2978
|
{
|
|
2970
2979
|
"!pl-9": _ctx.icon,
|
|
2971
2980
|
"!pr-9": _ctx.iconRight,
|
|
2972
|
-
"border-
|
|
2981
|
+
"border-red-500 focus:border-red-500 dark:focus:border-red-500": _ctx.errorInternal
|
|
2973
2982
|
},
|
|
2974
2983
|
_ctx.inputClass
|
|
2975
2984
|
]],
|
|
2985
|
+
style: _ctx.style,
|
|
2976
2986
|
disabled: _ctx.disabled,
|
|
2977
2987
|
min: _ctx.min,
|
|
2978
2988
|
max: _ctx.max,
|
|
@@ -3012,9 +3022,9 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3012
3022
|
]),
|
|
3013
3023
|
_ctx.errorInternal ? (openBlock(), createElementBlock("p", {
|
|
3014
3024
|
key: 1,
|
|
3015
|
-
class: "text-sm text-
|
|
3025
|
+
class: "text-sm text-red-500 mt-1",
|
|
3016
3026
|
textContent: toDisplayString(_ctx.errorInternal)
|
|
3017
|
-
}, null, 8, _hoisted_7$
|
|
3027
|
+
}, null, 8, _hoisted_7$1)) : _ctx.helper ? (openBlock(), createElementBlock("p", {
|
|
3018
3028
|
key: 2,
|
|
3019
3029
|
class: "text-sm text-gray-500 mt-1",
|
|
3020
3030
|
textContent: toDisplayString(_ctx.helper)
|
|
@@ -3026,6 +3036,7 @@ var style0$3 = {
|
|
|
3026
3036
|
"link--shadow": "_link--shadow_1tilo_1"
|
|
3027
3037
|
};
|
|
3028
3038
|
const _sfc_main$q = defineComponent({
|
|
3039
|
+
name: "XLink",
|
|
3029
3040
|
props: __spreadProps(__spreadValues({}, useColors.props()), {
|
|
3030
3041
|
tag: {
|
|
3031
3042
|
type: String,
|
|
@@ -3061,7 +3072,7 @@ const _sfc_main$q = defineComponent({
|
|
|
3061
3072
|
};
|
|
3062
3073
|
}
|
|
3063
3074
|
});
|
|
3064
|
-
const _withScopeId$1 = (n) => (pushScopeId("data-v-
|
|
3075
|
+
const _withScopeId$1 = (n) => (pushScopeId("data-v-b6c57c10"), n = n(), popScopeId(), n);
|
|
3065
3076
|
const _hoisted_1$i = {
|
|
3066
3077
|
key: 0,
|
|
3067
3078
|
class: "inline-flex items-center"
|
|
@@ -3108,12 +3119,13 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3108
3119
|
const cssModules$3 = {
|
|
3109
3120
|
"$style": style0$3
|
|
3110
3121
|
};
|
|
3111
|
-
var XLink = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q], ["__cssModules", cssModules$3], ["__scopeId", "data-v-
|
|
3122
|
+
var XLink = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q], ["__cssModules", cssModules$3], ["__scopeId", "data-v-b6c57c10"]]);
|
|
3112
3123
|
var style0$2 = {
|
|
3113
3124
|
"menu-item": "_menu-item_1v1kj_2",
|
|
3114
3125
|
"menu-item--active": "_menu-item--active_1v1kj_1"
|
|
3115
3126
|
};
|
|
3116
3127
|
const _sfc_main$p = defineComponent({
|
|
3128
|
+
name: "XMenuItem",
|
|
3117
3129
|
components: {
|
|
3118
3130
|
XSpinner,
|
|
3119
3131
|
XLink
|
|
@@ -3148,13 +3160,14 @@ const _sfc_main$p = defineComponent({
|
|
|
3148
3160
|
const filled = computed(() => props.filled || props.item.filled);
|
|
3149
3161
|
const cItem = computed(() => __spreadValues(__spreadValues({}, props), props.item));
|
|
3150
3162
|
const htmlTag = cItem.value.to || cItem.value.href ? "x-link" : "div";
|
|
3151
|
-
const
|
|
3163
|
+
const isSupported = window && "MutationObserver" in window;
|
|
3164
|
+
const classObserver = isSupported ? new MutationObserver(check) : null;
|
|
3152
3165
|
onMounted(() => {
|
|
3153
3166
|
if (!elRef.value)
|
|
3154
3167
|
return;
|
|
3155
3168
|
check();
|
|
3156
|
-
if (htmlTag === "x-link")
|
|
3157
|
-
classObserver.observe(elRef.value.$el, {
|
|
3169
|
+
if (isSupported && htmlTag === "x-link")
|
|
3170
|
+
classObserver == null ? void 0 : classObserver.observe(elRef.value.$el, {
|
|
3158
3171
|
attributes: true,
|
|
3159
3172
|
attributeFilter: ["class"]
|
|
3160
3173
|
});
|
|
@@ -3337,7 +3350,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3337
3350
|
const cssModules$2 = {
|
|
3338
3351
|
"$style": style0$2
|
|
3339
3352
|
};
|
|
3340
|
-
var XMenuItem = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$p], ["__cssModules", cssModules$2], ["__scopeId", "data-v-
|
|
3353
|
+
var XMenuItem = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$p], ["__cssModules", cssModules$2], ["__scopeId", "data-v-2c7185df"]]);
|
|
3341
3354
|
const _sfc_main$o = defineComponent({
|
|
3342
3355
|
name: "XMenu",
|
|
3343
3356
|
components: {
|
|
@@ -3437,13 +3450,14 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3437
3450
|
rounded: _ctx.rounded,
|
|
3438
3451
|
class: normalizeClass({ "my-2": item.divider }),
|
|
3439
3452
|
onActive: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("expand"))
|
|
3440
|
-
}, null,
|
|
3453
|
+
}, null, 40, ["color", "size", "item", "disabled", "filled", "rounded", "class"]))
|
|
3441
3454
|
], 64);
|
|
3442
3455
|
}), 128))
|
|
3443
3456
|
])) : createCommentVNode("", true);
|
|
3444
3457
|
}
|
|
3445
3458
|
var Menu = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$o]]);
|
|
3446
3459
|
const _sfc_main$n = defineComponent({
|
|
3460
|
+
name: "XModal",
|
|
3447
3461
|
components: {
|
|
3448
3462
|
XScroll
|
|
3449
3463
|
},
|
|
@@ -3607,6 +3621,7 @@ const validators$4 = {
|
|
|
3607
3621
|
position: ["bottom", "top"]
|
|
3608
3622
|
};
|
|
3609
3623
|
const _sfc_main$m = defineComponent({
|
|
3624
|
+
name: "XNotifications",
|
|
3610
3625
|
components: {
|
|
3611
3626
|
XIcon
|
|
3612
3627
|
},
|
|
@@ -3698,7 +3713,7 @@ const _sfc_main$m = defineComponent({
|
|
|
3698
3713
|
add(isMessage ? preset : __spreadValues(__spreadValues({}, preset), notification));
|
|
3699
3714
|
}
|
|
3700
3715
|
function add(notification) {
|
|
3701
|
-
var _a2,
|
|
3716
|
+
var _a2, _b;
|
|
3702
3717
|
const mergeProps2 = {
|
|
3703
3718
|
id: Date.now(),
|
|
3704
3719
|
iconColor: props.color,
|
|
@@ -3712,7 +3727,7 @@ const _sfc_main$m = defineComponent({
|
|
|
3712
3727
|
internalPosition.value = merged.position;
|
|
3713
3728
|
const color = colors.getPalette(merged.iconColor);
|
|
3714
3729
|
const colorAction = colors.getPalette(((_a2 = merged.action) == null ? void 0 : _a2.color) || "primary");
|
|
3715
|
-
|
|
3730
|
+
const cssVariables = css.variables({
|
|
3716
3731
|
icon: color[400],
|
|
3717
3732
|
action: colorAction[400],
|
|
3718
3733
|
hover: {
|
|
@@ -3726,8 +3741,9 @@ const _sfc_main$m = defineComponent({
|
|
|
3726
3741
|
}
|
|
3727
3742
|
}
|
|
3728
3743
|
});
|
|
3744
|
+
merged.style = Object.keys(cssVariables).map((key) => `${key}: ${cssVariables[key]}`).join(";");
|
|
3729
3745
|
notifications.value.push(merged);
|
|
3730
|
-
(
|
|
3746
|
+
(_b = listRef.value) == null ? void 0 : _b.scrollTo({ top: 0, behavior: "smooth" });
|
|
3731
3747
|
if (merged.timeout)
|
|
3732
3748
|
setTimer(merged, merged.timeout);
|
|
3733
3749
|
}
|
|
@@ -3824,7 +3840,9 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3824
3840
|
key: 2,
|
|
3825
3841
|
icon: _ctx.removeIcon,
|
|
3826
3842
|
class: "text-gray-400 hover:text-gray-500 ml-3 shrink-0 cursor-pointer",
|
|
3827
|
-
onClick: (
|
|
3843
|
+
onClick: () => {
|
|
3844
|
+
_ctx.remove(notification);
|
|
3845
|
+
}
|
|
3828
3846
|
}, null, 8, ["icon", "onClick"])) : createCommentVNode("", true)
|
|
3829
3847
|
])
|
|
3830
3848
|
], 6);
|
|
@@ -3838,6 +3856,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3838
3856
|
}
|
|
3839
3857
|
var Notifications = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$m]]);
|
|
3840
3858
|
const _sfc_main$l = defineComponent({
|
|
3859
|
+
name: "XPaginationItem",
|
|
3841
3860
|
components: {
|
|
3842
3861
|
XButton
|
|
3843
3862
|
},
|
|
@@ -3888,6 +3907,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3888
3907
|
}
|
|
3889
3908
|
var XPaginationItem = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l]]);
|
|
3890
3909
|
const _sfc_main$k = defineComponent({
|
|
3910
|
+
name: "XPagination",
|
|
3891
3911
|
components: {
|
|
3892
3912
|
XIcon,
|
|
3893
3913
|
XButton,
|
|
@@ -3934,6 +3954,10 @@ const _sfc_main$k = defineComponent({
|
|
|
3934
3954
|
return "h-5 w-5";
|
|
3935
3955
|
return "h-3 w-3";
|
|
3936
3956
|
});
|
|
3957
|
+
const css = useCSS("pagination");
|
|
3958
|
+
const colors = useColors();
|
|
3959
|
+
const color = colors.getPalette("primary");
|
|
3960
|
+
const style = css.get("bg", color[500]);
|
|
3937
3961
|
const quickInput = ref(props.modelValue + "");
|
|
3938
3962
|
function onQuickInput() {
|
|
3939
3963
|
const number = parseInt(quickInput.value);
|
|
@@ -3976,6 +4000,7 @@ const _sfc_main$k = defineComponent({
|
|
|
3976
4000
|
nextIcon,
|
|
3977
4001
|
quickInput,
|
|
3978
4002
|
quickButtonSize,
|
|
4003
|
+
style,
|
|
3979
4004
|
onQuickInput,
|
|
3980
4005
|
prevPage,
|
|
3981
4006
|
nextPage
|
|
@@ -3993,11 +4018,7 @@ const _hoisted_5$3 = {
|
|
|
3993
4018
|
key: 1,
|
|
3994
4019
|
class: "flex items-center space-x-2"
|
|
3995
4020
|
};
|
|
3996
|
-
const _hoisted_6$3 =
|
|
3997
|
-
key: 2,
|
|
3998
|
-
class: "flex space-x-6"
|
|
3999
|
-
};
|
|
4000
|
-
const _hoisted_7$1 = ["onClick"];
|
|
4021
|
+
const _hoisted_6$3 = ["onClick"];
|
|
4001
4022
|
function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4002
4023
|
const _component_x_button = resolveComponent("x-button");
|
|
4003
4024
|
const _component_x_input = resolveComponent("x-input");
|
|
@@ -4065,15 +4086,19 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4065
4086
|
selected: _ctx.modelValue === _ctx.totalPages,
|
|
4066
4087
|
onInput: _cache[3] || (_cache[3] = (value) => _ctx.$emit("update:modelValue", value))
|
|
4067
4088
|
}, null, 8, ["value", "links", "size", "selected"])) : createCommentVNode("", true)
|
|
4068
|
-
])) : _ctx.variant === "dots" ? (openBlock(), createElementBlock("ul",
|
|
4089
|
+
])) : _ctx.variant === "dots" ? (openBlock(), createElementBlock("ul", {
|
|
4090
|
+
key: 2,
|
|
4091
|
+
class: "flex space-x-6",
|
|
4092
|
+
style: normalizeStyle(_ctx.style)
|
|
4093
|
+
}, [
|
|
4069
4094
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.totalPages, (i) => {
|
|
4070
4095
|
return openBlock(), createElementBlock("li", {
|
|
4071
4096
|
key: i,
|
|
4072
|
-
class: normalizeClass(["rounded-full cursor-pointer", [_ctx.dotsClass, i === _ctx.modelValue ? "bg-
|
|
4097
|
+
class: normalizeClass(["rounded-full cursor-pointer", [_ctx.dotsClass, i === _ctx.modelValue ? "bg-[color:var(--x-pagination-bg)]" : "bg-gray-100 hover:bg-gray-200"]]),
|
|
4073
4098
|
onClick: ($event) => _ctx.$emit("update:modelValue", i)
|
|
4074
|
-
}, null, 10,
|
|
4099
|
+
}, null, 10, _hoisted_6$3);
|
|
4075
4100
|
}), 128))
|
|
4076
|
-
])) : createCommentVNode("", true);
|
|
4101
|
+
], 4)) : createCommentVNode("", true);
|
|
4077
4102
|
}
|
|
4078
4103
|
var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$k]]);
|
|
4079
4104
|
const popover = "_popover_2vipi_2";
|
|
@@ -4098,6 +4123,7 @@ const validators$3 = {
|
|
|
4098
4123
|
position: ["bottom", "left", "right", "top"]
|
|
4099
4124
|
};
|
|
4100
4125
|
const _sfc_main$j = defineComponent({
|
|
4126
|
+
name: "XPopover",
|
|
4101
4127
|
validators: validators$3,
|
|
4102
4128
|
props: {
|
|
4103
4129
|
align: {
|
|
@@ -4220,6 +4246,7 @@ const cssModules$1 = {
|
|
|
4220
4246
|
};
|
|
4221
4247
|
var XPopover = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__cssModules", cssModules$1]]);
|
|
4222
4248
|
const _sfc_main$i = defineComponent({
|
|
4249
|
+
name: "XPopoverContainer",
|
|
4223
4250
|
props: {
|
|
4224
4251
|
tag: {
|
|
4225
4252
|
default: "div",
|
|
@@ -4237,6 +4264,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4237
4264
|
}
|
|
4238
4265
|
var XPopoverContainer = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$i]]);
|
|
4239
4266
|
const _sfc_main$h = defineComponent({
|
|
4267
|
+
name: "XProgress",
|
|
4240
4268
|
props: __spreadProps(__spreadValues({}, useColors.props("primary")), {
|
|
4241
4269
|
percentage: {
|
|
4242
4270
|
type: Number,
|
|
@@ -4298,6 +4326,7 @@ var style0 = {
|
|
|
4298
4326
|
"radio--glow": "_radio--glow_14rlz_1"
|
|
4299
4327
|
};
|
|
4300
4328
|
const _sfc_main$g = defineComponent({
|
|
4329
|
+
name: "XRadio",
|
|
4301
4330
|
components: {
|
|
4302
4331
|
XSpinner
|
|
4303
4332
|
},
|
|
@@ -4392,7 +4421,7 @@ const _sfc_main$g = defineComponent({
|
|
|
4392
4421
|
});
|
|
4393
4422
|
}
|
|
4394
4423
|
});
|
|
4395
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
4424
|
+
const _withScopeId = (n) => (pushScopeId("data-v-857bd200"), n = n(), popScopeId(), n);
|
|
4396
4425
|
const _hoisted_1$c = ["aria-selected", "aria-disabled"];
|
|
4397
4426
|
const _hoisted_2$8 = ["name", "required", "disabled"];
|
|
4398
4427
|
const _hoisted_3$6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("circle", {
|
|
@@ -4480,7 +4509,7 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4480
4509
|
], 2)) : createCommentVNode("", true),
|
|
4481
4510
|
_ctx.errorInternal ? (openBlock(), createElementBlock("p", {
|
|
4482
4511
|
key: 1,
|
|
4483
|
-
class: "text-sm text-
|
|
4512
|
+
class: "text-sm text-red-500 mt-1",
|
|
4484
4513
|
textContent: toDisplayString(_ctx.errorInternal)
|
|
4485
4514
|
}, null, 8, _hoisted_6$2)) : createCommentVNode("", true)
|
|
4486
4515
|
], 40, _hoisted_1$c);
|
|
@@ -4488,8 +4517,9 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4488
4517
|
const cssModules = {
|
|
4489
4518
|
"$style": style0
|
|
4490
4519
|
};
|
|
4491
|
-
var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__cssModules", cssModules], ["__scopeId", "data-v-
|
|
4520
|
+
var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__cssModules", cssModules], ["__scopeId", "data-v-857bd200"]]);
|
|
4492
4521
|
const _sfc_main$f = defineComponent({
|
|
4522
|
+
name: "XTag",
|
|
4493
4523
|
props: __spreadProps(__spreadValues(__spreadValues({}, useCommon.props()), useColors.props("gray")), {
|
|
4494
4524
|
tag: {
|
|
4495
4525
|
type: String,
|
|
@@ -4573,6 +4603,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4573
4603
|
}
|
|
4574
4604
|
var XTag = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f]]);
|
|
4575
4605
|
const _sfc_main$e = defineComponent({
|
|
4606
|
+
name: "XSelect",
|
|
4576
4607
|
components: {
|
|
4577
4608
|
XTag,
|
|
4578
4609
|
XMenuItem,
|
|
@@ -4656,6 +4687,10 @@ const _sfc_main$e = defineComponent({
|
|
|
4656
4687
|
return "px-5 py-4 text-xl";
|
|
4657
4688
|
return "px-3 py-2";
|
|
4658
4689
|
});
|
|
4690
|
+
const css = useCSS("select");
|
|
4691
|
+
const colors = useColors();
|
|
4692
|
+
const color = colors.getPalette("primary");
|
|
4693
|
+
const style = css.get("border", color[500]);
|
|
4659
4694
|
const availableOptions = computed(() => {
|
|
4660
4695
|
var _a2;
|
|
4661
4696
|
return (_a2 = props.options) == null ? void 0 : _a2.filter((option) => !option.disabled);
|
|
@@ -4793,6 +4828,7 @@ const _sfc_main$e = defineComponent({
|
|
|
4793
4828
|
internalOptions,
|
|
4794
4829
|
labelClasses,
|
|
4795
4830
|
sizeClasses,
|
|
4831
|
+
style,
|
|
4796
4832
|
isEmpty,
|
|
4797
4833
|
getLabel,
|
|
4798
4834
|
handleRemove
|
|
@@ -4864,13 +4900,14 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4864
4900
|
]),
|
|
4865
4901
|
default: withCtx(() => [
|
|
4866
4902
|
createElementVNode("div", {
|
|
4867
|
-
class: normalizeClass(["w-full border border-gray-300 hover:border-gray-400 dark:border-gray-700 pr-8
|
|
4903
|
+
class: normalizeClass(["w-full border border-gray-300 hover:border-gray-400 dark:border-gray-700 pr-8 transition-colors duration-150 ease-in-out rounded-md shadow-sm group-focus:border-[color:var(--x-select-border)]", [
|
|
4868
4904
|
_ctx.sizeClasses,
|
|
4869
4905
|
_ctx.disabled ? "bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-400 cursor-not-allowed" : "bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200",
|
|
4870
4906
|
{
|
|
4871
|
-
"border-
|
|
4907
|
+
"border-red-500 focus:border-red-500 dark:focus:border-red-500": _ctx.errorInternal
|
|
4872
4908
|
}
|
|
4873
|
-
]])
|
|
4909
|
+
]]),
|
|
4910
|
+
style: normalizeStyle(_ctx.style)
|
|
4874
4911
|
}, [
|
|
4875
4912
|
_ctx.multiple && Array.isArray(_ctx.selected) && _ctx.selected.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.selected, (value) => {
|
|
4876
4913
|
return openBlock(), createBlock(_component_x_tag, {
|
|
@@ -4892,7 +4929,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4892
4929
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
4893
4930
|
_ctx.placeholder ? (openBlock(), createElementBlock("div", _hoisted_3$4, toDisplayString(_ctx.placeholder), 1)) : (openBlock(), createElementBlock("div", _hoisted_4$4, "\xA0"))
|
|
4894
4931
|
], 64))
|
|
4895
|
-
],
|
|
4932
|
+
], 6)
|
|
4896
4933
|
]),
|
|
4897
4934
|
_: 1
|
|
4898
4935
|
}, 8, ["disabled", "dismiss-on-click"]),
|
|
@@ -4941,7 +4978,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4941
4978
|
]),
|
|
4942
4979
|
_ctx.errorInternal ? (openBlock(), createElementBlock("p", {
|
|
4943
4980
|
key: 1,
|
|
4944
|
-
class: "text-sm text-
|
|
4981
|
+
class: "text-sm text-red-500 mt-1",
|
|
4945
4982
|
textContent: toDisplayString(_ctx.errorInternal)
|
|
4946
4983
|
}, null, 8, _hoisted_11)) : _ctx.helper ? (openBlock(), createElementBlock("p", {
|
|
4947
4984
|
key: 2,
|
|
@@ -4952,6 +4989,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4952
4989
|
}
|
|
4953
4990
|
var Select = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e]]);
|
|
4954
4991
|
const _sfc_main$d = defineComponent({
|
|
4992
|
+
name: "XSkeleton",
|
|
4955
4993
|
props: {
|
|
4956
4994
|
tag: {
|
|
4957
4995
|
type: String,
|
|
@@ -4970,6 +5008,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4970
5008
|
}
|
|
4971
5009
|
var Skeleton = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d]]);
|
|
4972
5010
|
const _sfc_main$c = defineComponent({
|
|
5011
|
+
name: "XSlider",
|
|
4973
5012
|
components: {
|
|
4974
5013
|
XProgress
|
|
4975
5014
|
},
|
|
@@ -5006,10 +5045,12 @@ const _sfc_main$c = defineComponent({
|
|
|
5006
5045
|
});
|
|
5007
5046
|
const css = useCSS("slider");
|
|
5008
5047
|
const colors = useColors();
|
|
5048
|
+
const primary = colors.getPalette("primary");
|
|
5009
5049
|
const style = computed(() => {
|
|
5010
5050
|
const color = colors.getPalette(props.color);
|
|
5011
5051
|
return css.variables({
|
|
5012
|
-
bg: color[500]
|
|
5052
|
+
bg: color[500],
|
|
5053
|
+
border: primary[500]
|
|
5013
5054
|
});
|
|
5014
5055
|
});
|
|
5015
5056
|
watch(() => props.modelValue, (val) => {
|
|
@@ -5148,7 +5189,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5148
5189
|
]),
|
|
5149
5190
|
createElementVNode("div", {
|
|
5150
5191
|
ref: "dragRef",
|
|
5151
|
-
class: normalizeClass(["absolute w-[20px] h-[20px] -mt-[13px] -ml-[10px] rounded-full bg-white border shadow-sm group-focus:border-
|
|
5192
|
+
class: normalizeClass(["absolute w-[20px] h-[20px] -mt-[13px] -ml-[10px] rounded-full bg-white border shadow-sm group-focus:border-[color:var(--x-slider-border)]", [_ctx.isDragging ? "cursor-grabbing" : "cursor-grab"]]),
|
|
5152
5193
|
style: normalizeStyle(`left: ${_ctx.value}%;`)
|
|
5153
5194
|
}, null, 6)
|
|
5154
5195
|
], 2),
|
|
@@ -5156,22 +5197,26 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5156
5197
|
]),
|
|
5157
5198
|
_ctx.errorInternal ? (openBlock(), createElementBlock("p", {
|
|
5158
5199
|
key: 1,
|
|
5159
|
-
class: "text-sm text-
|
|
5200
|
+
class: "text-sm text-red-500 mt-1",
|
|
5160
5201
|
textContent: toDisplayString(_ctx.errorInternal)
|
|
5161
5202
|
}, null, 8, _hoisted_4$3)) : createCommentVNode("", true)
|
|
5162
5203
|
], 6);
|
|
5163
5204
|
}
|
|
5164
5205
|
var Slider = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c]]);
|
|
5165
|
-
const _sfc_main$b = {
|
|
5206
|
+
const _sfc_main$b = defineComponent({
|
|
5207
|
+
name: "XSpacer"
|
|
5208
|
+
});
|
|
5166
5209
|
const _hoisted_1$7 = { class: "flex-grow" };
|
|
5167
|
-
function _sfc_render$b(_ctx, _cache) {
|
|
5210
|
+
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5168
5211
|
return openBlock(), createElementBlock("div", _hoisted_1$7);
|
|
5169
5212
|
}
|
|
5170
5213
|
var Spacer = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b]]);
|
|
5171
|
-
const _sfc_main$a = {
|
|
5214
|
+
const _sfc_main$a = defineComponent({
|
|
5215
|
+
name: "XTableHead"
|
|
5216
|
+
});
|
|
5172
5217
|
const _hoisted_1$6 = { class: "align-bottom" };
|
|
5173
5218
|
const _hoisted_2$4 = { class: "text-sm text-gray-600 dark:text-gray-400 border-b" };
|
|
5174
|
-
function _sfc_render$a(_ctx, _cache) {
|
|
5219
|
+
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5175
5220
|
return openBlock(), createElementBlock("thead", _hoisted_1$6, [
|
|
5176
5221
|
createElementVNode("tr", _hoisted_2$4, [
|
|
5177
5222
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -5184,6 +5229,7 @@ const validators$2 = {
|
|
|
5184
5229
|
textAlign: ["left", "center", "right", "justify"]
|
|
5185
5230
|
};
|
|
5186
5231
|
const _sfc_main$9 = defineComponent({
|
|
5232
|
+
name: "XTableHeader",
|
|
5187
5233
|
validators: validators$2,
|
|
5188
5234
|
props: {
|
|
5189
5235
|
sort: {
|
|
@@ -5258,8 +5304,10 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5258
5304
|
], 2);
|
|
5259
5305
|
}
|
|
5260
5306
|
var TableHeader = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9]]);
|
|
5261
|
-
const _sfc_main$8 = {
|
|
5262
|
-
|
|
5307
|
+
const _sfc_main$8 = defineComponent({
|
|
5308
|
+
name: "XTableBody"
|
|
5309
|
+
});
|
|
5310
|
+
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5263
5311
|
return openBlock(), createElementBlock("tbody", null, [
|
|
5264
5312
|
renderSlot(_ctx.$slots, "default")
|
|
5265
5313
|
]);
|
|
@@ -5269,6 +5317,7 @@ const validators$1 = {
|
|
|
5269
5317
|
verticalAlign: ["baseline", "bottom", "middle", "text-bottom", "text-top", "top"]
|
|
5270
5318
|
};
|
|
5271
5319
|
const _sfc_main$7 = defineComponent({
|
|
5320
|
+
name: "XTableRow",
|
|
5272
5321
|
validators: validators$1,
|
|
5273
5322
|
props: {
|
|
5274
5323
|
pointer: Boolean,
|
|
@@ -5318,6 +5367,7 @@ const validators = {
|
|
|
5318
5367
|
]
|
|
5319
5368
|
};
|
|
5320
5369
|
const _sfc_main$6 = defineComponent({
|
|
5370
|
+
name: "XTableCell",
|
|
5321
5371
|
validators,
|
|
5322
5372
|
props: {
|
|
5323
5373
|
textAlign: {
|
|
@@ -5364,6 +5414,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5364
5414
|
}
|
|
5365
5415
|
var TableCell = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]);
|
|
5366
5416
|
const _sfc_main$5 = defineComponent({
|
|
5417
|
+
name: "XTable",
|
|
5367
5418
|
components: {
|
|
5368
5419
|
TableHead,
|
|
5369
5420
|
TableHeader,
|
|
@@ -5526,6 +5577,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5526
5577
|
}
|
|
5527
5578
|
var Table = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
|
|
5528
5579
|
const _sfc_main$4 = defineComponent({
|
|
5580
|
+
name: "XTab",
|
|
5529
5581
|
props: __spreadProps(__spreadValues({}, useCommon.props()), {
|
|
5530
5582
|
value: {
|
|
5531
5583
|
type: [String, Number],
|
|
@@ -5625,6 +5677,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5625
5677
|
}
|
|
5626
5678
|
var Tab = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
|
|
5627
5679
|
const _sfc_main$3 = defineComponent({
|
|
5680
|
+
name: "XTabs",
|
|
5628
5681
|
components: {
|
|
5629
5682
|
XScroll
|
|
5630
5683
|
},
|
|
@@ -5750,10 +5803,11 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5750
5803
|
createElementVNode("div", _hoisted_1$2, null, 512)
|
|
5751
5804
|
]);
|
|
5752
5805
|
}
|
|
5753
|
-
var
|
|
5806
|
+
var TabGroup = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
5754
5807
|
const _sfc_main$2 = defineComponent({
|
|
5808
|
+
name: "XTextarea",
|
|
5755
5809
|
validators: __spreadValues({}, useCommon.validators()),
|
|
5756
|
-
props: __spreadProps(__spreadValues(__spreadValues(__spreadValues(
|
|
5810
|
+
props: __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, useCommon.props()), useInteractive.props()), useInputtable.props()), {
|
|
5757
5811
|
helper: String,
|
|
5758
5812
|
label: String,
|
|
5759
5813
|
dir: {
|
|
@@ -5791,6 +5845,10 @@ const _sfc_main$2 = defineComponent({
|
|
|
5791
5845
|
watch([() => props.modelValue, () => props.size], () => {
|
|
5792
5846
|
setTimeout(resize);
|
|
5793
5847
|
});
|
|
5848
|
+
const css = useCSS("textarea");
|
|
5849
|
+
const colors = useColors();
|
|
5850
|
+
const color = colors.getPalette("primary");
|
|
5851
|
+
const style = css.get("border", color[500]);
|
|
5794
5852
|
function onInput() {
|
|
5795
5853
|
resize();
|
|
5796
5854
|
}
|
|
@@ -5809,6 +5867,7 @@ const _sfc_main$2 = defineComponent({
|
|
|
5809
5867
|
const interactive = useInteractive(elRef);
|
|
5810
5868
|
return __spreadProps(__spreadValues(__spreadValues({}, interactive), useInputtable(props, { focus: interactive.focus, emit })), {
|
|
5811
5869
|
elRef,
|
|
5870
|
+
style,
|
|
5812
5871
|
onInput,
|
|
5813
5872
|
onEnter
|
|
5814
5873
|
});
|
|
@@ -5835,7 +5894,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5835
5894
|
}, null, 10, _hoisted_1$1)) : createCommentVNode("", true),
|
|
5836
5895
|
createElementVNode("textarea", mergeProps({
|
|
5837
5896
|
ref: "elRef",
|
|
5838
|
-
class: ["appearance-none block w-full placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none
|
|
5897
|
+
class: ["appearance-none block w-full placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none transition-colors duration-150 ease-in-out border-gray-300 dark:border-gray-700 resize-none overflow-hidden border shadow-sm rounded-md focus:border-[color:var(--x-textarea-border)]", [
|
|
5839
5898
|
_ctx.disabled ? "bg-gray-100 dark:bg-gray-700 text-gray-500 cursor-not-allowed" : "bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200",
|
|
5840
5899
|
{
|
|
5841
5900
|
"px-2 py-1 text-xs": _ctx.size === "xs",
|
|
@@ -5845,10 +5904,11 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5845
5904
|
"px-5 py-4 text-xl": _ctx.size === "xl"
|
|
5846
5905
|
},
|
|
5847
5906
|
{
|
|
5848
|
-
"border-
|
|
5907
|
+
"border-red-500 focus:border-red-500 dark:focus:border-red-500": _ctx.errorInternal
|
|
5849
5908
|
},
|
|
5850
5909
|
_ctx.inputClass
|
|
5851
5910
|
]],
|
|
5911
|
+
style: _ctx.style,
|
|
5852
5912
|
disabled: _ctx.disabled,
|
|
5853
5913
|
max: _ctx.max,
|
|
5854
5914
|
maxlength: _ctx.maxlength,
|
|
@@ -5865,7 +5925,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5865
5925
|
}), null, 16, _hoisted_2$1),
|
|
5866
5926
|
_ctx.errorInternal ? (openBlock(), createElementBlock("p", {
|
|
5867
5927
|
key: 1,
|
|
5868
|
-
class: "text-sm text-
|
|
5928
|
+
class: "text-sm text-red-500 mt-1",
|
|
5869
5929
|
textContent: toDisplayString(_ctx.errorInternal)
|
|
5870
5930
|
}, null, 8, _hoisted_3$1)) : _ctx.helper ? (openBlock(), createElementBlock("p", {
|
|
5871
5931
|
key: 2,
|
|
@@ -5876,6 +5936,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5876
5936
|
}
|
|
5877
5937
|
var Textarea = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
5878
5938
|
const _sfc_main$1 = defineComponent({
|
|
5939
|
+
name: "XToggle",
|
|
5879
5940
|
components: {
|
|
5880
5941
|
XSpinner
|
|
5881
5942
|
},
|
|
@@ -5992,13 +6053,14 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5992
6053
|
]),
|
|
5993
6054
|
_ctx.errorInternal ? (openBlock(), createElementBlock("p", {
|
|
5994
6055
|
key: 0,
|
|
5995
|
-
class: "text-sm text-
|
|
6056
|
+
class: "text-sm text-red-500 mt-1",
|
|
5996
6057
|
textContent: toDisplayString(_ctx.errorInternal)
|
|
5997
6058
|
}, null, 8, _hoisted_4)) : createCommentVNode("", true)
|
|
5998
6059
|
], 2);
|
|
5999
6060
|
}
|
|
6000
6061
|
var Toggle = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
6001
6062
|
const _sfc_main = defineComponent({
|
|
6063
|
+
name: "XTooltip",
|
|
6002
6064
|
components: {
|
|
6003
6065
|
XPopover,
|
|
6004
6066
|
XPopoverContainer
|
|
@@ -6068,7 +6130,7 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
6068
6130
|
XTableHeader: TableHeader,
|
|
6069
6131
|
XTableRow: TableRow,
|
|
6070
6132
|
XTab: Tab,
|
|
6071
|
-
|
|
6133
|
+
XTabGroup: TabGroup,
|
|
6072
6134
|
XTag,
|
|
6073
6135
|
XTextarea: Textarea,
|
|
6074
6136
|
XToggle: Toggle,
|
|
@@ -6080,9 +6142,23 @@ const useNotification = () => {
|
|
|
6080
6142
|
console.warn("useNotification must have a parent wrapped with Notifications component");
|
|
6081
6143
|
return notification;
|
|
6082
6144
|
};
|
|
6083
|
-
const
|
|
6084
|
-
|
|
6085
|
-
app.component(`${options.prefix}${name.slice(1)}`, components[name]);
|
|
6086
|
-
});
|
|
6145
|
+
const defaultOptions = {
|
|
6146
|
+
prefix: "X"
|
|
6087
6147
|
};
|
|
6088
|
-
|
|
6148
|
+
const create = (createOptions = {}) => {
|
|
6149
|
+
const install2 = (app, installOptions = {}) => {
|
|
6150
|
+
const options = __spreadValues(__spreadValues(__spreadValues({}, defaultOptions), createOptions), installOptions);
|
|
6151
|
+
if (options.components)
|
|
6152
|
+
options.components.forEach((component) => {
|
|
6153
|
+
app.component(`${options.prefix}${component.name.slice(1)}`, component);
|
|
6154
|
+
});
|
|
6155
|
+
app.provide(injectColorsKey, options.colors);
|
|
6156
|
+
};
|
|
6157
|
+
return {
|
|
6158
|
+
install: install2
|
|
6159
|
+
};
|
|
6160
|
+
};
|
|
6161
|
+
var install = create({
|
|
6162
|
+
components: Object.keys(components).map((key) => components[key])
|
|
6163
|
+
});
|
|
6164
|
+
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, Spacer as 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 };
|