@umbraco-ui/uui-color-picker 1.10.0 → 1.11.0
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/custom-elements.json +15 -2
- package/lib/index.js +10 -1
- package/lib/uui-color-picker.element.d.ts +8 -1
- package/package.json +4 -4
package/custom-elements.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"name": "disabled",
|
|
46
|
-
"description": "
|
|
46
|
+
"description": "Sets the color picker to disabled.",
|
|
47
47
|
"type": "boolean",
|
|
48
48
|
"default": "\"false\""
|
|
49
49
|
},
|
|
@@ -53,6 +53,12 @@
|
|
|
53
53
|
"type": "boolean",
|
|
54
54
|
"default": "\"false\""
|
|
55
55
|
},
|
|
56
|
+
{
|
|
57
|
+
"name": "readonly",
|
|
58
|
+
"description": "Sets the color picker to readonly mode.",
|
|
59
|
+
"type": "boolean",
|
|
60
|
+
"default": "\"false\""
|
|
61
|
+
},
|
|
56
62
|
{
|
|
57
63
|
"name": "uppercase",
|
|
58
64
|
"description": "By default, the value will be set in lowercase. Set this to true to set it in uppercase instead.",
|
|
@@ -111,7 +117,7 @@
|
|
|
111
117
|
{
|
|
112
118
|
"name": "disabled",
|
|
113
119
|
"attribute": "disabled",
|
|
114
|
-
"description": "
|
|
120
|
+
"description": "Sets the color picker to disabled.",
|
|
115
121
|
"type": "boolean",
|
|
116
122
|
"default": "\"false\""
|
|
117
123
|
},
|
|
@@ -122,6 +128,13 @@
|
|
|
122
128
|
"type": "boolean",
|
|
123
129
|
"default": "\"false\""
|
|
124
130
|
},
|
|
131
|
+
{
|
|
132
|
+
"name": "readonly",
|
|
133
|
+
"attribute": "readonly",
|
|
134
|
+
"description": "Sets the color picker to readonly mode.",
|
|
135
|
+
"type": "boolean",
|
|
136
|
+
"default": "\"false\""
|
|
137
|
+
},
|
|
125
138
|
{
|
|
126
139
|
"name": "uppercase",
|
|
127
140
|
"attribute": "uppercase",
|
package/lib/index.js
CHANGED
|
@@ -51,6 +51,7 @@ let UUIColorPickerElement = class extends LabelMixin("label", LitElement) {
|
|
|
51
51
|
this.inline = false;
|
|
52
52
|
this.disabled = false;
|
|
53
53
|
this.opacity = false;
|
|
54
|
+
this.readonly = false;
|
|
54
55
|
this.uppercase = false;
|
|
55
56
|
this.swatches = [
|
|
56
57
|
"#d0021b",
|
|
@@ -274,6 +275,7 @@ let UUIColorPickerElement = class extends LabelMixin("label", LitElement) {
|
|
|
274
275
|
.value="${this.value}"
|
|
275
276
|
.hue="${Math.round(this.hue)}"
|
|
276
277
|
?disabled=${this.disabled}
|
|
278
|
+
?readonly=${this.readonly}
|
|
277
279
|
@change=${this.handleGridChange}>
|
|
278
280
|
</uui-color-area>
|
|
279
281
|
<div class="color-picker__controls">
|
|
@@ -283,6 +285,7 @@ let UUIColorPickerElement = class extends LabelMixin("label", LitElement) {
|
|
|
283
285
|
class="hue-slider"
|
|
284
286
|
.value=${Math.round(this.hue)}
|
|
285
287
|
?disabled=${this.disabled}
|
|
288
|
+
?readonly=${this.readonly}
|
|
286
289
|
@change=${this.handleHueChange}>
|
|
287
290
|
</uui-color-slider>
|
|
288
291
|
${this.opacity ? html`
|
|
@@ -297,6 +300,7 @@ let UUIColorPickerElement = class extends LabelMixin("label", LitElement) {
|
|
|
297
300
|
this.lightness
|
|
298
301
|
)}
|
|
299
302
|
?disabled=${this.disabled}
|
|
303
|
+
?readonly=${this.readonly}
|
|
300
304
|
@change=${this.handleAlphaChange}>
|
|
301
305
|
</uui-color-slider>
|
|
302
306
|
` : ""}
|
|
@@ -323,6 +327,7 @@ let UUIColorPickerElement = class extends LabelMixin("label", LitElement) {
|
|
|
323
327
|
spellcheck="false"
|
|
324
328
|
.value=${live(this.inputValue)}
|
|
325
329
|
?disabled=${this.disabled}
|
|
330
|
+
?readonly=${this.readonly}
|
|
326
331
|
@keydown=${this.handleInputKeyDown}
|
|
327
332
|
@change=${this.handleInputChange}>
|
|
328
333
|
</uui-input>
|
|
@@ -337,7 +342,7 @@ let UUIColorPickerElement = class extends LabelMixin("label", LitElement) {
|
|
|
337
342
|
</uui-button>` : ""}
|
|
338
343
|
${hasEyeDropper ? html`<uui-button
|
|
339
344
|
label="Select a color"
|
|
340
|
-
?disabled=${this.disabled}
|
|
345
|
+
?disabled=${this.disabled || this.readonly}
|
|
341
346
|
@click=${this.handleEyeDropper}
|
|
342
347
|
compact>
|
|
343
348
|
<uui-icon-registry-essential>
|
|
@@ -357,6 +362,7 @@ let UUIColorPickerElement = class extends LabelMixin("label", LitElement) {
|
|
|
357
362
|
class="color-picker__swatches"
|
|
358
363
|
label="Swatches"
|
|
359
364
|
?disabled=${this.disabled}
|
|
365
|
+
?readonly=${this.readonly}
|
|
360
366
|
@change=${this.handleColorSwatchChange}>
|
|
361
367
|
${this.swatches.map(
|
|
362
368
|
(swatch) => html`<uui-color-swatch label="${swatch}" .value=${swatch}>
|
|
@@ -588,6 +594,9 @@ __decorateClass([
|
|
|
588
594
|
__decorateClass([
|
|
589
595
|
property({ type: Boolean })
|
|
590
596
|
], UUIColorPickerElement.prototype, "opacity", 2);
|
|
597
|
+
__decorateClass([
|
|
598
|
+
property({ type: Boolean, reflect: true })
|
|
599
|
+
], UUIColorPickerElement.prototype, "readonly", 2);
|
|
591
600
|
__decorateClass([
|
|
592
601
|
property({ type: Boolean })
|
|
593
602
|
], UUIColorPickerElement.prototype, "uppercase", 2);
|
|
@@ -70,7 +70,7 @@ export declare class UUIColorPickerElement extends UUIColorPickerElement_base {
|
|
|
70
70
|
**/
|
|
71
71
|
inline: boolean;
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* Sets the color picker to disabled.
|
|
74
74
|
* @attr
|
|
75
75
|
* @type {boolean}
|
|
76
76
|
* @default false
|
|
@@ -83,6 +83,13 @@ export declare class UUIColorPickerElement extends UUIColorPickerElement_base {
|
|
|
83
83
|
* @default false
|
|
84
84
|
**/
|
|
85
85
|
opacity: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Sets the color picker to readonly mode.
|
|
88
|
+
* @type {boolean}
|
|
89
|
+
* @attr
|
|
90
|
+
* @default false
|
|
91
|
+
*/
|
|
92
|
+
readonly: boolean;
|
|
86
93
|
/**
|
|
87
94
|
* By default, the value will be set in lowercase. Set this to true to set it in uppercase instead.
|
|
88
95
|
* @attr
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-color-picker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Umbraco",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"custom-elements.json"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@umbraco-ui/uui-base": "1.
|
|
34
|
-
"@umbraco-ui/uui-popover-container": "1.
|
|
33
|
+
"@umbraco-ui/uui-base": "1.11.0",
|
|
34
|
+
"@umbraco-ui/uui-popover-container": "1.11.0",
|
|
35
35
|
"colord": "^2.9.3"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://uui.umbraco.com/?path=/story/uui-color-picker",
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "414ce88901f82c5fc7d6be942779047bb34a1407"
|
|
47
47
|
}
|