@opentinyvue/vue-checkbox 3.21.0 → 3.22.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/lib/index.js CHANGED
@@ -7,9 +7,8 @@ function _extends() {
7
7
  return n;
8
8
  }, _extends.apply(null, arguments);
9
9
  }
10
- import { defineComponent, $prefix, $setup, $props } from "@opentinyvue/vue-common";
10
+ import { defineComponent, $props, $setup, $prefix } from "@opentinyvue/vue-common";
11
11
  import PcTemplate from "./pc.js";
12
- import MobileTemplate from "./mobile.js";
13
12
  import MobileFirstTemplate from "./mobile-first.js";
14
13
  var template = function template2(mode) {
15
14
  var _process$env;
@@ -17,9 +16,6 @@ var template = function template2(mode) {
17
16
  if ("pc" === (tinyMode || mode)) {
18
17
  return PcTemplate;
19
18
  }
20
- if ("mobile" === (tinyMode || mode)) {
21
- return MobileTemplate;
22
- }
23
19
  if ("mobile-first" === (tinyMode || mode)) {
24
20
  return MobileFirstTemplate;
25
21
  }
@@ -103,7 +99,7 @@ var Checkbox = defineComponent({
103
99
  });
104
100
  }
105
101
  });
106
- var version = "3.21.0";
102
+ var version = "3.22.0";
107
103
  Checkbox.model = {
108
104
  prop: "modelValue",
109
105
  event: "update:modelValue"
package/package.json CHANGED
@@ -1,18 +1,17 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-checkbox",
3
- "version": "3.21.0",
3
+ "version": "3.22.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": "~3.21.0",
11
- "@opentinyvue/vue-renderless": "~3.21.0",
12
- "@opentinyvue/vue-directive": "~3.21.0",
13
- "@opentinyvue/vue-icon": "~3.21.0",
14
- "@opentinyvue/vue-theme-mobile": "~3.21.0",
15
- "@opentinyvue/vue-theme": "~3.21.0"
10
+ "@opentinyvue/vue-common": "~3.22.0",
11
+ "@opentinyvue/vue-renderless": "~3.22.0",
12
+ "@opentinyvue/vue-directive": "~3.22.0",
13
+ "@opentinyvue/vue-icon": "~3.22.0",
14
+ "@opentinyvue/vue-theme": "~3.22.0"
16
15
  },
17
16
  "license": "MIT",
18
17
  "types": "index.d.ts",
package/src/index.d.ts CHANGED
@@ -192,6 +192,8 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
192
192
  }>>, {
193
193
  label: string | number | boolean;
194
194
  disabled: boolean;
195
+ checked: boolean;
196
+ indeterminate: boolean;
195
197
  tiny_mode_root: boolean;
196
198
  _constants: Record<string, any>;
197
199
  modelValue: string | number | boolean;
@@ -201,8 +203,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
201
203
  validateEvent: boolean;
202
204
  displayOnly: boolean;
203
205
  shape: string;
204
- checked: boolean;
205
- indeterminate: boolean;
206
206
  controls: string;
207
207
  }, {}>;
208
208
  export default _default;
@@ -2,8 +2,12 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
2
  name?: any;
3
3
  label?: any;
4
4
  disabled?: any;
5
- text?: any;
6
5
  size?: any;
6
+ text?: any;
7
+ id?: any;
8
+ checked?: any;
9
+ indeterminate?: any;
10
+ customClass?: any;
7
11
  tiny_mode?: any;
8
12
  tiny_mode_root?: any;
9
13
  tiny_template?: any;
@@ -13,13 +17,9 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
13
17
  tiny_chart_theme?: any;
14
18
  modelValue?: any;
15
19
  border?: any;
16
- customClass?: any;
17
20
  events?: any;
18
21
  validateEvent?: any;
19
22
  displayOnly?: any;
20
- id?: any;
21
- checked?: any;
22
- indeterminate?: any;
23
23
  trueLabel?: any;
24
24
  falseLabel?: any;
25
25
  controls?: any;
@@ -36,8 +36,12 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
36
36
  name?: any;
37
37
  label?: any;
38
38
  disabled?: any;
39
- text?: any;
40
39
  size?: any;
40
+ text?: any;
41
+ id?: any;
42
+ checked?: any;
43
+ indeterminate?: any;
44
+ customClass?: any;
41
45
  tiny_mode?: any;
42
46
  tiny_mode_root?: any;
43
47
  tiny_template?: any;
@@ -47,13 +51,9 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
47
51
  tiny_chart_theme?: any;
48
52
  modelValue?: any;
49
53
  border?: any;
50
- customClass?: any;
51
54
  events?: any;
52
55
  validateEvent?: any;
53
56
  displayOnly?: any;
54
- id?: any;
55
- checked?: any;
56
- indeterminate?: any;
57
57
  trueLabel?: any;
58
58
  falseLabel?: any;
59
59
  controls?: any;
@@ -65,8 +65,12 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
65
65
  readonly name?: any;
66
66
  readonly label?: any;
67
67
  readonly disabled?: any;
68
- readonly text?: any;
69
68
  readonly size?: any;
69
+ readonly text?: any;
70
+ readonly id?: any;
71
+ readonly checked?: any;
72
+ readonly indeterminate?: any;
73
+ readonly customClass?: any;
70
74
  readonly tiny_mode?: any;
71
75
  readonly tiny_mode_root?: any;
72
76
  readonly tiny_template?: any;
@@ -76,13 +80,9 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
76
80
  readonly tiny_chart_theme?: any;
77
81
  readonly modelValue?: any;
78
82
  readonly border?: any;
79
- readonly customClass?: any;
80
83
  readonly events?: any;
81
84
  readonly validateEvent?: any;
82
85
  readonly displayOnly?: any;
83
- readonly id?: any;
84
- readonly checked?: any;
85
- readonly indeterminate?: any;
86
86
  readonly trueLabel?: any;
87
87
  readonly falseLabel?: any;
88
88
  readonly controls?: any;
package/src/pc.vue.d.ts CHANGED
@@ -3,8 +3,11 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
3
3
  name?: any;
4
4
  label?: any;
5
5
  disabled?: any;
6
- text?: any;
7
6
  size?: any;
7
+ text?: any;
8
+ id?: any;
9
+ checked?: any;
10
+ indeterminate?: any;
8
11
  tiny_mode?: any;
9
12
  tiny_mode_root?: any;
10
13
  tiny_template?: any;
@@ -19,9 +22,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
19
22
  validateEvent?: any;
20
23
  displayOnly?: any;
21
24
  shape?: any;
22
- id?: any;
23
- checked?: any;
24
- indeterminate?: any;
25
25
  trueLabel?: any;
26
26
  falseLabel?: any;
27
27
  controls?: any;
@@ -29,8 +29,11 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
29
29
  name?: any;
30
30
  label?: any;
31
31
  disabled?: any;
32
- text?: any;
33
32
  size?: any;
33
+ text?: any;
34
+ id?: any;
35
+ checked?: any;
36
+ indeterminate?: any;
34
37
  tiny_mode?: any;
35
38
  tiny_mode_root?: any;
36
39
  tiny_template?: any;
@@ -45,9 +48,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
45
48
  validateEvent?: any;
46
49
  displayOnly?: any;
47
50
  shape?: any;
48
- id?: any;
49
- checked?: any;
50
- indeterminate?: any;
51
51
  trueLabel?: any;
52
52
  falseLabel?: any;
53
53
  controls?: any;
@@ -59,8 +59,11 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
59
59
  readonly name?: any;
60
60
  readonly label?: any;
61
61
  readonly disabled?: any;
62
- readonly text?: any;
63
62
  readonly size?: any;
63
+ readonly text?: any;
64
+ readonly id?: any;
65
+ readonly checked?: any;
66
+ readonly indeterminate?: any;
64
67
  readonly tiny_mode?: any;
65
68
  readonly tiny_mode_root?: any;
66
69
  readonly tiny_template?: any;
@@ -75,9 +78,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
75
78
  readonly validateEvent?: any;
76
79
  readonly displayOnly?: any;
77
80
  readonly shape?: any;
78
- readonly id?: any;
79
- readonly checked?: any;
80
- readonly indeterminate?: any;
81
81
  readonly trueLabel?: any;
82
82
  readonly falseLabel?: any;
83
83
  readonly controls?: any;
package/lib/mobile.js DELETED
@@ -1,134 +0,0 @@
1
- import { renderless, api } from '@opentinyvue/vue-renderless/checkbox/vue';
2
- import { defineComponent, props, setup } from '@opentinyvue/vue-common';
3
- import '@opentinyvue/vue-theme-mobile/checkbox/index.css';
4
- import { openBlock, createElementBlock, normalizeClass, createElementVNode, withDirectives, withModifiers, vModelCheckbox, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
5
-
6
- function _createForOfIteratorHelperLoose(r, e) {
7
- var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
8
- if (t) return (t = t.call(r)).next.bind(t);
9
- if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
10
- t && (r = t);
11
- var o = 0;
12
- return function() {
13
- return o >= r.length ? { done: true } : { done: false, value: r[o++] };
14
- };
15
- }
16
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
17
- }
18
- function _unsupportedIterableToArray(r, a) {
19
- if (r) {
20
- if ("string" == typeof r) return _arrayLikeToArray(r, a);
21
- var t = {}.toString.call(r).slice(8, -1);
22
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
23
- }
24
- }
25
- function _arrayLikeToArray(r, a) {
26
- (null == a || a > r.length) && (a = r.length);
27
- for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
28
- return n;
29
- }
30
- var _export_sfc = function _export_sfc2(sfc, props) {
31
- var target = sfc.__vccOpts || sfc;
32
- for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
33
- var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
34
- target[key] = val;
35
- }
36
- return target;
37
- };
38
-
39
- var _sfc_main = defineComponent({
40
- props: [].concat(props, ["modelValue", "text", "events", "label", "indeterminate", "disabled", "checked", "name", "trueLabel", "falseLabel", "id", "iconPosition"]),
41
- emits: ["update:modelValue", "change", "complete", "click"],
42
- setup: function setup$1(props2, context) {
43
- return setup({
44
- props: props2,
45
- context,
46
- renderless,
47
- api
48
- });
49
- }
50
- });
51
- var _hoisted_1 = ["id"];
52
- var _hoisted_2 = ["tabindex", "role", "aria-checked"];
53
- var _hoisted_3 = /* @__PURE__ */ createElementVNode(
54
- "span",
55
- {
56
- class: "tiny-mobile-checkbox__inner"
57
- },
58
- null,
59
- -1
60
- /* HOISTED */
61
- );
62
- var _hoisted_4 = ["aria-hidden", "name", "disabled", "true-value", "false-value"];
63
- var _hoisted_5 = ["aria-hidden", "disabled", "value", "name"];
64
- var _hoisted_6 = {
65
- key: 0,
66
- class: "tiny-mobile-checkbox__label"
67
- };
68
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
69
- return openBlock(), createElementBlock("label", {
70
- class: normalizeClass(["tiny-mobile-checkbox", {
71
- "is-disabled": _ctx.state.isDisabled,
72
- "is-checked": _ctx.state.isChecked,
73
- "is-indeterminate": _ctx.indeterminate,
74
- "is-focus": _ctx.state.focus,
75
- "icon-position-top": _ctx.state.iconPosition === "top"
76
- }]),
77
- id: _ctx.id
78
- }, [createElementVNode("span", {
79
- class: "tiny-mobile-checkbox__input",
80
- tabindex: _ctx.indeterminate ? 0 : false,
81
- role: _ctx.indeterminate ? "checkbox" : false,
82
- "aria-checked": _ctx.indeterminate ? "mixed" : false
83
- }, [_hoisted_3, _ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
84
- key: 0,
85
- class: "tiny-mobile-checkbox__original",
86
- type: "checkbox",
87
- "aria-hidden": _ctx.indeterminate ? "true" : "false",
88
- name: _ctx.name,
89
- disabled: _ctx.state.isDisabled,
90
- "true-value": _ctx.trueLabel,
91
- "false-value": _ctx.falseLabel,
92
- "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
93
- return _ctx.state.model = $event;
94
- }),
95
- onChange: _cache[1] || (_cache[1] = withModifiers(function() {
96
- return _ctx.handleChange && _ctx.handleChange.apply(_ctx, arguments);
97
- }, ["stop"])),
98
- onFocus: _cache[2] || (_cache[2] = function($event) {
99
- return _ctx.state.focus = true;
100
- }),
101
- onBlur: _cache[3] || (_cache[3] = function($event) {
102
- return _ctx.state.focus = false;
103
- })
104
- }, null, 40, _hoisted_4)), [[vModelCheckbox, _ctx.state.model]]) : withDirectives((openBlock(), createElementBlock("input", {
105
- key: 1,
106
- class: "tiny-mobile-checkbox__original",
107
- type: "checkbox",
108
- "aria-hidden": _ctx.indeterminate ? "true" : "false",
109
- disabled: _ctx.state.isDisabled,
110
- value: _ctx.label,
111
- name: _ctx.name,
112
- "onUpdate:modelValue": _cache[4] || (_cache[4] = function($event) {
113
- return _ctx.state.model = $event;
114
- }),
115
- onChange: _cache[5] || (_cache[5] = withModifiers(function() {
116
- return _ctx.handleChange && _ctx.handleChange.apply(_ctx, arguments);
117
- }, ["stop"])),
118
- onFocus: _cache[6] || (_cache[6] = function($event) {
119
- return _ctx.state.focus = true;
120
- }),
121
- onBlur: _cache[7] || (_cache[7] = function($event) {
122
- return _ctx.state.focus = false;
123
- })
124
- }, null, 40, _hoisted_5)), [[vModelCheckbox, _ctx.state.model]])], 8, _hoisted_2), _ctx.slots.default && _ctx.slots.default() || _ctx.state.isShowText ? (openBlock(), createElementBlock("span", _hoisted_6, [renderSlot(_ctx.$slots, "default", {}, function() {
125
- return [createTextVNode(
126
- toDisplayString(_ctx.state.showText),
127
- 1
128
- /* TEXT */
129
- )];
130
- })])) : createCommentVNode("v-if", true)], 10, _hoisted_1);
131
- }
132
- var mobile = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
133
-
134
- export { mobile as default };
@@ -1,76 +0,0 @@
1
- declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
- name?: any;
3
- label?: any;
4
- disabled?: any;
5
- text?: any;
6
- tiny_mode?: any;
7
- tiny_mode_root?: any;
8
- tiny_template?: any;
9
- tiny_renderless?: any;
10
- _constants?: any;
11
- tiny_theme?: any;
12
- tiny_chart_theme?: any;
13
- modelValue?: any;
14
- events?: any;
15
- id?: any;
16
- checked?: any;
17
- indeterminate?: any;
18
- trueLabel?: any;
19
- falseLabel?: any;
20
- iconPosition?: any;
21
- }>, {
22
- t: (this: any, path: any, options?: any) => any;
23
- vm: any;
24
- f: (props: any, attrs?: {}) => {};
25
- a: (attrs: any, filters: any, include: any) => {};
26
- d: (props: any) => void;
27
- dp: (props: any) => void;
28
- gcls: (key: any) => any;
29
- m: (...cssClasses: any[]) => string;
30
- }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("change" | "click" | "update:modelValue" | "complete")[], "change" | "click" | "update:modelValue" | "complete", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
31
- name?: any;
32
- label?: any;
33
- disabled?: any;
34
- text?: any;
35
- tiny_mode?: any;
36
- tiny_mode_root?: any;
37
- tiny_template?: any;
38
- tiny_renderless?: any;
39
- _constants?: any;
40
- tiny_theme?: any;
41
- tiny_chart_theme?: any;
42
- modelValue?: any;
43
- events?: any;
44
- id?: any;
45
- checked?: any;
46
- indeterminate?: any;
47
- trueLabel?: any;
48
- falseLabel?: any;
49
- iconPosition?: any;
50
- }>>> & {
51
- onChange?: ((...args: any[]) => any) | undefined;
52
- onClick?: ((...args: any[]) => any) | undefined;
53
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
54
- onComplete?: ((...args: any[]) => any) | undefined;
55
- }, {
56
- readonly name?: any;
57
- readonly label?: any;
58
- readonly disabled?: any;
59
- readonly text?: any;
60
- readonly tiny_mode?: any;
61
- readonly tiny_mode_root?: any;
62
- readonly tiny_template?: any;
63
- readonly tiny_renderless?: any;
64
- readonly _constants?: any;
65
- readonly tiny_theme?: any;
66
- readonly tiny_chart_theme?: any;
67
- readonly modelValue?: any;
68
- readonly events?: any;
69
- readonly id?: any;
70
- readonly checked?: any;
71
- readonly indeterminate?: any;
72
- readonly trueLabel?: any;
73
- readonly falseLabel?: any;
74
- readonly iconPosition?: any;
75
- }, {}>;
76
- export default _default;