fancy-ui-ts 1.3.1 → 1.3.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.css CHANGED
@@ -278,4 +278,7 @@
278
278
  --fc-select-placeholder: var(--fc-gray-500);
279
279
  --fc-select-placeholder-disabled: var(--fc-gray-700);
280
280
  --fc-select-focus-ring: var(--fc-focus-ring-sm) var(--fc-focus-ring-secondary);
281
+ --fc-select-bg-error: var(--fc-danger-900);
282
+ --fc-select-border-error: var(--fc-danger-700);
283
+ --fc-select-focus-ring-error: var(--fc-focus-ring-danger-secondary);
281
284
  }
package/dist/index.d.ts CHANGED
@@ -219,7 +219,8 @@ declare class FcSelect extends HTMLElement {
219
219
  }[]);
220
220
  get required(): boolean;
221
221
  set required(val: boolean);
222
- get readonly(): boolean;
222
+ get validator(): ((value: string) => string | null) | null;
223
+ set validator(func: ((value: string) => string | null) | null);
223
224
  connectedCallback(): void;
224
225
  attributeChangedCallback(name: string, _old: string, newVal: string): void;
225
226
  disconnectedCallback(): void;
package/dist/index.js CHANGED
@@ -1468,8 +1468,12 @@ var FcSelect = class extends HTMLElement {
1468
1468
  }
1469
1469
  this.removeAttribute("required");
1470
1470
  }
1471
- get readonly() {
1472
- return this.hasAttribute("readonly");
1471
+ get validator() {
1472
+ return this._validatorFunction;
1473
+ }
1474
+ set validator(func) {
1475
+ this._validatorFunction = func;
1476
+ this.syncValidity();
1473
1477
  }
1474
1478
  connectedCallback() {
1475
1479
  this.internals.setFormValue(this.value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fancy-ui-ts",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "type": "module",
5
5
  "description": "A library to easily create cool and customizable webcomponents.",
6
6
  "main": "dist/index.js",