trimble-terra 1.1.25 → 1.1.27

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.
@@ -5,51 +5,50 @@ import "../../moduswebcomponents/components/modus-wc-bottom-sheet.js";
5
5
  import { defineCustomElement as s, ModusWcButton as m } from "../../moduswebcomponents/components/modus-wc-button.js";
6
6
  import { defineCustomElement as a, ModusWcCollapse as i } from "../../moduswebcomponents/components/modus-wc-collapse.js";
7
7
  import { defineCustomElement as u, ModusWcDropdownMenu as c } from "../../moduswebcomponents/components/modus-wc-dropdown-menu.js";
8
- import { defineCustomElement as l, ModusWcIcon as d } from "../../moduswebcomponents/components/modus-wc-icon.js";
9
- import { defineCustomElement as C, ModusWcNavbar as r } from "../../moduswebcomponents/components/modus-wc-navbar.js";
8
+ import { defineCustomElement as l, ModusWcIcon as r } from "../../moduswebcomponents/components/modus-wc-icon.js";
9
+ import { defineCustomElement as C, ModusWcNavbar as d } from "../../moduswebcomponents/components/modus-wc-navbar.js";
10
10
  import { defineCustomElement as p, ModusWcProfileMenu as M } from "../../moduswebcomponents/components/modus-wc-profile-menu.js";
11
- import { defineCustomElement as f, ModusWcSwitch as g } from "../../moduswebcomponents/components/modus-wc-switch.js";
12
- import { defineCustomElement as h, ModusWcThemeProvider as E } from "../../moduswebcomponents/components/modus-wc-theme-provider.js";
11
+ import { defineCustomElement as f, ModusWcThemeProvider as g } from "../../moduswebcomponents/components/modus-wc-theme-provider.js";
13
12
  import "../../moduswebcomponents/components/p-74_OJZLO.js";
14
13
  import n from "react";
15
- const y = /* @__PURE__ */ e({
14
+ const T = /* @__PURE__ */ e({
16
15
  tagName: "modus-wc-avatar",
17
16
  elementClass: t,
18
17
  // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
19
18
  react: n,
20
19
  events: { onImageLoadError: "imageLoadError" },
21
20
  defineCustomElement: o
22
- }), L = /* @__PURE__ */ e({
21
+ }), S = /* @__PURE__ */ e({
23
22
  tagName: "modus-wc-button",
24
23
  elementClass: m,
25
24
  // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
26
25
  react: n,
27
26
  events: { onButtonClick: "buttonClick" },
28
27
  defineCustomElement: s
29
- }), x = /* @__PURE__ */ e({
28
+ }), y = /* @__PURE__ */ e({
30
29
  tagName: "modus-wc-collapse",
31
30
  elementClass: i,
32
31
  // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
33
32
  react: n,
34
33
  events: { onExpandedChange: "expandedChange" },
35
34
  defineCustomElement: a
36
- }), D = /* @__PURE__ */ e({
35
+ }), B = /* @__PURE__ */ e({
37
36
  tagName: "modus-wc-dropdown-menu",
38
37
  elementClass: c,
39
38
  // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
40
39
  react: n,
41
40
  events: { onMenuVisibilityChange: "menuVisibilityChange" },
42
41
  defineCustomElement: u
43
- }), F = /* @__PURE__ */ e({
42
+ }), L = /* @__PURE__ */ e({
44
43
  tagName: "modus-wc-icon",
45
- elementClass: d,
44
+ elementClass: r,
46
45
  // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
47
46
  react: n,
48
47
  events: {},
49
48
  defineCustomElement: l
50
- }), V = /* @__PURE__ */ e({
49
+ }), x = /* @__PURE__ */ e({
51
50
  tagName: "modus-wc-navbar",
52
- elementClass: r,
51
+ elementClass: d,
53
52
  // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
54
53
  react: n,
55
54
  events: {
@@ -70,7 +69,7 @@ const y = /* @__PURE__ */ e({
70
69
  onUserMenuOpenChange: "userMenuOpenChange"
71
70
  },
72
71
  defineCustomElement: C
73
- }), H = /* @__PURE__ */ e({
72
+ }), D = /* @__PURE__ */ e({
74
73
  tagName: "modus-wc-profile-menu",
75
74
  elementClass: M,
76
75
  // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
@@ -80,33 +79,21 @@ const y = /* @__PURE__ */ e({
80
79
  onMenuItemClick: "menuItemClick"
81
80
  },
82
81
  defineCustomElement: p
83
- }), R = /* @__PURE__ */ e({
84
- tagName: "modus-wc-switch",
85
- elementClass: g,
86
- // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
87
- react: n,
88
- events: {
89
- onInputBlur: "inputBlur",
90
- onInputChange: "inputChange",
91
- onInputFocus: "inputFocus"
92
- },
93
- defineCustomElement: f
94
- }), U = /* @__PURE__ */ e({
82
+ }), V = /* @__PURE__ */ e({
95
83
  tagName: "modus-wc-theme-provider",
96
- elementClass: E,
84
+ elementClass: g,
97
85
  // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
98
86
  react: n,
99
87
  events: {},
100
- defineCustomElement: h
88
+ defineCustomElement: f
101
89
  });
102
90
  export {
103
- y as ModusWcAvatar,
104
- L as ModusWcButton,
105
- x as ModusWcCollapse,
106
- D as ModusWcDropdownMenu,
107
- F as ModusWcIcon,
108
- V as ModusWcNavbar,
109
- H as ModusWcProfileMenu,
110
- R as ModusWcSwitch,
111
- U as ModusWcThemeProvider
91
+ T as ModusWcAvatar,
92
+ S as ModusWcButton,
93
+ y as ModusWcCollapse,
94
+ B as ModusWcDropdownMenu,
95
+ L as ModusWcIcon,
96
+ x as ModusWcNavbar,
97
+ D as ModusWcProfileMenu,
98
+ V as ModusWcThemeProvider
112
99
  };
@@ -1,131 +1,131 @@
1
- import { jsx as a, jsxs as r } from "react/jsx-runtime";
2
- import { useState as g, useRef as te, useEffect as T, useCallback as c } from "react";
3
- import { TerraLink as p } from "../TerraLink/TerraLink.js";
4
- import { TrimbleAssistantIcon as W } from "./TrimbleAssistantIcon.js";
5
- import { TrimbleDeveloperLogo as le } from "./TrimbleDeveloperLogo.js";
1
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
2
+ import { useState as f, useRef as Y, useEffect as w, useCallback as s } from "react";
3
+ import { TerraLink as b } from "../TerraLink/TerraLink.js";
4
+ import { TrimbleAssistantIcon as D } from "./TrimbleAssistantIcon.js";
5
+ import { TrimbleDeveloperLogo as Z } from "./TrimbleDeveloperLogo.js";
6
6
  import './TDHeader.css';import './modus-icons-setup.css';import '../../../node_modules/@trimble-oss/moduswebcomponents/modus-wc-styles.css';/* empty css */
7
7
  /* empty css */
8
8
  /* empty css */
9
- import { ModusWcThemeProvider as ne, ModusWcNavbar as re, ModusWcButton as h, ModusWcIcon as u, ModusWcDropdownMenu as $, ModusWcAvatar as de, ModusWcProfileMenu as oe, ModusWcCollapse as D, ModusWcSwitch as ie } from "../../../node_modules/@trimble-oss/moduswebcomponents-react/stencil-generated/components.js";
10
- const V = (d) => {
11
- if (d)
9
+ import { ModusWcThemeProvider as ee, ModusWcNavbar as ae, ModusWcButton as m, ModusWcIcon as v, ModusWcDropdownMenu as W, ModusWcAvatar as te, ModusWcProfileMenu as le, ModusWcCollapse as $ } from "../../../node_modules/@trimble-oss/moduswebcomponents-react/stencil-generated/components.js";
10
+ const I = (r) => {
11
+ if (r)
12
12
  return {
13
- title: d.title,
14
- items: d.items.map(({ href: o, value: i, ...b }) => ({
15
- ...b,
16
- value: o ?? i ?? b.label
13
+ title: r.title,
14
+ items: r.items.map(({ href: d, value: i, ...h }) => ({
15
+ ...h,
16
+ value: d ?? i ?? h.label
17
17
  }))
18
18
  };
19
- }, se = () => {
19
+ }, ne = () => {
20
20
  try {
21
- const o = localStorage.getItem("modus-theme-config");
22
- if (o) {
23
- const i = JSON.parse(o);
21
+ const d = localStorage.getItem("modus-theme-config");
22
+ if (d) {
23
+ const i = JSON.parse(d);
24
24
  if (i.theme) return i.theme;
25
25
  }
26
26
  } catch {
27
27
  }
28
- const d = document.documentElement.getAttribute("data-theme");
29
- return d ? d.replace(/-(light|dark)$/, "") : "modus-modern";
30
- }, ce = () => document.documentElement.getAttribute("data-mode") === "dark" ? "dark" : "light", L = (d) => {
31
- const o = document.documentElement, i = se();
32
- o.setAttribute("data-theme", `${i}-${d}`), o.setAttribute("data-mode", d), o.classList.remove("light", "dark"), o.classList.add(d), localStorage.setItem("modus-theme-config", JSON.stringify({ mode: d, theme: i }));
33
- }, ke = ({
34
- logoHref: d = "#",
35
- brandLabel: o = "Developer",
28
+ const r = document.documentElement.getAttribute("data-theme");
29
+ return r ? r.replace(/-(light|dark)$/, "") : "modus-modern";
30
+ }, re = () => document.documentElement.getAttribute("data-mode") === "dark" ? "dark" : "light", L = (r) => {
31
+ const d = document.documentElement, i = ne();
32
+ d.setAttribute("data-theme", `${i}-${r}`), d.setAttribute("data-mode", r), d.classList.remove("light", "dark"), d.classList.add(r), localStorage.setItem("modus-theme-config", JSON.stringify({ mode: r, theme: i }));
33
+ }, fe = ({
34
+ logoHref: r = "#",
35
+ brandLabel: d = "Developer",
36
36
  signInLabel: i = "Sign in",
37
- assistantLabel: b = "Trimble Assistant",
38
- helpLabel: y = "Help",
39
- notificationsLabel: M = "Notifications",
40
- themeLightLabel: j = "Light",
41
- themeDarkLabel: J = "Dark",
42
- navLinks: k = [],
43
- helpLinks: N = [],
37
+ assistantLabel: h = "Trimble Assistant",
38
+ helpLabel: N = "Help",
39
+ notificationsLabel: y = "Notifications",
40
+ themeLightLabel: oe = "Light",
41
+ themeDarkLabel: de = "Dark",
42
+ navLinks: g = [],
43
+ helpLinks: k = [],
44
44
  user: n,
45
- onLogoClick: C,
46
- onNavItemClick: m,
45
+ onLogoClick: M,
46
+ onNavItemClick: c,
47
47
  onAssistantClick: z,
48
- onNotificationsClick: E,
49
- onSignIn: R,
50
- onProfileMenuItemClick: B,
48
+ onNotificationsClick: S,
49
+ onSignIn: V,
50
+ onProfileMenuItemClick: E,
51
51
  onSignOut: O
52
52
  }) => {
53
- const [s, w] = g("light"), [U, K] = g(!1), [f, v] = g(!1), x = te(null), [S, _] = g(!1), [H, q] = g(
53
+ const [B, x] = f("light"), [j, J] = f(!1), [p, _] = f(!1), C = Y(null), [T, u] = f(!1), [H, A] = f(
54
54
  {}
55
55
  );
56
- T(() => {
57
- w(ce());
58
- }, []);
59
- const A = c(() => {
60
- w((e) => {
56
+ w(() => {
57
+ x(re());
58
+ }, []), s(() => {
59
+ x((e) => {
61
60
  const t = e === "dark" ? "light" : "dark";
62
61
  return L(t), t;
63
62
  });
64
- }, []), F = c(
63
+ }, []), s(
65
64
  (e) => {
66
65
  const l = !!e.detail?.target?.checked ? "dark" : "light";
67
- w(l), L(l);
66
+ x(l), L(l);
68
67
  },
69
68
  []
70
- ), G = c(
69
+ );
70
+ const R = s(
71
71
  (e) => {
72
- C && (e.preventDefault(), C());
72
+ M && (e.preventDefault(), M());
73
73
  },
74
- [C]
75
- ), Q = c(
74
+ [M]
75
+ ), U = s(
76
76
  (e) => {
77
- m?.(e.value ?? e.label);
77
+ c?.(e.value ?? e.label);
78
78
  },
79
- [m]
80
- ), P = c(
79
+ [c]
80
+ ), P = s(
81
81
  (e) => {
82
- m?.(e.value ?? e.label), document.querySelectorAll(
82
+ c?.(e.value ?? e.label), document.querySelectorAll(
83
83
  "modus-wc-dropdown-menu"
84
84
  ).forEach((t) => {
85
85
  t.menuVisible = !1;
86
86
  });
87
87
  },
88
- [m]
88
+ [c]
89
89
  );
90
- T(() => {
91
- if (!f) return;
90
+ w(() => {
91
+ if (!p) return;
92
92
  const e = (l) => {
93
- x.current?.contains(l.target) || v(!1);
93
+ C.current?.contains(l.target) || _(!1);
94
94
  }, t = (l) => {
95
- l.key === "Escape" && v(!1);
95
+ l.key === "Escape" && _(!1);
96
96
  };
97
97
  return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
98
98
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
99
99
  };
100
- }, [f]);
101
- const X = c(
100
+ }, [p]);
101
+ const K = s(
102
102
  (e) => {
103
- B?.(e.detail), x.current?.querySelector(".td-header__profile-button")?.classList.toggle("td-header__profile-button--active"), v(!1);
103
+ E?.(e.detail), C.current?.querySelector(".td-header__profile-button")?.classList.toggle("td-header__profile-button--active"), _(!1);
104
104
  },
105
- [B]
106
- ), Y = c(() => {
107
- O?.(), v(!1);
105
+ [E]
106
+ ), F = s(() => {
107
+ O?.(), _(!1);
108
108
  }, [O]);
109
- T(() => {
109
+ w(() => {
110
110
  const e = window.matchMedia("(max-width: 639px)"), t = (l) => {
111
- l.matches || _(!1);
111
+ l.matches || u(!1);
112
112
  };
113
113
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
114
114
  }, []);
115
- const Z = c(
115
+ const G = s(
116
116
  (e) => {
117
- m?.(e.value ?? e.label), _(!1);
117
+ c?.(e.value ?? e.label), u(!1);
118
118
  },
119
- [m]
120
- ), I = c(
119
+ [c]
120
+ ), q = s(
121
121
  (e) => {
122
- m?.(e.value ?? e.label), _(!1);
122
+ c?.(e.value ?? e.label), u(!1);
123
123
  },
124
- [m]
125
- ), ee = k.length > 0;
126
- return /* @__PURE__ */ a(ne, { children: /* @__PURE__ */ r("div", { className: "td-header__root", children: [
127
- /* @__PURE__ */ r(
128
- re,
124
+ [c]
125
+ ), Q = g.length > 0;
126
+ return /* @__PURE__ */ a(ee, { children: /* @__PURE__ */ o("div", { className: "td-header__root", children: [
127
+ /* @__PURE__ */ o(
128
+ ae,
129
129
  {
130
130
  className: "td-header__navbar",
131
131
  visibility: {
@@ -140,9 +140,9 @@ const V = (d) => {
140
140
  user: !1
141
141
  },
142
142
  children: [
143
- /* @__PURE__ */ r("div", { slot: "start", className: "td-header__brand-wrap", children: [
143
+ /* @__PURE__ */ o("div", { slot: "start", className: "td-header__brand-wrap", children: [
144
144
  /* @__PURE__ */ a(
145
- h,
145
+ m,
146
146
  {
147
147
  color: "tertiary",
148
148
  variant: "borderless",
@@ -150,14 +150,14 @@ const V = (d) => {
150
150
  shape: "square",
151
151
  "aria-label": "Menu",
152
152
  "aria-haspopup": "menu",
153
- "aria-expanded": S,
153
+ "aria-expanded": T,
154
154
  "aria-controls": "td-header-mobile-menu",
155
- onButtonClick: () => _((e) => !e),
155
+ onButtonClick: () => u((e) => !e),
156
156
  className: "td-header__button td-header__mobile-toggle",
157
157
  children: /* @__PURE__ */ a(
158
- u,
158
+ v,
159
159
  {
160
- name: S ? "close" : "menu",
160
+ name: T ? "close" : "menu",
161
161
  size: "sm",
162
162
  decorative: !0
163
163
  }
@@ -168,22 +168,22 @@ const V = (d) => {
168
168
  "a",
169
169
  {
170
170
  className: "td-header__brand",
171
- href: d,
172
- "aria-label": `Trimble ${o} home`,
173
- onClick: G,
174
- children: /* @__PURE__ */ a(le, { className: "td-header__logo" })
171
+ href: r,
172
+ "aria-label": `Trimble ${d} home`,
173
+ onClick: R,
174
+ children: /* @__PURE__ */ a(Z, { className: "td-header__logo" })
175
175
  }
176
176
  )
177
177
  ] }),
178
- k.length > 0 && /* @__PURE__ */ a(
178
+ g.length > 0 && /* @__PURE__ */ a(
179
179
  "nav",
180
180
  {
181
181
  slot: "center",
182
182
  className: "td-header__nav",
183
183
  "aria-label": "Primary navigation",
184
- children: k.map(
185
- (e) => e.children && e.children.length > 0 ? /* @__PURE__ */ r(
186
- $,
184
+ children: g.map(
185
+ (e) => e.children && e.children.length > 0 ? /* @__PURE__ */ o(
186
+ W,
187
187
  {
188
188
  buttonAriaLabel: e.label,
189
189
  buttonVariant: "borderless",
@@ -194,12 +194,12 @@ const V = (d) => {
194
194
  menuStrategy: "fixed",
195
195
  customClass: "td-header__nav-dropdown",
196
196
  children: [
197
- /* @__PURE__ */ r("div", { slot: "button", className: "td-header__nav-trigger", children: [
197
+ /* @__PURE__ */ o("div", { slot: "button", className: "td-header__nav-trigger", children: [
198
198
  /* @__PURE__ */ a("span", { children: e.label }),
199
- /* @__PURE__ */ a(u, { name: "expand_more", size: "sm", decorative: !0 })
199
+ /* @__PURE__ */ a(v, { name: "expand_more", size: "sm", decorative: !0 })
200
200
  ] }),
201
201
  /* @__PURE__ */ a("div", { slot: "menu", className: "td-header__menu", children: e.children.map((t) => /* @__PURE__ */ a(
202
- p,
202
+ b,
203
203
  {
204
204
  className: "td-header__menu-link",
205
205
  destination: t.href ?? "#",
@@ -213,37 +213,37 @@ const V = (d) => {
213
213
  },
214
214
  e.label
215
215
  ) : /* @__PURE__ */ a(
216
- p,
216
+ b,
217
217
  {
218
218
  className: "td-header__nav-link",
219
219
  destination: e.href ?? "#",
220
220
  label: e.label,
221
221
  linkType: "text",
222
- onClickHandler: () => Q(e)
222
+ onClickHandler: () => U(e)
223
223
  },
224
224
  e.label
225
225
  )
226
226
  )
227
227
  }
228
228
  ),
229
- /* @__PURE__ */ r("div", { slot: "end", className: "td-header__end", children: [
229
+ /* @__PURE__ */ o("div", { slot: "end", className: "td-header__end", children: [
230
230
  /* @__PURE__ */ a(
231
- h,
231
+ m,
232
232
  {
233
233
  color: "tertiary",
234
234
  variant: "borderless",
235
235
  size: "md",
236
236
  shape: "square",
237
- "aria-label": b,
237
+ "aria-label": h,
238
238
  onButtonClick: () => z?.(),
239
239
  className: "td-header__button td-header__desktop-control td-header__no-pop",
240
- children: /* @__PURE__ */ a(W, { mode: s })
240
+ children: /* @__PURE__ */ a(D, { mode: B })
241
241
  }
242
242
  ),
243
- N.length > 0 && /* @__PURE__ */ r(
244
- $,
243
+ k.length > 0 && /* @__PURE__ */ o(
244
+ W,
245
245
  {
246
- buttonAriaLabel: y,
246
+ buttonAriaLabel: N,
247
247
  buttonVariant: "borderless",
248
248
  buttonColor: "tertiary",
249
249
  buttonSize: "md",
@@ -251,11 +251,11 @@ const V = (d) => {
251
251
  menuPlacement: "bottom",
252
252
  menuOffset: 8,
253
253
  menuStrategy: "fixed",
254
- customClass: `td-header__button td-header__desktop-control td-header__help-dropdown ${U ? "td-header__help-dropdown--active" : ""}`,
255
- onMenuVisibilityChange: (e) => K(!!e.detail?.isVisible),
254
+ customClass: `td-header__button td-header__desktop-control td-header__help-dropdown ${j ? "td-header__help-dropdown--active" : ""}`,
255
+ onMenuVisibilityChange: (e) => J(!!e.detail?.isVisible),
256
256
  children: [
257
257
  /* @__PURE__ */ a(
258
- u,
258
+ v,
259
259
  {
260
260
  slot: "button",
261
261
  name: "question",
@@ -264,8 +264,8 @@ const V = (d) => {
264
264
  decorative: !0
265
265
  }
266
266
  ),
267
- /* @__PURE__ */ a("div", { slot: "menu", className: "td-header__menu", children: N.map((e) => /* @__PURE__ */ a(
268
- p,
267
+ /* @__PURE__ */ a("div", { slot: "menu", className: "td-header__menu", children: k.map((e) => /* @__PURE__ */ a(
268
+ b,
269
269
  {
270
270
  className: "td-header__menu-link",
271
271
  destination: e.href ?? "#",
@@ -279,17 +279,17 @@ const V = (d) => {
279
279
  }
280
280
  ),
281
281
  n && /* @__PURE__ */ a(
282
- h,
282
+ m,
283
283
  {
284
284
  color: "tertiary",
285
285
  variant: "borderless",
286
286
  size: "md",
287
287
  shape: "square",
288
- "aria-label": M,
289
- onButtonClick: () => E?.(),
288
+ "aria-label": y,
289
+ onButtonClick: () => S?.(),
290
290
  className: "td-header__button td-header__desktop-control",
291
291
  children: /* @__PURE__ */ a(
292
- u,
292
+ v,
293
293
  {
294
294
  name: "notifications",
295
295
  variant: "solid",
@@ -299,31 +299,9 @@ const V = (d) => {
299
299
  )
300
300
  }
301
301
  ),
302
- /* @__PURE__ */ a(
303
- h,
304
- {
305
- color: "tertiary",
306
- variant: "borderless",
307
- size: "md",
308
- shape: "square",
309
- "aria-label": s === "dark" ? "Switch to light mode" : "Switch to dark mode",
310
- "aria-pressed": s === "dark",
311
- onButtonClick: A,
312
- className: "td-header__button td-header__desktop-control td-header__no-pop",
313
- children: /* @__PURE__ */ a(
314
- u,
315
- {
316
- name: s === "dark" ? "moon" : "sun",
317
- variant: "solid",
318
- size: "sm",
319
- decorative: !0
320
- }
321
- )
322
- }
323
- ),
324
- n ? /* @__PURE__ */ r("div", { className: "td-header__profile", ref: x, children: [
302
+ n ? /* @__PURE__ */ o("div", { className: "td-header__profile", ref: C, children: [
325
303
  /* @__PURE__ */ a(
326
- h,
304
+ m,
327
305
  {
328
306
  color: "tertiary",
329
307
  variant: "borderless",
@@ -331,11 +309,11 @@ const V = (d) => {
331
309
  shape: "circle",
332
310
  "aria-label": `${n.name} — account menu`,
333
311
  "aria-haspopup": "menu",
334
- "aria-expanded": f,
335
- onButtonClick: () => v((e) => !e),
336
- className: f ? "td-header__profile-button td-header__profile-button--active" : "td-header__profile-button",
312
+ "aria-expanded": p,
313
+ onButtonClick: () => _((e) => !e),
314
+ className: p ? "td-header__profile-button td-header__profile-button--active" : "td-header__profile-button",
337
315
  children: /* @__PURE__ */ a(
338
- de,
316
+ te,
339
317
  {
340
318
  size: "sm",
341
319
  alt: n.name,
@@ -348,9 +326,9 @@ const V = (d) => {
348
326
  "div",
349
327
  {
350
328
  className: "td-header__profile-popover",
351
- hidden: !f,
329
+ hidden: !p,
352
330
  children: /* @__PURE__ */ a(
353
- oe,
331
+ le,
354
332
  {
355
333
  profileProps: {
356
334
  profileImageUrl: n.avatarUrl ?? "",
@@ -365,21 +343,21 @@ const V = (d) => {
365
343
  items: !1,
366
344
  adminSettings: !1
367
345
  },
368
- menuOne: V(n.profileMenuOne),
369
- menuTwo: V(n.profileMenuTwo),
370
- onMenuItemClick: X,
371
- onSignOutClick: Y
346
+ menuOne: I(n.profileMenuOne),
347
+ menuTwo: I(n.profileMenuTwo),
348
+ onMenuItemClick: K,
349
+ onSignOutClick: F
372
350
  }
373
351
  )
374
352
  }
375
353
  )
376
354
  ] }) : /* @__PURE__ */ a(
377
- h,
355
+ m,
378
356
  {
379
357
  color: "primary",
380
358
  variant: "filled",
381
359
  size: "md",
382
- onButtonClick: () => R?.(),
360
+ onButtonClick: () => V?.(),
383
361
  className: "td-header__sign-in",
384
362
  children: i
385
363
  }
@@ -388,30 +366,30 @@ const V = (d) => {
388
366
  ]
389
367
  }
390
368
  ),
391
- /* @__PURE__ */ r(
369
+ /* @__PURE__ */ o(
392
370
  "div",
393
371
  {
394
372
  id: "td-header-mobile-menu",
395
373
  className: "td-header__mobile-menu",
396
- hidden: !S,
374
+ hidden: !T,
397
375
  children: [
398
- ee && /* @__PURE__ */ a(
376
+ Q && /* @__PURE__ */ a(
399
377
  "nav",
400
378
  {
401
379
  className: "td-header__mobile-nav",
402
380
  "aria-label": "Primary navigation",
403
- children: k.map((e) => {
381
+ children: g.map((e) => {
404
382
  const t = e.value ?? e.label;
405
383
  return e.children && e.children.length > 0 ? /* @__PURE__ */ a(
406
- D,
384
+ $,
407
385
  {
408
386
  bordered: !0,
409
387
  collapseId: `td-header-mobile-${t}`,
410
388
  customClass: "td-header__mobile-collapse",
411
389
  expanded: !!H[t],
412
390
  options: { title: e.label, size: "md" },
413
- onExpandedChange: (l) => q((ae) => ({
414
- ...ae,
391
+ onExpandedChange: (l) => A((X) => ({
392
+ ...X,
415
393
  [t]: l.detail.expanded
416
394
  })),
417
395
  children: /* @__PURE__ */ a(
@@ -420,13 +398,13 @@ const V = (d) => {
420
398
  slot: "content",
421
399
  className: "td-header__mobile-sub",
422
400
  children: e.children.map((l) => /* @__PURE__ */ a(
423
- p,
401
+ b,
424
402
  {
425
403
  className: "td-header__mobile-link td-header__mobile-link--child",
426
404
  destination: l.href ?? "#",
427
405
  label: l.label,
428
406
  linkType: "text",
429
- onClickHandler: () => I(l)
407
+ onClickHandler: () => q(l)
430
408
  },
431
409
  l.value ?? l.label
432
410
  ))
@@ -435,81 +413,81 @@ const V = (d) => {
435
413
  },
436
414
  t
437
415
  ) : /* @__PURE__ */ a(
438
- p,
416
+ b,
439
417
  {
440
418
  className: "td-header__mobile-link",
441
419
  destination: e.href ?? "#",
442
420
  label: e.label,
443
421
  linkType: "text",
444
- onClickHandler: () => Z(e)
422
+ onClickHandler: () => G(e)
445
423
  },
446
424
  t
447
425
  );
448
426
  })
449
427
  }
450
428
  ),
451
- /* @__PURE__ */ r("div", { className: "td-header__mobile-utilities", children: [
452
- /* @__PURE__ */ r(
453
- h,
429
+ /* @__PURE__ */ o("div", { className: "td-header__mobile-utilities", children: [
430
+ /* @__PURE__ */ o(
431
+ m,
454
432
  {
455
433
  color: "tertiary",
456
434
  variant: "borderless",
457
435
  size: "md",
458
- "aria-label": b,
436
+ "aria-label": h,
459
437
  onButtonClick: () => {
460
- z?.(), _(!1);
438
+ z?.(), u(!1);
461
439
  },
462
440
  className: "td-header__mobile-action td-header__no-pop",
463
441
  children: [
464
- /* @__PURE__ */ a(W, { mode: s }),
465
- /* @__PURE__ */ a("span", { className: "td-header__mobile-action-label", children: b })
442
+ /* @__PURE__ */ a(D, { mode: B }),
443
+ /* @__PURE__ */ a("span", { className: "td-header__mobile-action-label", children: h })
466
444
  ]
467
445
  }
468
446
  ),
469
- N.length > 0 && /* @__PURE__ */ a(
470
- D,
447
+ k.length > 0 && /* @__PURE__ */ a(
448
+ $,
471
449
  {
472
450
  bordered: !0,
473
451
  collapseId: "td-header-mobile-help",
474
452
  customClass: "td-header__mobile-collapse",
475
453
  expanded: !!H.__help,
476
454
  options: {
477
- title: y,
455
+ title: N,
478
456
  icon: "question",
479
- iconAriaLabel: y,
457
+ iconAriaLabel: N,
480
458
  size: "md"
481
459
  },
482
- onExpandedChange: (e) => q((t) => ({
460
+ onExpandedChange: (e) => A((t) => ({
483
461
  ...t,
484
462
  __help: e.detail.expanded
485
463
  })),
486
- children: /* @__PURE__ */ a("div", { slot: "content", className: "td-header__mobile-sub", children: N.map((e) => /* @__PURE__ */ a(
487
- p,
464
+ children: /* @__PURE__ */ a("div", { slot: "content", className: "td-header__mobile-sub", children: k.map((e) => /* @__PURE__ */ a(
465
+ b,
488
466
  {
489
467
  className: "td-header__mobile-link td-header__mobile-link--child",
490
468
  destination: e.href ?? "#",
491
469
  label: e.label,
492
470
  linkType: "text",
493
- onClickHandler: () => I(e)
471
+ onClickHandler: () => q(e)
494
472
  },
495
473
  e.value ?? e.label
496
474
  )) })
497
475
  }
498
476
  ),
499
- n && /* @__PURE__ */ r(
500
- h,
477
+ n && /* @__PURE__ */ o(
478
+ m,
501
479
  {
502
480
  color: "tertiary",
503
481
  variant: "borderless",
504
482
  size: "md",
505
- "aria-label": M,
483
+ "aria-label": y,
506
484
  onButtonClick: () => {
507
- E?.(), _(!1);
485
+ S?.(), u(!1);
508
486
  },
509
487
  className: "td-header__mobile-action",
510
488
  children: [
511
489
  /* @__PURE__ */ a(
512
- u,
490
+ v,
513
491
  {
514
492
  name: "notifications",
515
493
  variant: "solid",
@@ -517,49 +495,10 @@ const V = (d) => {
517
495
  decorative: !0
518
496
  }
519
497
  ),
520
- /* @__PURE__ */ a("span", { className: "td-header__mobile-action-label", children: M })
498
+ /* @__PURE__ */ a("span", { className: "td-header__mobile-action-label", children: y })
521
499
  ]
522
500
  }
523
- ),
524
- /* @__PURE__ */ r("div", { className: "td-header__mobile-theme", children: [
525
- /* @__PURE__ */ r(
526
- "span",
527
- {
528
- className: `td-header__theme-switch td-header__theme-switch--${s}`,
529
- children: [
530
- /* @__PURE__ */ a(
531
- ie,
532
- {
533
- size: "md",
534
- value: s === "dark",
535
- "aria-label": "Switch between light and dark theme",
536
- onInputChange: F
537
- }
538
- ),
539
- /* @__PURE__ */ a(
540
- u,
541
- {
542
- name: s === "dark" ? "moon" : "sun",
543
- variant: "solid",
544
- decorative: !0,
545
- className: "td-header__theme-switch-icon"
546
- }
547
- )
548
- ]
549
- }
550
- ),
551
- /* @__PURE__ */ a(
552
- "button",
553
- {
554
- type: "button",
555
- className: "td-header__mobile-theme-label",
556
- onClick: A,
557
- "aria-hidden": "true",
558
- tabIndex: -1,
559
- children: s === "dark" ? J : j
560
- }
561
- )
562
- ] })
501
+ )
563
502
  ] })
564
503
  ]
565
504
  }
@@ -567,5 +506,5 @@ const V = (d) => {
567
506
  ] }) });
568
507
  };
569
508
  export {
570
- ke as TDHeader
509
+ fe as TDHeader
571
510
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trimble-terra",
3
- "version": "1.1.25",
3
+ "version": "1.1.27",
4
4
  "description": "Trimble Terra — React component library for Trimble MXP2 web experiences",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,70 +0,0 @@
1
- import { p as m, H as l, d as t, h as c, c as a } from "./p-Blhe_h6i.js";
2
- import { h as i } from "./p-tWS3Egrk.js";
3
- import { D as u } from "./p-DZXd_sgn.js";
4
- import { c as h, i as w } from "./p-DUWn6PrQ.js";
5
- import { d as r } from "./p-BqauKZkb.js";
6
- const g = (e) => {
7
- let o = "";
8
- return Object.prototype.hasOwnProperty.call(e, "size") && e.size && (o = `${o} modus-wc-toggle-${e.size}`), o;
9
- }, n = "modus-wc-switch.modus-wc-switch-host{--rounded-badge:32px;align-items:center;display:flex}modus-wc-switch.modus-wc-switch-host .modus-wc-input-label{font-weight:var(--modus-wc-font-weight-normal);padding-inline-start:var(--modus-wc-spacing-md)}modus-wc-switch .modus-wc-toggle{border-radius:var(--rounded-badge)}modus-wc-switch .modus-wc-toggle:focus{border-color:var(--modus-wc-color-base-200)}[data-theme=modus-classic-light] modus-wc-switch .modus-wc-toggle,[data-theme=modus-classic-dark] modus-wc-switch .modus-wc-toggle{background-color:var(--modus-wc-color-white);border:none;color:var(--modus-wc-color-gray-4);outline-color:var(--modus-wc-color-highlight-blue);--fallback-b1:var(--modus-wc-color-gray-4)}[data-theme=modus-classic-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-xs,[data-theme=modus-classic-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-xs{--handleoffset:var(--modus-wc-spacing-sm);height:var(--modus-wc-spacing-lg);width:var(--modus-wc-spacing-xl)}[data-theme=modus-classic-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-xs~modus-wc-input-label .modus-wc-input-label,[data-theme=modus-classic-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-xs~modus-wc-input-label .modus-wc-input-label{font-size:var(--modus-wc-font-size-sm);line-height:var(--modus-wc-font-size-2xl)}[data-theme=modus-classic-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-sm,[data-theme=modus-classic-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-sm{--handleoffset:1rem;height:1rem;width:2rem}[data-theme=modus-classic-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-md,[data-theme=modus-classic-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-md{--handleoffset:1.25rem;height:1.25rem;width:2.5rem}[data-theme=modus-classic-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-lg,[data-theme=modus-classic-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-lg{--handleoffset:1.5rem;height:1.5rem;width:3rem}[data-theme=modus-classic-light] modus-wc-switch .modus-wc-toggle:checked,[data-theme=modus-classic-dark] modus-wc-switch .modus-wc-toggle:checked{--fallback-b1:var(--modus-wc-color-blue-light);color:var(--modus-wc-color-blue-light)}[data-theme=modus-classic-light] modus-wc-switch .modus-wc-toggle:not(:disabled):hover:not(:checked),[data-theme=modus-classic-dark] modus-wc-switch .modus-wc-toggle:not(:disabled):hover:not(:checked){background-color:var(--modus-wc-color-white);outline:2px solid var(--modus-wc-color-blue-light);outline-offset:-2px}[data-theme=modus-classic-light] modus-wc-switch .modus-wc-toggle:not(:disabled):hover:checked,[data-theme=modus-classic-dark] modus-wc-switch .modus-wc-toggle:not(:disabled):hover:checked{background-color:var(--modus-wc-color-white);--fallback-b1:var(--modus-wc-color-trimble-blue)}[data-theme=modus-classic-light] modus-wc-switch .modus-wc-toggle:not(:disabled):focus-visible,[data-theme=modus-classic-dark] modus-wc-switch .modus-wc-toggle:not(:disabled):focus-visible{outline:2px solid var(--modus-wc-color-highlight-blue);outline-offset:2px}[data-theme=modus-classic-light] modus-wc-switch .modus-wc-toggle:disabled,[data-theme=modus-classic-dark] modus-wc-switch .modus-wc-toggle:disabled{background-color:var(--modus-wc-color-white)}[data-theme=modus-classic-dark] modus-wc-switch .modus-wc-toggle:checked{--fallback-b1:var(--modus-wc-color-highlight-blue);color:var(--modus-wc-color-highlight-blue)}[data-theme=modus-classic-dark] modus-wc-switch .modus-wc-toggle:not(:disabled):hover:not(:checked){background-color:var(--modus-wc-color-white);outline:2px solid var(--modus-wc-color-highlight-blue);outline-offset:-2px}[data-theme=modus-classic-dark] modus-wc-switch .modus-wc-toggle:not(:disabled):hover:checked{background-color:var(--modus-wc-color-white);--fallback-b1:var(--modus-wc-color-blue-light)}[data-theme=connect-light] modus-wc-switch .modus-wc-toggle,[data-theme=connect-dark] modus-wc-switch .modus-wc-toggle{background-color:var(--modus-wc-color-white);border:none;color:var(--modus-wc-color-gray-4);outline-color:var(--modus-wc-color-highlight-blue);--fallback-b1:var(--modus-wc-color-gray-4)}[data-theme=connect-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-xs,[data-theme=connect-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-xs{--handleoffset:var(--modus-wc-spacing-sm);height:var(--modus-wc-spacing-lg);width:var(--modus-wc-spacing-xl)}[data-theme=connect-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-xs~modus-wc-input-label .modus-wc-input-label,[data-theme=connect-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-xs~modus-wc-input-label .modus-wc-input-label{font-size:var(--modus-wc-font-size-sm);line-height:var(--modus-wc-font-size-2xl)}[data-theme=connect-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-sm,[data-theme=connect-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-sm{--handleoffset:1rem;height:1rem;width:2rem}[data-theme=connect-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-md,[data-theme=connect-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-md{--handleoffset:1.25rem;height:1.25rem;width:2.5rem}[data-theme=connect-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-lg,[data-theme=connect-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-lg{--handleoffset:1.5rem;height:1.5rem;width:3rem}[data-theme=connect-light] modus-wc-switch .modus-wc-toggle:checked,[data-theme=connect-dark] modus-wc-switch .modus-wc-toggle:checked{--fallback-b1:var(--modus-wc-color-blue-light);color:var(--modus-wc-color-blue-light)}[data-theme=connect-light] modus-wc-switch .modus-wc-toggle:not(:disabled):hover:not(:checked),[data-theme=connect-dark] modus-wc-switch .modus-wc-toggle:not(:disabled):hover:not(:checked){background-color:var(--modus-wc-color-white);outline:2px solid var(--modus-wc-color-blue-light);outline-offset:-2px}[data-theme=connect-light] modus-wc-switch .modus-wc-toggle:not(:disabled):hover:checked,[data-theme=connect-dark] modus-wc-switch .modus-wc-toggle:not(:disabled):hover:checked{background-color:var(--modus-wc-color-white);--fallback-b1:var(--modus-wc-color-trimble-blue)}[data-theme=connect-light] modus-wc-switch .modus-wc-toggle:not(:disabled):focus-visible,[data-theme=connect-dark] modus-wc-switch .modus-wc-toggle:not(:disabled):focus-visible{outline:2px solid var(--modus-wc-color-highlight-blue);outline-offset:2px}[data-theme=connect-light] modus-wc-switch .modus-wc-toggle:disabled,[data-theme=connect-dark] modus-wc-switch .modus-wc-toggle:disabled{background-color:var(--modus-wc-color-white)}[data-theme=connect-dark] modus-wc-switch .modus-wc-toggle:checked{--fallback-b1:var(--modus-wc-color-highlight-blue);color:var(--modus-wc-color-highlight-blue)}[data-theme=connect-dark] modus-wc-switch .modus-wc-toggle:not(:disabled):hover:not(:checked){background-color:var(--modus-wc-color-white);outline:2px solid var(--modus-wc-color-highlight-blue);outline-offset:-2px}[data-theme=connect-dark] modus-wc-switch .modus-wc-toggle:not(:disabled):hover:checked{background-color:var(--modus-wc-color-white);--fallback-b1:var(--modus-wc-color-blue-light)}[data-theme=modus-modern-light] modus-wc-switch modus-wc-input-label .modus-wc-input-label,[data-theme=modus-modern-dark] modus-wc-switch modus-wc-input-label .modus-wc-input-label{color:var(--modus-wc-color-gray-10);padding-inline-start:var(--modus-wc-spacing-sm)}[data-theme=modus-modern-light] modus-wc-switch .modus-wc-toggle,[data-theme=modus-modern-dark] modus-wc-switch .modus-wc-toggle{--fallback-b1:var(--modus-wc-color-gray-0);border:none;box-shadow:var(--handleoffsetcalculator) 0 0 var(--modus-wc-border-width-md) var(--fallback-b1) inset, 0 0 0 var(--modus-wc-border-width-md) var(--fallback-b1) inset;color:var(--modus-wc-color-white)}[data-theme=modus-modern-light] modus-wc-switch .modus-wc-toggle:indeterminate,[data-theme=modus-modern-dark] modus-wc-switch .modus-wc-toggle:indeterminate{box-shadow:calc(var(--handleoffset) / 2) 0 0 var(--modus-wc-border-width-md) var(--fallback-b1) inset, calc(var(--handleoffset) / -2) 0 0 var(--modus-wc-border-width-md) var(--fallback-b1) inset, 0 0 0 var(--modus-wc-border-width-md) var(--fallback-b1) inset}[data-theme=modus-modern-light] modus-wc-switch .modus-wc-toggle:checked,[data-theme=modus-modern-dark] modus-wc-switch .modus-wc-toggle:checked{--fallback-b1:var(--modus-wc-color-primary)}[data-theme=modus-modern-light] modus-wc-switch .modus-wc-toggle:focus-visible,[data-theme=modus-modern-dark] modus-wc-switch .modus-wc-toggle:focus-visible{outline:var(--modus-wc-border-width-sm) solid var(--modus-wc-color-primary);outline-offset:var(--modus-wc-border-width-sm)}[data-theme=modus-modern-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-xs,[data-theme=modus-modern-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-xs{--handleoffset:var(--modus-wc-spacing-sm);height:var(--modus-wc-spacing-lg);width:var(--modus-wc-spacing-xl)}[data-theme=modus-modern-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-xs~modus-wc-input-label .modus-wc-input-label,[data-theme=modus-modern-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-xs~modus-wc-input-label .modus-wc-input-label{font-size:var(--modus-wc-font-size-sm);line-height:var(--modus-wc-font-size-2xl)}[data-theme=modus-modern-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-sm,[data-theme=modus-modern-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-sm{--handleoffset:var(--modus-wc-spacing-md);height:var(--modus-wc-font-size-2xl);width:var(--modus-wc-spacing-2xl)}[data-theme=modus-modern-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-sm~modus-wc-input-label .modus-wc-input-label,[data-theme=modus-modern-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-sm~modus-wc-input-label .modus-wc-input-label{font-size:var(--modus-wc-font-size-md);line-height:var(--modus-wc-line-height-md)}[data-theme=modus-modern-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-md,[data-theme=modus-modern-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-md{--handleoffset:var(--modus-wc-spacing-lg);height:var(--modus-wc-spacing-xl);width:var(--modus-wc-size-md)}[data-theme=modus-modern-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-md~modus-wc-input-label .modus-wc-input-label,[data-theme=modus-modern-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-md~modus-wc-input-label .modus-wc-input-label{font-size:var(--modus-wc-font-size-lg);line-height:var(--modus-wc-line-height-md)}[data-theme=modus-modern-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-lg,[data-theme=modus-modern-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-lg{--handleoffset:var(--modus-wc-spacing-xl);height:var(--modus-wc-spacing-2xl);width:var(--modus-wc-size-xl)}[data-theme=modus-modern-light] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-lg~modus-wc-input-label .modus-wc-input-label,[data-theme=modus-modern-dark] modus-wc-switch .modus-wc-toggle.modus-wc-toggle-lg~modus-wc-input-label .modus-wc-input-label{font-size:var(--modus-wc-font-size-xl);line-height:var(--modus-wc-line-height-lg)}[data-theme=modus-modern-dark] modus-wc-switch modus-wc-input-label .modus-wc-input-label{color:var(--modus-wc-color-gray-light)}[data-theme=modus-modern-dark] modus-wc-switch .modus-wc-toggle{--fallback-b1:var(--modus-wc-color-gray-9)}", d = /* @__PURE__ */ m(class extends l {
10
- constructor() {
11
- super(), this.__registerHost(), this.inputBlur = t(this, "inputBlur", 7), this.inputChange = t(this, "inputChange", 7), this.inputFocus = t(this, "inputFocus", 7), this.inheritedAttributes = {}, this.resolveEffectiveId = h(), this.customClass = "", this.disabled = !1, this.indeterminate = !1, this.name = "", this.required = !1, this.size = "md", this.value = !1, this.handleBlur = (o) => {
12
- this.inputBlur.emit(o);
13
- }, this.handleFocus = (o) => {
14
- this.inputFocus.emit(o);
15
- }, this.handleInput = (o) => {
16
- this.inputChange.emit(o);
17
- };
18
- }
19
- componentDidRender() {
20
- const o = this.el.querySelector('input[type="checkbox"]');
21
- o && (o.indeterminate = this.indeterminate);
22
- }
23
- componentWillLoad() {
24
- i(this.el), this.el.ariaLabel || (this.el.ariaLabel = "Switch button"), this.inheritedAttributes = w(this.el);
25
- }
26
- getClasses() {
27
- const o = ["modus-wc-toggle"], s = g({ size: this.size });
28
- return s && o.push(s), this.customClass && o.push(this.customClass), o.join(" ");
29
- }
30
- render() {
31
- const o = this.resolveEffectiveId(this.inputId), s = this.size && u[this.size];
32
- return c(a, { key: "75399153e98c3904d1f4876a6b6ec91390942571", class: "modus-wc-switch-host" }, c("input", Object.assign({ key: "39f2aba1ce81bad5104eddb136a8365372113fb8", "aria-checked": this.indeterminate ? "mixed" : this.value, "aria-disabled": this.disabled, checked: this.value, class: this.getClasses(), disabled: this.disabled, id: o, name: this.name, onBlur: this.handleBlur, onFocus: this.handleFocus, onInput: this.handleInput, required: this.required, role: "switch", tabIndex: this.inputTabIndex, type: "checkbox" }, this.inheritedAttributes)), this.label && c("modus-wc-input-label", { key: "8ae47f5b66801b1cfcae7bf8d586121c900eb527", forId: o, labelText: this.label, required: this.required, size: s }));
33
- }
34
- get el() {
35
- return this;
36
- }
37
- static get style() {
38
- return n;
39
- }
40
- }, [0, "modus-wc-switch", {
41
- customClass: [1, "custom-class"],
42
- disabled: [4],
43
- indeterminate: [1540],
44
- inputId: [1, "input-id"],
45
- inputTabIndex: [2, "input-tab-index"],
46
- label: [1],
47
- name: [1],
48
- required: [4],
49
- size: [1],
50
- value: [1540]
51
- }]);
52
- function b() {
53
- if (typeof customElements > "u")
54
- return;
55
- ["modus-wc-switch", "modus-wc-input-label"].forEach((o) => {
56
- switch (o) {
57
- case "modus-wc-switch":
58
- customElements.get(o) || customElements.define(o, d);
59
- break;
60
- case "modus-wc-input-label":
61
- customElements.get(o) || r();
62
- break;
63
- }
64
- });
65
- }
66
- const y = d, C = b;
67
- export {
68
- y as ModusWcSwitch,
69
- C as defineCustomElement
70
- };
@@ -1,9 +0,0 @@
1
- const s = {
2
- xs: "sm",
3
- sm: "md",
4
- md: "lg",
5
- lg: "lg"
6
- };
7
- export {
8
- s as D
9
- };