hzzt-plus 1.0.6 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +558 -355
  3. package/dist/index.full.min.js +10 -10
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +13 -13
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +559 -357
  8. package/dist/locale/en.js +1 -1
  9. package/dist/locale/en.min.js +1 -1
  10. package/dist/locale/en.min.mjs +1 -1
  11. package/dist/locale/en.mjs +1 -1
  12. package/dist/locale/zh-cn.js +1 -1
  13. package/dist/locale/zh-cn.min.js +1 -1
  14. package/dist/locale/zh-cn.min.mjs +1 -1
  15. package/dist/locale/zh-cn.mjs +1 -1
  16. package/es/component.mjs +3 -1
  17. package/es/component.mjs.map +1 -1
  18. package/es/components/click-input/src/click-input2.mjs +1 -1
  19. package/es/components/click-input/src/click-input2.mjs.map +1 -1
  20. package/es/components/collapse/index.d.ts +161 -8
  21. package/es/components/collapse/src/collapse.vue.d.ts +161 -8
  22. package/es/components/collapse/src/collapse2.mjs +50 -29
  23. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  24. package/es/components/icon/index.mjs +4 -0
  25. package/es/components/icon/index.mjs.map +1 -1
  26. package/es/components/icon/src/components/index.d.ts +2 -0
  27. package/es/components/icon/src/components/index.mjs +3 -0
  28. package/es/components/icon/src/components/index.mjs.map +1 -0
  29. package/es/components/icon/src/components/minus-square-outline.mjs +29 -0
  30. package/es/components/icon/src/components/minus-square-outline.mjs.map +1 -0
  31. package/es/components/icon/src/components/minus-square-outline.vue.d.ts +2 -0
  32. package/es/components/icon/src/components/plus-square-outline.mjs +29 -0
  33. package/es/components/icon/src/components/plus-square-outline.mjs.map +1 -0
  34. package/es/components/icon/src/components/plus-square-outline.vue.d.ts +2 -0
  35. package/es/components/index.d.ts +1 -0
  36. package/es/components/index.mjs +2 -1
  37. package/es/components/index.mjs.map +1 -1
  38. package/es/components/pagination/index.d.ts +2 -2
  39. package/es/components/pagination/src/index.mjs +49 -21
  40. package/es/components/pagination/src/index.mjs.map +1 -1
  41. package/es/components/pagination/src/index.vue.d.ts +2 -2
  42. package/es/components/scroll/index.d.ts +5 -0
  43. package/es/components/scroll/index.mjs +9 -0
  44. package/es/components/scroll/index.mjs.map +1 -0
  45. package/es/components/scroll/src/scroll.d.ts +2 -0
  46. package/es/components/scroll/src/scroll.mjs +2 -0
  47. package/es/components/scroll/src/scroll.mjs.map +1 -0
  48. package/es/components/scroll/src/scroll.vue.d.ts +147 -0
  49. package/es/components/scroll/src/scroll2.mjs +88 -0
  50. package/es/components/scroll/src/scroll2.mjs.map +1 -0
  51. package/es/components/scroll/style/css.d.ts +2 -0
  52. package/es/components/scroll/style/css.mjs +3 -0
  53. package/es/components/scroll/style/css.mjs.map +1 -0
  54. package/es/components/scroll/style/index.d.ts +2 -0
  55. package/es/components/scroll/style/index.mjs +3 -0
  56. package/es/components/scroll/style/index.mjs.map +1 -0
  57. package/es/components/select-input/index.d.ts +39 -0
  58. package/es/components/select-input/src/select-input.vue.d.ts +39 -0
  59. package/es/components/select-textarea/index.mjs +2 -2
  60. package/es/components/select-textarea/src/select-textarea.mjs +100 -30
  61. package/es/components/select-textarea/src/select-textarea.mjs.map +1 -1
  62. package/es/components/select-textarea/src/select-textarea.vue.d.ts +39 -0
  63. package/es/components/select-textarea/src/select-textarea2.mjs +30 -100
  64. package/es/components/select-textarea/src/select-textarea2.mjs.map +1 -1
  65. package/es/components/title/src/title.d.ts +6 -0
  66. package/es/components/title/src/title.mjs +4 -1
  67. package/es/components/title/src/title.mjs.map +1 -1
  68. package/es/components/title/src/title.vue.d.ts +39 -0
  69. package/es/components/title/src/title2.mjs +28 -12
  70. package/es/components/title/src/title2.mjs.map +1 -1
  71. package/es/index.mjs +2 -1
  72. package/es/index.mjs.map +1 -1
  73. package/es/version.d.ts +1 -1
  74. package/es/version.mjs +1 -1
  75. package/es/version.mjs.map +1 -1
  76. package/global.d.ts +1 -0
  77. package/lib/component.js +3 -1
  78. package/lib/component.js.map +1 -1
  79. package/lib/components/click-input/src/click-input2.js +1 -1
  80. package/lib/components/click-input/src/click-input2.js.map +1 -1
  81. package/lib/components/collapse/index.d.ts +161 -8
  82. package/lib/components/collapse/src/collapse.vue.d.ts +161 -8
  83. package/lib/components/collapse/src/collapse2.js +49 -28
  84. package/lib/components/collapse/src/collapse2.js.map +1 -1
  85. package/lib/components/icon/index.js +4 -0
  86. package/lib/components/icon/index.js.map +1 -1
  87. package/lib/components/icon/src/components/index.d.ts +2 -0
  88. package/lib/components/icon/src/components/index.js +12 -0
  89. package/lib/components/icon/src/components/index.js.map +1 -0
  90. package/lib/components/icon/src/components/minus-square-outline.js +33 -0
  91. package/lib/components/icon/src/components/minus-square-outline.js.map +1 -0
  92. package/lib/components/icon/src/components/minus-square-outline.vue.d.ts +2 -0
  93. package/lib/components/icon/src/components/plus-square-outline.js +33 -0
  94. package/lib/components/icon/src/components/plus-square-outline.js.map +1 -0
  95. package/lib/components/icon/src/components/plus-square-outline.vue.d.ts +2 -0
  96. package/lib/components/index.d.ts +1 -0
  97. package/lib/components/index.js +3 -1
  98. package/lib/components/index.js.map +1 -1
  99. package/lib/components/pagination/index.d.ts +2 -2
  100. package/lib/components/pagination/src/index.js +48 -20
  101. package/lib/components/pagination/src/index.js.map +1 -1
  102. package/lib/components/pagination/src/index.vue.d.ts +2 -2
  103. package/lib/components/scroll/index.d.ts +5 -0
  104. package/lib/components/scroll/index.js +14 -0
  105. package/lib/components/scroll/index.js.map +1 -0
  106. package/lib/components/scroll/src/scroll.d.ts +2 -0
  107. package/lib/components/scroll/src/scroll.js +3 -0
  108. package/lib/components/scroll/src/scroll.js.map +1 -0
  109. package/lib/components/scroll/src/scroll.vue.d.ts +147 -0
  110. package/lib/components/scroll/src/scroll2.js +92 -0
  111. package/lib/components/scroll/src/scroll2.js.map +1 -0
  112. package/lib/components/scroll/style/css.d.ts +2 -0
  113. package/lib/components/scroll/style/css.js +6 -0
  114. package/lib/components/scroll/style/css.js.map +1 -0
  115. package/lib/components/scroll/style/index.d.ts +2 -0
  116. package/lib/components/scroll/style/index.js +6 -0
  117. package/lib/components/scroll/style/index.js.map +1 -0
  118. package/lib/components/select-input/index.d.ts +39 -0
  119. package/lib/components/select-input/src/select-input.vue.d.ts +39 -0
  120. package/lib/components/select-textarea/index.js +2 -2
  121. package/lib/components/select-textarea/src/select-textarea.js +100 -31
  122. package/lib/components/select-textarea/src/select-textarea.js.map +1 -1
  123. package/lib/components/select-textarea/src/select-textarea.vue.d.ts +39 -0
  124. package/lib/components/select-textarea/src/select-textarea2.js +31 -100
  125. package/lib/components/select-textarea/src/select-textarea2.js.map +1 -1
  126. package/lib/components/title/src/title.d.ts +6 -0
  127. package/lib/components/title/src/title.js +4 -1
  128. package/lib/components/title/src/title.js.map +1 -1
  129. package/lib/components/title/src/title.vue.d.ts +39 -0
  130. package/lib/components/title/src/title2.js +27 -11
  131. package/lib/components/title/src/title2.js.map +1 -1
  132. package/lib/index.js +33 -31
  133. package/lib/index.js.map +1 -1
  134. package/lib/version.d.ts +1 -1
  135. package/lib/version.js +1 -1
  136. package/lib/version.js.map +1 -1
  137. package/package.json +1 -1
  138. package/theme/hzzt-collapse.css +1 -1
  139. package/theme/hzzt-pagination.css +1 -1
  140. package/theme/hzzt-scan.css +1 -1
  141. package/theme/hzzt-scroll.css +1 -0
  142. package/theme/hzzt-title.css +1 -1
  143. package/theme/index.css +1 -1
  144. package/theme/src/collapse.scss +45 -39
  145. package/theme/src/index.scss +1 -0
  146. package/theme/src/pagination.scss +24 -6
  147. package/theme/src/scan.scss +3 -3
  148. package/theme/src/scroll.scss +42 -0
  149. package/theme/src/title.scss +14 -5
  150. package/web-types.json +1 -1
@@ -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/scroll.scss';
@@ -0,0 +1,3 @@
1
+ import '../../base/style/index.mjs';
2
+ import 'hzzt-plus/theme/src/scroll.scss';
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -88,13 +88,46 @@ export declare const HzztSelectInput: import("hzzt-plus/es/utils").SFCWithInstal
88
88
  HzztTitle: import("vue").DefineComponent<{
89
89
  readonly label: StringConstructor;
90
90
  readonly sideline: import("hzzt-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
91
+ readonly size: {
92
+ readonly type: import("vue").PropType<import("hzzt-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
93
+ readonly required: false;
94
+ readonly validator: ((val: unknown) => boolean) | undefined;
95
+ __epPropKey: true;
96
+ };
91
97
  }, {
92
98
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
93
99
  readonly label: StringConstructor;
94
100
  readonly sideline: import("hzzt-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
101
+ readonly size: {
102
+ readonly type: import("vue").PropType<import("hzzt-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
103
+ readonly required: false;
104
+ readonly validator: ((val: unknown) => boolean) | undefined;
105
+ __epPropKey: true;
106
+ };
95
107
  }>> & {
96
108
  [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
97
109
  }>>;
110
+ formSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
111
+ ns: {
112
+ namespace: import("vue").ComputedRef<string>;
113
+ b: (blockSuffix?: string) => string;
114
+ e: (element?: string | undefined) => string;
115
+ m: (modifier?: string | undefined) => string;
116
+ be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
117
+ em: (element?: string | undefined, modifier?: string | undefined) => string;
118
+ bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
119
+ bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
120
+ is: {
121
+ (name: string, state: boolean | undefined): string;
122
+ (name: string): string;
123
+ };
124
+ cssVar: (object: Record<string, string>) => Record<string, string>;
125
+ cssVarName: (name: string) => string;
126
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
127
+ cssVarBlockName: (name: string) => string;
128
+ };
129
+ trueSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
130
+ nameKls: import("vue").ComputedRef<string[]>;
98
131
  slots: Readonly<{
99
132
  [name: string]: import("vue").Slot | undefined;
100
133
  }>;
@@ -102,6 +135,12 @@ export declare const HzztSelectInput: import("hzzt-plus/es/utils").SFCWithInstal
102
135
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
103
136
  readonly label: StringConstructor;
104
137
  readonly sideline: import("hzzt-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
138
+ readonly size: {
139
+ readonly type: import("vue").PropType<import("hzzt-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
140
+ readonly required: false;
141
+ readonly validator: ((val: unknown) => boolean) | undefined;
142
+ __epPropKey: true;
143
+ };
105
144
  }>>, {
106
145
  readonly sideline: import("hzzt-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
107
146
  }>;
@@ -89,13 +89,46 @@ declare const _default: import("vue").DefineComponent<{
89
89
  HzztTitle: import("vue").DefineComponent<{
90
90
  readonly label: StringConstructor;
91
91
  readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
92
+ readonly size: {
93
+ readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
94
+ readonly required: false;
95
+ readonly validator: ((val: unknown) => boolean) | undefined;
96
+ __epPropKey: true;
97
+ };
92
98
  }, {
93
99
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
94
100
  readonly label: StringConstructor;
95
101
  readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
102
+ readonly size: {
103
+ readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
104
+ readonly required: false;
105
+ readonly validator: ((val: unknown) => boolean) | undefined;
106
+ __epPropKey: true;
107
+ };
96
108
  }>> & {
97
109
  [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
98
110
  }>>;
111
+ formSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
112
+ ns: {
113
+ namespace: import("vue").ComputedRef<string>;
114
+ b: (blockSuffix?: string) => string;
115
+ e: (element?: string | undefined) => string;
116
+ m: (modifier?: string | undefined) => string;
117
+ be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
118
+ em: (element?: string | undefined, modifier?: string | undefined) => string;
119
+ bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
120
+ bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
121
+ is: {
122
+ (name: string, state: boolean | undefined): string;
123
+ (name: string): string;
124
+ };
125
+ cssVar: (object: Record<string, string>) => Record<string, string>;
126
+ cssVarName: (name: string) => string;
127
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
128
+ cssVarBlockName: (name: string) => string;
129
+ };
130
+ trueSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
131
+ nameKls: import("vue").ComputedRef<string[]>;
99
132
  slots: Readonly<{
100
133
  [name: string]: import("vue").Slot | undefined;
101
134
  }>;
@@ -103,6 +136,12 @@ declare const _default: import("vue").DefineComponent<{
103
136
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
104
137
  readonly label: StringConstructor;
105
138
  readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
139
+ readonly size: {
140
+ readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
141
+ readonly required: false;
142
+ readonly validator: ((val: unknown) => boolean) | undefined;
143
+ __epPropKey: true;
144
+ };
106
145
  }>>, {
107
146
  readonly sideline: import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
108
147
  }>;
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
- import SelectTextarea from './src/select-textarea2.mjs';
3
- export { selectTextareaEmits, selectTextareaProps } from './src/select-textarea.mjs';
2
+ import SelectTextarea from './src/select-textarea.mjs';
3
+ export { selectTextareaEmits, selectTextareaProps } from './src/select-textarea2.mjs';
4
4
  import { withInstall } from '../../utils/vue/install.mjs';
5
5
 
6
6
  const HzztSelectTextarea = withInstall(SelectTextarea);
@@ -1,36 +1,106 @@
1
- import '../../../utils/index.mjs';
1
+ import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createVNode, createBlock, createCommentVNode, mergeProps } from 'vue';
2
+ import { selectTextareaProps, selectTextareaEmits } from './select-textarea2.mjs';
2
3
  import '../../../hooks/index.mjs';
3
- import '../../../constants/index.mjs';
4
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
5
- import { useSizeProp } from '../../../hooks/use-size/index.mjs';
6
- import { UPDATE_MODEL_EVENT, CHANGE_EVENT, INPUT_EVENT } from '../../../constants/event.mjs';
7
- import { isString } from '@vue/shared';
8
- import { isNumber, isBoolean } from '../../../utils/types.mjs';
4
+ import { useFormSize, useFormDisabled, ElSelectV2, ElInput } from 'element-plus';
5
+ import HzztTitle from '../../title/src/title2.mjs';
6
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
7
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
8
+ import { useGlobalSize } from '../../../hooks/use-size/index.mjs';
9
+ import { insertCursorPosition } from '../../../hooks/use-cursor/index.mjs';
9
10
 
10
- const selectTextareaProps = buildProps({
11
- size: useSizeProp,
12
- disabled: Boolean,
13
- label: String,
14
- data: {
15
- type: definePropType(Array),
16
- default: () => []
17
- },
18
- inputProps: Object,
19
- replace: Boolean,
20
- modelValue: {
21
- type: definePropType([
22
- String,
23
- Number
24
- ]),
25
- default: ""
11
+ const _hoisted_1 = { class: "flex column" };
12
+ const _hoisted_2 = { class: "flex align-items-center" };
13
+ const __default__ = defineComponent({
14
+ name: "HzztSelectTextarea"
15
+ });
16
+ const _sfc_main = /* @__PURE__ */ defineComponent({
17
+ ...__default__,
18
+ props: selectTextareaProps,
19
+ emits: selectTextareaEmits,
20
+ setup(__props, { emit }) {
21
+ const props = __props;
22
+ const inputVal = ref(props.modelValue);
23
+ const selectValue = ref("");
24
+ const inputRef = ref();
25
+ const nsInput = useNamespace("select-textarea");
26
+ const formSize = useFormSize();
27
+ const formDisabled = useFormDisabled();
28
+ const trueSize = computed(() => props.size || formSize.value || useGlobalSize().value);
29
+ const trueDisabled = computed(() => props.disabled || formDisabled.value);
30
+ const containerCls = computed(() => [
31
+ nsInput.b(),
32
+ nsInput.m(trueSize.value)
33
+ ]);
34
+ const _inputProps = computed(() => ({
35
+ disabled: trueDisabled.value,
36
+ clearable: true,
37
+ ...props.inputProps,
38
+ type: "textarea"
39
+ }));
40
+ watch(() => props.modelValue, (v) => {
41
+ inputVal.value = v;
42
+ });
43
+ function input(val) {
44
+ emit("update:modelValue", val);
45
+ emit("input", val);
46
+ }
47
+ function change(val) {
48
+ emit("change", val);
49
+ }
50
+ function selectChange(val) {
51
+ if (!inputVal.value && inputVal.value !== 0)
52
+ inputVal.value = "";
53
+ selectValue.value = "";
54
+ let content = val;
55
+ if (!props.replace) {
56
+ const inputEl = inputRef.value.$el.getElementsByTagName("textarea")[0];
57
+ content = insertCursorPosition(inputEl, val);
58
+ }
59
+ input(content);
60
+ change(content);
61
+ emit("select", val);
62
+ }
63
+ return (_ctx, _cache) => {
64
+ return openBlock(), createElementBlock("div", {
65
+ class: normalizeClass(unref(containerCls))
66
+ }, [
67
+ createElementVNode("div", _hoisted_1, [
68
+ createElementVNode("div", _hoisted_2, [
69
+ renderSlot(_ctx.$slots, "title", {}, () => [
70
+ createVNode(HzztTitle, {
71
+ class: "margin-l-1",
72
+ label: _ctx.label
73
+ }, null, 8, ["label"])
74
+ ]),
75
+ !unref(trueDisabled) ? (openBlock(), createBlock(unref(ElSelectV2), {
76
+ key: 0,
77
+ class: "flex-1",
78
+ modelValue: selectValue.value,
79
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectValue.value = $event),
80
+ "allow-create": "",
81
+ filterable: "",
82
+ clearable: "",
83
+ onChange: selectChange,
84
+ options: _ctx.data
85
+ }, null, 8, ["modelValue", "options"])) : createCommentVNode("v-if", true),
86
+ renderSlot(_ctx.$slots, "right")
87
+ ]),
88
+ createVNode(unref(ElInput), mergeProps({
89
+ ref_key: "inputRef",
90
+ ref: inputRef,
91
+ class: "flex-1 margin-t-1",
92
+ modelValue: inputVal.value,
93
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputVal.value = $event)
94
+ }, unref(_inputProps), {
95
+ onInput: input,
96
+ onChange: change
97
+ }), null, 16, ["modelValue"])
98
+ ])
99
+ ], 2);
100
+ };
26
101
  }
27
102
  });
28
- const selectTextareaEmits = {
29
- [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
30
- [CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
31
- [INPUT_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
32
- select: (val) => isString(val) || isNumber(val) || isBoolean(val)
33
- };
103
+ var SelectTextarea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "select-textarea.vue"]]);
34
104
 
35
- export { selectTextareaEmits, selectTextareaProps };
105
+ export { SelectTextarea as default };
36
106
  //# sourceMappingURL=select-textarea.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-textarea.mjs","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":[],"mappings":";;;;;;;;;AAGY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,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,EAAE,cAAc,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,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AACjF,EAAE,CAAC,YAAY,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AAC3E,EAAE,CAAC,WAAW,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AAC1E,EAAE,MAAM,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AACnE;;;;"}
1
+ {"version":3,"file":"select-textarea.mjs","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":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;;;;;mCA0BgB,CAAA;AAAA,EACZ,IAAM,EAAA,oBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,QAAA,GAAW,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AACrC,IAAM,MAAA,WAAA,GAAc,IAAI,EAAE,CAAA,CAAA;AAC1B,IAAA,MAAM,WAAW,GAAI,EAAA,CAAA;AAErB,IAAM,MAAA,OAAA,GAAU,aAAa,iBAAiB,CAAA,CAAA;AAC9C,IAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,IAAA,MAAM,eAAe,eAAgB,EAAA,CAAA;AAErC,IAAA,MAAM,QAAW,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,IAAA,IAAA,QAAA,CAAA,KAAA,IAAA,aAAA,EAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,kBACH,GAAA,QAAiB,CAAA,MAAA,kBAAuB,YAAE,CAAA,KAAA,CAAA,CAAA;AAAA,IACxD,MAAA,YAAA,GAAA,QAAA,CAAA,MAAA;AAEA,MAAA;AAEA,MAAM,OAAA,CAAA,CAAA,CAAA,QAAA,CAAe;AAAe,KAAA,CAClC;AAAU,IACV,MAAA,WAAU,GAAA,QAAc,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,KACH,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,UAAgB,oBAAA,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,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -69,13 +69,46 @@ declare const _default: import("vue").DefineComponent<{
69
69
  HzztTitle: import("vue").DefineComponent<{
70
70
  readonly label: StringConstructor;
71
71
  readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
72
+ readonly size: {
73
+ readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
74
+ readonly required: false;
75
+ readonly validator: ((val: unknown) => boolean) | undefined;
76
+ __epPropKey: true;
77
+ };
72
78
  }, {
73
79
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
74
80
  readonly label: StringConstructor;
75
81
  readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
82
+ readonly size: {
83
+ readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
84
+ readonly required: false;
85
+ readonly validator: ((val: unknown) => boolean) | undefined;
86
+ __epPropKey: true;
87
+ };
76
88
  }>> & {
77
89
  [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
78
90
  }>>;
91
+ formSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
92
+ ns: {
93
+ namespace: import("vue").ComputedRef<string>;
94
+ b: (blockSuffix?: string) => string;
95
+ e: (element?: string | undefined) => string;
96
+ m: (modifier?: string | undefined) => string;
97
+ be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
98
+ em: (element?: string | undefined, modifier?: string | undefined) => string;
99
+ bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
100
+ bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
101
+ is: {
102
+ (name: string, state: boolean | undefined): string;
103
+ (name: string): string;
104
+ };
105
+ cssVar: (object: Record<string, string>) => Record<string, string>;
106
+ cssVarName: (name: string) => string;
107
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
108
+ cssVarBlockName: (name: string) => string;
109
+ };
110
+ trueSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
111
+ nameKls: import("vue").ComputedRef<string[]>;
79
112
  slots: Readonly<{
80
113
  [name: string]: import("vue").Slot | undefined;
81
114
  }>;
@@ -83,6 +116,12 @@ declare const _default: import("vue").DefineComponent<{
83
116
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
84
117
  readonly label: StringConstructor;
85
118
  readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
119
+ readonly size: {
120
+ readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
121
+ readonly required: false;
122
+ readonly validator: ((val: unknown) => boolean) | undefined;
123
+ __epPropKey: true;
124
+ };
86
125
  }>>, {
87
126
  readonly sideline: import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
88
127
  }>;
@@ -1,106 +1,36 @@
1
- import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createVNode, createBlock, createCommentVNode, mergeProps } from 'vue';
2
- import { selectTextareaProps, selectTextareaEmits } from './select-textarea.mjs';
1
+ import '../../../utils/index.mjs';
3
2
  import '../../../hooks/index.mjs';
4
- import { useFormSize, useFormDisabled, ElSelectV2, ElInput } from 'element-plus';
5
- import HzztTitle from '../../title/src/title2.mjs';
6
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
7
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
8
- import { useGlobalSize } from '../../../hooks/use-size/index.mjs';
9
- import { insertCursorPosition } from '../../../hooks/use-cursor/index.mjs';
3
+ import '../../../constants/index.mjs';
4
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
5
+ import { useSizeProp } from '../../../hooks/use-size/index.mjs';
6
+ import { UPDATE_MODEL_EVENT, CHANGE_EVENT, INPUT_EVENT } from '../../../constants/event.mjs';
7
+ import { isString } from '@vue/shared';
8
+ import { isNumber, isBoolean } from '../../../utils/types.mjs';
10
9
 
11
- const _hoisted_1 = { class: "flex column" };
12
- const _hoisted_2 = { class: "flex align-items-center" };
13
- const __default__ = defineComponent({
14
- name: "HzztSelectTextarea"
15
- });
16
- const _sfc_main = /* @__PURE__ */ defineComponent({
17
- ...__default__,
18
- props: selectTextareaProps,
19
- emits: selectTextareaEmits,
20
- setup(__props, { emit }) {
21
- const props = __props;
22
- const inputVal = ref(props.modelValue);
23
- const selectValue = ref("");
24
- const inputRef = ref();
25
- const nsInput = useNamespace("select-textarea");
26
- const formSize = useFormSize();
27
- const formDisabled = useFormDisabled();
28
- const trueSize = computed(() => props.size || formSize.value || useGlobalSize().value);
29
- const trueDisabled = computed(() => props.disabled || formDisabled.value);
30
- const containerCls = computed(() => [
31
- nsInput.b(),
32
- nsInput.m(trueSize.value)
33
- ]);
34
- const _inputProps = computed(() => ({
35
- disabled: trueDisabled.value,
36
- clearable: true,
37
- ...props.inputProps,
38
- type: "textarea"
39
- }));
40
- watch(() => props.modelValue, (v) => {
41
- inputVal.value = v;
42
- });
43
- function input(val) {
44
- emit("update:modelValue", val);
45
- emit("input", val);
46
- }
47
- function change(val) {
48
- emit("change", val);
49
- }
50
- function selectChange(val) {
51
- if (!inputVal.value && inputVal.value !== 0)
52
- inputVal.value = "";
53
- selectValue.value = "";
54
- let content = val;
55
- if (!props.replace) {
56
- const inputEl = inputRef.value.$el.getElementsByTagName("textarea")[0];
57
- content = insertCursorPosition(inputEl, val);
58
- }
59
- input(content);
60
- change(content);
61
- emit("select", val);
62
- }
63
- return (_ctx, _cache) => {
64
- return openBlock(), createElementBlock("div", {
65
- class: normalizeClass(unref(containerCls))
66
- }, [
67
- createElementVNode("div", _hoisted_1, [
68
- createElementVNode("div", _hoisted_2, [
69
- renderSlot(_ctx.$slots, "title", {}, () => [
70
- createVNode(HzztTitle, {
71
- class: "margin-l-1",
72
- label: _ctx.label
73
- }, null, 8, ["label"])
74
- ]),
75
- !unref(trueDisabled) ? (openBlock(), createBlock(unref(ElSelectV2), {
76
- key: 0,
77
- class: "flex-1",
78
- modelValue: selectValue.value,
79
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectValue.value = $event),
80
- "allow-create": "",
81
- filterable: "",
82
- clearable: "",
83
- onChange: selectChange,
84
- options: _ctx.data
85
- }, null, 8, ["modelValue", "options"])) : createCommentVNode("v-if", true),
86
- renderSlot(_ctx.$slots, "right")
87
- ]),
88
- createVNode(unref(ElInput), mergeProps({
89
- ref_key: "inputRef",
90
- ref: inputRef,
91
- class: "flex-1 margin-t-1",
92
- modelValue: inputVal.value,
93
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputVal.value = $event)
94
- }, unref(_inputProps), {
95
- onInput: input,
96
- onChange: change
97
- }), null, 16, ["modelValue"])
98
- ])
99
- ], 2);
100
- };
10
+ const selectTextareaProps = buildProps({
11
+ size: useSizeProp,
12
+ disabled: Boolean,
13
+ label: String,
14
+ data: {
15
+ type: definePropType(Array),
16
+ default: () => []
17
+ },
18
+ inputProps: Object,
19
+ replace: Boolean,
20
+ modelValue: {
21
+ type: definePropType([
22
+ String,
23
+ Number
24
+ ]),
25
+ default: ""
101
26
  }
102
27
  });
103
- var SelectTextarea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "select-textarea.vue"]]);
28
+ const selectTextareaEmits = {
29
+ [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
30
+ [CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
31
+ [INPUT_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
32
+ select: (val) => isString(val) || isNumber(val) || isBoolean(val)
33
+ };
104
34
 
105
- export { SelectTextarea as default };
35
+ export { selectTextareaEmits, selectTextareaProps };
106
36
  //# sourceMappingURL=select-textarea2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-textarea2.mjs","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":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;;;;;mCA0BgB,CAAA;AAAA,EACZ,IAAM,EAAA,oBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,QAAA,GAAW,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AACrC,IAAM,MAAA,WAAA,GAAc,IAAI,EAAE,CAAA,CAAA;AAC1B,IAAA,MAAM,WAAW,GAAI,EAAA,CAAA;AAErB,IAAM,MAAA,OAAA,GAAU,aAAa,iBAAiB,CAAA,CAAA;AAC9C,IAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,IAAA,MAAM,eAAe,eAAgB,EAAA,CAAA;AAErC,IAAA,MAAM,QAAW,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,IAAA,IAAA,QAAA,CAAA,KAAA,IAAA,aAAA,EAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,kBACH,GAAA,QAAiB,CAAA,MAAA,kBAAuB,YAAE,CAAA,KAAA,CAAA,CAAA;AAAA,IACxD,MAAA,YAAA,GAAA,QAAA,CAAA,MAAA;AAEA,MAAA;AAEA,MAAM,OAAA,CAAA,CAAA,CAAA,QAAA,CAAe;AAAe,KAAA,CAClC;AAAU,IACV,MAAA,WAAU,GAAA,QAAc,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,KACH,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,UAAgB,oBAAA,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,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"select-textarea2.mjs","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":[],"mappings":";;;;;;;;;AAGY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,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,EAAE,cAAc,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,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AACjF,EAAE,CAAC,YAAY,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AAC3E,EAAE,CAAC,WAAW,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AAC1E,EAAE,MAAM,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AACnE;;;;"}
@@ -3,6 +3,12 @@ import type Title from './title.vue';
3
3
  export declare const titleProps: {
4
4
  readonly label: StringConstructor;
5
5
  readonly sideline: import("hzzt-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
6
+ readonly size: {
7
+ readonly type: import("vue").PropType<import("hzzt-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
8
+ readonly required: false;
9
+ readonly validator: ((val: unknown) => boolean) | undefined;
10
+ __epPropKey: true;
11
+ };
6
12
  };
7
13
  export declare type TitleProps = ExtractPropTypes<typeof titleProps>;
8
14
  export declare type TitleInstance = InstanceType<typeof Title>;
@@ -1,12 +1,15 @@
1
1
  import '../../../utils/index.mjs';
2
+ import '../../../hooks/index.mjs';
2
3
  import { buildProps } from '../../../utils/vue/props/runtime.mjs';
4
+ import { useSizeProp } from '../../../hooks/use-size/index.mjs';
3
5
 
4
6
  const titleProps = buildProps({
5
7
  label: String,
6
8
  sideline: {
7
9
  type: Boolean,
8
10
  default: true
9
- }
11
+ },
12
+ size: useSizeProp
10
13
  });
11
14
 
12
15
  export { titleProps };
@@ -1 +1 @@
1
- {"version":3,"file":"title.mjs","sources":["../../../../../../packages/components/title/src/title.ts"],"sourcesContent":["import { buildProps } from '@hzzt-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Title from './title.vue'\n\nexport const titleProps = buildProps({\n label: String,\n sideline: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type TitleProps = ExtractPropTypes<typeof titleProps>\n\nexport type TitleInstance = InstanceType<typeof Title>\n"],"names":[],"mappings":";;;AACY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"title.mjs","sources":["../../../../../../packages/components/title/src/title.ts"],"sourcesContent":["import { buildProps } from '@hzzt-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Title from './title.vue'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\n\nexport const titleProps = buildProps({\n label: String,\n sideline: {\n type: Boolean,\n default: true,\n },\n size: useSizeProp,\n} as const)\nexport type TitleProps = ExtractPropTypes<typeof titleProps>\n\nexport type TitleInstance = InstanceType<typeof Title>\n"],"names":[],"mappings":";;;;;AAEY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,CAAC;;;;"}