@leaflink/stash 50.0.4 → 50.0.6

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,95 +0,0 @@
1
- import { defineComponent as _, useAttrs as B, useSlots as T, computed as l, openBlock as a, createBlock as w, resolveDynamicComponent as k, mergeProps as O, unref as f, withCtx as b, createTextVNode as R, toDisplayString as h, createCommentVNode as m, createElementBlock as o, renderSlot as u } from "vue";
2
- import p from "lodash-es/uniqueId";
3
- import { _ as q } from "./Label.vue_vue_type_script_setup_true_lang-C4JKdqvC.js";
4
- const E = ["aria-labelledby"], L = ["id"], S = {
5
- key: 4,
6
- class: "stash-field-hint tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs",
7
- "data-test": "stash-field-hint"
8
- }, g = {
9
- key: 5,
10
- class: "stash-field-hint tw-mt-1 tw-whitespace-pre-line tw-text-xs",
11
- "data-test": "stash-field-hint"
12
- }, D = /* @__PURE__ */ _({
13
- inheritAttrs: !1,
14
- __name: "Field",
15
- props: {
16
- addBottomSpace: { type: Boolean, default: !1 },
17
- errorText: { default: void 0 },
18
- hintText: { default: void 0 },
19
- id: { default: void 0 },
20
- errorId: { default: void 0 },
21
- isReadOnly: { type: Boolean },
22
- isRequired: { type: Boolean, default: !1 },
23
- label: { default: void 0 },
24
- showOptionalInLabel: { type: Boolean, default: !1 },
25
- fieldset: { type: Boolean, default: !1 },
26
- disabled: { type: Boolean, default: !1 }
27
- },
28
- setup(v) {
29
- const e = v, y = B(), r = T(), d = l(() => e.id || p("stash-field-")), i = l(() => e.errorId || p("stash-field-error-")), s = l(() => p("stash-field-label-")), n = l(() => !!e.errorText), I = l(() => e.fieldset ? "fieldset" : "div"), x = l(() => {
30
- const { placeholder: t, ...c } = y;
31
- return c;
32
- });
33
- return (t, c) => (a(), w(k(I.value), O({
34
- "data-test": "stash-field",
35
- class: ["stash-field", [
36
- { "tw-p-0": e.fieldset },
37
- { "tw-mb-9": e.addBottomSpace && !e.errorText && !e.hintText && !f(r).hint },
38
- { "tw-mb-4": e.addBottomSpace && (e.errorText || e.hintText || f(r).hint) },
39
- { "stash-field--disabled": e.disabled }
40
- ]]
41
- }, x.value), {
42
- default: b(() => [
43
- e.label ? (a(), w(q, {
44
- key: 0,
45
- id: s.value,
46
- for: d.value,
47
- "has-error": n.value,
48
- "is-required": t.isRequired,
49
- "show-optional": e.showOptionalInLabel,
50
- legend: e.fieldset,
51
- disabled: e.disabled
52
- }, {
53
- default: b(() => [
54
- R(h(e.label), 1)
55
- ]),
56
- _: 1
57
- }, 8, ["id", "for", "has-error", "is-required", "show-optional", "legend", "disabled"])) : m("", !0),
58
- e.isReadOnly ? (a(), o("div", {
59
- key: 1,
60
- "aria-labelledby": s.value
61
- }, [
62
- u(t.$slots, "default", {
63
- fieldId: d.value,
64
- fieldErrorId: i.value,
65
- hasError: n.value,
66
- isRequired: t.isRequired,
67
- labelId: s.value,
68
- showOptionalInLabel: e.showOptionalInLabel
69
- })
70
- ], 8, E)) : u(t.$slots, "default", {
71
- key: 2,
72
- fieldId: d.value,
73
- fieldErrorId: i.value,
74
- hasError: n.value,
75
- isRequired: t.isRequired,
76
- labelId: s.value,
77
- showOptionalInLabel: e.showOptionalInLabel
78
- }),
79
- e.errorText ? (a(), o("span", {
80
- key: 3,
81
- id: i.value,
82
- class: "stash-field-error tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs tw-text-red-500",
83
- "data-test": "stash-field-error"
84
- }, h(e.errorText), 9, L)) : e.hintText && !e.isReadOnly ? (a(), o("span", S, h(e.hintText), 1)) : f(r).hint && !e.isReadOnly ? (a(), o("div", g, [
85
- u(t.$slots, "hint")
86
- ])) : m("", !0)
87
- ]),
88
- _: 3
89
- }, 16, ["class"]));
90
- }
91
- });
92
- export {
93
- D as _
94
- };
95
- //# sourceMappingURL=Field.vue_vue_type_script_setup_true_lang-DjxUvSRF.js.map