hzzt-plus 1.0.4 → 1.0.5
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.css +1 -1
- package/dist/index.full.js +391 -191
- package/dist/index.full.min.js +12 -12
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +15 -15
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +389 -192
- 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 +0 -67
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +67 -0
- 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/select/index.d.ts +5 -0
- package/es/components/select/index.mjs +9 -0
- package/es/components/select/index.mjs.map +1 -0
- package/es/components/select/src/select.d.ts +37 -0
- package/es/components/select/src/select.mjs +39 -0
- package/es/components/select/src/select.mjs.map +1 -0
- package/es/components/select/src/select.vue.d.ts +13237 -0
- package/es/components/select/src/select2.mjs +176 -0
- package/es/components/select/src/select2.mjs.map +1 -0
- package/es/components/select/style/css.d.ts +2 -0
- package/es/components/select/style/css.mjs +3 -0
- package/es/components/select/style/css.mjs.map +1 -0
- package/es/components/select/style/index.d.ts +2 -0
- package/es/components/select/style/index.mjs +3 -0
- package/es/components/select/style/index.mjs.map +1 -0
- package/es/components/select-input/index.d.ts +6 -6
- package/es/components/select-input/src/select-input.d.ts +1 -7
- package/es/components/select-input/src/select-input.mjs.map +1 -1
- package/es/components/select-input/src/select-input.vue.d.ts +1 -1
- package/es/components/select-input/src/select-input2.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 +0 -70
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +70 -0
- 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/select/index.d.ts +5 -0
- package/lib/components/select/index.js +16 -0
- package/lib/components/select/index.js.map +1 -0
- package/lib/components/select/src/select.d.ts +37 -0
- package/lib/components/select/src/select.js +44 -0
- package/lib/components/select/src/select.js.map +1 -0
- package/lib/components/select/src/select.vue.d.ts +13237 -0
- package/lib/components/select/src/select2.js +180 -0
- package/lib/components/select/src/select2.js.map +1 -0
- package/lib/components/select/style/css.d.ts +2 -0
- package/lib/components/select/style/css.js +6 -0
- package/lib/components/select/style/css.js.map +1 -0
- package/lib/components/select/style/index.d.ts +2 -0
- package/lib/components/select/style/index.js +6 -0
- package/lib/components/select/style/index.js.map +1 -0
- package/lib/components/select-input/index.d.ts +6 -6
- package/lib/components/select-input/src/select-input.d.ts +1 -7
- package/lib/components/select-input/src/select-input.js.map +1 -1
- package/lib/components/select-input/src/select-input.vue.d.ts +1 -1
- package/lib/components/select-input/src/select-input2.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-select.css +1 -0
- package/theme/index.css +1 -1
- package/theme/src/index.scss +1 -0
- package/theme/src/mixins/mixins.scss +3 -0
- package/theme/src/select.scss +10 -0
- package/web-types.json +1 -1
package/es/component.mjs
CHANGED
|
@@ -15,6 +15,7 @@ import { HzztSelectInput } from './components/select-input/index.mjs';
|
|
|
15
15
|
import { HzztSelectTextarea } from './components/select-textarea/index.mjs';
|
|
16
16
|
import { HzztInputRange } from './components/input-range/index.mjs';
|
|
17
17
|
import { HzztCascader } from './components/cascader/index.mjs';
|
|
18
|
+
import { HzztSelect } from './components/select/index.mjs';
|
|
18
19
|
|
|
19
20
|
var Components = [
|
|
20
21
|
HzztConfigProvider,
|
|
@@ -33,7 +34,8 @@ var Components = [
|
|
|
33
34
|
HzztSelectInput,
|
|
34
35
|
HzztSelectTextarea,
|
|
35
36
|
HzztInputRange,
|
|
36
|
-
HzztCascader
|
|
37
|
+
HzztCascader,
|
|
38
|
+
HzztSelect
|
|
37
39
|
];
|
|
38
40
|
|
|
39
41
|
export { Components as default };
|
package/es/component.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.mjs","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'\nimport { HzztCascader } from '@hzzt-plus/components/cascader'\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 HzztCascader,\n] as Plugin[]\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.mjs","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'\nimport { HzztCascader } from '@hzzt-plus/components/cascader'\nimport { HzztSelect } from '@hzzt-plus/components/select'\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 HzztCascader,\n HzztSelect,\n] as Plugin[]\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,iBAAe;AACf,EAAE,kBAAkB;AACpB,EAAE,SAAS;AACX,EAAE,YAAY;AACd,EAAE,YAAY;AACd,EAAE,OAAO;AACT,EAAE,QAAQ;AACV,EAAE,cAAc;AAChB,EAAE,WAAW;AACb,EAAE,YAAY;AACd,EAAE,mBAAmB;AACrB,EAAE,eAAe;AACjB,EAAE,iBAAiB;AACnB,EAAE,QAAQ;AACV,EAAE,eAAe;AACjB,EAAE,kBAAkB;AACpB,EAAE,cAAc;AAChB,EAAE,YAAY;AACd,EAAE,UAAU;AACZ,CAAC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Collapse from './src/
|
|
3
|
-
import './src/
|
|
2
|
+
import Collapse from './src/collapse2.mjs';
|
|
3
|
+
import './src/collapse.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const HzztCollapse = withInstall(Collapse);
|
|
@@ -1,69 +1,2 @@
|
|
|
1
|
-
import { createElementVNode, defineComponent, ref, watch, openBlock, createElementBlock, toDisplayString, unref, createCommentVNode, renderSlot } from 'vue';
|
|
2
|
-
import '../../../hooks/index.mjs';
|
|
3
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
4
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
5
1
|
|
|
6
|
-
const _hoisted_1 = { class: "hzzt-collapse" };
|
|
7
|
-
const _hoisted_2 = { class: "flex align-items-center" };
|
|
8
|
-
const _hoisted_3 = { class: "hzzt-collapse-title-wrapper" };
|
|
9
|
-
const _hoisted_4 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-title-block" }, null, -1);
|
|
10
|
-
const _hoisted_5 = { class: "hzzt-collapse-title" };
|
|
11
|
-
const _hoisted_6 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-line" }, null, -1);
|
|
12
|
-
const _hoisted_7 = {
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "hzzt-collapse-text"
|
|
15
|
-
};
|
|
16
|
-
const __default__ = defineComponent({
|
|
17
|
-
name: "HzztCollapse"
|
|
18
|
-
});
|
|
19
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
|
-
...__default__,
|
|
21
|
-
props: {
|
|
22
|
-
defaultActive: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false
|
|
25
|
-
},
|
|
26
|
-
title: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: ""
|
|
29
|
-
},
|
|
30
|
-
expand: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: true
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
setup(__props) {
|
|
36
|
-
const props = __props;
|
|
37
|
-
const { t } = useLocale();
|
|
38
|
-
const active = ref(props.defaultActive);
|
|
39
|
-
watch(() => props.defaultActive, (val) => {
|
|
40
|
-
active.value = val;
|
|
41
|
-
});
|
|
42
|
-
function toggle() {
|
|
43
|
-
active.value = !active.value;
|
|
44
|
-
}
|
|
45
|
-
return (_ctx, _cache) => {
|
|
46
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
47
|
-
createElementVNode("div", {
|
|
48
|
-
class: "hzzt-collapse-header",
|
|
49
|
-
onClick: toggle
|
|
50
|
-
}, [
|
|
51
|
-
createElementVNode("div", _hoisted_2, [
|
|
52
|
-
createElementVNode("div", _hoisted_3, [
|
|
53
|
-
_hoisted_4,
|
|
54
|
-
createElementVNode("div", _hoisted_5, toDisplayString(__props.title), 1)
|
|
55
|
-
]),
|
|
56
|
-
_hoisted_6
|
|
57
|
-
]),
|
|
58
|
-
__props.expand ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(active.value ? unref(t)("hzzt.collapse.retract") : unref(t)("hzzt.collapse.expand")), 1)) : createCommentVNode("v-if", true)
|
|
59
|
-
]),
|
|
60
|
-
renderSlot(_ctx.$slots, "active", { active: active.value }),
|
|
61
|
-
renderSlot(_ctx.$slots, "default")
|
|
62
|
-
]);
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "collapse.vue"]]);
|
|
67
|
-
|
|
68
|
-
export { Collapse as default };
|
|
69
2
|
//# sourceMappingURL=collapse.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"collapse.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,69 @@
|
|
|
1
|
+
import { createElementVNode, defineComponent, ref, watch, openBlock, createElementBlock, toDisplayString, unref, createCommentVNode, renderSlot } from 'vue';
|
|
2
|
+
import '../../../hooks/index.mjs';
|
|
3
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
4
|
+
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
1
5
|
|
|
6
|
+
const _hoisted_1 = { class: "hzzt-collapse" };
|
|
7
|
+
const _hoisted_2 = { class: "flex align-items-center" };
|
|
8
|
+
const _hoisted_3 = { class: "hzzt-collapse-title-wrapper" };
|
|
9
|
+
const _hoisted_4 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-title-block" }, null, -1);
|
|
10
|
+
const _hoisted_5 = { class: "hzzt-collapse-title" };
|
|
11
|
+
const _hoisted_6 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-line" }, null, -1);
|
|
12
|
+
const _hoisted_7 = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "hzzt-collapse-text"
|
|
15
|
+
};
|
|
16
|
+
const __default__ = defineComponent({
|
|
17
|
+
name: "HzztCollapse"
|
|
18
|
+
});
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
|
+
...__default__,
|
|
21
|
+
props: {
|
|
22
|
+
defaultActive: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
26
|
+
title: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
expand: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: true
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
setup(__props) {
|
|
36
|
+
const props = __props;
|
|
37
|
+
const { t } = useLocale();
|
|
38
|
+
const active = ref(props.defaultActive);
|
|
39
|
+
watch(() => props.defaultActive, (val) => {
|
|
40
|
+
active.value = val;
|
|
41
|
+
});
|
|
42
|
+
function toggle() {
|
|
43
|
+
active.value = !active.value;
|
|
44
|
+
}
|
|
45
|
+
return (_ctx, _cache) => {
|
|
46
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
47
|
+
createElementVNode("div", {
|
|
48
|
+
class: "hzzt-collapse-header",
|
|
49
|
+
onClick: toggle
|
|
50
|
+
}, [
|
|
51
|
+
createElementVNode("div", _hoisted_2, [
|
|
52
|
+
createElementVNode("div", _hoisted_3, [
|
|
53
|
+
_hoisted_4,
|
|
54
|
+
createElementVNode("div", _hoisted_5, toDisplayString(__props.title), 1)
|
|
55
|
+
]),
|
|
56
|
+
_hoisted_6
|
|
57
|
+
]),
|
|
58
|
+
__props.expand ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(active.value ? unref(t)("hzzt.collapse.retract") : unref(t)("hzzt.collapse.expand")), 1)) : createCommentVNode("v-if", true)
|
|
59
|
+
]),
|
|
60
|
+
renderSlot(_ctx.$slots, "active", { active: active.value }),
|
|
61
|
+
renderSlot(_ctx.$slots, "default")
|
|
62
|
+
]);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "collapse.vue"]]);
|
|
67
|
+
|
|
68
|
+
export { Collapse as default };
|
|
2
69
|
//# sourceMappingURL=collapse2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"collapse2.mjs","sources":["../../../../../../packages/components/collapse/src/collapse.vue"],"sourcesContent":["<template>\n <div class=\"hzzt-collapse\">\n <div class=\"hzzt-collapse-header\" @click=\"toggle\">\n <div class=\"flex align-items-center\">\n <div class=\"hzzt-collapse-title-wrapper\">\n <div class=\"hzzt-collapse-title-block\" />\n <div class=\"hzzt-collapse-title\">{{ title }}</div>\n </div>\n <div class=\"hzzt-collapse-line\" />\n </div>\n <span v-if=\"expand\" class=\"hzzt-collapse-text\">{{\n active ? t('hzzt.collapse.retract') : t('hzzt.collapse.expand')\n }}</span>\n </div>\n <slot name=\"active\" :active=\"active\" />\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch } from 'vue'\nimport { useLocale } from '@hzzt-plus/hooks'\n\ndefineOptions({\n name: 'HzztCollapse',\n})\nconst { t } = useLocale()\nconst props = defineProps({\n defaultActive: {\n type: Boolean,\n default: false,\n },\n title: {\n type: String,\n default: '',\n },\n expand: {\n type: Boolean,\n default: true,\n },\n})\n\nconst active = ref(props.defaultActive)\n\nwatch(\n () => props.defaultActive,\n (val: boolean) => {\n active.value = val\n }\n)\n\nfunction toggle() {\n active.value = !active.value\n}\n</script>\n"],"names":["_createElementVNode","_toDisplayString","_openBlock","_createElementBlock","_unref","_createCommentVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAoBA,KAAA;AACA,IAAA,KAAS,EAAiB;;;AAEZ,KACN;AACR,IAAA,MAAA,EAAA;;;;;;;;;;;;;;;;;;;AACA,UAAM,OAAI,EAAc,MAAA;AAgBxB,SAAM,EAAA;AAEN,UAAAA,kBAAA,CAAA,KAAA,EAAA,UAAA,EAAA;AAAA,YACQA,kBAAM,CAAA,KAAA,EAAA,UAAA,EAAA;AAAA,cACM,UAAA;AAChB,cAAAA,kBAAe,CAAA,KAAA,EAAA,UAAA,EAAAC,eAAA,CAAA,OAAA,CAAA,KAAA,CAAA,EAAA,CAAA,CAAA;AAAA,aACjB,CAAA;AAAA,YACF,UAAA;AAEA,WAAA,CAAA;AACE,UAAO,OAAA,CAAA,MAAgB,IAAAC,SAAA,EAAA,EAAAC,kBAAA,CAAA,MAAA,EAAA,UAAA,EAAAF,eAAA,CAAA,MAAA,CAAA,KAAA,GAAAG,KAAA,CAAA,CAAA,CAAA,CAAA,uBAAA,CAAA,GAAAA,KAAA,CAAA,CAAA,CAAA,CAAA,sBAAA,CAAA,CAAA,EAAA,CAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA;AAAA,SACzB,CAAA;;;;;;;;;;;"}
|
package/es/components/index.d.ts
CHANGED
package/es/components/index.mjs
CHANGED
|
@@ -15,6 +15,7 @@ export { HzztSelectInput } from './select-input/index.mjs';
|
|
|
15
15
|
export { HzztSelectTextarea } from './select-textarea/index.mjs';
|
|
16
16
|
export { HzztInputRange } from './input-range/index.mjs';
|
|
17
17
|
export { HzztCascader } from './cascader/index.mjs';
|
|
18
|
+
export { HzztSelect } from './select/index.mjs';
|
|
18
19
|
export { titleProps } from './title/src/title.mjs';
|
|
19
20
|
export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
|
|
20
21
|
export { configProviderContextKey } from './config-provider/src/constants.mjs';
|
|
@@ -24,4 +25,5 @@ export { selectInputEmits, selectInputProps } from './select-input/src/select-in
|
|
|
24
25
|
export { selectTextareaEmits, selectTextareaProps } from './select-textarea/src/select-textarea.mjs';
|
|
25
26
|
export { inputRangeEmits, inputRangeProps } from './input-range/src/input-range.mjs';
|
|
26
27
|
export { cascaderEmits, cascaderProps } from './cascader/src/cascader.mjs';
|
|
28
|
+
export { selectEmits, selectProps } from './select/src/select.mjs';
|
|
27
29
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '../../utils/index.mjs';
|
|
2
|
+
import Select from './src/select2.mjs';
|
|
3
|
+
export { selectEmits, selectProps } from './src/select.mjs';
|
|
4
|
+
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
|
+
|
|
6
|
+
const HzztSelect = withInstall(Select);
|
|
7
|
+
|
|
8
|
+
export { HzztSelect, HzztSelect as default };
|
|
9
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/select/index.ts"],"sourcesContent":["import { withInstall } from '@hzzt-plus/utils'\nimport Select from './src/select.vue'\nimport type { SFCWithInstall } from '@hzzt-plus/utils'\n\nexport const HzztSelect: SFCWithInstall<typeof Select> = withInstall(Select)\nexport default HzztSelect\n\nexport * from './src/select'\n"],"names":[],"mappings":";;;;;AAEY,MAAC,UAAU,GAAG,WAAW,CAAC,MAAM;;;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
import type Select from './select.vue';
|
|
3
|
+
declare type OptionCommon = Record<string, any>;
|
|
4
|
+
export declare type Option = OptionCommon & {
|
|
5
|
+
created?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare type OptionGroup = OptionCommon;
|
|
8
|
+
export declare type OptionType = Option | OptionGroup;
|
|
9
|
+
export declare const selectProps: {
|
|
10
|
+
selectProps: ObjectConstructor;
|
|
11
|
+
options: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => OptionType[]) | (() => OptionType[]) | ((new (...args: any[]) => OptionType[]) | (() => OptionType[]))[], unknown, unknown, () => never[], boolean>;
|
|
12
|
+
modelValue: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string | null | undefined) | ((new (...args: any[]) => string & {}) | (() => string | null | undefined))[], unknown, unknown, string, boolean>;
|
|
13
|
+
disabled: BooleanConstructor;
|
|
14
|
+
readonly: BooleanConstructor;
|
|
15
|
+
clearable: BooleanConstructor;
|
|
16
|
+
placeholder: StringConstructor;
|
|
17
|
+
size: {
|
|
18
|
+
readonly type: import("vue").PropType<import("hzzt-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
19
|
+
readonly required: false;
|
|
20
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
21
|
+
__epPropKey: true;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare type SelectProps = ExtractPropTypes<typeof selectProps>;
|
|
25
|
+
export declare const selectEmits: {
|
|
26
|
+
"update:modelValue": (value: string | undefined) => boolean;
|
|
27
|
+
input: (value: string | undefined) => boolean;
|
|
28
|
+
change: (value: string | undefined) => boolean;
|
|
29
|
+
'arrow-down': (e: KeyboardEvent | Event) => Event | KeyboardEvent;
|
|
30
|
+
'arrow-up': (e: KeyboardEvent | Event) => Event | KeyboardEvent;
|
|
31
|
+
'arrow-left': (e: KeyboardEvent | Event) => Event | KeyboardEvent;
|
|
32
|
+
'arrow-right': (e: KeyboardEvent | Event) => Event | KeyboardEvent;
|
|
33
|
+
enter: (e: KeyboardEvent | Event) => Event | KeyboardEvent;
|
|
34
|
+
};
|
|
35
|
+
export declare type SelectEmits = typeof selectEmits;
|
|
36
|
+
export declare type SelectInstance = InstanceType<typeof Select>;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import '../../../constants/index.mjs';
|
|
3
|
+
import '../../../hooks/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 } from '../../../constants/event.mjs';
|
|
7
|
+
import { isString } from '@vue/shared';
|
|
8
|
+
|
|
9
|
+
const selectProps = buildProps({
|
|
10
|
+
selectProps: Object,
|
|
11
|
+
options: {
|
|
12
|
+
type: definePropType(Array),
|
|
13
|
+
default: () => []
|
|
14
|
+
},
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: definePropType([
|
|
17
|
+
String
|
|
18
|
+
]),
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
disabled: Boolean,
|
|
22
|
+
readonly: Boolean,
|
|
23
|
+
clearable: Boolean,
|
|
24
|
+
placeholder: String,
|
|
25
|
+
size: useSizeProp
|
|
26
|
+
});
|
|
27
|
+
const selectEmits = {
|
|
28
|
+
[UPDATE_MODEL_EVENT]: (value) => isString(value),
|
|
29
|
+
"input": (value) => isString(value),
|
|
30
|
+
"change": (value) => isString(value),
|
|
31
|
+
"arrow-down": (e) => e,
|
|
32
|
+
"arrow-up": (e) => e,
|
|
33
|
+
"arrow-left": (e) => e,
|
|
34
|
+
"arrow-right": (e) => e,
|
|
35
|
+
"enter": (e) => e
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { selectEmits, selectProps };
|
|
39
|
+
//# sourceMappingURL=select.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.mjs","sources":["../../../../../../packages/components/select/src/select.ts"],"sourcesContent":["import {buildProps, definePropType, isString} from '@hzzt-plus/utils'\nimport type {ExtractPropTypes} from 'vue'\nimport type Select from './select.vue'\nimport {UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\n\n\ntype OptionCommon = Record<string, any>\n\nexport type Option = OptionCommon & {\n created?: boolean\n}\n\nexport type OptionGroup = OptionCommon\n\nexport type OptionType = Option | OptionGroup\n\nexport const selectProps = buildProps({\n selectProps: Object,\n options: {\n type: definePropType<OptionType[]>(Array),\n default: () => [],\n },\n modelValue: {\n type: definePropType<string | null | undefined>([\n String,\n ]),\n default: '',\n },\n disabled: Boolean,\n readonly: Boolean,\n clearable: Boolean,\n placeholder: String,\n size: useSizeProp,\n})\n\nexport type SelectProps = ExtractPropTypes<typeof selectProps>\n\nexport const selectEmits = {\n [UPDATE_MODEL_EVENT]: (value: string | undefined) => isString(value),\n 'input': (value: string | undefined) => isString(value),\n 'change': (value: string | undefined) => isString(value),\n 'arrow-down': (e: KeyboardEvent | Event) => e,\n 'arrow-up': (e: KeyboardEvent | Event) => e,\n 'arrow-left': (e: KeyboardEvent | Event) => e,\n 'arrow-right': (e: KeyboardEvent | Event) => e,\n 'enter': (e: KeyboardEvent | Event) => e,\n}\nexport type SelectEmits = typeof selectEmits\n\n\nexport type SelectInstance = InstanceType<typeof Select>\n"],"names":[],"mappings":";;;;;;;;AAGY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC;AACzB,MAAM,MAAM;AACZ,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,IAAI,EAAE,WAAW;AACnB,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAClD,EAAE,OAAO,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AACrC,EAAE,QAAQ,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AACtC,EAAE,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC;AACxB,EAAE,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC;AACtB,EAAE,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC;AACxB,EAAE,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC;AACzB,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC;AACnB;;;;"}
|