hzzt-plus 1.0.4 → 1.0.6

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 (137) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +505 -193
  4. package/dist/index.full.min.js +12 -12
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +15 -15
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +500 -194
  9. package/dist/locale/en.js +1 -1
  10. package/dist/locale/en.min.js +1 -1
  11. package/dist/locale/en.min.mjs +1 -1
  12. package/dist/locale/en.mjs +1 -1
  13. package/dist/locale/zh-cn.js +1 -1
  14. package/dist/locale/zh-cn.min.js +1 -1
  15. package/dist/locale/zh-cn.min.mjs +1 -1
  16. package/dist/locale/zh-cn.mjs +1 -1
  17. package/es/component.mjs +5 -1
  18. package/es/component.mjs.map +1 -1
  19. package/es/components/click-input/index.d.ts +638 -0
  20. package/es/components/click-input/index.mjs +9 -0
  21. package/es/components/click-input/index.mjs.map +1 -0
  22. package/es/components/click-input/src/click-input.d.ts +22 -0
  23. package/es/components/click-input/src/click-input.mjs +26 -0
  24. package/es/components/click-input/src/click-input.mjs.map +1 -0
  25. package/es/components/click-input/src/click-input.vue.d.ts +638 -0
  26. package/es/components/click-input/src/click-input2.mjs +89 -0
  27. package/es/components/click-input/src/click-input2.mjs.map +1 -0
  28. package/es/components/click-input/style/css.d.ts +2 -0
  29. package/es/components/click-input/style/css.mjs +3 -0
  30. package/es/components/click-input/style/css.mjs.map +1 -0
  31. package/es/components/click-input/style/index.d.ts +2 -0
  32. package/es/components/click-input/style/index.mjs +3 -0
  33. package/es/components/click-input/style/index.mjs.map +1 -0
  34. package/es/components/collapse/index.mjs +2 -2
  35. package/es/components/collapse/src/collapse.mjs +0 -67
  36. package/es/components/collapse/src/collapse.mjs.map +1 -1
  37. package/es/components/collapse/src/collapse2.mjs +67 -0
  38. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  39. package/es/components/index.d.ts +2 -0
  40. package/es/components/index.mjs +5 -1
  41. package/es/components/index.mjs.map +1 -1
  42. package/es/components/scan/index.mjs +2 -2
  43. package/es/components/scan/src/scan.mjs +23 -144
  44. package/es/components/scan/src/scan.mjs.map +1 -1
  45. package/es/components/scan/src/scan2.mjs +144 -23
  46. package/es/components/scan/src/scan2.mjs.map +1 -1
  47. package/es/components/select/index.d.ts +5 -0
  48. package/es/components/select/index.mjs +9 -0
  49. package/es/components/select/index.mjs.map +1 -0
  50. package/es/components/select/src/select.d.ts +38 -0
  51. package/es/components/select/src/select.mjs +43 -0
  52. package/es/components/select/src/select.mjs.map +1 -0
  53. package/es/components/select/src/select.vue.d.ts +13241 -0
  54. package/es/components/select/src/select2.mjs +183 -0
  55. package/es/components/select/src/select2.mjs.map +1 -0
  56. package/es/components/select/style/css.d.ts +2 -0
  57. package/es/components/select/style/css.mjs +3 -0
  58. package/es/components/select/style/css.mjs.map +1 -0
  59. package/es/components/select/style/index.d.ts +2 -0
  60. package/es/components/select/style/index.mjs +3 -0
  61. package/es/components/select/style/index.mjs.map +1 -0
  62. package/es/components/select-input/index.d.ts +6 -6
  63. package/es/components/select-input/src/select-input.d.ts +1 -7
  64. package/es/components/select-input/src/select-input.mjs.map +1 -1
  65. package/es/components/select-input/src/select-input.vue.d.ts +1 -1
  66. package/es/components/select-input/src/select-input2.mjs.map +1 -1
  67. package/es/index.mjs +5 -1
  68. package/es/index.mjs.map +1 -1
  69. package/es/version.d.ts +1 -1
  70. package/es/version.mjs +1 -1
  71. package/es/version.mjs.map +1 -1
  72. package/global.d.ts +2 -0
  73. package/lib/component.js +5 -1
  74. package/lib/component.js.map +1 -1
  75. package/lib/components/click-input/index.d.ts +638 -0
  76. package/lib/components/click-input/index.js +16 -0
  77. package/lib/components/click-input/index.js.map +1 -0
  78. package/lib/components/click-input/src/click-input.d.ts +22 -0
  79. package/lib/components/click-input/src/click-input.js +31 -0
  80. package/lib/components/click-input/src/click-input.js.map +1 -0
  81. package/lib/components/click-input/src/click-input.vue.d.ts +638 -0
  82. package/lib/components/click-input/src/click-input2.js +93 -0
  83. package/lib/components/click-input/src/click-input2.js.map +1 -0
  84. package/lib/components/click-input/style/css.d.ts +2 -0
  85. package/lib/components/click-input/style/css.js +6 -0
  86. package/lib/components/click-input/style/css.js.map +1 -0
  87. package/lib/components/click-input/style/index.d.ts +2 -0
  88. package/lib/components/click-input/style/index.js +6 -0
  89. package/lib/components/click-input/style/index.js.map +1 -0
  90. package/lib/components/collapse/index.js +2 -2
  91. package/lib/components/collapse/src/collapse.js +0 -70
  92. package/lib/components/collapse/src/collapse.js.map +1 -1
  93. package/lib/components/collapse/src/collapse2.js +70 -0
  94. package/lib/components/collapse/src/collapse2.js.map +1 -1
  95. package/lib/components/index.d.ts +2 -0
  96. package/lib/components/index.js +11 -1
  97. package/lib/components/index.js.map +1 -1
  98. package/lib/components/scan/index.js +2 -2
  99. package/lib/components/scan/src/scan.js +24 -144
  100. package/lib/components/scan/src/scan.js.map +1 -1
  101. package/lib/components/scan/src/scan2.js +144 -24
  102. package/lib/components/scan/src/scan2.js.map +1 -1
  103. package/lib/components/select/index.d.ts +5 -0
  104. package/lib/components/select/index.js +16 -0
  105. package/lib/components/select/index.js.map +1 -0
  106. package/lib/components/select/src/select.d.ts +38 -0
  107. package/lib/components/select/src/select.js +48 -0
  108. package/lib/components/select/src/select.js.map +1 -0
  109. package/lib/components/select/src/select.vue.d.ts +13241 -0
  110. package/lib/components/select/src/select2.js +187 -0
  111. package/lib/components/select/src/select2.js.map +1 -0
  112. package/lib/components/select/style/css.d.ts +2 -0
  113. package/lib/components/select/style/css.js +6 -0
  114. package/lib/components/select/style/css.js.map +1 -0
  115. package/lib/components/select/style/index.d.ts +2 -0
  116. package/lib/components/select/style/index.js +6 -0
  117. package/lib/components/select/style/index.js.map +1 -0
  118. package/lib/components/select-input/index.d.ts +6 -6
  119. package/lib/components/select-input/src/select-input.d.ts +1 -7
  120. package/lib/components/select-input/src/select-input.js.map +1 -1
  121. package/lib/components/select-input/src/select-input.vue.d.ts +1 -1
  122. package/lib/components/select-input/src/select-input2.js.map +1 -1
  123. package/lib/index.js +41 -31
  124. package/lib/index.js.map +1 -1
  125. package/lib/version.d.ts +1 -1
  126. package/lib/version.js +1 -1
  127. package/lib/version.js.map +1 -1
  128. package/package.json +1 -1
  129. package/tags.json +1 -1
  130. package/theme/hzzt-click-input.css +1 -0
  131. package/theme/hzzt-select.css +1 -0
  132. package/theme/index.css +1 -1
  133. package/theme/src/click-input.scss +19 -0
  134. package/theme/src/index.scss +2 -0
  135. package/theme/src/mixins/mixins.scss +3 -0
  136. package/theme/src/select.scss +10 -0
  137. package/web-types.json +1 -1
@@ -0,0 +1,89 @@
1
+ import { defineComponent, ref, computed, watch, nextTick, openBlock, createElementBlock, normalizeClass, unref, createBlock, mergeProps, withKeys, toDisplayString } from 'vue';
2
+ import { clickInputProps, clickInputEmits } from './click-input.mjs';
3
+ import '../../../hooks/index.mjs';
4
+ import { useFormSize, useFormDisabled, ElInput } from 'element-plus';
5
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
6
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
7
+ import { useGlobalSize } from '../../../hooks/use-size/index.mjs';
8
+
9
+ const __default__ = defineComponent({
10
+ name: "HzztClickInput"
11
+ });
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ ...__default__,
14
+ props: clickInputProps,
15
+ emits: clickInputEmits,
16
+ setup(__props, { emit }) {
17
+ const props = __props;
18
+ const _inputVal = ref(props.modelValue || "");
19
+ const inputVal = ref(props.modelValue || "");
20
+ const inputRef = ref();
21
+ const editable = ref(false);
22
+ const nsInput = useNamespace("click-input");
23
+ const formSize = useFormSize();
24
+ const formDisabled = useFormDisabled();
25
+ const trueSize = computed(() => props.size || formSize.value || useGlobalSize().value);
26
+ const trueDisabled = computed(() => props.disabled || formDisabled.value);
27
+ const trueReadonly = computed(() => trueDisabled.value || props.readonly || !editable.value);
28
+ const containerCls = computed(() => [
29
+ nsInput.b(),
30
+ nsInput.m(trueSize.value),
31
+ "flex width-100% align-items-center"
32
+ ]);
33
+ const spanClass = computed(() => [
34
+ nsInput.em("span"),
35
+ "flex width-100% align-items-center"
36
+ ]);
37
+ watch(() => props.modelValue, (v) => {
38
+ inputVal.value = v || "";
39
+ _inputVal.value = v || "";
40
+ });
41
+ function input(val) {
42
+ emit("update:modelValue", val);
43
+ emit("input", val);
44
+ }
45
+ function change() {
46
+ editable.value = false;
47
+ if (_inputVal.value === inputVal.value) {
48
+ return;
49
+ }
50
+ input(inputVal.value);
51
+ emit("change", inputVal.value);
52
+ }
53
+ function edit() {
54
+ if (trueDisabled.value || props.readonly) {
55
+ return;
56
+ }
57
+ editable.value = true;
58
+ nextTick(() => {
59
+ inputRef.value.focus();
60
+ });
61
+ }
62
+ return (_ctx, _cache) => {
63
+ return openBlock(), createElementBlock("div", {
64
+ class: normalizeClass(unref(containerCls))
65
+ }, [
66
+ !unref(trueReadonly) ? (openBlock(), createBlock(unref(ElInput), mergeProps({
67
+ key: 0,
68
+ ref_key: "inputRef",
69
+ ref: inputRef,
70
+ modelValue: inputVal.value,
71
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputVal.value = $event)
72
+ }, _ctx.inputProps, {
73
+ clearable: "",
74
+ size: unref(trueSize),
75
+ onKeyup: withKeys(change, ["enter"]),
76
+ onBlur: change
77
+ }), null, 16, ["modelValue", "size", "onKeyup"])) : (openBlock(), createElementBlock("div", {
78
+ key: 1,
79
+ class: normalizeClass(["width-100%", unref(spanClass)]),
80
+ onClick: edit
81
+ }, toDisplayString(inputVal.value || " "), 3))
82
+ ], 2);
83
+ };
84
+ }
85
+ });
86
+ var ClickInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "click-input.vue"]]);
87
+
88
+ export { ClickInput as default };
89
+ //# sourceMappingURL=click-input2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"click-input2.mjs","sources":["../../../../../../packages/components/click-input/src/click-input.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\">\n <el-input\n v-if=\"!trueReadonly\"\n ref=\"inputRef\"\n v-model=\"inputVal\"\n v-bind=\"inputProps\"\n clearable\n :size=\"trueSize\"\n @keyup.enter=\"change\"\n @blur=\"change\"\n />\n <div v-else class=\"width-100%\" :class=\"spanClass\" @click=\"edit\">\n {{ inputVal || ' ' }}\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {computed, ref, watch, nextTick} from 'vue'\n import {clickInputEmits, clickInputProps} from './click-input'\n import {useGlobalSize, useNamespace} from \"@hzzt-plus/hooks\";\n import {useFormDisabled, useFormSize} from \"element-plus\";\n import {ElInput} from 'element-plus'\n\n defineOptions({\n name: 'HzztClickInput',\n })\n\n const props = defineProps(clickInputProps)\n const emit = defineEmits(clickInputEmits)\n\n const _inputVal = ref(props.modelValue || '');\n const inputVal = ref(props.modelValue || '');\n const inputRef = ref();\n const editable = ref(false);\n\n const nsInput = useNamespace('click-input')\n const formSize = useFormSize()\n const formDisabled = useFormDisabled()\n\n const trueSize = computed(\n () => props.size || formSize.value || useGlobalSize().value\n )\n\n const trueDisabled = computed(() => props.disabled || formDisabled.value)\n\n const trueReadonly = computed(() => trueDisabled.value || props.readonly || !editable.value)\n\n const containerCls = computed(() => [\n nsInput.b(),\n nsInput.m(trueSize.value),\n 'flex width-100% align-items-center',\n ])\n\n const spanClass = computed(() => [\n nsInput.em('span'),\n 'flex width-100% align-items-center',\n ])\n\n watch(() => props.modelValue, (v) => {\n inputVal.value = v || '';\n _inputVal.value = v || '';\n })\n\n function input(val: string) {\n emit('update:modelValue', val);\n emit('input', val);\n }\n\n function change() {\n editable.value = false;\n if (_inputVal.value === inputVal.value) {\n return;\n }\n input(inputVal.value);\n emit('change', inputVal.value);\n }\n\n function edit() {\n if (trueDisabled.value || props.readonly) {\n return;\n }\n editable.value = true;\n nextTick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zzt-click-input.css';
3
+ //# sourceMappingURL=css.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ import 'hzzt-plus/es/components/base/style';
2
+ import 'hzzt-plus/theme/src/click-input.scss';
@@ -0,0 +1,3 @@
1
+ import '../../base/style/index.mjs';
2
+ import 'hzzt-plus/theme/src/click-input.scss';
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
- import Collapse from './src/collapse.mjs';
3
- import './src/collapse2.mjs';
2
+ import Collapse from './src/collapse2.mjs';
3
+ import './src/collapse.mjs';
4
4
  import { withInstall } from '../../utils/vue/install.mjs';
5
5
 
6
6
  const HzztCollapse = withInstall(Collapse);
@@ -1,69 +1,2 @@
1
- import { createElementVNode, defineComponent, ref, watch, openBlock, createElementBlock, toDisplayString, unref, createCommentVNode, renderSlot } from 'vue';
2
- import '../../../hooks/index.mjs';
3
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
4
- import { useLocale } from '../../../hooks/use-locale/index.mjs';
5
1
 
6
- const _hoisted_1 = { class: "hzzt-collapse" };
7
- const _hoisted_2 = { class: "flex align-items-center" };
8
- const _hoisted_3 = { class: "hzzt-collapse-title-wrapper" };
9
- const _hoisted_4 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-title-block" }, null, -1);
10
- const _hoisted_5 = { class: "hzzt-collapse-title" };
11
- const _hoisted_6 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-line" }, null, -1);
12
- const _hoisted_7 = {
13
- key: 0,
14
- class: "hzzt-collapse-text"
15
- };
16
- const __default__ = defineComponent({
17
- name: "HzztCollapse"
18
- });
19
- const _sfc_main = /* @__PURE__ */ defineComponent({
20
- ...__default__,
21
- props: {
22
- defaultActive: {
23
- type: Boolean,
24
- default: false
25
- },
26
- title: {
27
- type: String,
28
- default: ""
29
- },
30
- expand: {
31
- type: Boolean,
32
- default: true
33
- }
34
- },
35
- setup(__props) {
36
- const props = __props;
37
- const { t } = useLocale();
38
- const active = ref(props.defaultActive);
39
- watch(() => props.defaultActive, (val) => {
40
- active.value = val;
41
- });
42
- function toggle() {
43
- active.value = !active.value;
44
- }
45
- return (_ctx, _cache) => {
46
- return openBlock(), createElementBlock("div", _hoisted_1, [
47
- createElementVNode("div", {
48
- class: "hzzt-collapse-header",
49
- onClick: toggle
50
- }, [
51
- createElementVNode("div", _hoisted_2, [
52
- createElementVNode("div", _hoisted_3, [
53
- _hoisted_4,
54
- createElementVNode("div", _hoisted_5, toDisplayString(__props.title), 1)
55
- ]),
56
- _hoisted_6
57
- ]),
58
- __props.expand ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(active.value ? unref(t)("hzzt.collapse.retract") : unref(t)("hzzt.collapse.expand")), 1)) : createCommentVNode("v-if", true)
59
- ]),
60
- renderSlot(_ctx.$slots, "active", { active: active.value }),
61
- renderSlot(_ctx.$slots, "default")
62
- ]);
63
- };
64
- }
65
- });
66
- var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "collapse.vue"]]);
67
-
68
- export { Collapse as default };
69
2
  //# sourceMappingURL=collapse.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapse.mjs","sources":["../../../../../../packages/components/collapse/src/collapse.vue"],"sourcesContent":["<template>\n <div class=\"hzzt-collapse\">\n <div class=\"hzzt-collapse-header\" @click=\"toggle\">\n <div class=\"flex align-items-center\">\n <div class=\"hzzt-collapse-title-wrapper\">\n <div class=\"hzzt-collapse-title-block\" />\n <div class=\"hzzt-collapse-title\">{{ title }}</div>\n </div>\n <div class=\"hzzt-collapse-line\" />\n </div>\n <span v-if=\"expand\" class=\"hzzt-collapse-text\">{{\n active ? t('hzzt.collapse.retract') : t('hzzt.collapse.expand')\n }}</span>\n </div>\n <slot name=\"active\" :active=\"active\" />\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch } from 'vue'\nimport { useLocale } from '@hzzt-plus/hooks'\n\ndefineOptions({\n name: 'HzztCollapse',\n})\nconst { t } = useLocale()\nconst props = defineProps({\n defaultActive: {\n type: Boolean,\n default: false,\n },\n title: {\n type: String,\n default: '',\n },\n expand: {\n type: Boolean,\n default: true,\n },\n})\n\nconst active = ref(props.defaultActive)\n\nwatch(\n () => props.defaultActive,\n (val: boolean) => {\n active.value = val\n }\n)\n\nfunction toggle() {\n active.value = !active.value\n}\n</script>\n"],"names":["_createElementVNode","_toDisplayString","_openBlock","_createElementBlock","_unref","_createCommentVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAoBA,KAAA;AACA,IAAA,KAAS,EAAiB;;;AAEZ,KACN;AACR,IAAA,MAAA,EAAA;;;;;;;;;;;;;;;;;;;AACA,UAAM,OAAI,EAAc,MAAA;AAgBxB,SAAM,EAAA;AAEN,UAAAA,kBAAA,CAAA,KAAA,EAAA,UAAA,EAAA;AAAA,YACQA,kBAAM,CAAA,KAAA,EAAA,UAAA,EAAA;AAAA,cACM,UAAA;AAChB,cAAAA,kBAAe,CAAA,KAAA,EAAA,UAAA,EAAAC,eAAA,CAAA,OAAA,CAAA,KAAA,CAAA,EAAA,CAAA,CAAA;AAAA,aACjB,CAAA;AAAA,YACF,UAAA;AAEA,WAAA,CAAA;AACE,UAAO,OAAA,CAAA,MAAgB,IAAAC,SAAA,EAAA,EAAAC,kBAAA,CAAA,MAAA,EAAA,UAAA,EAAAF,eAAA,CAAA,MAAA,CAAA,KAAA,GAAAG,KAAA,CAAA,CAAA,CAAA,CAAA,uBAAA,CAAA,GAAAA,KAAA,CAAA,CAAA,CAAA,CAAA,sBAAA,CAAA,CAAA,EAAA,CAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA;AAAA,SACzB,CAAA;;;;;;;;;;;"}
1
+ {"version":3,"file":"collapse.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,69 @@
1
+ import { createElementVNode, defineComponent, ref, watch, openBlock, createElementBlock, toDisplayString, unref, createCommentVNode, renderSlot } from 'vue';
2
+ import '../../../hooks/index.mjs';
3
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
4
+ import { useLocale } from '../../../hooks/use-locale/index.mjs';
1
5
 
6
+ const _hoisted_1 = { class: "hzzt-collapse" };
7
+ const _hoisted_2 = { class: "flex align-items-center" };
8
+ const _hoisted_3 = { class: "hzzt-collapse-title-wrapper" };
9
+ const _hoisted_4 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-title-block" }, null, -1);
10
+ const _hoisted_5 = { class: "hzzt-collapse-title" };
11
+ const _hoisted_6 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-line" }, null, -1);
12
+ const _hoisted_7 = {
13
+ key: 0,
14
+ class: "hzzt-collapse-text"
15
+ };
16
+ const __default__ = defineComponent({
17
+ name: "HzztCollapse"
18
+ });
19
+ const _sfc_main = /* @__PURE__ */ defineComponent({
20
+ ...__default__,
21
+ props: {
22
+ defaultActive: {
23
+ type: Boolean,
24
+ default: false
25
+ },
26
+ title: {
27
+ type: String,
28
+ default: ""
29
+ },
30
+ expand: {
31
+ type: Boolean,
32
+ default: true
33
+ }
34
+ },
35
+ setup(__props) {
36
+ const props = __props;
37
+ const { t } = useLocale();
38
+ const active = ref(props.defaultActive);
39
+ watch(() => props.defaultActive, (val) => {
40
+ active.value = val;
41
+ });
42
+ function toggle() {
43
+ active.value = !active.value;
44
+ }
45
+ return (_ctx, _cache) => {
46
+ return openBlock(), createElementBlock("div", _hoisted_1, [
47
+ createElementVNode("div", {
48
+ class: "hzzt-collapse-header",
49
+ onClick: toggle
50
+ }, [
51
+ createElementVNode("div", _hoisted_2, [
52
+ createElementVNode("div", _hoisted_3, [
53
+ _hoisted_4,
54
+ createElementVNode("div", _hoisted_5, toDisplayString(__props.title), 1)
55
+ ]),
56
+ _hoisted_6
57
+ ]),
58
+ __props.expand ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(active.value ? unref(t)("hzzt.collapse.retract") : unref(t)("hzzt.collapse.expand")), 1)) : createCommentVNode("v-if", true)
59
+ ]),
60
+ renderSlot(_ctx.$slots, "active", { active: active.value }),
61
+ renderSlot(_ctx.$slots, "default")
62
+ ]);
63
+ };
64
+ }
65
+ });
66
+ var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "collapse.vue"]]);
67
+
68
+ export { Collapse as default };
2
69
  //# sourceMappingURL=collapse2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapse2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"collapse2.mjs","sources":["../../../../../../packages/components/collapse/src/collapse.vue"],"sourcesContent":["<template>\n <div class=\"hzzt-collapse\">\n <div class=\"hzzt-collapse-header\" @click=\"toggle\">\n <div class=\"flex align-items-center\">\n <div class=\"hzzt-collapse-title-wrapper\">\n <div class=\"hzzt-collapse-title-block\" />\n <div class=\"hzzt-collapse-title\">{{ title }}</div>\n </div>\n <div class=\"hzzt-collapse-line\" />\n </div>\n <span v-if=\"expand\" class=\"hzzt-collapse-text\">{{\n active ? t('hzzt.collapse.retract') : t('hzzt.collapse.expand')\n }}</span>\n </div>\n <slot name=\"active\" :active=\"active\" />\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch } from 'vue'\nimport { useLocale } from '@hzzt-plus/hooks'\n\ndefineOptions({\n name: 'HzztCollapse',\n})\nconst { t } = useLocale()\nconst props = defineProps({\n defaultActive: {\n type: Boolean,\n default: false,\n },\n title: {\n type: String,\n default: '',\n },\n expand: {\n type: Boolean,\n default: true,\n },\n})\n\nconst active = ref(props.defaultActive)\n\nwatch(\n () => props.defaultActive,\n (val: boolean) => {\n active.value = val\n }\n)\n\nfunction toggle() {\n active.value = !active.value\n}\n</script>\n"],"names":["_createElementVNode","_toDisplayString","_openBlock","_createElementBlock","_unref","_createCommentVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAoBA,KAAA;AACA,IAAA,KAAS,EAAiB;;;AAEZ,KACN;AACR,IAAA,MAAA,EAAA;;;;;;;;;;;;;;;;;;;AACA,UAAM,OAAI,EAAc,MAAA;AAgBxB,SAAM,EAAA;AAEN,UAAAA,kBAAA,CAAA,KAAA,EAAA,UAAA,EAAA;AAAA,YACQA,kBAAM,CAAA,KAAA,EAAA,UAAA,EAAA;AAAA,cACM,UAAA;AAChB,cAAAA,kBAAe,CAAA,KAAA,EAAA,UAAA,EAAAC,eAAA,CAAA,OAAA,CAAA,KAAA,CAAA,EAAA,CAAA,CAAA;AAAA,aACjB,CAAA;AAAA,YACF,UAAA;AAEA,WAAA,CAAA;AACE,UAAO,OAAA,CAAA,MAAgB,IAAAC,SAAA,EAAA,EAAAC,kBAAA,CAAA,MAAA,EAAA,UAAA,EAAAF,eAAA,CAAA,MAAA,CAAA,KAAA,GAAAG,KAAA,CAAA,CAAA,CAAA,CAAA,uBAAA,CAAA,GAAAA,KAAA,CAAA,CAAA,CAAA,CAAA,sBAAA,CAAA,CAAA,EAAA,CAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA;AAAA,SACzB,CAAA;;;;;;;;;;;"}
@@ -15,3 +15,5 @@ export * from './select-input';
15
15
  export * from './select-textarea';
16
16
  export * from './input-range';
17
17
  export * from './cascader';
18
+ export * from './select';
19
+ export * from './click-input';
@@ -15,13 +15,17 @@ export { HzztSelectInput } from './select-input/index.mjs';
15
15
  export { HzztSelectTextarea } from './select-textarea/index.mjs';
16
16
  export { HzztInputRange } from './input-range/index.mjs';
17
17
  export { HzztCascader } from './cascader/index.mjs';
18
+ export { HzztSelect } from './select/index.mjs';
19
+ export { HzztClickInput } from './click-input/index.mjs';
18
20
  export { titleProps } from './title/src/title.mjs';
19
21
  export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
20
22
  export { configProviderContextKey } from './config-provider/src/constants.mjs';
21
23
  export { provideGlobalConfig, useGlobalConfig } from './config-provider/src/hooks/use-global-config.mjs';
22
- export { scanEmits, scanProps } from './scan/src/scan2.mjs';
24
+ export { scanEmits, scanProps } from './scan/src/scan.mjs';
23
25
  export { selectInputEmits, selectInputProps } from './select-input/src/select-input.mjs';
24
26
  export { selectTextareaEmits, selectTextareaProps } from './select-textarea/src/select-textarea.mjs';
25
27
  export { inputRangeEmits, inputRangeProps } from './input-range/src/input-range.mjs';
26
28
  export { cascaderEmits, cascaderProps } from './cascader/src/cascader.mjs';
29
+ export { selectEmits, selectProps } from './select/src/select.mjs';
30
+ export { clickInputEmits, clickInputProps } from './click-input/src/click-input.mjs';
27
31
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
- import Scan from './src/scan.mjs';
3
- export { scanEmits, scanProps } from './src/scan2.mjs';
2
+ import Scan from './src/scan2.mjs';
3
+ export { scanEmits, scanProps } from './src/scan.mjs';
4
4
  import { withInstall } from '../../utils/vue/install.mjs';
5
5
 
6
6
  const HzztScan = withInstall(Scan);
@@ -1,149 +1,28 @@
1
- import { createElementVNode, defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, toDisplayString } from 'vue';
2
- import { ElInput } from 'element-plus';
3
- import { scanProps, scanEmits } from './scan2.mjs';
4
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
1
+ import '../../../utils/index.mjs';
2
+ import '../../../constants/index.mjs';
3
+ import { buildProps } from '../../../utils/vue/props/runtime.mjs';
4
+ import { UPDATE_MODEL_EVENT, CHANGE_EVENT, INPUT_EVENT } from '../../../constants/event.mjs';
5
+ import { isString } from '@vue/shared';
5
6
 
6
- const _hoisted_1 = /* @__PURE__ */ createElementVNode("div", { style: { "width": "0", "height": "0", "overflow": "hidden" } }, [
7
- /* @__PURE__ */ createElementVNode("input", {
8
- readonly: "",
9
- style: { "width": "0", "height": "0", "overflow": "hidden" }
10
- }),
11
- /* @__PURE__ */ createElementVNode("input", {
12
- readonly: "",
13
- type: "password",
14
- autocomplete: "off",
15
- style: { "width": "0", "height": "0", "overflow": "hidden" }
16
- })
17
- ], -1);
18
- const _hoisted_2 = {
19
- class: "width-100%",
20
- style: { "overflow": "hidden" }
21
- };
22
- const __default__ = defineComponent({
23
- inheritAttrs: false,
24
- name: "HzztScan"
25
- });
26
- const _sfc_main = /* @__PURE__ */ defineComponent({
27
- ...__default__,
28
- props: scanProps,
29
- emits: scanEmits,
30
- setup(__props, { expose, emit }) {
31
- const props = __props;
32
- const readonly = ref(true);
33
- const innerValue = ref(" ");
34
- const inputRef = ref();
35
- const showValue = computed(() => {
36
- if (innerValue.value === " ") {
37
- return ` ${props.placeholder}`;
38
- } else {
39
- return innerValue.value;
40
- }
41
- });
42
- const inputType = computed(() => {
43
- if (innerValue.value && !readonly.value) {
44
- return "password";
45
- } else {
46
- return "text";
47
- }
48
- });
49
- watch(() => props.modelValue, (v) => {
50
- if (!v) {
51
- innerValue.value = " ";
52
- } else {
53
- innerValue.value = ` ${changeLetter(v)}`;
54
- }
55
- });
56
- watch(() => innerValue.value, (v) => {
57
- if (!v) {
58
- innerValue.value = " ";
59
- }
60
- const str = innerValue.value[0] === " " ? innerValue.value.slice(1) : innerValue.value;
61
- const final = changeLetter(str != null ? str : "");
62
- emit("update:modelValue", final);
63
- emit("input", final);
64
- });
65
- function changeLetter(v) {
66
- if (props.letter === "upper") {
67
- return v.toLocaleUpperCase();
68
- } else if (props.letter === "lower") {
69
- return v.toLocaleLowerCase();
70
- } else {
71
- return v;
72
- }
73
- }
74
- function inputFocus() {
75
- readonly.value = false;
76
- }
77
- function inputBlur() {
78
- readonly.value = true;
79
- }
80
- function inputChange() {
81
- emit("change", props.modelValue);
82
- }
83
- function focus() {
84
- readonly.value = false;
85
- setTimeout(() => {
86
- inputRef.value.focus();
87
- });
88
- }
89
- function blur() {
90
- readonly.value = true;
91
- inputRef.value.blur();
92
- }
93
- function clear() {
94
- inputRef.value.clear();
95
- }
96
- expose({
97
- focus,
98
- blur,
99
- clear
100
- });
101
- return (_ctx, _cache) => {
102
- return openBlock(), createElementBlock("div", {
103
- class: normalizeClass(["hzzt-scan", _ctx.$attrs.class]),
104
- style: normalizeStyle([{ "position": "relative" }, _ctx.$attrs.style])
105
- }, [
106
- _hoisted_1,
107
- createVNode(unref(ElInput), mergeProps({
108
- ref_key: "inputRef",
109
- ref: inputRef,
110
- modelValue: innerValue.value,
111
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => innerValue.value = $event)
112
- }, {
113
- ..._ctx.$attrs,
114
- class: "",
115
- style: "",
116
- onChange: ""
117
- }, {
118
- readonly: readonly.value,
119
- type: unref(inputType),
120
- class: "hzzt-scan-input-original",
121
- autocomplete: "off",
122
- onFocus: inputFocus,
123
- onBlur: inputBlur,
124
- onChange: inputChange
125
- }), createSlots({
126
- _: 2
127
- }, [
128
- renderList(_ctx.$slots, (_, key, index) => {
129
- return {
130
- name: key,
131
- fn: withCtx(() => [
132
- renderSlot(_ctx.$slots, key)
133
- ])
134
- };
135
- })
136
- ]), 1040, ["modelValue", "readonly", "type"]),
137
- createElementVNode("div", {
138
- class: normalizeClass(["hzzt-scan-input-backup", { "placeholder-color": innerValue.value === " " }])
139
- }, [
140
- createElementVNode("div", _hoisted_2, toDisplayString(unref(showValue)), 1)
141
- ], 2)
142
- ], 6);
143
- };
7
+ const scanProps = buildProps({
8
+ modelValue: {
9
+ type: String,
10
+ default: ""
11
+ },
12
+ placeholder: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ letter: {
17
+ type: String,
18
+ default: "upper"
144
19
  }
145
20
  });
146
- var Scan = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "scan.vue"]]);
21
+ const scanEmits = {
22
+ [UPDATE_MODEL_EVENT]: (value) => isString(value),
23
+ [CHANGE_EVENT]: (value) => isString(value),
24
+ [INPUT_EVENT]: (value) => isString(value)
25
+ };
147
26
 
148
- export { Scan as default };
27
+ export { scanEmits, scanProps };
149
28
  //# sourceMappingURL=scan.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"scan.mjs","sources":["../../../../../../packages/components/scan/src/scan.vue"],"sourcesContent":["<template>\n <div\n class=\"hzzt-scan\"\n style=\"position: relative\"\n :class=\"$attrs.class\"\n :style=\"$attrs.style\"\n >\n <div style=\"width: 0; height: 0; overflow: hidden\">\n <input readonly style=\"width: 0; height: 0; overflow: hidden\" />\n <input\n readonly\n type=\"password\"\n autocomplete=\"off\"\n style=\"width: 0; height: 0; overflow: hidden\"\n />\n </div>\n\n <el-input\n ref=\"inputRef\"\n v-model=\"innerValue\"\n v-bind=\"{\n ...$attrs,\n class: '',\n style: '',\n onChange: '',\n }\"\n :readonly=\"readonly\"\n :type=\"inputType\"\n class=\"hzzt-scan-input-original\"\n autocomplete=\"off\"\n @focus=\"inputFocus\"\n @blur=\"inputBlur\"\n @change=\"inputChange\"\n >\n <template v-for=\"(_, key, index) in $slots\" :key=\"index\" #[key]>\n <slot :name=\"key\" />\n </template>\n </el-input>\n <div\n class=\"hzzt-scan-input-backup\"\n :class=\"{ 'placeholder-color': innerValue === ' ' }\"\n >\n <div class=\"width-100%\" style=\"overflow: hidden\">\n {{ showValue }}\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { ElInput } from 'element-plus'\nimport { scanEmits, scanProps } from './scan'\n\ndefineOptions({\n inheritAttrs: false,\n name: 'HzztScan',\n})\n\nconst props = defineProps(scanProps)\n\nconst emit = defineEmits(scanEmits)\n\nconst readonly = ref(true)\nconst innerValue = ref(' ')\nconst inputRef = ref()\n\nconst showValue = computed(() => {\n if (innerValue.value === ' ') {\n return ` ${props.placeholder}`\n } else {\n return innerValue.value\n }\n})\n\nconst inputType = computed(() => {\n if (innerValue.value && !readonly.value) {\n return 'password'\n } else {\n return 'text'\n }\n})\n\nwatch(\n () => props.modelValue,\n (v) => {\n if (!v) {\n innerValue.value = ' '\n } else {\n innerValue.value = ` ${changeLetter(v)}`\n }\n }\n)\n\nwatch(\n () => innerValue.value,\n (v) => {\n if (!v) {\n innerValue.value = ' '\n }\n const str =\n innerValue.value[0] === ' ' ? innerValue.value.slice(1) : innerValue.value\n const final = changeLetter(str ?? '')\n emit('update:modelValue', final)\n emit('input', final)\n }\n)\n\nfunction changeLetter(v: string) {\n if (props.letter === 'upper') {\n return v.toLocaleUpperCase()\n } else if (props.letter === 'lower') {\n return v.toLocaleLowerCase()\n } else {\n return v\n }\n}\n\nfunction inputFocus() {\n readonly.value = false\n}\n\nfunction inputBlur() {\n readonly.value = true\n}\n\nfunction inputChange() {\n emit('change', props.modelValue)\n}\n\nfunction focus() {\n readonly.value = false\n setTimeout(() => {\n inputRef.value.focus()\n })\n}\n\nfunction blur() {\n readonly.value = true\n inputRef.value.blur()\n}\n\nfunction clear() {\n inputRef.value.clear()\n}\n\ndefineExpose({\n focus,\n blur,\n clear,\n})\n</script>\n"],"names":["_defineComponent","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_createVNode","_unref","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAkDA,EAAS,IAAA,EAAA,UAAA;AACT,CAAA,CAAA,CAAA;AACA,MAAA,4BAAqCA,eAAA,CAAA;;;AAEvB,EACZ,KAAc,EAAA,SAAA;AAAA,EACd,KAAM,CAAA,OAAA,EAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA;AACR,IAAA,MAAA,KAAA,GAAA,OAA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MAAA,CAAA,KAAA,CAAA,CAAA;AAAA,QACtB,KAAA,EAAAC,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,UAAA,EAAA,EAAA,IAAA,CAAA,MAAA,CAAA,KAAA,CAAA,CAAA;AAEA,OAAA,EAAA;AACE,QAAA;AAAqB,QACvBC,WAAA,CAAAC,KAAA,CAAA,OAAA,CAAA,EAAAC,UAAA,CAAA;AAEA,UAAa,OAAA,EAAA,UAAA;AAAA,UACX,GAAA,EAAA,QAAA;AAAA,UACA,UAAA,EAAA,UAAA,CAAA,KAAA;AAAA,UACA,qBAAA,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,MAAA,KAAA,UAAA,CAAA,KAAA,GAAA,MAAA,CAAA;AAAA,SACD,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"scan.mjs","sources":["../../../../../../packages/components/scan/src/scan.ts"],"sourcesContent":["import { buildProps, isString } from '@hzzt-plus/utils'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@hzzt-plus/constants'\nimport type Scan from './scan.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const scanProps = buildProps({\n modelValue: {\n type: String,\n default: '',\n },\n placeholder: {\n type: String,\n default: '',\n },\n letter: {\n type: String,\n default: 'upper',\n },\n} as const)\nexport type ScanProps = ExtractPropTypes<typeof scanProps>\n\nexport const scanEmits = {\n [UPDATE_MODEL_EVENT]: (value: string) => isString(value),\n [CHANGE_EVENT]: (value: string) => isString(value),\n [INPUT_EVENT]: (value: string) => isString(value),\n}\nexport type ScanEmits = typeof scanEmits\n\nexport type ScanInstance = InstanceType<typeof Scan>\n"],"names":[],"mappings":";;;;;;AAMY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,SAAS,GAAG;AACzB,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAClD,EAAE,CAAC,YAAY,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAC5C,EAAE,CAAC,WAAW,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAC3C;;;;"}