@festo-ui/react 3.2.0 → 3.2.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/README.md CHANGED
@@ -13,5 +13,5 @@ To install Festo React, run:
13
13
  ```js
14
14
  /* The following lines should be included in your src/index.js or App.js file*/
15
15
  import '@festo-ui/web-essentials/dist/css/festo-web-essentials.min.css';
16
- import '@festo-ui/react/react.esm.css';
16
+ import '@festo-ui/react/index.esm.css';
17
17
  ```
package/index.esm.js CHANGED
@@ -3389,9 +3389,11 @@ function Segment(props) {
3389
3389
  'fwe-segment-icon-text': useIconAndText
3390
3390
  }, className)
3391
3391
  }, {
3392
- children: [jsx("legend", {
3392
+ children: [jsx("legend", Object.assign({
3393
+ className: "fwe-sr-only fwe-d-inline-block"
3394
+ }, {
3393
3395
  children: legend
3394
- }, void 0), jsx("div", Object.assign({
3396
+ }), void 0), jsx("div", Object.assign({
3395
3397
  className: "fwe-segment-group"
3396
3398
  }, {
3397
3399
  children: React.Children.map(children, child => {
@@ -3431,6 +3433,13 @@ function SegmentControl(props) {
3431
3433
  viewMode = iconOnly ? 'icon' : 'icon-text';
3432
3434
  }
3433
3435
 
3436
+ const prefix = 'fwe-icon-';
3437
+ let innerIcon = icon;
3438
+
3439
+ if (icon && icon.indexOf(prefix) === -1) {
3440
+ innerIcon = prefix + icon;
3441
+ }
3442
+
3434
3443
  const handleChange = event => {
3435
3444
  if (onChange) {
3436
3445
  onChange(event, value);
@@ -3458,12 +3467,12 @@ function SegmentControl(props) {
3458
3467
  children: label
3459
3468
  }), void 0), jsx("i", {
3460
3469
  "aria-hidden": "true",
3461
- className: classNames('fwe-icon', `fwe-icon-${icon}`)
3470
+ className: classNames('fwe-icon', innerIcon)
3462
3471
  }, void 0)]
3463
3472
  }, void 0), viewMode === 'text' && label, viewMode === 'icon-text' && jsxs(Fragment, {
3464
3473
  children: [jsx("i", {
3465
3474
  "aria-hidden": "true",
3466
- className: classNames('fwe-icon', `fwe-icon-${icon}`)
3475
+ className: classNames('fwe-icon', innerIcon)
3467
3476
  }, void 0), label]
3468
3477
  }, void 0)]
3469
3478
  }), void 0)]
package/index.umd.js CHANGED
@@ -3656,9 +3656,11 @@
3656
3656
  'fwe-segment-icon-text': useIconAndText
3657
3657
  }, className)
3658
3658
  }, {
3659
- children: [jsxRuntime.jsx("legend", {
3659
+ children: [jsxRuntime.jsx("legend", __assign({
3660
+ className: "fwe-sr-only fwe-d-inline-block"
3661
+ }, {
3660
3662
  children: legend
3661
- }, void 0), jsxRuntime.jsx("div", __assign({
3663
+ }), void 0), jsxRuntime.jsx("div", __assign({
3662
3664
  className: "fwe-segment-group"
3663
3665
  }, {
3664
3666
  children: React__default["default"].Children.map(children, function (child) {
@@ -3697,6 +3699,13 @@
3697
3699
  viewMode = iconOnly ? 'icon' : 'icon-text';
3698
3700
  }
3699
3701
 
3702
+ var prefix = 'fwe-icon-';
3703
+ var innerIcon = icon;
3704
+
3705
+ if (icon && icon.indexOf(prefix) === -1) {
3706
+ innerIcon = prefix + icon;
3707
+ }
3708
+
3700
3709
  var handleChange = function handleChange(event) {
3701
3710
  if (onChange) {
3702
3711
  onChange(event, value);
@@ -3726,12 +3735,12 @@
3726
3735
  children: label
3727
3736
  }), void 0), jsxRuntime.jsx("i", {
3728
3737
  "aria-hidden": "true",
3729
- className: classNames__default["default"]('fwe-icon', "fwe-icon-".concat(icon))
3738
+ className: classNames__default["default"]('fwe-icon', innerIcon)
3730
3739
  }, void 0)]
3731
3740
  }, void 0), viewMode === 'text' && label, viewMode === 'icon-text' && jsxRuntime.jsxs(jsxRuntime.Fragment, {
3732
3741
  children: [jsxRuntime.jsx("i", {
3733
3742
  "aria-hidden": "true",
3734
- className: classNames__default["default"]('fwe-icon', "fwe-icon-".concat(icon))
3743
+ className: classNames__default["default"]('fwe-icon', innerIcon)
3735
3744
  }, void 0), label]
3736
3745
  }, void 0)]
3737
3746
  }), void 0)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@festo-ui/react",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "author": "Festo UI (styleguide@festo.com)",
5
5
  "license": "apache-2.0",
6
6
  "peerDependencies": {