saasufy-components 3.33.0 → 3.35.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/README.md CHANGED
@@ -509,6 +509,7 @@ Used for displaying and editing a single field of a model instance in real time.
509
509
  - `accept`: This attribute should only be used if the `type` is set to `file`; it serves to constrain the types of files which can be selected by the user.
510
510
  - `input-id`: Can be used to set an `id` attribute on the inner `input` element.
511
511
  - `input-props`: Can be used to set additional attributes on the inner `input` element. Must be in the format `attr1=value1,attr2=value2`.
512
+ - `ignore-invalid-selection`: Can be used with a `model-input` component of type `select` to prevent the `error` class from being added if the selected value is not among the available options.
512
513
 
513
514
  ### model-text
514
515
 
package/model-input.js CHANGED
@@ -42,7 +42,8 @@ class ModelInput extends SocketConsumer {
42
42
  'autocapitalize',
43
43
  'autocorrect',
44
44
  'input-id',
45
- 'input-props'
45
+ 'input-props',
46
+ 'ignore-invalid-selection'
46
47
  ];
47
48
  }
48
49
 
@@ -266,7 +267,12 @@ class ModelInput extends SocketConsumer {
266
267
  }
267
268
 
268
269
  verifyValue(fieldValue, optionList, inputElement, messageContainerElement) {
269
- if (optionList && fieldValue != null && !optionList.includes(fieldValue)) {
270
+ if (
271
+ optionList &&
272
+ fieldValue != null &&
273
+ !optionList.includes(fieldValue) &&
274
+ !this.hasAttribute('ignore-invalid-selection')
275
+ ) {
270
276
  inputElement.classList.add('error');
271
277
  inputElement.classList.remove('success');
272
278
  if (messageContainerElement) {
package/overlay-modal.js CHANGED
@@ -61,18 +61,18 @@ class OverlayModal extends HTMLElement {
61
61
  cursor: pointer;
62
62
  }
63
63
  </style>
64
- <div class="overlay-background">
65
- <div class="modal-dialog">
66
- <div class="modal-title-bar">
64
+ <div class="overlay-background" part="overlay-background">
65
+ <div class="modal-dialog" part="dialog">
66
+ <div class="modal-title-bar" part="title-bar">
67
67
  <div>
68
68
  <slot name="title"></slot>
69
69
  </div>
70
70
  <div class="close-button">&#x2715;</div>
71
71
  </div>
72
- <div class="modal-content">
72
+ <div class="modal-content" part="content">
73
73
  <slot name="content"></slot>
74
74
  </div>
75
- <div class="modal-footer">
75
+ <div class="modal-footer" part="footer">
76
76
  <slot name="footer"></slot>
77
77
  </div>
78
78
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saasufy-components",
3
- "version": "3.33.0",
3
+ "version": "3.35.0",
4
4
  "description": "Components for Saasufy.",
5
5
  "main": "index.js",
6
6
  "scripts": {