@rockshin/tao-ui 0.0.58 → 0.0.59
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 +38 -4
- package/dist/components/app/app-modals.js +11 -6
- package/dist/components/app/app-notices.js +105 -47
- package/dist/components/auto-complete/auto-complete.js +9 -2
- package/dist/components/calendar/calendar.js +22 -18
- package/dist/components/carousel/carousel.js +27 -14
- package/dist/components/cascader/cascader.js +17 -12
- package/dist/components/checkbox/checkbox.d.ts +3 -1
- package/dist/components/checkbox/checkbox.js +65 -58
- package/dist/components/color-picker/color-picker.js +383 -360
- package/dist/components/date-picker/calendar/calendar-grid.d.ts +5 -3
- package/dist/components/date-picker/calendar/calendar-grid.js +9 -4
- package/dist/components/date-picker/calendar/month-grid.d.ts +2 -1
- package/dist/components/date-picker/calendar/month-grid.js +61 -45
- package/dist/components/date-picker/calendar/time-panel.d.ts +8 -1
- package/dist/components/date-picker/calendar/time-panel.js +89 -88
- package/dist/components/date-picker/calendar/year-grid.d.ts +2 -1
- package/dist/components/date-picker/calendar/year-grid.js +60 -44
- package/dist/components/date-picker/date-picker.css +9 -0
- package/dist/components/date-picker/date-picker.js +22 -13
- package/dist/components/date-picker/range-picker.d.ts +2 -0
- package/dist/components/date-picker/range-picker.js +127 -70
- package/dist/components/date-picker/types.js +1 -1
- package/dist/components/drawer/drawer.d.ts +1 -1
- package/dist/components/drawer/drawer.js +4 -3
- package/dist/components/dropdown/dropdown.js +11 -9
- package/dist/components/float-button/float-button.js +4 -4
- package/dist/components/form/form-item.d.ts +1 -1
- package/dist/components/form/form-item.js +160 -120
- package/dist/components/form-field/form-field-view.d.ts +2 -1
- package/dist/components/form-field/form-field-view.js +173 -108
- package/dist/components/input/input-shared.js +3 -2
- package/dist/components/input/otp.js +114 -110
- package/dist/components/input/password.js +55 -61
- package/dist/components/input/search.js +8 -4
- package/dist/components/mentions/mentions.js +1 -0
- package/dist/components/menu/menu-render.js +1 -0
- package/dist/components/modal/confirm-dialog.js +11 -4
- package/dist/components/modal/modal.js +320 -315
- package/dist/components/pagination/pagination.d.ts +1 -0
- package/dist/components/pagination/pagination.js +1 -0
- package/dist/components/popover/popover.js +325 -289
- package/dist/components/qr-code/qr-code.js +157 -150
- package/dist/components/radio/radio.d.ts +3 -1
- package/dist/components/radio/radio.js +73 -64
- package/dist/components/select/mobile-select.js +6 -3
- package/dist/components/select/select-model.js +2 -2
- package/dist/components/select/select.js +78 -39
- package/dist/components/select/use-select-selection.js +58 -58
- package/dist/components/slider/slider.d.ts +2 -2
- package/dist/components/slider/slider.js +13 -2
- package/dist/components/sonner/sonner.js +2 -2
- package/dist/components/splitter/splitter.css +1 -0
- package/dist/components/splitter/splitter.js +152 -126
- package/dist/components/switch/switch.js +45 -39
- package/dist/components/table/table.js +1 -0
- package/dist/components/table/use-table-data.js +2 -2
- package/dist/components/time-picker/time-picker.js +31 -1
- package/dist/components/tooltip/tooltip.js +237 -99
- package/dist/components/tree/tree.js +31 -3
- package/dist/components/tree-select/tree-select.js +1 -1
- package/dist/components/upload/upload.js +67 -40
- package/dist/locales/ar-EG.js +2 -0
- package/dist/locales/de-DE.js +2 -0
- package/dist/locales/en-US.js +2 -0
- package/dist/locales/es-ES.js +2 -0
- package/dist/locales/fr-FR.js +2 -0
- package/dist/locales/hi-IN.js +2 -0
- package/dist/locales/id-ID.js +2 -0
- package/dist/locales/it-IT.js +2 -0
- package/dist/locales/ja-JP.js +2 -0
- package/dist/locales/ko-KR.js +2 -0
- package/dist/locales/pt-BR.js +2 -0
- package/dist/locales/ru-RU.js +2 -0
- package/dist/locales/th-TH.js +2 -0
- package/dist/locales/tr-TR.js +2 -0
- package/dist/locales/types.d.ts +2 -0
- package/dist/locales/vi-VN.js +2 -0
- package/dist/locales/zh-CN.js +2 -0
- package/dist/locales/zh-TW.js +2 -0
- package/dist/number-input/format.js +1 -1
- package/dist/number-input/use-number-input.js +166 -321
- package/dist/number-input/validate.d.ts +1 -0
- package/dist/number-input/validate.js +1 -1
- package/dist/provider/tao-provider.d.ts +2 -2
- package/dist/provider/tao-provider.js +49 -49
- package/dist/utils/composed-parent.d.ts +1 -0
- package/dist/utils/composed-parent.js +7 -0
- package/dist/utils/portal.d.ts +5 -0
- package/dist/utils/portal.js +7 -1
- package/dist/utils/refs.d.ts +3 -1
- package/dist/utils/refs.js +25 -1
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
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 { cloneElement, createContext, forwardRef, isValidElement, useContext, useEffect, useId, useRef, useState } from "react";
|
|
4
|
+
import { cloneElement, createContext, forwardRef, isValidElement, useContext, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
5
5
|
import { TaoPortalScope, useTaoConfig } from "../../provider/tao-provider.js";
|
|
6
|
+
import { asTriggerChild } from "../../utils/overlay.js";
|
|
6
7
|
import { cx } from "../../utils/semantic.js";
|
|
7
8
|
import { Button } from "../button/button.js";
|
|
8
9
|
import { Collapse } from "../collapse/collapse.js";
|
|
@@ -464,7 +465,7 @@ const color_picker_PickerSurface = /*#__PURE__*/ forwardRef(function(props, ref)
|
|
|
464
465
|
return t1;
|
|
465
466
|
});
|
|
466
467
|
function ColorPicker(props) {
|
|
467
|
-
const $ = c(
|
|
468
|
+
const $ = c(185);
|
|
468
469
|
const config = useTaoConfig();
|
|
469
470
|
let t0;
|
|
470
471
|
if ($[0] !== props.defaultValue) {
|
|
@@ -491,6 +492,7 @@ function ColorPicker(props) {
|
|
|
491
492
|
const cachedGradient = useRef(null);
|
|
492
493
|
const hoverTimer = useRef(void 0);
|
|
493
494
|
const keyboardOpening = useRef(false);
|
|
495
|
+
const touchPointer = useRef(false);
|
|
494
496
|
let t2;
|
|
495
497
|
if ($[7] !== props.mode) {
|
|
496
498
|
t2 = props.mode ? Array.isArray(props.mode) ? props.mode : [
|
|
@@ -657,46 +659,57 @@ function ColorPicker(props) {
|
|
|
657
659
|
$[40] = t15;
|
|
658
660
|
} else t15 = $[40];
|
|
659
661
|
const openChange = t15;
|
|
662
|
+
const latestOpenChange = useRef(openChange);
|
|
660
663
|
let t16;
|
|
661
|
-
if ($[41] !== openChange
|
|
664
|
+
if ($[41] !== openChange) {
|
|
662
665
|
t16 = ()=>{
|
|
663
|
-
|
|
664
|
-
if ("hover" === props.trigger) {
|
|
665
|
-
keyboardOpening.current = false;
|
|
666
|
-
openChange(true);
|
|
667
|
-
}
|
|
666
|
+
latestOpenChange.current = openChange;
|
|
668
667
|
};
|
|
669
668
|
$[41] = openChange;
|
|
670
|
-
$[42] =
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
const enter = t16;
|
|
669
|
+
$[42] = t16;
|
|
670
|
+
} else t16 = $[42];
|
|
671
|
+
useLayoutEffect(t16);
|
|
674
672
|
let t17;
|
|
675
|
-
if ($[44] !==
|
|
676
|
-
t17 = ()=>{
|
|
677
|
-
if (
|
|
678
|
-
|
|
679
|
-
|
|
673
|
+
if ($[43] !== open || $[44] !== openChange || $[45] !== props.trigger) {
|
|
674
|
+
t17 = (event)=>{
|
|
675
|
+
if ("touch" === event.pointerType) return;
|
|
676
|
+
clearTimeout(hoverTimer.current);
|
|
677
|
+
if ("hover" === props.trigger && !open) {
|
|
678
|
+
keyboardOpening.current = false;
|
|
679
|
+
openChange(true);
|
|
680
680
|
}
|
|
681
681
|
};
|
|
682
|
-
$[
|
|
683
|
-
$[
|
|
682
|
+
$[43] = open;
|
|
683
|
+
$[44] = openChange;
|
|
684
|
+
$[45] = props.trigger;
|
|
684
685
|
$[46] = t17;
|
|
685
686
|
} else t17 = $[46];
|
|
686
|
-
const
|
|
687
|
+
const enter = t17;
|
|
687
688
|
let t18;
|
|
688
|
-
if ($[47] !==
|
|
689
|
-
t18 = (
|
|
689
|
+
if ($[47] !== hoverEnabled) {
|
|
690
|
+
t18 = (event_0)=>{
|
|
691
|
+
if (hoverEnabled && "touch" !== event_0.pointerType) {
|
|
692
|
+
clearTimeout(hoverTimer.current);
|
|
693
|
+
hoverTimer.current = setTimeout(()=>latestOpenChange.current(false), 100);
|
|
694
|
+
}
|
|
695
|
+
};
|
|
696
|
+
$[47] = hoverEnabled;
|
|
697
|
+
$[48] = t18;
|
|
698
|
+
} else t18 = $[48];
|
|
699
|
+
const leave = t18;
|
|
700
|
+
let t19;
|
|
701
|
+
if ($[49] !== format || $[50] !== props) {
|
|
702
|
+
t19 = (next_3)=>{
|
|
690
703
|
if (void 0 === props.format) setFormat(next_3);
|
|
691
704
|
if (format !== next_3) props.onFormatChange?.(next_3);
|
|
692
705
|
};
|
|
693
|
-
$[
|
|
694
|
-
$[
|
|
695
|
-
$[
|
|
696
|
-
} else
|
|
697
|
-
let
|
|
698
|
-
if ($[
|
|
699
|
-
|
|
706
|
+
$[49] = format;
|
|
707
|
+
$[50] = props;
|
|
708
|
+
$[51] = t19;
|
|
709
|
+
} else t19 = $[51];
|
|
710
|
+
let t20;
|
|
711
|
+
if ($[52] !== change || $[53] !== value) {
|
|
712
|
+
t20 = (next_4)=>{
|
|
700
713
|
setMode(next_4);
|
|
701
714
|
setActive(0);
|
|
702
715
|
const cached = value.isGradient() ? value : cachedGradient.current;
|
|
@@ -712,437 +725,447 @@ function ColorPicker(props) {
|
|
|
712
725
|
]));
|
|
713
726
|
cachedGradient.current = cached;
|
|
714
727
|
};
|
|
715
|
-
$[
|
|
716
|
-
$[
|
|
717
|
-
$[
|
|
718
|
-
} else
|
|
719
|
-
let
|
|
720
|
-
if ($[
|
|
721
|
-
|
|
728
|
+
$[52] = change;
|
|
729
|
+
$[53] = value;
|
|
730
|
+
$[54] = t20;
|
|
731
|
+
} else t20 = $[54];
|
|
732
|
+
let t21;
|
|
733
|
+
if ($[55] !== change || $[56] !== props) {
|
|
734
|
+
t21 = ()=>{
|
|
722
735
|
change(new external_color_js_Color(null));
|
|
723
736
|
props.onClear?.();
|
|
724
737
|
};
|
|
725
|
-
$[
|
|
726
|
-
$[
|
|
727
|
-
$[
|
|
728
|
-
} else
|
|
729
|
-
let
|
|
730
|
-
if ($[
|
|
731
|
-
|
|
738
|
+
$[55] = change;
|
|
739
|
+
$[56] = props;
|
|
740
|
+
$[57] = t21;
|
|
741
|
+
} else t21 = $[57];
|
|
742
|
+
let t22;
|
|
743
|
+
if ($[58] !== active || $[59] !== change || $[60] !== complete || $[61] !== format || $[62] !== mode || $[63] !== modes || $[64] !== panelValue || $[65] !== props || $[66] !== t19 || $[67] !== t20 || $[68] !== t21) {
|
|
744
|
+
t22 = {
|
|
732
745
|
props,
|
|
733
746
|
value: panelValue,
|
|
734
747
|
active,
|
|
735
748
|
setActive,
|
|
736
749
|
format,
|
|
737
|
-
setFormat:
|
|
750
|
+
setFormat: t19,
|
|
738
751
|
mode,
|
|
739
752
|
modes,
|
|
740
|
-
setMode:
|
|
753
|
+
setMode: t20,
|
|
741
754
|
change,
|
|
742
755
|
complete,
|
|
743
|
-
clear:
|
|
756
|
+
clear: t21
|
|
744
757
|
};
|
|
745
|
-
$[
|
|
746
|
-
$[
|
|
747
|
-
$[
|
|
748
|
-
$[
|
|
749
|
-
$[
|
|
750
|
-
$[
|
|
751
|
-
$[
|
|
752
|
-
$[
|
|
753
|
-
$[
|
|
754
|
-
$[
|
|
755
|
-
$[
|
|
756
|
-
$[
|
|
757
|
-
} else
|
|
758
|
-
const panelState =
|
|
759
|
-
let
|
|
760
|
-
if ($[
|
|
761
|
-
|
|
758
|
+
$[58] = active;
|
|
759
|
+
$[59] = change;
|
|
760
|
+
$[60] = complete;
|
|
761
|
+
$[61] = format;
|
|
762
|
+
$[62] = mode;
|
|
763
|
+
$[63] = modes;
|
|
764
|
+
$[64] = panelValue;
|
|
765
|
+
$[65] = props;
|
|
766
|
+
$[66] = t19;
|
|
767
|
+
$[67] = t20;
|
|
768
|
+
$[68] = t21;
|
|
769
|
+
$[69] = t22;
|
|
770
|
+
} else t22 = $[69];
|
|
771
|
+
const panelState = t22;
|
|
772
|
+
let t23;
|
|
773
|
+
if ($[70] === Symbol.for("react.memo_cache_sentinel")) {
|
|
774
|
+
t23 = /*#__PURE__*/ jsxs(Fragment, {
|
|
762
775
|
children: [
|
|
763
776
|
/*#__PURE__*/ jsx(PickerPanel, {}),
|
|
764
777
|
/*#__PURE__*/ jsx(PresetsPanel, {})
|
|
765
778
|
]
|
|
766
779
|
});
|
|
767
|
-
$[
|
|
768
|
-
} else
|
|
769
|
-
const basicPanel =
|
|
780
|
+
$[70] = t23;
|
|
781
|
+
} else t23 = $[70];
|
|
782
|
+
const basicPanel = t23;
|
|
770
783
|
const placement = props.placement ?? "bottomLeft";
|
|
771
784
|
const side = placement.startsWith("top") ? "top" : placement.startsWith("left") ? "left" : placement.startsWith("right") ? "right" : "bottom";
|
|
772
785
|
const align = "object" == typeof props.arrow && props.arrow.pointAtCenter ? "center" : /Left|Top/.test(placement) ? "start" : /Right|Bottom/.test(placement) ? "end" : "center";
|
|
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;
|
|
784
786
|
let t24;
|
|
785
|
-
if ($[75] !==
|
|
786
|
-
t24 =
|
|
787
|
-
$[
|
|
787
|
+
if ($[71] !== format || $[72] !== messages.colorGradient || $[73] !== messages.colorTransparent || $[74] !== props.showText || $[75] !== value) {
|
|
788
|
+
t24 = "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();
|
|
789
|
+
$[71] = format;
|
|
790
|
+
$[72] = messages.colorGradient;
|
|
791
|
+
$[73] = messages.colorTransparent;
|
|
792
|
+
$[74] = props.showText;
|
|
793
|
+
$[75] = value;
|
|
788
794
|
$[76] = t24;
|
|
789
795
|
} else t24 = $[76];
|
|
790
|
-
const
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
$[
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
const t29 = styles?.body;
|
|
801
|
-
const t30 = names?.content;
|
|
802
|
-
let t31;
|
|
796
|
+
const text = t24;
|
|
797
|
+
let t25;
|
|
798
|
+
if ($[77] !== props) {
|
|
799
|
+
t25 = Object.fromEntries(Object.entries(props).filter(_temp5));
|
|
800
|
+
$[77] = props;
|
|
801
|
+
$[78] = t25;
|
|
802
|
+
} else t25 = $[78];
|
|
803
|
+
const dataProps = t25;
|
|
804
|
+
const t26 = messages.chooseColor;
|
|
805
|
+
let t27;
|
|
803
806
|
if ($[79] !== value) {
|
|
804
|
-
|
|
807
|
+
t27 = value.toHexString();
|
|
805
808
|
$[79] = value;
|
|
806
|
-
$[80] =
|
|
807
|
-
} else
|
|
808
|
-
const
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
$[81] =
|
|
809
|
+
$[80] = t27;
|
|
810
|
+
} else t27 = $[80];
|
|
811
|
+
const t28 = `${t26} ${t27}`;
|
|
812
|
+
const t29 = names?.body;
|
|
813
|
+
const t30 = styles?.body;
|
|
814
|
+
const t31 = names?.content;
|
|
815
|
+
let t32;
|
|
816
|
+
if ($[81] !== value) {
|
|
817
|
+
t32 = value.toCssString();
|
|
818
|
+
$[81] = value;
|
|
816
819
|
$[82] = t32;
|
|
817
|
-
|
|
818
|
-
|
|
820
|
+
} else t32 = $[82];
|
|
821
|
+
const t33 = styles?.content;
|
|
819
822
|
let t34;
|
|
820
|
-
if ($[
|
|
821
|
-
t34 =
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
$[84] =
|
|
827
|
-
$[85] =
|
|
828
|
-
|
|
829
|
-
} else t34 = $[86];
|
|
823
|
+
if ($[83] !== t32 || $[84] !== t33) {
|
|
824
|
+
t34 = {
|
|
825
|
+
background: t32,
|
|
826
|
+
...t33
|
|
827
|
+
};
|
|
828
|
+
$[83] = t32;
|
|
829
|
+
$[84] = t33;
|
|
830
|
+
$[85] = t34;
|
|
831
|
+
} else t34 = $[85];
|
|
830
832
|
let t35;
|
|
831
|
-
if ($[
|
|
833
|
+
if ($[86] !== t31 || $[87] !== t34) {
|
|
832
834
|
t35 = /*#__PURE__*/ jsx("span", {
|
|
833
|
-
"data-tao-color-
|
|
834
|
-
className:
|
|
835
|
-
style:
|
|
836
|
-
children: t34
|
|
835
|
+
"data-tao-color-content": "",
|
|
836
|
+
className: t31,
|
|
837
|
+
style: t34
|
|
837
838
|
});
|
|
838
|
-
$[
|
|
839
|
-
$[
|
|
840
|
-
$[
|
|
841
|
-
|
|
842
|
-
} else t35 = $[90];
|
|
839
|
+
$[86] = t31;
|
|
840
|
+
$[87] = t34;
|
|
841
|
+
$[88] = t35;
|
|
842
|
+
} else t35 = $[88];
|
|
843
843
|
let t36;
|
|
844
|
-
if ($[
|
|
845
|
-
t36 =
|
|
844
|
+
if ($[89] !== t29 || $[90] !== t30 || $[91] !== t35) {
|
|
845
|
+
t36 = /*#__PURE__*/ jsx("span", {
|
|
846
|
+
"data-tao-color-body": "",
|
|
847
|
+
className: t29,
|
|
848
|
+
style: t30,
|
|
849
|
+
children: t35
|
|
850
|
+
});
|
|
851
|
+
$[89] = t29;
|
|
852
|
+
$[90] = t30;
|
|
853
|
+
$[91] = t35;
|
|
854
|
+
$[92] = t36;
|
|
855
|
+
} else t36 = $[92];
|
|
856
|
+
let t37;
|
|
857
|
+
if ($[93] !== names?.description || $[94] !== props.showText || $[95] !== styles?.description || $[96] !== text) {
|
|
858
|
+
t37 = props.showText && /*#__PURE__*/ jsx("span", {
|
|
846
859
|
"data-tao-color-description": "",
|
|
847
860
|
className: names?.description,
|
|
848
861
|
style: styles?.description,
|
|
849
862
|
children: text
|
|
850
863
|
});
|
|
851
|
-
$[
|
|
852
|
-
$[
|
|
853
|
-
$[
|
|
854
|
-
$[
|
|
855
|
-
$[
|
|
856
|
-
} else
|
|
857
|
-
let
|
|
858
|
-
if ($[
|
|
859
|
-
|
|
864
|
+
$[93] = names?.description;
|
|
865
|
+
$[94] = props.showText;
|
|
866
|
+
$[95] = styles?.description;
|
|
867
|
+
$[96] = text;
|
|
868
|
+
$[97] = t37;
|
|
869
|
+
} else t37 = $[97];
|
|
870
|
+
let t38;
|
|
871
|
+
if ($[98] !== disabled || $[99] !== t28 || $[100] !== t36 || $[101] !== t37) {
|
|
872
|
+
t38 = /*#__PURE__*/ jsxs("button", {
|
|
860
873
|
type: "button",
|
|
861
874
|
disabled: disabled,
|
|
862
|
-
"aria-label":
|
|
875
|
+
"aria-label": t28,
|
|
863
876
|
children: [
|
|
864
|
-
|
|
865
|
-
|
|
877
|
+
t36,
|
|
878
|
+
t37
|
|
866
879
|
]
|
|
867
880
|
});
|
|
868
|
-
$[
|
|
869
|
-
$[
|
|
870
|
-
$[
|
|
871
|
-
$[
|
|
872
|
-
$[
|
|
873
|
-
} else
|
|
874
|
-
const defaultTrigger =
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
881
|
+
$[98] = disabled;
|
|
882
|
+
$[99] = t28;
|
|
883
|
+
$[100] = t36;
|
|
884
|
+
$[101] = t37;
|
|
885
|
+
$[102] = t38;
|
|
886
|
+
} else t38 = $[102];
|
|
887
|
+
const defaultTrigger = t38;
|
|
888
|
+
let t39;
|
|
889
|
+
if ($[103] !== disabled || $[104] !== props.children) {
|
|
890
|
+
const customTrigger = /*#__PURE__*/ isValidElement(props.children) ? asTriggerChild(props.children) : props.children;
|
|
891
|
+
t39 = disabled && /*#__PURE__*/ isValidElement(customTrigger) && ("button" === customTrigger.type || customTrigger.type === Button) ? /*#__PURE__*/ cloneElement(customTrigger, {
|
|
879
892
|
disabled: true
|
|
880
893
|
}) : customTrigger;
|
|
881
|
-
$[
|
|
882
|
-
$[
|
|
883
|
-
$[
|
|
884
|
-
} else
|
|
885
|
-
const trigger =
|
|
886
|
-
const
|
|
887
|
-
const
|
|
888
|
-
const
|
|
889
|
-
let
|
|
890
|
-
if ($[
|
|
891
|
-
|
|
892
|
-
$[
|
|
893
|
-
$[
|
|
894
|
-
$[
|
|
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,
|
|
902
|
-
...props.style
|
|
903
|
-
};
|
|
904
|
-
$[108] = props.style;
|
|
894
|
+
$[103] = disabled;
|
|
895
|
+
$[104] = props.children;
|
|
896
|
+
$[105] = t39;
|
|
897
|
+
} else t39 = $[105];
|
|
898
|
+
const trigger = t39;
|
|
899
|
+
const t40 = "middle" === props.size ? "medium" : props.size ?? config.size;
|
|
900
|
+
const t41 = disabled || void 0;
|
|
901
|
+
const t42 = names?.root;
|
|
902
|
+
let t43;
|
|
903
|
+
if ($[106] !== props.className || $[107] !== props.rootClassName || $[108] !== t42) {
|
|
904
|
+
t43 = cx(t42, props.className, props.rootClassName);
|
|
905
|
+
$[106] = props.className;
|
|
906
|
+
$[107] = props.rootClassName;
|
|
907
|
+
$[108] = t42;
|
|
905
908
|
$[109] = t43;
|
|
906
|
-
|
|
907
|
-
|
|
909
|
+
} else t43 = $[109];
|
|
910
|
+
const t44 = styles?.root;
|
|
908
911
|
let t45;
|
|
909
|
-
if ($[
|
|
910
|
-
t45 =
|
|
911
|
-
|
|
912
|
-
|
|
912
|
+
if ($[110] !== props.style || $[111] !== t44) {
|
|
913
|
+
t45 = {
|
|
914
|
+
...t44,
|
|
915
|
+
...props.style
|
|
913
916
|
};
|
|
914
|
-
$[
|
|
915
|
-
$[
|
|
916
|
-
$[
|
|
917
|
-
|
|
918
|
-
} else t45 = $[114];
|
|
917
|
+
$[110] = props.style;
|
|
918
|
+
$[111] = t44;
|
|
919
|
+
$[112] = t45;
|
|
920
|
+
} else t45 = $[112];
|
|
919
921
|
let t46;
|
|
920
|
-
if ($[
|
|
921
|
-
t46 =
|
|
922
|
+
if ($[113] === Symbol.for("react.memo_cache_sentinel")) {
|
|
923
|
+
t46 = (event_1)=>{
|
|
924
|
+
touchPointer.current = "touch" === event_1.pointerType;
|
|
925
|
+
};
|
|
926
|
+
$[113] = t46;
|
|
927
|
+
} else t46 = $[113];
|
|
928
|
+
let t47;
|
|
929
|
+
if ($[114] !== disabled || $[115] !== open || $[116] !== props.trigger) {
|
|
930
|
+
t47 = (event_2)=>{
|
|
931
|
+
const touch = touchPointer.current;
|
|
932
|
+
touchPointer.current = false;
|
|
933
|
+
if (disabled || "hover" === props.trigger && 0 !== event_2.detail && !touch) event_2.preventDefault();
|
|
934
|
+
else if (!open) keyboardOpening.current = 0 === event_2.detail;
|
|
935
|
+
};
|
|
936
|
+
$[114] = disabled;
|
|
937
|
+
$[115] = open;
|
|
938
|
+
$[116] = props.trigger;
|
|
939
|
+
$[117] = t47;
|
|
940
|
+
} else t47 = $[117];
|
|
941
|
+
let t48;
|
|
942
|
+
if ($[118] !== defaultTrigger || $[119] !== disabled || $[120] !== trigger) {
|
|
943
|
+
t48 = /*#__PURE__*/ isValidElement(trigger) ? trigger : trigger || 0 === trigger ? /*#__PURE__*/ jsx("button", {
|
|
922
944
|
type: "button",
|
|
923
945
|
disabled: disabled,
|
|
924
946
|
children: trigger
|
|
925
947
|
}) : defaultTrigger;
|
|
926
|
-
$[
|
|
927
|
-
$[
|
|
928
|
-
$[
|
|
929
|
-
$[
|
|
930
|
-
} else
|
|
931
|
-
let
|
|
932
|
-
if ($[
|
|
933
|
-
|
|
948
|
+
$[118] = defaultTrigger;
|
|
949
|
+
$[119] = disabled;
|
|
950
|
+
$[120] = trigger;
|
|
951
|
+
$[121] = t48;
|
|
952
|
+
} else t48 = $[121];
|
|
953
|
+
let t49;
|
|
954
|
+
if ($[122] !== enter || $[123] !== leave || $[124] !== t47 || $[125] !== t48) {
|
|
955
|
+
t49 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Trigger, {
|
|
934
956
|
asChild: true,
|
|
935
957
|
onPointerEnter: enter,
|
|
936
958
|
onPointerLeave: leave,
|
|
937
|
-
|
|
938
|
-
|
|
959
|
+
onPointerDown: t46,
|
|
960
|
+
onClick: t47,
|
|
961
|
+
children: t48
|
|
939
962
|
});
|
|
940
|
-
$[
|
|
941
|
-
$[
|
|
942
|
-
$[
|
|
943
|
-
$[
|
|
944
|
-
$[
|
|
945
|
-
} else
|
|
946
|
-
let
|
|
947
|
-
if ($[
|
|
948
|
-
|
|
949
|
-
$[
|
|
950
|
-
$[
|
|
951
|
-
$[
|
|
952
|
-
} else
|
|
953
|
-
const
|
|
954
|
-
const
|
|
955
|
-
const
|
|
956
|
-
let
|
|
957
|
-
if ($[
|
|
958
|
-
|
|
959
|
-
if (!open)
|
|
963
|
+
$[122] = enter;
|
|
964
|
+
$[123] = leave;
|
|
965
|
+
$[124] = t47;
|
|
966
|
+
$[125] = t48;
|
|
967
|
+
$[126] = t49;
|
|
968
|
+
} else t49 = $[126];
|
|
969
|
+
let t50;
|
|
970
|
+
if ($[127] !== props.getPopupContainer || $[128] !== triggerElement) {
|
|
971
|
+
t50 = triggerElement ? props.getPopupContainer?.(triggerElement) : void 0;
|
|
972
|
+
$[127] = props.getPopupContainer;
|
|
973
|
+
$[128] = triggerElement;
|
|
974
|
+
$[129] = t50;
|
|
975
|
+
} else t50 = $[129];
|
|
976
|
+
const t51 = keepAlive || void 0;
|
|
977
|
+
const t52 = keepAlive || void 0;
|
|
978
|
+
const t53 = props.autoAdjustOverflow ?? true;
|
|
979
|
+
let t54;
|
|
980
|
+
if ($[130] !== open) {
|
|
981
|
+
t54 = (event_3)=>{
|
|
982
|
+
if (!open) event_3.preventDefault();
|
|
960
983
|
};
|
|
961
|
-
$[
|
|
962
|
-
$[
|
|
963
|
-
} else
|
|
964
|
-
const
|
|
965
|
-
const
|
|
966
|
-
let
|
|
967
|
-
if ($[
|
|
968
|
-
|
|
984
|
+
$[130] = open;
|
|
985
|
+
$[131] = t54;
|
|
986
|
+
} else t54 = $[131];
|
|
987
|
+
const t55 = names?.popup?.root;
|
|
988
|
+
const t56 = styles?.popup?.root;
|
|
989
|
+
let t57;
|
|
990
|
+
if ($[132] !== open) {
|
|
991
|
+
t57 = open ? {} : {
|
|
969
992
|
display: "none"
|
|
970
993
|
};
|
|
971
|
-
$[
|
|
972
|
-
$[
|
|
973
|
-
} else
|
|
974
|
-
let
|
|
975
|
-
if ($[
|
|
976
|
-
|
|
977
|
-
...
|
|
978
|
-
...
|
|
994
|
+
$[132] = open;
|
|
995
|
+
$[133] = t57;
|
|
996
|
+
} else t57 = $[133];
|
|
997
|
+
let t58;
|
|
998
|
+
if ($[134] !== t56 || $[135] !== t57) {
|
|
999
|
+
t58 = {
|
|
1000
|
+
...t56,
|
|
1001
|
+
...t57
|
|
979
1002
|
};
|
|
980
|
-
$[
|
|
981
|
-
$[
|
|
982
|
-
$[
|
|
983
|
-
} else
|
|
984
|
-
let
|
|
985
|
-
if ($[
|
|
986
|
-
|
|
987
|
-
if ("hover" === props.trigger && !keyboardOpening.current)
|
|
1003
|
+
$[134] = t56;
|
|
1004
|
+
$[135] = t57;
|
|
1005
|
+
$[136] = t58;
|
|
1006
|
+
} else t58 = $[136];
|
|
1007
|
+
let t59;
|
|
1008
|
+
if ($[137] !== props.trigger) {
|
|
1009
|
+
t59 = (event_4)=>{
|
|
1010
|
+
if ("hover" === props.trigger && !keyboardOpening.current) event_4.preventDefault();
|
|
988
1011
|
keyboardOpening.current = false;
|
|
989
1012
|
};
|
|
990
|
-
$[
|
|
991
|
-
$[
|
|
992
|
-
} else
|
|
993
|
-
const
|
|
994
|
-
const
|
|
995
|
-
const
|
|
996
|
-
let
|
|
997
|
-
if ($[
|
|
998
|
-
|
|
999
|
-
...
|
|
1000
|
-
...
|
|
1013
|
+
$[137] = props.trigger;
|
|
1014
|
+
$[138] = t59;
|
|
1015
|
+
} else t59 = $[138];
|
|
1016
|
+
const t60 = names?.popup?.container;
|
|
1017
|
+
const t61 = styles?.popupOverlayInner;
|
|
1018
|
+
const t62 = styles?.popup?.container;
|
|
1019
|
+
let t63;
|
|
1020
|
+
if ($[139] !== t61 || $[140] !== t62) {
|
|
1021
|
+
t63 = {
|
|
1022
|
+
...t61,
|
|
1023
|
+
...t62
|
|
1001
1024
|
};
|
|
1002
|
-
$[
|
|
1003
|
-
$[
|
|
1004
|
-
$[
|
|
1005
|
-
} else
|
|
1006
|
-
let
|
|
1007
|
-
if ($[
|
|
1008
|
-
|
|
1025
|
+
$[139] = t61;
|
|
1026
|
+
$[140] = t62;
|
|
1027
|
+
$[141] = t63;
|
|
1028
|
+
} else t63 = $[141];
|
|
1029
|
+
let t64;
|
|
1030
|
+
if ($[142] !== props.panelRender) {
|
|
1031
|
+
t64 = props.panelRender ? props.panelRender(basicPanel, {
|
|
1009
1032
|
components: {
|
|
1010
1033
|
Picker: PickerPanel,
|
|
1011
1034
|
Presets: PresetsPanel
|
|
1012
1035
|
}
|
|
1013
1036
|
}) : basicPanel;
|
|
1014
|
-
$[
|
|
1015
|
-
$[
|
|
1016
|
-
} else
|
|
1017
|
-
let
|
|
1018
|
-
if ($[
|
|
1019
|
-
|
|
1037
|
+
$[142] = props.panelRender;
|
|
1038
|
+
$[143] = t64;
|
|
1039
|
+
} else t64 = $[143];
|
|
1040
|
+
let t65;
|
|
1041
|
+
if ($[144] !== panelState || $[145] !== t64) {
|
|
1042
|
+
t65 = /*#__PURE__*/ jsx(PanelContext.Provider, {
|
|
1020
1043
|
value: panelState,
|
|
1021
|
-
children:
|
|
1044
|
+
children: t64
|
|
1022
1045
|
});
|
|
1023
|
-
$[
|
|
1024
|
-
$[
|
|
1025
|
-
$[
|
|
1026
|
-
} else
|
|
1027
|
-
let
|
|
1028
|
-
if ($[
|
|
1029
|
-
|
|
1046
|
+
$[144] = panelState;
|
|
1047
|
+
$[145] = t64;
|
|
1048
|
+
$[146] = t65;
|
|
1049
|
+
} else t65 = $[146];
|
|
1050
|
+
let t66;
|
|
1051
|
+
if ($[147] !== t60 || $[148] !== t63 || $[149] !== t65) {
|
|
1052
|
+
t66 = /*#__PURE__*/ jsx("div", {
|
|
1030
1053
|
"data-tao-color-container": "",
|
|
1031
|
-
className:
|
|
1032
|
-
style:
|
|
1033
|
-
children:
|
|
1054
|
+
className: t60,
|
|
1055
|
+
style: t63,
|
|
1056
|
+
children: t65
|
|
1034
1057
|
});
|
|
1035
|
-
$[
|
|
1036
|
-
$[
|
|
1037
|
-
$[
|
|
1038
|
-
$[
|
|
1039
|
-
} else
|
|
1040
|
-
let
|
|
1041
|
-
if ($[
|
|
1042
|
-
|
|
1058
|
+
$[147] = t60;
|
|
1059
|
+
$[148] = t63;
|
|
1060
|
+
$[149] = t65;
|
|
1061
|
+
$[150] = t66;
|
|
1062
|
+
} else t66 = $[150];
|
|
1063
|
+
let t67;
|
|
1064
|
+
if ($[151] !== props.arrow) {
|
|
1065
|
+
t67 = false !== props.arrow && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Arrow, {
|
|
1043
1066
|
"data-tao-color-arrow": ""
|
|
1044
1067
|
});
|
|
1045
|
-
$[
|
|
1046
|
-
$[
|
|
1047
|
-
} else
|
|
1048
|
-
let
|
|
1049
|
-
if ($[
|
|
1050
|
-
|
|
1068
|
+
$[151] = props.arrow;
|
|
1069
|
+
$[152] = t67;
|
|
1070
|
+
} else t67 = $[152];
|
|
1071
|
+
let t68;
|
|
1072
|
+
if ($[153] !== t66 || $[154] !== t67) {
|
|
1073
|
+
t68 = /*#__PURE__*/ jsxs(color_picker_PickerSurface, {
|
|
1051
1074
|
children: [
|
|
1052
|
-
|
|
1053
|
-
|
|
1075
|
+
t66,
|
|
1076
|
+
t67
|
|
1054
1077
|
]
|
|
1055
1078
|
});
|
|
1056
|
-
$[
|
|
1057
|
-
$[
|
|
1058
|
-
$[
|
|
1059
|
-
} else
|
|
1060
|
-
let
|
|
1061
|
-
if ($[
|
|
1062
|
-
|
|
1079
|
+
$[153] = t66;
|
|
1080
|
+
$[154] = t67;
|
|
1081
|
+
$[155] = t68;
|
|
1082
|
+
} else t68 = $[155];
|
|
1083
|
+
let t69;
|
|
1084
|
+
if ($[156] !== align || $[157] !== enter || $[158] !== leave || $[159] !== messages.colorPicker || $[160] !== side || $[161] !== t52 || $[162] !== t53 || $[163] !== t54 || $[164] !== t55 || $[165] !== t58 || $[166] !== t59 || $[167] !== t68) {
|
|
1085
|
+
t69 = /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
1063
1086
|
asChild: true,
|
|
1064
1087
|
children: /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Content, {
|
|
1065
1088
|
asChild: true,
|
|
1066
1089
|
"data-tao-color-popup": "",
|
|
1067
|
-
"data-tao-keep-alive":
|
|
1090
|
+
"data-tao-keep-alive": t52,
|
|
1068
1091
|
"aria-label": messages.colorPicker,
|
|
1069
1092
|
side: side,
|
|
1070
1093
|
align: align,
|
|
1071
1094
|
sideOffset: 6,
|
|
1072
1095
|
collisionPadding: 12,
|
|
1073
|
-
avoidCollisions:
|
|
1096
|
+
avoidCollisions: t53,
|
|
1074
1097
|
onPointerEnter: enter,
|
|
1075
1098
|
onPointerLeave: leave,
|
|
1076
|
-
onInteractOutside:
|
|
1077
|
-
className:
|
|
1078
|
-
style:
|
|
1079
|
-
onOpenAutoFocus:
|
|
1080
|
-
children:
|
|
1099
|
+
onInteractOutside: t54,
|
|
1100
|
+
className: t55,
|
|
1101
|
+
style: t58,
|
|
1102
|
+
onOpenAutoFocus: t59,
|
|
1103
|
+
children: t68
|
|
1081
1104
|
})
|
|
1082
1105
|
});
|
|
1083
|
-
$[
|
|
1084
|
-
$[
|
|
1085
|
-
$[
|
|
1086
|
-
$[
|
|
1087
|
-
$[
|
|
1088
|
-
$[
|
|
1089
|
-
$[
|
|
1090
|
-
$[
|
|
1091
|
-
$[
|
|
1092
|
-
$[
|
|
1093
|
-
$[
|
|
1094
|
-
$[
|
|
1095
|
-
$[
|
|
1096
|
-
} else
|
|
1097
|
-
let
|
|
1098
|
-
if ($[
|
|
1099
|
-
|
|
1100
|
-
container:
|
|
1101
|
-
forceMount:
|
|
1102
|
-
children:
|
|
1106
|
+
$[156] = align;
|
|
1107
|
+
$[157] = enter;
|
|
1108
|
+
$[158] = leave;
|
|
1109
|
+
$[159] = messages.colorPicker;
|
|
1110
|
+
$[160] = side;
|
|
1111
|
+
$[161] = t52;
|
|
1112
|
+
$[162] = t53;
|
|
1113
|
+
$[163] = t54;
|
|
1114
|
+
$[164] = t55;
|
|
1115
|
+
$[165] = t58;
|
|
1116
|
+
$[166] = t59;
|
|
1117
|
+
$[167] = t68;
|
|
1118
|
+
$[168] = t69;
|
|
1119
|
+
} else t69 = $[168];
|
|
1120
|
+
let t70;
|
|
1121
|
+
if ($[169] !== t50 || $[170] !== t51 || $[171] !== t69) {
|
|
1122
|
+
t70 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Portal, {
|
|
1123
|
+
container: t50,
|
|
1124
|
+
forceMount: t51,
|
|
1125
|
+
children: t69
|
|
1103
1126
|
});
|
|
1104
|
-
$[
|
|
1105
|
-
$[
|
|
1106
|
-
$[
|
|
1107
|
-
$[
|
|
1108
|
-
} else
|
|
1109
|
-
let
|
|
1110
|
-
if ($[
|
|
1111
|
-
|
|
1127
|
+
$[169] = t50;
|
|
1128
|
+
$[170] = t51;
|
|
1129
|
+
$[171] = t69;
|
|
1130
|
+
$[172] = t70;
|
|
1131
|
+
} else t70 = $[172];
|
|
1132
|
+
let t71;
|
|
1133
|
+
if ($[173] !== open || $[174] !== openChange || $[175] !== t49 || $[176] !== t70) {
|
|
1134
|
+
t71 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_popover_c8444160.Root, {
|
|
1112
1135
|
open: open,
|
|
1113
1136
|
onOpenChange: openChange,
|
|
1114
1137
|
children: [
|
|
1115
|
-
|
|
1116
|
-
|
|
1138
|
+
t49,
|
|
1139
|
+
t70
|
|
1117
1140
|
]
|
|
1118
1141
|
});
|
|
1119
|
-
$[
|
|
1120
|
-
$[
|
|
1121
|
-
$[
|
|
1122
|
-
$[
|
|
1123
|
-
$[
|
|
1124
|
-
} else
|
|
1125
|
-
let
|
|
1126
|
-
if ($[
|
|
1127
|
-
|
|
1142
|
+
$[173] = open;
|
|
1143
|
+
$[174] = openChange;
|
|
1144
|
+
$[175] = t49;
|
|
1145
|
+
$[176] = t70;
|
|
1146
|
+
$[177] = t71;
|
|
1147
|
+
} else t71 = $[177];
|
|
1148
|
+
let t72;
|
|
1149
|
+
if ($[178] !== dataProps || $[179] !== t40 || $[180] !== t41 || $[181] !== t43 || $[182] !== t45 || $[183] !== t71) {
|
|
1150
|
+
t72 = /*#__PURE__*/ jsx("span", {
|
|
1128
1151
|
ref: setTriggerElement,
|
|
1129
1152
|
"data-tao-color-picker": "",
|
|
1130
|
-
"data-tao-size":
|
|
1131
|
-
"data-disabled":
|
|
1132
|
-
className:
|
|
1133
|
-
style:
|
|
1153
|
+
"data-tao-size": t40,
|
|
1154
|
+
"data-disabled": t41,
|
|
1155
|
+
className: t43,
|
|
1156
|
+
style: t45,
|
|
1134
1157
|
...dataProps,
|
|
1135
|
-
children:
|
|
1158
|
+
children: t71
|
|
1136
1159
|
});
|
|
1137
|
-
$[
|
|
1138
|
-
$[
|
|
1139
|
-
$[
|
|
1140
|
-
$[
|
|
1141
|
-
$[
|
|
1142
|
-
$[
|
|
1143
|
-
$[
|
|
1144
|
-
} else
|
|
1145
|
-
return
|
|
1160
|
+
$[178] = dataProps;
|
|
1161
|
+
$[179] = t40;
|
|
1162
|
+
$[180] = t41;
|
|
1163
|
+
$[181] = t43;
|
|
1164
|
+
$[182] = t45;
|
|
1165
|
+
$[183] = t71;
|
|
1166
|
+
$[184] = t72;
|
|
1167
|
+
} else t72 = $[184];
|
|
1168
|
+
return t72;
|
|
1146
1169
|
}
|
|
1147
1170
|
function _temp5(t0) {
|
|
1148
1171
|
const [key] = t0;
|