@wwtdev/bsds-components-vue3 1.4.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -36,7 +36,7 @@ The setup steps here are similar to a regular Vue app, but you'll also need to a
36
36
 
37
37
  ***/server/plugins/bsds-ssr.js*** (or whatever you want to name it)
38
38
  ```javascript
39
- import ComponentLibServerPlugin from "@wwtdev/bsds-components-vue3/lib/plugin-ssr.js";
39
+ import ComponentLibServerPlugin from "@wwtdev/bsds-components-vue3/plugin-ssr.js";
40
40
  import { defineNitroPlugin } from 'nitropack/dist/runtime/plugin'
41
41
 
42
42
  export default defineNitroPlugin(ComponentLibServerPlugin);
@@ -44,10 +44,11 @@ export default defineNitroPlugin(ComponentLibServerPlugin);
44
44
 
45
45
  ***/plugins/bsds-components.js*** (or whatever you want to name it)
46
46
  ```javascript
47
- import { ComponentLibrary } from '@wwtdev/bsds-components-vue3'
47
+ import { ComponentLibrary, IconLibrary } from '@wwtdev/bsds-components-vue3'
48
48
 
49
49
  export default defineNuxtPlugin((nuxtApp) => {
50
50
  nuxtApp.vueApp.use(ComponentLibrary)
51
+ nuxtApp.vueApp.use(IconLibrary)
51
52
  })
52
53
  ```
53
54
 
@@ -78,10 +79,10 @@ export default defineNuxtConfig({
78
79
  })
79
80
  ```
80
81
 
81
- Now you can use BSDS Components in your code, just like standard Vue components:
82
+ Now you can use BSDS Components in your code, just like standard Vue components, but be sure to import the component from the __/nuxt__ subdirectory:
82
83
  ```javascript
83
84
  <script setup>
84
- import { BsButton } from '@wwtdev/bsds-components-vue3'
85
+ import { BsButton } from '@wwtdev/bsds-components-vue3/nuxt'
85
86
  </script>
86
87
 
87
88
  <template>
package/lib/plugin.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  import { Plugin } from 'vue';
2
2
  export declare const ComponentLibrary: Plugin;
3
+ export declare const IconLibrary: Plugin;
package/lib/plugin.js CHANGED
@@ -1,9 +1,17 @@
1
1
  import { applyPolyfills, defineCustomElements } from '@wwtdev/bsds-components/loader';
2
+ import { applyPolyfills as applyIconPolyfills, defineCustomElements as defineIconCustomElements } from '@wwtdev/bsds-icons/dist/lib/loader';
2
3
  export const ComponentLibrary = {
3
4
  async install() {
4
5
  applyPolyfills().then(() => {
5
6
  defineCustomElements();
6
7
  });
7
- },
8
+ }
9
+ };
10
+ export const IconLibrary = {
11
+ async install() {
12
+ applyIconPolyfills().then(() => {
13
+ defineIconCustomElements();
14
+ });
15
+ }
8
16
  };
9
17
  //# sourceMappingURL=plugin.js.map
package/lib/plugin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtF,MAAM,CAAC,MAAM,gBAAgB,GAAW;IACtC,KAAK,CAAC,OAAO;QACX,cAAc,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;YACzB,oBAAoB,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtF,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE,oBAAoB,IAAI,wBAAwB,EAAE,MAAM,oCAAoC,CAAA;AAE3I,MAAM,CAAC,MAAM,gBAAgB,GAAW;IACtC,KAAK,CAAC,OAAO;QACX,cAAc,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;YACzB,oBAAoB,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAW;IACjC,KAAK,CAAC,OAAO;QACX,kBAAkB,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;YAC7B,wBAAwB,EAAE,CAAC;QAC7B,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA"}
@@ -0,0 +1,810 @@
1
+ import { defineComponent as ee, ref as f, getCurrentInstance as te, inject as se, h as ae, reactive as R, onMounted as C, watch as L, nextTick as E, onBeforeUnmount as I, openBlock as u, createElementBlock as $, Fragment as P, createBlock as m, unref as y, withCtx as B, Teleport as q, renderSlot as h, createCommentVNode as W, createElementVNode as _, mergeProps as g, createVNode as O, normalizeProps as T } from "vue";
2
+ import { useAsyncData as V } from "#imports";
3
+ import { ClientOnly as k } from "#components";
4
+ const K = "update:modelValue", H = "modelValue", re = "routerLink", Z = "navManager", oe = "router", le = "aria", A = Symbol(), j = { default: A }, J = (s) => (s == null ? void 0 : s.split(" ")) || [], ne = (s, v, o = []) => {
5
+ var e;
6
+ return [...Array.from(((e = s.value) == null ? void 0 : e.classList) || []), ...o].filter(
7
+ (a, r, n) => !v.has(a) && n.indexOf(a) === r
8
+ );
9
+ }, c = (s, v, o = [], e, a, r) => {
10
+ v !== void 0 && v();
11
+ const n = ee((i, { attrs: t, slots: d, emit: l }) => {
12
+ var Y;
13
+ let p = i[e];
14
+ const G = f(), U = new Set(J(t.class)), Q = (w) => {
15
+ w.el && (Array.isArray(a) ? a : [a]).forEach((S) => {
16
+ w.el.addEventListener(S.toLowerCase(), (b) => {
17
+ p = (b == null ? void 0 : b.target)[e], l(K, p), r && l(r, b);
18
+ });
19
+ });
20
+ }, F = te(), X = ((Y = F == null ? void 0 : F.appContext) == null ? void 0 : Y.provides[Z]) ? se(Z) : void 0, x = (w) => {
21
+ const { routerLink: D } = i;
22
+ if (D !== A)
23
+ if (X !== void 0) {
24
+ let S = { event: w };
25
+ for (const b in i) {
26
+ const z = i[b];
27
+ i.hasOwnProperty(b) && b.startsWith(oe) && z !== A && (S[b] = z);
28
+ }
29
+ X.navigate(S);
30
+ } else
31
+ console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.");
32
+ };
33
+ return () => {
34
+ p = i[e], J(t.class).forEach((b) => {
35
+ U.add(b);
36
+ });
37
+ const w = i.onClick, D = (b) => {
38
+ w !== void 0 && w(b), b.defaultPrevented || x(b);
39
+ };
40
+ let S = {
41
+ ref: G,
42
+ class: ne(G, U),
43
+ onClick: D,
44
+ onVnodeBeforeMount: a ? Q : void 0
45
+ };
46
+ for (const b in i) {
47
+ const z = i[b];
48
+ (i.hasOwnProperty(b) && z !== A || b.startsWith(le)) && (S[b] = z);
49
+ }
50
+ return e && (i[H] !== A ? S = {
51
+ ...S,
52
+ [e]: i[H]
53
+ } : p !== A && (S = {
54
+ ...S,
55
+ [e]: p
56
+ })), ae(s, S, d.default && d.default());
57
+ };
58
+ });
59
+ return typeof n != "function" && (n.name = s, n.props = {
60
+ [re]: j
61
+ }, o.forEach((i) => {
62
+ n.props[i] = j;
63
+ }), e && (n.props[H] = j, n.emits = [K, r])), n;
64
+ }, Le = /* @__PURE__ */ c("bs-badge", void 0, [
65
+ "color",
66
+ "count",
67
+ "countMax",
68
+ "dot",
69
+ "label",
70
+ "position",
71
+ "showZero"
72
+ ]), Ee = /* @__PURE__ */ c("bs-character-count", void 0, [
73
+ "charCount",
74
+ "charMax"
75
+ ]), Ie = /* @__PURE__ */ c("bs-chart-bar", void 0, [
76
+ "chartTitle",
77
+ "data",
78
+ "dataIdxLabels",
79
+ "showLegend",
80
+ "showTooltips",
81
+ "showXGrid",
82
+ "showYGrid",
83
+ "stacked",
84
+ "xLabel",
85
+ "yLabel"
86
+ ]), Pe = /* @__PURE__ */ c("bs-chart-table", void 0, [
87
+ "data",
88
+ "dataIdxLabels",
89
+ "tableTitle"
90
+ ]), qe = /* @__PURE__ */ c(
91
+ "bs-checkbox",
92
+ void 0,
93
+ [
94
+ "label",
95
+ "checked",
96
+ "checkedPartially",
97
+ "disabled",
98
+ "error",
99
+ "passAttrs",
100
+ "required",
101
+ "size"
102
+ ],
103
+ "checked",
104
+ "change"
105
+ ), We = /* @__PURE__ */ c("bs-dropdown", void 0, [
106
+ "dropdownId",
107
+ "shown",
108
+ "label",
109
+ "position",
110
+ "justify",
111
+ "variant",
112
+ "dropdownchange",
113
+ "close"
114
+ ]), _e = /* @__PURE__ */ c("bs-dropdown-option", void 0, [
115
+ "value",
116
+ "variant",
117
+ "selected",
118
+ "shown",
119
+ "focused",
120
+ "index",
121
+ "dropdownId",
122
+ "mousefocus",
123
+ "optionselect"
124
+ ]), Oe = /* @__PURE__ */ c("bs-dropdown-options", void 0, [
125
+ "dropdownId",
126
+ "shown",
127
+ "label",
128
+ "position",
129
+ "variant",
130
+ "dropdownchange",
131
+ "close"
132
+ ]), Ve = /* @__PURE__ */ c("bs-field-layout", void 0, [
133
+ "charCount",
134
+ "charMax",
135
+ "disabled",
136
+ "error",
137
+ "hints",
138
+ "label",
139
+ "labelFor",
140
+ "required",
141
+ "hintId"
142
+ ]), Me = /* @__PURE__ */ c("bs-hint", void 0, [
143
+ "error",
144
+ "hintId",
145
+ "hints"
146
+ ]), Ne = /* @__PURE__ */ c(
147
+ "bs-input",
148
+ void 0,
149
+ [
150
+ "disabled",
151
+ "error",
152
+ "passAttrs",
153
+ "placeholder",
154
+ "required",
155
+ "type",
156
+ "value",
157
+ "hintId"
158
+ ],
159
+ "value",
160
+ "input"
161
+ ), ze = /* @__PURE__ */ c("bs-input-addon", void 0, [
162
+ "disabled",
163
+ "error",
164
+ "multifocus",
165
+ "variant"
166
+ ]), De = /* @__PURE__ */ c(
167
+ "bs-input-field",
168
+ void 0,
169
+ [
170
+ "disabled",
171
+ "error",
172
+ "hints",
173
+ "label",
174
+ "passAttrs",
175
+ "placeholder",
176
+ "required",
177
+ "type",
178
+ "value"
179
+ ],
180
+ "value",
181
+ "input"
182
+ ), Fe = /* @__PURE__ */ c("bs-input-search", void 0, [
183
+ "disabled",
184
+ "passAttrs",
185
+ "placeholder",
186
+ "ariaLabel",
187
+ "hintId",
188
+ "value",
189
+ "onclear"
190
+ ]), He = /* @__PURE__ */ c("bs-profile", void 0, [
191
+ "layout",
192
+ "href",
193
+ "imageSrc",
194
+ "imageSize",
195
+ "initials",
196
+ "profileName",
197
+ "company",
198
+ "jobTitle",
199
+ "email"
200
+ ]), je = /* @__PURE__ */ c("bs-profile-details", void 0, [
201
+ "profileName",
202
+ "company",
203
+ "jobTitle",
204
+ "email"
205
+ ]), Ge = /* @__PURE__ */ c("bs-profile-img", void 0, [
206
+ "src",
207
+ "size",
208
+ "initials",
209
+ "profileName"
210
+ ]), Ue = /* @__PURE__ */ c("bs-profile-layout", void 0, [
211
+ "layout",
212
+ "href",
213
+ "passAttrs"
214
+ ]), Xe = /* @__PURE__ */ c(
215
+ "bs-radio",
216
+ void 0,
217
+ [
218
+ "label",
219
+ "checked",
220
+ "disabled",
221
+ "error",
222
+ "passAttrs",
223
+ "required",
224
+ "size",
225
+ "value"
226
+ ],
227
+ "checked",
228
+ "change"
229
+ ), Ye = /* @__PURE__ */ c(
230
+ "bs-select-field",
231
+ void 0,
232
+ [
233
+ "disabled",
234
+ "error",
235
+ "required",
236
+ "label",
237
+ "hints",
238
+ "placeholder",
239
+ "value",
240
+ "passAttrs",
241
+ "data"
242
+ ],
243
+ "value",
244
+ "change"
245
+ ), Ke = /* @__PURE__ */ c(
246
+ "bs-switch",
247
+ void 0,
248
+ [
249
+ "checked",
250
+ "disabled",
251
+ "innerOnLabel",
252
+ "innerOffLabel",
253
+ "label",
254
+ "passAttrs",
255
+ "size"
256
+ ],
257
+ "checked",
258
+ "change"
259
+ ), Ze = /* @__PURE__ */ c(
260
+ "bs-textarea",
261
+ void 0,
262
+ [
263
+ "disabled",
264
+ "error",
265
+ "passAttrs",
266
+ "placeholder",
267
+ "required",
268
+ "value",
269
+ "hintId"
270
+ ],
271
+ "value",
272
+ "input"
273
+ ), Je = /* @__PURE__ */ c(
274
+ "bs-textarea-field",
275
+ void 0,
276
+ [
277
+ "charMax",
278
+ "disabled",
279
+ "error",
280
+ "hints",
281
+ "label",
282
+ "placeholder",
283
+ "required",
284
+ "value",
285
+ "passAttrs"
286
+ ],
287
+ "value",
288
+ "input"
289
+ ), Qe = /* @__PURE__ */ c("bs-toast", void 0, [
290
+ "toastId",
291
+ "shown",
292
+ "variant",
293
+ "toastTitle",
294
+ "content",
295
+ "stacked",
296
+ "duration",
297
+ "primaryAction",
298
+ "primaryActionType",
299
+ "secondaryAction",
300
+ "secondaryActionType",
301
+ "tertiaryAction",
302
+ "tertiaryActionType",
303
+ "dismissAction",
304
+ "dismiss",
305
+ "actionclick"
306
+ ]), xe = /* @__PURE__ */ c("bs-toaster", void 0), et = /* @__PURE__ */ c("bs-tooltip", void 0, [
307
+ "tooltipId",
308
+ "content",
309
+ "position"
310
+ ]);
311
+ function M(s) {
312
+ const { height: v, width: o } = s.value.getBoundingClientRect();
313
+ s.value.style.minHeight = v + "px", s.value.style.minWidth = o + "px", s.value.replaceChildren();
314
+ }
315
+ function N(s) {
316
+ s.value.style.minHeight = null, s.value.style.minWidth = null;
317
+ }
318
+ const ie = ["controlled", "icon", "header-text", "heading-level", "open-item", "stacked"], de = {
319
+ __name: "BsAccordionServer",
320
+ props: {
321
+ controlled: { default: !1 },
322
+ icon: {},
323
+ headerText: {},
324
+ headingLevel: {},
325
+ openItem: { default: !1 },
326
+ stacked: { default: !1 }
327
+ },
328
+ emits: ["toggled"],
329
+ setup(s, { emit: v }) {
330
+ const o = f(!1), e = f(null), a = f(""), r = R([]), n = f(null), i = (t, d = 0) => {
331
+ var l, p;
332
+ e.value || d >= 4 || (e.value = (p = (l = t.value) == null ? void 0 : l.querySelector) == null ? void 0 : p.call(l, "[data-slot]"), e.value || r.push(setTimeout(() => i(t, d + 1), 50)));
333
+ };
334
+ return C(() => i(n, 0)), L(e, (t) => {
335
+ !t || o.value || (M(e), r.push(setTimeout(() => {
336
+ N(e), E(() => {
337
+ a.value = customElements.get("bs-accordion") ? "hydrated superhydrated" : "superhydrated";
338
+ });
339
+ }, 100)), o.value = !0);
340
+ }, { immediate: !0 }), I(() => r.forEach((t) => clearTimeout(t))), (t, d) => (u(), $(P, null, [
341
+ e.value ? (u(), m(y(k), { key: 0 }, {
342
+ default: B(() => [
343
+ (u(), m(q, { to: e.value }, [
344
+ h(t.$slots, "default")
345
+ ], 8, ["to"]))
346
+ ]),
347
+ _: 3
348
+ })) : W("", !0),
349
+ _("bs-accordion", g({
350
+ ref_key: "wcRef",
351
+ ref: n,
352
+ class: a.value,
353
+ "data-bsds-ssr": "",
354
+ controlled: s.controlled,
355
+ icon: s.icon,
356
+ "header-text": s.headerText,
357
+ "heading-level": s.headingLevel,
358
+ "open-item": s.openItem,
359
+ stacked: s.stacked,
360
+ onToggled: d[0] || (d[0] = (l) => v("toggled", l.detail))
361
+ }, t.$attrs), [
362
+ O(y(k), null, {
363
+ fallback: B(() => [
364
+ h(t.$slots, "default")
365
+ ]),
366
+ _: 3
367
+ })
368
+ ], 16, ie)
369
+ ], 64));
370
+ }
371
+ }, ue = "bs-accordion", tt = {
372
+ __name: "BsAccordion",
373
+ props: {
374
+ controlled: { default: !1 },
375
+ icon: {},
376
+ headerText: {},
377
+ headingLevel: {},
378
+ openItem: { default: !1 },
379
+ stacked: { default: !1 }
380
+ },
381
+ emits: ["toggled"],
382
+ setup(s, { emit: v }) {
383
+ const o = s, { data: e } = V(ue, () => {
384
+ if (process.server)
385
+ return !0;
386
+ });
387
+ return (a, r) => y(e) ? (u(), m(de, g({ key: 0 }, { ...o, ...a.$attrs }, {
388
+ onToggled: r[0] || (r[0] = (n) => v("toggled", n.detail))
389
+ }), {
390
+ default: B(() => [
391
+ h(a.$slots, "default")
392
+ ]),
393
+ _: 3
394
+ }, 16)) : (u(), $("bs-accordion", g({ key: 1 }, { ...o, ...a.$attrs }, {
395
+ onToggled: r[1] || (r[1] = (n) => v("toggled", n.detail))
396
+ }), [
397
+ h(a.$slots, "default")
398
+ ], 16));
399
+ }
400
+ }, ce = {
401
+ __name: "BsBannerServer",
402
+ props: {},
403
+ emits: ["dismiss"],
404
+ setup(s, { emit: v }) {
405
+ const o = f(!1), e = f(null), a = f(""), r = R([]), n = f(null), i = (t, d = 0) => {
406
+ var l, p;
407
+ e.value || d >= 4 || (e.value = (p = (l = t.value) == null ? void 0 : l.querySelector) == null ? void 0 : p.call(l, "[data-slot]"), e.value || r.push(setTimeout(() => i(t, d + 1), 50)));
408
+ };
409
+ return C(() => i(n, 0)), L(e, (t) => {
410
+ !t || o.value || (M(e), r.push(setTimeout(() => {
411
+ N(e), E(() => {
412
+ a.value = customElements.get("bs-banner") ? "hydrated superhydrated" : "superhydrated";
413
+ });
414
+ }, 100)), o.value = !0);
415
+ }, { immediate: !0 }), I(() => r.forEach((t) => clearTimeout(t))), (t, d) => (u(), $(P, null, [
416
+ e.value ? (u(), m(y(k), { key: 0 }, {
417
+ default: B(() => [
418
+ (u(), m(q, { to: e.value }, [
419
+ h(t.$slots, "default")
420
+ ], 8, ["to"]))
421
+ ]),
422
+ _: 3
423
+ })) : W("", !0),
424
+ _("bs-banner", g({
425
+ ref_key: "wcRef",
426
+ ref: n,
427
+ class: a.value,
428
+ "data-bsds-ssr": "",
429
+ onDismiss: d[0] || (d[0] = (l) => v("dismiss", l.detail))
430
+ }, t.$attrs), [
431
+ O(y(k), null, {
432
+ fallback: B(() => [
433
+ h(t.$slots, "default")
434
+ ]),
435
+ _: 3
436
+ })
437
+ ], 16)
438
+ ], 64));
439
+ }
440
+ }, fe = "bs-banner", st = {
441
+ __name: "BsBanner",
442
+ props: {},
443
+ emits: ["dismiss"],
444
+ setup(s, { emit: v }) {
445
+ const o = s, { data: e } = V(fe, () => {
446
+ if (process.server)
447
+ return !0;
448
+ });
449
+ return (a, r) => y(e) ? (u(), m(ce, g({ key: 0 }, { ...o, ...a.$attrs }, {
450
+ onDismiss: r[0] || (r[0] = (n) => v("dismiss", n.detail))
451
+ }), {
452
+ default: B(() => [
453
+ h(a.$slots, "default")
454
+ ]),
455
+ _: 3
456
+ }, 16)) : (u(), $("bs-banner", g({ key: 1 }, { ...o, ...a.$attrs }, {
457
+ onDismiss: r[1] || (r[1] = (n) => v("dismiss", n.detail))
458
+ }), [
459
+ h(a.$slots, "default")
460
+ ], 16));
461
+ }
462
+ }, ve = ["variant", "disabled", "ghost-btn", "href", "pass-attrs", "text-btn", "size"], he = {
463
+ __name: "BsButtonServer",
464
+ props: {
465
+ variant: {},
466
+ disabled: {},
467
+ ghostBtn: {},
468
+ href: {},
469
+ passAttrs: { default: "" },
470
+ textBtn: {},
471
+ size: {}
472
+ },
473
+ emits: [],
474
+ setup(s, { emit: v }) {
475
+ const o = f(!1), e = f(null), a = f(""), r = R([]), n = f(null), i = (t, d = 0) => {
476
+ var l, p;
477
+ e.value || d >= 4 || (e.value = (p = (l = t.value) == null ? void 0 : l.querySelector) == null ? void 0 : p.call(l, "[data-slot]"), e.value || r.push(setTimeout(() => i(t, d + 1), 50)));
478
+ };
479
+ return C(() => i(n, 0)), L(e, (t) => {
480
+ !t || o.value || (M(e), r.push(setTimeout(() => {
481
+ N(e), E(() => {
482
+ a.value = customElements.get("bs-button") ? "hydrated superhydrated" : "superhydrated";
483
+ });
484
+ }, 100)), o.value = !0);
485
+ }, { immediate: !0 }), I(() => r.forEach((t) => clearTimeout(t))), (t, d) => (u(), $(P, null, [
486
+ e.value ? (u(), m(y(k), { key: 0 }, {
487
+ default: B(() => [
488
+ (u(), m(q, { to: e.value }, [
489
+ h(t.$slots, "default")
490
+ ], 8, ["to"]))
491
+ ]),
492
+ _: 3
493
+ })) : W("", !0),
494
+ _("bs-button", g({
495
+ ref_key: "wcRef",
496
+ ref: n,
497
+ class: a.value,
498
+ "data-bsds-ssr": "",
499
+ variant: s.variant,
500
+ disabled: s.disabled,
501
+ "ghost-btn": s.ghostBtn,
502
+ href: s.href,
503
+ "pass-attrs": s.passAttrs,
504
+ "text-btn": s.textBtn,
505
+ size: s.size
506
+ }, t.$attrs), [
507
+ O(y(k), null, {
508
+ fallback: B(() => [
509
+ h(t.$slots, "default")
510
+ ]),
511
+ _: 3
512
+ })
513
+ ], 16, ve)
514
+ ], 64));
515
+ }
516
+ }, pe = "bs-button", at = {
517
+ __name: "BsButton",
518
+ props: {
519
+ variant: {},
520
+ disabled: {},
521
+ ghostBtn: {},
522
+ href: {},
523
+ passAttrs: { default: "" },
524
+ textBtn: {},
525
+ size: {}
526
+ },
527
+ emits: [],
528
+ setup(s, { emit: v }) {
529
+ const o = s, { data: e } = V(pe, () => {
530
+ if (process.server)
531
+ return !0;
532
+ });
533
+ return (a, r) => y(e) ? (u(), m(he, T(g({ key: 0 }, { ...o, ...a.$attrs })), {
534
+ default: B(() => [
535
+ h(a.$slots, "default")
536
+ ]),
537
+ _: 3
538
+ }, 16)) : (u(), $("bs-button", T(g({ key: 1 }, { ...o, ...a.$attrs })), [
539
+ h(a.$slots, "default")
540
+ ], 16));
541
+ }
542
+ }, be = ["disabled", "for", "hide", "pass-attrs", "required"], me = {
543
+ __name: "BsLabelServer",
544
+ props: {
545
+ disabled: {},
546
+ for: {},
547
+ hide: {},
548
+ passAttrs: { default: "" },
549
+ required: {}
550
+ },
551
+ emits: [],
552
+ setup(s, { emit: v }) {
553
+ const o = f(!1), e = f(null), a = f(""), r = R([]), n = f(null), i = (t, d = 0) => {
554
+ var l, p;
555
+ e.value || d >= 4 || (e.value = (p = (l = t.value) == null ? void 0 : l.querySelector) == null ? void 0 : p.call(l, "[data-slot]"), e.value || r.push(setTimeout(() => i(t, d + 1), 50)));
556
+ };
557
+ return C(() => i(n, 0)), L(e, (t) => {
558
+ !t || o.value || (M(e), r.push(setTimeout(() => {
559
+ N(e), E(() => {
560
+ a.value = customElements.get("bs-label") ? "hydrated superhydrated" : "superhydrated";
561
+ });
562
+ }, 100)), o.value = !0);
563
+ }, { immediate: !0 }), I(() => r.forEach((t) => clearTimeout(t))), (t, d) => (u(), $(P, null, [
564
+ e.value ? (u(), m(y(k), { key: 0 }, {
565
+ default: B(() => [
566
+ (u(), m(q, { to: e.value }, [
567
+ h(t.$slots, "default")
568
+ ], 8, ["to"]))
569
+ ]),
570
+ _: 3
571
+ })) : W("", !0),
572
+ _("bs-label", g({
573
+ ref_key: "wcRef",
574
+ ref: n,
575
+ class: a.value,
576
+ "data-bsds-ssr": "",
577
+ disabled: s.disabled,
578
+ for: s.for,
579
+ hide: s.hide,
580
+ "pass-attrs": s.passAttrs,
581
+ required: s.required
582
+ }, t.$attrs), [
583
+ O(y(k), null, {
584
+ fallback: B(() => [
585
+ h(t.$slots, "default")
586
+ ]),
587
+ _: 3
588
+ })
589
+ ], 16, be)
590
+ ], 64));
591
+ }
592
+ }, ye = "bs-label", rt = {
593
+ __name: "BsLabel",
594
+ props: {
595
+ disabled: {},
596
+ for: {},
597
+ hide: {},
598
+ passAttrs: { default: "" },
599
+ required: {}
600
+ },
601
+ emits: [],
602
+ setup(s, { emit: v }) {
603
+ const o = s, { data: e } = V(ye, () => {
604
+ if (process.server)
605
+ return !0;
606
+ });
607
+ return (a, r) => y(e) ? (u(), m(me, T(g({ key: 0 }, { ...o, ...a.$attrs })), {
608
+ default: B(() => [
609
+ h(a.$slots, "default")
610
+ ]),
611
+ _: 3
612
+ }, 16)) : (u(), $("bs-label", T(g({ key: 1 }, { ...o, ...a.$attrs })), [
613
+ h(a.$slots, "default")
614
+ ], 16));
615
+ }
616
+ }, Be = ["variant", "status", "href", "active", "disabled", "pass-attrs"], ge = {
617
+ __name: "BsPillServer",
618
+ props: {
619
+ variant: {},
620
+ status: {},
621
+ href: {},
622
+ active: {},
623
+ disabled: {},
624
+ passAttrs: { default: "" }
625
+ },
626
+ emits: [],
627
+ setup(s, { emit: v }) {
628
+ const o = f(!1), e = f(null), a = f(""), r = R([]), n = f(null), i = (t, d = 0) => {
629
+ var l, p;
630
+ e.value || d >= 4 || (e.value = (p = (l = t.value) == null ? void 0 : l.querySelector) == null ? void 0 : p.call(l, "[data-slot]"), e.value || r.push(setTimeout(() => i(t, d + 1), 50)));
631
+ };
632
+ return C(() => i(n, 0)), L(e, (t) => {
633
+ !t || o.value || (M(e), r.push(setTimeout(() => {
634
+ N(e), E(() => {
635
+ a.value = customElements.get("bs-pill") ? "hydrated superhydrated" : "superhydrated";
636
+ });
637
+ }, 100)), o.value = !0);
638
+ }, { immediate: !0 }), I(() => r.forEach((t) => clearTimeout(t))), (t, d) => (u(), $(P, null, [
639
+ e.value ? (u(), m(y(k), { key: 0 }, {
640
+ default: B(() => [
641
+ (u(), m(q, { to: e.value }, [
642
+ h(t.$slots, "default")
643
+ ], 8, ["to"]))
644
+ ]),
645
+ _: 3
646
+ })) : W("", !0),
647
+ _("bs-pill", g({
648
+ ref_key: "wcRef",
649
+ ref: n,
650
+ class: a.value,
651
+ "data-bsds-ssr": "",
652
+ variant: s.variant,
653
+ status: s.status,
654
+ href: s.href,
655
+ active: s.active,
656
+ disabled: s.disabled,
657
+ "pass-attrs": s.passAttrs
658
+ }, t.$attrs), [
659
+ O(y(k), null, {
660
+ fallback: B(() => [
661
+ h(t.$slots, "default")
662
+ ]),
663
+ _: 3
664
+ })
665
+ ], 16, Be)
666
+ ], 64));
667
+ }
668
+ }, ke = "bs-pill", ot = {
669
+ __name: "BsPill",
670
+ props: {
671
+ variant: {},
672
+ status: {},
673
+ href: {},
674
+ active: {},
675
+ disabled: {},
676
+ passAttrs: { default: "" }
677
+ },
678
+ emits: [],
679
+ setup(s, { emit: v }) {
680
+ const o = s, { data: e } = V(ke, () => {
681
+ if (process.server)
682
+ return !0;
683
+ });
684
+ return (a, r) => y(e) ? (u(), m(ge, T(g({ key: 0 }, { ...o, ...a.$attrs })), {
685
+ default: B(() => [
686
+ h(a.$slots, "default")
687
+ ]),
688
+ _: 3
689
+ }, 16)) : (u(), $("bs-pill", T(g({ key: 1 }, { ...o, ...a.$attrs })), [
690
+ h(a.$slots, "default")
691
+ ], 16));
692
+ }
693
+ }, $e = ["disabled", "required", "error", "hint-id", "value", "pass-attrs"], Se = {
694
+ __name: "BsSelectServer",
695
+ props: {
696
+ disabled: { default: !1 },
697
+ required: {},
698
+ error: {},
699
+ hintId: {},
700
+ value: {},
701
+ passAttrs: { default: "" }
702
+ },
703
+ emits: [],
704
+ setup(s, { emit: v }) {
705
+ const o = f(!1), e = f(null), a = f(""), r = R([]), n = f(null), i = (t, d = 0) => {
706
+ var l, p;
707
+ e.value || d >= 4 || (e.value = (p = (l = t.value) == null ? void 0 : l.querySelector) == null ? void 0 : p.call(l, "[data-slot]"), e.value || r.push(setTimeout(() => i(t, d + 1), 50)));
708
+ };
709
+ return C(() => i(n, 0)), L(e, (t) => {
710
+ !t || o.value || (M(e), r.push(setTimeout(() => {
711
+ N(e), E(() => {
712
+ a.value = customElements.get("bs-select") ? "hydrated superhydrated" : "superhydrated";
713
+ });
714
+ }, 100)), o.value = !0);
715
+ }, { immediate: !0 }), I(() => r.forEach((t) => clearTimeout(t))), (t, d) => (u(), $(P, null, [
716
+ e.value ? (u(), m(y(k), { key: 0 }, {
717
+ default: B(() => [
718
+ (u(), m(q, { to: e.value }, [
719
+ h(t.$slots, "default")
720
+ ], 8, ["to"]))
721
+ ]),
722
+ _: 3
723
+ })) : W("", !0),
724
+ _("bs-select", g({
725
+ ref_key: "wcRef",
726
+ ref: n,
727
+ class: a.value,
728
+ "data-bsds-ssr": "",
729
+ disabled: s.disabled,
730
+ required: s.required,
731
+ error: s.error,
732
+ "hint-id": s.hintId,
733
+ value: s.value,
734
+ "pass-attrs": s.passAttrs
735
+ }, t.$attrs), [
736
+ O(y(k), null, {
737
+ fallback: B(() => [
738
+ h(t.$slots, "default")
739
+ ]),
740
+ _: 3
741
+ })
742
+ ], 16, $e)
743
+ ], 64));
744
+ }
745
+ }, Te = "bs-select", lt = {
746
+ __name: "BsSelect",
747
+ props: {
748
+ disabled: { default: !1 },
749
+ required: {},
750
+ error: {},
751
+ hintId: {},
752
+ value: {},
753
+ passAttrs: { default: "" }
754
+ },
755
+ emits: [],
756
+ setup(s, { emit: v }) {
757
+ const o = s, { data: e } = V(Te, () => {
758
+ if (process.server)
759
+ return !0;
760
+ });
761
+ return (a, r) => y(e) ? (u(), m(Se, T(g({ key: 0 }, { ...o, ...a.$attrs })), {
762
+ default: B(() => [
763
+ h(a.$slots, "default")
764
+ ]),
765
+ _: 3
766
+ }, 16)) : (u(), $("bs-select", T(g({ key: 1 }, { ...o, ...a.$attrs })), [
767
+ h(a.$slots, "default")
768
+ ], 16));
769
+ }
770
+ };
771
+ export {
772
+ tt as BsAccordion,
773
+ de as BsAccordionServer,
774
+ Le as BsBadge,
775
+ st as BsBanner,
776
+ ce as BsBannerServer,
777
+ at as BsButton,
778
+ he as BsButtonServer,
779
+ Ee as BsCharacterCount,
780
+ Ie as BsChartBar,
781
+ Pe as BsChartTable,
782
+ qe as BsCheckbox,
783
+ We as BsDropdown,
784
+ _e as BsDropdownOption,
785
+ Oe as BsDropdownOptions,
786
+ Ve as BsFieldLayout,
787
+ Me as BsHint,
788
+ Ne as BsInput,
789
+ ze as BsInputAddon,
790
+ De as BsInputField,
791
+ Fe as BsInputSearch,
792
+ rt as BsLabel,
793
+ me as BsLabelServer,
794
+ ot as BsPill,
795
+ ge as BsPillServer,
796
+ He as BsProfile,
797
+ je as BsProfileDetails,
798
+ Ge as BsProfileImg,
799
+ Ue as BsProfileLayout,
800
+ Xe as BsRadio,
801
+ lt as BsSelect,
802
+ Ye as BsSelectField,
803
+ Se as BsSelectServer,
804
+ Ke as BsSwitch,
805
+ Ze as BsTextarea,
806
+ Je as BsTextareaField,
807
+ Qe as BsToast,
808
+ xe as BsToaster,
809
+ et as BsTooltip
810
+ };
@@ -0,0 +1 @@
1
+ (function(o,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("#imports"),require("#components")):typeof define=="function"&&define.amd?define(["exports","vue","#imports","#components"],e):(o=typeof globalThis<"u"?globalThis:o||self,e(o.BsdsComponents={},o.Vue,o._imports,o._components))})(this,function(o,e,y,B){"use strict";const E="update:modelValue",$="modelValue",U="routerLink",R="navManager",j="router",H="aria",g=Symbol(),A={default:g},I=s=>(s==null?void 0:s.split(" "))||[],G=(s,h,n=[])=>{var t;return[...Array.from(((t=s.value)==null?void 0:t.classList)||[]),...n].filter((a,l,d)=>!h.has(a)&&d.indexOf(a)===l)},u=(s,h,n=[],t,a,l)=>{h!==void 0&&h();const d=e.defineComponent((c,{attrs:r,slots:f,emit:i})=>{var M;let p=c[t];const D=e.ref(),z=new Set(I(r.class)),qe=k=>{k.el&&(Array.isArray(a)?a:[a]).forEach(b=>{k.el.addEventListener(b.toLowerCase(),m=>{p=(m==null?void 0:m.target)[t],i(E,p),l&&i(l,m)})})},P=e.getCurrentInstance(),F=((M=P==null?void 0:P.appContext)==null?void 0:M.provides[R])?e.inject(R):void 0,Ne=k=>{const{routerLink:T}=c;if(T!==g)if(F!==void 0){let b={event:k};for(const m in c){const C=c[m];c.hasOwnProperty(m)&&m.startsWith(j)&&C!==g&&(b[m]=C)}F.navigate(b)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{p=c[t],I(r.class).forEach(m=>{z.add(m)});const k=c.onClick,T=m=>{k!==void 0&&k(m),m.defaultPrevented||Ne(m)};let b={ref:D,class:G(D,z),onClick:T,onVnodeBeforeMount:a?qe:void 0};for(const m in c){const C=c[m];(c.hasOwnProperty(m)&&C!==g||m.startsWith(H))&&(b[m]=C)}return t&&(c[$]!==g?b={...b,[t]:c[$]}:p!==g&&(b={...b,[t]:p})),e.h(s,b,f.default&&f.default())}});return typeof d!="function"&&(d.name=s,d.props={[U]:A},n.forEach(c=>{d.props[c]=A}),t&&(d.props[$]=A,d.emits=[E,l])),d},X=u("bs-badge",void 0,["color","count","countMax","dot","label","position","showZero"]),Y=u("bs-character-count",void 0,["charCount","charMax"]),_=u("bs-chart-bar",void 0,["chartTitle","data","dataIdxLabels","showLegend","showTooltips","showXGrid","showYGrid","stacked","xLabel","yLabel"]),K=u("bs-chart-table",void 0,["data","dataIdxLabels","tableTitle"]),Z=u("bs-checkbox",void 0,["label","checked","checkedPartially","disabled","error","passAttrs","required","size"],"checked","change"),J=u("bs-dropdown",void 0,["dropdownId","shown","label","position","justify","variant","dropdownchange","close"]),Q=u("bs-dropdown-option",void 0,["value","variant","selected","shown","focused","index","dropdownId","mousefocus","optionselect"]),x=u("bs-dropdown-options",void 0,["dropdownId","shown","label","position","variant","dropdownchange","close"]),v=u("bs-field-layout",void 0,["charCount","charMax","disabled","error","hints","label","labelFor","required","hintId"]),ee=u("bs-hint",void 0,["error","hintId","hints"]),te=u("bs-input",void 0,["disabled","error","passAttrs","placeholder","required","type","value","hintId"],"value","input"),re=u("bs-input-addon",void 0,["disabled","error","multifocus","variant"]),se=u("bs-input-field",void 0,["disabled","error","hints","label","passAttrs","placeholder","required","type","value"],"value","input"),ae=u("bs-input-search",void 0,["disabled","passAttrs","placeholder","ariaLabel","hintId","value","onclear"]),oe=u("bs-profile",void 0,["layout","href","imageSrc","imageSize","initials","profileName","company","jobTitle","email"]),le=u("bs-profile-details",void 0,["profileName","company","jobTitle","email"]),ne=u("bs-profile-img",void 0,["src","size","initials","profileName"]),ie=u("bs-profile-layout",void 0,["layout","href","passAttrs"]),de=u("bs-radio",void 0,["label","checked","disabled","error","passAttrs","required","size","value"],"checked","change"),ce=u("bs-select-field",void 0,["disabled","error","required","label","hints","placeholder","value","passAttrs","data"],"value","change"),fe=u("bs-switch",void 0,["checked","disabled","innerOnLabel","innerOffLabel","label","passAttrs","size"],"checked","change"),ue=u("bs-textarea",void 0,["disabled","error","passAttrs","placeholder","required","value","hintId"],"value","input"),he=u("bs-textarea-field",void 0,["charMax","disabled","error","hints","label","placeholder","required","value","passAttrs"],"value","input"),pe=u("bs-toast",void 0,["toastId","shown","variant","toastTitle","content","stacked","duration","primaryAction","primaryActionType","secondaryAction","secondaryActionType","tertiaryAction","tertiaryActionType","dismissAction","dismiss","actionclick"]),me=u("bs-toaster",void 0),Be=u("bs-tooltip",void 0,["tooltipId","content","position"]);function S(s){const{height:h,width:n}=s.value.getBoundingClientRect();s.value.style.minHeight=h+"px",s.value.style.minWidth=n+"px",s.value.replaceChildren()}function w(s){s.value.style.minHeight=null,s.value.style.minWidth=null}const be=["controlled","icon","header-text","heading-level","open-item","stacked"],L={__name:"BsAccordionServer",props:{controlled:{default:!1},icon:{},headerText:{},headingLevel:{},openItem:{default:!1},stacked:{default:!1}},emits:["toggled"],setup(s,{emit:h}){const n=e.ref(!1),t=e.ref(null),a=e.ref(""),l=e.reactive([]),d=e.ref(null),c=(r,f=0)=>{var i,p;t.value||f>=4||(t.value=(p=(i=r.value)==null?void 0:i.querySelector)==null?void 0:p.call(i,"[data-slot]"),t.value||l.push(setTimeout(()=>c(r,f+1),50)))};return e.onMounted(()=>c(d,0)),e.watch(t,r=>{!r||n.value||(S(t),l.push(setTimeout(()=>{w(t),e.nextTick(()=>{a.value=customElements.get("bs-accordion")?"hydrated superhydrated":"superhydrated"})},100)),n.value=!0)},{immediate:!0}),e.onBeforeUnmount(()=>l.forEach(r=>clearTimeout(r))),(r,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.value?(e.openBlock(),e.createBlock(e.unref(B.ClientOnly),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:t.value},[e.renderSlot(r.$slots,"default")],8,["to"]))]),_:3})):e.createCommentVNode("",!0),e.createElementVNode("bs-accordion",e.mergeProps({ref_key:"wcRef",ref:d,class:a.value,"data-bsds-ssr":"",controlled:s.controlled,icon:s.icon,"header-text":s.headerText,"heading-level":s.headingLevel,"open-item":s.openItem,stacked:s.stacked,onToggled:f[0]||(f[0]=i=>h("toggled",i.detail))},r.$attrs),[e.createVNode(e.unref(B.ClientOnly),null,{fallback:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3})],16,be)],64))}},ke="bs-accordion",ye={__name:"BsAccordion",props:{controlled:{default:!1},icon:{},headerText:{},headingLevel:{},openItem:{default:!1},stacked:{default:!1}},emits:["toggled"],setup(s,{emit:h}){const n=s,{data:t}=y.useAsyncData(ke,()=>{if(process.server)return!0});return(a,l)=>e.unref(t)?(e.openBlock(),e.createBlock(L,e.mergeProps({key:0},{...n,...a.$attrs},{onToggled:l[0]||(l[0]=d=>h("toggled",d.detail))}),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("bs-accordion",e.mergeProps({key:1},{...n,...a.$attrs},{onToggled:l[1]||(l[1]=d=>h("toggled",d.detail))}),[e.renderSlot(a.$slots,"default")],16))}},V={__name:"BsBannerServer",props:{},emits:["dismiss"],setup(s,{emit:h}){const n=e.ref(!1),t=e.ref(null),a=e.ref(""),l=e.reactive([]),d=e.ref(null),c=(r,f=0)=>{var i,p;t.value||f>=4||(t.value=(p=(i=r.value)==null?void 0:i.querySelector)==null?void 0:p.call(i,"[data-slot]"),t.value||l.push(setTimeout(()=>c(r,f+1),50)))};return e.onMounted(()=>c(d,0)),e.watch(t,r=>{!r||n.value||(S(t),l.push(setTimeout(()=>{w(t),e.nextTick(()=>{a.value=customElements.get("bs-banner")?"hydrated superhydrated":"superhydrated"})},100)),n.value=!0)},{immediate:!0}),e.onBeforeUnmount(()=>l.forEach(r=>clearTimeout(r))),(r,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.value?(e.openBlock(),e.createBlock(e.unref(B.ClientOnly),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:t.value},[e.renderSlot(r.$slots,"default")],8,["to"]))]),_:3})):e.createCommentVNode("",!0),e.createElementVNode("bs-banner",e.mergeProps({ref_key:"wcRef",ref:d,class:a.value,"data-bsds-ssr":"",onDismiss:f[0]||(f[0]=i=>h("dismiss",i.detail))},r.$attrs),[e.createVNode(e.unref(B.ClientOnly),null,{fallback:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3})],16)],64))}},ge="bs-banner",Se={__name:"BsBanner",props:{},emits:["dismiss"],setup(s,{emit:h}){const n=s,{data:t}=y.useAsyncData(ge,()=>{if(process.server)return!0});return(a,l)=>e.unref(t)?(e.openBlock(),e.createBlock(V,e.mergeProps({key:0},{...n,...a.$attrs},{onDismiss:l[0]||(l[0]=d=>h("dismiss",d.detail))}),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("bs-banner",e.mergeProps({key:1},{...n,...a.$attrs},{onDismiss:l[1]||(l[1]=d=>h("dismiss",d.detail))}),[e.renderSlot(a.$slots,"default")],16))}},we=["variant","disabled","ghost-btn","href","pass-attrs","text-btn","size"],O={__name:"BsButtonServer",props:{variant:{},disabled:{},ghostBtn:{},href:{},passAttrs:{default:""},textBtn:{},size:{}},emits:[],setup(s,{emit:h}){const n=e.ref(!1),t=e.ref(null),a=e.ref(""),l=e.reactive([]),d=e.ref(null),c=(r,f=0)=>{var i,p;t.value||f>=4||(t.value=(p=(i=r.value)==null?void 0:i.querySelector)==null?void 0:p.call(i,"[data-slot]"),t.value||l.push(setTimeout(()=>c(r,f+1),50)))};return e.onMounted(()=>c(d,0)),e.watch(t,r=>{!r||n.value||(S(t),l.push(setTimeout(()=>{w(t),e.nextTick(()=>{a.value=customElements.get("bs-button")?"hydrated superhydrated":"superhydrated"})},100)),n.value=!0)},{immediate:!0}),e.onBeforeUnmount(()=>l.forEach(r=>clearTimeout(r))),(r,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.value?(e.openBlock(),e.createBlock(e.unref(B.ClientOnly),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:t.value},[e.renderSlot(r.$slots,"default")],8,["to"]))]),_:3})):e.createCommentVNode("",!0),e.createElementVNode("bs-button",e.mergeProps({ref_key:"wcRef",ref:d,class:a.value,"data-bsds-ssr":"",variant:s.variant,disabled:s.disabled,"ghost-btn":s.ghostBtn,href:s.href,"pass-attrs":s.passAttrs,"text-btn":s.textBtn,size:s.size},r.$attrs),[e.createVNode(e.unref(B.ClientOnly),null,{fallback:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3})],16,we)],64))}},Ce="bs-button",Te={__name:"BsButton",props:{variant:{},disabled:{},ghostBtn:{},href:{},passAttrs:{default:""},textBtn:{},size:{}},emits:[],setup(s,{emit:h}){const n=s,{data:t}=y.useAsyncData(Ce,()=>{if(process.server)return!0});return(a,l)=>e.unref(t)?(e.openBlock(),e.createBlock(O,e.normalizeProps(e.mergeProps({key:0},{...n,...a.$attrs})),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("bs-button",e.normalizeProps(e.mergeProps({key:1},{...n,...a.$attrs})),[e.renderSlot(a.$slots,"default")],16))}},$e=["disabled","for","hide","pass-attrs","required"],q={__name:"BsLabelServer",props:{disabled:{},for:{},hide:{},passAttrs:{default:""},required:{}},emits:[],setup(s,{emit:h}){const n=e.ref(!1),t=e.ref(null),a=e.ref(""),l=e.reactive([]),d=e.ref(null),c=(r,f=0)=>{var i,p;t.value||f>=4||(t.value=(p=(i=r.value)==null?void 0:i.querySelector)==null?void 0:p.call(i,"[data-slot]"),t.value||l.push(setTimeout(()=>c(r,f+1),50)))};return e.onMounted(()=>c(d,0)),e.watch(t,r=>{!r||n.value||(S(t),l.push(setTimeout(()=>{w(t),e.nextTick(()=>{a.value=customElements.get("bs-label")?"hydrated superhydrated":"superhydrated"})},100)),n.value=!0)},{immediate:!0}),e.onBeforeUnmount(()=>l.forEach(r=>clearTimeout(r))),(r,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.value?(e.openBlock(),e.createBlock(e.unref(B.ClientOnly),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:t.value},[e.renderSlot(r.$slots,"default")],8,["to"]))]),_:3})):e.createCommentVNode("",!0),e.createElementVNode("bs-label",e.mergeProps({ref_key:"wcRef",ref:d,class:a.value,"data-bsds-ssr":"",disabled:s.disabled,for:s.for,hide:s.hide,"pass-attrs":s.passAttrs,required:s.required},r.$attrs),[e.createVNode(e.unref(B.ClientOnly),null,{fallback:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3})],16,$e)],64))}},Ae="bs-label",Pe={__name:"BsLabel",props:{disabled:{},for:{},hide:{},passAttrs:{default:""},required:{}},emits:[],setup(s,{emit:h}){const n=s,{data:t}=y.useAsyncData(Ae,()=>{if(process.server)return!0});return(a,l)=>e.unref(t)?(e.openBlock(),e.createBlock(q,e.normalizeProps(e.mergeProps({key:0},{...n,...a.$attrs})),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("bs-label",e.normalizeProps(e.mergeProps({key:1},{...n,...a.$attrs})),[e.renderSlot(a.$slots,"default")],16))}},Ee=["variant","status","href","active","disabled","pass-attrs"],N={__name:"BsPillServer",props:{variant:{},status:{},href:{},active:{},disabled:{},passAttrs:{default:""}},emits:[],setup(s,{emit:h}){const n=e.ref(!1),t=e.ref(null),a=e.ref(""),l=e.reactive([]),d=e.ref(null),c=(r,f=0)=>{var i,p;t.value||f>=4||(t.value=(p=(i=r.value)==null?void 0:i.querySelector)==null?void 0:p.call(i,"[data-slot]"),t.value||l.push(setTimeout(()=>c(r,f+1),50)))};return e.onMounted(()=>c(d,0)),e.watch(t,r=>{!r||n.value||(S(t),l.push(setTimeout(()=>{w(t),e.nextTick(()=>{a.value=customElements.get("bs-pill")?"hydrated superhydrated":"superhydrated"})},100)),n.value=!0)},{immediate:!0}),e.onBeforeUnmount(()=>l.forEach(r=>clearTimeout(r))),(r,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.value?(e.openBlock(),e.createBlock(e.unref(B.ClientOnly),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:t.value},[e.renderSlot(r.$slots,"default")],8,["to"]))]),_:3})):e.createCommentVNode("",!0),e.createElementVNode("bs-pill",e.mergeProps({ref_key:"wcRef",ref:d,class:a.value,"data-bsds-ssr":"",variant:s.variant,status:s.status,href:s.href,active:s.active,disabled:s.disabled,"pass-attrs":s.passAttrs},r.$attrs),[e.createVNode(e.unref(B.ClientOnly),null,{fallback:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3})],16,Ee)],64))}},Re="bs-pill",Ie={__name:"BsPill",props:{variant:{},status:{},href:{},active:{},disabled:{},passAttrs:{default:""}},emits:[],setup(s,{emit:h}){const n=s,{data:t}=y.useAsyncData(Re,()=>{if(process.server)return!0});return(a,l)=>e.unref(t)?(e.openBlock(),e.createBlock(N,e.normalizeProps(e.mergeProps({key:0},{...n,...a.$attrs})),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("bs-pill",e.normalizeProps(e.mergeProps({key:1},{...n,...a.$attrs})),[e.renderSlot(a.$slots,"default")],16))}},Le=["disabled","required","error","hint-id","value","pass-attrs"],W={__name:"BsSelectServer",props:{disabled:{default:!1},required:{},error:{},hintId:{},value:{},passAttrs:{default:""}},emits:[],setup(s,{emit:h}){const n=e.ref(!1),t=e.ref(null),a=e.ref(""),l=e.reactive([]),d=e.ref(null),c=(r,f=0)=>{var i,p;t.value||f>=4||(t.value=(p=(i=r.value)==null?void 0:i.querySelector)==null?void 0:p.call(i,"[data-slot]"),t.value||l.push(setTimeout(()=>c(r,f+1),50)))};return e.onMounted(()=>c(d,0)),e.watch(t,r=>{!r||n.value||(S(t),l.push(setTimeout(()=>{w(t),e.nextTick(()=>{a.value=customElements.get("bs-select")?"hydrated superhydrated":"superhydrated"})},100)),n.value=!0)},{immediate:!0}),e.onBeforeUnmount(()=>l.forEach(r=>clearTimeout(r))),(r,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.value?(e.openBlock(),e.createBlock(e.unref(B.ClientOnly),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:t.value},[e.renderSlot(r.$slots,"default")],8,["to"]))]),_:3})):e.createCommentVNode("",!0),e.createElementVNode("bs-select",e.mergeProps({ref_key:"wcRef",ref:d,class:a.value,"data-bsds-ssr":"",disabled:s.disabled,required:s.required,error:s.error,"hint-id":s.hintId,value:s.value,"pass-attrs":s.passAttrs},r.$attrs),[e.createVNode(e.unref(B.ClientOnly),null,{fallback:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3})],16,Le)],64))}},Ve="bs-select",Oe={__name:"BsSelect",props:{disabled:{default:!1},required:{},error:{},hintId:{},value:{},passAttrs:{default:""}},emits:[],setup(s,{emit:h}){const n=s,{data:t}=y.useAsyncData(Ve,()=>{if(process.server)return!0});return(a,l)=>e.unref(t)?(e.openBlock(),e.createBlock(W,e.normalizeProps(e.mergeProps({key:0},{...n,...a.$attrs})),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("bs-select",e.normalizeProps(e.mergeProps({key:1},{...n,...a.$attrs})),[e.renderSlot(a.$slots,"default")],16))}};o.BsAccordion=ye,o.BsAccordionServer=L,o.BsBadge=X,o.BsBanner=Se,o.BsBannerServer=V,o.BsButton=Te,o.BsButtonServer=O,o.BsCharacterCount=Y,o.BsChartBar=_,o.BsChartTable=K,o.BsCheckbox=Z,o.BsDropdown=J,o.BsDropdownOption=Q,o.BsDropdownOptions=x,o.BsFieldLayout=v,o.BsHint=ee,o.BsInput=te,o.BsInputAddon=re,o.BsInputField=se,o.BsInputSearch=ae,o.BsLabel=Pe,o.BsLabelServer=q,o.BsPill=Ie,o.BsPillServer=N,o.BsProfile=oe,o.BsProfileDetails=le,o.BsProfileImg=ne,o.BsProfileLayout=ie,o.BsRadio=de,o.BsSelect=Oe,o.BsSelectField=ce,o.BsSelectServer=W,o.BsSwitch=fe,o.BsTextarea=ue,o.BsTextareaField=he,o.BsToast=pe,o.BsToaster=me,o.BsTooltip=Be,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wwtdev/bsds-components-vue3",
3
- "version": "1.4.0",
3
+ "version": "1.5.1",
4
4
  "description": "BSDS Vue3 Components",
5
5
  "homepage": "",
6
6
  "license": "UNLICENSED",
@@ -11,8 +11,15 @@
11
11
  "test": "__tests__"
12
12
  },
13
13
  "files": [
14
- "lib"
14
+ "lib",
15
+ "nuxt"
15
16
  ],
17
+ "exports": {
18
+ ".": "./lib/index.js",
19
+ "./nuxt": "./nuxt/bsds-components.mjs",
20
+ "./style.css": "./nuxt/style.css",
21
+ "./plugin-ssr.js": "./lib/plugin-ssr.js"
22
+ },
16
23
  "publishConfig": {
17
24
  "registry": "https://npm.wwt.com/"
18
25
  },
@@ -21,8 +28,10 @@
21
28
  "url": "https://github.wwt.com/custom-apps/wwt-blue-steel.git"
22
29
  },
23
30
  "scripts": {
24
- "build": "npm run tsc && npm run build:ssr",
31
+ "build": "npm run tsc && npm run build:ssr && npm run build:nuxt",
32
+ "build:nuxt": "vite build",
25
33
  "build:ssr": "node utils/copyFiles.js src/plugin-ssr.js lib/plugin-ssr.js",
34
+ "generate:nuxt": "node nuxt-generator/index.mjs src/nuxt-wrappers",
26
35
  "publish-wwt": "publish-wwt-package --monorepo",
27
36
  "publish-npm": "npm publish --@wwtdev:registry=https://registry.npmjs.org --access=public",
28
37
  "start": "npm-watch",
@@ -40,12 +49,16 @@
40
49
  }
41
50
  },
42
51
  "devDependencies": {
52
+ "@vitejs/plugin-vue": "^4.2.3",
43
53
  "fs-extra": "^10.1.0",
44
54
  "npm-watch": "^0.11.0",
55
+ "nunjucks": "^3.2.4",
56
+ "nuxt": "^3.6.0",
57
+ "vite": "^4.4.3",
45
58
  "vue": "^3.2.39",
46
59
  "wwt-package-publisher": "^4.1.2"
47
60
  },
48
61
  "dependencies": {
49
- "@wwtdev/bsds-components": "^1.4.0"
62
+ "@wwtdev/bsds-components": "^1.5.1"
50
63
  }
51
64
  }