cx 23.9.1 → 23.11.1
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/charts.js +6 -0
- package/dist/manifest.js +854 -854
- package/dist/svg.js +14 -2
- package/dist/widgets.css +43 -22
- package/dist/widgets.js +76 -18
- package/package.json +1 -1
- package/src/charts/PieLabel.js +7 -0
- package/src/svg/Text.d.ts +20 -19
- package/src/svg/Text.js +49 -33
- package/src/ui/Repeater.d.ts +60 -61
- package/src/widgets/List.d.ts +5 -6
- package/src/widgets/form/ColorPicker.js +43 -14
- package/src/widgets/form/ColorPicker.scss +275 -185
- package/src/widgets/form/ColorPicker.variables.scss +22 -21
- package/src/widgets/form/LookupField.d.ts +174 -171
- package/src/widgets/form/LookupField.js +8 -3
- package/src/widgets/form/UploadButton.d.ts +34 -34
- package/src/widgets/grid/Grid.d.ts +11 -11
- package/src/widgets/icons/pixel-picker.js +17 -0
- package/src/widgets/overlay/Tooltip.d.ts +1 -1
package/src/widgets/List.d.ts
CHANGED
|
@@ -4,9 +4,8 @@ import {
|
|
|
4
4
|
ClassProp,
|
|
5
5
|
CollatorOptions,
|
|
6
6
|
Config,
|
|
7
|
-
|
|
7
|
+
Prop,
|
|
8
8
|
RecordAlias,
|
|
9
|
-
RecordsProp,
|
|
10
9
|
SortersProp,
|
|
11
10
|
StringProp,
|
|
12
11
|
StructuredProp,
|
|
@@ -20,9 +19,9 @@ type KeyDownPipe = (event: KeyboardEvent) => void;
|
|
|
20
19
|
|
|
21
20
|
type PipeKeyDownCallback = (pipe: KeyDownPipe) => void;
|
|
22
21
|
|
|
23
|
-
interface ListProps extends StyledContainerProps {
|
|
22
|
+
interface ListProps<T = unknown> extends StyledContainerProps {
|
|
24
23
|
/** An array of records to be displayed in the list. */
|
|
25
|
-
records?:
|
|
24
|
+
records?: Prop<T[]>;
|
|
26
25
|
|
|
27
26
|
/** Used for sorting the list. */
|
|
28
27
|
sorters?: SortersProp;
|
|
@@ -65,7 +64,7 @@ interface ListProps extends StyledContainerProps {
|
|
|
65
64
|
filterParams?: StructuredProp;
|
|
66
65
|
|
|
67
66
|
/** Callback to create a filter function for given filter params. */
|
|
68
|
-
onCreateFilter?: (filterParams: any, instance: Instance) => (record:
|
|
67
|
+
onCreateFilter?: (filterParams: any, instance: Instance) => (record: T) => boolean;
|
|
69
68
|
|
|
70
69
|
/** Scrolls selection into the view. Default value is false. */
|
|
71
70
|
scrollSelectionIntoView?: boolean;
|
|
@@ -92,4 +91,4 @@ interface ListProps extends StyledContainerProps {
|
|
|
92
91
|
keyField?: string;
|
|
93
92
|
}
|
|
94
93
|
|
|
95
|
-
export class List extends Widget<ListProps
|
|
94
|
+
export class List<T = unknown> extends Widget<ListProps<T>> {}
|
|
@@ -9,6 +9,7 @@ import { getVendorPrefix } from "../../util/getVendorPrefix";
|
|
|
9
9
|
import { stopPropagation } from "../../util/eventCallbacks";
|
|
10
10
|
import { isString } from "../../util/isString";
|
|
11
11
|
import { getTopLevelBoundingClientRect } from "../../util/getTopLevelBoundingClientRect";
|
|
12
|
+
import PixelPickerIcon from "../icons/pixel-picker";
|
|
12
13
|
|
|
13
14
|
//TODO: Increase HSL precision in calculations, round only RGB values
|
|
14
15
|
//TODO: Resolve alpha input problems
|
|
@@ -35,13 +36,15 @@ export class ColorPicker extends Field {
|
|
|
35
36
|
switch (data.format) {
|
|
36
37
|
default:
|
|
37
38
|
case "rgba":
|
|
38
|
-
value = `rgba(${color.r.toFixed(0)},${color.g.toFixed(0)},${color.b.toFixed(0)},${
|
|
39
|
-
|
|
39
|
+
value = `rgba(${color.r.toFixed(0)},${color.g.toFixed(0)},${color.b.toFixed(0)},${
|
|
40
|
+
Math.round(color.a * 100) / 100
|
|
41
|
+
})`;
|
|
40
42
|
break;
|
|
41
43
|
|
|
42
44
|
case "hsla":
|
|
43
|
-
value = `hsla(${color.h.toFixed(0)},${color.s.toFixed(0)}%,${color.l.toFixed(0)}%,${
|
|
44
|
-
|
|
45
|
+
value = `hsla(${color.h.toFixed(0)},${color.s.toFixed(0)}%,${color.l.toFixed(0)}%,${
|
|
46
|
+
Math.round(color.a * 100) / 100
|
|
47
|
+
})`;
|
|
45
48
|
break;
|
|
46
49
|
|
|
47
50
|
case "hex":
|
|
@@ -114,16 +117,34 @@ class ColorPickerComponent extends VDOM.Component {
|
|
|
114
117
|
let { widget, data } = instance;
|
|
115
118
|
let { CSS, baseClass } = widget;
|
|
116
119
|
let hcolor = `hsl(${h},100%,50%)`;
|
|
117
|
-
let hsl = `hsl(${h},${s}%,${l}%)`;
|
|
118
120
|
let hsla = `hsla(${h.toFixed(0)},${s.toFixed(0)}%,${l.toFixed(0)}%,${a})`;
|
|
119
|
-
let rgb = `rgb(${r},${g},${b})`;
|
|
120
121
|
let rgba = `rgba(${r.toFixed(0)},${g.toFixed(0)},${b.toFixed(0)},${a})`;
|
|
121
122
|
let hex = rgbToHex(r, g, b);
|
|
123
|
+
let pixelPicker;
|
|
122
124
|
|
|
123
125
|
let alphaGradient = `${getVendorPrefix(
|
|
124
126
|
"css"
|
|
125
127
|
)}linear-gradient(left, hsla(${h},${s}%,${l}%,0) 0%, hsla(${h},${s}%,${l}%,1) 100%)`;
|
|
126
128
|
|
|
129
|
+
if (window.EyeDropper) {
|
|
130
|
+
pixelPicker = (
|
|
131
|
+
<div
|
|
132
|
+
className={CSS.element(baseClass, "pixel-picker")}
|
|
133
|
+
onClick={(e) => {
|
|
134
|
+
const eyeDropper = new EyeDropper();
|
|
135
|
+
eyeDropper
|
|
136
|
+
.open()
|
|
137
|
+
.then((result) => {
|
|
138
|
+
instance.set("value", result.sRGBHex);
|
|
139
|
+
})
|
|
140
|
+
.catch((e) => {});
|
|
141
|
+
}}
|
|
142
|
+
>
|
|
143
|
+
<PixelPickerIcon />
|
|
144
|
+
</div>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
127
148
|
return (
|
|
128
149
|
<div
|
|
129
150
|
className={data.classNames}
|
|
@@ -280,19 +301,27 @@ class ColorPickerComponent extends VDOM.Component {
|
|
|
280
301
|
</label>
|
|
281
302
|
</div>
|
|
282
303
|
<div className={CSS.element(baseClass, "preview")}>
|
|
304
|
+
<div
|
|
305
|
+
style={{
|
|
306
|
+
display: "flex",
|
|
307
|
+
alignItems: "center",
|
|
308
|
+
}}
|
|
309
|
+
>
|
|
310
|
+
<div
|
|
311
|
+
className={CSS.element(baseClass, "color")}
|
|
312
|
+
onClick={(e) => {
|
|
313
|
+
this.onColorClick(e);
|
|
314
|
+
}}
|
|
315
|
+
>
|
|
316
|
+
<div style={{ backgroundColor: hsla }}></div>
|
|
317
|
+
</div>
|
|
318
|
+
</div>
|
|
283
319
|
<div className={CSS.element(baseClass, "values")}>
|
|
284
320
|
<input value={hsla} readOnly />
|
|
285
321
|
<input value={rgba} readOnly />
|
|
286
322
|
<input value={hex} readOnly />
|
|
287
323
|
</div>
|
|
288
|
-
|
|
289
|
-
className={CSS.element(baseClass, "color")}
|
|
290
|
-
onClick={(e) => {
|
|
291
|
-
this.onColorClick(e);
|
|
292
|
-
}}
|
|
293
|
-
>
|
|
294
|
-
<div style={{ backgroundColor: hsla }}></div>
|
|
295
|
-
</div>
|
|
324
|
+
{pixelPicker}
|
|
296
325
|
</div>
|
|
297
326
|
</div>
|
|
298
327
|
</div>
|
|
@@ -1,185 +1,275 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//
|
|
4
|
-
// background-
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
background-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
$
|
|
20
|
-
$
|
|
21
|
-
|
|
22
|
-
$
|
|
23
|
-
)
|
|
24
|
-
$
|
|
25
|
-
|
|
26
|
-
$
|
|
27
|
-
|
|
28
|
-
.#{$block}#{$name} {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
background: -ms-linear-gradient(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
1
|
+
//@if cx-call-once("cx/widgets/checker-background") {
|
|
2
|
+
// %cx-checker-bg {
|
|
3
|
+
// background-repeat: repeat;
|
|
4
|
+
// background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuOWwzfk4AAAAfSURBVChTY9i5Y89/dAwEDOh4SCjEJohN8+BXuOc/AOttNBKJWD4sAAAAAElFTkSuQmCC");
|
|
5
|
+
// }
|
|
6
|
+
//}
|
|
7
|
+
|
|
8
|
+
@mixin cx-checker-background($tile-size: 4px, $color: rgba(gray, 0.5)) {
|
|
9
|
+
background-image: linear-gradient(45deg, $color 25%, transparent 25%),
|
|
10
|
+
linear-gradient(-45deg, $color 25%, transparent 25%), linear-gradient(45deg, transparent 75%, $color 75%),
|
|
11
|
+
linear-gradient(-45deg, transparent 75%, $color 75%);
|
|
12
|
+
background-size: 2 * $tile-size 2 * $tile-size;
|
|
13
|
+
background-position: 0 0, 0 $tile-size, $tile-size -#{$tile-size}, -#{$tile-size} 0px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@mixin cx-colorpicker(
|
|
17
|
+
$name: "colorpicker",
|
|
18
|
+
$state-style-map: $cx-colorpicker-state-style-map,
|
|
19
|
+
$placeholder: $cx-input-placeholder,
|
|
20
|
+
$besm: $cx-besm
|
|
21
|
+
) {
|
|
22
|
+
$block: map-get($besm, block);
|
|
23
|
+
$element: map-get($besm, element);
|
|
24
|
+
$state: map-get($besm, state);
|
|
25
|
+
|
|
26
|
+
$size: 220px;
|
|
27
|
+
|
|
28
|
+
.#{$block}#{$name} {
|
|
29
|
+
$styles: cx-deep-map-merge(
|
|
30
|
+
$state-style-map,
|
|
31
|
+
(
|
|
32
|
+
default: (
|
|
33
|
+
padding: 4px,
|
|
34
|
+
),
|
|
35
|
+
)
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
@include cx-add-state-rules($styles, default);
|
|
39
|
+
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
|
|
43
|
+
@media screen and (min-width: 500px) {
|
|
44
|
+
flex-direction: row;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:hover {
|
|
48
|
+
@include cx-add-state-rules($state-style-map, hover);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
input {
|
|
52
|
+
@include cxe-field-input(
|
|
53
|
+
$besm,
|
|
54
|
+
$state-style-map,
|
|
55
|
+
$placeholder: $placeholder,
|
|
56
|
+
$input: false,
|
|
57
|
+
$overrides: (
|
|
58
|
+
default: (
|
|
59
|
+
line-height: 14px,
|
|
60
|
+
font-size: 11px,
|
|
61
|
+
font-family: $cx-default-colorpicker-font-family,
|
|
62
|
+
)
|
|
63
|
+
)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.#{$element}#{$name}-picker {
|
|
69
|
+
width: $size;
|
|
70
|
+
height: $size;
|
|
71
|
+
margin: 4px;
|
|
72
|
+
//cursor: crosshair;
|
|
73
|
+
position: relative;
|
|
74
|
+
touch-action: none;
|
|
75
|
+
|
|
76
|
+
background: -webkit-linear-gradient(
|
|
77
|
+
top,
|
|
78
|
+
hsl(0, 0%, 100%) 0%,
|
|
79
|
+
hsla(0, 0%, 100%, 0) 50%,
|
|
80
|
+
hsla(0, 0%, 0%, 0) 50%,
|
|
81
|
+
hsl(0, 0%, 0%) 100%
|
|
82
|
+
),
|
|
83
|
+
-webkit-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%);
|
|
84
|
+
background: -moz-linear-gradient(
|
|
85
|
+
top,
|
|
86
|
+
hsl(0, 0%, 100%) 0%,
|
|
87
|
+
hsla(0, 0%, 100%, 0) 50%,
|
|
88
|
+
hsla(0, 0%, 0%, 0) 50%,
|
|
89
|
+
hsl(0, 0%, 0%) 100%
|
|
90
|
+
),
|
|
91
|
+
-moz-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%);
|
|
92
|
+
background: -ms-linear-gradient(
|
|
93
|
+
top,
|
|
94
|
+
hsl(0, 0%, 100%) 0%,
|
|
95
|
+
hsla(0, 0%, 100%, 0) 50%,
|
|
96
|
+
hsla(0, 0%, 0%, 0) 50%,
|
|
97
|
+
hsl(0, 0%, 0%) 100%
|
|
98
|
+
),
|
|
99
|
+
-ms-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%);
|
|
100
|
+
background: -o-linear-gradient(
|
|
101
|
+
top,
|
|
102
|
+
hsl(0, 0%, 100%) 0%,
|
|
103
|
+
hsla(0, 0%, 100%, 0) 50%,
|
|
104
|
+
hsla(0, 0%, 0%, 0) 50%,
|
|
105
|
+
hsl(0, 0%, 0%) 100%
|
|
106
|
+
),
|
|
107
|
+
-o-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.#{$element}#{$name}-indicator {
|
|
111
|
+
position: absolute;
|
|
112
|
+
border: 2px solid rgba(255, 255, 255, 0.8);
|
|
113
|
+
border-radius: 50%;
|
|
114
|
+
box-sizing: border-box;
|
|
115
|
+
width: 9px;
|
|
116
|
+
height: 9px;
|
|
117
|
+
left: calc(50% - 5px);
|
|
118
|
+
top: calc(50% - 5px);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.#{$element}#{$name}-hue {
|
|
122
|
+
height: 15px;
|
|
123
|
+
position: relative;
|
|
124
|
+
background: -moz-linear-gradient(
|
|
125
|
+
left,
|
|
126
|
+
#f00 0%,
|
|
127
|
+
#ff0 16.66%,
|
|
128
|
+
#0f0 33.33%,
|
|
129
|
+
#0ff 50%,
|
|
130
|
+
#00f 66.66%,
|
|
131
|
+
#f0f 83.33%,
|
|
132
|
+
#f00 100%
|
|
133
|
+
);
|
|
134
|
+
background: -webkit-linear-gradient(
|
|
135
|
+
left,
|
|
136
|
+
#f00 0%,
|
|
137
|
+
#ff0 16.66%,
|
|
138
|
+
#0f0 33.33%,
|
|
139
|
+
#0ff 50%,
|
|
140
|
+
#00f 66.66%,
|
|
141
|
+
#f0f 83.33%,
|
|
142
|
+
#f00 100%
|
|
143
|
+
);
|
|
144
|
+
background: -ms-linear-gradient(
|
|
145
|
+
left,
|
|
146
|
+
#f00 0%,
|
|
147
|
+
#ff0 16.66%,
|
|
148
|
+
#0f0 33.33%,
|
|
149
|
+
#0ff 50%,
|
|
150
|
+
#00f 66.66%,
|
|
151
|
+
#f0f 83.33%,
|
|
152
|
+
#f00 100%
|
|
153
|
+
);
|
|
154
|
+
background: -o-linear-gradient(
|
|
155
|
+
left,
|
|
156
|
+
#f00 0%,
|
|
157
|
+
#ff0 16.66%,
|
|
158
|
+
#0f0 33.33%,
|
|
159
|
+
#0ff 50%,
|
|
160
|
+
#00f 66.66%,
|
|
161
|
+
#f0f 83.33%,
|
|
162
|
+
#f00 100%
|
|
163
|
+
);
|
|
164
|
+
touch-action: none;
|
|
165
|
+
|
|
166
|
+
.#{$element}#{$name}-indicator {
|
|
167
|
+
border-color: rgba(0, 0, 0, 0.5);
|
|
168
|
+
height: calc(100% + 4px);
|
|
169
|
+
border-radius: 2px;
|
|
170
|
+
width: 4px;
|
|
171
|
+
top: -2px;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.#{$element}#{$name}-alpha {
|
|
176
|
+
height: 16px;
|
|
177
|
+
//@extend %cx-checker-bg;
|
|
178
|
+
@include cx-checker-background();
|
|
179
|
+
position: relative;
|
|
180
|
+
touch-action: none;
|
|
181
|
+
|
|
182
|
+
& > div:first-child {
|
|
183
|
+
width: 100%;
|
|
184
|
+
height: 100%;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.#{$element}#{$name}-indicator {
|
|
188
|
+
border-color: rgba(0, 0, 0, 0.5);
|
|
189
|
+
top: -2px;
|
|
190
|
+
height: calc(100% + 4px);
|
|
191
|
+
border-radius: 2px;
|
|
192
|
+
width: 4px;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.#{$element}#{$name}-details {
|
|
197
|
+
width: $size;
|
|
198
|
+
min-height: 170px;
|
|
199
|
+
margin: 4px;
|
|
200
|
+
display: flex;
|
|
201
|
+
flex-direction: column;
|
|
202
|
+
justify-content: space-between;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.#{$element}#{$name}-inputs {
|
|
206
|
+
label {
|
|
207
|
+
width: 25%;
|
|
208
|
+
display: inline-block;
|
|
209
|
+
text-align: right;
|
|
210
|
+
|
|
211
|
+
input {
|
|
212
|
+
margin-left: 2px;
|
|
213
|
+
width: 60%;
|
|
214
|
+
text-align: center;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.#{$element}#{$name}-pixel-picker {
|
|
220
|
+
display: flex;
|
|
221
|
+
width: 20px;
|
|
222
|
+
height: 20px;
|
|
223
|
+
flex-shrink: 0;
|
|
224
|
+
align-items: center;
|
|
225
|
+
margin-top: 4px;
|
|
226
|
+
|
|
227
|
+
svg path {
|
|
228
|
+
fill: currentColor;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&:hover {
|
|
232
|
+
cursor: pointer;
|
|
233
|
+
|
|
234
|
+
svg path {
|
|
235
|
+
fill: currentColor;
|
|
236
|
+
opacity: 0.5;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.#{$element}#{$name}-preview {
|
|
242
|
+
display: flex;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.#{$element}#{$name}-color {
|
|
246
|
+
@include cx-checker-background();
|
|
247
|
+
height: 64px;
|
|
248
|
+
width: 64px;
|
|
249
|
+
border-radius: 4px;
|
|
250
|
+
align-self: flex-end;
|
|
251
|
+
|
|
252
|
+
& > div {
|
|
253
|
+
width: 100%;
|
|
254
|
+
height: 100%;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.#{$element}#{$name}-values {
|
|
259
|
+
flex-grow: 1;
|
|
260
|
+
margin: 0 8px;
|
|
261
|
+
|
|
262
|
+
input {
|
|
263
|
+
width: 100%;
|
|
264
|
+
display: block;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
input:not(:last-child) {
|
|
268
|
+
margin: 0 0 4px 0;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
@if (cx-should-include("cx/widgets/ColorPicker")) {
|
|
274
|
+
@include cx-colorpicker();
|
|
275
|
+
}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
$cx-default-colorpicker-font-
|
|
3
|
-
$cx-default-colorpicker-
|
|
4
|
-
$cx-default-colorpicker-
|
|
5
|
-
$cx-default-colorpicker-border-
|
|
6
|
-
$cx-default-colorpicker-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
$cx-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
)
|
|
1
|
+
$cx-default-colorpicker-font-family: "Consolas", monospace !default;
|
|
2
|
+
$cx-default-colorpicker-font-size: 11px !default;
|
|
3
|
+
$cx-default-colorpicker-background-color: $cx-default-input-background-color !default;
|
|
4
|
+
$cx-default-colorpicker-border-width: $cx-default-box-border-width !default;
|
|
5
|
+
$cx-default-colorpicker-border-color: $cx-default-input-border-color !default;
|
|
6
|
+
$cx-default-colorpicker-box-shadow: none !default;
|
|
7
|
+
|
|
8
|
+
$cx-colorpicker-state-style-map: cx-deep-map-merge(
|
|
9
|
+
$cx-input-state-style-map,
|
|
10
|
+
(
|
|
11
|
+
default: (
|
|
12
|
+
font-family: $cx-default-colorpicker-font-family,
|
|
13
|
+
font-size: $cx-default-colorpicker-font-size,
|
|
14
|
+
background-color: $cx-default-colorpicker-background-color,
|
|
15
|
+
border-width: $cx-default-colorpicker-border-width,
|
|
16
|
+
border-color: $cx-default-colorpicker-border-color,
|
|
17
|
+
box-shadow: $cx-default-colorpicker-box-shadow,
|
|
18
|
+
padding: 2px,
|
|
19
|
+
),
|
|
20
|
+
hover: (),
|
|
21
|
+
)
|
|
22
|
+
) !default;
|