@ui5/webcomponents-ai 0.0.0-9261ac932

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 (195) hide show
  1. package/.env.production +1 -0
  2. package/.env.testing +4 -0
  3. package/.npsrc.json +3 -0
  4. package/CHANGELOG.md +216 -0
  5. package/README.md +37 -0
  6. package/dist/Assets.d.ts +3 -0
  7. package/dist/Assets.js +6 -0
  8. package/dist/Assets.js.map +1 -0
  9. package/dist/Button.d.ts +114 -0
  10. package/dist/Button.js +233 -0
  11. package/dist/Button.js.map +1 -0
  12. package/dist/ButtonState.d.ts +60 -0
  13. package/dist/ButtonState.js +51 -0
  14. package/dist/ButtonState.js.map +1 -0
  15. package/dist/PromptInput.d.ts +150 -0
  16. package/dist/PromptInput.js +236 -0
  17. package/dist/PromptInput.js.map +1 -0
  18. package/dist/bundle.esm.d.ts +3 -0
  19. package/dist/bundle.esm.js +9 -0
  20. package/dist/bundle.esm.js.map +1 -0
  21. package/dist/bundle.scoped.config.d.ts +1 -0
  22. package/dist/bundle.scoped.config.js +3 -0
  23. package/dist/bundle.scoped.config.js.map +1 -0
  24. package/dist/bundle.scoped.esm.d.ts +2 -0
  25. package/dist/bundle.scoped.esm.js +3 -0
  26. package/dist/bundle.scoped.esm.js.map +1 -0
  27. package/dist/css/themes/Button.css +1 -0
  28. package/dist/css/themes/PromptInput.css +1 -0
  29. package/dist/css/themes/sap_horizon/parameters-bundle.css +0 -0
  30. package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +0 -0
  31. package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +0 -0
  32. package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +0 -0
  33. package/dist/custom-elements-internal.json +583 -0
  34. package/dist/custom-elements.json +517 -0
  35. package/dist/generated/assets/i18n/messagebundle_ar.json +1 -0
  36. package/dist/generated/assets/i18n/messagebundle_bg.json +1 -0
  37. package/dist/generated/assets/i18n/messagebundle_ca.json +1 -0
  38. package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -0
  39. package/dist/generated/assets/i18n/messagebundle_cs.json +1 -0
  40. package/dist/generated/assets/i18n/messagebundle_cy.json +1 -0
  41. package/dist/generated/assets/i18n/messagebundle_da.json +1 -0
  42. package/dist/generated/assets/i18n/messagebundle_de.json +1 -0
  43. package/dist/generated/assets/i18n/messagebundle_el.json +1 -0
  44. package/dist/generated/assets/i18n/messagebundle_en.json +1 -0
  45. package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -0
  46. package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -0
  47. package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -0
  48. package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -0
  49. package/dist/generated/assets/i18n/messagebundle_es.json +1 -0
  50. package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -0
  51. package/dist/generated/assets/i18n/messagebundle_et.json +1 -0
  52. package/dist/generated/assets/i18n/messagebundle_fi.json +1 -0
  53. package/dist/generated/assets/i18n/messagebundle_fr.json +1 -0
  54. package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -0
  55. package/dist/generated/assets/i18n/messagebundle_hi.json +1 -0
  56. package/dist/generated/assets/i18n/messagebundle_hr.json +1 -0
  57. package/dist/generated/assets/i18n/messagebundle_hu.json +1 -0
  58. package/dist/generated/assets/i18n/messagebundle_it.json +1 -0
  59. package/dist/generated/assets/i18n/messagebundle_iw.json +1 -0
  60. package/dist/generated/assets/i18n/messagebundle_ja.json +1 -0
  61. package/dist/generated/assets/i18n/messagebundle_kk.json +1 -0
  62. package/dist/generated/assets/i18n/messagebundle_ko.json +1 -0
  63. package/dist/generated/assets/i18n/messagebundle_lt.json +1 -0
  64. package/dist/generated/assets/i18n/messagebundle_lv.json +1 -0
  65. package/dist/generated/assets/i18n/messagebundle_mk.json +1 -0
  66. package/dist/generated/assets/i18n/messagebundle_ms.json +1 -0
  67. package/dist/generated/assets/i18n/messagebundle_nl.json +1 -0
  68. package/dist/generated/assets/i18n/messagebundle_no.json +1 -0
  69. package/dist/generated/assets/i18n/messagebundle_pl.json +1 -0
  70. package/dist/generated/assets/i18n/messagebundle_pt.json +1 -0
  71. package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -0
  72. package/dist/generated/assets/i18n/messagebundle_ro.json +1 -0
  73. package/dist/generated/assets/i18n/messagebundle_ru.json +1 -0
  74. package/dist/generated/assets/i18n/messagebundle_sh.json +1 -0
  75. package/dist/generated/assets/i18n/messagebundle_sk.json +1 -0
  76. package/dist/generated/assets/i18n/messagebundle_sl.json +1 -0
  77. package/dist/generated/assets/i18n/messagebundle_sr.json +1 -0
  78. package/dist/generated/assets/i18n/messagebundle_sv.json +1 -0
  79. package/dist/generated/assets/i18n/messagebundle_th.json +1 -0
  80. package/dist/generated/assets/i18n/messagebundle_tr.json +1 -0
  81. package/dist/generated/assets/i18n/messagebundle_uk.json +1 -0
  82. package/dist/generated/assets/i18n/messagebundle_vi.json +1 -0
  83. package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -0
  84. package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -0
  85. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -0
  86. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -0
  87. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -0
  88. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -0
  89. package/dist/generated/i18n/i18n-defaults.d.ts +4 -0
  90. package/dist/generated/i18n/i18n-defaults.js +4 -0
  91. package/dist/generated/i18n/i18n-defaults.js.map +1 -0
  92. package/dist/generated/json-imports/Themes-fetch.d.ts +1 -0
  93. package/dist/generated/json-imports/Themes-fetch.js +21 -0
  94. package/dist/generated/json-imports/Themes-fetch.js.map +1 -0
  95. package/dist/generated/json-imports/Themes.d.ts +1 -0
  96. package/dist/generated/json-imports/Themes.js +21 -0
  97. package/dist/generated/json-imports/Themes.js.map +1 -0
  98. package/dist/generated/json-imports/i18n-fetch.d.ts +1 -0
  99. package/dist/generated/json-imports/i18n-fetch.js +118 -0
  100. package/dist/generated/json-imports/i18n-fetch.js.map +1 -0
  101. package/dist/generated/json-imports/i18n.d.ts +1 -0
  102. package/dist/generated/json-imports/i18n.js +118 -0
  103. package/dist/generated/json-imports/i18n.js.map +1 -0
  104. package/dist/generated/templates/ButtonTemplate.lit.d.ts +4 -0
  105. package/dist/generated/templates/ButtonTemplate.lit.js +6 -0
  106. package/dist/generated/templates/ButtonTemplate.lit.js.map +1 -0
  107. package/dist/generated/templates/PromptInputTemplate.lit.d.ts +4 -0
  108. package/dist/generated/templates/PromptInputTemplate.lit.js +8 -0
  109. package/dist/generated/templates/PromptInputTemplate.lit.js.map +1 -0
  110. package/dist/generated/themes/Button.css.d.ts +3 -0
  111. package/dist/generated/themes/Button.css.js +9 -0
  112. package/dist/generated/themes/Button.css.js.map +1 -0
  113. package/dist/generated/themes/PromptInput.css.d.ts +3 -0
  114. package/dist/generated/themes/PromptInput.css.js +9 -0
  115. package/dist/generated/themes/PromptInput.css.js.map +1 -0
  116. package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +3 -0
  117. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +3 -0
  118. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -0
  119. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +3 -0
  120. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +3 -0
  121. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -0
  122. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +3 -0
  123. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +3 -0
  124. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -0
  125. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +3 -0
  126. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +3 -0
  127. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -0
  128. package/dist/tsconfig.tsbuildinfo +1 -0
  129. package/dist/vscode.html-custom-data.json +124 -0
  130. package/dist/web-types.json +287 -0
  131. package/jsconfig.json +11 -0
  132. package/package-scripts.cjs +15 -0
  133. package/package.json +57 -0
  134. package/src/Button.hbs +17 -0
  135. package/src/PromptInput.hbs +36 -0
  136. package/src/i18n/messagebundle.properties +8 -0
  137. package/src/i18n/messagebundle_ar.properties +4 -0
  138. package/src/i18n/messagebundle_bg.properties +4 -0
  139. package/src/i18n/messagebundle_ca.properties +4 -0
  140. package/src/i18n/messagebundle_cnr.properties +4 -0
  141. package/src/i18n/messagebundle_cs.properties +4 -0
  142. package/src/i18n/messagebundle_cy.properties +4 -0
  143. package/src/i18n/messagebundle_da.properties +4 -0
  144. package/src/i18n/messagebundle_de.properties +4 -0
  145. package/src/i18n/messagebundle_el.properties +4 -0
  146. package/src/i18n/messagebundle_en.properties +4 -0
  147. package/src/i18n/messagebundle_en_GB.properties +4 -0
  148. package/src/i18n/messagebundle_en_US_sappsd.properties +4 -0
  149. package/src/i18n/messagebundle_en_US_saprigi.properties +4 -0
  150. package/src/i18n/messagebundle_en_US_saptrc.properties +4 -0
  151. package/src/i18n/messagebundle_es.properties +4 -0
  152. package/src/i18n/messagebundle_es_MX.properties +4 -0
  153. package/src/i18n/messagebundle_et.properties +4 -0
  154. package/src/i18n/messagebundle_fi.properties +4 -0
  155. package/src/i18n/messagebundle_fr.properties +4 -0
  156. package/src/i18n/messagebundle_fr_CA.properties +4 -0
  157. package/src/i18n/messagebundle_hi.properties +4 -0
  158. package/src/i18n/messagebundle_hr.properties +4 -0
  159. package/src/i18n/messagebundle_hu.properties +4 -0
  160. package/src/i18n/messagebundle_id.properties +4 -0
  161. package/src/i18n/messagebundle_it.properties +4 -0
  162. package/src/i18n/messagebundle_iw.properties +4 -0
  163. package/src/i18n/messagebundle_ja.properties +4 -0
  164. package/src/i18n/messagebundle_kk.properties +4 -0
  165. package/src/i18n/messagebundle_ko.properties +4 -0
  166. package/src/i18n/messagebundle_lt.properties +4 -0
  167. package/src/i18n/messagebundle_lv.properties +4 -0
  168. package/src/i18n/messagebundle_mk.properties +4 -0
  169. package/src/i18n/messagebundle_ms.properties +4 -0
  170. package/src/i18n/messagebundle_nl.properties +4 -0
  171. package/src/i18n/messagebundle_no.properties +4 -0
  172. package/src/i18n/messagebundle_pl.properties +4 -0
  173. package/src/i18n/messagebundle_pt.properties +4 -0
  174. package/src/i18n/messagebundle_pt_PT.properties +4 -0
  175. package/src/i18n/messagebundle_ro.properties +4 -0
  176. package/src/i18n/messagebundle_ru.properties +4 -0
  177. package/src/i18n/messagebundle_sh.properties +4 -0
  178. package/src/i18n/messagebundle_sk.properties +4 -0
  179. package/src/i18n/messagebundle_sl.properties +4 -0
  180. package/src/i18n/messagebundle_sr.properties +4 -0
  181. package/src/i18n/messagebundle_sv.properties +4 -0
  182. package/src/i18n/messagebundle_th.properties +4 -0
  183. package/src/i18n/messagebundle_tr.properties +4 -0
  184. package/src/i18n/messagebundle_uk.properties +4 -0
  185. package/src/i18n/messagebundle_vi.properties +4 -0
  186. package/src/i18n/messagebundle_zh_CN.properties +4 -0
  187. package/src/i18n/messagebundle_zh_TW.properties +4 -0
  188. package/src/themes/Button.css +88 -0
  189. package/src/themes/PromptInput.css +30 -0
  190. package/src/themes/base/Button-parameters.css +2 -0
  191. package/src/themes/sap_horizon/parameters-bundle.css +1 -0
  192. package/src/themes/sap_horizon_dark/parameters-bundle.css +1 -0
  193. package/src/themes/sap_horizon_hcb/parameters-bundle.css +1 -0
  194. package/src/themes/sap_horizon_hcw/parameters-bundle.css +1 -0
  195. package/tsconfig.json +36 -0
@@ -0,0 +1,60 @@
1
+ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
+ /**
3
+ * @class
4
+ *
5
+ * ### Overview
6
+ *
7
+ * `ui5-ai-button-state` is the item to use for defining states of `ui5-ai-button` components.
8
+ *
9
+ * ### Usage
10
+ *
11
+ * `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
12
+ * of `ui5-ai-button` and should be used as standalone component.
13
+ *
14
+ * ### ES6 Module Import
15
+ *
16
+ * `import "@ui5/webcomponents/dist/AiButtonState.js";`
17
+ * @constructor
18
+ * @extends UI5Element
19
+ * @abstract
20
+ * @since 2.0.0
21
+ * @public
22
+ * @experimental The Button and ButtonState web components are availabe since 2.0 under an experimental flag and their API and behaviour are subject to change.
23
+ */
24
+ declare class ButtonState extends UI5Element {
25
+ /**
26
+ * Defines the name of the button state.
27
+ * @default undefined
28
+ * @public
29
+ */
30
+ name?: string;
31
+ /**
32
+ * Defines the text of the button in this state.
33
+ * @default undefined
34
+ * @public
35
+ */
36
+ text?: string;
37
+ /**
38
+ * Defines the icon to be displayed as graphical element within the component before the text.
39
+ * The SAP-icons font provides numerous options.
40
+ *
41
+ * **Example:**
42
+ *
43
+ * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).
44
+ * @default undefined
45
+ * @public
46
+ */
47
+ icon?: string;
48
+ /**
49
+ * Defines the icon to be displayed as graphical element within the component after the text.
50
+ * The SAP-icons font provides numerous options.
51
+ *
52
+ * **Example:**
53
+ *
54
+ * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).
55
+ * @default undefined
56
+ * @public
57
+ */
58
+ endIcon?: string;
59
+ }
60
+ export default ButtonState;
@@ -0,0 +1,51 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
8
+ import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
9
+ import property from "@ui5/webcomponents-base/dist/decorators/property.js";
10
+ /**
11
+ * @class
12
+ *
13
+ * ### Overview
14
+ *
15
+ * `ui5-ai-button-state` is the item to use for defining states of `ui5-ai-button` components.
16
+ *
17
+ * ### Usage
18
+ *
19
+ * `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
20
+ * of `ui5-ai-button` and should be used as standalone component.
21
+ *
22
+ * ### ES6 Module Import
23
+ *
24
+ * `import "@ui5/webcomponents/dist/AiButtonState.js";`
25
+ * @constructor
26
+ * @extends UI5Element
27
+ * @abstract
28
+ * @since 2.0.0
29
+ * @public
30
+ * @experimental The Button and ButtonState web components are availabe since 2.0 under an experimental flag and their API and behaviour are subject to change.
31
+ */
32
+ let ButtonState = class ButtonState extends UI5Element {
33
+ };
34
+ __decorate([
35
+ property()
36
+ ], ButtonState.prototype, "name", void 0);
37
+ __decorate([
38
+ property()
39
+ ], ButtonState.prototype, "text", void 0);
40
+ __decorate([
41
+ property()
42
+ ], ButtonState.prototype, "icon", void 0);
43
+ __decorate([
44
+ property()
45
+ ], ButtonState.prototype, "endIcon", void 0);
46
+ ButtonState = __decorate([
47
+ customElement("ui5-ai-button-state")
48
+ ], ButtonState);
49
+ ButtonState.define();
50
+ export default ButtonState;
51
+ //# sourceMappingURL=ButtonState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonState.js","sourceRoot":"","sources":["../src/ButtonState.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;CA0CnC,CAAA;AAnCA;IADC,QAAQ,EAAE;yCACG;AAQd;IADC,QAAQ,EAAE;yCACG;AAad;IADC,QAAQ,EAAE;yCACG;AAad;IADC,QAAQ,EAAE;4CACM;AAzCZ,WAAW;IADhB,aAAa,CAAC,qBAAqB,CAAC;GAC/B,WAAW,CA0ChB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AACrB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\n\n/**\n * @class\n *\n * ### 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\n * of `ui5-ai-button` and should be used as standalone component.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/AiButtonState.js\";`\n * @constructor\n * @extends UI5Element\n * @abstract\n * @since 2.0.0\n * @public\n * @experimental The Button and ButtonState web components are availabe since 2.0 under an experimental flag and their API and behaviour are subject to change.\n */\n@customElement(\"ui5-ai-button-state\")\nclass ButtonState extends UI5Element {\n\t/**\n\t * Defines the name of the button state.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines the text of the button in this state.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ttext?: string;\n\n\t/**\n\t * Defines the icon to be displayed as graphical element within the component before the text.\n\t * The SAP-icons font provides numerous options.\n\t *\n\t * **Example:**\n\t *\n\t * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ticon?: string;\n\n\t/**\n\t * Defines the icon to be displayed as graphical element within the component after the text.\n\t * The SAP-icons font provides numerous options.\n\t *\n\t * **Example:**\n\t *\n\t * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tendIcon?: string;\n}\n\nButtonState.define();\nexport default ButtonState;\n"]}
@@ -0,0 +1,150 @@
1
+ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
+ import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
3
+ import type ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js";
4
+ import "@ui5/webcomponents-icons/dist/paper-plane.js";
5
+ import type { IInputSuggestionItem, InputEventDetail } from "@ui5/webcomponents/dist/Input.js";
6
+ /**
7
+ * @class
8
+ * ### Overview
9
+ *
10
+ * The `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.
11
+ *
12
+ * **Note:** The web component is in an experimental state
13
+ *
14
+ * ### ES6 Module Import
15
+ *
16
+ * `import "@ui5/webcomponents-ai/dist/PromptInput.js
17
+ * @class
18
+ * @constructor
19
+ * @public
20
+ * @extends UI5Element
21
+ * @experimental The **@ui5/webcomponents-ai** package is under development and considered experimental - components' APIs are subject to change.
22
+ */
23
+ declare class PromptInput extends UI5Element {
24
+ /**
25
+ * Defines the value of the component.
26
+ *
27
+ * @default ""
28
+ * @since 2.0.0
29
+ * @public
30
+ */
31
+ value: string;
32
+ /**
33
+ * Defines a short hint intended to aid the user with data entry when the
34
+ * component has no value.
35
+ * @default undefined
36
+ * @since 2.0.0
37
+ * @public
38
+ */
39
+ placeholder?: string;
40
+ /**
41
+ * Defines the label of the input field.
42
+ *
43
+ * @default undefined
44
+ * @since 2.0.0
45
+ * @public
46
+ */
47
+ label?: string;
48
+ /**
49
+ * Defines whether the clear icon of the input will be shown.
50
+ * @default false
51
+ * @public
52
+ * @since 2.0.0
53
+ */
54
+ showClearIcon: boolean;
55
+ /**
56
+ * Determines whether the characters exceeding the maximum allowed character count are visible
57
+ * in the component.
58
+ *
59
+ * If set to `false`, the user is not allowed to enter more characters than what is set in the
60
+ * `maxlength` property.
61
+ * If set to `true` the characters exceeding the `maxlength` value are selected on
62
+ * paste and the counter below the component displays their number.
63
+ * @default false
64
+ * @public
65
+ * @since 2.0.0
66
+ */
67
+ showExceededText: boolean;
68
+ /**
69
+ * Defines whether the component is in disabled state.
70
+ *
71
+ * **Note:** A disabled component is completely noninteractive.
72
+ * @default false
73
+ * @public
74
+ * @since 2.0.0
75
+ */
76
+ disabled: boolean;
77
+ /**
78
+ * Defines whether the component is read-only.
79
+ *
80
+ * **Note:** A read-only component is not editable,
81
+ * but still provides visual feedback upon user interaction.
82
+ * @default false
83
+ * @public
84
+ * @since 2.0.0
85
+ */
86
+ readonly: boolean;
87
+ /**
88
+ * Sets the maximum number of characters available in the input field.
89
+ *
90
+ * @default undefined
91
+ * @since 2.0.0
92
+ * @public
93
+ */
94
+ maxlength?: number;
95
+ /**
96
+ * Defines the value state of the component.
97
+ * @default "None"
98
+ * @since 2.0.0
99
+ * @public
100
+ */
101
+ valueState: `${ValueState}`;
102
+ /**
103
+ * Defines whether the component should show suggestions, if such are present.
104
+ *
105
+ * **Note:** You need to import the `InputSuggestions` module
106
+ * from `"@ui5/webcomponents/dist/features/InputSuggestions.js"` to enable this functionality.
107
+ * @default false
108
+ * @public
109
+ */
110
+ showSuggestions: boolean;
111
+ /**
112
+ * Defines the suggestion items.
113
+ *
114
+ * **Note:** The suggestions would be displayed only if the `showSuggestions`
115
+ * property is set to `true`.
116
+ *
117
+ * **Note:** The `<ui5-suggestion-item>`, `<ui5-suggestion-item-group>` and `ui5-suggestion-item-custom` are recommended to be used as suggestion items.
118
+ *
119
+ * **Note:** Importing the Input Suggestions Support feature:
120
+ *
121
+ * `import "@ui5/webcomponents/dist/features/InputSuggestions.js";`
122
+ *
123
+ * automatically imports the `<ui5-suggestion-item>` and `<ui5-suggestion-item-group>` for your convenience.
124
+ * @public
125
+ */
126
+ suggestionItems: Array<IInputSuggestionItem>;
127
+ /**
128
+ * Defines the value state message that will be displayed as pop up under the component.
129
+ * The value state message slot should contain only one root element.
130
+ *
131
+ * **Note:** If not specified, a default text (in the respective language) will be displayed.
132
+ *
133
+ * **Note:** The `valueStateMessage` would be displayed,
134
+ * when the component is in `Information`, `Critical` or `Negative` value state.
135
+ *
136
+ * @since 2.0.0
137
+ * @public
138
+ */
139
+ valueStateMessage: Array<HTMLElement>;
140
+ static i18nBundle: I18nBundle;
141
+ _onkeydown(e: KeyboardEvent): void;
142
+ _onInnerInput(e: CustomEvent<InputEventDetail>): void;
143
+ _onInnerChange(): void;
144
+ _onButtonClick(): void;
145
+ _onTypeAhead(e: CustomEvent): void;
146
+ get _exceededText(): string | undefined;
147
+ get _maxLenght(): number | undefined;
148
+ get _submitButtonDisabled(): boolean;
149
+ }
150
+ export default PromptInput;
@@ -0,0 +1,236 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var PromptInput_1;
8
+ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
9
+ import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
10
+ import property from "@ui5/webcomponents-base/dist/decorators/property.js";
11
+ import event from "@ui5/webcomponents-base/dist/decorators/event.js";
12
+ import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
13
+ import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
14
+ import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
15
+ import "@ui5/webcomponents-icons/dist/paper-plane.js";
16
+ import Input from "@ui5/webcomponents/dist/Input.js";
17
+ import Label from "@ui5/webcomponents/dist/Label.js";
18
+ import Button from "@ui5/webcomponents/dist/Button.js";
19
+ import { isEnter, } from "@ui5/webcomponents-base/dist/Keys.js";
20
+ import { PROMPT_INPUT_CHARACTERS_LEFT, PROMPT_INPUT_CHARACTERS_EXCEEDED, } from "./generated/i18n/i18n-defaults.js";
21
+ import PromptInputTemplate from "./generated/templates/PromptInputTemplate.lit.js";
22
+ // Styles
23
+ import PromptInputCss from "./generated/themes/PromptInput.css.js";
24
+ /**
25
+ * @class
26
+ * ### Overview
27
+ *
28
+ * The `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.
29
+ *
30
+ * **Note:** The web component is in an experimental state
31
+ *
32
+ * ### ES6 Module Import
33
+ *
34
+ * `import "@ui5/webcomponents-ai/dist/PromptInput.js
35
+ * @class
36
+ * @constructor
37
+ * @public
38
+ * @extends UI5Element
39
+ * @experimental The **@ui5/webcomponents-ai** package is under development and considered experimental - components' APIs are subject to change.
40
+ */
41
+ let PromptInput = PromptInput_1 = class PromptInput extends UI5Element {
42
+ constructor() {
43
+ super(...arguments);
44
+ /**
45
+ * Defines the value of the component.
46
+ *
47
+ * @default ""
48
+ * @since 2.0.0
49
+ * @public
50
+ */
51
+ this.value = "";
52
+ /**
53
+ * Defines whether the clear icon of the input will be shown.
54
+ * @default false
55
+ * @public
56
+ * @since 2.0.0
57
+ */
58
+ this.showClearIcon = false;
59
+ /**
60
+ * Determines whether the characters exceeding the maximum allowed character count are visible
61
+ * in the component.
62
+ *
63
+ * If set to `false`, the user is not allowed to enter more characters than what is set in the
64
+ * `maxlength` property.
65
+ * If set to `true` the characters exceeding the `maxlength` value are selected on
66
+ * paste and the counter below the component displays their number.
67
+ * @default false
68
+ * @public
69
+ * @since 2.0.0
70
+ */
71
+ this.showExceededText = false;
72
+ /**
73
+ * Defines whether the component is in disabled state.
74
+ *
75
+ * **Note:** A disabled component is completely noninteractive.
76
+ * @default false
77
+ * @public
78
+ * @since 2.0.0
79
+ */
80
+ this.disabled = false;
81
+ /**
82
+ * Defines whether the component is read-only.
83
+ *
84
+ * **Note:** A read-only component is not editable,
85
+ * but still provides visual feedback upon user interaction.
86
+ * @default false
87
+ * @public
88
+ * @since 2.0.0
89
+ */
90
+ this.readonly = false;
91
+ /**
92
+ * Defines the value state of the component.
93
+ * @default "None"
94
+ * @since 2.0.0
95
+ * @public
96
+ */
97
+ this.valueState = "None";
98
+ /**
99
+ * Defines whether the component should show suggestions, if such are present.
100
+ *
101
+ * **Note:** You need to import the `InputSuggestions` module
102
+ * from `"@ui5/webcomponents/dist/features/InputSuggestions.js"` to enable this functionality.
103
+ * @default false
104
+ * @public
105
+ */
106
+ this.showSuggestions = false;
107
+ }
108
+ _onkeydown(e) {
109
+ if (isEnter(e)) {
110
+ this.fireDecoratorEvent("submit");
111
+ }
112
+ }
113
+ _onInnerInput(e) {
114
+ this.value = e.target.value;
115
+ this.fireDecoratorEvent("input");
116
+ }
117
+ _onInnerChange() {
118
+ this.fireDecoratorEvent("change");
119
+ }
120
+ _onButtonClick() {
121
+ this.fireDecoratorEvent("submit");
122
+ }
123
+ _onTypeAhead(e) {
124
+ this.value = e.target.value;
125
+ }
126
+ get _exceededText() {
127
+ if (this.showExceededText) {
128
+ let leftCharactersCount;
129
+ const maxLength = this.maxlength;
130
+ if (maxLength !== undefined) {
131
+ leftCharactersCount = maxLength - this.value.length;
132
+ if (leftCharactersCount >= 0) {
133
+ return PromptInput_1.i18nBundle.getText(PROMPT_INPUT_CHARACTERS_LEFT, leftCharactersCount);
134
+ }
135
+ return PromptInput_1.i18nBundle.getText(PROMPT_INPUT_CHARACTERS_EXCEEDED, Math.abs(leftCharactersCount));
136
+ }
137
+ }
138
+ }
139
+ get _maxLenght() {
140
+ return this.maxlength || undefined;
141
+ }
142
+ get _submitButtonDisabled() {
143
+ return (this.value.length <= 0) || this.disabled || this.readonly;
144
+ }
145
+ };
146
+ __decorate([
147
+ property()
148
+ ], PromptInput.prototype, "value", void 0);
149
+ __decorate([
150
+ property()
151
+ ], PromptInput.prototype, "placeholder", void 0);
152
+ __decorate([
153
+ property()
154
+ ], PromptInput.prototype, "label", void 0);
155
+ __decorate([
156
+ property({ type: Boolean })
157
+ ], PromptInput.prototype, "showClearIcon", void 0);
158
+ __decorate([
159
+ property({ type: Boolean })
160
+ ], PromptInput.prototype, "showExceededText", void 0);
161
+ __decorate([
162
+ property({ type: Boolean })
163
+ ], PromptInput.prototype, "disabled", void 0);
164
+ __decorate([
165
+ property({ type: Boolean })
166
+ ], PromptInput.prototype, "readonly", void 0);
167
+ __decorate([
168
+ property({ type: Number })
169
+ ], PromptInput.prototype, "maxlength", void 0);
170
+ __decorate([
171
+ property()
172
+ ], PromptInput.prototype, "valueState", void 0);
173
+ __decorate([
174
+ property({ type: Boolean })
175
+ ], PromptInput.prototype, "showSuggestions", void 0);
176
+ __decorate([
177
+ slot({ type: HTMLElement, "default": true })
178
+ ], PromptInput.prototype, "suggestionItems", void 0);
179
+ __decorate([
180
+ slot({
181
+ type: HTMLElement,
182
+ invalidateOnChildChange: true,
183
+ })
184
+ ], PromptInput.prototype, "valueStateMessage", void 0);
185
+ __decorate([
186
+ i18n("@ui5/webcomponents-ai")
187
+ ], PromptInput, "i18nBundle", void 0);
188
+ PromptInput = PromptInput_1 = __decorate([
189
+ customElement({
190
+ tag: "ui5-ai-prompt-input",
191
+ renderer: litRender,
192
+ styles: PromptInputCss,
193
+ template: PromptInputTemplate,
194
+ dependencies: [
195
+ Input,
196
+ Label,
197
+ Button,
198
+ ],
199
+ })
200
+ /**
201
+ * Fired when the input operation has finished by pressing Enter
202
+ * or AI button is clicked.
203
+ *
204
+ * @since 2.0.0
205
+ * @public
206
+ */
207
+ ,
208
+ event("submit", {
209
+ bubbles: true,
210
+ })
211
+ /**
212
+ * Fired when the value of the component changes at each keystroke,
213
+ * and when a suggestion item has been selected.
214
+ *
215
+ * @since 2.0.0
216
+ * @public
217
+ */
218
+ ,
219
+ event("input", {
220
+ bubbles: true,
221
+ })
222
+ /**
223
+ * Fired when the input operation has finished by pressing Enter
224
+ * or on focusout.
225
+ *
226
+ * @since 2.0.0
227
+ * @public
228
+ */
229
+ ,
230
+ event("change", {
231
+ bubbles: true,
232
+ })
233
+ ], PromptInput);
234
+ PromptInput.define();
235
+ export default PromptInput;
236
+ //# sourceMappingURL=PromptInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PromptInput.js","sourceRoot":"","sources":["../src/PromptInput.ts"],"names":[],"mappings":"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","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport \"@ui5/webcomponents-icons/dist/paper-plane.js\";\nimport type { IInputSuggestionItem, InputEventDetail } from \"@ui5/webcomponents/dist/Input.js\";\nimport Input from \"@ui5/webcomponents/dist/Input.js\";\nimport Label from \"@ui5/webcomponents/dist/Label.js\";\nimport Button from \"@ui5/webcomponents/dist/Button.js\";\nimport {\n\tisEnter,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport {\n\tPROMPT_INPUT_CHARACTERS_LEFT,\n\tPROMPT_INPUT_CHARACTERS_EXCEEDED,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport PromptInputTemplate from \"./generated/templates/PromptInputTemplate.lit.js\";\n\n// Styles\nimport PromptInputCss from \"./generated/themes/PromptInput.css.js\";\n\n/**\n * @class\n * ### Overview\n *\n * The `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 * @class\n * @constructor\n * @public\n * @extends UI5Element\n * @experimental The **@ui5/webcomponents-ai** package is under development and considered experimental - components' APIs are subject to change.\n */\n@customElement({\n\ttag: \"ui5-ai-prompt-input\",\n\trenderer: litRender,\n\tstyles: PromptInputCss,\n\ttemplate: PromptInputTemplate,\n\tdependencies: [\n\t\tInput,\n\t\tLabel,\n\t\tButton,\n\t],\n})\n\n/**\n * Fired when the input operation has finished by pressing Enter\n * or AI button is clicked.\n *\n * @since 2.0.0\n * @public\n */\n@event(\"submit\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when the value of the component changes at each keystroke,\n * and when a suggestion item has been selected.\n *\n * @since 2.0.0\n * @public\n */\n@event(\"input\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when the input operation has finished by pressing Enter\n * or on focusout.\n *\n * @since 2.0.0\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\nclass PromptInput extends UI5Element {\n\t/**\n\t * Defines the value of the component.\n\t *\n\t * @default \"\"\n\t * @since 2.0.0\n\t * @public\n\t */\n\t@property()\n\tvalue = \"\";\n\n\t/**\n\t * Defines a short hint intended to aid the user with data entry when the\n\t * component has no value.\n\t * @default undefined\n\t * @since 2.0.0\n\t * @public\n\t */\n\t@property()\n\tplaceholder?: string;\n\n\t/**\n\t * Defines the label of the input field.\n\t *\n\t * @default undefined\n\t * @since 2.0.0\n\t * @public\n\t */\n\t@property()\n\tlabel?: string;\n\n\t/**\n\t * Defines whether the clear icon of the input will be shown.\n\t * @default false\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property({ type: Boolean })\n\tshowClearIcon = false;\n\n\t/**\n\t * Determines whether the characters exceeding the maximum allowed character count are visible\n\t * in the component.\n\t *\n\t * If set to `false`, the user is not allowed to enter more characters than what is set in the\n\t * `maxlength` property.\n\t * If set to `true` the characters exceeding the `maxlength` value are selected on\n\t * paste and the counter below the component displays their number.\n\t * @default false\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property({ type: Boolean })\n\tshowExceededText = false;\n\n\t/**\n\t * Defines whether the component is in disabled state.\n\t *\n\t * **Note:** A disabled component is completely noninteractive.\n\t * @default false\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines whether the component is read-only.\n\t *\n\t * **Note:** A read-only component is not editable,\n\t * but still provides visual feedback upon user interaction.\n\t * @default false\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property({ type: Boolean })\n\treadonly = false;\n\n\t/**\n\t * Sets the maximum number of characters available in the input field.\n\t *\n\t * @default undefined\n\t * @since 2.0.0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmaxlength?: number;\n\n\t/**\n\t * Defines the value state of the component.\n\t * @default \"None\"\n\t * @since 2.0.0\n\t * @public\n\t */\n\t@property()\n\tvalueState: `${ValueState}` = \"None\"\n\n\t/**\n\t * Defines whether the component should show suggestions, if such are present.\n\t *\n\t * **Note:** You need to import the `InputSuggestions` module\n\t * from `\"@ui5/webcomponents/dist/features/InputSuggestions.js\"` to enable this functionality.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowSuggestions = false;\n\n\t/**\n\t * Defines the suggestion items.\n\t *\n\t * **Note:** The suggestions would be displayed only if the `showSuggestions`\n\t * property is set to `true`.\n\t *\n\t * **Note:** The `<ui5-suggestion-item>`, `<ui5-suggestion-item-group>` and `ui5-suggestion-item-custom` are recommended to be used as suggestion items.\n\t *\n\t * **Note:** Importing the Input Suggestions Support feature:\n\t *\n\t * `import \"@ui5/webcomponents/dist/features/InputSuggestions.js\";`\n\t *\n\t * automatically imports the `<ui5-suggestion-item>` and `<ui5-suggestion-item-group>` for your convenience.\n\t * @public\n\t */\n\t\t@slot({ type: HTMLElement, \"default\": true })\n\t\tsuggestionItems!: Array<IInputSuggestionItem>;\n\n\t/**\n\t * Defines the value state message that will be displayed as pop up under the component.\n\t * The value state message slot should contain only one root element.\n\t *\n\t * **Note:** If not specified, a default text (in the respective language) will be displayed.\n\t *\n\t * **Note:** The `valueStateMessage` would be displayed,\n\t * when the component is in `Information`, `Critical` or `Negative` value state.\n\t *\n\t * @since 2.0.0\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\tinvalidateOnChildChange: true,\n\t})\n\tvalueStateMessage!: Array<HTMLElement>;\n\n\t@i18n(\"@ui5/webcomponents-ai\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireDecoratorEvent(\"submit\");\n\t\t}\n\t}\n\n\t_onInnerInput(e: CustomEvent<InputEventDetail>) {\n\t\tthis.value = (e.target as Input).value;\n\n\t\tthis.fireDecoratorEvent(\"input\");\n\t}\n\n\t_onInnerChange() {\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\t_onButtonClick() {\n\t\tthis.fireDecoratorEvent(\"submit\");\n\t}\n\n\t_onTypeAhead(e: CustomEvent): void {\n\t\tthis.value = (e.target as Input).value;\n\t}\n\n\tget _exceededText() {\n\t\tif (this.showExceededText) {\n\t\t\tlet leftCharactersCount;\n\t\t\tconst maxLength = this.maxlength;\n\n\t\t\tif (maxLength !== undefined) {\n\t\t\t\tleftCharactersCount = maxLength - this.value.length;\n\n\t\t\t\tif (leftCharactersCount >= 0) {\n\t\t\t\t\treturn PromptInput.i18nBundle.getText(PROMPT_INPUT_CHARACTERS_LEFT, leftCharactersCount);\n\t\t\t\t}\n\n\t\t\t\treturn PromptInput.i18nBundle.getText(PROMPT_INPUT_CHARACTERS_EXCEEDED, Math.abs(leftCharactersCount));\n\t\t\t}\n\t\t}\n\t}\n\n\tget _maxLenght() {\n\t\treturn this.maxlength || undefined;\n\t}\n\n\tget _submitButtonDisabled() {\n\t\treturn (this.value.length <= 0) || this.disabled || this.readonly;\n\t}\n}\n\nPromptInput.define();\n\nexport default PromptInput;\n"]}
@@ -0,0 +1,3 @@
1
+ import testAssets from "@ui5/webcomponents/dist/bundle.esm.js";
2
+ import "./Assets.js";
3
+ export default testAssets;
@@ -0,0 +1,9 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ import testAssets from "@ui5/webcomponents/dist/bundle.esm.js";
3
+ // AI assets
4
+ import "./Assets.js";
5
+ import Button from "./Button.js";
6
+ import ButtonState from "./ButtonState.js";
7
+ import PromptInput from "./PromptInput.js";
8
+ export default testAssets;
9
+ //# sourceMappingURL=bundle.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.esm.js","sourceRoot":"","sources":["../src/bundle.esm.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,UAAU,MAAM,uCAAuC,CAAC;AAE/D,YAAY;AACZ,OAAO,aAAa,CAAC;AAErB,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAE3C,eAAe,UAAU,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport testAssets from \"@ui5/webcomponents/dist/bundle.esm.js\";\n\n// AI assets\nimport \"./Assets.js\";\n\nimport Button from \"./Button.js\";\nimport ButtonState from \"./ButtonState.js\";\nimport PromptInput from \"./PromptInput.js\";\n\nexport default testAssets;\n"]}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { setCustomElementsScopingSuffix } from "@ui5/webcomponents-base/dist/CustomElementsScope.js";
2
+ setCustomElementsScopingSuffix("demo");
3
+ //# sourceMappingURL=bundle.scoped.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.scoped.config.js","sourceRoot":"","sources":["../src/bundle.scoped.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,qDAAqD,CAAC;AAErG,8BAA8B,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { setCustomElementsScopingSuffix } from \"@ui5/webcomponents-base/dist/CustomElementsScope.js\";\n\nsetCustomElementsScopingSuffix(\"demo\");\n"]}
@@ -0,0 +1,2 @@
1
+ import "./bundle.scoped.config.js";
2
+ import "./bundle.esm.js";
@@ -0,0 +1,3 @@
1
+ import "./bundle.scoped.config.js";
2
+ import "./bundle.esm.js";
3
+ //# sourceMappingURL=bundle.scoped.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.scoped.esm.js","sourceRoot":"","sources":["../src/bundle.scoped.esm.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AACnC,OAAO,iBAAiB,CAAC","sourcesContent":["import \"./bundle.scoped.config.js\";\nimport \"./bundle.esm.js\";\n"]}
@@ -0,0 +1 @@
1
+ :host{display:inline-block}:host([disabled]){pointer-events:none}.ui5-ai-button-text{display:inline-block}:host([icon-only]) .ui5-ai-button-text{min-width:0;margin-inline-start:0}.ui5-ai-button-hidden{position:absolute;top:-10000px;left:-10000px;visibility:hidden;display:block;width:fit-content}:host [ui5-button]:not(.ui5-ai-button-hidden){width:auto;position:relative;transition:width .18s cubic-bezier(.67,1,.95,1.3) .12s}:host ::part(icon){opacity:1;transform:translateY(0)}:host(:not([fade-out]):not([fade-mid]):not([fade-in])) .ui5-ai-button-text,:host(:not([fade-out]):not([fade-mid]):not([fade-in])) ::part(endIcon){opacity:1;transform:translateY(0)}:host([fade-out]:not([fade-mid])) ::part(icon){opacity:0;transform:translateY(-1rem);transition:opacity .05s ease-in-out 25ms,transform .1s ease-in-out 0s}:host([fade-out]:not([fade-mid])) .ui5-ai-button-text,:host([fade-out]:not([fade-mid])) ::part(endIcon){opacity:0;transform:translateY(-1rem);transition:opacity .06s ease-in-out .12s,transform .08s ease-in-out .12s}:host([fade-mid]) ::part(icon){opacity:0;transform:translateY(1rem)}:host([fade-mid]) .ui5-ai-button-text,:host([fade-mid]) ::part(endIcon){opacity:0;transform:translateY(1rem);transition:none}:host([fade-in]) ::part(icon){opacity:1;transform:translateY(0);transition:opacity .05s ease-in-out 25ms,transform .1s ease-in-out 0s}:host([fade-in]) .ui5-ai-button-text,:host([fade-in]) ::part(endIcon){opacity:1;transform:translateY(0);transition:opacity .06s ease-in-out .12s,transform .08s ease-in-out .12s}
@@ -0,0 +1 @@
1
+ .ai-prompt-input-button{margin-left:.5rem;margin-top:3px}.ai-prompt-input-wrapper{display:flex;flex-direction:column;width:270px}.ai-prompt-input-form-wrapper{display:flex;flex:1}.ai-prompt-input-counter{font-size:.75rem;align-self:flex-end}#input{width:100%}.ai-prompt-inner-input-wrapper{display:flex;flex-direction:column;flex:1}