@cloudscape-design/components-themeable 3.0.1192 → 3.0.1194
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/cards/styles.scss +7 -6
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/tooltip/test-classes/styles.scss +8 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js.map +1 -1
- package/lib/internal/template/breadcrumb-group/item/item.js +2 -2
- package/lib/internal/template/breadcrumb-group/item/item.js.map +1 -1
- package/lib/internal/template/button/internal.d.ts.map +1 -1
- package/lib/internal/template/button/internal.js +2 -2
- package/lib/internal/template/button/internal.js.map +1 -1
- package/lib/internal/template/button-group/file-input-item.d.ts.map +1 -1
- package/lib/internal/template/button-group/file-input-item.js +3 -4
- package/lib/internal/template/button-group/file-input-item.js.map +1 -1
- package/lib/internal/template/button-group/icon-button-item.d.ts.map +1 -1
- package/lib/internal/template/button-group/icon-button-item.js +3 -3
- package/lib/internal/template/button-group/icon-button-item.js.map +1 -1
- package/lib/internal/template/button-group/icon-toggle-button-item.d.ts.map +1 -1
- package/lib/internal/template/button-group/icon-toggle-button-item.js +2 -2
- package/lib/internal/template/button-group/icon-toggle-button-item.js.map +1 -1
- package/lib/internal/template/button-group/menu-dropdown-item.d.ts.map +1 -1
- package/lib/internal/template/button-group/menu-dropdown-item.js +2 -2
- package/lib/internal/template/button-group/menu-dropdown-item.js.map +1 -1
- package/lib/internal/template/calendar/grid/index.js +2 -2
- package/lib/internal/template/calendar/grid/index.js.map +1 -1
- package/lib/internal/template/cards/styles.css.js +39 -39
- package/lib/internal/template/cards/styles.scoped.css +57 -56
- package/lib/internal/template/cards/styles.selectors.js +39 -39
- package/lib/internal/template/date-range-picker/calendar/grids/grid-cell.js +2 -2
- package/lib/internal/template/date-range-picker/calendar/grids/grid-cell.js.map +1 -1
- package/lib/internal/template/file-token-group/file-token.d.ts.map +1 -1
- package/lib/internal/template/file-token-group/file-token.js +2 -2
- package/lib/internal/template/file-token-group/file-token.js.map +1 -1
- package/lib/internal/template/index.d.ts +1 -0
- package/lib/internal/template/index.d.ts.map +1 -1
- package/lib/internal/template/index.js +1 -0
- package/lib/internal/template/index.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/tooltip/index.d.ts +5 -0
- package/lib/internal/template/internal/components/tooltip/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/tooltip/index.js +2 -1
- package/lib/internal/template/internal/components/tooltip/index.js.map +1 -1
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/package.json +1 -0
- package/lib/internal/template/segmented-control/segment.js +2 -2
- package/lib/internal/template/segmented-control/segment.js.map +1 -1
- package/lib/internal/template/select/parts/item.d.ts +1 -1
- package/lib/internal/template/select/parts/item.d.ts.map +1 -1
- package/lib/internal/template/select/parts/item.js +2 -2
- package/lib/internal/template/select/parts/item.js.map +1 -1
- package/lib/internal/template/select/parts/multiselect-item.d.ts.map +1 -1
- package/lib/internal/template/select/parts/multiselect-item.js +2 -2
- package/lib/internal/template/select/parts/multiselect-item.js.map +1 -1
- package/lib/internal/template/slider/internal.d.ts.map +1 -1
- package/lib/internal/template/slider/internal.js +2 -2
- package/lib/internal/template/slider/internal.js.map +1 -1
- package/lib/internal/template/tabs/tab-header-bar.js +2 -2
- package/lib/internal/template/tabs/tab-header-bar.js.map +1 -1
- package/lib/internal/template/test-utils/dom/index.d.ts +20 -0
- package/lib/internal/template/test-utils/dom/index.js +15 -1
- package/lib/internal/template/test-utils/dom/index.js.map +1 -1
- package/lib/internal/template/test-utils/dom/tooltip/index.d.ts +9 -0
- package/lib/internal/template/test-utils/dom/tooltip/index.js +19 -0
- package/lib/internal/template/test-utils/dom/tooltip/index.js.map +1 -0
- package/lib/internal/template/test-utils/selectors/index.d.ts +18 -0
- package/lib/internal/template/test-utils/selectors/index.js +15 -1
- package/lib/internal/template/test-utils/selectors/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/tooltip/index.d.ts +9 -0
- package/lib/internal/template/test-utils/selectors/tooltip/index.js +19 -0
- package/lib/internal/template/test-utils/selectors/tooltip/index.js.map +1 -0
- package/lib/internal/template/token/internal.d.ts.map +1 -1
- package/lib/internal/template/token/internal.js +3 -3
- package/lib/internal/template/token/internal.js.map +1 -1
- package/lib/internal/template/tooltip/index.d.ts +7 -0
- package/lib/internal/template/tooltip/index.d.ts.map +1 -0
- package/lib/internal/template/tooltip/index.js +20 -0
- package/lib/internal/template/tooltip/index.js.map +1 -0
- package/lib/internal/template/tooltip/interfaces.d.ts +38 -0
- package/lib/internal/template/tooltip/interfaces.d.ts.map +1 -0
- package/lib/internal/template/tooltip/interfaces.js +2 -0
- package/lib/internal/template/tooltip/interfaces.js.map +1 -0
- package/lib/internal/template/tooltip/internal.d.ts +6 -0
- package/lib/internal/template/tooltip/internal.d.ts.map +1 -0
- package/lib/internal/template/tooltip/internal.js +45 -0
- package/lib/internal/template/tooltip/internal.js.map +1 -0
- package/lib/internal/template/tooltip/test-classes/styles.css.js +6 -0
- package/lib/internal/template/tooltip/test-classes/styles.scoped.css +7 -0
- package/lib/internal/template/tooltip/test-classes/styles.selectors.js +7 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-dropdown-item.js","sourceRoot":"","sources":["../../../src/button-group/menu-dropdown-item.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAEhD,O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ache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalButton from '../button/internal';\nimport { ButtonDropdownProps } from '../button-dropdown/interfaces';\nimport ButtonDropdown from '../button-dropdown/internal';\nimport { CancelableEventHandler, fireCancelableEvent } from '../internal/events';\nimport Tooltip from '../tooltip/internal.js';\nimport { ButtonGroupProps } from './interfaces';\n\nimport testUtilStyles from './test-classes/styles.css.js';\n\ninterface MenuDropdownItemProps {\n item: ButtonGroupProps.MenuDropdown;\n showTooltip: boolean;\n onTooltipDismiss: () => void;\n onItemClick?: CancelableEventHandler<ButtonGroupProps.ItemClickDetails>;\n expandToViewport?: boolean;\n position: string;\n}\n\nconst MenuDropdownItem = React.forwardRef(\n (\n { item, showTooltip, onItemClick, onTooltipDismiss, expandToViewport, position }: MenuDropdownItemProps,\n ref: React.Ref<ButtonDropdownProps.Ref>\n ) => {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const onClickHandler = (event: CustomEvent<ButtonDropdownProps.ItemClickDetails>) => {\n fireCancelableEvent(onItemClick, { id: event.detail.id, checked: event.detail.checked }, event);\n };\n\n return (\n <ButtonDropdown\n ref={ref}\n variant=\"icon\"\n items={item.items}\n onItemClick={onClickHandler}\n expandToViewport={expandToViewport}\n ariaLabel={item.text}\n className={testUtilStyles['button-group-item']}\n position={position}\n data-testid={item.id}\n disabled={item.disabled}\n customTriggerBuilder={({ onClick, isOpen, triggerRef, ariaLabel, ariaExpanded, testUtilsClass }) => (\n <div ref={containerRef} {...(item.disabled ? {} : getAnalyticsMetadataAttribute({ detail: { position } }))}>\n {!isOpen && showTooltip && !item.disabled && !item.loading && (\n <Tooltip\n className={testUtilStyles['button-group-tooltip']}\n getTrack={() => containerRef.current}\n content={item.text}\n onEscape={onTooltipDismiss}\n />\n )}\n <InternalButton\n ref={triggerRef}\n variant=\"icon\"\n ariaLabel={ariaLabel}\n data-itemid={item.id}\n ariaExpanded={ariaExpanded}\n className={clsx(testUtilStyles.item, testUtilsClass)}\n iconName=\"ellipsis\"\n loading={item.loading}\n loadingText={item.loadingText}\n disabled={item.disabled}\n disabledReason={item.disabledReason}\n onClick={onClick}\n __title=\"\"\n />\n </div>\n )}\n />\n );\n }\n);\n\nexport default MenuDropdownItem;\n"]}
|
|
@@ -4,10 +4,10 @@ import React, { forwardRef, useRef, useState } from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';
|
|
6
6
|
import ScreenreaderOnly from '../../internal/components/screenreader-only/index.js';
|
|
7
|
-
import Tooltip from '../../internal/components/tooltip';
|
|
8
7
|
import { useEffectOnUpdate } from '../../internal/hooks/use-effect-on-update';
|
|
9
8
|
import useHiddenDescription from '../../internal/hooks/use-hidden-description';
|
|
10
9
|
import { applyDisplayName } from '../../internal/utils/apply-display-name';
|
|
10
|
+
import Tooltip from '../../tooltip/internal.js';
|
|
11
11
|
import styles from '../styles.css.js';
|
|
12
12
|
const GridCell = forwardRef((props, focusedDateRef) => {
|
|
13
13
|
const { disabledReason, ...rest } = props;
|
|
@@ -19,7 +19,7 @@ const GridCell = forwardRef((props, focusedDateRef) => {
|
|
|
19
19
|
props.children,
|
|
20
20
|
isDisabledWithReason && (React.createElement(React.Fragment, null,
|
|
21
21
|
descriptionEl,
|
|
22
|
-
showTooltip && (React.createElement(Tooltip, { className: styles['disabled-reason-tooltip'],
|
|
22
|
+
showTooltip && (React.createElement(Tooltip, { className: styles['disabled-reason-tooltip'], getTrack: () => ref.current, content: disabledReason, onEscape: () => setShowTooltip(false) }))))));
|
|
23
23
|
});
|
|
24
24
|
applyDisplayName(GridCell, 'GridCell');
|
|
25
25
|
export default function Grid({ isDateEnabled, dateDisabledReason, focusedDate, focusableDate, onSelectDate, selectedDate, ariaLabelledby, header, rows, isCurrentPage, renderDate, renderDateAnnouncement, isSameDate, onGridKeyDownHandler, }) {
|
|
@@ -1 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AC,CAAC,CACC,CACN,CAAC,CACI,CACF,CACT,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, TdHTMLAttributes, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport { DatePickerProps } from '../../date-picker/interfaces';\nimport ScreenreaderOnly from '../../internal/components/screenreader-only/index.js';\nimport Tooltip from '../../internal/components/tooltip';\nimport { useEffectOnUpdate } from '../../internal/hooks/use-effect-on-update';\nimport useHiddenDescription from '../../internal/hooks/use-hidden-description';\nimport { applyDisplayName } from '../../internal/utils/apply-display-name';\nimport { CalendarProps } from '../interfaces';\n\nimport styles from '../styles.css.js';\n\n/**\n * Calendar grid supports two mechanisms of keyboard navigation:\n * - Native screen-reader table navigation (semantic table markup);\n * - Keyboard arrow-keys navigation (a custom key-down handler).\n *\n * The implementation largely follows the w3 example (https://www.w3.org/WAI/ARIA/apg/example-index/dialog-modal/datepicker-dialog) and shares the following issues:\n * - (table navigation) Chrome+VO - weekday is announced twice when navigating to the calendar's header;\n * - (table navigation) Safari+VO - \"dimmed\" state is announced twice;\n * - (table navigation) Firefox/Chrome+NVDA - cannot use table navigation if any cell has a focus;\n * - (keyboard navigation) Firefox+NVDA - every date is announced as \"not selected\";\n * - (keyboard navigation) Safari/Chrome+VO - weekdays are not announced;\n * - (keyboard navigation) Safari/Chrome+VO - dates are not announced as interactive (clickable or selectable);\n * - (keyboard navigation) Safari/Chrome+VO - date announcements are not interruptive and can be missed if navigating fast.\n */\n\nexport interface GridProps {\n isDateEnabled: DatePickerProps.IsDateEnabledFunction;\n dateDisabledReason: CalendarProps.DateDisabledReasonFunction;\n focusedDate: Date | null;\n focusableDate: Date | null;\n onSelectDate: (date: Date) => void;\n onFocusDate: (date: null | Date) => void;\n onChangePage: (date: Date) => void;\n selectedDate: Date | null;\n ariaLabelledby: string;\n header?: React.ReactNode;\n rows: ReadonlyArray<ReadonlyArray<Date>>;\n isCurrentPage: (date: Date) => boolean;\n renderDate: (date: Date) => string;\n renderDateAnnouncement: (date: Date, isOnCurrentDate: boolean) => string;\n isSameDate: (date: Date, baseDate: Date) => boolean;\n onGridKeyDownHandler: (event: React.KeyboardEvent<HTMLElement>) => void;\n}\n\ninterface GridCellProps extends TdHTMLAttributes<HTMLTableCellElement> {\n disabledReason?: string;\n}\n\nconst GridCell = forwardRef((props: GridCellProps, focusedDateRef: React.Ref<HTMLTableCellElement>) => {\n const { disabledReason, ...rest } = props;\n const isDisabledWithReason = !!disabledReason;\n const { targetProps, descriptionEl } = useHiddenDescription(disabledReason);\n const ref = useRef<HTMLTableCellElement>(null);\n const [showTooltip, setShowTooltip] = useState(false);\n\n return (\n <td\n ref={useMergeRefs(focusedDateRef, ref)}\n {...(isDisabledWithReason ? targetProps : {})}\n {...rest}\n onFocus={() => (isDisabledWithReason ? setShowTooltip(true) : undefined)}\n onBlur={() => (isDisabledWithReason ? setShowTooltip(false) : undefined)}\n onMouseEnter={() => (isDisabledWithReason ? setShowTooltip(true) : undefined)}\n onMouseLeave={() => (isDisabledWithReason ? setShowTooltip(false) : undefined)}\n >\n {props.children}\n {isDisabledWithReason && (\n <>\n {descriptionEl}\n {showTooltip && (\n <Tooltip\n className={styles['disabled-reason-tooltip']}\n trackRef={ref}\n value={disabledReason!}\n onDismiss={() => setShowTooltip(false)}\n />\n )}\n </>\n )}\n </td>\n );\n});\n\napplyDisplayName(GridCell, 'GridCell');\n\nexport default function Grid({\n isDateEnabled,\n dateDisabledReason,\n focusedDate,\n focusableDate,\n onSelectDate,\n selectedDate,\n ariaLabelledby,\n header,\n rows,\n isCurrentPage,\n renderDate,\n renderDateAnnouncement,\n isSameDate,\n onGridKeyDownHandler,\n}: GridProps) {\n const focusedDateRef = useRef<HTMLTableCellElement>(null);\n\n // The focused date changes as a feedback to keyboard navigation in the grid.\n // Once changed, the corresponding date button needs to receive the actual focus.\n useEffectOnUpdate(() => {\n if (focusedDate && focusedDateRef.current) {\n (focusedDateRef.current as HTMLDivElement).focus();\n }\n }, [focusedDate]);\n\n const rowLength = rows[0].length;\n\n const denseGrid = rowLength > 3;\n\n return (\n <table\n role=\"grid\"\n className={clsx(styles['calendar-grid'], denseGrid && styles['calendar-grid-dense'])}\n aria-labelledby={ariaLabelledby}\n >\n {header}\n <tbody onKeyDown={onGridKeyDownHandler}>\n {rows.map((row, rowIndex) => (\n <tr key={rowIndex} className={styles['calendar-row']}>\n {row.map((date, dateIndex) => {\n const isFocusable = !!focusableDate && isSameDate(date, focusableDate);\n const isSelected = !!selectedDate && isSameDate(date, selectedDate);\n const isEnabled = !isDateEnabled || isDateEnabled(date);\n const disabledReason = dateDisabledReason(date);\n const isDisabledWithReason = !isEnabled && !!disabledReason;\n const isCurrentDate = isSameDate(date, new Date());\n\n // Can't be focused.\n let tabIndex = undefined;\n if (isFocusable && (isEnabled || isDisabledWithReason)) {\n // Next focus target.\n tabIndex = 0;\n } else if (isEnabled || isDisabledWithReason) {\n // Can be focused programmatically.\n tabIndex = -1;\n }\n\n return (\n <GridCell\n key={`${rowIndex}:${dateIndex}`}\n ref={tabIndex === 0 ? focusedDateRef : undefined}\n tabIndex={tabIndex}\n aria-current={isCurrentDate ? 'date' : undefined}\n aria-selected={isEnabled ? isSelected : undefined}\n aria-disabled={!isEnabled}\n // Do not attach click event when the date is disabled, otherwise VO+safari announces clickable\n onClick={isEnabled ? () => onSelectDate(date) : undefined}\n className={clsx(styles['calendar-grid-cell'], styles['calendar-date'], {\n [styles['calendar-date-current-page']]: isCurrentPage(date),\n [styles['calendar-date-enabled']]: isEnabled,\n [styles['calendar-date-selected']]: isSelected,\n [styles['calendar-date-current']]: isCurrentDate,\n [styles['calendar-date-dense']]: denseGrid,\n })}\n disabledReason={isDisabledWithReason ? disabledReason : undefined}\n >\n <span className={styles['date-inner']} aria-hidden=\"true\">\n {renderDate(date)}\n </span>\n {/* Screen-reader announcement for the focused date. */}\n <ScreenreaderOnly>{renderDateAnnouncement(date, isCurrentDate)}</ScreenreaderOnly>\n </GridCell>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/calendar/grid/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAoB,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAG7E,OAAO,gBAAgB,MAAM,sDAAsD,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,oBAAoB,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,OAAO,MAAM,2BAA2B,CAAC;AAGhD,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAwCtC,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,KAAoB,EAAE,cAA+C,EAAE,EAAE;IACpG,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAC1C,MAAM,oBAAoB,GAAG,CAAC,CAAC,cAAc,CAAC;IAC9C,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,oBAAoB,CAAC,cAAc,CAAC,CAAC;IAC5E,MAAM,GAAG,GAAG,MAAM,CAAuB,IAAI,CAAC,CAAC;IAC/C,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEtD,OAAO,CACL,4BACE,GAAG,EAAE,YAAY,CAAC,cAAc,EAAE,GAAG,CAAC,KAClC,CAAC,oBAAoB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,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,CAAC,iBAAc,MAAM,IACtD,UAAU,CAAC,IAAI,CAAC,CACZ;gBAEP,oBAAC,gBAAgB,QAAE,sBAAsB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAoB,CACzE,CACZ,CAAC;QACJ,CAAC,CAAC,CACC,CACN,CAAC,CACI,CACF,CACT,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, TdHTMLAttributes, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport { DatePickerProps } from '../../date-picker/interfaces';\nimport ScreenreaderOnly from '../../internal/components/screenreader-only/index.js';\nimport { useEffectOnUpdate } from '../../internal/hooks/use-effect-on-update';\nimport useHiddenDescription from '../../internal/hooks/use-hidden-description';\nimport { applyDisplayName } from '../../internal/utils/apply-display-name';\nimport Tooltip from '../../tooltip/internal.js';\nimport { CalendarProps } from '../interfaces';\n\nimport styles from '../styles.css.js';\n\n/**\n * Calendar grid supports two mechanisms of keyboard navigation:\n * - Native screen-reader table navigation (semantic table markup);\n * - Keyboard arrow-keys navigation (a custom key-down handler).\n *\n * The implementation largely follows the w3 example (https://www.w3.org/WAI/ARIA/apg/example-index/dialog-modal/datepicker-dialog) and shares the following issues:\n * - (table navigation) Chrome+VO - weekday is announced twice when navigating to the calendar's header;\n * - (table navigation) Safari+VO - \"dimmed\" state is announced twice;\n * - (table navigation) Firefox/Chrome+NVDA - cannot use table navigation if any cell has a focus;\n * - (keyboard navigation) Firefox+NVDA - every date is announced as \"not selected\";\n * - (keyboard navigation) Safari/Chrome+VO - weekdays are not announced;\n * - (keyboard navigation) Safari/Chrome+VO - dates are not announced as interactive (clickable or selectable);\n * - (keyboard navigation) Safari/Chrome+VO - date announcements are not interruptive and can be missed if navigating fast.\n */\n\nexport interface GridProps {\n isDateEnabled: DatePickerProps.IsDateEnabledFunction;\n dateDisabledReason: CalendarProps.DateDisabledReasonFunction;\n focusedDate: Date | null;\n focusableDate: Date | null;\n onSelectDate: (date: Date) => void;\n onFocusDate: (date: null | Date) => void;\n onChangePage: (date: Date) => void;\n selectedDate: Date | null;\n ariaLabelledby: string;\n header?: React.ReactNode;\n rows: ReadonlyArray<ReadonlyArray<Date>>;\n isCurrentPage: (date: Date) => boolean;\n renderDate: (date: Date) => string;\n renderDateAnnouncement: (date: Date, isOnCurrentDate: boolean) => string;\n isSameDate: (date: Date, baseDate: Date) => boolean;\n onGridKeyDownHandler: (event: React.KeyboardEvent<HTMLElement>) => void;\n}\n\ninterface GridCellProps extends TdHTMLAttributes<HTMLTableCellElement> {\n disabledReason?: string;\n}\n\nconst GridCell = forwardRef((props: GridCellProps, focusedDateRef: React.Ref<HTMLTableCellElement>) => {\n const { disabledReason, ...rest } = props;\n const isDisabledWithReason = !!disabledReason;\n const { targetProps, descriptionEl } = useHiddenDescription(disabledReason);\n const ref = useRef<HTMLTableCellElement>(null);\n const [showTooltip, setShowTooltip] = useState(false);\n\n return (\n <td\n ref={useMergeRefs(focusedDateRef, ref)}\n {...(isDisabledWithReason ? targetProps : {})}\n {...rest}\n onFocus={() => (isDisabledWithReason ? setShowTooltip(true) : undefined)}\n onBlur={() => (isDisabledWithReason ? setShowTooltip(false) : undefined)}\n onMouseEnter={() => (isDisabledWithReason ? setShowTooltip(true) : undefined)}\n onMouseLeave={() => (isDisabledWithReason ? setShowTooltip(false) : undefined)}\n >\n {props.children}\n {isDisabledWithReason && (\n <>\n {descriptionEl}\n {showTooltip && (\n <Tooltip\n className={styles['disabled-reason-tooltip']}\n getTrack={() => ref.current}\n content={disabledReason!}\n onEscape={() => setShowTooltip(false)}\n />\n )}\n </>\n )}\n </td>\n );\n});\n\napplyDisplayName(GridCell, 'GridCell');\n\nexport default function Grid({\n isDateEnabled,\n dateDisabledReason,\n focusedDate,\n focusableDate,\n onSelectDate,\n selectedDate,\n ariaLabelledby,\n header,\n rows,\n isCurrentPage,\n renderDate,\n renderDateAnnouncement,\n isSameDate,\n onGridKeyDownHandler,\n}: GridProps) {\n const focusedDateRef = useRef<HTMLTableCellElement>(null);\n\n // The focused date changes as a feedback to keyboard navigation in the grid.\n // Once changed, the corresponding date button needs to receive the actual focus.\n useEffectOnUpdate(() => {\n if (focusedDate && focusedDateRef.current) {\n (focusedDateRef.current as HTMLDivElement).focus();\n }\n }, [focusedDate]);\n\n const rowLength = rows[0].length;\n\n const denseGrid = rowLength > 3;\n\n return (\n <table\n role=\"grid\"\n className={clsx(styles['calendar-grid'], denseGrid && styles['calendar-grid-dense'])}\n aria-labelledby={ariaLabelledby}\n >\n {header}\n <tbody onKeyDown={onGridKeyDownHandler}>\n {rows.map((row, rowIndex) => (\n <tr key={rowIndex} className={styles['calendar-row']}>\n {row.map((date, dateIndex) => {\n const isFocusable = !!focusableDate && isSameDate(date, focusableDate);\n const isSelected = !!selectedDate && isSameDate(date, selectedDate);\n const isEnabled = !isDateEnabled || isDateEnabled(date);\n const disabledReason = dateDisabledReason(date);\n const isDisabledWithReason = !isEnabled && !!disabledReason;\n const isCurrentDate = isSameDate(date, new Date());\n\n // Can't be focused.\n let tabIndex = undefined;\n if (isFocusable && (isEnabled || isDisabledWithReason)) {\n // Next focus target.\n tabIndex = 0;\n } else if (isEnabled || isDisabledWithReason) {\n // Can be focused programmatically.\n tabIndex = -1;\n }\n\n return (\n <GridCell\n key={`${rowIndex}:${dateIndex}`}\n ref={tabIndex === 0 ? focusedDateRef : undefined}\n tabIndex={tabIndex}\n aria-current={isCurrentDate ? 'date' : undefined}\n aria-selected={isEnabled ? isSelected : undefined}\n aria-disabled={!isEnabled}\n // Do not attach click event when the date is disabled, otherwise VO+safari announces clickable\n onClick={isEnabled ? () => onSelectDate(date) : undefined}\n className={clsx(styles['calendar-grid-cell'], styles['calendar-date'], {\n [styles['calendar-date-current-page']]: isCurrentPage(date),\n [styles['calendar-date-enabled']]: isEnabled,\n [styles['calendar-date-selected']]: isSelected,\n [styles['calendar-date-current']]: isCurrentDate,\n [styles['calendar-date-dense']]: denseGrid,\n })}\n disabledReason={isDisabledWithReason ? disabledReason : undefined}\n >\n <span className={styles['date-inner']} aria-hidden=\"true\">\n {renderDate(date)}\n </span>\n {/* Screen-reader announcement for the focused date. */}\n <ScreenreaderOnly>{renderDateAnnouncement(date, isCurrentDate)}</ScreenreaderOnly>\n </GridCell>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n"]}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"card-inner": "awsui_card-
|
|
5
|
-
"root": "
|
|
6
|
-
"header-variant-full-page": "awsui_header-variant-full-
|
|
7
|
-
"header-refresh": "awsui_header-
|
|
8
|
-
"list": "
|
|
9
|
-
"list-grid-1": "awsui_list-grid-
|
|
10
|
-
"card": "
|
|
11
|
-
"list-grid-2": "awsui_list-grid-
|
|
12
|
-
"list-grid-3": "awsui_list-grid-
|
|
13
|
-
"list-grid-4": "awsui_list-grid-
|
|
14
|
-
"list-grid-5": "awsui_list-grid-
|
|
15
|
-
"list-grid-6": "awsui_list-grid-
|
|
16
|
-
"list-grid-7": "awsui_list-grid-
|
|
17
|
-
"list-grid-8": "awsui_list-grid-
|
|
18
|
-
"list-grid-9": "awsui_list-grid-
|
|
19
|
-
"list-grid-10": "awsui_list-grid-
|
|
20
|
-
"list-grid-11": "awsui_list-grid-
|
|
21
|
-
"list-grid-12": "awsui_list-grid-
|
|
22
|
-
"list-grid-13": "awsui_list-grid-
|
|
23
|
-
"list-grid-14": "awsui_list-grid-
|
|
24
|
-
"list-grid-15": "awsui_list-grid-
|
|
25
|
-
"list-grid-16": "awsui_list-grid-
|
|
26
|
-
"list-grid-17": "awsui_list-grid-
|
|
27
|
-
"list-grid-18": "awsui_list-grid-
|
|
28
|
-
"list-grid-19": "awsui_list-grid-
|
|
29
|
-
"list-grid-20": "awsui_list-grid-
|
|
30
|
-
"selection-control": "awsui_selection-
|
|
31
|
-
"loading": "
|
|
32
|
-
"empty": "
|
|
33
|
-
"has-header": "awsui_has-
|
|
34
|
-
"refresh": "
|
|
35
|
-
"card-header": "awsui_card-
|
|
36
|
-
"card-header-inner": "awsui_card-header-
|
|
37
|
-
"card-selectable": "awsui_card-
|
|
38
|
-
"card-selected": "awsui_card-
|
|
39
|
-
"section": "
|
|
40
|
-
"section-header": "awsui_section-
|
|
41
|
-
"section-content": "awsui_section-
|
|
42
|
-
"footer-pagination": "awsui_footer-
|
|
4
|
+
"card-inner": "awsui_card-inner_p8a6i_169tu_161",
|
|
5
|
+
"root": "awsui_root_p8a6i_169tu_193",
|
|
6
|
+
"header-variant-full-page": "awsui_header-variant-full-page_p8a6i_169tu_232",
|
|
7
|
+
"header-refresh": "awsui_header-refresh_p8a6i_169tu_232",
|
|
8
|
+
"list": "awsui_list_p8a6i_169tu_239",
|
|
9
|
+
"list-grid-1": "awsui_list-grid-1_p8a6i_169tu_250",
|
|
10
|
+
"card": "awsui_card_p8a6i_169tu_161",
|
|
11
|
+
"list-grid-2": "awsui_list-grid-2_p8a6i_169tu_253",
|
|
12
|
+
"list-grid-3": "awsui_list-grid-3_p8a6i_169tu_256",
|
|
13
|
+
"list-grid-4": "awsui_list-grid-4_p8a6i_169tu_259",
|
|
14
|
+
"list-grid-5": "awsui_list-grid-5_p8a6i_169tu_262",
|
|
15
|
+
"list-grid-6": "awsui_list-grid-6_p8a6i_169tu_265",
|
|
16
|
+
"list-grid-7": "awsui_list-grid-7_p8a6i_169tu_268",
|
|
17
|
+
"list-grid-8": "awsui_list-grid-8_p8a6i_169tu_271",
|
|
18
|
+
"list-grid-9": "awsui_list-grid-9_p8a6i_169tu_274",
|
|
19
|
+
"list-grid-10": "awsui_list-grid-10_p8a6i_169tu_277",
|
|
20
|
+
"list-grid-11": "awsui_list-grid-11_p8a6i_169tu_280",
|
|
21
|
+
"list-grid-12": "awsui_list-grid-12_p8a6i_169tu_283",
|
|
22
|
+
"list-grid-13": "awsui_list-grid-13_p8a6i_169tu_286",
|
|
23
|
+
"list-grid-14": "awsui_list-grid-14_p8a6i_169tu_289",
|
|
24
|
+
"list-grid-15": "awsui_list-grid-15_p8a6i_169tu_292",
|
|
25
|
+
"list-grid-16": "awsui_list-grid-16_p8a6i_169tu_295",
|
|
26
|
+
"list-grid-17": "awsui_list-grid-17_p8a6i_169tu_298",
|
|
27
|
+
"list-grid-18": "awsui_list-grid-18_p8a6i_169tu_301",
|
|
28
|
+
"list-grid-19": "awsui_list-grid-19_p8a6i_169tu_304",
|
|
29
|
+
"list-grid-20": "awsui_list-grid-20_p8a6i_169tu_307",
|
|
30
|
+
"selection-control": "awsui_selection-control_p8a6i_169tu_311",
|
|
31
|
+
"loading": "awsui_loading_p8a6i_169tu_321",
|
|
32
|
+
"empty": "awsui_empty_p8a6i_169tu_322",
|
|
33
|
+
"has-header": "awsui_has-header_p8a6i_169tu_329",
|
|
34
|
+
"refresh": "awsui_refresh_p8a6i_169tu_332",
|
|
35
|
+
"card-header": "awsui_card-header_p8a6i_169tu_404",
|
|
36
|
+
"card-header-inner": "awsui_card-header-inner_p8a6i_169tu_412",
|
|
37
|
+
"card-selectable": "awsui_card-selectable_p8a6i_169tu_416",
|
|
38
|
+
"card-selected": "awsui_card-selected_p8a6i_169tu_419",
|
|
39
|
+
"section": "awsui_section_p8a6i_169tu_427",
|
|
40
|
+
"section-header": "awsui_section-header_p8a6i_169tu_435",
|
|
41
|
+
"section-content": "awsui_section-content_p8a6i_169tu_441",
|
|
42
|
+
"footer-pagination": "awsui_footer-pagination_p8a6i_169tu_451"
|
|
43
43
|
};
|
|
44
44
|
|
|
@@ -158,39 +158,39 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
158
158
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
159
159
|
SPDX-License-Identifier: Apache-2.0
|
|
160
160
|
*/
|
|
161
|
-
.awsui_card-
|
|
161
|
+
.awsui_card-inner_p8a6i_169tu_161:not(#\9) {
|
|
162
162
|
transition-property: background-color;
|
|
163
163
|
transition-duration: var(--motion-duration-transition-show-paced-0w35xp, 180ms);
|
|
164
164
|
transition-timing-function: var(--motion-easing-transition-show-paced-ufdgkj, ease-out);
|
|
165
165
|
}
|
|
166
166
|
@media (prefers-reduced-motion: reduce) {
|
|
167
|
-
.awsui_card-
|
|
167
|
+
.awsui_card-inner_p8a6i_169tu_161:not(#\9) {
|
|
168
168
|
animation: none;
|
|
169
169
|
transition: none;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
.awsui-motion-disabled .awsui_card-
|
|
172
|
+
.awsui-motion-disabled .awsui_card-inner_p8a6i_169tu_161:not(#\9), .awsui-mode-entering .awsui_card-inner_p8a6i_169tu_161:not(#\9) {
|
|
173
173
|
animation: none;
|
|
174
174
|
transition: none;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
.awsui_card-
|
|
177
|
+
.awsui_card-inner_p8a6i_169tu_161:not(#\9)::before {
|
|
178
178
|
transition-property: border-top-color, border-right-color, border-bottom-color, border-left-color;
|
|
179
179
|
transition-duration: var(--motion-duration-transition-show-paced-0w35xp, 180ms);
|
|
180
180
|
transition-timing-function: var(--motion-easing-transition-show-paced-ufdgkj, ease-out);
|
|
181
181
|
}
|
|
182
182
|
@media (prefers-reduced-motion: reduce) {
|
|
183
|
-
.awsui_card-
|
|
183
|
+
.awsui_card-inner_p8a6i_169tu_161:not(#\9)::before {
|
|
184
184
|
animation: none;
|
|
185
185
|
transition: none;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
.awsui-motion-disabled .awsui_card-
|
|
188
|
+
.awsui-motion-disabled .awsui_card-inner_p8a6i_169tu_161:not(#\9)::before, .awsui-mode-entering .awsui_card-inner_p8a6i_169tu_161:not(#\9)::before {
|
|
189
189
|
animation: none;
|
|
190
190
|
transition: none;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
.
|
|
193
|
+
.awsui_root_p8a6i_169tu_193:not(#\9) {
|
|
194
194
|
border-collapse: separate;
|
|
195
195
|
border-spacing: 0;
|
|
196
196
|
box-sizing: border-box;
|
|
@@ -229,14 +229,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
229
229
|
-moz-osx-font-smoothing: auto;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
.awsui_header-variant-full-
|
|
232
|
+
.awsui_header-variant-full-page_p8a6i_169tu_232.awsui_header-refresh_p8a6i_169tu_232:not(#\9) {
|
|
233
233
|
padding-block-start: 0;
|
|
234
234
|
padding-inline-start: 0;
|
|
235
235
|
padding-inline-end: 0;
|
|
236
236
|
padding-block-end: calc(var(--space-container-header-bottom-rbnprk, 12px) + var(--space-table-header-tools-full-page-bottom-1o73je, 4px));
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
.
|
|
239
|
+
.awsui_list_p8a6i_169tu_239:not(#\9) {
|
|
240
240
|
display: flex;
|
|
241
241
|
flex-wrap: wrap;
|
|
242
242
|
box-sizing: border-box;
|
|
@@ -247,68 +247,68 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
247
247
|
margin-inline-start: calc(var(--space-grid-gutter-nm7ylt, 20px) * -1);
|
|
248
248
|
margin-inline-end: 0;
|
|
249
249
|
}
|
|
250
|
-
.
|
|
250
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-1_p8a6i_169tu_250 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
251
251
|
inline-size: 100%;
|
|
252
252
|
}
|
|
253
|
-
.
|
|
253
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-2_p8a6i_169tu_253 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
254
254
|
inline-size: 50%;
|
|
255
255
|
}
|
|
256
|
-
.
|
|
256
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-3_p8a6i_169tu_256 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
257
257
|
inline-size: 33.3333333333%;
|
|
258
258
|
}
|
|
259
|
-
.
|
|
259
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-4_p8a6i_169tu_259 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
260
260
|
inline-size: 25%;
|
|
261
261
|
}
|
|
262
|
-
.
|
|
262
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-5_p8a6i_169tu_262 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
263
263
|
inline-size: 20%;
|
|
264
264
|
}
|
|
265
|
-
.
|
|
265
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-6_p8a6i_169tu_265 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
266
266
|
inline-size: 16.6666666667%;
|
|
267
267
|
}
|
|
268
|
-
.
|
|
268
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-7_p8a6i_169tu_268 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
269
269
|
inline-size: 14.2857142857%;
|
|
270
270
|
}
|
|
271
|
-
.
|
|
271
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-8_p8a6i_169tu_271 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
272
272
|
inline-size: 12.5%;
|
|
273
273
|
}
|
|
274
|
-
.
|
|
274
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-9_p8a6i_169tu_274 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
275
275
|
inline-size: 11.1111111111%;
|
|
276
276
|
}
|
|
277
|
-
.
|
|
277
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-10_p8a6i_169tu_277 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
278
278
|
inline-size: 10%;
|
|
279
279
|
}
|
|
280
|
-
.
|
|
280
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-11_p8a6i_169tu_280 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
281
281
|
inline-size: 9.0909090909%;
|
|
282
282
|
}
|
|
283
|
-
.
|
|
283
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-12_p8a6i_169tu_283 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
284
284
|
inline-size: 8.3333333333%;
|
|
285
285
|
}
|
|
286
|
-
.
|
|
286
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-13_p8a6i_169tu_286 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
287
287
|
inline-size: 7.6923076923%;
|
|
288
288
|
}
|
|
289
|
-
.
|
|
289
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-14_p8a6i_169tu_289 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
290
290
|
inline-size: 7.1428571429%;
|
|
291
291
|
}
|
|
292
|
-
.
|
|
292
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-15_p8a6i_169tu_292 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
293
293
|
inline-size: 6.6666666667%;
|
|
294
294
|
}
|
|
295
|
-
.
|
|
295
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-16_p8a6i_169tu_295 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
296
296
|
inline-size: 6.25%;
|
|
297
297
|
}
|
|
298
|
-
.
|
|
298
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-17_p8a6i_169tu_298 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
299
299
|
inline-size: 5.8823529412%;
|
|
300
300
|
}
|
|
301
|
-
.
|
|
301
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-18_p8a6i_169tu_301 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
302
302
|
inline-size: 5.5555555556%;
|
|
303
303
|
}
|
|
304
|
-
.
|
|
304
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-19_p8a6i_169tu_304 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
305
305
|
inline-size: 5.2631578947%;
|
|
306
306
|
}
|
|
307
|
-
.
|
|
307
|
+
.awsui_list_p8a6i_169tu_239.awsui_list-grid-20_p8a6i_169tu_307 > .awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
308
308
|
inline-size: 5%;
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
.awsui_selection-
|
|
311
|
+
.awsui_selection-control_p8a6i_169tu_311:not(#\9) {
|
|
312
312
|
position: absolute;
|
|
313
313
|
box-sizing: border-box;
|
|
314
314
|
inline-size: calc(var(--size-control-lkpwjy, 14px) + 2 * var(--space-card-horizontal-0tbxbt, 20px));
|
|
@@ -318,38 +318,39 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
318
318
|
padding-inline: var(--space-card-horizontal-0tbxbt, 20px);
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
.
|
|
322
|
-
.
|
|
321
|
+
.awsui_loading_p8a6i_169tu_321:not(#\9),
|
|
322
|
+
.awsui_empty_p8a6i_169tu_322:not(#\9) {
|
|
323
323
|
overflow: hidden;
|
|
324
324
|
text-align: center;
|
|
325
325
|
color: var(--color-text-empty-vtt4l2, #687078);
|
|
326
326
|
margin-block-end: var(--space-scaled-l-66n9sr, 20px);
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
-
.awsui_has-
|
|
329
|
+
.awsui_has-header_p8a6i_169tu_329:not(#\9) {
|
|
330
330
|
margin-block-start: var(--space-grid-gutter-nm7ylt, 20px);
|
|
331
331
|
}
|
|
332
|
-
.awsui_has-
|
|
332
|
+
.awsui_has-header_p8a6i_169tu_329.awsui_refresh_p8a6i_169tu_332.awsui_header-variant-full-page_p8a6i_169tu_232:not(#\9) {
|
|
333
333
|
margin-block-start: var(--space-scaled-s-gjhvjd, 12px);
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
.
|
|
336
|
+
.awsui_card_p8a6i_169tu_161:not(#\9) {
|
|
337
337
|
display: flex;
|
|
338
338
|
overflow-wrap: break-word;
|
|
339
339
|
word-wrap: break-word;
|
|
340
|
+
box-sizing: border-box;
|
|
340
341
|
margin-block: 0;
|
|
341
342
|
margin-inline: 0;
|
|
342
|
-
padding-block: 0;
|
|
343
|
-
padding-
|
|
343
|
+
padding-block-start: 0;
|
|
344
|
+
padding-block-end: var(--space-grid-gutter-nm7ylt, 20px);
|
|
345
|
+
padding-inline-start: var(--space-grid-gutter-nm7ylt, 20px);
|
|
346
|
+
padding-inline-end: 0;
|
|
344
347
|
list-style: none;
|
|
345
348
|
}
|
|
346
|
-
.awsui_card-
|
|
349
|
+
.awsui_card-inner_p8a6i_169tu_161:not(#\9) {
|
|
347
350
|
position: relative;
|
|
348
351
|
background-color: var(--color-background-container-content-aemn43, #ffffff);
|
|
349
|
-
margin-block
|
|
350
|
-
margin-
|
|
351
|
-
margin-inline-start: var(--space-grid-gutter-nm7ylt, 20px);
|
|
352
|
-
margin-inline-end: 0;
|
|
352
|
+
margin-block: 0;
|
|
353
|
+
margin-inline: 0;
|
|
353
354
|
padding-block: var(--space-card-vertical-nzlc5t, 20px);
|
|
354
355
|
padding-inline: var(--space-card-horizontal-0tbxbt, 20px);
|
|
355
356
|
inline-size: 100%;
|
|
@@ -360,7 +361,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
360
361
|
border-end-end-radius: var(--border-radius-container-l30zxy, 0px);
|
|
361
362
|
box-sizing: border-box;
|
|
362
363
|
}
|
|
363
|
-
.awsui_card-
|
|
364
|
+
.awsui_card-inner_p8a6i_169tu_161:not(#\9)::before {
|
|
364
365
|
content: "";
|
|
365
366
|
position: absolute;
|
|
366
367
|
inset-inline-start: 0px;
|
|
@@ -378,7 +379,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
378
379
|
border-end-end-radius: var(--border-radius-container-l30zxy, 0px);
|
|
379
380
|
z-index: 1;
|
|
380
381
|
}
|
|
381
|
-
.awsui_card-
|
|
382
|
+
.awsui_card-inner_p8a6i_169tu_161:not(#\9)::after {
|
|
382
383
|
content: "";
|
|
383
384
|
position: absolute;
|
|
384
385
|
inset-inline-start: 0px;
|
|
@@ -393,14 +394,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
393
394
|
border-end-start-radius: var(--border-radius-container-l30zxy, 0px);
|
|
394
395
|
border-end-end-radius: var(--border-radius-container-l30zxy, 0px);
|
|
395
396
|
}
|
|
396
|
-
.awsui_card-
|
|
397
|
+
.awsui_card-inner_p8a6i_169tu_161:not(#\9):not(.awsui_refresh_p8a6i_169tu_332)::after {
|
|
397
398
|
box-shadow: var(--shadow-container-3fh0j3, 0 1px 1px 0 rgba(0, 28, 36, 0.3), 1px 1px 1px 0 rgba(0, 28, 36, 0.15), -1px 1px 1px 0 rgba(0, 28, 36, 0.15));
|
|
398
399
|
}
|
|
399
|
-
.awsui_card-
|
|
400
|
+
.awsui_card-inner_p8a6i_169tu_161.awsui_refresh_p8a6i_169tu_332:not(#\9)::after {
|
|
400
401
|
border-block: solid var(--border-divider-section-width-sznrdy, 1px) var(--color-border-divider-default-ipvpev, #eaeded);
|
|
401
402
|
border-inline: solid var(--border-divider-section-width-sznrdy, 1px) var(--color-border-divider-default-ipvpev, #eaeded);
|
|
402
403
|
}
|
|
403
|
-
.awsui_card-
|
|
404
|
+
.awsui_card-header_p8a6i_169tu_404:not(#\9) {
|
|
404
405
|
font-size: var(--font-size-heading-m-56jjln, 18px);
|
|
405
406
|
line-height: var(--line-height-heading-m-irezqt, 22px);
|
|
406
407
|
letter-spacing: var(--letter-spacing-heading-m-93y02s, normal);
|
|
@@ -408,22 +409,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
408
409
|
-webkit-font-smoothing: var(--font-smoothing-webkit-px4az4, auto);
|
|
409
410
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-ev3sgf, auto);
|
|
410
411
|
}
|
|
411
|
-
.awsui_card-header-
|
|
412
|
+
.awsui_card-header-inner_p8a6i_169tu_412:not(#\9) {
|
|
412
413
|
inline-size: 100%;
|
|
413
414
|
display: inline-block;
|
|
414
415
|
}
|
|
415
|
-
.awsui_card-
|
|
416
|
+
.awsui_card-selectable_p8a6i_169tu_416 > .awsui_card-inner_p8a6i_169tu_161 > .awsui_card-header_p8a6i_169tu_404:not(#\9) {
|
|
416
417
|
inline-size: 90%;
|
|
417
418
|
}
|
|
418
|
-
.awsui_card-
|
|
419
|
+
.awsui_card-selected_p8a6i_169tu_419 > .awsui_card-inner_p8a6i_169tu_161:not(#\9) {
|
|
419
420
|
background-color: var(--color-background-item-selected-v20q4r, #f1faff);
|
|
420
421
|
}
|
|
421
|
-
.awsui_card-
|
|
422
|
+
.awsui_card-selected_p8a6i_169tu_419 > .awsui_card-inner_p8a6i_169tu_161:not(#\9)::before {
|
|
422
423
|
border-block: var(--border-item-width-acvlhx, 1px) solid var(--color-border-item-selected-vq6ddf, #0073bb);
|
|
423
424
|
border-inline: var(--border-item-width-acvlhx, 1px) solid var(--color-border-item-selected-vq6ddf, #0073bb);
|
|
424
425
|
}
|
|
425
426
|
|
|
426
|
-
.
|
|
427
|
+
.awsui_section_p8a6i_169tu_427:not(#\9) {
|
|
427
428
|
display: inline-block;
|
|
428
429
|
box-sizing: border-box;
|
|
429
430
|
padding-block-start: var(--space-xs-kw7k3v, 8px);
|
|
@@ -431,23 +432,23 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
431
432
|
padding-inline: 0;
|
|
432
433
|
vertical-align: top;
|
|
433
434
|
}
|
|
434
|
-
.awsui_section-
|
|
435
|
+
.awsui_section-header_p8a6i_169tu_435:not(#\9) {
|
|
435
436
|
font-size: var(--font-size-body-m-vv54cm, 14px);
|
|
436
437
|
line-height: var(--line-height-body-m-bedeoh, 22px);
|
|
437
438
|
font-weight: var(--font-display-label-weight-ise9n2, 400);
|
|
438
439
|
color: var(--color-text-label-482ybi, #545b64);
|
|
439
440
|
}
|
|
440
|
-
.awsui_section-
|
|
441
|
+
.awsui_section-content_p8a6i_169tu_441:not(#\9) {
|
|
441
442
|
/* used in test-utils */
|
|
442
443
|
}
|
|
443
444
|
|
|
444
|
-
.
|
|
445
|
+
.awsui_section_p8a6i_169tu_427:not(#\9):last-child {
|
|
445
446
|
padding-block-start: var(--space-xs-kw7k3v, 8px);
|
|
446
447
|
padding-block-end: 0;
|
|
447
448
|
padding-inline: 0;
|
|
448
449
|
}
|
|
449
450
|
|
|
450
|
-
.awsui_footer-
|
|
451
|
+
.awsui_footer-pagination_p8a6i_169tu_451:not(#\9) {
|
|
451
452
|
display: flex;
|
|
452
453
|
justify-content: flex-end;
|
|
453
454
|
}
|
|
@@ -2,44 +2,44 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"card-inner": "awsui_card-
|
|
6
|
-
"root": "
|
|
7
|
-
"header-variant-full-page": "awsui_header-variant-full-
|
|
8
|
-
"header-refresh": "awsui_header-
|
|
9
|
-
"list": "
|
|
10
|
-
"list-grid-1": "awsui_list-grid-
|
|
11
|
-
"card": "
|
|
12
|
-
"list-grid-2": "awsui_list-grid-
|
|
13
|
-
"list-grid-3": "awsui_list-grid-
|
|
14
|
-
"list-grid-4": "awsui_list-grid-
|
|
15
|
-
"list-grid-5": "awsui_list-grid-
|
|
16
|
-
"list-grid-6": "awsui_list-grid-
|
|
17
|
-
"list-grid-7": "awsui_list-grid-
|
|
18
|
-
"list-grid-8": "awsui_list-grid-
|
|
19
|
-
"list-grid-9": "awsui_list-grid-
|
|
20
|
-
"list-grid-10": "awsui_list-grid-
|
|
21
|
-
"list-grid-11": "awsui_list-grid-
|
|
22
|
-
"list-grid-12": "awsui_list-grid-
|
|
23
|
-
"list-grid-13": "awsui_list-grid-
|
|
24
|
-
"list-grid-14": "awsui_list-grid-
|
|
25
|
-
"list-grid-15": "awsui_list-grid-
|
|
26
|
-
"list-grid-16": "awsui_list-grid-
|
|
27
|
-
"list-grid-17": "awsui_list-grid-
|
|
28
|
-
"list-grid-18": "awsui_list-grid-
|
|
29
|
-
"list-grid-19": "awsui_list-grid-
|
|
30
|
-
"list-grid-20": "awsui_list-grid-
|
|
31
|
-
"selection-control": "awsui_selection-
|
|
32
|
-
"loading": "
|
|
33
|
-
"empty": "
|
|
34
|
-
"has-header": "awsui_has-
|
|
35
|
-
"refresh": "
|
|
36
|
-
"card-header": "awsui_card-
|
|
37
|
-
"card-header-inner": "awsui_card-header-
|
|
38
|
-
"card-selectable": "awsui_card-
|
|
39
|
-
"card-selected": "awsui_card-
|
|
40
|
-
"section": "
|
|
41
|
-
"section-header": "awsui_section-
|
|
42
|
-
"section-content": "awsui_section-
|
|
43
|
-
"footer-pagination": "awsui_footer-
|
|
5
|
+
"card-inner": "awsui_card-inner_p8a6i_169tu_161",
|
|
6
|
+
"root": "awsui_root_p8a6i_169tu_193",
|
|
7
|
+
"header-variant-full-page": "awsui_header-variant-full-page_p8a6i_169tu_232",
|
|
8
|
+
"header-refresh": "awsui_header-refresh_p8a6i_169tu_232",
|
|
9
|
+
"list": "awsui_list_p8a6i_169tu_239",
|
|
10
|
+
"list-grid-1": "awsui_list-grid-1_p8a6i_169tu_250",
|
|
11
|
+
"card": "awsui_card_p8a6i_169tu_161",
|
|
12
|
+
"list-grid-2": "awsui_list-grid-2_p8a6i_169tu_253",
|
|
13
|
+
"list-grid-3": "awsui_list-grid-3_p8a6i_169tu_256",
|
|
14
|
+
"list-grid-4": "awsui_list-grid-4_p8a6i_169tu_259",
|
|
15
|
+
"list-grid-5": "awsui_list-grid-5_p8a6i_169tu_262",
|
|
16
|
+
"list-grid-6": "awsui_list-grid-6_p8a6i_169tu_265",
|
|
17
|
+
"list-grid-7": "awsui_list-grid-7_p8a6i_169tu_268",
|
|
18
|
+
"list-grid-8": "awsui_list-grid-8_p8a6i_169tu_271",
|
|
19
|
+
"list-grid-9": "awsui_list-grid-9_p8a6i_169tu_274",
|
|
20
|
+
"list-grid-10": "awsui_list-grid-10_p8a6i_169tu_277",
|
|
21
|
+
"list-grid-11": "awsui_list-grid-11_p8a6i_169tu_280",
|
|
22
|
+
"list-grid-12": "awsui_list-grid-12_p8a6i_169tu_283",
|
|
23
|
+
"list-grid-13": "awsui_list-grid-13_p8a6i_169tu_286",
|
|
24
|
+
"list-grid-14": "awsui_list-grid-14_p8a6i_169tu_289",
|
|
25
|
+
"list-grid-15": "awsui_list-grid-15_p8a6i_169tu_292",
|
|
26
|
+
"list-grid-16": "awsui_list-grid-16_p8a6i_169tu_295",
|
|
27
|
+
"list-grid-17": "awsui_list-grid-17_p8a6i_169tu_298",
|
|
28
|
+
"list-grid-18": "awsui_list-grid-18_p8a6i_169tu_301",
|
|
29
|
+
"list-grid-19": "awsui_list-grid-19_p8a6i_169tu_304",
|
|
30
|
+
"list-grid-20": "awsui_list-grid-20_p8a6i_169tu_307",
|
|
31
|
+
"selection-control": "awsui_selection-control_p8a6i_169tu_311",
|
|
32
|
+
"loading": "awsui_loading_p8a6i_169tu_321",
|
|
33
|
+
"empty": "awsui_empty_p8a6i_169tu_322",
|
|
34
|
+
"has-header": "awsui_has-header_p8a6i_169tu_329",
|
|
35
|
+
"refresh": "awsui_refresh_p8a6i_169tu_332",
|
|
36
|
+
"card-header": "awsui_card-header_p8a6i_169tu_404",
|
|
37
|
+
"card-header-inner": "awsui_card-header-inner_p8a6i_169tu_412",
|
|
38
|
+
"card-selectable": "awsui_card-selectable_p8a6i_169tu_416",
|
|
39
|
+
"card-selected": "awsui_card-selected_p8a6i_169tu_419",
|
|
40
|
+
"section": "awsui_section_p8a6i_169tu_427",
|
|
41
|
+
"section-header": "awsui_section-header_p8a6i_169tu_435",
|
|
42
|
+
"section-content": "awsui_section-content_p8a6i_169tu_441",
|
|
43
|
+
"footer-pagination": "awsui_footer-pagination_p8a6i_169tu_451"
|
|
44
44
|
};
|
|
45
45
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import React, { forwardRef, useRef, useState } from 'react';
|
|
4
4
|
import { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';
|
|
5
|
-
import Tooltip from '../../../internal/components/tooltip';
|
|
6
5
|
import useHiddenDescription from '../../../internal/hooks/use-hidden-description';
|
|
7
6
|
import { applyDisplayName } from '../../../internal/utils/apply-display-name';
|
|
7
|
+
import Tooltip from '../../../tooltip/internal.js';
|
|
8
8
|
import testutilStyles from '../../test-classes/styles.css.js';
|
|
9
9
|
export const GridCell = forwardRef((props, focusedDateRef) => {
|
|
10
10
|
const { disabledReason, ...rest } = props;
|
|
@@ -44,7 +44,7 @@ export const GridCell = forwardRef((props, focusedDateRef) => {
|
|
|
44
44
|
props.children,
|
|
45
45
|
isDisabledWithReason && (React.createElement(React.Fragment, null,
|
|
46
46
|
descriptionEl,
|
|
47
|
-
showTooltip && (React.createElement(Tooltip, { className: testutilStyles['disabled-reason-tooltip'],
|
|
47
|
+
showTooltip && (React.createElement(Tooltip, { className: testutilStyles['disabled-reason-tooltip'], getTrack: () => ref.current, content: disabledReason, onEscape: () => setShowTooltip(false) }))))));
|
|
48
48
|
});
|
|
49
49
|
applyDisplayName(GridCell, 'GridCell');
|
|
50
50
|
//# sourceMappingURL=grid-cell.js.map
|