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

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 (66) hide show
  1. package/.nyc_output/out.json +1 -0
  2. package/CHANGELOG.md +140 -0
  3. package/README.md +1 -0
  4. package/coverage/clover.xml +6 -0
  5. package/coverage/coverage-final.json +1 -0
  6. package/coverage/coverage-summary.json +2 -0
  7. package/coverage/lcov-report/base.css +224 -0
  8. package/coverage/lcov-report/block-navigation.js +87 -0
  9. package/coverage/lcov-report/favicon.png +0 -0
  10. package/coverage/lcov-report/index.html +101 -0
  11. package/coverage/lcov-report/prettify.css +1 -0
  12. package/coverage/lcov-report/prettify.js +2 -0
  13. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  14. package/coverage/lcov-report/sorter.js +196 -0
  15. package/coverage/lcov-report/src/generated/themes/Button.css.ts.html +109 -0
  16. package/coverage/lcov-report/src/generated/themes/index.html +116 -0
  17. package/coverage/lcov.info +0 -0
  18. package/cypress/specs/Button.cy.tsx +14 -0
  19. package/cypress/support/commands.ts +1 -0
  20. package/cypress/support/component.ts +3 -0
  21. package/cypress/tsconfig.json +44 -0
  22. package/cypress.config.js +10 -0
  23. package/dist/.tsbuildinfo +1 -0
  24. package/dist/Button.d.ts +44 -33
  25. package/dist/Button.js +115 -78
  26. package/dist/Button.js.map +1 -1
  27. package/dist/ButtonState.d.ts +10 -3
  28. package/dist/ButtonState.js +16 -3
  29. package/dist/ButtonState.js.map +1 -1
  30. package/dist/ButtonTemplate.js +2 -2
  31. package/dist/ButtonTemplate.js.map +1 -1
  32. package/dist/PromptInput.d.ts +1 -8
  33. package/dist/PromptInput.js +1 -11
  34. package/dist/PromptInput.js.map +1 -1
  35. package/dist/css/themes/Button.css +1 -1
  36. package/dist/custom-elements-internal.json +66 -14
  37. package/dist/custom-elements.json +57 -12
  38. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  39. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  40. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
  41. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
  42. package/dist/generated/themes/Button.css.d.ts +2 -3
  43. package/dist/generated/themes/Button.css.js +2 -3
  44. package/dist/generated/themes/Button.css.js.map +1 -1
  45. package/dist/generated/themes/PromptInput.css.d.ts +2 -3
  46. package/dist/generated/themes/PromptInput.css.js +2 -3
  47. package/dist/generated/themes/PromptInput.css.js.map +1 -1
  48. package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +2 -3
  49. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -2
  50. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  51. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +2 -3
  52. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -2
  53. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  54. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +2 -3
  55. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -2
  56. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
  57. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +2 -3
  58. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -2
  59. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
  60. package/dist/vscode.html-custom-data.json +14 -4
  61. package/dist/web-types.json +36 -8
  62. package/package.json +11 -8
  63. package/src/ButtonTemplate.tsx +8 -6
  64. package/src/themes/Button.css +75 -21
  65. package/tsconfig.json +25 -6
  66. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -3,7 +3,7 @@
3
3
  "tags": [
4
4
  {
5
5
  "name": "ui5-ai-button",
6
- "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\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.",
6
+ "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\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.",
7
7
  "attributes": [
8
8
  {
9
9
  "name": "design",
@@ -26,13 +26,18 @@
26
26
  "name": "state",
27
27
  "description": "Defines the current state of the component.",
28
28
  "values": []
29
+ },
30
+ {
31
+ "name": "arrow-button-pressed",
32
+ "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.",
33
+ "values": []
29
34
  }
30
35
  ],
31
36
  "references": []
32
37
  },
33
38
  {
34
39
  "name": "ui5-ai-button-state",
35
- "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\n---\n\n\n",
40
+ "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\n---\n\n\n",
36
41
  "attributes": [
37
42
  {
38
43
  "name": "name",
@@ -53,13 +58,18 @@
53
58
  "name": "end-icon",
54
59
  "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).",
55
60
  "values": []
61
+ },
62
+ {
63
+ "name": "show-arrow-button",
64
+ "description": "Defines if the component is in split button mode.",
65
+ "values": []
56
66
  }
57
67
  ],
58
68
  "references": []
59
69
  },
60
70
  {
61
71
  "name": "ui5-ai-prompt-input",
62
- "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\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.",
72
+ "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\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.",
63
73
  "attributes": [
64
74
  {
65
75
  "name": "value",
@@ -114,7 +124,7 @@
114
124
  },
115
125
  {
116
126
  "name": "show-suggestions",
117
- "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.",
127
+ "description": "Defines whether the component should show suggestions, if such are present.",
118
128
  "values": []
119
129
  }
120
130
  ],
@@ -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.8.0-rc.1",
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,27 @@
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" }
31
36
  }
32
37
  ],
33
38
  "slots": [
34
39
  {
35
40
  "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."
41
+ "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
42
  }
38
43
  ],
39
44
  "events": [
40
45
  {
41
46
  "name": "click",
42
47
  "description": "Fired when the component is activated either with a\nmouse/tap or by using the Enter or Space key."
48
+ },
49
+ {
50
+ "name": "arrow-button-click",
51
+ "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
52
  }
44
53
  ],
45
54
  "js": {
@@ -60,19 +69,28 @@
60
69
  "name": "state",
61
70
  "description": "Defines the current state of the component.",
62
71
  "value": { "type": "string | undefined" }
72
+ },
73
+ {
74
+ "name": "arrow-button-pressed",
75
+ "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.",
76
+ "value": { "type": "boolean" }
63
77
  }
64
78
  ],
65
79
  "events": [
66
80
  {
67
81
  "name": "click",
68
82
  "description": "Fired when the component is activated either with a\nmouse/tap or by using the Enter or Space key."
83
+ },
84
+ {
85
+ "name": "arrow-button-click",
86
+ "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
87
  }
70
88
  ]
71
89
  }
72
90
  },
73
91
  {
74
92
  "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",
93
+ "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
94
  "doc-url": "",
77
95
  "attributes": [
78
96
  {
@@ -94,6 +112,11 @@
94
112
  "name": "end-icon",
95
113
  "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
114
  "value": { "type": "string | undefined", "default": "undefined" }
115
+ },
116
+ {
117
+ "name": "show-arrow-button",
118
+ "description": "Defines if the component is in split button mode.",
119
+ "value": { "type": "boolean", "default": "false" }
97
120
  }
98
121
  ],
99
122
  "events": [],
@@ -118,6 +141,11 @@
118
141
  "name": "end-icon",
119
142
  "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
143
  "value": { "type": "string | undefined" }
144
+ },
145
+ {
146
+ "name": "show-arrow-button",
147
+ "description": "Defines if the component is in split button mode.",
148
+ "value": { "type": "boolean" }
121
149
  }
122
150
  ],
123
151
  "events": []
@@ -125,7 +153,7 @@
125
153
  },
126
154
  {
127
155
  "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.",
156
+ "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
157
  "doc-url": "",
130
158
  "attributes": [
131
159
  {
@@ -178,14 +206,14 @@
178
206
  },
179
207
  {
180
208
  "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.",
209
+ "description": "Defines whether the component should show suggestions, if such are present.",
182
210
  "value": { "type": "boolean", "default": "false" }
183
211
  }
184
212
  ],
185
213
  "slots": [
186
214
  {
187
215
  "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."
216
+ "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
217
  },
190
218
  {
191
219
  "name": "valueStateMessage",
@@ -257,7 +285,7 @@
257
285
  },
258
286
  {
259
287
  "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.",
288
+ "description": "Defines whether the component should show suggestions, if such are present.",
261
289
  "value": { "type": "boolean" }
262
290
  }
263
291
  ],
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-f6676abdd",
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": "nps test-cy-single",
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,13 @@
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-f6676abdd",
52
+ "@ui5/webcomponents-base": "0.0.0-f6676abdd",
53
+ "@ui5/webcomponents-icons": "0.0.0-f6676abdd",
54
+ "@ui5/webcomponents-theming": "0.0.0-f6676abdd"
52
55
  },
53
56
  "devDependencies": {
54
- "@ui5/webcomponents-tools": "0.0.0-f42e7c18c",
55
- "chromedriver": "^131.0.0"
57
+ "@ui5/webcomponents-tools": "0.0.0-f6676abdd",
58
+ "chromedriver": "^132.0.0"
56
59
  }
57
60
  }
@@ -1,22 +1,24 @@
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}
13
15
  >
14
16
  {this._hasText && (
15
17
  <div class="ui5-ai-button-text">{this._stateText}</div>
16
18
  )}
17
- </MainButton>
19
+ </SplitButton>
18
20
 
19
- <MainButton
21
+ <SplitButton
20
22
  class="ui5-ai-button-hidden"
21
23
  design={this.design}
22
24
  />
@@ -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"}