@cloudscape-design/components-themeable 3.0.197 → 3.0.199

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 (27) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/app-layout/visual-refresh/main.scss +3 -1
  3. package/lib/internal/template/app-layout/visual-refresh/header.d.ts.map +1 -1
  4. package/lib/internal/template/app-layout/visual-refresh/header.js +2 -1
  5. package/lib/internal/template/app-layout/visual-refresh/header.js.map +1 -1
  6. package/lib/internal/template/app-layout/visual-refresh/notifications.d.ts.map +1 -1
  7. package/lib/internal/template/app-layout/visual-refresh/notifications.js +2 -1
  8. package/lib/internal/template/app-layout/visual-refresh/notifications.js.map +1 -1
  9. package/lib/internal/template/app-layout/visual-refresh/styles.css.js +60 -60
  10. package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +150 -148
  11. package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +60 -60
  12. package/lib/internal/template/breadcrumb-group/item/item.d.ts.map +1 -1
  13. package/lib/internal/template/breadcrumb-group/item/item.js +13 -10
  14. package/lib/internal/template/breadcrumb-group/item/item.js.map +1 -1
  15. package/lib/internal/template/internal/base-component/styles.scoped.css +38 -40
  16. package/lib/internal/template/internal/environment.js +1 -1
  17. package/lib/internal/template/segmented-control/styles.css.js +14 -14
  18. package/lib/internal/template/segmented-control/styles.scoped.css +37 -37
  19. package/lib/internal/template/segmented-control/styles.selectors.js +14 -14
  20. package/lib/internal/template/test-utils/dom/breadcrumb-group/index.d.ts +6 -4
  21. package/lib/internal/template/test-utils/dom/breadcrumb-group/index.js +8 -6
  22. package/lib/internal/template/test-utils/dom/breadcrumb-group/index.js.map +1 -1
  23. package/lib/internal/template/test-utils/selectors/breadcrumb-group/index.d.ts +6 -4
  24. package/lib/internal/template/test-utils/selectors/breadcrumb-group/index.js +8 -6
  25. package/lib/internal/template/test-utils/selectors/breadcrumb-group/index.js.map +1 -1
  26. package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +1 -1
@@ -2,65 +2,65 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "appbar": "awsui_appbar_hyvsj_12mno_93",
6
- "appbar-nav": "awsui_appbar-nav_hyvsj_12mno_117",
7
- "breadcrumbs": "awsui_breadcrumbs_hyvsj_12mno_121",
8
- "appbar-tools": "awsui_appbar-tools_hyvsj_12mno_125",
9
- "has-breadcrumbs": "awsui_has-breadcrumbs_hyvsj_12mno_166",
10
- "has-notifications-content": "awsui_has-notifications-content_hyvsj_12mno_173",
11
- "has-header": "awsui_has-header_hyvsj_12mno_179",
12
- "has-dynamic-overlap-height": "awsui_has-dynamic-overlap-height_hyvsj_12mno_179",
13
- "content-type-wizard": "awsui_content-type-wizard_hyvsj_12mno_180",
14
- "content-type-cards": "awsui_content-type-cards_hyvsj_12mno_183",
15
- "content-type-table": "awsui_content-type-table_hyvsj_12mno_184",
16
- "has-sticky-background": "awsui_has-sticky-background_hyvsj_12mno_187",
17
- "background": "awsui_background_hyvsj_12mno_221",
18
- "notifications-appbar-header": "awsui_notifications-appbar-header_hyvsj_12mno_224",
19
- "sticky-notifications": "awsui_sticky-notifications_hyvsj_12mno_236",
20
- "overlap": "awsui_overlap_hyvsj_12mno_242",
21
- "content": "awsui_content_hyvsj_12mno_180",
22
- "layout": "awsui_layout_hyvsj_12mno_333",
23
- "has-max-content-width": "awsui_has-max-content-width_hyvsj_12mno_415",
24
- "is-overlap-disabled": "awsui_is-overlap-disabled_hyvsj_12mno_442",
25
- "disable-body-scroll": "awsui_disable-body-scroll_hyvsj_12mno_445",
26
- "has-sticky-notifications": "awsui_has-sticky-notifications_hyvsj_12mno_449",
27
- "has-split-panel": "awsui_has-split-panel_hyvsj_12mno_463",
28
- "split-panel-position-bottom": "awsui_split-panel-position-bottom_hyvsj_12mno_463",
29
- "has-content-gap-left": "awsui_has-content-gap-left_hyvsj_12mno_475",
30
- "has-content-gap-right": "awsui_has-content-gap-right_hyvsj_12mno_478",
31
- "block-body-scroll": "awsui_block-body-scroll_hyvsj_12mno_493",
32
- "container": "awsui_container_hyvsj_12mno_501",
33
- "disable-content-paddings": "awsui_disable-content-paddings_hyvsj_12mno_527",
34
- "is-navigation-open": "awsui_is-navigation-open_hyvsj_12mno_532",
35
- "is-tools-open": "awsui_is-tools-open_hyvsj_12mno_535",
36
- "is-split-panel-open": "awsui_is-split-panel-open_hyvsj_12mno_535",
37
- "split-panel-position-side": "awsui_split-panel-position-side_hyvsj_12mno_535",
38
- "content-type-default": "awsui_content-type-default_hyvsj_12mno_555",
39
- "content-type-form": "awsui_content-type-form_hyvsj_12mno_555",
40
- "unfocusable": "awsui_unfocusable_hyvsj_12mno_596",
41
- "navigation-container": "awsui_navigation-container_hyvsj_12mno_604",
42
- "show-navigation": "awsui_show-navigation_hyvsj_12mno_639",
43
- "animating": "awsui_animating_hyvsj_12mno_661",
44
- "showButtons": "awsui_showButtons_hyvsj_12mno_1",
45
- "navigation": "awsui_navigation_hyvsj_12mno_604",
46
- "openNavigation": "awsui_openNavigation_hyvsj_12mno_1",
47
- "animated-content": "awsui_animated-content_hyvsj_12mno_722",
48
- "hide-navigation": "awsui_hide-navigation_hyvsj_12mno_731",
49
- "notifications": "awsui_notifications_hyvsj_12mno_224",
50
- "split-panel-bottom": "awsui_split-panel-bottom_hyvsj_12mno_796",
51
- "position-bottom": "awsui_position-bottom_hyvsj_12mno_842",
52
- "openSplitPanelBottom": "awsui_openSplitPanelBottom_hyvsj_12mno_1",
53
- "split-panel-side": "awsui_split-panel-side_hyvsj_12mno_871",
54
- "position-side": "awsui_position-side_hyvsj_12mno_899",
55
- "openSplitPanelSide": "awsui_openSplitPanelSide_hyvsj_12mno_1",
56
- "tools-container": "awsui_tools-container_hyvsj_12mno_936",
57
- "tools": "awsui_tools_hyvsj_12mno_936",
58
- "openTools": "awsui_openTools_hyvsj_12mno_1",
59
- "has-tools-form-persistence": "awsui_has-tools-form-persistence_hyvsj_12mno_1021",
60
- "hide-tools": "awsui_hide-tools_hyvsj_12mno_1031",
61
- "show-tools": "awsui_show-tools_hyvsj_12mno_1043",
62
- "has-tools-form": "awsui_has-tools-form_hyvsj_12mno_1021",
63
- "trigger": "awsui_trigger_hyvsj_12mno_1100",
64
- "selected": "awsui_selected_hyvsj_12mno_1139"
5
+ "appbar": "awsui_appbar_hyvsj_14n8k_93",
6
+ "appbar-nav": "awsui_appbar-nav_hyvsj_14n8k_117",
7
+ "breadcrumbs": "awsui_breadcrumbs_hyvsj_14n8k_121",
8
+ "appbar-tools": "awsui_appbar-tools_hyvsj_14n8k_125",
9
+ "has-breadcrumbs": "awsui_has-breadcrumbs_hyvsj_14n8k_166",
10
+ "has-notifications-content": "awsui_has-notifications-content_hyvsj_14n8k_173",
11
+ "has-header": "awsui_has-header_hyvsj_14n8k_179",
12
+ "has-dynamic-overlap-height": "awsui_has-dynamic-overlap-height_hyvsj_14n8k_179",
13
+ "content-type-wizard": "awsui_content-type-wizard_hyvsj_14n8k_180",
14
+ "content-type-cards": "awsui_content-type-cards_hyvsj_14n8k_183",
15
+ "content-type-table": "awsui_content-type-table_hyvsj_14n8k_184",
16
+ "has-sticky-background": "awsui_has-sticky-background_hyvsj_14n8k_187",
17
+ "background": "awsui_background_hyvsj_14n8k_221",
18
+ "notifications-appbar-header": "awsui_notifications-appbar-header_hyvsj_14n8k_224",
19
+ "sticky-notifications": "awsui_sticky-notifications_hyvsj_14n8k_236",
20
+ "overlap": "awsui_overlap_hyvsj_14n8k_242",
21
+ "content": "awsui_content_hyvsj_14n8k_180",
22
+ "layout": "awsui_layout_hyvsj_14n8k_333",
23
+ "has-max-content-width": "awsui_has-max-content-width_hyvsj_14n8k_415",
24
+ "is-overlap-disabled": "awsui_is-overlap-disabled_hyvsj_14n8k_442",
25
+ "disable-body-scroll": "awsui_disable-body-scroll_hyvsj_14n8k_445",
26
+ "has-sticky-notifications": "awsui_has-sticky-notifications_hyvsj_14n8k_449",
27
+ "has-split-panel": "awsui_has-split-panel_hyvsj_14n8k_463",
28
+ "split-panel-position-bottom": "awsui_split-panel-position-bottom_hyvsj_14n8k_463",
29
+ "has-content-gap-left": "awsui_has-content-gap-left_hyvsj_14n8k_475",
30
+ "has-content-gap-right": "awsui_has-content-gap-right_hyvsj_14n8k_478",
31
+ "block-body-scroll": "awsui_block-body-scroll_hyvsj_14n8k_493",
32
+ "container": "awsui_container_hyvsj_14n8k_501",
33
+ "disable-content-paddings": "awsui_disable-content-paddings_hyvsj_14n8k_527",
34
+ "is-navigation-open": "awsui_is-navigation-open_hyvsj_14n8k_532",
35
+ "is-tools-open": "awsui_is-tools-open_hyvsj_14n8k_535",
36
+ "is-split-panel-open": "awsui_is-split-panel-open_hyvsj_14n8k_535",
37
+ "split-panel-position-side": "awsui_split-panel-position-side_hyvsj_14n8k_535",
38
+ "content-type-default": "awsui_content-type-default_hyvsj_14n8k_555",
39
+ "content-type-form": "awsui_content-type-form_hyvsj_14n8k_555",
40
+ "unfocusable": "awsui_unfocusable_hyvsj_14n8k_596",
41
+ "navigation-container": "awsui_navigation-container_hyvsj_14n8k_606",
42
+ "show-navigation": "awsui_show-navigation_hyvsj_14n8k_641",
43
+ "animating": "awsui_animating_hyvsj_14n8k_663",
44
+ "showButtons": "awsui_showButtons_hyvsj_14n8k_1",
45
+ "navigation": "awsui_navigation_hyvsj_14n8k_606",
46
+ "openNavigation": "awsui_openNavigation_hyvsj_14n8k_1",
47
+ "animated-content": "awsui_animated-content_hyvsj_14n8k_724",
48
+ "hide-navigation": "awsui_hide-navigation_hyvsj_14n8k_733",
49
+ "notifications": "awsui_notifications_hyvsj_14n8k_224",
50
+ "split-panel-bottom": "awsui_split-panel-bottom_hyvsj_14n8k_798",
51
+ "position-bottom": "awsui_position-bottom_hyvsj_14n8k_844",
52
+ "openSplitPanelBottom": "awsui_openSplitPanelBottom_hyvsj_14n8k_1",
53
+ "split-panel-side": "awsui_split-panel-side_hyvsj_14n8k_873",
54
+ "position-side": "awsui_position-side_hyvsj_14n8k_901",
55
+ "openSplitPanelSide": "awsui_openSplitPanelSide_hyvsj_14n8k_1",
56
+ "tools-container": "awsui_tools-container_hyvsj_14n8k_938",
57
+ "tools": "awsui_tools_hyvsj_14n8k_938",
58
+ "openTools": "awsui_openTools_hyvsj_14n8k_1",
59
+ "has-tools-form-persistence": "awsui_has-tools-form-persistence_hyvsj_14n8k_1023",
60
+ "hide-tools": "awsui_hide-tools_hyvsj_14n8k_1033",
61
+ "show-tools": "awsui_show-tools_hyvsj_14n8k_1045",
62
+ "has-tools-form": "awsui_has-tools-form_hyvsj_14n8k_1023",
63
+ "trigger": "awsui_trigger_hyvsj_14n8k_1102",
64
+ "selected": "awsui_selected_hyvsj_14n8k_1141"
65
65
  };
66
66
 
@@ -1 +1 @@
1
- {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/breadcrumb-group/item/item.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AA0G1E,wBAAgB,cAAc,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,EAAE,EAClE,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,WAAW,EACX,MAAc,EACd,YAAoB,GACrB,EAAE,mBAAmB,CAAC,CAAC,CAAC,eAqCxB"}
1
+ {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/breadcrumb-group/item/item.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AA2H1E,wBAAgB,cAAc,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,EAAE,EAClE,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,WAAW,EACX,MAAc,EACd,YAAoB,GACrB,EAAE,mBAAmB,CAAC,CAAC,CAAC,eAyCxB"}
@@ -14,7 +14,7 @@ import PopoverBody from '../../popover/body';
14
14
  import Portal from '../../internal/components/portal';
15
15
  import popoverStyles from '../../popover/styles.css.js';
16
16
  var BreadcrumbItemWithPopover = function (_a) {
17
- var item = _a.item, anchorAttributes = __rest(_a, ["item"]);
17
+ var item = _a.item, isLast = _a.isLast, anchorAttributes = _a.anchorAttributes, itemAttributes = __rest(_a, ["item", "isLast", "anchorAttributes"]);
18
18
  var focusVisible = useFocusVisible();
19
19
  var _b = useState(false), showPopover = _b[0], setShowPopover = _b[1];
20
20
  var textRef = useRef(null);
@@ -50,15 +50,19 @@ var BreadcrumbItemWithPopover = function (_a) {
50
50
  };
51
51
  }, [showPopover]);
52
52
  return (React.createElement(React.Fragment, null,
53
- React.createElement("a", __assign({}, focusVisible, anchorAttributes, { onFocus: function () {
53
+ React.createElement(Item, __assign({ isLast: isLast }, itemAttributes, { onFocus: function () {
54
54
  isTruncated(textRef, virtualTextRef) && setShowPopover(true);
55
55
  }, onBlur: function () { return setShowPopover(false); }, onMouseEnter: function () {
56
56
  isTruncated(textRef, virtualTextRef) && setShowPopover(true);
57
- }, onMouseLeave: function () { return setShowPopover(false); } }),
57
+ }, onMouseLeave: function () { return setShowPopover(false); }, anchorAttributes: __assign(__assign({}, focusVisible), anchorAttributes) }),
58
58
  React.createElement("span", { className: styles.text, ref: textRef }, item.text),
59
59
  React.createElement("span", { className: styles['virtual-item'], ref: virtualTextRef }, item.text)),
60
60
  showPopover && popoverContent));
61
61
  };
62
+ var Item = function (_a) {
63
+ var anchorAttributes = _a.anchorAttributes, children = _a.children, isLast = _a.isLast, itemAttributes = __rest(_a, ["anchorAttributes", "children", "isLast"]);
64
+ return isLast ? (React.createElement("span", __assign({}, itemAttributes), children)) : (React.createElement("a", __assign({}, itemAttributes, anchorAttributes), children));
65
+ };
62
66
  export function BreadcrumbItem(_a) {
63
67
  var _b;
64
68
  var item = _a.item, onClick = _a.onClick, onFollow = _a.onFollow, isDisplayed = _a.isDisplayed, _c = _a.isLast, isLast = _c === void 0 ? false : _c, _d = _a.isCompressed, isCompressed = _d === void 0 ? false : _d;
@@ -70,17 +74,16 @@ export function BreadcrumbItem(_a) {
70
74
  }
71
75
  fireCancelableEvent(onClick, getEventDetail(item), event);
72
76
  };
77
+ var itemAttributes = {
78
+ className: clsx(styles.anchor, (_b = {}, _b[styles.compressed] = isCompressed, _b))
79
+ };
73
80
  var anchorAttributes = {
74
- href: isLast ? undefined : item.href || '#',
75
- className: clsx(styles.anchor, (_b = {}, _b[styles.compressed] = isCompressed, _b)),
76
- 'aria-current': isLast ? 'page' : undefined,
77
- 'aria-disabled': isLast && 'true',
78
- onClick: isLast ? preventDefault : onClickHandler,
79
- tabIndex: isLast ? 0 : undefined
81
+ href: item.href || '#',
82
+ onClick: isLast ? preventDefault : onClickHandler
80
83
  };
81
84
  return (React.createElement(React.Fragment, null,
82
85
  React.createElement("div", { className: clsx(styles.breadcrumb, isLast && styles.last) },
83
- isDisplayed && isCompressed ? (React.createElement(BreadcrumbItemWithPopover, __assign({ item: item }, anchorAttributes))) : (React.createElement("a", __assign({}, focusVisible, anchorAttributes),
86
+ isDisplayed && isCompressed ? (React.createElement(BreadcrumbItemWithPopover, __assign({ item: item, isLast: isLast, anchorAttributes: anchorAttributes }, itemAttributes))) : (React.createElement(Item, __assign({ isLast: isLast, anchorAttributes: __assign(__assign({}, anchorAttributes), focusVisible) }, itemAttributes),
84
87
  React.createElement("span", { className: styles.text }, item.text))),
85
88
  !isLast ? (React.createElement("span", { className: styles.icon },
86
89
  React.createElement(InternalIcon, { name: "angle-right" }))) : null)));
@@ -1 +1 @@
1
- {"version":3,"file":"item.js","sourceRoot":"","sources":["../../../../src/breadcrumb-group/item/item.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,MAAM,MAAM,iBAAiB,CAAC;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AAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG;QAC3C,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,YAAI,GAAC,MAAM,CAAC,UAAU,IAAG,YAAY,MAAG;QACrE,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;QAC3C,eAAe,EAAE,MAAM,IAAI,MAAM;QACjC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc;QACjD,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;KACjC,CAAC;IAEF,OAAO,CACL;QACE,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC;YAC3D,WAAW,IAAI,YAAY,CAAC,CAAC,CAAC,CAC7B,oBAAC,yBAAyB,aAAC,IAAI,EAAE,IAAI,IAAM,gBAAgB,EAAI,CAChE,CAAC,CAAC,CAAC,CACF,sCAAO,YAAY,EAAM,gBAAgB;gBACvC,8BAAM,SAAS,EAAE,MAAM,CAAC,IAAI,IAAG,IAAI,CAAC,IAAI,CAAQ,CAC9C,CACL;YACA,CAAC,MAAM,CAAC,CAAC,CAAC,CACT,8BAAM,SAAS,EAAE,MAAM,CAAC,IAAI;gBAC1B,oBAAC,YAAY,IAAC,IAAI,EAAC,aAAa,GAAG,CAC9B,CACR,CAAC,CAAC,CAAC,IAAI,CACJ,CACL,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport { BreadcrumbGroupProps, BreadcrumbItemProps } from '../interfaces';\nimport InternalIcon from '../../icon/internal';\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\nimport useFocusVisible from '../../internal/hooks/focus-visible';\nimport { fireCancelableEvent, isPlainLeftClick } from '../../internal/events';\nimport { getEventDetail } from '../internal';\nimport { Transition } from '../../internal/components/transition';\nimport PopoverContainer from '../../popover/container';\nimport PopoverBody from '../../popover/body';\nimport Portal from '../../internal/components/portal';\nimport popoverStyles from '../../popover/styles.css.js';\n\ntype BreadcrumbItemWithPopoverProps<T extends BreadcrumbGroupProps.Item> =\n React.AnchorHTMLAttributes<HTMLAnchorElement> & {\n item: T;\n };\n\nconst BreadcrumbItemWithPopover = <T extends BreadcrumbGroupProps.Item>({\n item,\n ...anchorAttributes\n}: BreadcrumbItemWithPopoverProps<T>) => {\n const focusVisible = useFocusVisible();\n const [showPopover, setShowPopover] = useState(false);\n const textRef = useRef<HTMLElement>(null);\n const virtualTextRef = useRef<HTMLElement>(null);\n\n const isTruncated = (textRef: React.RefObject<HTMLElement>, virtualTextRef: React.RefObject<HTMLElement>) => {\n if (!textRef || !virtualTextRef || !textRef.current || !virtualTextRef.current) {\n return false;\n }\n const virtualTextWidth = virtualTextRef.current.getBoundingClientRect().width;\n const textWidth = textRef.current.getBoundingClientRect().width;\n if (virtualTextWidth > textWidth) {\n return true;\n }\n return false;\n };\n\n const popoverContent = (\n <Portal>\n <div className={styles['item-popover']}>\n <Transition in={true}>\n {() => (\n <PopoverContainer\n trackRef={textRef}\n size=\"small\"\n fixedWidth={false}\n position=\"bottom\"\n arrow={position => (\n <div className={clsx(popoverStyles.arrow, popoverStyles[`arrow-position-${position}`])}>\n <div className={popoverStyles['arrow-outer']} />\n <div className={popoverStyles['arrow-inner']} />\n </div>\n )}\n >\n <PopoverBody dismissButton={false} dismissAriaLabel={undefined} onDismiss={() => {}} header={undefined}>\n {item.text}\n </PopoverBody>\n </PopoverContainer>\n )}\n </Transition>\n </div>\n </Portal>\n );\n\n useEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n setShowPopover(false);\n }\n };\n if (showPopover) {\n document.addEventListener('keydown', onKeyDown);\n }\n return () => {\n document.removeEventListener('keydown', onKeyDown);\n };\n }, [showPopover]);\n\n return (\n <>\n <a\n {...focusVisible}\n {...anchorAttributes}\n onFocus={() => {\n isTruncated(textRef, virtualTextRef) && setShowPopover(true);\n }}\n onBlur={() => setShowPopover(false)}\n onMouseEnter={() => {\n isTruncated(textRef, virtualTextRef) && setShowPopover(true);\n }}\n onMouseLeave={() => setShowPopover(false)}\n >\n <span className={styles.text} ref={textRef}>\n {item.text}\n </span>\n <span className={styles['virtual-item']} ref={virtualTextRef}>\n {item.text}\n </span>\n </a>\n {showPopover && popoverContent}\n </>\n );\n};\n\nexport function BreadcrumbItem<T extends BreadcrumbGroupProps.Item>({\n item,\n onClick,\n onFollow,\n isDisplayed,\n isLast = false,\n isCompressed = false,\n}: BreadcrumbItemProps<T>) {\n const focusVisible = useFocusVisible();\n const preventDefault = (event: React.MouseEvent) => event.preventDefault();\n const onClickHandler = (event: React.MouseEvent) => {\n if (isPlainLeftClick(event)) {\n fireCancelableEvent(onFollow, getEventDetail(item), event);\n }\n fireCancelableEvent(onClick, getEventDetail(item), event);\n };\n\n const anchorAttributes: React.AnchorHTMLAttributes<HTMLAnchorElement> = {\n href: isLast ? undefined : item.href || '#',\n className: clsx(styles.anchor, { [styles.compressed]: isCompressed }),\n 'aria-current': isLast ? 'page' : undefined, // Active breadcrumb item is implemented according to WAI-ARIA 1.1\n 'aria-disabled': isLast && 'true',\n onClick: isLast ? preventDefault : onClickHandler,\n tabIndex: isLast ? 0 : undefined, // tabIndex is added to the last crumb to keep it in the index without an href\n };\n\n return (\n <>\n <div className={clsx(styles.breadcrumb, isLast && styles.last)}>\n {isDisplayed && isCompressed ? (\n <BreadcrumbItemWithPopover item={item} {...anchorAttributes} />\n ) : (\n <a {...focusVisible} {...anchorAttributes}>\n <span className={styles.text}>{item.text}</span>\n </a>\n )}\n {!isLast ? (\n <span className={styles.icon}>\n <InternalIcon name=\"angle-right\" />\n </span>\n ) : null}\n </div>\n </>\n );\n}\n"]}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aAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,wBAAO,gBAAgB,GAAK,YAAY,KAAQ,cAAc;gBAClG,8BAAM,SAAS,EAAE,MAAM,CAAC,IAAI,IAAG,IAAI,CAAC,IAAI,CAAQ,CAC3C,CACR;YACA,CAAC,MAAM,CAAC,CAAC,CAAC,CACT,8BAAM,SAAS,EAAE,MAAM,CAAC,IAAI;gBAC1B,oBAAC,YAAY,IAAC,IAAI,EAAC,aAAa,GAAG,CAC9B,CACR,CAAC,CAAC,CAAC,IAAI,CACJ,CACL,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport { BreadcrumbGroupProps, BreadcrumbItemProps } from '../interfaces';\nimport InternalIcon from '../../icon/internal';\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\nimport useFocusVisible from '../../internal/hooks/focus-visible';\nimport { fireCancelableEvent, isPlainLeftClick } from '../../internal/events';\nimport { getEventDetail } from '../internal';\nimport { Transition } from '../../internal/components/transition';\nimport PopoverContainer from '../../popover/container';\nimport PopoverBody from '../../popover/body';\nimport Portal from '../../internal/components/portal';\nimport popoverStyles from '../../popover/styles.css.js';\n\ntype BreadcrumbItemWithPopoverProps<T extends BreadcrumbGroupProps.Item> = React.HTMLAttributes<HTMLElement> & {\n item: T;\n isLast: boolean;\n anchorAttributes: React.AnchorHTMLAttributes<HTMLAnchorElement>;\n};\n\nconst BreadcrumbItemWithPopover = <T extends BreadcrumbGroupProps.Item>({\n item,\n isLast,\n anchorAttributes,\n ...itemAttributes\n}: BreadcrumbItemWithPopoverProps<T>) => {\n const focusVisible = useFocusVisible();\n const [showPopover, setShowPopover] = useState(false);\n const textRef = useRef<HTMLElement>(null);\n const virtualTextRef = useRef<HTMLElement>(null);\n\n const isTruncated = (textRef: React.RefObject<HTMLElement>, virtualTextRef: React.RefObject<HTMLElement>) => {\n if (!textRef || !virtualTextRef || !textRef.current || !virtualTextRef.current) {\n return false;\n }\n const virtualTextWidth = virtualTextRef.current.getBoundingClientRect().width;\n const textWidth = textRef.current.getBoundingClientRect().width;\n if (virtualTextWidth > textWidth) {\n return true;\n }\n return false;\n };\n\n const popoverContent = (\n <Portal>\n <div className={styles['item-popover']}>\n <Transition in={true}>\n {() => (\n <PopoverContainer\n trackRef={textRef}\n size=\"small\"\n fixedWidth={false}\n position=\"bottom\"\n arrow={position => (\n <div className={clsx(popoverStyles.arrow, popoverStyles[`arrow-position-${position}`])}>\n <div className={popoverStyles['arrow-outer']} />\n <div className={popoverStyles['arrow-inner']} />\n </div>\n )}\n >\n <PopoverBody dismissButton={false} dismissAriaLabel={undefined} onDismiss={() => {}} header={undefined}>\n {item.text}\n </PopoverBody>\n </PopoverContainer>\n )}\n </Transition>\n </div>\n </Portal>\n );\n\n useEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n setShowPopover(false);\n }\n };\n if (showPopover) {\n document.addEventListener('keydown', onKeyDown);\n }\n return () => {\n document.removeEventListener('keydown', onKeyDown);\n };\n }, [showPopover]);\n\n return (\n <>\n <Item\n isLast={isLast}\n {...itemAttributes}\n onFocus={() => {\n isTruncated(textRef, virtualTextRef) && setShowPopover(true);\n }}\n onBlur={() => setShowPopover(false)}\n onMouseEnter={() => {\n isTruncated(textRef, virtualTextRef) && setShowPopover(true);\n }}\n onMouseLeave={() => setShowPopover(false)}\n anchorAttributes={{ ...focusVisible, ...anchorAttributes }}\n >\n <span className={styles.text} ref={textRef}>\n {item.text}\n </span>\n <span className={styles['virtual-item']} ref={virtualTextRef}>\n {item.text}\n </span>\n </Item>\n {showPopover && popoverContent}\n </>\n );\n};\n\ntype ItemProps = React.HTMLAttributes<HTMLElement> & {\n anchorAttributes: React.AnchorHTMLAttributes<HTMLAnchorElement>;\n isLast: boolean;\n};\nconst Item = ({ anchorAttributes, children, isLast, ...itemAttributes }: ItemProps) =>\n isLast ? (\n <span {...itemAttributes}>{children}</span>\n ) : (\n <a {...itemAttributes} {...anchorAttributes}>\n {children}\n </a>\n );\n\nexport function BreadcrumbItem<T extends BreadcrumbGroupProps.Item>({\n item,\n onClick,\n onFollow,\n isDisplayed,\n isLast = false,\n isCompressed = false,\n}: BreadcrumbItemProps<T>) {\n const focusVisible = useFocusVisible();\n const preventDefault = (event: React.MouseEvent) => event.preventDefault();\n const onClickHandler = (event: React.MouseEvent) => {\n if (isPlainLeftClick(event)) {\n fireCancelableEvent(onFollow, getEventDetail(item), event);\n }\n fireCancelableEvent(onClick, getEventDetail(item), event);\n };\n\n const itemAttributes: React.HTMLAttributes<HTMLElement> = {\n className: clsx(styles.anchor, { [styles.compressed]: isCompressed }),\n };\n const anchorAttributes: React.AnchorHTMLAttributes<HTMLAnchorElement> = {\n href: item.href || '#',\n onClick: isLast ? preventDefault : onClickHandler,\n };\n\n return (\n <>\n <div className={clsx(styles.breadcrumb, isLast && styles.last)}>\n {isDisplayed && isCompressed ? (\n <BreadcrumbItemWithPopover\n item={item}\n isLast={isLast}\n anchorAttributes={anchorAttributes}\n {...itemAttributes}\n />\n ) : (\n <Item isLast={isLast} anchorAttributes={{ ...anchorAttributes, ...focusVisible }} {...itemAttributes}>\n <span className={styles.text}>{item.text}</span>\n </Item>\n )}\n {!isLast ? (\n <span className={styles.icon}>\n <InternalIcon name=\"angle-right\" />\n </span>\n ) : null}\n </div>\n </>\n );\n}\n"]}
@@ -206,10 +206,10 @@
206
206
  --color-background-progress-bar-content-in-flash-ka071o:rgba(255, 255, 255, 0.7);
207
207
  --color-background-progress-bar-layout-default-teir10:#eaeded;
208
208
  --color-background-progress-bar-layout-in-flash-phmfak:rgba(255, 255, 255, 0.25);
209
- --color-background-segment-active-khzpn5:#eaeded;
209
+ --color-background-segment-active-rod112:#0073bb;
210
210
  --color-background-segment-default-bjnpj3:#ffffff;
211
211
  --color-background-segment-disabled-gcpwaz:#ffffff;
212
- --color-background-segment-hover-p2rkog:#fafafa;
212
+ --color-background-segment-hover-eccr37:#ffffff;
213
213
  --color-background-status-error-h1a0iq:#fdf3f1;
214
214
  --color-background-status-info-yq3r41:#f1faff;
215
215
  --color-background-status-success-cvmksn:#f2f8f0;
@@ -341,9 +341,9 @@
341
341
  --color-text-notification-default-l83xtb:#fafafa;
342
342
  --color-text-pagination-page-number-active-disabled-nidnvc:#545b64;
343
343
  --color-text-pagination-page-number-default-xf8q73:#545b64;
344
- --color-text-segment-active-o087le:#16191f;
344
+ --color-text-segment-active-p9yawx:#ffffff;
345
345
  --color-text-segment-default-9k644f:#545b64;
346
- --color-text-segment-hover-ez78pb:#16191f;
346
+ --color-text-segment-hover-1lgt1u:#0073bb;
347
347
  --color-text-small-5a9rs1:#687078;
348
348
  --color-text-status-error-jer77f:#d13212;
349
349
  --color-text-status-inactive-2o9czw:#687078;
@@ -779,10 +779,10 @@
779
779
  --color-background-progress-bar-content-default-kdvzje:#00a1c9;
780
780
  --color-background-progress-bar-content-in-flash-ka071o:#fafafa;
781
781
  --color-background-progress-bar-layout-default-teir10:#414750;
782
- --color-background-segment-active-khzpn5:#16191f;
782
+ --color-background-segment-active-rod112:#00a1c9;
783
783
  --color-background-segment-default-bjnpj3:#2a2e33;
784
784
  --color-background-segment-disabled-gcpwaz:#2a2e33;
785
- --color-background-segment-hover-p2rkog:#21252c;
785
+ --color-background-segment-hover-eccr37:#2a2e33;
786
786
  --color-background-status-error-h1a0iq:#270a11;
787
787
  --color-background-status-info-yq3r41:#12293b;
788
788
  --color-background-status-success-cvmksn:#172211;
@@ -889,9 +889,9 @@
889
889
  --color-text-link-hover-ok01xk:#44b9d6;
890
890
  --color-text-pagination-page-number-active-disabled-nidnvc:#d5dbdb;
891
891
  --color-text-pagination-page-number-default-xf8q73:#d5dbdb;
892
- --color-text-segment-active-o087le:#fafafa;
892
+ --color-text-segment-active-p9yawx:#1a2029;
893
893
  --color-text-segment-default-9k644f:#d5dbdb;
894
- --color-text-segment-hover-ez78pb:#fafafa;
894
+ --color-text-segment-hover-1lgt1u:#00a1c9;
895
895
  --color-text-small-5a9rs1:#95a5a6;
896
896
  --color-text-status-error-jer77f:#ff5d64;
897
897
  --color-text-status-inactive-2o9czw:#95a5a6;
@@ -1013,10 +1013,10 @@
1013
1013
  --color-background-progress-bar-content-default-kdvzje:#00a1c9;
1014
1014
  --color-background-progress-bar-content-in-flash-ka071o:#fafafa;
1015
1015
  --color-background-progress-bar-layout-default-teir10:#414750;
1016
- --color-background-segment-active-khzpn5:#16191f;
1016
+ --color-background-segment-active-rod112:#00a1c9;
1017
1017
  --color-background-segment-default-bjnpj3:#2a2e33;
1018
1018
  --color-background-segment-disabled-gcpwaz:#2a2e33;
1019
- --color-background-segment-hover-p2rkog:#21252c;
1019
+ --color-background-segment-hover-eccr37:#2a2e33;
1020
1020
  --color-background-status-error-h1a0iq:#270a11;
1021
1021
  --color-background-status-info-yq3r41:#12293b;
1022
1022
  --color-background-status-success-cvmksn:#172211;
@@ -1123,9 +1123,9 @@
1123
1123
  --color-text-link-hover-ok01xk:#44b9d6;
1124
1124
  --color-text-pagination-page-number-active-disabled-nidnvc:#d5dbdb;
1125
1125
  --color-text-pagination-page-number-default-xf8q73:#d5dbdb;
1126
- --color-text-segment-active-o087le:#fafafa;
1126
+ --color-text-segment-active-p9yawx:#1a2029;
1127
1127
  --color-text-segment-default-9k644f:#d5dbdb;
1128
- --color-text-segment-hover-ez78pb:#fafafa;
1128
+ --color-text-segment-hover-1lgt1u:#00a1c9;
1129
1129
  --color-text-small-5a9rs1:#95a5a6;
1130
1130
  --color-text-status-error-jer77f:#ff5d64;
1131
1131
  --color-text-status-inactive-2o9czw:#95a5a6;
@@ -1193,8 +1193,7 @@
1193
1193
  --color-background-progress-bar-content-default-kdvzje:#0972d3;
1194
1194
  --color-background-progress-bar-content-in-flash-ka071o:#ffffff;
1195
1195
  --color-background-progress-bar-layout-default-teir10:#e9ebed;
1196
- --color-background-segment-active-khzpn5:#0972d3;
1197
- --color-background-segment-hover-p2rkog:#ffffff;
1196
+ --color-background-segment-active-rod112:#0972d3;
1198
1197
  --color-background-status-error-h1a0iq:#fff7f7;
1199
1198
  --color-background-status-info-yq3r41:#f2f8fd;
1200
1199
  --color-background-status-success-cvmksn:#f2fcf3;
@@ -1314,9 +1313,8 @@
1314
1313
  --color-text-notification-default-l83xtb:#fbfbfb;
1315
1314
  --color-text-pagination-page-number-active-disabled-nidnvc:#9ba7b6;
1316
1315
  --color-text-pagination-page-number-default-xf8q73:#414d5c;
1317
- --color-text-segment-active-o087le:#ffffff;
1318
1316
  --color-text-segment-default-9k644f:#414d5c;
1319
- --color-text-segment-hover-ez78pb:#0972d3;
1317
+ --color-text-segment-hover-1lgt1u:#0972d3;
1320
1318
  --color-text-small-5a9rs1:#5f6b7a;
1321
1319
  --color-text-status-error-jer77f:#d91515;
1322
1320
  --color-text-status-inactive-2o9czw:#5f6b7a;
@@ -1522,10 +1520,10 @@
1522
1520
  --color-background-popover-g6qj89:#192534;
1523
1521
  --color-background-progress-bar-content-default-kdvzje:#539fe5;
1524
1522
  --color-background-progress-bar-layout-default-teir10:#354150;
1525
- --color-background-segment-active-khzpn5:#539fe5;
1523
+ --color-background-segment-active-rod112:#539fe5;
1526
1524
  --color-background-segment-default-bjnpj3:#0f1b2a;
1527
1525
  --color-background-segment-disabled-gcpwaz:#0f1b2a;
1528
- --color-background-segment-hover-p2rkog:#0f1b2a;
1526
+ --color-background-segment-hover-eccr37:#0f1b2a;
1529
1527
  --color-background-status-error-h1a0iq:#1a0000;
1530
1528
  --color-background-status-info-yq3r41:#00142b;
1531
1529
  --color-background-status-success-cvmksn:#001a02;
@@ -1640,9 +1638,9 @@
1640
1638
  --color-text-link-primary-underline-xq4vik:#539fe5;
1641
1639
  --color-text-pagination-page-number-active-disabled-nidnvc:#5f6b7a;
1642
1640
  --color-text-pagination-page-number-default-xf8q73:#9ba7b6;
1643
- --color-text-segment-active-o087le:#000716;
1641
+ --color-text-segment-active-p9yawx:#000716;
1644
1642
  --color-text-segment-default-9k644f:#d1d5db;
1645
- --color-text-segment-hover-ez78pb:#539fe5;
1643
+ --color-text-segment-hover-1lgt1u:#539fe5;
1646
1644
  --color-text-small-5a9rs1:#8d99a8;
1647
1645
  --color-text-status-error-jer77f:#eb6f6f;
1648
1646
  --color-text-status-inactive-2o9czw:#8d99a8;
@@ -1736,10 +1734,10 @@
1736
1734
  --color-background-progress-bar-content-default-kdvzje:#539fe5;
1737
1735
  --color-background-progress-bar-content-in-flash-ka071o:#ffffff;
1738
1736
  --color-background-progress-bar-layout-default-teir10:#354150;
1739
- --color-background-segment-active-khzpn5:#539fe5;
1737
+ --color-background-segment-active-rod112:#539fe5;
1740
1738
  --color-background-segment-default-bjnpj3:#0f1b2a;
1741
1739
  --color-background-segment-disabled-gcpwaz:#0f1b2a;
1742
- --color-background-segment-hover-p2rkog:#0f1b2a;
1740
+ --color-background-segment-hover-eccr37:#0f1b2a;
1743
1741
  --color-background-status-error-h1a0iq:#1a0000;
1744
1742
  --color-background-status-info-yq3r41:#00142b;
1745
1743
  --color-background-status-success-cvmksn:#001a02;
@@ -1857,9 +1855,9 @@
1857
1855
  --color-text-link-primary-underline-xq4vik:#539fe5;
1858
1856
  --color-text-pagination-page-number-active-disabled-nidnvc:#5f6b7a;
1859
1857
  --color-text-pagination-page-number-default-xf8q73:#9ba7b6;
1860
- --color-text-segment-active-o087le:#000716;
1858
+ --color-text-segment-active-p9yawx:#000716;
1861
1859
  --color-text-segment-default-9k644f:#d1d5db;
1862
- --color-text-segment-hover-ez78pb:#539fe5;
1860
+ --color-text-segment-hover-1lgt1u:#539fe5;
1863
1861
  --color-text-small-5a9rs1:#8d99a8;
1864
1862
  --color-text-status-error-jer77f:#eb6f6f;
1865
1863
  --color-text-status-inactive-2o9czw:#8d99a8;
@@ -1913,10 +1911,10 @@
1913
1911
  --color-background-popover-g6qj89:#192534;
1914
1912
  --color-background-progress-bar-content-default-kdvzje:#539fe5;
1915
1913
  --color-background-progress-bar-layout-default-teir10:#354150;
1916
- --color-background-segment-active-khzpn5:#539fe5;
1914
+ --color-background-segment-active-rod112:#539fe5;
1917
1915
  --color-background-segment-default-bjnpj3:#0f1b2a;
1918
1916
  --color-background-segment-disabled-gcpwaz:#0f1b2a;
1919
- --color-background-segment-hover-p2rkog:#0f1b2a;
1917
+ --color-background-segment-hover-eccr37:#0f1b2a;
1920
1918
  --color-background-status-error-h1a0iq:#1a0000;
1921
1919
  --color-background-status-info-yq3r41:#00142b;
1922
1920
  --color-background-status-success-cvmksn:#001a02;
@@ -2031,9 +2029,9 @@
2031
2029
  --color-text-link-primary-underline-xq4vik:#539fe5;
2032
2030
  --color-text-pagination-page-number-active-disabled-nidnvc:#5f6b7a;
2033
2031
  --color-text-pagination-page-number-default-xf8q73:#9ba7b6;
2034
- --color-text-segment-active-o087le:#000716;
2032
+ --color-text-segment-active-p9yawx:#000716;
2035
2033
  --color-text-segment-default-9k644f:#d1d5db;
2036
- --color-text-segment-hover-ez78pb:#539fe5;
2034
+ --color-text-segment-hover-1lgt1u:#539fe5;
2037
2035
  --color-text-small-5a9rs1:#8d99a8;
2038
2036
  --color-text-status-error-jer77f:#eb6f6f;
2039
2037
  --color-text-status-inactive-2o9czw:#8d99a8;
@@ -2087,10 +2085,10 @@
2087
2085
  --color-background-popover-g6qj89:#192534;
2088
2086
  --color-background-progress-bar-content-default-kdvzje:#539fe5;
2089
2087
  --color-background-progress-bar-layout-default-teir10:#354150;
2090
- --color-background-segment-active-khzpn5:#539fe5;
2088
+ --color-background-segment-active-rod112:#539fe5;
2091
2089
  --color-background-segment-default-bjnpj3:#000716;
2092
2090
  --color-background-segment-disabled-gcpwaz:#000716;
2093
- --color-background-segment-hover-p2rkog:#000716;
2091
+ --color-background-segment-hover-eccr37:#000716;
2094
2092
  --color-background-status-error-h1a0iq:#1a0000;
2095
2093
  --color-background-status-info-yq3r41:#00142b;
2096
2094
  --color-background-status-success-cvmksn:#001a02;
@@ -2204,9 +2202,9 @@
2204
2202
  --color-text-link-primary-underline-xq4vik:#539fe5;
2205
2203
  --color-text-pagination-page-number-active-disabled-nidnvc:#5f6b7a;
2206
2204
  --color-text-pagination-page-number-default-xf8q73:#9ba7b6;
2207
- --color-text-segment-active-o087le:#000716;
2205
+ --color-text-segment-active-p9yawx:#000716;
2208
2206
  --color-text-segment-default-9k644f:#d1d5db;
2209
- --color-text-segment-hover-ez78pb:#539fe5;
2207
+ --color-text-segment-hover-1lgt1u:#539fe5;
2210
2208
  --color-text-small-5a9rs1:#8d99a8;
2211
2209
  --color-text-status-error-jer77f:#eb6f6f;
2212
2210
  --color-text-status-inactive-2o9czw:#8d99a8;
@@ -2271,10 +2269,10 @@
2271
2269
  --color-background-popover-g6qj89:#192534;
2272
2270
  --color-background-progress-bar-content-default-kdvzje:#539fe5;
2273
2271
  --color-background-progress-bar-layout-default-teir10:#354150;
2274
- --color-background-segment-active-khzpn5:#539fe5;
2272
+ --color-background-segment-active-rod112:#539fe5;
2275
2273
  --color-background-segment-default-bjnpj3:#000716;
2276
2274
  --color-background-segment-disabled-gcpwaz:#000716;
2277
- --color-background-segment-hover-p2rkog:#000716;
2275
+ --color-background-segment-hover-eccr37:#000716;
2278
2276
  --color-background-status-error-h1a0iq:#1a0000;
2279
2277
  --color-background-status-info-yq3r41:#00142b;
2280
2278
  --color-background-status-success-cvmksn:#001a02;
@@ -2388,9 +2386,9 @@
2388
2386
  --color-text-link-primary-underline-xq4vik:#539fe5;
2389
2387
  --color-text-pagination-page-number-active-disabled-nidnvc:#5f6b7a;
2390
2388
  --color-text-pagination-page-number-default-xf8q73:#9ba7b6;
2391
- --color-text-segment-active-o087le:#000716;
2389
+ --color-text-segment-active-p9yawx:#000716;
2392
2390
  --color-text-segment-default-9k644f:#d1d5db;
2393
- --color-text-segment-hover-ez78pb:#539fe5;
2391
+ --color-text-segment-hover-1lgt1u:#539fe5;
2394
2392
  --color-text-small-5a9rs1:#8d99a8;
2395
2393
  --color-text-status-error-jer77f:#eb6f6f;
2396
2394
  --color-text-status-inactive-2o9czw:#8d99a8;
@@ -2420,7 +2418,7 @@
2420
2418
  --color-background-button-primary-default-w02sje:#fbfbfb;
2421
2419
  --color-background-button-primary-hover-qli9yh:#ffffff;
2422
2420
  --color-background-segment-default-bjnpj3:transparent;
2423
- --color-background-segment-hover-p2rkog:transparent;
2421
+ --color-background-segment-hover-eccr37:transparent;
2424
2422
  --color-border-button-normal-active-mkds03:#ffffff;
2425
2423
  --color-border-button-normal-default-d57sob:#fbfbfb;
2426
2424
  --color-border-button-normal-hover-993ry7:#ffffff;
@@ -2441,7 +2439,7 @@
2441
2439
  --color-background-button-primary-default-w02sje:#fbfbfb;
2442
2440
  --color-background-button-primary-hover-qli9yh:#ffffff;
2443
2441
  --color-background-segment-default-bjnpj3:transparent;
2444
- --color-background-segment-hover-p2rkog:transparent;
2442
+ --color-background-segment-hover-eccr37:transparent;
2445
2443
  --color-border-button-normal-active-mkds03:#ffffff;
2446
2444
  --color-border-button-normal-default-d57sob:#fbfbfb;
2447
2445
  --color-border-button-normal-hover-993ry7:#ffffff;
@@ -2461,7 +2459,7 @@
2461
2459
  --color-background-button-primary-default-w02sje:#414d5c;
2462
2460
  --color-background-button-primary-hover-qli9yh:#000716;
2463
2461
  --color-background-segment-default-bjnpj3:transparent;
2464
- --color-background-segment-hover-p2rkog:transparent;
2462
+ --color-background-segment-hover-eccr37:transparent;
2465
2463
  --color-border-button-normal-active-mkds03:#000716;
2466
2464
  --color-border-button-normal-default-d57sob:#414d5c;
2467
2465
  --color-border-button-normal-hover-993ry7:#000716;
@@ -2478,7 +2476,7 @@
2478
2476
  --color-background-button-primary-default-w02sje:#414d5c;
2479
2477
  --color-background-button-primary-hover-qli9yh:#000716;
2480
2478
  --color-background-segment-default-bjnpj3:transparent;
2481
- --color-background-segment-hover-p2rkog:transparent;
2479
+ --color-background-segment-hover-eccr37:transparent;
2482
2480
  --color-border-button-normal-active-mkds03:#000716;
2483
2481
  --color-border-button-normal-default-d57sob:#414d5c;
2484
2482
  --color-border-button-normal-hover-993ry7:#000716;
@@ -1,6 +1,6 @@
1
1
 
2
2
  export var PACKAGE_SOURCE = 'components';
3
- export var PACKAGE_VERSION = '3.0.0 (300e529)';
3
+ export var PACKAGE_VERSION = '3.0.0 (112a9cb)';
4
4
  export var THEME = 'open-source-visual-refresh';
5
5
  export var ALWAYS_VISUAL_REFRESH = true;
6
6
 
@@ -1,19 +1,19 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "segment": "awsui_segment_8cbea_lg4xu_97",
5
- "disabled": "awsui_disabled_8cbea_lg4xu_166",
6
- "selected": "awsui_selected_8cbea_lg4xu_174",
7
- "icon": "awsui_icon_8cbea_lg4xu_195",
8
- "with-text": "awsui_with-text_8cbea_lg4xu_199",
9
- "with-no-text": "awsui_with-no-text_8cbea_lg4xu_205",
10
- "root": "awsui_root_8cbea_lg4xu_216",
11
- "segment-part": "awsui_segment-part_8cbea_lg4xu_229",
12
- "select": "awsui_select_8cbea_lg4xu_174",
13
- "segment-count-2": "awsui_segment-count-2_8cbea_lg4xu_248",
14
- "segment-count-3": "awsui_segment-count-3_8cbea_lg4xu_253",
15
- "segment-count-4": "awsui_segment-count-4_8cbea_lg4xu_258",
16
- "segment-count-5": "awsui_segment-count-5_8cbea_lg4xu_263",
17
- "segment-count-6": "awsui_segment-count-6_8cbea_lg4xu_268"
4
+ "segment": "awsui_segment_8cbea_nkx9o_97",
5
+ "disabled": "awsui_disabled_8cbea_nkx9o_166",
6
+ "selected": "awsui_selected_8cbea_nkx9o_174",
7
+ "icon": "awsui_icon_8cbea_nkx9o_195",
8
+ "with-text": "awsui_with-text_8cbea_nkx9o_199",
9
+ "with-no-text": "awsui_with-no-text_8cbea_nkx9o_205",
10
+ "root": "awsui_root_8cbea_nkx9o_216",
11
+ "segment-part": "awsui_segment-part_8cbea_nkx9o_229",
12
+ "select": "awsui_select_8cbea_nkx9o_174",
13
+ "segment-count-2": "awsui_segment-count-2_8cbea_nkx9o_248",
14
+ "segment-count-3": "awsui_segment-count-3_8cbea_nkx9o_253",
15
+ "segment-count-4": "awsui_segment-count-4_8cbea_nkx9o_258",
16
+ "segment-count-5": "awsui_segment-count-5_8cbea_nkx9o_263",
17
+ "segment-count-6": "awsui_segment-count-6_8cbea_nkx9o_268"
18
18
  };
19
19