bkui-vue 0.0.1-beta.471 → 0.0.1-beta.473
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/index.cjs.js +59 -59
- package/dist/index.esm.js +11712 -11527
- package/dist/index.umd.js +61 -61
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/alert/alert.d.ts +5 -3
- package/lib/alert/index.d.ts +14 -10
- package/lib/alert/index.js +1 -1
- package/lib/button/button-group.d.ts +2 -2
- package/lib/button/index.d.ts +2 -2
- package/lib/button/index.js +1 -1
- package/lib/card/card.d.ts +1 -0
- package/lib/card/index.d.ts +3 -0
- package/lib/card/index.js +1 -1
- package/lib/cascader/index.js +1 -1
- package/lib/checkbox/checkbox.d.ts +15 -11
- package/lib/checkbox/index.d.ts +32 -23
- package/lib/checkbox/index.js +1 -1
- package/lib/code-diff/index.js +1 -1
- package/lib/collapse/collapse-panel.d.ts +1 -0
- package/lib/collapse/index.d.ts +1 -0
- package/lib/collapse/index.js +1 -1
- package/lib/color-picker/color-picker.less +50 -50
- package/lib/color-picker/index.js +1 -1
- package/lib/config-provider/index.d.ts +1 -1
- package/lib/container/container.less +4 -4
- package/lib/container/index.js +1 -1
- package/lib/dropdown/dropdown.d.ts +1 -0
- package/lib/dropdown/dropdown.less +6 -9
- package/lib/dropdown/index.d.ts +3 -0
- package/lib/dropdown/index.js +1 -1
- package/lib/exception/exception.less +15 -15
- package/lib/exception/index.js +1 -1
- package/lib/form/compose-form-item.d.ts +3 -1
- package/lib/form/form-item.d.ts +1 -0
- package/lib/form/form.css +13 -1
- package/lib/form/form.d.ts +1 -0
- package/lib/form/form.less +15 -1
- package/lib/form/form.variable.css +13 -1
- package/lib/form/index.d.ts +7 -1
- package/lib/form/index.js +1 -1
- package/lib/input/index.d.ts +7 -7
- package/lib/input/input.d.ts +4 -4
- package/lib/menu/index.js +1 -1
- package/lib/navigation/index.d.ts +3 -0
- package/lib/navigation/index.js +1 -1
- package/lib/navigation/navigation.d.ts +1 -0
- package/lib/notify/index.js +1 -1
- package/lib/notify/notify.less +8 -8
- package/lib/notify/notifyConstructor.d.ts +1 -0
- package/lib/pagination/index.d.ts +10 -7
- package/lib/pagination/index.js +1 -1
- package/lib/pagination/pagination.d.ts +5 -4
- package/lib/process/index.d.ts +3 -0
- package/lib/process/index.js +1 -1
- package/lib/process/process.d.ts +1 -0
- package/lib/process/process.less +7 -7
- package/lib/progress/index.d.ts +13 -7
- package/lib/progress/index.js +1 -1
- package/lib/progress/progress.d.ts +5 -3
- package/lib/progress/progress.less +8 -8
- package/lib/radio/index.d.ts +38 -20
- package/lib/radio/index.js +1 -1
- package/lib/radio/radio-button.d.ts +10 -6
- package/lib/radio/radio-group.d.ts +9 -4
- package/lib/radio/radio.d.ts +7 -3
- package/lib/rate/index.d.ts +4 -4
- package/lib/rate/rate.d.ts +2 -2
- package/lib/resize-layout/index.d.ts +3 -0
- package/lib/resize-layout/index.js +1 -1
- package/lib/resize-layout/resize-layout.d.ts +1 -0
- package/lib/resize-layout/resize-layout.less +23 -23
- package/lib/select/index.d.ts +15 -18
- package/lib/select/index.js +1 -1
- package/lib/select/option.d.ts +6 -9
- package/lib/select/select.d.ts +5 -5
- package/lib/select/type.d.ts +1 -1
- package/lib/shared/vue-types.d.ts +1 -1
- package/lib/sideslider/index.js +1 -1
- package/lib/sideslider/sideslider.less +9 -9
- package/lib/steps/index.d.ts +7 -4
- package/lib/steps/index.js +1 -1
- package/lib/steps/steps.d.ts +4 -3
- package/lib/steps/steps.less +62 -62
- package/lib/swiper/index.js +1 -1
- package/lib/swiper/swiper.less +15 -13
- package/lib/swiper/swiper.variable.css +122 -0
- package/lib/switcher/index.d.ts +4 -4
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.d.ts +2 -2
- package/lib/switcher/switcher.less +29 -29
- package/lib/table/index.d.ts +1 -1
- package/lib/table-column/index.d.ts +1 -1
- package/lib/tag/index.d.ts +3 -0
- package/lib/tag/index.js +1 -1
- package/lib/tag/tag.css +2 -2
- package/lib/tag/tag.d.ts +1 -0
- package/lib/tag/tag.less +14 -13
- package/lib/tag/tag.variable.css +2 -2
- package/lib/tag-input/index.d.ts +9 -9
- package/lib/tag-input/index.js +1 -1
- package/lib/tag-input/tag-input.d.ts +3 -3
- package/lib/timeline/index.d.ts +3 -0
- package/lib/timeline/index.js +1 -1
- package/lib/timeline/timeline.d.ts +1 -0
- package/lib/timeline/timeline.less +35 -35
- package/lib/transfer/index.d.ts +3 -0
- package/lib/transfer/index.js +1 -1
- package/lib/transfer/transfer.d.ts +1 -0
- package/lib/transfer/transfer.less +2 -2
- package/lib/tree/index.js +1 -1
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
@import '../styles/themes/themes.less';
|
2
2
|
|
3
|
-
|
3
|
+
.@{bk-prefix}-color-picker {
|
4
4
|
position: relative;
|
5
5
|
display: inline-flex;
|
6
6
|
height: 32px;
|
@@ -12,42 +12,42 @@
|
|
12
12
|
transition: border .2s, box-shadow .2s;
|
13
13
|
align-content: center;
|
14
14
|
|
15
|
-
|
15
|
+
&.@{bk-prefix}-color-picker-show-value {
|
16
16
|
width: 150px;
|
17
17
|
}
|
18
18
|
|
19
|
-
|
19
|
+
&.@{bk-prefix}-color-picker-large {
|
20
20
|
height: 36px;
|
21
21
|
|
22
|
-
|
22
|
+
&.@{bk-prefix}-color-picker-show-value {
|
23
23
|
width: 170px;
|
24
24
|
|
25
|
-
|
25
|
+
.@{bk-prefix}-color-picker-text {
|
26
26
|
width: calc(100% - 62px);
|
27
27
|
font-size: 16px;
|
28
28
|
}
|
29
29
|
}
|
30
30
|
|
31
|
-
|
31
|
+
.@{bk-prefix}-color-picker-color .@{bk-prefix}-color-picker-color-square {
|
32
32
|
width: 22px;
|
33
33
|
height: 22px;
|
34
34
|
font-size: 22px;
|
35
35
|
}
|
36
36
|
}
|
37
37
|
|
38
|
-
|
38
|
+
&.@{bk-prefix}-color-picker-small {
|
39
39
|
height: 28px;
|
40
40
|
|
41
|
-
|
41
|
+
&.@{bk-prefix}-color-picker-show-value {
|
42
42
|
width: 132px;
|
43
43
|
|
44
|
-
|
44
|
+
.@{bk-prefix}-color-picker-text {
|
45
45
|
width: calc(100% - 56px);
|
46
46
|
font-size: 12px;
|
47
47
|
}
|
48
48
|
}
|
49
49
|
|
50
|
-
|
50
|
+
.@{bk-prefix}-color-picker-color .@{bk-prefix}-color-picker-color-square {
|
51
51
|
width: 16px;
|
52
52
|
height: 16px;
|
53
53
|
font-size: 16px;
|
@@ -60,7 +60,7 @@
|
|
60
60
|
transition: border .2s;
|
61
61
|
}
|
62
62
|
|
63
|
-
|
63
|
+
&.@{bk-prefix}-color-picker-show-dropdown {
|
64
64
|
border-color: #3a84ff;
|
65
65
|
box-shadow: 0 0 0 2px rgba(45, 140, 240, .2);
|
66
66
|
transition: border .2s, box-shadow .2s;
|
@@ -71,26 +71,26 @@
|
|
71
71
|
}
|
72
72
|
}
|
73
73
|
|
74
|
-
|
74
|
+
&.@{bk-prefix}-color-picker-disabled {
|
75
75
|
cursor: not-allowed;
|
76
76
|
background-color: #e1ecff;
|
77
77
|
border-color: #699df4;
|
78
78
|
|
79
|
-
|
79
|
+
.@{bk-prefix}-color-picker-text {
|
80
80
|
color: #3a84ff;
|
81
81
|
}
|
82
82
|
|
83
|
-
|
83
|
+
.@{bk-prefix}-color-picker-icon .icon-angle-down {
|
84
84
|
color: #3a84ff;
|
85
85
|
}
|
86
86
|
}
|
87
87
|
|
88
|
-
|
88
|
+
.@{bk-prefix}-color-picker-color {
|
89
89
|
display: flex;
|
90
90
|
margin-left: 6px;
|
91
91
|
align-items: center;
|
92
92
|
|
93
|
-
|
93
|
+
.@{bk-prefix}-color-picker-color-square {
|
94
94
|
width: 18px;
|
95
95
|
height: 18px;
|
96
96
|
font-size: 18px;
|
@@ -99,7 +99,7 @@
|
|
99
99
|
}
|
100
100
|
}
|
101
101
|
|
102
|
-
|
102
|
+
.@{bk-prefix}-color-picker-text {
|
103
103
|
display: flex;
|
104
104
|
width: calc(100% - 58px);
|
105
105
|
margin-left: 6px;
|
@@ -115,7 +115,7 @@
|
|
115
115
|
}
|
116
116
|
}
|
117
117
|
|
118
|
-
|
118
|
+
.@{bk-prefix}-color-picker-icon {
|
119
119
|
display: flex;
|
120
120
|
justify-content: center;
|
121
121
|
align-items: center;
|
@@ -137,25 +137,25 @@
|
|
137
137
|
}
|
138
138
|
|
139
139
|
/*下拉面板*/
|
140
|
-
|
140
|
+
.@{bk-prefix}-color-picker-dropdown {
|
141
141
|
width: 272px;
|
142
142
|
}
|
143
143
|
|
144
|
-
|
144
|
+
.@{bk-prefix}-color-picker-saturation {
|
145
145
|
position: relative;
|
146
146
|
height: 180px;
|
147
147
|
margin: 0 6px 6px;
|
148
148
|
|
149
|
-
|
149
|
+
.@{bk-prefix}-color-picker-saturation-white {
|
150
150
|
background: linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0));
|
151
151
|
}
|
152
152
|
|
153
|
-
|
153
|
+
.@{bk-prefix}-color-picker-saturation-black {
|
154
154
|
background: linear-gradient(0deg, #000, transparent);
|
155
155
|
}
|
156
156
|
|
157
|
-
|
158
|
-
|
157
|
+
.@{bk-prefix}-color-picker-saturation-white,
|
158
|
+
.@{bk-prefix}-color-picker-saturation-black {
|
159
159
|
position: absolute;
|
160
160
|
top: 0;
|
161
161
|
left: 0;
|
@@ -165,18 +165,18 @@
|
|
165
165
|
}
|
166
166
|
}
|
167
167
|
|
168
|
-
|
168
|
+
.@{bk-prefix}-color-picker-hue {
|
169
169
|
position: relative;
|
170
170
|
height: 10px;
|
171
171
|
margin: 0 6px 6px;
|
172
172
|
cursor: pointer;
|
173
173
|
background: linear-gradient(90deg, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red);
|
174
174
|
|
175
|
-
|
175
|
+
.@{bk-prefix}-color-picker-hue-pointer {
|
176
176
|
position: absolute;
|
177
177
|
top: 0;
|
178
178
|
|
179
|
-
|
179
|
+
.@{bk-prefix}-color-picker-hue-rectangle {
|
180
180
|
width: 4px;
|
181
181
|
height: 8px;
|
182
182
|
margin-top: 1px;
|
@@ -189,28 +189,28 @@
|
|
189
189
|
}
|
190
190
|
}
|
191
191
|
|
192
|
-
|
192
|
+
.@{bk-prefix}-color-picker-input {
|
193
193
|
display: flex;
|
194
194
|
margin: 0 6px 1px;
|
195
195
|
font-size: 12px;
|
196
196
|
color: #63656e;
|
197
197
|
justify-content: space-between;
|
198
198
|
|
199
|
-
|
199
|
+
.@{bk-prefix}-color-picker-input-hex .@{bk-prefix}-color-picker-input-part .@{bk-prefix}-color-picker-input-value {
|
200
200
|
width: 70px;
|
201
201
|
}
|
202
202
|
|
203
|
-
|
203
|
+
.@{bk-prefix}-color-picker-input-rgba {
|
204
204
|
display: flex;
|
205
205
|
width: 160px;
|
206
206
|
justify-content: space-between;
|
207
207
|
}
|
208
208
|
|
209
|
-
|
209
|
+
.@{bk-prefix}-color-picker-input-part {
|
210
210
|
display: flex;
|
211
211
|
flex-flow: column;
|
212
212
|
|
213
|
-
|
213
|
+
.@{bk-prefix}-color-picker-input-value {
|
214
214
|
width: 32px;
|
215
215
|
height: 22px;
|
216
216
|
padding: 0 4px;
|
@@ -229,14 +229,14 @@
|
|
229
229
|
border-color: #3a84ff;
|
230
230
|
}
|
231
231
|
|
232
|
-
&::-
|
233
|
-
&::-
|
232
|
+
&::-we@{bk-prefix}it-outer-spin-button,
|
233
|
+
&::-we@{bk-prefix}it-inner-spin-button {
|
234
234
|
margin: 0;
|
235
235
|
appearance: none;
|
236
236
|
}
|
237
237
|
}
|
238
238
|
|
239
|
-
|
239
|
+
.@{bk-prefix}-color-picker-input-text {
|
240
240
|
height: 18px;
|
241
241
|
line-height: 18px;
|
242
242
|
text-align: center;
|
@@ -244,15 +244,15 @@
|
|
244
244
|
}
|
245
245
|
}
|
246
246
|
|
247
|
-
|
247
|
+
.@{bk-prefix}-color-picker-recommend-container {
|
248
248
|
padding: 6px;
|
249
249
|
border-top: 1px solid #f0f1f5;
|
250
250
|
|
251
|
-
|
251
|
+
.@{bk-prefix}-color-picker-recommend {
|
252
252
|
display: flex;
|
253
253
|
flex-wrap: wrap;
|
254
254
|
|
255
|
-
|
255
|
+
.@{bk-prefix}-color-picker-recommend-color {
|
256
256
|
width: 20px;
|
257
257
|
height: 20px;
|
258
258
|
margin: 3px;
|
@@ -260,16 +260,16 @@
|
|
260
260
|
border-radius: 3px;
|
261
261
|
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
|
262
262
|
|
263
|
-
|
263
|
+
&.@{bk-prefix}-color-picker-recommend-selected-color {
|
264
264
|
box-shadow: 0 0 3px 2px #3a84ff;;
|
265
265
|
}
|
266
266
|
}
|
267
267
|
}
|
268
268
|
}
|
269
269
|
|
270
|
-
|
271
|
-
|
272
|
-
|
270
|
+
.@{bk-prefix}-color-picker-saturation,
|
271
|
+
.@{bk-prefix}-color-picker-hue,
|
272
|
+
.@{bk-prefix}-color-picker-recommend {
|
273
273
|
outline: none;
|
274
274
|
transition: box-shadow .2s;
|
275
275
|
|
@@ -280,7 +280,7 @@
|
|
280
280
|
}
|
281
281
|
|
282
282
|
/*饱和度和预设值共用样式*/
|
283
|
-
|
283
|
+
.@{bk-prefix}-color-picker-pointer {
|
284
284
|
position: absolute;
|
285
285
|
top: 50%;
|
286
286
|
left: 50%;
|
@@ -288,7 +288,7 @@
|
|
288
288
|
height: 4px;
|
289
289
|
cursor: pointer;
|
290
290
|
|
291
|
-
|
291
|
+
.@{bk-prefix}-color-picker-circle {
|
292
292
|
position: absolute;
|
293
293
|
top: 0;
|
294
294
|
left: 0;
|
@@ -301,7 +301,7 @@
|
|
301
301
|
}
|
302
302
|
}
|
303
303
|
|
304
|
-
|
304
|
+
.@{bk-prefix}-color-picker-empty {
|
305
305
|
position: relative;
|
306
306
|
|
307
307
|
&::after {
|
@@ -317,9 +317,9 @@
|
|
317
317
|
}
|
318
318
|
}
|
319
319
|
|
320
|
-
|
321
|
-
padding: 0px;
|
322
|
-
cursor: default;
|
323
|
-
transform-origin: center top;
|
324
|
-
will-change: top, left;
|
320
|
+
.@{bk-prefix}-color-dropdown-container {
|
321
|
+
padding: 0px;
|
322
|
+
cursor: default;
|
323
|
+
transform-origin: center top;
|
324
|
+
will-change: top, left;
|
325
325
|
}
|
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("vue-types"),require("../directives"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types","../directives","../icon"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("vue-types"),require("../directives"),require("../icon")):t(e["../shared"],e.vue,e["vue-types"],e["../directives"],e["../icon"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,((e,t,r,n,o)=>(()=>{"use strict";var a={4061:e=>{e.exports=n},6870:e=>{e.exports=o},4212:t=>{t.exports=e},748:e=>{e.exports=t},210:e=>{e.exports=r}},i={};function u(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return a[e](r,r.exports,u),r.exports}u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{u.r(c),u.d(c,{default:()=>se});var e=u(4212);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===t(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var n=u(748);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var a=/^\s+/,i=/\s+$/;function l(e,t){if(t=t||{},(e=e||"")instanceof l)return e;if(!(this instanceof l))return new l(e,t);var r=function(e){var t,r,n,u={r:0,g:0,b:0},c=1,l=null,s=null,f=null,d=!1,h=!1;return"string"==typeof e&&(e=function(e){e=e.replace(a,"").replace(i,"").toLowerCase();var t,r=!1;if(S[e])e=S[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=L.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=L.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=L.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=L.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=L.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=L.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=L.hex8.exec(e))?{r:C(t[1]),g:C(t[2]),b:C(t[3]),a:F(t[4]),format:r?"name":"hex8"}:(t=L.hex6.exec(e))?{r:C(t[1]),g:C(t[2]),b:C(t[3]),format:r?"name":"hex"}:(t=L.hex4.exec(e))?{r:C(t[1]+""+t[1]),g:C(t[2]+""+t[2]),b:C(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:r?"name":"hex8"}:!!(t=L.hex3.exec(e))&&{r:C(t[1]+""+t[1]),g:C(t[2]+""+t[2]),b:C(t[3]+""+t[3]),format:r?"name":"hex"}}(e)),"object"==o(e)&&(E(e.r)&&E(e.g)&&E(e.b)?(t=e.r,r=e.g,n=e.b,u={r:255*V(t,255),g:255*V(r,255),b:255*V(n,255)},d=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):E(e.h)&&E(e.s)&&E(e.v)?(l=P(e.s),s=P(e.v),u=function(e,t,r){e=6*V(e,360),t=V(t,100),r=V(r,100);var n=Math.floor(e),o=e-n,a=r*(1-t),i=r*(1-o*t),u=r*(1-(1-o)*t),c=n%6;return{r:255*[r,i,a,a,u,r][c],g:255*[u,r,r,i,a,a][c],b:255*[a,a,u,r,r,i][c]}}(e.h,l,s),d=!0,h="hsv"):E(e.h)&&E(e.s)&&E(e.l)&&(l=P(e.s),f=P(e.l),u=function(e,t,r){var n,o,a;function i(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=V(e,360),t=V(t,100),r=V(r,100),0===t)n=o=a=r;else{var u=r<.5?r*(1+t):r+t-r*t,c=2*r-u;n=i(c,u,e+1/3),o=i(c,u,e),a=i(c,u,e-1/3)}return{r:255*n,g:255*o,b:255*a}}(e.h,l,f),d=!0,h="hsl"),e.hasOwnProperty("a")&&(c=e.a)),c=j(c),{ok:d,format:e.format||h,r:Math.min(255,Math.max(u.r,0)),g:Math.min(255,Math.max(u.g,0)),b:Math.min(255,Math.max(u.b,0)),a:c}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}function s(e,t,r){e=V(e,255),t=V(t,255),r=V(r,255);var n,o,a=Math.max(e,t,r),i=Math.min(e,t,r),u=(a+i)/2;if(a==i)n=o=0;else{var c=a-i;switch(o=u>.5?c/(2-a-i):c/(a+i),a){case e:n=(t-r)/c+(t<r?6:0);break;case t:n=(r-e)/c+2;break;case r:n=(e-t)/c+4}n/=6}return{h:n,s:o,l:u}}function f(e,t,r){e=V(e,255),t=V(t,255),r=V(r,255);var n,o,a=Math.max(e,t,r),i=Math.min(e,t,r),u=a,c=a-i;if(o=0===a?0:c/a,a==i)n=0;else{switch(a){case e:n=(t-r)/c+(t<r?6:0);break;case t:n=(r-e)/c+2;break;case r:n=(e-t)/c+4}n/=6}return{h:n,s:o,v:u}}function d(e,t,r,n){var o=[R(Math.round(e).toString(16)),R(Math.round(t).toString(16)),R(Math.round(r).toString(16))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function h(e,t,r,n){return[R(T(n)),R(Math.round(e).toString(16)),R(Math.round(t).toString(16)),R(Math.round(r).toString(16))].join("")}function p(e,t){t=0===t?0:t||10;var r=l(e).toHsl();return r.s-=t/100,r.s=O(r.s),l(r)}function v(e,t){t=0===t?0:t||10;var r=l(e).toHsl();return r.s+=t/100,r.s=O(r.s),l(r)}function b(e){return l(e).desaturate(100)}function g(e,t){t=0===t?0:t||10;var r=l(e).toHsl();return r.l+=t/100,r.l=O(r.l),l(r)}function m(e,t){t=0===t?0:t||10;var r=l(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-t/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-t/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-t/100*255))),l(r)}function y(e,t){t=0===t?0:t||10;var r=l(e).toHsl();return r.l-=t/100,r.l=O(r.l),l(r)}function k(e,t){var r=l(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,l(r)}function w(e){var t=l(e).toHsl();return t.h=(t.h+180)%360,l(t)}function _(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=l(e).toHsl(),n=[l(e)],o=360/t,a=1;a<t;a++)n.push(l({h:(r.h+a*o)%360,s:r.s,l:r.l}));return n}function x(e){var t=l(e).toHsl(),r=t.h;return[l(e),l({h:(r+72)%360,s:t.s,l:t.l}),l({h:(r+216)%360,s:t.s,l:t.l})]}function M(e,t,r){t=t||6,r=r||30;var n=l(e).toHsl(),o=360/r,a=[l(e)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,a.push(l(n));return a}function A(e,t){t=t||6;for(var r=l(e).toHsv(),n=r.h,o=r.s,a=r.v,i=[],u=1/t;t--;)i.push(l({h:n,s:o,v:a})),a=(a+u)%1;return i}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=j(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=f(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=s(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=s(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return d(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,o){var a=[R(Math.round(e).toString(16)),R(Math.round(t).toString(16)),R(Math.round(r).toString(16)),R(T(n))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*V(this._r,255))+"%",g:Math.round(100*V(this._g,255))+"%",b:Math.round(100*V(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*V(this._r,255))+"%, "+Math.round(100*V(this._g,255))+"%, "+Math.round(100*V(this._b,255))+"%)":"rgba("+Math.round(100*V(this._r,255))+"%, "+Math.round(100*V(this._g,255))+"%, "+Math.round(100*V(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(N[d(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+h(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var o=l(e);r="#"+h(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return l(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(k,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(x,arguments)},triad:function(){return this._applyCombination(_,[3])},tetrad:function(){return this._applyCombination(_,[4])}},l.fromRatio=function(e,t){if("object"==o(e)){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:P(e[n]));e=r}return l(e,t)},l.equals=function(e,t){return!(!e||!t)&&l(e).toRgbString()==l(t).toRgbString()},l.random=function(){return l.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},l.mix=function(e,t,r){r=0===r?0:r||50;var n=l(e).toRgb(),o=l(t).toRgb(),a=r/100;return l({r:(o.r-n.r)*a+n.r,g:(o.g-n.g)*a+n.g,b:(o.b-n.b)*a+n.b,a:(o.a-n.a)*a+n.a})},l.readability=function(e,t){var r=l(e),n=l(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},l.isReadable=function(e,t,r){var n,o,a,i,u,c=l.readability(e,t);switch(o=!1,(a=r,"AA"!==(i=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(u=(a.size||"small").toLowerCase())&&"large"!==u&&(u="small"),n={level:i,size:u}).level+n.size){case"AAsmall":case"AAAlarge":o=c>=4.5;break;case"AAlarge":o=c>=3;break;case"AAAsmall":o=c>=7}return o},l.mostReadable=function(e,t,r){var n,o,a,i,u=null,c=0;o=(r=r||{}).includeFallbackColors,a=r.level,i=r.size;for(var s=0;s<t.length;s++)(n=l.readability(e,t[s]))>c&&(c=n,u=l(t[s]));return l.isReadable(e,u,{level:a,size:i})||!o?u:(r.includeFallbackColors=!1,l.mostReadable(e,["#fff","#000"],r))};var S=l.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},N=l.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(S);function j(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function V(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function O(e){return Math.min(1,Math.max(0,e))}function C(e){return parseInt(e,16)}function R(e){return 1==e.length?"0"+e:""+e}function P(e){return e<=1&&(e=100*e+"%"),e}function T(e){return Math.round(255*parseFloat(e)).toString(16)}function F(e){return C(e)/255}var H,q,D,L=(q="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",D="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+q),rgba:new RegExp("rgba"+D),hsl:new RegExp("hsl"+q),hsla:new RegExp("hsla"+D),hsv:new RegExp("hsv"+q),hsva:new RegExp("hsva"+D),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function E(e){return!!L.CSS_UNIT.exec(e)}var I=u(210),B=u(4061),U=u(6870),z={placement:{type:String,default:"bottom-start",validator:function(e){return!(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0&&(console.error("placement property is not valid: '".concat(e,"'")),1))}},className:{type:String},extPopoverCls:{type:String},appendToBody:{type:Boolean},triggerRef:{type:Object},onClick:Function};const K=(0,n.defineComponent)({props:z,emits:["changeVisible"],setup:function(t,r){var o=r.emit,a=Object.create(null),i=(0,n.ref)(null);(0,n.onMounted)((function(){c()})),(0,n.onBeforeUnmount)((function(){u()}));var u=function(){if(a&&0!==Object.keys(a).length){var e=a;e.isShow&&e.hide(),e.destroy(),a=null,o("changeVisible",!1)}},c=function(){a&&0!==Object.keys(a).length?(0,n.nextTick)((function(){a.update()})):(0,n.nextTick)((function(){a=new e.BKPopover(t.triggerRef,i.value,{placement:t.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})}))},l=(0,n.computed)((function(){var r={};return t.appendToBody&&(r["z-index"]=1060+e.bkZIndexManager.getModalNextIndex()),r})),s=(0,n.reactive)({styles:l});return Object.assign(Object.assign({},(0,n.toRefs)(s)),{refContentRef:i,forceUpdate:function(){var e;a&&(null===(e=null==a?void 0:a.forceUpdate)||void 0===e||e.call(a))},updateDropdown:c,destoryDropdown:u})},render:function(){var t,r,o;return(0,n.createVNode)("div",{ref:"refContentRef",class:[(0,e.resolveClassName)("date-picker-dropdown"),this.className,this.extPopoverCls],style:this.styles,onClick:this.onClick},[null!==(o=null===(r=(t=this.$slots).default)||void 0===r?void 0:r.call(t))&&void 0!==o?o:""])}});var W={info:e.PropTypes.object.isRequired};const X=(0,n.defineComponent)({props:W,emits:["tab","input"],setup:function(t,r){var o=r.emit,a=function(e){"a"===t.info.key&&o("tab",e)},i=function(e){var r=t.info.key,n=e.target.value;o("input",r,n)},u=(0,n.computed)((function(){return(0,e.classes)({error:t.info.error},"bk-color-picker-input-value")}));return function(){return(0,n.createVNode)("div",{class:"bk-color-picker-input-part"},[(0,n.createVNode)("input",{type:"HEX"===t.info.name?"text":"number",class:u.value,value:t.info.value,onKeydown:a,onInput:i},null),(0,n.createVNode)("span",{class:"bk-color-picker-input-text"},[t.info.name])])}}});var $={colorObj:e.PropTypes.object.isRequired};const G=(0,n.defineComponent)({name:"ColorPicker",props:$,emits:["change","tab"],setup:function(e,t){var r=t.emit,o=(0,n.reactive)({key:"hex",name:"HEX",value:e.colorObj.hex,error:!1}),a=(0,n.reactive)({key:"r",name:"R",value:e.colorObj.rgba.r.toString(),error:!1}),i=(0,n.reactive)({key:"g",name:"G",value:e.colorObj.rgba.g.toString(),error:!1}),u=(0,n.reactive)({key:"b",name:"B",value:e.colorObj.rgba.b.toString(),error:!1}),c=(0,n.reactive)({key:"a",name:"Alpha",value:e.colorObj.rgba.a.toString(),error:!1});(0,n.watch)((function(){return e.colorObj}),(function(e){l(e.hex).toString()!==l(o.value).toString()&&(o.value=e.hex),a.value=e.rgba.r.toString(),i.value=e.rgba.g.toString(),u.value=e.rgba.b.toString(),c.value=e.rgba.a.toString(),d()}),{deep:!0});var s=function(e){r("tab",e)},f=function(e,t){if({r:a,g:i,b:u,a:c,hex:o}[e].value=t,d()){var n="hex"===e?o.value:"rgba(".concat(a.value,", ").concat(i.value,", ").concat(u.value,", ").concat(c.value,")");r("change",n)}},d=function(){var e=!0;!o.value.startsWith("#")||4!==o.value.length&&7!==o.value.length||o.value.slice(1).match(/[^0-9a-fA-F]/)?(o.error=!0,e=!1):o.error=!1,""!==c.value&&c.value>=0&&c.value<=1?c.error=!1:(c.error=!0,e=!1);for(var t=0,r=[a,i,u];t<r.length;t++){var n=r[t],l=n.value;""!==l&&l>=0&&l<=255?n.error=!1:(n.error=!0,e=!1)}return e};return function(){return(0,n.createVNode)("div",{class:"bk-color-picker-input"},[(0,n.createVNode)("div",{class:"bk-color-picker-input-hex"},[(0,n.createVNode)(X,{info:o,onInput:f},null)]),(0,n.createVNode)("div",{class:"bk-color-picker-input-rgba"},[(0,n.createVNode)(X,{info:a,onInput:f},null),(0,n.createVNode)(X,{info:i,onInput:f},null),(0,n.createVNode)(X,{info:u,onInput:f},null),(0,n.createVNode)(X,{info:c,onInput:f,onTab:s},null)])])}}});var Y=function(e){var t=e;""===e&&(t="#FFFFFF");var r=l(e),n=r.toHsl(),o=r.toHsv();return 0===n.s&&(n.h=t.h||0,o.h=t.h||0),o.v<.0164&&(o.h=t.h||0,o.s=t.s||0),n.l<.01&&(n.h=t.h||0,n.s=t.s||0),{hsl:n,hsv:o,hex:r.toHexString().toUpperCase(),rgba:r.toRgb()}},J=function(e,t,r){return e<t?t:e>r?r:e},Z=function(e,t){return e.touches?e.touches[0][t]:0},Q=function(e){var t=e.r,r=e.g,n=e.b,o=e.a;return"rgba(".concat([t,r,n,o].join(","),")")},ee={colorObj:e.PropTypes.object.isRequired};const te=(0,n.defineComponent)({name:"ColorPicker",props:ee,emits:["change"],setup:function(e,t){var r=t.emit,o=(0,n.ref)(null),a=(0,n.computed)((function(){return{left:"".concat(e.colorObj.hsv.h/360*100,"%")}})),i=function(t){var r=o.value.clientWidth,n=e.colorObj.hsv.h/360*r;switch(t.code){case"ArrowLeft":t.preventDefault(),n=J(n-2,0,r);break;case"ArrowRight":t.preventDefault(),n=J(n+2,0,r);break;case"ArrowUp":t.preventDefault(),n=J(n-10,0,r);break;case"ArrowDown":t.preventDefault(),n=J(n+10,0,r);break;default:return}c(null,n)},u=function e(){window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",e)},c=function(e,t){var r=o.value.clientWidth,n=void 0!==t?t:l(e);s(n/r)},l=function(e){var t=o.value.getBoundingClientRect().left+window.pageXOffset,r=e.pageX||Z(e,"PageX");return J(r-t,0,o.value.clientWidth)},s=function(t){var n=e.colorObj.hsl,o=n.h,a=n.s,i=n.l,u=n.a,c=360*t;o!==c&&r("change",{h:c,s:a,l:i,a:u})};return function(){return(0,n.createVNode)("div",{ref:o,tabindex:"0",class:"bk-color-picker-hue",onKeydown:i,onMousedown:function(e){e.stopPropagation(),e.preventDefault(),function(e){o.value.focus(),c(e),window.addEventListener("mousemove",c,{passive:!0}),window.addEventListener("mouseup",u)}(e)}},[(0,n.createVNode)("div",{class:"bk-color-picker-hue-pointer",style:a.value},[(0,n.createVNode)("div",{class:"bk-color-picker-hue-rectangle"},null)])])}}});var re={colorObj:e.PropTypes.object.isRequired,recommend:e.PropTypes.oneOfType([e.PropTypes.array.def((function(){return[]})),e.PropTypes.bool.def(!0)]).isRequired};const ne=(0,n.defineComponent)({props:re,emits:["change","tab"],setup:function(t,r){var o=r.emit,a=(0,n.ref)(!1),i=(0,n.ref)(-1),u=(0,n.ref)(null);(0,n.watch)((function(){return t.colorObj}),(function(){i.value=-1,u.value=null}),{deep:!0});var c=(0,n.computed)((function(){return h(t.recommend)})),s=function(t,r){return(0,e.classes)({"bk-color-picker-empty":""===t,"bk-color-picker-recommend-selected-color":a.value&&i.value===r},"bk-color-picker-recommend-color")},f=function(e){if("Tab"===e.code)o("tab",e);else{var t=0,r=c.value.length-1;switch(e.code){case"ArrowLeft":e.preventDefault(),t=J(i.value-1,0,r);break;case"ArrowRight":e.preventDefault(),t=J(i.value+1,0,r);break;case"ArrowUp":e.preventDefault(),t=J(i.value-10,0,r);break;case"ArrowDown":e.preventDefault(),t=J(i.value+10,0,r);break;default:return}d(t)}},d=function(e){var t=c.value[e];o("change",t),(0,n.nextTick)((function(){i.value=e,u.value=t}))},h=function(e){return!0===e?["","#ff4500","#ff8c00","#ffd700","#90ee90","#ddffff","#00ced1","#3a84ff","#a933f5","#db7093","#000000","#494949","#9B9B9B","#ffffff"]:Array.isArray(e)?e.map((function(e){return l(e).isValid()?e:""})):void 0};return function(){return(0,n.createVNode)("div",{tabindex:"0",class:"bk-color-picker-recommend",onFocus:function(){return a.value=!0},onBlur:function(){return a.value=!1},onKeydown:f},[c.value.map((function(e,t){return(0,n.createVNode)("div",{style:"background: ".concat(e||"#fff"),class:s(e,t),onClick:function(){return d(t)}},[i.value===t?(0,n.createVNode)("div",{class:"bk-color-picker-pointer"},[(0,n.createVNode)("div",{class:"bk-color-picker-circle"},null)]):void 0])}))])}}});var oe={colorObj:e.PropTypes.object.isRequired};const ae=(0,n.defineComponent)({props:oe,emits:["change"],setup:function(e,t){var r=t.emit,o=(0,n.ref)(null),a=(0,n.computed)((function(){return{background:"hsl(".concat(e.colorObj.hsv.h,", 100%, 50%)")}})),i=(0,n.computed)((function(){return{top:"".concat(100*(1-e.colorObj.hsv.v),"%"),left:"".concat(100*e.colorObj.hsv.s,"%")}})),u=function e(){window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",e)},c=function(t){var r=o.value,n=r.clientWidth,a=r.clientHeight,i=e.colorObj.hsv.s*n,u=(1-e.colorObj.hsv.v)*a;switch(t.code){case"ArrowLeft":t.preventDefault(),i=J(i-10,0,n);break;case"ArrowRight":t.preventDefault(),i=J(i+10,0,n);break;case"ArrowUp":t.preventDefault(),u=J(u-10,0,a);break;case"ArrowDown":t.preventDefault(),u=J(u+10,0,a);break;default:return}l(null,i,u)},l=function(t,r,n){var a=o.value,i=a.clientWidth,u=a.clientHeight,c=(void 0!==r?r:s(t))/i,l=1-(void 0!==n?n:f(t))/u;d(e.colorObj.hsv.h,c,l,e.colorObj.hsv.a)},s=function(e){var t=o.value.getBoundingClientRect().left+window.pageXOffset,r=e.pageX||Z(e,"PageX");return J(r-t,0,o.value.clientWidth)},f=function(e){var t=o.value.getBoundingClientRect().top+window.pageYOffset,r=e.pageY||Z(e,"PageY");return J(r-t,0,o.value.clientHeight)},d=function(e,t,n,o){r("change",{h:e,s:t,v:n,a:o})};return function(){return(0,n.createVNode)("div",{ref:o,tabindex:"0",class:"bk-color-picker-saturation",style:a.value,onKeydown:c,onMousedown:function(e){e.stopPropagation(),function(e){o.value.focus(),l(e),window.addEventListener("mousemove",l,{passive:!0}),window.addEventListener("mouseup",u)}(e)}},[(0,n.createVNode)("div",{class:"bk-color-picker-saturation-white"},null),(0,n.createVNode)("div",{class:"bk-color-picker-saturation-black"},null),(0,n.createVNode)("div",{class:"bk-color-picker-pointer",style:i.value},[(0,n.createVNode)("div",{class:"bk-color-picker-circle"},null)])])}}});var ie;!function(e){e.UNKNOWN="",e.SMALL="small",e.LARGE="large"}(ie||(ie={}));var ue={modelValue:e.PropTypes.string.def(""),disabled:e.PropTypes.bool.def(!1),readonly:e.PropTypes.bool.def(!1),transfer:e.PropTypes.bool.def(!1),size:(0,I.toType)("colorPickSize",{}).def(ie.UNKNOWN),showValue:e.PropTypes.bool.def(!0),recommend:e.PropTypes.oneOfType([e.PropTypes.array.def((function(){return[]})),e.PropTypes.bool.def(!0)]).def(!0),extCls:e.PropTypes.string.def(""),withValidate:e.PropTypes.bool.def(!0)},ce=Y("#FFFFFF");const le=(0,n.defineComponent)({name:"ColorPicker",directives:{clickoutside:B.clickoutside},props:ue,emits:["update:modelValue","change"],setup:function(t,o){var a=o.emit,i=(0,e.useFormItem)(),u=(0,n.ref)(!1),c=(0,n.ref)(""),s=(0,n.reactive)(JSON.parse(JSON.stringify(ce))),f=(0,n.ref)(null),d=(0,n.ref)(null),h=(0,n.ref)(null),p=(0,n.computed)((function(){var n;return(0,e.classes)((r(n={},"bk-color-picker-".concat(t.size),t.size),r(n,"bk-color-picker-show-dropdown",u.value),r(n,"bk-color-picker-show-value",t.showValue),r(n,"bk-color-picker-disabled",t.disabled||t.readonly),n),"bk-color-picker ".concat(t.extCls))})),v=(0,n.computed)((function(){return Boolean(!0===t.recommend||Array.isArray(t.recommend)&&t.recommend.length)}));(0,n.onBeforeMount)((function(){x({isCreated:!0})})),(0,n.watch)((function(){return t.modelValue}),(function(){var e;x(),t.withValidate&&(null===(e=null==i?void 0:i.validate)||void 0===e||e.call(i,"change"))}));var b=function(e){"Enter"===e.code||"NumpadEnter"===e.code?m():"Escape"===e.code&&_()},g=function(e){t.transfer&&b(e)},m=function(){t.disabled||t.readonly||(u.value?_():w())},y=function(e){v.value||(e.preventDefault(),d.value.$el.focus())},k=function(e){e.preventDefault(),d.value.$el.focus()},w=function(){var e;u.value=!0,null===(e=f.value)||void 0===e||e.updateDropdown(),setTimeout((function(){f.value.$el.querySelector(".bk-color-picker-input-hex .bk-color-picker-input-value").select()}),100)},_=function(){var e;u.value&&((0,n.nextTick)((function(){return h.value.focus()})),u.value=!1,null===(e=f.value)||void 0===e||e.destoryDropdown(),x())},x=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).isCreated,r=void 0!==e&&e;if(""!==t.modelValue){var n=Y(t.modelValue),o=1===n.rgba.a?n.hex:Q(n.rgba);if(o!==c.value){var i=l(t.modelValue).isValid();r?i?(c.value=o.toLowerCase()===t.modelValue.toLowerCase()?t.modelValue:o,Object.assign(s,n)):(Object.assign(s,ce),a("change","")):i?o.toLowerCase()!==c.value.toLowerCase()&&(Object.assign(s,n),c.value=o):(c.value="",Object.assign(s,ce))}}else""!==c.value&&(c.value="",Object.assign(s,ce),a("update:modelValue",c.value))},M=function(e){if(""===e)return c.value="",Object.assign(s,ce),a("update:modelValue",""),void a("change","");var t=Y(e),r=1===t.rgba.a?t.hex:Q(t.rgba);c.value=r,Object.assign(s,t),a("update:modelValue",c.value),a("change",r)},A=function(){u.value=!1};return function(){return(0,n.withDirectives)((0,n.createVNode)("div",{ref:h,tabindex:"0",class:p.value,onKeydown:b,onClick:m},[(0,n.createVNode)("div",{class:"bk-color-picker-color"},[(0,n.createVNode)("span",{class:"bk-color-picker-color-square ".concat(!c.value&&"bk-color-picker-empty"),style:"background: ".concat(c.value||"#FFF")},null)]),t.showValue?(0,n.createVNode)("div",{class:"bk-color-picker-text"},[(0,n.createVNode)("span",null,[c.value])]):void 0,(0,n.createVNode)("div",{class:"bk-color-picker-icon"},[(0,n.createVNode)(U.AngleUp,{class:"icon-angle-down"},null)]),(0,n.createVNode)(n.Transition,{name:"bk-fade-down-transition"},{default:function(){return[(0,n.withDirectives)((0,n.createVNode)(K,{ref:f,triggerRef:h.value},{default:function(){return[(0,n.createVNode)("div",{class:"bk-color-dropdown-container"},[(0,n.createVNode)("div",{class:"bk-color-picker-dropdown",onClick:function(e){e.stopPropagation()},onMousedown:function(e){e.stopPropagation()},onKeydown:g},[(0,n.createVNode)(ae,{ref:d,colorObj:s,onChange:M},null),(0,n.createVNode)(te,{colorObj:s,onChange:M},null),(0,n.createVNode)(G,{colorObj:s,onTab:y,onChange:M},null),v.value?(0,n.createVNode)("div",{class:"bk-color-picker-recommend-container"},[(0,n.createVNode)(ne,{colorObj:s,recommend:t.recommend,onTab:k,onChange:M},null)]):void 0])])]}}),[[n.vShow,u.value]])]}})]),[[(0,n.resolveDirective)("clickoutside"),A]])}}}),se=(0,e.withInstall)(le)})(),c})()));
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("vue-types"),require("../config-provider"),require("../directives"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types","../config-provider","../directives","../icon"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("vue-types"),require("../config-provider"),require("../directives"),require("../icon")):t(e["../shared"],e.vue,e["vue-types"],e["../config-provider"],e["../directives"],e["../icon"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,((e,t,r,n,o,a)=>(()=>{"use strict";var i={2717:e=>{e.exports=n},4061:e=>{e.exports=o},6870:e=>{e.exports=a},4212:t=>{t.exports=e},748:e=>{e.exports=t},210:e=>{e.exports=r}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}};return i[e](r,r.exports,u),r.exports}u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{u.r(l),u.d(l,{default:()=>fe});var e=u(4212);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===t(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var n=u(748);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var a=/^\s+/,i=/\s+$/;function c(e,t){if(t=t||{},(e=e||"")instanceof c)return e;if(!(this instanceof c))return new c(e,t);var r=function(e){var t,r,n,c={r:0,g:0,b:0},u=1,l=null,s=null,f=null,d=!1,h=!1;return"string"==typeof e&&(e=function(e){e=e.replace(a,"").replace(i,"").toLowerCase();var t,r=!1;if(S[e])e=S[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=L.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=L.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=L.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=L.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=L.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=L.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=L.hex8.exec(e))?{r:C(t[1]),g:C(t[2]),b:C(t[3]),a:F(t[4]),format:r?"name":"hex8"}:(t=L.hex6.exec(e))?{r:C(t[1]),g:C(t[2]),b:C(t[3]),format:r?"name":"hex"}:(t=L.hex4.exec(e))?{r:C(t[1]+""+t[1]),g:C(t[2]+""+t[2]),b:C(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:r?"name":"hex8"}:!!(t=L.hex3.exec(e))&&{r:C(t[1]+""+t[1]),g:C(t[2]+""+t[2]),b:C(t[3]+""+t[3]),format:r?"name":"hex"}}(e)),"object"==o(e)&&(E(e.r)&&E(e.g)&&E(e.b)?(t=e.r,r=e.g,n=e.b,c={r:255*V(t,255),g:255*V(r,255),b:255*V(n,255)},d=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):E(e.h)&&E(e.s)&&E(e.v)?(l=R(e.s),s=R(e.v),c=function(e,t,r){e=6*V(e,360),t=V(t,100),r=V(r,100);var n=Math.floor(e),o=e-n,a=r*(1-t),i=r*(1-o*t),c=r*(1-(1-o)*t),u=n%6;return{r:255*[r,i,a,a,c,r][u],g:255*[c,r,r,i,a,a][u],b:255*[a,a,c,r,r,i][u]}}(e.h,l,s),d=!0,h="hsv"):E(e.h)&&E(e.s)&&E(e.l)&&(l=R(e.s),f=R(e.l),c=function(e,t,r){var n,o,a;function i(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=V(e,360),t=V(t,100),r=V(r,100),0===t)n=o=a=r;else{var c=r<.5?r*(1+t):r+t-r*t,u=2*r-c;n=i(u,c,e+1/3),o=i(u,c,e),a=i(u,c,e-1/3)}return{r:255*n,g:255*o,b:255*a}}(e.h,l,f),d=!0,h="hsl"),e.hasOwnProperty("a")&&(u=e.a)),u=j(u),{ok:d,format:e.format||h,r:Math.min(255,Math.max(c.r,0)),g:Math.min(255,Math.max(c.g,0)),b:Math.min(255,Math.max(c.b,0)),a:u}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}function s(e,t,r){e=V(e,255),t=V(t,255),r=V(r,255);var n,o,a=Math.max(e,t,r),i=Math.min(e,t,r),c=(a+i)/2;if(a==i)n=o=0;else{var u=a-i;switch(o=c>.5?u/(2-a-i):u/(a+i),a){case e:n=(t-r)/u+(t<r?6:0);break;case t:n=(r-e)/u+2;break;case r:n=(e-t)/u+4}n/=6}return{h:n,s:o,l:c}}function f(e,t,r){e=V(e,255),t=V(t,255),r=V(r,255);var n,o,a=Math.max(e,t,r),i=Math.min(e,t,r),c=a,u=a-i;if(o=0===a?0:u/a,a==i)n=0;else{switch(a){case e:n=(t-r)/u+(t<r?6:0);break;case t:n=(r-e)/u+2;break;case r:n=(e-t)/u+4}n/=6}return{h:n,s:o,v:c}}function d(e,t,r,n){var o=[P(Math.round(e).toString(16)),P(Math.round(t).toString(16)),P(Math.round(r).toString(16))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function h(e,t,r,n){return[P(T(n)),P(Math.round(e).toString(16)),P(Math.round(t).toString(16)),P(Math.round(r).toString(16))].join("")}function p(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.s-=t/100,r.s=O(r.s),c(r)}function v(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.s+=t/100,r.s=O(r.s),c(r)}function g(e){return c(e).desaturate(100)}function b(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.l+=t/100,r.l=O(r.l),c(r)}function m(e,t){t=0===t?0:t||10;var r=c(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-t/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-t/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-t/100*255))),c(r)}function y(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.l-=t/100,r.l=O(r.l),c(r)}function k(e,t){var r=c(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,c(r)}function w(e){var t=c(e).toHsl();return t.h=(t.h+180)%360,c(t)}function x(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=c(e).toHsl(),n=[c(e)],o=360/t,a=1;a<t;a++)n.push(c({h:(r.h+a*o)%360,s:r.s,l:r.l}));return n}function _(e){var t=c(e).toHsl(),r=t.h;return[c(e),c({h:(r+72)%360,s:t.s,l:t.l}),c({h:(r+216)%360,s:t.s,l:t.l})]}function M(e,t,r){t=t||6,r=r||30;var n=c(e).toHsl(),o=360/r,a=[c(e)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,a.push(c(n));return a}function A(e,t){t=t||6;for(var r=c(e).toHsv(),n=r.h,o=r.s,a=r.v,i=[],u=1/t;t--;)i.push(c({h:n,s:o,v:a})),a=(a+u)%1;return i}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=j(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=f(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=s(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=s(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return d(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,o){var a=[P(Math.round(e).toString(16)),P(Math.round(t).toString(16)),P(Math.round(r).toString(16)),P(T(n))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*V(this._r,255))+"%",g:Math.round(100*V(this._g,255))+"%",b:Math.round(100*V(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*V(this._r,255))+"%, "+Math.round(100*V(this._g,255))+"%, "+Math.round(100*V(this._b,255))+"%)":"rgba("+Math.round(100*V(this._r,255))+"%, "+Math.round(100*V(this._g,255))+"%, "+Math.round(100*V(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(N[d(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+h(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var o=c(e);r="#"+h(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(b,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(k,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(_,arguments)},triad:function(){return this._applyCombination(x,[3])},tetrad:function(){return this._applyCombination(x,[4])}},c.fromRatio=function(e,t){if("object"==o(e)){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:R(e[n]));e=r}return c(e,t)},c.equals=function(e,t){return!(!e||!t)&&c(e).toRgbString()==c(t).toRgbString()},c.random=function(){return c.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},c.mix=function(e,t,r){r=0===r?0:r||50;var n=c(e).toRgb(),o=c(t).toRgb(),a=r/100;return c({r:(o.r-n.r)*a+n.r,g:(o.g-n.g)*a+n.g,b:(o.b-n.b)*a+n.b,a:(o.a-n.a)*a+n.a})},c.readability=function(e,t){var r=c(e),n=c(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},c.isReadable=function(e,t,r){var n,o,a,i,u,l=c.readability(e,t);switch(o=!1,(a=r,"AA"!==(i=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(u=(a.size||"small").toLowerCase())&&"large"!==u&&(u="small"),n={level:i,size:u}).level+n.size){case"AAsmall":case"AAAlarge":o=l>=4.5;break;case"AAlarge":o=l>=3;break;case"AAAsmall":o=l>=7}return o},c.mostReadable=function(e,t,r){var n,o,a,i,u=null,l=0;o=(r=r||{}).includeFallbackColors,a=r.level,i=r.size;for(var s=0;s<t.length;s++)(n=c.readability(e,t[s]))>l&&(l=n,u=c(t[s]));return c.isReadable(e,u,{level:a,size:i})||!o?u:(r.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],r))};var S=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},N=c.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(S);function j(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function V(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function O(e){return Math.min(1,Math.max(0,e))}function C(e){return parseInt(e,16)}function P(e){return 1==e.length?"0"+e:""+e}function R(e){return e<=1&&(e=100*e+"%"),e}function T(e){return Math.round(255*parseFloat(e)).toString(16)}function F(e){return C(e)/255}var H,q,D,L=(q="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",D="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+q),rgba:new RegExp("rgba"+D),hsl:new RegExp("hsl"+q),hsla:new RegExp("hsla"+D),hsv:new RegExp("hsv"+q),hsva:new RegExp("hsva"+D),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function E(e){return!!L.CSS_UNIT.exec(e)}var I=u(210),B=u(2717),U=u(4061),z=u(6870),K={placement:{type:String,default:"bottom-start",validator:function(e){return!(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0&&(console.error("placement property is not valid: '".concat(e,"'")),1))}},className:{type:String},extPopoverCls:{type:String},appendToBody:{type:Boolean},triggerRef:{type:Object},onClick:Function};const W=(0,n.defineComponent)({props:K,emits:["changeVisible"],setup:function(t,r){var o=r.emit,a=Object.create(null),i=(0,n.ref)(null);(0,n.onMounted)((function(){u()})),(0,n.onBeforeUnmount)((function(){c()}));var c=function(){if(a&&0!==Object.keys(a).length){var e=a;e.isShow&&e.hide(),e.destroy(),a=null,o("changeVisible",!1)}},u=function(){a&&0!==Object.keys(a).length?(0,n.nextTick)((function(){a.update()})):(0,n.nextTick)((function(){a=new e.BKPopover(t.triggerRef,i.value,{placement:t.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})}))},l=(0,n.computed)((function(){var r={};return t.appendToBody&&(r["z-index"]=1060+e.bkZIndexManager.getModalNextIndex()),r})),s=(0,n.reactive)({styles:l});return Object.assign(Object.assign({},(0,n.toRefs)(s)),{refContentRef:i,forceUpdate:function(){var e;a&&(null===(e=null==a?void 0:a.forceUpdate)||void 0===e||e.call(a))},updateDropdown:u,destoryDropdown:c})},render:function(){var t,r,o;return(0,n.createVNode)("div",{ref:"refContentRef",class:[(0,e.resolveClassName)("date-picker-dropdown"),this.className,this.extPopoverCls],style:this.styles,onClick:this.onClick},[null!==(o=null===(r=(t=this.$slots).default)||void 0===r?void 0:r.call(t))&&void 0!==o?o:""])}});var X={info:e.PropTypes.object.isRequired};const $=(0,n.defineComponent)({props:X,emits:["tab","input"],setup:function(t,r){var o=r.emit,a=function(e){"a"===t.info.key&&o("tab",e)},i=function(e){var r=t.info.key,n=e.target.value;o("input",r,n)},c=(0,B.usePrefix)().resolveClassName,u=(0,n.computed)((function(){return(0,e.classes)({error:t.info.error},"".concat(c("color-picker-input-value")))}));return function(){return(0,n.createVNode)("div",{class:"".concat(c("color-picker-input-part"))},[(0,n.createVNode)("input",{type:"HEX"===t.info.name?"text":"number",class:u.value,value:t.info.value,onKeydown:a,onInput:i},null),(0,n.createVNode)("span",{class:"".concat(c("color-picker-input-text"))},[t.info.name])])}}});var G={colorObj:e.PropTypes.object.isRequired};const Y=(0,n.defineComponent)({name:"ColorPicker",props:G,emits:["change","tab"],setup:function(e,t){var r=t.emit,o=(0,n.reactive)({key:"hex",name:"HEX",value:e.colorObj.hex,error:!1}),a=(0,n.reactive)({key:"r",name:"R",value:e.colorObj.rgba.r.toString(),error:!1}),i=(0,n.reactive)({key:"g",name:"G",value:e.colorObj.rgba.g.toString(),error:!1}),u=(0,n.reactive)({key:"b",name:"B",value:e.colorObj.rgba.b.toString(),error:!1}),l=(0,n.reactive)({key:"a",name:"Alpha",value:e.colorObj.rgba.a.toString(),error:!1});(0,n.watch)((function(){return e.colorObj}),(function(e){c(e.hex).toString()!==c(o.value).toString()&&(o.value=e.hex),a.value=e.rgba.r.toString(),i.value=e.rgba.g.toString(),u.value=e.rgba.b.toString(),l.value=e.rgba.a.toString(),d()}),{deep:!0});var s=function(e){r("tab",e)},f=function(e,t){if({r:a,g:i,b:u,a:l,hex:o}[e].value=t,d()){var n="hex"===e?o.value:"rgba(".concat(a.value,", ").concat(i.value,", ").concat(u.value,", ").concat(l.value,")");r("change",n)}},d=function(){var e=!0;!o.value.startsWith("#")||4!==o.value.length&&7!==o.value.length||o.value.slice(1).match(/[^0-9a-fA-F]/)?(o.error=!0,e=!1):o.error=!1,""!==l.value&&l.value>=0&&l.value<=1?l.error=!1:(l.error=!0,e=!1);for(var t=0,r=[a,i,u];t<r.length;t++){var n=r[t],c=n.value;""!==c&&c>=0&&c<=255?n.error=!1:(n.error=!0,e=!1)}return e},h=(0,B.usePrefix)().resolveClassName;return function(){return(0,n.createVNode)("div",{class:"".concat(h("color-picker-input"))},[(0,n.createVNode)("div",{class:"".concat(h("color-picker-input-hex"))},[(0,n.createVNode)($,{info:o,onInput:f},null)]),(0,n.createVNode)("div",{class:"".concat(h("color-picker-input-rgba"))},[(0,n.createVNode)($,{info:a,onInput:f},null),(0,n.createVNode)($,{info:i,onInput:f},null),(0,n.createVNode)($,{info:u,onInput:f},null),(0,n.createVNode)($,{info:l,onInput:f,onTab:s},null)])])}}});var J=function(e){var t=e;""===e&&(t="#FFFFFF");var r=c(e),n=r.toHsl(),o=r.toHsv();return 0===n.s&&(n.h=t.h||0,o.h=t.h||0),o.v<.0164&&(o.h=t.h||0,o.s=t.s||0),n.l<.01&&(n.h=t.h||0,n.s=t.s||0),{hsl:n,hsv:o,hex:r.toHexString().toUpperCase(),rgba:r.toRgb()}},Z=function(e,t,r){return e<t?t:e>r?r:e},Q=function(e,t){return e.touches?e.touches[0][t]:0},ee=function(e){var t=e.r,r=e.g,n=e.b,o=e.a;return"rgba(".concat([t,r,n,o].join(","),")")},te={colorObj:e.PropTypes.object.isRequired};const re=(0,n.defineComponent)({name:"ColorPicker",props:te,emits:["change"],setup:function(e,t){var r=t.emit,o=(0,n.ref)(null),a=(0,n.computed)((function(){return{left:"".concat(e.colorObj.hsv.h/360*100,"%")}})),i=function(t){var r=o.value.clientWidth,n=e.colorObj.hsv.h/360*r;switch(t.code){case"ArrowLeft":t.preventDefault(),n=Z(n-2,0,r);break;case"ArrowRight":t.preventDefault(),n=Z(n+2,0,r);break;case"ArrowUp":t.preventDefault(),n=Z(n-10,0,r);break;case"ArrowDown":t.preventDefault(),n=Z(n+10,0,r);break;default:return}u(null,n)},c=function e(){window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",e)},u=function(e,t){var r=o.value.clientWidth,n=void 0!==t?t:l(e);s(n/r)},l=function(e){var t=o.value.getBoundingClientRect().left+window.pageXOffset,r=e.pageX||Q(e,"PageX");return Z(r-t,0,o.value.clientWidth)},s=function(t){var n=e.colorObj.hsl,o=n.h,a=n.s,i=n.l,c=n.a,u=360*t;o!==u&&r("change",{h:u,s:a,l:i,a:c})},f=(0,B.usePrefix)().resolveClassName;return function(){return(0,n.createVNode)("div",{ref:o,tabindex:"0",class:"".concat(f("color-picker-hue")),onKeydown:i,onMousedown:function(e){e.stopPropagation(),e.preventDefault(),function(e){o.value.focus(),u(e),window.addEventListener("mousemove",u,{passive:!0}),window.addEventListener("mouseup",c)}(e)}},[(0,n.createVNode)("div",{class:"".concat(f("color-picker-hue-pointer")),style:a.value},[(0,n.createVNode)("div",{class:"".concat(f("color-picker-hue-rectangle"))},null)])])}}});var ne={colorObj:e.PropTypes.object.isRequired,recommend:e.PropTypes.oneOfType([e.PropTypes.array.def((function(){return[]})),e.PropTypes.bool.def(!0)]).isRequired};const oe=(0,n.defineComponent)({props:ne,emits:["change","tab"],setup:function(t,o){var a=o.emit,i=(0,n.ref)(!1),u=(0,n.ref)(-1),l=(0,n.ref)(null);(0,n.watch)((function(){return t.colorObj}),(function(){u.value=-1,l.value=null}),{deep:!0});var s=(0,n.computed)((function(){return v(t.recommend)})),f=(0,B.usePrefix)().resolveClassName,d=function(t,n){var o;return(0,e.classes)((r(o={},"".concat(f("color-picker-empty")),""===t),r(o,"".concat(f("color-picker-recommend-selected-color")),i.value&&u.value===n),o),"".concat(f("color-picker-recommend-color")))},h=function(e){if("Tab"===e.code)a("tab",e);else{var t=0,r=s.value.length-1;switch(e.code){case"ArrowLeft":e.preventDefault(),t=Z(u.value-1,0,r);break;case"ArrowRight":e.preventDefault(),t=Z(u.value+1,0,r);break;case"ArrowUp":e.preventDefault(),t=Z(u.value-10,0,r);break;case"ArrowDown":e.preventDefault(),t=Z(u.value+10,0,r);break;default:return}p(t)}},p=function(e){var t=s.value[e];a("change",t),(0,n.nextTick)((function(){u.value=e,l.value=t}))},v=function(e){return!0===e?["","#ff4500","#ff8c00","#ffd700","#90ee90","#ddffff","#00ced1","#3a84ff","#a933f5","#db7093","#000000","#494949","#9B9B9B","#ffffff"]:Array.isArray(e)?e.map((function(e){return c(e).isValid()?e:""})):void 0};return function(){return(0,n.createVNode)("div",{tabindex:"0",class:"".concat(f("color-picker-recommend")," "),onFocus:function(){return i.value=!0},onBlur:function(){return i.value=!1},onKeydown:h},[s.value.map((function(e,t){return(0,n.createVNode)("div",{style:"background: ".concat(e||"#fff"),class:d(e,t),onClick:function(){return p(t)}},[u.value===t?(0,n.createVNode)("div",{class:"".concat(f("color-picker-pointer"))},[(0,n.createVNode)("div",{class:"".concat(f("color-picker-circle"))},null)]):void 0])}))])}}});var ae={colorObj:e.PropTypes.object.isRequired};const ie=(0,n.defineComponent)({props:ae,emits:["change"],setup:function(e,t){var r=t.emit,o=(0,n.ref)(null),a=(0,n.computed)((function(){return{background:"hsl(".concat(e.colorObj.hsv.h,", 100%, 50%)")}})),i=(0,n.computed)((function(){return{top:"".concat(100*(1-e.colorObj.hsv.v),"%"),left:"".concat(100*e.colorObj.hsv.s,"%")}})),c=function e(){window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",e)},u=function(t){var r=o.value,n=r.clientWidth,a=r.clientHeight,i=e.colorObj.hsv.s*n,c=(1-e.colorObj.hsv.v)*a;switch(t.code){case"ArrowLeft":t.preventDefault(),i=Z(i-10,0,n);break;case"ArrowRight":t.preventDefault(),i=Z(i+10,0,n);break;case"ArrowUp":t.preventDefault(),c=Z(c-10,0,a);break;case"ArrowDown":t.preventDefault(),c=Z(c+10,0,a);break;default:return}l(null,i,c)},l=function(t,r,n){var a=o.value,i=a.clientWidth,c=a.clientHeight,u=(void 0!==r?r:s(t))/i,l=1-(void 0!==n?n:f(t))/c;d(e.colorObj.hsv.h,u,l,e.colorObj.hsv.a)},s=function(e){var t=o.value.getBoundingClientRect().left+window.pageXOffset,r=e.pageX||Q(e,"PageX");return Z(r-t,0,o.value.clientWidth)},f=function(e){var t=o.value.getBoundingClientRect().top+window.pageYOffset,r=e.pageY||Q(e,"PageY");return Z(r-t,0,o.value.clientHeight)},d=function(e,t,n,o){r("change",{h:e,s:t,v:n,a:o})},h=(0,B.usePrefix)().resolveClassName;return function(){return(0,n.createVNode)("div",{ref:o,tabindex:"0",class:"".concat(h("color-picker-saturation")),style:a.value,onKeydown:u,onMousedown:function(e){e.stopPropagation(),function(e){o.value.focus(),l(e),window.addEventListener("mousemove",l,{passive:!0}),window.addEventListener("mouseup",c)}(e)}},[(0,n.createVNode)("div",{class:"".concat(h("color-picker-saturation-white"))},null),(0,n.createVNode)("div",{class:"".concat(h("color-picker-saturation-black"))},null),(0,n.createVNode)("div",{class:"".concat(h("color-picker-pointer")),style:i.value},[(0,n.createVNode)("div",{class:"".concat(h("color-picker-circle"))},null)])])}}});var ce;!function(e){e.UNKNOWN="",e.SMALL="small",e.LARGE="large"}(ce||(ce={}));var ue={modelValue:e.PropTypes.string.def(""),disabled:e.PropTypes.bool.def(!1),readonly:e.PropTypes.bool.def(!1),transfer:e.PropTypes.bool.def(!1),size:(0,I.toType)("colorPickSize",{}).def(ce.UNKNOWN),showValue:e.PropTypes.bool.def(!0),recommend:e.PropTypes.oneOfType([e.PropTypes.array.def((function(){return[]})),e.PropTypes.bool.def(!0)]).def(!0),extCls:e.PropTypes.string.def(""),withValidate:e.PropTypes.bool.def(!0)},le=J("#FFFFFF");const se=(0,n.defineComponent)({name:"ColorPicker",directives:{clickoutside:U.clickoutside},props:ue,emits:["update:modelValue","change"],setup:function(t,o){var a=o.emit,i=(0,e.useFormItem)(),u=(0,n.ref)(!1),l=(0,n.ref)(""),s=(0,n.reactive)(JSON.parse(JSON.stringify(le))),f=(0,n.ref)(null),d=(0,n.ref)(null),h=(0,n.ref)(null),p=(0,B.usePrefix)().resolveClassName,v=(0,n.computed)((function(){var n;return(0,e.classes)((r(n={},"".concat(p("color-picker-".concat(t.size))),t.size),r(n,"".concat(p("color-picker-show-dropdown")),u.value),r(n,"".concat(p("color-picker-show-value")),t.showValue),r(n,"".concat(p("color-picker-disabled")),t.disabled||t.readonly),n),"".concat(p("color-picker")," ").concat(t.extCls))})),g=(0,n.computed)((function(){return Boolean(!0===t.recommend||Array.isArray(t.recommend)&&t.recommend.length)}));(0,n.onBeforeMount)((function(){M({isCreated:!0})})),(0,n.watch)((function(){return t.modelValue}),(function(){var e;M(),t.withValidate&&(null===(e=null==i?void 0:i.validate)||void 0===e||e.call(i,"change"))}));var b=function(e){"Enter"===e.code||"NumpadEnter"===e.code?y():"Escape"===e.code&&_()},m=function(e){t.transfer&&b(e)},y=function(){t.disabled||t.readonly||(u.value?_():x())},k=function(e){g.value||(e.preventDefault(),d.value.$el.focus())},w=function(e){e.preventDefault(),d.value.$el.focus()},x=function(){var e;u.value=!0,null===(e=f.value)||void 0===e||e.updateDropdown(),setTimeout((function(){f.value.$el.querySelector(".".concat(p("color-picker-input-hex")," .").concat(p("color-picker-input-value"))).select()}),100)},_=function(){var e;u.value&&((0,n.nextTick)((function(){return h.value.focus()})),u.value=!1,null===(e=f.value)||void 0===e||e.destoryDropdown(),M())},M=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).isCreated,r=void 0!==e&&e;if(""!==t.modelValue){var n=J(t.modelValue),o=1===n.rgba.a?n.hex:ee(n.rgba);if(o!==l.value){var i=c(t.modelValue).isValid();r?i?(l.value=o.toLowerCase()===t.modelValue.toLowerCase()?t.modelValue:o,Object.assign(s,n)):(Object.assign(s,le),a("change","")):i?o.toLowerCase()!==l.value.toLowerCase()&&(Object.assign(s,n),l.value=o):(l.value="",Object.assign(s,le))}}else""!==l.value&&(l.value="",Object.assign(s,le),a("update:modelValue",l.value))},A=function(e){if(""===e)return l.value="",Object.assign(s,le),a("update:modelValue",""),void a("change","");var t=J(e),r=1===t.rgba.a?t.hex:ee(t.rgba);l.value=r,Object.assign(s,t),a("update:modelValue",l.value),a("change",r)},S=function(){u.value=!1};return function(){return(0,n.withDirectives)((0,n.createVNode)("div",{ref:h,tabindex:"0",class:v.value,onKeydown:b,onClick:y},[(0,n.createVNode)("div",{class:"".concat(p("color-picker-color"))},[(0,n.createVNode)("span",{class:"".concat(p("color-picker-color-square")," ").concat(!l.value&&"".concat(p("color-picker-empty"))),style:"background: ".concat(l.value||"#FFF")},null)]),t.showValue?(0,n.createVNode)("div",{class:"".concat(p("color-picker-text"))},[(0,n.createVNode)("span",null,[l.value])]):void 0,(0,n.createVNode)("div",{class:"".concat(p("color-picker-icon"))},[(0,n.createVNode)(z.AngleUp,{class:"icon-angle-down"},null)]),(0,n.createVNode)(n.Transition,{name:"bk-fade-down-transition"},{default:function(){return[(0,n.withDirectives)((0,n.createVNode)(W,{ref:f,triggerRef:h.value},{default:function(){return[(0,n.createVNode)("div",{class:"".concat(p("color-dropdown-container"))},[(0,n.createVNode)("div",{class:"".concat(p("color-picker-dropdown")),onClick:function(e){e.stopPropagation()},onMousedown:function(e){e.stopPropagation()},onKeydown:m},[(0,n.createVNode)(ie,{ref:d,colorObj:s,onChange:A},null),(0,n.createVNode)(re,{colorObj:s,onChange:A},null),(0,n.createVNode)(Y,{colorObj:s,onTab:k,onChange:A},null),g.value?(0,n.createVNode)("div",{class:"".concat(p("color-picker-recommend-container"))},[(0,n.createVNode)(oe,{colorObj:s,recommend:t.recommend,onTab:w,onChange:A},null)]):void 0])])]}}),[[n.vShow,u.value]])]}})]),[[(0,n.resolveDirective)("clickoutside"),S]])}}}),fe=(0,e.withInstall)(se)})(),l})()));
|
@@ -29,7 +29,6 @@ declare const BkConfigProvider: {
|
|
29
29
|
$data: {};
|
30
30
|
$props: {
|
31
31
|
prefix?: string;
|
32
|
-
class?: unknown;
|
33
32
|
readonly locale?: {
|
34
33
|
lang: string;
|
35
34
|
steps: {
|
@@ -154,6 +153,7 @@ declare const BkConfigProvider: {
|
|
154
153
|
copyFailed: string;
|
155
154
|
};
|
156
155
|
};
|
156
|
+
class?: unknown;
|
157
157
|
style?: unknown;
|
158
158
|
key?: string | number | symbol;
|
159
159
|
ref?: import("vue").VNodeRef;
|
@@ -1,20 +1,20 @@
|
|
1
1
|
@import '../styles/themes/themes.less';
|
2
2
|
@import '../styles/mixins/mixins.less';
|
3
3
|
|
4
|
-
|
4
|
+
.@{bk-prefix}-grid-container {
|
5
5
|
margin-right: auto;
|
6
6
|
margin-left: auto;
|
7
7
|
}
|
8
8
|
|
9
|
-
|
9
|
+
.@{bk-prefix}-grid-row {
|
10
10
|
.clearfix-style();
|
11
11
|
|
12
|
-
|
12
|
+
.@{bk-prefix}-grid-col > .@{bk-prefix}-grid-row {
|
13
13
|
margin: 0 auto;
|
14
14
|
}
|
15
15
|
}
|
16
16
|
|
17
|
-
|
17
|
+
.@{bk-prefix}-grid-col {
|
18
18
|
position: relative;
|
19
19
|
float: left;
|
20
20
|
}
|
package/lib/container/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,
|
1
|
+
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("../shared"),require("vue"),require("../config-provider"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider"],r);else{var o="object"==typeof exports?r(require("../shared"),require("vue"),require("../config-provider")):r(e["../shared"],e.vue,e["../config-provider"]);for(var t in o)("object"==typeof exports?exports:e)[t]=o[t]}}(self,((e,r,o)=>(()=>{"use strict";var t={2717:e=>{e.exports=o},4212:r=>{r.exports=e},748:e=>{e.exports=r}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.d=(e,r)=>{for(var o in r)i.o(r,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{i.r(a),i.d(a,{BkCol:()=>u,BkContainer:()=>p,BkRow:()=>c,default:()=>d});var e=i(4212),r=i(748),o=Symbol("containerProps"),t=i(2717),n={span:e.PropTypes.number.def(1),offset:e.PropTypes.number.def(0),pull:e.PropTypes.number.def(0),push:e.PropTypes.number.def(0)};const u=(0,r.defineComponent)({name:"Col",props:n,emits:[],setup:function(e,n){var i=(0,r.inject)(o),a=i.col,u=i.gutter,l=i.flex,s=e.span,c=e.offset,p=e.pull,d=e.push,f=(0,r.computed)((function(){return s||a}));(0,r.provide)("containerProps",{col:f.value,gutter:u,flex:l});var v=function(e){return"".concat(Number((100*e).toFixed(3)),"%")},m=(0,r.computed)((function(){return{width:v(f.value/a),"padding-right":"".concat(u/2,"px"),"padding-left":"".concat(u/2,"px"),"margin-left":c?v(c/a):null,right:p?v(p/a):null,left:d?v(d/a):null}})),g=(0,t.usePrefix)().resolveClassName;return function(){var e,o;return(0,r.createVNode)("div",{class:"".concat(g("grid-col")),style:m.value},[null===(o=(e=n.slots).default)||void 0===o?void 0:o.call(e)])}}});var l={col:e.PropTypes.number.def(24),gutter:e.PropTypes.number.def(20),margin:e.PropTypes.number.def(20),flex:e.PropTypes.bool.def(!1),extCls:e.PropTypes.string};const s=(0,r.defineComponent)({name:"Container",props:l,emits:[],setup:function(e,n){var i=e.col,a=e.gutter,u=e.flex,l=e.extCls;(0,r.provide)(o,{col:i,gutter:a,flex:u});var s=(0,t.usePrefix)().resolveClassName,c=(0,r.computed)((function(){return l?"".concat(s("grid-container")," ").concat(l):"".concat(s("grid-container"))})),p=(0,r.computed)((function(){var r=e.margin;return{"padding-right":"".concat(r,"px"),"padding-left":"".concat(r,"px")}}));return function(){var e,o;return(0,r.createVNode)("div",{class:c.value,style:p.value},[null===(o=(e=n.slots).default)||void 0===o?void 0:o.call(e)])}}}),c=(0,r.defineComponent)({name:"Row",emits:[],setup:function(e,n){var i=(0,r.inject)(o),a=i.col,u=i.gutter,l=i.flex;(0,r.provide)("containerProps",{col:a,gutter:u,flex:l});var s=(0,t.usePrefix)().resolveClassName,c=(0,r.computed)((function(){var e=l?{display:["-webkit-box","-ms-flexbox","flex"]}:{};return Object.assign(Object.assign({},e),{"margin-right":"-".concat(u/2,"px"),"margin-left":"-".concat(u/2,"px")})}));return function(){var e,o;return(0,r.createVNode)("div",{class:"".concat(s("grid-row")),style:c.value},[null===(o=(e=n.slots).default)||void 0===o?void 0:o.call(e)])}}});var p=(0,e.withInstallProps)(s,{Row:c,Col:u});const d=p})(),a})()));
|
@@ -39,6 +39,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
39
39
|
afterShow: () => void;
|
40
40
|
afterHidden: () => void;
|
41
41
|
popoverRef: any;
|
42
|
+
resolveClassName: (cls: string) => string;
|
42
43
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("show" | "hide" | "showChange")[], "show" | "hide" | "showChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
43
44
|
/** trigger = manual时候控制显隐藏 */
|
44
45
|
isShow: import("vue-types").VueTypeValidableDef<boolean> & {
|
@@ -4,11 +4,11 @@
|
|
4
4
|
.@{bk-prefix}-dropdown {
|
5
5
|
display: inline-block;
|
6
6
|
|
7
|
-
|
7
|
+
.@{bk-prefix}-dropdown-reference {
|
8
8
|
z-index: 1;
|
9
9
|
}
|
10
10
|
|
11
|
-
|
11
|
+
.@{bk-prefix}-dropdown-content {
|
12
12
|
z-index: 2;
|
13
13
|
display: none;
|
14
14
|
box-shadow: 0 2px 6px rgba(51,60,72,.1);
|
@@ -34,19 +34,19 @@
|
|
34
34
|
border: 1px solid #dcdee5;
|
35
35
|
border-radius: 2px;
|
36
36
|
box-sizing: border-box;
|
37
|
-
|
37
|
+
|
38
38
|
&::-webkit-scrollbar {
|
39
39
|
width: 4px;
|
40
40
|
height: 4px;
|
41
41
|
}
|
42
|
-
|
42
|
+
|
43
43
|
&::-webkit-scrollbar-thumb {
|
44
44
|
background: #dde4eb;
|
45
45
|
border-radius: 20px;
|
46
46
|
box-shadow: inset 0 0 6px hsla(0,0%,80%,.3);
|
47
47
|
}
|
48
48
|
}
|
49
|
-
|
49
|
+
|
50
50
|
.@{bk-prefix}-dropdown-item {
|
51
51
|
display: block;
|
52
52
|
height: 32px;
|
@@ -57,12 +57,9 @@
|
|
57
57
|
white-space: nowrap;
|
58
58
|
list-style: none;
|
59
59
|
cursor: pointer;
|
60
|
-
|
60
|
+
|
61
61
|
&:hover {
|
62
62
|
background-color: #f5f7fa;
|
63
63
|
}
|
64
64
|
}
|
65
65
|
}
|
66
|
-
|
67
|
-
|
68
|
-
|
package/lib/dropdown/index.d.ts
CHANGED
@@ -113,6 +113,7 @@ declare const BkDropdown: {
|
|
113
113
|
afterShow: () => void;
|
114
114
|
afterHidden: () => void;
|
115
115
|
popoverRef: any;
|
116
|
+
resolveClassName: (cls: string) => string;
|
116
117
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("show" | "hide" | "showChange")[], string, {
|
117
118
|
extCls: string;
|
118
119
|
isShow: boolean;
|
@@ -181,6 +182,7 @@ declare const BkDropdown: {
|
|
181
182
|
afterShow: () => void;
|
182
183
|
afterHidden: () => void;
|
183
184
|
popoverRef: any;
|
185
|
+
resolveClassName: (cls: string) => string;
|
184
186
|
}> & {} & import("vue").ComponentCustomProperties & {};
|
185
187
|
__isFragment?: never;
|
186
188
|
__isTeleport?: never;
|
@@ -224,6 +226,7 @@ declare const BkDropdown: {
|
|
224
226
|
afterShow: () => void;
|
225
227
|
afterHidden: () => void;
|
226
228
|
popoverRef: any;
|
229
|
+
resolveClassName: (cls: string) => string;
|
227
230
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("show" | "hide" | "showChange")[], "show" | "hide" | "showChange", {
|
228
231
|
extCls: string;
|
229
232
|
isShow: boolean;
|