@cloudscape-design/components-themeable 3.0.1311 → 3.0.1313

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 (219) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/app-layout/visual-refresh/drawers.scss +16 -0
  3. package/lib/internal/scss/app-layout/visual-refresh/navigation.scss +1 -1
  4. package/lib/internal/scss/app-layout/visual-refresh/tools.scss +4 -0
  5. package/lib/internal/scss/app-layout/visual-refresh-toolbar/drawer/styles.scss +1 -1
  6. package/lib/internal/scss/app-layout/visual-refresh-toolbar/navigation/styles.scss +1 -1
  7. package/lib/internal/scss/button-dropdown/category-elements/styles.scss +5 -0
  8. package/lib/internal/scss/button-dropdown/styles.scss +18 -0
  9. package/lib/internal/scss/expandable-section/styles.scss +17 -0
  10. package/lib/internal/scss/internal/components/button-trigger/styles.scss +7 -0
  11. package/lib/internal/scss/internal/components/drag-handle/styles.scss +5 -1
  12. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  13. package/lib/internal/scss/internal/styles/utils/theming.scss +6 -0
  14. package/lib/internal/scss/segmented-control/styles.scss +2 -2
  15. package/lib/internal/scss/status-indicator/styles.scss +36 -0
  16. package/lib/internal/scss/steps/styles.scss +39 -0
  17. package/lib/internal/scss/table/header-cell/styles.scss +12 -1
  18. package/lib/internal/scss/table/resizer/styles.scss +9 -1
  19. package/lib/internal/scss/toggle/styles.scss +1 -1
  20. package/lib/internal/scss/toggle-button/styles.scss +7 -1
  21. package/lib/internal/scss/token/mixins.scss +4 -4
  22. package/lib/internal/scss/token/styles.scss +7 -0
  23. package/lib/internal/scss/tree-view/tree-item/styles.scss +10 -0
  24. package/lib/internal/template/app-layout/runtime-drawer/index.js +1 -1
  25. package/lib/internal/template/app-layout/runtime-drawer/index.js.map +1 -1
  26. package/lib/internal/template/app-layout/visual-refresh/drawers.d.ts.map +1 -1
  27. package/lib/internal/template/app-layout/visual-refresh/drawers.js +3 -0
  28. package/lib/internal/template/app-layout/visual-refresh/drawers.js.map +1 -1
  29. package/lib/internal/template/app-layout/visual-refresh/styles.css.js +87 -86
  30. package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +176 -164
  31. package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +87 -86
  32. package/lib/internal/template/app-layout/visual-refresh/tools.d.ts.map +1 -1
  33. package/lib/internal/template/app-layout/visual-refresh/tools.js +2 -0
  34. package/lib/internal/template/app-layout/visual-refresh/tools.js.map +1 -1
  35. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +32 -32
  36. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +84 -84
  37. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +32 -32
  38. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
  39. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +6 -6
  40. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
  41. package/lib/internal/template/breadcrumb-group/implementation.d.ts.map +1 -1
  42. package/lib/internal/template/breadcrumb-group/implementation.js +2 -2
  43. package/lib/internal/template/breadcrumb-group/implementation.js.map +1 -1
  44. package/lib/internal/template/breadcrumb-group/item/item.d.ts.map +1 -1
  45. package/lib/internal/template/breadcrumb-group/item/item.js +2 -1
  46. package/lib/internal/template/breadcrumb-group/item/item.js.map +1 -1
  47. package/lib/internal/template/button/internal.d.ts +3 -0
  48. package/lib/internal/template/button/internal.d.ts.map +1 -1
  49. package/lib/internal/template/button/internal.js +2 -2
  50. package/lib/internal/template/button/internal.js.map +1 -1
  51. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.d.ts.map +1 -1
  52. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js +4 -2
  53. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
  54. package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.d.ts.map +1 -1
  55. package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.js +4 -2
  56. package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
  57. package/lib/internal/template/button-dropdown/category-elements/styles.css.js +19 -18
  58. package/lib/internal/template/button-dropdown/category-elements/styles.scoped.css +32 -28
  59. package/lib/internal/template/button-dropdown/category-elements/styles.selectors.js +19 -18
  60. package/lib/internal/template/button-dropdown/index.d.ts.map +1 -1
  61. package/lib/internal/template/button-dropdown/index.js +4 -3
  62. package/lib/internal/template/button-dropdown/index.js.map +1 -1
  63. package/lib/internal/template/button-dropdown/interfaces.d.ts +22 -0
  64. package/lib/internal/template/button-dropdown/interfaces.d.ts.map +1 -1
  65. package/lib/internal/template/button-dropdown/interfaces.js.map +1 -1
  66. package/lib/internal/template/button-dropdown/internal.d.ts.map +1 -1
  67. package/lib/internal/template/button-dropdown/internal.js +15 -6
  68. package/lib/internal/template/button-dropdown/internal.js.map +1 -1
  69. package/lib/internal/template/button-dropdown/styles.css.js +23 -21
  70. package/lib/internal/template/button-dropdown/styles.scoped.css +39 -29
  71. package/lib/internal/template/button-dropdown/styles.selectors.js +23 -21
  72. package/lib/internal/template/button-group/icon-toggle-button-item.js +1 -1
  73. package/lib/internal/template/button-group/icon-toggle-button-item.js.map +1 -1
  74. package/lib/internal/template/button-group/interfaces.d.ts +12 -1
  75. package/lib/internal/template/button-group/interfaces.d.ts.map +1 -1
  76. package/lib/internal/template/button-group/interfaces.js.map +1 -1
  77. package/lib/internal/template/button-group/menu-dropdown-item.d.ts.map +1 -1
  78. package/lib/internal/template/button-group/menu-dropdown-item.js +2 -1
  79. package/lib/internal/template/button-group/menu-dropdown-item.js.map +1 -1
  80. package/lib/internal/template/dropdown/internal.d.ts.map +1 -1
  81. package/lib/internal/template/dropdown/internal.js +14 -2
  82. package/lib/internal/template/dropdown/internal.js.map +1 -1
  83. package/lib/internal/template/expandable-section/expandable-section-header.d.ts.map +1 -1
  84. package/lib/internal/template/expandable-section/expandable-section-header.js +5 -5
  85. package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
  86. package/lib/internal/template/expandable-section/styles.css.js +36 -35
  87. package/lib/internal/template/expandable-section/styles.scoped.css +81 -66
  88. package/lib/internal/template/expandable-section/styles.selectors.js +36 -35
  89. package/lib/internal/template/icon/generated/icons.d.ts +1 -0
  90. package/lib/internal/template/icon/generated/icons.d.ts.map +1 -1
  91. package/lib/internal/template/icon/generated/icons.js +2 -0
  92. package/lib/internal/template/icon/generated/icons.js.map +1 -1
  93. package/lib/internal/template/icon-provider/interfaces.d.ts +1 -1
  94. package/lib/internal/template/icon-provider/interfaces.d.ts.map +1 -1
  95. package/lib/internal/template/icon-provider/interfaces.js.map +1 -1
  96. package/lib/internal/template/internal/base-component/styles.scoped.css +65 -1
  97. package/lib/internal/template/internal/components/button-trigger/index.d.ts.map +1 -1
  98. package/lib/internal/template/internal/components/button-trigger/index.js +3 -2
  99. package/lib/internal/template/internal/components/button-trigger/index.js.map +1 -1
  100. package/lib/internal/template/internal/components/button-trigger/styles.css.js +15 -14
  101. package/lib/internal/template/internal/components/button-trigger/styles.scoped.css +35 -29
  102. package/lib/internal/template/internal/components/button-trigger/styles.selectors.js +15 -14
  103. package/lib/internal/template/internal/components/checkbox-icon/index.d.ts.map +1 -1
  104. package/lib/internal/template/internal/components/checkbox-icon/index.js +11 -2
  105. package/lib/internal/template/internal/components/checkbox-icon/index.js.map +1 -1
  106. package/lib/internal/template/internal/components/drag-handle/styles.css.js +14 -14
  107. package/lib/internal/template/internal/components/drag-handle/styles.scoped.css +20 -19
  108. package/lib/internal/template/internal/components/drag-handle/styles.selectors.js +14 -14
  109. package/lib/internal/template/internal/components/drag-handle-wrapper/index.d.ts.map +1 -1
  110. package/lib/internal/template/internal/components/drag-handle-wrapper/index.js +6 -3
  111. package/lib/internal/template/internal/components/drag-handle-wrapper/index.js.map +1 -1
  112. package/lib/internal/template/internal/components/drag-handle-wrapper/portal-overlay.d.ts +2 -1
  113. package/lib/internal/template/internal/components/drag-handle-wrapper/portal-overlay.d.ts.map +1 -1
  114. package/lib/internal/template/internal/components/drag-handle-wrapper/portal-overlay.js +2 -2
  115. package/lib/internal/template/internal/components/drag-handle-wrapper/portal-overlay.js.map +1 -1
  116. package/lib/internal/template/internal/components/expand-toggle-button/index.js +2 -2
  117. package/lib/internal/template/internal/components/expand-toggle-button/index.js.map +1 -1
  118. package/lib/internal/template/internal/environment.js +2 -2
  119. package/lib/internal/template/internal/environment.json +2 -2
  120. package/lib/internal/template/internal/generated/styles/tokens.d.ts +8 -0
  121. package/lib/internal/template/internal/generated/styles/tokens.js +8 -0
  122. package/lib/internal/template/internal/generated/theming/index.cjs +236 -0
  123. package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +72 -0
  124. package/lib/internal/template/internal/generated/theming/index.d.ts +72 -0
  125. package/lib/internal/template/internal/generated/theming/index.js +236 -0
  126. package/lib/internal/template/internal/hooks/use-mouse-down-target.js +2 -2
  127. package/lib/internal/template/internal/hooks/use-mouse-down-target.js.map +1 -1
  128. package/lib/internal/template/internal/hooks/use-portal-mode-classes/index.d.ts.map +1 -1
  129. package/lib/internal/template/internal/hooks/use-portal-mode-classes/index.js +4 -2
  130. package/lib/internal/template/internal/hooks/use-portal-mode-classes/index.js.map +1 -1
  131. package/lib/internal/template/internal/hooks/use-visual-mode/index.d.ts +1 -0
  132. package/lib/internal/template/internal/hooks/use-visual-mode/index.d.ts.map +1 -1
  133. package/lib/internal/template/internal/hooks/use-visual-mode/index.js +2 -1
  134. package/lib/internal/template/internal/hooks/use-visual-mode/index.js.map +1 -1
  135. package/lib/internal/template/internal/utils/throttle.d.ts.map +1 -1
  136. package/lib/internal/template/internal/utils/throttle.js +3 -1
  137. package/lib/internal/template/internal/utils/throttle.js.map +1 -1
  138. package/lib/internal/template/progress-bar/index.d.ts.map +1 -1
  139. package/lib/internal/template/progress-bar/index.js +1 -0
  140. package/lib/internal/template/progress-bar/index.js.map +1 -1
  141. package/lib/internal/template/segmented-control/styles.css.js +16 -16
  142. package/lib/internal/template/segmented-control/styles.scoped.css +34 -34
  143. package/lib/internal/template/segmented-control/styles.selectors.js +16 -16
  144. package/lib/internal/template/status-indicator/internal.d.ts.map +1 -1
  145. package/lib/internal/template/status-indicator/internal.js +4 -3
  146. package/lib/internal/template/status-indicator/internal.js.map +1 -1
  147. package/lib/internal/template/status-indicator/styles.css.js +25 -24
  148. package/lib/internal/template/status-indicator/styles.scoped.css +75 -40
  149. package/lib/internal/template/status-indicator/styles.selectors.js +25 -24
  150. package/lib/internal/template/steps/internal.d.ts.map +1 -1
  151. package/lib/internal/template/steps/internal.js +20 -6
  152. package/lib/internal/template/steps/internal.js.map +1 -1
  153. package/lib/internal/template/steps/styles.css.js +12 -9
  154. package/lib/internal/template/steps/styles.scoped.css +43 -15
  155. package/lib/internal/template/steps/styles.selectors.js +12 -9
  156. package/lib/internal/template/table/header-cell/group-header-cell.d.ts.map +1 -1
  157. package/lib/internal/template/table/header-cell/group-header-cell.js +4 -16
  158. package/lib/internal/template/table/header-cell/group-header-cell.js.map +1 -1
  159. package/lib/internal/template/table/header-cell/index.d.ts.map +1 -1
  160. package/lib/internal/template/table/header-cell/index.js +2 -1
  161. package/lib/internal/template/table/header-cell/index.js.map +1 -1
  162. package/lib/internal/template/table/header-cell/styles.css.js +33 -33
  163. package/lib/internal/template/table/header-cell/styles.scoped.css +80 -73
  164. package/lib/internal/template/table/header-cell/styles.selectors.js +33 -33
  165. package/lib/internal/template/table/header-cell/th-element.d.ts +6 -5
  166. package/lib/internal/template/table/header-cell/th-element.d.ts.map +1 -1
  167. package/lib/internal/template/table/header-cell/th-element.js +4 -3
  168. package/lib/internal/template/table/header-cell/th-element.js.map +1 -1
  169. package/lib/internal/template/table/resizer/index.d.ts +4 -2
  170. package/lib/internal/template/table/resizer/index.d.ts.map +1 -1
  171. package/lib/internal/template/table/resizer/index.js +4 -4
  172. package/lib/internal/template/table/resizer/index.js.map +1 -1
  173. package/lib/internal/template/table/resizer/styles.css.js +17 -16
  174. package/lib/internal/template/table/resizer/styles.scoped.css +32 -24
  175. package/lib/internal/template/table/resizer/styles.selectors.js +17 -16
  176. package/lib/internal/template/table/selection/selection-cell.d.ts +2 -1
  177. package/lib/internal/template/table/selection/selection-cell.d.ts.map +1 -1
  178. package/lib/internal/template/table/selection/selection-cell.js +2 -2
  179. package/lib/internal/template/table/selection/selection-cell.js.map +1 -1
  180. package/lib/internal/template/table/sticky-columns/use-sticky-columns.d.ts +2 -1
  181. package/lib/internal/template/table/sticky-columns/use-sticky-columns.d.ts.map +1 -1
  182. package/lib/internal/template/table/sticky-columns/use-sticky-columns.js +31 -7
  183. package/lib/internal/template/table/sticky-columns/use-sticky-columns.js.map +1 -1
  184. package/lib/internal/template/table/thead.d.ts.map +1 -1
  185. package/lib/internal/template/table/thead.js +2 -2
  186. package/lib/internal/template/table/thead.js.map +1 -1
  187. package/lib/internal/template/test-utils/dom/table/index.js +1 -1
  188. package/lib/internal/template/test-utils/dom/table/index.js.map +1 -1
  189. package/lib/internal/template/test-utils/selectors/table/index.js +1 -1
  190. package/lib/internal/template/test-utils/selectors/table/index.js.map +1 -1
  191. package/lib/internal/template/theming/index.d.ts +2 -0
  192. package/lib/internal/template/theming/index.d.ts.map +1 -1
  193. package/lib/internal/template/theming/index.js +55 -0
  194. package/lib/internal/template/theming/index.js.map +1 -1
  195. package/lib/internal/template/toggle/styles.css.js +10 -10
  196. package/lib/internal/template/toggle/styles.scoped.css +18 -18
  197. package/lib/internal/template/toggle/styles.selectors.js +10 -10
  198. package/lib/internal/template/toggle-button/internal.d.ts.map +1 -1
  199. package/lib/internal/template/toggle-button/internal.js +3 -1
  200. package/lib/internal/template/toggle-button/internal.js.map +1 -1
  201. package/lib/internal/template/toggle-button/styles.css.js +4 -3
  202. package/lib/internal/template/toggle-button/styles.scoped.css +8 -3
  203. package/lib/internal/template/toggle-button/styles.selectors.js +4 -3
  204. package/lib/internal/template/token/dismiss-button.d.ts.map +1 -1
  205. package/lib/internal/template/token/dismiss-button.js +3 -1
  206. package/lib/internal/template/token/dismiss-button.js.map +1 -1
  207. package/lib/internal/template/token/internal.d.ts.map +1 -1
  208. package/lib/internal/template/token/internal.js +11 -3
  209. package/lib/internal/template/token/internal.js.map +1 -1
  210. package/lib/internal/template/token/styles.css.js +14 -14
  211. package/lib/internal/template/token/styles.scoped.css +33 -30
  212. package/lib/internal/template/token/styles.selectors.js +14 -14
  213. package/lib/internal/template/tree-view/tree-item/index.d.ts.map +1 -1
  214. package/lib/internal/template/tree-view/tree-item/index.js +2 -1
  215. package/lib/internal/template/tree-view/tree-item/index.js.map +1 -1
  216. package/lib/internal/template/tree-view/tree-item/styles.css.js +10 -9
  217. package/lib/internal/template/tree-view/tree-item/styles.scoped.css +19 -12
  218. package/lib/internal/template/tree-view/tree-item/styles.selectors.js +10 -9
  219. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"mobile-expandable-category-element.js","sourceRoot":"","sources":["../../../../src/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;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,oBAAoB,MAAM,6CAA6C,CAAC;AAG/E,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAO,qBAAqB,MAAM,oDAAoD,CAAC;AACvF,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,+BAA+B,GAAG,CAAC,EACvC,KAAK,EACL,IAAI,EACJ,c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E,SAAS,EAAE,MAAM,CAAC,sBAAsB,CAAC;YAC9E,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,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,IAAI,EACvB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,UAAU,GACvB,CACC,CACN,CACqB,CACzB,CAAC;IACJ,CAAC;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,IAAI,QAAQ;YAC7C,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,IAAI;SAC1B,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';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalIcon from '../../icon/internal';\nimport useHiddenDescription from '../../internal/hooks/use-hidden-description';\nimport { GeneratedAnalyticsMetadataButtonDropdownExpand } from '../analytics-metadata/interfaces.js';\nimport { ButtonDropdownProps, CategoryProps } from '../interfaces';\nimport ItemsList from '../items-list';\nimport MobileExpandableGroup from '../mobile-expandable-group/mobile-expandable-group';\nimport Tooltip from '../tooltip.js';\nimport { getMenuItemProps } from '../utils/menu-item.js';\n\nimport styles from './styles.css.js';\n\nconst MobileExpandableCategoryElement = ({\n index,\n item,\n onItemActivate,\n onGroupToggle,\n targetItem,\n isHighlighted,\n isKeyboardHighlight,\n isExpanded,\n lastInDropdown,\n highlightItem,\n disabled,\n variant,\n position,\n renderItem,\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\n const groupProps: ButtonDropdownProps.GroupRenderItem = {\n index: index ?? 0,\n type: 'group',\n option: item as ButtonDropdownProps.ItemGroup,\n disabled: !!disabled,\n highlighted: !!highlighted,\n expanded: expanded,\n expandDirection: 'vertical',\n };\n const renderResult = renderItem?.({ item: groupProps }) ?? null;\n\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['no-content-styling']]: !!renderResult,\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 {...getAnalyticsMetadataAttribute(\n disabled\n ? {}\n : ({\n action: 'expand',\n detail: {\n position: position || '0',\n label: { root: 'self' },\n id: item.id || '',\n expanded: `${!expanded}`,\n },\n } as GeneratedAnalyticsMetadataButtonDropdownExpand)\n )}\n >\n {renderResult ? (\n renderResult\n ) : (\n <>\n {(item.iconName || item.iconUrl || item.iconSvg) && (\n <span className={styles['icon-wrapper']}>\n <InternalIcon name={item.iconName} url={item.iconUrl} svg={item.iconSvg} alt={item.iconAlt} />\n </span>\n )}\n <span>{item.text}</span>\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 </>\n )}\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={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 lastInDropdown={lastInDropdown}\n highlightItem={highlightItem}\n hasCategoryHeader={true}\n variant={variant}\n position={position}\n renderItem={renderItem}\n parentProps={groupProps}\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":"","sources":["../../../../src/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;AAExB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,oBAAoB,MAAM,6CAA6C,CAAC;AAG/E,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAO,qBAAqB,MAAM,oDAAoD,CAAC;AACvF,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,+BAA+B,GAAG,CAAC,EACvC,KAAK,EACL,IAAI,EACJ,cAAc,EACd,aAAa,EACb,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,aAAa,EACb,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,UAAU,GACI,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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AAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,IAAI,EACvB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,UAAU,GACvB,CACC,CACN,CACqB,CACzB,CAAC;IACJ,CAAC;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,IAAI,QAAQ;YAC7C,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,IAAI;SAC1B,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';\n\nimport { isThemeActive, Theme } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalIcon from '../../icon/internal';\nimport useHiddenDescription from '../../internal/hooks/use-hidden-description';\nimport { GeneratedAnalyticsMetadataButtonDropdownExpand } from '../analytics-metadata/interfaces.js';\nimport { ButtonDropdownProps, CategoryProps } from '../interfaces';\nimport ItemsList from '../items-list';\nimport MobileExpandableGroup from '../mobile-expandable-group/mobile-expandable-group';\nimport Tooltip from '../tooltip.js';\nimport { getMenuItemProps } from '../utils/menu-item.js';\n\nimport styles from './styles.css.js';\n\nconst MobileExpandableCategoryElement = ({\n index,\n item,\n onItemActivate,\n onGroupToggle,\n targetItem,\n isHighlighted,\n isKeyboardHighlight,\n isExpanded,\n lastInDropdown,\n highlightItem,\n disabled,\n variant,\n position,\n renderItem,\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 isOneTheme = isThemeActive(Theme.OneTheme);\n\n const isDisabledWithReason = !!item.disabledReason && item.disabled;\n const { targetProps, descriptionEl } = useHiddenDescription(item.disabledReason);\n\n const groupProps: ButtonDropdownProps.GroupRenderItem = {\n index: index ?? 0,\n type: 'group',\n option: item as ButtonDropdownProps.ItemGroup,\n disabled: !!disabled,\n highlighted: !!highlighted,\n expanded: expanded,\n expandDirection: 'vertical',\n };\n const renderResult = renderItem?.({ item: groupProps }) ?? null;\n\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['no-content-styling']]: !!renderResult,\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 {...getAnalyticsMetadataAttribute(\n disabled\n ? {}\n : ({\n action: 'expand',\n detail: {\n position: position || '0',\n label: { root: 'self' },\n id: item.id || '',\n expanded: `${!expanded}`,\n },\n } as GeneratedAnalyticsMetadataButtonDropdownExpand)\n )}\n >\n {renderResult ? (\n renderResult\n ) : (\n <>\n {(item.iconName || item.iconUrl || item.iconSvg) && (\n <span className={styles['icon-wrapper']}>\n <InternalIcon name={item.iconName} url={item.iconUrl} svg={item.iconSvg} alt={item.iconAlt} />\n </span>\n )}\n <span>{item.text}</span>\n <span\n className={clsx(styles['expand-icon'], isOneTheme && styles['one-theme'], {\n [styles['expand-icon-up']]: expanded,\n })}\n >\n <InternalIcon\n name={isOneTheme ? 'angle-down' : 'caret-down-filled'}\n size={isOneTheme ? 'x-small' : 'normal'}\n />\n </span>\n </>\n )}\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={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 lastInDropdown={lastInDropdown}\n highlightItem={highlightItem}\n hasCategoryHeader={true}\n variant={variant}\n position={position}\n renderItem={renderItem}\n parentProps={groupProps}\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,23 +1,24 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "header": "awsui_header_16mm3_19suh_145",
5
- "disabled": "awsui_disabled_16mm3_19suh_161",
6
- "no-content-styling": "awsui_no-content-styling_16mm3_19suh_165",
7
- "expandable-header": "awsui_expandable-header_16mm3_19suh_171",
8
- "rolled-down": "awsui_rolled-down_16mm3_19suh_182",
9
- "highlighted": "awsui_highlighted_16mm3_19suh_185",
10
- "is-focused": "awsui_is-focused_16mm3_19suh_208",
11
- "visual-refresh": "awsui_visual-refresh_16mm3_19suh_211",
12
- "category": "awsui_category_16mm3_19suh_215",
13
- "expandable": "awsui_expandable_16mm3_19suh_171",
14
- "variant-navigation": "awsui_variant-navigation_16mm3_19suh_230",
15
- "expand-icon": "awsui_expand-icon_16mm3_19suh_237",
16
- "expand-icon-up": "awsui_expand-icon-up_16mm3_19suh_255",
17
- "expand-icon-right": "awsui_expand-icon-right_16mm3_19suh_258",
18
- "items-list-container": "awsui_items-list-container_16mm3_19suh_266",
19
- "in-dropdown": "awsui_in-dropdown_16mm3_19suh_275",
20
- "icon-wrapper": "awsui_icon-wrapper_16mm3_19suh_279",
21
- "header-content": "awsui_header-content_16mm3_19suh_283"
4
+ "header": "awsui_header_16mm3_1b9d6_145",
5
+ "disabled": "awsui_disabled_16mm3_1b9d6_161",
6
+ "no-content-styling": "awsui_no-content-styling_16mm3_1b9d6_165",
7
+ "expandable-header": "awsui_expandable-header_16mm3_1b9d6_171",
8
+ "rolled-down": "awsui_rolled-down_16mm3_1b9d6_182",
9
+ "highlighted": "awsui_highlighted_16mm3_1b9d6_185",
10
+ "is-focused": "awsui_is-focused_16mm3_1b9d6_208",
11
+ "visual-refresh": "awsui_visual-refresh_16mm3_1b9d6_211",
12
+ "category": "awsui_category_16mm3_1b9d6_215",
13
+ "expandable": "awsui_expandable_16mm3_1b9d6_171",
14
+ "variant-navigation": "awsui_variant-navigation_16mm3_1b9d6_230",
15
+ "expand-icon": "awsui_expand-icon_16mm3_1b9d6_237",
16
+ "one-theme": "awsui_one-theme_16mm3_1b9d6_245",
17
+ "expand-icon-up": "awsui_expand-icon-up_16mm3_1b9d6_259",
18
+ "expand-icon-right": "awsui_expand-icon-right_16mm3_1b9d6_262",
19
+ "items-list-container": "awsui_items-list-container_16mm3_1b9d6_270",
20
+ "in-dropdown": "awsui_in-dropdown_16mm3_1b9d6_279",
21
+ "icon-wrapper": "awsui_icon-wrapper_16mm3_1b9d6_283",
22
+ "header-content": "awsui_header-content_16mm3_1b9d6_287"
22
23
  };
23
24
 
@@ -142,7 +142,7 @@
142
142
  */
143
143
  /* Style used for links in slots/components that are text heavy, to help links stand out among
144
144
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
145
- .awsui_header_16mm3_19suh_145:not(#\9) {
145
+ .awsui_header_16mm3_1b9d6_145:not(#\9) {
146
146
  position: relative;
147
147
  margin-block: 0;
148
148
  margin-inline: 0;
@@ -158,31 +158,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
158
158
  padding-inline: calc(var(--space-button-horizontal-v8ywmo, 20px) + var(--border-item-width-acvlhx, 1px));
159
159
  z-index: 1;
160
160
  }
161
- .awsui_header_16mm3_19suh_145.awsui_disabled_16mm3_19suh_161:not(#\9) {
161
+ .awsui_header_16mm3_1b9d6_145.awsui_disabled_16mm3_1b9d6_161:not(#\9) {
162
162
  color: var(--color-text-dropdown-item-disabled-oysy8n, #aab7b8);
163
163
  cursor: default;
164
164
  }
165
- .awsui_header_16mm3_19suh_145.awsui_no-content-styling_16mm3_19suh_165:not(#\9) {
165
+ .awsui_header_16mm3_1b9d6_145.awsui_no-content-styling_16mm3_1b9d6_165:not(#\9) {
166
166
  padding-block: calc(var(--border-item-width-acvlhx, 1px) - var(--border-divider-list-width-8ggz94, 1px));
167
167
  padding-inline: var(--border-item-width-acvlhx, 1px);
168
168
  font-weight: var(--font-weight-normal-7w835s, 400);
169
169
  color: inherit;
170
170
  }
171
- .awsui_header_16mm3_19suh_145.awsui_expandable-header_16mm3_19suh_171:not(#\9) {
171
+ .awsui_header_16mm3_1b9d6_145.awsui_expandable-header_16mm3_1b9d6_171:not(#\9) {
172
172
  border-block-start-color: var(--color-border-dropdown-group-dg9zg5, #eaeded);
173
173
  border-block-end-color: var(--color-border-dropdown-group-dg9zg5, #eaeded);
174
174
  cursor: pointer;
175
175
  }
176
- .awsui_header_16mm3_19suh_145.awsui_expandable-header_16mm3_19suh_171.awsui_disabled_16mm3_19suh_161:not(#\9) {
176
+ .awsui_header_16mm3_1b9d6_145.awsui_expandable-header_16mm3_1b9d6_171.awsui_disabled_16mm3_1b9d6_161:not(#\9) {
177
177
  cursor: default;
178
178
  }
179
- .awsui_header_16mm3_19suh_145.awsui_expandable-header_16mm3_19suh_171:not(#\9):focus {
179
+ .awsui_header_16mm3_1b9d6_145.awsui_expandable-header_16mm3_1b9d6_171:not(#\9):focus {
180
180
  outline: none;
181
181
  }
182
- .awsui_header_16mm3_19suh_145.awsui_expandable-header_16mm3_19suh_171.awsui_rolled-down_16mm3_19suh_182:not(#\9) {
182
+ .awsui_header_16mm3_1b9d6_145.awsui_expandable-header_16mm3_1b9d6_171.awsui_rolled-down_16mm3_1b9d6_182:not(#\9) {
183
183
  border-block-end-color: transparent;
184
184
  }
185
- .awsui_header_16mm3_19suh_145.awsui_expandable-header_16mm3_19suh_171.awsui_highlighted_16mm3_19suh_185:not(#\9) {
185
+ .awsui_header_16mm3_1b9d6_145.awsui_expandable-header_16mm3_1b9d6_171.awsui_highlighted_16mm3_1b9d6_185:not(#\9) {
186
186
  background-color: var(--color-background-dropdown-item-hover-353r6f, #f2f3f3);
187
187
  color: var(--color-text-dropdown-item-highlighted-bchk26, #16191f);
188
188
  padding-block: var(--space-option-padding-vertical-uomfe1, 4px);
@@ -195,46 +195,46 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
195
195
  border-end-end-radius: var(--border-radius-item-xggxkd, 0px);
196
196
  z-index: 2;
197
197
  }
198
- .awsui_header_16mm3_19suh_145.awsui_expandable-header_16mm3_19suh_171.awsui_highlighted_16mm3_19suh_185.awsui_no-content-styling_16mm3_19suh_165:not(#\9) {
198
+ .awsui_header_16mm3_1b9d6_145.awsui_expandable-header_16mm3_1b9d6_171.awsui_highlighted_16mm3_1b9d6_185.awsui_no-content-styling_16mm3_1b9d6_165:not(#\9) {
199
199
  padding-block: 0;
200
200
  padding-inline: 0;
201
201
  color: inherit;
202
202
  }
203
- .awsui_header_16mm3_19suh_145.awsui_expandable-header_16mm3_19suh_171.awsui_highlighted_16mm3_19suh_185.awsui_disabled_16mm3_19suh_161:not(#\9) {
203
+ .awsui_header_16mm3_1b9d6_145.awsui_expandable-header_16mm3_1b9d6_171.awsui_highlighted_16mm3_1b9d6_185.awsui_disabled_16mm3_1b9d6_161:not(#\9) {
204
204
  background-color: var(--color-background-dropdown-item-dimmed-2hwvu9, transparent);
205
205
  border-color: var(--color-border-dropdown-item-dimmed-hover-twsd8z, #879596);
206
206
  color: var(--color-text-dropdown-item-dimmed-0xf8v3, #aab7b8);
207
207
  }
208
- .awsui_header_16mm3_19suh_145.awsui_expandable-header_16mm3_19suh_171.awsui_highlighted_16mm3_19suh_185.awsui_is-focused_16mm3_19suh_208:not(#\9) {
208
+ .awsui_header_16mm3_1b9d6_145.awsui_expandable-header_16mm3_1b9d6_171.awsui_highlighted_16mm3_1b9d6_185.awsui_is-focused_16mm3_1b9d6_208:not(#\9) {
209
209
  border-color: var(--color-border-dropdown-item-focused-xty1zx, #0073bb);
210
210
  }
211
- .awsui_header_16mm3_19suh_145.awsui_expandable-header_16mm3_19suh_171.awsui_highlighted_16mm3_19suh_185.awsui_is-focused_16mm3_19suh_208:not(#\9):not(.awsui_visual-refresh_16mm3_19suh_211) {
211
+ .awsui_header_16mm3_1b9d6_145.awsui_expandable-header_16mm3_1b9d6_171.awsui_highlighted_16mm3_1b9d6_185.awsui_is-focused_16mm3_1b9d6_208:not(#\9):not(.awsui_visual-refresh_16mm3_1b9d6_211) {
212
212
  box-shadow: inset 0 0 0 var(--border-control-focus-ring-shadow-spread-ql2vj7, 1px) var(--color-border-item-focused-r5f6xl, #0073bb);
213
213
  }
214
214
 
215
- .awsui_category_16mm3_19suh_215:not(#\9) {
215
+ .awsui_category_16mm3_1b9d6_215:not(#\9) {
216
216
  list-style: none;
217
217
  margin-block-start: calc(-1 * var(--border-divider-list-width-8ggz94, 1px));
218
218
  padding-block: 0;
219
219
  padding-inline: 0;
220
220
  }
221
- .awsui_category_16mm3_19suh_215:not(#\9):first-child {
221
+ .awsui_category_16mm3_1b9d6_215:not(#\9):first-child {
222
222
  margin-block-start: 0;
223
223
  }
224
- .awsui_category_16mm3_19suh_215.awsui_expandable_16mm3_19suh_171:not(#\9) {
224
+ .awsui_category_16mm3_1b9d6_215.awsui_expandable_16mm3_1b9d6_171:not(#\9) {
225
225
  border-block-start: 0;
226
226
  }
227
- .awsui_category_16mm3_19suh_215:not(#\9):last-child {
227
+ .awsui_category_16mm3_1b9d6_215:not(#\9):last-child {
228
228
  border-block-end: none;
229
229
  }
230
- .awsui_category_16mm3_19suh_215.awsui_variant-navigation_16mm3_19suh_230:not(#\9) {
230
+ .awsui_category_16mm3_1b9d6_215.awsui_variant-navigation_16mm3_1b9d6_230:not(#\9) {
231
231
  padding-block-start: var(--space-xxs-jnczic, 4px);
232
232
  }
233
- .awsui_category_16mm3_19suh_215.awsui_variant-navigation_16mm3_19suh_230.awsui_expandable_16mm3_19suh_171:not(#\9) {
233
+ .awsui_category_16mm3_1b9d6_215.awsui_variant-navigation_16mm3_1b9d6_230.awsui_expandable_16mm3_1b9d6_171:not(#\9) {
234
234
  padding-block-start: 0;
235
235
  }
236
236
 
237
- .awsui_expand-icon_16mm3_19suh_237:not(#\9) {
237
+ .awsui_expand-icon_16mm3_1b9d6_237:not(#\9) {
238
238
  position: relative;
239
239
  inset-inline-end: calc(-1 * var(--space-s-4a5hs8, 12px));
240
240
  inline-size: var(--space-m-n2lypl, 16px);
@@ -242,28 +242,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
242
242
  margin-inline-start: auto;
243
243
  transition: transform var(--motion-duration-rotate-180-4er9qu, 135ms) var(--motion-easing-rotate-180-xlspcm, cubic-bezier(0.165, 0.84, 0.44, 1));
244
244
  }
245
+ .awsui_expand-icon_16mm3_1b9d6_237.awsui_one-theme_16mm3_1b9d6_245:not(#\9) {
246
+ inset-inline-end: calc(-1 * var(--space-xs-kw7k3v, 8px));
247
+ inline-size: var(--space-s-4a5hs8, 12px);
248
+ }
245
249
  @media (prefers-reduced-motion: reduce) {
246
- .awsui_expand-icon_16mm3_19suh_237:not(#\9) {
250
+ .awsui_expand-icon_16mm3_1b9d6_237:not(#\9) {
247
251
  animation: none;
248
252
  transition: none;
249
253
  }
250
254
  }
251
- .awsui-motion-disabled .awsui_expand-icon_16mm3_19suh_237:not(#\9), .awsui-mode-entering .awsui_expand-icon_16mm3_19suh_237:not(#\9) {
255
+ .awsui-motion-disabled .awsui_expand-icon_16mm3_1b9d6_237:not(#\9), .awsui-mode-entering .awsui_expand-icon_16mm3_1b9d6_237:not(#\9) {
252
256
  animation: none;
253
257
  transition: none;
254
258
  }
255
- .awsui_expand-icon-up_16mm3_19suh_255:not(#\9) {
259
+ .awsui_expand-icon-up_16mm3_1b9d6_259:not(#\9) {
256
260
  transform: rotate(-180deg);
257
261
  }
258
- .awsui_expand-icon-right_16mm3_19suh_258:not(#\9) {
262
+ .awsui_expand-icon-right_16mm3_1b9d6_262:not(#\9) {
259
263
  transform: rotate(-90deg);
260
264
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
261
265
  }
262
- .awsui_expand-icon-right_16mm3_19suh_258:not(#\9):dir(rtl) {
266
+ .awsui_expand-icon-right_16mm3_1b9d6_262:not(#\9):dir(rtl) {
263
267
  transform: rotate(90deg);
264
268
  }
265
269
 
266
- .awsui_items-list-container_16mm3_19suh_266:not(#\9) {
270
+ .awsui_items-list-container_16mm3_1b9d6_270:not(#\9) {
267
271
  padding-block: 0;
268
272
  padding-inline: 0;
269
273
  margin-block-start: -1px;
@@ -272,15 +276,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
272
276
  overflow-y: auto;
273
277
  }
274
278
 
275
- .awsui_in-dropdown_16mm3_19suh_275:not(#\9) {
279
+ .awsui_in-dropdown_16mm3_1b9d6_279:not(#\9) {
276
280
  margin-block-end: -1px;
277
281
  }
278
282
 
279
- .awsui_icon-wrapper_16mm3_19suh_279:not(#\9) {
283
+ .awsui_icon-wrapper_16mm3_1b9d6_283:not(#\9) {
280
284
  margin-inline-end: var(--space-xxs-jnczic, 4px);
281
285
  }
282
286
 
283
- .awsui_header-content_16mm3_19suh_283:not(#\9) {
287
+ .awsui_header-content_16mm3_1b9d6_287:not(#\9) {
284
288
  display: flex;
285
289
  align-items: center;
286
290
  }
@@ -2,23 +2,24 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "header": "awsui_header_16mm3_19suh_145",
6
- "disabled": "awsui_disabled_16mm3_19suh_161",
7
- "no-content-styling": "awsui_no-content-styling_16mm3_19suh_165",
8
- "expandable-header": "awsui_expandable-header_16mm3_19suh_171",
9
- "rolled-down": "awsui_rolled-down_16mm3_19suh_182",
10
- "highlighted": "awsui_highlighted_16mm3_19suh_185",
11
- "is-focused": "awsui_is-focused_16mm3_19suh_208",
12
- "visual-refresh": "awsui_visual-refresh_16mm3_19suh_211",
13
- "category": "awsui_category_16mm3_19suh_215",
14
- "expandable": "awsui_expandable_16mm3_19suh_171",
15
- "variant-navigation": "awsui_variant-navigation_16mm3_19suh_230",
16
- "expand-icon": "awsui_expand-icon_16mm3_19suh_237",
17
- "expand-icon-up": "awsui_expand-icon-up_16mm3_19suh_255",
18
- "expand-icon-right": "awsui_expand-icon-right_16mm3_19suh_258",
19
- "items-list-container": "awsui_items-list-container_16mm3_19suh_266",
20
- "in-dropdown": "awsui_in-dropdown_16mm3_19suh_275",
21
- "icon-wrapper": "awsui_icon-wrapper_16mm3_19suh_279",
22
- "header-content": "awsui_header-content_16mm3_19suh_283"
5
+ "header": "awsui_header_16mm3_1b9d6_145",
6
+ "disabled": "awsui_disabled_16mm3_1b9d6_161",
7
+ "no-content-styling": "awsui_no-content-styling_16mm3_1b9d6_165",
8
+ "expandable-header": "awsui_expandable-header_16mm3_1b9d6_171",
9
+ "rolled-down": "awsui_rolled-down_16mm3_1b9d6_182",
10
+ "highlighted": "awsui_highlighted_16mm3_1b9d6_185",
11
+ "is-focused": "awsui_is-focused_16mm3_1b9d6_208",
12
+ "visual-refresh": "awsui_visual-refresh_16mm3_1b9d6_211",
13
+ "category": "awsui_category_16mm3_1b9d6_215",
14
+ "expandable": "awsui_expandable_16mm3_1b9d6_171",
15
+ "variant-navigation": "awsui_variant-navigation_16mm3_1b9d6_230",
16
+ "expand-icon": "awsui_expand-icon_16mm3_1b9d6_237",
17
+ "one-theme": "awsui_one-theme_16mm3_1b9d6_245",
18
+ "expand-icon-up": "awsui_expand-icon-up_16mm3_1b9d6_259",
19
+ "expand-icon-right": "awsui_expand-icon-right_16mm3_1b9d6_262",
20
+ "items-list-container": "awsui_items-list-container_16mm3_1b9d6_270",
21
+ "in-dropdown": "awsui_in-dropdown_16mm3_1b9d6_279",
22
+ "icon-wrapper": "awsui_icon-wrapper_16mm3_1b9d6_283",
23
+ "header-content": "awsui_header-content_16mm3_1b9d6_287"
23
24
  };
24
25
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMnD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,QAAA,MAAM,cAAc,qGAsEnB,CAAC;AAGF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMnD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,QAAA,MAAM,cAAc,qGA+EnB,CAAC;AAGF,eAAe,cAAc,CAAC"}
@@ -9,12 +9,13 @@ import { applyDisplayName } from '../internal/utils/apply-display-name';
9
9
  import InternalButtonDropdown from './internal';
10
10
  import { hasCheckboxItems, hasDisabledReasonItems } from './utils/utils';
11
11
  import analyticsSelectors from './analytics-metadata/styles.css.js';
12
- const ButtonDropdown = React.forwardRef(({ items, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, expandableGroups = false, expandToViewport = false, ariaLabel, children, onItemClick, onItemFollow, mainAction, fullWidth, nativeMainActionAttributes, nativeTriggerAttributes, renderItem, ...props }, ref) => {
12
+ const ButtonDropdown = React.forwardRef(({ items, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, expandableGroups = false, expandToViewport = false, ariaLabel, iconName, iconAlt, iconUrl, iconSvg, children, onItemClick, onItemFollow, mainAction, fullWidth, nativeMainActionAttributes, nativeTriggerAttributes, renderItem, ...props }, ref) => {
13
13
  const baseComponentProps = useBaseComponent('ButtonDropdown', {
14
- props: { expandToViewport, expandableGroups, variant },
14
+ props: { expandToViewport, expandableGroups, variant, iconName },
15
15
  metadata: {
16
16
  mainAction: !!mainAction,
17
17
  checkboxItems: hasCheckboxItems(items),
18
+ hasCustomIcon: Boolean(iconUrl || iconSvg || iconName),
18
19
  hasDisabledReason: Boolean(disabledReason),
19
20
  hasDisabledReasons: hasDisabledReasonItems(items),
20
21
  },
@@ -25,7 +26,7 @@ const ButtonDropdown = React.forwardRef(({ items, variant = 'normal', loading =
25
26
  label: `.${analyticsSelectors['trigger-label']}`,
26
27
  properties: { variant, disabled: `${disabled}` },
27
28
  };
28
- return (React.createElement(InternalButtonDropdown, { ...baseProps, ...baseComponentProps, renderItem: renderItem, ref: ref, items: items, variant: variant, loading: loading, loadingText: loadingText, disabled: disabled, disabledReason: disabledReason, expandableGroups: expandableGroups, expandToViewport: expandToViewport, ariaLabel: ariaLabel, onItemClick: onItemClick, onItemFollow: onItemFollow, mainAction: mainAction, fullWidth: fullWidth, nativeMainActionAttributes: nativeMainActionAttributes, nativeTriggerAttributes: nativeTriggerAttributes, ...getAnalyticsMetadataAttribute({
29
+ return (React.createElement(InternalButtonDropdown, { ...baseProps, ...baseComponentProps, renderItem: renderItem, ref: ref, items: items, variant: variant, loading: loading, loadingText: loadingText, disabled: disabled, disabledReason: disabledReason, expandableGroups: expandableGroups, expandToViewport: expandToViewport, ariaLabel: ariaLabel, iconName: iconName, iconAlt: iconAlt, iconUrl: iconUrl, iconSvg: iconSvg, onItemClick: onItemClick, onItemFollow: onItemFollow, mainAction: mainAction, fullWidth: fullWidth, nativeMainActionAttributes: nativeMainActionAttributes, nativeTriggerAttributes: nativeTriggerAttributes, ...getAnalyticsMetadataAttribute({
29
30
  component: analyticsComponentMetadata,
30
31
  }) }, children));
31
32
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/button-dropdown/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EA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G,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,0BAA0B,EAAE,0BAA0B,EACtD,uBAAuB,EAAE,uBAAuB,KAC5C,6BAA6B,CAAC;YAChC,SAAS,EAAE,0BAA0B;SACtC,CAAC,IAED,QAAQ,CACc,CAC1B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AACnD,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { getBaseProps } from '../internal/base-component';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataButtonDropdownComponent } from './analytics-metadata/interfaces';\nimport { ButtonDropdownProps } from './interfaces';\nimport InternalButtonDropdown from './internal';\nimport { hasCheckboxItems, hasDisabledReasonItems } from './utils/utils';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\n\nexport { ButtonDropdownProps };\n\nconst ButtonDropdown = React.forwardRef(\n (\n {\n items,\n variant = 'normal',\n loading = false,\n loadingText,\n disabled = false,\n disabledReason,\n expandableGroups = false,\n expandToViewport = false,\n ariaLabel,\n children,\n onItemClick,\n onItemFollow,\n mainAction,\n fullWidth,\n nativeMainActionAttributes,\n nativeTriggerAttributes,\n renderItem,\n ...props\n }: ButtonDropdownProps,\n ref: React.Ref<ButtonDropdownProps.Ref>\n ) => {\n const baseComponentProps = useBaseComponent('ButtonDropdown', {\n props: { expandToViewport, expandableGroups, variant },\n metadata: {\n mainAction: !!mainAction,\n checkboxItems: hasCheckboxItems(items),\n hasDisabledReason: Boolean(disabledReason),\n hasDisabledReasons: hasDisabledReasonItems(items),\n },\n });\n const baseProps = getBaseProps(props);\n\n const analyticsComponentMetadata: GeneratedAnalyticsMetadataButtonDropdownComponent = {\n name: 'awsui.ButtonDropdown',\n label: `.${analyticsSelectors['trigger-label']}`,\n properties: { variant, disabled: `${disabled}` },\n };\n\n return (\n <InternalButtonDropdown\n {...baseProps}\n {...baseComponentProps}\n renderItem={renderItem}\n ref={ref}\n items={items}\n variant={variant}\n loading={loading}\n loadingText={loadingText}\n disabled={disabled}\n disabledReason={disabledReason}\n expandableGroups={expandableGroups}\n expandToViewport={expandToViewport}\n ariaLabel={ariaLabel}\n onItemClick={onItemClick}\n onItemFollow={onItemFollow}\n mainAction={mainAction}\n fullWidth={fullWidth}\n nativeMainActionAttributes={nativeMainActionAttributes}\n nativeTriggerAttributes={nativeTriggerAttributes}\n {...getAnalyticsMetadataAttribute({\n component: analyticsComponentMetadata,\n })}\n >\n {children}\n </InternalButtonDropdown>\n );\n }\n);\n\napplyDisplayName(ButtonDropdown, 'ButtonDropdown');\nexport default ButtonDropdown;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/button-dropdown/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAA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EAAE;KACjD,CAAC;IAEF,OAAO,CACL,oBAAC,sBAAsB,OACjB,SAAS,KACT,kBAAkB,EACtB,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,0BAA0B,EAAE,0BAA0B,EACtD,uBAAuB,EAAE,uBAAuB,KAC5C,6BAA6B,CAAC;YAChC,SAAS,EAAE,0BAA0B;SACtC,CAAC,IAED,QAAQ,CACc,CAC1B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AACnD,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { getBaseProps } from '../internal/base-component';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataButtonDropdownComponent } from './analytics-metadata/interfaces';\nimport { ButtonDropdownProps } from './interfaces';\nimport InternalButtonDropdown from './internal';\nimport { hasCheckboxItems, hasDisabledReasonItems } from './utils/utils';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\n\nexport { ButtonDropdownProps };\n\nconst ButtonDropdown = React.forwardRef(\n (\n {\n items,\n variant = 'normal',\n loading = false,\n loadingText,\n disabled = false,\n disabledReason,\n expandableGroups = false,\n expandToViewport = false,\n ariaLabel,\n iconName,\n iconAlt,\n iconUrl,\n iconSvg,\n children,\n onItemClick,\n onItemFollow,\n mainAction,\n fullWidth,\n nativeMainActionAttributes,\n nativeTriggerAttributes,\n renderItem,\n ...props\n }: ButtonDropdownProps,\n ref: React.Ref<ButtonDropdownProps.Ref>\n ) => {\n const baseComponentProps = useBaseComponent('ButtonDropdown', {\n props: { expandToViewport, expandableGroups, variant, iconName },\n metadata: {\n mainAction: !!mainAction,\n checkboxItems: hasCheckboxItems(items),\n hasCustomIcon: Boolean(iconUrl || iconSvg || iconName),\n hasDisabledReason: Boolean(disabledReason),\n hasDisabledReasons: hasDisabledReasonItems(items),\n },\n });\n const baseProps = getBaseProps(props);\n\n const analyticsComponentMetadata: GeneratedAnalyticsMetadataButtonDropdownComponent = {\n name: 'awsui.ButtonDropdown',\n label: `.${analyticsSelectors['trigger-label']}`,\n properties: { variant, disabled: `${disabled}` },\n };\n\n return (\n <InternalButtonDropdown\n {...baseProps}\n {...baseComponentProps}\n renderItem={renderItem}\n ref={ref}\n items={items}\n variant={variant}\n loading={loading}\n loadingText={loadingText}\n disabled={disabled}\n disabledReason={disabledReason}\n expandableGroups={expandableGroups}\n expandToViewport={expandToViewport}\n ariaLabel={ariaLabel}\n iconName={iconName}\n iconAlt={iconAlt}\n iconUrl={iconUrl}\n iconSvg={iconSvg}\n onItemClick={onItemClick}\n onItemFollow={onItemFollow}\n mainAction={mainAction}\n fullWidth={fullWidth}\n nativeMainActionAttributes={nativeMainActionAttributes}\n nativeTriggerAttributes={nativeTriggerAttributes}\n {...getAnalyticsMetadataAttribute({\n component: analyticsComponentMetadata,\n })}\n >\n {children}\n </InternalButtonDropdown>\n );\n }\n);\n\napplyDisplayName(ButtonDropdown, 'ButtonDropdown');\nexport default ButtonDropdown;\n"]}
@@ -124,6 +124,28 @@ export interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewpor
124
124
  * * `inline-icon` for icon buttons with no outer padding
125
125
  */
126
126
  variant?: ButtonDropdownProps.Variant;
127
+ /**
128
+ * Specifies the name of the icon used in the button dropdown trigger, used with the [icon component](/components/icon/).
129
+ * Defaults to `ellipsis`. Applies to the `icon` and `inline-icon` variants only.
130
+ */
131
+ iconName?: IconProps.Name;
132
+ /**
133
+ * Specifies alternate text for a custom icon, for use with `iconUrl`. Applies to the `icon` and `inline-icon` variants only.
134
+ */
135
+ iconAlt?: string;
136
+ /**
137
+ * Specifies the URL of a custom icon. Applies to the `icon` and `inline-icon` variants only.
138
+ *
139
+ * If you set both `iconUrl` and `iconSvg`, `iconSvg` will take precedence.
140
+ */
141
+ iconUrl?: string;
142
+ /**
143
+ * Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).
144
+ * Applies to the `icon` and `inline-icon` variants only.
145
+ *
146
+ * If you set both `iconUrl` and `iconSvg`, `iconSvg` will take precedence.
147
+ */
148
+ iconSvg?: React.ReactNode;
127
149
  /**
128
150
  * Controls expandability of the item groups.
129
151
  */
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,kCAAkC,EAAE,MAAM,kEAAkE,CAAC;AAEtH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OA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AAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,4BAA4B,CAAC,EAAE,CAAC,KAAK,EAAE,kCAAkC,KAAK,kCAAkC,CAAC;IAEjH;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button-dropdown/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode } from 'react';\n\nimport { GeneratedAnalyticsMetadataFragment } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { ExpandToViewport } from '../dropdown/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { BaseNavigationDetail, CancelableEventHandler } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../internal/utils/with-native-attributes';\n\nexport interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewport {\n /**\n * Array of objects with a number of supported types.\n *\n * The following properties are supported across all types:\n *\n * - `type` (string) - The type of the item. Can be `action`, `group`, `checkbox`. Defaults to `action` if `items` undefined and `group` otherwise.\n * - `id` (string) - allows to identify the item that the user clicked on. Mandatory for individual items, optional for categories.\n * - `text` (string) - description shown in the menu for this item. Mandatory for individual items, optional for categories.\n * - `lang` (string) - (Optional) The language of the item, provided as a BCP 47 language tag.\n * - `disabled` (boolean) - whether the item is disabled. Disabled items are not clickable, but they can be highlighted with the keyboard to make them accessible.\n * - `disabledReason` (string) - (Optional) Displays text near the `text` property when item is disabled. Use to provide additional context.\n * - `description` (string) - additional data that will be passed to a `data-description` attribute. **Deprecated**, has no effect.\n * - `ariaLabel` (string) - (Optional) - ARIA label of the item element.\n * - `dataAttributes` (Record<string, string>) - (Optional) Custom data attributes for the item element. Attribute names are automatically prefixed with \"data-\". The \"testid\" key is reserved.\n *\n * ### action\n *\n * - `href` (string) - (Optional) Defines the target URL of the menu item, turning it into a link.\n * - `download` (boolean | string) - (Optional) Indicates that the link should be downloaded when clicked. Only works when `href` is also provided. If set to `true`, the browser will use the filename from the URL. If set to a string, that string will be used as the suggested filename.\n * - `external` (boolean) - Marks a menu item as external by adding an icon after the menu item text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * - `externalIconAriaLabel` (string) - Adds an `aria-label` to the external icon.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * - `secondaryText` (string) - (Optional) Further information about the action that appears below the label.\n * - `labelTag` (string) - (Optional) - A label tag that provides additional guidance, shown next to the label.\n *\n * ### checkbox\n *\n * When `type` is set to \"checkbox\", the values set to `href`, `external` and `externalIconAriaLabel` will be ignored.\n *\n * - `checked` (boolean) - Controls the state of the checkbox item.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * - `secondaryText` (string) - (Optional) Further information about the action that appears below the label.\n * - `labelTag` (string) - (Optional) - A label tag that provides additional guidance, shown next to the label.\n *\n * ### group\n *\n * - `items` (ReadonlyArray<Item>) - an array of item objects. Items will be rendered as nested menu items but only for the first nesting level, multi-nesting is not supported.\n * An item which belongs to nested group has the following properties: `id`, `text`, `disabled`, and `description`.\n *\n */\n items: ReadonlyArray<ButtonDropdownProps.ItemOrGroup>;\n\n /**\n * Specifies a render function to render custom options in the dropdown menu.\n *\n * The item inside the props has a different shape depending on its type:\n *\n *\n * ### action\n *\n * - `type` ('action') - The item type.\n * - `index` (number) - The item's position relative to its parent.\n * - `option` (Item) - The original item configuration.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `parent` (GroupRenderItem | null) - The parent group item, if any.\n *\n * ### checkbox\n *\n * - `type` ('checkbox') - The item type.\n * - `index` (number) - The item's position relative to its parent.\n * - `option` (CheckboxItem) - The original item configuration.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `checked` (boolean) - Controls the state of the checkbox item.\n * - `parent` (GroupRenderItem | null) - The parent group item, if any.\n *\n * ### group\n *\n * - `type` ('group') - The item type.\n * - `index` (number) - The item's position in the list.\n * - `option` (ItemGroup) - The original item configuration.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `expanded` (boolean) - Whether the group is expanded.\n * - `expandDirection` ('vertical' | 'horizontal') - The direction in which the group expands.\n *\n * When providing a custom `renderItem` implementation, it fully replaces the default visual rendering and content for that item.\n * The component still manages focus, keyboard interactions, and selection state, but it no longer applies its default item layout or typography.\n *\n * When returning `null`, the default styling will be applied.\n */\n renderItem?: ButtonDropdownProps.ItemRenderer;\n\n /**\n * Determines whether the button dropdown is disabled. Users cannot interact with the control if it's disabled.\n */\n disabled?: boolean;\n /**\n * Provides a reason why the button dropdown is disabled (only when `disabled` is `true`).\n * If provided, the disabled button becomes focusable.\n */\n disabledReason?: string;\n /**\n * Renders the button as being in a loading state. It takes precedence over the `disabled` if both are set to `true`.\n * It prevents clicks.\n */\n loading?: boolean;\n /**\n * Specifies the text that screen reader announces when the button dropdown is in a loading state.\n */\n loadingText?: string;\n /** Determines the general styling of the button dropdown.\n * * `primary` for primary buttons\n * * `normal` for secondary buttons\n * * `icon` for icon buttons\n * * `inline-icon` for icon buttons with no outer padding\n */\n variant?: ButtonDropdownProps.Variant;\n /**\n * Controls expandability of the item groups.\n */\n expandableGroups?: boolean;\n /**\n * Adds `aria-label` to the button dropdown trigger.\n * Use this to provide an accessible name for buttons that don't have visible text.\n */\n ariaLabel?: string;\n /**\n * Text displayed in the button dropdown trigger.\n * @displayname text\n */\n children?: React.ReactNode;\n /**\n * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.\n */\n onItemClick?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * Called when the user clicks on an item with the left mouse button without pressing\n * modifier keys (that is, CTRL, ALT, SHIFT, META), and the item has an `href` set.\n */\n onItemFollow?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * A standalone action that is shown prior to the dropdown trigger.\n * Use it with \"primary\" and \"normal\" variant only.\n *\n * Main action properties:\n * * `text` (string) - Specifies the text shown in the main action.\n * * `external` (boolean) - Marks the main action as external by adding an icon after the text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * * `externalIconAriaLabel` (string) - Adds an ARIA label to the external icon.\n *\n * The main action also supports the following properties of the [button](/components/button/?tabId=api) component:\n * `ariaLabel`, `disabled`, `loading`, `loadingText`, `href`, `target`, `rel`, `download`, `iconAlt`, `iconName`, `iconUrl`, `iconSvg`, `onClick`, `onFollow`.\n */\n mainAction?: ButtonDropdownProps.MainAction;\n\n /**\n * Sets the button width to be 100% of the parent container width. Button content is centered.\n */\n fullWidth?: boolean;\n\n /**\n * Attributes to add to the native `button` element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeTriggerAttributes?: NativeAttributes<React.ButtonHTMLAttributes<HTMLButtonElement>>;\n\n /**\n * Attributes to add to the native element of the `mainAction`.\n *\n * Specify either `button` for a standard main action, or `anchor` if `html` is set.\n *\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeMainActionAttributes?: {\n button?: NativeAttributes<React.ButtonHTMLAttributes<HTMLButtonElement>>;\n anchor?: NativeAttributes<React.AnchorHTMLAttributes<HTMLAnchorElement>>;\n };\n}\n\nexport namespace ButtonDropdownProps {\n export type Variant = 'normal' | 'primary' | 'icon' | 'inline-icon';\n export type ItemType = 'action' | 'group';\n\n export interface ActionRenderItem {\n type: 'action';\n index: number;\n option: Item;\n highlighted: boolean;\n disabled: boolean;\n parent: GroupRenderItem | null;\n }\n export interface CheckboxRenderItem {\n type: 'checkbox';\n index: number;\n option: CheckboxItem;\n disabled: boolean;\n highlighted: boolean;\n checked: boolean;\n parent: GroupRenderItem | null;\n }\n export interface GroupRenderItem {\n type: 'group';\n index: number;\n option: ItemGroup;\n disabled: boolean;\n highlighted: boolean;\n expanded: boolean;\n expandDirection: 'vertical' | 'horizontal';\n }\n\n export type RenderItem = ActionRenderItem | CheckboxRenderItem | GroupRenderItem;\n export type ItemRenderer = (props: { item: ButtonDropdownProps.RenderItem }) => ReactNode | null;\n\n export interface MainAction {\n text?: string;\n ariaLabel?: string;\n onClick?: CancelableEventHandler<ButtonProps.ClickDetail>;\n onFollow?: CancelableEventHandler<ButtonProps.FollowDetail>;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n href?: string;\n target?: string;\n rel?: string;\n download?: boolean | string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n }\n\n export interface Item {\n itemType?: ItemType;\n id: string;\n text: string;\n secondaryText?: string;\n ariaLabel?: string;\n lang?: string;\n disabled?: boolean;\n disabledReason?: string;\n /**\n * @deprecated Has no effect.\n */\n description?: string;\n href?: string;\n download?: boolean | string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n labelTag?: string;\n dataAttributes?: Record<string, string>;\n }\n\n export interface CheckboxItem\n extends Omit<ButtonDropdownProps.Item, 'href' | 'download' | 'external' | 'externalIconAriaLabel' | 'itemType'> {\n itemType: 'checkbox';\n checked: boolean;\n }\n\n export interface ItemGroup extends Omit<Item, 'id' | 'text' | 'itemType' | 'secondaryText' | 'labelTag'> {\n itemType?: 'group';\n id?: string;\n text?: string;\n items: Items;\n }\n\n export type ItemOrGroup = Item | CheckboxItem | ItemGroup;\n\n export type Items = ReadonlyArray<ItemOrGroup>;\n\n export interface ItemClickDetails extends BaseNavigationDetail {\n id: string;\n checked?: boolean;\n }\n\n export interface Ref {\n /**\n * Focuses the underlying native button. If a main action is defined this will focus that button.\n */\n focus(options?: FocusOptions): void;\n /**\n * Focuses the underlying native button for the dropdown.\n */\n focusDropdownTrigger(options?: FocusOptions): void;\n }\n}\n\nexport interface ButtonDropdownSettings {\n // this means whether action is required to make group expand\n hasExpandableGroups: boolean;\n // on smaller screens expandable groups are integrated into parent dropdown\n // this changes keyboard navigation, highlight and activation behavior for parent dropdown\n isInRestrictedView?: boolean;\n}\n\nexport interface HighlightProps {\n targetItem: ButtonDropdownProps.ItemOrGroup | null;\n isHighlighted: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isKeyboardHighlight: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isExpanded: (group: ButtonDropdownProps.ItemGroup) => boolean;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n}\n\nexport type GroupToggle = (item: ButtonDropdownProps.ItemGroup, event: React.SyntheticEvent) => void;\nexport type ItemActivate = (\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem,\n event: React.MouseEvent | React.KeyboardEvent\n) => void;\n\nexport interface CategoryProps extends HighlightProps {\n index?: number;\n item: ButtonDropdownProps.ItemGroup;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n disabled: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n}\n\nexport interface ItemListProps extends HighlightProps {\n items: ButtonDropdownProps.Items;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n categoryDisabled?: boolean;\n hasExpandableGroups?: boolean;\n hasCategoryHeader?: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: InternalButtonDropdownProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n linkStyle?: boolean;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n parentProps?: ButtonDropdownProps.GroupRenderItem;\n}\n\nexport interface LinkItem extends ButtonDropdownProps.Item {\n href: string;\n}\n\nexport interface ItemProps {\n index?: number;\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem | LinkItem;\n disabled: boolean;\n highlighted: boolean;\n onItemActivate: ItemActivate;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n showDivider: boolean;\n hasCategoryHeader: boolean;\n isKeyboardHighlighted?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n linkStyle?: boolean;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n parentProps?: ButtonDropdownProps.GroupRenderItem;\n}\n\nexport interface InternalItem extends ButtonDropdownProps.Item {\n badge?: boolean;\n /**\n * Used in breadcrumb-group: indicates that this breadcrumb item is the current page\n */\n isCurrentBreadcrumb?: boolean;\n}\n\nexport interface InternalCheckboxItem extends ButtonDropdownProps.CheckboxItem {\n badge?: boolean;\n}\n\ninterface InternalItemGroup extends Omit<ButtonDropdownProps.ItemGroup, 'items'> {\n items: InternalItems;\n}\n\ntype InternalItems = ReadonlyArray<InternalItemOrGroup>;\n\nexport type InternalItemOrGroup = InternalItem | InternalCheckboxItem | InternalItemGroup;\n\nexport interface InternalButtonDropdownProps\n extends Omit<ButtonDropdownProps, 'variant' | 'items'>,\n InternalBaseComponentProps {\n customTriggerBuilder?: (props: CustomTriggerProps) => React.ReactNode;\n variant?: ButtonDropdownProps['variant'] | 'navigation';\n items: ReadonlyArray<InternalItemOrGroup>;\n\n /**\n * Optional text that is displayed as the title at the top of the dropdown.\n */\n title?: string;\n\n /**\n * Optional text that is displayed underneath the title at the top of the dropdown.\n */\n description?: string;\n\n /**\n * Only show main action button as a regular, non-split button.\n * That is needed so that button dropdown test utils wrapper can still be used.\n */\n showMainActionOnly?: boolean;\n\n /**\n * Determines that the dropdown should preferably be aligned to the center of the trigger\n * instead of dropping left or right.\n */\n preferCenter?: boolean;\n\n /**\n * Determines whether simple items should be displayed with the link styles.\n * Used in Breadcrumb group component for collapsed breadcrumbs\n */\n linkStyle?: boolean;\n\n /**\n * Determines whether the dropdown should take up the full available width.\n * Used in Breadcrumb group component for collapsed breadcrumbs\n */\n fullWidth?: boolean;\n\n analyticsMetadataTransformer?: (input: GeneratedAnalyticsMetadataFragment) => GeneratedAnalyticsMetadataFragment;\n\n /**\n * Position of the button dropdown inside a list of elements, for example a button group\n */\n position?: string;\n}\n\nexport interface CustomTriggerProps {\n triggerRef: React.Ref<HTMLElement>;\n testUtilsClass: string;\n ariaLabel: string | undefined;\n disabled: boolean;\n disabledReason?: string;\n isOpen: boolean;\n onClick: () => void;\n ariaExpanded: boolean;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button-dropdown/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode } from 'react';\n\nimport { GeneratedAnalyticsMetadataFragment } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { ExpandToViewport } from '../dropdown/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { BaseNavigationDetail, CancelableEventHandler } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../internal/utils/with-native-attributes';\n\nexport interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewport {\n /**\n * Array of objects with a number of supported types.\n *\n * The following properties are supported across all types:\n *\n * - `type` (string) - The type of the item. Can be `action`, `group`, `checkbox`. Defaults to `action` if `items` undefined and `group` otherwise.\n * - `id` (string) - allows to identify the item that the user clicked on. Mandatory for individual items, optional for categories.\n * - `text` (string) - description shown in the menu for this item. Mandatory for individual items, optional for categories.\n * - `lang` (string) - (Optional) The language of the item, provided as a BCP 47 language tag.\n * - `disabled` (boolean) - whether the item is disabled. Disabled items are not clickable, but they can be highlighted with the keyboard to make them accessible.\n * - `disabledReason` (string) - (Optional) Displays text near the `text` property when item is disabled. Use to provide additional context.\n * - `description` (string) - additional data that will be passed to a `data-description` attribute. **Deprecated**, has no effect.\n * - `ariaLabel` (string) - (Optional) - ARIA label of the item element.\n * - `dataAttributes` (Record<string, string>) - (Optional) Custom data attributes for the item element. Attribute names are automatically prefixed with \"data-\". The \"testid\" key is reserved.\n *\n * ### action\n *\n * - `href` (string) - (Optional) Defines the target URL of the menu item, turning it into a link.\n * - `download` (boolean | string) - (Optional) Indicates that the link should be downloaded when clicked. Only works when `href` is also provided. If set to `true`, the browser will use the filename from the URL. If set to a string, that string will be used as the suggested filename.\n * - `external` (boolean) - Marks a menu item as external by adding an icon after the menu item text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * - `externalIconAriaLabel` (string) - Adds an `aria-label` to the external icon.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * - `secondaryText` (string) - (Optional) Further information about the action that appears below the label.\n * - `labelTag` (string) - (Optional) - A label tag that provides additional guidance, shown next to the label.\n *\n * ### checkbox\n *\n * When `type` is set to \"checkbox\", the values set to `href`, `external` and `externalIconAriaLabel` will be ignored.\n *\n * - `checked` (boolean) - Controls the state of the checkbox item.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * - `secondaryText` (string) - (Optional) Further information about the action that appears below the label.\n * - `labelTag` (string) - (Optional) - A label tag that provides additional guidance, shown next to the label.\n *\n * ### group\n *\n * - `items` (ReadonlyArray<Item>) - an array of item objects. Items will be rendered as nested menu items but only for the first nesting level, multi-nesting is not supported.\n * An item which belongs to nested group has the following properties: `id`, `text`, `disabled`, and `description`.\n *\n */\n items: ReadonlyArray<ButtonDropdownProps.ItemOrGroup>;\n\n /**\n * Specifies a render function to render custom options in the dropdown menu.\n *\n * The item inside the props has a different shape depending on its type:\n *\n *\n * ### action\n *\n * - `type` ('action') - The item type.\n * - `index` (number) - The item's position relative to its parent.\n * - `option` (Item) - The original item configuration.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `parent` (GroupRenderItem | null) - The parent group item, if any.\n *\n * ### checkbox\n *\n * - `type` ('checkbox') - The item type.\n * - `index` (number) - The item's position relative to its parent.\n * - `option` (CheckboxItem) - The original item configuration.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `checked` (boolean) - Controls the state of the checkbox item.\n * - `parent` (GroupRenderItem | null) - The parent group item, if any.\n *\n * ### group\n *\n * - `type` ('group') - The item type.\n * - `index` (number) - The item's position in the list.\n * - `option` (ItemGroup) - The original item configuration.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `expanded` (boolean) - Whether the group is expanded.\n * - `expandDirection` ('vertical' | 'horizontal') - The direction in which the group expands.\n *\n * When providing a custom `renderItem` implementation, it fully replaces the default visual rendering and content for that item.\n * The component still manages focus, keyboard interactions, and selection state, but it no longer applies its default item layout or typography.\n *\n * When returning `null`, the default styling will be applied.\n */\n renderItem?: ButtonDropdownProps.ItemRenderer;\n\n /**\n * Determines whether the button dropdown is disabled. Users cannot interact with the control if it's disabled.\n */\n disabled?: boolean;\n /**\n * Provides a reason why the button dropdown is disabled (only when `disabled` is `true`).\n * If provided, the disabled button becomes focusable.\n */\n disabledReason?: string;\n /**\n * Renders the button as being in a loading state. It takes precedence over the `disabled` if both are set to `true`.\n * It prevents clicks.\n */\n loading?: boolean;\n /**\n * Specifies the text that screen reader announces when the button dropdown is in a loading state.\n */\n loadingText?: string;\n /** Determines the general styling of the button dropdown.\n * * `primary` for primary buttons\n * * `normal` for secondary buttons\n * * `icon` for icon buttons\n * * `inline-icon` for icon buttons with no outer padding\n */\n variant?: ButtonDropdownProps.Variant;\n /**\n * Specifies the name of the icon used in the button dropdown trigger, used with the [icon component](/components/icon/).\n * Defaults to `ellipsis`. Applies to the `icon` and `inline-icon` variants only.\n */\n iconName?: IconProps.Name;\n /**\n * Specifies alternate text for a custom icon, for use with `iconUrl`. Applies to the `icon` and `inline-icon` variants only.\n */\n iconAlt?: string;\n /**\n * Specifies the URL of a custom icon. Applies to the `icon` and `inline-icon` variants only.\n *\n * If you set both `iconUrl` and `iconSvg`, `iconSvg` will take precedence.\n */\n iconUrl?: string;\n /**\n * Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * Applies to the `icon` and `inline-icon` variants only.\n *\n * If you set both `iconUrl` and `iconSvg`, `iconSvg` will take precedence.\n */\n iconSvg?: React.ReactNode;\n /**\n * Controls expandability of the item groups.\n */\n expandableGroups?: boolean;\n /**\n * Adds `aria-label` to the button dropdown trigger.\n * Use this to provide an accessible name for buttons that don't have visible text.\n */\n ariaLabel?: string;\n /**\n * Text displayed in the button dropdown trigger.\n * @displayname text\n */\n children?: React.ReactNode;\n /**\n * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.\n */\n onItemClick?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * Called when the user clicks on an item with the left mouse button without pressing\n * modifier keys (that is, CTRL, ALT, SHIFT, META), and the item has an `href` set.\n */\n onItemFollow?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * A standalone action that is shown prior to the dropdown trigger.\n * Use it with \"primary\" and \"normal\" variant only.\n *\n * Main action properties:\n * * `text` (string) - Specifies the text shown in the main action.\n * * `external` (boolean) - Marks the main action as external by adding an icon after the text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * * `externalIconAriaLabel` (string) - Adds an ARIA label to the external icon.\n *\n * The main action also supports the following properties of the [button](/components/button/?tabId=api) component:\n * `ariaLabel`, `disabled`, `loading`, `loadingText`, `href`, `target`, `rel`, `download`, `iconAlt`, `iconName`, `iconUrl`, `iconSvg`, `onClick`, `onFollow`.\n */\n mainAction?: ButtonDropdownProps.MainAction;\n\n /**\n * Sets the button width to be 100% of the parent container width. Button content is centered.\n */\n fullWidth?: boolean;\n\n /**\n * Attributes to add to the native `button` element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeTriggerAttributes?: NativeAttributes<React.ButtonHTMLAttributes<HTMLButtonElement>>;\n\n /**\n * Attributes to add to the native element of the `mainAction`.\n *\n * Specify either `button` for a standard main action, or `anchor` if `html` is set.\n *\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeMainActionAttributes?: {\n button?: NativeAttributes<React.ButtonHTMLAttributes<HTMLButtonElement>>;\n anchor?: NativeAttributes<React.AnchorHTMLAttributes<HTMLAnchorElement>>;\n };\n}\n\nexport namespace ButtonDropdownProps {\n export type Variant = 'normal' | 'primary' | 'icon' | 'inline-icon';\n export type ItemType = 'action' | 'group';\n\n export interface ActionRenderItem {\n type: 'action';\n index: number;\n option: Item;\n highlighted: boolean;\n disabled: boolean;\n parent: GroupRenderItem | null;\n }\n export interface CheckboxRenderItem {\n type: 'checkbox';\n index: number;\n option: CheckboxItem;\n disabled: boolean;\n highlighted: boolean;\n checked: boolean;\n parent: GroupRenderItem | null;\n }\n export interface GroupRenderItem {\n type: 'group';\n index: number;\n option: ItemGroup;\n disabled: boolean;\n highlighted: boolean;\n expanded: boolean;\n expandDirection: 'vertical' | 'horizontal';\n }\n\n export type RenderItem = ActionRenderItem | CheckboxRenderItem | GroupRenderItem;\n export type ItemRenderer = (props: { item: ButtonDropdownProps.RenderItem }) => ReactNode | null;\n\n export interface MainAction {\n text?: string;\n ariaLabel?: string;\n onClick?: CancelableEventHandler<ButtonProps.ClickDetail>;\n onFollow?: CancelableEventHandler<ButtonProps.FollowDetail>;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n href?: string;\n target?: string;\n rel?: string;\n download?: boolean | string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n }\n\n export interface Item {\n itemType?: ItemType;\n id: string;\n text: string;\n secondaryText?: string;\n ariaLabel?: string;\n lang?: string;\n disabled?: boolean;\n disabledReason?: string;\n /**\n * @deprecated Has no effect.\n */\n description?: string;\n href?: string;\n download?: boolean | string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n labelTag?: string;\n dataAttributes?: Record<string, string>;\n }\n\n export interface CheckboxItem\n extends Omit<ButtonDropdownProps.Item, 'href' | 'download' | 'external' | 'externalIconAriaLabel' | 'itemType'> {\n itemType: 'checkbox';\n checked: boolean;\n }\n\n export interface ItemGroup extends Omit<Item, 'id' | 'text' | 'itemType' | 'secondaryText' | 'labelTag'> {\n itemType?: 'group';\n id?: string;\n text?: string;\n items: Items;\n }\n\n export type ItemOrGroup = Item | CheckboxItem | ItemGroup;\n\n export type Items = ReadonlyArray<ItemOrGroup>;\n\n export interface ItemClickDetails extends BaseNavigationDetail {\n id: string;\n checked?: boolean;\n }\n\n export interface Ref {\n /**\n * Focuses the underlying native button. If a main action is defined this will focus that button.\n */\n focus(options?: FocusOptions): void;\n /**\n * Focuses the underlying native button for the dropdown.\n */\n focusDropdownTrigger(options?: FocusOptions): void;\n }\n}\n\nexport interface ButtonDropdownSettings {\n // this means whether action is required to make group expand\n hasExpandableGroups: boolean;\n // on smaller screens expandable groups are integrated into parent dropdown\n // this changes keyboard navigation, highlight and activation behavior for parent dropdown\n isInRestrictedView?: boolean;\n}\n\nexport interface HighlightProps {\n targetItem: ButtonDropdownProps.ItemOrGroup | null;\n isHighlighted: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isKeyboardHighlight: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isExpanded: (group: ButtonDropdownProps.ItemGroup) => boolean;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n}\n\nexport type GroupToggle = (item: ButtonDropdownProps.ItemGroup, event: React.SyntheticEvent) => void;\nexport type ItemActivate = (\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem,\n event: React.MouseEvent | React.KeyboardEvent\n) => void;\n\nexport interface CategoryProps extends HighlightProps {\n index?: number;\n item: ButtonDropdownProps.ItemGroup;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n disabled: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n}\n\nexport interface ItemListProps extends HighlightProps {\n items: ButtonDropdownProps.Items;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n categoryDisabled?: boolean;\n hasExpandableGroups?: boolean;\n hasCategoryHeader?: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: InternalButtonDropdownProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n linkStyle?: boolean;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n parentProps?: ButtonDropdownProps.GroupRenderItem;\n}\n\nexport interface LinkItem extends ButtonDropdownProps.Item {\n href: string;\n}\n\nexport interface ItemProps {\n index?: number;\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem | LinkItem;\n disabled: boolean;\n highlighted: boolean;\n onItemActivate: ItemActivate;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n showDivider: boolean;\n hasCategoryHeader: boolean;\n isKeyboardHighlighted?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n linkStyle?: boolean;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n parentProps?: ButtonDropdownProps.GroupRenderItem;\n}\n\nexport interface InternalItem extends ButtonDropdownProps.Item {\n badge?: boolean;\n /**\n * Used in breadcrumb-group: indicates that this breadcrumb item is the current page\n */\n isCurrentBreadcrumb?: boolean;\n}\n\nexport interface InternalCheckboxItem extends ButtonDropdownProps.CheckboxItem {\n badge?: boolean;\n}\n\ninterface InternalItemGroup extends Omit<ButtonDropdownProps.ItemGroup, 'items'> {\n items: InternalItems;\n}\n\ntype InternalItems = ReadonlyArray<InternalItemOrGroup>;\n\nexport type InternalItemOrGroup = InternalItem | InternalCheckboxItem | InternalItemGroup;\n\nexport interface InternalButtonDropdownProps\n extends Omit<ButtonDropdownProps, 'variant' | 'items'>,\n InternalBaseComponentProps {\n customTriggerBuilder?: (props: CustomTriggerProps) => React.ReactNode;\n variant?: ButtonDropdownProps['variant'] | 'navigation';\n items: ReadonlyArray<InternalItemOrGroup>;\n\n /**\n * Optional text that is displayed as the title at the top of the dropdown.\n */\n title?: string;\n\n /**\n * Optional text that is displayed underneath the title at the top of the dropdown.\n */\n description?: string;\n\n /**\n * Only show main action button as a regular, non-split button.\n * That is needed so that button dropdown test utils wrapper can still be used.\n */\n showMainActionOnly?: boolean;\n\n /**\n * Determines that the dropdown should preferably be aligned to the center of the trigger\n * instead of dropping left or right.\n */\n preferCenter?: boolean;\n\n /**\n * Determines whether simple items should be displayed with the link styles.\n * Used in Breadcrumb group component for collapsed breadcrumbs\n */\n linkStyle?: boolean;\n\n /**\n * Determines whether the dropdown should take up the full available width.\n * Used in Breadcrumb group component for collapsed breadcrumbs\n */\n fullWidth?: boolean;\n\n analyticsMetadataTransformer?: (input: GeneratedAnalyticsMetadataFragment) => GeneratedAnalyticsMetadataFragment;\n\n /**\n * Position of the button dropdown inside a list of elements, for example a button group\n */\n position?: string;\n}\n\nexport interface CustomTriggerProps {\n triggerRef: React.Ref<HTMLElement>;\n testUtilsClass: string;\n ariaLabel: string | undefined;\n disabled: boolean;\n disabledReason?: string;\n isOpen: boolean;\n onClick: () => void;\n ariaExpanded: boolean;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAsBtE,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAgB,MAAM,cAAc,CAAC;AAQ9F,QAAA,MAAM,sBAAsB,6GA4Y3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAuBtE,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAgB,MAAM,cAAc,CAAC;AAQ9F,QAAA,MAAM,sBAAsB,6GA6Z3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}