@cloudscape-design/components 3.0.70 → 3.0.72
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/calendar/styles.css.js +20 -20
- package/calendar/styles.scoped.css +45 -41
- package/calendar/styles.selectors.js +20 -20
- package/date-range-picker/calendar/grids/day/styles.css.js +21 -21
- package/date-range-picker/calendar/grids/day/styles.scoped.css +42 -38
- package/date-range-picker/calendar/grids/day/styles.selectors.js +21 -21
- package/internal/environment.js +1 -1
- package/package.json +1 -1
- package/property-filter/index.d.ts.map +1 -1
- package/property-filter/index.js +4 -1
- package/property-filter/index.js.map +1 -1
package/calendar/styles.css.js
CHANGED
|
@@ -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_eulmr_93",
|
|
5
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_1ykar_eulmr_1",
|
|
6
|
+
"root": "awsui_root_1ykar_eulmr_124",
|
|
7
|
+
"calendar-inner": "awsui_calendar-inner_1ykar_eulmr_141",
|
|
8
|
+
"calendar-header": "awsui_calendar-header_1ykar_eulmr_144",
|
|
9
|
+
"calendar-header-month": "awsui_calendar-header-month_1ykar_eulmr_149",
|
|
10
|
+
"calendar-next-month-btn": "awsui_calendar-next-month-btn_1ykar_eulmr_155",
|
|
11
|
+
"calendar-prev-month-btn": "awsui_calendar-prev-month-btn_1ykar_eulmr_158",
|
|
12
|
+
"calendar-day-names": "awsui_calendar-day-names_1ykar_eulmr_161",
|
|
13
|
+
"calendar-day-name": "awsui_calendar-day-name_1ykar_eulmr_161",
|
|
14
|
+
"calendar-dates": "awsui_calendar-dates_1ykar_eulmr_176",
|
|
15
|
+
"calendar-week": "awsui_calendar-week_1ykar_eulmr_179",
|
|
16
|
+
"calendar-day": "awsui_calendar-day_1ykar_eulmr_161",
|
|
17
|
+
"calendar-day-in-last-week": "awsui_calendar-day-in-last-week_1ykar_eulmr_197",
|
|
18
|
+
"calendar-day-focusable": "awsui_calendar-day-focusable_1ykar_eulmr_200",
|
|
19
|
+
"calendar-day-enabled": "awsui_calendar-day-enabled_1ykar_eulmr_203",
|
|
20
|
+
"calendar-day-current-month": "awsui_calendar-day-current-month_1ykar_eulmr_210",
|
|
21
|
+
"calendar-day-selected": "awsui_calendar-day-selected_1ykar_eulmr_217",
|
|
22
|
+
"calendar-day-today": "awsui_calendar-day-today_1ykar_eulmr_220",
|
|
23
|
+
"day-inner": "awsui_day-inner_1ykar_eulmr_234"
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -90,11 +90,11 @@ 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
|
-
.
|
|
94
|
-
animation: awsui_awsui-motion-fade-in-
|
|
93
|
+
.awsui_calendar_1ykar_eulmr_93:not(#\9) {
|
|
94
|
+
animation: awsui_awsui-motion-fade-in-0_1ykar_eulmr_1 var(--motion-duration-show-quick-tyaalm, 135ms) var(--motion-easing-show-quick-1fcgbv, ease-out);
|
|
95
95
|
animation-fill-mode: both;
|
|
96
96
|
}
|
|
97
|
-
@keyframes awsui_awsui-motion-fade-in-
|
|
97
|
+
@keyframes awsui_awsui-motion-fade-in-0_1ykar_eulmr_1 {
|
|
98
98
|
from {
|
|
99
99
|
opacity: 0;
|
|
100
100
|
}
|
|
@@ -103,12 +103,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
@media (prefers-reduced-motion: reduce) {
|
|
106
|
-
.
|
|
106
|
+
.awsui_calendar_1ykar_eulmr_93:not(#\9) {
|
|
107
107
|
animation: none;
|
|
108
108
|
transition: none;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
.awsui-motion-disabled .
|
|
111
|
+
.awsui-motion-disabled .awsui_calendar_1ykar_eulmr_93:not(#\9), .awsui-mode-entering .awsui_calendar_1ykar_eulmr_93:not(#\9) {
|
|
112
112
|
animation: none;
|
|
113
113
|
transition: none;
|
|
114
114
|
}
|
|
@@ -117,13 +117,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
117
117
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
118
118
|
SPDX-License-Identifier: Apache-2.0
|
|
119
119
|
*/
|
|
120
|
-
|
|
120
|
+
/*
|
|
121
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
122
|
+
SPDX-License-Identifier: Apache-2.0
|
|
123
|
+
*/
|
|
124
|
+
.awsui_root_1ykar_eulmr_124:not(#\9) {
|
|
121
125
|
/* used in test-utils */
|
|
122
126
|
}
|
|
123
127
|
|
|
124
|
-
.
|
|
128
|
+
.awsui_calendar_1ykar_eulmr_93:not(#\9) {
|
|
125
129
|
display: block;
|
|
126
|
-
width:
|
|
130
|
+
width: var(--size-calendar-grid-width-lxsx0p, 238px);
|
|
127
131
|
overflow: auto;
|
|
128
132
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
129
133
|
border-collapse: separate;
|
|
@@ -160,31 +164,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
160
164
|
font-weight: 400;
|
|
161
165
|
font-family: var(--font-family-base-qnistn, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
162
166
|
}
|
|
163
|
-
.awsui_calendar-
|
|
167
|
+
.awsui_calendar-inner_1ykar_eulmr_141:not(#\9) {
|
|
164
168
|
margin: var(--space-xs-rsr2qu, 8px);
|
|
165
169
|
}
|
|
166
|
-
.awsui_calendar-
|
|
170
|
+
.awsui_calendar-header_1ykar_eulmr_144:not(#\9) {
|
|
167
171
|
display: flex;
|
|
168
172
|
justify-content: space-between;
|
|
169
173
|
align-items: center;
|
|
170
174
|
}
|
|
171
|
-
.awsui_calendar-header-
|
|
175
|
+
.awsui_calendar-header-month_1ykar_eulmr_149:not(#\9) {
|
|
172
176
|
font-size: var(--font-body-m-size-sregvd, 14px);
|
|
173
177
|
line-height: var(--font-body-m-line-height-i7xxvv, 22px);
|
|
174
178
|
font-weight: 700;
|
|
175
179
|
color: var(--color-text-dropdown-item-default-7tg9p2, #000716);
|
|
176
180
|
}
|
|
177
|
-
.awsui_calendar-next-month-
|
|
181
|
+
.awsui_calendar-next-month-btn_1ykar_eulmr_155:not(#\9) {
|
|
178
182
|
/* used for identifying element */
|
|
179
183
|
}
|
|
180
|
-
.awsui_calendar-prev-month-
|
|
184
|
+
.awsui_calendar-prev-month-btn_1ykar_eulmr_158:not(#\9) {
|
|
181
185
|
/* used for identifying element */
|
|
182
186
|
}
|
|
183
|
-
.awsui_calendar-day-
|
|
187
|
+
.awsui_calendar-day-names_1ykar_eulmr_161:not(#\9) {
|
|
184
188
|
display: flex;
|
|
185
189
|
justify-content: stretch;
|
|
186
190
|
}
|
|
187
|
-
.awsui_calendar-day-
|
|
191
|
+
.awsui_calendar-day-name_1ykar_eulmr_161:not(#\9) {
|
|
188
192
|
flex: 1 1 0%;
|
|
189
193
|
width: 0;
|
|
190
194
|
word-break: break-word;
|
|
@@ -195,14 +199,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
195
199
|
line-height: var(--font-body-s-line-height-kdsbrl, 16px);
|
|
196
200
|
letter-spacing: var(--font-body-s-letter-spacing-cy0oxj, 0.005em);
|
|
197
201
|
}
|
|
198
|
-
.awsui_calendar-
|
|
202
|
+
.awsui_calendar-dates_1ykar_eulmr_176:not(#\9) {
|
|
199
203
|
border: 1px solid var(--color-border-calendar-grid-sshunw, transparent);
|
|
200
204
|
}
|
|
201
|
-
.awsui_calendar-
|
|
205
|
+
.awsui_calendar-week_1ykar_eulmr_179:not(#\9) {
|
|
202
206
|
display: flex;
|
|
203
207
|
justify-content: stretch;
|
|
204
208
|
}
|
|
205
|
-
.awsui_calendar-
|
|
209
|
+
.awsui_calendar-day_1ykar_eulmr_161:not(#\9) {
|
|
206
210
|
flex: 1 1 0%;
|
|
207
211
|
width: 0;
|
|
208
212
|
word-break: break-word;
|
|
@@ -213,37 +217,37 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
213
217
|
color: var(--color-text-dropdown-item-disabled-varol7, #9ba7b6);
|
|
214
218
|
position: relative;
|
|
215
219
|
}
|
|
216
|
-
.awsui_calendar-
|
|
220
|
+
.awsui_calendar-day_1ykar_eulmr_161:not(#\9):last-child {
|
|
217
221
|
border-right: none;
|
|
218
222
|
}
|
|
219
|
-
.awsui_calendar-day-in-last-
|
|
223
|
+
.awsui_calendar-day-in-last-week_1ykar_eulmr_197:not(#\9) {
|
|
220
224
|
border-bottom: none;
|
|
221
225
|
}
|
|
222
|
-
.awsui_calendar-day-
|
|
226
|
+
.awsui_calendar-day-focusable_1ykar_eulmr_200:not(#\9) {
|
|
223
227
|
/* used for identifying element */
|
|
224
228
|
}
|
|
225
|
-
.awsui_calendar-day-
|
|
229
|
+
.awsui_calendar-day-enabled_1ykar_eulmr_203:not(#\9) {
|
|
226
230
|
cursor: pointer;
|
|
227
231
|
color: var(--color-text-dropdown-item-secondary-0me7js, #5f6b7a);
|
|
228
232
|
}
|
|
229
|
-
.awsui_calendar-day-
|
|
233
|
+
.awsui_calendar-day-enabled_1ykar_eulmr_203:not(#\9)::after {
|
|
230
234
|
border-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
231
235
|
}
|
|
232
|
-
.awsui_calendar-day-
|
|
236
|
+
.awsui_calendar-day-enabled_1ykar_eulmr_203.awsui_calendar-day-current-month_1ykar_eulmr_210:not(#\9) {
|
|
233
237
|
color: var(--color-text-dropdown-item-default-7tg9p2, #000716);
|
|
234
238
|
}
|
|
235
|
-
.awsui_calendar-day-
|
|
239
|
+
.awsui_calendar-day-enabled_1ykar_eulmr_203.awsui_calendar-day-current-month_1ykar_eulmr_210:not(#\9):hover {
|
|
236
240
|
color: var(--color-text-calendar-day-hover-graajh, #000716);
|
|
237
241
|
background-color: var(--color-background-dropdown-item-hover-mqsxkv, #f4f4f4);
|
|
238
242
|
}
|
|
239
|
-
.awsui_calendar-day-
|
|
243
|
+
.awsui_calendar-day-enabled_1ykar_eulmr_203.awsui_calendar-day-current-month_1ykar_eulmr_210:not(#\9):hover:not(.awsui_calendar-day-selected_1ykar_eulmr_217)::after {
|
|
240
244
|
border: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-dropdown-item-hover-tyzq9m, #7d8998);
|
|
241
245
|
}
|
|
242
|
-
.awsui_calendar-day-
|
|
246
|
+
.awsui_calendar-day-today_1ykar_eulmr_220:not(#\9) {
|
|
243
247
|
background-color: var(--color-background-calendar-today-762czq, #f4f4f4);
|
|
244
248
|
border-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
245
249
|
}
|
|
246
|
-
.awsui_calendar-
|
|
250
|
+
.awsui_calendar-day_1ykar_eulmr_161:not(#\9)::after {
|
|
247
251
|
content: "";
|
|
248
252
|
position: absolute;
|
|
249
253
|
z-index: 1;
|
|
@@ -253,21 +257,21 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
253
257
|
right: calc(-1 * var(--border-item-width-qbbbsa, 2px));
|
|
254
258
|
background-color: transparent;
|
|
255
259
|
}
|
|
256
|
-
.awsui_calendar-
|
|
260
|
+
.awsui_calendar-day_1ykar_eulmr_161 > .awsui_day-inner_1ykar_eulmr_234:not(#\9) {
|
|
257
261
|
position: relative;
|
|
258
262
|
z-index: 1;
|
|
259
263
|
}
|
|
260
|
-
.awsui_calendar-
|
|
264
|
+
.awsui_calendar-day_1ykar_eulmr_161:not(#\9):focus {
|
|
261
265
|
outline: none;
|
|
262
266
|
}
|
|
263
|
-
.awsui_calendar-
|
|
267
|
+
.awsui_calendar-day_1ykar_eulmr_161:not(#\9):focus[data-awsui-focus-visible=true]:focus {
|
|
264
268
|
position: relative;
|
|
265
269
|
}
|
|
266
|
-
.awsui_calendar-
|
|
270
|
+
.awsui_calendar-day_1ykar_eulmr_161:not(#\9):focus[data-awsui-focus-visible=true]:focus {
|
|
267
271
|
outline: 2px dotted transparent;
|
|
268
272
|
outline-offset: calc(var(--space-calendar-grid-focus-outline-gutter-v3dwvl, -5px) - 1px);
|
|
269
273
|
}
|
|
270
|
-
.awsui_calendar-
|
|
274
|
+
.awsui_calendar-day_1ykar_eulmr_161:not(#\9):focus[data-awsui-focus-visible=true]:focus::before {
|
|
271
275
|
content: " ";
|
|
272
276
|
display: block;
|
|
273
277
|
position: absolute;
|
|
@@ -278,22 +282,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
278
282
|
border-radius: var(--border-radius-calendar-day-focus-ring-a8mlqd, 3px);
|
|
279
283
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
280
284
|
}
|
|
281
|
-
.awsui_calendar-
|
|
285
|
+
.awsui_calendar-day_1ykar_eulmr_161:not(#\9):focus[data-awsui-focus-visible=true]:focus::before {
|
|
282
286
|
z-index: 2;
|
|
283
287
|
}
|
|
284
|
-
.awsui_calendar-day-
|
|
288
|
+
.awsui_calendar-day-selected_1ykar_eulmr_217:not(#\9) {
|
|
285
289
|
border-color: transparent;
|
|
286
290
|
position: relative;
|
|
287
291
|
z-index: 2;
|
|
288
292
|
}
|
|
289
|
-
.awsui_calendar-day-
|
|
293
|
+
.awsui_calendar-day-selected_1ykar_eulmr_217:not(#\9):focus[data-awsui-focus-visible=true]:focus {
|
|
290
294
|
position: relative;
|
|
291
295
|
}
|
|
292
|
-
.awsui_calendar-day-
|
|
296
|
+
.awsui_calendar-day-selected_1ykar_eulmr_217:not(#\9):focus[data-awsui-focus-visible=true]:focus {
|
|
293
297
|
outline: 2px dotted transparent;
|
|
294
298
|
outline-offset: calc(var(--space-calendar-grid-focus-outline-gutter-v3dwvl, -5px) - 1px);
|
|
295
299
|
}
|
|
296
|
-
.awsui_calendar-day-
|
|
300
|
+
.awsui_calendar-day-selected_1ykar_eulmr_217:not(#\9):focus[data-awsui-focus-visible=true]:focus::before {
|
|
297
301
|
content: " ";
|
|
298
302
|
display: block;
|
|
299
303
|
position: absolute;
|
|
@@ -304,15 +308,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
304
308
|
border-radius: var(--border-radius-calendar-day-focus-ring-a8mlqd, 3px);
|
|
305
309
|
box-shadow: 0 0 0 2px var(--color-border-calendar-grid-selected-focus-ring-cxqa0s, #fbfbfb);
|
|
306
310
|
}
|
|
307
|
-
.awsui_calendar-day-
|
|
311
|
+
.awsui_calendar-day-selected_1ykar_eulmr_217:not(#\9):focus[data-awsui-focus-visible=true]:focus::before {
|
|
308
312
|
z-index: 2;
|
|
309
313
|
}
|
|
310
|
-
.awsui_calendar-day-
|
|
314
|
+
.awsui_calendar-day-selected_1ykar_eulmr_217:not(#\9)::after {
|
|
311
315
|
background-color: var(--color-background-control-checked-9admlu, #0972d3);
|
|
312
316
|
border: var(--border-item-width-qbbbsa, 2px) solid var(--color-background-control-checked-9admlu, #0972d3);
|
|
313
317
|
border-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
314
318
|
}
|
|
315
|
-
.awsui_calendar-day-
|
|
319
|
+
.awsui_calendar-day-selected_1ykar_eulmr_217 > .awsui_day-inner_1ykar_eulmr_234:not(#\9) {
|
|
316
320
|
z-index: 2;
|
|
317
321
|
color: var(--color-background-control-default-4pa05r, #ffffff);
|
|
318
322
|
position: relative;
|
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"calendar": "
|
|
6
|
-
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-
|
|
7
|
-
"root": "
|
|
8
|
-
"calendar-inner": "awsui_calendar-
|
|
9
|
-
"calendar-header": "awsui_calendar-
|
|
10
|
-
"calendar-header-month": "awsui_calendar-header-
|
|
11
|
-
"calendar-next-month-btn": "awsui_calendar-next-month-
|
|
12
|
-
"calendar-prev-month-btn": "awsui_calendar-prev-month-
|
|
13
|
-
"calendar-day-names": "awsui_calendar-day-
|
|
14
|
-
"calendar-day-name": "awsui_calendar-day-
|
|
15
|
-
"calendar-dates": "awsui_calendar-
|
|
16
|
-
"calendar-week": "awsui_calendar-
|
|
17
|
-
"calendar-day": "awsui_calendar-
|
|
18
|
-
"calendar-day-in-last-week": "awsui_calendar-day-in-last-
|
|
19
|
-
"calendar-day-focusable": "awsui_calendar-day-
|
|
20
|
-
"calendar-day-enabled": "awsui_calendar-day-
|
|
21
|
-
"calendar-day-current-month": "awsui_calendar-day-current-
|
|
22
|
-
"calendar-day-selected": "awsui_calendar-day-
|
|
23
|
-
"calendar-day-today": "awsui_calendar-day-
|
|
24
|
-
"day-inner": "awsui_day-
|
|
5
|
+
"calendar": "awsui_calendar_1ykar_eulmr_93",
|
|
6
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_1ykar_eulmr_1",
|
|
7
|
+
"root": "awsui_root_1ykar_eulmr_124",
|
|
8
|
+
"calendar-inner": "awsui_calendar-inner_1ykar_eulmr_141",
|
|
9
|
+
"calendar-header": "awsui_calendar-header_1ykar_eulmr_144",
|
|
10
|
+
"calendar-header-month": "awsui_calendar-header-month_1ykar_eulmr_149",
|
|
11
|
+
"calendar-next-month-btn": "awsui_calendar-next-month-btn_1ykar_eulmr_155",
|
|
12
|
+
"calendar-prev-month-btn": "awsui_calendar-prev-month-btn_1ykar_eulmr_158",
|
|
13
|
+
"calendar-day-names": "awsui_calendar-day-names_1ykar_eulmr_161",
|
|
14
|
+
"calendar-day-name": "awsui_calendar-day-name_1ykar_eulmr_161",
|
|
15
|
+
"calendar-dates": "awsui_calendar-dates_1ykar_eulmr_176",
|
|
16
|
+
"calendar-week": "awsui_calendar-week_1ykar_eulmr_179",
|
|
17
|
+
"calendar-day": "awsui_calendar-day_1ykar_eulmr_161",
|
|
18
|
+
"calendar-day-in-last-week": "awsui_calendar-day-in-last-week_1ykar_eulmr_197",
|
|
19
|
+
"calendar-day-focusable": "awsui_calendar-day-focusable_1ykar_eulmr_200",
|
|
20
|
+
"calendar-day-enabled": "awsui_calendar-day-enabled_1ykar_eulmr_203",
|
|
21
|
+
"calendar-day-current-month": "awsui_calendar-day-current-month_1ykar_eulmr_210",
|
|
22
|
+
"calendar-day-selected": "awsui_calendar-day-selected_1ykar_eulmr_217",
|
|
23
|
+
"calendar-day-today": "awsui_calendar-day-today_1ykar_eulmr_220",
|
|
24
|
+
"day-inner": "awsui_day-inner_1ykar_eulmr_234"
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"day": "
|
|
5
|
-
"day-inner": "awsui_day-
|
|
6
|
-
"in-first-row": "awsui_in-first-
|
|
7
|
-
"in-previous-month": "awsui_in-previous-
|
|
8
|
-
"last-day-of-month": "awsui_last-day-of-
|
|
9
|
-
"in-next-month": "awsui_in-next-
|
|
10
|
-
"in-first-column": "awsui_in-first-
|
|
11
|
-
"in-current-month": "awsui_in-current-
|
|
12
|
-
"enabled": "
|
|
13
|
-
"in-range": "awsui_in-
|
|
14
|
-
"end-date": "awsui_end-
|
|
15
|
-
"start-date": "awsui_start-
|
|
16
|
-
"no-range": "awsui_no-
|
|
17
|
-
"selected": "
|
|
18
|
-
"today": "
|
|
19
|
-
"range-start-date": "awsui_range-start-
|
|
20
|
-
"in-range-border-bottom": "awsui_in-range-border-
|
|
21
|
-
"range-end-date": "awsui_range-end-
|
|
22
|
-
"in-range-border-top": "awsui_in-range-border-
|
|
23
|
-
"in-range-border-right": "awsui_in-range-border-
|
|
24
|
-
"in-range-border-left": "awsui_in-range-border-
|
|
4
|
+
"day": "awsui_day_vci2l_1wzz4_97",
|
|
5
|
+
"day-inner": "awsui_day-inner_vci2l_1wzz4_140",
|
|
6
|
+
"in-first-row": "awsui_in-first-row_vci2l_1wzz4_145",
|
|
7
|
+
"in-previous-month": "awsui_in-previous-month_vci2l_1wzz4_145",
|
|
8
|
+
"last-day-of-month": "awsui_last-day-of-month_vci2l_1wzz4_149",
|
|
9
|
+
"in-next-month": "awsui_in-next-month_vci2l_1wzz4_153",
|
|
10
|
+
"in-first-column": "awsui_in-first-column_vci2l_1wzz4_157",
|
|
11
|
+
"in-current-month": "awsui_in-current-month_vci2l_1wzz4_160",
|
|
12
|
+
"enabled": "awsui_enabled_vci2l_1wzz4_164",
|
|
13
|
+
"in-range": "awsui_in-range_vci2l_1wzz4_170",
|
|
14
|
+
"end-date": "awsui_end-date_vci2l_1wzz4_170",
|
|
15
|
+
"start-date": "awsui_start-date_vci2l_1wzz4_170",
|
|
16
|
+
"no-range": "awsui_no-range_vci2l_1wzz4_170",
|
|
17
|
+
"selected": "awsui_selected_vci2l_1wzz4_177",
|
|
18
|
+
"today": "awsui_today_vci2l_1wzz4_181",
|
|
19
|
+
"range-start-date": "awsui_range-start-date_vci2l_1wzz4_217",
|
|
20
|
+
"in-range-border-bottom": "awsui_in-range-border-bottom_vci2l_1wzz4_220",
|
|
21
|
+
"range-end-date": "awsui_range-end-date_vci2l_1wzz4_223",
|
|
22
|
+
"in-range-border-top": "awsui_in-range-border-top_vci2l_1wzz4_226",
|
|
23
|
+
"in-range-border-right": "awsui_in-range-border-right_vci2l_1wzz4_241",
|
|
24
|
+
"in-range-border-left": "awsui_in-range-border-left_vci2l_1wzz4_247"
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -90,7 +90,11 @@ 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
|
+
/*
|
|
94
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
|
+
SPDX-License-Identifier: Apache-2.0
|
|
96
|
+
*/
|
|
97
|
+
.awsui_day_vci2l_1wzz4_97:not(#\9) {
|
|
94
98
|
flex: 1 1 0%;
|
|
95
99
|
width: 0;
|
|
96
100
|
word-break: break-word;
|
|
@@ -101,10 +105,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
101
105
|
color: var(--color-text-dropdown-item-disabled-varol7, #9ba7b6);
|
|
102
106
|
position: relative;
|
|
103
107
|
}
|
|
104
|
-
.
|
|
108
|
+
.awsui_day_vci2l_1wzz4_97:not(#\9):focus {
|
|
105
109
|
outline: none;
|
|
106
110
|
}
|
|
107
|
-
.
|
|
111
|
+
.awsui_day_vci2l_1wzz4_97:not(#\9)::after {
|
|
108
112
|
content: "";
|
|
109
113
|
position: absolute;
|
|
110
114
|
z-index: 1;
|
|
@@ -114,15 +118,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
114
118
|
right: calc(-1 * var(--border-item-width-qbbbsa, 2px));
|
|
115
119
|
background-color: transparent;
|
|
116
120
|
}
|
|
117
|
-
.
|
|
121
|
+
.awsui_day_vci2l_1wzz4_97[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
118
122
|
z-index: 2;
|
|
119
123
|
position: relative;
|
|
120
124
|
}
|
|
121
|
-
.
|
|
125
|
+
.awsui_day_vci2l_1wzz4_97[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
122
126
|
outline: 2px dotted transparent;
|
|
123
127
|
outline-offset: calc(var(--space-calendar-grid-focus-outline-gutter-v3dwvl, -5px) - 1px);
|
|
124
128
|
}
|
|
125
|
-
.
|
|
129
|
+
.awsui_day_vci2l_1wzz4_97[data-awsui-focus-visible=true]:not(#\9):focus::before {
|
|
126
130
|
content: " ";
|
|
127
131
|
display: block;
|
|
128
132
|
position: absolute;
|
|
@@ -133,65 +137,65 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
133
137
|
border-radius: var(--border-radius-calendar-day-focus-ring-a8mlqd, 3px);
|
|
134
138
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
135
139
|
}
|
|
136
|
-
.
|
|
140
|
+
.awsui_day_vci2l_1wzz4_97 > .awsui_day-inner_vci2l_1wzz4_140:not(#\9) {
|
|
137
141
|
position: relative;
|
|
138
142
|
z-index: 1;
|
|
139
143
|
}
|
|
140
144
|
|
|
141
|
-
.awsui_in-first-
|
|
145
|
+
.awsui_in-first-row_vci2l_1wzz4_145:not(#\9):not(.awsui_in-previous-month_vci2l_1wzz4_145) {
|
|
142
146
|
border-top: 1px solid var(--color-border-calendar-grid-sshunw, transparent);
|
|
143
147
|
}
|
|
144
148
|
|
|
145
|
-
.awsui_in-previous-
|
|
149
|
+
.awsui_in-previous-month_vci2l_1wzz4_145:not(#\9):not(.awsui_last-day-of-month_vci2l_1wzz4_149) {
|
|
146
150
|
border-right-color: transparent;
|
|
147
151
|
}
|
|
148
152
|
|
|
149
|
-
.awsui_in-next-
|
|
153
|
+
.awsui_in-next-month_vci2l_1wzz4_153:not(#\9) {
|
|
150
154
|
border-color: transparent;
|
|
151
155
|
}
|
|
152
156
|
|
|
153
|
-
.awsui_in-first-
|
|
157
|
+
.awsui_in-first-column_vci2l_1wzz4_157:not(#\9) {
|
|
154
158
|
border-left: 1px solid transparent;
|
|
155
159
|
}
|
|
156
|
-
.awsui_in-first-
|
|
160
|
+
.awsui_in-first-column_vci2l_1wzz4_157.awsui_in-current-month_vci2l_1wzz4_160:not(#\9) {
|
|
157
161
|
border-left: 1px solid var(--color-border-calendar-grid-sshunw, transparent);
|
|
158
162
|
}
|
|
159
163
|
|
|
160
|
-
.
|
|
164
|
+
.awsui_enabled_vci2l_1wzz4_164:not(#\9) {
|
|
161
165
|
cursor: pointer;
|
|
162
166
|
}
|
|
163
|
-
.
|
|
167
|
+
.awsui_enabled_vci2l_1wzz4_164.awsui_in-current-month_vci2l_1wzz4_160:not(#\9) {
|
|
164
168
|
color: var(--color-text-dropdown-item-default-7tg9p2, #000716);
|
|
165
169
|
}
|
|
166
|
-
.
|
|
170
|
+
.awsui_enabled_vci2l_1wzz4_164.awsui_in-current-month_vci2l_1wzz4_160:not(#\9):not(.awsui_in-range_vci2l_1wzz4_170), .awsui_enabled_vci2l_1wzz4_164.awsui_in-current-month_vci2l_1wzz4_160:not(#\9):not(.awsui_in-range_vci2l_1wzz4_170)::after, .awsui_enabled_vci2l_1wzz4_164.awsui_in-current-month_vci2l_1wzz4_160.awsui_end-date_vci2l_1wzz4_170.awsui_start-date_vci2l_1wzz4_170:not(#\9), .awsui_enabled_vci2l_1wzz4_164.awsui_in-current-month_vci2l_1wzz4_160.awsui_end-date_vci2l_1wzz4_170.awsui_start-date_vci2l_1wzz4_170:not(#\9)::after, .awsui_enabled_vci2l_1wzz4_164.awsui_in-current-month_vci2l_1wzz4_160.awsui_no-range_vci2l_1wzz4_170:not(#\9), .awsui_enabled_vci2l_1wzz4_164.awsui_in-current-month_vci2l_1wzz4_160.awsui_no-range_vci2l_1wzz4_170:not(#\9)::after {
|
|
167
171
|
border-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
168
172
|
}
|
|
169
|
-
.
|
|
173
|
+
.awsui_enabled_vci2l_1wzz4_164.awsui_in-current-month_vci2l_1wzz4_160:not(#\9):hover {
|
|
170
174
|
color: var(--color-text-calendar-day-hover-graajh, #000716);
|
|
171
175
|
background-color: var(--color-background-dropdown-item-hover-mqsxkv, #f4f4f4);
|
|
172
176
|
}
|
|
173
|
-
.
|
|
177
|
+
.awsui_enabled_vci2l_1wzz4_164.awsui_in-current-month_vci2l_1wzz4_160:not(#\9):hover:not(.awsui_selected_vci2l_1wzz4_177)::after {
|
|
174
178
|
border: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-dropdown-item-hover-tyzq9m, #7d8998);
|
|
175
179
|
}
|
|
176
180
|
|
|
177
|
-
.
|
|
181
|
+
.awsui_today_vci2l_1wzz4_181:not(#\9):not(.awsui_in-range_vci2l_1wzz4_170) {
|
|
178
182
|
background-color: var(--color-background-calendar-today-762czq, #f4f4f4);
|
|
179
183
|
border-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
180
184
|
}
|
|
181
185
|
|
|
182
|
-
.
|
|
186
|
+
.awsui_selected_vci2l_1wzz4_177:not(#\9) {
|
|
183
187
|
border-color: transparent;
|
|
184
188
|
position: relative;
|
|
185
189
|
z-index: 2;
|
|
186
190
|
}
|
|
187
|
-
.
|
|
191
|
+
.awsui_selected_vci2l_1wzz4_177[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
188
192
|
position: relative;
|
|
189
193
|
}
|
|
190
|
-
.
|
|
194
|
+
.awsui_selected_vci2l_1wzz4_177[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
191
195
|
outline: 2px dotted transparent;
|
|
192
196
|
outline-offset: calc(var(--space-calendar-grid-selected-focus-outline-gutter-gqgjqz, -5px) - 1px);
|
|
193
197
|
}
|
|
194
|
-
.
|
|
198
|
+
.awsui_selected_vci2l_1wzz4_177[data-awsui-focus-visible=true]:not(#\9):focus::before {
|
|
195
199
|
content: " ";
|
|
196
200
|
display: block;
|
|
197
201
|
position: absolute;
|
|
@@ -202,56 +206,56 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
202
206
|
border-radius: var(--border-radius-calendar-day-focus-ring-a8mlqd, 3px);
|
|
203
207
|
box-shadow: 0 0 0 2px var(--color-border-calendar-grid-selected-focus-ring-cxqa0s, #fbfbfb);
|
|
204
208
|
}
|
|
205
|
-
.
|
|
209
|
+
.awsui_selected_vci2l_1wzz4_177[data-awsui-focus-visible=true]:not(#\9):focus::before {
|
|
206
210
|
z-index: 1;
|
|
207
211
|
}
|
|
208
|
-
.
|
|
212
|
+
.awsui_selected_vci2l_1wzz4_177:not(#\9)::after {
|
|
209
213
|
background-color: var(--color-background-control-checked-9admlu, #0972d3);
|
|
210
214
|
border: var(--border-item-width-qbbbsa, 2px) solid var(--color-background-control-checked-9admlu, #0972d3);
|
|
211
215
|
z-index: 0;
|
|
212
216
|
}
|
|
213
|
-
.
|
|
217
|
+
.awsui_selected_vci2l_1wzz4_177.awsui_start-date_vci2l_1wzz4_170:not(#\9), .awsui_selected_vci2l_1wzz4_177.awsui_start-date_vci2l_1wzz4_170:not(#\9)::after, .awsui_selected_vci2l_1wzz4_177.awsui_range-start-date_vci2l_1wzz4_217:not(#\9), .awsui_selected_vci2l_1wzz4_177.awsui_range-start-date_vci2l_1wzz4_217:not(#\9)::after {
|
|
214
218
|
border-top-left-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
215
219
|
}
|
|
216
|
-
.
|
|
220
|
+
.awsui_selected_vci2l_1wzz4_177.awsui_start-date_vci2l_1wzz4_170.awsui_in-range-border-bottom_vci2l_1wzz4_220:not(#\9), .awsui_selected_vci2l_1wzz4_177.awsui_start-date_vci2l_1wzz4_170.awsui_in-range-border-bottom_vci2l_1wzz4_220:not(#\9)::after, .awsui_selected_vci2l_1wzz4_177.awsui_range-start-date_vci2l_1wzz4_217.awsui_in-range-border-bottom_vci2l_1wzz4_220:not(#\9), .awsui_selected_vci2l_1wzz4_177.awsui_range-start-date_vci2l_1wzz4_217.awsui_in-range-border-bottom_vci2l_1wzz4_220:not(#\9)::after {
|
|
217
221
|
border-bottom-left-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
218
222
|
}
|
|
219
|
-
.
|
|
223
|
+
.awsui_selected_vci2l_1wzz4_177.awsui_end-date_vci2l_1wzz4_170:not(#\9), .awsui_selected_vci2l_1wzz4_177.awsui_end-date_vci2l_1wzz4_170:not(#\9)::after, .awsui_selected_vci2l_1wzz4_177.awsui_range-end-date_vci2l_1wzz4_223:not(#\9), .awsui_selected_vci2l_1wzz4_177.awsui_range-end-date_vci2l_1wzz4_223:not(#\9)::after {
|
|
220
224
|
border-bottom-right-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
221
225
|
}
|
|
222
|
-
.
|
|
226
|
+
.awsui_selected_vci2l_1wzz4_177.awsui_end-date_vci2l_1wzz4_170.awsui_in-range-border-top_vci2l_1wzz4_226:not(#\9), .awsui_selected_vci2l_1wzz4_177.awsui_end-date_vci2l_1wzz4_170.awsui_in-range-border-top_vci2l_1wzz4_226:not(#\9)::after, .awsui_selected_vci2l_1wzz4_177.awsui_range-end-date_vci2l_1wzz4_223.awsui_in-range-border-top_vci2l_1wzz4_226:not(#\9), .awsui_selected_vci2l_1wzz4_177.awsui_range-end-date_vci2l_1wzz4_223.awsui_in-range-border-top_vci2l_1wzz4_226:not(#\9)::after {
|
|
223
227
|
border-top-right-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
224
228
|
}
|
|
225
|
-
.
|
|
229
|
+
.awsui_selected_vci2l_1wzz4_177 > .awsui_day-inner_vci2l_1wzz4_140:not(#\9) {
|
|
226
230
|
color: var(--color-background-control-default-4pa05r, #ffffff);
|
|
227
231
|
position: relative;
|
|
228
232
|
z-index: 2;
|
|
229
233
|
}
|
|
230
234
|
|
|
231
|
-
.awsui_in-
|
|
235
|
+
.awsui_in-range_vci2l_1wzz4_170:not(#\9) {
|
|
232
236
|
background-color: var(--color-background-dropdown-item-selected-8l4mpk, #f2f8fd);
|
|
233
237
|
}
|
|
234
|
-
.awsui_in-
|
|
238
|
+
.awsui_in-range_vci2l_1wzz4_170.awsui_in-range-border-top_vci2l_1wzz4_226:not(#\9)::after {
|
|
235
239
|
border-top: var(--border-item-width-qbbbsa, 2px) solid var(--color-background-control-checked-9admlu, #0972d3);
|
|
236
240
|
}
|
|
237
|
-
.awsui_in-
|
|
241
|
+
.awsui_in-range_vci2l_1wzz4_170.awsui_in-range-border-right_vci2l_1wzz4_241:not(#\9)::after {
|
|
238
242
|
border-right: var(--border-item-width-qbbbsa, 2px) solid var(--color-background-control-checked-9admlu, #0972d3);
|
|
239
243
|
}
|
|
240
|
-
.awsui_in-
|
|
244
|
+
.awsui_in-range_vci2l_1wzz4_170.awsui_in-range-border-bottom_vci2l_1wzz4_220:not(#\9)::after {
|
|
241
245
|
border-bottom: var(--border-item-width-qbbbsa, 2px) solid var(--color-background-control-checked-9admlu, #0972d3);
|
|
242
246
|
}
|
|
243
|
-
.awsui_in-
|
|
247
|
+
.awsui_in-range_vci2l_1wzz4_170.awsui_in-range-border-left_vci2l_1wzz4_247:not(#\9)::after {
|
|
244
248
|
border-left: var(--border-item-width-qbbbsa, 2px) solid var(--color-background-control-checked-9admlu, #0972d3);
|
|
245
249
|
}
|
|
246
|
-
.awsui_in-
|
|
250
|
+
.awsui_in-range_vci2l_1wzz4_170.awsui_in-range-border-top_vci2l_1wzz4_226.awsui_in-range-border-right_vci2l_1wzz4_241:not(#\9), .awsui_in-range_vci2l_1wzz4_170.awsui_in-range-border-top_vci2l_1wzz4_226.awsui_in-range-border-right_vci2l_1wzz4_241:not(#\9)::after {
|
|
247
251
|
border-top-right-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
248
252
|
}
|
|
249
|
-
.awsui_in-
|
|
253
|
+
.awsui_in-range_vci2l_1wzz4_170.awsui_in-range-border-bottom_vci2l_1wzz4_220.awsui_in-range-border-right_vci2l_1wzz4_241:not(#\9), .awsui_in-range_vci2l_1wzz4_170.awsui_in-range-border-bottom_vci2l_1wzz4_220.awsui_in-range-border-right_vci2l_1wzz4_241:not(#\9)::after {
|
|
250
254
|
border-bottom-right-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
251
255
|
}
|
|
252
|
-
.awsui_in-
|
|
256
|
+
.awsui_in-range_vci2l_1wzz4_170.awsui_in-range-border-bottom_vci2l_1wzz4_220.awsui_in-range-border-left_vci2l_1wzz4_247:not(#\9), .awsui_in-range_vci2l_1wzz4_170.awsui_in-range-border-bottom_vci2l_1wzz4_220.awsui_in-range-border-left_vci2l_1wzz4_247:not(#\9)::after {
|
|
253
257
|
border-bottom-left-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
254
258
|
}
|
|
255
|
-
.awsui_in-
|
|
259
|
+
.awsui_in-range_vci2l_1wzz4_170.awsui_in-range-border-top_vci2l_1wzz4_226.awsui_in-range-border-left_vci2l_1wzz4_247:not(#\9), .awsui_in-range_vci2l_1wzz4_170.awsui_in-range-border-top_vci2l_1wzz4_226.awsui_in-range-border-left_vci2l_1wzz4_247:not(#\9)::after {
|
|
256
260
|
border-top-left-radius: var(--border-radius-item-u2ibpi, 8px);
|
|
257
261
|
}
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"day": "
|
|
6
|
-
"day-inner": "awsui_day-
|
|
7
|
-
"in-first-row": "awsui_in-first-
|
|
8
|
-
"in-previous-month": "awsui_in-previous-
|
|
9
|
-
"last-day-of-month": "awsui_last-day-of-
|
|
10
|
-
"in-next-month": "awsui_in-next-
|
|
11
|
-
"in-first-column": "awsui_in-first-
|
|
12
|
-
"in-current-month": "awsui_in-current-
|
|
13
|
-
"enabled": "
|
|
14
|
-
"in-range": "awsui_in-
|
|
15
|
-
"end-date": "awsui_end-
|
|
16
|
-
"start-date": "awsui_start-
|
|
17
|
-
"no-range": "awsui_no-
|
|
18
|
-
"selected": "
|
|
19
|
-
"today": "
|
|
20
|
-
"range-start-date": "awsui_range-start-
|
|
21
|
-
"in-range-border-bottom": "awsui_in-range-border-
|
|
22
|
-
"range-end-date": "awsui_range-end-
|
|
23
|
-
"in-range-border-top": "awsui_in-range-border-
|
|
24
|
-
"in-range-border-right": "awsui_in-range-border-
|
|
25
|
-
"in-range-border-left": "awsui_in-range-border-
|
|
5
|
+
"day": "awsui_day_vci2l_1wzz4_97",
|
|
6
|
+
"day-inner": "awsui_day-inner_vci2l_1wzz4_140",
|
|
7
|
+
"in-first-row": "awsui_in-first-row_vci2l_1wzz4_145",
|
|
8
|
+
"in-previous-month": "awsui_in-previous-month_vci2l_1wzz4_145",
|
|
9
|
+
"last-day-of-month": "awsui_last-day-of-month_vci2l_1wzz4_149",
|
|
10
|
+
"in-next-month": "awsui_in-next-month_vci2l_1wzz4_153",
|
|
11
|
+
"in-first-column": "awsui_in-first-column_vci2l_1wzz4_157",
|
|
12
|
+
"in-current-month": "awsui_in-current-month_vci2l_1wzz4_160",
|
|
13
|
+
"enabled": "awsui_enabled_vci2l_1wzz4_164",
|
|
14
|
+
"in-range": "awsui_in-range_vci2l_1wzz4_170",
|
|
15
|
+
"end-date": "awsui_end-date_vci2l_1wzz4_170",
|
|
16
|
+
"start-date": "awsui_start-date_vci2l_1wzz4_170",
|
|
17
|
+
"no-range": "awsui_no-range_vci2l_1wzz4_170",
|
|
18
|
+
"selected": "awsui_selected_vci2l_1wzz4_177",
|
|
19
|
+
"today": "awsui_today_vci2l_1wzz4_181",
|
|
20
|
+
"range-start-date": "awsui_range-start-date_vci2l_1wzz4_217",
|
|
21
|
+
"in-range-border-bottom": "awsui_in-range-border-bottom_vci2l_1wzz4_220",
|
|
22
|
+
"range-end-date": "awsui_range-end-date_vci2l_1wzz4_223",
|
|
23
|
+
"in-range-border-top": "awsui_in-range-border-top_vci2l_1wzz4_226",
|
|
24
|
+
"in-range-border-right": "awsui_in-range-border-right_vci2l_1wzz4_241",
|
|
25
|
+
"in-range-border-left": "awsui_in-range-border-left_vci2l_1wzz4_247"
|
|
26
26
|
};
|
|
27
27
|
|
package/internal/environment.js
CHANGED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/property-filter/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAW9E,OAAO,EAAE,mBAAmB,EAAiE,MAAM,cAAc,CAAC;AASlH,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,QAAA,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/property-filter/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAW9E,OAAO,EAAE,mBAAmB,EAAiE,MAAM,cAAc,CAAC;AASlH,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,QAAA,MAAM,cAAc,qGA2PnB,CAAC;AAGF,eAAe,cAAc,CAAC"}
|
package/property-filter/index.js
CHANGED
|
@@ -115,14 +115,17 @@ var PropertyFilter = React.forwardRef(function (_a, ref) {
|
|
|
115
115
|
event.preventDefault();
|
|
116
116
|
var parsedText = parseText(value, filteringProperties, disableFreeTextFiltering);
|
|
117
117
|
var loadMoreDetail = getLoadMoreDetail(parsedText, value);
|
|
118
|
-
fireNonCancelableEvent(onLoadItems, __assign(__assign({}, loadMoreDetail), { firstPage: true, samePage: false }));
|
|
119
118
|
// Insert operator automatically if only one operator is defined for the given property.
|
|
120
119
|
if (parsedText.step === 'operator') {
|
|
121
120
|
var operators = getAllowedOperators(parsedText.property);
|
|
122
121
|
if (value.trim() === parsedText.property.propertyLabel && operators.length === 1) {
|
|
122
|
+
loadMoreDetail.filteringProperty = parsedText.property;
|
|
123
|
+
loadMoreDetail.filteringOperator = operators[0];
|
|
124
|
+
loadMoreDetail.filteringText = '';
|
|
123
125
|
setFilteringText(parsedText.property.propertyLabel + ' ' + operators[0] + ' ');
|
|
124
126
|
}
|
|
125
127
|
}
|
|
128
|
+
fireNonCancelableEvent(onLoadItems, __assign(__assign({}, loadMoreDetail), { firstPage: true, samePage: false }));
|
|
126
129
|
};
|
|
127
130
|
var _g = useState(false), tokensExpanded = _g[0], setTokensExpanded = _g[1];
|
|
128
131
|
var toggleExpandedTokens = function () { return setTokensExpanded(!tokensExpanded); };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/property-filter/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAE9E,OAAO,oBAAoB,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,OAAO,EA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yright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useRef, useState, useMemo, useImperativeHandle } from 'react';\n\nimport InternalSpaceBetween from '../space-between/internal';\nimport { InternalButton } from '../button/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { KeyCode } from '../internal/keycode';\nimport SelectToggle from '../token-group/toggle';\nimport { generateUniqueId } from '../internal/hooks/use-unique-id/index';\nimport { fireNonCancelableEvent } from '../internal/events';\n\nimport { PropertyFilterProps, ParsedText, Ref, FilteringProperty, ComparisonOperator, Token } from './interfaces';\nimport { TokenButton } from './token';\nimport { getQueryActions, parseText, getAutosuggestOptions, getAllowedOperators } from './controller';\nimport { useLoadItems } from './use-load-items';\nimport styles from './styles.css.js';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport PropertyFilterAutosuggest, { PropertyFilterAutosuggestProps } from './property-filter-autosuggest';\nimport { AutosuggestInputRef } from '../internal/components/autosuggest-input';\n\nexport { PropertyFilterProps };\n\nconst PropertyFilter = React.forwardRef(\n (\n {\n disabled,\n i18nStrings,\n countText,\n query,\n hideOperations,\n onChange,\n filteringProperties,\n filteringOptions = [],\n customGroupsText = [],\n disableFreeTextFiltering = false,\n onLoadItems,\n virtualScroll,\n customControl,\n filteringEmpty,\n filteringLoadingText,\n filteringFinishedText,\n filteringErrorText,\n filteringRecoveryText,\n filteringStatusType,\n asyncProperties,\n tokenLimit,\n expandToViewport,\n ...rest\n }: PropertyFilterProps,\n ref: React.Ref<Ref>\n ) => {\n const { __internalRootRef } = useBaseComponent('PropertyFilter');\n const inputRef = useRef<AutosuggestInputRef>(null);\n const baseProps = getBaseProps(rest);\n useImperativeHandle(ref, () => ({ focus: () => inputRef.current?.focus() }), []);\n const { tokens, operation } = query;\n const showResults = tokens?.length && !disabled;\n const { addToken, removeToken, setToken, setOperation, removeAllTokens } = getQueryActions(\n query,\n onChange,\n inputRef\n );\n const [filteringText, setFilteringText] = useState<string>('');\n const parsedText = parseText(filteringText, filteringProperties, disableFreeTextFiltering);\n const autosuggestOptions = getAutosuggestOptions(\n parsedText,\n filteringOptions,\n filteringProperties,\n customGroupsText,\n i18nStrings\n );\n\n const createToken = (currentText: string) => {\n const parsedText = parseText(currentText, filteringProperties, disableFreeTextFiltering);\n let newToken: Token;\n switch (parsedText.step) {\n case 'property': {\n newToken = {\n propertyKey: parsedText.property.key,\n operator: parsedText.operator,\n value: parsedText.value,\n };\n break;\n }\n case 'free-text': {\n newToken = {\n operator: parsedText.operator || ':',\n value: parsedText.value,\n };\n break;\n }\n case 'operator': {\n newToken = {\n operator: ':',\n value: currentText,\n };\n break;\n }\n }\n if (disableFreeTextFiltering && !('propertyKey' in newToken)) {\n return;\n }\n addToken(newToken);\n setFilteringText('');\n };\n const ignoreKeyDown = useRef<boolean>(false);\n const handleKeyDown: PropertyFilterAutosuggestProps['onKeyDown'] = event => {\n if (filteringText && !ignoreKeyDown.current && event.detail.keyCode === KeyCode.enter) {\n createToken(filteringText);\n }\n };\n const getLoadMoreDetail = (parsedText: ParsedText, filteringText: string) => {\n const loadMoreDetail: {\n filteringProperty: FilteringProperty | undefined;\n filteringText: string;\n filteringOperator: ComparisonOperator | undefined;\n } = {\n filteringProperty: undefined,\n filteringText,\n filteringOperator: undefined,\n };\n if (parsedText.step === 'property') {\n loadMoreDetail.filteringProperty = parsedText.property;\n loadMoreDetail.filteringText = parsedText.value;\n loadMoreDetail.filteringOperator = parsedText.operator;\n }\n return loadMoreDetail;\n };\n const loadMoreDetail = getLoadMoreDetail(parsedText, filteringText);\n const inputLoadItemsHandlers = useLoadItems(\n onLoadItems,\n loadMoreDetail.filteringText,\n loadMoreDetail.filteringProperty,\n loadMoreDetail.filteringText,\n loadMoreDetail.filteringOperator\n );\n const asyncProps = {\n empty: filteringEmpty,\n loadingText: filteringLoadingText,\n finishedText: filteringFinishedText,\n errorText: filteringErrorText,\n recoveryText: filteringRecoveryText,\n statusType: filteringStatusType,\n };\n const asyncAutosuggestProps =\n !!filteringText.length || asyncProperties\n ? {\n ...inputLoadItemsHandlers,\n ...asyncProps,\n }\n : {};\n const handleSelected: PropertyFilterAutosuggestProps['onOptionClick'] = event => {\n // The ignoreKeyDown flag makes sure `createToken` routine runs only once. Autosuggest's `onKeyDown` fires,\n // when an item is selected from the list using \"enter\" key.\n ignoreKeyDown.current = true;\n setTimeout(() => {\n ignoreKeyDown.current = false;\n }, 0);\n const { detail: option } = event;\n const value = option.value || '';\n if ('tokenValue' in option) {\n createToken((option as { tokenValue: string }).tokenValue);\n return;\n }\n // create a token from the 'use' option\n if (!('keepOpenOnSelect' in option)) {\n createToken(value);\n return;\n }\n\n // stop dropdown from closing\n event.preventDefault();\n const parsedText = parseText(value, filteringProperties, disableFreeTextFiltering);\n const loadMoreDetail = getLoadMoreDetail(parsedText, value);\n fireNonCancelableEvent(onLoadItems, { ...loadMoreDetail, firstPage: true, samePage: false });\n\n // Insert operator automatically if only one operator is defined for the given property.\n if (parsedText.step === 'operator') {\n const operators = getAllowedOperators(parsedText.property);\n if (value.trim() === parsedText.property.propertyLabel && operators.length === 1) {\n setFilteringText(parsedText.property.propertyLabel + ' ' + operators[0] + ' ');\n }\n }\n };\n const [tokensExpanded, setTokensExpanded] = useState(false);\n const toggleExpandedTokens = () => setTokensExpanded(!tokensExpanded);\n const hasHiddenOptions = tokenLimit !== undefined && tokens.length > tokenLimit;\n const slicedTokens = hasHiddenOptions && !tokensExpanded ? tokens.slice(0, tokenLimit) : tokens;\n const controlId = useMemo(() => generateUniqueId(), []);\n return (\n <span {...baseProps} className={clsx(baseProps.className, styles.root)} ref={__internalRootRef}>\n <div className={styles['search-field']}>\n {customControl && <div className={styles['custom-control']}>{customControl}</div>}\n <PropertyFilterAutosuggest\n ref={inputRef}\n virtualScroll={virtualScroll}\n enteredTextLabel={i18nStrings.enteredTextLabel}\n ariaLabel={i18nStrings.filteringAriaLabel}\n placeholder={i18nStrings.filteringPlaceholder}\n value={filteringText}\n disabled={disabled}\n onKeyDown={handleKeyDown}\n {...autosuggestOptions}\n onChange={event => setFilteringText(event.detail.value)}\n empty={filteringEmpty}\n {...asyncAutosuggestProps}\n expandToViewport={expandToViewport}\n onOptionClick={handleSelected}\n hideEnteredTextOption={disableFreeTextFiltering && parsedText.step !== 'property'}\n />\n <span\n aria-live=\"polite\"\n aria-atomic=\"true\"\n className={clsx(styles.results, showResults && styles['results-visible'])}\n >\n {showResults ? countText : ''}\n </span>\n </div>\n {tokens && tokens.length > 0 && (\n <div className={styles.tokens}>\n <InternalSpaceBetween size=\"xs\" direction=\"horizontal\" id={controlId}>\n {slicedTokens.map((token, index) => (\n <TokenButton\n token={token}\n first={index === 0}\n operation={operation}\n key={index}\n removeToken={() => removeToken(index)}\n setToken={(newToken: Token) => setToken(index, newToken)}\n setOperation={setOperation}\n filteringOptions={filteringOptions}\n filteringProperties={filteringProperties}\n asyncProps={asyncProps}\n onLoadItems={onLoadItems}\n i18nStrings={i18nStrings}\n asyncProperties={asyncProperties}\n hideOperations={hideOperations}\n customGroupsText={customGroupsText}\n disableFreeTextFiltering={disableFreeTextFiltering}\n disabled={disabled}\n expandToViewport={expandToViewport}\n />\n ))}\n {hasHiddenOptions && (\n <div className={styles['toggle-collapsed']}>\n <SelectToggle\n controlId={controlId}\n allHidden={tokenLimit === 0}\n expanded={tokensExpanded}\n numberOfHiddenOptions={tokens.length - slicedTokens.length}\n i18nStrings={{\n limitShowFewer: i18nStrings.tokenLimitShowFewer,\n limitShowMore: i18nStrings.tokenLimitShowMore,\n }}\n onClick={toggleExpandedTokens}\n />\n </div>\n )}\n <div className={styles.separator} />\n <InternalButton onClick={removeAllTokens} className={styles['remove-all']} disabled={disabled}>\n {i18nStrings.clearFiltersText}\n </InternalButton>\n </InternalSpaceBetween>\n </div>\n )}\n </span>\n );\n }\n);\n\napplyDisplayName(PropertyFilter, 'PropertyFilter');\nexport default PropertyFilter;\n"]}
|
|
1
|
+
{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E,SAAS,EACpB,SAAS,EAAE,UAAU,KAAK,CAAC,EAC3B,QAAQ,EAAE,cAAc,EACxB,qBAAqB,EAAE,MAAM,CAAC,MAAM,GAAG,YAAY,CAAC,MAAM,EAC1D,WAAW,EAAE;4BACX,cAAc,EAAE,WAAW,CAAC,mBAAmB;4BAC/C,aAAa,EAAE,WAAW,CAAC,kBAAkB;yBAC9C,EACD,OAAO,EAAE,oBAAoB,GAC7B,CACE,CACP;gBACD,6BAAK,SAAS,EAAE,MAAM,CAAC,SAAS,GAAI;gBACpC,oBAAC,cAAc,IAAC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,QAAQ,IAC1F,WAAW,CAAC,gBAAgB,CACd,CACI,CACnB,CACP,CACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AACnD,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useRef, useState, useMemo, useImperativeHandle } from 'react';\n\nimport InternalSpaceBetween from '../space-between/internal';\nimport { InternalButton } from '../button/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { KeyCode } from '../internal/keycode';\nimport SelectToggle from '../token-group/toggle';\nimport { generateUniqueId } from '../internal/hooks/use-unique-id/index';\nimport { fireNonCancelableEvent } from '../internal/events';\n\nimport { PropertyFilterProps, ParsedText, Ref, FilteringProperty, ComparisonOperator, Token } from './interfaces';\nimport { TokenButton } from './token';\nimport { getQueryActions, parseText, getAutosuggestOptions, getAllowedOperators } from './controller';\nimport { useLoadItems } from './use-load-items';\nimport styles from './styles.css.js';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport PropertyFilterAutosuggest, { PropertyFilterAutosuggestProps } from './property-filter-autosuggest';\nimport { AutosuggestInputRef } from '../internal/components/autosuggest-input';\n\nexport { PropertyFilterProps };\n\nconst PropertyFilter = React.forwardRef(\n (\n {\n disabled,\n i18nStrings,\n countText,\n query,\n hideOperations,\n onChange,\n filteringProperties,\n filteringOptions = [],\n customGroupsText = [],\n disableFreeTextFiltering = false,\n onLoadItems,\n virtualScroll,\n customControl,\n filteringEmpty,\n filteringLoadingText,\n filteringFinishedText,\n filteringErrorText,\n filteringRecoveryText,\n filteringStatusType,\n asyncProperties,\n tokenLimit,\n expandToViewport,\n ...rest\n }: PropertyFilterProps,\n ref: React.Ref<Ref>\n ) => {\n const { __internalRootRef } = useBaseComponent('PropertyFilter');\n const inputRef = useRef<AutosuggestInputRef>(null);\n const baseProps = getBaseProps(rest);\n useImperativeHandle(ref, () => ({ focus: () => inputRef.current?.focus() }), []);\n const { tokens, operation } = query;\n const showResults = tokens?.length && !disabled;\n const { addToken, removeToken, setToken, setOperation, removeAllTokens } = getQueryActions(\n query,\n onChange,\n inputRef\n );\n const [filteringText, setFilteringText] = useState<string>('');\n const parsedText = parseText(filteringText, filteringProperties, disableFreeTextFiltering);\n const autosuggestOptions = getAutosuggestOptions(\n parsedText,\n filteringOptions,\n filteringProperties,\n customGroupsText,\n i18nStrings\n );\n\n const createToken = (currentText: string) => {\n const parsedText = parseText(currentText, filteringProperties, disableFreeTextFiltering);\n let newToken: Token;\n switch (parsedText.step) {\n case 'property': {\n newToken = {\n propertyKey: parsedText.property.key,\n operator: parsedText.operator,\n value: parsedText.value,\n };\n break;\n }\n case 'free-text': {\n newToken = {\n operator: parsedText.operator || ':',\n value: parsedText.value,\n };\n break;\n }\n case 'operator': {\n newToken = {\n operator: ':',\n value: currentText,\n };\n break;\n }\n }\n if (disableFreeTextFiltering && !('propertyKey' in newToken)) {\n return;\n }\n addToken(newToken);\n setFilteringText('');\n };\n const ignoreKeyDown = useRef<boolean>(false);\n const handleKeyDown: PropertyFilterAutosuggestProps['onKeyDown'] = event => {\n if (filteringText && !ignoreKeyDown.current && event.detail.keyCode === KeyCode.enter) {\n createToken(filteringText);\n }\n };\n const getLoadMoreDetail = (parsedText: ParsedText, filteringText: string) => {\n const loadMoreDetail: {\n filteringProperty: FilteringProperty | undefined;\n filteringText: string;\n filteringOperator: ComparisonOperator | undefined;\n } = {\n filteringProperty: undefined,\n filteringText,\n filteringOperator: undefined,\n };\n if (parsedText.step === 'property') {\n loadMoreDetail.filteringProperty = parsedText.property;\n loadMoreDetail.filteringText = parsedText.value;\n loadMoreDetail.filteringOperator = parsedText.operator;\n }\n return loadMoreDetail;\n };\n const loadMoreDetail = getLoadMoreDetail(parsedText, filteringText);\n const inputLoadItemsHandlers = useLoadItems(\n onLoadItems,\n loadMoreDetail.filteringText,\n loadMoreDetail.filteringProperty,\n loadMoreDetail.filteringText,\n loadMoreDetail.filteringOperator\n );\n const asyncProps = {\n empty: filteringEmpty,\n loadingText: filteringLoadingText,\n finishedText: filteringFinishedText,\n errorText: filteringErrorText,\n recoveryText: filteringRecoveryText,\n statusType: filteringStatusType,\n };\n const asyncAutosuggestProps =\n !!filteringText.length || asyncProperties\n ? {\n ...inputLoadItemsHandlers,\n ...asyncProps,\n }\n : {};\n const handleSelected: PropertyFilterAutosuggestProps['onOptionClick'] = event => {\n // The ignoreKeyDown flag makes sure `createToken` routine runs only once. Autosuggest's `onKeyDown` fires,\n // when an item is selected from the list using \"enter\" key.\n ignoreKeyDown.current = true;\n setTimeout(() => {\n ignoreKeyDown.current = false;\n }, 0);\n const { detail: option } = event;\n const value = option.value || '';\n if ('tokenValue' in option) {\n createToken((option as { tokenValue: string }).tokenValue);\n return;\n }\n // create a token from the 'use' option\n if (!('keepOpenOnSelect' in option)) {\n createToken(value);\n return;\n }\n\n // stop dropdown from closing\n event.preventDefault();\n\n const parsedText = parseText(value, filteringProperties, disableFreeTextFiltering);\n const loadMoreDetail = getLoadMoreDetail(parsedText, value);\n\n // Insert operator automatically if only one operator is defined for the given property.\n if (parsedText.step === 'operator') {\n const operators = getAllowedOperators(parsedText.property);\n if (value.trim() === parsedText.property.propertyLabel && operators.length === 1) {\n loadMoreDetail.filteringProperty = parsedText.property;\n loadMoreDetail.filteringOperator = operators[0];\n loadMoreDetail.filteringText = '';\n setFilteringText(parsedText.property.propertyLabel + ' ' + operators[0] + ' ');\n }\n }\n\n fireNonCancelableEvent(onLoadItems, { ...loadMoreDetail, firstPage: true, samePage: false });\n };\n const [tokensExpanded, setTokensExpanded] = useState(false);\n const toggleExpandedTokens = () => setTokensExpanded(!tokensExpanded);\n const hasHiddenOptions = tokenLimit !== undefined && tokens.length > tokenLimit;\n const slicedTokens = hasHiddenOptions && !tokensExpanded ? tokens.slice(0, tokenLimit) : tokens;\n const controlId = useMemo(() => generateUniqueId(), []);\n return (\n <span {...baseProps} className={clsx(baseProps.className, styles.root)} ref={__internalRootRef}>\n <div className={styles['search-field']}>\n {customControl && <div className={styles['custom-control']}>{customControl}</div>}\n <PropertyFilterAutosuggest\n ref={inputRef}\n virtualScroll={virtualScroll}\n enteredTextLabel={i18nStrings.enteredTextLabel}\n ariaLabel={i18nStrings.filteringAriaLabel}\n placeholder={i18nStrings.filteringPlaceholder}\n value={filteringText}\n disabled={disabled}\n onKeyDown={handleKeyDown}\n {...autosuggestOptions}\n onChange={event => setFilteringText(event.detail.value)}\n empty={filteringEmpty}\n {...asyncAutosuggestProps}\n expandToViewport={expandToViewport}\n onOptionClick={handleSelected}\n hideEnteredTextOption={disableFreeTextFiltering && parsedText.step !== 'property'}\n />\n <span\n aria-live=\"polite\"\n aria-atomic=\"true\"\n className={clsx(styles.results, showResults && styles['results-visible'])}\n >\n {showResults ? countText : ''}\n </span>\n </div>\n {tokens && tokens.length > 0 && (\n <div className={styles.tokens}>\n <InternalSpaceBetween size=\"xs\" direction=\"horizontal\" id={controlId}>\n {slicedTokens.map((token, index) => (\n <TokenButton\n token={token}\n first={index === 0}\n operation={operation}\n key={index}\n removeToken={() => removeToken(index)}\n setToken={(newToken: Token) => setToken(index, newToken)}\n setOperation={setOperation}\n filteringOptions={filteringOptions}\n filteringProperties={filteringProperties}\n asyncProps={asyncProps}\n onLoadItems={onLoadItems}\n i18nStrings={i18nStrings}\n asyncProperties={asyncProperties}\n hideOperations={hideOperations}\n customGroupsText={customGroupsText}\n disableFreeTextFiltering={disableFreeTextFiltering}\n disabled={disabled}\n expandToViewport={expandToViewport}\n />\n ))}\n {hasHiddenOptions && (\n <div className={styles['toggle-collapsed']}>\n <SelectToggle\n controlId={controlId}\n allHidden={tokenLimit === 0}\n expanded={tokensExpanded}\n numberOfHiddenOptions={tokens.length - slicedTokens.length}\n i18nStrings={{\n limitShowFewer: i18nStrings.tokenLimitShowFewer,\n limitShowMore: i18nStrings.tokenLimitShowMore,\n }}\n onClick={toggleExpandedTokens}\n />\n </div>\n )}\n <div className={styles.separator} />\n <InternalButton onClick={removeAllTokens} className={styles['remove-all']} disabled={disabled}>\n {i18nStrings.clearFiltersText}\n </InternalButton>\n </InternalSpaceBetween>\n </div>\n )}\n </span>\n );\n }\n);\n\napplyDisplayName(PropertyFilter, 'PropertyFilter');\nexport default PropertyFilter;\n"]}
|