@indielayer/ui 1.7.3 → 1.7.5

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.
@@ -1,17 +1,17 @@
1
- import { defineComponent as x, ref as P, watch as q, openBlock as m, createBlock as d, normalizeStyle as K, unref as r, normalizeClass as R, withCtx as j, createElementVNode as F, mergeProps as H, toHandlers as L, withKeys as $, createCommentVNode as D } from "vue";
2
- import { useResizeObserver as O, useEventListener as X } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.9/node_modules/@vueuse/core/index.js";
3
- import { useCSS as A } from "../../composables/useCSS.js";
4
- import { useTheme as G } from "../../composables/useTheme.js";
5
- import { useCommon as u } from "../../composables/useCommon.js";
6
- import { useColors as J } from "../../composables/useColors.js";
7
- import { useInputtable as s } from "../../composables/useInputtable.js";
8
- import { useInteractive as p } from "../../composables/useInteractive.js";
9
- import M from "../label/Label.vue.js";
10
- import Q from "../inputFooter/InputFooter.vue.js";
11
- const U = ["id", "disabled", "max", "maxlength", "min", "dir", "rows", "minlength", "name", "placeholder", "readonly", "value", "onKeydown"], W = {
12
- ...u.props(),
13
- ...p.props(),
14
- ...s.props(),
1
+ import { defineComponent as q, useAttrs as K, computed as R, ref as A, watch as F, openBlock as u, createBlock as p, normalizeStyle as H, unref as r, normalizeClass as L, withCtx as O, createElementVNode as $, mergeProps as D, toHandlers as W, withKeys as X, createCommentVNode as G } from "vue";
2
+ import { useResizeObserver as J, useEventListener as M } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.9/node_modules/@vueuse/core/index.js";
3
+ import { useCSS as Q } from "../../composables/useCSS.js";
4
+ import { useTheme as U } from "../../composables/useTheme.js";
5
+ import { useCommon as f } from "../../composables/useCommon.js";
6
+ import { useColors as Y } from "../../composables/useColors.js";
7
+ import { useInputtable as a } from "../../composables/useInputtable.js";
8
+ import { useInteractive as c } from "../../composables/useInteractive.js";
9
+ import Z from "../label/Label.vue.js";
10
+ import _ from "../inputFooter/InputFooter.vue.js";
11
+ const ee = ["id", "disabled", "max", "maxlength", "min", "dir", "rows", "minlength", "name", "placeholder", "readonly", "value", "onKeydown"], re = {
12
+ ...f.props(),
13
+ ...c.props(),
14
+ ...a.props(),
15
15
  dir: {
16
16
  type: String,
17
17
  default: "ltr"
@@ -29,62 +29,62 @@ const U = ["id", "disabled", "max", "maxlength", "min", "dir", "rows", "minlengt
29
29
  preventEnter: Boolean,
30
30
  block: Boolean,
31
31
  resizable: Boolean
32
- }, Y = {
32
+ }, oe = {
33
33
  name: "XTextarea",
34
34
  validators: {
35
- ...u.validators()
35
+ ...f.validators()
36
36
  }
37
- }, de = /* @__PURE__ */ x({
38
- ...Y,
39
- props: W,
40
- emits: s.emits(),
41
- setup(f, { expose: c, emit: h }) {
42
- const t = f, b = h, o = P(null);
43
- O(o, n), typeof window < "u" && X(window, "resize", n), q([() => t.modelValue, () => t.size], () => {
37
+ }, ce = /* @__PURE__ */ q({
38
+ ...oe,
39
+ props: re,
40
+ emits: a.emits(),
41
+ setup(h, { expose: b, emit: g }) {
42
+ const t = h, y = g, i = K(), v = R(() => Object.keys(i).reduce((e, s) => (s.startsWith("data-") && (e[s] = i[s]), e), {})), o = A(null);
43
+ J(o, n), typeof window < "u" && M(window, "resize", n), F([() => t.modelValue, () => t.size], () => {
44
44
  setTimeout(n);
45
45
  });
46
- const g = A("textarea"), y = J().getPalette("primary"), v = g.get("border", y[400]);
47
- function w() {
46
+ const w = Q("textarea"), S = Y().getPalette("primary"), k = w.get("border", S[400]);
47
+ function N() {
48
48
  n();
49
49
  }
50
- function S(e) {
50
+ function T(e) {
51
51
  t.preventEnter && e.preventDefault(), e.stopPropagation();
52
52
  }
53
53
  function n() {
54
54
  t.adjustToText && o.value && (o.value.style.height = "1px", o.value.style.height = 2 + o.value.scrollHeight + "px");
55
55
  }
56
- const { focus: a, blur: k } = p(o), {
56
+ const { focus: m, blur: z } = c(o), {
57
57
  errorInternal: l,
58
- hideFooterInternal: N,
59
- isInsideForm: T,
60
- inputListeners: z,
61
- reset: C,
62
- validate: B,
63
- setError: E
64
- } = s(t, { focus: a, emit: b }), { styles: I, classes: i, className: V } = G("Textarea", {}, t, { errorInternal: l });
65
- return c({ focus: a, blur: k, reset: C, validate: B, setError: E }), (e, _) => (m(), d(M, {
66
- style: K(r(I)),
58
+ hideFooterInternal: C,
59
+ isInsideForm: B,
60
+ inputListeners: E,
61
+ reset: I,
62
+ validate: V,
63
+ setError: x
64
+ } = a(t, { focus: m, emit: y }), { styles: P, classes: d, className: j } = U("Textarea", {}, t, { errorInternal: l });
65
+ return b({ focus: m, blur: z, reset: I, validate: V, setError: x }), (e, s) => (u(), p(Z, {
66
+ style: H(r(P)),
67
67
  block: e.block,
68
68
  disabled: e.disabled,
69
69
  required: e.required,
70
- "is-inside-form": r(T),
70
+ "is-inside-form": r(B),
71
71
  label: e.label,
72
- class: R([
73
- r(V),
74
- r(i).wrapper
72
+ class: L([
73
+ r(j),
74
+ r(d).wrapper
75
75
  ]),
76
76
  tooltip: e.tooltip
77
77
  }, {
78
- default: j(() => [
79
- F("textarea", H({
78
+ default: O(() => [
79
+ $("textarea", D({
80
80
  id: e.id,
81
81
  ref_key: "elRef",
82
82
  ref: o,
83
83
  class: ["", [
84
- r(i).input,
84
+ r(d).input,
85
85
  r(l) ? "border-error-500 dark:border-error-400 focus:outline-error-500" : "focus:outline-[color:var(--x-textarea-border)]"
86
86
  ]],
87
- style: r(v),
87
+ style: r(k),
88
88
  disabled: e.disabled,
89
89
  max: e.max,
90
90
  maxlength: e.maxlength,
@@ -96,11 +96,11 @@ const U = ["id", "disabled", "max", "maxlength", "min", "dir", "rows", "minlengt
96
96
  placeholder: e.placeholder,
97
97
  readonly: e.readonly,
98
98
  value: typeof e.modelValue < "u" ? String(e.modelValue) : ""
99
- }, L(r(z), !0), {
100
- onKeydown: $(S, ["enter"]),
101
- onInput: w
102
- }), null, 16, U),
103
- r(N) ? D("", !0) : (m(), d(Q, {
99
+ }, v.value, W(r(E), !0), {
100
+ onKeydown: X(T, ["enter"]),
101
+ onInput: N
102
+ }), null, 16, ee),
103
+ r(C) ? G("", !0) : (u(), p(_, {
104
104
  key: 0,
105
105
  error: r(l),
106
106
  helper: e.helper
@@ -111,5 +111,5 @@ const U = ["id", "disabled", "max", "maxlength", "min", "dir", "rows", "minlengt
111
111
  }
112
112
  });
113
113
  export {
114
- de as default
114
+ ce as default
115
115
  };