hzzt-plus 2.0.0 → 2.0.2

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 (118) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +369 -248
  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 +16 -16
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +367 -249
  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 +3 -1
  18. package/es/component.mjs.map +1 -1
  19. package/es/components/index.d.ts +1 -0
  20. package/es/components/index.mjs +4 -2
  21. package/es/components/index.mjs.map +1 -1
  22. package/es/components/input-range/index.mjs +2 -2
  23. package/es/components/input-range/src/input-range.mjs +76 -26
  24. package/es/components/input-range/src/input-range.mjs.map +1 -1
  25. package/es/components/input-range/src/input-range2.mjs +26 -76
  26. package/es/components/input-range/src/input-range2.mjs.map +1 -1
  27. package/es/components/lazy-list/index.d.ts +5 -0
  28. package/es/components/lazy-list/index.mjs +9 -0
  29. package/es/components/lazy-list/index.mjs.map +1 -0
  30. package/es/components/lazy-list/src/lazy-list.d.ts +14 -0
  31. package/es/components/lazy-list/src/lazy-list.mjs +27 -0
  32. package/es/components/lazy-list/src/lazy-list.mjs.map +1 -0
  33. package/es/components/lazy-list/src/lazy-list.vue.d.ts +57 -0
  34. package/es/components/lazy-list/src/lazy-list2.mjs +85 -0
  35. package/es/components/lazy-list/src/lazy-list2.mjs.map +1 -0
  36. package/es/components/lazy-list/style/css.d.ts +2 -0
  37. package/es/components/lazy-list/style/css.mjs +3 -0
  38. package/es/components/lazy-list/style/css.mjs.map +1 -0
  39. package/es/components/lazy-list/style/index.d.ts +2 -0
  40. package/es/components/lazy-list/style/index.mjs +3 -0
  41. package/es/components/lazy-list/style/index.mjs.map +1 -0
  42. package/es/components/select/src/select.vue.d.ts +1 -0
  43. package/es/components/select/src/select2.mjs +11 -1
  44. package/es/components/select/src/select2.mjs.map +1 -1
  45. package/es/components/select-input/index.d.ts +4 -4
  46. package/es/components/select-input/src/select-input.d.ts +1 -1
  47. package/es/components/select-input/src/select-input.mjs +1 -1
  48. package/es/components/select-input/src/select-input.mjs.map +1 -1
  49. package/es/components/select-input/src/select-input.vue.d.ts +4 -4
  50. package/es/components/select-input/src/select-input2.mjs +2 -2
  51. package/es/components/select-input/src/select-input2.mjs.map +1 -1
  52. package/es/components/select-textarea/index.mjs +2 -2
  53. package/es/components/select-textarea/src/select-textarea.d.ts +2 -1
  54. package/es/components/select-textarea/src/select-textarea.mjs +31 -100
  55. package/es/components/select-textarea/src/select-textarea.mjs.map +1 -1
  56. package/es/components/select-textarea/src/select-textarea.vue.d.ts +14 -4
  57. package/es/components/select-textarea/src/select-textarea2.mjs +105 -30
  58. package/es/components/select-textarea/src/select-textarea2.mjs.map +1 -1
  59. package/es/index.mjs +4 -2
  60. package/es/index.mjs.map +1 -1
  61. package/es/version.d.ts +1 -1
  62. package/es/version.mjs +1 -1
  63. package/es/version.mjs.map +1 -1
  64. package/global.d.ts +1 -0
  65. package/lib/component.js +3 -1
  66. package/lib/component.js.map +1 -1
  67. package/lib/components/index.d.ts +1 -0
  68. package/lib/components/index.js +7 -2
  69. package/lib/components/index.js.map +1 -1
  70. package/lib/components/input-range/index.js +2 -2
  71. package/lib/components/input-range/src/input-range.js +76 -27
  72. package/lib/components/input-range/src/input-range.js.map +1 -1
  73. package/lib/components/input-range/src/input-range2.js +27 -76
  74. package/lib/components/input-range/src/input-range2.js.map +1 -1
  75. package/lib/components/lazy-list/index.d.ts +5 -0
  76. package/lib/components/lazy-list/index.js +16 -0
  77. package/lib/components/lazy-list/index.js.map +1 -0
  78. package/lib/components/lazy-list/src/lazy-list.d.ts +14 -0
  79. package/lib/components/lazy-list/src/lazy-list.js +32 -0
  80. package/lib/components/lazy-list/src/lazy-list.js.map +1 -0
  81. package/lib/components/lazy-list/src/lazy-list.vue.d.ts +57 -0
  82. package/lib/components/lazy-list/src/lazy-list2.js +89 -0
  83. package/lib/components/lazy-list/src/lazy-list2.js.map +1 -0
  84. package/lib/components/lazy-list/style/css.d.ts +2 -0
  85. package/lib/components/lazy-list/style/css.js +6 -0
  86. package/lib/components/lazy-list/style/css.js.map +1 -0
  87. package/lib/components/lazy-list/style/index.d.ts +2 -0
  88. package/lib/components/lazy-list/style/index.js +6 -0
  89. package/lib/components/lazy-list/style/index.js.map +1 -0
  90. package/lib/components/select/src/select.vue.d.ts +1 -0
  91. package/lib/components/select/src/select2.js +11 -1
  92. package/lib/components/select/src/select2.js.map +1 -1
  93. package/lib/components/select-input/index.d.ts +4 -4
  94. package/lib/components/select-input/src/select-input.d.ts +1 -1
  95. package/lib/components/select-input/src/select-input.js +1 -1
  96. package/lib/components/select-input/src/select-input.js.map +1 -1
  97. package/lib/components/select-input/src/select-input.vue.d.ts +4 -4
  98. package/lib/components/select-input/src/select-input2.js +2 -2
  99. package/lib/components/select-input/src/select-input2.js.map +1 -1
  100. package/lib/components/select-textarea/index.js +2 -2
  101. package/lib/components/select-textarea/src/select-textarea.d.ts +2 -1
  102. package/lib/components/select-textarea/src/select-textarea.js +32 -100
  103. package/lib/components/select-textarea/src/select-textarea.js.map +1 -1
  104. package/lib/components/select-textarea/src/select-textarea.vue.d.ts +14 -4
  105. package/lib/components/select-textarea/src/select-textarea2.js +105 -31
  106. package/lib/components/select-textarea/src/select-textarea2.js.map +1 -1
  107. package/lib/index.js +37 -32
  108. package/lib/index.js.map +1 -1
  109. package/lib/version.d.ts +1 -1
  110. package/lib/version.js +1 -1
  111. package/lib/version.js.map +1 -1
  112. package/package.json +1 -1
  113. package/tags.json +1 -1
  114. package/theme/hzzt-lazy-list.css +1 -0
  115. package/theme/index.css +1 -1
  116. package/theme/src/index.scss +1 -0
  117. package/theme/src/lazy-list.scss +21 -0
  118. package/web-types.json +1 -1
@@ -2,109 +2,41 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- var selectTextarea = require('./select-textarea2.js');
5
+ require('../../../utils/index.js');
7
6
  require('../../../hooks/index.js');
8
- var elementPlus = require('element-plus');
9
- var title = require('../../title/src/title2.js');
10
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
11
- var index = require('../../../hooks/use-namespace/index.js');
12
- var index$1 = require('../../../hooks/use-size/index.js');
13
- var index$2 = require('../../../hooks/use-cursor/index.js');
7
+ require('../../../constants/index.js');
8
+ var runtime = require('../../../utils/vue/props/runtime.js');
9
+ var index = require('../../../hooks/use-size/index.js');
10
+ var event = require('../../../constants/event.js');
11
+ var shared = require('@vue/shared');
12
+ var types = require('../../../utils/types.js');
14
13
 
15
- const _hoisted_1 = { class: "flex column" };
16
- const _hoisted_2 = { class: "flex align-items-center" };
17
- const __default__ = vue.defineComponent({
18
- name: "HzztSelectTextarea"
19
- });
20
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
21
- ...__default__,
22
- props: selectTextarea.selectTextareaProps,
23
- emits: selectTextarea.selectTextareaEmits,
24
- setup(__props, { emit }) {
25
- const props = __props;
26
- const inputVal = vue.ref(props.modelValue);
27
- const selectValue = vue.ref("");
28
- const inputRef = vue.ref();
29
- const nsInput = index.useNamespace("select-textarea");
30
- const formSize = elementPlus.useFormSize();
31
- const formDisabled = elementPlus.useFormDisabled();
32
- const trueSize = vue.computed(() => props.size || formSize.value || index$1.useGlobalSize().value);
33
- const trueDisabled = vue.computed(() => props.disabled || formDisabled.value);
34
- const containerCls = vue.computed(() => [
35
- nsInput.b(),
36
- nsInput.m(trueSize.value)
37
- ]);
38
- const _inputProps = vue.computed(() => ({
39
- disabled: trueDisabled.value,
40
- clearable: true,
41
- ...props.inputProps,
42
- type: "textarea"
43
- }));
44
- vue.watch(() => props.modelValue, (v) => {
45
- inputVal.value = v;
46
- });
47
- function input(val) {
48
- emit("update:modelValue", val);
49
- emit("input", val);
50
- }
51
- function change(val) {
52
- emit("change", val);
53
- }
54
- function selectChange(val) {
55
- if (!inputVal.value && inputVal.value !== 0)
56
- inputVal.value = "";
57
- selectValue.value = "";
58
- let content = val;
59
- if (!props.replace) {
60
- const inputEl = inputRef.value.$el.getElementsByTagName("textarea")[0];
61
- content = index$2.insertCursorPosition(inputEl, val);
62
- }
63
- input(content);
64
- change(content);
65
- emit("select", val);
66
- }
67
- return (_ctx, _cache) => {
68
- return vue.openBlock(), vue.createElementBlock("div", {
69
- class: vue.normalizeClass(vue.unref(containerCls))
70
- }, [
71
- vue.createElementVNode("div", _hoisted_1, [
72
- vue.createElementVNode("div", _hoisted_2, [
73
- vue.renderSlot(_ctx.$slots, "title", {}, () => [
74
- vue.createVNode(title["default"], {
75
- class: "margin-l-1",
76
- label: _ctx.label
77
- }, null, 8, ["label"])
78
- ]),
79
- !vue.unref(trueDisabled) ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElSelectV2), {
80
- key: 0,
81
- class: "flex-1",
82
- modelValue: selectValue.value,
83
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectValue.value = $event),
84
- "allow-create": "",
85
- filterable: "",
86
- clearable: "",
87
- onChange: selectChange,
88
- options: _ctx.data
89
- }, null, 8, ["modelValue", "options"])) : vue.createCommentVNode("v-if", true),
90
- vue.renderSlot(_ctx.$slots, "right")
91
- ]),
92
- vue.createVNode(vue.unref(elementPlus.ElInput), vue.mergeProps({
93
- ref_key: "inputRef",
94
- ref: inputRef,
95
- class: "flex-1 margin-t-1",
96
- modelValue: inputVal.value,
97
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputVal.value = $event)
98
- }, vue.unref(_inputProps), {
99
- onInput: input,
100
- onChange: change
101
- }), null, 16, ["modelValue"])
102
- ])
103
- ], 2);
104
- };
14
+ const selectTextareaProps = runtime.buildProps({
15
+ size: index.useSizeProp,
16
+ disabled: Boolean,
17
+ label: String,
18
+ options: {
19
+ type: runtime.definePropType(Array),
20
+ default: () => []
21
+ },
22
+ inputProps: Object,
23
+ selectProps: Object,
24
+ replace: Boolean,
25
+ modelValue: {
26
+ type: runtime.definePropType([
27
+ String,
28
+ Number
29
+ ]),
30
+ default: ""
105
31
  }
106
32
  });
107
- var SelectTextarea = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "select-textarea.vue"]]);
33
+ const selectTextareaEmits = {
34
+ [event.UPDATE_MODEL_EVENT]: (val) => shared.isString(val) || types.isNumber(val) || types.isBoolean(val),
35
+ [event.CHANGE_EVENT]: (val) => shared.isString(val) || types.isNumber(val) || types.isBoolean(val),
36
+ [event.INPUT_EVENT]: (val) => shared.isString(val) || types.isNumber(val) || types.isBoolean(val),
37
+ select: (val) => shared.isString(val) || types.isNumber(val) || types.isBoolean(val)
38
+ };
108
39
 
109
- exports["default"] = SelectTextarea;
40
+ exports.selectTextareaEmits = selectTextareaEmits;
41
+ exports.selectTextareaProps = selectTextareaProps;
110
42
  //# sourceMappingURL=select-textarea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-textarea.js","sources":["../../../../../../packages/components/select-textarea/src/select-textarea.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\">\n <div class=\"flex column\">\n <div class=\"flex align-items-center\">\n <slot name=\"title\">\n <hzzt-title class=\"margin-l-1\" :label=\"label\"></hzzt-title>\n </slot>\n <el-select-v2 class=\"flex-1\" v-model=\"selectValue\" allow-create filterable clearable @change=\"selectChange\"\n v-if=\"!trueDisabled\" :options=\"data\"></el-select-v2>\n <slot name=\"right\"></slot>\n </div>\n <el-input ref=\"inputRef\" class=\"flex-1 margin-t-1\" v-model=\"inputVal\" v-bind=\"_inputProps\"\n @input=\"input\"\n @change=\"change\"></el-input>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {selectTextareaProps, selectTextareaEmits} from './select-textarea'\n import {computed, ref, watch} from \"vue\";\n import {useGlobalSize, useNamespace, insertCursorPosition} from \"@hzzt-plus/hooks\";\n import {useFormDisabled, useFormSize} from \"element-plus\";\n import HzztTitle from \"@hzzt-plus/components/title/src/title.vue\";\n import {ElInput, ElSelectV2} from 'element-plus'\n\n defineOptions({\n name: 'HzztSelectTextarea',\n })\n\n const props = defineProps(selectTextareaProps)\n const emit = defineEmits(selectTextareaEmits)\n\n const inputVal = ref(props.modelValue);\n const selectValue = ref('');\n const inputRef = ref();\n\n const nsInput = useNamespace('select-textarea')\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 containerCls = computed(() => [\n nsInput.b(),\n nsInput.m(trueSize.value),\n ])\n\n const _inputProps = computed(() => ({\n disabled: trueDisabled.value,\n clearable: true,\n ...props.inputProps,\n type: 'textarea',\n }))\n\n watch(() => props.modelValue, (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(val: string) {\n emit('change', val);\n }\n\n function selectChange(val: string) {\n if (!inputVal.value && inputVal.value !== 0) inputVal.value = '';\n selectValue.value = '';\n let content = val;\n if (!props.replace) {\n const inputEl = inputRef.value.$el.getElementsByTagName('textarea')[0];\n content = insertCursorPosition(inputEl, val);\n }\n input(content);\n change(content);\n emit('select', val);\n }\n\n\n</script>\n"],"names":["ref","useNamespace","useFormSize","useFormDisabled","computed","useGlobalSize","watch","insertCursorPosition","_openBlock","_createElementBlock"],"mappings":";;;;;;;;;;;;;;;;uCA0BgB,CAAA;AAAA,EACZ,IAAM,EAAA,oBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,QAAA,GAAWA,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AACrC,IAAM,MAAA,WAAA,GAAcA,QAAI,EAAE,CAAA,CAAA;AAC1B,IAAA,MAAM,WAAWA,OAAI,EAAA,CAAA;AAErB,IAAM,MAAA,OAAA,GAAUC,mBAAa,iBAAiB,CAAA,CAAA;AAC9C,IAAA,MAAM,WAAWC,uBAAY,EAAA,CAAA;AAC7B,IAAA,MAAM,eAAeC,2BAAgB,EAAA,CAAA;AAErC,IAAA,MAAM,QAAW,GAAAC,YAAA,CAAA,MAAA,KAAA,CAAA,IAAA,IAAA,QAAA,CAAA,KAAA,IAAAC,qBAAA,EAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,kBACH,GAAAD,YAAiB,CAAA,MAAA,kBAAuB,YAAE,CAAA,KAAA,CAAA,CAAA;AAAA,IACxD,MAAA,YAAA,GAAAA,YAAA,CAAA,MAAA;AAEA,MAAA;AAEA,MAAM,OAAA,CAAA,CAAA,CAAA,QAAA,CAAe;AAAe,KAAA,CAClC;AAAU,IACV,MAAA,WAAU,GAAAA,YAAc,CAAA,OAAA;AAAA,MACzB,QAAA,EAAA,YAAA,CAAA,KAAA;AAED,MAAM,SAAA,EAAA,IAAA;AAA8B,MAClC,mBAAuB;AAAA,MACvB,IAAW,EAAA,UAAA;AAAA,KAAA,CACX;AAAS,IAAAE,SACH,CAAA,MAAA,KAAA,CAAA,UAAA,EAAA,CAAA,CAAA,KAAA;AAAA,MACN,QAAA,CAAA,KAAA,GAAA,CAAA,CAAA;AAEF,KAAA,CAAA,CAAA;AACE,IAAA,SAAA,KAAiB,CAAA,GAAA,EAAA;AAAA,MAClB,IAAA,CAAA,mBAAA,EAAA,GAAA,CAAA,CAAA;AAED,MAAA,IAAA,CAAA,SAA4B,GAAA,CAAA,CAAA;AAC1B,KAAA;AACA,IAAA,gBAAc,GAAG,EAAA;AAAA,MACnB,IAAA,CAAA,QAAA,EAAA,GAAA,CAAA,CAAA;AAEA,KAAA;AACE,IAAA,qBAAkB,CAAA,GAAA,EAAA;AAAA,MACpB,IAAA,CAAA,QAAA,CAAA,KAAA,IAAA,QAAA,CAAA,KAAA,KAAA,CAAA;AAEA,QAAA,mBAAmC,CAAA;AACjC,MAAA,WAAK,CAAA,KAAkB,GAAA,EAAA,CAAA;AAAsB,MAAA,IAAA,OAAS,GAAQ,GAAA,CAAA;AAC9D,MAAA,IAAA,CAAA,KAAA,CAAA,OAAoB,EAAA;AACpB,QAAA,MAAc,OAAA,GAAA,QAAA,CAAA,KAAA,CAAA,GAAA,CAAA,oBAAA,CAAA,UAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACd,QAAI,UAAgBC,4BAAA,CAAA,OAAA,EAAA,GAAA,CAAA,CAAA;AAClB,OAAA;AACA,MAAU,KAAA,CAAA,OAAA,CAAA,CAAA;AAAiC,MAC7C,MAAA,CAAA,OAAA,CAAA,CAAA;AACA,MAAA,IAAA,CAAA,QAAa,EAAA,GAAA,CAAA,CAAA;AACb,KAAA;AACA,IAAA,OAAK,aAAa,KAAA;AAAA,MACpB,OAAAC,aAAA,EAAA,EAAAC,sBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"select-textarea.js","sources":["../../../../../../packages/components/select-textarea/src/select-textarea.ts"],"sourcesContent":["import {buildProps, definePropType, isString, isNumber, isBoolean} from '@hzzt-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type SelectTextarea from './select-textarea.vue'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\nimport {OptionType} from \"@hzzt-plus/components\";\nimport {CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\n\nexport const selectTextareaProps = buildProps({\n size: useSizeProp,\n disabled: Boolean,\n label: String,\n options: {\n type: definePropType<OptionType[]>(Array),\n default: () => [],\n },\n inputProps: Object,\n selectProps: Object,\n replace: Boolean,\n modelValue: {\n type: definePropType<string | number | null | undefined>([\n String,\n Number,\n ]),\n default: '',\n },\n})\n\nexport type SelectTextareaProps = ExtractPropTypes<typeof selectTextareaProps>\n\nexport const selectTextareaEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n [CHANGE_EVENT]: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n [INPUT_EVENT]: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n select: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\nexport type SelectTextareaEmits = typeof selectTextareaEmits\n\nexport type SelectTextareaInstance = InstanceType<typeof SelectTextarea>\n"],"names":["buildProps","useSizeProp","definePropType","UPDATE_MODEL_EVENT","isString","isNumber","isBoolean","CHANGE_EVENT","INPUT_EVENT"],"mappings":";;;;;;;;;;;;;AAGY,MAAC,mBAAmB,GAAGA,kBAAU,CAAC;AAC9C,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEC,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEA,sBAAc,CAAC;AACzB,MAAM,MAAM;AACZ,MAAM,MAAM;AACZ,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACS,MAAC,mBAAmB,GAAG;AACnC,EAAE,CAACC,wBAAkB,GAAG,CAAC,GAAG,KAAKC,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC,IAAIC,eAAS,CAAC,GAAG,CAAC;AACjF,EAAE,CAACC,kBAAY,GAAG,CAAC,GAAG,KAAKH,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC,IAAIC,eAAS,CAAC,GAAG,CAAC;AAC3E,EAAE,CAACE,iBAAW,GAAG,CAAC,GAAG,KAAKJ,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC,IAAIC,eAAS,CAAC,GAAG,CAAC;AAC1E,EAAE,MAAM,EAAE,CAAC,GAAG,KAAKF,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC,IAAIC,eAAS,CAAC,GAAG,CAAC;AACnE;;;;;"}
@@ -7,8 +7,9 @@ declare const _default: import("vue").DefineComponent<{
7
7
  };
8
8
  disabled: BooleanConstructor;
9
9
  label: StringConstructor;
10
- data: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]) | ((new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]))[], unknown, unknown, () => never[], boolean>;
10
+ options: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]) | ((new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]))[], unknown, unknown, () => never[], boolean>;
11
11
  inputProps: ObjectConstructor;
12
+ selectProps: ObjectConstructor;
12
13
  replace: BooleanConstructor;
13
14
  modelValue: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown, string, boolean>;
14
15
  }, {
@@ -21,8 +22,9 @@ declare const _default: import("vue").DefineComponent<{
21
22
  };
22
23
  disabled: BooleanConstructor;
23
24
  label: StringConstructor;
24
- data: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]) | ((new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]))[], unknown, unknown, () => never[], boolean>;
25
+ options: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]) | ((new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]))[], unknown, unknown, () => never[], boolean>;
25
26
  inputProps: ObjectConstructor;
27
+ selectProps: ObjectConstructor;
26
28
  replace: BooleanConstructor;
27
29
  modelValue: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown, string, boolean>;
28
30
  }>> & {
@@ -63,6 +65,13 @@ declare const _default: import("vue").DefineComponent<{
63
65
  disabled: boolean;
64
66
  clearable: boolean;
65
67
  }>;
68
+ _selectProps: import("vue").ComputedRef<{
69
+ options: import("../..").OptionType[];
70
+ size: "" | "default" | "small" | "large";
71
+ filterable: boolean;
72
+ clearable: boolean;
73
+ allowCreate: boolean;
74
+ }>;
66
75
  input: (val: string) => void;
67
76
  change: (val: string) => void;
68
77
  selectChange: (val: string) => void;
@@ -13096,8 +13105,9 @@ declare const _default: import("vue").DefineComponent<{
13096
13105
  };
13097
13106
  disabled: BooleanConstructor;
13098
13107
  label: StringConstructor;
13099
- data: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]) | ((new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]))[], unknown, unknown, () => never[], boolean>;
13108
+ options: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]) | ((new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]))[], unknown, unknown, () => never[], boolean>;
13100
13109
  inputProps: ObjectConstructor;
13110
+ selectProps: ObjectConstructor;
13101
13111
  replace: BooleanConstructor;
13102
13112
  modelValue: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown, string, boolean>;
13103
13113
  }>> & {
@@ -13107,8 +13117,8 @@ declare const _default: import("vue").DefineComponent<{
13107
13117
  onSelect?: ((val: string | number | boolean | undefined) => any) | undefined;
13108
13118
  }, {
13109
13119
  disabled: boolean;
13120
+ options: import("../..").OptionType[];
13110
13121
  modelValue: import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown>;
13111
13122
  replace: boolean;
13112
- data: import("../..").OptionType[];
13113
13123
  }>;
13114
13124
  export default _default;
@@ -2,40 +2,114 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../utils/index.js');
5
+ var vue = require('vue');
6
+ var selectTextarea = require('./select-textarea.js');
6
7
  require('../../../hooks/index.js');
7
- require('../../../constants/index.js');
8
- var runtime = require('../../../utils/vue/props/runtime.js');
9
- var index = require('../../../hooks/use-size/index.js');
10
- var event = require('../../../constants/event.js');
11
- var shared = require('@vue/shared');
12
- var types = require('../../../utils/types.js');
8
+ var elementPlus = require('element-plus');
9
+ var title = require('../../title/src/title2.js');
10
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
11
+ var index = require('../../../hooks/use-namespace/index.js');
12
+ var index$1 = require('../../../hooks/use-size/index.js');
13
+ var index$2 = require('../../../hooks/use-cursor/index.js');
13
14
 
14
- const selectTextareaProps = runtime.buildProps({
15
- size: index.useSizeProp,
16
- disabled: Boolean,
17
- label: String,
18
- data: {
19
- type: runtime.definePropType(Array),
20
- default: () => []
21
- },
22
- inputProps: Object,
23
- replace: Boolean,
24
- modelValue: {
25
- type: runtime.definePropType([
26
- String,
27
- Number
28
- ]),
29
- default: ""
15
+ const _hoisted_1 = { class: "flex column" };
16
+ const _hoisted_2 = { class: "flex align-items-center" };
17
+ const __default__ = vue.defineComponent({
18
+ name: "HzztSelectTextarea"
19
+ });
20
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
21
+ ...__default__,
22
+ props: selectTextarea.selectTextareaProps,
23
+ emits: selectTextarea.selectTextareaEmits,
24
+ setup(__props, { emit }) {
25
+ const props = __props;
26
+ const inputVal = vue.ref(props.modelValue);
27
+ const selectValue = vue.ref("");
28
+ const inputRef = vue.ref();
29
+ const nsInput = index.useNamespace("select-textarea");
30
+ const formSize = elementPlus.useFormSize();
31
+ const formDisabled = elementPlus.useFormDisabled();
32
+ const trueSize = vue.computed(() => props.size || formSize.value || index$1.useGlobalSize().value);
33
+ const trueDisabled = vue.computed(() => props.disabled || formDisabled.value);
34
+ const containerCls = vue.computed(() => [
35
+ nsInput.b(),
36
+ nsInput.m(trueSize.value)
37
+ ]);
38
+ const _inputProps = vue.computed(() => ({
39
+ disabled: trueDisabled.value,
40
+ clearable: true,
41
+ ...props.inputProps,
42
+ type: "textarea"
43
+ }));
44
+ const _selectProps = vue.computed(() => ({
45
+ options: props.options,
46
+ size: trueSize.value,
47
+ filterable: true,
48
+ clearable: true,
49
+ allowCreate: true,
50
+ ...props.selectProps
51
+ }));
52
+ vue.watch(() => props.modelValue, (v) => {
53
+ inputVal.value = v;
54
+ });
55
+ function input(val) {
56
+ emit("update:modelValue", val);
57
+ emit("input", val);
58
+ }
59
+ function change(val) {
60
+ emit("change", val);
61
+ }
62
+ function selectChange(val) {
63
+ if (!inputVal.value && inputVal.value !== 0)
64
+ inputVal.value = "";
65
+ selectValue.value = "";
66
+ let content = val;
67
+ if (!props.replace) {
68
+ const inputEl = inputRef.value.$el.getElementsByTagName("textarea")[0];
69
+ content = index$2.insertCursorPosition(inputEl, val);
70
+ }
71
+ input(content);
72
+ change(content);
73
+ emit("select", val);
74
+ }
75
+ return (_ctx, _cache) => {
76
+ return vue.openBlock(), vue.createElementBlock("div", {
77
+ class: vue.normalizeClass(vue.unref(containerCls))
78
+ }, [
79
+ vue.createElementVNode("div", _hoisted_1, [
80
+ vue.createElementVNode("div", _hoisted_2, [
81
+ vue.renderSlot(_ctx.$slots, "title", {}, () => [
82
+ vue.createVNode(title["default"], {
83
+ size: vue.unref(trueSize),
84
+ class: "margin-l-1",
85
+ label: _ctx.label
86
+ }, null, 8, ["size", "label"])
87
+ ]),
88
+ !vue.unref(trueDisabled) ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElSelectV2), vue.mergeProps({
89
+ key: 0,
90
+ class: "flex-1",
91
+ modelValue: selectValue.value,
92
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectValue.value = $event),
93
+ onChange: selectChange
94
+ }, vue.unref(_selectProps)), null, 16, ["modelValue"])) : vue.createCommentVNode("v-if", true),
95
+ vue.renderSlot(_ctx.$slots, "right")
96
+ ]),
97
+ vue.createVNode(vue.unref(elementPlus.ElInput), vue.mergeProps({
98
+ ref_key: "inputRef",
99
+ ref: inputRef,
100
+ class: "flex-1 margin-t-1",
101
+ modelValue: inputVal.value,
102
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputVal.value = $event)
103
+ }, vue.unref(_inputProps), {
104
+ onInput: input,
105
+ onChange: change
106
+ }), null, 16, ["modelValue"])
107
+ ])
108
+ ], 2);
109
+ };
30
110
  }
31
111
  });
32
- const selectTextareaEmits = {
33
- [event.UPDATE_MODEL_EVENT]: (val) => shared.isString(val) || types.isNumber(val) || types.isBoolean(val),
34
- [event.CHANGE_EVENT]: (val) => shared.isString(val) || types.isNumber(val) || types.isBoolean(val),
35
- [event.INPUT_EVENT]: (val) => shared.isString(val) || types.isNumber(val) || types.isBoolean(val),
36
- select: (val) => shared.isString(val) || types.isNumber(val) || types.isBoolean(val)
37
- };
112
+ var SelectTextarea = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "select-textarea.vue"]]);
38
113
 
39
- exports.selectTextareaEmits = selectTextareaEmits;
40
- exports.selectTextareaProps = selectTextareaProps;
114
+ exports["default"] = SelectTextarea;
41
115
  //# sourceMappingURL=select-textarea2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-textarea2.js","sources":["../../../../../../packages/components/select-textarea/src/select-textarea.ts"],"sourcesContent":["import {buildProps, definePropType, isString, isNumber, isBoolean} from '@hzzt-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type SelectTextarea from './select-textarea.vue'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\nimport {OptionType} from \"@hzzt-plus/components\";\nimport {CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\n\nexport const selectTextareaProps = buildProps({\n size: useSizeProp,\n disabled: Boolean,\n label: String,\n data: {\n type: definePropType<OptionType[]>(Array),\n default: () => [],\n },\n inputProps: Object,\n replace: Boolean,\n modelValue: {\n type: definePropType<string | number | null | undefined>([\n String,\n Number,\n ]),\n default: '',\n },\n})\n\nexport type SelectTextareaProps = ExtractPropTypes<typeof selectTextareaProps>\n\nexport const selectTextareaEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n [CHANGE_EVENT]: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n [INPUT_EVENT]: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n select: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\nexport type SelectTextareaEmits = typeof selectTextareaEmits\n\nexport type SelectTextareaInstance = InstanceType<typeof SelectTextarea>\n"],"names":["buildProps","useSizeProp","definePropType","UPDATE_MODEL_EVENT","isString","isNumber","isBoolean","CHANGE_EVENT","INPUT_EVENT"],"mappings":";;;;;;;;;;;;;AAGY,MAAC,mBAAmB,GAAGA,kBAAU,CAAC;AAC9C,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEA,sBAAc,CAAC;AACzB,MAAM,MAAM;AACZ,MAAM,MAAM;AACZ,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACS,MAAC,mBAAmB,GAAG;AACnC,EAAE,CAACC,wBAAkB,GAAG,CAAC,GAAG,KAAKC,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC,IAAIC,eAAS,CAAC,GAAG,CAAC;AACjF,EAAE,CAACC,kBAAY,GAAG,CAAC,GAAG,KAAKH,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC,IAAIC,eAAS,CAAC,GAAG,CAAC;AAC3E,EAAE,CAACE,iBAAW,GAAG,CAAC,GAAG,KAAKJ,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC,IAAIC,eAAS,CAAC,GAAG,CAAC;AAC1E,EAAE,MAAM,EAAE,CAAC,GAAG,KAAKF,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC,IAAIC,eAAS,CAAC,GAAG,CAAC;AACnE;;;;;"}
1
+ {"version":3,"file":"select-textarea2.js","sources":["../../../../../../packages/components/select-textarea/src/select-textarea.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\">\n <div class=\"flex column\">\n <div class=\"flex align-items-center\">\n <slot name=\"title\">\n <hzzt-title :size=\"trueSize\" class=\"margin-l-1\" :label=\"label\"></hzzt-title>\n </slot>\n <el-select-v2 class=\"flex-1\" v-model=\"selectValue\" @change=\"selectChange\"\n v-if=\"!trueDisabled\" v-bind=\"_selectProps\"></el-select-v2>\n <slot name=\"right\"></slot>\n </div>\n <el-input ref=\"inputRef\" class=\"flex-1 margin-t-1\" v-model=\"inputVal\" v-bind=\"_inputProps\"\n @input=\"input\"\n @change=\"change\"></el-input>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {selectTextareaProps, selectTextareaEmits} from './select-textarea'\n import {computed, ref, watch} from \"vue\";\n import {useGlobalSize, useNamespace, insertCursorPosition} from \"@hzzt-plus/hooks\";\n import {useFormDisabled, useFormSize} from \"element-plus\";\n import HzztTitle from \"@hzzt-plus/components/title/src/title.vue\";\n import {ElInput, ElSelectV2} from 'element-plus'\n\n defineOptions({\n name: 'HzztSelectTextarea',\n })\n\n const props = defineProps(selectTextareaProps)\n const emit = defineEmits(selectTextareaEmits)\n\n const inputVal = ref(props.modelValue);\n const selectValue = ref('');\n const inputRef = ref();\n\n const nsInput = useNamespace('select-textarea')\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 containerCls = computed(() => [\n nsInput.b(),\n nsInput.m(trueSize.value),\n ])\n\n const _inputProps = computed(() => ({\n disabled: trueDisabled.value,\n clearable: true,\n ...props.inputProps,\n type: 'textarea',\n }))\n\n const _selectProps = computed(() => ({\n options: props.options,\n size: trueSize.value,\n filterable: true,\n clearable: true,\n allowCreate: true,\n ...props.selectProps,\n }))\n\n watch(() => props.modelValue, (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(val: string) {\n emit('change', val);\n }\n\n function selectChange(val: string) {\n if (!inputVal.value && inputVal.value !== 0) inputVal.value = '';\n selectValue.value = '';\n let content = val;\n if (!props.replace) {\n const inputEl = inputRef.value.$el.getElementsByTagName('textarea')[0];\n content = insertCursorPosition(inputEl, val);\n }\n input(content);\n change(content);\n emit('select', val);\n }\n\n\n</script>\n"],"names":["ref","useNamespace","useFormSize","useFormDisabled","computed","useGlobalSize","watch","insertCursorPosition","_openBlock","_createElementBlock"],"mappings":";;;;;;;;;;;;;;;;uCA0BgB,CAAA;AAAA,EACZ,IAAM,EAAA,oBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,QAAA,GAAWA,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AACrC,IAAM,MAAA,WAAA,GAAcA,QAAI,EAAE,CAAA,CAAA;AAC1B,IAAA,MAAM,WAAWA,OAAI,EAAA,CAAA;AAErB,IAAM,MAAA,OAAA,GAAUC,mBAAa,iBAAiB,CAAA,CAAA;AAC9C,IAAA,MAAM,WAAWC,uBAAY,EAAA,CAAA;AAC7B,IAAA,MAAM,eAAeC,2BAAgB,EAAA,CAAA;AAErC,IAAA,MAAM,QAAW,GAAAC,YAAA,CAAA,MAAA,KAAA,CAAA,IAAA,IAAA,QAAA,CAAA,KAAA,IAAAC,qBAAA,EAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,kBACH,GAAAD,YAAiB,CAAA,MAAA,kBAAuB,YAAE,CAAA,KAAA,CAAA,CAAA;AAAA,IACxD,MAAA,YAAA,GAAAA,YAAA,CAAA,MAAA;AAEA,MAAA;AAEA,MAAM,OAAA,CAAA,CAAA,CAAA,QAAA,CAAe;AAAe,KAAA,CAClC;AAAU,IACV,MAAA,WAAU,GAAAA,YAAc,CAAA,OAAA;AAAA,MACzB,QAAA,EAAA,YAAA,CAAA,KAAA;AAED,MAAM,SAAA,EAAA,IAAA;AAA8B,MAClC,mBAAuB;AAAA,MACvB,IAAW,EAAA,UAAA;AAAA,KAAA,CACX;AAAS,IAAA,MACH,YAAA,GAAAA,YAAA,CAAA,OAAA;AAAA,MACN,OAAA,EAAA,KAAA,CAAA,OAAA;AAEF,MAAM,IAAA,EAAA,QAAA,CAAA;AAA+B,MACnC,UAAe,EAAA,IAAA;AAAA,MACf,SAAe,EAAA,IAAA;AAAA,MACf,WAAY,EAAA,IAAA;AAAA,MACZ,GAAW,KAAA,CAAA,WAAA;AAAA,KAAA,CACX,CAAa,CAAA;AAAA,IAAAE,SACV,CAAM,MAAA,KAAA,CAAA,UAAA,EAAA,CAAA,CAAA,KAAA;AAAA,MACT,QAAA,CAAA,KAAA,GAAA,CAAA,CAAA;AAEF,KAAA,CAAA,CAAA;AACE,IAAA,SAAA,KAAiB,CAAA,GAAA,EAAA;AAAA,MAClB,IAAA,CAAA,mBAAA,EAAA,GAAA,CAAA,CAAA;AAED,MAAA,IAAA,CAAA,SAA4B,GAAA,CAAA,CAAA;AAC1B,KAAA;AACA,IAAA,gBAAc,GAAG,EAAA;AAAA,MACnB,IAAA,CAAA,QAAA,EAAA,GAAA,CAAA,CAAA;AAEA,KAAA;AACE,IAAA,qBAAkB,CAAA,GAAA,EAAA;AAAA,MACpB,IAAA,CAAA,QAAA,CAAA,KAAA,IAAA,QAAA,CAAA,KAAA,KAAA,CAAA;AAEA,QAAA,mBAAmC,CAAA;AACjC,MAAA,WAAK,CAAA,KAAkB,GAAA,EAAA,CAAA;AAAsB,MAAA,IAAA,OAAS,GAAQ,GAAA,CAAA;AAC9D,MAAA,IAAA,CAAA,KAAA,CAAA,OAAoB,EAAA;AACpB,QAAA,MAAc,OAAA,GAAA,QAAA,CAAA,KAAA,CAAA,GAAA,CAAA,oBAAA,CAAA,UAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACd,QAAI,UAAgBC,4BAAA,CAAA,OAAA,EAAA,GAAA,CAAA,CAAA;AAClB,OAAA;AACA,MAAU,KAAA,CAAA,OAAA,CAAA,CAAA;AAAiC,MAC7C,MAAA,CAAA,OAAA,CAAA,CAAA;AACA,MAAA,IAAA,CAAA,QAAa,EAAA,GAAA,CAAA,CAAA;AACb,KAAA;AACA,IAAA,OAAK,aAAa,KAAA;AAAA,MACpB,OAAAC,aAAA,EAAA,EAAAC,sBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/lib/index.js CHANGED
@@ -28,9 +28,9 @@ var scan = require('./components/scan/src/scan.js');
28
28
  var index$c = require('./components/scan/index.js');
29
29
  var selectInput = require('./components/select-input/src/select-input.js');
30
30
  var index$d = require('./components/select-input/index.js');
31
- var selectTextarea = require('./components/select-textarea/src/select-textarea2.js');
31
+ var selectTextarea = require('./components/select-textarea/src/select-textarea.js');
32
32
  var index$e = require('./components/select-textarea/index.js');
33
- var inputRange = require('./components/input-range/src/input-range.js');
33
+ var inputRange = require('./components/input-range/src/input-range2.js');
34
34
  var index$f = require('./components/input-range/index.js');
35
35
  var cascader = require('./components/cascader/src/cascader.js');
36
36
  var index$g = require('./components/cascader/index.js');
@@ -39,20 +39,22 @@ var index$h = require('./components/select/index.js');
39
39
  var clickInput = require('./components/click-input/src/click-input.js');
40
40
  var index$i = require('./components/click-input/index.js');
41
41
  var index$j = require('./components/scroll/index.js');
42
+ var lazyList = require('./components/lazy-list/src/lazy-list.js');
43
+ var index$k = require('./components/lazy-list/index.js');
42
44
  var key = require('./constants/key.js');
43
45
  var size = require('./constants/size.js');
44
46
  var date = require('./constants/date.js');
45
47
  var event = require('./constants/event.js');
46
- var index$k = require('./directives/download/index.js');
47
- var index$l = require('./directives/height/index.js');
48
- var index$m = require('./directives/blur/index.js');
49
- var index$n = require('./directives/highlight/index.js');
50
- var index$o = require('./directives/drag/index.js');
51
- var index$p = require('./hooks/use-locale/index.js');
52
- var index$q = require('./hooks/use-size/index.js');
53
- var index$r = require('./hooks/use-namespace/index.js');
54
- var index$s = require('./hooks/use-letter/index.js');
55
- var index$t = require('./hooks/use-cursor/index.js');
48
+ var index$l = require('./directives/download/index.js');
49
+ var index$m = require('./directives/height/index.js');
50
+ var index$n = require('./directives/blur/index.js');
51
+ var index$o = require('./directives/highlight/index.js');
52
+ var index$p = require('./directives/drag/index.js');
53
+ var index$q = require('./hooks/use-locale/index.js');
54
+ var index$r = require('./hooks/use-size/index.js');
55
+ var index$s = require('./hooks/use-namespace/index.js');
56
+ var index$t = require('./hooks/use-letter/index.js');
57
+ var index$u = require('./hooks/use-cursor/index.js');
56
58
 
57
59
  const install = defaults["default"].install;
58
60
  const version = defaults["default"].version;
@@ -98,6 +100,9 @@ exports.clickInputEmits = clickInput.clickInputEmits;
98
100
  exports.clickInputProps = clickInput.clickInputProps;
99
101
  exports.HzztClickInput = index$i.HzztClickInput;
100
102
  exports.HzztScroll = index$j.HzztScroll;
103
+ exports.lazyListEmits = lazyList.lazyListEmits;
104
+ exports.lazyListProps = lazyList.lazyListProps;
105
+ exports.HzztLazyList = index$k.HzztLazyList;
101
106
  exports.INSTALLED_KEY = key.INSTALLED_KEY;
102
107
  exports.componentSizeMap = size.componentSizeMap;
103
108
  exports.componentSizes = size.componentSizes;
@@ -106,26 +111,26 @@ exports.datePickTypes = date.datePickTypes;
106
111
  exports.CHANGE_EVENT = event.CHANGE_EVENT;
107
112
  exports.INPUT_EVENT = event.INPUT_EVENT;
108
113
  exports.UPDATE_MODEL_EVENT = event.UPDATE_MODEL_EVENT;
109
- exports.Download = index$k["default"];
110
- exports.Height = index$l["default"];
111
- exports.Blur = index$m["default"];
112
- exports.Highlight = index$n["default"];
113
- exports.Drag = index$o["default"];
114
- exports.buildLocaleContext = index$p.buildLocaleContext;
115
- exports.buildTranslator = index$p.buildTranslator;
116
- exports.localeContextKey = index$p.localeContextKey;
117
- exports.translate = index$p.translate;
118
- exports.useLocale = index$p.useLocale;
119
- exports.SIZE_INJECTION_KEY = index$q.SIZE_INJECTION_KEY;
120
- exports.useGlobalSize = index$q.useGlobalSize;
121
- exports.useSizeProp = index$q.useSizeProp;
122
- exports.useSizeProps = index$q.useSizeProps;
123
- exports.defaultNamespace = index$r.defaultNamespace;
124
- exports.namespaceContextKey = index$r.namespaceContextKey;
125
- exports.useGetDerivedNamespace = index$r.useGetDerivedNamespace;
126
- exports.useNamespace = index$r.useNamespace;
127
- exports.numberToLetter = index$s.numberToLetter;
128
- exports.insertCursorPosition = index$t.insertCursorPosition;
114
+ exports.Download = index$l["default"];
115
+ exports.Height = index$m["default"];
116
+ exports.Blur = index$n["default"];
117
+ exports.Highlight = index$o["default"];
118
+ exports.Drag = index$p["default"];
119
+ exports.buildLocaleContext = index$q.buildLocaleContext;
120
+ exports.buildTranslator = index$q.buildTranslator;
121
+ exports.localeContextKey = index$q.localeContextKey;
122
+ exports.translate = index$q.translate;
123
+ exports.useLocale = index$q.useLocale;
124
+ exports.SIZE_INJECTION_KEY = index$r.SIZE_INJECTION_KEY;
125
+ exports.useGlobalSize = index$r.useGlobalSize;
126
+ exports.useSizeProp = index$r.useSizeProp;
127
+ exports.useSizeProps = index$r.useSizeProps;
128
+ exports.defaultNamespace = index$s.defaultNamespace;
129
+ exports.namespaceContextKey = index$s.namespaceContextKey;
130
+ exports.useGetDerivedNamespace = index$s.useGetDerivedNamespace;
131
+ exports.useNamespace = index$s.useNamespace;
132
+ exports.numberToLetter = index$t.numberToLetter;
133
+ exports.insertCursorPosition = index$u.insertCursorPosition;
129
134
  exports.install = install;
130
135
  exports.version = version;
131
136
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../packages/hzzt-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@hzzt-plus/components'\nexport * from '@hzzt-plus/constants'\nexport * from '@hzzt-plus/directives'\nexport * from '@hzzt-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer\n"],"names":["installer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAGA,mBAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAGA,mBAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../packages/hzzt-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@hzzt-plus/components'\nexport * from '@hzzt-plus/constants'\nexport * from '@hzzt-plus/directives'\nexport * from '@hzzt-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer\n"],"names":["installer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAGA,mBAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAGA,mBAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "2.0.0";
1
+ export declare const version = "2.0.2";
package/lib/version.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const version = "2.0.0";
5
+ const version = "2.0.2";
6
6
 
7
7
  exports.version = version;
8
8
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sources":["../../../packages/hzzt-plus/version.ts"],"sourcesContent":["export const version = '2.0.0'\n"],"names":[],"mappings":";;;;AAAY,MAAC,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"version.js","sources":["../../../packages/hzzt-plus/version.ts"],"sourcesContent":["export const version = '2.0.2'\n"],"names":[],"mappings":";;;;AAAY,MAAC,OAAO,GAAG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hzzt-plus",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "A Component Library for Vue 3",
5
5
  "keywords": [
6
6
  "hzzt-plus",
package/tags.json CHANGED
@@ -1 +1 @@
1
- {"hzzt-cascader":{"attributes":["model-value","size","disabled","options","cascader-props","clearable","readonly","placeholder"],"description":"Title"},"hzzt-check-button":{"attributes":["options","model-value","size","type","is-default"],"description":"Title"},"hzzt-click-input":{"attributes":["model-value","size","disabled","readonly","input-props"],"description":"Title"},"hzzt-collapse":{"attributes":["default-active","title","expand"],"description":"Title"},"hzzt-config-provider":{"attributes":["a11y","size","locale","keyboard-navigation"],"description":"Title"},"hzzt-confirm-password":{"attributes":["placeholder","model-value"],"description":"Title"},"hzzt-dropdown":{"attributes":["options","default-value","label","value","position","props","return-type"],"description":"Title"},"hzzt-icon":{"attributes":["name","type"],"description":"Title"},"hzzt-input-range":{"attributes":["model-value","size","disabled","clearable","start-placeholder","end-placeholder","start-props","end-props"],"description":"Title"},"hzzt-page-size":{"attributes":["model-value","page-size","total","size","page-size-options","disabled","is-manual","is-last-page"],"description":"Title"},"hzzt-pagination":{"attributes":["pagination"],"description":"Title"},"hzzt-quarter-picker":{"attributes":["format","value-format","placeholder","prefix-icon","clear-icon","size","model-value","disabled","clearable","disabled-date"],"description":"Title"},"hzzt-scan":{"attributes":["model-value","placeholder","letter"],"description":"Title"},"hzzt-select-input":{"attributes":["model-value","index-type","size","label","disabled","replace","position","data","input-props","custom-props","format-label","split"],"description":"Title"},"hzzt-select-textarea":{"attributes":["model-value","size","label","disabled","replace","data","input-props"],"description":"Title"},"hzzt-select":{"attributes":["model-value","size","select-props","disabled","options","cascader-props","clearable","readonly","replace","placeholder"],"description":"Title"},"hzzt-tab":{"attributes":["tab-list","model-value","closable"],"description":"Title"},"hzzt-title":{"attributes":["label","sideline"],"description":"Title"},"hzzt-tooltip":{"attributes":["content"],"description":"Title"}}
1
+ {"hzzt-cascader":{"attributes":["model-value","size","disabled","options","cascader-props","clearable","readonly","placeholder"],"description":"Title"},"hzzt-check-button":{"attributes":["options","model-value","size","type","is-default"],"description":"Title"},"hzzt-click-input":{"attributes":["model-value","size","disabled","readonly","input-props"],"description":"Title"},"hzzt-collapse":{"attributes":["default-active","title","expand"],"description":"Title"},"hzzt-config-provider":{"attributes":["a11y","size","locale","keyboard-navigation"],"description":"Title"},"hzzt-confirm-password":{"attributes":["placeholder","model-value"],"description":"Title"},"hzzt-dropdown":{"attributes":["options","default-value","label","value","position","props","return-type"],"description":"Title"},"hzzt-icon":{"attributes":["name","type"],"description":"Title"},"hzzt-input-range":{"attributes":["model-value","size","disabled","clearable","start-placeholder","end-placeholder","start-props","end-props"],"description":"Title"},"hzzt-lazy-list":{"attributes":["size","height","data","row-key"],"description":"LazyList"},"hzzt-page-size":{"attributes":["model-value","page-size","total","size","page-size-options","disabled","is-manual","is-last-page"],"description":"Title"},"hzzt-pagination":{"attributes":["pagination"],"description":"Title"},"hzzt-quarter-picker":{"attributes":["format","value-format","placeholder","prefix-icon","clear-icon","size","model-value","disabled","clearable","disabled-date"],"description":"Title"},"hzzt-scan":{"attributes":["model-value","placeholder","letter"],"description":"Title"},"hzzt-select-input":{"attributes":["model-value","index-type","size","label","disabled","replace","position","options","input-props","custom-props","format-label","split"],"description":"Title"},"hzzt-select-textarea":{"attributes":["model-value","size","label","disabled","replace","options","input-props","select-props"],"description":"Title"},"hzzt-select":{"attributes":["model-value","size","select-props","disabled","options","cascader-props","clearable","readonly","replace","placeholder"],"description":"Title"},"hzzt-tab":{"attributes":["tab-list","model-value","closable"],"description":"Title"},"hzzt-title":{"attributes":["label","sideline","size"],"description":"Title"},"hzzt-tooltip":{"attributes":["content"],"description":"Title"}}
@@ -0,0 +1 @@
1
+ .hzzt-lazy-list{--hzzt-lazy-current-background-color:#fff;--hzzt-lazy-border-color:#fff;--hzzt-lazy-active-border-color:getCssVar("color","primary");--hzzt-lazy-current-active-background-color:#fff}.hzzt-lazy-list__item{background:var(--hzzt-lazy-current-background-color);border-color:var(--hzzt-lazy-border-color);border:var(--hzzt-border)}.hzzt-lazy-list__item.is-active{background:var(--hzzt-lazy-current-active-background-color);border-color:var(--hzzt-lazy-active-border-color)}