@opentinyvue/vue-badge 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
  }
@@ -77,7 +73,7 @@ var Badge = defineComponent({
77
73
  });
78
74
  }
79
75
  });
80
- var version = "3.21.0";
76
+ var version = "3.22.0";
81
77
  Badge.model = {
82
78
  prop: "modelValue",
83
79
  event: "update:modelValue"
package/package.json CHANGED
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-badge",
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-renderless": "~3.21.0",
11
- "@opentinyvue/vue-common": "~3.21.0",
12
- "@opentinyvue/vue-theme-mobile": "~3.21.0",
13
- "@opentinyvue/vue-theme": "~3.21.0"
10
+ "@opentinyvue/vue-renderless": "~3.22.0",
11
+ "@opentinyvue/vue-common": "~3.22.0",
12
+ "@opentinyvue/vue-theme": "~3.22.0"
14
13
  },
15
14
  "license": "MIT",
16
15
  "types": "index.d.ts",
package/src/index.d.ts CHANGED
@@ -128,12 +128,12 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
128
128
  tiny_theme: StringConstructor;
129
129
  tiny_chart_theme: ObjectConstructor;
130
130
  }>>, {
131
- tiny_mode_root: boolean;
132
131
  offset: unknown[];
133
132
  hidden: boolean;
133
+ tiny_mode_root: boolean;
134
+ showLeft: boolean;
134
135
  isDot: boolean;
135
136
  isFixed: boolean;
136
137
  isMini: boolean;
137
- showLeft: boolean;
138
138
  }, {}>;
139
139
  export default _default;
@@ -1,8 +1,11 @@
1
1
  declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
2
  value?: any;
3
+ href?: any;
3
4
  type?: any;
4
5
  data?: any;
6
+ max?: any;
5
7
  target?: any;
8
+ hidden?: any;
6
9
  tiny_mode?: any;
7
10
  tiny_mode_root?: any;
8
11
  tiny_template?: any;
@@ -11,16 +14,16 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
11
14
  tiny_theme?: any;
12
15
  tiny_chart_theme?: any;
13
16
  modelValue?: any;
14
- href?: any;
15
- hidden?: any;
16
- max?: any;
17
- isDot?: any;
18
17
  showLeft?: any;
18
+ isDot?: any;
19
19
  }>, any, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
20
20
  value?: any;
21
+ href?: any;
21
22
  type?: any;
22
23
  data?: any;
24
+ max?: any;
23
25
  target?: any;
26
+ hidden?: any;
24
27
  tiny_mode?: any;
25
28
  tiny_mode_root?: any;
26
29
  tiny_template?: any;
@@ -29,16 +32,16 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
29
32
  tiny_theme?: any;
30
33
  tiny_chart_theme?: any;
31
34
  modelValue?: any;
32
- href?: any;
33
- hidden?: any;
34
- max?: any;
35
- isDot?: any;
36
35
  showLeft?: any;
36
+ isDot?: any;
37
37
  }>>>, {
38
38
  readonly value?: any;
39
+ readonly href?: any;
39
40
  readonly type?: any;
40
41
  readonly data?: any;
42
+ readonly max?: any;
41
43
  readonly target?: any;
44
+ readonly hidden?: any;
42
45
  readonly tiny_mode?: any;
43
46
  readonly tiny_mode_root?: any;
44
47
  readonly tiny_template?: any;
@@ -47,10 +50,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
47
50
  readonly tiny_theme?: any;
48
51
  readonly tiny_chart_theme?: any;
49
52
  readonly modelValue?: any;
50
- readonly href?: any;
51
- readonly hidden?: any;
52
- readonly max?: any;
53
- readonly isDot?: any;
54
53
  readonly showLeft?: any;
54
+ readonly isDot?: any;
55
55
  }, {}>;
56
56
  export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -1,9 +1,13 @@
1
1
  import type { IBadgeApi } from '@opentinyvue/vue-renderless/types/badge.type';
2
2
  declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
3
3
  value?: any;
4
+ href?: any;
4
5
  type?: any;
5
6
  data?: any;
7
+ max?: any;
6
8
  target?: any;
9
+ offset?: any;
10
+ hidden?: any;
7
11
  tiny_mode?: any;
8
12
  tiny_mode_root?: any;
9
13
  tiny_template?: any;
@@ -12,17 +16,17 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
12
16
  tiny_theme?: any;
13
17
  tiny_chart_theme?: any;
14
18
  modelValue?: any;
15
- href?: any;
16
- offset?: any;
17
- hidden?: any;
18
- max?: any;
19
19
  isDot?: any;
20
20
  badgeClass?: any;
21
21
  }>, IBadgeApi, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
22
22
  value?: any;
23
+ href?: any;
23
24
  type?: any;
24
25
  data?: any;
26
+ max?: any;
25
27
  target?: any;
28
+ offset?: any;
29
+ hidden?: any;
26
30
  tiny_mode?: any;
27
31
  tiny_mode_root?: any;
28
32
  tiny_template?: any;
@@ -31,17 +35,17 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
31
35
  tiny_theme?: any;
32
36
  tiny_chart_theme?: any;
33
37
  modelValue?: any;
34
- href?: any;
35
- offset?: any;
36
- hidden?: any;
37
- max?: any;
38
38
  isDot?: any;
39
39
  badgeClass?: any;
40
40
  }>>>, {
41
41
  readonly value?: any;
42
+ readonly href?: any;
42
43
  readonly type?: any;
43
44
  readonly data?: any;
45
+ readonly max?: any;
44
46
  readonly target?: any;
47
+ readonly offset?: any;
48
+ readonly hidden?: any;
45
49
  readonly tiny_mode?: any;
46
50
  readonly tiny_mode_root?: any;
47
51
  readonly tiny_template?: any;
@@ -50,10 +54,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
50
54
  readonly tiny_theme?: any;
51
55
  readonly tiny_chart_theme?: any;
52
56
  readonly modelValue?: any;
53
- readonly href?: any;
54
- readonly offset?: any;
55
- readonly hidden?: any;
56
- readonly max?: any;
57
57
  readonly isDot?: any;
58
58
  readonly badgeClass?: any;
59
59
  }, {}>;
package/lib/mobile.js DELETED
@@ -1,82 +0,0 @@
1
- import { renderless, api } from '@opentinyvue/vue-renderless/badge/vue';
2
- import { defineComponent, props, setup } from '@opentinyvue/vue-common';
3
- import '@opentinyvue/vue-theme-mobile/badge/index.css';
4
- import { openBlock, createElementBlock, renderSlot, normalizeClass, createElementVNode, 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, ["isDot", "isFixed", "isMini", "hidden", "max", "type", "value", "modelValue", "href", "target"]),
41
- setup: function setup$1(props2, context) {
42
- return setup({
43
- props: props2,
44
- context,
45
- renderless,
46
- api
47
- });
48
- }
49
- });
50
- var _hoisted_1 = {
51
- class: "tiny-mobile-badge"
52
- };
53
- var _hoisted_2 = {
54
- key: 0
55
- };
56
- var _hoisted_3 = ["href", "target"];
57
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
58
- return openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "default"), !_ctx.hidden && (_ctx.value > 0 || _ctx.isDot) ? (openBlock(), createElementBlock(
59
- "div",
60
- {
61
- key: 0,
62
- class: normalizeClass(["tiny-mobile-badge__content", [{
63
- "is-dot": _ctx.isDot,
64
- "is-fixed": _ctx.isFixed,
65
- "is-mini": _ctx.isMini
66
- }, _ctx.value < 10 ? "is-circle" : "", _ctx.type ? "tiny-mobile-badge--" + _ctx.type : ""]])
67
- },
68
- [!_ctx.isDot ? (openBlock(), createElementBlock("span", _hoisted_2, [renderSlot(_ctx.$slots, "content", {}, function() {
69
- return [createElementVNode("a", {
70
- href: _ctx.state.href,
71
- target: _ctx.target,
72
- rel: "noopener noreferrer",
73
- class: "tiny-mobile-badge__link"
74
- }, toDisplayString(_ctx.state.content), 9, _hoisted_3)];
75
- })])) : createCommentVNode("v-if", true)],
76
- 2
77
- /* CLASS */
78
- )) : createCommentVNode("v-if", true)]);
79
- }
80
- var mobile = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
81
-
82
- export { mobile as default };
@@ -1,65 +0,0 @@
1
- declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
- value?: any;
3
- type?: any;
4
- target?: any;
5
- tiny_mode?: any;
6
- tiny_mode_root?: any;
7
- tiny_template?: any;
8
- tiny_renderless?: any;
9
- _constants?: any;
10
- tiny_theme?: any;
11
- tiny_chart_theme?: any;
12
- modelValue?: any;
13
- href?: any;
14
- hidden?: any;
15
- max?: any;
16
- isDot?: any;
17
- isFixed?: any;
18
- isMini?: any;
19
- }>, {
20
- t: (this: any, path: any, options?: any) => any;
21
- vm: any;
22
- f: (props: any, attrs?: {}) => {};
23
- a: (attrs: any, filters: any, include: any) => {};
24
- d: (props: any) => void;
25
- dp: (props: any) => void;
26
- gcls: (key: any) => any;
27
- m: (...cssClasses: any[]) => string;
28
- }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
29
- value?: any;
30
- type?: any;
31
- target?: any;
32
- tiny_mode?: any;
33
- tiny_mode_root?: any;
34
- tiny_template?: any;
35
- tiny_renderless?: any;
36
- _constants?: any;
37
- tiny_theme?: any;
38
- tiny_chart_theme?: any;
39
- modelValue?: any;
40
- href?: any;
41
- hidden?: any;
42
- max?: any;
43
- isDot?: any;
44
- isFixed?: any;
45
- isMini?: any;
46
- }>>>, {
47
- readonly value?: any;
48
- readonly type?: any;
49
- readonly target?: any;
50
- readonly tiny_mode?: any;
51
- readonly tiny_mode_root?: any;
52
- readonly tiny_template?: any;
53
- readonly tiny_renderless?: any;
54
- readonly _constants?: any;
55
- readonly tiny_theme?: any;
56
- readonly tiny_chart_theme?: any;
57
- readonly modelValue?: any;
58
- readonly href?: any;
59
- readonly hidden?: any;
60
- readonly max?: any;
61
- readonly isDot?: any;
62
- readonly isFixed?: any;
63
- readonly isMini?: any;
64
- }, {}>;
65
- export default _default;