@cloudscape-design/components 3.0.835 → 3.0.837
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/alert/styles.css.js +28 -28
- package/alert/styles.scoped.css +46 -46
- package/alert/styles.selectors.js +28 -28
- package/anchor-navigation/styles.css.js +8 -8
- package/anchor-navigation/styles.scoped.css +19 -19
- package/anchor-navigation/styles.selectors.js +8 -8
- package/app-layout/utils/use-drawers.d.ts.map +1 -1
- package/app-layout/utils/use-drawers.js +40 -51
- package/app-layout/utils/use-drawers.js.map +1 -1
- package/button/styles.css.js +21 -21
- package/button/styles.scoped.css +157 -157
- package/button/styles.selectors.js +21 -21
- package/button-dropdown/item-element/styles.css.js +13 -13
- package/button-dropdown/item-element/styles.scoped.css +22 -22
- package/button-dropdown/item-element/styles.selectors.js +13 -13
- package/button-dropdown/styles.css.js +17 -17
- package/button-dropdown/styles.scoped.css +30 -30
- package/button-dropdown/styles.selectors.js +17 -17
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +6 -3
- package/container/internal.js.map +1 -1
- package/container/styles.css.js +31 -30
- package/container/styles.scoped.css +59 -56
- package/container/styles.selectors.js +31 -30
- package/container/test-classes/styles.css.js +6 -0
- package/container/test-classes/styles.scoped.css +7 -0
- package/container/test-classes/styles.selectors.js +7 -0
- package/date-range-picker/index.d.ts.map +1 -1
- package/date-range-picker/index.js +23 -17
- package/date-range-picker/index.js.map +1 -1
- package/expandable-section/styles.css.js +34 -34
- package/expandable-section/styles.scoped.css +67 -67
- package/expandable-section/styles.selectors.js +34 -34
- package/file-token-group/styles.css.js +22 -22
- package/file-token-group/styles.scoped.css +31 -31
- package/file-token-group/styles.selectors.js +22 -22
- package/flashbar/styles.css.js +50 -50
- package/flashbar/styles.scoped.css +151 -151
- package/flashbar/styles.selectors.js +50 -50
- package/input/styles.css.js +13 -13
- package/input/styles.scoped.css +44 -44
- package/input/styles.selectors.js +13 -13
- package/internal/base-component/styles.scoped.css +4 -2
- package/internal/components/button-trigger/styles.css.js +13 -13
- package/internal/components/button-trigger/styles.scoped.css +37 -37
- package/internal/components/button-trigger/styles.selectors.js +13 -13
- package/internal/components/checkbox-icon/styles.css.js +9 -9
- package/internal/components/checkbox-icon/styles.scoped.css +10 -10
- package/internal/components/checkbox-icon/styles.selectors.js +9 -9
- package/internal/components/dropdown/styles.css.js +20 -20
- package/internal/components/dropdown/styles.scoped.css +39 -39
- package/internal/components/dropdown/styles.selectors.js +20 -20
- package/internal/components/menu-dropdown/styles.css.js +7 -7
- package/internal/components/menu-dropdown/styles.scoped.css +14 -14
- package/internal/components/menu-dropdown/styles.selectors.js +7 -7
- package/internal/components/token-list/styles.css.js +10 -10
- package/internal/components/token-list/styles.scoped.css +26 -26
- package/internal/components/token-list/styles.selectors.js +10 -10
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/styles/tokens.d.ts +4 -2
- package/internal/generated/styles/tokens.js +4 -2
- package/internal/generated/theming/index.cjs +22 -8
- package/internal/generated/theming/index.cjs.d.ts +32 -0
- package/internal/generated/theming/index.d.ts +32 -0
- package/internal/generated/theming/index.js +22 -8
- package/internal/manifest.json +1 -1
- package/internal/utils/date-time/format-date-time-with-offset.d.ts +9 -0
- package/internal/utils/date-time/format-date-time-with-offset.d.ts.map +1 -0
- package/internal/utils/date-time/format-date-time-with-offset.js +17 -0
- package/internal/utils/date-time/format-date-time-with-offset.js.map +1 -0
- package/internal/utils/date-time/index.d.ts +1 -1
- package/internal/utils/date-time/index.d.ts.map +1 -1
- package/internal/utils/date-time/index.js +1 -1
- package/internal/utils/date-time/index.js.map +1 -1
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +73 -73
- package/link/styles.selectors.js +20 -20
- package/package.json +1 -1
- package/pagination/styles.css.js +9 -9
- package/pagination/styles.scoped.css +27 -27
- package/pagination/styles.selectors.js +9 -9
- package/popover/styles.css.js +52 -52
- package/popover/styles.scoped.css +72 -75
- package/popover/styles.selectors.js +52 -52
- package/prompt-input/styles.css.js +14 -14
- package/prompt-input/styles.scoped.css +56 -56
- package/prompt-input/styles.selectors.js +14 -14
- package/property-filter/filtering-token/styles.css.js +18 -18
- package/property-filter/filtering-token/styles.scoped.css +45 -45
- package/property-filter/filtering-token/styles.selectors.js +18 -18
- package/property-filter/styles.css.js +39 -39
- package/property-filter/styles.scoped.css +42 -42
- package/property-filter/styles.selectors.js +39 -39
- package/segmented-control/styles.css.js +15 -15
- package/segmented-control/styles.scoped.css +38 -38
- package/segmented-control/styles.selectors.js +15 -15
- package/select/parts/styles.css.js +21 -21
- package/select/parts/styles.scoped.css +26 -26
- package/select/parts/styles.selectors.js +21 -21
- package/test-utils/dom/expandable-section/index.js +11 -10
- package/test-utils/dom/expandable-section/index.js.map +1 -1
- package/test-utils/dom/index.d.ts +1343 -0
- package/test-utils/dom/index.js +237 -0
- package/test-utils/dom/index.js.map +1 -1
- package/test-utils/selectors/expandable-section/index.js +11 -10
- package/test-utils/selectors/expandable-section/index.js.map +1 -1
- package/test-utils/selectors/index.d.ts +1185 -0
- package/test-utils/selectors/index.js +237 -0
- package/test-utils/selectors/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/textarea/styles.css.js +5 -5
- package/textarea/styles.scoped.css +24 -24
- package/textarea/styles.selectors.js +5 -5
- package/tiles/styles.css.js +30 -30
- package/tiles/styles.scoped.css +79 -79
- package/tiles/styles.selectors.js +30 -30
- package/token-group/styles.css.js +8 -8
- package/token-group/styles.scoped.css +18 -18
- package/token-group/styles.selectors.js +8 -8
- package/top-navigation/styles.css.js +47 -47
- package/top-navigation/styles.scoped.css +67 -67
- package/top-navigation/styles.selectors.js +47 -47
- package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
- package/tutorial-panel/components/tutorial-list/styles.scoped.css +29 -29
- package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
- package/internal/utils/date-time/format-date-range.d.ts +0 -13
- package/internal/utils/date-time/format-date-range.d.ts.map +0 -1
- package/internal/utils/date-time/format-date-range.js +0 -36
- package/internal/utils/date-time/format-date-range.js.map +0 -1
|
@@ -186,10 +186,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
186
186
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
187
187
|
SPDX-License-Identifier: Apache-2.0
|
|
188
188
|
*/
|
|
189
|
-
.awsui_content-
|
|
190
|
-
animation: awsui_awsui-motion-fade-
|
|
189
|
+
.awsui_content-enter_ig8mp_1014l_189:not(#\9) {
|
|
190
|
+
animation: awsui_awsui-motion-fade-in_ig8mp_1014l_1 var(--motion-duration-show-paced-q2lo2h, 180ms) var(--motion-easing-show-paced-ne2o0s, ease-out);
|
|
191
191
|
}
|
|
192
|
-
@keyframes awsui_awsui-motion-fade-
|
|
192
|
+
@keyframes awsui_awsui-motion-fade-in_ig8mp_1014l_1 {
|
|
193
193
|
from {
|
|
194
194
|
opacity: 0.2;
|
|
195
195
|
}
|
|
@@ -198,17 +198,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
@media (prefers-reduced-motion: reduce) {
|
|
201
|
-
.awsui_content-
|
|
201
|
+
.awsui_content-enter_ig8mp_1014l_189:not(#\9) {
|
|
202
202
|
animation: none;
|
|
203
203
|
transition: none;
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
.awsui-motion-disabled .awsui_content-
|
|
206
|
+
.awsui-motion-disabled .awsui_content-enter_ig8mp_1014l_189:not(#\9), .awsui-mode-entering .awsui_content-enter_ig8mp_1014l_189:not(#\9) {
|
|
207
207
|
animation: none;
|
|
208
208
|
transition: none;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
.awsui_tutorial-
|
|
211
|
+
.awsui_tutorial-list_ig8mp_1014l_211:not(#\9) {
|
|
212
212
|
border-collapse: separate;
|
|
213
213
|
border-spacing: 0;
|
|
214
214
|
box-sizing: border-box;
|
|
@@ -248,7 +248,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
248
248
|
margin-inline: 0;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
.awsui_tutorial-
|
|
251
|
+
.awsui_tutorial-box_ig8mp_1014l_250:not(#\9) {
|
|
252
252
|
border-collapse: separate;
|
|
253
253
|
border-spacing: 0;
|
|
254
254
|
box-sizing: border-box;
|
|
@@ -292,69 +292,69 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
292
292
|
padding-block: var(--space-m-udix3p, 16px);
|
|
293
293
|
padding-inline: var(--space-m-udix3p, 16px);
|
|
294
294
|
}
|
|
295
|
-
.awsui_tutorial-
|
|
295
|
+
.awsui_tutorial-box_ig8mp_1014l_250:not(#\9):not(:first-child) {
|
|
296
296
|
margin-block-start: var(--space-l-t419sm, 20px);
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
.awsui_tutorial-box-
|
|
299
|
+
.awsui_tutorial-box-title_ig8mp_1014l_297:not(#\9) {
|
|
300
300
|
display: flex;
|
|
301
301
|
align-items: flex-start;
|
|
302
302
|
justify-content: space-between;
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
-
.awsui_tutorial-description-
|
|
305
|
+
.awsui_tutorial-description-plaintext_ig8mp_1014l_303:not(#\9) {
|
|
306
306
|
white-space: pre-line;
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
.awsui_tutorial-
|
|
309
|
+
.awsui_tutorial-description_ig8mp_1014l_303:not(#\9) {
|
|
310
310
|
/* stylelint-disable-next-line @cloudscape-design/no-implicit-descendant, selector-max-type -- Customers can nest their list items inside Box components. */
|
|
311
311
|
}
|
|
312
|
-
.awsui_tutorial-
|
|
312
|
+
.awsui_tutorial-description_ig8mp_1014l_303 ul:not(#\9) {
|
|
313
313
|
list-style-type: initial;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
.awsui_expandable-
|
|
316
|
+
.awsui_expandable-section_ig8mp_1014l_314:not(#\9) {
|
|
317
317
|
display: none;
|
|
318
318
|
margin-block-start: var(--space-m-udix3p, 16px);
|
|
319
319
|
}
|
|
320
|
-
.awsui_expandable-
|
|
320
|
+
.awsui_expandable-section_ig8mp_1014l_314.awsui_expanded_ig8mp_1014l_318:not(#\9) {
|
|
321
321
|
display: block;
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
.awsui_button-
|
|
325
|
-
margin-block: calc(-1 * var(--space-xxs-p8yyaw, 4px) - var(--border-field-
|
|
326
|
-
margin-inline: calc(-1 * var(--space-xxs-p8yyaw, 4px) - var(--border-field-
|
|
324
|
+
.awsui_button-wrapper_ig8mp_1014l_322:not(#\9) {
|
|
325
|
+
margin-block: calc(-1 * var(--space-xxs-p8yyaw, 4px) - var(--border-width-field-h1g7tw, 2px));
|
|
326
|
+
margin-inline: calc(-1 * var(--space-xxs-p8yyaw, 4px) - var(--border-width-field-h1g7tw, 2px));
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
-
.
|
|
329
|
+
.awsui_start_ig8mp_1014l_327:not(#\9) {
|
|
330
330
|
/* used in test-utils */
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
-
.awsui_expand-
|
|
333
|
+
.awsui_expand-button_ig8mp_1014l_331:not(#\9) {
|
|
334
334
|
/* used in test-utils */
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
.awsui_collapse-
|
|
337
|
+
.awsui_collapse-button_ig8mp_1014l_335:not(#\9) {
|
|
338
338
|
/* used in test-utils */
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
.awsui_learn-more-
|
|
341
|
+
.awsui_learn-more-link_ig8mp_1014l_339:not(#\9) {
|
|
342
342
|
/* used in test-utils */
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
-
.
|
|
345
|
+
.awsui_title_ig8mp_1014l_343:not(#\9) {
|
|
346
346
|
/* used in test-utils */
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
.awsui_prerequisites-
|
|
349
|
+
.awsui_prerequisites-alert_ig8mp_1014l_347:not(#\9) {
|
|
350
350
|
/* used in test-utils */
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
.
|
|
353
|
+
.awsui_completed_ig8mp_1014l_351:not(#\9) {
|
|
354
354
|
/* used in test-utils */
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
.awsui_download-
|
|
357
|
+
.awsui_download-link_ig8mp_1014l_355:not(#\9) {
|
|
358
358
|
border-collapse: separate;
|
|
359
359
|
border-spacing: 0;
|
|
360
360
|
box-sizing: border-box;
|
|
@@ -394,18 +394,18 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
394
394
|
letter-spacing: 0.005em;
|
|
395
395
|
color: var(--color-text-body-secondary-cwla8d, #424650);
|
|
396
396
|
}
|
|
397
|
-
.awsui_download-
|
|
397
|
+
.awsui_download-link_ig8mp_1014l_355:not(#\9):hover {
|
|
398
398
|
cursor: pointer;
|
|
399
399
|
}
|
|
400
|
-
.awsui_download-
|
|
400
|
+
.awsui_download-link_ig8mp_1014l_355:not(#\9):focus {
|
|
401
401
|
outline: none;
|
|
402
402
|
}
|
|
403
|
-
.awsui_download-
|
|
403
|
+
.awsui_download-link_ig8mp_1014l_355:not(#\9):active, .awsui_download-link_ig8mp_1014l_355:not(#\9):focus, .awsui_download-link_ig8mp_1014l_355:not(#\9):hover {
|
|
404
404
|
text-decoration: underline;
|
|
405
405
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
406
406
|
text-decoration-color: currentColor;
|
|
407
407
|
}
|
|
408
|
-
body[data-awsui-focus-visible=true] .awsui_download-
|
|
408
|
+
body[data-awsui-focus-visible=true] .awsui_download-link_ig8mp_1014l_355:not(#\9):focus {
|
|
409
409
|
outline: thin dotted;
|
|
410
410
|
outline: var(--border-link-focus-ring-outline-kkfop6, 0);
|
|
411
411
|
outline-offset: 2px;
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"content-enter": "awsui_content-
|
|
6
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
7
|
-
"tutorial-list": "awsui_tutorial-
|
|
8
|
-
"tutorial-box": "awsui_tutorial-
|
|
9
|
-
"tutorial-box-title": "awsui_tutorial-box-
|
|
10
|
-
"tutorial-description-plaintext": "awsui_tutorial-description-
|
|
11
|
-
"tutorial-description": "awsui_tutorial-
|
|
12
|
-
"expandable-section": "awsui_expandable-
|
|
13
|
-
"expanded": "
|
|
14
|
-
"button-wrapper": "awsui_button-
|
|
15
|
-
"start": "
|
|
16
|
-
"expand-button": "awsui_expand-
|
|
17
|
-
"collapse-button": "awsui_collapse-
|
|
18
|
-
"learn-more-link": "awsui_learn-more-
|
|
19
|
-
"title": "
|
|
20
|
-
"prerequisites-alert": "awsui_prerequisites-
|
|
21
|
-
"completed": "
|
|
22
|
-
"download-link": "awsui_download-
|
|
5
|
+
"content-enter": "awsui_content-enter_ig8mp_1014l_189",
|
|
6
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_ig8mp_1014l_1",
|
|
7
|
+
"tutorial-list": "awsui_tutorial-list_ig8mp_1014l_211",
|
|
8
|
+
"tutorial-box": "awsui_tutorial-box_ig8mp_1014l_250",
|
|
9
|
+
"tutorial-box-title": "awsui_tutorial-box-title_ig8mp_1014l_297",
|
|
10
|
+
"tutorial-description-plaintext": "awsui_tutorial-description-plaintext_ig8mp_1014l_303",
|
|
11
|
+
"tutorial-description": "awsui_tutorial-description_ig8mp_1014l_303",
|
|
12
|
+
"expandable-section": "awsui_expandable-section_ig8mp_1014l_314",
|
|
13
|
+
"expanded": "awsui_expanded_ig8mp_1014l_318",
|
|
14
|
+
"button-wrapper": "awsui_button-wrapper_ig8mp_1014l_322",
|
|
15
|
+
"start": "awsui_start_ig8mp_1014l_327",
|
|
16
|
+
"expand-button": "awsui_expand-button_ig8mp_1014l_331",
|
|
17
|
+
"collapse-button": "awsui_collapse-button_ig8mp_1014l_335",
|
|
18
|
+
"learn-more-link": "awsui_learn-more-link_ig8mp_1014l_339",
|
|
19
|
+
"title": "awsui_title_ig8mp_1014l_343",
|
|
20
|
+
"prerequisites-alert": "awsui_prerequisites-alert_ig8mp_1014l_347",
|
|
21
|
+
"completed": "awsui_completed_ig8mp_1014l_351",
|
|
22
|
+
"download-link": "awsui_download-link_ig8mp_1014l_355"
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DateRangePickerProps } from '../../../date-range-picker/interfaces';
|
|
2
|
-
export declare function formatDateRange({ startDate, endDate, timeOffset, hideTimeOffset, format, locale, }: {
|
|
3
|
-
startDate: string;
|
|
4
|
-
endDate: string;
|
|
5
|
-
hideTimeOffset?: boolean;
|
|
6
|
-
timeOffset: {
|
|
7
|
-
startDate?: number;
|
|
8
|
-
endDate?: number;
|
|
9
|
-
};
|
|
10
|
-
format: DateRangePickerProps.AbsoluteFormat;
|
|
11
|
-
locale?: string;
|
|
12
|
-
}): string;
|
|
13
|
-
//# sourceMappingURL=format-date-range.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-date-range.d.ts","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/format-date-range.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAK7E,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,OAAO,EACP,UAAU,EACV,cAAc,EACd,MAAM,EACN,MAAM,GACP,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,MAAM,EAAE,oBAAoB,CAAC,cAAc,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,MAAM,CAqBT"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import formatDateIso from './format-date-iso';
|
|
4
|
-
import formatDateLocalized from './format-date-localized';
|
|
5
|
-
import { isIsoDateOnly } from './is-iso-date-only';
|
|
6
|
-
export function formatDateRange({ startDate, endDate, timeOffset, hideTimeOffset, format, locale, }) {
|
|
7
|
-
const isDateOnly = isIsoDateOnly(startDate) && isIsoDateOnly(endDate);
|
|
8
|
-
return (formatDate({
|
|
9
|
-
date: startDate,
|
|
10
|
-
format,
|
|
11
|
-
hideTimeOffset,
|
|
12
|
-
isDateOnly,
|
|
13
|
-
timeOffset: timeOffset.startDate,
|
|
14
|
-
locale,
|
|
15
|
-
}) +
|
|
16
|
-
' — ' +
|
|
17
|
-
formatDate({
|
|
18
|
-
date: endDate,
|
|
19
|
-
format,
|
|
20
|
-
hideTimeOffset,
|
|
21
|
-
isDateOnly,
|
|
22
|
-
timeOffset: timeOffset.endDate,
|
|
23
|
-
locale,
|
|
24
|
-
}));
|
|
25
|
-
}
|
|
26
|
-
function formatDate({ date, format, hideTimeOffset, isDateOnly, timeOffset, locale, }) {
|
|
27
|
-
switch (format) {
|
|
28
|
-
case 'long-localized': {
|
|
29
|
-
return formatDateLocalized({ date, hideTimeOffset, isDateOnly, locale, timeOffset });
|
|
30
|
-
}
|
|
31
|
-
default: {
|
|
32
|
-
return formatDateIso({ date, hideTimeOffset, isDateOnly, timeOffset });
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=format-date-range.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-date-range.js","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/format-date-range.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,UAAU,eAAe,CAAC,EAC9B,SAAS,EACT,OAAO,EACP,UAAU,EACV,cAAc,EACd,MAAM,EACN,MAAM,GAQP;IACC,MAAM,UAAU,GAAG,aAAa,CAAC,SAAS,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;IACtE,OAAO,CACL,UAAU,CAAC;QACT,IAAI,EAAE,SAAS;QACf,MAAM;QACN,cAAc;QACd,UAAU;QACV,UAAU,EAAE,UAAU,CAAC,SAAS;QAChC,MAAM;KACP,CAAC;QACF,KAAK;QACL,UAAU,CAAC;YACT,IAAI,EAAE,OAAO;YACb,MAAM;YACN,cAAc;YACd,UAAU;YACV,UAAU,EAAE,UAAU,CAAC,OAAO;YAC9B,MAAM;SACP,CAAC,CACH,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,EAClB,IAAI,EACJ,MAAM,EACN,cAAc,EACd,UAAU,EACV,UAAU,EACV,MAAM,GAQP;IACC,QAAQ,MAAM,EAAE;QACd,KAAK,gBAAgB,CAAC,CAAC;YACrB,OAAO,mBAAmB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;SACtF;QACD,OAAO,CAAC,CAAC;YACP,OAAO,aAAa,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC;SACxE;KACF;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { DateRangePickerProps } from '../../../date-range-picker/interfaces';\nimport formatDateIso from './format-date-iso';\nimport formatDateLocalized from './format-date-localized';\nimport { isIsoDateOnly } from './is-iso-date-only';\n\nexport function formatDateRange({\n startDate,\n endDate,\n timeOffset,\n hideTimeOffset,\n format,\n locale,\n}: {\n startDate: string;\n endDate: string;\n hideTimeOffset?: boolean;\n timeOffset: { startDate?: number; endDate?: number };\n format: DateRangePickerProps.AbsoluteFormat;\n locale?: string;\n}): string {\n const isDateOnly = isIsoDateOnly(startDate) && isIsoDateOnly(endDate);\n return (\n formatDate({\n date: startDate,\n format,\n hideTimeOffset,\n isDateOnly,\n timeOffset: timeOffset.startDate,\n locale,\n }) +\n ' — ' +\n formatDate({\n date: endDate,\n format,\n hideTimeOffset,\n isDateOnly,\n timeOffset: timeOffset.endDate,\n locale,\n })\n );\n}\n\nfunction formatDate({\n date,\n format,\n hideTimeOffset,\n isDateOnly,\n timeOffset,\n locale,\n}: {\n date: string;\n format: DateRangePickerProps.AbsoluteFormat;\n hideTimeOffset?: boolean;\n isDateOnly: boolean;\n timeOffset?: number;\n locale?: string;\n}) {\n switch (format) {\n case 'long-localized': {\n return formatDateLocalized({ date, hideTimeOffset, isDateOnly, locale, timeOffset });\n }\n default: {\n return formatDateIso({ date, hideTimeOffset, isDateOnly, timeOffset });\n }\n }\n}\n"]}
|