@ui5/webcomponents 2.22.0-rc.1 → 2.22.0-rc.3

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 (103) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/AvatarBadge.d.ts +15 -1
  4. package/dist/AvatarBadge.js +40 -3
  5. package/dist/AvatarBadge.js.map +1 -1
  6. package/dist/AvatarBadgeTemplate.js +1 -1
  7. package/dist/AvatarBadgeTemplate.js.map +1 -1
  8. package/dist/ColorPalette.d.ts +8 -8
  9. package/dist/ColorPalette.js +7 -5
  10. package/dist/ColorPalette.js.map +1 -1
  11. package/dist/ColorPaletteItem.d.ts +9 -0
  12. package/dist/ColorPaletteItem.js +33 -0
  13. package/dist/ColorPaletteItem.js.map +1 -1
  14. package/dist/ColorPaletteItemTemplate.js +1 -1
  15. package/dist/ColorPaletteItemTemplate.js.map +1 -1
  16. package/dist/ColorPalettePopover.js +1 -1
  17. package/dist/ColorPalettePopover.js.map +1 -1
  18. package/dist/ComboBox.js +7 -2
  19. package/dist/ComboBox.js.map +1 -1
  20. package/dist/ComboBoxPopoverTemplate.js +2 -1
  21. package/dist/ComboBoxPopoverTemplate.js.map +1 -1
  22. package/dist/DateRangePicker.d.ts +12 -1
  23. package/dist/DateRangePicker.js +31 -1
  24. package/dist/DateRangePicker.js.map +1 -1
  25. package/dist/Input.d.ts +5 -2
  26. package/dist/Input.js +11 -8
  27. package/dist/Input.js.map +1 -1
  28. package/dist/MultiComboBox.js +4 -1
  29. package/dist/MultiComboBox.js.map +1 -1
  30. package/dist/MultiInputTemplate.js +1 -1
  31. package/dist/MultiInputTemplate.js.map +1 -1
  32. package/dist/SegmentedButton.js +6 -4
  33. package/dist/SegmentedButton.js.map +1 -1
  34. package/dist/SegmentedButtonItem.d.ts +8 -0
  35. package/dist/SegmentedButtonItem.js +26 -1
  36. package/dist/SegmentedButtonItem.js.map +1 -1
  37. package/dist/StepInput.d.ts +2 -2
  38. package/dist/StepInput.js +17 -7
  39. package/dist/StepInput.js.map +1 -1
  40. package/dist/Switch.d.ts +2 -0
  41. package/dist/Switch.js +7 -1
  42. package/dist/Switch.js.map +1 -1
  43. package/dist/SwitchTemplate.js +2 -2
  44. package/dist/SwitchTemplate.js.map +1 -1
  45. package/dist/TextArea.d.ts +10 -0
  46. package/dist/TextArea.js +37 -0
  47. package/dist/TextArea.js.map +1 -1
  48. package/dist/Tokenizer.d.ts +6 -0
  49. package/dist/Tokenizer.js +4 -1
  50. package/dist/Tokenizer.js.map +1 -1
  51. package/dist/css/themes/CardHeader.css +1 -1
  52. package/dist/css/themes/Select.css +1 -1
  53. package/dist/css/themes/StepInput.css +1 -1
  54. package/dist/css/themes/Switch.css +1 -1
  55. package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
  56. package/dist/css/themes/sap_horizon_auto/parameters-bundle.css +2 -2
  57. package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
  58. package/dist/custom-elements-internal.json +126 -14
  59. package/dist/custom-elements.json +62 -11
  60. package/dist/features/InputComposition.d.ts +1 -1
  61. package/dist/features/InputComposition.js.map +1 -1
  62. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  63. package/dist/generated/assets/themes/sap_horizon_auto/parameters-bundle.css.json +1 -1
  64. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  65. package/dist/generated/i18n/i18n-defaults.d.ts +3 -1
  66. package/dist/generated/i18n/i18n-defaults.js +3 -1
  67. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  68. package/dist/generated/themes/CardHeader.css.d.ts +1 -1
  69. package/dist/generated/themes/CardHeader.css.js +1 -1
  70. package/dist/generated/themes/CardHeader.css.js.map +1 -1
  71. package/dist/generated/themes/Select.css.d.ts +1 -1
  72. package/dist/generated/themes/Select.css.js +1 -1
  73. package/dist/generated/themes/Select.css.js.map +1 -1
  74. package/dist/generated/themes/StepInput.css.d.ts +1 -1
  75. package/dist/generated/themes/StepInput.css.js +1 -1
  76. package/dist/generated/themes/StepInput.css.js.map +1 -1
  77. package/dist/generated/themes/Switch.css.d.ts +1 -1
  78. package/dist/generated/themes/Switch.css.js +1 -1
  79. package/dist/generated/themes/Switch.css.js.map +1 -1
  80. package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
  81. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
  82. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  83. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +1 -1
  84. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +2 -2
  85. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -1
  86. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
  87. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
  88. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  89. package/dist/vscode.html-custom-data.json +14 -9
  90. package/dist/web-types.json +50 -20
  91. package/package.json +9 -9
  92. package/src/AvatarBadgeTemplate.tsx +3 -1
  93. package/src/ColorPaletteItemTemplate.tsx +1 -0
  94. package/src/ComboBoxPopoverTemplate.tsx +8 -1
  95. package/src/MultiInputTemplate.tsx +1 -0
  96. package/src/SwitchTemplate.tsx +3 -0
  97. package/src/i18n/messagebundle.properties +6 -0
  98. package/src/themes/CardHeader.css +0 -1
  99. package/src/themes/Select.css +25 -0
  100. package/src/themes/StepInput.css +2 -1
  101. package/src/themes/Switch.css +4 -2
  102. package/src/themes/sap_horizon/Select-parameters.css +2 -0
  103. package/src/themes/sap_horizon_dark/Select-parameters.css +2 -0
@@ -41,6 +41,16 @@ declare class AvatarBadge extends UI5Element {
41
41
  * @public
42
42
  */
43
43
  icon?: string;
44
+ /**
45
+ * Defines the custom text alternative of the badge icon.
46
+ *
47
+ * **Note:** If not provided, the badge uses the icon accessible name.
48
+ * If no icon accessible name is available, a generic fallback text is used.
49
+ * @default undefined
50
+ * @public
51
+ * @since 2.22.0
52
+ */
53
+ accessibleName?: string;
44
54
  /**
45
55
  * Defines the state of the badge, which determines its styling.
46
56
  *
@@ -59,6 +69,10 @@ declare class AvatarBadge extends UI5Element {
59
69
  * @private
60
70
  */
61
71
  invalid: boolean;
62
- onBeforeRendering(): void;
72
+ /**
73
+ * @private
74
+ */
75
+ effectiveAccessibleName?: string;
76
+ onBeforeRendering(): Promise<void>;
63
77
  }
64
78
  export default AvatarBadge;
@@ -8,12 +8,14 @@ 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
10
  import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
11
- import { getIconDataSync } from "@ui5/webcomponents-base/dist/asset-registries/Icons.js";
11
+ import { getIconData, getIconDataSync } from "@ui5/webcomponents-base/dist/asset-registries/Icons.js";
12
+ import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
12
13
  // Template
13
14
  import AvatarBadgeTemplate from "./AvatarBadgeTemplate.js";
14
15
  // Styles
15
16
  import AvatarBadgeCss from "./generated/themes/AvatarBadge.css.js";
16
17
  import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js";
18
+ const ICON_NOT_FOUND = "ICON_NOT_FOUND";
17
19
  /**
18
20
  * @class
19
21
  * ### Overview
@@ -65,22 +67,57 @@ let AvatarBadge = class AvatarBadge extends UI5Element {
65
67
  */
66
68
  this.invalid = false;
67
69
  }
68
- onBeforeRendering() {
69
- this.invalid = !this.icon || !getIconDataSync(this.icon);
70
+ async onBeforeRendering() {
71
+ const icon = this.icon;
72
+ if (!icon) {
73
+ this.invalid = true;
74
+ this.effectiveAccessibleName = undefined;
75
+ return;
76
+ }
77
+ const iconData = getIconDataSync(icon) || await getIconData(icon);
78
+ this.invalid = !iconData || iconData === ICON_NOT_FOUND;
79
+ if (this.invalid) {
80
+ this.effectiveAccessibleName = undefined;
81
+ }
82
+ else if (this.accessibleName) {
83
+ // User-provided accessible name takes precedence
84
+ this.effectiveAccessibleName = this.accessibleName;
85
+ }
86
+ else if (iconData && iconData !== ICON_NOT_FOUND && iconData.accData) {
87
+ // Use the icon's registered i18n label (e.g., message-error -> "Error")
88
+ if (iconData.packageName) {
89
+ const i18nBundle = await getI18nBundle(iconData.packageName);
90
+ this.effectiveAccessibleName = i18nBundle.getText(iconData.accData) || undefined;
91
+ }
92
+ else {
93
+ this.effectiveAccessibleName = iconData.accData.defaultText || undefined;
94
+ }
95
+ }
96
+ else {
97
+ // Derive from icon name (e.g., "edit" -> "Edit")
98
+ this.effectiveAccessibleName = icon.charAt(0).toUpperCase() + icon.slice(1);
99
+ }
70
100
  }
71
101
  };
72
102
  __decorate([
73
103
  property()
74
104
  ], AvatarBadge.prototype, "icon", void 0);
105
+ __decorate([
106
+ property()
107
+ ], AvatarBadge.prototype, "accessibleName", void 0);
75
108
  __decorate([
76
109
  property()
77
110
  ], AvatarBadge.prototype, "state", void 0);
78
111
  __decorate([
79
112
  property({ type: Boolean })
80
113
  ], AvatarBadge.prototype, "invalid", void 0);
114
+ __decorate([
115
+ property({ noAttribute: true })
116
+ ], AvatarBadge.prototype, "effectiveAccessibleName", void 0);
81
117
  AvatarBadge = __decorate([
82
118
  customElement({
83
119
  tag: "ui5-avatar-badge",
120
+ languageAware: true,
84
121
  renderer: jsxRenderer,
85
122
  styles: AvatarBadgeCss,
86
123
  template: AvatarBadgeTemplate,
@@ -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,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\nAv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,WAAW,CAmFhB;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 { getIconData, getIconDataSync } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.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\nconst ICON_NOT_FOUND = \"ICON_NOT_FOUND\";\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\tlanguageAware: true,\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 custom text alternative of the badge icon.\n\t *\n\t * **Note:** If not provided, the badge uses the icon accessible name.\n\t * If no icon accessible name is available, a generic fallback text is used.\n\t * @default undefined\n\t * @public\n \t * @since 2.22.0\n\t */\n\t@property()\n\taccessibleName?: 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\t/**\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\teffectiveAccessibleName?: string;\n\n\tasync onBeforeRendering() {\n\t\tconst icon = this.icon;\n\t\tif (!icon) {\n\t\t\tthis.invalid = true;\n\t\t\tthis.effectiveAccessibleName = undefined;\n\t\t\treturn;\n\t\t}\n\n\t\tconst iconData = getIconDataSync(icon) || await getIconData(icon);\n\t\tthis.invalid = !iconData || iconData === ICON_NOT_FOUND;\n\n\t\tif (this.invalid) {\n\t\t\tthis.effectiveAccessibleName = undefined;\n\t\t} else if (this.accessibleName) {\n\t\t\t// User-provided accessible name takes precedence\n\t\t\tthis.effectiveAccessibleName = this.accessibleName;\n\t\t} else if (iconData && iconData !== ICON_NOT_FOUND && iconData.accData) {\n\t\t\t// Use the icon's registered i18n label (e.g., message-error -> \"Error\")\n\t\t\tif (iconData.packageName) {\n\t\t\t\tconst i18nBundle = await getI18nBundle(iconData.packageName);\n\t\t\t\tthis.effectiveAccessibleName = i18nBundle.getText(iconData.accData) || undefined;\n\t\t\t} else {\n\t\t\t\tthis.effectiveAccessibleName = iconData.accData.defaultText || undefined;\n\t\t\t}\n\t\t} else {\n\t\t\t// Derive from icon name (e.g., \"edit\" -> \"Edit\")\n\t\t\tthis.effectiveAccessibleName = icon.charAt(0).toUpperCase() + icon.slice(1);\n\t\t}\n\t}\n}\n\nAvatarBadge.define();\n\nexport default AvatarBadge;\n"]}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "@ui5/webcomponents-base/jsx-runtime";
2
2
  import Icon from "./Icon.js";
3
3
  export default function AvatarBadgeTemplate() {
4
- return (_jsx(_Fragment, { children: !this.invalid && (_jsx(Icon, { name: this.icon, class: "ui5-avatar-badge-icon", mode: "Decorative" })) }));
4
+ return (_jsx(_Fragment, { children: !this.invalid && (_jsx(Icon, { name: this.icon, class: "ui5-avatar-badge-icon", accessibleName: this.effectiveAccessibleName, showTooltip: true, mode: "Image" })) }));
5
5
  }
6
6
  //# sourceMappingURL=AvatarBadgeTemplate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarBadgeTemplate.js","sourceRoot":"","sources":["../src/AvatarBadgeTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,OAAO,UAAU,mBAAmB;IAC1C,OAAO,CACN,4BACE,CAAC,IAAI,CAAC,OAAO,IAAI,CACjB,KAAC,IAAI,IACJ,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAC,uBAAuB,EAC7B,IAAI,EAAC,YAAY,GACV,CACR,GACC,CACH,CAAC;AACH,CAAC","sourcesContent":["import type AvatarBadge from \"./AvatarBadge.js\";\nimport Icon from \"./Icon.js\";\n\nexport default function AvatarBadgeTemplate(this: AvatarBadge) {\n\treturn (\n\t\t<>\n\t\t\t{!this.invalid && (\n\t\t\t\t<Icon\n\t\t\t\t\tname={this.icon}\n\t\t\t\t\tclass=\"ui5-avatar-badge-icon\"\n\t\t\t\t\tmode=\"Decorative\"\n\t\t\t\t></Icon>\n\t\t\t)}\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"file":"AvatarBadgeTemplate.js","sourceRoot":"","sources":["../src/AvatarBadgeTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,OAAO,UAAU,mBAAmB;IAC1C,OAAO,CACN,4BACE,CAAC,IAAI,CAAC,OAAO,IAAI,CACjB,KAAC,IAAI,IACJ,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAC,uBAAuB,EAC7B,cAAc,EAAE,IAAI,CAAC,uBAAuB,EAC5C,WAAW,EAAE,IAAI,EACjB,IAAI,EAAC,OAAO,GACL,CACR,GACC,CACH,CAAC;AACH,CAAC","sourcesContent":["import type AvatarBadge from \"./AvatarBadge.js\";\nimport Icon from \"./Icon.js\";\n\nexport default function AvatarBadgeTemplate(this: AvatarBadge) {\n\treturn (\n\t\t<>\n\t\t\t{!this.invalid && (\n\t\t\t\t<Icon\n\t\t\t\t\tname={this.icon}\n\t\t\t\t\tclass=\"ui5-avatar-badge-icon\"\n\t\t\t\t\taccessibleName={this.effectiveAccessibleName}\n\t\t\t\t\tshowTooltip={true}\n\t\t\t\t\tmode=\"Image\"\n\t\t\t\t></Icon>\n\t\t\t)}\n\t\t</>\n\t);\n}\n"]}
@@ -16,7 +16,7 @@ interface IColorPaletteItem extends UI5Element, ITabbable {
16
16
  index?: number;
17
17
  selected?: boolean;
18
18
  }
19
- type ColorPaletteNavigationItem = IColorPaletteItem | Button;
19
+ type ColorPaletteNavigationItem = ColorPaletteItem | Button;
20
20
  type ColorPaletteItemClickEventDetail = {
21
21
  color: string;
22
22
  };
@@ -118,7 +118,7 @@ declare class ColorPalette extends UI5Element {
118
118
  * Defines the `ui5-color-palette-item` elements.
119
119
  * @public
120
120
  */
121
- colors: DefaultSlot<IColorPaletteItem>;
121
+ colors: DefaultSlot<ColorPaletteItem>;
122
122
  _itemNavigation: ItemNavigation;
123
123
  _itemNavigationRecentColors: ItemNavigation;
124
124
  _recentColors: Array<string>;
@@ -132,7 +132,7 @@ declare class ColorPalette extends UI5Element {
132
132
  onAfterRendering(): void;
133
133
  selectColor(item: ColorPaletteItem): void;
134
134
  _setColor(color: string): void;
135
- get effectiveColorItems(): IColorPaletteItem[];
135
+ get effectiveColorItems(): ColorPaletteItem[];
136
136
  /**
137
137
  * Ensures that only one item is selected or only the last selected item remains active if more than one are explicitly set as 'selected'.
138
138
  * @private
@@ -157,8 +157,8 @@ declare class ColorPalette extends UI5Element {
157
157
  _isUpOrDownNavigatableColorPaletteItem(e: KeyboardEvent): boolean;
158
158
  _isPrevious(e: KeyboardEvent): boolean;
159
159
  _isNext(e: KeyboardEvent): boolean;
160
- _isFirstSwatch(target: ColorPaletteItem, swatches: Array<IColorPaletteItem>): boolean;
161
- _isLastSwatch(target: ColorPaletteItem, swatches: Array<IColorPaletteItem>): boolean;
160
+ _isFirstSwatch(target: ColorPaletteItem, swatches: Array<ColorPaletteItem>): boolean;
161
+ _isLastSwatch(target: ColorPaletteItem, swatches: Array<ColorPaletteItem>): boolean;
162
162
  /**
163
163
  * Checks if the target swatch is the first swatch in its row.
164
164
  * @private
@@ -263,8 +263,8 @@ declare class ColorPalette extends UI5Element {
263
263
  /**
264
264
  * Returns the selected item.
265
265
  */
266
- get selectedItem(): ColorPaletteItem | IColorPaletteItem | undefined;
267
- get allColorsInPalette(): (ColorPaletteItem | IColorPaletteItem)[];
266
+ get selectedItem(): ColorPaletteItem | undefined;
267
+ get allColorsInPalette(): ColorPaletteItem[];
268
268
  get colorPaletteDialogTitle(): string;
269
269
  get colorPaletteDialogOKButton(): string;
270
270
  get colorPaletteCancelButton(): string;
@@ -272,7 +272,7 @@ declare class ColorPalette extends UI5Element {
272
272
  * Returns the selected color.
273
273
  */
274
274
  get selectedColor(): string | undefined;
275
- get displayedColors(): Array<IColorPaletteItem>;
275
+ get displayedColors(): Array<ColorPaletteItem>;
276
276
  get colorContainerLabel(): string;
277
277
  get colorPaletteMoreColorsText(): string;
278
278
  get colorPaletteDefaultColorText(): string;
@@ -157,11 +157,10 @@ let ColorPalette = ColorPalette_1 = class ColorPalette extends UI5Element {
157
157
  });
158
158
  }
159
159
  get effectiveColorItems() {
160
- let colorItems = this.colors;
161
160
  if (this.popupMode) {
162
- colorItems = this.getSlottedNodes("colors");
161
+ return this.getSlottedNodes("colors");
163
162
  }
164
- return colorItems;
163
+ return this.colors;
165
164
  }
166
165
  /**
167
166
  * Ensures that only one item is selected or only the last selected item remains active if more than one are explicitly set as 'selected'.
@@ -179,6 +178,9 @@ let ColorPalette = ColorPalette_1 = class ColorPalette extends UI5Element {
179
178
  });
180
179
  }
181
180
  _onclick(e) {
181
+ if (e.defaultPrevented) {
182
+ return;
183
+ }
182
184
  this.handleSelection(e.target);
183
185
  }
184
186
  _onmousedown(e) {
@@ -403,10 +405,10 @@ let ColorPalette = ColorPalette_1 = class ColorPalette extends UI5Element {
403
405
  return isDown(e) || isRight(e);
404
406
  }
405
407
  _isFirstSwatch(target, swatches) {
406
- return swatches && Boolean(swatches.length) && swatches[0] === target;
408
+ return swatches && Boolean(swatches.length) && swatches[0] === (target);
407
409
  }
408
410
  _isLastSwatch(target, swatches) {
409
- return swatches && Boolean(swatches.length) && swatches[swatches.length - 1] === target;
411
+ return swatches && Boolean(swatches.length) && swatches[swatches.length - 1] === (target);
410
412
  }
411
413
  /**
412
414
  * Checks if the target swatch is the first swatch in its row.
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPalette.js","sourceRoot":"","sources":["../src/ColorPalette.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,kDAAkD,CAAC;AACrE,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,WAAW,MAAM,sDA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CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDACT;AAMnB;IADC,QAAQ,EAAE;sDAC8B;AAYzC;IANC,IAAI,CAAC;QACL,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,WAAW;QACjB,uBAAuB,EAAE,IAAI;QAC7B,eAAe,EAAE,IAAI;KACrB,CAAC;4CACsC;AASxC;IADC,KAAK,CAAC,8BAA8B,CAAC;yDACT;AAG7B;IADC,KAAK,CAAC,qBAAqB,CAAC;uDACF;AAGpB;IADN,IAAI,CAAC,oBAAoB,CAAC;sCACG;AA7HzB,YAAY;IAdjB,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,oBAAoB;QAC9B,MAAM,EAAE,CAAC,eAAe,EAAE,qBAAqB,CAAC;KAChD,CAAC;IAEF;;;;;OAKG;;IACF,KAAK,CAAC,YAAY,CAAC;GACd,YAAY,CA+1BjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { 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 query from \"@ui5/webcomponents-base/dist/decorators/query.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport ItemNavigationBehavior from \"@ui5/webcomponents-base/dist/types/ItemNavigationBehavior.js\";\nimport { isPhone } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { JsxTemplate } from \"@ui5/webcomponents-base/dist/index.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisDown,\n\tisRight,\n\tisUp,\n\tisLeft,\n\tisTabNext,\n\tisHome,\n\tisEnd,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport ColorPaletteTemplate from \"./ColorPaletteTemplate.js\";\nimport type ColorPaletteItem from \"./ColorPaletteItem.js\";\nimport type Button from \"./Button.js\";\nimport type ColorPicker from \"./ColorPicker.js\";\nimport \"./ColorPaletteItem.js\";\n\nimport {\n\tCOLORPALETTE_CONTAINER_LABEL,\n\tCOLOR_PALETTE_MORE_COLORS_TEXT,\n\tCOLOR_PALETTE_DEFAULT_COLOR_TEXT,\n\tCOLOR_PALETTE_DIALOG_CANCEL_BUTTON,\n\tCOLOR_PALETTE_DIALOG_OK_BUTTON,\n\tCOLOR_PALETTE_DIALOG_TITLE,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport ColorPaletteCss from \"./generated/themes/ColorPalette.css.js\";\nimport ColorPaletteDialogCss from \"./generated/themes/ColorPaletteDialog.css.js\";\n\n/**\n * Interface for components that may be used inside a `ui5-color-palette` or `ui5-color-palette-popover`\n * @public\n */\ninterface IColorPaletteItem extends UI5Element, ITabbable {\n\tvalue?: string,\n\tindex?: number,\n\tselected?: boolean,\n}\n\ntype ColorPaletteNavigationItem = IColorPaletteItem | Button;\n\ntype ColorPaletteItemClickEventDetail = {\n\tcolor: string,\n}\n\n/**\n * @class\n *\n * ### Overview\n * The `ui5-color-palette` provides the users with a range of predefined colors. The colors are fixed and do not change with the theme.\n *\n * ### Usage\n *\n * The `ui5-color-palette` is meant for users that need to select a color from a predefined set.\n * To define the colors, use the `ui5-color-palette-item` component inside the default slot of the `ui5-color-palette`.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/ColorPalette.js\";`\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.12\n * @public\n */\n@customElement({\n\ttag: \"ui5-color-palette\",\n\trenderer: jsxRenderer,\n\ttemplate: ColorPaletteTemplate,\n\tstyles: [ColorPaletteCss, ColorPaletteDialogCss],\n})\n\n/**\n * Fired when the user selects a color.\n * @public\n * @since 1.0.0-rc.15\n * @param {string} color the selected color\n */\n@event(\"item-click\")\nclass ColorPalette extends UI5Element {\n\teventDetails!: {\n\t\t\"item-click\": ColorPaletteItemClickEventDetail,\n\t}\n\n\t/**\n\t * Defines whether the user can see the last used colors in the bottom of the component\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\tshowRecentColors = false;\n\n\t/**\n\t * Defines whether the user can choose a custom color from a color picker\n\t *\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\tshowMoreColors = false;\n\n\t/**\n\t * Defines whether the user can choose the default color from a button.\n\t * @default false\n\t * @private\n\t * @since 1.0.0-rc.16\n\t */\n\t@property({ type: Boolean })\n\tshowDefaultColor = false;\n\n\t/**\n\t * Defines the default color of the color palette, only valid CSS color values accepted\n\t *\n\t * **Note:** The default color should be a part of the ColorPalette colors`\n\t * @private\n\t * @since 1.0.0-rc.16\n\t */\n\t@property()\n\tdefaultColor?: string;\n\n\t/**\n\t * Defines the accessible name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the selected color, only valid CSS color values accepted\n\t * @private\n\t */\n\t@property()\n\t_selectedColor?: string;\n\n\t/**\n\t * Defines if the palette is in Popup or Embeded mode.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tpopupMode = false;\n\n\t/**\n\t * Defines if the palette is rendered on phone.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonPhone = false;\n\n\t/**\n\n\t * The showMoreColors template.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\tshowMoreColorsTemplate?: JsxTemplate;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tdialogOpen = false;\n\n\t/**\n\t * @private\n\t */\n\t@property()\n\tcolorPickerValue = \"rgba(255,255,255,1)\";\n\n\t/**\n\t * Defines the `ui5-color-palette-item` elements.\n\t * @public\n\t */\n\t@slot({\n\t\t\"default\": true,\n\t\ttype: HTMLElement,\n\t\tinvalidateOnChildChange: true,\n\t\tindividualSlots: true,\n\t})\n\tcolors!: DefaultSlot<IColorPaletteItem>;\n\n\t_itemNavigation: ItemNavigation;\n\t_itemNavigationRecentColors: ItemNavigation;\n\t_recentColors: Array<string>;\n\t_currentlySelected?: ColorPaletteItem;\n\t_shouldFocusRecentColors = false;\n\n\t@query(\".ui5-cp-default-color-button\")\n\t_defaultColorButton!: Button;\n\n\t@query(\".ui5-cp-more-colors\")\n\t_moreColorsButton!: Button;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => this.displayedColors,\n\t\t\trowSize: this.rowSize,\n\t\t\tbehavior: ItemNavigationBehavior.Cyclic,\n\t\t});\n\n\t\tthis._itemNavigationRecentColors = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => this.recentColorsElements,\n\t\t\trowSize: this.rowSize,\n\t\t\tbehavior: ItemNavigationBehavior.Cyclic,\n\t\t});\n\n\t\tthis._recentColors = [];\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._ensureSingleSelectionOrDeselectAll();\n\n\t\tconst selectedItem = this.selectedItem;\n\n\t\tif (selectedItem && !this.showRecentColors) {\n\t\t\tthis._selectedColor = selectedItem.value;\n\t\t}\n\n\t\tthis.displayedColors.forEach((item, index) => {\n\t\t\titem.index = index + 1;\n\t\t});\n\n\t\tif (this.showMoreColors) {\n\t\t\t// If the feature is preloaded (the user manually imported ColorPaletteMoreColors.js), the teplate is already available on the constructor\n\t\t\tif (ColorPalette.ColorPaletteMoreColorsTemplate) {\n\t\t\t\tthis.showMoreColorsTemplate = ColorPalette.ColorPaletteMoreColorsTemplate;\n\t\t\t// If feature is not preloaded, load the template dynamically\n\t\t\t} else {\n\t\t\t\timport(\"./features/ColorPaletteMoreColorsTemplate.js\").then(module => {\n\t\t\t\t\tthis.showMoreColorsTemplate = module.default;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tthis.onPhone = isPhone();\n\t}\n\n\tonAfterRendering() {\n\t\tif (this.hasRecentColors && this._shouldFocusRecentColors) {\n\t\t\tif (this.selectedItem) {\n\t\t\t\tthis.selectedItem.selected = false;\n\t\t\t}\n\t\t\tconst firstRecentColor = this.recentColorsElements[0];\n\t\t\tfirstRecentColor.selected = true;\n\t\t\tthis._currentlySelected = firstRecentColor;\n\t\t\tthis._currentlySelected.focus();\n\t\t\tthis._shouldFocusRecentColors = false;\n\t\t}\n\t}\n\n\tselectColor(item: ColorPaletteItem) {\n\t\tif (!item.value) {\n\t\t\treturn;\n\t\t}\n\n\t\titem.focus();\n\n\t\tif (this.displayedColors.includes(item)) {\n\t\t\tthis._itemNavigation.setCurrentItem(item);\n\t\t}\n\n\t\tthis._setColor(item.value);\n\t}\n\n\t_setColor(color: string) {\n\t\tthis._selectedColor = color;\n\n\t\tif (this._recentColors[0] !== this._selectedColor) {\n\t\t\tif (this._recentColors.includes(this._selectedColor)) {\n\t\t\t\tthis._recentColors.unshift(this._recentColors.splice(this._recentColors.indexOf(this._selectedColor), 1)[0]);\n\t\t\t} else {\n\t\t\t\tthis._addRecentColor(this._selectedColor);\n\t\t\t}\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"item-click\", {\n\t\t\tcolor: this._selectedColor,\n\t\t});\n\t}\n\n\tget effectiveColorItems() {\n\t\tlet colorItems: IColorPaletteItem[] = this.colors;\n\n\t\tif (this.popupMode) {\n\t\t\tcolorItems = this.getSlottedNodes<ColorPaletteItem>(\"colors\");\n\t\t}\n\n\t\treturn colorItems;\n\t}\n\n\t/**\n\t * Ensures that only one item is selected or only the last selected item remains active if more than one are explicitly set as 'selected'.\n\t * @private\n\t */\n\t_ensureSingleSelectionOrDeselectAll() {\n\t\tlet lastSelectedItem: IColorPaletteItem;\n\n\t\tthis.allColorsInPalette.forEach(item => {\n\t\t\tif (item.selected) {\n\t\t\t\tif (lastSelectedItem) {\n\t\t\t\t\tlastSelectedItem.selected = false;\n\t\t\t\t}\n\t\t\t\tlastSelectedItem = item;\n\t\t\t}\n\t\t});\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\tthis.handleSelection(e.target as ColorPaletteItem);\n\t}\n\n\t_onmousedown(e: MouseEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (!target.hasAttribute(\"ui5-color-palette-item\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst colorItem = target as ColorPaletteItem;\n\n\t\tif (this.displayedColors.includes(colorItem)) {\n\t\t\tthis._itemNavigation.setCurrentItem(colorItem);\n\t\t} else if (this.recentColorsElements.includes(colorItem)) {\n\t\t\tthis._itemNavigationRecentColors.setCurrentItem(colorItem);\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis.handleSelection(target);\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tif (isEnter(e)) {\n\t\t\tthis.handleSelection(target);\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\thandleSelection(target: ColorPaletteItem) {\n\t\tif (!target.hasAttribute(\"ui5-color-palette-item\") || !target.value) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._shouldFocusRecentColors = false;\n\n\t\tthis.selectColor(target);\n\n\t\t// Handle selection for items within the 'recentColorsElements'\n\t\tif (this.recentColorsElements.includes(target)) {\n\t\t\tthis.recentColorsElements[0].selected = true;\n\t\t\tthis.recentColorsElements[0].focus();\n\t\t\tthis._currentlySelected = this.recentColorsElements[0];\n\t\t} else {\n\t\t\tthis.allColorsInPalette.forEach(item => {\n\t\t\t\titem.selected = item === target;\n\t\t\t});\n\t\t\tthis._currentlySelected = target;\n\t\t}\n\n\t\tthis._ensureSingleSelectionOrDeselectAll();\n\t}\n\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\treturn this._itemNavigation._getCurrentItem();\n\t}\n\n\t_handleDefaultColorClick(e: KeyboardEvent) {\n\t\te.preventDefault();\n\t\tthis._onDefaultColorClick();\n\t}\n\n\t_onDefaultColorKeyUp(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis._handleDefaultColorClick(e);\n\t\t}\n\t}\n\n\t_onDefaultColorKeyDown(e: KeyboardEvent) {\n\t\tif (isTabNext(e) && this.popupMode) {\n\t\t\tthis._handleDefaultColorClick(e);\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._handleDefaultColorClick(e);\n\t\t}\n\n\t\tif (this._isNext(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstDisplayedColor();\n\t\t} else if (isLeft(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusLastRecentColor(),\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusLastDisplayedColor(),\n\t\t\t);\n\t\t} else if (isUp(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusLastRecentColor(),\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusLastSwatchOfLastFullRow(),\n\t\t\t\t() => this._focusLastDisplayedColor(),\n\t\t\t);\n\t\t} else if (isEnd(e)) {\n\t\t\t// Prevent Home/End keys from working in embedded mode - they only work in popup mode as per design\n\t\t\tif (this._shouldPreventHomeEnd(e)) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusLastDisplayedColor(),\n\t\t\t);\n\t\t}\n\t}\n\n\t_onMoreColorsKeyDown(e: KeyboardEvent) {\n\t\tif (isLeft(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusLastDisplayedColor();\n\t\t} else if (isUp(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusLastSwatchOfLastFullRow(),\n\t\t\t\t() => this._focusLastDisplayedColor(),\n\t\t\t);\n\t\t} else if (this._isNext(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusFirstRecentColor(),\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t\t() => this._focusFirstDisplayedColor(),\n\t\t\t);\n\t\t} else if (isHome(e)) {\n\t\t\t// Prevent Home/End keys from working in embedded mode - they only work in popup mode as per design\n\t\t\tif (this._shouldPreventHomeEnd(e)) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t\t() => this._focusFirstDisplayedColor(),\n\t\t\t);\n\t\t} else if (isEnd(e)) {\n\t\t\t// Prevent Home/End keys from working in embedded mode - they only work in popup mode as per design\n\t\t\tif (this._shouldPreventHomeEnd(e)) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// More Colors button is typically the last element, so END key stays here\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t}\n\t}\n\n\t_onColorContainerKeyDown(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tconst isLastSwatchInSingleRow = this._isSingleRow() && this._isLastSwatch(target, this.displayedColors);\n\n\t\t// Prevent Home/End keys from working in embedded mode - they only work in popup mode as per design\n\t\tif (this._shouldPreventHomeEnd(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._isUpOrDownNavigatableColorPaletteItem(e)) {\n\t\t\tthis._currentlySelected = undefined;\n\t\t}\n\n\t\tif (isTabNext(e) && this.popupMode) {\n\t\t\te.preventDefault();\n\t\t\tthis.selectColor(target);\n\t\t}\n\n\t\tif (this._isPrevious(e) && this._isFirstSwatch(target, this.displayedColors)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t\t() => this._focusLastRecentColor(),\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusLastSwatchOfLastFullRow(),\n\t\t\t\t() => this._focusLastDisplayedColor(),\n\t\t\t);\n\t\t} else if ((isRight(e) && this._isLastSwatch(target, this.displayedColors))\n\t\t\t|| (isDown(e) && (this._isLastSwatchOfLastFullRow(target) || isLastSwatchInSingleRow))\n\t\t) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusFirstRecentColor(),\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t\t() => this._focusFirstDisplayedColor(),\n\t\t\t);\n\t\t} else if (isHome(e) && this._isFirstSwatchInRow(target)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusFirstDisplayedColor(),\n\t\t\t);\n\t\t} else if (isEnd(e) && this._isLastSwatchInRow(target)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t\t() => this._focusLastDisplayedColor(),\n\t\t\t);\n\t\t} else if (isEnd(e) && this._isSwatchInLastRow(target)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusLastDisplayedColor();\n\t\t}\n\t}\n\n\t_onRecentColorsContainerKeyDown(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\n\t\t// Prevent Home/End keys from working in embedded mode - they only work in popup mode as per design\n\t\tif (this._shouldPreventHomeEnd(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._isUpOrDownNavigatableColorPaletteItem(e)) {\n\t\t\tthis._currentlySelected = undefined;\n\t\t}\n\n\t\tif (this._isNext(e) && this._isLastSwatch(target, this.recentColorsElements)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusFirstDisplayedColor(),\n\t\t\t);\n\t\t} else if (this._isPrevious(e) && this._isFirstSwatch(target, this.recentColorsElements)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusLastSwatchOfLastFullRow(),\n\t\t\t\t() => this._focusLastDisplayedColor(),\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t);\n\t\t} else if (isEnd(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusLastRecentColor();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the keyboard event is up/down navigation on a displayed color palette item\n\t * @private\n\t */\n\t_isUpOrDownNavigatableColorPaletteItem(e: KeyboardEvent): boolean {\n\t\tif (!(isUp(e) || isDown(e)) || !this._currentlySelected) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this.displayedColors.includes(this._currentlySelected)\n\t\t\t|| this.recentColorsElements.includes(this._currentlySelected);\n\t}\n\n\t_isPrevious(e: KeyboardEvent): boolean {\n\t\treturn isUp(e) || isLeft(e);\n\t}\n\n\t_isNext(e: KeyboardEvent): boolean {\n\t\treturn isDown(e) || isRight(e);\n\t}\n\n\t_isFirstSwatch(target: ColorPaletteItem, swatches: Array<IColorPaletteItem>): boolean {\n\t\treturn swatches && Boolean(swatches.length) && swatches[0] === target;\n\t}\n\n\t_isLastSwatch(target: ColorPaletteItem, swatches: Array<IColorPaletteItem>): boolean {\n\t\treturn swatches && Boolean(swatches.length) && swatches[swatches.length - 1] === target;\n\t}\n\n\t/**\n\t * Checks if the target swatch is the first swatch in its row.\n\t * @private\n\t */\n\t_isFirstSwatchInRow(target: ColorPaletteItem): boolean {\n\t\tconst index = this.displayedColors.indexOf(target);\n\t\treturn index >= 0 ? index % this.rowSize === 0 : false;\n\t}\n\n\t/**\n\t * Checks if the target swatch is the last swatch in its row.\n\t * @private\n\t */\n\t_isLastSwatchInRow(target: ColorPaletteItem): boolean {\n\t\tconst index = this.displayedColors.indexOf(target);\n\t\treturn index >= 0 ? (index + 1) % this.rowSize === 0 || index === this.displayedColors.length - 1 : false;\n\t}\n\n\t/**\n\t * Checks if the given color swatch is the last swatch of the last full row.\n\t *\n\t * Example 1: 12 colors with rowSize 5\n\t * Row 1: [0, 1, 2, 3, 4] ← Complete row\n\t * Row 2: [5, 6, 7, 8, 9] ← Complete row (last complete row)\n\t * Row 3: [10, 11] ← Incomplete row\n\t *\n\t * @param target The color swatch to check.\n\t * @returns True if the swatch is the last of the last full row, false otherwise.\n\t */\n\t_isLastSwatchOfLastFullRow(target: ColorPaletteItem): boolean {\n\t\tconst index = this.displayedColors.indexOf(target);\n\t\tconst rowSize = this.rowSize;\n\t\tconst total = this.displayedColors.length;\n\t\tconst lastCompleteRowEndIndex = this._getLastCompleteRowEndIndex(total, rowSize);\n\t\treturn index >= 0 && index === lastCompleteRowEndIndex;\n\t}\n\n\t_isSwatchInLastRow(target: ColorPaletteItem): boolean {\n\t\tconst index = this.displayedColors.indexOf(target);\n\t\tconst lastRowSwatchesCount = this.displayedColors.length % this.rowSize;\n\t\treturn index >= 0 && index >= this.displayedColors.length - lastRowSwatchesCount;\n\t}\n\n\t/**\n\t * Checks if HOME/END navigation should be prevented in embedded mode.\n\t * In embedded mode, HOME/END keys are blocked as they only work in popup mode per design.\n\t * @private\n\t * @param e The keyboard event to check\n\t * @returns True if the event should be prevented, false otherwise\n\t */\n\t_shouldPreventHomeEnd(e: KeyboardEvent): boolean {\n\t\treturn !this.popupMode && (isHome(e) || isEnd(e));\n\t}\n\n\t/**\n\t * Helper to check if all displayed colors fit in a single row\n\t * @private\n\t */\n\t_isSingleRow(): boolean {\n\t\treturn this.displayedColors.length <= this.rowSize;\n\t}\n\n\t/**\n\t * Helper to focus the first available element from a list of candidates.\n\t *\n\t * This method implements a fallback chain pattern for keyboard navigation in the color palette.\n\t * It attempts to execute focus actions in priority order, stopping at the first successful one.\n\t *\n\t * For example when navigating left from the default color button, try these options in order:\n\t * this._focusFirstAvailable(\n\t * () => this._focusLastRecentColor(), // 1st choice: focus last recent color if available\n\t * () => this._focusMoreColors(), // 2nd choice: focus \"More Colors\" button if available\n\t * () => this._focusLastDisplayedColor() // 3rd choice: focus last color in the main palette\n\t * );\n\t *\n\t * @private\n\t * @param candidates - Functions that attempt to focus an element. Each function should return true if focus was successful, false otherwise.\n\t * @returns True if any candidate successfully focused an element, false if all failed.\n\t */\n\t_focusFirstAvailable(...candidates: Array<() => boolean>): boolean {\n\t\treturn candidates.some(focusAction => focusAction());\n\t}\n\n\t/**\n\t * Helper to focus default color button if available\n\t * @private\n\t */\n\t_focusDefaultColor(): boolean {\n\t\tif (this.showDefaultColor && this._defaultColorButton) {\n\t\t\tthis._defaultColorButton.focus();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Helper to focus more colors button if available\n\t * @private\n\t */\n\t_focusMoreColors(): boolean {\n\t\tif (this.showMoreColors && this._moreColorsButton) {\n\t\t\tthis._moreColorsButton.focus();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Helper to focus first displayed color if available\n\t * @private\n\t */\n\t_focusFirstDisplayedColor(): boolean {\n\t\tif (this.displayedColors.length) {\n\t\t\tthis.focusColorElement(this.displayedColors[0], this._itemNavigation);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Helper to focus last displayed color if available\n\t * @private\n\t */\n\t_focusLastDisplayedColor(): boolean {\n\t\tif (this.displayedColors.length) {\n\t\t\tthis.focusColorElement(this.displayedColors[this.displayedColors.length - 1], this._itemNavigation);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Helper to focus last swatch of last full row if available\n\t * @private\n\t */\n\t_focusLastSwatchOfLastFullRow(): boolean {\n\t\tconst rowSize = this.rowSize;\n\t\tconst total = this.displayedColors.length;\n\t\tconst lastCompleteRowEndIndex = this._getLastCompleteRowEndIndex(total, rowSize);\n\n\t\t// Return false if there are no full rows (less than one complete row)\n\t\tif (lastCompleteRowEndIndex < 0 || !this.displayedColors[lastCompleteRowEndIndex]) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.focusColorElement(this.displayedColors[lastCompleteRowEndIndex], this._itemNavigation);\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns the index of the last swatch in the last complete row.\n\t * @private\n\t */\n\t_getLastCompleteRowEndIndex(total: number, rowSize: number): number {\n\t\treturn Math.floor(total / rowSize) * rowSize - 1;\n\t}\n\n\t/**\n\t * Helper to focus first recent color if available\n\t * @private\n\t */\n\t_focusFirstRecentColor(): boolean {\n\t\tif (this.hasRecentColors && this.recentColorsElements.length) {\n\t\t\tthis.focusColorElement(this.recentColorsElements[0], this._itemNavigationRecentColors);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Helper to focus last recent color if available\n\t * @private\n\t */\n\t_focusLastRecentColor(): boolean {\n\t\tif (this.hasRecentColors && this.recentColorsElements.length) {\n\t\t\tthis.focusColorElement(this.recentColorsElements[this.recentColorsElements.length - 1], this._itemNavigationRecentColors);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tfocusColorElement(element: ColorPaletteNavigationItem, itemNavigation: ItemNavigation) {\n\t\titemNavigation.setCurrentItem(element);\n\t\titemNavigation._focusCurrentItem();\n\t}\n\n\tonColorPickerChange(e: Event) {\n\t\tthis.colorPickerValue = (e.target as ColorPicker).value;\n\t}\n\n\t_chooseCustomColor() {\n\t\tthis._setColor(this.colorPickerValue);\n\t\tthis._closeDialog();\n\t\tthis._shouldFocusRecentColors = true;\n\t}\n\n\t_addRecentColor(color: string) {\n\t\tif (this.showRecentColors && !this._recentColors.includes(color)) {\n\t\t\tthis._recentColors.unshift(color);\n\t\t\tif (this._recentColors.length > this.rowSize) {\n\t\t\t\tthis._recentColors.pop();\n\t\t\t}\n\t\t}\n\t}\n\n\t_closeDialog() {\n\t\tthis.dialogOpen = false;\n\t}\n\n\t_openMoreColorsDialog() {\n\t\tconst value = this._currentlySelected ? this._currentlySelected.value : undefined;\n\n\t\tif (value) {\n\t\t\tthis.colorPickerValue = value;\n\t\t}\n\t\tthis.dialogOpen = true;\n\t}\n\n\t_onDefaultColorClick() {\n\t\tif (this.defaultColor) {\n\t\t\tthis._setColor(this.defaultColor);\n\t\t\tthis._addRecentColor(this.defaultColor);\n\n\t\t\tif (this.selectedItem) {\n\t\t\t\tthis.selectedItem.selected = false;\n\t\t\t\tthis._currentlySelected = undefined;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns the selected item.\n\t */\n\tget selectedItem() {\n\t\treturn this.allColorsInPalette.find(item => item.selected);\n\t}\n\n\tget allColorsInPalette() {\n\t\treturn [...this.effectiveColorItems, ...this.recentColorsElements];\n\t}\n\n\tget colorPaletteDialogTitle() {\n\t\treturn ColorPalette.i18nBundle.getText(COLOR_PALETTE_DIALOG_TITLE);\n\t}\n\n\tget colorPaletteDialogOKButton() {\n\t\treturn ColorPalette.i18nBundle.getText(COLOR_PALETTE_DIALOG_OK_BUTTON);\n\t}\n\n\tget colorPaletteCancelButton() {\n\t\treturn ColorPalette.i18nBundle.getText(COLOR_PALETTE_DIALOG_CANCEL_BUTTON);\n\t}\n\n\t/**\n\t * Returns the selected color.\n\t */\n\tget selectedColor() {\n\t\treturn this._selectedColor;\n\t}\n\n\tget displayedColors(): Array<IColorPaletteItem> {\n\t\tconst colors = this.getSlottedNodes<IColorPaletteItem>(\"colors\");\n\t\treturn colors.filter(item => item.value).slice(0, 15);\n\t}\n\n\tget colorContainerLabel() {\n\t\tconst effectiveLabel = getEffectiveAriaLabelText(this);\n\t\treturn effectiveLabel\n\t\t\t? `${ColorPalette.i18nBundle.getText(COLORPALETTE_CONTAINER_LABEL)} ${effectiveLabel}`\n\t\t\t: ColorPalette.i18nBundle.getText(COLORPALETTE_CONTAINER_LABEL);\n\t}\n\n\tget colorPaletteMoreColorsText() {\n\t\treturn ColorPalette.i18nBundle.getText(COLOR_PALETTE_MORE_COLORS_TEXT);\n\t}\n\n\tget colorPaletteDefaultColorText() {\n\t\treturn ColorPalette.i18nBundle.getText(COLOR_PALETTE_DEFAULT_COLOR_TEXT);\n\t}\n\n\tget rowSize() {\n\t\treturn 5;\n\t}\n\n\tget hasRecentColors() {\n\t\treturn this.showRecentColors && this.recentColors[0];\n\t}\n\n\tget recentColors() {\n\t\tif (this._recentColors.length > this.rowSize) {\n\t\t\tthis._recentColors = this._recentColors.slice(0, this.rowSize);\n\t\t}\n\n\t\twhile (this._recentColors.length < this.rowSize) {\n\t\t\tthis._recentColors.push(\"\");\n\t\t}\n\n\t\treturn this._recentColors;\n\t}\n\n\tget recentColorsElements(): Array<ColorPaletteItem> {\n\t\tconst domRef = this.getDomRef();\n\t\tif (domRef) {\n\t\t\treturn Array.from(domRef.querySelectorAll<ColorPaletteItem>(\".ui5-cp-recent-colors-wrapper [ui5-color-palette-item]\")).filter(x => x.value !== \"\");\n\t\t}\n\n\t\treturn [];\n\t}\n\n\tget classes() {\n\t\t// Remove after deleting the hbs template, it's added in the jsx template\n\t\treturn {\n\t\t\tcolorPaletteRoot: {\n\t\t\t\t\"ui5-cp-root\": true,\n\t\t\t\t\"ui5-cp-root-phone\": isPhone(),\n\t\t\t},\n\t\t};\n\t}\n\n\tstatic ColorPaletteMoreColorsTemplate?: JsxTemplate;\n}\n\nColorPalette.define();\n\nexport default ColorPalette;\nexport type {\n\tColorPaletteItemClickEventDetail,\n\tIColorPaletteItem,\n};\n"]}
1
+ {"version":3,"file":"ColorPalette.js","sourceRoot":"","sources":["../src/ColorPalette.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,kDAAkD,CAAC;AACrE,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,IAAI,MAAM,iDAAiD,CAAC;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C,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDACT;AAMnB;IADC,QAAQ,EAAE;sDAC8B;AAYzC;IANC,IAAI,CAAC;QACL,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,WAAW;QACjB,uBAAuB,EAAE,IAAI;QAC7B,eAAe,EAAE,IAAI;KACrB,CAAC;4CACqC;AASvC;IADC,KAAK,CAAC,8BAA8B,CAAC;yDACT;AAG7B;IADC,KAAK,CAAC,qBAAqB,CAAC;uDACF;AAGpB;IADN,IAAI,CAAC,oBAAoB,CAAC;sCACG;AA7HzB,YAAY;IAdjB,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,oBAAoB;QAC9B,MAAM,EAAE,CAAC,eAAe,EAAE,qBAAqB,CAAC;KAChD,CAAC;IAEF;;;;;OAKG;;IACF,KAAK,CAAC,YAAY,CAAC;GACd,YAAY,CAg2BjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { 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 query from \"@ui5/webcomponents-base/dist/decorators/query.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport ItemNavigationBehavior from \"@ui5/webcomponents-base/dist/types/ItemNavigationBehavior.js\";\nimport { isPhone } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { JsxTemplate } from \"@ui5/webcomponents-base/dist/index.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisDown,\n\tisRight,\n\tisUp,\n\tisLeft,\n\tisTabNext,\n\tisHome,\n\tisEnd,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport ColorPaletteTemplate from \"./ColorPaletteTemplate.js\";\nimport type ColorPaletteItem from \"./ColorPaletteItem.js\";\nimport type Button from \"./Button.js\";\nimport type ColorPicker from \"./ColorPicker.js\";\nimport \"./ColorPaletteItem.js\";\n\nimport {\n\tCOLORPALETTE_CONTAINER_LABEL,\n\tCOLOR_PALETTE_MORE_COLORS_TEXT,\n\tCOLOR_PALETTE_DEFAULT_COLOR_TEXT,\n\tCOLOR_PALETTE_DIALOG_CANCEL_BUTTON,\n\tCOLOR_PALETTE_DIALOG_OK_BUTTON,\n\tCOLOR_PALETTE_DIALOG_TITLE,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport ColorPaletteCss from \"./generated/themes/ColorPalette.css.js\";\nimport ColorPaletteDialogCss from \"./generated/themes/ColorPaletteDialog.css.js\";\n\n/**\n * Interface for components that may be used inside a `ui5-color-palette` or `ui5-color-palette-popover`\n * @public\n */\ninterface IColorPaletteItem extends UI5Element, ITabbable {\n\tvalue?: string,\n\tindex?: number,\n\tselected?: boolean,\n}\n\ntype ColorPaletteNavigationItem = ColorPaletteItem | Button;\n\ntype ColorPaletteItemClickEventDetail = {\n\tcolor: string,\n}\n\n/**\n * @class\n *\n * ### Overview\n * The `ui5-color-palette` provides the users with a range of predefined colors. The colors are fixed and do not change with the theme.\n *\n * ### Usage\n *\n * The `ui5-color-palette` is meant for users that need to select a color from a predefined set.\n * To define the colors, use the `ui5-color-palette-item` component inside the default slot of the `ui5-color-palette`.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/ColorPalette.js\";`\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.12\n * @public\n */\n@customElement({\n\ttag: \"ui5-color-palette\",\n\trenderer: jsxRenderer,\n\ttemplate: ColorPaletteTemplate,\n\tstyles: [ColorPaletteCss, ColorPaletteDialogCss],\n})\n\n/**\n * Fired when the user selects a color.\n * @public\n * @since 1.0.0-rc.15\n * @param {string} color the selected color\n */\n@event(\"item-click\")\nclass ColorPalette extends UI5Element {\n\teventDetails!: {\n\t\t\"item-click\": ColorPaletteItemClickEventDetail,\n\t}\n\n\t/**\n\t * Defines whether the user can see the last used colors in the bottom of the component\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\tshowRecentColors = false;\n\n\t/**\n\t * Defines whether the user can choose a custom color from a color picker\n\t *\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\tshowMoreColors = false;\n\n\t/**\n\t * Defines whether the user can choose the default color from a button.\n\t * @default false\n\t * @private\n\t * @since 1.0.0-rc.16\n\t */\n\t@property({ type: Boolean })\n\tshowDefaultColor = false;\n\n\t/**\n\t * Defines the default color of the color palette, only valid CSS color values accepted\n\t *\n\t * **Note:** The default color should be a part of the ColorPalette colors`\n\t * @private\n\t * @since 1.0.0-rc.16\n\t */\n\t@property()\n\tdefaultColor?: string;\n\n\t/**\n\t * Defines the accessible name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the selected color, only valid CSS color values accepted\n\t * @private\n\t */\n\t@property()\n\t_selectedColor?: string;\n\n\t/**\n\t * Defines if the palette is in Popup or Embeded mode.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tpopupMode = false;\n\n\t/**\n\t * Defines if the palette is rendered on phone.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonPhone = false;\n\n\t/**\n\n\t * The showMoreColors template.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\tshowMoreColorsTemplate?: JsxTemplate;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tdialogOpen = false;\n\n\t/**\n\t * @private\n\t */\n\t@property()\n\tcolorPickerValue = \"rgba(255,255,255,1)\";\n\n\t/**\n\t * Defines the `ui5-color-palette-item` elements.\n\t * @public\n\t */\n\t@slot({\n\t\t\"default\": true,\n\t\ttype: HTMLElement,\n\t\tinvalidateOnChildChange: true,\n\t\tindividualSlots: true,\n\t})\n\tcolors!: DefaultSlot<ColorPaletteItem>;\n\n\t_itemNavigation: ItemNavigation;\n\t_itemNavigationRecentColors: ItemNavigation;\n\t_recentColors: Array<string>;\n\t_currentlySelected?: ColorPaletteItem;\n\t_shouldFocusRecentColors = false;\n\n\t@query(\".ui5-cp-default-color-button\")\n\t_defaultColorButton!: Button;\n\n\t@query(\".ui5-cp-more-colors\")\n\t_moreColorsButton!: Button;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => this.displayedColors,\n\t\t\trowSize: this.rowSize,\n\t\t\tbehavior: ItemNavigationBehavior.Cyclic,\n\t\t});\n\n\t\tthis._itemNavigationRecentColors = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => this.recentColorsElements,\n\t\t\trowSize: this.rowSize,\n\t\t\tbehavior: ItemNavigationBehavior.Cyclic,\n\t\t});\n\n\t\tthis._recentColors = [];\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._ensureSingleSelectionOrDeselectAll();\n\n\t\tconst selectedItem = this.selectedItem;\n\n\t\tif (selectedItem && !this.showRecentColors) {\n\t\t\tthis._selectedColor = selectedItem.value;\n\t\t}\n\n\t\tthis.displayedColors.forEach((item, index) => {\n\t\t\titem.index = index + 1;\n\t\t});\n\n\t\tif (this.showMoreColors) {\n\t\t\t// If the feature is preloaded (the user manually imported ColorPaletteMoreColors.js), the teplate is already available on the constructor\n\t\t\tif (ColorPalette.ColorPaletteMoreColorsTemplate) {\n\t\t\t\tthis.showMoreColorsTemplate = ColorPalette.ColorPaletteMoreColorsTemplate;\n\t\t\t// If feature is not preloaded, load the template dynamically\n\t\t\t} else {\n\t\t\t\timport(\"./features/ColorPaletteMoreColorsTemplate.js\").then(module => {\n\t\t\t\t\tthis.showMoreColorsTemplate = module.default;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tthis.onPhone = isPhone();\n\t}\n\n\tonAfterRendering() {\n\t\tif (this.hasRecentColors && this._shouldFocusRecentColors) {\n\t\t\tif (this.selectedItem) {\n\t\t\t\tthis.selectedItem.selected = false;\n\t\t\t}\n\t\t\tconst firstRecentColor = this.recentColorsElements[0];\n\t\t\tfirstRecentColor.selected = true;\n\t\t\tthis._currentlySelected = firstRecentColor;\n\t\t\tthis._currentlySelected.focus();\n\t\t\tthis._shouldFocusRecentColors = false;\n\t\t}\n\t}\n\n\tselectColor(item: ColorPaletteItem) {\n\t\tif (!item.value) {\n\t\t\treturn;\n\t\t}\n\n\t\titem.focus();\n\n\t\tif (this.displayedColors.includes(item)) {\n\t\t\tthis._itemNavigation.setCurrentItem(item);\n\t\t}\n\n\t\tthis._setColor(item.value);\n\t}\n\n\t_setColor(color: string) {\n\t\tthis._selectedColor = color;\n\n\t\tif (this._recentColors[0] !== this._selectedColor) {\n\t\t\tif (this._recentColors.includes(this._selectedColor)) {\n\t\t\t\tthis._recentColors.unshift(this._recentColors.splice(this._recentColors.indexOf(this._selectedColor), 1)[0]);\n\t\t\t} else {\n\t\t\t\tthis._addRecentColor(this._selectedColor);\n\t\t\t}\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"item-click\", {\n\t\t\tcolor: this._selectedColor,\n\t\t});\n\t}\n\n\tget effectiveColorItems(): ColorPaletteItem[] {\n\t\tif (this.popupMode) {\n\t\t\treturn this.getSlottedNodes<ColorPaletteItem>(\"colors\");\n\t\t}\n\t\treturn this.colors;\n\t}\n\n\t/**\n\t * Ensures that only one item is selected or only the last selected item remains active if more than one are explicitly set as 'selected'.\n\t * @private\n\t */\n\t_ensureSingleSelectionOrDeselectAll() {\n\t\tlet lastSelectedItem: ColorPaletteItem | undefined;\n\n\t\tthis.allColorsInPalette.forEach(item => {\n\t\t\tif (item.selected) {\n\t\t\t\tif (lastSelectedItem) {\n\t\t\t\t\tlastSelectedItem.selected = false;\n\t\t\t\t}\n\t\t\t\tlastSelectedItem = item;\n\t\t\t}\n\t\t});\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\tif (e.defaultPrevented) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.handleSelection(e.target as ColorPaletteItem);\n\t}\n\n\t_onmousedown(e: MouseEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (!target.hasAttribute(\"ui5-color-palette-item\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst colorItem = target as ColorPaletteItem;\n\n\t\tif (this.displayedColors.includes(colorItem)) {\n\t\t\tthis._itemNavigation.setCurrentItem(colorItem);\n\t\t} else if (this.recentColorsElements.includes(colorItem)) {\n\t\t\tthis._itemNavigationRecentColors.setCurrentItem(colorItem);\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis.handleSelection(target);\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tif (isEnter(e)) {\n\t\t\tthis.handleSelection(target);\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\thandleSelection(target: ColorPaletteItem) {\n\t\tif (!target.hasAttribute(\"ui5-color-palette-item\") || !target.value) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._shouldFocusRecentColors = false;\n\n\t\tthis.selectColor(target);\n\n\t\t// Handle selection for items within the 'recentColorsElements'\n\t\tif (this.recentColorsElements.includes(target)) {\n\t\t\tthis.recentColorsElements[0].selected = true;\n\t\t\tthis.recentColorsElements[0].focus();\n\t\t\tthis._currentlySelected = this.recentColorsElements[0];\n\t\t} else {\n\t\t\tthis.allColorsInPalette.forEach(item => {\n\t\t\t\titem.selected = item === target;\n\t\t\t});\n\t\t\tthis._currentlySelected = target;\n\t\t}\n\n\t\tthis._ensureSingleSelectionOrDeselectAll();\n\t}\n\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\treturn this._itemNavigation._getCurrentItem();\n\t}\n\n\t_handleDefaultColorClick(e: KeyboardEvent) {\n\t\te.preventDefault();\n\t\tthis._onDefaultColorClick();\n\t}\n\n\t_onDefaultColorKeyUp(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis._handleDefaultColorClick(e);\n\t\t}\n\t}\n\n\t_onDefaultColorKeyDown(e: KeyboardEvent) {\n\t\tif (isTabNext(e) && this.popupMode) {\n\t\t\tthis._handleDefaultColorClick(e);\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._handleDefaultColorClick(e);\n\t\t}\n\n\t\tif (this._isNext(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstDisplayedColor();\n\t\t} else if (isLeft(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusLastRecentColor(),\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusLastDisplayedColor(),\n\t\t\t);\n\t\t} else if (isUp(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusLastRecentColor(),\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusLastSwatchOfLastFullRow(),\n\t\t\t\t() => this._focusLastDisplayedColor(),\n\t\t\t);\n\t\t} else if (isEnd(e)) {\n\t\t\t// Prevent Home/End keys from working in embedded mode - they only work in popup mode as per design\n\t\t\tif (this._shouldPreventHomeEnd(e)) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusLastDisplayedColor(),\n\t\t\t);\n\t\t}\n\t}\n\n\t_onMoreColorsKeyDown(e: KeyboardEvent) {\n\t\tif (isLeft(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusLastDisplayedColor();\n\t\t} else if (isUp(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusLastSwatchOfLastFullRow(),\n\t\t\t\t() => this._focusLastDisplayedColor(),\n\t\t\t);\n\t\t} else if (this._isNext(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusFirstRecentColor(),\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t\t() => this._focusFirstDisplayedColor(),\n\t\t\t);\n\t\t} else if (isHome(e)) {\n\t\t\t// Prevent Home/End keys from working in embedded mode - they only work in popup mode as per design\n\t\t\tif (this._shouldPreventHomeEnd(e)) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t\t() => this._focusFirstDisplayedColor(),\n\t\t\t);\n\t\t} else if (isEnd(e)) {\n\t\t\t// Prevent Home/End keys from working in embedded mode - they only work in popup mode as per design\n\t\t\tif (this._shouldPreventHomeEnd(e)) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// More Colors button is typically the last element, so END key stays here\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t}\n\t}\n\n\t_onColorContainerKeyDown(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tconst isLastSwatchInSingleRow = this._isSingleRow() && this._isLastSwatch(target, this.displayedColors);\n\n\t\t// Prevent Home/End keys from working in embedded mode - they only work in popup mode as per design\n\t\tif (this._shouldPreventHomeEnd(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._isUpOrDownNavigatableColorPaletteItem(e)) {\n\t\t\tthis._currentlySelected = undefined;\n\t\t}\n\n\t\tif (isTabNext(e) && this.popupMode) {\n\t\t\te.preventDefault();\n\t\t\tthis.selectColor(target);\n\t\t}\n\n\t\tif (this._isPrevious(e) && this._isFirstSwatch(target, this.displayedColors)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t\t() => this._focusLastRecentColor(),\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusLastSwatchOfLastFullRow(),\n\t\t\t\t() => this._focusLastDisplayedColor(),\n\t\t\t);\n\t\t} else if ((isRight(e) && this._isLastSwatch(target, this.displayedColors))\n\t\t\t|| (isDown(e) && (this._isLastSwatchOfLastFullRow(target) || isLastSwatchInSingleRow))\n\t\t) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusFirstRecentColor(),\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t\t() => this._focusFirstDisplayedColor(),\n\t\t\t);\n\t\t} else if (isHome(e) && this._isFirstSwatchInRow(target)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusFirstDisplayedColor(),\n\t\t\t);\n\t\t} else if (isEnd(e) && this._isLastSwatchInRow(target)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t\t() => this._focusLastDisplayedColor(),\n\t\t\t);\n\t\t} else if (isEnd(e) && this._isSwatchInLastRow(target)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusLastDisplayedColor();\n\t\t}\n\t}\n\n\t_onRecentColorsContainerKeyDown(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\n\t\t// Prevent Home/End keys from working in embedded mode - they only work in popup mode as per design\n\t\tif (this._shouldPreventHomeEnd(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._isUpOrDownNavigatableColorPaletteItem(e)) {\n\t\t\tthis._currentlySelected = undefined;\n\t\t}\n\n\t\tif (this._isNext(e) && this._isLastSwatch(target, this.recentColorsElements)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusFirstDisplayedColor(),\n\t\t\t);\n\t\t} else if (this._isPrevious(e) && this._isFirstSwatch(target, this.recentColorsElements)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusFirstAvailable(\n\t\t\t\t() => this._focusMoreColors(),\n\t\t\t\t() => this._focusLastSwatchOfLastFullRow(),\n\t\t\t\t() => this._focusLastDisplayedColor(),\n\t\t\t\t() => this._focusDefaultColor(),\n\t\t\t);\n\t\t} else if (isEnd(e)) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tthis._focusLastRecentColor();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the keyboard event is up/down navigation on a displayed color palette item\n\t * @private\n\t */\n\t_isUpOrDownNavigatableColorPaletteItem(e: KeyboardEvent): boolean {\n\t\tif (!(isUp(e) || isDown(e)) || !this._currentlySelected) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this.displayedColors.includes(this._currentlySelected)\n\t\t\t|| this.recentColorsElements.includes(this._currentlySelected);\n\t}\n\n\t_isPrevious(e: KeyboardEvent): boolean {\n\t\treturn isUp(e) || isLeft(e);\n\t}\n\n\t_isNext(e: KeyboardEvent): boolean {\n\t\treturn isDown(e) || isRight(e);\n\t}\n\n\t_isFirstSwatch(target: ColorPaletteItem, swatches: Array<ColorPaletteItem>): boolean {\n\t\treturn swatches && Boolean(swatches.length) && swatches[0] === (target);\n\t}\n\n\t_isLastSwatch(target: ColorPaletteItem, swatches: Array<ColorPaletteItem>): boolean {\n\t\treturn swatches && Boolean(swatches.length) && swatches[swatches.length - 1] === (target);\n\t}\n\n\t/**\n\t * Checks if the target swatch is the first swatch in its row.\n\t * @private\n\t */\n\t_isFirstSwatchInRow(target: ColorPaletteItem): boolean {\n\t\tconst index = this.displayedColors.indexOf(target);\n\t\treturn index >= 0 ? index % this.rowSize === 0 : false;\n\t}\n\n\t/**\n\t * Checks if the target swatch is the last swatch in its row.\n\t * @private\n\t */\n\t_isLastSwatchInRow(target: ColorPaletteItem): boolean {\n\t\tconst index = this.displayedColors.indexOf(target);\n\t\treturn index >= 0 ? (index + 1) % this.rowSize === 0 || index === this.displayedColors.length - 1 : false;\n\t}\n\n\t/**\n\t * Checks if the given color swatch is the last swatch of the last full row.\n\t *\n\t * Example 1: 12 colors with rowSize 5\n\t * Row 1: [0, 1, 2, 3, 4] ← Complete row\n\t * Row 2: [5, 6, 7, 8, 9] ← Complete row (last complete row)\n\t * Row 3: [10, 11] ← Incomplete row\n\t *\n\t * @param target The color swatch to check.\n\t * @returns True if the swatch is the last of the last full row, false otherwise.\n\t */\n\t_isLastSwatchOfLastFullRow(target: ColorPaletteItem): boolean {\n\t\tconst index = this.displayedColors.indexOf(target);\n\t\tconst rowSize = this.rowSize;\n\t\tconst total = this.displayedColors.length;\n\t\tconst lastCompleteRowEndIndex = this._getLastCompleteRowEndIndex(total, rowSize);\n\t\treturn index >= 0 && index === lastCompleteRowEndIndex;\n\t}\n\n\t_isSwatchInLastRow(target: ColorPaletteItem): boolean {\n\t\tconst index = this.displayedColors.indexOf(target);\n\t\tconst lastRowSwatchesCount = this.displayedColors.length % this.rowSize;\n\t\treturn index >= 0 && index >= this.displayedColors.length - lastRowSwatchesCount;\n\t}\n\n\t/**\n\t * Checks if HOME/END navigation should be prevented in embedded mode.\n\t * In embedded mode, HOME/END keys are blocked as they only work in popup mode per design.\n\t * @private\n\t * @param e The keyboard event to check\n\t * @returns True if the event should be prevented, false otherwise\n\t */\n\t_shouldPreventHomeEnd(e: KeyboardEvent): boolean {\n\t\treturn !this.popupMode && (isHome(e) || isEnd(e));\n\t}\n\n\t/**\n\t * Helper to check if all displayed colors fit in a single row\n\t * @private\n\t */\n\t_isSingleRow(): boolean {\n\t\treturn this.displayedColors.length <= this.rowSize;\n\t}\n\n\t/**\n\t * Helper to focus the first available element from a list of candidates.\n\t *\n\t * This method implements a fallback chain pattern for keyboard navigation in the color palette.\n\t * It attempts to execute focus actions in priority order, stopping at the first successful one.\n\t *\n\t * For example when navigating left from the default color button, try these options in order:\n\t * this._focusFirstAvailable(\n\t * () => this._focusLastRecentColor(), // 1st choice: focus last recent color if available\n\t * () => this._focusMoreColors(), // 2nd choice: focus \"More Colors\" button if available\n\t * () => this._focusLastDisplayedColor() // 3rd choice: focus last color in the main palette\n\t * );\n\t *\n\t * @private\n\t * @param candidates - Functions that attempt to focus an element. Each function should return true if focus was successful, false otherwise.\n\t * @returns True if any candidate successfully focused an element, false if all failed.\n\t */\n\t_focusFirstAvailable(...candidates: Array<() => boolean>): boolean {\n\t\treturn candidates.some(focusAction => focusAction());\n\t}\n\n\t/**\n\t * Helper to focus default color button if available\n\t * @private\n\t */\n\t_focusDefaultColor(): boolean {\n\t\tif (this.showDefaultColor && this._defaultColorButton) {\n\t\t\tthis._defaultColorButton.focus();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Helper to focus more colors button if available\n\t * @private\n\t */\n\t_focusMoreColors(): boolean {\n\t\tif (this.showMoreColors && this._moreColorsButton) {\n\t\t\tthis._moreColorsButton.focus();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Helper to focus first displayed color if available\n\t * @private\n\t */\n\t_focusFirstDisplayedColor(): boolean {\n\t\tif (this.displayedColors.length) {\n\t\t\tthis.focusColorElement(this.displayedColors[0], this._itemNavigation);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Helper to focus last displayed color if available\n\t * @private\n\t */\n\t_focusLastDisplayedColor(): boolean {\n\t\tif (this.displayedColors.length) {\n\t\t\tthis.focusColorElement(this.displayedColors[this.displayedColors.length - 1], this._itemNavigation);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Helper to focus last swatch of last full row if available\n\t * @private\n\t */\n\t_focusLastSwatchOfLastFullRow(): boolean {\n\t\tconst rowSize = this.rowSize;\n\t\tconst total = this.displayedColors.length;\n\t\tconst lastCompleteRowEndIndex = this._getLastCompleteRowEndIndex(total, rowSize);\n\n\t\t// Return false if there are no full rows (less than one complete row)\n\t\tif (lastCompleteRowEndIndex < 0 || !this.displayedColors[lastCompleteRowEndIndex]) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.focusColorElement(this.displayedColors[lastCompleteRowEndIndex], this._itemNavigation);\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns the index of the last swatch in the last complete row.\n\t * @private\n\t */\n\t_getLastCompleteRowEndIndex(total: number, rowSize: number): number {\n\t\treturn Math.floor(total / rowSize) * rowSize - 1;\n\t}\n\n\t/**\n\t * Helper to focus first recent color if available\n\t * @private\n\t */\n\t_focusFirstRecentColor(): boolean {\n\t\tif (this.hasRecentColors && this.recentColorsElements.length) {\n\t\t\tthis.focusColorElement(this.recentColorsElements[0], this._itemNavigationRecentColors);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Helper to focus last recent color if available\n\t * @private\n\t */\n\t_focusLastRecentColor(): boolean {\n\t\tif (this.hasRecentColors && this.recentColorsElements.length) {\n\t\t\tthis.focusColorElement(this.recentColorsElements[this.recentColorsElements.length - 1], this._itemNavigationRecentColors);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tfocusColorElement(element: ColorPaletteNavigationItem, itemNavigation: ItemNavigation) {\n\t\titemNavigation.setCurrentItem(element);\n\t\titemNavigation._focusCurrentItem();\n\t}\n\n\tonColorPickerChange(e: Event) {\n\t\tthis.colorPickerValue = (e.target as ColorPicker).value;\n\t}\n\n\t_chooseCustomColor() {\n\t\tthis._setColor(this.colorPickerValue);\n\t\tthis._closeDialog();\n\t\tthis._shouldFocusRecentColors = true;\n\t}\n\n\t_addRecentColor(color: string) {\n\t\tif (this.showRecentColors && !this._recentColors.includes(color)) {\n\t\t\tthis._recentColors.unshift(color);\n\t\t\tif (this._recentColors.length > this.rowSize) {\n\t\t\t\tthis._recentColors.pop();\n\t\t\t}\n\t\t}\n\t}\n\n\t_closeDialog() {\n\t\tthis.dialogOpen = false;\n\t}\n\n\t_openMoreColorsDialog() {\n\t\tconst value = this._currentlySelected ? this._currentlySelected.value : undefined;\n\n\t\tif (value) {\n\t\t\tthis.colorPickerValue = value;\n\t\t}\n\t\tthis.dialogOpen = true;\n\t}\n\n\t_onDefaultColorClick() {\n\t\tif (this.defaultColor) {\n\t\t\tthis._setColor(this.defaultColor);\n\t\t\tthis._addRecentColor(this.defaultColor);\n\n\t\t\tif (this.selectedItem) {\n\t\t\t\tthis.selectedItem.selected = false;\n\t\t\t\tthis._currentlySelected = undefined;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns the selected item.\n\t */\n\tget selectedItem() {\n\t\treturn this.allColorsInPalette.find(item => item.selected);\n\t}\n\n\tget allColorsInPalette() {\n\t\treturn [...this.effectiveColorItems, ...this.recentColorsElements];\n\t}\n\n\tget colorPaletteDialogTitle() {\n\t\treturn ColorPalette.i18nBundle.getText(COLOR_PALETTE_DIALOG_TITLE);\n\t}\n\n\tget colorPaletteDialogOKButton() {\n\t\treturn ColorPalette.i18nBundle.getText(COLOR_PALETTE_DIALOG_OK_BUTTON);\n\t}\n\n\tget colorPaletteCancelButton() {\n\t\treturn ColorPalette.i18nBundle.getText(COLOR_PALETTE_DIALOG_CANCEL_BUTTON);\n\t}\n\n\t/**\n\t * Returns the selected color.\n\t */\n\tget selectedColor() {\n\t\treturn this._selectedColor;\n\t}\n\n\tget displayedColors(): Array<ColorPaletteItem> {\n\t\tconst colors = this.getSlottedNodes<ColorPaletteItem>(\"colors\");\n\t\treturn colors.filter(item => item.value).slice(0, 15);\n\t}\n\n\tget colorContainerLabel() {\n\t\tconst effectiveLabel = getEffectiveAriaLabelText(this);\n\t\treturn effectiveLabel\n\t\t\t? `${ColorPalette.i18nBundle.getText(COLORPALETTE_CONTAINER_LABEL)} ${effectiveLabel}`\n\t\t\t: ColorPalette.i18nBundle.getText(COLORPALETTE_CONTAINER_LABEL);\n\t}\n\n\tget colorPaletteMoreColorsText() {\n\t\treturn ColorPalette.i18nBundle.getText(COLOR_PALETTE_MORE_COLORS_TEXT);\n\t}\n\n\tget colorPaletteDefaultColorText() {\n\t\treturn ColorPalette.i18nBundle.getText(COLOR_PALETTE_DEFAULT_COLOR_TEXT);\n\t}\n\n\tget rowSize() {\n\t\treturn 5;\n\t}\n\n\tget hasRecentColors() {\n\t\treturn this.showRecentColors && this.recentColors[0];\n\t}\n\n\tget recentColors() {\n\t\tif (this._recentColors.length > this.rowSize) {\n\t\t\tthis._recentColors = this._recentColors.slice(0, this.rowSize);\n\t\t}\n\n\t\twhile (this._recentColors.length < this.rowSize) {\n\t\t\tthis._recentColors.push(\"\");\n\t\t}\n\n\t\treturn this._recentColors;\n\t}\n\n\tget recentColorsElements(): Array<ColorPaletteItem> {\n\t\tconst domRef = this.getDomRef();\n\t\tif (domRef) {\n\t\t\treturn Array.from(domRef.querySelectorAll<ColorPaletteItem>(\".ui5-cp-recent-colors-wrapper [ui5-color-palette-item]\")).filter(x => x.value !== \"\");\n\t\t}\n\n\t\treturn [];\n\t}\n\n\tget classes() {\n\t\t// Remove after deleting the hbs template, it's added in the jsx template\n\t\treturn {\n\t\t\tcolorPaletteRoot: {\n\t\t\t\t\"ui5-cp-root\": true,\n\t\t\t\t\"ui5-cp-root-phone\": isPhone(),\n\t\t\t},\n\t\t};\n\t}\n\n\tstatic ColorPaletteMoreColorsTemplate?: JsxTemplate;\n}\n\nColorPalette.define();\n\nexport default ColorPalette;\nexport type {\n\tColorPaletteItemClickEventDetail,\n\tIColorPaletteItem,\n};\n"]}
@@ -1,6 +1,10 @@
1
1
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
2
  import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
3
3
  import type { IColorPaletteItem } from "./ColorPalette.js";
4
+ type ColorPaletteItemNativeClickEventDetail = {
5
+ item: ColorPaletteItem;
6
+ originalEvent: Event;
7
+ };
4
8
  /**
5
9
  * @class
6
10
  *
@@ -14,6 +18,9 @@ import type { IColorPaletteItem } from "./ColorPalette.js";
14
18
  * @public
15
19
  */
16
20
  declare class ColorPaletteItem extends UI5Element implements IColorPaletteItem {
21
+ eventDetails: {
22
+ "click": ColorPaletteItemNativeClickEventDetail;
23
+ };
17
24
  /**
18
25
  * Defines the colour of the component.
19
26
  *
@@ -71,5 +78,7 @@ declare class ColorPaletteItem extends UI5Element implements IColorPaletteItem {
71
78
  "ui5-cp-item": boolean;
72
79
  };
73
80
  };
81
+ _onClick(e: MouseEvent): void;
74
82
  }
75
83
  export default ColorPaletteItem;
84
+ export type { ColorPaletteItemNativeClickEventDetail };
@@ -13,6 +13,7 @@ import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
13
13
  import { isPhone } from "@ui5/webcomponents-base/dist/Device.js";
14
14
  import ColorPaletteItemTemplate from "./ColorPaletteItemTemplate.js";
15
15
  import { COLORPALETTE_COLOR_LABEL, } from "./generated/i18n/i18n-defaults.js";
16
+ import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
16
17
  // Styles
17
18
  import ColorPaletteItemCss from "./generated/themes/ColorPaletteItem.css.js";
18
19
  /**
@@ -87,6 +88,23 @@ let ColorPaletteItem = ColorPaletteItem_1 = class ColorPaletteItem extends UI5El
87
88
  },
88
89
  };
89
90
  }
91
+ _onClick(e) {
92
+ if (this._disabled) {
93
+ e.preventDefault();
94
+ e.stopPropagation();
95
+ return;
96
+ }
97
+ e.stopImmediatePropagation();
98
+ // Fire semantic click event (CustomEvent that bubbles)
99
+ const prevented = !this.fireDecoratorEvent("click", {
100
+ item: this,
101
+ originalEvent: e,
102
+ });
103
+ if (prevented) {
104
+ e.preventDefault();
105
+ e.stopPropagation();
106
+ }
107
+ }
90
108
  };
91
109
  __decorate([
92
110
  property()
@@ -120,6 +138,21 @@ ColorPaletteItem = ColorPaletteItem_1 = __decorate([
120
138
  template: ColorPaletteItemTemplate,
121
139
  shadowRootOptions: { delegatesFocus: true },
122
140
  })
141
+ /**
142
+ * Fired when the component is activated either with a mouse/tap or by using the Enter or Space key.
143
+ *
144
+ * **Note:** The event will not be fired if the `disabled` property is set to `true`.
145
+ *
146
+ * @param {ColorPaletteItem} item The color palette item that was clicked.
147
+ * @param {Event} originalEvent The original DOM event that triggered the click. Use this to access modifier keys (altKey, ctrlKey, metaKey, shiftKey) and other native event properties.
148
+ * @since 2.22.0
149
+ * @public
150
+ */
151
+ ,
152
+ event("click", {
153
+ bubbles: true,
154
+ cancelable: true,
155
+ })
123
156
  ], ColorPaletteItem);
124
157
  ColorPaletteItem.define();
125
158
  export default ColorPaletteItem;
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPaletteItem.js","sourceRoot":"","sources":["../src/ColorPaletteItem.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,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAEjE,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACN,wBAAwB,GACxB,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,mBAAmB,MAAM,4CAA4C,CAAC;AAE7E;;;;;;;;;;;GAWG;AAQH,IAAM,gBAAgB,wBAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAiExC;QACC,KAAK,EAAE,CAAC;QAjET;;;;;;WAMG;QAEH,UAAK,GAAG,EAAE,CAAA;QAEV;;;;;;;;;WASG;QAEH,aAAQ,GAAG,KAAK,CAAC;QAYjB;;;WAGG;QAEH,mBAAc,GAAG,IAAI,CAAC;QAStB;;;WAGG;QAEH,YAAO,GAAG,KAAK,CAAC;QAEhB;;;WAGG;QAEH,cAAS,GAAG,KAAK,CAAC;IAOlB,CAAC;IAED,iBAAiB;QAChB,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,EAAE,C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,EAAE,wBAAwB;QAClC,iBAAiB,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;KAC3C,CAAC;GACI,gBAAgB,CAgGrB;AAED,gBAAgB,CAAC,MAAM,EAAE,CAAC;AAE1B,eAAe,gBAAgB,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 i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isPhone } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { IColorPaletteItem } from \"./ColorPalette.js\";\nimport ColorPaletteItemTemplate from \"./ColorPaletteItemTemplate.js\";\nimport {\n\tCOLORPALETTE_COLOR_LABEL,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport ColorPaletteItemCss from \"./generated/themes/ColorPaletteItem.css.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-color-palette-item` component represents a color in the the `ui5-color-palette`.\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.12\n * @implements { IColorPaletteItem }\n * @public\n */\n@customElement({\n\ttag: \"ui5-color-palette-item\",\n\trenderer: jsxRenderer,\n\tstyles: ColorPaletteItemCss,\n\ttemplate: ColorPaletteItemTemplate,\n\tshadowRootOptions: { delegatesFocus: true },\n})\nclass ColorPaletteItem extends UI5Element implements IColorPaletteItem {\n\t/**\n\t * Defines the colour of the component.\n\t *\n\t * **Note:** The value should be a valid CSS color.\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\tvalue = \"\"\n\n\t/**\n\t * Defines if the component is selected.\n\t *\n\t * **Note:** Only one item must be selected per <code>ui5-color-palette</code>.\n\t * If more than one item is defined as selected, the last one would be considered as the selected one.\n\t *\n\t * @default false\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property({ type: Boolean })\n\tselected = false;\n\n\t/**\n\t * Defines the tooltip of the component. When not set, the color value is used as the tooltip.\n\t *\n\t * @default undefined\n\t * @public\n\t * @since 2.22.0\n\t */\n\t@property()\n\ttooltip?: string;\n\n\t/**\n\t * Defines the tab-index of the element, helper information for the ItemNavigation.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\tforcedTabIndex = \"-1\";\n\n\t/**\n\t * Defines the index of the item inside of the ColorPalette.\n\t * @private\n\t */\n\t@property({ type: Number })\n\tindex?: number;\n\n\t/**\n\t * Defines if the ColorPalette is on phone mode.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonPhone = false;\n\n\t/**\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\t_disabled = false;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._disabled = !this.value;\n\t\tthis.onPhone = isPhone();\n\n\t\t// since height is dynamically determined by padding-block-start\n\t\tconst itemHeight = this.offsetHeight + 4; // adding 4px for the offsets on top and bottom\n\t\tthis.style.setProperty(\"--_ui5_color_palette_item_height\", `${itemHeight}px`);\n\n\t\tthis.style.setProperty(\"--_ui5-color-palette-item-background-color\", `${this.value}`);\n\t}\n\n\tget colorLabel() {\n\t\treturn ColorPaletteItem.i18nBundle.getText(COLORPALETTE_COLOR_LABEL);\n\t}\n\n\tget getLabelText(): string {\n\t\treturn `${this.colorLabel} - ${this.index}: ${this.tooltip || this.value}`;\n\t}\n\n\tget classes() {\n\t\t// Remove after deleting the hbs template, it's added in the jsx template\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-cp-item\": true,\n\t\t\t},\n\t\t};\n\t}\n}\n\nColorPaletteItem.define();\n\nexport default ColorPaletteItem;\n"]}
1
+ {"version":3,"file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ADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;mDACV;AAGX;IADN,IAAI,CAAC,oBAAoB,CAAC;0CACG;AAlEzB,gBAAgB;IAtBrB,aAAa,CAAC;QACd,GAAG,EAAE,wBAAwB;QAC7B,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,mBAAmB;QAC3B,QAAQ,EAAE,wBAAwB;QAClC,iBAAiB,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;KAC3C,CAAC;IAEF;;;;;;;;;OASG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;KAChB,CAAC;GACI,gBAAgB,CAwHrB;AAED,gBAAgB,CAAC,MAAM,EAAE,CAAC;AAE1B,eAAe,gBAAgB,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 i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isPhone } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { IColorPaletteItem } from \"./ColorPalette.js\";\nimport ColorPaletteItemTemplate from \"./ColorPaletteItemTemplate.js\";\nimport {\n\tCOLORPALETTE_COLOR_LABEL,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\n\n// Styles\nimport ColorPaletteItemCss from \"./generated/themes/ColorPaletteItem.css.js\";\n\ntype ColorPaletteItemNativeClickEventDetail = {\n\titem: ColorPaletteItem,\n\toriginalEvent: Event;\n};\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-color-palette-item` component represents a color in the the `ui5-color-palette`.\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.12\n * @implements { IColorPaletteItem }\n * @public\n */\n@customElement({\n\ttag: \"ui5-color-palette-item\",\n\trenderer: jsxRenderer,\n\tstyles: ColorPaletteItemCss,\n\ttemplate: ColorPaletteItemTemplate,\n\tshadowRootOptions: { delegatesFocus: true },\n})\n\n/**\n * Fired when the component is activated either with a mouse/tap or by using the Enter or Space key.\n *\n * **Note:** The event will not be fired if the `disabled` property is set to `true`.\n *\n * @param {ColorPaletteItem} item The color palette item that was clicked.\n * @param {Event} originalEvent The original DOM event that triggered the click. Use this to access modifier keys (altKey, ctrlKey, metaKey, shiftKey) and other native event properties.\n * @since 2.22.0\n * @public\n */\n@event(\"click\", {\n\tbubbles: true,\n\tcancelable: true,\n})\nclass ColorPaletteItem extends UI5Element implements IColorPaletteItem {\n\teventDetails!: {\n\t\t\"click\": ColorPaletteItemNativeClickEventDetail,\n\t}\n\t/**\n\t * Defines the colour of the component.\n\t *\n\t * **Note:** The value should be a valid CSS color.\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\tvalue = \"\"\n\n\t/**\n\t * Defines if the component is selected.\n\t *\n\t * **Note:** Only one item must be selected per <code>ui5-color-palette</code>.\n\t * If more than one item is defined as selected, the last one would be considered as the selected one.\n\t *\n\t * @default false\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property({ type: Boolean })\n\tselected = false;\n\n\t/**\n\t * Defines the tooltip of the component. When not set, the color value is used as the tooltip.\n\t *\n\t * @default undefined\n\t * @public\n\t * @since 2.22.0\n\t */\n\t@property()\n\ttooltip?: string;\n\n\t/**\n\t * Defines the tab-index of the element, helper information for the ItemNavigation.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\tforcedTabIndex = \"-1\";\n\n\t/**\n\t * Defines the index of the item inside of the ColorPalette.\n\t * @private\n\t */\n\t@property({ type: Number })\n\tindex?: number;\n\n\t/**\n\t * Defines if the ColorPalette is on phone mode.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonPhone = false;\n\n\t/**\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\t_disabled = false;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._disabled = !this.value;\n\t\tthis.onPhone = isPhone();\n\n\t\t// since height is dynamically determined by padding-block-start\n\t\tconst itemHeight = this.offsetHeight + 4; // adding 4px for the offsets on top and bottom\n\t\tthis.style.setProperty(\"--_ui5_color_palette_item_height\", `${itemHeight}px`);\n\n\t\tthis.style.setProperty(\"--_ui5-color-palette-item-background-color\", `${this.value}`);\n\t}\n\n\tget colorLabel() {\n\t\treturn ColorPaletteItem.i18nBundle.getText(COLORPALETTE_COLOR_LABEL);\n\t}\n\n\tget getLabelText(): string {\n\t\treturn `${this.colorLabel} - ${this.index}: ${this.tooltip || this.value}`;\n\t}\n\n\tget classes() {\n\t\t// Remove after deleting the hbs template, it's added in the jsx template\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-cp-item\": true,\n\t\t\t},\n\t\t};\n\t}\n\n\t_onClick(e: MouseEvent) {\n\t\tif (this._disabled) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\te.stopImmediatePropagation();\n\n\t\t// Fire semantic click event (CustomEvent that bubbles)\n\t\tconst prevented = !this.fireDecoratorEvent(\"click\", {\n\t\t\titem: this,\n\t\t\toriginalEvent: e,\n\t\t});\n\n\t\tif (prevented) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t}\n\t}\n}\n\nColorPaletteItem.define();\n\nexport default ColorPaletteItem;\nexport type { ColorPaletteItemNativeClickEventDetail };\n"]}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "@ui5/webcomponents-base/jsx-runtime";
2
2
  export default function ColorPaletteItemTemplate() {
3
- return (_jsx("div", { class: "ui5-cp-item", tabindex: parseInt(this.forcedTabIndex), role: "button", "aria-label": this.getLabelText, "aria-pressed": this.selected, title: this.getLabelText }));
3
+ return (_jsx("div", { class: "ui5-cp-item", tabindex: parseInt(this.forcedTabIndex), role: "button", "aria-label": this.getLabelText, "aria-pressed": this.selected, title: this.getLabelText, onClick: this._onClick }));
4
4
  }
5
5
  //# sourceMappingURL=ColorPaletteItemTemplate.js.map