@opengeoweb/form-fields 4.3.0 → 4.4.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.
Files changed (3) hide show
  1. package/index.esm.js +29 -26
  2. package/index.umd.js +29 -26
  3. package/package.json +2 -2
package/index.esm.js CHANGED
@@ -281,6 +281,27 @@ var containsNoCommas = function containsNoCommas(val) {
281
281
  return true;
282
282
  };
283
283
 
284
+ var radioCheckboxStyle = {
285
+ // hides unchecked values
286
+ display: 'none',
287
+ '&+.MuiFormControlLabel-label': {
288
+ display: 'none'
289
+ },
290
+ // shows checked value
291
+ '&.Mui-checked': {
292
+ display: 'inherit',
293
+ '&+.MuiFormControlLabel-label': {
294
+ display: 'inherit'
295
+ }
296
+ },
297
+ '&.Mui-checked+.MuiFormControlLabel-label': {
298
+ color: 'geowebColors.typographyAndIcons.text'
299
+ },
300
+ '&.Mui-disabled.Mui-checked': {
301
+ color: 'geowebColors.typographyAndIcons.iconLinkActive'
302
+ }
303
+ };
304
+
284
305
  var ReactHookFormFormControl = function ReactHookFormFormControl(_a) {
285
306
  var children = _a.children,
286
307
  errors = _a.errors,
@@ -296,40 +317,22 @@ var ReactHookFormFormControl = function ReactHookFormFormControl(_a) {
296
317
  error: !!errors,
297
318
  className: "".concat(isReadOnly ? 'is-read-only' : '', " ").concat(className),
298
319
  sx: Object.assign(Object.assign({}, isReadOnly && {
299
- // RadioGroup styling
300
- ' .MuiRadio-root': {
301
- color: 'geowebColors.typographyAndIcons.iconLinkActive',
302
- // hides unchecked values
303
- display: 'none',
304
- '&+.MuiFormControlLabel-label': {
305
- display: 'none'
306
- },
307
- // shows checked value
308
- '&.Mui-checked': {
309
- display: 'inherit',
310
- '&+.MuiFormControlLabel-label': {
311
- display: 'inherit'
312
- }
313
- }
314
- },
315
- ' .MuiFormControlLabel-label.Mui-disabled': {
316
- color: 'geowebColors.typographyAndIcons.text'
317
- },
318
- ' .Mui-disabled.Mui-checked': {
319
- color: 'geowebColors.typographyAndIcons.iconLinkActive'
320
- },
321
- // Select styling
322
- ' .MuiSelect-select': {
320
+ // Radio input
321
+ '.MuiRadio-root': radioCheckboxStyle,
322
+ // Checkbox input
323
+ '.MuiCheckbox-root': radioCheckboxStyle,
324
+ // Select input
325
+ '.MuiSelect-select.Mui-disabled': {
323
326
  color: 'geowebColors.typographyAndIcons.text',
324
327
  WebkitTextFillColor: 'inherit',
325
328
  '&:before': {
326
329
  borderColor: 'transparent'
327
330
  }
328
331
  },
329
- ' .MuiSelect-nativeInput+.MuiSvgIcon-root': {
332
+ '.MuiSelect-nativeInput+.MuiSvgIcon-root': {
330
333
  display: 'none'
331
334
  },
332
- ' .Mui-disabled:before': {
335
+ '.Mui-disabled:before': {
333
336
  border: 'transparent'
334
337
  }
335
338
  }), sx)
package/index.umd.js CHANGED
@@ -346,6 +346,27 @@
346
346
  return true;
347
347
  };
348
348
 
349
+ var radioCheckboxStyle = {
350
+ // hides unchecked values
351
+ display: 'none',
352
+ '&+.MuiFormControlLabel-label': {
353
+ display: 'none'
354
+ },
355
+ // shows checked value
356
+ '&.Mui-checked': {
357
+ display: 'inherit',
358
+ '&+.MuiFormControlLabel-label': {
359
+ display: 'inherit'
360
+ }
361
+ },
362
+ '&.Mui-checked+.MuiFormControlLabel-label': {
363
+ color: 'geowebColors.typographyAndIcons.text'
364
+ },
365
+ '&.Mui-disabled.Mui-checked': {
366
+ color: 'geowebColors.typographyAndIcons.iconLinkActive'
367
+ }
368
+ };
369
+
349
370
  var ReactHookFormFormControl = function ReactHookFormFormControl(_a) {
350
371
  var children = _a.children,
351
372
  errors = _a.errors,
@@ -361,40 +382,22 @@
361
382
  error: !!errors,
362
383
  className: (isReadOnly ? 'is-read-only' : '') + " " + className,
363
384
  sx: __assign(__assign({}, isReadOnly && {
364
- // RadioGroup styling
365
- ' .MuiRadio-root': {
366
- color: 'geowebColors.typographyAndIcons.iconLinkActive',
367
- // hides unchecked values
368
- display: 'none',
369
- '&+.MuiFormControlLabel-label': {
370
- display: 'none'
371
- },
372
- // shows checked value
373
- '&.Mui-checked': {
374
- display: 'inherit',
375
- '&+.MuiFormControlLabel-label': {
376
- display: 'inherit'
377
- }
378
- }
379
- },
380
- ' .MuiFormControlLabel-label.Mui-disabled': {
381
- color: 'geowebColors.typographyAndIcons.text'
382
- },
383
- ' .Mui-disabled.Mui-checked': {
384
- color: 'geowebColors.typographyAndIcons.iconLinkActive'
385
- },
386
- // Select styling
387
- ' .MuiSelect-select': {
385
+ // Radio input
386
+ '.MuiRadio-root': radioCheckboxStyle,
387
+ // Checkbox input
388
+ '.MuiCheckbox-root': radioCheckboxStyle,
389
+ // Select input
390
+ '.MuiSelect-select.Mui-disabled': {
388
391
  color: 'geowebColors.typographyAndIcons.text',
389
392
  WebkitTextFillColor: 'inherit',
390
393
  '&:before': {
391
394
  borderColor: 'transparent'
392
395
  }
393
396
  },
394
- ' .MuiSelect-nativeInput+.MuiSvgIcon-root': {
397
+ '.MuiSelect-nativeInput+.MuiSvgIcon-root': {
395
398
  display: 'none'
396
399
  },
397
- ' .Mui-disabled:before': {
400
+ '.Mui-disabled:before': {
398
401
  border: 'transparent'
399
402
  }
400
403
  }), sx)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/form-fields",
3
- "version": "4.3.0",
3
+ "version": "4.4.0",
4
4
  "description": "GeoWeb form-fields library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -15,7 +15,7 @@
15
15
  "react-hook-form": "^6.12.1",
16
16
  "react": "^17.0.2",
17
17
  "@mui/material": "^5.10.8",
18
- "@opengeoweb/theme": "4.3.0",
18
+ "@opengeoweb/theme": "4.4.0",
19
19
  "moment": "^2.29.0",
20
20
  "moment-timezone": "^0.5.31",
21
21
  "@mui/x-date-pickers": "^5.0.4",