@uncinc/uncinc-react-kitchen-sink 2.8.25 → 2.8.27

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.
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import { Field } from 'formik';
4
4
  import c from 'classnames';
5
5
  import { useTranslation } from 'react-i18next';
6
+ import ReactHtmlParser from 'react-html-parser';
6
7
  import GenericFormElement from '../GenericFormElement';
7
8
  import withMapping from '../../../Context/withMapping';
8
9
  import { useExtendedFormikContext } from '../FormikWrapper';
@@ -73,7 +74,7 @@ export var Checkbox = function Checkbox(props) {
73
74
  },
74
75
  disabled: disabled,
75
76
  className: className
76
- })), title);
77
+ })), ReactHtmlParser(title));
77
78
  }));
78
79
  };
79
80
  Checkbox.defaultProps = {
@@ -69,7 +69,7 @@ var SelectInput = function SelectInput(props) {
69
69
  });
70
70
  } else {
71
71
  var _value2 = value !== undefined ? value : defaultValue || '';
72
- selectedOption = optionsTransformed.find(function (option) {
72
+ selectedOption = optionsTransformed.filter(function (option) {
73
73
  return option.value === _value2;
74
74
  });
75
75
  }
@@ -98,3 +98,50 @@ $material-icon-styles: (
98
98
  width: 1em;
99
99
  @include icon-color(#000000);
100
100
  }
101
+
102
+
103
+ /// gridIconToMaterialIcon
104
+ ///
105
+ /// Mixin to overwrite old icon-implementations.
106
+ ///
107
+ /// @param {String} $icon-name - name of the icon.
108
+ /// Needs to correspond with the file name of the icon.
109
+ ///
110
+ /// @param {String} $style - Material Icon style
111
+ ///
112
+ /// @param {Boolean} $custom - Are we overwwriting with a
113
+ /// custom icon?
114
+ ///
115
+ /// @example scss
116
+ /// .icon-arrow {
117
+ /// @include gridIconToMaterialIcon('download');
118
+ /// }
119
+ ///
120
+ /// @example scss
121
+ /// .icon-download {
122
+ /// @include gridIconToMaterialIcon($icon-name: 'custom_download', $custom: true);
123
+ /// }
124
+ ///
125
+ @mixin gridIconToMaterialIcon(
126
+ $icon-name: null,
127
+ $style: 'outlined',
128
+ $custom: false,
129
+ ) {
130
+ @if not $icon-name {
131
+ @error 'an icon name is required'
132
+ }
133
+
134
+ @if not $custom {
135
+ background: url('~@material-design-icons/svg/#{$style}/#{$icon-name}.svg');
136
+ } @else {
137
+ background: url('#{$custom-icon-path}/#{$icon-name}.svg');
138
+ }
139
+
140
+ display: block;
141
+ width: 1em;
142
+ height: 1em;
143
+ background-color: transparent;
144
+ background-repeat: no-repeat;
145
+ background-position: 0 0;
146
+ background-size: 1em;
147
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uncinc/uncinc-react-kitchen-sink",
3
- "version": "2.8.25",
3
+ "version": "2.8.27",
4
4
  "description": "Default React components that are easily extended.",
5
5
  "author": "uncinc",
6
6
  "license": "MIT",