@ui5/webcomponents-ai 0.0.0-d473b9686 → 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 (199) hide show
  1. package/.nyc_output/out.json +1 -0
  2. package/CHANGELOG.md +449 -0
  3. package/README.md +6 -7
  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 +119 -2
  25. package/dist/Button.js +241 -12
  26. package/dist/Button.js.map +1 -1
  27. package/dist/ButtonState.d.ts +67 -0
  28. package/dist/ButtonState.js +64 -0
  29. package/dist/ButtonState.js.map +1 -0
  30. package/dist/ButtonTemplate.d.ts +2 -0
  31. package/dist/ButtonTemplate.js +6 -0
  32. package/dist/ButtonTemplate.js.map +1 -0
  33. package/dist/PromptInput.d.ts +147 -0
  34. package/dist/PromptInput.js +225 -0
  35. package/dist/PromptInput.js.map +1 -0
  36. package/dist/PromptInputTemplate.d.ts +2 -0
  37. package/dist/PromptInputTemplate.js +12 -0
  38. package/dist/PromptInputTemplate.js.map +1 -0
  39. package/dist/bundle.esm.js +3 -1
  40. package/dist/bundle.esm.js.map +1 -1
  41. package/dist/bundle.scoped.config.d.ts +1 -0
  42. package/dist/bundle.scoped.config.js +3 -0
  43. package/dist/bundle.scoped.config.js.map +1 -0
  44. package/dist/bundle.scoped.esm.d.ts +2 -1
  45. package/dist/bundle.scoped.esm.js +2 -2
  46. package/dist/bundle.scoped.esm.js.map +1 -1
  47. package/dist/css/themes/Button.css +1 -0
  48. package/dist/css/themes/PromptInput.css +1 -0
  49. package/dist/custom-elements-internal.json +609 -1
  50. package/dist/custom-elements.json +536 -1
  51. package/dist/generated/assets/i18n/messagebundle_ar.json +1 -0
  52. package/dist/generated/assets/i18n/messagebundle_bg.json +1 -0
  53. package/dist/generated/assets/i18n/messagebundle_ca.json +1 -0
  54. package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -0
  55. package/dist/generated/assets/i18n/messagebundle_cs.json +1 -0
  56. package/dist/generated/assets/i18n/messagebundle_cy.json +1 -0
  57. package/dist/generated/assets/i18n/messagebundle_da.json +1 -0
  58. package/dist/generated/assets/i18n/messagebundle_de.json +1 -0
  59. package/dist/generated/assets/i18n/messagebundle_el.json +1 -0
  60. package/dist/generated/assets/i18n/messagebundle_en.json +1 -0
  61. package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -0
  62. package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -0
  63. package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -0
  64. package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -0
  65. package/dist/generated/assets/i18n/messagebundle_es.json +1 -0
  66. package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -0
  67. package/dist/generated/assets/i18n/messagebundle_et.json +1 -0
  68. package/dist/generated/assets/i18n/messagebundle_fi.json +1 -0
  69. package/dist/generated/assets/i18n/messagebundle_fr.json +1 -0
  70. package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -0
  71. package/dist/generated/assets/i18n/messagebundle_hi.json +1 -0
  72. package/dist/generated/assets/i18n/messagebundle_hr.json +1 -0
  73. package/dist/generated/assets/i18n/messagebundle_hu.json +1 -0
  74. package/dist/generated/assets/i18n/messagebundle_it.json +1 -0
  75. package/dist/generated/assets/i18n/messagebundle_iw.json +1 -0
  76. package/dist/generated/assets/i18n/messagebundle_ja.json +1 -0
  77. package/dist/generated/assets/i18n/messagebundle_kk.json +1 -0
  78. package/dist/generated/assets/i18n/messagebundle_ko.json +1 -0
  79. package/dist/generated/assets/i18n/messagebundle_lt.json +1 -0
  80. package/dist/generated/assets/i18n/messagebundle_lv.json +1 -0
  81. package/dist/generated/assets/i18n/messagebundle_mk.json +1 -0
  82. package/dist/generated/assets/i18n/messagebundle_ms.json +1 -0
  83. package/dist/generated/assets/i18n/messagebundle_nl.json +1 -0
  84. package/dist/generated/assets/i18n/messagebundle_no.json +1 -0
  85. package/dist/generated/assets/i18n/messagebundle_pl.json +1 -0
  86. package/dist/generated/assets/i18n/messagebundle_pt.json +1 -0
  87. package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -0
  88. package/dist/generated/assets/i18n/messagebundle_ro.json +1 -0
  89. package/dist/generated/assets/i18n/messagebundle_ru.json +1 -0
  90. package/dist/generated/assets/i18n/messagebundle_sh.json +1 -0
  91. package/dist/generated/assets/i18n/messagebundle_sk.json +1 -0
  92. package/dist/generated/assets/i18n/messagebundle_sl.json +1 -0
  93. package/dist/generated/assets/i18n/messagebundle_sr.json +1 -0
  94. package/dist/generated/assets/i18n/messagebundle_sv.json +1 -0
  95. package/dist/generated/assets/i18n/messagebundle_th.json +1 -0
  96. package/dist/generated/assets/i18n/messagebundle_tr.json +1 -0
  97. package/dist/generated/assets/i18n/messagebundle_uk.json +1 -0
  98. package/dist/generated/assets/i18n/messagebundle_vi.json +1 -0
  99. package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -0
  100. package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -0
  101. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  102. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  103. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
  104. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
  105. package/dist/generated/i18n/i18n-defaults.d.ts +4 -1
  106. package/dist/generated/i18n/i18n-defaults.js +3 -1
  107. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  108. package/dist/generated/json-imports/Themes-fetch.d.ts +1 -0
  109. package/dist/generated/json-imports/Themes-fetch.js +21 -0
  110. package/dist/generated/json-imports/Themes-fetch.js.map +1 -0
  111. package/dist/generated/json-imports/Themes.js.map +1 -1
  112. package/dist/generated/json-imports/i18n-fetch.d.ts +1 -0
  113. package/dist/generated/json-imports/i18n-fetch.js +118 -0
  114. package/dist/generated/json-imports/i18n-fetch.js.map +1 -0
  115. package/dist/generated/json-imports/i18n.d.ts +1 -0
  116. package/dist/generated/json-imports/i18n.js +117 -1
  117. package/dist/generated/json-imports/i18n.js.map +1 -1
  118. package/dist/generated/themes/Button.css.d.ts +2 -3
  119. package/dist/generated/themes/Button.css.js +2 -2
  120. package/dist/generated/themes/Button.css.js.map +1 -1
  121. package/dist/generated/themes/PromptInput.css.d.ts +2 -0
  122. package/dist/generated/themes/PromptInput.css.js +8 -0
  123. package/dist/generated/themes/PromptInput.css.js.map +1 -0
  124. package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +2 -3
  125. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -2
  126. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  127. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +2 -3
  128. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -2
  129. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  130. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +2 -3
  131. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -2
  132. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
  133. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +2 -3
  134. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -2
  135. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
  136. package/dist/vscode.html-custom-data.json +131 -1
  137. package/dist/web-types.json +315 -0
  138. package/package.json +11 -8
  139. package/src/ButtonTemplate.tsx +26 -0
  140. package/src/PromptInputTemplate.tsx +49 -0
  141. package/src/i18n/messagebundle.properties +6 -0
  142. package/src/i18n/messagebundle_ar.properties +4 -0
  143. package/src/i18n/messagebundle_bg.properties +4 -0
  144. package/src/i18n/messagebundle_ca.properties +4 -0
  145. package/src/i18n/messagebundle_cnr.properties +4 -0
  146. package/src/i18n/messagebundle_cs.properties +4 -0
  147. package/src/i18n/messagebundle_cy.properties +4 -0
  148. package/src/i18n/messagebundle_da.properties +4 -0
  149. package/src/i18n/messagebundle_de.properties +4 -0
  150. package/src/i18n/messagebundle_el.properties +4 -0
  151. package/src/i18n/messagebundle_en.properties +4 -0
  152. package/src/i18n/messagebundle_en_GB.properties +4 -0
  153. package/src/i18n/messagebundle_en_US_sappsd.properties +4 -0
  154. package/src/i18n/messagebundle_en_US_saprigi.properties +4 -0
  155. package/src/i18n/messagebundle_en_US_saptrc.properties +4 -0
  156. package/src/i18n/messagebundle_es.properties +4 -0
  157. package/src/i18n/messagebundle_es_MX.properties +4 -0
  158. package/src/i18n/messagebundle_et.properties +4 -0
  159. package/src/i18n/messagebundle_fi.properties +4 -0
  160. package/src/i18n/messagebundle_fr.properties +4 -0
  161. package/src/i18n/messagebundle_fr_CA.properties +4 -0
  162. package/src/i18n/messagebundle_hi.properties +4 -0
  163. package/src/i18n/messagebundle_hr.properties +4 -0
  164. package/src/i18n/messagebundle_hu.properties +4 -0
  165. package/src/i18n/messagebundle_id.properties +4 -0
  166. package/src/i18n/messagebundle_it.properties +4 -0
  167. package/src/i18n/messagebundle_iw.properties +4 -0
  168. package/src/i18n/messagebundle_ja.properties +4 -0
  169. package/src/i18n/messagebundle_kk.properties +4 -0
  170. package/src/i18n/messagebundle_ko.properties +4 -0
  171. package/src/i18n/messagebundle_lt.properties +4 -0
  172. package/src/i18n/messagebundle_lv.properties +4 -0
  173. package/src/i18n/messagebundle_mk.properties +4 -0
  174. package/src/i18n/messagebundle_ms.properties +4 -0
  175. package/src/i18n/messagebundle_nl.properties +4 -0
  176. package/src/i18n/messagebundle_no.properties +4 -0
  177. package/src/i18n/messagebundle_pl.properties +4 -0
  178. package/src/i18n/messagebundle_pt.properties +4 -0
  179. package/src/i18n/messagebundle_pt_PT.properties +4 -0
  180. package/src/i18n/messagebundle_ro.properties +4 -0
  181. package/src/i18n/messagebundle_ru.properties +4 -0
  182. package/src/i18n/messagebundle_sh.properties +4 -0
  183. package/src/i18n/messagebundle_sk.properties +4 -0
  184. package/src/i18n/messagebundle_sl.properties +4 -0
  185. package/src/i18n/messagebundle_sr.properties +4 -0
  186. package/src/i18n/messagebundle_sv.properties +4 -0
  187. package/src/i18n/messagebundle_th.properties +4 -0
  188. package/src/i18n/messagebundle_tr.properties +4 -0
  189. package/src/i18n/messagebundle_uk.properties +4 -0
  190. package/src/i18n/messagebundle_vi.properties +4 -0
  191. package/src/i18n/messagebundle_zh_CN.properties +4 -0
  192. package/src/i18n/messagebundle_zh_TW.properties +4 -0
  193. package/src/themes/Button.css +142 -0
  194. package/src/themes/PromptInput.css +30 -0
  195. package/tsconfig.json +55 -26
  196. package/dist/generated/templates/ButtonTemplate.lit.d.ts +0 -4
  197. package/dist/generated/templates/ButtonTemplate.lit.js +0 -5
  198. package/dist/generated/templates/ButtonTemplate.lit.js.map +0 -1
  199. package/src/Button.hbs +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"parameters-bundle.css.js","sourceRoot":"","sources":["../../../../src/generated/themes/sap_horizon/parameters-bundle.css.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAc,EAAC,WAAW,EAAC,uBAAuB,EAAC,QAAQ,EAAC,6CAA6C,EAAC,OAAO,EAAC,EAAE,EAAC,CAAC;AACrI,eAAe,SAAS,CAAC","sourcesContent":["import type { StyleData } from \"@ui5/webcomponents-base/dist/types.js\";\n\nconst styleData: StyleData = {packageName:\"@ui5/webcomponents-ai\",fileName:\"themes/sap_horizon/parameters-bundle.css.ts\",content:``};\nexport default styleData;\n\t"]}
1
+ {"version":3,"file":"parameters-bundle.css.js","sourceRoot":"","sources":["../../../../src/generated/themes/sap_horizon/parameters-bundle.css.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,CAAA","sourcesContent":["export default ``"]}
@@ -1,3 +1,2 @@
1
- import type { StyleData } from "@ui5/webcomponents-base/dist/types.js";
2
- declare const styleData: StyleData;
3
- export default styleData;
1
+ declare const _default: "";
2
+ export default _default;
@@ -1,3 +1,2 @@
1
- const styleData = { packageName: "@ui5/webcomponents-ai", fileName: "themes/sap_horizon_dark/parameters-bundle.css.ts", content: `` };
2
- export default styleData;
1
+ export default ``;
3
2
  //# sourceMappingURL=parameters-bundle.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parameters-bundle.css.js","sourceRoot":"","sources":["../../../../src/generated/themes/sap_horizon_dark/parameters-bundle.css.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAc,EAAC,WAAW,EAAC,uBAAuB,EAAC,QAAQ,EAAC,kDAAkD,EAAC,OAAO,EAAC,EAAE,EAAC,CAAC;AAC1I,eAAe,SAAS,CAAC","sourcesContent":["import type { StyleData } from \"@ui5/webcomponents-base/dist/types.js\";\n\nconst styleData: StyleData = {packageName:\"@ui5/webcomponents-ai\",fileName:\"themes/sap_horizon_dark/parameters-bundle.css.ts\",content:``};\nexport default styleData;\n\t"]}
1
+ {"version":3,"file":"parameters-bundle.css.js","sourceRoot":"","sources":["../../../../src/generated/themes/sap_horizon_dark/parameters-bundle.css.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,CAAA","sourcesContent":["export default ``"]}
@@ -1,3 +1,2 @@
1
- import type { StyleData } from "@ui5/webcomponents-base/dist/types.js";
2
- declare const styleData: StyleData;
3
- export default styleData;
1
+ declare const _default: "";
2
+ export default _default;
@@ -1,3 +1,2 @@
1
- const styleData = { packageName: "@ui5/webcomponents-ai", fileName: "themes/sap_horizon_hcb/parameters-bundle.css.ts", content: `` };
2
- export default styleData;
1
+ export default ``;
3
2
  //# sourceMappingURL=parameters-bundle.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parameters-bundle.css.js","sourceRoot":"","sources":["../../../../src/generated/themes/sap_horizon_hcb/parameters-bundle.css.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAc,EAAC,WAAW,EAAC,uBAAuB,EAAC,QAAQ,EAAC,iDAAiD,EAAC,OAAO,EAAC,EAAE,EAAC,CAAC;AACzI,eAAe,SAAS,CAAC","sourcesContent":["import type { StyleData } from \"@ui5/webcomponents-base/dist/types.js\";\n\nconst styleData: StyleData = {packageName:\"@ui5/webcomponents-ai\",fileName:\"themes/sap_horizon_hcb/parameters-bundle.css.ts\",content:``};\nexport default styleData;\n\t"]}
1
+ {"version":3,"file":"parameters-bundle.css.js","sourceRoot":"","sources":["../../../../src/generated/themes/sap_horizon_hcb/parameters-bundle.css.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,CAAA","sourcesContent":["export default ``"]}
@@ -1,3 +1,2 @@
1
- import type { StyleData } from "@ui5/webcomponents-base/dist/types.js";
2
- declare const styleData: StyleData;
3
- export default styleData;
1
+ declare const _default: "";
2
+ export default _default;
@@ -1,3 +1,2 @@
1
- const styleData = { packageName: "@ui5/webcomponents-ai", fileName: "themes/sap_horizon_hcw/parameters-bundle.css.ts", content: `` };
2
- export default styleData;
1
+ export default ``;
3
2
  //# sourceMappingURL=parameters-bundle.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parameters-bundle.css.js","sourceRoot":"","sources":["../../../../src/generated/themes/sap_horizon_hcw/parameters-bundle.css.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAc,EAAC,WAAW,EAAC,uBAAuB,EAAC,QAAQ,EAAC,iDAAiD,EAAC,OAAO,EAAC,EAAE,EAAC,CAAC;AACzI,eAAe,SAAS,CAAC","sourcesContent":["import type { StyleData } from \"@ui5/webcomponents-base/dist/types.js\";\n\nconst styleData: StyleData = {packageName:\"@ui5/webcomponents-ai\",fileName:\"themes/sap_horizon_hcw/parameters-bundle.css.ts\",content:``};\nexport default styleData;\n\t"]}
1
+ {"version":3,"file":"parameters-bundle.css.js","sourceRoot":"","sources":["../../../../src/generated/themes/sap_horizon_hcw/parameters-bundle.css.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,CAAA","sourcesContent":["export default ``"]}
@@ -1,4 +1,134 @@
1
1
  {
2
2
  "version": 1.1,
3
- "tags": []
3
+ "tags": [
4
+ {
5
+ "name": "ui5-ai-button",
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
+ "attributes": [
8
+ {
9
+ "name": "design",
10
+ "description": "Defines the component design.",
11
+ "values": [
12
+ { "name": "Default" },
13
+ { "name": "Positive" },
14
+ { "name": "Negative" },
15
+ { "name": "Transparent" },
16
+ { "name": "Emphasized" },
17
+ { "name": "Attention" }
18
+ ]
19
+ },
20
+ {
21
+ "name": "disabled",
22
+ "description": "Defines whether the component is disabled.\nA disabled component can't be pressed or\nfocused, and it is not in the tab chain.",
23
+ "values": []
24
+ },
25
+ {
26
+ "name": "state",
27
+ "description": "Defines the current state of the component.",
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": []
34
+ }
35
+ ],
36
+ "references": []
37
+ },
38
+ {
39
+ "name": "ui5-ai-button-state",
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",
41
+ "attributes": [
42
+ {
43
+ "name": "name",
44
+ "description": "Defines the name of the button state.",
45
+ "values": []
46
+ },
47
+ {
48
+ "name": "text",
49
+ "description": "Defines the text of the button in this state.",
50
+ "values": []
51
+ },
52
+ {
53
+ "name": "icon",
54
+ "description": "Defines the icon to be displayed as graphical element within the component before 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
+ "values": []
56
+ },
57
+ {
58
+ "name": "end-icon",
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).",
60
+ "values": []
61
+ },
62
+ {
63
+ "name": "show-arrow-button",
64
+ "description": "Defines if the component is in split button mode.",
65
+ "values": []
66
+ }
67
+ ],
68
+ "references": []
69
+ },
70
+ {
71
+ "name": "ui5-ai-prompt-input",
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.",
73
+ "attributes": [
74
+ {
75
+ "name": "value",
76
+ "description": "Defines the value of the component.",
77
+ "values": []
78
+ },
79
+ {
80
+ "name": "placeholder",
81
+ "description": "Defines a short hint intended to aid the user with data entry when the\ncomponent has no value.",
82
+ "values": []
83
+ },
84
+ {
85
+ "name": "label",
86
+ "description": "Defines the label of the input field.",
87
+ "values": []
88
+ },
89
+ {
90
+ "name": "show-clear-icon",
91
+ "description": "Defines whether the clear icon of the input will be shown.",
92
+ "values": []
93
+ },
94
+ {
95
+ "name": "show-exceeded-text",
96
+ "description": "Determines whether the characters exceeding the maximum allowed character count are visible\nin the component.\n\nIf set to `false`, the user is not allowed to enter more characters than what is set in the\n`maxlength` property.\nIf set to `true` the characters exceeding the `maxlength` value are selected on\npaste and the counter below the component displays their number.",
97
+ "values": []
98
+ },
99
+ {
100
+ "name": "disabled",
101
+ "description": "Defines whether the component is in disabled state.\n\n**Note:** A disabled component is completely noninteractive.",
102
+ "values": []
103
+ },
104
+ {
105
+ "name": "readonly",
106
+ "description": "Defines whether the component is read-only.\n\n**Note:** A read-only component is not editable,\nbut still provides visual feedback upon user interaction.",
107
+ "values": []
108
+ },
109
+ {
110
+ "name": "maxlength",
111
+ "description": "Sets the maximum number of characters available in the input field.",
112
+ "values": []
113
+ },
114
+ {
115
+ "name": "value-state",
116
+ "description": "Defines the value state of the component.",
117
+ "values": [
118
+ { "name": "Positive" },
119
+ { "name": "Negative" },
120
+ { "name": "None" },
121
+ { "name": "Critical" },
122
+ { "name": "Information" }
123
+ ]
124
+ },
125
+ {
126
+ "name": "show-suggestions",
127
+ "description": "Defines whether the component should show suggestions, if such are present.",
128
+ "values": []
129
+ }
130
+ ],
131
+ "references": []
132
+ }
133
+ ]
4
134
  }
@@ -0,0 +1,315 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
+ "name": "@ui5/webcomponents-ai",
4
+ "version": "2.8.0-rc.1",
5
+ "description-markup": "markdown",
6
+ "contributions": {
7
+ "html": {
8
+ "elements": [
9
+ {
10
+ "name": "ui5-ai-button",
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
+ "doc-url": "",
13
+ "attributes": [
14
+ {
15
+ "name": "design",
16
+ "description": "Defines the component design.",
17
+ "value": {
18
+ "type": "\"Default\" | \"Positive\" | \"Negative\" | \"Transparent\" | \"Emphasized\" | \"Attention\" | undefined",
19
+ "default": "\"Default\""
20
+ }
21
+ },
22
+ {
23
+ "name": "disabled",
24
+ "description": "Defines whether the component is disabled.\nA disabled component can't be pressed or\nfocused, and it is not in the tab chain.",
25
+ "value": { "type": "boolean", "default": "false" }
26
+ },
27
+ {
28
+ "name": "state",
29
+ "description": "Defines the current state of the component.",
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
+ "slots": [
39
+ {
40
+ "name": "default",
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."
42
+ }
43
+ ],
44
+ "events": [
45
+ {
46
+ "name": "click",
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."
52
+ }
53
+ ],
54
+ "js": {
55
+ "properties": [
56
+ {
57
+ "name": "design",
58
+ "description": "Defines the component design.",
59
+ "value": {
60
+ "type": "\"Default\" | \"Positive\" | \"Negative\" | \"Transparent\" | \"Emphasized\" | \"Attention\" | undefined"
61
+ }
62
+ },
63
+ {
64
+ "name": "disabled",
65
+ "description": "Defines whether the component is disabled.\nA disabled component can't be pressed or\nfocused, and it is not in the tab chain.",
66
+ "value": { "type": "boolean" }
67
+ },
68
+ {
69
+ "name": "state",
70
+ "description": "Defines the current state of the component.",
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" }
77
+ }
78
+ ],
79
+ "events": [
80
+ {
81
+ "name": "click",
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."
87
+ }
88
+ ]
89
+ }
90
+ },
91
+ {
92
+ "name": "ui5-ai-button-state",
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",
94
+ "doc-url": "",
95
+ "attributes": [
96
+ {
97
+ "name": "name",
98
+ "description": "Defines the name of the button state.",
99
+ "value": { "type": "string | undefined", "default": "undefined" }
100
+ },
101
+ {
102
+ "name": "text",
103
+ "description": "Defines the text of the button in this state.",
104
+ "value": { "type": "string | undefined", "default": "undefined" }
105
+ },
106
+ {
107
+ "name": "icon",
108
+ "description": "Defines the icon to be displayed as graphical element within the component before 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).",
109
+ "value": { "type": "string | undefined", "default": "undefined" }
110
+ },
111
+ {
112
+ "name": "end-icon",
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).",
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" }
120
+ }
121
+ ],
122
+ "events": [],
123
+ "js": {
124
+ "properties": [
125
+ {
126
+ "name": "name",
127
+ "description": "Defines the name of the button state.",
128
+ "value": { "type": "string | undefined" }
129
+ },
130
+ {
131
+ "name": "text",
132
+ "description": "Defines the text of the button in this state.",
133
+ "value": { "type": "string | undefined" }
134
+ },
135
+ {
136
+ "name": "icon",
137
+ "description": "Defines the icon to be displayed as graphical element within the component before 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).",
138
+ "value": { "type": "string | undefined" }
139
+ },
140
+ {
141
+ "name": "end-icon",
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).",
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" }
149
+ }
150
+ ],
151
+ "events": []
152
+ }
153
+ },
154
+ {
155
+ "name": "ui5-ai-prompt-input",
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.",
157
+ "doc-url": "",
158
+ "attributes": [
159
+ {
160
+ "name": "value",
161
+ "description": "Defines the value of the component.",
162
+ "value": { "type": "string", "default": "\"\"" }
163
+ },
164
+ {
165
+ "name": "placeholder",
166
+ "description": "Defines a short hint intended to aid the user with data entry when the\ncomponent has no value.",
167
+ "value": { "type": "string | undefined", "default": "undefined" }
168
+ },
169
+ {
170
+ "name": "label",
171
+ "description": "Defines the label of the input field.",
172
+ "value": { "type": "string | undefined", "default": "undefined" }
173
+ },
174
+ {
175
+ "name": "show-clear-icon",
176
+ "description": "Defines whether the clear icon of the input will be shown.",
177
+ "value": { "type": "boolean", "default": "false" }
178
+ },
179
+ {
180
+ "name": "show-exceeded-text",
181
+ "description": "Determines whether the characters exceeding the maximum allowed character count are visible\nin the component.\n\nIf set to `false`, the user is not allowed to enter more characters than what is set in the\n`maxlength` property.\nIf set to `true` the characters exceeding the `maxlength` value are selected on\npaste and the counter below the component displays their number.",
182
+ "value": { "type": "boolean", "default": "false" }
183
+ },
184
+ {
185
+ "name": "disabled",
186
+ "description": "Defines whether the component is in disabled state.\n\n**Note:** A disabled component is completely noninteractive.",
187
+ "value": { "type": "boolean", "default": "false" }
188
+ },
189
+ {
190
+ "name": "readonly",
191
+ "description": "Defines whether the component is read-only.\n\n**Note:** A read-only component is not editable,\nbut still provides visual feedback upon user interaction.",
192
+ "value": { "type": "boolean", "default": "false" }
193
+ },
194
+ {
195
+ "name": "maxlength",
196
+ "description": "Sets the maximum number of characters available in the input field.",
197
+ "value": { "type": "number | undefined", "default": "undefined" }
198
+ },
199
+ {
200
+ "name": "value-state",
201
+ "description": "Defines the value state of the component.",
202
+ "value": {
203
+ "type": "\"Positive\" | \"Negative\" | \"None\" | \"Critical\" | \"Information\"",
204
+ "default": "\"None\""
205
+ }
206
+ },
207
+ {
208
+ "name": "show-suggestions",
209
+ "description": "Defines whether the component should show suggestions, if such are present.",
210
+ "value": { "type": "boolean", "default": "false" }
211
+ }
212
+ ],
213
+ "slots": [
214
+ {
215
+ "name": "default",
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."
217
+ },
218
+ {
219
+ "name": "valueStateMessage",
220
+ "description": "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."
221
+ }
222
+ ],
223
+ "events": [
224
+ {
225
+ "name": "submit",
226
+ "description": "Fired when the input operation has finished by pressing Enter\nor AI button is clicked."
227
+ },
228
+ {
229
+ "name": "input",
230
+ "description": "Fired when the value of the component changes at each keystroke,\nand when a suggestion item has been selected."
231
+ },
232
+ {
233
+ "name": "change",
234
+ "description": "Fired when the input operation has finished by pressing Enter\nor on focusout."
235
+ }
236
+ ],
237
+ "js": {
238
+ "properties": [
239
+ {
240
+ "name": "value",
241
+ "description": "Defines the value of the component.",
242
+ "value": { "type": "string" }
243
+ },
244
+ {
245
+ "name": "placeholder",
246
+ "description": "Defines a short hint intended to aid the user with data entry when the\ncomponent has no value.",
247
+ "value": { "type": "string | undefined" }
248
+ },
249
+ {
250
+ "name": "label",
251
+ "description": "Defines the label of the input field.",
252
+ "value": { "type": "string | undefined" }
253
+ },
254
+ {
255
+ "name": "show-clear-icon",
256
+ "description": "Defines whether the clear icon of the input will be shown.",
257
+ "value": { "type": "boolean" }
258
+ },
259
+ {
260
+ "name": "show-exceeded-text",
261
+ "description": "Determines whether the characters exceeding the maximum allowed character count are visible\nin the component.\n\nIf set to `false`, the user is not allowed to enter more characters than what is set in the\n`maxlength` property.\nIf set to `true` the characters exceeding the `maxlength` value are selected on\npaste and the counter below the component displays their number.",
262
+ "value": { "type": "boolean" }
263
+ },
264
+ {
265
+ "name": "disabled",
266
+ "description": "Defines whether the component is in disabled state.\n\n**Note:** A disabled component is completely noninteractive.",
267
+ "value": { "type": "boolean" }
268
+ },
269
+ {
270
+ "name": "readonly",
271
+ "description": "Defines whether the component is read-only.\n\n**Note:** A read-only component is not editable,\nbut still provides visual feedback upon user interaction.",
272
+ "value": { "type": "boolean" }
273
+ },
274
+ {
275
+ "name": "maxlength",
276
+ "description": "Sets the maximum number of characters available in the input field.",
277
+ "value": { "type": "number | undefined" }
278
+ },
279
+ {
280
+ "name": "value-state",
281
+ "description": "Defines the value state of the component.",
282
+ "value": {
283
+ "type": "\"Positive\" | \"Negative\" | \"None\" | \"Critical\" | \"Information\""
284
+ }
285
+ },
286
+ {
287
+ "name": "show-suggestions",
288
+ "description": "Defines whether the component should show suggestions, if such are present.",
289
+ "value": { "type": "boolean" }
290
+ }
291
+ ],
292
+ "events": [
293
+ {
294
+ "name": "submit",
295
+ "description": "Fired when the input operation has finished by pressing Enter\nor AI button is clicked."
296
+ },
297
+ {
298
+ "name": "input",
299
+ "description": "Fired when the value of the component changes at each keystroke,\nand when a suggestion item has been selected."
300
+ },
301
+ {
302
+ "name": "change",
303
+ "description": "Fired when the input operation has finished by pressing Enter\nor on focusout."
304
+ }
305
+ ]
306
+ }
307
+ }
308
+ ]
309
+ },
310
+ "css": {
311
+ "properties": [],
312
+ "pseudo-elements": []
313
+ }
314
+ }
315
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-ai",
3
- "version": "0.0.0-d473b9686",
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-d473b9686",
49
- "@ui5/webcomponents-base": "0.0.0-d473b9686",
50
- "@ui5/webcomponents-icons": "0.0.0-d473b9686",
51
- "@ui5/webcomponents-theming": "0.0.0-d473b9686"
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-d473b9686",
55
- "chromedriver": "^125.0.0"
57
+ "@ui5/webcomponents-tools": "0.0.0-f6676abdd",
58
+ "chromedriver": "^132.0.0"
56
59
  }
57
60
  }
@@ -0,0 +1,26 @@
1
+ import SplitButton from "@ui5/webcomponents/dist/SplitButton.js";
2
+ import type Button from "./Button.js";
3
+
4
+ export default function ButtonTemplate(this: Button) {
5
+ return (<>
6
+ <SplitButton
7
+ class="ui5-ai-button-inner"
8
+ design={this.design}
9
+ icon={this._stateIcon}
10
+ disabled={this.disabled}
11
+ _endIcon={this._stateEndIcon}
12
+ _hideArrowButton={this._hideArrowButton}
13
+ onClick={this._onClick}
14
+ onArrowClick={this._onArrowClick}
15
+ >
16
+ {this._hasText && (
17
+ <div class="ui5-ai-button-text">{this._stateText}</div>
18
+ )}
19
+ </SplitButton>
20
+
21
+ <SplitButton
22
+ class="ui5-ai-button-hidden"
23
+ design={this.design}
24
+ />
25
+ </>);
26
+ }
@@ -0,0 +1,49 @@
1
+ import type PromptInput from "./PromptInput.js";
2
+ import Label from "@ui5/webcomponents/dist/Label.js";
3
+ import Input from "@ui5/webcomponents/dist/Input.js";
4
+ import Button from "@ui5/webcomponents/dist/Button.js";
5
+ import paperPlane from "@ui5/webcomponents-icons/dist/paper-plane.js";
6
+
7
+ export default function PromptInputTemplate(this: PromptInput) {
8
+ return (
9
+ <div class="ai-prompt-input-wrapper">
10
+ {this.label &&
11
+ <Label for="input">{this.label}</Label>
12
+ }
13
+
14
+ <div class="ai-prompt-input-form-wrapper">
15
+ <div class="ai-prompt-inner-input-wrapper">
16
+ <Input
17
+ id="input"
18
+ value={this.value}
19
+ placeholder={this.placeholder}
20
+ valueState={this.valueState}
21
+ showClearIcon={this.showClearIcon}
22
+ disabled={this.disabled}
23
+ readonly={this.readonly}
24
+ showSuggestions={this.showSuggestions}
25
+ onKeyDown={this._onkeydown}
26
+ onInput={this._onInnerInput}
27
+ onChange={this._onInnerChange}
28
+ onTypeAhead={this._onTypeAhead}
29
+ >
30
+ <slot></slot>
31
+ {this.valueStateMessage.length > 0 &&
32
+ <slot name="valueStateMessage" slot="valueStateMessage"></slot>
33
+ }
34
+ </Input>
35
+
36
+ {this.showExceededText &&
37
+ <Label class="ai-prompt-input-counter">{this._exceededText}</Label>
38
+ }
39
+ </div>
40
+ <Button
41
+ icon={paperPlane}
42
+ disabled={this._submitButtonDisabled}
43
+ class="ai-prompt-input-button"
44
+ design="Emphasized"
45
+ onClick={this._onButtonClick}>
46
+ </Button>
47
+ </div>
48
+ </div>);
49
+ }