@cloudscape-design/components 3.0.98 → 3.0.100

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.
@@ -0,0 +1,9 @@
1
+ interface HeaderButtonProps {
2
+ ariaLabel: string;
3
+ baseDate: Date;
4
+ onChangeMonth: (date: Date) => void;
5
+ }
6
+ export declare function PrevMonthButton({ ariaLabel, baseDate, onChangeMonth }: HeaderButtonProps): JSX.Element;
7
+ export declare function NextMonthButton({ ariaLabel, baseDate, onChangeMonth }: HeaderButtonProps): JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=header-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header-button.d.ts","sourceRoot":"","sources":["../../../../src/calendar/header/header-button.tsx"],"names":[],"mappings":"AAQA,UAAU,iBAAiB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,IAAI,CAAC;IACf,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CACrC;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,iBAAiB,eAWxF;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,iBAAiB,eAWxF"}
@@ -0,0 +1,15 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import React from 'react';
4
+ import { InternalButton } from '../../button/internal';
5
+ import styles from '../styles.css.js';
6
+ import { addMonths } from 'date-fns';
7
+ export function PrevMonthButton(_a) {
8
+ var ariaLabel = _a.ariaLabel, baseDate = _a.baseDate, onChangeMonth = _a.onChangeMonth;
9
+ return (React.createElement(InternalButton, { iconName: "angle-left", ariaLabel: ariaLabel, variant: "icon", onClick: function () { return onChangeMonth(addMonths(baseDate, -1)); }, formAction: "none", className: styles['calendar-prev-month-btn'] }));
10
+ }
11
+ export function NextMonthButton(_a) {
12
+ var ariaLabel = _a.ariaLabel, baseDate = _a.baseDate, onChangeMonth = _a.onChangeMonth;
13
+ return (React.createElement(InternalButton, { iconName: "angle-right", ariaLabel: ariaLabel, variant: "icon", onClick: function () { return onChangeMonth(addMonths(baseDate, 1)); }, formAction: "none", className: styles['calendar-next-month-btn'] }));
14
+ }
15
+ //# sourceMappingURL=header-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header-button.js","sourceRoot":"","sources":["../../../../src/calendar/header/header-button.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAQrC,MAAM,UAAU,eAAe,CAAC,EAAyD;QAAvD,SAAS,eAAA,EAAE,QAAQ,cAAA,EAAE,aAAa,mBAAA;IAClE,OAAO,CACL,oBAAC,cAAc,IACb,QAAQ,EAAC,YAAY,EACrB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAC,MAAM,EACd,OAAO,EAAE,cAAM,OAAA,aAAa,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,EAAtC,CAAsC,EACrD,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,MAAM,CAAC,yBAAyB,CAAC,GAC5C,CACH,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAyD;QAAvD,SAAS,eAAA,EAAE,QAAQ,cAAA,EAAE,aAAa,mBAAA;IAClE,OAAO,CACL,oBAAC,cAAc,IACb,QAAQ,EAAC,aAAa,EACtB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAC,MAAM,EACd,OAAO,EAAE,cAAM,OAAA,aAAa,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAArC,CAAqC,EACpD,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,MAAM,CAAC,yBAAyB,CAAC,GAC5C,CACH,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 { InternalButton } from '../../button/internal';\nimport styles from '../styles.css.js';\nimport { addMonths } from 'date-fns';\n\ninterface HeaderButtonProps {\n ariaLabel: string;\n baseDate: Date;\n onChangeMonth: (date: Date) => void;\n}\n\nexport function PrevMonthButton({ ariaLabel, baseDate, onChangeMonth }: HeaderButtonProps) {\n return (\n <InternalButton\n iconName=\"angle-left\"\n ariaLabel={ariaLabel}\n variant=\"icon\"\n onClick={() => onChangeMonth(addMonths(baseDate, -1))}\n formAction=\"none\"\n className={styles['calendar-prev-month-btn']}\n />\n );\n}\n\nexport function NextMonthButton({ ariaLabel, baseDate, onChangeMonth }: HeaderButtonProps) {\n return (\n <InternalButton\n iconName=\"angle-right\"\n ariaLabel={ariaLabel}\n variant=\"icon\"\n onClick={() => onChangeMonth(addMonths(baseDate, 1))}\n formAction=\"none\"\n className={styles['calendar-next-month-btn']}\n />\n );\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  interface CalendarHeaderProps {
2
2
  baseDate: Date;
3
3
  locale: string;
4
- onChangeMonth: (prev?: boolean) => void;
4
+ onChangeMonth: (date: Date) => void;
5
5
  previousMonthLabel: string;
6
6
  nextMonthLabel: string;
7
7
  headingId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/calendar/header/index.tsx"],"names":[],"mappings":"AAOA,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,IAAI,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,cAAc,wFAOjB,mBAAmB,gBAUrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/calendar/header/index.tsx"],"names":[],"mappings":"AAOA,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,IAAI,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACpC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,cAAc,wFAOjB,mBAAmB,gBAUrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -3,13 +3,13 @@
3
3
  import React from 'react';
4
4
  import styles from '../styles.css.js';
5
5
  import { renderMonthAndYear } from '../utils/intl';
6
- import HeaderButton from './button';
6
+ import { PrevMonthButton, NextMonthButton } from './header-button';
7
7
  var CalendarHeader = function (_a) {
8
8
  var baseDate = _a.baseDate, locale = _a.locale, onChangeMonth = _a.onChangeMonth, previousMonthLabel = _a.previousMonthLabel, nextMonthLabel = _a.nextMonthLabel, headingId = _a.headingId;
9
9
  return (React.createElement("div", { className: styles['calendar-header'] },
10
- React.createElement(HeaderButton, { ariaLabel: previousMonthLabel, isPrevious: true, onChangeMonth: onChangeMonth }),
10
+ React.createElement(PrevMonthButton, { ariaLabel: previousMonthLabel, baseDate: baseDate, onChangeMonth: onChangeMonth }),
11
11
  React.createElement("h2", { className: styles['calendar-header-month'], id: headingId }, renderMonthAndYear(locale, baseDate)),
12
- React.createElement(HeaderButton, { ariaLabel: nextMonthLabel, isPrevious: false, onChangeMonth: onChangeMonth })));
12
+ React.createElement(NextMonthButton, { ariaLabel: nextMonthLabel, baseDate: baseDate, onChangeMonth: onChangeMonth })));
13
13
  };
14
14
  export default CalendarHeader;
15
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/calendar/header/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,YAAY,MAAM,UAAU,CAAC;AAWpC,IAAM,cAAc,GAAG,UAAC,EAOF;QANpB,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,aAAa,mBAAA,EACb,kBAAkB,wBAAA,EAClB,cAAc,oBAAA,EACd,SAAS,eAAA;IAET,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC;QACvC,oBAAC,YAAY,IAAC,SAAS,EAAE,kBAAkB,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,aAAa,GAAI;QAC/F,4BAAI,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC,EAAE,EAAE,EAAE,SAAS,IAC1D,kBAAkB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAClC;QACL,oBAAC,YAAY,IAAC,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,GAAI,CACxF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport styles from '../styles.css.js';\nimport { renderMonthAndYear } from '../utils/intl';\nimport HeaderButton from './button';\n\ninterface CalendarHeaderProps {\n baseDate: Date;\n locale: string;\n onChangeMonth: (prev?: boolean) => void;\n previousMonthLabel: string;\n nextMonthLabel: string;\n headingId: string;\n}\n\nconst CalendarHeader = ({\n baseDate,\n locale,\n onChangeMonth,\n previousMonthLabel,\n nextMonthLabel,\n headingId,\n}: CalendarHeaderProps) => {\n return (\n <div className={styles['calendar-header']}>\n <HeaderButton ariaLabel={previousMonthLabel} isPrevious={true} onChangeMonth={onChangeMonth} />\n <h2 className={styles['calendar-header-month']} id={headingId}>\n {renderMonthAndYear(locale, baseDate)}\n </h2>\n <HeaderButton ariaLabel={nextMonthLabel} isPrevious={false} onChangeMonth={onChangeMonth} />\n </div>\n );\n};\n\nexport default CalendarHeader;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/calendar/header/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAWnE,IAAM,cAAc,GAAG,UAAC,EAOF;QANpB,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,aAAa,mBAAA,EACb,kBAAkB,wBAAA,EAClB,cAAc,oBAAA,EACd,SAAS,eAAA;IAET,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC;QACvC,oBAAC,eAAe,IAAC,SAAS,EAAE,kBAAkB,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,GAAI;QACpG,4BAAI,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC,EAAE,EAAE,EAAE,SAAS,IAC1D,kBAAkB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAClC;QACL,oBAAC,eAAe,IAAC,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,GAAI,CAC5F,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport styles from '../styles.css.js';\nimport { renderMonthAndYear } from '../utils/intl';\nimport { PrevMonthButton, NextMonthButton } from './header-button';\n\ninterface CalendarHeaderProps {\n baseDate: Date;\n locale: string;\n onChangeMonth: (date: Date) => void;\n previousMonthLabel: string;\n nextMonthLabel: string;\n headingId: string;\n}\n\nconst CalendarHeader = ({\n baseDate,\n locale,\n onChangeMonth,\n previousMonthLabel,\n nextMonthLabel,\n headingId,\n}: CalendarHeaderProps) => {\n return (\n <div className={styles['calendar-header']}>\n <PrevMonthButton ariaLabel={previousMonthLabel} baseDate={baseDate} onChangeMonth={onChangeMonth} />\n <h2 className={styles['calendar-header-month']} id={headingId}>\n {renderMonthAndYear(locale, baseDate)}\n </h2>\n <NextMonthButton ariaLabel={nextMonthLabel} baseDate={baseDate} onChangeMonth={onChangeMonth} />\n </div>\n );\n};\n\nexport default CalendarHeader;\n"]}
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { __assign, __rest } from "tslib";
4
4
  import React, { useEffect, useRef, useState } from 'react';
5
- import { addMonths, isSameMonth } from 'date-fns';
5
+ import { isSameMonth } from 'date-fns';
6
6
  import styles from './styles.css.js';
7
7
  import CalendarHeader from './header';
8
8
  import Grid from './grid';
@@ -50,8 +50,8 @@ export default function Calendar(_a) {
50
50
  };
51
51
  var baseDate = getBaseDate(displayedDate, isDateEnabled);
52
52
  var focusableDate = focusedDate || selectFocusedDate(memoizedValue, baseDate);
53
- var onHeaderChangeMonthHandler = function (isPreviousButtonClick) {
54
- setDisplayedDate(addMonths(baseDate, isPreviousButtonClick ? -1 : 1));
53
+ var onHeaderChangeMonthHandler = function (date) {
54
+ setDisplayedDate(date);
55
55
  setFocusedDate(null);
56
56
  };
57
57
  var onGridChangeMonthHandler = function (newMonth) {
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/calendar/internal.tsx"],"names":[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AAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useEffect, useRef, useState } from 'react';\nimport { addMonths, isSameMonth } from 'date-fns';\nimport styles from './styles.css.js';\nimport CalendarHeader from './header';\nimport Grid from './grid';\nimport { normalizeLocale, normalizeStartOfWeek } from '../internal/utils/locale';\nimport { formatDate, parseDate } from '../internal/utils/date-time';\nimport { fireNonCancelableEvent } from '../internal/events/index.js';\nimport checkControlled from '../internal/hooks/check-controlled/index.js';\nimport clsx from 'clsx';\nimport { CalendarProps } from './interfaces.js';\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component/index.js';\nimport { getBaseDate } from './utils/navigation';\nimport { useDateCache } from '../internal/hooks/use-date-cache/index.js';\nimport { useUniqueId } from '../internal/hooks/use-unique-id/index.js';\n\nexport type DayIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\nexport default function Calendar({\n value,\n locale = '',\n startOfWeek,\n isDateEnabled = () => true,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n todayAriaLabel,\n nextMonthAriaLabel,\n previousMonthAriaLabel,\n onChange,\n __internalRootRef,\n ...rest\n}: CalendarProps & InternalBaseComponentProps) {\n checkControlled('Calendar', 'value', value, 'onChange', onChange);\n\n const baseProps = getBaseProps(rest);\n const normalizedLocale = normalizeLocale('Calendar', locale);\n const normalizedStartOfWeek = normalizeStartOfWeek(startOfWeek, normalizedLocale);\n const gridWrapperRef = useRef<HTMLDivElement>(null);\n const [focusedDate, setFocusedDate] = useState<Date | null>(null);\n\n const valueDateCache = useDateCache();\n const focusedDateCache = useDateCache();\n\n // Set displayed date to value if defined or to current date otherwise.\n const parsedValue = value && value.length >= 4 ? parseDate(value) : null;\n const memoizedValue = parsedValue ? valueDateCache(parsedValue) : null;\n const defaultDisplayedDate = memoizedValue ?? new Date();\n const [displayedDate, setDisplayedDate] = useState(defaultDisplayedDate);\n\n const headingId = useUniqueId('calendar-heading');\n\n // Update displayed date if value changes.\n useEffect(() => {\n memoizedValue && setDisplayedDate(prev => (prev.getTime() !== memoizedValue.getTime() ? memoizedValue : prev));\n }, [memoizedValue]);\n\n const selectFocusedDate = (selected: Date | null, baseDate: Date): Date | null => {\n if (selected && isDateEnabled(selected) && isSameMonth(selected, baseDate)) {\n return selected;\n }\n const today = new Date();\n if (isDateEnabled(today) && isSameMonth(today, baseDate)) {\n return today;\n }\n if (isDateEnabled(baseDate)) {\n return baseDate;\n }\n return null;\n };\n\n const baseDate = getBaseDate(displayedDate, isDateEnabled);\n const focusableDate = focusedDate || selectFocusedDate(memoizedValue, baseDate);\n\n const onHeaderChangeMonthHandler = (isPreviousButtonClick?: boolean) => {\n setDisplayedDate(addMonths(baseDate, isPreviousButtonClick ? -1 : 1));\n setFocusedDate(null);\n };\n\n const onGridChangeMonthHandler = (newMonth: Date) => {\n setDisplayedDate(newMonth);\n setFocusedDate(null);\n };\n\n const onGridFocusDateHandler = (date: null | Date) => {\n if (date) {\n setFocusedDate(date ? focusedDateCache(date) : null);\n }\n };\n\n const onGridSelectDateHandler = (date: Date) => {\n fireNonCancelableEvent(onChange, { value: formatDate(date) });\n setFocusedDate(null);\n };\n\n const onGridBlur = (event: React.FocusEvent) => {\n const newFocusTargetIsInGrid = event.relatedTarget && gridWrapperRef.current?.contains(event.relatedTarget as Node);\n if (!newFocusTargetIsInGrid) {\n setFocusedDate(null);\n }\n };\n\n return (\n <div\n ref={__internalRootRef}\n {...baseProps}\n role=\"group\"\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n className={clsx(styles.root, styles.calendar, baseProps.className)}\n >\n <div className={styles['calendar-inner']}>\n <CalendarHeader\n baseDate={baseDate}\n locale={normalizedLocale}\n onChangeMonth={onHeaderChangeMonthHandler}\n previousMonthLabel={previousMonthAriaLabel}\n nextMonthLabel={nextMonthAriaLabel}\n headingId={headingId}\n />\n <div onBlur={onGridBlur} ref={gridWrapperRef}>\n <Grid\n locale={normalizedLocale}\n baseDate={baseDate}\n isDateEnabled={isDateEnabled}\n focusedDate={focusedDate}\n focusableDate={focusableDate}\n onSelectDate={onGridSelectDateHandler}\n onFocusDate={onGridFocusDateHandler}\n onChangeMonth={onGridChangeMonthHandler}\n startOfWeek={normalizedStartOfWeek}\n todayAriaLabel={todayAriaLabel}\n selectedDate={memoizedValue}\n ariaLabelledby={headingId}\n />\n </div>\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/calendar/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,UAAU,CAAC;AACtC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,eAAe,MAAM,6CAA6C,CAAC;AAC1E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAIvE,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAcY;IAb3C,IAAA,KAAK,WAAA,EACL,cAAW,EAAX,MAAM,m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a,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,uBAAuB,EACrC,WAAW,EAAE,sBAAsB,EACnC,aAAa,EAAE,wBAAwB,EACvC,WAAW,EAAE,qBAAqB,EAClC,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,aAAa,EAC3B,cAAc,EAAE,SAAS,GACzB,CACE,CACF,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useEffect, useRef, useState } from 'react';\nimport { isSameMonth } from 'date-fns';\nimport styles from './styles.css.js';\nimport CalendarHeader from './header';\nimport Grid from './grid';\nimport { normalizeLocale, normalizeStartOfWeek } from '../internal/utils/locale';\nimport { formatDate, parseDate } from '../internal/utils/date-time';\nimport { fireNonCancelableEvent } from '../internal/events/index.js';\nimport checkControlled from '../internal/hooks/check-controlled/index.js';\nimport clsx from 'clsx';\nimport { CalendarProps } from './interfaces.js';\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component/index.js';\nimport { getBaseDate } from './utils/navigation';\nimport { useDateCache } from '../internal/hooks/use-date-cache/index.js';\nimport { useUniqueId } from '../internal/hooks/use-unique-id/index.js';\n\nexport type DayIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\nexport default function Calendar({\n value,\n locale = '',\n startOfWeek,\n isDateEnabled = () => true,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n todayAriaLabel,\n nextMonthAriaLabel,\n previousMonthAriaLabel,\n onChange,\n __internalRootRef,\n ...rest\n}: CalendarProps & InternalBaseComponentProps) {\n checkControlled('Calendar', 'value', value, 'onChange', onChange);\n\n const baseProps = getBaseProps(rest);\n const normalizedLocale = normalizeLocale('Calendar', locale);\n const normalizedStartOfWeek = normalizeStartOfWeek(startOfWeek, normalizedLocale);\n const gridWrapperRef = useRef<HTMLDivElement>(null);\n const [focusedDate, setFocusedDate] = useState<Date | null>(null);\n\n const valueDateCache = useDateCache();\n const focusedDateCache = useDateCache();\n\n // Set displayed date to value if defined or to current date otherwise.\n const parsedValue = value && value.length >= 4 ? parseDate(value) : null;\n const memoizedValue = parsedValue ? valueDateCache(parsedValue) : null;\n const defaultDisplayedDate = memoizedValue ?? new Date();\n const [displayedDate, setDisplayedDate] = useState(defaultDisplayedDate);\n\n const headingId = useUniqueId('calendar-heading');\n\n // Update displayed date if value changes.\n useEffect(() => {\n memoizedValue && setDisplayedDate(prev => (prev.getTime() !== memoizedValue.getTime() ? memoizedValue : prev));\n }, [memoizedValue]);\n\n const selectFocusedDate = (selected: Date | null, baseDate: Date): Date | null => {\n if (selected && isDateEnabled(selected) && isSameMonth(selected, baseDate)) {\n return selected;\n }\n const today = new Date();\n if (isDateEnabled(today) && isSameMonth(today, baseDate)) {\n return today;\n }\n if (isDateEnabled(baseDate)) {\n return baseDate;\n }\n return null;\n };\n\n const baseDate = getBaseDate(displayedDate, isDateEnabled);\n const focusableDate = focusedDate || selectFocusedDate(memoizedValue, baseDate);\n\n const onHeaderChangeMonthHandler = (date: Date) => {\n setDisplayedDate(date);\n setFocusedDate(null);\n };\n\n const onGridChangeMonthHandler = (newMonth: Date) => {\n setDisplayedDate(newMonth);\n setFocusedDate(null);\n };\n\n const onGridFocusDateHandler = (date: null | Date) => {\n if (date) {\n setFocusedDate(date ? focusedDateCache(date) : null);\n }\n };\n\n const onGridSelectDateHandler = (date: Date) => {\n fireNonCancelableEvent(onChange, { value: formatDate(date) });\n setFocusedDate(null);\n };\n\n const onGridBlur = (event: React.FocusEvent) => {\n const newFocusTargetIsInGrid = event.relatedTarget && gridWrapperRef.current?.contains(event.relatedTarget as Node);\n if (!newFocusTargetIsInGrid) {\n setFocusedDate(null);\n }\n };\n\n return (\n <div\n ref={__internalRootRef}\n {...baseProps}\n role=\"group\"\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n className={clsx(styles.root, styles.calendar, baseProps.className)}\n >\n <div className={styles['calendar-inner']}>\n <CalendarHeader\n baseDate={baseDate}\n locale={normalizedLocale}\n onChangeMonth={onHeaderChangeMonthHandler}\n previousMonthLabel={previousMonthAriaLabel}\n nextMonthLabel={nextMonthAriaLabel}\n headingId={headingId}\n />\n <div onBlur={onGridBlur} ref={gridWrapperRef}>\n <Grid\n locale={normalizedLocale}\n baseDate={baseDate}\n isDateEnabled={isDateEnabled}\n focusedDate={focusedDate}\n focusableDate={focusableDate}\n onSelectDate={onGridSelectDateHandler}\n onFocusDate={onGridFocusDateHandler}\n onChangeMonth={onGridChangeMonthHandler}\n startOfWeek={normalizedStartOfWeek}\n todayAriaLabel={todayAriaLabel}\n selectedDate={memoizedValue}\n ariaLabelledby={headingId}\n />\n </div>\n </div>\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-legend/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAKtD,OAAqB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAG7E,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,qBAAqB,CAAC;IAC5B,KAAK,EAAE,CAAC,CAAC;CACV;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,MAAM,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,iBAAiB,EAAE,CAAC,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACnD,iBAAiB,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;CAC/C;;AAED,wBAAuD;AAEvD,iBAAS,WAAW,CAAC,CAAC,EAAE,EACtB,MAAM,EACN,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,gBAAgB,GACjB,EAAE,gBAAgB,CAAC,CAAC,CAAC,eAiHrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-legend/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAK5C,OAAqB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAG7E,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,qBAAqB,CAAC;IAC5B,KAAK,EAAE,CAAC,CAAC;CACV;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,MAAM,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,iBAAiB,EAAE,CAAC,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACnD,iBAAiB,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;CAC/C;;AAED,wBAAuD;AAEvD,iBAAS,WAAW,CAAC,CAAC,EAAE,EACtB,MAAM,EACN,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,gBAAgB,GACjB,EAAE,gBAAgB,CAAC,CAAC,CAAC,eAwHrB"}
@@ -1,8 +1,9 @@
1
+ import { __assign } from "tslib";
1
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
3
  // SPDX-License-Identifier: Apache-2.0
3
4
  import clsx from 'clsx';
4
- import React, { useRef, memo, useState } from 'react';
5
- import LiveRegion from '../live-region';
5
+ import React, { useRef, memo } from 'react';
6
+ import useFocusVisible from '../../hooks/focus-visible';
6
7
  import InternalBox from '../../../box/internal';
7
8
  import { KeyCode } from '../../keycode';
8
9
  import SeriesMarker from '../chart-series-marker';
@@ -10,17 +11,21 @@ import styles from './styles.css.js';
10
11
  export default memo(ChartLegend);
11
12
  function ChartLegend(_a) {
12
13
  var series = _a.series, onHighlightChange = _a.onHighlightChange, highlightedSeries = _a.highlightedSeries, legendTitle = _a.legendTitle, ariaLabel = _a.ariaLabel, plotContainerRef = _a.plotContainerRef;
13
- var _b = useState(false), isFocused = _b[0], setIsFocused = _b[1];
14
+ var focusVisible = useFocusVisible();
14
15
  var containerRef = useRef(null);
16
+ var segmentsRef = useRef([]);
17
+ var highlightedSeriesIndex = findSeriesIndex(series, highlightedSeries);
15
18
  var highlightLeft = function () {
16
- var currentIndex = findSeriesIndex(series, highlightedSeries) || 0;
19
+ var _a;
20
+ var currentIndex = highlightedSeriesIndex !== null && highlightedSeriesIndex !== void 0 ? highlightedSeriesIndex : 0;
17
21
  var nextIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : series.length - 1;
18
- onHighlightChange(series[nextIndex].datum);
22
+ (_a = segmentsRef.current[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
19
23
  };
20
24
  var highlightRight = function () {
21
- var currentIndex = findSeriesIndex(series, highlightedSeries) || 0;
25
+ var _a;
26
+ var currentIndex = highlightedSeriesIndex !== null && highlightedSeriesIndex !== void 0 ? highlightedSeriesIndex : 0;
22
27
  var nextIndex = currentIndex + 1 < series.length ? currentIndex + 1 : 0;
23
- onHighlightChange(series[nextIndex].datum);
28
+ (_a = segmentsRef.current[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
24
29
  };
25
30
  var handleKeyPress = function (event) {
26
31
  if (event.keyCode === KeyCode.right || event.keyCode === KeyCode.left) {
@@ -36,18 +41,17 @@ function ChartLegend(_a) {
36
41
  }
37
42
  }
38
43
  };
39
- var handleFocus = function () {
40
- setIsFocused(true);
41
- onHighlightChange(highlightedSeries || series[0].datum);
44
+ var handleSelection = function (index) {
45
+ if (series[index].datum !== highlightedSeries) {
46
+ onHighlightChange(series[index].datum);
47
+ }
42
48
  };
43
49
  var handleBlur = function (event) {
44
50
  var _a;
45
- setIsFocused(false);
46
51
  // We need to check if the next element to be focused inside the plot container or not
47
52
  // so we don't clear the selected legend in case we are still focusing elements ( legend elements )
48
53
  // inside the plot container
49
54
  if (event.relatedTarget === null ||
50
- !(event.relatedTarget instanceof Element) ||
51
55
  (containerRef.current &&
52
56
  !containerRef.current.contains(event.relatedTarget) &&
53
57
  !((_a = plotContainerRef === null || plotContainerRef === void 0 ? void 0 : plotContainerRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.relatedTarget)))) {
@@ -62,25 +66,29 @@ function ChartLegend(_a) {
62
66
  var handleMouseLeave = function () {
63
67
  onHighlightChange(null);
64
68
  };
65
- var highlightedSeriesLabel = findSeriesLabel(series, highlightedSeries);
66
69
  return (React.createElement(React.Fragment, null,
67
- React.createElement("div", { tabIndex: 0, className: styles.root, ref: containerRef, role: "application", "aria-label": legendTitle || ariaLabel, onKeyDown: handleKeyPress, onFocus: handleFocus, onBlur: handleBlur },
70
+ React.createElement("div", { ref: containerRef, role: "toolbar", "aria-label": legendTitle || ariaLabel, className: styles.root, onKeyDown: handleKeyPress, onBlur: handleBlur },
68
71
  legendTitle && (React.createElement(InternalBox, { fontWeight: "bold", className: styles.title }, legendTitle)),
69
- React.createElement("ul", { className: styles.list }, series.map(function (s, index) {
72
+ React.createElement("div", { className: styles.list }, series.map(function (s, index) {
70
73
  var _a;
71
74
  var someHighlighted = highlightedSeries !== null;
72
75
  var isHighlighted = highlightedSeries === s.datum;
73
76
  var isDimmed = someHighlighted && !isHighlighted;
74
- return (React.createElement("li", { key: index, onMouseOver: handleMouseOver.bind(null, s.datum), onMouseLeave: handleMouseLeave, className: clsx(styles.marker, (_a = {},
77
+ return (React.createElement("div", __assign({}, focusVisible, { role: "button", key: index, className: clsx(styles.marker, (_a = {},
75
78
  _a[styles['marker--dimmed']] = isDimmed,
76
79
  _a[styles['marker--highlighted']] = isHighlighted,
77
- _a[styles['marker--focused']] = isHighlighted && isFocused,
78
- _a)), "aria-disabled": isDimmed ? true : undefined },
80
+ _a)), ref: function (elem) {
81
+ if (elem) {
82
+ segmentsRef.current[index] = elem;
83
+ }
84
+ else {
85
+ delete segmentsRef.current[index];
86
+ }
87
+ }, tabIndex: index === highlightedSeriesIndex || (highlightedSeriesIndex === undefined && index === 0) ? 0 : -1, onFocus: function () { return handleSelection(index); }, onClick: function () { return handleSelection(index); }, onMouseOver: function () { return handleMouseOver(s.datum); }, onMouseLeave: handleMouseLeave }),
79
88
  React.createElement(SeriesMarker, { color: s.color, type: s.type }),
80
89
  " ",
81
90
  s.label));
82
- }))),
83
- React.createElement(LiveRegion, null, isFocused ? highlightedSeriesLabel : null)));
91
+ })))));
84
92
  }
85
93
  function findSeriesIndex(series, targetSeries) {
86
94
  for (var index = 0; index < series.length; index++) {
@@ -90,13 +98,4 @@ function findSeriesIndex(series, targetSeries) {
90
98
  }
91
99
  return undefined;
92
100
  }
93
- function findSeriesLabel(series, targetSeries) {
94
- for (var _i = 0, series_1 = series; _i < series_1.length; _i++) {
95
- var s = series_1[_i];
96
- if (s.datum === targetSeries) {
97
- return s.label;
98
- }
99
- }
100
- return null;
101
- }
102
101
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-legend/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,UAAU,MAAM,gBAAgB,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AC,IAAI,GAAI;;oBAAE,CAAC,CAAC,KAAK,CACpD,CACN,CAAC;YACJ,CAAC,CAAC,CACC,CACD;QAEN,oBAAC,UAAU,QAAE,SAAS,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,CAAc,CACnE,CACJ,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAI,MAAyC,EAAE,YAAsB;IAC3F,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QAClD,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,YAAY,EAAE;YACxC,OAAO,KAAK,CAAC;SACd;KACF;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,eAAe,CAAI,MAAyC,EAAE,YAAsB;IAC3F,KAAgB,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,EAAE;QAAnB,IAAM,CAAC,eAAA;QACV,IAAI,CAAC,CAAC,KAAK,KAAK,YAAY,EAAE;YAC5B,OAAO,CAAC,CAAC,KAAK,CAAC;SAChB;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useRef, memo, useState } from 'react';\n\nimport LiveRegion from '../live-region';\nimport InternalBox from '../../../box/internal';\nimport { KeyCode } from '../../keycode';\nimport SeriesMarker, { ChartSeriesMarkerType } from '../chart-series-marker';\nimport styles from './styles.css.js';\n\nexport interface ChartLegendItem<T> {\n label: string;\n color: string;\n type: ChartSeriesMarkerType;\n datum: T;\n}\n\nexport interface ChartLegendProps<T> {\n series: ReadonlyArray<ChartLegendItem<T>>;\n highlightedSeries: T | null;\n legendTitle?: string;\n ariaLabel?: string;\n plotContainerRef?: React.RefObject<HTMLDivElement>;\n onHighlightChange: (series: T | null) => void;\n}\n\nexport default memo(ChartLegend) as typeof ChartLegend;\n\nfunction ChartLegend<T>({\n series,\n onHighlightChange,\n highlightedSeries,\n legendTitle,\n ariaLabel,\n plotContainerRef,\n}: ChartLegendProps<T>) {\n const [isFocused, setIsFocused] = useState(false);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const highlightLeft = () => {\n const currentIndex = findSeriesIndex(series, highlightedSeries) || 0;\n const nextIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : series.length - 1;\n onHighlightChange(series[nextIndex].datum);\n };\n\n const highlightRight = () => {\n const currentIndex = findSeriesIndex(series, highlightedSeries) || 0;\n const nextIndex = currentIndex + 1 < series.length ? currentIndex + 1 : 0;\n onHighlightChange(series[nextIndex].datum);\n };\n\n const handleKeyPress = (event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.right || event.keyCode === KeyCode.left) {\n // Preventing default fixes an issue in Safari+VO when VO additionally interprets arrow keys as its commands.\n event.preventDefault();\n\n switch (event.keyCode) {\n case KeyCode.left:\n return highlightLeft();\n\n case KeyCode.right:\n return highlightRight();\n\n default:\n return;\n }\n }\n };\n\n const handleFocus = () => {\n setIsFocused(true);\n onHighlightChange(highlightedSeries || series[0].datum);\n };\n\n const handleBlur = (event: React.FocusEvent<Element>) => {\n setIsFocused(false);\n\n // We need to check if the next element to be focused inside the plot container or not\n // so we don't clear the selected legend in case we are still focusing elements ( legend elements )\n // inside the plot container\n if (\n event.relatedTarget === null ||\n !(event.relatedTarget instanceof Element) ||\n (containerRef.current &&\n !containerRef.current.contains(event.relatedTarget) &&\n !plotContainerRef?.current?.contains(event.relatedTarget))\n ) {\n onHighlightChange(null);\n }\n };\n\n const handleMouseOver = (s: T) => {\n if (s !== highlightedSeries) {\n onHighlightChange(s);\n }\n };\n\n const handleMouseLeave = () => {\n onHighlightChange(null);\n };\n\n const highlightedSeriesLabel = findSeriesLabel(series, highlightedSeries);\n\n return (\n <>\n <div\n tabIndex={0}\n className={styles.root}\n ref={containerRef}\n role=\"application\"\n aria-label={legendTitle || ariaLabel}\n onKeyDown={handleKeyPress}\n onFocus={handleFocus}\n onBlur={handleBlur}\n >\n {legendTitle && (\n <InternalBox fontWeight=\"bold\" className={styles.title}>\n {legendTitle}\n </InternalBox>\n )}\n\n <ul className={styles.list}>\n {series.map((s, index) => {\n const someHighlighted = highlightedSeries !== null;\n const isHighlighted = highlightedSeries === s.datum;\n const isDimmed = someHighlighted && !isHighlighted;\n return (\n <li\n key={index}\n onMouseOver={handleMouseOver.bind(null, s.datum)}\n onMouseLeave={handleMouseLeave}\n className={clsx(styles.marker, {\n [styles['marker--dimmed']]: isDimmed,\n [styles['marker--highlighted']]: isHighlighted,\n [styles['marker--focused']]: isHighlighted && isFocused,\n })}\n aria-disabled={isDimmed ? true : undefined}\n >\n <SeriesMarker color={s.color} type={s.type} /> {s.label}\n </li>\n );\n })}\n </ul>\n </div>\n\n <LiveRegion>{isFocused ? highlightedSeriesLabel : null}</LiveRegion>\n </>\n );\n}\n\nfunction findSeriesIndex<T>(series: ReadonlyArray<ChartLegendItem<T>>, targetSeries: null | T): undefined | number {\n for (let index = 0; index < series.length; index++) {\n if (series[index].datum === targetSeries) {\n return index;\n }\n }\n return undefined;\n}\n\nfunction findSeriesLabel<T>(series: ReadonlyArray<ChartLegendItem<T>>, targetSeries: null | T): null | string {\n for (const s of series) {\n if (s.datum === targetSeries) {\n return s.label;\n }\n }\n return null;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-legend/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,YAAu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AAK,CAAC,EAAtB,CAAsB,EACrC,WAAW,EAAE,cAAM,OAAA,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,EAAxB,CAAwB,EAC3C,YAAY,EAAE,gBAAgB;oBAE9B,oBAAC,YAAY,IAAC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,GAAI;;oBAAE,CAAC,CAAC,KAAK,CACnD,CACP,CAAC;YACJ,CAAC,CAAC,CACE,CACF,CACL,CACJ,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAI,MAAyC,EAAE,YAAsB;IAC3F,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QAClD,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,YAAY,EAAE;YACxC,OAAO,KAAK,CAAC;SACd;KACF;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useRef, memo } from 'react';\n\nimport useFocusVisible from '../../hooks/focus-visible';\nimport InternalBox from '../../../box/internal';\nimport { KeyCode } from '../../keycode';\nimport SeriesMarker, { ChartSeriesMarkerType } from '../chart-series-marker';\nimport styles from './styles.css.js';\n\nexport interface ChartLegendItem<T> {\n label: string;\n color: string;\n type: ChartSeriesMarkerType;\n datum: T;\n}\n\nexport interface ChartLegendProps<T> {\n series: ReadonlyArray<ChartLegendItem<T>>;\n highlightedSeries: T | null;\n legendTitle?: string;\n ariaLabel?: string;\n plotContainerRef?: React.RefObject<HTMLDivElement>;\n onHighlightChange: (series: T | null) => void;\n}\n\nexport default memo(ChartLegend) as typeof ChartLegend;\n\nfunction ChartLegend<T>({\n series,\n onHighlightChange,\n highlightedSeries,\n legendTitle,\n ariaLabel,\n plotContainerRef,\n}: ChartLegendProps<T>) {\n const focusVisible = useFocusVisible();\n const containerRef = useRef<HTMLDivElement>(null);\n const segmentsRef = useRef<Record<number, HTMLElement>>([]);\n\n const highlightedSeriesIndex = findSeriesIndex(series, highlightedSeries);\n\n const highlightLeft = () => {\n const currentIndex = highlightedSeriesIndex ?? 0;\n const nextIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : series.length - 1;\n segmentsRef.current[nextIndex]?.focus();\n };\n\n const highlightRight = () => {\n const currentIndex = highlightedSeriesIndex ?? 0;\n const nextIndex = currentIndex + 1 < series.length ? currentIndex + 1 : 0;\n segmentsRef.current[nextIndex]?.focus();\n };\n\n const handleKeyPress = (event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.right || event.keyCode === KeyCode.left) {\n // Preventing default fixes an issue in Safari+VO when VO additionally interprets arrow keys as its commands.\n event.preventDefault();\n\n switch (event.keyCode) {\n case KeyCode.left:\n return highlightLeft();\n\n case KeyCode.right:\n return highlightRight();\n\n default:\n return;\n }\n }\n };\n\n const handleSelection = (index: number) => {\n if (series[index].datum !== highlightedSeries) {\n onHighlightChange(series[index].datum);\n }\n };\n\n const handleBlur = (event: React.FocusEvent<Element>) => {\n // We need to check if the next element to be focused inside the plot container or not\n // so we don't clear the selected legend in case we are still focusing elements ( legend elements )\n // inside the plot container\n if (\n event.relatedTarget === null ||\n (containerRef.current &&\n !containerRef.current.contains(event.relatedTarget) &&\n !plotContainerRef?.current?.contains(event.relatedTarget))\n ) {\n onHighlightChange(null);\n }\n };\n\n const handleMouseOver = (s: T) => {\n if (s !== highlightedSeries) {\n onHighlightChange(s);\n }\n };\n\n const handleMouseLeave = () => {\n onHighlightChange(null);\n };\n\n return (\n <>\n <div\n ref={containerRef}\n role=\"toolbar\"\n aria-label={legendTitle || ariaLabel}\n className={styles.root}\n onKeyDown={handleKeyPress}\n onBlur={handleBlur}\n >\n {legendTitle && (\n <InternalBox fontWeight=\"bold\" className={styles.title}>\n {legendTitle}\n </InternalBox>\n )}\n\n <div className={styles.list}>\n {series.map((s, index) => {\n const someHighlighted = highlightedSeries !== null;\n const isHighlighted = highlightedSeries === s.datum;\n const isDimmed = someHighlighted && !isHighlighted;\n return (\n <div\n {...focusVisible}\n role=\"button\"\n key={index}\n className={clsx(styles.marker, {\n [styles['marker--dimmed']]: isDimmed,\n [styles['marker--highlighted']]: isHighlighted,\n })}\n ref={elem => {\n if (elem) {\n segmentsRef.current[index] = elem;\n } else {\n delete segmentsRef.current[index];\n }\n }}\n tabIndex={\n index === highlightedSeriesIndex || (highlightedSeriesIndex === undefined && index === 0) ? 0 : -1\n }\n onFocus={() => handleSelection(index)}\n onClick={() => handleSelection(index)}\n onMouseOver={() => handleMouseOver(s.datum)}\n onMouseLeave={handleMouseLeave}\n >\n <SeriesMarker color={s.color} type={s.type} /> {s.label}\n </div>\n );\n })}\n </div>\n </div>\n </>\n );\n}\n\nfunction findSeriesIndex<T>(series: ReadonlyArray<ChartLegendItem<T>>, targetSeries: null | T): undefined | number {\n for (let index = 0; index < series.length; index++) {\n if (series[index].datum === targetSeries) {\n return index;\n }\n }\n return undefined;\n}\n"]}
@@ -1,12 +1,11 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "marker": "awsui_marker_1kjc7_10w04_93",
5
- "root": "awsui_root_1kjc7_10w04_111",
6
- "title": "awsui_title_1kjc7_10w04_125",
7
- "list": "awsui_list_1kjc7_10w04_129",
8
- "marker--dimmed": "awsui_marker--dimmed_1kjc7_10w04_151",
9
- "marker--highlighted": "awsui_marker--highlighted_1kjc7_10w04_154",
10
- "marker--focused": "awsui_marker--focused_1kjc7_10w04_157"
4
+ "marker": "awsui_marker_1kjc7_so3yk_93",
5
+ "root": "awsui_root_1kjc7_so3yk_111",
6
+ "title": "awsui_title_1kjc7_so3yk_125",
7
+ "list": "awsui_list_1kjc7_so3yk_129",
8
+ "marker--dimmed": "awsui_marker--dimmed_1kjc7_so3yk_171",
9
+ "marker--highlighted": "awsui_marker--highlighted_1kjc7_so3yk_174"
11
10
  };
12
11
 
@@ -90,16 +90,16 @@ 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
- .awsui_marker_1kjc7_10w04_93:not(#\9) {
93
+ .awsui_marker_1kjc7_so3yk_93:not(#\9) {
94
94
  transition: opacity var(--motion-duration-transition-quick-x85tae, 90ms) var(--motion-easing-transition-quick-lukbd8, linear);
95
95
  }
96
96
  @media (prefers-reduced-motion: reduce) {
97
- .awsui_marker_1kjc7_10w04_93:not(#\9) {
97
+ .awsui_marker_1kjc7_so3yk_93:not(#\9) {
98
98
  animation: none;
99
99
  transition: none;
100
100
  }
101
101
  }
102
- .awsui-motion-disabled .awsui_marker_1kjc7_10w04_93:not(#\9), .awsui-mode-entering .awsui_marker_1kjc7_10w04_93:not(#\9) {
102
+ .awsui-motion-disabled .awsui_marker_1kjc7_so3yk_93:not(#\9), .awsui-mode-entering .awsui_marker_1kjc7_so3yk_93:not(#\9) {
103
103
  animation: none;
104
104
  transition: none;
105
105
  }
@@ -108,7 +108,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
108
108
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
109
109
  SPDX-License-Identifier: Apache-2.0
110
110
  */
111
- .awsui_root_1kjc7_10w04_111:not(#\9) {
111
+ .awsui_root_1kjc7_so3yk_111:not(#\9) {
112
112
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
113
113
  border-collapse: separate;
114
114
  border-spacing: 0;
@@ -144,15 +144,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
144
144
  font-weight: 400;
145
145
  font-family: var(--font-family-base-qnistn, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
146
146
  }
147
- .awsui_root_1kjc7_10w04_111:not(#\9):focus {
147
+ .awsui_root_1kjc7_so3yk_111:not(#\9):focus {
148
148
  outline: none;
149
149
  }
150
150
 
151
- .awsui_title_1kjc7_10w04_125:not(#\9) {
151
+ .awsui_title_1kjc7_so3yk_125:not(#\9) {
152
152
  /* used in test utils */
153
153
  }
154
154
 
155
- .awsui_list_1kjc7_10w04_129:not(#\9) {
155
+ .awsui_list_1kjc7_so3yk_129:not(#\9) {
156
156
  display: flex;
157
157
  flex-wrap: wrap;
158
158
  list-style: none;
@@ -160,34 +160,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
160
160
  padding: 0;
161
161
  }
162
162
 
163
- .awsui_marker_1kjc7_10w04_93:not(#\9) {
163
+ .awsui_marker_1kjc7_so3yk_93:not(#\9) {
164
164
  display: inline-flex;
165
165
  align-items: flex-start;
166
166
  margin-right: var(--space-m-17eucw, 16px);
167
167
  padding: 0;
168
+ border: 0;
169
+ background-color: transparent;
168
170
  cursor: pointer;
169
171
  opacity: 1;
170
172
  }
171
- .awsui_marker_1kjc7_10w04_93:not(#\9):focus {
173
+ .awsui_marker_1kjc7_so3yk_93:not(#\9):focus {
172
174
  outline: none;
173
175
  }
174
- .awsui_marker_1kjc7_10w04_93:not(#\9):last-child {
175
- margin-right: 0;
176
- }
177
- .awsui_marker_1kjc7_10w04_93.awsui_marker--dimmed_1kjc7_10w04_151:not(#\9) {
178
- opacity: 0.35;
179
- }
180
- .awsui_marker_1kjc7_10w04_93.awsui_marker--highlighted_1kjc7_10w04_154:not(#\9) {
181
- /* used in test utils */
182
- }
183
- .awsui_marker_1kjc7_10w04_93.awsui_marker--focused_1kjc7_10w04_157:not(#\9) {
176
+ .awsui_marker_1kjc7_so3yk_93[data-awsui-focus-visible=true]:not(#\9):focus {
184
177
  position: relative;
185
178
  }
186
- .awsui_marker_1kjc7_10w04_93.awsui_marker--focused_1kjc7_10w04_157:not(#\9) {
179
+ .awsui_marker_1kjc7_so3yk_93[data-awsui-focus-visible=true]:not(#\9):focus {
187
180
  outline: 2px dotted transparent;
188
181
  outline-offset: calc(2px - 1px);
189
182
  }
190
- .awsui_marker_1kjc7_10w04_93.awsui_marker--focused_1kjc7_10w04_157:not(#\9)::before {
183
+ .awsui_marker_1kjc7_so3yk_93[data-awsui-focus-visible=true]:not(#\9):focus::before {
191
184
  content: " ";
192
185
  display: block;
193
186
  position: absolute;
@@ -197,4 +190,13 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
197
190
  height: calc(100% + 2 * 2px);
198
191
  border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
199
192
  box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
193
+ }
194
+ .awsui_marker_1kjc7_so3yk_93:not(#\9):last-child {
195
+ margin-right: 0;
196
+ }
197
+ .awsui_marker_1kjc7_so3yk_93.awsui_marker--dimmed_1kjc7_so3yk_171:not(#\9) {
198
+ opacity: 0.35;
199
+ }
200
+ .awsui_marker_1kjc7_so3yk_93.awsui_marker--highlighted_1kjc7_so3yk_174:not(#\9) {
201
+ /* used in test utils */
200
202
  }
@@ -2,12 +2,11 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "marker": "awsui_marker_1kjc7_10w04_93",
6
- "root": "awsui_root_1kjc7_10w04_111",
7
- "title": "awsui_title_1kjc7_10w04_125",
8
- "list": "awsui_list_1kjc7_10w04_129",
9
- "marker--dimmed": "awsui_marker--dimmed_1kjc7_10w04_151",
10
- "marker--highlighted": "awsui_marker--highlighted_1kjc7_10w04_154",
11
- "marker--focused": "awsui_marker--focused_1kjc7_10w04_157"
5
+ "marker": "awsui_marker_1kjc7_so3yk_93",
6
+ "root": "awsui_root_1kjc7_so3yk_111",
7
+ "title": "awsui_title_1kjc7_so3yk_125",
8
+ "list": "awsui_list_1kjc7_so3yk_129",
9
+ "marker--dimmed": "awsui_marker--dimmed_1kjc7_so3yk_171",
10
+ "marker--highlighted": "awsui_marker--highlighted_1kjc7_so3yk_174"
12
11
  };
13
12
 
@@ -1,5 +1,5 @@
1
1
 
2
- export var PACKAGE_VERSION = '3.0.0 (0ec1556)';
2
+ export var PACKAGE_VERSION = '3.0.0 (e1f5f5e)';
3
3
  export var THEME = 'open-source-visual-refresh';
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
5
5
 
package/package.json CHANGED
@@ -112,6 +112,6 @@
112
112
  "./internal/base-component/index.js",
113
113
  "./internal/base-component/styles.css.js"
114
114
  ],
115
- "version": "3.0.98",
115
+ "version": "3.0.100",
116
116
  "license": "Apache-2.0"
117
117
  }
@@ -1,36 +1,36 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_1xupv_1ouog_94",
5
- "wizard": "awsui_wizard_1xupv_1ouog_105",
6
- "refresh": "awsui_refresh_1xupv_1ouog_105",
7
- "small-container": "awsui_small-container_1xupv_1ouog_112",
8
- "navigation": "awsui_navigation_1xupv_1ouog_120",
9
- "number": "awsui_number_1xupv_1ouog_148",
10
- "circle": "awsui_circle_1xupv_1ouog_164",
11
- "title": "awsui_title_1xupv_1ouog_172",
12
- "active": "awsui_active_1xupv_1ouog_201",
13
- "disabled": "awsui_disabled_1xupv_1ouog_212",
14
- "enabled": "awsui_enabled_1xupv_1ouog_222",
15
- "form": "awsui_form_1xupv_1ouog_261",
16
- "form-header": "awsui_form-header_1xupv_1ouog_267",
17
- "background": "awsui_background_1xupv_1ouog_278",
18
- "form-header-content": "awsui_form-header-content_1xupv_1ouog_288",
19
- "form-component": "awsui_form-component_1xupv_1ouog_292",
20
- "hidden": "awsui_hidden_1xupv_1ouog_306",
21
- "collapsed-steps": "awsui_collapsed-steps_1xupv_1ouog_310",
22
- "collapsed-steps-extra-padding": "awsui_collapsed-steps-extra-padding_1xupv_1ouog_315",
23
- "collapsed-steps-hidden": "awsui_collapsed-steps-hidden_1xupv_1ouog_318",
24
- "form-header-component": "awsui_form-header-component_1xupv_1ouog_322",
25
- "navigation-link": "awsui_navigation-link_1xupv_1ouog_323",
26
- "navigation-link-item": "awsui_navigation-link-item_1xupv_1ouog_324",
27
- "navigation-link-label": "awsui_navigation-link-label_1xupv_1ouog_325",
28
- "navigation-link-active": "awsui_navigation-link-active_1xupv_1ouog_329",
29
- "navigation-link-disabled": "awsui_navigation-link-disabled_1xupv_1ouog_334",
30
- "cancel-button": "awsui_cancel-button_1xupv_1ouog_338",
31
- "previous-button": "awsui_previous-button_1xupv_1ouog_339",
32
- "primary-button": "awsui_primary-button_1xupv_1ouog_340",
33
- "skip-to-button": "awsui_skip-to-button_1xupv_1ouog_341",
34
- "action-buttons": "awsui_action-buttons_1xupv_1ouog_345"
4
+ "root": "awsui_root_1xupv_egy7r_94",
5
+ "wizard": "awsui_wizard_1xupv_egy7r_105",
6
+ "refresh": "awsui_refresh_1xupv_egy7r_105",
7
+ "small-container": "awsui_small-container_1xupv_egy7r_112",
8
+ "navigation": "awsui_navigation_1xupv_egy7r_120",
9
+ "number": "awsui_number_1xupv_egy7r_148",
10
+ "circle": "awsui_circle_1xupv_egy7r_164",
11
+ "title": "awsui_title_1xupv_egy7r_172",
12
+ "active": "awsui_active_1xupv_egy7r_201",
13
+ "disabled": "awsui_disabled_1xupv_egy7r_212",
14
+ "enabled": "awsui_enabled_1xupv_egy7r_222",
15
+ "form": "awsui_form_1xupv_egy7r_261",
16
+ "form-header": "awsui_form-header_1xupv_egy7r_267",
17
+ "background": "awsui_background_1xupv_egy7r_278",
18
+ "form-header-content": "awsui_form-header-content_1xupv_egy7r_288",
19
+ "form-component": "awsui_form-component_1xupv_egy7r_292",
20
+ "hidden": "awsui_hidden_1xupv_egy7r_306",
21
+ "collapsed-steps": "awsui_collapsed-steps_1xupv_egy7r_310",
22
+ "collapsed-steps-extra-padding": "awsui_collapsed-steps-extra-padding_1xupv_egy7r_315",
23
+ "collapsed-steps-hidden": "awsui_collapsed-steps-hidden_1xupv_egy7r_318",
24
+ "form-header-component": "awsui_form-header-component_1xupv_egy7r_322",
25
+ "navigation-link": "awsui_navigation-link_1xupv_egy7r_323",
26
+ "navigation-link-item": "awsui_navigation-link-item_1xupv_egy7r_324",
27
+ "navigation-link-label": "awsui_navigation-link-label_1xupv_egy7r_325",
28
+ "navigation-link-active": "awsui_navigation-link-active_1xupv_egy7r_329",
29
+ "navigation-link-disabled": "awsui_navigation-link-disabled_1xupv_egy7r_334",
30
+ "cancel-button": "awsui_cancel-button_1xupv_egy7r_338",
31
+ "previous-button": "awsui_previous-button_1xupv_egy7r_339",
32
+ "primary-button": "awsui_primary-button_1xupv_egy7r_340",
33
+ "skip-to-button": "awsui_skip-to-button_1xupv_egy7r_341",
34
+ "action-buttons": "awsui_action-buttons_1xupv_egy7r_345"
35
35
  };
36
36
 
@@ -91,7 +91,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
91
91
  SPDX-License-Identifier: Apache-2.0
92
92
  */
93
93
  /* stylelint-disable selector-max-universal, selector-max-type */
94
- .awsui_root_1xupv_1ouog_94:not(#\9) {
94
+ .awsui_root_1xupv_egy7r_94:not(#\9) {
95
95
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
96
96
  border-collapse: separate;
97
97
  border-spacing: 0;
@@ -128,28 +128,28 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
128
128
  font-family: var(--font-family-base-qnistn, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
129
129
  }
130
130
 
131
- .awsui_wizard_1xupv_1ouog_105.awsui_refresh_1xupv_1ouog_105:not(#\9) {
131
+ .awsui_wizard_1xupv_egy7r_105.awsui_refresh_1xupv_egy7r_105:not(#\9) {
132
132
  column-gap: var(--space-xl-a39hup, 24px);
133
133
  display: grid;
134
134
  grid-template-columns: auto 1fr;
135
135
  grid-template-rows: auto 1fr;
136
136
  row-gap: var(--space-scaled-xl-w2t504, 24px);
137
137
  }
138
- .awsui_wizard_1xupv_1ouog_105.awsui_refresh_1xupv_1ouog_105.awsui_small-container_1xupv_1ouog_112:not(#\9) {
138
+ .awsui_wizard_1xupv_egy7r_105.awsui_refresh_1xupv_egy7r_105.awsui_small-container_1xupv_egy7r_112:not(#\9) {
139
139
  row-gap: var(--space-scaled-l-t03y3z, 20px);
140
140
  }
141
141
 
142
- .awsui_wizard_1xupv_1ouog_105:not(#\9):not(.awsui_refresh_1xupv_1ouog_105) {
142
+ .awsui_wizard_1xupv_egy7r_105:not(#\9):not(.awsui_refresh_1xupv_egy7r_105) {
143
143
  display: flex;
144
144
  }
145
145
 
146
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105:not(#\9) {
146
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105:not(#\9) {
147
147
  grid-column: 1;
148
148
  grid-row: 1/span 2;
149
149
  padding-top: var(--space-scaled-xxs-95dhkm, 4px);
150
150
  z-index: 1;
151
151
  }
152
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul:not(#\9) {
152
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul:not(#\9) {
153
153
  background: var(--color-background-container-content-i8i4a0, #ffffff);
154
154
  border-radius: var(--border-radius-container-gh9ysk, 16px);
155
155
  box-shadow: var(--shadow-container-7nblnj, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
@@ -158,26 +158,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
158
158
  width: 280px;
159
159
  box-sizing: border-box;
160
160
  }
161
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li:not(#\9) {
161
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li:not(#\9) {
162
162
  display: grid;
163
163
  column-gap: var(--space-s-hv8c1d, 12px);
164
164
  grid-template-columns: var(--space-l-4vl6xu, 20px) 1fr;
165
165
  grid-template-rows: repeat(2, auto);
166
166
  }
167
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li > hr:not(#\9) {
167
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li > hr:not(#\9) {
168
168
  background-color: var(--color-border-divider-default-7s2wjw, #e9ebed);
169
169
  border: 0;
170
170
  grid-column: 1;
171
171
  height: 100%;
172
172
  width: var(--space-xxxs-k2w98v, 2px);
173
173
  }
174
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li > .awsui_number_1xupv_1ouog_148:not(#\9) {
174
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li > .awsui_number_1xupv_egy7r_148:not(#\9) {
175
175
  color: var(--color-text-small-le1y42, #5f6b7a);
176
176
  font-size: var(--font-body-s-size-ukw2p9, 12px);
177
177
  grid-column: 2;
178
178
  grid-row: 1;
179
179
  }
180
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li > a:not(#\9) {
180
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li > a:not(#\9) {
181
181
  align-items: start;
182
182
  column-gap: var(--space-s-hv8c1d, 12px);
183
183
  cursor: pointer;
@@ -187,7 +187,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
187
187
  grid-row: 2;
188
188
  grid-template-columns: var(--space-l-4vl6xu, 20px) 1fr;
189
189
  }
190
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li > a > .awsui_circle_1xupv_1ouog_164:not(#\9) {
190
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li > a > .awsui_circle_1xupv_egy7r_164:not(#\9) {
191
191
  border-radius: 100%;
192
192
  grid-column: 1;
193
193
  height: 10px;
@@ -195,13 +195,13 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
195
195
  margin-top: 6px;
196
196
  width: 10px;
197
197
  }
198
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li > a > .awsui_title_1xupv_1ouog_172:not(#\9) {
198
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li > a > .awsui_title_1xupv_egy7r_172:not(#\9) {
199
199
  min-width: 0;
200
200
  -ms-word-break: break-all;
201
201
  word-break: break-word;
202
202
  grid-column: 2;
203
203
  }
204
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li > a[data-awsui-focus-visible=true]:not(#\9):focus {
204
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li > a[data-awsui-focus-visible=true]:not(#\9):focus {
205
205
  outline: thin dotted;
206
206
  outline: var(--border-link-focus-ring-outline-k2wccv, 0);
207
207
  outline-offset: 2px;
@@ -209,58 +209,58 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
209
209
  border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
210
210
  box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-nv4ahb, 2px) var(--color-border-item-focused-ap3b6s, #0972d3);
211
211
  }
212
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li:not(#\9):first-child > hr {
212
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li:not(#\9):first-child > hr {
213
213
  grid-row: 2/span 2;
214
214
  }
215
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li:not(#\9):not(:first-child) > .awsui_number_1xupv_1ouog_148 {
215
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li:not(#\9):not(:first-child) > .awsui_number_1xupv_egy7r_148 {
216
216
  margin-top: var(--space-scaled-xl-w2t504, 24px);
217
217
  }
218
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li:not(#\9):last-child > hr {
218
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li:not(#\9):last-child > hr {
219
219
  grid-row: 1;
220
220
  }
221
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li:not(#\9):only-of-type > hr {
221
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li:not(#\9):only-of-type > hr {
222
222
  display: none;
223
223
  }
224
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li:not(#\9):not(:first-child):not(:last-child) > hr {
224
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li:not(#\9):not(:first-child):not(:last-child) > hr {
225
225
  grid-row: 1/span 3;
226
226
  }
227
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li.awsui_active_1xupv_1ouog_201 > a:not(#\9) {
227
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li.awsui_active_1xupv_egy7r_201 > a:not(#\9) {
228
228
  cursor: text;
229
229
  }
230
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li.awsui_active_1xupv_1ouog_201 > a > .awsui_circle_1xupv_1ouog_164:not(#\9) {
230
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li.awsui_active_1xupv_egy7r_201 > a > .awsui_circle_1xupv_egy7r_164:not(#\9) {
231
231
  background-color: var(--color-background-control-checked-9admlu, #0972d3);
232
232
  box-shadow: 0 0 0 3px var(--color-background-container-content-i8i4a0, #ffffff), 0 0 0 5px var(--color-background-control-checked-9admlu, #0972d3), 0 0 0 7px var(--color-background-container-content-i8i4a0, #ffffff);
233
233
  }
234
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li.awsui_active_1xupv_1ouog_201 > a > .awsui_title_1xupv_1ouog_172:not(#\9) {
234
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li.awsui_active_1xupv_egy7r_201 > a > .awsui_title_1xupv_egy7r_172:not(#\9) {
235
235
  color: var(--color-background-control-checked-9admlu, #0972d3);
236
236
  font-weight: 700;
237
237
  }
238
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li.awsui_disabled_1xupv_1ouog_212 > a:not(#\9) {
238
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li.awsui_disabled_1xupv_egy7r_212 > a:not(#\9) {
239
239
  cursor: text;
240
240
  }
241
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li.awsui_disabled_1xupv_1ouog_212 > a > .awsui_circle_1xupv_1ouog_164:not(#\9) {
241
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li.awsui_disabled_1xupv_egy7r_212 > a > .awsui_circle_1xupv_egy7r_164:not(#\9) {
242
242
  background-color: var(--color-background-container-content-i8i4a0, #ffffff);
243
243
  box-shadow: 0 0 0 2px var(--color-text-interactive-disabled-3pbb07, #9ba7b6), 0 0 0 4px var(--color-background-container-content-i8i4a0, #ffffff);
244
244
  }
245
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li.awsui_disabled_1xupv_1ouog_212 > a > .awsui_title_1xupv_1ouog_172:not(#\9) {
246
- color: var(--color-text-interactive-disabled-3pbb07, #9ba7b6);
245
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li.awsui_disabled_1xupv_egy7r_212 > a > .awsui_title_1xupv_egy7r_172:not(#\9) {
246
+ color: var(--color-text-status-inactive-5ei55p, #5f6b7a);
247
247
  }
248
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li.awsui_enabled_1xupv_1ouog_222 > a > .awsui_circle_1xupv_1ouog_164:not(#\9) {
248
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li.awsui_enabled_1xupv_egy7r_222 > a > .awsui_circle_1xupv_egy7r_164:not(#\9) {
249
249
  background-color: var(--color-text-interactive-default-eg5fsa, #414d5c);
250
250
  box-shadow: 0 0 0 2px var(--color-text-interactive-default-eg5fsa, #414d5c), 0 0 0 4px var(--color-background-container-content-i8i4a0, #ffffff);
251
251
  }
252
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li.awsui_enabled_1xupv_1ouog_222 > a > .awsui_title_1xupv_1ouog_172:not(#\9) {
252
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li.awsui_enabled_1xupv_egy7r_222 > a > .awsui_title_1xupv_egy7r_172:not(#\9) {
253
253
  color: var(--color-text-interactive-default-eg5fsa, #414d5c);
254
254
  }
255
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li.awsui_enabled_1xupv_1ouog_222 > a:not(#\9):hover > .awsui_circle_1xupv_1ouog_164 {
255
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li.awsui_enabled_1xupv_egy7r_222 > a:not(#\9):hover > .awsui_circle_1xupv_egy7r_164 {
256
256
  background-color: var(--color-background-control-checked-9admlu, #0972d3);
257
257
  box-shadow: 0 0 0 2px var(--color-background-control-checked-9admlu, #0972d3), 0 0 0 4px var(--color-background-container-content-i8i4a0, #ffffff);
258
258
  }
259
- .awsui_navigation_1xupv_1ouog_120.awsui_refresh_1xupv_1ouog_105 > ul > li.awsui_enabled_1xupv_1ouog_222 > a:not(#\9):hover > .awsui_title_1xupv_1ouog_172 {
259
+ .awsui_navigation_1xupv_egy7r_120.awsui_refresh_1xupv_egy7r_105 > ul > li.awsui_enabled_1xupv_egy7r_222 > a:not(#\9):hover > .awsui_title_1xupv_egy7r_172 {
260
260
  color: var(--color-background-control-checked-9admlu, #0972d3);
261
261
  }
262
262
 
263
- .awsui_navigation_1xupv_1ouog_120:not(#\9):not(.awsui_refresh_1xupv_1ouog_105) {
263
+ .awsui_navigation_1xupv_egy7r_120:not(#\9):not(.awsui_refresh_1xupv_egy7r_105) {
264
264
  color: var(--color-text-disabled-a2nkh4, #9ba7b6);
265
265
  display: inline-block;
266
266
  margin-right: calc(2 * var(--space-xxxl-bo9z7f, 40px));
@@ -268,107 +268,107 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
268
268
  padding-top: var(--space-xxs-ynfts5, 4px);
269
269
  width: 200px;
270
270
  }
271
- .awsui_navigation_1xupv_1ouog_120:not(#\9):not(.awsui_refresh_1xupv_1ouog_105) > ul {
271
+ .awsui_navigation_1xupv_egy7r_120:not(#\9):not(.awsui_refresh_1xupv_egy7r_105) > ul {
272
272
  list-style: none;
273
273
  padding: 0;
274
274
  margin: 0;
275
275
  }
276
- .awsui_navigation_1xupv_1ouog_120:not(#\9):not(.awsui_refresh_1xupv_1ouog_105) > ul > li {
276
+ .awsui_navigation_1xupv_egy7r_120:not(#\9):not(.awsui_refresh_1xupv_egy7r_105) > ul > li {
277
277
  padding-bottom: var(--space-scaled-m-pv0fmt, 16px);
278
278
  padding-top: 0;
279
279
  }
280
- .awsui_navigation_1xupv_1ouog_120:not(#\9):not(.awsui_refresh_1xupv_1ouog_105) > ul > li:not(:first-child) {
280
+ .awsui_navigation_1xupv_egy7r_120:not(#\9):not(.awsui_refresh_1xupv_egy7r_105) > ul > li:not(:first-child) {
281
281
  margin-top: var(--space-scaled-m-pv0fmt, 16px);
282
282
  }
283
- .awsui_navigation_1xupv_1ouog_120:not(#\9):not(.awsui_refresh_1xupv_1ouog_105) > ul > li:not(:last-child) {
283
+ .awsui_navigation_1xupv_egy7r_120:not(#\9):not(.awsui_refresh_1xupv_egy7r_105) > ul > li:not(:last-child) {
284
284
  border-bottom: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-layout-wf5alz, #d1d5db);
285
285
  }
286
286
 
287
- .awsui_form_1xupv_1ouog_261:not(#\9):not(.awsui_refresh_1xupv_1ouog_105) {
287
+ .awsui_form_1xupv_egy7r_261:not(#\9):not(.awsui_refresh_1xupv_egy7r_105) {
288
288
  min-width: 0;
289
289
  -ms-word-break: break-all;
290
290
  word-break: break-word;
291
291
  width: 100%;
292
292
  }
293
- .awsui_form_1xupv_1ouog_261:not(#\9):not(.awsui_refresh_1xupv_1ouog_105) > .awsui_form-header_1xupv_1ouog_267 {
293
+ .awsui_form_1xupv_egy7r_261:not(#\9):not(.awsui_refresh_1xupv_egy7r_105) > .awsui_form-header_1xupv_egy7r_267 {
294
294
  position: relative;
295
295
  margin-bottom: var(--space-scaled-m-pv0fmt, 16px);
296
296
  }
297
297
 
298
- .awsui_form_1xupv_1ouog_261.awsui_refresh_1xupv_1ouog_105:not(#\9) {
298
+ .awsui_form_1xupv_egy7r_261.awsui_refresh_1xupv_egy7r_105:not(#\9) {
299
299
  min-width: 0;
300
300
  -ms-word-break: break-all;
301
301
  word-break: break-word;
302
302
  display: contents;
303
303
  }
304
- .awsui_form_1xupv_1ouog_261.awsui_refresh_1xupv_1ouog_105 > .awsui_background_1xupv_1ouog_278:not(#\9) {
304
+ .awsui_form_1xupv_egy7r_261.awsui_refresh_1xupv_egy7r_105 > .awsui_background_1xupv_egy7r_278:not(#\9) {
305
305
  background-color: var(--color-background-layout-main-sfhm4y, #ffffff);
306
306
  grid-column: 1/span 2;
307
307
  grid-row: 1;
308
308
  }
309
- .awsui_form_1xupv_1ouog_261.awsui_refresh_1xupv_1ouog_105 > .awsui_form-header_1xupv_1ouog_267:not(#\9) {
309
+ .awsui_form_1xupv_egy7r_261.awsui_refresh_1xupv_egy7r_105 > .awsui_form-header_1xupv_egy7r_267:not(#\9) {
310
310
  background-color: var(--color-background-layout-main-sfhm4y, #ffffff);
311
311
  grid-column: 2;
312
312
  grid-row: 1;
313
313
  }
314
- .awsui_form_1xupv_1ouog_261.awsui_refresh_1xupv_1ouog_105 > .awsui_form-header_1xupv_1ouog_267 > .awsui_form-header-content_1xupv_1ouog_288:not(#\9) {
314
+ .awsui_form_1xupv_egy7r_261.awsui_refresh_1xupv_egy7r_105 > .awsui_form-header_1xupv_egy7r_267 > .awsui_form-header-content_1xupv_egy7r_288:not(#\9) {
315
315
  padding-top: var(--space-scaled-xl-w2t504, 24px);
316
316
  padding-bottom: var(--space-scaled-xl-w2t504, 24px);
317
317
  }
318
- .awsui_form_1xupv_1ouog_261.awsui_refresh_1xupv_1ouog_105 > .awsui_form-component_1xupv_1ouog_292:not(#\9) {
318
+ .awsui_form_1xupv_egy7r_261.awsui_refresh_1xupv_egy7r_105 > .awsui_form-component_1xupv_egy7r_292:not(#\9) {
319
319
  grid-column: 2;
320
320
  grid-row: 2;
321
321
  }
322
- .awsui_form_1xupv_1ouog_261.awsui_refresh_1xupv_1ouog_105.awsui_small-container_1xupv_1ouog_112 > .awsui_form-header_1xupv_1ouog_267:not(#\9) {
322
+ .awsui_form_1xupv_egy7r_261.awsui_refresh_1xupv_egy7r_105.awsui_small-container_1xupv_egy7r_112 > .awsui_form-header_1xupv_egy7r_267:not(#\9) {
323
323
  grid-column: 1/span 2;
324
324
  }
325
- .awsui_form_1xupv_1ouog_261.awsui_refresh_1xupv_1ouog_105.awsui_small-container_1xupv_1ouog_112 > .awsui_form-header_1xupv_1ouog_267 > .awsui_form-header-content_1xupv_1ouog_288:not(#\9) {
325
+ .awsui_form_1xupv_egy7r_261.awsui_refresh_1xupv_egy7r_105.awsui_small-container_1xupv_egy7r_112 > .awsui_form-header_1xupv_egy7r_267 > .awsui_form-header-content_1xupv_egy7r_288:not(#\9) {
326
326
  padding-top: 0;
327
327
  }
328
- .awsui_form_1xupv_1ouog_261.awsui_refresh_1xupv_1ouog_105.awsui_small-container_1xupv_1ouog_112 > .awsui_form-component_1xupv_1ouog_292:not(#\9) {
328
+ .awsui_form_1xupv_egy7r_261.awsui_refresh_1xupv_egy7r_105.awsui_small-container_1xupv_egy7r_112 > .awsui_form-component_1xupv_egy7r_292:not(#\9) {
329
329
  grid-column: 1/span 2;
330
330
  }
331
331
 
332
- .awsui_navigation_1xupv_1ouog_120.awsui_hidden_1xupv_1ouog_306:not(#\9) {
332
+ .awsui_navigation_1xupv_egy7r_120.awsui_hidden_1xupv_egy7r_306:not(#\9) {
333
333
  display: none;
334
334
  }
335
335
 
336
- .awsui_collapsed-steps_1xupv_1ouog_310:not(#\9) {
336
+ .awsui_collapsed-steps_1xupv_egy7r_310:not(#\9) {
337
337
  color: var(--color-text-heading-secondary-corkaj, #414d5c);
338
338
  font-weight: 700;
339
339
  padding-top: var(--space-scaled-xxs-95dhkm, 4px);
340
340
  }
341
- .awsui_collapsed-steps-extra-padding_1xupv_1ouog_315:not(#\9) {
341
+ .awsui_collapsed-steps-extra-padding_1xupv_egy7r_315:not(#\9) {
342
342
  padding-top: var(--space-scaled-l-t03y3z, 20px);
343
343
  }
344
- .awsui_collapsed-steps-hidden_1xupv_1ouog_318:not(#\9) {
344
+ .awsui_collapsed-steps-hidden_1xupv_egy7r_318:not(#\9) {
345
345
  display: none;
346
346
  }
347
347
 
348
- .awsui_form-header-component_1xupv_1ouog_322:not(#\9),
349
- .awsui_navigation-link_1xupv_1ouog_323:not(#\9),
350
- .awsui_navigation-link-item_1xupv_1ouog_324:not(#\9),
351
- .awsui_navigation-link-label_1xupv_1ouog_325:not(#\9) {
348
+ .awsui_form-header-component_1xupv_egy7r_322:not(#\9),
349
+ .awsui_navigation-link_1xupv_egy7r_323:not(#\9),
350
+ .awsui_navigation-link-item_1xupv_egy7r_324:not(#\9),
351
+ .awsui_navigation-link-label_1xupv_egy7r_325:not(#\9) {
352
352
  /* used in test-utils */
353
353
  }
354
354
 
355
- .awsui_navigation-link-active_1xupv_1ouog_329:not(#\9) {
355
+ .awsui_navigation-link-active_1xupv_egy7r_329:not(#\9) {
356
356
  font-weight: 700;
357
357
  color: var(--color-text-body-default-ajf1h5, #000716);
358
358
  }
359
359
 
360
- .awsui_navigation-link-disabled_1xupv_1ouog_334:not(#\9) {
360
+ .awsui_navigation-link-disabled_1xupv_egy7r_334:not(#\9) {
361
361
  color: var(--color-text-control-disabled-3z3eul, #9ba7b6);
362
362
  }
363
363
 
364
- .awsui_cancel-button_1xupv_1ouog_338:not(#\9),
365
- .awsui_previous-button_1xupv_1ouog_339:not(#\9),
366
- .awsui_primary-button_1xupv_1ouog_340:not(#\9),
367
- .awsui_skip-to-button_1xupv_1ouog_341:not(#\9) {
364
+ .awsui_cancel-button_1xupv_egy7r_338:not(#\9),
365
+ .awsui_previous-button_1xupv_egy7r_339:not(#\9),
366
+ .awsui_primary-button_1xupv_egy7r_340:not(#\9),
367
+ .awsui_skip-to-button_1xupv_egy7r_341:not(#\9) {
368
368
  /* used in test-utils */
369
369
  }
370
370
 
371
- .awsui_action-buttons_1xupv_1ouog_345:not(#\9) {
371
+ .awsui_action-buttons_1xupv_egy7r_345:not(#\9) {
372
372
  display: flex;
373
373
  justify-content: flex-end;
374
374
  }
@@ -2,36 +2,36 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_1xupv_1ouog_94",
6
- "wizard": "awsui_wizard_1xupv_1ouog_105",
7
- "refresh": "awsui_refresh_1xupv_1ouog_105",
8
- "small-container": "awsui_small-container_1xupv_1ouog_112",
9
- "navigation": "awsui_navigation_1xupv_1ouog_120",
10
- "number": "awsui_number_1xupv_1ouog_148",
11
- "circle": "awsui_circle_1xupv_1ouog_164",
12
- "title": "awsui_title_1xupv_1ouog_172",
13
- "active": "awsui_active_1xupv_1ouog_201",
14
- "disabled": "awsui_disabled_1xupv_1ouog_212",
15
- "enabled": "awsui_enabled_1xupv_1ouog_222",
16
- "form": "awsui_form_1xupv_1ouog_261",
17
- "form-header": "awsui_form-header_1xupv_1ouog_267",
18
- "background": "awsui_background_1xupv_1ouog_278",
19
- "form-header-content": "awsui_form-header-content_1xupv_1ouog_288",
20
- "form-component": "awsui_form-component_1xupv_1ouog_292",
21
- "hidden": "awsui_hidden_1xupv_1ouog_306",
22
- "collapsed-steps": "awsui_collapsed-steps_1xupv_1ouog_310",
23
- "collapsed-steps-extra-padding": "awsui_collapsed-steps-extra-padding_1xupv_1ouog_315",
24
- "collapsed-steps-hidden": "awsui_collapsed-steps-hidden_1xupv_1ouog_318",
25
- "form-header-component": "awsui_form-header-component_1xupv_1ouog_322",
26
- "navigation-link": "awsui_navigation-link_1xupv_1ouog_323",
27
- "navigation-link-item": "awsui_navigation-link-item_1xupv_1ouog_324",
28
- "navigation-link-label": "awsui_navigation-link-label_1xupv_1ouog_325",
29
- "navigation-link-active": "awsui_navigation-link-active_1xupv_1ouog_329",
30
- "navigation-link-disabled": "awsui_navigation-link-disabled_1xupv_1ouog_334",
31
- "cancel-button": "awsui_cancel-button_1xupv_1ouog_338",
32
- "previous-button": "awsui_previous-button_1xupv_1ouog_339",
33
- "primary-button": "awsui_primary-button_1xupv_1ouog_340",
34
- "skip-to-button": "awsui_skip-to-button_1xupv_1ouog_341",
35
- "action-buttons": "awsui_action-buttons_1xupv_1ouog_345"
5
+ "root": "awsui_root_1xupv_egy7r_94",
6
+ "wizard": "awsui_wizard_1xupv_egy7r_105",
7
+ "refresh": "awsui_refresh_1xupv_egy7r_105",
8
+ "small-container": "awsui_small-container_1xupv_egy7r_112",
9
+ "navigation": "awsui_navigation_1xupv_egy7r_120",
10
+ "number": "awsui_number_1xupv_egy7r_148",
11
+ "circle": "awsui_circle_1xupv_egy7r_164",
12
+ "title": "awsui_title_1xupv_egy7r_172",
13
+ "active": "awsui_active_1xupv_egy7r_201",
14
+ "disabled": "awsui_disabled_1xupv_egy7r_212",
15
+ "enabled": "awsui_enabled_1xupv_egy7r_222",
16
+ "form": "awsui_form_1xupv_egy7r_261",
17
+ "form-header": "awsui_form-header_1xupv_egy7r_267",
18
+ "background": "awsui_background_1xupv_egy7r_278",
19
+ "form-header-content": "awsui_form-header-content_1xupv_egy7r_288",
20
+ "form-component": "awsui_form-component_1xupv_egy7r_292",
21
+ "hidden": "awsui_hidden_1xupv_egy7r_306",
22
+ "collapsed-steps": "awsui_collapsed-steps_1xupv_egy7r_310",
23
+ "collapsed-steps-extra-padding": "awsui_collapsed-steps-extra-padding_1xupv_egy7r_315",
24
+ "collapsed-steps-hidden": "awsui_collapsed-steps-hidden_1xupv_egy7r_318",
25
+ "form-header-component": "awsui_form-header-component_1xupv_egy7r_322",
26
+ "navigation-link": "awsui_navigation-link_1xupv_egy7r_323",
27
+ "navigation-link-item": "awsui_navigation-link-item_1xupv_egy7r_324",
28
+ "navigation-link-label": "awsui_navigation-link-label_1xupv_egy7r_325",
29
+ "navigation-link-active": "awsui_navigation-link-active_1xupv_egy7r_329",
30
+ "navigation-link-disabled": "awsui_navigation-link-disabled_1xupv_egy7r_334",
31
+ "cancel-button": "awsui_cancel-button_1xupv_egy7r_338",
32
+ "previous-button": "awsui_previous-button_1xupv_egy7r_339",
33
+ "primary-button": "awsui_primary-button_1xupv_egy7r_340",
34
+ "skip-to-button": "awsui_skip-to-button_1xupv_egy7r_341",
35
+ "action-buttons": "awsui_action-buttons_1xupv_egy7r_345"
36
36
  };
37
37
 
@@ -1,8 +0,0 @@
1
- interface HeaderButtonProps {
2
- ariaLabel: string;
3
- isPrevious: boolean;
4
- onChangeMonth: (isPrevious: boolean) => void;
5
- }
6
- declare const HeaderButton: ({ ariaLabel, isPrevious, onChangeMonth }: HeaderButtonProps) => JSX.Element;
7
- export default HeaderButton;
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/calendar/header/button/index.tsx"],"names":[],"mappings":"AAQA,UAAU,iBAAiB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED,QAAA,MAAM,YAAY,6CAA8C,iBAAiB,gBAoBhF,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,20 +0,0 @@
1
- import { __assign } from "tslib";
2
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- // SPDX-License-Identifier: Apache-2.0
4
- import React from 'react';
5
- import { InternalButton } from '../../../button/internal';
6
- import styles from '../../styles.css.js';
7
- var HeaderButton = function (_a) {
8
- var ariaLabel = _a.ariaLabel, isPrevious = _a.isPrevious, onChangeMonth = _a.onChangeMonth;
9
- var iconName = isPrevious ? 'angle-left' : 'angle-right';
10
- var additionalAttributes = {
11
- className: isPrevious ? styles['calendar-prev-month-btn'] : styles['calendar-next-month-btn']
12
- };
13
- var onClick = function (e) {
14
- e.preventDefault();
15
- onChangeMonth(isPrevious);
16
- };
17
- return (React.createElement(InternalButton, __assign({}, additionalAttributes, { iconName: iconName, ariaLabel: ariaLabel, variant: 'icon', onClick: onClick })));
18
- };
19
- export default HeaderButton;
20
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/calendar/header/button/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAQzC,IAAM,YAAY,GAAG,UAAC,EAA2D;QAAzD,SAAS,eAAA,EAAE,UAAU,gBAAA,EAAE,aAAa,mBAAA;IAC1D,IAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC;IAC3D,IAAM,oBAAoB,GAA4C;QACpE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC;KAC9F,CAAC;IAEF,IAAM,OAAO,GAAoD,UAAA,CAAC;QAChE,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,aAAa,CAAC,UAAU,CAAC,CAAC;IAC5B,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,cAAc,eACT,oBAAoB,IACxB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,IAChB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { CancelableEventHandler } from '../../../internal/events';\nimport { ButtonProps } from '../../../button/interfaces';\nimport { InternalButton } from '../../../button/internal';\nimport styles from '../../styles.css.js';\n\ninterface HeaderButtonProps {\n ariaLabel: string;\n isPrevious: boolean;\n onChangeMonth: (isPrevious: boolean) => void;\n}\n\nconst HeaderButton = ({ ariaLabel, isPrevious, onChangeMonth }: HeaderButtonProps) => {\n const iconName = isPrevious ? 'angle-left' : 'angle-right';\n const additionalAttributes: React.HTMLAttributes<HTMLButtonElement> = {\n className: isPrevious ? styles['calendar-prev-month-btn'] : styles['calendar-next-month-btn'],\n };\n\n const onClick: CancelableEventHandler<ButtonProps.ClickDetail> = e => {\n e.preventDefault();\n onChangeMonth(isPrevious);\n };\n\n return (\n <InternalButton\n {...additionalAttributes}\n iconName={iconName}\n ariaLabel={ariaLabel}\n variant={'icon'}\n onClick={onClick}\n />\n );\n};\n\nexport default HeaderButton;\n"]}