@n8n/design-system 2.7.0 → 2.7.1
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.
|
@@ -26683,24 +26683,24 @@ var _hoisted_1$57 = [
|
|
|
26683
26683
|
"mousedown"
|
|
26684
26684
|
],
|
|
26685
26685
|
setup(e, { expose: n, emit: r }) {
|
|
26686
|
-
let i = useCssModule(), o = useSlots(), s = e, l = r, d = useAttrs(), f = ref(null), _ = (e) => e === "id" || e === "title" || e.startsWith("data-") || e.startsWith("aria-") || e.startsWith("on"),
|
|
26686
|
+
let i = useCssModule(), o = useSlots(), s = e, l = r, d = useAttrs(), f = ref(null), _ = (e) => e === "id" || e === "title" || e.startsWith("data-") || e.startsWith("aria-") || e.startsWith("on"), k = computed(() => {
|
|
26687
26687
|
let e = {};
|
|
26688
26688
|
for (let [n, r] of Object.entries(d)) _(n) && (e[n] = r);
|
|
26689
26689
|
return e;
|
|
26690
|
-
}),
|
|
26690
|
+
}), $ = computed(() => {
|
|
26691
26691
|
let e = {};
|
|
26692
26692
|
for (let [n, r] of Object.entries(d)) _(n) || (e[n] = r);
|
|
26693
26693
|
return e;
|
|
26694
|
-
}),
|
|
26694
|
+
}), A7 = {
|
|
26695
26695
|
xlarge: i.xlarge,
|
|
26696
26696
|
large: i.large,
|
|
26697
26697
|
medium: i.medium,
|
|
26698
26698
|
small: i.small,
|
|
26699
26699
|
mini: i.mini
|
|
26700
|
-
},
|
|
26700
|
+
}, M7 = computed(() => A7[s.size]), N7 = computed(() => [
|
|
26701
26701
|
"n8n-input",
|
|
26702
26702
|
i.inputContainer,
|
|
26703
|
-
|
|
26703
|
+
M7.value,
|
|
26704
26704
|
{
|
|
26705
26705
|
[i.disabled]: s.disabled,
|
|
26706
26706
|
[i.readonly]: s.readonly,
|
|
@@ -26708,20 +26708,23 @@ var _hoisted_1$57 = [
|
|
|
26708
26708
|
[i.hasAppend]: !!o.append,
|
|
26709
26709
|
"ph-no-capture": s.type === "password"
|
|
26710
26710
|
}
|
|
26711
|
-
]),
|
|
26711
|
+
]), P7 = computed(() => [i.inputWrapper, {
|
|
26712
|
+
[i.disabled]: s.disabled,
|
|
26713
|
+
[i.readonly]: s.readonly
|
|
26714
|
+
}]), F7 = ref(!1), I7 = (e) => {
|
|
26712
26715
|
let n = e.target;
|
|
26713
26716
|
l("update:modelValue", n.value), l("input", n.value);
|
|
26714
|
-
}, F7 = (e) => {
|
|
26715
|
-
N7.value = !1, l("blur", e);
|
|
26716
|
-
}, I7 = (e) => {
|
|
26717
|
-
N7.value = !0, l("focus", e);
|
|
26718
26717
|
}, L7 = (e) => {
|
|
26719
|
-
l("
|
|
26718
|
+
F7.value = !1, l("blur", e);
|
|
26720
26719
|
}, R7 = (e) => {
|
|
26720
|
+
F7.value = !0, l("focus", e);
|
|
26721
|
+
}, z7 = (e) => {
|
|
26722
|
+
l("keydown", e);
|
|
26723
|
+
}, B7 = (e) => {
|
|
26721
26724
|
l("mousedown", e);
|
|
26722
|
-
},
|
|
26723
|
-
l("update:modelValue", ""),
|
|
26724
|
-
},
|
|
26725
|
+
}, V7 = () => {
|
|
26726
|
+
l("update:modelValue", ""), e9();
|
|
26727
|
+
}, H7 = computed(() => s.clearable && !s.disabled && s.modelValue !== "" && s.modelValue !== null), U7 = ref({}), W7, J7 = [
|
|
26725
26728
|
"letter-spacing",
|
|
26726
26729
|
"line-height",
|
|
26727
26730
|
"padding-top",
|
|
@@ -26738,13 +26741,13 @@ var _hoisted_1$57 = [
|
|
|
26738
26741
|
"border-width",
|
|
26739
26742
|
"box-sizing"
|
|
26740
26743
|
];
|
|
26741
|
-
function
|
|
26742
|
-
|
|
26743
|
-
let o = window.getComputedStyle(e), s = o.getPropertyValue("box-sizing"), l = parseFloat(o.getPropertyValue("padding-bottom")) + parseFloat(o.getPropertyValue("padding-top")), d = parseFloat(o.getPropertyValue("border-bottom-width")) + parseFloat(o.getPropertyValue("border-top-width")), f =
|
|
26744
|
-
|
|
26745
|
-
let p =
|
|
26746
|
-
s === "border-box" ? p += d : s === "content-box" && (p -= l),
|
|
26747
|
-
let y =
|
|
26744
|
+
function Y7(e, n, r) {
|
|
26745
|
+
W7 || (W7 = document.createElement("textarea"), document.body.appendChild(W7));
|
|
26746
|
+
let o = window.getComputedStyle(e), s = o.getPropertyValue("box-sizing"), l = parseFloat(o.getPropertyValue("padding-bottom")) + parseFloat(o.getPropertyValue("padding-top")), d = parseFloat(o.getPropertyValue("border-bottom-width")) + parseFloat(o.getPropertyValue("border-top-width")), f = J7.map((e) => `${e}:${o.getPropertyValue(e)}`).join(";");
|
|
26747
|
+
W7.className = i.hiddenTextarea, W7.setAttribute("style", f), W7.value = e.value || e.placeholder || "";
|
|
26748
|
+
let p = W7.scrollHeight, _ = { height: "" };
|
|
26749
|
+
s === "border-box" ? p += d : s === "content-box" && (p -= l), W7.value = "";
|
|
26750
|
+
let y = W7.scrollHeight - l;
|
|
26748
26751
|
if (n !== void 0) {
|
|
26749
26752
|
let e = y * n;
|
|
26750
26753
|
s === "border-box" && (e = e + l + d), p = Math.max(e, p), _.minHeight = `${e}px`;
|
|
@@ -26755,120 +26758,126 @@ var _hoisted_1$57 = [
|
|
|
26755
26758
|
}
|
|
26756
26759
|
return _.height = `${p}px`, _;
|
|
26757
26760
|
}
|
|
26758
|
-
function
|
|
26759
|
-
|
|
26761
|
+
function X7() {
|
|
26762
|
+
W7?.parentNode && (W7.parentNode.removeChild(W7), W7 = void 0);
|
|
26760
26763
|
}
|
|
26761
|
-
let
|
|
26764
|
+
let Q7 = () => {
|
|
26762
26765
|
if (s.type !== "textarea" || !s.autosize || !f.value) return;
|
|
26763
26766
|
let e = f.value;
|
|
26764
|
-
|
|
26767
|
+
U7.value = Y7(e, typeof s.autosize == "object" ? s.autosize.minRows : void 0, typeof s.autosize == "object" ? s.autosize.maxRows : void 0), X7();
|
|
26765
26768
|
};
|
|
26766
26769
|
useResizeObserver$1(computed(() => s.type === "textarea" && s.autosize ? f.value : null), () => {
|
|
26767
|
-
|
|
26770
|
+
Q7();
|
|
26768
26771
|
}), onBeforeUnmount(() => {
|
|
26769
|
-
|
|
26772
|
+
X7();
|
|
26770
26773
|
}), watch(() => s.modelValue, () => {
|
|
26771
|
-
s.type === "textarea" && s.autosize && nextTick(
|
|
26774
|
+
s.type === "textarea" && s.autosize && nextTick(Q7);
|
|
26772
26775
|
}), onMounted(() => {
|
|
26773
|
-
s.autofocus &&
|
|
26776
|
+
s.autofocus && e9(), s.type === "textarea" && s.autosize && nextTick(Q7);
|
|
26774
26777
|
});
|
|
26775
|
-
let
|
|
26778
|
+
let e9 = () => f.value?.focus();
|
|
26776
26779
|
return n({
|
|
26777
|
-
focus:
|
|
26780
|
+
focus: e9,
|
|
26778
26781
|
blur: () => f.value?.blur(),
|
|
26779
26782
|
select: () => f.value?.select()
|
|
26780
|
-
}), (n, r) => (openBlock(), createElementBlock("div", mergeProps({ class:
|
|
26783
|
+
}), (n, r) => (openBlock(), createElementBlock("div", mergeProps({ class: N7.value }, $.value), [
|
|
26781
26784
|
n.$slots.prepend ? (openBlock(), createElementBlock("span", {
|
|
26782
26785
|
key: 0,
|
|
26783
26786
|
class: normalizeClass(unref(i).prepend)
|
|
26784
26787
|
}, [renderSlot(n.$slots, "prepend")], 2)) : createCommentVNode("", !0),
|
|
26785
|
-
|
|
26786
|
-
|
|
26787
|
-
|
|
26788
|
-
}, [
|
|
26789
|
-
|
|
26790
|
-
|
|
26791
|
-
|
|
26792
|
-
|
|
26793
|
-
|
|
26794
|
-
|
|
26795
|
-
|
|
26796
|
-
|
|
26797
|
-
|
|
26798
|
-
|
|
26799
|
-
|
|
26800
|
-
|
|
26801
|
-
|
|
26802
|
-
|
|
26803
|
-
|
|
26804
|
-
|
|
26805
|
-
|
|
26806
|
-
|
|
26807
|
-
|
|
26808
|
-
|
|
26809
|
-
|
|
26810
|
-
|
|
26811
|
-
|
|
26812
|
-
|
|
26813
|
-
|
|
26814
|
-
|
|
26815
|
-
|
|
26816
|
-
|
|
26817
|
-
|
|
26818
|
-
|
|
26819
|
-
|
|
26820
|
-
|
|
26821
|
-
|
|
26822
|
-
|
|
26823
|
-
|
|
26824
|
-
|
|
26825
|
-
|
|
26826
|
-
|
|
26827
|
-
|
|
26828
|
-
|
|
26829
|
-
|
|
26830
|
-
|
|
26831
|
-
|
|
26832
|
-
|
|
26833
|
-
|
|
26834
|
-
|
|
26835
|
-
|
|
26836
|
-
|
|
26837
|
-
|
|
26838
|
-
|
|
26839
|
-
|
|
26840
|
-
|
|
26841
|
-
|
|
26842
|
-
|
|
26843
|
-
|
|
26844
|
-
|
|
26845
|
-
|
|
26846
|
-
|
|
26788
|
+
createElementVNode("div", {
|
|
26789
|
+
class: normalizeClass(P7.value),
|
|
26790
|
+
onClick: e9
|
|
26791
|
+
}, [
|
|
26792
|
+
n.$slots.prefix ? (openBlock(), createElementBlock("span", {
|
|
26793
|
+
key: 0,
|
|
26794
|
+
class: normalizeClass(unref(i).prefix)
|
|
26795
|
+
}, [renderSlot(n.$slots, "prefix")], 2)) : createCommentVNode("", !0),
|
|
26796
|
+
e.type === "textarea" ? (openBlock(), createElementBlock("textarea", mergeProps({
|
|
26797
|
+
key: 2,
|
|
26798
|
+
ref_key: "inputRef",
|
|
26799
|
+
ref: f,
|
|
26800
|
+
value: e.modelValue ?? "",
|
|
26801
|
+
class: [unref(i).input, unref(i).textarea],
|
|
26802
|
+
placeholder: e.placeholder,
|
|
26803
|
+
disabled: e.disabled,
|
|
26804
|
+
readonly: e.readonly,
|
|
26805
|
+
rows: e.autosize ? void 0 : e.rows,
|
|
26806
|
+
maxlength: e.maxlength,
|
|
26807
|
+
autocomplete: e.autocomplete,
|
|
26808
|
+
name: e.name,
|
|
26809
|
+
style: e.autosize ? {
|
|
26810
|
+
...U7.value,
|
|
26811
|
+
resize: "none",
|
|
26812
|
+
overflow: "hidden"
|
|
26813
|
+
} : void 0
|
|
26814
|
+
}, k.value, {
|
|
26815
|
+
onInput: I7,
|
|
26816
|
+
onBlur: L7,
|
|
26817
|
+
onFocus: R7,
|
|
26818
|
+
onKeydown: z7,
|
|
26819
|
+
onMousedown: B7
|
|
26820
|
+
}), null, 16, _hoisted_2$34)) : (openBlock(), createElementBlock("input", mergeProps({
|
|
26821
|
+
key: 1,
|
|
26822
|
+
ref_key: "inputRef",
|
|
26823
|
+
ref: f,
|
|
26824
|
+
type: e.type,
|
|
26825
|
+
value: e.modelValue ?? "",
|
|
26826
|
+
class: unref(i).input,
|
|
26827
|
+
placeholder: e.placeholder,
|
|
26828
|
+
disabled: e.disabled,
|
|
26829
|
+
readonly: e.readonly,
|
|
26830
|
+
maxlength: e.maxlength,
|
|
26831
|
+
autocomplete: e.autocomplete,
|
|
26832
|
+
name: e.name
|
|
26833
|
+
}, k.value, {
|
|
26834
|
+
onInput: I7,
|
|
26835
|
+
onBlur: L7,
|
|
26836
|
+
onFocus: R7,
|
|
26837
|
+
onKeydown: z7,
|
|
26838
|
+
onMousedown: B7
|
|
26839
|
+
}), null, 16, _hoisted_1$57)),
|
|
26840
|
+
n.$slots.suffix ? (openBlock(), createElementBlock("span", {
|
|
26841
|
+
key: 3,
|
|
26842
|
+
class: normalizeClass(unref(i).suffix)
|
|
26843
|
+
}, [renderSlot(n.$slots, "suffix")], 2)) : createCommentVNode("", !0),
|
|
26844
|
+
H7.value ? (openBlock(), createElementBlock("button", {
|
|
26845
|
+
key: 4,
|
|
26846
|
+
type: "button",
|
|
26847
|
+
class: normalizeClass(unref(i).clearButton),
|
|
26848
|
+
tabindex: "-1",
|
|
26849
|
+
onClick: V7
|
|
26850
|
+
}, [createVNode(Icon_default, {
|
|
26851
|
+
icon: "x",
|
|
26852
|
+
size: "small"
|
|
26853
|
+
})], 2)) : createCommentVNode("", !0)
|
|
26854
|
+
], 2),
|
|
26847
26855
|
n.$slots.append ? (openBlock(), createElementBlock("span", {
|
|
26848
|
-
key:
|
|
26856
|
+
key: 1,
|
|
26849
26857
|
class: normalizeClass(unref(i).append)
|
|
26850
26858
|
}, [renderSlot(n.$slots, "append")], 2)) : createCommentVNode("", !0)
|
|
26851
26859
|
], 16));
|
|
26852
26860
|
}
|
|
26853
26861
|
}), [["__cssModules", { $style: {
|
|
26854
|
-
inputContainer: "
|
|
26855
|
-
|
|
26856
|
-
|
|
26857
|
-
|
|
26858
|
-
|
|
26859
|
-
|
|
26860
|
-
|
|
26861
|
-
|
|
26862
|
-
|
|
26863
|
-
|
|
26864
|
-
|
|
26865
|
-
|
|
26866
|
-
|
|
26867
|
-
|
|
26868
|
-
|
|
26869
|
-
|
|
26870
|
-
|
|
26871
|
-
|
|
26862
|
+
inputContainer: "_inputContainer_1n6rn_1",
|
|
26863
|
+
inputWrapper: "_inputWrapper_1n6rn_8",
|
|
26864
|
+
disabled: "_disabled_1n6rn_18",
|
|
26865
|
+
readonly: "_readonly_1n6rn_29",
|
|
26866
|
+
hasPrepend: "_hasPrepend_1n6rn_41",
|
|
26867
|
+
hasAppend: "_hasAppend_1n6rn_46",
|
|
26868
|
+
xlarge: "_xlarge_1n6rn_52",
|
|
26869
|
+
input: "_input_1n6rn_1",
|
|
26870
|
+
textarea: "_textarea_1n6rn_61",
|
|
26871
|
+
large: "_large_1n6rn_66",
|
|
26872
|
+
medium: "_medium_1n6rn_80",
|
|
26873
|
+
small: "_small_1n6rn_94",
|
|
26874
|
+
mini: "_mini_1n6rn_108",
|
|
26875
|
+
prefix: "_prefix_1n6rn_171",
|
|
26876
|
+
suffix: "_suffix_1n6rn_172",
|
|
26877
|
+
clearButton: "_clearButton_1n6rn_179",
|
|
26878
|
+
prepend: "_prepend_1n6rn_201",
|
|
26879
|
+
append: "_append_1n6rn_202",
|
|
26880
|
+
hiddenTextarea: "_hiddenTextarea_1n6rn_221"
|
|
26872
26881
|
} }]]), MessageRating_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
26873
26882
|
__name: "MessageRating",
|
|
26874
26883
|
props: {
|