@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.d.ts +1 -1
- package/dist/index.esm.js +11 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -146,7 +146,7 @@ declare const DropdownElement: {
|
|
|
146
146
|
|
|
147
147
|
type TProps$b = {
|
|
148
148
|
accessor: IconName;
|
|
149
|
-
type?: 'brands' | 'light' | 'regular' | 'solid';
|
|
149
|
+
type?: 'brands' | 'light' | 'regular' | 'solid' | 'thin';
|
|
150
150
|
className?: string;
|
|
151
151
|
};
|
|
152
152
|
declare const IconElement: FC<TProps$b>;
|
package/dist/index.esm.js
CHANGED
|
@@ -8,6 +8,7 @@ import { fab } from '@fortawesome/free-brands-svg-icons';
|
|
|
8
8
|
import { fal } from '@fortawesome/pro-light-svg-icons';
|
|
9
9
|
import { far } from '@fortawesome/pro-regular-svg-icons';
|
|
10
10
|
import { fas } from '@fortawesome/pro-solid-svg-icons';
|
|
11
|
+
import { fat } from '@fortawesome/pro-thin-svg-icons';
|
|
11
12
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
12
13
|
import { Menu, Transition, Dialog, Popover, Switch } from '@headlessui/react';
|
|
13
14
|
import { useMask } from '@react-input/mask';
|
|
@@ -297,6 +298,12 @@ var IconElement = function (props) {
|
|
|
297
298
|
}
|
|
298
299
|
component = (jsx(FontAwesomeIcon, { icon: ['fas', accessor], className: className }));
|
|
299
300
|
break;
|
|
301
|
+
case 'thin':
|
|
302
|
+
if (!(library === null || library === void 0 ? void 0 : library.definitions.fat)) {
|
|
303
|
+
library.add(fat);
|
|
304
|
+
}
|
|
305
|
+
component = (jsx(FontAwesomeIcon, { icon: ['fat', accessor], className: className }));
|
|
306
|
+
break;
|
|
300
307
|
}
|
|
301
308
|
return component;
|
|
302
309
|
};
|
|
@@ -2694,6 +2701,10 @@ var DateMenuForm = function (props) {
|
|
|
2694
2701
|
}
|
|
2695
2702
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2696
2703
|
}, [state]);
|
|
2704
|
+
// listen to value changes.
|
|
2705
|
+
useEffect(function () {
|
|
2706
|
+
setState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : { startDate: null, endDate: null });
|
|
2707
|
+
}, [defaultValue]);
|
|
2697
2708
|
return (jsxs("div", { className: styles.container, children: [jsxs("div", { className: styles.head, children: [label && (jsx("label", { htmlFor: name, className: styles.label, children: label })), !required && !isRequired && typeof label === 'string' && (jsx("span", { className: styles.hint, children: "Optional" })), required && required({ isRequired: isRequired })] }), jsxs("div", { className: styles.container, "data-cy": inputDataCy, children: [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,
|
|
2698
2709
|
//
|
|
2699
2710
|
value: state,
|