@opentinyvue/vue-checkbox 2.26.0 → 2.28.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.
@@ -61,7 +61,11 @@ var render = function render2() {
61
61
  attrs: {
62
62
  "data-tag": "tiny-checkbox",
63
63
  "id": _vm.id,
64
- "tabindex": "-1"
64
+ "tabindex": "-1",
65
+ "role": "checkbox",
66
+ "aria-checked": _vm.indeterminate ? "mixed" : _vm.state.isChecked,
67
+ "aria-disabled": _vm.state.isDisabled || _vm.state.isDisplayOnly,
68
+ "aria-label": _vm.text || _vm.label
65
69
  }
66
70
  }, "label", _vm.a(_vm.$attrs, ["class", "style", "onClick"], true), false), [_c("span", {
67
71
  class: ["relative w-7 h-7 mr-2 sm:mr-0 sm:p-0", _vm.state.size === "medium" ? "sm:w-6 sm:h-6" : "sm:h-4 sm:w-4", _vm.state.isDisplayOnly || _vm.state.isGroupDisplayOnly ? "hidden" : ""],
@@ -74,7 +78,7 @@ var render = function render2() {
74
78
  "tabindex": "1"
75
79
  }
76
80
  }, [_c("icon-check", {
77
- class: _vm.m("w-5 h-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-0", _vm.state.size === "medium" ? "sm:w-6 sm:h-6" : "sm:w-4 sm:h-4", _vm.state.isDisabled ? "[&_path:nth-of-type(2)]:fill-color-icon-disabled [&_path:nth-of-type(1)]:fill-color-bg-3 cursor-not-allowed" : "[&_path:nth-of-type(1)]:fill-color-icon-inverse [&_path:nth-of-type(2)]:fill-color-none-hover"),
81
+ class: _vm.m("w-5 h-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-0", _vm.state.size === "medium" ? "sm:w-6 sm:h-6" : "sm:w-4 sm:h-4", _vm.state.isDisabled ? "[&_path:nth-of-type(2)]:fill-color-icon-disabled [&_path:nth-of-type(1)]:fill-color-bg-3 cursor-not-allowed" : "[&_path:nth-of-type(2)]:fill-color-none-hover"),
78
82
  attrs: {
79
83
  "data-tag": "icon-check"
80
84
  }
package/lib/pc.js CHANGED
@@ -76,7 +76,11 @@ var render = function render2() {
76
76
  }],
77
77
  attrs: {
78
78
  "id": _vm.id,
79
- "tabindex": "-1"
79
+ "tabindex": "-1",
80
+ "role": "checkbox",
81
+ "aria-checked": _vm.indeterminate ? "mixed" : _vm.state.isChecked,
82
+ "aria-disabled": _vm.state.isDisabled || _vm.state.isDisplayOnly,
83
+ "aria-label": _vm.text || _vm.label
80
84
  }
81
85
  }, "label", _vm.a(_vm.$attrs, ["class", "style", "onClick"], true), false), [_c("span", {
82
86
  staticClass: "tiny-checkbox__input",
@@ -85,10 +89,6 @@ var render = function render2() {
85
89
  "is-checked": _vm.state.isChecked,
86
90
  "is-indeterminate": _vm.indeterminate,
87
91
  "is-focus": _vm.state.focus
88
- },
89
- attrs: {
90
- "role": _vm.indeterminate ? "checkbox" : void 0,
91
- "aria-checked": _vm.indeterminate ? "mixed" : false
92
92
  }
93
93
  }, [_vm.trueLabel || _vm.falseLabel ? _c("input", {
94
94
  directives: [{
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-checkbox",
3
- "version": "2.26.0",
3
+ "version": "2.28.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "@opentinyvue/vue-common": "~2.26.0",
11
- "@opentinyvue/vue-renderless": "~3.26.0",
12
- "@opentinyvue/vue-directive": "~2.26.0",
13
- "@opentinyvue/vue-icon": "~2.26.0",
14
- "@opentinyvue/vue-theme": "~3.26.0"
10
+ "@opentinyvue/vue-common": "~2.28.0",
11
+ "@opentinyvue/vue-renderless": "~3.28.0",
12
+ "@opentinyvue/vue-directive": "~2.28.0",
13
+ "@opentinyvue/vue-icon": "~2.28.0",
14
+ "@opentinyvue/vue-theme": "~3.28.0"
15
15
  },
16
16
  "license": "MIT",
17
17
  "types": "index.d.ts",