@francofantomius/material-components 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/README.md +41 -9
- package/custom-elements.json +19060 -9017
- package/dist/chunks/account-menu-Dau0UHTl.js +1290 -0
- package/dist/chunks/account-menu-Dau0UHTl.js.map +1 -0
- package/dist/chunks/app-drawer-Du1ePzxZ.js +903 -0
- package/dist/chunks/app-drawer-Du1ePzxZ.js.map +1 -0
- package/dist/chunks/bottom-sheet-q79BBYAj.js +402 -0
- package/dist/chunks/bottom-sheet-q79BBYAj.js.map +1 -0
- package/dist/chunks/{button-B4TSZ7Sl.js → button-D2vn7kJ8.js} +9 -8
- package/dist/chunks/button-D2vn7kJ8.js.map +1 -0
- package/dist/chunks/button-group-CNqvJx1n.js +143 -0
- package/dist/chunks/button-group-CNqvJx1n.js.map +1 -0
- package/dist/chunks/carousel-item-BG6kjjjk.js +371 -0
- package/dist/chunks/carousel-item-BG6kjjjk.js.map +1 -0
- package/dist/chunks/date-picker-DJeHi4w-.js +777 -0
- package/dist/chunks/date-picker-DJeHi4w-.js.map +1 -0
- package/dist/chunks/fab-menu.css-3pu930sZ.js +320 -0
- package/dist/chunks/fab-menu.css-3pu930sZ.js.map +1 -0
- package/dist/chunks/{icon-button-BdSc7eot.js → icon-button-BQz73GLa.js} +2 -2
- package/dist/chunks/icon-button-BQz73GLa.js.map +1 -0
- package/dist/chunks/loading-indicator-CvWnZr9o.js +193 -0
- package/dist/chunks/loading-indicator-CvWnZr9o.js.map +1 -0
- package/dist/chunks/menu-item-BBSp5Cqc.js +390 -0
- package/dist/chunks/menu-item-BBSp5Cqc.js.map +1 -0
- package/dist/chunks/navigation-bar-item-C9DfOEzg.js +397 -0
- package/dist/chunks/navigation-bar-item-C9DfOEzg.js.map +1 -0
- package/dist/chunks/navigation-rail-item-6pdhNHJK.js +357 -0
- package/dist/chunks/navigation-rail-item-6pdhNHJK.js.map +1 -0
- package/dist/chunks/segmented-button-B0BvGSQ7.js +265 -0
- package/dist/chunks/segmented-button-B0BvGSQ7.js.map +1 -0
- package/dist/chunks/side-sheet-S2w081AK.js +360 -0
- package/dist/chunks/side-sheet-S2w081AK.js.map +1 -0
- package/dist/chunks/slider-D-mnO8yQ.js +450 -0
- package/dist/chunks/slider-D-mnO8yQ.js.map +1 -0
- package/dist/chunks/split-button-DUfjukQY.js +450 -0
- package/dist/chunks/split-button-DUfjukQY.js.map +1 -0
- package/dist/chunks/{table-aRTYzDyE.js → table-CqHnneAj.js} +2 -2
- package/dist/chunks/{table-aRTYzDyE.js.map → table-CqHnneAj.js.map} +1 -1
- package/dist/chunks/time-picker-CZnb2sWz.js +785 -0
- package/dist/chunks/time-picker-CZnb2sWz.js.map +1 -0
- package/dist/chunks/toolbar-DXVQbQKJ.js +271 -0
- package/dist/chunks/toolbar-DXVQbQKJ.js.map +1 -0
- package/dist/chunks/tooltip-CE7JMHMu.js +398 -0
- package/dist/chunks/tooltip-CE7JMHMu.js.map +1 -0
- package/dist/components/account-menu/account-menu.js +8 -0
- package/dist/components/app-drawer/app-drawer.js +9 -0
- package/dist/components/bottom-sheet/bottom-sheet.css.d.ts +2 -0
- package/dist/components/bottom-sheet/bottom-sheet.css.d.ts.map +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +69 -0
- package/dist/components/bottom-sheet/bottom-sheet.d.ts.map +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.js +4 -0
- package/dist/components/button/button.css.d.ts.map +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/button-group/button-group.css.d.ts +2 -0
- package/dist/components/button-group/button-group.css.d.ts.map +1 -0
- package/dist/components/button-group/button-group.d.ts +28 -0
- package/dist/components/button-group/button-group.d.ts.map +1 -0
- package/dist/components/button-group/button-group.js +4 -0
- package/dist/components/carousel/carousel-item.d.ts +33 -0
- package/dist/components/carousel/carousel-item.d.ts.map +1 -0
- package/dist/components/carousel/carousel-item.js +4 -0
- package/dist/components/carousel/carousel.css.d.ts +3 -0
- package/dist/components/carousel/carousel.css.d.ts.map +1 -0
- package/dist/components/carousel/carousel.d.ts +81 -0
- package/dist/components/carousel/carousel.d.ts.map +1 -0
- package/dist/components/carousel/carousel.js +284 -0
- package/dist/components/carousel/carousel.js.map +1 -0
- package/dist/components/date-picker/date-picker.css.d.ts +2 -0
- package/dist/components/date-picker/date-picker.css.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.d.ts +59 -0
- package/dist/components/date-picker/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.js +4 -0
- package/dist/components/fab-menu/fab-menu-item.d.ts +35 -0
- package/dist/components/fab-menu/fab-menu-item.d.ts.map +1 -0
- package/dist/components/fab-menu/fab-menu-item.js +93 -0
- package/dist/components/fab-menu/fab-menu-item.js.map +1 -0
- package/dist/components/fab-menu/fab-menu.css.d.ts +3 -0
- package/dist/components/fab-menu/fab-menu.css.d.ts.map +1 -0
- package/dist/components/fab-menu/fab-menu.d.ts +72 -0
- package/dist/components/fab-menu/fab-menu.d.ts.map +1 -0
- package/dist/components/fab-menu/fab-menu.js +148 -0
- package/dist/components/fab-menu/fab-menu.js.map +1 -0
- package/dist/components/icon-button/icon-button.js +1 -1
- package/dist/components/loading-indicator/loading-indicator.css.d.ts +2 -0
- package/dist/components/loading-indicator/loading-indicator.css.d.ts.map +1 -0
- package/dist/components/loading-indicator/loading-indicator.d.ts +48 -0
- package/dist/components/loading-indicator/loading-indicator.d.ts.map +1 -0
- package/dist/components/loading-indicator/loading-indicator.js +4 -0
- package/dist/components/menu/menu-item.d.ts +41 -0
- package/dist/components/menu/menu-item.d.ts.map +1 -0
- package/dist/components/menu/menu-item.js +4 -0
- package/dist/components/menu/menu.css.d.ts +3 -0
- package/dist/components/menu/menu.css.d.ts.map +1 -0
- package/dist/components/menu/menu.d.ts +91 -0
- package/dist/components/menu/menu.d.ts.map +1 -0
- package/dist/components/menu/menu.js +205 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/navigation-bar/navigation-bar-item.d.ts +49 -0
- package/dist/components/navigation-bar/navigation-bar-item.d.ts.map +1 -0
- package/dist/components/navigation-bar/navigation-bar-item.js +5 -0
- package/dist/components/navigation-bar/navigation-bar.css.d.ts +3 -0
- package/dist/components/navigation-bar/navigation-bar.css.d.ts.map +1 -0
- package/dist/components/navigation-bar/navigation-bar.d.ts +50 -0
- package/dist/components/navigation-bar/navigation-bar.d.ts.map +1 -0
- package/dist/components/navigation-bar/navigation-bar.js +150 -0
- package/dist/components/navigation-bar/navigation-bar.js.map +1 -0
- package/dist/components/navigation-rail/navigation-rail-item.d.ts +36 -0
- package/dist/components/navigation-rail/navigation-rail-item.d.ts.map +1 -0
- package/dist/components/navigation-rail/navigation-rail-item.js +5 -0
- package/dist/components/navigation-rail/navigation-rail.css.d.ts +3 -0
- package/dist/components/navigation-rail/navigation-rail.css.d.ts.map +1 -0
- package/dist/components/navigation-rail/navigation-rail.d.ts +43 -0
- package/dist/components/navigation-rail/navigation-rail.d.ts.map +1 -0
- package/dist/components/navigation-rail/navigation-rail.js +121 -0
- package/dist/components/navigation-rail/navigation-rail.js.map +1 -0
- package/dist/components/segmented-button/segmented-button.css.d.ts +3 -0
- package/dist/components/segmented-button/segmented-button.css.d.ts.map +1 -0
- package/dist/components/segmented-button/segmented-button.d.ts +40 -0
- package/dist/components/segmented-button/segmented-button.d.ts.map +1 -0
- package/dist/components/segmented-button/segmented-button.js +5 -0
- package/dist/components/side-sheet/side-sheet.css.d.ts +2 -0
- package/dist/components/side-sheet/side-sheet.css.d.ts.map +1 -0
- package/dist/components/side-sheet/side-sheet.d.ts +57 -0
- package/dist/components/side-sheet/side-sheet.d.ts.map +1 -0
- package/dist/components/side-sheet/side-sheet.js +4 -0
- package/dist/components/slider/slider.css.d.ts +2 -0
- package/dist/components/slider/slider.css.d.ts.map +1 -0
- package/dist/components/slider/slider.d.ts +51 -0
- package/dist/components/slider/slider.d.ts.map +1 -0
- package/dist/components/slider/slider.js +4 -0
- package/dist/components/split-button/split-button.css.d.ts +2 -0
- package/dist/components/split-button/split-button.css.d.ts.map +1 -0
- package/dist/components/split-button/split-button.d.ts +89 -0
- package/dist/components/split-button/split-button.d.ts.map +1 -0
- package/dist/components/split-button/split-button.js +4 -0
- package/dist/components/table/table.js +1 -1
- package/dist/components/time-picker/time-picker.css.d.ts +2 -0
- package/dist/components/time-picker/time-picker.css.d.ts.map +1 -0
- package/dist/components/time-picker/time-picker.d.ts +87 -0
- package/dist/components/time-picker/time-picker.d.ts.map +1 -0
- package/dist/components/time-picker/time-picker.js +4 -0
- package/dist/components/toolbar/toolbar.css.d.ts +2 -0
- package/dist/components/toolbar/toolbar.css.d.ts.map +1 -0
- package/dist/components/toolbar/toolbar.d.ts +53 -0
- package/dist/components/toolbar/toolbar.d.ts.map +1 -0
- package/dist/components/toolbar/toolbar.js +4 -0
- package/dist/components/tooltip/tooltip.css.d.ts +2 -0
- package/dist/components/tooltip/tooltip.css.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +89 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.js +4 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +148 -2263
- package/dist/tokens/index.js +4 -2
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/theme.css.d.ts.map +1 -1
- package/llms.txt +2326 -0
- package/package.json +99 -2
- package/dist/chunks/button-B4TSZ7Sl.js.map +0 -1
- package/dist/chunks/icon-button-BdSc7eot.js.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,777 @@
|
|
|
1
|
+
import { t as i } from "./decorate-DXuynaiA.js";
|
|
2
|
+
import { t as $ } from "./form-associated-Cty_ZaS9.js";
|
|
3
|
+
import "./ripple-squbKHhj.js";
|
|
4
|
+
import "./focus-ring-CuiJuM-y.js";
|
|
5
|
+
import "./icon-DrNqcNEL.js";
|
|
6
|
+
import "./button-D2vn7kJ8.js";
|
|
7
|
+
import "./icon-button-BQz73GLa.js";
|
|
8
|
+
import { css as C, html as n, nothing as x } from "lit";
|
|
9
|
+
import { customElement as T, property as s, query as A, state as y } from "lit/decorators.js";
|
|
10
|
+
var z = C`
|
|
11
|
+
:host {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
font-family: var(--md-sys-typescale-font-family, Roboto, sans-serif);
|
|
14
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:host([variant="modal"]) {
|
|
19
|
+
display: contents;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
*, *::before, *::after {
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* --- Picker Surface Container --- */
|
|
27
|
+
.picker-surface {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
width: 328px;
|
|
31
|
+
background-color: var(--md-sys-color-surface-container-high, #ECE6F0);
|
|
32
|
+
border-radius: var(--md-sys-shape-corner-extra-large, 28px);
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
position: relative;
|
|
35
|
+
box-shadow: var(--md-sys-elevation-level1, 0px 1px 3px 1px rgba(0, 0, 0, 0.15));
|
|
36
|
+
user-select: none;
|
|
37
|
+
transition: box-shadow 200ms cubic-bezier(0.2, 0, 0, 1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host([variant="docked"]) .picker-surface {
|
|
41
|
+
border: 1px solid var(--md-sys-color-outline-variant, #CAC4D0);
|
|
42
|
+
box-shadow: var(--md-sys-elevation-level1, 0px 1px 3px 1px rgba(0, 0, 0, 0.15));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:host([disabled]) {
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
opacity: 0.38;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* --- Header --- */
|
|
51
|
+
.header {
|
|
52
|
+
padding: 20px 24px 16px 24px;
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
gap: 8px;
|
|
56
|
+
position: relative;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.header-top {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: space-between;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.subhead {
|
|
66
|
+
font-size: var(--md-sys-typescale-label-medium-size, 12px);
|
|
67
|
+
line-height: 16px;
|
|
68
|
+
font-weight: 500;
|
|
69
|
+
color: var(--md-sys-color-on-surface-variant, #49454F);
|
|
70
|
+
letter-spacing: 0.5px;
|
|
71
|
+
text-transform: uppercase;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.headline {
|
|
75
|
+
font-size: var(--md-sys-typescale-headline-large-size, 28px);
|
|
76
|
+
line-height: 36px;
|
|
77
|
+
font-weight: 400;
|
|
78
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
79
|
+
min-height: 36px;
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
word-break: break-word;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.headline.placeholder {
|
|
86
|
+
color: var(--md-sys-color-on-surface-variant, #49454F);
|
|
87
|
+
font-size: 24px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.header-divider {
|
|
91
|
+
height: 1px;
|
|
92
|
+
background-color: var(--md-sys-color-outline-variant, #CAC4D0);
|
|
93
|
+
margin: 0 16px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* --- Navigation Controls --- */
|
|
97
|
+
.navigation {
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
justify-content: space-between;
|
|
101
|
+
padding: 12px 16px 4px 16px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.month-year-btn {
|
|
105
|
+
display: inline-flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
gap: 4px;
|
|
108
|
+
background: transparent;
|
|
109
|
+
border: none;
|
|
110
|
+
padding: 8px 12px;
|
|
111
|
+
border-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
112
|
+
font-family: inherit;
|
|
113
|
+
font-size: var(--md-sys-typescale-label-large-size, 14px);
|
|
114
|
+
font-weight: 500;
|
|
115
|
+
color: var(--md-sys-color-on-surface-variant, #49454F);
|
|
116
|
+
cursor: pointer;
|
|
117
|
+
transition: background-color 150ms ease, color 150ms ease;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.month-year-btn:hover {
|
|
121
|
+
background-color: rgba(73, 69, 79, 0.08);
|
|
122
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.month-year-btn .dropdown-icon {
|
|
126
|
+
transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.month-year-btn.open .dropdown-icon {
|
|
130
|
+
transform: rotate(180deg);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.nav-arrows {
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
gap: 4px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* --- Calendar View --- */
|
|
140
|
+
.calendar-content {
|
|
141
|
+
padding: 0 12px 12px 12px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.weekdays {
|
|
145
|
+
display: grid;
|
|
146
|
+
grid-template-columns: repeat(7, 1fr);
|
|
147
|
+
text-align: center;
|
|
148
|
+
padding: 8px 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.weekday {
|
|
152
|
+
font-size: var(--md-sys-typescale-body-small-size, 12px);
|
|
153
|
+
font-weight: 500;
|
|
154
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
155
|
+
height: 24px;
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
justify-content: center;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.days-grid {
|
|
162
|
+
display: grid;
|
|
163
|
+
grid-template-columns: repeat(7, 1fr);
|
|
164
|
+
row-gap: 4px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.day-cell {
|
|
168
|
+
position: relative;
|
|
169
|
+
height: 40px;
|
|
170
|
+
display: flex;
|
|
171
|
+
align-items: center;
|
|
172
|
+
justify-content: center;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* Range Highlight Band */
|
|
176
|
+
.range-band {
|
|
177
|
+
position: absolute;
|
|
178
|
+
top: 0;
|
|
179
|
+
bottom: 0;
|
|
180
|
+
left: 0;
|
|
181
|
+
right: 0;
|
|
182
|
+
background-color: var(--md-sys-color-primary-container, #EADDFF);
|
|
183
|
+
z-index: 0;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.day-cell.range-start .range-band {
|
|
187
|
+
left: 50%;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.day-cell.range-end .range-band {
|
|
191
|
+
right: 50%;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.day-cell.range-start.range-end .range-band {
|
|
195
|
+
display: none;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* Day Button */
|
|
199
|
+
.day-btn {
|
|
200
|
+
position: relative;
|
|
201
|
+
z-index: 1;
|
|
202
|
+
width: 36px;
|
|
203
|
+
height: 36px;
|
|
204
|
+
border-radius: var(--md-sys-shape-corner-full, 50%);
|
|
205
|
+
border: 1px solid transparent;
|
|
206
|
+
background: transparent;
|
|
207
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
208
|
+
font-family: inherit;
|
|
209
|
+
font-size: var(--md-sys-typescale-body-medium-size, 14px);
|
|
210
|
+
font-weight: 400;
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
justify-content: center;
|
|
214
|
+
cursor: pointer;
|
|
215
|
+
padding: 0;
|
|
216
|
+
outline: none;
|
|
217
|
+
transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.day-btn:hover:not(.disabled):not(.selected):not(.range-start):not(.range-end) {
|
|
221
|
+
background-color: rgba(103, 80, 164, 0.08);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Today state */
|
|
225
|
+
.day-btn.today {
|
|
226
|
+
border-color: var(--md-sys-color-primary, #6750A4);
|
|
227
|
+
color: var(--md-sys-color-primary, #6750A4);
|
|
228
|
+
font-weight: 500;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* In range middle state */
|
|
232
|
+
.day-cell.in-range .day-btn {
|
|
233
|
+
color: var(--md-sys-color-on-primary-container, #21005D);
|
|
234
|
+
background-color: transparent;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* Selected / Range Start / Range End */
|
|
238
|
+
.day-btn.selected,
|
|
239
|
+
.day-btn.range-start,
|
|
240
|
+
.day-btn.range-end {
|
|
241
|
+
background-color: var(--md-sys-color-primary, #6750A4);
|
|
242
|
+
color: var(--md-sys-color-on-primary, #FFFFFF);
|
|
243
|
+
font-weight: 500;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.day-btn.disabled {
|
|
247
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
248
|
+
opacity: 0.38;
|
|
249
|
+
cursor: not-allowed;
|
|
250
|
+
pointer-events: none;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* --- Year Picker View --- */
|
|
254
|
+
.year-picker-view {
|
|
255
|
+
height: 280px;
|
|
256
|
+
overflow-y: auto;
|
|
257
|
+
display: grid;
|
|
258
|
+
grid-template-columns: repeat(3, 1fr);
|
|
259
|
+
gap: 8px;
|
|
260
|
+
padding: 12px 16px;
|
|
261
|
+
align-content: start;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.year-btn {
|
|
265
|
+
background: transparent;
|
|
266
|
+
border: 1px solid transparent;
|
|
267
|
+
border-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
268
|
+
padding: 10px 0;
|
|
269
|
+
font-family: inherit;
|
|
270
|
+
font-size: var(--md-sys-typescale-label-large-size, 14px);
|
|
271
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
272
|
+
cursor: pointer;
|
|
273
|
+
text-align: center;
|
|
274
|
+
transition: background-color 150ms ease, color 150ms ease;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.year-btn:hover:not(.selected) {
|
|
278
|
+
background-color: rgba(103, 80, 164, 0.08);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.year-btn.selected {
|
|
282
|
+
background-color: var(--md-sys-color-primary, #6750A4);
|
|
283
|
+
color: var(--md-sys-color-on-primary, #FFFFFF);
|
|
284
|
+
font-weight: 500;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.year-btn.current {
|
|
288
|
+
border-color: var(--md-sys-color-primary, #6750A4);
|
|
289
|
+
color: var(--md-sys-color-primary, #6750A4);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* --- Actions Footer --- */
|
|
293
|
+
.actions {
|
|
294
|
+
display: flex;
|
|
295
|
+
align-items: center;
|
|
296
|
+
justify-content: flex-end;
|
|
297
|
+
gap: 8px;
|
|
298
|
+
padding: 8px 16px 16px 16px;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/* --- Supporting / Error Text --- */
|
|
302
|
+
.supporting-text {
|
|
303
|
+
padding: 4px 16px 0;
|
|
304
|
+
font-size: var(--md-sys-typescale-body-small-size, 12px);
|
|
305
|
+
line-height: 16px;
|
|
306
|
+
color: var(--md-sys-color-on-surface-variant, #49454F);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
:host([error]) .supporting-text {
|
|
310
|
+
color: var(--md-sys-color-error, #B3261E);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/* --- Modal Scrim & Dialog Container --- */
|
|
314
|
+
dialog {
|
|
315
|
+
padding: 0;
|
|
316
|
+
border: none;
|
|
317
|
+
border-radius: var(--md-sys-shape-corner-extra-large, 28px);
|
|
318
|
+
background: transparent;
|
|
319
|
+
color: inherit;
|
|
320
|
+
box-shadow: var(--md-sys-elevation-level3, 0px 1px 3px 0px rgba(0, 0, 0, 0.30));
|
|
321
|
+
position: fixed;
|
|
322
|
+
inset: 0;
|
|
323
|
+
margin: auto;
|
|
324
|
+
z-index: 1000;
|
|
325
|
+
overflow: visible;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
dialog::backdrop {
|
|
329
|
+
background-color: rgba(0, 0, 0, 0.32);
|
|
330
|
+
backdrop-filter: blur(2px);
|
|
331
|
+
animation: md-fade-in 150ms ease-out forwards;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
dialog[open] {
|
|
335
|
+
animation: md-dialog-in 150ms cubic-bezier(0.2, 0, 0, 1) forwards;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
@keyframes md-fade-in {
|
|
339
|
+
from { opacity: 0; }
|
|
340
|
+
to { opacity: 1; }
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
@keyframes md-dialog-in {
|
|
344
|
+
from {
|
|
345
|
+
opacity: 0;
|
|
346
|
+
transform: scale(0.92);
|
|
347
|
+
}
|
|
348
|
+
to {
|
|
349
|
+
opacity: 1;
|
|
350
|
+
transform: scale(1);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
`, V = [
|
|
354
|
+
"January",
|
|
355
|
+
"February",
|
|
356
|
+
"March",
|
|
357
|
+
"April",
|
|
358
|
+
"May",
|
|
359
|
+
"June",
|
|
360
|
+
"July",
|
|
361
|
+
"August",
|
|
362
|
+
"September",
|
|
363
|
+
"October",
|
|
364
|
+
"November",
|
|
365
|
+
"December"
|
|
366
|
+
], N = [
|
|
367
|
+
"S",
|
|
368
|
+
"M",
|
|
369
|
+
"T",
|
|
370
|
+
"W",
|
|
371
|
+
"T",
|
|
372
|
+
"F",
|
|
373
|
+
"S"
|
|
374
|
+
], B = [
|
|
375
|
+
"M",
|
|
376
|
+
"T",
|
|
377
|
+
"W",
|
|
378
|
+
"T",
|
|
379
|
+
"F",
|
|
380
|
+
"S",
|
|
381
|
+
"S"
|
|
382
|
+
];
|
|
383
|
+
function M(r) {
|
|
384
|
+
return r < 10 ? `0${r}` : `${r}`;
|
|
385
|
+
}
|
|
386
|
+
function E(r, e, t) {
|
|
387
|
+
return `${r}-${M(e + 1)}-${M(t)}`;
|
|
388
|
+
}
|
|
389
|
+
function p(r) {
|
|
390
|
+
if (!r || typeof r != "string") return null;
|
|
391
|
+
const e = r.split("-");
|
|
392
|
+
if (e.length !== 3) return null;
|
|
393
|
+
const t = parseInt(e[0], 10), l = parseInt(e[1], 10) - 1, o = parseInt(e[2], 10);
|
|
394
|
+
return isNaN(t) || isNaN(l) || isNaN(o) ? null : {
|
|
395
|
+
year: t,
|
|
396
|
+
month: l,
|
|
397
|
+
day: o
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
function _() {
|
|
401
|
+
const r = /* @__PURE__ */ new Date();
|
|
402
|
+
return E(r.getFullYear(), r.getMonth(), r.getDate());
|
|
403
|
+
}
|
|
404
|
+
function I(r) {
|
|
405
|
+
const e = p(r);
|
|
406
|
+
return e ? new Date(e.year, e.month, e.day).toLocaleDateString("en-US", {
|
|
407
|
+
weekday: "short",
|
|
408
|
+
month: "short",
|
|
409
|
+
day: "numeric"
|
|
410
|
+
}) : "";
|
|
411
|
+
}
|
|
412
|
+
function v(r) {
|
|
413
|
+
const e = p(r);
|
|
414
|
+
return e ? new Date(e.year, e.month, e.day).toLocaleDateString("en-US", {
|
|
415
|
+
month: "short",
|
|
416
|
+
day: "numeric"
|
|
417
|
+
}) : "";
|
|
418
|
+
}
|
|
419
|
+
var a = class extends $ {
|
|
420
|
+
constructor(...e) {
|
|
421
|
+
super(...e), this.variant = "docked", this.range = !1, this.value = "", this.startDate = "", this.endDate = "", this.min = "", this.max = "", this.label = "", this.headline = "", this.open = !1, this.error = !1, this.errorText = "", this.supportingText = "", this.firstDayOfWeek = 0, this.showActions = !1, this.viewYear = (/* @__PURE__ */ new Date()).getFullYear(), this.viewMonth = (/* @__PURE__ */ new Date()).getMonth(), this.viewMode = "calendar", this.hoverDate = null, this.selectingEnd = !1, this.handlePrevMonth = () => {
|
|
422
|
+
this.viewMonth === 0 ? (this.viewMonth = 11, this.viewYear -= 1) : this.viewMonth -= 1;
|
|
423
|
+
}, this.handleNextMonth = () => {
|
|
424
|
+
this.viewMonth === 11 ? (this.viewMonth = 0, this.viewYear += 1) : this.viewMonth += 1;
|
|
425
|
+
}, this.toggleViewMode = () => {
|
|
426
|
+
this.viewMode = this.viewMode === "calendar" ? "year" : "calendar";
|
|
427
|
+
}, this.selectYear = (t) => {
|
|
428
|
+
this.viewYear = t, this.viewMode = "calendar";
|
|
429
|
+
}, this.handleDayClick = (t) => {
|
|
430
|
+
if (!this.isDateDisabled(t)) {
|
|
431
|
+
if (!this.range) {
|
|
432
|
+
this.value = t, this.setFormValue(this.value), this.emitEvent("input", { value: this.value }), this.emitEvent("change", { value: this.value }), this.emitEvent("select", {
|
|
433
|
+
date: t,
|
|
434
|
+
type: "single"
|
|
435
|
+
});
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
!this.selectingEnd || !this.startDate ? (this.startDate = t, this.endDate = "", this.value = t, this.selectingEnd = !0, this.setFormValue(this.value), this.emitEvent("select", {
|
|
439
|
+
date: t,
|
|
440
|
+
type: "start"
|
|
441
|
+
}), this.emitEvent("input", { value: this.value })) : t < this.startDate ? (this.startDate = t, this.endDate = "", this.value = t, this.selectingEnd = !0, this.setFormValue(this.value), this.emitEvent("select", {
|
|
442
|
+
date: t,
|
|
443
|
+
type: "start"
|
|
444
|
+
}), this.emitEvent("input", { value: this.value })) : (this.endDate = t, this.value = `${this.startDate}/${this.endDate}`, this.selectingEnd = !1, this.setFormValue(this.value), this.emitEvent("select", {
|
|
445
|
+
date: t,
|
|
446
|
+
type: "end"
|
|
447
|
+
}), this.emitEvent("input", { value: this.value }), this.emitEvent("change", {
|
|
448
|
+
value: this.value,
|
|
449
|
+
startDate: this.startDate,
|
|
450
|
+
endDate: this.endDate
|
|
451
|
+
}));
|
|
452
|
+
}
|
|
453
|
+
}, this.handleDayMouseEnter = (t) => {
|
|
454
|
+
this.range && this.selectingEnd && this.startDate && (this.hoverDate = t);
|
|
455
|
+
}, this.handleDayMouseLeave = () => {
|
|
456
|
+
this.hoverDate = null;
|
|
457
|
+
}, this.handleCancel = (t) => {
|
|
458
|
+
t && t.preventDefault(), this.emitEvent("cancel"), this.close();
|
|
459
|
+
}, this.handleConfirm = () => {
|
|
460
|
+
this.emitEvent("change", {
|
|
461
|
+
value: this.value,
|
|
462
|
+
startDate: this.startDate,
|
|
463
|
+
endDate: this.endDate
|
|
464
|
+
}), this.close();
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
static {
|
|
468
|
+
this.styles = [$.styles, z];
|
|
469
|
+
}
|
|
470
|
+
connectedCallback() {
|
|
471
|
+
super.connectedCallback(), this.syncInitialState(), this.setFormValue(this.value);
|
|
472
|
+
}
|
|
473
|
+
willUpdate(e) {
|
|
474
|
+
if (super.willUpdate(e), e.has("value") && (this.handleValueChange(), this.setFormValue(this.value), this.validateInput()), (e.has("startDate") || e.has("endDate")) && this.range) {
|
|
475
|
+
const t = this.startDate && this.endDate ? `${this.startDate}/${this.endDate}` : this.startDate || "";
|
|
476
|
+
this.value !== t && (this.value = t, this.setFormValue(this.value));
|
|
477
|
+
}
|
|
478
|
+
(e.has("min") || e.has("max") || e.has("required")) && this.validateInput();
|
|
479
|
+
}
|
|
480
|
+
updated(e) {
|
|
481
|
+
super.updated(e), e.has("open") && this.variant === "modal" && (this.open ? (this.dialogElement && !this.dialogElement.open && this.dialogElement.showModal(), this.emitEvent("open")) : (this.dialogElement && this.dialogElement.open && this.dialogElement.close(), this.emitEvent("close")));
|
|
482
|
+
}
|
|
483
|
+
syncInitialState() {
|
|
484
|
+
const e = p(this.startDate || (this.range ? this.value.split("/")[0] ?? "" : this.value));
|
|
485
|
+
if (e)
|
|
486
|
+
this.viewYear = e.year, this.viewMonth = e.month;
|
|
487
|
+
else {
|
|
488
|
+
const t = /* @__PURE__ */ new Date();
|
|
489
|
+
this.viewYear = t.getFullYear(), this.viewMonth = t.getMonth();
|
|
490
|
+
}
|
|
491
|
+
if (this.range && this.value && this.value.includes("/")) {
|
|
492
|
+
const [t, l] = this.value.split("/");
|
|
493
|
+
this.startDate = t || "", this.endDate = l || "";
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
handleValueChange() {
|
|
497
|
+
if (this.range)
|
|
498
|
+
if (this.value.includes("/")) {
|
|
499
|
+
const [e, t] = this.value.split("/");
|
|
500
|
+
this.startDate = e || "", this.endDate = t || "";
|
|
501
|
+
} else
|
|
502
|
+
this.startDate = this.value, this.endDate = "";
|
|
503
|
+
else {
|
|
504
|
+
const e = p(this.value);
|
|
505
|
+
e && (this.viewYear = e.year, this.viewMonth = e.month);
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
formResetCallback() {
|
|
509
|
+
this.value = "", this.startDate = "", this.endDate = "", this.error = !1, this.selectingEnd = !1, this.setFormValue(null);
|
|
510
|
+
const e = /* @__PURE__ */ new Date();
|
|
511
|
+
this.viewYear = e.getFullYear(), this.viewMonth = e.getMonth(), this.viewMode = "calendar";
|
|
512
|
+
}
|
|
513
|
+
showModal() {
|
|
514
|
+
this.open = !0;
|
|
515
|
+
}
|
|
516
|
+
show() {
|
|
517
|
+
this.open = !0;
|
|
518
|
+
}
|
|
519
|
+
close() {
|
|
520
|
+
this.open = !1;
|
|
521
|
+
}
|
|
522
|
+
reset() {
|
|
523
|
+
this.formResetCallback();
|
|
524
|
+
}
|
|
525
|
+
validateInput() {
|
|
526
|
+
if (this.required && !this.value) {
|
|
527
|
+
this.setValidity({ valueMissing: !0 }, this.errorText || "A date is required"), this.error = !0;
|
|
528
|
+
return;
|
|
529
|
+
}
|
|
530
|
+
if (this.min && this.value) {
|
|
531
|
+
const e = this.range ? this.startDate : this.value;
|
|
532
|
+
if (e && e < this.min) {
|
|
533
|
+
this.setValidity({ rangeUnderflow: !0 }, this.errorText || `Date must be after ${this.min}`), this.error = !0;
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
if (this.max && this.value) {
|
|
538
|
+
const e = this.range ? this.endDate || this.startDate : this.value;
|
|
539
|
+
if (e && e > this.max) {
|
|
540
|
+
this.setValidity({ rangeOverflow: !0 }, this.errorText || `Date must be before ${this.max}`), this.error = !0;
|
|
541
|
+
return;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
this.setValidity({}), this.errorText || (this.error = !1);
|
|
545
|
+
}
|
|
546
|
+
isDateDisabled(e) {
|
|
547
|
+
return !!(this.disabled || this.min && e < this.min || this.max && e > this.max);
|
|
548
|
+
}
|
|
549
|
+
getFormattedHeadline() {
|
|
550
|
+
if (this.headline) return this.headline;
|
|
551
|
+
if (!this.range)
|
|
552
|
+
return this.value ? I(this.value) : "Select date";
|
|
553
|
+
if (!this.startDate && !this.endDate) return "Select range";
|
|
554
|
+
if (this.startDate && !this.endDate) return `${v(this.startDate)} – End date`;
|
|
555
|
+
if (this.startDate && this.endDate) {
|
|
556
|
+
const e = p(this.startDate), t = p(this.endDate);
|
|
557
|
+
return e && t && e.year === t.year ? `${v(this.startDate)} – ${v(this.endDate)}, ${e.year}` : `${v(this.startDate)} – ${v(this.endDate)}`;
|
|
558
|
+
}
|
|
559
|
+
return "Select range";
|
|
560
|
+
}
|
|
561
|
+
renderCalendarGrid() {
|
|
562
|
+
const e = this.viewYear, t = this.viewMonth, l = new Date(e, t + 1, 0).getDate();
|
|
563
|
+
let o = new Date(e, t, 1).getDay();
|
|
564
|
+
this.firstDayOfWeek === 1 && (o = (o + 6) % 7);
|
|
565
|
+
const d = this.firstDayOfWeek === 1 ? B : N, D = _(), u = [];
|
|
566
|
+
for (let c = 0; c < o; c++) u.push(n`<div class="day-cell empty"></div>`);
|
|
567
|
+
for (let c = 1; c <= l; c++) {
|
|
568
|
+
const h = E(e, t, c), F = h === D, w = this.isDateDisabled(h);
|
|
569
|
+
let m = !1, g = !1, f = !1, k = !1;
|
|
570
|
+
if (!this.range) m = this.value === h;
|
|
571
|
+
else {
|
|
572
|
+
const b = this.endDate || (this.selectingEnd ? this.hoverDate : null);
|
|
573
|
+
g = this.startDate === h, f = b === h, m = g || f, this.startDate && b && b > this.startDate && (k = h >= this.startDate && h <= b);
|
|
574
|
+
}
|
|
575
|
+
const S = [
|
|
576
|
+
"day-cell",
|
|
577
|
+
g ? "range-start" : "",
|
|
578
|
+
f ? "range-end" : "",
|
|
579
|
+
k ? "in-range" : ""
|
|
580
|
+
].filter(Boolean).join(" "), Y = [
|
|
581
|
+
"day-btn",
|
|
582
|
+
m ? "selected" : "",
|
|
583
|
+
F ? "today" : "",
|
|
584
|
+
g ? "range-start" : "",
|
|
585
|
+
f ? "range-end" : "",
|
|
586
|
+
w ? "disabled" : ""
|
|
587
|
+
].filter(Boolean).join(" ");
|
|
588
|
+
u.push(n`
|
|
589
|
+
<div class=${S}>
|
|
590
|
+
${k ? n`<div class="range-band"></div>` : x}
|
|
591
|
+
<button
|
|
592
|
+
type="button"
|
|
593
|
+
class=${Y}
|
|
594
|
+
?disabled=${w}
|
|
595
|
+
aria-label=${h}
|
|
596
|
+
aria-selected=${m ? "true" : "false"}
|
|
597
|
+
@click=${() => this.handleDayClick(h)}
|
|
598
|
+
@mouseenter=${() => this.handleDayMouseEnter(h)}
|
|
599
|
+
@mouseleave=${this.handleDayMouseLeave}
|
|
600
|
+
>
|
|
601
|
+
<md-ripple ?disabled=${w}></md-ripple>
|
|
602
|
+
${c}
|
|
603
|
+
</button>
|
|
604
|
+
</div>
|
|
605
|
+
`);
|
|
606
|
+
}
|
|
607
|
+
return n`
|
|
608
|
+
<div class="calendar-content">
|
|
609
|
+
<div class="weekdays" role="row">
|
|
610
|
+
${d.map((c) => n`<div class="weekday" role="columnheader">${c}</div>`)}
|
|
611
|
+
</div>
|
|
612
|
+
<div class="days-grid" role="grid">
|
|
613
|
+
${u}
|
|
614
|
+
</div>
|
|
615
|
+
</div>
|
|
616
|
+
`;
|
|
617
|
+
}
|
|
618
|
+
renderYearPicker() {
|
|
619
|
+
const e = (/* @__PURE__ */ new Date()).getFullYear(), t = e - 50, l = e + 50, o = [];
|
|
620
|
+
for (let d = t; d <= l; d++) {
|
|
621
|
+
const D = d === this.viewYear, u = d === e;
|
|
622
|
+
o.push(n`
|
|
623
|
+
<button
|
|
624
|
+
type="button"
|
|
625
|
+
class="year-btn ${D ? "selected" : ""} ${u ? "current" : ""}"
|
|
626
|
+
@click=${() => this.selectYear(d)}
|
|
627
|
+
>
|
|
628
|
+
<md-ripple></md-ripple>
|
|
629
|
+
${d}
|
|
630
|
+
</button>
|
|
631
|
+
`);
|
|
632
|
+
}
|
|
633
|
+
return n`
|
|
634
|
+
<div class="year-picker-view">
|
|
635
|
+
${o}
|
|
636
|
+
</div>
|
|
637
|
+
`;
|
|
638
|
+
}
|
|
639
|
+
renderPickerSurface() {
|
|
640
|
+
const e = this.viewMode === "year", t = this.label || (this.range ? "Select range" : "Select date"), l = this.getFormattedHeadline(), o = !!(this.range ? this.startDate : this.value), d = this.showActions || this.variant === "modal";
|
|
641
|
+
return n`
|
|
642
|
+
<div class="picker-surface">
|
|
643
|
+
<div class="header">
|
|
644
|
+
<div class="header-top">
|
|
645
|
+
<span class="subhead">${t}</span>
|
|
646
|
+
<md-icon-button
|
|
647
|
+
icon=${e ? "calendar_month" : "edit_calendar"}
|
|
648
|
+
aria-label=${e ? "Switch to calendar view" : "Switch to year view"}
|
|
649
|
+
@click=${this.toggleViewMode}
|
|
650
|
+
></md-icon-button>
|
|
651
|
+
</div>
|
|
652
|
+
<div class="headline ${o ? "" : "placeholder"}">
|
|
653
|
+
${l}
|
|
654
|
+
</div>
|
|
655
|
+
</div>
|
|
656
|
+
|
|
657
|
+
<div class="header-divider"></div>
|
|
658
|
+
|
|
659
|
+
<div class="navigation">
|
|
660
|
+
<button
|
|
661
|
+
type="button"
|
|
662
|
+
class="month-year-btn ${e ? "open" : ""}"
|
|
663
|
+
@click=${this.toggleViewMode}
|
|
664
|
+
aria-label="Toggle year selection"
|
|
665
|
+
>
|
|
666
|
+
<span>${V[this.viewMonth]} ${this.viewYear}</span>
|
|
667
|
+
<md-icon class="dropdown-icon" name="arrow_drop_down"></md-icon>
|
|
668
|
+
</button>
|
|
669
|
+
|
|
670
|
+
${e ? x : n`
|
|
671
|
+
<div class="nav-arrows">
|
|
672
|
+
<md-icon-button
|
|
673
|
+
icon="chevron_left"
|
|
674
|
+
aria-label="Previous month"
|
|
675
|
+
@click=${this.handlePrevMonth}
|
|
676
|
+
></md-icon-button>
|
|
677
|
+
<md-icon-button
|
|
678
|
+
icon="chevron_right"
|
|
679
|
+
aria-label="Next month"
|
|
680
|
+
@click=${this.handleNextMonth}
|
|
681
|
+
></md-icon-button>
|
|
682
|
+
</div>
|
|
683
|
+
`}
|
|
684
|
+
</div>
|
|
685
|
+
|
|
686
|
+
${e ? this.renderYearPicker() : this.renderCalendarGrid()}
|
|
687
|
+
|
|
688
|
+
${d ? n`
|
|
689
|
+
<div class="actions">
|
|
690
|
+
<slot name="actions">
|
|
691
|
+
<md-button variant="text" @click=${this.handleCancel}>Cancel</md-button>
|
|
692
|
+
<md-button variant="text" @click=${this.handleConfirm}>OK</md-button>
|
|
693
|
+
</slot>
|
|
694
|
+
</div>
|
|
695
|
+
` : x}
|
|
696
|
+
</div>
|
|
697
|
+
|
|
698
|
+
${this.supportingText || this.errorText ? n`
|
|
699
|
+
<div class="supporting-text">
|
|
700
|
+
${this.error ? this.errorText || this.supportingText : this.supportingText}
|
|
701
|
+
</div>
|
|
702
|
+
` : x}
|
|
703
|
+
`;
|
|
704
|
+
}
|
|
705
|
+
render() {
|
|
706
|
+
return this.variant === "modal" ? n`
|
|
707
|
+
<dialog
|
|
708
|
+
@cancel=${this.handleCancel}
|
|
709
|
+
@click=${(e) => {
|
|
710
|
+
e.target === this.dialogElement && this.handleCancel();
|
|
711
|
+
}}
|
|
712
|
+
>
|
|
713
|
+
${this.renderPickerSurface()}
|
|
714
|
+
</dialog>
|
|
715
|
+
` : this.renderPickerSurface();
|
|
716
|
+
}
|
|
717
|
+
};
|
|
718
|
+
i([s({
|
|
719
|
+
type: String,
|
|
720
|
+
reflect: !0
|
|
721
|
+
})], a.prototype, "variant", void 0);
|
|
722
|
+
i([s({
|
|
723
|
+
type: Boolean,
|
|
724
|
+
reflect: !0
|
|
725
|
+
})], a.prototype, "range", void 0);
|
|
726
|
+
i([s({
|
|
727
|
+
type: String,
|
|
728
|
+
reflect: !0
|
|
729
|
+
})], a.prototype, "value", void 0);
|
|
730
|
+
i([s({
|
|
731
|
+
type: String,
|
|
732
|
+
attribute: "start-date"
|
|
733
|
+
})], a.prototype, "startDate", void 0);
|
|
734
|
+
i([s({
|
|
735
|
+
type: String,
|
|
736
|
+
attribute: "end-date"
|
|
737
|
+
})], a.prototype, "endDate", void 0);
|
|
738
|
+
i([s({ type: String })], a.prototype, "min", void 0);
|
|
739
|
+
i([s({ type: String })], a.prototype, "max", void 0);
|
|
740
|
+
i([s({ type: String })], a.prototype, "label", void 0);
|
|
741
|
+
i([s({ type: String })], a.prototype, "headline", void 0);
|
|
742
|
+
i([s({
|
|
743
|
+
type: Boolean,
|
|
744
|
+
reflect: !0
|
|
745
|
+
})], a.prototype, "open", void 0);
|
|
746
|
+
i([s({
|
|
747
|
+
type: Boolean,
|
|
748
|
+
reflect: !0
|
|
749
|
+
})], a.prototype, "error", void 0);
|
|
750
|
+
i([s({
|
|
751
|
+
type: String,
|
|
752
|
+
attribute: "error-text"
|
|
753
|
+
})], a.prototype, "errorText", void 0);
|
|
754
|
+
i([s({
|
|
755
|
+
type: String,
|
|
756
|
+
attribute: "supporting-text"
|
|
757
|
+
})], a.prototype, "supportingText", void 0);
|
|
758
|
+
i([s({
|
|
759
|
+
type: Number,
|
|
760
|
+
attribute: "first-day-of-week"
|
|
761
|
+
})], a.prototype, "firstDayOfWeek", void 0);
|
|
762
|
+
i([s({
|
|
763
|
+
type: Boolean,
|
|
764
|
+
attribute: "show-actions"
|
|
765
|
+
})], a.prototype, "showActions", void 0);
|
|
766
|
+
i([y()], a.prototype, "viewYear", void 0);
|
|
767
|
+
i([y()], a.prototype, "viewMonth", void 0);
|
|
768
|
+
i([y()], a.prototype, "viewMode", void 0);
|
|
769
|
+
i([y()], a.prototype, "hoverDate", void 0);
|
|
770
|
+
i([y()], a.prototype, "selectingEnd", void 0);
|
|
771
|
+
i([A("dialog")], a.prototype, "dialogElement", void 0);
|
|
772
|
+
a = i([T("md-date-picker")], a);
|
|
773
|
+
export {
|
|
774
|
+
a as t
|
|
775
|
+
};
|
|
776
|
+
|
|
777
|
+
//# sourceMappingURL=date-picker-DJeHi4w-.js.map
|