@tagplus/components 5.2.19 → 5.3.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 (149) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
  2. package/dist/es/components.css +2391 -0
  3. package/dist/es/node_modules/@element-plus/icons-vue/dist/index.mjs +148 -0
  4. package/dist/es/node_modules/@popperjs/core/lib/enums.mjs +22 -0
  5. package/dist/es/node_modules/@vue/shared/dist/shared.esm-bundler.mjs +28 -0
  6. package/dist/es/node_modules/@vueuse/core/index.mjs +172 -0
  7. package/dist/es/node_modules/@vueuse/shared/index.mjs +68 -0
  8. package/dist/es/node_modules/element-plus/es/constants/size.mjs +4 -0
  9. package/dist/es/node_modules/element-plus/es/hooks/use-focus-controller/index.mjs +64 -0
  10. package/dist/es/node_modules/element-plus/es/hooks/use-id/index.mjs +30 -0
  11. package/dist/es/node_modules/element-plus/es/hooks/use-locale/index.mjs +29 -0
  12. package/dist/es/node_modules/element-plus/es/hooks/use-namespace/index.mjs +79 -0
  13. package/dist/es/node_modules/element-plus/es/hooks/use-prop/index.mjs +11 -0
  14. package/dist/es/node_modules/element-plus/es/hooks/use-size/index.mjs +20 -0
  15. package/dist/es/node_modules/element-plus/es/locale/lang/en.mjs +182 -0
  16. package/dist/es/node_modules/element-plus/es/utils/error.mjs +16 -0
  17. package/dist/es/node_modules/element-plus/es/utils/types.mjs +9 -0
  18. package/dist/es/node_modules/element-plus/es/utils/vue/props/runtime.mjs +42 -0
  19. package/dist/es/src/components/Autosuggest/Autosuggest.vue.mjs +446 -0
  20. package/dist/es/src/components/Autosuggest/Multisuggest.vue.mjs +17 -0
  21. package/dist/es/src/components/Autosuggest/autosuggest-props.mjs +204 -0
  22. package/dist/es/src/components/Autosuggest/core.mjs +56 -0
  23. package/dist/es/src/components/Autosuggest/multisuggest-props.mjs +11 -0
  24. package/dist/es/src/components/Autosuggest/option.vue.mjs +118 -0
  25. package/dist/es/src/components/Autosuggest/select-dropdown.vue.mjs +62 -0
  26. package/dist/es/src/components/Autosuggest/useOption.mjs +93 -0
  27. package/dist/es/src/components/Autosuggest/useSelect.mjs +803 -0
  28. package/dist/es/src/components/Inline/Inline.vue.mjs +125 -0
  29. package/dist/es/src/components/Inline/index.mjs +4 -0
  30. package/dist/es/src/components/InputNumber/InputNumber.vue.mjs +360 -0
  31. package/dist/es/src/components/InputNumber/index.mjs +4 -0
  32. package/dist/es/src/components/InputNumber/input-number.mjs +128 -0
  33. package/dist/es/src/components/Loader/Loader.vue.mjs +59 -0
  34. package/dist/es/src/components/Loader/index.mjs +4 -0
  35. package/dist/es/src/components/Money/Money.vue.mjs +72 -0
  36. package/dist/es/src/components/Money/index.mjs +4 -0
  37. package/dist/es/src/components/Multisuggest/index.mjs +4 -0
  38. package/dist/es/src/components/OptionsList/OptionsList.vue.mjs +28 -0
  39. package/dist/es/src/components/OptionsList/index.mjs +4 -0
  40. package/dist/es/src/components/OptionsListItem/OptionsListItem.vue.mjs +96 -0
  41. package/dist/es/src/components/OptionsListItem/index.mjs +4 -0
  42. package/dist/es/src/components/Percent/Percent.vue.mjs +73 -0
  43. package/dist/es/src/components/Percent/index.mjs +4 -0
  44. package/dist/es/src/components/Skeleton/Skeleton.vue.mjs +79 -0
  45. package/dist/es/src/components/Skeleton/index.mjs +4 -0
  46. package/dist/es/src/components/Step/Step.vue.mjs +206 -0
  47. package/dist/es/src/components/Step/index.mjs +4 -0
  48. package/dist/es/src/components/Steps/Steps.vue.mjs +15 -0
  49. package/dist/es/src/components/Steps/index.mjs +4 -0
  50. package/dist/es/src/components/Tip/Tip.vue.mjs +160 -0
  51. package/dist/es/src/components/Tip/index.mjs +4 -0
  52. package/dist/es/src/components/index.mjs +32 -0
  53. package/dist/es/src/locale/i18nCreator.mjs +93 -0
  54. package/dist/es/src/locale/lang/pt-br.mjs +21 -0
  55. package/dist/es/src/main.mjs +17 -0
  56. package/dist/es/src/mixins/floatFormatter.mjs +42 -0
  57. package/dist/es/src/plugins/currency.mjs +69 -0
  58. package/dist/es/src/utils/constants.mjs +6 -0
  59. package/dist/es/src/utils/error.mjs +22 -0
  60. package/dist/es/src/utils/i18n.mjs +4 -0
  61. package/dist/es/src/utils/icon.mjs +9 -0
  62. package/dist/es/src/utils/index.mjs +11 -0
  63. package/dist/es/src/utils/runtime.mjs +50 -0
  64. package/dist/es/src/utils/scroll.mjs +28 -0
  65. package/dist/es/src/utils/strings.mjs +4 -0
  66. package/dist/es/src/utils/types.mjs +9 -0
  67. package/dist/es/src/utils/use-derived-namespace.mjs +15 -0
  68. package/dist/es/src/utils/use-form-common-props.mjs +25 -0
  69. package/dist/es/src/utils/use-form-item.mjs +61 -0
  70. package/dist/es/src/utils/use-id.mjs +35 -0
  71. package/dist/es/src/utils/use-input.mjs +31 -0
  72. package/dist/lib/_virtual/_plugin-vue_export-helper.js +10 -0
  73. package/dist/lib/components.css +2391 -0
  74. package/dist/lib/node_modules/@element-plus/icons-vue/dist/index.js +148 -0
  75. package/dist/lib/node_modules/@popperjs/core/lib/enums.js +22 -0
  76. package/dist/lib/node_modules/@vue/shared/dist/shared.esm-bundler.js +28 -0
  77. package/dist/lib/node_modules/@vueuse/core/index.js +170 -0
  78. package/dist/lib/node_modules/@vueuse/shared/index.js +68 -0
  79. package/dist/lib/node_modules/element-plus/es/constants/size.js +4 -0
  80. package/dist/lib/node_modules/element-plus/es/hooks/use-focus-controller/index.js +64 -0
  81. package/dist/lib/node_modules/element-plus/es/hooks/use-id/index.js +30 -0
  82. package/dist/lib/node_modules/element-plus/es/hooks/use-locale/index.js +29 -0
  83. package/dist/lib/node_modules/element-plus/es/hooks/use-namespace/index.js +79 -0
  84. package/dist/lib/node_modules/element-plus/es/hooks/use-prop/index.js +11 -0
  85. package/dist/lib/node_modules/element-plus/es/hooks/use-size/index.js +20 -0
  86. package/dist/lib/node_modules/element-plus/es/locale/lang/en.js +182 -0
  87. package/dist/lib/node_modules/element-plus/es/utils/error.js +16 -0
  88. package/dist/lib/node_modules/element-plus/es/utils/types.js +9 -0
  89. package/dist/lib/node_modules/element-plus/es/utils/vue/props/runtime.js +42 -0
  90. package/dist/lib/src/components/Autosuggest/Autosuggest.vue.js +446 -0
  91. package/dist/lib/src/components/Autosuggest/Multisuggest.vue.js +17 -0
  92. package/dist/lib/src/components/Autosuggest/autosuggest-props.js +204 -0
  93. package/dist/lib/src/components/Autosuggest/core.js +56 -0
  94. package/dist/lib/src/components/Autosuggest/multisuggest-props.js +11 -0
  95. package/dist/lib/src/components/Autosuggest/option.vue.js +118 -0
  96. package/dist/lib/src/components/Autosuggest/select-dropdown.vue.js +62 -0
  97. package/dist/lib/src/components/Autosuggest/useOption.js +93 -0
  98. package/dist/lib/src/components/Autosuggest/useSelect.js +803 -0
  99. package/dist/lib/src/components/Inline/Inline.vue.js +125 -0
  100. package/dist/lib/src/components/Inline/index.js +4 -0
  101. package/dist/lib/src/components/InputNumber/InputNumber.vue.js +360 -0
  102. package/dist/lib/src/components/InputNumber/index.js +4 -0
  103. package/dist/lib/src/components/InputNumber/input-number.js +128 -0
  104. package/dist/lib/src/components/Loader/Loader.vue.js +59 -0
  105. package/dist/lib/src/components/Loader/index.js +4 -0
  106. package/dist/lib/src/components/Money/Money.vue.js +72 -0
  107. package/dist/lib/src/components/Money/index.js +4 -0
  108. package/dist/lib/src/components/Multisuggest/index.js +4 -0
  109. package/dist/lib/src/components/OptionsList/OptionsList.vue.js +28 -0
  110. package/dist/lib/src/components/OptionsList/index.js +4 -0
  111. package/dist/lib/src/components/OptionsListItem/OptionsListItem.vue.js +96 -0
  112. package/dist/lib/src/components/OptionsListItem/index.js +4 -0
  113. package/dist/lib/src/components/Percent/Percent.vue.js +73 -0
  114. package/dist/lib/src/components/Percent/index.js +4 -0
  115. package/dist/lib/src/components/Skeleton/Skeleton.vue.js +79 -0
  116. package/dist/lib/src/components/Skeleton/index.js +4 -0
  117. package/dist/lib/src/components/Step/Step.vue.js +206 -0
  118. package/dist/lib/src/components/Step/index.js +4 -0
  119. package/dist/lib/src/components/Steps/Steps.vue.js +15 -0
  120. package/dist/lib/src/components/Steps/index.js +4 -0
  121. package/dist/lib/src/components/Tip/Tip.vue.js +160 -0
  122. package/dist/lib/src/components/Tip/index.js +4 -0
  123. package/dist/lib/src/components/index.js +32 -0
  124. package/dist/lib/src/locale/i18nCreator.js +93 -0
  125. package/dist/lib/src/locale/lang/pt-br.js +21 -0
  126. package/dist/lib/src/main.js +17 -0
  127. package/dist/lib/src/mixins/floatFormatter.js +42 -0
  128. package/dist/lib/src/plugins/currency.js +69 -0
  129. package/dist/lib/src/utils/constants.js +6 -0
  130. package/dist/lib/src/utils/error.js +22 -0
  131. package/dist/lib/src/utils/i18n.js +4 -0
  132. package/dist/lib/src/utils/icon.js +9 -0
  133. package/dist/lib/src/utils/index.js +14 -0
  134. package/dist/lib/src/utils/runtime.js +50 -0
  135. package/dist/lib/src/utils/scroll.js +28 -0
  136. package/dist/lib/src/utils/strings.js +4 -0
  137. package/dist/lib/src/utils/types.js +12 -0
  138. package/dist/lib/src/utils/use-derived-namespace.js +15 -0
  139. package/dist/lib/src/utils/use-form-common-props.js +25 -0
  140. package/dist/lib/src/utils/use-form-item.js +61 -0
  141. package/dist/lib/src/utils/use-id.js +35 -0
  142. package/dist/lib/src/utils/use-input.js +31 -0
  143. package/package.json +19 -17
  144. package/dist/main.bundle.js +0 -2
  145. package/dist/main.bundle.js.LICENSE.txt +0 -15
  146. package/dist/main.css +0 -11
  147. package/src/locale/i18nCreator.js +0 -170
  148. package/src/locale/lang/en.js +0 -35
  149. package/src/locale/lang/pt-br.js +0 -35
@@ -0,0 +1,148 @@
1
+ import { defineComponent, createElementBlock, openBlock, createElementVNode } from "vue";
2
+ /*! Element Plus Icons Vue v2.3.1 */
3
+ var arrow_down_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
4
+ name: "ArrowDown",
5
+ __name: "arrow-down",
6
+ setup(__props) {
7
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
8
+ xmlns: "http://www.w3.org/2000/svg",
9
+ viewBox: "0 0 1024 1024"
10
+ }, [
11
+ createElementVNode("path", {
12
+ fill: "currentColor",
13
+ d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"
14
+ })
15
+ ]));
16
+ }
17
+ });
18
+ var arrow_down_default = arrow_down_vue_vue_type_script_setup_true_lang_default;
19
+ var arrow_up_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
20
+ name: "ArrowUp",
21
+ __name: "arrow-up",
22
+ setup(__props) {
23
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
24
+ xmlns: "http://www.w3.org/2000/svg",
25
+ viewBox: "0 0 1024 1024"
26
+ }, [
27
+ createElementVNode("path", {
28
+ fill: "currentColor",
29
+ d: "m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"
30
+ })
31
+ ]));
32
+ }
33
+ });
34
+ var arrow_up_default = arrow_up_vue_vue_type_script_setup_true_lang_default;
35
+ var check_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
36
+ name: "Check",
37
+ __name: "check",
38
+ setup(__props) {
39
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
40
+ xmlns: "http://www.w3.org/2000/svg",
41
+ viewBox: "0 0 1024 1024"
42
+ }, [
43
+ createElementVNode("path", {
44
+ fill: "currentColor",
45
+ d: "M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"
46
+ })
47
+ ]));
48
+ }
49
+ });
50
+ var check_default = check_vue_vue_type_script_setup_true_lang_default;
51
+ var circle_check_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
52
+ name: "CircleCheck",
53
+ __name: "circle-check",
54
+ setup(__props) {
55
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
56
+ xmlns: "http://www.w3.org/2000/svg",
57
+ viewBox: "0 0 1024 1024"
58
+ }, [
59
+ createElementVNode("path", {
60
+ fill: "currentColor",
61
+ d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
62
+ }),
63
+ createElementVNode("path", {
64
+ fill: "currentColor",
65
+ d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
66
+ })
67
+ ]));
68
+ }
69
+ });
70
+ var circle_check_default = circle_check_vue_vue_type_script_setup_true_lang_default;
71
+ var circle_close_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
72
+ name: "CircleClose",
73
+ __name: "circle-close",
74
+ setup(__props) {
75
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
76
+ xmlns: "http://www.w3.org/2000/svg",
77
+ viewBox: "0 0 1024 1024"
78
+ }, [
79
+ createElementVNode("path", {
80
+ fill: "currentColor",
81
+ d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"
82
+ }),
83
+ createElementVNode("path", {
84
+ fill: "currentColor",
85
+ d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
86
+ })
87
+ ]));
88
+ }
89
+ });
90
+ var circle_close_default = circle_close_vue_vue_type_script_setup_true_lang_default;
91
+ var loading_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
92
+ name: "Loading",
93
+ __name: "loading",
94
+ setup(__props) {
95
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
96
+ xmlns: "http://www.w3.org/2000/svg",
97
+ viewBox: "0 0 1024 1024"
98
+ }, [
99
+ createElementVNode("path", {
100
+ fill: "currentColor",
101
+ d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
102
+ })
103
+ ]));
104
+ }
105
+ });
106
+ var loading_default = loading_vue_vue_type_script_setup_true_lang_default;
107
+ var minus_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
108
+ name: "Minus",
109
+ __name: "minus",
110
+ setup(__props) {
111
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
112
+ xmlns: "http://www.w3.org/2000/svg",
113
+ viewBox: "0 0 1024 1024"
114
+ }, [
115
+ createElementVNode("path", {
116
+ fill: "currentColor",
117
+ d: "M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"
118
+ })
119
+ ]));
120
+ }
121
+ });
122
+ var minus_default = minus_vue_vue_type_script_setup_true_lang_default;
123
+ var plus_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
124
+ name: "Plus",
125
+ __name: "plus",
126
+ setup(__props) {
127
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
128
+ xmlns: "http://www.w3.org/2000/svg",
129
+ viewBox: "0 0 1024 1024"
130
+ }, [
131
+ createElementVNode("path", {
132
+ fill: "currentColor",
133
+ d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
134
+ })
135
+ ]));
136
+ }
137
+ });
138
+ var plus_default = plus_vue_vue_type_script_setup_true_lang_default;
139
+ export {
140
+ arrow_down_default as ArrowDown,
141
+ arrow_up_default as ArrowUp,
142
+ check_default as Check,
143
+ circle_check_default as CircleCheck,
144
+ circle_close_default as CircleClose,
145
+ loading_default as Loading,
146
+ minus_default as Minus,
147
+ plus_default as Plus
148
+ };
@@ -0,0 +1,22 @@
1
+ var top = "top";
2
+ var bottom = "bottom";
3
+ var right = "right";
4
+ var left = "left";
5
+ var auto = "auto";
6
+ var basePlacements = [top, bottom, right, left];
7
+ var start = "start";
8
+ var end = "end";
9
+ var placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) {
10
+ return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
11
+ }, []);
12
+ export {
13
+ auto,
14
+ basePlacements,
15
+ bottom,
16
+ end,
17
+ left,
18
+ placements,
19
+ right,
20
+ start,
21
+ top
22
+ };
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @vue/shared v3.5.13
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/
6
+ !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
7
+ !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
8
+ const hasOwnProperty = Object.prototype.hasOwnProperty;
9
+ const hasOwn = (val, key) => hasOwnProperty.call(val, key);
10
+ const isArray = Array.isArray;
11
+ const isFunction = (val) => typeof val === "function";
12
+ const isString = (val) => typeof val === "string";
13
+ const isObject = (val) => val !== null && typeof val === "object";
14
+ const objectToString = Object.prototype.toString;
15
+ const toTypeString = (value) => objectToString.call(value);
16
+ const toRawType = (value) => {
17
+ return toTypeString(value).slice(8, -1);
18
+ };
19
+ export {
20
+ hasOwn,
21
+ isArray,
22
+ isFunction,
23
+ isObject,
24
+ isString,
25
+ objectToString,
26
+ toRawType,
27
+ toTypeString
28
+ };
@@ -0,0 +1,172 @@
1
+ import { tryOnScopeDispose, isClient, tryOnMounted, resolveUnref, isString, noop, identity } from "../shared/index.mjs";
2
+ import { computedEager, computedEager as computedEager2 } from "../shared/index.mjs";
3
+ import { watch, ref } from "vue";
4
+ function unrefElement(elRef) {
5
+ var _a;
6
+ const plain = resolveUnref(elRef);
7
+ return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
8
+ }
9
+ const defaultWindow = isClient ? window : void 0;
10
+ function useEventListener(...args) {
11
+ let target;
12
+ let events;
13
+ let listeners;
14
+ let options;
15
+ if (isString(args[0]) || Array.isArray(args[0])) {
16
+ [events, listeners, options] = args;
17
+ target = defaultWindow;
18
+ } else {
19
+ [target, events, listeners, options] = args;
20
+ }
21
+ if (!target)
22
+ return noop;
23
+ if (!Array.isArray(events))
24
+ events = [events];
25
+ if (!Array.isArray(listeners))
26
+ listeners = [listeners];
27
+ const cleanups = [];
28
+ const cleanup = () => {
29
+ cleanups.forEach((fn) => fn());
30
+ cleanups.length = 0;
31
+ };
32
+ const register = (el, event, listener, options2) => {
33
+ el.addEventListener(event, listener, options2);
34
+ return () => el.removeEventListener(event, listener, options2);
35
+ };
36
+ const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {
37
+ cleanup();
38
+ if (!el)
39
+ return;
40
+ cleanups.push(...events.flatMap((event) => {
41
+ return listeners.map((listener) => register(el, event, listener, options2));
42
+ }));
43
+ }, { immediate: true, flush: "post" });
44
+ const stop = () => {
45
+ stopWatch();
46
+ cleanup();
47
+ };
48
+ tryOnScopeDispose(stop);
49
+ return stop;
50
+ }
51
+ function useSupported(callback, sync = false) {
52
+ const isSupported = ref();
53
+ const update = () => isSupported.value = Boolean(callback());
54
+ update();
55
+ tryOnMounted(update, sync);
56
+ return isSupported;
57
+ }
58
+ const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
59
+ const globalKey = "__vueuse_ssr_handlers__";
60
+ _global[globalKey] = _global[globalKey] || {};
61
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
62
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
63
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
64
+ var __objRest$2 = (source, exclude) => {
65
+ var target = {};
66
+ for (var prop in source)
67
+ if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
68
+ target[prop] = source[prop];
69
+ if (source != null && __getOwnPropSymbols$g)
70
+ for (var prop of __getOwnPropSymbols$g(source)) {
71
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
72
+ target[prop] = source[prop];
73
+ }
74
+ return target;
75
+ };
76
+ function useResizeObserver(target, callback, options = {}) {
77
+ const _a = options, { window: window2 = defaultWindow } = _a, observerOptions = __objRest$2(_a, ["window"]);
78
+ let observer;
79
+ const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
80
+ const cleanup = () => {
81
+ if (observer) {
82
+ observer.disconnect();
83
+ observer = void 0;
84
+ }
85
+ };
86
+ const stopWatch = watch(() => unrefElement(target), (el) => {
87
+ cleanup();
88
+ if (isSupported.value && window2 && el) {
89
+ observer = new ResizeObserver(callback);
90
+ observer.observe(el, observerOptions);
91
+ }
92
+ }, { immediate: true, flush: "post" });
93
+ const stop = () => {
94
+ cleanup();
95
+ stopWatch();
96
+ };
97
+ tryOnScopeDispose(stop);
98
+ return {
99
+ isSupported,
100
+ stop
101
+ };
102
+ }
103
+ var SwipeDirection;
104
+ (function(SwipeDirection2) {
105
+ SwipeDirection2["UP"] = "UP";
106
+ SwipeDirection2["RIGHT"] = "RIGHT";
107
+ SwipeDirection2["DOWN"] = "DOWN";
108
+ SwipeDirection2["LEFT"] = "LEFT";
109
+ SwipeDirection2["NONE"] = "NONE";
110
+ })(SwipeDirection || (SwipeDirection = {}));
111
+ var __defProp = Object.defineProperty;
112
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
113
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
114
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
115
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
116
+ var __spreadValues = (a, b) => {
117
+ for (var prop in b || (b = {}))
118
+ if (__hasOwnProp.call(b, prop))
119
+ __defNormalProp(a, prop, b[prop]);
120
+ if (__getOwnPropSymbols)
121
+ for (var prop of __getOwnPropSymbols(b)) {
122
+ if (__propIsEnum.call(b, prop))
123
+ __defNormalProp(a, prop, b[prop]);
124
+ }
125
+ return a;
126
+ };
127
+ const _TransitionPresets = {
128
+ easeInSine: [0.12, 0, 0.39, 0],
129
+ easeOutSine: [0.61, 1, 0.88, 1],
130
+ easeInOutSine: [0.37, 0, 0.63, 1],
131
+ easeInQuad: [0.11, 0, 0.5, 0],
132
+ easeOutQuad: [0.5, 1, 0.89, 1],
133
+ easeInOutQuad: [0.45, 0, 0.55, 1],
134
+ easeInCubic: [0.32, 0, 0.67, 0],
135
+ easeOutCubic: [0.33, 1, 0.68, 1],
136
+ easeInOutCubic: [0.65, 0, 0.35, 1],
137
+ easeInQuart: [0.5, 0, 0.75, 0],
138
+ easeOutQuart: [0.25, 1, 0.5, 1],
139
+ easeInOutQuart: [0.76, 0, 0.24, 1],
140
+ easeInQuint: [0.64, 0, 0.78, 0],
141
+ easeOutQuint: [0.22, 1, 0.36, 1],
142
+ easeInOutQuint: [0.83, 0, 0.17, 1],
143
+ easeInExpo: [0.7, 0, 0.84, 0],
144
+ easeOutExpo: [0.16, 1, 0.3, 1],
145
+ easeInOutExpo: [0.87, 0, 0.13, 1],
146
+ easeInCirc: [0.55, 0, 1, 0.45],
147
+ easeOutCirc: [0, 0.55, 0.45, 1],
148
+ easeInOutCirc: [0.85, 0, 0.15, 1],
149
+ easeInBack: [0.36, 0, 0.66, -0.56],
150
+ easeOutBack: [0.34, 1.56, 0.64, 1],
151
+ easeInOutBack: [0.68, -0.6, 0.32, 1.6]
152
+ };
153
+ __spreadValues({
154
+ linear: identity
155
+ }, _TransitionPresets);
156
+ export {
157
+ SwipeDirection,
158
+ computedEager,
159
+ defaultWindow,
160
+ computedEager2 as eagerComputed,
161
+ identity,
162
+ isClient,
163
+ isString,
164
+ noop,
165
+ resolveUnref,
166
+ tryOnMounted,
167
+ tryOnScopeDispose,
168
+ unrefElement,
169
+ useEventListener,
170
+ useResizeObserver,
171
+ useSupported
172
+ };
@@ -0,0 +1,68 @@
1
+ import { getCurrentScope, onScopeDispose, getCurrentInstance, onMounted, nextTick, unref, shallowRef, watchEffect, readonly } from "vue";
2
+ var __defProp$9 = Object.defineProperty;
3
+ var __defProps$6 = Object.defineProperties;
4
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
5
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
6
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
7
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
8
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __spreadValues$9 = (a, b) => {
10
+ for (var prop in b || (b = {}))
11
+ if (__hasOwnProp$b.call(b, prop))
12
+ __defNormalProp$9(a, prop, b[prop]);
13
+ if (__getOwnPropSymbols$b)
14
+ for (var prop of __getOwnPropSymbols$b(b)) {
15
+ if (__propIsEnum$b.call(b, prop))
16
+ __defNormalProp$9(a, prop, b[prop]);
17
+ }
18
+ return a;
19
+ };
20
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
21
+ function computedEager(fn, options) {
22
+ var _a2;
23
+ const result = shallowRef();
24
+ watchEffect(() => {
25
+ result.value = fn();
26
+ }, __spreadProps$6(__spreadValues$9({}, options), {
27
+ flush: (_a2 = void 0) != null ? _a2 : "sync"
28
+ }));
29
+ return readonly(result);
30
+ }
31
+ var _a;
32
+ const isClient = typeof window !== "undefined";
33
+ const isString = (val) => typeof val === "string";
34
+ const noop = () => {
35
+ };
36
+ isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
37
+ function resolveUnref(r) {
38
+ return typeof r === "function" ? r() : unref(r);
39
+ }
40
+ function identity(arg) {
41
+ return arg;
42
+ }
43
+ function tryOnScopeDispose(fn) {
44
+ if (getCurrentScope()) {
45
+ onScopeDispose(fn);
46
+ return true;
47
+ }
48
+ return false;
49
+ }
50
+ function tryOnMounted(fn, sync = true) {
51
+ if (getCurrentInstance())
52
+ onMounted(fn);
53
+ else if (sync)
54
+ fn();
55
+ else
56
+ nextTick(fn);
57
+ }
58
+ export {
59
+ computedEager,
60
+ computedEager as eagerComputed,
61
+ identity,
62
+ isClient,
63
+ isString,
64
+ noop,
65
+ resolveUnref,
66
+ tryOnMounted,
67
+ tryOnScopeDispose
68
+ };
@@ -0,0 +1,4 @@
1
+ const componentSizes = ["", "default", "small", "large"];
2
+ export {
3
+ componentSizes
4
+ };
@@ -0,0 +1,64 @@
1
+ import { getCurrentInstance, shallowRef, ref, watch, onMounted } from "vue";
2
+ import { useEventListener } from "../../../../@vueuse/core/index.mjs";
3
+ import { isElement } from "../../utils/types.mjs";
4
+ import { isFunction } from "../../../../@vue/shared/dist/shared.esm-bundler.mjs";
5
+ function useFocusController(target, {
6
+ beforeFocus,
7
+ afterFocus,
8
+ beforeBlur,
9
+ afterBlur
10
+ } = {}) {
11
+ const instance = getCurrentInstance();
12
+ const { emit } = instance;
13
+ const wrapperRef = shallowRef();
14
+ const isFocused = ref(false);
15
+ const handleFocus = (event) => {
16
+ const cancelFocus = isFunction(beforeFocus) ? beforeFocus(event) : false;
17
+ if (cancelFocus || isFocused.value)
18
+ return;
19
+ isFocused.value = true;
20
+ emit("focus", event);
21
+ afterFocus == null ? void 0 : afterFocus();
22
+ };
23
+ const handleBlur = (event) => {
24
+ var _a;
25
+ const cancelBlur = isFunction(beforeBlur) ? beforeBlur(event) : false;
26
+ if (cancelBlur || event.relatedTarget && ((_a = wrapperRef.value) == null ? void 0 : _a.contains(event.relatedTarget)))
27
+ return;
28
+ isFocused.value = false;
29
+ emit("blur", event);
30
+ afterBlur == null ? void 0 : afterBlur();
31
+ };
32
+ const handleClick = () => {
33
+ var _a, _b;
34
+ if (((_a = wrapperRef.value) == null ? void 0 : _a.contains(document.activeElement)) && wrapperRef.value !== document.activeElement)
35
+ return;
36
+ (_b = target.value) == null ? void 0 : _b.focus();
37
+ };
38
+ watch(wrapperRef, (el) => {
39
+ if (el) {
40
+ el.setAttribute("tabindex", "-1");
41
+ }
42
+ });
43
+ useEventListener(wrapperRef, "focus", handleFocus, true);
44
+ useEventListener(wrapperRef, "blur", handleBlur, true);
45
+ useEventListener(wrapperRef, "click", handleClick, true);
46
+ if (process.env.NODE_ENV === "test") {
47
+ onMounted(() => {
48
+ const targetEl = isElement(target.value) ? target.value : document.querySelector("input,textarea");
49
+ if (targetEl) {
50
+ useEventListener(targetEl, "focus", handleFocus, true);
51
+ useEventListener(targetEl, "blur", handleBlur, true);
52
+ }
53
+ });
54
+ }
55
+ return {
56
+ isFocused,
57
+ wrapperRef,
58
+ handleFocus,
59
+ handleBlur
60
+ };
61
+ }
62
+ export {
63
+ useFocusController
64
+ };
@@ -0,0 +1,30 @@
1
+ import { inject, getCurrentInstance, unref } from "vue";
2
+ import { useGetDerivedNamespace } from "../use-namespace/index.mjs";
3
+ import { debugWarn } from "../../utils/error.mjs";
4
+ import { isClient, computedEager } from "../../../../@vueuse/shared/index.mjs";
5
+ const defaultIdInjection = {
6
+ prefix: Math.floor(Math.random() * 1e4),
7
+ current: 0
8
+ };
9
+ const ID_INJECTION_KEY = Symbol("elIdInjection");
10
+ const useIdInjection = () => {
11
+ return getCurrentInstance() ? inject(ID_INJECTION_KEY, defaultIdInjection) : defaultIdInjection;
12
+ };
13
+ const useId = (deterministicId) => {
14
+ const idInjection = useIdInjection();
15
+ if (!isClient && idInjection === defaultIdInjection) {
16
+ debugWarn("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
17
+ usage: app.provide(ID_INJECTION_KEY, {
18
+ prefix: number,
19
+ current: number,
20
+ })`);
21
+ }
22
+ const namespace = useGetDerivedNamespace();
23
+ const idRef = computedEager(() => unref(deterministicId) || `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}`);
24
+ return idRef;
25
+ };
26
+ export {
27
+ ID_INJECTION_KEY,
28
+ useId,
29
+ useIdInjection
30
+ };
@@ -0,0 +1,29 @@
1
+ import { inject, ref, computed, unref, isRef } from "vue";
2
+ import { get } from "lodash-es";
3
+ import English from "../../locale/lang/en.mjs";
4
+ const buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
5
+ const translate = (path, option, locale) => get(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => {
6
+ var _a;
7
+ return `${(_a = option == null ? void 0 : option[key]) != null ? _a : `{${key}}`}`;
8
+ });
9
+ const buildLocaleContext = (locale) => {
10
+ const lang = computed(() => unref(locale).name);
11
+ const localeRef = isRef(locale) ? locale : ref(locale);
12
+ return {
13
+ lang,
14
+ locale: localeRef,
15
+ t: buildTranslator(locale)
16
+ };
17
+ };
18
+ const localeContextKey = Symbol("localeContextKey");
19
+ const useLocale = (localeOverrides) => {
20
+ const locale = inject(localeContextKey, ref());
21
+ return buildLocaleContext(computed(() => locale.value || English));
22
+ };
23
+ export {
24
+ buildLocaleContext,
25
+ buildTranslator,
26
+ localeContextKey,
27
+ translate,
28
+ useLocale
29
+ };
@@ -0,0 +1,79 @@
1
+ import { getCurrentInstance, inject, ref, computed, unref } from "vue";
2
+ const defaultNamespace = "el";
3
+ const statePrefix = "is-";
4
+ const _bem = (namespace, block, blockSuffix, element, modifier) => {
5
+ let cls = `${namespace}-${block}`;
6
+ if (blockSuffix) {
7
+ cls += `-${blockSuffix}`;
8
+ }
9
+ if (element) {
10
+ cls += `__${element}`;
11
+ }
12
+ if (modifier) {
13
+ cls += `--${modifier}`;
14
+ }
15
+ return cls;
16
+ };
17
+ const namespaceContextKey = Symbol("namespaceContextKey");
18
+ const useGetDerivedNamespace = (namespaceOverrides) => {
19
+ const derivedNamespace = getCurrentInstance() ? inject(namespaceContextKey, ref(defaultNamespace)) : ref(defaultNamespace);
20
+ const namespace = computed(() => {
21
+ return unref(derivedNamespace) || defaultNamespace;
22
+ });
23
+ return namespace;
24
+ };
25
+ const useNamespace = (block, namespaceOverrides) => {
26
+ const namespace = useGetDerivedNamespace();
27
+ const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
28
+ const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
29
+ const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
30
+ const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
31
+ const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
32
+ const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
33
+ const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
34
+ const is = (name, ...args) => {
35
+ const state = args.length >= 1 ? args[0] : true;
36
+ return name && state ? `${statePrefix}${name}` : "";
37
+ };
38
+ const cssVar = (object) => {
39
+ const styles = {};
40
+ for (const key in object) {
41
+ if (object[key]) {
42
+ styles[`--${namespace.value}-${key}`] = object[key];
43
+ }
44
+ }
45
+ return styles;
46
+ };
47
+ const cssVarBlock = (object) => {
48
+ const styles = {};
49
+ for (const key in object) {
50
+ if (object[key]) {
51
+ styles[`--${namespace.value}-${block}-${key}`] = object[key];
52
+ }
53
+ }
54
+ return styles;
55
+ };
56
+ const cssVarName = (name) => `--${namespace.value}-${name}`;
57
+ const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
58
+ return {
59
+ namespace,
60
+ b,
61
+ e,
62
+ m,
63
+ be,
64
+ em,
65
+ bm,
66
+ bem,
67
+ is,
68
+ cssVar,
69
+ cssVarName,
70
+ cssVarBlock,
71
+ cssVarBlockName
72
+ };
73
+ };
74
+ export {
75
+ defaultNamespace,
76
+ namespaceContextKey,
77
+ useGetDerivedNamespace,
78
+ useNamespace
79
+ };
@@ -0,0 +1,11 @@
1
+ import { getCurrentInstance, computed } from "vue";
2
+ const useProp = (name) => {
3
+ const vm = getCurrentInstance();
4
+ return computed(() => {
5
+ var _a, _b;
6
+ return (_b = (_a = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a.$props) == null ? void 0 : _b[name];
7
+ });
8
+ };
9
+ export {
10
+ useProp
11
+ };
@@ -0,0 +1,20 @@
1
+ import { inject, computed, unref } from "vue";
2
+ import { buildProp } from "../../utils/vue/props/runtime.mjs";
3
+ import { componentSizes } from "../../constants/size.mjs";
4
+ const useSizeProp = buildProp({
5
+ type: String,
6
+ values: componentSizes,
7
+ required: false
8
+ });
9
+ const SIZE_INJECTION_KEY = Symbol("size");
10
+ const useGlobalSize = () => {
11
+ const injectedSize = inject(SIZE_INJECTION_KEY, {});
12
+ return computed(() => {
13
+ return unref(injectedSize.size) || "";
14
+ });
15
+ };
16
+ export {
17
+ SIZE_INJECTION_KEY,
18
+ useGlobalSize,
19
+ useSizeProp
20
+ };