@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.
- package/dist/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
- package/dist/es/components.css +2391 -0
- package/dist/es/node_modules/@element-plus/icons-vue/dist/index.mjs +148 -0
- package/dist/es/node_modules/@popperjs/core/lib/enums.mjs +22 -0
- package/dist/es/node_modules/@vue/shared/dist/shared.esm-bundler.mjs +28 -0
- package/dist/es/node_modules/@vueuse/core/index.mjs +172 -0
- package/dist/es/node_modules/@vueuse/shared/index.mjs +68 -0
- package/dist/es/node_modules/element-plus/es/constants/size.mjs +4 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-focus-controller/index.mjs +64 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-id/index.mjs +30 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-locale/index.mjs +29 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-namespace/index.mjs +79 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-prop/index.mjs +11 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-size/index.mjs +20 -0
- package/dist/es/node_modules/element-plus/es/locale/lang/en.mjs +182 -0
- package/dist/es/node_modules/element-plus/es/utils/error.mjs +16 -0
- package/dist/es/node_modules/element-plus/es/utils/types.mjs +9 -0
- package/dist/es/node_modules/element-plus/es/utils/vue/props/runtime.mjs +42 -0
- package/dist/es/src/components/Autosuggest/Autosuggest.vue.mjs +446 -0
- package/dist/es/src/components/Autosuggest/Multisuggest.vue.mjs +17 -0
- package/dist/es/src/components/Autosuggest/autosuggest-props.mjs +204 -0
- package/dist/es/src/components/Autosuggest/core.mjs +56 -0
- package/dist/es/src/components/Autosuggest/multisuggest-props.mjs +11 -0
- package/dist/es/src/components/Autosuggest/option.vue.mjs +118 -0
- package/dist/es/src/components/Autosuggest/select-dropdown.vue.mjs +62 -0
- package/dist/es/src/components/Autosuggest/useOption.mjs +93 -0
- package/dist/es/src/components/Autosuggest/useSelect.mjs +803 -0
- package/dist/es/src/components/Inline/Inline.vue.mjs +125 -0
- package/dist/es/src/components/Inline/index.mjs +4 -0
- package/dist/es/src/components/InputNumber/InputNumber.vue.mjs +360 -0
- package/dist/es/src/components/InputNumber/index.mjs +4 -0
- package/dist/es/src/components/InputNumber/input-number.mjs +128 -0
- package/dist/es/src/components/Loader/Loader.vue.mjs +59 -0
- package/dist/es/src/components/Loader/index.mjs +4 -0
- package/dist/es/src/components/Money/Money.vue.mjs +72 -0
- package/dist/es/src/components/Money/index.mjs +4 -0
- package/dist/es/src/components/Multisuggest/index.mjs +4 -0
- package/dist/es/src/components/OptionsList/OptionsList.vue.mjs +28 -0
- package/dist/es/src/components/OptionsList/index.mjs +4 -0
- package/dist/es/src/components/OptionsListItem/OptionsListItem.vue.mjs +96 -0
- package/dist/es/src/components/OptionsListItem/index.mjs +4 -0
- package/dist/es/src/components/Percent/Percent.vue.mjs +73 -0
- package/dist/es/src/components/Percent/index.mjs +4 -0
- package/dist/es/src/components/Skeleton/Skeleton.vue.mjs +79 -0
- package/dist/es/src/components/Skeleton/index.mjs +4 -0
- package/dist/es/src/components/Step/Step.vue.mjs +206 -0
- package/dist/es/src/components/Step/index.mjs +4 -0
- package/dist/es/src/components/Steps/Steps.vue.mjs +15 -0
- package/dist/es/src/components/Steps/index.mjs +4 -0
- package/dist/es/src/components/Tip/Tip.vue.mjs +160 -0
- package/dist/es/src/components/Tip/index.mjs +4 -0
- package/dist/es/src/components/index.mjs +32 -0
- package/dist/es/src/locale/i18nCreator.mjs +93 -0
- package/dist/es/src/locale/lang/pt-br.mjs +21 -0
- package/dist/es/src/main.mjs +17 -0
- package/dist/es/src/mixins/floatFormatter.mjs +42 -0
- package/dist/es/src/plugins/currency.mjs +69 -0
- package/dist/es/src/utils/constants.mjs +6 -0
- package/dist/es/src/utils/error.mjs +22 -0
- package/dist/es/src/utils/i18n.mjs +4 -0
- package/dist/es/src/utils/icon.mjs +9 -0
- package/dist/es/src/utils/index.mjs +11 -0
- package/dist/es/src/utils/runtime.mjs +50 -0
- package/dist/es/src/utils/scroll.mjs +28 -0
- package/dist/es/src/utils/strings.mjs +4 -0
- package/dist/es/src/utils/types.mjs +9 -0
- package/dist/es/src/utils/use-derived-namespace.mjs +15 -0
- package/dist/es/src/utils/use-form-common-props.mjs +25 -0
- package/dist/es/src/utils/use-form-item.mjs +61 -0
- package/dist/es/src/utils/use-id.mjs +35 -0
- package/dist/es/src/utils/use-input.mjs +31 -0
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/lib/components.css +2391 -0
- package/dist/lib/node_modules/@element-plus/icons-vue/dist/index.js +148 -0
- package/dist/lib/node_modules/@popperjs/core/lib/enums.js +22 -0
- package/dist/lib/node_modules/@vue/shared/dist/shared.esm-bundler.js +28 -0
- package/dist/lib/node_modules/@vueuse/core/index.js +170 -0
- package/dist/lib/node_modules/@vueuse/shared/index.js +68 -0
- package/dist/lib/node_modules/element-plus/es/constants/size.js +4 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-focus-controller/index.js +64 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-id/index.js +30 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-locale/index.js +29 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-namespace/index.js +79 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-prop/index.js +11 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-size/index.js +20 -0
- package/dist/lib/node_modules/element-plus/es/locale/lang/en.js +182 -0
- package/dist/lib/node_modules/element-plus/es/utils/error.js +16 -0
- package/dist/lib/node_modules/element-plus/es/utils/types.js +9 -0
- package/dist/lib/node_modules/element-plus/es/utils/vue/props/runtime.js +42 -0
- package/dist/lib/src/components/Autosuggest/Autosuggest.vue.js +446 -0
- package/dist/lib/src/components/Autosuggest/Multisuggest.vue.js +17 -0
- package/dist/lib/src/components/Autosuggest/autosuggest-props.js +204 -0
- package/dist/lib/src/components/Autosuggest/core.js +56 -0
- package/dist/lib/src/components/Autosuggest/multisuggest-props.js +11 -0
- package/dist/lib/src/components/Autosuggest/option.vue.js +118 -0
- package/dist/lib/src/components/Autosuggest/select-dropdown.vue.js +62 -0
- package/dist/lib/src/components/Autosuggest/useOption.js +93 -0
- package/dist/lib/src/components/Autosuggest/useSelect.js +803 -0
- package/dist/lib/src/components/Inline/Inline.vue.js +125 -0
- package/dist/lib/src/components/Inline/index.js +4 -0
- package/dist/lib/src/components/InputNumber/InputNumber.vue.js +360 -0
- package/dist/lib/src/components/InputNumber/index.js +4 -0
- package/dist/lib/src/components/InputNumber/input-number.js +128 -0
- package/dist/lib/src/components/Loader/Loader.vue.js +59 -0
- package/dist/lib/src/components/Loader/index.js +4 -0
- package/dist/lib/src/components/Money/Money.vue.js +72 -0
- package/dist/lib/src/components/Money/index.js +4 -0
- package/dist/lib/src/components/Multisuggest/index.js +4 -0
- package/dist/lib/src/components/OptionsList/OptionsList.vue.js +28 -0
- package/dist/lib/src/components/OptionsList/index.js +4 -0
- package/dist/lib/src/components/OptionsListItem/OptionsListItem.vue.js +96 -0
- package/dist/lib/src/components/OptionsListItem/index.js +4 -0
- package/dist/lib/src/components/Percent/Percent.vue.js +73 -0
- package/dist/lib/src/components/Percent/index.js +4 -0
- package/dist/lib/src/components/Skeleton/Skeleton.vue.js +79 -0
- package/dist/lib/src/components/Skeleton/index.js +4 -0
- package/dist/lib/src/components/Step/Step.vue.js +206 -0
- package/dist/lib/src/components/Step/index.js +4 -0
- package/dist/lib/src/components/Steps/Steps.vue.js +15 -0
- package/dist/lib/src/components/Steps/index.js +4 -0
- package/dist/lib/src/components/Tip/Tip.vue.js +160 -0
- package/dist/lib/src/components/Tip/index.js +4 -0
- package/dist/lib/src/components/index.js +32 -0
- package/dist/lib/src/locale/i18nCreator.js +93 -0
- package/dist/lib/src/locale/lang/pt-br.js +21 -0
- package/dist/lib/src/main.js +17 -0
- package/dist/lib/src/mixins/floatFormatter.js +42 -0
- package/dist/lib/src/plugins/currency.js +69 -0
- package/dist/lib/src/utils/constants.js +6 -0
- package/dist/lib/src/utils/error.js +22 -0
- package/dist/lib/src/utils/i18n.js +4 -0
- package/dist/lib/src/utils/icon.js +9 -0
- package/dist/lib/src/utils/index.js +14 -0
- package/dist/lib/src/utils/runtime.js +50 -0
- package/dist/lib/src/utils/scroll.js +28 -0
- package/dist/lib/src/utils/strings.js +4 -0
- package/dist/lib/src/utils/types.js +12 -0
- package/dist/lib/src/utils/use-derived-namespace.js +15 -0
- package/dist/lib/src/utils/use-form-common-props.js +25 -0
- package/dist/lib/src/utils/use-form-item.js +61 -0
- package/dist/lib/src/utils/use-id.js +35 -0
- package/dist/lib/src/utils/use-input.js +31 -0
- package/package.json +19 -17
- package/dist/main.bundle.js +0 -2
- package/dist/main.bundle.js.LICENSE.txt +0 -15
- package/dist/main.css +0 -11
- package/src/locale/i18nCreator.js +0 -170
- package/src/locale/lang/en.js +0 -35
- package/src/locale/lang/pt-br.js +0 -35
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
/* empty css */
|
|
4
|
+
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
+
const _sfc_main = defineComponent({
|
|
6
|
+
name: "TpMoney",
|
|
7
|
+
mixins: [floatFormatterMixin],
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
props: {
|
|
10
|
+
id: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: false,
|
|
13
|
+
default: null
|
|
14
|
+
},
|
|
15
|
+
// remove o simbolo em prepend
|
|
16
|
+
removePrepend: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
// valor do campo. Pode ser usado como v-model também
|
|
21
|
+
modelValue: {
|
|
22
|
+
type: [Number, String],
|
|
23
|
+
default: 0
|
|
24
|
+
},
|
|
25
|
+
// tamanho máximo do campo. limitado por padrão a 21 caracteres por limitações do JS
|
|
26
|
+
maxlength: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 21
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
computed: {
|
|
32
|
+
_id() {
|
|
33
|
+
return this.id || this.$options.name;
|
|
34
|
+
},
|
|
35
|
+
prepend() {
|
|
36
|
+
return this.$t("tp.money.currency");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
41
|
+
const _component_el_input = resolveComponent("el-input");
|
|
42
|
+
return openBlock(), createBlock(_component_el_input, mergeProps({
|
|
43
|
+
id: `${_ctx._id}`,
|
|
44
|
+
class: "tp-money",
|
|
45
|
+
"model-value": _ctx.formattedValue
|
|
46
|
+
}, _ctx.$attrs, {
|
|
47
|
+
maxlength: _ctx.maxlength,
|
|
48
|
+
onInput: _ctx.input,
|
|
49
|
+
onChange: _ctx.handleChange,
|
|
50
|
+
onFocus: _cache[0] || (_cache[0] = ($event) => $event.target.select())
|
|
51
|
+
}), createSlots({ _: 2 }, [
|
|
52
|
+
!_ctx.removePrepend ? {
|
|
53
|
+
name: "prepend",
|
|
54
|
+
fn: withCtx(() => [
|
|
55
|
+
createTextVNode(toDisplayString(_ctx.prepend), 1)
|
|
56
|
+
]),
|
|
57
|
+
key: "0"
|
|
58
|
+
} : void 0,
|
|
59
|
+
renderList(_ctx.$slots, (_, slot) => {
|
|
60
|
+
return {
|
|
61
|
+
name: slot,
|
|
62
|
+
fn: withCtx((scope) => [
|
|
63
|
+
renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(scope)), void 0, true)
|
|
64
|
+
])
|
|
65
|
+
};
|
|
66
|
+
})
|
|
67
|
+
]), 1040, ["id", "model-value", "maxlength", "onInput", "onChange"]);
|
|
68
|
+
}
|
|
69
|
+
const Money = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9d3eeac0"]]);
|
|
70
|
+
export {
|
|
71
|
+
Money as default
|
|
72
|
+
};
|
|
@@ -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,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,73 @@
|
|
|
1
|
+
import { defineComponent, resolveComponent, createBlock, openBlock, mergeProps, createSlots, withCtx, createTextVNode } from "vue";
|
|
2
|
+
import floatFormatterMixin from "../../mixins/floatFormatter.mjs";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
+
const _sfc_main = defineComponent({
|
|
6
|
+
name: "TpPercent",
|
|
7
|
+
mixins: [floatFormatterMixin],
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
props: {
|
|
10
|
+
id: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: false,
|
|
13
|
+
default: null
|
|
14
|
+
},
|
|
15
|
+
// remove o simbolo em prepend
|
|
16
|
+
removePrepend: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
// coloca o simbolo no append
|
|
21
|
+
showAppend: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
// valor do campo. Pode ser usado como v-model também
|
|
26
|
+
value: {
|
|
27
|
+
type: [Number, String],
|
|
28
|
+
default: 0
|
|
29
|
+
},
|
|
30
|
+
// tamanho máximo do campo. limitado por padrão a 21 caracteres por limitações do JS
|
|
31
|
+
maxlength: {
|
|
32
|
+
type: Number,
|
|
33
|
+
default: 21
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
computed: {
|
|
37
|
+
_id() {
|
|
38
|
+
return this.id || this.$options.name;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
43
|
+
const _component_el_input = resolveComponent("el-input");
|
|
44
|
+
return openBlock(), createBlock(_component_el_input, mergeProps({
|
|
45
|
+
id: `${_ctx._id}`,
|
|
46
|
+
class: "tp-percent",
|
|
47
|
+
"model-value": _ctx.formattedValue
|
|
48
|
+
}, _ctx.$attrs, {
|
|
49
|
+
maxlength: _ctx.maxlength,
|
|
50
|
+
onInput: _ctx.input,
|
|
51
|
+
onChange: _ctx.handleChange,
|
|
52
|
+
onFocus: _cache[0] || (_cache[0] = ($event) => $event.target.select())
|
|
53
|
+
}), createSlots({ _: 2 }, [
|
|
54
|
+
!_ctx.removePrepend ? {
|
|
55
|
+
name: "prepend",
|
|
56
|
+
fn: withCtx(() => [
|
|
57
|
+
_cache[1] || (_cache[1] = createTextVNode(" % "))
|
|
58
|
+
]),
|
|
59
|
+
key: "0"
|
|
60
|
+
} : void 0,
|
|
61
|
+
_ctx.showAppend ? {
|
|
62
|
+
name: "append",
|
|
63
|
+
fn: withCtx(() => [
|
|
64
|
+
_cache[2] || (_cache[2] = createTextVNode(" % "))
|
|
65
|
+
]),
|
|
66
|
+
key: "1"
|
|
67
|
+
} : void 0
|
|
68
|
+
]), 1040, ["id", "model-value", "maxlength", "onInput", "onChange"]);
|
|
69
|
+
}
|
|
70
|
+
const Percent = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-36120bea"]]);
|
|
71
|
+
export {
|
|
72
|
+
Percent as default
|
|
73
|
+
};
|
|
@@ -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,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,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
|
+
};
|