@mmb-digital/ds-lilly 0.10.7 → 0.10.9
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/dist/ds-lilly.js
CHANGED
|
@@ -99600,7 +99600,7 @@ var Label2 = function (_a) {
|
|
|
99600
99600
|
|
|
99601
99601
|
|
|
99602
99602
|
var FormGroup2 = function (_a) {
|
|
99603
|
-
var charCounter = _a.charCounter, children = _a.children, disabledTooltip = _a.disabledTooltip, _b = _a.disabledTooltipOffset, disabledTooltipOffset = _b === void 0 ? 6 : _b, disabledTooltipType = _a.disabledTooltipType, error = _a.error, _c = _a.hasError, hasError = _c === void 0 ? false : _c, _d = _a.hasWarning, hasWarning = _d === void 0 ? false : _d, help = _a.help, isDisabled = _a.isDisabled, label = _a.label, labelTooltip = _a.labelTooltip, name = _a.name, theme = _a.theme, warning = _a.warning;
|
|
99603
|
+
var charCounter = _a.charCounter, children = _a.children, disabledTooltip = _a.disabledTooltip, _b = _a.disabledTooltipOffset, disabledTooltipOffset = _b === void 0 ? 6 : _b, disabledTooltipType = _a.disabledTooltipType, error = _a.error, _c = _a.hasError, hasError = _c === void 0 ? false : _c, _d = _a.hasWarning, hasWarning = _d === void 0 ? false : _d, help = _a.help, isDisabled = _a.isDisabled, label = _a.label, labelFor = _a.labelFor, labelTooltip = _a.labelTooltip, name = _a.name, theme = _a.theme, warning = _a.warning;
|
|
99604
99604
|
return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('f-group2', { 'f-group2--disabled': isDisabled, 'f-group2--error': hasError, 'f-group2--warning': hasWarning }, theme) },
|
|
99605
99605
|
withDisabledTooltip({
|
|
99606
99606
|
isDisabled: isDisabled,
|
|
@@ -99608,7 +99608,7 @@ var FormGroup2 = function (_a) {
|
|
|
99608
99608
|
disabledTooltipOffset: disabledTooltipOffset,
|
|
99609
99609
|
disabledTooltipType: disabledTooltipType
|
|
99610
99610
|
})(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: "disabled-tooltip-wrapper" },
|
|
99611
|
-
label && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Label2, { htmlFor: name, identifier: name + "_label", labelTooltip: labelTooltip }, label)),
|
|
99611
|
+
label && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Label2, { htmlFor: labelFor || name, identifier: name + "_label", labelTooltip: labelTooltip }, label)),
|
|
99612
99612
|
children)),
|
|
99613
99613
|
charCounter && charCounter.max > 0 && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('f-controlCounter', { 'f-controlCounter--error': charCounter.length > charCounter.max }) }, (charCounter.length || 0) + " / " + charCounter.max)),
|
|
99614
99614
|
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { "aria-live": "assertive", className: "f-validationMsg f-validationMsg--invalid", id: name + "_errorMessage" }, error || warning),
|
|
@@ -100726,6 +100726,7 @@ var Autocomplete2 = function (_a) {
|
|
|
100726
100726
|
help: help,
|
|
100727
100727
|
isDisabled: isDisabled,
|
|
100728
100728
|
label: label,
|
|
100729
|
+
labelFor: name + "_button",
|
|
100729
100730
|
labelTooltip: labelTooltip,
|
|
100730
100731
|
name: name,
|
|
100731
100732
|
warning: warning
|
|
@@ -100746,7 +100747,7 @@ var Autocomplete2 = function (_a) {
|
|
|
100746
100747
|
? isCategorised(items)
|
|
100747
100748
|
? name + "_option-" + focusedCategoryIndex + "-" + focusedItemIndex
|
|
100748
100749
|
: name + "_option-" + focusedItemIndex
|
|
100749
|
-
: undefined, "aria-autocomplete": "list", "aria-controls": name + "_list", "aria-labelledby": name + "_label", autoComplete: "off", className: classBinder_cx('f-autocomplete__input'), disabled: isDisabled, id: name + "_input", name: name, placeholder: placeholder, tabIndex: isDropdownVisible ? 0 : -1, type: "text", value: fulltextValue, onChange: handleFulltextChange, onKeyDown: handleFulltextKeyPress }),
|
|
100750
|
+
: undefined, "aria-autocomplete": "list", "aria-controls": name + "_list", "aria-labelledby": name + "_label", autoComplete: "off", className: classBinder_cx('f-autocomplete__input', { 'u-hide': !isDropdownVisible }), disabled: isDisabled, id: name + "_input", name: name, placeholder: placeholder, tabIndex: isDropdownVisible ? 0 : -1, type: "text", value: fulltextValue, onChange: handleFulltextChange, onKeyDown: handleFulltextKeyPress }),
|
|
100750
100751
|
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("button", { "aria-invalid": !!error, className: classBinder_cx('f-autocomplete__button'), disabled: isDisabled, id: name + "_toggle_button", name: name, tabIndex: -1, type: "button", onClick: toggleDropdown },
|
|
100751
100752
|
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Icon, { name: "arrowDown", size: "small", theme: "f-control2__selectIcon" })))), onScrollToEnd: handleScrollToEnd, onVisibleChange: handleDropdownVisibilityChange }, renderDropdownContent()))));
|
|
100752
100753
|
};
|
|
@@ -109043,6 +109044,7 @@ var Select2 = function (_a) {
|
|
|
109043
109044
|
(_f = document.getElementById(itemElementId)) === null || _f === void 0 ? void 0 : _f.scrollIntoView({ block: 'nearest' });
|
|
109044
109045
|
}
|
|
109045
109046
|
}, [isCategorised, name]);
|
|
109047
|
+
var focusSelect = function () { return setTimeout(function () { var _a; return (_a = document.getElementById(name + "_button")) === null || _a === void 0 ? void 0 : _a.focus(); }); };
|
|
109046
109048
|
var handleComboBoxClick = function () {
|
|
109047
109049
|
if (!isDropdownVisible) {
|
|
109048
109050
|
setTimeout(function () {
|
|
@@ -109060,7 +109062,7 @@ var Select2 = function (_a) {
|
|
|
109060
109062
|
}, 100);
|
|
109061
109063
|
}
|
|
109062
109064
|
if (isDropdownVisible) {
|
|
109063
|
-
|
|
109065
|
+
focusSelect();
|
|
109064
109066
|
}
|
|
109065
109067
|
setIsDropdownVisible(!isDropdownVisible);
|
|
109066
109068
|
};
|
|
@@ -109076,10 +109078,12 @@ var Select2 = function (_a) {
|
|
|
109076
109078
|
var handleOptionClick = function (item) {
|
|
109077
109079
|
propagateChange(item);
|
|
109078
109080
|
setIsDropdownVisible(false);
|
|
109081
|
+
focusSelect();
|
|
109079
109082
|
};
|
|
109080
109083
|
var handleEmptyOptionClick = function () {
|
|
109081
109084
|
propagateChange();
|
|
109082
109085
|
setIsDropdownVisible(false);
|
|
109086
|
+
focusSelect();
|
|
109083
109087
|
};
|
|
109084
109088
|
var selectFocusedItem = function () {
|
|
109085
109089
|
var itemIndex = itemsIndex[currentItemPosition];
|
|
@@ -109214,6 +109218,7 @@ var Select2 = function (_a) {
|
|
|
109214
109218
|
help: help,
|
|
109215
109219
|
isDisabled: isDisabled,
|
|
109216
109220
|
label: label,
|
|
109221
|
+
labelFor: name + "_button",
|
|
109217
109222
|
labelTooltip: labelTooltip,
|
|
109218
109223
|
name: name,
|
|
109219
109224
|
warning: warning
|
|
@@ -15,6 +15,8 @@ export interface FormGroup2PropsType extends ComponentPropsType, DisabledTooltip
|
|
|
15
15
|
isDisabled?: boolean;
|
|
16
16
|
/** Form field label. */
|
|
17
17
|
label?: ReactNode;
|
|
18
|
+
/** htmlFor attribute for label (name is used by default) */
|
|
19
|
+
labelFor?: string;
|
|
18
20
|
/** Content of additional label tooltip. */
|
|
19
21
|
labelTooltip?: ReactNode;
|
|
20
22
|
/** Defines counter of maximum characters to be inserted. */
|
|
@@ -27,5 +29,5 @@ export interface FormGroup2PropsType extends ComponentPropsType, DisabledTooltip
|
|
|
27
29
|
/** Warning message shown in component warning state */
|
|
28
30
|
warning?: string;
|
|
29
31
|
}
|
|
30
|
-
export declare const FormGroup2: ({ charCounter, children, disabledTooltip, disabledTooltipOffset, disabledTooltipType, error, hasError, hasWarning, help, isDisabled, label, labelTooltip, name, theme, warning }: FormGroup2PropsType) => JSX.Element;
|
|
32
|
+
export declare const FormGroup2: ({ charCounter, children, disabledTooltip, disabledTooltipOffset, disabledTooltipType, error, hasError, hasWarning, help, isDisabled, label, labelFor, labelTooltip, name, theme, warning }: FormGroup2PropsType) => JSX.Element;
|
|
31
33
|
//# sourceMappingURL=FormGroup2.d.ts.map
|