@ui5/webcomponents-ai 2.0.0-rc.6 → 2.0.1
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/CHANGELOG.md +25 -0
- package/README.md +1 -4
- package/dist/Button.d.ts +76 -6
- package/dist/Button.js +170 -14
- package/dist/Button.js.map +1 -1
- package/dist/ButtonState.d.ts +60 -0
- package/dist/ButtonState.js +51 -0
- package/dist/ButtonState.js.map +1 -0
- package/dist/PromptInput.d.ts +6 -5
- package/dist/PromptInput.js +57 -4
- package/dist/PromptInput.js.map +1 -1
- package/dist/bundle.esm.js +1 -0
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/Button.css +1 -0
- package/dist/custom-elements-internal.json +220 -19
- package/dist/custom-elements.json +193 -17
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -0
- package/dist/generated/json-imports/i18n.d.ts +1 -0
- package/dist/generated/json-imports/i18n.js +113 -1
- package/dist/generated/json-imports/i18n.js.map +1 -1
- package/dist/generated/templates/ButtonTemplate.lit.js +2 -1
- package/dist/generated/templates/ButtonTemplate.lit.js.map +1 -1
- package/dist/generated/themes/Button.css.js +2 -1
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +47 -3
- package/dist/web-types.json +103 -9
- package/package.json +7 -7
- package/src/Button.hbs +17 -3
- package/src/i18n/messagebundle_ar.properties +4 -0
- package/src/i18n/messagebundle_bg.properties +4 -0
- package/src/i18n/messagebundle_ca.properties +4 -0
- package/src/i18n/messagebundle_cnr.properties +4 -0
- package/src/i18n/messagebundle_cs.properties +4 -0
- package/src/i18n/messagebundle_cy.properties +4 -0
- package/src/i18n/messagebundle_da.properties +4 -0
- package/src/i18n/messagebundle_de.properties +4 -0
- package/src/i18n/messagebundle_el.properties +4 -0
- package/src/i18n/messagebundle_en.properties +4 -0
- package/src/i18n/messagebundle_en_GB.properties +4 -0
- package/src/i18n/messagebundle_en_US_saprigi.properties +4 -0
- package/src/i18n/messagebundle_es.properties +4 -0
- package/src/i18n/messagebundle_es_MX.properties +4 -0
- package/src/i18n/messagebundle_et.properties +4 -0
- package/src/i18n/messagebundle_fi.properties +4 -0
- package/src/i18n/messagebundle_fr.properties +4 -0
- package/src/i18n/messagebundle_fr_CA.properties +4 -0
- package/src/i18n/messagebundle_hi.properties +4 -0
- package/src/i18n/messagebundle_hr.properties +4 -0
- package/src/i18n/messagebundle_hu.properties +4 -0
- package/src/i18n/messagebundle_id.properties +4 -0
- package/src/i18n/messagebundle_it.properties +4 -0
- package/src/i18n/messagebundle_iw.properties +4 -0
- package/src/i18n/messagebundle_ja.properties +4 -0
- package/src/i18n/messagebundle_kk.properties +4 -0
- package/src/i18n/messagebundle_ko.properties +4 -0
- package/src/i18n/messagebundle_lt.properties +4 -0
- package/src/i18n/messagebundle_lv.properties +4 -0
- package/src/i18n/messagebundle_mk.properties +4 -0
- package/src/i18n/messagebundle_ms.properties +4 -0
- package/src/i18n/messagebundle_nl.properties +4 -0
- package/src/i18n/messagebundle_no.properties +4 -0
- package/src/i18n/messagebundle_pl.properties +4 -0
- package/src/i18n/messagebundle_pt.properties +4 -0
- package/src/i18n/messagebundle_pt_PT.properties +4 -0
- package/src/i18n/messagebundle_ro.properties +4 -0
- package/src/i18n/messagebundle_ru.properties +4 -0
- package/src/i18n/messagebundle_sh.properties +4 -0
- package/src/i18n/messagebundle_sk.properties +4 -0
- package/src/i18n/messagebundle_sl.properties +4 -0
- package/src/i18n/messagebundle_sr.properties +4 -0
- package/src/i18n/messagebundle_sv.properties +4 -0
- package/src/i18n/messagebundle_th.properties +4 -0
- package/src/i18n/messagebundle_tr.properties +4 -0
- package/src/i18n/messagebundle_uk.properties +4 -0
- package/src/i18n/messagebundle_vi.properties +4 -0
- package/src/i18n/messagebundle_zh_CN.properties +4 -0
- package/src/i18n/messagebundle_zh_TW.properties +4 -0
- package/src/themes/Button.css +88 -0
package/dist/PromptInput.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PromptInput.js","sourceRoot":"","sources":["../src/PromptInput.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;
|
1
|
+
{"version":3,"file":"PromptInput.js","sourceRoot":"","sources":["../src/PromptInput.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,IAAI,MAAM,iDA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,EAAE,CAAC;6CACX;AAYjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CACX;AAUjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CACR;AASnB;IADC,QAAQ,EAAE;+CACyB;AAkBpC;IAJC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,uBAAuB,EAAE,IAAI;KAC7B,CAAC;sDACqC;AAjHlC,WAAW;IAtChB,aAAa,CAAC;QACd,GAAG,EAAE,qBAAqB;QAC1B,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;QAC7B,YAAY,EAAE;YACb,KAAK;YACL,KAAK;YACL,MAAM;SACN;KACD,CAAC;IAEF;;;;;;OAMG;;IACF,KAAK,CAAC,QAAQ,CAAC;IAEhB;;;;;;OAMG;;IACF,KAAK,CAAC,OAAO,CAAC;IAEf;;;;;;OAMG;;IACF,KAAK,CAAC,QAAQ,CAAC;GACV,WAAW,CAyKhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,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\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.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 { 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\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\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\")\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 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\tstatic i18nBundle: I18nBundle;\n\n\tstatic async onDefine() {\n\t\tPromptInput.i18nBundle = await getI18nBundle(\"@ui5/webcomponents-ai\");\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireEvent(\"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.fireEvent(\"input\");\n\t}\n\n\t_onInnerChange() {\n\t\tthis.fireEvent(\"change\");\n\t}\n\n\t_onButtonClick() {\n\t\tthis.fireEvent(\"submit\");\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"]}
|
package/dist/bundle.esm.js
CHANGED
package/dist/bundle.esm.js.map
CHANGED
@@ -1 +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,OAAmB,aAAa,CAAC;AACjC,OAAwB,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 PromptInput from \"./PromptInput.js\";\n\nexport default testAssets;\n"]}
|
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,OAAmB,aAAa,CAAC;AACjC,OAAwB,kBAAkB,CAAC;AAC3C,OAAwB,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
|
+
: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}
|
@@ -14,22 +14,88 @@
|
|
14
14
|
"declarations": [
|
15
15
|
{
|
16
16
|
"kind": "class",
|
17
|
-
"description": "### Overview\n\nThe `ui5-ai-button` component represents a button used in AI-related scenarios.\nIt enables users to trigger actions by clicking or tapping the `ui5-ai-button`, or by pressing\ncertain keyboard keys, such as Enter.\n\n### Usage\n\nFor the `ui5-ai-button` UI, you can define one or more states of the button by placing `ai-button-state` components in its default slot.\nEach state have a
|
17
|
+
"description": "### Overview\n\nThe `ui5-ai-button` component represents a button used in AI-related scenarios.\nIt enables users to trigger actions by clicking or tapping the `ui5-ai-button`, or by pressing\ncertain keyboard keys, such as Enter.\n\n### Usage\n\nFor the `ui5-ai-button` UI, you can define one or more states of the button by placing `ai-button-state` components in its default slot.\nEach state have a name that identifies it and can have text, icon and end icon defined (in any combination) depending on the state purpose.\n\nYou can choose from a set of predefined designs (the same as for regular `ui5-button` component) that allow different styling to correspond to the triggered action.\n\n`ui5-ai-button` can be activated by clicking or tapping it. The state can be changed in `click` event handler.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents-ai/dist/Button.js\";`",
|
18
18
|
"name": "Button",
|
19
|
+
"slots": [
|
20
|
+
{
|
21
|
+
"name": "default",
|
22
|
+
"description": "Defines the available states of the component.\n**Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use `ui5-ai-button-state` components in order to preserve the intended design.",
|
23
|
+
"_ui5propertyName": "states",
|
24
|
+
"_ui5type": {
|
25
|
+
"text": "Array<ButtonState>",
|
26
|
+
"references": [
|
27
|
+
{
|
28
|
+
"name": "ButtonState",
|
29
|
+
"package": "@ui5/webcomponents-ai",
|
30
|
+
"module": "dist/ButtonState.js"
|
31
|
+
}
|
32
|
+
]
|
33
|
+
},
|
34
|
+
"_ui5privacy": "public"
|
35
|
+
}
|
36
|
+
],
|
19
37
|
"members": [
|
38
|
+
{
|
39
|
+
"kind": "field",
|
40
|
+
"name": "design",
|
41
|
+
"type": {
|
42
|
+
"text": "ButtonDesign | undefined",
|
43
|
+
"references": [
|
44
|
+
{
|
45
|
+
"name": "ButtonDesign",
|
46
|
+
"package": "@ui5/webcomponents",
|
47
|
+
"module": "dist/types/ButtonDesign.js"
|
48
|
+
}
|
49
|
+
]
|
50
|
+
},
|
51
|
+
"default": "\"Default\"",
|
52
|
+
"description": "Defines the component design.",
|
53
|
+
"privacy": "public",
|
54
|
+
"_ui5validator": "String"
|
55
|
+
},
|
20
56
|
{
|
21
57
|
"kind": "field",
|
22
58
|
"name": "disabled",
|
23
59
|
"type": {
|
24
60
|
"text": "boolean"
|
25
61
|
},
|
26
|
-
"description": "Defines whether the component is disabled.\nA disabled component can't be pressed or\nfocused, and it is not in the tab chain.",
|
27
62
|
"default": "false",
|
63
|
+
"description": "Defines whether the component is disabled.\nA disabled component can't be pressed or\nfocused, and it is not in the tab chain.",
|
28
64
|
"privacy": "public",
|
29
65
|
"_ui5validator": "Boolean"
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"kind": "field",
|
69
|
+
"name": "state",
|
70
|
+
"type": {
|
71
|
+
"text": "string | undefined"
|
72
|
+
},
|
73
|
+
"description": "Defines the current state of the component.",
|
74
|
+
"default": "undefined",
|
75
|
+
"privacy": "public",
|
76
|
+
"_ui5validator": "String"
|
77
|
+
}
|
78
|
+
],
|
79
|
+
"events": [
|
80
|
+
{
|
81
|
+
"name": "click",
|
82
|
+
"_ui5privacy": "public",
|
83
|
+
"type": {
|
84
|
+
"text": "CustomEvent"
|
85
|
+
},
|
86
|
+
"description": "Fired when the component is activated either with a\nmouse/tap or by using the Enter or Space key."
|
30
87
|
}
|
31
88
|
],
|
32
89
|
"attributes": [
|
90
|
+
{
|
91
|
+
"description": "Defines the component design.",
|
92
|
+
"name": "design",
|
93
|
+
"default": "\"Default\"",
|
94
|
+
"fieldName": "design",
|
95
|
+
"type": {
|
96
|
+
"text": "\"Default\" | \"Positive\" | \"Negative\" | \"Transparent\" | \"Emphasized\" | \"Attention\" | undefined"
|
97
|
+
}
|
98
|
+
},
|
33
99
|
{
|
34
100
|
"description": "Defines whether the component is disabled.\nA disabled component can't be pressed or\nfocused, and it is not in the tab chain.",
|
35
101
|
"name": "disabled",
|
@@ -38,6 +104,15 @@
|
|
38
104
|
"type": {
|
39
105
|
"text": "boolean"
|
40
106
|
}
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"description": "Defines the current state of the component.",
|
110
|
+
"name": "state",
|
111
|
+
"default": "undefined",
|
112
|
+
"fieldName": "state",
|
113
|
+
"type": {
|
114
|
+
"text": "string | undefined"
|
115
|
+
}
|
41
116
|
}
|
42
117
|
],
|
43
118
|
"superclass": {
|
@@ -47,6 +122,7 @@
|
|
47
122
|
},
|
48
123
|
"tagName": "ui5-ai-button",
|
49
124
|
"customElement": true,
|
125
|
+
"_ui5experimental": "The Button and ButtonState web components are availabe since 2.0 under an experimental flag and their API and behaviour are subject to change.",
|
50
126
|
"_ui5since": "2.0",
|
51
127
|
"_ui5privacy": "public"
|
52
128
|
}
|
@@ -70,6 +146,130 @@
|
|
70
146
|
}
|
71
147
|
]
|
72
148
|
},
|
149
|
+
{
|
150
|
+
"kind": "javascript-module",
|
151
|
+
"path": "dist/ButtonState.js",
|
152
|
+
"declarations": [
|
153
|
+
{
|
154
|
+
"kind": "class",
|
155
|
+
"description": "### Overview\n\n`ui5-ai-button-state` is the item to use for defining states of `ui5-ai-button` components.\n\n### Usage\n\n`ui5-si-button-state` is an abstract element, representing a state of `ui5-ai-button`. It is meant to be used in the `states` slot\nof `ui5-ai-button` and should be used as standalone component.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/AiButtonState.js\";`",
|
156
|
+
"name": "ButtonState",
|
157
|
+
"members": [
|
158
|
+
{
|
159
|
+
"kind": "field",
|
160
|
+
"name": "name",
|
161
|
+
"type": {
|
162
|
+
"text": "string | undefined"
|
163
|
+
},
|
164
|
+
"description": "Defines the name of the button state.",
|
165
|
+
"default": "undefined",
|
166
|
+
"privacy": "public",
|
167
|
+
"_ui5validator": "String"
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"kind": "field",
|
171
|
+
"name": "text",
|
172
|
+
"type": {
|
173
|
+
"text": "string | undefined"
|
174
|
+
},
|
175
|
+
"description": "Defines the text of the button in this state.",
|
176
|
+
"default": "undefined",
|
177
|
+
"privacy": "public",
|
178
|
+
"_ui5validator": "String"
|
179
|
+
},
|
180
|
+
{
|
181
|
+
"kind": "field",
|
182
|
+
"name": "icon",
|
183
|
+
"type": {
|
184
|
+
"text": "string | undefined"
|
185
|
+
},
|
186
|
+
"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).",
|
187
|
+
"default": "undefined",
|
188
|
+
"privacy": "public",
|
189
|
+
"_ui5validator": "String"
|
190
|
+
},
|
191
|
+
{
|
192
|
+
"kind": "field",
|
193
|
+
"name": "endIcon",
|
194
|
+
"type": {
|
195
|
+
"text": "string | undefined"
|
196
|
+
},
|
197
|
+
"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).",
|
198
|
+
"default": "undefined",
|
199
|
+
"privacy": "public",
|
200
|
+
"_ui5validator": "String"
|
201
|
+
}
|
202
|
+
],
|
203
|
+
"attributes": [
|
204
|
+
{
|
205
|
+
"description": "Defines the name of the button state.",
|
206
|
+
"name": "name",
|
207
|
+
"default": "undefined",
|
208
|
+
"fieldName": "name",
|
209
|
+
"type": {
|
210
|
+
"text": "string | undefined"
|
211
|
+
}
|
212
|
+
},
|
213
|
+
{
|
214
|
+
"description": "Defines the text of the button in this state.",
|
215
|
+
"name": "text",
|
216
|
+
"default": "undefined",
|
217
|
+
"fieldName": "text",
|
218
|
+
"type": {
|
219
|
+
"text": "string | undefined"
|
220
|
+
}
|
221
|
+
},
|
222
|
+
{
|
223
|
+
"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).",
|
224
|
+
"name": "icon",
|
225
|
+
"default": "undefined",
|
226
|
+
"fieldName": "icon",
|
227
|
+
"type": {
|
228
|
+
"text": "string | undefined"
|
229
|
+
}
|
230
|
+
},
|
231
|
+
{
|
232
|
+
"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).",
|
233
|
+
"name": "end-icon",
|
234
|
+
"default": "undefined",
|
235
|
+
"fieldName": "endIcon",
|
236
|
+
"type": {
|
237
|
+
"text": "string | undefined"
|
238
|
+
}
|
239
|
+
}
|
240
|
+
],
|
241
|
+
"superclass": {
|
242
|
+
"name": "UI5Element",
|
243
|
+
"package": "@ui5/webcomponents-base",
|
244
|
+
"module": "dist/UI5Element.js"
|
245
|
+
},
|
246
|
+
"tagName": "ui5-ai-button-state",
|
247
|
+
"customElement": true,
|
248
|
+
"_ui5experimental": "The Button and ButtonState web components are availabe since 2.0 under an experimental flag and their API and behaviour are subject to change.",
|
249
|
+
"_ui5since": "2.0",
|
250
|
+
"_ui5privacy": "public",
|
251
|
+
"_ui5abstract": true
|
252
|
+
}
|
253
|
+
],
|
254
|
+
"exports": [
|
255
|
+
{
|
256
|
+
"kind": "js",
|
257
|
+
"name": "default",
|
258
|
+
"declaration": {
|
259
|
+
"name": "ButtonState",
|
260
|
+
"module": "dist/ButtonState.js"
|
261
|
+
}
|
262
|
+
},
|
263
|
+
{
|
264
|
+
"kind": "custom-element-definition",
|
265
|
+
"name": "ui5-ai-button-state",
|
266
|
+
"declaration": {
|
267
|
+
"name": "ButtonState",
|
268
|
+
"module": "dist/ButtonState.js"
|
269
|
+
}
|
270
|
+
}
|
271
|
+
]
|
272
|
+
},
|
73
273
|
{
|
74
274
|
"kind": "javascript-module",
|
75
275
|
"path": "dist/PromptInput.js",
|
@@ -96,8 +296,8 @@
|
|
96
296
|
"type": {
|
97
297
|
"text": "string"
|
98
298
|
},
|
99
|
-
"description": "Defines the value of the component.",
|
100
299
|
"default": "\"\"",
|
300
|
+
"description": "Defines the value of the component.",
|
101
301
|
"privacy": "public",
|
102
302
|
"_ui5since": "2.0.0",
|
103
303
|
"_ui5validator": "String"
|
@@ -106,10 +306,10 @@
|
|
106
306
|
"kind": "field",
|
107
307
|
"name": "placeholder",
|
108
308
|
"type": {
|
109
|
-
"text": "string"
|
309
|
+
"text": "string | undefined"
|
110
310
|
},
|
111
311
|
"description": "Defines a short hint intended to aid the user with data entry when the\ncomponent has no value.",
|
112
|
-
"default": "
|
312
|
+
"default": "undefined",
|
113
313
|
"privacy": "public",
|
114
314
|
"_ui5since": "2.0.0",
|
115
315
|
"_ui5validator": "String"
|
@@ -118,10 +318,10 @@
|
|
118
318
|
"kind": "field",
|
119
319
|
"name": "label",
|
120
320
|
"type": {
|
121
|
-
"text": "string"
|
321
|
+
"text": "string | undefined"
|
122
322
|
},
|
123
323
|
"description": "Defines the label of the input field.",
|
124
|
-
"default": "
|
324
|
+
"default": "undefined",
|
125
325
|
"privacy": "public",
|
126
326
|
"_ui5since": "2.0.0",
|
127
327
|
"_ui5validator": "String"
|
@@ -132,8 +332,8 @@
|
|
132
332
|
"type": {
|
133
333
|
"text": "boolean"
|
134
334
|
},
|
135
|
-
"description": "Defines whether the clear icon of the input will be shown.",
|
136
335
|
"default": "false",
|
336
|
+
"description": "Defines whether the clear icon of the input will be shown.",
|
137
337
|
"privacy": "public",
|
138
338
|
"_ui5since": "2.0.0",
|
139
339
|
"_ui5validator": "Boolean"
|
@@ -144,8 +344,8 @@
|
|
144
344
|
"type": {
|
145
345
|
"text": "boolean"
|
146
346
|
},
|
147
|
-
"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.",
|
148
347
|
"default": "false",
|
348
|
+
"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.",
|
149
349
|
"privacy": "public",
|
150
350
|
"_ui5since": "2.0.0",
|
151
351
|
"_ui5validator": "Boolean"
|
@@ -156,8 +356,8 @@
|
|
156
356
|
"type": {
|
157
357
|
"text": "boolean"
|
158
358
|
},
|
159
|
-
"description": "Defines whether the component is in disabled state.\n\n**Note:** A disabled component is completely noninteractive.",
|
160
359
|
"default": "false",
|
360
|
+
"description": "Defines whether the component is in disabled state.\n\n**Note:** A disabled component is completely noninteractive.",
|
161
361
|
"privacy": "public",
|
162
362
|
"_ui5since": "2.0.0",
|
163
363
|
"_ui5validator": "Boolean"
|
@@ -168,8 +368,8 @@
|
|
168
368
|
"type": {
|
169
369
|
"text": "boolean"
|
170
370
|
},
|
171
|
-
"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.",
|
172
371
|
"default": "false",
|
372
|
+
"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.",
|
173
373
|
"privacy": "public",
|
174
374
|
"_ui5since": "2.0.0",
|
175
375
|
"_ui5validator": "Boolean"
|
@@ -184,7 +384,7 @@
|
|
184
384
|
"default": "undefined",
|
185
385
|
"privacy": "public",
|
186
386
|
"_ui5since": "2.0.0",
|
187
|
-
"_ui5validator": "
|
387
|
+
"_ui5validator": "Number"
|
188
388
|
},
|
189
389
|
{
|
190
390
|
"kind": "field",
|
@@ -199,11 +399,11 @@
|
|
199
399
|
}
|
200
400
|
]
|
201
401
|
},
|
202
|
-
"description": "Defines the value state of the component.",
|
203
402
|
"default": "\"None\"",
|
403
|
+
"description": "Defines the value state of the component.",
|
204
404
|
"privacy": "public",
|
205
405
|
"_ui5since": "2.0.0",
|
206
|
-
"_ui5validator": "
|
406
|
+
"_ui5validator": "String"
|
207
407
|
}
|
208
408
|
],
|
209
409
|
"events": [
|
@@ -248,19 +448,19 @@
|
|
248
448
|
{
|
249
449
|
"description": "Defines a short hint intended to aid the user with data entry when the\ncomponent has no value.",
|
250
450
|
"name": "placeholder",
|
251
|
-
"default": "
|
451
|
+
"default": "undefined",
|
252
452
|
"fieldName": "placeholder",
|
253
453
|
"type": {
|
254
|
-
"text": "string"
|
454
|
+
"text": "string | undefined"
|
255
455
|
}
|
256
456
|
},
|
257
457
|
{
|
258
458
|
"description": "Defines the label of the input field.",
|
259
459
|
"name": "label",
|
260
|
-
"default": "
|
460
|
+
"default": "undefined",
|
261
461
|
"fieldName": "label",
|
262
462
|
"type": {
|
263
|
-
"text": "string"
|
463
|
+
"text": "string | undefined"
|
264
464
|
}
|
265
465
|
},
|
266
466
|
{
|
@@ -314,7 +514,7 @@
|
|
314
514
|
"default": "\"None\"",
|
315
515
|
"fieldName": "valueState",
|
316
516
|
"type": {
|
317
|
-
"text": "\"
|
517
|
+
"text": "\"Positive\" | \"Negative\" | \"None\" | \"Critical\" | \"Information\""
|
318
518
|
}
|
319
519
|
}
|
320
520
|
],
|
@@ -325,6 +525,7 @@
|
|
325
525
|
},
|
326
526
|
"tagName": "ui5-ai-prompt-input",
|
327
527
|
"customElement": true,
|
528
|
+
"_ui5experimental": "The **@ui5/webcomponents-ai** package is under development and considered experimental - components' APIs are subject to change.",
|
328
529
|
"_ui5privacy": "public"
|
329
530
|
}
|
330
531
|
],
|