@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"), w = computed(() => {
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
- }), k = computed(() => {
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
- }, A7 = computed(() => $[s.size]), M7 = computed(() => [
26700
+ }, M7 = computed(() => A7[s.size]), N7 = computed(() => [
26701
26701
  "n8n-input",
26702
26702
  i.inputContainer,
26703
- A7.value,
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
- ]), N7 = ref(!1), P7 = (e) => {
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("keydown", e);
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
- }, z7 = () => {
26723
- l("update:modelValue", ""), X7();
26724
- }, B7 = computed(() => s.clearable && !s.disabled && s.modelValue !== "" && s.modelValue !== null), V7 = ref({}), H7, U7 = [
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 W7(e, n, r) {
26742
- H7 || (H7 = document.createElement("textarea"), document.body.appendChild(H7));
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 = U7.map((e) => `${e}:${o.getPropertyValue(e)}`).join(";");
26744
- H7.className = i.hiddenTextarea, H7.setAttribute("style", f), H7.value = e.value || e.placeholder || "";
26745
- let p = H7.scrollHeight, _ = { height: "" };
26746
- s === "border-box" ? p += d : s === "content-box" && (p -= l), H7.value = "";
26747
- let y = H7.scrollHeight - l;
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 J7() {
26759
- H7?.parentNode && (H7.parentNode.removeChild(H7), H7 = void 0);
26761
+ function X7() {
26762
+ W7?.parentNode && (W7.parentNode.removeChild(W7), W7 = void 0);
26760
26763
  }
26761
- let Y7 = () => {
26764
+ let Q7 = () => {
26762
26765
  if (s.type !== "textarea" || !s.autosize || !f.value) return;
26763
26766
  let e = f.value;
26764
- V7.value = W7(e, typeof s.autosize == "object" ? s.autosize.minRows : void 0, typeof s.autosize == "object" ? s.autosize.maxRows : void 0), J7();
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
- Y7();
26770
+ Q7();
26768
26771
  }), onBeforeUnmount(() => {
26769
- J7();
26772
+ X7();
26770
26773
  }), watch(() => s.modelValue, () => {
26771
- s.type === "textarea" && s.autosize && nextTick(Y7);
26774
+ s.type === "textarea" && s.autosize && nextTick(Q7);
26772
26775
  }), onMounted(() => {
26773
- s.autofocus && X7(), s.type === "textarea" && s.autosize && nextTick(Y7);
26776
+ s.autofocus && e9(), s.type === "textarea" && s.autosize && nextTick(Q7);
26774
26777
  });
26775
- let X7 = () => f.value?.focus();
26778
+ let e9 = () => f.value?.focus();
26776
26779
  return n({
26777
- focus: X7,
26780
+ focus: e9,
26778
26781
  blur: () => f.value?.blur(),
26779
26782
  select: () => f.value?.select()
26780
- }), (n, r) => (openBlock(), createElementBlock("div", mergeProps({ class: M7.value }, k.value), [
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
- n.$slots.prefix ? (openBlock(), createElementBlock("span", {
26786
- key: 1,
26787
- class: normalizeClass(unref(i).prefix)
26788
- }, [renderSlot(n.$slots, "prefix")], 2)) : createCommentVNode("", !0),
26789
- e.type === "textarea" ? (openBlock(), createElementBlock("textarea", mergeProps({
26790
- key: 3,
26791
- ref_key: "inputRef",
26792
- ref: f,
26793
- value: e.modelValue ?? "",
26794
- class: [unref(i).input, unref(i).textarea],
26795
- placeholder: e.placeholder,
26796
- disabled: e.disabled,
26797
- readonly: e.readonly,
26798
- rows: e.autosize ? void 0 : e.rows,
26799
- maxlength: e.maxlength,
26800
- autocomplete: e.autocomplete,
26801
- name: e.name,
26802
- style: e.autosize ? {
26803
- ...V7.value,
26804
- resize: "none",
26805
- overflow: "hidden"
26806
- } : void 0
26807
- }, w.value, {
26808
- onInput: P7,
26809
- onBlur: F7,
26810
- onFocus: I7,
26811
- onKeydown: L7,
26812
- onMousedown: R7
26813
- }), null, 16, _hoisted_2$34)) : (openBlock(), createElementBlock("input", mergeProps({
26814
- key: 2,
26815
- ref_key: "inputRef",
26816
- ref: f,
26817
- type: e.type,
26818
- value: e.modelValue ?? "",
26819
- class: unref(i).input,
26820
- placeholder: e.placeholder,
26821
- disabled: e.disabled,
26822
- readonly: e.readonly,
26823
- maxlength: e.maxlength,
26824
- autocomplete: e.autocomplete,
26825
- name: e.name
26826
- }, w.value, {
26827
- onInput: P7,
26828
- onBlur: F7,
26829
- onFocus: I7,
26830
- onKeydown: L7,
26831
- onMousedown: R7
26832
- }), null, 16, _hoisted_1$57)),
26833
- n.$slots.suffix ? (openBlock(), createElementBlock("span", {
26834
- key: 4,
26835
- class: normalizeClass(unref(i).suffix)
26836
- }, [renderSlot(n.$slots, "suffix")], 2)) : createCommentVNode("", !0),
26837
- B7.value ? (openBlock(), createElementBlock("button", {
26838
- key: 5,
26839
- type: "button",
26840
- class: normalizeClass(unref(i).clearButton),
26841
- tabindex: "-1",
26842
- onClick: z7
26843
- }, [createVNode(Icon_default, {
26844
- icon: "x",
26845
- size: "small"
26846
- })], 2)) : createCommentVNode("", !0),
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: 6,
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: "_inputContainer_xi8hx_1",
26855
- disabled: "_disabled_xi8hx_8",
26856
- readonly: "_readonly_xi8hx_12",
26857
- hasPrepend: "_hasPrepend_xi8hx_16",
26858
- hasAppend: "_hasAppend_xi8hx_21",
26859
- xlarge: "_xlarge_xi8hx_27",
26860
- input: "_input_xi8hx_1",
26861
- textarea: "_textarea_xi8hx_33",
26862
- large: "_large_xi8hx_38",
26863
- medium: "_medium_xi8hx_49",
26864
- small: "_small_xi8hx_60",
26865
- mini: "_mini_xi8hx_71",
26866
- prefix: "_prefix_xi8hx_156",
26867
- suffix: "_suffix_xi8hx_157",
26868
- clearButton: "_clearButton_xi8hx_164",
26869
- prepend: "_prepend_xi8hx_186",
26870
- append: "_append_xi8hx_187",
26871
- hiddenTextarea: "_hiddenTextarea_xi8hx_206"
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: {