@tagplus/components 5.3.4 → 5.3.5

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 (203) 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 +62 -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 +130 -0
  29. package/dist/es/src/components/Inline/index.mjs +4 -0
  30. package/dist/es/src/components/InputNumber/InputNumber.vue.mjs +358 -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 +76 -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 +77 -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 +165 -0
  51. package/dist/es/src/components/Tip/index.mjs +4 -0
  52. package/dist/es/src/components/index.mjs +22 -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 +18 -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 +20 -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 +8 -0
  63. package/dist/es/src/utils/runtime.mjs +50 -0
  64. package/dist/es/src/utils/scroll.mjs +26 -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/{src/locale → dist}/lang/en.js +3 -2
  73. package/{src/locale → dist}/lang/pt-br.js +3 -2
  74. package/dist/lib/_virtual/_plugin-vue_export-helper.js +10 -0
  75. package/dist/lib/components.css +2391 -0
  76. package/dist/lib/node_modules/@element-plus/icons-vue/dist/index.js +148 -0
  77. package/dist/lib/node_modules/@popperjs/core/lib/enums.js +22 -0
  78. package/dist/lib/node_modules/@vue/shared/dist/shared.esm-bundler.js +28 -0
  79. package/dist/lib/node_modules/@vueuse/core/index.js +170 -0
  80. package/dist/lib/node_modules/@vueuse/shared/index.js +68 -0
  81. package/dist/lib/node_modules/element-plus/es/constants/size.js +4 -0
  82. package/dist/lib/node_modules/element-plus/es/hooks/use-focus-controller/index.js +64 -0
  83. package/dist/lib/node_modules/element-plus/es/hooks/use-id/index.js +30 -0
  84. package/dist/lib/node_modules/element-plus/es/hooks/use-locale/index.js +29 -0
  85. package/dist/lib/node_modules/element-plus/es/hooks/use-namespace/index.js +79 -0
  86. package/dist/lib/node_modules/element-plus/es/hooks/use-prop/index.js +11 -0
  87. package/dist/lib/node_modules/element-plus/es/hooks/use-size/index.js +20 -0
  88. package/dist/lib/node_modules/element-plus/es/locale/lang/en.js +182 -0
  89. package/dist/lib/node_modules/element-plus/es/utils/error.js +16 -0
  90. package/dist/lib/node_modules/element-plus/es/utils/types.js +9 -0
  91. package/dist/lib/node_modules/element-plus/es/utils/vue/props/runtime.js +42 -0
  92. package/dist/lib/src/components/Autosuggest/Autosuggest.vue.js +446 -0
  93. package/dist/lib/src/components/Autosuggest/Multisuggest.vue.js +17 -0
  94. package/dist/lib/src/components/Autosuggest/autosuggest-props.js +204 -0
  95. package/dist/lib/src/components/Autosuggest/core.js +62 -0
  96. package/dist/lib/src/components/Autosuggest/multisuggest-props.js +11 -0
  97. package/dist/lib/src/components/Autosuggest/option.vue.js +118 -0
  98. package/dist/lib/src/components/Autosuggest/select-dropdown.vue.js +62 -0
  99. package/dist/lib/src/components/Autosuggest/useOption.js +93 -0
  100. package/dist/lib/src/components/Autosuggest/useSelect.js +803 -0
  101. package/dist/lib/src/components/Inline/Inline.vue.js +130 -0
  102. package/dist/lib/src/components/Inline/index.js +4 -0
  103. package/dist/lib/src/components/InputNumber/InputNumber.vue.js +358 -0
  104. package/dist/lib/src/components/InputNumber/index.js +4 -0
  105. package/dist/lib/src/components/InputNumber/input-number.js +128 -0
  106. package/dist/lib/src/components/Loader/Loader.vue.js +59 -0
  107. package/dist/lib/src/components/Loader/index.js +4 -0
  108. package/dist/lib/src/components/Money/Money.vue.js +76 -0
  109. package/dist/lib/src/components/Money/index.js +4 -0
  110. package/dist/lib/src/components/Multisuggest/index.js +4 -0
  111. package/dist/lib/src/components/OptionsList/OptionsList.vue.js +28 -0
  112. package/dist/lib/src/components/OptionsList/index.js +4 -0
  113. package/dist/lib/src/components/OptionsListItem/OptionsListItem.vue.js +96 -0
  114. package/dist/lib/src/components/OptionsListItem/index.js +4 -0
  115. package/dist/lib/src/components/Percent/Percent.vue.js +77 -0
  116. package/dist/lib/src/components/Percent/index.js +4 -0
  117. package/dist/lib/src/components/Skeleton/Skeleton.vue.js +79 -0
  118. package/dist/lib/src/components/Skeleton/index.js +4 -0
  119. package/dist/lib/src/components/Step/Step.vue.js +206 -0
  120. package/dist/lib/src/components/Step/index.js +4 -0
  121. package/dist/lib/src/components/Steps/Steps.vue.js +15 -0
  122. package/dist/lib/src/components/Steps/index.js +4 -0
  123. package/dist/lib/src/components/Tip/Tip.vue.js +165 -0
  124. package/dist/lib/src/components/Tip/index.js +4 -0
  125. package/dist/lib/src/components/index.js +22 -0
  126. package/dist/lib/src/locale/i18nCreator.js +93 -0
  127. package/dist/lib/src/locale/lang/pt-br.js +21 -0
  128. package/dist/lib/src/main.js +18 -0
  129. package/dist/lib/src/mixins/floatFormatter.js +42 -0
  130. package/dist/lib/src/plugins/currency.js +69 -0
  131. package/dist/lib/src/utils/constants.js +6 -0
  132. package/dist/lib/src/utils/error.js +20 -0
  133. package/dist/lib/src/utils/i18n.js +4 -0
  134. package/dist/lib/src/utils/icon.js +9 -0
  135. package/dist/lib/src/utils/index.js +8 -0
  136. package/dist/lib/src/utils/runtime.js +50 -0
  137. package/dist/lib/src/utils/scroll.js +26 -0
  138. package/dist/lib/src/utils/strings.js +4 -0
  139. package/dist/lib/src/utils/types.js +12 -0
  140. package/dist/lib/src/utils/use-derived-namespace.js +15 -0
  141. package/dist/lib/src/utils/use-form-common-props.js +25 -0
  142. package/dist/lib/src/utils/use-form-item.js +61 -0
  143. package/dist/lib/src/utils/use-id.js +35 -0
  144. package/dist/lib/src/utils/use-input.js +31 -0
  145. package/package.json +84 -62
  146. package/dist/demo.html +0 -1
  147. package/dist/fonts/bevi-bold.7e4dcd11.woff +0 -0
  148. package/dist/fonts/bevi-bold.873def84.woff2 +0 -0
  149. package/dist/fonts/bevi-medium.6187e050.woff2 +0 -0
  150. package/dist/fonts/bevi-medium.65b3056d.woff +0 -0
  151. package/dist/fonts/bevi-regular.c89f126e.woff +0 -0
  152. package/dist/fonts/bevi-regular.f81e4b8f.woff2 +0 -0
  153. package/dist/tp.common.js +0 -2
  154. package/dist/tp.common.js.map +0 -1
  155. package/dist/tp.css +0 -167
  156. package/dist/tp.umd.js +0 -2
  157. package/dist/tp.umd.js.map +0 -1
  158. package/dist/tp.umd.min.js +0 -2
  159. package/dist/tp.umd.min.js.map +0 -1
  160. package/src/assets/scss/_fonts.scss +0 -27
  161. package/src/assets/scss/_functions.scss +0 -22
  162. package/src/assets/scss/_helpers.scss +0 -112
  163. package/src/assets/scss/_mixins.scss +0 -69
  164. package/src/assets/scss/_overrides.scss +0 -69
  165. package/src/assets/scss/_resass.scss +0 -83
  166. package/src/assets/scss/_variables.scss +0 -27
  167. package/src/assets/scss/index.scss +0 -11
  168. package/src/components/Autosuggest/Autosuggest.vue +0 -791
  169. package/src/components/Autosuggest/index.js +0 -3
  170. package/src/components/Dialog/Dialog.vue +0 -253
  171. package/src/components/Dialog/index.js +0 -3
  172. package/src/components/Inline/Inline.vue +0 -149
  173. package/src/components/Inline/index.js +0 -3
  174. package/src/components/InputNumber/InputNumber.vue +0 -430
  175. package/src/components/InputNumber/index.js +0 -3
  176. package/src/components/Loader/Loader.vue +0 -317
  177. package/src/components/Loader/animations.scss +0 -68
  178. package/src/components/Loader/index.js +0 -3
  179. package/src/components/Money/Money.vue +0 -82
  180. package/src/components/Money/index.js +0 -3
  181. package/src/components/Multisuggest/Multisuggest.vue +0 -858
  182. package/src/components/Multisuggest/index.js +0 -3
  183. package/src/components/OptionsList/OptionsList.vue +0 -61
  184. package/src/components/OptionsList/index.js +0 -3
  185. package/src/components/OptionsListItem/OptionsListItem.vue +0 -191
  186. package/src/components/OptionsListItem/index.js +0 -3
  187. package/src/components/Percent/Percent.vue +0 -81
  188. package/src/components/Percent/index.js +0 -3
  189. package/src/components/Skeleton/Skeleton.vue +0 -137
  190. package/src/components/Skeleton/index.js +0 -3
  191. package/src/components/Step/Step.vue +0 -230
  192. package/src/components/Step/index.js +0 -3
  193. package/src/components/Steps/Steps.vue +0 -18
  194. package/src/components/Steps/index.js +0 -3
  195. package/src/components/Tip/Tip.vue +0 -193
  196. package/src/components/Tip/index.js +0 -3
  197. package/src/components/index.js +0 -31
  198. package/src/locale/index.js +0 -78
  199. package/src/main.js +0 -26
  200. package/src/mixins/floatFormatter.js +0 -53
  201. package/src/mixins/locale.js +0 -9
  202. package/src/utils/currency.js +0 -180
  203. package/src/utils/filters.js +0 -84
@@ -0,0 +1,76 @@
1
+ import { defineComponent, resolveComponent, createBlock, openBlock, mergeProps, createSlots, withCtx, renderList, createTextVNode, toDisplayString, renderSlot, normalizeProps, guardReactiveProps } from "vue";
2
+ import floatFormatterMixin from "../../mixins/floatFormatter.mjs";
3
+ import { ElInput } from "element-plus";
4
+ /* empty css */
5
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
6
+ const _sfc_main = defineComponent({
7
+ name: "TpMoney",
8
+ components: {
9
+ ElInput
10
+ },
11
+ mixins: [floatFormatterMixin],
12
+ inheritAttrs: false,
13
+ props: {
14
+ id: {
15
+ type: String,
16
+ required: false,
17
+ default: null
18
+ },
19
+ // remove o simbolo em prepend
20
+ removePrepend: {
21
+ type: Boolean,
22
+ default: false
23
+ },
24
+ // valor do campo. Pode ser usado como v-model também
25
+ modelValue: {
26
+ type: [Number, String],
27
+ default: 0
28
+ },
29
+ // tamanho máximo do campo. limitado por padrão a 21 caracteres por limitações do JS
30
+ maxlength: {
31
+ type: Number,
32
+ default: 21
33
+ }
34
+ },
35
+ computed: {
36
+ _id() {
37
+ return this.id || this.$options.name;
38
+ },
39
+ prepend() {
40
+ return this.$t("tp.money.currency");
41
+ }
42
+ }
43
+ });
44
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
45
+ const _component_el_input = resolveComponent("el-input");
46
+ return openBlock(), createBlock(_component_el_input, mergeProps({
47
+ id: `${_ctx._id}`,
48
+ class: "tp-money",
49
+ "model-value": _ctx.formattedValue
50
+ }, _ctx.$attrs, {
51
+ maxlength: _ctx.maxlength,
52
+ onInput: _ctx.input,
53
+ onChange: _ctx.handleChange,
54
+ onFocus: _cache[0] || (_cache[0] = ($event) => $event.target.select())
55
+ }), createSlots({ _: 2 }, [
56
+ !_ctx.removePrepend ? {
57
+ name: "prepend",
58
+ fn: withCtx(() => [
59
+ createTextVNode(toDisplayString(_ctx.prepend), 1)
60
+ ]),
61
+ key: "0"
62
+ } : void 0,
63
+ renderList(_ctx.$slots, (_, slot) => {
64
+ return {
65
+ name: slot,
66
+ fn: withCtx((scope) => [
67
+ renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(scope)), void 0, true)
68
+ ])
69
+ };
70
+ })
71
+ ]), 1040, ["id", "model-value", "maxlength", "onInput", "onChange"]);
72
+ }
73
+ const Money = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3f676031"]]);
74
+ export {
75
+ Money as default
76
+ };
@@ -0,0 +1,4 @@
1
+ import Money from "./Money.vue.mjs";
2
+ export {
3
+ Money as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import Multisuggest from "../Autosuggest/Multisuggest.vue.mjs";
2
+ export {
3
+ Multisuggest as default
4
+ };
@@ -0,0 +1,28 @@
1
+ import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot } from "vue";
2
+ /* empty css */
3
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const _sfc_main = defineComponent({
5
+ name: "TpOptionsList",
6
+ props: {
7
+ justifyContent: {
8
+ // 'space-between' / 'space-around' / (any flex property)
9
+ type: String,
10
+ default: "space-between"
11
+ },
12
+ disabled: {
13
+ type: Boolean,
14
+ default: false
15
+ }
16
+ }
17
+ });
18
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
19
+ return openBlock(), createElementBlock("ul", {
20
+ class: normalizeClass([_ctx.justifyContent, "tp-options-list", _ctx.disabled ? "disabled" : ""])
21
+ }, [
22
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
23
+ ], 2);
24
+ }
25
+ const OptionsList = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-c8c0f83e"]]);
26
+ export {
27
+ OptionsList as default
28
+ };
@@ -0,0 +1,4 @@
1
+ import OptionsList from "./OptionsList.vue.mjs";
2
+ export {
3
+ OptionsList as default
4
+ };
@@ -0,0 +1,96 @@
1
+ import { defineComponent, createElementBlock, openBlock, withKeys, normalizeClass, createElementVNode, createCommentVNode, Fragment, renderList, toDisplayString } from "vue";
2
+ /* empty css */
3
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const _sfc_main = defineComponent({
5
+ name: "TpOptionsListItem",
6
+ props: {
7
+ itemType: {
8
+ type: String,
9
+ default: ""
10
+ },
11
+ name: {
12
+ type: String,
13
+ default: ""
14
+ },
15
+ optValue: {
16
+ type: [String, Boolean, Number],
17
+ default: null
18
+ },
19
+ icon: {
20
+ type: String,
21
+ default: ""
22
+ },
23
+ badge: {
24
+ type: Boolean,
25
+ default: false
26
+ },
27
+ direction: {
28
+ type: String,
29
+ default: ""
30
+ },
31
+ id: {
32
+ type: String,
33
+ default: ""
34
+ },
35
+ texts: {
36
+ type: Array,
37
+ default: null
38
+ },
39
+ checked: {
40
+ type: Boolean,
41
+ default: false
42
+ },
43
+ type: {
44
+ type: String,
45
+ default: ""
46
+ },
47
+ active: {
48
+ type: String,
49
+ default: ""
50
+ }
51
+ },
52
+ emits: ["input", "updateValor"],
53
+ methods: {
54
+ updateOption() {
55
+ this.$emit("updateValor", this.optValue);
56
+ this.$emit("input", this.optValue);
57
+ }
58
+ }
59
+ });
60
+ const _hoisted_1 = ["id"];
61
+ const _hoisted_2 = { class: "text" };
62
+ const _hoisted_3 = {
63
+ key: 0,
64
+ class: "option-item-badge"
65
+ };
66
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
67
+ return openBlock(), createElementBlock("li", {
68
+ id: _ctx.id,
69
+ class: normalizeClass([
70
+ "tp-options-list-item",
71
+ _ctx.itemType,
72
+ _ctx.active === _ctx.optValue ? "active" : ""
73
+ ]),
74
+ tabindex: "0",
75
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.updateOption && _ctx.updateOption(...args)),
76
+ onKeyup: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.updateOption && _ctx.updateOption(...args), ["enter"]))
77
+ }, [
78
+ createElementVNode("div", {
79
+ class: normalizeClass(["icon", _ctx.direction])
80
+ }, [
81
+ createElementVNode("em", {
82
+ class: normalizeClass([_ctx.icon, "options-icon"])
83
+ }, null, 2),
84
+ createElementVNode("p", _hoisted_2, [
85
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.texts, (text, index) => {
86
+ return openBlock(), createElementBlock("span", { key: index }, toDisplayString(text), 1);
87
+ }), 128))
88
+ ])
89
+ ], 2),
90
+ _ctx.badge ? (openBlock(), createElementBlock("sup", _hoisted_3)) : createCommentVNode("", true)
91
+ ], 42, _hoisted_1);
92
+ }
93
+ const OptionsListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ace81497"]]);
94
+ export {
95
+ OptionsListItem as default
96
+ };
@@ -0,0 +1,4 @@
1
+ import OptionsListItem from "./OptionsListItem.vue.mjs";
2
+ export {
3
+ OptionsListItem as default
4
+ };
@@ -0,0 +1,77 @@
1
+ import { defineComponent, resolveComponent, createBlock, openBlock, mergeProps, createSlots, withCtx, createTextVNode } from "vue";
2
+ import floatFormatterMixin from "../../mixins/floatFormatter.mjs";
3
+ import { ElInput } from "element-plus";
4
+ /* empty css */
5
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
6
+ const _sfc_main = defineComponent({
7
+ name: "TpPercent",
8
+ components: {
9
+ ElInput
10
+ },
11
+ mixins: [floatFormatterMixin],
12
+ inheritAttrs: false,
13
+ props: {
14
+ id: {
15
+ type: String,
16
+ required: false,
17
+ default: null
18
+ },
19
+ // remove o simbolo em prepend
20
+ removePrepend: {
21
+ type: Boolean,
22
+ default: false
23
+ },
24
+ // coloca o simbolo no append
25
+ showAppend: {
26
+ type: Boolean,
27
+ default: false
28
+ },
29
+ // valor do campo. Pode ser usado como v-model também
30
+ value: {
31
+ type: [Number, String],
32
+ default: 0
33
+ },
34
+ // tamanho máximo do campo. limitado por padrão a 21 caracteres por limitações do JS
35
+ maxlength: {
36
+ type: Number,
37
+ default: 21
38
+ }
39
+ },
40
+ computed: {
41
+ _id() {
42
+ return this.id || this.$options.name;
43
+ }
44
+ }
45
+ });
46
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
47
+ const _component_el_input = resolveComponent("el-input");
48
+ return openBlock(), createBlock(_component_el_input, mergeProps({
49
+ id: `${_ctx._id}`,
50
+ class: "tp-percent",
51
+ "model-value": _ctx.formattedValue
52
+ }, _ctx.$attrs, {
53
+ maxlength: _ctx.maxlength,
54
+ onInput: _ctx.input,
55
+ onChange: _ctx.handleChange,
56
+ onFocus: _cache[0] || (_cache[0] = ($event) => $event.target.select())
57
+ }), createSlots({ _: 2 }, [
58
+ !_ctx.removePrepend ? {
59
+ name: "prepend",
60
+ fn: withCtx(() => [
61
+ _cache[1] || (_cache[1] = createTextVNode(" % "))
62
+ ]),
63
+ key: "0"
64
+ } : void 0,
65
+ _ctx.showAppend ? {
66
+ name: "append",
67
+ fn: withCtx(() => [
68
+ _cache[2] || (_cache[2] = createTextVNode(" % "))
69
+ ]),
70
+ key: "1"
71
+ } : void 0
72
+ ]), 1040, ["id", "model-value", "maxlength", "onInput", "onChange"]);
73
+ }
74
+ const Percent = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9d797852"]]);
75
+ export {
76
+ Percent as default
77
+ };
@@ -0,0 +1,4 @@
1
+ import Percent from "./Percent.vue.mjs";
2
+ export {
3
+ Percent as default
4
+ };
@@ -0,0 +1,79 @@
1
+ import { defineComponent, createElementBlock, openBlock, Fragment, renderList, normalizeStyle, normalizeClass } from "vue";
2
+ /* empty css */
3
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const _sfc_main = defineComponent({
5
+ name: "TpSkeleton",
6
+ props: {
7
+ /**
8
+ * Quantos itens em sequencia
9
+ */
10
+ count: {
11
+ type: Number,
12
+ required: false,
13
+ default: 1
14
+ },
15
+ /**
16
+ * Quanto tempo dura um ciclo da animação em segundos
17
+ */
18
+ duration: {
19
+ type: Number,
20
+ required: false,
21
+ default: 1
22
+ },
23
+ /**
24
+ * Largura em "%"". Quando círculo, em "px"
25
+ *
26
+ */
27
+ width: {
28
+ type: Number,
29
+ required: false,
30
+ default: null
31
+ },
32
+ /**
33
+ * Altura em "em"". Ignorado quando circulo e utiliza-se o mesmo parametro do width
34
+ */
35
+ height: {
36
+ type: Number,
37
+ required: false,
38
+ default: null
39
+ },
40
+ /**
41
+ * Flag que identifica se será um círculo
42
+ */
43
+ circle: {
44
+ type: Boolean,
45
+ required: false,
46
+ default: false
47
+ }
48
+ },
49
+ computed: {
50
+ cWidth() {
51
+ if (this.circle && this.width) {
52
+ return `${this.width}px`;
53
+ }
54
+ return `${this.width}%`;
55
+ },
56
+ cHeight() {
57
+ if (this.circle && this.width) {
58
+ return `${this.width}px`;
59
+ }
60
+ return `${this.height}em`;
61
+ }
62
+ }
63
+ });
64
+ const _hoisted_1 = { class: "tp-skeleton" };
65
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
66
+ return openBlock(), createElementBlock("div", _hoisted_1, [
67
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.count, (item) => {
68
+ return openBlock(), createElementBlock("span", {
69
+ key: item,
70
+ class: normalizeClass({ circle: _ctx.circle }),
71
+ style: normalizeStyle(`--duration:${_ctx.duration}; --item:${item}; width: ${_ctx.cWidth}; height: ${_ctx.cHeight}`)
72
+ }, "   ", 6);
73
+ }), 128))
74
+ ]);
75
+ }
76
+ const Skeleton = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3fc0709e"]]);
77
+ export {
78
+ Skeleton as default
79
+ };
@@ -0,0 +1,4 @@
1
+ import Skeleton from "./Skeleton.vue.mjs";
2
+ export {
3
+ Skeleton as default
4
+ };
@@ -0,0 +1,206 @@
1
+ import { defineComponent, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, renderSlot, createCommentVNode, toDisplayString, createTextVNode } from "vue";
2
+ /* empty css */
3
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const _sfc_main = defineComponent({
5
+ name: "TpStep",
6
+ props: {
7
+ title: {
8
+ type: String,
9
+ default: ""
10
+ },
11
+ icon: {
12
+ type: String,
13
+ default: ""
14
+ },
15
+ description: {
16
+ type: String,
17
+ default: ""
18
+ },
19
+ status: {
20
+ type: String,
21
+ default: ""
22
+ }
23
+ },
24
+ data() {
25
+ return {
26
+ index: -1,
27
+ lineStyle: {},
28
+ internalStatus: ""
29
+ };
30
+ },
31
+ computed: {
32
+ currentStatus() {
33
+ return this.internalStatus;
34
+ },
35
+ prevStatus() {
36
+ const prevStep = this.$parent.steps[this.index - 1];
37
+ return prevStep ? prevStep.currentStatus : "wait";
38
+ },
39
+ isCenter() {
40
+ return this.$parent.alignCenter;
41
+ },
42
+ isVertical() {
43
+ return this.$parent.direction === "vertical";
44
+ },
45
+ isSimple() {
46
+ return this.$parent.simple;
47
+ },
48
+ isLast() {
49
+ const parent = this.$parent;
50
+ return parent.steps[parent.steps.length - 1] === this;
51
+ },
52
+ stepsCount() {
53
+ return this.$parent.steps.length;
54
+ },
55
+ space() {
56
+ const {
57
+ isSimple,
58
+ $parent: { space }
59
+ } = this;
60
+ return isSimple ? "" : space;
61
+ },
62
+ style: function() {
63
+ const style = {};
64
+ const parent = this.$parent;
65
+ const len = parent.steps.length;
66
+ const space = typeof this.space === "number" ? `${this.space}px` : this.space ? this.space : `${100 / (len - (this.isCenter ? 0 : 1))}%`;
67
+ style.flexBasis = space;
68
+ if (this.isVertical) return style;
69
+ if (this.isLast) {
70
+ style.maxWidth = `${100 / this.stepsCount}%`;
71
+ } else {
72
+ style.marginRight = `${-this.$parent.stepOffset}px`;
73
+ }
74
+ return style;
75
+ }
76
+ },
77
+ watch: {
78
+ status() {
79
+ this.updateStatus(this.$parent.active);
80
+ this.internalStatus = this.status;
81
+ }
82
+ },
83
+ beforeCreate() {
84
+ this.$parent.steps.push(this);
85
+ },
86
+ beforeUnmount() {
87
+ const steps = this.$parent.steps;
88
+ const index = steps.indexOf(this);
89
+ if (index >= 0) {
90
+ steps.splice(index, 1);
91
+ }
92
+ },
93
+ mounted() {
94
+ const unwatch = this.$watch("index", () => {
95
+ this.$watch("$parent.active", this.updateStatus, { immediate: true });
96
+ this.$watch(
97
+ "$parent.processStatus",
98
+ () => {
99
+ const activeIndex = this.$parent.active;
100
+ this.updateStatus(activeIndex);
101
+ },
102
+ { immediate: true }
103
+ );
104
+ unwatch();
105
+ });
106
+ },
107
+ methods: {
108
+ updateStatus(val) {
109
+ const prevChild = this.$parent.$children[this.index - 1];
110
+ if (this.status === "error") {
111
+ this.internalStatus = "error";
112
+ } else if (val > this.index) {
113
+ this.internalStatus = this.$parent.finishStatus;
114
+ } else if (val === this.index && this.prevStatus !== "error") {
115
+ this.internalStatus = this.$parent.processStatus;
116
+ } else if (this.$parent.newItem && this.prevStatus !== "error") {
117
+ this.internalStatus = "wait";
118
+ }
119
+ if (prevChild) prevChild.calcProgress(this.internalStatus);
120
+ },
121
+ calcProgress(status) {
122
+ let step = 100;
123
+ const style = {};
124
+ style.transitionDelay = `${150 * this.index}ms`;
125
+ if (status === "wait") {
126
+ step = 0;
127
+ style.transitionDelay = `${-50 * this.index}ms`;
128
+ }
129
+ style.borderWidth = step && !this.isSimple ? "1px" : 0;
130
+ this.$parent.direction === "vertical" ? style.height = `${step}%` : style.width = `${step}%`;
131
+ this.lineStyle = style;
132
+ }
133
+ }
134
+ });
135
+ const _hoisted_1 = {
136
+ key: 1,
137
+ class: "el-step__icon-inner"
138
+ };
139
+ const _hoisted_2 = { class: "el-step__main" };
140
+ const _hoisted_3 = {
141
+ key: 0,
142
+ class: "el-step__arrow"
143
+ };
144
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
145
+ return openBlock(), createElementBlock("div", {
146
+ class: normalizeClass(["el-step", [
147
+ !_ctx.isSimple && `is-${_ctx.$parent.direction}`,
148
+ _ctx.isSimple && "is-simple",
149
+ _ctx.isLast && !_ctx.space && !_ctx.isCenter && "is-flex",
150
+ _ctx.isCenter && !_ctx.isVertical && !_ctx.isSimple && "is-center"
151
+ ]]),
152
+ style: normalizeStyle(_ctx.style)
153
+ }, [
154
+ createElementVNode("div", {
155
+ class: normalizeClass(["el-step__head", `is-${_ctx.currentStatus === "active" ? "finish" : _ctx.currentStatus}`])
156
+ }, [
157
+ createElementVNode("div", {
158
+ class: "el-step__line",
159
+ style: normalizeStyle(_ctx.isLast ? "" : { marginRight: _ctx.$parent.stepOffset + "px" })
160
+ }, [
161
+ createElementVNode("em", {
162
+ class: "el-step__line-inner",
163
+ style: normalizeStyle(_ctx.lineStyle)
164
+ }, null, 4)
165
+ ], 4),
166
+ createElementVNode("div", {
167
+ class: normalizeClass(["el-step__icon", `is-${_ctx.icon ? "icon" : "text"}`])
168
+ }, [
169
+ _ctx.currentStatus !== "success" && _ctx.currentStatus !== "error" ? renderSlot(_ctx.$slots, "icon", { key: 0 }, () => [
170
+ _ctx.icon ? (openBlock(), createElementBlock("em", {
171
+ key: 0,
172
+ class: normalizeClass(["el-step__icon-inner", [_ctx.icon]])
173
+ }, null, 2)) : createCommentVNode("", true),
174
+ !_ctx.icon && !_ctx.isSimple ? (openBlock(), createElementBlock("div", _hoisted_1, toDisplayString(_ctx.index + 1), 1)) : createCommentVNode("", true)
175
+ ], true) : (openBlock(), createElementBlock("em", {
176
+ key: 1,
177
+ class: normalizeClass([[
178
+ "el-icon-" + (_ctx.currentStatus === "success" ? "check" : "close")
179
+ ], "el-step__icon-inner is-status"])
180
+ }, null, 2))
181
+ ], 2)
182
+ ], 2),
183
+ createElementVNode("div", _hoisted_2, [
184
+ createElementVNode("div", {
185
+ ref: "title",
186
+ class: normalizeClass(["el-step__title", ["is-" + _ctx.currentStatus]])
187
+ }, [
188
+ renderSlot(_ctx.$slots, "title", {}, () => [
189
+ createTextVNode(toDisplayString(_ctx.title), 1)
190
+ ], true)
191
+ ], 2),
192
+ _ctx.isSimple ? (openBlock(), createElementBlock("div", _hoisted_3)) : (openBlock(), createElementBlock("div", {
193
+ key: 1,
194
+ class: normalizeClass(["el-step__description", ["is-" + _ctx.currentStatus]])
195
+ }, [
196
+ renderSlot(_ctx.$slots, "description", {}, () => [
197
+ createTextVNode(toDisplayString(_ctx.description), 1)
198
+ ], true)
199
+ ], 2))
200
+ ])
201
+ ], 6);
202
+ }
203
+ const Step = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3c497fa9"]]);
204
+ export {
205
+ Step as default
206
+ };
@@ -0,0 +1,4 @@
1
+ import Step from "./Step.vue.mjs";
2
+ export {
3
+ Step as default
4
+ };
@@ -0,0 +1,15 @@
1
+ import { defineComponent } from "vue";
2
+ import { ElSteps } from "element-plus";
3
+ const _sfc_main = defineComponent({
4
+ name: "TpSteps",
5
+ extends: ElSteps,
6
+ props: {
7
+ newItem: {
8
+ type: Boolean,
9
+ default: false
10
+ }
11
+ }
12
+ });
13
+ export {
14
+ _sfc_main as default
15
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./Steps.vue.mjs";
2
+ export {
3
+ _sfc_main as default
4
+ };