@cloudscape-design/components-themeable 3.0.831 → 3.0.832
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/side-navigation/styles.scss +19 -22
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/environment.json +1 -1
- package/lib/internal/template/side-navigation/parts.d.ts.map +1 -1
- package/lib/internal/template/side-navigation/parts.js +2 -3
- package/lib/internal/template/side-navigation/parts.js.map +1 -1
- package/lib/internal/template/side-navigation/styles.css.js +30 -30
- package/lib/internal/template/side-navigation/styles.scoped.css +55 -64
- package/lib/internal/template/side-navigation/styles.selectors.js +30 -30
- package/package.json +1 -1
|
@@ -53,9 +53,15 @@
|
|
|
53
53
|
padding-inline: awsui.$space-l;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
.list-container {
|
|
57
|
+
margin-block-end: awsui.$space-panel-content-bottom;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.items-control,
|
|
56
61
|
.list-container {
|
|
57
62
|
margin-block-start: awsui.$space-panel-content-top;
|
|
58
|
-
|
|
63
|
+
// Toolbar removes margin for whichever one comes first after the header
|
|
64
|
+
.with-toolbar > .divider-header + & {
|
|
59
65
|
margin-block-start: 0;
|
|
60
66
|
}
|
|
61
67
|
}
|
|
@@ -75,8 +81,8 @@
|
|
|
75
81
|
padding-inline-start: awsui.$space-panel-nav-left;
|
|
76
82
|
padding-inline-end: awsui.$space-panel-side-right;
|
|
77
83
|
|
|
78
|
-
&--
|
|
79
|
-
margin-block-
|
|
84
|
+
&--first {
|
|
85
|
+
margin-block-start: 0;
|
|
80
86
|
}
|
|
81
87
|
}
|
|
82
88
|
|
|
@@ -91,17 +97,8 @@
|
|
|
91
97
|
padding-inline: 0;
|
|
92
98
|
list-style: none;
|
|
93
99
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
&:has(> .section:not(.refresh)) {
|
|
97
|
-
margin-block: calc(#{awsui.$space-scaled-2x-l} - #{awsui.$border-divider-section-width});
|
|
98
|
-
}
|
|
99
|
-
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
100
|
-
&:has(> .section.refresh) {
|
|
101
|
-
margin-block: calc(#{awsui.$space-scaled-2x-m} - #{awsui.$border-divider-section-width});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
.list-variant-root > &:first-child {
|
|
100
|
+
// Remove margin from first item in side nav, outer block margins are covered by list-container
|
|
101
|
+
.list-variant-root--first > &:first-child {
|
|
105
102
|
margin-block-start: 0px;
|
|
106
103
|
}
|
|
107
104
|
}
|
|
@@ -116,11 +113,13 @@
|
|
|
116
113
|
}
|
|
117
114
|
|
|
118
115
|
.section {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
116
|
+
margin-block: calc(#{awsui.$space-scaled-2x-l} - #{awsui.$border-divider-section-width});
|
|
117
|
+
&.refresh {
|
|
118
|
+
margin-block: calc(#{awsui.$space-scaled-2x-m} - #{awsui.$border-divider-section-width});
|
|
119
|
+
}
|
|
120
|
+
// Remove margin from section if it is the first item in side nav to prevent double margin stacking
|
|
121
|
+
.list-variant-root--first > .list-item:first-child > & {
|
|
122
|
+
margin-block-start: 0px;
|
|
124
123
|
}
|
|
125
124
|
// HACK: Remove padding from section header and content to rely on margin collapsing rules.
|
|
126
125
|
/* stylelint-disable-next-line selector-max-type */
|
|
@@ -203,11 +202,9 @@
|
|
|
203
202
|
}
|
|
204
203
|
|
|
205
204
|
.divider-header {
|
|
206
|
-
margin-block
|
|
207
|
-
margin-block-end: awsui.$space-panel-content-top;
|
|
205
|
+
margin-block: 0;
|
|
208
206
|
border-block-start: awsui.$border-divider-section-width solid awsui.$color-border-panel-header;
|
|
209
207
|
.with-toolbar > & {
|
|
210
208
|
border-color: transparent;
|
|
211
|
-
margin-block-end: 0;
|
|
212
209
|
}
|
|
213
210
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../../src/side-navigation/parts.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAapF,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMnD,UAAU,sBAAsB;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,mBAAmB,CAAC,OAAO,GAAG,mBAAmB,CAAC,mBAAmB,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACrH,UAAU,EAAE,CACV,IAAI,EACA,mBAAmB,CAAC,IAAI,GACxB,mBAAmB,CAAC,MAAM,GAC1B,mBAAmB,CAAC,SAAS,GAC7B,mBAAmB,CAAC,mBAAmB,EAC3C,KAAK,EAAE,KAAK,CAAC,cAAc,GAAG,KAAK,KAChC,IAAI,CAAC;IACV,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAY,SAAQ,sBAAsB;IACzD,UAAU,EAAE,mBAAmB,CAAC,MAAM,CAAC;CACxC;AAED,wBAAgB,MAAM,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,WAAW,eA+CzE;AAED,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;IACtE,KAAK,EAAE,aAAa,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,EAAE,SAAS,GAAG,eAAe,GAAG,YAAY,GAAG,uBAAuB,GAAG,MAAM,CAAC;CACxF;AAQD,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,OAAO,EACP,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAa,GACd,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../../src/side-navigation/parts.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAapF,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMnD,UAAU,sBAAsB;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,mBAAmB,CAAC,OAAO,GAAG,mBAAmB,CAAC,mBAAmB,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACrH,UAAU,EAAE,CACV,IAAI,EACA,mBAAmB,CAAC,IAAI,GACxB,mBAAmB,CAAC,MAAM,GAC1B,mBAAmB,CAAC,SAAS,GAC7B,mBAAmB,CAAC,mBAAmB,EAC3C,KAAK,EAAE,KAAK,CAAC,cAAc,GAAG,KAAK,KAChC,IAAI,CAAC;IACV,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAY,SAAQ,sBAAsB;IACzD,UAAU,EAAE,mBAAmB,CAAC,MAAM,CAAC;CACxC;AAED,wBAAgB,MAAM,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,WAAW,eA+CzE;AAED,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;IACtE,KAAK,EAAE,aAAa,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,EAAE,SAAS,GAAG,eAAe,GAAG,YAAY,GAAG,uBAAuB,GAAG,MAAM,CAAC;CACxF;AAQD,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,OAAO,EACP,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAa,GACd,EAAE,wBAAwB,eA8I1B"}
|
|
@@ -99,16 +99,15 @@ export function NavigationItemsList({ items, variant, activeHref, fireChange, fi
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
-
const lastListIndex = lists.length - 1;
|
|
103
102
|
return (React.createElement(React.Fragment, null, lists.map((list, index) => {
|
|
104
103
|
if (!list.items || list.items.length === 0) {
|
|
105
104
|
return (React.createElement("div", { key: `hr-${index}`, className: clsx(styles.list, styles[`list-variant-${variant}`], {
|
|
106
|
-
[styles['list-variant-root--
|
|
105
|
+
[styles['list-variant-root--first']]: list.listVariant === 'root' && index === 0,
|
|
107
106
|
}) }, list.element));
|
|
108
107
|
}
|
|
109
108
|
else {
|
|
110
109
|
return (React.createElement("ul", { key: `list-${index}`, className: clsx(styles.list, styles[`list-variant-${list.listVariant}`], {
|
|
111
|
-
[styles['list-variant-root--
|
|
110
|
+
[styles['list-variant-root--first']]: list.listVariant === 'root' && index === 0,
|
|
112
111
|
}) }, list.items.map(item => item.element)));
|
|
113
112
|
}
|
|
114
113
|
})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parts.js","sourceRoot":"","sources":["../../../src/side-navigation/parts.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAa,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAE1C,OAAO,yBAAyB,MAAM,gCAAgC,CAAC;AACvE,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAA4B,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAGhE,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAoBrC,MAAM,UAAU,MAAM,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAe;IACxE,YAAY,CAAC,gBAAgB,EAAE,UAAU,CAAC,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Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode, useCallback, useEffect, useMemo, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalBox from '../box/internal';\nimport { ExpandableSectionProps } from '../expandable-section/interfaces';\nimport InternalExpandableSection from '../expandable-section/internal';\nimport InternalIcon from '../icon/internal';\nimport { isPlainLeftClick, NonCancelableCustomEvent } from '../internal/events';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { GeneratedAnalyticsMetadataSideNavigationClick } from './analytics-metadata/interfaces';\nimport { SideNavigationProps } from './interfaces';\nimport { hasActiveLink } from './util';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\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 position?: string;\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 const clickActionAnalyticsMetadata: GeneratedAnalyticsMetadataSideNavigationClick = {\n action: 'click',\n detail: {\n label: `.${analyticsSelectors['header-link-text']}`,\n external: 'false',\n href: definition.href,\n position: 'header',\n },\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 {...getAnalyticsMetadataAttribute(clickActionAnalyticsMetadata)}\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={clsx(styles['header-link-text'], analyticsSelectors['header-link-text'])}>\n {definition.text}\n </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({\n items,\n variant,\n activeHref,\n fireChange,\n fireFollow,\n position = '',\n}: 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 const itemPosition = `${position ? `${position},` : ''}${itemid}`;\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\n definition={item}\n activeHref={activeHref}\n fireChange={fireChange}\n fireFollow={fireFollow}\n position={itemPosition}\n />\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 position={itemPosition}\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\n definition={item}\n activeHref={activeHref}\n fireChange={fireChange}\n fireFollow={fireFollow}\n position={itemPosition}\n />\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\n definition={item}\n activeHref={activeHref}\n fireChange={fireChange}\n fireFollow={fireFollow}\n position={itemPosition}\n />\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 position={itemPosition}\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, position }: LinkProps) {\n checkSafeUrl('SideNavigation', definition.href);\n const isActive = definition.href === activeHref;\n\n const onClick = useCallback(\n (event: React.MouseEvent) => {\n if (isPlainLeftClick(event)) {\n fireFollow(definition, event);\n }\n },\n [fireFollow, definition]\n );\n\n const clickActionAnalyticsMetadata: GeneratedAnalyticsMetadataSideNavigationClick = {\n action: 'click',\n detail: {\n label: `.${analyticsSelectors['link-text']}`,\n external: `${!!definition.external}`,\n href: definition.href,\n position,\n },\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 {...getAnalyticsMetadataAttribute(clickActionAnalyticsMetadata)}\n >\n <span className={analyticsSelectors['link-text']}>{definition.text}</span>\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, position }: SectionProps) {\n const [expanded, setExpanded] = useState<boolean>(definition.defaultExpanded ?? true);\n const isVisualRefresh = useVisualRefresh();\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(\n styles.section,\n variant === 'section-group' && styles['section--no-ident'],\n isVisualRefresh && styles.refresh\n )}\n headerText={definition.text}\n >\n <NavigationItemsList\n variant=\"section\"\n items={definition.items}\n fireFollow={fireFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n position={position}\n />\n </InternalExpandableSection>\n );\n}\n\ninterface SectionGroupProps extends BaseItemComponentProps {\n definition: SideNavigationProps.SectionGroup;\n}\n\nfunction SectionGroup({ definition, activeHref, fireFollow, fireChange, position }: 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 position={position}\n />\n </div>\n );\n}\n\ninterface LinkGroupProps extends BaseItemComponentProps {\n definition: SideNavigationProps.LinkGroup;\n}\n\nfunction LinkGroup({ definition, activeHref, fireFollow, fireChange, position }: 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 position={position}\n />\n <NavigationItemsList\n variant=\"link-group\"\n items={definition.items}\n fireFollow={fireFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n position={position}\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({\n definition,\n fireFollow,\n fireChange,\n activeHref,\n variant,\n position,\n}: 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 position={position}\n />\n }\n >\n <NavigationItemsList\n variant=\"expandable-link-group\"\n items={definition.items}\n fireFollow={fireFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n position={position}\n />\n </InternalExpandableSection>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"parts.js","sourceRoot":"","sources":["../../../src/side-navigation/parts.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAa,WA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AAY,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,EACtB,QAAQ,EAAE,QAAQ,GAClB;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,EACtB,QAAQ,EAAE,QAAQ,GAClB,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, { ReactNode, useCallback, useEffect, useMemo, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalBox from '../box/internal';\nimport { ExpandableSectionProps } from '../expandable-section/interfaces';\nimport InternalExpandableSection from '../expandable-section/internal';\nimport InternalIcon from '../icon/internal';\nimport { isPlainLeftClick, NonCancelableCustomEvent } from '../internal/events';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { GeneratedAnalyticsMetadataSideNavigationClick } from './analytics-metadata/interfaces';\nimport { SideNavigationProps } from './interfaces';\nimport { hasActiveLink } from './util';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\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 position?: string;\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 const clickActionAnalyticsMetadata: GeneratedAnalyticsMetadataSideNavigationClick = {\n action: 'click',\n detail: {\n label: `.${analyticsSelectors['header-link-text']}`,\n external: 'false',\n href: definition.href,\n position: 'header',\n },\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 {...getAnalyticsMetadataAttribute(clickActionAnalyticsMetadata)}\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={clsx(styles['header-link-text'], analyticsSelectors['header-link-text'])}>\n {definition.text}\n </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({\n items,\n variant,\n activeHref,\n fireChange,\n fireFollow,\n position = '',\n}: 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 const itemPosition = `${position ? `${position},` : ''}${itemid}`;\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\n definition={item}\n activeHref={activeHref}\n fireChange={fireChange}\n fireFollow={fireFollow}\n position={itemPosition}\n />\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 position={itemPosition}\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\n definition={item}\n activeHref={activeHref}\n fireChange={fireChange}\n fireFollow={fireFollow}\n position={itemPosition}\n />\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\n definition={item}\n activeHref={activeHref}\n fireChange={fireChange}\n fireFollow={fireFollow}\n position={itemPosition}\n />\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 position={itemPosition}\n />\n </li>\n ),\n });\n return;\n }\n }\n });\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--first']]: list.listVariant === 'root' && index === 0,\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--first']]: list.listVariant === 'root' && index === 0,\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, position }: LinkProps) {\n checkSafeUrl('SideNavigation', definition.href);\n const isActive = definition.href === activeHref;\n\n const onClick = useCallback(\n (event: React.MouseEvent) => {\n if (isPlainLeftClick(event)) {\n fireFollow(definition, event);\n }\n },\n [fireFollow, definition]\n );\n\n const clickActionAnalyticsMetadata: GeneratedAnalyticsMetadataSideNavigationClick = {\n action: 'click',\n detail: {\n label: `.${analyticsSelectors['link-text']}`,\n external: `${!!definition.external}`,\n href: definition.href,\n position,\n },\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 {...getAnalyticsMetadataAttribute(clickActionAnalyticsMetadata)}\n >\n <span className={analyticsSelectors['link-text']}>{definition.text}</span>\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, position }: SectionProps) {\n const [expanded, setExpanded] = useState<boolean>(definition.defaultExpanded ?? true);\n const isVisualRefresh = useVisualRefresh();\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(\n styles.section,\n variant === 'section-group' && styles['section--no-ident'],\n isVisualRefresh && styles.refresh\n )}\n headerText={definition.text}\n >\n <NavigationItemsList\n variant=\"section\"\n items={definition.items}\n fireFollow={fireFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n position={position}\n />\n </InternalExpandableSection>\n );\n}\n\ninterface SectionGroupProps extends BaseItemComponentProps {\n definition: SideNavigationProps.SectionGroup;\n}\n\nfunction SectionGroup({ definition, activeHref, fireFollow, fireChange, position }: 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 position={position}\n />\n </div>\n );\n}\n\ninterface LinkGroupProps extends BaseItemComponentProps {\n definition: SideNavigationProps.LinkGroup;\n}\n\nfunction LinkGroup({ definition, activeHref, fireFollow, fireChange, position }: 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 position={position}\n />\n <NavigationItemsList\n variant=\"link-group\"\n items={definition.items}\n fireFollow={fireFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n position={position}\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({\n definition,\n fireFollow,\n fireChange,\n activeHref,\n variant,\n position,\n}: 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 position={position}\n />\n }\n >\n <NavigationItemsList\n variant=\"expandable-link-group\"\n items={definition.items}\n fireFollow={fireFollow}\n fireChange={fireChange}\n activeHref={activeHref}\n position={position}\n />\n </InternalExpandableSection>\n );\n}\n"]}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"header": "
|
|
6
|
-
"header-link": "awsui_header-
|
|
7
|
-
"header-link--has-logo": "awsui_header-link--has-
|
|
8
|
-
"header-link-text": "awsui_header-link-
|
|
9
|
-
"header-logo": "awsui_header-
|
|
10
|
-
"header-logo--stretched": "awsui_header-logo--
|
|
11
|
-
"items-control": "awsui_items-
|
|
12
|
-
"list-container": "awsui_list-
|
|
13
|
-
"with-toolbar": "awsui_with-
|
|
14
|
-
"divider": "
|
|
15
|
-
"list": "
|
|
16
|
-
"list-variant-root": "awsui_list-variant-
|
|
17
|
-
"list-variant-root--
|
|
18
|
-
"list-variant-expandable-link-group": "awsui_list-variant-expandable-link-
|
|
19
|
-
"list-item": "awsui_list-
|
|
20
|
-
"section": "
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"list-variant-section-group": "awsui_list-variant-section-
|
|
26
|
-
"section-group": "awsui_section-
|
|
27
|
-
"section-group-title": "awsui_section-group-
|
|
28
|
-
"link": "
|
|
29
|
-
"link-active": "awsui_link-
|
|
30
|
-
"info": "
|
|
31
|
-
"external-icon": "awsui_external-
|
|
32
|
-
"divider
|
|
33
|
-
"divider-
|
|
4
|
+
"root": "awsui_root_l0dv0_u9cqm_141",
|
|
5
|
+
"header": "awsui_header_l0dv0_u9cqm_178",
|
|
6
|
+
"header-link": "awsui_header-link_l0dv0_u9cqm_191",
|
|
7
|
+
"header-link--has-logo": "awsui_header-link--has-logo_l0dv0_u9cqm_201",
|
|
8
|
+
"header-link-text": "awsui_header-link-text_l0dv0_u9cqm_201",
|
|
9
|
+
"header-logo": "awsui_header-logo_l0dv0_u9cqm_206",
|
|
10
|
+
"header-logo--stretched": "awsui_header-logo--stretched_l0dv0_u9cqm_212",
|
|
11
|
+
"items-control": "awsui_items-control_l0dv0_u9cqm_217",
|
|
12
|
+
"list-container": "awsui_list-container_l0dv0_u9cqm_221",
|
|
13
|
+
"with-toolbar": "awsui_with-toolbar_l0dv0_u9cqm_229",
|
|
14
|
+
"divider-header": "awsui_divider-header_l0dv0_u9cqm_229",
|
|
15
|
+
"list": "awsui_list_l0dv0_u9cqm_221",
|
|
16
|
+
"list-variant-root": "awsui_list-variant-root_l0dv0_u9cqm_242",
|
|
17
|
+
"list-variant-root--first": "awsui_list-variant-root--first_l0dv0_u9cqm_249",
|
|
18
|
+
"list-variant-expandable-link-group": "awsui_list-variant-expandable-link-group_l0dv0_u9cqm_253",
|
|
19
|
+
"list-item": "awsui_list-item_l0dv0_u9cqm_257",
|
|
20
|
+
"section": "awsui_section_l0dv0_u9cqm_268",
|
|
21
|
+
"expandable-link-group": "awsui_expandable-link-group_l0dv0_u9cqm_269",
|
|
22
|
+
"section--no-ident": "awsui_section--no-ident_l0dv0_u9cqm_272",
|
|
23
|
+
"expandable-link-group--no-ident": "awsui_expandable-link-group--no-ident_l0dv0_u9cqm_273",
|
|
24
|
+
"refresh": "awsui_refresh_l0dv0_u9cqm_281",
|
|
25
|
+
"list-variant-section-group": "awsui_list-variant-section-group_l0dv0_u9cqm_292",
|
|
26
|
+
"section-group": "awsui_section-group_l0dv0_u9cqm_299",
|
|
27
|
+
"section-group-title": "awsui_section-group-title_l0dv0_u9cqm_310",
|
|
28
|
+
"link": "awsui_link_l0dv0_u9cqm_314",
|
|
29
|
+
"link-active": "awsui_link-active_l0dv0_u9cqm_323",
|
|
30
|
+
"info": "awsui_info_l0dv0_u9cqm_360",
|
|
31
|
+
"external-icon": "awsui_external-icon_l0dv0_u9cqm_364",
|
|
32
|
+
"divider": "awsui_divider_l0dv0_u9cqm_229",
|
|
33
|
+
"divider-default": "awsui_divider-default_l0dv0_u9cqm_373"
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
*/
|
|
139
139
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
140
140
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
141
|
-
.
|
|
141
|
+
.awsui_root_l0dv0_u9cqm_141:not(#\9) {
|
|
142
142
|
border-collapse: separate;
|
|
143
143
|
border-spacing: 0;
|
|
144
144
|
box-sizing: border-box;
|
|
@@ -176,7 +176,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
176
176
|
word-break: break-word;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
.
|
|
179
|
+
.awsui_header_l0dv0_u9cqm_178:not(#\9) {
|
|
180
180
|
font-size: var(--font-panel-header-size-197c0y, 18px);
|
|
181
181
|
line-height: var(--font-panel-header-line-height-av95ns, 22px);
|
|
182
182
|
font-weight: var(--font-weight-heading-l-ypbqtk, 700);
|
|
@@ -189,7 +189,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
189
189
|
padding-inline-end: calc(var(--space-scaled-xxl-6fqphi, 32px) + var(--space-xl-vss8pc, 24px));
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
.awsui_header-
|
|
192
|
+
.awsui_header-link_l0dv0_u9cqm_191:not(#\9) {
|
|
193
193
|
font-size: var(--font-panel-header-size-197c0y, 18px);
|
|
194
194
|
line-height: var(--font-panel-header-line-height-av95ns, 22px);
|
|
195
195
|
font-weight: var(--font-weight-heading-l-ypbqtk, 700);
|
|
@@ -199,34 +199,40 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
199
199
|
min-block-size: var(--font-panel-header-line-height-av95ns, 22px);
|
|
200
200
|
display: flex;
|
|
201
201
|
}
|
|
202
|
-
.awsui_header-link--has-
|
|
202
|
+
.awsui_header-link--has-logo_l0dv0_u9cqm_201 > .awsui_header-link-text_l0dv0_u9cqm_201:not(#\9) {
|
|
203
203
|
font-weight: 400;
|
|
204
204
|
align-self: center;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
.awsui_header-
|
|
207
|
+
.awsui_header-logo_l0dv0_u9cqm_206:not(#\9) {
|
|
208
208
|
margin-inline-end: var(--space-s-vmutj3, 12px);
|
|
209
209
|
margin-block-start: var(--space-xxxs-gn3248, 2px);
|
|
210
210
|
max-inline-size: calc(1.25 * var(--size-icon-big-fdyugp, 32px));
|
|
211
211
|
align-self: flex-start;
|
|
212
212
|
}
|
|
213
|
-
.awsui_header-logo--
|
|
213
|
+
.awsui_header-logo--stretched_l0dv0_u9cqm_212:not(#\9) {
|
|
214
214
|
max-inline-size: 100%;
|
|
215
215
|
margin-inline-end: 0;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
.awsui_items-
|
|
218
|
+
.awsui_items-control_l0dv0_u9cqm_217:not(#\9) {
|
|
219
219
|
padding-inline: var(--space-l-eenfqd, 20px);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
.awsui_list-
|
|
222
|
+
.awsui_list-container_l0dv0_u9cqm_221:not(#\9) {
|
|
223
|
+
margin-block-end: var(--space-panel-content-bottom-attpcy, 40px);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.awsui_items-control_l0dv0_u9cqm_217:not(#\9),
|
|
227
|
+
.awsui_list-container_l0dv0_u9cqm_221:not(#\9) {
|
|
223
228
|
margin-block-start: var(--space-panel-content-top-rr28ru, 20px);
|
|
224
229
|
}
|
|
225
|
-
.awsui_with-
|
|
230
|
+
.awsui_with-toolbar_l0dv0_u9cqm_229 > .awsui_divider-header_l0dv0_u9cqm_229 + .awsui_items-control_l0dv0_u9cqm_217:not(#\9),
|
|
231
|
+
.awsui_with-toolbar_l0dv0_u9cqm_229 > .awsui_divider-header_l0dv0_u9cqm_229 + .awsui_list-container_l0dv0_u9cqm_221:not(#\9) {
|
|
226
232
|
margin-block-start: 0;
|
|
227
233
|
}
|
|
228
234
|
|
|
229
|
-
.
|
|
235
|
+
.awsui_list_l0dv0_u9cqm_221:not(#\9) {
|
|
230
236
|
margin-block: 0;
|
|
231
237
|
margin-inline: 0;
|
|
232
238
|
padding-block: 0;
|
|
@@ -234,77 +240,64 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
234
240
|
padding-inline-start: var(--space-l-eenfqd, 20px);
|
|
235
241
|
}
|
|
236
242
|
|
|
237
|
-
.awsui_list-variant-
|
|
243
|
+
.awsui_list-variant-root_l0dv0_u9cqm_242:not(#\9) {
|
|
238
244
|
margin-block: 0;
|
|
239
245
|
margin-inline: 0;
|
|
240
246
|
padding-block: 0;
|
|
241
247
|
padding-inline-start: var(--space-panel-nav-left-n2yd9v, 32px);
|
|
242
248
|
padding-inline-end: var(--space-panel-side-right-otvpm8, 32px);
|
|
243
249
|
}
|
|
244
|
-
.awsui_list-variant-root--
|
|
245
|
-
margin-block-
|
|
250
|
+
.awsui_list-variant-root--first_l0dv0_u9cqm_249:not(#\9) {
|
|
251
|
+
margin-block-start: 0;
|
|
246
252
|
}
|
|
247
253
|
|
|
248
|
-
.awsui_list-variant-expandable-link-
|
|
254
|
+
.awsui_list-variant-expandable-link-group_l0dv0_u9cqm_253:not(#\9) {
|
|
249
255
|
padding-inline-start: var(--space-xxxl-vkrt7p, 40px);
|
|
250
256
|
}
|
|
251
257
|
|
|
252
|
-
.awsui_list-
|
|
258
|
+
.awsui_list-item_l0dv0_u9cqm_257:not(#\9) {
|
|
253
259
|
margin-block: var(--space-scaled-xs-t3am3w, 8px);
|
|
254
260
|
margin-inline: 0;
|
|
255
261
|
padding-block: 0;
|
|
256
262
|
padding-inline: 0;
|
|
257
263
|
list-style: none;
|
|
258
264
|
}
|
|
259
|
-
|
|
260
|
-
.awsui_list-item_l0dv0_wpou1_251:not(#\9) {
|
|
261
|
-
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
262
|
-
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
263
|
-
}
|
|
264
|
-
.awsui_list-item_l0dv0_wpou1_251:not(#\9):has(> .awsui_section_l0dv0_wpou1_263:not(.awsui_refresh_l0dv0_wpou1_263)) {
|
|
265
|
-
margin-block: calc(var(--space-scaled-2x-l-6bbwpr, 20px) - var(--border-divider-section-width-iueskx, 1px));
|
|
266
|
-
}
|
|
267
|
-
.awsui_list-item_l0dv0_wpou1_251:not(#\9):has(> .awsui_section_l0dv0_wpou1_263.awsui_refresh_l0dv0_wpou1_263) {
|
|
268
|
-
margin-block: calc(var(--space-scaled-2x-m-njhs97, 16px) - var(--border-divider-section-width-iueskx, 1px));
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
.awsui_list-variant-root_l0dv0_wpou1_236 > .awsui_list-item_l0dv0_wpou1_251:not(#\9):first-child {
|
|
265
|
+
.awsui_list-variant-root--first_l0dv0_u9cqm_249 > .awsui_list-item_l0dv0_u9cqm_257:not(#\9):first-child {
|
|
272
266
|
margin-block-start: 0px;
|
|
273
267
|
}
|
|
274
268
|
|
|
275
|
-
.
|
|
276
|
-
.awsui_expandable-link-
|
|
269
|
+
.awsui_section_l0dv0_u9cqm_268:not(#\9),
|
|
270
|
+
.awsui_expandable-link-group_l0dv0_u9cqm_269:not(#\9) {
|
|
277
271
|
margin-inline-start: calc(-1 * var(--space-l-eenfqd, 20px));
|
|
278
272
|
}
|
|
279
|
-
.awsui_section--no-
|
|
280
|
-
.awsui_expandable-link-group--no-
|
|
273
|
+
.awsui_section--no-ident_l0dv0_u9cqm_272:not(#\9),
|
|
274
|
+
.awsui_expandable-link-group--no-ident_l0dv0_u9cqm_273:not(#\9) {
|
|
281
275
|
margin-inline-start: 0;
|
|
282
276
|
}
|
|
283
277
|
|
|
284
|
-
.
|
|
278
|
+
.awsui_section_l0dv0_u9cqm_268:not(#\9) {
|
|
279
|
+
margin-block: calc(var(--space-scaled-2x-l-6bbwpr, 20px) - var(--border-divider-section-width-iueskx, 1px));
|
|
285
280
|
/* stylelint-disable-next-line selector-max-type */
|
|
286
281
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
margin-block: calc(var(--space-scaled-2x-l-6bbwpr, 20px) - var(--border-divider-section-width-iueskx, 1px));
|
|
290
|
-
}
|
|
291
|
-
.awsui_section_l0dv0_wpou1_263.awsui_refresh_l0dv0_wpou1_263:not(#\9) {
|
|
292
|
-
margin-block: calc(var(--space-scaled-2x-m-njhs97, 16px) - var(--border-divider-section-width-iueskx, 1px));
|
|
293
|
-
}
|
|
282
|
+
.awsui_section_l0dv0_u9cqm_268.awsui_refresh_l0dv0_u9cqm_281:not(#\9) {
|
|
283
|
+
margin-block: calc(var(--space-scaled-2x-m-njhs97, 16px) - var(--border-divider-section-width-iueskx, 1px));
|
|
294
284
|
}
|
|
295
|
-
.
|
|
285
|
+
.awsui_list-variant-root--first_l0dv0_u9cqm_249 > .awsui_list-item_l0dv0_u9cqm_257:not(#\9):first-child > .awsui_section_l0dv0_u9cqm_268 {
|
|
286
|
+
margin-block-start: 0px;
|
|
287
|
+
}
|
|
288
|
+
.awsui_section_l0dv0_u9cqm_268 > div:not(#\9) {
|
|
296
289
|
padding-block: 0;
|
|
297
290
|
padding-inline: 0;
|
|
298
291
|
}
|
|
299
292
|
|
|
300
|
-
.awsui_list-variant-section-
|
|
293
|
+
.awsui_list-variant-section-group_l0dv0_u9cqm_292:not(#\9) {
|
|
301
294
|
margin-block: 0;
|
|
302
295
|
margin-inline: 0;
|
|
303
296
|
padding-block: 0;
|
|
304
297
|
padding-inline: 0;
|
|
305
298
|
}
|
|
306
299
|
|
|
307
|
-
.awsui_section-
|
|
300
|
+
.awsui_section-group_l0dv0_u9cqm_299:not(#\9) {
|
|
308
301
|
font-size: var(--font-size-heading-m-abxcoe, 18px);
|
|
309
302
|
line-height: var(--line-height-heading-m-v86qsm, 22px);
|
|
310
303
|
letter-spacing: var(--letter-spacing-heading-m-790tuq, normal);
|
|
@@ -315,11 +308,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
315
308
|
margin-inline: 0;
|
|
316
309
|
}
|
|
317
310
|
|
|
318
|
-
.awsui_section-group-
|
|
311
|
+
.awsui_section-group-title_l0dv0_u9cqm_310:not(#\9) {
|
|
319
312
|
/* used in test-utils */
|
|
320
313
|
}
|
|
321
314
|
|
|
322
|
-
.
|
|
315
|
+
.awsui_link_l0dv0_u9cqm_314:not(#\9) {
|
|
323
316
|
font-size: var(--font-size-body-m-6wxxs5, 14px);
|
|
324
317
|
line-height: var(--line-height-body-m-gw0130, 22px);
|
|
325
318
|
color: var(--color-text-body-secondary-z2wo4i, #545b64);
|
|
@@ -328,30 +321,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
328
321
|
-moz-osx-font-smoothing: auto;
|
|
329
322
|
}
|
|
330
323
|
|
|
331
|
-
.awsui_link-
|
|
324
|
+
.awsui_link-active_l0dv0_u9cqm_323:not(#\9) {
|
|
332
325
|
font-weight: var(--font-wayfinding-link-active-weight-qpw3j2, 700);
|
|
333
326
|
-webkit-font-smoothing: var(--font-smoothing-webkit-trr1e8, auto);
|
|
334
327
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-hyxkxc, auto);
|
|
335
328
|
color: var(--color-text-accent-b3retj, #0073bb);
|
|
336
329
|
}
|
|
337
330
|
|
|
338
|
-
.awsui_header-
|
|
339
|
-
.
|
|
331
|
+
.awsui_header-link_l0dv0_u9cqm_191:not(#\9),
|
|
332
|
+
.awsui_link_l0dv0_u9cqm_314:not(#\9) {
|
|
340
333
|
text-decoration: none;
|
|
341
334
|
}
|
|
342
|
-
.awsui_header-
|
|
343
|
-
.
|
|
335
|
+
.awsui_header-link_l0dv0_u9cqm_191:not(#\9):hover,
|
|
336
|
+
.awsui_link_l0dv0_u9cqm_314:not(#\9):hover {
|
|
344
337
|
color: var(--color-text-accent-b3retj, #0073bb);
|
|
345
338
|
}
|
|
346
|
-
.awsui_header-
|
|
347
|
-
.
|
|
339
|
+
.awsui_header-link_l0dv0_u9cqm_191:not(#\9):focus,
|
|
340
|
+
.awsui_link_l0dv0_u9cqm_314:not(#\9):focus {
|
|
348
341
|
outline: none;
|
|
349
342
|
}
|
|
350
|
-
.awsui_header-
|
|
343
|
+
.awsui_header-link_l0dv0_u9cqm_191:not(#\9):hover, .awsui_header-link_l0dv0_u9cqm_191:not(#\9):focus, .awsui_link_l0dv0_u9cqm_314:not(#\9):hover, .awsui_link_l0dv0_u9cqm_314:not(#\9):focus {
|
|
351
344
|
text-decoration: none;
|
|
352
345
|
}
|
|
353
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
354
|
-
body[data-awsui-focus-visible=true] .
|
|
346
|
+
body[data-awsui-focus-visible=true] .awsui_header-link_l0dv0_u9cqm_191:not(#\9):focus,
|
|
347
|
+
body[data-awsui-focus-visible=true] .awsui_link_l0dv0_u9cqm_314:not(#\9):focus {
|
|
355
348
|
outline: thin dotted;
|
|
356
349
|
outline: var(--border-link-focus-ring-outline-bptw2p, 5px auto Highlight);
|
|
357
350
|
outline-offset: 2px;
|
|
@@ -363,31 +356,29 @@ body[data-awsui-focus-visible=true] .awsui_link_l0dv0_wpou1_321:not(#\9):focus {
|
|
|
363
356
|
box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-yrkso1, 0px) var(--color-border-item-focused-q68bgg, #0073bb);
|
|
364
357
|
}
|
|
365
358
|
|
|
366
|
-
.
|
|
359
|
+
.awsui_info_l0dv0_u9cqm_360:not(#\9) {
|
|
367
360
|
margin-inline-start: var(--space-xs-6dgkww, 8px);
|
|
368
361
|
}
|
|
369
362
|
|
|
370
|
-
.awsui_external-
|
|
363
|
+
.awsui_external-icon_l0dv0_u9cqm_364:not(#\9) {
|
|
371
364
|
margin-inline-start: var(--space-xxs-y2432o, 4px);
|
|
372
365
|
}
|
|
373
366
|
|
|
374
|
-
.
|
|
367
|
+
.awsui_divider_l0dv0_u9cqm_229:not(#\9) {
|
|
375
368
|
border-block: none;
|
|
376
369
|
border-inline: none;
|
|
377
370
|
}
|
|
378
371
|
|
|
379
|
-
.awsui_divider-
|
|
372
|
+
.awsui_divider-default_l0dv0_u9cqm_373:not(#\9) {
|
|
380
373
|
margin-block: var(--space-scaled-2x-xl-bffrnr, 24px);
|
|
381
374
|
margin-inline: calc(-1 * var(--space-panel-divider-margin-horizontal-ugd64r, 12px));
|
|
382
375
|
border-block-start: var(--border-divider-section-width-iueskx, 1px) solid var(--color-border-divider-default-u5ytia, #eaeded);
|
|
383
376
|
}
|
|
384
377
|
|
|
385
|
-
.awsui_divider-
|
|
386
|
-
margin-block
|
|
387
|
-
margin-block-end: var(--space-panel-content-top-rr28ru, 20px);
|
|
378
|
+
.awsui_divider-header_l0dv0_u9cqm_229:not(#\9) {
|
|
379
|
+
margin-block: 0;
|
|
388
380
|
border-block-start: var(--border-divider-section-width-iueskx, 1px) solid var(--color-border-panel-header-q2vg1j, #eaeded);
|
|
389
381
|
}
|
|
390
|
-
.awsui_with-
|
|
382
|
+
.awsui_with-toolbar_l0dv0_u9cqm_229 > .awsui_divider-header_l0dv0_u9cqm_229:not(#\9) {
|
|
391
383
|
border-color: transparent;
|
|
392
|
-
margin-block-end: 0;
|
|
393
384
|
}
|
|
@@ -2,35 +2,35 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"header": "
|
|
7
|
-
"header-link": "awsui_header-
|
|
8
|
-
"header-link--has-logo": "awsui_header-link--has-
|
|
9
|
-
"header-link-text": "awsui_header-link-
|
|
10
|
-
"header-logo": "awsui_header-
|
|
11
|
-
"header-logo--stretched": "awsui_header-logo--
|
|
12
|
-
"items-control": "awsui_items-
|
|
13
|
-
"list-container": "awsui_list-
|
|
14
|
-
"with-toolbar": "awsui_with-
|
|
15
|
-
"divider": "
|
|
16
|
-
"list": "
|
|
17
|
-
"list-variant-root": "awsui_list-variant-
|
|
18
|
-
"list-variant-root--
|
|
19
|
-
"list-variant-expandable-link-group": "awsui_list-variant-expandable-link-
|
|
20
|
-
"list-item": "awsui_list-
|
|
21
|
-
"section": "
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"list-variant-section-group": "awsui_list-variant-section-
|
|
27
|
-
"section-group": "awsui_section-
|
|
28
|
-
"section-group-title": "awsui_section-group-
|
|
29
|
-
"link": "
|
|
30
|
-
"link-active": "awsui_link-
|
|
31
|
-
"info": "
|
|
32
|
-
"external-icon": "awsui_external-
|
|
33
|
-
"divider
|
|
34
|
-
"divider-
|
|
5
|
+
"root": "awsui_root_l0dv0_u9cqm_141",
|
|
6
|
+
"header": "awsui_header_l0dv0_u9cqm_178",
|
|
7
|
+
"header-link": "awsui_header-link_l0dv0_u9cqm_191",
|
|
8
|
+
"header-link--has-logo": "awsui_header-link--has-logo_l0dv0_u9cqm_201",
|
|
9
|
+
"header-link-text": "awsui_header-link-text_l0dv0_u9cqm_201",
|
|
10
|
+
"header-logo": "awsui_header-logo_l0dv0_u9cqm_206",
|
|
11
|
+
"header-logo--stretched": "awsui_header-logo--stretched_l0dv0_u9cqm_212",
|
|
12
|
+
"items-control": "awsui_items-control_l0dv0_u9cqm_217",
|
|
13
|
+
"list-container": "awsui_list-container_l0dv0_u9cqm_221",
|
|
14
|
+
"with-toolbar": "awsui_with-toolbar_l0dv0_u9cqm_229",
|
|
15
|
+
"divider-header": "awsui_divider-header_l0dv0_u9cqm_229",
|
|
16
|
+
"list": "awsui_list_l0dv0_u9cqm_221",
|
|
17
|
+
"list-variant-root": "awsui_list-variant-root_l0dv0_u9cqm_242",
|
|
18
|
+
"list-variant-root--first": "awsui_list-variant-root--first_l0dv0_u9cqm_249",
|
|
19
|
+
"list-variant-expandable-link-group": "awsui_list-variant-expandable-link-group_l0dv0_u9cqm_253",
|
|
20
|
+
"list-item": "awsui_list-item_l0dv0_u9cqm_257",
|
|
21
|
+
"section": "awsui_section_l0dv0_u9cqm_268",
|
|
22
|
+
"expandable-link-group": "awsui_expandable-link-group_l0dv0_u9cqm_269",
|
|
23
|
+
"section--no-ident": "awsui_section--no-ident_l0dv0_u9cqm_272",
|
|
24
|
+
"expandable-link-group--no-ident": "awsui_expandable-link-group--no-ident_l0dv0_u9cqm_273",
|
|
25
|
+
"refresh": "awsui_refresh_l0dv0_u9cqm_281",
|
|
26
|
+
"list-variant-section-group": "awsui_list-variant-section-group_l0dv0_u9cqm_292",
|
|
27
|
+
"section-group": "awsui_section-group_l0dv0_u9cqm_299",
|
|
28
|
+
"section-group-title": "awsui_section-group-title_l0dv0_u9cqm_310",
|
|
29
|
+
"link": "awsui_link_l0dv0_u9cqm_314",
|
|
30
|
+
"link-active": "awsui_link-active_l0dv0_u9cqm_323",
|
|
31
|
+
"info": "awsui_info_l0dv0_u9cqm_360",
|
|
32
|
+
"external-icon": "awsui_external-icon_l0dv0_u9cqm_364",
|
|
33
|
+
"divider": "awsui_divider_l0dv0_u9cqm_229",
|
|
34
|
+
"divider-default": "awsui_divider-default_l0dv0_u9cqm_373"
|
|
35
35
|
};
|
|
36
36
|
|