@nexxtmove/ui 1.44.0 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +33 -28
- package/package.json +1 -1
- package/src/components/molecules/Tree/Tree.vue +30 -10
package/dist/index.js
CHANGED
|
@@ -9354,7 +9354,7 @@ var Nu = { render: Mu }, Pu = { class: "flex items-center justify-end self-stret
|
|
|
9354
9354
|
}, yf = ["aria-label"], bf = {
|
|
9355
9355
|
key: 0,
|
|
9356
9356
|
"aria-hidden": "true",
|
|
9357
|
-
class: "mb-
|
|
9357
|
+
class: "mb-1.5",
|
|
9358
9358
|
"data-tree-ghost": ""
|
|
9359
9359
|
}, xf = {
|
|
9360
9360
|
"data-tree-ghost-content": "",
|
|
@@ -9377,7 +9377,7 @@ var Nu = { render: Mu }, Pu = { class: "flex items-center justify-end self-stret
|
|
|
9377
9377
|
], wf = ["onClick"], Tf = {
|
|
9378
9378
|
key: 1,
|
|
9379
9379
|
class: "size-5 shrink-0"
|
|
9380
|
-
}, Ef = ["id"], Df =
|
|
9380
|
+
}, Ef = ["id"], Df = ["inert"], Of = 8, kf = "bg-cornflower-blue-50 outline-1 -outline-offset-1 outline-cornflower-blue-600 outline-dashed", Af = "transform 200ms var(--ease-in-out-strong), opacity 80ms linear 120ms", jf = "opacity 80ms linear 120ms", Mf = /* @__PURE__ */ p({
|
|
9381
9381
|
name: "NexxtTree",
|
|
9382
9382
|
__name: "Tree",
|
|
9383
9383
|
props: /*@__PURE__*/ _({
|
|
@@ -9492,7 +9492,7 @@ var Nu = { render: Mu }, Pu = { class: "flex items-center justify-end self-stret
|
|
|
9492
9492
|
n ? "text-cornflower-blue-600" : "text-gray-800",
|
|
9493
9493
|
!n && !T.value && "hover:bg-gray-100",
|
|
9494
9494
|
re.value.has(t) && "opacity-40",
|
|
9495
|
-
G.value === t &&
|
|
9495
|
+
G.value === t && kf
|
|
9496
9496
|
];
|
|
9497
9497
|
}, ae = null, J = (e) => {
|
|
9498
9498
|
g.value?.contains(e.target) || P(null);
|
|
@@ -9621,12 +9621,12 @@ var Nu = { render: Mu }, Pu = { class: "flex items-center justify-end self-stret
|
|
|
9621
9621
|
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
9622
9622
|
let n = Ne(t);
|
|
9623
9623
|
if (n) {
|
|
9624
|
-
n.style.transition = "none", n.style.opacity = "0", n.getBoundingClientRect(), n.style.transition =
|
|
9624
|
+
n.style.transition = "none", n.style.opacity = "0", n.getBoundingClientRect(), n.style.transition = jf, n.style.opacity = "";
|
|
9625
9625
|
return;
|
|
9626
9626
|
}
|
|
9627
9627
|
Me.add(t.dataset.treeId);
|
|
9628
9628
|
let r = Oe(v.value.find((e) => e.node.id === t.dataset.treeId)?.parentId), i = r ? t.offsetTop - (r.offsetTop + r.offsetHeight) : 0;
|
|
9629
|
-
t.style.transition = "none", t.style.transform = `translateY(${-i}px)`, t.style.opacity = "0", t.style.pointerEvents = "none", t.getBoundingClientRect(), t.style.transition =
|
|
9629
|
+
t.style.transition = "none", t.style.transform = `translateY(${-i}px)`, t.style.opacity = "0", t.style.pointerEvents = "none", t.getBoundingClientRect(), t.style.transition = Af, t.style.transform = "", t.style.opacity = "";
|
|
9630
9630
|
}, Fe = null, Ie = (e) => {
|
|
9631
9631
|
let t = e, n = Ne(t);
|
|
9632
9632
|
if (n) {
|
|
@@ -9728,7 +9728,7 @@ var Nu = { render: Mu }, Pu = { class: "flex items-center justify-end self-stret
|
|
|
9728
9728
|
}, {
|
|
9729
9729
|
default: W(() => [(E(!0), s(e, null, k(ne.value, (t) => (E(), s(e, { key: t.key }, [t.ghost ? (E(), s("div", bf, [c("div", {
|
|
9730
9730
|
class: "flex rounded-md bg-cornflower-blue-50 py-1 pr-2 pl-1 small-normal text-gray-700 outline-1 -outline-offset-1 outline-cornflower-blue-600 transition-[margin-left] duration-200 ease-in-out-strong outline-dashed motion-reduce:transition-none",
|
|
9731
|
-
style: S({ marginLeft: `${t.depth *
|
|
9731
|
+
style: S({ marginLeft: `${t.depth * Of}px` })
|
|
9732
9732
|
}, [c("span", xf, [
|
|
9733
9733
|
i[3] ||= c("span", { class: "size-5 shrink-0" }, null, -1),
|
|
9734
9734
|
t.node.icon ? (E(), a(Q, {
|
|
@@ -9750,8 +9750,8 @@ var Nu = { render: Mu }, Pu = { class: "flex items-center justify-end self-stret
|
|
|
9750
9750
|
"data-tree-id": t.row.node.id,
|
|
9751
9751
|
"data-tree-drop": G.value === t.row.node.id ? "inside" : void 0,
|
|
9752
9752
|
draggable: t.row.draggable,
|
|
9753
|
-
class: b(["group mb-
|
|
9754
|
-
style: S({ paddingLeft: `${t.row.depth *
|
|
9753
|
+
class: b(["group mb-1.5 flex items-center gap-1.5 overflow-x-clip rounded-md py-1 pr-2 small-normal transition-[color,background-color,outline-color,opacity] duration-150 select-none focus-visible:outline-2 focus-visible:outline-cornflower-blue-500 motion-reduce:transition-none", ie(t.row)]),
|
|
9754
|
+
style: S({ paddingLeft: `${t.row.depth * Of + 4}px` }),
|
|
9755
9755
|
onClick: (e) => Se(t.row.node.id),
|
|
9756
9756
|
onFocus: (e) => _.value = t.row.node.id,
|
|
9757
9757
|
onPointerdown: (e) => fe(e, t.row),
|
|
@@ -9777,42 +9777,47 @@ var Nu = { render: Mu }, Pu = { class: "flex items-center justify-end self-stret
|
|
|
9777
9777
|
}, null, 8, ["name", "class"])) : o("", !0),
|
|
9778
9778
|
c("span", {
|
|
9779
9779
|
id: Be(t.row.node.id),
|
|
9780
|
-
|
|
9780
|
+
"data-tree-label": "",
|
|
9781
|
+
class: "min-w-0 flex-1 truncate"
|
|
9781
9782
|
}, M(t.row.node.label), 9, Ef),
|
|
9782
9783
|
d["node-actions"] ? (E(), s("div", {
|
|
9783
9784
|
key: 3,
|
|
9784
9785
|
"data-tree-actions": "",
|
|
9785
|
-
class: "-my-0.5 ml-
|
|
9786
|
+
class: b(["-my-0.5 -ml-1.5 grid shrink-0 transition-[grid-template-columns] duration-200 ease-in-out-strong [clip-path:inset(-0.5rem_-0.25rem)] motion-reduce:transition-none", m.value === t.row.node.id ? "grid-cols-[minmax(0,1fr)]" : "grid-cols-[minmax(0,0fr)]"]),
|
|
9787
|
+
inert: m.value !== t.row.node.id || void 0,
|
|
9786
9788
|
onClick: i[1] ||= q(() => {}, ["stop"]),
|
|
9787
9789
|
onKeydown: i[2] ||= q(() => {}, ["stop"])
|
|
9790
|
+
}, [c("div", {
|
|
9791
|
+
"data-tree-actions-content": "",
|
|
9792
|
+
class: b(["flex w-max items-center pl-1.5 transition-opacity duration-150 ease-out motion-reduce:transition-none", m.value === t.row.node.id ? "opacity-100" : "opacity-0"])
|
|
9788
9793
|
}, [f(Ve, {
|
|
9789
9794
|
node: t.row.node,
|
|
9790
9795
|
tabindex: Re(t.row.node.id)
|
|
9791
|
-
}, null, 8, ["node", "tabindex"])],
|
|
9796
|
+
}, null, 8, ["node", "tabindex"])], 2)], 42, Df)) : o("", !0)
|
|
9792
9797
|
], 46, Cf))], 64))), 128))]),
|
|
9793
9798
|
_: 1
|
|
9794
9799
|
})], 40, yf));
|
|
9795
9800
|
}
|
|
9796
|
-
}),
|
|
9801
|
+
}), Nf = [
|
|
9797
9802
|
"src",
|
|
9798
9803
|
"loop",
|
|
9799
9804
|
"aria-label"
|
|
9800
|
-
],
|
|
9805
|
+
], Pf = {
|
|
9801
9806
|
key: 0,
|
|
9802
9807
|
role: "alert",
|
|
9803
9808
|
class: "absolute inset-0 flex flex-col items-center justify-center gap-3 rounded-lg bg-gray-900 text-white"
|
|
9804
|
-
},
|
|
9809
|
+
}, Ff = { class: "heading-4" }, If = { class: "max-w-xs truncate extra-small-normal text-white/50" }, Lf = {
|
|
9805
9810
|
key: 0,
|
|
9806
9811
|
class: "pointer-events-none absolute inset-0 flex items-center justify-center"
|
|
9807
|
-
},
|
|
9812
|
+
}, Rf = {
|
|
9808
9813
|
class: "flex size-16 items-center justify-center rounded-full bg-black/50 text-white",
|
|
9809
9814
|
"aria-hidden": "true"
|
|
9810
|
-
},
|
|
9815
|
+
}, zf = [
|
|
9811
9816
|
"aria-label",
|
|
9812
9817
|
"aria-valuemax",
|
|
9813
9818
|
"aria-valuenow",
|
|
9814
9819
|
"aria-valuetext"
|
|
9815
|
-
],
|
|
9820
|
+
], Bf = { class: "flex items-center gap-2" }, Vf = ["aria-label"], Hf = { class: "extra-small-normal text-white/70 tabular-nums" }, Uf = ["aria-label"], Wf = ["aria-label"], Gf = /* @__PURE__ */ p({
|
|
9816
9821
|
__name: "VideoPlayer",
|
|
9817
9822
|
props: {
|
|
9818
9823
|
src: {},
|
|
@@ -9893,15 +9898,15 @@ var Nu = { render: Mu }, Pu = { class: "flex items-center justify-end self-stret
|
|
|
9893
9898
|
"aria-label": a.value.video,
|
|
9894
9899
|
onError: r[0] ||= (e) => C.value = !0,
|
|
9895
9900
|
onClick: r[1] ||= (t) => e.showControls === !1 ? void 0 : F()
|
|
9896
|
-
}, null, 42,
|
|
9897
|
-
C.value ? (E(), s("div",
|
|
9901
|
+
}, null, 42, Nf),
|
|
9902
|
+
C.value ? (E(), s("div", Pf, [
|
|
9898
9903
|
f(Q, {
|
|
9899
9904
|
name: "circle-exclamation",
|
|
9900
9905
|
class: "text-3xl text-red-400",
|
|
9901
9906
|
"aria-hidden": "true"
|
|
9902
9907
|
}),
|
|
9903
|
-
c("p",
|
|
9904
|
-
c("p",
|
|
9908
|
+
c("p", Ff, M(a.value.error), 1),
|
|
9909
|
+
c("p", If, M(e.src), 1)
|
|
9905
9910
|
])) : o("", !0),
|
|
9906
9911
|
f(n, {
|
|
9907
9912
|
"enter-active-class": "transition-opacity duration-100 ease-out",
|
|
@@ -9909,7 +9914,7 @@ var Nu = { render: Mu }, Pu = { class: "flex items-center justify-end self-stret
|
|
|
9909
9914
|
"enter-from-class": "opacity-0",
|
|
9910
9915
|
"leave-to-class": "opacity-0"
|
|
9911
9916
|
}, {
|
|
9912
|
-
default: W(() => [e.showControls !== !1 && T.value && !C.value ? (E(), s("div",
|
|
9917
|
+
default: W(() => [e.showControls !== !1 && T.value && !C.value ? (E(), s("div", Lf, [c("div", Rf, [f(Q, {
|
|
9913
9918
|
name: T.value,
|
|
9914
9919
|
class: "text-2xl"
|
|
9915
9920
|
}, null, 8, ["name"])])])) : o("", !0)]),
|
|
@@ -9952,7 +9957,7 @@ var Nu = { render: Mu }, Pu = { class: "flex items-center justify-end self-stret
|
|
|
9952
9957
|
class: "absolute top-1/2 size-3 -translate-1/2 rounded-full bg-sapphire-100 opacity-0 shadow-sm transition-opacity group-hover/player:opacity-100",
|
|
9953
9958
|
style: S({ left: `${B.value}%` })
|
|
9954
9959
|
}, null, 4)
|
|
9955
|
-
], 40,
|
|
9960
|
+
], 40, zf), c("div", Bf, [
|
|
9956
9961
|
c("button", {
|
|
9957
9962
|
type: "button",
|
|
9958
9963
|
"aria-label": P(u) ? a.value.pause : a.value.play,
|
|
@@ -9962,8 +9967,8 @@ var Nu = { render: Mu }, Pu = { class: "flex items-center justify-end self-stret
|
|
|
9962
9967
|
name: P(u) ? "pause" : "play",
|
|
9963
9968
|
class: "text-sm",
|
|
9964
9969
|
"aria-hidden": "true"
|
|
9965
|
-
}, null, 8, ["name"])], 8,
|
|
9966
|
-
c("span",
|
|
9970
|
+
}, null, 8, ["name"])], 8, Vf),
|
|
9971
|
+
c("span", Hf, M(N(V.value)) + " / " + M(N(P(m))), 1),
|
|
9967
9972
|
r[7] ||= c("div", { class: "flex-1" }, null, -1),
|
|
9968
9973
|
c("button", {
|
|
9969
9974
|
type: "button",
|
|
@@ -9974,7 +9979,7 @@ var Nu = { render: Mu }, Pu = { class: "flex items-center justify-end self-stret
|
|
|
9974
9979
|
name: P(h) ? "volume-xmark" : "volume-high",
|
|
9975
9980
|
class: "text-sm",
|
|
9976
9981
|
"aria-hidden": "true"
|
|
9977
|
-
}, null, 8, ["name"])], 8,
|
|
9982
|
+
}, null, 8, ["name"])], 8, Uf),
|
|
9978
9983
|
c("button", {
|
|
9979
9984
|
type: "button",
|
|
9980
9985
|
"aria-label": P(_) ? a.value.exitFullscreen : a.value.enterFullscreen,
|
|
@@ -9984,10 +9989,10 @@ var Nu = { render: Mu }, Pu = { class: "flex items-center justify-end self-stret
|
|
|
9984
9989
|
name: P(_) ? "compress" : "expand",
|
|
9985
9990
|
class: "text-sm",
|
|
9986
9991
|
"aria-hidden": "true"
|
|
9987
|
-
}, null, 8, ["name"])], 8,
|
|
9992
|
+
}, null, 8, ["name"])], 8, Wf)
|
|
9988
9993
|
])], 4)) : o("", !0)
|
|
9989
9994
|
], 32));
|
|
9990
9995
|
}
|
|
9991
9996
|
});
|
|
9992
9997
|
//#endregion
|
|
9993
|
-
export { zt as EDITOR_ALIGN_ITEMS_OPTIONS, Ht as EDITOR_BACKGROUND_SIZE_OPTIONS, An as EDITOR_BORDER_STEPS, mi as EDITOR_DIMENSION_LIMITS, Gt as EDITOR_FLEX_DIRECTION_OPTIONS, dr as EDITOR_FONT_SIZE_STEPS, en as EDITOR_GAP_STEPS, Un as EDITOR_HEADING_TYPE_OPTIONS, er as EDITOR_JUSTIFY_CONTENT_OPTIONS, Er as EDITOR_LETTER_SPACING_STEPS, vr as EDITOR_LINE_HEIGHT_STEPS, ar as EDITOR_MAX_WIDTH_STEPS, Zr as EDITOR_PADDING_STEPS, Jn as EDITOR_RADIUS_STEPS, xi as EDITOR_SIZE_OPTIONS, Zn as EDITOR_TEXT_ALIGN_OPTIONS, yr as EDITOR_TEXT_LINE_HEIGHT_RATIOS, gt as EVENT_CONFIG_MAP, wi as NexxtAnimatedNumber, Ei as NexxtAnnouncement, ji as NexxtAvatar, Ni as NexxtButton, da as NexxtCalendar, ma as NexxtCard, ga as NexxtCheckbox, _a as NexxtChip, En as NexxtColorPicker, Ua as NexxtCombobox, Ha as NexxtComboboxPanel, Ya as NexxtContactInfoCard, co as NexxtCountrySelect, po as NexxtCustomerJourneyTile, mo as NexxtDatePicker, So as NexxtDoughnutChart, Do as NexxtDropdownButton, Vt as NexxtEditorAlignItems, Wt as NexxtEditorBackgroundSize, Nn as NexxtEditorBorder, Ro as NexxtEditorColor, vi as NexxtEditorDimensionField, qt as NexxtEditorFlexDirection, hr as NexxtEditorFontSize, nn as NexxtEditorGap, Gn as NexxtEditorHeadingType, nr as NexxtEditorJustifyContent, jr as NexxtEditorLetterSpacing, Cr as NexxtEditorLineHeight, sr as NexxtEditorMaxWidth, si as NexxtEditorPadding, Xn as NexxtEditorRadius, $ as NexxtEditorSettingsBlock, Ci as NexxtEditorSize, Vo as NexxtEditorSizeLimit, $n as NexxtEditorTextAlign, Wo as NexxtEnergyLabel, ln as NexxtFloatingPanel, Ys as NexxtFontPicker, $s as NexxtHeader, Q as NexxtIcon, tc as NexxtInfoBlock, wa as NexxtInputField, lc as NexxtInputSelect, dc as NexxtLoader, hc as NexxtModal, _c as NexxtModalFooter, qc as NexxtPageCard, Qc as NexxtPageContainer, Hc as NexxtPageMockup, el as NexxtPageTypeTile, tl as NexxtPagination, $o as NexxtPickerGroup, ds as NexxtPickerItem, xs as NexxtPickerList, Ds as NexxtPickerPanel, ss as NexxtPickerPreview, ol as NexxtPlaceholderInput, ul as NexxtPresenceIndicator, Sl as NexxtProgressBar, Nl as NexxtPropertyCard, Ol as NexxtPropertyListing, Yl as NexxtReferenceCard, Hn as NexxtSelect, Ql as NexxtSelectableOption, iu as NexxtSidebarMenuItem, Ko as NexxtSkeleton, cu as NexxtSkeletonPropertyCard, Zt as NexxtSlider, du as NexxtSocialIcons, hu as NexxtSocialMediaCustomTemplate, wu as NexxtSocialMediaTemplate, Ru as NexxtSocialMediaType, Zu as NexxtSource, Oi as NexxtSquircle, Qu as NexxtStepperHeader, Ct as NexxtSwitch, ad as NexxtTabbedContent, vd as NexxtTable, td as NexxtTabs, Md as NexxtTemplateCard, Id as NexxtTextarea, Ud as NexxtTimelineEvent, Xd as NexxtTimelineLanes, tf as NexxtTimelinePhaseblock, rf as NexxtTimelineTrack, df as NexxtToast, ff as NexxtToaster, Rt as NexxtToggleGroup, At as NexxtTooltip,
|
|
9998
|
+
export { zt as EDITOR_ALIGN_ITEMS_OPTIONS, Ht as EDITOR_BACKGROUND_SIZE_OPTIONS, An as EDITOR_BORDER_STEPS, mi as EDITOR_DIMENSION_LIMITS, Gt as EDITOR_FLEX_DIRECTION_OPTIONS, dr as EDITOR_FONT_SIZE_STEPS, en as EDITOR_GAP_STEPS, Un as EDITOR_HEADING_TYPE_OPTIONS, er as EDITOR_JUSTIFY_CONTENT_OPTIONS, Er as EDITOR_LETTER_SPACING_STEPS, vr as EDITOR_LINE_HEIGHT_STEPS, ar as EDITOR_MAX_WIDTH_STEPS, Zr as EDITOR_PADDING_STEPS, Jn as EDITOR_RADIUS_STEPS, xi as EDITOR_SIZE_OPTIONS, Zn as EDITOR_TEXT_ALIGN_OPTIONS, yr as EDITOR_TEXT_LINE_HEIGHT_RATIOS, gt as EVENT_CONFIG_MAP, wi as NexxtAnimatedNumber, Ei as NexxtAnnouncement, ji as NexxtAvatar, Ni as NexxtButton, da as NexxtCalendar, ma as NexxtCard, ga as NexxtCheckbox, _a as NexxtChip, En as NexxtColorPicker, Ua as NexxtCombobox, Ha as NexxtComboboxPanel, Ya as NexxtContactInfoCard, co as NexxtCountrySelect, po as NexxtCustomerJourneyTile, mo as NexxtDatePicker, So as NexxtDoughnutChart, Do as NexxtDropdownButton, Vt as NexxtEditorAlignItems, Wt as NexxtEditorBackgroundSize, Nn as NexxtEditorBorder, Ro as NexxtEditorColor, vi as NexxtEditorDimensionField, qt as NexxtEditorFlexDirection, hr as NexxtEditorFontSize, nn as NexxtEditorGap, Gn as NexxtEditorHeadingType, nr as NexxtEditorJustifyContent, jr as NexxtEditorLetterSpacing, Cr as NexxtEditorLineHeight, sr as NexxtEditorMaxWidth, si as NexxtEditorPadding, Xn as NexxtEditorRadius, $ as NexxtEditorSettingsBlock, Ci as NexxtEditorSize, Vo as NexxtEditorSizeLimit, $n as NexxtEditorTextAlign, Wo as NexxtEnergyLabel, ln as NexxtFloatingPanel, Ys as NexxtFontPicker, $s as NexxtHeader, Q as NexxtIcon, tc as NexxtInfoBlock, wa as NexxtInputField, lc as NexxtInputSelect, dc as NexxtLoader, hc as NexxtModal, _c as NexxtModalFooter, qc as NexxtPageCard, Qc as NexxtPageContainer, Hc as NexxtPageMockup, el as NexxtPageTypeTile, tl as NexxtPagination, $o as NexxtPickerGroup, ds as NexxtPickerItem, xs as NexxtPickerList, Ds as NexxtPickerPanel, ss as NexxtPickerPreview, ol as NexxtPlaceholderInput, ul as NexxtPresenceIndicator, Sl as NexxtProgressBar, Nl as NexxtPropertyCard, Ol as NexxtPropertyListing, Yl as NexxtReferenceCard, Hn as NexxtSelect, Ql as NexxtSelectableOption, iu as NexxtSidebarMenuItem, Ko as NexxtSkeleton, cu as NexxtSkeletonPropertyCard, Zt as NexxtSlider, du as NexxtSocialIcons, hu as NexxtSocialMediaCustomTemplate, wu as NexxtSocialMediaTemplate, Ru as NexxtSocialMediaType, Zu as NexxtSource, Oi as NexxtSquircle, Qu as NexxtStepperHeader, Ct as NexxtSwitch, ad as NexxtTabbedContent, vd as NexxtTable, td as NexxtTabs, Md as NexxtTemplateCard, Id as NexxtTextarea, Ud as NexxtTimelineEvent, Xd as NexxtTimelineLanes, tf as NexxtTimelinePhaseblock, rf as NexxtTimelineTrack, df as NexxtToast, ff as NexxtToaster, Rt as NexxtToggleGroup, At as NexxtTooltip, Mf as NexxtTree, Gf as NexxtVideoPlayer, _t as PHASE_MAP, Ju as SOURCE_MAP };
|
package/package.json
CHANGED
|
@@ -80,7 +80,7 @@ const selected = defineModel<string | null>('selected', { default: null })
|
|
|
80
80
|
/** Ids of the nodes whose children are hidden. Tracking the collapsed ones makes "everything open" the default. */
|
|
81
81
|
const collapsed = defineModel<string[]>('collapsed', { default: () => [] })
|
|
82
82
|
|
|
83
|
-
const INDENT =
|
|
83
|
+
const INDENT = 8
|
|
84
84
|
|
|
85
85
|
const root = useTemplateRef<HTMLElement>('root')
|
|
86
86
|
const focusedId = ref<string | null>(null)
|
|
@@ -890,7 +890,7 @@ defineExpose({ focusNode })
|
|
|
890
890
|
<!-- The drop indicator: where the dragged node lands, at the depth it lands on. Out of
|
|
891
891
|
the accessibility tree and without `data-tree-id`, so it is no row to the keyboard,
|
|
892
892
|
the tab stop or the highlight. One element for the whole drag, that changes spots. -->
|
|
893
|
-
<div v-if="item.ghost" aria-hidden="true" class="mb-
|
|
893
|
+
<div v-if="item.ghost" aria-hidden="true" class="mb-1.5" data-tree-ghost>
|
|
894
894
|
<div
|
|
895
895
|
class="flex rounded-md bg-cornflower-blue-50 py-1 pr-2 pl-1 small-normal text-gray-700 outline-1 -outline-offset-1 outline-cornflower-blue-600 transition-[margin-left] duration-200 ease-in-out-strong outline-dashed motion-reduce:transition-none"
|
|
896
896
|
:style="{ marginLeft: `${item.depth * INDENT}px` }"
|
|
@@ -918,7 +918,7 @@ defineExpose({ focusNode })
|
|
|
918
918
|
:data-tree-id="item.row.node.id"
|
|
919
919
|
:data-tree-drop="collapsedTargetId === item.row.node.id ? 'inside' : undefined"
|
|
920
920
|
:draggable="item.row.draggable"
|
|
921
|
-
class="group mb-
|
|
921
|
+
class="group mb-1.5 flex items-center gap-1.5 overflow-x-clip rounded-md py-1 pr-2 small-normal transition-[color,background-color,outline-color,opacity] duration-150 select-none focus-visible:outline-2 focus-visible:outline-cornflower-blue-500 motion-reduce:transition-none"
|
|
922
922
|
:class="rowClasses(item.row)"
|
|
923
923
|
:style="{ paddingLeft: `${item.row.depth * INDENT + 4}px` }"
|
|
924
924
|
@click="onRowClick(item.row.node.id)"
|
|
@@ -955,19 +955,39 @@ defineExpose({ focusNode })
|
|
|
955
955
|
class="shrink-0 transition-colors duration-150 motion-reduce:transition-none"
|
|
956
956
|
:class="selected === item.row.node.id ? 'text-cornflower-blue-600' : 'text-gray-600'"
|
|
957
957
|
/>
|
|
958
|
-
<span :id="labelId(item.row.node.id)" class="truncate">{{
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
958
|
+
<span :id="labelId(item.row.node.id)" data-tree-label class="min-w-0 flex-1 truncate">{{
|
|
959
|
+
item.row.node.label
|
|
960
|
+
}}</span>
|
|
961
|
+
|
|
962
|
+
<!-- Only the selected row has actions: the track grows from 0 to their width and pushes
|
|
963
|
+
its label in, while their start, pinned to it, slides them in from the row's end.
|
|
964
|
+
The clip hides what has not slid in yet; the row's `overflow-x-clip` keeps them out
|
|
965
|
+
of the panel's scroll width meanwhile. Inert on every other row, so what cannot be
|
|
966
|
+
seen cannot be focused or read either; `undefined` rather than `false`, so no
|
|
967
|
+
`inert="false"` lands where the DOM has no such property. Pulled into the row's padding so a 24px
|
|
968
|
+
button leaves the row at 28px, and into the row's gap so a label without actions
|
|
969
|
+
runs to the row's end. Stopping here keeps the row's click and the tree's keys away
|
|
970
|
+
from the actions. -->
|
|
963
971
|
<div
|
|
964
972
|
v-if="slots['node-actions']"
|
|
965
973
|
data-tree-actions
|
|
966
|
-
class="-my-0.5 ml-
|
|
974
|
+
class="-my-0.5 -ml-1.5 grid shrink-0 transition-[grid-template-columns] duration-200 ease-in-out-strong [clip-path:inset(-0.5rem_-0.25rem)] motion-reduce:transition-none"
|
|
975
|
+
:class="
|
|
976
|
+
selected === item.row.node.id
|
|
977
|
+
? 'grid-cols-[minmax(0,1fr)]'
|
|
978
|
+
: 'grid-cols-[minmax(0,0fr)]'
|
|
979
|
+
"
|
|
980
|
+
:inert="selected !== item.row.node.id || undefined"
|
|
967
981
|
@click.stop
|
|
968
982
|
@keydown.stop
|
|
969
983
|
>
|
|
970
|
-
<
|
|
984
|
+
<div
|
|
985
|
+
data-tree-actions-content
|
|
986
|
+
class="flex w-max items-center pl-1.5 transition-opacity duration-150 ease-out motion-reduce:transition-none"
|
|
987
|
+
:class="selected === item.row.node.id ? 'opacity-100' : 'opacity-0'"
|
|
988
|
+
>
|
|
989
|
+
<NodeActions :node="item.row.node" :tabindex="tabindexOf(item.row.node.id)" />
|
|
990
|
+
</div>
|
|
971
991
|
</div>
|
|
972
992
|
</div>
|
|
973
993
|
</template>
|