@vaadin/date-picker 24.8.0-alpha8 → 25.0.0-alpha1
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/README.md +0 -23
- package/package.json +12 -14
- package/src/vaadin-date-picker-mixin.js +1 -14
- package/src/vaadin-date-picker-overlay-content-mixin.js +4 -6
- package/src/vaadin-date-picker-overlay-content.js +22 -21
- package/src/vaadin-date-picker-overlay.js +11 -9
- package/src/vaadin-date-picker-year.js +15 -10
- package/src/vaadin-date-picker.d.ts +0 -3
- package/src/vaadin-date-picker.js +53 -41
- package/src/vaadin-infinite-scroller.js +0 -13
- package/src/vaadin-month-calendar.js +67 -46
- package/web-types.json +2 -369
- package/web-types.lit.json +2 -156
- package/src/vaadin-date-picker-light.d.ts +0 -112
- package/src/vaadin-date-picker-light.js +0 -133
- package/src/vaadin-lit-date-picker-overlay-content.js +0 -70
- package/src/vaadin-lit-date-picker-overlay.js +0 -46
- package/src/vaadin-lit-date-picker-year.js +0 -41
- package/src/vaadin-lit-date-picker.js +0 -172
- package/src/vaadin-lit-month-calendar.js +0 -98
- package/theme/lumo/vaadin-date-picker-light.d.ts +0 -4
- package/theme/lumo/vaadin-date-picker-light.js +0 -4
- package/theme/lumo/vaadin-lit-date-picker.d.ts +0 -5
- package/theme/lumo/vaadin-lit-date-picker.js +0 -5
- package/theme/material/vaadin-date-picker-light.d.ts +0 -4
- package/theme/material/vaadin-date-picker-light.js +0 -4
- package/theme/material/vaadin-date-picker-overlay-content-styles.d.ts +0 -6
- package/theme/material/vaadin-date-picker-overlay-content-styles.js +0 -132
- package/theme/material/vaadin-date-picker-overlay-styles.d.ts +0 -1
- package/theme/material/vaadin-date-picker-overlay-styles.js +0 -47
- package/theme/material/vaadin-date-picker-styles.d.ts +0 -3
- package/theme/material/vaadin-date-picker-styles.js +0 -22
- package/theme/material/vaadin-date-picker-year-styles.d.ts +0 -1
- package/theme/material/vaadin-date-picker-year-styles.js +0 -28
- package/theme/material/vaadin-date-picker.d.ts +0 -5
- package/theme/material/vaadin-date-picker.js +0 -5
- package/theme/material/vaadin-lit-date-picker.d.ts +0 -5
- package/theme/material/vaadin-lit-date-picker.js +0 -5
- package/theme/material/vaadin-month-calendar-styles.d.ts +0 -2
- package/theme/material/vaadin-month-calendar-styles.js +0 -120
- package/vaadin-date-picker-light.d.ts +0 -1
- package/vaadin-date-picker-light.js +0 -2
- package/vaadin-lit-date-picker.d.ts +0 -1
- package/vaadin-lit-date-picker.js +0 -2
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2016 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import '@vaadin/input-container/src/vaadin-lit-input-container.js';
|
|
7
|
-
import './vaadin-lit-date-picker-overlay.js';
|
|
8
|
-
import './vaadin-lit-date-picker-overlay-content.js';
|
|
9
|
-
import { html, LitElement } from 'lit';
|
|
10
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
11
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
12
|
-
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
13
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
14
|
-
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
|
|
15
|
-
import { InputControlMixin } from '@vaadin/field-base/src/input-control-mixin.js';
|
|
16
|
-
import { InputController } from '@vaadin/field-base/src/input-controller.js';
|
|
17
|
-
import { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';
|
|
18
|
-
import { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';
|
|
19
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
20
|
-
import { DatePickerMixin } from './vaadin-date-picker-mixin.js';
|
|
21
|
-
import { datePickerStyles } from './vaadin-date-picker-styles.js';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* LitElement based version of `<vaadin-date-picker>` web component.
|
|
25
|
-
*
|
|
26
|
-
* ## Disclaimer
|
|
27
|
-
*
|
|
28
|
-
* This component is an experiment and not yet a part of Vaadin platform.
|
|
29
|
-
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
30
|
-
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
31
|
-
*/
|
|
32
|
-
class DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement))))) {
|
|
33
|
-
static get is() {
|
|
34
|
-
return 'vaadin-date-picker';
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
static get styles() {
|
|
38
|
-
return [inputFieldShared, datePickerStyles];
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
static get properties() {
|
|
42
|
-
return {
|
|
43
|
-
/** @private */
|
|
44
|
-
_positionTarget: {
|
|
45
|
-
type: Object,
|
|
46
|
-
sync: true,
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Used by `InputControlMixin` as a reference to the clear button element.
|
|
53
|
-
* @protected
|
|
54
|
-
* @return {!HTMLElement}
|
|
55
|
-
*/
|
|
56
|
-
get clearElement() {
|
|
57
|
-
return this.$.clearButton;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/** @protected */
|
|
61
|
-
render() {
|
|
62
|
-
return html`
|
|
63
|
-
<div class="vaadin-date-picker-container">
|
|
64
|
-
<div part="label">
|
|
65
|
-
<slot name="label"></slot>
|
|
66
|
-
<span part="required-indicator" aria-hidden="true" @click="${this.focus}"></span>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<vaadin-input-container
|
|
70
|
-
part="input-field"
|
|
71
|
-
.readonly="${this.readonly}"
|
|
72
|
-
.disabled="${this.disabled}"
|
|
73
|
-
.invalid="${this.invalid}"
|
|
74
|
-
theme="${ifDefined(this._theme)}"
|
|
75
|
-
>
|
|
76
|
-
<slot name="prefix" slot="prefix"></slot>
|
|
77
|
-
<slot name="input"></slot>
|
|
78
|
-
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
79
|
-
<div part="toggle-button" slot="suffix" aria-hidden="true" @click="${this._toggle}"></div>
|
|
80
|
-
</vaadin-input-container>
|
|
81
|
-
|
|
82
|
-
<div part="helper-text">
|
|
83
|
-
<slot name="helper"></slot>
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
<div part="error-message">
|
|
87
|
-
<slot name="error-message"></slot>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
<vaadin-date-picker-overlay
|
|
92
|
-
id="overlay"
|
|
93
|
-
?fullscreen="${this._fullscreen}"
|
|
94
|
-
theme="${ifDefined(this._theme)}"
|
|
95
|
-
.opened="${this.opened}"
|
|
96
|
-
@opened-changed="${this._onOpenedChanged}"
|
|
97
|
-
@vaadin-overlay-escape-press="${this._onOverlayEscapePress}"
|
|
98
|
-
@vaadin-overlay-open="${this._onOverlayOpened}"
|
|
99
|
-
@vaadin-overlay-close="${this._onVaadinOverlayClose}"
|
|
100
|
-
@vaadin-overlay-closing="${this._onOverlayClosed}"
|
|
101
|
-
restore-focus-on-close
|
|
102
|
-
no-vertical-overlap
|
|
103
|
-
.restoreFocusNode="${this.inputElement}"
|
|
104
|
-
.positionTarget="${this._positionTarget}"
|
|
105
|
-
></vaadin-date-picker-overlay>
|
|
106
|
-
|
|
107
|
-
<slot name="tooltip"></slot>
|
|
108
|
-
`;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/** @protected */
|
|
112
|
-
ready() {
|
|
113
|
-
super.ready();
|
|
114
|
-
|
|
115
|
-
this.addController(
|
|
116
|
-
new InputController(
|
|
117
|
-
this,
|
|
118
|
-
(input) => {
|
|
119
|
-
this._setInputElement(input);
|
|
120
|
-
this._setFocusElement(input);
|
|
121
|
-
this.stateTarget = input;
|
|
122
|
-
this.ariaTarget = input;
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
// The "search" word is a trick to prevent Safari from enabling AutoFill,
|
|
126
|
-
// which is causing click issues:
|
|
127
|
-
// https://github.com/vaadin/web-components/issues/6817#issuecomment-2268229567
|
|
128
|
-
uniqueIdPrefix: 'search-input',
|
|
129
|
-
},
|
|
130
|
-
),
|
|
131
|
-
);
|
|
132
|
-
this.addController(new LabelledInputController(this.inputElement, this._labelController));
|
|
133
|
-
|
|
134
|
-
this._tooltipController = new TooltipController(this);
|
|
135
|
-
this.addController(this._tooltipController);
|
|
136
|
-
this._tooltipController.setPosition('top');
|
|
137
|
-
this._tooltipController.setAriaTarget(this.inputElement);
|
|
138
|
-
this._tooltipController.setShouldShow((target) => !target.opened);
|
|
139
|
-
|
|
140
|
-
this._positionTarget = this.shadowRoot.querySelector('[part="input-field"]');
|
|
141
|
-
|
|
142
|
-
const toggleButton = this.shadowRoot.querySelector('[part="toggle-button"]');
|
|
143
|
-
toggleButton.addEventListener('mousedown', (e) => e.preventDefault());
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/** @private */
|
|
147
|
-
_onOpenedChanged(event) {
|
|
148
|
-
this.opened = event.detail.value;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/** @private */
|
|
152
|
-
_onVaadinOverlayClose(e) {
|
|
153
|
-
// Prevent closing the overlay on label element click
|
|
154
|
-
if (e.detail.sourceEvent && e.detail.sourceEvent.composedPath().includes(this)) {
|
|
155
|
-
e.preventDefault();
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/** @private */
|
|
160
|
-
_toggle(e) {
|
|
161
|
-
e.stopPropagation();
|
|
162
|
-
if (this.$.overlay.opened) {
|
|
163
|
-
this.close();
|
|
164
|
-
} else {
|
|
165
|
-
this.open();
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
defineCustomElement(DatePicker);
|
|
171
|
-
|
|
172
|
-
export { DatePicker };
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2016 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { html, LitElement } from 'lit';
|
|
7
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
9
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
10
|
-
import { MonthCalendarMixin } from './vaadin-month-calendar-mixin.js';
|
|
11
|
-
import { monthCalendarStyles } from './vaadin-month-calendar-styles.js';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @extends HTMLElement
|
|
15
|
-
* @private
|
|
16
|
-
*/
|
|
17
|
-
class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolylitMixin(LitElement))) {
|
|
18
|
-
static get is() {
|
|
19
|
-
return 'vaadin-month-calendar';
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
static get styles() {
|
|
23
|
-
return monthCalendarStyles;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/** @protected */
|
|
27
|
-
render() {
|
|
28
|
-
const weekDayNames = this.__computeWeekDayNames(this.i18n, this.showWeekNumbers);
|
|
29
|
-
const weeks = this._weeks;
|
|
30
|
-
const hideWeekSeparator = !this.__computeShowWeekSeparator(this.showWeekNumbers, this.i18n);
|
|
31
|
-
|
|
32
|
-
return html`
|
|
33
|
-
<div part="month-header" id="month-header" aria-hidden="true">${this._getTitle(this.month, this.i18n)}</div>
|
|
34
|
-
<table
|
|
35
|
-
id="monthGrid"
|
|
36
|
-
role="grid"
|
|
37
|
-
aria-labelledby="month-header"
|
|
38
|
-
@touchend="${this._preventDefault}"
|
|
39
|
-
@touchstart="${this._onMonthGridTouchStart}"
|
|
40
|
-
>
|
|
41
|
-
<thead id="weekdays-container">
|
|
42
|
-
<tr role="row" part="weekdays">
|
|
43
|
-
<th part="weekday" aria-hidden="true" ?hidden="${hideWeekSeparator}"></th>
|
|
44
|
-
${weekDayNames.map(
|
|
45
|
-
(item) => html`
|
|
46
|
-
<th role="columnheader" part="weekday" scope="col" abbr="${item.weekDay}" aria-hidden="true">
|
|
47
|
-
${item.weekDayShort}
|
|
48
|
-
</th>
|
|
49
|
-
`,
|
|
50
|
-
)}
|
|
51
|
-
</tr>
|
|
52
|
-
</thead>
|
|
53
|
-
<tbody id="days-container">
|
|
54
|
-
${weeks.map(
|
|
55
|
-
(week) => html`
|
|
56
|
-
<tr role="row">
|
|
57
|
-
<td part="week-number" aria-hidden="true" ?hidden="${hideWeekSeparator}">
|
|
58
|
-
${this.__computeWeekNumber(week)}
|
|
59
|
-
</td>
|
|
60
|
-
${week.map((date) => {
|
|
61
|
-
return html`
|
|
62
|
-
<td
|
|
63
|
-
role="gridcell"
|
|
64
|
-
part="${this.__computeDatePart(
|
|
65
|
-
date,
|
|
66
|
-
this.focusedDate,
|
|
67
|
-
this.selectedDate,
|
|
68
|
-
this.minDate,
|
|
69
|
-
this.maxDate,
|
|
70
|
-
this.isDateDisabled,
|
|
71
|
-
this.enteredDate,
|
|
72
|
-
this.__hasFocus,
|
|
73
|
-
)}"
|
|
74
|
-
.date="${date}"
|
|
75
|
-
?disabled="${this.__isDayDisabled(date, this.minDate, this.maxDate, this.isDateDisabled)}"
|
|
76
|
-
tabindex="${this.__computeDayTabIndex(date, this.focusedDate)}"
|
|
77
|
-
aria-selected="${this.__computeDayAriaSelected(date, this.selectedDate)}"
|
|
78
|
-
aria-disabled="${this.__computeDayAriaDisabled(
|
|
79
|
-
date,
|
|
80
|
-
this.minDate,
|
|
81
|
-
this.maxDate,
|
|
82
|
-
this.isDateDisabled,
|
|
83
|
-
)}"
|
|
84
|
-
aria-label="${this.__computeDayAriaLabel(date)}"
|
|
85
|
-
>${this._getDate(date)}</td
|
|
86
|
-
>
|
|
87
|
-
`;
|
|
88
|
-
})}
|
|
89
|
-
</tr>
|
|
90
|
-
`,
|
|
91
|
-
)}
|
|
92
|
-
</tbody>
|
|
93
|
-
</table>
|
|
94
|
-
`;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
defineCustomElement(MonthCalendar);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-material-styles/color.js';
|
|
2
|
-
import '@vaadin/vaadin-material-styles/font-icons.js';
|
|
3
|
-
import '@vaadin/vaadin-material-styles/typography.js';
|
|
4
|
-
import '@vaadin/vaadin-material-styles/shadow.js';
|
|
5
|
-
import '@vaadin/button/theme/material/vaadin-button-styles.js';
|
|
6
|
-
import './vaadin-date-picker-year-styles.js';
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-material-styles/color.js';
|
|
2
|
-
import '@vaadin/vaadin-material-styles/font-icons.js';
|
|
3
|
-
import '@vaadin/vaadin-material-styles/typography.js';
|
|
4
|
-
import '@vaadin/vaadin-material-styles/shadow.js';
|
|
5
|
-
import '@vaadin/button/theme/material/vaadin-button-styles.js';
|
|
6
|
-
import './vaadin-date-picker-year-styles.js';
|
|
7
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
8
|
-
|
|
9
|
-
registerStyles(
|
|
10
|
-
'vaadin-date-picker-overlay-content',
|
|
11
|
-
css`
|
|
12
|
-
:host {
|
|
13
|
-
background: var(--material-background-color);
|
|
14
|
-
font-family: var(--material-font-family);
|
|
15
|
-
font-size: var(--material-body-font-size);
|
|
16
|
-
-webkit-text-size-adjust: 100%;
|
|
17
|
-
line-height: 1.4;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
:host([fullscreen]) {
|
|
21
|
-
position: absolute;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
[part='overlay-header'] {
|
|
25
|
-
display: flex;
|
|
26
|
-
align-items: baseline;
|
|
27
|
-
position: relative;
|
|
28
|
-
color: var(--material-body-text-color);
|
|
29
|
-
background: var(--material-secondary-background-color);
|
|
30
|
-
border-bottom: 2px solid var(--material-primary-color);
|
|
31
|
-
padding: 8px;
|
|
32
|
-
box-shadow: var(--material-shadow-elevation-4dp);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
[part='label'] {
|
|
36
|
-
padding: 0 8px;
|
|
37
|
-
flex: auto;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
[part='clear-button'],
|
|
41
|
-
[part='toggle-button'] {
|
|
42
|
-
font-family: 'material-icons';
|
|
43
|
-
font-size: var(--material-icon-font-size);
|
|
44
|
-
line-height: 24px;
|
|
45
|
-
width: 24px;
|
|
46
|
-
height: 24px;
|
|
47
|
-
text-align: center;
|
|
48
|
-
padding: 8px;
|
|
49
|
-
color: var(--material-secondary-text-color);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
[part='clear-button']:hover,
|
|
53
|
-
[part='toggle-button']:hover,
|
|
54
|
-
[part='years-toggle-button']:hover {
|
|
55
|
-
color: inherit;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
[part='clear-button']::before {
|
|
59
|
-
content: var(--material-icons-clear);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
[part='toggle-button']::before {
|
|
63
|
-
content: var(--material-icons-calendar);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
[part='years-toggle-button'] {
|
|
67
|
-
padding: 4px 8px;
|
|
68
|
-
font-size: var(--material-body-font-size);
|
|
69
|
-
font-weight: 500;
|
|
70
|
-
line-height: 24px;
|
|
71
|
-
letter-spacing: 0.05em;
|
|
72
|
-
color: var(--material-secondary-text-color);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
[part='years-toggle-button']::after {
|
|
76
|
-
content: var(--material-icons-play);
|
|
77
|
-
display: inline-block;
|
|
78
|
-
width: 24px;
|
|
79
|
-
font-family: 'material-icons';
|
|
80
|
-
font-size: var(--material-icon-font-size);
|
|
81
|
-
line-height: 24px;
|
|
82
|
-
text-align: center;
|
|
83
|
-
transition: transform 100ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
:host([years-visible]) [part='years-toggle-button']::after {
|
|
87
|
-
transform: rotate(90deg);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
::slotted([slot='months']) {
|
|
91
|
-
--vaadin-infinite-scroller-item-height: 328px;
|
|
92
|
-
text-align: center;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
::slotted([slot='years']) {
|
|
96
|
-
background: var(--material-secondary-text-color);
|
|
97
|
-
color: var(--material-background-color);
|
|
98
|
-
font-size: var(--material-body-font-size);
|
|
99
|
-
font-weight: 400;
|
|
100
|
-
line-height: 1.4;
|
|
101
|
-
text-align: center;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
::slotted([slot='years'])::before {
|
|
105
|
-
border: 0;
|
|
106
|
-
width: 8px;
|
|
107
|
-
height: 8px;
|
|
108
|
-
transform: translateX(-50%) rotate(-45deg);
|
|
109
|
-
background: var(--material-background-color);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
[part='toolbar'] {
|
|
113
|
-
display: flex;
|
|
114
|
-
justify-content: flex-end;
|
|
115
|
-
padding: 8px 4px;
|
|
116
|
-
border-top: 1px solid var(--material-divider-color);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
::slotted([slot='cancel-button']) {
|
|
120
|
-
order: 1;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
::slotted([slot='today-button']) {
|
|
124
|
-
order: 2;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
::slotted(vaadin-button) {
|
|
128
|
-
margin: 0 4px;
|
|
129
|
-
}
|
|
130
|
-
`,
|
|
131
|
-
{ moduleId: 'material-date-picker-overlay-content' },
|
|
132
|
-
);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { overlay } from '@vaadin/vaadin-material-styles/mixins/overlay.js';
|
|
2
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
3
|
-
|
|
4
|
-
const datePickerOverlay = css`
|
|
5
|
-
:host([fullscreen]) {
|
|
6
|
-
/* stylelint-disable declaration-block-no-redundant-longhand-properties */
|
|
7
|
-
top: 0 !important;
|
|
8
|
-
right: 0 !important;
|
|
9
|
-
bottom: var(--vaadin-overlay-viewport-bottom) !important;
|
|
10
|
-
left: 0 !important;
|
|
11
|
-
/* stylelint-enable declaration-block-no-redundant-longhand-properties */
|
|
12
|
-
align-items: stretch;
|
|
13
|
-
justify-content: stretch;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
[part='overlay'] {
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
-webkit-overflow-scrolling: auto;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
:host(:not([fullscreen])) [part='overlay'] {
|
|
22
|
-
width: 360px;
|
|
23
|
-
max-height: 500px;
|
|
24
|
-
border-radius: 0 4px 4px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
:host(:not([dir='rtl']):not([fullscreen])[end-aligned]) [part='overlay'],
|
|
28
|
-
:host([dir='rtl']:not([fullscreen])[start-aligned]) [part='overlay'] {
|
|
29
|
-
border-radius: 4px 0 4px 4px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
:host(:not([fullscreen])[bottom-aligned]) [part='overlay'] {
|
|
33
|
-
border-radius: 4px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:host(:not([fullscreen])[show-week-numbers]) [part='overlay'] {
|
|
37
|
-
width: 396px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
[part='content'] {
|
|
41
|
-
padding: 0;
|
|
42
|
-
}
|
|
43
|
-
`;
|
|
44
|
-
|
|
45
|
-
registerStyles('vaadin-date-picker-overlay', [overlay, datePickerOverlay], {
|
|
46
|
-
moduleId: 'material-date-picker-overlay',
|
|
47
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import '@vaadin/input-container/theme/material/vaadin-input-container-styles.js';
|
|
2
|
-
import '@vaadin/vaadin-material-styles/color.js';
|
|
3
|
-
import '@vaadin/vaadin-material-styles/font-icons.js';
|
|
4
|
-
import { inputFieldShared } from '@vaadin/vaadin-material-styles/mixins/input-field-shared.js';
|
|
5
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
6
|
-
|
|
7
|
-
const datePicker = css`
|
|
8
|
-
:host {
|
|
9
|
-
display: inline-flex;
|
|
10
|
-
-webkit-tap-highlight-color: transparent;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
[part='clear-button']::before {
|
|
14
|
-
content: var(--material-icons-clear);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
[part='toggle-button']::before {
|
|
18
|
-
content: var(--material-icons-calendar);
|
|
19
|
-
}
|
|
20
|
-
`;
|
|
21
|
-
|
|
22
|
-
registerStyles('vaadin-date-picker', [inputFieldShared, datePicker], { moduleId: 'material-date-picker' });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-material-styles/typography.js';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-material-styles/typography.js';
|
|
2
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
3
|
-
|
|
4
|
-
registerStyles(
|
|
5
|
-
'vaadin-date-picker-year',
|
|
6
|
-
css`
|
|
7
|
-
[part='year-number'] {
|
|
8
|
-
font-size: var(--material-small-font-size);
|
|
9
|
-
line-height: 10px; /* NOTE(platosha): chosen to align years to months */
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
[part='year-separator'] {
|
|
13
|
-
display: flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
height: calc(100% - 10px);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
[part='year-separator']::before {
|
|
20
|
-
content: '';
|
|
21
|
-
background-color: currentColor;
|
|
22
|
-
width: 4px;
|
|
23
|
-
height: 4px;
|
|
24
|
-
border-radius: 50%;
|
|
25
|
-
}
|
|
26
|
-
`,
|
|
27
|
-
{ moduleId: 'material-date-picker-year' },
|
|
28
|
-
);
|