@pequity/squirrel 1.2.12 → 3.0.0

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.
Files changed (36) hide show
  1. package/dist/cjs/p-loading.js +50 -17
  2. package/dist/cjs/usePLoading.js +22 -10
  3. package/dist/es/p-loading.js +51 -18
  4. package/dist/es/usePLoading.js +23 -11
  5. package/dist/squirrel/components/p-alert/p-alert.vue.d.ts +2 -2
  6. package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +5 -4
  7. package/dist/squirrel/components/p-card/p-card.vue.d.ts +9 -7
  8. package/dist/squirrel/components/p-checkbox/p-checkbox.vue.d.ts +7 -5
  9. package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +4 -4
  10. package/dist/squirrel/components/p-dropdown-select/p-dropdown-select.vue.d.ts +29 -27
  11. package/dist/squirrel/components/p-info-icon/p-info-icon.vue.d.ts +6 -4
  12. package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +4 -4
  13. package/dist/squirrel/components/p-input/p-input.vue.d.ts +6 -6
  14. package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +6 -6
  15. package/dist/squirrel/components/p-input-percent/p-input-percent.vue.d.ts +5 -4
  16. package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +2 -2
  17. package/dist/squirrel/components/p-loading/usePLoading.d.ts +12 -4
  18. package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +10 -8
  19. package/dist/squirrel/components/p-pagination-info/p-pagination-info.vue.d.ts +6 -4
  20. package/dist/squirrel/components/p-select/p-select.vue.d.ts +14 -11
  21. package/dist/squirrel/components/p-select-btn/p-select-btn.vue.d.ts +8 -6
  22. package/dist/squirrel/components/p-select-list/p-select-list.vue.d.ts +29 -27
  23. package/dist/squirrel/components/p-select-pill/p-select-pill.vue.d.ts +4 -4
  24. package/dist/squirrel/components/p-table/p-table.vue.d.ts +8 -6
  25. package/dist/squirrel/components/p-table-td/p-table-td.vue.d.ts +6 -4
  26. package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +4 -4
  27. package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +4 -4
  28. package/dist/squirrel/utils/inputClassesMixin.d.ts +2 -2
  29. package/dist/squirrel/utils/object.d.ts +1 -1
  30. package/dist/style.css +6 -6
  31. package/package.json +22 -22
  32. package/squirrel/components/p-loading/p-loading.spec.js +117 -16
  33. package/squirrel/components/p-loading/p-loading.stories.js +63 -3
  34. package/squirrel/components/p-loading/p-loading.vue +27 -3
  35. package/squirrel/components/p-loading/usePLoading.ts +39 -13
  36. package/squirrel/components/p-select-list/p-select-list.utils.ts +1 -1
@@ -2,37 +2,70 @@
2
2
  const vue = require("vue");
3
3
  const usePLoading = require("./usePLoading.js");
4
4
  const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
5
- const _withScopeId = (n) => (vue.pushScopeId("data-v-122d5e30"), n = n(), vue.popScopeId(), n);
6
5
  const _hoisted_1 = {
7
6
  key: 0,
8
7
  class: "fixed left-0 top-0 z-[120] flex w-full justify-center",
9
8
  "aria-live": "polite",
10
9
  "aria-busy": "true"
11
10
  };
12
- const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "h-8 rounded-b border-x border-b border-p-gray-30 bg-p-blue-10 px-4 pt-2 text-sm font-semibold leading-none text-p-purple-60 shadow-sm" }, " Loading... ", -1));
13
- const _hoisted_3 = [
14
- _hoisted_2
15
- ];
11
+ const _hoisted_2 = {
12
+ key: 0,
13
+ class: "invisible fixed"
14
+ };
16
15
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
17
16
  ...{
18
17
  name: "PLoading"
19
18
  },
20
19
  __name: "p-loading",
21
20
  setup(__props) {
22
- const { show } = usePLoading.usePLoading();
21
+ const { show, content } = usePLoading.usePLoading();
22
+ const widthReference = vue.ref(null);
23
+ const width = vue.ref(0);
24
+ vue.watch(
25
+ () => vue.toValue(content),
26
+ () => {
27
+ if (widthReference.value) {
28
+ width.value = widthReference.value.offsetWidth;
29
+ }
30
+ },
31
+ { flush: "post" }
32
+ );
33
+ const isComponent = (content2) => typeof content2 === "object" && content2 !== null && "render" in content2 && typeof content2.render === "function";
23
34
  return (_ctx, _cache) => {
24
- return vue.openBlock(), vue.createBlock(vue.Transition, {
25
- name: "pm-backdrop-transition",
26
- "enter-active-class": "fadeInDown",
27
- "leave-active-class": "fadeOutUp"
28
- }, {
29
- default: vue.withCtx(() => [
30
- vue.unref(show) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, _hoisted_3)) : vue.createCommentVNode("", true)
31
- ]),
32
- _: 1
33
- });
35
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
36
+ vue.createVNode(vue.Transition, {
37
+ name: "pm-backdrop-transition",
38
+ "enter-active-class": "fadeInDown",
39
+ "leave-active-class": "fadeOutUp"
40
+ }, {
41
+ default: vue.withCtx(() => [
42
+ vue.unref(show) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
43
+ vue.createElementVNode("div", {
44
+ style: vue.normalizeStyle({ width: `${width.value}px` }),
45
+ class: "h-8 overflow-hidden whitespace-nowrap rounded-b border-x border-b border-p-gray-30 bg-p-blue-10 px-4 pt-2 text-center text-sm font-semibold leading-none text-p-purple-60 shadow-sm transition-all duration-500"
46
+ }, [
47
+ isComponent(vue.unref(content)) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(content)), { key: 0 })) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
48
+ vue.createTextVNode(vue.toDisplayString(vue.unref(content)), 1)
49
+ ], 64))
50
+ ], 4)
51
+ ])) : vue.createCommentVNode("", true)
52
+ ]),
53
+ _: 1
54
+ }),
55
+ vue.unref(content) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
56
+ vue.createElementVNode("div", {
57
+ ref_key: "widthReference",
58
+ ref: widthReference,
59
+ class: "inline-flex px-4"
60
+ }, [
61
+ isComponent(vue.unref(content)) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(content)), { key: 0 })) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
62
+ vue.createTextVNode(vue.toDisplayString(vue.unref(content)), 1)
63
+ ], 64))
64
+ ], 512)
65
+ ])) : vue.createCommentVNode("", true)
66
+ ], 64);
34
67
  };
35
68
  }
36
69
  });
37
- const pLoading = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-122d5e30"]]);
70
+ const pLoading = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-8d505d00"]]);
38
71
  module.exports = pLoading;
@@ -1,35 +1,47 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("vue");
4
- const lodashEs = require("lodash-es");
4
+ const LOADING_TEXT = "Loading...";
5
5
  const show = vue.ref(false);
6
- const loadingIds = [];
6
+ const loadingItems = vue.ref([]);
7
+ const content = vue.computed(() => {
8
+ var _a;
9
+ return (_a = loadingItems.value[loadingItems.value.length - 1]) == null ? void 0 : _a.content;
10
+ });
7
11
  let timer;
8
12
  const usePLoading = (options) => {
9
13
  const { delay } = { delay: 200, ...options };
10
14
  const scope = vue.getCurrentScope();
11
- const loadingShow = () => {
12
- if (loadingIds.length === 0 && delay > 0) {
15
+ const loadingShow = (loadingItem) => {
16
+ if (!loadingItem.id) {
17
+ throw new Error("id is required");
18
+ }
19
+ if (loadingItems.value.length === 0 && delay > 0) {
13
20
  timer = setTimeout(() => {
14
21
  show.value = true;
15
22
  }, delay);
16
23
  } else {
17
24
  show.value = true;
18
25
  }
19
- loadingIds.push(lodashEs.uniqueId());
26
+ loadingItems.value.push({
27
+ id: loadingItem.id,
28
+ content: loadingItem.content && typeof loadingItem.content === "object" ? vue.markRaw(loadingItem.content) : loadingItem.content || LOADING_TEXT
29
+ });
20
30
  };
21
- const loadingHide = () => {
22
- if (loadingIds.length === 1) {
31
+ const loadingHide = (id) => {
32
+ loadingItems.value = id && typeof id === "string" ? loadingItems.value.filter((item) => item.id !== id) : [];
33
+ if (loadingItems.value.length === 0) {
23
34
  show.value = false;
24
35
  }
25
36
  clearTimeout(timer);
26
- loadingIds.pop();
27
37
  };
28
38
  if (scope) {
29
39
  vue.onScopeDispose(() => {
30
- loadingHide();
40
+ loadingItems.value = [];
41
+ show.value = false;
42
+ clearTimeout(timer);
31
43
  });
32
44
  }
33
- return { show, loadingShow, loadingHide };
45
+ return { show, content, loadingShow, loadingHide };
34
46
  };
35
47
  exports.usePLoading = usePLoading;
@@ -1,39 +1,72 @@
1
- import { defineComponent, openBlock, createBlock, Transition, withCtx, unref, createElementBlock, createCommentVNode, pushScopeId, popScopeId, createElementVNode } from "vue";
1
+ import { defineComponent, ref, watch, toValue, openBlock, createElementBlock, Fragment, createVNode, Transition, withCtx, unref, createElementVNode, normalizeStyle, createBlock, resolveDynamicComponent, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
2
  import { usePLoading } from "./usePLoading.js";
3
3
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
4
- const _withScopeId = (n) => (pushScopeId("data-v-122d5e30"), n = n(), popScopeId(), n);
5
4
  const _hoisted_1 = {
6
5
  key: 0,
7
6
  class: "fixed left-0 top-0 z-[120] flex w-full justify-center",
8
7
  "aria-live": "polite",
9
8
  "aria-busy": "true"
10
9
  };
11
- const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "h-8 rounded-b border-x border-b border-p-gray-30 bg-p-blue-10 px-4 pt-2 text-sm font-semibold leading-none text-p-purple-60 shadow-sm" }, " Loading... ", -1));
12
- const _hoisted_3 = [
13
- _hoisted_2
14
- ];
10
+ const _hoisted_2 = {
11
+ key: 0,
12
+ class: "invisible fixed"
13
+ };
15
14
  const _sfc_main = /* @__PURE__ */ defineComponent({
16
15
  ...{
17
16
  name: "PLoading"
18
17
  },
19
18
  __name: "p-loading",
20
19
  setup(__props) {
21
- const { show } = usePLoading();
20
+ const { show, content } = usePLoading();
21
+ const widthReference = ref(null);
22
+ const width = ref(0);
23
+ watch(
24
+ () => toValue(content),
25
+ () => {
26
+ if (widthReference.value) {
27
+ width.value = widthReference.value.offsetWidth;
28
+ }
29
+ },
30
+ { flush: "post" }
31
+ );
32
+ const isComponent = (content2) => typeof content2 === "object" && content2 !== null && "render" in content2 && typeof content2.render === "function";
22
33
  return (_ctx, _cache) => {
23
- return openBlock(), createBlock(Transition, {
24
- name: "pm-backdrop-transition",
25
- "enter-active-class": "fadeInDown",
26
- "leave-active-class": "fadeOutUp"
27
- }, {
28
- default: withCtx(() => [
29
- unref(show) ? (openBlock(), createElementBlock("div", _hoisted_1, _hoisted_3)) : createCommentVNode("", true)
30
- ]),
31
- _: 1
32
- });
34
+ return openBlock(), createElementBlock(Fragment, null, [
35
+ createVNode(Transition, {
36
+ name: "pm-backdrop-transition",
37
+ "enter-active-class": "fadeInDown",
38
+ "leave-active-class": "fadeOutUp"
39
+ }, {
40
+ default: withCtx(() => [
41
+ unref(show) ? (openBlock(), createElementBlock("div", _hoisted_1, [
42
+ createElementVNode("div", {
43
+ style: normalizeStyle({ width: `${width.value}px` }),
44
+ class: "h-8 overflow-hidden whitespace-nowrap rounded-b border-x border-b border-p-gray-30 bg-p-blue-10 px-4 pt-2 text-center text-sm font-semibold leading-none text-p-purple-60 shadow-sm transition-all duration-500"
45
+ }, [
46
+ isComponent(unref(content)) ? (openBlock(), createBlock(resolveDynamicComponent(unref(content)), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
47
+ createTextVNode(toDisplayString(unref(content)), 1)
48
+ ], 64))
49
+ ], 4)
50
+ ])) : createCommentVNode("", true)
51
+ ]),
52
+ _: 1
53
+ }),
54
+ unref(content) ? (openBlock(), createElementBlock("div", _hoisted_2, [
55
+ createElementVNode("div", {
56
+ ref_key: "widthReference",
57
+ ref: widthReference,
58
+ class: "inline-flex px-4"
59
+ }, [
60
+ isComponent(unref(content)) ? (openBlock(), createBlock(resolveDynamicComponent(unref(content)), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
61
+ createTextVNode(toDisplayString(unref(content)), 1)
62
+ ], 64))
63
+ ], 512)
64
+ ])) : createCommentVNode("", true)
65
+ ], 64);
33
66
  };
34
67
  }
35
68
  });
36
- const pLoading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-122d5e30"]]);
69
+ const pLoading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8d505d00"]]);
37
70
  export {
38
71
  pLoading as default
39
72
  };
@@ -1,34 +1,46 @@
1
- import { ref, getCurrentScope, onScopeDispose } from "vue";
2
- import { uniqueId } from "lodash-es";
1
+ import { ref, computed, getCurrentScope, onScopeDispose, markRaw } from "vue";
2
+ const LOADING_TEXT = "Loading...";
3
3
  const show = ref(false);
4
- const loadingIds = [];
4
+ const loadingItems = ref([]);
5
+ const content = computed(() => {
6
+ var _a;
7
+ return (_a = loadingItems.value[loadingItems.value.length - 1]) == null ? void 0 : _a.content;
8
+ });
5
9
  let timer;
6
10
  const usePLoading = (options) => {
7
11
  const { delay } = { delay: 200, ...options };
8
12
  const scope = getCurrentScope();
9
- const loadingShow = () => {
10
- if (loadingIds.length === 0 && delay > 0) {
13
+ const loadingShow = (loadingItem) => {
14
+ if (!loadingItem.id) {
15
+ throw new Error("id is required");
16
+ }
17
+ if (loadingItems.value.length === 0 && delay > 0) {
11
18
  timer = setTimeout(() => {
12
19
  show.value = true;
13
20
  }, delay);
14
21
  } else {
15
22
  show.value = true;
16
23
  }
17
- loadingIds.push(uniqueId());
24
+ loadingItems.value.push({
25
+ id: loadingItem.id,
26
+ content: loadingItem.content && typeof loadingItem.content === "object" ? markRaw(loadingItem.content) : loadingItem.content || LOADING_TEXT
27
+ });
18
28
  };
19
- const loadingHide = () => {
20
- if (loadingIds.length === 1) {
29
+ const loadingHide = (id) => {
30
+ loadingItems.value = id && typeof id === "string" ? loadingItems.value.filter((item) => item.id !== id) : [];
31
+ if (loadingItems.value.length === 0) {
21
32
  show.value = false;
22
33
  }
23
34
  clearTimeout(timer);
24
- loadingIds.pop();
25
35
  };
26
36
  if (scope) {
27
37
  onScopeDispose(() => {
28
- loadingHide();
38
+ loadingItems.value = [];
39
+ show.value = false;
40
+ clearTimeout(timer);
29
41
  });
30
42
  }
31
- return { show, loadingShow, loadingHide };
43
+ return { show, content, loadingShow, loadingHide };
32
44
  };
33
45
  export {
34
46
  usePLoading
@@ -7,7 +7,7 @@ declare const ALERT_TYPES: {
7
7
  };
8
8
  declare const _default: import("vue").DefineComponent<{
9
9
  type: {
10
- type: PropType<"error" | "info" | "success" | "warning">;
10
+ type: PropType<keyof typeof ALERT_TYPES>;
11
11
  default: string;
12
12
  validator(value: keyof typeof ALERT_TYPES): boolean;
13
13
  };
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
16
16
  svgColor(): undefined;
17
17
  }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
18
  type: {
19
- type: PropType<"error" | "info" | "success" | "warning">;
19
+ type: PropType<keyof typeof ALERT_TYPES>;
20
20
  default: string;
21
21
  validator(value: keyof typeof ALERT_TYPES): boolean;
22
22
  };
@@ -1,4 +1,5 @@
1
1
  import { type PropType } from 'vue';
2
+ import { type RouteLocationRaw } from 'vue-router';
2
3
  import { type Size } from './p-btn.types';
3
4
  declare const BUTTON_TYPES: {
4
5
  readonly PRIMARY: "primary";
@@ -29,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
29
30
  * The button native type e.g button, submit, reset
30
31
  */
31
32
  nativeType: {
32
- type: PropType<"button" | "submit" | "reset">;
33
+ type: PropType<ButtonNativeType>;
33
34
  default: string;
34
35
  validator(value: ButtonNativeType): boolean;
35
36
  };
@@ -60,7 +61,7 @@ declare const _default: import("vue").DefineComponent<{
60
61
  * See https://router.vuejs.org/api/#RouteLocationRaw
61
62
  */
62
63
  to: {
63
- type: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
64
+ type: PropType<RouteLocationRaw>;
64
65
  default: string;
65
66
  };
66
67
  }, unknown, {
@@ -85,7 +86,7 @@ declare const _default: import("vue").DefineComponent<{
85
86
  * The button native type e.g button, submit, reset
86
87
  */
87
88
  nativeType: {
88
- type: PropType<"button" | "submit" | "reset">;
89
+ type: PropType<ButtonNativeType>;
89
90
  default: string;
90
91
  validator(value: ButtonNativeType): boolean;
91
92
  };
@@ -116,7 +117,7 @@ declare const _default: import("vue").DefineComponent<{
116
117
  * See https://router.vuejs.org/api/#RouteLocationRaw
117
118
  */
118
119
  to: {
119
- type: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
120
+ type: PropType<RouteLocationRaw>;
120
121
  default: string;
121
122
  };
122
123
  }>>, {
@@ -1,4 +1,10 @@
1
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
1
+ declare function __VLS_template(): {
2
+ title?(_: {
3
+ titleClass: "text-xl font-medium leading-none text-p-purple-60";
4
+ }): any;
5
+ default?(_: {}): any;
6
+ };
7
+ declare const __VLS_component: import("vue").DefineComponent<{
2
8
  title: {
3
9
  type: StringConstructor;
4
10
  default: string;
@@ -10,12 +16,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
10
16
  };
11
17
  }>>, {
12
18
  title: string;
13
- }, {}>, {
14
- title?(_: {
15
- titleClass: "text-xl font-medium leading-none text-p-purple-60";
16
- }): any;
17
- default?(_: {}): any;
18
- }>;
19
+ }, {}>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
19
21
  export default _default;
20
22
  type __VLS_WithTemplateSlots<T, S> = T & {
21
23
  new (): {
@@ -1,4 +1,8 @@
1
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
1
+ declare function __VLS_template(): {
2
+ "label-before"?(_: {}): any;
3
+ label?(_: {}): any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<{
2
6
  modelValue: {
3
7
  type: BooleanConstructor;
4
8
  default: boolean;
@@ -23,10 +27,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
23
27
  }, {
24
28
  label: string;
25
29
  modelValue: boolean;
26
- }, {}>, {
27
- "label-before"?(_: {}): any;
28
- label?(_: {}): any;
29
- }>;
30
+ }, {}>;
31
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
30
32
  export default _default;
31
33
  type __VLS_WithTemplateSlots<T, S> = T & {
32
34
  new (): {
@@ -44,9 +44,9 @@ declare const _default: import("vue").DefineComponent<{
44
44
  style(): StyleValue;
45
45
  }, {}, import("vue").DefineComponent<{
46
46
  size: {
47
- type: PropType<"sm" | "lg" | "md">;
47
+ type: PropType<import("../../index.js").InputSize>;
48
48
  default: string;
49
- validator(value: "sm" | "lg" | "md"): boolean;
49
+ validator(value: import("../../index.js").InputSize): boolean;
50
50
  };
51
51
  errorMsg: {
52
52
  type: StringConstructor;
@@ -69,9 +69,9 @@ declare const _default: import("vue").DefineComponent<{
69
69
  textareaClasses(): string;
70
70
  }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
71
71
  size: {
72
- type: PropType<"sm" | "lg" | "md">;
72
+ type: PropType<import("../../index.js").InputSize>;
73
73
  default: string;
74
- validator(value: "sm" | "lg" | "md"): boolean;
74
+ validator(value: import("../../index.js").InputSize): boolean;
75
75
  };
76
76
  errorMsg: {
77
77
  type: StringConstructor;
@@ -1,8 +1,29 @@
1
1
  import { type PropType } from 'vue';
2
- import { type ModelValue } from '../p-select-list/p-select-list.types';
2
+ import { type ModelValue, type Size } from '../p-select-list/p-select-list.types';
3
3
  type AnyValue = string | number | boolean | null | undefined | Record<string, unknown>;
4
4
  type AnyObject = Record<string, AnyValue>;
5
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
5
+ declare function __VLS_template(): Readonly<{
6
+ 'selected-item'(props: {
7
+ item: any;
8
+ }): unknown;
9
+ 'no-items'(): unknown;
10
+ item(props: {
11
+ item: any;
12
+ isItemSelected: boolean;
13
+ itemTextSplit: string[];
14
+ }): unknown;
15
+ }> & {
16
+ 'selected-item'(props: {
17
+ item: any;
18
+ }): unknown;
19
+ 'no-items'(): unknown;
20
+ item(props: {
21
+ item: any;
22
+ isItemSelected: boolean;
23
+ itemTextSplit: string[];
24
+ }): unknown;
25
+ };
26
+ declare const __VLS_component: import("vue").DefineComponent<{
6
27
  modelValue: {
7
28
  type: PropType<ModelValue>;
8
29
  default: null;
@@ -37,9 +58,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
37
58
  default: boolean;
38
59
  };
39
60
  size: {
40
- type: PropType<"sm" | "lg" | "md">;
61
+ type: PropType<Size>;
41
62
  default: string;
42
- validator(value: "sm" | "lg" | "md"): boolean;
63
+ validator(value: Size): boolean;
43
64
  };
44
65
  /**
45
66
  * Set property of **items**’s text value
@@ -156,9 +177,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
156
177
  default: boolean;
157
178
  };
158
179
  size: {
159
- type: PropType<"sm" | "lg" | "md">;
180
+ type: PropType<Size>;
160
181
  default: string;
161
- validator(value: "sm" | "lg" | "md"): boolean;
182
+ validator(value: Size): boolean;
162
183
  };
163
184
  /**
164
185
  * Set property of **items**’s text value
@@ -261,27 +282,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
261
282
  multiple: boolean;
262
283
  placeholderSearch: string;
263
284
  selectedTopShown: boolean;
264
- }, {}>, Readonly<{
265
- 'selected-item'(props: {
266
- item: any;
267
- }): unknown;
268
- 'no-items'(): unknown;
269
- item(props: {
270
- item: any;
271
- isItemSelected: boolean;
272
- itemTextSplit: string[];
273
- }): unknown;
274
- }> & {
275
- 'selected-item'(props: {
276
- item: any;
277
- }): unknown;
278
- 'no-items'(): unknown;
279
- item(props: {
280
- item: any;
281
- isItemSelected: boolean;
282
- itemTextSplit: string[];
283
- }): unknown;
284
- }>;
285
+ }, {}>;
286
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
285
287
  export default _default;
286
288
  type __VLS_WithTemplateSlots<T, S> = T & {
287
289
  new (): {
@@ -1,4 +1,7 @@
1
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any;
3
+ };
4
+ declare const __VLS_component: import("vue").DefineComponent<{
2
5
  text: {
3
6
  type: StringConstructor;
4
7
  default: string;
@@ -10,9 +13,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
10
13
  };
11
14
  }>>, {
12
15
  text: string;
13
- }, {}>, {
14
- default?(_: {}): any;
15
- }>;
16
+ }, {}>;
17
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
16
18
  export default _default;
17
19
  type __VLS_WithTemplateSlots<T, S> = T & {
18
20
  new (): {
@@ -52,9 +52,9 @@ declare const _default: import("vue").DefineComponent<{
52
52
  }): void;
53
53
  }, import("vue").DefineComponent<{
54
54
  size: {
55
- type: PropType<"sm" | "lg" | "md">;
55
+ type: PropType<import("../../index.js").InputSize>;
56
56
  default: string;
57
- validator(value: "sm" | "lg" | "md"): boolean;
57
+ validator(value: import("../../index.js").InputSize): boolean;
58
58
  };
59
59
  errorMsg: {
60
60
  type: StringConstructor;
@@ -77,9 +77,9 @@ declare const _default: import("vue").DefineComponent<{
77
77
  textareaClasses(): string;
78
78
  }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
79
79
  size: {
80
- type: PropType<"sm" | "lg" | "md">;
80
+ type: PropType<import("../../index.js").InputSize>;
81
81
  default: string;
82
- validator(value: "sm" | "lg" | "md"): boolean;
82
+ validator(value: import("../../index.js").InputSize): boolean;
83
83
  };
84
84
  errorMsg: {
85
85
  type: StringConstructor;
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<{
11
11
  default: string;
12
12
  };
13
13
  type: {
14
- type: PropType<string>;
14
+ type: PropType<InputType>;
15
15
  default: string;
16
16
  validator(value: InputType): boolean;
17
17
  };
@@ -38,9 +38,9 @@ declare const _default: import("vue").DefineComponent<{
38
38
  style(): StyleValue;
39
39
  }, {}, import("vue").DefineComponent<{
40
40
  size: {
41
- type: PropType<"sm" | "lg" | "md">;
41
+ type: PropType<import("../../index.js").InputSize>;
42
42
  default: string;
43
- validator(value: "sm" | "lg" | "md"): boolean;
43
+ validator(value: import("../../index.js").InputSize): boolean;
44
44
  };
45
45
  errorMsg: {
46
46
  type: StringConstructor;
@@ -63,9 +63,9 @@ declare const _default: import("vue").DefineComponent<{
63
63
  textareaClasses(): string;
64
64
  }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
65
65
  size: {
66
- type: PropType<"sm" | "lg" | "md">;
66
+ type: PropType<import("../../index.js").InputSize>;
67
67
  default: string;
68
- validator(value: "sm" | "lg" | "md"): boolean;
68
+ validator(value: import("../../index.js").InputSize): boolean;
69
69
  };
70
70
  errorMsg: {
71
71
  type: StringConstructor;
@@ -90,7 +90,7 @@ declare const _default: import("vue").DefineComponent<{
90
90
  default: string;
91
91
  };
92
92
  type: {
93
- type: PropType<string>;
93
+ type: PropType<InputType>;
94
94
  default: string;
95
95
  validator(value: InputType): boolean;
96
96
  };
@@ -1,7 +1,7 @@
1
1
  import { type PropType, type StyleValue } from 'vue';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  modelValue: {
4
- type: PropType<string | number | null | undefined>;
4
+ type: PropType<number | string | null | undefined>;
5
5
  default: null;
6
6
  };
7
7
  label: {
@@ -33,9 +33,9 @@ declare const _default: import("vue").DefineComponent<{
33
33
  focus: () => void;
34
34
  }, unknown, {}, {}, import("vue").DefineComponent<{
35
35
  size: {
36
- type: PropType<"sm" | "lg" | "md">;
36
+ type: PropType<import("../../index.js").InputSize>;
37
37
  default: string;
38
- validator(value: "sm" | "lg" | "md"): boolean;
38
+ validator(value: import("../../index.js").InputSize): boolean;
39
39
  };
40
40
  errorMsg: {
41
41
  type: StringConstructor;
@@ -58,9 +58,9 @@ declare const _default: import("vue").DefineComponent<{
58
58
  textareaClasses(): string;
59
59
  }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
60
60
  size: {
61
- type: PropType<"sm" | "lg" | "md">;
61
+ type: PropType<import("../../index.js").InputSize>;
62
62
  default: string;
63
- validator(value: "sm" | "lg" | "md"): boolean;
63
+ validator(value: import("../../index.js").InputSize): boolean;
64
64
  };
65
65
  errorMsg: {
66
66
  type: StringConstructor;
@@ -81,7 +81,7 @@ declare const _default: import("vue").DefineComponent<{
81
81
  errorMsg: string;
82
82
  }, {}>, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
83
83
  modelValue: {
84
- type: PropType<string | number | null | undefined>;
84
+ type: PropType<number | string | null | undefined>;
85
85
  default: null;
86
86
  };
87
87
  label: {