tdesign-react 0.31.2-alpha.1 → 0.31.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/dist/tdesign.css +498 -0
- package/dist/tdesign.css.map +1 -1
- package/dist/tdesign.js +26543 -20076
- package/dist/tdesign.js.map +1 -1
- package/dist/tdesign.min.css +1 -1
- package/dist/tdesign.min.css.map +1 -1
- package/dist/tdesign.min.js +9 -3
- package/dist/tdesign.min.js.map +1 -1
- package/es/_chunks/{dep-5d29cc59.js → dep-7e7b26b4.js} +1 -1
- package/es/_chunks/{dep-5d29cc59.js.map → dep-7e7b26b4.js.map} +1 -1
- package/es/_common/js/color-picker/cmyk.d.ts +27 -0
- package/es/_common/js/color-picker/color.d.ts +154 -0
- package/es/_common/js/color-picker/gradient.d.ts +22 -0
- package/es/_util/useClickOutside.d.ts +1 -1
- package/es/_util/useClickOutside.js +51 -3
- package/es/_util/useClickOutside.js.map +1 -1
- package/es/_util/useDrag.d.ts +16 -0
- package/es/_util/useDrag.js +74 -0
- package/es/_util/useDrag.js.map +1 -0
- package/es/avatar/AvararGroup.js +1 -1
- package/es/avatar/Avatar.js +1 -1
- package/es/avatar/index.js +1 -1
- package/es/color-picker/ColorPicker.d.ts +4 -0
- package/es/color-picker/ColorPicker.js +241 -0
- package/es/color-picker/ColorPicker.js.map +1 -0
- package/es/color-picker/ColorPickerPanel.d.ts +7 -0
- package/es/color-picker/ColorPickerPanel.js +179 -0
- package/es/color-picker/ColorPickerPanel.js.map +1 -0
- package/es/color-picker/components/panel/alpha.d.ts +4 -0
- package/es/color-picker/components/panel/alpha.js +48 -0
- package/es/color-picker/components/panel/alpha.js.map +1 -0
- package/es/color-picker/components/panel/format/config.d.ts +19 -0
- package/es/color-picker/components/panel/format/config.js +90 -0
- package/es/color-picker/components/panel/format/config.js.map +1 -0
- package/es/color-picker/components/panel/format/index.d.ts +11 -0
- package/es/color-picker/components/panel/format/index.js +197 -0
- package/es/color-picker/components/panel/format/index.js.map +1 -0
- package/es/color-picker/components/panel/format/inputs.d.ts +3 -0
- package/es/color-picker/components/panel/format/inputs.js +223 -0
- package/es/color-picker/components/panel/format/inputs.js.map +1 -0
- package/es/color-picker/components/panel/header.d.ts +14 -0
- package/es/color-picker/components/panel/header.js +100 -0
- package/es/color-picker/components/panel/header.js.map +1 -0
- package/es/color-picker/components/panel/hue.d.ts +4 -0
- package/es/color-picker/components/panel/hue.js +32 -0
- package/es/color-picker/components/panel/hue.js.map +1 -0
- package/es/color-picker/components/panel/index.d.ts +4 -0
- package/es/color-picker/components/panel/index.js +456 -0
- package/es/color-picker/components/panel/index.js.map +1 -0
- package/es/color-picker/components/panel/linear-gradient.d.ts +3 -0
- package/es/color-picker/components/panel/linear-gradient.js +360 -0
- package/es/color-picker/components/panel/linear-gradient.js.map +1 -0
- package/es/color-picker/components/panel/saturation.d.ts +4 -0
- package/es/color-picker/components/panel/saturation.js +124 -0
- package/es/color-picker/components/panel/saturation.js.map +1 -0
- package/es/color-picker/components/panel/slider.d.ts +10 -0
- package/es/color-picker/components/panel/slider.js +106 -0
- package/es/color-picker/components/panel/slider.js.map +1 -0
- package/es/color-picker/components/panel/style/css.d.ts +1 -0
- package/es/color-picker/components/panel/style/css.js +1 -0
- package/es/color-picker/components/panel/style/index.d.ts +1 -0
- package/es/color-picker/components/panel/style/index.js +7 -0
- package/es/color-picker/components/panel/style/index.js.map +1 -0
- package/es/color-picker/components/panel/swatches.d.ts +11 -0
- package/es/color-picker/components/panel/swatches.js +134 -0
- package/es/color-picker/components/panel/swatches.js.map +1 -0
- package/es/color-picker/components/style/css.d.ts +1 -0
- package/es/color-picker/components/style/css.js +1 -0
- package/es/color-picker/components/style/index.d.ts +1 -0
- package/es/color-picker/components/style/index.js +7 -0
- package/es/color-picker/components/style/index.js.map +1 -0
- package/es/color-picker/components/trigger.d.ts +9 -0
- package/es/color-picker/components/trigger.js +125 -0
- package/es/color-picker/components/trigger.js.map +1 -0
- package/es/color-picker/const.d.ts +15 -0
- package/es/color-picker/const.js +22 -0
- package/es/color-picker/const.js.map +1 -0
- package/es/color-picker/hooks/useClassname.d.ts +2 -0
- package/es/color-picker/hooks/useClassname.js +46 -0
- package/es/color-picker/hooks/useClassname.js.map +1 -0
- package/es/color-picker/index.d.ts +10 -0
- package/es/color-picker/index.js +172 -0
- package/es/color-picker/index.js.map +1 -0
- package/es/color-picker/interface.d.ts +23 -0
- package/es/color-picker/interface.js +7 -0
- package/es/color-picker/interface.js.map +1 -0
- package/es/color-picker/style/css.d.ts +1 -0
- package/es/color-picker/style/css.js +1 -0
- package/es/color-picker/style/index.css +497 -0
- package/es/color-picker/style/index.d.ts +1 -0
- package/es/color-picker/style/index.js +7 -0
- package/es/color-picker/style/index.js.map +1 -0
- package/es/color-picker/type.d.ts +109 -0
- package/es/color-picker/type.js +7 -0
- package/es/color-picker/type.js.map +1 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +24 -1
- package/es/index.js.map +1 -1
- package/es/input/Input.js +1 -1
- package/es/input/Input.js.map +1 -1
- package/es/popup/hooks/useTriggerProps.js +28 -0
- package/es/popup/hooks/useTriggerProps.js.map +1 -1
- package/esm/_chunks/{dep-5d29cc59.js → dep-7e7b26b4.js} +1 -1
- package/esm/_chunks/{dep-5d29cc59.js.map → dep-7e7b26b4.js.map} +1 -1
- package/esm/_common/js/color-picker/cmyk.d.ts +27 -0
- package/esm/_common/js/color-picker/color.d.ts +154 -0
- package/esm/_common/js/color-picker/gradient.d.ts +22 -0
- package/esm/_util/useClickOutside.d.ts +1 -1
- package/esm/_util/useClickOutside.js +51 -3
- package/esm/_util/useClickOutside.js.map +1 -1
- package/esm/_util/useDrag.d.ts +16 -0
- package/esm/_util/useDrag.js +74 -0
- package/esm/_util/useDrag.js.map +1 -0
- package/esm/avatar/AvararGroup.js +1 -1
- package/esm/avatar/Avatar.js +1 -1
- package/esm/avatar/index.js +1 -1
- package/esm/color-picker/ColorPicker.d.ts +4 -0
- package/esm/color-picker/ColorPicker.js +250 -0
- package/esm/color-picker/ColorPicker.js.map +1 -0
- package/esm/color-picker/ColorPickerPanel.d.ts +7 -0
- package/esm/color-picker/ColorPickerPanel.js +188 -0
- package/esm/color-picker/ColorPickerPanel.js.map +1 -0
- package/esm/color-picker/components/panel/alpha.d.ts +4 -0
- package/esm/color-picker/components/panel/alpha.js +48 -0
- package/esm/color-picker/components/panel/alpha.js.map +1 -0
- package/esm/color-picker/components/panel/format/config.d.ts +19 -0
- package/esm/color-picker/components/panel/format/config.js +90 -0
- package/esm/color-picker/components/panel/format/config.js.map +1 -0
- package/esm/color-picker/components/panel/format/index.d.ts +11 -0
- package/esm/color-picker/components/panel/format/index.js +205 -0
- package/esm/color-picker/components/panel/format/index.js.map +1 -0
- package/esm/color-picker/components/panel/format/inputs.d.ts +3 -0
- package/esm/color-picker/components/panel/format/inputs.js +226 -0
- package/esm/color-picker/components/panel/format/inputs.js.map +1 -0
- package/esm/color-picker/components/panel/header.d.ts +14 -0
- package/esm/color-picker/components/panel/header.js +100 -0
- package/esm/color-picker/components/panel/header.js.map +1 -0
- package/esm/color-picker/components/panel/hue.d.ts +4 -0
- package/esm/color-picker/components/panel/hue.js +32 -0
- package/esm/color-picker/components/panel/hue.js.map +1 -0
- package/esm/color-picker/components/panel/index.d.ts +4 -0
- package/esm/color-picker/components/panel/index.js +465 -0
- package/esm/color-picker/components/panel/index.js.map +1 -0
- package/esm/color-picker/components/panel/linear-gradient.d.ts +3 -0
- package/esm/color-picker/components/panel/linear-gradient.js +363 -0
- package/esm/color-picker/components/panel/linear-gradient.js.map +1 -0
- package/esm/color-picker/components/panel/saturation.d.ts +4 -0
- package/esm/color-picker/components/panel/saturation.js +124 -0
- package/esm/color-picker/components/panel/saturation.js.map +1 -0
- package/esm/color-picker/components/panel/slider.d.ts +10 -0
- package/esm/color-picker/components/panel/slider.js +106 -0
- package/esm/color-picker/components/panel/slider.js.map +1 -0
- package/esm/color-picker/components/panel/style/css.d.ts +1 -0
- package/esm/color-picker/components/panel/style/index.d.ts +1 -0
- package/esm/color-picker/components/panel/style/index.js +1 -0
- package/esm/color-picker/components/panel/swatches.d.ts +11 -0
- package/esm/color-picker/components/panel/swatches.js +134 -0
- package/esm/color-picker/components/panel/swatches.js.map +1 -0
- package/esm/color-picker/components/style/css.d.ts +1 -0
- package/esm/color-picker/components/style/index.d.ts +1 -0
- package/esm/color-picker/components/style/index.js +1 -0
- package/esm/color-picker/components/trigger.d.ts +9 -0
- package/esm/color-picker/components/trigger.js +125 -0
- package/esm/color-picker/components/trigger.js.map +1 -0
- package/esm/color-picker/const.d.ts +15 -0
- package/esm/color-picker/const.js +22 -0
- package/esm/color-picker/const.js.map +1 -0
- package/esm/color-picker/hooks/useClassname.d.ts +2 -0
- package/esm/color-picker/hooks/useClassname.js +46 -0
- package/esm/color-picker/hooks/useClassname.js.map +1 -0
- package/esm/color-picker/index.d.ts +10 -0
- package/esm/color-picker/index.js +182 -0
- package/esm/color-picker/index.js.map +1 -0
- package/esm/color-picker/interface.d.ts +23 -0
- package/esm/color-picker/interface.js +7 -0
- package/esm/color-picker/interface.js.map +1 -0
- package/esm/color-picker/style/css.d.ts +1 -0
- package/esm/color-picker/style/index.d.ts +1 -0
- package/esm/color-picker/style/index.js +1 -0
- package/esm/color-picker/type.d.ts +109 -0
- package/esm/color-picker/type.js +7 -0
- package/esm/color-picker/type.js.map +1 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +25 -1
- package/esm/index.js.map +1 -1
- package/esm/input/Input.js +1 -1
- package/esm/input/Input.js.map +1 -1
- package/esm/popup/hooks/useTriggerProps.js +28 -0
- package/esm/popup/hooks/useTriggerProps.js.map +1 -1
- package/lib/_chunks/{dep-1c7ceac8.js → dep-9d6a55ed.js} +1 -1
- package/lib/_chunks/{dep-1c7ceac8.js.map → dep-9d6a55ed.js.map} +1 -1
- package/lib/_common/js/color-picker/cmyk.d.ts +27 -0
- package/lib/_common/js/color-picker/color.d.ts +154 -0
- package/lib/_common/js/color-picker/gradient.d.ts +22 -0
- package/lib/_util/useClickOutside.d.ts +1 -1
- package/lib/_util/useClickOutside.js +47 -3
- package/lib/_util/useClickOutside.js.map +1 -1
- package/lib/_util/useDrag.d.ts +16 -0
- package/lib/_util/useDrag.js +78 -0
- package/lib/_util/useDrag.js.map +1 -0
- package/lib/avatar/AvararGroup.js +1 -1
- package/lib/avatar/Avatar.js +1 -1
- package/lib/avatar/index.js +1 -1
- package/lib/color-picker/ColorPicker.d.ts +4 -0
- package/lib/color-picker/ColorPicker.js +232 -0
- package/lib/color-picker/ColorPicker.js.map +1 -0
- package/lib/color-picker/ColorPickerPanel.d.ts +7 -0
- package/lib/color-picker/ColorPickerPanel.js +170 -0
- package/lib/color-picker/ColorPickerPanel.js.map +1 -0
- package/lib/color-picker/components/panel/alpha.d.ts +4 -0
- package/lib/color-picker/components/panel/alpha.js +57 -0
- package/lib/color-picker/components/panel/alpha.js.map +1 -0
- package/lib/color-picker/components/panel/format/config.d.ts +19 -0
- package/lib/color-picker/components/panel/format/config.js +95 -0
- package/lib/color-picker/components/panel/format/config.js.map +1 -0
- package/lib/color-picker/components/panel/format/index.d.ts +11 -0
- package/lib/color-picker/components/panel/format/index.js +189 -0
- package/lib/color-picker/components/panel/format/index.js.map +1 -0
- package/lib/color-picker/components/panel/format/inputs.d.ts +3 -0
- package/lib/color-picker/components/panel/format/inputs.js +220 -0
- package/lib/color-picker/components/panel/format/inputs.js.map +1 -0
- package/lib/color-picker/components/panel/header.d.ts +14 -0
- package/lib/color-picker/components/panel/header.js +103 -0
- package/lib/color-picker/components/panel/header.js.map +1 -0
- package/lib/color-picker/components/panel/hue.d.ts +4 -0
- package/lib/color-picker/components/panel/hue.js +40 -0
- package/lib/color-picker/components/panel/hue.js.map +1 -0
- package/lib/color-picker/components/panel/index.d.ts +4 -0
- package/lib/color-picker/components/panel/index.js +448 -0
- package/lib/color-picker/components/panel/index.js.map +1 -0
- package/lib/color-picker/components/panel/linear-gradient.d.ts +3 -0
- package/lib/color-picker/components/panel/linear-gradient.js +358 -0
- package/lib/color-picker/components/panel/linear-gradient.js.map +1 -0
- package/lib/color-picker/components/panel/saturation.d.ts +4 -0
- package/lib/color-picker/components/panel/saturation.js +132 -0
- package/lib/color-picker/components/panel/saturation.js.map +1 -0
- package/lib/color-picker/components/panel/slider.d.ts +10 -0
- package/lib/color-picker/components/panel/slider.js +115 -0
- package/lib/color-picker/components/panel/slider.js.map +1 -0
- package/lib/color-picker/components/panel/style/css.d.ts +1 -0
- package/lib/color-picker/components/panel/style/index.d.ts +1 -0
- package/lib/color-picker/components/panel/swatches.d.ts +11 -0
- package/lib/color-picker/components/panel/swatches.js +139 -0
- package/lib/color-picker/components/panel/swatches.js.map +1 -0
- package/lib/color-picker/components/style/css.d.ts +1 -0
- package/lib/color-picker/components/style/index.d.ts +1 -0
- package/lib/color-picker/components/trigger.d.ts +9 -0
- package/lib/color-picker/components/trigger.js +126 -0
- package/lib/color-picker/components/trigger.js.map +1 -0
- package/lib/color-picker/const.d.ts +15 -0
- package/lib/color-picker/const.js +35 -0
- package/lib/color-picker/const.js.map +1 -0
- package/lib/color-picker/hooks/useClassname.d.ts +2 -0
- package/lib/color-picker/hooks/useClassname.js +46 -0
- package/lib/color-picker/hooks/useClassname.js.map +1 -0
- package/lib/color-picker/index.d.ts +10 -0
- package/lib/color-picker/index.js +160 -0
- package/lib/color-picker/index.js.map +1 -0
- package/lib/color-picker/interface.d.ts +23 -0
- package/lib/color-picker/interface.js +9 -0
- package/lib/color-picker/interface.js.map +1 -0
- package/lib/color-picker/style/css.d.ts +1 -0
- package/lib/color-picker/style/index.d.ts +1 -0
- package/lib/color-picker/type.d.ts +109 -0
- package/lib/color-picker/type.js +9 -0
- package/lib/color-picker/type.js.map +1 -0
- package/lib/index-lib.js +25 -1
- package/lib/index-lib.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +25 -1
- package/lib/index.js.map +1 -1
- package/lib/input/Input.js +1 -1
- package/lib/input/Input.js.map +1 -1
- package/lib/popup/hooks/useTriggerProps.js +24 -0
- package/lib/popup/hooks/useTriggerProps.js.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
.t-color-picker__panel {
|
|
2
|
+
padding: 0;
|
|
3
|
+
width: 280px;
|
|
4
|
+
background: var(--td-bg-color-container);
|
|
5
|
+
-webkit-box-shadow: var(--td-shadow-2), var(--td-shadow-inset-top), var(--td-shadow-inset-right), var(--td-shadow-inset-bottom), var(--td-shadow-inset-left);
|
|
6
|
+
box-shadow: var(--td-shadow-2), var(--td-shadow-inset-top), var(--td-shadow-inset-right), var(--td-shadow-inset-bottom), var(--td-shadow-inset-left);
|
|
7
|
+
-webkit-user-select: none;
|
|
8
|
+
-moz-user-select: none;
|
|
9
|
+
-ms-user-select: none;
|
|
10
|
+
user-select: none;
|
|
11
|
+
}
|
|
12
|
+
.t-popup__content .t-color-picker__panel {
|
|
13
|
+
background: transparent;
|
|
14
|
+
-webkit-box-shadow: unset;
|
|
15
|
+
box-shadow: unset;
|
|
16
|
+
}
|
|
17
|
+
.t-color-picker__icon {
|
|
18
|
+
width: 20px;
|
|
19
|
+
height: 20px;
|
|
20
|
+
display: -webkit-box;
|
|
21
|
+
display: -ms-flexbox;
|
|
22
|
+
display: flex;
|
|
23
|
+
-webkit-box-align: center;
|
|
24
|
+
-ms-flex-align: center;
|
|
25
|
+
align-items: center;
|
|
26
|
+
-webkit-box-pack: center;
|
|
27
|
+
-ms-flex-pack: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
font-size: 16px;
|
|
30
|
+
background: var(--td-bg-color-container);
|
|
31
|
+
-webkit-transition: color 0.2s cubic-bezier(0.38, 0, 0.24, 1);
|
|
32
|
+
transition: color 0.2s cubic-bezier(0.38, 0, 0.24, 1);
|
|
33
|
+
color: var(--td-text-color-secondary);
|
|
34
|
+
border-radius: 3px;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
.t-color-picker__icon:hover {
|
|
38
|
+
color: var(--td-brand-color);
|
|
39
|
+
background: var(--td-bg-color-container-hover);
|
|
40
|
+
}
|
|
41
|
+
.t-color-picker__icon.t-is-disabled {
|
|
42
|
+
color: var(--td-text-color-disabled);
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
}
|
|
45
|
+
.t-color-picker__head {
|
|
46
|
+
display: -webkit-box;
|
|
47
|
+
display: -ms-flexbox;
|
|
48
|
+
display: flex;
|
|
49
|
+
-webkit-box-align: center;
|
|
50
|
+
-ms-flex-align: center;
|
|
51
|
+
align-items: center;
|
|
52
|
+
-webkit-box-pack: justify;
|
|
53
|
+
-ms-flex-pack: justify;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
padding: 16px;
|
|
56
|
+
border-bottom: 1px solid var(--td-border-level-1-color);
|
|
57
|
+
position: relative;
|
|
58
|
+
z-index: 2;
|
|
59
|
+
}
|
|
60
|
+
.t-color-picker__head .t-color-picker__close {
|
|
61
|
+
-ms-flex-negative: 0;
|
|
62
|
+
flex-shrink: 0;
|
|
63
|
+
}
|
|
64
|
+
.t-color-picker__body {
|
|
65
|
+
padding: 16px;
|
|
66
|
+
}
|
|
67
|
+
.t-color-picker--bg-alpha {
|
|
68
|
+
background-color: #fff;
|
|
69
|
+
background-image: linear-gradient(45deg, #c5c5c5 25%, transparent 0, transparent 75%, #c5c5c5 0, #c5c5c5), linear-gradient(45deg, #c5c5c5 25%, transparent 0, transparent 75%, #c5c5c5 0, #c5c5c5);
|
|
70
|
+
background-size: 6px 6px;
|
|
71
|
+
background-position: 0 0, 3px 3px;
|
|
72
|
+
}
|
|
73
|
+
.t-color-picker__thumb {
|
|
74
|
+
position: absolute;
|
|
75
|
+
z-index: 1;
|
|
76
|
+
outline: none;
|
|
77
|
+
border-color: currentcolor;
|
|
78
|
+
width: 14px;
|
|
79
|
+
height: 14px;
|
|
80
|
+
border-radius: 50%;
|
|
81
|
+
-webkit-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
|
|
82
|
+
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
|
|
83
|
+
background: white;
|
|
84
|
+
color: var(--td-text-color-brand);
|
|
85
|
+
padding: 4px;
|
|
86
|
+
}
|
|
87
|
+
.t-color-picker__thumb::before {
|
|
88
|
+
content: "";
|
|
89
|
+
width: 100%;
|
|
90
|
+
height: 100%;
|
|
91
|
+
background: currentcolor;
|
|
92
|
+
border-radius: 50%;
|
|
93
|
+
display: block;
|
|
94
|
+
}
|
|
95
|
+
.t-color-picker__saturation {
|
|
96
|
+
height: 140px;
|
|
97
|
+
border-radius: 4px;
|
|
98
|
+
position: relative;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
background: transparent;
|
|
101
|
+
}
|
|
102
|
+
.t-color-picker__saturation::before,
|
|
103
|
+
.t-color-picker__saturation::after {
|
|
104
|
+
content: "";
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: 0;
|
|
107
|
+
left: 0;
|
|
108
|
+
width: 100%;
|
|
109
|
+
height: 100%;
|
|
110
|
+
}
|
|
111
|
+
.t-color-picker__saturation::before {
|
|
112
|
+
background: -webkit-gradient(linear, left top, right top, from(#fff), to(transparent));
|
|
113
|
+
background: linear-gradient(90deg, #fff, transparent);
|
|
114
|
+
}
|
|
115
|
+
.t-color-picker__saturation::after {
|
|
116
|
+
background: -webkit-gradient(linear, left bottom, left top, from(#000), to(transparent));
|
|
117
|
+
background: linear-gradient(0deg, #000, transparent);
|
|
118
|
+
}
|
|
119
|
+
.t-color-picker__saturation .t-color-picker__thumb {
|
|
120
|
+
width: 14px;
|
|
121
|
+
height: 14px;
|
|
122
|
+
border-radius: 50%;
|
|
123
|
+
-webkit-transform: translate(-50%, -50%);
|
|
124
|
+
transform: translate(-50%, -50%);
|
|
125
|
+
}
|
|
126
|
+
.t-color-picker__slider {
|
|
127
|
+
height: 8px;
|
|
128
|
+
position: relative;
|
|
129
|
+
border-radius: 8px;
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
color: transparent;
|
|
132
|
+
outline: none;
|
|
133
|
+
}
|
|
134
|
+
.t-color-picker__slider .t-color-picker__thumb {
|
|
135
|
+
-webkit-transform: translate(-7px, -50%);
|
|
136
|
+
transform: translate(-7px, -50%);
|
|
137
|
+
top: 50%;
|
|
138
|
+
}
|
|
139
|
+
.t-color-picker__slider .t-color-picker__rail {
|
|
140
|
+
position: absolute;
|
|
141
|
+
top: 0;
|
|
142
|
+
left: 0;
|
|
143
|
+
width: 100%;
|
|
144
|
+
height: 100%;
|
|
145
|
+
overflow: hidden;
|
|
146
|
+
border-radius: inherit;
|
|
147
|
+
}
|
|
148
|
+
.t-color-picker__hue,
|
|
149
|
+
.t-color-picker__alpha,
|
|
150
|
+
.t-color-picker__format {
|
|
151
|
+
margin: 16px 0 0 0;
|
|
152
|
+
}
|
|
153
|
+
.t-color-picker__hue {
|
|
154
|
+
background: -webkit-gradient(linear, left top, right top, from(red), color-stop(17%, #ff0), color-stop(33%, #0f0), color-stop(50%, #0ff), color-stop(67%, #00f), color-stop(83%, #f0f), to(red));
|
|
155
|
+
background: linear-gradient(90deg, red, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red);
|
|
156
|
+
}
|
|
157
|
+
.t-color-picker__alpha .t-color-picker__rail {
|
|
158
|
+
background: -webkit-gradient(linear, left top, right top, from(transparent), to(currentcolor));
|
|
159
|
+
background: linear-gradient(to right, transparent, currentcolor);
|
|
160
|
+
}
|
|
161
|
+
.t-color-picker__gradient {
|
|
162
|
+
padding: 0;
|
|
163
|
+
display: -webkit-box;
|
|
164
|
+
display: -ms-flexbox;
|
|
165
|
+
display: flex;
|
|
166
|
+
-webkit-box-align: center;
|
|
167
|
+
-ms-flex-align: center;
|
|
168
|
+
align-items: center;
|
|
169
|
+
margin-bottom: 16px;
|
|
170
|
+
}
|
|
171
|
+
.t-color-picker__gradient-slider {
|
|
172
|
+
-webkit-box-flex: 1;
|
|
173
|
+
-ms-flex: 1;
|
|
174
|
+
flex: 1;
|
|
175
|
+
}
|
|
176
|
+
.t-color-picker__gradient-degree {
|
|
177
|
+
position: relative;
|
|
178
|
+
-ms-flex-negative: 0;
|
|
179
|
+
flex-shrink: 0;
|
|
180
|
+
margin-left: 16px;
|
|
181
|
+
width: 42px;
|
|
182
|
+
}
|
|
183
|
+
.t-color-picker__gradient-degree .t-input {
|
|
184
|
+
margin: 0;
|
|
185
|
+
font-size: 12px;
|
|
186
|
+
}
|
|
187
|
+
.t-color-picker__gradient-degree .t-input-number {
|
|
188
|
+
width: 100%;
|
|
189
|
+
padding: 0;
|
|
190
|
+
}
|
|
191
|
+
.t-color-picker__gradient-preview {
|
|
192
|
+
-ms-flex-negative: 0;
|
|
193
|
+
flex-shrink: 0;
|
|
194
|
+
margin-left: 8px;
|
|
195
|
+
width: 42px;
|
|
196
|
+
height: 32px;
|
|
197
|
+
border-radius: 3px;
|
|
198
|
+
overflow: hidden;
|
|
199
|
+
}
|
|
200
|
+
.t-color-picker__gradient-preview .preview-inner {
|
|
201
|
+
display: block;
|
|
202
|
+
width: 100%;
|
|
203
|
+
height: 100%;
|
|
204
|
+
}
|
|
205
|
+
.t-color-picker__gradient .gradient-thumbs {
|
|
206
|
+
position: absolute;
|
|
207
|
+
width: 100%;
|
|
208
|
+
height: 100%;
|
|
209
|
+
top: 0;
|
|
210
|
+
left: 0;
|
|
211
|
+
margin: 0;
|
|
212
|
+
padding: 0;
|
|
213
|
+
list-style: none;
|
|
214
|
+
border-radius: inherit;
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
}
|
|
217
|
+
.t-color-picker__gradient .gradient-thumbs__item {
|
|
218
|
+
top: 50%;
|
|
219
|
+
left: 0;
|
|
220
|
+
-webkit-transform: translate(-50%, -50%);
|
|
221
|
+
transform: translate(-50%, -50%);
|
|
222
|
+
z-index: 0;
|
|
223
|
+
cursor: pointer;
|
|
224
|
+
}
|
|
225
|
+
.t-color-picker__gradient .gradient-thumbs__item::before {
|
|
226
|
+
display: none;
|
|
227
|
+
}
|
|
228
|
+
.t-color-picker__gradient .gradient-thumbs__item.t-is-active {
|
|
229
|
+
z-index: 1;
|
|
230
|
+
outline: 2px solid var(--td-text-color-brand);
|
|
231
|
+
}
|
|
232
|
+
.t-color-picker__gradient .gradient-thumbs__item-inner {
|
|
233
|
+
display: block;
|
|
234
|
+
width: 100%;
|
|
235
|
+
height: 100%;
|
|
236
|
+
border-radius: 50%;
|
|
237
|
+
overflow: hidden;
|
|
238
|
+
background-size: 4px 4px;
|
|
239
|
+
background-position: 0 0, 2px 2px;
|
|
240
|
+
}
|
|
241
|
+
.t-color-picker__gradient .gradient-thumbs__item-inner::before {
|
|
242
|
+
content: "";
|
|
243
|
+
width: 100%;
|
|
244
|
+
height: 100%;
|
|
245
|
+
display: block;
|
|
246
|
+
background-color: currentcolor;
|
|
247
|
+
}
|
|
248
|
+
.t-color-picker__format {
|
|
249
|
+
display: -webkit-box;
|
|
250
|
+
display: -ms-flexbox;
|
|
251
|
+
display: flex;
|
|
252
|
+
-webkit-box-align: center;
|
|
253
|
+
-ms-flex-align: center;
|
|
254
|
+
align-items: center;
|
|
255
|
+
-webkit-box-pack: justify;
|
|
256
|
+
-ms-flex-pack: justify;
|
|
257
|
+
justify-content: space-between;
|
|
258
|
+
}
|
|
259
|
+
.t-color-picker__format--item:first-child {
|
|
260
|
+
width: 64px;
|
|
261
|
+
-ms-flex-negative: 0;
|
|
262
|
+
flex-shrink: 0;
|
|
263
|
+
}
|
|
264
|
+
.t-color-picker__format--item:last-child {
|
|
265
|
+
-webkit-box-flex: 1;
|
|
266
|
+
-ms-flex: 1;
|
|
267
|
+
flex: 1;
|
|
268
|
+
overflow: hidden;
|
|
269
|
+
}
|
|
270
|
+
.t-color-picker__format--item .t-size-m,
|
|
271
|
+
.t-color-picker__format--item .t-input.t-size-m {
|
|
272
|
+
font-size: 12px;
|
|
273
|
+
}
|
|
274
|
+
.t-color-picker__format--item .t-input-number .t-input {
|
|
275
|
+
margin: 0;
|
|
276
|
+
}
|
|
277
|
+
.t-color-picker__format--item .t-select {
|
|
278
|
+
padding-right: 10px;
|
|
279
|
+
}
|
|
280
|
+
.t-color-picker__format--item .t-select__single {
|
|
281
|
+
margin-left: 4px;
|
|
282
|
+
}
|
|
283
|
+
.t-color-picker__format--item .t-select__right-icon {
|
|
284
|
+
margin: 0 4px;
|
|
285
|
+
}
|
|
286
|
+
.t-color-picker__format--item .input-group {
|
|
287
|
+
display: -webkit-box;
|
|
288
|
+
display: -ms-flexbox;
|
|
289
|
+
display: flex;
|
|
290
|
+
-webkit-box-align: center;
|
|
291
|
+
-ms-flex-align: center;
|
|
292
|
+
align-items: center;
|
|
293
|
+
-ms-flex-pack: distribute;
|
|
294
|
+
justify-content: space-around;
|
|
295
|
+
margin-left: 9px;
|
|
296
|
+
}
|
|
297
|
+
.t-color-picker__format--item .input-group__item {
|
|
298
|
+
-webkit-box-flex: 1;
|
|
299
|
+
-ms-flex: 1;
|
|
300
|
+
flex: 1;
|
|
301
|
+
overflow: hidden;
|
|
302
|
+
margin-left: -1px;
|
|
303
|
+
}
|
|
304
|
+
.t-color-picker__format--item .input-group__item .t-input {
|
|
305
|
+
padding: 0 1px;
|
|
306
|
+
font-size: 12px;
|
|
307
|
+
}
|
|
308
|
+
.t-color-picker__format--item .input-group__item .t-input:focus,
|
|
309
|
+
.t-color-picker__format--item .input-group__item .t-input:focus-within,
|
|
310
|
+
.t-color-picker__format--item .input-group__item .t-input:hover {
|
|
311
|
+
z-index: 1;
|
|
312
|
+
}
|
|
313
|
+
.t-color-picker__format--item .input-group__item:not(:first-child):not(:last-child) .t-input {
|
|
314
|
+
border-radius: 0;
|
|
315
|
+
}
|
|
316
|
+
.t-color-picker__format--item .input-group__item:first-child:not(:last-child) .t-input {
|
|
317
|
+
border-top-right-radius: 0;
|
|
318
|
+
border-bottom-right-radius: 0;
|
|
319
|
+
}
|
|
320
|
+
.t-color-picker__format--item .input-group__item:last-child:not(:first-child) .t-input {
|
|
321
|
+
border-top-left-radius: 0;
|
|
322
|
+
border-bottom-left-radius: 0;
|
|
323
|
+
}
|
|
324
|
+
.t-color-picker__format--item .input-group .t-input-number {
|
|
325
|
+
width: 100%;
|
|
326
|
+
padding: 0;
|
|
327
|
+
}
|
|
328
|
+
.t-color-picker__format-mode-select .t-select,
|
|
329
|
+
.t-color-picker__format-mode-select .t-input {
|
|
330
|
+
padding-right: 0;
|
|
331
|
+
}
|
|
332
|
+
.t-color-picker__format-mode-select .t-input--prefix > .t-input__suffix {
|
|
333
|
+
padding-left: 0;
|
|
334
|
+
}
|
|
335
|
+
.t-color-picker__format-mode-select .t-select__right-icon {
|
|
336
|
+
margin: 0 4px 0 0;
|
|
337
|
+
}
|
|
338
|
+
.t-color-picker__swatches-wrap {
|
|
339
|
+
margin: 16px 0 0 0;
|
|
340
|
+
position: relative;
|
|
341
|
+
}
|
|
342
|
+
.t-color-picker__swatches-wrap .t-color-picker__swatches + .t-color-picker__swatches {
|
|
343
|
+
margin-top: 16px;
|
|
344
|
+
}
|
|
345
|
+
.t-color-picker__swatches-wrap .t-color-picker__swatches--title {
|
|
346
|
+
font-size: 12px;
|
|
347
|
+
font-weight: normal;
|
|
348
|
+
margin: 0 0 12px;
|
|
349
|
+
padding: 0;
|
|
350
|
+
color: var(--td-text-color-primary);
|
|
351
|
+
display: -webkit-box;
|
|
352
|
+
display: -ms-flexbox;
|
|
353
|
+
display: flex;
|
|
354
|
+
-webkit-box-align: center;
|
|
355
|
+
-ms-flex-align: center;
|
|
356
|
+
align-items: center;
|
|
357
|
+
-webkit-box-pack: justify;
|
|
358
|
+
-ms-flex-pack: justify;
|
|
359
|
+
justify-content: space-between;
|
|
360
|
+
}
|
|
361
|
+
.t-color-picker__swatches-wrap .t-color-picker__swatches--actions {
|
|
362
|
+
margin-left: auto;
|
|
363
|
+
display: -webkit-box;
|
|
364
|
+
display: -ms-flexbox;
|
|
365
|
+
display: flex;
|
|
366
|
+
-webkit-box-align: center;
|
|
367
|
+
-ms-flex-align: center;
|
|
368
|
+
align-items: center;
|
|
369
|
+
font-size: 0;
|
|
370
|
+
}
|
|
371
|
+
.t-color-picker__swatches-wrap .t-color-picker__swatches--actions .t-color-picker__icon {
|
|
372
|
+
width: 16px;
|
|
373
|
+
height: 16px;
|
|
374
|
+
margin-left: 16px;
|
|
375
|
+
}
|
|
376
|
+
.t-color-picker__swatches-wrap .t-color-picker__swatches--remove {
|
|
377
|
+
position: relative;
|
|
378
|
+
}
|
|
379
|
+
.t-color-picker__swatches-wrap .t-color-picker__swatches--remove .t-popup {
|
|
380
|
+
position: absolute;
|
|
381
|
+
inset: auto auto 0 0;
|
|
382
|
+
margin: 0;
|
|
383
|
+
bottom: 30px;
|
|
384
|
+
left: 10px;
|
|
385
|
+
-webkit-transform: translateX(-50%);
|
|
386
|
+
transform: translateX(-50%);
|
|
387
|
+
cursor: default;
|
|
388
|
+
}
|
|
389
|
+
.t-color-picker__swatches-wrap .t-color-picker__swatches--remove .t-popconfirm__content {
|
|
390
|
+
width: 220px;
|
|
391
|
+
}
|
|
392
|
+
.t-color-picker__swatches-wrap .t-color-picker__swatches--items {
|
|
393
|
+
list-style: none;
|
|
394
|
+
display: grid;
|
|
395
|
+
grid-template-columns: repeat(10, 23px);
|
|
396
|
+
gap: 2px 2px;
|
|
397
|
+
max-height: 100px;
|
|
398
|
+
overflow-x: hidden;
|
|
399
|
+
overflow-y: auto;
|
|
400
|
+
margin: 0 -13px 0 -3px;
|
|
401
|
+
padding: 0;
|
|
402
|
+
}
|
|
403
|
+
.t-color-picker__swatches-wrap .t-color-picker__swatches--item {
|
|
404
|
+
display: -webkit-box;
|
|
405
|
+
display: -ms-flexbox;
|
|
406
|
+
display: flex;
|
|
407
|
+
width: 23px;
|
|
408
|
+
height: 23px;
|
|
409
|
+
border-radius: 50%;
|
|
410
|
+
padding: 2px;
|
|
411
|
+
border: 1px solid transparent;
|
|
412
|
+
overflow: hidden;
|
|
413
|
+
cursor: pointer;
|
|
414
|
+
-webkit-box-align: center;
|
|
415
|
+
-ms-flex-align: center;
|
|
416
|
+
align-items: center;
|
|
417
|
+
-webkit-box-pack: center;
|
|
418
|
+
-ms-flex-pack: center;
|
|
419
|
+
justify-content: center;
|
|
420
|
+
position: relative;
|
|
421
|
+
-webkit-transform-origin: center;
|
|
422
|
+
transform-origin: center;
|
|
423
|
+
-webkit-transition: all 0.2s cubic-bezier(0.38, 0, 0.24, 1);
|
|
424
|
+
transition: all 0.2s cubic-bezier(0.38, 0, 0.24, 1);
|
|
425
|
+
}
|
|
426
|
+
.t-color-picker__swatches-wrap .t-color-picker__swatches--item__color {
|
|
427
|
+
width: 100%;
|
|
428
|
+
height: 100%;
|
|
429
|
+
position: relative;
|
|
430
|
+
overflow: hidden;
|
|
431
|
+
border: 1px solid var(--td-component-border);
|
|
432
|
+
border-radius: 50%;
|
|
433
|
+
}
|
|
434
|
+
.t-color-picker__swatches-wrap .t-color-picker__swatches--item__inner {
|
|
435
|
+
width: 100%;
|
|
436
|
+
height: 100%;
|
|
437
|
+
display: block;
|
|
438
|
+
}
|
|
439
|
+
.t-color-picker__swatches-wrap .t-color-picker__swatches--item:not(.t-is-active):hover {
|
|
440
|
+
padding: 0;
|
|
441
|
+
}
|
|
442
|
+
.t-color-picker__swatches-wrap .t-color-picker__swatches--item.t-is-active .t-color-picker__swatches--item__color {
|
|
443
|
+
border-color: var(--td-text-color-brand);
|
|
444
|
+
}
|
|
445
|
+
.t-color-picker__trigger--default {
|
|
446
|
+
display: -webkit-inline-box;
|
|
447
|
+
display: -ms-inline-flexbox;
|
|
448
|
+
display: inline-flex;
|
|
449
|
+
-webkit-box-align: center;
|
|
450
|
+
-ms-flex-align: center;
|
|
451
|
+
align-items: center;
|
|
452
|
+
}
|
|
453
|
+
.t-color-picker__trigger--default > .t-input {
|
|
454
|
+
width: -webkit-fit-content;
|
|
455
|
+
width: -moz-fit-content;
|
|
456
|
+
width: fit-content;
|
|
457
|
+
}
|
|
458
|
+
.t-color-picker__trigger--default .t-input {
|
|
459
|
+
padding: 0 8px 0 6px;
|
|
460
|
+
}
|
|
461
|
+
.t-color-picker__trigger--default__color {
|
|
462
|
+
width: 24px;
|
|
463
|
+
height: 24px;
|
|
464
|
+
margin-right: 4px;
|
|
465
|
+
}
|
|
466
|
+
.t-color-picker__trigger--default__color .color-inner {
|
|
467
|
+
border: 1px solid var(--td-scrollbar-color);
|
|
468
|
+
display: block;
|
|
469
|
+
width: 100%;
|
|
470
|
+
height: 100%;
|
|
471
|
+
color: transparent;
|
|
472
|
+
position: relative;
|
|
473
|
+
}
|
|
474
|
+
.t-color-picker__panel.t-is-disabled .t-color-picker__saturation,
|
|
475
|
+
.t-color-picker__panel.t-is-disabled .t-color-picker__slider,
|
|
476
|
+
.t-color-picker__panel.t-is-disabled .t-color-picker__swatches--item {
|
|
477
|
+
opacity: 0.8;
|
|
478
|
+
cursor: not-allowed;
|
|
479
|
+
}
|
|
480
|
+
.t-color-picker__panel.t-is-disabled .t-color-picker__gradient-slider .gradient-thumbs,
|
|
481
|
+
.t-color-picker__panel.t-is-disabled .t-color-picker__gradient-slider .gradient-thumbs__item {
|
|
482
|
+
cursor: not-allowed;
|
|
483
|
+
}
|
|
484
|
+
.t-color-picker__panel.t-is-disabled .t-color-picker__swatches--item:hover {
|
|
485
|
+
padding: 2px;
|
|
486
|
+
}
|
|
487
|
+
.t-color-picker__select-options .t-select__dropdown-inner {
|
|
488
|
+
padding: 4px;
|
|
489
|
+
}
|
|
490
|
+
.t-color-picker__select-options .t-select-option {
|
|
491
|
+
height: 30px;
|
|
492
|
+
padding: 5px 8px;
|
|
493
|
+
font-size: 12px;
|
|
494
|
+
}
|
|
495
|
+
.t-color-picker__select-options .t-select-option + .t-select-option {
|
|
496
|
+
margin-top: 2px;
|
|
497
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
|
|
3
|
+
* */
|
|
4
|
+
import { InputProps } from '../input';
|
|
5
|
+
import { PopupProps } from '../popup';
|
|
6
|
+
import { SelectInputProps } from '../select-input';
|
|
7
|
+
import { TNode } from '../common';
|
|
8
|
+
export interface TdColorPickerProps {
|
|
9
|
+
/**
|
|
10
|
+
* 关闭按钮,值为 `true` 显示默认关闭按钮;值为 `false` 或 `undefined` 则不显示关闭按钮;值类型为函数,则表示自定义关闭按钮
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
closeBtn?: TNode;
|
|
14
|
+
/**
|
|
15
|
+
* 颜色模式选择。同时支持单色和渐变两种模式,可仅使用单色或者渐变其中一种模式,也可以同时使用。`monochrome` 表示单色,`linear-gradient` 表示渐变色
|
|
16
|
+
* @default ['monochrome', 'linear-gradient']
|
|
17
|
+
*/
|
|
18
|
+
colorModes?: Array<'monochrome' | 'linear-gradient'>;
|
|
19
|
+
/**
|
|
20
|
+
* 是否禁用组件
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* 是否开启透明通道
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
enableAlpha?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 格式化色值。`enableAlpha` 为真时,`RGBA/HSLA/HSVA` 等值有效
|
|
31
|
+
* @default RGB
|
|
32
|
+
*/
|
|
33
|
+
format?: 'RGB' | 'RGBA' | 'HSL' | 'HSLA' | 'HSB' | 'HSV' | 'HSVA' | 'HEX' | 'CMYK' | 'CSS';
|
|
34
|
+
/**
|
|
35
|
+
* 透传 Input 输入框组件全部属性
|
|
36
|
+
*/
|
|
37
|
+
inputProps?: InputProps;
|
|
38
|
+
/**
|
|
39
|
+
* 【开发中】是否允许选中多个颜色
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
multiple?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 透传 Popup 组件全部属性,如 `placement` `overlayStyle` `overlayClassName` `trigger`等
|
|
45
|
+
*/
|
|
46
|
+
popupProps?: PopupProps;
|
|
47
|
+
/**
|
|
48
|
+
* 最近使用的颜色。值为 [] 表示以组件内部的“最近使用颜色”为准,值长度大于 0 则以该值为准显示“最近使用颜色”。值为 null 则完全不显示“最近使用颜色”
|
|
49
|
+
* @default []
|
|
50
|
+
*/
|
|
51
|
+
recentColors?: boolean | Array<string>;
|
|
52
|
+
/**
|
|
53
|
+
* 最近使用的颜色。值为 [] 表示以组件内部的“最近使用颜色”为准,值长度大于 0 则以该值为准显示“最近使用颜色”。值为 null 则完全不显示“最近使用颜色”,非受控属性
|
|
54
|
+
* @default []
|
|
55
|
+
*/
|
|
56
|
+
defaultRecentColors?: boolean | Array<string>;
|
|
57
|
+
/**
|
|
58
|
+
* 透传 SelectInputProps 筛选器输入框组件全部属性
|
|
59
|
+
*/
|
|
60
|
+
selectInputProps?: SelectInputProps;
|
|
61
|
+
/**
|
|
62
|
+
* 系统预设的颜色样例,值为 `null` 或 `[]` 则不显示系统色,值为 `undefined` 会显示组件内置的系统默认色
|
|
63
|
+
*/
|
|
64
|
+
swatchColors?: Array<string>;
|
|
65
|
+
/**
|
|
66
|
+
* 色值
|
|
67
|
+
* @default ''
|
|
68
|
+
*/
|
|
69
|
+
value?: string;
|
|
70
|
+
/**
|
|
71
|
+
* 色值,非受控属性
|
|
72
|
+
* @default ''
|
|
73
|
+
*/
|
|
74
|
+
defaultValue?: string;
|
|
75
|
+
/**
|
|
76
|
+
* 选中的色值发生变化时触发,第一个参数 `value` 表示新色值,`context.color` 表示当前调色板控制器的色值,`context.trigger` 表示触发颜色变化的来源
|
|
77
|
+
*/
|
|
78
|
+
onChange?: (value: string, context: {
|
|
79
|
+
color: ColorObject;
|
|
80
|
+
trigger: ColorPickerChangeTrigger;
|
|
81
|
+
}) => void;
|
|
82
|
+
/**
|
|
83
|
+
* 调色板控制器的值变化时触发,`context.color` 指调色板控制器的值
|
|
84
|
+
*/
|
|
85
|
+
onPaletteBarChange?: (context: {
|
|
86
|
+
color: ColorObject;
|
|
87
|
+
}) => void;
|
|
88
|
+
/**
|
|
89
|
+
* 最近使用颜色发生变化时触发
|
|
90
|
+
*/
|
|
91
|
+
onRecentColorsChange?: (value: Array<string>) => void;
|
|
92
|
+
}
|
|
93
|
+
export declare type ColorPickerChangeTrigger = 'palette-saturation-brightness' | 'palette-saturation' | 'palette-brightness' | 'palette-hue-bar' | 'palette-alpha-bar' | 'input';
|
|
94
|
+
export interface ColorObject {
|
|
95
|
+
alpha: number;
|
|
96
|
+
css: string;
|
|
97
|
+
hex: string;
|
|
98
|
+
hex8: string;
|
|
99
|
+
hsl: string;
|
|
100
|
+
hsla: string;
|
|
101
|
+
hsv: string;
|
|
102
|
+
hsva: string;
|
|
103
|
+
rgb: string;
|
|
104
|
+
rgba: string;
|
|
105
|
+
saturation: number;
|
|
106
|
+
value: number;
|
|
107
|
+
isGradient: boolean;
|
|
108
|
+
linearGradient?: string;
|
|
109
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -55,6 +55,7 @@ export { Comment } from './comment/index.js';
|
|
|
55
55
|
export { Transfer } from './transfer/index.js';
|
|
56
56
|
export { Avatar } from './avatar/index.js';
|
|
57
57
|
export { Skeleton } from './skeleton/index.js';
|
|
58
|
+
export { ColorPicker, ColorPickerPanel } from './color-picker/index.js';
|
|
58
59
|
export { Card } from './card/index.js';
|
|
59
60
|
export { C as ConfigContext } from './_chunks/dep-bbad8591.js';
|
|
60
61
|
export { default as ConfigProvider, merge } from './config-provider/ConfigProvider.js';
|
|
@@ -415,12 +416,34 @@ import './transfer/Transfer.js';
|
|
|
415
416
|
import './transfer/TransferList.js';
|
|
416
417
|
import './transfer/utils.js';
|
|
417
418
|
import './transfer/type.js';
|
|
418
|
-
import './_chunks/dep-
|
|
419
|
+
import './_chunks/dep-7e7b26b4.js';
|
|
419
420
|
import 'use-resize-observer';
|
|
420
421
|
import './avatar/AvatarContext.js';
|
|
421
422
|
import './avatar/type.js';
|
|
422
423
|
import './skeleton/Skeleton.js';
|
|
423
424
|
import './skeleton/type.js';
|
|
425
|
+
import './color-picker/ColorPickerPanel.js';
|
|
426
|
+
import './color-picker/components/panel/index.js';
|
|
427
|
+
import './color-picker/hooks/useClassname.js';
|
|
428
|
+
import './color-picker/components/panel/header.js';
|
|
429
|
+
import './color-picker/const.js';
|
|
430
|
+
import './_common/js/color-picker/color.js';
|
|
431
|
+
import 'tinycolor2';
|
|
432
|
+
import './_common/js/color-picker/cmyk.js';
|
|
433
|
+
import './_common/js/color-picker/gradient.js';
|
|
434
|
+
import './color-picker/components/panel/linear-gradient.js';
|
|
435
|
+
import './color-picker/components/panel/saturation.js';
|
|
436
|
+
import './_util/useDrag.js';
|
|
437
|
+
import './color-picker/components/panel/hue.js';
|
|
438
|
+
import './color-picker/components/panel/slider.js';
|
|
439
|
+
import './color-picker/components/panel/alpha.js';
|
|
440
|
+
import './color-picker/components/panel/format/index.js';
|
|
441
|
+
import './color-picker/components/panel/format/inputs.js';
|
|
442
|
+
import './color-picker/components/panel/format/config.js';
|
|
443
|
+
import './color-picker/components/panel/swatches.js';
|
|
444
|
+
import './color-picker/ColorPicker.js';
|
|
445
|
+
import './color-picker/components/trigger.js';
|
|
446
|
+
import './color-picker/type.js';
|
|
424
447
|
import './card/Card.js';
|
|
425
448
|
import './locale/zh_CN.js';
|
|
426
449
|
import './_common/js/global-config/locale/zh_CN.js';
|
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/input/Input.js
CHANGED
|
@@ -208,7 +208,7 @@ var Input = forwardRefWithStatics(function (props, ref) {
|
|
|
208
208
|
onPaste: handlePaste
|
|
209
209
|
});
|
|
210
210
|
var renderInputNode = /* @__PURE__ */React.createElement("div", {
|
|
211
|
-
className: classNames(inputClass, "".concat(classPrefix, "-input"), (_classNames = {}, _defineProperty(_classNames, "".concat(classPrefix, "-is-readonly"), readonly), _defineProperty(_classNames, "".concat(classPrefix, "-is-disabled"), disabled), _defineProperty(_classNames, "".concat(classPrefix, "-is-focused"), isFocused), _defineProperty(_classNames, "".concat(classPrefix, "-size-s"), size === "small"), _defineProperty(_classNames, "".concat(classPrefix, "-size-l"), size === "large"), _defineProperty(_classNames, "".concat(classPrefix, "-align-").concat(align), align), _defineProperty(_classNames, "".concat(classPrefix, "-is-").concat(status), status), _defineProperty(_classNames, "".concat(classPrefix, "-input--prefix"), prefixIcon || labelContent), _defineProperty(_classNames, "".concat(classPrefix, "-input--suffix"), suffixIconContent || suffixContent), _defineProperty(_classNames, "".concat(classPrefix, "-input--focused"), isFocused), _classNames)),
|
|
211
|
+
className: classNames(inputClass, "".concat(classPrefix, "-input"), (_classNames = {}, _defineProperty(_classNames, "".concat(classPrefix, "-is-readonly"), readonly), _defineProperty(_classNames, "".concat(classPrefix, "-is-disabled"), disabled), _defineProperty(_classNames, "".concat(classPrefix, "-is-focused"), isFocused), _defineProperty(_classNames, "".concat(classPrefix, "-size-s"), size === "small"), _defineProperty(_classNames, "".concat(classPrefix, "-size-l"), size === "large"), _defineProperty(_classNames, "".concat(classPrefix, "-size-m"), size === "medium"), _defineProperty(_classNames, "".concat(classPrefix, "-align-").concat(align), align), _defineProperty(_classNames, "".concat(classPrefix, "-is-").concat(status), status), _defineProperty(_classNames, "".concat(classPrefix, "-input--prefix"), prefixIcon || labelContent), _defineProperty(_classNames, "".concat(classPrefix, "-input--suffix"), suffixIconContent || suffixContent), _defineProperty(_classNames, "".concat(classPrefix, "-input--focused"), isFocused), _classNames)),
|
|
212
212
|
onMouseEnter: handleMouseEnter,
|
|
213
213
|
onMouseLeave: handleMouseLeave,
|
|
214
214
|
onWheel: handleWheel,
|