ablok-components 0.0.8 → 0.0.11

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,6 +1,6 @@
1
- import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, createElementVNode, renderSlot, computed, createBlock, createCommentVNode, unref, toDisplayString, ref, watch, withDirectives, vModelText, createTextVNode } from "vue";
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
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$3 = /* @__PURE__ */ defineComponent({
3
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
4
4
  __name: "base-icon",
5
5
  props: {
6
6
  id: {
@@ -29,8 +29,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
29
29
  }
30
30
  });
31
31
  var loadingSpinner_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".loading-spinner{min-width:2rem}\n")();
32
- const _hoisted_1$2 = { class: "loading-spinner d-block" };
33
- const _hoisted_2$1 = { class: "loading-spinner__animation" };
32
+ const _hoisted_1$5 = { class: "loading-spinner d-block" };
33
+ const _hoisted_2$4 = { class: "loading-spinner__animation" };
34
34
  const _hoisted_3$1 = {
35
35
  class: "d-block",
36
36
  version: "1.1",
@@ -56,7 +56,7 @@ const _hoisted_5 = /* @__PURE__ */ createElementVNode("animateTransform", {
56
56
  const _hoisted_6 = [
57
57
  _hoisted_5
58
58
  ];
59
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
59
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
60
60
  __name: "loading-spinner",
61
61
  props: {
62
62
  color: {
@@ -66,8 +66,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
66
66
  },
67
67
  setup(__props) {
68
68
  return (_ctx, _cache) => {
69
- return openBlock(), createElementBlock("span", _hoisted_1$2, [
70
- createElementVNode("span", _hoisted_2$1, [
69
+ return openBlock(), createElementBlock("span", _hoisted_1$5, [
70
+ createElementVNode("span", _hoisted_2$4, [
71
71
  (openBlock(), createElementBlock("svg", _hoisted_3$1, [
72
72
  createElementVNode("path", {
73
73
  fill: __props.color,
@@ -81,8 +81,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
81
81
  }
82
82
  });
83
83
  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$1 = ["type", "disabled", "href", "to"];
85
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
84
+ const _hoisted_1$4 = ["type", "disabled", "href", "to"];
85
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
86
86
  __name: "base-button",
87
87
  props: {
88
88
  type: null,
@@ -110,7 +110,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
110
110
  disabled: __props.disabled,
111
111
  href: __props.href,
112
112
  to: __props.to,
113
- class: normalizeClass({
113
+ class: normalizeClass(["base-button", {
114
114
  disabled: __props.disabled,
115
115
  pending: __props.pending,
116
116
  rounded: __props.rounded,
@@ -120,7 +120,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
120
120
  "large": __props.size === "large",
121
121
  "small": __props.size === "small",
122
122
  "x-small": __props.size === "x-small"
123
- })
123
+ }])
124
124
  }, [
125
125
  renderSlot(_ctx.$slots, "default", {}, () => [
126
126
  __props.icon ? (openBlock(), createBlock(_component_base_icon, {
@@ -133,23 +133,27 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
133
133
  class: normalizeClass(["base-button__caption", { "icon-padding": __props.icon }])
134
134
  }, toDisplayString(__props.caption), 3)) : createCommentVNode("", true)
135
135
  ])
136
- ], 10, _hoisted_1$1);
136
+ ], 10, _hoisted_1$4);
137
137
  };
138
138
  }
139
139
  });
140
140
  function uniqueId() {
141
141
  return (new Date().valueOf() + Math.random()).toString(36);
142
142
  }
143
- const _hoisted_1 = { class: "base-input" };
144
- const _hoisted_2 = ["name", "id", "label", "placeholder", "pattern", "disabled", "read-only", "required", "maxlength"];
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
145
  const _hoisted_3 = ["for"];
146
- const _sfc_main = /* @__PURE__ */ defineComponent({
146
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
147
147
  __name: "base-input",
148
148
  props: {
149
149
  modelValue: {
150
- type: String,
150
+ type: [String, Number, Boolean],
151
151
  default: ""
152
152
  },
153
+ type: {
154
+ type: String,
155
+ default: "text"
156
+ },
153
157
  name: {
154
158
  type: String,
155
159
  default: () => uniqueId()
@@ -188,20 +192,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
188
192
  pattern: {
189
193
  type: String,
190
194
  default: null
195
+ },
196
+ checked: {
197
+ type: Boolean,
198
+ default: false
191
199
  }
192
200
  },
193
201
  emits: ["update:modelValue"],
194
202
  setup(__props, { emit }) {
195
- const value = ref();
196
- watch(value, async (update, before) => {
197
- if (update !== before) {
203
+ const props = __props;
204
+ const model = computed({
205
+ get() {
206
+ return props.modelValue;
207
+ },
208
+ set(update) {
198
209
  emit("update:modelValue", update);
199
210
  }
200
211
  });
201
212
  return (_ctx, _cache) => {
202
- return openBlock(), createElementBlock("div", _hoisted_1, [
213
+ return openBlock(), createElementBlock("div", _hoisted_1$3, [
203
214
  withDirectives(createElementVNode("input", {
204
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
215
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
216
+ type: __props.type,
205
217
  name: __props.name,
206
218
  id: __props.id,
207
219
  label: `${__props.label}${__props.required ? " *" : ""}`,
@@ -210,9 +222,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
210
222
  disabled: __props.disabled,
211
223
  "read-only": __props.readOnly,
212
224
  required: __props.required,
213
- maxlength: __props.maxlength
214
- }, null, 8, _hoisted_2), [
215
- [vModelText, value.value]
225
+ maxlength: __props.maxlength,
226
+ checked: __props.checked
227
+ }, null, 8, _hoisted_2$3), [
228
+ [vModelDynamic, unref(model)]
216
229
  ]),
217
230
  createElementVNode("label", { for: __props.id }, [
218
231
  renderSlot(_ctx.$slots, "label", {}, () => [
@@ -223,4 +236,791 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
223
236
  };
224
237
  }
225
238
  });
226
- export { _sfc_main$1 as BaseButton, _sfc_main$3 as BaseIcon, _sfc_main as BaseInput, _sfc_main$2 as LoadingSpinner };
239
+ const _hoisted_1$2 = { class: "radio-group" };
240
+ const _hoisted_2$2 = ["for"];
241
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
242
+ __name: "check-group",
243
+ props: {
244
+ modelValue: {
245
+ default: []
246
+ },
247
+ options: {
248
+ type: Array,
249
+ default: []
250
+ },
251
+ name: {
252
+ type: String,
253
+ default: () => uniqueId()
254
+ },
255
+ id: {
256
+ type: String,
257
+ default: () => uniqueId()
258
+ },
259
+ label: {
260
+ type: String,
261
+ default: ""
262
+ },
263
+ variant: {
264
+ type: String,
265
+ default: ""
266
+ },
267
+ disabled: {
268
+ type: Boolean,
269
+ default: false
270
+ },
271
+ readOnly: {
272
+ type: Boolean,
273
+ default: false
274
+ },
275
+ required: {
276
+ type: Boolean,
277
+ default: false
278
+ }
279
+ },
280
+ emits: ["change", "update:modelValue"],
281
+ setup(__props, { emit }) {
282
+ const props = __props;
283
+ const values = ref([]);
284
+ watch(() => props.modelValue, (update, before) => {
285
+ values.value = props.options.map((option) => option.value ? props.modelValue.some((modelValue) => modelValue["value "] === option.value) : props.modelValue.some((modelValue) => modelValue === option));
286
+ }, { immediate: true });
287
+ watch(values, (update, before) => {
288
+ const options = update.reduce((mappedValues, option, index) => {
289
+ const value = option && props.options[index] ? [props.options[index] || props.options[index]] : [];
290
+ return [...mappedValues, ...value];
291
+ }, []);
292
+ emit("update:modelValue", options);
293
+ }, { deep: true });
294
+ onBeforeMount(() => {
295
+ });
296
+ return (_ctx, _cache) => {
297
+ const _component_base_input = resolveComponent("base-input");
298
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [
299
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
300
+ return openBlock(), createBlock(_component_base_input, {
301
+ key: index,
302
+ modelValue: unref(values)[index],
303
+ "onUpdate:modelValue": ($event) => unref(values)[index] = $event,
304
+ type: "checkbox",
305
+ name: __props.name,
306
+ id: `${__props.id}-${index}`,
307
+ label: `${option.text || option}${__props.required ? " *" : ""}`,
308
+ disabled: __props.disabled,
309
+ "read-only": __props.readOnly,
310
+ required: __props.required
311
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "name", "id", "label", "disabled", "read-only", "required"]);
312
+ }), 128)),
313
+ createElementVNode("label", { for: __props.id }, [
314
+ renderSlot(_ctx.$slots, "label", {}, () => [
315
+ createTextVNode(toDisplayString(__props.label), 1)
316
+ ])
317
+ ], 8, _hoisted_2$2)
318
+ ]);
319
+ };
320
+ }
321
+ });
322
+ const _hoisted_1$1 = { class: "radio-group" };
323
+ const _hoisted_2$1 = ["for"];
324
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
325
+ __name: "radio-group",
326
+ props: {
327
+ modelValue: {
328
+ default: false
329
+ },
330
+ options: {
331
+ type: Array,
332
+ default: []
333
+ },
334
+ name: {
335
+ type: String,
336
+ default: () => uniqueId()
337
+ },
338
+ id: {
339
+ type: String,
340
+ default: () => uniqueId()
341
+ },
342
+ label: {
343
+ type: String,
344
+ default: ""
345
+ },
346
+ variant: {
347
+ type: String,
348
+ default: ""
349
+ },
350
+ disabled: {
351
+ type: Boolean,
352
+ default: false
353
+ },
354
+ readOnly: {
355
+ type: Boolean,
356
+ default: false
357
+ },
358
+ required: {
359
+ type: Boolean,
360
+ default: false
361
+ }
362
+ },
363
+ emits: ["change", "update:modelValue"],
364
+ setup(__props, { emit }) {
365
+ const props = __props;
366
+ ref(props.options.map((option) => option.value === props.modelValue));
367
+ function change(value2) {
368
+ emit("update:modelValue", value2);
369
+ }
370
+ onBeforeMount(() => {
371
+ });
372
+ return (_ctx, _cache) => {
373
+ const _component_base_input = resolveComponent("base-input");
374
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
375
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
376
+ return openBlock(), createBlock(_component_base_input, {
377
+ key: index,
378
+ type: "radio",
379
+ name: __props.name,
380
+ id: `${__props.id}-${index}`,
381
+ value: option.value || option,
382
+ label: `${option.text || option}${__props.required ? " *" : ""}`,
383
+ checked: option.value ? option.value === __props.modelValue : option === __props.modelValue,
384
+ disabled: __props.disabled,
385
+ "read-only": __props.readOnly,
386
+ required: __props.required,
387
+ onChange: ($event) => change(option)
388
+ }, null, 8, ["name", "id", "value", "label", "checked", "disabled", "read-only", "required", "onChange"]);
389
+ }), 128)),
390
+ createElementVNode("label", { for: __props.id }, [
391
+ renderSlot(_ctx.$slots, "label", {}, () => [
392
+ createTextVNode(toDisplayString(__props.label), 1)
393
+ ])
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)
1022
+ ]);
1023
+ };
1024
+ }
1025
+ });
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 };
@@ -1,4 +1,9 @@
1
- (function(t,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis!="undefined"?globalThis:t||self,e(t.AblokComponents={},t.Vue))})(this,function(t,e){"use strict";var w=(()=>`.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 r=e.defineComponent({__name:"base-icon",props:{id:{type:String,default:""},size:{type:String,default:"default"}},setup(n){return(o,l)=>{const a=e.resolveComponent("SvgSprite");return e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["base-icon",{[`base-icon--${n.size}`]:n.size}])},[e.createVNode(a,{symbol:`icon-${n.id}`,role:"presentation"},null,8,["symbol"])],2)}}});var S=(()=>`.loading-spinner{min-width:2rem}
3
- `)();const c={class:"loading-spinner d-block"},m={class:"loading-spinner__animation"},b={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"},u=["fill"],p=[e.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"},null,-1)],f=e.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(n){return(o,l)=>(e.openBlock(),e.createElementBlock("span",c,[e.createElementVNode("span",m,[(e.openBlock(),e.createElementBlock("svg",b,[e.createElementVNode("path",{fill:n.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"},p,8,u)]))]),e.renderSlot(o.$slots,"default")]))}});var _=(()=>`.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 g=["type","disabled","href","to"],h=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(n){const o=n,l=e.computed(()=>o.caption&&!o.fab);return(a,i)=>{const d=e.resolveComponent("base-icon");return e.openBlock(),e.createElementBlock("button",{type:n.type,disabled:n.disabled,href:n.href,to:n.to,class:e.normalizeClass({disabled:n.disabled,pending:n.pending,rounded:n.rounded,outlined:n.outlined,fab:n.fab,"x-large":n.size==="x-large",large:n.size==="large",small:n.size==="small","x-small":n.size==="x-small"})},[e.renderSlot(a.$slots,"default",{},()=>[n.icon?(e.openBlock(),e.createBlock(d,{key:0,id:n.icon,class:"base-button__caption"},null,8,["id"])):e.createCommentVNode("",!0),e.unref(l)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["base-button__caption",{"icon-padding":n.icon}])},e.toDisplayString(n.caption),3)):e.createCommentVNode("",!0)])],10,g)}}});function s(){return(new Date().valueOf()+Math.random()).toString(36)}const y={class:"base-input"},x=["name","id","label","placeholder","pattern","disabled","read-only","required","maxlength"],k=["for"],B=e.defineComponent({__name:"base-input",props:{modelValue:{type:String,default:""},name:{type:String,default:()=>s()},id:{type:String,default:()=>s()},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}},emits:["update:modelValue"],setup(n,{emit:o}){const l=e.ref();return e.watch(l,async(a,i)=>{a!==i&&o("update:modelValue",a)}),(a,i)=>(e.openBlock(),e.createElementBlock("div",y,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=d=>l.value=d),name:n.name,id:n.id,label:`${n.label}${n.required?" *":""}`,placeholder:n.placeholder,pattern:n.pattern,disabled:n.disabled,"read-only":n.readOnly,required:n.required,maxlength:n.maxlength},null,8,x),[[e.vModelText,l.value]]),e.createElementVNode("label",{for:n.id},[e.renderSlot(a.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(n.label),1)])],8,k)]))}});t.BaseButton=h,t.BaseIcon=r,t.BaseInput=B,t.LoadingSpinner=f,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
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"}})});
@@ -0,0 +1,23 @@
1
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
2
+ id?: string | undefined;
3
+ name?: string | undefined;
4
+ variant?: string | undefined;
5
+ disabled?: boolean | undefined;
6
+ pending?: boolean | undefined;
7
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
8
+ id?: string | undefined;
9
+ name?: string | undefined;
10
+ variant?: string | undefined;
11
+ disabled?: boolean | undefined;
12
+ pending?: boolean | undefined;
13
+ }>>>, {}>;
14
+ export default _default;
15
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
16
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
17
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
18
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
19
+ } : {
20
+ type: import('vue').PropType<T[K]>;
21
+ required: true;
22
+ };
23
+ };
@@ -1,5 +1,9 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
2
  modelValue: {
3
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
4
+ default: string;
5
+ };
6
+ type: {
3
7
  type: StringConstructor;
4
8
  default: string;
5
9
  };
@@ -42,8 +46,16 @@ declare const _default: import("vue").DefineComponent<{
42
46
  type: StringConstructor;
43
47
  default: null;
44
48
  };
49
+ checked: {
50
+ type: BooleanConstructor;
51
+ default: boolean;
52
+ };
45
53
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
46
54
  modelValue: {
55
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
56
+ default: string;
57
+ };
58
+ type: {
47
59
  type: StringConstructor;
48
60
  default: string;
49
61
  };
@@ -86,17 +98,23 @@ declare const _default: import("vue").DefineComponent<{
86
98
  type: StringConstructor;
87
99
  default: null;
88
100
  };
101
+ checked: {
102
+ type: BooleanConstructor;
103
+ default: boolean;
104
+ };
89
105
  }>> & {
90
106
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
91
107
  }, {
108
+ id: string;
109
+ checked: boolean;
92
110
  required: boolean;
111
+ type: string;
93
112
  label: string;
94
113
  pattern: string;
95
- id: string;
96
- modelValue: string;
114
+ modelValue: string | number | boolean;
115
+ name: string;
97
116
  variant: string;
98
117
  disabled: boolean;
99
- name: string;
100
118
  placeholder: string;
101
119
  readOnly: boolean;
102
120
  }>;
@@ -0,0 +1,88 @@
1
+ import { PropType } from 'vue';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ modelValue: {
4
+ default: never[];
5
+ };
6
+ options: {
7
+ type: PropType<any[]>;
8
+ default: never[];
9
+ };
10
+ name: {
11
+ type: StringConstructor;
12
+ default: () => string;
13
+ };
14
+ id: {
15
+ type: StringConstructor;
16
+ default: () => string;
17
+ };
18
+ label: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ variant: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ disabled: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
30
+ readOnly: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
34
+ required: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
39
+ modelValue: {
40
+ default: never[];
41
+ };
42
+ options: {
43
+ type: PropType<any[]>;
44
+ default: never[];
45
+ };
46
+ name: {
47
+ type: StringConstructor;
48
+ default: () => string;
49
+ };
50
+ id: {
51
+ type: StringConstructor;
52
+ default: () => string;
53
+ };
54
+ label: {
55
+ type: StringConstructor;
56
+ default: string;
57
+ };
58
+ variant: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ };
62
+ disabled: {
63
+ type: BooleanConstructor;
64
+ default: boolean;
65
+ };
66
+ readOnly: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
70
+ required: {
71
+ type: BooleanConstructor;
72
+ default: boolean;
73
+ };
74
+ }>> & {
75
+ onChange?: ((...args: any[]) => any) | undefined;
76
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
77
+ }, {
78
+ id: string;
79
+ required: boolean;
80
+ label: string;
81
+ modelValue: never[];
82
+ name: string;
83
+ options: any[];
84
+ variant: string;
85
+ disabled: boolean;
86
+ readOnly: boolean;
87
+ }>;
88
+ export default _default;
@@ -0,0 +1,88 @@
1
+ import { PropType } from 'vue';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ modelValue: {
4
+ default: boolean;
5
+ };
6
+ options: {
7
+ type: PropType<any[]>;
8
+ default: never[];
9
+ };
10
+ name: {
11
+ type: StringConstructor;
12
+ default: () => string;
13
+ };
14
+ id: {
15
+ type: StringConstructor;
16
+ default: () => string;
17
+ };
18
+ label: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ variant: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ disabled: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
30
+ readOnly: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
34
+ required: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
39
+ modelValue: {
40
+ default: boolean;
41
+ };
42
+ options: {
43
+ type: PropType<any[]>;
44
+ default: never[];
45
+ };
46
+ name: {
47
+ type: StringConstructor;
48
+ default: () => string;
49
+ };
50
+ id: {
51
+ type: StringConstructor;
52
+ default: () => string;
53
+ };
54
+ label: {
55
+ type: StringConstructor;
56
+ default: string;
57
+ };
58
+ variant: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ };
62
+ disabled: {
63
+ type: BooleanConstructor;
64
+ default: boolean;
65
+ };
66
+ readOnly: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
70
+ required: {
71
+ type: BooleanConstructor;
72
+ default: boolean;
73
+ };
74
+ }>> & {
75
+ onChange?: ((...args: any[]) => any) | undefined;
76
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
77
+ }, {
78
+ id: string;
79
+ required: boolean;
80
+ label: string;
81
+ modelValue: boolean;
82
+ name: string;
83
+ options: any[];
84
+ variant: string;
85
+ disabled: boolean;
86
+ readOnly: boolean;
87
+ }>;
88
+ export default _default;
package/dist/index.d.ts CHANGED
@@ -2,3 +2,6 @@ export { default as BaseIcon } from "./components/base-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
+ export { default as CheckGroup } from "./components/check-group.vue";
6
+ export { default as RadioGroup } from "./components/radio-group.vue";
7
+ export { default as BaseForm } from "./components/base-form.vue";
@@ -0,0 +1,26 @@
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 {};
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}
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}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ablok-components",
3
3
  "private": false,
4
- "version": "0.0.8",
4
+ "version": "0.0.11",
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "vue-tsc --noEmit && vite build",
@@ -10,7 +10,11 @@
10
10
  "build-lib": "vite build && vue-tsc --emitDeclarationOnly"
11
11
  },
12
12
  "dependencies": {
13
+ "@popperjs/core": "^2.11.5",
14
+ "@vueuse/core": "^8.7.5",
15
+ "bootstrap": "^5.1.3",
13
16
  "express": "^4.18.1",
17
+ "install": "^0.13.0",
14
18
  "vue": "^3.2.25",
15
19
  "vue-i18n": "^9.2.0-beta.36"
16
20
  },