@ballistix.digital/react-components 0.8.1 → 0.8.3

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/index.js CHANGED
@@ -10,6 +10,7 @@ var freeBrandsSvgIcons = require('@fortawesome/free-brands-svg-icons');
10
10
  var proLightSvgIcons = require('@fortawesome/pro-light-svg-icons');
11
11
  var proRegularSvgIcons = require('@fortawesome/pro-regular-svg-icons');
12
12
  var proSolidSvgIcons = require('@fortawesome/pro-solid-svg-icons');
13
+ var proThinSvgIcons = require('@fortawesome/pro-thin-svg-icons');
13
14
  var reactFontawesome = require('@fortawesome/react-fontawesome');
14
15
  var react = require('@headlessui/react');
15
16
  var mask = require('@react-input/mask');
@@ -299,6 +300,12 @@ var IconElement = function (props) {
299
300
  }
300
301
  component = (jsxRuntime.jsx(reactFontawesome.FontAwesomeIcon, { icon: ['fas', accessor], className: className }));
301
302
  break;
303
+ case 'thin':
304
+ if (!(fontawesomeSvgCore.library === null || fontawesomeSvgCore.library === void 0 ? void 0 : fontawesomeSvgCore.library.definitions.fat)) {
305
+ fontawesomeSvgCore.library.add(proThinSvgIcons.fat);
306
+ }
307
+ component = (jsxRuntime.jsx(reactFontawesome.FontAwesomeIcon, { icon: ['fat', accessor], className: className }));
308
+ break;
302
309
  }
303
310
  return component;
304
311
  };
@@ -2696,6 +2703,10 @@ var DateMenuForm = function (props) {
2696
2703
  }
2697
2704
  // eslint-disable-next-line react-hooks/exhaustive-deps
2698
2705
  }, [state]);
2706
+ // listen to value changes.
2707
+ React.useEffect(function () {
2708
+ setState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : { startDate: null, endDate: null });
2709
+ }, [defaultValue]);
2699
2710
  return (jsxRuntime.jsxs("div", { className: styles.container, children: [jsxRuntime.jsxs("div", { className: styles.head, children: [label && (jsxRuntime.jsx("label", { htmlFor: name, className: styles.label, children: label })), !required && !isRequired && typeof label === 'string' && (jsxRuntime.jsx("span", { className: styles.hint, children: "Optional" })), required && required({ isRequired: isRequired })] }), jsxRuntime.jsxs("div", { className: styles.container, "data-cy": inputDataCy, children: [jsxRuntime.jsx(Datepicker, { inputName: name, inputId: name, i18n: i18n, useRange: size === 'expanded', placeholder: placeholder, asSingle: !isRanged, separator: separator, startFrom: startFrom, displayFormat: displayFormat, disabled: isDisabled, popoverDirection: direction, minDate: minDate, maxDate: maxDate, toggleIcon: icon,
2700
2711
  //
2701
2712
  value: state,