@rockshin/tao-ui 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/affix/affix.js +20 -16
- package/dist/components/alert/alert.js +114 -99
- package/dist/components/app/app-modals.js +134 -96
- package/dist/components/app/app-notices.js +39 -23
- package/dist/components/auto-complete/auto-complete.js +21 -7
- package/dist/components/avatar/avatar.js +31 -11
- package/dist/components/badge/badge.css +1 -1
- package/dist/components/badge/badge.js +72 -257
- package/dist/components/border-beam/border-beam.js +21 -17
- package/dist/components/breadcrumb/breadcrumb.js +178 -159
- package/dist/components/button/button.js +61 -53
- package/dist/components/calendar/calendar.js +6 -4
- package/dist/components/card/card.js +24 -8
- package/dist/components/carousel/carousel.d.ts +1 -1
- package/dist/components/carousel/carousel.js +105 -68
- package/dist/components/cascader/cascader.js +54 -19
- package/dist/components/checkbox/checkbox.css +13 -2
- package/dist/components/checkbox/checkbox.d.ts +2 -0
- package/dist/components/checkbox/checkbox.js +320 -229
- package/dist/components/collapse/collapse-panels.d.ts +1 -1
- package/dist/components/collapse/collapse-panels.js +122 -113
- package/dist/components/collapse/collapse.js +98 -63
- package/dist/components/color-picker/color-picker.js +539 -441
- package/dist/components/color-picker/color.js +1 -1
- package/dist/components/context-menu/context-menu.d.ts +1 -1
- package/dist/components/context-menu/context-menu.js +108 -68
- package/dist/components/date-picker/calendar/calendar-grid.js +42 -39
- package/dist/components/date-picker/calendar/month-grid.d.ts +8 -1
- package/dist/components/date-picker/calendar/month-grid.js +79 -37
- package/dist/components/date-picker/calendar/time-panel.d.ts +2 -1
- package/dist/components/date-picker/calendar/time-panel.js +94 -89
- package/dist/components/date-picker/calendar/year-grid.d.ts +8 -1
- package/dist/components/date-picker/calendar/year-grid.js +66 -35
- package/dist/components/date-picker/date-picker.css +24 -1
- package/dist/components/date-picker/date-picker.js +99 -53
- package/dist/components/date-picker/presets.d.ts +2 -1
- package/dist/components/date-picker/presets.js +27 -24
- package/dist/components/date-picker/range-picker.js +308 -153
- package/dist/components/descriptions/descriptions.js +7 -3
- package/dist/components/divider/divider.css +1 -1
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/drawer/drawer.js +201 -369
- package/dist/components/dropdown/dropdown.d.ts +1 -1
- package/dist/components/dropdown/dropdown.js +183 -279
- package/dist/components/empty/empty.js +57 -78
- package/dist/components/float-button/float-button.d.ts +1 -0
- package/dist/components/float-button/float-button.js +47 -30
- package/dist/components/form/field-control.d.ts +4 -2
- package/dist/components/form/field-control.js +17 -9
- package/dist/components/form/form-context.d.ts +8 -2
- package/dist/components/form/form-context.js +2 -1
- package/dist/components/form/form-item.js +85 -63
- package/dist/components/form/use-form.d.ts +2 -1
- package/dist/components/form/use-form.js +2 -1
- package/dist/components/form-field/form-field-view.d.ts +3 -1
- package/dist/components/form-field/form-field-view.js +194 -141
- package/dist/components/form-section/form-section.d.ts +1 -1
- package/dist/components/form-section/form-section.js +52 -45
- package/dist/components/image/image.js +585 -477
- package/dist/components/input/base-input.js +8 -9
- package/dist/components/input/input-shared.d.ts +5 -2
- package/dist/components/input/input-shared.js +42 -18
- package/dist/components/input/otp.js +236 -217
- package/dist/components/input/password.js +2 -1
- package/dist/components/input/search.js +8 -7
- package/dist/components/list/list-pagination.js +41 -36
- package/dist/components/list/list.js +141 -125
- package/dist/components/listy/listy.js +175 -106
- package/dist/components/masonry/masonry.js +108 -85
- package/dist/components/mentions/mentions.js +12 -3
- package/dist/components/menu/menu-render.d.ts +9 -3
- package/dist/components/menu/menu-render.js +99 -36
- package/dist/components/modal/confirm-dialog.js +10 -4
- package/dist/components/modal/confirm.js +3 -7
- package/dist/components/modal/index.js +9 -3
- package/dist/components/modal/modal.js +390 -365
- package/dist/components/pagination/pagination.js +105 -96
- package/dist/components/popconfirm/popconfirm.d.ts +1 -1
- package/dist/components/popconfirm/popconfirm.js +219 -168
- package/dist/components/popover/popover.js +330 -243
- package/dist/components/progress/progress.css +2 -2
- package/dist/components/progress/progress.js +232 -458
- package/dist/components/qr-code/qr-code.js +72 -66
- package/dist/components/radio/radio.css +15 -4
- package/dist/components/radio/radio.d.ts +2 -1
- package/dist/components/radio/radio.js +260 -198
- package/dist/components/rate/rate.js +173 -113
- package/dist/components/scroll-area/scroll-area.js +241 -211
- package/dist/components/segmented/segmented.js +73 -41
- package/dist/components/select/mobile-select.d.ts +2 -1
- package/dist/components/select/mobile-select.js +24 -13
- package/dist/components/select/select-searchable-list.d.ts +2 -1
- package/dist/components/select/select-searchable-list.js +2 -3
- package/dist/components/select/select.js +49 -25
- package/dist/components/select/use-select-selection.d.ts +1 -1
- package/dist/components/select/use-select-selection.js +7 -4
- package/dist/components/skeleton/skeleton.js +56 -48
- package/dist/components/slider/slider.js +87 -212
- package/dist/components/sonner/sonner.js +109 -93
- package/dist/components/spinner/spinner.js +147 -138
- package/dist/components/splitter/splitter.js +222 -159
- package/dist/components/statistic/statistic.js +7 -6
- package/dist/components/steps/steps.js +88 -81
- package/dist/components/steps/use-display-steps.js +1 -1
- package/dist/components/switch/switch.js +89 -89
- package/dist/components/table/table-filter.js +66 -56
- package/dist/components/table/table-icons.d.ts +2 -1
- package/dist/components/table/table-icons.js +11 -9
- package/dist/components/table/table-model.js +1 -1
- package/dist/components/table/table.js +107 -83
- package/dist/components/table/use-table-data.d.ts +6 -3
- package/dist/components/table/use-table-data.js +166 -130
- package/dist/components/tabs/tabs.css +1 -1
- package/dist/components/tabs/tabs.js +236 -179
- package/dist/components/tag/tag.d.ts +2 -2
- package/dist/components/tag/tag.js +111 -108
- package/dist/components/textarea/textarea.js +22 -17
- package/dist/components/time-picker/time-picker.js +5 -3
- package/dist/components/timeline/timeline.css +6 -1
- package/dist/components/timeline/timeline.js +21 -11
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/components/tooltip/tooltip.js +123 -233
- package/dist/components/tour/tour.css +4 -0
- package/dist/components/tour/tour.js +400 -331
- package/dist/components/transfer/transfer-list.js +29 -11
- package/dist/components/transfer/transfer-parts.js +1 -1
- package/dist/components/transfer/transfer-types.d.ts +1 -0
- package/dist/components/transfer/transfer.js +29 -14
- package/dist/components/tree/tree-keyboard.d.ts +1 -1
- package/dist/components/tree/tree-keyboard.js +5 -3
- package/dist/components/tree/tree.js +74 -59
- package/dist/components/tree-select/select-engine.d.ts +3 -2
- package/dist/components/tree-select/select-engine.js +18 -16
- package/dist/components/tree-select/tree-select.js +21 -5
- package/dist/components/upload/upload.css +8 -0
- package/dist/components/upload/upload.js +160 -72
- package/dist/components/watermark/watermark.js +36 -29
- package/dist/number-input/use-number-input.js +129 -90
- package/dist/number-input/validate.js +32 -5
- package/dist/provider/merge-locale.js +12 -9
- package/dist/provider/tao-provider.d.ts +3 -1
- package/dist/provider/tao-provider.js +123 -86
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import color_picker, { Color } from "@rc-component/color-picker";
|
|
4
|
-
import { createContext, isValidElement, useContext, useEffect, useId, useRef, useState } from "react";
|
|
4
|
+
import { cloneElement, createContext, forwardRef, isValidElement, useContext, useEffect, useId, useRef, useState } from "react";
|
|
5
5
|
import { TaoPortalScope, useTaoConfig } from "../../provider/tao-provider.js";
|
|
6
6
|
import { cx } from "../../utils/semantic.js";
|
|
7
7
|
import { Button } from "../button/button.js";
|
|
@@ -38,6 +38,7 @@ function PickerPanel() {
|
|
|
38
38
|
const selected = "gradient" === mode ? stops[activeIndex].color : value;
|
|
39
39
|
const hex = selected.toHexString();
|
|
40
40
|
const [draft, setDraft] = useState(hex);
|
|
41
|
+
const pendingStopColor = useRef(null);
|
|
41
42
|
let t1;
|
|
42
43
|
if ($[0] !== hex) {
|
|
43
44
|
t1 = [
|
|
@@ -181,7 +182,10 @@ function PickerPanel() {
|
|
|
181
182
|
"aria-invalid": !/^#?(?:[\da-f]{3}|[\da-f]{4}|[\da-f]{6}|[\da-f]{8})$/i.test(draft),
|
|
182
183
|
onChange: (event_0)=>{
|
|
183
184
|
setDraft(event_0.target.value);
|
|
184
|
-
if (/^#?(?:[\da-f]{
|
|
185
|
+
if (/^#?(?:[\da-f]{6}|[\da-f]{8})$/i.test(event_0.target.value)) changeSelected(new external_color_js_Color(`#${event_0.target.value.replace(/^#/, "")}`));
|
|
186
|
+
},
|
|
187
|
+
onBlur: (event_1)=>{
|
|
188
|
+
if (/^#?(?:[\da-f]{3}|[\da-f]{4})$/i.test(event_1.target.value)) changeSelected(new external_color_js_Color(`#${event_1.target.value.replace(/^#/, "")}`));
|
|
185
189
|
}
|
|
186
190
|
}) : "rgb" === format ? /*#__PURE__*/ jsxs(Fragment, {
|
|
187
191
|
children: [
|
|
@@ -215,7 +219,7 @@ function PickerPanel() {
|
|
|
215
219
|
]
|
|
216
220
|
});
|
|
217
221
|
const t15 = !props.disabledAlpha && numberInput("alpha", messages.colorAlpha, Math.round(100 * rgb.a), 100, (alpha)=>changeSelected(new external_color_js_Color({
|
|
218
|
-
...
|
|
222
|
+
...hsb,
|
|
219
223
|
a: alpha / 100
|
|
220
224
|
})));
|
|
221
225
|
let t16;
|
|
@@ -327,9 +331,15 @@ function PickerPanel() {
|
|
|
327
331
|
};
|
|
328
332
|
const next_2 = stops.map((stop_1, index_2)=>index_2 === activeIndex ? moved : stop_1).sort(_temp2);
|
|
329
333
|
panel.setActive(next_2.indexOf(moved));
|
|
330
|
-
|
|
334
|
+
const color = new external_color_js_Color(next_2);
|
|
335
|
+
pendingStopColor.current = color;
|
|
336
|
+
panel.change(color, false);
|
|
331
337
|
},
|
|
332
|
-
onChangeComplete: ()=>
|
|
338
|
+
onChangeComplete: ()=>{
|
|
339
|
+
const color_0 = pendingStopColor.current ?? value;
|
|
340
|
+
pendingStopColor.current = null;
|
|
341
|
+
panel.complete(color_0);
|
|
342
|
+
}
|
|
333
343
|
}),
|
|
334
344
|
/*#__PURE__*/ jsxs("span", {
|
|
335
345
|
children: [
|
|
@@ -343,10 +353,10 @@ function PickerPanel() {
|
|
|
343
353
|
}),
|
|
344
354
|
/*#__PURE__*/ jsx(RcColorPickerComponent, {
|
|
345
355
|
prefixCls: prefix,
|
|
346
|
-
value: new Color(selected.
|
|
356
|
+
value: new Color(selected.toHsb()),
|
|
347
357
|
disabledAlpha: props.disabledAlpha,
|
|
348
|
-
onChange: (next_3)=>changeSelected(new external_color_js_Color(next_3.
|
|
349
|
-
onChangeComplete: (next_4)=>panel.complete(replace(new external_color_js_Color(next_4.
|
|
358
|
+
onChange: (next_3)=>changeSelected(new external_color_js_Color(next_3.toHsb()), false),
|
|
359
|
+
onChangeComplete: (next_4)=>panel.complete(replace(new external_color_js_Color(next_4.toHsb())))
|
|
350
360
|
}),
|
|
351
361
|
t16,
|
|
352
362
|
t17
|
|
@@ -429,16 +439,32 @@ function opaque(value) {
|
|
|
429
439
|
return value.isGradient() ? new external_color_js_Color(value.getColors().map((stop)=>({
|
|
430
440
|
...stop,
|
|
431
441
|
color: new external_color_js_Color({
|
|
432
|
-
...stop.color.
|
|
442
|
+
...stop.color.toHsb(),
|
|
433
443
|
a: 1
|
|
434
444
|
})
|
|
435
445
|
}))) : new external_color_js_Color({
|
|
436
|
-
...value.
|
|
446
|
+
...value.toHsb(),
|
|
437
447
|
a: 1
|
|
438
448
|
});
|
|
439
449
|
}
|
|
450
|
+
const color_picker_PickerSurface = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
451
|
+
const $ = c(3);
|
|
452
|
+
const hidden = props["data-tao-keep-alive"] && "closed" === props["data-state"];
|
|
453
|
+
const t0 = hidden ? null : ref;
|
|
454
|
+
let t1;
|
|
455
|
+
if ($[0] !== props || $[1] !== t0) {
|
|
456
|
+
t1 = /*#__PURE__*/ jsx("div", {
|
|
457
|
+
...props,
|
|
458
|
+
ref: t0
|
|
459
|
+
});
|
|
460
|
+
$[0] = props;
|
|
461
|
+
$[1] = t0;
|
|
462
|
+
$[2] = t1;
|
|
463
|
+
} else t1 = $[2];
|
|
464
|
+
return t1;
|
|
465
|
+
});
|
|
440
466
|
function ColorPicker(props) {
|
|
441
|
-
const $ = c(
|
|
467
|
+
const $ = c(182);
|
|
442
468
|
const config = useTaoConfig();
|
|
443
469
|
let t0;
|
|
444
470
|
if ($[0] !== props.defaultValue) {
|
|
@@ -451,58 +477,49 @@ function ColorPicker(props) {
|
|
|
451
477
|
const [innerFormat, setFormat] = useState(props.defaultFormat ?? "hex");
|
|
452
478
|
const [active, setActive] = useState(0);
|
|
453
479
|
const [triggerElement, setTriggerElement] = useState(null);
|
|
480
|
+
const controlled = "value" in props;
|
|
454
481
|
let t1;
|
|
455
|
-
if ($[2] !==
|
|
456
|
-
t1 = ()=>new external_color_js_Color(props.value
|
|
457
|
-
$[2] =
|
|
458
|
-
$[3] =
|
|
459
|
-
$[4] = props.
|
|
460
|
-
$[5] =
|
|
461
|
-
|
|
482
|
+
if ($[2] !== controlled || $[3] !== innerValue || $[4] !== props.mode || $[5] !== props.value) {
|
|
483
|
+
t1 = ()=>(controlled ? new external_color_js_Color(props.value) : innerValue).isGradient() ? "gradient" : (Array.isArray(props.mode) ? props.mode[0] : props.mode) ?? "single";
|
|
484
|
+
$[2] = controlled;
|
|
485
|
+
$[3] = innerValue;
|
|
486
|
+
$[4] = props.mode;
|
|
487
|
+
$[5] = props.value;
|
|
488
|
+
$[6] = t1;
|
|
489
|
+
} else t1 = $[6];
|
|
462
490
|
const [innerMode, setMode] = useState(t1);
|
|
463
491
|
const cachedGradient = useRef(null);
|
|
464
492
|
const hoverTimer = useRef(void 0);
|
|
493
|
+
const keyboardOpening = useRef(false);
|
|
465
494
|
let t2;
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
t2 = ()=>()=>clearTimeout(hoverTimer.current);
|
|
469
|
-
t3 = [];
|
|
470
|
-
$[6] = t2;
|
|
471
|
-
$[7] = t3;
|
|
472
|
-
} else {
|
|
473
|
-
t2 = $[6];
|
|
474
|
-
t3 = $[7];
|
|
475
|
-
}
|
|
476
|
-
useEffect(t2, t3);
|
|
477
|
-
let t4;
|
|
478
|
-
if ($[8] !== props.mode) {
|
|
479
|
-
t4 = props.mode ? Array.isArray(props.mode) ? props.mode : [
|
|
495
|
+
if ($[7] !== props.mode) {
|
|
496
|
+
t2 = props.mode ? Array.isArray(props.mode) ? props.mode : [
|
|
480
497
|
props.mode
|
|
481
498
|
] : [
|
|
482
499
|
"single"
|
|
483
500
|
];
|
|
484
|
-
$[
|
|
485
|
-
$[
|
|
486
|
-
} else
|
|
487
|
-
const configuredModes =
|
|
488
|
-
let
|
|
489
|
-
if ($[
|
|
490
|
-
|
|
501
|
+
$[7] = props.mode;
|
|
502
|
+
$[8] = t2;
|
|
503
|
+
} else t2 = $[8];
|
|
504
|
+
const configuredModes = t2;
|
|
505
|
+
let t3;
|
|
506
|
+
if ($[9] !== configuredModes) {
|
|
507
|
+
t3 = configuredModes.length ? configuredModes : [
|
|
491
508
|
"single"
|
|
492
509
|
];
|
|
493
|
-
$[
|
|
494
|
-
$[
|
|
495
|
-
} else
|
|
496
|
-
const modes =
|
|
497
|
-
let
|
|
498
|
-
if ($[
|
|
499
|
-
|
|
500
|
-
$[
|
|
501
|
-
$[
|
|
502
|
-
$[
|
|
503
|
-
} else
|
|
504
|
-
const mode =
|
|
505
|
-
const rawColor =
|
|
510
|
+
$[9] = configuredModes;
|
|
511
|
+
$[10] = t3;
|
|
512
|
+
} else t3 = $[10];
|
|
513
|
+
const modes = t3;
|
|
514
|
+
let t4;
|
|
515
|
+
if ($[11] !== innerMode || $[12] !== modes) {
|
|
516
|
+
t4 = modes.includes(innerMode) ? innerMode : modes[0];
|
|
517
|
+
$[11] = innerMode;
|
|
518
|
+
$[12] = modes;
|
|
519
|
+
$[13] = t4;
|
|
520
|
+
} else t4 = $[13];
|
|
521
|
+
const mode = t4;
|
|
522
|
+
const rawColor = controlled ? new external_color_js_Color(props.value) : innerValue;
|
|
506
523
|
const isGradient = rawColor.isGradient();
|
|
507
524
|
useEffect(()=>{
|
|
508
525
|
setMode(isGradient ? "gradient" : "single");
|
|
@@ -519,9 +536,9 @@ function ColorPicker(props) {
|
|
|
519
536
|
percent: 100
|
|
520
537
|
}
|
|
521
538
|
]);
|
|
522
|
-
let
|
|
523
|
-
if ($[
|
|
524
|
-
|
|
539
|
+
let t5;
|
|
540
|
+
if ($[14] !== mode || $[15] !== value) {
|
|
541
|
+
t5 = "gradient" === mode && value.cleared ? new external_color_js_Color([
|
|
525
542
|
{
|
|
526
543
|
color: "transparent",
|
|
527
544
|
percent: 0
|
|
@@ -531,110 +548,155 @@ function ColorPicker(props) {
|
|
|
531
548
|
percent: 100
|
|
532
549
|
}
|
|
533
550
|
]) : value;
|
|
534
|
-
$[
|
|
535
|
-
$[
|
|
536
|
-
$[
|
|
537
|
-
} else
|
|
538
|
-
const panelValue =
|
|
551
|
+
$[14] = mode;
|
|
552
|
+
$[15] = value;
|
|
553
|
+
$[16] = t5;
|
|
554
|
+
} else t5 = $[16];
|
|
555
|
+
const panelValue = t5;
|
|
539
556
|
const format = props.format ?? innerFormat;
|
|
540
557
|
const disabled = props.disabled ?? config.disabled;
|
|
541
558
|
const open = !disabled && (props.open ?? innerOpen);
|
|
559
|
+
let t6;
|
|
560
|
+
let t7;
|
|
561
|
+
if ($[17] !== disabled || $[18] !== props.open) {
|
|
562
|
+
t6 = ()=>{
|
|
563
|
+
if (disabled && void 0 === props.open) setOpen(false);
|
|
564
|
+
};
|
|
565
|
+
t7 = [
|
|
566
|
+
disabled,
|
|
567
|
+
props.open
|
|
568
|
+
];
|
|
569
|
+
$[17] = disabled;
|
|
570
|
+
$[18] = props.open;
|
|
571
|
+
$[19] = t6;
|
|
572
|
+
$[20] = t7;
|
|
573
|
+
} else {
|
|
574
|
+
t6 = $[19];
|
|
575
|
+
t7 = $[20];
|
|
576
|
+
}
|
|
577
|
+
useEffect(t6, t7);
|
|
578
|
+
const hoverEnabled = "hover" === props.trigger && open;
|
|
542
579
|
let t8;
|
|
543
|
-
|
|
544
|
-
|
|
580
|
+
let t9;
|
|
581
|
+
if ($[21] !== hoverEnabled) {
|
|
582
|
+
t8 = ()=>{
|
|
583
|
+
if (hoverEnabled) return ()=>clearTimeout(hoverTimer.current);
|
|
584
|
+
};
|
|
585
|
+
t9 = [
|
|
586
|
+
hoverEnabled
|
|
587
|
+
];
|
|
588
|
+
$[21] = hoverEnabled;
|
|
589
|
+
$[22] = t8;
|
|
590
|
+
$[23] = t9;
|
|
591
|
+
} else {
|
|
592
|
+
t8 = $[22];
|
|
593
|
+
t9 = $[23];
|
|
594
|
+
}
|
|
595
|
+
useEffect(t8, t9);
|
|
596
|
+
const keepAlive = !(props.destroyOnHidden || props.destroyTooltipOnHide);
|
|
597
|
+
let t10;
|
|
598
|
+
if ($[24] !== props) {
|
|
599
|
+
t10 = "function" == typeof props.classNames ? props.classNames({
|
|
545
600
|
props
|
|
546
601
|
}) : props.classNames;
|
|
547
|
-
$[
|
|
548
|
-
$[
|
|
549
|
-
} else
|
|
550
|
-
const names =
|
|
551
|
-
let
|
|
552
|
-
if ($[
|
|
553
|
-
|
|
602
|
+
$[24] = props;
|
|
603
|
+
$[25] = t10;
|
|
604
|
+
} else t10 = $[25];
|
|
605
|
+
const names = t10;
|
|
606
|
+
let t11;
|
|
607
|
+
if ($[26] !== props) {
|
|
608
|
+
t11 = "function" == typeof props.styles ? props.styles({
|
|
554
609
|
props
|
|
555
610
|
}) : props.styles;
|
|
556
|
-
$[
|
|
557
|
-
$[
|
|
558
|
-
} else
|
|
559
|
-
const styles =
|
|
611
|
+
$[26] = props;
|
|
612
|
+
$[27] = t11;
|
|
613
|
+
} else t11 = $[27];
|
|
614
|
+
const styles = t11;
|
|
560
615
|
const { messages } = config.locale;
|
|
561
|
-
let t10;
|
|
562
|
-
if ($[22] !== props.disabledAlpha) {
|
|
563
|
-
t10 = (next)=>props.disabledAlpha && !next.cleared ? opaque(next) : next;
|
|
564
|
-
$[22] = props.disabledAlpha;
|
|
565
|
-
$[23] = t10;
|
|
566
|
-
} else t10 = $[23];
|
|
567
|
-
const normalize = t10;
|
|
568
|
-
let t11;
|
|
569
|
-
if ($[24] !== normalize || $[25] !== props) {
|
|
570
|
-
t11 = (next_0)=>props.onChangeComplete?.(normalize(next_0));
|
|
571
|
-
$[24] = normalize;
|
|
572
|
-
$[25] = props;
|
|
573
|
-
$[26] = t11;
|
|
574
|
-
} else t11 = $[26];
|
|
575
|
-
const complete = t11;
|
|
576
616
|
let t12;
|
|
577
|
-
if ($[
|
|
578
|
-
t12 = (
|
|
579
|
-
|
|
617
|
+
if ($[28] !== props.disabledAlpha) {
|
|
618
|
+
t12 = (next)=>props.disabledAlpha && !next.cleared ? opaque(next) : next;
|
|
619
|
+
$[28] = props.disabledAlpha;
|
|
620
|
+
$[29] = t12;
|
|
621
|
+
} else t12 = $[29];
|
|
622
|
+
const normalize = t12;
|
|
623
|
+
let t13;
|
|
624
|
+
if ($[30] !== normalize || $[31] !== props) {
|
|
625
|
+
t13 = (next_0)=>props.onChangeComplete?.(new external_color_js_Color(normalize(next_0)));
|
|
626
|
+
$[30] = normalize;
|
|
627
|
+
$[31] = props;
|
|
628
|
+
$[32] = t13;
|
|
629
|
+
} else t13 = $[32];
|
|
630
|
+
const complete = t13;
|
|
631
|
+
let t14;
|
|
632
|
+
if ($[33] !== complete || $[34] !== controlled || $[35] !== normalize || $[36] !== props) {
|
|
633
|
+
t14 = (next_1, t15)=>{
|
|
634
|
+
const finished = void 0 === t15 ? true : t15;
|
|
580
635
|
const color = normalize(next_1);
|
|
581
|
-
if (
|
|
636
|
+
if (!controlled) setValue(color);
|
|
582
637
|
cachedGradient.current = null;
|
|
583
|
-
props.onChange?.(color, color.toCssString());
|
|
638
|
+
props.onChange?.(new external_color_js_Color(color), color.toCssString());
|
|
584
639
|
if (finished) complete(color);
|
|
585
640
|
};
|
|
586
|
-
$[
|
|
587
|
-
$[
|
|
588
|
-
$[
|
|
589
|
-
$[
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
641
|
+
$[33] = complete;
|
|
642
|
+
$[34] = controlled;
|
|
643
|
+
$[35] = normalize;
|
|
644
|
+
$[36] = props;
|
|
645
|
+
$[37] = t14;
|
|
646
|
+
} else t14 = $[37];
|
|
647
|
+
const change = t14;
|
|
648
|
+
let t15;
|
|
649
|
+
if ($[38] !== disabled || $[39] !== props) {
|
|
650
|
+
t15 = (next_2)=>{
|
|
595
651
|
if (next_2 && disabled) return;
|
|
596
652
|
if (void 0 === props.open) setOpen(next_2);
|
|
597
653
|
props.onOpenChange?.(next_2);
|
|
598
654
|
};
|
|
599
|
-
$[
|
|
600
|
-
$[
|
|
601
|
-
$[
|
|
602
|
-
} else
|
|
603
|
-
const openChange =
|
|
604
|
-
let
|
|
605
|
-
if ($[
|
|
606
|
-
|
|
655
|
+
$[38] = disabled;
|
|
656
|
+
$[39] = props;
|
|
657
|
+
$[40] = t15;
|
|
658
|
+
} else t15 = $[40];
|
|
659
|
+
const openChange = t15;
|
|
660
|
+
let t16;
|
|
661
|
+
if ($[41] !== openChange || $[42] !== props.trigger) {
|
|
662
|
+
t16 = ()=>{
|
|
607
663
|
clearTimeout(hoverTimer.current);
|
|
608
|
-
if ("hover" === props.trigger)
|
|
664
|
+
if ("hover" === props.trigger) {
|
|
665
|
+
keyboardOpening.current = false;
|
|
666
|
+
openChange(true);
|
|
667
|
+
}
|
|
609
668
|
};
|
|
610
|
-
$[
|
|
611
|
-
$[
|
|
612
|
-
$[
|
|
613
|
-
} else
|
|
614
|
-
const enter =
|
|
615
|
-
let
|
|
616
|
-
if ($[
|
|
617
|
-
|
|
618
|
-
if (
|
|
669
|
+
$[41] = openChange;
|
|
670
|
+
$[42] = props.trigger;
|
|
671
|
+
$[43] = t16;
|
|
672
|
+
} else t16 = $[43];
|
|
673
|
+
const enter = t16;
|
|
674
|
+
let t17;
|
|
675
|
+
if ($[44] !== hoverEnabled || $[45] !== openChange) {
|
|
676
|
+
t17 = ()=>{
|
|
677
|
+
if (hoverEnabled) {
|
|
678
|
+
clearTimeout(hoverTimer.current);
|
|
679
|
+
hoverTimer.current = setTimeout(()=>openChange(false), 100);
|
|
680
|
+
}
|
|
619
681
|
};
|
|
620
|
-
$[
|
|
621
|
-
$[
|
|
622
|
-
$[
|
|
623
|
-
} else
|
|
624
|
-
const leave =
|
|
625
|
-
let
|
|
626
|
-
if ($[
|
|
627
|
-
|
|
682
|
+
$[44] = hoverEnabled;
|
|
683
|
+
$[45] = openChange;
|
|
684
|
+
$[46] = t17;
|
|
685
|
+
} else t17 = $[46];
|
|
686
|
+
const leave = t17;
|
|
687
|
+
let t18;
|
|
688
|
+
if ($[47] !== format || $[48] !== props) {
|
|
689
|
+
t18 = (next_3)=>{
|
|
628
690
|
if (void 0 === props.format) setFormat(next_3);
|
|
629
691
|
if (format !== next_3) props.onFormatChange?.(next_3);
|
|
630
692
|
};
|
|
631
|
-
$[
|
|
632
|
-
$[
|
|
633
|
-
$[
|
|
634
|
-
} else
|
|
635
|
-
let
|
|
636
|
-
if ($[
|
|
637
|
-
|
|
693
|
+
$[47] = format;
|
|
694
|
+
$[48] = props;
|
|
695
|
+
$[49] = t18;
|
|
696
|
+
} else t18 = $[49];
|
|
697
|
+
let t19;
|
|
698
|
+
if ($[50] !== change || $[51] !== value) {
|
|
699
|
+
t19 = (next_4)=>{
|
|
638
700
|
setMode(next_4);
|
|
639
701
|
setActive(0);
|
|
640
702
|
const cached = value.isGradient() ? value : cachedGradient.current;
|
|
@@ -650,401 +712,437 @@ function ColorPicker(props) {
|
|
|
650
712
|
]));
|
|
651
713
|
cachedGradient.current = cached;
|
|
652
714
|
};
|
|
653
|
-
$[
|
|
654
|
-
$[
|
|
655
|
-
$[
|
|
656
|
-
} else
|
|
657
|
-
let
|
|
658
|
-
if ($[
|
|
659
|
-
|
|
715
|
+
$[50] = change;
|
|
716
|
+
$[51] = value;
|
|
717
|
+
$[52] = t19;
|
|
718
|
+
} else t19 = $[52];
|
|
719
|
+
let t20;
|
|
720
|
+
if ($[53] !== change || $[54] !== props) {
|
|
721
|
+
t20 = ()=>{
|
|
660
722
|
change(new external_color_js_Color(null));
|
|
661
723
|
props.onClear?.();
|
|
662
724
|
};
|
|
663
|
-
$[
|
|
664
|
-
$[
|
|
665
|
-
$[
|
|
666
|
-
} else
|
|
667
|
-
let
|
|
668
|
-
if ($[
|
|
669
|
-
|
|
725
|
+
$[53] = change;
|
|
726
|
+
$[54] = props;
|
|
727
|
+
$[55] = t20;
|
|
728
|
+
} else t20 = $[55];
|
|
729
|
+
let t21;
|
|
730
|
+
if ($[56] !== active || $[57] !== change || $[58] !== complete || $[59] !== format || $[60] !== mode || $[61] !== modes || $[62] !== panelValue || $[63] !== props || $[64] !== t18 || $[65] !== t19 || $[66] !== t20) {
|
|
731
|
+
t21 = {
|
|
670
732
|
props,
|
|
671
733
|
value: panelValue,
|
|
672
734
|
active,
|
|
673
735
|
setActive,
|
|
674
736
|
format,
|
|
675
|
-
setFormat:
|
|
737
|
+
setFormat: t18,
|
|
676
738
|
mode,
|
|
677
739
|
modes,
|
|
678
|
-
setMode:
|
|
740
|
+
setMode: t19,
|
|
679
741
|
change,
|
|
680
742
|
complete,
|
|
681
|
-
clear:
|
|
743
|
+
clear: t20
|
|
682
744
|
};
|
|
683
|
-
$[
|
|
684
|
-
$[
|
|
685
|
-
$[
|
|
686
|
-
$[
|
|
687
|
-
$[
|
|
688
|
-
$[
|
|
689
|
-
$[
|
|
690
|
-
$[
|
|
691
|
-
$[
|
|
692
|
-
$[
|
|
693
|
-
$[
|
|
694
|
-
$[
|
|
695
|
-
} else
|
|
696
|
-
const panelState =
|
|
697
|
-
let
|
|
698
|
-
if ($[
|
|
699
|
-
|
|
745
|
+
$[56] = active;
|
|
746
|
+
$[57] = change;
|
|
747
|
+
$[58] = complete;
|
|
748
|
+
$[59] = format;
|
|
749
|
+
$[60] = mode;
|
|
750
|
+
$[61] = modes;
|
|
751
|
+
$[62] = panelValue;
|
|
752
|
+
$[63] = props;
|
|
753
|
+
$[64] = t18;
|
|
754
|
+
$[65] = t19;
|
|
755
|
+
$[66] = t20;
|
|
756
|
+
$[67] = t21;
|
|
757
|
+
} else t21 = $[67];
|
|
758
|
+
const panelState = t21;
|
|
759
|
+
let t22;
|
|
760
|
+
if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
|
|
761
|
+
t22 = /*#__PURE__*/ jsxs(Fragment, {
|
|
700
762
|
children: [
|
|
701
763
|
/*#__PURE__*/ jsx(PickerPanel, {}),
|
|
702
764
|
/*#__PURE__*/ jsx(PresetsPanel, {})
|
|
703
765
|
]
|
|
704
766
|
});
|
|
705
|
-
$[
|
|
706
|
-
} else
|
|
707
|
-
const basicPanel =
|
|
767
|
+
$[68] = t22;
|
|
768
|
+
} else t22 = $[68];
|
|
769
|
+
const basicPanel = t22;
|
|
708
770
|
const placement = props.placement ?? "bottomLeft";
|
|
709
771
|
const side = placement.startsWith("top") ? "top" : placement.startsWith("left") ? "left" : placement.startsWith("right") ? "right" : "bottom";
|
|
710
772
|
const align = "object" == typeof props.arrow && props.arrow.pointAtCenter ? "center" : /Left|Top/.test(placement) ? "start" : /Right|Bottom/.test(placement) ? "end" : "center";
|
|
711
|
-
let
|
|
712
|
-
if ($[
|
|
713
|
-
|
|
714
|
-
$[
|
|
715
|
-
$[
|
|
716
|
-
$[
|
|
717
|
-
$[
|
|
718
|
-
$[
|
|
719
|
-
$[
|
|
720
|
-
} else
|
|
721
|
-
const text =
|
|
722
|
-
let t22;
|
|
723
|
-
if ($[68] !== props) {
|
|
724
|
-
t22 = Object.fromEntries(Object.entries(props).filter(_temp5));
|
|
725
|
-
$[68] = props;
|
|
726
|
-
$[69] = t22;
|
|
727
|
-
} else t22 = $[69];
|
|
728
|
-
const dataProps = t22;
|
|
729
|
-
const t23 = messages.chooseColor;
|
|
773
|
+
let t23;
|
|
774
|
+
if ($[69] !== format || $[70] !== messages.colorGradient || $[71] !== messages.colorTransparent || $[72] !== props.showText || $[73] !== value) {
|
|
775
|
+
t23 = "function" == typeof props.showText ? props.showText(value) : value.cleared ? messages.colorTransparent : value.isGradient() ? messages.colorGradient : "rgb" === format ? value.toRgbString() : "hsb" === format ? value.toHsbString() : value.toHexString();
|
|
776
|
+
$[69] = format;
|
|
777
|
+
$[70] = messages.colorGradient;
|
|
778
|
+
$[71] = messages.colorTransparent;
|
|
779
|
+
$[72] = props.showText;
|
|
780
|
+
$[73] = value;
|
|
781
|
+
$[74] = t23;
|
|
782
|
+
} else t23 = $[74];
|
|
783
|
+
const text = t23;
|
|
730
784
|
let t24;
|
|
731
|
-
if ($[
|
|
732
|
-
t24 =
|
|
733
|
-
$[
|
|
734
|
-
$[
|
|
735
|
-
} else t24 = $[
|
|
736
|
-
const
|
|
737
|
-
const
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
const
|
|
785
|
+
if ($[75] !== props) {
|
|
786
|
+
t24 = Object.fromEntries(Object.entries(props).filter(_temp5));
|
|
787
|
+
$[75] = props;
|
|
788
|
+
$[76] = t24;
|
|
789
|
+
} else t24 = $[76];
|
|
790
|
+
const dataProps = t24;
|
|
791
|
+
const t25 = messages.chooseColor;
|
|
792
|
+
let t26;
|
|
793
|
+
if ($[77] !== value) {
|
|
794
|
+
t26 = value.toHexString();
|
|
795
|
+
$[77] = value;
|
|
796
|
+
$[78] = t26;
|
|
797
|
+
} else t26 = $[78];
|
|
798
|
+
const t27 = `${t25} ${t26}`;
|
|
799
|
+
const t28 = names?.body;
|
|
800
|
+
const t29 = styles?.body;
|
|
801
|
+
const t30 = names?.content;
|
|
747
802
|
let t31;
|
|
748
|
-
if ($[
|
|
749
|
-
t31 =
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
$[75] = t30;
|
|
755
|
-
$[76] = t31;
|
|
756
|
-
} else t31 = $[76];
|
|
757
|
-
let t32;
|
|
758
|
-
if ($[77] !== t28 || $[78] !== t31) {
|
|
759
|
-
t32 = /*#__PURE__*/ jsx("span", {
|
|
760
|
-
"data-tao-color-content": "",
|
|
761
|
-
className: t28,
|
|
762
|
-
style: t31
|
|
763
|
-
});
|
|
764
|
-
$[77] = t28;
|
|
765
|
-
$[78] = t31;
|
|
766
|
-
$[79] = t32;
|
|
767
|
-
} else t32 = $[79];
|
|
803
|
+
if ($[79] !== value) {
|
|
804
|
+
t31 = value.toCssString();
|
|
805
|
+
$[79] = value;
|
|
806
|
+
$[80] = t31;
|
|
807
|
+
} else t31 = $[80];
|
|
808
|
+
const t32 = styles?.content;
|
|
768
809
|
let t33;
|
|
769
|
-
if ($[
|
|
770
|
-
t33 =
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
});
|
|
776
|
-
$[80] = t26;
|
|
777
|
-
$[81] = t27;
|
|
810
|
+
if ($[81] !== t31 || $[82] !== t32) {
|
|
811
|
+
t33 = {
|
|
812
|
+
background: t31,
|
|
813
|
+
...t32
|
|
814
|
+
};
|
|
815
|
+
$[81] = t31;
|
|
778
816
|
$[82] = t32;
|
|
779
817
|
$[83] = t33;
|
|
780
818
|
} else t33 = $[83];
|
|
781
819
|
let t34;
|
|
782
|
-
if ($[84] !==
|
|
783
|
-
t34 =
|
|
820
|
+
if ($[84] !== t30 || $[85] !== t33) {
|
|
821
|
+
t34 = /*#__PURE__*/ jsx("span", {
|
|
822
|
+
"data-tao-color-content": "",
|
|
823
|
+
className: t30,
|
|
824
|
+
style: t33
|
|
825
|
+
});
|
|
826
|
+
$[84] = t30;
|
|
827
|
+
$[85] = t33;
|
|
828
|
+
$[86] = t34;
|
|
829
|
+
} else t34 = $[86];
|
|
830
|
+
let t35;
|
|
831
|
+
if ($[87] !== t28 || $[88] !== t29 || $[89] !== t34) {
|
|
832
|
+
t35 = /*#__PURE__*/ jsx("span", {
|
|
833
|
+
"data-tao-color-body": "",
|
|
834
|
+
className: t28,
|
|
835
|
+
style: t29,
|
|
836
|
+
children: t34
|
|
837
|
+
});
|
|
838
|
+
$[87] = t28;
|
|
839
|
+
$[88] = t29;
|
|
840
|
+
$[89] = t34;
|
|
841
|
+
$[90] = t35;
|
|
842
|
+
} else t35 = $[90];
|
|
843
|
+
let t36;
|
|
844
|
+
if ($[91] !== names?.description || $[92] !== props.showText || $[93] !== styles?.description || $[94] !== text) {
|
|
845
|
+
t36 = props.showText && /*#__PURE__*/ jsx("span", {
|
|
784
846
|
"data-tao-color-description": "",
|
|
785
847
|
className: names?.description,
|
|
786
848
|
style: styles?.description,
|
|
787
849
|
children: text
|
|
788
850
|
});
|
|
789
|
-
$[
|
|
790
|
-
$[
|
|
791
|
-
$[
|
|
792
|
-
$[
|
|
793
|
-
$[
|
|
794
|
-
} else
|
|
795
|
-
let
|
|
796
|
-
if ($[
|
|
797
|
-
|
|
851
|
+
$[91] = names?.description;
|
|
852
|
+
$[92] = props.showText;
|
|
853
|
+
$[93] = styles?.description;
|
|
854
|
+
$[94] = text;
|
|
855
|
+
$[95] = t36;
|
|
856
|
+
} else t36 = $[95];
|
|
857
|
+
let t37;
|
|
858
|
+
if ($[96] !== disabled || $[97] !== t27 || $[98] !== t35 || $[99] !== t36) {
|
|
859
|
+
t37 = /*#__PURE__*/ jsxs("button", {
|
|
798
860
|
type: "button",
|
|
799
861
|
disabled: disabled,
|
|
800
|
-
"aria-label":
|
|
862
|
+
"aria-label": t27,
|
|
801
863
|
children: [
|
|
802
|
-
|
|
803
|
-
|
|
864
|
+
t35,
|
|
865
|
+
t36
|
|
804
866
|
]
|
|
805
867
|
});
|
|
806
|
-
$[
|
|
807
|
-
$[
|
|
808
|
-
$[
|
|
809
|
-
$[
|
|
810
|
-
$[
|
|
811
|
-
} else
|
|
812
|
-
const defaultTrigger =
|
|
813
|
-
const
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
$[
|
|
820
|
-
$[
|
|
821
|
-
$[
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
const
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
868
|
+
$[96] = disabled;
|
|
869
|
+
$[97] = t27;
|
|
870
|
+
$[98] = t35;
|
|
871
|
+
$[99] = t36;
|
|
872
|
+
$[100] = t37;
|
|
873
|
+
} else t37 = $[100];
|
|
874
|
+
const defaultTrigger = t37;
|
|
875
|
+
const customTrigger = props.children;
|
|
876
|
+
let t38;
|
|
877
|
+
if ($[101] !== customTrigger || $[102] !== disabled) {
|
|
878
|
+
t38 = disabled && /*#__PURE__*/ isValidElement(customTrigger) && "button" === customTrigger.type ? /*#__PURE__*/ cloneElement(customTrigger, {
|
|
879
|
+
disabled: true
|
|
880
|
+
}) : customTrigger;
|
|
881
|
+
$[101] = customTrigger;
|
|
882
|
+
$[102] = disabled;
|
|
883
|
+
$[103] = t38;
|
|
884
|
+
} else t38 = $[103];
|
|
885
|
+
const trigger = t38;
|
|
886
|
+
const t39 = "middle" === props.size ? "medium" : props.size ?? config.size;
|
|
887
|
+
const t40 = disabled || void 0;
|
|
888
|
+
const t41 = names?.root;
|
|
889
|
+
let t42;
|
|
890
|
+
if ($[104] !== props.className || $[105] !== props.rootClassName || $[106] !== t41) {
|
|
891
|
+
t42 = cx(t41, props.className, props.rootClassName);
|
|
892
|
+
$[104] = props.className;
|
|
893
|
+
$[105] = props.rootClassName;
|
|
894
|
+
$[106] = t41;
|
|
895
|
+
$[107] = t42;
|
|
896
|
+
} else t42 = $[107];
|
|
897
|
+
const t43 = styles?.root;
|
|
898
|
+
let t44;
|
|
899
|
+
if ($[108] !== props.style || $[109] !== t43) {
|
|
900
|
+
t44 = {
|
|
901
|
+
...t43,
|
|
829
902
|
...props.style
|
|
830
903
|
};
|
|
831
|
-
$[
|
|
832
|
-
$[
|
|
833
|
-
$[
|
|
834
|
-
} else
|
|
835
|
-
let
|
|
836
|
-
if ($[
|
|
837
|
-
|
|
838
|
-
if ("hover" === props.trigger
|
|
904
|
+
$[108] = props.style;
|
|
905
|
+
$[109] = t43;
|
|
906
|
+
$[110] = t44;
|
|
907
|
+
} else t44 = $[110];
|
|
908
|
+
let t45;
|
|
909
|
+
if ($[111] !== disabled || $[112] !== open || $[113] !== props.trigger) {
|
|
910
|
+
t45 = (event)=>{
|
|
911
|
+
if (disabled || "hover" === props.trigger && 0 !== event.detail) event.preventDefault();
|
|
912
|
+
else if (!open) keyboardOpening.current = 0 === event.detail;
|
|
839
913
|
};
|
|
840
|
-
$[
|
|
841
|
-
$[
|
|
842
|
-
$[
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
914
|
+
$[111] = disabled;
|
|
915
|
+
$[112] = open;
|
|
916
|
+
$[113] = props.trigger;
|
|
917
|
+
$[114] = t45;
|
|
918
|
+
} else t45 = $[114];
|
|
919
|
+
let t46;
|
|
920
|
+
if ($[115] !== defaultTrigger || $[116] !== disabled || $[117] !== trigger) {
|
|
921
|
+
t46 = /*#__PURE__*/ isValidElement(trigger) ? trigger : trigger ? /*#__PURE__*/ jsx("button", {
|
|
847
922
|
type: "button",
|
|
848
923
|
disabled: disabled,
|
|
849
|
-
children:
|
|
924
|
+
children: trigger
|
|
850
925
|
}) : defaultTrigger;
|
|
851
|
-
$[
|
|
852
|
-
$[
|
|
853
|
-
$[
|
|
854
|
-
$[
|
|
855
|
-
} else
|
|
856
|
-
let
|
|
857
|
-
if ($[
|
|
858
|
-
|
|
926
|
+
$[115] = defaultTrigger;
|
|
927
|
+
$[116] = disabled;
|
|
928
|
+
$[117] = trigger;
|
|
929
|
+
$[118] = t46;
|
|
930
|
+
} else t46 = $[118];
|
|
931
|
+
let t47;
|
|
932
|
+
if ($[119] !== enter || $[120] !== leave || $[121] !== t45 || $[122] !== t46) {
|
|
933
|
+
t47 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Trigger, {
|
|
859
934
|
asChild: true,
|
|
860
935
|
onPointerEnter: enter,
|
|
861
936
|
onPointerLeave: leave,
|
|
862
|
-
onClick:
|
|
863
|
-
children:
|
|
937
|
+
onClick: t45,
|
|
938
|
+
children: t46
|
|
864
939
|
});
|
|
865
|
-
$[
|
|
866
|
-
$[
|
|
867
|
-
$[
|
|
868
|
-
$[
|
|
869
|
-
$[
|
|
870
|
-
} else
|
|
871
|
-
let
|
|
872
|
-
if ($[
|
|
873
|
-
|
|
874
|
-
$[
|
|
875
|
-
$[
|
|
876
|
-
$[
|
|
877
|
-
} else
|
|
878
|
-
const
|
|
879
|
-
const
|
|
880
|
-
const
|
|
881
|
-
const t49 = styles?.popup?.root;
|
|
882
|
-
let t50;
|
|
883
|
-
if ($[116] !== open) {
|
|
884
|
-
t50 = open ? {} : {
|
|
885
|
-
display: "none"
|
|
886
|
-
};
|
|
887
|
-
$[116] = open;
|
|
888
|
-
$[117] = t50;
|
|
889
|
-
} else t50 = $[117];
|
|
890
|
-
let t51;
|
|
891
|
-
if ($[118] !== t49 || $[119] !== t50) {
|
|
892
|
-
t51 = {
|
|
893
|
-
...t49,
|
|
894
|
-
...t50
|
|
895
|
-
};
|
|
896
|
-
$[118] = t49;
|
|
897
|
-
$[119] = t50;
|
|
898
|
-
$[120] = t51;
|
|
899
|
-
} else t51 = $[120];
|
|
940
|
+
$[119] = enter;
|
|
941
|
+
$[120] = leave;
|
|
942
|
+
$[121] = t45;
|
|
943
|
+
$[122] = t46;
|
|
944
|
+
$[123] = t47;
|
|
945
|
+
} else t47 = $[123];
|
|
946
|
+
let t48;
|
|
947
|
+
if ($[124] !== props.getPopupContainer || $[125] !== triggerElement) {
|
|
948
|
+
t48 = triggerElement ? props.getPopupContainer?.(triggerElement) : void 0;
|
|
949
|
+
$[124] = props.getPopupContainer;
|
|
950
|
+
$[125] = triggerElement;
|
|
951
|
+
$[126] = t48;
|
|
952
|
+
} else t48 = $[126];
|
|
953
|
+
const t49 = keepAlive || void 0;
|
|
954
|
+
const t50 = keepAlive || void 0;
|
|
955
|
+
const t51 = props.autoAdjustOverflow ?? true;
|
|
900
956
|
let t52;
|
|
901
|
-
if ($[
|
|
957
|
+
if ($[127] !== open) {
|
|
902
958
|
t52 = (event_0)=>{
|
|
903
|
-
if (
|
|
959
|
+
if (!open) event_0.preventDefault();
|
|
904
960
|
};
|
|
905
|
-
$[
|
|
906
|
-
$[
|
|
907
|
-
} else t52 = $[
|
|
908
|
-
const t53 = names?.popup?.
|
|
909
|
-
const t54 = styles?.
|
|
910
|
-
|
|
961
|
+
$[127] = open;
|
|
962
|
+
$[128] = t52;
|
|
963
|
+
} else t52 = $[128];
|
|
964
|
+
const t53 = names?.popup?.root;
|
|
965
|
+
const t54 = styles?.popup?.root;
|
|
966
|
+
let t55;
|
|
967
|
+
if ($[129] !== open) {
|
|
968
|
+
t55 = open ? {} : {
|
|
969
|
+
display: "none"
|
|
970
|
+
};
|
|
971
|
+
$[129] = open;
|
|
972
|
+
$[130] = t55;
|
|
973
|
+
} else t55 = $[130];
|
|
911
974
|
let t56;
|
|
912
|
-
if ($[
|
|
975
|
+
if ($[131] !== t54 || $[132] !== t55) {
|
|
913
976
|
t56 = {
|
|
914
977
|
...t54,
|
|
915
978
|
...t55
|
|
916
979
|
};
|
|
917
|
-
$[
|
|
918
|
-
$[
|
|
919
|
-
$[
|
|
920
|
-
} else t56 = $[
|
|
980
|
+
$[131] = t54;
|
|
981
|
+
$[132] = t55;
|
|
982
|
+
$[133] = t56;
|
|
983
|
+
} else t56 = $[133];
|
|
921
984
|
let t57;
|
|
922
|
-
if ($[
|
|
923
|
-
t57 =
|
|
985
|
+
if ($[134] !== props.trigger) {
|
|
986
|
+
t57 = (event_1)=>{
|
|
987
|
+
if ("hover" === props.trigger && !keyboardOpening.current) event_1.preventDefault();
|
|
988
|
+
keyboardOpening.current = false;
|
|
989
|
+
};
|
|
990
|
+
$[134] = props.trigger;
|
|
991
|
+
$[135] = t57;
|
|
992
|
+
} else t57 = $[135];
|
|
993
|
+
const t58 = names?.popup?.container;
|
|
994
|
+
const t59 = styles?.popupOverlayInner;
|
|
995
|
+
const t60 = styles?.popup?.container;
|
|
996
|
+
let t61;
|
|
997
|
+
if ($[136] !== t59 || $[137] !== t60) {
|
|
998
|
+
t61 = {
|
|
999
|
+
...t59,
|
|
1000
|
+
...t60
|
|
1001
|
+
};
|
|
1002
|
+
$[136] = t59;
|
|
1003
|
+
$[137] = t60;
|
|
1004
|
+
$[138] = t61;
|
|
1005
|
+
} else t61 = $[138];
|
|
1006
|
+
let t62;
|
|
1007
|
+
if ($[139] !== props.panelRender) {
|
|
1008
|
+
t62 = props.panelRender ? props.panelRender(basicPanel, {
|
|
924
1009
|
components: {
|
|
925
1010
|
Picker: PickerPanel,
|
|
926
1011
|
Presets: PresetsPanel
|
|
927
1012
|
}
|
|
928
1013
|
}) : basicPanel;
|
|
929
|
-
$[
|
|
930
|
-
$[
|
|
931
|
-
} else
|
|
932
|
-
let
|
|
933
|
-
if ($[
|
|
934
|
-
|
|
1014
|
+
$[139] = props.panelRender;
|
|
1015
|
+
$[140] = t62;
|
|
1016
|
+
} else t62 = $[140];
|
|
1017
|
+
let t63;
|
|
1018
|
+
if ($[141] !== panelState || $[142] !== t62) {
|
|
1019
|
+
t63 = /*#__PURE__*/ jsx(PanelContext.Provider, {
|
|
935
1020
|
value: panelState,
|
|
936
|
-
children:
|
|
1021
|
+
children: t62
|
|
937
1022
|
});
|
|
938
|
-
$[
|
|
939
|
-
$[
|
|
940
|
-
$[
|
|
941
|
-
} else
|
|
942
|
-
let
|
|
943
|
-
if ($[
|
|
944
|
-
|
|
1023
|
+
$[141] = panelState;
|
|
1024
|
+
$[142] = t62;
|
|
1025
|
+
$[143] = t63;
|
|
1026
|
+
} else t63 = $[143];
|
|
1027
|
+
let t64;
|
|
1028
|
+
if ($[144] !== t58 || $[145] !== t61 || $[146] !== t63) {
|
|
1029
|
+
t64 = /*#__PURE__*/ jsx("div", {
|
|
945
1030
|
"data-tao-color-container": "",
|
|
946
|
-
className:
|
|
947
|
-
style:
|
|
948
|
-
children:
|
|
1031
|
+
className: t58,
|
|
1032
|
+
style: t61,
|
|
1033
|
+
children: t63
|
|
949
1034
|
});
|
|
950
|
-
$[
|
|
951
|
-
$[
|
|
952
|
-
$[
|
|
953
|
-
$[
|
|
954
|
-
} else
|
|
955
|
-
let
|
|
956
|
-
if ($[
|
|
957
|
-
|
|
1035
|
+
$[144] = t58;
|
|
1036
|
+
$[145] = t61;
|
|
1037
|
+
$[146] = t63;
|
|
1038
|
+
$[147] = t64;
|
|
1039
|
+
} else t64 = $[147];
|
|
1040
|
+
let t65;
|
|
1041
|
+
if ($[148] !== props.arrow) {
|
|
1042
|
+
t65 = false !== props.arrow && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Arrow, {
|
|
958
1043
|
"data-tao-color-arrow": ""
|
|
959
1044
|
});
|
|
960
|
-
$[
|
|
961
|
-
$[
|
|
962
|
-
} else
|
|
963
|
-
let
|
|
964
|
-
if ($[
|
|
965
|
-
|
|
1045
|
+
$[148] = props.arrow;
|
|
1046
|
+
$[149] = t65;
|
|
1047
|
+
} else t65 = $[149];
|
|
1048
|
+
let t66;
|
|
1049
|
+
if ($[150] !== t64 || $[151] !== t65) {
|
|
1050
|
+
t66 = /*#__PURE__*/ jsxs(color_picker_PickerSurface, {
|
|
1051
|
+
children: [
|
|
1052
|
+
t64,
|
|
1053
|
+
t65
|
|
1054
|
+
]
|
|
1055
|
+
});
|
|
1056
|
+
$[150] = t64;
|
|
1057
|
+
$[151] = t65;
|
|
1058
|
+
$[152] = t66;
|
|
1059
|
+
} else t66 = $[152];
|
|
1060
|
+
let t67;
|
|
1061
|
+
if ($[153] !== align || $[154] !== enter || $[155] !== leave || $[156] !== messages.colorPicker || $[157] !== side || $[158] !== t50 || $[159] !== t51 || $[160] !== t52 || $[161] !== t53 || $[162] !== t56 || $[163] !== t57 || $[164] !== t66) {
|
|
1062
|
+
t67 = /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
966
1063
|
asChild: true,
|
|
967
|
-
children: /*#__PURE__*/
|
|
1064
|
+
children: /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Content, {
|
|
1065
|
+
asChild: true,
|
|
968
1066
|
"data-tao-color-popup": "",
|
|
1067
|
+
"data-tao-keep-alive": t50,
|
|
969
1068
|
"aria-label": messages.colorPicker,
|
|
970
1069
|
side: side,
|
|
971
1070
|
align: align,
|
|
972
1071
|
sideOffset: 6,
|
|
973
1072
|
collisionPadding: 12,
|
|
974
|
-
avoidCollisions:
|
|
1073
|
+
avoidCollisions: t51,
|
|
975
1074
|
onPointerEnter: enter,
|
|
976
1075
|
onPointerLeave: leave,
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
t60
|
|
983
|
-
]
|
|
1076
|
+
onInteractOutside: t52,
|
|
1077
|
+
className: t53,
|
|
1078
|
+
style: t56,
|
|
1079
|
+
onOpenAutoFocus: t57,
|
|
1080
|
+
children: t66
|
|
984
1081
|
})
|
|
985
1082
|
});
|
|
986
|
-
$[
|
|
987
|
-
$[
|
|
988
|
-
$[
|
|
989
|
-
$[
|
|
990
|
-
$[
|
|
991
|
-
$[
|
|
992
|
-
$[
|
|
993
|
-
$[
|
|
994
|
-
$[
|
|
995
|
-
$[
|
|
996
|
-
$[
|
|
997
|
-
$[
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1083
|
+
$[153] = align;
|
|
1084
|
+
$[154] = enter;
|
|
1085
|
+
$[155] = leave;
|
|
1086
|
+
$[156] = messages.colorPicker;
|
|
1087
|
+
$[157] = side;
|
|
1088
|
+
$[158] = t50;
|
|
1089
|
+
$[159] = t51;
|
|
1090
|
+
$[160] = t52;
|
|
1091
|
+
$[161] = t53;
|
|
1092
|
+
$[162] = t56;
|
|
1093
|
+
$[163] = t57;
|
|
1094
|
+
$[164] = t66;
|
|
1095
|
+
$[165] = t67;
|
|
1096
|
+
} else t67 = $[165];
|
|
1097
|
+
let t68;
|
|
1098
|
+
if ($[166] !== t48 || $[167] !== t49 || $[168] !== t67) {
|
|
1099
|
+
t68 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Portal, {
|
|
1100
|
+
container: t48,
|
|
1101
|
+
forceMount: t49,
|
|
1102
|
+
children: t67
|
|
1005
1103
|
});
|
|
1006
|
-
$[
|
|
1007
|
-
$[
|
|
1008
|
-
$[
|
|
1009
|
-
$[
|
|
1010
|
-
} else
|
|
1011
|
-
let
|
|
1012
|
-
if ($[
|
|
1013
|
-
|
|
1104
|
+
$[166] = t48;
|
|
1105
|
+
$[167] = t49;
|
|
1106
|
+
$[168] = t67;
|
|
1107
|
+
$[169] = t68;
|
|
1108
|
+
} else t68 = $[169];
|
|
1109
|
+
let t69;
|
|
1110
|
+
if ($[170] !== open || $[171] !== openChange || $[172] !== t47 || $[173] !== t68) {
|
|
1111
|
+
t69 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_popover_c8444160.Root, {
|
|
1014
1112
|
open: open,
|
|
1015
1113
|
onOpenChange: openChange,
|
|
1016
1114
|
children: [
|
|
1017
|
-
|
|
1018
|
-
|
|
1115
|
+
t47,
|
|
1116
|
+
t68
|
|
1019
1117
|
]
|
|
1020
1118
|
});
|
|
1021
|
-
$[
|
|
1022
|
-
$[
|
|
1023
|
-
$[
|
|
1024
|
-
$[
|
|
1025
|
-
$[
|
|
1026
|
-
} else
|
|
1027
|
-
let
|
|
1028
|
-
if ($[
|
|
1029
|
-
|
|
1119
|
+
$[170] = open;
|
|
1120
|
+
$[171] = openChange;
|
|
1121
|
+
$[172] = t47;
|
|
1122
|
+
$[173] = t68;
|
|
1123
|
+
$[174] = t69;
|
|
1124
|
+
} else t69 = $[174];
|
|
1125
|
+
let t70;
|
|
1126
|
+
if ($[175] !== dataProps || $[176] !== t39 || $[177] !== t40 || $[178] !== t42 || $[179] !== t44 || $[180] !== t69) {
|
|
1127
|
+
t70 = /*#__PURE__*/ jsx("span", {
|
|
1030
1128
|
ref: setTriggerElement,
|
|
1031
1129
|
"data-tao-color-picker": "",
|
|
1032
|
-
"data-tao-size":
|
|
1033
|
-
"data-disabled":
|
|
1034
|
-
className:
|
|
1035
|
-
style:
|
|
1130
|
+
"data-tao-size": t39,
|
|
1131
|
+
"data-disabled": t40,
|
|
1132
|
+
className: t42,
|
|
1133
|
+
style: t44,
|
|
1036
1134
|
...dataProps,
|
|
1037
|
-
children:
|
|
1135
|
+
children: t69
|
|
1038
1136
|
});
|
|
1039
|
-
$[
|
|
1040
|
-
$[
|
|
1041
|
-
$[
|
|
1042
|
-
$[
|
|
1043
|
-
$[
|
|
1044
|
-
$[
|
|
1045
|
-
$[
|
|
1046
|
-
} else
|
|
1047
|
-
return
|
|
1137
|
+
$[175] = dataProps;
|
|
1138
|
+
$[176] = t39;
|
|
1139
|
+
$[177] = t40;
|
|
1140
|
+
$[178] = t42;
|
|
1141
|
+
$[179] = t44;
|
|
1142
|
+
$[180] = t69;
|
|
1143
|
+
$[181] = t70;
|
|
1144
|
+
} else t70 = $[181];
|
|
1145
|
+
return t70;
|
|
1048
1146
|
}
|
|
1049
1147
|
function _temp5(t0) {
|
|
1050
1148
|
const [key] = t0;
|