@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.
- package/.nyc_output/out.json +1 -0
- package/CHANGELOG.md +140 -0
- package/README.md +1 -0
- package/coverage/clover.xml +6 -0
- package/coverage/coverage-final.json +1 -0
- package/coverage/coverage-summary.json +2 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +101 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/src/generated/themes/Button.css.ts.html +109 -0
- package/coverage/lcov-report/src/generated/themes/index.html +116 -0
- package/coverage/lcov.info +0 -0
- package/cypress/specs/Button.cy.tsx +14 -0
- package/cypress/support/commands.ts +1 -0
- package/cypress/support/component.ts +3 -0
- package/cypress/tsconfig.json +44 -0
- package/cypress.config.js +10 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/Button.d.ts +44 -33
- package/dist/Button.js +115 -78
- package/dist/Button.js.map +1 -1
- package/dist/ButtonState.d.ts +10 -3
- package/dist/ButtonState.js +16 -3
- package/dist/ButtonState.js.map +1 -1
- package/dist/ButtonTemplate.js +2 -2
- package/dist/ButtonTemplate.js.map +1 -1
- package/dist/PromptInput.d.ts +1 -8
- package/dist/PromptInput.js +1 -11
- package/dist/PromptInput.js.map +1 -1
- package/dist/css/themes/Button.css +1 -1
- package/dist/custom-elements-internal.json +66 -14
- package/dist/custom-elements.json +57 -12
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/themes/Button.css.d.ts +2 -3
- package/dist/generated/themes/Button.css.js +2 -3
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/generated/themes/PromptInput.css.d.ts +2 -3
- package/dist/generated/themes/PromptInput.css.js +2 -3
- package/dist/generated/themes/PromptInput.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +2 -3
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -2
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +2 -3
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -2
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +2 -3
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -2
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +2 -3
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -2
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +14 -4
- package/dist/web-types.json +36 -8
- package/package.json +11 -8
- package/src/ButtonTemplate.tsx +8 -6
- package/src/themes/Button.css +75 -21
- package/tsconfig.json +25 -6
- 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
|
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-
|
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
|
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
|
127
|
+
"description": "Defines whether the component should show suggestions, if such are present.",
|
118
128
|
"values": []
|
119
129
|
}
|
120
130
|
],
|
package/dist/web-types.json
CHANGED
@@ -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.
|
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
|
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
|
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-
|
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
|
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
|
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
|
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
|
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-
|
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": "
|
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-
|
49
|
-
"@ui5/webcomponents-base": "0.0.0-
|
50
|
-
"@ui5/webcomponents-icons": "0.0.0-
|
51
|
-
"@ui5/webcomponents-theming": "0.0.0-
|
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-
|
55
|
-
"chromedriver": "^
|
57
|
+
"@ui5/webcomponents-tools": "0.0.0-f6676abdd",
|
58
|
+
"chromedriver": "^132.0.0"
|
56
59
|
}
|
57
60
|
}
|
package/src/ButtonTemplate.tsx
CHANGED
@@ -1,22 +1,24 @@
|
|
1
|
-
import
|
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
|
-
<
|
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
|
-
|
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
|
-
</
|
19
|
+
</SplitButton>
|
18
20
|
|
19
|
-
<
|
21
|
+
<SplitButton
|
20
22
|
class="ui5-ai-button-hidden"
|
21
23
|
design={this.design}
|
22
24
|
/>
|
package/src/themes/Button.css
CHANGED
@@ -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
|
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(
|
36
|
-
|
37
|
-
|
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(
|
41
|
-
:host(
|
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
|
-
|
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(
|
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
|
-
|
55
|
-
|
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
|
-
|
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(
|
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
|
-
|
69
|
-
|
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(
|
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(
|
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
|
-
"
|
10
|
+
"composite": true,
|
11
|
+
"rootDir": "src",
|
12
|
+
"tsBuildInfoFile": "dist/.tsbuildinfo",
|
11
13
|
"module": "NodeNext",
|
12
14
|
"moduleResolution": "NodeNext",
|
13
|
-
"
|
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
|
-
"../
|
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": "../
|
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"}
|