@n8n/design-system 2.2.1 → 2.3.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.
|
@@ -16320,10 +16320,12 @@ var Tooltip_default$1 = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @_
|
|
|
16320
16320
|
default: withCtx(() => [renderSlot(e.$slots, "description", {}, () => [withDirectives(createElementVNode("span", null, null, 512), [[r, e.description]])])]),
|
|
16321
16321
|
_: 3
|
|
16322
16322
|
})], 2)) : createCommentVNode("", !0),
|
|
16323
|
-
|
|
16323
|
+
e.buttonText ? (openBlock(), createBlock(Tooltip_default$1, {
|
|
16324
|
+
key: 3,
|
|
16325
|
+
disabled: !e.buttonDisabled
|
|
16326
|
+
}, {
|
|
16324
16327
|
content: withCtx(() => [renderSlot(e.$slots, "disabledButtonTooltip")]),
|
|
16325
|
-
default: withCtx(() => [
|
|
16326
|
-
key: 0,
|
|
16328
|
+
default: withCtx(() => [createVNode(unref(N8nButton_default), {
|
|
16327
16329
|
label: e.buttonText,
|
|
16328
16330
|
type: e.buttonType,
|
|
16329
16331
|
disabled: e.buttonDisabled,
|
|
@@ -16336,15 +16338,15 @@ var Tooltip_default$1 = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @_
|
|
|
16336
16338
|
"type",
|
|
16337
16339
|
"disabled",
|
|
16338
16340
|
"icon"
|
|
16339
|
-
])
|
|
16341
|
+
])]),
|
|
16340
16342
|
_: 3
|
|
16341
|
-
}, 8, ["disabled"]),
|
|
16343
|
+
}, 8, ["disabled"])) : createCommentVNode("", !0),
|
|
16342
16344
|
e.$slots.additionalContent ? (openBlock(), createElementBlock("div", {
|
|
16343
|
-
key:
|
|
16345
|
+
key: 4,
|
|
16344
16346
|
class: normalizeClass(e.$style["additional-content"])
|
|
16345
16347
|
}, [renderSlot(e.$slots, "additionalContent")], 2)) : createCommentVNode("", !0),
|
|
16346
16348
|
e.calloutText ? (openBlock(), createBlock(unref(N8nCallout_default), {
|
|
16347
|
-
key:
|
|
16349
|
+
key: 5,
|
|
16348
16350
|
theme: e.calloutTheme,
|
|
16349
16351
|
icon: e.calloutIcon,
|
|
16350
16352
|
class: normalizeClass(e.$style.callout)
|
|
@@ -44349,33 +44351,43 @@ var import_markdown_it = /* @__PURE__ */ __toESM(require_markdown_it()), import_
|
|
|
44349
44351
|
emits: ["click"],
|
|
44350
44352
|
setup(e, { emit: n }) {
|
|
44351
44353
|
let r = e, i = n, o = computed(() => {
|
|
44352
|
-
if (r.item.
|
|
44353
|
-
|
|
44354
|
-
|
|
44354
|
+
if (!r.item.disabled) {
|
|
44355
|
+
if (r.item.route) return r.item.route.to;
|
|
44356
|
+
if (r.item.link) return r.item.link.href;
|
|
44357
|
+
}
|
|
44358
|
+
}), s = () => {
|
|
44359
|
+
r.item.disabled || i("click");
|
|
44360
|
+
}, l = computed(() => {
|
|
44355
44361
|
if (typeof r.item.icon == "object" && r.item.icon?.type === "icon") return r.item.icon.value;
|
|
44356
44362
|
if (typeof r.item.icon == "string") return r.item.icon;
|
|
44357
|
-
}),
|
|
44363
|
+
}), d = computed(() => {
|
|
44358
44364
|
if (typeof r.item.icon != "string") return r.item.icon?.color;
|
|
44359
|
-
})
|
|
44365
|
+
}), f = computed(() => !r.compact && !(r.item.disabled && r.item.disabledReason)), k = computed(() => {
|
|
44366
|
+
if (r.item.disabled && r.item.disabledReason) return r.item.disabledReason;
|
|
44367
|
+
if (r.compact) return r.item.label;
|
|
44368
|
+
}), $ = computed(() => r.item.disabled && r.item.disabledReason ? "top" : "right");
|
|
44360
44369
|
return (e, n) => (openBlock(), createElementBlock("div", {
|
|
44361
44370
|
"data-test-id": e.item.id,
|
|
44362
44371
|
class: normalizeClass(e.$style.menuItemWrapper)
|
|
44363
44372
|
}, [createVNode(unref(N8nTooltip_default), {
|
|
44364
|
-
placement:
|
|
44365
|
-
disabled:
|
|
44373
|
+
placement: $.value,
|
|
44374
|
+
disabled: f.value,
|
|
44366
44375
|
"show-after": 500
|
|
44367
|
-
},
|
|
44376
|
+
}, {
|
|
44377
|
+
content: withCtx(() => [createTextVNode(toDisplayString(k.value), 1)]),
|
|
44368
44378
|
default: withCtx(() => [createVNode(unref(N8nRoute_default), {
|
|
44369
44379
|
id: e.item.id,
|
|
44370
44380
|
to: o.value,
|
|
44371
44381
|
role: "menuitem",
|
|
44372
44382
|
class: normalizeClass([e.$style.menuItem, {
|
|
44373
44383
|
[e.$style.active]: e.active,
|
|
44374
|
-
[e.$style.compact]: e.compact
|
|
44384
|
+
[e.$style.compact]: e.compact,
|
|
44385
|
+
[e.$style.disabled]: e.item.disabled
|
|
44375
44386
|
}]),
|
|
44376
44387
|
"aria-label": r.ariaLabel ?? r.item.label,
|
|
44388
|
+
"aria-disabled": e.item.disabled,
|
|
44377
44389
|
"data-test-id": "menu-item",
|
|
44378
|
-
onClick:
|
|
44390
|
+
onClick: s
|
|
44379
44391
|
}, {
|
|
44380
44392
|
default: withCtx(() => [
|
|
44381
44393
|
e.item.icon ? (openBlock(), createElementBlock("div", {
|
|
@@ -44384,23 +44396,23 @@ var import_markdown_it = /* @__PURE__ */ __toESM(require_markdown_it()), import_
|
|
|
44384
44396
|
}, [e.item.icon && typeof e.item.icon == "object" && e.item.icon.type === "emoji" ? (openBlock(), createBlock(unref(N8nText_default), {
|
|
44385
44397
|
key: 0,
|
|
44386
44398
|
class: normalizeClass(e.$style.menuItemEmoji),
|
|
44387
|
-
color:
|
|
44399
|
+
color: d.value
|
|
44388
44400
|
}, {
|
|
44389
44401
|
default: withCtx(() => [createTextVNode(toDisplayString(e.item.icon.value), 1)]),
|
|
44390
44402
|
_: 1
|
|
44391
|
-
}, 8, ["class", "color"])) :
|
|
44403
|
+
}, 8, ["class", "color"])) : l.value ? (openBlock(), createBlock(unref(N8nIcon_default), {
|
|
44392
44404
|
key: 1,
|
|
44393
|
-
color:
|
|
44394
|
-
icon:
|
|
44405
|
+
color: d.value,
|
|
44406
|
+
icon: l.value
|
|
44395
44407
|
}, null, 8, ["color", "icon"])) : createCommentVNode("", !0)], 2)) : createCommentVNode("", !0),
|
|
44396
44408
|
createElementVNode("div", { class: normalizeClass(e.$style.menuItemLabel) }, [e.compact ? createCommentVNode("", !0) : (openBlock(), createBlock(unref(N8nText_default), {
|
|
44397
44409
|
key: 0,
|
|
44398
44410
|
class: normalizeClass(e.$style.menuItemText),
|
|
44399
|
-
color: "text-dark"
|
|
44411
|
+
color: e.item.disabled ? "text-light" : "text-dark"
|
|
44400
44412
|
}, {
|
|
44401
44413
|
default: withCtx(() => [createTextVNode(toDisplayString(e.item.label), 1)]),
|
|
44402
44414
|
_: 1
|
|
44403
|
-
}, 8, ["class"])), !e.compact && e.item.beta ? (openBlock(), createBlock(BetaTag_default, { key: 1 })) : createCommentVNode("", !0)], 2),
|
|
44415
|
+
}, 8, ["class", "color"])), !e.compact && e.item.beta ? (openBlock(), createBlock(BetaTag_default, { key: 1 })) : createCommentVNode("", !0)], 2),
|
|
44404
44416
|
e.item.children && !e.compact ? (openBlock(), createBlock(unref(N8nIcon_default), {
|
|
44405
44417
|
key: 1,
|
|
44406
44418
|
icon: "chevron-right",
|
|
@@ -44412,25 +44424,23 @@ var import_markdown_it = /* @__PURE__ */ __toESM(require_markdown_it()), import_
|
|
|
44412
44424
|
"id",
|
|
44413
44425
|
"to",
|
|
44414
44426
|
"class",
|
|
44415
|
-
"aria-label"
|
|
44427
|
+
"aria-label",
|
|
44428
|
+
"aria-disabled"
|
|
44416
44429
|
])]),
|
|
44417
|
-
_:
|
|
44418
|
-
}, [
|
|
44419
|
-
name: "content",
|
|
44420
|
-
fn: withCtx(() => [createTextVNode(toDisplayString(e.item.label), 1)]),
|
|
44421
|
-
key: "0"
|
|
44422
|
-
} : void 0]), 1032, ["disabled"])], 10, _hoisted_1$22));
|
|
44430
|
+
_: 1
|
|
44431
|
+
}, 8, ["placement", "disabled"])], 10, _hoisted_1$22));
|
|
44423
44432
|
}
|
|
44424
44433
|
}), [["__cssModules", { $style: {
|
|
44425
|
-
menuItemWrapper: "
|
|
44426
|
-
menuItem: "
|
|
44427
|
-
|
|
44428
|
-
|
|
44429
|
-
|
|
44430
|
-
|
|
44431
|
-
|
|
44432
|
-
|
|
44433
|
-
|
|
44434
|
+
menuItemWrapper: "_menuItemWrapper_khzjs_1",
|
|
44435
|
+
menuItem: "_menuItem_khzjs_1",
|
|
44436
|
+
disabled: "_disabled_khzjs_22",
|
|
44437
|
+
menuItemIcon: "_menuItemIcon_khzjs_22",
|
|
44438
|
+
active: "_active_khzjs_25",
|
|
44439
|
+
compact: "_compact_khzjs_32",
|
|
44440
|
+
menuItemText: "_menuItemText_khzjs_45",
|
|
44441
|
+
notification: "_notification_khzjs_66",
|
|
44442
|
+
menuItemEmoji: "_menuItemEmoji_khzjs_77",
|
|
44443
|
+
menuItemLabel: "_menuItemLabel_khzjs_86"
|
|
44434
44444
|
} }]]), ConditionalRouterLink_default = /* @__PURE__ */ defineComponent({
|
|
44435
44445
|
name: "ConditionalRouterLink",
|
|
44436
44446
|
inheritAttrs: !1,
|