@cloudscape-design/components-themeable 3.0.60 → 3.0.62
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/lib/internal/scss/calendar/styles.scss +34 -14
- package/lib/internal/scss/date-range-picker/calendar/grids/day/styles.scss +5 -5
- package/lib/internal/scss/date-range-picker/styles.scss +5 -10
- package/lib/internal/scss/property-filter/styles.scss +0 -1
- package/lib/internal/template/breadcrumb-group/item/styles.css.js +7 -7
- package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +16 -16
- package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +7 -7
- package/lib/internal/template/breadcrumb-group/styles.css.js +6 -6
- package/lib/internal/template/breadcrumb-group/styles.scoped.css +12 -12
- package/lib/internal/template/breadcrumb-group/styles.selectors.js +6 -6
- package/lib/internal/template/calendar/grid/day/index.d.ts +2 -2
- package/lib/internal/template/calendar/grid/day/index.d.ts.map +1 -1
- package/lib/internal/template/calendar/grid/day/index.js +5 -4
- package/lib/internal/template/calendar/grid/day/index.js.map +1 -1
- package/lib/internal/template/calendar/grid/index.d.ts.map +1 -1
- package/lib/internal/template/calendar/grid/index.js.map +1 -1
- package/lib/internal/template/calendar/styles.css.js +20 -20
- package/lib/internal/template/calendar/styles.scoped.css +69 -41
- package/lib/internal/template/calendar/styles.selectors.js +20 -20
- package/lib/internal/template/date-input/internal.js +1 -1
- package/lib/internal/template/date-input/internal.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/grids/day/styles.css.js +21 -21
- package/lib/internal/template/date-range-picker/calendar/grids/day/styles.scoped.css +41 -41
- package/lib/internal/template/date-range-picker/calendar/grids/day/styles.selectors.js +21 -21
- package/lib/internal/template/date-range-picker/calendar/index.js +23 -27
- package/lib/internal/template/date-range-picker/calendar/index.js.map +1 -1
- package/lib/internal/template/date-range-picker/styles.css.js +40 -41
- package/lib/internal/template/date-range-picker/styles.scoped.css +52 -53
- package/lib/internal/template/date-range-picker/styles.selectors.js +40 -41
- package/lib/internal/template/internal/base-component/styles.scoped.css +7 -25
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/link/internal.d.ts.map +1 -1
- package/lib/internal/template/link/internal.js +1 -1
- package/lib/internal/template/link/internal.js.map +1 -1
- package/lib/internal/template/property-filter/interfaces.d.ts +1 -5
- package/lib/internal/template/property-filter/interfaces.d.ts.map +1 -1
- package/lib/internal/template/property-filter/interfaces.js.map +1 -1
- package/lib/internal/template/property-filter/styles.css.js +25 -25
- package/lib/internal/template/property-filter/styles.scoped.css +25 -26
- package/lib/internal/template/property-filter/styles.selectors.js +25 -25
- package/lib/internal/template/property-filter/token.d.ts.map +1 -1
- package/lib/internal/template/property-filter/token.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,8 +18,10 @@ $calendar-grid-nonmonth-day-color: awsui.$color-text-dropdown-item-secondary;
|
|
|
18
18
|
$calendar-grid-hover-background-color: awsui.$color-background-dropdown-item-hover;
|
|
19
19
|
$calendar-grid-hover-border-color: awsui.$color-border-dropdown-item-hover;
|
|
20
20
|
$calendar-grid-today-background-color: awsui.$color-background-calendar-today;
|
|
21
|
-
$calendar-grid-selected-
|
|
22
|
-
$calendar-grid-selected-
|
|
21
|
+
$calendar-grid-selected-text-color: awsui.$color-background-control-default;
|
|
22
|
+
$calendar-grid-selected-background-color: awsui.$color-background-control-checked;
|
|
23
|
+
$calendar-grid-selected-border-color: awsui.$color-background-control-checked;
|
|
24
|
+
$calendar-grid-selected-focused-box-shadow: 0 0 0 2px awsui.$color-border-calendar-grid-selected-focus-ring;
|
|
23
25
|
$calendar-grid-border: 1px solid $calendar-grid-border-color;
|
|
24
26
|
|
|
25
27
|
.root {
|
|
@@ -86,7 +88,6 @@ $calendar-grid-border: 1px solid $calendar-grid-border-color;
|
|
|
86
88
|
text-align: center;
|
|
87
89
|
border-bottom: $calendar-grid-border;
|
|
88
90
|
border-right: $calendar-grid-border;
|
|
89
|
-
border-radius: awsui.$border-radius-item;
|
|
90
91
|
padding: awsui.$space-xxs 0;
|
|
91
92
|
color: $calendar-grid-disabled-day-color;
|
|
92
93
|
position: relative;
|
|
@@ -106,7 +107,9 @@ $calendar-grid-border: 1px solid $calendar-grid-border-color;
|
|
|
106
107
|
&-enabled {
|
|
107
108
|
cursor: pointer;
|
|
108
109
|
color: $calendar-grid-nonmonth-day-color;
|
|
109
|
-
|
|
110
|
+
&::after {
|
|
111
|
+
border-radius: awsui.$border-radius-item;
|
|
112
|
+
}
|
|
110
113
|
&.calendar-day-current-month {
|
|
111
114
|
color: $calendar-grid-day-color;
|
|
112
115
|
&:hover {
|
|
@@ -115,7 +118,6 @@ $calendar-grid-border: 1px solid $calendar-grid-border-color;
|
|
|
115
118
|
&:not(.calendar-day-selected) {
|
|
116
119
|
&::after {
|
|
117
120
|
border: awsui.$border-item-width solid $calendar-grid-hover-border-color;
|
|
118
|
-
border-radius: awsui.$border-radius-item;
|
|
119
121
|
}
|
|
120
122
|
}
|
|
121
123
|
}
|
|
@@ -124,15 +126,17 @@ $calendar-grid-border: 1px solid $calendar-grid-border-color;
|
|
|
124
126
|
|
|
125
127
|
&-today {
|
|
126
128
|
background-color: $calendar-grid-today-background-color;
|
|
129
|
+
border-radius: awsui.$border-radius-item;
|
|
127
130
|
}
|
|
128
131
|
|
|
129
132
|
&::after {
|
|
130
133
|
content: '';
|
|
131
134
|
position: absolute;
|
|
132
|
-
|
|
135
|
+
z-index: 1;
|
|
136
|
+
top: calc(-1 * #{awsui.$border-item-width});
|
|
133
137
|
left: -1px;
|
|
134
138
|
bottom: -1px;
|
|
135
|
-
right: -
|
|
139
|
+
right: calc(-1 * #{awsui.$border-item-width});
|
|
136
140
|
background-color: transparent;
|
|
137
141
|
}
|
|
138
142
|
> .day-inner {
|
|
@@ -142,25 +146,41 @@ $calendar-grid-border: 1px solid $calendar-grid-border-color;
|
|
|
142
146
|
|
|
143
147
|
&:focus {
|
|
144
148
|
outline: none;
|
|
145
|
-
@include
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
@include focus-visible.when-visible {
|
|
150
|
+
@include styles.focus-highlight(
|
|
151
|
+
awsui.$space-calendar-grid-focus-outline-gutter,
|
|
152
|
+
awsui.$border-radius-calendar-day-focus-ring
|
|
153
|
+
);
|
|
154
|
+
&::before {
|
|
155
|
+
z-index: 2;
|
|
156
|
+
}
|
|
151
157
|
}
|
|
152
158
|
}
|
|
153
159
|
|
|
154
160
|
&-selected {
|
|
155
161
|
border-color: transparent;
|
|
156
162
|
position: relative;
|
|
163
|
+
z-index: 2;
|
|
164
|
+
&:focus {
|
|
165
|
+
@include focus-visible.when-visible {
|
|
166
|
+
@include styles.focus-highlight(
|
|
167
|
+
awsui.$space-calendar-grid-focus-outline-gutter,
|
|
168
|
+
awsui.$border-radius-calendar-day-focus-ring,
|
|
169
|
+
$calendar-grid-selected-focused-box-shadow
|
|
170
|
+
);
|
|
171
|
+
&::before {
|
|
172
|
+
z-index: 2;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
157
176
|
&::after {
|
|
158
177
|
background-color: $calendar-grid-selected-background-color;
|
|
159
178
|
border: awsui.$border-item-width solid $calendar-grid-selected-border-color;
|
|
160
179
|
border-radius: awsui.$border-radius-item;
|
|
161
180
|
}
|
|
162
181
|
> .day-inner {
|
|
163
|
-
|
|
182
|
+
z-index: 2;
|
|
183
|
+
color: $calendar-grid-selected-text-color;
|
|
164
184
|
position: relative;
|
|
165
185
|
}
|
|
166
186
|
}
|
|
@@ -76,11 +76,6 @@ $calendar-grid-width: 234px;
|
|
|
76
76
|
background-color: transparent;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
> .day-inner {
|
|
80
|
-
position: relative;
|
|
81
|
-
z-index: 1;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
79
|
@include focus-visible.when-visible {
|
|
85
80
|
z-index: 2;
|
|
86
81
|
@include styles.focus-highlight(
|
|
@@ -88,6 +83,11 @@ $calendar-grid-width: 234px;
|
|
|
88
83
|
awsui.$border-radius-calendar-day-focus-ring
|
|
89
84
|
);
|
|
90
85
|
}
|
|
86
|
+
|
|
87
|
+
> .day-inner {
|
|
88
|
+
position: relative;
|
|
89
|
+
z-index: 1;
|
|
90
|
+
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
.in-first-row:not(.in-previous-month) {
|
|
@@ -106,17 +106,12 @@ $calendar-grid-width: awsui.$size-calendar-grid-width;
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
.date-and-time-wrapper {
|
|
109
|
-
display: flex;
|
|
110
109
|
width: $calendar-grid-width;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
& > .date-and-time-wrapper__time,
|
|
117
|
-
& > .date-and-time-wrapper__date {
|
|
118
|
-
flex-grow: 1;
|
|
119
|
-
}
|
|
110
|
+
}
|
|
111
|
+
.date-and-time-wrapper:not(.date-only) {
|
|
112
|
+
display: grid;
|
|
113
|
+
column-gap: awsui.$space-xs;
|
|
114
|
+
grid-template-columns: 1fr 1fr;
|
|
120
115
|
}
|
|
121
116
|
|
|
122
117
|
.date-and-time-constrainttext {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"link": "
|
|
5
|
-
"breadcrumb": "
|
|
6
|
-
"icon": "
|
|
7
|
-
"anchor": "
|
|
8
|
-
"last": "
|
|
9
|
-
"compressed": "
|
|
10
|
-
"text": "
|
|
4
|
+
"link": "awsui_link_1kosq_1lntj_93",
|
|
5
|
+
"breadcrumb": "awsui_breadcrumb_1kosq_1lntj_97",
|
|
6
|
+
"icon": "awsui_icon_1kosq_1lntj_100",
|
|
7
|
+
"anchor": "awsui_anchor_1kosq_1lntj_104",
|
|
8
|
+
"last": "awsui_last_1kosq_1lntj_147",
|
|
9
|
+
"compressed": "awsui_compressed_1kosq_1lntj_157",
|
|
10
|
+
"text": "awsui_text_1kosq_1lntj_161"
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -90,18 +90,18 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.
|
|
93
|
+
.awsui_link_1kosq_1lntj_93:not(#\9):after {
|
|
94
94
|
display: none;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
.
|
|
97
|
+
.awsui_breadcrumb_1kosq_1lntj_97:not(#\9) {
|
|
98
98
|
display: flex;
|
|
99
99
|
}
|
|
100
|
-
.
|
|
100
|
+
.awsui_breadcrumb_1kosq_1lntj_97 > .awsui_icon_1kosq_1lntj_100:not(#\9) {
|
|
101
101
|
margin: 0 var(--space-xs-rsr2qu, 8px);
|
|
102
|
-
color: var(--color-text-breadcrumb-icon-
|
|
102
|
+
color: var(--color-text-breadcrumb-icon-73h18g, #687078);
|
|
103
103
|
}
|
|
104
|
-
.
|
|
104
|
+
.awsui_breadcrumb_1kosq_1lntj_97 > .awsui_anchor_1kosq_1lntj_104:not(#\9) {
|
|
105
105
|
color: var(--color-text-link-default-753y4e, #0073bb);
|
|
106
106
|
font-weight: inherit;
|
|
107
107
|
letter-spacing: normal;
|
|
@@ -114,31 +114,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
114
114
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
115
115
|
}
|
|
116
116
|
@media (prefers-reduced-motion: reduce) {
|
|
117
|
-
.
|
|
117
|
+
.awsui_breadcrumb_1kosq_1lntj_97 > .awsui_anchor_1kosq_1lntj_104:not(#\9) {
|
|
118
118
|
animation: none;
|
|
119
119
|
transition: none;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
.awsui-motion-disabled .
|
|
122
|
+
.awsui-motion-disabled .awsui_breadcrumb_1kosq_1lntj_97 > .awsui_anchor_1kosq_1lntj_104:not(#\9), .awsui-mode-entering .awsui_breadcrumb_1kosq_1lntj_97 > .awsui_anchor_1kosq_1lntj_104:not(#\9) {
|
|
123
123
|
animation: none;
|
|
124
124
|
transition: none;
|
|
125
125
|
}
|
|
126
|
-
.
|
|
126
|
+
.awsui_breadcrumb_1kosq_1lntj_97 > .awsui_anchor_1kosq_1lntj_104:not(#\9):hover {
|
|
127
127
|
cursor: pointer;
|
|
128
128
|
color: var(--color-text-link-hover-ok01xk, #0073bb);
|
|
129
129
|
}
|
|
130
|
-
.
|
|
130
|
+
.awsui_breadcrumb_1kosq_1lntj_97 > .awsui_anchor_1kosq_1lntj_104:not(#\9):focus {
|
|
131
131
|
outline: none;
|
|
132
132
|
}
|
|
133
|
-
.
|
|
133
|
+
.awsui_breadcrumb_1kosq_1lntj_97 > .awsui_anchor_1kosq_1lntj_104:not(#\9):active {
|
|
134
134
|
color: var(--color-text-link-hover-ok01xk, #0073bb);
|
|
135
135
|
}
|
|
136
|
-
.
|
|
136
|
+
.awsui_breadcrumb_1kosq_1lntj_97 > .awsui_anchor_1kosq_1lntj_104:not(#\9):active, .awsui_breadcrumb_1kosq_1lntj_97 > .awsui_anchor_1kosq_1lntj_104:not(#\9):focus, .awsui_breadcrumb_1kosq_1lntj_97 > .awsui_anchor_1kosq_1lntj_104:not(#\9):hover {
|
|
137
137
|
text-decoration: underline;
|
|
138
138
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
139
139
|
text-decoration-color: currentColor;
|
|
140
140
|
}
|
|
141
|
-
.
|
|
141
|
+
.awsui_breadcrumb_1kosq_1lntj_97 > .awsui_anchor_1kosq_1lntj_104[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
142
142
|
outline: thin dotted;
|
|
143
143
|
outline: var(--border-link-focus-ring-outline-67z0xv, 5px auto Highlight);
|
|
144
144
|
outline-offset: 2px;
|
|
@@ -146,21 +146,21 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
146
146
|
border-radius: var(--border-radius-control-default-focus-ring-hekmgc, 2px);
|
|
147
147
|
box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-e3dct9, 0px) var(--color-border-item-focused-n5kd8g, #0073bb);
|
|
148
148
|
}
|
|
149
|
-
.
|
|
149
|
+
.awsui_breadcrumb_1kosq_1lntj_97.awsui_last_1kosq_1lntj_147 > .awsui_icon_1kosq_1lntj_100:not(#\9) {
|
|
150
150
|
display: none;
|
|
151
151
|
}
|
|
152
|
-
.
|
|
152
|
+
.awsui_breadcrumb_1kosq_1lntj_97.awsui_last_1kosq_1lntj_147 > .awsui_anchor_1kosq_1lntj_104:not(#\9) {
|
|
153
153
|
color: var(--color-text-breadcrumb-current-t6gbyx, #687078);
|
|
154
154
|
text-decoration: none;
|
|
155
155
|
cursor: default;
|
|
156
156
|
pointer-events: none;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
.
|
|
159
|
+
.awsui_compressed_1kosq_1lntj_157:not(#\9) {
|
|
160
160
|
min-width: 0;
|
|
161
161
|
overflow: hidden;
|
|
162
162
|
}
|
|
163
|
-
.
|
|
163
|
+
.awsui_compressed_1kosq_1lntj_157 > .awsui_text_1kosq_1lntj_161:not(#\9) {
|
|
164
164
|
overflow: hidden;
|
|
165
165
|
text-overflow: ellipsis;
|
|
166
166
|
white-space: nowrap;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"link": "
|
|
6
|
-
"breadcrumb": "
|
|
7
|
-
"icon": "
|
|
8
|
-
"anchor": "
|
|
9
|
-
"last": "
|
|
10
|
-
"compressed": "
|
|
11
|
-
"text": "
|
|
5
|
+
"link": "awsui_link_1kosq_1lntj_93",
|
|
6
|
+
"breadcrumb": "awsui_breadcrumb_1kosq_1lntj_97",
|
|
7
|
+
"icon": "awsui_icon_1kosq_1lntj_100",
|
|
8
|
+
"anchor": "awsui_anchor_1kosq_1lntj_104",
|
|
9
|
+
"last": "awsui_last_1kosq_1lntj_147",
|
|
10
|
+
"compressed": "awsui_compressed_1kosq_1lntj_157",
|
|
11
|
+
"text": "awsui_text_1kosq_1lntj_161"
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"breadcrumb-group": "awsui_breadcrumb-
|
|
5
|
-
"item": "
|
|
6
|
-
"breadcrumb-group-list": "awsui_breadcrumb-group-
|
|
7
|
-
"ellipsis": "
|
|
8
|
-
"icon": "
|
|
9
|
-
"mobile": "
|
|
4
|
+
"breadcrumb-group": "awsui_breadcrumb-group_d19fg_gzt6o_93",
|
|
5
|
+
"item": "awsui_item_d19fg_gzt6o_105",
|
|
6
|
+
"breadcrumb-group-list": "awsui_breadcrumb-group-list_d19fg_gzt6o_116",
|
|
7
|
+
"ellipsis": "awsui_ellipsis_d19fg_gzt6o_126",
|
|
8
|
+
"icon": "awsui_icon_d19fg_gzt6o_134",
|
|
9
|
+
"mobile": "awsui_mobile_d19fg_gzt6o_138"
|
|
10
10
|
};
|
|
11
11
|
|
|
@@ -90,7 +90,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.awsui_breadcrumb-
|
|
93
|
+
.awsui_breadcrumb-group_d19fg_gzt6o_93:not(#\9) {
|
|
94
94
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
95
95
|
border-collapse: separate;
|
|
96
96
|
border-spacing: 0;
|
|
@@ -128,7 +128,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
128
128
|
margin: 0;
|
|
129
129
|
padding: var(--space-xxs-ynfts5, 4px) 0;
|
|
130
130
|
}
|
|
131
|
-
.awsui_breadcrumb-
|
|
131
|
+
.awsui_breadcrumb-group_d19fg_gzt6o_93 > .awsui_item_d19fg_gzt6o_105:not(#\9) {
|
|
132
132
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
133
133
|
border-collapse: separate;
|
|
134
134
|
border-spacing: 0;
|
|
@@ -165,7 +165,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
165
165
|
font-family: var(--font-family-base-mylvzb, "Noto Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
166
166
|
display: inline;
|
|
167
167
|
}
|
|
168
|
-
.awsui_breadcrumb-
|
|
168
|
+
.awsui_breadcrumb-group_d19fg_gzt6o_93 > .awsui_breadcrumb-group-list_d19fg_gzt6o_116:not(#\9) {
|
|
169
169
|
display: flex;
|
|
170
170
|
align-items: center;
|
|
171
171
|
padding: 0;
|
|
@@ -174,29 +174,29 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
174
174
|
width: 100%;
|
|
175
175
|
flex-wrap: wrap;
|
|
176
176
|
}
|
|
177
|
-
.awsui_breadcrumb-
|
|
178
|
-
.awsui_breadcrumb-
|
|
177
|
+
.awsui_breadcrumb-group_d19fg_gzt6o_93 > .awsui_breadcrumb-group-list_d19fg_gzt6o_116 > .awsui_item_d19fg_gzt6o_105:not(#\9),
|
|
178
|
+
.awsui_breadcrumb-group_d19fg_gzt6o_93 > .awsui_breadcrumb-group-list_d19fg_gzt6o_116 > .awsui_ellipsis_d19fg_gzt6o_126:not(#\9) {
|
|
179
179
|
display: inline-block;
|
|
180
180
|
padding: 0;
|
|
181
181
|
margin: 0;
|
|
182
182
|
}
|
|
183
|
-
.awsui_breadcrumb-
|
|
183
|
+
.awsui_breadcrumb-group_d19fg_gzt6o_93 > .awsui_breadcrumb-group-list_d19fg_gzt6o_116 > .awsui_ellipsis_d19fg_gzt6o_126:not(#\9) {
|
|
184
184
|
display: none;
|
|
185
185
|
}
|
|
186
|
-
.awsui_breadcrumb-
|
|
186
|
+
.awsui_breadcrumb-group_d19fg_gzt6o_93 > .awsui_breadcrumb-group-list_d19fg_gzt6o_116 > .awsui_ellipsis_d19fg_gzt6o_126 > .awsui_icon_d19fg_gzt6o_134:not(#\9) {
|
|
187
187
|
margin: 0 10px;
|
|
188
|
-
color: var(--color-text-breadcrumb-icon-
|
|
188
|
+
color: var(--color-text-breadcrumb-icon-73h18g, #687078);
|
|
189
189
|
}
|
|
190
|
-
.awsui_breadcrumb-
|
|
190
|
+
.awsui_breadcrumb-group_d19fg_gzt6o_93.awsui_mobile_d19fg_gzt6o_138 > .awsui_breadcrumb-group-list_d19fg_gzt6o_116:not(#\9) {
|
|
191
191
|
flex-wrap: nowrap;
|
|
192
192
|
}
|
|
193
|
-
.awsui_breadcrumb-
|
|
193
|
+
.awsui_breadcrumb-group_d19fg_gzt6o_93.awsui_mobile_d19fg_gzt6o_138 > .awsui_breadcrumb-group-list_d19fg_gzt6o_116 > .awsui_ellipsis_d19fg_gzt6o_126:not(#\9) {
|
|
194
194
|
display: flex;
|
|
195
195
|
flex-shrink: 0;
|
|
196
196
|
}
|
|
197
|
-
.awsui_breadcrumb-
|
|
197
|
+
.awsui_breadcrumb-group_d19fg_gzt6o_93.awsui_mobile_d19fg_gzt6o_138 > .awsui_breadcrumb-group-list_d19fg_gzt6o_116 > .awsui_item_d19fg_gzt6o_105:not(#\9) {
|
|
198
198
|
min-width: 0;
|
|
199
199
|
}
|
|
200
|
-
.awsui_breadcrumb-
|
|
200
|
+
.awsui_breadcrumb-group_d19fg_gzt6o_93.awsui_mobile_d19fg_gzt6o_138 > .awsui_breadcrumb-group-list_d19fg_gzt6o_116 > .awsui_item_d19fg_gzt6o_105:not(#\9):not(:first-child):not(:last-child) {
|
|
201
201
|
display: none;
|
|
202
202
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"breadcrumb-group": "awsui_breadcrumb-
|
|
6
|
-
"item": "
|
|
7
|
-
"breadcrumb-group-list": "awsui_breadcrumb-group-
|
|
8
|
-
"ellipsis": "
|
|
9
|
-
"icon": "
|
|
10
|
-
"mobile": "
|
|
5
|
+
"breadcrumb-group": "awsui_breadcrumb-group_d19fg_gzt6o_93",
|
|
6
|
+
"item": "awsui_item_d19fg_gzt6o_105",
|
|
7
|
+
"breadcrumb-group-list": "awsui_breadcrumb-group-list_d19fg_gzt6o_116",
|
|
8
|
+
"ellipsis": "awsui_ellipsis_d19fg_gzt6o_126",
|
|
9
|
+
"icon": "awsui_icon_d19fg_gzt6o_134",
|
|
10
|
+
"mobile": "awsui_mobile_d19fg_gzt6o_138"
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -10,6 +10,6 @@ interface GridDayProps {
|
|
|
10
10
|
onSelectDate: (date: Date) => void;
|
|
11
11
|
isDateInLastWeek: boolean;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
export
|
|
13
|
+
export default function GridDay({ locale, baseDate, date, selectedDate, focusedDate, isDateEnabled, todayAriaLabel, onSelectDate, isDateInLastWeek, }: GridDayProps): JSX.Element;
|
|
14
|
+
export {};
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/calendar/grid/day/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/calendar/grid/day/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMlE,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,IAAI,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,aAAa,CAAC,EAAE,eAAe,CAAC,qBAAqB,CAAC;IACtD,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,aAAa,EACb,cAAc,EACd,YAAY,EACZ,gBAAgB,GACjB,EAAE,YAAY,eAyCd"}
|
|
@@ -6,7 +6,8 @@ import styles from '../../styles.css.js';
|
|
|
6
6
|
import { isSameDay, isSameMonth } from 'date-fns';
|
|
7
7
|
import { getDateLabel } from '../../utils/intl';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
|
|
9
|
+
import useFocusVisible from '../../../internal/hooks/focus-visible/index.js';
|
|
10
|
+
export default function GridDay(_a) {
|
|
10
11
|
var _b;
|
|
11
12
|
var locale = _a.locale, baseDate = _a.baseDate, date = _a.date, selectedDate = _a.selectedDate, focusedDate = _a.focusedDate, isDateEnabled = _a.isDateEnabled, todayAriaLabel = _a.todayAriaLabel, onSelectDate = _a.onSelectDate, isDateInLastWeek = _a.isDateInLastWeek;
|
|
12
13
|
var labels = [getDateLabel(locale, date)];
|
|
@@ -23,6 +24,7 @@ var GridDay = function (_a) {
|
|
|
23
24
|
_b[styles['calendar-day-today']] = isDateOnSameDay,
|
|
24
25
|
_b[styles['calendar-day-focusable']] = isFocusable && isEnabled,
|
|
25
26
|
_b));
|
|
27
|
+
var focusVisible = useFocusVisible();
|
|
26
28
|
if (isSelected) {
|
|
27
29
|
computedAttributes['aria-current'] = 'date';
|
|
28
30
|
}
|
|
@@ -39,8 +41,7 @@ var GridDay = function (_a) {
|
|
|
39
41
|
if (isFocusable && isEnabled) {
|
|
40
42
|
computedAttributes.tabIndex = 0;
|
|
41
43
|
}
|
|
42
|
-
return (React.createElement("div", __assign({ className: classNames, "aria-label": labels.join('. '), role: "button" }, computedAttributes),
|
|
44
|
+
return (React.createElement("div", __assign({ className: classNames, "aria-label": labels.join('. '), role: "button" }, computedAttributes, focusVisible),
|
|
43
45
|
React.createElement("span", { className: styles['day-inner'] }, date.getDate())));
|
|
44
|
-
}
|
|
45
|
-
export default GridDay;
|
|
46
|
+
}
|
|
46
47
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/calendar/grid/day/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/calendar/grid/day/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,eAAe,MAAM,gDAAg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IAAI,eAAe,EAAE;QACnB,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;KAC7B;IAED,IAAI,SAAS,EAAE;QACb,kBAAkB,CAAC,OAAO,GAAG,cAAM,OAAA,YAAY,CAAC,IAAI,CAAC,EAAlB,CAAkB,CAAC;QACtD,kBAAkB,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;KAClC;SAAM;QACL,kBAAkB,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;KAC5C;IAED,IAAI,WAAW,IAAI,SAAS,EAAE;QAC5B,kBAAkB,CAAC,QAAQ,GAAG,CAAC,CAAC;KACjC;IAED,OAAO,CACL,sCAAK,SAAS,EAAE,UAAU,gBAAc,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAC,QAAQ,IAAK,kBAAkB,EAAM,YAAY;QAC/G,8BAAM,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,IAAG,IAAI,CAAC,OAAO,EAAE,CAAQ,CACzD,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport styles from '../../styles.css.js';\nimport { DatePickerProps } from '../../../date-picker/interfaces';\nimport { isSameDay, isSameMonth } from 'date-fns';\nimport { getDateLabel } from '../../utils/intl';\nimport clsx from 'clsx';\nimport useFocusVisible from '../../../internal/hooks/focus-visible/index.js';\n\ninterface GridDayProps {\n locale: string;\n baseDate: Date;\n date: Date;\n selectedDate?: Date | null;\n focusedDate: Date | null;\n isDateEnabled?: DatePickerProps.IsDateEnabledFunction;\n todayAriaLabel: string;\n onSelectDate: (date: Date) => void;\n isDateInLastWeek: boolean;\n}\n\nexport default function GridDay({\n locale,\n baseDate,\n date,\n selectedDate,\n focusedDate,\n isDateEnabled,\n todayAriaLabel,\n onSelectDate,\n isDateInLastWeek,\n}: GridDayProps) {\n const labels = [getDateLabel(locale, date)];\n const isFocusable = !!focusedDate && isSameDay(date, focusedDate);\n const isSelected = !!selectedDate && isSameDay(date, selectedDate);\n const isEnabled = !isDateEnabled || isDateEnabled(date);\n const isDateOnSameDay = isSameDay(date, new Date());\n const computedAttributes: React.HTMLAttributes<HTMLDivElement> = {};\n const classNames = clsx(styles['calendar-day'], {\n [styles['calendar-day-in-last-week']]: isDateInLastWeek,\n [styles['calendar-day-current-month']]: isSameMonth(date, baseDate),\n [styles['calendar-day-enabled']]: isEnabled,\n [styles['calendar-day-selected']]: isSelected,\n [styles['calendar-day-today']]: isDateOnSameDay,\n [styles['calendar-day-focusable']]: isFocusable && isEnabled,\n });\n const focusVisible = useFocusVisible();\n\n if (isSelected) {\n computedAttributes['aria-current'] = 'date';\n }\n\n if (isDateOnSameDay) {\n labels.push(todayAriaLabel);\n }\n\n if (isEnabled) {\n computedAttributes.onClick = () => onSelectDate(date);\n computedAttributes.tabIndex = -1;\n } else {\n computedAttributes['aria-disabled'] = true;\n }\n\n if (isFocusable && isEnabled) {\n computedAttributes.tabIndex = 0;\n }\n\n return (\n <div className={classNames} aria-label={labels.join('. ')} role=\"button\" {...computedAttributes} {...focusVisible}>\n <span className={styles['day-inner']}>{date.getDate()}</span>\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/calendar/grid/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAI/D,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,IAAI,CAAC;IACf,aAAa,EAAE,eAAe,CAAC,qBAAqB,CAAC;IACrD,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACpC,WAAW,EAAE,QAAQ,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B,eAAe,EAAE,gBAAgB,CAAC;CACnC;AAED,QAAA,MAAM,IAAI,4JAYP,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/calendar/grid/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAI/D,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,IAAI,CAAC;IACf,aAAa,EAAE,eAAe,CAAC,qBAAqB,CAAC;IACrD,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACpC,WAAW,EAAE,QAAQ,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B,eAAe,EAAE,gBAAgB,CAAC;CACnC;AAED,QAAA,MAAM,IAAI,4JAYP,SAAS,gBAmFX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src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AAlB,CAAkB,EACxC,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,GAClC,CACH,CAAC;YACJ,CAAC,CAAC,CACE,CACP,CAAC;QACJ,CAAC,CAAC,CACE,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo } from 'react';\nimport styles from '../styles.css.js';\nimport GridDay from './day';\nimport { KeyCode } from '../../internal/keycode';\nimport { addDays, addWeeks, isSameMonth } from 'date-fns';\nimport { getCalendarMonth } from 'mnth';\nimport { DayIndex } from '../internal';\nimport { MoveFocusHandler } from '../utils/move-focus-handler';\nimport { DatePickerProps } from '../../date-picker/interfaces';\nimport rotateDayIndexes from '../utils/rotate-day-indexes';\nimport { renderDayName } from '../utils/intl';\n\nexport interface GridProps {\n locale: string;\n baseDate: Date;\n isDateEnabled: DatePickerProps.IsDateEnabledFunction;\n focusedDate: Date | null;\n onSelectDate: (date: Date) => void;\n onFocusDate: (date: null | Date) => void;\n onChangeMonth: (date: Date) => void;\n startOfWeek: DayIndex;\n todayAriaLabel: string;\n selectedDate: Date | null;\n handleFocusMove: MoveFocusHandler;\n}\n\nconst Grid = ({\n locale,\n baseDate,\n isDateEnabled,\n focusedDate,\n onSelectDate,\n onFocusDate,\n onChangeMonth,\n startOfWeek,\n todayAriaLabel,\n selectedDate,\n handleFocusMove,\n}: GridProps) => {\n const onGridKeyDownHandler = (event: React.KeyboardEvent) => {\n let updatedFocusDate;\n\n if (focusedDate === null) {\n return;\n }\n\n switch (event.keyCode) {\n case KeyCode.enter:\n event.preventDefault();\n if (focusedDate) {\n onFocusDate(null);\n onSelectDate(focusedDate);\n }\n return;\n case KeyCode.right:\n event.preventDefault();\n updatedFocusDate = handleFocusMove(focusedDate, isDateEnabled, date => addDays(date, 1));\n break;\n case KeyCode.left:\n event.preventDefault();\n updatedFocusDate = handleFocusMove(focusedDate, isDateEnabled, date => addDays(date, -1));\n break;\n case KeyCode.up:\n event.preventDefault();\n updatedFocusDate = handleFocusMove(focusedDate, isDateEnabled, date => addWeeks(date, -1));\n break;\n case KeyCode.down:\n event.preventDefault();\n updatedFocusDate = handleFocusMove(focusedDate, isDateEnabled, date => addWeeks(date, 1));\n break;\n default:\n return;\n }\n\n if (!isSameMonth(updatedFocusDate, baseDate)) {\n onChangeMonth(updatedFocusDate);\n }\n onFocusDate(updatedFocusDate);\n };\n\n const weeks = useMemo<Date[][]>(\n () => getCalendarMonth(baseDate, { firstDayOfWeek: startOfWeek }),\n [baseDate, startOfWeek]\n );\n\n return (\n <div>\n <div className={styles['calendar-day-names']}>\n {rotateDayIndexes(startOfWeek).map(i => (\n <div key={`day-name-${i}`} className={styles['calendar-day-name']}>\n {renderDayName(locale, i)}\n </div>\n ))}\n </div>\n <div className={styles['calendar-dates']} onKeyDown={onGridKeyDownHandler}>\n {weeks.map((week, weekIndex) => {\n const isDateInLastWeek = weeks.length - 1 === weekIndex;\n return (\n <div key={`week-${weekIndex}`} className={styles['calendar-week']}>\n {week.map((date, dateIndex) => {\n return (\n <GridDay\n key={`date-${weekIndex}-${dateIndex}`}\n locale={locale}\n baseDate={baseDate}\n selectedDate={selectedDate}\n date={date}\n focusedDate={focusedDate}\n todayAriaLabel={todayAriaLabel}\n onSelectDate={date => onSelectDate(date)}\n isDateEnabled={isDateEnabled}\n isDateInLastWeek={isDateInLastWeek}\n />\n );\n })}\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n\nexport default Grid;\n"]}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"calendar": "
|
|
5
|
-
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-
|
|
6
|
-
"root": "
|
|
7
|
-
"calendar-inner": "awsui_calendar-
|
|
8
|
-
"calendar-header": "awsui_calendar-
|
|
9
|
-
"calendar-header-month": "awsui_calendar-header-
|
|
10
|
-
"calendar-next-month-btn": "awsui_calendar-next-month-
|
|
11
|
-
"calendar-prev-month-btn": "awsui_calendar-prev-month-
|
|
12
|
-
"calendar-day-names": "awsui_calendar-day-
|
|
13
|
-
"calendar-day-name": "awsui_calendar-day-
|
|
14
|
-
"calendar-dates": "awsui_calendar-
|
|
15
|
-
"calendar-week": "awsui_calendar-
|
|
16
|
-
"calendar-day": "awsui_calendar-
|
|
17
|
-
"calendar-day-in-last-week": "awsui_calendar-day-in-last-
|
|
18
|
-
"calendar-day-focusable": "awsui_calendar-day-
|
|
19
|
-
"calendar-day-enabled": "awsui_calendar-day-
|
|
20
|
-
"calendar-day-current-month": "awsui_calendar-day-current-
|
|
21
|
-
"calendar-day-selected": "awsui_calendar-day-
|
|
22
|
-
"calendar-day-today": "awsui_calendar-day-
|
|
23
|
-
"day-inner": "awsui_day-
|
|
4
|
+
"calendar": "awsui_calendar_1ykar_5qnhi_93",
|
|
5
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_1ykar_5qnhi_1",
|
|
6
|
+
"root": "awsui_root_1ykar_5qnhi_120",
|
|
7
|
+
"calendar-inner": "awsui_calendar-inner_1ykar_5qnhi_137",
|
|
8
|
+
"calendar-header": "awsui_calendar-header_1ykar_5qnhi_140",
|
|
9
|
+
"calendar-header-month": "awsui_calendar-header-month_1ykar_5qnhi_145",
|
|
10
|
+
"calendar-next-month-btn": "awsui_calendar-next-month-btn_1ykar_5qnhi_151",
|
|
11
|
+
"calendar-prev-month-btn": "awsui_calendar-prev-month-btn_1ykar_5qnhi_154",
|
|
12
|
+
"calendar-day-names": "awsui_calendar-day-names_1ykar_5qnhi_157",
|
|
13
|
+
"calendar-day-name": "awsui_calendar-day-name_1ykar_5qnhi_157",
|
|
14
|
+
"calendar-dates": "awsui_calendar-dates_1ykar_5qnhi_172",
|
|
15
|
+
"calendar-week": "awsui_calendar-week_1ykar_5qnhi_175",
|
|
16
|
+
"calendar-day": "awsui_calendar-day_1ykar_5qnhi_157",
|
|
17
|
+
"calendar-day-in-last-week": "awsui_calendar-day-in-last-week_1ykar_5qnhi_193",
|
|
18
|
+
"calendar-day-focusable": "awsui_calendar-day-focusable_1ykar_5qnhi_196",
|
|
19
|
+
"calendar-day-enabled": "awsui_calendar-day-enabled_1ykar_5qnhi_199",
|
|
20
|
+
"calendar-day-current-month": "awsui_calendar-day-current-month_1ykar_5qnhi_206",
|
|
21
|
+
"calendar-day-selected": "awsui_calendar-day-selected_1ykar_5qnhi_213",
|
|
22
|
+
"calendar-day-today": "awsui_calendar-day-today_1ykar_5qnhi_216",
|
|
23
|
+
"day-inner": "awsui_day-inner_1ykar_5qnhi_230"
|
|
24
24
|
};
|
|
25
25
|
|