@festo-ui/react-extra 9.0.0-dev.693 → 9.0.0-dev.696

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.
@@ -0,0 +1,60 @@
1
+ .fwe-color-indicator .fwe-popover-container {
2
+ position: relative;
3
+ }
4
+
5
+ .fwe-color-indicator .fwe-popover-container .fwe-popover {
6
+ background-color: var(--fwe-white);
7
+ font-size: var(--fwe-font-size-md);
8
+ border-radius: 4px;
9
+ padding: 8px 16px 16px;
10
+ line-height: 1rem;
11
+ box-shadow: 0 1px 4px #3333;
12
+ }
13
+
14
+ .fwe-color-indicator .fwe-backdrop {
15
+ background: none;
16
+ }
17
+
18
+ .fwe-color-indicator .fwe-color-label {
19
+ height: 18px;
20
+ font-size: var(--fwe-font-size-small);
21
+ font-weight: var(--fwe-font-weight-bold);
22
+ margin-bottom: 4px;
23
+ }
24
+
25
+ .fwe-color-indicator .fwe-color-container {
26
+ display: flex;
27
+ }
28
+
29
+ .fwe-color-indicator .fwe-color-container .fwe-color-box {
30
+ border: 1px solid var(--fwe-control-border);
31
+ background: var(--fwe-white);
32
+ border-radius: 4px;
33
+ width: 24px;
34
+ height: 24px;
35
+ }
36
+
37
+ .fwe-color-indicator .fwe-color-container .fwe-color-box .fwe-no-color-pattern {
38
+ margin: 2px;
39
+ }
40
+
41
+ .fwe-color-indicator .fwe-color-container .fwe-color-indicator-text {
42
+ margin-left: 8px;
43
+ }
44
+
45
+ .fwe-color-indicator.disabled {
46
+ pointer-events: none;
47
+ }
48
+
49
+ .fwe-color-indicator.disabled .fwe-color-label {
50
+ color: var(--fwe-text-disabled);
51
+ }
52
+
53
+ .fwe-color-indicator.disabled .fwe-color-container .fwe-color-box {
54
+ opacity: .5;
55
+ }
56
+
57
+ .fwe-color-indicator.disabled .fwe-color-container .fwe-color-indicator-text {
58
+ color: var(--fwe-text-disabled);
59
+ }
60
+
@@ -0,0 +1,11 @@
1
+ import { type JSX, type PropsWithChildren } from 'react';
2
+ import './ColorIndicator.scss';
3
+ export interface ColorIndicatorProps {
4
+ className?: string;
5
+ text: string;
6
+ label: string;
7
+ color?: string;
8
+ showPopOver?: boolean;
9
+ disabled?: boolean;
10
+ }
11
+ export declare function ColorIndicator({ text, label, color, className, showPopOver, children, disabled, }: PropsWithChildren<ColorIndicatorProps>): JSX.Element;
@@ -0,0 +1,125 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Popover } from "@festo-ui/react";
3
+ import classnames from "classnames";
4
+ import { useState } from "react";
5
+ import "./ColorIndicator.css";
6
+ function ColorIndicator({ text, label, color, className, showPopOver = false, children, disabled }) {
7
+ const classes = classnames('fwe-color-indicator', className, disabled);
8
+ const [isEditorOpen, setEditorOpen] = useState(false);
9
+ function getBorderColor() {
10
+ if (!color || '#FFFFFF' === color.toUpperCase() || '#F0F2F3' === color.toUpperCase()) return '#b6bec6';
11
+ return color;
12
+ }
13
+ const colorBox = /*#__PURE__*/ jsx("div", {
14
+ className: "fwe-color-box",
15
+ style: {
16
+ background: color,
17
+ borderColor: getBorderColor()
18
+ },
19
+ children: !color && /*#__PURE__*/ jsxs("svg", {
20
+ className: "fwe-no-color-pattern",
21
+ version: "1.1",
22
+ role: "img",
23
+ "aria-label": "No color selected",
24
+ xmlns: "http://www.w3.org/2000/svg",
25
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
26
+ id: "canvas1",
27
+ width: "18",
28
+ height: "18",
29
+ children: [
30
+ /*#__PURE__*/ jsx("defs", {
31
+ children: /*#__PURE__*/ jsxs("pattern", {
32
+ id: "bwsquare2px",
33
+ width: "4",
34
+ height: "4",
35
+ patternUnits: "userSpaceOnUse",
36
+ children: [
37
+ /*#__PURE__*/ jsx("rect", {
38
+ x: "0",
39
+ y: "0",
40
+ width: "2",
41
+ height: "2",
42
+ stroke: "none",
43
+ fill: "#ffffff"
44
+ }),
45
+ /*#__PURE__*/ jsx("rect", {
46
+ x: "2",
47
+ y: "0",
48
+ width: "2",
49
+ height: "2",
50
+ stroke: "none",
51
+ fill: "#e2e5e8"
52
+ }),
53
+ /*#__PURE__*/ jsx("rect", {
54
+ x: "0",
55
+ y: "2",
56
+ width: "2",
57
+ height: "2",
58
+ stroke: "none",
59
+ fill: "#e2e5e8"
60
+ }),
61
+ /*#__PURE__*/ jsx("rect", {
62
+ x: "2",
63
+ y: "2",
64
+ width: "2",
65
+ height: "2",
66
+ stroke: "none",
67
+ fill: "#ffffff"
68
+ })
69
+ ]
70
+ })
71
+ }),
72
+ /*#__PURE__*/ jsx("rect", {
73
+ x: "0",
74
+ y: "0",
75
+ rx: "0",
76
+ ry: "0",
77
+ width: "18",
78
+ height: "18",
79
+ fill: "url(#bwsquare2px)",
80
+ strokeWidth: "0"
81
+ })
82
+ ]
83
+ })
84
+ });
85
+ const wrapperProperties = showPopOver ? {
86
+ onClick: ()=>setEditorOpen((prevOpen)=>!prevOpen)
87
+ } : {};
88
+ const wrapper = (wrapperChildren)=>/*#__PURE__*/ jsxs("div", {
89
+ className: classes,
90
+ ...wrapperProperties,
91
+ children: [
92
+ /*#__PURE__*/ jsx("div", {
93
+ style: {
94
+ opacity: isEditorOpen ? 0 : 1
95
+ },
96
+ className: "fwe-color-label",
97
+ children: label
98
+ }),
99
+ /*#__PURE__*/ jsxs("div", {
100
+ className: "fwe-color-container",
101
+ children: [
102
+ wrapperChildren,
103
+ ' ',
104
+ text && /*#__PURE__*/ jsx("div", {
105
+ className: "fwe-color-indicator-text",
106
+ children: text
107
+ }),
108
+ ' '
109
+ ]
110
+ })
111
+ ]
112
+ });
113
+ return showPopOver ? /*#__PURE__*/ jsx(Popover, {
114
+ containerClassName: "fwe-popover-container--color-indicator",
115
+ position: "top",
116
+ flip: false,
117
+ wrapper: wrapper,
118
+ popoverContent: children,
119
+ open: isEditorOpen,
120
+ onStatusChange: setEditorOpen,
121
+ stopPropagation: true,
122
+ children: colorBox
123
+ }) : wrapper(colorBox);
124
+ }
125
+ export { ColorIndicator };
@@ -0,0 +1,5 @@
1
+ export declare function rgbToHsv(rgb: Record<'r' | 'g' | 'b', number>): Record<'h' | 's' | 'v', number> | undefined;
2
+ export declare function hsvToRgb(_hsv: Record<'h' | 's' | 'v', number>): Record<'r' | 'g' | 'b', number>;
3
+ export declare function numberToHex(rgb: number): string;
4
+ export declare function rgbToHex(_rgb: Record<'r' | 'g' | 'b', number>): string;
5
+ export declare function hexToRgb(hexString: string): Record<'r' | 'g' | 'b', number> | undefined;
@@ -0,0 +1,121 @@
1
+ function rgbToHsv(rgb) {
2
+ if (!rgb) return;
3
+ const r = limitToByte(rgb.r) / 255;
4
+ const g = limitToByte(rgb.g) / 255;
5
+ const b = limitToByte(rgb.b) / 255;
6
+ const max = Math.max(r, g, b);
7
+ const min = Math.min(r, g, b);
8
+ let h = max;
9
+ let s = max;
10
+ const v = max;
11
+ const d = max - min;
12
+ s = 0 === max ? 0 : d / max;
13
+ if (max === min) h = 0;
14
+ else {
15
+ switch(max){
16
+ case r:
17
+ h = (g - b) / d + (g < b ? 6 : 0);
18
+ break;
19
+ case g:
20
+ h = (b - r) / d + 2;
21
+ break;
22
+ case b:
23
+ h = (r - g) / d + 4;
24
+ break;
25
+ default:
26
+ }
27
+ h /= 6;
28
+ }
29
+ return {
30
+ h,
31
+ s,
32
+ v
33
+ };
34
+ }
35
+ function hsvToRgb(_hsv) {
36
+ const hsv = _hsv;
37
+ hsv.h = limitToOne(_hsv.h);
38
+ hsv.s = limitToOne(_hsv.s);
39
+ hsv.v = limitToOne(_hsv.v);
40
+ let r = 0;
41
+ let g = 0;
42
+ let b = 0;
43
+ const i = Math.floor(6 * hsv.h);
44
+ const f = 6 * hsv.h - i;
45
+ const p = hsv.v * (1 - hsv.s);
46
+ const q = hsv.v * (1 - f * hsv.s);
47
+ const t = hsv.v * (1 - (1 - f) * hsv.s);
48
+ switch(i % 6){
49
+ case 0:
50
+ r = hsv.v;
51
+ g = t;
52
+ b = p;
53
+ break;
54
+ case 1:
55
+ r = q;
56
+ g = hsv.v;
57
+ b = p;
58
+ break;
59
+ case 2:
60
+ r = p;
61
+ g = hsv.v;
62
+ b = t;
63
+ break;
64
+ case 3:
65
+ r = p;
66
+ g = q;
67
+ b = hsv.v;
68
+ break;
69
+ case 4:
70
+ r = t;
71
+ g = p;
72
+ b = hsv.v;
73
+ break;
74
+ case 5:
75
+ r = hsv.v;
76
+ g = p;
77
+ b = q;
78
+ break;
79
+ default:
80
+ }
81
+ return {
82
+ r: limitToByte(255 * r),
83
+ g: limitToByte(255 * g),
84
+ b: limitToByte(255 * b)
85
+ };
86
+ }
87
+ function limitToByte(num) {
88
+ if (num <= 0) return 0;
89
+ if (num >= 255) return 255;
90
+ return num;
91
+ }
92
+ function limitToOne(num) {
93
+ if (num <= 0) return 0;
94
+ if (num >= 1) return 1;
95
+ return num;
96
+ }
97
+ function numberToHex(rgb) {
98
+ let hex = Math.round(rgb).toString(16);
99
+ if (hex.length < 2) hex = `0${hex}`;
100
+ return hex.toUpperCase();
101
+ }
102
+ function rgbToHex(_rgb) {
103
+ const rgb = _rgb;
104
+ rgb.r = limitToByte(rgb.r);
105
+ rgb.g = limitToByte(rgb.g);
106
+ rgb.b = limitToByte(rgb.b);
107
+ const red = numberToHex(rgb.r);
108
+ const green = numberToHex(rgb.g);
109
+ const blue = numberToHex(rgb.b);
110
+ return `#${red}${green}${blue}`;
111
+ }
112
+ function hexToRgb(hexString) {
113
+ const numbersOnly = hexString.substring(1);
114
+ const aRgbHex = numbersOnly.match(/.{1,2}/g);
115
+ return aRgbHex ? {
116
+ r: parseInt(aRgbHex[0], 16),
117
+ g: parseInt(aRgbHex[1], 16),
118
+ b: parseInt(aRgbHex[2], 16)
119
+ } : void 0;
120
+ }
121
+ export { hexToRgb, hsvToRgb, numberToHex, rgbToHex, rgbToHsv };
@@ -0,0 +1,377 @@
1
+ .fwe-triangle.fwe-triangle-right, .fwe-triangle.fwe-triangle-left, .fwe-triangle.fwe-triangle-bottom, .fwe-triangle.fwe-triangle-top {
2
+ width: 17px;
3
+ height: 17px;
4
+ position: absolute;
5
+ overflow: hidden;
6
+ }
7
+
8
+ .fwe-triangle.fwe-triangle-right:after, .fwe-triangle.fwe-triangle-left:after, .fwe-triangle.fwe-triangle-bottom:after, .fwe-triangle.fwe-triangle-top:after {
9
+ content: "";
10
+ background: var(--fwe-white);
11
+ width: 12px;
12
+ height: 12px;
13
+ position: absolute;
14
+ transform: rotate(45deg);
15
+ box-shadow: 0 1px 4px #3333;
16
+ }
17
+
18
+ .fwe-popover.fwe-popover-menu, .fwe-popover {
19
+ background-color: var(--fwe-white);
20
+ border-radius: 4px;
21
+ box-shadow: 0 1px 4px #3333;
22
+ }
23
+
24
+ .fwe-popover {
25
+ font-size: var(--fwe-font-size-md);
26
+ padding: 8px;
27
+ line-height: 1rem;
28
+ }
29
+
30
+ .fwe-popover-container {
31
+ min-width: max-content;
32
+ display: inline-block;
33
+ position: relative;
34
+ }
35
+
36
+ .fwe-triangle.fwe-triangle-top {
37
+ top: -17px;
38
+ left: 50%;
39
+ transform: translateX(-8px);
40
+ }
41
+
42
+ .fwe-triangle.fwe-triangle-top:after {
43
+ top: 11px;
44
+ left: 3px;
45
+ }
46
+
47
+ .fwe-triangle.fwe-triangle-bottom {
48
+ top: 100%;
49
+ left: 50%;
50
+ transform: translateX(-8px);
51
+ }
52
+
53
+ .fwe-triangle.fwe-triangle-bottom:after {
54
+ top: -6px;
55
+ left: 3px;
56
+ }
57
+
58
+ .fwe-triangle.fwe-triangle-left {
59
+ top: 50%;
60
+ left: -17px;
61
+ transform: translateY(-8px);
62
+ }
63
+
64
+ .fwe-triangle.fwe-triangle-left:after {
65
+ top: 2px;
66
+ left: 11px;
67
+ }
68
+
69
+ .fwe-triangle.fwe-triangle-right {
70
+ top: 50%;
71
+ left: 100%;
72
+ transform: translateY(-8px);
73
+ }
74
+
75
+ .fwe-triangle.fwe-triangle-right:after {
76
+ top: 2px;
77
+ left: -6px;
78
+ }
79
+
80
+ .fwe-popover.fwe-popover-menu {
81
+ font-size: var(--fwe-font-size-base);
82
+ padding: 16px;
83
+ line-height: 1.5rem;
84
+ }
85
+
86
+ .fwe-popover.fwe-popover-menu .fwe-list-group .fwe-list-group-item {
87
+ border-bottom: none;
88
+ min-height: 36px;
89
+ padding: 0;
90
+ }
91
+
92
+ .fwe-popover.fwe-popover-menu .fwe-list-group .fwe-list-group-item button {
93
+ width: 100%;
94
+ margin-left: inherit;
95
+ text-align: left;
96
+ justify-content: unset;
97
+ height: 32px;
98
+ max-height: 32px;
99
+ padding: 0 8px 0 0;
100
+ display: inline-flex;
101
+ }
102
+
103
+ .fwe-popover.fwe-popover-menu .fwe-list-group .fwe-list-group-item button:hover {
104
+ color: var(--fwe-black);
105
+ }
106
+
107
+ .fwe-popover.fwe-popover-menu .fwe-list-group .fwe-list-group-item button i {
108
+ flex-wrap: nowrap;
109
+ justify-content: center;
110
+ align-items: center;
111
+ width: 32px;
112
+ height: 24px;
113
+ margin-right: 0;
114
+ display: inline-flex;
115
+ }
116
+
117
+ .fwe-popover.fwe-popover-menu .fwe-list-group .fwe-list-group-item button i:before {
118
+ display: inline-flex;
119
+ }
120
+
121
+ .fwe-popover.fwe-popover-menu .fwe-list-group .fwe-list-group-item button .fwe-svg-icon {
122
+ margin-left: 8px;
123
+ margin-right: 8px;
124
+ }
125
+
126
+ .fwe-popover.fwe-popover-menu .fwe-list-group .fwe-list-group-item button span {
127
+ height: 24px;
128
+ display: inline-flex;
129
+ }
130
+
131
+ .fwe-popover.fwe-popover-menu .fwe-list-group .fwe-list-group-item button [class*=" fwe-icon-"] {
132
+ margin-left: inherit;
133
+ }
134
+
135
+ .fwe-popover.fwe-popover-menu .fwe-list-group .fwe-list-group-item:hover {
136
+ color: var(--fwe-black);
137
+ background-color: #3333331a;
138
+ }
139
+
140
+ .fwe-popover.fwe-popover-menu .fwe-list-group .fwe-list-group-item:active {
141
+ background-color: #3333;
142
+ }
143
+
144
+ .fwe-popover .fwe-popover-legend {
145
+ margin: 16px;
146
+ line-height: 24px;
147
+ display: table;
148
+ }
149
+
150
+ .fwe-popover .fwe-popover-legend .fwe-popover-legend-content {
151
+ display: table-row;
152
+ }
153
+
154
+ .fwe-popover .fwe-popover-legend .fwe-popover-legend-content dt {
155
+ margin: 0;
156
+ padding-right: 8px;
157
+ display: table-cell;
158
+ }
159
+
160
+ .fwe-popover .fwe-popover-legend .fwe-popover-legend-content dd {
161
+ margin: 0;
162
+ display: table-cell;
163
+ }
164
+
165
+ .fwe-color-picker {
166
+ width: 216px;
167
+ }
168
+
169
+ .fwe-color-picker.fwe-alpha-active {
170
+ width: 245px;
171
+ }
172
+
173
+ .fwe-color-picker .fwe-gradient-picker {
174
+ width: 198px;
175
+ height: 198px;
176
+ margin: -7px;
177
+ position: relative;
178
+ }
179
+
180
+ .fwe-color-picker .fwe-gradient-picker .fwe-brightness-gradient {
181
+ background-image: linear-gradient(#0000, #000);
182
+ position: absolute;
183
+ inset: 7px;
184
+ }
185
+
186
+ .fwe-color-picker .fwe-gradient-picker .fwe-saturation-gradient {
187
+ position: absolute;
188
+ inset: 7px;
189
+ }
190
+
191
+ .fwe-color-picker .fwe-vertical-picker, .fwe-color-picker .fwe-alpha-picker, .fwe-color-picker .fwe-hue-picker {
192
+ width: 14px;
193
+ height: 198px;
194
+ margin: -7px -3px -7px 18px;
195
+ position: relative;
196
+ }
197
+
198
+ .fwe-color-picker .fwe-vertical-picker .fwe-picker-background, .fwe-color-picker .fwe-alpha-picker .fwe-picker-background, .fwe-color-picker .fwe-hue-picker .fwe-picker-background {
199
+ border-radius: 4px;
200
+ width: 8px;
201
+ height: 184px;
202
+ margin: 7px 3px;
203
+ }
204
+
205
+ .fwe-color-picker .fwe-vertical-picker .fwe-knob, .fwe-color-picker .fwe-alpha-picker .fwe-knob, .fwe-color-picker .fwe-hue-picker .fwe-knob {
206
+ left: -3px;
207
+ }
208
+
209
+ .fwe-color-picker .fwe-hue-picker .fwe-picker-background {
210
+ background-image: linear-gradient(red, #ff0, #0f0, #0ff, #00f, #f0f, red);
211
+ }
212
+
213
+ .fwe-color-picker .fwe-alpha-picker .fwe-no-color-pattern {
214
+ margin: 7px 3px;
215
+ position: absolute;
216
+ }
217
+
218
+ .fwe-color-picker .fwe-alpha-picker .fwe-picker-background {
219
+ position: absolute;
220
+ }
221
+
222
+ .fwe-color-picker .fwe-type-select {
223
+ display: flex;
224
+ position: relative;
225
+ }
226
+
227
+ .fwe-color-picker .fwe-type-select .fwe-type-indicator {
228
+ cursor: pointer;
229
+ background-color: #fff;
230
+ border: none;
231
+ flex-shrink: 1;
232
+ display: flex;
233
+ }
234
+
235
+ .fwe-color-picker .fwe-type-select .fwe-type-indicator:hover {
236
+ color: var(--fwe-hero);
237
+ }
238
+
239
+ .fwe-color-picker .fwe-type-select .fwe-type-indicator .fwe-input-type {
240
+ font-size: var(--fwe-font-size-small);
241
+ line-height: calc(var(--fwe-font-size-small) + 5px);
242
+ font-weight: var(--fwe-font-weight-bold);
243
+ }
244
+
245
+ .fwe-color-picker .fwe-type-select .fwe-popover {
246
+ z-index: 1;
247
+ position: absolute;
248
+ top: 24px;
249
+ left: 0;
250
+ }
251
+
252
+ .fwe-color-picker .fwe-type-select .fwe-popover .fwe-type-item {
253
+ cursor: pointer;
254
+ background-color: #fff;
255
+ border: none;
256
+ align-items: center;
257
+ padding: 8px;
258
+ display: flex;
259
+ }
260
+
261
+ .fwe-color-picker .fwe-type-select .fwe-popover .fwe-type-item:hover {
262
+ color: var(--fwe-hero);
263
+ }
264
+
265
+ .fwe-color-picker .fwe-type-select .fwe-popover .fwe-type-item .fwe-svg-icon {
266
+ opacity: 0;
267
+ margin-right: 8px;
268
+ }
269
+
270
+ .fwe-color-picker .fwe-type-select .fwe-popover .fwe-type-item.fwe-selected {
271
+ cursor: default;
272
+ }
273
+
274
+ .fwe-color-picker .fwe-type-select .fwe-popover .fwe-type-item.fwe-selected .fwe-svg-icon {
275
+ opacity: 1;
276
+ }
277
+
278
+ .fwe-color-picker input::-webkit-outer-spin-button {
279
+ -webkit-appearance: none;
280
+ margin: 0;
281
+ }
282
+
283
+ .fwe-color-picker input::-webkit-inner-spin-button {
284
+ -webkit-appearance: none;
285
+ margin: 0;
286
+ }
287
+
288
+ .fwe-color-picker input[type="number"] {
289
+ -moz-appearance: textfield;
290
+ }
291
+
292
+ .fwe-color-picker input {
293
+ text-align: center;
294
+ padding-right: 0 !important;
295
+ }
296
+
297
+ .fwe-color-picker .fwe-hex-input {
298
+ width: 75px;
299
+ margin-right: 16px;
300
+ }
301
+
302
+ .fwe-color-picker .fwe-red-input, .fwe-color-picker .fwe-green-input {
303
+ width: 32px;
304
+ margin-right: 8px;
305
+ }
306
+
307
+ .fwe-color-picker .fwe-blue-input {
308
+ width: 32px;
309
+ }
310
+
311
+ .fwe-color-picker .fwe-alpha-input span input {
312
+ width: 48px;
313
+ padding-right: 16px !important;
314
+ }
315
+
316
+ .fwe-color-picker .fwe-alpha-input .fwe-percent-char {
317
+ margin-left: -16px;
318
+ }
319
+
320
+ .fwe-color-picker .fwe-color-grid {
321
+ flex-wrap: wrap;
322
+ margin-bottom: -8px;
323
+ margin-right: -8px;
324
+ display: flex;
325
+ }
326
+
327
+ .fwe-color-picker .fwe-color-grid .fwe-color-item {
328
+ color: #fff;
329
+ border: none;
330
+ border-radius: 4px;
331
+ justify-content: center;
332
+ align-items: center;
333
+ width: 24px;
334
+ height: 24px;
335
+ margin-bottom: 8px;
336
+ margin-right: 8px;
337
+ padding: 0;
338
+ display: flex;
339
+ }
340
+
341
+ .fwe-color-picker .fwe-color-grid .fwe-color-item.fwe-white-item {
342
+ border: 1px solid var(--fwe-control-border);
343
+ color: #000;
344
+ }
345
+
346
+ .fwe-color-picker .fwe-color-grid .fwe-remove-color-button {
347
+ border: 1px solid var(--fwe-control-border);
348
+ width: 24px;
349
+ height: 24px;
350
+ color: var(--fwe-control);
351
+ border-radius: 4px;
352
+ justify-content: center;
353
+ align-items: center;
354
+ margin-bottom: 8px;
355
+ margin-right: 8px;
356
+ display: flex;
357
+ }
358
+
359
+ .fwe-color-picker .fwe-color-grid .fwe-remove-color-button .fwe-no-color-pattern {
360
+ margin: 2px;
361
+ }
362
+
363
+ .fwe-color-picker .fwe-color-grid .fwe-remove-color-button .fwe-svg-icon {
364
+ color: #0000;
365
+ position: absolute;
366
+ }
367
+
368
+ .fwe-color-picker .fwe-knob {
369
+ z-index: 1;
370
+ border: 2px solid #fff;
371
+ border-radius: 50%;
372
+ width: 14px;
373
+ height: 14px;
374
+ position: absolute;
375
+ box-shadow: 0 0 4px #00000026;
376
+ }
377
+
@@ -0,0 +1,12 @@
1
+ import './ColorPicker.scss';
2
+ export interface ColorPickerProps {
3
+ readonly className?: string;
4
+ readonly palette?: string[];
5
+ readonly useAlpha?: boolean;
6
+ readonly alpha?: number;
7
+ readonly paletteOnly?: boolean;
8
+ readonly color?: string;
9
+ readonly onChange?: (color?: string | null) => void;
10
+ readonly onAlphaChange?: (alpha?: number) => void;
11
+ }
12
+ export declare function ColorPicker({ className, palette, useAlpha, alpha, paletteOnly, color, onChange, onAlphaChange, }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;