hzzt-plus 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.full.js +275 -176
- package/dist/index.full.min.js +15 -15
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +12 -12
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +273 -177
- package/es/component.mjs +3 -1
- package/es/component.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +67 -0
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +0 -67
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +2 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/input-range/index.d.ts +5 -0
- package/es/components/input-range/index.mjs +9 -0
- package/es/components/input-range/index.mjs.map +1 -0
- package/es/components/input-range/src/input-range.d.ts +24 -0
- package/es/components/input-range/src/input-range.mjs +31 -0
- package/es/components/input-range/src/input-range.mjs.map +1 -0
- package/es/components/input-range/src/input-range.vue.d.ts +86 -0
- package/es/components/input-range/src/input-range2.mjs +81 -0
- package/es/components/input-range/src/input-range2.mjs.map +1 -0
- package/es/components/input-range/style/css.d.ts +2 -0
- package/es/components/input-range/style/css.mjs +3 -0
- package/es/components/input-range/style/css.mjs.map +1 -0
- package/es/components/input-range/style/index.d.ts +2 -0
- package/es/components/input-range/style/index.mjs +3 -0
- package/es/components/input-range/style/index.mjs.map +1 -0
- package/es/components/select-input/index.d.ts +10 -10
- package/es/components/select-input/src/select-input.d.ts +3 -3
- package/es/components/select-input/src/select-input.mjs.map +1 -1
- package/es/components/select-input/src/select-input.vue.d.ts +10 -10
- package/es/components/select-textarea/index.d.ts +3 -13074
- package/es/components/select-textarea/index.mjs.map +1 -1
- package/es/components/select-textarea/src/select-textarea.d.ts +4 -4
- package/es/components/select-textarea/src/select-textarea.mjs +6 -5
- package/es/components/select-textarea/src/select-textarea.mjs.map +1 -1
- package/es/components/select-textarea/src/select-textarea.vue.d.ts +13 -13
- package/es/components/select-textarea/src/select-textarea2.mjs +1 -1
- package/es/components/select-textarea/src/select-textarea2.mjs.map +1 -1
- package/es/hooks/use-cursor/index.d.ts +1 -1
- package/es/hooks/use-cursor/index.mjs.map +1 -1
- package/es/index.mjs +2 -0
- package/es/index.mjs.map +1 -1
- package/global.d.ts +1 -0
- package/lib/component.js +3 -1
- package/lib/component.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +70 -0
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +0 -70
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +5 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/input-range/index.d.ts +5 -0
- package/lib/components/input-range/index.js +16 -0
- package/lib/components/input-range/index.js.map +1 -0
- package/lib/components/input-range/src/input-range.d.ts +24 -0
- package/lib/components/input-range/src/input-range.js +36 -0
- package/lib/components/input-range/src/input-range.js.map +1 -0
- package/lib/components/input-range/src/input-range.vue.d.ts +86 -0
- package/lib/components/input-range/src/input-range2.js +85 -0
- package/lib/components/input-range/src/input-range2.js.map +1 -0
- package/lib/components/input-range/style/css.d.ts +2 -0
- package/lib/components/input-range/style/css.js +6 -0
- package/lib/components/input-range/style/css.js.map +1 -0
- package/lib/components/input-range/style/index.d.ts +2 -0
- package/lib/components/input-range/style/index.js +6 -0
- package/lib/components/input-range/style/index.js.map +1 -0
- package/lib/components/select-input/index.d.ts +10 -10
- package/lib/components/select-input/src/select-input.d.ts +3 -3
- package/lib/components/select-input/src/select-input.js.map +1 -1
- package/lib/components/select-input/src/select-input.vue.d.ts +10 -10
- package/lib/components/select-textarea/index.d.ts +3 -13074
- package/lib/components/select-textarea/index.js.map +1 -1
- package/lib/components/select-textarea/src/select-textarea.d.ts +4 -4
- package/lib/components/select-textarea/src/select-textarea.js +5 -4
- package/lib/components/select-textarea/src/select-textarea.js.map +1 -1
- package/lib/components/select-textarea/src/select-textarea.vue.d.ts +13 -13
- package/lib/components/select-textarea/src/select-textarea2.js +1 -1
- package/lib/components/select-textarea/src/select-textarea2.js.map +1 -1
- package/lib/hooks/use-cursor/index.d.ts +1 -1
- package/lib/hooks/use-cursor/index.js.map +1 -1
- package/lib/index.js +35 -30
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/tags.json +1 -1
- package/theme/hzzt-input-range.css +0 -0
- package/theme/src/index.scss +1 -0
- package/theme/src/input-range.scss +0 -0
- package/web-types.json +1 -692
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/select-textarea/index.ts"],"sourcesContent":["import { withInstall } from '@hzzt-plus/utils'\nimport SelectTextarea from './src/select-textarea.vue'\n\nexport const HzztSelectTextarea = withInstall(SelectTextarea)\nexport default HzztSelectTextarea\n\nexport * from './src/select-textarea'\n"],"names":[],"mappings":";;;;;AAEY,MAAC,kBAAkB,GAAG,WAAW,CAAC,cAAc;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/select-textarea/index.ts"],"sourcesContent":["import { withInstall } from '@hzzt-plus/utils'\nimport SelectTextarea from './src/select-textarea.vue'\nimport type { SFCWithInstall } from '@hzzt-plus/utils'\n\nexport const HzztSelectTextarea: SFCWithInstall<typeof SelectTextarea> = withInstall(SelectTextarea)\nexport default HzztSelectTextarea\n\nexport * from './src/select-textarea'\n"],"names":[],"mappings":";;;;;AAEY,MAAC,kBAAkB,GAAG,WAAW,CAAC,cAAc;;;;"}
|
|
@@ -17,10 +17,10 @@ export declare const selectTextareaProps: {
|
|
|
17
17
|
};
|
|
18
18
|
export declare type SelectTextareaProps = ExtractPropTypes<typeof selectTextareaProps>;
|
|
19
19
|
export declare const selectTextareaEmits: {
|
|
20
|
-
"update:modelValue": (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
select: (
|
|
20
|
+
"update:modelValue": (val: string | number | boolean | undefined) => boolean;
|
|
21
|
+
change: (val: string | number | boolean | undefined) => boolean;
|
|
22
|
+
input: (val: string | number | boolean | undefined) => boolean;
|
|
23
|
+
select: (val: string | number | boolean | undefined) => boolean;
|
|
24
24
|
};
|
|
25
25
|
export declare type SelectTextareaEmits = typeof selectTextareaEmits;
|
|
26
26
|
export declare type SelectTextareaInstance = InstanceType<typeof SelectTextarea>;
|
|
@@ -3,8 +3,9 @@ import '../../../hooks/index.mjs';
|
|
|
3
3
|
import '../../../constants/index.mjs';
|
|
4
4
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
5
|
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
6
|
-
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
|
6
|
+
import { UPDATE_MODEL_EVENT, CHANGE_EVENT, INPUT_EVENT } from '../../../constants/event.mjs';
|
|
7
7
|
import { isString } from '@vue/shared';
|
|
8
|
+
import { isNumber, isBoolean } from '../../../utils/types.mjs';
|
|
8
9
|
|
|
9
10
|
const selectTextareaProps = buildProps({
|
|
10
11
|
size: useSizeProp,
|
|
@@ -25,10 +26,10 @@ const selectTextareaProps = buildProps({
|
|
|
25
26
|
}
|
|
26
27
|
});
|
|
27
28
|
const selectTextareaEmits = {
|
|
28
|
-
[UPDATE_MODEL_EVENT]: (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
select: (
|
|
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)
|
|
32
33
|
};
|
|
33
34
|
|
|
34
35
|
export { selectTextareaEmits, selectTextareaProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-textarea.mjs","sources":["../../../../../../packages/components/select-textarea/src/select-textarea.ts"],"sourcesContent":["import {buildProps, definePropType, isString} 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 {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]: (
|
|
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;;;;"}
|
|
@@ -26,12 +26,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
26
|
replace: BooleanConstructor;
|
|
27
27
|
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
28
|
}>> & {
|
|
29
|
-
"onUpdate:modelValue"?: ((
|
|
30
|
-
onChange?: ((
|
|
31
|
-
onInput?: ((
|
|
32
|
-
onSelect?: ((
|
|
29
|
+
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
30
|
+
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
31
|
+
onInput?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
32
|
+
onSelect?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
33
33
|
}>>;
|
|
34
|
-
emit: ((event: "update:modelValue",
|
|
34
|
+
emit: ((event: "update:modelValue", val: string | number | boolean | undefined) => void) & ((event: "change", val: string | number | boolean | undefined) => void) & ((event: "input", val: string | number | boolean | undefined) => void) & ((event: "select", val: string | number | boolean | undefined) => void);
|
|
35
35
|
inputVal: import("vue").Ref<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>>;
|
|
36
36
|
selectValue: import("vue").Ref<string>;
|
|
37
37
|
inputRef: import("vue").Ref<any>;
|
|
@@ -13044,10 +13044,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13044
13044
|
readonly itemHeight: number;
|
|
13045
13045
|
}>>;
|
|
13046
13046
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13047
|
-
"update:modelValue": (
|
|
13048
|
-
|
|
13049
|
-
|
|
13050
|
-
select: (
|
|
13047
|
+
"update:modelValue": (val: string | number | boolean | undefined) => boolean;
|
|
13048
|
+
change: (val: string | number | boolean | undefined) => boolean;
|
|
13049
|
+
input: (val: string | number | boolean | undefined) => boolean;
|
|
13050
|
+
select: (val: string | number | boolean | undefined) => boolean;
|
|
13051
13051
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13052
13052
|
size: {
|
|
13053
13053
|
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
@@ -13062,10 +13062,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13062
13062
|
replace: BooleanConstructor;
|
|
13063
13063
|
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>;
|
|
13064
13064
|
}>> & {
|
|
13065
|
-
"onUpdate:modelValue"?: ((
|
|
13066
|
-
onChange?: ((
|
|
13067
|
-
onInput?: ((
|
|
13068
|
-
onSelect?: ((
|
|
13065
|
+
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
13066
|
+
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
13067
|
+
onInput?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
13068
|
+
onSelect?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
13069
13069
|
}, {
|
|
13070
13070
|
replace: boolean;
|
|
13071
13071
|
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>;
|
|
@@ -52,7 +52,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
52
|
inputVal.value = "";
|
|
53
53
|
let content = val;
|
|
54
54
|
if (!props.replace) {
|
|
55
|
-
const inputEl = inputRef.value.getElementsByTagName("textarea")[0];
|
|
55
|
+
const inputEl = inputRef.value.$el.getElementsByTagName("textarea")[0];
|
|
56
56
|
content = insertCursorPosition(inputEl, val);
|
|
57
57
|
}
|
|
58
58
|
input(content);
|
|
@@ -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 let content = val;\n if (!props.replace) {\n const inputEl = inputRef.value.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,IAAI,OAAC,GAAS,GAAS,CAAA;AAAsB,MAAA,IAAA,CAAA,KAAA,CAAS,OAAQ,EAAA;AAC9D,QAAA,MAAc,OAAA,GAAA,QAAA,CAAA,KAAA,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.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 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,IAAI,OAAC,GAAS,GAAS,CAAA;AAAsB,MAAA,IAAA,CAAA,KAAA,CAAS,OAAQ,EAAA;AAC9D,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 +1 @@
|
|
|
1
|
-
export declare function insertCursorPosition(inputEl:
|
|
1
|
+
export declare function insertCursorPosition(inputEl: HTMLTextAreaElement, content: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-cursor/index.ts"],"sourcesContent":["export function insertCursorPosition(inputEl:
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-cursor/index.ts"],"sourcesContent":["export function insertCursorPosition(inputEl: HTMLTextAreaElement, content: string) {\n const startPos: number = inputEl.selectionStart || 0;\n const endPos: number = inputEl.selectionEnd || 0;\n const restoreTop = inputEl.scrollTop;\n inputEl.value = inputEl.value.substring(0, startPos) +\n content + inputEl.value.substring(endPos, inputEl.value.length);\n inputEl.focus();\n inputEl.scrollTop = restoreTop;\n inputEl.selectionStart = startPos + content.length;\n inputEl.selectionEnd = startPos + content.length;\n return inputEl.value;\n}\n"],"names":[],"mappings":"AAAO,SAAS,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE;AACvD,EAAE,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,IAAI,CAAC,CAAC;AAC/C,EAAE,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,IAAI,CAAC,CAAC;AAC3C,EAAE,MAAM,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC;AACvC,EAAE,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACzH,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;AAClB,EAAE,OAAO,CAAC,SAAS,GAAG,UAAU,CAAC;AACjC,EAAE,OAAO,CAAC,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;AACrD,EAAE,OAAO,CAAC,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;AACnD,EAAE,OAAO,OAAO,CAAC,KAAK,CAAC;AACvB;;;;"}
|
package/es/index.mjs
CHANGED
|
@@ -27,6 +27,8 @@ export { selectInputEmits, selectInputProps } from './components/select-input/sr
|
|
|
27
27
|
export { HzztSelectInput } from './components/select-input/index.mjs';
|
|
28
28
|
export { selectTextareaEmits, selectTextareaProps } from './components/select-textarea/src/select-textarea.mjs';
|
|
29
29
|
export { HzztSelectTextarea } from './components/select-textarea/index.mjs';
|
|
30
|
+
export { inputRangeEmits, inputRangeProps } from './components/input-range/src/input-range.mjs';
|
|
31
|
+
export { HzztInputRange } from './components/input-range/index.mjs';
|
|
30
32
|
export { INSTALLED_KEY } from './constants/key.mjs';
|
|
31
33
|
export { componentSizeMap, componentSizes } from './constants/size.mjs';
|
|
32
34
|
export { WEEK_DAYS, datePickTypes } from './constants/date.mjs';
|
package/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","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":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","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":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAG,SAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAG,SAAS,CAAC;;;;"}
|
package/global.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ declare module 'vue' {
|
|
|
16
16
|
HzztScan: typeof import('hzzt-plus')['HzztScan']
|
|
17
17
|
HzztSelectInput: typeof import('hzzt-plus')['HzztSelectInput']
|
|
18
18
|
HzztSelectTextarea: typeof import('hzzt-plus')['HzztSelectTextarea']
|
|
19
|
+
HzztInputRange: typeof import('hzzt-plus')['HzztInputRange']
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
|
package/lib/component.js
CHANGED
|
@@ -17,6 +17,7 @@ var index$b = require('./components/quarter-picker/index.js');
|
|
|
17
17
|
var index$c = require('./components/scan/index.js');
|
|
18
18
|
var index$d = require('./components/select-input/index.js');
|
|
19
19
|
var index$e = require('./components/select-textarea/index.js');
|
|
20
|
+
var index$f = require('./components/input-range/index.js');
|
|
20
21
|
|
|
21
22
|
var Components = [
|
|
22
23
|
index.HzztConfigProvider,
|
|
@@ -33,7 +34,8 @@ var Components = [
|
|
|
33
34
|
index$b.HzztQuarterPicker,
|
|
34
35
|
index$c.HzztScan,
|
|
35
36
|
index$d.HzztSelectInput,
|
|
36
|
-
index$e.HzztSelectTextarea
|
|
37
|
+
index$e.HzztSelectTextarea,
|
|
38
|
+
index$f.HzztInputRange
|
|
37
39
|
];
|
|
38
40
|
|
|
39
41
|
exports["default"] = Components;
|
package/lib/component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import { HzztTitle } from '@hzzt-plus/components/title'\nimport { HzztDropdown } from '@hzzt-plus/components/dropdown'\nimport { HzztCollapse } from '@hzzt-plus/components/collapse'\nimport { HzztConfigProvider } from '@hzzt-plus/components/config-provider'\nimport { HzztTab } from '@hzzt-plus/components/tab'\nimport { HzztIcon } from '@hzzt-plus/components/icon'\nimport { HzztPagination } from '@hzzt-plus/components/pagination'\nimport { HzztTooltip } from '@hzzt-plus/components/tooltip'\nimport { HzztPageSize } from '@hzzt-plus/components/page-size'\nimport { HzztConfirmPassword } from '@hzzt-plus/components/confirm-password'\nimport { HzztCheckButton } from '@hzzt-plus/components/check-button'\nimport { HzztQuarterPicker } from '@hzzt-plus/components/quarter-picker'\nimport { HzztScan } from '@hzzt-plus/components/scan'\nimport { HzztSelectInput } from '@hzzt-plus/components/select-input'\nimport { HzztSelectTextarea } from '@hzzt-plus/components/select-textarea'\n\nimport type { Plugin } from 'vue'\n\nexport default [\n HzztConfigProvider,\n HzztTitle,\n HzztDropdown,\n HzztCollapse,\n HzztTab,\n HzztIcon,\n HzztPagination,\n HzztTooltip,\n HzztPageSize,\n HzztConfirmPassword,\n HzztCheckButton,\n HzztQuarterPicker,\n HzztScan,\n HzztSelectInput,\n HzztSelectTextarea,\n] as Plugin[]\n"],"names":["HzztConfigProvider","HzztTitle","HzztDropdown","HzztCollapse","HzztTab","HzztIcon","HzztPagination","HzztTooltip","HzztPageSize","HzztConfirmPassword","HzztCheckButton","HzztQuarterPicker","HzztScan","HzztSelectInput","HzztSelectTextarea"],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import { HzztTitle } from '@hzzt-plus/components/title'\nimport { HzztDropdown } from '@hzzt-plus/components/dropdown'\nimport { HzztCollapse } from '@hzzt-plus/components/collapse'\nimport { HzztConfigProvider } from '@hzzt-plus/components/config-provider'\nimport { HzztTab } from '@hzzt-plus/components/tab'\nimport { HzztIcon } from '@hzzt-plus/components/icon'\nimport { HzztPagination } from '@hzzt-plus/components/pagination'\nimport { HzztTooltip } from '@hzzt-plus/components/tooltip'\nimport { HzztPageSize } from '@hzzt-plus/components/page-size'\nimport { HzztConfirmPassword } from '@hzzt-plus/components/confirm-password'\nimport { HzztCheckButton } from '@hzzt-plus/components/check-button'\nimport { HzztQuarterPicker } from '@hzzt-plus/components/quarter-picker'\nimport { HzztScan } from '@hzzt-plus/components/scan'\nimport { HzztSelectInput } from '@hzzt-plus/components/select-input'\nimport { HzztSelectTextarea } from '@hzzt-plus/components/select-textarea'\nimport { HzztInputRange } from '@hzzt-plus/components/input-range'\n\nimport type { Plugin } from 'vue'\n\nexport default [\n HzztConfigProvider,\n HzztTitle,\n HzztDropdown,\n HzztCollapse,\n HzztTab,\n HzztIcon,\n HzztPagination,\n HzztTooltip,\n HzztPageSize,\n HzztConfirmPassword,\n HzztCheckButton,\n HzztQuarterPicker,\n HzztScan,\n HzztSelectInput,\n HzztSelectTextarea,\n HzztInputRange,\n] as Plugin[]\n"],"names":["HzztConfigProvider","HzztTitle","HzztDropdown","HzztCollapse","HzztTab","HzztIcon","HzztPagination","HzztTooltip","HzztPageSize","HzztConfirmPassword","HzztCheckButton","HzztQuarterPicker","HzztScan","HzztSelectInput","HzztSelectTextarea","HzztInputRange"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgBA,iBAAe;AACf,EAAEA,wBAAkB;AACpB,EAAEC,iBAAS;AACX,EAAEC,oBAAY;AACd,EAAEC,oBAAY;AACd,EAAEC,eAAO;AACT,EAAEC,gBAAQ;AACV,EAAEC,sBAAc;AAChB,EAAEC,mBAAW;AACb,EAAEC,oBAAY;AACd,EAAEC,2BAAmB;AACrB,EAAEC,uBAAe;AACjB,EAAEC,yBAAiB;AACnB,EAAEC,gBAAQ;AACV,EAAEC,uBAAe;AACjB,EAAEC,0BAAkB;AACpB,EAAEC,sBAAc;AAChB,CAAC;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var collapse = require('./src/
|
|
7
|
-
require('./src/
|
|
6
|
+
var collapse = require('./src/collapse.js');
|
|
7
|
+
require('./src/collapse2.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const HzztCollapse = install.withInstall(collapse["default"]);
|
|
@@ -1,3 +1,73 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
require('../../../hooks/index.js');
|
|
7
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
8
|
+
var index = require('../../../hooks/use-locale/index.js');
|
|
9
|
+
|
|
10
|
+
const _hoisted_1 = { class: "hzzt-collapse" };
|
|
11
|
+
const _hoisted_2 = { class: "flex align-items-center" };
|
|
12
|
+
const _hoisted_3 = { class: "hzzt-collapse-title-wrapper" };
|
|
13
|
+
const _hoisted_4 = /* @__PURE__ */ vue.createElementVNode("div", { class: "hzzt-collapse-title-block" }, null, -1);
|
|
14
|
+
const _hoisted_5 = { class: "hzzt-collapse-title" };
|
|
15
|
+
const _hoisted_6 = /* @__PURE__ */ vue.createElementVNode("div", { class: "hzzt-collapse-line" }, null, -1);
|
|
16
|
+
const _hoisted_7 = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "hzzt-collapse-text"
|
|
19
|
+
};
|
|
20
|
+
const __default__ = vue.defineComponent({
|
|
21
|
+
name: "HzztCollapse"
|
|
22
|
+
});
|
|
23
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
24
|
+
...__default__,
|
|
25
|
+
props: {
|
|
26
|
+
defaultActive: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
title: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: ""
|
|
33
|
+
},
|
|
34
|
+
expand: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: true
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
setup(__props) {
|
|
40
|
+
const props = __props;
|
|
41
|
+
const { t } = index.useLocale();
|
|
42
|
+
const active = vue.ref(props.defaultActive);
|
|
43
|
+
vue.watch(() => props.defaultActive, (val) => {
|
|
44
|
+
active.value = val;
|
|
45
|
+
});
|
|
46
|
+
function toggle() {
|
|
47
|
+
active.value = !active.value;
|
|
48
|
+
}
|
|
49
|
+
return (_ctx, _cache) => {
|
|
50
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
51
|
+
vue.createElementVNode("div", {
|
|
52
|
+
class: "hzzt-collapse-header",
|
|
53
|
+
onClick: toggle
|
|
54
|
+
}, [
|
|
55
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
56
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
57
|
+
_hoisted_4,
|
|
58
|
+
vue.createElementVNode("div", _hoisted_5, vue.toDisplayString(__props.title), 1)
|
|
59
|
+
]),
|
|
60
|
+
_hoisted_6
|
|
61
|
+
]),
|
|
62
|
+
__props.expand ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7, vue.toDisplayString(active.value ? vue.unref(t)("hzzt.collapse.retract") : vue.unref(t)("hzzt.collapse.expand")), 1)) : vue.createCommentVNode("v-if", true)
|
|
63
|
+
]),
|
|
64
|
+
vue.renderSlot(_ctx.$slots, "active", { active: active.value }),
|
|
65
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
66
|
+
]);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
var Collapse = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "collapse.vue"]]);
|
|
71
|
+
|
|
72
|
+
exports["default"] = Collapse;
|
|
3
73
|
//# sourceMappingURL=collapse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collapse.js","sources":["../../../../../../packages/components/collapse/src/collapse.vue"],"sourcesContent":["<template>\n <div class=\"hzzt-collapse\">\n <div class=\"hzzt-collapse-header\" @click=\"toggle\">\n <div class=\"flex align-items-center\">\n <div class=\"hzzt-collapse-title-wrapper\">\n <div class=\"hzzt-collapse-title-block\" />\n <div class=\"hzzt-collapse-title\">{{ title }}</div>\n </div>\n <div class=\"hzzt-collapse-line\" />\n </div>\n <span v-if=\"expand\" class=\"hzzt-collapse-text\">{{\n active ? t('hzzt.collapse.retract') : t('hzzt.collapse.expand')\n }}</span>\n </div>\n <slot name=\"active\" :active=\"active\" />\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch } from 'vue'\nimport { useLocale } from '@hzzt-plus/hooks'\n\ndefineOptions({\n name: 'HzztCollapse',\n})\nconst { t } = useLocale()\nconst props = defineProps({\n defaultActive: {\n type: Boolean,\n default: false,\n },\n title: {\n type: String,\n default: '',\n },\n expand: {\n type: Boolean,\n default: true,\n },\n})\n\nconst active = ref(props.defaultActive)\n\nwatch(\n () => props.defaultActive,\n (val: boolean) => {\n active.value = val\n }\n)\n\nfunction toggle() {\n active.value = !active.value\n}\n</script>\n"],"names":["_createElementVNode","_toDisplayString","_openBlock","_createElementBlock","_unref","_createCommentVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,KAAA;AACA,IAAA,KAAS,EAAiB;;;AAEZ,KACN;AACR,IAAA,MAAA,EAAA;;;;;;;;;;;;;;;;;;;AACA,UAAM,OAAI,EAAc,MAAA;AAgBxB,SAAM,EAAA;AAEN,UAAAA,sBAAA,CAAA,KAAA,EAAA,UAAA,EAAA;AAAA,YACQA,sBAAM,CAAA,KAAA,EAAA,UAAA,EAAA;AAAA,cACM,UAAA;AAChB,cAAAA,sBAAe,CAAA,KAAA,EAAA,UAAA,EAAAC,mBAAA,CAAA,OAAA,CAAA,KAAA,CAAA,EAAA,CAAA,CAAA;AAAA,aACjB,CAAA;AAAA,YACF,UAAA;AAEA,WAAA,CAAA;AACE,UAAO,OAAA,CAAA,MAAgB,IAAAC,aAAA,EAAA,EAAAC,sBAAA,CAAA,MAAA,EAAA,UAAA,EAAAF,mBAAA,CAAA,MAAA,CAAA,KAAA,GAAAG,SAAA,CAAA,CAAA,CAAA,CAAA,uBAAA,CAAA,GAAAA,SAAA,CAAA,CAAA,CAAA,CAAA,sBAAA,CAAA,CAAA,EAAA,CAAA,CAAA,IAAAC,sBAAA,CAAA,MAAA,EAAA,IAAA,CAAA;AAAA,SACzB,CAAA;;;;;;;;;;;"}
|
|
@@ -1,73 +1,3 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
require('../../../hooks/index.js');
|
|
7
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
8
|
-
var index = require('../../../hooks/use-locale/index.js');
|
|
9
|
-
|
|
10
|
-
const _hoisted_1 = { class: "hzzt-collapse" };
|
|
11
|
-
const _hoisted_2 = { class: "flex align-items-center" };
|
|
12
|
-
const _hoisted_3 = { class: "hzzt-collapse-title-wrapper" };
|
|
13
|
-
const _hoisted_4 = /* @__PURE__ */ vue.createElementVNode("div", { class: "hzzt-collapse-title-block" }, null, -1);
|
|
14
|
-
const _hoisted_5 = { class: "hzzt-collapse-title" };
|
|
15
|
-
const _hoisted_6 = /* @__PURE__ */ vue.createElementVNode("div", { class: "hzzt-collapse-line" }, null, -1);
|
|
16
|
-
const _hoisted_7 = {
|
|
17
|
-
key: 0,
|
|
18
|
-
class: "hzzt-collapse-text"
|
|
19
|
-
};
|
|
20
|
-
const __default__ = vue.defineComponent({
|
|
21
|
-
name: "HzztCollapse"
|
|
22
|
-
});
|
|
23
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
24
|
-
...__default__,
|
|
25
|
-
props: {
|
|
26
|
-
defaultActive: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: false
|
|
29
|
-
},
|
|
30
|
-
title: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: ""
|
|
33
|
-
},
|
|
34
|
-
expand: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: true
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
setup(__props) {
|
|
40
|
-
const props = __props;
|
|
41
|
-
const { t } = index.useLocale();
|
|
42
|
-
const active = vue.ref(props.defaultActive);
|
|
43
|
-
vue.watch(() => props.defaultActive, (val) => {
|
|
44
|
-
active.value = val;
|
|
45
|
-
});
|
|
46
|
-
function toggle() {
|
|
47
|
-
active.value = !active.value;
|
|
48
|
-
}
|
|
49
|
-
return (_ctx, _cache) => {
|
|
50
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
51
|
-
vue.createElementVNode("div", {
|
|
52
|
-
class: "hzzt-collapse-header",
|
|
53
|
-
onClick: toggle
|
|
54
|
-
}, [
|
|
55
|
-
vue.createElementVNode("div", _hoisted_2, [
|
|
56
|
-
vue.createElementVNode("div", _hoisted_3, [
|
|
57
|
-
_hoisted_4,
|
|
58
|
-
vue.createElementVNode("div", _hoisted_5, vue.toDisplayString(__props.title), 1)
|
|
59
|
-
]),
|
|
60
|
-
_hoisted_6
|
|
61
|
-
]),
|
|
62
|
-
__props.expand ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7, vue.toDisplayString(active.value ? vue.unref(t)("hzzt.collapse.retract") : vue.unref(t)("hzzt.collapse.expand")), 1)) : vue.createCommentVNode("v-if", true)
|
|
63
|
-
]),
|
|
64
|
-
vue.renderSlot(_ctx.$slots, "active", { active: active.value }),
|
|
65
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
66
|
-
]);
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
var Collapse = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "collapse.vue"]]);
|
|
71
|
-
|
|
72
|
-
exports["default"] = Collapse;
|
|
73
3
|
//# sourceMappingURL=collapse2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse2.js","sources":[
|
|
1
|
+
{"version":3,"file":"collapse2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/lib/components/index.js
CHANGED
|
@@ -17,6 +17,7 @@ var index$b = require('./quarter-picker/index.js');
|
|
|
17
17
|
var index$c = require('./scan/index.js');
|
|
18
18
|
var index$d = require('./select-input/index.js');
|
|
19
19
|
var index$e = require('./select-textarea/index.js');
|
|
20
|
+
var index$f = require('./input-range/index.js');
|
|
20
21
|
var title = require('./title/src/title.js');
|
|
21
22
|
var configProviderProps = require('./config-provider/src/config-provider-props.js');
|
|
22
23
|
var constants = require('./config-provider/src/constants.js');
|
|
@@ -24,6 +25,7 @@ var useGlobalConfig = require('./config-provider/src/hooks/use-global-config.js'
|
|
|
24
25
|
var scan = require('./scan/src/scan.js');
|
|
25
26
|
var selectInput = require('./select-input/src/select-input.js');
|
|
26
27
|
var selectTextarea = require('./select-textarea/src/select-textarea.js');
|
|
28
|
+
var inputRange = require('./input-range/src/input-range.js');
|
|
27
29
|
|
|
28
30
|
|
|
29
31
|
|
|
@@ -42,6 +44,7 @@ exports.HzztQuarterPicker = index$b.HzztQuarterPicker;
|
|
|
42
44
|
exports.HzztScan = index$c.HzztScan;
|
|
43
45
|
exports.HzztSelectInput = index$d.HzztSelectInput;
|
|
44
46
|
exports.HzztSelectTextarea = index$e.HzztSelectTextarea;
|
|
47
|
+
exports.HzztInputRange = index$f.HzztInputRange;
|
|
45
48
|
exports.titleProps = title.titleProps;
|
|
46
49
|
exports.configProviderProps = configProviderProps.configProviderProps;
|
|
47
50
|
exports.configProviderContextKey = constants.configProviderContextKey;
|
|
@@ -53,4 +56,6 @@ exports.selectInputEmits = selectInput.selectInputEmits;
|
|
|
53
56
|
exports.selectInputProps = selectInput.selectInputProps;
|
|
54
57
|
exports.selectTextareaEmits = selectTextarea.selectTextareaEmits;
|
|
55
58
|
exports.selectTextareaProps = selectTextarea.selectTextareaProps;
|
|
59
|
+
exports.inputRangeEmits = inputRange.inputRangeEmits;
|
|
60
|
+
exports.inputRangeProps = inputRange.inputRangeProps;
|
|
56
61
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('../../utils/index.js');
|
|
6
|
+
var inputRange$1 = require('./src/input-range2.js');
|
|
7
|
+
var inputRange = require('./src/input-range.js');
|
|
8
|
+
var install = require('../../utils/vue/install.js');
|
|
9
|
+
|
|
10
|
+
const HzztInputRange = install.withInstall(inputRange$1["default"]);
|
|
11
|
+
|
|
12
|
+
exports.inputRangeEmits = inputRange.inputRangeEmits;
|
|
13
|
+
exports.inputRangeProps = inputRange.inputRangeProps;
|
|
14
|
+
exports.HzztInputRange = HzztInputRange;
|
|
15
|
+
exports["default"] = HzztInputRange;
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/components/input-range/index.ts"],"sourcesContent":["import { withInstall } from '@hzzt-plus/utils'\nimport InputRange from './src/input-range.vue'\nimport type { SFCWithInstall } from '@hzzt-plus/utils'\n\nexport const HzztInputRange: SFCWithInstall<typeof InputRange> = withInstall(InputRange)\nexport default HzztInputRange\n\nexport * from './src/input-range'\n"],"names":["withInstall","InputRange"],"mappings":";;;;;;;;;AAEY,MAAC,cAAc,GAAGA,mBAAW,CAACC,uBAAU;;;;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
import type InputRange from './input-range.vue';
|
|
3
|
+
export declare const inputRangeProps: {
|
|
4
|
+
modelValue: import("hzzt-plus/es/utils").EpPropFinalized<ArrayConstructor, unknown, unknown, () => never[], boolean>;
|
|
5
|
+
size: {
|
|
6
|
+
readonly type: import("vue").PropType<import("hzzt-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
7
|
+
readonly required: false;
|
|
8
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
9
|
+
__epPropKey: true;
|
|
10
|
+
};
|
|
11
|
+
disabled: BooleanConstructor;
|
|
12
|
+
clearable: import("hzzt-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
13
|
+
startPlaceholder: StringConstructor;
|
|
14
|
+
endPlaceholder: StringConstructor;
|
|
15
|
+
startProps: ObjectConstructor;
|
|
16
|
+
endProps: ObjectConstructor;
|
|
17
|
+
};
|
|
18
|
+
export declare type InputRangeProps = ExtractPropTypes<typeof inputRangeProps>;
|
|
19
|
+
export declare const inputRangeEmits: {
|
|
20
|
+
"update:modelValue": (val: Array<string>) => boolean;
|
|
21
|
+
change: (val: Array<string>) => boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare type InputRangeEmits = typeof inputRangeEmits;
|
|
24
|
+
export declare type InputRangeInstance = InstanceType<typeof InputRange>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
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
|
+
|
|
13
|
+
const inputRangeProps = runtime.buildProps({
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: () => []
|
|
17
|
+
},
|
|
18
|
+
size: index.useSizeProp,
|
|
19
|
+
disabled: Boolean,
|
|
20
|
+
clearable: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
startPlaceholder: String,
|
|
25
|
+
endPlaceholder: String,
|
|
26
|
+
startProps: Object,
|
|
27
|
+
endProps: Object
|
|
28
|
+
});
|
|
29
|
+
const inputRangeEmits = {
|
|
30
|
+
[event.UPDATE_MODEL_EVENT]: (val) => shared.isArray(val),
|
|
31
|
+
[event.CHANGE_EVENT]: (val) => shared.isArray(val)
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.inputRangeEmits = inputRangeEmits;
|
|
35
|
+
exports.inputRangeProps = inputRangeProps;
|
|
36
|
+
//# sourceMappingURL=input-range.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-range.js","sources":["../../../../../../packages/components/input-range/src/input-range.ts"],"sourcesContent":["import {buildProps, isArray} from '@hzzt-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type InputRange from './input-range.vue'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\nimport {CHANGE_EVENT, UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\n\nexport const inputRangeProps = buildProps({\n modelValue: {\n type: Array,\n default: () => [],\n },\n size: useSizeProp,\n disabled: Boolean,\n clearable: {\n type: Boolean,\n default: false,\n },\n startPlaceholder: String,\n endPlaceholder: String,\n startProps: Object,\n endProps: Object,\n})\n\nexport type InputRangeProps = ExtractPropTypes<typeof inputRangeProps>\n\nexport const inputRangeEmits = {\n [UPDATE_MODEL_EVENT]: (val: Array<string>) => isArray(val),\n [CHANGE_EVENT]: (val: Array<string>) => isArray(val),\n}\nexport type InputRangeEmits = typeof inputRangeEmits\n\nexport type InputRangeInstance = InstanceType<typeof InputRange>\n"],"names":["buildProps","useSizeProp","UPDATE_MODEL_EVENT","isArray","CHANGE_EVENT"],"mappings":";;;;;;;;;;;;AAGY,MAAC,eAAe,GAAGA,kBAAU,CAAC;AAC1C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,KAAK;AACf,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,gBAAgB,EAAE,MAAM;AAC1B,EAAE,cAAc,EAAE,MAAM;AACxB,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,QAAQ,EAAE,MAAM;AAClB,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;AAC/B,EAAE,CAACC,wBAAkB,GAAG,CAAC,GAAG,KAAKC,cAAO,CAAC,GAAG,CAAC;AAC7C,EAAE,CAACC,kBAAY,GAAG,CAAC,GAAG,KAAKD,cAAO,CAAC,GAAG,CAAC;AACvC;;;;;"}
|