@cloudscape-design/components 3.0.14 → 3.0.15
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.scoped.css +0 -2
- package/annotation-context/annotation/styles.scoped.css +0 -1
- package/area-chart/styles.scoped.css +0 -1
- package/attribute-editor/styles.scoped.css +0 -1
- package/autosuggest/internal.d.ts.map +1 -1
- package/autosuggest/internal.js +19 -33
- package/autosuggest/internal.js.map +1 -1
- package/autosuggest/options-list.d.ts +19 -0
- package/autosuggest/options-list.d.ts.map +1 -0
- package/autosuggest/options-list.js +37 -0
- package/autosuggest/options-list.js.map +1 -0
- package/autosuggest/plain-list.d.ts +3 -5
- package/autosuggest/plain-list.d.ts.map +1 -1
- package/autosuggest/plain-list.js +7 -7
- package/autosuggest/plain-list.js.map +1 -1
- package/autosuggest/virtual-list.d.ts +2 -6
- package/autosuggest/virtual-list.d.ts.map +1 -1
- package/autosuggest/virtual-list.js +7 -7
- package/autosuggest/virtual-list.js.map +1 -1
- package/badge/styles.scoped.css +0 -1
- package/breadcrumb-group/styles.scoped.css +0 -2
- package/button/styles.scoped.css +0 -1
- package/button-dropdown/mobile-expandable-group/styles.scoped.css +0 -2
- package/cards/styles.scoped.css +0 -1
- package/checkbox/styles.scoped.css +0 -1
- package/code-editor/styles.scoped.css +0 -1
- package/column-layout/styles.scoped.css +0 -1
- package/container/styles.scoped.css +0 -1
- package/date-picker/styles.scoped.css +0 -2
- package/date-range-picker/calendar/header/button/index.d.ts +1 -2
- package/date-range-picker/calendar/header/button/index.d.ts.map +1 -1
- package/date-range-picker/calendar/header/button/index.js +2 -3
- package/date-range-picker/calendar/header/button/index.js.map +1 -1
- package/date-range-picker/calendar/header/index.d.ts +1 -2
- package/date-range-picker/calendar/header/index.d.ts.map +1 -1
- package/date-range-picker/calendar/header/index.js +3 -3
- package/date-range-picker/calendar/header/index.js.map +1 -1
- package/date-range-picker/calendar/index.js +1 -1
- package/date-range-picker/calendar/index.js.map +1 -1
- package/date-range-picker/styles.scoped.css +0 -3
- package/expandable-section/styles.scoped.css +0 -1
- package/flashbar/styles.scoped.css +0 -1
- package/form/styles.scoped.css +0 -1
- package/form-field/styles.scoped.css +0 -1
- package/grid/styles.scoped.css +0 -1
- package/header/styles.scoped.css +0 -1
- package/help-panel/styles.scoped.css +0 -1
- package/input/styles.scoped.css +0 -1
- package/internal/components/abstract-switch/styles.scoped.css +0 -1
- package/internal/components/button-trigger/styles.scoped.css +0 -1
- package/internal/components/chart-filter/styles.scoped.css +0 -1
- package/internal/components/chart-legend/styles.scoped.css +0 -1
- package/internal/components/chart-popover/styles.scoped.css +0 -1
- package/internal/components/chart-series-details/styles.scoped.css +0 -2
- package/internal/components/chart-series-marker/styles.scoped.css +0 -1
- package/internal/components/dropdown/styles.scoped.css +0 -2
- package/internal/components/dropdown-footer/styles.scoped.css +0 -1
- package/internal/components/dropdown-status/styles.scoped.css +0 -1
- package/internal/components/menu-dropdown/styles.scoped.css +0 -1
- package/internal/components/option/styles.scoped.css +0 -1
- package/internal/components/options-list/styles.scoped.css +0 -1
- package/internal/environment.js +1 -1
- package/link/styles.scoped.css +0 -1
- package/mixed-line-bar-chart/styles.scoped.css +0 -1
- package/modal/styles.scoped.css +0 -2
- package/multiselect/styles.scoped.css +0 -1
- package/package.json +1 -1
- package/pagination/styles.scoped.css +0 -1
- package/pie-chart/styles.scoped.css +0 -1
- package/popover/styles.scoped.css +0 -2
- package/progress-bar/styles.scoped.css +0 -1
- package/property-filter/styles.scoped.css +0 -1
- package/radio-group/styles.scoped.css +0 -1
- package/segmented-control/styles.scoped.css +0 -7
- package/select/styles.scoped.css +0 -1
- package/side-navigation/styles.scoped.css +0 -1
- package/split-panel/styles.scoped.css +0 -2
- package/table/resizer/styles.scoped.css +0 -1
- package/tabs/styles.scoped.css +0 -1
- package/text-content/styles.scoped.css +0 -1
- package/text-filter/styles.scoped.css +0 -1
- package/textarea/styles.scoped.css +0 -12
- package/tiles/styles.scoped.css +0 -2
- package/toggle/styles.scoped.css +0 -1
- package/token-group/styles.scoped.css +0 -2
- package/top-navigation/1.0-beta/styles.scoped.css +0 -1
- package/top-navigation/styles.scoped.css +0 -3
- package/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +0 -1
- package/tutorial-panel/components/tutorial-list/styles.scoped.css +0 -3
- package/tutorial-panel/styles.scoped.css +0 -1
- package/wizard/styles.scoped.css +0 -1
- package/autosuggest/hooks/a11y.d.ts +0 -5
- package/autosuggest/hooks/a11y.d.ts.map +0 -1
- package/autosuggest/hooks/a11y.js +0 -24
- package/autosuggest/hooks/a11y.js.map +0 -1
package/cards/styles.scoped.css
CHANGED
|
@@ -132,7 +132,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
132
132
|
font-stretch: normal;
|
|
133
133
|
line-height: normal;
|
|
134
134
|
-webkit-hyphens: none;
|
|
135
|
-
-ms-hyphens: none;
|
|
136
135
|
hyphens: none;
|
|
137
136
|
letter-spacing: normal;
|
|
138
137
|
list-style: disc outside none;
|
|
@@ -493,7 +493,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
493
493
|
font-stretch: normal;
|
|
494
494
|
line-height: normal;
|
|
495
495
|
-webkit-hyphens: none;
|
|
496
|
-
-ms-hyphens: none;
|
|
497
496
|
hyphens: none;
|
|
498
497
|
letter-spacing: normal;
|
|
499
498
|
list-style: disc outside none;
|
|
@@ -110,7 +110,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
110
110
|
font-stretch: normal;
|
|
111
111
|
line-height: normal;
|
|
112
112
|
-webkit-hyphens: none;
|
|
113
|
-
-ms-hyphens: none;
|
|
114
113
|
hyphens: none;
|
|
115
114
|
letter-spacing: normal;
|
|
116
115
|
list-style: disc outside none;
|
|
@@ -134,7 +134,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
134
134
|
font-stretch: normal;
|
|
135
135
|
line-height: normal;
|
|
136
136
|
-webkit-hyphens: none;
|
|
137
|
-
-ms-hyphens: none;
|
|
138
137
|
hyphens: none;
|
|
139
138
|
letter-spacing: normal;
|
|
140
139
|
list-style: disc outside none;
|
|
@@ -198,7 +197,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
198
197
|
font-stretch: normal;
|
|
199
198
|
line-height: normal;
|
|
200
199
|
-webkit-hyphens: none;
|
|
201
|
-
-ms-hyphens: none;
|
|
202
200
|
hyphens: none;
|
|
203
201
|
letter-spacing: normal;
|
|
204
202
|
list-style: disc outside none;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
interface HeaderButtonProps {
|
|
2
2
|
ariaLabel: string;
|
|
3
3
|
isPrevious: boolean;
|
|
4
|
-
focusable: boolean;
|
|
5
4
|
onChangeMonth: (isPrevious: boolean) => void;
|
|
6
5
|
}
|
|
7
|
-
declare const HeaderButton: ({ ariaLabel, isPrevious, onChangeMonth
|
|
6
|
+
declare const HeaderButton: ({ ariaLabel, isPrevious, onChangeMonth }: HeaderButtonProps) => JSX.Element;
|
|
8
7
|
export default HeaderButton;
|
|
9
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/date-range-picker/calendar/header/button/index.tsx"],"names":[],"mappings":"AAMA,UAAU,iBAAiB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/date-range-picker/calendar/header/button/index.tsx"],"names":[],"mappings":"AAMA,UAAU,iBAAiB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED,QAAA,MAAM,YAAY,6CAA8C,iBAAiB,gBAkBhF,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -5,11 +5,10 @@ import React from 'react';
|
|
|
5
5
|
import { InternalButton } from '../../../../button/internal';
|
|
6
6
|
import styles from '../../../styles.css.js';
|
|
7
7
|
var HeaderButton = function (_a) {
|
|
8
|
-
var ariaLabel = _a.ariaLabel, isPrevious = _a.isPrevious, onChangeMonth = _a.onChangeMonth
|
|
8
|
+
var ariaLabel = _a.ariaLabel, isPrevious = _a.isPrevious, onChangeMonth = _a.onChangeMonth;
|
|
9
9
|
var iconName = isPrevious ? 'angle-left' : 'angle-right';
|
|
10
10
|
var additionalAttributes = {
|
|
11
|
-
className: isPrevious ? styles['calendar-prev-month-btn'] : styles['calendar-next-month-btn']
|
|
12
|
-
tabIndex: focusable ? 0 : -1
|
|
11
|
+
className: isPrevious ? styles['calendar-prev-month-btn'] : styles['calendar-next-month-btn']
|
|
13
12
|
};
|
|
14
13
|
var onClick = function () { return onChangeMonth(isPrevious); };
|
|
15
14
|
return (React.createElement(InternalButton, __assign({}, additionalAttributes, { iconName: iconName, ariaLabel: ariaLabel, variant: 'icon', onClick: onClick, formAction: "none" })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/date-range-picker/calendar/header/button/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,MAAM,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/date-range-picker/calendar/header/button/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAQ5C,IAAM,YAAY,GAAG,UAAC,EAA2D;QAAzD,SAAS,eAAA,EAAE,UAAU,gBAAA,EAAE,aAAa,mBAAA;IAC1D,IAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC;IAC3D,IAAM,oBAAoB,GAA4C;QACpE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC;KAC9F,CAAC;IAEF,IAAM,OAAO,GAAG,cAAM,OAAA,aAAa,CAAC,UAAU,CAAC,EAAzB,CAAyB,CAAC;IAEhD,OAAO,CACL,oBAAC,cAAc,eACT,oBAAoB,IACxB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,EAChB,UAAU,EAAC,MAAM,IACjB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { InternalButton } from '../../../../button/internal';\nimport styles from '../../../styles.css.js';\n\ninterface HeaderButtonProps {\n ariaLabel: string;\n isPrevious: boolean;\n onChangeMonth: (isPrevious: boolean) => void;\n}\n\nconst HeaderButton = ({ ariaLabel, isPrevious, onChangeMonth }: HeaderButtonProps) => {\n const iconName = isPrevious ? 'angle-left' : 'angle-right';\n const additionalAttributes: React.HTMLAttributes<HTMLButtonElement> = {\n className: isPrevious ? styles['calendar-prev-month-btn'] : styles['calendar-next-month-btn'],\n };\n\n const onClick = () => onChangeMonth(isPrevious);\n\n return (\n <InternalButton\n {...additionalAttributes}\n iconName={iconName}\n ariaLabel={ariaLabel}\n variant={'icon'}\n onClick={onClick}\n formAction=\"none\"\n />\n );\n};\n\nexport default HeaderButton;\n"]}
|
|
@@ -4,9 +4,8 @@ interface CalendarHeaderProps {
|
|
|
4
4
|
onChangeMonth: (prev?: boolean) => void;
|
|
5
5
|
previousMonthLabel: string;
|
|
6
6
|
nextMonthLabel: string;
|
|
7
|
-
calendarHasFocus: boolean;
|
|
8
7
|
isSingleGrid: boolean;
|
|
9
8
|
}
|
|
10
|
-
declare const CalendarHeader: ({ baseDate, locale, onChangeMonth, previousMonthLabel, nextMonthLabel,
|
|
9
|
+
declare const CalendarHeader: ({ baseDate, locale, onChangeMonth, previousMonthLabel, nextMonthLabel, isSingleGrid, }: CalendarHeaderProps) => JSX.Element;
|
|
11
10
|
export default CalendarHeader;
|
|
12
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/date-range-picker/calendar/header/index.tsx"],"names":[],"mappings":"AAQA,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,IAAI,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/date-range-picker/calendar/header/index.tsx"],"names":[],"mappings":"AAQA,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,IAAI,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,cAAc,2FAOjB,mBAAmB,gBAerB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -6,13 +6,13 @@ import styles from '../../styles.css.js';
|
|
|
6
6
|
import { renderMonthAndYear } from '../../../date-picker/calendar/utils/intl';
|
|
7
7
|
import HeaderButton from './button';
|
|
8
8
|
var CalendarHeader = function (_a) {
|
|
9
|
-
var baseDate = _a.baseDate, locale = _a.locale, onChangeMonth = _a.onChangeMonth, previousMonthLabel = _a.previousMonthLabel, nextMonthLabel = _a.nextMonthLabel,
|
|
9
|
+
var baseDate = _a.baseDate, locale = _a.locale, onChangeMonth = _a.onChangeMonth, previousMonthLabel = _a.previousMonthLabel, nextMonthLabel = _a.nextMonthLabel, isSingleGrid = _a.isSingleGrid;
|
|
10
10
|
return (React.createElement("div", { className: styles['calendar-header'] },
|
|
11
|
-
React.createElement(HeaderButton, { ariaLabel: previousMonthLabel, isPrevious: true, onChangeMonth: onChangeMonth
|
|
11
|
+
React.createElement(HeaderButton, { ariaLabel: previousMonthLabel, isPrevious: true, onChangeMonth: onChangeMonth }),
|
|
12
12
|
React.createElement("div", { "aria-live": "polite", className: styles['calendar-header-months-wrapper'] },
|
|
13
13
|
!isSingleGrid && (React.createElement("div", { className: styles['calendar-header-month'] }, renderMonthAndYear(locale, add(baseDate, { months: -1 })))),
|
|
14
14
|
React.createElement("div", { className: styles['calendar-header-month'] }, renderMonthAndYear(locale, baseDate))),
|
|
15
|
-
React.createElement(HeaderButton, { ariaLabel: nextMonthLabel, isPrevious: false, onChangeMonth: onChangeMonth
|
|
15
|
+
React.createElement(HeaderButton, { ariaLabel: nextMonthLabel, isPrevious: false, onChangeMonth: onChangeMonth })));
|
|
16
16
|
};
|
|
17
17
|
export default CalendarHeader;
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/date-range-picker/calendar/header/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,GAAG,E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AAS,EAAE,cAAc,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,GAAI,CACxF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { add } from 'date-fns';\nimport React from 'react';\nimport styles from '../../styles.css.js';\nimport { renderMonthAndYear } from '../../../date-picker/calendar/utils/intl';\nimport HeaderButton from './button';\n\ninterface CalendarHeaderProps {\n baseDate: Date;\n locale: string;\n onChangeMonth: (prev?: boolean) => void;\n previousMonthLabel: string;\n nextMonthLabel: string;\n isSingleGrid: boolean;\n}\n\nconst CalendarHeader = ({\n baseDate,\n locale,\n onChangeMonth,\n previousMonthLabel,\n nextMonthLabel,\n isSingleGrid,\n}: CalendarHeaderProps) => {\n return (\n <div className={styles['calendar-header']}>\n <HeaderButton ariaLabel={previousMonthLabel} isPrevious={true} onChangeMonth={onChangeMonth} />\n <div aria-live=\"polite\" className={styles['calendar-header-months-wrapper']}>\n {!isSingleGrid && (\n <div className={styles['calendar-header-month']}>\n {renderMonthAndYear(locale, add(baseDate, { months: -1 }))}\n </div>\n )}\n <div className={styles['calendar-header-month']}>{renderMonthAndYear(locale, baseDate)}</div>\n </div>\n <HeaderButton ariaLabel={nextMonthLabel} isPrevious={false} onChangeMonth={onChangeMonth} />\n </div>\n );\n};\n\nexport default CalendarHeader;\n"]}
|
|
@@ -199,7 +199,7 @@ function Calendar(_a, ref) {
|
|
|
199
199
|
React.createElement("div", { className: clsx(styles.calendar, (_b = {},
|
|
200
200
|
_b[styles['one-grid']] = isSingleGrid,
|
|
201
201
|
_b)), role: "application", ref: elementRef },
|
|
202
|
-
React.createElement(CalendarHeader, { baseDate: currentMonth, locale: locale, onChangeMonth: onHeaderChangeMonthHandler, previousMonthLabel: i18nStrings.previousMonthAriaLabel, nextMonthLabel: i18nStrings.nextMonthAriaLabel,
|
|
202
|
+
React.createElement(CalendarHeader, { baseDate: currentMonth, locale: locale, onChangeMonth: onHeaderChangeMonthHandler, previousMonthLabel: i18nStrings.previousMonthAriaLabel, nextMonthLabel: i18nStrings.nextMonthAriaLabel, isSingleGrid: isSingleGrid }),
|
|
203
203
|
React.createElement(Grids, { isSingleGrid: isSingleGrid, locale: locale, baseDate: currentMonth, focusedDate: focusedDate, onFocusedDateChange: setFocusedDate, isDateEnabled: isDateEnabled, onSelectDate: onSelectDateHandler, onChangeMonth: setCurrentMonth, startOfWeek: startOfWeek, todayAriaLabel: i18nStrings.todayAriaLabel, selectedStartDate: selectedStartDate, selectedEndDate: selectedEndDate, handleFocusMove: moveFocusHandler })),
|
|
204
204
|
React.createElement(InternalSpaceBetween, { direction: "vertical", size: "xxs" },
|
|
205
205
|
React.createElement(InternalSpaceBetween, { size: "xs", direction: isSingleGrid ? 'vertical' : 'horizontal' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/date-range-picker/calendar/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACzG,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAGtC,OAAO,cAAc,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,gBAAgB,MAAM,qDAAqD,CAAC;AACnF,OAAO,EACL,YAAY,EACZ,UAAU,EACV,UAAU,EACV,8BAA8B,EAC9B,YAAY,EACZ,SAAS,GACV,MAAM,uCAAuC,CAAC;AAC/C,OAAO,oBAA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CAAC,sBAAsB,IAAI,CACrC,6BAAK,SAAS,EAAE,MAAM,CAAC,8BAA8B,CAAC,EAAE,EAAE,EAAE,gBAAgB,IACzE,WAAW,CAAC,sBAAsB,CAC/B,CACP,CACoB,CACF;QACvB,oBAAC,UAAU;YACT,8BAAM,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,IAAG,YAAY,CAAQ,CACzD,CACZ,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport { addMonths, endOfDay, isBefore, startOfDay, startOfMonth, isAfter, isSameMonth } from 'date-fns';\nimport styles from '../styles.css.js';\nimport { BaseComponentProps } from '../../internal/base-component';\nimport { DateRangePickerProps, Focusable } from '../interfaces';\nimport CalendarHeader from './header';\nimport { Grids, selectFocusedDate } from './grids';\nimport moveFocusHandler from '../../date-picker/calendar/utils/move-focus-handler';\nimport {\n displayToIso,\n formatDate,\n formatTime,\n formatISOStringWithoutTimezone,\n isoToDisplay,\n parseDate,\n} from '../../date-picker/calendar/utils/date';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport InternalFormField from '../../form-field/internal';\nimport { InputProps } from '../../input/interfaces';\nimport DateInput from '../../internal/components/date-input';\nimport { TimeInputProps } from '../../time-input/interfaces';\nimport InternalTimeInput from '../../time-input/internal';\nimport clsx from 'clsx';\nimport { getBaseDate } from './get-base-date.js';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport { getDateLabel, renderTimeLabel } from '../../date-picker/calendar/utils/intl';\nimport LiveRegion from '../../internal/components/live-region';\n\nexport interface DateChangeHandler {\n (detail: Date): void;\n}\n\nexport interface MonthChangeHandler {\n (newMonth: Date): void;\n}\n\nexport type DayIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\ninterface HeaderChangeMonthHandler {\n (isPreviousButtonClick?: boolean): void;\n}\n\nexport interface CalendarProps extends BaseComponentProps {\n locale: string;\n startOfWeek: DayIndex;\n isDateEnabled: DateRangePickerProps.IsDateEnabledFunction;\n onSelectDateRange: (value: DateRangePickerProps.AbsoluteValue) => void;\n initialStartDate: string | undefined;\n initialEndDate: string | undefined;\n i18nStrings: DateRangePickerProps.I18nStrings;\n dateOnly: boolean;\n timeInputFormat: TimeInputProps.Format;\n isSingleGrid: boolean;\n}\n\nexport default forwardRef(Calendar);\n\nfunction Calendar(\n {\n locale,\n startOfWeek,\n isDateEnabled,\n onSelectDateRange,\n initialEndDate = '',\n initialStartDate = '',\n i18nStrings,\n dateOnly,\n isSingleGrid,\n timeInputFormat,\n }: CalendarProps,\n ref: React.Ref<Focusable>\n) {\n const elementRef = useRef<HTMLDivElement>(null);\n\n useImperativeHandle(ref, () => ({\n focus() {\n if (elementRef.current) {\n const prevButton = elementRef.current.getElementsByClassName(styles['calendar-prev-month-btn'])[0];\n (prevButton as undefined | HTMLButtonElement)?.focus();\n }\n },\n }));\n\n const [initialStartDateString = '', initialStartTimeString = ''] = initialStartDate.split('T');\n const [initialEndDateString = '', initialEndTimeString = ''] = initialEndDate.split('T');\n\n const [startDateString, setStartDateString] = useState(initialStartDateString);\n const [startTimeString, setStartTimeString] = useState(initialStartTimeString);\n\n const [endDateString, setEndDateString] = useState(initialEndDateString);\n const [endTimeString, setEndTimeString] = useState(initialEndTimeString);\n\n const selectedStartDate = parseDate(startDateString, true);\n const selectedEndDate = parseDate(endDateString, true);\n\n const [announcement, setAnnouncement] = useState('');\n\n const [currentMonth, setCurrentMonth] = useState(() => {\n if (startDateString) {\n const startDate = parseDate(startDateString);\n if (isSingleGrid) {\n return startOfMonth(startDate);\n }\n return startOfMonth(addMonths(startDate, 1));\n }\n if (endDateString) {\n return startOfMonth(parseDate(endDateString));\n }\n return startOfMonth(Date.now());\n });\n\n const [focusedDate, setFocusedDate] = useState<Date | null>(() => {\n if (selectedStartDate) {\n if (isSameMonth(selectedStartDate, currentMonth)) {\n return selectedStartDate;\n }\n if (!isSingleGrid && isSameMonth(selectedStartDate, addMonths(currentMonth, -1))) {\n return selectedStartDate;\n }\n }\n return selectFocusedDate(selectedStartDate, currentMonth, isDateEnabled);\n });\n\n useEffect(() => {\n // This effect \"synchronizes\" the local state update back up to the overall DateRangePicker component\n\n const startDate = formatISOStringWithoutTimezone(startDateString, startTimeString);\n const endDate = formatISOStringWithoutTimezone(endDateString, endTimeString);\n\n if (startDate !== initialStartDate || endDate !== initialEndDate) {\n onSelectDateRange({\n startDate,\n endDate,\n type: 'absolute',\n });\n }\n }, [\n startDateString,\n startTimeString,\n endDateString,\n endTimeString,\n onSelectDateRange,\n initialStartDate,\n initialEndDate,\n ]);\n\n const onSelectDateHandler = (selectedDate: Date) => {\n // recommended to include the start/end time announced with the selection\n // because the user is not aware of the fact that a start/end time is also set as soon as they select a date\n const announceStart = (startDate: Date) => {\n return (\n i18nStrings.startDateLabel +\n ', ' +\n getDateLabel(locale, startDate) +\n ', ' +\n i18nStrings.startTimeLabel +\n ', ' +\n renderTimeLabel(locale, startDate, timeInputFormat) +\n '. '\n );\n };\n\n const announceEnd = (endDate: Date) => {\n return (\n i18nStrings.endDateLabel +\n ', ' +\n getDateLabel(locale, endDate) +\n ', ' +\n i18nStrings.endTimeLabel +\n ', ' +\n renderTimeLabel(locale, endDate, timeInputFormat) +\n '. '\n );\n };\n\n const announceRange = (startDate: Date, endDate: Date) => {\n if (!i18nStrings.renderSelectedAbsoluteRangeAriaLive) {\n return `${getDateLabel(locale, startDate)} – ${getDateLabel(locale, endDate)}`;\n }\n return i18nStrings.renderSelectedAbsoluteRangeAriaLive(\n getDateLabel(locale, startDate),\n getDateLabel(locale, endDate)\n );\n };\n\n // If both fields are empty, we set the start date\n if (!startDateString && !endDateString) {\n const startDate = startOfDay(selectedDate);\n setStartDateString(formatDate(startDate));\n setStartTimeString(formatTime(startDate));\n setAnnouncement(announceStart(startDate));\n return;\n }\n\n // If both fields are set, we start new\n if (startDateString && endDateString) {\n const startDate = startOfDay(selectedDate);\n setStartDateString(formatDate(startDate));\n setStartTimeString(formatTime(startDate));\n\n setEndDateString('');\n setEndTimeString('');\n setAnnouncement(announceStart(startDate));\n return;\n }\n\n // If only the END date is empty, we fill it (and swap dates if needed)\n if (startDateString && !endDateString) {\n const parsedStartDate = parseDate(startDateString);\n\n if (isBefore(selectedDate, parsedStartDate)) {\n // The user has selected the range backwards, so we swap start and end\n\n const startDate = startOfDay(selectedDate);\n const endDate = endOfDay(parsedStartDate);\n\n setStartDateString(formatDate(startDate));\n setStartTimeString(formatTime(startDate));\n\n setEndDateString(formatDate(endDate));\n setEndTimeString(formatTime(endDate));\n setAnnouncement(announceStart(startDate) + announceRange(startDate, endDate));\n } else {\n const endDate = endOfDay(selectedDate);\n setEndDateString(formatDate(endDate));\n setEndTimeString(formatTime(endDate));\n setAnnouncement(announceEnd(endDate) + announceRange(parsedStartDate, endDate));\n }\n return;\n }\n\n // If only the START date is empty, we fill it (and swap dates if needed)\n if (!startDateString && endDateString) {\n const existingEndDate = parseDate(endDateString);\n\n if (isAfter(selectedDate, existingEndDate)) {\n // The user has selected the range backwards, so we swap start and end\n\n const startDate = startOfDay(existingEndDate);\n const endDate = endOfDay(selectedDate);\n\n setStartDateString(formatDate(startDate));\n setStartTimeString(formatTime(startDate));\n\n setEndDateString(formatDate(endDate));\n setEndTimeString(formatTime(endDate));\n setAnnouncement(announceEnd(endDate) + announceRange(startDate, endDate));\n } else {\n const startDate = startOfDay(selectedDate);\n setStartDateString(formatDate(startDate));\n setStartTimeString(formatTime(startDate));\n setAnnouncement(announceStart(startDate) + announceRange(startDate, existingEndDate));\n }\n return;\n }\n // All possible conditions are covered above\n };\n\n const onHeaderChangeMonthHandler: HeaderChangeMonthHandler = isPrevious => {\n const newCurrentMonth = addMonths(currentMonth, isPrevious ? -1 : 1);\n setCurrentMonth(newCurrentMonth);\n\n const newBaseDateMonth = isSingleGrid ? newCurrentMonth : addMonths(newCurrentMonth, -1);\n const newBaseDate = getBaseDate(newBaseDateMonth, 1, isDateEnabled);\n setFocusedDate(newBaseDate);\n };\n\n const onChangeStartDate: InputProps['onChange'] = e => {\n const isoDateString = displayToIso(e.detail.value);\n setStartDateString(isoDateString);\n\n if (isoDateString.length >= 8) {\n const newCurrentMonth = startOfMonth(parseDate(isoDateString));\n setCurrentMonth(isSingleGrid ? newCurrentMonth : addMonths(newCurrentMonth, 1));\n }\n };\n\n const onChangeEndDate: InputProps['onChange'] = e => {\n const isoDateString = displayToIso(e.detail.value);\n setEndDateString(isoDateString);\n };\n\n let constrainttextId = useUniqueId('awsui-area-date-range-picker');\n constrainttextId = i18nStrings.dateTimeConstraintText ? constrainttextId : '';\n\n return (\n <>\n <InternalSpaceBetween size=\"m\">\n <div\n className={clsx(styles.calendar, {\n [styles['one-grid']]: isSingleGrid,\n })}\n role=\"application\"\n ref={elementRef}\n >\n <CalendarHeader\n baseDate={currentMonth}\n locale={locale}\n onChangeMonth={onHeaderChangeMonthHandler}\n previousMonthLabel={i18nStrings.previousMonthAriaLabel}\n nextMonthLabel={i18nStrings.nextMonthAriaLabel}\n calendarHasFocus={true}\n isSingleGrid={isSingleGrid}\n />\n\n <Grids\n isSingleGrid={isSingleGrid}\n locale={locale}\n baseDate={currentMonth}\n focusedDate={focusedDate}\n onFocusedDateChange={setFocusedDate}\n isDateEnabled={isDateEnabled}\n onSelectDate={onSelectDateHandler}\n onChangeMonth={setCurrentMonth}\n startOfWeek={startOfWeek}\n todayAriaLabel={i18nStrings.todayAriaLabel}\n selectedStartDate={selectedStartDate}\n selectedEndDate={selectedEndDate}\n handleFocusMove={moveFocusHandler}\n />\n </div>\n <InternalSpaceBetween direction=\"vertical\" size=\"xxs\">\n <InternalSpaceBetween size=\"xs\" direction={isSingleGrid ? 'vertical' : 'horizontal'}>\n <div className={styles['date-and-time-wrapper']}>\n <div className={styles['date-and-time-wrapper__date']}>\n <InternalFormField label={i18nStrings.startDateLabel} stretch={true}>\n <DateInput\n value={isoToDisplay(startDateString)}\n autoComplete={false}\n disableBrowserAutocorrect={true}\n disableAutocompleteOnBlur={false}\n className={styles['start-date-input']}\n onChange={onChangeStartDate}\n placeholder=\"YYYY/MM/DD\"\n ariaDescribedby={constrainttextId}\n />\n </InternalFormField>\n </div>\n {!dateOnly && (\n <div className={styles['date-and-time-wrapper__time']}>\n <InternalFormField label={i18nStrings.startTimeLabel} stretch={true}>\n <InternalTimeInput\n value={startTimeString}\n onChange={e => setStartTimeString(e.detail.value)}\n format={timeInputFormat}\n placeholder={timeInputFormat}\n className={styles['start-time-input']}\n ariaDescribedby={constrainttextId}\n />\n </InternalFormField>\n </div>\n )}\n </div>\n\n <div className={styles['date-and-time-wrapper']}>\n <div className={styles['date-and-time-wrapper__date']}>\n <InternalFormField label={i18nStrings.endDateLabel} stretch={true}>\n <DateInput\n value={isoToDisplay(endDateString)}\n autoComplete={false}\n disableBrowserAutocorrect={true}\n disableAutocompleteOnBlur={false}\n className={styles['end-date-input']}\n onChange={onChangeEndDate}\n placeholder=\"YYYY/MM/DD\"\n ariaDescribedby={constrainttextId}\n />\n </InternalFormField>\n </div>\n {!dateOnly && (\n <div className={styles['date-and-time-wrapper__time']}>\n <InternalFormField label={i18nStrings.endTimeLabel} stretch={true}>\n <InternalTimeInput\n value={endTimeString}\n onChange={e => setEndTimeString(e.detail.value)}\n format={timeInputFormat}\n placeholder={timeInputFormat}\n className={styles['end-time-input']}\n ariaDescribedby={constrainttextId}\n />\n </InternalFormField>\n </div>\n )}\n </div>\n </InternalSpaceBetween>\n {i18nStrings.dateTimeConstraintText && (\n <div className={styles['date-and-time-constrainttext']} id={constrainttextId}>\n {i18nStrings.dateTimeConstraintText}\n </div>\n )}\n </InternalSpaceBetween>\n </InternalSpaceBetween>\n <LiveRegion>\n <span className={styles['calendar-aria-live']}>{announcement}</span>\n </LiveRegion>\n </>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/date-range-picker/calendar/index.tsx"],"names":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e,EACzB,WAAW,EAAC,YAAY,EACxB,eAAe,EAAE,gBAAgB,GACjC,CACgB,CAChB;wBACL,CAAC,QAAQ,IAAI,CACZ,6BAAK,SAAS,EAAE,MAAM,CAAC,6BAA6B,CAAC;4BACnD,oBAAC,iBAAiB,IAAC,KAAK,EAAE,WAAW,CAAC,YAAY,EAAE,OAAO,EAAE,IAAI;gCAC/D,oBAAC,iBAAiB,IAChB,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,UAAA,CAAC,IAAI,OAAA,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAhC,CAAgC,EAC/C,MAAM,EAAE,eAAe,EACvB,WAAW,EAAE,eAAe,EAC5B,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EACnC,eAAe,EAAE,gBAAgB,GACjC,CACgB,CAChB,CACP,CACG,CACe;gBACtB,WAAW,CAAC,sBAAsB,IAAI,CACrC,6BAAK,SAAS,EAAE,MAAM,CAAC,8BAA8B,CAAC,EAAE,EAAE,EAAE,gBAAgB,IACzE,WAAW,CAAC,sBAAsB,CAC/B,CACP,CACoB,CACF;QACvB,oBAAC,UAAU;YACT,8BAAM,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,IAAG,YAAY,CAAQ,CACzD,CACZ,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport { addMonths, endOfDay, isBefore, startOfDay, startOfMonth, isAfter, isSameMonth } from 'date-fns';\nimport styles from '../styles.css.js';\nimport { BaseComponentProps } from '../../internal/base-component';\nimport { DateRangePickerProps, Focusable } from '../interfaces';\nimport CalendarHeader from './header';\nimport { Grids, selectFocusedDate } from './grids';\nimport moveFocusHandler from '../../date-picker/calendar/utils/move-focus-handler';\nimport {\n displayToIso,\n formatDate,\n formatTime,\n formatISOStringWithoutTimezone,\n isoToDisplay,\n parseDate,\n} from '../../date-picker/calendar/utils/date';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport InternalFormField from '../../form-field/internal';\nimport { InputProps } from '../../input/interfaces';\nimport DateInput from '../../internal/components/date-input';\nimport { TimeInputProps } from '../../time-input/interfaces';\nimport InternalTimeInput from '../../time-input/internal';\nimport clsx from 'clsx';\nimport { getBaseDate } from './get-base-date.js';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport { getDateLabel, renderTimeLabel } from '../../date-picker/calendar/utils/intl';\nimport LiveRegion from '../../internal/components/live-region';\n\nexport interface DateChangeHandler {\n (detail: Date): void;\n}\n\nexport interface MonthChangeHandler {\n (newMonth: Date): void;\n}\n\nexport type DayIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\ninterface HeaderChangeMonthHandler {\n (isPreviousButtonClick?: boolean): void;\n}\n\nexport interface CalendarProps extends BaseComponentProps {\n locale: string;\n startOfWeek: DayIndex;\n isDateEnabled: DateRangePickerProps.IsDateEnabledFunction;\n onSelectDateRange: (value: DateRangePickerProps.AbsoluteValue) => void;\n initialStartDate: string | undefined;\n initialEndDate: string | undefined;\n i18nStrings: DateRangePickerProps.I18nStrings;\n dateOnly: boolean;\n timeInputFormat: TimeInputProps.Format;\n isSingleGrid: boolean;\n}\n\nexport default forwardRef(Calendar);\n\nfunction Calendar(\n {\n locale,\n startOfWeek,\n isDateEnabled,\n onSelectDateRange,\n initialEndDate = '',\n initialStartDate = '',\n i18nStrings,\n dateOnly,\n isSingleGrid,\n timeInputFormat,\n }: CalendarProps,\n ref: React.Ref<Focusable>\n) {\n const elementRef = useRef<HTMLDivElement>(null);\n\n useImperativeHandle(ref, () => ({\n focus() {\n if (elementRef.current) {\n const prevButton = elementRef.current.getElementsByClassName(styles['calendar-prev-month-btn'])[0];\n (prevButton as undefined | HTMLButtonElement)?.focus();\n }\n },\n }));\n\n const [initialStartDateString = '', initialStartTimeString = ''] = initialStartDate.split('T');\n const [initialEndDateString = '', initialEndTimeString = ''] = initialEndDate.split('T');\n\n const [startDateString, setStartDateString] = useState(initialStartDateString);\n const [startTimeString, setStartTimeString] = useState(initialStartTimeString);\n\n const [endDateString, setEndDateString] = useState(initialEndDateString);\n const [endTimeString, setEndTimeString] = useState(initialEndTimeString);\n\n const selectedStartDate = parseDate(startDateString, true);\n const selectedEndDate = parseDate(endDateString, true);\n\n const [announcement, setAnnouncement] = useState('');\n\n const [currentMonth, setCurrentMonth] = useState(() => {\n if (startDateString) {\n const startDate = parseDate(startDateString);\n if (isSingleGrid) {\n return startOfMonth(startDate);\n }\n return startOfMonth(addMonths(startDate, 1));\n }\n if (endDateString) {\n return startOfMonth(parseDate(endDateString));\n }\n return startOfMonth(Date.now());\n });\n\n const [focusedDate, setFocusedDate] = useState<Date | null>(() => {\n if (selectedStartDate) {\n if (isSameMonth(selectedStartDate, currentMonth)) {\n return selectedStartDate;\n }\n if (!isSingleGrid && isSameMonth(selectedStartDate, addMonths(currentMonth, -1))) {\n return selectedStartDate;\n }\n }\n return selectFocusedDate(selectedStartDate, currentMonth, isDateEnabled);\n });\n\n useEffect(() => {\n // This effect \"synchronizes\" the local state update back up to the overall DateRangePicker component\n\n const startDate = formatISOStringWithoutTimezone(startDateString, startTimeString);\n const endDate = formatISOStringWithoutTimezone(endDateString, endTimeString);\n\n if (startDate !== initialStartDate || endDate !== initialEndDate) {\n onSelectDateRange({\n startDate,\n endDate,\n type: 'absolute',\n });\n }\n }, [\n startDateString,\n startTimeString,\n endDateString,\n endTimeString,\n onSelectDateRange,\n initialStartDate,\n initialEndDate,\n ]);\n\n const onSelectDateHandler = (selectedDate: Date) => {\n // recommended to include the start/end time announced with the selection\n // because the user is not aware of the fact that a start/end time is also set as soon as they select a date\n const announceStart = (startDate: Date) => {\n return (\n i18nStrings.startDateLabel +\n ', ' +\n getDateLabel(locale, startDate) +\n ', ' +\n i18nStrings.startTimeLabel +\n ', ' +\n renderTimeLabel(locale, startDate, timeInputFormat) +\n '. '\n );\n };\n\n const announceEnd = (endDate: Date) => {\n return (\n i18nStrings.endDateLabel +\n ', ' +\n getDateLabel(locale, endDate) +\n ', ' +\n i18nStrings.endTimeLabel +\n ', ' +\n renderTimeLabel(locale, endDate, timeInputFormat) +\n '. '\n );\n };\n\n const announceRange = (startDate: Date, endDate: Date) => {\n if (!i18nStrings.renderSelectedAbsoluteRangeAriaLive) {\n return `${getDateLabel(locale, startDate)} – ${getDateLabel(locale, endDate)}`;\n }\n return i18nStrings.renderSelectedAbsoluteRangeAriaLive(\n getDateLabel(locale, startDate),\n getDateLabel(locale, endDate)\n );\n };\n\n // If both fields are empty, we set the start date\n if (!startDateString && !endDateString) {\n const startDate = startOfDay(selectedDate);\n setStartDateString(formatDate(startDate));\n setStartTimeString(formatTime(startDate));\n setAnnouncement(announceStart(startDate));\n return;\n }\n\n // If both fields are set, we start new\n if (startDateString && endDateString) {\n const startDate = startOfDay(selectedDate);\n setStartDateString(formatDate(startDate));\n setStartTimeString(formatTime(startDate));\n\n setEndDateString('');\n setEndTimeString('');\n setAnnouncement(announceStart(startDate));\n return;\n }\n\n // If only the END date is empty, we fill it (and swap dates if needed)\n if (startDateString && !endDateString) {\n const parsedStartDate = parseDate(startDateString);\n\n if (isBefore(selectedDate, parsedStartDate)) {\n // The user has selected the range backwards, so we swap start and end\n\n const startDate = startOfDay(selectedDate);\n const endDate = endOfDay(parsedStartDate);\n\n setStartDateString(formatDate(startDate));\n setStartTimeString(formatTime(startDate));\n\n setEndDateString(formatDate(endDate));\n setEndTimeString(formatTime(endDate));\n setAnnouncement(announceStart(startDate) + announceRange(startDate, endDate));\n } else {\n const endDate = endOfDay(selectedDate);\n setEndDateString(formatDate(endDate));\n setEndTimeString(formatTime(endDate));\n setAnnouncement(announceEnd(endDate) + announceRange(parsedStartDate, endDate));\n }\n return;\n }\n\n // If only the START date is empty, we fill it (and swap dates if needed)\n if (!startDateString && endDateString) {\n const existingEndDate = parseDate(endDateString);\n\n if (isAfter(selectedDate, existingEndDate)) {\n // The user has selected the range backwards, so we swap start and end\n\n const startDate = startOfDay(existingEndDate);\n const endDate = endOfDay(selectedDate);\n\n setStartDateString(formatDate(startDate));\n setStartTimeString(formatTime(startDate));\n\n setEndDateString(formatDate(endDate));\n setEndTimeString(formatTime(endDate));\n setAnnouncement(announceEnd(endDate) + announceRange(startDate, endDate));\n } else {\n const startDate = startOfDay(selectedDate);\n setStartDateString(formatDate(startDate));\n setStartTimeString(formatTime(startDate));\n setAnnouncement(announceStart(startDate) + announceRange(startDate, existingEndDate));\n }\n return;\n }\n // All possible conditions are covered above\n };\n\n const onHeaderChangeMonthHandler: HeaderChangeMonthHandler = isPrevious => {\n const newCurrentMonth = addMonths(currentMonth, isPrevious ? -1 : 1);\n setCurrentMonth(newCurrentMonth);\n\n const newBaseDateMonth = isSingleGrid ? newCurrentMonth : addMonths(newCurrentMonth, -1);\n const newBaseDate = getBaseDate(newBaseDateMonth, 1, isDateEnabled);\n setFocusedDate(newBaseDate);\n };\n\n const onChangeStartDate: InputProps['onChange'] = e => {\n const isoDateString = displayToIso(e.detail.value);\n setStartDateString(isoDateString);\n\n if (isoDateString.length >= 8) {\n const newCurrentMonth = startOfMonth(parseDate(isoDateString));\n setCurrentMonth(isSingleGrid ? newCurrentMonth : addMonths(newCurrentMonth, 1));\n }\n };\n\n const onChangeEndDate: InputProps['onChange'] = e => {\n const isoDateString = displayToIso(e.detail.value);\n setEndDateString(isoDateString);\n };\n\n let constrainttextId = useUniqueId('awsui-area-date-range-picker');\n constrainttextId = i18nStrings.dateTimeConstraintText ? constrainttextId : '';\n\n return (\n <>\n <InternalSpaceBetween size=\"m\">\n <div\n className={clsx(styles.calendar, {\n [styles['one-grid']]: isSingleGrid,\n })}\n role=\"application\"\n ref={elementRef}\n >\n <CalendarHeader\n baseDate={currentMonth}\n locale={locale}\n onChangeMonth={onHeaderChangeMonthHandler}\n previousMonthLabel={i18nStrings.previousMonthAriaLabel}\n nextMonthLabel={i18nStrings.nextMonthAriaLabel}\n isSingleGrid={isSingleGrid}\n />\n\n <Grids\n isSingleGrid={isSingleGrid}\n locale={locale}\n baseDate={currentMonth}\n focusedDate={focusedDate}\n onFocusedDateChange={setFocusedDate}\n isDateEnabled={isDateEnabled}\n onSelectDate={onSelectDateHandler}\n onChangeMonth={setCurrentMonth}\n startOfWeek={startOfWeek}\n todayAriaLabel={i18nStrings.todayAriaLabel}\n selectedStartDate={selectedStartDate}\n selectedEndDate={selectedEndDate}\n handleFocusMove={moveFocusHandler}\n />\n </div>\n <InternalSpaceBetween direction=\"vertical\" size=\"xxs\">\n <InternalSpaceBetween size=\"xs\" direction={isSingleGrid ? 'vertical' : 'horizontal'}>\n <div className={styles['date-and-time-wrapper']}>\n <div className={styles['date-and-time-wrapper__date']}>\n <InternalFormField label={i18nStrings.startDateLabel} stretch={true}>\n <DateInput\n value={isoToDisplay(startDateString)}\n autoComplete={false}\n disableBrowserAutocorrect={true}\n disableAutocompleteOnBlur={false}\n className={styles['start-date-input']}\n onChange={onChangeStartDate}\n placeholder=\"YYYY/MM/DD\"\n ariaDescribedby={constrainttextId}\n />\n </InternalFormField>\n </div>\n {!dateOnly && (\n <div className={styles['date-and-time-wrapper__time']}>\n <InternalFormField label={i18nStrings.startTimeLabel} stretch={true}>\n <InternalTimeInput\n value={startTimeString}\n onChange={e => setStartTimeString(e.detail.value)}\n format={timeInputFormat}\n placeholder={timeInputFormat}\n className={styles['start-time-input']}\n ariaDescribedby={constrainttextId}\n />\n </InternalFormField>\n </div>\n )}\n </div>\n\n <div className={styles['date-and-time-wrapper']}>\n <div className={styles['date-and-time-wrapper__date']}>\n <InternalFormField label={i18nStrings.endDateLabel} stretch={true}>\n <DateInput\n value={isoToDisplay(endDateString)}\n autoComplete={false}\n disableBrowserAutocorrect={true}\n disableAutocompleteOnBlur={false}\n className={styles['end-date-input']}\n onChange={onChangeEndDate}\n placeholder=\"YYYY/MM/DD\"\n ariaDescribedby={constrainttextId}\n />\n </InternalFormField>\n </div>\n {!dateOnly && (\n <div className={styles['date-and-time-wrapper__time']}>\n <InternalFormField label={i18nStrings.endTimeLabel} stretch={true}>\n <InternalTimeInput\n value={endTimeString}\n onChange={e => setEndTimeString(e.detail.value)}\n format={timeInputFormat}\n placeholder={timeInputFormat}\n className={styles['end-time-input']}\n ariaDescribedby={constrainttextId}\n />\n </InternalFormField>\n </div>\n )}\n </div>\n </InternalSpaceBetween>\n {i18nStrings.dateTimeConstraintText && (\n <div className={styles['date-and-time-constrainttext']} id={constrainttextId}>\n {i18nStrings.dateTimeConstraintText}\n </div>\n )}\n </InternalSpaceBetween>\n </InternalSpaceBetween>\n <LiveRegion>\n <span className={styles['calendar-aria-live']}>{announcement}</span>\n </LiveRegion>\n </>\n );\n}\n"]}
|
|
@@ -134,7 +134,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
134
134
|
font-stretch: normal;
|
|
135
135
|
line-height: normal;
|
|
136
136
|
-webkit-hyphens: none;
|
|
137
|
-
-ms-hyphens: none;
|
|
138
137
|
hyphens: none;
|
|
139
138
|
letter-spacing: normal;
|
|
140
139
|
list-style: disc outside none;
|
|
@@ -308,7 +307,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
308
307
|
|
|
309
308
|
.awsui_label_mgja0_h6650_253:not(#\9) {
|
|
310
309
|
-webkit-user-select: text;
|
|
311
|
-
-ms-user-select: text;
|
|
312
310
|
user-select: text;
|
|
313
311
|
cursor: default;
|
|
314
312
|
}
|
|
@@ -351,7 +349,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
351
349
|
|
|
352
350
|
.awsui_dropdown-content_mgja0_h6650_287:not(#\9) {
|
|
353
351
|
-webkit-user-select: text;
|
|
354
|
-
-ms-user-select: text;
|
|
355
352
|
user-select: text;
|
|
356
353
|
background-color: #ffffff;
|
|
357
354
|
background-color: var(--color-background-container-content-i8i4a0, #ffffff);
|
|
@@ -167,7 +167,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
167
167
|
font-stretch: normal;
|
|
168
168
|
line-height: normal;
|
|
169
169
|
-webkit-hyphens: none;
|
|
170
|
-
-ms-hyphens: none;
|
|
171
170
|
hyphens: none;
|
|
172
171
|
letter-spacing: normal;
|
|
173
172
|
list-style: disc outside none;
|
|
@@ -301,7 +301,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
301
301
|
font-stretch: normal;
|
|
302
302
|
line-height: normal;
|
|
303
303
|
-webkit-hyphens: none;
|
|
304
|
-
-ms-hyphens: none;
|
|
305
304
|
hyphens: none;
|
|
306
305
|
letter-spacing: normal;
|
|
307
306
|
list-style: disc outside none;
|
package/form/styles.scoped.css
CHANGED
|
@@ -106,7 +106,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
font-stretch: normal;
|
|
107
107
|
line-height: normal;
|
|
108
108
|
-webkit-hyphens: none;
|
|
109
|
-
-ms-hyphens: none;
|
|
110
109
|
hyphens: none;
|
|
111
110
|
letter-spacing: normal;
|
|
112
111
|
list-style: disc outside none;
|
|
@@ -185,7 +185,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
185
185
|
font-stretch: normal;
|
|
186
186
|
line-height: normal;
|
|
187
187
|
-webkit-hyphens: none;
|
|
188
|
-
-ms-hyphens: none;
|
|
189
188
|
hyphens: none;
|
|
190
189
|
letter-spacing: normal;
|
|
191
190
|
list-style: disc outside none;
|
package/grid/styles.scoped.css
CHANGED
|
@@ -106,7 +106,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
font-stretch: normal;
|
|
107
107
|
line-height: normal;
|
|
108
108
|
-webkit-hyphens: none;
|
|
109
|
-
-ms-hyphens: none;
|
|
110
109
|
hyphens: none;
|
|
111
110
|
letter-spacing: normal;
|
|
112
111
|
list-style: disc outside none;
|
package/header/styles.scoped.css
CHANGED
|
@@ -106,7 +106,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
font-stretch: normal;
|
|
107
107
|
line-height: normal;
|
|
108
108
|
-webkit-hyphens: none;
|
|
109
|
-
-ms-hyphens: none;
|
|
110
109
|
hyphens: none;
|
|
111
110
|
letter-spacing: normal;
|
|
112
111
|
list-style: disc outside none;
|
|
@@ -107,7 +107,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
107
107
|
font-stretch: normal;
|
|
108
108
|
line-height: normal;
|
|
109
109
|
-webkit-hyphens: none;
|
|
110
|
-
-ms-hyphens: none;
|
|
111
110
|
hyphens: none;
|
|
112
111
|
letter-spacing: normal;
|
|
113
112
|
list-style: disc outside none;
|
package/input/styles.scoped.css
CHANGED
|
@@ -110,7 +110,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
110
110
|
font-stretch: normal;
|
|
111
111
|
line-height: normal;
|
|
112
112
|
-webkit-hyphens: none;
|
|
113
|
-
-ms-hyphens: none;
|
|
114
113
|
hyphens: none;
|
|
115
114
|
letter-spacing: normal;
|
|
116
115
|
list-style: disc outside none;
|
|
@@ -129,7 +129,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
129
129
|
font-stretch: normal;
|
|
130
130
|
line-height: normal;
|
|
131
131
|
-webkit-hyphens: none;
|
|
132
|
-
-ms-hyphens: none;
|
|
133
132
|
hyphens: none;
|
|
134
133
|
letter-spacing: normal;
|
|
135
134
|
list-style: disc outside none;
|
|
@@ -106,7 +106,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
font-stretch: normal;
|
|
107
107
|
line-height: normal;
|
|
108
108
|
-webkit-hyphens: none;
|
|
109
|
-
-ms-hyphens: none;
|
|
110
109
|
hyphens: none;
|
|
111
110
|
letter-spacing: normal;
|
|
112
111
|
list-style: disc outside none;
|
|
@@ -125,7 +125,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
125
125
|
font-stretch: normal;
|
|
126
126
|
line-height: normal;
|
|
127
127
|
-webkit-hyphens: none;
|
|
128
|
-
-ms-hyphens: none;
|
|
129
128
|
hyphens: none;
|
|
130
129
|
letter-spacing: normal;
|
|
131
130
|
list-style: disc outside none;
|
|
@@ -106,7 +106,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
font-stretch: normal;
|
|
107
107
|
line-height: normal;
|
|
108
108
|
-webkit-hyphens: none;
|
|
109
|
-
-ms-hyphens: none;
|
|
110
109
|
hyphens: none;
|
|
111
110
|
letter-spacing: normal;
|
|
112
111
|
list-style: disc outside none;
|
|
@@ -110,7 +110,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
110
110
|
font-stretch: normal;
|
|
111
111
|
line-height: normal;
|
|
112
112
|
-webkit-hyphens: none;
|
|
113
|
-
-ms-hyphens: none;
|
|
114
113
|
hyphens: none;
|
|
115
114
|
letter-spacing: normal;
|
|
116
115
|
list-style: disc outside none;
|
|
@@ -166,7 +165,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
166
165
|
font-stretch: normal;
|
|
167
166
|
line-height: normal;
|
|
168
167
|
-webkit-hyphens: none;
|
|
169
|
-
-ms-hyphens: none;
|
|
170
168
|
hyphens: none;
|
|
171
169
|
letter-spacing: normal;
|
|
172
170
|
list-style: disc outside none;
|
|
@@ -106,7 +106,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
font-stretch: normal;
|
|
107
107
|
line-height: normal;
|
|
108
108
|
-webkit-hyphens: none;
|
|
109
|
-
-ms-hyphens: none;
|
|
110
109
|
hyphens: none;
|
|
111
110
|
letter-spacing: normal;
|
|
112
111
|
list-style: disc outside none;
|
|
@@ -159,7 +159,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
159
159
|
font-stretch: normal;
|
|
160
160
|
line-height: normal;
|
|
161
161
|
-webkit-hyphens: none;
|
|
162
|
-
-ms-hyphens: none;
|
|
163
162
|
hyphens: none;
|
|
164
163
|
letter-spacing: normal;
|
|
165
164
|
list-style: disc outside none;
|
|
@@ -195,7 +194,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
195
194
|
display: none;
|
|
196
195
|
z-index: 2000;
|
|
197
196
|
-webkit-user-select: none;
|
|
198
|
-
-ms-user-select: none;
|
|
199
197
|
user-select: none;
|
|
200
198
|
transform-origin: top;
|
|
201
199
|
}
|
|
@@ -106,7 +106,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
font-stretch: normal;
|
|
107
107
|
line-height: normal;
|
|
108
108
|
-webkit-hyphens: none;
|
|
109
|
-
-ms-hyphens: none;
|
|
110
109
|
hyphens: none;
|
|
111
110
|
letter-spacing: normal;
|
|
112
111
|
list-style: disc outside none;
|
|
@@ -106,7 +106,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
font-stretch: normal;
|
|
107
107
|
line-height: normal;
|
|
108
108
|
-webkit-hyphens: none;
|
|
109
|
-
-ms-hyphens: none;
|
|
110
109
|
hyphens: none;
|
|
111
110
|
letter-spacing: normal;
|
|
112
111
|
list-style: disc outside none;
|
|
@@ -106,7 +106,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
font-stretch: normal;
|
|
107
107
|
line-height: normal;
|
|
108
108
|
-webkit-hyphens: none;
|
|
109
|
-
-ms-hyphens: none;
|
|
110
109
|
hyphens: none;
|
|
111
110
|
letter-spacing: normal;
|
|
112
111
|
list-style: disc outside none;
|
|
@@ -110,7 +110,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
110
110
|
font-stretch: normal;
|
|
111
111
|
line-height: normal;
|
|
112
112
|
-webkit-hyphens: none;
|
|
113
|
-
-ms-hyphens: none;
|
|
114
113
|
hyphens: none;
|
|
115
114
|
letter-spacing: normal;
|
|
116
115
|
list-style: disc outside none;
|
|
@@ -110,7 +110,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
110
110
|
font-stretch: normal;
|
|
111
111
|
line-height: normal;
|
|
112
112
|
-webkit-hyphens: none;
|
|
113
|
-
-ms-hyphens: none;
|
|
114
113
|
hyphens: none;
|
|
115
114
|
letter-spacing: normal;
|
|
116
115
|
list-style: disc outside none;
|
package/internal/environment.js
CHANGED
package/link/styles.scoped.css
CHANGED
|
@@ -106,7 +106,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
font-stretch: normal;
|
|
107
107
|
line-height: normal;
|
|
108
108
|
-webkit-hyphens: none;
|
|
109
|
-
-ms-hyphens: none;
|
|
110
109
|
hyphens: none;
|
|
111
110
|
letter-spacing: normal;
|
|
112
111
|
list-style: disc outside none;
|
|
@@ -150,7 +150,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
150
150
|
font-stretch: normal;
|
|
151
151
|
line-height: normal;
|
|
152
152
|
-webkit-hyphens: none;
|
|
153
|
-
-ms-hyphens: none;
|
|
154
153
|
hyphens: none;
|
|
155
154
|
letter-spacing: normal;
|
|
156
155
|
list-style: disc outside none;
|
package/modal/styles.scoped.css
CHANGED
|
@@ -220,7 +220,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
220
220
|
font-stretch: normal;
|
|
221
221
|
line-height: normal;
|
|
222
222
|
-webkit-hyphens: none;
|
|
223
|
-
-ms-hyphens: none;
|
|
224
223
|
hyphens: none;
|
|
225
224
|
letter-spacing: normal;
|
|
226
225
|
list-style: disc outside none;
|
|
@@ -314,7 +313,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
314
313
|
font-stretch: normal;
|
|
315
314
|
line-height: normal;
|
|
316
315
|
-webkit-hyphens: none;
|
|
317
|
-
-ms-hyphens: none;
|
|
318
316
|
hyphens: none;
|
|
319
317
|
letter-spacing: normal;
|
|
320
318
|
list-style: disc outside none;
|
|
@@ -106,7 +106,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
font-stretch: normal;
|
|
107
107
|
line-height: normal;
|
|
108
108
|
-webkit-hyphens: none;
|
|
109
|
-
-ms-hyphens: none;
|
|
110
109
|
hyphens: none;
|
|
111
110
|
letter-spacing: normal;
|
|
112
111
|
list-style: disc outside none;
|
package/package.json
CHANGED
|
@@ -106,7 +106,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
font-stretch: normal;
|
|
107
107
|
line-height: normal;
|
|
108
108
|
-webkit-hyphens: none;
|
|
109
|
-
-ms-hyphens: none;
|
|
110
109
|
hyphens: none;
|
|
111
110
|
letter-spacing: normal;
|
|
112
111
|
list-style: disc outside none;
|
|
@@ -173,7 +173,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
173
173
|
font-stretch: normal;
|
|
174
174
|
line-height: normal;
|
|
175
175
|
-webkit-hyphens: none;
|
|
176
|
-
-ms-hyphens: none;
|
|
177
176
|
hyphens: none;
|
|
178
177
|
letter-spacing: normal;
|
|
179
178
|
list-style: disc outside none;
|