@linzjs/lui 15.1.1 → 15.1.2
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/CHANGELOG.md +7 -0
- package/README.md +9 -5
- package/dist/hooks/useDeprecatedWarning.d.ts +1 -0
- package/dist/index.js +24 -6
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +24 -6
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/lui.esm.js
CHANGED
|
@@ -441,7 +441,16 @@ var LuiTabsPanelSwitch = function (props) {
|
|
|
441
441
|
} }, props.children));
|
|
442
442
|
};
|
|
443
443
|
|
|
444
|
+
function useDeprecatedWarning(componentName) {
|
|
445
|
+
useEffect(function () {
|
|
446
|
+
if (window.location.hostname.includes('localhost')) {
|
|
447
|
+
console.warn(componentName + " will be deprecated in future versions of Lui. Please see the 'Current Deprecations' page in Lui docs.");
|
|
448
|
+
}
|
|
449
|
+
}, []);
|
|
450
|
+
}
|
|
451
|
+
|
|
444
452
|
function LuiFormikForm(props) {
|
|
453
|
+
useDeprecatedWarning('LuiFormikForm');
|
|
445
454
|
// this spreads all keys, except className
|
|
446
455
|
var _a = __assign({}, props); _a.className; var formikProps = __rest(_a, ["className"]);
|
|
447
456
|
var classNames = clsx(props.className);
|
|
@@ -997,6 +1006,7 @@ var LuiRadioInput = function (props) {
|
|
|
997
1006
|
};
|
|
998
1007
|
|
|
999
1008
|
function LuiFormikCheckbox(props) {
|
|
1009
|
+
useDeprecatedWarning('LuiFormikCheckbox');
|
|
1000
1010
|
var ctx = useFormikContext();
|
|
1001
1011
|
return (React__default.createElement(React__default.Fragment, null,
|
|
1002
1012
|
React__default.createElement(Field, { name: props.name }, function (_a) {
|
|
@@ -1011,18 +1021,22 @@ function LuiFormikCheckbox(props) {
|
|
|
1011
1021
|
})));
|
|
1012
1022
|
}
|
|
1013
1023
|
|
|
1014
|
-
var LuiFormikFormLabel = function (props) {
|
|
1015
|
-
|
|
1016
|
-
React__default.createElement("
|
|
1017
|
-
props.
|
|
1018
|
-
|
|
1019
|
-
|
|
1024
|
+
var LuiFormikFormLabel = function (props) {
|
|
1025
|
+
useDeprecatedWarning('LuiFormikFormLabel');
|
|
1026
|
+
return (React__default.createElement("div", { className: clsx('LuiFormLabel-wrapper', props.className && "" + props.className) },
|
|
1027
|
+
props.children,
|
|
1028
|
+
React__default.createElement("label", { className: "LuiFormLabel", htmlFor: props["for"] },
|
|
1029
|
+
props.required && React__default.createElement("span", { className: "lui-required-input-icon" }, "*"),
|
|
1030
|
+
props.label),
|
|
1031
|
+
props.tooltip && React__default.createElement("i", { className: "material-icons-round" }, "help")));
|
|
1032
|
+
};
|
|
1020
1033
|
|
|
1021
1034
|
var LuiFormikTextInput = connect(function (props) {
|
|
1022
1035
|
var error = getIn(props.formik.errors, props.name);
|
|
1023
1036
|
var touch = getIn(props.formik.touched, props.name);
|
|
1024
1037
|
var showError = touch && error;
|
|
1025
1038
|
var setFieldValue = useFormikContext().setFieldValue;
|
|
1039
|
+
useDeprecatedWarning('LuiFormikTextInput');
|
|
1026
1040
|
var multiLineToggle = function (field) {
|
|
1027
1041
|
return !props.multiLine ? (React__default.createElement("input", __assign({ id: props.name, "data-testid": props.name }, field, { type: "text" }, props.inputProps, { onChange: function (event) {
|
|
1028
1042
|
var _a;
|
|
@@ -1058,6 +1072,7 @@ var LuiFormikTextInput = connect(function (props) {
|
|
|
1058
1072
|
|
|
1059
1073
|
var LuiFormikRadioButton = function (props) {
|
|
1060
1074
|
var _a = useField(props), field = _a[0], meta = _a[1];
|
|
1075
|
+
useDeprecatedWarning('LuiFormikRadioButton');
|
|
1061
1076
|
return (React__default.createElement("div", { className: props.className },
|
|
1062
1077
|
meta.touched && meta.error && (React__default.createElement("i", { className: "lui-form-status-icon material-icons-round" }, "error")),
|
|
1063
1078
|
React__default.createElement("div", { className: 'lui-radio-container' },
|
|
@@ -1206,6 +1221,7 @@ var LuiFormikRadioGroup = function (props) {
|
|
|
1206
1221
|
var error = getIn(ctx.errors, props.name);
|
|
1207
1222
|
var touch = getIn(ctx.touched, props.name);
|
|
1208
1223
|
var showError = touch && error;
|
|
1224
|
+
useDeprecatedWarning('LuiFormikRadioGroup');
|
|
1209
1225
|
var describedby = props.hint && camelcase(props === null || props === void 0 ? void 0 : props.hint) + 'Id';
|
|
1210
1226
|
var errorDescribedBy = error && camelcase(error) + 'Id';
|
|
1211
1227
|
return (React__default.createElement("div", { className: clsx('lui-fieldsetBlock-form-group', showError && 'lui-input-error') },
|
|
@@ -1221,10 +1237,12 @@ var LuiFormikRadioGroup = function (props) {
|
|
|
1221
1237
|
};
|
|
1222
1238
|
|
|
1223
1239
|
var LuiFormikFormSubmitButton = connect(function (props) {
|
|
1240
|
+
useDeprecatedWarning('LuiFormikFormSubmitButton');
|
|
1224
1241
|
return (React__default.createElement(LuiButton, { type: "submit", className: props.className, level: "primary", "data-testid": props['data-testid'], disabled: !!props.disabled }, props.children));
|
|
1225
1242
|
});
|
|
1226
1243
|
|
|
1227
1244
|
var LuiFormikSelect = connect(function (props) {
|
|
1245
|
+
useDeprecatedWarning('LuiFormikSelect');
|
|
1228
1246
|
var error = getIn(props.formik.errors, props.name);
|
|
1229
1247
|
var touch = getIn(props.formik.touched, props.name);
|
|
1230
1248
|
var showError = touch && error;
|