@ui5/webcomponents 2.26.0 → 2.27.0-rc.0
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 +21 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Avatar.d.ts +7 -0
- package/dist/Avatar.js +18 -5
- package/dist/Avatar.js.map +1 -1
- package/dist/ComboBoxItemGroup.d.ts +2 -0
- package/dist/ComboBoxItemGroup.js +2 -0
- package/dist/ComboBoxItemGroup.js.map +1 -1
- package/dist/DatePicker.d.ts +14 -0
- package/dist/DatePicker.js +14 -0
- package/dist/DatePicker.js.map +1 -1
- package/dist/ListBoxItemGroupTemplate.js +1 -1
- package/dist/ListBoxItemGroupTemplate.js.map +1 -1
- package/dist/ListItemBaseTemplate.d.ts +2 -0
- package/dist/ListItemBaseTemplate.js +1 -1
- package/dist/ListItemBaseTemplate.js.map +1 -1
- package/dist/MultiComboBoxItemGroup.d.ts +2 -0
- package/dist/MultiComboBoxItemGroup.js +2 -0
- package/dist/MultiComboBoxItemGroup.js.map +1 -1
- package/dist/NumberInput.d.ts +271 -0
- package/dist/NumberInput.js +719 -0
- package/dist/NumberInput.js.map +1 -0
- package/dist/NumberInputTemplate.d.ts +2 -0
- package/dist/NumberInputTemplate.js +18 -0
- package/dist/NumberInputTemplate.js.map +1 -0
- package/dist/Option.d.ts +10 -0
- package/dist/Option.js +6 -0
- package/dist/Option.js.map +1 -1
- package/dist/OptionGroup.d.ts +34 -0
- package/dist/OptionGroup.js +61 -0
- package/dist/OptionGroup.js.map +1 -0
- package/dist/OptionGroupTemplate.d.ts +2 -0
- package/dist/OptionGroupTemplate.js +6 -0
- package/dist/OptionGroupTemplate.js.map +1 -0
- package/dist/OptionTemplate.js +6 -1
- package/dist/OptionTemplate.js.map +1 -1
- package/dist/Select.d.ts +19 -2
- package/dist/Select.js +79 -28
- package/dist/Select.js.map +1 -1
- package/dist/SelectPopoverTemplate.js +1 -1
- package/dist/SelectPopoverTemplate.js.map +1 -1
- package/dist/SelectTemplate.js +2 -1
- package/dist/SelectTemplate.js.map +1 -1
- package/dist/StepInput.d.ts +14 -127
- package/dist/StepInput.js +40 -472
- package/dist/StepInput.js.map +1 -1
- package/dist/StepInputTemplate.js +4 -15
- package/dist/StepInputTemplate.js.map +1 -1
- package/dist/SuggestionItemGroup.d.ts +2 -0
- package/dist/SuggestionItemGroup.js +2 -0
- package/dist/SuggestionItemGroup.js.map +1 -1
- package/dist/bundle.esm.js +2 -0
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/NumberInput.css +1 -0
- package/dist/css/themes/OptionGroup.css +1 -0
- package/dist/css/themes/StepInput.css +1 -1
- package/dist/css/themes/TimePickerClock.css +1 -1
- package/dist/css/themes/TimeSelectionClocks.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_auto/parameters-bundle.css +30 -22
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hc_auto/parameters-bundle.css +31 -24
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +734 -142
- package/dist/custom-elements.json +666 -182
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hc_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +7 -6
- package/dist/generated/i18n/i18n-defaults.js +7 -6
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/NumberInput.css.d.ts +2 -0
- package/dist/generated/themes/NumberInput.css.js +8 -0
- package/dist/generated/themes/NumberInput.css.js.map +1 -0
- package/dist/generated/themes/OptionGroup.css.d.ts +2 -0
- package/dist/generated/themes/OptionGroup.css.js +8 -0
- package/dist/generated/themes/OptionGroup.css.js.map +1 -0
- package/dist/generated/themes/StepInput.css.d.ts +1 -1
- package/dist/generated/themes/StepInput.css.js +1 -1
- package/dist/generated/themes/StepInput.css.js.map +1 -1
- package/dist/generated/themes/TimePickerClock.css.d.ts +1 -1
- package/dist/generated/themes/TimePickerClock.css.js +1 -1
- package/dist/generated/themes/TimePickerClock.css.js.map +1 -1
- package/dist/generated/themes/TimeSelectionClocks.css.d.ts +1 -1
- package/dist/generated/themes/TimeSelectionClocks.css.js +1 -1
- package/dist/generated/themes/TimeSelectionClocks.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +30 -22
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js +31 -24
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +105 -5
- package/dist/web-types.json +272 -10
- package/package.json +9 -9
- package/src/ListBoxItemGroupTemplate.tsx +1 -1
- package/src/ListItemBaseTemplate.tsx +4 -0
- package/src/NumberInputTemplate.tsx +95 -0
- package/src/OptionGroupTemplate.tsx +20 -0
- package/src/OptionTemplate.tsx +6 -1
- package/src/SelectPopoverTemplate.tsx +1 -1
- package/src/SelectTemplate.tsx +6 -0
- package/src/StepInputTemplate.tsx +23 -86
- package/src/i18n/messagebundle.properties +10 -8
- package/src/i18n/messagebundle_de.properties +2 -2
- package/src/i18n/messagebundle_pl.properties +1 -1
- package/src/i18n/messagebundle_ru.properties +1 -1
- package/src/themes/NumberInput.css +321 -0
- package/src/themes/OptionGroup.css +28 -0
- package/src/themes/StepInput.css +0 -276
- package/src/themes/TimePickerClock.css +1 -1
- package/src/themes/TimeSelectionClocks.css +1 -1
- package/src/themes/base/NumberInput-parameters.css +31 -0
- package/src/themes/base/sizes-parameters.css +3 -3
- package/src/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/src/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/src/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/src/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/src/themes/sap_horizon/NumberInput-parameters.css +26 -0
- package/src/themes/sap_horizon/parameters-bundle.css +1 -1
- package/src/themes/sap_horizon_dark/NumberInput-parameters.css +26 -0
- package/src/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/src/themes/sap_horizon_hcb/NumberInput-parameters.css +14 -0
- package/src/themes/sap_horizon_hcb/parameters-bundle.css +2 -1
- package/src/themes/sap_horizon_hcw/NumberInput-parameters.css +14 -0
- package/src/themes/sap_horizon_hcw/parameters-bundle.css +2 -1
- package/src/themes/base/StepInput-parameters.css +0 -25
- package/src/themes/sap_horizon/StepInput-parameters.css +0 -25
- package/src/themes/sap_horizon_dark/StepInput-parameters.css +0 -25
|
@@ -12,6 +12,8 @@ import ComboBoxItemGroup from "./ComboBoxItemGroup.js";
|
|
|
12
12
|
* @public
|
|
13
13
|
* @implements {IMultiComboBoxItem}
|
|
14
14
|
* @since 2.0.0
|
|
15
|
+
* @csspart header - Used to style the header item of the group
|
|
16
|
+
* @csspart title - Used to style the title of the group header
|
|
15
17
|
*/
|
|
16
18
|
declare class MultiComboBoxItemGroup extends ComboBoxItemGroup implements IMultiComboBoxItem {
|
|
17
19
|
eventDetails: ComboBoxItemGroup["eventDetails"];
|
|
@@ -18,6 +18,8 @@ import ComboBoxItemGroup from "./ComboBoxItemGroup.js";
|
|
|
18
18
|
* @public
|
|
19
19
|
* @implements {IMultiComboBoxItem}
|
|
20
20
|
* @since 2.0.0
|
|
21
|
+
* @csspart header - Used to style the header item of the group
|
|
22
|
+
* @csspart title - Used to style the title of the group header
|
|
21
23
|
*/
|
|
22
24
|
let MultiComboBoxItemGroup = class MultiComboBoxItemGroup extends ComboBoxItemGroup {
|
|
23
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiComboBoxItemGroup.js","sourceRoot":"","sources":["../src/MultiComboBoxItemGroup.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAE1E,OAAO,qBAAqB,MAAM,4DAA4D,CAAC;AAG/F,OAAO,8BAA8B,MAAM,qCAAqC,CAAC;AAEjF,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAEvD
|
|
1
|
+
{"version":3,"file":"MultiComboBoxItemGroup.js","sourceRoot":"","sources":["../src/MultiComboBoxItemGroup.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAE1E,OAAO,qBAAqB,MAAM,4DAA4D,CAAC;AAG/F,OAAO,8BAA8B,MAAM,qCAAqC,CAAC;AAEjF,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAEvD;;;;;;;;;;;GAWG;AAKH,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,iBAAiB;IAcrD;;;OAGG;IACH,IAAI,WAAW;QACd,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,QAAQ;QACX,OAAO,KAAK,CAAC;IACd,CAAC;IAED,IAAI,YAAY;QACf,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,iBAAiB,CAAC;IAC5E,CAAC;IAED,cAAc;QACb,OAAO,IAAI,CAAC,UAAW,CAAC,aAAa,CAAC,uBAAuB,CAAwB,CAAC;IACvF,CAAC;CACD,CAAA;AArBA;IANC,IAAI,CAAC;QACL,SAAS,EAAE,IAAI;QACf,uBAAuB,EAAE,IAAI;QAC7B,eAAe,EAAE,IAAI;QACrB,IAAI,EAAE,WAAW;KACjB,CAAC;qDACqC;AAZlC,sBAAsB;IAJ3B,aAAa,CAAC;QACd,GAAG,EAAE,oBAAoB;QACzB,QAAQ,EAAE,8BAA8B;KACxC,CAAC;GACI,sBAAsB,CAiC3B;AAED,sBAAsB,CAAC,MAAM,EAAE,CAAC;AAEhC,eAAe,sBAAsB,CAAC;AAEtC,MAAM,CAAC,MAAM,kCAAkC,GAAG,qBAAqB,CAAyB,aAAa,CAAC,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport type { DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport createInstanceChecker from \"@ui5/webcomponents-base/dist/util/createInstanceChecker.js\";\nimport type { IMultiComboBoxItem } from \"./MultiComboBox.js\";\nimport type MultiComboBoxItem from \"./MultiComboBoxItem.js\";\nimport MultiComboBoxItemGroupTemplate from \"./MultiComboBoxItemGroupTemplate.js\";\nimport type ListItemGroupHeader from \"./ListItemGroupHeader.js\";\nimport ComboBoxItemGroup from \"./ComboBoxItemGroup.js\";\n\n/**\n * @class\n * The `ui5-mcb-item-group` is type of suggestion item,\n * that can be used to split the `ui5-multi-combobox` suggestions into groups.\n * @constructor\n * @extends ComboBoxItemGroup\n * @public\n * @implements {IMultiComboBoxItem}\n * @since 2.0.0\n * @csspart header - Used to style the header item of the group\n * @csspart title - Used to style the title of the group header\n */\n@customElement({\n\ttag: \"ui5-mcb-item-group\",\n\ttemplate: MultiComboBoxItemGroupTemplate,\n})\nclass MultiComboBoxItemGroup extends ComboBoxItemGroup implements IMultiComboBoxItem {\n\teventDetails!: ComboBoxItemGroup[\"eventDetails\"];\n\t/**\n\t * Defines the items of the <code>ui5-mcb-item-group</code>.\n\t * @public\n\t */\n\t@slot({\n\t\t\"default\": true,\n\t\tinvalidateOnChildChange: true,\n\t\tindividualSlots: true,\n\t\ttype: HTMLElement,\n\t})\n\titems!: DefaultSlot<MultiComboBoxItem>;\n\n\t/**\n\t * Used to avoid tag name checks\n\t * @protected\n\t */\n\tget isGroupItem() {\n\t\treturn true;\n\t}\n\n\tget selected() {\n\t\treturn false;\n\t}\n\n\tget stableDomRef() {\n\t\treturn this.getAttribute(\"stable-dom-ref\") || `${this._id}-stable-dom-ref`;\n\t}\n\n\tgetFocusDomRef() {\n\t\treturn this.shadowRoot!.querySelector(\"[ui5-li-group-header]\") as ListItemGroupHeader;\n\t}\n}\n\nMultiComboBoxItemGroup.define();\n\nexport default MultiComboBoxItemGroup;\n\nexport const isInstanceOfMultiComboBoxItemGroup = createInstanceChecker<MultiComboBoxItemGroup>(\"isGroupItem\");\n"]}
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import type { Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
3
|
+
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
4
|
+
import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js";
|
|
5
|
+
import type { Timeout } from "@ui5/webcomponents-base/dist/types.js";
|
|
6
|
+
import type { IFormInputElement } from "@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js";
|
|
7
|
+
import "@ui5/webcomponents-icons/dist/less.js";
|
|
8
|
+
import "@ui5/webcomponents-icons/dist/add.js";
|
|
9
|
+
import type Input from "./Input.js";
|
|
10
|
+
import type { InputAccInfo, InputEventDetail } from "./Input.js";
|
|
11
|
+
import InputType from "./types/InputType.js";
|
|
12
|
+
import NumberFormat from "@ui5/webcomponents-localization/dist/NumberFormat.js";
|
|
13
|
+
type NumberInputValueStateChangeEventDetail = {
|
|
14
|
+
valueState: `${ValueState}`;
|
|
15
|
+
valid: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @class
|
|
19
|
+
*
|
|
20
|
+
* ### Overview
|
|
21
|
+
*
|
|
22
|
+
* The `ui5-number-input` component is a numeric input field. It allows users to enter, edit and select numeric values.
|
|
23
|
+
*
|
|
24
|
+
* ### Usage
|
|
25
|
+
*
|
|
26
|
+
* The default step is 1 but the app developer can set a different one.
|
|
27
|
+
*
|
|
28
|
+
* App developers can set a maximum and minimum value for `ui5-number-input`.
|
|
29
|
+
* The increase/decrease button and the up/down keyboard navigation become disabled when
|
|
30
|
+
* the value reaches the max/min or a new value is entered from the input which is greater/less than the max/min.
|
|
31
|
+
*
|
|
32
|
+
* #### When to use:
|
|
33
|
+
*
|
|
34
|
+
* - To enter or adjust numeric values.
|
|
35
|
+
* - To adjust values for a specific step.
|
|
36
|
+
*
|
|
37
|
+
* #### When not to use:
|
|
38
|
+
*
|
|
39
|
+
* - To enter a static number (for example, postal code, phone number, or ID). In this case,
|
|
40
|
+
* use the regular `ui5-input` instead.
|
|
41
|
+
* - To enter dates and times. In this case, use date/time related components instead.
|
|
42
|
+
*
|
|
43
|
+
* ### ES6 Module Import
|
|
44
|
+
*
|
|
45
|
+
* `import "@ui5/webcomponents/dist/NumberInput.js";`
|
|
46
|
+
* @constructor
|
|
47
|
+
* @extends UI5Element
|
|
48
|
+
* @since 2.26.0
|
|
49
|
+
* @experimental
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
declare class NumberInput extends UI5Element implements IFormInputElement {
|
|
53
|
+
eventDetails: {
|
|
54
|
+
change: void;
|
|
55
|
+
input: InputEventDetail;
|
|
56
|
+
"value-state-change": NumberInputValueStateChangeEventDetail;
|
|
57
|
+
"_request-submit": void;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Defines a value of the component.
|
|
61
|
+
* @default 0
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
value: number;
|
|
65
|
+
/**
|
|
66
|
+
* Defines a minimum value of the component.
|
|
67
|
+
* @default undefined
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
min?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Defines a maximum value of the component.
|
|
73
|
+
* @default undefined
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
max?: number;
|
|
77
|
+
/**
|
|
78
|
+
* Defines a step of increasing/decreasing the value of the component.
|
|
79
|
+
* @default 1
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
step: number;
|
|
83
|
+
/**
|
|
84
|
+
* Defines the value state of the component.
|
|
85
|
+
* @default "None"
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
valueState: `${ValueState}`;
|
|
89
|
+
/**
|
|
90
|
+
* Defines whether the component is required.
|
|
91
|
+
* @default false
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
required: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Determines whether the component is displayed as disabled.
|
|
97
|
+
* @default false
|
|
98
|
+
* @public
|
|
99
|
+
*/
|
|
100
|
+
disabled: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Determines whether the component is displayed as read-only.
|
|
103
|
+
* @default false
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
readonly: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Defines a short hint, intended to aid the user with data entry when the
|
|
109
|
+
* component has no value.
|
|
110
|
+
*
|
|
111
|
+
* **Note:** When no placeholder is set, the format pattern is displayed as a placeholder.
|
|
112
|
+
* Passing an empty string as the value of this property will make the component appear empty - without placeholder or format pattern.
|
|
113
|
+
* @default undefined
|
|
114
|
+
* @public
|
|
115
|
+
*/
|
|
116
|
+
placeholder?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Determines the name by which the component will be identified upon submission in an HTML form.
|
|
119
|
+
*
|
|
120
|
+
* **Note:** This property is only applicable within the context of an HTML Form element.
|
|
121
|
+
* @default undefined
|
|
122
|
+
* @public
|
|
123
|
+
*/
|
|
124
|
+
name?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Determines the number of digits after the decimal point of the component.
|
|
127
|
+
* @default 0
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
130
|
+
valuePrecision: number;
|
|
131
|
+
/**
|
|
132
|
+
* Defines the accessible ARIA name of the component.
|
|
133
|
+
* @default undefined
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
accessibleName?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Receives ID (or many IDs) of the elements that label the component.
|
|
139
|
+
* @default undefined
|
|
140
|
+
* @public
|
|
141
|
+
*/
|
|
142
|
+
accessibleNameRef?: string;
|
|
143
|
+
/**
|
|
144
|
+
* Controls whether the increment/decrement step buttons are shown.
|
|
145
|
+
* @default false
|
|
146
|
+
* @private
|
|
147
|
+
*/
|
|
148
|
+
_showStepButtons: boolean;
|
|
149
|
+
_externalAriaLabel?: string;
|
|
150
|
+
_decIconDisabled: boolean;
|
|
151
|
+
_incIconDisabled: boolean;
|
|
152
|
+
focused: boolean;
|
|
153
|
+
_inputFocused: boolean;
|
|
154
|
+
_previousValue: number | undefined;
|
|
155
|
+
_waitTimeout: number;
|
|
156
|
+
_speed: number;
|
|
157
|
+
_btnDown?: boolean;
|
|
158
|
+
_spinTimeoutId?: Timeout;
|
|
159
|
+
_spinStarted: boolean;
|
|
160
|
+
_inputValue?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Defines the value state message that will be displayed as pop up under the component.
|
|
163
|
+
*
|
|
164
|
+
* **Note:** If not specified, a default text (in the respective language) will be displayed.
|
|
165
|
+
*
|
|
166
|
+
* **Note:** The `valueStateMessage` would be displayed,
|
|
167
|
+
* when the component is in `Information`, `Critical` or `Negative` value state.
|
|
168
|
+
* @public
|
|
169
|
+
*/
|
|
170
|
+
valueStateMessage: Slot<HTMLElement>;
|
|
171
|
+
_initialValueState?: `${ValueState}`;
|
|
172
|
+
_formatter?: NumberFormat;
|
|
173
|
+
_languageChangeHandler?: (lang: string) => Promise<void>;
|
|
174
|
+
_languageChanged?: boolean;
|
|
175
|
+
_delimiter?: string;
|
|
176
|
+
_groupSeparator?: string;
|
|
177
|
+
static i18nBundle: I18nBundle;
|
|
178
|
+
formElementAnchor(): Promise<HTMLElement | undefined>;
|
|
179
|
+
get formValidityMessage(): string;
|
|
180
|
+
get formValidity(): ValidityStateFlags;
|
|
181
|
+
get formFormattedValue(): FormData | string | null;
|
|
182
|
+
get type(): InputType;
|
|
183
|
+
get decIconTitle(): string;
|
|
184
|
+
get incIconTitle(): string;
|
|
185
|
+
get _decIconClickable(): boolean;
|
|
186
|
+
get _incIconClickable(): boolean;
|
|
187
|
+
get _isFocused(): boolean;
|
|
188
|
+
get _displayValue(): string;
|
|
189
|
+
get accInfo(): InputAccInfo;
|
|
190
|
+
get inputAttributes(): {
|
|
191
|
+
min: number | undefined;
|
|
192
|
+
max: number | undefined;
|
|
193
|
+
step: number;
|
|
194
|
+
};
|
|
195
|
+
onBeforeRendering(): void;
|
|
196
|
+
onEnterDOM(): void;
|
|
197
|
+
onExitDOM(): void;
|
|
198
|
+
_setupLanguageChangeHandler(): void;
|
|
199
|
+
_cleanupLanguageChangeHandler(): void;
|
|
200
|
+
get formatter(): NumberFormat;
|
|
201
|
+
get delimiter(): string;
|
|
202
|
+
get groupSeparator(): string;
|
|
203
|
+
get input(): Input;
|
|
204
|
+
get innerInput(): HTMLInputElement;
|
|
205
|
+
_onButtonFocusOut(): void;
|
|
206
|
+
_onInput(e: CustomEvent<InputEventDetail>): void;
|
|
207
|
+
_onInputFocusIn(): void;
|
|
208
|
+
_onInputFocusOut(): void;
|
|
209
|
+
_onMouseWheel(e: WheelEvent): void;
|
|
210
|
+
_setButtonState(): void;
|
|
211
|
+
_validate(): void;
|
|
212
|
+
_updateValueState(): void;
|
|
213
|
+
_preciseValue(value: number): number;
|
|
214
|
+
_fireChangeEvent(): void;
|
|
215
|
+
/**
|
|
216
|
+
* Value modifier - modifies the value of the component, validates the new value and enables/disables increment and
|
|
217
|
+
* decrement buttons according to the value and min/max values (if set). Fires `change` event when requested
|
|
218
|
+
* @private
|
|
219
|
+
* @param modifier modifies the value of the component with the given modifier (positive or negative)
|
|
220
|
+
* @param fireChangeEvent if `true`, fires `change` event when the value is changed
|
|
221
|
+
*/
|
|
222
|
+
_modifyValue(modifier: number, fireChangeEvent?: boolean): void;
|
|
223
|
+
/**
|
|
224
|
+
* Formats a number with thousands separator based on current locale
|
|
225
|
+
* @private
|
|
226
|
+
*/
|
|
227
|
+
_formatNumber(value: number): string;
|
|
228
|
+
/**
|
|
229
|
+
* Parses formatted number string back to numeric value
|
|
230
|
+
* @private
|
|
231
|
+
*/
|
|
232
|
+
_parseNumber(formattedValue: string): number;
|
|
233
|
+
_incValue(): void;
|
|
234
|
+
_decValue(): void;
|
|
235
|
+
get _isValueWithCorrectPrecision(): boolean;
|
|
236
|
+
_onInputChange(): void;
|
|
237
|
+
_setDefaultInputValueIfNeeded(): void;
|
|
238
|
+
_isValueChanged(inputValue: number): boolean;
|
|
239
|
+
_updateValueAndValidate(inputValue: number): void;
|
|
240
|
+
_onfocusin(): void;
|
|
241
|
+
_onfocusout(): void;
|
|
242
|
+
_onInputRequestSubmit(): void;
|
|
243
|
+
_onkeydown(e: KeyboardEvent): void;
|
|
244
|
+
_getCaretPosition(): number | null;
|
|
245
|
+
_getValueOnkeyDown(e: KeyboardEvent, inputValue: string, cursorPosition?: number): string;
|
|
246
|
+
_removeGroupSeparators(value: string): string;
|
|
247
|
+
_isInputValueValid(typedValue: string, parsedValue: number): boolean;
|
|
248
|
+
_decSpin(e: MouseEvent): void;
|
|
249
|
+
_incSpin(e: MouseEvent): void;
|
|
250
|
+
/**
|
|
251
|
+
* Calculates the time which should be waited until _spinValue function is called.
|
|
252
|
+
*/
|
|
253
|
+
_calcWaitTimeout(): number;
|
|
254
|
+
/**
|
|
255
|
+
* Called when the increment or decrement button is pressed and held to set new value.
|
|
256
|
+
* @private
|
|
257
|
+
* @param increment - is this the increment button or not so the values should be spin accordingly up or down
|
|
258
|
+
* @param resetVariables - whether to reset the spin-related variables or not
|
|
259
|
+
*/
|
|
260
|
+
_spinValue(increment: boolean, resetVariables?: boolean): void;
|
|
261
|
+
/**
|
|
262
|
+
* Resets spin process
|
|
263
|
+
*/
|
|
264
|
+
_resetSpin(): void;
|
|
265
|
+
/**
|
|
266
|
+
* Resets spin process when mouse outs + or - buttons
|
|
267
|
+
*/
|
|
268
|
+
_resetSpinOut(): void;
|
|
269
|
+
}
|
|
270
|
+
export default NumberInput;
|
|
271
|
+
export type { NumberInputValueStateChangeEventDetail, };
|