@kayak-sj/design 1.0.63 → 1.0.65
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/dist/components/k-form/composables/useKFormFields.d.ts +1 -1
- package/dist/components/k-form/types.d.ts +7 -3
- package/dist/index.js +314 -307
- package/package.json +4 -4
- package/src/styles/components/_k-form.scss +46 -4
- package/src/styles/tokens/_css-vars.scss +2 -2
- package/src/styles/tokens/_semantic.scss +3 -3
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kayak-sj/design",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.65",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "基于 Vue 3 与 Element Plus 的 Kayak PC 端 UI 组件库,提供 KForm、KTable 等表单与表格能力",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"sideEffects": [
|
|
8
8
|
"**/*.css",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"vite": "^8.1.5",
|
|
73
73
|
"vitest": "^4.1.10",
|
|
74
74
|
"vue": "^3.5.13",
|
|
75
|
-
"@kayak/
|
|
76
|
-
"@kayak/
|
|
75
|
+
"@kayak/vite-config": "1.0.0",
|
|
76
|
+
"@kayak/tsconfig": "1.0.0"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"build": "vite build",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
/// 编辑/弹窗:Grid 多列 + 右对齐标签
|
|
10
10
|
/// 列数由 --k-form-effective-cols 控制(ResizeObserver:放不下 label+控件min 时降为 1 列)
|
|
11
|
-
/// min-width
|
|
11
|
+
/// min-width:按控件 min,容器收窄时控件可从 max 缩到 min,再窄外层滚动
|
|
12
12
|
&--grid-layout {
|
|
13
13
|
display: grid;
|
|
14
14
|
min-width: var(--k-form-min-width);
|
|
@@ -60,6 +60,39 @@
|
|
|
60
60
|
min-width: 0;
|
|
61
61
|
width: 100%;
|
|
62
62
|
}
|
|
63
|
+
|
|
64
|
+
/// controlWidth: 'full' 等:顶层标准控件取消统一上限
|
|
65
|
+
> .el-form-item__content > .k-form-input,
|
|
66
|
+
> .el-form-item__content > .k-form-select,
|
|
67
|
+
> .el-form-item__content > .k-form-date-picker,
|
|
68
|
+
> .el-form-item__content > .k-form-time-picker,
|
|
69
|
+
> .el-form-item__content > .k-form-tree-select,
|
|
70
|
+
> .el-form-item__content > .k-form-input-number,
|
|
71
|
+
> .el-form-item__content > .k-form-select-multiple,
|
|
72
|
+
> .el-form-item__content > .k-form-scroll-select,
|
|
73
|
+
> .el-form-item__content > .el-select,
|
|
74
|
+
> .el-form-item__content > .el-tree-select,
|
|
75
|
+
> .el-form-item__content > .el-cascader {
|
|
76
|
+
max-width: none;
|
|
77
|
+
width: 100%;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/// controlWidth: 480 / '480px':覆盖统一 max-width
|
|
82
|
+
.k-form__item--control-width {
|
|
83
|
+
> .el-form-item__content > .k-form-input,
|
|
84
|
+
> .el-form-item__content > .k-form-select,
|
|
85
|
+
> .el-form-item__content > .k-form-date-picker,
|
|
86
|
+
> .el-form-item__content > .k-form-time-picker,
|
|
87
|
+
> .el-form-item__content > .k-form-tree-select,
|
|
88
|
+
> .el-form-item__content > .k-form-input-number,
|
|
89
|
+
> .el-form-item__content > .k-form-select-multiple,
|
|
90
|
+
> .el-form-item__content > .k-form-scroll-select,
|
|
91
|
+
> .el-form-item__content > .el-select,
|
|
92
|
+
> .el-form-item__content > .el-tree-select,
|
|
93
|
+
> .el-form-item__content > .el-cascader {
|
|
94
|
+
max-width: var(--k-form-field-control-max);
|
|
95
|
+
}
|
|
63
96
|
}
|
|
64
97
|
|
|
65
98
|
.el-form-item__label {
|
|
@@ -106,9 +139,12 @@
|
|
|
106
139
|
.el-form-item__content > .k-form-select,
|
|
107
140
|
.el-form-item__content > .k-form-date-picker,
|
|
108
141
|
.el-form-item__content > .k-form-time-picker,
|
|
142
|
+
.el-form-item__content > .k-form-tree-select,
|
|
143
|
+
.el-form-item__content > .k-form-input-number,
|
|
144
|
+
.el-form-item__content > .k-form-select-multiple,
|
|
145
|
+
.el-form-item__content > .k-form-scroll-select,
|
|
109
146
|
.el-form-item__content > .k-select,
|
|
110
147
|
.el-form-item__content > .k-input,
|
|
111
|
-
.el-form-item__content > .k-tree-select,
|
|
112
148
|
.el-form-item__content > .el-select,
|
|
113
149
|
.el-form-item__content > .el-tree-select,
|
|
114
150
|
.el-form-item__content > .el-cascader,
|
|
@@ -118,6 +154,11 @@
|
|
|
118
154
|
min-width: var(--k-form-control-min-width);
|
|
119
155
|
}
|
|
120
156
|
|
|
157
|
+
.el-form-item__content > .k-form-tree-select .el-tree-select,
|
|
158
|
+
.el-form-item__content > .k-form-tree-select .el-select {
|
|
159
|
+
width: 100%;
|
|
160
|
+
}
|
|
161
|
+
|
|
121
162
|
/// EP DatePicker 默认 --el-date-editor-width: 220px,与 Input 不对齐;强制跟表单列宽走
|
|
122
163
|
.el-form-item__content > .k-form-date-picker .el-date-editor,
|
|
123
164
|
.el-form-item__content > .k-form-date-picker .el-date-editor.el-input,
|
|
@@ -257,7 +298,7 @@
|
|
|
257
298
|
.k-form-time-picker,
|
|
258
299
|
.k-select,
|
|
259
300
|
.k-input,
|
|
260
|
-
.k-tree-select,
|
|
301
|
+
.k-form-tree-select,
|
|
261
302
|
.input-mix-select,
|
|
262
303
|
.el-select,
|
|
263
304
|
.el-date-editor,
|
|
@@ -404,7 +445,7 @@
|
|
|
404
445
|
.k-form-time-picker,
|
|
405
446
|
.k-select,
|
|
406
447
|
.k-input,
|
|
407
|
-
.k-tree-select,
|
|
448
|
+
.k-form-tree-select,
|
|
408
449
|
.input-mix-select,
|
|
409
450
|
.el-select,
|
|
410
451
|
.el-tree-select,
|
|
@@ -533,6 +574,7 @@
|
|
|
533
574
|
|
|
534
575
|
.k-form-tree-select {
|
|
535
576
|
width: 100%;
|
|
577
|
+
max-width: var(--k-form-control-max-width);
|
|
536
578
|
|
|
537
579
|
.el-tree-select {
|
|
538
580
|
width: 100%;
|
|
@@ -93,9 +93,9 @@
|
|
|
93
93
|
--k-form-control-bg: var(--k-color-bg-surface);
|
|
94
94
|
--k-form-control-max-width: #{sem.$form-control-max-width};
|
|
95
95
|
--k-form-control-min-width: #{sem.$form-control-min-width};
|
|
96
|
-
///
|
|
96
|
+
/// 换行列阈值 / 表单整体下限均按控件 min:宽时控件可到 max,窄时可从 max 缩到 min
|
|
97
97
|
--k-form-grid-min-col: calc(var(--k-form-label-width) + var(--k-form-control-min-width));
|
|
98
|
-
--k-form-min-width: calc(var(--k-form-label-width) + var(--k-form-control-
|
|
98
|
+
--k-form-min-width: calc(var(--k-form-label-width) + var(--k-form-control-min-width) + var(--k-form-padding-x) * 2);
|
|
99
99
|
--k-form-textarea-max-width: #{sem.$form-textarea-max-width};
|
|
100
100
|
|
|
101
101
|
--k-form-query-col-width: #{sem.$form-query-col-width};
|
|
@@ -31,12 +31,12 @@ $form-control-height: 32px !default;
|
|
|
31
31
|
$form-control-font-size: typo.$font-size-medium !default;
|
|
32
32
|
/** 控件理想宽度;空间充足时不超过此值 */
|
|
33
33
|
$form-control-max-width: 300px !default;
|
|
34
|
-
/**
|
|
34
|
+
/** 控件最小宽度;缩到此值后停止,再窄由外层滚动 */
|
|
35
35
|
$form-control-min-width: 200px !default;
|
|
36
36
|
/** grid 单列最小宽 = label + 控件 min;运行时随 --k-form-label-width 变化 */
|
|
37
37
|
$form-grid-min-col: calc(#{$form-label-width} + #{$form-control-min-width}) !default;
|
|
38
|
-
/**
|
|
39
|
-
$form-min-width: calc(#{$form-label-width} + #{$form-control-
|
|
38
|
+
/** 编辑表单整体最小宽:label+控件min+左右 padding,保证能从 max 缩到 min */
|
|
39
|
+
$form-min-width: calc(#{$form-label-width} + #{$form-control-min-width} + #{$form-padding-x} * 2) !default;
|
|
40
40
|
$form-textarea-max-width: 500px !default;
|
|
41
41
|
|
|
42
42
|
$form-query-col-width: 320px !default;
|