@cloudscape-design/components 3.0.267 → 3.0.269

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.
Files changed (47) hide show
  1. package/cards/index.d.ts.map +1 -1
  2. package/cards/index.js +4 -2
  3. package/cards/index.js.map +1 -1
  4. package/container/internal.d.ts +2 -1
  5. package/container/internal.d.ts.map +1 -1
  6. package/container/internal.js +8 -3
  7. package/container/internal.js.map +1 -1
  8. package/container/use-sticky-header.d.ts +1 -2
  9. package/container/use-sticky-header.d.ts.map +1 -1
  10. package/container/use-sticky-header.js +6 -8
  11. package/container/use-sticky-header.js.map +1 -1
  12. package/expandable-section/expandable-section-header.d.ts.map +1 -1
  13. package/expandable-section/expandable-section-header.js +8 -13
  14. package/expandable-section/expandable-section-header.js.map +1 -1
  15. package/internal/environment.js +1 -1
  16. package/internal/manifest.json +1 -1
  17. package/package.json +1 -1
  18. package/side-navigation/interfaces.d.ts +3 -0
  19. package/side-navigation/interfaces.d.ts.map +1 -1
  20. package/side-navigation/interfaces.js.map +1 -1
  21. package/side-navigation/internal.js +1 -1
  22. package/side-navigation/internal.js.map +1 -1
  23. package/table/body-cell/styles.css.js +23 -23
  24. package/table/body-cell/styles.scoped.css +56 -55
  25. package/table/body-cell/styles.selectors.js +23 -23
  26. package/table/body-cell/td-element.d.ts +2 -1
  27. package/table/body-cell/td-element.d.ts.map +1 -1
  28. package/table/body-cell/td-element.js +7 -2
  29. package/table/body-cell/td-element.js.map +1 -1
  30. package/table/interfaces.d.ts +2 -0
  31. package/table/interfaces.d.ts.map +1 -1
  32. package/table/interfaces.js.map +1 -1
  33. package/table/internal.d.ts.map +1 -1
  34. package/table/internal.js +10 -4
  35. package/table/internal.js.map +1 -1
  36. package/table/use-sticky-columns.d.ts +73 -0
  37. package/table/use-sticky-columns.d.ts.map +1 -0
  38. package/table/use-sticky-columns.js +251 -0
  39. package/table/use-sticky-columns.js.map +1 -0
  40. package/test-utils/dom/table/index.js +1 -1
  41. package/test-utils/dom/table/index.js.map +1 -1
  42. package/test-utils/selectors/table/index.js +1 -1
  43. package/test-utils/selectors/table/index.js.map +1 -1
  44. package/test-utils/tsconfig.tsbuildinfo +1 -1
  45. package/wizard/styles.css.js +32 -32
  46. package/wizard/styles.scoped.css +66 -63
  47. package/wizard/styles.selectors.js +32 -32
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["side-navigation/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAa,MAAM,OAAO,CAAC;AACpF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,yBAAyB,MAAM,gCAAgC,CAAC;AACvE,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAE1C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAA4B,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAmBhE,MAAM,UAAU,MAAM,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAe;IACxE,YAAY,CAAC,gBAAgB,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,WAAW,CACzB,CAAC,KAAuB,EAAE,EAAE;QAC1B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;SAC/B;IACH,CAAC,EACD,CAAC,UAAU,EAAE,UAAU,CAAC,CACzB,CAAC;IAEF,OAAO,CACL;QACE,4BAAI,SAAS,EAAE,MAAM,CAAC,MAAM;YAC1B,2BACE,IAAI,EAAE,UAAU,CAAC,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AC,CAAC;QAC9B,eAAe,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,CAAC,QAAQ,EAAE;YACb,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;SAC9B;IACH,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,yBAAyB,IACxB,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,uBAAuB,CAAC,EAC/B,OAAO,KAAK,eAAe,IAAI,MAAM,CAAC,iCAAiC,CAAC,CACzE,EACD,OAAO,EAAC,YAAY,EACpB,QAAQ,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,QAAQ,EAClC,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EACR,oBAAC,IAAI,IACH,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,EAC1E,QAAQ,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,QAAQ,EAClC,UAAU,EAAE,cAAc,EAC1B,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,GACtB;QAGJ,oBAAC,mBAAmB,IAClB,OAAO,EAAC,uBAAuB,EAC/B,KAAK,EAAE,UAAU,CAAC,KAAK,EACvB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,GACtB,CACwB,CAC7B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useState, useEffect, useMemo, ReactNode } from 'react';\nimport clsx from 'clsx';\nimport { ExpandableSectionProps } from '../expandable-section/interfaces';\nimport InternalExpandableSection from '../expandable-section/internal';\nimport InternalIcon from '../icon/internal';\nimport InternalBox from '../box/internal';\nimport { SideNavigationProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { NonCancelableCustomEvent, isPlainLeftClick } from '../internal/events';\nimport { hasActiveLink } from './util';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\n\ninterface BaseItemComponentProps {\n activeHref?: string;\n fireChange: (item: SideNavigationProps.Section | SideNavigationProps.ExpandableLinkGroup, expanded: boolean) => void;\n fireFollow: (\n item:\n | SideNavigationProps.Link\n | SideNavigationProps.Header\n | SideNavigationProps.LinkGroup\n | SideNavigationProps.ExpandableLinkGroup,\n event: React.SyntheticEvent | Event\n ) => void;\n}\n\nexport interface HeaderProps extends BaseItemComponentProps {\n definition: SideNavigationProps.Header;\n}\n\nexport function Header({ definition, activeHref, fireFollow }: HeaderProps) {\n checkSafeUrl('SideNavigation', definition.href);\n const onClick = useCallback(\n (event: React.MouseEvent) => {\n if (isPlainLeftClick(event)) {\n fireFollow(definition, event);\n }\n },\n [fireFollow, definition]\n );\n\n return (\n <>\n <h2 className={styles.header}>\n <a\n href={definition.href}\n className={clsx(styles['header-link'], { [styles['header-link--has-logo']]: !!definition.logo })}\n aria-current={definition.href === activeHref ? 'page' : undefined}\n onClick={onClick}\n >\n {definition.logo && (\n <img\n className={clsx(styles['header-logo'], {\n [styles['header-logo--stretched']]: !definition.text,\n })}\n {...definition.logo}\n />\n )}\n <span className={styles['header-link-text']}>{definition.text}</span>\n </a>\n </h2>\n <Divider isPresentational={true} variant=\"header\" />\n </>\n );\n}\n\nexport interface NavigationItemsListProps extends BaseItemComponentProps {\n items: ReadonlyArray<SideNavigationProps.Item>;\n variant: 'section' | 'section-group' | 'link-group' | 'expandable-link-group' | 'root';\n}\n\ninterface Item {\n element?: ReactNode;\n listVariant?: 'section' | 'section-group' | 'link-group' | 'expandable-link-group' | 'root';\n items?: Array<Item>;\n}\n\nexport function NavigationItemsList({ items, variant, activeHref, fireChange, fireFollow }: NavigationItemsListProps) {\n const lists: Array<Item> = [];\n let currentListIndex = 0;\n lists[currentListIndex] = {\n listVariant: variant,\n items: [],\n };\n\n items.forEach((item, index) => {\n const itemid = index + 1;\n switch (item.type) {\n case 'divider': {\n const dividerIndex = lists.length;\n lists[dividerIndex] = {\n element: (\n <div data-itemid={`item-${itemid}`}>\n <Divider variant=\"default\" />\n </div>\n ),\n };\n currentListIndex = lists.length;\n lists[currentListIndex] = {\n listVariant: variant,\n items: [],\n };\n return;\n }\n case 'link': {\n lists[currentListIndex].items?.push({\n element: (\n <li key={index} data-itemid={`item-${itemid}`} className={styles['list-item']}>\n <Link definition={item} activeHref={activeHref} fireChange={fireChange} fireFollow={fireFollow} />\n </li>\n ),\n });\n return;\n }\n case 'section': {\n lists[currentListIndex].items?.push({\n element: (\n <li key={index} data-itemid={`item-${itemid}`} className={styles['list-item']}>\n <Section\n definition={item}\n activeHref={activeHref}\n variant={variant}\n fireChange={fireChange}\n fireFollow={fireFollow}\n />\n </li>\n ),\n });\n return;\n }\n case 'section-group': {\n lists[currentListIndex].items?.push({\n element: (\n <li key={index} data-itemid={`item-${itemid}`} className={styles['list-item']}>\n <SectionGroup definition={item} activeHref={activeHref} fireChange={fireChange} fireFollow={fireFollow} />\n </li>\n ),\n });\n return;\n }\n case 'link-group': {\n lists[currentListIndex].items?.push({\n element: (\n <li key={index} data-itemid={`item-${itemid}`} className={styles['list-item']}>\n <LinkGroup definition={item} activeHref={activeHref} fireChange={fireChange} fireFollow={fireFollow} />\n </li>\n ),\n });\n return;\n }\n case 'expandable-link-group': {\n lists[currentListIndex].items?.push({\n element: (\n <li key={index} data-itemid={`item-${itemid}`} className={styles['list-item']}>\n <ExpandableLinkGroup\n definition={item}\n activeHref={activeHref}\n fireChange={fireChange}\n fireFollow={fireFollow}\n variant={variant}\n />\n </li>\n ),\n });\n return;\n }\n }\n });\n\n const lastListIndex = lists.length - 1;\n\n return (\n <>\n {lists.map((list, index) => {\n if (!list.items || list.items.length === 0) {\n return (\n <div\n key={`hr-${index}`}\n className={clsx(styles.list, styles[`list-variant-${variant}`], {\n [styles['list-variant-root--last']]: list.listVariant === 'root' && index === lastListIndex,\n })}\n >\n {list.element}\n </div>\n );\n } else {\n return (\n <ul\n key={`list-${index}`}\n className={clsx(styles.list, styles[`list-variant-${list.listVariant}`], {\n [styles['list-variant-root--last']]: list.listVariant === 'root' && index === lastListIndex,\n })}\n >\n {list.items.map(item => item.element)}\n </ul>\n );\n }\n })}\n </>\n );\n}\n\ninterface DividerProps {\n variant: 'default' | 'header';\n isPresentational?: boolean;\n}\n\nfunction Divider({ variant = 'default', isPresentational = false }: DividerProps) {\n return (\n <hr\n className={clsx(styles.divider, styles[`divider-${variant}`])}\n role={isPresentational ? 'presentation' : undefined}\n />\n );\n}\n\ninterface LinkProps extends BaseItemComponentProps {\n definition: SideNavigationProps.Link;\n expanded?: boolean;\n}\n\nfunction Link({ definition, expanded, activeHref, fireFollow }: LinkProps) {\n checkSafeUrl('SideNavigation', definition.href);\n const isActive = definition.href === activeHref;\n\n const onClick = useCallback(\n (event: React.MouseEvent) => {\n // Prevent the click event from toggling outer expandable sections.\n event.stopPropagation();\n\n if (isPlainLeftClick(event)) {\n fireFollow(definition, event);\n }\n },\n [fireFollow, definition]\n );\n\n return (\n <>\n <a\n href={definition.href}\n className={clsx(styles.link, { [styles['link-active']]: isActive })}\n target={definition.external ? '_blank' : undefined}\n rel={definition.external ? 'noopener noreferrer' : undefined}\n aria-expanded={expanded}\n aria-current={definition.href === activeHref ? 'page' : undefined}\n onClick={onClick}\n >\n {definition.text}\n {definition.external && (\n <span\n aria-label={definition.externalIconAriaLabel}\n role={definition.externalIconAriaLabel ? 'img' : undefined}\n >\n <InternalIcon name=\"external\" className={styles['external-icon']} />\n </span>\n )}\n </a>\n {definition.info && <span className={styles.info}>{definition.info}</span>}\n </>\n );\n}\n\ninterface SectionProps extends BaseItemComponentProps {\n definition: SideNavigationProps.Section;\n variant: 'section' | 'section-group' | 'link-group' | 'expandable-link-group' | 'root';\n}\n\nfunction Section({ definition, activeHref, fireFollow, fireChange, variant }: SectionProps) {\n const [expanded, setExpanded] = useState<boolean>(definition.defaultExpanded ?? true);\n\n const onExpandedChange = useCallback(\n (e: NonCancelableCustomEvent<ExpandableSectionProps.ChangeDetail>) => {\n fireChange(definition, e.detail.expanded);\n setExpanded(e.detail.expanded);\n },\n [definition, fireChange]\n );\n\n useEffect(() => {\n setExpanded(definition.defaultExpanded ?? true);\n }, [definition]);\n\n return (\n <InternalExpandableSection\n variant=\"footer\"\n expanded={expanded}\n onChange={onExpandedChange}\n className={clsx(styles.section, variant === 'section-group' && styles['section--no-ident'])}\n headerText={definition.text}\n >\n <NavigationItemsList\n variant=\"section\"\n items={definition.items}\n fireFollow={fireFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n />\n </InternalExpandableSection>\n );\n}\n\ninterface SectionGroupProps extends BaseItemComponentProps {\n definition: SideNavigationProps.SectionGroup;\n}\n\nfunction SectionGroup({ definition, activeHref, fireFollow, fireChange }: SectionGroupProps) {\n return (\n <div className={styles['section-group']}>\n <InternalBox className={styles['section-group-title']} variant=\"h3\">\n {definition.title}\n </InternalBox>\n <NavigationItemsList\n variant=\"section-group\"\n items={definition.items}\n fireFollow={fireFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n />\n </div>\n );\n}\n\ninterface LinkGroupProps extends BaseItemComponentProps {\n definition: SideNavigationProps.LinkGroup;\n}\n\nfunction LinkGroup({ definition, activeHref, fireFollow, fireChange }: LinkGroupProps) {\n checkSafeUrl('SideNavigation', definition.href);\n\n return (\n <>\n <Link\n definition={{ type: 'link', href: definition.href, text: definition.text }}\n fireFollow={(_, event) => fireFollow(definition, event)}\n fireChange={fireChange}\n activeHref={activeHref}\n />\n <NavigationItemsList\n variant=\"link-group\"\n items={definition.items}\n fireFollow={fireFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n />\n </>\n );\n}\n\ninterface ExpandableLinkGroupProps extends BaseItemComponentProps {\n definition: SideNavigationProps.ExpandableLinkGroup;\n variant: 'section' | 'section-group' | 'link-group' | 'expandable-link-group' | 'root';\n}\n\nfunction ExpandableLinkGroup({ definition, fireFollow, fireChange, activeHref, variant }: ExpandableLinkGroupProps) {\n // Check whether the definition contains an active link and memoize it to avoid\n // rechecking every time.\n const containsActiveLink = useMemo(() => {\n return activeHref ? hasActiveLink(definition.items, activeHref) : false;\n }, [activeHref, definition.items]);\n\n const [expanded, setExpanded] = useState<boolean>(() => {\n return definition.defaultExpanded ?? (definition.href === activeHref || containsActiveLink);\n });\n\n const [userExpanded, setUserExpanded] = useState<boolean | undefined>();\n\n // Reset user expansion status when the items property is updated.\n useEffect(() => setUserExpanded(undefined), [definition]);\n\n // By default, the expandable section is open when there's an active link inside.\n useEffect(() => {\n setExpanded(definition.href === activeHref || containsActiveLink);\n }, [definition.href, containsActiveLink, activeHref]);\n\n // If the definition object itself is updated, reset the expansion state to default.\n useEffect(() => {\n if (definition.defaultExpanded !== undefined) {\n setExpanded(definition.defaultExpanded);\n }\n }, [definition]);\n\n const onExpandedChange = useCallback(\n (e: NonCancelableCustomEvent<ExpandableSectionProps.ChangeDetail>) => {\n fireChange(definition, e.detail.expanded);\n setUserExpanded(e.detail.expanded);\n },\n [definition, fireChange]\n );\n\n const onHeaderFollow: LinkProps['fireFollow'] = (_, event) => {\n fireFollow(definition, event);\n setUserExpanded(true);\n if (!expanded) {\n fireChange(definition, true);\n }\n };\n\n return (\n <InternalExpandableSection\n className={clsx(\n styles['expandable-link-group'],\n variant === 'section-group' && styles['expandable-link-group--no-ident']\n )}\n variant=\"navigation\"\n expanded={userExpanded ?? expanded}\n onChange={onExpandedChange}\n headerText={\n <Link\n definition={{ type: 'link', href: definition.href, text: definition.text }}\n expanded={userExpanded ?? expanded}\n fireFollow={onHeaderFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n />\n }\n >\n <NavigationItemsList\n variant=\"expandable-link-group\"\n items={definition.items}\n fireFollow={fireFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n />\n </InternalExpandableSection>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["side-navigation/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;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CAAiC,CAAC,CACzE,EACD,OAAO,EAAC,YAAY,EACpB,QAAQ,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,QAAQ,EAClC,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EACR,oBAAC,IAAI,IACH,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,EAC1E,QAAQ,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,QAAQ,EAClC,UAAU,EAAE,cAAc,EAC1B,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,GACtB;QAGJ,oBAAC,mBAAmB,IAClB,OAAO,EAAC,uBAAuB,EAC/B,KAAK,EAAE,UAAU,CAAC,KAAK,EACvB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,GACtB,CACwB,CAC7B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useState, useEffect, useMemo, ReactNode } from 'react';\nimport clsx from 'clsx';\nimport { ExpandableSectionProps } from '../expandable-section/interfaces';\nimport InternalExpandableSection from '../expandable-section/internal';\nimport InternalIcon from '../icon/internal';\nimport InternalBox from '../box/internal';\nimport { SideNavigationProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { NonCancelableCustomEvent, isPlainLeftClick } from '../internal/events';\nimport { hasActiveLink } from './util';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\n\ninterface BaseItemComponentProps {\n activeHref?: string;\n fireChange: (item: SideNavigationProps.Section | SideNavigationProps.ExpandableLinkGroup, expanded: boolean) => void;\n fireFollow: (\n item:\n | SideNavigationProps.Link\n | SideNavigationProps.Header\n | SideNavigationProps.LinkGroup\n | SideNavigationProps.ExpandableLinkGroup,\n event: React.SyntheticEvent | Event\n ) => void;\n}\n\nexport interface HeaderProps extends BaseItemComponentProps {\n definition: SideNavigationProps.Header;\n}\n\nexport function Header({ definition, activeHref, fireFollow }: HeaderProps) {\n checkSafeUrl('SideNavigation', definition.href);\n const onClick = useCallback(\n (event: React.MouseEvent) => {\n if (isPlainLeftClick(event)) {\n fireFollow(definition, event);\n }\n },\n [fireFollow, definition]\n );\n\n return (\n <>\n <h2 className={styles.header}>\n <a\n href={definition.href}\n className={clsx(styles['header-link'], { [styles['header-link--has-logo']]: !!definition.logo })}\n aria-current={definition.href === activeHref ? 'page' : undefined}\n onClick={onClick}\n >\n {definition.logo && (\n <img\n className={clsx(styles['header-logo'], {\n [styles['header-logo--stretched']]: !definition.text,\n })}\n {...definition.logo}\n />\n )}\n <span className={styles['header-link-text']}>{definition.text}</span>\n </a>\n </h2>\n <Divider isPresentational={true} variant=\"header\" />\n </>\n );\n}\n\nexport interface NavigationItemsListProps extends BaseItemComponentProps {\n items: ReadonlyArray<SideNavigationProps.Item>;\n variant: 'section' | 'section-group' | 'link-group' | 'expandable-link-group' | 'root';\n}\n\ninterface Item {\n element?: ReactNode;\n listVariant?: 'section' | 'section-group' | 'link-group' | 'expandable-link-group' | 'root';\n items?: Array<Item>;\n}\n\nexport function NavigationItemsList({ items, variant, activeHref, fireChange, fireFollow }: NavigationItemsListProps) {\n const lists: Array<Item> = [];\n let currentListIndex = 0;\n lists[currentListIndex] = {\n listVariant: variant,\n items: [],\n };\n\n items.forEach((item, index) => {\n const itemid = index + 1;\n switch (item.type) {\n case 'divider': {\n const dividerIndex = lists.length;\n lists[dividerIndex] = {\n element: (\n <div data-itemid={`item-${itemid}`}>\n <Divider variant=\"default\" />\n </div>\n ),\n };\n currentListIndex = lists.length;\n lists[currentListIndex] = {\n listVariant: variant,\n items: [],\n };\n return;\n }\n case 'link': {\n lists[currentListIndex].items?.push({\n element: (\n <li key={index} data-itemid={`item-${itemid}`} className={styles['list-item']}>\n <Link definition={item} activeHref={activeHref} fireChange={fireChange} fireFollow={fireFollow} />\n </li>\n ),\n });\n return;\n }\n case 'section': {\n lists[currentListIndex].items?.push({\n element: (\n <li key={index} data-itemid={`item-${itemid}`} className={styles['list-item']}>\n <Section\n definition={item}\n activeHref={activeHref}\n variant={variant}\n fireChange={fireChange}\n fireFollow={fireFollow}\n />\n </li>\n ),\n });\n return;\n }\n case 'section-group': {\n lists[currentListIndex].items?.push({\n element: (\n <li key={index} data-itemid={`item-${itemid}`} className={styles['list-item']}>\n <SectionGroup definition={item} activeHref={activeHref} fireChange={fireChange} fireFollow={fireFollow} />\n </li>\n ),\n });\n return;\n }\n case 'link-group': {\n lists[currentListIndex].items?.push({\n element: (\n <li key={index} data-itemid={`item-${itemid}`} className={styles['list-item']}>\n <LinkGroup definition={item} activeHref={activeHref} fireChange={fireChange} fireFollow={fireFollow} />\n </li>\n ),\n });\n return;\n }\n case 'expandable-link-group': {\n lists[currentListIndex].items?.push({\n element: (\n <li key={index} data-itemid={`item-${itemid}`} className={styles['list-item']}>\n <ExpandableLinkGroup\n definition={item}\n activeHref={activeHref}\n fireChange={fireChange}\n fireFollow={fireFollow}\n variant={variant}\n />\n </li>\n ),\n });\n return;\n }\n }\n });\n\n const lastListIndex = lists.length - 1;\n\n return (\n <>\n {lists.map((list, index) => {\n if (!list.items || list.items.length === 0) {\n return (\n <div\n key={`hr-${index}`}\n className={clsx(styles.list, styles[`list-variant-${variant}`], {\n [styles['list-variant-root--last']]: list.listVariant === 'root' && index === lastListIndex,\n })}\n >\n {list.element}\n </div>\n );\n } else {\n return (\n <ul\n key={`list-${index}`}\n className={clsx(styles.list, styles[`list-variant-${list.listVariant}`], {\n [styles['list-variant-root--last']]: list.listVariant === 'root' && index === lastListIndex,\n })}\n >\n {list.items.map(item => item.element)}\n </ul>\n );\n }\n })}\n </>\n );\n}\n\ninterface DividerProps {\n variant: 'default' | 'header';\n isPresentational?: boolean;\n}\n\nfunction Divider({ variant = 'default', isPresentational = false }: DividerProps) {\n return (\n <hr\n className={clsx(styles.divider, styles[`divider-${variant}`])}\n role={isPresentational ? 'presentation' : undefined}\n />\n );\n}\n\ninterface LinkProps extends BaseItemComponentProps {\n definition: SideNavigationProps.Link;\n expanded?: boolean;\n}\n\nfunction Link({ definition, expanded, activeHref, fireFollow }: LinkProps) {\n checkSafeUrl('SideNavigation', definition.href);\n const isActive = definition.href === activeHref;\n\n const onClick = useCallback(\n (event: React.MouseEvent) => {\n // Prevent the click event from toggling outer expandable sections.\n event.stopPropagation();\n\n if (isPlainLeftClick(event)) {\n fireFollow(definition, event);\n }\n },\n [fireFollow, definition]\n );\n\n return (\n <>\n <a\n href={definition.href}\n className={clsx(styles.link, { [styles['link-active']]: isActive })}\n target={definition.external ? '_blank' : undefined}\n rel={definition.external ? 'noopener noreferrer' : undefined}\n aria-expanded={expanded}\n aria-current={definition.href === activeHref ? 'page' : undefined}\n onClick={onClick}\n >\n {definition.text}\n {definition.external && (\n <span\n aria-label={definition.externalIconAriaLabel}\n role={definition.externalIconAriaLabel ? 'img' : undefined}\n >\n <InternalIcon name=\"external\" className={styles['external-icon']} />\n </span>\n )}\n </a>\n {definition.info && <span className={styles.info}>{definition.info}</span>}\n </>\n );\n}\n\ninterface SectionProps extends BaseItemComponentProps {\n definition: SideNavigationProps.Section;\n variant: 'section' | 'section-group' | 'link-group' | 'expandable-link-group' | 'root';\n}\n\nfunction Section({ definition, activeHref, fireFollow, fireChange, variant }: SectionProps) {\n const [expanded, setExpanded] = useState<boolean>(definition.defaultExpanded ?? true);\n\n const onExpandedChange = useCallback(\n (e: NonCancelableCustomEvent<ExpandableSectionProps.ChangeDetail>) => {\n fireChange(definition, e.detail.expanded);\n setExpanded(e.detail.expanded);\n },\n [definition, fireChange]\n );\n\n useEffect(() => {\n setExpanded(definition.defaultExpanded ?? true);\n }, [definition]);\n\n return (\n <InternalExpandableSection\n variant=\"footer\"\n expanded={expanded}\n onChange={onExpandedChange}\n className={clsx(styles.section, variant === 'section-group' && styles['section--no-ident'])}\n headerText={definition.text}\n >\n <NavigationItemsList\n variant=\"section\"\n items={definition.items}\n fireFollow={fireFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n />\n </InternalExpandableSection>\n );\n}\n\ninterface SectionGroupProps extends BaseItemComponentProps {\n definition: SideNavigationProps.SectionGroup;\n}\n\nfunction SectionGroup({ definition, activeHref, fireFollow, fireChange }: SectionGroupProps) {\n return (\n <div className={styles['section-group']}>\n <InternalBox className={styles['section-group-title']} variant=\"h3\">\n {definition.title}\n </InternalBox>\n <NavigationItemsList\n variant=\"section-group\"\n items={definition.items}\n fireFollow={fireFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n />\n </div>\n );\n}\n\ninterface LinkGroupProps extends BaseItemComponentProps {\n definition: SideNavigationProps.LinkGroup;\n}\n\nfunction LinkGroup({ definition, activeHref, fireFollow, fireChange }: LinkGroupProps) {\n checkSafeUrl('SideNavigation', definition.href);\n\n return (\n <>\n <Link\n definition={{ type: 'link', href: definition.href, text: definition.text, info: definition.info }}\n fireFollow={(_, event) => fireFollow(definition, event)}\n fireChange={fireChange}\n activeHref={activeHref}\n />\n <NavigationItemsList\n variant=\"link-group\"\n items={definition.items}\n fireFollow={fireFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n />\n </>\n );\n}\n\ninterface ExpandableLinkGroupProps extends BaseItemComponentProps {\n definition: SideNavigationProps.ExpandableLinkGroup;\n variant: 'section' | 'section-group' | 'link-group' | 'expandable-link-group' | 'root';\n}\n\nfunction ExpandableLinkGroup({ definition, fireFollow, fireChange, activeHref, variant }: ExpandableLinkGroupProps) {\n // Check whether the definition contains an active link and memoize it to avoid\n // rechecking every time.\n const containsActiveLink = useMemo(() => {\n return activeHref ? hasActiveLink(definition.items, activeHref) : false;\n }, [activeHref, definition.items]);\n\n const [expanded, setExpanded] = useState<boolean>(() => {\n return definition.defaultExpanded ?? (definition.href === activeHref || containsActiveLink);\n });\n\n const [userExpanded, setUserExpanded] = useState<boolean | undefined>();\n\n // Reset user expansion status when the items property is updated.\n useEffect(() => setUserExpanded(undefined), [definition]);\n\n // By default, the expandable section is open when there's an active link inside.\n useEffect(() => {\n setExpanded(definition.href === activeHref || containsActiveLink);\n }, [definition.href, containsActiveLink, activeHref]);\n\n // If the definition object itself is updated, reset the expansion state to default.\n useEffect(() => {\n if (definition.defaultExpanded !== undefined) {\n setExpanded(definition.defaultExpanded);\n }\n }, [definition]);\n\n const onExpandedChange = useCallback(\n (e: NonCancelableCustomEvent<ExpandableSectionProps.ChangeDetail>) => {\n fireChange(definition, e.detail.expanded);\n setUserExpanded(e.detail.expanded);\n },\n [definition, fireChange]\n );\n\n const onHeaderFollow: LinkProps['fireFollow'] = (_, event) => {\n fireFollow(definition, event);\n setUserExpanded(true);\n if (!expanded) {\n fireChange(definition, true);\n }\n };\n\n return (\n <InternalExpandableSection\n className={clsx(\n styles['expandable-link-group'],\n variant === 'section-group' && styles['expandable-link-group--no-ident']\n )}\n variant=\"navigation\"\n expanded={userExpanded ?? expanded}\n onChange={onExpandedChange}\n headerText={\n <Link\n definition={{ type: 'link', href: definition.href, text: definition.text }}\n expanded={userExpanded ?? expanded}\n fireFollow={onHeaderFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n />\n }\n >\n <NavigationItemsList\n variant=\"expandable-link-group\"\n items={definition.items}\n fireFollow={fireFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n />\n </InternalExpandableSection>\n );\n}\n"]}
@@ -1,28 +1,28 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "body-cell": "awsui_body-cell_c6tup_3yrbc_93",
5
- "body-cell-wrap": "awsui_body-cell-wrap_c6tup_3yrbc_102",
6
- "is-visual-refresh": "awsui_is-visual-refresh_c6tup_3yrbc_114",
7
- "has-striped-rows": "awsui_has-striped-rows_c6tup_3yrbc_126",
8
- "body-cell-edit-active": "awsui_body-cell-edit-active_c6tup_3yrbc_129",
9
- "body-cell-editable": "awsui_body-cell-editable_c6tup_3yrbc_129",
10
- "has-selection": "awsui_has-selection_c6tup_3yrbc_135",
11
- "body-cell-first-row": "awsui_body-cell-first-row_c6tup_3yrbc_141",
12
- "body-cell-last-row": "awsui_body-cell-last-row_c6tup_3yrbc_144",
13
- "body-cell-selected": "awsui_body-cell-selected_c6tup_3yrbc_144",
14
- "has-footer": "awsui_has-footer_c6tup_3yrbc_144",
15
- "body-cell-shaded": "awsui_body-cell-shaded_c6tup_3yrbc_154",
16
- "body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_3yrbc_176",
17
- "body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_3yrbc_180",
18
- "body-cell-success": "awsui_body-cell-success_c6tup_3yrbc_204",
19
- "body-cell-editor": "awsui_body-cell-editor_c6tup_3yrbc_204",
20
- "body-cell-success-form": "awsui_body-cell-success-form_c6tup_3yrbc_226",
21
- "body-cell-editor-form": "awsui_body-cell-editor-form_c6tup_3yrbc_226",
22
- "body-cell-success-row": "awsui_body-cell-success-row_c6tup_3yrbc_235",
23
- "body-cell-editor-row": "awsui_body-cell-editor-row_c6tup_3yrbc_235",
24
- "body-cell-success-controls": "awsui_body-cell-success-controls_c6tup_3yrbc_245",
25
- "body-cell-editor-controls": "awsui_body-cell-editor-controls_c6tup_3yrbc_245",
26
- "body-cell-has-success": "awsui_body-cell-has-success_c6tup_3yrbc_258"
4
+ "body-cell": "awsui_body-cell_c6tup_1p6xu_93",
5
+ "body-cell-wrap": "awsui_body-cell-wrap_c6tup_1p6xu_103",
6
+ "is-visual-refresh": "awsui_is-visual-refresh_c6tup_1p6xu_115",
7
+ "has-striped-rows": "awsui_has-striped-rows_c6tup_1p6xu_127",
8
+ "body-cell-edit-active": "awsui_body-cell-edit-active_c6tup_1p6xu_130",
9
+ "body-cell-editable": "awsui_body-cell-editable_c6tup_1p6xu_130",
10
+ "has-selection": "awsui_has-selection_c6tup_1p6xu_136",
11
+ "body-cell-first-row": "awsui_body-cell-first-row_c6tup_1p6xu_142",
12
+ "body-cell-last-row": "awsui_body-cell-last-row_c6tup_1p6xu_145",
13
+ "body-cell-selected": "awsui_body-cell-selected_c6tup_1p6xu_145",
14
+ "has-footer": "awsui_has-footer_c6tup_1p6xu_145",
15
+ "body-cell-shaded": "awsui_body-cell-shaded_c6tup_1p6xu_155",
16
+ "body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_1p6xu_177",
17
+ "body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_1p6xu_181",
18
+ "body-cell-success": "awsui_body-cell-success_c6tup_1p6xu_205",
19
+ "body-cell-editor": "awsui_body-cell-editor_c6tup_1p6xu_205",
20
+ "body-cell-success-form": "awsui_body-cell-success-form_c6tup_1p6xu_227",
21
+ "body-cell-editor-form": "awsui_body-cell-editor-form_c6tup_1p6xu_227",
22
+ "body-cell-success-row": "awsui_body-cell-success-row_c6tup_1p6xu_236",
23
+ "body-cell-editor-row": "awsui_body-cell-editor-row_c6tup_1p6xu_236",
24
+ "body-cell-success-controls": "awsui_body-cell-success-controls_c6tup_1p6xu_246",
25
+ "body-cell-editor-controls": "awsui_body-cell-editor-controls_c6tup_1p6xu_246",
26
+ "body-cell-has-success": "awsui_body-cell-has-success_c6tup_1p6xu_259"
27
27
  };
28
28
 
@@ -90,7 +90,7 @@ 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_body-cell_c6tup_3yrbc_93:not(#\9) {
93
+ .awsui_body-cell_c6tup_1p6xu_93:not(#\9) {
94
94
  box-sizing: border-box;
95
95
  padding: var(--space-scaled-xs-6859qs, 8px) var(--space-scaled-l-t03y3z, 20px) calc(
96
96
  var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
@@ -98,20 +98,21 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
98
98
  border-top: var(--border-divider-list-width-hacikr, 1px) solid transparent;
99
99
  word-wrap: break-word;
100
100
  border-bottom: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
101
+ font-weight: inherit;
101
102
  }
102
- .awsui_body-cell_c6tup_3yrbc_93:not(#\9):not(.awsui_body-cell-wrap_c6tup_3yrbc_102) {
103
+ .awsui_body-cell_c6tup_1p6xu_93:not(#\9):not(.awsui_body-cell-wrap_c6tup_1p6xu_103) {
103
104
  white-space: nowrap;
104
105
  overflow: hidden;
105
106
  text-overflow: ellipsis;
106
107
  }
107
- .awsui_body-cell_c6tup_3yrbc_93:not(#\9):first-child {
108
+ .awsui_body-cell_c6tup_1p6xu_93:not(#\9):first-child {
108
109
  border-left: var(--border-item-width-qbbbsa, 2px) solid transparent;
109
110
  }
110
- .awsui_body-cell_c6tup_3yrbc_93:not(#\9):last-child {
111
+ .awsui_body-cell_c6tup_1p6xu_93:not(#\9):last-child {
111
112
  border-right: var(--border-item-width-qbbbsa, 2px) solid transparent;
112
113
  padding-right: calc(var(--space-l-4vl6xu, 20px) - var(--border-item-width-qbbbsa, 2px));
113
114
  }
114
- .awsui_body-cell_c6tup_3yrbc_93.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):first-child {
115
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_is-visual-refresh_c6tup_1p6xu_115:not(#\9):first-child {
115
116
  /*
116
117
  Striped rows requires additional left padding because the
117
118
  shaded background makes the child content appear too close
@@ -123,85 +124,85 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
123
124
  that the placeholder border would consume.
124
125
  */
125
126
  }
126
- .awsui_body-cell_c6tup_3yrbc_93.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_3yrbc_126) {
127
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_is-visual-refresh_c6tup_1p6xu_115:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_1p6xu_127) {
127
128
  padding-left: var(--space-xxxs-k2w98v, 2px);
128
129
  }
129
- .awsui_body-cell_c6tup_3yrbc_93.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_3yrbc_126):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129).awsui_body-cell-editable_c6tup_3yrbc_129:hover {
130
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_is-visual-refresh_c6tup_1p6xu_115:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_1p6xu_127):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130).awsui_body-cell-editable_c6tup_1p6xu_130:hover {
130
131
  padding-left: calc(var(--space-xxxs-k2w98v, 2px) + var(--border-divider-list-width-hacikr, 1px));
131
132
  }
132
- .awsui_body-cell_c6tup_3yrbc_93.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):first-child:first-child.awsui_has-striped-rows_c6tup_3yrbc_126 {
133
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_is-visual-refresh_c6tup_1p6xu_115:not(#\9):first-child:first-child.awsui_has-striped-rows_c6tup_1p6xu_127 {
133
134
  padding-left: var(--space-xxs-ynfts5, 4px);
134
135
  }
135
- .awsui_body-cell_c6tup_3yrbc_93.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):first-child:not(.awsui_has-selection_c6tup_3yrbc_135):not(.awsui_body-cell-editable_c6tup_3yrbc_129) {
136
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_is-visual-refresh_c6tup_1p6xu_115:not(#\9):first-child:not(.awsui_has-selection_c6tup_1p6xu_136):not(.awsui_body-cell-editable_c6tup_1p6xu_130) {
136
137
  border-left: none;
137
138
  }
138
- .awsui_body-cell_c6tup_3yrbc_93:not(#\9):first-child:not(.awsui_is-visual-refresh_c6tup_3yrbc_114) {
139
+ .awsui_body-cell_c6tup_1p6xu_93:not(#\9):first-child:not(.awsui_is-visual-refresh_c6tup_1p6xu_115) {
139
140
  padding-left: calc(var(--space-l-4vl6xu, 20px) - var(--border-item-width-qbbbsa, 2px));
140
141
  }
141
- .awsui_body-cell-first-row_c6tup_3yrbc_141:not(#\9) {
142
+ .awsui_body-cell-first-row_c6tup_1p6xu_142:not(#\9) {
142
143
  border-top: var(--border-item-width-qbbbsa, 2px) solid transparent;
143
144
  }
144
- .awsui_body-cell-last-row_c6tup_3yrbc_144:not(#\9):not(.awsui_body-cell-selected_c6tup_3yrbc_144):not(.awsui_has-footer_c6tup_3yrbc_144) {
145
+ .awsui_body-cell-last-row_c6tup_1p6xu_145:not(#\9):not(.awsui_body-cell-selected_c6tup_1p6xu_145):not(.awsui_has-footer_c6tup_1p6xu_145) {
145
146
  border-bottom: var(--border-item-width-qbbbsa, 2px) solid transparent;
146
147
  }
147
- .awsui_body-cell-last-row_c6tup_3yrbc_144:not(#\9):not(.awsui_body-cell-selected_c6tup_3yrbc_144).awsui_has-footer_c6tup_3yrbc_144 {
148
+ .awsui_body-cell-last-row_c6tup_1p6xu_145:not(#\9):not(.awsui_body-cell-selected_c6tup_1p6xu_145).awsui_has-footer_c6tup_1p6xu_145 {
148
149
  /*
149
150
  Add a bottom border to the body cells of the last row as a separator between the
150
151
  table and the footer
151
152
  */
152
153
  border-bottom: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
153
154
  }
154
- .awsui_body-cell-shaded_c6tup_3yrbc_154:not(#\9) {
155
+ .awsui_body-cell-shaded_c6tup_1p6xu_155:not(#\9) {
155
156
  background: var(--color-background-cell-shaded-26ubfj, #f8f8f8);
156
157
  }
157
- .awsui_body-cell-selected_c6tup_3yrbc_144:not(#\9) {
158
+ .awsui_body-cell-selected_c6tup_1p6xu_145:not(#\9) {
158
159
  background-color: var(--color-background-item-selected-ebt4bi, #f2f8fd);
159
160
  border-top: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
160
161
  border-bottom: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
161
162
  padding-bottom: var(--space-scaled-xs-6859qs, 8px);
162
163
  }
163
- .awsui_body-cell-selected_c6tup_3yrbc_144:not(#\9):first-child {
164
+ .awsui_body-cell-selected_c6tup_1p6xu_145:not(#\9):first-child {
164
165
  border-left: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
165
166
  border-radius: var(--border-radius-item-u2ibpi, 8px) 0 0 var(--border-radius-item-u2ibpi, 8px);
166
167
  }
167
- .awsui_body-cell-selected_c6tup_3yrbc_144:not(#\9):last-child {
168
+ .awsui_body-cell-selected_c6tup_1p6xu_145:not(#\9):last-child {
168
169
  border-right: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
169
170
  border-radius: 0 var(--border-radius-item-u2ibpi, 8px) var(--border-radius-item-u2ibpi, 8px) 0;
170
171
  }
171
- .awsui_body-cell-selected_c6tup_3yrbc_144:not(#\9):not(:first-child) {
172
+ .awsui_body-cell-selected_c6tup_1p6xu_145:not(#\9):not(:first-child) {
172
173
  padding-top: calc(
173
174
  var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
174
175
  );
175
176
  }
176
- .awsui_body-cell_c6tup_3yrbc_93:not(#\9):not(.awsui_body-cell-selected_c6tup_3yrbc_144).awsui_body-cell-next-selected_c6tup_3yrbc_176 {
177
+ .awsui_body-cell_c6tup_1p6xu_93:not(#\9):not(.awsui_body-cell-selected_c6tup_1p6xu_145).awsui_body-cell-next-selected_c6tup_1p6xu_177 {
177
178
  border-bottom: 0;
178
179
  padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) + var(--border-divider-list-width-hacikr, 1px));
179
180
  }
180
- .awsui_body-cell-selected_c6tup_3yrbc_144.awsui_body-cell-prev-selected_c6tup_3yrbc_180:not(#\9) {
181
+ .awsui_body-cell-selected_c6tup_1p6xu_145.awsui_body-cell-prev-selected_c6tup_1p6xu_181:not(#\9) {
181
182
  padding-top: calc(
182
183
  var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
183
184
  );
184
185
  border-top: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-item-placeholder-jgzhnb, #0972d3);
185
186
  }
186
- .awsui_body-cell-selected_c6tup_3yrbc_144.awsui_body-cell-next-selected_c6tup_3yrbc_176:not(#\9) {
187
+ .awsui_body-cell-selected_c6tup_1p6xu_145.awsui_body-cell-next-selected_c6tup_1p6xu_177:not(#\9) {
187
188
  border-bottom-width: var(--border-divider-list-width-hacikr, 1px);
188
189
  }
189
- .awsui_body-cell-selected_c6tup_3yrbc_144.awsui_body-cell-next-selected_c6tup_3yrbc_176:not(#\9):first-child {
190
+ .awsui_body-cell-selected_c6tup_1p6xu_145.awsui_body-cell-next-selected_c6tup_1p6xu_177:not(#\9):first-child {
190
191
  border-bottom-left-radius: 0;
191
192
  }
192
- .awsui_body-cell-selected_c6tup_3yrbc_144.awsui_body-cell-next-selected_c6tup_3yrbc_176:not(#\9):last-child {
193
+ .awsui_body-cell-selected_c6tup_1p6xu_145.awsui_body-cell-next-selected_c6tup_1p6xu_177:not(#\9):last-child {
193
194
  border-bottom-right-radius: 0;
194
195
  }
195
- .awsui_body-cell-selected_c6tup_3yrbc_144.awsui_body-cell-prev-selected_c6tup_3yrbc_180:not(#\9):first-child {
196
+ .awsui_body-cell-selected_c6tup_1p6xu_145.awsui_body-cell-prev-selected_c6tup_1p6xu_181:not(#\9):first-child {
196
197
  border-top-left-radius: 0;
197
198
  }
198
- .awsui_body-cell-selected_c6tup_3yrbc_144.awsui_body-cell-prev-selected_c6tup_3yrbc_180:not(#\9):last-child {
199
+ .awsui_body-cell-selected_c6tup_1p6xu_145.awsui_body-cell-prev-selected_c6tup_1p6xu_181:not(#\9):last-child {
199
200
  border-top-right-radius: 0;
200
201
  }
201
- .awsui_body-cell-selected_c6tup_3yrbc_144:not(#\9):not(.awsui_body-cell-prev-selected_c6tup_3yrbc_180) {
202
+ .awsui_body-cell-selected_c6tup_1p6xu_145:not(#\9):not(.awsui_body-cell-prev-selected_c6tup_1p6xu_181) {
202
203
  padding-top: var(--space-scaled-xs-6859qs, 8px);
203
204
  }
204
- .awsui_body-cell-success_c6tup_3yrbc_204:not(#\9), .awsui_body-cell-editor_c6tup_3yrbc_204:not(#\9) {
205
+ .awsui_body-cell-success_c6tup_1p6xu_205:not(#\9), .awsui_body-cell-editor_c6tup_1p6xu_205:not(#\9) {
205
206
  top: 0;
206
207
  right: 0;
207
208
  bottom: 0;
@@ -217,62 +218,62 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
217
218
  padding-right: calc(var(--space-xs-rsr2qu, 8px) + var(--space-xxs-ynfts5, 4px));
218
219
  color: var(--color-text-button-normal-default-u8647m, #0972d3);
219
220
  }
220
- .awsui_body-cell-success_c6tup_3yrbc_204:not(#\9):hover, .awsui_body-cell-editor_c6tup_3yrbc_204:not(#\9):hover {
221
+ .awsui_body-cell-success_c6tup_1p6xu_205:not(#\9):hover, .awsui_body-cell-editor_c6tup_1p6xu_205:not(#\9):hover {
221
222
  color: var(--color-text-button-normal-hover-kxmvcc, #033160);
222
223
  }
223
- .awsui_body-cell-success_c6tup_3yrbc_204:not(#\9):active, .awsui_body-cell-editor_c6tup_3yrbc_204:not(#\9):active {
224
+ .awsui_body-cell-success_c6tup_1p6xu_205:not(#\9):active, .awsui_body-cell-editor_c6tup_1p6xu_205:not(#\9):active {
224
225
  color: var(--color-text-button-normal-active-6obrzh, #033160);
225
226
  }
226
- .awsui_body-cell-success-form_c6tup_3yrbc_226:not(#\9), .awsui_body-cell-editor-form_c6tup_3yrbc_226:not(#\9) {
227
+ .awsui_body-cell-success-form_c6tup_1p6xu_227:not(#\9), .awsui_body-cell-editor-form_c6tup_1p6xu_227:not(#\9) {
227
228
  margin: calc(-1 * var(--space-xs-rsr2qu, 8px)) calc(-1.5 * var(--space-xs-rsr2qu, 8px));
228
229
  }
229
- .awsui_is-visual-refresh_c6tup_3yrbc_114.awsui_body-cell_c6tup_3yrbc_93:not(#\9):first-child.awsui_has-striped-rows_c6tup_3yrbc_126 > .awsui_body-cell-success-form_c6tup_3yrbc_226, .awsui_is-visual-refresh_c6tup_3yrbc_114.awsui_body-cell_c6tup_3yrbc_93:not(#\9):first-child.awsui_has-striped-rows_c6tup_3yrbc_126 > .awsui_body-cell-editor-form_c6tup_3yrbc_226 {
230
+ .awsui_is-visual-refresh_c6tup_1p6xu_115.awsui_body-cell_c6tup_1p6xu_93:not(#\9):first-child.awsui_has-striped-rows_c6tup_1p6xu_127 > .awsui_body-cell-success-form_c6tup_1p6xu_227, .awsui_is-visual-refresh_c6tup_1p6xu_115.awsui_body-cell_c6tup_1p6xu_93:not(#\9):first-child.awsui_has-striped-rows_c6tup_1p6xu_127 > .awsui_body-cell-editor-form_c6tup_1p6xu_227 {
230
231
  margin-left: calc(-1 * var(--space-xxs-ynfts5, 4px));
231
232
  }
232
- .awsui_is-visual-refresh_c6tup_3yrbc_114.awsui_body-cell_c6tup_3yrbc_93:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_3yrbc_126) > .awsui_body-cell-success-form_c6tup_3yrbc_226, .awsui_is-visual-refresh_c6tup_3yrbc_114.awsui_body-cell_c6tup_3yrbc_93:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_3yrbc_126) > .awsui_body-cell-editor-form_c6tup_3yrbc_226 {
233
+ .awsui_is-visual-refresh_c6tup_1p6xu_115.awsui_body-cell_c6tup_1p6xu_93:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_1p6xu_127) > .awsui_body-cell-success-form_c6tup_1p6xu_227, .awsui_is-visual-refresh_c6tup_1p6xu_115.awsui_body-cell_c6tup_1p6xu_93:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_1p6xu_127) > .awsui_body-cell-editor-form_c6tup_1p6xu_227 {
233
234
  margin-left: calc(-1 * var(--space-xxxs-k2w98v, 2px));
234
235
  }
235
- .awsui_body-cell-success-row_c6tup_3yrbc_235:not(#\9), .awsui_body-cell-editor-row_c6tup_3yrbc_235:not(#\9) {
236
+ .awsui_body-cell-success-row_c6tup_1p6xu_236:not(#\9), .awsui_body-cell-editor-row_c6tup_1p6xu_236:not(#\9) {
236
237
  display: flex;
237
238
  flex-flow: row nowrap;
238
239
  align-items: center;
239
240
  justify-content: space-between;
240
241
  column-gap: var(--space-xxs-ynfts5, 4px);
241
242
  }
242
- .awsui_body-cell-success-row_c6tup_3yrbc_235 > :not(#\9):not(:last-child), .awsui_body-cell-editor-row_c6tup_3yrbc_235 > :not(#\9):not(:last-child) {
243
+ .awsui_body-cell-success-row_c6tup_1p6xu_236 > :not(#\9):not(:last-child), .awsui_body-cell-editor-row_c6tup_1p6xu_236 > :not(#\9):not(:last-child) {
243
244
  flex-grow: 1;
244
245
  }
245
- .awsui_body-cell-success-controls_c6tup_3yrbc_245:not(#\9), .awsui_body-cell-editor-controls_c6tup_3yrbc_245:not(#\9) {
246
+ .awsui_body-cell-success-controls_c6tup_1p6xu_246:not(#\9), .awsui_body-cell-editor-controls_c6tup_1p6xu_246:not(#\9) {
246
247
  flex-shrink: 0;
247
248
  }
248
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9) {
249
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9) {
249
250
  position: relative;
250
251
  cursor: pointer;
251
252
  }
252
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129.awsui_body-cell-edit-active_c6tup_3yrbc_129:not(#\9) {
253
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130.awsui_body-cell-edit-active_c6tup_1p6xu_130:not(#\9) {
253
254
  overflow: visible;
254
255
  }
255
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129) > .awsui_body-cell-editor_c6tup_3yrbc_204 {
256
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130) > .awsui_body-cell-editor_c6tup_1p6xu_205 {
256
257
  opacity: 0;
257
258
  }
258
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129).awsui_body-cell-has-success_c6tup_3yrbc_258 {
259
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130).awsui_body-cell-has-success_c6tup_1p6xu_259 {
259
260
  padding-right: calc(var(--space-scaled-l-t03y3z, 20px) + var(--space-l-4vl6xu, 20px));
260
261
  }
261
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):focus-within {
262
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):focus-within {
262
263
  padding-right: calc(var(--space-scaled-l-t03y3z, 20px) + var(--space-l-4vl6xu, 20px));
263
264
  position: relative;
264
265
  }
265
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):focus-within > .awsui_body-cell-editor_c6tup_3yrbc_204 {
266
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):focus-within > .awsui_body-cell-editor_c6tup_1p6xu_205 {
266
267
  opacity: 1;
267
268
  }
268
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):focus-within > .awsui_body-cell-success_c6tup_3yrbc_204 {
269
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):focus-within > .awsui_body-cell-success_c6tup_1p6xu_205 {
269
270
  opacity: 0;
270
271
  }
271
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):focus-within {
272
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):focus-within {
272
273
  outline: 2px dotted transparent;
273
274
  outline-offset: calc(calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)) - 1px);
274
275
  }
275
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):focus-within::before {
276
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):focus-within::before {
276
277
  content: " ";
277
278
  display: block;
278
279
  position: absolute;
@@ -283,7 +284,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
283
284
  border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
284
285
  box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
285
286
  }
286
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover {
287
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):hover {
287
288
  position: relative;
288
289
  background-color: var(--color-background-dropdown-item-hover-mqsxkv, #f4f4f4);
289
290
  border: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-control-default-m3lmsh, #7d8998);
@@ -291,38 +292,38 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
291
292
  right: calc(-1 * var(--border-divider-list-width-hacikr, 1px));
292
293
  padding-right: calc(var(--space-scaled-l-t03y3z, 20px) + var(--space-l-4vl6xu, 20px));
293
294
  }
294
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover > .awsui_body-cell-editor_c6tup_3yrbc_204 {
295
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):hover > .awsui_body-cell-editor_c6tup_1p6xu_205 {
295
296
  opacity: 1;
296
297
  }
297
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover > .awsui_body-cell-success_c6tup_3yrbc_204 {
298
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):hover > .awsui_body-cell-success_c6tup_1p6xu_205 {
298
299
  opacity: 0;
299
300
  }
300
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover:first-child {
301
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):hover:first-child {
301
302
  left: 0;
302
303
  right: 0;
303
304
  }
304
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover > .awsui_body-cell-editor_c6tup_3yrbc_204 {
305
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):hover > .awsui_body-cell-editor_c6tup_1p6xu_205 {
305
306
  padding-right: calc(var(--space-xs-rsr2qu, 8px) + var(--space-xxs-ynfts5, 4px) - (2 * var(--border-divider-list-width-hacikr, 1px)));
306
307
  }
307
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover.awsui_body-cell-last-row_c6tup_3yrbc_144.awsui_body-cell-selected_c6tup_3yrbc_144, .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover.awsui_body-cell-next-selected_c6tup_3yrbc_176 {
308
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):hover.awsui_body-cell-last-row_c6tup_1p6xu_145.awsui_body-cell-selected_c6tup_1p6xu_145, .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):hover.awsui_body-cell-next-selected_c6tup_1p6xu_177 {
308
309
  padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px) / 2));
309
310
  padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px) / 2));
310
311
  }
311
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover.awsui_body-cell-last-row_c6tup_3yrbc_144:not(.awsui_body-cell-selected_c6tup_3yrbc_144) {
312
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):hover.awsui_body-cell-last-row_c6tup_1p6xu_145:not(.awsui_body-cell-selected_c6tup_1p6xu_145) {
312
313
  padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
313
314
  }
314
- .awsui_body-cell_c6tup_3yrbc_93.awsui_body-cell-editable_c6tup_3yrbc_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover.awsui_body-cell-first-row_c6tup_3yrbc_141:not(.awsui_body-cell-selected_c6tup_3yrbc_144) {
315
+ .awsui_body-cell_c6tup_1p6xu_93.awsui_body-cell-editable_c6tup_1p6xu_130:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):hover.awsui_body-cell-first-row_c6tup_1p6xu_142:not(.awsui_body-cell-selected_c6tup_1p6xu_145) {
315
316
  padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
316
317
  padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
317
318
  }
318
- .awsui_body-cell-editable_c6tup_3yrbc_129.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover:first-child {
319
+ .awsui_body-cell-editable_c6tup_1p6xu_130.awsui_is-visual-refresh_c6tup_1p6xu_115:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):hover:first-child {
319
320
  border-top-left-radius: var(--border-radius-item-u2ibpi, 8px);
320
321
  border-bottom-left-radius: var(--border-radius-item-u2ibpi, 8px);
321
322
  }
322
- .awsui_body-cell-editable_c6tup_3yrbc_129.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover:last-child {
323
+ .awsui_body-cell-editable_c6tup_1p6xu_130.awsui_is-visual-refresh_c6tup_1p6xu_115:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):hover:last-child {
323
324
  border-top-right-radius: var(--border-radius-item-u2ibpi, 8px);
324
325
  border-bottom-right-radius: var(--border-radius-item-u2ibpi, 8px);
325
326
  }
326
- .awsui_body-cell-editable_c6tup_3yrbc_129.awsui_is-visual-refresh_c6tup_3yrbc_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_3yrbc_129):hover.awsui_body-cell-first-row_c6tup_3yrbc_141 > .awsui_body-cell-editor_c6tup_3yrbc_204 {
327
+ .awsui_body-cell-editable_c6tup_1p6xu_130.awsui_is-visual-refresh_c6tup_1p6xu_115:not(#\9):not(.awsui_body-cell-edit-active_c6tup_1p6xu_130):hover.awsui_body-cell-first-row_c6tup_1p6xu_142 > .awsui_body-cell-editor_c6tup_1p6xu_205 {
327
328
  padding-top: var(--border-divider-list-width-hacikr, 1px);
328
329
  }
@@ -2,28 +2,28 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "body-cell": "awsui_body-cell_c6tup_3yrbc_93",
6
- "body-cell-wrap": "awsui_body-cell-wrap_c6tup_3yrbc_102",
7
- "is-visual-refresh": "awsui_is-visual-refresh_c6tup_3yrbc_114",
8
- "has-striped-rows": "awsui_has-striped-rows_c6tup_3yrbc_126",
9
- "body-cell-edit-active": "awsui_body-cell-edit-active_c6tup_3yrbc_129",
10
- "body-cell-editable": "awsui_body-cell-editable_c6tup_3yrbc_129",
11
- "has-selection": "awsui_has-selection_c6tup_3yrbc_135",
12
- "body-cell-first-row": "awsui_body-cell-first-row_c6tup_3yrbc_141",
13
- "body-cell-last-row": "awsui_body-cell-last-row_c6tup_3yrbc_144",
14
- "body-cell-selected": "awsui_body-cell-selected_c6tup_3yrbc_144",
15
- "has-footer": "awsui_has-footer_c6tup_3yrbc_144",
16
- "body-cell-shaded": "awsui_body-cell-shaded_c6tup_3yrbc_154",
17
- "body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_3yrbc_176",
18
- "body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_3yrbc_180",
19
- "body-cell-success": "awsui_body-cell-success_c6tup_3yrbc_204",
20
- "body-cell-editor": "awsui_body-cell-editor_c6tup_3yrbc_204",
21
- "body-cell-success-form": "awsui_body-cell-success-form_c6tup_3yrbc_226",
22
- "body-cell-editor-form": "awsui_body-cell-editor-form_c6tup_3yrbc_226",
23
- "body-cell-success-row": "awsui_body-cell-success-row_c6tup_3yrbc_235",
24
- "body-cell-editor-row": "awsui_body-cell-editor-row_c6tup_3yrbc_235",
25
- "body-cell-success-controls": "awsui_body-cell-success-controls_c6tup_3yrbc_245",
26
- "body-cell-editor-controls": "awsui_body-cell-editor-controls_c6tup_3yrbc_245",
27
- "body-cell-has-success": "awsui_body-cell-has-success_c6tup_3yrbc_258"
5
+ "body-cell": "awsui_body-cell_c6tup_1p6xu_93",
6
+ "body-cell-wrap": "awsui_body-cell-wrap_c6tup_1p6xu_103",
7
+ "is-visual-refresh": "awsui_is-visual-refresh_c6tup_1p6xu_115",
8
+ "has-striped-rows": "awsui_has-striped-rows_c6tup_1p6xu_127",
9
+ "body-cell-edit-active": "awsui_body-cell-edit-active_c6tup_1p6xu_130",
10
+ "body-cell-editable": "awsui_body-cell-editable_c6tup_1p6xu_130",
11
+ "has-selection": "awsui_has-selection_c6tup_1p6xu_136",
12
+ "body-cell-first-row": "awsui_body-cell-first-row_c6tup_1p6xu_142",
13
+ "body-cell-last-row": "awsui_body-cell-last-row_c6tup_1p6xu_145",
14
+ "body-cell-selected": "awsui_body-cell-selected_c6tup_1p6xu_145",
15
+ "has-footer": "awsui_has-footer_c6tup_1p6xu_145",
16
+ "body-cell-shaded": "awsui_body-cell-shaded_c6tup_1p6xu_155",
17
+ "body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_1p6xu_177",
18
+ "body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_1p6xu_181",
19
+ "body-cell-success": "awsui_body-cell-success_c6tup_1p6xu_205",
20
+ "body-cell-editor": "awsui_body-cell-editor_c6tup_1p6xu_205",
21
+ "body-cell-success-form": "awsui_body-cell-success-form_c6tup_1p6xu_227",
22
+ "body-cell-editor-form": "awsui_body-cell-editor-form_c6tup_1p6xu_227",
23
+ "body-cell-success-row": "awsui_body-cell-success-row_c6tup_1p6xu_236",
24
+ "body-cell-editor-row": "awsui_body-cell-editor-row_c6tup_1p6xu_236",
25
+ "body-cell-success-controls": "awsui_body-cell-success-controls_c6tup_1p6xu_246",
26
+ "body-cell-editor-controls": "awsui_body-cell-editor-controls_c6tup_1p6xu_246",
27
+ "body-cell-has-success": "awsui_body-cell-has-success_c6tup_1p6xu_259"
28
28
  };
29
29
 
@@ -3,12 +3,13 @@ export interface TableTdElementProps {
3
3
  className?: string;
4
4
  style?: React.CSSProperties;
5
5
  wrapLines: boolean | undefined;
6
+ isRowHeader?: boolean;
6
7
  isFirstRow: boolean;
7
8
  isLastRow: boolean;
8
9
  isSelected: boolean;
9
10
  isNextSelected: boolean;
10
11
  isPrevSelected: boolean;
11
- nativeAttributes?: Omit<React.HTMLAttributes<HTMLTableCellElement>, 'style' | 'className' | 'onClick'>;
12
+ nativeAttributes?: Omit<React.TdHTMLAttributes<HTMLTableCellElement> | React.ThHTMLAttributes<HTMLTableCellElement>, 'style' | 'className' | 'onClick'>;
12
13
  onClick?: () => void;
13
14
  onMouseEnter?: () => void;
14
15
  onMouseLeave?: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"td-element.d.ts","sourceRoot":"lib/default/","sources":["table/body-cell/td-element.tsx"],"names":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SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,IAAI,CACrB,KAAK,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,EAC3F,OAAO,GAAG,WAAW,GAAG,SAAS,CAClC,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,kGA6D1B,CAAC"}
@@ -3,7 +3,12 @@
3
3
  import clsx from 'clsx';
4
4
  import React from 'react';
5
5
  import styles from './styles.css.js';
6
- export const TableTdElement = React.forwardRef(({ className, style, children, wrapLines, isFirstRow, isLastRow, isSelected, isNextSelected, isPrevSelected, nativeAttributes, onClick, onMouseEnter, onMouseLeave, isEvenRow, stripedRows, isVisualRefresh, hasSelection, hasFooter, }, ref) => {
7
- return (React.createElement("td", Object.assign({ style: style, className: clsx(className, styles['body-cell'], wrapLines && styles['body-cell-wrap'], isFirstRow && styles['body-cell-first-row'], isLastRow && styles['body-cell-last-row'], isSelected && styles['body-cell-selected'], isNextSelected && styles['body-cell-next-selected'], isPrevSelected && styles['body-cell-prev-selected'], !isEvenRow && stripedRows && styles['body-cell-shaded'], stripedRows && styles['has-striped-rows'], isVisualRefresh && styles['is-visual-refresh'], hasSelection && styles['has-selection'], hasFooter && styles['has-footer']), onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, ref: ref }, nativeAttributes), children));
6
+ export const TableTdElement = React.forwardRef(({ className, style, children, wrapLines, isRowHeader, isFirstRow, isLastRow, isSelected, isNextSelected, isPrevSelected, nativeAttributes, onClick, onMouseEnter, onMouseLeave, isEvenRow, stripedRows, isVisualRefresh, hasSelection, hasFooter, }, ref) => {
7
+ let Element = 'td';
8
+ if (isRowHeader) {
9
+ Element = 'th';
10
+ nativeAttributes = Object.assign(Object.assign({}, nativeAttributes), { scope: 'row' });
11
+ }
12
+ return (React.createElement(Element, Object.assign({ style: style, className: clsx(className, styles['body-cell'], wrapLines && styles['body-cell-wrap'], isFirstRow && styles['body-cell-first-row'], isLastRow && styles['body-cell-last-row'], isSelected && styles['body-cell-selected'], isNextSelected && styles['body-cell-next-selected'], isPrevSelected && styles['body-cell-prev-selected'], !isEvenRow && stripedRows && styles['body-cell-shaded'], stripedRows && styles['has-striped-rows'], isVisualRefresh && styles['is-visual-refresh'], hasSelection && styles['has-selection'], hasFooter && styles['has-footer']), onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, ref: ref }, nativeAttributes), children));
8
13
  });
9
14
  //# sourceMappingURL=td-element.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"td-element.js","sourceRoot":"lib/default/","sources":["table/body-cell/td-element.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAuBrC,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAC5C,CACE,EACE,SAAS,EACT,KAAK,EACL,QAAQ,EACR,SAAS,EACT,UAAU,EACV,SAAS,EACT,UAAU,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,WAAW,EACX,eAAe,EACf,YAAY,EACZ,SAAS,GACV,EACD,GAAG,EACH,EAAE;IACF,OAAO,CACL,0CACE,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,IAAI,CACb,SAAS,EACT,MAAM,CAAC,WAAW,CAAC,EACnB,SAAS,IAAI,MAAM,CAAC,gBAAgB,CAAC,EACrC,UAAU,IAAI,MAAM,CAAC,qBAAqB,CAAC,EAC3C,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EACzC,UAAU,IAAI,MAAM,CAAC,oBAAoB,CAAC,EAC1C,cAAc,IAAI,MAAM,CAAC,yBAAyB,CAAC,EACnD,cAAc,IAAI,MAAM,CAAC,yBAAyB,CAAC,EACnD,CAAC,SAAS,IAAI,WAAW,IAAI,MAAM,CAAC,kBAAkB,CAAC,EACvD,WAAW,IAAI,MAAM,CAAC,kBAAkB,CAAC,EACzC,eAAe,IAAI,MAAM,CAAC,mBAAmB,CAAC,EAC9C,YAAY,IAAI,MAAM,CAAC,eAAe,CAAC,EACvC,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,CAClC,EACD,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,GAAG,IACJ,gBAAgB,GAEnB,QAAQ,CACN,CACN,CAAC;AACJ,CAAC,CACF,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 from 'react';\nimport styles from './styles.css.js';\n\nexport interface TableTdElementProps {\n className?: string;\n style?: React.CSSProperties;\n wrapLines: boolean | undefined;\n isFirstRow: boolean;\n isLastRow: boolean;\n isSelected: boolean;\n isNextSelected: boolean;\n isPrevSelected: boolean;\n nativeAttributes?: Omit<React.HTMLAttributes<HTMLTableCellElement>, 'style' | 'className' | 'onClick'>;\n onClick?: () => void;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n children?: React.ReactNode;\n isEvenRow?: boolean;\n stripedRows?: boolean;\n hasSelection?: boolean;\n hasFooter?: boolean;\n isVisualRefresh?: boolean;\n}\n\nexport const TableTdElement = React.forwardRef<HTMLTableCellElement, TableTdElementProps>(\n (\n {\n className,\n style,\n children,\n wrapLines,\n isFirstRow,\n isLastRow,\n isSelected,\n isNextSelected,\n isPrevSelected,\n nativeAttributes,\n onClick,\n onMouseEnter,\n onMouseLeave,\n isEvenRow,\n stripedRows,\n isVisualRefresh,\n hasSelection,\n hasFooter,\n },\n ref\n ) => {\n return (\n <td\n style={style}\n className={clsx(\n className,\n styles['body-cell'],\n wrapLines && styles['body-cell-wrap'],\n isFirstRow && styles['body-cell-first-row'],\n isLastRow && styles['body-cell-last-row'],\n isSelected && styles['body-cell-selected'],\n isNextSelected && styles['body-cell-next-selected'],\n isPrevSelected && styles['body-cell-prev-selected'],\n !isEvenRow && stripedRows && styles['body-cell-shaded'],\n stripedRows && styles['has-striped-rows'],\n isVisualRefresh && styles['is-visual-refresh'],\n hasSelection && styles['has-selection'],\n hasFooter && styles['has-footer']\n )}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n ref={ref}\n {...nativeAttributes}\n >\n {children}\n </td>\n );\n }\n);\n"]}
1
+ {"version":3,"file":"td-element.js","sourceRoot":"lib/default/","sources":["table/body-cell/td-element.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AA2BrC,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAC5C,CACE,EACE,SAAS,EACT,KAAK,EACL,QAAQ,EACR,SAAS,EACT,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,WAAW,EACX,eAAe,EACf,YAAY,EACZ,SAAS,GACV,EACD,GAAG,EACH,EAAE;IACF,IAAI,OAAO,GAAgB,IAAI,CAAC;IAChC,IAAI,WAAW,EAAE;QACf,OAAO,GAAG,IAAI,CAAC;QACf,gBAAgB,mCACX,gBAAgB,KACnB,KAAK,EAAE,KAAK,GACb,CAAC;KACH;IACD,OAAO,CACL,oBAAC,OAAO,kBACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,IAAI,CACb,SAAS,EACT,MAAM,CAAC,WAAW,CAAC,EACnB,SAAS,IAAI,MAAM,CAAC,gBAAgB,CAAC,EACrC,UAAU,IAAI,MAAM,CAAC,qBAAqB,CAAC,EAC3C,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EACzC,UAAU,IAAI,MAAM,CAAC,oBAAoB,CAAC,EAC1C,cAAc,IAAI,MAAM,CAAC,yBAAyB,CAAC,EACnD,cAAc,IAAI,MAAM,CAAC,yBAAyB,CAAC,EACnD,CAAC,SAAS,IAAI,WAAW,IAAI,MAAM,CAAC,kBAAkB,CAAC,EACvD,WAAW,IAAI,MAAM,CAAC,kBAAkB,CAAC,EACzC,eAAe,IAAI,MAAM,CAAC,mBAAmB,CAAC,EAC9C,YAAY,IAAI,MAAM,CAAC,eAAe,CAAC,EACvC,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,CAClC,EACD,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,GAAG,IACJ,gBAAgB,GAEnB,QAAQ,CACD,CACX,CAAC;AACJ,CAAC,CACF,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 from 'react';\nimport styles from './styles.css.js';\n\nexport interface TableTdElementProps {\n className?: string;\n style?: React.CSSProperties;\n wrapLines: boolean | undefined;\n isRowHeader?: boolean;\n isFirstRow: boolean;\n isLastRow: boolean;\n isSelected: boolean;\n isNextSelected: boolean;\n isPrevSelected: boolean;\n nativeAttributes?: Omit<\n React.TdHTMLAttributes<HTMLTableCellElement> | React.ThHTMLAttributes<HTMLTableCellElement>,\n 'style' | 'className' | 'onClick'\n >;\n onClick?: () => void;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n children?: React.ReactNode;\n isEvenRow?: boolean;\n stripedRows?: boolean;\n hasSelection?: boolean;\n hasFooter?: boolean;\n isVisualRefresh?: boolean;\n}\n\nexport const TableTdElement = React.forwardRef<HTMLTableCellElement, TableTdElementProps>(\n (\n {\n className,\n style,\n children,\n wrapLines,\n isRowHeader,\n isFirstRow,\n isLastRow,\n isSelected,\n isNextSelected,\n isPrevSelected,\n nativeAttributes,\n onClick,\n onMouseEnter,\n onMouseLeave,\n isEvenRow,\n stripedRows,\n isVisualRefresh,\n hasSelection,\n hasFooter,\n },\n ref\n ) => {\n let Element: 'th' | 'td' = 'td';\n if (isRowHeader) {\n Element = 'th';\n nativeAttributes = {\n ...nativeAttributes,\n scope: 'row',\n };\n }\n return (\n <Element\n style={style}\n className={clsx(\n className,\n styles['body-cell'],\n wrapLines && styles['body-cell-wrap'],\n isFirstRow && styles['body-cell-first-row'],\n isLastRow && styles['body-cell-last-row'],\n isSelected && styles['body-cell-selected'],\n isNextSelected && styles['body-cell-next-selected'],\n isPrevSelected && styles['body-cell-prev-selected'],\n !isEvenRow && stripedRows && styles['body-cell-shaded'],\n stripedRows && styles['has-striped-rows'],\n isVisualRefresh && styles['is-visual-refresh'],\n hasSelection && styles['has-selection'],\n hasFooter && styles['has-footer']\n )}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n ref={ref}\n {...nativeAttributes}\n >\n {children}\n </Element>\n );\n }\n);\n"]}
@@ -83,6 +83,7 @@ export interface TableProps<T = any> extends BaseComponentProps {
83
83
  * The `cellContext` object contains the following properties:
84
84
  * * * `cellContext.currentValue` - State to keep track of a value in input fields while editing.
85
85
  * * * `cellContext.setValue` - Function to update `currentValue`. This should be called when the value in input field changes.
86
+ * * `isRowHeader` (boolean) - Specifies that cells in this column should be used as row headers.
86
87
  */
87
88
  columnDefinitions: ReadonlyArray<TableProps.ColumnDefinition<T>>;
88
89
  /**
@@ -306,6 +307,7 @@ export declare namespace TableProps {
306
307
  minWidth?: number | string;
307
308
  maxWidth?: number | string;
308
309
  editConfig?: EditConfig<ItemType>;
310
+ isRowHeader?: boolean;
309
311
  cell(item: ItemType): React.ReactNode;
310
312
  } & SortingColumn<ItemType>;
311
313
  type SelectionType = 'single' | 'multi';