@ui5/webcomponents 2.23.0-rc.0 → 2.23.0-rc.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 +33 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/ColorPicker.d.ts +2 -0
- package/dist/ColorPicker.js +26 -10
- package/dist/ColorPicker.js.map +1 -1
- package/dist/ColorPickerTemplate.js +2 -2
- package/dist/ColorPickerTemplate.js.map +1 -1
- package/dist/DayPicker.d.ts +3 -1
- package/dist/DayPicker.js +17 -3
- package/dist/DayPicker.js.map +1 -1
- package/dist/DayPickerTemplate.js +1 -1
- package/dist/DayPickerTemplate.js.map +1 -1
- package/dist/ExpandableText.d.ts +2 -0
- package/dist/ExpandableText.js +11 -0
- package/dist/ExpandableText.js.map +1 -1
- package/dist/Form.d.ts +9 -25
- package/dist/Form.js +42 -207
- package/dist/Form.js.map +1 -1
- package/dist/FormGroup.d.ts +11 -0
- package/dist/FormGroup.js +3 -0
- package/dist/FormGroup.js.map +1 -1
- package/dist/FormItem.d.ts +2 -0
- package/dist/FormItem.js.map +1 -1
- package/dist/FormTemplate.js +26 -15
- package/dist/FormTemplate.js.map +1 -1
- package/dist/ListItem.d.ts +2 -0
- package/dist/ListItem.js +4 -0
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemTemplate.js +1 -1
- package/dist/ListItemTemplate.js.map +1 -1
- package/dist/MenuItem.d.ts +1 -0
- package/dist/Popup.js +8 -3
- package/dist/Popup.js.map +1 -1
- package/dist/RadioButton.d.ts +1 -0
- package/dist/RadioButton.js +1 -0
- package/dist/RadioButton.js.map +1 -1
- package/dist/RadioButtonTemplate.js +1 -1
- package/dist/RadioButtonTemplate.js.map +1 -1
- package/dist/Tokenizer.js +10 -6
- package/dist/Tokenizer.js.map +1 -1
- package/dist/TreeItemBase.d.ts +1 -0
- package/dist/bundle.esm.js +3 -3
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/ColorPicker.css +1 -1
- package/dist/css/themes/Form.css +1 -1
- package/dist/css/themes/FormItem.css +1 -1
- package/dist/css/themes/FormItemSpan.css +1 -1
- package/dist/css/themes/FormLayout.css +1 -1
- package/dist/css/themes/RadioButton.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_auto/parameters-bundle.css +9 -10
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hc_auto/parameters-bundle.css +9 -10
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +36 -5
- package/dist/custom-elements.json +36 -5
- package/dist/form-utils/FormUtils.d.ts +9 -0
- package/dist/form-utils/FormUtils.js +47 -0
- package/dist/form-utils/FormUtils.js.map +1 -0
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_id.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hc_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/themes/ColorPicker.css.d.ts +1 -1
- package/dist/generated/themes/ColorPicker.css.js +1 -1
- package/dist/generated/themes/ColorPicker.css.js.map +1 -1
- package/dist/generated/themes/Form.css.d.ts +1 -1
- package/dist/generated/themes/Form.css.js +1 -1
- package/dist/generated/themes/Form.css.js.map +1 -1
- package/dist/generated/themes/FormItem.css.d.ts +1 -1
- package/dist/generated/themes/FormItem.css.js +1 -1
- package/dist/generated/themes/FormItem.css.js.map +1 -1
- package/dist/generated/themes/FormItemSpan.css.d.ts +1 -1
- package/dist/generated/themes/FormItemSpan.css.js +1 -1
- package/dist/generated/themes/FormItemSpan.css.js.map +1 -1
- package/dist/generated/themes/FormLayout.css.d.ts +1 -1
- package/dist/generated/themes/FormLayout.css.js +1 -1
- package/dist/generated/themes/FormLayout.css.js.map +1 -1
- package/dist/generated/themes/RadioButton.css.d.ts +1 -1
- package/dist/generated/themes/RadioButton.css.js +1 -1
- package/dist/generated/themes/RadioButton.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +9 -10
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js +9 -10
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +8 -3
- package/dist/web-types.json +20 -6
- package/package.json +9 -9
- package/src/ColorPickerTemplate.tsx +2 -2
- package/src/DayPickerTemplate.tsx +1 -0
- package/src/FormTemplate.tsx +41 -23
- package/src/ListItemTemplate.tsx +1 -1
- package/src/RadioButtonTemplate.tsx +1 -0
- package/src/i18n/messagebundle_ar.properties +1 -0
- package/src/i18n/messagebundle_bg.properties +1 -0
- package/src/i18n/messagebundle_ca.properties +1 -0
- package/src/i18n/messagebundle_cnr.properties +1 -0
- package/src/i18n/messagebundle_cs.properties +1 -0
- package/src/i18n/messagebundle_cy.properties +1 -0
- package/src/i18n/messagebundle_da.properties +1 -0
- package/src/i18n/messagebundle_de.properties +1 -0
- package/src/i18n/messagebundle_el.properties +1 -0
- package/src/i18n/messagebundle_en.properties +1 -0
- package/src/i18n/messagebundle_en_GB.properties +1 -0
- package/src/i18n/messagebundle_en_US_sappsd.properties +1 -0
- package/src/i18n/messagebundle_en_US_saprigi.properties +1 -0
- package/src/i18n/messagebundle_en_US_saptrc.properties +1 -0
- package/src/i18n/messagebundle_es.properties +1 -0
- package/src/i18n/messagebundle_es_MX.properties +1 -0
- package/src/i18n/messagebundle_et.properties +1 -0
- package/src/i18n/messagebundle_fi.properties +1 -0
- package/src/i18n/messagebundle_fr.properties +1 -0
- package/src/i18n/messagebundle_fr_CA.properties +1 -0
- package/src/i18n/messagebundle_hi.properties +1 -0
- package/src/i18n/messagebundle_hr.properties +2 -1
- package/src/i18n/messagebundle_hu.properties +1 -0
- package/src/i18n/messagebundle_id.properties +1 -0
- package/src/i18n/messagebundle_it.properties +1 -0
- package/src/i18n/messagebundle_iw.properties +1 -0
- package/src/i18n/messagebundle_ja.properties +1 -0
- package/src/i18n/messagebundle_kk.properties +1 -0
- package/src/i18n/messagebundle_ko.properties +1 -0
- package/src/i18n/messagebundle_lt.properties +1 -0
- package/src/i18n/messagebundle_lv.properties +1 -0
- package/src/i18n/messagebundle_mk.properties +1 -0
- package/src/i18n/messagebundle_ms.properties +1 -0
- package/src/i18n/messagebundle_nl.properties +1 -0
- package/src/i18n/messagebundle_no.properties +1 -0
- package/src/i18n/messagebundle_pl.properties +1 -0
- package/src/i18n/messagebundle_pt.properties +1 -0
- package/src/i18n/messagebundle_pt_PT.properties +1 -0
- package/src/i18n/messagebundle_ro.properties +1 -0
- package/src/i18n/messagebundle_ru.properties +1 -0
- package/src/i18n/messagebundle_sh.properties +1 -0
- package/src/i18n/messagebundle_sk.properties +1 -0
- package/src/i18n/messagebundle_sl.properties +1 -0
- package/src/i18n/messagebundle_sr.properties +1 -0
- package/src/i18n/messagebundle_sv.properties +1 -0
- package/src/i18n/messagebundle_th.properties +1 -0
- package/src/i18n/messagebundle_tr.properties +1 -0
- package/src/i18n/messagebundle_uk.properties +1 -0
- package/src/i18n/messagebundle_vi.properties +1 -0
- package/src/i18n/messagebundle_zh_CN.properties +1 -0
- package/src/i18n/messagebundle_zh_TW.properties +1 -0
- package/src/themes/ColorPicker.css +2 -0
- package/src/themes/Form.css +4 -2
- package/src/themes/FormItem.css +5 -51
- package/src/themes/FormItemSpan.css +9 -9
- package/src/themes/FormLayout.css +30 -113
- package/src/themes/RadioButton.css +17 -14
- package/src/themes/base/RadioButton-parameters.css +3 -3
- package/src/themes/base/sizes-parameters.css +4 -7
- package/src/themes/sap_horizon/CheckBox-parameters.css +5 -5
- package/src/themes/sap_horizon/RadioButton-parameters.css +2 -2
- package/src/themes/sap_horizon_dark/CheckBox-parameters.css +5 -5
- package/src/themes/sap_horizon_dark/RadioButton-parameters.css +2 -2
- package/src/themes/sap_horizon_hcb/CheckBox-parameters.css +5 -5
- package/src/themes/sap_horizon_hcb/RadioButton-parameters.css +2 -2
- package/src/themes/sap_horizon_hcw/CheckBox-parameters.css +5 -5
- package/src/themes/sap_horizon_hcw/RadioButton-parameters.css +2 -2
package/dist/ColorPicker.d.ts
CHANGED
|
@@ -132,10 +132,12 @@ declare class ColorPicker extends UI5Element implements IFormInputElement {
|
|
|
132
132
|
selectedHue: number;
|
|
133
133
|
mouseDown: boolean;
|
|
134
134
|
mouseIn: boolean;
|
|
135
|
+
_mainColorRef?: HTMLElement;
|
|
135
136
|
static i18nBundle: I18nBundle;
|
|
136
137
|
formElementAnchor(): Promise<HTMLElement | undefined>;
|
|
137
138
|
get formFormattedValue(): string;
|
|
138
139
|
constructor();
|
|
140
|
+
get _boxSize(): number;
|
|
139
141
|
onBeforeRendering(): void;
|
|
140
142
|
_handleMouseDown(e: MouseEvent): void;
|
|
141
143
|
_handleMouseUp(): void;
|
package/dist/ColorPicker.js
CHANGED
|
@@ -8,6 +8,7 @@ var ColorPicker_1;
|
|
|
8
8
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
9
9
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
10
10
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
11
|
+
import query from "@ui5/webcomponents-base/dist/decorators/query.js";
|
|
11
12
|
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
12
13
|
import { isEnter } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
13
14
|
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
@@ -22,7 +23,8 @@ import InvisibleMessageMode from "@ui5/webcomponents-base/dist/types/InvisibleMe
|
|
|
22
23
|
import { COLORPICKER_LABEL, COLORPICKER_SLIDER_GROUP, COLORPICKER_ALPHA_SLIDER, COLORPICKER_HUE_SLIDER, COLORPICKER_HEX, COLORPICKER_RED, COLORPICKER_GREEN, COLORPICKER_BLUE, COLORPICKER_ALPHA, COLORPICKER_SATURATION, COLORPICKER_LIGHT, COLORPICKER_HUE, COLORPICKER_TOGGLE_MODE_TOOLTIP, COLORPICKER_PERCENTAGE, COLORPICKER_COLOR_MODE_CHANGED, } from "./generated/i18n/i18n-defaults.js";
|
|
23
24
|
// Styles
|
|
24
25
|
import ColorPickerCss from "./generated/themes/ColorPicker.css.js";
|
|
25
|
-
|
|
26
|
+
// Fallback box width in CSS pixels at 16px root font-size (16rem).
|
|
27
|
+
const DEFAULT_BOX_SIZE = 256;
|
|
26
28
|
/**
|
|
27
29
|
* @class
|
|
28
30
|
*
|
|
@@ -97,10 +99,11 @@ let ColorPicker = ColorPicker_1 = class ColorPicker extends UI5Element {
|
|
|
97
99
|
*/
|
|
98
100
|
this._displayHSL = false;
|
|
99
101
|
this._colorValue = new ColorValue();
|
|
100
|
-
// Bottom
|
|
102
|
+
// Bottom-right corner of the picker box (white = l=100%, s=0%)
|
|
103
|
+
// Stored as percentages so positioning is independent of root font-size.
|
|
101
104
|
this._selectedCoordinates = {
|
|
102
|
-
x:
|
|
103
|
-
y:
|
|
105
|
+
x: 100,
|
|
106
|
+
y: 100,
|
|
104
107
|
};
|
|
105
108
|
// Default main color is red
|
|
106
109
|
this._mainValue = {
|
|
@@ -112,6 +115,11 @@ let ColorPicker = ColorPicker_1 = class ColorPicker extends UI5Element {
|
|
|
112
115
|
this.mouseDown = false;
|
|
113
116
|
this.mouseIn = false;
|
|
114
117
|
}
|
|
118
|
+
get _boxSize() {
|
|
119
|
+
// clientWidth excludes border, matching the coordinate space of MouseEvent.offsetX/Y
|
|
120
|
+
// which is measured from the element's padding edge.
|
|
121
|
+
return this._mainColorRef?.clientWidth || DEFAULT_BOX_SIZE;
|
|
122
|
+
}
|
|
115
123
|
onBeforeRendering() {
|
|
116
124
|
const valueAsRGB = getRGBColor(this.value);
|
|
117
125
|
if (!this._isColorValueEqual(valueAsRGB)) {
|
|
@@ -322,9 +330,11 @@ let ColorPicker = ColorPicker_1 = class ColorPicker extends UI5Element {
|
|
|
322
330
|
this._colorValue.Alpha = this._alpha;
|
|
323
331
|
}
|
|
324
332
|
_changeSelectedColor(x, y) {
|
|
333
|
+
const boxSize = this._boxSize;
|
|
334
|
+
// Store coordinates as percentages of the picker box.
|
|
325
335
|
this._selectedCoordinates = {
|
|
326
|
-
x: x
|
|
327
|
-
y: y
|
|
336
|
+
x: (x / boxSize) * 100,
|
|
337
|
+
y: (y / boxSize) * 100,
|
|
328
338
|
};
|
|
329
339
|
// Idication that changes to the color settings are triggered as a result of user pressing over the main color section.
|
|
330
340
|
this._isSelectedColorChanged = true;
|
|
@@ -346,8 +356,9 @@ let ColorPicker = ColorPicker_1 = class ColorPicker extends UI5Element {
|
|
|
346
356
|
// 0 ≤ H < 360
|
|
347
357
|
// 4.251 because with 4.25 we get out of the colors range.
|
|
348
358
|
const h = this._hue;
|
|
349
|
-
|
|
350
|
-
let
|
|
359
|
+
const boxSize = this._boxSize;
|
|
360
|
+
let s = +(1 - (y / boxSize)).toFixed(2);
|
|
361
|
+
let l = +(x / boxSize).toFixed(2);
|
|
351
362
|
if (Number.isNaN(s) || Number.isNaN(l)) {
|
|
352
363
|
// The event is finished out of the main color section
|
|
353
364
|
return;
|
|
@@ -368,9 +379,11 @@ let ColorPicker = ColorPicker_1 = class ColorPicker extends UI5Element {
|
|
|
368
379
|
}
|
|
369
380
|
_updateColorGrid() {
|
|
370
381
|
const hslColours = this._colorValue.HSL;
|
|
382
|
+
// Coordinates are percentages: x = lightness, y = inverted saturation.
|
|
383
|
+
// The template applies them as `left: x%` / `top: y%` so the circle scales with the box.
|
|
371
384
|
this._selectedCoordinates = {
|
|
372
|
-
x:
|
|
373
|
-
y:
|
|
385
|
+
x: hslColours.l,
|
|
386
|
+
y: 100 - hslColours.s,
|
|
374
387
|
};
|
|
375
388
|
if (this._isSelectedColorChanged) { // We shouldn't update the hue value when user presses over the main color section.
|
|
376
389
|
this._isSelectedColorChanged = false;
|
|
@@ -556,6 +569,9 @@ __decorate([
|
|
|
556
569
|
__decorate([
|
|
557
570
|
property({ type: Boolean })
|
|
558
571
|
], ColorPicker.prototype, "_displayHSL", void 0);
|
|
572
|
+
__decorate([
|
|
573
|
+
query(".ui5-color-picker-main-color")
|
|
574
|
+
], ColorPicker.prototype, "_mainColorRef", void 0);
|
|
559
575
|
__decorate([
|
|
560
576
|
i18n("@ui5/webcomponents")
|
|
561
577
|
], ColorPicker, "i18nBundle", void 0);
|
package/dist/ColorPicker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.js","sourceRoot":"","sources":["../src/ColorPicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC/D,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAGnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAE1G,OAAO,EACN,WAAW,EACX,QAAQ,GACR,MAAM,sDAAsD,CAAC;AAK9D,OAAO,yCAAyC,CAAC;AACjD,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAC3D,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAC3D,OAAO,QAAQ,MAAM,uDAAuD,CAAC;AAC7E,OAAO,oBAAoB,MAAM,4DAA4D,CAAC;AAI9F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AAI,EAAE,OAAO,EAAE,CAAC;4DACI;AAMhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDACD;AAM3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACV;AAMlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDACR;AASb;IADN,IAAI,CAAC,oBAAoB,CAAC;qCACG;AA1HzB,WAAW;IAfhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,WAAW;QACrB,cAAc,EAAE,IAAI;QACpB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;QAC7B,iBAAiB,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;KAC3C,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,WAAW,CA4mBhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport { isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport {\n\tgetRGBColor,\n\tgetAlpha,\n} from \"@ui5/webcomponents-base/dist/util/ColorConversion.js\";\nimport type {\n\tColorHSL,\n\tColorRGB,\n} from \"@ui5/webcomponents-base/dist/util/ColorConversion.js\";\nimport \"@ui5/webcomponents-icons/dist/expand.js\";\nimport ColorValue from \"./colorpicker-utils/ColorValue.js\";\nimport ColorPickerTemplate from \"./ColorPickerTemplate.js\";\nimport announce from \"@ui5/webcomponents-base/dist/util/InvisibleMessage.js\";\nimport InvisibleMessageMode from \"@ui5/webcomponents-base/dist/types/InvisibleMessageMode.js\";\nimport type Input from \"./Input.js\";\nimport type Slider from \"./Slider.js\";\n\nimport {\n\tCOLORPICKER_LABEL,\n\tCOLORPICKER_SLIDER_GROUP,\n\tCOLORPICKER_ALPHA_SLIDER,\n\tCOLORPICKER_HUE_SLIDER,\n\tCOLORPICKER_HEX,\n\tCOLORPICKER_RED,\n\tCOLORPICKER_GREEN,\n\tCOLORPICKER_BLUE,\n\tCOLORPICKER_ALPHA,\n\tCOLORPICKER_SATURATION,\n\tCOLORPICKER_LIGHT,\n\tCOLORPICKER_HUE,\n\tCOLORPICKER_TOGGLE_MODE_TOOLTIP,\n\tCOLORPICKER_PERCENTAGE,\n\tCOLORPICKER_COLOR_MODE_CHANGED,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport ColorPickerCss from \"./generated/themes/ColorPicker.css.js\";\nimport type { UI5CustomEvent } from \"@ui5/webcomponents-base/dist/index.js\";\n\nconst PICKER_POINTER_WIDTH = 6.5;\n\ntype ColorCoordinates = {\n\tx: number,\n\ty: number,\n}\n\ntype ColorChannelInput = {\n\tid: string,\n\tvalue: number,\n\taccessibleName: string\n\tlabel: string,\n\tshowPercentSymbol?: boolean,\n}\n\n/**\n * @class\n *\n * ### Overview\n * The `ui5-color-picker` allows users to choose any color and provides different input options for selecting colors.\n *\n * ### Usage\n *\n * #### When to use\n * Use the color picker if:\n *\n * - users need to select any color freely.\n *\n * #### When not to use\n *\n * - Users need to select one color from a predefined set of colors. Use the ColorPalette component instead.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/ColorPicker.js\";`\n * @constructor\n * @since 1.0.0-rc.12\n * @extends UI5Element\n * @public\n */\n\n@customElement({\n\ttag: \"ui5-color-picker\",\n\trenderer: jsxRenderer,\n\tformAssociated: true,\n\tstyles: ColorPickerCss,\n\ttemplate: ColorPickerTemplate,\n\tshadowRootOptions: { delegatesFocus: true },\n})\n/**\n * Fired when the the selected color is changed\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\nclass ColorPicker extends UI5Element implements IFormInputElement {\n\teventDetails!: {\n\t\tchange: void;\n\t}\n\t/**\n\t * Defines the currently selected color of the component.\n\t *\n\t * **Note**: use HEX, RGB, RGBA, HSV formats or a CSS color name when modifying this property.\n\t * @default \"rgba(255,255,255,1)\"\n\t * @public\n\t */\n\t@property()\n\tvalue = \"rgba(255,255,255,1)\";\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * When set to `true`, the alpha slider and inputs for RGB values will not be displayed.\n\t * @default false\n\t * @public\n\t * @since 2.5.0\n\t */\n\t@property({ type: Boolean })\n\tsimplified = false;\n\n\t/**\n\t * Defines the accessible name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the current main color which is selected via the hue slider and is shown in the main color square.\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_mainValue: ColorRGB;\n\n\t/**\n\t * Defines the currenty selected color.\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_colorValue: ColorValue;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_selectedCoordinates: ColorCoordinates;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_alpha = 1;\n\n\t/**\n\t * this is the alpha value in the input only while editing, since it can container invalid/empty values temporarily\n\t * @private\n\t */\n\t@property()\n\t_alphaTemp?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_hue = 0;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isSelectedColorChanged = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isHueValueChanged = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_wrongHEX = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_displayHSL = false;\n\n\tselectedHue: number;\n\n\tmouseDown: boolean;\n\n\tmouseIn: boolean;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\tget formFormattedValue() {\n\t\treturn this.value;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._colorValue = new ColorValue();\n\n\t\t// Bottom Right corner\n\t\tthis._selectedCoordinates = {\n\t\t\tx: 256 - PICKER_POINTER_WIDTH,\n\t\t\ty: 256 - PICKER_POINTER_WIDTH,\n\t\t};\n\n\t\t// Default main color is red\n\t\tthis._mainValue = {\n\t\t\tr: 255,\n\t\t\tg: 0,\n\t\t\tb: 0,\n\t\t};\n\n\t\tthis.selectedHue = 0;\n\n\t\tthis.mouseDown = false;\n\t\tthis.mouseIn = false;\n\t}\n\n\tonBeforeRendering() {\n\t\tconst valueAsRGB = getRGBColor(this.value);\n\t\tif (!this._isColorValueEqual(valueAsRGB)) {\n\t\t\tthis._colorValue.RGB = valueAsRGB;\n\t\t}\n\t\tconst alpha = getAlpha(this.value);\n\t\tif (alpha !== this._colorValue.Alpha) {\n\t\t\tthis._colorValue.Alpha = alpha;\n\t\t\tthis._alpha = this._colorValue.Alpha;\n\t\t}\n\t\tconst tempColor = this._colorValue.toRGBString();\n\t\tthis._updateColorGrid();\n\t\tthis.style.setProperty(\"--ui5_Color_Picker_Progress_Container_Color\", tempColor);\n\t}\n\n\t_handleMouseDown(e: MouseEvent) {\n\t\tthis.mouseDown = true;\n\t\tthis.mouseIn = true;\n\t\tthis._changeSelectedColor(e.offsetX, e.offsetY);\n\t}\n\n\t_handleMouseUp() {\n\t\tthis.mouseDown = false;\n\t}\n\n\t_handleMouseOut(e: MouseEvent) {\n\t\tif (!this.mouseIn || !this.mouseDown) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst target = e.target as HTMLElement;\n\t\tconst offsetHeight: number = target.offsetHeight;\n\t\tconst offsetWidth: number = target.offsetWidth;\n\t\tconst isLeft: boolean = e.offsetX <= 0;\n\t\tconst isUp: boolean = e.offsetY <= 0;\n\t\tconst isDown: boolean = e.offsetY >= target.offsetHeight;\n\t\tconst isRight: boolean = e.offsetX >= target.offsetWidth;\n\n\t\tlet x: number,\n\t\t\ty: number;\n\n\t\tif (isLeft) {\n\t\t\tx = 0;\n\t\t} else if (isRight) {\n\t\t\t// Note: - e.offsetWidth has been changed to e.target.offsetWidth as offsetWidth does not exist on the event object\n\t\t\tx = offsetWidth;\n\t\t} else {\n\t\t\tx = e.offsetX;\n\t\t}\n\n\t\tif (isUp) {\n\t\t\ty = 0;\n\t\t} else if (isDown) {\n\t\t\t// Note: - e.offsetWidth has been changed to e.target.offsetWidth as offsetWidth does not exist on the event object\n\t\t\ty = offsetHeight;\n\t\t} else {\n\t\t\ty = e.offsetY;\n\t\t}\n\n\t\tthis._changeSelectedColor(x, y);\n\t\tthis.mouseIn = false;\n\t\tthis.mouseDown = false;\n\t}\n\n\t_handleMouseMove(e: MouseEvent) {\n\t\tif (!this.mouseDown || !this.mouseIn) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changeSelectedColor(e.offsetX, e.offsetY);\n\t}\n\n\t_handleAlphaInput(e: UI5CustomEvent<Input, \"input\"> | UI5CustomEvent<Slider, \"input\">) {\n\t\tconst aphaInputValue = String(e.currentTarget.value);\n\t\tthis._alphaTemp = aphaInputValue;\n\t\tthis._alpha = parseFloat(aphaInputValue);\n\t\tif (Number.isNaN(this._alpha)) {\n\t\t\tthis._alpha = 1;\n\t\t}\n\t\tthis._colorValue.Alpha = this._alpha;\n\t\tthis._isHueValueChanged = true;\n\n\t\tconst color = this._colorValue.toRGBString();\n\t\tthis._setValue(color);\n\t}\n\n\t_handleHueInput(e: CustomEvent) {\n\t\tthis.selectedHue = (e.target as Slider).value;\n\t\tthis._hue = this.selectedHue;\n\t\tthis._setMainColor(this._hue);\n\t\t// Idication that changes to the hue value triggered as a result of user pressing over the hue slider.\n\t\tthis._isHueValueChanged = true;\n\t\tthis._colorValue.H = this._hue;\n\n\t\tconst color = this._colorValue.toRGBString();\n\t\tthis._setValue(color);\n\t}\n\n\t_handleHEXChange(e: CustomEvent | KeyboardEvent) {\n\t\tconst input: Input = (e.target as Input);\n\t\tlet inputValueLowerCase = input.value.toLowerCase();\n\n\t\tif (inputValueLowerCase.startsWith(\"#\")) {\n\t\t\tinputValueLowerCase = inputValueLowerCase.slice(1);\n\t\t}\n\n\t\t// Shorthand Syntax\n\t\tif (inputValueLowerCase.length === 3) {\n\t\t\tinputValueLowerCase = `${inputValueLowerCase[0]}${inputValueLowerCase[0]}${inputValueLowerCase[1]}${inputValueLowerCase[1]}${inputValueLowerCase[2]}${inputValueLowerCase[2]}`;\n\t\t}\n\n\t\tthis._colorValue.HEX = inputValueLowerCase;\n\t\tconst isValidColor = this._colorValue.isColorValueValid();\n\n\t\tif (isValidColor && input.value !== inputValueLowerCase) {\n\t\t\tthis._wrongHEX = false;\n\t\t\tinput.value = inputValueLowerCase;\n\t\t}\n\n\t\tif (!isValidColor) {\n\t\t\tthis._wrongHEX = true;\n\t\t} else {\n\t\t\tthis._wrongHEX = false;\n\n\t\t\tconst color = this._colorValue.toRGBString();\n\t\t\tthis._setValue(color);\n\t\t}\n\t}\n\n\t_togglePickerMode() {\n\t\tthis._displayHSL = !this._displayHSL;\n\n\t\t// Announce a message to screen readers\n\t\tannounce(this.colorFieldsAnnouncementText, InvisibleMessageMode.Polite);\n\t}\n\n\t_handleColorInputChange(e: Event) {\n\t\tconst target = e.target as Input;\n\t\tconst targetValue = parseInt(target.value) || 0;\n\t\tlet normalizedValue = targetValue;\n\n\t\tswitch (target.id) {\n\t\tcase \"red\":\n\t\t\tthis._colorValue.R = targetValue;\n\t\t\tnormalizedValue = this._colorValue.R;\n\t\t\tbreak;\n\n\t\tcase \"green\":\n\t\t\tthis._colorValue.G = targetValue;\n\t\t\tnormalizedValue = this._colorValue.G;\n\t\t\tbreak;\n\n\t\tcase \"blue\":\n\t\t\tthis._colorValue.B = targetValue;\n\t\t\tnormalizedValue = this._colorValue.B;\n\t\t\tbreak;\n\n\t\tcase \"hue\":\n\t\t\tthis._colorValue.H = targetValue;\n\t\t\tnormalizedValue = this._colorValue.H;\n\t\t\tbreak;\n\n\t\tcase \"saturation\":\n\t\t\tthis._colorValue.S = targetValue;\n\t\t\tnormalizedValue = this._colorValue.S;\n\t\t\tbreak;\n\n\t\tcase \"light\":\n\t\t\tthis._colorValue.L = targetValue;\n\t\t\tnormalizedValue = this._colorValue.L;\n\t\t\tbreak;\n\t\t}\n\n\t\ttarget.value = String(normalizedValue);\n\t\tconst color = this._colorValue.toRGBString();\n\t\tthis._setValue(color);\n\t\tthis._updateColorGrid();\n\t}\n\n\t_setMainColor(hueValue: number) {\n\t\tconst hueValueMod = hueValue * 4.251;\n\n\t\tif (hueValueMod <= 255) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255,\n\t\t\t\tg: hueValueMod,\n\t\t\t\tb: 0,\n\t\t\t};\n\t\t} else if (hueValueMod <= 510) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255 - (hueValueMod - 255),\n\t\t\t\tg: 255,\n\t\t\t\tb: 0,\n\t\t\t};\n\t\t} else if (hueValueMod <= 765) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 0,\n\t\t\t\tg: 255,\n\t\t\t\tb: hueValueMod - 510,\n\t\t\t};\n\t\t} else if (hueValueMod <= 1020) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 0,\n\t\t\t\tg: 765 - (hueValueMod - 255),\n\t\t\t\tb: 255,\n\t\t\t};\n\t\t} else if (hueValueMod <= 1275) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: hueValueMod - 1020,\n\t\t\t\tg: 0,\n\t\t\t\tb: 255,\n\t\t\t};\n\t\t} else {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255,\n\t\t\t\tg: 0,\n\t\t\t\tb: 1275 - (hueValueMod - 255),\n\t\t\t};\n\t\t}\n\t}\n\n\t_handleAlphaChange() {\n\t\t// parse the input value if valid or fallback to default\n\t\tthis._alpha = this._alphaTemp ? parseFloat(this._alphaTemp) : 1;\n\t\tif (Number.isNaN(this._alpha)) {\n\t\t\tthis._alpha = 1;\n\t\t}\n\t\t// reset input value so _alpha is rendered\n\t\tthis._alphaTemp = undefined;\n\t\t// normalize range\n\t\tthis._alpha = this._alpha < 0 ? 0 : this._alpha;\n\t\tthis._alpha = this._alpha > 1 ? 1 : this._alpha;\n\n\t\tthis._colorValue.Alpha = this._alpha;\n\t}\n\n\t_changeSelectedColor(x: number, y: number) {\n\t\tthis._selectedCoordinates = {\n\t\t\tx: x - PICKER_POINTER_WIDTH, // Center the coordinates, because of the width of the circle\n\t\t\ty: y - PICKER_POINTER_WIDTH, // Center the coordinates, because of the height of the circle\n\t\t};\n\n\t\t// Idication that changes to the color settings are triggered as a result of user pressing over the main color section.\n\t\tthis._isSelectedColorChanged = true;\n\n\t\tconst tempColor = this._calculateColorFromCoordinates(x, y);\n\t\tif (tempColor) {\n\t\t\tthis._colorValue.HSL = tempColor;\n\n\t\t\tconst color = this._colorValue.toRGBString();\n\t\t\tthis._setValue(color);\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isEnter(e)) {\n\t\t\tthis._handleHEXChange(e);\n\t\t}\n\t}\n\n\t_calculateColorFromCoordinates(x: number, y: number) {\n\t\t// By using the selected coordinates(x = Lightness, y = Saturation) and hue(selected from the hue slider)\n\t\t// and HSL format, the color will be parsed to RGB\n\t\t// 0 ≤ H < 360\n\t\t// 4.251 because with 4.25 we get out of the colors range.\n\t\tconst h = this._hue;\n\t\tlet s = +(1 - (y / 256)).toFixed(2);\n\t\tlet l = +(x / 256).toFixed(2);\n\n\t\tif (Number.isNaN(s) || Number.isNaN(l)) {\n\t\t\t// The event is finished out of the main color section\n\t\t\treturn;\n\t\t}\n\n\t\t// Normalize values to be between 0 and 1 in case of rounding issues\n\t\ts = Math.max(0, Math.min(1, s));\n\t\tl = Math.max(0, Math.min(1, l));\n\n\t\treturn {\n\t\t\th: Math.round(h),\n\t\t\ts: Math.round(s * 100),\n\t\t\tl: Math.round(l * 100),\n\t\t};\n\t}\n\n\t_setValue(color: string) {\n\t\tthis.value = color;\n\t\tthis._wrongHEX = !this._colorValue.isColorValueValid();\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\t_updateColorGrid() {\n\t\tconst hslColours: ColorHSL = this._colorValue.HSL;\n\t\tthis._selectedCoordinates = {\n\t\t\tx: ((hslColours.l * 2.56)) - PICKER_POINTER_WIDTH, // Center the coordinates, because of the width of the circle\n\t\t\ty: (256 - (hslColours.s * 2.56)) - PICKER_POINTER_WIDTH, // Center the coordinates, because of the height of the circle\n\t\t};\n\n\t\tif (this._isSelectedColorChanged) { // We shouldn't update the hue value when user presses over the main color section.\n\t\t\tthis._isSelectedColorChanged = false;\n\t\t} else if (this._isHueValueChanged) { // We shouldn't recalculate the hue value when user changes the hue slider.\n\t\t\tthis._isHueValueChanged = false;\n\t\t\tthis._hue = this.selectedHue ? this.selectedHue : this._hue;\n\t\t} else {\n\t\t\tthis._hue = hslColours.h;\n\t\t}\n\n\t\tthis._setMainColor(this._hue);\n\t}\n\n\t_isColorValueEqual(value: ColorRGB): boolean {\n\t\treturn this._colorValue.R === value.r\n\t\t\t&& this._colorValue.G === value.g\n\t\t\t&& this._colorValue.B === value.b;\n\t}\n\n\tget colorPickerLabel() {\n\t\tconst effectiveLabel = getEffectiveAriaLabelText(this);\n\t\treturn effectiveLabel\n\t\t\t? `${ColorPicker.i18nBundle.getText(COLORPICKER_LABEL)} ${effectiveLabel}`\n\t\t\t: ColorPicker.i18nBundle.getText(COLORPICKER_LABEL);\n\t}\n\n\tget sliderGroupLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_SLIDER_GROUP);\n\t}\n\n\tget hueSliderLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HUE_SLIDER);\n\t}\n\n\tget alphaSliderLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_ALPHA_SLIDER);\n\t}\n\n\tget hexInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HEX);\n\t}\n\n\tget redInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_RED);\n\t}\n\n\tget greenInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_GREEN);\n\t}\n\n\tget blueInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_BLUE);\n\t}\n\n\tget hueInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HUE);\n\t}\n\n\tget saturationInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_SATURATION);\n\t}\n\n\tget lightInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_LIGHT);\n\t}\n\n\tget alphaInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_ALPHA);\n\t}\n\n\tget percentageLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_PERCENTAGE);\n\t}\n\n\tget colorFieldsAnnouncementText() {\n\t\tconst mode = this._displayHSL ? \"HSL\" : \"RGB\";\n\t\tlet text = \"\";\n\n\t\tif (mode === \"RGB\") {\n\t\t\ttext = `${this.redInputLabel} ${this._colorValue.R}, `\n\t\t\t\t+ `${this.greenInputLabel} ${this._colorValue.G}, `\n\t\t\t\t+ `${this.blueInputLabel} ${this._colorValue.B}, `\n\t\t\t\t+ `${this.alphaInputLabel} ${this._colorValue.Alpha}`;\n\t\t} else {\n\t\t\ttext = `${this.hueInputLabel} ${this._colorValue.H}, `\n\t\t\t\t+ `${this.saturationInputLabel} ${this._colorValue.S} ${this.percentageLabel}, `\n\t\t\t\t+ `${this.lightInputLabel} ${this._colorValue.L} ${this.percentageLabel}, `\n\t\t\t\t+ `${this.alphaInputLabel} ${this._colorValue.Alpha}`;\n\t\t}\n\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_COLOR_MODE_CHANGED, mode, text);\n\t}\n\n\tget toggleModeTooltip() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_TOGGLE_MODE_TOOLTIP);\n\t}\n\n\tget inputsDisabled() {\n\t\treturn this._wrongHEX ? true : undefined;\n\t}\n\n\tget hexInputErrorState(): `${ValueState}` {\n\t\treturn this._wrongHEX ? \"Negative\" : \"None\";\n\t}\n\n\tget rgbInputs(): Array<ColorChannelInput> {\n\t\tconst redInput = {\n\t\t\tid: \"red\",\n\t\t\tvalue: this._colorValue.R,\n\t\t\tlabel: \"R\",\n\t\t\taccessibleName: this.redInputLabel,\n\t\t};\n\n\t\tconst greenInput = {\n\t\t\tid: \"green\",\n\t\t\tvalue: this._colorValue.G,\n\t\t\tlabel: \"G\",\n\t\t\taccessibleName: this.greenInputLabel,\n\t\t};\n\n\t\tconst blueInput = {\n\t\t\tid: \"blue\",\n\t\t\tvalue: this._colorValue.B,\n\t\t\tlabel: \"B\",\n\t\t\taccessibleName: this.blueInputLabel,\n\t\t};\n\n\t\treturn [redInput, greenInput, blueInput];\n\t}\n\n\tget hslInputs(): Array<ColorChannelInput> {\n\t\tconst hueInput = {\n\t\t\tid: \"hue\",\n\t\t\tvalue: this._colorValue.H,\n\t\t\tlabel: \"H\",\n\t\t\taccessibleName: this.hueInputLabel,\n\t\t};\n\n\t\tconst saturationInput = {\n\t\t\tid: \"saturation\",\n\t\t\tvalue: this._colorValue.S,\n\t\t\tlabel: \"S\",\n\t\t\taccessibleName: this.saturationInputLabel,\n\t\t\tshowPercentSymbol: true,\n\t\t};\n\n\t\tconst lightInput = {\n\t\t\tid: \"light\",\n\t\t\tvalue: this._colorValue.L,\n\t\t\tlabel: \"L\",\n\t\t\taccessibleName: this.lightInputLabel,\n\t\t\tshowPercentSymbol: true,\n\t\t};\n\n\t\treturn [hueInput, saturationInput, lightInput];\n\t}\n\n\tget HEX(): string {\n\t\treturn this._colorValue.HEX;\n\t}\n\n\tget colorChannelInputs() {\n\t\treturn this._displayHSL ? this.hslInputs : this.rgbInputs;\n\t}\n\n\tget _isDefaultPickerMode() {\n\t\treturn !this.simplified;\n\t}\n}\n\nColorPicker.define();\n\nexport default ColorPicker;\n"]}
|
|
1
|
+
{"version":3,"file":"ColorPicker.js","sourceRoot":"","sources":["../src/ColorPicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC/D,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAGnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAE1G,OAAO,EACN,WAAW,EACX,QAAQ,GACR,MAAM,sDAAsD,CAAC;AA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ACN;AAOrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDACH;AAMxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yDACY;AAMvC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAChB;AAOX;IADC,QAAQ,EAAE;+CACS;AAMpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAClB;AAMT;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4DACI;AAMhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDACD;AAM3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACV;AAMlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDACR;AASpB;IADC,KAAK,CAAC,8BAA8B,CAAC;kDACV;AAGrB;IADN,IAAI,CAAC,oBAAoB,CAAC;qCACG;AA7HzB,WAAW;IAfhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,WAAW;QACrB,cAAc,EAAE,IAAI;QACpB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;QAC7B,iBAAiB,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;KAC3C,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,WAAW,CA2nBhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport query from \"@ui5/webcomponents-base/dist/decorators/query.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport { isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport {\n\tgetRGBColor,\n\tgetAlpha,\n} from \"@ui5/webcomponents-base/dist/util/ColorConversion.js\";\nimport type {\n\tColorHSL,\n\tColorRGB,\n} from \"@ui5/webcomponents-base/dist/util/ColorConversion.js\";\nimport \"@ui5/webcomponents-icons/dist/expand.js\";\nimport ColorValue from \"./colorpicker-utils/ColorValue.js\";\nimport ColorPickerTemplate from \"./ColorPickerTemplate.js\";\nimport announce from \"@ui5/webcomponents-base/dist/util/InvisibleMessage.js\";\nimport InvisibleMessageMode from \"@ui5/webcomponents-base/dist/types/InvisibleMessageMode.js\";\nimport type Input from \"./Input.js\";\nimport type Slider from \"./Slider.js\";\n\nimport {\n\tCOLORPICKER_LABEL,\n\tCOLORPICKER_SLIDER_GROUP,\n\tCOLORPICKER_ALPHA_SLIDER,\n\tCOLORPICKER_HUE_SLIDER,\n\tCOLORPICKER_HEX,\n\tCOLORPICKER_RED,\n\tCOLORPICKER_GREEN,\n\tCOLORPICKER_BLUE,\n\tCOLORPICKER_ALPHA,\n\tCOLORPICKER_SATURATION,\n\tCOLORPICKER_LIGHT,\n\tCOLORPICKER_HUE,\n\tCOLORPICKER_TOGGLE_MODE_TOOLTIP,\n\tCOLORPICKER_PERCENTAGE,\n\tCOLORPICKER_COLOR_MODE_CHANGED,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport ColorPickerCss from \"./generated/themes/ColorPicker.css.js\";\nimport type { UI5CustomEvent } from \"@ui5/webcomponents-base/dist/index.js\";\n\n// Fallback box width in CSS pixels at 16px root font-size (16rem).\nconst DEFAULT_BOX_SIZE = 256;\n\ntype ColorCoordinates = {\n\tx: number,\n\ty: number,\n}\n\ntype ColorChannelInput = {\n\tid: string,\n\tvalue: number,\n\taccessibleName: string\n\tlabel: string,\n\tshowPercentSymbol?: boolean,\n}\n\n/**\n * @class\n *\n * ### Overview\n * The `ui5-color-picker` allows users to choose any color and provides different input options for selecting colors.\n *\n * ### Usage\n *\n * #### When to use\n * Use the color picker if:\n *\n * - users need to select any color freely.\n *\n * #### When not to use\n *\n * - Users need to select one color from a predefined set of colors. Use the ColorPalette component instead.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/ColorPicker.js\";`\n * @constructor\n * @since 1.0.0-rc.12\n * @extends UI5Element\n * @public\n */\n\n@customElement({\n\ttag: \"ui5-color-picker\",\n\trenderer: jsxRenderer,\n\tformAssociated: true,\n\tstyles: ColorPickerCss,\n\ttemplate: ColorPickerTemplate,\n\tshadowRootOptions: { delegatesFocus: true },\n})\n/**\n * Fired when the the selected color is changed\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\nclass ColorPicker extends UI5Element implements IFormInputElement {\n\teventDetails!: {\n\t\tchange: void;\n\t}\n\t/**\n\t * Defines the currently selected color of the component.\n\t *\n\t * **Note**: use HEX, RGB, RGBA, HSV formats or a CSS color name when modifying this property.\n\t * @default \"rgba(255,255,255,1)\"\n\t * @public\n\t */\n\t@property()\n\tvalue = \"rgba(255,255,255,1)\";\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * When set to `true`, the alpha slider and inputs for RGB values will not be displayed.\n\t * @default false\n\t * @public\n\t * @since 2.5.0\n\t */\n\t@property({ type: Boolean })\n\tsimplified = false;\n\n\t/**\n\t * Defines the accessible name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the current main color which is selected via the hue slider and is shown in the main color square.\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_mainValue: ColorRGB;\n\n\t/**\n\t * Defines the currenty selected color.\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_colorValue: ColorValue;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_selectedCoordinates: ColorCoordinates;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_alpha = 1;\n\n\t/**\n\t * this is the alpha value in the input only while editing, since it can container invalid/empty values temporarily\n\t * @private\n\t */\n\t@property()\n\t_alphaTemp?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_hue = 0;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isSelectedColorChanged = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isHueValueChanged = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_wrongHEX = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_displayHSL = false;\n\n\tselectedHue: number;\n\n\tmouseDown: boolean;\n\n\tmouseIn: boolean;\n\n\t@query(\".ui5-color-picker-main-color\")\n\t_mainColorRef?: HTMLElement;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\tget formFormattedValue() {\n\t\treturn this.value;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._colorValue = new ColorValue();\n\n\t\t// Bottom-right corner of the picker box (white = l=100%, s=0%)\n\t\t// Stored as percentages so positioning is independent of root font-size.\n\t\tthis._selectedCoordinates = {\n\t\t\tx: 100,\n\t\t\ty: 100,\n\t\t};\n\n\t\t// Default main color is red\n\t\tthis._mainValue = {\n\t\t\tr: 255,\n\t\t\tg: 0,\n\t\t\tb: 0,\n\t\t};\n\n\t\tthis.selectedHue = 0;\n\n\t\tthis.mouseDown = false;\n\t\tthis.mouseIn = false;\n\t}\n\n\tget _boxSize(): number {\n\t\t// clientWidth excludes border, matching the coordinate space of MouseEvent.offsetX/Y\n\t\t// which is measured from the element's padding edge.\n\t\treturn this._mainColorRef?.clientWidth || DEFAULT_BOX_SIZE;\n\t}\n\n\tonBeforeRendering() {\n\t\tconst valueAsRGB = getRGBColor(this.value);\n\t\tif (!this._isColorValueEqual(valueAsRGB)) {\n\t\t\tthis._colorValue.RGB = valueAsRGB;\n\t\t}\n\t\tconst alpha = getAlpha(this.value);\n\t\tif (alpha !== this._colorValue.Alpha) {\n\t\t\tthis._colorValue.Alpha = alpha;\n\t\t\tthis._alpha = this._colorValue.Alpha;\n\t\t}\n\t\tconst tempColor = this._colorValue.toRGBString();\n\t\tthis._updateColorGrid();\n\t\tthis.style.setProperty(\"--ui5_Color_Picker_Progress_Container_Color\", tempColor);\n\t}\n\n\t_handleMouseDown(e: MouseEvent) {\n\t\tthis.mouseDown = true;\n\t\tthis.mouseIn = true;\n\t\tthis._changeSelectedColor(e.offsetX, e.offsetY);\n\t}\n\n\t_handleMouseUp() {\n\t\tthis.mouseDown = false;\n\t}\n\n\t_handleMouseOut(e: MouseEvent) {\n\t\tif (!this.mouseIn || !this.mouseDown) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst target = e.target as HTMLElement;\n\t\tconst offsetHeight: number = target.offsetHeight;\n\t\tconst offsetWidth: number = target.offsetWidth;\n\t\tconst isLeft: boolean = e.offsetX <= 0;\n\t\tconst isUp: boolean = e.offsetY <= 0;\n\t\tconst isDown: boolean = e.offsetY >= target.offsetHeight;\n\t\tconst isRight: boolean = e.offsetX >= target.offsetWidth;\n\n\t\tlet x: number,\n\t\t\ty: number;\n\n\t\tif (isLeft) {\n\t\t\tx = 0;\n\t\t} else if (isRight) {\n\t\t\t// Note: - e.offsetWidth has been changed to e.target.offsetWidth as offsetWidth does not exist on the event object\n\t\t\tx = offsetWidth;\n\t\t} else {\n\t\t\tx = e.offsetX;\n\t\t}\n\n\t\tif (isUp) {\n\t\t\ty = 0;\n\t\t} else if (isDown) {\n\t\t\t// Note: - e.offsetWidth has been changed to e.target.offsetWidth as offsetWidth does not exist on the event object\n\t\t\ty = offsetHeight;\n\t\t} else {\n\t\t\ty = e.offsetY;\n\t\t}\n\n\t\tthis._changeSelectedColor(x, y);\n\t\tthis.mouseIn = false;\n\t\tthis.mouseDown = false;\n\t}\n\n\t_handleMouseMove(e: MouseEvent) {\n\t\tif (!this.mouseDown || !this.mouseIn) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changeSelectedColor(e.offsetX, e.offsetY);\n\t}\n\n\t_handleAlphaInput(e: UI5CustomEvent<Input, \"input\"> | UI5CustomEvent<Slider, \"input\">) {\n\t\tconst aphaInputValue = String(e.currentTarget.value);\n\t\tthis._alphaTemp = aphaInputValue;\n\t\tthis._alpha = parseFloat(aphaInputValue);\n\t\tif (Number.isNaN(this._alpha)) {\n\t\t\tthis._alpha = 1;\n\t\t}\n\t\tthis._colorValue.Alpha = this._alpha;\n\t\tthis._isHueValueChanged = true;\n\n\t\tconst color = this._colorValue.toRGBString();\n\t\tthis._setValue(color);\n\t}\n\n\t_handleHueInput(e: CustomEvent) {\n\t\tthis.selectedHue = (e.target as Slider).value;\n\t\tthis._hue = this.selectedHue;\n\t\tthis._setMainColor(this._hue);\n\t\t// Idication that changes to the hue value triggered as a result of user pressing over the hue slider.\n\t\tthis._isHueValueChanged = true;\n\t\tthis._colorValue.H = this._hue;\n\n\t\tconst color = this._colorValue.toRGBString();\n\t\tthis._setValue(color);\n\t}\n\n\t_handleHEXChange(e: CustomEvent | KeyboardEvent) {\n\t\tconst input: Input = (e.target as Input);\n\t\tlet inputValueLowerCase = input.value.toLowerCase();\n\n\t\tif (inputValueLowerCase.startsWith(\"#\")) {\n\t\t\tinputValueLowerCase = inputValueLowerCase.slice(1);\n\t\t}\n\n\t\t// Shorthand Syntax\n\t\tif (inputValueLowerCase.length === 3) {\n\t\t\tinputValueLowerCase = `${inputValueLowerCase[0]}${inputValueLowerCase[0]}${inputValueLowerCase[1]}${inputValueLowerCase[1]}${inputValueLowerCase[2]}${inputValueLowerCase[2]}`;\n\t\t}\n\n\t\tthis._colorValue.HEX = inputValueLowerCase;\n\t\tconst isValidColor = this._colorValue.isColorValueValid();\n\n\t\tif (isValidColor && input.value !== inputValueLowerCase) {\n\t\t\tthis._wrongHEX = false;\n\t\t\tinput.value = inputValueLowerCase;\n\t\t}\n\n\t\tif (!isValidColor) {\n\t\t\tthis._wrongHEX = true;\n\t\t} else {\n\t\t\tthis._wrongHEX = false;\n\n\t\t\tconst color = this._colorValue.toRGBString();\n\t\t\tthis._setValue(color);\n\t\t}\n\t}\n\n\t_togglePickerMode() {\n\t\tthis._displayHSL = !this._displayHSL;\n\n\t\t// Announce a message to screen readers\n\t\tannounce(this.colorFieldsAnnouncementText, InvisibleMessageMode.Polite);\n\t}\n\n\t_handleColorInputChange(e: Event) {\n\t\tconst target = e.target as Input;\n\t\tconst targetValue = parseInt(target.value) || 0;\n\t\tlet normalizedValue = targetValue;\n\n\t\tswitch (target.id) {\n\t\tcase \"red\":\n\t\t\tthis._colorValue.R = targetValue;\n\t\t\tnormalizedValue = this._colorValue.R;\n\t\t\tbreak;\n\n\t\tcase \"green\":\n\t\t\tthis._colorValue.G = targetValue;\n\t\t\tnormalizedValue = this._colorValue.G;\n\t\t\tbreak;\n\n\t\tcase \"blue\":\n\t\t\tthis._colorValue.B = targetValue;\n\t\t\tnormalizedValue = this._colorValue.B;\n\t\t\tbreak;\n\n\t\tcase \"hue\":\n\t\t\tthis._colorValue.H = targetValue;\n\t\t\tnormalizedValue = this._colorValue.H;\n\t\t\tbreak;\n\n\t\tcase \"saturation\":\n\t\t\tthis._colorValue.S = targetValue;\n\t\t\tnormalizedValue = this._colorValue.S;\n\t\t\tbreak;\n\n\t\tcase \"light\":\n\t\t\tthis._colorValue.L = targetValue;\n\t\t\tnormalizedValue = this._colorValue.L;\n\t\t\tbreak;\n\t\t}\n\n\t\ttarget.value = String(normalizedValue);\n\t\tconst color = this._colorValue.toRGBString();\n\t\tthis._setValue(color);\n\t\tthis._updateColorGrid();\n\t}\n\n\t_setMainColor(hueValue: number) {\n\t\tconst hueValueMod = hueValue * 4.251;\n\n\t\tif (hueValueMod <= 255) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255,\n\t\t\t\tg: hueValueMod,\n\t\t\t\tb: 0,\n\t\t\t};\n\t\t} else if (hueValueMod <= 510) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255 - (hueValueMod - 255),\n\t\t\t\tg: 255,\n\t\t\t\tb: 0,\n\t\t\t};\n\t\t} else if (hueValueMod <= 765) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 0,\n\t\t\t\tg: 255,\n\t\t\t\tb: hueValueMod - 510,\n\t\t\t};\n\t\t} else if (hueValueMod <= 1020) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 0,\n\t\t\t\tg: 765 - (hueValueMod - 255),\n\t\t\t\tb: 255,\n\t\t\t};\n\t\t} else if (hueValueMod <= 1275) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: hueValueMod - 1020,\n\t\t\t\tg: 0,\n\t\t\t\tb: 255,\n\t\t\t};\n\t\t} else {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255,\n\t\t\t\tg: 0,\n\t\t\t\tb: 1275 - (hueValueMod - 255),\n\t\t\t};\n\t\t}\n\t}\n\n\t_handleAlphaChange() {\n\t\t// parse the input value if valid or fallback to default\n\t\tthis._alpha = this._alphaTemp ? parseFloat(this._alphaTemp) : 1;\n\t\tif (Number.isNaN(this._alpha)) {\n\t\t\tthis._alpha = 1;\n\t\t}\n\t\t// reset input value so _alpha is rendered\n\t\tthis._alphaTemp = undefined;\n\t\t// normalize range\n\t\tthis._alpha = this._alpha < 0 ? 0 : this._alpha;\n\t\tthis._alpha = this._alpha > 1 ? 1 : this._alpha;\n\n\t\tthis._colorValue.Alpha = this._alpha;\n\t}\n\n\t_changeSelectedColor(x: number, y: number) {\n\t\tconst boxSize = this._boxSize;\n\t\t// Store coordinates as percentages of the picker box.\n\t\tthis._selectedCoordinates = {\n\t\t\tx: (x / boxSize) * 100,\n\t\t\ty: (y / boxSize) * 100,\n\t\t};\n\n\t\t// Idication that changes to the color settings are triggered as a result of user pressing over the main color section.\n\t\tthis._isSelectedColorChanged = true;\n\n\t\tconst tempColor = this._calculateColorFromCoordinates(x, y);\n\t\tif (tempColor) {\n\t\t\tthis._colorValue.HSL = tempColor;\n\n\t\t\tconst color = this._colorValue.toRGBString();\n\t\t\tthis._setValue(color);\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isEnter(e)) {\n\t\t\tthis._handleHEXChange(e);\n\t\t}\n\t}\n\n\t_calculateColorFromCoordinates(x: number, y: number) {\n\t\t// By using the selected coordinates(x = Lightness, y = Saturation) and hue(selected from the hue slider)\n\t\t// and HSL format, the color will be parsed to RGB\n\t\t// 0 ≤ H < 360\n\t\t// 4.251 because with 4.25 we get out of the colors range.\n\t\tconst h = this._hue;\n\t\tconst boxSize = this._boxSize;\n\t\tlet s = +(1 - (y / boxSize)).toFixed(2);\n\t\tlet l = +(x / boxSize).toFixed(2);\n\n\t\tif (Number.isNaN(s) || Number.isNaN(l)) {\n\t\t\t// The event is finished out of the main color section\n\t\t\treturn;\n\t\t}\n\n\t\t// Normalize values to be between 0 and 1 in case of rounding issues\n\t\ts = Math.max(0, Math.min(1, s));\n\t\tl = Math.max(0, Math.min(1, l));\n\n\t\treturn {\n\t\t\th: Math.round(h),\n\t\t\ts: Math.round(s * 100),\n\t\t\tl: Math.round(l * 100),\n\t\t};\n\t}\n\n\t_setValue(color: string) {\n\t\tthis.value = color;\n\t\tthis._wrongHEX = !this._colorValue.isColorValueValid();\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\t_updateColorGrid() {\n\t\tconst hslColours: ColorHSL = this._colorValue.HSL;\n\t\t// Coordinates are percentages: x = lightness, y = inverted saturation.\n\t\t// The template applies them as `left: x%` / `top: y%` so the circle scales with the box.\n\t\tthis._selectedCoordinates = {\n\t\t\tx: hslColours.l,\n\t\t\ty: 100 - hslColours.s,\n\t\t};\n\n\t\tif (this._isSelectedColorChanged) { // We shouldn't update the hue value when user presses over the main color section.\n\t\t\tthis._isSelectedColorChanged = false;\n\t\t} else if (this._isHueValueChanged) { // We shouldn't recalculate the hue value when user changes the hue slider.\n\t\t\tthis._isHueValueChanged = false;\n\t\t\tthis._hue = this.selectedHue ? this.selectedHue : this._hue;\n\t\t} else {\n\t\t\tthis._hue = hslColours.h;\n\t\t}\n\n\t\tthis._setMainColor(this._hue);\n\t}\n\n\t_isColorValueEqual(value: ColorRGB): boolean {\n\t\treturn this._colorValue.R === value.r\n\t\t\t&& this._colorValue.G === value.g\n\t\t\t&& this._colorValue.B === value.b;\n\t}\n\n\tget colorPickerLabel() {\n\t\tconst effectiveLabel = getEffectiveAriaLabelText(this);\n\t\treturn effectiveLabel\n\t\t\t? `${ColorPicker.i18nBundle.getText(COLORPICKER_LABEL)} ${effectiveLabel}`\n\t\t\t: ColorPicker.i18nBundle.getText(COLORPICKER_LABEL);\n\t}\n\n\tget sliderGroupLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_SLIDER_GROUP);\n\t}\n\n\tget hueSliderLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HUE_SLIDER);\n\t}\n\n\tget alphaSliderLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_ALPHA_SLIDER);\n\t}\n\n\tget hexInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HEX);\n\t}\n\n\tget redInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_RED);\n\t}\n\n\tget greenInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_GREEN);\n\t}\n\n\tget blueInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_BLUE);\n\t}\n\n\tget hueInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HUE);\n\t}\n\n\tget saturationInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_SATURATION);\n\t}\n\n\tget lightInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_LIGHT);\n\t}\n\n\tget alphaInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_ALPHA);\n\t}\n\n\tget percentageLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_PERCENTAGE);\n\t}\n\n\tget colorFieldsAnnouncementText() {\n\t\tconst mode = this._displayHSL ? \"HSL\" : \"RGB\";\n\t\tlet text = \"\";\n\n\t\tif (mode === \"RGB\") {\n\t\t\ttext = `${this.redInputLabel} ${this._colorValue.R}, `\n\t\t\t\t+ `${this.greenInputLabel} ${this._colorValue.G}, `\n\t\t\t\t+ `${this.blueInputLabel} ${this._colorValue.B}, `\n\t\t\t\t+ `${this.alphaInputLabel} ${this._colorValue.Alpha}`;\n\t\t} else {\n\t\t\ttext = `${this.hueInputLabel} ${this._colorValue.H}, `\n\t\t\t\t+ `${this.saturationInputLabel} ${this._colorValue.S} ${this.percentageLabel}, `\n\t\t\t\t+ `${this.lightInputLabel} ${this._colorValue.L} ${this.percentageLabel}, `\n\t\t\t\t+ `${this.alphaInputLabel} ${this._colorValue.Alpha}`;\n\t\t}\n\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_COLOR_MODE_CHANGED, mode, text);\n\t}\n\n\tget toggleModeTooltip() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_TOGGLE_MODE_TOOLTIP);\n\t}\n\n\tget inputsDisabled() {\n\t\treturn this._wrongHEX ? true : undefined;\n\t}\n\n\tget hexInputErrorState(): `${ValueState}` {\n\t\treturn this._wrongHEX ? \"Negative\" : \"None\";\n\t}\n\n\tget rgbInputs(): Array<ColorChannelInput> {\n\t\tconst redInput = {\n\t\t\tid: \"red\",\n\t\t\tvalue: this._colorValue.R,\n\t\t\tlabel: \"R\",\n\t\t\taccessibleName: this.redInputLabel,\n\t\t};\n\n\t\tconst greenInput = {\n\t\t\tid: \"green\",\n\t\t\tvalue: this._colorValue.G,\n\t\t\tlabel: \"G\",\n\t\t\taccessibleName: this.greenInputLabel,\n\t\t};\n\n\t\tconst blueInput = {\n\t\t\tid: \"blue\",\n\t\t\tvalue: this._colorValue.B,\n\t\t\tlabel: \"B\",\n\t\t\taccessibleName: this.blueInputLabel,\n\t\t};\n\n\t\treturn [redInput, greenInput, blueInput];\n\t}\n\n\tget hslInputs(): Array<ColorChannelInput> {\n\t\tconst hueInput = {\n\t\t\tid: \"hue\",\n\t\t\tvalue: this._colorValue.H,\n\t\t\tlabel: \"H\",\n\t\t\taccessibleName: this.hueInputLabel,\n\t\t};\n\n\t\tconst saturationInput = {\n\t\t\tid: \"saturation\",\n\t\t\tvalue: this._colorValue.S,\n\t\t\tlabel: \"S\",\n\t\t\taccessibleName: this.saturationInputLabel,\n\t\t\tshowPercentSymbol: true,\n\t\t};\n\n\t\tconst lightInput = {\n\t\t\tid: \"light\",\n\t\t\tvalue: this._colorValue.L,\n\t\t\tlabel: \"L\",\n\t\t\taccessibleName: this.lightInputLabel,\n\t\t\tshowPercentSymbol: true,\n\t\t};\n\n\t\treturn [hueInput, saturationInput, lightInput];\n\t}\n\n\tget HEX(): string {\n\t\treturn this._colorValue.HEX;\n\t}\n\n\tget colorChannelInputs() {\n\t\treturn this._displayHSL ? this.hslInputs : this.rgbInputs;\n\t}\n\n\tget _isDefaultPickerMode() {\n\t\treturn !this.simplified;\n\t}\n}\n\nColorPicker.define();\n\nexport default ColorPicker;\n"]}
|
|
@@ -5,8 +5,8 @@ import Input from "./Input.js";
|
|
|
5
5
|
import Button from "./Button.js";
|
|
6
6
|
export default function ColorPickerTemplate() {
|
|
7
7
|
return (_jsxs("div", { class: "ui5-color-picker-root", role: "group", "aria-label": this.colorPickerLabel, children: [_jsx("div", { class: "ui5-color-picker-main-color", role: "presentation", style: { "background-color": `rgb(${this._mainValue.r}, ${this._mainValue.g}, ${this._mainValue.b})` }, onMouseDown: this._handleMouseDown, onMouseUp: this._handleMouseUp, onMouseMove: this._handleMouseMove, onMouseOut: this._handleMouseOut, children: _jsx("div", { class: "ui5-color-picker-circle", style: {
|
|
8
|
-
left: `${this._selectedCoordinates.x}
|
|
9
|
-
top: `${this._selectedCoordinates.y}
|
|
8
|
+
left: `${this._selectedCoordinates.x}%`,
|
|
9
|
+
top: `${this._selectedCoordinates.y}%`,
|
|
10
10
|
} }) }), _jsxs("div", { class: "ui5-color-picker-sliders-wrapper", role: "group", "aria-label": this.sliderGroupLabel, children: [_jsx(Slider, { disabled: this.inputsDisabled, class: "ui5-color-picker-hue-slider", min: 0, max: 360, step: 1, value: this._hue, accessibleName: this.hueSliderLabel, showTooltip: true, onInput: this._handleHueInput }), this._isDefaultPickerMode &&
|
|
11
11
|
_jsx(Slider, { disabled: this.inputsDisabled, class: "ui5-color-picker-alpha-slider", min: 0, max: 1, step: 0.01, value: this._alpha, accessibleName: this.alphaSliderLabel, showTooltip: true, onInput: this._handleAlphaInput })] }), _jsxs("div", { class: "ui5-color-picker-current-color", children: [_jsxs("div", { class: "ui5-color-picker-colors-wrapper", children: [_jsx("span", { class: "ui5-color-picker-white" }), _jsx("span", { class: "ui5-color-picker-color", children: _jsx("div", { class: "ui5-color-picker-color-inner", style: { "background-color": this._colorValue.toRGBString() } }) })] }), _jsxs("div", { class: "ui5-color-picker-hex-input-wrapper", children: [_jsx(Label, { children: "Hex" }), _jsx(Input, { class: "ui5-color-picker-hex-input", value: this.HEX, onKeyDown: this._onkeydown, accessibleName: this.hexInputLabel, onChange: this._handleHEXChange, valueState: this.hexInputErrorState })] })] }), this._isDefaultPickerMode &&
|
|
12
12
|
_jsxs("div", { class: "ui5-color-channel-inputs-wrapper", "onui5-change": this._handleColorInputChange, children: [this.colorChannelInputs.map(input => _jsxs(_Fragment, { children: [_jsxs("div", { class: "ui5-color-channel", children: [_jsx(Input, { id: input.id, class: "ui5-color-channel-input", disabled: this.inputsDisabled, accessibleName: input.accessibleName, value: String(input.value) }), _jsx(Label, { children: input.label })] }), _jsx("div", { class: "ui5-color-channel-percentage-label", children: input.showPercentSymbol &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerTemplate.js","sourceRoot":"","sources":["../src/ColorPickerTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,MAAM,CAAC,OAAO,UAAU,mBAAmB;IAC1C,OAAO,CACN,eACC,KAAK,EAAC,uBAAuB,EAC7B,IAAI,EAAC,OAAO,gBACA,IAAI,CAAC,gBAAgB,aAEjC,cACC,KAAK,EAAC,6BAA6B,EACnC,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE,EAAE,kBAAkB,EAAE,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,KAAK,IAAI,CAAC,UAAU,CAAC,CAAC,KAAK,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,EACtG,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAClC,SAAS,EAAE,IAAI,CAAC,cAAc,EAC9B,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAClC,UAAU,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AG,CAAC,KAAK,CAAC,EAAE,CACpC,8BAAE,eAAK,KAAK,EAAC,mBAAmB,aAC/B,KAAC,KAAK,IACL,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,KAAK,EAAC,yBAAyB,EAC/B,QAAQ,EAAE,IAAI,CAAC,cAAc,EAC7B,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAI,EAC/B,KAAC,KAAK,cAAE,KAAK,CAAC,KAAK,GAAS,IACvB,EACN,cAAK,KAAK,EAAC,oCAAoC,YAC7C,KAAK,CAAC,iBAAiB;wCACvB,KAAC,KAAK,oBAAU,GAEZ,IAAG,CACT,EAED,eAAK,KAAK,EAAC,mBAAmB,aAC7B,KAAC,KAAK,IACL,EAAE,EAAC,OAAO,EACV,QAAQ,EAAE,IAAI,CAAC,cAAc,EAC7B,KAAK,EAAC,yBAAyB,EAC/B,KAAK,EAAE,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAC7C,cAAc,EAAE,IAAI,CAAC,eAAe,EACpC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,EACjC,OAAO,EAAE,IAAI,CAAC,iBAAiB,GAC9B,EACF,KAAC,KAAK,oBAAU,IACX,EAEN,wBACC,KAAC,MAAM,IACN,KAAK,EAAC,0BAA0B,EAChC,EAAE,EAAC,oBAAoB,EACvB,IAAI,EAAC,QAAQ,EACb,MAAM,EAAC,aAAa,EACpB,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAC/B,OAAO,EAAE,IAAI,CAAC,iBAAiB,GAC9B,GACG,IACD,IAEF,CACN,CAAC;AACH,CAAC","sourcesContent":["import type ColorPicker from \"./ColorPicker.js\";\nimport Label from \"./Label.js\";\nimport Slider from \"./Slider.js\";\nimport Input from \"./Input.js\";\nimport Button from \"./Button.js\";\n\nexport default function ColorPickerTemplate(this: ColorPicker) {\n\treturn (\n\t\t<div\n\t\t\tclass=\"ui5-color-picker-root\"\n\t\t\trole=\"group\"\n\t\t\taria-label={this.colorPickerLabel}\n\t\t>\n\t\t\t<div\n\t\t\t\tclass=\"ui5-color-picker-main-color\"\n\t\t\t\trole=\"presentation\"\n\t\t\t\tstyle={{ \"background-color\": `rgb(${this._mainValue.r}, ${this._mainValue.g}, ${this._mainValue.b})` }}\n\t\t\t\tonMouseDown={this._handleMouseDown}\n\t\t\t\tonMouseUp={this._handleMouseUp}\n\t\t\t\tonMouseMove={this._handleMouseMove}\n\t\t\t\tonMouseOut={this._handleMouseOut}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ui5-color-picker-circle\"\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tleft: `${this._selectedCoordinates.x}%`,\n\t\t\t\t\t\ttop: `${this._selectedCoordinates.y}%`,\n\t\t\t\t\t}}\n\t\t\t\t></div>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tclass=\"ui5-color-picker-sliders-wrapper\"\n\t\t\t\trole=\"group\"\n\t\t\t\taria-label={this.sliderGroupLabel}\n\t\t\t>\n\t\t\t\t<Slider\n\t\t\t\t\tdisabled={this.inputsDisabled}\n\t\t\t\t\tclass=\"ui5-color-picker-hue-slider\"\n\t\t\t\t\tmin={0}\n\t\t\t\t\tmax={360}\n\t\t\t\t\tstep={1}\n\t\t\t\t\tvalue={this._hue}\n\t\t\t\t\taccessibleName={this.hueSliderLabel}\n\t\t\t\t\tshowTooltip={true}\n\t\t\t\t\tonInput={this._handleHueInput}\n\t\t\t\t/>\n\n\t\t\t\t{this._isDefaultPickerMode &&\n\t\t\t\t\t<Slider\n\t\t\t\t\t\tdisabled={this.inputsDisabled}\n\t\t\t\t\t\tclass=\"ui5-color-picker-alpha-slider\"\n\t\t\t\t\t\tmin={0}\n\t\t\t\t\t\tmax={1}\n\t\t\t\t\t\tstep={0.01}\n\t\t\t\t\t\tvalue={this._alpha}\n\t\t\t\t\t\taccessibleName={this.alphaSliderLabel}\n\t\t\t\t\t\tshowTooltip={true}\n\t\t\t\t\t\tonInput={this._handleAlphaInput}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t</div>\n\n\t\t\t<div class=\"ui5-color-picker-current-color\">\n\t\t\t\t<div class=\"ui5-color-picker-colors-wrapper\">\n\t\t\t\t\t<span class=\"ui5-color-picker-white\"></span>\n\t\t\t\t\t<span class=\"ui5-color-picker-color\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"ui5-color-picker-color-inner\"\n\t\t\t\t\t\t\tstyle={{ \"background-color\": this._colorValue.toRGBString() }}\n\t\t\t\t\t\t></div>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"ui5-color-picker-hex-input-wrapper\">\n\t\t\t\t\t<Label>Hex</Label>\n\t\t\t\t\t<Input\n\t\t\t\t\t\tclass=\"ui5-color-picker-hex-input\"\n\t\t\t\t\t\tvalue={this.HEX}\n\t\t\t\t\t\tonKeyDown={this._onkeydown}\n\t\t\t\t\t\taccessibleName={this.hexInputLabel}\n\t\t\t\t\t\tonChange={this._handleHEXChange}\n\t\t\t\t\t\tvalueState={this.hexInputErrorState}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{this._isDefaultPickerMode &&\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ui5-color-channel-inputs-wrapper\"\n\t\t\t\t\tonui5-change={this._handleColorInputChange}\n\t\t\t\t>\n\t\t\t\t\t{this.colorChannelInputs.map(input =>\n\t\t\t\t\t\t<><div class=\"ui5-color-channel\">\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tid={input.id}\n\t\t\t\t\t\t\t\tclass=\"ui5-color-channel-input\"\n\t\t\t\t\t\t\t\tdisabled={this.inputsDisabled}\n\t\t\t\t\t\t\t\taccessibleName={input.accessibleName}\n\t\t\t\t\t\t\t\tvalue={String(input.value)} />\n\t\t\t\t\t\t\t<Label>{input.label}</Label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui5-color-channel-percentage-label\">\n\t\t\t\t\t\t\t{input.showPercentSymbol &&\n\t\t\t\t\t\t\t\t<Label>%</Label>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div></>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div class=\"ui5-color-channel\">\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tid=\"alpha\"\n\t\t\t\t\t\t\tdisabled={this.inputsDisabled}\n\t\t\t\t\t\t\tclass=\"ui5-color-channel-input\"\n\t\t\t\t\t\t\tvalue={this._alphaTemp ?? String(this._alpha)}\n\t\t\t\t\t\t\taccessibleName={this.alphaInputLabel}\n\t\t\t\t\t\t\tonChange={this._handleAlphaChange}\n\t\t\t\t\t\t\tonInput={this._handleAlphaInput}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Label>A</Label>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclass=\"ui5-color-channel-toggle\"\n\t\t\t\t\t\t\tid=\"toggle-picker-mode\"\n\t\t\t\t\t\t\ticon=\"expand\"\n\t\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\t\ttooltip={this.toggleModeTooltip}\n\t\t\t\t\t\t\tonClick={this._togglePickerMode}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</div>\n\t);\n}\n"]}
|
package/dist/DayPicker.d.ts
CHANGED
|
@@ -149,9 +149,10 @@ declare class DayPicker extends CalendarPart implements ICalendarPicker {
|
|
|
149
149
|
* Selects/deselects a day.
|
|
150
150
|
* @param e
|
|
151
151
|
* @param isShift true if the user did Click+Shift or Enter+Shift (but not Space+Shift)
|
|
152
|
+
* @param setTimestamp whether to move focus (timestamp) to the selected day; false for mouse clicks where focus is independent
|
|
152
153
|
* @private
|
|
153
154
|
*/
|
|
154
|
-
_selectDate(e: Event, isShift: boolean): void;
|
|
155
|
+
_selectDate(e: Event, isShift: boolean, setTimestamp?: boolean): void;
|
|
155
156
|
_updateSelectedDates(timestamp: number, isShift: boolean): void;
|
|
156
157
|
/**
|
|
157
158
|
* Selects/deselects the whole row (week).
|
|
@@ -161,6 +162,7 @@ declare class DayPicker extends CalendarPart implements ICalendarPicker {
|
|
|
161
162
|
_toggleTimestampInSelection(timestamp: number): void;
|
|
162
163
|
_addTimestampToSelection(timestamp: number): void;
|
|
163
164
|
_removeTimestampFromSelection(timestamp: number): void;
|
|
165
|
+
_onmousedown(e: MouseEvent): void;
|
|
164
166
|
/**
|
|
165
167
|
* Called when at least one day is selected and the user presses "Shift".
|
|
166
168
|
* @param timestamp
|
package/dist/DayPicker.js
CHANGED
|
@@ -329,9 +329,10 @@ let DayPicker = DayPicker_1 = class DayPicker extends CalendarPart {
|
|
|
329
329
|
* Selects/deselects a day.
|
|
330
330
|
* @param e
|
|
331
331
|
* @param isShift true if the user did Click+Shift or Enter+Shift (but not Space+Shift)
|
|
332
|
+
* @param setTimestamp whether to move focus (timestamp) to the selected day; false for mouse clicks where focus is independent
|
|
332
333
|
* @private
|
|
333
334
|
*/
|
|
334
|
-
_selectDate(e, isShift) {
|
|
335
|
+
_selectDate(e, isShift, setTimestamp = true) {
|
|
335
336
|
let target = e.target;
|
|
336
337
|
if (!target.hasAttribute("data-sap-timestamp")) {
|
|
337
338
|
target = target.parentNode;
|
|
@@ -340,7 +341,9 @@ let DayPicker = DayPicker_1 = class DayPicker extends CalendarPart {
|
|
|
340
341
|
return;
|
|
341
342
|
}
|
|
342
343
|
const timestamp = this._getTimestampFromDom(target);
|
|
343
|
-
|
|
344
|
+
if (setTimestamp) {
|
|
345
|
+
this._safelySetTimestamp(timestamp);
|
|
346
|
+
}
|
|
344
347
|
this._updateSecondTimestamp();
|
|
345
348
|
this._updateSelectedDates(timestamp, isShift);
|
|
346
349
|
this.fireDecoratorEvent("change", {
|
|
@@ -412,6 +415,17 @@ let DayPicker = DayPicker_1 = class DayPicker extends CalendarPart {
|
|
|
412
415
|
_removeTimestampFromSelection(timestamp) {
|
|
413
416
|
this.selectedDates = this.selectedDates.filter(value => value !== timestamp);
|
|
414
417
|
}
|
|
418
|
+
_onmousedown(e) {
|
|
419
|
+
let target = e.target;
|
|
420
|
+
if (!target.hasAttribute("data-sap-timestamp")) {
|
|
421
|
+
target = target.parentNode;
|
|
422
|
+
}
|
|
423
|
+
if (!this._isDayPressed(target)) {
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
this._safelySetTimestamp(this._getTimestampFromDom(target));
|
|
427
|
+
this.fireDecoratorEvent("navigate", { timestamp: this.timestamp });
|
|
428
|
+
}
|
|
415
429
|
/**
|
|
416
430
|
* Called when at least one day is selected and the user presses "Shift".
|
|
417
431
|
* @param timestamp
|
|
@@ -538,7 +552,7 @@ let DayPicker = DayPicker_1 = class DayPicker extends CalendarPart {
|
|
|
538
552
|
* @private
|
|
539
553
|
*/
|
|
540
554
|
_onclick(e) {
|
|
541
|
-
this._selectDate(e, e.shiftKey);
|
|
555
|
+
this._selectDate(e, e.shiftKey, false);
|
|
542
556
|
}
|
|
543
557
|
/**
|
|
544
558
|
* Called upon "Home" or "End" - moves the focus to the first or last item in the row.
|