@ballistix.digital/react-components 1.0.3 → 2.0.0
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.esm.js +114 -86
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +113 -85
- package/dist/index.js.map +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -1196,6 +1196,79 @@ var useExcel = function () {
|
|
|
1196
1196
|
};
|
|
1197
1197
|
};
|
|
1198
1198
|
|
|
1199
|
+
var SelectMenuForm = function (props) {
|
|
1200
|
+
var _a;
|
|
1201
|
+
var _b = props.name, name = _b === void 0 ? 'select-menu-form' : _b, label = props.label, description = props.description, placeholder = props.placeholder, options = props.options, required = props.required, value = props.value, error = props.error, _c = props.isRequired, isRequired = _c === void 0 ? false : _c, isLoading = props.isLoading, _d = props.isTouched, isTouched = _d === void 0 ? false : _d, isDisabled = props.isDisabled, _e = props.isClearable, isClearable = _e === void 0 ? true : _e, _f = props.isMultiple, isMultiple = _f === void 0 ? false : _f, _g = props.isSearchable, isSearchable = _g === void 0 ? true : _g, _h = props.isSolo, isSolo = _h === void 0 ? false : _h, onChange = props.onChange, onSearchInputChange = props.onSearchInputChange, onClear = props.onClear, onBlur = props.onBlur, stylesOverrides = props.styles;
|
|
1202
|
+
var _j = React.useState(true), isFocus = _j[0], setIsFocus = _j[1];
|
|
1203
|
+
var _k = React.useState(value !== null && value !== void 0 ? value : null), state = _k[0], setState = _k[1];
|
|
1204
|
+
var isValid = error === undefined;
|
|
1205
|
+
var selectDataCy = "form-select-".concat(name);
|
|
1206
|
+
var errorDataCy = "form-select-error-".concat(name);
|
|
1207
|
+
var handleGenerateStyle = function () {
|
|
1208
|
+
var result = deepCopyObject(styles$i.base);
|
|
1209
|
+
var keys = calculateNestedKeys(styles$i.base);
|
|
1210
|
+
keys.forEach(function (key) {
|
|
1211
|
+
lodash.set(result, key, toClassName(lodash.get(styles$i.base, key), lodash.get(styles$i['normal'], key), isTouched === true && !isValid && lodash.get(styles$i.invalid, key), isDisabled && lodash.get(styles$i.disabled, key), lodash.get(stylesOverrides, key)));
|
|
1212
|
+
});
|
|
1213
|
+
return result;
|
|
1214
|
+
};
|
|
1215
|
+
var handleChange = function (selectValue) {
|
|
1216
|
+
setState(selectValue);
|
|
1217
|
+
onChange && onChange(selectValue);
|
|
1218
|
+
setIsFocus(false);
|
|
1219
|
+
};
|
|
1220
|
+
var styles = handleGenerateStyle();
|
|
1221
|
+
// Simulate onClear event.
|
|
1222
|
+
React.useEffect(function () {
|
|
1223
|
+
if (state === null && !isFocus) {
|
|
1224
|
+
onClear && onClear(name);
|
|
1225
|
+
}
|
|
1226
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1227
|
+
}, [state]);
|
|
1228
|
+
// Simulate onBlur event.
|
|
1229
|
+
React.useEffect(function () {
|
|
1230
|
+
if (!isFocus) {
|
|
1231
|
+
onBlur && onBlur();
|
|
1232
|
+
}
|
|
1233
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1234
|
+
}, [isFocus]);
|
|
1235
|
+
// listen to value changes.
|
|
1236
|
+
React.useEffect(function () {
|
|
1237
|
+
setState(value);
|
|
1238
|
+
}, [value]);
|
|
1239
|
+
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, children: [jsxRuntime.jsx("div", { "data-cy": selectDataCy, children: jsxRuntime.jsx(Select, { primaryColor: "primary",
|
|
1240
|
+
//
|
|
1241
|
+
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.select, noOptionsMessage: (jsxRuntime.jsx("p", { className: styles.emptyState, children: (_a = placeholder === null || placeholder === void 0 ? void 0 : placeholder.emptyState) !== null && _a !== void 0 ? _a : 'No results found' })), searchInputPlaceholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.searchInput,
|
|
1242
|
+
//
|
|
1243
|
+
loading: isLoading, isDisabled: isDisabled, isClearable: isClearable, isMultiple: isMultiple, isSearchable: isSearchable,
|
|
1244
|
+
//
|
|
1245
|
+
options: options,
|
|
1246
|
+
//
|
|
1247
|
+
value: state, onChange: handleChange, onSearchInputChange: onSearchInputChange,
|
|
1248
|
+
//
|
|
1249
|
+
classNames: {
|
|
1250
|
+
menuButton: function () {
|
|
1251
|
+
return toClassName(styles.input, state === null && '[&>*]:!text-gray-300 ', state === null &&
|
|
1252
|
+
!isValid &&
|
|
1253
|
+
isTouched &&
|
|
1254
|
+
'[&>*]:!text-red-300');
|
|
1255
|
+
},
|
|
1256
|
+
menu: styles.menu,
|
|
1257
|
+
tagItem: function () { return styles.tagItem; },
|
|
1258
|
+
tagItemText: styles.tagItemText,
|
|
1259
|
+
tagItemIconContainer: styles.tagItemIconContainer,
|
|
1260
|
+
tagItemIcon: styles.tagItemIcon,
|
|
1261
|
+
list: styles.list,
|
|
1262
|
+
listItem: function () { return styles.listItem; },
|
|
1263
|
+
listDisabledItem: styles.listDisabledItem,
|
|
1264
|
+
listGroupLabel: styles.listGroupLabel,
|
|
1265
|
+
searchContainer: styles.searchContainer,
|
|
1266
|
+
searchBox: styles.searchBox,
|
|
1267
|
+
searchIcon: styles.searchIcon,
|
|
1268
|
+
closeIcon: styles.closeIcon,
|
|
1269
|
+
} }) }), !isSolo && (jsxRuntime.jsxs("div", { className: styles.foot, children: [description && !(error && isTouched) && (jsxRuntime.jsx("p", { className: styles.description, children: description })), error && isTouched && (jsxRuntime.jsx("p", { className: styles.error, "data-cy": errorDataCy, children: JSON.stringify(error).replaceAll('"', '') }))] }))] })] }));
|
|
1270
|
+
};
|
|
1271
|
+
|
|
1199
1272
|
var base$f = {
|
|
1200
1273
|
container: '',
|
|
1201
1274
|
head: 'flex justify-between',
|
|
@@ -1287,79 +1360,6 @@ var styles$i = {
|
|
|
1287
1360
|
disabled: disabled$6,
|
|
1288
1361
|
};
|
|
1289
1362
|
|
|
1290
|
-
var SelectMenuForm = function (props) {
|
|
1291
|
-
var _a;
|
|
1292
|
-
var _b = props.name, name = _b === void 0 ? 'select-menu-form' : _b, label = props.label, description = props.description, placeholder = props.placeholder, options = props.options, required = props.required, value = props.value, error = props.error, _c = props.isRequired, isRequired = _c === void 0 ? false : _c, isLoading = props.isLoading, _d = props.isTouched, isTouched = _d === void 0 ? false : _d, isDisabled = props.isDisabled, _e = props.isClearable, isClearable = _e === void 0 ? true : _e, _f = props.isMultiple, isMultiple = _f === void 0 ? false : _f, _g = props.isSearchable, isSearchable = _g === void 0 ? true : _g, _h = props.isSolo, isSolo = _h === void 0 ? false : _h, onChange = props.onChange, onSearchInputChange = props.onSearchInputChange, onClear = props.onClear, onBlur = props.onBlur, stylesOverrides = props.styles;
|
|
1293
|
-
var _j = React.useState(true), isFocus = _j[0], setIsFocus = _j[1];
|
|
1294
|
-
var _k = React.useState(value !== null && value !== void 0 ? value : null), state = _k[0], setState = _k[1];
|
|
1295
|
-
var isValid = error === undefined;
|
|
1296
|
-
var selectDataCy = "form-select-".concat(name);
|
|
1297
|
-
var errorDataCy = "form-select-error-".concat(name);
|
|
1298
|
-
var handleGenerateStyle = function () {
|
|
1299
|
-
var result = deepCopyObject(styles$i.base);
|
|
1300
|
-
var keys = calculateNestedKeys(styles$i.base);
|
|
1301
|
-
keys.forEach(function (key) {
|
|
1302
|
-
lodash.set(result, key, toClassName(lodash.get(styles$i.base, key), lodash.get(styles$i['normal'], key), isTouched === true && !isValid && lodash.get(styles$i.invalid, key), isDisabled && lodash.get(styles$i.disabled, key), lodash.get(stylesOverrides, key)));
|
|
1303
|
-
});
|
|
1304
|
-
return result;
|
|
1305
|
-
};
|
|
1306
|
-
var handleChange = function (selectValue) {
|
|
1307
|
-
setState(selectValue);
|
|
1308
|
-
onChange && onChange(selectValue);
|
|
1309
|
-
setIsFocus(false);
|
|
1310
|
-
};
|
|
1311
|
-
var styles = handleGenerateStyle();
|
|
1312
|
-
// Simulate onClear event.
|
|
1313
|
-
React.useEffect(function () {
|
|
1314
|
-
if (state === null && !isFocus) {
|
|
1315
|
-
onClear && onClear(name);
|
|
1316
|
-
}
|
|
1317
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1318
|
-
}, [state]);
|
|
1319
|
-
// Simulate onBlur event.
|
|
1320
|
-
React.useEffect(function () {
|
|
1321
|
-
if (!isFocus) {
|
|
1322
|
-
onBlur && onBlur();
|
|
1323
|
-
}
|
|
1324
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1325
|
-
}, [isFocus]);
|
|
1326
|
-
// listen to value changes.
|
|
1327
|
-
React.useEffect(function () {
|
|
1328
|
-
setState(value);
|
|
1329
|
-
}, [value]);
|
|
1330
|
-
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, children: [jsxRuntime.jsx("div", { "data-cy": selectDataCy, children: jsxRuntime.jsx(Select, { primaryColor: "primary",
|
|
1331
|
-
//
|
|
1332
|
-
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.select, noOptionsMessage: (jsxRuntime.jsx("p", { className: styles.emptyState, children: (_a = placeholder === null || placeholder === void 0 ? void 0 : placeholder.emptyState) !== null && _a !== void 0 ? _a : 'No results found' })), searchInputPlaceholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.searchInput,
|
|
1333
|
-
//
|
|
1334
|
-
loading: isLoading, isDisabled: isDisabled, isClearable: isClearable, isMultiple: isMultiple, isSearchable: isSearchable,
|
|
1335
|
-
//
|
|
1336
|
-
options: options,
|
|
1337
|
-
//
|
|
1338
|
-
value: state, onChange: handleChange, onSearchInputChange: onSearchInputChange,
|
|
1339
|
-
//
|
|
1340
|
-
classNames: {
|
|
1341
|
-
menuButton: function () {
|
|
1342
|
-
return toClassName(styles.input, state === null && '[&>*]:!text-gray-300 ', state === null &&
|
|
1343
|
-
!isValid &&
|
|
1344
|
-
isTouched &&
|
|
1345
|
-
'[&>*]:!text-red-300');
|
|
1346
|
-
},
|
|
1347
|
-
menu: styles.menu,
|
|
1348
|
-
tagItem: function () { return styles.tagItem; },
|
|
1349
|
-
tagItemText: styles.tagItemText,
|
|
1350
|
-
tagItemIconContainer: styles.tagItemIconContainer,
|
|
1351
|
-
tagItemIcon: styles.tagItemIcon,
|
|
1352
|
-
list: styles.list,
|
|
1353
|
-
listItem: function () { return styles.listItem; },
|
|
1354
|
-
listDisabledItem: styles.listDisabledItem,
|
|
1355
|
-
listGroupLabel: styles.listGroupLabel,
|
|
1356
|
-
searchContainer: styles.searchContainer,
|
|
1357
|
-
searchBox: styles.searchBox,
|
|
1358
|
-
searchIcon: styles.searchIcon,
|
|
1359
|
-
closeIcon: styles.closeIcon,
|
|
1360
|
-
} }) }), !isSolo && (jsxRuntime.jsxs("div", { className: styles.foot, children: [description && !(error && isTouched) && (jsxRuntime.jsx("p", { className: styles.description, children: description })), error && isTouched && (jsxRuntime.jsx("p", { className: styles.error, "data-cy": errorDataCy, children: JSON.stringify(error).replaceAll('"', '') }))] }))] })] }));
|
|
1361
|
-
};
|
|
1362
|
-
|
|
1363
1363
|
var PanelPaginationNavigation = function (props) {
|
|
1364
1364
|
var defaultValue = props.current, _a = props.min, min = _a === void 0 ? 1 : _a, _b = props.max, max = _b === void 0 ? 20 : _b, stylesOverrides = props.styles, pageSizeOptions = props.pageSizeOptions, defaultPageSize = props.defaultPageSize, _c = props.onChangePageSize, onChangePageSize = _c === void 0 ? lodash.noop : _c, children = props.children, onChange = props.onChange;
|
|
1365
1365
|
var _d = React.useState(1), current = _d[0], setCurrent = _d[1];
|
|
@@ -1756,11 +1756,11 @@ var isValidState = function (state) {
|
|
|
1756
1756
|
};
|
|
1757
1757
|
|
|
1758
1758
|
var TableList2 = function (props) {
|
|
1759
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1759
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1760
1760
|
var id = props.id, config = props.table, head = props.head, foot = props.foot, isLoading = props.isLoading, onRowClick = props.onRowClick, onChange = props.onChange, stylesOverrides = props.styles;
|
|
1761
|
-
var
|
|
1762
|
-
var
|
|
1763
|
-
var
|
|
1761
|
+
var _j = React.useState((_b = (_a = config.options) === null || _a === void 0 ? void 0 : _a.defaultSorting) !== null && _b !== void 0 ? _b : []), sorting = _j[0], setSorting = _j[1];
|
|
1762
|
+
var _k = React.useState({}), columnVisibility = _k[0], setColumnVisibility = _k[1];
|
|
1763
|
+
var _l = React.useState([]), columnOrder = _l[0], setColumnOrder = _l[1];
|
|
1764
1764
|
var handleGenerateStyle = function () {
|
|
1765
1765
|
var result = deepCopyObject(styles$f.base);
|
|
1766
1766
|
var keys = calculateNestedKeys(styles$f.base);
|
|
@@ -1775,6 +1775,32 @@ var TableList2 = function (props) {
|
|
|
1775
1775
|
return result;
|
|
1776
1776
|
};
|
|
1777
1777
|
var styles = handleGenerateStyle();
|
|
1778
|
+
var initialVisibilityState = React.useMemo(function () {
|
|
1779
|
+
var _a;
|
|
1780
|
+
var columnAccessorKeys = lodash.compact(lodash.map(config.columns, 'accessorKey'));
|
|
1781
|
+
var columnIds = lodash.compact(lodash.map(config.columns, 'id'));
|
|
1782
|
+
var visibilityState = {};
|
|
1783
|
+
if ((_a = config.options) === null || _a === void 0 ? void 0 : _a.defaultVisibility) {
|
|
1784
|
+
lodash.forEach(columnAccessorKeys, function (key) {
|
|
1785
|
+
var _a;
|
|
1786
|
+
var _b;
|
|
1787
|
+
visibilityState = lodash.assign(visibilityState, (_a = {},
|
|
1788
|
+
_a[key] = lodash.includes((_b = config.options) === null || _b === void 0 ? void 0 : _b.defaultVisibility, key),
|
|
1789
|
+
_a));
|
|
1790
|
+
});
|
|
1791
|
+
}
|
|
1792
|
+
else {
|
|
1793
|
+
lodash.forEach(columnAccessorKeys, function (key) {
|
|
1794
|
+
var _a;
|
|
1795
|
+
visibilityState = lodash.assign(visibilityState, (_a = {}, _a[key] = true, _a));
|
|
1796
|
+
});
|
|
1797
|
+
}
|
|
1798
|
+
lodash.forEach(columnIds, function (key) {
|
|
1799
|
+
var _a;
|
|
1800
|
+
visibilityState = lodash.assign(visibilityState, (_a = {}, _a[key] = true, _a));
|
|
1801
|
+
});
|
|
1802
|
+
return visibilityState;
|
|
1803
|
+
}, [config.columns, (_c = config.options) === null || _c === void 0 ? void 0 : _c.defaultVisibility]);
|
|
1778
1804
|
var table = reactTable.useReactTable({
|
|
1779
1805
|
getCoreRowModel: reactTable.getCoreRowModel(),
|
|
1780
1806
|
columns: config.columns,
|
|
@@ -1784,6 +1810,10 @@ var TableList2 = function (props) {
|
|
|
1784
1810
|
columnVisibility: columnVisibility,
|
|
1785
1811
|
columnOrder: columnOrder,
|
|
1786
1812
|
},
|
|
1813
|
+
initialState: {
|
|
1814
|
+
columnVisibility: initialVisibilityState,
|
|
1815
|
+
columnOrder: (_d = config.options) === null || _d === void 0 ? void 0 : _d.defaultOrder,
|
|
1816
|
+
},
|
|
1787
1817
|
manualPagination: true,
|
|
1788
1818
|
manualSorting: true,
|
|
1789
1819
|
onSortingChange: setSorting,
|
|
@@ -1832,7 +1862,7 @@ var TableList2 = function (props) {
|
|
|
1832
1862
|
}
|
|
1833
1863
|
setColumnVisibility(visibility_1);
|
|
1834
1864
|
}
|
|
1835
|
-
}, [(
|
|
1865
|
+
}, [(_e = config === null || config === void 0 ? void 0 : config.options) === null || _e === void 0 ? void 0 : _e.defaultVisibility, id, table]);
|
|
1836
1866
|
React.useEffect(function () {
|
|
1837
1867
|
var _a, _b, _c;
|
|
1838
1868
|
var savedOrder = (_a = getTableState(id)) === null || _a === void 0 ? void 0 : _a.columnOrder;
|
|
@@ -1845,7 +1875,7 @@ var TableList2 = function (props) {
|
|
|
1845
1875
|
else if (lodash.some(config.columns, function (column) { return (column === null || column === void 0 ? void 0 : column.id) || lodash.get(column, 'accessorKey'); })) {
|
|
1846
1876
|
setColumnOrder(lodash.map(config.columns, function (column) { var _a; return ((_a = column === null || column === void 0 ? void 0 : column.id) !== null && _a !== void 0 ? _a : lodash.get(column, 'accessorKey')); }));
|
|
1847
1877
|
}
|
|
1848
|
-
}, [config.columns, (
|
|
1878
|
+
}, [config.columns, (_f = config === null || config === void 0 ? void 0 : config.options) === null || _f === void 0 ? void 0 : _f.defaultOrder, id]);
|
|
1849
1879
|
// Write state to local storage when it changes
|
|
1850
1880
|
React.useEffect(function () {
|
|
1851
1881
|
if (state) {
|
|
@@ -1886,7 +1916,7 @@ var TableList2 = function (props) {
|
|
|
1886
1916
|
((_c = (_b = table === null || table === void 0 ? void 0 : table.getState()) === null || _b === void 0 ? void 0 : _b.pagination) === null || _c === void 0 ? void 0 : _c.pageSize) - 1 &&
|
|
1887
1917
|
'border-b border-gray-200'), children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id));
|
|
1888
1918
|
}) }, row.id));
|
|
1889
|
-
}) }))] }), lodash.isEmpty(table === null || table === void 0 ? void 0 : table.getRowModel().rows) && !isLoading && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: ((
|
|
1919
|
+
}) }))] }), lodash.isEmpty(table === null || table === void 0 ? void 0 : table.getRowModel().rows) && !isLoading && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: ((_g = config === null || config === void 0 ? void 0 : config.options) === null || _g === void 0 ? void 0 : _g.emptyComponent) ? ((_h = config === null || config === void 0 ? void 0 : config.options) === null || _h === void 0 ? void 0 : _h.emptyComponent) : (jsxRuntime.jsx("div", { className: "w-full flex justify-center my-2", children: "There is no data to show..." })) })), isLoading && (jsxRuntime.jsx("div", { className: "flex flex-col gap-y-2 w-full pt-5", children: new Array(8).fill(undefined).map(function (index) { return (jsxRuntime.jsxs("div", { className: "flex gap-2", children: [jsxRuntime.jsx("div", { className: "w-20 h-12 rounded-md bg-gray-100 animate-pulse" }), jsxRuntime.jsx("div", { className: "w-full h-12 rounded-md bg-gray-100 animate-pulse" })] }, index)); }) }))] }) }) }) }), jsxRuntime.jsx("div", { className: styles.foot, children: foot && foot(state) })] }));
|
|
1890
1920
|
};
|
|
1891
1921
|
|
|
1892
1922
|
var base$c = {
|
|
@@ -2632,7 +2662,7 @@ var TableColumnOptionsCustom = function (props) {
|
|
|
2632
2662
|
var styles = handleGenerateStyle();
|
|
2633
2663
|
return (jsxRuntime.jsxs(react.Popover, { children: [jsxRuntime.jsx(react.Popover.Button, { children: trigger }), jsxRuntime.jsxs(react.Popover.Panel, { className: styles.controls.content, children: [resetConfig && (jsxRuntime.jsxs("div", { className: styles.controls.dropdown.reset, onClick: function () {
|
|
2634
2664
|
removeTableState(resetConfig.tableId);
|
|
2635
|
-
table.resetColumnVisibility(
|
|
2665
|
+
table.resetColumnVisibility();
|
|
2636
2666
|
table.resetColumnOrder();
|
|
2637
2667
|
resetConfig.onReset && resetConfig.onReset();
|
|
2638
2668
|
}, children: [jsxRuntime.jsx(IconElement, { accessor: "rotate-left" }), jsxRuntime.jsx("p", { children: (_a = resetConfig.label) !== null && _a !== void 0 ? _a : 'Reset' })] })), table
|
|
@@ -2893,9 +2923,7 @@ var CheckboxInputForm = function (props) {
|
|
|
2893
2923
|
var result = deepCopyObject(styles$4.base);
|
|
2894
2924
|
var keys = calculateNestedKeys(styles$4.base);
|
|
2895
2925
|
keys.forEach(function (key) {
|
|
2896
|
-
lodash.set(result, key, toClassName(lodash.get(styles$4.base, key),
|
|
2897
|
-
// isTouched === true && !isValid && get(defaultStyles.invalid, key),
|
|
2898
|
-
isDisabled && lodash.get(styles$4.disabled, key), lodash.get(stylesOverrides, key)));
|
|
2926
|
+
lodash.set(result, key, toClassName(lodash.get(styles$4.base, key), isDisabled && lodash.get(styles$4.disabled, key), lodash.get(stylesOverrides, key)));
|
|
2899
2927
|
});
|
|
2900
2928
|
return result;
|
|
2901
2929
|
};
|
|
@@ -2924,7 +2952,7 @@ var CheckboxInputForm = function (props) {
|
|
|
2924
2952
|
inputRef.current.indeterminate = value === null;
|
|
2925
2953
|
}
|
|
2926
2954
|
}, [isIndeterminable, value]);
|
|
2927
|
-
return (jsxRuntime.jsxs("div", { className: styles.container, children: [jsxRuntime.jsx("div", { className: styles.head, children: jsxRuntime.jsx("input", { ref: inputRef, name: name, "data-cy": "form-".concat(name, "-checkbox"), "aria-describedby": "".concat(name, "-description"), type: "checkbox", checked: !!value, className: styles.input, disabled: isDisabled, onChange: handleToggle }) }), jsxRuntime.jsxs("div", { className: styles.body, children: [jsxRuntime.jsx("label", { htmlFor:
|
|
2955
|
+
return (jsxRuntime.jsxs("div", { className: styles.container, children: [jsxRuntime.jsx("div", { className: styles.head, children: jsxRuntime.jsx("input", { ref: inputRef, name: name, "data-cy": "form-".concat(name, "-checkbox"), "aria-describedby": "".concat(name, "-description"), type: "checkbox", checked: !!value, className: styles.input, disabled: isDisabled, onChange: handleToggle }) }), jsxRuntime.jsxs("div", { className: styles.body, children: [jsxRuntime.jsx("label", { htmlFor: name, className: styles.label, children: title }), description && (jsxRuntime.jsx("p", { id: "".concat(name, "-description"), className: styles.description, children: description }))] })] }));
|
|
2928
2956
|
};
|
|
2929
2957
|
|
|
2930
2958
|
var base$3 = {
|