@mmb-digital/ds-lilly 0.10.7 → 0.10.8

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
  };
@@ -109214,6 +109215,7 @@ var Select2 = function (_a) {
109214
109215
  help: help,
109215
109216
  isDisabled: isDisabled,
109216
109217
  label: label,
109218
+ labelFor: name + "_button",
109217
109219
  labelTooltip: labelTooltip,
109218
109220
  name: name,
109219
109221
  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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmb-digital/ds-lilly",
3
- "version": "0.10.7",
3
+ "version": "0.10.8",
4
4
  "description": "MMB LILLY design system",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,