From 4be9d56e1c0b829670db3dae564c4707a6b0bdb7 Mon Sep 17 00:00:00 2001 From: ilhan Date: Thu, 18 Jul 2019 17:36:00 +0300 Subject: [PATCH 1/2] refactor(ui5-calendar): clean up styles --- packages/main/src/Calendar.hbs | 2 +- packages/main/src/Calendar.js | 32 +++++++++--------- packages/main/src/CalendarHeader.hbs | 2 +- packages/main/src/CalendarHeader.js | 10 +++--- packages/main/src/themes/Calendar.css | 18 +++++------ packages/main/src/themes/CalendarHeader.css | 36 ++++++++++----------- 6 files changed, 50 insertions(+), 50 deletions(-) diff --git a/packages/main/src/Calendar.hbs b/packages/main/src/Calendar.hbs index 3bfa10ccc136..bb74ae3a3568 100644 --- a/packages/main/src/Calendar.hbs +++ b/packages/main/src/Calendar.hbs @@ -11,7 +11,7 @@ @ui5-btn2Press="{{_header.onBtn2Press}}" > -
+
ui5-calendar can be used standale to display the years, months, weeks and days, + * but the main purpose of the ui5-calendar is to be used within a ui5-datepicker. * * @constructor * @author SAP SE @@ -434,7 +435,7 @@ class Calendar extends UI5Element { this._monthPicker._hidden = false; this._oMonth._hidden = true; - const calendarRect = this.shadowRoot.querySelector(".sapUiCal").getBoundingClientRect(); + const calendarRect = this.shadowRoot.querySelector(".ui5-cal-root").getBoundingClientRect(); this._calendarWidth = calendarRect.width.toString(); this._calendarHeight = calendarRect.height.toString(); @@ -449,7 +450,7 @@ class Calendar extends UI5Element { this._yearPicker._hidden = false; this._oMonth._hidden = true; - const calendarRect = this.shadowRoot.querySelector(".sapUiCal").getBoundingClientRect(); + const calendarRect = this.shadowRoot.querySelector(".ui5-cal-root").getBoundingClientRect(); this._calendarWidth = calendarRect.width.toString(); this._calendarHeight = calendarRect.height.toString(); @@ -484,17 +485,16 @@ class Calendar extends UI5Element { get classes() { return { main: { - sapUiCal: true, - sapUiCalIslamic: this.primaryCalendarType === CalendarType.Islamic, + "ui5-cal-root": true, }, dayPicker: { - "sapWCDayPickerHidden": !this._yearPicker._hidden || !this._monthPicker._hidden, + ".ui5-daypicker--hidden": !this._yearPicker._hidden || !this._monthPicker._hidden, }, yearPicker: { - "sapWCYearPickerHidden": this._yearPicker._hidden, + "ui5-yearpicker--hidden": this._yearPicker._hidden, }, monthPicker: { - "sapWCMonthPickerHidden": this._monthPicker._hidden, + "ui5-monthpicker--hidden": this._monthPicker._hidden, }, }; } diff --git a/packages/main/src/CalendarHeader.hbs b/packages/main/src/CalendarHeader.hbs index 27191f2ddb16..447150b5e0e9 100644 --- a/packages/main/src/CalendarHeader.hbs +++ b/packages/main/src/CalendarHeader.hbs @@ -9,7 +9,7 @@ data-sap-cal-head-button="Prev"> -
+
Date: Tue, 23 Jul 2019 13:06:49 +0300 Subject: [PATCH 2/2] add pointer-events:none to ui5-icon --- packages/main/src/themes/CalendarHeader.css | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/main/src/themes/CalendarHeader.css b/packages/main/src/themes/CalendarHeader.css index 81a7f1410df6..b6bef2fc8eb4 100644 --- a/packages/main/src/themes/CalendarHeader.css +++ b/packages/main/src/themes/CalendarHeader.css @@ -50,6 +50,7 @@ .ui5-calheader-arrowicon { color: currentColor; + pointer-events: none; } .ui5-calheader-midcontainer {