@festo-ui/react 3.2.0 → 3.2.1-pre-20220602.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.css CHANGED
@@ -145,9 +145,6 @@
145
145
  .fr-accordion-item--collapsed .fr-accordion-item-header {
146
146
  font-weight: var(--fwe-font-weight-normal);
147
147
  }
148
- .fr-button .fr-button-text {
149
- margin: -1px 0px 1px 0px;
150
- }
151
148
  .fwe-chip-container .fr-chip .fwe-icon-menu-close {
152
149
  position: absolute;
153
150
  right: 5px;
package/index.esm.js CHANGED
@@ -354,11 +354,9 @@ function Button({
354
354
  }, {
355
355
  children: [icon && jsx("i", {
356
356
  className: `fwe-icon fwe-icon-${icon}`
357
- }, void 0), !iconOnly && jsx("div", Object.assign({
358
- className: "fr-button-text"
359
- }, {
357
+ }, void 0), !iconOnly && jsx("div", {
360
358
  children: children
361
- }), void 0)]
359
+ }, void 0)]
362
360
  }), void 0);
363
361
  }
364
362
 
@@ -3389,9 +3387,11 @@ function Segment(props) {
3389
3387
  'fwe-segment-icon-text': useIconAndText
3390
3388
  }, className)
3391
3389
  }, {
3392
- children: [jsx("legend", {
3390
+ children: [jsx("legend", Object.assign({
3391
+ className: "fwe-sr-only fwe-d-inline-block"
3392
+ }, {
3393
3393
  children: legend
3394
- }, void 0), jsx("div", Object.assign({
3394
+ }), void 0), jsx("div", Object.assign({
3395
3395
  className: "fwe-segment-group"
3396
3396
  }, {
3397
3397
  children: React.Children.map(children, child => {
@@ -3431,6 +3431,13 @@ function SegmentControl(props) {
3431
3431
  viewMode = iconOnly ? 'icon' : 'icon-text';
3432
3432
  }
3433
3433
 
3434
+ const prefix = 'fwe-icon-';
3435
+ let innerIcon = icon;
3436
+
3437
+ if (icon && icon.indexOf(prefix) === -1) {
3438
+ innerIcon = prefix + icon;
3439
+ }
3440
+
3434
3441
  const handleChange = event => {
3435
3442
  if (onChange) {
3436
3443
  onChange(event, value);
@@ -3458,12 +3465,12 @@ function SegmentControl(props) {
3458
3465
  children: label
3459
3466
  }), void 0), jsx("i", {
3460
3467
  "aria-hidden": "true",
3461
- className: classNames('fwe-icon', `fwe-icon-${icon}`)
3468
+ className: classNames('fwe-icon', innerIcon)
3462
3469
  }, void 0)]
3463
3470
  }, void 0), viewMode === 'text' && label, viewMode === 'icon-text' && jsxs(Fragment, {
3464
3471
  children: [jsx("i", {
3465
3472
  "aria-hidden": "true",
3466
- className: classNames('fwe-icon', `fwe-icon-${icon}`)
3473
+ className: classNames('fwe-icon', innerIcon)
3467
3474
  }, void 0), label]
3468
3475
  }, void 0)]
3469
3476
  }), void 0)]
package/index.umd.css CHANGED
@@ -145,9 +145,6 @@
145
145
  .fr-accordion-item--collapsed .fr-accordion-item-header {
146
146
  font-weight: var(--fwe-font-weight-normal);
147
147
  }
148
- .fr-button .fr-button-text {
149
- margin: -1px 0px 1px 0px;
150
- }
151
148
  .fwe-chip-container .fr-chip .fwe-icon-menu-close {
152
149
  position: absolute;
153
150
  right: 5px;
package/index.umd.js CHANGED
@@ -392,11 +392,9 @@
392
392
  }, {
393
393
  children: [icon && jsxRuntime.jsx("i", {
394
394
  className: "fwe-icon fwe-icon-".concat(icon)
395
- }, void 0), !iconOnly && jsxRuntime.jsx("div", __assign({
396
- className: "fr-button-text"
397
- }, {
395
+ }, void 0), !iconOnly && jsxRuntime.jsx("div", {
398
396
  children: children
399
- }), void 0)]
397
+ }, void 0)]
400
398
  }), void 0);
401
399
  }
402
400
 
@@ -3656,9 +3654,11 @@
3656
3654
  'fwe-segment-icon-text': useIconAndText
3657
3655
  }, className)
3658
3656
  }, {
3659
- children: [jsxRuntime.jsx("legend", {
3657
+ children: [jsxRuntime.jsx("legend", __assign({
3658
+ className: "fwe-sr-only fwe-d-inline-block"
3659
+ }, {
3660
3660
  children: legend
3661
- }, void 0), jsxRuntime.jsx("div", __assign({
3661
+ }), void 0), jsxRuntime.jsx("div", __assign({
3662
3662
  className: "fwe-segment-group"
3663
3663
  }, {
3664
3664
  children: React__default["default"].Children.map(children, function (child) {
@@ -3697,6 +3697,13 @@
3697
3697
  viewMode = iconOnly ? 'icon' : 'icon-text';
3698
3698
  }
3699
3699
 
3700
+ var prefix = 'fwe-icon-';
3701
+ var innerIcon = icon;
3702
+
3703
+ if (icon && icon.indexOf(prefix) === -1) {
3704
+ innerIcon = prefix + icon;
3705
+ }
3706
+
3700
3707
  var handleChange = function handleChange(event) {
3701
3708
  if (onChange) {
3702
3709
  onChange(event, value);
@@ -3726,12 +3733,12 @@
3726
3733
  children: label
3727
3734
  }), void 0), jsxRuntime.jsx("i", {
3728
3735
  "aria-hidden": "true",
3729
- className: classNames__default["default"]('fwe-icon', "fwe-icon-".concat(icon))
3736
+ className: classNames__default["default"]('fwe-icon', innerIcon)
3730
3737
  }, void 0)]
3731
3738
  }, void 0), viewMode === 'text' && label, viewMode === 'icon-text' && jsxRuntime.jsxs(jsxRuntime.Fragment, {
3732
3739
  children: [jsxRuntime.jsx("i", {
3733
3740
  "aria-hidden": "true",
3734
- className: classNames__default["default"]('fwe-icon', "fwe-icon-".concat(icon))
3741
+ className: classNames__default["default"]('fwe-icon', innerIcon)
3735
3742
  }, void 0), label]
3736
3743
  }, void 0)]
3737
3744
  }), void 0)]
@@ -1,4 +1,3 @@
1
- import './Button.scss';
2
1
  import React from 'react';
3
2
  import { ClassNamePropsWithChildren } from '../../../helper/types';
4
3
  interface ButtonProps extends ClassNamePropsWithChildren {
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-pre-20220602.1",
4
4
  "author": "Festo UI (styleguide@festo.com)",
5
5
  "license": "apache-2.0",
6
6
  "peerDependencies": {