vira 28.12.0 → 28.12.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.
@@ -97,4 +97,4 @@ export declare function applyRequiredLabel(label: string | undefined, isRequired
97
97
  *
98
98
  * @category Internal
99
99
  */
100
- export declare function areFieldsValid(formFields: Readonly<ViraFormFields>): boolean;
100
+ export declare function areFormFieldsValid(formFields: Readonly<ViraFormFields>): boolean;
@@ -45,7 +45,7 @@ export function applyRequiredLabel(label, isRequired) {
45
45
  *
46
46
  * @category Internal
47
47
  */
48
- export function areFieldsValid(formFields) {
48
+ export function areFormFieldsValid(formFields) {
49
49
  return getObjectTypedValues(formFields).every((formField) => {
50
50
  if (formField.isHidden || !formField.isRequired) {
51
51
  return true;
@@ -4,7 +4,7 @@ import { defineViraElement } from '../define-vira-element.js';
4
4
  import { ViraCheckbox } from '../vira-checkbox.element.js';
5
5
  import { ViraInput, ViraInputType } from '../vira-input.element.js';
6
6
  import { ViraSelect } from '../vira-select.element.js';
7
- import { applyRequiredLabel, areFieldsValid, ViraFormFieldType, } from './vira-form-fields.js';
7
+ import { applyRequiredLabel, areFormFieldsValid, ViraFormFieldType, } from './vira-form-fields.js';
8
8
  /**
9
9
  * A form element.
10
10
  *
@@ -40,7 +40,7 @@ export const ViraForm = defineViraElement()({
40
40
  };
41
41
  },
42
42
  render({ inputs, dispatch, events, state, updateState }) {
43
- const currentIsValid = areFieldsValid(inputs.fields);
43
+ const currentIsValid = areFormFieldsValid(inputs.fields);
44
44
  if (currentIsValid !== state.lastIsValid) {
45
45
  updateState({
46
46
  lastIsValid: currentIsValid,
@@ -13,8 +13,8 @@ export type ViraCheckboxInnerElements = 'label' | 'custom-checkbox' | 'text' | t
13
13
  * @category Internal
14
14
  */
15
15
  export type ViraCheckboxInputs = PartialWithUndefined<{
16
- stylePassthrough: Record<ViraCheckboxInnerElements, CSSResult>;
17
- attributePassthrough: Record<ViraCheckboxInnerElements, AttributeValues>;
16
+ stylePassthrough: Partial<Record<ViraCheckboxInnerElements, CSSResult>>;
17
+ attributePassthrough: Partial<Record<ViraCheckboxInnerElements, AttributeValues>>;
18
18
  disabled: boolean;
19
19
  label: string;
20
20
  hasError: boolean;
@@ -136,6 +136,7 @@ export const ViraCheckbox = defineViraElement()({
136
136
  error: !!inputs.hasError,
137
137
  })}"
138
138
  role="checkbox"
139
+ aria-label=${ifDefined(inputs.label || undefined)}
139
140
  aria-checked=${inputs.value ? 'true' : 'false'}
140
141
  aria-disabled=${inputs.disabled ? 'true' : 'false'}
141
142
  tabindex=${inputs.disabled ? '-1' : '0'}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vira",
3
- "version": "28.12.0",
3
+ "version": "28.12.2",
4
4
  "description": "A simple and highly versatile design system using element-vir.",
5
5
  "keywords": [
6
6
  "design",
@@ -38,21 +38,21 @@
38
38
  "test:docs": "virmator docs check"
39
39
  },
40
40
  "dependencies": {
41
- "@augment-vir/assert": "^31.54.3",
42
- "@augment-vir/common": "^31.54.3",
43
- "@augment-vir/web": "^31.54.3",
41
+ "@augment-vir/assert": "^31.54.4",
42
+ "@augment-vir/common": "^31.54.4",
43
+ "@augment-vir/web": "^31.54.4",
44
44
  "colorjs.io": "^0.5.2",
45
- "date-vir": "^8.0.0",
45
+ "date-vir": "^8.1.0",
46
46
  "device-navigation": "^4.5.5",
47
47
  "lit-css-vars": "^3.0.11",
48
- "observavir": "^2.2.0",
48
+ "observavir": "^2.3.0",
49
49
  "page-active": "^1.0.3",
50
- "spa-router-vir": "^6.3.1",
51
- "type-fest": "^5.2.0",
50
+ "spa-router-vir": "^6.4.1",
51
+ "type-fest": "^5.3.1",
52
52
  "typed-event-target": "^4.1.0"
53
53
  },
54
54
  "devDependencies": {
55
- "@augment-vir/test": "^31.54.3",
55
+ "@augment-vir/test": "^31.54.4",
56
56
  "@web/dev-server-esbuild": "^1.0.4",
57
57
  "@web/test-runner": "^0.20.2",
58
58
  "@web/test-runner-commands": "^0.9.0",
@@ -63,7 +63,7 @@
63
63
  "markdown-code-example-inserter": "^3.0.3",
64
64
  "typedoc": "^0.28.15",
65
65
  "typescript": "5.9.3",
66
- "vite": "^7.1.12",
66
+ "vite": "^7.3.0",
67
67
  "vite-tsconfig-paths": "^5.1.4"
68
68
  },
69
69
  "peerDependencies": {