@opentinyvue/vue-color-select-panel 3.25.0 → 3.27.0

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/lib/pc.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import Button from '@opentinyvue/vue-button';
2
2
  import Input from '@opentinyvue/vue-input';
3
- import { renderless as renderless$3, api as api$3 } from '@opentinyvue/vue-renderless/color-select-panel/vue';
3
+ import Numeric from '@opentinyvue/vue-numeric';
4
+ import { renderless as renderless$4, api as api$4 } from '@opentinyvue/vue-renderless/color-select-panel/vue';
4
5
  import { defineComponent, setup, props, directive } from '@opentinyvue/vue-common';
5
- import { renderless as renderless$1, api as api$1 } from '@opentinyvue/vue-renderless/color-select-panel/hue-select/vue';
6
+ import { renderless as renderless$2, api as api$2 } from '@opentinyvue/vue-renderless/color-select-panel/hue-select/vue';
6
7
  import { api, renderless } from '@opentinyvue/vue-renderless/color-select-panel/sv-select/vue';
7
- import { openBlock, createElementBlock, normalizeStyle, createElementVNode, resolveComponent, createVNode, resolveDirective, withDirectives, withModifiers, createBlock, createCommentVNode, withCtx, Fragment, renderList, createTextVNode, toDisplayString } from 'vue';
8
- import { renderless as renderless$2, api as api$2 } from '@opentinyvue/vue-renderless/color-select-panel/alpha-select/vue';
8
+ import { openBlock, createElementBlock, normalizeStyle, createElementVNode, Fragment, renderList, withModifiers, resolveComponent, createVNode, createBlock, createCommentVNode, resolveDirective, withDirectives, withCtx, toDisplayString, createTextVNode } from 'vue';
9
+ import { renderless as renderless$1, api as api$1 } from '@opentinyvue/vue-renderless/color-select-panel/linear-gradient/vue';
10
+ import { renderless as renderless$3, api as api$3 } from '@opentinyvue/vue-renderless/color-select-panel/alpha-select/vue';
9
11
  import '@opentinyvue/vue-theme/color-select-panel/index.css';
10
12
  import { Clickoutside } from '@opentinyvue/vue-directive';
11
- import Collapse from '@opentinyvue/vue-collapse';
12
- import CollapseItem from '@opentinyvue/vue-collapse-item';
13
13
  import Select from '@opentinyvue/vue-select';
14
14
  import Option from '@opentinyvue/vue-option';
15
15
 
@@ -46,7 +46,7 @@ var _export_sfc = function _export_sfc2(sfc, props) {
46
46
  return target;
47
47
  };
48
48
 
49
- var _sfc_main$3 = defineComponent({
49
+ var _sfc_main$4 = defineComponent({
50
50
  emit: ["ready", "svUpdate"],
51
51
  props: {
52
52
  color: {
@@ -63,7 +63,7 @@ var _sfc_main$3 = defineComponent({
63
63
  });
64
64
  }
65
65
  });
66
- var _hoisted_1$2 = /* @__PURE__ */ createElementVNode(
66
+ var _hoisted_1$3 = /* @__PURE__ */ createElementVNode(
67
67
  "div",
68
68
  {
69
69
  class: "white"
@@ -81,7 +81,7 @@ var _hoisted_2$2 = /* @__PURE__ */ createElementVNode(
81
81
  -1
82
82
  /* HOISTED */
83
83
  );
84
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
84
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
85
85
  return openBlock(), createElementBlock(
86
86
  "div",
87
87
  {
@@ -91,7 +91,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
91
91
  background: _ctx.state.bg
92
92
  })
93
93
  },
94
- [_hoisted_1$2, _hoisted_2$2, createElementVNode(
94
+ [_hoisted_1$3, _hoisted_2$2, createElementVNode(
95
95
  "div",
96
96
  {
97
97
  class: "cursor",
@@ -110,7 +110,72 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
110
110
  /* STYLE */
111
111
  );
112
112
  }
113
- var SvSelect = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
113
+ var SvSelect = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
114
+ var _sfc_main$3 = defineComponent({
115
+ props: {},
116
+ setup: function setup2(props2, context) {
117
+ return setup({
118
+ props: props2,
119
+ context,
120
+ renderless: renderless$1,
121
+ api: api$1,
122
+ mono: true
123
+ });
124
+ }
125
+ });
126
+ var _hoisted_1$2 = ["onMousedown"];
127
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
128
+ return openBlock(), createElementBlock(
129
+ "div",
130
+ {
131
+ class: "tiny-color-select-panel__linear-gradient",
132
+ ref: "linearGradientBar",
133
+ onClick: _cache[1] || (_cache[1] = function() {
134
+ return _ctx.onClickBar && _ctx.onClickBar.apply(_ctx, arguments);
135
+ }),
136
+ style: normalizeStyle({
137
+ background: _ctx.state.linearGradientBarBackground
138
+ })
139
+ },
140
+ [(openBlock(true), createElementBlock(
141
+ Fragment,
142
+ null,
143
+ renderList(_ctx.context.colorPoints, function(point, idx) {
144
+ return openBlock(), createElementBlock("div", {
145
+ class: "tiny-color-select-panel__linear-gradient__thumb",
146
+ ref_for: true,
147
+ ref: "thumb",
148
+ key: idx,
149
+ onClick: _cache[0] || (_cache[0] = withModifiers(function() {
150
+ }, ["stop"])),
151
+ onMousedown: function onMousedown(event) {
152
+ return _ctx.onThumbMouseDown(event, point);
153
+ },
154
+ style: normalizeStyle({
155
+ left: point.cursorLeft + "px",
156
+ transform: "translateX(-50%)"
157
+ })
158
+ }, [createElementVNode(
159
+ "div",
160
+ {
161
+ class: "tiny-color-select-panel__linear-gradient__thumb-heart",
162
+ style: normalizeStyle({
163
+ background: point.color.value
164
+ })
165
+ },
166
+ null,
167
+ 4
168
+ /* STYLE */
169
+ )], 44, _hoisted_1$2);
170
+ }),
171
+ 128
172
+ /* KEYED_FRAGMENT */
173
+ ))],
174
+ 4
175
+ /* STYLE */
176
+ );
177
+ }
178
+ var linearGradient = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
114
179
  var _sfc_main$2 = defineComponent({
115
180
  emits: ["hueUpdate", "svReady", "hueReady"],
116
181
  props: {
@@ -122,14 +187,15 @@ var _sfc_main$2 = defineComponent({
122
187
  }
123
188
  },
124
189
  components: {
125
- SvSelect
190
+ SvSelect,
191
+ LinearGradient: linearGradient
126
192
  },
127
- setup: function setup2(props2, context) {
193
+ setup: function setup3(props2, context) {
128
194
  return setup({
129
195
  props: props2,
130
196
  context,
131
- renderless: renderless$1,
132
- api: api$1,
197
+ renderless: renderless$2,
198
+ api: api$2,
133
199
  mono: true
134
200
  });
135
201
  }
@@ -143,6 +209,7 @@ var _hoisted_2$1 = {
143
209
  };
144
210
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
145
211
  var _component_sv_select = resolveComponent("sv-select");
212
+ var _component_linear_gradient = resolveComponent("linear-gradient");
146
213
  return openBlock(), createElementBlock("div", _hoisted_1$1, [createVNode(_component_sv_select, {
147
214
  color: _ctx.color,
148
215
  onReady: _ctx.onSvReady
@@ -153,18 +220,32 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
153
220
  "div",
154
221
  {
155
222
  ref: "thumb",
223
+ class: "tiny-color-select-panel__inner__hue-select-thumb",
156
224
  style: normalizeStyle({
157
- top: _ctx.state.thumbTop + "px",
158
- transform: "translateY(-50%)"
225
+ left: _ctx.state.thumbLeft + "px",
226
+ transform: "translateX(-50%)"
159
227
  })
160
228
  },
161
- null,
229
+ [createElementVNode(
230
+ "div",
231
+ {
232
+ class: "tiny-color-select-panel__inner__hue-select-thumb-heart",
233
+ style: normalizeStyle({
234
+ background: _ctx.state.ctx.activeColor.color.value
235
+ })
236
+ },
237
+ null,
238
+ 4
239
+ /* STYLE */
240
+ )],
162
241
  4
163
242
  /* STYLE */
164
243
  )],
165
244
  512
166
245
  /* NEED_PATCH */
167
- )]);
246
+ ), _ctx.state.ctx.colorMode === "linear-gradient" ? (openBlock(), createBlock(_component_linear_gradient, {
247
+ key: 0
248
+ })) : createCommentVNode("v-if", true)]);
168
249
  }
169
250
  var HueSelect = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
170
251
  var _sfc_main$1 = defineComponent({
@@ -174,12 +255,12 @@ var _sfc_main$1 = defineComponent({
174
255
  type: Object
175
256
  }
176
257
  },
177
- setup: function setup3(props2, context) {
258
+ setup: function setup4(props2, context) {
178
259
  return setup({
179
260
  props: props2,
180
261
  context,
181
- renderless: renderless$2,
182
- api: api$2,
262
+ renderless: renderless$3,
263
+ api: api$3,
183
264
  mono: true
184
265
  });
185
266
  }
@@ -211,13 +292,24 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
211
292
  {
212
293
  class: "tiny-color-select-panel__alpha__thumb",
213
294
  style: normalizeStyle({
214
- top: 0,
295
+ top: "-2px",
215
296
  left: _ctx.state.left + "px",
216
297
  transform: "translateX(-50%)"
217
298
  }),
218
299
  ref: "alphaThumb"
219
300
  },
220
- null,
301
+ [createElementVNode(
302
+ "div",
303
+ {
304
+ class: "tiny-color-select-panel__inner__hue-select-thumb-heart",
305
+ style: normalizeStyle({
306
+ background: _ctx.state.activeColor.color.value
307
+ })
308
+ },
309
+ null,
310
+ 4
311
+ /* STYLE */
312
+ )],
221
313
  4
222
314
  /* STYLE */
223
315
  )],
@@ -226,56 +318,581 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
226
318
  );
227
319
  }
228
320
  var AlphaSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
321
+ var node = {};
322
+ var hasRequiredNode;
323
+ function requireNode() {
324
+ if (hasRequiredNode) return node;
325
+ hasRequiredNode = 1;
326
+ var GradientParser = GradientParser || {};
327
+ GradientParser.stringify = /* @__PURE__ */ (function() {
328
+ var visitor = {
329
+ "visit_linear-gradient": function visit_linearGradient(node2) {
330
+ return visitor.visit_gradient(node2);
331
+ },
332
+ "visit_repeating-linear-gradient": function visit_repeatingLinearGradient(node2) {
333
+ return visitor.visit_gradient(node2);
334
+ },
335
+ "visit_radial-gradient": function visit_radialGradient(node2) {
336
+ return visitor.visit_gradient(node2);
337
+ },
338
+ "visit_repeating-radial-gradient": function visit_repeatingRadialGradient(node2) {
339
+ return visitor.visit_gradient(node2);
340
+ },
341
+ "visit_gradient": function visit_gradient(node2) {
342
+ var orientation = visitor.visit(node2.orientation);
343
+ if (orientation) {
344
+ orientation += ", ";
345
+ }
346
+ return node2.type + "(" + orientation + visitor.visit(node2.colorStops) + ")";
347
+ },
348
+ "visit_shape": function visit_shape(node2) {
349
+ var result = node2.value, at = visitor.visit(node2.at), style = visitor.visit(node2.style);
350
+ if (style) {
351
+ result += " " + style;
352
+ }
353
+ if (at) {
354
+ result += " at " + at;
355
+ }
356
+ return result;
357
+ },
358
+ "visit_default-radial": function visit_defaultRadial(node2) {
359
+ var result = "", at = visitor.visit(node2.at);
360
+ if (at) {
361
+ result += at;
362
+ }
363
+ return result;
364
+ },
365
+ "visit_extent-keyword": function visit_extentKeyword(node2) {
366
+ var result = node2.value, at = visitor.visit(node2.at);
367
+ if (at) {
368
+ result += " at " + at;
369
+ }
370
+ return result;
371
+ },
372
+ "visit_position-keyword": function visit_positionKeyword(node2) {
373
+ return node2.value;
374
+ },
375
+ "visit_position": function visit_position(node2) {
376
+ return visitor.visit(node2.value.x) + " " + visitor.visit(node2.value.y);
377
+ },
378
+ "visit_%": function visit_(node2) {
379
+ return node2.value + "%";
380
+ },
381
+ "visit_em": function visit_em(node2) {
382
+ return node2.value + "em";
383
+ },
384
+ "visit_px": function visit_px(node2) {
385
+ return node2.value + "px";
386
+ },
387
+ "visit_calc": function visit_calc(node2) {
388
+ return "calc(" + node2.value + ")";
389
+ },
390
+ "visit_literal": function visit_literal(node2) {
391
+ return visitor.visit_color(node2.value, node2);
392
+ },
393
+ "visit_hex": function visit_hex(node2) {
394
+ return visitor.visit_color("#" + node2.value, node2);
395
+ },
396
+ "visit_rgb": function visit_rgb(node2) {
397
+ return visitor.visit_color("rgb(" + node2.value.join(", ") + ")", node2);
398
+ },
399
+ "visit_rgba": function visit_rgba(node2) {
400
+ return visitor.visit_color("rgba(" + node2.value.join(", ") + ")", node2);
401
+ },
402
+ "visit_hsl": function visit_hsl(node2) {
403
+ return visitor.visit_color("hsl(" + node2.value[0] + ", " + node2.value[1] + "%, " + node2.value[2] + "%)", node2);
404
+ },
405
+ "visit_hsla": function visit_hsla(node2) {
406
+ return visitor.visit_color("hsla(" + node2.value[0] + ", " + node2.value[1] + "%, " + node2.value[2] + "%, " + node2.value[3] + ")", node2);
407
+ },
408
+ "visit_var": function visit_var(node2) {
409
+ return visitor.visit_color("var(" + node2.value + ")", node2);
410
+ },
411
+ "visit_color": function visit_color(resultColor, node2) {
412
+ var result = resultColor, length = visitor.visit(node2.length);
413
+ if (length) {
414
+ result += " " + length;
415
+ }
416
+ return result;
417
+ },
418
+ "visit_angular": function visit_angular(node2) {
419
+ return node2.value + "deg";
420
+ },
421
+ "visit_directional": function visit_directional(node2) {
422
+ return "to " + node2.value;
423
+ },
424
+ "visit_array": function visit_array(elements) {
425
+ var result = "", size = elements.length;
426
+ elements.forEach(function(element, i) {
427
+ result += visitor.visit(element);
428
+ if (i < size - 1) {
429
+ result += ", ";
430
+ }
431
+ });
432
+ return result;
433
+ },
434
+ "visit_object": function visit_object(obj) {
435
+ if (obj.width && obj.height) {
436
+ return visitor.visit(obj.width) + " " + visitor.visit(obj.height);
437
+ }
438
+ return "";
439
+ },
440
+ "visit": function visit(element) {
441
+ if (!element) {
442
+ return "";
443
+ }
444
+ if (element instanceof Array) {
445
+ return visitor.visit_array(element);
446
+ } else if (typeof element === "object" && !element.type) {
447
+ return visitor.visit_object(element);
448
+ } else if (element.type) {
449
+ var nodeVisitor = visitor["visit_" + element.type];
450
+ if (nodeVisitor) {
451
+ return nodeVisitor(element);
452
+ } else {
453
+ throw Error("Missing visitor visit_" + element.type);
454
+ }
455
+ } else {
456
+ throw Error("Invalid node.");
457
+ }
458
+ }
459
+ };
460
+ return function(root) {
461
+ return visitor.visit(root);
462
+ };
463
+ })();
464
+ var GradientParser = GradientParser || {};
465
+ GradientParser.parse = /* @__PURE__ */ (function() {
466
+ var tokens = {
467
+ linearGradient: /^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,
468
+ repeatingLinearGradient: /^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,
469
+ radialGradient: /^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,
470
+ repeatingRadialGradient: /^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,
471
+ sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,
472
+ extentKeywords: /^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,
473
+ positionKeywords: /^(left|center|right|top|bottom)/i,
474
+ pixelValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,
475
+ percentageValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,
476
+ emValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,
477
+ angleValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,
478
+ radianValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))rad/,
479
+ startCall: /^\(/,
480
+ endCall: /^\)/,
481
+ comma: /^,/,
482
+ hexColor: /^\#([0-9a-fA-F]+)/,
483
+ literalColor: /^([a-zA-Z]+)/,
484
+ rgbColor: /^rgb/i,
485
+ rgbaColor: /^rgba/i,
486
+ varColor: /^var/i,
487
+ calcValue: /^calc/i,
488
+ variableName: /^(--[a-zA-Z0-9-,\s\#]+)/,
489
+ number: /^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,
490
+ hslColor: /^hsl/i,
491
+ hslaColor: /^hsla/i
492
+ };
493
+ var input = "";
494
+ function error(msg) {
495
+ var err = new Error(input + ": " + msg);
496
+ err.source = input;
497
+ throw err;
498
+ }
499
+ function getAST() {
500
+ var ast = matchListDefinitions();
501
+ if (input.length > 0) {
502
+ error("Invalid input not EOF");
503
+ }
504
+ return ast;
505
+ }
506
+ function matchListDefinitions() {
507
+ return matchListing(matchDefinition);
508
+ }
509
+ function matchDefinition() {
510
+ return matchGradient("linear-gradient", tokens.linearGradient, matchLinearOrientation) || matchGradient("repeating-linear-gradient", tokens.repeatingLinearGradient, matchLinearOrientation) || matchGradient("radial-gradient", tokens.radialGradient, matchListRadialOrientations) || matchGradient("repeating-radial-gradient", tokens.repeatingRadialGradient, matchListRadialOrientations);
511
+ }
512
+ function matchGradient(gradientType, pattern, orientationMatcher) {
513
+ return matchCall(pattern, function(captures) {
514
+ var orientation = orientationMatcher();
515
+ if (orientation) {
516
+ if (!scan(tokens.comma)) {
517
+ error("Missing comma before color stops");
518
+ }
519
+ }
520
+ return {
521
+ type: gradientType,
522
+ orientation,
523
+ colorStops: matchListing(matchColorStop)
524
+ };
525
+ });
526
+ }
527
+ function matchCall(pattern, callback) {
528
+ var captures = scan(pattern);
529
+ if (captures) {
530
+ if (!scan(tokens.startCall)) {
531
+ error("Missing (");
532
+ }
533
+ var result = callback(captures);
534
+ if (!scan(tokens.endCall)) {
535
+ error("Missing )");
536
+ }
537
+ return result;
538
+ }
539
+ }
540
+ function matchLinearOrientation() {
541
+ var sideOrCorner = matchSideOrCorner();
542
+ if (sideOrCorner) {
543
+ return sideOrCorner;
544
+ }
545
+ var legacyDirection = match("position-keyword", tokens.positionKeywords, 1);
546
+ if (legacyDirection) {
547
+ return {
548
+ type: "directional",
549
+ value: legacyDirection.value
550
+ };
551
+ }
552
+ return matchAngle();
553
+ }
554
+ function matchSideOrCorner() {
555
+ return match("directional", tokens.sideOrCorner, 1);
556
+ }
557
+ function matchAngle() {
558
+ return match("angular", tokens.angleValue, 1) || match("angular", tokens.radianValue, 1);
559
+ }
560
+ function matchListRadialOrientations() {
561
+ var radialOrientations, radialOrientation = matchRadialOrientation(), lookaheadCache;
562
+ if (radialOrientation) {
563
+ radialOrientations = [];
564
+ radialOrientations.push(radialOrientation);
565
+ lookaheadCache = input;
566
+ if (scan(tokens.comma)) {
567
+ radialOrientation = matchRadialOrientation();
568
+ if (radialOrientation) {
569
+ radialOrientations.push(radialOrientation);
570
+ } else {
571
+ input = lookaheadCache;
572
+ }
573
+ }
574
+ }
575
+ return radialOrientations;
576
+ }
577
+ function matchRadialOrientation() {
578
+ var radialType = matchCircle() || matchEllipse();
579
+ if (radialType) {
580
+ radialType.at = matchAtPosition();
581
+ } else {
582
+ var extent = matchExtentKeyword();
583
+ if (extent) {
584
+ radialType = extent;
585
+ var positionAt = matchAtPosition();
586
+ if (positionAt) {
587
+ radialType.at = positionAt;
588
+ }
589
+ } else {
590
+ var atPosition = matchAtPosition();
591
+ if (atPosition) {
592
+ radialType = {
593
+ type: "default-radial",
594
+ at: atPosition
595
+ };
596
+ } else {
597
+ var defaultPosition = matchPositioning();
598
+ if (defaultPosition) {
599
+ radialType = {
600
+ type: "default-radial",
601
+ at: defaultPosition
602
+ };
603
+ }
604
+ }
605
+ }
606
+ }
607
+ return radialType;
608
+ }
609
+ function matchCircle() {
610
+ var circle = match("shape", /^(circle)/i, 0);
611
+ if (circle) {
612
+ circle.style = matchLength() || matchExtentKeyword();
613
+ }
614
+ return circle;
615
+ }
616
+ function matchEllipse() {
617
+ var ellipse = match("shape", /^(ellipse)/i, 0);
618
+ if (ellipse) {
619
+ ellipse.style = matchPositioning() || matchDistance() || matchExtentKeyword();
620
+ }
621
+ return ellipse;
622
+ }
623
+ function matchExtentKeyword() {
624
+ return match("extent-keyword", tokens.extentKeywords, 1);
625
+ }
626
+ function matchAtPosition() {
627
+ if (match("position", /^at/, 0)) {
628
+ var positioning = matchPositioning();
629
+ if (!positioning) {
630
+ error("Missing positioning value");
631
+ }
632
+ return positioning;
633
+ }
634
+ }
635
+ function matchPositioning() {
636
+ var location = matchCoordinates();
637
+ if (location.x || location.y) {
638
+ return {
639
+ type: "position",
640
+ value: location
641
+ };
642
+ }
643
+ }
644
+ function matchCoordinates() {
645
+ return {
646
+ x: matchDistance(),
647
+ y: matchDistance()
648
+ };
649
+ }
650
+ function matchListing(matcher) {
651
+ var captures = matcher(), result = [];
652
+ if (captures) {
653
+ result.push(captures);
654
+ while (scan(tokens.comma)) {
655
+ captures = matcher();
656
+ if (captures) {
657
+ result.push(captures);
658
+ } else {
659
+ error("One extra comma");
660
+ }
661
+ }
662
+ }
663
+ return result;
664
+ }
665
+ function matchColorStop() {
666
+ var color = matchColor();
667
+ if (!color) {
668
+ error("Expected color definition");
669
+ }
670
+ color.length = matchDistance();
671
+ return color;
672
+ }
673
+ function matchColor() {
674
+ return matchHexColor() || matchHSLAColor() || matchHSLColor() || matchRGBAColor() || matchRGBColor() || matchVarColor() || matchLiteralColor();
675
+ }
676
+ function matchLiteralColor() {
677
+ return match("literal", tokens.literalColor, 0);
678
+ }
679
+ function matchHexColor() {
680
+ return match("hex", tokens.hexColor, 1);
681
+ }
682
+ function matchRGBColor() {
683
+ return matchCall(tokens.rgbColor, function() {
684
+ return {
685
+ type: "rgb",
686
+ value: matchListing(matchNumber)
687
+ };
688
+ });
689
+ }
690
+ function matchRGBAColor() {
691
+ return matchCall(tokens.rgbaColor, function() {
692
+ return {
693
+ type: "rgba",
694
+ value: matchListing(matchNumber)
695
+ };
696
+ });
697
+ }
698
+ function matchVarColor() {
699
+ return matchCall(tokens.varColor, function() {
700
+ return {
701
+ type: "var",
702
+ value: matchVariableName()
703
+ };
704
+ });
705
+ }
706
+ function matchHSLColor() {
707
+ return matchCall(tokens.hslColor, function() {
708
+ var lookahead = scan(tokens.percentageValue);
709
+ if (lookahead) {
710
+ error("HSL hue value must be a number in degrees (0-360) or normalized (-360 to 360), not a percentage");
711
+ }
712
+ var hue = matchNumber();
713
+ scan(tokens.comma);
714
+ var captures = scan(tokens.percentageValue);
715
+ var sat = captures ? captures[1] : null;
716
+ scan(tokens.comma);
717
+ captures = scan(tokens.percentageValue);
718
+ var light = captures ? captures[1] : null;
719
+ if (!sat || !light) {
720
+ error("Expected percentage value for saturation and lightness in HSL");
721
+ }
722
+ return {
723
+ type: "hsl",
724
+ value: [hue, sat, light]
725
+ };
726
+ });
727
+ }
728
+ function matchHSLAColor() {
729
+ return matchCall(tokens.hslaColor, function() {
730
+ var hue = matchNumber();
731
+ scan(tokens.comma);
732
+ var captures = scan(tokens.percentageValue);
733
+ var sat = captures ? captures[1] : null;
734
+ scan(tokens.comma);
735
+ captures = scan(tokens.percentageValue);
736
+ var light = captures ? captures[1] : null;
737
+ scan(tokens.comma);
738
+ var alpha = matchNumber();
739
+ if (!sat || !light) {
740
+ error("Expected percentage value for saturation and lightness in HSLA");
741
+ }
742
+ return {
743
+ type: "hsla",
744
+ value: [hue, sat, light, alpha]
745
+ };
746
+ });
747
+ }
748
+ function matchVariableName() {
749
+ return scan(tokens.variableName)[1];
750
+ }
751
+ function matchNumber() {
752
+ return scan(tokens.number)[1];
753
+ }
754
+ function matchDistance() {
755
+ return match("%", tokens.percentageValue, 1) || matchPositionKeyword() || matchCalc() || matchLength();
756
+ }
757
+ function matchPositionKeyword() {
758
+ return match("position-keyword", tokens.positionKeywords, 1);
759
+ }
760
+ function matchCalc() {
761
+ return matchCall(tokens.calcValue, function() {
762
+ var openParenCount = 1;
763
+ var i = 0;
764
+ while (openParenCount > 0 && i < input.length) {
765
+ var char = input.charAt(i);
766
+ if (char === "(") {
767
+ openParenCount++;
768
+ } else if (char === ")") {
769
+ openParenCount--;
770
+ }
771
+ i++;
772
+ }
773
+ if (openParenCount > 0) {
774
+ error("Missing closing parenthesis in calc() expression");
775
+ }
776
+ var calcContent = input.substring(0, i - 1);
777
+ consume(i - 1);
778
+ return {
779
+ type: "calc",
780
+ value: calcContent
781
+ };
782
+ });
783
+ }
784
+ function matchLength() {
785
+ return match("px", tokens.pixelValue, 1) || match("em", tokens.emValue, 1);
786
+ }
787
+ function match(type, pattern, captureIndex) {
788
+ var captures = scan(pattern);
789
+ if (captures) {
790
+ return {
791
+ type,
792
+ value: captures[captureIndex]
793
+ };
794
+ }
795
+ }
796
+ function scan(regexp) {
797
+ var captures, blankCaptures;
798
+ blankCaptures = /^[\n\r\t\s]+/.exec(input);
799
+ if (blankCaptures) {
800
+ consume(blankCaptures[0].length);
801
+ }
802
+ captures = regexp.exec(input);
803
+ if (captures) {
804
+ consume(captures[0].length);
805
+ }
806
+ return captures;
807
+ }
808
+ function consume(size) {
809
+ input = input.substr(size);
810
+ }
811
+ return function(code) {
812
+ input = code.toString().trim();
813
+ if (input.endsWith(";")) {
814
+ input = input.slice(0, -1);
815
+ }
816
+ return getAST();
817
+ };
818
+ })();
819
+ node.parse = GradientParser.parse;
820
+ node.stringify = GradientParser.stringify;
821
+ return node;
822
+ }
823
+ var nodeExports = requireNode();
229
824
  var _sfc_main = defineComponent({
230
825
  emits: ["update:modelValue", "cancel", "confirm", "color-update"],
231
- props: [].concat(props, ["modelValue", "visible", "alpha", "history", "predefine", "format", "enableHistory", "enablePredefineColor"]),
826
+ props: [].concat(props, ["modelValue", "visible", "alpha", "history", "predefine", "format", "enableHistory", "enablePredefineColor", "colorMode"]),
232
827
  components: {
233
828
  HueSelect,
234
829
  AlphaSelect,
235
830
  TinyButton: Button,
236
831
  TinyInput: Input,
237
- TinyCollapse: Collapse,
238
- TinyCollapseItem: CollapseItem,
239
832
  TinySelect: Select,
240
- TinyOption: Option
833
+ TinyOption: Option,
834
+ TinyNumeric: Numeric
241
835
  },
242
836
  directives: directive({
243
837
  Clickoutside
244
838
  }),
245
- setup: function setup4(props2, context) {
839
+ setup: function setup5(props2, context) {
246
840
  return setup({
247
841
  props: props2,
248
842
  context,
249
- renderless: renderless$3,
250
- api: api$3
843
+ renderless: renderless$4,
844
+ api: api$4,
845
+ extendOptions: {
846
+ parse: nodeExports.parse
847
+ }
251
848
  });
252
849
  }
253
850
  });
254
851
  var _hoisted_1 = {
255
- class: "tiny-color-select-panel__tools"
852
+ key: 1,
853
+ class: "tiny-color-select-panel__no-alpha"
256
854
  };
257
855
  var _hoisted_2 = {
258
- key: 0,
259
- class: "tiny-color-select-panel__tools__format-select"
856
+ class: "tiny-color-select-panel__tools"
260
857
  };
261
858
  var _hoisted_3 = {
262
- class: "tiny-color-select-panel__tools-btns"
859
+ key: 0,
860
+ class: "tiny-color-select-panel__tools__format-select"
263
861
  };
264
862
  var _hoisted_4 = {
863
+ class: "tiny-color-select-panel__tools-style"
864
+ };
865
+ var _hoisted_5 = {
265
866
  key: 0,
266
- class: "tiny-color-select-panel__history"
867
+ class: "tiny-color-select-panel__tools-hex"
267
868
  };
268
- var _hoisted_5 = ["onClick"];
269
869
  var _hoisted_6 = {
270
- key: 1
870
+ key: 0,
871
+ class: "tiny-color-select-panel__tools-deg"
271
872
  };
272
873
  var _hoisted_7 = {
874
+ key: 1,
875
+ class: "tiny-color-select-panel__tools-hex"
876
+ };
877
+ var _hoisted_8 = {
878
+ key: 2
879
+ };
880
+ var _hoisted_9 = {
273
881
  key: 0,
882
+ class: "tiny-color-select-panel__history"
883
+ };
884
+ var _hoisted_10 = ["onClick"];
885
+ var _hoisted_11 = {
886
+ key: 3,
887
+ class: "tiny-color-select-panel__predefine-title"
888
+ };
889
+ var _hoisted_12 = {
890
+ key: 4,
274
891
  class: "tiny-color-select-panel__predefine"
275
892
  };
276
- var _hoisted_8 = ["onClick"];
277
- var _hoisted_9 = {
278
- key: 1
893
+ var _hoisted_13 = ["onClick"];
894
+ var _hoisted_14 = {
895
+ class: "tiny-color-select-panel__tools-btns"
279
896
  };
280
897
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
281
898
  var _component_hue_select = resolveComponent("hue-select");
@@ -283,14 +900,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
283
900
  var _component_tiny_option = resolveComponent("tiny-option");
284
901
  var _component_tiny_select = resolveComponent("tiny-select");
285
902
  var _component_tiny_input = resolveComponent("tiny-input");
903
+ var _component_tiny_numeric = resolveComponent("tiny-numeric");
286
904
  var _component_tiny_button = resolveComponent("tiny-button");
287
- var _component_tiny_collapse_item = resolveComponent("tiny-collapse-item");
288
- var _component_tiny_collapse = resolveComponent("tiny-collapse");
289
905
  var _directive_clickoutside = resolveDirective("clickoutside");
290
906
  return _ctx.state.showPicker ? withDirectives((openBlock(), createElementBlock("div", {
291
907
  key: 0,
292
908
  class: "tiny-color-select-panel",
293
- onClick: _cache[2] || (_cache[2] = withModifiers(function() {
909
+ onClick: _cache[7] || (_cache[7] = withModifiers(function() {
294
910
  }, ["stop"]))
295
911
  }, [createVNode(_component_hue_select, {
296
912
  color: _ctx.state.color,
@@ -300,7 +916,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
300
916
  key: 0,
301
917
  color: _ctx.state.color,
302
918
  onReady: _ctx.onAlphaReady
303
- }, null, 8, ["color", "onReady"])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_1, [_ctx.state.formats.length ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_component_tiny_select, {
919
+ }, null, 8, ["color", "onReady"])) : createCommentVNode("v-if", true), !_ctx.alpha ? (openBlock(), createElementBlock("div", _hoisted_1)) : createCommentVNode("v-if", true), createElementVNode(
920
+ "div",
921
+ {
922
+ class: "tiny-color-select-panel__display",
923
+ style: normalizeStyle({
924
+ background: _ctx.state.isLinearGradient ? _ctx.state.linearGradient : _ctx.state.color.value
925
+ })
926
+ },
927
+ null,
928
+ 4
929
+ /* STYLE */
930
+ ), createElementVNode("div", _hoisted_2, [_ctx.state.formats.length ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(_component_tiny_select, {
304
931
  modelValue: _ctx.state.currentFormat,
305
932
  "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
306
933
  return _ctx.state.currentFormat = $event;
@@ -324,28 +951,86 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
324
951
  }),
325
952
  _: 1
326
953
  /* STABLE */
327
- }, 8, ["modelValue"])])) : createCommentVNode("v-if", true), createVNode(_component_tiny_input, {
954
+ }, 8, ["modelValue"])])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_4, [_ctx.state.currentFormat === "hex" || _ctx.state.currentFormat === "css" || !_ctx.state.currentFormat ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(_component_tiny_input, {
955
+ class: "tiny-color-select-panel__tools-hex1",
328
956
  modelValue: _ctx.state.input,
329
957
  "onUpdate:modelValue": _cache[1] || (_cache[1] = function($event) {
330
958
  return _ctx.state.input = $event;
959
+ })
960
+ }, null, 8, ["modelValue"]), _ctx.state.isLinearGradient ? (openBlock(), createElementBlock("div", _hoisted_6, [createVNode(_component_tiny_numeric, {
961
+ modelValue: _ctx.state.ctx.deg,
962
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = function($event) {
963
+ return _ctx.state.ctx.deg = $event;
331
964
  }),
332
- size: "small"
333
- }, null, 8, ["modelValue"]), createElementVNode("div", _hoisted_3, [createVNode(_component_tiny_button, {
334
- size: "small",
335
- onClick: _ctx.onCancel
336
- }, {
337
- default: withCtx(function() {
338
- return [createTextVNode(
339
- toDisplayString(_ctx.t("ui.colorSelectPanel.cancel")),
340
- 1
341
- /* TEXT */
342
- )];
965
+ unit: "deg",
966
+ "mouse-wheel": ""
967
+ }, null, 8, ["modelValue"])])) : createCommentVNode("v-if", true)])) : (openBlock(), createElementBlock("div", _hoisted_7, [createVNode(_component_tiny_input, {
968
+ class: "tiny-color-select-panel__tools-hex4",
969
+ modelValue: _ctx.state.hexInput4,
970
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = function($event) {
971
+ return _ctx.state.hexInput4 = $event;
972
+ })
973
+ }, null, 8, ["modelValue"]), createVNode(_component_tiny_input, {
974
+ class: "tiny-color-select-panel__tools-hex5",
975
+ modelValue: _ctx.state.hexInput5,
976
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = function($event) {
977
+ return _ctx.state.hexInput5 = $event;
978
+ })
979
+ }, null, 8, ["modelValue"]), createVNode(_component_tiny_input, {
980
+ class: "tiny-color-select-panel__tools-hex6",
981
+ modelValue: _ctx.state.hexInput6,
982
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = function($event) {
983
+ return _ctx.state.hexInput6 = $event;
984
+ })
985
+ }, null, 8, ["modelValue"]), createVNode(_component_tiny_input, {
986
+ class: "tiny-color-select-panel__tools-hex7",
987
+ modelValue: _ctx.state.hexInput7,
988
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = function($event) {
989
+ return _ctx.state.hexInput7 = $event;
990
+ })
991
+ }, null, 8, ["modelValue"])]))])]), _ctx.state.enableHistory ? (openBlock(), createElementBlock("div", _hoisted_8, [_ctx.state.enableHistory && _ctx.state.stack.length ? (openBlock(), createElementBlock("div", _hoisted_9, [(openBlock(true), createElementBlock(
992
+ Fragment,
993
+ null,
994
+ renderList(_ctx.state.stack, function(color, key) {
995
+ return openBlock(), createElementBlock("div", {
996
+ class: "tiny-color-select-panel__history__color-block",
997
+ key,
998
+ style: normalizeStyle({
999
+ background: color
1000
+ }),
1001
+ onClick: function onClick() {
1002
+ return _ctx.onHistoryClick(color);
1003
+ }
1004
+ }, null, 12, _hoisted_10);
343
1005
  }),
344
- _: 1
345
- /* STABLE */
346
- }, 8, ["onClick"]), createVNode(_component_tiny_button, {
347
- type: "primary",
1006
+ 128
1007
+ /* KEYED_FRAGMENT */
1008
+ ))])) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true), _ctx.state.enablePredefineColor ? (openBlock(), createElementBlock(
1009
+ "div",
1010
+ _hoisted_11,
1011
+ toDisplayString(_ctx.t("ui.colorSelectPanel.predefine")),
1012
+ 1
1013
+ /* TEXT */
1014
+ )) : createCommentVNode("v-if", true), _ctx.state.enablePredefineColor && _ctx.state.predefineStack.length ? (openBlock(), createElementBlock("div", _hoisted_12, [(openBlock(true), createElementBlock(
1015
+ Fragment,
1016
+ null,
1017
+ renderList(_ctx.state.predefineStack, function(color, key) {
1018
+ return openBlock(), createElementBlock("div", {
1019
+ class: "tiny-color-select-panel__predefine__color-block",
1020
+ key,
1021
+ style: normalizeStyle({
1022
+ background: color
1023
+ }),
1024
+ onClick: function onClick() {
1025
+ return _ctx.onPredefineColorClick(color);
1026
+ }
1027
+ }, null, 12, _hoisted_13);
1028
+ }),
1029
+ 128
1030
+ /* KEYED_FRAGMENT */
1031
+ ))])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_14, [createVNode(_component_tiny_button, {
348
1032
  size: "small",
1033
+ type: "primary",
349
1034
  onClick: _ctx.onConfirm
350
1035
  }, {
351
1036
  default: withCtx(function() {
@@ -357,79 +1042,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
357
1042
  }),
358
1043
  _: 1
359
1044
  /* STABLE */
360
- }, 8, ["onClick"])])]), createVNode(_component_tiny_collapse, null, {
361
- default: withCtx(function() {
362
- return [_ctx.state.enableHistory ? (openBlock(), createBlock(_component_tiny_collapse_item, {
363
- key: 0,
364
- title: _ctx.t("ui.colorSelectPanel.history"),
365
- name: "history"
366
- }, {
367
- default: withCtx(function() {
368
- return [_ctx.state.stack.length ? (openBlock(), createElementBlock("div", _hoisted_4, [(openBlock(true), createElementBlock(
369
- Fragment,
370
- null,
371
- renderList(_ctx.state.stack, function(color, key) {
372
- return openBlock(), createElementBlock("div", {
373
- class: "tiny-color-select-panel__history__color-block",
374
- key,
375
- style: normalizeStyle({
376
- background: color
377
- }),
378
- onClick: function onClick() {
379
- return _ctx.onHistoryClick(color);
380
- }
381
- }, null, 12, _hoisted_5);
382
- }),
383
- 128
384
- /* KEYED_FRAGMENT */
385
- ))])) : createCommentVNode("v-if", true), !_ctx.state.stack.length ? (openBlock(), createElementBlock(
386
- "div",
387
- _hoisted_6,
388
- toDisplayString(_ctx.t("ui.colorSelectPanel.empty")),
389
- 1
390
- /* TEXT */
391
- )) : createCommentVNode("v-if", true)];
392
- }),
393
- _: 1
394
- /* STABLE */
395
- }, 8, ["title"])) : createCommentVNode("v-if", true), _ctx.state.enablePredefineColor ? (openBlock(), createBlock(_component_tiny_collapse_item, {
396
- key: 1,
397
- title: _ctx.t("ui.colorSelectPanel.predefine"),
398
- name: "predefine"
399
- }, {
400
- default: withCtx(function() {
401
- return [_ctx.state.predefineStack.length ? (openBlock(), createElementBlock("div", _hoisted_7, [(openBlock(true), createElementBlock(
402
- Fragment,
403
- null,
404
- renderList(_ctx.state.predefineStack, function(color, key) {
405
- return openBlock(), createElementBlock("div", {
406
- class: "tiny-color-select-panel__predefine__color-block",
407
- key,
408
- style: normalizeStyle({
409
- background: color
410
- }),
411
- onClick: function onClick() {
412
- return _ctx.onPredefineColorClick(color);
413
- }
414
- }, null, 12, _hoisted_8);
415
- }),
416
- 128
417
- /* KEYED_FRAGMENT */
418
- ))])) : createCommentVNode("v-if", true), !_ctx.state.predefineStack.length ? (openBlock(), createElementBlock(
419
- "div",
420
- _hoisted_9,
421
- toDisplayString(_ctx.t("ui.colorSelectPanel.empty")),
422
- 1
423
- /* TEXT */
424
- )) : createCommentVNode("v-if", true)];
425
- }),
426
- _: 1
427
- /* STABLE */
428
- }, 8, ["title"])) : createCommentVNode("v-if", true)];
429
- }),
430
- _: 1
431
- /* STABLE */
432
- })])), [[_directive_clickoutside, _ctx.onClickOutside]]) : createCommentVNode("v-if", true);
1045
+ }, 8, ["onClick"]), createVNode(_component_tiny_button, {
1046
+ type: "text",
1047
+ text: _ctx.t("ui.colorSelectPanel.cancel"),
1048
+ size: "small",
1049
+ onClick: _ctx.onCancel
1050
+ }, null, 8, ["text", "onClick"])])])), [[_directive_clickoutside, _ctx.onClickOutside]]) : createCommentVNode("v-if", true);
433
1051
  }
434
1052
  var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
435
1053
 
package/package.json CHANGED
@@ -1,23 +1,25 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-color-select-panel",
3
3
  "type": "module",
4
- "version": "3.25.0",
4
+ "version": "3.27.0",
5
5
  "description": "",
6
6
  "license": "MIT",
7
7
  "sideEffects": false,
8
8
  "main": "./lib/index.js",
9
9
  "module": "./lib/index.js",
10
10
  "dependencies": {
11
- "@opentinyvue/vue-button": "~3.25.0",
12
- "@opentinyvue/vue-collapse": "~3.25.0",
13
- "@opentinyvue/vue-collapse-item": "~3.25.0",
14
- "@opentinyvue/vue-common": "~3.25.0",
15
- "@opentinyvue/vue-directive": "~3.25.0",
16
- "@opentinyvue/vue-input": "~3.25.0",
17
- "@opentinyvue/vue-option": "~3.25.0",
18
- "@opentinyvue/vue-renderless": "~3.25.0",
19
- "@opentinyvue/vue-select": "~3.25.0",
20
- "@opentinyvue/vue-theme": "~3.25.0"
11
+ "@opentinyvue/vue-button": "~3.27.0",
12
+ "@opentinyvue/vue-collapse": "~3.27.0",
13
+ "@opentinyvue/vue-collapse-item": "~3.27.0",
14
+ "@opentinyvue/vue-common": "~3.27.0",
15
+ "@opentinyvue/vue-directive": "~3.27.0",
16
+ "@opentinyvue/vue-input": "~3.27.0",
17
+ "@opentinyvue/vue-numeric": "~3.27.0",
18
+ "@opentinyvue/vue-option": "~3.27.0",
19
+ "@opentinyvue/vue-renderless": "~3.27.0",
20
+ "@opentinyvue/vue-select": "~3.27.0",
21
+ "@opentinyvue/vue-theme": "~3.27.0",
22
+ "gradient-parser": "^1.1.1"
21
23
  },
22
24
  "types": "index.d.ts"
23
25
  }
@@ -0,0 +1,17 @@
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<import("@vue/runtime-core").ComponentPropsOptions<{
2
+ [x: string]: unknown;
3
+ }>>, {
4
+ t: (this: any, path: any, options?: any) => any;
5
+ vm: any;
6
+ f: (props: any, attrs?: {}) => {};
7
+ a: (attrs: any, filters: any, include: any) => {};
8
+ d: (props: any) => void;
9
+ dp: (props: any) => void;
10
+ gcls: (key: any) => any;
11
+ m: (...cssClasses: any[]) => string;
12
+ }, any, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, readonly string[] | Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<import("@vue/runtime-core").ComponentObjectPropsOptions<{
13
+ [x: string]: unknown;
14
+ }>>>>, {
15
+ readonly [x: number]: string;
16
+ } | {}, {}>;
17
+ export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -15,6 +15,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
15
15
  history?: any;
16
16
  enableHistory?: any;
17
17
  enablePredefineColor?: any;
18
+ colorMode?: any;
18
19
  }>, {
19
20
  t: (this: any, path: any, options?: any) => any;
20
21
  vm: any;
@@ -41,6 +42,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
41
42
  history?: any;
42
43
  enableHistory?: any;
43
44
  enablePredefineColor?: any;
45
+ colorMode?: any;
44
46
  }>>> & {
45
47
  onCancel?: ((...args: any[]) => any) | undefined;
46
48
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -63,5 +65,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
63
65
  readonly history?: any;
64
66
  readonly enableHistory?: any;
65
67
  readonly enablePredefineColor?: any;
68
+ readonly colorMode?: any;
66
69
  }, {}>;
67
70
  export default _default;