@pequity/squirrel 1.0.20-beta.1 → 1.0.20-beta.3

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 (144) hide show
  1. package/dist/cjs/chunks/_plugin-vue_export-helper.js +9 -1
  2. package/dist/cjs/chunks/p-action-bar.js +60 -1
  3. package/dist/cjs/chunks/p-card.js +28 -1
  4. package/dist/cjs/chunks/p-checkbox.js +24 -1
  5. package/dist/cjs/chunks/p-dropdown-select.js +414 -1
  6. package/dist/cjs/chunks/p-input-percent.js +53 -1
  7. package/dist/cjs/chunks/p-pagination-info.js +66 -1
  8. package/dist/cjs/chunks/p-pagination.js +122 -1
  9. package/dist/cjs/chunks/p-ring-loader.js +81 -1
  10. package/dist/cjs/chunks/p-select-btn.js +97 -1
  11. package/dist/cjs/chunks/p-select.js +123 -1
  12. package/dist/cjs/chunks/p-table-loader.js +70 -1
  13. package/dist/cjs/chunks/p-tabs.js +52 -1
  14. package/dist/cjs/config.js +105 -1
  15. package/dist/cjs/currency.js +9 -1
  16. package/dist/cjs/dom.js +27 -1
  17. package/dist/cjs/index.js +976 -1
  18. package/dist/cjs/inputClassesMixin.js +50 -1
  19. package/dist/cjs/inputClassesShared.js +76 -1
  20. package/dist/cjs/listKeyboardNavigation.js +110 -1
  21. package/dist/cjs/number.js +9 -1
  22. package/dist/cjs/object.js +4 -1
  23. package/dist/cjs/p-action-bar.js +3 -1
  24. package/dist/cjs/p-alert.js +65 -1
  25. package/dist/cjs/p-avatar.js +71 -1
  26. package/dist/cjs/p-btn.js +358 -2
  27. package/dist/cjs/p-card.js +3 -1
  28. package/dist/cjs/p-checkbox.js +3 -1
  29. package/dist/cjs/p-chips.js +110 -1
  30. package/dist/cjs/p-close-btn.js +36 -1
  31. package/dist/cjs/p-date-picker.js +139 -1
  32. package/dist/cjs/p-drawer.js +253 -1
  33. package/dist/cjs/p-dropdown-select.js +3 -1
  34. package/dist/cjs/p-dropdown.js +138 -1
  35. package/dist/cjs/p-file-upload.js +21 -1
  36. package/dist/cjs/p-info-icon.js +35 -1
  37. package/dist/cjs/p-inline-date-picker.js +142 -1
  38. package/dist/cjs/p-input-number.js +146 -1
  39. package/dist/cjs/p-input-percent.js +3 -1
  40. package/dist/cjs/p-input-search.js +110 -1
  41. package/dist/cjs/p-input.js +89 -1
  42. package/dist/cjs/p-loading.js +38 -1
  43. package/dist/cjs/p-modal.js +369 -1
  44. package/dist/cjs/p-pagination-info.js +3 -1
  45. package/dist/cjs/p-pagination.js +3 -1
  46. package/dist/cjs/p-progress-bar.js +41 -1
  47. package/dist/cjs/p-ring-loader.js +3 -1
  48. package/dist/cjs/p-select-btn.js +3 -1
  49. package/dist/cjs/p-select-list.js +4 -1
  50. package/dist/cjs/p-select-pill.js +111 -1
  51. package/dist/cjs/p-select.js +3 -1
  52. package/dist/cjs/p-skeleton-loader.js +73 -1
  53. package/dist/cjs/p-table-filter-icon.js +20 -1
  54. package/dist/cjs/p-table-header-cell.js +75 -1
  55. package/dist/cjs/p-table-loader.js +3 -1
  56. package/dist/cjs/p-table-sort.js +8 -1
  57. package/dist/cjs/p-table-td.js +88 -1
  58. package/dist/cjs/p-table.js +12 -1
  59. package/dist/cjs/p-tabs.js +3 -1
  60. package/dist/cjs/p-textarea.js +73 -1
  61. package/dist/cjs/p-toggle.js +114 -1
  62. package/dist/cjs/pagination.js +29 -1
  63. package/dist/cjs/string.js +12 -1
  64. package/dist/cjs/tailwind.js +4353 -1
  65. package/dist/cjs/text.js +16 -1
  66. package/dist/cjs/useInputClasses.js +44 -1
  67. package/dist/cjs/usePLoading.js +35 -1
  68. package/dist/cjs/usePModal.js +21 -1
  69. package/dist/cjs/usePTableColResize.js +81 -1
  70. package/dist/cjs/usePTableRowVirtualizer.js +31 -1
  71. package/dist/cjs/useSelectList.js +256 -1
  72. package/dist/es/chunks/_plugin-vue_export-helper.js +7 -6
  73. package/dist/es/chunks/p-action-bar.js +45 -36
  74. package/dist/es/chunks/p-card.js +18 -14
  75. package/dist/es/chunks/p-checkbox.js +14 -11
  76. package/dist/es/chunks/p-dropdown-select.js +232 -183
  77. package/dist/es/chunks/p-input-percent.js +34 -25
  78. package/dist/es/chunks/p-pagination-info.js +30 -24
  79. package/dist/es/chunks/p-pagination.js +78 -48
  80. package/dist/es/chunks/p-ring-loader.js +63 -40
  81. package/dist/es/chunks/p-select-btn.js +80 -59
  82. package/dist/es/chunks/p-select.js +81 -54
  83. package/dist/es/chunks/p-table-loader.js +46 -32
  84. package/dist/es/chunks/p-tabs.js +35 -29
  85. package/dist/es/config.js +2 -2
  86. package/dist/es/currency.js +3 -3
  87. package/dist/es/dom.js +24 -12
  88. package/dist/es/index.js +703 -519
  89. package/dist/es/inputClassesMixin.js +20 -14
  90. package/dist/es/inputClassesShared.js +60 -45
  91. package/dist/es/listKeyboardNavigation.js +86 -36
  92. package/dist/es/number.js +7 -2
  93. package/dist/es/object.js +2 -2
  94. package/dist/es/p-action-bar.js +2 -2
  95. package/dist/es/p-alert.js +35 -30
  96. package/dist/es/p-avatar.js +30 -27
  97. package/dist/es/p-btn.js +209 -164
  98. package/dist/es/p-card.js +2 -2
  99. package/dist/es/p-checkbox.js +2 -2
  100. package/dist/es/p-chips.js +60 -40
  101. package/dist/es/p-close-btn.js +20 -16
  102. package/dist/es/p-date-picker.js +66 -58
  103. package/dist/es/p-drawer.js +108 -89
  104. package/dist/es/p-dropdown-select.js +2 -2
  105. package/dist/es/p-dropdown.js +52 -33
  106. package/dist/es/p-file-upload.js +17 -9
  107. package/dist/es/p-info-icon.js +21 -16
  108. package/dist/es/p-inline-date-picker.js +64 -53
  109. package/dist/es/p-input-number.js +84 -66
  110. package/dist/es/p-input-percent.js +2 -2
  111. package/dist/es/p-input-search.js +43 -41
  112. package/dist/es/p-input.js +51 -45
  113. package/dist/es/p-loading.js +31 -22
  114. package/dist/es/p-modal.js +261 -174
  115. package/dist/es/p-pagination-info.js +2 -2
  116. package/dist/es/p-pagination.js +2 -2
  117. package/dist/es/p-progress-bar.js +26 -23
  118. package/dist/es/p-ring-loader.js +2 -2
  119. package/dist/es/p-select-btn.js +2 -2
  120. package/dist/es/p-select-list.js +2 -2
  121. package/dist/es/p-select-pill.js +58 -41
  122. package/dist/es/p-select.js +2 -2
  123. package/dist/es/p-skeleton-loader.js +34 -29
  124. package/dist/es/p-table-filter-icon.js +11 -11
  125. package/dist/es/p-table-header-cell.js +38 -33
  126. package/dist/es/p-table-loader.js +2 -2
  127. package/dist/es/p-table-sort.js +2 -2
  128. package/dist/es/p-table-td.js +76 -29
  129. package/dist/es/p-table.js +10 -6
  130. package/dist/es/p-tabs.js +2 -2
  131. package/dist/es/p-textarea.js +36 -34
  132. package/dist/es/p-toggle.js +53 -48
  133. package/dist/es/pagination.js +25 -8
  134. package/dist/es/string.js +10 -2
  135. package/dist/es/tailwind.js +1660 -1101
  136. package/dist/es/text.js +13 -8
  137. package/dist/es/useInputClasses.js +38 -22
  138. package/dist/es/usePLoading.js +31 -15
  139. package/dist/es/usePModal.js +15 -12
  140. package/dist/es/usePTableColResize.js +71 -39
  141. package/dist/es/usePTableRowVirtualizer.js +24 -15
  142. package/dist/es/useSelectList.js +234 -121
  143. package/dist/style.css +2124 -1
  144. package/package.json +1 -1
@@ -1,9 +1,15 @@
1
- import { defineComponent as x, useAttrs as k, computed as u, openBlock as o, createElementBlock as i, normalizeClass as c, unref as s, normalizeStyle as B, renderSlot as M, toDisplayString as m, createCommentVNode as N, createElementVNode as p, mergeProps as z, Fragment as A, renderList as E, withDirectives as I, vShow as P } from "vue";
2
- import { INPUT_SIZES as T } from "../inputClassesShared.js";
3
- import { useInputClasses as w } from "../useInputClasses.js";
4
- const D = ["data-has-error"], O = ["value"], $ = ["value"], v = "___null_value___", L = /* @__PURE__ */ x({
5
- name: "PSelect",
6
- inheritAttrs: !1,
1
+ import { defineComponent, useAttrs, computed, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, renderSlot, toDisplayString, createCommentVNode, createElementVNode, mergeProps, Fragment, renderList, withDirectives, vShow } from "vue";
2
+ import { INPUT_SIZES } from "../inputClassesShared.js";
3
+ import { useInputClasses } from "../useInputClasses.js";
4
+ const _hoisted_1 = ["data-has-error"];
5
+ const _hoisted_2 = ["value"];
6
+ const _hoisted_3 = ["value"];
7
+ const nullValue = "___null_value___";
8
+ const _sfc_main = /* @__PURE__ */ defineComponent({
9
+ ...{
10
+ name: "PSelect",
11
+ inheritAttrs: false
12
+ },
7
13
  __name: "p-select",
8
14
  props: {
9
15
  modelValue: {
@@ -24,13 +30,13 @@ const D = ["data-has-error"], O = ["value"], $ = ["value"], v = "___null_value__
24
30
  },
25
31
  required: {
26
32
  type: Boolean,
27
- default: !1
33
+ default: false
28
34
  },
29
35
  size: {
30
36
  type: String,
31
37
  default: "md",
32
- validator(t) {
33
- return Object.keys(T).includes(t);
38
+ validator(value) {
39
+ return Object.keys(INPUT_SIZES).includes(value);
34
40
  }
35
41
  },
36
42
  itemText: {
@@ -43,55 +49,76 @@ const D = ["data-has-error"], O = ["value"], $ = ["value"], v = "___null_value__
43
49
  }
44
50
  },
45
51
  emits: ["update:modelValue"],
46
- setup(t, { emit: y }) {
47
- const d = y, l = t, n = k(), { labelClasses: f, selectClasses: g, errorMsgClasses: S } = w(l), V = u({
48
- get: () => l.modelValue === null ? v : l.modelValue,
49
- set: (e) => d("update:modelValue", e)
50
- }), b = u(() => {
51
- const { class: e, style: a, ...r } = n;
52
- return r;
53
- }), h = u(() => n.style), C = u(() => l.items.map((e) => ({
54
- value: e[l.itemValue] === null ? v : e[l.itemValue],
55
- text: e[l.itemText]
56
- }))), _ = (e) => {
57
- const a = e.target.value;
58
- if (a === v) {
59
- d("update:modelValue", null);
52
+ setup(__props, { emit: __emit }) {
53
+ const emit = __emit;
54
+ const props = __props;
55
+ const $attrs = useAttrs();
56
+ const { labelClasses, selectClasses, errorMsgClasses } = useInputClasses(props);
57
+ const innerValue = computed({
58
+ get: () => {
59
+ if (props.modelValue === null) {
60
+ return nullValue;
61
+ }
62
+ return props.modelValue;
63
+ },
64
+ set: (v) => emit("update:modelValue", v)
65
+ });
66
+ const attrs = computed(() => {
67
+ const { class: classes, style: style2, ...rest } = $attrs;
68
+ return rest;
69
+ });
70
+ const style = computed(() => $attrs.style);
71
+ const innerOptions = computed(() => {
72
+ return props.items.map((item) => {
73
+ return {
74
+ value: item[props.itemValue] === null ? nullValue : item[props.itemValue],
75
+ text: item[props.itemText]
76
+ };
77
+ });
78
+ });
79
+ const onChange = (e) => {
80
+ const value = e.target.value;
81
+ if (value === nullValue) {
82
+ emit("update:modelValue", null);
60
83
  return;
61
84
  }
62
- d("update:modelValue", ["true", "false"].includes(a) ? a === "true" : a);
85
+ emit("update:modelValue", ["true", "false"].includes(value) ? value === "true" : value);
86
+ };
87
+ return (_ctx, _cache) => {
88
+ return openBlock(), createElementBlock("div", {
89
+ class: normalizeClass([{ hidden: unref($attrs).hidden }, unref($attrs).class]),
90
+ "data-has-error": !!__props.errorMsg,
91
+ style: normalizeStyle(style.value)
92
+ }, [
93
+ renderSlot(_ctx.$slots, "label", {
94
+ label: __props.label,
95
+ labelClasses: unref(labelClasses)
96
+ }, () => [
97
+ __props.label ? (openBlock(), createElementBlock("label", {
98
+ key: 0,
99
+ class: normalizeClass(unref(labelClasses))
100
+ }, toDisplayString(__props.label), 3)) : createCommentVNode("", true)
101
+ ]),
102
+ createElementVNode("select", mergeProps({ class: unref(selectClasses) }, attrs.value, {
103
+ value: innerValue.value,
104
+ onChange
105
+ }), [
106
+ (openBlock(true), createElementBlock(Fragment, null, renderList(innerOptions.value, (o) => {
107
+ return openBlock(), createElementBlock("option", {
108
+ key: String(o.value),
109
+ value: o.value
110
+ }, toDisplayString(o.text), 9, _hoisted_3);
111
+ }), 128))
112
+ ], 16, _hoisted_2),
113
+ withDirectives(createElementVNode("div", {
114
+ class: normalizeClass(unref(errorMsgClasses))
115
+ }, toDisplayString(__props.errorMsg), 3), [
116
+ [vShow, __props.errorMsg]
117
+ ])
118
+ ], 14, _hoisted_1);
63
119
  };
64
- return (e, a) => (o(), i("div", {
65
- class: c([{ hidden: s(n).hidden }, s(n).class]),
66
- "data-has-error": !!t.errorMsg,
67
- style: B(h.value)
68
- }, [
69
- M(e.$slots, "label", {
70
- label: t.label,
71
- labelClasses: s(f)
72
- }, () => [
73
- t.label ? (o(), i("label", {
74
- key: 0,
75
- class: c(s(f))
76
- }, m(t.label), 3)) : N("", !0)
77
- ]),
78
- p("select", z({ class: s(g) }, b.value, {
79
- value: V.value,
80
- onChange: _
81
- }), [
82
- (o(!0), i(A, null, E(C.value, (r) => (o(), i("option", {
83
- key: String(r.value),
84
- value: r.value
85
- }, m(r.text), 9, $))), 128))
86
- ], 16, O),
87
- I(p("div", {
88
- class: c(s(S))
89
- }, m(t.errorMsg), 3), [
90
- [P, t.errorMsg]
91
- ])
92
- ], 14, D));
93
120
  }
94
121
  });
95
122
  export {
96
- L as _
123
+ _sfc_main as _
97
124
  };
@@ -1,7 +1,13 @@
1
- import { defineComponent as b, openBlock as e, createElementBlock as t, createElementVNode as l, Fragment as a, renderList as o, createVNode as n, normalizeClass as d } from "vue";
2
- import u from "../p-skeleton-loader.js";
3
- const m = { class: "block overflow-hidden border border-p-gray-30" }, i = { class: "mb-0 w-full bg-surface" }, f = { class: "relative border-b border-p-gray-30 px-4 py-2" }, p = { class: "skeleton-fade" }, N = /* @__PURE__ */ b({
4
- name: "PTableLoader",
1
+ import { defineComponent, openBlock, createElementBlock, createElementVNode, Fragment, renderList, createVNode, normalizeClass } from "vue";
2
+ import PSkeletonLoader from "../p-skeleton-loader.js";
3
+ const _hoisted_1 = { class: "block overflow-hidden border border-p-gray-30" };
4
+ const _hoisted_2 = { class: "mb-0 w-full bg-surface" };
5
+ const _hoisted_3 = { class: "relative border-b border-p-gray-30 px-4 py-2" };
6
+ const _hoisted_4 = { class: "skeleton-fade" };
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ ...{
9
+ name: "PTableLoader"
10
+ },
5
11
  __name: "p-table-loader",
6
12
  props: {
7
13
  rows: {
@@ -21,37 +27,45 @@ const m = { class: "block overflow-hidden border border-p-gray-30" }, i = { clas
21
27
  default: "h-5"
22
28
  }
23
29
  },
24
- setup(r) {
25
- return (y, h) => (e(), t("div", m, [
26
- l("table", i, [
27
- l("thead", null, [
28
- l("tr", null, [
29
- (e(!0), t(a, null, o(Number(r.columns), (s) => (e(), t("th", {
30
- key: s,
31
- class: "bg-surface p-0"
32
- }, [
33
- l("div", f, [
34
- n(u, { class: "h-5" })
35
- ])
36
- ]))), 128))
30
+ setup(__props) {
31
+ return (_ctx, _cache) => {
32
+ return openBlock(), createElementBlock("div", _hoisted_1, [
33
+ createElementVNode("table", _hoisted_2, [
34
+ createElementVNode("thead", null, [
35
+ createElementVNode("tr", null, [
36
+ (openBlock(true), createElementBlock(Fragment, null, renderList(Number(__props.columns), (col) => {
37
+ return openBlock(), createElementBlock("th", {
38
+ key: col,
39
+ class: "bg-surface p-0"
40
+ }, [
41
+ createElementVNode("div", _hoisted_3, [
42
+ createVNode(PSkeletonLoader, { class: "h-5" })
43
+ ])
44
+ ]);
45
+ }), 128))
46
+ ])
47
+ ]),
48
+ createElementVNode("tbody", _hoisted_4, [
49
+ (openBlock(true), createElementBlock(Fragment, null, renderList(Number(__props.rows), (i) => {
50
+ return openBlock(), createElementBlock("tr", { key: i }, [
51
+ (openBlock(true), createElementBlock(Fragment, null, renderList(Number(__props.columns), (col) => {
52
+ return openBlock(), createElementBlock("td", {
53
+ key: col,
54
+ class: normalizeClass([__props.tdClasses, "border-b border-p-blue-15"])
55
+ }, [
56
+ createVNode(PSkeletonLoader, {
57
+ class: normalizeClass(__props.tdSkeletonClasses)
58
+ }, null, 8, ["class"])
59
+ ], 2);
60
+ }), 128))
61
+ ]);
62
+ }), 128))
37
63
  ])
38
- ]),
39
- l("tbody", p, [
40
- (e(!0), t(a, null, o(Number(r.rows), (s) => (e(), t("tr", { key: s }, [
41
- (e(!0), t(a, null, o(Number(r.columns), (c) => (e(), t("td", {
42
- key: c,
43
- class: d([r.tdClasses, "border-b border-p-blue-15"])
44
- }, [
45
- n(u, {
46
- class: d(r.tdSkeletonClasses)
47
- }, null, 8, ["class"])
48
- ], 2))), 128))
49
- ]))), 128))
50
64
  ])
51
- ])
52
- ]));
65
+ ]);
66
+ };
53
67
  }
54
68
  });
55
69
  export {
56
- N as _
70
+ _sfc_main as _
57
71
  };
@@ -1,14 +1,16 @@
1
- import { defineComponent as c, openBlock as r, createElementBlock as i, normalizeStyle as a, Fragment as m, renderList as d, createBlock as o, resolveDynamicComponent as n, mergeProps as p, withCtx as u, createElementVNode as l, normalizeClass as y, createCommentVNode as b, toDisplayString as f } from "vue";
2
- const g = { class: "flex items-center gap-2" }, v = { key: 0 }, C = /* @__PURE__ */ c({
1
+ import { defineComponent, openBlock, createElementBlock, normalizeStyle, Fragment, renderList, createBlock, resolveDynamicComponent, mergeProps, withCtx, createElementVNode, normalizeClass, createCommentVNode, toDisplayString } from "vue";
2
+ const _hoisted_1 = { class: "flex items-center gap-2" };
3
+ const _hoisted_2 = { key: 0 };
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
3
5
  __name: "p-tabs",
4
6
  props: {
5
7
  tabs: {
6
8
  type: Array,
7
- required: !0
9
+ required: true
8
10
  },
9
11
  activeTab: {
10
12
  type: String,
11
- required: !0
13
+ required: true
12
14
  },
13
15
  tabsLeftPadding: {
14
16
  type: Number,
@@ -16,32 +18,36 @@ const g = { class: "flex items-center gap-2" }, v = { key: 0 }, C = /* @__PURE__
16
18
  }
17
19
  },
18
20
  emits: ["click:tab"],
19
- setup(t) {
20
- return (s, k) => (r(), i("div", {
21
- class: "flex gap-4 border-b border-p-gray-30 text-base font-semibold",
22
- style: a({ paddingLeft: `${t.tabsLeftPadding}px` })
23
- }, [
24
- (r(!0), i(m, null, d(t.tabs, (e) => (r(), o(n(e.to ? "RouterLink" : "div"), p({
25
- key: `tab-${e.name}`
26
- }, e.to ? { to: e.to } : {}, {
27
- class: [[t.activeTab === e.name ? "border-primary text-primary" : "border-transparent text-p-gray-40"], "group cursor-pointer border-b-2 pb-3 hover:border-primary hover:text-primary"],
28
- onClick: (x) => s.$emit("click:tab", e.name)
29
- }), {
30
- default: u(() => [
31
- l("div", g, [
32
- e.icon ? (r(), i("div", v, [
33
- (r(), o(n(e.icon), {
34
- class: y(["group-hover:fill-primary", [t.activeTab === e.name ? "fill-primary" : "fill-p-gray-40"]])
35
- }, null, 8, ["class"]))
36
- ])) : b("", !0),
37
- l("div", null, f(e.title), 1)
38
- ])
39
- ]),
40
- _: 2
41
- }, 1040, ["class", "onClick"]))), 128))
42
- ], 4));
21
+ setup(__props) {
22
+ return (_ctx, _cache) => {
23
+ return openBlock(), createElementBlock("div", {
24
+ class: "flex gap-4 border-b border-p-gray-30 text-base font-semibold",
25
+ style: normalizeStyle({ paddingLeft: `${__props.tabsLeftPadding}px` })
26
+ }, [
27
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabs, (tabData) => {
28
+ return openBlock(), createBlock(resolveDynamicComponent(tabData.to ? "RouterLink" : "div"), mergeProps({
29
+ key: `tab-${tabData.name}`
30
+ }, tabData.to ? { to: tabData.to } : {}, {
31
+ class: [[__props.activeTab === tabData.name ? "border-primary text-primary" : "border-transparent text-p-gray-40"], "group cursor-pointer border-b-2 pb-3 hover:border-primary hover:text-primary"],
32
+ onClick: ($event) => _ctx.$emit("click:tab", tabData.name)
33
+ }), {
34
+ default: withCtx(() => [
35
+ createElementVNode("div", _hoisted_1, [
36
+ tabData.icon ? (openBlock(), createElementBlock("div", _hoisted_2, [
37
+ (openBlock(), createBlock(resolveDynamicComponent(tabData.icon), {
38
+ class: normalizeClass(["group-hover:fill-primary", [__props.activeTab === tabData.name ? "fill-primary" : "fill-p-gray-40"]])
39
+ }, null, 8, ["class"]))
40
+ ])) : createCommentVNode("", true),
41
+ createElementVNode("div", null, toDisplayString(tabData.title), 1)
42
+ ])
43
+ ]),
44
+ _: 2
45
+ }, 1040, ["class", "onClick"]);
46
+ }), 128))
47
+ ], 4);
48
+ };
43
49
  }
44
50
  });
45
51
  export {
46
- C as _
52
+ _sfc_main as _
47
53
  };
package/dist/es/config.js CHANGED
@@ -1,4 +1,4 @@
1
- const r = {
1
+ const config = {
2
2
  content: ["./index.html", "./squirrel/**/*.{vue,js,ts,jsx,tsx,mdx}", "./src/**/*.{vue,js,ts,jsx,tsx,mdx}"],
3
3
  theme: {
4
4
  colors: {
@@ -101,5 +101,5 @@ const r = {
101
101
  }
102
102
  };
103
103
  export {
104
- r as config
104
+ config
105
105
  };
@@ -1,9 +1,9 @@
1
- const e = Object.freeze({
1
+ const CURRENCY_INPUT_DEFAULTS = Object.freeze({
2
2
  currency: null,
3
3
  precision: 0,
4
4
  locale: "en-US",
5
- allowNegative: !1
5
+ allowNegative: false
6
6
  });
7
7
  export {
8
- e as CURRENCY_INPUT_DEFAULTS
8
+ CURRENCY_INPUT_DEFAULTS
9
9
  };
package/dist/es/dom.js CHANGED
@@ -1,15 +1,27 @@
1
- const s = (t) => {
2
- var n;
3
- if (!(t instanceof Element))
1
+ const isVisible = (element) => {
2
+ var _a;
3
+ if (!(element instanceof Element)) {
4
4
  throw Error("You must provide a DOM element.");
5
- return !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length) && window.getComputedStyle(t).visibility !== "hidden" && window.getComputedStyle(t).display !== "none" && ((n = t.style) == null ? void 0 : n.transform.includes("translateY(-9999px)")) === !1;
6
- }, f = (t, n, o, r) => {
7
- const i = t.length;
8
- let e = n ? t.indexOf(n) : -1;
9
- return e === -1 ? !o && r ? t[i - 1] : t[0] : (e += o ? 1 : -1, r && (e = (e + i) % i), t[Math.max(0, Math.min(e, i - 1))]);
10
- }, a = (t) => typeof t == "object" && t !== null && "tagName" in t && t instanceof HTMLElement;
5
+ }
6
+ return !!(element.offsetWidth || element.offsetHeight || element.getClientRects().length) && window.getComputedStyle(element).visibility !== "hidden" && window.getComputedStyle(element).display !== "none" && ((_a = element.style) == null ? void 0 : _a.transform.includes("translateY(-9999px)")) === false;
7
+ };
8
+ const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {
9
+ const listLength = list.length;
10
+ let index = activeElement ? list.indexOf(activeElement) : -1;
11
+ if (index === -1) {
12
+ return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0];
13
+ }
14
+ index += shouldGetNext ? 1 : -1;
15
+ if (isCycleAllowed) {
16
+ index = (index + listLength) % listLength;
17
+ }
18
+ return list[Math.max(0, Math.min(index, listLength - 1))];
19
+ };
20
+ const isElement = (el) => {
21
+ return typeof el === "object" && el !== null && "tagName" in el && el instanceof HTMLElement;
22
+ };
11
23
  export {
12
- f as getNextActiveElement,
13
- a as isElement,
14
- s as isVisible
24
+ getNextActiveElement,
25
+ isElement,
26
+ isVisible
15
27
  };