@opentinyvue/vue-divider 2.21.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/LICENSE +22 -0
- package/index.d.ts +2 -0
- package/lib/index.js +85 -0
- package/lib/mobile-first.js +85 -0
- package/lib/pc.js +78 -0
- package/package.json +16 -0
- package/src/index.d.ts +55 -0
- package/src/mobile-first.vue.d.ts +2 -0
- package/src/pc.vue.d.ts +2 -0
- package/src/token.d.ts +7 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 - present TinyVue Authors.
|
|
4
|
+
Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
function _extends() {
|
|
2
|
+
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
3
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
4
|
+
var t = arguments[e];
|
|
5
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
6
|
+
}
|
|
7
|
+
return n;
|
|
8
|
+
}, _extends.apply(null, arguments);
|
|
9
|
+
}
|
|
10
|
+
import { defineComponent, $prefix, $setup, $props } from "@opentinyvue/vue-common";
|
|
11
|
+
import PcTemplate from "./pc.js";
|
|
12
|
+
import "@opentinyvue/vue-theme/divider/index.css";
|
|
13
|
+
var template = function template2(mode) {
|
|
14
|
+
var _process$env;
|
|
15
|
+
typeof process === "object" ? (_process$env = process.env) == null ? void 0 : _process$env.TINY_MODE : null;
|
|
16
|
+
return PcTemplate;
|
|
17
|
+
};
|
|
18
|
+
var $constants = {};
|
|
19
|
+
var dividerProps = _extends({}, $props, {
|
|
20
|
+
_constants: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default: function _default() {
|
|
23
|
+
return $constants;
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
direction: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "horizontal"
|
|
29
|
+
},
|
|
30
|
+
color: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: ""
|
|
33
|
+
},
|
|
34
|
+
borderStyle: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: "solid"
|
|
37
|
+
},
|
|
38
|
+
contentPosition: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: "center"
|
|
41
|
+
},
|
|
42
|
+
contentColor: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: ""
|
|
45
|
+
},
|
|
46
|
+
contentBackgroundColor: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: ""
|
|
49
|
+
},
|
|
50
|
+
fontSize: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: function _default2() {
|
|
53
|
+
return "14px";
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
margin: String,
|
|
57
|
+
offset: String,
|
|
58
|
+
height: String,
|
|
59
|
+
status: {
|
|
60
|
+
type: String,
|
|
61
|
+
values: ["default", "success", "warning", "error", "info"],
|
|
62
|
+
default: function _default3() {
|
|
63
|
+
return "default";
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
var Divider = defineComponent({
|
|
68
|
+
name: $prefix + "Divider",
|
|
69
|
+
props: dividerProps,
|
|
70
|
+
setup: function setup(props, context) {
|
|
71
|
+
return $setup({
|
|
72
|
+
props,
|
|
73
|
+
context,
|
|
74
|
+
template
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
var version = "2.21.0";
|
|
79
|
+
Divider.install = function(Vue) {
|
|
80
|
+
Vue.component(Divider.name, Divider);
|
|
81
|
+
};
|
|
82
|
+
Divider.version = version;
|
|
83
|
+
export {
|
|
84
|
+
Divider as default
|
|
85
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { renderless, api } from '@opentinyvue/vue-renderless/divider/vue';
|
|
2
|
+
import { defineComponent, props, setup } from '@opentinyvue/vue-common';
|
|
3
|
+
|
|
4
|
+
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
5
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
6
|
+
if (render) {
|
|
7
|
+
options.render = render;
|
|
8
|
+
options.staticRenderFns = staticRenderFns;
|
|
9
|
+
options._compiled = true;
|
|
10
|
+
}
|
|
11
|
+
var hook;
|
|
12
|
+
if (injectStyles) {
|
|
13
|
+
hook = injectStyles;
|
|
14
|
+
}
|
|
15
|
+
if (hook) {
|
|
16
|
+
if (options.functional) {
|
|
17
|
+
options._injectStyles = hook;
|
|
18
|
+
var originalRender = options.render;
|
|
19
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
20
|
+
hook.call(context);
|
|
21
|
+
return originalRender(h, context);
|
|
22
|
+
};
|
|
23
|
+
} else {
|
|
24
|
+
var existing = options.beforeCreate;
|
|
25
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
exports: scriptExports,
|
|
30
|
+
options
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
var classes = {
|
|
35
|
+
"status-default": "border-color-border",
|
|
36
|
+
"status-info": "border-color-brand",
|
|
37
|
+
"status-warning": "border-color-warning",
|
|
38
|
+
"status-success": "border-color-success",
|
|
39
|
+
"status-error": "border-color-error"
|
|
40
|
+
};
|
|
41
|
+
var __vue2_script = defineComponent({
|
|
42
|
+
props: [].concat(props, ["type", "vertical", "lineColor", "textPosition", "status", "margin", "offset", "fontSize", "height"]),
|
|
43
|
+
setup: function setup$1(props2, context) {
|
|
44
|
+
return setup({
|
|
45
|
+
props: props2,
|
|
46
|
+
context,
|
|
47
|
+
renderless,
|
|
48
|
+
api,
|
|
49
|
+
classes
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
var render = function render2() {
|
|
54
|
+
var _vm = this;
|
|
55
|
+
var _h = _vm.$createElement;
|
|
56
|
+
var _c = _vm._self._c || _h;
|
|
57
|
+
return _c("div", {
|
|
58
|
+
class: _vm.m("overflow-hidden relative", _vm.vertical ? "inline-block w-px border-l" : "h-auto flex items-center justify-center w-full", _vm.gcls("status-" + _vm.status)),
|
|
59
|
+
style: _vm.state.rootStyle,
|
|
60
|
+
attrs: {
|
|
61
|
+
"data-tag": "aui-divider"
|
|
62
|
+
}
|
|
63
|
+
}, [!_vm.vertical ? _c("div", {
|
|
64
|
+
staticClass: "h-px w-full border-t",
|
|
65
|
+
class: [_vm.gcls("status-" + _vm.status)],
|
|
66
|
+
style: _vm.state.lineStyle
|
|
67
|
+
}) : _vm._e(), !_vm.vertical ? _c("span", {
|
|
68
|
+
ref: "text",
|
|
69
|
+
staticClass: "absolute py-0 px-3.5 bg-white",
|
|
70
|
+
style: _vm.state.textStyle
|
|
71
|
+
}, [_vm._t("default")], 2) : _vm._e()]);
|
|
72
|
+
};
|
|
73
|
+
var staticRenderFns = [];
|
|
74
|
+
var __cssModules = {};
|
|
75
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
|
|
76
|
+
function __vue2_injectStyles(context) {
|
|
77
|
+
for (var o in __cssModules) {
|
|
78
|
+
this[o] = __cssModules[o];
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
var mobileFirst = /* @__PURE__ */ function() {
|
|
82
|
+
return __component__.exports;
|
|
83
|
+
}();
|
|
84
|
+
|
|
85
|
+
export { mobileFirst as default };
|
package/lib/pc.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { renderless, api } from '@opentinyvue/vue-renderless/divider/vue';
|
|
2
|
+
import { defineComponent, props, setup } from '@opentinyvue/vue-common';
|
|
3
|
+
|
|
4
|
+
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
5
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
6
|
+
if (render) {
|
|
7
|
+
options.render = render;
|
|
8
|
+
options.staticRenderFns = staticRenderFns;
|
|
9
|
+
options._compiled = true;
|
|
10
|
+
}
|
|
11
|
+
var hook;
|
|
12
|
+
if (injectStyles) {
|
|
13
|
+
hook = injectStyles;
|
|
14
|
+
}
|
|
15
|
+
if (hook) {
|
|
16
|
+
if (options.functional) {
|
|
17
|
+
options._injectStyles = hook;
|
|
18
|
+
var originalRender = options.render;
|
|
19
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
20
|
+
hook.call(context);
|
|
21
|
+
return originalRender(h, context);
|
|
22
|
+
};
|
|
23
|
+
} else {
|
|
24
|
+
var existing = options.beforeCreate;
|
|
25
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
exports: scriptExports,
|
|
30
|
+
options
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
var render = function render2() {
|
|
35
|
+
var _vm = this;
|
|
36
|
+
var _h = _vm.$createElement;
|
|
37
|
+
var _c = _vm._self._c || _h;
|
|
38
|
+
return _c("div", {
|
|
39
|
+
class: ["tiny-divider", "tiny-divider--" + _vm.direction, _vm.direction === "vertical" ? "tiny-divider--" + _vm.status : ""],
|
|
40
|
+
style: _vm.state.rootStyle
|
|
41
|
+
}, [_vm.direction !== "vertical" ? _c("div", {
|
|
42
|
+
class: ["tiny-divider-line", "tiny-divider--" + _vm.status],
|
|
43
|
+
style: Object.assign({
|
|
44
|
+
"border-color": _vm.color
|
|
45
|
+
}, _vm.state.lineStyle)
|
|
46
|
+
}) : _vm._e(), _vm.slots.default ? _c("div", {
|
|
47
|
+
ref: "text",
|
|
48
|
+
class: ["tiny-divider__text"],
|
|
49
|
+
style: Object.assign({
|
|
50
|
+
color: _vm.contentColor,
|
|
51
|
+
"background-color": _vm.contentBackgroundColor
|
|
52
|
+
}, _vm.state.textStyle)
|
|
53
|
+
}, [_vm._t("default")], 2) : _vm._e()]);
|
|
54
|
+
};
|
|
55
|
+
var staticRenderFns = [];
|
|
56
|
+
var __vue2_script = defineComponent({
|
|
57
|
+
props: [].concat(props, ["direction", "color", "borderStyle", "contentPosition", "contentColor", "contentBackgroundColor", "status", "margin", "offset", "fontSize", "height"]),
|
|
58
|
+
setup: function setup$1(props2, context) {
|
|
59
|
+
return setup({
|
|
60
|
+
props: props2,
|
|
61
|
+
context,
|
|
62
|
+
renderless,
|
|
63
|
+
api
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
var __cssModules = {};
|
|
68
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
|
|
69
|
+
function __vue2_injectStyles(context) {
|
|
70
|
+
for (var o in __cssModules) {
|
|
71
|
+
this[o] = __cssModules[o];
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
var pc = /* @__PURE__ */ function() {
|
|
75
|
+
return __component__.exports;
|
|
76
|
+
}();
|
|
77
|
+
|
|
78
|
+
export { pc as default };
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@opentinyvue/vue-divider",
|
|
3
|
+
"version": "2.21.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "./lib/index.js",
|
|
6
|
+
"module": "./lib/index.js",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"type": "module",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@opentinyvue/vue-common": "~2.21.0",
|
|
11
|
+
"@opentinyvue/vue-renderless": "~3.21.0",
|
|
12
|
+
"@opentinyvue/vue-theme": "~3.21.0"
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"types": "index.d.ts"
|
|
16
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { PropType } from '@opentinyvue/vue-common';
|
|
2
|
+
export type DirectionType = 'horizontal' | 'vertical';
|
|
3
|
+
export type BorderStyleType = 'dashed' | 'solid' | 'dotted';
|
|
4
|
+
export type ContentPositionType = 'left' | 'right' | 'center';
|
|
5
|
+
export declare const $constants: {};
|
|
6
|
+
export declare const dividerProps: {
|
|
7
|
+
_constants: {
|
|
8
|
+
type: ObjectConstructor;
|
|
9
|
+
default: () => {};
|
|
10
|
+
};
|
|
11
|
+
direction: {
|
|
12
|
+
type: PropType<DirectionType>;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
color: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
borderStyle: {
|
|
20
|
+
type: PropType<BorderStyleType>;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
contentPosition: {
|
|
24
|
+
type: PropType<ContentPositionType>;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
contentColor: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
contentBackgroundColor: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
fontSize: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: () => string;
|
|
38
|
+
};
|
|
39
|
+
margin: StringConstructor;
|
|
40
|
+
offset: StringConstructor;
|
|
41
|
+
height: StringConstructor;
|
|
42
|
+
status: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
values: string[];
|
|
45
|
+
default: () => string;
|
|
46
|
+
};
|
|
47
|
+
tiny_mode: StringConstructor;
|
|
48
|
+
tiny_mode_root: BooleanConstructor;
|
|
49
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
50
|
+
tiny_renderless: FunctionConstructor;
|
|
51
|
+
tiny_theme: StringConstructor;
|
|
52
|
+
tiny_chart_theme: ObjectConstructor;
|
|
53
|
+
};
|
|
54
|
+
declare const _default: any;
|
|
55
|
+
export default _default;
|
package/src/pc.vue.d.ts
ADDED