@ui5/webcomponents 2.19.0-rc.3 → 2.19.0

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 (213) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/Avatar.d.ts +3 -2
  4. package/dist/Avatar.js +1 -1
  5. package/dist/Avatar.js.map +1 -1
  6. package/dist/AvatarBadge.d.ts +3 -3
  7. package/dist/AvatarBadge.js +4 -4
  8. package/dist/AvatarBadge.js.map +1 -1
  9. package/dist/AvatarGroup.d.ts +7 -2
  10. package/dist/AvatarGroup.js +2 -2
  11. package/dist/AvatarGroup.js.map +1 -1
  12. package/dist/Bar.d.ts +4 -3
  13. package/dist/Bar.js +3 -3
  14. package/dist/Bar.js.map +1 -1
  15. package/dist/Breadcrumbs.d.ts +2 -2
  16. package/dist/Breadcrumbs.js +1 -1
  17. package/dist/Breadcrumbs.js.map +1 -1
  18. package/dist/BreadcrumbsItem.d.ts +2 -1
  19. package/dist/BreadcrumbsItem.js +1 -1
  20. package/dist/BreadcrumbsItem.js.map +1 -1
  21. package/dist/Button.d.ts +4 -3
  22. package/dist/Button.js +1 -1
  23. package/dist/Button.js.map +1 -1
  24. package/dist/Calendar.d.ts +5 -5
  25. package/dist/Calendar.js +1 -1
  26. package/dist/Calendar.js.map +1 -1
  27. package/dist/CalendarLegend.d.ts +2 -1
  28. package/dist/CalendarLegend.js +1 -1
  29. package/dist/CalendarLegend.js.map +1 -1
  30. package/dist/Card.d.ts +3 -2
  31. package/dist/Card.js +1 -1
  32. package/dist/Card.js.map +1 -1
  33. package/dist/CardHeader.d.ts +3 -2
  34. package/dist/CardHeader.js +1 -1
  35. package/dist/CardHeader.js.map +1 -1
  36. package/dist/Carousel.d.ts +2 -1
  37. package/dist/Carousel.js +1 -1
  38. package/dist/Carousel.js.map +1 -1
  39. package/dist/ColorPalette.d.ts +2 -1
  40. package/dist/ColorPalette.js +1 -1
  41. package/dist/ColorPalette.js.map +1 -1
  42. package/dist/ColorPalettePopover.d.ts +2 -1
  43. package/dist/ColorPalettePopover.js +1 -1
  44. package/dist/ColorPalettePopover.js.map +1 -1
  45. package/dist/ComboBox.d.ts +4 -3
  46. package/dist/ComboBox.js +1 -1
  47. package/dist/ComboBox.js.map +1 -1
  48. package/dist/ComboBoxItemGroup.d.ts +2 -1
  49. package/dist/ComboBoxItemGroup.js +2 -2
  50. package/dist/ComboBoxItemGroup.js.map +1 -1
  51. package/dist/DatePicker.d.ts +2 -1
  52. package/dist/DatePicker.js +2 -2
  53. package/dist/DatePicker.js.map +1 -1
  54. package/dist/Dialog.d.ts +3 -2
  55. package/dist/Dialog.js +1 -1
  56. package/dist/Dialog.js.map +1 -1
  57. package/dist/FileUploader.d.ts +3 -2
  58. package/dist/FileUploader.js +1 -1
  59. package/dist/FileUploader.js.map +1 -1
  60. package/dist/Form.d.ts +3 -2
  61. package/dist/Form.js +1 -1
  62. package/dist/Form.js.map +1 -1
  63. package/dist/FormGroup.d.ts +2 -1
  64. package/dist/FormGroup.js +1 -1
  65. package/dist/FormGroup.js.map +1 -1
  66. package/dist/FormItem.d.ts +3 -2
  67. package/dist/FormItem.js +1 -1
  68. package/dist/FormItem.js.map +1 -1
  69. package/dist/Input.d.ts +4 -3
  70. package/dist/Input.js +1 -1
  71. package/dist/Input.js.map +1 -1
  72. package/dist/List.d.ts +3 -2
  73. package/dist/List.js +1 -1
  74. package/dist/List.js.map +1 -1
  75. package/dist/ListItem.d.ts +2 -1
  76. package/dist/ListItem.js +1 -1
  77. package/dist/ListItem.js.map +1 -1
  78. package/dist/ListItemGroup.d.ts +3 -2
  79. package/dist/ListItemGroup.js +2 -2
  80. package/dist/ListItemGroup.js.map +1 -1
  81. package/dist/ListItemGroupHeader.d.ts +2 -1
  82. package/dist/ListItemGroupHeader.js +1 -1
  83. package/dist/ListItemGroupHeader.js.map +1 -1
  84. package/dist/ListItemStandard.d.ts +3 -2
  85. package/dist/ListItemStandard.js +1 -1
  86. package/dist/ListItemStandard.js.map +1 -1
  87. package/dist/Menu.d.ts +2 -1
  88. package/dist/Menu.js +1 -1
  89. package/dist/Menu.js.map +1 -1
  90. package/dist/MenuItem.d.ts +3 -2
  91. package/dist/MenuItem.js +3 -3
  92. package/dist/MenuItem.js.map +1 -1
  93. package/dist/MenuItemGroup.d.ts +2 -1
  94. package/dist/MenuItemGroup.js +1 -1
  95. package/dist/MenuItemGroup.js.map +1 -1
  96. package/dist/MessageStrip.d.ts +2 -1
  97. package/dist/MessageStrip.js +1 -1
  98. package/dist/MessageStrip.js.map +1 -1
  99. package/dist/MultiComboBox.d.ts +4 -3
  100. package/dist/MultiComboBox.js +1 -1
  101. package/dist/MultiComboBox.js.map +1 -1
  102. package/dist/MultiComboBoxItemGroup.d.ts +2 -1
  103. package/dist/MultiComboBoxItemGroup.js +2 -2
  104. package/dist/MultiComboBoxItemGroup.js.map +1 -1
  105. package/dist/MultiInput.d.ts +2 -1
  106. package/dist/MultiInput.js +1 -1
  107. package/dist/MultiInput.js.map +1 -1
  108. package/dist/Option.d.ts +2 -1
  109. package/dist/Option.js +1 -1
  110. package/dist/Option.js.map +1 -1
  111. package/dist/OptionCustom.d.ts +2 -1
  112. package/dist/OptionCustom.js +1 -1
  113. package/dist/OptionCustom.js.map +1 -1
  114. package/dist/Panel.d.ts +2 -1
  115. package/dist/Panel.js +1 -1
  116. package/dist/Panel.js.map +1 -1
  117. package/dist/Popover.d.ts +3 -2
  118. package/dist/Popover.js +3 -3
  119. package/dist/Popover.js.map +1 -1
  120. package/dist/Popup.d.ts +2 -1
  121. package/dist/Popup.js +1 -1
  122. package/dist/Popup.js.map +1 -1
  123. package/dist/SegmentedButton.d.ts +2 -1
  124. package/dist/SegmentedButton.js +1 -1
  125. package/dist/SegmentedButton.js.map +1 -1
  126. package/dist/SegmentedButtonItem.d.ts +2 -1
  127. package/dist/SegmentedButtonItem.js +1 -1
  128. package/dist/SegmentedButtonItem.js.map +1 -1
  129. package/dist/Select.d.ts +4 -3
  130. package/dist/Select.js +1 -1
  131. package/dist/Select.js.map +1 -1
  132. package/dist/SplitButton.d.ts +2 -1
  133. package/dist/SplitButton.js +1 -1
  134. package/dist/SplitButton.js.map +1 -1
  135. package/dist/StepInput.d.ts +2 -1
  136. package/dist/StepInput.js +1 -1
  137. package/dist/StepInput.js.map +1 -1
  138. package/dist/SuggestionItemCustom.d.ts +2 -1
  139. package/dist/SuggestionItemCustom.js +1 -1
  140. package/dist/SuggestionItemCustom.js.map +1 -1
  141. package/dist/SuggestionItemGroup.d.ts +2 -1
  142. package/dist/SuggestionItemGroup.js +1 -1
  143. package/dist/SuggestionItemGroup.js.map +1 -1
  144. package/dist/SuggestionListItem.d.ts +3 -2
  145. package/dist/SuggestionListItem.js +2 -2
  146. package/dist/SuggestionListItem.js.map +1 -1
  147. package/dist/Tab.d.ts +3 -2
  148. package/dist/Tab.js +1 -1
  149. package/dist/Tab.js.map +1 -1
  150. package/dist/TabContainer.d.ts +7 -7
  151. package/dist/TabContainer.js +16 -4
  152. package/dist/TabContainer.js.map +1 -1
  153. package/dist/Table.d.ts +5 -4
  154. package/dist/Table.js +1 -1
  155. package/dist/Table.js.map +1 -1
  156. package/dist/TableCellBase.d.ts +2 -1
  157. package/dist/TableCellBase.js +1 -1
  158. package/dist/TableCellBase.js.map +1 -1
  159. package/dist/TableHeaderCell.d.ts +2 -1
  160. package/dist/TableHeaderCell.js +1 -1
  161. package/dist/TableHeaderCell.js.map +1 -1
  162. package/dist/TableHeaderRow.d.ts +2 -1
  163. package/dist/TableHeaderRow.js +1 -1
  164. package/dist/TableHeaderRow.js.map +1 -1
  165. package/dist/TableRow.d.ts +3 -2
  166. package/dist/TableRow.js +1 -1
  167. package/dist/TableRow.js.map +1 -1
  168. package/dist/Tag.d.ts +3 -2
  169. package/dist/Tag.js +1 -1
  170. package/dist/Tag.js.map +1 -1
  171. package/dist/Text.d.ts +2 -1
  172. package/dist/Text.js +1 -1
  173. package/dist/Text.js.map +1 -1
  174. package/dist/TextArea.d.ts +2 -1
  175. package/dist/TextArea.js +1 -1
  176. package/dist/TextArea.js.map +1 -1
  177. package/dist/TimePicker.d.ts +2 -1
  178. package/dist/TimePicker.js +1 -1
  179. package/dist/TimePicker.js.map +1 -1
  180. package/dist/Token.d.ts +2 -1
  181. package/dist/Token.js +1 -2
  182. package/dist/Token.js.map +1 -1
  183. package/dist/Tokenizer.d.ts +2 -1
  184. package/dist/Tokenizer.js +1 -1
  185. package/dist/Tokenizer.js.map +1 -1
  186. package/dist/Toolbar.d.ts +2 -2
  187. package/dist/Toolbar.js +1 -1
  188. package/dist/Toolbar.js.map +1 -1
  189. package/dist/ToolbarSelect.d.ts +3 -2
  190. package/dist/ToolbarSelect.js +1 -1
  191. package/dist/ToolbarSelect.js.map +1 -1
  192. package/dist/ToolbarSelectOption.d.ts +2 -1
  193. package/dist/ToolbarSelectOption.js +1 -1
  194. package/dist/ToolbarSelectOption.js.map +1 -1
  195. package/dist/Tree.d.ts +3 -2
  196. package/dist/Tree.js +1 -1
  197. package/dist/Tree.js.map +1 -1
  198. package/dist/TreeItemBase.d.ts +3 -2
  199. package/dist/TreeItemBase.js +1 -1
  200. package/dist/TreeItemBase.js.map +1 -1
  201. package/dist/TreeItemCustom.d.ts +2 -1
  202. package/dist/TreeItemCustom.js +1 -1
  203. package/dist/TreeItemCustom.js.map +1 -1
  204. package/dist/css/themes/AvatarBadge.css +1 -1
  205. package/dist/custom-elements-internal.json +6 -6
  206. package/dist/custom-elements.json +6 -6
  207. package/dist/generated/themes/AvatarBadge.css.d.ts +1 -1
  208. package/dist/generated/themes/AvatarBadge.css.js +1 -1
  209. package/dist/generated/themes/AvatarBadge.css.js.map +1 -1
  210. package/dist/vscode.html-custom-data.json +3 -3
  211. package/dist/web-types.json +6 -6
  212. package/package.json +9 -9
  213. package/src/themes/AvatarBadge.css +4 -4
package/dist/Avatar.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
+ import type { Slot, DefaultSlot } from "@ui5/webcomponents-base/dist/UI5Element.js";
2
3
  import type { AccessibilityAttributes, AriaRole } from "@ui5/webcomponents-base/dist/types.js";
3
4
  import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
4
5
  import type { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
@@ -163,7 +164,7 @@ declare class Avatar extends UI5Element implements ITabbable, IAvatarGroupItem {
163
164
  * @public
164
165
  * @since 1.0.0-rc.15
165
166
  */
166
- image: Array<HTMLElement>;
167
+ image: DefaultSlot<HTMLElement>;
167
168
  /**
168
169
  * Defines the optional badge that will be used for visual affordance.
169
170
  *
@@ -172,7 +173,7 @@ declare class Avatar extends UI5Element implements ITabbable, IAvatarGroupItem {
172
173
  * @public
173
174
  * @since 1.7.0
174
175
  */
175
- badge: Array<HTMLElement>;
176
+ badge: Slot<HTMLElement>;
176
177
  static i18nBundle: I18nBundle;
177
178
  _handleResizeBound: ResizeObserverCallback;
178
179
  _onImageLoadBound: (e: Event) => void;
package/dist/Avatar.js CHANGED
@@ -8,7 +8,7 @@ var Avatar_1;
8
8
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
9
9
  import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
10
10
  import property from "@ui5/webcomponents-base/dist/decorators/property.js";
11
- import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
11
+ import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
12
12
  import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
13
13
  import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
14
14
  import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../src/Avatar.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAA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,EAAE;4CACmC;AAU9C;IADC,QAAQ,EAAE;8CACa;AAcxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDACiC;AAG5D;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;8CACR;AAMxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACV;AAMlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;+CACvB;AAaxB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;qCAClB;AAW3B;IADC,IAAI,EAAE;qCACoB;AAGpB;IADN,IAAI,CAAC,oBAAoB,CAAC;gCACG;AA7KzB,MAAM;IAlBX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,cAAc;KACxB,CAAC;IACF;;;;;;;OAOG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;GACI,MAAM,CA4aX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type { AccessibilityAttributes, AriaRole } from \"@ui5/webcomponents-base/dist/types.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport { isEnter, isSpace } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { IAvatarGroupItem } from \"./AvatarGroup.js\";\n// Template\nimport AvatarTemplate from \"./AvatarTemplate.js\";\n\nimport {\n\tAVATAR_TOOLTIP,\n\tAVATAR_TYPE_BUTTON,\n\tAVATAR_TYPE_IMAGE,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport AvatarCss from \"./generated/themes/Avatar.css.js\";\n\nimport type Icon from \"./Icon.js\";\nimport AvatarSize from \"./types/AvatarSize.js\";\nimport type AvatarShape from \"./types/AvatarShape.js\";\nimport type AvatarColorScheme from \"./types/AvatarColorScheme.js\";\n\n// Icon\nimport \"@ui5/webcomponents-icons/dist/employee.js\";\n\ntype AvatarAccessibilityAttributes = Pick<AccessibilityAttributes, \"hasPopup\">;\n\n/**\n * @class\n * ### Overview\n *\n * An image-like component that has different display options for representing images and icons\n * in different shapes and sizes, depending on the use case.\n *\n * The shape can be circular or square. There are several predefined sizes, as well as an option to\n * set a custom size.\n *\n * ### Keyboard Handling\n *\n * - [Space] / [Enter] or [Return] - Fires the `click` event if the `interactive` property is set to true.\n * - [Shift] - If [Space] is pressed, pressing [Shift] releases the component without triggering the click event.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents/dist/Avatar.js\";`\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.6\n * @implements {IAvatarGroupItem}\n * @public\n */\n@customElement({\n\ttag: \"ui5-avatar\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\tstyles: AvatarCss,\n\ttemplate: AvatarTemplate,\n})\n/**\n * Fired on mouseup, space and enter if avatar is interactive\n *\n * **Note:** The event will not be fired if the `disabled`\n * property is set to `true`.\n * @public\n * @since 2.11.0\n */\n@event(\"click\", {\n\tbubbles: true,\n})\nclass Avatar extends UI5Element implements ITabbable, IAvatarGroupItem {\n\teventDetails!: {\n\t\tclick: void,\n\t}\n\t/**\n\t * Defines whether the component is disabled.\n\t * A disabled component can't be pressed or\n\t * focused, and it is not in the tab chain.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines if the avatar is interactive (focusable and pressable).\n\t *\n\t * **Note:** This property won't have effect if the `disabled`\n\t * property is set to `true`.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tinteractive = false;\n\n\t/**\n\t * Defines the name of the UI5 Icon, that will be displayed.\n\t *\n\t * **Note:** If `image` slot is provided, the property will be ignored.\n\t *\n\t * **Note:** You should import the desired icon first, then use its name as \"icon\".\n\t *\n\t * `import \"@ui5/webcomponents-icons/dist/{icon_name}.js\"`\n\t *\n\t * `<ui5-avatar icon=\"employee\">`\n\t *\n\t * **Note:** If no icon or an empty one is provided, by default the \"employee\" icon should be displayed.\n\t *\n\t * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ticon?: string;\n\n\t/**\n\t * Defines the name of the fallback icon, which should be displayed in the following cases:\n\t *\n\t * \t- If the initials are not valid (more than 3 letters, unsupported languages or empty initials).\n\t * \t- If there are three initials and they do not fit in the shape (e.g. WWW for some of the sizes).\n\t * \t- If the image src is wrong.\n\t *\n\t * **Note:** If not set, a default fallback icon \"employee\" is displayed.\n\t *\n\t * **Note:** You should import the desired icon first, then use its name as \"fallback-icon\".\n\t *\n\t * `import \"@ui5/webcomponents-icons/dist/{icon_name}.js\"`\n\t *\n\t * `<ui5-avatar fallback-icon=\"alert\">`\n\t *\n\t * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default \"employee\"\n\t * @public\n\t */\n\t@property()\n\tfallbackIcon = \"employee\";\n\n\t/**\n\t * Defines the displayed initials.\n\t *\n\t * Up to three Latin letters can be displayed as initials.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tinitials?: string;\n\n\t/**\n\t * Defines the shape of the component.\n\t * @default \"Circle\"\n\t * @public\n\t */\n\t@property()\n\tshape: `${AvatarShape}` = \"Circle\";\n\n\t/**\n\t * Defines predefined size of the component.\n\t * @default \"S\"\n\t * @public\n\t */\n\t@property()\n\tsize: `${AvatarSize}` = \"S\";\n\n\t/**\n\t * Defines the background color of the desired image.\n\t * If `colorScheme` is set to `Auto`, the avatar will be displayed with the `Accent6` color.\n\t *\n\t * @default \"Auto\"\n\t * @public\n\t */\n\t@property()\n\tcolorScheme: `${AvatarColorScheme}` = \"Auto\";\n\n\t/**\n\t * @private\n\t */\n\t@property()\n\t_colorScheme: `${AvatarColorScheme}` = \"Auto\";\n\n\t/**\n\t * Defines the text alternative of the component.\n\t * If not provided a default text alternative will be set, if present.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.7\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the additional accessibility attributes that will be applied to the component.\n\t * The following field is supported:\n\t *\n\t * - **hasPopup**: Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by the button.\n\t * Accepts the following string values: `dialog`, `grid`, `listbox`, `menu` or `tree`.\n\t *\n\t * @public\n\t * @since 2.0.0\n\t * @default {}\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes: AvatarAccessibilityAttributes = {};\n\n\t@property({ noAttribute: true })\n\tforcedTabIndex?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_hasImage = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_imageLoadError = false;\n\n\t/**\n\t * Receives the desired `<img>` tag\n\t *\n\t * **Note:** If you experience flickering of the provided image, you can hide the component until it is defined with the following CSS:<br/>\n\t * `ui5-avatar:not(:defined) {`<br/>\n\t * &nbsp;&nbsp;&nbsp;&nbsp;`visibility: hidden;`<br/>\n\t * `}`\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\timage!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the optional badge that will be used for visual affordance.\n\t *\n\t * **Note:** While the slot allows for custom badges, to achieve\n\t * the Fiori design, use the `ui5-avatar-badge` component.\n\t * @public\n\t * @since 1.7.0\n\t */\n\t@slot()\n\tbadge!: Array<HTMLElement>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_handleResizeBound: ResizeObserverCallback;\n\t_onImageLoadBound: (e: Event) => void;\n\t_onImageErrorBound: (e: Event) => void;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._handleResizeBound = this.handleResize.bind(this);\n\t\tthis._onImageLoadBound = this._onImageLoad.bind(this);\n\t\tthis._onImageErrorBound = this._onImageError.bind(this);\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._attachImageEventHandlers();\n\t\tthis._hasImage = this.hasImage;\n\t}\n\n\tget tabindex() {\n\t\tif (this.forcedTabIndex) {\n\t\t\treturn parseInt(this.forcedTabIndex);\n\t\t}\n\t\treturn this._interactive ? 0 : undefined;\n\t}\n\n\t/**\n\t * Returns the effective avatar size.\n\t * @default \"S\"\n\t * @private\n\t */\n\tget effectiveSize(): AvatarSize {\n\t\t// we read the attribute, because the \"size\" property will always have a default value\n\t\treturn this.getAttribute(\"size\") as AvatarSize || AvatarSize.S;\n\t}\n\n\t/**\n\t * Returns the effective background color.\n\t * @default \"Auto\"\n\t * @private\n\t */\n\tget effectiveBackgroundColor(): AvatarColorScheme {\n\t\t// we read the attribute, because the \"background-color\" property will always have a default value\n\t\treturn this.getAttribute(\"color-scheme\") as AvatarColorScheme || this._colorScheme;\n\t}\n\n\tget _role() {\n\t\treturn this._interactive ? \"button\" : \"img\";\n\t}\n\n\tget _ariaHasPopup() {\n\t\treturn this._getAriaHasPopup();\n\t}\n\n\tget _interactive() {\n\t\treturn this.interactive && !this.disabled;\n\t}\n\n\tget validInitials() {\n\t\t// initials should consist of only 1,2 or 3 latin letters\n\t\tconst validInitials = /^[a-zA-Zà-üÀ-Ü]{1,3}$/,\n\t\t\tareInitialsValid = this.initials && validInitials.test(this.initials);\n\n\t\tif (areInitialsValid) {\n\t\t\treturn this.initials;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tget accessibleNameText() {\n\t\tif (this.accessibleName) {\n\t\t\treturn this.accessibleName;\n\t\t}\n\n\t\tconst defaultLabel = Avatar.i18nBundle.getText(AVATAR_TOOLTIP);\n\n\t\treturn this.initials ? `${defaultLabel} ${this.initials}`.trim() : defaultLabel;\n\t}\n\n\tget hasImage() {\n\t\treturn !!this.image.length && !this._imageLoadError;\n\t}\n\n\tget imageEl(): HTMLImageElement | null {\n\t\treturn this.image?.[0] instanceof HTMLImageElement ? this.image[0] : null;\n\t}\n\n\tget initialsContainer(): HTMLObjectElement | null {\n\t\treturn this.getDomRef()!.querySelector(\".ui5-avatar-initials\");\n\t}\n\n\tget fallBackIconDomRef(): Icon | null {\n\t\treturn this.getDomRef()!.querySelector(\".ui5-avatar-icon-fallback\");\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished();\n\t\tif (this.initials && !this.icon) {\n\t\t\tthis._checkInitials();\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\n\t\tthis.initialsContainer && ResizeHandler.register(this.initialsContainer,\n\t\t\tthis._handleResizeBound);\n\t}\n\n\tonExitDOM() {\n\t\tthis.initialsContainer && ResizeHandler.deregister(this.initialsContainer,\n\t\t\tthis._handleResizeBound);\n\n\t\tthis._detachImageEventHandlers();\n\t}\n\n\thandleResize() {\n\t\tif (this.initials && !this.icon) {\n\t\t\tthis._checkInitials();\n\t\t}\n\t}\n\n\t_checkInitials() {\n\t\tconst avatar = this.getDomRef()!;\n\t\tconst avatarInitials = avatar.querySelector(\".ui5-avatar-initials\");\n\t\tconst validInitials = this.validInitials && avatarInitials && avatarInitials.scrollWidth <= avatar.scrollWidth;\n\n\t\tif (validInitials) {\n\t\t\tthis.showInitials();\n\t\t\treturn;\n\t\t}\n\t\tthis.showFallbackIcon();\n\t}\n\n\tshowFallbackIcon() {\n\t\tthis.initialsContainer?.classList.add(\"ui5-avatar-initials-hidden\");\n\t\tthis.fallBackIconDomRef?.classList.remove(\"ui5-avatar-fallback-icon-hidden\");\n\t}\n\n\tshowInitials() {\n\t\tthis.initialsContainer?.classList.remove(\"ui5-avatar-initials-hidden\");\n\t\tthis.fallBackIconDomRef?.classList.add(\"ui5-avatar-fallback-icon-hidden\");\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\te.stopPropagation();\n\t\tthis._fireClick();\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (!this._interactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._fireClick();\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault(); // prevent scrolling\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this._interactive && !e.shiftKey && isSpace(e)) {\n\t\t\tthis._fireClick();\n\t\t}\n\t}\n\n\t_fireClick() {\n\t\tthis.fireDecoratorEvent(\"click\");\n\t}\n\n\t_getAriaHasPopup() {\n\t\tconst ariaHaspopup = this.accessibilityAttributes.hasPopup;\n\n\t\tif (!this._interactive || !ariaHaspopup) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn ariaHaspopup;\n\t}\n\n\t_attachImageEventHandlers() {\n\t\tconst imgEl = this.imageEl;\n\t\tif (!imgEl) {\n\t\t\tthis._imageLoadError = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove previous handlers to avoid duplicates\n\t\timgEl.removeEventListener(\"load\", this._onImageLoadBound);\n\t\timgEl.removeEventListener(\"error\", this._onImageErrorBound);\n\n\t\t// Attach new handlers\n\t\timgEl.addEventListener(\"load\", this._onImageLoadBound);\n\t\timgEl.addEventListener(\"error\", this._onImageErrorBound);\n\n\t\t// Check existing image state\n\t\tthis._checkExistingImageState();\n\t}\n\n\t_checkExistingImageState() {\n\t\tconst imgEl = this.imageEl;\n\t\tif (!imgEl) {\n\t\t\tthis._imageLoadError = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif (imgEl.complete && imgEl.naturalWidth === 0) {\n\t\t\tthis._imageLoadError = true; // Already broken\n\t\t} else if (imgEl.complete && imgEl.naturalWidth > 0) {\n\t\t\tthis._imageLoadError = false; // Already loaded\n\t\t} else {\n\t\t\tthis._imageLoadError = false; // Pending load\n\t\t}\n\t}\n\n\t_detachImageEventHandlers() {\n\t\tconst imgEl = this.imageEl;\n\t\tif (!imgEl) {\n\t\t\treturn;\n\t\t}\n\n\t\timgEl.removeEventListener(\"load\", this._onImageLoadBound);\n\t\timgEl.removeEventListener(\"error\", this._onImageErrorBound);\n\t}\n\n\t_onImageLoad(e: Event) {\n\t\tif (e.target !== this.imageEl) {\n\t\t\t(e.target as HTMLImageElement)?.removeEventListener(\"load\", this._onImageLoadBound);\n\t\t\treturn;\n\t\t}\n\t\tthis._imageLoadError = false;\n\t}\n\n\t_onImageError(e: Event) {\n\t\tif (e.target !== this.imageEl) {\n\t\t\t(e.target as HTMLImageElement)?.removeEventListener(\"error\", this._onImageErrorBound);\n\t\t\treturn;\n\t\t}\n\t\tthis._imageLoadError = true;\n\t}\n\n\tget accessibilityInfo() {\n\t\treturn {\n\t\t\trole: this._role as AriaRole,\n\t\t\ttype: this.interactive ? Avatar.i18nBundle.getText(AVATAR_TYPE_BUTTON) : Avatar.i18nBundle.getText(AVATAR_TYPE_IMAGE),\n\t\t\tdescription: this.accessibleNameText,\n\t\t\tdisabled: this.disabled,\n\t\t};\n\t}\n}\n\nAvatar.define();\n\nexport default Avatar;\nexport type {\n\tAvatarAccessibilityAttributes,\n};\n"]}
1
+ {"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../src/Avatar.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAI/E,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEnE,WAAW;AACX,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EACN,cAAc,EACd,kBAAkB,EAClB,iBAAiB,GACjB,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,SAAS,MAAM,kCAAkC,CAAC;AAGzD,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAI/C,OAAO;AACP,OAAO,2CAA2C,CAAC;AAInD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAmBH,IAAM,MAAM,cAAZ,MAAM,MAAO,SAAQ,UAAU;IAmL9B;QACC,KAAK,EAAE,CAAC;QAhLT;;;;;;WAMG;QAEH,aAAQ,GAAG,KAAK,CAAC;QAEjB;;;;;;;WAOG;QAEH,gBAAW,GAAG,KAAK,CAAC;QAsBpB;;;;;;;;;;;;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AE,OAAO,EAAE,CAAC;wCACX;AAWjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2CACR;AAoBpB;IADC,QAAQ,EAAE;oCACG;AAsBd;IADC,QAAQ,EAAE;4CACe;AAU1B;IADC,QAAQ,EAAE;wCACO;AAQlB;IADC,QAAQ,EAAE;qCACwB;AAQnC;IADC,QAAQ,EAAE;oCACiB;AAU5B;IADC,QAAQ,EAAE;2CACkC;AAM7C;IADC,QAAQ,EAAE;4CACmC;AAU9C;IADC,QAAQ,EAAE;8CACa;AAcxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDACiC;AAG5D;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;8CACR;AAMxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACV;AAMlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;+CACvB;AAaxB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;qCACZ;AAWjC;IADC,IAAI,EAAE;qCACmB;AAGnB;IADN,IAAI,CAAC,oBAAoB,CAAC;gCACG;AA7KzB,MAAM;IAlBX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,cAAc;KACxB,CAAC;IACF;;;;;;;OAOG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;GACI,MAAM,CA4aX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type { AccessibilityAttributes, AriaRole } from \"@ui5/webcomponents-base/dist/types.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport { isEnter, isSpace } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { IAvatarGroupItem } from \"./AvatarGroup.js\";\n// Template\nimport AvatarTemplate from \"./AvatarTemplate.js\";\n\nimport {\n\tAVATAR_TOOLTIP,\n\tAVATAR_TYPE_BUTTON,\n\tAVATAR_TYPE_IMAGE,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport AvatarCss from \"./generated/themes/Avatar.css.js\";\n\nimport type Icon from \"./Icon.js\";\nimport AvatarSize from \"./types/AvatarSize.js\";\nimport type AvatarShape from \"./types/AvatarShape.js\";\nimport type AvatarColorScheme from \"./types/AvatarColorScheme.js\";\n\n// Icon\nimport \"@ui5/webcomponents-icons/dist/employee.js\";\n\ntype AvatarAccessibilityAttributes = Pick<AccessibilityAttributes, \"hasPopup\">;\n\n/**\n * @class\n * ### Overview\n *\n * An image-like component that has different display options for representing images and icons\n * in different shapes and sizes, depending on the use case.\n *\n * The shape can be circular or square. There are several predefined sizes, as well as an option to\n * set a custom size.\n *\n * ### Keyboard Handling\n *\n * - [Space] / [Enter] or [Return] - Fires the `click` event if the `interactive` property is set to true.\n * - [Shift] - If [Space] is pressed, pressing [Shift] releases the component without triggering the click event.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents/dist/Avatar.js\";`\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.6\n * @implements {IAvatarGroupItem}\n * @public\n */\n@customElement({\n\ttag: \"ui5-avatar\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\tstyles: AvatarCss,\n\ttemplate: AvatarTemplate,\n})\n/**\n * Fired on mouseup, space and enter if avatar is interactive\n *\n * **Note:** The event will not be fired if the `disabled`\n * property is set to `true`.\n * @public\n * @since 2.11.0\n */\n@event(\"click\", {\n\tbubbles: true,\n})\nclass Avatar extends UI5Element implements ITabbable, IAvatarGroupItem {\n\teventDetails!: {\n\t\tclick: void,\n\t}\n\t/**\n\t * Defines whether the component is disabled.\n\t * A disabled component can't be pressed or\n\t * focused, and it is not in the tab chain.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines if the avatar is interactive (focusable and pressable).\n\t *\n\t * **Note:** This property won't have effect if the `disabled`\n\t * property is set to `true`.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tinteractive = false;\n\n\t/**\n\t * Defines the name of the UI5 Icon, that will be displayed.\n\t *\n\t * **Note:** If `image` slot is provided, the property will be ignored.\n\t *\n\t * **Note:** You should import the desired icon first, then use its name as \"icon\".\n\t *\n\t * `import \"@ui5/webcomponents-icons/dist/{icon_name}.js\"`\n\t *\n\t * `<ui5-avatar icon=\"employee\">`\n\t *\n\t * **Note:** If no icon or an empty one is provided, by default the \"employee\" icon should be displayed.\n\t *\n\t * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ticon?: string;\n\n\t/**\n\t * Defines the name of the fallback icon, which should be displayed in the following cases:\n\t *\n\t * \t- If the initials are not valid (more than 3 letters, unsupported languages or empty initials).\n\t * \t- If there are three initials and they do not fit in the shape (e.g. WWW for some of the sizes).\n\t * \t- If the image src is wrong.\n\t *\n\t * **Note:** If not set, a default fallback icon \"employee\" is displayed.\n\t *\n\t * **Note:** You should import the desired icon first, then use its name as \"fallback-icon\".\n\t *\n\t * `import \"@ui5/webcomponents-icons/dist/{icon_name}.js\"`\n\t *\n\t * `<ui5-avatar fallback-icon=\"alert\">`\n\t *\n\t * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default \"employee\"\n\t * @public\n\t */\n\t@property()\n\tfallbackIcon = \"employee\";\n\n\t/**\n\t * Defines the displayed initials.\n\t *\n\t * Up to three Latin letters can be displayed as initials.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tinitials?: string;\n\n\t/**\n\t * Defines the shape of the component.\n\t * @default \"Circle\"\n\t * @public\n\t */\n\t@property()\n\tshape: `${AvatarShape}` = \"Circle\";\n\n\t/**\n\t * Defines predefined size of the component.\n\t * @default \"S\"\n\t * @public\n\t */\n\t@property()\n\tsize: `${AvatarSize}` = \"S\";\n\n\t/**\n\t * Defines the background color of the desired image.\n\t * If `colorScheme` is set to `Auto`, the avatar will be displayed with the `Accent6` color.\n\t *\n\t * @default \"Auto\"\n\t * @public\n\t */\n\t@property()\n\tcolorScheme: `${AvatarColorScheme}` = \"Auto\";\n\n\t/**\n\t * @private\n\t */\n\t@property()\n\t_colorScheme: `${AvatarColorScheme}` = \"Auto\";\n\n\t/**\n\t * Defines the text alternative of the component.\n\t * If not provided a default text alternative will be set, if present.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.7\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the additional accessibility attributes that will be applied to the component.\n\t * The following field is supported:\n\t *\n\t * - **hasPopup**: Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by the button.\n\t * Accepts the following string values: `dialog`, `grid`, `listbox`, `menu` or `tree`.\n\t *\n\t * @public\n\t * @since 2.0.0\n\t * @default {}\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes: AvatarAccessibilityAttributes = {};\n\n\t@property({ noAttribute: true })\n\tforcedTabIndex?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_hasImage = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_imageLoadError = false;\n\n\t/**\n\t * Receives the desired `<img>` tag\n\t *\n\t * **Note:** If you experience flickering of the provided image, you can hide the component until it is defined with the following CSS:<br/>\n\t * `ui5-avatar:not(:defined) {`<br/>\n\t * &nbsp;&nbsp;&nbsp;&nbsp;`visibility: hidden;`<br/>\n\t * `}`\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\timage!: DefaultSlot<HTMLElement>;\n\n\t/**\n\t * Defines the optional badge that will be used for visual affordance.\n\t *\n\t * **Note:** While the slot allows for custom badges, to achieve\n\t * the Fiori design, use the `ui5-avatar-badge` component.\n\t * @public\n\t * @since 1.7.0\n\t */\n\t@slot()\n\tbadge!: Slot<HTMLElement>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_handleResizeBound: ResizeObserverCallback;\n\t_onImageLoadBound: (e: Event) => void;\n\t_onImageErrorBound: (e: Event) => void;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._handleResizeBound = this.handleResize.bind(this);\n\t\tthis._onImageLoadBound = this._onImageLoad.bind(this);\n\t\tthis._onImageErrorBound = this._onImageError.bind(this);\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._attachImageEventHandlers();\n\t\tthis._hasImage = this.hasImage;\n\t}\n\n\tget tabindex() {\n\t\tif (this.forcedTabIndex) {\n\t\t\treturn parseInt(this.forcedTabIndex);\n\t\t}\n\t\treturn this._interactive ? 0 : undefined;\n\t}\n\n\t/**\n\t * Returns the effective avatar size.\n\t * @default \"S\"\n\t * @private\n\t */\n\tget effectiveSize(): AvatarSize {\n\t\t// we read the attribute, because the \"size\" property will always have a default value\n\t\treturn this.getAttribute(\"size\") as AvatarSize || AvatarSize.S;\n\t}\n\n\t/**\n\t * Returns the effective background color.\n\t * @default \"Auto\"\n\t * @private\n\t */\n\tget effectiveBackgroundColor(): AvatarColorScheme {\n\t\t// we read the attribute, because the \"background-color\" property will always have a default value\n\t\treturn this.getAttribute(\"color-scheme\") as AvatarColorScheme || this._colorScheme;\n\t}\n\n\tget _role() {\n\t\treturn this._interactive ? \"button\" : \"img\";\n\t}\n\n\tget _ariaHasPopup() {\n\t\treturn this._getAriaHasPopup();\n\t}\n\n\tget _interactive() {\n\t\treturn this.interactive && !this.disabled;\n\t}\n\n\tget validInitials() {\n\t\t// initials should consist of only 1,2 or 3 latin letters\n\t\tconst validInitials = /^[a-zA-Zà-üÀ-Ü]{1,3}$/,\n\t\t\tareInitialsValid = this.initials && validInitials.test(this.initials);\n\n\t\tif (areInitialsValid) {\n\t\t\treturn this.initials;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tget accessibleNameText() {\n\t\tif (this.accessibleName) {\n\t\t\treturn this.accessibleName;\n\t\t}\n\n\t\tconst defaultLabel = Avatar.i18nBundle.getText(AVATAR_TOOLTIP);\n\n\t\treturn this.initials ? `${defaultLabel} ${this.initials}`.trim() : defaultLabel;\n\t}\n\n\tget hasImage() {\n\t\treturn !!this.image.length && !this._imageLoadError;\n\t}\n\n\tget imageEl(): HTMLImageElement | null {\n\t\treturn this.image?.[0] instanceof HTMLImageElement ? this.image[0] : null;\n\t}\n\n\tget initialsContainer(): HTMLObjectElement | null {\n\t\treturn this.getDomRef()!.querySelector(\".ui5-avatar-initials\");\n\t}\n\n\tget fallBackIconDomRef(): Icon | null {\n\t\treturn this.getDomRef()!.querySelector(\".ui5-avatar-icon-fallback\");\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished();\n\t\tif (this.initials && !this.icon) {\n\t\t\tthis._checkInitials();\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\n\t\tthis.initialsContainer && ResizeHandler.register(this.initialsContainer,\n\t\t\tthis._handleResizeBound);\n\t}\n\n\tonExitDOM() {\n\t\tthis.initialsContainer && ResizeHandler.deregister(this.initialsContainer,\n\t\t\tthis._handleResizeBound);\n\n\t\tthis._detachImageEventHandlers();\n\t}\n\n\thandleResize() {\n\t\tif (this.initials && !this.icon) {\n\t\t\tthis._checkInitials();\n\t\t}\n\t}\n\n\t_checkInitials() {\n\t\tconst avatar = this.getDomRef()!;\n\t\tconst avatarInitials = avatar.querySelector(\".ui5-avatar-initials\");\n\t\tconst validInitials = this.validInitials && avatarInitials && avatarInitials.scrollWidth <= avatar.scrollWidth;\n\n\t\tif (validInitials) {\n\t\t\tthis.showInitials();\n\t\t\treturn;\n\t\t}\n\t\tthis.showFallbackIcon();\n\t}\n\n\tshowFallbackIcon() {\n\t\tthis.initialsContainer?.classList.add(\"ui5-avatar-initials-hidden\");\n\t\tthis.fallBackIconDomRef?.classList.remove(\"ui5-avatar-fallback-icon-hidden\");\n\t}\n\n\tshowInitials() {\n\t\tthis.initialsContainer?.classList.remove(\"ui5-avatar-initials-hidden\");\n\t\tthis.fallBackIconDomRef?.classList.add(\"ui5-avatar-fallback-icon-hidden\");\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\te.stopPropagation();\n\t\tthis._fireClick();\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (!this._interactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._fireClick();\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault(); // prevent scrolling\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this._interactive && !e.shiftKey && isSpace(e)) {\n\t\t\tthis._fireClick();\n\t\t}\n\t}\n\n\t_fireClick() {\n\t\tthis.fireDecoratorEvent(\"click\");\n\t}\n\n\t_getAriaHasPopup() {\n\t\tconst ariaHaspopup = this.accessibilityAttributes.hasPopup;\n\n\t\tif (!this._interactive || !ariaHaspopup) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn ariaHaspopup;\n\t}\n\n\t_attachImageEventHandlers() {\n\t\tconst imgEl = this.imageEl;\n\t\tif (!imgEl) {\n\t\t\tthis._imageLoadError = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove previous handlers to avoid duplicates\n\t\timgEl.removeEventListener(\"load\", this._onImageLoadBound);\n\t\timgEl.removeEventListener(\"error\", this._onImageErrorBound);\n\n\t\t// Attach new handlers\n\t\timgEl.addEventListener(\"load\", this._onImageLoadBound);\n\t\timgEl.addEventListener(\"error\", this._onImageErrorBound);\n\n\t\t// Check existing image state\n\t\tthis._checkExistingImageState();\n\t}\n\n\t_checkExistingImageState() {\n\t\tconst imgEl = this.imageEl;\n\t\tif (!imgEl) {\n\t\t\tthis._imageLoadError = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif (imgEl.complete && imgEl.naturalWidth === 0) {\n\t\t\tthis._imageLoadError = true; // Already broken\n\t\t} else if (imgEl.complete && imgEl.naturalWidth > 0) {\n\t\t\tthis._imageLoadError = false; // Already loaded\n\t\t} else {\n\t\t\tthis._imageLoadError = false; // Pending load\n\t\t}\n\t}\n\n\t_detachImageEventHandlers() {\n\t\tconst imgEl = this.imageEl;\n\t\tif (!imgEl) {\n\t\t\treturn;\n\t\t}\n\n\t\timgEl.removeEventListener(\"load\", this._onImageLoadBound);\n\t\timgEl.removeEventListener(\"error\", this._onImageErrorBound);\n\t}\n\n\t_onImageLoad(e: Event) {\n\t\tif (e.target !== this.imageEl) {\n\t\t\t(e.target as HTMLImageElement)?.removeEventListener(\"load\", this._onImageLoadBound);\n\t\t\treturn;\n\t\t}\n\t\tthis._imageLoadError = false;\n\t}\n\n\t_onImageError(e: Event) {\n\t\tif (e.target !== this.imageEl) {\n\t\t\t(e.target as HTMLImageElement)?.removeEventListener(\"error\", this._onImageErrorBound);\n\t\t\treturn;\n\t\t}\n\t\tthis._imageLoadError = true;\n\t}\n\n\tget accessibilityInfo() {\n\t\treturn {\n\t\t\trole: this._role as AriaRole,\n\t\t\ttype: this.interactive ? Avatar.i18nBundle.getText(AVATAR_TYPE_BUTTON) : Avatar.i18nBundle.getText(AVATAR_TYPE_IMAGE),\n\t\t\tdescription: this.accessibleNameText,\n\t\t\tdisabled: this.disabled,\n\t\t};\n\t}\n}\n\nAvatar.define();\n\nexport default Avatar;\nexport type {\n\tAvatarAccessibilityAttributes,\n};\n"]}
@@ -5,7 +5,7 @@ import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js";
5
5
  * ### Overview
6
6
  *
7
7
  * The `ui5-avatar-badge` component is used to display a badge on top of `ui5-avatar` component.
8
- * The badge can display an icon and supports different value states for visual affordance.
8
+ * The badge can display an icon and supports different states for visual affordance.
9
9
  *
10
10
  * ### Usage
11
11
  *
@@ -42,7 +42,7 @@ declare class AvatarBadge extends UI5Element {
42
42
  */
43
43
  icon?: string;
44
44
  /**
45
- * Defines the value state of the badge, which determines its styling.
45
+ * Defines the state of the badge, which determines its styling.
46
46
  *
47
47
  * Available options:
48
48
  * - `None` (default) - Standard appearance
@@ -54,7 +54,7 @@ declare class AvatarBadge extends UI5Element {
54
54
  * @default "None"
55
55
  * @public
56
56
  */
57
- valueState: `${ValueState}`;
57
+ state: `${ValueState}`;
58
58
  /**
59
59
  * @private
60
60
  */
@@ -19,7 +19,7 @@ import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js";
19
19
  * ### Overview
20
20
  *
21
21
  * The `ui5-avatar-badge` component is used to display a badge on top of `ui5-avatar` component.
22
- * The badge can display an icon and supports different value states for visual affordance.
22
+ * The badge can display an icon and supports different states for visual affordance.
23
23
  *
24
24
  * ### Usage
25
25
  *
@@ -47,7 +47,7 @@ let AvatarBadge = class AvatarBadge extends UI5Element {
47
47
  constructor() {
48
48
  super(...arguments);
49
49
  /**
50
- * Defines the value state of the badge, which determines its styling.
50
+ * Defines the state of the badge, which determines its styling.
51
51
  *
52
52
  * Available options:
53
53
  * - `None` (default) - Standard appearance
@@ -59,7 +59,7 @@ let AvatarBadge = class AvatarBadge extends UI5Element {
59
59
  * @default "None"
60
60
  * @public
61
61
  */
62
- this.valueState = ValueState.None;
62
+ this.state = ValueState.None;
63
63
  /**
64
64
  * @private
65
65
  */
@@ -74,7 +74,7 @@ __decorate([
74
74
  ], AvatarBadge.prototype, "icon", void 0);
75
75
  __decorate([
76
76
  property()
77
- ], AvatarBadge.prototype, "valueState", void 0);
77
+ ], AvatarBadge.prototype, "state", void 0);
78
78
  __decorate([
79
79
  property({ type: Boolean })
80
80
  ], AvatarBadge.prototype, "invalid", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarBadge.js","sourceRoot":"","sources":["../src/AvatarBadge.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AAEzF,WAAW;AACX,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAE3D,SAAS;AACT,OAAO,cAAc,MAAM,uCAAuC,CAAC;AAEnE,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAOH,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QAcC;;;;;;;;;;;;WAYG;QAEH,eAAU,GAAoB,UAAU,CAAC,IAAI,CAAC;QAE9C;;WAEG;QAEH,YAAO,GAAG,KAAK,CAAC;IAKjB,CAAC;IAHA,iBAAiB;QAChB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;CACD,CAAA;AA3BA;IADC,QAAQ,EAAE;yCACG;AAgBd;IADC,QAAQ,EAAE;+CACmC;AAM9C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACZ;AAlCX,WAAW;IANhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;KAC7B,CAAC;GACI,WAAW,CAuChB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport { getIconDataSync } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\n// Template\nimport AvatarBadgeTemplate from \"./AvatarBadgeTemplate.js\";\n\n// Styles\nimport AvatarBadgeCss from \"./generated/themes/AvatarBadge.css.js\";\n\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-avatar-badge` component is used to display a badge on top of `ui5-avatar` component.\n * The badge can display an icon and supports different value states for visual affordance.\n *\n * ### Usage\n *\n * The badge should be used as a child element of `ui5-avatar` in the `badge` slot.\n *\n * ```html\n * <ui5-avatar>\n * <ui5-avatar-badge icon=\"edit\" slot=\"badge\"></ui5-avatar-badge>\n * </ui5-avatar>\n * ```\n *\n * ### Keyboard Handling\n *\n * The badge does not receive keyboard focus.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents/dist/AvatarBadge.js\";`\n *\n * @constructor\n * @extends UI5Element\n * @since 2.19.0\n * @public\n */\n@customElement({\n\ttag: \"ui5-avatar-badge\",\n\trenderer: jsxRenderer,\n\tstyles: AvatarBadgeCss,\n\ttemplate: AvatarBadgeTemplate,\n})\nclass AvatarBadge extends UI5Element {\n\t/**\n\t * Defines the icon name to be displayed inside the badge.\n\t *\n\t * **Note:** You should import the desired icon first, then use its name as \"icon\".\n\t *\n\t * `import \"@ui5/webcomponents-icons/dist/{icon_name}.js\"`\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ticon?: string;\n\n\t/**\n\t * Defines the value state of the badge, which determines its styling.\n\t *\n\t * Available options:\n\t * - `None` (default) - Standard appearance\n\t * - `Positive` - Green, used for success/approved states\n\t * - `Critical` - Orange, used for warning states\n\t * - `Negative` - Red, used for error/rejected states\n\t * - `Information` - Blue, used for informational states\n\t *\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property()\n\tvalueState: `${ValueState}` = ValueState.None;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tinvalid = false;\n\n\tonBeforeRendering() {\n\t\tthis.invalid = !this.icon || !getIconDataSync(this.icon);\n\t}\n}\n\nAvatarBadge.define();\n\nexport default AvatarBadge;\n"]}
1
+ {"version":3,"file":"AvatarBadge.js","sourceRoot":"","sources":["../src/AvatarBadge.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AAEzF,WAAW;AACX,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAE3D,SAAS;AACT,OAAO,cAAc,MAAM,uCAAuC,CAAC;AAEnE,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAOH,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QAcC;;;;;;;;;;;;WAYG;QAEH,UAAK,GAAoB,UAAU,CAAC,IAAI,CAAC;QAEzC;;WAEG;QAEH,YAAO,GAAG,KAAK,CAAC;IAKjB,CAAC;IAHA,iBAAiB;QAChB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;CACD,CAAA;AA3BA;IADC,QAAQ,EAAE;yCACG;AAgBd;IADC,QAAQ,EAAE;0CAC8B;AAMzC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACZ;AAlCX,WAAW;IANhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;KAC7B,CAAC;GACI,WAAW,CAuChB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport { getIconDataSync } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\n// Template\nimport AvatarBadgeTemplate from \"./AvatarBadgeTemplate.js\";\n\n// Styles\nimport AvatarBadgeCss from \"./generated/themes/AvatarBadge.css.js\";\n\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-avatar-badge` component is used to display a badge on top of `ui5-avatar` component.\n * The badge can display an icon and supports different states for visual affordance.\n *\n * ### Usage\n *\n * The badge should be used as a child element of `ui5-avatar` in the `badge` slot.\n *\n * ```html\n * <ui5-avatar>\n * <ui5-avatar-badge icon=\"edit\" slot=\"badge\"></ui5-avatar-badge>\n * </ui5-avatar>\n * ```\n *\n * ### Keyboard Handling\n *\n * The badge does not receive keyboard focus.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents/dist/AvatarBadge.js\";`\n *\n * @constructor\n * @extends UI5Element\n * @since 2.19.0\n * @public\n */\n@customElement({\n\ttag: \"ui5-avatar-badge\",\n\trenderer: jsxRenderer,\n\tstyles: AvatarBadgeCss,\n\ttemplate: AvatarBadgeTemplate,\n})\nclass AvatarBadge extends UI5Element {\n\t/**\n\t * Defines the icon name to be displayed inside the badge.\n\t *\n\t * **Note:** You should import the desired icon first, then use its name as \"icon\".\n\t *\n\t * `import \"@ui5/webcomponents-icons/dist/{icon_name}.js\"`\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ticon?: string;\n\n\t/**\n\t * Defines the state of the badge, which determines its styling.\n\t *\n\t * Available options:\n\t * - `None` (default) - Standard appearance\n\t * - `Positive` - Green, used for success/approved states\n\t * - `Critical` - Orange, used for warning states\n\t * - `Negative` - Red, used for error/rejected states\n\t * - `Information` - Blue, used for informational states\n\t *\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property()\n\tstate: `${ValueState}` = ValueState.None;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tinvalid = false;\n\n\tonBeforeRendering() {\n\t\tthis.invalid = !this.icon || !getIconDataSync(this.icon);\n\t}\n}\n\nAvatarBadge.define();\n\nexport default AvatarBadge;\n"]}
@@ -1,4 +1,5 @@
1
1
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
+ import type { DefaultSlot, Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
2
3
  import ItemNavigation from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
3
4
  import type { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
4
5
  import type { UI5CustomEvent } from "@ui5/webcomponents-base";
@@ -90,6 +91,10 @@ declare class AvatarGroup extends UI5Element {
90
91
  "click": AvatarGroupClickEventDetail;
91
92
  "overflow": void;
92
93
  };
94
+ slotDetails: {
95
+ overflowButton: IButton;
96
+ items: IAvatarGroupItem;
97
+ };
93
98
  /**
94
99
  * Defines the mode of the `AvatarGroup`.
95
100
  * @default "Group"
@@ -137,7 +142,7 @@ declare class AvatarGroup extends UI5Element {
137
142
  * as the built-in overflow action has "Circle" shape.
138
143
  * @public
139
144
  */
140
- items: Array<IAvatarGroupItem>;
145
+ items: DefaultSlot<IAvatarGroupItem>;
141
146
  /**
142
147
  * Defines the overflow button of the component.
143
148
  *
@@ -147,7 +152,7 @@ declare class AvatarGroup extends UI5Element {
147
152
  * @public
148
153
  * @since 1.0.0-rc.13
149
154
  */
150
- overflowButton: Array<IButton>;
155
+ overflowButton: Slot<IButton>;
151
156
  static i18nBundle: I18nBundle;
152
157
  _onResizeHandler: () => void;
153
158
  _colorIndex: number;
@@ -11,7 +11,7 @@ import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.j
11
11
  import ItemNavigation from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
12
12
  import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
13
13
  import property from "@ui5/webcomponents-base/dist/decorators/property.js";
14
- import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
14
+ import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
15
15
  import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
16
16
  import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
17
17
  import { isEnter, isSpace, } from "@ui5/webcomponents-base/dist/Keys.js";
@@ -43,7 +43,7 @@ const offsets = {
43
43
  },
44
44
  [AvatarSize.L]: {
45
45
  [AvatarGroupType.Individual]: "0.125rem",
46
- [AvatarGroupType.Group]: " -2rem",
46
+ [AvatarGroupType.Group]: "-2rem",
47
47
  },
48
48
  [AvatarSize.XL]: {
49
49
  [AvatarGroupType.Individual]: "0.25rem",
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarGroup.js","sourceRoot":"","sources":["../src/AvatarGroup.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,wDAAwD,CAAC;AACnF,OAAO,cAAc,MAAM,yDAAyD,CAAC;AAIrF,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAGnE,OAAO,EACN,OAAO,EACP,OAAO,GACP,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEnE,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAC/C,OAAO,eAAe,MAAM,4BAA4B,CAAC;AACzD,OAAO,iBAAiB,MAAM,8BAA8B,CAAC;AAG7D,OAAO,EACN,mCAAmC,EACnC,qCAAqC,EACrC,kCAAkC,EAClC,6BAA6B,EAC7B,iBAAiB,GACjB,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,cAAc,MAAM,uCAAuC,CAAC;AAEnE,WAAW;AACX,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAa1G,MAAM,kBAAkB,GAAG,+BAA+B,CAAC;AAC3D,MAAM,kCAAkC,GAAG,IAAI,kBAAkB,EAAE,CAAC;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AW,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QAErE,IAAI,eAAe,EAAE,CAAC;YACrB,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC;IACF,CAAC;IAED,gBAAgB;QACf,OAAO,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC;IAC9C,CAAC;CACD,CAAA;AA9ZA;IADC,QAAQ,EAAE;yCACyB;AAcpC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4DACsC;AAMjE;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;wDACH;AAU7B;IADC,QAAQ,EAAE;mDACa;AAUxB;IADC,QAAQ,EAAE;sDACgB;AAY3B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;0CACb;AAYhC;IADC,IAAI,EAAE;mDACyB;AAGzB;IADN,IAAI,CAAC,oBAAoB,CAAC;qCACG;AA9EzB,WAAW;IAvBhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,cAAc;KACtB,CAAC;IACF;;;;;;;OAOG;;IACF,KAAK,CAAC,OAAO,CAAC;IAEf;;;;;OAKG;;IACF,KAAK,CAAC,UAAU,CAAC;GACZ,WAAW,CAyahB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type { UI5CustomEvent } from \"@ui5/webcomponents-base\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type { AccessibilityAttributes } from \"@ui5/webcomponents-base/dist/types.js\";\n\nimport {\n\tisEnter,\n\tisSpace,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type Button from \"./Button.js\";\nimport AvatarSize from \"./types/AvatarSize.js\";\nimport AvatarGroupType from \"./types/AvatarGroupType.js\";\nimport AvatarColorScheme from \"./types/AvatarColorScheme.js\";\nimport type { IButton } from \"./Button.js\";\n\nimport {\n\tAVATAR_GROUP_DISPLAYED_HIDDEN_LABEL,\n\tAVATAR_GROUP_SHOW_COMPLETE_LIST_LABEL,\n\tAVATAR_GROUP_ARIA_LABEL_INDIVIDUAL,\n\tAVATAR_GROUP_ARIA_LABEL_GROUP,\n\tAVATAR_GROUP_MOVE,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport AvatarGroupCss from \"./generated/themes/AvatarGroup.css.js\";\n\n// Template\nimport AvatarGroupTemplate from \"./AvatarGroupTemplate.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\n\n/**\n * Interface for components that represent an avatar and may be slotted in numerous higher-order components such as `ui5-avatar-group`\n * @public\n */\ninterface IAvatarGroupItem extends HTMLElement, ITabbable {\n\teffectiveBackgroundColor: AvatarColorScheme;\n\tsize: `${AvatarSize}`;\n\teffectiveSize: AvatarSize;\n\tinteractive: boolean;\n}\n\nconst OVERFLOW_BTN_CLASS = \"ui5-avatar-group-overflow-btn\";\nconst AVATAR_GROUP_OVERFLOW_BTN_SELECTOR = `.${OVERFLOW_BTN_CLASS}`;\n\n// based on RTL/LTR a margin-left/right is set respectfully\nconst offsets = {\n\t[AvatarSize.XS]: {\n\t\t[AvatarGroupType.Individual]: \"0.0625rem\",\n\t\t[AvatarGroupType.Group]: \"-0.5rem\",\n\t},\n\t[AvatarSize.S]: {\n\t\t[AvatarGroupType.Individual]: \"0.125rem\",\n\t\t[AvatarGroupType.Group]: \"-1.25rem\",\n\t},\n\t[AvatarSize.M]: {\n\t\t[AvatarGroupType.Individual]: \"0.125rem\",\n\t\t[AvatarGroupType.Group]: \"-1.625rem\",\n\t},\n\t[AvatarSize.L]: {\n\t\t[AvatarGroupType.Individual]: \"0.125rem\",\n\t\t[AvatarGroupType.Group]: \" -2rem\",\n\t},\n\t[AvatarSize.XL]: {\n\t\t[AvatarGroupType.Individual]: \"0.25rem\",\n\t\t[AvatarGroupType.Group]: \"-2.75rem\",\n\t},\n};\n\ntype AvatarGroupAccessibilityAttributes = Pick<AccessibilityAttributes, \"hasPopup\">;\n\ntype AvatarGroupClickEventDetail = {\n\ttargetRef: HTMLElement,\n\toverflowButtonClicked: boolean,\n};\n\n/**\n * @class\n *\n * ### Overview\n *\n * Displays a group of avatars arranged horizontally. It is useful to visually\n * showcase a group of related avatars, such as, project team members or employees.\n *\n * The component allows you to display the avatars in different sizes,\n * depending on your use case.\n *\n * The `AvatarGroup` component has two group types:\n *\n * - `Group` type: The avatars are displayed as partially overlapped on\n * top of each other and the entire group has one click/tap area.\n * - `Individual` type: The avatars are displayed side-by-side and each\n * avatar has its own click/tap area.\n *\n * ### Usage\n *\n * Use the `AvatarGroup` if:\n *\n * - You want to display a group of avatars.\n * - You want to display several avatars which have something in common.\n *\n * Do not use the `AvatarGroup` if:\n *\n * - You want to display a single avatar.\n * - You want to display a gallery for simple images.\n * - You want to use it for other visual content than avatars.\n *\n * ### Responsive Behavior\n *\n * When the available space is less than the width required to display all avatars,\n * an overflow visualization appears as a button placed at the end with the same shape\n * and size as the avatars. The visualization displays the number of avatars that have overflowed\n * and are not currently visible.\n *\n * ### Keyboard Handling\n * The component provides advanced keyboard handling.\n * When focused, the user can use the following keyboard\n * shortcuts in order to perform a navigation:\n *\n * `type` Individual:\n *\n * - [Tab] - Move focus to the overflow button\n * - [Left] - Navigate one avatar to the left\n * - [Right] - Navigate one avatar to the right\n * - [Home] - Navigate to the first avatar\n * - [End] - Navigate to the last avatar\n * - [Space] / [Enter] or [Return] - Trigger `ui5-click` event\n *\n * `type` Group:\n *\n * - [Tab] - Move focus to the next interactive element after the component\n * - [Space] / [Enter] or [Return] - Trigger `ui5-click` event\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.11\n * @public\n */\n\n@customElement({\n\ttag: \"ui5-avatar-group\",\n\trenderer: jsxRenderer,\n\ttemplate: AvatarGroupTemplate,\n\tstyles: AvatarGroupCss,\n})\n/**\n * Fired when the component is activated either with a\n * click/tap or by using the Enter or Space key.\n * @param {HTMLElement} targetRef The DOM ref of the clicked item.\n * @param {boolean} overflowButtonClicked indicates if the overflow button is clicked\n * @public\n * @since 1.0.0-rc.11\n */\n@event(\"click\")\n\n/**\n * Fired when the count of visible `ui5-avatar` elements in the\n * component has changed\n * @public\n * @since 1.0.0-rc.13\n */\n@event(\"overflow\")\nclass AvatarGroup extends UI5Element {\n\teventDetails!: {\n\t\t\"click\": AvatarGroupClickEventDetail\n\t\t\"overflow\": void\n\t}\n\t/**\n\t * Defines the mode of the `AvatarGroup`.\n\t * @default \"Group\"\n\t * @public\n\t */\n\t@property()\n\ttype: `${AvatarGroupType}` = \"Group\"\n\n\t/**\n\t * Defines the additional accessibility attributes that will be applied to the component.\n\t * The following field is supported:\n\t *\n\t * - **hasPopup**: Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by the button.\n\t * Accepts the following string values: `dialog`, `grid`, `listbox`, `menu` or `tree`.\n\t *\n\t * @public\n\t * @since 2.0.0\n\t * @default {}\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes: AvatarGroupAccessibilityAttributes = {};\n\n\t/**\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\t_overflowButtonText?: string;\n\n\t/**\n \t* Defines the accessible name of the AvatarGroup.\n \t* When provided, this will override the default aria-label text.\n \t* @default undefined\n \t* @public\n \t* @since 2.12.0\n \t*/\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n \t* Receives id(s) of the elements that describe the AvatarGroup.\n \t* When provided, this will be used as aria-labelledby instead of aria-label.\n \t* @default undefined\n \t* @public\n \t* @since 2.12.0\n \t*/\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the items of the component. Use the `ui5-avatar` component as an item.\n\t *\n\t * **Note:** The UX guidelines recommends using avatars with \"Circle\" shape.\n\t *\n\t * Moreover, if you use avatars with \"Square\" shape, there will be visual inconsistency\n\t * as the built-in overflow action has \"Circle\" shape.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\titems!: Array<IAvatarGroupItem>;\n\n\t/**\n\t * Defines the overflow button of the component.\n\t *\n\t * **Note:** We recommend using the `ui5-button` component.\n\t *\n\t * **Note:** If this slot is not used, the component will display the built-in overflow button.\n\t * @public\n\t * @since 1.0.0-rc.13\n\t */\n\t@slot()\n\toverflowButton!: Array<IButton>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\t_onResizeHandler: () => void;\n\t_colorIndex = 0;\n\t_hiddenItems = 0;\n\t_itemNavigation: ItemNavigation;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => {\n\t\t\t\treturn this._isGroup ? [] : this.items.slice(0, this._hiddenStartIndex);\n\t\t\t},\n\t\t});\n\t\tthis._onResizeHandler = this._onResize.bind(this);\n\t}\n\n\t/**\n\t * Returns an array containing the `ui5-avatar` instances that are currently not displayed due to lack of space.\n\t * @default []\n\t * @public\n\t */\n\tget hiddenItems(): IAvatarGroupItem[] {\n\t\treturn this.items.slice(this._hiddenStartIndex);\n\t}\n\n\t/**\n\t * Returns an array containing the `AvatarColorScheme` values that correspond to the avatars in the component.\n\t * @default []\n\t * @public\n\t */\n\tget colorScheme(): AvatarColorScheme[] {\n\t\treturn this.items.map(avatar => avatar.effectiveBackgroundColor);\n\t}\n\n\tget _customOverflowButton() {\n\t\treturn this.overflowButton.length ? this.overflowButton[0] : undefined;\n\t}\n\n\tget _ariaLabelText() {\n\t\tif (this.accessibleName || this.accessibleNameRef) {\n\t\t\treturn getEffectiveAriaLabelText(this);\n\t\t}\n\t\t// Fallback to existing default behavior\n\t\tconst hiddenItemsCount = this.hiddenItems.length;\n\t\tconst typeLabelKey = this._isGroup ? AVATAR_GROUP_ARIA_LABEL_GROUP : AVATAR_GROUP_ARIA_LABEL_INDIVIDUAL;\n\n\t\t// avatar type label\n\t\tlet text = AvatarGroup.i18nBundle.getText(typeLabelKey);\n\n\t\t// add displayed-hidden avatars label\n\t\ttext += ` ${AvatarGroup.i18nBundle.getText(AVATAR_GROUP_DISPLAYED_HIDDEN_LABEL, this._itemsCount - hiddenItemsCount, hiddenItemsCount)}`;\n\n\t\tif (this._isGroup) {\n\t\t\t// the container role is \"button\", add the message for complete list activation\n\t\t\ttext += ` ${AvatarGroup.i18nBundle.getText(AVATAR_GROUP_SHOW_COMPLETE_LIST_LABEL)}`;\n\t\t} else {\n\t\t\t// the container role is \"group\", add the \"how to navigate\" message\n\t\t\ttext += ` ${AvatarGroup.i18nBundle.getText(AVATAR_GROUP_MOVE)}`;\n\t\t}\n\n\t\treturn text;\n\t}\n\n\tget _overflowButtonAriaLabelText() {\n\t\treturn this._isGroup ? undefined : AvatarGroup.i18nBundle.getText(AVATAR_GROUP_SHOW_COMPLETE_LIST_LABEL);\n\t}\n\n\tget _containerAriaHasPopup() {\n\t\treturn this._isGroup ? this._getAriaHasPopup() : undefined;\n\t}\n\n\tget _overflowButtonAccAttributes() {\n\t\treturn {\n\t\t\thasPopup: this._isGroup ? undefined : this._getAriaHasPopup(),\n\t\t};\n\t}\n\n\tget _role() {\n\t\treturn this._isGroup ? \"button\" : \"group\";\n\t}\n\n\tget _hiddenStartIndex() {\n\t\treturn this._itemsCount - this._hiddenItems;\n\t}\n\n\tget _overflowBtnHidden() {\n\t\treturn this._hiddenItems === 0;\n\t}\n\n\tget _isGroup() {\n\t\treturn this.type === AvatarGroupType.Group;\n\t}\n\n\tget _itemsCount() {\n\t\treturn this.items.length;\n\t}\n\n\tget _groupTabIndex() {\n\t\treturn this._isGroup ? 0 : -1;\n\t}\n\n\tget _overflowButton() {\n\t\treturn this.shadowRoot!.querySelector<Button>(AVATAR_GROUP_OVERFLOW_BTN_SELECTOR);\n\t}\n\n\t/**\n\t * Return the effective overflow button width\n\t * Differences are that when in \"Group\" type the button is offset and overlaps the avatars\n\t *\n\t * 1) In case of \"Group\", (LTR/RTL aware) button width is qual to second item offset left/right\n\t * 2) In case of \"Individual\" group type width is directly taken from button element\n\t * @private\n\t */\n\tget _overflowButtonEffectiveWidth() {\n\t\tconst button = this._customOverflowButton ? this._customOverflowButton : this._overflowButton;\n\t\t// if in \"Group\" mode overflow button size is equal to the offset from second item\n\n\t\tif (!button) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (this._isGroup) {\n\t\t\tlet item: HTMLElement = this.items[1];\n\t\t\tconst ltrEffectiveWidth = item.offsetLeft - this.offsetLeft;\n\n\t\t\t// in some cases when second avatar is overflowed the offset of the button is the right one\n\t\t\tif (!item || item.hidden) {\n\t\t\t\titem = button;\n\t\t\t}\n\n\t\t\treturn this.effectiveDir === \"rtl\" ? this._getWidthToItem(item) : ltrEffectiveWidth;\n\t\t}\n\n\t\treturn button.offsetWidth;\n\t}\n\n\tget firstAvatarSize() {\n\t\treturn this.items[0]?.size ?? AvatarSize.S;\n\t}\n\n\tonAfterRendering() {\n\t\tthis._overflowItems();\n\t}\n\n\tonBeforeRendering() {\n\t\tif (this._customOverflowButton) {\n\t\t\tthis._customOverflowButton.nonInteractive = this._isGroup;\n\t\t}\n\n\t\tthis._prepareAvatars();\n\t}\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\n\t\tResizeHandler.register(this, this._onResizeHandler);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._onResizeHandler);\n\t}\n\n\t_onResize() {\n\t\tthis._overflowItems();\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (this._isGroup) {\n\t\t\tif (isEnter(e)) {\n\t\t\t\tthis._fireGroupEvent(e.target as HTMLElement);\n\t\t\t} else if (isSpace(e)) {\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (!e.shiftKey && isSpace(e) && this._isGroup) {\n\t\t\tthis._fireGroupEvent(e.target as HTMLElement);\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_fireGroupEvent(targetRef: HTMLElement) {\n\t\tconst isOverflowButtonClicked = targetRef.classList.contains(OVERFLOW_BTN_CLASS) || targetRef === this._customOverflowButton;\n\n\t\tthis.fireDecoratorEvent(\"click\", {\n\t\t\ttargetRef,\n\t\t\toverflowButtonClicked: isOverflowButtonClicked,\n\t\t});\n\t}\n\n\t_onClick(e: MouseEvent) {\n\t\te.stopPropagation();\n\t\tthis._isGroup && this._fireGroupEvent(e.target as HTMLElement);\n\t}\n\n\tonAvatarClick(e: MouseEvent) {\n\t\te.stopPropagation();\n\t\tthis.fireDecoratorEvent(\"click\", {\n\t\t\ttargetRef: e.target as HTMLElement,\n\t\t\toverflowButtonClicked: false,\n\t\t});\n\t}\n\n\tonAvatarUI5Click(e: MouseEvent) {\n\t\t// AvatrGroup fires click and ui5-click - Avatar's ui5-click should be stopped.\n\t\te.stopPropagation();\n\t}\n\n\tonOverflowButtonClick(e: UI5CustomEvent<Button, \"click\">) {\n\t\te.stopPropagation();\n\n\t\tthis.fireDecoratorEvent(\"click\", {\n\t\t\ttargetRef: e.target as HTMLElement,\n\t\t\toverflowButtonClicked: true,\n\t\t});\n\t}\n\n\t/**\n\t * Modifies avatars to the needs of avatar group properties. Respects already set size and background color.\n\t * Set the margins (offsets) based on RTL/LTR.\n\t * @private\n\t */\n\t_prepareAvatars() {\n\t\tthis._colorIndex = 0;\n\n\t\tthis.items.forEach((avatar, index) => {\n\t\t\tconst colorIndex = this._getNextBackgroundColor();\n\t\t\tavatar.interactive = !this._isGroup;\n\n\t\t\tif (avatar.getAttribute(\"_color-scheme\") === AvatarColorScheme.Auto) {\n\t\t\t\t// AvatarGroup respects colors set to ui5-avatar\n\t\t\t\tavatar.setAttribute(\"_color-scheme\", AvatarColorScheme[`Accent${colorIndex}` as keyof typeof AvatarColorScheme]);\n\t\t\t}\n\n\t\t\t// last avatar should not be offset as it breaks the container width and focus styles are no set correctly\n\t\t\tif (index !== this._itemsCount - 1 || this._customOverflowButton) {\n\t\t\t\t// based on RTL the browser automatically sets left or right margin to avatars\n\t\t\t\tavatar.style.marginInlineEnd = offsets[avatar.effectiveSize][this.type];\n\t\t\t} else {\n\t\t\t\tavatar.style.marginInlineEnd = \"\";\n\t\t\t}\n\t\t});\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tthis._itemNavigation.setCurrentItem(e.target as IAvatarGroupItem);\n\t}\n\n\tgetFocusDomRef() {\n\t\treturn this._itemNavigation._getCurrentItem();\n\t}\n\n\t/**\n\t * Returns the total width to item excluding the item width\n\t * RTL/LTR aware\n\t * @private\n\t * @param item\n\t */\n\t_getWidthToItem(item: HTMLElement) {\n\t\tconst isRTL = this.effectiveDir === \"rtl\";\n\t\tconst ltrWidthToItem = item.offsetLeft - this.offsetLeft;\n\n\t\tif (isRTL) {\n\t\t\tconst itemOffsetParent = item.offsetParent as HTMLElement;\n\n\t\t\t// in RTL the total width is equal to difference of the parent container width and\n\t\t\t// how much is the item offset to the left minus its offsetWidth\n\n\t\t\tif (!itemOffsetParent) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\treturn itemOffsetParent.offsetWidth - item.offsetLeft - item.offsetWidth;\n\t\t}\n\n\t\treturn ltrWidthToItem;\n\t}\n\n\t/**\n\t * Overflows items that were not able to fit the container\n\t * @private\n\t */\n\t_overflowItems() {\n\t\tif (this.items.length < 2) {\n\t\t\t// no need to overflow avatars\n\t\t\tthis._setHiddenItems(0);\n\t\t\treturn;\n\t\t}\n\n\t\tlet hiddenItems = 0;\n\n\t\tfor (let index = 0; index < this._itemsCount; index++) {\n\t\t\tconst item: IAvatarGroupItem = this.items[index];\n\n\t\t\t// show item to determine if it will fit the new container size\n\t\t\titem.hidden = false;\n\n\t\t\t// container width to current item + item width (avatar)\n\t\t\t// used to determine whether the following items will fit the container or not\n\t\t\tlet totalWidth = this._getWidthToItem(item) + item.offsetWidth;\n\n\t\t\tif (index !== this._itemsCount - 1 || this._customOverflowButton) {\n\t\t\t\ttotalWidth += this._overflowButtonEffectiveWidth;\n\t\t\t}\n\n\t\t\tif (totalWidth > this.offsetWidth) {\n\t\t\t\thiddenItems = this._itemsCount - index;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// hide the items that did not fit the container size\n\t\tthis._setHiddenItems(hiddenItems);\n\t}\n\n\t_getNextBackgroundColor() {\n\t\t// counter is to automatically assign background colors to avatars, `Accent10` is the highest color value\n\t\tif (++this._colorIndex > 10) {\n\t\t\tthis._colorIndex = 1;\n\t\t}\n\t\treturn this._colorIndex;\n\t}\n\n\t_setHiddenItems(hiddenItems: number) {\n\t\tconst shouldFireEvent = this._hiddenItems !== hiddenItems;\n\n\t\tthis._hiddenItems = hiddenItems;\n\n\t\tthis.items.forEach((item, index) => {\n\t\t\titem.hidden = index >= this._hiddenStartIndex;\n\t\t});\n\n\t\tthis._overflowButtonText = `+${hiddenItems > 99 ? 99 : hiddenItems}`;\n\n\t\tif (shouldFireEvent) {\n\t\t\tthis.fireDecoratorEvent(\"overflow\");\n\t\t}\n\t}\n\n\t_getAriaHasPopup() {\n\t\treturn this.accessibilityAttributes.hasPopup;\n\t}\n}\n\nAvatarGroup.define();\n\nexport default AvatarGroup;\nexport type {\n\tAvatarGroupClickEventDetail,\n\tAvatarGroupAccessibilityAttributes,\n\tIAvatarGroupItem,\n};\n"]}
1
+ {"version":3,"file":"AvatarGroup.js","sourceRoot":"","sources":["../src/AvatarGroup.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,wDAAwD,CAAC;AACnF,OAAO,cAAc,MAAM,yDAAyD,CAAC;AAIrF,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAGnE,OAAO,EACN,OAAO,EACP,OAAO,GACP,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEnE,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAC/C,OAAO,eAAe,MAAM,4BAA4B,CAAC;AACzD,OAAO,iBAAiB,MAAM,8BAA8B,CAAC;AAG7D,OAAO,EACN,mCAAmC,EACnC,qCAAqC,EACrC,kCAAkC,EAClC,6BAA6B,EAC7B,iBAAiB,GACjB,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,cAAc,MAAM,uCAAuC,CAAC;AAEnE,WAAW;AACX,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAa1G,MAAM,kBAAkB,GAAG,+BAA+B,CA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AC,CAAC,CAAC;QAEH,IAAI,CAAC,mBAAmB,GAAG,IAAI,WAAW,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QAErE,IAAI,eAAe,EAAE,CAAC;YACrB,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC;IACF,CAAC;IAED,gBAAgB;QACf,OAAO,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC;IAC9C,CAAC;CACD,CAAA;AA9ZA;IADC,QAAQ,EAAE;yCACyB;AAcpC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4DACsC;AAMjE;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;wDACH;AAU7B;IADC,QAAQ,EAAE;mDACa;AAUxB;IADC,QAAQ,EAAE;sDACgB;AAY3B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;0CACP;AAYtC;IADC,IAAI,EAAE;mDACwB;AAGxB;IADN,IAAI,CAAC,oBAAoB,CAAC;qCACG;AApFzB,WAAW;IAvBhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,cAAc;KACtB,CAAC;IACF;;;;;;;OAOG;;IACF,KAAK,CAAC,OAAO,CAAC;IAEf;;;;;OAKG;;IACF,KAAK,CAAC,UAAU,CAAC;GACZ,WAAW,CA+ahB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot, Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type { UI5CustomEvent } from \"@ui5/webcomponents-base\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type { AccessibilityAttributes } from \"@ui5/webcomponents-base/dist/types.js\";\n\nimport {\n\tisEnter,\n\tisSpace,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type Button from \"./Button.js\";\nimport AvatarSize from \"./types/AvatarSize.js\";\nimport AvatarGroupType from \"./types/AvatarGroupType.js\";\nimport AvatarColorScheme from \"./types/AvatarColorScheme.js\";\nimport type { IButton } from \"./Button.js\";\n\nimport {\n\tAVATAR_GROUP_DISPLAYED_HIDDEN_LABEL,\n\tAVATAR_GROUP_SHOW_COMPLETE_LIST_LABEL,\n\tAVATAR_GROUP_ARIA_LABEL_INDIVIDUAL,\n\tAVATAR_GROUP_ARIA_LABEL_GROUP,\n\tAVATAR_GROUP_MOVE,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport AvatarGroupCss from \"./generated/themes/AvatarGroup.css.js\";\n\n// Template\nimport AvatarGroupTemplate from \"./AvatarGroupTemplate.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\n\n/**\n * Interface for components that represent an avatar and may be slotted in numerous higher-order components such as `ui5-avatar-group`\n * @public\n */\ninterface IAvatarGroupItem extends HTMLElement, ITabbable {\n\teffectiveBackgroundColor: AvatarColorScheme;\n\tsize: `${AvatarSize}`;\n\teffectiveSize: AvatarSize;\n\tinteractive: boolean;\n}\n\nconst OVERFLOW_BTN_CLASS = \"ui5-avatar-group-overflow-btn\";\nconst AVATAR_GROUP_OVERFLOW_BTN_SELECTOR = `.${OVERFLOW_BTN_CLASS}`;\n\n// based on RTL/LTR a margin-left/right is set respectfully\nconst offsets = {\n\t[AvatarSize.XS]: {\n\t\t[AvatarGroupType.Individual]: \"0.0625rem\",\n\t\t[AvatarGroupType.Group]: \"-0.5rem\",\n\t},\n\t[AvatarSize.S]: {\n\t\t[AvatarGroupType.Individual]: \"0.125rem\",\n\t\t[AvatarGroupType.Group]: \"-1.25rem\",\n\t},\n\t[AvatarSize.M]: {\n\t\t[AvatarGroupType.Individual]: \"0.125rem\",\n\t\t[AvatarGroupType.Group]: \"-1.625rem\",\n\t},\n\t[AvatarSize.L]: {\n\t\t[AvatarGroupType.Individual]: \"0.125rem\",\n\t\t[AvatarGroupType.Group]: \"-2rem\",\n\t},\n\t[AvatarSize.XL]: {\n\t\t[AvatarGroupType.Individual]: \"0.25rem\",\n\t\t[AvatarGroupType.Group]: \"-2.75rem\",\n\t},\n};\n\ntype AvatarGroupAccessibilityAttributes = Pick<AccessibilityAttributes, \"hasPopup\">;\n\ntype AvatarGroupClickEventDetail = {\n\ttargetRef: HTMLElement,\n\toverflowButtonClicked: boolean,\n};\n\n/**\n * @class\n *\n * ### Overview\n *\n * Displays a group of avatars arranged horizontally. It is useful to visually\n * showcase a group of related avatars, such as, project team members or employees.\n *\n * The component allows you to display the avatars in different sizes,\n * depending on your use case.\n *\n * The `AvatarGroup` component has two group types:\n *\n * - `Group` type: The avatars are displayed as partially overlapped on\n * top of each other and the entire group has one click/tap area.\n * - `Individual` type: The avatars are displayed side-by-side and each\n * avatar has its own click/tap area.\n *\n * ### Usage\n *\n * Use the `AvatarGroup` if:\n *\n * - You want to display a group of avatars.\n * - You want to display several avatars which have something in common.\n *\n * Do not use the `AvatarGroup` if:\n *\n * - You want to display a single avatar.\n * - You want to display a gallery for simple images.\n * - You want to use it for other visual content than avatars.\n *\n * ### Responsive Behavior\n *\n * When the available space is less than the width required to display all avatars,\n * an overflow visualization appears as a button placed at the end with the same shape\n * and size as the avatars. The visualization displays the number of avatars that have overflowed\n * and are not currently visible.\n *\n * ### Keyboard Handling\n * The component provides advanced keyboard handling.\n * When focused, the user can use the following keyboard\n * shortcuts in order to perform a navigation:\n *\n * `type` Individual:\n *\n * - [Tab] - Move focus to the overflow button\n * - [Left] - Navigate one avatar to the left\n * - [Right] - Navigate one avatar to the right\n * - [Home] - Navigate to the first avatar\n * - [End] - Navigate to the last avatar\n * - [Space] / [Enter] or [Return] - Trigger `ui5-click` event\n *\n * `type` Group:\n *\n * - [Tab] - Move focus to the next interactive element after the component\n * - [Space] / [Enter] or [Return] - Trigger `ui5-click` event\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.11\n * @public\n */\n\n@customElement({\n\ttag: \"ui5-avatar-group\",\n\trenderer: jsxRenderer,\n\ttemplate: AvatarGroupTemplate,\n\tstyles: AvatarGroupCss,\n})\n/**\n * Fired when the component is activated either with a\n * click/tap or by using the Enter or Space key.\n * @param {HTMLElement} targetRef The DOM ref of the clicked item.\n * @param {boolean} overflowButtonClicked indicates if the overflow button is clicked\n * @public\n * @since 1.0.0-rc.11\n */\n@event(\"click\")\n\n/**\n * Fired when the count of visible `ui5-avatar` elements in the\n * component has changed\n * @public\n * @since 1.0.0-rc.13\n */\n@event(\"overflow\")\nclass AvatarGroup extends UI5Element {\n\teventDetails!: {\n\t\t\"click\": AvatarGroupClickEventDetail\n\t\t\"overflow\": void\n\t}\n\n\tslotDetails!: {\n\t\toverflowButton: IButton;\n\t\titems: IAvatarGroupItem;\n\t}\n\n\t/**\n\t * Defines the mode of the `AvatarGroup`.\n\t * @default \"Group\"\n\t * @public\n\t */\n\t@property()\n\ttype: `${AvatarGroupType}` = \"Group\"\n\n\t/**\n\t * Defines the additional accessibility attributes that will be applied to the component.\n\t * The following field is supported:\n\t *\n\t * - **hasPopup**: Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by the button.\n\t * Accepts the following string values: `dialog`, `grid`, `listbox`, `menu` or `tree`.\n\t *\n\t * @public\n\t * @since 2.0.0\n\t * @default {}\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes: AvatarGroupAccessibilityAttributes = {};\n\n\t/**\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\t_overflowButtonText?: string;\n\n\t/**\n \t* Defines the accessible name of the AvatarGroup.\n \t* When provided, this will override the default aria-label text.\n \t* @default undefined\n \t* @public\n \t* @since 2.12.0\n \t*/\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n \t* Receives id(s) of the elements that describe the AvatarGroup.\n \t* When provided, this will be used as aria-labelledby instead of aria-label.\n \t* @default undefined\n \t* @public\n \t* @since 2.12.0\n \t*/\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the items of the component. Use the `ui5-avatar` component as an item.\n\t *\n\t * **Note:** The UX guidelines recommends using avatars with \"Circle\" shape.\n\t *\n\t * Moreover, if you use avatars with \"Square\" shape, there will be visual inconsistency\n\t * as the built-in overflow action has \"Circle\" shape.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\titems!: DefaultSlot<IAvatarGroupItem>;\n\n\t/**\n\t * Defines the overflow button of the component.\n\t *\n\t * **Note:** We recommend using the `ui5-button` component.\n\t *\n\t * **Note:** If this slot is not used, the component will display the built-in overflow button.\n\t * @public\n\t * @since 1.0.0-rc.13\n\t */\n\t@slot()\n\toverflowButton!: Slot<IButton>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\t_onResizeHandler: () => void;\n\t_colorIndex = 0;\n\t_hiddenItems = 0;\n\t_itemNavigation: ItemNavigation;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => {\n\t\t\t\treturn this._isGroup ? [] : this.items.slice(0, this._hiddenStartIndex);\n\t\t\t},\n\t\t});\n\t\tthis._onResizeHandler = this._onResize.bind(this);\n\t}\n\n\t/**\n\t * Returns an array containing the `ui5-avatar` instances that are currently not displayed due to lack of space.\n\t * @default []\n\t * @public\n\t */\n\tget hiddenItems(): IAvatarGroupItem[] {\n\t\treturn this.items.slice(this._hiddenStartIndex);\n\t}\n\n\t/**\n\t * Returns an array containing the `AvatarColorScheme` values that correspond to the avatars in the component.\n\t * @default []\n\t * @public\n\t */\n\tget colorScheme(): AvatarColorScheme[] {\n\t\treturn this.items.map(avatar => avatar.effectiveBackgroundColor);\n\t}\n\n\tget _customOverflowButton() {\n\t\treturn this.overflowButton.length ? this.overflowButton[0] : undefined;\n\t}\n\n\tget _ariaLabelText() {\n\t\tif (this.accessibleName || this.accessibleNameRef) {\n\t\t\treturn getEffectiveAriaLabelText(this);\n\t\t}\n\t\t// Fallback to existing default behavior\n\t\tconst hiddenItemsCount = this.hiddenItems.length;\n\t\tconst typeLabelKey = this._isGroup ? AVATAR_GROUP_ARIA_LABEL_GROUP : AVATAR_GROUP_ARIA_LABEL_INDIVIDUAL;\n\n\t\t// avatar type label\n\t\tlet text = AvatarGroup.i18nBundle.getText(typeLabelKey);\n\n\t\t// add displayed-hidden avatars label\n\t\ttext += ` ${AvatarGroup.i18nBundle.getText(AVATAR_GROUP_DISPLAYED_HIDDEN_LABEL, this._itemsCount - hiddenItemsCount, hiddenItemsCount)}`;\n\n\t\tif (this._isGroup) {\n\t\t\t// the container role is \"button\", add the message for complete list activation\n\t\t\ttext += ` ${AvatarGroup.i18nBundle.getText(AVATAR_GROUP_SHOW_COMPLETE_LIST_LABEL)}`;\n\t\t} else {\n\t\t\t// the container role is \"group\", add the \"how to navigate\" message\n\t\t\ttext += ` ${AvatarGroup.i18nBundle.getText(AVATAR_GROUP_MOVE)}`;\n\t\t}\n\n\t\treturn text;\n\t}\n\n\tget _overflowButtonAriaLabelText() {\n\t\treturn this._isGroup ? undefined : AvatarGroup.i18nBundle.getText(AVATAR_GROUP_SHOW_COMPLETE_LIST_LABEL);\n\t}\n\n\tget _containerAriaHasPopup() {\n\t\treturn this._isGroup ? this._getAriaHasPopup() : undefined;\n\t}\n\n\tget _overflowButtonAccAttributes() {\n\t\treturn {\n\t\t\thasPopup: this._isGroup ? undefined : this._getAriaHasPopup(),\n\t\t};\n\t}\n\n\tget _role() {\n\t\treturn this._isGroup ? \"button\" : \"group\";\n\t}\n\n\tget _hiddenStartIndex() {\n\t\treturn this._itemsCount - this._hiddenItems;\n\t}\n\n\tget _overflowBtnHidden() {\n\t\treturn this._hiddenItems === 0;\n\t}\n\n\tget _isGroup() {\n\t\treturn this.type === AvatarGroupType.Group;\n\t}\n\n\tget _itemsCount() {\n\t\treturn this.items.length;\n\t}\n\n\tget _groupTabIndex() {\n\t\treturn this._isGroup ? 0 : -1;\n\t}\n\n\tget _overflowButton() {\n\t\treturn this.shadowRoot!.querySelector<Button>(AVATAR_GROUP_OVERFLOW_BTN_SELECTOR);\n\t}\n\n\t/**\n\t * Return the effective overflow button width\n\t * Differences are that when in \"Group\" type the button is offset and overlaps the avatars\n\t *\n\t * 1) In case of \"Group\", (LTR/RTL aware) button width is qual to second item offset left/right\n\t * 2) In case of \"Individual\" group type width is directly taken from button element\n\t * @private\n\t */\n\tget _overflowButtonEffectiveWidth() {\n\t\tconst button = this._customOverflowButton ? this._customOverflowButton : this._overflowButton;\n\t\t// if in \"Group\" mode overflow button size is equal to the offset from second item\n\n\t\tif (!button) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (this._isGroup) {\n\t\t\tlet item: HTMLElement = this.items[1];\n\t\t\tconst ltrEffectiveWidth = item.offsetLeft - this.offsetLeft;\n\n\t\t\t// in some cases when second avatar is overflowed the offset of the button is the right one\n\t\t\tif (!item || item.hidden) {\n\t\t\t\titem = button;\n\t\t\t}\n\n\t\t\treturn this.effectiveDir === \"rtl\" ? this._getWidthToItem(item) : ltrEffectiveWidth;\n\t\t}\n\n\t\treturn button.offsetWidth;\n\t}\n\n\tget firstAvatarSize() {\n\t\treturn this.items[0]?.size ?? AvatarSize.S;\n\t}\n\n\tonAfterRendering() {\n\t\tthis._overflowItems();\n\t}\n\n\tonBeforeRendering() {\n\t\tif (this._customOverflowButton) {\n\t\t\tthis._customOverflowButton.nonInteractive = this._isGroup;\n\t\t}\n\n\t\tthis._prepareAvatars();\n\t}\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\n\t\tResizeHandler.register(this, this._onResizeHandler);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._onResizeHandler);\n\t}\n\n\t_onResize() {\n\t\tthis._overflowItems();\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (this._isGroup) {\n\t\t\tif (isEnter(e)) {\n\t\t\t\tthis._fireGroupEvent(e.target as HTMLElement);\n\t\t\t} else if (isSpace(e)) {\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (!e.shiftKey && isSpace(e) && this._isGroup) {\n\t\t\tthis._fireGroupEvent(e.target as HTMLElement);\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_fireGroupEvent(targetRef: HTMLElement) {\n\t\tconst isOverflowButtonClicked = targetRef.classList.contains(OVERFLOW_BTN_CLASS) || targetRef === this._customOverflowButton;\n\n\t\tthis.fireDecoratorEvent(\"click\", {\n\t\t\ttargetRef,\n\t\t\toverflowButtonClicked: isOverflowButtonClicked,\n\t\t});\n\t}\n\n\t_onClick(e: MouseEvent) {\n\t\te.stopPropagation();\n\t\tthis._isGroup && this._fireGroupEvent(e.target as HTMLElement);\n\t}\n\n\tonAvatarClick(e: MouseEvent) {\n\t\te.stopPropagation();\n\t\tthis.fireDecoratorEvent(\"click\", {\n\t\t\ttargetRef: e.target as HTMLElement,\n\t\t\toverflowButtonClicked: false,\n\t\t});\n\t}\n\n\tonAvatarUI5Click(e: MouseEvent) {\n\t\t// AvatrGroup fires click and ui5-click - Avatar's ui5-click should be stopped.\n\t\te.stopPropagation();\n\t}\n\n\tonOverflowButtonClick(e: UI5CustomEvent<Button, \"click\">) {\n\t\te.stopPropagation();\n\n\t\tthis.fireDecoratorEvent(\"click\", {\n\t\t\ttargetRef: e.target as HTMLElement,\n\t\t\toverflowButtonClicked: true,\n\t\t});\n\t}\n\n\t/**\n\t * Modifies avatars to the needs of avatar group properties. Respects already set size and background color.\n\t * Set the margins (offsets) based on RTL/LTR.\n\t * @private\n\t */\n\t_prepareAvatars() {\n\t\tthis._colorIndex = 0;\n\n\t\tthis.items.forEach((avatar, index) => {\n\t\t\tconst colorIndex = this._getNextBackgroundColor();\n\t\t\tavatar.interactive = !this._isGroup;\n\n\t\t\tif (avatar.getAttribute(\"_color-scheme\") === AvatarColorScheme.Auto) {\n\t\t\t\t// AvatarGroup respects colors set to ui5-avatar\n\t\t\t\tavatar.setAttribute(\"_color-scheme\", AvatarColorScheme[`Accent${colorIndex}` as keyof typeof AvatarColorScheme]);\n\t\t\t}\n\n\t\t\t// last avatar should not be offset as it breaks the container width and focus styles are no set correctly\n\t\t\tif (index !== this._itemsCount - 1 || this._customOverflowButton) {\n\t\t\t\t// based on RTL the browser automatically sets left or right margin to avatars\n\t\t\t\tavatar.style.marginInlineEnd = offsets[avatar.effectiveSize][this.type];\n\t\t\t} else {\n\t\t\t\tavatar.style.marginInlineEnd = \"\";\n\t\t\t}\n\t\t});\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tthis._itemNavigation.setCurrentItem(e.target as IAvatarGroupItem);\n\t}\n\n\tgetFocusDomRef() {\n\t\treturn this._itemNavigation._getCurrentItem();\n\t}\n\n\t/**\n\t * Returns the total width to item excluding the item width\n\t * RTL/LTR aware\n\t * @private\n\t * @param item\n\t */\n\t_getWidthToItem(item: HTMLElement) {\n\t\tconst isRTL = this.effectiveDir === \"rtl\";\n\t\tconst ltrWidthToItem = item.offsetLeft - this.offsetLeft;\n\n\t\tif (isRTL) {\n\t\t\tconst itemOffsetParent = item.offsetParent as HTMLElement;\n\n\t\t\t// in RTL the total width is equal to difference of the parent container width and\n\t\t\t// how much is the item offset to the left minus its offsetWidth\n\n\t\t\tif (!itemOffsetParent) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\treturn itemOffsetParent.offsetWidth - item.offsetLeft - item.offsetWidth;\n\t\t}\n\n\t\treturn ltrWidthToItem;\n\t}\n\n\t/**\n\t * Overflows items that were not able to fit the container\n\t * @private\n\t */\n\t_overflowItems() {\n\t\tif (this.items.length < 2) {\n\t\t\t// no need to overflow avatars\n\t\t\tthis._setHiddenItems(0);\n\t\t\treturn;\n\t\t}\n\n\t\tlet hiddenItems = 0;\n\n\t\tfor (let index = 0; index < this._itemsCount; index++) {\n\t\t\tconst item: IAvatarGroupItem = this.items[index];\n\n\t\t\t// show item to determine if it will fit the new container size\n\t\t\titem.hidden = false;\n\n\t\t\t// container width to current item + item width (avatar)\n\t\t\t// used to determine whether the following items will fit the container or not\n\t\t\tlet totalWidth = this._getWidthToItem(item) + item.offsetWidth;\n\n\t\t\tif (index !== this._itemsCount - 1 || this._customOverflowButton) {\n\t\t\t\ttotalWidth += this._overflowButtonEffectiveWidth;\n\t\t\t}\n\n\t\t\tif (totalWidth > this.offsetWidth) {\n\t\t\t\thiddenItems = this._itemsCount - index;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// hide the items that did not fit the container size\n\t\tthis._setHiddenItems(hiddenItems);\n\t}\n\n\t_getNextBackgroundColor() {\n\t\t// counter is to automatically assign background colors to avatars, `Accent10` is the highest color value\n\t\tif (++this._colorIndex > 10) {\n\t\t\tthis._colorIndex = 1;\n\t\t}\n\t\treturn this._colorIndex;\n\t}\n\n\t_setHiddenItems(hiddenItems: number) {\n\t\tconst shouldFireEvent = this._hiddenItems !== hiddenItems;\n\n\t\tthis._hiddenItems = hiddenItems;\n\n\t\tthis.items.forEach((item, index) => {\n\t\t\titem.hidden = index >= this._hiddenStartIndex;\n\t\t});\n\n\t\tthis._overflowButtonText = `+${hiddenItems > 99 ? 99 : hiddenItems}`;\n\n\t\tif (shouldFireEvent) {\n\t\t\tthis.fireDecoratorEvent(\"overflow\");\n\t\t}\n\t}\n\n\t_getAriaHasPopup() {\n\t\treturn this.accessibilityAttributes.hasPopup;\n\t}\n}\n\nAvatarGroup.define();\n\nexport default AvatarGroup;\nexport type {\n\tAvatarGroupClickEventDetail,\n\tAvatarGroupAccessibilityAttributes,\n\tIAvatarGroupItem,\n};\n"]}
package/dist/Bar.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
+ import type { DefaultSlot, Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
2
3
  import type BarDesign from "./types/BarDesign.js";
3
4
  import type BarAccessibleRole from "./types/BarAccessibleRole.js";
4
5
  /**
@@ -78,17 +79,17 @@ declare class Bar extends UI5Element {
78
79
  * Defines the content at the start of the bar.
79
80
  * @public
80
81
  */
81
- startContent: Array<HTMLElement>;
82
+ startContent: Slot<HTMLElement>;
82
83
  /**
83
84
  * Defines the content in the middle of the bar.
84
85
  * @public
85
86
  */
86
- middleContent: Array<HTMLElement>;
87
+ middleContent: DefaultSlot<HTMLElement>;
87
88
  /**
88
89
  * Defines the content at the end of the bar.
89
90
  * @public
90
91
  */
91
- endContent: Array<HTMLElement>;
92
+ endContent: Slot<HTMLElement>;
92
93
  _handleResizeBound: () => void;
93
94
  get accInfo(): {
94
95
  label: string | undefined;
package/dist/Bar.js CHANGED
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
8
8
  import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
9
9
  import property from "@ui5/webcomponents-base/dist/decorators/property.js";
10
- import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
10
+ import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
11
11
  import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
12
12
  import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js";
13
13
  import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js";
@@ -127,13 +127,13 @@ __decorate([
127
127
  property()
128
128
  ], Bar.prototype, "accessibleNameRef", void 0);
129
129
  __decorate([
130
- slot({ type: HTMLElement })
130
+ slot()
131
131
  ], Bar.prototype, "startContent", void 0);
132
132
  __decorate([
133
133
  slot({ type: HTMLElement, "default": true })
134
134
  ], Bar.prototype, "middleContent", void 0);
135
135
  __decorate([
136
- slot({ type: HTMLElement })
136
+ slot()
137
137
  ], Bar.prototype, "endContent", void 0);
138
138
  Bar = __decorate([
139
139
  customElement({
package/dist/Bar.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Bar.js","sourceRoot":"","sources":["../src/Bar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,wDAAwD,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAI1G,WAAW;AACX,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAE3C,SAAS;AACT,OAAO,MAAM,MAAM,+BAA+B,CAAC;AAGnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAQH,IAAM,GAAG,GAAT,MAAM,GAAI,SAAQ,UAAU;IAmE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,IAAI,CAAC,CAAC;IACV,CAAC;IAED,SAAS;QACR,aAAa,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAExD,IAAI,CAAC,SAAS,EAAG,CAAC,gBAAgB,CAAC,4BAA4B,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YAChF,aAAa,CAAC,UAAU,CAAC,KAAoB,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACzE,CAAC,EAAE,IAAI,CAAC,CAAC;IACT,CAAC;IAED,IAAI,aAAa;QACjB,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,SAAqB,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3F,CAAC;CACF,CAAA;AA9GA;IADC,QAAQ,EAAE;mCACuB;AAiBlC;IADC,QAAQ,EAAE;2CACwC;AASnD;IADC,QAAQ,EAAE;2CACa;AASxB;IADC,QAAQ,EAAE;8CACgB;AAO3B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;yCACM;AAOlC;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;0CACX;AAOlC;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;uCACG;AA/D1B,GAAG;IAPR,aAAa,CAAC;QACd,GAAG,EAAE,SAAS;QACd,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,WAAW;KACrB,CAAC;GACI,GAAG,CAqHR;AAED,GAAG,CAAC,MAAM,EAAE,CAAC;AAEb,eAAe,GAAG,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type BarDesign from \"./types/BarDesign.js\";\nimport type BarAccessibleRole from \"./types/BarAccessibleRole.js\";\n\n// Template\nimport BarTemplate from \"./BarTemplate.js\";\n\n// Styles\nimport BarCss from \"./generated/themes/Bar.css.js\";\nimport type { AriaRole } from \"@ui5/webcomponents-base/dist/types.js\";\n\n/**\n * @class\n *\n * ### Overview\n * The Bar is a container which is primarily used to hold titles, buttons and input elements\n * and its design and functionality is the basis for page headers and footers.\n * The component consists of three areas to hold its content - startContent slot, default slot and endContent slot.\n * It has the capability to center content, such as a title, while having other components on the left and right side.\n *\n * ### Usage\n * With the use of the design property, you can set the style of the Bar to appear designed like a Header, Subheader, Footer and FloatingFooter.\n *\n * **Note:** Do not place a Bar inside another Bar or inside any bar-like component. Doing so may cause unpredictable behavior.\n *\n * ### Responsive Behavior\n * The default slot will be centered in the available space between the startContent and the endContent areas,\n * therefore it might not always be centered in the entire bar.\n *\n * ### Keyboard Handling\n *\n * #### Fast Navigation\n * This component provides a build in fast navigation group which can be used via [F6] / [Shift] + [F6] / [Ctrl] + [Alt/Option] / [Down] or [Ctrl] + [Alt/Option] + [Up].\n * In order to use this functionality, you need to import the following module:\n * `import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"`\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Bar.js\";`\n * @csspart bar - Used to style the wrapper of the content of the component\n * @csspart startContent - Used to style the wrapper of the start content of the component\n * @csspart midContent - Used to style the wrapper of the middle content of the component\n * @csspart endContent - Used to style the wrapper of the end content of the component\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.0.0-rc.11\n */\n@customElement({\n\ttag: \"ui5-bar\",\n\tfastNavigation: true,\n\trenderer: jsxRenderer,\n\tstyles: BarCss,\n\ttemplate: BarTemplate,\n})\nclass Bar extends UI5Element {\n\t/**\n\t * Defines the component's design.\n\t * @default \"Header\"\n\t * @public\n\t */\n\t@property()\n\tdesign: `${BarDesign}` = \"Header\";\n\n\t/**\n\t * Specifies the ARIA role applied to the component for accessibility purposes.\n\t *\n\t * **Note:**\n\t *\n\t * - Set accessibleRole to \"toolbar\" only when the component contains two or more active, interactive elements (such as buttons, links, or input fields) within the bar.\n\t *\n\t * - If there is only one or no active element, it is recommended to avoid using the \"toolbar\" role, as it implies a grouping of multiple interactive controls.\n\t *\n\t * @public\n\t * @default \"Toolbar\"\n\t * @since 2.10.0\n\t *\n\t */\n\t@property()\n\taccessibleRole: `${BarAccessibleRole}` = \"Toolbar\";\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @since 2.16.0\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the bar.\n\t * @default undefined\n\t * @since 2.16.0\n\t * @public\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t* Defines the content at the start of the bar.\n\t* @public\n\t*/\n\t@slot({ type: HTMLElement })\n\tstartContent!: Array<HTMLElement>;\n\n\t/**\n\t* Defines the content in the middle of the bar.\n\t* @public\n\t*/\n\t@slot({ type: HTMLElement, \"default\": true })\n\tmiddleContent!: Array<HTMLElement>\n\n\t/**\n\t* Defines the content at the end of the bar.\n\t* @public\n\t*/\n\t@slot({ type: HTMLElement })\n\tendContent!: Array<HTMLElement>\n\n\t_handleResizeBound: () => void;\n\n\tget accInfo() {\n\t\treturn {\n\t\t\t\"label\": this.ariaLabelText,\n\t\t\t\"role\": this.effectiveRole,\n\t\t};\n\t}\n\n\tget ariaLabelText(): string | undefined {\n\t\tif (this.accessibleName || this.accessibleNameRef) {\n\t\t\treturn getEffectiveAriaLabelText(this);\n\t\t}\n\n\t\treturn this.design;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._handleResizeBound = this.handleResize.bind(this);\n\t}\n\n\thandleResize() {\n\t\tconst bar = this.getDomRef()!;\n\t\tconst barWidth = bar.offsetWidth;\n\t\tconst needShrinked = Array.from(bar.children).some(child => {\n\t\t\treturn (child as HTMLElement).offsetWidth > barWidth / 3;\n\t\t});\n\n\t\tbar.classList.toggle(\"ui5-bar-root-shrinked\", needShrinked);\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._handleResizeBound);\n\n\t\tthis.getDomRef()!.querySelectorAll(\".ui5-bar-content-container\").forEach(child => {\n\t\t\tResizeHandler.register(child as HTMLElement, this._handleResizeBound);\n\t\t}, this);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._handleResizeBound);\n\n\t\tthis.getDomRef()!.querySelectorAll(\".ui5-bar-content-container\").forEach(child => {\n\t\t\tResizeHandler.deregister(child as HTMLElement, this._handleResizeBound);\n\t\t}, this);\n\t }\n\n\t get effectiveRole() {\n\t\treturn this.accessibleRole.toLowerCase() === \"toolbar\" ? \"toolbar\" as AriaRole : undefined;\n\t }\n}\n\nBar.define();\n\nexport default Bar;\n"]}
1
+ {"version":3,"file":"Bar.js","sourceRoot":"","sources":["../src/Bar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,wDAAwD,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAI1G,WAAW;AACX,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAE3C,SAAS;AACT,OAAO,MAAM,MAAM,+BAA+B,CAAC;AAGnD;;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C,EAAE;YAChF,aAAa,CAAC,QAAQ,CAAC,KAAoB,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACvE,CAAC,EAAE,IAAI,CAAC,CAAC;IACV,CAAC;IAED,SAAS;QACR,aAAa,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAExD,IAAI,CAAC,SAAS,EAAG,CAAC,gBAAgB,CAAC,4BAA4B,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YAChF,aAAa,CAAC,UAAU,CAAC,KAAoB,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACzE,CAAC,EAAE,IAAI,CAAC,CAAC;IACT,CAAC;IAED,IAAI,aAAa;QACjB,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,SAAqB,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3F,CAAC;CACF,CAAA;AA9GA;IADC,QAAQ,EAAE;mCACuB;AAiBlC;IADC,QAAQ,EAAE;2CACwC;AASnD;IADC,QAAQ,EAAE;2CACa;AASxB;IADC,QAAQ,EAAE;8CACgB;AAO3B;IADC,IAAI,EAAE;yCAC0B;AAOjC;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;0CACJ;AAOzC;IADC,IAAI,EAAE;uCACwB;AA/D1B,GAAG;IAPR,aAAa,CAAC;QACd,GAAG,EAAE,SAAS;QACd,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,WAAW;KACrB,CAAC;GACI,GAAG,CAqHR;AAED,GAAG,CAAC,MAAM,EAAE,CAAC;AAEb,eAAe,GAAG,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot, Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type BarDesign from \"./types/BarDesign.js\";\nimport type BarAccessibleRole from \"./types/BarAccessibleRole.js\";\n\n// Template\nimport BarTemplate from \"./BarTemplate.js\";\n\n// Styles\nimport BarCss from \"./generated/themes/Bar.css.js\";\nimport type { AriaRole } from \"@ui5/webcomponents-base/dist/types.js\";\n\n/**\n * @class\n *\n * ### Overview\n * The Bar is a container which is primarily used to hold titles, buttons and input elements\n * and its design and functionality is the basis for page headers and footers.\n * The component consists of three areas to hold its content - startContent slot, default slot and endContent slot.\n * It has the capability to center content, such as a title, while having other components on the left and right side.\n *\n * ### Usage\n * With the use of the design property, you can set the style of the Bar to appear designed like a Header, Subheader, Footer and FloatingFooter.\n *\n * **Note:** Do not place a Bar inside another Bar or inside any bar-like component. Doing so may cause unpredictable behavior.\n *\n * ### Responsive Behavior\n * The default slot will be centered in the available space between the startContent and the endContent areas,\n * therefore it might not always be centered in the entire bar.\n *\n * ### Keyboard Handling\n *\n * #### Fast Navigation\n * This component provides a build in fast navigation group which can be used via [F6] / [Shift] + [F6] / [Ctrl] + [Alt/Option] / [Down] or [Ctrl] + [Alt/Option] + [Up].\n * In order to use this functionality, you need to import the following module:\n * `import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"`\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Bar.js\";`\n * @csspart bar - Used to style the wrapper of the content of the component\n * @csspart startContent - Used to style the wrapper of the start content of the component\n * @csspart midContent - Used to style the wrapper of the middle content of the component\n * @csspart endContent - Used to style the wrapper of the end content of the component\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.0.0-rc.11\n */\n@customElement({\n\ttag: \"ui5-bar\",\n\tfastNavigation: true,\n\trenderer: jsxRenderer,\n\tstyles: BarCss,\n\ttemplate: BarTemplate,\n})\nclass Bar extends UI5Element {\n\t/**\n\t * Defines the component's design.\n\t * @default \"Header\"\n\t * @public\n\t */\n\t@property()\n\tdesign: `${BarDesign}` = \"Header\";\n\n\t/**\n\t * Specifies the ARIA role applied to the component for accessibility purposes.\n\t *\n\t * **Note:**\n\t *\n\t * - Set accessibleRole to \"toolbar\" only when the component contains two or more active, interactive elements (such as buttons, links, or input fields) within the bar.\n\t *\n\t * - If there is only one or no active element, it is recommended to avoid using the \"toolbar\" role, as it implies a grouping of multiple interactive controls.\n\t *\n\t * @public\n\t * @default \"Toolbar\"\n\t * @since 2.10.0\n\t *\n\t */\n\t@property()\n\taccessibleRole: `${BarAccessibleRole}` = \"Toolbar\";\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @since 2.16.0\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the bar.\n\t * @default undefined\n\t * @since 2.16.0\n\t * @public\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t* Defines the content at the start of the bar.\n\t* @public\n\t*/\n\t@slot()\n\tstartContent!: Slot<HTMLElement>;\n\n\t/**\n\t* Defines the content in the middle of the bar.\n\t* @public\n\t*/\n\t@slot({ type: HTMLElement, \"default\": true })\n\tmiddleContent!: DefaultSlot<HTMLElement>;\n\n\t/**\n\t* Defines the content at the end of the bar.\n\t* @public\n\t*/\n\t@slot()\n\tendContent!: Slot<HTMLElement>;\n\n\t_handleResizeBound: () => void;\n\n\tget accInfo() {\n\t\treturn {\n\t\t\t\"label\": this.ariaLabelText,\n\t\t\t\"role\": this.effectiveRole,\n\t\t};\n\t}\n\n\tget ariaLabelText(): string | undefined {\n\t\tif (this.accessibleName || this.accessibleNameRef) {\n\t\t\treturn getEffectiveAriaLabelText(this);\n\t\t}\n\n\t\treturn this.design;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._handleResizeBound = this.handleResize.bind(this);\n\t}\n\n\thandleResize() {\n\t\tconst bar = this.getDomRef()!;\n\t\tconst barWidth = bar.offsetWidth;\n\t\tconst needShrinked = Array.from(bar.children).some(child => {\n\t\t\treturn (child as HTMLElement).offsetWidth > barWidth / 3;\n\t\t});\n\n\t\tbar.classList.toggle(\"ui5-bar-root-shrinked\", needShrinked);\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._handleResizeBound);\n\n\t\tthis.getDomRef()!.querySelectorAll(\".ui5-bar-content-container\").forEach(child => {\n\t\t\tResizeHandler.register(child as HTMLElement, this._handleResizeBound);\n\t\t}, this);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._handleResizeBound);\n\n\t\tthis.getDomRef()!.querySelectorAll(\".ui5-bar-content-container\").forEach(child => {\n\t\t\tResizeHandler.deregister(child as HTMLElement, this._handleResizeBound);\n\t\t}, this);\n\t }\n\n\t get effectiveRole() {\n\t\treturn this.accessibleRole.toLowerCase() === \"toolbar\" ? \"toolbar\" as AriaRole : undefined;\n\t }\n}\n\nBar.define();\n\nexport default Bar;\n"]}
@@ -1,5 +1,5 @@
1
1
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
- import type { ChangeInfo } from "@ui5/webcomponents-base/dist/UI5Element.js";
2
+ import type { ChangeInfo, DefaultSlot } from "@ui5/webcomponents-base/dist/UI5Element.js";
3
3
  import ItemNavigation from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
4
4
  import type { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
5
5
  import type { AccessibilityAttributes } from "@ui5/webcomponents-base/dist/types.js";
@@ -86,7 +86,7 @@ declare class Breadcrumbs extends UI5Element {
86
86
  * **Note:** Use the `ui5-breadcrumbs-item` component to define the desired items.
87
87
  * @public
88
88
  */
89
- items: Array<BreadcrumbsItem>;
89
+ items: DefaultSlot<BreadcrumbsItem>;
90
90
  _itemNavigation: ItemNavigation;
91
91
  _onResizeHandler: ResizeObserverCallback;
92
92
  _breadcrumbItemWidths: WeakMap<BreadcrumbsItem, number>;
@@ -8,7 +8,7 @@ var Breadcrumbs_1;
8
8
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
9
9
  import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
10
10
  import property from "@ui5/webcomponents-base/dist/decorators/property.js";
11
- import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
11
+ import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
12
12
  import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
13
13
  import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
14
14
  import ItemNavigation from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";