@ui5/webcomponents-ai 0.0.0-f42e7c18c → 0.0.0-fd426fe8a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/CHANGELOG.md +437 -0
  2. package/README.md +2 -1
  3. package/cypress.config.js +3 -0
  4. package/dist/.tsbuildinfo +1 -0
  5. package/dist/Assets-fetch.d.ts +3 -0
  6. package/dist/Assets-fetch.js +6 -0
  7. package/dist/Assets-fetch.js.map +1 -0
  8. package/dist/Assets-node.d.ts +14 -0
  9. package/dist/Assets-node.js +17 -0
  10. package/dist/Assets-node.js.map +1 -0
  11. package/dist/Button.d.ts +78 -33
  12. package/dist/Button.js +165 -78
  13. package/dist/Button.js.map +1 -1
  14. package/dist/ButtonState.d.ts +10 -3
  15. package/dist/ButtonState.js +16 -3
  16. package/dist/ButtonState.js.map +1 -1
  17. package/dist/ButtonTemplate.js +2 -2
  18. package/dist/ButtonTemplate.js.map +1 -1
  19. package/dist/PromptInput.d.ts +6 -11
  20. package/dist/PromptInput.js +3 -13
  21. package/dist/PromptInput.js.map +1 -1
  22. package/dist/css/themes/Button.css +1 -1
  23. package/dist/custom-elements-internal.json +105 -14
  24. package/dist/custom-elements.json +95 -12
  25. package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
  26. package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
  27. package/dist/generated/assets/i18n/messagebundle_id.json +1 -0
  28. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  29. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  30. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
  31. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
  32. package/dist/generated/i18n/i18n-defaults.d.ts +2 -1
  33. package/dist/generated/i18n/i18n-defaults.js +2 -1
  34. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  35. package/dist/generated/json-imports/Themes-fetch.js +1 -1
  36. package/dist/generated/json-imports/Themes-fetch.js.map +1 -1
  37. package/dist/generated/json-imports/Themes-node.d.ts +1 -0
  38. package/dist/generated/json-imports/Themes-node.js +21 -0
  39. package/dist/generated/json-imports/Themes-node.js.map +1 -0
  40. package/dist/generated/json-imports/Themes.js +1 -1
  41. package/dist/generated/json-imports/Themes.js.map +1 -1
  42. package/dist/generated/json-imports/i18n-fetch.js +3 -1
  43. package/dist/generated/json-imports/i18n-fetch.js.map +1 -1
  44. package/dist/generated/json-imports/i18n-node.d.ts +1 -0
  45. package/dist/generated/json-imports/i18n-node.js +120 -0
  46. package/dist/generated/json-imports/i18n-node.js.map +1 -0
  47. package/dist/generated/json-imports/i18n.js +3 -1
  48. package/dist/generated/json-imports/i18n.js.map +1 -1
  49. package/dist/generated/themes/Button.css.d.ts +2 -3
  50. package/dist/generated/themes/Button.css.js +4 -5
  51. package/dist/generated/themes/Button.css.js.map +1 -1
  52. package/dist/generated/themes/PromptInput.css.d.ts +2 -3
  53. package/dist/generated/themes/PromptInput.css.js +4 -5
  54. package/dist/generated/themes/PromptInput.css.js.map +1 -1
  55. package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +2 -3
  56. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -2
  57. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  58. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +2 -3
  59. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -2
  60. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  61. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +2 -3
  62. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -2
  63. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
  64. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +2 -3
  65. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -2
  66. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
  67. package/dist/vscode.html-custom-data.json +19 -4
  68. package/dist/web-types.json +49 -8
  69. package/package-scripts.cjs +4 -0
  70. package/package.json +12 -8
  71. package/src/ButtonTemplate.tsx +9 -6
  72. package/src/i18n/messagebundle.properties +5 -1
  73. package/src/i18n/messagebundle_en.properties +7 -0
  74. package/src/i18n/messagebundle_en_US_saprigi.properties +3 -0
  75. package/src/themes/Button.css +75 -21
  76. package/tsconfig.json +25 -6
  77. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@ui5/webcomponents-ai",
4
- "version": "2.5.0",
4
+ "version": "2.13.5",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "ui5-ai-button",
11
- "description": "### Overview\n\nThe `ui5-ai-button` component represents a button used in AI-related scenarios.\nIt enables users to trigger actions by clicking or tapping the `ui5-ai-button`, or by pressing\ncertain keyboard keys, such as Enter.\n\n### Usage\n\nFor the `ui5-ai-button` UI, you can define one or more states of the button by placing `ai-button-state` components in its default slot.\nEach state have a name that identifies it and can have text, icon and end icon defined (in any combination) depending on the state purpose.\n\nYou can choose from a set of predefined designs (the same as for regular `ui5-button` component) that allow different styling to correspond to the triggered action.\n\n`ui5-ai-button` can be activated by clicking or tapping it. The state can be changed in `click` event handler.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents-ai/dist/Button.js\";`\n---\n\n\n### **Events:**\n - **click** - Fired when the component is activated either with a\nmouse/tap or by using the Enter or Space key.\n\n### **Slots:**\n - **default** - Defines the available states of the component.\n**Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use `ui5-ai-button-state` components in order to preserve the intended design.",
11
+ "description": "### Overview\n\nThe `ui5-ai-button` component serves as a button for AI-related scenarios. Users can trigger actions by clicking or tapping the `ui5-ai-button`\nor by pressing keyboard keys like [Enter] or [Space].\n\n### Usage\n\nFor the `ui5-ai-button` user interface, you can define one or more button states by placing `ui5-ai-button-state` components in their default slot.\nEach state has a name for identification and can include text, an icon, and an end icon, as needed for its purpose.\nYou can define a split mode for the `ui5-ai-button`, which will results in displaying an arrow button for additional actions.\n\nYou can choose from a set of predefined designs for `ui5-ai-button` (as in `ui5-button`) to match the desired styling.\n\nThe `ui5-ai-button` can be activated by clicking or tapping it. You can change the button state in the click event handler. When the button is\nin split mode, you can activate the default button action by clicking or tapping it, or by pressing keyboard keys like [Enter] or [Space].\nYou can activate the arrow button by clicking or tapping it, or by pressing keyboard keys like [Arrow Up], [Arrow Down], or [F4].\nTo display additional actions, you can attach a menu to the arrow button.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents-ai/dist/Button.js\";`\n---\n\n\n### **Events:**\n - **click** - Fired when the component is activated either with a\nmouse/tap or by using the Enter or Space key.\n- **arrow-button-click** - Fired when the component is in split mode and after the arrow button\nis activated either by clicking or tapping it or by using the [Arrow Up] / [Arrow Down],\n[Alt] + [Arrow Up]/ [Arrow Down], or [F4] keyboard keys.\n\n### **Slots:**\n - **default** - Defines the available states of the component.\n**Note:** Although this slot accepts HTML Elements, it is strongly recommended that\nyou only use `ui5-ai-button-state` components in order to preserve the intended design.",
12
12
  "doc-url": "",
13
13
  "attributes": [
14
14
  {
@@ -28,18 +28,35 @@
28
28
  "name": "state",
29
29
  "description": "Defines the current state of the component.",
30
30
  "value": { "type": "string | undefined", "default": "undefined" }
31
+ },
32
+ {
33
+ "name": "arrow-button-pressed",
34
+ "description": "Defines the active state of the arrow button in split mode.\nSet to true when the button is in split mode and a menu with additional options\nis opened by the arrow button. Set back to false when the menu is closed.",
35
+ "value": { "type": "boolean", "default": "false" }
36
+ },
37
+ {
38
+ "name": "accessibility-attributes",
39
+ "description": "Defines the additional accessibility attributes that will be applied to the component.\n\nThis property allows for fine-tuned control of ARIA attributes for screen reader support.\nIt accepts an object with the following optional fields:\n\n- **root**: Accessibility attributes that will be applied to the root element.\n - **hasPopup**: Indicates the availability and type of interactive popup element (such as a menu or dialog).\n Accepts string values: `\"dialog\"`, `\"grid\"`, `\"listbox\"`, `\"menu\"`, or `\"tree\"`.\n - **roleDescription**: Defines a human-readable description for the button's role.\n Accepts any string value.\n\n- **arrowButton**: Accessibility attributes that will be applied to the arrow (split) button element.\n - **hasPopup**: Indicates the type of popup triggered by the arrow button.\n Accepts string values: `\"dialog\"`, `\"grid\"`, `\"listbox\"`, `\"menu\"`, or `\"tree\"`.\n - **expanded**: Indicates whether the popup controlled by the arrow button is currently expanded.\n Accepts boolean values: `true` or `false`.",
40
+ "value": {
41
+ "type": "AIButtonAccessibilityAttributes",
42
+ "default": "{}"
43
+ }
31
44
  }
32
45
  ],
33
46
  "slots": [
34
47
  {
35
48
  "name": "default",
36
- "description": "Defines the available states of the component.\n**Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use `ui5-ai-button-state` components in order to preserve the intended design."
49
+ "description": "Defines the available states of the component.\n**Note:** Although this slot accepts HTML Elements, it is strongly recommended that\nyou only use `ui5-ai-button-state` components in order to preserve the intended design."
37
50
  }
38
51
  ],
39
52
  "events": [
40
53
  {
41
54
  "name": "click",
42
55
  "description": "Fired when the component is activated either with a\nmouse/tap or by using the Enter or Space key."
56
+ },
57
+ {
58
+ "name": "arrow-button-click",
59
+ "description": "Fired when the component is in split mode and after the arrow button\nis activated either by clicking or tapping it or by using the [Arrow Up] / [Arrow Down],\n[Alt] + [Arrow Up]/ [Arrow Down], or [F4] keyboard keys."
43
60
  }
44
61
  ],
45
62
  "js": {
@@ -60,19 +77,33 @@
60
77
  "name": "state",
61
78
  "description": "Defines the current state of the component.",
62
79
  "value": { "type": "string | undefined" }
80
+ },
81
+ {
82
+ "name": "arrow-button-pressed",
83
+ "description": "Defines the active state of the arrow button in split mode.\nSet to true when the button is in split mode and a menu with additional options\nis opened by the arrow button. Set back to false when the menu is closed.",
84
+ "value": { "type": "boolean" }
85
+ },
86
+ {
87
+ "name": "accessibility-attributes",
88
+ "description": "Defines the additional accessibility attributes that will be applied to the component.\n\nThis property allows for fine-tuned control of ARIA attributes for screen reader support.\nIt accepts an object with the following optional fields:\n\n- **root**: Accessibility attributes that will be applied to the root element.\n - **hasPopup**: Indicates the availability and type of interactive popup element (such as a menu or dialog).\n Accepts string values: `\"dialog\"`, `\"grid\"`, `\"listbox\"`, `\"menu\"`, or `\"tree\"`.\n - **roleDescription**: Defines a human-readable description for the button's role.\n Accepts any string value.\n\n- **arrowButton**: Accessibility attributes that will be applied to the arrow (split) button element.\n - **hasPopup**: Indicates the type of popup triggered by the arrow button.\n Accepts string values: `\"dialog\"`, `\"grid\"`, `\"listbox\"`, `\"menu\"`, or `\"tree\"`.\n - **expanded**: Indicates whether the popup controlled by the arrow button is currently expanded.\n Accepts boolean values: `true` or `false`.",
89
+ "value": { "type": "AIButtonAccessibilityAttributes" }
63
90
  }
64
91
  ],
65
92
  "events": [
66
93
  {
67
94
  "name": "click",
68
95
  "description": "Fired when the component is activated either with a\nmouse/tap or by using the Enter or Space key."
96
+ },
97
+ {
98
+ "name": "arrow-button-click",
99
+ "description": "Fired when the component is in split mode and after the arrow button\nis activated either by clicking or tapping it or by using the [Arrow Up] / [Arrow Down],\n[Alt] + [Arrow Up]/ [Arrow Down], or [F4] keyboard keys."
69
100
  }
70
101
  ]
71
102
  }
72
103
  },
73
104
  {
74
105
  "name": "ui5-ai-button-state",
75
- "description": "### Overview\n\n`ui5-ai-button-state` is the item to use for defining states of `ui5-ai-button` components.\n\n### Usage\n\n`ui5-si-button-state` is an abstract element, representing a state of `ui5-ai-button`. It is meant to be used in the `states` slot\nof `ui5-ai-button` and should be used as standalone component.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/AiButtonState.js\";`\n---\n",
106
+ "description": "### Overview\n\n`ui5-ai-button-state` is the item to use for defining states of `ui5-ai-button` components.\n\n### Usage\n\n`ui5-ai-button-state` is an abstract element, representing a state of `ui5-ai-button`. It is meant to be used in the `default` slot\nof `ui5-ai-button` and should not be used as standalone component.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/AiButtonState.js\";`\n---\n",
76
107
  "doc-url": "",
77
108
  "attributes": [
78
109
  {
@@ -94,6 +125,11 @@
94
125
  "name": "end-icon",
95
126
  "description": "Defines the icon to be displayed as graphical element within the component after the text.\nThe SAP-icons font provides numerous options.\n\n**Example:**\n\nSee all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).",
96
127
  "value": { "type": "string | undefined", "default": "undefined" }
128
+ },
129
+ {
130
+ "name": "show-arrow-button",
131
+ "description": "Defines if the component is in split button mode.",
132
+ "value": { "type": "boolean", "default": "false" }
97
133
  }
98
134
  ],
99
135
  "events": [],
@@ -118,6 +154,11 @@
118
154
  "name": "end-icon",
119
155
  "description": "Defines the icon to be displayed as graphical element within the component after the text.\nThe SAP-icons font provides numerous options.\n\n**Example:**\n\nSee all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).",
120
156
  "value": { "type": "string | undefined" }
157
+ },
158
+ {
159
+ "name": "show-arrow-button",
160
+ "description": "Defines if the component is in split button mode.",
161
+ "value": { "type": "boolean" }
121
162
  }
122
163
  ],
123
164
  "events": []
@@ -125,7 +166,7 @@
125
166
  },
126
167
  {
127
168
  "name": "ui5-ai-prompt-input",
128
- "description": "### Overview\n\nThe `ui5-ai-prompt-input` component allows the user to write custom instructions in natural language, so that AI is guided to generate content tailored to user needs.\n\n**Note:** The web component is in an experimental state\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents-ai/dist/PromptInput.js\n---\n\n\n### **Events:**\n - **submit** - Fired when the input operation has finished by pressing Enter\nor AI button is clicked.\n- **input** - Fired when the value of the component changes at each keystroke,\nand when a suggestion item has been selected.\n- **change** - Fired when the input operation has finished by pressing Enter\nor on focusout.\n\n### **Slots:**\n - **default** - Defines the suggestion items.\n\n**Note:** The suggestions would be displayed only if the `showSuggestions`\nproperty is set to `true`.\n\n**Note:** The `<ui5-suggestion-item>`, `<ui5-suggestion-item-group>` and `ui5-suggestion-item-custom` are recommended to be used as suggestion items.\n\n**Note:** Importing the Input Suggestions Support feature:\n\n`import \"@ui5/webcomponents/dist/features/InputSuggestions.js\";`\n\nautomatically imports the `<ui5-suggestion-item>` and `<ui5-suggestion-item-group>` for your convenience.\n- **valueStateMessage** - Defines the value state message that will be displayed as pop up under the component.\nThe value state message slot should contain only one root element.\n\n**Note:** If not specified, a default text (in the respective language) will be displayed.\n\n**Note:** The `valueStateMessage` would be displayed,\nwhen the component is in `Information`, `Critical` or `Negative` value state.",
169
+ "description": "### Overview\n\nThe `ui5-ai-prompt-input` component allows the user to write custom instructions in natural language, so that AI is guided to generate content tailored to user needs.\n\n**Note:** The web component is in an experimental state\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents-ai/dist/PromptInput.js\"`\n---\n\n\n### **Events:**\n - **submit** - Fired when the input operation has finished by pressing Enter\nor AI button is clicked.\n- **input** - Fired when the value of the component changes at each keystroke,\nand when a suggestion item has been selected.\n- **change** - Fired when the input operation has finished by pressing Enter\nor on focusout.\n\n### **Slots:**\n - **default** - Defines the suggestion items.\n\n**Note:** The suggestions would be displayed only if the `showSuggestions`\nproperty is set to `true`.\n\n**Note:** The `<ui5-suggestion-item>`, `<ui5-suggestion-item-group>` and `ui5-suggestion-item-custom` are recommended to be used as suggestion items.\n- **valueStateMessage** - Defines the value state message that will be displayed as pop up under the component.\nThe value state message slot should contain only one root element.\n\n**Note:** If not specified, a default text (in the respective language) will be displayed.\n\n**Note:** The `valueStateMessage` would be displayed,\nwhen the component is in `Information`, `Critical` or `Negative` value state.",
129
170
  "doc-url": "",
130
171
  "attributes": [
131
172
  {
@@ -178,14 +219,14 @@
178
219
  },
179
220
  {
180
221
  "name": "show-suggestions",
181
- "description": "Defines whether the component should show suggestions, if such are present.\n\n**Note:** You need to import the `InputSuggestions` module\nfrom `\"@ui5/webcomponents/dist/features/InputSuggestions.js\"` to enable this functionality.",
222
+ "description": "Defines whether the component should show suggestions, if such are present.",
182
223
  "value": { "type": "boolean", "default": "false" }
183
224
  }
184
225
  ],
185
226
  "slots": [
186
227
  {
187
228
  "name": "default",
188
- "description": "Defines the suggestion items.\n\n**Note:** The suggestions would be displayed only if the `showSuggestions`\nproperty is set to `true`.\n\n**Note:** The `<ui5-suggestion-item>`, `<ui5-suggestion-item-group>` and `ui5-suggestion-item-custom` are recommended to be used as suggestion items.\n\n**Note:** Importing the Input Suggestions Support feature:\n\n`import \"@ui5/webcomponents/dist/features/InputSuggestions.js\";`\n\nautomatically imports the `<ui5-suggestion-item>` and `<ui5-suggestion-item-group>` for your convenience."
229
+ "description": "Defines the suggestion items.\n\n**Note:** The suggestions would be displayed only if the `showSuggestions`\nproperty is set to `true`.\n\n**Note:** The `<ui5-suggestion-item>`, `<ui5-suggestion-item-group>` and `ui5-suggestion-item-custom` are recommended to be used as suggestion items."
189
230
  },
190
231
  {
191
232
  "name": "valueStateMessage",
@@ -257,7 +298,7 @@
257
298
  },
258
299
  {
259
300
  "name": "show-suggestions",
260
- "description": "Defines whether the component should show suggestions, if such are present.\n\n**Note:** You need to import the `InputSuggestions` module\nfrom `\"@ui5/webcomponents/dist/features/InputSuggestions.js\"` to enable this functionality.",
301
+ "description": "Defines whether the component should show suggestions, if such are present.",
261
302
  "value": { "type": "boolean" }
262
303
  }
263
304
  ],
@@ -6,6 +6,10 @@ const options = {
6
6
  aiPackage: true,
7
7
  noWatchTS: true,
8
8
  dev: true,
9
+ internal: {
10
+ cypress_code_coverage: false,
11
+ cypress_acc_tests: false,
12
+ },
9
13
  };
10
14
 
11
15
  const scripts = getScripts(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-ai",
3
- "version": "0.0.0-f42e7c18c",
3
+ "version": "0.0.0-fd426fe8a",
4
4
  "description": "UI5 Web Components: webcomponents.ai",
5
5
  "ui5": {
6
6
  "webComponentsPackage": true
@@ -25,7 +25,10 @@
25
25
  "generate": "nps generate",
26
26
  "generateAPI": "nps generateAPI",
27
27
  "bundle": "nps build.bundle",
28
- "test": "wc-dev test",
28
+ "test": "nps test-cy-ci",
29
+ "test:cypress": "nps test-cy-ci",
30
+ "test:cypress:single": "npx cypress run --component --browser chrome --spec",
31
+ "test:cypress:open": "nps test-cy-open",
29
32
  "test:ssr": "node -e \"import('./test/ssr/component-imports.js')\"",
30
33
  "create-ui5-element": "wc-create-ui5-element",
31
34
  "prepublishOnly": "tsc -b"
@@ -45,13 +48,14 @@
45
48
  "directory": "packages/ai"
46
49
  },
47
50
  "dependencies": {
48
- "@ui5/webcomponents": "0.0.0-f42e7c18c",
49
- "@ui5/webcomponents-base": "0.0.0-f42e7c18c",
50
- "@ui5/webcomponents-icons": "0.0.0-f42e7c18c",
51
- "@ui5/webcomponents-theming": "0.0.0-f42e7c18c"
51
+ "@ui5/webcomponents": "0.0.0-fd426fe8a",
52
+ "@ui5/webcomponents-base": "0.0.0-fd426fe8a",
53
+ "@ui5/webcomponents-icons": "0.0.0-fd426fe8a",
54
+ "@ui5/webcomponents-theming": "0.0.0-fd426fe8a"
52
55
  },
53
56
  "devDependencies": {
54
- "@ui5/webcomponents-tools": "0.0.0-f42e7c18c",
55
- "chromedriver": "^131.0.0"
57
+ "@ui5/cypress-internal": "0.0.0",
58
+ "@ui5/webcomponents-tools": "0.0.0-fd426fe8a",
59
+ "chromedriver": "^137.0.4"
56
60
  }
57
61
  }
@@ -1,22 +1,25 @@
1
- import MainButton from "@ui5/webcomponents/dist/Button.js";
1
+ import SplitButton from "@ui5/webcomponents/dist/SplitButton.js";
2
2
  import type Button from "./Button.js";
3
3
 
4
4
  export default function ButtonTemplate(this: Button) {
5
5
  return (<>
6
- <MainButton
6
+ <SplitButton
7
7
  class="ui5-ai-button-inner"
8
8
  design={this.design}
9
9
  icon={this._stateIcon}
10
- endIcon={this._stateEndIcon}
11
10
  disabled={this.disabled}
12
- onClick={this._onclick}
11
+ _endIcon={this._stateEndIcon}
12
+ _hideArrowButton={this._hideArrowButton}
13
+ onClick={this._onClick}
14
+ onArrowClick={this._onArrowClick}
15
+ accessibilityAttributes={this._computedAccessibilityAttributes}
13
16
  >
14
17
  {this._hasText && (
15
18
  <div class="ui5-ai-button-text">{this._stateText}</div>
16
19
  )}
17
- </MainButton>
20
+ </SplitButton>
18
21
 
19
- <MainButton
22
+ <SplitButton
20
23
  class="ui5-ai-button-hidden"
21
24
  design={this.design}
22
25
  />
@@ -5,4 +5,8 @@
5
5
  PROMPT_INPUT_CHARACTERS_LEFT={0} characters remaining
6
6
 
7
7
  #XTXT: Text for characters over
8
- PROMPT_INPUT_CHARACTERS_EXCEEDED={0} characters over limit
8
+ PROMPT_INPUT_CHARACTERS_EXCEEDED={0} characters over limit
9
+
10
+ #XTXT: Text for
11
+ BUTTON_TOOLTIP_TEXT={0} with Artificial Intelligence
12
+
@@ -1,4 +1,11 @@
1
+ #This is the resource bundle for the UI5 Web Components
2
+ #
1
3
 
4
+ #XTXT: Text for characters left
2
5
  PROMPT_INPUT_CHARACTERS_LEFT={0} characters remaining
3
6
 
7
+ #XTXT: Text for characters over
4
8
  PROMPT_INPUT_CHARACTERS_EXCEEDED={0} characters over limit
9
+
10
+ #XTXT: Text for
11
+ BUTTON_TOOLTIP_TEXT={0} with Artificial Intelligence
@@ -2,3 +2,6 @@
2
2
  PROMPT_INPUT_CHARACTERS_LEFT=‌‌‍‍​‌​‍​‌‌‍‌‌​​‍‌‍‌​‌​‌​‌​‍​‌‌​​‍‌‍‍‍‍​​​{0}‌‌‌ characters remaining
3
3
 
4
4
  PROMPT_INPUT_CHARACTERS_EXCEEDED=‌‌‌​‌‍‍‍​‍‍​​​​‌‍​‍​‌‍​‌​​​‌​​‌​​‍‍​‌‌‌​‍​​​{0}‌‌‌ characters over limit
5
+
6
+ BUTTON_TOOLTIP_TEXT=‍‍‌‍‍‌‍​‍​​‌‌‌‍‌​‍​​‌‌‌‌​‍‍‍‌​‍‍‌‌​‌‌‌‌​​​​{0}‌‌‌ with Artificial Intelligence
7
+
@@ -24,64 +24,118 @@
24
24
  width: fit-content;
25
25
  }
26
26
 
27
+ :host .ui5-ai-button-inner {
28
+ width: 100%;
29
+ }
30
+
27
31
  /* Animated parts */
28
32
 
29
- :host [ui5-button]:not(.ui5-ai-button-hidden) {
33
+ :host {
30
34
  width: auto;
31
35
  position: relative;
32
36
  transition: width 0.18s cubic-bezier(0.67, 1, 0.95, 1.3) 0.12s;
33
37
  }
34
38
 
35
- :host ::part(icon) {
36
- opacity: 1;
37
- transform: translateY(0);
39
+ :host(.ui5-ai-button-menu-to-button) .ui5-ai-button-inner::part(button),
40
+ :host(.ui5-ai-button-fade-out:not([icon-only])) .ui5-ai-button-inner::part(button) {
41
+ justify-content: flex-start;
42
+ }
43
+
44
+ :host([icon-only]) .ui5-ai-button-inner[_end-icon=""]::part(textButton),
45
+ :host(.ui5-ai-button-menu-to-button[icon-only]) .ui5-ai-button-inner::part(textButton) {
46
+ min-width: var(--_ui5_button_base_min_width) !important;
47
+ max-width: var(--_ui5_button_base_min_width) !important;
48
+ }
49
+
50
+ :host(.ui5-ai-button-menu-to-button) .ui5-ai-button-inner::part(button),
51
+ :host(.ui5-ai-button-fade-out:not([icon-only])) .ui5-ai-button-inner::part(button) {
52
+ justify-content: flex-start;
38
53
  }
39
54
 
40
- :host(:not([fade-out]):not([fade-mid]):not([fade-in])) .ui5-ai-button-text,
41
- :host(:not([fade-out]):not([fade-mid]):not([fade-in])) ::part(endIcon) {
55
+ :host([icon-only]) .ui5-ai-button-inner[_end-icon]:not([_end-icon=""])::part(button),
56
+ :host([icon-only]) .ui5-ai-button-inner[_hide-arrow-button]::part(button) {
57
+ justify-content: flex-start;
58
+ padding-inline-start: var(--_ui5_button_base_padding);
59
+ }
60
+
61
+ :host(.ui5-ai-button-fade-in[icon-only]) .ui5-ai-button-inner[_end-icon=""]::part(button) {
62
+ max-width: var(--_ui5_button_base_min_width);
63
+ }
64
+
65
+ :host([icon-only]) .ui5-ai-button-inner[_end-icon=""]::part(textButton),
66
+ :host(.ui5-ai-button-menu-to-button[icon-only]) .ui5-ai-button-inner::part(textButton) {
67
+ min-width: var(--_ui5_button_base_min_width);
68
+ max-width: var(--_ui5_button_base_min_width);
69
+ }
70
+
71
+ :host(:not(.ui5-ai-button-fade-out):not(.ui5-ai-button-fade-mid):not(.ui5-ai-button-fade-in)) .ui5-ai-button-text,
72
+ :host(:not(.ui5-ai-button-fade-out):not(.ui5-ai-button-fade-mid):not(.ui5-ai-button-fade-in)) ::part(endIcon),
73
+ :host(:not(.ui5-ai-button-fade-out):not(.ui5-ai-button-fade-mid):not(.ui5-ai-button-fade-in)) ::part(arrowButton) {
42
74
  opacity: 1;
43
75
  transform: translateY(0);
44
76
  }
45
77
 
46
- /* Fade out */
78
+ :host(.ui5-ai-button-button-to-menu) .ui5-ai-button-inner::part(endIcon),
79
+ :host(.ui5-ai-button-button-to-menu) .ui5-ai-button-inner::part(arrowButton) {
80
+ display: none;
81
+ transform: translateY(0);
82
+ opacity: 0;
83
+ }
47
84
 
48
- :host([fade-out]:not([fade-mid])) ::part(icon) {
85
+ :host(.ui5-ai-button-button-to-menu) .ui5-ai-button-inner::part(endIcon),
86
+ :host(.ui5-ai-button-button-to-menu) .ui5-ai-button-inner::part(arrowButton) {
87
+ display: none;
88
+ transform: translateY(0);
49
89
  opacity: 0;
50
- transform: translateY(-1rem);
51
- transition: opacity 0.05s ease-in-out 0.025s, transform 0.10s ease-in-out 0s;
52
90
  }
53
91
 
54
- :host([fade-out]:not([fade-mid])) .ui5-ai-button-text,
55
- :host([fade-out]:not([fade-mid])) ::part(endIcon) {
92
+ /* Fade out phase */
93
+
94
+ :host(.ui5-ai-button-fade-out) .ui5-ai-button-text {
56
95
  opacity: 0;
57
96
  transform: translateY(-1rem);
58
97
  transition: opacity 0.06s ease-in-out 0.12s, transform 0.08s ease-in-out 0.12s;
59
98
  }
60
99
 
61
- /* Fade mid */
100
+ :host(.ui5-ai-button-fade-out) ::part(icon)
101
+ {
102
+ opacity: 0;
103
+ transform: translateY(-1rem);
104
+ transition: opacity 0.05s ease-in-out 0.025s, transform 0.10s ease-in-out 0s;
105
+ }
62
106
 
63
- :host([fade-mid]) ::part(icon) {
107
+ :host(.ui5-ai-button-fade-out) ::part(endIcon) {
64
108
  opacity: 0;
65
- transform: translateY(1rem);
109
+ transform: translateY(-1rem);
110
+ transition: opacity 0.06s ease-in-out 0.12s, transform 0.08s ease-in-out 0.12s;
66
111
  }
67
112
 
68
- :host([fade-mid]) .ui5-ai-button-text,
69
- :host([fade-mid]) ::part(endIcon) {
113
+ /* Fade middle phase */
114
+
115
+ :host(.ui5-ai-button-fade-mid) .ui5-ai-button-text,
116
+ :host(.ui5-ai-button-fade-mid) ::part(icon),
117
+ :host(.ui5-ai-button-fade-mid) ::part(endIcon),
118
+ :host(.ui5-ai-button-fade-mid) ::part(arrowButton) {
70
119
  opacity: 0;
71
120
  transform: translateY(1rem);
72
121
  transition: none;
73
122
  }
74
123
 
75
- /* Fade in */
124
+ /* Fade in phase */
125
+
126
+ :host(.ui5-ai-button-fade-in) .ui5-ai-button-text {
127
+ opacity: 1;
128
+ transform: translateY(0);
129
+ transition: opacity 0.06s ease-in-out 0.12s, transform 0.08s ease-in-out 0.12s;
130
+ }
76
131
 
77
- :host([fade-in]) ::part(icon) {
132
+ :host(.ui5-ai-button-fade-in) ::part(icon) {
78
133
  opacity: 1;
79
134
  transform: translateY(0);
80
135
  transition: opacity 0.05s ease-in-out 0.025s, transform 0.10s ease-in-out 0s;
81
136
  }
82
137
 
83
- :host([fade-in]) .ui5-ai-button-text,
84
- :host([fade-in]) ::part(endIcon) {
138
+ :host(.ui5-ai-button-fade-in) ::part(endIcon) {
85
139
  opacity: 1;
86
140
  transform: translateY(0);
87
141
  transition: opacity 0.06s ease-in-out 0.12s, transform 0.08s ease-in-out 0.12s;
package/tsconfig.json CHANGED
@@ -7,21 +7,31 @@
7
7
  "compilerOptions": {
8
8
  "outDir": "dist",
9
9
  "experimentalDecorators": true,
10
- "verbatimModuleSyntax": true,
10
+ "composite": true,
11
+ "rootDir": "src",
12
+ "tsBuildInfoFile": "dist/.tsbuildinfo",
11
13
  "module": "NodeNext",
12
14
  "moduleResolution": "NodeNext",
13
- "jsx": "react-jsx",
14
- "jsxImportSource": "@ui5/webcomponents-base",
15
+ "verbatimModuleSyntax": true,
15
16
  "paths": {
16
17
  "@ui5/webcomponents-base/dist/*": [
17
18
  "../base/src/*"
18
19
  ],
19
- "@ui5/webcomponents/dist/*": [
20
- "../main/src/*"
20
+ "@ui5/webcomponents-localization/dist/*": [
21
+ "../localization/src/*"
21
22
  ],
22
23
  "@ui5/webcomponents-theming/dist/*": [
23
24
  "../theming/src/*"
24
25
  ],
26
+ "@ui5/webcomponents-icons/dist/*": [
27
+ "../icons/src/*"
28
+ ],
29
+ "@ui5/webcomponents-icons-business-suite/dist/*": [
30
+ "../icons-business-suite/src/*"
31
+ ],
32
+ "@ui5/webcomponents-icons-tnt/dist/*": [
33
+ "../icons-tnt/src/*"
34
+ ]
25
35
  },
26
36
  },
27
37
  "references": [
@@ -29,10 +39,19 @@
29
39
  "path": "../base"
30
40
  },
31
41
  {
32
- "path": "../main"
42
+ "path": "../localization"
33
43
  },
34
44
  {
35
45
  "path": "../theming"
36
46
  },
47
+ {
48
+ "path": "../icons"
49
+ },
50
+ {
51
+ "path": "../icons-business-suite"
52
+ },
53
+ {
54
+ "path": "../icons-tnt"
55
+ },
37
56
  ]
38
57
  }
@@ -1 +0,0 @@
1
- {"root":["../src/Assets.ts","../src/Button.ts","../src/ButtonState.ts","../src/ButtonTemplate.tsx","../src/PromptInput.ts","../src/PromptInputTemplate.tsx","../src/bundle.esm.ts","../src/bundle.scoped.config.ts","../src/bundle.scoped.esm.ts","../src/generated/i18n/i18n-defaults.ts","../src/generated/json-imports/Themes-fetch.ts","../src/generated/json-imports/Themes.ts","../src/generated/json-imports/i18n-fetch.ts","../src/generated/json-imports/i18n.ts","../src/generated/themes/Button.css.ts","../src/generated/themes/PromptInput.css.ts","../src/generated/themes/sap_horizon/parameters-bundle.css.ts","../src/generated/themes/sap_horizon_dark/parameters-bundle.css.ts","../src/generated/themes/sap_horizon_hcb/parameters-bundle.css.ts","../src/generated/themes/sap_horizon_hcw/parameters-bundle.css.ts"],"version":"5.6.2"}