@opentinyvue/vue-checkbox 2.22.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
@@ -99,7 +99,7 @@ var Checkbox = defineComponent({
99
99
  });
100
100
  }
101
101
  });
102
- var version = "2.22.0";
102
+ var version = "3.22.0";
103
103
  Checkbox.model = {
104
104
  prop: "modelValue",
105
105
  event: "update:modelValue"
@@ -1,38 +1,42 @@
1
1
  import { renderless, api } from '@opentinyvue/vue-renderless/checkbox/vue';
2
2
  import { defineComponent, props, setup } from '@opentinyvue/vue-common';
3
3
  import { iconHalfselect, iconCheckedSur, iconCheck } from '@opentinyvue/vue-icon';
4
+ import { resolveComponent, openBlock, createElementBlock, mergeProps, createElementVNode, normalizeClass, createVNode, withDirectives, withModifiers, vModelCheckbox, renderSlot, createTextVNode, toDisplayString, Fragment, createCommentVNode } from 'vue';
4
5
 
5
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
6
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
7
- if (render) {
8
- options.render = render;
9
- options.staticRenderFns = staticRenderFns;
10
- options._compiled = true;
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
+ };
11
15
  }
12
- var hook;
13
- if (injectStyles) {
14
- hook = injectStyles;
15
- }
16
- if (hook) {
17
- if (options.functional) {
18
- options._injectStyles = hook;
19
- var originalRender = options.render;
20
- options.render = function renderWithStyleInjection(h, context) {
21
- hook.call(context);
22
- return originalRender(h, context);
23
- };
24
- } else {
25
- var existing = options.beforeCreate;
26
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
27
- }
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;
28
23
  }
29
- return {
30
- exports: scriptExports,
31
- options
32
- };
33
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
+ };
34
38
 
35
- var __vue2_script = defineComponent({
39
+ var _sfc_main = defineComponent({
36
40
  inheritAttrs: false,
37
41
  emits: ["update:modelValue", "change", "complete"],
38
42
  props: [].concat(props, ["modelValue", "text", "events", "label", "indeterminate", "disabled", "checked", "name", "trueLabel", "falseLabel", "id", "controls", "size", "border", "validateEvent", "customClass", "displayOnly"]),
@@ -50,154 +54,118 @@ var __vue2_script = defineComponent({
50
54
  });
51
55
  }
52
56
  });
53
- var render = function render2() {
54
- var _vm = this;
55
- var _h = _vm.$createElement;
56
- var _c = _vm._self._c || _h;
57
- return _c("label", _vm._b({
58
- class: _vm.m("inline-flex sm:items-center text-sm leading-5 cursor-pointer", _vm.state.size !== "mini" ? "sm:text-sm" : "sm:text-xs", {
59
- "sm:py-2": _vm.state.vertical
60
- }, _vm.state.isDisplayOnly || _vm.state.isGroupDisplayOnly ? _vm.state.isChecked ? "cursor-default after:content-[';'] after:inline-block last:after:content-['']" : "hidden" : "", _vm.state.showLabel ? "inline-flex" : "", _vm.customClass),
61
- attrs: {
62
- "data-tag": "tiny-checkbox",
63
- "id": _vm.id,
64
- "tabindex": "-1"
65
- }
66
- }, "label", _vm.a(_vm.$attrs, ["class", "style", "onClick"], true), false), [_c("span", {
67
- 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" : ""],
68
- attrs: {
69
- "role": _vm.indeterminate ? "checkbox" : false,
70
- "aria-checked": _vm.indeterminate ? "mixed" : false
71
- }
72
- }, [_c("span", {
73
- attrs: {
74
- "tabindex": "1"
75
- }
76
- }, [_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"),
78
- attrs: {
79
- "data-tag": "icon-check"
80
- }
81
- }), _c("icon-halfselect", {
82
- class: _vm.m("w-5 h-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 transition-all [&_path:nth-of-type(2)]:fill-color-icon-inverse", _vm.indeterminate ? "opacity-100 scale-100 z-10" : "opacity-0 scale-0 z-0", _vm.state.isDisabled ? "[&_path:nth-of-type(1)]:fill-color-brand-disabled cursor-not-allowed" : "[&_path:nth-of-type(1)]:fill-color-brand [&_path:nth-of-type(1)]:shadow-xsm", _vm.state.size === "medium" ? "sm:w-6 sm:h-6" : "sm:w-4 sm:h-4"),
83
- attrs: {
84
- "data-tag": "icon-halfselect"
85
- }
86
- }), _c("icon-checked-sur", {
87
- class: _vm.m("w-5 h-5", _vm.state.size === "medium" ? "sm:w-6 sm:h-6" : "sm:w-4 sm:h-4", "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 transition-all [&_path:nth-of-type(2)]:fill-color-icon-inverse", _vm.state.isChecked && !_vm.indeterminate ? "opacity-100 scale-100 z-10" : "opacity-0 scale-0 z-0", _vm.state.isDisabled ? "[&_path:nth-of-type(1)]:fill-color-brand-disabled cursor-not-allowed" : "[&_path:nth-of-type(1)]:fill-color-brand [&_path:nth-of-type(2)]:shadow-xsm"),
88
- attrs: {
89
- "data-tag": "icon-checked-sur"
90
- }
91
- })], 1), _vm.trueLabel || _vm.falseLabel ? _c("input", {
92
- directives: [{
93
- name: "model",
94
- rawName: "v-model",
95
- value: _vm.state.model,
96
- expression: "state.model"
97
- }],
98
- staticClass: "absolute left-0 right-0 top-0 bottom-0 w-0 h-0 -z-10 opacity-0",
99
- attrs: {
100
- "type": "checkbox",
101
- "aria-hidden": _vm.indeterminate ? "true" : "false",
102
- "name": _vm.name,
103
- "disabled": _vm.state.inputDisabled,
104
- "true-value": _vm.trueLabel,
105
- "false-value": _vm.falseLabel
106
- },
107
- domProps: {
108
- "checked": Array.isArray(_vm.state.model) ? _vm._i(_vm.state.model, null) > -1 : _vm._q(_vm.state.model, _vm.trueLabel)
109
- },
110
- on: {
111
- "change": [function($event) {
112
- var $$a = _vm.state.model, $$el = $event.target, $$c = $$el.checked ? _vm.trueLabel : _vm.falseLabel;
113
- if (Array.isArray($$a)) {
114
- var $$v = null, $$i = _vm._i($$a, $$v);
115
- if ($$el.checked) {
116
- $$i < 0 && _vm.$set(_vm.state, "model", $$a.concat([$$v]));
117
- } else {
118
- $$i > -1 && _vm.$set(_vm.state, "model", $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
119
- }
120
- } else {
121
- _vm.$set(_vm.state, "model", $$c);
122
- }
123
- }, function($event) {
124
- $event.stopPropagation();
125
- return _vm.handleChange.apply(null, arguments);
126
- }],
127
- "focus": function focus($event) {
128
- _vm.state.focus = true;
129
- },
130
- "blur": function blur($event) {
131
- _vm.state.focus = false;
132
- },
133
- "click": function click($event) {
134
- $event.stopPropagation();
135
- }
136
- }
137
- }) : _c("input", {
138
- directives: [{
139
- name: "model",
140
- rawName: "v-model",
141
- value: _vm.state.model,
142
- expression: "state.model"
143
- }],
144
- staticClass: "absolute left-0 right-0 top-0 bottom-0 w-0 h-0 -z-10 opacity-0",
145
- attrs: {
146
- "type": "checkbox",
147
- "aria-hidden": _vm.indeterminate ? "true" : "false",
148
- "disabled": _vm.state.inputDisabled,
149
- "name": _vm.name
57
+ var _hoisted_1 = ["id"];
58
+ var _hoisted_2 = ["role", "aria-checked"];
59
+ var _hoisted_3 = {
60
+ tabindex: "1"
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: "text-color-text-primary cursor-default"
67
+ };
68
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
69
+ var _component_icon_check = resolveComponent("icon-check");
70
+ var _component_icon_halfselect = resolveComponent("icon-halfselect");
71
+ var _component_icon_checked_sur = resolveComponent("icon-checked-sur");
72
+ return openBlock(), createElementBlock("label", mergeProps({
73
+ "data-tag": "tiny-checkbox",
74
+ class: _ctx.m("inline-flex sm:items-center text-sm leading-5 cursor-pointer", _ctx.state.size !== "mini" ? "sm:text-sm" : "sm:text-xs", {
75
+ "sm:py-2": _ctx.state.vertical
76
+ }, _ctx.state.isDisplayOnly || _ctx.state.isGroupDisplayOnly ? _ctx.state.isChecked ? "cursor-default after:content-[';'] after:inline-block last:after:content-['']" : "hidden" : "", _ctx.state.showLabel ? "inline-flex" : "", _ctx.customClass),
77
+ id: _ctx.id,
78
+ tabindex: "-1"
79
+ }, _ctx.a(_ctx.$attrs, ["class", "style", "onClick"], true)), [createElementVNode("span", {
80
+ class: normalizeClass(["relative w-7 h-7 mr-2 sm:mr-0 sm:p-0", _ctx.state.size === "medium" ? "sm:w-6 sm:h-6" : "sm:h-4 sm:w-4", _ctx.state.isDisplayOnly || _ctx.state.isGroupDisplayOnly ? "hidden" : ""]),
81
+ role: _ctx.indeterminate ? "checkbox" : false,
82
+ "aria-checked": _ctx.indeterminate ? "mixed" : false
83
+ }, [createElementVNode("span", _hoisted_3, [createVNode(_component_icon_check, {
84
+ "data-tag": "icon-check",
85
+ class: normalizeClass(_ctx.m("w-5 h-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-0", _ctx.state.size === "medium" ? "sm:w-6 sm:h-6" : "sm:w-4 sm:h-4", _ctx.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"))
86
+ }, null, 8, ["class"]), createVNode(_component_icon_halfselect, {
87
+ "data-tag": "icon-halfselect",
88
+ class: normalizeClass(_ctx.m("w-5 h-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 transition-all [&_path:nth-of-type(2)]:fill-color-icon-inverse", _ctx.indeterminate ? "opacity-100 scale-100 z-10" : "opacity-0 scale-0 z-0", _ctx.state.isDisabled ? "[&_path:nth-of-type(1)]:fill-color-brand-disabled cursor-not-allowed" : "[&_path:nth-of-type(1)]:fill-color-brand [&_path:nth-of-type(1)]:shadow-xsm", _ctx.state.size === "medium" ? "sm:w-6 sm:h-6" : "sm:w-4 sm:h-4"))
89
+ }, null, 8, ["class"]), createVNode(_component_icon_checked_sur, {
90
+ "data-tag": "icon-checked-sur",
91
+ class: normalizeClass(_ctx.m("w-5 h-5", _ctx.state.size === "medium" ? "sm:w-6 sm:h-6" : "sm:w-4 sm:h-4", "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 transition-all [&_path:nth-of-type(2)]:fill-color-icon-inverse", _ctx.state.isChecked && !_ctx.indeterminate ? "opacity-100 scale-100 z-10" : "opacity-0 scale-0 z-0", _ctx.state.isDisabled ? "[&_path:nth-of-type(1)]:fill-color-brand-disabled cursor-not-allowed" : "[&_path:nth-of-type(1)]:fill-color-brand [&_path:nth-of-type(2)]:shadow-xsm"))
92
+ }, null, 8, ["class"])]), _ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
93
+ key: 0,
94
+ class: "absolute left-0 right-0 top-0 bottom-0 w-0 h-0 -z-10 opacity-0",
95
+ type: "checkbox",
96
+ "aria-hidden": _ctx.indeterminate ? "true" : "false",
97
+ name: _ctx.name,
98
+ disabled: _ctx.state.inputDisabled,
99
+ "true-value": _ctx.trueLabel,
100
+ "false-value": _ctx.falseLabel,
101
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
102
+ return _ctx.state.model = $event;
103
+ }),
104
+ onChange: _cache[1] || (_cache[1] = withModifiers(function() {
105
+ return _ctx.handleChange && _ctx.handleChange.apply(_ctx, arguments);
106
+ }, ["stop"])),
107
+ onFocus: _cache[2] || (_cache[2] = function($event) {
108
+ return _ctx.state.focus = true;
109
+ }),
110
+ onBlur: _cache[3] || (_cache[3] = function($event) {
111
+ return _ctx.state.focus = false;
112
+ }),
113
+ onClick: _cache[4] || (_cache[4] = withModifiers(function() {
114
+ }, ["stop"]))
115
+ }, null, 40, _hoisted_4)), [[vModelCheckbox, _ctx.state.model]]) : withDirectives((openBlock(), createElementBlock("input", {
116
+ key: 1,
117
+ class: "absolute left-0 right-0 top-0 bottom-0 w-0 h-0 -z-10 opacity-0",
118
+ type: "checkbox",
119
+ "aria-hidden": _ctx.indeterminate ? "true" : "false",
120
+ disabled: _ctx.state.inputDisabled,
121
+ value: _ctx.label,
122
+ name: _ctx.name,
123
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = function($event) {
124
+ return _ctx.state.model = $event;
125
+ }),
126
+ onChange: _cache[6] || (_cache[6] = withModifiers(function() {
127
+ return _ctx.handleChange && _ctx.handleChange.apply(_ctx, arguments);
128
+ }, ["stop"])),
129
+ onFocus: _cache[7] || (_cache[7] = function($event) {
130
+ return _ctx.state.focus = true;
131
+ }),
132
+ onBlur: _cache[8] || (_cache[8] = function($event) {
133
+ return _ctx.state.focus = false;
134
+ }),
135
+ onClick: _cache[9] || (_cache[9] = withModifiers(function() {
136
+ }, ["stop"]))
137
+ }, null, 40, _hoisted_5)), [[vModelCheckbox, _ctx.state.model]])], 10, _hoisted_2), _ctx.slots.default && _ctx.slots.default() || _ctx.text || _ctx.label ? (openBlock(), createElementBlock(
138
+ "span",
139
+ {
140
+ key: 0,
141
+ ref: "label",
142
+ class: normalizeClass(_ctx.m("py-0 pl-0 sm:pl-2 mr-5 flex-1 leading-7 sm:leading-none", _ctx.state.isDisabled ? "cursor-not-allowed text-color-text-secondary" : "text-color-text-primary", _ctx.state.isDisplayOnly || _ctx.state.isGroupDisplayOnly ? "p-0 sm:p-0 m-0 text-color-text-primary cursor-default" : ""))
150
143
  },
151
- domProps: {
152
- "value": _vm.label,
153
- "checked": Array.isArray(_vm.state.model) ? _vm._i(_vm.state.model, _vm.label) > -1 : _vm.state.model
144
+ [renderSlot(_ctx.$slots, "default", {}, function() {
145
+ return [createTextVNode(
146
+ toDisplayString(_ctx.text || _ctx.label),
147
+ 1
148
+ /* TEXT */
149
+ )];
150
+ })],
151
+ 2
152
+ /* CLASS */
153
+ )) : (openBlock(), createElementBlock(
154
+ Fragment,
155
+ {
156
+ key: 1
154
157
  },
155
- on: {
156
- "change": [function($event) {
157
- var $$a = _vm.state.model, $$el = $event.target, $$c = $$el.checked ? true : false;
158
- if (Array.isArray($$a)) {
159
- var $$v = _vm.label, $$i = _vm._i($$a, $$v);
160
- if ($$el.checked) {
161
- $$i < 0 && _vm.$set(_vm.state, "model", $$a.concat([$$v]));
162
- } else {
163
- $$i > -1 && _vm.$set(_vm.state, "model", $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
164
- }
165
- } else {
166
- _vm.$set(_vm.state, "model", $$c);
167
- }
168
- }, function($event) {
169
- $event.stopPropagation();
170
- return _vm.handleChange.apply(null, arguments);
171
- }],
172
- "focus": function focus($event) {
173
- _vm.state.focus = true;
174
- },
175
- "blur": function blur($event) {
176
- _vm.state.focus = false;
177
- },
178
- "click": function click($event) {
179
- $event.stopPropagation();
180
- }
181
- }
182
- })]), _vm.slots.default && _vm.slots.default() || _vm.text || _vm.label ? _c("span", {
183
- ref: "label",
184
- class: _vm.m("py-0 pl-0 sm:pl-2 mr-5 flex-1 leading-7 sm:leading-none", _vm.state.isDisabled ? "cursor-not-allowed text-color-text-secondary" : "text-color-text-primary", _vm.state.isDisplayOnly || _vm.state.isGroupDisplayOnly ? "p-0 sm:p-0 m-0 text-color-text-primary cursor-default" : "")
185
- }, [_vm._t("default", function() {
186
- return [_vm._v(_vm._s(_vm.text || _vm.label))];
187
- })], 2) : [_vm.state.isDisplayOnly ? _c("span", {
188
- staticClass: "text-color-text-primary cursor-default"
189
- }, [_vm._v(" " + _vm._s(_vm.state.displayLabel))]) : _vm._e()]], 2);
190
- };
191
- var staticRenderFns = [];
192
- var __cssModules = {};
193
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
194
- function __vue2_injectStyles(context) {
195
- for (var o in __cssModules) {
196
- this[o] = __cssModules[o];
197
- }
158
+ [_ctx.state.isDisplayOnly ? (openBlock(), createElementBlock(
159
+ "span",
160
+ _hoisted_6,
161
+ toDisplayString(_ctx.state.displayLabel),
162
+ 1
163
+ /* TEXT */
164
+ )) : createCommentVNode("v-if", true)],
165
+ 64
166
+ /* STABLE_FRAGMENT */
167
+ ))], 16, _hoisted_1);
198
168
  }
199
- var mobileFirst = /* @__PURE__ */ function() {
200
- return __component__.exports;
201
- }();
169
+ var mobileFirst = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
202
170
 
203
171
  export { mobileFirst as default };
package/lib/pc.js CHANGED
@@ -3,38 +3,42 @@ import { defineComponent, props, setup } from '@opentinyvue/vue-common';
3
3
  import '@opentinyvue/vue-theme/checkbox/index.css';
4
4
  import { iconHalfselect, iconCheckedSur, iconCheck } from '@opentinyvue/vue-icon';
5
5
  import { AutoTip } from '@opentinyvue/vue-directive';
6
+ import { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, createElementVNode, normalizeClass, withDirectives, withModifiers, vModelCheckbox, createBlock, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
6
7
 
7
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
8
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
9
- if (render) {
10
- options.render = render;
11
- options.staticRenderFns = staticRenderFns;
12
- options._compiled = true;
8
+ function _createForOfIteratorHelperLoose(r, e) {
9
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
10
+ if (t) return (t = t.call(r)).next.bind(t);
11
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
12
+ t && (r = t);
13
+ var o = 0;
14
+ return function() {
15
+ return o >= r.length ? { done: true } : { done: false, value: r[o++] };
16
+ };
13
17
  }
14
- var hook;
15
- if (injectStyles) {
16
- hook = injectStyles;
17
- }
18
- if (hook) {
19
- if (options.functional) {
20
- options._injectStyles = hook;
21
- var originalRender = options.render;
22
- options.render = function renderWithStyleInjection(h, context) {
23
- hook.call(context);
24
- return originalRender(h, context);
25
- };
26
- } else {
27
- var existing = options.beforeCreate;
28
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
29
- }
18
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
19
+ }
20
+ function _unsupportedIterableToArray(r, a) {
21
+ if (r) {
22
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
23
+ var t = {}.toString.call(r).slice(8, -1);
24
+ 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;
30
25
  }
31
- return {
32
- exports: scriptExports,
33
- options
34
- };
35
26
  }
27
+ function _arrayLikeToArray(r, a) {
28
+ (null == a || a > r.length) && (a = r.length);
29
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
30
+ return n;
31
+ }
32
+ var _export_sfc = function _export_sfc2(sfc, props) {
33
+ var target = sfc.__vccOpts || sfc;
34
+ for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
35
+ var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
36
+ target[key] = val;
37
+ }
38
+ return target;
39
+ };
36
40
 
37
- var __vue2_script = defineComponent({
41
+ var _sfc_main = defineComponent({
38
42
  // tiny 新增。 renderless中,没有emit('click')的地方。 此处勿声明,否则会造成丢失click事件。
39
43
  emits: ["update:modelValue", "change", "complete"],
40
44
  directives: {
@@ -55,162 +59,111 @@ var __vue2_script = defineComponent({
55
59
  });
56
60
  }
57
61
  });
58
- var render = function render2() {
59
- var _vm = this;
60
- var _h = _vm.$createElement;
61
- var _c = _vm._self._c || _h;
62
- return _c("label", _vm._b({
63
- staticClass: "tiny-checkbox",
64
- class: [_vm.border && _vm.state.checkboxSize ? "tiny-checkbox--" + _vm.state.checkboxSize : "", {
65
- "is-disabled": _vm.state.isDisabled || _vm.state.isDisplayOnly
62
+ var _hoisted_1 = ["id"];
63
+ var _hoisted_2 = ["role", "aria-checked"];
64
+ var _hoisted_3 = ["tabindex", "aria-hidden", "name", "disabled", "true-value", "false-value"];
65
+ var _hoisted_4 = ["tabindex", "aria-hidden", "disabled", "value", "name"];
66
+ var _hoisted_5 = {
67
+ class: "tiny-checkbox__inner"
68
+ };
69
+ var _hoisted_6 = {
70
+ key: 0,
71
+ class: "tiny-checkbox__label tiny-checkbox-display-only"
72
+ };
73
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
74
+ var _component_icon_halfselect = resolveComponent("icon-halfselect");
75
+ var _component_icon_checked_sur = resolveComponent("icon-checked-sur");
76
+ var _component_icon_check = resolveComponent("icon-check");
77
+ var _directive_auto_tip = resolveDirective("auto-tip");
78
+ return openBlock(), createElementBlock("label", mergeProps({
79
+ class: ["tiny-checkbox", [_ctx.border && _ctx.state.checkboxSize ? "tiny-checkbox--" + _ctx.state.checkboxSize : "", {
80
+ "is-disabled": _ctx.state.isDisabled || _ctx.state.isDisplayOnly
66
81
  }, {
67
- "is-bordered": _vm.border
82
+ "is-bordered": _ctx.border
68
83
  }, {
69
- "is-checked": _vm.state.isChecked
84
+ "is-checked": _ctx.state.isChecked
70
85
  }, {
71
- "is-group-display-only": _vm.state.isGroupDisplayOnly
86
+ "is-group-display-only": _ctx.state.isGroupDisplayOnly
72
87
  }, {
73
- "is-display-only": _vm.state.isDisplayOnly
88
+ "is-display-only": _ctx.state.isDisplayOnly
74
89
  }, {
75
- "is-filter": _vm.state.shape === "filter"
76
- }],
77
- attrs: {
78
- "id": _vm.id,
79
- "tabindex": "-1"
80
- }
81
- }, "label", _vm.a(_vm.$attrs, ["class", "style", "onClick"], true), false), [_c("span", {
82
- staticClass: "tiny-checkbox__input",
83
- class: {
84
- "is-disabled": _vm.state.isDisabled || _vm.state.isDisplayOnly,
85
- "is-checked": _vm.state.isChecked,
86
- "is-indeterminate": _vm.indeterminate,
87
- "is-focus": _vm.state.focus
88
- },
89
- attrs: {
90
- "role": _vm.indeterminate ? "checkbox" : void 0,
91
- "aria-checked": _vm.indeterminate ? "mixed" : false
92
- }
93
- }, [_vm.trueLabel || _vm.falseLabel ? _c("input", {
94
- directives: [{
95
- name: "model",
96
- rawName: "v-model",
97
- value: _vm.state.model,
98
- expression: "state.model"
99
- }],
100
- staticClass: "tiny-checkbox__original",
101
- attrs: {
102
- "type": "checkbox",
103
- "tabindex": _vm.tabindex,
104
- "aria-hidden": _vm.indeterminate ? "true" : "false",
105
- "name": _vm.name,
106
- "disabled": _vm.state.isDisabled || _vm.state.isDisplayOnly,
107
- "true-value": _vm.trueLabel,
108
- "false-value": _vm.falseLabel
109
- },
110
- domProps: {
111
- "checked": Array.isArray(_vm.state.model) ? _vm._i(_vm.state.model, null) > -1 : _vm._q(_vm.state.model, _vm.trueLabel)
112
- },
113
- on: {
114
- "change": [function($event) {
115
- var $$a = _vm.state.model, $$el = $event.target, $$c = $$el.checked ? _vm.trueLabel : _vm.falseLabel;
116
- if (Array.isArray($$a)) {
117
- var $$v = null, $$i = _vm._i($$a, $$v);
118
- if ($$el.checked) {
119
- $$i < 0 && _vm.$set(_vm.state, "model", $$a.concat([$$v]));
120
- } else {
121
- $$i > -1 && _vm.$set(_vm.state, "model", $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
122
- }
123
- } else {
124
- _vm.$set(_vm.state, "model", $$c);
125
- }
126
- }, function($event) {
127
- $event.stopPropagation();
128
- return _vm.handleChange.apply(null, arguments);
129
- }],
130
- "focus": function focus($event) {
131
- _vm.state.focus = true;
132
- },
133
- "blur": function blur($event) {
134
- _vm.state.focus = false;
135
- },
136
- "click": function click($event) {
137
- $event.stopPropagation();
138
- }
139
- }
140
- }) : _c("input", {
141
- directives: [{
142
- name: "model",
143
- rawName: "v-model",
144
- value: _vm.state.model,
145
- expression: "state.model"
146
- }],
147
- staticClass: "tiny-checkbox__original",
148
- attrs: {
149
- "type": "checkbox",
150
- "tabindex": _vm.tabindex,
151
- "aria-hidden": _vm.indeterminate ? "true" : "false",
152
- "disabled": _vm.state.isDisabled || _vm.state.isDisplayOnly,
153
- "name": _vm.name
154
- },
155
- domProps: {
156
- "value": _vm.label,
157
- "checked": Array.isArray(_vm.state.model) ? _vm._i(_vm.state.model, _vm.label) > -1 : _vm.state.model
158
- },
159
- on: {
160
- "change": [function($event) {
161
- var $$a = _vm.state.model, $$el = $event.target, $$c = $$el.checked ? true : false;
162
- if (Array.isArray($$a)) {
163
- var $$v = _vm.label, $$i = _vm._i($$a, $$v);
164
- if ($$el.checked) {
165
- $$i < 0 && _vm.$set(_vm.state, "model", $$a.concat([$$v]));
166
- } else {
167
- $$i > -1 && _vm.$set(_vm.state, "model", $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
168
- }
169
- } else {
170
- _vm.$set(_vm.state, "model", $$c);
171
- }
172
- }, function($event) {
173
- $event.stopPropagation();
174
- return _vm.handleChange.apply(null, arguments);
175
- }],
176
- "focus": function focus($event) {
177
- _vm.state.focus = true;
178
- },
179
- "blur": function blur($event) {
180
- _vm.state.focus = false;
181
- },
182
- "click": function click($event) {
183
- $event.stopPropagation();
184
- }
185
- }
186
- }), _c("span", {
187
- staticClass: "tiny-checkbox__inner"
188
- }, [_vm.indeterminate && _vm.state.shape !== "filter" ? _c("icon-halfselect", {
189
- staticClass: "tiny-svg-size icon-halfselect"
190
- }) : _vm.state.isChecked ? _c("icon-checked-sur", {
191
- staticClass: "tiny-svg-size icon-checked-sur"
192
- }) : _c("icon-check", {
193
- staticClass: "tiny-svg-size icon-check"
194
- })], 1)]), _vm.slots.default && _vm.slots.default() || _vm.state.isShowText ? _c("span", {
195
- directives: [{
196
- name: "auto-tip",
197
- rawName: "v-auto-tip"
198
- }],
199
- staticClass: "tiny-checkbox__label tiny-checkbox-display-only"
200
- }, [_vm._t("default", function() {
201
- return [_vm._v(_vm._s(_vm.state.showText))];
202
- })], 2) : _vm._e()]);
203
- };
204
- var staticRenderFns = [];
205
- var __cssModules = {};
206
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
207
- function __vue2_injectStyles(context) {
208
- for (var o in __cssModules) {
209
- this[o] = __cssModules[o];
210
- }
90
+ "is-filter": _ctx.state.shape === "filter"
91
+ }]],
92
+ id: _ctx.id,
93
+ tabindex: "-1"
94
+ }, _ctx.a(_ctx.$attrs, ["class", "style", "onClick"], true)), [createElementVNode("span", {
95
+ class: normalizeClass(["tiny-checkbox__input", {
96
+ "is-disabled": _ctx.state.isDisabled || _ctx.state.isDisplayOnly,
97
+ "is-checked": _ctx.state.isChecked,
98
+ "is-indeterminate": _ctx.indeterminate,
99
+ "is-focus": _ctx.state.focus
100
+ }]),
101
+ role: _ctx.indeterminate ? "checkbox" : void 0,
102
+ "aria-checked": _ctx.indeterminate ? "mixed" : false
103
+ }, [_ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
104
+ key: 0,
105
+ class: "tiny-checkbox__original",
106
+ type: "checkbox",
107
+ tabindex: _ctx.tabindex,
108
+ "aria-hidden": _ctx.indeterminate ? "true" : "false",
109
+ name: _ctx.name,
110
+ disabled: _ctx.state.isDisabled || _ctx.state.isDisplayOnly,
111
+ "true-value": _ctx.trueLabel,
112
+ "false-value": _ctx.falseLabel,
113
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
114
+ return _ctx.state.model = $event;
115
+ }),
116
+ onChange: _cache[1] || (_cache[1] = withModifiers(function() {
117
+ return _ctx.handleChange && _ctx.handleChange.apply(_ctx, arguments);
118
+ }, ["stop"])),
119
+ onFocus: _cache[2] || (_cache[2] = function($event) {
120
+ return _ctx.state.focus = true;
121
+ }),
122
+ onBlur: _cache[3] || (_cache[3] = function($event) {
123
+ return _ctx.state.focus = false;
124
+ }),
125
+ onClick: _cache[4] || (_cache[4] = withModifiers(function() {
126
+ }, ["stop"]))
127
+ }, null, 40, _hoisted_3)), [[vModelCheckbox, _ctx.state.model]]) : withDirectives((openBlock(), createElementBlock("input", {
128
+ key: 1,
129
+ class: "tiny-checkbox__original",
130
+ type: "checkbox",
131
+ tabindex: _ctx.tabindex,
132
+ "aria-hidden": _ctx.indeterminate ? "true" : "false",
133
+ disabled: _ctx.state.isDisabled || _ctx.state.isDisplayOnly,
134
+ value: _ctx.label,
135
+ name: _ctx.name,
136
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = function($event) {
137
+ return _ctx.state.model = $event;
138
+ }),
139
+ onChange: _cache[6] || (_cache[6] = withModifiers(function() {
140
+ return _ctx.handleChange && _ctx.handleChange.apply(_ctx, arguments);
141
+ }, ["stop"])),
142
+ onFocus: _cache[7] || (_cache[7] = function($event) {
143
+ return _ctx.state.focus = true;
144
+ }),
145
+ onBlur: _cache[8] || (_cache[8] = function($event) {
146
+ return _ctx.state.focus = false;
147
+ }),
148
+ onClick: _cache[9] || (_cache[9] = withModifiers(function() {
149
+ }, ["stop"]))
150
+ }, null, 40, _hoisted_4)), [[vModelCheckbox, _ctx.state.model]]), createElementVNode("span", _hoisted_5, [_ctx.indeterminate && _ctx.state.shape !== "filter" ? (openBlock(), createBlock(_component_icon_halfselect, {
151
+ key: 0,
152
+ class: "tiny-svg-size icon-halfselect"
153
+ })) : _ctx.state.isChecked ? (openBlock(), createBlock(_component_icon_checked_sur, {
154
+ key: 1,
155
+ class: "tiny-svg-size icon-checked-sur"
156
+ })) : (openBlock(), createBlock(_component_icon_check, {
157
+ key: 2,
158
+ class: "tiny-svg-size icon-check"
159
+ }))])], 10, _hoisted_2), _ctx.slots.default && _ctx.slots.default() || _ctx.state.isShowText ? withDirectives((openBlock(), createElementBlock("span", _hoisted_6, [renderSlot(_ctx.$slots, "default", {}, function() {
160
+ return [createTextVNode(
161
+ toDisplayString(_ctx.state.showText),
162
+ 1
163
+ /* TEXT */
164
+ )];
165
+ })])), [[_directive_auto_tip]]) : createCommentVNode("v-if", true)], 16, _hoisted_1);
211
166
  }
212
- var pc = /* @__PURE__ */ function() {
213
- return __component__.exports;
214
- }();
167
+ var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
215
168
 
216
169
  export { pc as default };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-checkbox",
3
- "version": "2.22.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": "~2.22.0",
10
+ "@opentinyvue/vue-common": "~3.22.0",
11
11
  "@opentinyvue/vue-renderless": "~3.22.0",
12
- "@opentinyvue/vue-directive": "~2.22.0",
13
- "@opentinyvue/vue-icon": "~2.22.0",
12
+ "@opentinyvue/vue-directive": "~3.22.0",
13
+ "@opentinyvue/vue-icon": "~3.22.0",
14
14
  "@opentinyvue/vue-theme": "~3.22.0"
15
15
  },
16
16
  "license": "MIT",
package/src/index.d.ts CHANGED
@@ -38,7 +38,7 @@ export declare const checkboxProps: {
38
38
  border: BooleanConstructor;
39
39
  size: StringConstructor;
40
40
  text: StringConstructor;
41
- customClass: (StringConstructor | ArrayConstructor | ObjectConstructor)[];
41
+ customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
42
42
  validateEvent: {
43
43
  type: BooleanConstructor;
44
44
  default: boolean;
@@ -67,5 +67,142 @@ export declare const checkboxProps: {
67
67
  tiny_theme: StringConstructor;
68
68
  tiny_chart_theme: ObjectConstructor;
69
69
  };
70
- declare const _default: any;
70
+ declare const _default: import("@vue/runtime-core").DefineComponent<{
71
+ _constants: {
72
+ type: ObjectConstructor;
73
+ default: () => {
74
+ FORM_ITEM: string;
75
+ FORM_CHANGE: string;
76
+ CHECKBOX: string;
77
+ CHECKBOX_GROUP: string;
78
+ };
79
+ };
80
+ modelValue: {
81
+ type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
82
+ default: undefined;
83
+ };
84
+ label: {
85
+ type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
86
+ default: string;
87
+ };
88
+ indeterminate: BooleanConstructor;
89
+ disabled: BooleanConstructor;
90
+ checked: BooleanConstructor;
91
+ name: StringConstructor;
92
+ trueLabel: (StringConstructor | NumberConstructor)[];
93
+ falseLabel: (StringConstructor | NumberConstructor)[];
94
+ id: StringConstructor;
95
+ controls: {
96
+ type: StringConstructor;
97
+ default: string;
98
+ };
99
+ border: BooleanConstructor;
100
+ size: StringConstructor;
101
+ text: StringConstructor;
102
+ customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
103
+ validateEvent: {
104
+ type: BooleanConstructor;
105
+ default: boolean;
106
+ };
107
+ events: {
108
+ type: ObjectConstructor;
109
+ default: () => {};
110
+ };
111
+ displayOnly: {
112
+ type: BooleanConstructor;
113
+ default: boolean;
114
+ };
115
+ iconPosition: PropType<IconPosition>;
116
+ shape: {
117
+ type: StringConstructor;
118
+ default: string;
119
+ };
120
+ tabindex: {
121
+ type: StringConstructor;
122
+ default: string;
123
+ };
124
+ tiny_mode: StringConstructor;
125
+ tiny_mode_root: BooleanConstructor;
126
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
127
+ tiny_renderless: FunctionConstructor;
128
+ tiny_theme: StringConstructor;
129
+ tiny_chart_theme: ObjectConstructor;
130
+ }, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
131
+ [key: string]: any;
132
+ }>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
133
+ _constants: {
134
+ type: ObjectConstructor;
135
+ default: () => {
136
+ FORM_ITEM: string;
137
+ FORM_CHANGE: string;
138
+ CHECKBOX: string;
139
+ CHECKBOX_GROUP: string;
140
+ };
141
+ };
142
+ modelValue: {
143
+ type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
144
+ default: undefined;
145
+ };
146
+ label: {
147
+ type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
148
+ default: string;
149
+ };
150
+ indeterminate: BooleanConstructor;
151
+ disabled: BooleanConstructor;
152
+ checked: BooleanConstructor;
153
+ name: StringConstructor;
154
+ trueLabel: (StringConstructor | NumberConstructor)[];
155
+ falseLabel: (StringConstructor | NumberConstructor)[];
156
+ id: StringConstructor;
157
+ controls: {
158
+ type: StringConstructor;
159
+ default: string;
160
+ };
161
+ border: BooleanConstructor;
162
+ size: StringConstructor;
163
+ text: StringConstructor;
164
+ customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
165
+ validateEvent: {
166
+ type: BooleanConstructor;
167
+ default: boolean;
168
+ };
169
+ events: {
170
+ type: ObjectConstructor;
171
+ default: () => {};
172
+ };
173
+ displayOnly: {
174
+ type: BooleanConstructor;
175
+ default: boolean;
176
+ };
177
+ iconPosition: PropType<IconPosition>;
178
+ shape: {
179
+ type: StringConstructor;
180
+ default: string;
181
+ };
182
+ tabindex: {
183
+ type: StringConstructor;
184
+ default: string;
185
+ };
186
+ tiny_mode: StringConstructor;
187
+ tiny_mode_root: BooleanConstructor;
188
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
189
+ tiny_renderless: FunctionConstructor;
190
+ tiny_theme: StringConstructor;
191
+ tiny_chart_theme: ObjectConstructor;
192
+ }>>, {
193
+ label: string | number | boolean;
194
+ disabled: boolean;
195
+ checked: boolean;
196
+ indeterminate: boolean;
197
+ tiny_mode_root: boolean;
198
+ _constants: Record<string, any>;
199
+ modelValue: string | number | boolean;
200
+ tabindex: string;
201
+ border: boolean;
202
+ events: Record<string, any>;
203
+ validateEvent: boolean;
204
+ displayOnly: boolean;
205
+ shape: string;
206
+ controls: string;
207
+ }, {}>;
71
208
  export default _default;
@@ -1,2 +1,90 @@
1
- declare const _default: any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
+ name?: any;
3
+ label?: any;
4
+ disabled?: any;
5
+ size?: any;
6
+ text?: any;
7
+ id?: any;
8
+ checked?: any;
9
+ indeterminate?: any;
10
+ customClass?: any;
11
+ tiny_mode?: any;
12
+ tiny_mode_root?: any;
13
+ tiny_template?: any;
14
+ tiny_renderless?: any;
15
+ _constants?: any;
16
+ tiny_theme?: any;
17
+ tiny_chart_theme?: any;
18
+ modelValue?: any;
19
+ border?: any;
20
+ events?: any;
21
+ validateEvent?: any;
22
+ displayOnly?: any;
23
+ trueLabel?: any;
24
+ falseLabel?: any;
25
+ controls?: any;
26
+ }>, {
27
+ t: (this: any, path: any, options?: any) => any;
28
+ vm: any;
29
+ f: (props: any, attrs?: {}) => {};
30
+ a: (attrs: any, filters: any, include: any) => {};
31
+ d: (props: any) => void;
32
+ dp: (props: any) => void;
33
+ gcls: (key: any) => any;
34
+ m: (...cssClasses: any[]) => string;
35
+ }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("change" | "update:modelValue" | "complete")[], "change" | "update:modelValue" | "complete", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
36
+ name?: any;
37
+ label?: any;
38
+ disabled?: any;
39
+ size?: any;
40
+ text?: any;
41
+ id?: any;
42
+ checked?: any;
43
+ indeterminate?: any;
44
+ customClass?: any;
45
+ tiny_mode?: any;
46
+ tiny_mode_root?: any;
47
+ tiny_template?: any;
48
+ tiny_renderless?: any;
49
+ _constants?: any;
50
+ tiny_theme?: any;
51
+ tiny_chart_theme?: any;
52
+ modelValue?: any;
53
+ border?: any;
54
+ events?: any;
55
+ validateEvent?: any;
56
+ displayOnly?: any;
57
+ trueLabel?: any;
58
+ falseLabel?: any;
59
+ controls?: any;
60
+ }>>> & {
61
+ onChange?: ((...args: any[]) => any) | undefined;
62
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
63
+ onComplete?: ((...args: any[]) => any) | undefined;
64
+ }, {
65
+ readonly name?: any;
66
+ readonly label?: any;
67
+ readonly disabled?: any;
68
+ readonly size?: any;
69
+ readonly text?: any;
70
+ readonly id?: any;
71
+ readonly checked?: any;
72
+ readonly indeterminate?: any;
73
+ readonly customClass?: any;
74
+ readonly tiny_mode?: any;
75
+ readonly tiny_mode_root?: any;
76
+ readonly tiny_template?: any;
77
+ readonly tiny_renderless?: any;
78
+ readonly _constants?: any;
79
+ readonly tiny_theme?: any;
80
+ readonly tiny_chart_theme?: any;
81
+ readonly modelValue?: any;
82
+ readonly border?: any;
83
+ readonly events?: any;
84
+ readonly validateEvent?: any;
85
+ readonly displayOnly?: any;
86
+ readonly trueLabel?: any;
87
+ readonly falseLabel?: any;
88
+ readonly controls?: any;
89
+ }, {}>;
2
90
  export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -1,2 +1,85 @@
1
- declare const _default: any;
1
+ import type { ICheckboxApi } from '@opentinyvue/vue-renderless/types/checkbox.type';
2
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
3
+ name?: any;
4
+ label?: any;
5
+ disabled?: any;
6
+ size?: any;
7
+ text?: any;
8
+ id?: any;
9
+ checked?: any;
10
+ indeterminate?: any;
11
+ tiny_mode?: any;
12
+ tiny_mode_root?: any;
13
+ tiny_template?: any;
14
+ tiny_renderless?: any;
15
+ _constants?: any;
16
+ tiny_theme?: any;
17
+ tiny_chart_theme?: any;
18
+ modelValue?: any;
19
+ tabindex?: any;
20
+ border?: any;
21
+ events?: any;
22
+ validateEvent?: any;
23
+ displayOnly?: any;
24
+ shape?: any;
25
+ trueLabel?: any;
26
+ falseLabel?: any;
27
+ controls?: any;
28
+ }>, ICheckboxApi, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("change" | "update:modelValue" | "complete")[], "change" | "update:modelValue" | "complete", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
29
+ name?: any;
30
+ label?: any;
31
+ disabled?: any;
32
+ size?: any;
33
+ text?: any;
34
+ id?: any;
35
+ checked?: any;
36
+ indeterminate?: any;
37
+ tiny_mode?: any;
38
+ tiny_mode_root?: any;
39
+ tiny_template?: any;
40
+ tiny_renderless?: any;
41
+ _constants?: any;
42
+ tiny_theme?: any;
43
+ tiny_chart_theme?: any;
44
+ modelValue?: any;
45
+ tabindex?: any;
46
+ border?: any;
47
+ events?: any;
48
+ validateEvent?: any;
49
+ displayOnly?: any;
50
+ shape?: any;
51
+ trueLabel?: any;
52
+ falseLabel?: any;
53
+ controls?: any;
54
+ }>>> & {
55
+ onChange?: ((...args: any[]) => any) | undefined;
56
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
57
+ onComplete?: ((...args: any[]) => any) | undefined;
58
+ }, {
59
+ readonly name?: any;
60
+ readonly label?: any;
61
+ readonly disabled?: any;
62
+ readonly size?: any;
63
+ readonly text?: any;
64
+ readonly id?: any;
65
+ readonly checked?: any;
66
+ readonly indeterminate?: any;
67
+ readonly tiny_mode?: any;
68
+ readonly tiny_mode_root?: any;
69
+ readonly tiny_template?: any;
70
+ readonly tiny_renderless?: any;
71
+ readonly _constants?: any;
72
+ readonly tiny_theme?: any;
73
+ readonly tiny_chart_theme?: any;
74
+ readonly modelValue?: any;
75
+ readonly tabindex?: any;
76
+ readonly border?: any;
77
+ readonly events?: any;
78
+ readonly validateEvent?: any;
79
+ readonly displayOnly?: any;
80
+ readonly shape?: any;
81
+ readonly trueLabel?: any;
82
+ readonly falseLabel?: any;
83
+ readonly controls?: any;
84
+ }, {}>;
2
85
  export default _default;