@kdcloudjs/kdesign 1.7.59 → 1.7.61
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/CHANGELOG.md +21 -8
- package/dist/kdesign-complete.less +131 -3
- package/dist/kdesign.css +223 -5
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +2313 -258
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +16 -12
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/domUtil.d.ts +2 -0
- package/es/_utils/domUtil.js +15 -0
- package/es/cascader/cascader.js +41 -10
- package/es/city-picker/style/index.css +7 -0
- package/es/city-picker/style/index.less +3 -0
- package/es/config-provider/compDefaultProps.d.ts +7 -0
- package/es/config-provider/compDefaultProps.js +7 -0
- package/es/date-picker/date-panel.js +2 -2
- package/es/date-picker/date-picker.d.ts +2 -1
- package/es/date-picker/date-picker.js +44 -18
- package/es/date-picker/hooks/use-range-view-dates.js +8 -2
- package/es/date-picker/interface.d.ts +6 -2
- package/es/date-picker/locale/zh_CN.js +1 -22
- package/es/date-picker/panel/month/month.js +1 -3
- package/es/date-picker/range-picker.js +7 -3
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/locale/locale.d.ts +7 -1
- package/es/locale/zh-CN.d.ts +7 -1
- package/es/locale/zh-CN.js +6 -1
- package/es/modal/modal.js +3 -1
- package/es/popconfirm/popconfirm.js +1 -1
- package/es/select/select.js +1 -1
- package/es/select/style/index.css +4 -4
- package/es/select/style/token.less +2 -2
- package/es/signature/drawingBoard.d.ts +15 -0
- package/es/signature/drawingBoard.js +163 -0
- package/es/signature/index.d.ts +3 -0
- package/es/signature/index.js +3 -0
- package/es/signature/signature.d.ts +32 -0
- package/es/signature/signature.js +268 -0
- package/es/signature/style/css.js +2 -0
- package/es/signature/style/index.css +210 -0
- package/es/signature/style/index.d.ts +2 -0
- package/es/signature/style/index.js +2 -0
- package/es/signature/style/index.less +95 -0
- package/es/signature/style/mixin.less +6 -0
- package/es/signature/style/token.less +22 -0
- package/es/signature/utils/signature_pad.d.ts +106 -0
- package/es/signature/utils/signature_pad.js +690 -0
- package/es/style/themes/default.less +1 -1
- package/lib/_utils/domUtil.d.ts +2 -0
- package/lib/_utils/domUtil.js +23 -0
- package/lib/cascader/cascader.js +41 -10
- package/lib/city-picker/style/index.css +7 -0
- package/lib/city-picker/style/index.less +3 -0
- package/lib/config-provider/compDefaultProps.d.ts +7 -0
- package/lib/config-provider/compDefaultProps.js +7 -0
- package/lib/date-picker/date-panel.js +2 -2
- package/lib/date-picker/date-picker.d.ts +2 -1
- package/lib/date-picker/date-picker.js +47 -20
- package/lib/date-picker/hooks/use-range-view-dates.js +7 -1
- package/lib/date-picker/interface.d.ts +6 -2
- package/lib/date-picker/locale/zh_CN.js +1 -22
- package/lib/date-picker/panel/month/month.js +3 -5
- package/lib/date-picker/range-picker.js +7 -3
- package/lib/index.d.ts +1 -0
- package/lib/index.js +7 -0
- package/lib/locale/locale.d.ts +7 -1
- package/lib/locale/zh-CN.d.ts +7 -1
- package/lib/locale/zh-CN.js +6 -1
- package/lib/modal/modal.js +3 -1
- package/lib/popconfirm/popconfirm.js +1 -1
- package/lib/select/select.js +1 -1
- package/lib/select/style/index.css +4 -4
- package/lib/select/style/token.less +2 -2
- package/lib/signature/drawingBoard.d.ts +15 -0
- package/lib/signature/drawingBoard.js +176 -0
- package/lib/signature/index.d.ts +3 -0
- package/lib/signature/index.js +27 -0
- package/lib/signature/signature.d.ts +32 -0
- package/lib/signature/signature.js +282 -0
- package/lib/signature/style/css.js +4 -0
- package/lib/signature/style/index.css +210 -0
- package/lib/signature/style/index.d.ts +2 -0
- package/lib/signature/style/index.js +4 -0
- package/lib/signature/style/index.less +95 -0
- package/lib/signature/style/mixin.less +6 -0
- package/lib/signature/style/token.less +22 -0
- package/lib/signature/utils/signature_pad.d.ts +106 -0
- package/lib/signature/utils/signature_pad.js +697 -0
- package/lib/style/components.less +1 -0
- package/lib/style/themes/default.less +1 -1
- package/package.json +3 -2
- package/es/date-picker/locale/en_GB.d.ts +0 -1
- package/es/date-picker/locale/en_GB.js +0 -33
- package/es/date-picker/locale/en_US.d.ts +0 -1
- package/es/date-picker/locale/en_US.js +0 -33
- package/es/date-picker/locale/zh_TW.d.ts +0 -1
- package/es/date-picker/locale/zh_TW.js +0 -33
- package/lib/date-picker/locale/en_GB.d.ts +0 -1
- package/lib/date-picker/locale/en_GB.js +0 -33
- package/lib/date-picker/locale/en_US.d.ts +0 -1
- package/lib/date-picker/locale/en_US.js +0 -33
- package/lib/date-picker/locale/zh_TW.d.ts +0 -1
- package/lib/date-picker/locale/zh_TW.js +0 -33
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/* ----------- color ——————---- start */
|
|
2
|
+
/* ----------- color ——————---- end */
|
|
3
|
+
/* ----------- motion ——————---- start */
|
|
4
|
+
/* ----------- motion ——————---- end */
|
|
5
|
+
/* ----------- transition ——————---- start */
|
|
6
|
+
/* ----------- transition ——————---- end */
|
|
7
|
+
/* ----------- font ——————---- start */
|
|
8
|
+
/* ----------- font ——————---- end */
|
|
9
|
+
/* ----------- zIndex ——————---- start */
|
|
10
|
+
/*
|
|
11
|
+
普通组件内部自身层级应设置在0-100间
|
|
12
|
+
*/
|
|
13
|
+
/* ----------- zIndex ——————---- end */
|
|
14
|
+
/* ----------- Button ——————---- start */
|
|
15
|
+
/* ----------- Button ——————---- end */
|
|
16
|
+
/* ----------- Collapse ——————---- start */
|
|
17
|
+
/* ----------- Collapse ——————---- end */
|
|
18
|
+
/* ----------- Card ——————---- start */
|
|
19
|
+
/* ----------- Card ——————---- end */
|
|
20
|
+
/* ----------- Carousel ——————---- start */
|
|
21
|
+
/* ----------- Carousel ——————---- end */
|
|
22
|
+
/* ----------- Cascader ——————---- start */
|
|
23
|
+
/* ----------- Cascader ——————---- end */
|
|
24
|
+
/* ----------- Switch ——————---- start */
|
|
25
|
+
/* ----------- Switch ——————---- end */
|
|
26
|
+
/* ----------- Input ——————---- start */
|
|
27
|
+
/* ----------- Input ——————---- end */
|
|
28
|
+
/* ----------- InputNumber ——————---- start */
|
|
29
|
+
/* ----------- InputNumber ——————---- end */
|
|
30
|
+
/* ----------- checkbox ——————---- start */
|
|
31
|
+
/* ----------- checkbox ——————---- start */
|
|
32
|
+
/* ----------- checkbox ——————---- end */
|
|
33
|
+
/* ----------- Radio ——————---- start */
|
|
34
|
+
/* ----------- Radio ——————---- end */
|
|
35
|
+
/* ----------- icon ——————---- start */
|
|
36
|
+
/* ----------- icon ——————---- end */
|
|
37
|
+
/* ----------- Popconfirm ——————---- start */
|
|
38
|
+
/* ----------- Popconfirm ——————---- end */
|
|
39
|
+
/* ----------- Progress ——————---- start */
|
|
40
|
+
/* ----------- Progress ——————---- end */
|
|
41
|
+
/* ----------- Pagination ——————---- start */
|
|
42
|
+
/* ----------- Pagination ——————---- end */
|
|
43
|
+
/* ----------- Timeline ——————---- start */
|
|
44
|
+
/* ----------- Timeline ——————---- end */
|
|
45
|
+
/* ----------- Tabs ——————---- start */
|
|
46
|
+
/* ----------- Tabs ——————---- end */
|
|
47
|
+
/* ----------- Select ——————---- start */
|
|
48
|
+
/* ----------- Select ——————---- end */
|
|
49
|
+
/* ----------- Rate ——————---- start */
|
|
50
|
+
/* ----------- Rate ——————---- end */
|
|
51
|
+
/* ----------- Dropdown ——————---- start */
|
|
52
|
+
/* ----------- Dropdown ——————---- end */
|
|
53
|
+
/* ----------- Tooltip ——————---- start */
|
|
54
|
+
/* ----------- Tooltip ——————---- end */
|
|
55
|
+
/* ----------- Transfer ——————---- start */
|
|
56
|
+
/* ----------- Transfer ——————---- end */
|
|
57
|
+
/* ----------- DatePicker ——————---- start */
|
|
58
|
+
/* ----------- DatePicker ——————---- end */
|
|
59
|
+
/* ----------- ColorPicker ——————---- start */
|
|
60
|
+
/* ----------- ColorPicker ——————---- end */
|
|
61
|
+
/* ----------- Tree ——————---- start */
|
|
62
|
+
/* ----------- Tree ——————---- end */
|
|
63
|
+
/* ----------- Alert ——————---- start */
|
|
64
|
+
/* ----------- Alert ——————---- end */
|
|
65
|
+
/* ----------- Split-Panel ——————---- start */
|
|
66
|
+
/* ----------- Split-Panel ——————---- end */
|
|
67
|
+
/* ----------- Modal ——————---- start */
|
|
68
|
+
/* ----------- Modal ——————---- end */
|
|
69
|
+
/* ----------- Steps ——————---- start */
|
|
70
|
+
/* ----------- Steps ——————---- end */
|
|
71
|
+
/* ----------- Form ——————---- start */
|
|
72
|
+
/* ----------- Form ——————---- end */
|
|
73
|
+
/* ----------- Tag ——————---- start */
|
|
74
|
+
/* ----------- Tag ——————---- end */
|
|
75
|
+
/* ----------- Menu ——————---- start */
|
|
76
|
+
/* ----------- Menu ——————---- end */
|
|
77
|
+
/* ----------- notice ——————---- start */
|
|
78
|
+
/* ----------- message ——————---- end */
|
|
79
|
+
/* ----------- Spin ——————---- start */
|
|
80
|
+
/* ----------- Spin ——————---- end */
|
|
81
|
+
/* ----------- Spin ——————---- start */
|
|
82
|
+
/* ----------- Spin ——————---- end */
|
|
83
|
+
/* ----------- Layout ——————---- start */
|
|
84
|
+
/* ----------- Layout ——————---- end */
|
|
85
|
+
/* ----------- Typography ——————---- start */
|
|
86
|
+
/* ----------- Typography ——————---- start */
|
|
87
|
+
/* ----------- Search ——————---- start */
|
|
88
|
+
/* ----------- Search ——————---- start */
|
|
89
|
+
/* ----------- Badge ——————---- start */
|
|
90
|
+
/* ----------- Badge ——————---- end */
|
|
91
|
+
/* ----------- Anchor ——————---- start */
|
|
92
|
+
/* ----------- Anchor ——————---- end */
|
|
93
|
+
/* ----------- Avatar ——————---- start */
|
|
94
|
+
/* ----------- Avatar ——————---- end */
|
|
95
|
+
/* ----------- AdvancedSelector ——————---- start */
|
|
96
|
+
/* ----------- AdvancedSelector ——————---- end */
|
|
97
|
+
/* ----------- motion ——————---- start */
|
|
98
|
+
/* ----------- motion ——————---- end */
|
|
99
|
+
/* ----------- transition ——————---- start */
|
|
100
|
+
/* ----------- transition ——————---- end */
|
|
101
|
+
/* ----------- zIndex ——————---- start */
|
|
102
|
+
/*
|
|
103
|
+
普通组件内部自身层级应设置在0-100间
|
|
104
|
+
*/
|
|
105
|
+
/* ----------- zIndex ——————---- end */
|
|
106
|
+
.kd-signature {
|
|
107
|
+
-webkit-box-sizing: border-box;
|
|
108
|
+
box-sizing: border-box;
|
|
109
|
+
border: 1px dashed #e5e5e5;
|
|
110
|
+
width: 100%;
|
|
111
|
+
height: 100%;
|
|
112
|
+
display: -webkit-box;
|
|
113
|
+
display: -ms-flexbox;
|
|
114
|
+
display: flex;
|
|
115
|
+
-webkit-box-orient: vertical;
|
|
116
|
+
-webkit-box-direction: normal;
|
|
117
|
+
-ms-flex-direction: column;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
-webkit-box-pack: center;
|
|
120
|
+
-ms-flex-pack: center;
|
|
121
|
+
justify-content: center;
|
|
122
|
+
-webkit-box-align: center;
|
|
123
|
+
-ms-flex-align: center;
|
|
124
|
+
align-items: center;
|
|
125
|
+
background: var(--kd-c-signature-bg-color, #fafafa);
|
|
126
|
+
color: var(--kd-c-signature-color-text, #999999);
|
|
127
|
+
font-size: var(--kd-c-signature-font-size, 12px);
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
border-radius: var(--kd-c-signature-border-radius, var(--kd-g-radius-border, 2px));
|
|
130
|
+
-webkit-transition: border-color var(--kd-c-signature-motion-duration, var(--kd-g-duration, 0.3s)), background-color var(--kd-c-signature-motion-duration, var(--kd-g-duration, 0.3s));
|
|
131
|
+
transition: border-color var(--kd-c-signature-motion-duration, var(--kd-g-duration, 0.3s)), background-color var(--kd-c-signature-motion-duration, var(--kd-g-duration, 0.3s));
|
|
132
|
+
}
|
|
133
|
+
.kd-signature:hover {
|
|
134
|
+
border-color: var(--kd-c-signature-border-color-hover, var(--kd-g-color-theme-5, #87adff));
|
|
135
|
+
background-color: var(--kd-c-signature-bg-color-hover, var(--kd-g-color-theme-1, #f2f8ff));
|
|
136
|
+
}
|
|
137
|
+
.kd-signature.kd-signature-disabled {
|
|
138
|
+
cursor: not-allowed;
|
|
139
|
+
border: 1px solid var(--kd-g-color-border-disabled, #ccc);
|
|
140
|
+
background: var(--kd-c-signature-bg-color, #fafafa);
|
|
141
|
+
color: var(--kd-c-signature-color-text, #999999);
|
|
142
|
+
}
|
|
143
|
+
.kd-signature-drawing-board {
|
|
144
|
+
width: 100%;
|
|
145
|
+
height: 100%;
|
|
146
|
+
border: 1px solid #e5e5e5;
|
|
147
|
+
-webkit-box-sizing: border-box;
|
|
148
|
+
box-sizing: border-box;
|
|
149
|
+
background: var(--kd-c-signature-drawing-board-bg-color, #fafafa);
|
|
150
|
+
position: relative;
|
|
151
|
+
}
|
|
152
|
+
.kd-signature-drawing-board-operation {
|
|
153
|
+
display: -webkit-box;
|
|
154
|
+
display: -ms-flexbox;
|
|
155
|
+
display: flex;
|
|
156
|
+
-webkit-box-align: center;
|
|
157
|
+
-ms-flex-align: center;
|
|
158
|
+
align-items: center;
|
|
159
|
+
position: absolute;
|
|
160
|
+
top: 9px;
|
|
161
|
+
right: 9px;
|
|
162
|
+
color: #b2b2b2;
|
|
163
|
+
z-index: 9999;
|
|
164
|
+
}
|
|
165
|
+
.kd-signature-drawing-board-operation > * {
|
|
166
|
+
cursor: pointer;
|
|
167
|
+
}
|
|
168
|
+
.kd-signature-drawing-board-operation > *:not(:last-child) {
|
|
169
|
+
margin-right: 13px;
|
|
170
|
+
}
|
|
171
|
+
.kd-signature-drawing-board-operation span:nth-of-type(2) {
|
|
172
|
+
-webkit-transform: scaleX(-1) !important;
|
|
173
|
+
transform: scaleX(-1) !important;
|
|
174
|
+
}
|
|
175
|
+
.kd-signature-drawing-board-operation.enabled {
|
|
176
|
+
color: #666666;
|
|
177
|
+
}
|
|
178
|
+
.kd-signature-drawing-board-tip {
|
|
179
|
+
position: absolute;
|
|
180
|
+
top: 50%;
|
|
181
|
+
left: 50%;
|
|
182
|
+
-webkit-transform: translate(-50%, -50%);
|
|
183
|
+
transform: translate(-50%, -50%);
|
|
184
|
+
color: var(--kd-c-signature-board-tip-color, #b2b2b2);
|
|
185
|
+
font-size: 12px;
|
|
186
|
+
-webkit-user-select: none;
|
|
187
|
+
-moz-user-select: none;
|
|
188
|
+
-ms-user-select: none;
|
|
189
|
+
user-select: none;
|
|
190
|
+
}
|
|
191
|
+
.kd-signature-modal .kd-modal-header {
|
|
192
|
+
position: relative;
|
|
193
|
+
}
|
|
194
|
+
.kd-signature-modal-footer .kd-btn:not(:last-child) {
|
|
195
|
+
margin-right: 12px;
|
|
196
|
+
}
|
|
197
|
+
.kd-signature-modal .kd-modal-expand-icon {
|
|
198
|
+
position: absolute;
|
|
199
|
+
right: 43.5px;
|
|
200
|
+
font-size: 14px;
|
|
201
|
+
cursor: pointer;
|
|
202
|
+
}
|
|
203
|
+
.kd-signature-modal.kd-signature-modal-fullscreen .kd-modal-container-box {
|
|
204
|
+
width: 90vw !important;
|
|
205
|
+
height: 90vh !important;
|
|
206
|
+
top: 5vh;
|
|
207
|
+
left: 5vw;
|
|
208
|
+
-webkit-transform: none !important;
|
|
209
|
+
transform: none !important;
|
|
210
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
@import '../../style/themes/index';
|
|
2
|
+
@import './mixin.less';
|
|
3
|
+
@signature-prefix-cls: ~'@{kd-prefix}-signature';
|
|
4
|
+
@signature-board-prefix-cls: ~'@{kd-prefix}-signature-drawing-board';
|
|
5
|
+
|
|
6
|
+
.@{signature-prefix-cls} {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
border: 1px dashed #e5e5e5;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
align-items: center;
|
|
15
|
+
background: @signature-bg-color;
|
|
16
|
+
color: @signature-color-text;
|
|
17
|
+
font-size: @signature-font-size;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
border-radius: @signature-border-radius;
|
|
20
|
+
transition: border-color @signature-transition-duration, background-color @signature-transition-duration;
|
|
21
|
+
&:hover {
|
|
22
|
+
border-color: @signature-border-color-hover;
|
|
23
|
+
background-color: @signature-bg-color-hover;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
.@{signature-prefix-cls}.@{signature-prefix-cls}-disabled {
|
|
27
|
+
cursor: not-allowed;
|
|
28
|
+
border: 1px solid @color-border-disabled;
|
|
29
|
+
background: @signature-bg-color;
|
|
30
|
+
color: @signature-color-text;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.@{signature-board-prefix-cls} {
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
border: 1px solid #e5e5e5;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
background: @signature-drawing-board-bg-color;
|
|
39
|
+
position: relative;
|
|
40
|
+
&-operation {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
position: absolute;
|
|
44
|
+
top: 9px;
|
|
45
|
+
right: 9px;
|
|
46
|
+
color: #b2b2b2;
|
|
47
|
+
z-index: 9999;
|
|
48
|
+
& > * {
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
& > *:not(:last-child) {
|
|
52
|
+
margin-right: 13px;
|
|
53
|
+
}
|
|
54
|
+
span:nth-of-type(2) {
|
|
55
|
+
transform: scaleX(-1) !important;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
&-operation.enabled {
|
|
59
|
+
color: #666666;
|
|
60
|
+
}
|
|
61
|
+
&-tip {
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: 50%;
|
|
64
|
+
left: 50%;
|
|
65
|
+
transform: translate(-50%, -50%);
|
|
66
|
+
color: @signature-board-tip-color;
|
|
67
|
+
font-size: 12px;
|
|
68
|
+
user-select: none;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
.@{signature-prefix-cls}-modal {
|
|
72
|
+
.kd-modal-header {
|
|
73
|
+
position: relative;
|
|
74
|
+
}
|
|
75
|
+
&-footer {
|
|
76
|
+
.kd-btn:not(:last-child) {
|
|
77
|
+
margin-right: 12px;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
.kd-modal-expand-icon {
|
|
81
|
+
position: absolute;
|
|
82
|
+
right: 43.5px;
|
|
83
|
+
font-size: 14px;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
.@{signature-prefix-cls}-modal.@{signature-prefix-cls}-modal-fullscreen {
|
|
88
|
+
.kd-modal-container-box {
|
|
89
|
+
width: 90vw !important;
|
|
90
|
+
height: 90vh !important;
|
|
91
|
+
top: 5vh;
|
|
92
|
+
left: 5vw;
|
|
93
|
+
transform: none !important;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@import '../../style/themes/token.less';
|
|
2
|
+
|
|
3
|
+
@signature-custom-prefix: ~'--@{kd-prefix}-c-signature';
|
|
4
|
+
|
|
5
|
+
// color
|
|
6
|
+
@signature-color-text: var(~'@{signature-custom-prefix}-color-text', #999999);
|
|
7
|
+
@signature-bg-color: var(~'@{signature-custom-prefix}-bg-color', #fafafa);
|
|
8
|
+
@signature-border-color: var(~'@{signature-custom-prefix}-border-color-hover', @color-theme-hover);
|
|
9
|
+
@signature-border-color-hover: var(~'@{signature-custom-prefix}-border-color-hover', @color-theme-hover);
|
|
10
|
+
@signature-border-color-disabled: var(~'@{signature-custom-prefix}-border-color-disabled', @color-border-disabled);
|
|
11
|
+
@signature-bg-color-hover: var(~'@{signature-custom-prefix}-bg-color-hover', @color-theme-1);
|
|
12
|
+
@signature-drawing-board-bg-color:var(~'@{signature-custom-prefix}-drawing-board-bg-color', #fafafa);
|
|
13
|
+
@signature-board-tip-color: var(~'@{signature-custom-prefix}-board-tip-color', #b2b2b2);
|
|
14
|
+
// font
|
|
15
|
+
@signature-font-size: var(~'@{signature-custom-prefix}-font-size', 12px);
|
|
16
|
+
|
|
17
|
+
// motion
|
|
18
|
+
@signature-transition-duration: var(~'@{signature-custom-prefix}-motion-duration', @duration-promptly);
|
|
19
|
+
|
|
20
|
+
// radius
|
|
21
|
+
@signature-border-radius: var(~'@{signature-custom-prefix}-border-radius', @radius-border);
|
|
22
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export { SignaturePad as default };
|
|
2
|
+
declare class SignaturePad extends SignatureEventTarget {
|
|
3
|
+
constructor(canvas: any, options?: {});
|
|
4
|
+
canvas: any;
|
|
5
|
+
_drawingStroke: boolean;
|
|
6
|
+
_isEmpty: boolean;
|
|
7
|
+
_lastPoints: any[];
|
|
8
|
+
_data: any[];
|
|
9
|
+
_lastVelocity: any;
|
|
10
|
+
_lastWidth: number;
|
|
11
|
+
_handleMouseDown: (event: any) => void;
|
|
12
|
+
_handleMouseMove: (event: any) => void;
|
|
13
|
+
_handleMouseUp: (event: any) => void;
|
|
14
|
+
_handleTouchStart: (event: any) => void;
|
|
15
|
+
_handleTouchMove: (event: any) => void;
|
|
16
|
+
_handleTouchEnd: (event: any) => void;
|
|
17
|
+
_handlePointerStart: (event: any) => void;
|
|
18
|
+
_handlePointerMove: (event: any) => void;
|
|
19
|
+
_handlePointerEnd: (event: any) => void;
|
|
20
|
+
velocityFilterWeight: any;
|
|
21
|
+
minWidth: any;
|
|
22
|
+
maxWidth: any;
|
|
23
|
+
throttle: any;
|
|
24
|
+
minDistance: any;
|
|
25
|
+
dotSize: any;
|
|
26
|
+
penColor: any;
|
|
27
|
+
backgroundColor: any;
|
|
28
|
+
compositeOperation: any;
|
|
29
|
+
_strokeMoveUpdate: (...args: any[]) => any;
|
|
30
|
+
_ctx: any;
|
|
31
|
+
clear(): void;
|
|
32
|
+
fromDataURL(dataUrl: any, options?: {}): Promise<any>;
|
|
33
|
+
toDataURL(type?: string, encoderOptions?: {}): any;
|
|
34
|
+
on(): void;
|
|
35
|
+
off(): void;
|
|
36
|
+
isEmpty(): boolean;
|
|
37
|
+
fromData(pointGroups: any, { clear }?: {
|
|
38
|
+
clear?: boolean | undefined;
|
|
39
|
+
}): void;
|
|
40
|
+
toData(): any[];
|
|
41
|
+
_getPointGroupOptions(group: any): {
|
|
42
|
+
penColor: any;
|
|
43
|
+
dotSize: any;
|
|
44
|
+
minWidth: any;
|
|
45
|
+
maxWidth: any;
|
|
46
|
+
velocityFilterWeight: any;
|
|
47
|
+
compositeOperation: any;
|
|
48
|
+
};
|
|
49
|
+
_strokeBegin(event: any): void;
|
|
50
|
+
_strokeUpdate(event: any): void;
|
|
51
|
+
_strokeEnd(event: any): void;
|
|
52
|
+
_handlePointerEvents(): void;
|
|
53
|
+
_handleMouseEvents(): void;
|
|
54
|
+
_handleTouchEvents(): void;
|
|
55
|
+
_reset(options: any): void;
|
|
56
|
+
_createPoint(x: any, y: any, pressure: any): Point;
|
|
57
|
+
_addPoint(point: any, options: any): Bezier | null;
|
|
58
|
+
_calculateCurveWidths(startPoint: any, endPoint: any, options: any): {
|
|
59
|
+
end: number;
|
|
60
|
+
start: number;
|
|
61
|
+
};
|
|
62
|
+
_strokeWidth(velocity: any, options: any): number;
|
|
63
|
+
_drawCurveSegment(x: any, y: any, width: any): void;
|
|
64
|
+
_drawCurve(curve: any, options: any): void;
|
|
65
|
+
_drawDot(point: any, options: any): void;
|
|
66
|
+
_fromData(pointGroups: any, drawCurve: any, drawDot: any): void;
|
|
67
|
+
toSVG({ includeBackgroundColor }?: {
|
|
68
|
+
includeBackgroundColor?: boolean | undefined;
|
|
69
|
+
}): string;
|
|
70
|
+
}
|
|
71
|
+
declare class SignatureEventTarget {
|
|
72
|
+
_et: EventTarget;
|
|
73
|
+
addEventListener(type: any, listener: any, options?: {}): void;
|
|
74
|
+
dispatchEvent(event: any): boolean;
|
|
75
|
+
removeEventListener(type: any, callback: any, options?: {}): void;
|
|
76
|
+
}
|
|
77
|
+
/*!
|
|
78
|
+
* Signature Pad v4.1.7 | https://github.com/szimek/signature_pad
|
|
79
|
+
* (c) 2023 Szymon Nowak | Released under the MIT license
|
|
80
|
+
*/
|
|
81
|
+
declare class Point {
|
|
82
|
+
constructor(x: any, y: any, pressure: any, time: any);
|
|
83
|
+
x: number;
|
|
84
|
+
y: number;
|
|
85
|
+
pressure: any;
|
|
86
|
+
time: any;
|
|
87
|
+
distanceTo(start: any): number;
|
|
88
|
+
equals(other: any): boolean;
|
|
89
|
+
velocityFrom(start: any): number;
|
|
90
|
+
}
|
|
91
|
+
declare class Bezier {
|
|
92
|
+
static fromPoints(points: any, widths: any): Bezier;
|
|
93
|
+
static calculateControlPoints(s1: any, s2: any, s3: any): {
|
|
94
|
+
c1: Point;
|
|
95
|
+
c2: Point;
|
|
96
|
+
};
|
|
97
|
+
constructor(startPoint: any, control2: any, control1: any, endPoint: any, startWidth: any, endWidth: any);
|
|
98
|
+
startPoint: any;
|
|
99
|
+
control2: any;
|
|
100
|
+
control1: any;
|
|
101
|
+
endPoint: any;
|
|
102
|
+
startWidth: any;
|
|
103
|
+
endWidth: any;
|
|
104
|
+
length(): number;
|
|
105
|
+
point(t: any, start: any, c1: any, c2: any, end: any): number;
|
|
106
|
+
}
|