@cloudscape-design/components-themeable 3.0.1206 → 3.0.1207
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/manifest.json +1 -1
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/steps/styles.scss +2 -0
- package/lib/internal/template/date-range-picker/calendar/interfaces.d.ts +1 -1
- package/lib/internal/template/date-range-picker/calendar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/interfaces.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/range-inputs.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/range-inputs.js +15 -5
- package/lib/internal/template/date-range-picker/calendar/range-inputs.js.map +1 -1
- package/lib/internal/template/date-range-picker/interfaces.d.ts +21 -0
- package/lib/internal/template/date-range-picker/interfaces.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/interfaces.js.map +1 -1
- package/lib/internal/template/i18n/messages/all.all.js +1 -1
- package/lib/internal/template/i18n/messages/all.all.json +1 -1
- package/lib/internal/template/i18n/messages/all.ar.js +1 -1
- package/lib/internal/template/i18n/messages/all.ar.json +1 -1
- package/lib/internal/template/i18n/messages/all.de.js +1 -1
- package/lib/internal/template/i18n/messages/all.de.json +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.js +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.json +1 -1
- package/lib/internal/template/i18n/messages/all.en.js +1 -1
- package/lib/internal/template/i18n/messages/all.en.json +1 -1
- package/lib/internal/template/i18n/messages/all.es.js +1 -1
- package/lib/internal/template/i18n/messages/all.es.json +1 -1
- package/lib/internal/template/i18n/messages/all.fr.js +1 -1
- package/lib/internal/template/i18n/messages/all.fr.json +1 -1
- package/lib/internal/template/i18n/messages/all.id.js +1 -1
- package/lib/internal/template/i18n/messages/all.id.json +1 -1
- package/lib/internal/template/i18n/messages/all.it.js +1 -1
- package/lib/internal/template/i18n/messages/all.it.json +1 -1
- package/lib/internal/template/i18n/messages/all.ja.js +1 -1
- package/lib/internal/template/i18n/messages/all.ja.json +1 -1
- package/lib/internal/template/i18n/messages/all.ko.js +1 -1
- package/lib/internal/template/i18n/messages/all.ko.json +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.js +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.json +1 -1
- package/lib/internal/template/i18n/messages/all.tr.js +1 -1
- package/lib/internal/template/i18n/messages/all.tr.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.json +1 -1
- package/lib/internal/template/i18n/messages-types.d.ts +3 -0
- package/lib/internal/template/i18n/messages-types.d.ts.map +1 -1
- package/lib/internal/template/i18n/messages-types.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/steps/interfaces.d.ts +0 -2
- package/lib/internal/template/steps/interfaces.d.ts.map +1 -1
- package/lib/internal/template/steps/interfaces.js.map +1 -1
- package/lib/internal/template/steps/styles.css.js +9 -9
- package/lib/internal/template/steps/styles.scoped.css +17 -15
- package/lib/internal/template/steps/styles.selectors.js +9 -9
- package/package.json +1 -1
|
@@ -99,11 +99,13 @@
|
|
|
99
99
|
> .horizontal-header {
|
|
100
100
|
grid-row: 2;
|
|
101
101
|
grid-column: 1 / span 3;
|
|
102
|
+
padding-inline-end: awsui.$space-xs;
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
> .details {
|
|
105
106
|
grid-row: 3;
|
|
106
107
|
grid-column: 1 / span 3;
|
|
108
|
+
padding-inline-end: awsui.$space-xs;
|
|
107
109
|
}
|
|
108
110
|
}
|
|
109
111
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseComponentProps } from '../../internal/base-component';
|
|
2
2
|
import { SomeRequired } from '../../internal/types';
|
|
3
3
|
import { DateRangePickerProps } from '../interfaces';
|
|
4
|
-
export type RangeCalendarI18nStrings = Pick<DateRangePickerProps.I18nStrings, 'todayAriaLabel' | 'nextMonthAriaLabel' | 'previousMonthAriaLabel' | 'currentMonthAriaLabel' | 'nextYearAriaLabel' | 'previousYearAriaLabel' | 'startMonthLabel' | 'startDateLabel' | 'startTimeLabel' | 'endMonthLabel' | 'endDateLabel' | 'endTimeLabel' | 'dateConstraintText' | 'isoDateConstraintText' | 'slashedDateConstraintText' | 'dateTimeConstraintText' | 'isoDateTimeConstraintText' | 'slashedDateTimeConstraintText' | 'monthConstraintText' | 'isoMonthConstraintText' | 'slashedMonthConstraintText' | 'renderSelectedAbsoluteRangeAriaLive'>;
|
|
4
|
+
export type RangeCalendarI18nStrings = Pick<DateRangePickerProps.I18nStrings, 'todayAriaLabel' | 'nextMonthAriaLabel' | 'previousMonthAriaLabel' | 'currentMonthAriaLabel' | 'nextYearAriaLabel' | 'previousYearAriaLabel' | 'startMonthLabel' | 'startDateLabel' | 'startTimeLabel' | 'endMonthLabel' | 'endDateLabel' | 'endTimeLabel' | 'dateConstraintText' | 'isoDateConstraintText' | 'slashedDateConstraintText' | 'dateTimeConstraintText' | 'isoDateTimeConstraintText' | 'slashedDateTimeConstraintText' | 'monthConstraintText' | 'isoMonthConstraintText' | 'slashedMonthConstraintText' | 'renderSelectedAbsoluteRangeAriaLive' | 'isoDatePlaceholder' | 'slashedDatePlaceholder' | 'timePlaceholder'>;
|
|
5
5
|
export interface DateRangePickerCalendarProps extends BaseComponentProps, SomeRequired<Pick<DateRangePickerProps, 'granularity' | 'locale' | 'startOfWeek' | 'timeInputFormat' | 'dateInputFormat' | 'i18nStrings' | 'dateOnly' | 'absoluteFormat' | 'customAbsoluteRangeControl' | 'isDateEnabled' | 'dateDisabledReason'>, 'absoluteFormat' | 'timeInputFormat'> {
|
|
6
6
|
value: DateRangePickerProps.PendingAbsoluteValue;
|
|
7
7
|
setValue: React.Dispatch<React.SetStateAction<DateRangePickerProps.PendingAbsoluteValue>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/date-range-picker/calendar/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,oBAAoB,CAAC,WAAW,EAC9B,gBAAgB,GAChB,oBAAoB,GACpB,wBAAwB,GACxB,uBAAuB,GACvB,mBAAmB,GACnB,uBAAuB,GACvB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,eAAe,GACf,cAAc,GACd,cAAc,GACd,oBAAoB,GACpB,uBAAuB,GACvB,2BAA2B,GAC3B,wBAAwB,GACxB,2BAA2B,GAC3B,+BAA+B,GAC/B,qBAAqB,GACrB,wBAAwB,GACxB,4BAA4B,GAC5B,qCAAqC,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/date-range-picker/calendar/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,oBAAoB,CAAC,WAAW,EAC9B,gBAAgB,GAChB,oBAAoB,GACpB,wBAAwB,GACxB,uBAAuB,GACvB,mBAAmB,GACnB,uBAAuB,GACvB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,eAAe,GACf,cAAc,GACd,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EAAE,wBAAwB,CAAC;CACxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/date-range-picker/calendar/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../../internal/base-component';\nimport { SomeRequired } from '../../internal/types';\nimport { DateRangePickerProps } from '../interfaces';\n\nexport type RangeCalendarI18nStrings = Pick<\n DateRangePickerProps.I18nStrings,\n | 'todayAriaLabel'\n | 'nextMonthAriaLabel'\n | 'previousMonthAriaLabel'\n | 'currentMonthAriaLabel'\n | 'nextYearAriaLabel'\n | 'previousYearAriaLabel'\n | 'startMonthLabel'\n | 'startDateLabel'\n | 'startTimeLabel'\n | 'endMonthLabel'\n | 'endDateLabel'\n | 'endTimeLabel'\n | 'dateConstraintText'\n | 'isoDateConstraintText'\n | 'slashedDateConstraintText'\n | 'dateTimeConstraintText'\n | 'isoDateTimeConstraintText'\n | 'slashedDateTimeConstraintText'\n | 'monthConstraintText'\n | 'isoMonthConstraintText'\n | 'slashedMonthConstraintText'\n | 'renderSelectedAbsoluteRangeAriaLive'\n>;\n\nexport interface DateRangePickerCalendarProps\n extends BaseComponentProps,\n SomeRequired<\n Pick<\n DateRangePickerProps,\n | 'granularity'\n | 'locale'\n | 'startOfWeek'\n | 'timeInputFormat'\n | 'dateInputFormat'\n | 'i18nStrings'\n | 'dateOnly'\n | 'absoluteFormat'\n | 'customAbsoluteRangeControl'\n | 'isDateEnabled'\n | 'dateDisabledReason'\n >,\n 'absoluteFormat' | 'timeInputFormat'\n > {\n value: DateRangePickerProps.PendingAbsoluteValue;\n setValue: React.Dispatch<React.SetStateAction<DateRangePickerProps.PendingAbsoluteValue>>;\n i18nStrings?: RangeCalendarI18nStrings;\n}\n\nexport interface RangeInputsProps\n extends BaseComponentProps,\n SomeRequired<\n Pick<DateRangePickerProps, 'granularity' | 'dateOnly' | 'timeInputFormat' | 'dateInputFormat'>,\n 'dateOnly' | 'timeInputFormat' | 'granularity'\n > {\n startDate: string;\n onChangeStartDate: (value: string) => void;\n startTime: string;\n onChangeStartTime: (value: string) => void;\n endDate: string;\n onChangeEndDate: (value: string) => void;\n endTime: string;\n onChangeEndTime: (value: string) => void;\n i18nStrings?: RangeCalendarI18nStrings;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/date-range-picker/calendar/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../../internal/base-component';\nimport { SomeRequired } from '../../internal/types';\nimport { DateRangePickerProps } from '../interfaces';\n\nexport type RangeCalendarI18nStrings = Pick<\n DateRangePickerProps.I18nStrings,\n | 'todayAriaLabel'\n | 'nextMonthAriaLabel'\n | 'previousMonthAriaLabel'\n | 'currentMonthAriaLabel'\n | 'nextYearAriaLabel'\n | 'previousYearAriaLabel'\n | 'startMonthLabel'\n | 'startDateLabel'\n | 'startTimeLabel'\n | 'endMonthLabel'\n | 'endDateLabel'\n | 'endTimeLabel'\n | 'dateConstraintText'\n | 'isoDateConstraintText'\n | 'slashedDateConstraintText'\n | 'dateTimeConstraintText'\n | 'isoDateTimeConstraintText'\n | 'slashedDateTimeConstraintText'\n | 'monthConstraintText'\n | 'isoMonthConstraintText'\n | 'slashedMonthConstraintText'\n | 'renderSelectedAbsoluteRangeAriaLive'\n | 'isoDatePlaceholder'\n | 'slashedDatePlaceholder'\n | 'timePlaceholder'\n>;\n\nexport interface DateRangePickerCalendarProps\n extends BaseComponentProps,\n SomeRequired<\n Pick<\n DateRangePickerProps,\n | 'granularity'\n | 'locale'\n | 'startOfWeek'\n | 'timeInputFormat'\n | 'dateInputFormat'\n | 'i18nStrings'\n | 'dateOnly'\n | 'absoluteFormat'\n | 'customAbsoluteRangeControl'\n | 'isDateEnabled'\n | 'dateDisabledReason'\n >,\n 'absoluteFormat' | 'timeInputFormat'\n > {\n value: DateRangePickerProps.PendingAbsoluteValue;\n setValue: React.Dispatch<React.SetStateAction<DateRangePickerProps.PendingAbsoluteValue>>;\n i18nStrings?: RangeCalendarI18nStrings;\n}\n\nexport interface RangeInputsProps\n extends BaseComponentProps,\n SomeRequired<\n Pick<DateRangePickerProps, 'granularity' | 'dateOnly' | 'timeInputFormat' | 'dateInputFormat'>,\n 'dateOnly' | 'timeInputFormat' | 'granularity'\n > {\n startDate: string;\n onChangeStartDate: (value: string) => void;\n startTime: string;\n onChangeStartTime: (value: string) => void;\n endDate: string;\n onChangeEndDate: (value: string) => void;\n endTime: string;\n onChangeEndTime: (value: string) => void;\n i18nStrings?: RangeCalendarI18nStrings;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-inputs.d.ts","sourceRoot":"","sources":["../../../../src/date-range-picker/calendar/range-inputs.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAMhD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,SAAS,EACT,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EACjB,OAAO,EACP,eAAe,EACf,OAAO,EACP,eAAe,EACf,WAAW,EACX,QAAQ,EACR,eAAe,EACf,eAAe,EACf,WAAW,GACZ,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"range-inputs.d.ts","sourceRoot":"","sources":["../../../../src/date-range-picker/calendar/range-inputs.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAMhD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,SAAS,EACT,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EACjB,OAAO,EACP,eAAe,EACf,OAAO,EACP,eAAe,EACf,WAAW,EACX,QAAQ,EACR,eAAe,EACf,eAAe,EACf,WAAW,GACZ,EAAE,gBAAgB,eAqFlB"}
|
|
@@ -15,7 +15,17 @@ export default function RangeInputs({ startDate, onChangeStartDate, startTime, o
|
|
|
15
15
|
const showTimeInput = !dateOnly && !isMonthPicker;
|
|
16
16
|
const isIso = dateInputFormat === 'iso';
|
|
17
17
|
const separator = isIso ? '-' : '/';
|
|
18
|
-
const
|
|
18
|
+
const defaultDateInputPlaceholder = `YYYY${separator}MM${isMonthPicker ? '' : `${separator}DD`}`;
|
|
19
|
+
const i18nDatePlaceholder = isIso
|
|
20
|
+
? i18n('i18nStrings.isoDatePlaceholder', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.isoDatePlaceholder)
|
|
21
|
+
: i18n('i18nStrings.slashedDatePlaceholder', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.slashedDatePlaceholder);
|
|
22
|
+
// For month picker, derive the month placeholder by removing the day part from the date placeholder
|
|
23
|
+
const datePlaceholder = i18nDatePlaceholder
|
|
24
|
+
? isMonthPicker
|
|
25
|
+
? i18nDatePlaceholder.split(separator).slice(0, 2).join(separator)
|
|
26
|
+
: i18nDatePlaceholder
|
|
27
|
+
: defaultDateInputPlaceholder;
|
|
28
|
+
const timePlaceholder = i18n('i18nStrings.timePlaceholder', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.timePlaceholder) || timeInputFormat;
|
|
19
29
|
const i18nProvided = provideI18N(i18nStrings, isMonthPicker, dateOnly, isIso);
|
|
20
30
|
const i18nKey = generateI18NKey(isMonthPicker, dateOnly, isIso);
|
|
21
31
|
const i18nFallbackKey = generateI18NFallbackKey(isMonthPicker, dateOnly);
|
|
@@ -23,13 +33,13 @@ export default function RangeInputs({ startDate, onChangeStartDate, startTime, o
|
|
|
23
33
|
React.createElement("div", { className: styles['date-and-time-container'] },
|
|
24
34
|
React.createElement("div", { className: styles['date-and-time-wrapper'] },
|
|
25
35
|
React.createElement(InternalFormField, { stretch: true, label: i18n(isMonthPicker ? 'i18nStrings.startMonthLabel' : 'i18nStrings.startDateLabel', isMonthPicker ? i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.startMonthLabel : i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.startDateLabel) },
|
|
26
|
-
React.createElement(InternalDateInput, { value: startDate, className: clsx(testutilStyles['start-date-input'], isMonthPicker && testutilStyles['start-month-input']), onChange: event => onChangeStartDate(event.detail.value), format: dateInputFormat, placeholder:
|
|
36
|
+
React.createElement(InternalDateInput, { value: startDate, className: clsx(testutilStyles['start-date-input'], isMonthPicker && testutilStyles['start-month-input']), onChange: event => onChangeStartDate(event.detail.value), format: dateInputFormat, placeholder: datePlaceholder, granularity: granularity })),
|
|
27
37
|
showTimeInput && (React.createElement(InternalFormField, { stretch: true, label: i18n('i18nStrings.startTimeLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.startTimeLabel) },
|
|
28
|
-
React.createElement(InternalTimeInput, { value: startTime, onChange: event => onChangeStartTime(event.detail.value), format: timeInputFormat, placeholder:
|
|
38
|
+
React.createElement(InternalTimeInput, { value: startTime, onChange: event => onChangeStartTime(event.detail.value), format: timeInputFormat, placeholder: timePlaceholder, className: testutilStyles['start-time-input'] })))),
|
|
29
39
|
React.createElement("div", { className: styles['date-and-time-wrapper'] },
|
|
30
40
|
React.createElement(InternalFormField, { stretch: true, label: i18n(isMonthPicker ? 'i18nStrings.endMonthLabel' : 'i18nStrings.endDateLabel', isMonthPicker ? i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.endMonthLabel : i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.endDateLabel) },
|
|
31
|
-
React.createElement(InternalDateInput, { value: endDate, className: clsx(testutilStyles['end-date-input'], isMonthPicker && testutilStyles['end-month-picker']), onChange: event => onChangeEndDate(event.detail.value), format: dateInputFormat, placeholder:
|
|
41
|
+
React.createElement(InternalDateInput, { value: endDate, className: clsx(testutilStyles['end-date-input'], isMonthPicker && testutilStyles['end-month-picker']), onChange: event => onChangeEndDate(event.detail.value), format: dateInputFormat, placeholder: datePlaceholder, granularity: granularity })),
|
|
32
42
|
showTimeInput && (React.createElement(InternalFormField, { label: i18n('i18nStrings.endTimeLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.endTimeLabel), stretch: true },
|
|
33
|
-
React.createElement(InternalTimeInput, { value: endTime, onChange: event => onChangeEndTime(event.detail.value), format: timeInputFormat, placeholder:
|
|
43
|
+
React.createElement(InternalTimeInput, { value: endTime, onChange: event => onChangeEndTime(event.detail.value), format: timeInputFormat, placeholder: timePlaceholder, className: testutilStyles['end-time-input'] })))))));
|
|
34
44
|
}
|
|
35
45
|
//# sourceMappingURL=range-inputs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-inputs.js","sourceRoot":"","sources":["../../../../src/date-range-picker/calendar/range-inputs.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAC1D,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEhF,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,SAAS,EACT,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EACjB,OAAO,EACP,eAAe,EACf,OAAO,EACP,eAAe,EACf,WAAW,EACX,QAAQ,EACR,eAAe,EACf,eAAe,EACf,WAAW,GACM;IACjB,MAAM,IAAI,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;IAClD,MAAM,aAAa,GAAG,WAAW,KAAK,OAAO,CAAC;IAC9C,MAAM,aAAa,GAAG,CAAC,QAAQ,IAAI,CAAC,aAAa,CAAC;IAClD,MAAM,KAAK,GAAG,eAAe,KAAK,KAAK,CAAC;IACxC,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IACpC,MAAM,
|
|
1
|
+
{"version":3,"file":"range-inputs.js","sourceRoot":"","sources":["../../../../src/date-range-picker/calendar/range-inputs.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAC1D,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEhF,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,SAAS,EACT,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EACjB,OAAO,EACP,eAAe,EACf,OAAO,EACP,eAAe,EACf,WAAW,EACX,QAAQ,EACR,eAAe,EACf,eAAe,EACf,WAAW,GACM;IACjB,MAAM,IAAI,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;IAClD,MAAM,aAAa,GAAG,WAAW,KAAK,OAAO,CAAC;IAC9C,MAAM,aAAa,GAAG,CAAC,QAAQ,IAAI,CAAC,aAAa,CAAC;IAClD,MAAM,KAAK,GAAG,eAAe,KAAK,KAAK,CAAC;IACxC,MA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AA2B,CAAC,CAAC,CAAC,0BAA0B,EACxE,aAAa,CAAC,CAAC,CAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,aAAa,CAAC,CAAC,CAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,YAAY,CACvE;oBAED,oBAAC,iBAAiB,IAChB,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,aAAa,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC,EACtG,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EACtD,MAAM,EAAE,eAAe,EACvB,WAAW,EAAE,eAAe,EAC5B,WAAW,EAAE,WAAW,GACxB,CACgB;gBACnB,aAAa,IAAI,CAChB,oBAAC,iBAAiB,IAAC,KAAK,EAAE,IAAI,CAAC,0BAA0B,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,YAAY,CAAC,EAAE,OAAO,EAAE,IAAI;oBAClG,oBAAC,iBAAiB,IAChB,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EACtD,MAAM,EAAE,eAAe,EACvB,WAAW,EAAE,eAAe,EAC5B,SAAS,EAAE,cAAc,CAAC,gBAAgB,CAAC,GAC3C,CACgB,CACrB,CACG,CACF,CACY,CACrB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport InternalDateInput from '../../date-input/internal';\nimport InternalFormField from '../../form-field/internal';\nimport { useInternalI18n } from '../../i18n/context.js';\nimport InternalTimeInput from '../../time-input/internal';\nimport { RangeInputsProps } from './interfaces';\nimport { generateI18NFallbackKey, generateI18NKey, provideI18N } from './utils';\n\nimport styles from '../styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\n\nexport default function RangeInputs({\n startDate,\n onChangeStartDate,\n startTime,\n onChangeStartTime,\n endDate,\n onChangeEndDate,\n endTime,\n onChangeEndTime,\n i18nStrings,\n dateOnly,\n timeInputFormat,\n dateInputFormat,\n granularity,\n}: RangeInputsProps) {\n const i18n = useInternalI18n('date-range-picker');\n const isMonthPicker = granularity === 'month';\n const showTimeInput = !dateOnly && !isMonthPicker;\n const isIso = dateInputFormat === 'iso';\n const separator = isIso ? '-' : '/';\n const defaultDateInputPlaceholder = `YYYY${separator}MM${isMonthPicker ? '' : `${separator}DD`}`;\n const i18nDatePlaceholder = isIso\n ? i18n('i18nStrings.isoDatePlaceholder', i18nStrings?.isoDatePlaceholder)\n : i18n('i18nStrings.slashedDatePlaceholder', i18nStrings?.slashedDatePlaceholder);\n // For month picker, derive the month placeholder by removing the day part from the date placeholder\n const datePlaceholder = i18nDatePlaceholder\n ? isMonthPicker\n ? i18nDatePlaceholder.split(separator).slice(0, 2).join(separator)\n : i18nDatePlaceholder\n : defaultDateInputPlaceholder;\n const timePlaceholder = i18n('i18nStrings.timePlaceholder', i18nStrings?.timePlaceholder) || timeInputFormat;\n const i18nProvided = provideI18N(i18nStrings!, isMonthPicker, dateOnly, isIso);\n const i18nKey = generateI18NKey(isMonthPicker, dateOnly, isIso);\n const i18nFallbackKey = generateI18NFallbackKey(isMonthPicker, dateOnly);\n return (\n <InternalFormField constraintText={i18n(i18nKey, i18nProvided) || i18n(i18nFallbackKey, i18nProvided)}>\n <div className={styles['date-and-time-container']}>\n <div className={styles['date-and-time-wrapper']}>\n <InternalFormField\n stretch={true}\n label={i18n(\n isMonthPicker ? 'i18nStrings.startMonthLabel' : 'i18nStrings.startDateLabel',\n isMonthPicker ? i18nStrings?.startMonthLabel : i18nStrings?.startDateLabel\n )}\n >\n <InternalDateInput\n value={startDate}\n className={clsx(testutilStyles['start-date-input'], isMonthPicker && testutilStyles['start-month-input'])}\n onChange={event => onChangeStartDate(event.detail.value)}\n format={dateInputFormat}\n placeholder={datePlaceholder}\n granularity={granularity}\n />\n </InternalFormField>\n {showTimeInput && (\n <InternalFormField stretch={true} label={i18n('i18nStrings.startTimeLabel', i18nStrings?.startTimeLabel)}>\n <InternalTimeInput\n value={startTime}\n onChange={event => onChangeStartTime(event.detail.value)}\n format={timeInputFormat}\n placeholder={timePlaceholder}\n className={testutilStyles['start-time-input']}\n />\n </InternalFormField>\n )}\n </div>\n\n <div className={styles['date-and-time-wrapper']}>\n <InternalFormField\n stretch={true}\n label={i18n(\n isMonthPicker ? 'i18nStrings.endMonthLabel' : 'i18nStrings.endDateLabel',\n isMonthPicker ? i18nStrings?.endMonthLabel : i18nStrings?.endDateLabel\n )}\n >\n <InternalDateInput\n value={endDate}\n className={clsx(testutilStyles['end-date-input'], isMonthPicker && testutilStyles['end-month-picker'])}\n onChange={event => onChangeEndDate(event.detail.value)}\n format={dateInputFormat}\n placeholder={datePlaceholder}\n granularity={granularity}\n />\n </InternalFormField>\n {showTimeInput && (\n <InternalFormField label={i18n('i18nStrings.endTimeLabel', i18nStrings?.endTimeLabel)} stretch={true}>\n <InternalTimeInput\n value={endTime}\n onChange={event => onChangeEndTime(event.detail.value)}\n format={timeInputFormat}\n placeholder={timePlaceholder}\n className={testutilStyles['end-time-input']}\n />\n </InternalFormField>\n )}\n </div>\n </div>\n </InternalFormField>\n );\n}\n"]}
|
|
@@ -473,6 +473,27 @@ export declare namespace DateRangePickerProps {
|
|
|
473
473
|
* @i18n
|
|
474
474
|
*/
|
|
475
475
|
previousYearAriaLabel?: string;
|
|
476
|
+
/**
|
|
477
|
+
* Placeholder text for date inputs in absolute mode with 'iso' format (dashes).
|
|
478
|
+
* Should match the expected date format (for example "YYYY-MM-DD", "JJJJ-MM-TT" for German).
|
|
479
|
+
* Used for both start and end date inputs.
|
|
480
|
+
* @i18n
|
|
481
|
+
*/
|
|
482
|
+
isoDatePlaceholder?: string;
|
|
483
|
+
/**
|
|
484
|
+
* Placeholder text for date inputs in absolute mode with 'slashed' format (slashes).
|
|
485
|
+
* Should match the expected date format (for example "YYYY/MM/DD", "JJJJ/MM/TT" for German).
|
|
486
|
+
* Used for both start and end date inputs.
|
|
487
|
+
* @i18n
|
|
488
|
+
*/
|
|
489
|
+
slashedDatePlaceholder?: string;
|
|
490
|
+
/**
|
|
491
|
+
* Placeholder text for time inputs in absolute mode.
|
|
492
|
+
* Should match the expected time format (for example "hh:mm:ss", "HH:MM:SS").
|
|
493
|
+
* Used for both start and end time inputs.
|
|
494
|
+
* @i18n
|
|
495
|
+
*/
|
|
496
|
+
timePlaceholder?: string;
|
|
476
497
|
}
|
|
477
498
|
type AbsoluteFormat = DateFormat;
|
|
478
499
|
type DateInputFormat = EditableDateFormat | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/date-range-picker/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,KAAK,EAAE,IAAI,GAAG,oBAAoB,CAAC,KAAK,CAAC;IAEzC;;OAEG;IACH,eAAe,EAAE,aAAa,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;IAEpE;;;;;;OAMG;IACH,aAAa,CA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,CAAC;QAE/B;;;;;WAKG;QACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAE5B;;;;;WAKG;QACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;QAEhC;;;;;WAKG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B;IAED,KAAY,cAAc,GAAG,UAAU,CAAC;IAExC,KAAY,eAAe,GAAG,kBAAkB,GAAG,SAAS,CAAC;IAE7D,KAAY,eAAe,GAAG,cAAc,CAAC,MAAM,CAAC;CACrD;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEjD,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/date-range-picker/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { CalendarProps } from '../calendar/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { ExpandToViewport } from '../internal/components/dropdown/interfaces';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { DateFormat, EditableDateFormat } from '../internal/utils/date-time/interfaces';\nimport { TimeInputProps } from '../time-input/interfaces';\n\nexport interface DateRangePickerBaseProps {\n /**\n * The current date range value. Can be either an absolute time range\n * or a relative time range.\n */\n value: null | DateRangePickerProps.Value;\n\n /**\n * A list of relative time ranges that are shown as suggestions.\n */\n relativeOptions: ReadonlyArray<DateRangePickerProps.RelativeOption>;\n\n /**\n * A function that defines whether a particular date should be enabled\n * in the calendar or not. Note that disabling a date in the calendar\n * still allows users to enter this date via keyboard. We therefore\n * recommend that you also validate these constraints client- and\n * server-side, in the same way as for other form elements.\n */\n isDateEnabled?: DateRangePickerProps.IsDateEnabledFunction;\n\n /**\n * Provides a reason why a particular date in the calendar is not enabled (only when `isDateEnabled` returns `false`).\n * If provided, the date becomes focusable.\n * @param date\n */\n dateDisabledReason?: DateRangePickerProps.DateDisabledReasonFunction;\n\n /**\n * The locale to be used for rendering month names and defining the\n * starting date of the week. If not provided, it will be determined\n * from the page and browser locales. Supported values and formats\n * are as-per the [JavaScript Intl API specification](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).\n */\n locale?: string;\n\n /**\n * Starting day of the week. [0-6] maps to [Sunday-Saturday].\n * By default the starting day of the week is defined by the locale,\n * but you can override it using this property.\n */\n startOfWeek?: number;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: DateRangePickerProps.I18nStrings;\n\n /**\n * Hides time inputs and changes the input format to date-only, e.g. 2021-04-06.\n *\n * Do not use `dateOnly` flag conditionally. The component does not trigger the value update\n * when the flag changes which means the value format can become inconsistent.\n *\n * This does not apply when the 'granularity' is set to 'month'\n *\n * Default: `false`.\n */\n dateOnly?: boolean;\n\n /**\n * Determines the range selector mode as follows:\n *\n * * `default` for combined absolute/relative range selector.\n * * `absolute-only` for absolute-only range selector.\n * * `relative-only` for relative-only range selector.\n *\n * By default, the range selector mode is `default`.\n */\n rangeSelectorMode?: DateRangePickerProps.RangeSelectorMode;\n\n /**\n * Specifies the date format to use on the date inputs in the absolute dropdown.\n *\n * The format of the input as it is being interacted with. It can take the following values:\n * * `iso`: ISO 8601 format without time, e.g.: 2024-01-30 (or 2024-01)\n * * `slashed`: similar to ISO 8601 but with '/' in place of '-'. e.g.: 2024/01/30 (or 2024/01)\n */\n dateInputFormat?: DateRangePickerProps.DateInputFormat;\n\n /**\n * Specifies the format of the time input for absolute ranges.\n *\n * Use to restrict the granularity of time that the user can enter.\n *\n * Has no effect when `dateOnly` is true or `granularity` is set to 'month'.\n */\n timeInputFormat?: DateRangePickerProps.TimeInputFormat;\n\n /**\n * Fired whenever a user changes the component's value.\n * The event `detail` contains the current value of the field.\n */\n onChange?: NonCancelableEventHandler<DateRangePickerProps.ChangeDetail>;\n\n /**\n * The time offset from UTC in minutes that should be used to\n * display and produce values.\n *\n * Has no effect when `dateOnly` is true.\n *\n * Default: the user's current time offset as provided by the browser.\n *\n * @deprecated Use `getTimeOffset` instead.\n */\n timeOffset?: number;\n\n /**\n * A function that defines timezone offset from UTC in minutes for selected dates.\n * Use it to define time relative to the desired timezone.\n *\n * The function is called for the start date and the end date and takes a UTC date\n * corresponding the selected value as an argument.\n *\n * Has no effect when `dateOnly` is true.\n *\n * Default: the user's current time offset as provided by the browser.\n */\n getTimeOffset?: DateRangePickerProps.GetTimeOffsetFunction;\n}\nexport interface DateRangePickerProps\n extends BaseComponentProps,\n FormFieldValidationControlProps,\n ExpandToViewport,\n DateRangePickerBaseProps,\n Pick<CalendarProps, 'granularity'> {\n /**\n * Specifies the placeholder text that is rendered when the value is empty.\n */\n placeholder?: string;\n\n /**\n * Specifies that the component is disabled, preventing the user from\n * modifying the value. A disabled component cannot receive focus.\n */\n disabled?: boolean;\n\n /**\n * Specifies that the component is read-only, preventing the user from\n * modifying the value. A read-only component can receive focus.\n */\n readOnly?: boolean;\n\n /**\n * Fired when keyboard focus is set onto the UI control.\n */\n onFocus?: NonCancelableEventHandler<null>;\n\n /**\n * Fired when keyboard focus is removed from the UI control.\n */\n onBlur?: NonCancelableEventHandler<null>;\n\n /**\n * A function that defines whether a particular range is valid or not.\n *\n * Ensure that your function checks for missing fields in the value.\n */\n isValidRange: DateRangePickerProps.ValidationFunction;\n\n /**\n * Specifies whether the component should show a button that\n * allows the user to clear the selected value.\n */\n showClearButton?: boolean;\n\n /**\n * Specifies an additional control displayed in the dropdown, located below the range calendar.\n */\n customAbsoluteRangeControl?: DateRangePickerProps.AbsoluteRangeControl;\n\n /**\n * Specifies which time units to allow in the custom relative range control.\n */\n customRelativeRangeUnits?: DateRangePickerProps.TimeUnit[];\n\n /**\n * Specifies custom content to fully override the relative range tab.\n * When provided, all default relative range functionality is replaced.\n */\n renderRelativeRangeContent?: DateRangePickerProps.RelativeRangeControl;\n\n /**\n * Specifies the time format to use for displaying the absolute time range.\n *\n * It can take the following values:\n * * `iso`: ISO 8601 format, e.g.: 2024-01-30T13:32:32+01:00 (or 2024-01-30 when `dateOnly` is true)\n * * `long-localized`: a more human-readable, localized format, e.g.: January 30, 2024, 13:32:32 (UTC+1) (or January 30, 2024 when `dateOnly` is true)\n * * `slashed`: similar to ISO 8601 but with '/' in place of '-'. e.g.: 2024/01/30 (or 2024/01)\n */\n absoluteFormat?: DateRangePickerProps.AbsoluteFormat;\n\n /**\n * Specifies whether to hide the time offset in the displayed absolute time range.\n * Defaults to `false`.\n */\n hideTimeOffset?: boolean;\n}\n\nexport namespace DateRangePickerProps {\n export type Value = AbsoluteValue | RelativeValue;\n export interface AbsoluteValue {\n /**\n * In ISO8601 format, e.g.: 2021-04-06T17:23:50+02:00 (or 2021-04-06 when `dateOnly` is true)\n */\n startDate: string;\n /**\n * In ISO8601 format, e.g.: 2021-04-06T17:23:50+02:00 (or 2021-04-06 when `dateOnly` is true)\n */\n endDate: string;\n type: 'absolute';\n }\n\n export interface RelativeValue {\n /**\n * If provided, used to match this value\n * to a provided relative option.\n */\n key?: string;\n amount: number;\n unit: TimeUnit;\n type: 'relative';\n }\n export interface RelativeOption {\n /**\n * Used to uniquely identify this relative option.\n */\n key: string;\n amount: number;\n unit: TimeUnit;\n type: 'relative';\n }\n\n export type TimeUnit = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';\n\n export type ValidationFunction = (value: Value | null) => ValidationResult;\n\n export type ValidationResult = ValidRangeResult | InvalidRangeResult;\n\n export interface ValidRangeResult {\n valid: true;\n }\n\n export interface InvalidRangeResult {\n valid: false;\n errorMessage: string;\n }\n\n export interface ChangeDetail {\n /**\n * The newly selected range of this date range picker.\n */\n value: null | Value;\n }\n\n export interface IsDateEnabledFunction {\n (date: Date): boolean;\n }\n\n export interface DateDisabledReasonFunction {\n (date: Date): string;\n }\n\n export interface GetTimeOffsetFunction {\n (date: Date): number;\n }\n\n export interface DateTimeStrings {\n date: string;\n time: string;\n }\n\n export interface PendingAbsoluteValue {\n start: DateTimeStrings;\n end: DateTimeStrings;\n }\n\n export type AbsoluteRangeControl = (\n selectedRange: PendingAbsoluteValue,\n setSelectedRange: React.Dispatch<React.SetStateAction<PendingAbsoluteValue>>\n ) => React.ReactNode;\n\n export type RelativeRangeControl = (\n selectedRange: RelativeValue | null,\n setSelectedRange: (value: RelativeValue) => void\n ) => React.ReactNode;\n\n export type RangeSelectorMode = 'default' | 'absolute-only' | 'relative-only';\n\n export interface Ref {\n /**\n * Sets the browser focus on the UI control\n */\n focus(): void;\n }\n\n export interface I18nStrings {\n /**\n * Adds `aria-label` to the trigger and dropdown.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-labelledby` to the trigger and dropdown.\n */\n ariaLabelledby?: string;\n\n /**\n * Adds `aria-describedby` to the trigger and dropdown.\n */\n ariaDescribedby?: string;\n\n /**\n * Label of the mode selection group. In the standard view, it adds 'aria-label' to the group of segments.\n * In a narrow container the label is visible and attached to the select component.\n * @i18n\n */\n modeSelectionLabel?: string;\n\n /**\n * Segment title of the relative range selection mode\n * @i18n\n */\n relativeModeTitle?: string;\n\n /**\n * Segment title of the absolute range selection mode\n * @i18n\n */\n absoluteModeTitle?: string;\n\n /**\n * Heading for the relative range selection area\n * @i18n\n */\n relativeRangeSelectionHeading?: string;\n\n /**\n * Description for the relative range selection area\n * @i18n\n */\n relativeRangeSelectionMonthlyDescription?: string;\n\n /**\n * Visible label of the Cancel button\n * @i18n\n */\n cancelButtonLabel?: string;\n\n /**\n * Visible label of the Clear and dismiss button\n * @i18n\n */\n clearButtonLabel?: string;\n\n /**\n * Visible label of the Apply button\n * @i18n\n */\n applyButtonLabel?: string;\n\n /**\n * Formatting function for relative ranges.\n * This function must convert a relative range to a human-readable string.\n * @i18n\n */\n formatRelativeRange?: (value: RelativeValue) => string;\n\n /**\n * Formatting function for time units.\n *\n * This function must return a localized form of the unit that fits the provided time value.\n * @i18n\n */\n formatUnit?: (unit: TimeUnit, value: number) => string;\n\n /**\n * Visible label for the option for selecting\n * a custom relative range.\n * @i18n\n */\n customRelativeRangeOptionLabel?: string;\n\n /**\n * Visible description for the option for selecting\n * a custom relative range.\n * @i18n\n */\n customRelativeRangeOptionDescription?: string;\n\n /**\n * Visible label for the duration selector for\n * the custom relative range.\n * @i18n\n */\n customRelativeRangeDurationLabel?: string;\n\n /**\n * Placeholder for the duration selector for\n * the custom relative range.\n * @i18n\n */\n customRelativeRangeDurationPlaceholder?: string;\n\n /**\n * Visible label for the unit selector for the\n * custom relative range.\n * @i18n\n */\n customRelativeRangeUnitLabel?: string;\n\n /**\n * Visible label for the Start Month input for the\n * absolute range.\n * @i18n\n */\n startMonthLabel?: string;\n\n /**\n * Visible label for the Start Date input for the\n * absolute range.\n * @i18n\n */\n startDateLabel?: string;\n\n /**\n * Visible label for the Start Time input for the\n * absolute range.\n * @i18n\n */\n startTimeLabel?: string;\n\n /**\n * Visible label for the End Month input for the\n * absolute range.\n * @i18n\n */\n endMonthLabel?: string;\n\n /**\n * Visible label for the End Date input for the\n * absolute range.\n * @i18n\n */\n endDateLabel?: string;\n\n /**\n * Visible label for the End Time input for the absolute range.\n * This serves as a fallback if no format specific date constraint test is provided\n *\n * @i18n\n */\n endTimeLabel?: string;\n\n /**\n * Constraint text for the date input field for the\n * absolute range with no time option.\n * @i18n\n */\n dateConstraintText?: string;\n\n /**\n * Constraint text for the input fields for the absolute range in 'slashed' format with no time option.\n * @i18n\n */\n slashedDateConstraintText?: string;\n\n /**\n * Constraint text for the input fields for the absolute range in 'iso' format with no time option.\n * @i18n\n */\n isoDateConstraintText?: string;\n\n /**\n * Constraint text for the input fields for the absolute range.\n * This serves as a fallback if no format specific datetime constraint test is provided\n *\n * @i18n\n */\n dateTimeConstraintText?: string;\n\n /**\n * Constraint text for the date input fields for the absolute range in 'slashed' format.\n * @i18n\n */\n slashedDateTimeConstraintText?: string;\n\n /**\n * Constraint text for the date input fields for the absolute range in 'iso' format with.\n * @i18n\n */\n isoDateTimeConstraintText?: string;\n\n /**\n * Constraint text for the month input fields for the absolute range.\n * This serves as a fallback if no format specific month constraint test is provided.\n *\n * @i18n\n */\n monthConstraintText?: string;\n\n /**\n * Constraint text for the month input fields for the absolute range in 'slashed' format.\n * @i18n\n */\n slashedMonthConstraintText?: string;\n\n /**\n * Constraint text for the month input fields for the absolute range in 'iso' format.\n * @i18n\n */\n isoMonthConstraintText?: string;\n\n /**\n * Provides a text alternative for the error icon in the error alert.\n * @i18n\n */\n errorIconAriaLabel?: string;\n\n /**\n * When the property is set, screen readers announce the selected range when the absolute range gets selected.\n */\n renderSelectedAbsoluteRangeAriaLive?: (startDate: string, endDate: string) => string;\n\n /**\n * Used as part of the `aria-label` for today's date in the calendar.\n * @i18n\n */\n todayAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'next month' button.\n * @i18n\n */\n nextMonthAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'previous month' button.\n * @i18n\n */\n previousMonthAriaLabel?: string;\n\n /**\n * Used as part of the `aria-label` for the current month in the calendar.\n * @i18n\n */\n currentMonthAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'next year' button.\n * @i18n\n */\n nextYearAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'previous year' button.\n * @i18n\n */\n previousYearAriaLabel?: string;\n }\n\n export type AbsoluteFormat = DateFormat;\n\n export type DateInputFormat = EditableDateFormat | undefined;\n\n export type TimeInputFormat = TimeInputProps.Format;\n}\n\nexport type DayIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\nexport type QuarterIndex = 0 | 1 | 2;\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/date-range-picker/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { CalendarProps } from '../calendar/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { ExpandToViewport } from '../internal/components/dropdown/interfaces';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { DateFormat, EditableDateFormat } from '../internal/utils/date-time/interfaces';\nimport { TimeInputProps } from '../time-input/interfaces';\n\nexport interface DateRangePickerBaseProps {\n /**\n * The current date range value. Can be either an absolute time range\n * or a relative time range.\n */\n value: null | DateRangePickerProps.Value;\n\n /**\n * A list of relative time ranges that are shown as suggestions.\n */\n relativeOptions: ReadonlyArray<DateRangePickerProps.RelativeOption>;\n\n /**\n * A function that defines whether a particular date should be enabled\n * in the calendar or not. Note that disabling a date in the calendar\n * still allows users to enter this date via keyboard. We therefore\n * recommend that you also validate these constraints client- and\n * server-side, in the same way as for other form elements.\n */\n isDateEnabled?: DateRangePickerProps.IsDateEnabledFunction;\n\n /**\n * Provides a reason why a particular date in the calendar is not enabled (only when `isDateEnabled` returns `false`).\n * If provided, the date becomes focusable.\n * @param date\n */\n dateDisabledReason?: DateRangePickerProps.DateDisabledReasonFunction;\n\n /**\n * The locale to be used for rendering month names and defining the\n * starting date of the week. If not provided, it will be determined\n * from the page and browser locales. Supported values and formats\n * are as-per the [JavaScript Intl API specification](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).\n */\n locale?: string;\n\n /**\n * Starting day of the week. [0-6] maps to [Sunday-Saturday].\n * By default the starting day of the week is defined by the locale,\n * but you can override it using this property.\n */\n startOfWeek?: number;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: DateRangePickerProps.I18nStrings;\n\n /**\n * Hides time inputs and changes the input format to date-only, e.g. 2021-04-06.\n *\n * Do not use `dateOnly` flag conditionally. The component does not trigger the value update\n * when the flag changes which means the value format can become inconsistent.\n *\n * This does not apply when the 'granularity' is set to 'month'\n *\n * Default: `false`.\n */\n dateOnly?: boolean;\n\n /**\n * Determines the range selector mode as follows:\n *\n * * `default` for combined absolute/relative range selector.\n * * `absolute-only` for absolute-only range selector.\n * * `relative-only` for relative-only range selector.\n *\n * By default, the range selector mode is `default`.\n */\n rangeSelectorMode?: DateRangePickerProps.RangeSelectorMode;\n\n /**\n * Specifies the date format to use on the date inputs in the absolute dropdown.\n *\n * The format of the input as it is being interacted with. It can take the following values:\n * * `iso`: ISO 8601 format without time, e.g.: 2024-01-30 (or 2024-01)\n * * `slashed`: similar to ISO 8601 but with '/' in place of '-'. e.g.: 2024/01/30 (or 2024/01)\n */\n dateInputFormat?: DateRangePickerProps.DateInputFormat;\n\n /**\n * Specifies the format of the time input for absolute ranges.\n *\n * Use to restrict the granularity of time that the user can enter.\n *\n * Has no effect when `dateOnly` is true or `granularity` is set to 'month'.\n */\n timeInputFormat?: DateRangePickerProps.TimeInputFormat;\n\n /**\n * Fired whenever a user changes the component's value.\n * The event `detail` contains the current value of the field.\n */\n onChange?: NonCancelableEventHandler<DateRangePickerProps.ChangeDetail>;\n\n /**\n * The time offset from UTC in minutes that should be used to\n * display and produce values.\n *\n * Has no effect when `dateOnly` is true.\n *\n * Default: the user's current time offset as provided by the browser.\n *\n * @deprecated Use `getTimeOffset` instead.\n */\n timeOffset?: number;\n\n /**\n * A function that defines timezone offset from UTC in minutes for selected dates.\n * Use it to define time relative to the desired timezone.\n *\n * The function is called for the start date and the end date and takes a UTC date\n * corresponding the selected value as an argument.\n *\n * Has no effect when `dateOnly` is true.\n *\n * Default: the user's current time offset as provided by the browser.\n */\n getTimeOffset?: DateRangePickerProps.GetTimeOffsetFunction;\n}\nexport interface DateRangePickerProps\n extends BaseComponentProps,\n FormFieldValidationControlProps,\n ExpandToViewport,\n DateRangePickerBaseProps,\n Pick<CalendarProps, 'granularity'> {\n /**\n * Specifies the placeholder text that is rendered when the value is empty.\n */\n placeholder?: string;\n\n /**\n * Specifies that the component is disabled, preventing the user from\n * modifying the value. A disabled component cannot receive focus.\n */\n disabled?: boolean;\n\n /**\n * Specifies that the component is read-only, preventing the user from\n * modifying the value. A read-only component can receive focus.\n */\n readOnly?: boolean;\n\n /**\n * Fired when keyboard focus is set onto the UI control.\n */\n onFocus?: NonCancelableEventHandler<null>;\n\n /**\n * Fired when keyboard focus is removed from the UI control.\n */\n onBlur?: NonCancelableEventHandler<null>;\n\n /**\n * A function that defines whether a particular range is valid or not.\n *\n * Ensure that your function checks for missing fields in the value.\n */\n isValidRange: DateRangePickerProps.ValidationFunction;\n\n /**\n * Specifies whether the component should show a button that\n * allows the user to clear the selected value.\n */\n showClearButton?: boolean;\n\n /**\n * Specifies an additional control displayed in the dropdown, located below the range calendar.\n */\n customAbsoluteRangeControl?: DateRangePickerProps.AbsoluteRangeControl;\n\n /**\n * Specifies which time units to allow in the custom relative range control.\n */\n customRelativeRangeUnits?: DateRangePickerProps.TimeUnit[];\n\n /**\n * Specifies custom content to fully override the relative range tab.\n * When provided, all default relative range functionality is replaced.\n */\n renderRelativeRangeContent?: DateRangePickerProps.RelativeRangeControl;\n\n /**\n * Specifies the time format to use for displaying the absolute time range.\n *\n * It can take the following values:\n * * `iso`: ISO 8601 format, e.g.: 2024-01-30T13:32:32+01:00 (or 2024-01-30 when `dateOnly` is true)\n * * `long-localized`: a more human-readable, localized format, e.g.: January 30, 2024, 13:32:32 (UTC+1) (or January 30, 2024 when `dateOnly` is true)\n * * `slashed`: similar to ISO 8601 but with '/' in place of '-'. e.g.: 2024/01/30 (or 2024/01)\n */\n absoluteFormat?: DateRangePickerProps.AbsoluteFormat;\n\n /**\n * Specifies whether to hide the time offset in the displayed absolute time range.\n * Defaults to `false`.\n */\n hideTimeOffset?: boolean;\n}\n\nexport namespace DateRangePickerProps {\n export type Value = AbsoluteValue | RelativeValue;\n export interface AbsoluteValue {\n /**\n * In ISO8601 format, e.g.: 2021-04-06T17:23:50+02:00 (or 2021-04-06 when `dateOnly` is true)\n */\n startDate: string;\n /**\n * In ISO8601 format, e.g.: 2021-04-06T17:23:50+02:00 (or 2021-04-06 when `dateOnly` is true)\n */\n endDate: string;\n type: 'absolute';\n }\n\n export interface RelativeValue {\n /**\n * If provided, used to match this value\n * to a provided relative option.\n */\n key?: string;\n amount: number;\n unit: TimeUnit;\n type: 'relative';\n }\n export interface RelativeOption {\n /**\n * Used to uniquely identify this relative option.\n */\n key: string;\n amount: number;\n unit: TimeUnit;\n type: 'relative';\n }\n\n export type TimeUnit = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';\n\n export type ValidationFunction = (value: Value | null) => ValidationResult;\n\n export type ValidationResult = ValidRangeResult | InvalidRangeResult;\n\n export interface ValidRangeResult {\n valid: true;\n }\n\n export interface InvalidRangeResult {\n valid: false;\n errorMessage: string;\n }\n\n export interface ChangeDetail {\n /**\n * The newly selected range of this date range picker.\n */\n value: null | Value;\n }\n\n export interface IsDateEnabledFunction {\n (date: Date): boolean;\n }\n\n export interface DateDisabledReasonFunction {\n (date: Date): string;\n }\n\n export interface GetTimeOffsetFunction {\n (date: Date): number;\n }\n\n export interface DateTimeStrings {\n date: string;\n time: string;\n }\n\n export interface PendingAbsoluteValue {\n start: DateTimeStrings;\n end: DateTimeStrings;\n }\n\n export type AbsoluteRangeControl = (\n selectedRange: PendingAbsoluteValue,\n setSelectedRange: React.Dispatch<React.SetStateAction<PendingAbsoluteValue>>\n ) => React.ReactNode;\n\n export type RelativeRangeControl = (\n selectedRange: RelativeValue | null,\n setSelectedRange: (value: RelativeValue) => void\n ) => React.ReactNode;\n\n export type RangeSelectorMode = 'default' | 'absolute-only' | 'relative-only';\n\n export interface Ref {\n /**\n * Sets the browser focus on the UI control\n */\n focus(): void;\n }\n\n export interface I18nStrings {\n /**\n * Adds `aria-label` to the trigger and dropdown.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-labelledby` to the trigger and dropdown.\n */\n ariaLabelledby?: string;\n\n /**\n * Adds `aria-describedby` to the trigger and dropdown.\n */\n ariaDescribedby?: string;\n\n /**\n * Label of the mode selection group. In the standard view, it adds 'aria-label' to the group of segments.\n * In a narrow container the label is visible and attached to the select component.\n * @i18n\n */\n modeSelectionLabel?: string;\n\n /**\n * Segment title of the relative range selection mode\n * @i18n\n */\n relativeModeTitle?: string;\n\n /**\n * Segment title of the absolute range selection mode\n * @i18n\n */\n absoluteModeTitle?: string;\n\n /**\n * Heading for the relative range selection area\n * @i18n\n */\n relativeRangeSelectionHeading?: string;\n\n /**\n * Description for the relative range selection area\n * @i18n\n */\n relativeRangeSelectionMonthlyDescription?: string;\n\n /**\n * Visible label of the Cancel button\n * @i18n\n */\n cancelButtonLabel?: string;\n\n /**\n * Visible label of the Clear and dismiss button\n * @i18n\n */\n clearButtonLabel?: string;\n\n /**\n * Visible label of the Apply button\n * @i18n\n */\n applyButtonLabel?: string;\n\n /**\n * Formatting function for relative ranges.\n * This function must convert a relative range to a human-readable string.\n * @i18n\n */\n formatRelativeRange?: (value: RelativeValue) => string;\n\n /**\n * Formatting function for time units.\n *\n * This function must return a localized form of the unit that fits the provided time value.\n * @i18n\n */\n formatUnit?: (unit: TimeUnit, value: number) => string;\n\n /**\n * Visible label for the option for selecting\n * a custom relative range.\n * @i18n\n */\n customRelativeRangeOptionLabel?: string;\n\n /**\n * Visible description for the option for selecting\n * a custom relative range.\n * @i18n\n */\n customRelativeRangeOptionDescription?: string;\n\n /**\n * Visible label for the duration selector for\n * the custom relative range.\n * @i18n\n */\n customRelativeRangeDurationLabel?: string;\n\n /**\n * Placeholder for the duration selector for\n * the custom relative range.\n * @i18n\n */\n customRelativeRangeDurationPlaceholder?: string;\n\n /**\n * Visible label for the unit selector for the\n * custom relative range.\n * @i18n\n */\n customRelativeRangeUnitLabel?: string;\n\n /**\n * Visible label for the Start Month input for the\n * absolute range.\n * @i18n\n */\n startMonthLabel?: string;\n\n /**\n * Visible label for the Start Date input for the\n * absolute range.\n * @i18n\n */\n startDateLabel?: string;\n\n /**\n * Visible label for the Start Time input for the\n * absolute range.\n * @i18n\n */\n startTimeLabel?: string;\n\n /**\n * Visible label for the End Month input for the\n * absolute range.\n * @i18n\n */\n endMonthLabel?: string;\n\n /**\n * Visible label for the End Date input for the\n * absolute range.\n * @i18n\n */\n endDateLabel?: string;\n\n /**\n * Visible label for the End Time input for the absolute range.\n * This serves as a fallback if no format specific date constraint test is provided\n *\n * @i18n\n */\n endTimeLabel?: string;\n\n /**\n * Constraint text for the date input field for the\n * absolute range with no time option.\n * @i18n\n */\n dateConstraintText?: string;\n\n /**\n * Constraint text for the input fields for the absolute range in 'slashed' format with no time option.\n * @i18n\n */\n slashedDateConstraintText?: string;\n\n /**\n * Constraint text for the input fields for the absolute range in 'iso' format with no time option.\n * @i18n\n */\n isoDateConstraintText?: string;\n\n /**\n * Constraint text for the input fields for the absolute range.\n * This serves as a fallback if no format specific datetime constraint test is provided\n *\n * @i18n\n */\n dateTimeConstraintText?: string;\n\n /**\n * Constraint text for the date input fields for the absolute range in 'slashed' format.\n * @i18n\n */\n slashedDateTimeConstraintText?: string;\n\n /**\n * Constraint text for the date input fields for the absolute range in 'iso' format with.\n * @i18n\n */\n isoDateTimeConstraintText?: string;\n\n /**\n * Constraint text for the month input fields for the absolute range.\n * This serves as a fallback if no format specific month constraint test is provided.\n *\n * @i18n\n */\n monthConstraintText?: string;\n\n /**\n * Constraint text for the month input fields for the absolute range in 'slashed' format.\n * @i18n\n */\n slashedMonthConstraintText?: string;\n\n /**\n * Constraint text for the month input fields for the absolute range in 'iso' format.\n * @i18n\n */\n isoMonthConstraintText?: string;\n\n /**\n * Provides a text alternative for the error icon in the error alert.\n * @i18n\n */\n errorIconAriaLabel?: string;\n\n /**\n * When the property is set, screen readers announce the selected range when the absolute range gets selected.\n */\n renderSelectedAbsoluteRangeAriaLive?: (startDate: string, endDate: string) => string;\n\n /**\n * Used as part of the `aria-label` for today's date in the calendar.\n * @i18n\n */\n todayAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'next month' button.\n * @i18n\n */\n nextMonthAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'previous month' button.\n * @i18n\n */\n previousMonthAriaLabel?: string;\n\n /**\n * Used as part of the `aria-label` for the current month in the calendar.\n * @i18n\n */\n currentMonthAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'next year' button.\n * @i18n\n */\n nextYearAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'previous year' button.\n * @i18n\n */\n previousYearAriaLabel?: string;\n\n /**\n * Placeholder text for date inputs in absolute mode with 'iso' format (dashes).\n * Should match the expected date format (for example \"YYYY-MM-DD\", \"JJJJ-MM-TT\" for German).\n * Used for both start and end date inputs.\n * @i18n\n */\n isoDatePlaceholder?: string;\n\n /**\n * Placeholder text for date inputs in absolute mode with 'slashed' format (slashes).\n * Should match the expected date format (for example \"YYYY/MM/DD\", \"JJJJ/MM/TT\" for German).\n * Used for both start and end date inputs.\n * @i18n\n */\n slashedDatePlaceholder?: string;\n\n /**\n * Placeholder text for time inputs in absolute mode.\n * Should match the expected time format (for example \"hh:mm:ss\", \"HH:MM:SS\").\n * Used for both start and end time inputs.\n * @i18n\n */\n timePlaceholder?: string;\n }\n\n export type AbsoluteFormat = DateFormat;\n\n export type DateInputFormat = EditableDateFormat | undefined;\n\n export type TimeInputFormat = TimeInputProps.Format;\n}\n\nexport type DayIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\nexport type QuarterIndex = 0 | 1 | 2;\n"]}
|