@zealsolutions/zeal-ui 1.0.0-alpha.358 → 1.0.0-alpha.359

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.
@@ -0,0 +1,68 @@
1
+ import { openBlock as a, createElementBlock as l, createElementVNode as t, normalizeClass as n, createTextVNode as r, toDisplayString as s, createCommentVNode as o, createVNode as d, withCtx as c, renderSlot as f } from "vue";
2
+ import { _ as m } from "./TruncateText-BOyOYUV6.js";
3
+ const u = { class: "flex justify-between text-style-label select-none" }, h = { class: "flex items-baseline gap-x-2 min-w-0 pr-5" }, x = ["for"], y = {
4
+ key: 0,
5
+ class: "text-app-950"
6
+ }, p = { class: "flex mt-2.5" }, _ = {
7
+ __name: "FormField",
8
+ props: {
9
+ label: {
10
+ type: String,
11
+ default: ""
12
+ },
13
+ errorMessage: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ required: {
18
+ type: Boolean,
19
+ default: !1
20
+ },
21
+ disabled: {
22
+ type: Boolean,
23
+ default: !1
24
+ },
25
+ // SOP-Admin #435: optional grey helper text shown beside the label.
26
+ hint: {
27
+ type: String,
28
+ default: ""
29
+ },
30
+ // #435: when true the hint renders in the error colour (limit hit).
31
+ hintError: {
32
+ type: Boolean,
33
+ default: !1
34
+ }
35
+ },
36
+ setup(e) {
37
+ return (i, b) => (a(), l("div", null, [
38
+ t("div", u, [
39
+ t("div", h, [
40
+ t("label", {
41
+ for: e.label,
42
+ class: n(["whitespace-nowrap font-medium", e.disabled ? "text-steel-800" : ""])
43
+ }, [
44
+ r(s(e.label), 1),
45
+ e.required ? (a(), l("span", y, " *")) : o("", !0)
46
+ ], 10, x),
47
+ e.hint ? (a(), l("span", {
48
+ key: 0,
49
+ "data-testid": "field-hint",
50
+ class: n(["whitespace-nowrap font-medium", e.hintError ? "text-error-950" : "text-steel-800 dark:text-content-muted"])
51
+ }, s(e.hint), 3)) : o("", !0)
52
+ ]),
53
+ d(m, { class: "text-error-950 select-none" }, {
54
+ default: c(() => [
55
+ r(s(e.errorMessage), 1)
56
+ ]),
57
+ _: 1
58
+ })
59
+ ]),
60
+ t("div", p, [
61
+ f(i.$slots, "default")
62
+ ])
63
+ ]));
64
+ }
65
+ };
66
+ export {
67
+ _
68
+ };
@@ -0,0 +1,71 @@
1
+ import { mergeModels as a, useModel as m, computed as g, openBlock as i, createElementBlock as h, normalizeClass as s, renderSlot as x, withDirectives as b, createElementVNode as y, vModelDynamic as k, createBlock as v, createCommentVNode as w } from "vue";
2
+ import B from "./CircleExclamationIcon-vvAjN3c9.js";
3
+ const E = ["name", "type", "placeholder", "disabled", "maxlength"], I = {
4
+ __name: "InputField",
5
+ props: /* @__PURE__ */ a({
6
+ hasError: {
7
+ type: Boolean,
8
+ default: !1
9
+ },
10
+ label: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ placeholder: {
15
+ type: String,
16
+ default: ""
17
+ },
18
+ fieldType: {
19
+ type: String,
20
+ default: "text"
21
+ },
22
+ disabled: {
23
+ type: Boolean,
24
+ default: !1
25
+ },
26
+ // SOP-Admin #435: native character cap. `maxlength` blocks typing past the limit; combined with
27
+ // the `overflow` event below it lets a wrapper warn the user when they try to exceed it.
28
+ maxlength: {
29
+ type: Number,
30
+ default: null
31
+ }
32
+ }, {
33
+ modelValue: {},
34
+ modelModifiers: {}
35
+ }),
36
+ emits: /* @__PURE__ */ a(["blur", "overflow"], ["update:modelValue"]),
37
+ setup(e, { emit: d }) {
38
+ const t = e, o = d, l = m(e, "modelValue"), u = () => {
39
+ o("blur");
40
+ }, c = (r) => {
41
+ if (t.maxlength == null)
42
+ return;
43
+ String(r.inputType || "").startsWith("insert") && String(l.value ?? "").length >= t.maxlength && o("overflow");
44
+ }, p = g(() => t.hasError && !t.disabled ? "ring-error-950 focus-within:bg-error-100 focus-within:ring-error-950 text-error-950" : t.disabled ? "ring-steel-500 dark:ring-line-strong bg-steel-100 dark:bg-surface cursor-not-allowed" : "ring-steel-500 dark:ring-line-strong focus-within:bg-app-100 focus-within:ring-app-950 dark:focus-within:text-black-950 text-black-950 dark:text-content");
45
+ return (r, n) => (i(), h("div", {
46
+ class: s(["relative flex flex-1 gap-x-2 px-4 text-style-input items-center h-10 rounded-[20px] ring-1 ring-inset focus-within:ring-2 focus-within:outline-none", p.value])
47
+ }, [
48
+ x(r.$slots, "icon"),
49
+ b(y("input", {
50
+ "onUpdate:modelValue": n[0] || (n[0] = (f) => l.value = f),
51
+ name: e.label,
52
+ onBlur: u,
53
+ onBeforeinput: c,
54
+ type: e.fieldType,
55
+ class: s(["flex-1 border-0 bg-[transparent] pl-0 ring-0 focus:ring-0 outline-none focus:outline-none disabled:placeholder:text-steel-800 dark:disabled:placeholder:text-content-muted disabled:pointer-events-none", e.hasError ? " focus:placeholder:text-error-950 pr-6" : "placeholder:text-steel-950 dark:placeholder:text-content-muted pr-0"]),
56
+ placeholder: e.placeholder,
57
+ disabled: e.disabled,
58
+ maxlength: e.maxlength
59
+ }, null, 42, E), [
60
+ [k, l.value]
61
+ ]),
62
+ e.hasError ? (i(), v(B, {
63
+ key: 0,
64
+ class: "absolute top-1/2 -translate-y-1/2 right-3 scale-[0.8182] pointer-events-none text-error-950"
65
+ })) : w("", !0)
66
+ ], 2));
67
+ }
68
+ };
69
+ export {
70
+ I as _
71
+ };
@@ -1,19 +1,19 @@
1
- import { openBlock as n, createElementBlock as b, createElementVNode as p, renderSlot as o, mergeModels as d, useModel as y, computed as s, createBlock as h, withCtx as g, createVNode as x } from "vue";
2
- import { _ as B } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
3
- import { _ as V } from "../../FormField-XR9nvyQr.js";
4
- import { _ as v } from "../../InputField-BrSFZ5Eu.js";
5
- const _ = {}, F = { class: "flex flex-col space-y-12" }, $ = { class: "flex flex-col space-y-6" };
6
- function q(e, l) {
7
- return n(), b("div", F, [
8
- p("form", $, [
9
- o(e.$slots, "default")
1
+ import { openBlock as f, createElementBlock as g, createElementVNode as p, renderSlot as u, mergeModels as i, useModel as x, computed as m, ref as y, watch as v, createBlock as B, withCtx as V, createVNode as S } from "vue";
2
+ import { _ as $ } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
3
+ import { _ as F } from "../../FormField-CrpT1GTF.js";
4
+ import { _ as q } from "../../InputField-D6bS7qJm.js";
5
+ const M = {}, k = { class: "flex flex-col space-y-12" }, w = { class: "flex flex-col space-y-6" };
6
+ function E(e, o) {
7
+ return f(), g("div", k, [
8
+ p("form", w, [
9
+ u(e.$slots, "default")
10
10
  ]),
11
- o(e.$slots, "footer")
11
+ u(e.$slots, "footer")
12
12
  ]);
13
13
  }
14
- const I = /* @__PURE__ */ B(_, [["render", q]]), N = {
14
+ const T = /* @__PURE__ */ $(M, [["render", E]]), A = {
15
15
  __name: "FormInput",
16
- props: /* @__PURE__ */ d({
16
+ props: /* @__PURE__ */ i({
17
17
  required: {
18
18
  type: Boolean,
19
19
  default: !1
@@ -37,40 +37,58 @@ const I = /* @__PURE__ */ B(_, [["render", q]]), N = {
37
37
  disabled: {
38
38
  type: Boolean,
39
39
  default: !1
40
+ },
41
+ // SOP-Admin #435: native character cap passed to the input.
42
+ maxlength: {
43
+ type: Number,
44
+ default: null
45
+ },
46
+ // #435: grey helper text beside the label that turns red when the user tries to exceed maxlength.
47
+ hint: {
48
+ type: String,
49
+ default: ""
40
50
  }
41
51
  }, {
42
52
  modelValue: {},
43
53
  modelModifiers: {}
44
54
  }),
45
- emits: /* @__PURE__ */ d(["blur"], ["update:modelValue"]),
46
- setup(e, { emit: l }) {
47
- const u = e, i = l, r = y(e, "modelValue"), c = s(() => a.value.length > 0), m = () => {
48
- i("blur");
49
- }, a = s(() => Array.from(u.errors).join(", "));
50
- return (M, t) => (n(), h(V, {
55
+ emits: /* @__PURE__ */ i(["blur"], ["update:modelValue"]),
56
+ setup(e, { emit: o }) {
57
+ const t = e, c = o, r = x(e, "modelValue"), h = m(() => d.value.length > 0), a = y(!1);
58
+ v(r, (n) => {
59
+ (t.maxlength == null || String(n ?? "").length < t.maxlength) && (a.value = !1);
60
+ });
61
+ const b = () => {
62
+ c("blur");
63
+ }, d = m(() => Array.from(t.errors).join(", "));
64
+ return (n, l) => (f(), B(F, {
51
65
  label: e.label,
52
- "error-message": a.value,
66
+ "error-message": d.value,
53
67
  required: e.required,
54
- disabled: e.disabled
68
+ disabled: e.disabled,
69
+ hint: e.hint,
70
+ "hint-error": a.value
55
71
  }, {
56
- default: g(() => [
57
- x(v, {
72
+ default: V(() => [
73
+ S(q, {
58
74
  modelValue: r.value,
59
- "onUpdate:modelValue": t[0] || (t[0] = (f) => r.value = f),
60
- "has-error": c.value,
75
+ "onUpdate:modelValue": l[0] || (l[0] = (s) => r.value = s),
76
+ "has-error": h.value,
61
77
  placeholder: e.placeholder,
62
78
  "field-type": e.fieldType,
63
79
  label: e.label,
64
80
  disabled: e.disabled,
65
- onBlur: m
66
- }, null, 8, ["modelValue", "has-error", "placeholder", "field-type", "label", "disabled"])
81
+ maxlength: e.maxlength,
82
+ onBlur: b,
83
+ onOverflow: l[1] || (l[1] = (s) => a.value = !0)
84
+ }, null, 8, ["modelValue", "has-error", "placeholder", "field-type", "label", "disabled", "maxlength"])
67
85
  ]),
68
86
  _: 1
69
- }, 8, ["label", "error-message", "required", "disabled"]));
87
+ }, 8, ["label", "error-message", "required", "disabled", "hint", "hint-error"]));
70
88
  }
71
89
  };
72
90
  export {
73
- I as BaseForm,
74
- V as FormField,
75
- N as FormInput
91
+ T as BaseForm,
92
+ F as FormField,
93
+ A as FormInput
76
94
  };
@@ -1,4 +1,4 @@
1
- import { openBlock as a, createElementBlock as u, createVNode as T, createElementVNode as r, createTextVNode as j, mergeModels as te, useModel as ke, getCurrentInstance as ie, ref as k, computed as $, watch as K, nextTick as ne, onMounted as ge, onBeforeUnmount as we, createBlock as E, Teleport as Ce, withModifiers as N, withDirectives as G, vModelText as $e, createCommentVNode as v, normalizeClass as M, toDisplayString as b, Fragment as H, renderList as P, normalizeStyle as q, pushScopeId as Se, popScopeId as _e, Transition as ce, withCtx as ue, resolveDynamicComponent as de, unref as F, vShow as pe, renderSlot as V } from "vue";
1
+ import { openBlock as a, createElementBlock as i, createVNode as T, createElementVNode as r, createTextVNode as j, mergeModels as te, useModel as ke, getCurrentInstance as ie, ref as k, computed as $, watch as K, nextTick as ne, onMounted as ge, onBeforeUnmount as we, createBlock as E, Teleport as Ce, withModifiers as N, withDirectives as G, vModelText as $e, createCommentVNode as m, normalizeClass as M, toDisplayString as b, Fragment as H, renderList as P, normalizeStyle as q, pushScopeId as Se, popScopeId as _e, Transition as ce, withCtx as ue, resolveDynamicComponent as de, unref as F, vShow as pe, renderSlot as V } from "vue";
2
2
  import Me from "../../HouseIcon-BxmNyxvv.js";
3
3
  import Te from "../../ArrowLeftIcon-Cgsy08pY.js";
4
4
  import fe from "../../MagnifyingGlassIcon-ChYNIA-H.js";
@@ -14,12 +14,12 @@ const Ne = /* @__PURE__ */ r("span", { class: "hidden whitespace-nowrap sm:inlin
14
14
  __name: "GlobalSearchPill",
15
15
  emits: ["click"],
16
16
  setup(e) {
17
- return (i, o) => (a(), u("button", {
17
+ return (c, o) => (a(), i("button", {
18
18
  type: "button",
19
19
  class: "zui-search-pill inline-flex h-[34px] cursor-pointer items-center justify-center gap-[7px] rounded-lg border-[1px] border-solid border-proclusteal-300 dark:border-line bg-surface-raised pl-[11px] pr-[9px] font-sans text-[13px] font-semibold text-proclusteal-600 dark:text-content-muted transition-[border-color,color,box-shadow] duration-150 hover:border-proclusteal-950 dark:hover:border-focus hover:text-proclusteal-800 dark:hover:text-content hover:shadow-[0_1px_3px_rgba(20,40,45,0.08)] focus:border-proclusteal-950 dark:focus:border-focus focus:text-proclusteal-800 dark:focus:text-content focus:outline-none",
20
20
  title: "Search (Ctrl K)",
21
21
  "aria-label": "Search (Ctrl K)",
22
- onClick: o[0] || (o[0] = (y) => i.$emit("click"))
22
+ onClick: o[0] || (o[0] = (y) => c.$emit("click"))
23
23
  }, [
24
24
  T(fe, { class: "!h-[15px] !w-[15px] flex-none text-proclusteal-950 dark:text-focus" }),
25
25
  Ne,
@@ -43,47 +43,47 @@ const Ne = /* @__PURE__ */ r("span", { class: "hidden whitespace-nowrap sm:inlin
43
43
  colour: "#9aa4ad",
44
44
  icon: '<circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>'
45
45
  };
46
- function ze(e, i = {}) {
47
- const o = { ...D, ...i };
46
+ function ze(e, c = {}) {
47
+ const o = { ...D, ...c };
48
48
  return Object.prototype.hasOwnProperty.call(o, e) ? o[e] : { ...Le, label: e };
49
49
  }
50
50
  function De(e) {
51
- return (e == null ? "" : String(e)).replace(/[&<>"']/g, (i) => ({
51
+ return (e == null ? "" : String(e)).replace(/[&<>"']/g, (c) => ({
52
52
  "&": "&amp;",
53
53
  "<": "&lt;",
54
54
  ">": "&gt;",
55
55
  '"': "&quot;",
56
56
  "'": "&#39;"
57
- })[i]);
57
+ })[c]);
58
58
  }
59
59
  function he(e) {
60
60
  if (!e)
61
61
  return "";
62
- const i = String(e).trim();
63
- return /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(i) || /^(rgb|rgba|hsl|hsla)\([0-9.,%\s/]+\)$/i.test(i) || /^[a-z]{3,20}$/i.test(i) ? i : "";
62
+ const c = String(e).trim();
63
+ return /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(c) || /^(rgb|rgba|hsl|hsla)\([0-9.,%\s/]+\)$/i.test(c) || /^[a-z]{3,20}$/i.test(c) ? c : "";
64
64
  }
65
65
  function O(e) {
66
66
  if (!e)
67
67
  return "";
68
- const i = String(e).trim();
69
- if (i.includes("\\"))
68
+ const c = String(e).trim();
69
+ if (c.includes("\\"))
70
70
  return "";
71
71
  let o;
72
72
  try {
73
- o = new URL(i, "https://url-check.invalid/");
73
+ o = new URL(c, "https://url-check.invalid/");
74
74
  } catch {
75
75
  return "";
76
76
  }
77
- return o.protocol === "http:" || o.protocol === "https:" ? i : "";
77
+ return o.protocol === "http:" || o.protocol === "https:" ? c : "";
78
78
  }
79
79
  function je(e) {
80
- return String(e || "").toLowerCase().split(/\s+/).filter((i) => i.length >= 2);
80
+ return String(e || "").toLowerCase().split(/\s+/).filter((c) => c.length >= 2);
81
81
  }
82
- function ae(e, i) {
82
+ function ae(e, c) {
83
83
  const o = De(e);
84
- if (!i || !i.length)
84
+ if (!c || !c.length)
85
85
  return o;
86
- const y = new RegExp(`(${i.map((p) => p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})`, "ig");
86
+ const y = new RegExp(`(${c.map((p) => p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})`, "ig");
87
87
  return o.replace(y, "<mark>$1</mark>");
88
88
  }
89
89
  const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-search-field flex items-center gap-2.5 border-b-[1px] border-proclusteal-200 dark:border-line px-4 py-3.5" }, Be = ["placeholder"], Re = {
@@ -130,12 +130,12 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
130
130
  openModifiers: {}
131
131
  }),
132
132
  emits: /* @__PURE__ */ te(["navigate"], ["update:open"]),
133
- setup(e, { emit: i }) {
134
- const o = e, y = i, p = ke(e, "open"), x = ie(), w = k(null), _ = k(null), A = k(null), g = k(""), S = k(""), m = k([]), f = k("all"), n = k("zero"), c = k(-1);
133
+ setup(e, { emit: c }) {
134
+ const o = e, y = c, p = ke(e, "open"), x = ie(), w = k(null), _ = k(null), A = k(null), g = k(""), S = k(""), v = k([]), f = k("all"), n = k("zero"), u = k(-1);
135
135
  let d = null, C = 0, L = null, I = null;
136
136
  const Q = $(() => je(S.value)), Y = (t) => ze(t, o.types), X = $(() => {
137
137
  let t = 0;
138
- return m.value.filter((s) => f.value === "all" || s.type === f.value).map((s) => {
138
+ return v.value.filter((s) => f.value === "all" || s.type === f.value).map((s) => {
139
139
  const l = Y(s.type);
140
140
  return {
141
141
  type: s.type,
@@ -150,16 +150,16 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
150
150
  }))
151
151
  };
152
152
  });
153
- }), J = $(() => X.value.flatMap((t) => t.items)), ye = $(() => m.value.reduce((t, s) => t + s.items.length, 0));
153
+ }), J = $(() => X.value.flatMap((t) => t.items)), ye = $(() => v.value.reduce((t, s) => t + s.items.length, 0));
154
154
  function U(t) {
155
155
  const s = J.value;
156
156
  if (!s.length) {
157
- c.value = -1;
157
+ u.value = -1;
158
158
  return;
159
159
  }
160
- c.value = Math.min(Math.max(t, 0), s.length - 1), ne(() => {
160
+ u.value = Math.min(Math.max(t, 0), s.length - 1), ne(() => {
161
161
  var h;
162
- const l = (h = A.value) == null ? void 0 : h.querySelector(`[data-row-idx="${c.value}"]`);
162
+ const l = (h = A.value) == null ? void 0 : h.querySelector(`[data-row-idx="${u.value}"]`);
163
163
  l == null || l.scrollIntoView({ block: "nearest" });
164
164
  });
165
165
  }
@@ -181,23 +181,23 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
181
181
  const l = await o.searchProvider(t);
182
182
  if (s !== C || !p.value)
183
183
  return;
184
- m.value = l && l.groups || [], f.value = "all", n.value = m.value.length ? "results" : "empty", U(0);
184
+ v.value = l && l.groups || [], f.value = "all", n.value = v.value.length ? "results" : "empty", U(0);
185
185
  } catch {
186
186
  if (s !== C || !p.value)
187
187
  return;
188
- m.value = [], n.value = "error", c.value = -1;
188
+ v.value = [], n.value = "error", u.value = -1;
189
189
  }
190
190
  }
191
191
  K(g, (t) => {
192
192
  clearTimeout(d);
193
193
  const s = t.trim();
194
194
  if (s.length < o.minChars) {
195
- C++, m.value = [], n.value = s.length ? "hint" : "zero", c.value = -1;
195
+ C++, v.value = [], n.value = s.length ? "hint" : "zero", u.value = -1;
196
196
  return;
197
197
  }
198
198
  d = setTimeout(() => me(s), o.debounce);
199
199
  }), K(p, (t) => {
200
- t ? (L = document.activeElement, g.value = "", S.value = "", m.value = [], f.value = "all", n.value = "zero", c.value = -1, I = document.body.style.overflow, document.body.style.overflow = "hidden", ne(() => {
200
+ t ? (L = document.activeElement, g.value = "", S.value = "", v.value = [], f.value = "all", n.value = "zero", u.value = -1, I = document.body.style.overflow, document.body.style.overflow = "hidden", ne(() => {
201
201
  var s;
202
202
  return (s = w.value) == null ? void 0 : s.focus();
203
203
  })) : (clearTimeout(d), C++, I !== null && (document.body.style.overflow = I, I = null), L != null && L.focus && L.focus());
@@ -209,11 +209,11 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
209
209
  return;
210
210
  }
211
211
  if (t.key === "ArrowDown") {
212
- t.preventDefault(), U(c.value + 1);
212
+ t.preventDefault(), U(u.value + 1);
213
213
  return;
214
214
  }
215
215
  if (t.key === "ArrowUp") {
216
- t.preventDefault(), U(c.value - 1);
216
+ t.preventDefault(), U(u.value - 1);
217
217
  return;
218
218
  }
219
219
  if (t.key === "Enter") {
@@ -222,7 +222,7 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
222
222
  const l = J.value;
223
223
  if (!l.length)
224
224
  return;
225
- t.preventDefault(), Z(l[c.value >= 0 ? c.value : 0].url);
225
+ t.preventDefault(), Z(l[u.value >= 0 ? u.value : 0].url);
226
226
  return;
227
227
  }
228
228
  if (t.key === "Tab") {
@@ -255,7 +255,7 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
255
255
  }), we(() => {
256
256
  document.removeEventListener("keydown", ee), clearTimeout(d), C++, I !== null && (document.body.style.overflow = I, I = null);
257
257
  }), (t, s) => (a(), E(Ce, { to: "body" }, [
258
- p.value ? (a(), u("div", {
258
+ p.value ? (a(), i("div", {
259
259
  key: 0,
260
260
  class: "zui-search-overlay fixed inset-0 z-[20000] flex items-start justify-center bg-[#11181c]/45",
261
261
  onMousedown: N(z, ["self"]),
@@ -290,8 +290,8 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
290
290
  onClick: z
291
291
  }, "×")
292
292
  ]),
293
- n.value === "results" ? (a(), u("div", Re, " Search results ")) : v("", !0),
294
- n.value === "results" ? (a(), u("div", Ve, [
293
+ n.value === "results" ? (a(), i("div", Re, " Search results ")) : m("", !0),
294
+ n.value === "results" ? (a(), i("div", Ve, [
295
295
  r("button", {
296
296
  type: "button",
297
297
  class: M([re, f.value === "all" ? le : ""]),
@@ -302,7 +302,7 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
302
302
  class: M(["font-bold", f.value === "all" ? "opacity-85" : "opacity-60"])
303
303
  }, "(" + b(ye.value) + ")", 3)
304
304
  ], 2),
305
- (a(!0), u(H, null, P(m.value, (l) => (a(), u("button", {
305
+ (a(!0), i(H, null, P(v.value, (l) => (a(), i("button", {
306
306
  key: l.type,
307
307
  type: "button",
308
308
  class: M([re, f.value === l.type ? le : ""]),
@@ -313,44 +313,44 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
313
313
  class: M(["font-bold", f.value === l.type ? "opacity-85" : "opacity-60"])
314
314
  }, "(" + b(l.items.length) + ")", 3)
315
315
  ], 10, Ke))), 128))
316
- ])) : v("", !0),
316
+ ])) : m("", !0),
317
317
  r("div", {
318
318
  ref_key: "resultsEl",
319
319
  ref: A,
320
320
  class: "zui-search-results overflow-y-auto pb-2.5"
321
321
  }, [
322
- n.value === "zero" ? (a(), u("div", {
322
+ n.value === "zero" ? (a(), i("div", {
323
323
  key: 0,
324
324
  class: M(R)
325
- }, " Search across SOPs, incidents, assets, people and more — you only ever see what you have access to. ")) : n.value === "hint" ? (a(), u("div", {
325
+ }, " Search across SOPs, incidents, assets, people and more — you only ever see what you have access to. ")) : n.value === "hint" ? (a(), i("div", {
326
326
  key: 1,
327
327
  class: M(R)
328
- }, " Keep typing… enter at least " + b(e.minChars) + " characters to search. ", 1)) : n.value === "empty" ? (a(), u("div", {
328
+ }, " Keep typing… enter at least " + b(e.minChars) + " characters to search. ", 1)) : n.value === "empty" ? (a(), i("div", {
329
329
  key: 2,
330
330
  class: M(R)
331
- }, " No results for “" + b(S.value) + "” — try a broader term or a code. ", 1)) : n.value === "error" ? (a(), u("div", {
331
+ }, " No results for “" + b(S.value) + "” — try a broader term or a code. ", 1)) : n.value === "error" ? (a(), i("div", {
332
332
  key: 3,
333
333
  class: M(R)
334
- }, " Search is temporarily unavailable. ")) : (a(!0), u(H, { key: 4 }, P(X.value, (l) => (a(), u("div", {
334
+ }, " Search is temporarily unavailable. ")) : (a(!0), i(H, { key: 4 }, P(X.value, (l) => (a(), i("div", {
335
335
  key: l.type
336
336
  }, [
337
337
  r("div", qe, [
338
338
  j(b(l.label) + " ", 1),
339
339
  r("span", Ge, "(" + b(l.items.length) + ")", 1)
340
340
  ]),
341
- (a(!0), u(H, null, P(l.items, (h) => (a(), u("a", {
341
+ (a(!0), i(H, null, P(l.items, (h) => (a(), i("a", {
342
342
  key: h.flatIdx,
343
343
  href: h.url || null,
344
- class: M(["zui-search-row flex items-center gap-[13px] px-[18px] py-[11px] text-[#1e262c] dark:text-content no-underline", { "bg-proclusteal-50 dark:bg-surface-hover": h.flatIdx === c.value }]),
344
+ class: M(["zui-search-row flex items-center gap-[13px] px-[18px] py-[11px] text-[#1e262c] dark:text-content no-underline", { "bg-proclusteal-50 dark:bg-surface-hover": h.flatIdx === u.value }]),
345
345
  "data-row-idx": h.flatIdx,
346
346
  onClick: N((B) => Z(h.url), ["exact", "prevent"]),
347
- onMouseenter: (B) => c.value = h.flatIdx
347
+ onMouseenter: (B) => u.value = h.flatIdx
348
348
  }, [
349
349
  r("span", {
350
350
  class: "inline-flex h-[42px] w-[42px] flex-none items-center justify-center rounded-[10px] text-white",
351
351
  style: q({ background: h.tileColour })
352
352
  }, [
353
- (a(), u("svg", {
353
+ (a(), i("svg", {
354
354
  class: "h-5 w-5",
355
355
  viewBox: "0 0 24 24",
356
356
  fill: "none",
@@ -376,7 +376,7 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
376
376
  ]))), 128))
377
377
  ], 512)
378
378
  ], 512)
379
- ], 32)) : v("", !0)
379
+ ], 32)) : m("", !0)
380
380
  ]));
381
381
  }
382
382
  }, et = /* @__PURE__ */ Ae(Ze, [["__scopeId", "data-v-80fd510b"]]), se = {
@@ -400,14 +400,14 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
400
400
  function tt(e) {
401
401
  if (!e)
402
402
  return "";
403
- const i = String(e).trim();
404
- if (!i)
403
+ const c = String(e).trim();
404
+ if (!c)
405
405
  return "";
406
406
  let o = null;
407
- if (Object.prototype.hasOwnProperty.call(D, i))
408
- o = i;
407
+ if (Object.prototype.hasOwnProperty.call(D, c))
408
+ o = c;
409
409
  else {
410
- const y = i.toLowerCase(), p = Object.keys(D).find((x) => x.toLowerCase() === y);
410
+ const y = c.toLowerCase(), p = Object.keys(D).find((x) => x.toLowerCase() === y);
411
411
  p ? o = p : Object.prototype.hasOwnProperty.call(se, y) && (o = se[y]);
412
412
  }
413
413
  return !o || !Object.prototype.hasOwnProperty.call(D, o) ? "" : D[o].icon || "";
@@ -417,8 +417,8 @@ function nt(e) {
417
417
  return "";
418
418
  if (e.dateText)
419
419
  return String(e.dateText);
420
- const i = e.notifyday != null ? String(e.notifyday).replace(/^0/, "") : "", o = e.notifymonthname ? String(e.notifymonthname) : "", y = e.notifyyear != null ? String(e.notifyyear) : "";
421
- return [i, o, y].filter(Boolean).join(" ");
420
+ const c = e.notifyday != null ? String(e.notifyday).replace(/^0/, "") : "", o = e.notifymonthname ? String(e.notifymonthname) : "", y = e.notifyyear != null ? String(e.notifyyear) : "";
421
+ return [c, o, y].filter(Boolean).join(" ");
422
422
  }
423
423
  const ot = {
424
424
  key: 0,
@@ -460,8 +460,8 @@ const ot = {
460
460
  }
461
461
  },
462
462
  emits: ["markAsRead", "deleteNotification", "navigate", "open"],
463
- setup(e, { emit: i }) {
464
- const o = e, y = i, p = k(null), x = k(!1), w = $(() => {
463
+ setup(e, { emit: c }) {
464
+ const o = e, y = c, p = k(null), x = k(!1), w = $(() => {
465
465
  var n;
466
466
  return ((n = o.notifications) == null ? void 0 : n.data) || [];
467
467
  }), _ = $(() => o.unreadCount !== null && o.unreadCount !== void 0 ? o.unreadCount > 0 : w.value.some((n) => n.ClassRead === "unread"));
@@ -475,13 +475,13 @@ const ot = {
475
475
  return n && Object.prototype.hasOwnProperty.call(o.iconMap, n) && o.iconMap[n] || null;
476
476
  }
477
477
  function S(n) {
478
- const c = g(n.VueAppTypeIcon) || g(n.AppTypeName);
479
- if (c)
480
- return { component: c, path: "" };
478
+ const u = g(n.VueAppTypeIcon) || g(n.AppTypeName);
479
+ if (u)
480
+ return { component: u, path: "" };
481
481
  const d = tt(n.AppTypeName);
482
482
  return d ? { component: null, path: d } : { component: oe, path: "" };
483
483
  }
484
- const m = $(() => w.value.map((n) => ({
484
+ const v = $(() => w.value.map((n) => ({
485
485
  item: n,
486
486
  icon: S(n),
487
487
  date: nt(n),
@@ -489,10 +489,10 @@ const ot = {
489
489
  })));
490
490
  function f(n) {
491
491
  x.value = !1;
492
- const c = O(n);
493
- c && y("navigate", c);
492
+ const u = O(n);
493
+ u && y("navigate", u);
494
494
  }
495
- return (n, c) => (a(), u("div", {
495
+ return (n, u) => (a(), i("div", {
496
496
  ref_key: "rootEl",
497
497
  ref: p,
498
498
  class: "relative font-sans"
@@ -505,7 +505,7 @@ const ot = {
505
505
  onClick: A
506
506
  }, [
507
507
  T(oe, { class: "!h-[21px] !w-[21px]" }),
508
- _.value ? (a(), u("span", ot)) : v("", !0)
508
+ _.value ? (a(), i("span", ot)) : m("", !0)
509
509
  ]),
510
510
  T(ce, {
511
511
  "enter-active-class": "transition-all ease-out duration-75",
@@ -518,8 +518,8 @@ const ot = {
518
518
  default: ue(() => [
519
519
  G(r("div", at, [
520
520
  r("div", rt, [
521
- e.notifications ? w.value.length ? v("", !0) : (a(), u("div", st, " No notifications. ")) : (a(), u("div", lt, " Loading notifications… ")),
522
- (a(!0), u(H, null, P(m.value, (d) => (a(), u("div", {
521
+ e.notifications ? w.value.length ? m("", !0) : (a(), i("div", st, " No notifications. ")) : (a(), i("div", lt, " Loading notifications… ")),
522
+ (a(!0), i(H, null, P(v.value, (d) => (a(), i("div", {
523
523
  key: d.item.NotifyID,
524
524
  class: M(["flex cursor-pointer items-start gap-3 border-b-[1px] border-proclusteal-200 dark:border-line px-4 py-3", d.unread ? "bg-proclusteal-50 dark:bg-surface-hover" : "bg-surface-raised"]),
525
525
  onClick: (C) => f(d.item.url)
@@ -528,7 +528,7 @@ const ot = {
528
528
  d.icon.component ? (a(), E(de(d.icon.component), {
529
529
  key: 0,
530
530
  class: "!h-5 !w-5"
531
- })) : (a(), u("svg", {
531
+ })) : (a(), i("svg", {
532
532
  key: 1,
533
533
  class: "h-5 w-5",
534
534
  viewBox: "0 0 24 24",
@@ -543,10 +543,10 @@ const ot = {
543
543
  r("span", dt, [
544
544
  r("span", pt, b(d.item.notifyname), 1),
545
545
  r("span", ft, b(d.item.summary), 1),
546
- d.date ? (a(), u("span", xt, b(d.date), 1)) : v("", !0)
546
+ d.date ? (a(), i("span", xt, b(d.date), 1)) : m("", !0)
547
547
  ]),
548
548
  r("span", ht, [
549
- d.unread ? (a(), u("button", {
549
+ d.unread ? (a(), i("button", {
550
550
  key: 0,
551
551
  type: "button",
552
552
  class: "hover:text-proclusteal-900 dark:hover:text-focus",
@@ -555,7 +555,7 @@ const ot = {
555
555
  onClick: N((C) => n.$emit("markAsRead", d.item.NotifyID), ["stop"])
556
556
  }, [
557
557
  T(Ie, { class: "!h-4 !w-4" })
558
- ], 8, yt)) : v("", !0),
558
+ ], 8, yt)) : m("", !0),
559
559
  r("button", {
560
560
  type: "button",
561
561
  class: "hover:text-[#dd3730]",
@@ -571,7 +571,7 @@ const ot = {
571
571
  r("a", {
572
572
  href: F(O)(e.notificationsUrl) || null,
573
573
  class: "block border-t-[1px] border-proclusteal-200 dark:border-line px-4 py-2.5 text-center text-[13px] font-bold text-proclusteal-700 dark:text-content no-underline hover:bg-proclusteal-50 dark:hover:bg-surface-hover hover:text-proclusteal-900 dark:hover:text-focus",
574
- onClick: c[0] || (c[0] = N((d) => f(e.notificationsUrl), ["exact", "prevent"]))
574
+ onClick: u[0] || (u[0] = N((d) => f(e.notificationsUrl), ["exact", "prevent"]))
575
575
  }, " See all notifications ", 8, vt)
576
576
  ], 512), [
577
577
  [pe, x.value]
@@ -600,8 +600,8 @@ const ot = {
600
600
  }
601
601
  },
602
602
  emits: ["select"],
603
- setup(e, { emit: i }) {
604
- const o = e, y = i, p = k(null), x = k(!1), w = k(!1);
603
+ setup(e, { emit: c }) {
604
+ const o = e, y = c, p = k(null), x = k(!1), w = k(!1);
605
605
  K(() => o.user.avatarUrl, () => {
606
606
  w.value = !1;
607
607
  });
@@ -612,7 +612,7 @@ const ot = {
612
612
  function g(S) {
613
613
  x.value = !1, y("select", S);
614
614
  }
615
- return (S, m) => (a(), u("div", {
615
+ return (S, v) => (a(), i("div", {
616
616
  ref_key: "rootEl",
617
617
  ref: p,
618
618
  class: "relative font-sans"
@@ -622,15 +622,15 @@ const ot = {
622
622
  class: "flex cursor-pointer items-center justify-center",
623
623
  title: "View Menu Options",
624
624
  "aria-label": "View Menu Options",
625
- onClick: m[1] || (m[1] = (f) => x.value = !x.value)
625
+ onClick: v[1] || (v[1] = (f) => x.value = !x.value)
626
626
  }, [
627
- e.user.avatarUrl && !w.value ? (a(), u("img", {
627
+ e.user.avatarUrl && !w.value ? (a(), i("img", {
628
628
  key: 0,
629
629
  src: e.user.avatarUrl,
630
630
  alt: "",
631
631
  class: "h-[34px] w-[34px] rounded-full object-cover",
632
- onError: m[0] || (m[0] = (f) => w.value = !0)
633
- }, null, 40, kt)) : (a(), u("span", gt, b(A.value), 1))
632
+ onError: v[0] || (v[0] = (f) => w.value = !0)
633
+ }, null, 40, kt)) : (a(), i("span", gt, b(A.value), 1))
634
634
  ]),
635
635
  T(ce, {
636
636
  "enter-active-class": "transition-all ease-out duration-75",
@@ -648,17 +648,17 @@ const ot = {
648
648
  r("span", _t, b(e.user.orgName), 1)
649
649
  ]),
650
650
  Mt,
651
- (a(!0), u(H, null, P(e.menuItems, (f, n) => (a(), u(H, { key: n }, [
652
- f.divider ? (a(), u("div", Tt)) : (a(), u("a", {
651
+ (a(!0), i(H, null, P(e.menuItems, (f, n) => (a(), i(H, { key: n }, [
652
+ f.divider ? (a(), i("div", Tt)) : (a(), i("a", {
653
653
  key: 1,
654
654
  href: f.href && F(O)(f.href) || null,
655
655
  class: "flex items-center gap-2.5 px-[18px] py-2 text-[13px] font-semibold text-proclusteal-700 dark:text-content no-underline hover:bg-proclusteal-50 dark:hover:bg-surface-hover hover:text-proclusteal-900 dark:hover:text-focus",
656
- onClick: N((c) => g(f), ["exact", "prevent"])
656
+ onClick: N((u) => g(f), ["exact", "prevent"])
657
657
  }, [
658
658
  f.icon ? (a(), E(de(f.icon), {
659
659
  key: 0,
660
660
  class: "!h-4 !w-4 flex-none"
661
- })) : v("", !0),
661
+ })) : m("", !0),
662
662
  r("span", null, b(f.label), 1)
663
663
  ], 8, At))
664
664
  ], 64))), 128))
@@ -743,6 +743,13 @@ const ot = {
743
743
  searchTypes: {
744
744
  type: Object,
745
745
  default: () => ({})
746
+ },
747
+ // #479: gate for the three top-right icons (search pill, bell, profile). Default true so
748
+ // existing consumers are unaffected; an app that loads its header data asynchronously passes
749
+ // false until user + notifications + search have all settled, then true to reveal all at once.
750
+ ready: {
751
+ type: Boolean,
752
+ default: !0
746
753
  }
747
754
  },
748
755
  emits: [
@@ -753,42 +760,42 @@ const ot = {
753
760
  "deleteNotification",
754
761
  "notifications-open"
755
762
  ],
756
- setup(e, { emit: i }) {
757
- const o = e, y = i, p = ie(), x = k(!1), w = $(() => !!o.notifications || o.unreadCount !== null && o.unreadCount !== void 0), _ = $(() => he(o.accentColour)), A = $(() => _.value || "#1c6f63");
763
+ setup(e, { emit: c }) {
764
+ const o = e, y = c, p = ie(), x = k(!1), w = $(() => !!o.notifications || o.unreadCount !== null && o.unreadCount !== void 0), _ = $(() => he(o.accentColour)), A = $(() => _.value || "#1c6f63");
758
765
  function g(n) {
759
766
  var d, C;
760
767
  if (!n)
761
768
  return;
762
- const c = O(n);
763
- c && (y("navigate", c), (C = (d = p == null ? void 0 : p.vnode) == null ? void 0 : d.props) != null && C.onNavigate || (window.location.href = c));
769
+ const u = O(n);
770
+ u && (y("navigate", u), (C = (d = p == null ? void 0 : p.vnode) == null ? void 0 : d.props) != null && C.onNavigate || (window.location.href = u));
764
771
  }
765
772
  function S() {
766
773
  y("home"), g(o.homeUrl);
767
774
  }
768
- function m() {
775
+ function v() {
769
776
  window.history.back();
770
777
  }
771
778
  function f(n) {
772
779
  y("menu-select", n), n.href && g(n.href);
773
780
  }
774
- return (n, c) => (a(), u("header", Et, [
781
+ return (n, u) => (a(), i("header", Et, [
775
782
  r("div", Nt, [
776
783
  V(n.$slots, "logo"),
777
- e.title ? (a(), u("span", Ht, [
784
+ e.title ? (a(), i("span", Ht, [
778
785
  j(b(e.title), 1),
779
- e.subtitle ? (a(), u("span", Ot, " " + b(e.subtitle), 1)) : v("", !0)
780
- ])) : v("", !0),
781
- _.value ? (a(), u("span", {
786
+ e.subtitle ? (a(), i("span", Ot, " " + b(e.subtitle), 1)) : m("", !0)
787
+ ])) : m("", !0),
788
+ _.value ? (a(), i("span", {
782
789
  key: 1,
783
790
  class: "h-[45px] w-[2px] shrink-0",
784
791
  style: q({ background: _.value }),
785
792
  "aria-hidden": "true"
786
- }, null, 4)) : v("", !0),
793
+ }, null, 4)) : m("", !0),
787
794
  r("nav", {
788
795
  class: "flex items-center gap-7 text-proclusteal-600 dark:text-content-muted",
789
796
  style: q({ "--hdr-accent": A.value })
790
797
  }, [
791
- e.homeUrl ? (a(), u("a", {
798
+ e.homeUrl ? (a(), i("a", {
792
799
  key: 0,
793
800
  href: F(O)(e.homeUrl) || null,
794
801
  class: "hover:text-[var(--hdr-accent)]",
@@ -797,53 +804,55 @@ const ot = {
797
804
  onClick: N(S, ["exact", "prevent"])
798
805
  }, [
799
806
  T(Me, { class: "!h-[22px] !w-[22px]" })
800
- ], 8, Lt)) : v("", !0),
801
- e.showBack ? (a(), u("button", {
807
+ ], 8, Lt)) : m("", !0),
808
+ e.showBack ? (a(), i("button", {
802
809
  key: 1,
803
810
  type: "button",
804
811
  class: "cursor-pointer hover:text-[var(--hdr-accent)]",
805
812
  title: "Go Back",
806
813
  "aria-label": "Go Back",
807
- onClick: m
814
+ onClick: v
808
815
  }, [
809
816
  T(Te, { class: "!h-[22px] !w-[22px]" })
810
- ])) : v("", !0)
817
+ ])) : m("", !0)
811
818
  ], 4),
812
819
  V(n.$slots, "left")
813
820
  ]),
814
821
  r("div", zt, [
815
822
  V(n.$slots, "right"),
816
- e.searchProvider ? (a(), E(Oe, {
817
- key: 0,
818
- onClick: c[0] || (c[0] = (d) => x.value = !0)
819
- })) : v("", !0),
820
- w.value ? (a(), E(bt, {
821
- key: 1,
822
- notifications: e.notifications,
823
- "unread-count": e.unreadCount,
824
- "notifications-url": e.notificationsUrl,
825
- "icon-map": e.notificationIconMap,
826
- onMarkAsRead: c[1] || (c[1] = (d) => n.$emit("markAsRead", d)),
827
- onDeleteNotification: c[2] || (c[2] = (d) => n.$emit("deleteNotification", d)),
828
- onOpen: c[3] || (c[3] = (d) => n.$emit("notifications-open")),
829
- onNavigate: g
830
- }, null, 8, ["notifications", "unread-count", "notifications-url", "icon-map"])) : v("", !0),
831
- e.user ? (a(), E(It, {
832
- key: 2,
833
- user: e.user,
834
- "menu-items": e.menuItems,
835
- onSelect: f
836
- }, null, 8, ["user", "menu-items"])) : v("", !0)
823
+ e.ready ? (a(), i(H, { key: 0 }, [
824
+ e.searchProvider ? (a(), E(Oe, {
825
+ key: 0,
826
+ onClick: u[0] || (u[0] = (d) => x.value = !0)
827
+ })) : m("", !0),
828
+ w.value ? (a(), E(bt, {
829
+ key: 1,
830
+ notifications: e.notifications,
831
+ "unread-count": e.unreadCount,
832
+ "notifications-url": e.notificationsUrl,
833
+ "icon-map": e.notificationIconMap,
834
+ onMarkAsRead: u[1] || (u[1] = (d) => n.$emit("markAsRead", d)),
835
+ onDeleteNotification: u[2] || (u[2] = (d) => n.$emit("deleteNotification", d)),
836
+ onOpen: u[3] || (u[3] = (d) => n.$emit("notifications-open")),
837
+ onNavigate: g
838
+ }, null, 8, ["notifications", "unread-count", "notifications-url", "icon-map"])) : m("", !0),
839
+ e.user ? (a(), E(It, {
840
+ key: 2,
841
+ user: e.user,
842
+ "menu-items": e.menuItems,
843
+ onSelect: f
844
+ }, null, 8, ["user", "menu-items"])) : m("", !0)
845
+ ], 64)) : m("", !0)
837
846
  ]),
838
847
  e.searchProvider ? (a(), E(et, {
839
848
  key: 0,
840
849
  open: x.value,
841
- "onUpdate:open": c[4] || (c[4] = (d) => x.value = d),
850
+ "onUpdate:open": u[4] || (u[4] = (d) => x.value = d),
842
851
  "search-provider": e.searchProvider,
843
852
  placeholder: e.searchPlaceholder,
844
853
  types: e.searchTypes,
845
854
  onNavigate: g
846
- }, null, 8, ["open", "search-provider", "placeholder", "types"])) : v("", !0)
855
+ }, null, 8, ["open", "search-provider", "placeholder", "types"])) : m("", !0)
847
856
  ]));
848
857
  }
849
858
  };
@@ -4,7 +4,7 @@ import $ from "../../CalendarIcon-DjSv5Y23.js";
4
4
  import k from "../../CircleExclamationIcon-vvAjN3c9.js";
5
5
  import E from "../../UploadIcon-DJeF8sKk.js";
6
6
  import M from "../../FilesIcon-NLAyR0HT.js";
7
- import { _ as se } from "../../InputField-BrSFZ5Eu.js";
7
+ import { _ as se } from "../../InputField-D6bS7qJm.js";
8
8
  const I = ["onClick"], le = {
9
9
  __name: "DateInput",
10
10
  props: {
@@ -6,8 +6,8 @@ import { InputField as Md, ToggleSwitch as Mp } from "@zealsolutions/zeal-ui/inp
6
6
  import { GearComplexIcon as Ep, DownloadIcon as Op, ChevronDownIcon as Np } from "@zealsolutions/zeal-ui/icons";
7
7
  import { a as Vr, _ as jr } from "../../SecondaryButton-At_I-S4K.js";
8
8
  import { _ as Ed } from "../../BaseModal-BriJhnSM.js";
9
- import { _ as xi } from "../../FormField-XR9nvyQr.js";
10
- import { _ as us } from "../../InputField-BrSFZ5Eu.js";
9
+ import { _ as xi } from "../../FormField-CrpT1GTF.js";
10
+ import { _ as us } from "../../InputField-D6bS7qJm.js";
11
11
  import Dp from "../../MagnifyingGlassIcon-ChYNIA-H.js";
12
12
  import ba from "../../ImageIcon-jkYGKPiB.js";
13
13
  import va from "../../ListTreeIcon-DMhYL_id.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zealsolutions/zeal-ui",
3
- "version": "1.0.0-alpha.358",
3
+ "version": "1.0.0-alpha.359",
4
4
  "description": "UI library for Zeal Solutions",
5
5
  "author": "Zeal Solutions",
6
6
  "license": "ISC",
@@ -1,51 +0,0 @@
1
- import { openBlock as l, createElementBlock as a, createElementVNode as t, normalizeClass as n, createTextVNode as s, toDisplayString as o, createCommentVNode as d, createVNode as i, withCtx as c, renderSlot as f } from "vue";
2
- import { _ as m } from "./TruncateText-BOyOYUV6.js";
3
- const u = { class: "flex justify-between text-style-label select-none" }, p = ["for"], _ = {
4
- key: 0,
5
- class: "text-app-950"
6
- }, x = { class: "flex mt-2.5" }, g = {
7
- __name: "FormField",
8
- props: {
9
- label: {
10
- type: String,
11
- default: ""
12
- },
13
- errorMessage: {
14
- type: String,
15
- default: ""
16
- },
17
- required: {
18
- type: Boolean,
19
- default: !1
20
- },
21
- disabled: {
22
- type: Boolean,
23
- default: !1
24
- }
25
- },
26
- setup(e) {
27
- return (r, b) => (l(), a("div", null, [
28
- t("div", u, [
29
- t("label", {
30
- for: e.label,
31
- class: n(["whitespace-nowrap font-medium pr-5", e.disabled ? "text-steel-800" : ""])
32
- }, [
33
- s(o(e.label), 1),
34
- e.required ? (l(), a("span", _, " *")) : d("", !0)
35
- ], 10, p),
36
- i(m, { class: "text-error-950 select-none" }, {
37
- default: c(() => [
38
- s(o(e.errorMessage), 1)
39
- ]),
40
- _: 1
41
- })
42
- ]),
43
- t("div", x, [
44
- f(r.$slots, "default")
45
- ])
46
- ]));
47
- }
48
- };
49
- export {
50
- g as _
51
- };
@@ -1,59 +0,0 @@
1
- import { mergeModels as n, useModel as f, computed as m, openBlock as o, createElementBlock as g, normalizeClass as a, renderSlot as h, withDirectives as b, createElementVNode as x, vModelDynamic as k, createBlock as y, createCommentVNode as v } from "vue";
2
- import w from "./CircleExclamationIcon-vvAjN3c9.js";
3
- const B = ["name", "type", "placeholder", "disabled"], C = {
4
- __name: "InputField",
5
- props: /* @__PURE__ */ n({
6
- hasError: {
7
- type: Boolean,
8
- default: !1
9
- },
10
- label: {
11
- type: String,
12
- default: ""
13
- },
14
- placeholder: {
15
- type: String,
16
- default: ""
17
- },
18
- fieldType: {
19
- type: String,
20
- default: "text"
21
- },
22
- disabled: {
23
- type: Boolean,
24
- default: !1
25
- }
26
- }, {
27
- modelValue: {},
28
- modelModifiers: {}
29
- }),
30
- emits: /* @__PURE__ */ n(["blur"], ["update:modelValue"]),
31
- setup(e, { emit: i }) {
32
- const t = e, d = i, r = f(e, "modelValue"), s = () => {
33
- d("blur");
34
- }, c = m(() => t.hasError && !t.disabled ? "ring-error-950 focus-within:bg-error-100 focus-within:ring-error-950 text-error-950" : t.disabled ? "ring-steel-500 dark:ring-line-strong bg-steel-100 dark:bg-surface cursor-not-allowed" : "ring-steel-500 dark:ring-line-strong focus-within:bg-app-100 focus-within:ring-app-950 dark:focus-within:text-black-950 text-black-950 dark:text-content");
35
- return (u, l) => (o(), g("div", {
36
- class: a(["relative flex flex-1 gap-x-2 px-4 text-style-input items-center h-10 rounded-[20px] ring-1 ring-inset focus-within:ring-2 focus-within:outline-none", c.value])
37
- }, [
38
- h(u.$slots, "icon"),
39
- b(x("input", {
40
- "onUpdate:modelValue": l[0] || (l[0] = (p) => r.value = p),
41
- name: e.label,
42
- onBlur: s,
43
- type: e.fieldType,
44
- class: a(["flex-1 border-0 bg-[transparent] pl-0 ring-0 focus:ring-0 outline-none focus:outline-none disabled:placeholder:text-steel-800 dark:disabled:placeholder:text-content-muted disabled:pointer-events-none", e.hasError ? " focus:placeholder:text-error-950 pr-6" : "placeholder:text-steel-950 dark:placeholder:text-content-muted pr-0"]),
45
- placeholder: e.placeholder,
46
- disabled: e.disabled
47
- }, null, 42, B), [
48
- [k, r.value]
49
- ]),
50
- e.hasError ? (o(), y(w, {
51
- key: 0,
52
- class: "absolute top-1/2 -translate-y-1/2 right-3 scale-[0.8182] pointer-events-none text-error-950"
53
- })) : v("", !0)
54
- ], 2));
55
- }
56
- };
57
- export {
58
- C as _
59
- };