@ui5/webcomponents 1.2.1 → 1.2.4
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 +41 -0
- package/dist/Breadcrumbs.js +3 -3
- package/dist/CardHeader.js +5 -4
- package/dist/DatePicker.js +1 -2
- package/dist/ListItemBase.js +1 -1
- package/dist/Popover.js +29 -72
- package/dist/Select.js +5 -0
- package/dist/TimePicker.js +0 -2
- package/dist/TimeSelection.js +7 -0
- package/dist/css/themes/Calendar.css +1 -1
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -0
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -0
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -0
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -0
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -0
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -0
- package/dist/generated/i18n/i18n-defaults.js +2 -2
- package/dist/generated/json-imports/Themes-static.js +8 -2
- package/dist/generated/json-imports/Themes.js +4 -1
- package/dist/generated/templates/DateTimePickerPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/SelectTemplate.lit.js +1 -1
- package/dist/generated/themes/Calendar.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -0
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -0
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -0
- package/dist/i18n/messagebundle.properties +3 -0
- package/package.json +8 -8
- package/src/Breadcrumbs.js +3 -3
- package/src/CardHeader.hbs +1 -1
- package/src/CardHeader.js +5 -4
- package/src/DatePicker.js +1 -2
- package/src/DateTimePickerPopover.hbs +2 -0
- package/src/ListItemBase.js +1 -1
- package/src/Popover.js +29 -72
- package/src/Select.hbs +1 -0
- package/src/Select.js +5 -0
- package/src/TimePicker.js +0 -2
- package/src/TimeSelection.js +7 -0
- package/src/i18n/messagebundle.properties +3 -0
- package/src/themes/Calendar.css +1 -1
- package/src/themes/base/Avatar-parameters.css +31 -31
- package/src/themes/sap_belize_hcb/Avatar-parameters.css +15 -15
- package/src/themes/sap_belize_hcw/Avatar-parameters.css +15 -15
- package/src/themes/sap_fiori_3/Avatar-parameters.css +5 -5
- package/src/themes/sap_fiori_3_dark/Avatar-parameters.css +5 -5
- package/src/themes/sap_fiori_3_hcb/Avatar-parameters.css +19 -19
- package/src/themes/sap_fiori_3_hcw/Avatar-parameters.css +19 -19
- package/src/themes/sap_horizon_dark/Avatar-parameters.css +33 -0
- package/src/themes/sap_horizon_dark/BusyIndicator-parameters.css +7 -0
- package/src/themes/sap_horizon_dark/Button-parameters.css +20 -0
- package/src/themes/sap_horizon_dark/CalendarHeader-parameters.css +19 -0
- package/src/themes/sap_horizon_dark/Card-parameters.css +10 -0
- package/src/themes/sap_horizon_dark/CheckBox-parameters.css +34 -0
- package/src/themes/sap_horizon_dark/ColorPalette-parameters.css +16 -0
- package/src/themes/sap_horizon_dark/ColorPicker-parameters.css +10 -0
- package/src/themes/sap_horizon_dark/DatePicker-parameters.css +6 -0
- package/src/themes/sap_horizon_dark/DayPicker-parameters.css +31 -0
- package/src/themes/sap_horizon_dark/Dialog-parameters.css +11 -0
- package/src/themes/sap_horizon_dark/GrowingButton-parameters.css +5 -0
- package/src/themes/sap_horizon_dark/Input-parameters.css +35 -0
- package/src/themes/sap_horizon_dark/InputIcon-parameters.css +17 -0
- package/src/themes/sap_horizon_dark/Link-parameters.css +10 -0
- package/src/themes/sap_horizon_dark/List-parameters.css +5 -0
- package/src/themes/sap_horizon_dark/ListItemBase-parameters.css +7 -0
- package/src/themes/sap_horizon_dark/MessageStrip-parameters.css +9 -0
- package/src/themes/sap_horizon_dark/MonthPicker-parameters.css +17 -0
- package/src/themes/sap_horizon_dark/MultiComboBox-parameters.css +5 -0
- package/src/themes/sap_horizon_dark/Panel-parameters.css +12 -0
- package/src/themes/sap_horizon_dark/PopupsCommon-parameters.css +10 -0
- package/src/themes/sap_horizon_dark/ProgressIndicator-parameters.css +23 -0
- package/src/themes/sap_horizon_dark/RadioButton-parameters.css +9 -0
- package/src/themes/sap_horizon_dark/RatingIndicator-parameters.css +3 -0
- package/src/themes/sap_horizon_dark/SegmentedButtton-parameters.css +10 -0
- package/src/themes/sap_horizon_dark/Select-parameters.css +5 -0
- package/src/themes/sap_horizon_dark/SelectPopover-parameters.css +4 -0
- package/src/themes/sap_horizon_dark/SliderBase-parameters.css +44 -0
- package/src/themes/sap_horizon_dark/StepInput-parameters.css +25 -0
- package/src/themes/sap_horizon_dark/Suggestions-parameters.css +5 -0
- package/src/themes/sap_horizon_dark/Switch-parameters.css +31 -0
- package/src/themes/sap_horizon_dark/TabContainer-parameters.css +25 -0
- package/src/themes/sap_horizon_dark/Table-parameters.css +8 -0
- package/src/themes/sap_horizon_dark/TableColumn-parameters.css +5 -0
- package/src/themes/sap_horizon_dark/TableRow-parameters.css +5 -0
- package/src/themes/sap_horizon_dark/TextArea-parameters.css +22 -0
- package/src/themes/sap_horizon_dark/TimePicker-parameters.css +6 -0
- package/src/themes/sap_horizon_dark/ToggleButton-parameters.css +11 -0
- package/src/themes/sap_horizon_dark/Token-parameters.css +28 -0
- package/src/themes/sap_horizon_dark/Tokenizer-parameters.css +6 -0
- package/src/themes/sap_horizon_dark/ValueStateMessage-parameters.css +8 -0
- package/src/themes/sap_horizon_dark/WheelSlider-parameters.css +19 -0
- package/src/themes/sap_horizon_dark/YearPicker-parameters.css +16 -0
- package/src/themes/sap_horizon_dark/parameters-bundle.css +57 -0
- package/src/themes/sap_horizon_dark/sizes-parameters.css +8 -0
- package/src/themes/sap_horizon_hcb/Avatar-parameters.css +24 -0
- package/src/themes/sap_horizon_hcb/Badge-parameters.css +43 -0
- package/src/themes/sap_horizon_hcb/Button-parameters.css +10 -0
- package/src/themes/sap_horizon_hcb/CalendarHeader-parameters.css +11 -0
- package/src/themes/sap_horizon_hcb/Card-parameters.css +6 -0
- package/src/themes/sap_horizon_hcb/Carousel-parameters.css +9 -0
- package/src/themes/sap_horizon_hcb/CheckBox-parameters.css +13 -0
- package/src/themes/sap_horizon_hcb/DatePicker-parameters.css +5 -0
- package/src/themes/sap_horizon_hcb/DayPicker-parameters.css +17 -0
- package/src/themes/sap_horizon_hcb/Dialog-parameters.css +7 -0
- package/src/themes/sap_horizon_hcb/GrowingButton-parameters.css +8 -0
- package/src/themes/sap_horizon_hcb/Input-parameters.css +21 -0
- package/src/themes/sap_horizon_hcb/InputIcon-parameters.css +5 -0
- package/src/themes/sap_horizon_hcb/Link-parameters.css +7 -0
- package/src/themes/sap_horizon_hcb/MessageStrip-parameters.css +10 -0
- package/src/themes/sap_horizon_hcb/MonthPicker-parameters.css +11 -0
- package/src/themes/sap_horizon_hcb/Panel-parameters.css +5 -0
- package/src/themes/sap_horizon_hcb/ProgressIndicator-parameters.css +11 -0
- package/src/themes/sap_horizon_hcb/RadioButton-parameters.css +10 -0
- package/src/themes/sap_horizon_hcb/Select-parameters.css +12 -0
- package/src/themes/sap_horizon_hcb/SliderBase-parameters.css +14 -0
- package/src/themes/sap_horizon_hcb/Switch-parameters.css +43 -0
- package/src/themes/sap_horizon_hcb/TabContainer-parameters.css +44 -0
- package/src/themes/sap_horizon_hcb/Table-parameters.css +5 -0
- package/src/themes/sap_horizon_hcb/TableRow-parameters.css +5 -0
- package/src/themes/sap_horizon_hcb/TextArea-parameters.css +10 -0
- package/src/themes/sap_horizon_hcb/TimePicker-parameters.css +5 -0
- package/src/themes/sap_horizon_hcb/ToggleButton-parameters.css +6 -0
- package/src/themes/sap_horizon_hcb/Token-parameters.css +7 -0
- package/src/themes/sap_horizon_hcb/ValueStateMessage-parameters.css +5 -0
- package/src/themes/sap_horizon_hcb/WheelSlider-parameters.css +17 -0
- package/src/themes/sap_horizon_hcb/YearPicker-parameters.css +11 -0
- package/src/themes/sap_horizon_hcb/parameters-bundle.css +48 -0
- package/src/themes/sap_horizon_hcw/Avatar-parameters.css +24 -0
- package/src/themes/sap_horizon_hcw/Badge-parameters.css +43 -0
- package/src/themes/sap_horizon_hcw/Button-parameters.css +10 -0
- package/src/themes/sap_horizon_hcw/CalendarHeader-parameters.css +11 -0
- package/src/themes/sap_horizon_hcw/Card-parameters.css +6 -0
- package/src/themes/sap_horizon_hcw/Carousel-parameters.css +9 -0
- package/src/themes/sap_horizon_hcw/CheckBox-parameters.css +13 -0
- package/src/themes/sap_horizon_hcw/DatePicker-parameters.css +5 -0
- package/src/themes/sap_horizon_hcw/DayPicker-parameters.css +17 -0
- package/src/themes/sap_horizon_hcw/Dialog-parameters.css +7 -0
- package/src/themes/sap_horizon_hcw/GrowingButton-parameters.css +8 -0
- package/src/themes/sap_horizon_hcw/Input-parameters.css +21 -0
- package/src/themes/sap_horizon_hcw/InputIcon-parameters.css +5 -0
- package/src/themes/sap_horizon_hcw/Link-parameters.css +7 -0
- package/src/themes/sap_horizon_hcw/MessageStrip-parameters.css +10 -0
- package/src/themes/sap_horizon_hcw/MonthPicker-parameters.css +11 -0
- package/src/themes/sap_horizon_hcw/Panel-parameters.css +5 -0
- package/src/themes/sap_horizon_hcw/ProgressIndicator-parameters.css +11 -0
- package/src/themes/sap_horizon_hcw/RadioButton-parameters.css +10 -0
- package/src/themes/sap_horizon_hcw/Select-parameters.css +12 -0
- package/src/themes/sap_horizon_hcw/SliderBase-parameters.css +13 -0
- package/src/themes/sap_horizon_hcw/Switch-parameters.css +43 -0
- package/src/themes/sap_horizon_hcw/TabContainer-parameters.css +44 -0
- package/src/themes/sap_horizon_hcw/Table-parameters.css +5 -0
- package/src/themes/sap_horizon_hcw/TableRow-parameters.css +5 -0
- package/src/themes/sap_horizon_hcw/TextArea-parameters.css +10 -0
- package/src/themes/sap_horizon_hcw/TimePicker-parameters.css +5 -0
- package/src/themes/sap_horizon_hcw/ToggleButton-parameters.css +6 -0
- package/src/themes/sap_horizon_hcw/Token-parameters.css +7 -0
- package/src/themes/sap_horizon_hcw/ValueStateMessage-parameters.css +5 -0
- package/src/themes/sap_horizon_hcw/WheelSlider-parameters.css +17 -0
- package/src/themes/sap_horizon_hcw/YearPicker-parameters.css +11 -0
- package/src/themes/sap_horizon_hcw/parameters-bundle.css +48 -0
package/src/CardHeader.js
CHANGED
|
@@ -241,15 +241,16 @@ class CardHeader extends UI5Element {
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
_headerClick(event) {
|
|
244
|
-
|
|
244
|
+
// prevents the native browser "click" event from firing
|
|
245
|
+
event.stopImmediatePropagation();
|
|
245
246
|
|
|
246
|
-
if (this.interactive) {
|
|
247
|
+
if (this.interactive && event.target === event.currentTarget) {
|
|
247
248
|
this.fireEvent("click");
|
|
248
249
|
}
|
|
249
250
|
}
|
|
250
251
|
|
|
251
252
|
_headerKeydown(event) {
|
|
252
|
-
if (!this.interactive) {
|
|
253
|
+
if (!this.interactive || event.target !== event.currentTarget) {
|
|
253
254
|
return;
|
|
254
255
|
}
|
|
255
256
|
|
|
@@ -269,7 +270,7 @@ class CardHeader extends UI5Element {
|
|
|
269
270
|
}
|
|
270
271
|
|
|
271
272
|
_headerKeyup(event) {
|
|
272
|
-
if (!this.interactive) {
|
|
273
|
+
if (!this.interactive || event.target !== event.currentTarget) {
|
|
273
274
|
return;
|
|
274
275
|
}
|
|
275
276
|
|
package/src/DatePicker.js
CHANGED
|
@@ -415,7 +415,7 @@ class DatePicker extends DateComponentBase {
|
|
|
415
415
|
console.warn(`In order for the "name" property to have effect, you should also: import "@ui5/webcomponents/dist/features/InputElementsFormSupport.js";`); // eslint-disable-line
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
-
this.value = this.normalizeValue(this.value);
|
|
418
|
+
this.value = this.normalizeValue(this.value) || this.value;
|
|
419
419
|
this.liveValue = this.value;
|
|
420
420
|
}
|
|
421
421
|
|
|
@@ -677,7 +677,6 @@ class DatePicker extends DateComponentBase {
|
|
|
677
677
|
"ariaHasPopup": HasPopup.Grid,
|
|
678
678
|
"ariaAutoComplete": "none",
|
|
679
679
|
"ariaControls": `${this._id}-responsive-popover`,
|
|
680
|
-
"ariaExpanded": this.isOpen(),
|
|
681
680
|
"ariaRequired": this.required,
|
|
682
681
|
"ariaLabel": getEffectiveAriaLabelText(this),
|
|
683
682
|
};
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
class="ui5-dt-cal {{classes.dateTimeView}}"
|
|
19
19
|
id="{{_id}}-calendar"
|
|
20
20
|
primary-calendar-type="{{_primaryCalendarType}}"
|
|
21
|
+
secondary-calendar-type="{{secondaryCalendarType}}"
|
|
21
22
|
format-pattern="{{_formatPattern}}"
|
|
22
23
|
timestamp="{{_calendarTimestamp}}"
|
|
23
24
|
.selectionMode="{{_calendarSelectionMode}}"
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
value="{{_timeSelectionValue}}"
|
|
45
46
|
format-pattern="{{_formatPattern}}"
|
|
46
47
|
._currentSlider="{{_currentTimeSlider}}"
|
|
48
|
+
._calendarType="{{_primaryCalendarType}}"
|
|
47
49
|
@ui5-change="{{onTimeSelectionChange}}"
|
|
48
50
|
@ui5-slider-change="{{onTimeSliderChange}}"
|
|
49
51
|
></ui5-time-selection>
|
package/src/ListItemBase.js
CHANGED
package/src/Popover.js
CHANGED
|
@@ -15,7 +15,7 @@ import browserScrollbarCSS from "./generated/themes/BrowserScrollbar.css.js";
|
|
|
15
15
|
import PopupsCommonCss from "./generated/themes/PopupsCommon.css.js";
|
|
16
16
|
import PopoverCss from "./generated/themes/Popover.css.js";
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const ARROW_SIZE = 8;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* @public
|
|
@@ -303,10 +303,6 @@ class Popover extends Popup {
|
|
|
303
303
|
return 10; // px
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
static get ARROW_MARGIN() {
|
|
307
|
-
return 6; // px
|
|
308
|
-
}
|
|
309
|
-
|
|
310
306
|
onAfterRendering() {
|
|
311
307
|
if (!this.isOpen() && this.open) {
|
|
312
308
|
const opener = document.getElementById(this.opener);
|
|
@@ -456,12 +452,8 @@ class Popover extends Popup {
|
|
|
456
452
|
top = Math.max(top, this._top);
|
|
457
453
|
}
|
|
458
454
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
const arrow = this._clampArrowPlacement(placement.arrow, isVertical, this._top, this._left, popoverSize, borderRadius);
|
|
462
|
-
|
|
463
|
-
this.arrowTranslateX = arrow.x;
|
|
464
|
-
this.arrowTranslateY = arrow.y;
|
|
455
|
+
this.arrowTranslateX = placement.arrow.x;
|
|
456
|
+
this.arrowTranslateY = placement.arrow.y;
|
|
465
457
|
|
|
466
458
|
top = this._adjustForIOSKeyboard(top);
|
|
467
459
|
|
|
@@ -476,59 +468,6 @@ class Popover extends Popup {
|
|
|
476
468
|
}
|
|
477
469
|
}
|
|
478
470
|
|
|
479
|
-
/**
|
|
480
|
-
* Restricts the arrow's coordinates within the bounds of the popover.
|
|
481
|
-
* @private
|
|
482
|
-
* @param {{x: number, y: number}} arrow arrow's coordinates
|
|
483
|
-
* @param {boolean} isVertical if the popover is placed vertically relative to the opener
|
|
484
|
-
* @param {number} top popover's top
|
|
485
|
-
* @param {number} left popover's left
|
|
486
|
-
* @param {{width: number, height: number}} popoverSize popover's width and height
|
|
487
|
-
* @param {number} borderRadius value of the border-radius property
|
|
488
|
-
* @returns {{x: number, y: number}} Arrow's coordinates
|
|
489
|
-
*/
|
|
490
|
-
_clampArrowPlacement({ x, y }, isVertical, top, left, { width, height }, borderRadius) {
|
|
491
|
-
const maxY = this._getArrowRange(height, borderRadius);
|
|
492
|
-
const maxX = this._getArrowRange(width, borderRadius);
|
|
493
|
-
|
|
494
|
-
if (isVertical) {
|
|
495
|
-
const popoverOnLeftBorderOffset = Popover.VIEWPORT_MARGIN - left;
|
|
496
|
-
const popoverOnRightBorderOffset = left + width + Popover.VIEWPORT_MARGIN - document.documentElement.clientWidth;
|
|
497
|
-
|
|
498
|
-
if (popoverOnLeftBorderOffset > 0) {
|
|
499
|
-
x = Math.max(x - popoverOnLeftBorderOffset, -maxX);
|
|
500
|
-
} else if (popoverOnRightBorderOffset > 0) {
|
|
501
|
-
x = Math.min(x + popoverOnRightBorderOffset, maxX);
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
if (!isVertical) {
|
|
506
|
-
const popoverOnTopBorderOffset = Popover.VIEWPORT_MARGIN - top;
|
|
507
|
-
const popoverOnBottomBorderOffset = top + height + Popover.VIEWPORT_MARGIN - document.documentElement.clientHeight;
|
|
508
|
-
if (popoverOnTopBorderOffset > 0) {
|
|
509
|
-
y = Math.max(y - popoverOnTopBorderOffset, -maxY);
|
|
510
|
-
} else if (popoverOnBottomBorderOffset > 0) {
|
|
511
|
-
y = Math.min(y + popoverOnBottomBorderOffset, maxY);
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
return {
|
|
516
|
-
x: Math.round(x),
|
|
517
|
-
y: Math.round(y),
|
|
518
|
-
};
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
/**
|
|
522
|
-
* Returns the allowed range for the popover arrow based on its dimension.
|
|
523
|
-
* @private
|
|
524
|
-
* @param {number} dimension the height or width of the popover
|
|
525
|
-
* @param {number} borderRadius border radius of the popover
|
|
526
|
-
* @returns {number}
|
|
527
|
-
*/
|
|
528
|
-
_getArrowRange(dimension, borderRadius) {
|
|
529
|
-
return Math.floor((dimension / 2) - (borderRadius + Popover.ARROW_MARGIN));
|
|
530
|
-
}
|
|
531
|
-
|
|
532
471
|
/**
|
|
533
472
|
* Adjust the desired top position to compensate for shift of the screen
|
|
534
473
|
* caused by opened keyboard on iOS which affects all elements with position:fixed.
|
|
@@ -598,7 +537,7 @@ class Popover extends Popup {
|
|
|
598
537
|
popoverSize.height = targetRect.height;
|
|
599
538
|
}
|
|
600
539
|
|
|
601
|
-
const arrowOffset = this.hideArrow ? 0 :
|
|
540
|
+
const arrowOffset = this.hideArrow ? 0 : ARROW_SIZE;
|
|
602
541
|
|
|
603
542
|
// calc popover positions
|
|
604
543
|
switch (placementType) {
|
|
@@ -666,7 +605,8 @@ class Popover extends Popup {
|
|
|
666
605
|
this._top = Math.round(top);
|
|
667
606
|
}
|
|
668
607
|
|
|
669
|
-
const
|
|
608
|
+
const borderRadius = Number.parseInt(window.getComputedStyle(this).getPropertyValue("border-radius"));
|
|
609
|
+
const arrowPos = this.getArrowPosition(targetRect, popoverSize, left, top, isVertical, borderRadius);
|
|
670
610
|
|
|
671
611
|
return {
|
|
672
612
|
arrow: arrowPos,
|
|
@@ -680,33 +620,50 @@ class Popover extends Popup {
|
|
|
680
620
|
* Calculates the position for the arrow.
|
|
681
621
|
* @private
|
|
682
622
|
* @param targetRect BoundingClientRect of the target element
|
|
683
|
-
* @param popoverSize Width and height of the popover
|
|
623
|
+
* @param {{width: number, height: number}} popoverSize Width and height of the popover
|
|
684
624
|
* @param left Left offset of the popover
|
|
685
625
|
* @param top Top offset of the popover
|
|
686
|
-
* @param isVertical
|
|
626
|
+
* @param isVertical If the popover is positioned vertically to the target element
|
|
627
|
+
* @param {number} borderRadius Value of the border-radius property
|
|
687
628
|
* @returns {{x: number, y: number}} Arrow's coordinates
|
|
688
629
|
*/
|
|
689
|
-
getArrowPosition(targetRect,
|
|
630
|
+
getArrowPosition(targetRect, { width, height }, left, top, isVertical, borderRadius) {
|
|
690
631
|
let arrowXCentered = this.horizontalAlign === PopoverHorizontalAlign.Center || this.horizontalAlign === PopoverHorizontalAlign.Stretch;
|
|
691
632
|
|
|
692
633
|
if (this.horizontalAlign === PopoverHorizontalAlign.Right && left <= targetRect.left) {
|
|
693
634
|
arrowXCentered = true;
|
|
694
635
|
}
|
|
695
636
|
|
|
696
|
-
if (this.horizontalAlign === PopoverHorizontalAlign.Left && left +
|
|
637
|
+
if (this.horizontalAlign === PopoverHorizontalAlign.Left && left + width >= targetRect.left + targetRect.width) {
|
|
697
638
|
arrowXCentered = true;
|
|
698
639
|
}
|
|
699
640
|
|
|
700
641
|
let arrowTranslateX = 0;
|
|
701
642
|
if (isVertical && arrowXCentered) {
|
|
702
|
-
arrowTranslateX = targetRect.left + targetRect.width / 2 - left -
|
|
643
|
+
arrowTranslateX = targetRect.left + targetRect.width / 2 - left - width / 2;
|
|
703
644
|
}
|
|
704
645
|
|
|
705
646
|
let arrowTranslateY = 0;
|
|
706
647
|
if (!isVertical) {
|
|
707
|
-
arrowTranslateY = targetRect.top + targetRect.height / 2 - top -
|
|
648
|
+
arrowTranslateY = targetRect.top + targetRect.height / 2 - top - height / 2;
|
|
708
649
|
}
|
|
709
650
|
|
|
651
|
+
// Restricts the arrow's translate value along each dimension,
|
|
652
|
+
// so that the arrow does not clip over the popover's rounded borders.
|
|
653
|
+
const safeRangeForArrowY = height / 2 - borderRadius - ARROW_SIZE / 2;
|
|
654
|
+
arrowTranslateY = clamp(
|
|
655
|
+
arrowTranslateY,
|
|
656
|
+
-safeRangeForArrowY,
|
|
657
|
+
safeRangeForArrowY,
|
|
658
|
+
);
|
|
659
|
+
|
|
660
|
+
const safeRangeForArrowX = width / 2 - borderRadius - ARROW_SIZE / 2;
|
|
661
|
+
arrowTranslateX = clamp(
|
|
662
|
+
arrowTranslateX,
|
|
663
|
+
-safeRangeForArrowX,
|
|
664
|
+
safeRangeForArrowX,
|
|
665
|
+
);
|
|
666
|
+
|
|
710
667
|
return {
|
|
711
668
|
x: Math.round(arrowTranslateX),
|
|
712
669
|
y: Math.round(arrowTranslateY),
|
package/src/Select.hbs
CHANGED
package/src/Select.js
CHANGED
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
VALUE_STATE_WARNING,
|
|
33
33
|
INPUT_SUGGESTIONS_TITLE,
|
|
34
34
|
LIST_ITEM_POSITION,
|
|
35
|
+
SELECT_ROLE_DESCRIPTION,
|
|
35
36
|
} from "./generated/i18n/i18n-defaults.js";
|
|
36
37
|
import Option from "./Option.js";
|
|
37
38
|
import Label from "./Label.js";
|
|
@@ -768,6 +769,10 @@ class Select extends UI5Element {
|
|
|
768
769
|
&& !this._isPickerOpen && !this._isPhone;
|
|
769
770
|
}
|
|
770
771
|
|
|
772
|
+
get _ariaRoleDescription() {
|
|
773
|
+
return Select.i18nBundle.getText(SELECT_ROLE_DESCRIPTION);
|
|
774
|
+
}
|
|
775
|
+
|
|
771
776
|
get _isPhone() {
|
|
772
777
|
return isPhone();
|
|
773
778
|
}
|
package/src/TimePicker.js
CHANGED
|
@@ -150,9 +150,7 @@ class TimePicker extends TimePickerBase {
|
|
|
150
150
|
"ariaRoledescription": this.dateAriaDescription,
|
|
151
151
|
"ariaHasPopup": "dialog",
|
|
152
152
|
"ariaAutoComplete": "none",
|
|
153
|
-
"role": "combobox",
|
|
154
153
|
"ariaControls": `${this._id}-responsive-popover`,
|
|
155
|
-
"ariaExpanded": this.isOpen(),
|
|
156
154
|
};
|
|
157
155
|
}
|
|
158
156
|
|
package/src/TimeSelection.js
CHANGED
|
@@ -7,6 +7,7 @@ import getLocale from "@ui5/webcomponents-base/dist/locale/getLocale.js";
|
|
|
7
7
|
import DateFormat from "@ui5/webcomponents-localization/dist/DateFormat.js";
|
|
8
8
|
import getCachedLocaleDataInstance from "@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js";
|
|
9
9
|
import "@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js"; // default calendar for bundling
|
|
10
|
+
import CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
|
|
10
11
|
import { fetchCldr } from "@ui5/webcomponents-base/dist/asset-registries/LocaleData.js";
|
|
11
12
|
import {
|
|
12
13
|
isLeft,
|
|
@@ -136,6 +137,10 @@ const metadata = {
|
|
|
136
137
|
type: String,
|
|
137
138
|
defaultValue: "hours",
|
|
138
139
|
},
|
|
140
|
+
|
|
141
|
+
_calendarType: {
|
|
142
|
+
type: CalendarType,
|
|
143
|
+
},
|
|
139
144
|
},
|
|
140
145
|
events: /** @lends sap.ui.webcomponents.main.TimeSelection.prototype */ {
|
|
141
146
|
/**
|
|
@@ -435,10 +440,12 @@ class TimeSelection extends UI5Element {
|
|
|
435
440
|
let dateFormat;
|
|
436
441
|
if (this._isPattern) {
|
|
437
442
|
dateFormat = DateFormat.getInstance({
|
|
443
|
+
calendarType: this._calendarType,
|
|
438
444
|
pattern: this._formatPattern,
|
|
439
445
|
});
|
|
440
446
|
} else {
|
|
441
447
|
dateFormat = DateFormat.getInstance({
|
|
448
|
+
calendarType: this._calendarType,
|
|
442
449
|
style: this._formatPattern,
|
|
443
450
|
});
|
|
444
451
|
}
|
|
@@ -109,6 +109,9 @@ FILEUPLOADER_TITLE=Upload File
|
|
|
109
109
|
|
|
110
110
|
GROUP_HEADER_TEXT=Group Header
|
|
111
111
|
|
|
112
|
+
#XACT: ARIA announcement for the Select`s roledescription attribute
|
|
113
|
+
SELECT_ROLE_DESCRIPTION=Select ComboBox
|
|
114
|
+
|
|
112
115
|
#XTXT: MultiComboBox and ComboBox icon accessible name
|
|
113
116
|
SELECT_OPTIONS=Select Options
|
|
114
117
|
|
package/src/themes/Calendar.css
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
box-sizing: border-box;
|
|
8
8
|
height: var(--_ui5_calendar_height);
|
|
9
9
|
width: var(--_ui5_calendar_width);
|
|
10
|
-
|
|
10
|
+
margin: var(--_ui5_calendar_top_bottom_padding) var(--_ui5_calendar_left_right_padding) 0;
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column-reverse;
|
|
13
13
|
justify-content: flex-end;
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--ui5-avatar-initials-color: var(--sapContent_ImagePlaceholderForegroundColor);
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
--ui5-avatar-initials-border: none;
|
|
4
|
+
--ui5-avatar-accent1: var(--sapAccentColor1);
|
|
5
|
+
--ui5-avatar-accent2: var(--sapAccentColor2);
|
|
6
|
+
--ui5-avatar-accent3: var(--sapAccentColor3);
|
|
7
|
+
--ui5-avatar-accent4: var(--sapAccentColor4);
|
|
8
|
+
--ui5-avatar-accent5: var(--sapAccentColor5);
|
|
9
|
+
--ui5-avatar-accent6: var(--sapAccentColor6);
|
|
10
|
+
--ui5-avatar-accent7: var(--sapAccentColor7);
|
|
11
|
+
--ui5-avatar-accent8: var(--sapAccentColor8);
|
|
12
|
+
--ui5-avatar-accent9: var(--sapAccentColor9);
|
|
13
|
+
--ui5-avatar-accent10: var(--sapAccentColor10);
|
|
14
|
+
--ui5-avatar-placeholder: var(--sapContent_ImagePlaceholderBackground);
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
--ui5-avatar-accent1-color: var(--ui5-avatar-initials-color);
|
|
17
|
+
--ui5-avatar-accent2-color: var(--ui5-avatar-initials-color);
|
|
18
|
+
--ui5-avatar-accent3-color: var(--ui5-avatar-initials-color);
|
|
19
|
+
--ui5-avatar-accent4-color: var(--ui5-avatar-initials-color);
|
|
20
|
+
--ui5-avatar-accent5-color: var(--ui5-avatar-initials-color);
|
|
21
|
+
--ui5-avatar-accent6-color: var(--ui5-avatar-initials-color);
|
|
22
|
+
--ui5-avatar-accent7-color: var(--ui5-avatar-initials-color);
|
|
23
|
+
--ui5-avatar-accent8-color: var(--ui5-avatar-initials-color);
|
|
24
|
+
--ui5-avatar-accent9-color: var(--ui5-avatar-initials-color);
|
|
25
|
+
--ui5-avatar-accent10-color: var(--ui5-avatar-initials-color);
|
|
26
|
+
--ui5-avatar-placeholder-color: var(--ui5-avatar-initials-color);
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
--_ui5_avatar_outline: var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);
|
|
29
|
+
--_ui5_avatar_focus_offset: 1px;
|
|
30
30
|
--_ui5_avatar_focus_width: 1px;
|
|
31
31
|
--_ui5_avatar_focus_color: var(--sapContent_FocusColor);
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
33
|
+
--_ui5_avatar_fontsize_XS: 0.75rem;
|
|
34
|
+
--_ui5_avatar_fontsize_S: 1.125rem;
|
|
35
|
+
--_ui5_avatar_fontsize_M: 1.625rem;
|
|
36
|
+
--_ui5_avatar_fontsize_L: 2rem;
|
|
37
|
+
--_ui5_avatar_fontsize_XL: 2.75rem;
|
|
38
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
@import "../base/Avatar-parameters.css";
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
4
|
+
--ui5-avatar-initials-color: #fff;
|
|
5
|
+
--ui5-avatar-initials-border: .0625rem solid #fff;
|
|
6
|
+
--ui5-avatar-accent1: #000;
|
|
7
|
+
--ui5-avatar-accent2: #000;
|
|
8
|
+
--ui5-avatar-accent3: #000;
|
|
9
|
+
--ui5-avatar-accent4: #000;
|
|
10
|
+
--ui5-avatar-accent5: #000;
|
|
11
|
+
--ui5-avatar-accent6: #000;
|
|
12
|
+
--ui5-avatar-accent7: #000;
|
|
13
|
+
--ui5-avatar-accent8: #000;
|
|
14
|
+
--ui5-avatar-accent9: #000;
|
|
15
|
+
--ui5-avatar-accent10: #000;
|
|
16
|
+
--ui5-avatar-placeholder: #000;
|
|
17
|
+
--_ui5_avatar_outline: 0.125rem dotted var(--sapContent_FocusColor);
|
|
18
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
@import "../base/Avatar-parameters.css";
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
4
|
+
--ui5-avatar-initials-color: #000;
|
|
5
|
+
--ui5-avatar-initials-border: .0625rem solid #000;
|
|
6
|
+
--ui5-avatar-accent1: #fff;
|
|
7
|
+
--ui5-avatar-accent2: #fff;
|
|
8
|
+
--ui5-avatar-accent3: #fff;
|
|
9
|
+
--ui5-avatar-accent4: #fff;
|
|
10
|
+
--ui5-avatar-accent5: #fff;
|
|
11
|
+
--ui5-avatar-accent6: #fff;
|
|
12
|
+
--ui5-avatar-accent7: #fff;
|
|
13
|
+
--ui5-avatar-accent8: #fff;
|
|
14
|
+
--ui5-avatar-accent9: #fff;
|
|
15
|
+
--ui5-avatar-accent10: #fff;
|
|
16
|
+
--ui5-avatar-placeholder: #fff;
|
|
17
|
+
--_ui5_avatar_outline: 0.125rem dotted var(--sapContent_FocusColor);
|
|
18
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@import "../base/Avatar-parameters.css";
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
--_ui5_avatar_fontsize_XS: 1rem;
|
|
5
|
+
--_ui5_avatar_fontsize_S: 1.125rem;
|
|
6
|
+
--_ui5_avatar_fontsize_M: 1.5rem;
|
|
7
|
+
--_ui5_avatar_fontsize_L: 2.25rem;
|
|
8
|
+
--_ui5_avatar_fontsize_XL: 3rem;
|
|
9
9
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@import "../base/Avatar-parameters.css";
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
--_ui5_avatar_fontsize_XS: 1rem;
|
|
5
|
+
--_ui5_avatar_fontsize_S: 1.125rem;
|
|
6
|
+
--_ui5_avatar_fontsize_M: 1.5rem;
|
|
7
|
+
--_ui5_avatar_fontsize_L: 2.25rem;
|
|
8
|
+
--_ui5_avatar_fontsize_XL: 3rem;
|
|
9
9
|
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
@import "../base/Avatar-parameters.css";
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
--ui5-avatar-initials-color: var(--sapTextColor);
|
|
5
|
+
--ui5-avatar-initials-border: .0625rem solid var(--sapField_BorderColor);
|
|
6
|
+
--ui5-avatar-accent1: var(--sapBackgroundColor);
|
|
7
|
+
--ui5-avatar-accent2: var(--sapBackgroundColor);
|
|
8
|
+
--ui5-avatar-accent3: var(--sapBackgroundColor);
|
|
9
|
+
--ui5-avatar-accent4: var(--sapBackgroundColor);
|
|
10
|
+
--ui5-avatar-accent5: var(--sapBackgroundColor);
|
|
11
|
+
--ui5-avatar-accent6: var(--sapBackgroundColor);
|
|
12
|
+
--ui5-avatar-accent7: var(--sapBackgroundColor);
|
|
13
|
+
--ui5-avatar-accent8: var(--sapBackgroundColor);
|
|
14
|
+
--ui5-avatar-accent9: var(--sapBackgroundColor);
|
|
15
|
+
--ui5-avatar-accent10: var(--sapBackgroundColor);
|
|
16
|
+
--ui5-avatar-placeholder: var(--sapBackgroundColor);
|
|
17
|
+
--_ui5_avatar_outline: 0.125rem dotted var(--sapContent_FocusColor);
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
--_ui5_avatar_fontsize_XS: 1rem;
|
|
20
|
+
--_ui5_avatar_fontsize_S: 1.125rem;
|
|
21
|
+
--_ui5_avatar_fontsize_M: 1.5rem;
|
|
22
|
+
--_ui5_avatar_fontsize_L: 2.25rem;
|
|
23
|
+
--_ui5_avatar_fontsize_XL: 3rem;
|
|
24
24
|
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
@import "../base/Avatar-parameters.css";
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
--ui5-avatar-initials-color: var(--sapTextColor);
|
|
5
|
+
--ui5-avatar-initials-border: .0625rem solid var(--sapField_BorderColor);
|
|
6
|
+
--ui5-avatar-accent1: var(--sapBackgroundColor);
|
|
7
|
+
--ui5-avatar-accent2: var(--sapBackgroundColor);
|
|
8
|
+
--ui5-avatar-accent3: var(--sapBackgroundColor);
|
|
9
|
+
--ui5-avatar-accent4: var(--sapBackgroundColor);
|
|
10
|
+
--ui5-avatar-accent5: var(--sapBackgroundColor);
|
|
11
|
+
--ui5-avatar-accent6: var(--sapBackgroundColor);
|
|
12
|
+
--ui5-avatar-accent7: var(--sapBackgroundColor);
|
|
13
|
+
--ui5-avatar-accent8: var(--sapBackgroundColor);
|
|
14
|
+
--ui5-avatar-accent9: var(--sapBackgroundColor);
|
|
15
|
+
--ui5-avatar-accent10: var(--sapBackgroundColor);
|
|
16
|
+
--ui5-avatar-placeholder: var(--sapBackgroundColor);
|
|
17
|
+
--_ui5_avatar_outline: 0.125rem dotted var(--sapContent_FocusColor);
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
--_ui5_avatar_fontsize_XS: 1rem;
|
|
20
|
+
--_ui5_avatar_fontsize_S: 1.125rem;
|
|
21
|
+
--_ui5_avatar_fontsize_M: 1.5rem;
|
|
22
|
+
--_ui5_avatar_fontsize_L: 2.25rem;
|
|
23
|
+
--_ui5_avatar_fontsize_XL: 3rem;
|
|
24
24
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@import "../base/Avatar-parameters.css";
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--_ui5_avatar_fontsize_XS: 1rem;
|
|
5
|
+
--_ui5_avatar_fontsize_S: 1.125rem;
|
|
6
|
+
--_ui5_avatar_fontsize_M: 1.5rem;
|
|
7
|
+
--_ui5_avatar_fontsize_L: 2.25rem;
|
|
8
|
+
--_ui5_avatar_fontsize_XL: 3rem;
|
|
9
|
+
|
|
10
|
+
--ui5-avatar-accent1: #FFF3B8;
|
|
11
|
+
--ui5-avatar-accent2: #FFD0E7;
|
|
12
|
+
--ui5-avatar-accent3: #FFF0FA;
|
|
13
|
+
--ui5-avatar-accent4: #FFDCF3;
|
|
14
|
+
--ui5-avatar-accent5: #DED3FF;
|
|
15
|
+
--ui5-avatar-accent6: #D1EFFF;
|
|
16
|
+
--ui5-avatar-accent7: #C2FCEE;
|
|
17
|
+
--ui5-avatar-accent8: #EBF5CB;
|
|
18
|
+
--ui5-avatar-accent9: #DAFDF5;
|
|
19
|
+
--ui5-avatar-accent10: #EAECEE;
|
|
20
|
+
--ui5-avatar-placeholder: #EAECEE;
|
|
21
|
+
|
|
22
|
+
--ui5-avatar-accent1-color: #c26e00;
|
|
23
|
+
--ui5-avatar-accent2-color: #aa0808;
|
|
24
|
+
--ui5-avatar-accent3-color: #9d00a9;
|
|
25
|
+
--ui5-avatar-accent4-color: #a100c2;
|
|
26
|
+
--ui5-avatar-accent5-color: #552cff;
|
|
27
|
+
--ui5-avatar-accent6-color: #0057d2;
|
|
28
|
+
--ui5-avatar-accent7-color: #046c7a;
|
|
29
|
+
--ui5-avatar-accent8-color: #256f3a;
|
|
30
|
+
--ui5-avatar-accent9-color: #077a85;
|
|
31
|
+
--ui5-avatar-accent10-color: #556b82;
|
|
32
|
+
--ui5-avatar-placeholder-color: var(--sapTile_IconColor);
|
|
33
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
@import "../base/BusyIndicator-parameters.css";
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--_ui5_busy_indicator_color: var(--sapBrandColor);
|
|
5
|
+
--_ui5_busy_indicator_focus_border_radius: 0.75rem;
|
|
6
|
+
--_ui5_busy_indicator_focus_outline: var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);
|
|
7
|
+
}
|