ablok-components 0.0.18 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,22 @@
1
- import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, createElementVNode, renderSlot, computed, createBlock, createCommentVNode, unref, toDisplayString, withDirectives, isRef, vModelDynamic, createTextVNode, ref, watch, onBeforeMount, Fragment, renderList, getCurrentInstance, inject, markRaw, reactive, effectScope, isReactive, toRaw, onUnmounted, nextTick, toRefs, getCurrentScope, onScopeDispose, shallowRef, withModifiers } from "vue";
2
- var baseIcon_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".base-icon{display:inline-block}.base-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.base-icon--xxl svg{width:12rem;height:12rem}.base-icon--xl svg{width:8rem;height:8rem}.base-icon--large svg{width:4rem;height:4rem}\n")();
3
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
4
- __name: "base-icon",
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, computed, resolveComponent, createBlock, createCommentVNode, unref, toDisplayString, withDirectives, isRef, vModelDynamic, createTextVNode, ref, watch, onBeforeMount, Fragment, renderList } from "vue";
2
+ var svgIcon_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".svg-icon{display:inline-block}.svg-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.svg-icon--xxl svg{width:12rem;height:12rem}.svg-icon--xl svg{width:8rem;height:8rem}.svg-icon--large svg{width:4rem;height:4rem}\n")();
3
+ const _hoisted_1$5 = {
4
+ class: "icon",
5
+ preserveAspectRatio: "xMaxYMin"
6
+ };
7
+ const _hoisted_2$4 = ["xlink:href"];
8
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
9
+ __name: "svg-icon",
5
10
  props: {
6
- id: {
11
+ basePath: {
12
+ type: String,
13
+ default: "/static/symbol-defs.svg"
14
+ },
15
+ prefix: {
16
+ type: String,
17
+ default: "icon-"
18
+ },
19
+ symbol: {
7
20
  type: String,
8
21
  default: ""
9
22
  },
@@ -14,23 +27,26 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
14
27
  },
15
28
  setup(__props) {
16
29
  return (_ctx, _cache) => {
17
- const _component_SvgSprite = resolveComponent("SvgSprite");
18
- return openBlock(), createElementBlock("span", {
19
- class: normalizeClass(["base-icon", {
20
- [`base-icon--${__props.size}`]: __props.size
30
+ return openBlock(), createElementBlock("i", {
31
+ class: normalizeClass(["svg-icon", {
32
+ [`svg-icon--${__props.size}`]: __props.size
21
33
  }])
22
34
  }, [
23
- createVNode(_component_SvgSprite, {
24
- symbol: `icon-${__props.id}`,
25
- role: "presentation"
26
- }, null, 8, ["symbol"])
35
+ (openBlock(), createElementBlock("svg", _hoisted_1$5, [
36
+ createElementVNode("use", {
37
+ "xlink:href": `${__props.basePath}#${__props.prefix}${__props.symbol}`,
38
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
39
+ x: "0",
40
+ y: "0"
41
+ }, null, 8, _hoisted_2$4)
42
+ ]))
27
43
  ], 2);
28
44
  };
29
45
  }
30
46
  });
31
47
  var loadingSpinner_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".loading-spinner{min-width:2rem}\n")();
32
- const _hoisted_1$5 = { class: "loading-spinner d-block" };
33
- const _hoisted_2$4 = { class: "loading-spinner__animation" };
48
+ const _hoisted_1$4 = { class: "loading-spinner d-block" };
49
+ const _hoisted_2$3 = { class: "loading-spinner__animation" };
34
50
  const _hoisted_3$1 = {
35
51
  class: "d-block",
36
52
  version: "1.1",
@@ -43,7 +59,7 @@ const _hoisted_3$1 = {
43
59
  "enable-background": "new 0 0 0 0",
44
60
  "xml:space": "preserve"
45
61
  };
46
- const _hoisted_4 = ["fill"];
62
+ const _hoisted_4$1 = ["fill"];
47
63
  const _hoisted_5 = /* @__PURE__ */ createElementVNode("animateTransform", {
48
64
  attributeName: "transform",
49
65
  attributeType: "XML",
@@ -56,7 +72,7 @@ const _hoisted_5 = /* @__PURE__ */ createElementVNode("animateTransform", {
56
72
  const _hoisted_6 = [
57
73
  _hoisted_5
58
74
  ];
59
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
75
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
60
76
  __name: "loading-spinner",
61
77
  props: {
62
78
  color: {
@@ -66,13 +82,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
66
82
  },
67
83
  setup(__props) {
68
84
  return (_ctx, _cache) => {
69
- return openBlock(), createElementBlock("span", _hoisted_1$5, [
70
- createElementVNode("span", _hoisted_2$4, [
85
+ return openBlock(), createElementBlock("span", _hoisted_1$4, [
86
+ createElementVNode("span", _hoisted_2$3, [
71
87
  (openBlock(), createElementBlock("svg", _hoisted_3$1, [
72
88
  createElementVNode("path", {
73
89
  fill: __props.color,
74
90
  d: "M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
75
- }, _hoisted_6, 8, _hoisted_4)
91
+ }, _hoisted_6, 8, _hoisted_4$1)
76
92
  ]))
77
93
  ]),
78
94
  renderSlot(_ctx.$slots, "default")
@@ -81,8 +97,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
81
97
  }
82
98
  });
83
99
  var baseButton_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}\n")();
84
- const _hoisted_1$4 = ["type", "disabled", "href", "to"];
85
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
100
+ const _hoisted_1$3 = ["type", "disabled", "href", "to"];
101
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
86
102
  __name: "base-button",
87
103
  props: {
88
104
  type: null,
@@ -104,13 +120,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
104
120
  return props.caption && !props.fab;
105
121
  });
106
122
  return (_ctx, _cache) => {
107
- const _component_base_icon = resolveComponent("base-icon");
123
+ const _component_svg_icon = resolveComponent("svg-icon");
108
124
  return openBlock(), createElementBlock("button", {
109
125
  type: __props.type,
110
126
  disabled: __props.disabled,
111
127
  href: __props.href,
112
128
  to: __props.to,
113
- class: normalizeClass(["base-button", {
129
+ class: normalizeClass(["base-button btn btn-primary", {
114
130
  disabled: __props.disabled,
115
131
  pending: __props.pending,
116
132
  rounded: __props.rounded,
@@ -123,7 +139,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
123
139
  }])
124
140
  }, [
125
141
  renderSlot(_ctx.$slots, "default", {}, () => [
126
- __props.icon ? (openBlock(), createBlock(_component_base_icon, {
142
+ __props.icon ? (openBlock(), createBlock(_component_svg_icon, {
127
143
  key: 0,
128
144
  id: __props.icon,
129
145
  class: "base-button__caption"
@@ -133,17 +149,18 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
133
149
  class: normalizeClass(["base-button__caption", { "icon-padding": __props.icon }])
134
150
  }, toDisplayString(__props.caption), 3)) : createCommentVNode("", true)
135
151
  ])
136
- ], 10, _hoisted_1$4);
152
+ ], 10, _hoisted_1$3);
137
153
  };
138
154
  }
139
155
  });
140
156
  function uniqueId() {
141
157
  return (new Date().valueOf() + Math.random()).toString(36);
142
158
  }
143
- const _hoisted_1$3 = { class: "base-input" };
144
- const _hoisted_2$3 = ["type", "name", "id", "label", "placeholder", "pattern", "disabled", "read-only", "required", "maxlength", "checked"];
145
- const _hoisted_3 = ["for"];
146
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
159
+ const _hoisted_1$2 = { class: "base-input" };
160
+ const _hoisted_2$2 = { class: "input-group" };
161
+ const _hoisted_3 = ["type", "name", "id", "label", "placeholder", "pattern", "disabled", "read-only", "required", "maxlength", "checked", "aria-label"];
162
+ const _hoisted_4 = ["for"];
163
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
147
164
  __name: "base-input",
148
165
  props: {
149
166
  modelValue: {
@@ -210,35 +227,41 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
210
227
  }
211
228
  });
212
229
  return (_ctx, _cache) => {
213
- return openBlock(), createElementBlock("div", _hoisted_1$3, [
214
- withDirectives(createElementVNode("input", {
215
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
216
- type: __props.type,
217
- name: __props.name,
218
- id: __props.id,
219
- label: `${__props.label}${__props.required ? " *" : ""}`,
220
- placeholder: __props.placeholder,
221
- pattern: __props.pattern,
222
- disabled: __props.disabled,
223
- "read-only": __props.readOnly,
224
- required: __props.required,
225
- maxlength: __props.maxlength,
226
- checked: __props.checked
227
- }, null, 8, _hoisted_2$3), [
228
- [vModelDynamic, unref(model)]
230
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [
231
+ createElementVNode("div", _hoisted_2$2, [
232
+ renderSlot(_ctx.$slots, "input-prepend"),
233
+ withDirectives(createElementVNode("input", {
234
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
235
+ type: __props.type,
236
+ name: __props.name,
237
+ id: __props.id,
238
+ label: `${__props.label}${__props.required ? " *" : ""}`,
239
+ placeholder: __props.placeholder,
240
+ pattern: __props.pattern,
241
+ disabled: __props.disabled,
242
+ "read-only": __props.readOnly,
243
+ required: __props.required,
244
+ maxlength: __props.maxlength,
245
+ checked: __props.checked,
246
+ class: "form-control",
247
+ "aria-label": __props.label
248
+ }, null, 8, _hoisted_3), [
249
+ [vModelDynamic, unref(model)]
250
+ ]),
251
+ renderSlot(_ctx.$slots, "input-append")
229
252
  ]),
230
253
  createElementVNode("label", { for: __props.id }, [
231
254
  renderSlot(_ctx.$slots, "label", {}, () => [
232
255
  createTextVNode(toDisplayString(__props.label), 1)
233
256
  ])
234
- ], 8, _hoisted_3)
257
+ ], 8, _hoisted_4)
235
258
  ]);
236
259
  };
237
260
  }
238
261
  });
239
- const _hoisted_1$2 = { class: "radio-group" };
240
- const _hoisted_2$2 = ["for"];
241
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
262
+ const _hoisted_1$1 = { class: "radio-group" };
263
+ const _hoisted_2$1 = ["for"];
264
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
242
265
  __name: "check-group",
243
266
  props: {
244
267
  modelValue: {
@@ -295,7 +318,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
295
318
  });
296
319
  return (_ctx, _cache) => {
297
320
  const _component_base_input = resolveComponent("base-input");
298
- return openBlock(), createElementBlock("div", _hoisted_1$2, [
321
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
299
322
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
300
323
  return openBlock(), createBlock(_component_base_input, {
301
324
  key: index,
@@ -314,14 +337,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
314
337
  renderSlot(_ctx.$slots, "label", {}, () => [
315
338
  createTextVNode(toDisplayString(__props.label), 1)
316
339
  ])
317
- ], 8, _hoisted_2$2)
340
+ ], 8, _hoisted_2$1)
318
341
  ]);
319
342
  };
320
343
  }
321
344
  });
322
- const _hoisted_1$1 = { class: "radio-group" };
323
- const _hoisted_2$1 = ["for"];
324
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
345
+ const _hoisted_1 = { class: "radio-group" };
346
+ const _hoisted_2 = ["for"];
347
+ const _sfc_main = /* @__PURE__ */ defineComponent({
325
348
  __name: "radio-group",
326
349
  props: {
327
350
  modelValue: {
@@ -371,7 +394,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
371
394
  });
372
395
  return (_ctx, _cache) => {
373
396
  const _component_base_input = resolveComponent("base-input");
374
- return openBlock(), createElementBlock("div", _hoisted_1$1, [
397
+ return openBlock(), createElementBlock("div", _hoisted_1, [
375
398
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
376
399
  return openBlock(), createBlock(_component_base_input, {
377
400
  key: index,
@@ -391,636 +414,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
391
414
  renderSlot(_ctx.$slots, "label", {}, () => [
392
415
  createTextVNode(toDisplayString(__props.label), 1)
393
416
  ])
394
- ], 8, _hoisted_2$1)
395
- ]);
396
- };
397
- }
398
- });
399
- /*!
400
- * pinia v2.0.14
401
- * (c) 2022 Eduardo San Martin Morote
402
- * @license MIT
403
- */
404
- let activePinia;
405
- const setActivePinia = (pinia) => activePinia = pinia;
406
- const piniaSymbol = Symbol();
407
- function isPlainObject(o) {
408
- return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function";
409
- }
410
- var MutationType;
411
- (function(MutationType2) {
412
- MutationType2["direct"] = "direct";
413
- MutationType2["patchObject"] = "patch object";
414
- MutationType2["patchFunction"] = "patch function";
415
- })(MutationType || (MutationType = {}));
416
- const noop$1 = () => {
417
- };
418
- function addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {
419
- subscriptions.push(callback);
420
- const removeSubscription = () => {
421
- const idx = subscriptions.indexOf(callback);
422
- if (idx > -1) {
423
- subscriptions.splice(idx, 1);
424
- onCleanup();
425
- }
426
- };
427
- if (!detached && getCurrentInstance()) {
428
- onUnmounted(removeSubscription);
429
- }
430
- return removeSubscription;
431
- }
432
- function triggerSubscriptions(subscriptions, ...args) {
433
- subscriptions.slice().forEach((callback) => {
434
- callback(...args);
435
- });
436
- }
437
- function mergeReactiveObjects(target, patchToApply) {
438
- for (const key in patchToApply) {
439
- if (!patchToApply.hasOwnProperty(key))
440
- continue;
441
- const subPatch = patchToApply[key];
442
- const targetValue = target[key];
443
- if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {
444
- target[key] = mergeReactiveObjects(targetValue, subPatch);
445
- } else {
446
- target[key] = subPatch;
447
- }
448
- }
449
- return target;
450
- }
451
- const skipHydrateSymbol = Symbol();
452
- function shouldHydrate(obj) {
453
- return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
454
- }
455
- const { assign } = Object;
456
- function isComputed(o) {
457
- return !!(isRef(o) && o.effect);
458
- }
459
- function createOptionsStore(id, options, pinia, hot) {
460
- const { state, actions, getters } = options;
461
- const initialState = pinia.state.value[id];
462
- let store;
463
- function setup() {
464
- if (!initialState && true) {
465
- {
466
- pinia.state.value[id] = state ? state() : {};
467
- }
468
- }
469
- const localState = toRefs(pinia.state.value[id]);
470
- return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
471
- computedGetters[name] = markRaw(computed(() => {
472
- setActivePinia(pinia);
473
- const store2 = pinia._s.get(id);
474
- return getters[name].call(store2, store2);
475
- }));
476
- return computedGetters;
477
- }, {}));
478
- }
479
- store = createSetupStore(id, setup, options, pinia, hot, true);
480
- store.$reset = function $reset() {
481
- const newState = state ? state() : {};
482
- this.$patch(($state) => {
483
- assign($state, newState);
484
- });
485
- };
486
- return store;
487
- }
488
- function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {
489
- let scope;
490
- const optionsForPlugin = assign({ actions: {} }, options);
491
- const $subscribeOptions = {
492
- deep: true
493
- };
494
- let isListening;
495
- let isSyncListening;
496
- let subscriptions = markRaw([]);
497
- let actionSubscriptions = markRaw([]);
498
- let debuggerEvents;
499
- const initialState = pinia.state.value[$id];
500
- if (!isOptionsStore && !initialState && true) {
501
- {
502
- pinia.state.value[$id] = {};
503
- }
504
- }
505
- ref({});
506
- let activeListener;
507
- function $patch(partialStateOrMutator) {
508
- let subscriptionMutation;
509
- isListening = isSyncListening = false;
510
- if (typeof partialStateOrMutator === "function") {
511
- partialStateOrMutator(pinia.state.value[$id]);
512
- subscriptionMutation = {
513
- type: MutationType.patchFunction,
514
- storeId: $id,
515
- events: debuggerEvents
516
- };
517
- } else {
518
- mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);
519
- subscriptionMutation = {
520
- type: MutationType.patchObject,
521
- payload: partialStateOrMutator,
522
- storeId: $id,
523
- events: debuggerEvents
524
- };
525
- }
526
- const myListenerId = activeListener = Symbol();
527
- nextTick().then(() => {
528
- if (activeListener === myListenerId) {
529
- isListening = true;
530
- }
531
- });
532
- isSyncListening = true;
533
- triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);
534
- }
535
- const $reset = noop$1;
536
- function $dispose() {
537
- scope.stop();
538
- subscriptions = [];
539
- actionSubscriptions = [];
540
- pinia._s.delete($id);
541
- }
542
- function wrapAction(name, action) {
543
- return function() {
544
- setActivePinia(pinia);
545
- const args = Array.from(arguments);
546
- const afterCallbackList = [];
547
- const onErrorCallbackList = [];
548
- function after(callback) {
549
- afterCallbackList.push(callback);
550
- }
551
- function onError(callback) {
552
- onErrorCallbackList.push(callback);
553
- }
554
- triggerSubscriptions(actionSubscriptions, {
555
- args,
556
- name,
557
- store,
558
- after,
559
- onError
560
- });
561
- let ret;
562
- try {
563
- ret = action.apply(this && this.$id === $id ? this : store, args);
564
- } catch (error) {
565
- triggerSubscriptions(onErrorCallbackList, error);
566
- throw error;
567
- }
568
- if (ret instanceof Promise) {
569
- return ret.then((value) => {
570
- triggerSubscriptions(afterCallbackList, value);
571
- return value;
572
- }).catch((error) => {
573
- triggerSubscriptions(onErrorCallbackList, error);
574
- return Promise.reject(error);
575
- });
576
- }
577
- triggerSubscriptions(afterCallbackList, ret);
578
- return ret;
579
- };
580
- }
581
- const partialStore = {
582
- _p: pinia,
583
- $id,
584
- $onAction: addSubscription.bind(null, actionSubscriptions),
585
- $patch,
586
- $reset,
587
- $subscribe(callback, options2 = {}) {
588
- const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());
589
- const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {
590
- if (options2.flush === "sync" ? isSyncListening : isListening) {
591
- callback({
592
- storeId: $id,
593
- type: MutationType.direct,
594
- events: debuggerEvents
595
- }, state);
596
- }
597
- }, assign({}, $subscribeOptions, options2)));
598
- return removeSubscription;
599
- },
600
- $dispose
601
- };
602
- const store = reactive(assign({}, partialStore));
603
- pinia._s.set($id, store);
604
- const setupStore = pinia._e.run(() => {
605
- scope = effectScope();
606
- return scope.run(() => setup());
607
- });
608
- for (const key in setupStore) {
609
- const prop = setupStore[key];
610
- if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {
611
- if (!isOptionsStore) {
612
- if (initialState && shouldHydrate(prop)) {
613
- if (isRef(prop)) {
614
- prop.value = initialState[key];
615
- } else {
616
- mergeReactiveObjects(prop, initialState[key]);
617
- }
618
- }
619
- {
620
- pinia.state.value[$id][key] = prop;
621
- }
622
- }
623
- } else if (typeof prop === "function") {
624
- const actionValue = wrapAction(key, prop);
625
- {
626
- setupStore[key] = actionValue;
627
- }
628
- optionsForPlugin.actions[key] = prop;
629
- } else
630
- ;
631
- }
632
- {
633
- assign(store, setupStore);
634
- assign(toRaw(store), setupStore);
635
- }
636
- Object.defineProperty(store, "$state", {
637
- get: () => pinia.state.value[$id],
638
- set: (state) => {
639
- $patch(($state) => {
640
- assign($state, state);
641
- });
642
- }
643
- });
644
- pinia._p.forEach((extender) => {
645
- {
646
- assign(store, scope.run(() => extender({
647
- store,
648
- app: pinia._a,
649
- pinia,
650
- options: optionsForPlugin
651
- })));
652
- }
653
- });
654
- if (initialState && isOptionsStore && options.hydrate) {
655
- options.hydrate(store.$state, initialState);
656
- }
657
- isListening = true;
658
- isSyncListening = true;
659
- return store;
660
- }
661
- function defineStore(idOrOptions, setup, setupOptions) {
662
- let id;
663
- let options;
664
- const isSetupStore = typeof setup === "function";
665
- if (typeof idOrOptions === "string") {
666
- id = idOrOptions;
667
- options = isSetupStore ? setupOptions : setup;
668
- } else {
669
- options = idOrOptions;
670
- id = idOrOptions.id;
671
- }
672
- function useStore(pinia, hot) {
673
- const currentInstance = getCurrentInstance();
674
- pinia = pinia || currentInstance && inject(piniaSymbol);
675
- if (pinia)
676
- setActivePinia(pinia);
677
- pinia = activePinia;
678
- if (!pinia._s.has(id)) {
679
- if (isSetupStore) {
680
- createSetupStore(id, setup, options, pinia);
681
- } else {
682
- createOptionsStore(id, options, pinia);
683
- }
684
- }
685
- const store = pinia._s.get(id);
686
- return store;
687
- }
688
- useStore.$id = id;
689
- return useStore;
690
- }
691
- function tryOnScopeDispose(fn) {
692
- if (getCurrentScope()) {
693
- onScopeDispose(fn);
694
- return true;
695
- }
696
- return false;
697
- }
698
- var _a;
699
- const isClient = typeof window !== "undefined";
700
- const isString = (val) => typeof val === "string";
701
- const noop = () => {
702
- };
703
- isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
704
- function createFilterWrapper(filter, fn) {
705
- function wrapper(...args) {
706
- filter(() => fn.apply(this, args), { fn, thisArg: this, args });
707
- }
708
- return wrapper;
709
- }
710
- const bypassFilter = (invoke) => {
711
- return invoke();
712
- };
713
- function pausableFilter(extendFilter = bypassFilter) {
714
- const isActive = ref(true);
715
- function pause() {
716
- isActive.value = false;
717
- }
718
- function resume() {
719
- isActive.value = true;
720
- }
721
- const eventFilter = (...args) => {
722
- if (isActive.value)
723
- extendFilter(...args);
724
- };
725
- return { isActive, pause, resume, eventFilter };
726
- }
727
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
728
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
729
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
730
- var __objRest$5 = (source, exclude) => {
731
- var target = {};
732
- for (var prop in source)
733
- if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
734
- target[prop] = source[prop];
735
- if (source != null && __getOwnPropSymbols$5)
736
- for (var prop of __getOwnPropSymbols$5(source)) {
737
- if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
738
- target[prop] = source[prop];
739
- }
740
- return target;
741
- };
742
- function watchWithFilter(source, cb, options = {}) {
743
- const _a2 = options, {
744
- eventFilter = bypassFilter
745
- } = _a2, watchOptions = __objRest$5(_a2, [
746
- "eventFilter"
747
- ]);
748
- return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
749
- }
750
- var __defProp$1 = Object.defineProperty;
751
- var __defProps$1 = Object.defineProperties;
752
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
753
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
754
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
755
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
756
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
757
- var __spreadValues$1 = (a, b) => {
758
- for (var prop in b || (b = {}))
759
- if (__hasOwnProp$1.call(b, prop))
760
- __defNormalProp$1(a, prop, b[prop]);
761
- if (__getOwnPropSymbols$1)
762
- for (var prop of __getOwnPropSymbols$1(b)) {
763
- if (__propIsEnum$1.call(b, prop))
764
- __defNormalProp$1(a, prop, b[prop]);
765
- }
766
- return a;
767
- };
768
- var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
769
- var __objRest$1 = (source, exclude) => {
770
- var target = {};
771
- for (var prop in source)
772
- if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
773
- target[prop] = source[prop];
774
- if (source != null && __getOwnPropSymbols$1)
775
- for (var prop of __getOwnPropSymbols$1(source)) {
776
- if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
777
- target[prop] = source[prop];
778
- }
779
- return target;
780
- };
781
- function watchPausable(source, cb, options = {}) {
782
- const _a2 = options, {
783
- eventFilter: filter
784
- } = _a2, watchOptions = __objRest$1(_a2, [
785
- "eventFilter"
786
- ]);
787
- const { eventFilter, pause, resume, isActive } = pausableFilter(filter);
788
- const stop = watchWithFilter(source, cb, __spreadProps$1(__spreadValues$1({}, watchOptions), {
789
- eventFilter
790
- }));
791
- return { stop, pause, resume, isActive };
792
- }
793
- function unrefElement(elRef) {
794
- var _a2;
795
- const plain = unref(elRef);
796
- return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
797
- }
798
- const defaultWindow = isClient ? window : void 0;
799
- isClient ? window.document : void 0;
800
- isClient ? window.navigator : void 0;
801
- isClient ? window.location : void 0;
802
- function useEventListener(...args) {
803
- let target;
804
- let event;
805
- let listener;
806
- let options;
807
- if (isString(args[0])) {
808
- [event, listener, options] = args;
809
- target = defaultWindow;
810
- } else {
811
- [target, event, listener, options] = args;
812
- }
813
- if (!target)
814
- return noop;
815
- let cleanup = noop;
816
- const stopWatch = watch(() => unrefElement(target), (el) => {
817
- cleanup();
818
- if (!el)
819
- return;
820
- el.addEventListener(event, listener, options);
821
- cleanup = () => {
822
- el.removeEventListener(event, listener, options);
823
- cleanup = noop;
824
- };
825
- }, { immediate: true, flush: "post" });
826
- const stop = () => {
827
- stopWatch();
828
- cleanup();
829
- };
830
- tryOnScopeDispose(stop);
831
- return stop;
832
- }
833
- const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
834
- const globalKey = "__vueuse_ssr_handlers__";
835
- _global[globalKey] = _global[globalKey] || {};
836
- const handlers = _global[globalKey];
837
- function getSSRHandler(key, fallback) {
838
- return handlers[key] || fallback;
839
- }
840
- function guessSerializerType(rawInit) {
841
- return rawInit == null ? "any" : rawInit instanceof Set ? "set" : rawInit instanceof Map ? "map" : rawInit instanceof Date ? "date" : typeof rawInit === "boolean" ? "boolean" : typeof rawInit === "string" ? "string" : typeof rawInit === "object" ? "object" : Array.isArray(rawInit) ? "object" : !Number.isNaN(rawInit) ? "number" : "any";
842
- }
843
- const StorageSerializers = {
844
- boolean: {
845
- read: (v) => v === "true",
846
- write: (v) => String(v)
847
- },
848
- object: {
849
- read: (v) => JSON.parse(v),
850
- write: (v) => JSON.stringify(v)
851
- },
852
- number: {
853
- read: (v) => Number.parseFloat(v),
854
- write: (v) => String(v)
855
- },
856
- any: {
857
- read: (v) => v,
858
- write: (v) => String(v)
859
- },
860
- string: {
861
- read: (v) => v,
862
- write: (v) => String(v)
863
- },
864
- map: {
865
- read: (v) => new Map(JSON.parse(v)),
866
- write: (v) => JSON.stringify(Array.from(v.entries()))
867
- },
868
- set: {
869
- read: (v) => new Set(JSON.parse(v)),
870
- write: (v) => JSON.stringify(Array.from(v))
871
- },
872
- date: {
873
- read: (v) => new Date(v),
874
- write: (v) => v.toISOString()
875
- }
876
- };
877
- function useStorage(key, initialValue, storage, options = {}) {
878
- var _a2;
879
- const {
880
- flush = "pre",
881
- deep = true,
882
- listenToStorageChanges = true,
883
- writeDefaults = true,
884
- shallow,
885
- window: window2 = defaultWindow,
886
- eventFilter,
887
- onError = (e) => {
888
- console.error(e);
889
- }
890
- } = options;
891
- const data = (shallow ? shallowRef : ref)(initialValue);
892
- if (!storage) {
893
- try {
894
- storage = getSSRHandler("getDefaultStorage", () => {
895
- var _a22;
896
- return (_a22 = defaultWindow) == null ? void 0 : _a22.localStorage;
897
- })();
898
- } catch (e) {
899
- onError(e);
900
- }
901
- }
902
- if (!storage)
903
- return data;
904
- const rawInit = unref(initialValue);
905
- const type = guessSerializerType(rawInit);
906
- const serializer = (_a2 = options.serializer) != null ? _a2 : StorageSerializers[type];
907
- const { pause: pauseWatch, resume: resumeWatch } = watchPausable(data, () => write(data.value), { flush, deep, eventFilter });
908
- if (window2 && listenToStorageChanges)
909
- useEventListener(window2, "storage", update);
910
- update();
911
- return data;
912
- function write(v) {
913
- try {
914
- if (v == null)
915
- storage.removeItem(key);
916
- else
917
- storage.setItem(key, serializer.write(v));
918
- } catch (e) {
919
- onError(e);
920
- }
921
- }
922
- function read(event) {
923
- if (event && event.key !== key)
924
- return;
925
- pauseWatch();
926
- try {
927
- const rawValue = event ? event.newValue : storage.getItem(key);
928
- if (rawValue == null) {
929
- if (writeDefaults && rawInit !== null)
930
- storage.setItem(key, serializer.write(rawInit));
931
- return rawInit;
932
- } else if (typeof rawValue !== "string") {
933
- return rawValue;
934
- } else {
935
- return serializer.read(rawValue);
936
- }
937
- } catch (e) {
938
- onError(e);
939
- } finally {
940
- resumeWatch();
941
- }
942
- }
943
- function update(event) {
944
- if (event && event.key !== key)
945
- return;
946
- data.value = read(event);
947
- }
948
- }
949
- var SwipeDirection;
950
- (function(SwipeDirection2) {
951
- SwipeDirection2["UP"] = "UP";
952
- SwipeDirection2["RIGHT"] = "RIGHT";
953
- SwipeDirection2["DOWN"] = "DOWN";
954
- SwipeDirection2["LEFT"] = "LEFT";
955
- SwipeDirection2["NONE"] = "NONE";
956
- })(SwipeDirection || (SwipeDirection = {}));
957
- const useAuthUserStore = defineStore("auth/user", {
958
- state: () => ({
959
- firstName: useStorage("firstName", ""),
960
- lastName: "",
961
- userId: null
962
- }),
963
- getters: {
964
- fullName: (state) => `${state.firstName} ${state.lastName}`,
965
- loggedIn: (state) => state.userId !== null,
966
- fullUserDetails(state) {
967
- return {
968
- ...state,
969
- fullName: this.fullName
970
- };
971
- }
972
- },
973
- actions: {
974
- updateUser(payload) {
975
- this.firstName = payload.firstName;
976
- this.lastName = payload.lastName;
977
- this.userId = payload.userId;
978
- },
979
- clearUser() {
980
- this.$reset();
981
- }
982
- }
983
- });
984
- var baseForm_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}\n")();
985
- const _hoisted_1 = { class: "base-form" };
986
- const _hoisted_2 = ["onSubmit"];
987
- const _sfc_main = /* @__PURE__ */ defineComponent({
988
- __name: "base-form",
989
- props: {
990
- id: null,
991
- name: null,
992
- variant: null,
993
- disabled: { type: Boolean },
994
- pending: { type: Boolean }
995
- },
996
- setup(__props) {
997
- const authUserStore = useAuthUserStore();
998
- computed(() => authUserStore.firstName);
999
- computed(() => authUserStore.fullName);
1000
- function input(event) {
1001
- authUserStore.updateUser({
1002
- firstName: event.target.value
1003
- });
1004
- console.log("input", event);
1005
- }
1006
- function reset(event) {
1007
- console.log("reset", event);
1008
- }
1009
- function submit(event) {
1010
- console.log("submit", event);
1011
- }
1012
- return (_ctx, _cache) => {
1013
- return openBlock(), createElementBlock("div", _hoisted_1, [
1014
- createElementVNode("form", {
1015
- ref: "form",
1016
- onInput: input,
1017
- onReset: reset,
1018
- onSubmit: withModifiers(submit, ["prevent"])
1019
- }, [
1020
- renderSlot(_ctx.$slots, "default")
1021
- ], 40, _hoisted_2)
417
+ ], 8, _hoisted_2)
1022
418
  ]);
1023
419
  };
1024
420
  }
1025
421
  });
1026
- export { _sfc_main$4 as BaseButton, _sfc_main as BaseForm, _sfc_main$6 as BaseIcon, _sfc_main$3 as BaseInput, _sfc_main$2 as CheckGroup, _sfc_main$5 as LoadingSpinner, _sfc_main$1 as RadioGroup };
422
+ export { _sfc_main$3 as BaseButton, _sfc_main$2 as BaseInput, _sfc_main$1 as CheckGroup, _sfc_main$4 as LoadingSpinner, _sfc_main as RadioGroup, _sfc_main$5 as SvgIcon };
@@ -1,9 +1,4 @@
1
- (function(b,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(b=typeof globalThis!="undefined"?globalThis:b||self,t(b.AblokComponents={},b.Vue))})(this,function(b,t){"use strict";var tt=(()=>`.base-icon{display:inline-block}.base-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.base-icon--xxl svg{width:12rem;height:12rem}.base-icon--xl svg{width:8rem;height:8rem}.base-icon--large svg{width:4rem;height:4rem}
2
- `)();const ne=t.defineComponent({__name:"base-icon",props:{id:{type:String,default:""},size:{type:String,default:"default"}},setup(e){return(a,o)=>{const n=t.resolveComponent("SvgSprite");return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["base-icon",{[`base-icon--${e.size}`]:e.size}])},[t.createVNode(n,{symbol:`icon-${e.id}`,role:"presentation"},null,8,["symbol"])],2)}}});var nt=(()=>`.loading-spinner{min-width:2rem}
3
- `)();const oe={class:"loading-spinner d-block"},ae={class:"loading-spinner__animation"},re={class:"d-block",version:"1.1",id:"L9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0","xml:space":"preserve"},le=["fill"],ie=[t.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"},null,-1)],se=t.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(e){return(a,o)=>(t.openBlock(),t.createElementBlock("span",oe,[t.createElementVNode("span",ae,[(t.openBlock(),t.createElementBlock("svg",re,[t.createElementVNode("path",{fill:e.color,d:"M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"},ie,8,le)]))]),t.renderSlot(a.$slots,"default")]))}});var at=(()=>`.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}
4
- `)();const ce=["type","disabled","href","to"],de=t.defineComponent({__name:"base-button",props:{type:null,caption:null,variant:null,size:null,icon:null,href:null,to:null,disabled:{type:Boolean},pending:{type:Boolean},outlined:{type:Boolean},rounded:{type:Boolean},fab:{type:Boolean}},setup(e){const a=e,o=t.computed(()=>a.caption&&!a.fab);return(n,r)=>{const l=t.resolveComponent("base-icon");return t.openBlock(),t.createElementBlock("button",{type:e.type,disabled:e.disabled,href:e.href,to:e.to,class:t.normalizeClass(["base-button",{disabled:e.disabled,pending:e.pending,rounded:e.rounded,outlined:e.outlined,fab:e.fab,"x-large":e.size==="x-large",large:e.size==="large",small:e.size==="small","x-small":e.size==="x-small"}])},[t.renderSlot(n.$slots,"default",{},()=>[e.icon?(t.openBlock(),t.createBlock(l,{key:0,id:e.icon,class:"base-button__caption"},null,8,["id"])):t.createCommentVNode("",!0),t.unref(o)?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(["base-button__caption",{"icon-padding":e.icon}])},t.toDisplayString(e.caption),3)):t.createCommentVNode("",!0)])],10,ce)}}});function $(){return(new Date().valueOf()+Math.random()).toString(36)}const ue={class:"base-input"},fe=["type","name","id","label","placeholder","pattern","disabled","read-only","required","maxlength","checked"],me=["for"],pe=t.defineComponent({__name:"base-input",props:{modelValue:{type:[String,Number,Boolean],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>$()},id:{type:String,default:()=>$()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},checked:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:a}){const o=e,n=t.computed({get(){return o.modelValue},set(r){a("update:modelValue",r)}});return(r,l)=>(t.openBlock(),t.createElementBlock("div",ue,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=s=>t.isRef(n)?n.value=s:null),type:e.type,name:e.name,id:e.id,label:`${e.label}${e.required?" *":""}`,placeholder:e.placeholder,pattern:e.pattern,disabled:e.disabled,"read-only":e.readOnly,required:e.required,maxlength:e.maxlength,checked:e.checked},null,8,fe),[[t.vModelDynamic,t.unref(n)]]),t.createElementVNode("label",{for:e.id},[t.renderSlot(r.$slots,"label",{},()=>[t.createTextVNode(t.toDisplayString(e.label),1)])],8,me)]))}}),be={class:"radio-group"},ye=["for"],ge=t.defineComponent({__name:"check-group",props:{modelValue:{default:[]},options:{type:Array,default:[]},name:{type:String,default:()=>$()},id:{type:String,default:()=>$()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(e,{emit:a}){const o=e,n=t.ref([]);return t.watch(()=>o.modelValue,(r,l)=>{n.value=o.options.map(s=>s.value?o.modelValue.some(i=>i["value "]===s.value):o.modelValue.some(i=>i===s))},{immediate:!0}),t.watch(n,(r,l)=>{const s=r.reduce((i,d,m)=>{const p=d&&o.options[m]?[o.options[m]||o.options[m]]:[];return[...i,...p]},[]);a("update:modelValue",s)},{deep:!0}),t.onBeforeMount(()=>{}),(r,l)=>{const s=t.resolveComponent("base-input");return t.openBlock(),t.createElementBlock("div",be,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(i,d)=>(t.openBlock(),t.createBlock(s,{key:d,modelValue:t.unref(n)[d],"onUpdate:modelValue":m=>t.unref(n)[d]=m,type:"checkbox",name:e.name,id:`${e.id}-${d}`,label:`${i.text||i}${e.required?" *":""}`,disabled:e.disabled,"read-only":e.readOnly,required:e.required},null,8,["modelValue","onUpdate:modelValue","name","id","label","disabled","read-only","required"]))),128)),t.createElementVNode("label",{for:e.id},[t.renderSlot(r.$slots,"label",{},()=>[t.createTextVNode(t.toDisplayString(e.label),1)])],8,ye)])}}}),he={class:"radio-group"},we=["for"],Se=t.defineComponent({__name:"radio-group",props:{modelValue:{default:!1},options:{type:Array,default:[]},name:{type:String,default:()=>$()},id:{type:String,default:()=>$()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(e,{emit:a}){const o=e;t.ref(o.options.map(r=>r.value===o.modelValue));function n(r){a("update:modelValue",r)}return t.onBeforeMount(()=>{}),(r,l)=>{const s=t.resolveComponent("base-input");return t.openBlock(),t.createElementBlock("div",he,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(i,d)=>(t.openBlock(),t.createBlock(s,{key:d,type:"radio",name:e.name,id:`${e.id}-${d}`,value:i.value||i,label:`${i.text||i}${e.required?" *":""}`,checked:i.value?i.value===e.modelValue:i===e.modelValue,disabled:e.disabled,"read-only":e.readOnly,required:e.required,onChange:m=>n(i)},null,8,["name","id","value","label","checked","disabled","read-only","required","onChange"]))),128)),t.createElementVNode("label",{for:e.id},[t.renderSlot(r.$slots,"label",{},()=>[t.createTextVNode(t.toDisplayString(e.label),1)])],8,we)])}}});/*!
5
- * pinia v2.0.14
6
- * (c) 2022 Eduardo San Martin Morote
7
- * @license MIT
8
- */let W;const F=e=>W=e,_e=Symbol();function I(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var x;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(x||(x={}));const J=()=>{};function H(e,a,o,n=J){e.push(a);const r=()=>{const l=e.indexOf(a);l>-1&&(e.splice(l,1),n())};return!o&&t.getCurrentInstance()&&t.onUnmounted(r),r}function N(e,...a){e.slice().forEach(o=>{o(...a)})}function R(e,a){for(const o in a){if(!a.hasOwnProperty(o))continue;const n=a[o],r=e[o];I(r)&&I(n)&&e.hasOwnProperty(o)&&!t.isRef(n)&&!t.isReactive(n)?e[o]=R(r,n):e[o]=n}return e}const ke=Symbol();function Be(e){return!I(e)||!e.hasOwnProperty(ke)}const{assign:k}=Object;function $e(e){return!!(t.isRef(e)&&e.effect)}function Ne(e,a,o,n){const{state:r,actions:l,getters:s}=a,i=o.state.value[e];let d;function m(){i||(o.state.value[e]=r?r():{});const p=t.toRefs(o.state.value[e]);return k(p,l,Object.keys(s||{}).reduce((_,g)=>(_[g]=t.markRaw(t.computed(()=>{F(o);const h=o._s.get(e);return s[g].call(h,h)})),_),{}))}return d=G(e,m,a,o,n,!0),d.$reset=function(){const _=r?r():{};this.$patch(g=>{k(g,_)})},d}function G(e,a,o={},n,r,l){let s;const i=k({actions:{}},o),d={deep:!0};let m,p,_=t.markRaw([]),g=t.markRaw([]),h;const S=n.state.value[e];!l&&!S&&(n.state.value[e]={}),t.ref({});let v;function O(c){let f;m=p=!1,typeof c=="function"?(c(n.state.value[e]),f={type:x.patchFunction,storeId:e,events:h}):(R(n.state.value[e],c),f={type:x.patchObject,payload:c,storeId:e,events:h});const B=v=Symbol();t.nextTick().then(()=>{v===B&&(m=!0)}),p=!0,N(_,f,n.state.value[e])}const D=J;function T(){s.stop(),_=[],g=[],n._s.delete(e)}function U(c,f){return function(){F(n);const B=Array.from(arguments),E=[],C=[];function Ze(w){E.push(w)}function et(w){C.push(w)}N(g,{args:B,name:c,store:y,after:Ze,onError:et});let P;try{P=f.apply(this&&this.$id===e?this:y,B)}catch(w){throw N(C,w),w}return P instanceof Promise?P.then(w=>(N(E,w),w)).catch(w=>(N(C,w),Promise.reject(w))):(N(E,P),P)}}const M={_p:n,$id:e,$onAction:H.bind(null,g),$patch:O,$reset:D,$subscribe(c,f={}){const B=H(_,c,f.detached,()=>E()),E=s.run(()=>t.watch(()=>n.state.value[e],C=>{(f.flush==="sync"?p:m)&&c({storeId:e,type:x.direct,events:h},C)},k({},d,f)));return B},$dispose:T},y=t.reactive(k({},M));n._s.set(e,y);const u=n._e.run(()=>(s=t.effectScope(),s.run(()=>a())));for(const c in u){const f=u[c];if(t.isRef(f)&&!$e(f)||t.isReactive(f))l||(S&&Be(f)&&(t.isRef(f)?f.value=S[c]:R(f,S[c])),n.state.value[e][c]=f);else if(typeof f=="function"){const B=U(c,f);u[c]=B,i.actions[c]=f}}return k(y,u),k(t.toRaw(y),u),Object.defineProperty(y,"$state",{get:()=>n.state.value[e],set:c=>{O(f=>{k(f,c)})}}),n._p.forEach(c=>{k(y,s.run(()=>c({store:y,app:n._a,pinia:n,options:i})))}),S&&l&&o.hydrate&&o.hydrate(y.$state,S),m=!0,p=!0,y}function Oe(e,a,o){let n,r;const l=typeof a=="function";typeof e=="string"?(n=e,r=l?o:a):(r=e,n=e.id);function s(i,d){const m=t.getCurrentInstance();return i=i||m&&t.inject(_e),i&&F(i),i=W,i._s.has(n)||(l?G(n,a,r,i):Ne(n,r,i)),i._s.get(n)}return s.$id=n,s}function xe(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}var K;const V=typeof window!="undefined",Ve=e=>typeof e=="string",z=()=>{};V&&((K=window==null?void 0:window.navigator)==null?void 0:K.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Ee(e,a){function o(...n){e(()=>a.apply(this,n),{fn:a,thisArg:this,args:n})}return o}const X=e=>e();function Ce(e=X){const a=t.ref(!0);function o(){a.value=!1}function n(){a.value=!0}return{isActive:a,pause:o,resume:n,eventFilter:(...l)=>{a.value&&e(...l)}}}var Q=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,ve=(e,a)=>{var o={};for(var n in e)Pe.call(e,n)&&a.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&Q)for(var n of Q(e))a.indexOf(n)<0&&je.call(e,n)&&(o[n]=e[n]);return o};function Fe(e,a,o={}){const n=o,{eventFilter:r=X}=n,l=ve(n,["eventFilter"]);return t.watch(e,Ee(r,a),l)}var Ie=Object.defineProperty,Re=Object.defineProperties,ze=Object.getOwnPropertyDescriptors,j=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,ee=(e,a,o)=>a in e?Ie(e,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[a]=o,qe=(e,a)=>{for(var o in a||(a={}))Y.call(a,o)&&ee(e,o,a[o]);if(j)for(var o of j(a))Z.call(a,o)&&ee(e,o,a[o]);return e},Le=(e,a)=>Re(e,ze(a)),Ae=(e,a)=>{var o={};for(var n in e)Y.call(e,n)&&a.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&j)for(var n of j(e))a.indexOf(n)<0&&Z.call(e,n)&&(o[n]=e[n]);return o};function De(e,a,o={}){const n=o,{eventFilter:r}=n,l=Ae(n,["eventFilter"]),{eventFilter:s,pause:i,resume:d,isActive:m}=Ce(r);return{stop:Fe(e,a,Le(qe({},l),{eventFilter:s})),pause:i,resume:d,isActive:m}}function Te(e){var a;const o=t.unref(e);return(a=o==null?void 0:o.$el)!=null?a:o}const q=V?window:void 0;V&&window.document,V&&window.navigator,V&&window.location;function Ue(...e){let a,o,n,r;if(Ve(e[0])?([o,n,r]=e,a=q):[a,o,n,r]=e,!a)return z;let l=z;const s=t.watch(()=>Te(a),d=>{l(),d&&(d.addEventListener(o,n,r),l=()=>{d.removeEventListener(o,n,r),l=z})},{immediate:!0,flush:"post"}),i=()=>{s(),l()};return xe(i),i}const L=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},A="__vueuse_ssr_handlers__";L[A]=L[A]||{};const Me=L[A];function We(e,a){return Me[e]||a}function Je(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"||Array.isArray(e)?"object":Number.isNaN(e)?"any":"number"}const He={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}};function Ge(e,a,o,n={}){var r;const{flush:l="pre",deep:s=!0,listenToStorageChanges:i=!0,writeDefaults:d=!0,shallow:m,window:p=q,eventFilter:_,onError:g=u=>{console.error(u)}}=n,h=(m?t.shallowRef:t.ref)(a);if(!o)try{o=We("getDefaultStorage",()=>{var u;return(u=q)==null?void 0:u.localStorage})()}catch(u){g(u)}if(!o)return h;const S=t.unref(a),v=Je(S),O=(r=n.serializer)!=null?r:He[v],{pause:D,resume:T}=De(h,()=>U(h.value),{flush:l,deep:s,eventFilter:_});return p&&i&&Ue(p,"storage",y),y(),h;function U(u){try{u==null?o.removeItem(e):o.setItem(e,O.write(u))}catch(c){g(c)}}function M(u){if(!(u&&u.key!==e)){D();try{const c=u?u.newValue:o.getItem(e);return c==null?(d&&S!==null&&o.setItem(e,O.write(S)),S):typeof c!="string"?c:O.read(c)}catch(c){g(c)}finally{T()}}}function y(u){u&&u.key!==e||(h.value=M(u))}}var te;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(te||(te={}));const Ke=Oe("auth/user",{state:()=>({firstName:Ge("firstName",""),lastName:"",userId:null}),getters:{fullName:e=>`${e.firstName} ${e.lastName}`,loggedIn:e=>e.userId!==null,fullUserDetails(e){return{...e,fullName:this.fullName}}},actions:{updateUser(e){this.firstName=e.firstName,this.lastName=e.lastName,this.userId=e.userId},clearUser(){this.$reset()}}});var rt=(()=>`.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}
9
- `)();const Xe={class:"base-form"},Qe=["onSubmit"],Ye=t.defineComponent({__name:"base-form",props:{id:null,name:null,variant:null,disabled:{type:Boolean},pending:{type:Boolean}},setup(e){const a=Ke();t.computed(()=>a.firstName),t.computed(()=>a.fullName);function o(l){a.updateUser({firstName:l.target.value}),console.log("input",l)}function n(l){console.log("reset",l)}function r(l){console.log("submit",l)}return(l,s)=>(t.openBlock(),t.createElementBlock("div",Xe,[t.createElementVNode("form",{ref:"form",onInput:o,onReset:n,onSubmit:t.withModifiers(r,["prevent"])},[t.renderSlot(l.$slots,"default")],40,Qe)]))}});b.BaseButton=de,b.BaseForm=Ye,b.BaseIcon=ne,b.BaseInput=pe,b.CheckGroup=ge,b.LoadingSpinner=se,b.RadioGroup=Se,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(o,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(o=typeof globalThis!="undefined"?globalThis:o||self,e(o.AblokComponents={},o.Vue))})(this,function(o,e){"use strict";var A=(()=>`.svg-icon{display:inline-block}.svg-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.svg-icon--xxl svg{width:12rem;height:12rem}.svg-icon--xl svg{width:8rem;height:8rem}.svg-icon--large svg{width:4rem;height:4rem}
2
+ `)();const f={class:"icon",preserveAspectRatio:"xMaxYMin"},b=["xlink:href"],p=e.defineComponent({__name:"svg-icon",props:{basePath:{type:String,default:"/static/symbol-defs.svg"},prefix:{type:String,default:"icon-"},symbol:{type:String,default:""},size:{type:String,default:"default"}},setup(t){return(d,a)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["svg-icon",{[`svg-icon--${t.size}`]:t.size}])},[(e.openBlock(),e.createElementBlock("svg",f,[e.createElementVNode("use",{"xlink:href":`${t.basePath}#${t.prefix}${t.symbol}`,"xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0",y:"0"},null,8,b)]))],2))}});var I=(()=>`.loading-spinner{min-width:2rem}
3
+ `)();const g={class:"loading-spinner d-block"},y={class:"loading-spinner__animation"},h={class:"d-block",version:"1.1",id:"L9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0","xml:space":"preserve"},k=["fill"],B=[e.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"},null,-1)],x=e.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(t){return(d,a)=>(e.openBlock(),e.createElementBlock("span",g,[e.createElementVNode("span",y,[(e.openBlock(),e.createElementBlock("svg",h,[e.createElementVNode("path",{fill:t.color,d:"M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"},B,8,k)]))]),e.renderSlot(d.$slots,"default")]))}});var P=(()=>`.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}
4
+ `)();const S=["type","disabled","href","to"],$=e.defineComponent({__name:"base-button",props:{type:null,caption:null,variant:null,size:null,icon:null,href:null,to:null,disabled:{type:Boolean},pending:{type:Boolean},outlined:{type:Boolean},rounded:{type:Boolean},fab:{type:Boolean}},setup(t){const d=t,a=e.computed(()=>d.caption&&!d.fab);return(i,n)=>{const c=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("button",{type:t.type,disabled:t.disabled,href:t.href,to:t.to,class:e.normalizeClass(["base-button btn btn-primary",{disabled:t.disabled,pending:t.pending,rounded:t.rounded,outlined:t.outlined,fab:t.fab,"x-large":t.size==="x-large",large:t.size==="large",small:t.size==="small","x-small":t.size==="x-small"}])},[e.renderSlot(i.$slots,"default",{},()=>[t.icon?(e.openBlock(),e.createBlock(c,{key:0,id:t.icon,class:"base-button__caption"},null,8,["id"])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["base-button__caption",{"icon-padding":t.icon}])},e.toDisplayString(t.caption),3)):e.createCommentVNode("",!0)])],10,S)}}});function m(){return(new Date().valueOf()+Math.random()).toString(36)}const V={class:"base-input"},w={class:"input-group"},C=["type","name","id","label","placeholder","pattern","disabled","read-only","required","maxlength","checked","aria-label"],E=["for"],q=e.defineComponent({__name:"base-input",props:{modelValue:{type:[String,Number,Boolean],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>m()},id:{type:String,default:()=>m()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},checked:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:d}){const a=t,i=e.computed({get(){return a.modelValue},set(n){d("update:modelValue",n)}});return(n,c)=>(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("div",w,[e.renderSlot(n.$slots,"input-prepend"),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=r=>e.isRef(i)?i.value=r:null),type:t.type,name:t.name,id:t.id,label:`${t.label}${t.required?" *":""}`,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,"read-only":t.readOnly,required:t.required,maxlength:t.maxlength,checked:t.checked,class:"form-control","aria-label":t.label},null,8,C),[[e.vModelDynamic,e.unref(i)]]),e.renderSlot(n.$slots,"input-append")]),e.createElementVNode("label",{for:t.id},[e.renderSlot(n.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,E)]))}}),N={class:"radio-group"},z=["for"],M=e.defineComponent({__name:"check-group",props:{modelValue:{default:[]},options:{type:Array,default:[]},name:{type:String,default:()=>m()},id:{type:String,default:()=>m()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(t,{emit:d}){const a=t,i=e.ref([]);return e.watch(()=>a.modelValue,(n,c)=>{i.value=a.options.map(r=>r.value?a.modelValue.some(l=>l["value "]===r.value):a.modelValue.some(l=>l===r))},{immediate:!0}),e.watch(i,(n,c)=>{const r=n.reduce((l,s,u)=>{const L=s&&a.options[u]?[a.options[u]||a.options[u]]:[];return[...l,...L]},[]);d("update:modelValue",r)},{deep:!0}),e.onBeforeMount(()=>{}),(n,c)=>{const r=e.resolveComponent("base-input");return e.openBlock(),e.createElementBlock("div",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(l,s)=>(e.openBlock(),e.createBlock(r,{key:s,modelValue:e.unref(i)[s],"onUpdate:modelValue":u=>e.unref(i)[s]=u,type:"checkbox",name:t.name,id:`${t.id}-${s}`,label:`${l.text||l}${t.required?" *":""}`,disabled:t.disabled,"read-only":t.readOnly,required:t.required},null,8,["modelValue","onUpdate:modelValue","name","id","label","disabled","read-only","required"]))),128)),e.createElementVNode("label",{for:t.id},[e.renderSlot(n.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,z)])}}}),O={class:"radio-group"},T=["for"],D=e.defineComponent({__name:"radio-group",props:{modelValue:{default:!1},options:{type:Array,default:[]},name:{type:String,default:()=>m()},id:{type:String,default:()=>m()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(t,{emit:d}){const a=t;e.ref(a.options.map(n=>n.value===a.modelValue));function i(n){d("update:modelValue",n)}return e.onBeforeMount(()=>{}),(n,c)=>{const r=e.resolveComponent("base-input");return e.openBlock(),e.createElementBlock("div",O,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(l,s)=>(e.openBlock(),e.createBlock(r,{key:s,type:"radio",name:t.name,id:`${t.id}-${s}`,value:l.value||l,label:`${l.text||l}${t.required?" *":""}`,checked:l.value?l.value===t.modelValue:l===t.modelValue,disabled:t.disabled,"read-only":t.readOnly,required:t.required,onChange:u=>i(l)},null,8,["name","id","value","label","checked","disabled","read-only","required","onChange"]))),128)),e.createElementVNode("label",{for:t.id},[e.renderSlot(n.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,T)])}}});o.BaseButton=$,o.BaseInput=q,o.CheckGroup=M,o.LoadingSpinner=x,o.RadioGroup=D,o.SvgIcon=p,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -105,15 +105,15 @@ declare const _default: import("vue").DefineComponent<{
105
105
  }>> & {
106
106
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
107
107
  }, {
108
- id: string;
109
108
  checked: boolean;
110
109
  required: boolean;
111
110
  type: string;
112
111
  label: string;
113
112
  pattern: string;
113
+ id: string;
114
+ variant: string;
114
115
  modelValue: string | number | boolean;
115
116
  name: string;
116
- variant: string;
117
117
  disabled: boolean;
118
118
  placeholder: string;
119
119
  readOnly: boolean;
@@ -75,13 +75,13 @@ declare const _default: import("vue").DefineComponent<{
75
75
  onChange?: ((...args: any[]) => any) | undefined;
76
76
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
77
77
  }, {
78
- id: string;
79
78
  required: boolean;
80
79
  label: string;
80
+ id: string;
81
+ variant: string;
81
82
  modelValue: never[];
82
83
  name: string;
83
84
  options: any[];
84
- variant: string;
85
85
  disabled: boolean;
86
86
  readOnly: boolean;
87
87
  }>;
@@ -75,13 +75,13 @@ declare const _default: import("vue").DefineComponent<{
75
75
  onChange?: ((...args: any[]) => any) | undefined;
76
76
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
77
77
  }, {
78
- id: string;
79
78
  required: boolean;
80
79
  label: string;
80
+ id: string;
81
+ variant: string;
81
82
  modelValue: boolean;
82
83
  name: string;
83
84
  options: any[];
84
- variant: string;
85
85
  disabled: boolean;
86
86
  readOnly: boolean;
87
87
  }>;
@@ -1,5 +1,13 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
- id: {
2
+ basePath: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ prefix: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ symbol: {
3
11
  type: StringConstructor;
4
12
  default: string;
5
13
  };
@@ -8,7 +16,15 @@ declare const _default: import("vue").DefineComponent<{
8
16
  default: string;
9
17
  };
10
18
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
- id: {
19
+ basePath: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ prefix: {
24
+ type: StringConstructor;
25
+ default: string;
26
+ };
27
+ symbol: {
12
28
  type: StringConstructor;
13
29
  default: string;
14
30
  };
@@ -17,7 +33,9 @@ declare const _default: import("vue").DefineComponent<{
17
33
  default: string;
18
34
  };
19
35
  }>>, {
20
- id: string;
36
+ symbol: string;
21
37
  size: string;
38
+ prefix: string;
39
+ basePath: string;
22
40
  }>;
23
41
  export default _default;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- export { default as BaseIcon } from "./components/base-icon.vue";
1
+ export { default as SvgIcon } from "./components/svg-icon.vue";
2
2
  export { default as LoadingSpinner } from "./components/loading-spinner.vue";
3
3
  export { default as BaseButton } from "./components/base-button.vue";
4
4
  export { default as BaseInput } from "./components/base-input.vue";
5
5
  export { default as CheckGroup } from "./components/check-group.vue";
6
6
  export { default as RadioGroup } from "./components/radio-group.vue";
7
- export { default as BaseForm } from "./components/base-form.vue";
package/dist/main.d.ts CHANGED
@@ -1 +1,2 @@
1
- export {};
1
+ import "bootstrap/dist/css/bootstrap.min.css";
2
+ import "bootstrap";
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .base-icon{display:inline-block}.base-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.base-icon--xxl svg{width:12rem;height:12rem}.base-icon--xl svg{width:8rem;height:8rem}.base-icon--large svg{width:4rem;height:4rem}.loading-spinner{min-width:2rem}.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}
1
+ .svg-icon{display:inline-block}.svg-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.svg-icon--xxl svg{width:12rem;height:12rem}.svg-icon--xl svg{width:8rem;height:8rem}.svg-icon--large svg{width:4rem;height:4rem}.loading-spinner{min-width:2rem}.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ablok-components",
3
3
  "private": false,
4
- "version": "0.0.18",
4
+ "version": "0.0.19",
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "vue-tsc --noEmit && vite build",
@@ -1,26 +0,0 @@
1
- interface State {
2
- firstName: string;
3
- lastName: string;
4
- userId: number | null;
5
- }
6
- export declare const useAuthUserStore: import("pinia").StoreDefinition<"auth/user", State, {
7
- fullName: (state: {
8
- firstName: string;
9
- lastName: string;
10
- userId: number | null;
11
- } & import("pinia").PiniaCustomStateProperties<State>) => string;
12
- loggedIn: (state: {
13
- firstName: string;
14
- lastName: string;
15
- userId: number | null;
16
- } & import("pinia").PiniaCustomStateProperties<State>) => boolean;
17
- fullUserDetails(state: {
18
- firstName: string;
19
- lastName: string;
20
- userId: number | null;
21
- } & import("pinia").PiniaCustomStateProperties<State>): any;
22
- }, {
23
- updateUser(payload: any): void;
24
- clearUser(): void;
25
- }>;
26
- export {};