@cloudscape-design/components 3.0.504 → 3.0.506

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 (77) hide show
  1. package/app-layout/visual-refresh/background.js +2 -2
  2. package/app-layout/visual-refresh/background.js.map +1 -1
  3. package/app-layout/visual-refresh/breadcrumbs.js +2 -2
  4. package/app-layout/visual-refresh/breadcrumbs.js.map +1 -1
  5. package/app-layout/visual-refresh/header.js +2 -2
  6. package/app-layout/visual-refresh/header.js.map +1 -1
  7. package/app-layout/visual-refresh/mobile-toolbar.js +2 -2
  8. package/app-layout/visual-refresh/mobile-toolbar.js.map +1 -1
  9. package/app-layout/visual-refresh/notifications.js +2 -2
  10. package/app-layout/visual-refresh/notifications.js.map +1 -1
  11. package/app-layout/visual-refresh/styles.css.js +81 -81
  12. package/app-layout/visual-refresh/styles.scoped.css +172 -172
  13. package/app-layout/visual-refresh/styles.selectors.js +81 -81
  14. package/app-layout/visual-refresh/trigger-button.js +1 -1
  15. package/app-layout/visual-refresh/trigger-button.js.map +1 -1
  16. package/button-dropdown/category-elements/category-element.d.ts +1 -1
  17. package/button-dropdown/category-elements/category-element.d.ts.map +1 -1
  18. package/button-dropdown/category-elements/category-element.js +2 -2
  19. package/button-dropdown/category-elements/category-element.js.map +1 -1
  20. package/button-dropdown/category-elements/expandable-category-element.d.ts +1 -1
  21. package/button-dropdown/category-elements/expandable-category-element.d.ts.map +1 -1
  22. package/button-dropdown/category-elements/expandable-category-element.js +2 -2
  23. package/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
  24. package/button-dropdown/category-elements/mobile-expandable-category-element.d.ts +1 -1
  25. package/button-dropdown/category-elements/mobile-expandable-category-element.d.ts.map +1 -1
  26. package/button-dropdown/category-elements/mobile-expandable-category-element.js +2 -2
  27. package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
  28. package/button-dropdown/category-elements/styles.css.js +13 -13
  29. package/button-dropdown/category-elements/styles.scoped.css +21 -32
  30. package/button-dropdown/category-elements/styles.selectors.js +13 -13
  31. package/button-dropdown/interfaces.d.ts +2 -0
  32. package/button-dropdown/interfaces.d.ts.map +1 -1
  33. package/button-dropdown/interfaces.js.map +1 -1
  34. package/button-dropdown/item-element/index.d.ts +1 -1
  35. package/button-dropdown/item-element/index.d.ts.map +1 -1
  36. package/button-dropdown/item-element/index.js +6 -1
  37. package/button-dropdown/item-element/index.js.map +1 -1
  38. package/button-dropdown/item-element/styles.css.js +16 -15
  39. package/button-dropdown/item-element/styles.scoped.css +18 -18
  40. package/button-dropdown/item-element/styles.selectors.js +16 -15
  41. package/button-dropdown/items-list.d.ts.map +1 -1
  42. package/button-dropdown/items-list.js +3 -3
  43. package/button-dropdown/items-list.js.map +1 -1
  44. package/cards/index.js +2 -2
  45. package/cards/index.js.map +1 -1
  46. package/container/internal.js +4 -4
  47. package/container/internal.js.map +1 -1
  48. package/content-layout/internal.js +3 -3
  49. package/content-layout/internal.js.map +1 -1
  50. package/expandable-section/styles.css.js +32 -32
  51. package/expandable-section/styles.scoped.css +63 -63
  52. package/expandable-section/styles.selectors.js +32 -32
  53. package/internal/components/dark-ribbon/index.js +2 -2
  54. package/internal/components/dark-ribbon/index.js.map +1 -1
  55. package/internal/environment.js +1 -1
  56. package/internal/environment.json +1 -1
  57. package/internal/manifest.json +1 -1
  58. package/internal/utils/content-header-utils.d.ts +2 -2
  59. package/internal/utils/content-header-utils.d.ts.map +1 -1
  60. package/internal/utils/content-header-utils.js +2 -2
  61. package/internal/utils/content-header-utils.js.map +1 -1
  62. package/package.json +1 -1
  63. package/split-panel/icons/bottom-icon-refresh.js +2 -2
  64. package/split-panel/icons/bottom-icon-refresh.js.map +1 -1
  65. package/split-panel/icons/side-position-refresh.js +2 -2
  66. package/split-panel/icons/side-position-refresh.js.map +1 -1
  67. package/table/internal.js +2 -2
  68. package/table/internal.js.map +1 -1
  69. package/top-navigation/interfaces.d.ts +2 -0
  70. package/top-navigation/interfaces.d.ts.map +1 -1
  71. package/top-navigation/interfaces.js.map +1 -1
  72. package/wizard/internal.js +4 -4
  73. package/wizard/internal.js.map +1 -1
  74. package/wizard/wizard-form-header.js +3 -3
  75. package/wizard/wizard-form-header.js.map +1 -1
  76. package/wizard/wizard-navigation.js +2 -2
  77. package/wizard/wizard-navigation.js.map +1 -1
@@ -2,86 +2,86 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "background": "awsui_background_hyvsj_1hfun_93",
6
- "scrolling-background": "awsui_scrolling-background_hyvsj_1hfun_96",
7
- "sticky-background": "awsui_sticky-background_hyvsj_1hfun_102",
8
- "has-sticky-notifications": "awsui_has-sticky-notifications_hyvsj_1hfun_110",
9
- "breadcrumbs": "awsui_breadcrumbs_hyvsj_1hfun_123",
10
- "has-sticky-background": "awsui_has-sticky-background_hyvsj_1hfun_133",
11
- "drawers-container": "awsui_drawers-container_hyvsj_1hfun_145",
12
- "has-open-drawer": "awsui_has-open-drawer_hyvsj_1hfun_156",
13
- "disable-body-scroll": "awsui_disable-body-scroll_hyvsj_1hfun_179",
14
- "drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_hyvsj_1hfun_184",
15
- "has-multiple-triggers": "awsui_has-multiple-triggers_hyvsj_1hfun_225",
16
- "drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_hyvsj_1hfun_235",
17
- "drawers-trigger-content": "awsui_drawers-trigger-content_hyvsj_1hfun_239",
18
- "drawers-trigger-overflow": "awsui_drawers-trigger-overflow_hyvsj_1hfun_253",
19
- "drawers-trigger": "awsui_drawers-trigger_hyvsj_1hfun_239",
20
- "drawer": "awsui_drawer_hyvsj_1hfun_145",
21
- "drawer-content-container": "awsui_drawer-content-container_hyvsj_1hfun_283",
22
- "drawer-close-button": "awsui_drawer-close-button_hyvsj_1hfun_292",
23
- "drawer-content": "awsui_drawer-content_hyvsj_1hfun_283",
24
- "drawer-content-hidden": "awsui_drawer-content-hidden_hyvsj_1hfun_300",
25
- "drawer-slider": "awsui_drawer-slider_hyvsj_1hfun_303",
26
- "is-drawer-open": "awsui_is-drawer-open_hyvsj_1hfun_310",
27
- "content": "awsui_content_hyvsj_1hfun_336",
28
- "layout": "awsui_layout_hyvsj_1hfun_357",
29
- "has-max-content-width": "awsui_has-max-content-width_hyvsj_1hfun_440",
30
- "content-type-dashboard": "awsui_content-type-dashboard_hyvsj_1hfun_455",
31
- "content-type-table": "awsui_content-type-table_hyvsj_1hfun_469",
32
- "content-type-cards": "awsui_content-type-cards_hyvsj_1hfun_469",
33
- "is-overlap-disabled": "awsui_is-overlap-disabled_hyvsj_1hfun_475",
34
- "is-hide-mobile-toolbar": "awsui_is-hide-mobile-toolbar_hyvsj_1hfun_478",
35
- "has-content-gap-left": "awsui_has-content-gap-left_hyvsj_1hfun_510",
36
- "has-content-gap-right": "awsui_has-content-gap-right_hyvsj_1hfun_513",
37
- "content-first-child-notifications": "awsui_content-first-child-notifications_hyvsj_1hfun_523",
38
- "has-breadcrumbs": "awsui_has-breadcrumbs_hyvsj_1hfun_526",
39
- "content-first-child-header": "awsui_content-first-child-header_hyvsj_1hfun_529",
40
- "has-header": "awsui_has-header_hyvsj_1hfun_529",
41
- "content-first-child-main": "awsui_content-first-child-main_hyvsj_1hfun_550",
42
- "disable-content-paddings": "awsui_disable-content-paddings_hyvsj_1hfun_550",
43
- "has-split-panel": "awsui_has-split-panel_hyvsj_1hfun_593",
44
- "split-panel-position-bottom": "awsui_split-panel-position-bottom_hyvsj_1hfun_593",
45
- "block-body-scroll": "awsui_block-body-scroll_hyvsj_1hfun_609",
46
- "unfocusable": "awsui_unfocusable_hyvsj_1hfun_614",
47
- "container": "awsui_container_hyvsj_1hfun_624",
48
- "is-navigation-open": "awsui_is-navigation-open_hyvsj_1hfun_649",
49
- "is-tools-open": "awsui_is-tools-open_hyvsj_1hfun_652",
50
- "is-split-panel-open": "awsui_is-split-panel-open_hyvsj_1hfun_652",
51
- "split-panel-position-side": "awsui_split-panel-position-side_hyvsj_1hfun_652",
52
- "has-active-drawer": "awsui_has-active-drawer_hyvsj_1hfun_652",
53
- "mobile-toolbar": "awsui_mobile-toolbar_hyvsj_1hfun_661",
54
- "remove-high-contrast-header": "awsui_remove-high-contrast-header_hyvsj_1hfun_677",
55
- "mobile-toolbar-nav": "awsui_mobile-toolbar-nav_hyvsj_1hfun_681",
56
- "mobile-toolbar-breadcrumbs": "awsui_mobile-toolbar-breadcrumbs_hyvsj_1hfun_685",
57
- "mobile-toolbar-tools": "awsui_mobile-toolbar-tools_hyvsj_1hfun_689",
58
- "navigation-container": "awsui_navigation-container_hyvsj_1hfun_698",
59
- "show-navigation": "awsui_show-navigation_hyvsj_1hfun_742",
60
- "animating": "awsui_animating_hyvsj_1hfun_764",
61
- "showButtons": "awsui_showButtons_hyvsj_1hfun_1",
62
- "navigation": "awsui_navigation_hyvsj_1hfun_698",
63
- "openNavigation": "awsui_openNavigation_hyvsj_1hfun_1",
64
- "animated-content": "awsui_animated-content_hyvsj_1hfun_826",
65
- "hide-navigation": "awsui_hide-navigation_hyvsj_1hfun_835",
66
- "notifications": "awsui_notifications_hyvsj_1hfun_845",
67
- "sticky-notifications": "awsui_sticky-notifications_hyvsj_1hfun_851",
68
- "split-panel-bottom": "awsui_split-panel-bottom_hyvsj_1hfun_868",
69
- "position-bottom": "awsui_position-bottom_hyvsj_1hfun_915",
70
- "openSplitPanelBottom": "awsui_openSplitPanelBottom_hyvsj_1hfun_1",
71
- "split-panel-side": "awsui_split-panel-side_hyvsj_1hfun_944",
72
- "position-side": "awsui_position-side_hyvsj_1hfun_957",
73
- "tools-container": "awsui_tools-container_hyvsj_1hfun_979",
74
- "tools": "awsui_tools_hyvsj_1hfun_979",
75
- "openTools": "awsui_openTools_hyvsj_1hfun_1",
76
- "has-tools-form-persistence": "awsui_has-tools-form-persistence_hyvsj_1hfun_1076",
77
- "hide-tools": "awsui_hide-tools_hyvsj_1hfun_1086",
78
- "show-tools": "awsui_show-tools_hyvsj_1hfun_1098",
79
- "has-tools-form": "awsui_has-tools-form_hyvsj_1hfun_1076",
80
- "trigger-badge-wrapper": "awsui_trigger-badge-wrapper_hyvsj_1hfun_1180",
81
- "trigger": "awsui_trigger_hyvsj_1hfun_1180",
82
- "selected": "awsui_selected_hyvsj_1hfun_1243",
83
- "badge": "awsui_badge_hyvsj_1hfun_1263",
84
- "trigger-wrapper": "awsui_trigger-wrapper_hyvsj_1hfun_1267",
85
- "dot": "awsui_dot_hyvsj_1hfun_1275"
5
+ "background": "awsui_background_hyvsj_2jy8k_93",
6
+ "scrolling-background": "awsui_scrolling-background_hyvsj_2jy8k_96",
7
+ "sticky-background": "awsui_sticky-background_hyvsj_2jy8k_102",
8
+ "has-sticky-notifications": "awsui_has-sticky-notifications_hyvsj_2jy8k_110",
9
+ "breadcrumbs": "awsui_breadcrumbs_hyvsj_2jy8k_123",
10
+ "has-sticky-background": "awsui_has-sticky-background_hyvsj_2jy8k_133",
11
+ "drawers-container": "awsui_drawers-container_hyvsj_2jy8k_145",
12
+ "has-open-drawer": "awsui_has-open-drawer_hyvsj_2jy8k_156",
13
+ "disable-body-scroll": "awsui_disable-body-scroll_hyvsj_2jy8k_179",
14
+ "drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_hyvsj_2jy8k_184",
15
+ "has-multiple-triggers": "awsui_has-multiple-triggers_hyvsj_2jy8k_225",
16
+ "drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_hyvsj_2jy8k_235",
17
+ "drawers-trigger-content": "awsui_drawers-trigger-content_hyvsj_2jy8k_239",
18
+ "drawers-trigger-overflow": "awsui_drawers-trigger-overflow_hyvsj_2jy8k_253",
19
+ "drawers-trigger": "awsui_drawers-trigger_hyvsj_2jy8k_239",
20
+ "drawer": "awsui_drawer_hyvsj_2jy8k_145",
21
+ "drawer-content-container": "awsui_drawer-content-container_hyvsj_2jy8k_283",
22
+ "drawer-close-button": "awsui_drawer-close-button_hyvsj_2jy8k_292",
23
+ "drawer-content": "awsui_drawer-content_hyvsj_2jy8k_283",
24
+ "drawer-content-hidden": "awsui_drawer-content-hidden_hyvsj_2jy8k_300",
25
+ "drawer-slider": "awsui_drawer-slider_hyvsj_2jy8k_303",
26
+ "is-drawer-open": "awsui_is-drawer-open_hyvsj_2jy8k_310",
27
+ "content": "awsui_content_hyvsj_2jy8k_336",
28
+ "layout": "awsui_layout_hyvsj_2jy8k_357",
29
+ "has-max-content-width": "awsui_has-max-content-width_hyvsj_2jy8k_440",
30
+ "content-type-dashboard": "awsui_content-type-dashboard_hyvsj_2jy8k_455",
31
+ "content-type-table": "awsui_content-type-table_hyvsj_2jy8k_469",
32
+ "content-type-cards": "awsui_content-type-cards_hyvsj_2jy8k_469",
33
+ "is-overlap-disabled": "awsui_is-overlap-disabled_hyvsj_2jy8k_475",
34
+ "is-hide-mobile-toolbar": "awsui_is-hide-mobile-toolbar_hyvsj_2jy8k_478",
35
+ "has-content-gap-left": "awsui_has-content-gap-left_hyvsj_2jy8k_510",
36
+ "has-content-gap-right": "awsui_has-content-gap-right_hyvsj_2jy8k_513",
37
+ "content-first-child-notifications": "awsui_content-first-child-notifications_hyvsj_2jy8k_523",
38
+ "has-breadcrumbs": "awsui_has-breadcrumbs_hyvsj_2jy8k_526",
39
+ "content-first-child-header": "awsui_content-first-child-header_hyvsj_2jy8k_529",
40
+ "has-header": "awsui_has-header_hyvsj_2jy8k_529",
41
+ "content-first-child-main": "awsui_content-first-child-main_hyvsj_2jy8k_550",
42
+ "disable-content-paddings": "awsui_disable-content-paddings_hyvsj_2jy8k_550",
43
+ "has-split-panel": "awsui_has-split-panel_hyvsj_2jy8k_593",
44
+ "split-panel-position-bottom": "awsui_split-panel-position-bottom_hyvsj_2jy8k_593",
45
+ "block-body-scroll": "awsui_block-body-scroll_hyvsj_2jy8k_609",
46
+ "unfocusable": "awsui_unfocusable_hyvsj_2jy8k_614",
47
+ "container": "awsui_container_hyvsj_2jy8k_624",
48
+ "is-navigation-open": "awsui_is-navigation-open_hyvsj_2jy8k_649",
49
+ "is-tools-open": "awsui_is-tools-open_hyvsj_2jy8k_652",
50
+ "is-split-panel-open": "awsui_is-split-panel-open_hyvsj_2jy8k_652",
51
+ "split-panel-position-side": "awsui_split-panel-position-side_hyvsj_2jy8k_652",
52
+ "has-active-drawer": "awsui_has-active-drawer_hyvsj_2jy8k_652",
53
+ "mobile-toolbar": "awsui_mobile-toolbar_hyvsj_2jy8k_661",
54
+ "remove-high-contrast-header": "awsui_remove-high-contrast-header_hyvsj_2jy8k_677",
55
+ "mobile-toolbar-nav": "awsui_mobile-toolbar-nav_hyvsj_2jy8k_681",
56
+ "mobile-toolbar-breadcrumbs": "awsui_mobile-toolbar-breadcrumbs_hyvsj_2jy8k_685",
57
+ "mobile-toolbar-tools": "awsui_mobile-toolbar-tools_hyvsj_2jy8k_689",
58
+ "navigation-container": "awsui_navigation-container_hyvsj_2jy8k_698",
59
+ "show-navigation": "awsui_show-navigation_hyvsj_2jy8k_742",
60
+ "animating": "awsui_animating_hyvsj_2jy8k_764",
61
+ "showButtons": "awsui_showButtons_hyvsj_2jy8k_1",
62
+ "navigation": "awsui_navigation_hyvsj_2jy8k_698",
63
+ "openNavigation": "awsui_openNavigation_hyvsj_2jy8k_1",
64
+ "animated-content": "awsui_animated-content_hyvsj_2jy8k_826",
65
+ "hide-navigation": "awsui_hide-navigation_hyvsj_2jy8k_835",
66
+ "notifications": "awsui_notifications_hyvsj_2jy8k_845",
67
+ "sticky-notifications": "awsui_sticky-notifications_hyvsj_2jy8k_851",
68
+ "split-panel-bottom": "awsui_split-panel-bottom_hyvsj_2jy8k_868",
69
+ "position-bottom": "awsui_position-bottom_hyvsj_2jy8k_915",
70
+ "openSplitPanelBottom": "awsui_openSplitPanelBottom_hyvsj_2jy8k_1",
71
+ "split-panel-side": "awsui_split-panel-side_hyvsj_2jy8k_944",
72
+ "position-side": "awsui_position-side_hyvsj_2jy8k_957",
73
+ "tools-container": "awsui_tools-container_hyvsj_2jy8k_979",
74
+ "tools": "awsui_tools_hyvsj_2jy8k_979",
75
+ "openTools": "awsui_openTools_hyvsj_2jy8k_1",
76
+ "has-tools-form-persistence": "awsui_has-tools-form-persistence_hyvsj_2jy8k_1076",
77
+ "hide-tools": "awsui_hide-tools_hyvsj_2jy8k_1086",
78
+ "show-tools": "awsui_show-tools_hyvsj_2jy8k_1098",
79
+ "has-tools-form": "awsui_has-tools-form_hyvsj_2jy8k_1076",
80
+ "trigger-badge-wrapper": "awsui_trigger-badge-wrapper_hyvsj_2jy8k_1180",
81
+ "trigger": "awsui_trigger_hyvsj_2jy8k_1180",
82
+ "selected": "awsui_selected_hyvsj_2jy8k_1243",
83
+ "badge": "awsui_badge_hyvsj_2jy8k_1263",
84
+ "trigger-wrapper": "awsui_trigger-wrapper_hyvsj_2jy8k_1267",
85
+ "dot": "awsui_dot_hyvsj_2jy8k_1275"
86
86
  };
87
87
 
@@ -6,7 +6,7 @@ import Icon from '../../icon/internal';
6
6
  import styles from './styles.css.js';
7
7
  import { shouldRemoveHighContrastHeader } from '../../internal/utils/content-header-utils';
8
8
  function TriggerButton({ ariaLabel, className, iconName, iconSvg, ariaExpanded, ariaControls, onClick, testId, badge, selected = false, }, ref) {
9
- return (React.createElement("div", { className: clsx(styles['trigger-wrapper'], shouldRemoveHighContrastHeader && styles['remove-high-contrast-header']) },
9
+ return (React.createElement("div", { className: clsx(styles['trigger-wrapper'], shouldRemoveHighContrastHeader() && styles['remove-high-contrast-header']) },
10
10
  React.createElement("button", { "aria-expanded": ariaExpanded, "aria-controls": ariaControls, "aria-haspopup": true, "aria-label": ariaLabel, className: clsx(styles.trigger, {
11
11
  [styles.selected]: selected,
12
12
  [styles.badge]: badge,
@@ -1 +1 @@
1
- {"version":3,"file":"trigger-button.js","sourceRoot":"lib/default/","sources":["app-layout/visual-refresh/trigger-button.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,qBAAqB,CAAC;AACvC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAGrC,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAe3F,SAAS,aAAa,CACpB,EACE,SAAS,EACT,SAAS,EACT,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,MAAM,EACN,KAAK,EACL,QAAQ,GAAG,KAAK,GACG,EACrB,GAA+B;IAE/B,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,iBAAiB,CAAC,EACzB,8BAA8B,IAAI,MAAM,CAAC,6BAA6B,CAAC,CACxE;QAED,iDACiB,YAAY,mBACZ,YAAY,mBACZ,IAAI,gBACP,SAAS,EACrB,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,OAAO,EACd;gBACE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;gBAC3B,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK;aACtB,EACD,SAAS,CACV,EACD,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAmC,EACxC,IAAI,EAAC,QAAQ,iBACA,MAAM;YAEnB,8BAAM,SAAS,EAAE,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,uBAAuB,CAAC,CAAC;gBAC7D,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,GAAI,CACjC,CACA;QACR,KAAK,IAAI,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAI,CAC1C,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\nimport Icon from '../../icon/internal';\nimport styles from './styles.css.js';\nimport { ButtonProps } from '../../button/interfaces';\nimport { IconProps } from '../../icon/interfaces';\nimport { shouldRemoveHighContrastHeader } from '../../internal/utils/content-header-utils';\n\nexport interface TriggerButtonProps {\n ariaLabel?: string;\n className?: string;\n iconName?: IconProps.Name;\n iconSvg?: React.ReactNode;\n ariaExpanded: boolean | undefined;\n ariaControls?: string;\n testId?: string;\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n selected?: boolean;\n badge?: boolean;\n}\n\nfunction TriggerButton(\n {\n ariaLabel,\n className,\n iconName,\n iconSvg,\n ariaExpanded,\n ariaControls,\n onClick,\n testId,\n badge,\n selected = false,\n }: TriggerButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n) {\n return (\n <div\n className={clsx(\n styles['trigger-wrapper'],\n shouldRemoveHighContrastHeader && styles['remove-high-contrast-header']\n )}\n >\n <button\n aria-expanded={ariaExpanded}\n aria-controls={ariaControls}\n aria-haspopup={true}\n aria-label={ariaLabel}\n className={clsx(\n styles.trigger,\n {\n [styles.selected]: selected,\n [styles.badge]: badge,\n },\n className\n )}\n onClick={onClick}\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n data-testid={testId}\n >\n <span className={clsx(badge && styles['trigger-badge-wrapper'])}>\n <Icon name={iconName} svg={iconSvg} />\n </span>\n </button>\n {badge && <div className={clsx(styles.dot)} />}\n </div>\n );\n}\n\nexport default React.forwardRef(TriggerButton);\n"]}
1
+ {"version":3,"file":"trigger-button.js","sourceRoot":"lib/default/","sources":["app-layout/visual-refresh/trigger-button.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,qBAAqB,CAAC;AACvC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAGrC,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAe3F,SAAS,aAAa,CACpB,EACE,SAAS,EACT,SAAS,EACT,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,MAAM,EACN,KAAK,EACL,QAAQ,GAAG,KAAK,GACG,EACrB,GAA+B;IAE/B,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,iBAAiB,CAAC,EACzB,8BAA8B,EAAE,IAAI,MAAM,CAAC,6BAA6B,CAAC,CAC1E;QAED,iDACiB,YAAY,mBACZ,YAAY,mBACZ,IAAI,gBACP,SAAS,EACrB,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,OAAO,EACd;gBACE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;gBAC3B,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK;aACtB,EACD,SAAS,CACV,EACD,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAmC,EACxC,IAAI,EAAC,QAAQ,iBACA,MAAM;YAEnB,8BAAM,SAAS,EAAE,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,uBAAuB,CAAC,CAAC;gBAC7D,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,GAAI,CACjC,CACA;QACR,KAAK,IAAI,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAI,CAC1C,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\nimport Icon from '../../icon/internal';\nimport styles from './styles.css.js';\nimport { ButtonProps } from '../../button/interfaces';\nimport { IconProps } from '../../icon/interfaces';\nimport { shouldRemoveHighContrastHeader } from '../../internal/utils/content-header-utils';\n\nexport interface TriggerButtonProps {\n ariaLabel?: string;\n className?: string;\n iconName?: IconProps.Name;\n iconSvg?: React.ReactNode;\n ariaExpanded: boolean | undefined;\n ariaControls?: string;\n testId?: string;\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n selected?: boolean;\n badge?: boolean;\n}\n\nfunction TriggerButton(\n {\n ariaLabel,\n className,\n iconName,\n iconSvg,\n ariaExpanded,\n ariaControls,\n onClick,\n testId,\n badge,\n selected = false,\n }: TriggerButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n) {\n return (\n <div\n className={clsx(\n styles['trigger-wrapper'],\n shouldRemoveHighContrastHeader() && styles['remove-high-contrast-header']\n )}\n >\n <button\n aria-expanded={ariaExpanded}\n aria-controls={ariaControls}\n aria-haspopup={true}\n aria-label={ariaLabel}\n className={clsx(\n styles.trigger,\n {\n [styles.selected]: selected,\n [styles.badge]: badge,\n },\n className\n )}\n onClick={onClick}\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n data-testid={testId}\n >\n <span className={clsx(badge && styles['trigger-badge-wrapper'])}>\n <Icon name={iconName} svg={iconSvg} />\n </span>\n </button>\n {badge && <div className={clsx(styles.dot)} />}\n </div>\n );\n}\n\nexport default React.forwardRef(TriggerButton);\n"]}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { CategoryProps } from '../interfaces';
3
- declare const CategoryElement: ({ item, onItemActivate, onGroupToggle, targetItem, isHighlighted, isKeyboardHighlight, isExpanded, highlightItem, disabled, variant, }: CategoryProps) => JSX.Element;
3
+ declare const CategoryElement: ({ item, onItemActivate, onGroupToggle, targetItem, isHighlighted, isKeyboardHighlight, isExpanded, highlightItem, disabled, variant, hasExpandableGroups, }: CategoryProps) => JSX.Element;
4
4
  export default CategoryElement;
5
5
  //# sourceMappingURL=category-element.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"category-element.d.ts","sourceRoot":"lib/default/","sources":["button-dropdown/category-elements/category-element.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAM9C,QAAA,MAAM,eAAe,2IAWlB,aAAa,gBAiCf,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"category-element.d.ts","sourceRoot":"lib/default/","sources":["button-dropdown/category-elements/category-element.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAM9C,QAAA,MAAM,eAAe,gKAYlB,aAAa,gBAkCf,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -2,12 +2,12 @@ import React from 'react';
2
2
  import clsx from 'clsx';
3
3
  import styles from './styles.css.js';
4
4
  import ItemsList from '../items-list';
5
- const CategoryElement = ({ item, onItemActivate, onGroupToggle, targetItem, isHighlighted, isKeyboardHighlight, isExpanded, highlightItem, disabled, variant, }) => {
5
+ const CategoryElement = ({ item, onItemActivate, onGroupToggle, targetItem, isHighlighted, isKeyboardHighlight, isExpanded, highlightItem, disabled, variant, hasExpandableGroups, }) => {
6
6
  // Hide the category title element from screen readers because it will be
7
7
  // provided as an ARIA label.
8
8
  return (React.createElement("li", { className: clsx(styles.category, styles[`variant-${variant}`], disabled && styles.disabled), role: "presentation", "aria-disabled": disabled ? 'true' : undefined },
9
9
  item.text && (React.createElement("p", { className: clsx(styles.header, { [styles.disabled]: disabled }), "aria-hidden": "true" }, item.text)),
10
- React.createElement("ul", { className: clsx(styles['items-list-container']), role: "group", "aria-label": item.text }, item.items && (React.createElement(ItemsList, { items: item.items, onItemActivate: onItemActivate, onGroupToggle: onGroupToggle, targetItem: targetItem, isHighlighted: isHighlighted, isKeyboardHighlight: isKeyboardHighlight, isExpanded: isExpanded, highlightItem: highlightItem, categoryDisabled: disabled, hasCategoryHeader: !!item.text, variant: variant })))));
10
+ React.createElement("ul", { className: clsx(styles['items-list-container']), role: "group", "aria-label": item.text }, item.items && (React.createElement(ItemsList, { items: item.items, onItemActivate: onItemActivate, onGroupToggle: onGroupToggle, targetItem: targetItem, isHighlighted: isHighlighted, isKeyboardHighlight: isKeyboardHighlight, isExpanded: isExpanded, highlightItem: highlightItem, categoryDisabled: disabled, hasCategoryHeader: !!item.text, variant: variant, hasExpandableGroups: hasExpandableGroups })))));
11
11
  };
12
12
  export default CategoryElement;
13
13
  //# sourceMappingURL=category-element.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"category-element.js","sourceRoot":"lib/default/","sources":["button-dropdown/category-elements/category-element.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,SAAS,MAAM,eAAe,CAAC;AAEtC,MAAM,eAAe,GAAG,CAAC,EACvB,IAAI,EACJ,cAAc,EACd,aAAa,EACb,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,aAAa,EACb,QAAQ,EACR,OAAO,GACO,EAAE,EAAE;IAClB,yEAAyE;IACzE,6BAA6B;IAC7B,OAAO,CACL,4BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,OAAO,EAAE,CAAC,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,EAC3F,IAAI,EAAC,cAAc,mBACJ,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;QAE3C,IAAI,CAAC,IAAI,IAAI,CACZ,2BAAG,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC,iBAAc,MAAM,IACnF,IAAI,CAAC,IAAI,CACR,CACL;QACD,4BAAI,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,EAAE,IAAI,EAAC,OAAO,gBAAa,IAAI,CAAC,IAAI,IACpF,IAAI,CAAC,KAAK,IAAI,CACb,oBAAC,SAAS,IACR,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,QAAQ,EAC1B,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAC9B,OAAO,EAAE,OAAO,GAChB,CACH,CACE,CACF,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { CategoryProps } from '../interfaces';\nimport React from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport ItemsList from '../items-list';\n\nconst CategoryElement = ({\n item,\n onItemActivate,\n onGroupToggle,\n targetItem,\n isHighlighted,\n isKeyboardHighlight,\n isExpanded,\n highlightItem,\n disabled,\n variant,\n}: CategoryProps) => {\n // Hide the category title element from screen readers because it will be\n // provided as an ARIA label.\n return (\n <li\n className={clsx(styles.category, styles[`variant-${variant}`], disabled && styles.disabled)}\n role=\"presentation\"\n aria-disabled={disabled ? 'true' : undefined}\n >\n {item.text && (\n <p className={clsx(styles.header, { [styles.disabled]: disabled })} aria-hidden=\"true\">\n {item.text}\n </p>\n )}\n <ul className={clsx(styles['items-list-container'])} role=\"group\" aria-label={item.text}>\n {item.items && (\n <ItemsList\n items={item.items}\n onItemActivate={onItemActivate}\n onGroupToggle={onGroupToggle}\n targetItem={targetItem}\n isHighlighted={isHighlighted}\n isKeyboardHighlight={isKeyboardHighlight}\n isExpanded={isExpanded}\n highlightItem={highlightItem}\n categoryDisabled={disabled}\n hasCategoryHeader={!!item.text}\n variant={variant}\n />\n )}\n </ul>\n </li>\n );\n};\n\nexport default CategoryElement;\n"]}
1
+ {"version":3,"file":"category-element.js","sourceRoot":"lib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BAAgB,EAAE,QAAQ,EAC1B,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAC9B,OAAO,EAAE,OAAO,EAChB,mBAAmB,EAAE,mBAAmB,GACxC,CACH,CACE,CACF,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { CategoryProps } from '../interfaces';\nimport React from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport ItemsList from '../items-list';\n\nconst CategoryElement = ({\n item,\n onItemActivate,\n onGroupToggle,\n targetItem,\n isHighlighted,\n isKeyboardHighlight,\n isExpanded,\n highlightItem,\n disabled,\n variant,\n hasExpandableGroups,\n}: CategoryProps) => {\n // Hide the category title element from screen readers because it will be\n // provided as an ARIA label.\n return (\n <li\n className={clsx(styles.category, styles[`variant-${variant}`], disabled && styles.disabled)}\n role=\"presentation\"\n aria-disabled={disabled ? 'true' : undefined}\n >\n {item.text && (\n <p className={clsx(styles.header, { [styles.disabled]: disabled })} aria-hidden=\"true\">\n {item.text}\n </p>\n )}\n <ul className={clsx(styles['items-list-container'])} role=\"group\" aria-label={item.text}>\n {item.items && (\n <ItemsList\n items={item.items}\n onItemActivate={onItemActivate}\n onGroupToggle={onGroupToggle}\n targetItem={targetItem}\n isHighlighted={isHighlighted}\n isKeyboardHighlight={isKeyboardHighlight}\n isExpanded={isExpanded}\n highlightItem={highlightItem}\n categoryDisabled={disabled}\n hasCategoryHeader={!!item.text}\n variant={variant}\n hasExpandableGroups={hasExpandableGroups}\n />\n )}\n </ul>\n </li>\n );\n};\n\nexport default CategoryElement;\n"]}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { CategoryProps } from '../interfaces';
3
- declare const ExpandableCategoryElement: ({ item, onItemActivate, onGroupToggle, targetItem, isHighlighted, isKeyboardHighlight, isExpanded, highlightItem, disabled, expandToViewport, variant, }: CategoryProps) => JSX.Element;
3
+ declare const ExpandableCategoryElement: ({ item, onItemActivate, onGroupToggle, targetItem, isHighlighted, isKeyboardHighlight, isExpanded, highlightItem, disabled, expandToViewport, variant, hasExpandableGroups, }: CategoryProps) => JSX.Element;
4
4
  export default ExpandableCategoryElement;
5
5
  //# sourceMappingURL=expandable-category-element.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"expandable-category-element.d.ts","sourceRoot":"lib/default/","sources":["button-dropdown/category-elements/expandable-category-element.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAK9C,QAAA,MAAM,yBAAyB,6JAY5B,aAAa,gBA0Gf,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"expandable-category-element.d.ts","sourceRoot":"lib/default/","sources":["button-dropdown/category-elements/expandable-category-element.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAK9C,QAAA,MAAM,yBAAyB,kLAa5B,aAAa,gBA2Gf,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -9,7 +9,7 @@ import Dropdown from '../../internal/components/dropdown';
9
9
  import useHiddenDescription from '../utils/use-hidden-description';
10
10
  import Tooltip from '../tooltip.js';
11
11
  import { getMenuItemProps } from '../utils/menu-item';
12
- const ExpandableCategoryElement = ({ item, onItemActivate, onGroupToggle, targetItem, isHighlighted, isKeyboardHighlight, isExpanded, highlightItem, disabled, expandToViewport, variant, }) => {
12
+ const ExpandableCategoryElement = ({ item, onItemActivate, onGroupToggle, targetItem, isHighlighted, isKeyboardHighlight, isExpanded, highlightItem, disabled, expandToViewport, variant, hasExpandableGroups, }) => {
13
13
  const highlighted = isHighlighted(item);
14
14
  const expanded = isExpanded(item);
15
15
  const isKeyboardHighlighted = isKeyboardHighlight(item);
@@ -58,7 +58,7 @@ const ExpandableCategoryElement = ({ item, onItemActivate, onGroupToggle, target
58
58
  }
59
59
  else {
60
60
  content = (React.createElement(Dropdown, { open: expanded, stretchWidth: false, interior: true, expandToViewport: expandToViewport, trigger: trigger }, item.items && expanded && (React.createElement("ul", { role: "menu", "aria-label": item.text, className: clsx(styles['items-list-container']) },
61
- React.createElement(ItemsList, { items: item.items, onItemActivate: onItemActivate, onGroupToggle: onGroupToggle, targetItem: targetItem, isHighlighted: isHighlighted, isKeyboardHighlight: isKeyboardHighlight, isExpanded: isExpanded, highlightItem: highlightItem, variant: variant })))));
61
+ React.createElement(ItemsList, { items: item.items, onItemActivate: onItemActivate, onGroupToggle: onGroupToggle, targetItem: targetItem, isHighlighted: isHighlighted, isKeyboardHighlight: isKeyboardHighlight, isExpanded: isExpanded, highlightItem: highlightItem, variant: variant, hasExpandableGroups: hasExpandableGroups })))));
62
62
  }
63
63
  return (React.createElement("li", { className: clsx(styles.category, styles[`variant-${variant}`], styles.expandable, {
64
64
  [styles.expanded]: expanded,
@@ -1 +1 @@
1
- {"version":3,"file":"expandable-category-element.js","sourceRoot":"lib/default/","sources":["button-dropdown/category-elements/expandable-category-element.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAO,QAAQ,MAAM,oCAAoC,CAAC;AAE1D,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AACnE,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,yBAAyB,GAAG,CAAC,EACjC,IAAI,EACJ,cAAc,EACd,aAAa,EACb,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,aAAa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AAE,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;YACpF,oBAAC,SAAS,IACR,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,GAChB,CACC,CACN,CACQ,CACZ,CAAC;KACH;IAED,OAAO,CACL,4BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE;YAChF,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;YAC3B,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;YAC3B,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,WAAW;SAClC,CAAC,EACF,IAAI,EAAC,cAAc,iBACN,IAAI,CAAC,EAAE,EACpB,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,OAAO,EACrB,YAAY,EAAE,OAAO,IAEpB,OAAO,CACL,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\n\nimport InternalIcon from '../../icon/internal';\nimport ItemsList from '../items-list';\nimport Dropdown from '../../internal/components/dropdown';\nimport { CategoryProps } from '../interfaces';\nimport useHiddenDescription from '../utils/use-hidden-description';\nimport Tooltip from '../tooltip.js';\nimport { getMenuItemProps } from '../utils/menu-item';\n\nconst ExpandableCategoryElement = ({\n item,\n onItemActivate,\n onGroupToggle,\n targetItem,\n isHighlighted,\n isKeyboardHighlight,\n isExpanded,\n highlightItem,\n disabled,\n expandToViewport,\n variant,\n}: CategoryProps) => {\n const highlighted = isHighlighted(item);\n const expanded = isExpanded(item);\n const isKeyboardHighlighted = isKeyboardHighlight(item);\n const triggerRef = React.useRef<HTMLSpanElement>(null);\n const ref = useRef<HTMLLIElement>(null);\n\n useEffect(() => {\n if (triggerRef.current && highlighted && !expanded) {\n triggerRef.current.focus();\n }\n }, [expanded, highlighted]);\n\n const onClick: React.MouseEventHandler = event => {\n if (!disabled) {\n event.preventDefault();\n onGroupToggle(item, event);\n triggerRef.current?.focus();\n }\n };\n\n const onHover = () => {\n highlightItem(item);\n };\n\n const isDisabledWithReason = !!item.disabledReason && item.disabled;\n const { targetProps, descriptionEl } = useHiddenDescription(item.disabledReason);\n const trigger = item.text && (\n <span\n className={clsx(styles.header, styles['expandable-header'], styles[`variant-${variant}`], {\n [styles.disabled]: disabled,\n [styles.highlighted]: highlighted,\n [styles['is-focused']]: isKeyboardHighlighted,\n })}\n // We are using the roving tabindex technique to manage the focus state of the dropdown.\n // The current element will always have tabindex=0 which means that it can be tabbed to,\n // while all other items have tabindex=-1 so we can focus them when necessary.\n tabIndex={highlighted ? 0 : -1}\n ref={triggerRef}\n {...getMenuItemProps({ parent: true, expanded, disabled })}\n {...(isDisabledWithReason ? targetProps : {})}\n >\n {item.text}\n <span className={clsx(styles['expand-icon'], styles['expand-icon-right'])}>\n <InternalIcon name=\"caret-down-filled\" />\n </span>\n </span>\n );\n\n let content: React.ReactNode;\n // If the category element is disabled, we do not render a dropdown.\n // Screenreaders are confused by additional sections\n if (isDisabledWithReason) {\n content = (\n <Tooltip content={item.disabledReason}>\n {trigger}\n {descriptionEl}\n </Tooltip>\n );\n } else if (disabled) {\n content = trigger;\n } else {\n content = (\n <Dropdown\n open={expanded}\n stretchWidth={false}\n interior={true}\n expandToViewport={expandToViewport}\n trigger={trigger}\n >\n {item.items && expanded && (\n <ul role=\"menu\" aria-label={item.text} className={clsx(styles['items-list-container'])}>\n <ItemsList\n items={item.items}\n onItemActivate={onItemActivate}\n onGroupToggle={onGroupToggle}\n targetItem={targetItem}\n isHighlighted={isHighlighted}\n isKeyboardHighlight={isKeyboardHighlight}\n isExpanded={isExpanded}\n highlightItem={highlightItem}\n variant={variant}\n />\n </ul>\n )}\n </Dropdown>\n );\n }\n\n return (\n <li\n className={clsx(styles.category, styles[`variant-${variant}`], styles.expandable, {\n [styles.expanded]: expanded,\n [styles.disabled]: disabled,\n [styles.highlighted]: highlighted,\n })}\n role=\"presentation\"\n data-testid={item.id}\n ref={ref}\n onClick={onClick}\n onMouseEnter={onHover}\n onTouchStart={onHover}\n >\n {content}\n </li>\n );\n};\n\nexport default ExpandableCategoryElement;\n"]}
1
+ {"version":3,"file":"expandable-category-element.js","sourceRoot":"lib/default/","sources":["button-dropdown/category-elements/expandable-category-element.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAO,QAAQ,MAAM,oCAAoC,CAAC;AAE1D,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AACnE,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,yBAAyB,GAAG,CAAC,EACjC,IAAI,EACJ,cAAc,EACd,aAAa,EACb,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,mBAAmB,GACL,EAAE,EAAE;IAClB,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,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EACjB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,EAChB,mBAAmB,EAAE,mBAAmB,GACxC,CACC,CACN,CACQ,CACZ,CAAC;KACH;IAED,OAAO,CACL,4BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE;YAChF,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;YAC3B,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;YAC3B,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,WAAW;SAClC,CAAC,EACF,IAAI,EAAC,cAAc,iBACN,IAAI,CAAC,EAAE,EACpB,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,OAAO,EACrB,YAAY,EAAE,OAAO,IAEpB,OAAO,CACL,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\n\nimport InternalIcon from '../../icon/internal';\nimport ItemsList from '../items-list';\nimport Dropdown from '../../internal/components/dropdown';\nimport { CategoryProps } from '../interfaces';\nimport useHiddenDescription from '../utils/use-hidden-description';\nimport Tooltip from '../tooltip.js';\nimport { getMenuItemProps } from '../utils/menu-item';\n\nconst ExpandableCategoryElement = ({\n item,\n onItemActivate,\n onGroupToggle,\n targetItem,\n isHighlighted,\n isKeyboardHighlight,\n isExpanded,\n highlightItem,\n disabled,\n expandToViewport,\n variant,\n hasExpandableGroups,\n}: CategoryProps) => {\n const highlighted = isHighlighted(item);\n const expanded = isExpanded(item);\n const isKeyboardHighlighted = isKeyboardHighlight(item);\n const triggerRef = React.useRef<HTMLSpanElement>(null);\n const ref = useRef<HTMLLIElement>(null);\n\n useEffect(() => {\n if (triggerRef.current && highlighted && !expanded) {\n triggerRef.current.focus();\n }\n }, [expanded, highlighted]);\n\n const onClick: React.MouseEventHandler = event => {\n if (!disabled) {\n event.preventDefault();\n onGroupToggle(item, event);\n triggerRef.current?.focus();\n }\n };\n\n const onHover = () => {\n highlightItem(item);\n };\n\n const isDisabledWithReason = !!item.disabledReason && item.disabled;\n const { targetProps, descriptionEl } = useHiddenDescription(item.disabledReason);\n const trigger = item.text && (\n <span\n className={clsx(styles.header, styles['expandable-header'], styles[`variant-${variant}`], {\n [styles.disabled]: disabled,\n [styles.highlighted]: highlighted,\n [styles['is-focused']]: isKeyboardHighlighted,\n })}\n // We are using the roving tabindex technique to manage the focus state of the dropdown.\n // The current element will always have tabindex=0 which means that it can be tabbed to,\n // while all other items have tabindex=-1 so we can focus them when necessary.\n tabIndex={highlighted ? 0 : -1}\n ref={triggerRef}\n {...getMenuItemProps({ parent: true, expanded, disabled })}\n {...(isDisabledWithReason ? targetProps : {})}\n >\n {item.text}\n <span className={clsx(styles['expand-icon'], styles['expand-icon-right'])}>\n <InternalIcon name=\"caret-down-filled\" />\n </span>\n </span>\n );\n\n let content: React.ReactNode;\n // If the category element is disabled, we do not render a dropdown.\n // Screenreaders are confused by additional sections\n if (isDisabledWithReason) {\n content = (\n <Tooltip content={item.disabledReason}>\n {trigger}\n {descriptionEl}\n </Tooltip>\n );\n } else if (disabled) {\n content = trigger;\n } else {\n content = (\n <Dropdown\n open={expanded}\n stretchWidth={false}\n interior={true}\n expandToViewport={expandToViewport}\n trigger={trigger}\n >\n {item.items && expanded && (\n <ul role=\"menu\" aria-label={item.text} className={clsx(styles['items-list-container'])}>\n <ItemsList\n items={item.items}\n onItemActivate={onItemActivate}\n onGroupToggle={onGroupToggle}\n targetItem={targetItem}\n isHighlighted={isHighlighted}\n isKeyboardHighlight={isKeyboardHighlight}\n isExpanded={isExpanded}\n highlightItem={highlightItem}\n variant={variant}\n hasExpandableGroups={hasExpandableGroups}\n />\n </ul>\n )}\n </Dropdown>\n );\n }\n\n return (\n <li\n className={clsx(styles.category, styles[`variant-${variant}`], styles.expandable, {\n [styles.expanded]: expanded,\n [styles.disabled]: disabled,\n [styles.highlighted]: highlighted,\n })}\n role=\"presentation\"\n data-testid={item.id}\n ref={ref}\n onClick={onClick}\n onMouseEnter={onHover}\n onTouchStart={onHover}\n >\n {content}\n </li>\n );\n};\n\nexport default ExpandableCategoryElement;\n"]}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { CategoryProps } from '../interfaces';
3
- declare const MobileExpandableCategoryElement: ({ item, onItemActivate, onGroupToggle, targetItem, isHighlighted, isKeyboardHighlight, isExpanded, highlightItem, disabled, variant, }: CategoryProps) => JSX.Element;
3
+ declare const MobileExpandableCategoryElement: ({ item, onItemActivate, onGroupToggle, targetItem, isHighlighted, isKeyboardHighlight, isExpanded, highlightItem, disabled, variant, hasExpandableGroups, }: CategoryProps) => JSX.Element;
4
4
  export default MobileExpandableCategoryElement;
5
5
  //# sourceMappingURL=mobile-expandable-category-element.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mobile-expandable-category-element.d.ts","sourceRoot":"lib/default/","sources":["button-dropdown/category-elements/mobile-expandable-category-element.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAK9C,QAAA,MAAM,+BAA+B,2IAWlC,aAAa,gBAuGf,CAAC;AAEF,eAAe,+BAA+B,CAAC"}
1
+ {"version":3,"file":"mobile-expandable-category-element.d.ts","sourceRoot":"lib/default/","sources":["button-dropdown/category-elements/mobile-expandable-category-element.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAK9C,QAAA,MAAM,+BAA+B,gKAYlC,aAAa,gBAwGf,CAAC;AAEF,eAAe,+BAA+B,CAAC"}
@@ -9,7 +9,7 @@ import MobileExpandableGroup from '../mobile-expandable-group/mobile-expandable-
9
9
  import Tooltip from '../tooltip.js';
10
10
  import useHiddenDescription from '../utils/use-hidden-description.js';
11
11
  import { getMenuItemProps } from '../utils/menu-item.js';
12
- const MobileExpandableCategoryElement = ({ item, onItemActivate, onGroupToggle, targetItem, isHighlighted, isKeyboardHighlight, isExpanded, highlightItem, disabled, variant, }) => {
12
+ const MobileExpandableCategoryElement = ({ item, onItemActivate, onGroupToggle, targetItem, isHighlighted, isKeyboardHighlight, isExpanded, highlightItem, disabled, variant, hasExpandableGroups, }) => {
13
13
  const highlighted = isHighlighted(item);
14
14
  const expanded = isExpanded(item);
15
15
  const isKeyboardHighlighted = isKeyboardHighlight(item);
@@ -56,7 +56,7 @@ const MobileExpandableCategoryElement = ({ item, onItemActivate, onGroupToggle,
56
56
  }
57
57
  else {
58
58
  content = (React.createElement(MobileExpandableGroup, { open: expanded, trigger: trigger }, item.items && expanded && (React.createElement("ul", { role: "menu", "aria-label": item.text, className: clsx(styles['items-list-container']) },
59
- React.createElement(ItemsList, { items: item.items, onItemActivate: onItemActivate, onGroupToggle: onGroupToggle, targetItem: targetItem, isHighlighted: isHighlighted, isKeyboardHighlight: isKeyboardHighlight, isExpanded: isExpanded, highlightItem: highlightItem, hasCategoryHeader: true, variant: variant })))));
59
+ React.createElement(ItemsList, { items: item.items, onItemActivate: onItemActivate, onGroupToggle: onGroupToggle, targetItem: targetItem, isHighlighted: isHighlighted, isKeyboardHighlight: isKeyboardHighlight, isExpanded: isExpanded, highlightItem: highlightItem, hasCategoryHeader: true, variant: variant, hasExpandableGroups: hasExpandableGroups })))));
60
60
  }
61
61
  return (React.createElement("li", { className: clsx(styles.category, styles[`variant-${variant}`], styles.expandable, {
62
62
  [styles.expanded]: expanded,
@@ -1 +1 @@
1
- {"version":3,"file":"mobile-expandable-category-element.js","sourceRoot":"lib/default/","sources":["button-dropdown/category-elements/mobile-expandable-category-element.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAO,qBAAqB,MAAM,oDAAoD,CAAC;AAEvF,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,oBAAoB,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,+BAA+B,GAAG,CAAC,EACvC,IAAI,EACJ,cAAc,EACd,aAAa,EACb,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,aAAa,EACb,QAAQ,EACR,OAAO,GACO,EAAE,EAAE;IAClB,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,qBAAqB,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACxD,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAkB,IAAI,CAAC,CAAC;IAEvD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,UAAU,CAAC,OAAO,IAAI,WAAW,IAAI,CAAC,QAAQ,EAAE;YAClD,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;SAC5B;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;IAE5B,MAAM,OAAO,GAAG,CAAC,CAAmB,EAAE,EAAE;QACtC,IAAI,CAAC,QAAQ,EAAE;YACb,CAAC,CAAC,cAAc,EAAE,CAAC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C1B,CAAC,EACF,IAAI,EAAC,cAAc,EACnB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,OAAO,EACrB,YAAY,EAAE,OAAO,iBACR,IAAI,CAAC,EAAE,IAEnB,OAAO,CACL,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,+BAA+B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect } from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\n\nimport InternalIcon from '../../icon/internal';\nimport ItemsList from '../items-list';\nimport MobileExpandableGroup from '../mobile-expandable-group/mobile-expandable-group';\nimport { CategoryProps } from '../interfaces';\nimport Tooltip from '../tooltip.js';\nimport useHiddenDescription from '../utils/use-hidden-description.js';\nimport { getMenuItemProps } from '../utils/menu-item.js';\n\nconst MobileExpandableCategoryElement = ({\n item,\n onItemActivate,\n onGroupToggle,\n targetItem,\n isHighlighted,\n isKeyboardHighlight,\n isExpanded,\n highlightItem,\n disabled,\n variant,\n}: CategoryProps) => {\n const highlighted = isHighlighted(item);\n const expanded = isExpanded(item);\n const isKeyboardHighlighted = isKeyboardHighlight(item);\n const triggerRef = React.useRef<HTMLSpanElement>(null);\n\n useEffect(() => {\n if (triggerRef.current && highlighted && !expanded) {\n triggerRef.current.focus();\n }\n }, [expanded, highlighted]);\n\n const onClick = (e: React.MouseEvent) => {\n if (!disabled) {\n e.preventDefault();\n onGroupToggle(item, e);\n }\n };\n\n const onHover = () => {\n highlightItem(item);\n };\n\n const isDisabledWithReason = !!item.disabledReason && item.disabled;\n const { targetProps, descriptionEl } = useHiddenDescription(item.disabledReason);\n const trigger = item.text && (\n <span\n className={clsx(styles.header, styles['expandable-header'], styles[`variant-${variant}`], {\n [styles.highlighted]: highlighted,\n [styles['rolled-down']]: expanded,\n [styles.disabled]: disabled,\n [styles['is-focused']]: isKeyboardHighlighted,\n })}\n // We are using the roving tabindex technique to manage the focus state of the dropdown.\n // The current element will always have tabindex=0 which means that it can be tabbed to,\n // while all other items have tabindex=-1 so we can focus them when necessary.\n tabIndex={highlighted ? 0 : -1}\n ref={triggerRef}\n {...getMenuItemProps({ parent: true, disabled, expanded })}\n {...(isDisabledWithReason ? targetProps : {})}\n >\n {item.text}\n <span\n className={clsx(styles['expand-icon'], {\n [styles['expand-icon-up']]: expanded,\n })}\n >\n <InternalIcon name=\"caret-down-filled\" />\n </span>\n </span>\n );\n\n let content: React.ReactNode;\n\n if (isDisabledWithReason) {\n content = (\n <>\n {descriptionEl}\n <Tooltip content={item.disabledReason}>{trigger}</Tooltip>\n </>\n );\n } else if (disabled) {\n content = trigger;\n } else {\n content = (\n <MobileExpandableGroup open={expanded} trigger={trigger}>\n {item.items && expanded && (\n <ul role=\"menu\" aria-label={item.text} className={clsx(styles['items-list-container'])}>\n <ItemsList\n items={item.items}\n onItemActivate={onItemActivate}\n onGroupToggle={onGroupToggle}\n targetItem={targetItem}\n isHighlighted={isHighlighted}\n isKeyboardHighlight={isKeyboardHighlight}\n isExpanded={isExpanded}\n highlightItem={highlightItem}\n hasCategoryHeader={true}\n variant={variant}\n />\n </ul>\n )}\n </MobileExpandableGroup>\n );\n }\n\n return (\n <li\n className={clsx(styles.category, styles[`variant-${variant}`], styles.expandable, {\n [styles.expanded]: expanded,\n [styles.disabled]: disabled,\n [styles.highlighted]: highlighted || expanded,\n [styles.expandable]: true,\n })}\n role=\"presentation\"\n onClick={onClick}\n onMouseEnter={onHover}\n onTouchStart={onHover}\n data-testid={item.id}\n >\n {content}\n </li>\n );\n};\n\nexport default MobileExpandableCategoryElement;\n"]}
1
+ {"version":3,"file":"mobile-expandable-category-element.js","sourceRoot":"lib/default/","sources":["button-dropdown/category-elements/mobile-expandable-category-element.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,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AC,CAAC;AAEF,eAAe,+BAA+B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect } from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\n\nimport InternalIcon from '../../icon/internal';\nimport ItemsList from '../items-list';\nimport MobileExpandableGroup from '../mobile-expandable-group/mobile-expandable-group';\nimport { CategoryProps } from '../interfaces';\nimport Tooltip from '../tooltip.js';\nimport useHiddenDescription from '../utils/use-hidden-description.js';\nimport { getMenuItemProps } from '../utils/menu-item.js';\n\nconst MobileExpandableCategoryElement = ({\n item,\n onItemActivate,\n onGroupToggle,\n targetItem,\n isHighlighted,\n isKeyboardHighlight,\n isExpanded,\n highlightItem,\n disabled,\n variant,\n hasExpandableGroups,\n}: CategoryProps) => {\n const highlighted = isHighlighted(item);\n const expanded = isExpanded(item);\n const isKeyboardHighlighted = isKeyboardHighlight(item);\n const triggerRef = React.useRef<HTMLSpanElement>(null);\n\n useEffect(() => {\n if (triggerRef.current && highlighted && !expanded) {\n triggerRef.current.focus();\n }\n }, [expanded, highlighted]);\n\n const onClick = (e: React.MouseEvent) => {\n if (!disabled) {\n e.preventDefault();\n onGroupToggle(item, e);\n }\n };\n\n const onHover = () => {\n highlightItem(item);\n };\n\n const isDisabledWithReason = !!item.disabledReason && item.disabled;\n const { targetProps, descriptionEl } = useHiddenDescription(item.disabledReason);\n const trigger = item.text && (\n <span\n className={clsx(styles.header, styles['expandable-header'], styles[`variant-${variant}`], {\n [styles.highlighted]: highlighted,\n [styles['rolled-down']]: expanded,\n [styles.disabled]: disabled,\n [styles['is-focused']]: isKeyboardHighlighted,\n })}\n // We are using the roving tabindex technique to manage the focus state of the dropdown.\n // The current element will always have tabindex=0 which means that it can be tabbed to,\n // while all other items have tabindex=-1 so we can focus them when necessary.\n tabIndex={highlighted ? 0 : -1}\n ref={triggerRef}\n {...getMenuItemProps({ parent: true, disabled, expanded })}\n {...(isDisabledWithReason ? targetProps : {})}\n >\n {item.text}\n <span\n className={clsx(styles['expand-icon'], {\n [styles['expand-icon-up']]: expanded,\n })}\n >\n <InternalIcon name=\"caret-down-filled\" />\n </span>\n </span>\n );\n\n let content: React.ReactNode;\n\n if (isDisabledWithReason) {\n content = (\n <>\n {descriptionEl}\n <Tooltip content={item.disabledReason}>{trigger}</Tooltip>\n </>\n );\n } else if (disabled) {\n content = trigger;\n } else {\n content = (\n <MobileExpandableGroup open={expanded} trigger={trigger}>\n {item.items && expanded && (\n <ul role=\"menu\" aria-label={item.text} className={clsx(styles['items-list-container'])}>\n <ItemsList\n items={item.items}\n onItemActivate={onItemActivate}\n onGroupToggle={onGroupToggle}\n targetItem={targetItem}\n isHighlighted={isHighlighted}\n isKeyboardHighlight={isKeyboardHighlight}\n isExpanded={isExpanded}\n highlightItem={highlightItem}\n hasCategoryHeader={true}\n variant={variant}\n hasExpandableGroups={hasExpandableGroups}\n />\n </ul>\n )}\n </MobileExpandableGroup>\n );\n }\n\n return (\n <li\n className={clsx(styles.category, styles[`variant-${variant}`], styles.expandable, {\n [styles.expanded]: expanded,\n [styles.disabled]: disabled,\n [styles.highlighted]: highlighted || expanded,\n [styles.expandable]: true,\n })}\n role=\"presentation\"\n onClick={onClick}\n onMouseEnter={onHover}\n onTouchStart={onHover}\n data-testid={item.id}\n >\n {content}\n </li>\n );\n};\n\nexport default MobileExpandableCategoryElement;\n"]}
@@ -1,18 +1,18 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "header": "awsui_header_16mm3_q0qrm_93",
5
- "disabled": "awsui_disabled_16mm3_q0qrm_108",
6
- "expandable-header": "awsui_expandable-header_16mm3_q0qrm_112",
7
- "rolled-down": "awsui_rolled-down_16mm3_q0qrm_123",
8
- "highlighted": "awsui_highlighted_16mm3_q0qrm_126",
9
- "is-focused": "awsui_is-focused_16mm3_q0qrm_139",
10
- "variant-navigation": "awsui_variant-navigation_16mm3_q0qrm_143",
11
- "category": "awsui_category_16mm3_q0qrm_155",
12
- "expandable": "awsui_expandable_16mm3_q0qrm_112",
13
- "expand-icon": "awsui_expand-icon_16mm3_q0qrm_176",
14
- "expand-icon-up": "awsui_expand-icon-up_16mm3_q0qrm_183",
15
- "expand-icon-right": "awsui_expand-icon-right_16mm3_q0qrm_186",
16
- "items-list-container": "awsui_items-list-container_16mm3_q0qrm_200"
4
+ "header": "awsui_header_16mm3_1mgcq_93",
5
+ "disabled": "awsui_disabled_16mm3_1mgcq_108",
6
+ "expandable-header": "awsui_expandable-header_16mm3_1mgcq_112",
7
+ "rolled-down": "awsui_rolled-down_16mm3_1mgcq_123",
8
+ "highlighted": "awsui_highlighted_16mm3_1mgcq_126",
9
+ "is-focused": "awsui_is-focused_16mm3_1mgcq_139",
10
+ "category": "awsui_category_16mm3_1mgcq_144",
11
+ "expandable": "awsui_expandable_16mm3_1mgcq_112",
12
+ "variant-navigation": "awsui_variant-navigation_16mm3_1mgcq_158",
13
+ "expand-icon": "awsui_expand-icon_16mm3_1mgcq_165",
14
+ "expand-icon-up": "awsui_expand-icon-up_16mm3_1mgcq_172",
15
+ "expand-icon-right": "awsui_expand-icon-right_16mm3_1mgcq_175",
16
+ "items-list-container": "awsui_items-list-container_16mm3_1mgcq_189"
17
17
  };
18
18
 
@@ -90,7 +90,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
90
90
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
91
  SPDX-License-Identifier: Apache-2.0
92
92
  */
93
- .awsui_header_16mm3_q0qrm_93:not(#\9) {
93
+ .awsui_header_16mm3_1mgcq_93:not(#\9) {
94
94
  position: relative;
95
95
  margin: 0;
96
96
  color: var(--color-text-dropdown-group-label-4x4uyw, #414d5c);
@@ -105,25 +105,25 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
105
105
  ) calc(var(--space-button-horizontal-8jxzea, 20px) + var(--border-item-width-yel47s, 2px));
106
106
  z-index: 1;
107
107
  }
108
- .awsui_header_16mm3_q0qrm_93.awsui_disabled_16mm3_q0qrm_108:not(#\9) {
108
+ .awsui_header_16mm3_1mgcq_93.awsui_disabled_16mm3_1mgcq_108:not(#\9) {
109
109
  color: var(--color-text-dropdown-item-disabled-6oq3n6, #9ba7b6);
110
110
  cursor: default;
111
111
  }
112
- .awsui_header_16mm3_q0qrm_93.awsui_expandable-header_16mm3_q0qrm_112:not(#\9) {
112
+ .awsui_header_16mm3_1mgcq_93.awsui_expandable-header_16mm3_1mgcq_112:not(#\9) {
113
113
  border-top-color: var(--color-border-dropdown-group-yakmix, #b6bec9);
114
114
  border-bottom-color: var(--color-border-dropdown-group-yakmix, #b6bec9);
115
115
  cursor: pointer;
116
116
  }
117
- .awsui_header_16mm3_q0qrm_93.awsui_expandable-header_16mm3_q0qrm_112.awsui_disabled_16mm3_q0qrm_108:not(#\9) {
117
+ .awsui_header_16mm3_1mgcq_93.awsui_expandable-header_16mm3_1mgcq_112.awsui_disabled_16mm3_1mgcq_108:not(#\9) {
118
118
  cursor: default;
119
119
  }
120
- .awsui_header_16mm3_q0qrm_93.awsui_expandable-header_16mm3_q0qrm_112:not(#\9):focus {
120
+ .awsui_header_16mm3_1mgcq_93.awsui_expandable-header_16mm3_1mgcq_112:not(#\9):focus {
121
121
  outline: none;
122
122
  }
123
- .awsui_header_16mm3_q0qrm_93.awsui_expandable-header_16mm3_q0qrm_112.awsui_rolled-down_16mm3_q0qrm_123:not(#\9) {
123
+ .awsui_header_16mm3_1mgcq_93.awsui_expandable-header_16mm3_1mgcq_112.awsui_rolled-down_16mm3_1mgcq_123:not(#\9) {
124
124
  border-bottom-color: transparent;
125
125
  }
126
- .awsui_header_16mm3_q0qrm_93.awsui_expandable-header_16mm3_q0qrm_112.awsui_highlighted_16mm3_q0qrm_126:not(#\9) {
126
+ .awsui_header_16mm3_1mgcq_93.awsui_expandable-header_16mm3_1mgcq_112.awsui_highlighted_16mm3_1mgcq_126:not(#\9) {
127
127
  background-color: var(--color-background-dropdown-item-hover-swsulg, #f4f4f4);
128
128
  color: var(--color-text-dropdown-item-highlighted-a51hdb, #000716);
129
129
  padding: var(--space-xxs-p8yyaw, 4px) var(--space-button-horizontal-8jxzea, 20px);
@@ -131,73 +131,62 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
131
131
  border-radius: var(--border-radius-item-05df9h, 8px);
132
132
  z-index: 2;
133
133
  }
134
- .awsui_header_16mm3_q0qrm_93.awsui_expandable-header_16mm3_q0qrm_112.awsui_highlighted_16mm3_q0qrm_126.awsui_disabled_16mm3_q0qrm_108:not(#\9) {
134
+ .awsui_header_16mm3_1mgcq_93.awsui_expandable-header_16mm3_1mgcq_112.awsui_highlighted_16mm3_1mgcq_126.awsui_disabled_16mm3_1mgcq_108:not(#\9) {
135
135
  background-color: var(--color-background-dropdown-item-dimmed-dlm6wk, transparent);
136
136
  border-color: var(--color-border-dropdown-item-dimmed-hover-xdu0hf, #7d8998);
137
137
  color: var(--color-text-dropdown-item-dimmed-f2joj8, #9ba7b6);
138
138
  }
139
- .awsui_header_16mm3_q0qrm_93.awsui_expandable-header_16mm3_q0qrm_112.awsui_highlighted_16mm3_q0qrm_126.awsui_is-focused_16mm3_q0qrm_139:not(#\9) {
139
+ .awsui_header_16mm3_1mgcq_93.awsui_expandable-header_16mm3_1mgcq_112.awsui_highlighted_16mm3_1mgcq_126.awsui_is-focused_16mm3_1mgcq_139:not(#\9) {
140
140
  border-color: var(--color-border-dropdown-item-focused-5hbaf3, #414d5c);
141
141
  box-shadow: inset 0 0 0 var(--border-control-focus-ring-shadow-spread-0ctpjf, 0px) var(--color-border-item-focused-b2ntyl, #0972d3);
142
142
  }
143
- .awsui_header_16mm3_q0qrm_93.awsui_expandable-header_16mm3_q0qrm_112.awsui_variant-navigation_16mm3_q0qrm_143:not(#\9) {
144
- padding-top: var(--space-xs-zb16t3, 8px);
145
- padding-bottom: var(--space-xs-zb16t3, 8px);
146
- }
147
- .awsui_header_16mm3_q0qrm_93.awsui_expandable-header_16mm3_q0qrm_112.awsui_variant-navigation_16mm3_q0qrm_143.awsui_highlighted_16mm3_q0qrm_126:not(#\9) {
148
- border-color: transparent;
149
- border-top-color: var(--color-border-dropdown-group-yakmix, #b6bec9);
150
- border-bottom-color: var(--color-border-dropdown-group-yakmix, #b6bec9);
151
- background-color: transparent;
152
- color: var(--color-text-accent-n2acxv, #0972d3);
153
- }
154
143
 
155
- .awsui_category_16mm3_q0qrm_155:not(#\9) {
144
+ .awsui_category_16mm3_1mgcq_144:not(#\9) {
156
145
  list-style: none;
157
146
  margin-top: calc(-1 * var(--border-divider-list-width-27y3k5, 1px));
158
147
  padding: 0;
159
148
  }
160
- .awsui_category_16mm3_q0qrm_155:not(#\9):first-child {
149
+ .awsui_category_16mm3_1mgcq_144:not(#\9):first-child {
161
150
  margin-top: 0;
162
151
  }
163
- .awsui_category_16mm3_q0qrm_155.awsui_expandable_16mm3_q0qrm_112:not(#\9) {
152
+ .awsui_category_16mm3_1mgcq_144.awsui_expandable_16mm3_1mgcq_112:not(#\9) {
164
153
  border-top: 0;
165
154
  }
166
- .awsui_category_16mm3_q0qrm_155:not(#\9):last-child {
155
+ .awsui_category_16mm3_1mgcq_144:not(#\9):last-child {
167
156
  border-bottom: none;
168
157
  }
169
- .awsui_category_16mm3_q0qrm_155.awsui_variant-navigation_16mm3_q0qrm_143:not(#\9) {
158
+ .awsui_category_16mm3_1mgcq_144.awsui_variant-navigation_16mm3_1mgcq_158:not(#\9) {
170
159
  padding-top: var(--space-xxs-p8yyaw, 4px);
171
160
  }
172
- .awsui_category_16mm3_q0qrm_155.awsui_variant-navigation_16mm3_q0qrm_143.awsui_expandable_16mm3_q0qrm_112:not(#\9) {
161
+ .awsui_category_16mm3_1mgcq_144.awsui_variant-navigation_16mm3_1mgcq_158.awsui_expandable_16mm3_1mgcq_112:not(#\9) {
173
162
  padding-top: 0;
174
163
  }
175
164
 
176
- .awsui_expand-icon_16mm3_q0qrm_176:not(#\9) {
165
+ .awsui_expand-icon_16mm3_1mgcq_165:not(#\9) {
177
166
  position: relative;
178
167
  left: var(--space-s-34lx8l, 12px);
179
168
  width: var(--space-m-udix3p, 16px);
180
169
  display: inline-block;
181
170
  transition: transform var(--motion-duration-rotate-180-dpvl4m, 135ms) var(--motion-easing-rotate-180-e270ko, cubic-bezier(0.165, 0.84, 0.44, 1));
182
171
  }
183
- .awsui_expand-icon-up_16mm3_q0qrm_183:not(#\9) {
172
+ .awsui_expand-icon-up_16mm3_1mgcq_172:not(#\9) {
184
173
  transform: rotate(-180deg);
185
174
  }
186
- .awsui_expand-icon-right_16mm3_q0qrm_186:not(#\9) {
175
+ .awsui_expand-icon-right_16mm3_1mgcq_175:not(#\9) {
187
176
  transform: rotate(-90deg);
188
177
  }
189
178
  @media (prefers-reduced-motion: reduce) {
190
- .awsui_expand-icon_16mm3_q0qrm_176:not(#\9) {
179
+ .awsui_expand-icon_16mm3_1mgcq_165:not(#\9) {
191
180
  animation: none;
192
181
  transition: none;
193
182
  }
194
183
  }
195
- .awsui-motion-disabled .awsui_expand-icon_16mm3_q0qrm_176:not(#\9), .awsui-mode-entering .awsui_expand-icon_16mm3_q0qrm_176:not(#\9) {
184
+ .awsui-motion-disabled .awsui_expand-icon_16mm3_1mgcq_165:not(#\9), .awsui-mode-entering .awsui_expand-icon_16mm3_1mgcq_165:not(#\9) {
196
185
  animation: none;
197
186
  transition: none;
198
187
  }
199
188
 
200
- .awsui_items-list-container_16mm3_q0qrm_200:not(#\9) {
189
+ .awsui_items-list-container_16mm3_1mgcq_189:not(#\9) {
201
190
  padding: 0;
202
191
  margin: -1px 0 0 0;
203
192
  overflow-y: auto;