@cloudscape-design/components-themeable 3.0.59 → 3.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/internal/scss/calendar/styles.scss +34 -14
- package/lib/internal/scss/date-range-picker/calendar/grids/day/styles.scss +5 -5
- package/lib/internal/scss/date-range-picker/styles.scss +5 -10
- package/lib/internal/scss/property-filter/styles.scss +3 -29
- package/lib/internal/template/attribute-editor/styles.scoped.css +4 -1
- package/lib/internal/template/breadcrumb-group/item/styles.css.js +7 -7
- package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +18 -16
- package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +7 -7
- package/lib/internal/template/breadcrumb-group/styles.css.js +6 -6
- package/lib/internal/template/breadcrumb-group/styles.scoped.css +12 -12
- package/lib/internal/template/breadcrumb-group/styles.selectors.js +6 -6
- package/lib/internal/template/calendar/grid/day/index.d.ts +2 -2
- package/lib/internal/template/calendar/grid/day/index.d.ts.map +1 -1
- package/lib/internal/template/calendar/grid/day/index.js +5 -4
- package/lib/internal/template/calendar/grid/day/index.js.map +1 -1
- package/lib/internal/template/calendar/grid/index.d.ts.map +1 -1
- package/lib/internal/template/calendar/grid/index.js.map +1 -1
- package/lib/internal/template/calendar/styles.css.js +20 -20
- package/lib/internal/template/calendar/styles.scoped.css +69 -41
- package/lib/internal/template/calendar/styles.selectors.js +20 -20
- package/lib/internal/template/date-input/internal.js +1 -1
- package/lib/internal/template/date-input/internal.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/grids/day/styles.css.js +21 -21
- package/lib/internal/template/date-range-picker/calendar/grids/day/styles.scoped.css +41 -41
- package/lib/internal/template/date-range-picker/calendar/grids/day/styles.selectors.js +21 -21
- package/lib/internal/template/date-range-picker/calendar/index.js +23 -27
- package/lib/internal/template/date-range-picker/calendar/index.js.map +1 -1
- package/lib/internal/template/date-range-picker/styles.css.js +40 -41
- package/lib/internal/template/date-range-picker/styles.scoped.css +52 -53
- package/lib/internal/template/date-range-picker/styles.selectors.js +40 -41
- package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
- package/lib/internal/template/flashbar/flash.js +2 -2
- package/lib/internal/template/flashbar/flash.js.map +1 -1
- package/lib/internal/template/flashbar/interfaces.d.ts +2 -0
- package/lib/internal/template/flashbar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/flashbar/interfaces.js.map +1 -1
- package/lib/internal/template/help-panel/styles.scoped.css +2 -0
- package/lib/internal/template/input/internal.js +1 -1
- package/lib/internal/template/input/internal.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +7 -25
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/link/styles.scoped.css +18 -1
- package/lib/internal/template/property-filter/interfaces.d.ts +1 -5
- package/lib/internal/template/property-filter/interfaces.d.ts.map +1 -1
- package/lib/internal/template/property-filter/interfaces.js.map +1 -1
- package/lib/internal/template/property-filter/styles.css.js +25 -30
- package/lib/internal/template/property-filter/styles.scoped.css +28 -56
- package/lib/internal/template/property-filter/styles.selectors.js +25 -30
- package/lib/internal/template/property-filter/token-editor.d.ts.map +1 -1
- package/lib/internal/template/property-filter/token-editor.js +13 -28
- package/lib/internal/template/property-filter/token-editor.js.map +1 -1
- package/lib/internal/template/property-filter/token.d.ts.map +1 -1
- package/lib/internal/template/property-filter/token.js.map +1 -1
- package/lib/internal/template/tag-editor/styles.scoped.css +2 -0
- package/lib/internal/template/text-content/styles.scoped.css +6 -1
- package/lib/internal/template/textarea/index.js +1 -1
- package/lib/internal/template/textarea/index.js.map +1 -1
- package/lib/internal/template/token-group/styles.scoped.css +2 -0
- package/package.json +1 -1
|
@@ -19,8 +19,8 @@ import { normalizeStartOfWeek } from '../../calendar/utils/locales';
|
|
|
19
19
|
import { formatDate, formatTime, joinDateTime, parseDate } from '../../internal/utils/date-time';
|
|
20
20
|
export default forwardRef(Calendar);
|
|
21
21
|
function Calendar(_a, ref) {
|
|
22
|
-
var _b;
|
|
23
|
-
var locale = _a.locale, startOfWeek = _a.startOfWeek, isDateEnabled = _a.isDateEnabled, onSelectDateRange = _a.onSelectDateRange,
|
|
22
|
+
var _b, _c, _d;
|
|
23
|
+
var locale = _a.locale, startOfWeek = _a.startOfWeek, isDateEnabled = _a.isDateEnabled, onSelectDateRange = _a.onSelectDateRange, _e = _a.initialEndDate, initialEndDate = _e === void 0 ? '' : _e, _f = _a.initialStartDate, initialStartDate = _f === void 0 ? '' : _f, i18nStrings = _a.i18nStrings, dateOnly = _a.dateOnly, isSingleGrid = _a.isSingleGrid, timeInputFormat = _a.timeInputFormat;
|
|
24
24
|
var elementRef = useRef(null);
|
|
25
25
|
var normalizedStartOfWeek = normalizeStartOfWeek(startOfWeek, locale);
|
|
26
26
|
useImperativeHandle(ref, function () { return ({
|
|
@@ -31,16 +31,16 @@ function Calendar(_a, ref) {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}); });
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
34
|
+
var _g = initialStartDate.split('T'), _h = _g[0], initialStartDateString = _h === void 0 ? '' : _h, _j = _g[1], initialStartTimeString = _j === void 0 ? '' : _j;
|
|
35
|
+
var _k = initialEndDate.split('T'), _l = _k[0], initialEndDateString = _l === void 0 ? '' : _l, _m = _k[1], initialEndTimeString = _m === void 0 ? '' : _m;
|
|
36
|
+
var _o = useState(initialStartDateString), startDateString = _o[0], setStartDateString = _o[1];
|
|
37
|
+
var _p = useState(initialStartTimeString), startTimeString = _p[0], setStartTimeString = _p[1];
|
|
38
|
+
var _q = useState(initialEndDateString), endDateString = _q[0], setEndDateString = _q[1];
|
|
39
|
+
var _r = useState(initialEndTimeString), endTimeString = _r[0], setEndTimeString = _r[1];
|
|
40
40
|
var selectedStartDate = parseDate(startDateString, true);
|
|
41
41
|
var selectedEndDate = parseDate(endDateString, true);
|
|
42
|
-
var
|
|
43
|
-
var
|
|
42
|
+
var _s = useState(''), announcement = _s[0], setAnnouncement = _s[1];
|
|
43
|
+
var _t = useState(function () {
|
|
44
44
|
if (startDateString) {
|
|
45
45
|
var startDate = parseDate(startDateString);
|
|
46
46
|
if (isSingleGrid) {
|
|
@@ -52,8 +52,8 @@ function Calendar(_a, ref) {
|
|
|
52
52
|
return startOfMonth(parseDate(endDateString));
|
|
53
53
|
}
|
|
54
54
|
return startOfMonth(Date.now());
|
|
55
|
-
}), currentMonth =
|
|
56
|
-
var
|
|
55
|
+
}), currentMonth = _t[0], setCurrentMonth = _t[1];
|
|
56
|
+
var _u = useState(function () {
|
|
57
57
|
if (selectedStartDate) {
|
|
58
58
|
if (isSameMonth(selectedStartDate, currentMonth)) {
|
|
59
59
|
return selectedStartDate;
|
|
@@ -63,7 +63,7 @@ function Calendar(_a, ref) {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
return selectFocusedDate(selectedStartDate, currentMonth, isDateEnabled);
|
|
66
|
-
}), focusedDate =
|
|
66
|
+
}), focusedDate = _u[0], setFocusedDate = _u[1];
|
|
67
67
|
useEffect(function () {
|
|
68
68
|
// This effect "synchronizes" the local state update back up to the overall DateRangePicker component
|
|
69
69
|
var startDate = joinDateTime(startDateString, startTimeString);
|
|
@@ -203,20 +203,16 @@ function Calendar(_a, ref) {
|
|
|
203
203
|
React.createElement(Grids, { isSingleGrid: isSingleGrid, locale: locale, baseDate: currentMonth, focusedDate: focusedDate, onFocusedDateChange: setFocusedDate, isDateEnabled: isDateEnabled, onSelectDate: onSelectDateHandler, onChangeMonth: setCurrentMonth, startOfWeek: normalizedStartOfWeek, 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' },
|
|
206
|
-
React.createElement("div", { className: styles['date-and-time-wrapper'] },
|
|
207
|
-
React.createElement(
|
|
208
|
-
React.createElement(
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
React.createElement(
|
|
215
|
-
React.createElement(
|
|
216
|
-
React.createElement(InternalDateInput, { value: endDateString, className: styles['end-date-input'], onChange: onChangeEndDate, placeholder: "YYYY/MM/DD", ariaDescribedby: constrainttextId }))),
|
|
217
|
-
!dateOnly && (React.createElement("div", { className: styles['date-and-time-wrapper__time'] },
|
|
218
|
-
React.createElement(InternalFormField, { label: i18nStrings.endTimeLabel, stretch: true },
|
|
219
|
-
React.createElement(InternalTimeInput, { value: endTimeString, onChange: function (e) { return setEndTimeString(e.detail.value); }, format: timeInputFormat, placeholder: timeInputFormat, className: styles['end-time-input'], ariaDescribedby: constrainttextId })))))),
|
|
206
|
+
React.createElement("div", { className: clsx(styles['date-and-time-wrapper'], (_c = {}, _c[styles['date-only']] = dateOnly, _c)) },
|
|
207
|
+
React.createElement(InternalFormField, { label: i18nStrings.startDateLabel, stretch: true },
|
|
208
|
+
React.createElement(InternalDateInput, { value: startDateString, className: styles['start-date-input'], onChange: onChangeStartDate, placeholder: "YYYY/MM/DD", ariaDescribedby: constrainttextId })),
|
|
209
|
+
!dateOnly && (React.createElement(InternalFormField, { label: i18nStrings.startTimeLabel, stretch: true },
|
|
210
|
+
React.createElement(InternalTimeInput, { value: startTimeString, onChange: function (e) { return setStartTimeString(e.detail.value); }, format: timeInputFormat, placeholder: timeInputFormat, className: styles['start-time-input'], ariaDescribedby: constrainttextId })))),
|
|
211
|
+
React.createElement("div", { className: clsx(styles['date-and-time-wrapper'], (_d = {}, _d[styles['date-only']] = dateOnly, _d)) },
|
|
212
|
+
React.createElement(InternalFormField, { label: i18nStrings.endDateLabel, stretch: true },
|
|
213
|
+
React.createElement(InternalDateInput, { value: endDateString, className: styles['end-date-input'], onChange: onChangeEndDate, placeholder: "YYYY/MM/DD", ariaDescribedby: constrainttextId })),
|
|
214
|
+
!dateOnly && (React.createElement(InternalFormField, { label: i18nStrings.endTimeLabel, stretch: true },
|
|
215
|
+
React.createElement(InternalTimeInput, { value: endTimeString, onChange: function (e) { return setEndTimeString(e.detail.value); }, format: timeInputFormat, placeholder: timeInputFormat, className: styles['end-time-input'], ariaDescribedby: constrainttextId }))))),
|
|
220
216
|
i18nStrings.dateTimeConstraintText && (React.createElement("div", { className: styles['date-and-time-constrainttext'], id: constrainttextId }, i18nStrings.dateTimeConstraintText)))),
|
|
221
217
|
React.createElement(LiveRegion, null,
|
|
222
218
|
React.createElement("span", { className: styles['calendar-aria-live'] }, announcement))));
|
|
@@ -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,yCAAyC,CAAC;AACvE,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAE1D,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAE1D,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAC1D,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;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, 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 '../../calendar/utils/move-focus-handler';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport InternalFormField from '../../form-field/internal';\nimport { InputProps } from '../../input/interfaces';\nimport InternalDateInput from '../../date-input/internal';\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 '../../calendar/utils/intl';\nimport LiveRegion from '../../internal/components/live-region';\nimport { normalizeStartOfWeek } from '../../calendar/utils/locales';\nimport { formatDate, formatTime, joinDateTime, parseDate } from '../../internal/utils/date-time';\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: number | undefined;\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 const normalizedStartOfWeek = normalizeStartOfWeek(startOfWeek, locale);\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 = joinDateTime(startDateString, startTimeString);\n const endDate = joinDateTime(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 setStartDateString(e.detail.value);\n\n if (e.detail.value.length >= 8) {\n const newCurrentMonth = startOfMonth(parseDate(e.detail.value));\n setCurrentMonth(isSingleGrid ? newCurrentMonth : addMonths(newCurrentMonth, 1));\n }\n };\n\n const onChangeEndDate: InputProps['onChange'] = e => {\n setEndDateString(e.detail.value);\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={normalizedStartOfWeek}\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 <InternalDateInput\n value={startDateString}\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 <InternalDateInput\n value={endDateString}\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":[],"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,yCAAyC,CAAC;AACvE,OAAO,oBAAo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C,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 '../../calendar/utils/move-focus-handler';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport InternalFormField from '../../form-field/internal';\nimport { InputProps } from '../../input/interfaces';\nimport InternalDateInput from '../../date-input/internal';\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 '../../calendar/utils/intl';\nimport LiveRegion from '../../internal/components/live-region';\nimport { normalizeStartOfWeek } from '../../calendar/utils/locales';\nimport { formatDate, formatTime, joinDateTime, parseDate } from '../../internal/utils/date-time';\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: number | undefined;\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 const normalizedStartOfWeek = normalizeStartOfWeek(startOfWeek, locale);\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 = joinDateTime(startDateString, startTimeString);\n const endDate = joinDateTime(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 setStartDateString(e.detail.value);\n\n if (e.detail.value.length >= 8) {\n const newCurrentMonth = startOfMonth(parseDate(e.detail.value));\n setCurrentMonth(isSingleGrid ? newCurrentMonth : addMonths(newCurrentMonth, 1));\n }\n };\n\n const onChangeEndDate: InputProps['onChange'] = e => {\n setEndDateString(e.detail.value);\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={normalizedStartOfWeek}\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={clsx(styles['date-and-time-wrapper'], { [styles['date-only']]: dateOnly })}>\n <InternalFormField label={i18nStrings.startDateLabel} stretch={true}>\n <InternalDateInput\n value={startDateString}\n className={styles['start-date-input']}\n onChange={onChangeStartDate}\n placeholder=\"YYYY/MM/DD\"\n ariaDescribedby={constrainttextId}\n />\n </InternalFormField>\n {!dateOnly && (\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 )}\n </div>\n\n <div className={clsx(styles['date-and-time-wrapper'], { [styles['date-only']]: dateOnly })}>\n <InternalFormField label={i18nStrings.endDateLabel} stretch={true}>\n <InternalDateInput\n value={endDateString}\n className={styles['end-date-input']}\n onChange={onChangeEndDate}\n placeholder=\"YYYY/MM/DD\"\n ariaDescribedby={constrainttextId}\n />\n </InternalFormField>\n {!dateOnly && (\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 )}\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,46 +1,45 @@
|
|
|
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
|
-
"trigger-wrapper": "awsui_trigger-
|
|
8
|
-
"trigger-flexbox": "awsui_trigger-
|
|
9
|
-
"one-grid": "awsui_one-
|
|
10
|
-
"calendar-header": "awsui_calendar-
|
|
11
|
-
"calendar-header-months-wrapper": "awsui_calendar-header-months-
|
|
12
|
-
"calendar-header-month": "awsui_calendar-header-
|
|
13
|
-
"calendar-next-month-btn": "awsui_calendar-next-month-
|
|
14
|
-
"calendar-prev-month-btn": "awsui_calendar-prev-month-
|
|
15
|
-
"calendar-day-names": "awsui_calendar-day-
|
|
16
|
-
"calendar-day-name": "awsui_calendar-day-
|
|
17
|
-
"calendar-week": "awsui_calendar-
|
|
18
|
-
"first-grid": "awsui_first-
|
|
19
|
-
"second-grid": "awsui_second-
|
|
20
|
-
"grid": "
|
|
21
|
-
"date-and-time-wrapper": "awsui_date-and-time-
|
|
22
|
-
"date-
|
|
23
|
-
"date-and-time-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"label": "
|
|
30
|
-
"label-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"dropdown": "
|
|
34
|
-
"
|
|
35
|
-
"start-
|
|
36
|
-
"
|
|
37
|
-
"end-
|
|
38
|
-
"
|
|
39
|
-
"validation-
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"calendar-aria-live": "awsui_calendar-aria-live_mgja0_17ogm_319"
|
|
4
|
+
"calendar": "awsui_calendar_mgja0_1cij6_93",
|
|
5
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_mgja0_1cij6_1",
|
|
6
|
+
"root": "awsui_root_mgja0_1cij6_120",
|
|
7
|
+
"trigger-wrapper": "awsui_trigger-wrapper_mgja0_1cij6_132",
|
|
8
|
+
"trigger-flexbox": "awsui_trigger-flexbox_mgja0_1cij6_136",
|
|
9
|
+
"one-grid": "awsui_one-grid_mgja0_1cij6_144",
|
|
10
|
+
"calendar-header": "awsui_calendar-header_mgja0_1cij6_147",
|
|
11
|
+
"calendar-header-months-wrapper": "awsui_calendar-header-months-wrapper_mgja0_1cij6_153",
|
|
12
|
+
"calendar-header-month": "awsui_calendar-header-month_mgja0_1cij6_153",
|
|
13
|
+
"calendar-next-month-btn": "awsui_calendar-next-month-btn_mgja0_1cij6_173",
|
|
14
|
+
"calendar-prev-month-btn": "awsui_calendar-prev-month-btn_mgja0_1cij6_176",
|
|
15
|
+
"calendar-day-names": "awsui_calendar-day-names_mgja0_1cij6_179",
|
|
16
|
+
"calendar-day-name": "awsui_calendar-day-name_mgja0_1cij6_179",
|
|
17
|
+
"calendar-week": "awsui_calendar-week_mgja0_1cij6_194",
|
|
18
|
+
"first-grid": "awsui_first-grid_mgja0_1cij6_199",
|
|
19
|
+
"second-grid": "awsui_second-grid_mgja0_1cij6_200",
|
|
20
|
+
"grid": "awsui_grid_mgja0_1cij6_204",
|
|
21
|
+
"date-and-time-wrapper": "awsui_date-and-time-wrapper_mgja0_1cij6_208",
|
|
22
|
+
"date-only": "awsui_date-only_mgja0_1cij6_212",
|
|
23
|
+
"date-and-time-constrainttext": "awsui_date-and-time-constrainttext_mgja0_1cij6_218",
|
|
24
|
+
"footer": "awsui_footer_mgja0_1cij6_225",
|
|
25
|
+
"has-clear-button": "awsui_has-clear-button_mgja0_1cij6_232",
|
|
26
|
+
"footer-button-wrapper": "awsui_footer-button-wrapper_mgja0_1cij6_239",
|
|
27
|
+
"icon-wrapper": "awsui_icon-wrapper_mgja0_1cij6_243",
|
|
28
|
+
"label": "awsui_label_mgja0_1cij6_248",
|
|
29
|
+
"label-enabled": "awsui_label-enabled_mgja0_1cij6_253",
|
|
30
|
+
"label-text": "awsui_label-text_mgja0_1cij6_257",
|
|
31
|
+
"mode-switch": "awsui_mode-switch_mgja0_1cij6_262",
|
|
32
|
+
"dropdown": "awsui_dropdown_mgja0_1cij6_266",
|
|
33
|
+
"dropdown-content": "awsui_dropdown-content_mgja0_1cij6_282",
|
|
34
|
+
"start-date-input": "awsui_start-date-input_mgja0_1cij6_291",
|
|
35
|
+
"start-time-input": "awsui_start-time-input_mgja0_1cij6_292",
|
|
36
|
+
"end-date-input": "awsui_end-date-input_mgja0_1cij6_293",
|
|
37
|
+
"end-time-input": "awsui_end-time-input_mgja0_1cij6_294",
|
|
38
|
+
"validation-section": "awsui_validation-section_mgja0_1cij6_298",
|
|
39
|
+
"validation-error": "awsui_validation-error_mgja0_1cij6_302",
|
|
40
|
+
"clear-button": "awsui_clear-button_mgja0_1cij6_306",
|
|
41
|
+
"apply-button": "awsui_apply-button_mgja0_1cij6_310",
|
|
42
|
+
"cancel-button": "awsui_cancel-button_mgja0_1cij6_314",
|
|
43
|
+
"calendar-aria-live": "awsui_calendar-aria-live_mgja0_1cij6_318"
|
|
45
44
|
};
|
|
46
45
|
|
|
@@ -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_mgja0_1cij6_93:not(#\9) {
|
|
94
|
+
animation: awsui_awsui-motion-fade-in-0_mgja0_1cij6_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_mgja0_1cij6_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_mgja0_1cij6_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_mgja0_1cij6_93:not(#\9), .awsui-mode-entering .awsui_calendar_mgja0_1cij6_93:not(#\9) {
|
|
112
112
|
animation: none;
|
|
113
113
|
transition: none;
|
|
114
114
|
}
|
|
@@ -117,7 +117,7 @@ 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
|
+
.awsui_root_mgja0_1cij6_120:not(#\9) {
|
|
121
121
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
122
122
|
border-collapse: separate;
|
|
123
123
|
border-spacing: 0;
|
|
@@ -155,28 +155,28 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
155
155
|
max-width: 32em;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
.awsui_trigger-
|
|
158
|
+
.awsui_trigger-wrapper_mgja0_1cij6_132:not(#\9) {
|
|
159
159
|
min-width: calc(var(--size-calendar-grid-width-luenzs, 234px) + 2 * var(--space-l-4vl6xu, 20px));
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
.awsui_trigger-
|
|
162
|
+
.awsui_trigger-flexbox_mgja0_1cij6_136:not(#\9) {
|
|
163
163
|
display: flex;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
.
|
|
166
|
+
.awsui_calendar_mgja0_1cij6_93:not(#\9) {
|
|
167
167
|
display: block;
|
|
168
168
|
width: calc(2 * var(--size-calendar-grid-width-luenzs, 234px) + var(--space-xs-rsr2qu, 8px));
|
|
169
169
|
}
|
|
170
|
-
.
|
|
170
|
+
.awsui_calendar_mgja0_1cij6_93.awsui_one-grid_mgja0_1cij6_144:not(#\9) {
|
|
171
171
|
width: var(--size-calendar-grid-width-luenzs, 234px);
|
|
172
172
|
}
|
|
173
|
-
.awsui_calendar-
|
|
173
|
+
.awsui_calendar-header_mgja0_1cij6_147:not(#\9) {
|
|
174
174
|
display: flex;
|
|
175
175
|
justify-content: space-between;
|
|
176
176
|
align-items: center;
|
|
177
177
|
position: relative;
|
|
178
178
|
}
|
|
179
|
-
.awsui_calendar-header-months-
|
|
179
|
+
.awsui_calendar-header-months-wrapper_mgja0_1cij6_153:not(#\9) {
|
|
180
180
|
position: absolute;
|
|
181
181
|
right: 0;
|
|
182
182
|
left: 0;
|
|
@@ -188,7 +188,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
188
188
|
flex: 1;
|
|
189
189
|
pointer-events: none;
|
|
190
190
|
}
|
|
191
|
-
.awsui_calendar-header-
|
|
191
|
+
.awsui_calendar-header-month_mgja0_1cij6_153:not(#\9) {
|
|
192
192
|
font-size: var(--font-body-m-size-sregvd, 14px);
|
|
193
193
|
line-height: var(--font-body-m-line-height-i7xxvv, 22px);
|
|
194
194
|
font-weight: 700;
|
|
@@ -196,17 +196,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
196
196
|
display: flex;
|
|
197
197
|
pointer-events: auto;
|
|
198
198
|
}
|
|
199
|
-
.awsui_calendar-next-month-
|
|
199
|
+
.awsui_calendar-next-month-btn_mgja0_1cij6_173:not(#\9) {
|
|
200
200
|
/* used for identifying element */
|
|
201
201
|
}
|
|
202
|
-
.awsui_calendar-prev-month-
|
|
202
|
+
.awsui_calendar-prev-month-btn_mgja0_1cij6_176:not(#\9) {
|
|
203
203
|
/* used for identifying element */
|
|
204
204
|
}
|
|
205
|
-
.awsui_calendar-day-
|
|
205
|
+
.awsui_calendar-day-names_mgja0_1cij6_179:not(#\9) {
|
|
206
206
|
display: flex;
|
|
207
207
|
justify-content: stretch;
|
|
208
208
|
}
|
|
209
|
-
.awsui_calendar-day-
|
|
209
|
+
.awsui_calendar-day-name_mgja0_1cij6_179:not(#\9) {
|
|
210
210
|
flex: 1 1 0%;
|
|
211
211
|
width: 0;
|
|
212
212
|
word-break: break-word;
|
|
@@ -217,133 +217,132 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
217
217
|
line-height: var(--font-body-s-line-height-kdsbrl, 16px);
|
|
218
218
|
letter-spacing: var(--font-body-s-letter-spacing-p88gax, normal);
|
|
219
219
|
}
|
|
220
|
-
.awsui_calendar-
|
|
220
|
+
.awsui_calendar-week_mgja0_1cij6_194:not(#\9) {
|
|
221
221
|
display: flex;
|
|
222
222
|
justify-content: stretch;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
.awsui_first-
|
|
226
|
-
.awsui_second-
|
|
225
|
+
.awsui_first-grid_mgja0_1cij6_199:not(#\9),
|
|
226
|
+
.awsui_second-grid_mgja0_1cij6_200:not(#\9) {
|
|
227
227
|
/* used in test-utils */
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
.
|
|
230
|
+
.awsui_grid_mgja0_1cij6_204:not(#\9) {
|
|
231
231
|
width: var(--size-calendar-grid-width-luenzs, 234px);
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
.awsui_date-and-time-
|
|
235
|
-
display: flex;
|
|
234
|
+
.awsui_date-and-time-wrapper_mgja0_1cij6_208:not(#\9) {
|
|
236
235
|
width: var(--size-calendar-grid-width-luenzs, 234px);
|
|
237
236
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
237
|
+
|
|
238
|
+
.awsui_date-and-time-wrapper_mgja0_1cij6_208:not(#\9):not(.awsui_date-only_mgja0_1cij6_212) {
|
|
239
|
+
display: grid;
|
|
240
|
+
column-gap: var(--space-xs-rsr2qu, 8px);
|
|
241
|
+
grid-template-columns: 1fr 1fr;
|
|
243
242
|
}
|
|
244
243
|
|
|
245
|
-
.awsui_date-and-time-
|
|
244
|
+
.awsui_date-and-time-constrainttext_mgja0_1cij6_218:not(#\9) {
|
|
246
245
|
color: var(--color-text-form-secondary-1c3szk, #687078);
|
|
247
246
|
font-size: var(--font-body-s-size-ukw2p9, 12px);
|
|
248
247
|
line-height: var(--font-body-s-line-height-kdsbrl, 16px);
|
|
249
248
|
letter-spacing: var(--font-body-s-letter-spacing-p88gax, normal);
|
|
250
249
|
}
|
|
251
250
|
|
|
252
|
-
.
|
|
251
|
+
.awsui_footer_mgja0_1cij6_225:not(#\9) {
|
|
253
252
|
display: flex;
|
|
254
253
|
flex-wrap: wrap;
|
|
255
254
|
justify-content: flex-end;
|
|
256
255
|
border-top: 1px solid var(--color-border-dropdown-item-default-tcqivq, #eaeded);
|
|
257
256
|
padding: 0 var(--space-l-4vl6xu, 20px) var(--space-s-hv8c1d, 12px);
|
|
258
257
|
}
|
|
259
|
-
.
|
|
258
|
+
.awsui_footer_mgja0_1cij6_225.awsui_has-clear-button_mgja0_1cij6_232:not(#\9) {
|
|
260
259
|
justify-content: space-between;
|
|
261
260
|
}
|
|
262
|
-
.
|
|
261
|
+
.awsui_footer_mgja0_1cij6_225.awsui_one-grid_mgja0_1cij6_144:not(#\9) {
|
|
263
262
|
padding: 0 var(--space-xs-rsr2qu, 8px) var(--space-s-hv8c1d, 12px);
|
|
264
263
|
}
|
|
265
264
|
|
|
266
|
-
.awsui_footer-button-
|
|
265
|
+
.awsui_footer-button-wrapper_mgja0_1cij6_239:not(#\9) {
|
|
267
266
|
padding-top: var(--space-s-hv8c1d, 12px);
|
|
268
267
|
}
|
|
269
268
|
|
|
270
|
-
.awsui_icon-
|
|
269
|
+
.awsui_icon-wrapper_mgja0_1cij6_243:not(#\9) {
|
|
271
270
|
color: var(--color-text-interactive-default-9me1cm, #545b64);
|
|
272
271
|
margin-right: var(--space-xs-rsr2qu, 8px);
|
|
273
272
|
}
|
|
274
273
|
|
|
275
|
-
.
|
|
274
|
+
.awsui_label_mgja0_1cij6_248:not(#\9) {
|
|
276
275
|
-webkit-user-select: text;
|
|
277
276
|
user-select: text;
|
|
278
277
|
cursor: default;
|
|
279
278
|
}
|
|
280
279
|
|
|
281
|
-
.
|
|
280
|
+
.awsui_label_mgja0_1cij6_248.awsui_label-enabled_mgja0_1cij6_253:not(#\9):hover > .awsui_trigger-flexbox_mgja0_1cij6_136 > .awsui_icon-wrapper_mgja0_1cij6_243 {
|
|
282
281
|
color: var(--color-text-interactive-hover-79wpl9, #16191f);
|
|
283
282
|
}
|
|
284
283
|
|
|
285
|
-
.awsui_label-
|
|
284
|
+
.awsui_label-text_mgja0_1cij6_257:not(#\9) {
|
|
286
285
|
color: var(--color-text-input-placeholder-rtvjp5, #687078);
|
|
287
286
|
font-style: italic;
|
|
288
287
|
}
|
|
289
288
|
|
|
290
|
-
.awsui_mode-
|
|
289
|
+
.awsui_mode-switch_mgja0_1cij6_262:not(#\9) {
|
|
291
290
|
/* used in test-utils */
|
|
292
291
|
}
|
|
293
292
|
|
|
294
|
-
.
|
|
293
|
+
.awsui_dropdown_mgja0_1cij6_266:not(#\9) {
|
|
295
294
|
overflow: auto;
|
|
296
295
|
border-top: 1px solid var(--color-border-container-top-1itxac, #eaeded);
|
|
297
296
|
border-bottom: 1px solid var(--color-border-container-top-1itxac, #eaeded);
|
|
298
297
|
border-radius: var(--border-radius-dropdown-0c284d, 0px);
|
|
299
298
|
}
|
|
300
|
-
.
|
|
299
|
+
.awsui_dropdown_mgja0_1cij6_266:not(#\9):focus {
|
|
301
300
|
outline: none;
|
|
302
301
|
}
|
|
303
|
-
.
|
|
302
|
+
.awsui_dropdown_mgja0_1cij6_266[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
304
303
|
outline: 2px dotted transparent;
|
|
305
304
|
outline-offset: 2px;
|
|
306
305
|
border-radius: var(--border-radius-dropdown-0c284d, 0px);
|
|
307
306
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-n5kd8g, #0073bb);
|
|
308
307
|
}
|
|
309
308
|
|
|
310
|
-
.awsui_dropdown-
|
|
309
|
+
.awsui_dropdown-content_mgja0_1cij6_282:not(#\9) {
|
|
311
310
|
-webkit-user-select: text;
|
|
312
311
|
user-select: text;
|
|
313
312
|
background-color: var(--color-background-container-content-o88wxm, #ffffff);
|
|
314
313
|
width: calc(2 * var(--size-calendar-grid-width-luenzs, 234px) + var(--space-xs-rsr2qu, 8px) + 2 * var(--space-l-4vl6xu, 20px));
|
|
315
314
|
}
|
|
316
|
-
.awsui_dropdown-
|
|
315
|
+
.awsui_dropdown-content_mgja0_1cij6_282.awsui_one-grid_mgja0_1cij6_144:not(#\9) {
|
|
317
316
|
width: calc(var(--size-calendar-grid-width-luenzs, 234px) + 2 * var(--space-l-4vl6xu, 20px));
|
|
318
317
|
}
|
|
319
318
|
|
|
320
|
-
.awsui_start-date-
|
|
321
|
-
.awsui_start-time-
|
|
322
|
-
.awsui_end-date-
|
|
323
|
-
.awsui_end-time-
|
|
319
|
+
.awsui_start-date-input_mgja0_1cij6_291:not(#\9),
|
|
320
|
+
.awsui_start-time-input_mgja0_1cij6_292:not(#\9),
|
|
321
|
+
.awsui_end-date-input_mgja0_1cij6_293:not(#\9),
|
|
322
|
+
.awsui_end-time-input_mgja0_1cij6_294:not(#\9) {
|
|
324
323
|
/* used in test-utils */
|
|
325
324
|
}
|
|
326
325
|
|
|
327
|
-
.awsui_validation-
|
|
326
|
+
.awsui_validation-section_mgja0_1cij6_298:not(#\9) {
|
|
328
327
|
/* used in test-utils */
|
|
329
328
|
}
|
|
330
329
|
|
|
331
|
-
.awsui_validation-
|
|
330
|
+
.awsui_validation-error_mgja0_1cij6_302:not(#\9) {
|
|
332
331
|
/* used in test-utils */
|
|
333
332
|
}
|
|
334
333
|
|
|
335
|
-
.awsui_clear-
|
|
334
|
+
.awsui_clear-button_mgja0_1cij6_306:not(#\9) {
|
|
336
335
|
/* used in test-utils */
|
|
337
336
|
}
|
|
338
337
|
|
|
339
|
-
.awsui_apply-
|
|
338
|
+
.awsui_apply-button_mgja0_1cij6_310:not(#\9) {
|
|
340
339
|
/* used in test-utils */
|
|
341
340
|
}
|
|
342
341
|
|
|
343
|
-
.awsui_cancel-
|
|
342
|
+
.awsui_cancel-button_mgja0_1cij6_314:not(#\9) {
|
|
344
343
|
/* used in test-utils */
|
|
345
344
|
}
|
|
346
345
|
|
|
347
|
-
.awsui_calendar-aria-
|
|
346
|
+
.awsui_calendar-aria-live_mgja0_1cij6_318:not(#\9) {
|
|
348
347
|
/* used in test-utils */
|
|
349
348
|
}
|