@v1nt1248/3nclient-lib 0.3.29 → 0.3.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{ui3n-notification-Dr_3Td9N.js → ui3n-notification-DPC5Ke4b.js} +96 -97
- package/dist/{components → src/components}/index.d.ts +3 -3
- package/dist/{components → src/components}/ui3n-autocomplete/types.d.ts +5 -0
- package/dist/{components → src/components}/ui3n-breadcrumbs/types.d.ts +2 -0
- package/dist/{components → src/components}/ui3n-dialog/types.d.ts +1 -1
- package/dist/{components → src/components}/ui3n-editable/types.d.ts +1 -1
- package/dist/{components → src/components}/ui3n-editable/ui3n-editable.d.ts +1 -1
- package/dist/{components → src/components}/ui3n-editable/useContentEditable.d.ts +1 -1
- package/dist/{components → src/components}/ui3n-input/types.d.ts +2 -2
- package/dist/{components → src/components}/ui3n-menu/types.d.ts +21 -1
- package/dist/{components → src/components}/ui3n-menu/ui3n-menu.d.ts +3 -0
- package/dist/{components → src/components}/ui3n-mobile-menu/ui3n-mobile-menu.d.ts +2 -2
- package/dist/{components → src/components}/ui3n-notification/types.d.ts +0 -4
- package/dist/src/components/ui3n-notification/ui3n-notification-container.d.ts +11 -0
- package/dist/{components → src/components}/ui3n-notification/ui3n-notification.d.ts +1 -1
- package/dist/{components → src/components}/ui3n-progress/ui3n-progress-circular.d.ts +3 -3
- package/dist/{components → src/components}/ui3n-progress/ui3n-progress-linear.d.ts +2 -0
- package/dist/{components → src/components}/ui3n-selector/types.d.ts +1 -11
- package/dist/{components → src/components}/ui3n-step-line-bar/ui3n-step-line-bar.d.ts +1 -0
- package/dist/{components → src/components}/ui3n-switch/ui3n-switch.d.ts +2 -6
- package/dist/{components → src/components}/ui3n-table/composables/useTable.d.ts +4 -3
- package/dist/{components → src/components}/ui3n-text/ui3n-text.d.ts +1 -0
- package/dist/{components → src/components}/ui3n-tooltip/ui3n-tooltip.d.ts +1 -0
- package/dist/{index.d.ts → src/index.d.ts} +1 -1
- package/dist/{plugins → src/plugins}/dialogs/dialogs.d.ts +2 -2
- package/dist/{plugins → src/plugins}/dialogs/store-dialog.d.ts +2 -2
- package/dist/{plugins → src/plugins}/dialogs/types.d.ts +1 -1
- package/dist/{plugins → src/plugins}/notifications/store-notifications.d.ts +1 -1
- package/dist/{plugins → src/plugins}/notifications/types.d.ts +1 -1
- package/dist/{ui3n-components.d.ts → src/ui3n-components.d.ts} +1 -1
- package/dist/{ui3n-plugins.d.ts → src/ui3n-plugins.d.ts} +5 -5
- package/dist/{utils → src/utils}/files/create-video-thumbnail.d.ts +1 -1
- package/dist/{utils → src/utils}/for-vue/try-on-scope-dispose.d.ts +1 -1
- package/dist/{utils → src/utils}/for-vue/unref-element.d.ts +1 -1
- package/dist/src/utils/processes/scheduler-yield.d.ts +1 -0
- package/dist/{utils → src/utils}/processes/task-runner.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +1196 -1137
- package/dist/ui3n-plugins.js +56 -43
- package/package.json +2 -2
- package/src/components/index.ts +9 -2
- package/src/components/ui3n-autocomplete/types.ts +5 -0
- package/src/components/ui3n-autocomplete/ui3n-autocomplete.vue +9 -5
- package/src/components/ui3n-breadcrumbs/types.ts +2 -0
- package/src/components/ui3n-breadcrumbs/ui3n-breadcrumb.vue +45 -35
- package/src/components/ui3n-breadcrumbs/ui3n-breadcrumbs.vue +12 -1
- package/src/components/ui3n-checkbox/ui3n-checkbox.vue +33 -67
- package/src/components/ui3n-editable/ui3n-editable.vue +68 -46
- package/src/components/ui3n-emoji/ui3n-emoji.vue +21 -27
- package/src/components/ui3n-icon/ui3n-icon.vue +13 -5
- package/src/components/ui3n-input/types.ts +2 -2
- package/src/components/ui3n-input/ui3n-input.vue +15 -9
- package/src/components/ui3n-menu/types.ts +24 -1
- package/src/components/ui3n-menu/ui3n-menu.vue +133 -11
- package/src/components/ui3n-mobile-menu/ui3n-mobile-menu.vue +87 -38
- package/src/components/ui3n-notification/types.ts +0 -4
- package/src/components/ui3n-notification/ui3n-notification-container.vue +62 -0
- package/src/components/ui3n-notification/ui3n-notification.vue +74 -70
- package/src/components/ui3n-progress/ui3n-progress-circular.vue +80 -120
- package/src/components/ui3n-progress/ui3n-progress-linear.vue +32 -15
- package/src/components/ui3n-radio-group/ui3n-radio-group.vue +2 -1
- package/src/components/ui3n-radio-group/ui3n-radio.vue +38 -47
- package/src/components/ui3n-scrollbar-horizontal/{ui3n-scroolbar-horizontal.vue → ui3n-scrollbar-horizontal.vue} +6 -8
- package/src/components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical.vue +10 -6
- package/src/components/ui3n-selector/types.ts +1 -10
- package/src/components/ui3n-selector/ui3n-selector.vue +49 -47
- package/src/components/ui3n-slider/ui3n-slider.vue +6 -9
- package/src/components/ui3n-step-line-bar/ui3n-step-line-bar.vue +5 -1
- package/src/components/ui3n-switch/ui3n-switch.vue +24 -19
- package/src/components/ui3n-table/composables/useTable.ts +37 -22
- package/src/components/ui3n-table/ui3n-table-sort-icon.vue +6 -1
- package/src/components/ui3n-table/ui3n-table.vue +3 -1
- package/src/components/ui3n-tabs/ui3n-tabs.vue +0 -23
- package/src/components/ui3n-text/ui3n-text.vue +36 -8
- package/src/components/ui3n-tooltip/ui3n-tooltip.vue +39 -18
- package/src/components/ui3n-virtual-scroll/ui3n-virtual-scroll.vue +2 -2
- package/dist/utils/processes/scheduler-yield.d.ts +0 -1
- /package/dist/{components → src/components}/ui3n-autocomplete/ui3n-autocomplete.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-badge/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-badge/ui3n-badge-simple.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-badge/ui3n-badge.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-breadcrumbs/ui3n-breadcrumb.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-breadcrumbs/ui3n-breadcrumbs.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-button/constants.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-button/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-button/ui3n-button.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-checkbox/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-checkbox/ui3n-checkbox.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-chip/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-chip/ui3n-chip.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-dialog/ui3n-dialog-provider.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-dialog/ui3n-dialog.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-dialog/util.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-drop-files/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-drop-files/ui3n-drop-files.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-emoji/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-emoji/ui3n-emoji.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-icon/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-icon/ui3n-icon.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-input/ui3n-input.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-input-file/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-input-file/ui3n-input-file.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-list/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-list/ui3n-list.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-mobile-menu/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-mobile-menu-item/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-mobile-menu-item/ui3n-mobile-menu-item.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-progress/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-radio-group/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-radio-group/ui3n-radio-group.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-radio-group/ui3n-radio.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-scrollbar-horizontal/types.d.ts +0 -0
- /package/dist/{components/ui3n-scrollbar-horizontal/ui3n-scroolbar-horizontal.d.ts → src/components/ui3n-scrollbar-horizontal/ui3n-scrollbar-horizontal.d.ts} +0 -0
- /package/dist/{components → src/components}/ui3n-scrollbar-vertical/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-selector/ui3n-selector.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-slider/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-slider/ui3n-slider.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-step-line-bar/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-switch/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-table/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-table/ui3n-table-sort-icon.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-table/ui3n-table.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-tabs/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-tabs/ui3n-tabs.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-text/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-tooltip/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-virtual-scroll/types.d.ts +0 -0
- /package/dist/{components → src/components}/ui3n-virtual-scroll/ui3n-virtual-scroll.d.ts +0 -0
- /package/dist/{composables → src/composables}/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/useDblClickHandler.d.ts +0 -0
- /package/dist/{constants → src/constants}/emoticons.d.ts +0 -0
- /package/dist/{constants → src/constants}/general.d.ts +0 -0
- /package/dist/{constants → src/constants}/index.d.ts +0 -0
- /package/dist/{constants → src/constants}/plugins-keys.d.ts +0 -0
- /package/dist/{demo → src/demo}/constants.d.ts +0 -0
- /package/dist/{directives → src/directives}/index.d.ts +0 -0
- /package/dist/{directives → src/directives}/ui3n-click-outside.d.ts +0 -0
- /package/dist/{directives → src/directives}/ui3n-html.d.ts +0 -0
- /package/dist/{directives → src/directives}/ui3n-long-press.d.ts +0 -0
- /package/dist/{directives → src/directives}/ui3n-resize.d.ts +0 -0
- /package/dist/{directives → src/directives}/ui3n-ripple.d.ts +0 -0
- /package/dist/{directives → src/directives}/ui3n-title.d.ts +0 -0
- /package/dist/{plugins → src/plugins}/index.d.ts +0 -0
- /package/dist/{plugins → src/plugins}/notifications/notifications.d.ts +0 -0
- /package/dist/{plugins → src/plugins}/vue-bus/store-vue-bus.d.ts +0 -0
- /package/dist/{plugins → src/plugins}/vue-bus/types.d.ts +0 -0
- /package/dist/{plugins → src/plugins}/vue-bus/vue-bus.d.ts +0 -0
- /package/dist/{types → src/types}/components.types.d.ts +0 -0
- /package/dist/{types → src/types}/directives.types.d.ts +0 -0
- /package/dist/{types → src/types}/index.d.ts +0 -0
- /package/dist/{types → src/types}/plugins.types.d.ts +0 -0
- /package/dist/{types → src/types}/utils.types.d.ts +0 -0
- /package/dist/{ui3n-utils.d.ts → src/ui3n-utils.d.ts} +0 -0
- /package/dist/{utils → src/utils}/copy-to-clipboard.d.ts +0 -0
- /package/dist/{utils → src/utils}/debounce.d.ts +0 -0
- /package/dist/{utils → src/utils}/execute-function.d.ts +0 -0
- /package/dist/{utils → src/utils}/files/b64-to-blob.d.ts +0 -0
- /package/dist/{utils → src/utils}/files/blob-from-data-url.d.ts +0 -0
- /package/dist/{utils → src/utils}/files/blob-to-b64.d.ts +0 -0
- /package/dist/{utils → src/utils}/files/file-to-uint8array.d.ts +0 -0
- /package/dist/{utils → src/utils}/files/format-file-size.d.ts +0 -0
- /package/dist/{utils → src/utils}/files/get-file-extension.d.ts +0 -0
- /package/dist/{utils → src/utils}/files/is-file-archive.d.ts +0 -0
- /package/dist/{utils → src/utils}/files/is-file-audio.d.ts +0 -0
- /package/dist/{utils → src/utils}/files/is-file-image.d.ts +0 -0
- /package/dist/{utils → src/utils}/files/is-file-video.d.ts +0 -0
- /package/dist/{utils → src/utils}/files/mime-types.d.ts +0 -0
- /package/dist/{utils → src/utils}/files/resize-image.d.ts +0 -0
- /package/dist/{utils → src/utils}/files/uint8-to-data-url.d.ts +0 -0
- /package/dist/{utils → src/utils}/for-web3n.d.ts +0 -0
- /package/dist/{utils → src/utils}/get-random-id.d.ts +0 -0
- /package/dist/{utils → src/utils}/index.d.ts +0 -0
- /package/dist/{utils → src/utils}/processes/deferred.d.ts +0 -0
- /package/dist/{utils → src/utils}/processes/named-procs.d.ts +0 -0
- /package/dist/{utils → src/utils}/processes/single.d.ts +0 -0
- /package/dist/{utils → src/utils}/processes/sleep.d.ts +0 -0
- /package/dist/{utils → src/utils}/remove-whitespace-in-string.d.ts +0 -0
- /package/dist/{utils → src/utils}/round.d.ts +0 -0
- /package/dist/{utils → src/utils}/sqlite-on-3nstorage/index.d.ts +0 -0
- /package/dist/{utils → src/utils}/sqlite-on-3nstorage/types.d.ts +0 -0
- /package/dist/{utils → src/utils}/textarea-max-rows.d.ts +0 -0
- /package/dist/{utils → src/utils}/ui/capitalize.d.ts +0 -0
- /package/dist/{utils → src/utils}/ui/generate-color.d.ts +0 -0
- /package/dist/{utils → src/utils}/ui/has-slot-content.d.ts +0 -0
- /package/dist/{utils → src/utils}/ui/html2text.d.ts +0 -0
- /package/dist/{utils → src/utils}/ui/invert-color.d.ts +0 -0
- /package/dist/{utils → src/utils}/ui/mark-search.d.ts +0 -0
- /package/dist/{utils → src/utils}/ui/prepare-date-as-string.d.ts +0 -0
- /package/dist/{utils → src/utils}/ui/selection.d.ts +0 -0
package/dist/ui3n-components.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { $ as e, B as t, Q as n, R as r, T as i, V as a, X as o, Z as s, at as c, ct as l, dt as u, et as d, ft as f, ht as p, it as m, lt as h, mt as g, nt as _, o as v, ot as y, pt as b, rt as x, st as S, t as C, tt as w, ut as T, v as ee, z as E } from "./chunks/plugins-keys-jqAZ5D94.js";
|
|
2
|
-
import { a as te, i as D, n as O, r as
|
|
3
|
-
import { t as
|
|
4
|
-
import
|
|
5
|
-
import { autoUpdate as
|
|
6
|
-
import { Fragment as
|
|
2
|
+
import { a as te, i as D, n as O, r as k, t as A } from "./chunks/ui3n-notification-DPC5Ke4b.js";
|
|
3
|
+
import { t as ne } from "./chunks/emoticons-DMgiBINj.js";
|
|
4
|
+
import re from "sanitize-html";
|
|
5
|
+
import { autoUpdate as j, computePosition as ie, offset as ae } from "@floating-ui/dom";
|
|
6
|
+
import { Fragment as M, Teleport as oe, Transition as se, TransitionGroup as ce, computed as N, createBlock as P, createCommentVNode as F, createElementBlock as I, createElementVNode as L, createTextVNode as le, createVNode as R, defineComponent as z, inject as ue, mergeProps as de, nextTick as fe, normalizeClass as B, normalizeStyle as V, onBeforeMount as pe, onBeforeUnmount as me, onMounted as H, onUnmounted as he, openBlock as U, provide as ge, ref as W, renderList as G, renderSlot as K, resolveDynamicComponent as _e, shallowRef as ve, toDisplayString as q, toHandlers as ye, unref as J, useCssModule as be, useCssVars as xe, useSlots as Se, useTemplateRef as Ce, vModelText as we, watch as Y, withCtx as X, withDirectives as Te, withKeys as Z, withModifiers as Q } from "vue";
|
|
7
7
|
import { arrow as Ee, autoUpdate as De, flip as Oe, offset as ke, shift as Ae, useFloating as je } from "@floating-ui/vue";
|
|
8
8
|
//#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayMap.js
|
|
9
9
|
var Me = /* @__PURE__ */ g(((e, t) => {
|
|
@@ -508,39 +508,39 @@ var Me = /* @__PURE__ */ g(((e, t) => {
|
|
|
508
508
|
var n = qt(), r = x(), i = _(), a = i && i.isSet;
|
|
509
509
|
t.exports = a ? r(a) : n;
|
|
510
510
|
})), Yt = /* @__PURE__ */ g(((e, t) => {
|
|
511
|
-
var n = st(), r = ct(), i = dt(), a = _t(), s = xt(), l = St(), u = Ct(), d = Dt(), f = jt(), p = Nt(), h = Pt(), g = o(), _ = Ft(), v = Ht(), y = Wt(), b = c(), x = m(), S = Kt(), C = T(), w = Jt(), ee = gt(), E = bt(), te = 1, D = 2, O = 4,
|
|
512
|
-
|
|
513
|
-
function
|
|
514
|
-
var
|
|
515
|
-
if (o && (
|
|
511
|
+
var n = st(), r = ct(), i = dt(), a = _t(), s = xt(), l = St(), u = Ct(), d = Dt(), f = jt(), p = Nt(), h = Pt(), g = o(), _ = Ft(), v = Ht(), y = Wt(), b = c(), x = m(), S = Kt(), C = T(), w = Jt(), ee = gt(), E = bt(), te = 1, D = 2, O = 4, k = "[object Arguments]", A = "[object Array]", ne = "[object Boolean]", re = "[object Date]", j = "[object Error]", ie = "[object Function]", ae = "[object GeneratorFunction]", M = "[object Map]", oe = "[object Number]", se = "[object Object]", ce = "[object RegExp]", N = "[object Set]", P = "[object String]", F = "[object Symbol]", I = "[object WeakMap]", L = "[object ArrayBuffer]", le = "[object DataView]", R = "[object Float32Array]", z = "[object Float64Array]", ue = "[object Int8Array]", de = "[object Int16Array]", fe = "[object Int32Array]", B = "[object Uint8Array]", V = "[object Uint8ClampedArray]", pe = "[object Uint16Array]", me = "[object Uint32Array]", H = {};
|
|
512
|
+
H[k] = H[A] = H[L] = H[le] = H[ne] = H[re] = H[R] = H[z] = H[ue] = H[de] = H[fe] = H[M] = H[oe] = H[se] = H[ce] = H[N] = H[P] = H[F] = H[B] = H[V] = H[pe] = H[me] = !0, H[j] = H[ie] = H[I] = !1;
|
|
513
|
+
function he(e, t, o, c, m, T) {
|
|
514
|
+
var A, ne = t & te, re = t & D, j = t & O;
|
|
515
|
+
if (o && (A = m ? o(e, c, m, T) : o(e)), A !== void 0) return A;
|
|
516
516
|
if (!C(e)) return e;
|
|
517
|
-
var
|
|
518
|
-
if (
|
|
519
|
-
if (
|
|
517
|
+
var M = b(e);
|
|
518
|
+
if (M) {
|
|
519
|
+
if (A = _(e), !ne) return u(e, A);
|
|
520
520
|
} else {
|
|
521
|
-
var
|
|
522
|
-
if (x(e)) return l(e,
|
|
523
|
-
if (
|
|
524
|
-
if (
|
|
521
|
+
var oe = g(e), ce = oe == ie || oe == ae;
|
|
522
|
+
if (x(e)) return l(e, ne);
|
|
523
|
+
if (oe == se || oe == k || ce && !m) {
|
|
524
|
+
if (A = re || ce ? {} : y(e), !ne) return re ? f(e, s(A, e)) : d(e, a(A, e));
|
|
525
525
|
} else {
|
|
526
|
-
if (!
|
|
527
|
-
|
|
526
|
+
if (!H[oe]) return m ? e : {};
|
|
527
|
+
A = v(e, oe, ne);
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
530
|
T ||= new n();
|
|
531
|
-
var
|
|
532
|
-
if (
|
|
533
|
-
T.set(e,
|
|
534
|
-
|
|
531
|
+
var N = T.get(e);
|
|
532
|
+
if (N) return N;
|
|
533
|
+
T.set(e, A), w(e) ? e.forEach(function(n) {
|
|
534
|
+
A.add(he(n, t, o, n, e, T));
|
|
535
535
|
}) : S(e) && e.forEach(function(n, r) {
|
|
536
|
-
|
|
536
|
+
A.set(r, he(n, t, o, r, e, T));
|
|
537
537
|
});
|
|
538
|
-
var
|
|
539
|
-
return r(
|
|
540
|
-
|
|
541
|
-
}),
|
|
538
|
+
var P = M ? void 0 : (j ? re ? h : p : re ? E : ee)(e);
|
|
539
|
+
return r(P || e, function(n, r) {
|
|
540
|
+
P && (r = n, n = e[r]), i(A, r, he(n, t, o, r, e, T));
|
|
541
|
+
}), A;
|
|
542
542
|
}
|
|
543
|
-
t.exports =
|
|
543
|
+
t.exports = he;
|
|
544
544
|
})), Xt = /* @__PURE__ */ g(((e, t) => {
|
|
545
545
|
var n = u(), r = S(), i = "[object Symbol]";
|
|
546
546
|
function a(e) {
|
|
@@ -783,11 +783,11 @@ function Tn(e, t) {
|
|
|
783
783
|
return;
|
|
784
784
|
}
|
|
785
785
|
if (typeof r == "string") {
|
|
786
|
-
e.innerHTML =
|
|
786
|
+
e.innerHTML = re(r);
|
|
787
787
|
return;
|
|
788
788
|
}
|
|
789
789
|
try {
|
|
790
|
-
e.innerHTML =
|
|
790
|
+
e.innerHTML = re(r.dirty, { ...(0, wn.default)(r, "dirty") });
|
|
791
791
|
return;
|
|
792
792
|
} catch (e) {
|
|
793
793
|
throw Error("[v-ui3n-html] ", e);
|
|
@@ -946,11 +946,11 @@ function Wn(e, t, n) {
|
|
|
946
946
|
return;
|
|
947
947
|
}
|
|
948
948
|
let f = document.getElementById(zn), p = f || document.createElement("div");
|
|
949
|
-
f || (p.id = zn, p.classList.add("ui3n-title")), p.innerHTML = r, p.style.maxWidth = `${i}px`, p.style.color = a, p.style.backgroundColor = o, Object.keys(d).length && Object.assign(p.style, d), e.insertAdjacentElement("beforeend", p), Rn =
|
|
950
|
-
|
|
949
|
+
f || (p.id = zn, p.classList.add("ui3n-title")), p.innerHTML = r, p.style.maxWidth = `${i}px`, p.style.color = a, p.style.backgroundColor = o, Object.keys(d).length && Object.assign(p.style, d), e.insertAdjacentElement("beforeend", p), Rn = j(e, p, () => {
|
|
950
|
+
ie(e, p, {
|
|
951
951
|
placement: s,
|
|
952
952
|
strategy: c,
|
|
953
|
-
middleware: [
|
|
953
|
+
middleware: [ae(Hn(s, l, u))]
|
|
954
954
|
}).then(({ x: e, y: t }) => {
|
|
955
955
|
Object.assign(p.style, {
|
|
956
956
|
left: `${e}px`,
|
|
@@ -1049,7 +1049,7 @@ var Qn = {
|
|
|
1049
1049
|
}, a = Jn(t);
|
|
1050
1050
|
n.removeEventListener("pointerdown", a.pointerdownEvent, i), n.removeEventListener("pointerup", a.pointerupEvent, i), n.removeEventListener("pointermove", a.pointermoveEvent, i);
|
|
1051
1051
|
}
|
|
1052
|
-
}, $n = ["id"], er = /* @__PURE__ */ D(/* @__PURE__ */
|
|
1052
|
+
}, $n = ["id"], er = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
1053
1053
|
__name: "ui3n-chip",
|
|
1054
1054
|
props: {
|
|
1055
1055
|
id: {},
|
|
@@ -1074,29 +1074,29 @@ var Qn = {
|
|
|
1074
1074
|
},
|
|
1075
1075
|
emits: ["close", "click"],
|
|
1076
1076
|
setup(e, { emit: t }) {
|
|
1077
|
-
let n = e, r = t, i = Se(), a =
|
|
1077
|
+
let n = e, r = t, i = Se(), a = N(() => {
|
|
1078
1078
|
let e = Number(n.height);
|
|
1079
1079
|
return isNaN(e) ? 24 : e;
|
|
1080
|
-
}), o =
|
|
1080
|
+
}), o = N(() => `${a.value}px`), s = N(() => a.value - 4), c = N(() => {
|
|
1081
1081
|
let e = Math.round(a.value / 3);
|
|
1082
1082
|
return p.value ? `0 ${e}px 0 4px` : `0 ${e}px`;
|
|
1083
|
-
}), l =
|
|
1083
|
+
}), l = N(() => {
|
|
1084
1084
|
let e = Number(n.maxWidth);
|
|
1085
1085
|
return isNaN(e) ? String(n.maxWidth) : `${e}px`;
|
|
1086
|
-
}), u =
|
|
1086
|
+
}), u = N(() => n.color), d = N(() => {
|
|
1087
1087
|
let e = Number(n.textSize);
|
|
1088
1088
|
return isNaN(e) ? String(n.textSize) : `${e}px`;
|
|
1089
|
-
}), f =
|
|
1090
|
-
return (t, n) => (U(),
|
|
1089
|
+
}), f = N(() => n.textColor), p = N(() => !!i.left);
|
|
1090
|
+
return (t, n) => (U(), I("div", {
|
|
1091
1091
|
id: e.id,
|
|
1092
|
-
class:
|
|
1092
|
+
class: B([
|
|
1093
1093
|
t.$style.ui3nChip,
|
|
1094
1094
|
e.round && t.$style.round,
|
|
1095
1095
|
e.plain && t.$style.plain,
|
|
1096
1096
|
e.closeable && t.$style.closeable,
|
|
1097
1097
|
p.value && t.$style.withIcon
|
|
1098
1098
|
]),
|
|
1099
|
-
style:
|
|
1099
|
+
style: V({
|
|
1100
1100
|
"--ui3n-chip-height": o.value,
|
|
1101
1101
|
"--ui3n-chip-max-width": l.value,
|
|
1102
1102
|
"--ui3n-chip-padding": c.value,
|
|
@@ -1106,12 +1106,12 @@ var Qn = {
|
|
|
1106
1106
|
}),
|
|
1107
1107
|
onClick: n[1] ||= (e) => r("click", e)
|
|
1108
1108
|
}, [
|
|
1109
|
-
|
|
1109
|
+
L("div", { class: B(t.$style.ui3nChipIcon) }, [K(t.$slots, "left", {
|
|
1110
1110
|
size: s.value,
|
|
1111
1111
|
color: f.value
|
|
1112
1112
|
})], 2),
|
|
1113
|
-
|
|
1114
|
-
e.closeable ? (U(),
|
|
1113
|
+
L("div", { class: B(t.$style.ui3nChipBody) }, [K(t.$slots, "default")], 2),
|
|
1114
|
+
e.closeable ? (U(), P(O, {
|
|
1115
1115
|
key: 0,
|
|
1116
1116
|
type: "icon",
|
|
1117
1117
|
size: "small",
|
|
@@ -1120,7 +1120,7 @@ var Qn = {
|
|
|
1120
1120
|
"icon-color": "var(--color-icon-control-primary-default)",
|
|
1121
1121
|
disabled: e.disabled,
|
|
1122
1122
|
onClick: n[0] ||= Q((e) => r("close"), ["stop", "prevent"])
|
|
1123
|
-
}, null, 8, ["disabled"])) :
|
|
1123
|
+
}, null, 8, ["disabled"])) : F("", !0)
|
|
1124
1124
|
], 14, $n));
|
|
1125
1125
|
}
|
|
1126
1126
|
}), [["__cssModules", { $style: {
|
|
@@ -1133,7 +1133,7 @@ var Qn = {
|
|
|
1133
1133
|
ui3nChipIcon: "_ui3nChipIcon_prky3_33",
|
|
1134
1134
|
round: "_round_prky3_41",
|
|
1135
1135
|
plain: "_plain_prky3_50"
|
|
1136
|
-
} }]]), tr = ["name"], nr = ["width", "height"], rr = /* @__PURE__ */ D(/* @__PURE__ */
|
|
1136
|
+
} }]]), tr = ["name"], nr = ["width", "height"], rr = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
1137
1137
|
__name: "ui3n-drop-files",
|
|
1138
1138
|
props: {
|
|
1139
1139
|
name: { default: void 0 },
|
|
@@ -1184,10 +1184,10 @@ var Qn = {
|
|
|
1184
1184
|
!e && s.value && (s.value.value = "");
|
|
1185
1185
|
}), H(() => {
|
|
1186
1186
|
_();
|
|
1187
|
-
}), (t, n) => Te((U(),
|
|
1187
|
+
}), (t, n) => Te((U(), I("div", {
|
|
1188
1188
|
ref_key: "wrapperElement",
|
|
1189
1189
|
ref: o,
|
|
1190
|
-
class:
|
|
1190
|
+
class: B([
|
|
1191
1191
|
t.$style.ui3nDropFiles,
|
|
1192
1192
|
e.permanentDisplay && t.$style.ui3nDropFilesWithBorder,
|
|
1193
1193
|
(l.value || u.value) && t.$style.ui3nDropFilesWithAccentBorder
|
|
@@ -1196,7 +1196,7 @@ var Qn = {
|
|
|
1196
1196
|
onDragover: n[2] ||= Q(() => {}, ["prevent"]),
|
|
1197
1197
|
onDragleave: f
|
|
1198
1198
|
}, [
|
|
1199
|
-
e.name ? (U(),
|
|
1199
|
+
e.name ? (U(), I("input", {
|
|
1200
1200
|
key: 0,
|
|
1201
1201
|
ref_key: "fileInput",
|
|
1202
1202
|
ref: s,
|
|
@@ -1204,33 +1204,33 @@ var Qn = {
|
|
|
1204
1204
|
name: e.name,
|
|
1205
1205
|
multiple: "",
|
|
1206
1206
|
hidden: ""
|
|
1207
|
-
}, null, 8, tr)) :
|
|
1207
|
+
}, null, 8, tr)) : F("", !0),
|
|
1208
1208
|
K(t.$slots, "default"),
|
|
1209
|
-
e.permanentDisplay || l.value || u.value ? (U(),
|
|
1209
|
+
e.permanentDisplay || l.value || u.value ? (U(), I("div", {
|
|
1210
1210
|
key: 1,
|
|
1211
|
-
class:
|
|
1211
|
+
class: B(t.$style.ui3nDropFilesDropzone),
|
|
1212
1212
|
onDragenter: m,
|
|
1213
1213
|
onDragover: p,
|
|
1214
1214
|
onDragleave: h,
|
|
1215
1215
|
onDrop: g
|
|
1216
1216
|
}, [
|
|
1217
|
-
|
|
1218
|
-
|
|
1217
|
+
L("h3", { class: B(t.$style.ui3nDropFilesDropzoneTitle) }, q(e.title), 3),
|
|
1218
|
+
L("div", { class: B(t.$style.ui3nDropFilesDropzoneIcon) }, [(U(), I("svg", {
|
|
1219
1219
|
width: c.value * .35,
|
|
1220
1220
|
height: c.value * .35,
|
|
1221
1221
|
viewBox: "0 0 192 192",
|
|
1222
1222
|
fill: "none",
|
|
1223
1223
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1224
|
-
}, [...n[3] ||= [
|
|
1224
|
+
}, [...n[3] ||= [L("path", {
|
|
1225
1225
|
d: "M51 152C47.9333 152 45.3333 150.934 43.2 148.8C41.0667 146.667 40 144.067 40 141V119.8H46.2V141C46.2 142.2 46.7 143.3 47.7 144.3C48.7 145.3 49.8 145.8 51 145.8H141C142.2 145.8 143.3 145.3 144.3 144.3C145.3 143.3 145.8 142.2 145.8 141V119.8H152V141C152 144.067 150.933 146.667 148.8 148.8C146.667 150.934 144.067 152 141 152H51ZM93 122.4V49.2002L72.8 69.2002L68.4 65.0002L96 37.2002L123.6 65.0002L119.2 69.2002L99 49.2002V122.4H93Z",
|
|
1226
1226
|
fill: "var(--color-icon-control-primary-default)"
|
|
1227
1227
|
}, null, -1)]], 8, nr))], 2),
|
|
1228
|
-
|
|
1229
|
-
class:
|
|
1228
|
+
L("div", {
|
|
1229
|
+
class: B(t.$style.ui3nDropFilesDropzoneAdditional),
|
|
1230
1230
|
onDragenter: n[0] ||= Q(() => {}, ["stop", "prevent"]),
|
|
1231
1231
|
onDragleave: n[1] ||= Q(() => {}, ["stop", "prevent"])
|
|
1232
1232
|
}, [K(t.$slots, "additional-text")], 34)
|
|
1233
|
-
], 34)) :
|
|
1233
|
+
], 34)) : F("", !0)
|
|
1234
1234
|
], 34)), [[J(r), () => _()]]);
|
|
1235
1235
|
}
|
|
1236
1236
|
}), [["__cssModules", { $style: {
|
|
@@ -1241,7 +1241,7 @@ var Qn = {
|
|
|
1241
1241
|
ui3nDropFilesDropzoneTitle: "_ui3nDropFilesDropzoneTitle_gssdx_33",
|
|
1242
1242
|
ui3nDropFilesDropzoneIcon: "_ui3nDropFilesDropzoneIcon_gssdx_41",
|
|
1243
1243
|
ui3nDropFilesDropzoneAdditional: "_ui3nDropFilesDropzoneAdditional_gssdx_53"
|
|
1244
|
-
} }]]), ir = /* @__PURE__ */ D(/* @__PURE__ */
|
|
1244
|
+
} }]]), ir = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
1245
1245
|
__name: "ui3n-emoji",
|
|
1246
1246
|
props: {
|
|
1247
1247
|
emoji: {},
|
|
@@ -1253,26 +1253,28 @@ var Qn = {
|
|
|
1253
1253
|
},
|
|
1254
1254
|
emits: ["click"],
|
|
1255
1255
|
setup(e, { emit: t }) {
|
|
1256
|
-
let n = e, r = t, i = W(null), a =
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
i.value && e && e !== t && i.value.style.setProperty("--ui3n-emoji-size", `${e}px`);
|
|
1256
|
+
let n = e, r = t, i = W(null), a = N(() => ne[n.emoji]), o = N(() => {
|
|
1257
|
+
let e = isNaN(Number(n.size)) ? String(n.size) : `${n.size}px`;
|
|
1258
|
+
return {
|
|
1259
|
+
"--ui3n-emoji-size": e,
|
|
1260
|
+
"line-height": e
|
|
1261
|
+
};
|
|
1263
1262
|
});
|
|
1264
|
-
|
|
1265
|
-
e.
|
|
1266
|
-
}
|
|
1267
|
-
return (
|
|
1263
|
+
function s(e) {
|
|
1264
|
+
e.stopPropagation(), r("click", e);
|
|
1265
|
+
}
|
|
1266
|
+
return Y(() => n.emoji, (e) => {
|
|
1267
|
+
Object.keys(ne).includes(e) || console.error(`[Ui3nEmoji] Invalid emoticon: ${e}`);
|
|
1268
|
+
}, { immediate: !0 }), (t, n) => (U(), I("div", de({
|
|
1268
1269
|
ref_key: "emojiElement",
|
|
1269
1270
|
ref: i,
|
|
1270
|
-
class: [t.$style.ui3nEmoji, e.readonly && t.$style.readonly]
|
|
1271
|
-
|
|
1271
|
+
class: [t.$style.ui3nEmoji, e.readonly && t.$style.readonly],
|
|
1272
|
+
style: o.value
|
|
1273
|
+
}, ye(e.readonly ? {} : { click: s }, !0)), q(a.value && a.value.value), 17));
|
|
1272
1274
|
}
|
|
1273
1275
|
}), [["__cssModules", { $style: {
|
|
1274
|
-
ui3nEmoji: "
|
|
1275
|
-
readonly: "
|
|
1276
|
+
ui3nEmoji: "_ui3nEmoji_12jhb_1",
|
|
1277
|
+
readonly: "_readonly_12jhb_15"
|
|
1276
1278
|
} }]]), ar = ["id"], or = [
|
|
1277
1279
|
"autocomplete",
|
|
1278
1280
|
"type",
|
|
@@ -1281,8 +1283,9 @@ var Qn = {
|
|
|
1281
1283
|
"readonly",
|
|
1282
1284
|
"name",
|
|
1283
1285
|
"maxlength",
|
|
1284
|
-
"minlength"
|
|
1285
|
-
|
|
1286
|
+
"minlength",
|
|
1287
|
+
"value"
|
|
1288
|
+
], sr = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
1286
1289
|
__name: "ui3n-input",
|
|
1287
1290
|
props: {
|
|
1288
1291
|
id: {},
|
|
@@ -1341,24 +1344,24 @@ var Qn = {
|
|
|
1341
1344
|
"update:valid"
|
|
1342
1345
|
],
|
|
1343
1346
|
setup(e, { expose: t, emit: n }) {
|
|
1344
|
-
let r = e, i = n, a = Se(), o = W(null), s = W(""), c = W(!1), l = W(!1), u = W(""), d =
|
|
1347
|
+
let r = e, i = n, a = Se(), o = W(null), s = W(""), c = W(!1), l = W(!1), u = W(""), d = N(() => !!a["prepend-icon"]), f = N(() => !!a["append-icon"]), p = N(() => r.displayStateMode === "success" && r.displayStateWithIcon && !l.value), m = N(() => !r.disabled && r.clearable && !!s.value && !p.value), h = N(() => p.value || m.value || f.value), g = N(() => !!u.value || !!(r.displayStateMode && r.displayStateMessage)), _ = N(() => !!u.value || r.displayStateMode === "error" && !!r.displayStateMessage), v = N(() => r.displayStateMode === "success" && !!r.displayStateMessage);
|
|
1345
1348
|
function y(e) {
|
|
1346
1349
|
return e.target.value;
|
|
1347
1350
|
}
|
|
1348
|
-
function b(e) {
|
|
1349
|
-
let
|
|
1350
|
-
for (let
|
|
1351
|
-
if (typeof
|
|
1352
|
-
let r =
|
|
1353
|
-
typeof r == "string" ?
|
|
1351
|
+
function b(e, t = !1) {
|
|
1352
|
+
let n = [];
|
|
1353
|
+
for (let t of r.rules) {
|
|
1354
|
+
if (typeof t != "function") continue;
|
|
1355
|
+
let r = t(e);
|
|
1356
|
+
typeof r == "string" ? n.push(r) : r || n.push("Invalid");
|
|
1354
1357
|
}
|
|
1355
|
-
u.value =
|
|
1358
|
+
u.value = n.join(". "), (c.value || r.validateAtStartup || t) && i("update:valid", n.length === 0);
|
|
1356
1359
|
}
|
|
1357
1360
|
function x(e) {
|
|
1358
1361
|
l.value = !0, i("focus", e);
|
|
1359
1362
|
}
|
|
1360
1363
|
function S(e) {
|
|
1361
|
-
|
|
1364
|
+
fe(() => {
|
|
1362
1365
|
l.value = !1, i("blur", e);
|
|
1363
1366
|
});
|
|
1364
1367
|
}
|
|
@@ -1395,15 +1398,15 @@ var Qn = {
|
|
|
1395
1398
|
isFocused: l,
|
|
1396
1399
|
clearValue: te
|
|
1397
1400
|
}), H(() => {
|
|
1398
|
-
s.value = r.modelValue ?? "", o.value && (o.value
|
|
1401
|
+
s.value = r.modelValue ?? "", o.value && (i("init", o.value), r.autofocus && o.value.focus()), r.validateAtStartup && (c.value = !0, b(s.value));
|
|
1399
1402
|
}), Y(() => r.modelValue, (e) => {
|
|
1400
1403
|
let t = e ?? "";
|
|
1401
|
-
t !== s.value && (s.value = t,
|
|
1404
|
+
t !== s.value && (s.value = t, b(t, !0));
|
|
1402
1405
|
}), Y(() => r.name, (e) => {
|
|
1403
1406
|
e || te();
|
|
1404
|
-
}), (t, n) => (U(),
|
|
1407
|
+
}), (t, n) => (U(), I("div", {
|
|
1405
1408
|
id: e.id,
|
|
1406
|
-
class:
|
|
1409
|
+
class: B([
|
|
1407
1410
|
t.$style.ui3nInput,
|
|
1408
1411
|
e.size === "large" && t.$style.large,
|
|
1409
1412
|
e.label && t.$style.withLabel,
|
|
@@ -1413,20 +1416,20 @@ var Qn = {
|
|
|
1413
1416
|
e.displayStateMode === "success" && t.$style.success
|
|
1414
1417
|
])
|
|
1415
1418
|
}, [
|
|
1416
|
-
e.label ? (U(),
|
|
1419
|
+
e.label ? (U(), I("label", {
|
|
1417
1420
|
key: 0,
|
|
1418
|
-
class:
|
|
1419
|
-
}, q(e.label), 3)) :
|
|
1420
|
-
|
|
1421
|
+
class: B(t.$style.ui3nInputLabel)
|
|
1422
|
+
}, q(e.label), 3)) : F("", !0),
|
|
1423
|
+
L("div", { class: B([
|
|
1421
1424
|
t.$style.inputWrapper,
|
|
1422
1425
|
d.value && t.$style.withPrepend,
|
|
1423
1426
|
h.value && t.$style.withAppend
|
|
1424
1427
|
]) }, [
|
|
1425
|
-
d.value ? (U(),
|
|
1428
|
+
d.value ? (U(), I("div", {
|
|
1426
1429
|
key: 0,
|
|
1427
|
-
class:
|
|
1428
|
-
}, [K(t.$slots, "prepend-icon")], 2)) :
|
|
1429
|
-
|
|
1430
|
+
class: B(t.$style.prependIconSlot)
|
|
1431
|
+
}, [K(t.$slots, "prepend-icon")], 2)) : F("", !0),
|
|
1432
|
+
L("input", {
|
|
1430
1433
|
ref_key: "inputElement",
|
|
1431
1434
|
ref: o,
|
|
1432
1435
|
autocomplete: e.autocomplete,
|
|
@@ -1437,7 +1440,8 @@ var Qn = {
|
|
|
1437
1440
|
name: e.name,
|
|
1438
1441
|
maxlength: e.maxlength,
|
|
1439
1442
|
minlength: e.minlength,
|
|
1440
|
-
|
|
1443
|
+
value: s.value,
|
|
1444
|
+
class: B(t.$style.ui3nInputField),
|
|
1441
1445
|
onInput: w,
|
|
1442
1446
|
onKeydown: [
|
|
1443
1447
|
Z(T, ["enter"]),
|
|
@@ -1448,18 +1452,18 @@ var Qn = {
|
|
|
1448
1452
|
onBlur: S,
|
|
1449
1453
|
onChange: C
|
|
1450
1454
|
}, null, 42, or),
|
|
1451
|
-
h.value ? (U(),
|
|
1455
|
+
h.value ? (U(), I("div", {
|
|
1452
1456
|
key: 1,
|
|
1453
|
-
class:
|
|
1457
|
+
class: B(t.$style.appendIconSlot)
|
|
1454
1458
|
}, [
|
|
1455
|
-
p.value ? (U(),
|
|
1459
|
+
p.value ? (U(), P(k, {
|
|
1456
1460
|
key: 0,
|
|
1457
1461
|
icon: "round-check-circle-outline",
|
|
1458
1462
|
size: 16,
|
|
1459
1463
|
color: "var(--success-content-default)",
|
|
1460
|
-
class:
|
|
1461
|
-
}, null, 8, ["class"])) :
|
|
1462
|
-
m.value ? (U(),
|
|
1464
|
+
class: B(t.$style.appendSlotItem)
|
|
1465
|
+
}, null, 8, ["class"])) : F("", !0),
|
|
1466
|
+
m.value ? (U(), P(O, {
|
|
1463
1467
|
key: 1,
|
|
1464
1468
|
type: "icon",
|
|
1465
1469
|
size: "small",
|
|
@@ -1467,43 +1471,43 @@ var Qn = {
|
|
|
1467
1471
|
icon: "round-close",
|
|
1468
1472
|
"icon-size": "16",
|
|
1469
1473
|
"icon-color": "var(--color-icon-control-accent-default)",
|
|
1470
|
-
class:
|
|
1474
|
+
class: B(t.$style.appendSlotItem),
|
|
1471
1475
|
onMousedown: n[0] ||= Q(() => {}, ["prevent"]),
|
|
1472
1476
|
onTouchstart: n[1] ||= Q(() => {}, ["prevent"]),
|
|
1473
1477
|
onClick: te
|
|
1474
|
-
}, null, 8, ["class"])) :
|
|
1475
|
-
f.value ? K(t.$slots, "append-icon", { key: 2 }) :
|
|
1476
|
-
], 2)) :
|
|
1478
|
+
}, null, 8, ["class"])) : F("", !0),
|
|
1479
|
+
f.value ? K(t.$slots, "append-icon", { key: 2 }) : F("", !0)
|
|
1480
|
+
], 2)) : F("", !0)
|
|
1477
1481
|
], 2),
|
|
1478
|
-
g.value ? (U(),
|
|
1482
|
+
g.value ? (U(), I("div", {
|
|
1479
1483
|
key: 1,
|
|
1480
|
-
class:
|
|
1484
|
+
class: B([
|
|
1481
1485
|
t.$style.ui3nInputFieldMessage,
|
|
1482
1486
|
_.value && t.$style.ui3nInputErrorMessage,
|
|
1483
1487
|
v.value && t.$style.ui3nInputSuccessMessage
|
|
1484
1488
|
])
|
|
1485
|
-
}, q(u.value || e.displayStateMessage), 3)) :
|
|
1489
|
+
}, q(u.value || e.displayStateMessage), 3)) : F("", !0)
|
|
1486
1490
|
], 10, ar));
|
|
1487
1491
|
}
|
|
1488
1492
|
}), [["__cssModules", { $style: {
|
|
1489
|
-
ui3nInput: "
|
|
1490
|
-
withLabel: "
|
|
1491
|
-
large: "
|
|
1492
|
-
withoutBottomSpace: "
|
|
1493
|
-
inputWrapper: "
|
|
1494
|
-
ui3nInputField: "
|
|
1495
|
-
ui3nInputLabel: "
|
|
1496
|
-
prependIconSlot: "
|
|
1497
|
-
appendIconSlot: "
|
|
1498
|
-
withPrepend: "
|
|
1499
|
-
withAppend: "
|
|
1500
|
-
appendSlotItem: "
|
|
1501
|
-
ui3nInputFieldMessage: "
|
|
1502
|
-
ui3nInputErrorMessage: "
|
|
1503
|
-
ui3nInputSuccessMessage: "
|
|
1504
|
-
error: "
|
|
1505
|
-
success: "
|
|
1506
|
-
disabled: "
|
|
1493
|
+
ui3nInput: "_ui3nInput_dhax2_1",
|
|
1494
|
+
withLabel: "_withLabel_dhax2_13",
|
|
1495
|
+
large: "_large_dhax2_18",
|
|
1496
|
+
withoutBottomSpace: "_withoutBottomSpace_dhax2_30",
|
|
1497
|
+
inputWrapper: "_inputWrapper_dhax2_33",
|
|
1498
|
+
ui3nInputField: "_ui3nInputField_dhax2_36",
|
|
1499
|
+
ui3nInputLabel: "_ui3nInputLabel_dhax2_44",
|
|
1500
|
+
prependIconSlot: "_prependIconSlot_dhax2_97",
|
|
1501
|
+
appendIconSlot: "_appendIconSlot_dhax2_104",
|
|
1502
|
+
withPrepend: "_withPrepend_dhax2_112",
|
|
1503
|
+
withAppend: "_withAppend_dhax2_116",
|
|
1504
|
+
appendSlotItem: "_appendSlotItem_dhax2_120",
|
|
1505
|
+
ui3nInputFieldMessage: "_ui3nInputFieldMessage_dhax2_124",
|
|
1506
|
+
ui3nInputErrorMessage: "_ui3nInputErrorMessage_dhax2_135",
|
|
1507
|
+
ui3nInputSuccessMessage: "_ui3nInputSuccessMessage_dhax2_139",
|
|
1508
|
+
error: "_error_dhax2_143",
|
|
1509
|
+
success: "_success_dhax2_155",
|
|
1510
|
+
disabled: "_disabled_dhax2_159"
|
|
1507
1511
|
} }]]), cr = /* @__PURE__ */ g(((e, t) => {
|
|
1508
1512
|
var n = u(), r = c(), i = S(), a = "[object String]";
|
|
1509
1513
|
function o(e) {
|
|
@@ -1643,7 +1647,7 @@ var Qn = {
|
|
|
1643
1647
|
"multiple",
|
|
1644
1648
|
"accept",
|
|
1645
1649
|
"disabled"
|
|
1646
|
-
], Ar = /* @__PURE__ */ D(/* @__PURE__ */
|
|
1650
|
+
], Ar = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
1647
1651
|
__name: "ui3n-input-file",
|
|
1648
1652
|
props: {
|
|
1649
1653
|
id: {},
|
|
@@ -1698,11 +1702,11 @@ var Qn = {
|
|
|
1698
1702
|
}
|
|
1699
1703
|
return n({ clear: h }), Y(() => i.name, (e) => {
|
|
1700
1704
|
e || h();
|
|
1701
|
-
}), (t, n) => (U(),
|
|
1705
|
+
}), (t, n) => (U(), I("div", { class: B(t.$style.ui3nInputFile) }, [L("label", {
|
|
1702
1706
|
for: J(o),
|
|
1703
|
-
class:
|
|
1707
|
+
class: B([t.$style.label, e.disabled && t.$style.disabled]),
|
|
1704
1708
|
onClick: Q(c, ["stop", "prevent"])
|
|
1705
|
-
}, [K(t.$slots, "default", {}, () => [
|
|
1709
|
+
}, [K(t.$slots, "default", {}, () => [le(q(e.buttonText), 1)])], 10, Or), L("input", {
|
|
1706
1710
|
id: J(o),
|
|
1707
1711
|
ref_key: "fileInput",
|
|
1708
1712
|
ref: s,
|
|
@@ -1727,7 +1731,7 @@ var Qn = {
|
|
|
1727
1731
|
"rows",
|
|
1728
1732
|
"max-rows",
|
|
1729
1733
|
"disabled"
|
|
1730
|
-
], Nr = /* @__PURE__ */ D(/* @__PURE__ */
|
|
1734
|
+
], Nr = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
1731
1735
|
__name: "ui3n-text",
|
|
1732
1736
|
props: {
|
|
1733
1737
|
id: {},
|
|
@@ -1738,7 +1742,10 @@ var Qn = {
|
|
|
1738
1742
|
label: { default: "" },
|
|
1739
1743
|
placeholder: { default: "" },
|
|
1740
1744
|
rules: {},
|
|
1741
|
-
validateAtStartup: {
|
|
1745
|
+
validateAtStartup: {
|
|
1746
|
+
type: Boolean,
|
|
1747
|
+
default: !1
|
|
1748
|
+
},
|
|
1742
1749
|
disabled: {
|
|
1743
1750
|
type: Boolean,
|
|
1744
1751
|
default: !1
|
|
@@ -1758,23 +1765,23 @@ var Qn = {
|
|
|
1758
1765
|
],
|
|
1759
1766
|
setup(e, { expose: t, emit: n }) {
|
|
1760
1767
|
let r = e, i = n, a = W(null), o = W(""), s = W(!1), c = W(!1), l = W("");
|
|
1761
|
-
function u(e) {
|
|
1768
|
+
function u(e, t = !1) {
|
|
1762
1769
|
if (l.value = "", r.rules && r.rules.length) {
|
|
1763
1770
|
for (let t of r.rules) if (typeof t == "function") {
|
|
1764
1771
|
let n = t(e);
|
|
1765
1772
|
typeof n == "string" && (l.value += n);
|
|
1766
1773
|
}
|
|
1767
1774
|
}
|
|
1768
|
-
s.value && i("update:valid", !l.value);
|
|
1775
|
+
(s.value || t || r.validateAtStartup) && i("update:valid", !l.value);
|
|
1769
1776
|
}
|
|
1770
1777
|
function d(e) {
|
|
1771
1778
|
c.value = !0, i("focus", e);
|
|
1772
1779
|
}
|
|
1773
1780
|
function f(e) {
|
|
1774
1781
|
let t = e.target.value;
|
|
1775
|
-
setTimeout(() => {
|
|
1776
|
-
c.value = !1,
|
|
1777
|
-
},
|
|
1782
|
+
u(t), i("update:modelValue", t), i("change", t), setTimeout(() => {
|
|
1783
|
+
c.value = !1, i("blur", e);
|
|
1784
|
+
}, 50);
|
|
1778
1785
|
}
|
|
1779
1786
|
function p(e) {
|
|
1780
1787
|
let t = e.target.value;
|
|
@@ -1805,53 +1812,63 @@ var Qn = {
|
|
|
1805
1812
|
}), Y(() => r.name, (e) => {
|
|
1806
1813
|
e || _();
|
|
1807
1814
|
}), Y(() => r.modelValue, (e, t) => {
|
|
1808
|
-
(e ?? "") !== (t ?? "") && (o.value = e ?? "", u(o.value));
|
|
1809
|
-
}, { immediate: !0 }), (t, n) => (U(),
|
|
1815
|
+
(e ?? "") !== (t ?? "") && (o.value = e ?? "", u(o.value, s.value || r.validateAtStartup));
|
|
1816
|
+
}, { immediate: !0 }), (t, n) => (U(), I("div", {
|
|
1810
1817
|
id: e.id,
|
|
1811
|
-
class:
|
|
1818
|
+
class: B([
|
|
1812
1819
|
t.$style.ui3nText,
|
|
1813
1820
|
e.disabled && t.$style.disabled,
|
|
1814
|
-
c.value && t.$style.focused
|
|
1821
|
+
c.value && t.$style.focused,
|
|
1822
|
+
l.value && t.$style.hasError
|
|
1815
1823
|
])
|
|
1816
|
-
}, [
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1824
|
+
}, [
|
|
1825
|
+
e.label ? (U(), I("label", {
|
|
1826
|
+
key: 0,
|
|
1827
|
+
class: B(t.$style.label)
|
|
1828
|
+
}, q(e.label), 3)) : F("", !0),
|
|
1829
|
+
L("div", { class: B(t.$style.body) }, [L("textarea", de({
|
|
1830
|
+
ref_key: "textareaElement",
|
|
1831
|
+
ref: a,
|
|
1832
|
+
class: t.$style.content,
|
|
1833
|
+
value: o.value,
|
|
1834
|
+
name: e.name,
|
|
1835
|
+
placeholder: e.placeholder,
|
|
1836
|
+
readonly: e.disabled,
|
|
1837
|
+
rows: e.rows,
|
|
1838
|
+
"max-rows": e.maxRows,
|
|
1839
|
+
disabled: e.disabled
|
|
1840
|
+
}, t.$attrs, {
|
|
1841
|
+
onInput: p,
|
|
1842
|
+
onKeydown: [
|
|
1843
|
+
Z(m, ["enter"]),
|
|
1844
|
+
Z(h, ["esc"]),
|
|
1845
|
+
g
|
|
1846
|
+
],
|
|
1847
|
+
onFocusin: d,
|
|
1848
|
+
onFocusout: f
|
|
1849
|
+
}), null, 16, Mr)], 2),
|
|
1850
|
+
l.value ? (U(), I("div", {
|
|
1851
|
+
key: 1,
|
|
1852
|
+
class: B(t.$style.errorBlock)
|
|
1853
|
+
}, q(l.value), 3)) : F("", !0)
|
|
1854
|
+
], 10, jr));
|
|
1840
1855
|
}
|
|
1841
1856
|
}), [["__cssModules", { $style: {
|
|
1842
|
-
ui3nText: "
|
|
1843
|
-
label: "
|
|
1844
|
-
body: "
|
|
1845
|
-
content: "
|
|
1846
|
-
disabled: "
|
|
1847
|
-
focused: "
|
|
1857
|
+
ui3nText: "_ui3nText_1g5zc_1",
|
|
1858
|
+
label: "_label_1g5zc_13",
|
|
1859
|
+
body: "_body_1g5zc_23",
|
|
1860
|
+
content: "_content_1g5zc_34",
|
|
1861
|
+
disabled: "_disabled_1g5zc_69",
|
|
1862
|
+
focused: "_focused_1g5zc_81",
|
|
1863
|
+
hasError: "_hasError_1g5zc_89",
|
|
1864
|
+
errorBlock: "_errorBlock_1g5zc_93"
|
|
1848
1865
|
} }]]), Pr = ["id"], Fr = [
|
|
1849
1866
|
"name",
|
|
1850
1867
|
"id",
|
|
1851
1868
|
"disabled",
|
|
1852
1869
|
"checked",
|
|
1853
1870
|
"value"
|
|
1854
|
-
], Ir = ["tabindex"], Lr = ["width", "height"], Rr = ["width", "height"], zr = /* @__PURE__ */ D(/* @__PURE__ */
|
|
1871
|
+
], Ir = ["tabindex"], Lr = ["width", "height"], Rr = ["width", "height"], zr = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
1855
1872
|
__name: "ui3n-checkbox",
|
|
1856
1873
|
props: {
|
|
1857
1874
|
id: {},
|
|
@@ -1880,7 +1897,7 @@ var Qn = {
|
|
|
1880
1897
|
],
|
|
1881
1898
|
default: !1
|
|
1882
1899
|
},
|
|
1883
|
-
size: { default:
|
|
1900
|
+
size: { default: 16 },
|
|
1884
1901
|
color: { default: "var(--color-icon-control-accent-default)" },
|
|
1885
1902
|
indeterminate: {
|
|
1886
1903
|
type: Boolean,
|
|
@@ -1893,37 +1910,38 @@ var Qn = {
|
|
|
1893
1910
|
},
|
|
1894
1911
|
emits: ["change", "update:modelValue"],
|
|
1895
1912
|
setup(e, { expose: t, emit: n }) {
|
|
1896
|
-
let r = te, i = e, a = n, o = Se(), s = be(), c = W(null), l = W(i.
|
|
1913
|
+
let r = te, i = e, a = n, o = Se(), s = be(), c = W(null), l = W(i.modelValue), u = W(i.indeterminate), d = N(() => u.value ? "indeterminate" : l.value === i.checkedValue ? "checked" : "unchecked"), f = N(() => typeof l.value == "boolean" ? l.value ? "on" : "" : String(l.value)), p = N(() => {
|
|
1914
|
+
let e = parseFloat(String(i.size));
|
|
1915
|
+
return isNaN(e) ? 12 : e - 4;
|
|
1916
|
+
}), m = N(() => ({
|
|
1917
|
+
"--ui3n-checkbox-size": typeof i.size == "number" ? `${i.size}px` : i.size,
|
|
1918
|
+
"--ui3n-checkbox-color": i.color
|
|
1919
|
+
})), h = N(() => {
|
|
1897
1920
|
let e = [s.ui3nCheckbox];
|
|
1898
1921
|
return i.disabled && e.push(s.disabled), !o.default && e.push(s.noLabel), e;
|
|
1899
|
-
}),
|
|
1922
|
+
}), g = N(() => {
|
|
1900
1923
|
let e = [s.ui3nCheckboxBody];
|
|
1901
1924
|
return d.value === "unchecked" ? e.push(s.unfilled) : e.push(s.filled), e;
|
|
1902
1925
|
});
|
|
1903
|
-
function
|
|
1926
|
+
function _(e) {
|
|
1904
1927
|
e.preventDefault(), l.value = d.value === "unchecked" ? i.checkedValue : i.uncheckedValue, u.value &&= !1, a("change", l.value), a("update:modelValue", l.value);
|
|
1905
1928
|
}
|
|
1906
|
-
function
|
|
1929
|
+
function v() {
|
|
1907
1930
|
l.value = i.uncheckedValue, u.value = !1, a("change", l.value), a("update:modelValue", l.value);
|
|
1908
1931
|
}
|
|
1909
|
-
return t({ clear:
|
|
1910
|
-
e ||
|
|
1911
|
-
}), Y(() => i.modelValue, (e) => l.value = e
|
|
1912
|
-
c.value && c.value.style.setProperty("--ui3n-checkbox-size", `${e}px`);
|
|
1913
|
-
}), Y(() => i.color, (e) => {
|
|
1914
|
-
c.value && c.value.style.setProperty("--ui3n-checkbox-color", e);
|
|
1915
|
-
}), he(() => {
|
|
1932
|
+
return t({ clear: v }), Y(() => i.name, (e) => {
|
|
1933
|
+
e || v();
|
|
1934
|
+
}), Y(() => i.modelValue, (e) => l.value = e), Y(() => i.indeterminate, (e) => u.value = e), pe(() => {
|
|
1916
1935
|
let e = typeof i.checkedValue, t = typeof i.uncheckedValue, n = typeof i.modelValue;
|
|
1917
1936
|
if (e !== t || e !== n || t !== n) throw Error("[Ui3nCheckbox] types of \"value\", \"checkedValue\" and \"uncheckedValue\" are different");
|
|
1918
|
-
}),
|
|
1919
|
-
c.value && (c.value.style.setProperty("--ui3n-checkbox-size", `${i.size}px`), c.value.style.setProperty("--ui3n-checkbox-color", i.color));
|
|
1920
|
-
}), (t, n) => (U(), F("div", {
|
|
1937
|
+
}), (t, n) => (U(), I("div", {
|
|
1921
1938
|
ref_key: "checkboxEl",
|
|
1922
1939
|
ref: c,
|
|
1923
1940
|
id: e.id,
|
|
1924
|
-
class:
|
|
1941
|
+
class: B(h.value),
|
|
1942
|
+
style: V(m.value)
|
|
1925
1943
|
}, [
|
|
1926
|
-
|
|
1944
|
+
L("input", {
|
|
1927
1945
|
type: "checkbox",
|
|
1928
1946
|
style: { display: "none" },
|
|
1929
1947
|
name: e.name,
|
|
@@ -1932,78 +1950,54 @@ var Qn = {
|
|
|
1932
1950
|
checked: d.value !== "unchecked",
|
|
1933
1951
|
value: f.value
|
|
1934
1952
|
}, null, 8, Fr),
|
|
1935
|
-
Te((U(),
|
|
1936
|
-
class:
|
|
1953
|
+
Te((U(), I("div", {
|
|
1954
|
+
class: B(g.value),
|
|
1937
1955
|
tabindex: e.disabled ? -1 : 0,
|
|
1938
|
-
onKeydown: [Z(
|
|
1939
|
-
onClick:
|
|
1940
|
-
}, [d.value === "checked" ? (U(),
|
|
1956
|
+
onKeydown: [Z(_, ["space"]), Z(_, ["enter"])],
|
|
1957
|
+
onClick: _
|
|
1958
|
+
}, [d.value === "checked" ? (U(), I("svg", {
|
|
1941
1959
|
key: 0,
|
|
1942
|
-
width:
|
|
1943
|
-
height:
|
|
1960
|
+
width: p.value,
|
|
1961
|
+
height: p.value,
|
|
1944
1962
|
viewBox: "0 0 24 24",
|
|
1945
1963
|
fill: "none",
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
id: "SVGRepo_tracerCarrier",
|
|
1955
|
-
"stroke-linecap": "round",
|
|
1956
|
-
"stroke-linejoin": "round"
|
|
1957
|
-
}, null, -1),
|
|
1958
|
-
I("g", { id: "SVGRepo_iconCarrier" }, [I("path", {
|
|
1959
|
-
d: "M20.0001 7L9.0001 18L4 13",
|
|
1960
|
-
stroke: "#fff",
|
|
1961
|
-
"stroke-width": "3",
|
|
1962
|
-
"stroke-linecap": "round",
|
|
1963
|
-
"stroke-linejoin": "round"
|
|
1964
|
-
})], -1)
|
|
1965
|
-
]], 10, Lr)) : P("", !0), d.value === "indeterminate" ? (U(), F("svg", {
|
|
1964
|
+
class: B(t.$style.ui3nCheckboxIcon)
|
|
1965
|
+
}, [...n[0] ||= [L("g", { id: "SVGRepo_iconCarrier" }, [L("path", {
|
|
1966
|
+
d: "M20.0001 7L9.0001 18L4 13",
|
|
1967
|
+
stroke: "#fff",
|
|
1968
|
+
"stroke-width": "3",
|
|
1969
|
+
"stroke-linecap": "round",
|
|
1970
|
+
"stroke-linejoin": "round"
|
|
1971
|
+
})], -1)]], 10, Lr)) : F("", !0), d.value === "indeterminate" ? (U(), I("svg", {
|
|
1966
1972
|
key: 1,
|
|
1967
|
-
width:
|
|
1968
|
-
height:
|
|
1973
|
+
width: p.value,
|
|
1974
|
+
height: p.value,
|
|
1969
1975
|
viewBox: "0 0 24 24",
|
|
1970
1976
|
fill: "none",
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
}, null, -1),
|
|
1983
|
-
I("g", { id: "SVGRepo_iconCarrier" }, [I("path", {
|
|
1984
|
-
d: "M7 12L17 12",
|
|
1985
|
-
stroke: "#fff",
|
|
1986
|
-
"stroke-width": "3",
|
|
1987
|
-
"stroke-linecap": "round",
|
|
1988
|
-
"stroke-linejoin": "round"
|
|
1989
|
-
})], -1)
|
|
1990
|
-
]], 10, Rr)) : P("", !0)], 42, Ir)), [[J(r)]]),
|
|
1991
|
-
I("div", {
|
|
1992
|
-
class: z(t.$style.ui3nCheckboxLabel),
|
|
1993
|
-
onClick: h
|
|
1977
|
+
class: B(t.$style.ui3nCheckboxIcon)
|
|
1978
|
+
}, [...n[1] ||= [L("g", { id: "SVGRepo_iconCarrier" }, [L("path", {
|
|
1979
|
+
d: "M7 12L17 12",
|
|
1980
|
+
stroke: "#fff",
|
|
1981
|
+
"stroke-width": "3",
|
|
1982
|
+
"stroke-linecap": "round",
|
|
1983
|
+
"stroke-linejoin": "round"
|
|
1984
|
+
})], -1)]], 10, Rr)) : F("", !0)], 42, Ir)), [[J(r)]]),
|
|
1985
|
+
L("div", {
|
|
1986
|
+
class: B(t.$style.ui3nCheckboxLabel),
|
|
1987
|
+
onClick: _
|
|
1994
1988
|
}, [K(t.$slots, "default")], 2)
|
|
1995
|
-
],
|
|
1989
|
+
], 14, Pr));
|
|
1996
1990
|
}
|
|
1997
1991
|
}), [["__cssModules", { $style: {
|
|
1998
|
-
ui3nCheckbox: "
|
|
1999
|
-
noLabel: "
|
|
2000
|
-
ui3nCheckboxBody: "
|
|
2001
|
-
filled: "
|
|
2002
|
-
unfilled: "
|
|
2003
|
-
ui3nCheckboxIcon: "
|
|
2004
|
-
ui3nCheckboxLabel: "
|
|
2005
|
-
disabled: "
|
|
2006
|
-
} }]]), Br = /* @__PURE__ */
|
|
1992
|
+
ui3nCheckbox: "_ui3nCheckbox_s0t61_3",
|
|
1993
|
+
noLabel: "_noLabel_s0t61_17",
|
|
1994
|
+
ui3nCheckboxBody: "_ui3nCheckboxBody_s0t61_21",
|
|
1995
|
+
filled: "_filled_s0t61_37",
|
|
1996
|
+
unfilled: "_unfilled_s0t61_59",
|
|
1997
|
+
ui3nCheckboxIcon: "_ui3nCheckboxIcon_s0t61_78",
|
|
1998
|
+
ui3nCheckboxLabel: "_ui3nCheckboxLabel_s0t61_82",
|
|
1999
|
+
disabled: "_disabled_s0t61_90"
|
|
2000
|
+
} }]]), Br = /* @__PURE__ */ z({
|
|
2007
2001
|
__name: "ui3n-table-sort-icon",
|
|
2008
2002
|
props: {
|
|
2009
2003
|
size: { default: 16 },
|
|
@@ -2011,15 +2005,18 @@ var Qn = {
|
|
|
2011
2005
|
value: {}
|
|
2012
2006
|
},
|
|
2013
2007
|
setup(e) {
|
|
2014
|
-
let t = e, n =
|
|
2015
|
-
|
|
2008
|
+
let t = e, n = N(() => t.value === "asc" ? "round-arrow-upward" : "round-arrow-downward"), r = N(() => {
|
|
2009
|
+
let e = Number(t.size);
|
|
2010
|
+
return isNaN(e) ? 16 : e;
|
|
2011
|
+
});
|
|
2012
|
+
return (t, i) => (U(), P(se, {
|
|
2016
2013
|
mode: "out-in",
|
|
2017
2014
|
name: "fade"
|
|
2018
2015
|
}, {
|
|
2019
|
-
default: X(() => [(U(),
|
|
2016
|
+
default: X(() => [(U(), P(k, {
|
|
2020
2017
|
key: n.value,
|
|
2021
2018
|
icon: n.value,
|
|
2022
|
-
size:
|
|
2019
|
+
size: r.value,
|
|
2023
2020
|
color: e.color
|
|
2024
2021
|
}, null, 8, [
|
|
2025
2022
|
"icon",
|
|
@@ -2029,34 +2026,40 @@ var Qn = {
|
|
|
2029
2026
|
_: 1
|
|
2030
2027
|
}));
|
|
2031
2028
|
}
|
|
2032
|
-
}), Vr = /* @__PURE__ */
|
|
2029
|
+
}), Vr = /* @__PURE__ */ g(((e, t) => {
|
|
2033
2030
|
var n = sn();
|
|
2034
2031
|
function r(e, t, r) {
|
|
2035
2032
|
var i = e == null ? void 0 : n(e, t);
|
|
2036
2033
|
return i === void 0 ? r : i;
|
|
2037
2034
|
}
|
|
2038
2035
|
t.exports = r;
|
|
2039
|
-
}))
|
|
2040
|
-
|
|
2036
|
+
})), Hr = /* @__PURE__ */ g(((e, t) => {
|
|
2037
|
+
var n = Yt(), r = 1, i = 4;
|
|
2038
|
+
function a(e) {
|
|
2039
|
+
return n(e, r | i);
|
|
2040
|
+
}
|
|
2041
|
+
t.exports = a;
|
|
2042
|
+
})), Ur = /* @__PURE__ */ p(Vr(), 1), Wr = /* @__PURE__ */ p(r(), 1), Gr = /* @__PURE__ */ p(Hr(), 1);
|
|
2043
|
+
function Kr(e, t) {
|
|
2041
2044
|
let n = W(null), r = W({
|
|
2042
2045
|
sortOrder: m(),
|
|
2043
2046
|
fieldAsRowKey: p()
|
|
2044
|
-
}), i = r.value?.fieldAsRowKey ? W([]) : W(/* @__PURE__ */ new Set()), a = W(!1), o =
|
|
2047
|
+
}), i = r.value?.fieldAsRowKey ? W([]) : W(/* @__PURE__ */ new Set()), a = W(!1), o = N(() => !!r.value.fieldAsRowKey), s = N(() => e.head.filter((e) => !e.hidden)), c = N(() => o.value ? e.body.content.filter((e) => i.value.includes(e[r.value.fieldAsRowKey])) : Array.from(i.value)), l = N(() => o.value ? (0, $.default)(i.value) : i.value.size), u = N(() => e.config?.selectable === "multiple" && a.value), d = N(() => {
|
|
2045
2048
|
if (!n.value) return "100%";
|
|
2046
2049
|
let { config: t = {}, head: r } = e, { columnStyle: i } = t;
|
|
2047
|
-
return r.map((e) => e.key).reduce((e, t, n) => {
|
|
2048
|
-
let r = (0,
|
|
2050
|
+
return r.filter((e) => !e.hidden).map((e) => e.key).reduce((e, t, n) => {
|
|
2051
|
+
let r = (0, Ur.default)(i, [t, "width"], "1fr");
|
|
2049
2052
|
return e = n === 0 ? `${r}` : `${e} ${r}`, e;
|
|
2050
2053
|
}, "");
|
|
2051
|
-
}), f =
|
|
2054
|
+
}), f = N(() => !e.config?.minHeightUnusedPlace || isNaN(Number(e.config?.minHeightUnusedPlace)) ? {} : { minHeight: `${Number(e.config?.minHeightUnusedPlace || 0)}px` });
|
|
2052
2055
|
function p() {
|
|
2053
2056
|
let { config: t = {}, body: n } = e, { fieldAsRowKey: r } = t;
|
|
2054
|
-
if (r && r in (0,
|
|
2055
|
-
if ("id" in (0,
|
|
2057
|
+
if (r && r in (0, Ur.default)(n, ["content", 0], {})) return r;
|
|
2058
|
+
if ("id" in (0, Ur.default)(n, ["content", 0], {})) return "id";
|
|
2056
2059
|
}
|
|
2057
2060
|
function m() {
|
|
2058
2061
|
let { config: t = {}, head: n } = e, { sortOrder: r } = t;
|
|
2059
|
-
if (!(0,
|
|
2062
|
+
if (!(0, Wr.default)(r)) return (0, Gr.default)(r);
|
|
2060
2063
|
for (let e of n) {
|
|
2061
2064
|
let { key: t, sortable: n } = e;
|
|
2062
2065
|
if (n) return {
|
|
@@ -2073,9 +2076,9 @@ function Ur(e, t) {
|
|
|
2073
2076
|
return o.value ? !!i.value.find((t) => t === e[r.value.fieldAsRowKey]) : i.value.has(e);
|
|
2074
2077
|
}
|
|
2075
2078
|
function _(t) {
|
|
2076
|
-
if ((0,
|
|
2079
|
+
if ((0, Wr.default)(e.body.rowsStyle) || !o.value) return {};
|
|
2077
2080
|
let n = t[r.value.fieldAsRowKey];
|
|
2078
|
-
return (0,
|
|
2081
|
+
return (0, Ur.default)(e, [
|
|
2079
2082
|
"body",
|
|
2080
2083
|
"rowsStyle",
|
|
2081
2084
|
n
|
|
@@ -2091,13 +2094,13 @@ function Ur(e, t) {
|
|
|
2091
2094
|
if (g(e)) if (!o.value) i.value.delete(e);
|
|
2092
2095
|
else {
|
|
2093
2096
|
let t = i.value.findIndex((t) => t === e[r.value.fieldAsRowKey]);
|
|
2094
|
-
i.value.splice(t, 1);
|
|
2097
|
+
t !== -1 && i.value.splice(t, 1);
|
|
2095
2098
|
}
|
|
2096
|
-
else o.value
|
|
2099
|
+
else o.value ? i.value.push(e[r.value.fieldAsRowKey]) : i.value.add(e);
|
|
2097
2100
|
}
|
|
2098
2101
|
function x(n, r) {
|
|
2099
2102
|
let { selectable: i } = e.config;
|
|
2100
|
-
i === "single" ? y(n) : b(n),
|
|
2103
|
+
i === "single" ? y(n) : b(n), r || t("select:row", c.value);
|
|
2101
2104
|
}
|
|
2102
2105
|
function S(n) {
|
|
2103
2106
|
if (e.config.selectable === "multiple") {
|
|
@@ -2107,19 +2110,21 @@ function Ur(e, t) {
|
|
|
2107
2110
|
}
|
|
2108
2111
|
}
|
|
2109
2112
|
function C(e) {
|
|
2110
|
-
r.value.sortOrder?.field === e ? r.value.sortOrder.direction = r.value.sortOrder?.direction === "asc" ? "desc" : "asc" :
|
|
2113
|
+
r.value.sortOrder?.field === e ? r.value.sortOrder.direction = r.value.sortOrder?.direction === "asc" ? "desc" : "asc" : r.value.sortOrder = {
|
|
2114
|
+
field: e,
|
|
2115
|
+
direction: "desc"
|
|
2116
|
+
}, r.value.sortOrder?.field && t("change:sort", r.value.sortOrder);
|
|
2111
2117
|
}
|
|
2112
2118
|
function w() {
|
|
2113
|
-
o.value
|
|
2119
|
+
o.value ? i.value = [] : i.value.clear(), a.value = !1, t("select:row", []);
|
|
2114
2120
|
}
|
|
2115
2121
|
return Y(() => e.config?.tableName, (e) => {
|
|
2116
2122
|
e || w();
|
|
2117
|
-
}), Y(
|
|
2118
|
-
e && e !== t && n.value && n.value.style.setProperty("--ui3n-table-columns-width", e);
|
|
2119
|
-
}, { immediate: !0 }), Y(() => l.value, (t, n) => {
|
|
2123
|
+
}), Y(() => l.value, (t, n) => {
|
|
2120
2124
|
t && t > n && e.config.selectable === "multiple" && !u.value && (a.value = !0);
|
|
2121
2125
|
}), {
|
|
2122
2126
|
tableEl: n,
|
|
2127
|
+
tableColumnWidth: d,
|
|
2123
2128
|
unusedPlaceCssStyle: f,
|
|
2124
2129
|
currentConfig: r,
|
|
2125
2130
|
visibleColumns: s,
|
|
@@ -2140,7 +2145,7 @@ function Ur(e, t) {
|
|
|
2140
2145
|
}
|
|
2141
2146
|
//#endregion
|
|
2142
2147
|
//#region src/components/ui3n-table/ui3n-table.vue?vue&type=script&setup=true&lang.ts
|
|
2143
|
-
var
|
|
2148
|
+
var qr = ["name", "value"], Jr = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
2144
2149
|
__name: "ui3n-table",
|
|
2145
2150
|
props: {
|
|
2146
2151
|
config: {},
|
|
@@ -2149,112 +2154,113 @@ var Wr = ["name", "value"], Gr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2149
2154
|
},
|
|
2150
2155
|
emits: ["change:sort", "select:row"],
|
|
2151
2156
|
setup(e, { expose: t, emit: n }) {
|
|
2152
|
-
let { tableEl: r,
|
|
2157
|
+
let { tableEl: r, tableColumnWidth: i, unusedPlaceCssStyle: a, currentConfig: o, visibleColumns: s, hasGroupActionsRow: c, showGroupActionsRow: l, selectedRows: u, selectedRowsArray: d, selectedRowsSize: f, closeGroupActionsRow: p, getRowKey: m, isRowSelected: h, getRowStyle: g, processSelection: _, toggleSelectedRows: v, changeSortOrder: y, clear: b } = Kr(e, n), x = { select: _ };
|
|
2153
2158
|
return t({
|
|
2154
|
-
getRowStyle:
|
|
2155
|
-
selectedRows:
|
|
2156
|
-
selectedRowsArray:
|
|
2157
|
-
hasGroupActionsRow:
|
|
2158
|
-
closeGroupActionsRow:
|
|
2159
|
-
clear:
|
|
2160
|
-
}), (t, n) => (U(),
|
|
2159
|
+
getRowStyle: g,
|
|
2160
|
+
selectedRows: u,
|
|
2161
|
+
selectedRowsArray: d,
|
|
2162
|
+
hasGroupActionsRow: c,
|
|
2163
|
+
closeGroupActionsRow: p,
|
|
2164
|
+
clear: b
|
|
2165
|
+
}), (t, n) => (U(), I("div", {
|
|
2161
2166
|
ref_key: "tableEl",
|
|
2162
2167
|
ref: r,
|
|
2163
|
-
|
|
2168
|
+
style: V({ "--ui3n-table-columns-width": J(i) }),
|
|
2169
|
+
class: B(t.$style.ui3nTable)
|
|
2164
2170
|
}, [
|
|
2165
|
-
e.config?.tableName && J(
|
|
2171
|
+
e.config?.tableName && J(f) > 0 ? (U(), I("fieldset", {
|
|
2166
2172
|
key: 0,
|
|
2167
|
-
class:
|
|
2168
|
-
}, [(U(!0),
|
|
2169
|
-
key: J(
|
|
2173
|
+
class: B(t.$style.hiddenBlock)
|
|
2174
|
+
}, [(U(!0), I(M, null, G(J(d), (t, n) => (U(), I("input", {
|
|
2175
|
+
key: J(m)(t, n),
|
|
2170
2176
|
type: "hidden",
|
|
2171
2177
|
name: e.config.selectable === "multiple" ? `${e.config.tableName}[]` : e.config.tableName,
|
|
2172
|
-
value: String(J(
|
|
2173
|
-
}, null, 8,
|
|
2174
|
-
|
|
2178
|
+
value: String(J(m)(t, n))
|
|
2179
|
+
}, null, 8, qr))), 128))], 2)) : F("", !0),
|
|
2180
|
+
L("div", { class: B([t.$style.header, J(l) && t.$style.withGroupActions]) }, [J(l) ? (U(), I("div", {
|
|
2175
2181
|
key: 0,
|
|
2176
|
-
class:
|
|
2182
|
+
class: B(t.$style.groupActions)
|
|
2177
2183
|
}, [
|
|
2178
|
-
|
|
2179
|
-
indeterminate: J(
|
|
2180
|
-
"model-value": J(
|
|
2181
|
-
onChange: J(
|
|
2184
|
+
R(zr, {
|
|
2185
|
+
indeterminate: J(f) < e.body.content.length && J(f) !== 0,
|
|
2186
|
+
"model-value": J(f) === e.body.content.length,
|
|
2187
|
+
onChange: J(v)
|
|
2182
2188
|
}, {
|
|
2183
|
-
default: X(() => [
|
|
2189
|
+
default: X(() => [le(" Selected: " + q(J(f)), 1)]),
|
|
2184
2190
|
_: 1
|
|
2185
2191
|
}, 8, [
|
|
2186
2192
|
"indeterminate",
|
|
2187
2193
|
"model-value",
|
|
2188
2194
|
"onChange"
|
|
2189
2195
|
]),
|
|
2190
|
-
|
|
2191
|
-
|
|
2196
|
+
L("div", { class: B(t.$style.groupActionsBody) }, [K(t.$slots, "group-actions", { selectedRows: J(d) })], 2),
|
|
2197
|
+
R(O, {
|
|
2192
2198
|
type: "secondary",
|
|
2193
|
-
onClick: J(
|
|
2199
|
+
onClick: J(p)
|
|
2194
2200
|
}, {
|
|
2195
|
-
default: X(() => [...n[0] ||= [
|
|
2201
|
+
default: X(() => [...n[0] ||= [le(" Cancel ", -1)]]),
|
|
2196
2202
|
_: 1
|
|
2197
2203
|
}, 8, ["onClick"])
|
|
2198
|
-
], 2)) :
|
|
2204
|
+
], 2)) : F("", !0), (U(!0), I(M, null, G(J(s), (e) => (U(), I("div", {
|
|
2199
2205
|
key: e.key,
|
|
2200
|
-
class:
|
|
2206
|
+
class: B([
|
|
2201
2207
|
t.$style.headerItemWrapper,
|
|
2202
2208
|
e.sortable && t.$style.sortable,
|
|
2203
|
-
e.sortable && J(
|
|
2209
|
+
e.sortable && J(o).sortOrder?.field === e.key && t.$style.sortableActive
|
|
2204
2210
|
]),
|
|
2205
|
-
style:
|
|
2206
|
-
}, [
|
|
2211
|
+
style: V(e.headCellStyle)
|
|
2212
|
+
}, [L("div", de({
|
|
2207
2213
|
class: t.$style.headerItem,
|
|
2208
2214
|
style: e.headCellStyle
|
|
2209
|
-
}, ye(e.sortable ? { click: () => J(
|
|
2215
|
+
}, ye(e.sortable ? { click: () => J(y)(e.key) } : {}, !0)), [K(t.$slots, `header-cell-${e.key}`, {}, () => [L("span", { class: B(t.$style.headerText) }, q(e.text), 3)]), e.sortable && J(o).sortOrder?.field === e.key ? (U(), P(Br, {
|
|
2210
2216
|
key: 0,
|
|
2211
|
-
value: J(
|
|
2217
|
+
value: J(o).sortOrder?.direction,
|
|
2212
2218
|
size: "16"
|
|
2213
|
-
}, null, 8, ["value"])) :
|
|
2214
|
-
|
|
2215
|
-
key: J(
|
|
2216
|
-
class:
|
|
2219
|
+
}, null, 8, ["value"])) : F("", !0)], 16)], 6))), 128))], 2),
|
|
2220
|
+
L("div", { class: B(t.$style.body) }, [e.config?.showNoDataMessage && !J($.default)(e.body.content) ? K(t.$slots, "no-data", { key: 0 }, () => [L("div", { class: B(t.$style.noData) }, "No data", 2)]) : (U(), I(M, { key: 1 }, [t.$slots.row ? (U(!0), I(M, { key: 0 }, G(e.body.content, (n, r) => (U(), I("div", {
|
|
2221
|
+
key: J(m)(n, r),
|
|
2222
|
+
class: B([
|
|
2217
2223
|
t.$style.row,
|
|
2218
2224
|
t.$slots.row && t.$style.customRow,
|
|
2219
|
-
J(
|
|
2225
|
+
J(h)(n) && t.$style.selected,
|
|
2220
2226
|
e.config.selectable && t.$style.selectable
|
|
2221
2227
|
])
|
|
2222
2228
|
}, [K(t.$slots, "row", {
|
|
2223
2229
|
row: n,
|
|
2224
|
-
rowStyle: J(
|
|
2230
|
+
rowStyle: J(g)(n),
|
|
2225
2231
|
rowIndex: r,
|
|
2226
|
-
isRowSelected: J(
|
|
2232
|
+
isRowSelected: J(h)(n),
|
|
2227
2233
|
columnStyle: e.config?.columnStyle,
|
|
2228
|
-
events:
|
|
2229
|
-
})], 2))), 128)) : (U(!0),
|
|
2230
|
-
key: J(
|
|
2231
|
-
class:
|
|
2234
|
+
events: x
|
|
2235
|
+
})], 2))), 128)) : (U(!0), I(M, { key: 1 }, G(e.body.content, (n, r) => (U(), I("div", {
|
|
2236
|
+
key: J(m)(n, r),
|
|
2237
|
+
class: B([
|
|
2232
2238
|
t.$style.row,
|
|
2233
|
-
J(
|
|
2239
|
+
J(h)(n) && t.$style.selected,
|
|
2234
2240
|
e.config.selectable && t.$style.selectable
|
|
2235
2241
|
]),
|
|
2236
|
-
style:
|
|
2237
|
-
}, [e.config.selectable ? (U(),
|
|
2242
|
+
style: V(J(g)(n))
|
|
2243
|
+
}, [e.config.selectable ? (U(), I("div", {
|
|
2238
2244
|
key: 0,
|
|
2239
|
-
class:
|
|
2240
|
-
}, [
|
|
2241
|
-
"model-value": J(
|
|
2242
|
-
onChange: (e) => J(
|
|
2243
|
-
}, null, 8, ["model-value", "onChange"])], 2)) :
|
|
2245
|
+
class: B(t.$style.rowCheckbox)
|
|
2246
|
+
}, [R(zr, {
|
|
2247
|
+
"model-value": J(h)(n),
|
|
2248
|
+
onChange: (e) => J(_)(n)
|
|
2249
|
+
}, null, 8, ["model-value", "onChange"])], 2)) : F("", !0), (U(!0), I(M, null, G(J(s), (i, a) => (U(), I("div", {
|
|
2244
2250
|
key: i.key,
|
|
2245
|
-
class:
|
|
2251
|
+
class: B([t.$style.bodyItem, a === 0 && t.$style.bodyItemFirst])
|
|
2246
2252
|
}, [K(t.$slots, `row-cell-${i.key}`, {
|
|
2247
2253
|
row: n,
|
|
2248
2254
|
rowIndex: r,
|
|
2249
|
-
isRowSelected: J(
|
|
2255
|
+
isRowSelected: J(h)(n),
|
|
2250
2256
|
columnStyle: e.config?.columnStyle,
|
|
2251
2257
|
cell: n[i.key]
|
|
2252
|
-
}, () => [
|
|
2253
|
-
|
|
2254
|
-
class:
|
|
2255
|
-
style:
|
|
2258
|
+
}, () => [L("span", { class: B(t.$style.cell) }, q(i.format ? i.format(n[i.key]) : n[i.key]), 3)])], 2))), 128))], 6))), 128))], 64))], 2),
|
|
2259
|
+
L("div", {
|
|
2260
|
+
class: B(t.$style.unusedPlace),
|
|
2261
|
+
style: V(J(a))
|
|
2256
2262
|
}, [K(t.$slots, "unused-place")], 6)
|
|
2257
|
-
],
|
|
2263
|
+
], 6));
|
|
2258
2264
|
}
|
|
2259
2265
|
}), [["__cssModules", { $style: {
|
|
2260
2266
|
ui3nTable: "_ui3nTable_d2343_3",
|
|
@@ -2279,27 +2285,27 @@ var Wr = ["name", "value"], Gr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2279
2285
|
cell: "_cell_d2343_171",
|
|
2280
2286
|
noData: "_noData_d2343_177",
|
|
2281
2287
|
unusedPlace: "_unusedPlace_d2343_190"
|
|
2282
|
-
} }]]),
|
|
2288
|
+
} }]]), Yr = ["id", "onClick"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
2283
2289
|
__name: "ui3n-dialog-provider",
|
|
2284
2290
|
setup(e) {
|
|
2285
|
-
let t =
|
|
2291
|
+
let t = ue(C);
|
|
2286
2292
|
function n(e, n) {
|
|
2287
2293
|
(n.closeOnClickOverlay || n.dialogProps?.closeOnClickOverlay) && t.$closeDialog(e, { event: "click-overlay" });
|
|
2288
2294
|
}
|
|
2289
2295
|
function r(e, n) {
|
|
2290
2296
|
t.$closeDialog(e, n);
|
|
2291
2297
|
}
|
|
2292
|
-
return (e, i) => (U(),
|
|
2298
|
+
return (e, i) => (U(), P(oe, { to: "body" }, [(U(!0), I(M, null, G(J(t).dialogStack.value, (t) => (U(), I("div", {
|
|
2293
2299
|
id: `dialog-wrapper-${t.id}`,
|
|
2294
2300
|
key: t.id,
|
|
2295
|
-
class:
|
|
2301
|
+
class: B(e.$style["dialog-provider-overlay"]),
|
|
2296
2302
|
onClick: Q((e) => n(t.id, t.props), ["self", "prevent"])
|
|
2297
|
-
}, [(U(),
|
|
2303
|
+
}, [(U(), P(_e(t.component), de({ ref_for: !0 }, t.props, { onAction: (e) => r(t.id, e) }), null, 16, ["onAction"]))], 10, Yr))), 128))]));
|
|
2298
2304
|
}
|
|
2299
2305
|
}), [["__cssModules", { $style: { "dialog-provider-overlay": "_dialog-provider-overlay_v01lr_1" } }]]);
|
|
2300
2306
|
//#endregion
|
|
2301
2307
|
//#region src/components/ui3n-dialog/util.ts
|
|
2302
|
-
function
|
|
2308
|
+
function Zr({ width: e, style: t, defaultValue: n = 380 }) {
|
|
2303
2309
|
if (e) {
|
|
2304
2310
|
let t = Number(e);
|
|
2305
2311
|
return Number.isNaN(t) ? e : `${t}px`;
|
|
@@ -2308,7 +2314,7 @@ function Jr({ width: e, style: t, defaultValue: n = 380 }) {
|
|
|
2308
2314
|
}
|
|
2309
2315
|
//#endregion
|
|
2310
2316
|
//#region src/components/ui3n-dialog/ui3n-dialog.vue?vue&type=script&setup=true&lang.ts
|
|
2311
|
-
var
|
|
2317
|
+
var Qr = ["id"], $r = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
2312
2318
|
__name: "ui3n-dialog",
|
|
2313
2319
|
props: {
|
|
2314
2320
|
id: {},
|
|
@@ -2352,8 +2358,8 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2352
2358
|
top: 0,
|
|
2353
2359
|
shiftX: 0,
|
|
2354
2360
|
shiftY: 0
|
|
2355
|
-
}), s =
|
|
2356
|
-
width:
|
|
2361
|
+
}), s = N(() => ({
|
|
2362
|
+
width: Zr({
|
|
2357
2363
|
width: n.width,
|
|
2358
2364
|
style: n.cssStyle
|
|
2359
2365
|
}),
|
|
@@ -2362,7 +2368,7 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2362
2368
|
left: `${o.value.left}px`,
|
|
2363
2369
|
top: `${o.value.top}px`
|
|
2364
2370
|
}
|
|
2365
|
-
})), c =
|
|
2371
|
+
})), c = N(() => n.icon ? typeof n.icon == "string" ? {
|
|
2366
2372
|
icon: n.icon,
|
|
2367
2373
|
size: 14,
|
|
2368
2374
|
color: "var(--color-icon-control-secondary-default)"
|
|
@@ -2393,7 +2399,7 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2393
2399
|
a.value && (o.value.left = e.clientX - o.value.shiftX - o.value.initialLeft, o.value.top = e.clientY - o.value.shiftY - o.value.initialTop);
|
|
2394
2400
|
}
|
|
2395
2401
|
return H(() => {
|
|
2396
|
-
i.value && (i.value.style.setProperty("--ui3n-dialog-confirm-button-color", n.confirmButtonColor), i.value.style.setProperty("--ui3n-dialog-cancel-button-color", n.cancelButtonColor), i.value.style.setProperty("--ui3n-dialog-confirm-background-color", n.confirmButtonBackground), i.value.style.setProperty("--ui3n-dialog-cancel-background-color", n.cancelButtonBackground),
|
|
2402
|
+
i.value && (i.value.style.setProperty("--ui3n-dialog-confirm-button-color", n.confirmButtonColor), i.value.style.setProperty("--ui3n-dialog-cancel-button-color", n.cancelButtonColor), i.value.style.setProperty("--ui3n-dialog-confirm-background-color", n.confirmButtonBackground), i.value.style.setProperty("--ui3n-dialog-cancel-background-color", n.cancelButtonBackground), fe(() => {
|
|
2397
2403
|
i.value && i.value.focus(), setTimeout(() => {
|
|
2398
2404
|
if (i.value) {
|
|
2399
2405
|
let e = i.value.getBoundingClientRect();
|
|
@@ -2401,7 +2407,7 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2401
2407
|
}
|
|
2402
2408
|
}, 100);
|
|
2403
2409
|
}));
|
|
2404
|
-
}), (t, i) => (U(),
|
|
2410
|
+
}), (t, i) => (U(), I("div", de({
|
|
2405
2411
|
id: e.id,
|
|
2406
2412
|
ref: "dialog-el",
|
|
2407
2413
|
tabindex: "1",
|
|
@@ -2418,22 +2424,22 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2418
2424
|
mousemove: p,
|
|
2419
2425
|
keydown: l
|
|
2420
2426
|
} : { keydown: l }, !0)), [
|
|
2421
|
-
e.title && !t.$slots.header ? (U(),
|
|
2427
|
+
e.title && !t.$slots.header ? (U(), I("div", {
|
|
2422
2428
|
key: 0,
|
|
2423
|
-
class:
|
|
2424
|
-
}, [c.value ? (U(),
|
|
2425
|
-
t.$slots.header ? (U(),
|
|
2429
|
+
class: B([t.$style.title, t.$style.titleDefault])
|
|
2430
|
+
}, [c.value ? (U(), P(k, de({ key: 0 }, c.value, { class: t.$style.icon }), null, 16, ["class"])) : F("", !0), L("span", null, q(e.title), 1)], 2)) : F("", !0),
|
|
2431
|
+
t.$slots.header ? (U(), I("div", {
|
|
2426
2432
|
key: 1,
|
|
2427
|
-
class:
|
|
2428
|
-
}, [K(t.$slots, "header")], 2)) :
|
|
2429
|
-
t.$slots.body ? (U(),
|
|
2433
|
+
class: B(t.$style.title)
|
|
2434
|
+
}, [K(t.$slots, "header")], 2)) : F("", !0),
|
|
2435
|
+
t.$slots.body ? (U(), I("div", {
|
|
2430
2436
|
key: 2,
|
|
2431
|
-
class:
|
|
2432
|
-
}, [K(t.$slots, "body")], 2)) :
|
|
2433
|
-
(e.confirmButton || e.cancelButton) && !t.$slots.actions ? (U(),
|
|
2437
|
+
class: B(t.$style.content)
|
|
2438
|
+
}, [K(t.$slots, "body")], 2)) : F("", !0),
|
|
2439
|
+
(e.confirmButton || e.cancelButton) && !t.$slots.actions ? (U(), I("div", {
|
|
2434
2440
|
key: 3,
|
|
2435
|
-
class:
|
|
2436
|
-
}, [e.cancelButton ? (U(),
|
|
2441
|
+
class: B([t.$style.actions, t.$style.actionsDefault])
|
|
2442
|
+
}, [e.cancelButton ? (U(), P(O, {
|
|
2437
2443
|
key: 0,
|
|
2438
2444
|
type: "custom",
|
|
2439
2445
|
color: e.cancelButtonBackground,
|
|
@@ -2443,9 +2449,9 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2443
2449
|
data: n.data
|
|
2444
2450
|
}), ["stop", "prevent"])
|
|
2445
2451
|
}, {
|
|
2446
|
-
default: X(() => [
|
|
2452
|
+
default: X(() => [le(q(e.cancelButtonText), 1)]),
|
|
2447
2453
|
_: 1
|
|
2448
|
-
}, 8, ["color", "text-color"])) :
|
|
2454
|
+
}, 8, ["color", "text-color"])) : F("", !0), e.confirmButton ? (U(), P(O, {
|
|
2449
2455
|
key: 1,
|
|
2450
2456
|
type: "custom",
|
|
2451
2457
|
color: e.confirmButtonBackground,
|
|
@@ -2456,24 +2462,24 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2456
2462
|
data: n.data
|
|
2457
2463
|
}), ["stop", "prevent"])
|
|
2458
2464
|
}, {
|
|
2459
|
-
default: X(() => [
|
|
2465
|
+
default: X(() => [le(q(e.confirmButtonText), 1)]),
|
|
2460
2466
|
_: 1
|
|
2461
2467
|
}, 8, [
|
|
2462
2468
|
"color",
|
|
2463
2469
|
"text-color",
|
|
2464
2470
|
"disabled"
|
|
2465
|
-
])) :
|
|
2466
|
-
t.$slots.actions ? (U(),
|
|
2471
|
+
])) : F("", !0)], 2)) : F("", !0),
|
|
2472
|
+
t.$slots.actions ? (U(), I("div", {
|
|
2467
2473
|
key: 4,
|
|
2468
|
-
class:
|
|
2469
|
-
}, [K(t.$slots, "actions")], 2)) :
|
|
2470
|
-
t.$slots.loading ? (U(),
|
|
2474
|
+
class: B(t.$style.actions)
|
|
2475
|
+
}, [K(t.$slots, "actions")], 2)) : F("", !0),
|
|
2476
|
+
t.$slots.loading ? (U(), I("div", {
|
|
2471
2477
|
key: 5,
|
|
2472
|
-
class:
|
|
2473
|
-
}, [K(t.$slots, "loading")], 2)) :
|
|
2474
|
-
e.hideCloseButton ?
|
|
2478
|
+
class: B(t.$style.loading)
|
|
2479
|
+
}, [K(t.$slots, "loading")], 2)) : F("", !0),
|
|
2480
|
+
e.hideCloseButton ? F("", !0) : (U(), P(O, {
|
|
2475
2481
|
key: 6,
|
|
2476
|
-
class:
|
|
2482
|
+
class: B(t.$style.closeBtn),
|
|
2477
2483
|
type: "icon",
|
|
2478
2484
|
size: "small",
|
|
2479
2485
|
color: "var(--color-bg-block-primary-default)",
|
|
@@ -2482,7 +2488,7 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2482
2488
|
"icon-color": "var(--color-icon-control-primary-default)",
|
|
2483
2489
|
onClick: i[2] ||= Q((e) => r("action", { event: "close" }), ["stop", "prevent"])
|
|
2484
2490
|
}, null, 8, ["class"]))
|
|
2485
|
-
], 16,
|
|
2491
|
+
], 16, Qr));
|
|
2486
2492
|
}
|
|
2487
2493
|
}), [["__cssModules", { $style: {
|
|
2488
2494
|
dialog: "_dialog_13zmx_3",
|
|
@@ -2495,7 +2501,7 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2495
2501
|
actions: "_actions_13zmx_74",
|
|
2496
2502
|
actionsDefault: "_actionsDefault_13zmx_81",
|
|
2497
2503
|
loading: "_loading_13zmx_89"
|
|
2498
|
-
} }]]),
|
|
2504
|
+
} }]]), ei = ["id"], ti = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
2499
2505
|
__name: "ui3n-menu",
|
|
2500
2506
|
props: {
|
|
2501
2507
|
id: {},
|
|
@@ -2507,6 +2513,10 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2507
2513
|
type: Boolean,
|
|
2508
2514
|
default: !0
|
|
2509
2515
|
},
|
|
2516
|
+
lockScroll: {
|
|
2517
|
+
type: Boolean,
|
|
2518
|
+
default: !1
|
|
2519
|
+
},
|
|
2510
2520
|
offsetX: { default: 0 },
|
|
2511
2521
|
offsetY: { default: 0 },
|
|
2512
2522
|
contentBorderRadius: { default: 4 },
|
|
@@ -2526,6 +2536,7 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2526
2536
|
}
|
|
2527
2537
|
},
|
|
2528
2538
|
emits: [
|
|
2539
|
+
"click",
|
|
2529
2540
|
"open",
|
|
2530
2541
|
"opened",
|
|
2531
2542
|
"close",
|
|
@@ -2534,7 +2545,10 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2534
2545
|
"update:modelValue"
|
|
2535
2546
|
],
|
|
2536
2547
|
setup(e, { expose: t, emit: n }) {
|
|
2537
|
-
let r = e, i = n, a = Ce("menu-trigger-element"), o = Ce("menu-content-element"), s = W(!1), c = W(r.triggerElement || null), l =
|
|
2548
|
+
let r = e, i = n, a = Ce("menu-trigger-element"), o = Ce("menu-content-element"), s = W(!1), c = W(r.triggerElement || null), l = N(() => c.value || a.value), u = N(() => {
|
|
2549
|
+
let e = l.value;
|
|
2550
|
+
return e ? e instanceof HTMLElement ? e : "contextElement" in e && e.contextElement instanceof HTMLElement ? e.contextElement : null : null;
|
|
2551
|
+
}), d = N(() => {
|
|
2538
2552
|
let e = [ke({
|
|
2539
2553
|
mainAxis: r.offsetY,
|
|
2540
2554
|
crossAxis: r.offsetX + 2
|
|
@@ -2543,12 +2557,12 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2543
2557
|
fallbackAxisSideDirection: "end",
|
|
2544
2558
|
fallbackPlacements: ["top-end", "bottom-end"]
|
|
2545
2559
|
})), e.push(Ae()), e;
|
|
2546
|
-
}), { floatingStyles:
|
|
2560
|
+
}), { floatingStyles: f, isPositioned: p, update: m } = je(l, o, {
|
|
2547
2561
|
placement: "bottom-start",
|
|
2548
2562
|
strategy: r.positionStrategy,
|
|
2549
|
-
middleware:
|
|
2563
|
+
middleware: d,
|
|
2550
2564
|
whileElementsMounted: r.positionAutoupdate || r.positionStrategy === "fixed" ? De : void 0
|
|
2551
|
-
}),
|
|
2565
|
+
}), h = N(() => {
|
|
2552
2566
|
let e = "";
|
|
2553
2567
|
if (typeof r.contentBorderRadius == "number") e = `${r.contentBorderRadius}px`;
|
|
2554
2568
|
else if (Array.isArray(r.contentBorderRadius)) {
|
|
@@ -2556,53 +2570,89 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2556
2570
|
e = `${t}px ${n}px ${i}px ${a}px`;
|
|
2557
2571
|
}
|
|
2558
2572
|
return {
|
|
2559
|
-
...
|
|
2573
|
+
...f.value,
|
|
2560
2574
|
"--ui3n-menu-zIndex": String(r.zIndex),
|
|
2561
2575
|
...e && { "--ui3n-menu-border-radius": e },
|
|
2562
2576
|
...r.contentStyles || {}
|
|
2563
2577
|
};
|
|
2564
2578
|
});
|
|
2565
|
-
function
|
|
2579
|
+
function g(e) {
|
|
2580
|
+
e.preventDefault();
|
|
2581
|
+
}
|
|
2582
|
+
function _(e) {
|
|
2583
|
+
if (!e) return document.body;
|
|
2584
|
+
let t = e.parentElement;
|
|
2585
|
+
for (; t && t !== document.body && t !== document.documentElement;) {
|
|
2586
|
+
let e = window.getComputedStyle(t);
|
|
2587
|
+
if (/(auto|scroll)/.test(e.overflowY || e.overflow) && t.scrollHeight > t.clientHeight) return t;
|
|
2588
|
+
t = t.parentElement;
|
|
2589
|
+
}
|
|
2590
|
+
return document.body;
|
|
2591
|
+
}
|
|
2592
|
+
function v() {
|
|
2593
|
+
if (!r.lockScroll) return;
|
|
2594
|
+
let e = _(u.value);
|
|
2595
|
+
if (e) {
|
|
2596
|
+
let t = Number(e.dataset.scrollLocksCount || "0");
|
|
2597
|
+
t === 0 ? (e.dataset.scrollLocksCount = "1", e.dataset.originalOverscroll = e.style.overscrollBehaviorY || "", e.style.overscrollBehaviorY = "contain", e === document.body ? (document.addEventListener("wheel", g, { passive: !1 }), document.addEventListener("touchmove", g, { passive: !1 })) : (e.addEventListener("wheel", g, { passive: !1 }), e.addEventListener("touchmove", g, { passive: !1 }))) : e.dataset.scrollLocksCount = String(t + 1);
|
|
2598
|
+
}
|
|
2599
|
+
}
|
|
2600
|
+
function y() {
|
|
2601
|
+
let e = _(u.value);
|
|
2602
|
+
if (!e) return;
|
|
2603
|
+
let t = Number(e.dataset.scrollLocksCount || "0");
|
|
2604
|
+
if (t > 0) {
|
|
2605
|
+
let n = t - 1;
|
|
2606
|
+
if (n === 0) {
|
|
2607
|
+
let t = e.dataset.originalOverscroll;
|
|
2608
|
+
t ? e.style.overscrollBehaviorY = t : e.style.removeProperty("overscroll-behavior-y"), e === document.body ? (document.removeEventListener("wheel", g), document.removeEventListener("touchmove", g)) : (e.removeEventListener("wheel", g), e.removeEventListener("touchmove", g)), delete e.dataset.scrollLocksCount, delete e.dataset.originalOverscroll;
|
|
2609
|
+
} else e.dataset.scrollLocksCount = String(n);
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
function b() {
|
|
2566
2613
|
r.disabled || (s.value = !s.value, s.value ? i("open") : i("close"), i("update:modelValue", s.value));
|
|
2567
2614
|
}
|
|
2568
|
-
function
|
|
2615
|
+
function x() {
|
|
2569
2616
|
s.value = !1, i("close"), i("update:modelValue", s.value);
|
|
2570
2617
|
}
|
|
2571
|
-
function
|
|
2572
|
-
|
|
2618
|
+
function S(e) {
|
|
2619
|
+
u.value?.contains(e.target) || (i("click-outside"), r.closeOnClickOutside && (s.value = !1, i("close"), i("update:modelValue", s.value)));
|
|
2573
2620
|
}
|
|
2574
|
-
return Y(
|
|
2575
|
-
|
|
2621
|
+
return Y(() => s.value, (e) => {
|
|
2622
|
+
e ? v() : y();
|
|
2576
2623
|
}), Y(() => r.modelValue, (e) => {
|
|
2577
|
-
s.value !== e && (s.value = e);
|
|
2624
|
+
e !== void 0 && s.value !== e && (s.value = e, i(e ? "open" : "close"));
|
|
2578
2625
|
}, { immediate: !0 }), Y(() => r.triggerElement, (e) => {
|
|
2579
|
-
e && (c.value = e,
|
|
2626
|
+
e && (c.value = e, m());
|
|
2580
2627
|
}), Y([() => r.offsetX, () => r.offsetY], ([e, t], [n, r]) => {
|
|
2581
|
-
(e !== n || t !== r) &&
|
|
2628
|
+
(e !== n || t !== r) && m();
|
|
2629
|
+
}), he(() => {
|
|
2630
|
+
y();
|
|
2582
2631
|
}), t({
|
|
2583
|
-
isPositioned:
|
|
2584
|
-
update:
|
|
2585
|
-
}), (t, n) => (U(),
|
|
2632
|
+
isPositioned: p,
|
|
2633
|
+
update: m
|
|
2634
|
+
}), (t, n) => (U(), I("div", {
|
|
2586
2635
|
ref: "menu-element",
|
|
2587
2636
|
id: e.id,
|
|
2588
|
-
class:
|
|
2589
|
-
|
|
2637
|
+
class: B(t.$style.ui3nMenu),
|
|
2638
|
+
onClick: n[0] ||= (e) => i("click", e)
|
|
2639
|
+
}, [L("div", {
|
|
2590
2640
|
ref: "menu-trigger-element",
|
|
2591
|
-
class:
|
|
2592
|
-
onClick: Q(
|
|
2593
|
-
}, [K(t.$slots, "default")], 2), s.value ? Te((U(),
|
|
2641
|
+
class: B([t.$style.ui3nMenuTrigger, e.disabled && t.$style.ui3nMenuTriggerDisabled]),
|
|
2642
|
+
onClick: Q(b, ["stop"])
|
|
2643
|
+
}, [K(t.$slots, "default")], 2), s.value ? Te((U(), I("div", de({
|
|
2594
2644
|
key: 0,
|
|
2595
2645
|
ref: "menu-content-element",
|
|
2596
|
-
style:
|
|
2646
|
+
style: h.value,
|
|
2597
2647
|
class: t.$style.ui3nMenuContent
|
|
2598
|
-
}, ye(e.closeOnClick ? { click:
|
|
2648
|
+
}, ye(e.closeOnClick ? { click: x } : {}, !0)), [K(t.$slots, "menu")], 16)), [[J(On), S]]) : F("", !0)], 10, ei));
|
|
2599
2649
|
}
|
|
2600
2650
|
}), [["__cssModules", { $style: {
|
|
2601
|
-
ui3nMenu: "
|
|
2602
|
-
ui3nMenuTrigger: "
|
|
2603
|
-
ui3nMenuTriggerDisabled: "
|
|
2604
|
-
ui3nMenuContent: "
|
|
2605
|
-
} }]]),
|
|
2651
|
+
ui3nMenu: "_ui3nMenu_t6wf8_3",
|
|
2652
|
+
ui3nMenuTrigger: "_ui3nMenuTrigger_t6wf8_11",
|
|
2653
|
+
ui3nMenuTriggerDisabled: "_ui3nMenuTriggerDisabled_t6wf8_15",
|
|
2654
|
+
ui3nMenuContent: "_ui3nMenuContent_t6wf8_20"
|
|
2655
|
+
} }]]), ni = ["id"], ri = ["onClick"], ii = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
2606
2656
|
__name: "ui3n-list",
|
|
2607
2657
|
props: {
|
|
2608
2658
|
id: {},
|
|
@@ -2621,26 +2671,26 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2621
2671
|
emits: ["select"],
|
|
2622
2672
|
setup(e, { emit: t }) {
|
|
2623
2673
|
let n = t;
|
|
2624
|
-
return (t, r) => (U(),
|
|
2674
|
+
return (t, r) => (U(), I("div", {
|
|
2625
2675
|
ref: "listElement",
|
|
2626
2676
|
id: e.id,
|
|
2627
|
-
class:
|
|
2628
|
-
}, [
|
|
2677
|
+
class: B(t.$style.ui3nList)
|
|
2678
|
+
}, [L("div", { class: B([t.$style.ui3nListTitle, e.sticky && t.$style.ui3nListTitleSticky]) }, [K(t.$slots, "title", {}, () => [e.title ? (U(), I("div", {
|
|
2629
2679
|
key: 0,
|
|
2630
|
-
class:
|
|
2631
|
-
}, q(e.title), 3)) :
|
|
2680
|
+
class: B(t.$style.ui3nListTitleContent)
|
|
2681
|
+
}, q(e.title), 3)) : F("", !0)])], 2), L("div", { class: B(t.$style.ui3nListContent) }, [(U(!0), I(M, null, G(e.items, (r, i) => (U(), I("div", {
|
|
2632
2682
|
key: r[e.keyField],
|
|
2633
|
-
class:
|
|
2683
|
+
class: B(t.$style.ui3nListItem)
|
|
2634
2684
|
}, [K(t.$slots, "item", {
|
|
2635
2685
|
item: r,
|
|
2636
2686
|
index: i
|
|
2637
|
-
}, () => [
|
|
2638
|
-
class:
|
|
2687
|
+
}, () => [L("div", {
|
|
2688
|
+
class: B([t.$style.ui3nListItemContent, e.disabled && t.$style.ui3nListItemContentDisabled]),
|
|
2639
2689
|
onClick: Q((e) => n("select", {
|
|
2640
2690
|
value: r,
|
|
2641
2691
|
index: i
|
|
2642
2692
|
}), ["stop"])
|
|
2643
|
-
}, q(r), 11,
|
|
2693
|
+
}, q(r), 11, ri)])], 2))), 128))], 2)], 10, ni));
|
|
2644
2694
|
}
|
|
2645
2695
|
}), [["__cssModules", { $style: {
|
|
2646
2696
|
ui3nList: "_ui3nList_1mtxl_1",
|
|
@@ -2651,10 +2701,10 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2651
2701
|
ui3nListItem: "_ui3nListItem_1mtxl_26",
|
|
2652
2702
|
ui3nListItemContent: "_ui3nListItemContent_1mtxl_43",
|
|
2653
2703
|
ui3nListItemContentDisabled: "_ui3nListItemContentDisabled_1mtxl_50"
|
|
2654
|
-
} }]]),
|
|
2704
|
+
} }]]), ai = 32, oi = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
2655
2705
|
__name: "ui3n-scrollbar-vertical",
|
|
2656
2706
|
props: {
|
|
2657
|
-
thumbMinHeight: { default:
|
|
2707
|
+
thumbMinHeight: { default: ai },
|
|
2658
2708
|
thumbHeight: { default: "auto" },
|
|
2659
2709
|
thumbRadius: { default: 4 },
|
|
2660
2710
|
thumbColor: { default: "var(--color-bg-control-accent-default)" },
|
|
@@ -2670,10 +2720,10 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2670
2720
|
},
|
|
2671
2721
|
emits: ["scroll"],
|
|
2672
2722
|
setup(e, { expose: t, emit: n }) {
|
|
2673
|
-
let r = e, i = n, a = W(null), o = W(null), s = W(null), c = W(0), l = W(0), u = W(0), d = W(!1), f = W(!1), p = W(!1), m = null, h, g = 0, _ = 0, v =
|
|
2723
|
+
let r = e, i = n, a = W(null), o = W(null), s = W(null), c = W(0), l = W(0), u = W(0), d = W(!1), f = W(!1), p = W(!1), m = null, h, g = 0, _ = 0, v = N(() => c.value > l.value), y = N(() => d.value ? !0 : v.value && (f.value || p.value)), b = N(() => {
|
|
2674
2724
|
let e = Number(r.thumbMinHeight);
|
|
2675
|
-
return isNaN(e) ?
|
|
2676
|
-
}), x =
|
|
2725
|
+
return isNaN(e) ? ai : e;
|
|
2726
|
+
}), x = N(() => {
|
|
2677
2727
|
if (!c.value) return 0;
|
|
2678
2728
|
if (r.thumbHeight !== "auto") {
|
|
2679
2729
|
let e = Number(r.thumbHeight);
|
|
@@ -2681,62 +2731,62 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2681
2731
|
}
|
|
2682
2732
|
let e = l.value / c.value, t = l.value * e;
|
|
2683
2733
|
return Math.max(b.value, t);
|
|
2684
|
-
}), S =
|
|
2734
|
+
}), S = N(() => {
|
|
2685
2735
|
if (!c.value || c.value === l.value) return 0;
|
|
2686
2736
|
let e = c.value - l.value, t = l.value - x.value;
|
|
2687
2737
|
return u.value / e * t;
|
|
2688
|
-
}), C =
|
|
2738
|
+
}), C = N(() => {
|
|
2689
2739
|
let e = Number(r.thumbRadius);
|
|
2690
2740
|
return isNaN(e) ? String(r.thumbRadius) : `${e}px`;
|
|
2691
|
-
}), w =
|
|
2741
|
+
}), w = N(() => r.thumbColor), T = N(() => r.thumbHoverColor), ee = N(() => r.thumbActiveColor), E = N(() => {
|
|
2692
2742
|
let e = Number(r.trackWidth);
|
|
2693
2743
|
return isNaN(e) ? String(r.trackWidth) : `${e}px`;
|
|
2694
|
-
}), te =
|
|
2744
|
+
}), te = N(() => r.trackColor), D = N(() => {
|
|
2695
2745
|
let e = Number(r.trackRadius);
|
|
2696
2746
|
return isNaN(e) ? String(r.trackRadius) : `${e}px`;
|
|
2697
2747
|
});
|
|
2698
2748
|
function O() {
|
|
2699
2749
|
a.value && (c.value = a.value.scrollHeight, l.value = a.value.clientHeight, u.value = a.value.scrollTop);
|
|
2700
2750
|
}
|
|
2701
|
-
function
|
|
2702
|
-
d.value || (u.value = e.target.scrollTop), p.value = !0,
|
|
2751
|
+
function k(e) {
|
|
2752
|
+
d.value || (u.value = e.target.scrollTop), p.value = !0, h && clearTimeout(h), h = setTimeout(() => {
|
|
2703
2753
|
p.value = !1;
|
|
2704
2754
|
}, 1500), i("scroll", e);
|
|
2705
2755
|
}
|
|
2706
|
-
function
|
|
2756
|
+
function A(e) {
|
|
2707
2757
|
if (e.target !== o.value || !a.value || !o.value) return;
|
|
2708
2758
|
let t = o.value.getBoundingClientRect(), n = e.clientY - t.top - x.value / 2, r = c.value - l.value, i = n / (l.value - x.value) * r;
|
|
2709
2759
|
i = Math.max(0, Math.min(r, i)), a.value.scrollTo({ top: i });
|
|
2710
2760
|
}
|
|
2711
|
-
function
|
|
2712
|
-
!s.value || !a.value || (e.preventDefault(), e.stopPropagation(), s.value.setPointerCapture(e.pointerId), d.value = !0, g = e.clientY, _ = u.value, document.body.style.userSelect = "none", s.value.addEventListener("pointermove",
|
|
2761
|
+
function ne(e) {
|
|
2762
|
+
!s.value || !a.value || (e.pointerType === "mouse" && e.preventDefault(), e.stopPropagation(), s.value.setPointerCapture(e.pointerId), d.value = !0, g = e.clientY, _ = u.value, document.body.style.userSelect = "none", s.value.addEventListener("pointermove", re), s.value.addEventListener("pointerup", j), s.value.addEventListener("pointercancel", j));
|
|
2713
2763
|
}
|
|
2714
|
-
function
|
|
2764
|
+
function re(e) {
|
|
2715
2765
|
if (!d.value || !a.value) return;
|
|
2716
2766
|
let t = e.clientY - g, n = c.value - l.value, r = t / (l.value - x.value) * n;
|
|
2717
2767
|
a.value.scrollTop = _ + r, u.value = a.value.scrollTop;
|
|
2718
2768
|
}
|
|
2719
|
-
function
|
|
2769
|
+
function j(e) {
|
|
2720
2770
|
if (d.value && (d.value = !1, document.body.style.userSelect = "", s.value)) {
|
|
2721
2771
|
try {
|
|
2722
2772
|
s.value.releasePointerCapture(e.pointerId);
|
|
2723
2773
|
} catch {}
|
|
2724
|
-
s.value.removeEventListener("pointermove",
|
|
2774
|
+
s.value.removeEventListener("pointermove", re), s.value.removeEventListener("pointerup", j), s.value.removeEventListener("pointercancel", j);
|
|
2725
2775
|
}
|
|
2726
2776
|
}
|
|
2727
2777
|
return H(() => {
|
|
2728
2778
|
O(), a.value && (m = new ResizeObserver(O), m.observe(a.value), r.autoUpdate && a.value.firstElementChild && m.observe(a.value.firstElementChild));
|
|
2729
|
-
}),
|
|
2730
|
-
m?.disconnect(),
|
|
2779
|
+
}), me(() => {
|
|
2780
|
+
m?.disconnect(), h && clearTimeout(h), s.value && (s.value.removeEventListener("pointermove", re), s.value.removeEventListener("pointerup", j), s.value.removeEventListener("pointercancel", j)), document.body.style.userSelect = "";
|
|
2731
2781
|
}), t({
|
|
2732
2782
|
scrollTo: (e) => {
|
|
2733
2783
|
a.value?.scrollTo(e);
|
|
2734
2784
|
},
|
|
2735
2785
|
getContainer: () => a.value,
|
|
2736
2786
|
updateMetrics: O
|
|
2737
|
-
}), (e, t) => (U(),
|
|
2738
|
-
class:
|
|
2739
|
-
style:
|
|
2787
|
+
}), (e, t) => (U(), I("div", {
|
|
2788
|
+
class: B(e.$style.ui3nScrollbarVertical),
|
|
2789
|
+
style: V({
|
|
2740
2790
|
"--ui3n-scrollbar-thumb-radius": C.value,
|
|
2741
2791
|
"--ui3n-scrollbar-thumb-color": w.value,
|
|
2742
2792
|
"--ui3n-scrollbar-thumb-hover-color": T.value,
|
|
@@ -2747,35 +2797,35 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2747
2797
|
}),
|
|
2748
2798
|
onMouseenter: t[0] ||= (e) => f.value = !0,
|
|
2749
2799
|
onMouseleave: t[1] ||= (e) => f.value = !1
|
|
2750
|
-
}, [
|
|
2800
|
+
}, [L("div", {
|
|
2751
2801
|
ref_key: "containerRef",
|
|
2752
2802
|
ref: a,
|
|
2753
|
-
class:
|
|
2754
|
-
onScroll:
|
|
2755
|
-
}, [K(e.$slots, "default")], 34),
|
|
2803
|
+
class: B(e.$style.scrollbarContainer),
|
|
2804
|
+
onScroll: k
|
|
2805
|
+
}, [K(e.$slots, "default")], 34), L("div", {
|
|
2756
2806
|
ref_key: "trackRef",
|
|
2757
2807
|
ref: o,
|
|
2758
|
-
class:
|
|
2759
|
-
onPointerdown:
|
|
2760
|
-
}, [
|
|
2808
|
+
class: B([e.$style.track, { [e.$style.trackVisible]: y.value }]),
|
|
2809
|
+
onPointerdown: A
|
|
2810
|
+
}, [L("div", {
|
|
2761
2811
|
ref_key: "thumbRef",
|
|
2762
2812
|
ref: s,
|
|
2763
|
-
class:
|
|
2764
|
-
style:
|
|
2813
|
+
class: B([e.$style.thumb, { [e.$style.active]: d.value }]),
|
|
2814
|
+
style: V({
|
|
2765
2815
|
height: `${x.value}px`,
|
|
2766
2816
|
transform: `translateY(${S.value}px)`
|
|
2767
2817
|
}),
|
|
2768
|
-
onPointerdown:
|
|
2818
|
+
onPointerdown: ne
|
|
2769
2819
|
}, null, 38)], 34)], 38));
|
|
2770
2820
|
}
|
|
2771
2821
|
}), [["__cssModules", { $style: {
|
|
2772
|
-
ui3nScrollbarVertical: "
|
|
2773
|
-
scrollbarContainer: "
|
|
2774
|
-
track: "
|
|
2775
|
-
trackVisible: "
|
|
2776
|
-
thumb: "
|
|
2777
|
-
active: "
|
|
2778
|
-
} }]]),
|
|
2822
|
+
ui3nScrollbarVertical: "_ui3nScrollbarVertical_m0o0t_1",
|
|
2823
|
+
scrollbarContainer: "_scrollbarContainer_m0o0t_9",
|
|
2824
|
+
track: "_track_m0o0t_23",
|
|
2825
|
+
trackVisible: "_trackVisible_m0o0t_38",
|
|
2826
|
+
thumb: "_thumb_m0o0t_44",
|
|
2827
|
+
active: "_active_m0o0t_57"
|
|
2828
|
+
} }]]), si = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
2779
2829
|
__name: "ui3n-virtual-scroll",
|
|
2780
2830
|
props: {
|
|
2781
2831
|
items: {},
|
|
@@ -2783,16 +2833,15 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2783
2833
|
renderAhead: { default: 20 }
|
|
2784
2834
|
},
|
|
2785
2835
|
setup(e) {
|
|
2786
|
-
|
|
2787
|
-
let t = e, n = W(0), r = W(null), i = W(null), a = ve([]), o = W(0), s = !1, c = null, l = null, u = /* @__PURE__ */ new Map(), d = M(() => {
|
|
2836
|
+
let t = e, n = W(0), r = W(null), i = W(null), a = ve([]), o = W(0), s = !1, c = null, l = null, u = /* @__PURE__ */ new Map(), d = N(() => {
|
|
2788
2837
|
if (o.value, !a.value.length) return 0;
|
|
2789
2838
|
let e = a.value[a.value.length - 1];
|
|
2790
2839
|
return e.top + e.height;
|
|
2791
|
-
}), f =
|
|
2840
|
+
}), f = N(() => {
|
|
2792
2841
|
if (r.value !== null) return r.value;
|
|
2793
2842
|
let e = i.value?.getContainer();
|
|
2794
2843
|
return e ? e.clientHeight : 0;
|
|
2795
|
-
}), p =
|
|
2844
|
+
}), p = N(() => {
|
|
2796
2845
|
o.value;
|
|
2797
2846
|
let e = n.value;
|
|
2798
2847
|
if (!a.value.length) return 0;
|
|
@@ -2805,10 +2854,10 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2805
2854
|
} else n.top > e ? i = t - 1 : r = t + 1;
|
|
2806
2855
|
}
|
|
2807
2856
|
return s === -1 && (s = Math.max(0, i)), Math.max(0, s - t.renderAhead);
|
|
2808
|
-
}), m =
|
|
2857
|
+
}), m = N(() => {
|
|
2809
2858
|
let e = f.value;
|
|
2810
2859
|
return e ? Math.ceil(e / t.minChildHeight) + 2 * t.renderAhead : t.renderAhead * 2;
|
|
2811
|
-
}), h =
|
|
2860
|
+
}), h = N(() => (o.value, a.value.length && a.value[p.value]?.top || 0)), g = N(() => {
|
|
2812
2861
|
let e = p.value, n = m.value;
|
|
2813
2862
|
return e + n >= t.items.length - t.renderAhead ? t.items.slice(e) : t.items.slice(e, e + n);
|
|
2814
2863
|
});
|
|
@@ -2859,38 +2908,41 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2859
2908
|
}
|
|
2860
2909
|
});
|
|
2861
2910
|
});
|
|
2862
|
-
}),
|
|
2911
|
+
}), me(() => {
|
|
2863
2912
|
c?.disconnect(), l?.disconnect();
|
|
2864
|
-
}), Y(() => t.items, y, { immediate: !0 }), (e,
|
|
2913
|
+
}), Y(() => t.items, y, { immediate: !0 }), (e, n) => (U(), P(oi, {
|
|
2865
2914
|
ref_key: "scrollbarComponentRef",
|
|
2866
2915
|
ref: i,
|
|
2867
|
-
class:
|
|
2916
|
+
class: B(e.$style.ui3nVirtualScroll),
|
|
2868
2917
|
"auto-update": !1,
|
|
2869
2918
|
onScroll: _
|
|
2870
2919
|
}, {
|
|
2871
|
-
default: X(() => [
|
|
2872
|
-
class:
|
|
2873
|
-
style:
|
|
2874
|
-
}, [
|
|
2875
|
-
class:
|
|
2876
|
-
style:
|
|
2877
|
-
}, [(U(!0),
|
|
2878
|
-
key:
|
|
2920
|
+
default: X(() => [L("div", {
|
|
2921
|
+
class: B(e.$style.viewport),
|
|
2922
|
+
style: V({ height: `${d.value}px` })
|
|
2923
|
+
}, [L("div", {
|
|
2924
|
+
class: B(e.$style.content),
|
|
2925
|
+
style: V({ transform: `translateY(${h.value}px)` })
|
|
2926
|
+
}, [(U(!0), I(M, null, G(g.value, (n, r) => (U(), I("div", de({
|
|
2927
|
+
key: n.id ?? `v-node-${p.value + r}`,
|
|
2879
2928
|
ref_for: !0,
|
|
2880
|
-
ref: (e) => v(e,
|
|
2881
|
-
}, { ref_for: !0 }, { "data-sid":
|
|
2882
|
-
|
|
2883
|
-
|
|
2929
|
+
ref: (e) => v(e, n.id ?? p.value + r)
|
|
2930
|
+
}, { ref_for: !0 }, { "data-sid": n.id ?? p.value + r }, {
|
|
2931
|
+
class: e.$style.item,
|
|
2932
|
+
style: { minHeight: `${t.minChildHeight}px` }
|
|
2933
|
+
}), [K(e.$slots, "item", {
|
|
2934
|
+
value: n,
|
|
2935
|
+
index: p.value + r
|
|
2884
2936
|
})], 16))), 128))], 6)], 6)]),
|
|
2885
2937
|
_: 3
|
|
2886
2938
|
}, 8, ["class"]));
|
|
2887
2939
|
}
|
|
2888
2940
|
}), [["__cssModules", { $style: {
|
|
2889
|
-
ui3nVirtualScroll: "
|
|
2890
|
-
viewport: "
|
|
2891
|
-
content: "
|
|
2892
|
-
item: "
|
|
2893
|
-
} }]]),
|
|
2941
|
+
ui3nVirtualScroll: "_ui3nVirtualScroll_1mjyl_1",
|
|
2942
|
+
viewport: "_viewport_1mjyl_5",
|
|
2943
|
+
content: "_content_1mjyl_14",
|
|
2944
|
+
item: "_item_1mjyl_18"
|
|
2945
|
+
} }]]), ci = ["id"], li = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
2894
2946
|
__name: "ui3n-tabs",
|
|
2895
2947
|
props: {
|
|
2896
2948
|
id: {},
|
|
@@ -2904,9 +2956,7 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2904
2956
|
},
|
|
2905
2957
|
emits: ["update:modelValue"],
|
|
2906
2958
|
setup(e, { emit: t }) {
|
|
2907
|
-
let n = e, r = t, i = be(), a = W(null), o = W(n.modelValue)
|
|
2908
|
-
W(null);
|
|
2909
|
-
let s = M(() => ({
|
|
2959
|
+
let n = e, r = t, i = be(), a = W(null), o = W(n.modelValue), s = N(() => ({
|
|
2910
2960
|
"--ui3n-tabs-active-color": n.activeColor,
|
|
2911
2961
|
"--ui3n-tabs-inactive-color": n.inactiveColor,
|
|
2912
2962
|
"--ui3n-tabs-indicator-color": n.indicatorColor,
|
|
@@ -2931,26 +2981,26 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2931
2981
|
}
|
|
2932
2982
|
}
|
|
2933
2983
|
return Y(() => n.modelValue, (e) => {
|
|
2934
|
-
e !== o.value && (o.value = e,
|
|
2984
|
+
e !== o.value && (o.value = e, fe(() => {
|
|
2935
2985
|
c();
|
|
2936
2986
|
}));
|
|
2937
2987
|
}, { immediate: !0 }), H(() => {
|
|
2938
2988
|
c();
|
|
2939
|
-
}), (t, n) => (U(),
|
|
2989
|
+
}), (t, n) => (U(), I("div", {
|
|
2940
2990
|
ref_key: "tabs",
|
|
2941
2991
|
ref: a,
|
|
2942
2992
|
id: e.id,
|
|
2943
|
-
style:
|
|
2944
|
-
class:
|
|
2993
|
+
style: V(s.value),
|
|
2994
|
+
class: B([J(i).ui3nTabs, e.itemDirection === "vertical" && J(i).vertical]),
|
|
2945
2995
|
onClick: l
|
|
2946
|
-
}, [K(t.$slots, "default")], 14,
|
|
2996
|
+
}, [K(t.$slots, "default")], 14, ci));
|
|
2947
2997
|
}
|
|
2948
2998
|
}), [["__cssModules", { $style: {
|
|
2949
2999
|
ui3nTabs: "_ui3nTabs_1yilq_3",
|
|
2950
3000
|
item: "_item_1yilq_13",
|
|
2951
3001
|
active: "_active_1yilq_52",
|
|
2952
3002
|
vertical: "_vertical_1yilq_60"
|
|
2953
|
-
} }]]),
|
|
3003
|
+
} }]]), ui = ["id"], di = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
2954
3004
|
__name: "ui3n-badge-simple",
|
|
2955
3005
|
props: {
|
|
2956
3006
|
id: {},
|
|
@@ -2970,7 +3020,7 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2970
3020
|
}));
|
|
2971
3021
|
let n = e, r = t, i = W(null);
|
|
2972
3022
|
function a() {
|
|
2973
|
-
|
|
3023
|
+
fe(() => {
|
|
2974
3024
|
i.value && r("change:size", {
|
|
2975
3025
|
width: i.value.offsetWidth,
|
|
2976
3026
|
height: i.value.offsetHeight
|
|
@@ -2979,21 +3029,21 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
2979
3029
|
}
|
|
2980
3030
|
return Y(() => [n.value, n.dot], () => a()), H(() => {
|
|
2981
3031
|
a();
|
|
2982
|
-
}), (t, n) => (U(),
|
|
3032
|
+
}), (t, n) => (U(), I("div", {
|
|
2983
3033
|
ref_key: "element",
|
|
2984
3034
|
ref: i,
|
|
2985
3035
|
id: e.id,
|
|
2986
|
-
class:
|
|
2987
|
-
}, [e.dot ?
|
|
3036
|
+
class: B([t.$style.ui3nBadgeSimple, e.dot && t.$style.ui3nBadgeDot])
|
|
3037
|
+
}, [e.dot ? F("", !0) : (U(), I("span", {
|
|
2988
3038
|
key: 0,
|
|
2989
|
-
class:
|
|
2990
|
-
}, q(e.value), 3))], 10,
|
|
3039
|
+
class: B(t.$style.ui3nBadgeText)
|
|
3040
|
+
}, q(e.value), 3))], 10, ui));
|
|
2991
3041
|
}
|
|
2992
3042
|
}), [["__cssModules", { $style: {
|
|
2993
3043
|
ui3nBadgeSimple: "_ui3nBadgeSimple_1vu4n_1",
|
|
2994
3044
|
ui3nBadgeDot: "_ui3nBadgeDot_1vu4n_12",
|
|
2995
3045
|
ui3nBadgeText: "_ui3nBadgeText_1vu4n_30"
|
|
2996
|
-
} }]]),
|
|
3046
|
+
} }]]), fi = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
2997
3047
|
__name: "ui3n-badge",
|
|
2998
3048
|
props: {
|
|
2999
3049
|
id: {},
|
|
@@ -3007,26 +3057,26 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3007
3057
|
position: { default: "right-top" }
|
|
3008
3058
|
},
|
|
3009
3059
|
setup(e) {
|
|
3010
|
-
let t = e, n = Se(), r = W(), i =
|
|
3060
|
+
let t = e, n = Se(), r = W(), i = N(() => !!n.default), a = N(() => {
|
|
3011
3061
|
let [e, n] = t.position.split("-");
|
|
3012
3062
|
return {
|
|
3013
|
-
...e === "right" && { right: `-${(0,
|
|
3014
|
-
...e === "left" && { left: `-${(0,
|
|
3015
|
-
...n === "top" && { top: `-${(0,
|
|
3016
|
-
...n === "bottom" && { bottom: `-${(0,
|
|
3063
|
+
...e === "right" && { right: `-${(0, Ur.default)(r.value, "width", 0) / 2}px` },
|
|
3064
|
+
...e === "left" && { left: `-${(0, Ur.default)(r.value, "width", 0) / 2}px` },
|
|
3065
|
+
...n === "top" && { top: `-${(0, Ur.default)(r.value, "height", 0) / 2}px` },
|
|
3066
|
+
...n === "bottom" && { bottom: `-${(0, Ur.default)(r.value, "height", 0) / 2}px` }
|
|
3017
3067
|
};
|
|
3018
3068
|
});
|
|
3019
|
-
return (t, n) => i.value ? (U(),
|
|
3069
|
+
return (t, n) => i.value ? (U(), I("div", {
|
|
3020
3070
|
key: 0,
|
|
3021
|
-
class:
|
|
3022
|
-
}, [
|
|
3071
|
+
class: B(t.$style.ui3nBadge)
|
|
3072
|
+
}, [L("div", { class: B(t.$style.ui3nBadgeWrapper) }, [K(t.$slots, "default"), R(di, {
|
|
3023
3073
|
id: e.id,
|
|
3024
3074
|
dot: e.dot,
|
|
3025
3075
|
value: e.value,
|
|
3026
3076
|
color: e.color,
|
|
3027
3077
|
"text-color": e.textColor,
|
|
3028
|
-
style:
|
|
3029
|
-
class:
|
|
3078
|
+
style: V(a.value),
|
|
3079
|
+
class: B(t.$style.ui3nBadgeContent),
|
|
3030
3080
|
"onChange:size": n[0] ||= (e) => r.value = e
|
|
3031
3081
|
}, null, 8, [
|
|
3032
3082
|
"id",
|
|
@@ -3036,7 +3086,7 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3036
3086
|
"text-color",
|
|
3037
3087
|
"style",
|
|
3038
3088
|
"class"
|
|
3039
|
-
])], 2)], 2)) : (U(),
|
|
3089
|
+
])], 2)], 2)) : (U(), P(di, {
|
|
3040
3090
|
key: 1,
|
|
3041
3091
|
id: e.id,
|
|
3042
3092
|
dot: e.dot,
|
|
@@ -3055,7 +3105,7 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3055
3105
|
ui3nBadge: "_ui3nBadge_1slsk_1",
|
|
3056
3106
|
ui3nBadgeWrapper: "_ui3nBadgeWrapper_1slsk_6",
|
|
3057
3107
|
ui3nBadgeContent: "_ui3nBadgeContent_1slsk_12"
|
|
3058
|
-
} }]]),
|
|
3108
|
+
} }]]), pi = { key: 2 }, mi = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
3059
3109
|
__name: "ui3n-breadcrumb",
|
|
3060
3110
|
props: {
|
|
3061
3111
|
separator: { default: void 0 },
|
|
@@ -3070,25 +3120,22 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3070
3120
|
},
|
|
3071
3121
|
emits: ["click"],
|
|
3072
3122
|
setup(e, { emit: t }) {
|
|
3073
|
-
let n = e, r = t, i =
|
|
3074
|
-
let e = [
|
|
3075
|
-
return n.isActive && e.push(
|
|
3123
|
+
let n = e, r = t, i = Se(), a = be(), o = ue("ui3n-breadcrumbs-context", null), s = N(() => n.separator ? n.separator : o ? o.separator() : "/"), c = N(() => o ? o.disabled() : !1), l = N(() => {
|
|
3124
|
+
let e = [a.ui3nBreadcrumb];
|
|
3125
|
+
return n.isActive && e.push(a.ui3nBreadcrumbActive), (n.disabled || c.value) && e.push(a.ui3nBreadcrumbDisabled), e;
|
|
3076
3126
|
});
|
|
3077
|
-
function
|
|
3127
|
+
function u(e) {
|
|
3078
3128
|
r("click", e);
|
|
3079
3129
|
}
|
|
3080
|
-
return (t, n) => (U(),
|
|
3081
|
-
key: 0,
|
|
3082
|
-
class: z(t.$style.ui3nBreadcrumbSeparator)
|
|
3083
|
-
}, [K(t.$slots, "separator", {}, () => [I("span", null, q(a.value), 1)])], 2)) : P("", !0)], 16));
|
|
3130
|
+
return (t, n) => (U(), I("div", de({ class: l.value }, ye(e.isActive && !(e.disabled || c.value) ? { click: u } : {}, !0)), [L("span", { class: B(t.$style.content) }, [K(t.$slots, "default")], 2), L("div", { class: B(t.$style.ui3nBreadcrumbSeparator) }, [typeof J(i).separator == "function" ? K(t.$slots, "separator", { key: 0 }) : J(o)?.customSeparatorSlot ? (U(), P(_e(J(o).customSeparatorSlot), { key: 1 })) : (U(), I("span", pi, q(s.value), 1))], 2)], 16));
|
|
3084
3131
|
}
|
|
3085
3132
|
}), [["__cssModules", { $style: {
|
|
3086
|
-
ui3nBreadcrumb: "
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
ui3nBreadcrumbDisabled: "
|
|
3091
|
-
} }]]),
|
|
3133
|
+
ui3nBreadcrumb: "_ui3nBreadcrumb_1tz9w_1",
|
|
3134
|
+
ui3nBreadcrumbSeparator: "_ui3nBreadcrumbSeparator_1tz9w_10",
|
|
3135
|
+
content: "_content_1tz9w_14",
|
|
3136
|
+
ui3nBreadcrumbActive: "_ui3nBreadcrumbActive_1tz9w_28",
|
|
3137
|
+
ui3nBreadcrumbDisabled: "_ui3nBreadcrumbDisabled_1tz9w_33"
|
|
3138
|
+
} }]]), hi = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
3092
3139
|
__name: "ui3n-breadcrumbs",
|
|
3093
3140
|
props: {
|
|
3094
3141
|
separator: { default: "/" },
|
|
@@ -3098,14 +3145,19 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3098
3145
|
}
|
|
3099
3146
|
},
|
|
3100
3147
|
setup(e) {
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3148
|
+
let t = e;
|
|
3149
|
+
return ge("ui3n-breadcrumbs-context", {
|
|
3150
|
+
separator: () => t.separator,
|
|
3151
|
+
disabled: () => t.disabled,
|
|
3152
|
+
customSeparatorSlot: Se().separator
|
|
3153
|
+
}), (e, t) => (U(), I("div", { class: B(e.$style.ui3nBreadcrumbs) }, [K(e.$slots, "default")], 2));
|
|
3154
|
+
}
|
|
3155
|
+
}), [["__cssModules", { $style: { ui3nBreadcrumbs: "_ui3nBreadcrumbs_1oq6f_1" } }]]), gi = ["id", "tabindex"], _i = [
|
|
3104
3156
|
"name",
|
|
3105
3157
|
"checked",
|
|
3106
3158
|
"disabled",
|
|
3107
3159
|
"value"
|
|
3108
|
-
],
|
|
3160
|
+
], vi = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
3109
3161
|
__name: "ui3n-switch",
|
|
3110
3162
|
props: {
|
|
3111
3163
|
id: {},
|
|
@@ -3120,74 +3172,71 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3120
3172
|
},
|
|
3121
3173
|
emits: ["change", "update:modelValue"],
|
|
3122
3174
|
setup(e, { expose: t, emit: n }) {
|
|
3123
|
-
let r = e, i = n, a = Se(), o = W(
|
|
3175
|
+
let r = e, i = n, a = Se(), o = W(!1), s = N(() => ({
|
|
3124
3176
|
"--ui3n-switch-color": r.color,
|
|
3125
3177
|
"--ui3n-switch-size": `${r.size}px`
|
|
3126
3178
|
}));
|
|
3127
|
-
function
|
|
3128
|
-
e.preventDefault(),
|
|
3179
|
+
function c(e) {
|
|
3180
|
+
e.preventDefault(), !r.disabled && (o.value = !o.value, i("change", o.value), i("update:modelValue", o.value));
|
|
3129
3181
|
}
|
|
3130
|
-
function
|
|
3131
|
-
|
|
3182
|
+
function l() {
|
|
3183
|
+
o.value = !1, i("change", !1), i("update:modelValue", !1);
|
|
3132
3184
|
}
|
|
3133
|
-
return t({ clear:
|
|
3134
|
-
e ||
|
|
3135
|
-
}), Y(() => r.modelValue, (e) =>
|
|
3136
|
-
ref_key: "switchEl",
|
|
3137
|
-
ref: o,
|
|
3185
|
+
return t({ clear: l }), Y(() => r.name, (e) => {
|
|
3186
|
+
e || l();
|
|
3187
|
+
}), Y(() => r.modelValue, (e) => o.value = e, { immediate: !0 }), (t, n) => (U(), I("div", {
|
|
3138
3188
|
id: e.id,
|
|
3139
|
-
style:
|
|
3140
|
-
|
|
3189
|
+
style: V(s.value),
|
|
3190
|
+
tabindex: e.disabled ? -1 : 0,
|
|
3191
|
+
class: B([
|
|
3141
3192
|
t.$style.ui3nSwitch,
|
|
3142
|
-
|
|
3193
|
+
o.value && t.$style.checked,
|
|
3143
3194
|
!J(a).default && t.$style.noLabel,
|
|
3144
3195
|
e.disabled && t.$style.disabled
|
|
3145
|
-
])
|
|
3196
|
+
]),
|
|
3197
|
+
onKeydown: [Z(c, ["enter"]), Z(c, ["space"])],
|
|
3198
|
+
onClick: c
|
|
3146
3199
|
}, [
|
|
3147
|
-
e.name ? (U(),
|
|
3200
|
+
e.name ? (U(), I("input", {
|
|
3148
3201
|
key: 0,
|
|
3149
3202
|
type: "checkbox",
|
|
3150
3203
|
hidden: "",
|
|
3151
3204
|
name: e.name,
|
|
3152
|
-
checked:
|
|
3205
|
+
checked: o.value,
|
|
3153
3206
|
disabled: e.disabled,
|
|
3154
|
-
value:
|
|
3155
|
-
}, null, 8,
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
onKeydown: [Z(l, ["enter"]), Z(l, ["space"])],
|
|
3160
|
-
onClick: l
|
|
3161
|
-
}, [I("div", { class: z([t.$style.dot, s.value ? t.$style.right : t.$style.left]) }, null, 2)], 42, mi),
|
|
3162
|
-
I("div", { class: z(t.$style.label) }, [K(t.$slots, "default")], 2)
|
|
3163
|
-
], 14, fi));
|
|
3207
|
+
value: o.value ? "on" : ""
|
|
3208
|
+
}, null, 8, _i)) : F("", !0),
|
|
3209
|
+
L("div", { class: B(t.$style.body) }, [L("div", { class: B([t.$style.dot, o.value ? t.$style.right : t.$style.left]) }, null, 2)], 2),
|
|
3210
|
+
L("div", { class: B(t.$style.label) }, [K(t.$slots, "default")], 2)
|
|
3211
|
+
], 46, gi));
|
|
3164
3212
|
}
|
|
3165
3213
|
}), [["__cssModules", { $style: {
|
|
3166
|
-
ui3nSwitch: "
|
|
3167
|
-
body: "
|
|
3168
|
-
checked: "
|
|
3169
|
-
dot: "
|
|
3170
|
-
noLabel: "
|
|
3171
|
-
left: "
|
|
3172
|
-
right: "
|
|
3173
|
-
label: "
|
|
3174
|
-
disabled: "
|
|
3175
|
-
} }]]),
|
|
3214
|
+
ui3nSwitch: "_ui3nSwitch_1lo7b_1",
|
|
3215
|
+
body: "_body_1lo7b_21",
|
|
3216
|
+
checked: "_checked_1lo7b_30",
|
|
3217
|
+
dot: "_dot_1lo7b_33",
|
|
3218
|
+
noLabel: "_noLabel_1lo7b_37",
|
|
3219
|
+
left: "_left_1lo7b_53",
|
|
3220
|
+
right: "_right_1lo7b_57",
|
|
3221
|
+
label: "_label_1lo7b_61",
|
|
3222
|
+
disabled: "_disabled_1lo7b_68"
|
|
3223
|
+
} }]]), yi = ["id"], bi = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
3176
3224
|
__name: "ui3n-step-line-bar",
|
|
3177
3225
|
props: {
|
|
3178
3226
|
id: {},
|
|
3179
3227
|
label: {},
|
|
3180
3228
|
current: { default: 1 },
|
|
3181
|
-
steps: {}
|
|
3229
|
+
steps: { default: 1 }
|
|
3182
3230
|
},
|
|
3183
3231
|
setup(e) {
|
|
3184
|
-
|
|
3232
|
+
let t = e, n = N(() => Math.max(0, Math.floor(t.steps)));
|
|
3233
|
+
return (t, r) => (U(), I("div", {
|
|
3185
3234
|
id: e.id,
|
|
3186
|
-
class:
|
|
3187
|
-
}, [
|
|
3235
|
+
class: B(t.$style.ui3nStepLineBar)
|
|
3236
|
+
}, [L("div", { class: B(t.$style.label) }, q(e.label), 3), L("div", { class: B(t.$style.body) }, [(U(!0), I(M, null, G(n.value, (n) => (U(), I("div", {
|
|
3188
3237
|
key: n,
|
|
3189
|
-
class:
|
|
3190
|
-
}, null, 2))), 128))], 2)], 10,
|
|
3238
|
+
class: B([t.$style.step, n <= e.current && t.$style.active])
|
|
3239
|
+
}, null, 2))), 128))], 2)], 10, yi));
|
|
3191
3240
|
}
|
|
3192
3241
|
}), [["__cssModules", { $style: {
|
|
3193
3242
|
ui3nStepLineBar: "_ui3nStepLineBar_119zg_1",
|
|
@@ -3195,140 +3244,122 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3195
3244
|
body: "_body_119zg_17",
|
|
3196
3245
|
step: "_step_119zg_25",
|
|
3197
3246
|
active: "_active_119zg_33"
|
|
3198
|
-
} }]]),
|
|
3247
|
+
} }]]), xi = 12, Si = 5, Ci = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
3199
3248
|
__name: "ui3n-progress-linear",
|
|
3200
3249
|
props: {
|
|
3201
3250
|
value: { default: 0 },
|
|
3202
3251
|
height: { default: 2 },
|
|
3203
|
-
withText: {
|
|
3252
|
+
withText: {
|
|
3253
|
+
type: Boolean,
|
|
3254
|
+
default: !1
|
|
3255
|
+
},
|
|
3204
3256
|
bgColor: { default: "var(--color-bg-control-primary-default)" },
|
|
3205
3257
|
color: { default: "var(--color-bg-control-accent-default)" },
|
|
3206
|
-
indeterminate: {
|
|
3258
|
+
indeterminate: {
|
|
3259
|
+
type: Boolean,
|
|
3260
|
+
default: !1
|
|
3261
|
+
}
|
|
3207
3262
|
},
|
|
3208
3263
|
setup(e) {
|
|
3209
|
-
let t = e, n =
|
|
3264
|
+
let t = e, n = (e) => {
|
|
3265
|
+
let t = parseFloat(String(e));
|
|
3266
|
+
return isNaN(t) ? 0 : t;
|
|
3267
|
+
}, r = N(() => n(t.height)), i = N(() => {
|
|
3268
|
+
let e = n(t.value);
|
|
3269
|
+
return Math.min(Math.max(e, 0), 100);
|
|
3270
|
+
}), a = N(() => t.withText && !t.indeterminate), o = N(() => `${i.value}%`), s = N(() => ({
|
|
3210
3271
|
"--ui3n-progress-linear-height": `${r.value}px`,
|
|
3211
3272
|
"--ui3n-progress-linear-bg": t.bgColor,
|
|
3212
3273
|
"--ui3n-progress-linear-color": t.color,
|
|
3213
3274
|
"--ui3n-progress-linear-font-size": `${Math.max(r.value - 2, 10)}px`
|
|
3214
3275
|
}));
|
|
3215
|
-
return (t,
|
|
3216
|
-
style:
|
|
3217
|
-
class:
|
|
3218
|
-
}, [
|
|
3276
|
+
return (t, n) => (U(), I("div", {
|
|
3277
|
+
style: V(s.value),
|
|
3278
|
+
class: B([t.$style.ui3nProgressLinear, e.indeterminate && t.$style.indeterminate])
|
|
3279
|
+
}, [a.value && r.value < xi ? (U(), I("div", {
|
|
3219
3280
|
key: 0,
|
|
3220
|
-
class:
|
|
3221
|
-
}, q(
|
|
3222
|
-
class:
|
|
3223
|
-
style:
|
|
3224
|
-
}, [
|
|
3281
|
+
class: B([t.$style.text, t.$style.above])
|
|
3282
|
+
}, q(o.value), 3)) : F("", !0), L("div", { class: B(t.$style.body) }, [L("div", {
|
|
3283
|
+
class: B(t.$style.value),
|
|
3284
|
+
style: V(e.indeterminate ? void 0 : { width: o.value })
|
|
3285
|
+
}, [a.value && r.value >= xi && i.value >= Si ? (U(), I("div", {
|
|
3225
3286
|
key: 0,
|
|
3226
|
-
class:
|
|
3227
|
-
}, q(
|
|
3287
|
+
class: B(t.$style.text)
|
|
3288
|
+
}, q(o.value), 3)) : F("", !0)], 6)], 2)], 6));
|
|
3228
3289
|
}
|
|
3229
3290
|
}), [["__cssModules", { $style: {
|
|
3230
|
-
ui3nProgressLinear: "
|
|
3231
|
-
body: "
|
|
3232
|
-
value: "
|
|
3233
|
-
text: "
|
|
3234
|
-
above: "
|
|
3235
|
-
indeterminate: "
|
|
3236
|
-
|
|
3237
|
-
} }]]),
|
|
3291
|
+
ui3nProgressLinear: "_ui3nProgressLinear_1avv2_1",
|
|
3292
|
+
body: "_body_1avv2_7",
|
|
3293
|
+
value: "_value_1avv2_16",
|
|
3294
|
+
text: "_text_1avv2_29",
|
|
3295
|
+
above: "_above_1avv2_37",
|
|
3296
|
+
indeterminate: "_indeterminate_1avv2_47",
|
|
3297
|
+
"linear-fly": "_linear-fly_1avv2_1"
|
|
3298
|
+
} }]]), wi = ["height", "width"], Ti = ["r"], Ei = ["r", "stroke-dasharray"], Di = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
3238
3299
|
__name: "ui3n-progress-circular",
|
|
3239
3300
|
props: {
|
|
3240
3301
|
value: { default: 0 },
|
|
3241
3302
|
size: { default: 64 },
|
|
3242
3303
|
width: {},
|
|
3243
|
-
withText: {
|
|
3304
|
+
withText: {
|
|
3305
|
+
type: Boolean,
|
|
3306
|
+
default: !1
|
|
3307
|
+
},
|
|
3244
3308
|
bgColor: { default: "var(--color-bg-control-primary-default)" },
|
|
3245
3309
|
color: { default: "var(--color-bg-control-accent-default)" },
|
|
3246
|
-
indeterminate: {
|
|
3310
|
+
indeterminate: {
|
|
3311
|
+
type: Boolean,
|
|
3312
|
+
default: !1
|
|
3313
|
+
}
|
|
3247
3314
|
},
|
|
3248
3315
|
setup(e) {
|
|
3249
|
-
let t =
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
"
|
|
3274
|
-
"
|
|
3275
|
-
}
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
f.value = setInterval(() => {
|
|
3283
|
-
p.value = t[n % e], n += 1, n % e === 1 && (m.value = !m.value);
|
|
3284
|
-
}, 200);
|
|
3285
|
-
}
|
|
3286
|
-
function v() {
|
|
3287
|
-
f.value &&= (clearInterval(f.value), null);
|
|
3288
|
-
}
|
|
3289
|
-
return Y(() => n.indeterminate, (e) => {
|
|
3290
|
-
e ? _() : (v(), m.value = !1, p.value = 0);
|
|
3291
|
-
}, { immediate: !0 }), V(() => {
|
|
3292
|
-
v();
|
|
3293
|
-
}), (t, n) => (U(), F("div", {
|
|
3294
|
-
ref_key: "element",
|
|
3295
|
-
ref: i,
|
|
3296
|
-
style: B(h.value),
|
|
3297
|
-
class: z([
|
|
3298
|
-
J(r).ui3nProgressCircular,
|
|
3299
|
-
e.indeterminate && J(r).indeterminate,
|
|
3300
|
-
m.value && J(r).inverse
|
|
3301
|
-
])
|
|
3302
|
-
}, [(U(), F("svg", {
|
|
3303
|
-
height: o.value,
|
|
3304
|
-
width: o.value,
|
|
3305
|
-
class: z(J(r).pie)
|
|
3306
|
-
}, [I("circle", {
|
|
3307
|
-
class: z(J(r).background),
|
|
3308
|
-
r: u.value,
|
|
3309
|
-
cx: "50%",
|
|
3310
|
-
cy: "50%"
|
|
3311
|
-
}, null, 10, Ci), I("circle", {
|
|
3312
|
-
class: z(J(r).chart),
|
|
3313
|
-
r: u.value,
|
|
3314
|
-
cx: "50%",
|
|
3315
|
-
cy: "50%",
|
|
3316
|
-
"stroke-dasharray": g.value
|
|
3317
|
-
}, null, 10, wi)], 10, Si)), a.value ? (U(), F("div", {
|
|
3316
|
+
let t = e, n = (e) => {
|
|
3317
|
+
let t = parseFloat(String(e));
|
|
3318
|
+
return isNaN(t) ? 0 : t;
|
|
3319
|
+
}, r = N(() => n(t.size) || 64), i = N(() => Math.min(Math.max(n(t.value), 0), 100)), a = N(() => t.withText && !t.indeterminate), o = N(() => t.width ? n(t.width) / r.value * 100 : 8), s = N(() => (100 - o.value) / 2), c = N(() => Math.round(Math.PI * 2 * s.value)), l = N(() => {
|
|
3320
|
+
let e = Math.round(c.value * i.value / 100);
|
|
3321
|
+
return `${e} ${c.value - e}`;
|
|
3322
|
+
}), u = N(() => `${Math.floor(r.value / 3.8)}px`), d = N(() => ({
|
|
3323
|
+
"--ui3n-progress-circular-size": `${r.value}px`,
|
|
3324
|
+
"--ui3n-progress-circular-font-size": u.value,
|
|
3325
|
+
"--ui3n-progress-circular-bg": t.bgColor,
|
|
3326
|
+
"--ui3n-progress-circular-color": t.color,
|
|
3327
|
+
"--ui3n-progress-virtual-width": String(o.value)
|
|
3328
|
+
}));
|
|
3329
|
+
return (t, n) => (U(), I("div", {
|
|
3330
|
+
style: V(d.value),
|
|
3331
|
+
class: B([t.$style.ui3nProgressCircular, e.indeterminate && t.$style.indeterminate])
|
|
3332
|
+
}, [(U(), I("svg", {
|
|
3333
|
+
height: r.value,
|
|
3334
|
+
width: r.value,
|
|
3335
|
+
viewBox: "0 0 100 100",
|
|
3336
|
+
class: B(t.$style.pie)
|
|
3337
|
+
}, [L("circle", {
|
|
3338
|
+
class: B(t.$style.background),
|
|
3339
|
+
r: s.value,
|
|
3340
|
+
cx: "50",
|
|
3341
|
+
cy: "50"
|
|
3342
|
+
}, null, 10, Ti), L("circle", {
|
|
3343
|
+
class: B(t.$style.chart),
|
|
3344
|
+
r: s.value,
|
|
3345
|
+
cx: "50",
|
|
3346
|
+
cy: "50",
|
|
3347
|
+
"stroke-dasharray": e.indeterminate ? void 0 : l.value
|
|
3348
|
+
}, null, 10, Ei)], 10, wi)), a.value ? (U(), I("div", {
|
|
3318
3349
|
key: 0,
|
|
3319
|
-
class:
|
|
3320
|
-
}, q(
|
|
3350
|
+
class: B(t.$style.text)
|
|
3351
|
+
}, q(i.value) + "% ", 3)) : F("", !0)], 6));
|
|
3321
3352
|
}
|
|
3322
3353
|
}), [["__cssModules", { $style: {
|
|
3323
|
-
ui3nProgressCircular: "
|
|
3324
|
-
|
|
3325
|
-
background: "
|
|
3326
|
-
chart: "
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
} }]]),
|
|
3354
|
+
ui3nProgressCircular: "_ui3nProgressCircular_zypt9_1",
|
|
3355
|
+
pie: "_pie_zypt9_13",
|
|
3356
|
+
background: "_background_zypt9_19",
|
|
3357
|
+
chart: "_chart_zypt9_26",
|
|
3358
|
+
text: "_text_zypt9_33",
|
|
3359
|
+
indeterminate: "_indeterminate_zypt9_45",
|
|
3360
|
+
"circular-spin": "_circular-spin_zypt9_1",
|
|
3361
|
+
"circular-dash": "_circular-dash_zypt9_1"
|
|
3362
|
+
} }]]), Oi = 5, ki = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
3332
3363
|
__name: "ui3n-tooltip",
|
|
3333
3364
|
props: {
|
|
3334
3365
|
id: {},
|
|
@@ -3342,7 +3373,10 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3342
3373
|
offsetX: { default: 0 },
|
|
3343
3374
|
offsetY: { default: 0 },
|
|
3344
3375
|
trigger: { default: "hover" },
|
|
3345
|
-
disabled: {
|
|
3376
|
+
disabled: {
|
|
3377
|
+
type: Boolean,
|
|
3378
|
+
default: !1
|
|
3379
|
+
}
|
|
3346
3380
|
},
|
|
3347
3381
|
emits: [
|
|
3348
3382
|
"open",
|
|
@@ -3352,80 +3386,91 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3352
3386
|
"update:modelValue"
|
|
3353
3387
|
],
|
|
3354
3388
|
setup(e, { emit: t }) {
|
|
3355
|
-
let n = e, r = t, i = W(!1), a = W(null), o = W(null), s = W(null), c =
|
|
3389
|
+
let n = e, r = t, i = W(!1), a = W(null), o = W(null), s = W(null), c = W(!1), l = N(() => {
|
|
3356
3390
|
let [e] = n.placement.split("-");
|
|
3357
3391
|
return e;
|
|
3358
|
-
}),
|
|
3392
|
+
}), u = N(() => {
|
|
3359
3393
|
let e = {
|
|
3360
3394
|
mainAxis: 0,
|
|
3361
3395
|
crossAxis: 0
|
|
3362
3396
|
};
|
|
3363
|
-
switch (
|
|
3397
|
+
switch (l.value) {
|
|
3364
3398
|
case "top":
|
|
3365
|
-
e.mainAxis = -1 * Number(n.offsetY) +
|
|
3399
|
+
e.mainAxis = -1 * Number(n.offsetY) + Oi, e.crossAxis = Number(n.offsetX);
|
|
3366
3400
|
break;
|
|
3367
3401
|
case "bottom":
|
|
3368
|
-
e.mainAxis = Number(n.offsetY) +
|
|
3402
|
+
e.mainAxis = Number(n.offsetY) + Oi, e.crossAxis = Number(n.offsetX);
|
|
3369
3403
|
break;
|
|
3370
3404
|
case "left":
|
|
3371
|
-
e.mainAxis = -1 * Number(n.offsetX) +
|
|
3405
|
+
e.mainAxis = -1 * Number(n.offsetX) + Oi, e.crossAxis = Number(n.offsetY);
|
|
3372
3406
|
break;
|
|
3373
3407
|
case "right":
|
|
3374
|
-
e.mainAxis = Number(n.offsetX) +
|
|
3408
|
+
e.mainAxis = Number(n.offsetX) + Oi, e.crossAxis = Number(n.offsetY);
|
|
3375
3409
|
break;
|
|
3376
3410
|
}
|
|
3377
3411
|
return e;
|
|
3378
|
-
}),
|
|
3412
|
+
}), d = N(() => [ke(u.value), Ee({
|
|
3379
3413
|
element: s,
|
|
3380
3414
|
padding: 8
|
|
3381
|
-
})]), { floatingStyles:
|
|
3415
|
+
})]), { floatingStyles: f, isPositioned: p, middlewareData: m } = je(a, o, {
|
|
3382
3416
|
open: i,
|
|
3383
3417
|
placement: n.placement,
|
|
3384
3418
|
strategy: n.positionStrategy,
|
|
3385
|
-
middleware:
|
|
3419
|
+
middleware: d,
|
|
3386
3420
|
whileElementsMounted: n.positionStrategy === "fixed" ? De : void 0
|
|
3387
|
-
}),
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3421
|
+
}), h = N(() => {
|
|
3422
|
+
let e = typeof n.maxContentWidth == "number" || !isNaN(Number(n.maxContentWidth)) ? `${n.maxContentWidth}px` : String(n.maxContentWidth);
|
|
3423
|
+
return {
|
|
3424
|
+
...f.value,
|
|
3425
|
+
"--ui3n-tooltip-bg-color": n.color,
|
|
3426
|
+
"--ui3n-tooltip-text-color": n.textColor,
|
|
3427
|
+
"--ui3n-tooltip-max-width": e,
|
|
3428
|
+
"--ui3n-tooltip-arrow-size": `${Oi}px`,
|
|
3429
|
+
"--ui3n-tooltip-base-offset": "-5px"
|
|
3430
|
+
};
|
|
3431
|
+
});
|
|
3432
|
+
function g() {
|
|
3396
3433
|
n.disabled || (i.value = !0, r("open"), r("update:modelValue", !0));
|
|
3397
3434
|
}
|
|
3398
|
-
function
|
|
3435
|
+
function _() {
|
|
3399
3436
|
n.disabled && !i.value || (i.value = !1, r("close"), r("update:modelValue", !1));
|
|
3400
3437
|
}
|
|
3401
|
-
function
|
|
3402
|
-
n.disabled && !i.value || (i.value ?
|
|
3438
|
+
function v() {
|
|
3439
|
+
n.disabled && !i.value || (i.value ? _() : g());
|
|
3440
|
+
}
|
|
3441
|
+
function y() {
|
|
3442
|
+
a.value && (a.value.removeEventListener("mouseenter", g), a.value.removeEventListener("mouseleave", _), a.value.removeEventListener("click", v));
|
|
3443
|
+
}
|
|
3444
|
+
function b() {
|
|
3445
|
+
y(), !(!a.value || n.disabled) && (n.trigger === "hover" ? (a.value.addEventListener("mouseenter", g), a.value.addEventListener("mouseleave", _)) : n.trigger === "click" && a.value.addEventListener("click", v));
|
|
3403
3446
|
}
|
|
3404
3447
|
return H(() => {
|
|
3405
|
-
|
|
3406
|
-
}),
|
|
3407
|
-
|
|
3408
|
-
}), Y(() => n.
|
|
3448
|
+
c.value = !0, b();
|
|
3449
|
+
}), me(() => {
|
|
3450
|
+
y();
|
|
3451
|
+
}), Y([() => n.trigger, () => n.disabled], () => {
|
|
3452
|
+
b();
|
|
3453
|
+
}), Y(() => n.modelValue, (e) => n.trigger === "manual" && (i.value = e), { immediate: !0 }), Y(p, (e) => {
|
|
3409
3454
|
r(e ? "opened" : "closed");
|
|
3410
|
-
}), (t, n) => (U(),
|
|
3455
|
+
}), (t, n) => (U(), I(M, null, [L("div", {
|
|
3411
3456
|
ref_key: "referenceContainer",
|
|
3412
3457
|
ref: a,
|
|
3413
|
-
class:
|
|
3414
|
-
}, [K(t.$slots, "default")], 2), i.value ? (U(),
|
|
3458
|
+
class: B(t.$style.container)
|
|
3459
|
+
}, [K(t.$slots, "default")], 2), i.value ? (U(), I("div", {
|
|
3415
3460
|
key: 0,
|
|
3416
3461
|
ref_key: "floatingEl",
|
|
3417
3462
|
ref: o,
|
|
3418
|
-
class:
|
|
3419
|
-
style:
|
|
3420
|
-
}, [K(t.$slots, "content", {}, () => [
|
|
3463
|
+
class: B(t.$style.floating),
|
|
3464
|
+
style: V(h.value)
|
|
3465
|
+
}, [K(t.$slots, "content", {}, () => [L("div", { class: B(t.$style.content) }, [le(q(e.content) + " ", 1), L("div", {
|
|
3421
3466
|
ref_key: "floatingArrowEl",
|
|
3422
3467
|
ref: s,
|
|
3423
|
-
class:
|
|
3424
|
-
style:
|
|
3425
|
-
left: J(
|
|
3426
|
-
top: J(
|
|
3468
|
+
class: B([t.$style.arrow, t.$style[`arrow-${l.value}`]]),
|
|
3469
|
+
style: V({
|
|
3470
|
+
left: J(m).arrow?.x == null ? "" : `${J(m).arrow?.x}px`,
|
|
3471
|
+
top: J(m).arrow?.y == null ? "" : `${J(m).arrow?.y}px`
|
|
3427
3472
|
})
|
|
3428
|
-
}, null, 6)], 2)])], 6)) :
|
|
3473
|
+
}, null, 6)], 2)])], 6)) : F("", !0)], 64));
|
|
3429
3474
|
}
|
|
3430
3475
|
}), [["__cssModules", { $style: {
|
|
3431
3476
|
container: "_container_1wkac_1",
|
|
@@ -3436,12 +3481,12 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3436
3481
|
"arrow-left": "_arrow-left_1wkac_30",
|
|
3437
3482
|
"arrow-right": "_arrow-right_1wkac_30",
|
|
3438
3483
|
content: "_content_1wkac_44"
|
|
3439
|
-
} }]]),
|
|
3484
|
+
} }]]), Ai = [
|
|
3440
3485
|
"name",
|
|
3441
3486
|
"checked",
|
|
3442
3487
|
"value",
|
|
3443
3488
|
"disabled"
|
|
3444
|
-
],
|
|
3489
|
+
], ji = ["tabindex"], Mi = ["width", "height"], Ni = ["width", "height"], Pi = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
3445
3490
|
__name: "ui3n-radio",
|
|
3446
3491
|
props: {
|
|
3447
3492
|
id: {},
|
|
@@ -3479,70 +3524,68 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3479
3524
|
},
|
|
3480
3525
|
emits: ["change", "update:modelValue"],
|
|
3481
3526
|
setup(e, { expose: t, emit: n }) {
|
|
3482
|
-
let r = e, i = n, a = Se(), o =
|
|
3483
|
-
groupValue: null,
|
|
3484
|
-
updateGroupValue: null
|
|
3485
|
-
}, u = W(s ? c.value : r.modelValue), d = M(() => u.value === r.checkedValue), f = M(() => ({
|
|
3527
|
+
let r = e, i = n, a = Se(), o = ue("ui3n-radio-group-context", null), s = N(() => o !== null), c = N(() => o ? o.groupName.value : r.name || ""), l = W(s.value && o ? o.groupValue.value : r.modelValue), u = N(() => s.value && o ? o.groupValue.value === r.checkedValue : l.value === r.checkedValue), d = N(() => ({
|
|
3486
3528
|
"--ui3n-radio-size": `${r.size}px`,
|
|
3487
3529
|
"--ui3n-radio-color": r.color
|
|
3488
3530
|
}));
|
|
3489
|
-
function
|
|
3490
|
-
if (e.preventDefault(), !
|
|
3491
|
-
|
|
3492
|
-
|
|
3531
|
+
function f(e) {
|
|
3532
|
+
if (e.preventDefault(), !r.disabled) {
|
|
3533
|
+
if (!s.value) {
|
|
3534
|
+
l.value = u.value ? r.uncheckedValue : r.checkedValue, i("change", l.value), i("update:modelValue", l.value);
|
|
3535
|
+
return;
|
|
3536
|
+
}
|
|
3537
|
+
u.value || o && o.updateGroupValue(r.checkedValue);
|
|
3493
3538
|
}
|
|
3494
|
-
d.value || (u.value = r.checkedValue, l(u.value));
|
|
3495
3539
|
}
|
|
3496
|
-
function
|
|
3497
|
-
|
|
3540
|
+
function p() {
|
|
3541
|
+
l.value = r.uncheckedValue, s.value || (i("change", l.value), i("update:modelValue", l.value));
|
|
3498
3542
|
}
|
|
3499
|
-
return t({ clear:
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3543
|
+
return t({ clear: p }), pe(() => {
|
|
3544
|
+
let e = !!a.checkedIcon, t = !!a.uncheckedIcon;
|
|
3545
|
+
if (e && !t || !e && t) throw Error("[Ui3nRadio] Both checkedIcon and uncheckedIcon slots must have values defined.");
|
|
3546
|
+
}), Y(() => r.name, (e) => {
|
|
3547
|
+
!e && !s.value && p();
|
|
3503
3548
|
}), Y(() => r.modelValue, (e) => {
|
|
3504
|
-
e !==
|
|
3505
|
-
}),
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
style: B(f.value),
|
|
3509
|
-
class: z([
|
|
3549
|
+
e !== l.value && (l.value = e);
|
|
3550
|
+
}), (t, n) => (U(), I("div", {
|
|
3551
|
+
style: V(d.value),
|
|
3552
|
+
class: B([
|
|
3510
3553
|
t.$style.ui3nRadio,
|
|
3511
3554
|
e.disabled && t.$style.disabled,
|
|
3512
3555
|
!J(a).default && t.$style.noLabel
|
|
3513
3556
|
])
|
|
3514
3557
|
}, [
|
|
3515
|
-
|
|
3558
|
+
L("input", {
|
|
3516
3559
|
type: "radio",
|
|
3517
3560
|
hidden: "",
|
|
3518
|
-
name:
|
|
3519
|
-
checked:
|
|
3561
|
+
name: c.value,
|
|
3562
|
+
checked: u.value,
|
|
3520
3563
|
value: String(e.checkedValue),
|
|
3521
3564
|
disabled: e.disabled
|
|
3522
|
-
}, null, 8,
|
|
3523
|
-
|
|
3524
|
-
class:
|
|
3565
|
+
}, null, 8, Ai),
|
|
3566
|
+
L("div", {
|
|
3567
|
+
class: B([t.$style.body, e.disabled && t.$style.bodyDisabled]),
|
|
3525
3568
|
tabindex: e.disabled ? -1 : 0,
|
|
3526
|
-
onKeydown: [Z(
|
|
3527
|
-
onClick:
|
|
3528
|
-
}, [
|
|
3569
|
+
onKeydown: [Z(f, ["enter"]), Z(f, ["space"])],
|
|
3570
|
+
onClick: f
|
|
3571
|
+
}, [u.value ? K(t.$slots, "checkedIcon", { key: 0 }, () => [(U(), I("svg", {
|
|
3529
3572
|
width: Number(e.size) - 4,
|
|
3530
3573
|
height: Number(e.size) - 4,
|
|
3531
3574
|
viewBox: "0 0 24 24",
|
|
3532
|
-
class:
|
|
3533
|
-
}, [...n[0] ||= [
|
|
3575
|
+
class: B([t.$style.icon, e.disabled && t.$style.iconDisabled])
|
|
3576
|
+
}, [...n[0] ||= [L("path", {
|
|
3534
3577
|
fill: "currentColor",
|
|
3535
3578
|
d: "M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5s5-2.24 5-5s-2.24-5-5-5m0-5C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8s8 3.58 8 8s-3.58 8-8 8"
|
|
3536
|
-
}, null, -1)]], 10,
|
|
3579
|
+
}, null, -1)]], 10, Mi))]) : K(t.$slots, "uncheckedIcon", { key: 1 }, () => [(U(), I("svg", {
|
|
3537
3580
|
width: Number(e.size) - 4,
|
|
3538
3581
|
height: Number(e.size) - 4,
|
|
3539
3582
|
viewBox: "0 0 24 24",
|
|
3540
|
-
class:
|
|
3541
|
-
}, [...n[1] ||= [
|
|
3583
|
+
class: B([t.$style.icon, e.disabled && t.$style.iconDisabled])
|
|
3584
|
+
}, [...n[1] ||= [L("path", {
|
|
3542
3585
|
fill: "currentColor",
|
|
3543
3586
|
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8s8 3.58 8 8s-3.58 8-8 8"
|
|
3544
|
-
}, null, -1)]], 10,
|
|
3545
|
-
|
|
3587
|
+
}, null, -1)]], 10, Ni))])], 42, ji),
|
|
3588
|
+
L("div", { class: B(t.$style.label) }, [K(t.$slots, "default")], 2)
|
|
3546
3589
|
], 6));
|
|
3547
3590
|
}
|
|
3548
3591
|
}), [["__cssModules", { $style: {
|
|
@@ -3554,7 +3597,7 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3554
3597
|
icon: "_icon_17bki_62",
|
|
3555
3598
|
bodyDisabled: "_bodyDisabled_17bki_71",
|
|
3556
3599
|
iconDisabled: "_iconDisabled_17bki_72"
|
|
3557
|
-
} }]]),
|
|
3600
|
+
} }]]), Fi = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
3558
3601
|
__name: "ui3n-radio-group",
|
|
3559
3602
|
props: {
|
|
3560
3603
|
id: {},
|
|
@@ -3576,8 +3619,9 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3576
3619
|
function o(e) {
|
|
3577
3620
|
a.value = e, i("update:modelValue", e), i("change", e);
|
|
3578
3621
|
}
|
|
3579
|
-
ge(
|
|
3580
|
-
groupValue:
|
|
3622
|
+
ge("ui3n-radio-group-context", {
|
|
3623
|
+
groupValue: N(() => a.value),
|
|
3624
|
+
groupName: N(() => r.name || ""),
|
|
3581
3625
|
updateGroupValue: o
|
|
3582
3626
|
});
|
|
3583
3627
|
function s() {
|
|
@@ -3587,16 +3631,16 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3587
3631
|
e !== a.value && (a.value = e);
|
|
3588
3632
|
}), Y(() => r.name, (e) => {
|
|
3589
3633
|
e || s();
|
|
3590
|
-
}), (t, n) => (U(),
|
|
3634
|
+
}), (t, n) => (U(), I("div", { class: B([t.$style.ui3nRadioGroup, e.direction === "horizontal" && t.$style.horizontal]) }, [K(t.$slots, "default")], 2));
|
|
3591
3635
|
}
|
|
3592
3636
|
}), [["__cssModules", { $style: {
|
|
3593
3637
|
ui3nRadioGroup: "_ui3nRadioGroup_1aejh_1",
|
|
3594
3638
|
horizontal: "_horizontal_1aejh_9"
|
|
3595
|
-
} }]]),
|
|
3639
|
+
} }]]), Ii = ["id"], Li = ["name", "value"], Ri = [
|
|
3596
3640
|
"value",
|
|
3597
3641
|
"placeholder",
|
|
3598
3642
|
"disabled"
|
|
3599
|
-
],
|
|
3643
|
+
], zi = ["title"], Bi = 60, Vi = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
3600
3644
|
__name: "ui3n-editable",
|
|
3601
3645
|
props: {
|
|
3602
3646
|
id: {},
|
|
@@ -3619,139 +3663,137 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3619
3663
|
"focusout"
|
|
3620
3664
|
],
|
|
3621
3665
|
setup(e, { expose: t, emit: n }) {
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3666
|
+
let r = te, i = On, a = e, o = n, s = W(null), c = W(null), l = W("auto"), u = W(null), d = W(a.modelValue), f = W(a.modelValue), p = W(!1), m = N(() => {
|
|
3667
|
+
let e = "100%";
|
|
3668
|
+
if (a.maxWidth) {
|
|
3669
|
+
let t = Number(a.maxWidth);
|
|
3670
|
+
e = Number.isNaN(t) ? a.maxWidth : `${t}px`;
|
|
3671
|
+
}
|
|
3672
|
+
return {
|
|
3673
|
+
"--ui3n-editable-min-width": `${Bi}px`,
|
|
3674
|
+
"--ui3n-editable-max-width": e
|
|
3675
|
+
};
|
|
3676
|
+
}), h = N(() => u.value ? u.value.scrollWidth > u.value.clientWidth : !1), g = N(() => a.disallowEmptyValue ? !!d.value : !0);
|
|
3677
|
+
function _() {
|
|
3678
|
+
c.value && (c.value.textContent = d.value || a.placeholder || "", l.value = `${Math.max(c.value.scrollWidth + 48, Bi)}px`);
|
|
3633
3679
|
}
|
|
3634
|
-
function
|
|
3635
|
-
a.disabled || (p.value = !0, f.value = d.value,
|
|
3636
|
-
s.value && (
|
|
3680
|
+
function v() {
|
|
3681
|
+
a.disabled || (p.value = !0, f.value = d.value, fe(() => {
|
|
3682
|
+
s.value && (_(), s.value.focus(), a.selectAllOnFocus && s.value.select());
|
|
3637
3683
|
}));
|
|
3638
3684
|
}
|
|
3639
|
-
function
|
|
3640
|
-
d.value = e.target.value || "",
|
|
3685
|
+
function y(e) {
|
|
3686
|
+
d.value = e.target.value || "", _();
|
|
3687
|
+
}
|
|
3688
|
+
function b() {
|
|
3689
|
+
a.disabled || a.disallowEmptyValue && !g.value || (d.value !== f.value && (f.value = d.value, o("update:modelValue", d.value)), o("done"), p.value = !1);
|
|
3641
3690
|
}
|
|
3642
3691
|
function x() {
|
|
3643
|
-
a.disabled ||
|
|
3692
|
+
a.disabled || (d.value !== f.value && (d.value = f.value, o("update:modelValue", d.value)), o("cancel"), p.value = !1);
|
|
3644
3693
|
}
|
|
3645
3694
|
function S() {
|
|
3646
|
-
a.disabled ||
|
|
3695
|
+
a.disabled || p.value && (o("focusout"), b());
|
|
3647
3696
|
}
|
|
3648
3697
|
function C() {
|
|
3649
|
-
a.disabled || p.value && (o("focusout"), x());
|
|
3650
|
-
}
|
|
3651
|
-
function w() {
|
|
3652
3698
|
d.value = "", f.value = "", o("update:modelValue", "");
|
|
3653
3699
|
}
|
|
3654
|
-
return t({ clear:
|
|
3700
|
+
return t({ clear: C }), Y(() => a.modelValue, (e, t) => {
|
|
3655
3701
|
e !== t && (d.value = e, f.value = e);
|
|
3656
3702
|
}), Y(() => p.value, (e) => {
|
|
3657
3703
|
!a.disabled && o("toggle:editMode", e);
|
|
3658
3704
|
}), Y(() => a.name, (e) => {
|
|
3659
|
-
e ||
|
|
3660
|
-
}), (t, n) => Te((U(),
|
|
3705
|
+
e || C();
|
|
3706
|
+
}), (t, n) => Te((U(), I("div", {
|
|
3661
3707
|
id: e.id,
|
|
3662
|
-
class:
|
|
3708
|
+
class: B([
|
|
3709
|
+
t.$style.ui3nEditable,
|
|
3710
|
+
e.disabled && t.$style.ui3nEditableDisabled,
|
|
3711
|
+
p.value && t.$style.ui3nEditableInEdit,
|
|
3712
|
+
p.value && !g.value && t.$style.ui3nEditableInEditWarning
|
|
3713
|
+
]),
|
|
3714
|
+
style: V(m.value),
|
|
3663
3715
|
onFocusin: n[0] ||= (e) => o("focusin", e)
|
|
3664
|
-
}, [e.name ? (U(),
|
|
3716
|
+
}, [e.name ? (U(), I("input", {
|
|
3665
3717
|
key: 0,
|
|
3666
3718
|
type: "hidden",
|
|
3667
3719
|
name: e.name,
|
|
3668
3720
|
value: d.value
|
|
3669
|
-
}, null, 8,
|
|
3670
|
-
|
|
3721
|
+
}, null, 8, Li)) : F("", !0), p.value ? (U(), I(M, { key: 1 }, [
|
|
3722
|
+
L("span", {
|
|
3671
3723
|
ref_key: "hiddenEl",
|
|
3672
3724
|
ref: c,
|
|
3673
|
-
class:
|
|
3725
|
+
class: B(t.$style.hidden)
|
|
3674
3726
|
}, null, 2),
|
|
3675
|
-
|
|
3727
|
+
L("input", {
|
|
3676
3728
|
ref_key: "inputEl",
|
|
3677
3729
|
ref: s,
|
|
3678
|
-
class:
|
|
3679
|
-
|
|
3680
|
-
p.value && t.$style.inEdit,
|
|
3681
|
-
p.value && !_.value && t.$style.inEditWarning
|
|
3682
|
-
]),
|
|
3683
|
-
style: B({ width: l.value }),
|
|
3730
|
+
class: B(t.$style.input),
|
|
3731
|
+
style: V({ width: l.value }),
|
|
3684
3732
|
value: d.value,
|
|
3685
3733
|
placeholder: e.placeholder,
|
|
3686
3734
|
disabled: e.disabled,
|
|
3687
|
-
onInput:
|
|
3735
|
+
onInput: y,
|
|
3688
3736
|
onKeydown: [
|
|
3689
|
-
Z(
|
|
3690
|
-
Z(
|
|
3691
|
-
Z(
|
|
3737
|
+
Z(b, ["enter"]),
|
|
3738
|
+
Z(b, ["tab"]),
|
|
3739
|
+
Z(x, ["esc"])
|
|
3692
3740
|
]
|
|
3693
|
-
}, null, 46,
|
|
3694
|
-
Te((U(),
|
|
3695
|
-
class:
|
|
3741
|
+
}, null, 46, Ri),
|
|
3742
|
+
Te((U(), I("div", {
|
|
3743
|
+
class: B([
|
|
3696
3744
|
t.$style.btn,
|
|
3697
3745
|
t.$style.doneBtn,
|
|
3698
3746
|
e.disabled && t.$style.btnDisabled
|
|
3699
3747
|
]),
|
|
3700
|
-
onClick: Q(
|
|
3701
|
-
}, [
|
|
3748
|
+
onClick: Q(b, ["stop", "prevent"])
|
|
3749
|
+
}, [R(k, {
|
|
3702
3750
|
icon: "round-done",
|
|
3703
3751
|
size: "12",
|
|
3704
3752
|
color: "var(--color-icon-table-accent-default)"
|
|
3705
3753
|
})], 2)), [[J(r)]]),
|
|
3706
|
-
Te((U(),
|
|
3707
|
-
class:
|
|
3754
|
+
Te((U(), I("div", {
|
|
3755
|
+
class: B([
|
|
3708
3756
|
t.$style.btn,
|
|
3709
3757
|
t.$style.cancelBtn,
|
|
3710
3758
|
e.disabled && t.$style.btnDisabled
|
|
3711
3759
|
]),
|
|
3712
|
-
onClick: Q(
|
|
3713
|
-
}, [
|
|
3760
|
+
onClick: Q(x, ["stop", "prevent"])
|
|
3761
|
+
}, [R(k, {
|
|
3714
3762
|
icon: "round-close",
|
|
3715
3763
|
size: "12",
|
|
3716
3764
|
color: "var(--color-icon-table-secondary-default)"
|
|
3717
3765
|
})], 2)), [[J(r)]])
|
|
3718
|
-
], 64)) : (U(),
|
|
3766
|
+
], 64)) : (U(), I("div", {
|
|
3719
3767
|
key: 2,
|
|
3720
|
-
class:
|
|
3721
|
-
title:
|
|
3722
|
-
}, [
|
|
3768
|
+
class: B([t.$style.content, !d.value && t.$style.contentEmpty]),
|
|
3769
|
+
title: h.value ? d.value : void 0
|
|
3770
|
+
}, [L("span", {
|
|
3723
3771
|
ref_key: "contentValueEl",
|
|
3724
3772
|
ref: u
|
|
3725
|
-
}, q(d.value || e.placeholder || "..."), 513), Te((U(),
|
|
3726
|
-
class:
|
|
3727
|
-
onClick: Q(
|
|
3728
|
-
}, [
|
|
3773
|
+
}, q(d.value || e.placeholder || "..."), 513), Te((U(), I("div", {
|
|
3774
|
+
class: B([t.$style.btn, t.$style.editBtn]),
|
|
3775
|
+
onClick: Q(v, ["stop", "prevent"])
|
|
3776
|
+
}, [R(k, {
|
|
3729
3777
|
icon: "round-edit",
|
|
3730
3778
|
size: "12",
|
|
3731
3779
|
color: "var(--color-icon-control-accent-unselected)"
|
|
3732
|
-
})], 2)), [[J(r)]])], 10,
|
|
3780
|
+
})], 2)), [[J(r)]])], 10, zi))], 46, Ii)), [[J(i), S]]);
|
|
3733
3781
|
}
|
|
3734
3782
|
}), [["__cssModules", { $style: {
|
|
3735
|
-
ui3nEditable: "
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
hidden: "
|
|
3745
|
-
cancelBtn: "
|
|
3746
|
-
doneBtn: "
|
|
3747
|
-
btnDisabled: "
|
|
3748
|
-
} }]]),
|
|
3749
|
-
var n = Yt(), r = 1, i = 4;
|
|
3750
|
-
function a(e) {
|
|
3751
|
-
return n(e, r | i);
|
|
3752
|
-
}
|
|
3753
|
-
t.exports = a;
|
|
3754
|
-
})))(), 1), Hi = ["name", "value"], Ui = ["name", "value"], Wi = ["name", "value"], Gi = ["placeholder", "disabled"], Ki = ["id", "onClick"], qi = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
3783
|
+
ui3nEditable: "_ui3nEditable_s7l0a_3",
|
|
3784
|
+
ui3nEditableInEdit: "_ui3nEditableInEdit_s7l0a_23",
|
|
3785
|
+
ui3nEditableInEditWarning: "_ui3nEditableInEditWarning_s7l0a_26",
|
|
3786
|
+
ui3nEditableDisabled: "_ui3nEditableDisabled_s7l0a_33",
|
|
3787
|
+
content: "_content_s7l0a_38",
|
|
3788
|
+
contentEmpty: "_contentEmpty_s7l0a_60",
|
|
3789
|
+
btn: "_btn_s7l0a_66",
|
|
3790
|
+
editBtn: "_editBtn_s7l0a_66",
|
|
3791
|
+
input: "_input_s7l0a_70",
|
|
3792
|
+
hidden: "_hidden_s7l0a_92",
|
|
3793
|
+
cancelBtn: "_cancelBtn_s7l0a_128",
|
|
3794
|
+
doneBtn: "_doneBtn_s7l0a_133",
|
|
3795
|
+
btnDisabled: "_btnDisabled_s7l0a_139"
|
|
3796
|
+
} }]]), Hi = ["name", "value"], Ui = ["name", "value"], Wi = ["name", "value"], Gi = ["placeholder", "disabled"], Ki = ["id", "onClick"], qi = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
3755
3797
|
__name: "ui3n-autocomplete",
|
|
3756
3798
|
props: {
|
|
3757
3799
|
name: {},
|
|
@@ -3767,6 +3809,10 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3767
3809
|
type: Boolean,
|
|
3768
3810
|
default: !1
|
|
3769
3811
|
},
|
|
3812
|
+
lockScroll: {
|
|
3813
|
+
type: Boolean,
|
|
3814
|
+
default: !1
|
|
3815
|
+
},
|
|
3770
3816
|
items: { default: () => [] },
|
|
3771
3817
|
itemTitle: { default: "name" },
|
|
3772
3818
|
itemValue: { default: "id" },
|
|
@@ -3785,7 +3831,7 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3785
3831
|
"valid:new-value"
|
|
3786
3832
|
],
|
|
3787
3833
|
setup(e, { expose: n, emit: r }) {
|
|
3788
|
-
let a = En, o = e, s = r, c = `auto-${t(4)}`, l = W(""), u = W(!1), d = W(null), f = W(null), p = W(null), m = W(null), h = W(!1), g = W(!0), _ =
|
|
3834
|
+
let a = En, o = e, s = r, c = `auto-${t(4)}`, l = W(""), u = W(!1), d = W(null), f = W(null), p = W(null), m = W(null), h = W(!1), g = W(!0), _ = N(() => o.returnObject ? o.modelValue.map((e) => e.id) : o.modelValue), v = N(() => o.chips ? "" : o.returnObject ? o.modelValue.map((e) => e[o.itemTitle] || "?").join(", ") : o.modelValue.join(", ")), y = N(() => o.customFilter ? o.items.filter((e) => o.customFilter(e, l.value)).filter((e) => o.hideSelected ? o.returnObject ? !_.value.includes(e.id) : !_.value.includes(e[o.itemValue]) : !0) : o.items.filter((e) => e[o.itemTitle].toLowerCase().includes(l.value.toLowerCase())).filter((e) => o.hideSelected ? o.returnObject ? !_.value.includes(e.id) : !_.value.includes(e[o.itemValue]) : !0));
|
|
3789
3835
|
function b() {
|
|
3790
3836
|
h.value = !1, s("update:search", l.value);
|
|
3791
3837
|
}
|
|
@@ -3800,24 +3846,24 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3800
3846
|
s("update:modelValue", o.returnObject ? [e] : [e[o.itemValue]]);
|
|
3801
3847
|
return;
|
|
3802
3848
|
}
|
|
3803
|
-
let t = (0,
|
|
3849
|
+
let t = (0, Gr.default)(o.modelValue), n = o.returnObject ? o.modelValue.findIndex((t) => t.id === e.id) : o.modelValue.findIndex((t) => t === e[o.itemValue]);
|
|
3804
3850
|
n > -1 ? t.splice(n, 1) : t.push(o.returnObject ? e : e[o.itemValue]), s("update:modelValue", t), o.clearOnSelect && (l.value = "");
|
|
3805
3851
|
}
|
|
3806
3852
|
function C(e) {
|
|
3807
3853
|
if (o.disabled) return;
|
|
3808
|
-
let t = o.returnObject ? o.modelValue.findIndex((t) => t.id === e.id) : o.modelValue.findIndex((t) => t === e), n = (0,
|
|
3854
|
+
let t = o.returnObject ? o.modelValue.findIndex((t) => t.id === e.id) : o.modelValue.findIndex((t) => t === e), n = (0, Gr.default)(o.modelValue);
|
|
3809
3855
|
n.splice(t, 1), s("update:modelValue", n);
|
|
3810
3856
|
}
|
|
3811
3857
|
function w() {
|
|
3812
3858
|
if (m.value === null) {
|
|
3813
|
-
m.value = 0, p.value && p.value.focus();
|
|
3859
|
+
m.value = 0, p.value && p.value.focus({ preventScroll: !0 });
|
|
3814
3860
|
return;
|
|
3815
3861
|
}
|
|
3816
3862
|
m.value >= 0 && m.value < (0, $.default)(y.value) - 1 && (m.value += 1);
|
|
3817
3863
|
}
|
|
3818
3864
|
function T() {
|
|
3819
3865
|
if (m.value === null) {
|
|
3820
|
-
m.value = (0, $.default)(y.value) - 1, p.value && p.value.focus();
|
|
3866
|
+
m.value = (0, $.default)(y.value) - 1, p.value && p.value.focus({ preventScroll: !0 });
|
|
3821
3867
|
return;
|
|
3822
3868
|
}
|
|
3823
3869
|
m.value > 0 && m.value < (0, $.default)(y.value) && --m.value;
|
|
@@ -3827,7 +3873,7 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3827
3873
|
}
|
|
3828
3874
|
function E() {
|
|
3829
3875
|
if (m.value === null && !u.value) {
|
|
3830
|
-
u.value = !0, m.value = 0, p.value && p.value.focus();
|
|
3876
|
+
u.value = !0, m.value = 0, p.value && p.value.focus({ preventScroll: !0 });
|
|
3831
3877
|
return;
|
|
3832
3878
|
}
|
|
3833
3879
|
if (m.value === null && u.value && l.value) {
|
|
@@ -3844,12 +3890,12 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3844
3890
|
}
|
|
3845
3891
|
}
|
|
3846
3892
|
function te() {
|
|
3847
|
-
if (o.disabled || l.value !== "" || (0,
|
|
3893
|
+
if (o.disabled || l.value !== "" || (0, Wr.default)(o.modelValue)) return;
|
|
3848
3894
|
if (!h.value) {
|
|
3849
3895
|
h.value = !0;
|
|
3850
3896
|
return;
|
|
3851
3897
|
}
|
|
3852
|
-
let e = (0,
|
|
3898
|
+
let e = (0, Gr.default)(o.modelValue);
|
|
3853
3899
|
e.pop(), s("update:modelValue", e), h.value = !1;
|
|
3854
3900
|
}
|
|
3855
3901
|
function D(e, t) {
|
|
@@ -3879,29 +3925,31 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3879
3925
|
e || O();
|
|
3880
3926
|
}), Y(() => (0, $.default)(y.value), (e, t) => {
|
|
3881
3927
|
e !== t && (m.value = null), e && !g.value && (g.value = !0);
|
|
3882
|
-
}), (t, n) => (U(),
|
|
3928
|
+
}), (t, n) => (U(), I("div", { class: B(t.$style.ui3nAutocomplete) }, [e.name && !J(Wr.default)(e.modelValue) ? (U(), I("fieldset", {
|
|
3883
3929
|
key: 0,
|
|
3884
|
-
class:
|
|
3885
|
-
}, [e.multiple ? (U(),
|
|
3930
|
+
class: B(t.$style.hiddenBlock)
|
|
3931
|
+
}, [e.multiple ? (U(), I(M, { key: 1 }, [e.returnObject ? (U(!0), I(M, { key: 1 }, G(e.modelValue, (t, n) => (U(), I("input", {
|
|
3886
3932
|
key: t.id || `${e.name}-obj-${n}`,
|
|
3887
3933
|
type: "hidden",
|
|
3888
3934
|
name: `${e.name}[]`,
|
|
3889
3935
|
value: JSON.stringify(t)
|
|
3890
|
-
}, null, 8, Wi))), 128)) : (U(!0),
|
|
3936
|
+
}, null, 8, Wi))), 128)) : (U(!0), I(M, { key: 0 }, G(e.modelValue, (t, n) => (U(), I("input", {
|
|
3891
3937
|
key: `${e.name}-flat-${n}`,
|
|
3892
3938
|
type: "hidden",
|
|
3893
3939
|
name: `${e.name}[]`,
|
|
3894
3940
|
value: t
|
|
3895
|
-
}, null, 8, Ui))), 128))], 64)) : (U(),
|
|
3941
|
+
}, null, 8, Ui))), 128))], 64)) : (U(), I("input", {
|
|
3896
3942
|
key: 0,
|
|
3897
3943
|
type: "hidden",
|
|
3898
3944
|
name: e.name,
|
|
3899
3945
|
value: e.returnObject ? JSON.stringify(e.modelValue) : e.modelValue
|
|
3900
|
-
}, null, 8, Hi))], 2)) :
|
|
3946
|
+
}, null, 8, Hi))], 2)) : F("", !0), R(ti, {
|
|
3901
3947
|
modelValue: u.value,
|
|
3902
3948
|
"onUpdate:modelValue": n[8] ||= (e) => u.value = e,
|
|
3949
|
+
"lock-scroll": e.lockScroll,
|
|
3903
3950
|
"offset-x": 2,
|
|
3904
3951
|
"offset-y": 4,
|
|
3952
|
+
"position-strategy": "fixed",
|
|
3905
3953
|
"position-autoupdate": "",
|
|
3906
3954
|
"content-border-radius": [
|
|
3907
3955
|
0,
|
|
@@ -3911,15 +3959,15 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3911
3959
|
],
|
|
3912
3960
|
disabled: e.disabled
|
|
3913
3961
|
}, {
|
|
3914
|
-
menu: X(() => [!J(
|
|
3962
|
+
menu: X(() => [!J(Wr.default)(y.value) || J(Wr.default)(y.value) && e.noDataText ? (U(), I("div", {
|
|
3915
3963
|
key: 0,
|
|
3916
3964
|
ref_key: "menuBodyEl",
|
|
3917
3965
|
ref: p,
|
|
3918
|
-
class:
|
|
3919
|
-
}, [J($.default)(y.value) ? (U(!0),
|
|
3966
|
+
class: B(t.$style.body)
|
|
3967
|
+
}, [J($.default)(y.value) ? (U(!0), I(M, { key: 0 }, G(y.value, (n, r) => (U(), I("div", {
|
|
3920
3968
|
key: n.id,
|
|
3921
3969
|
id: `${c}-${r}`,
|
|
3922
|
-
class:
|
|
3970
|
+
class: B([
|
|
3923
3971
|
t.$style.item,
|
|
3924
3972
|
m.value === r && t.$style.itemSelected,
|
|
3925
3973
|
e.disabled && t.$style.itemDisabled
|
|
@@ -3929,51 +3977,51 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3929
3977
|
item: n,
|
|
3930
3978
|
index: r,
|
|
3931
3979
|
query: l.value
|
|
3932
|
-
}, () => [Te(
|
|
3980
|
+
}, () => [Te(L("div", { class: B(t.$style.simpleItem) }, null, 2), [[J(a), J(i)(n[o.itemTitle], l.value)]])])], 10, Ki))), 128)) : F("", !0), !J($.default)(y.value) && e.noDataText ? (U(), I("div", {
|
|
3933
3981
|
key: 1,
|
|
3934
|
-
class:
|
|
3935
|
-
}, [K(t.$slots, "noDataText", {}, () => [
|
|
3936
|
-
default: X(() => [
|
|
3982
|
+
class: B(t.$style.noData)
|
|
3983
|
+
}, [K(t.$slots, "noDataText", {}, () => [le(q(e.noDataText), 1)])], 2)) : F("", !0)], 2)) : F("", !0)]),
|
|
3984
|
+
default: X(() => [L("div", {
|
|
3937
3985
|
ref_key: "activatorEl",
|
|
3938
3986
|
ref: d,
|
|
3939
|
-
class:
|
|
3940
|
-
}, [e.chips ? (U(),
|
|
3987
|
+
class: B(t.$style.trigger)
|
|
3988
|
+
}, [e.chips ? (U(), P(ce, {
|
|
3941
3989
|
key: 0,
|
|
3942
3990
|
name: "chipAnim",
|
|
3943
3991
|
tag: "div",
|
|
3944
|
-
class:
|
|
3992
|
+
class: B(t.$style.chipsContainer)
|
|
3945
3993
|
}, {
|
|
3946
|
-
default: X(() => [(U(!0),
|
|
3994
|
+
default: X(() => [(U(!0), I(M, null, G(e.modelValue, (n, r) => (U(), I("div", {
|
|
3947
3995
|
key: n.id || r,
|
|
3948
|
-
class:
|
|
3996
|
+
class: B(t.$style.chipWrapper)
|
|
3949
3997
|
}, [K(t.$slots, "chip", {
|
|
3950
3998
|
item: n,
|
|
3951
3999
|
index: r,
|
|
3952
4000
|
isHighlighted: r === J($.default)(e.modelValue) - 1 && h.value
|
|
3953
|
-
}, () => [
|
|
4001
|
+
}, () => [R(er, {
|
|
3954
4002
|
height: "32",
|
|
3955
4003
|
color: r === J($.default)(e.modelValue) - 1 && h.value ? "var(--color-bg-control-primary-hover)" : void 0,
|
|
3956
4004
|
round: "",
|
|
3957
4005
|
closeable: "",
|
|
3958
4006
|
onClose: (e) => C(n)
|
|
3959
4007
|
}, {
|
|
3960
|
-
default: X(() => [
|
|
4008
|
+
default: X(() => [le(q(e.returnObject ? n[o.itemTitle] : n), 1)]),
|
|
3961
4009
|
_: 2
|
|
3962
4010
|
}, 1032, ["color", "onClose"])])], 2))), 128))]),
|
|
3963
4011
|
_: 3
|
|
3964
|
-
}, 8, ["class"])) : (U(),
|
|
4012
|
+
}, 8, ["class"])) : (U(), I("div", {
|
|
3965
4013
|
key: 1,
|
|
3966
|
-
class:
|
|
3967
|
-
}, q(v.value), 3)), Te(
|
|
4014
|
+
class: B(t.$style.displayValue)
|
|
4015
|
+
}, q(v.value), 3)), Te(L("input", {
|
|
3968
4016
|
ref_key: "inputEl",
|
|
3969
4017
|
ref: f,
|
|
3970
4018
|
"onUpdate:modelValue": n[0] ||= (e) => l.value = e,
|
|
3971
4019
|
type: "text",
|
|
3972
|
-
class:
|
|
3973
|
-
placeholder: J(
|
|
4020
|
+
class: B([t.$style.input, !g.value && t.$style.inputWithError]),
|
|
4021
|
+
placeholder: J(Wr.default)(e.modelValue) && e.placeholder ? e.placeholder : "",
|
|
3974
4022
|
disabled: e.disabled,
|
|
3975
4023
|
onInput: b,
|
|
3976
|
-
onFocusin: n[1] ||= (e) => s("update:focused", !0),
|
|
4024
|
+
onFocusin: n[1] ||= Q((e) => s("update:focused", !0), ["prevent"]),
|
|
3977
4025
|
onFocusout: x,
|
|
3978
4026
|
onKeydown: [
|
|
3979
4027
|
n[2] ||= Z((e) => D(e, "down"), ["down"]),
|
|
@@ -3985,24 +4033,28 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
3985
4033
|
]
|
|
3986
4034
|
}, null, 42, Gi), [[we, l.value]])], 2)]),
|
|
3987
4035
|
_: 3
|
|
3988
|
-
}, 8, [
|
|
4036
|
+
}, 8, [
|
|
4037
|
+
"modelValue",
|
|
4038
|
+
"lock-scroll",
|
|
4039
|
+
"disabled"
|
|
4040
|
+
])], 2));
|
|
3989
4041
|
}
|
|
3990
4042
|
}), [["__cssModules", { $style: {
|
|
3991
|
-
ui3nAutocomplete: "
|
|
3992
|
-
hiddenBlock: "
|
|
3993
|
-
trigger: "
|
|
3994
|
-
displayValue: "
|
|
3995
|
-
input: "
|
|
3996
|
-
inputWithError: "
|
|
3997
|
-
body: "
|
|
3998
|
-
item: "
|
|
3999
|
-
itemSelected: "
|
|
4000
|
-
itemDisabled: "
|
|
4001
|
-
simpleItem: "
|
|
4002
|
-
noData: "
|
|
4003
|
-
chipsContainer: "
|
|
4004
|
-
chipWrapper: "
|
|
4005
|
-
} }]]), Ji = ["id"], Yi = ["name", "value"], Xi = ["name", "value"], Zi = ["name", "value"], Qi = /* @__PURE__ */ D(/* @__PURE__ */
|
|
4043
|
+
ui3nAutocomplete: "_ui3nAutocomplete_2o0no_1",
|
|
4044
|
+
hiddenBlock: "_hiddenBlock_2o0no_17",
|
|
4045
|
+
trigger: "_trigger_2o0no_24",
|
|
4046
|
+
displayValue: "_displayValue_2o0no_33",
|
|
4047
|
+
input: "_input_2o0no_40",
|
|
4048
|
+
inputWithError: "_inputWithError_2o0no_60",
|
|
4049
|
+
body: "_body_2o0no_66",
|
|
4050
|
+
item: "_item_2o0no_72",
|
|
4051
|
+
itemSelected: "_itemSelected_2o0no_86",
|
|
4052
|
+
itemDisabled: "_itemDisabled_2o0no_90",
|
|
4053
|
+
simpleItem: "_simpleItem_2o0no_95",
|
|
4054
|
+
noData: "_noData_2o0no_100",
|
|
4055
|
+
chipsContainer: "_chipsContainer_2o0no_113",
|
|
4056
|
+
chipWrapper: "_chipWrapper_2o0no_120"
|
|
4057
|
+
} }]]), Ji = ["id"], Yi = ["name", "value"], Xi = ["name", "value"], Zi = ["name", "value"], Qi = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
4006
4058
|
__name: "ui3n-slider",
|
|
4007
4059
|
props: {
|
|
4008
4060
|
id: {},
|
|
@@ -4031,24 +4083,26 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4031
4083
|
}), u = W({
|
|
4032
4084
|
1: r.labelVisible === "always",
|
|
4033
4085
|
2: r.labelVisible === "always"
|
|
4034
|
-
}), d = W(0), f = W(null)
|
|
4086
|
+
}), d = W(0), f = W(null);
|
|
4087
|
+
N(() => `${r.thumbSize}px`);
|
|
4088
|
+
let p = N(() => Number(r.max) - Number(r.min)), m = N(() => r.step ? Number(r.step) : p.value / 100), h = N(() => {
|
|
4035
4089
|
let e = {};
|
|
4036
4090
|
if (r.range) {
|
|
4037
4091
|
let [t, n] = d.value;
|
|
4038
|
-
return t <= Number(r.min) ? e.left = "0px" : t < Number(r.max) && (e.left = `${a((t - Number(r.min)) /
|
|
4092
|
+
return t <= Number(r.min) ? e.left = "0px" : t < Number(r.max) && (e.left = `${a((t - Number(r.min)) / p.value * 100, 0)}%`), n >= Number(r.max) ? e.width = t <= Number(r.min) ? "100%" : `${a((Number(r.max) - t) / p.value * 100, 0)}%` : n > Number(r.min) && (e.width = `${a((n - t) / p.value * 100, 0)}%`), e;
|
|
4039
4093
|
}
|
|
4040
|
-
return d.value <= Number(r.min) ? (e.left = "0px", e.width = "0px") : d.value >= Number(r.max) ? (e.left = "0px", e.width = "100%") : (e.left = "0px", e.width = `${a((d.value - Number(r.min)) /
|
|
4041
|
-
}),
|
|
4094
|
+
return d.value <= Number(r.min) ? (e.left = "0px", e.width = "0px") : d.value >= Number(r.max) ? (e.left = "0px", e.width = "100%") : (e.left = "0px", e.width = `${a((d.value - Number(r.min)) / p.value * 100, 0)}%`), e;
|
|
4095
|
+
}), g = N(() => r.range ? `calc(${h.value.left} + 1px)` : `${h.value.width}`), _ = N(() => r.range ? `calc(${h.value.width} + ${h.value.left} - 1px)` : "200%"), v = N(() => {
|
|
4042
4096
|
if (r.range) {
|
|
4043
4097
|
let e = d.value[0];
|
|
4044
4098
|
return r.transformValueMethod ? r.transformValueMethod(e) : `${e}`;
|
|
4045
4099
|
}
|
|
4046
4100
|
return r.transformValueMethod ? r.transformValueMethod(d.value) : `${d.value}`;
|
|
4047
|
-
}),
|
|
4101
|
+
}), y = N(() => {
|
|
4048
4102
|
if (!r.range) return "";
|
|
4049
4103
|
let e = d.value[1];
|
|
4050
4104
|
return r.transformValueMethod ? r.transformValueMethod(e) : `${e}`;
|
|
4051
|
-
}),
|
|
4105
|
+
}), b = N(() => ({
|
|
4052
4106
|
"--ui3n-slider-height": `${Math.max(Number(r.trackHeight), Number(r.thumbSize))}px`,
|
|
4053
4107
|
"--ui3n-slider-label-color": r.labelColor,
|
|
4054
4108
|
"--ui3n-slider-label-text-color": r.labelTextColor,
|
|
@@ -4057,99 +4111,99 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4057
4111
|
"--ui3n-slider-track-height": `${r.trackHeight}px`,
|
|
4058
4112
|
"--ui3n-slider-thumb-size": `${r.thumbSize}px`,
|
|
4059
4113
|
"--ui3n-slider-thumb-color": r.thumbColor,
|
|
4060
|
-
"--ui3n-slider-pointer1-position":
|
|
4061
|
-
"--ui3n-slider-pointer2-position":
|
|
4114
|
+
"--ui3n-slider-pointer1-position": g.value,
|
|
4115
|
+
"--ui3n-slider-pointer2-position": _.value
|
|
4062
4116
|
}));
|
|
4063
|
-
function
|
|
4117
|
+
function x(e) {
|
|
4064
4118
|
r.labelVisible === "normal" && (u.value[`${e}`] = !0);
|
|
4065
4119
|
}
|
|
4066
|
-
function
|
|
4120
|
+
function S(e) {
|
|
4067
4121
|
r.labelVisible === "normal" && (u.value[`${e}`] = !1);
|
|
4068
4122
|
}
|
|
4069
|
-
function
|
|
4123
|
+
function C() {
|
|
4070
4124
|
return !1;
|
|
4071
4125
|
}
|
|
4072
|
-
function
|
|
4126
|
+
function w(e, t) {
|
|
4073
4127
|
f.value = t, r.labelVisible === "normal" && (u.value[`${t}`] = !0), e.preventDefault();
|
|
4074
4128
|
let n = t === 1 ? s.value : c.value;
|
|
4075
|
-
l.value[`${f.value}`] = e.clientX - n.getBoundingClientRect().left, n.setPointerCapture(e.pointerId), n.onpointermove =
|
|
4129
|
+
l.value[`${f.value}`] = e.clientX - n.getBoundingClientRect().left, n.setPointerCapture(e.pointerId), n.onpointermove = T, n.onpointerup = () => {
|
|
4076
4130
|
n.onpointermove = null, n.onpointerup = null, r.labelVisible === "normal" && f.value && (u.value[`${f.value}`] = !1), f.value = null;
|
|
4077
4131
|
};
|
|
4078
4132
|
}
|
|
4079
|
-
function
|
|
4133
|
+
function T(e) {
|
|
4080
4134
|
if (!f.value) return;
|
|
4081
|
-
let t = o.value.getBoundingClientRect(), n = (e) => Math.round(e / t.width *
|
|
4135
|
+
let t = o.value.getBoundingClientRect(), n = (e) => Math.round(e / t.width * p.value) + Number(r.min), a = e.clientX - l.value[`${f.value}`] - t.left;
|
|
4082
4136
|
a < 0 && (a = 0);
|
|
4083
4137
|
let s = o.value.offsetWidth;
|
|
4084
4138
|
a > s && (a = s);
|
|
4085
4139
|
let c = n(a);
|
|
4086
|
-
r.range && (f.value === 1 && c >= d.value[1] ? c = d.value[1] -
|
|
4140
|
+
r.range && (f.value === 1 && c >= d.value[1] ? c = d.value[1] - m.value : f.value === 2 && c <= d.value[0] && (c = d.value[0] + m.value)), r.range ? (f.value === 1 && (d.value[0] = c), f.value === 2 && (d.value[1] = c)) : d.value = c, i("update:modelValue", d.value);
|
|
4087
4141
|
}
|
|
4088
|
-
function
|
|
4089
|
-
let { x: t } = e, { x: n, width: a } = o.value.getBoundingClientRect(), s = Math.round((t - n) / a *
|
|
4142
|
+
function ee(e) {
|
|
4143
|
+
let { x: t } = e, { x: n, width: a } = o.value.getBoundingClientRect(), s = Math.round((t - n) / a * p.value) + Number(r.min);
|
|
4090
4144
|
if (r.range) {
|
|
4091
4145
|
let [e, t] = d.value, n = Math.abs(s - e), r = Math.abs(t - s);
|
|
4092
4146
|
d.value = [n <= r ? s : d.value[0], n > r ? s : d.value[1]];
|
|
4093
4147
|
} else d.value = s;
|
|
4094
4148
|
i("update:modelValue", d.value);
|
|
4095
4149
|
}
|
|
4096
|
-
function
|
|
4150
|
+
function E() {
|
|
4097
4151
|
let e = r.range ? [Number(r.min), Number(r.min)] : Number(r.min);
|
|
4098
4152
|
d.value = e, i("update:modelValue", e);
|
|
4099
4153
|
}
|
|
4100
|
-
return t({ clear:
|
|
4101
|
-
e ||
|
|
4154
|
+
return t({ clear: E }), Y(() => r.name, (e) => {
|
|
4155
|
+
e || E();
|
|
4102
4156
|
}), Y(() => JSON.stringify(r.modelValue), (e) => {
|
|
4103
4157
|
if (r.range) {
|
|
4104
|
-
e !== JSON.stringify(d.value) && (d.value = (0,
|
|
4158
|
+
e !== JSON.stringify(d.value) && (d.value = (0, Gr.default)(r.modelValue));
|
|
4105
4159
|
return;
|
|
4106
4160
|
}
|
|
4107
4161
|
let t = Array.isArray(r.modelValue) ? r.modelValue[r.modelValue.length - 1] : r.modelValue;
|
|
4108
4162
|
t !== d.value && (d.value = t);
|
|
4109
|
-
}, { immediate: !0 }), (t, n) => (U(),
|
|
4163
|
+
}, { immediate: !0 }), (t, n) => (U(), I("div", {
|
|
4110
4164
|
ref: "sliderEl",
|
|
4111
4165
|
id: e.id,
|
|
4112
|
-
style:
|
|
4113
|
-
class:
|
|
4114
|
-
onClick: Q(
|
|
4166
|
+
style: V(b.value),
|
|
4167
|
+
class: B([t.$style.ui3nSlider, e.disabled && t.$style.disabled]),
|
|
4168
|
+
onClick: Q(ee, ["stop", "prevent"])
|
|
4115
4169
|
}, [
|
|
4116
|
-
e.name ? (U(),
|
|
4170
|
+
e.name ? (U(), I(M, { key: 0 }, [e.range ? (U(), I(M, { key: 0 }, [L("input", {
|
|
4117
4171
|
type: "hidden",
|
|
4118
4172
|
name: `${e.name}_min`,
|
|
4119
4173
|
value: d.value[0]
|
|
4120
|
-
}, null, 8, Yi),
|
|
4174
|
+
}, null, 8, Yi), L("input", {
|
|
4121
4175
|
type: "hidden",
|
|
4122
4176
|
name: `${e.name}_max`,
|
|
4123
4177
|
value: d.value[1]
|
|
4124
|
-
}, null, 8, Xi)], 64)) : (U(),
|
|
4178
|
+
}, null, 8, Xi)], 64)) : (U(), I("input", {
|
|
4125
4179
|
key: 1,
|
|
4126
4180
|
type: "hidden",
|
|
4127
4181
|
name: e.name,
|
|
4128
4182
|
value: d.value
|
|
4129
|
-
}, null, 8, Zi))], 64)) :
|
|
4130
|
-
|
|
4131
|
-
class:
|
|
4132
|
-
style:
|
|
4183
|
+
}, null, 8, Zi))], 64)) : F("", !0),
|
|
4184
|
+
L("div", { class: B(t.$style.track) }, [L("div", {
|
|
4185
|
+
class: B(t.$style.active),
|
|
4186
|
+
style: V(h.value)
|
|
4133
4187
|
}, null, 6)], 2),
|
|
4134
|
-
|
|
4188
|
+
L("div", {
|
|
4135
4189
|
ref: "pointerEl1",
|
|
4136
|
-
class:
|
|
4137
|
-
onPointerdown: n[0] ||= (e) =>
|
|
4190
|
+
class: B([t.$style.pointerWrapper, t.$style.pointer1]),
|
|
4191
|
+
onPointerdown: n[0] ||= (e) => w(e, 1),
|
|
4138
4192
|
onClick: n[1] ||= Q(() => {}, ["stop", "prevent"]),
|
|
4139
|
-
onDragstart:
|
|
4140
|
-
onMouseenter: n[2] ||= (e) =>
|
|
4141
|
-
onMouseleave: n[3] ||= (e) =>
|
|
4142
|
-
}, [
|
|
4193
|
+
onDragstart: C,
|
|
4194
|
+
onMouseenter: n[2] ||= (e) => x(1),
|
|
4195
|
+
onMouseleave: n[3] ||= (e) => S(1)
|
|
4196
|
+
}, [R(ki, {
|
|
4143
4197
|
"model-value": u.value[1],
|
|
4144
|
-
content:
|
|
4198
|
+
content: v.value,
|
|
4145
4199
|
trigger: "manual",
|
|
4146
|
-
placement: "top
|
|
4200
|
+
placement: "top",
|
|
4147
4201
|
"position-strategy": "absolute",
|
|
4148
4202
|
color: e.labelColor,
|
|
4149
4203
|
"text-color": e.labelTextColor,
|
|
4150
4204
|
disabled: e.labelVisible === "never"
|
|
4151
4205
|
}, {
|
|
4152
|
-
default: X(() => [
|
|
4206
|
+
default: X(() => [L("div", { class: B([t.$style.pointer, f.value === 1 && t.$style.selected]) }, null, 2)]),
|
|
4153
4207
|
_: 1
|
|
4154
4208
|
}, 8, [
|
|
4155
4209
|
"model-value",
|
|
@@ -4158,26 +4212,26 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4158
4212
|
"text-color",
|
|
4159
4213
|
"disabled"
|
|
4160
4214
|
])], 34),
|
|
4161
|
-
e.range ? (U(),
|
|
4215
|
+
e.range ? (U(), I("div", {
|
|
4162
4216
|
key: 1,
|
|
4163
4217
|
ref: "pointerEl2",
|
|
4164
|
-
class:
|
|
4165
|
-
onPointerdown: n[4] ||= (e) =>
|
|
4218
|
+
class: B([t.$style.pointerWrapper, t.$style.pointer2]),
|
|
4219
|
+
onPointerdown: n[4] ||= (e) => w(e, 2),
|
|
4166
4220
|
onClick: n[5] ||= Q(() => {}, ["stop", "prevent"]),
|
|
4167
|
-
onDragstart:
|
|
4168
|
-
onMouseenter: n[6] ||= (e) =>
|
|
4169
|
-
onMouseleave: n[7] ||= (e) =>
|
|
4170
|
-
}, [
|
|
4221
|
+
onDragstart: C,
|
|
4222
|
+
onMouseenter: n[6] ||= (e) => x(2),
|
|
4223
|
+
onMouseleave: n[7] ||= (e) => S(2)
|
|
4224
|
+
}, [R(ki, {
|
|
4171
4225
|
"model-value": u.value[2],
|
|
4172
|
-
content:
|
|
4226
|
+
content: y.value,
|
|
4173
4227
|
trigger: "manual",
|
|
4174
|
-
placement: "top
|
|
4228
|
+
placement: "top",
|
|
4175
4229
|
"position-strategy": "absolute",
|
|
4176
4230
|
color: e.labelColor,
|
|
4177
4231
|
"text-color": e.labelTextColor,
|
|
4178
4232
|
disabled: e.labelVisible === "never"
|
|
4179
4233
|
}, {
|
|
4180
|
-
default: X(() => [
|
|
4234
|
+
default: X(() => [L("div", { class: B([t.$style.pointer, f.value === 2 && t.$style.selected]) }, null, 2)]),
|
|
4181
4235
|
_: 1
|
|
4182
4236
|
}, 8, [
|
|
4183
4237
|
"model-value",
|
|
@@ -4185,20 +4239,20 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4185
4239
|
"color",
|
|
4186
4240
|
"text-color",
|
|
4187
4241
|
"disabled"
|
|
4188
|
-
])], 34)) :
|
|
4242
|
+
])], 34)) : F("", !0)
|
|
4189
4243
|
], 14, Ji));
|
|
4190
4244
|
}
|
|
4191
4245
|
}), [["__cssModules", { $style: {
|
|
4192
|
-
ui3nSlider: "
|
|
4193
|
-
disabled: "
|
|
4194
|
-
track: "
|
|
4195
|
-
active: "
|
|
4196
|
-
pointerWrapper: "
|
|
4197
|
-
pointer: "
|
|
4198
|
-
selected: "
|
|
4199
|
-
pointer1: "
|
|
4200
|
-
pointer2: "
|
|
4201
|
-
} }]]), $i = ["id"], ea = ["name", "value"], ta = ["id", "onClick"],
|
|
4246
|
+
ui3nSlider: "_ui3nSlider_17be6_1",
|
|
4247
|
+
disabled: "_disabled_17be6_9",
|
|
4248
|
+
track: "_track_17be6_14",
|
|
4249
|
+
active: "_active_17be6_23",
|
|
4250
|
+
pointerWrapper: "_pointerWrapper_17be6_30",
|
|
4251
|
+
pointer: "_pointer_17be6_30",
|
|
4252
|
+
selected: "_selected_17be6_55",
|
|
4253
|
+
pointer1: "_pointer1_17be6_69",
|
|
4254
|
+
pointer2: "_pointer2_17be6_73"
|
|
4255
|
+
} }]]), $i = ["id"], ea = ["name", "value"], ta = ["tabindex"], na = ["id", "onClick"], ra = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
4202
4256
|
__name: "ui3n-selector",
|
|
4203
4257
|
props: {
|
|
4204
4258
|
id: {},
|
|
@@ -4209,7 +4263,6 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4209
4263
|
items: { default: () => [] },
|
|
4210
4264
|
itemValue: { default: "id" },
|
|
4211
4265
|
itemDisplay: {},
|
|
4212
|
-
customFilter: {},
|
|
4213
4266
|
returnObject: {
|
|
4214
4267
|
type: Boolean,
|
|
4215
4268
|
default: !1
|
|
@@ -4218,66 +4271,59 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4218
4271
|
type: Boolean,
|
|
4219
4272
|
default: !1
|
|
4220
4273
|
},
|
|
4221
|
-
withSearch: {
|
|
4222
|
-
type: Boolean,
|
|
4223
|
-
default: !1
|
|
4224
|
-
},
|
|
4225
4274
|
hideSelected: { type: Boolean },
|
|
4226
4275
|
noDataText: { default: "" },
|
|
4227
4276
|
disabled: { type: Boolean }
|
|
4228
4277
|
},
|
|
4229
4278
|
setup(e, { expose: n, emit: r }) {
|
|
4230
|
-
let i = e, a = r, o = `select-${t(4)}`, s = Ce("activator"), c = Ce("body"), l = W(!1), u = W(!1), d = W(null), f =
|
|
4279
|
+
let i = e, a = r, o = `select-${t(4)}`, s = Ce("activator"), c = Ce("body"), l = W(!1), u = W(!1), d = W(null), f = N(() => i.items.filter((e) => i.hideSelected ? i.returnObject ? i.modelValue.id !== e.id : i.modelValue !== e[i.itemValue] : !0)), p = N(() => {
|
|
4231
4280
|
if (!i.modelValue) return "";
|
|
4232
4281
|
if (i.returnObject && typeof i.modelValue == "object") {
|
|
4233
4282
|
let e = i.items.find((e) => e.id === i.modelValue.id);
|
|
4234
|
-
return e ?
|
|
4283
|
+
return e ? m(e) : JSON.stringify(i.modelValue);
|
|
4235
4284
|
}
|
|
4236
4285
|
if (i.returnObject && typeof i.returnObject != "object") return JSON.stringify(i.modelValue);
|
|
4237
4286
|
let e = i.items.find((e) => e[i.itemValue] === i.modelValue);
|
|
4238
|
-
return e ?
|
|
4287
|
+
return e ? m(e) : i.modelValue;
|
|
4239
4288
|
});
|
|
4240
|
-
function
|
|
4241
|
-
if (!e) return "";
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
let n = (i.itemDisplay && typeof i.itemDisplay == "function" ? i.itemDisplay(e) : i.itemDisplay ? e[i.itemDisplay] : e.id).toString();
|
|
4247
|
-
return t ? n.toLowerCase() : n;
|
|
4289
|
+
function m(e, t) {
|
|
4290
|
+
if (!e || typeof e != "object") return "";
|
|
4291
|
+
let n = i.itemDisplay && typeof i.itemDisplay == "function" ? i.itemDisplay(e) : i.itemDisplay ? e[i.itemDisplay] : e.id;
|
|
4292
|
+
if (n == null) return "";
|
|
4293
|
+
let r = String(n);
|
|
4294
|
+
return t ? r.toLowerCase() : r;
|
|
4248
4295
|
}
|
|
4249
|
-
function
|
|
4296
|
+
function h() {
|
|
4250
4297
|
u.value = !0, a("focus");
|
|
4251
4298
|
}
|
|
4252
|
-
function
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
}, 100);
|
|
4299
|
+
function g(e) {
|
|
4300
|
+
let t = e.relatedTarget;
|
|
4301
|
+
s.value?.contains(t) || c.value?.contains(t) || (u.value = !1, a("blur"));
|
|
4256
4302
|
}
|
|
4257
|
-
function
|
|
4258
|
-
i.disabled || (a("update:modelValue", i.returnObject ? e : e[i.itemValue]),
|
|
4303
|
+
function _(e) {
|
|
4304
|
+
i.disabled || (a("update:modelValue", i.returnObject ? e : e[i.itemValue]), l.value = !1);
|
|
4259
4305
|
}
|
|
4260
|
-
function
|
|
4261
|
-
a("update:modelValue", null), l.value = !1, d.value = null
|
|
4306
|
+
function v() {
|
|
4307
|
+
a("update:modelValue", null), l.value = !1, d.value = null;
|
|
4262
4308
|
}
|
|
4263
|
-
function
|
|
4309
|
+
function y() {
|
|
4264
4310
|
if (d.value === null) {
|
|
4265
4311
|
d.value = 0, c.value && c.value.focus();
|
|
4266
4312
|
return;
|
|
4267
4313
|
}
|
|
4268
|
-
d.value >= 0 && d.value < (0, $.default)(
|
|
4314
|
+
d.value >= 0 && d.value < (0, $.default)(f.value) - 1 && (d.value += 1);
|
|
4269
4315
|
}
|
|
4270
|
-
function
|
|
4316
|
+
function b() {
|
|
4271
4317
|
if (d.value === null) {
|
|
4272
|
-
d.value = (0, $.default)(
|
|
4318
|
+
d.value = (0, $.default)(f.value) - 1, c.value && c.value.focus();
|
|
4273
4319
|
return;
|
|
4274
4320
|
}
|
|
4275
|
-
d.value > 0 && d.value < (0, $.default)(
|
|
4321
|
+
d.value > 0 && d.value < (0, $.default)(f.value) && --d.value;
|
|
4276
4322
|
}
|
|
4277
|
-
function
|
|
4278
|
-
a("blur"), l.value = !1, c.value
|
|
4323
|
+
function x() {
|
|
4324
|
+
a("blur"), l.value = !1, c.value?.blur(), s.value && s.value.blur();
|
|
4279
4325
|
}
|
|
4280
|
-
function
|
|
4326
|
+
function S() {
|
|
4281
4327
|
if (d.value === null && !l.value) {
|
|
4282
4328
|
l.value = !0, c.value && c.value.focus();
|
|
4283
4329
|
return;
|
|
@@ -4287,112 +4333,121 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4287
4333
|
return;
|
|
4288
4334
|
}
|
|
4289
4335
|
if (d.value !== null) {
|
|
4290
|
-
let e =
|
|
4291
|
-
|
|
4336
|
+
let e = f.value[d.value];
|
|
4337
|
+
_(e), d.value = null;
|
|
4292
4338
|
}
|
|
4293
4339
|
}
|
|
4294
|
-
function
|
|
4340
|
+
function C(e, t) {
|
|
4295
4341
|
switch (t) {
|
|
4296
4342
|
case "down":
|
|
4297
|
-
e.preventDefault(), e.stopPropagation(),
|
|
4343
|
+
e.preventDefault(), e.stopPropagation(), y();
|
|
4298
4344
|
break;
|
|
4299
4345
|
case "up":
|
|
4300
|
-
e.preventDefault(), e.stopPropagation(),
|
|
4346
|
+
e.preventDefault(), e.stopPropagation(), b();
|
|
4301
4347
|
break;
|
|
4302
4348
|
case "esc":
|
|
4303
4349
|
case "tab":
|
|
4304
|
-
|
|
4350
|
+
x();
|
|
4305
4351
|
break;
|
|
4306
4352
|
case "enter":
|
|
4307
|
-
e.preventDefault(), e.stopPropagation(),
|
|
4353
|
+
e.preventDefault(), e.stopPropagation(), S();
|
|
4308
4354
|
break;
|
|
4309
4355
|
}
|
|
4310
4356
|
}
|
|
4311
|
-
function
|
|
4312
|
-
|
|
4357
|
+
function w() {
|
|
4358
|
+
v();
|
|
4313
4359
|
}
|
|
4314
|
-
return n({ clear:
|
|
4315
|
-
e ||
|
|
4360
|
+
return n({ clear: w }), Y(() => i.name, (e) => {
|
|
4361
|
+
e || w();
|
|
4316
4362
|
}), Y(() => l.value, (e, t) => {
|
|
4317
4363
|
if (e !== t && e) {
|
|
4364
|
+
if (s.value) {
|
|
4365
|
+
let e = s.value.getBoundingClientRect();
|
|
4366
|
+
s.value.style.setProperty("--ui3n-selector-width", `${e.width}px`);
|
|
4367
|
+
}
|
|
4318
4368
|
if (i.modelValue) {
|
|
4319
|
-
let e =
|
|
4369
|
+
let e = f.value.findIndex((e) => typeof i.modelValue == "object" ? e.id === i.modelValue.id : e[i.itemValue] === i.modelValue);
|
|
4320
4370
|
d.value = e >= 0 ? e : 0;
|
|
4321
4371
|
}
|
|
4322
4372
|
a("list:open");
|
|
4323
|
-
} else e !== t && !e && (d.value = null,
|
|
4324
|
-
}), (t, n) => (U(),
|
|
4373
|
+
} else e !== t && !e && (d.value = null, a("list:close"));
|
|
4374
|
+
}), (t, n) => (U(), I("div", {
|
|
4325
4375
|
id: e.id,
|
|
4326
|
-
class:
|
|
4376
|
+
class: B(t.$style.ui3nSelector)
|
|
4327
4377
|
}, [
|
|
4328
|
-
e.name && e.modelValue ? (U(),
|
|
4378
|
+
e.name && e.modelValue ? (U(), I("input", {
|
|
4329
4379
|
key: 0,
|
|
4330
4380
|
type: "hidden",
|
|
4331
4381
|
name: e.name,
|
|
4332
4382
|
value: typeof e.modelValue == "object" ? JSON.stringify(e.modelValue) : String(e.modelValue)
|
|
4333
|
-
}, null, 8, ea)) :
|
|
4334
|
-
e.label ? (U(),
|
|
4383
|
+
}, null, 8, ea)) : F("", !0),
|
|
4384
|
+
e.label ? (U(), I("label", {
|
|
4335
4385
|
key: 1,
|
|
4336
|
-
class:
|
|
4337
|
-
}, q(e.label), 3)) :
|
|
4338
|
-
|
|
4386
|
+
class: B(t.$style.label)
|
|
4387
|
+
}, q(e.label), 3)) : F("", !0),
|
|
4388
|
+
R(ti, {
|
|
4339
4389
|
modelValue: l.value,
|
|
4340
|
-
"onUpdate:modelValue": n[
|
|
4390
|
+
"onUpdate:modelValue": n[6] ||= (e) => l.value = e,
|
|
4341
4391
|
"offset-x": -3,
|
|
4342
4392
|
"offset-y": 4,
|
|
4343
4393
|
"position-autoupdate": "",
|
|
4344
4394
|
"content-border-radius": 8,
|
|
4345
|
-
"content-styles": {
|
|
4346
|
-
|
|
4347
|
-
|
|
4395
|
+
"content-styles": {
|
|
4396
|
+
width: "100%",
|
|
4397
|
+
minWidth: "var(--ui3n-selector-width, 200px)"
|
|
4398
|
+
},
|
|
4399
|
+
class: B(t.$style.menu),
|
|
4400
|
+
disabled: e.disabled,
|
|
4401
|
+
onClick: n[7] ||= () => {
|
|
4402
|
+
e.disabled || (l.value = !l.value);
|
|
4403
|
+
}
|
|
4348
4404
|
}, {
|
|
4349
|
-
menu: X(() => [!J(
|
|
4405
|
+
menu: X(() => [!J(Wr.default)(f.value) || J(Wr.default)(f.value) && e.noDataText ? (U(), I("div", {
|
|
4350
4406
|
key: 0,
|
|
4351
4407
|
ref: "body",
|
|
4352
|
-
class:
|
|
4353
|
-
}, [J(
|
|
4408
|
+
class: B(t.$style.body)
|
|
4409
|
+
}, [J(Wr.default)(f.value) ? F("", !0) : (U(!0), I(M, { key: 0 }, G(f.value, (n, r) => (U(), I("div", {
|
|
4354
4410
|
key: n.id,
|
|
4355
4411
|
id: `${o}-${r}`,
|
|
4356
|
-
class:
|
|
4412
|
+
class: B([
|
|
4357
4413
|
t.$style.item,
|
|
4358
4414
|
d.value === r && t.$style.itemSelected,
|
|
4359
4415
|
e.disabled && t.$style.itemDisabled
|
|
4360
4416
|
]),
|
|
4361
|
-
onClick: Q((e) =>
|
|
4417
|
+
onClick: Q((e) => _(n), ["stop", "prevent"])
|
|
4362
4418
|
}, [K(t.$slots, "item", {
|
|
4363
4419
|
item: n,
|
|
4364
4420
|
index: r,
|
|
4365
|
-
activeIndex: d.value
|
|
4366
|
-
|
|
4367
|
-
}, () => [ue(q(g(n)), 1)])], 10, ta))), 128)), J(Hr.default)(m.value) && e.noDataText ? (U(), F("div", {
|
|
4421
|
+
activeIndex: d.value
|
|
4422
|
+
}, () => [le(q(m(n)), 1)])], 10, na))), 128)), J(Wr.default)(f.value) && e.noDataText ? (U(), I("div", {
|
|
4368
4423
|
key: 1,
|
|
4369
|
-
class:
|
|
4370
|
-
}, [K(t.$slots, "noDataText", {}, () => [
|
|
4371
|
-
default: X(() => [
|
|
4424
|
+
class: B(t.$style.noData)
|
|
4425
|
+
}, [K(t.$slots, "noDataText", {}, () => [le(q(e.noDataText), 1)])], 2)) : F("", !0)], 2)) : F("", !0)]),
|
|
4426
|
+
default: X(() => [L("div", {
|
|
4372
4427
|
ref: "activator",
|
|
4373
|
-
tabindex:
|
|
4374
|
-
class:
|
|
4428
|
+
tabindex: e.disabled ? -1 : 0,
|
|
4429
|
+
class: B([
|
|
4375
4430
|
t.$style.trigger,
|
|
4376
4431
|
u.value && t.$style.triggerFocused,
|
|
4377
4432
|
e.clearable && e.modelValue && t.$style.clearable,
|
|
4378
4433
|
e.placeholder && !e.modelValue && !e.disabled && t.$style.placeholder,
|
|
4379
4434
|
e.disabled && t.$style.triggerDisabled
|
|
4380
4435
|
]),
|
|
4381
|
-
onFocusin:
|
|
4382
|
-
onFocusout:
|
|
4436
|
+
onFocusin: h,
|
|
4437
|
+
onFocusout: g,
|
|
4383
4438
|
onKeydown: [
|
|
4384
|
-
n[
|
|
4385
|
-
n[
|
|
4386
|
-
n[
|
|
4387
|
-
n[
|
|
4388
|
-
n[
|
|
4439
|
+
n[1] ||= Z((e) => C(e, "down"), ["down"]),
|
|
4440
|
+
n[2] ||= Z((e) => C(e, "up"), ["up"]),
|
|
4441
|
+
n[3] ||= Z((e) => C(e, "esc"), ["esc"]),
|
|
4442
|
+
n[4] ||= Z((e) => C(e, "enter"), ["enter"]),
|
|
4443
|
+
n[5] ||= Z((e) => C(e, "tab"), ["tab"])
|
|
4389
4444
|
]
|
|
4390
4445
|
}, [
|
|
4391
4446
|
K(t.$slots, "selection", {
|
|
4392
4447
|
value: e.modelValue,
|
|
4393
|
-
selectedItem: d.value === null ? void 0 :
|
|
4394
|
-
}, () => [
|
|
4395
|
-
e.clearable && e.modelValue ? (U(),
|
|
4448
|
+
selectedItem: d.value === null ? void 0 : f.value[d.value]
|
|
4449
|
+
}, () => [le(q(p.value || e.placeholder || ""), 1)]),
|
|
4450
|
+
e.clearable && e.modelValue ? (U(), P(O, {
|
|
4396
4451
|
key: 0,
|
|
4397
4452
|
type: "icon",
|
|
4398
4453
|
size: "small",
|
|
@@ -4401,17 +4456,18 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4401
4456
|
"icon-size": "16",
|
|
4402
4457
|
"icon-color": "var(--color-icon-block-primary-default)",
|
|
4403
4458
|
disabled: e.disabled,
|
|
4404
|
-
class:
|
|
4405
|
-
onClick: Q(
|
|
4406
|
-
|
|
4407
|
-
|
|
4459
|
+
class: B(t.$style.clearBtn),
|
|
4460
|
+
onClick: Q(v, ["stop", "prevent"]),
|
|
4461
|
+
onMousedown: n[0] ||= Q(() => {}, ["stop", "prevent"])
|
|
4462
|
+
}, null, 8, ["disabled", "class"])) : F("", !0),
|
|
4463
|
+
R(k, {
|
|
4408
4464
|
icon: "outline-arrow-drop-down",
|
|
4409
4465
|
color: "var(--color-icon-block-primary-default)",
|
|
4410
4466
|
size: "16",
|
|
4411
4467
|
"vertical-flip": l.value,
|
|
4412
|
-
class:
|
|
4468
|
+
class: B(t.$style.menuIcon)
|
|
4413
4469
|
}, null, 8, ["vertical-flip", "class"])
|
|
4414
|
-
],
|
|
4470
|
+
], 42, ta)]),
|
|
4415
4471
|
_: 3
|
|
4416
4472
|
}, 8, [
|
|
4417
4473
|
"modelValue",
|
|
@@ -4421,22 +4477,22 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4421
4477
|
], 10, $i));
|
|
4422
4478
|
}
|
|
4423
4479
|
}), [["__cssModules", { $style: {
|
|
4424
|
-
ui3nSelector: "
|
|
4425
|
-
label: "
|
|
4426
|
-
menu: "
|
|
4427
|
-
trigger: "
|
|
4428
|
-
placeholder: "
|
|
4429
|
-
triggerDisabled: "
|
|
4430
|
-
menuIcon: "
|
|
4431
|
-
clearable: "
|
|
4432
|
-
clearBtn: "
|
|
4433
|
-
triggerFocused: "
|
|
4434
|
-
body: "
|
|
4435
|
-
noData: "
|
|
4436
|
-
item: "
|
|
4437
|
-
itemSelected: "
|
|
4438
|
-
itemDisabled: "
|
|
4439
|
-
} }]]),
|
|
4480
|
+
ui3nSelector: "_ui3nSelector_1fmel_3",
|
|
4481
|
+
label: "_label_1fmel_18",
|
|
4482
|
+
menu: "_menu_1fmel_28",
|
|
4483
|
+
trigger: "_trigger_1fmel_38",
|
|
4484
|
+
placeholder: "_placeholder_1fmel_58",
|
|
4485
|
+
triggerDisabled: "_triggerDisabled_1fmel_62",
|
|
4486
|
+
menuIcon: "_menuIcon_1fmel_68",
|
|
4487
|
+
clearable: "_clearable_1fmel_73",
|
|
4488
|
+
clearBtn: "_clearBtn_1fmel_76",
|
|
4489
|
+
triggerFocused: "_triggerFocused_1fmel_81",
|
|
4490
|
+
body: "_body_1fmel_86",
|
|
4491
|
+
noData: "_noData_1fmel_95",
|
|
4492
|
+
item: "_item_1fmel_107",
|
|
4493
|
+
itemSelected: "_itemSelected_1fmel_121",
|
|
4494
|
+
itemDisabled: "_itemDisabled_1fmel_125"
|
|
4495
|
+
} }]]), ia = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
4440
4496
|
__name: "ui3n-mobile-menu",
|
|
4441
4497
|
props: {
|
|
4442
4498
|
modelValue: { type: Boolean },
|
|
@@ -4445,57 +4501,60 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4445
4501
|
},
|
|
4446
4502
|
emits: ["update:modelValue"],
|
|
4447
4503
|
setup(e, { emit: t }) {
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4504
|
+
let n = e, r = t, i = N(() => ({
|
|
4505
|
+
"--ui3n-menu-width-custom": isNaN(Number(n.width)) ? n.width || "240px" : `${n.width}px`,
|
|
4506
|
+
"--ui3n-menu-blur-custom": n.withBlur ? "2px" : "0"
|
|
4451
4507
|
}));
|
|
4452
|
-
|
|
4453
|
-
function o() {
|
|
4508
|
+
function a() {
|
|
4454
4509
|
r("update:modelValue", !n.modelValue);
|
|
4455
4510
|
}
|
|
4456
|
-
return (t, n) => (U(),
|
|
4511
|
+
return (t, n) => (U(), I("div", {
|
|
4512
|
+
class: B(t.$style.ui3nMobileMenu),
|
|
4513
|
+
style: V(i.value)
|
|
4514
|
+
}, [e.modelValue ? F("", !0) : (U(), P(O, {
|
|
4457
4515
|
key: 0,
|
|
4458
4516
|
type: "icon",
|
|
4459
|
-
class:
|
|
4517
|
+
class: B(t.$style.menuButton),
|
|
4460
4518
|
color: "var(--color-bg-block-primary-default)",
|
|
4461
4519
|
icon: "round-menu",
|
|
4462
4520
|
"icon-color": "var(--color-icon-block-primary-default)",
|
|
4463
4521
|
"icon-size": "32",
|
|
4464
|
-
onClick: Q(
|
|
4465
|
-
}, null, 8, ["class"])),
|
|
4466
|
-
default: X(() => [e.modelValue ? (U(),
|
|
4522
|
+
onClick: Q(a, ["stop", "prevent"])
|
|
4523
|
+
}, null, 8, ["class"])), R(se, { name: "slide-fade" }, {
|
|
4524
|
+
default: X(() => [e.modelValue ? (U(), I("div", {
|
|
4467
4525
|
key: 0,
|
|
4468
|
-
class:
|
|
4469
|
-
}, [
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
L(
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4526
|
+
class: B(t.$style.menuWrapper)
|
|
4527
|
+
}, [L("div", {
|
|
4528
|
+
class: B(t.$style.overlay),
|
|
4529
|
+
onClick: a
|
|
4530
|
+
}, null, 2), L("div", { class: B(t.$style.menuPanel) }, [L("div", { class: B(t.$style.appMenu) }, [
|
|
4531
|
+
L("div", { class: B(t.$style.appMenuHeader) }, [K(t.$slots, "header")], 2),
|
|
4532
|
+
L("div", { class: B(t.$style.appMenuBody) }, [K(t.$slots, "menuBody")], 2),
|
|
4533
|
+
L("div", { class: B(t.$style.appMenuFooter) }, [K(t.$slots, "footer")], 2)
|
|
4534
|
+
], 2), R(O, {
|
|
4535
|
+
type: "icon",
|
|
4536
|
+
icon: "round-close",
|
|
4537
|
+
color: "transparent",
|
|
4538
|
+
"icon-color": "var(--color-icon-block-secondary-default)",
|
|
4539
|
+
"icon-size": "32",
|
|
4540
|
+
class: B(t.$style.closeBtn),
|
|
4541
|
+
onClick: Q(a, ["stop", "prevent"])
|
|
4542
|
+
}, null, 8, ["class"])], 2)], 2)) : F("", !0)]),
|
|
4483
4543
|
_: 3
|
|
4484
|
-
})],
|
|
4485
|
-
key: 0,
|
|
4486
|
-
class: z(t.$style.overlay)
|
|
4487
|
-
}, null, 2)) : P("", !0)], 64));
|
|
4544
|
+
})], 6));
|
|
4488
4545
|
}
|
|
4489
4546
|
}), [["__cssModules", { $style: {
|
|
4490
|
-
ui3nMobileMenu: "
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4547
|
+
ui3nMobileMenu: "_ui3nMobileMenu_1991k_3",
|
|
4548
|
+
menuWrapper: "_menuWrapper_1991k_9",
|
|
4549
|
+
menuPanel: "_menuPanel_1991k_18",
|
|
4550
|
+
appMenu: "_appMenu_1991k_28",
|
|
4551
|
+
appMenuHeader: "_appMenuHeader_1991k_47",
|
|
4552
|
+
appMenuBody: "_appMenuBody_1991k_52",
|
|
4553
|
+
appMenuFooter: "_appMenuFooter_1991k_60",
|
|
4554
|
+
menuButton: "_menuButton_1991k_65",
|
|
4555
|
+
closeBtn: "_closeBtn_1991k_70",
|
|
4556
|
+
overlay: "_overlay_1991k_78"
|
|
4557
|
+
} }]]), aa = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
4499
4558
|
__name: "ui3n-mobile-menu-item",
|
|
4500
4559
|
props: {
|
|
4501
4560
|
item: {},
|
|
@@ -4507,25 +4566,25 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4507
4566
|
async function i() {
|
|
4508
4567
|
r("selectItem", n.item);
|
|
4509
4568
|
}
|
|
4510
|
-
return (t, n) => (U(),
|
|
4511
|
-
class:
|
|
4569
|
+
return (t, n) => (U(), I("div", {
|
|
4570
|
+
class: B([t.$style.menuItem, e.isActive && t.$style.menuItemSelected]),
|
|
4512
4571
|
onClick: i
|
|
4513
|
-
}, [e.item.icon ? (U(),
|
|
4572
|
+
}, [e.item.icon ? (U(), P(k, {
|
|
4514
4573
|
key: 0,
|
|
4515
4574
|
icon: e.item.icon,
|
|
4516
4575
|
size: "20",
|
|
4517
4576
|
color: "var(--color-icon-control-secondary-default)"
|
|
4518
|
-
}, null, 8, ["icon"])) :
|
|
4577
|
+
}, null, 8, ["icon"])) : F("", !0), L("span", { class: B(t.$style.menuItemName) }, q(e.item.name), 3)], 2));
|
|
4519
4578
|
}
|
|
4520
4579
|
}), [["__cssModules", { $style: {
|
|
4521
4580
|
menuItem: "_menuItem_5dv4z_4",
|
|
4522
4581
|
menuItemName: "_menuItemName_5dv4z_15",
|
|
4523
4582
|
menuItemSelected: "_menuItemSelected_5dv4z_21",
|
|
4524
4583
|
bounceOnce: "_bounceOnce_5dv4z_1"
|
|
4525
|
-
} }]]),
|
|
4526
|
-
__name: "ui3n-
|
|
4584
|
+
} }]]), oa = 32, sa = /* @__PURE__ */ D(/* @__PURE__ */ z({
|
|
4585
|
+
__name: "ui3n-scrollbar-horizontal",
|
|
4527
4586
|
props: {
|
|
4528
|
-
thumbMinWidth: { default:
|
|
4587
|
+
thumbMinWidth: { default: oa },
|
|
4529
4588
|
thumbWidth: { default: "auto" },
|
|
4530
4589
|
thumbRadius: { default: 4 },
|
|
4531
4590
|
thumbColor: { default: "var(--color-bg-control-accent-default)" },
|
|
@@ -4537,10 +4596,10 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4537
4596
|
},
|
|
4538
4597
|
emits: ["scroll"],
|
|
4539
4598
|
setup(e, { expose: t, emit: n }) {
|
|
4540
|
-
let r = e, i = n, a = W(null), o = W(null), s = W(null), c = W(0), l = W(0), u = W(0), d = W(!1), f = W(!1), p = W(!1), m = null, h, g = 0, _ = 0, v =
|
|
4599
|
+
let r = e, i = n, a = W(null), o = W(null), s = W(null), c = W(0), l = W(0), u = W(0), d = W(!1), f = W(!1), p = W(!1), m = null, h, g = 0, _ = 0, v = N(() => c.value > l.value), y = N(() => d.value ? !0 : v.value && (f.value || p.value)), b = N(() => {
|
|
4541
4600
|
let e = Number(r.thumbMinWidth);
|
|
4542
|
-
return isNaN(e) ?
|
|
4543
|
-
}), x =
|
|
4601
|
+
return isNaN(e) ? oa : e;
|
|
4602
|
+
}), x = N(() => {
|
|
4544
4603
|
if (!c.value) return 0;
|
|
4545
4604
|
if (r.thumbWidth !== "auto") {
|
|
4546
4605
|
let e = Number(r.thumbWidth);
|
|
@@ -4548,29 +4607,29 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4548
4607
|
}
|
|
4549
4608
|
let e = l.value / c.value, t = l.value * e;
|
|
4550
4609
|
return Math.max(b.value, t);
|
|
4551
|
-
}), S =
|
|
4610
|
+
}), S = N(() => {
|
|
4552
4611
|
if (!c.value || c.value === l.value) return 0;
|
|
4553
4612
|
let e = c.value - l.value, t = l.value - x.value;
|
|
4554
4613
|
return u.value / e * t;
|
|
4555
|
-
}), C =
|
|
4614
|
+
}), C = N(() => {
|
|
4556
4615
|
let e = Number(r.thumbRadius);
|
|
4557
4616
|
return isNaN(e) ? String(r.thumbRadius) : `${e}px`;
|
|
4558
|
-
}), w =
|
|
4617
|
+
}), w = N(() => r.thumbColor), T = N(() => r.thumbHoverColor), ee = N(() => r.thumbActiveColor), E = N(() => {
|
|
4559
4618
|
let e = Number(r.trackHeight);
|
|
4560
4619
|
return isNaN(e) ? String(r.trackHeight) : `${e}px`;
|
|
4561
|
-
}), te =
|
|
4620
|
+
}), te = N(() => {
|
|
4562
4621
|
let e = Number(r.trackRadius);
|
|
4563
4622
|
return isNaN(e) ? String(r.trackRadius) : `${e}px`;
|
|
4564
|
-
}), D =
|
|
4623
|
+
}), D = N(() => r.trackColor);
|
|
4565
4624
|
function O() {
|
|
4566
4625
|
a.value && (c.value = a.value.scrollWidth, l.value = a.value.clientWidth, u.value = a.value.scrollLeft);
|
|
4567
4626
|
}
|
|
4568
|
-
function
|
|
4569
|
-
d.value || (u.value = e.target.scrollLeft), p.value = !0,
|
|
4627
|
+
function k(e) {
|
|
4628
|
+
d.value || (u.value = e.target.scrollLeft), p.value = !0, clearTimeout(h), h = setTimeout(() => {
|
|
4570
4629
|
p.value = !1;
|
|
4571
4630
|
}, 1500), i("scroll", e);
|
|
4572
4631
|
}
|
|
4573
|
-
function
|
|
4632
|
+
function A(e) {
|
|
4574
4633
|
if (e.target !== o.value || !a.value || !o.value) return;
|
|
4575
4634
|
let t = o.value.getBoundingClientRect(), n = e.clientX - t.left - x.value / 2, r = c.value - l.value, i = n / (l.value - x.value) * r;
|
|
4576
4635
|
i = Math.max(0, Math.min(r, i)), a.value.scrollTo({
|
|
@@ -4578,34 +4637,34 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4578
4637
|
behavior: "smooth"
|
|
4579
4638
|
});
|
|
4580
4639
|
}
|
|
4581
|
-
function
|
|
4582
|
-
!s.value || !a.value || (e.preventDefault(), e.stopPropagation(), s.value.setPointerCapture(e.pointerId), d.value = !0, g = e.clientX, _ = u.value, document.body.style.userSelect = "none", s.value.addEventListener("pointermove",
|
|
4640
|
+
function ne(e) {
|
|
4641
|
+
!s.value || !a.value || (e.preventDefault(), e.stopPropagation(), s.value.setPointerCapture(e.pointerId), d.value = !0, g = e.clientX, _ = u.value, document.body.style.userSelect = "none", s.value.addEventListener("pointermove", re), s.value.addEventListener("pointerup", j), s.value.addEventListener("pointercancel", j));
|
|
4583
4642
|
}
|
|
4584
|
-
function
|
|
4643
|
+
function re(e) {
|
|
4585
4644
|
if (!d.value || !a.value) return;
|
|
4586
4645
|
let t = e.clientX - g, n = c.value - l.value, r = t / (l.value - x.value) * n;
|
|
4587
4646
|
a.value.scrollLeft = _ + r, u.value = a.value.scrollLeft;
|
|
4588
4647
|
}
|
|
4589
|
-
function
|
|
4648
|
+
function j(e) {
|
|
4590
4649
|
if (d.value && (d.value = !1, document.body.style.userSelect = "", s.value)) {
|
|
4591
4650
|
try {
|
|
4592
4651
|
s.value.releasePointerCapture(e.pointerId);
|
|
4593
4652
|
} catch {}
|
|
4594
|
-
s.value.removeEventListener("pointermove",
|
|
4653
|
+
s.value.removeEventListener("pointermove", re), s.value.removeEventListener("pointerup", j), s.value.removeEventListener("pointercancel", j);
|
|
4595
4654
|
}
|
|
4596
4655
|
}
|
|
4597
4656
|
return H(() => {
|
|
4598
4657
|
O(), a.value && (m = new ResizeObserver(O), m.observe(a.value), a.value.firstElementChild && m.observe(a.value.firstElementChild));
|
|
4599
|
-
}),
|
|
4600
|
-
m?.disconnect(),
|
|
4658
|
+
}), me(() => {
|
|
4659
|
+
m?.disconnect(), h && clearTimeout(h), s.value && (s.value.removeEventListener("pointermove", re), s.value.removeEventListener("pointerup", j), s.value.removeEventListener("pointercancel", j)), document.body.style.userSelect = "";
|
|
4601
4660
|
}), t({
|
|
4602
4661
|
scrollTo: (e) => {
|
|
4603
4662
|
a.value?.scrollTo(e);
|
|
4604
4663
|
},
|
|
4605
4664
|
getContainer: () => a.value
|
|
4606
|
-
}), (e, t) => (U(),
|
|
4607
|
-
class:
|
|
4608
|
-
style:
|
|
4665
|
+
}), (e, t) => (U(), I("div", {
|
|
4666
|
+
class: B(e.$style.ui3nScrollbarHorizontal),
|
|
4667
|
+
style: V({
|
|
4609
4668
|
"--ui3n-scrollbar-horizontal-thumb-radius": C.value,
|
|
4610
4669
|
"--ui3n-scrollbar-horizontal-thumb-color": w.value,
|
|
4611
4670
|
"--ui3n-scrollbar-horizontal-thumb-hover-color": T.value,
|
|
@@ -4616,38 +4675,38 @@ var Yr = ["id"], Xr = /* @__PURE__ */ D(/* @__PURE__ */ R({
|
|
|
4616
4675
|
}),
|
|
4617
4676
|
onMouseenter: t[0] ||= (e) => f.value = !0,
|
|
4618
4677
|
onMouseleave: t[1] ||= (e) => f.value = !1
|
|
4619
|
-
}, [
|
|
4678
|
+
}, [L("div", {
|
|
4620
4679
|
ref_key: "containerRef",
|
|
4621
4680
|
ref: a,
|
|
4622
|
-
class:
|
|
4623
|
-
onScroll:
|
|
4624
|
-
}, [K(e.$slots, "default")], 34),
|
|
4681
|
+
class: B(e.$style.scrollbarContainer),
|
|
4682
|
+
onScroll: k
|
|
4683
|
+
}, [K(e.$slots, "default")], 34), L("div", {
|
|
4625
4684
|
ref_key: "trackRef",
|
|
4626
4685
|
ref: o,
|
|
4627
|
-
class:
|
|
4628
|
-
onMousedown:
|
|
4629
|
-
}, [
|
|
4686
|
+
class: B([e.$style.track, { [e.$style.trackVisible]: y.value }]),
|
|
4687
|
+
onMousedown: A
|
|
4688
|
+
}, [L("div", {
|
|
4630
4689
|
ref_key: "thumbRef",
|
|
4631
4690
|
ref: s,
|
|
4632
|
-
class:
|
|
4633
|
-
style:
|
|
4691
|
+
class: B([e.$style.thumb, { [e.$style.active]: d.value }]),
|
|
4692
|
+
style: V({
|
|
4634
4693
|
width: `${x.value}px`,
|
|
4635
4694
|
transform: `translateX(${S.value}px)`
|
|
4636
4695
|
}),
|
|
4637
|
-
onPointerdown:
|
|
4696
|
+
onPointerdown: ne
|
|
4638
4697
|
}, null, 38)], 34)], 38));
|
|
4639
4698
|
}
|
|
4640
4699
|
}), [["__cssModules", { $style: {
|
|
4641
|
-
ui3nScrollbarHorizontal: "
|
|
4642
|
-
scrollbarContainer: "
|
|
4643
|
-
track: "
|
|
4644
|
-
trackVisible: "
|
|
4645
|
-
thumb: "
|
|
4646
|
-
active: "
|
|
4700
|
+
ui3nScrollbarHorizontal: "_ui3nScrollbarHorizontal_1rgwl_1",
|
|
4701
|
+
scrollbarContainer: "_scrollbarContainer_1rgwl_7",
|
|
4702
|
+
track: "_track_1rgwl_20",
|
|
4703
|
+
trackVisible: "_trackVisible_1rgwl_35",
|
|
4704
|
+
thumb: "_thumb_1rgwl_41",
|
|
4705
|
+
active: "_active_1rgwl_54"
|
|
4647
4706
|
} }]]);
|
|
4648
4707
|
//#endregion
|
|
4649
4708
|
//#region src/composables/useDblClickHandler.ts
|
|
4650
|
-
function
|
|
4709
|
+
function ca(e, t, n = 250) {
|
|
4651
4710
|
let r = 0, i = null;
|
|
4652
4711
|
function a(a) {
|
|
4653
4712
|
r++, i && clearTimeout(i), i = setTimeout(() => {
|
|
@@ -4657,4 +4716,4 @@ function sa(e, t, n = 250) {
|
|
|
4657
4716
|
return { handleDblClick: a };
|
|
4658
4717
|
}
|
|
4659
4718
|
//#endregion
|
|
4660
|
-
export { qi as Ui3nAutocomplete,
|
|
4719
|
+
export { qi as Ui3nAutocomplete, fi as Ui3nBadge, mi as Ui3nBreadcrumb, hi as Ui3nBreadcrumbs, O as Ui3nButton, zr as Ui3nCheckbox, er as Ui3nChip, On as Ui3nClickOutside, $r as Ui3nDialog, Xr as Ui3nDialogProvider, rr as Ui3nDropFiles, Vi as Ui3nEditable, ir as Ui3nEmoji, En as Ui3nHtml, k as Ui3nIcon, sr as Ui3nInput, Ar as Ui3nInputFile, ii as Ui3nList, Qn as Ui3nLongPress, ti as Ui3nMenu, ia as Ui3nMobileMenu, aa as Ui3nMobileMenuItem, A as Ui3nNotification, Di as Ui3nProgressCircular, Ci as Ui3nProgressLinear, Pi as Ui3nRadio, Fi as Ui3nRadioGroup, Fn as Ui3nResize, te as Ui3nRipple, sa as Ui3nScrollbarHorizontal, oi as Ui3nScrollbarVertical, ra as Ui3nSelector, Qi as Ui3nSlider, bi as Ui3nStepLineBar, vi as Ui3nSwitch, Jr as Ui3nTable, Br as Ui3nTableSortIcon, li as Ui3nTabs, Nr as Ui3nText, Gn as Ui3nTitle, ki as Ui3nTooltip, si as Ui3nVirtualScroll, ca as useDblClickHandler };
|