@s_and_a/arrow-ui 0.2.19 → 0.2.20
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/{contracts-CNHPsiUm.js → contracts-Drc2u5Qs.js} +1 -1
- package/dist/{design-C6P8YHfl.js → design-BaOaEVll.js} +1 -1
- package/dist/design.js +2 -2
- package/dist/index.js +62 -50
- package/dist/{requirements-C_hrn0cj.js → requirements-CAlEZ66c.js} +1 -1
- package/dist/requirements.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/ArTreeSelect.contract.d.ts +1 -1
- package/dist/types/contracts.d.ts +1 -1
- package/package.json +1 -1
package/dist/design.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as e, t } from "./design-
|
|
2
|
-
import { a as n, i as r, n as i, r as a } from "./contracts-
|
|
1
|
+
import { n as e, t } from "./design-BaOaEVll.js";
|
|
2
|
+
import { a as n, i as r, n as i, r as a } from "./contracts-Drc2u5Qs.js";
|
|
3
3
|
export { t as ArDesignError, i as componentNames, a as contracts, e as defineDesign, r as designedComponents, n as structuralComponents };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "./contracts-
|
|
2
|
-
import { n as a, t as o } from "./design-
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./contracts-Drc2u5Qs.js";
|
|
2
|
+
import { n as a, t as o } from "./design-BaOaEVll.js";
|
|
3
3
|
import { F as s, dn as c, fn as l, hn as u, mn as d, pn as f, z as p } from "./product-Dz4uZzyu.js";
|
|
4
|
-
import { r as m, t as h } from "./requirements-
|
|
4
|
+
import { r as m, t as h } from "./requirements-CAlEZ66c.js";
|
|
5
5
|
import { cssVar as g, paletteNames as _, paletteSlots as v, toDeclarations as y, tokenNames as b } from "@s_and_a/arrow-ui-tokens";
|
|
6
6
|
import { Comment as x, Fragment as S, Teleport as C, Text as w, Transition as T, TransitionGroup as E, cloneVNode as D, computed as O, createBlock as k, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createSlots as N, createStaticVNode as P, createTextVNode as F, createVNode as I, defineComponent as L, getCurrentInstance as R, guardReactiveProps as z, h as ee, inject as B, isVNode as te, markRaw as ne, mergeProps as re, nextTick as V, normalizeClass as ie, normalizeProps as ae, normalizeStyle as H, onBeforeUnmount as oe, onMounted as se, onUpdated as ce, openBlock as U, provide as le, reactive as ue, ref as W, render as de, renderList as G, renderSlot as K, resolveComponent as fe, resolveDynamicComponent as q, shallowReactive as pe, shallowRef as me, toDisplayString as J, toRef as he, unref as Y, useAttrs as ge, useId as _e, useSlots as ve, vModelText as ye, vShow as be, watch as X, withCtx as Z, withDirectives as xe, withKeys as Se, withModifiers as Q } from "vue";
|
|
7
7
|
// src/icons.ts
|
|
@@ -12192,7 +12192,14 @@ var Ll = [
|
|
|
12192
12192
|
"indeterminate",
|
|
12193
12193
|
"disabled"
|
|
12194
12194
|
])) : A("", !0),
|
|
12195
|
-
M("span", Gd, [(U(!0), j(S, null, G(Y(fr)(t.node.label, p.value), (e, t) => (U(), j(S, { key: t }, [e.match ? (U(), j("mark", Kd, J(e.text), 1)) : (U(), j(S, { key: 1 }, [F(J(e.text), 1)], 64))], 64))), 128))])
|
|
12195
|
+
M("span", Gd, [(U(!0), j(S, null, G(Y(fr)(t.node.label, p.value), (e, t) => (U(), j(S, { key: t }, [e.match ? (U(), j("mark", Kd, J(e.text), 1)) : (U(), j(S, { key: 1 }, [F(J(e.text), 1)], 64))], 64))), 128))]),
|
|
12196
|
+
!e.multiple && v.value.includes(t.node.value) ? (U(), k($, {
|
|
12197
|
+
key: 1,
|
|
12198
|
+
line: "",
|
|
12199
|
+
name: "check",
|
|
12200
|
+
size: "sm",
|
|
12201
|
+
"data-part": "node-check"
|
|
12202
|
+
})) : A("", !0)
|
|
12196
12203
|
], 44, Ud))), 128)), D.value.length ? A("", !0) : (U(), j("div", qd, J(p.value ? `「${p.value}」は見つかりません` : e.emptyText), 1))], 44, Hd),
|
|
12197
12204
|
fe.value || e.actions.length ? (U(), j("div", Jd, [fe.value ? (U(), k(ma, {
|
|
12198
12205
|
key: 0,
|
|
@@ -16425,7 +16432,7 @@ var Lh = {
|
|
|
16425
16432
|
let e = Ne.value;
|
|
16426
16433
|
if (e && _.value.two) {
|
|
16427
16434
|
let t = e.querySelector("thead > tr")?.getBoundingClientRect().height ?? 0;
|
|
16428
|
-
|
|
16435
|
+
wt.value?.style.setProperty("--ar-table-head-top", `${Math.round(t * 100) / 100}px`);
|
|
16429
16436
|
}
|
|
16430
16437
|
if (!e || !Re.value && !ze.value) return;
|
|
16431
16438
|
let t = (t) => e.querySelector(`thead th[data-sticky-key="${t}"]`)?.getBoundingClientRect().width ?? 0, r = {}, i = 0;
|
|
@@ -16531,21 +16538,26 @@ var Lh = {
|
|
|
16531
16538
|
st.value.has(Te(e)) && "selected",
|
|
16532
16539
|
pt(e) && "expanded",
|
|
16533
16540
|
n.rowOff?.(e) && "off",
|
|
16534
|
-
|
|
16541
|
+
Et.value === Te(e) && "dragging",
|
|
16535
16542
|
B.value && be.value === Te(e) && ae(e) > 1 && "hover"
|
|
16536
16543
|
].filter(Boolean).join(" ") || void 0, yt = W(null), bt = W(void 0);
|
|
16537
|
-
function xt() {
|
|
16544
|
+
function xt(e, t) {
|
|
16545
|
+
let n = 0;
|
|
16546
|
+
for (let r = t === "previous" ? e.previousElementSibling : e.nextElementSibling; r; r = t === "previous" ? r.previousElementSibling : r.nextElementSibling) n += r.getBoundingClientRect().width;
|
|
16547
|
+
return n;
|
|
16548
|
+
}
|
|
16549
|
+
function St() {
|
|
16538
16550
|
let e = yt.value;
|
|
16539
16551
|
if (!e) return;
|
|
16540
|
-
let t = e.scrollWidth - e.clientWidth, n = e.scrollLeft > 1,
|
|
16541
|
-
bt.value =
|
|
16552
|
+
let t = e.scrollWidth - e.clientWidth, n = Ne.value?.querySelector("thead"), r = n?.querySelector("th[data-sticky-edge=\"start\"]"), i = n?.querySelector("th[data-sticky-edge=\"end\"]"), a = r ? Math.max(0, xt(r, "previous") - (parseFloat(getComputedStyle(r).left) || 0)) : 0, o = i ? Math.max(0, xt(i, "next") - (parseFloat(getComputedStyle(i).right) || 0)) : 0, s = e.scrollLeft > a + 1, c = t > 1 && e.scrollLeft < t - o - 1;
|
|
16553
|
+
bt.value = s && c ? "both" : s ? "start" : c ? "end" : void 0;
|
|
16542
16554
|
}
|
|
16543
|
-
let
|
|
16555
|
+
let Ct = null;
|
|
16544
16556
|
se(() => {
|
|
16545
|
-
|
|
16546
|
-
}), oe(() =>
|
|
16547
|
-
let
|
|
16548
|
-
function
|
|
16557
|
+
St(), typeof ResizeObserver < "u" && yt.value && (Ct = new ResizeObserver(() => St()), Ct.observe(yt.value));
|
|
16558
|
+
}), oe(() => Ct?.disconnect());
|
|
16559
|
+
let wt = W(null), Tt = W(null), Et = W(null), Dt = W(null), Ot = W("");
|
|
16560
|
+
function kt(e, t, i = !1) {
|
|
16549
16561
|
if (e === t || e < 0 || t < 0 || e >= n.rows.length || t >= n.rows.length) return;
|
|
16550
16562
|
let a = [...n.rows], [o] = a.splice(e, 1);
|
|
16551
16563
|
a.splice(t, 0, o);
|
|
@@ -16554,38 +16566,38 @@ var Lh = {
|
|
|
16554
16566
|
key: s,
|
|
16555
16567
|
from: e,
|
|
16556
16568
|
to: t
|
|
16557
|
-
}),
|
|
16558
|
-
}
|
|
16559
|
-
function kt(e, t) {
|
|
16560
|
-
!e.altKey || e.key !== "ArrowUp" && e.key !== "ArrowDown" || (e.preventDefault(), Ot(t, t + (e.key === "ArrowUp" ? -1 : 1), !0));
|
|
16569
|
+
}), Ot.value = we.value.moved.replace("{n}", String(t + 1)), i && V(() => Array.from(wt.value?.querySelectorAll("[data-part=\"drag-handle\"]") ?? []).find((e) => e.dataset.key === String(s))?.focus());
|
|
16561
16570
|
}
|
|
16562
16571
|
function At(e, t) {
|
|
16563
|
-
|
|
16564
|
-
Tt.value = Te(t), e.dataTransfer?.setData("text/plain", String(Te(t))), e.dataTransfer && (e.dataTransfer.effectAllowed = "move");
|
|
16572
|
+
!e.altKey || e.key !== "ArrowUp" && e.key !== "ArrowDown" || (e.preventDefault(), kt(t, t + (e.key === "ArrowUp" ? -1 : 1), !0));
|
|
16565
16573
|
}
|
|
16566
16574
|
function jt(e, t) {
|
|
16567
|
-
if (Tt.value
|
|
16575
|
+
if (w.value || !n.sortableRows || Tt.value !== Te(t)) return e.preventDefault();
|
|
16576
|
+
Et.value = Te(t), e.dataTransfer?.setData("text/plain", String(Te(t))), e.dataTransfer && (e.dataTransfer.effectAllowed = "move");
|
|
16577
|
+
}
|
|
16578
|
+
function Mt(e, t) {
|
|
16579
|
+
if (Et.value === null) return;
|
|
16568
16580
|
e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move");
|
|
16569
16581
|
let n = e.currentTarget.getBoundingClientRect(), r = n.height ? (e.clientY - n.top) / n.height : 1;
|
|
16570
|
-
|
|
16582
|
+
Dt.value = {
|
|
16571
16583
|
key: Te(t),
|
|
16572
16584
|
position: r < .5 ? "before" : "after"
|
|
16573
16585
|
};
|
|
16574
16586
|
}
|
|
16575
|
-
function
|
|
16587
|
+
function Nt(e) {
|
|
16576
16588
|
e.preventDefault();
|
|
16577
|
-
let t =
|
|
16578
|
-
if (
|
|
16589
|
+
let t = Et.value, n = Dt.value;
|
|
16590
|
+
if (Pt(), t === null || !n) return;
|
|
16579
16591
|
let r = ct.value.indexOf(t), i = ct.value.indexOf(n.key) + +(n.position === "after");
|
|
16580
|
-
i > r && --i,
|
|
16592
|
+
i > r && --i, kt(r, i);
|
|
16581
16593
|
}
|
|
16582
|
-
function
|
|
16583
|
-
|
|
16594
|
+
function Pt() {
|
|
16595
|
+
Et.value = null, Dt.value = null, Tt.value = null;
|
|
16584
16596
|
}
|
|
16585
|
-
let
|
|
16597
|
+
let It = O(() => g.value.length + +!!n.selectable + +!!n.expandable + +!!Ae.value + +!!Se.value);
|
|
16586
16598
|
return (t, n) => (U(), j("div", {
|
|
16587
16599
|
ref_key: "rootEl",
|
|
16588
|
-
ref:
|
|
16600
|
+
ref: wt,
|
|
16589
16601
|
"data-ar": "table",
|
|
16590
16602
|
"data-part": "root",
|
|
16591
16603
|
"data-variant": e.variant,
|
|
@@ -16603,7 +16615,7 @@ var Lh = {
|
|
|
16603
16615
|
role: "region",
|
|
16604
16616
|
"aria-label": e.caption,
|
|
16605
16617
|
tabindex: "0",
|
|
16606
|
-
onScrollPassive:
|
|
16618
|
+
onScrollPassive: St
|
|
16607
16619
|
}, [M("table", {
|
|
16608
16620
|
ref_key: "tableEl",
|
|
16609
16621
|
ref: Ne,
|
|
@@ -16785,10 +16797,10 @@ var Lh = {
|
|
|
16785
16797
|
"data-order": gt(e.col),
|
|
16786
16798
|
onClick: (t) => ht(e.col)
|
|
16787
16799
|
}, [M("span", null, J(e.col.title), 1), n[10] ||= P("<svg data-part=\"sort-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path data-dir=\"asc\" data-shape=\"chevron\" d=\"m8 9 4-4 4 4\"></path><path data-dir=\"desc\" data-shape=\"chevron\" d=\"m8 15 4 4 4-4\"></path><path data-dir=\"asc\" data-shape=\"caret\" d=\"M12 2.5 20 11H4Z\"></path><path data-dir=\"desc\" data-shape=\"caret\" d=\"M12 21.5 4 13h16Z\"></path></svg>", 1)], 8, Kg)) : (U(), j(S, { key: 1 }, [F(J(e.col.title), 1)], 64))])], 8, Gg)) : A("", !0)], 64))), 128))])) : A("", !0)], 8, Eg),
|
|
16788
|
-
t.$slots["before-rows"] ? (U(), j("tbody", qg, [M("tr", null, [M("td", { colspan:
|
|
16800
|
+
t.$slots["before-rows"] ? (U(), j("tbody", qg, [M("tr", null, [M("td", { colspan: It.value }, [K(t.$slots, "before-rows")], 8, Jg)])])) : A("", !0),
|
|
16789
16801
|
M("tbody", Yg, [e.rows.length ? A("", !0) : (U(), j("tr", Xg, [M("td", {
|
|
16790
16802
|
"data-part": "empty",
|
|
16791
|
-
colspan:
|
|
16803
|
+
colspan: It.value
|
|
16792
16804
|
}, [K(t.$slots, "empty", {}, () => [I(si, {
|
|
16793
16805
|
text: e.emptyText,
|
|
16794
16806
|
icon: e.emptyIcon
|
|
@@ -16803,7 +16815,7 @@ var Lh = {
|
|
|
16803
16815
|
}, [M("td", {
|
|
16804
16816
|
"data-part": "cell",
|
|
16805
16817
|
"data-full": "",
|
|
16806
|
-
colspan:
|
|
16818
|
+
colspan: It.value
|
|
16807
16819
|
}, [K(t.$slots, "full-row", {
|
|
16808
16820
|
row: i,
|
|
16809
16821
|
index: o
|
|
@@ -16815,13 +16827,13 @@ var Lh = {
|
|
|
16815
16827
|
"data-clickable": a || void 0,
|
|
16816
16828
|
"data-line": B.value ? s - 1 : void 0,
|
|
16817
16829
|
"data-line-last": B.value && s === ae(i) ? "" : void 0,
|
|
16818
|
-
"data-drop":
|
|
16819
|
-
draggable: e.sortableRows &&
|
|
16830
|
+
"data-drop": Dt.value?.key === Te(i) && Et.value !== Te(i) && s === (Dt.value.position === "before" ? 1 : B.value ? ae(i) : 1) ? Dt.value.position : void 0,
|
|
16831
|
+
draggable: e.sortableRows && Tt.value === Te(i) ? "true" : void 0,
|
|
16820
16832
|
onClick: (e) => r("row-click", i, o),
|
|
16821
|
-
onDragstart: (e) =>
|
|
16822
|
-
onDragover: (e) =>
|
|
16823
|
-
onDrop:
|
|
16824
|
-
onDragend:
|
|
16833
|
+
onDragstart: (e) => jt(e, i),
|
|
16834
|
+
onDragover: (e) => Mt(e, i),
|
|
16835
|
+
onDrop: Nt,
|
|
16836
|
+
onDragend: Pt,
|
|
16825
16837
|
onKeydown: (e) => q(e, i),
|
|
16826
16838
|
onMouseenter: (e) => B.value && (be.value = Te(i)),
|
|
16827
16839
|
onMouseleave: (e) => B.value && be.value === Te(i) && (be.value = null)
|
|
@@ -16840,10 +16852,10 @@ var Lh = {
|
|
|
16840
16852
|
"aria-label": we.value.dragHandle,
|
|
16841
16853
|
disabled: w.value || void 0,
|
|
16842
16854
|
onClick: n[0] ||= Q(() => {}, ["stop"]),
|
|
16843
|
-
onKeydown: (e) =>
|
|
16844
|
-
onMousedown: (e) =>
|
|
16845
|
-
onMouseup: n[1] ||= (e) =>
|
|
16846
|
-
onTouchstartPassive: (e) =>
|
|
16855
|
+
onKeydown: (e) => At(e, o),
|
|
16856
|
+
onMousedown: (e) => Tt.value = Te(i),
|
|
16857
|
+
onMouseup: n[1] ||= (e) => Et.value === null && (Tt.value = null),
|
|
16858
|
+
onTouchstartPassive: (e) => Tt.value = Te(i)
|
|
16847
16859
|
}, [I($, {
|
|
16848
16860
|
name: "grip",
|
|
16849
16861
|
size: "sm"
|
|
@@ -16916,10 +16928,10 @@ var Lh = {
|
|
|
16916
16928
|
"aria-label": we.value.dragHandle,
|
|
16917
16929
|
disabled: w.value || void 0,
|
|
16918
16930
|
onClick: n[5] ||= Q(() => {}, ["stop"]),
|
|
16919
|
-
onKeydown: (e) =>
|
|
16920
|
-
onMousedown: (e) =>
|
|
16921
|
-
onMouseup: n[6] ||= (e) =>
|
|
16922
|
-
onTouchstartPassive: (e) =>
|
|
16931
|
+
onKeydown: (e) => At(e, o),
|
|
16932
|
+
onMousedown: (e) => Tt.value = Te(i),
|
|
16933
|
+
onMouseup: n[6] ||= (e) => Et.value === null && (Tt.value = null),
|
|
16934
|
+
onTouchstartPassive: (e) => Tt.value = Te(i)
|
|
16923
16935
|
}, [I($, {
|
|
16924
16936
|
name: "grip",
|
|
16925
16937
|
size: "sm"
|
|
@@ -16961,7 +16973,7 @@ var Lh = {
|
|
|
16961
16973
|
e.expandable && pt(i) ? (U(), j("tr", p_, [
|
|
16962
16974
|
Se.value ? (U(), j("td", m_)) : A("", !0),
|
|
16963
16975
|
e.selectable ? (U(), j("td", h_)) : A("", !0),
|
|
16964
|
-
M("td", { colspan:
|
|
16976
|
+
M("td", { colspan: It.value - +!!e.selectable - !!Se.value }, [K(t.$slots, "expanded", { row: i })], 8, g_)
|
|
16965
16977
|
])) : A("", !0)
|
|
16966
16978
|
], 64))), 128))]),
|
|
16967
16979
|
e.footer ? (U(), j("tfoot", __, [M("tr", null, [
|
|
@@ -17013,7 +17025,7 @@ var Lh = {
|
|
|
17013
17025
|
"labels",
|
|
17014
17026
|
"disabled"
|
|
17015
17027
|
])) : A("", !0), K(t.$slots, "below")])) : A("", !0),
|
|
17016
|
-
e.sortableRows ? (U(), j("span", E_, J(
|
|
17028
|
+
e.sortableRows ? (U(), j("span", E_, J(Ot.value), 1)) : A("", !0)
|
|
17017
17029
|
], 8, bg));
|
|
17018
17030
|
}
|
|
17019
17031
|
}), O_ = ["data-mode", "aria-label"], k_ = [
|
package/dist/requirements.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as checkRequirements, n as defineRequirements, r as formatProblems, i as parseVersion, a as satisfies } from "./requirements-
|
|
1
|
+
export { t as checkRequirements, n as defineRequirements, r as formatProblems, i as parseVersion, a as satisfies } from "./requirements-CAlEZ66c.js";
|