rx-compo 1.0.52 → 1.0.54
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/entry/types/index.d.ts +0 -1
- package/es/components/RxButton/index.js +16 -25
- package/es/components/RxCheckbox/index.js +3712 -0
- package/es/components/RxCheckboxGroup/index.js +6430 -0
- package/es/components/RxDatePicker/index.js +13042 -0
- package/es/components/RxInput/index.js +1560 -0
- package/es/components/RxOption/index.js +8859 -0
- package/es/components/RxRadio/index.js +646 -0
- package/es/components/RxRadioButton/index.js +646 -0
- package/es/components/RxRadioGroup/index.js +1117 -0
- package/es/components/RxScrollbar/index.js +867 -0
- package/es/components/RxSelect/index.js +9022 -0
- package/es/components/RxSelectPlus/index.js +17471 -0
- package/es/components/RxSuperCondition/index.js +8690 -0
- package/es/components/RxTooltip/index.js +2470 -0
- package/es/components/index.js +13 -0
- package/es/index.d.ts +0 -1
- package/es/index.js +0 -1
- package/es/utils/useContext.d.ts +10 -0
- package/es/utils/useContext.js +13 -0
- package/es/utils/useTextOverflow.d.ts +4 -0
- package/es/utils/useTextOverflow.js +13 -0
- package/es/utils/with-install.d.ts +3 -0
- package/es/utils/with-install.js +7 -0
- package/index.esm.js +43171 -1577
- package/index.js +43192 -1585
- package/lib/components/RxButton/index.js +15 -24
- package/lib/components/RxCheckbox/index.js +3717 -0
- package/lib/components/RxCheckboxGroup/index.js +6435 -0
- package/lib/components/RxDatePicker/index.js +13047 -0
- package/lib/components/RxInput/index.js +1565 -0
- package/lib/components/RxOption/index.js +8864 -0
- package/lib/components/RxRadio/index.js +651 -0
- package/lib/components/RxRadioButton/index.js +651 -0
- package/lib/components/RxRadioGroup/index.js +1122 -0
- package/lib/components/RxScrollbar/index.js +872 -0
- package/lib/components/RxSelect/index.js +9027 -0
- package/lib/components/RxSelectPlus/index.js +17476 -0
- package/lib/components/RxSuperCondition/index.js +8695 -0
- package/lib/components/RxTooltip/index.js +2475 -0
- package/lib/components/index.js +91 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/lib/utils/useContext.d.ts +10 -0
- package/lib/utils/useContext.js +18 -0
- package/lib/utils/useTextOverflow.d.ts +4 -0
- package/lib/utils/useTextOverflow.js +17 -0
- package/lib/utils/with-install.d.ts +3 -0
- package/lib/utils/with-install.js +11 -0
- package/package.json +4 -2
- package/theme-chalk/css/index.css +1 -1
- package/theme-chalk/css/rx-button.css +1 -0
- package/theme-chalk/css/rx-checkbox-group.css +1 -0
- package/theme-chalk/css/rx-checkbox.css +1 -0
- package/theme-chalk/css/rx-date-picker.css +0 -0
- package/theme-chalk/css/rx-input.css +1 -0
- package/theme-chalk/css/rx-option.css +1 -0
- package/theme-chalk/css/rx-radio-button.css +0 -0
- package/theme-chalk/css/rx-radio-group.css +1 -0
- package/theme-chalk/css/rx-radio.css +1 -0
- package/theme-chalk/css/rx-scrollbar.css +0 -0
- package/theme-chalk/css/rx-select.css +1 -0
- package/theme-chalk/css/rx-super-condition.css +0 -0
- package/theme-chalk/css/rx-tooltip.css +0 -0
- package/es/components/RxButton/index.d.ts +0 -3
- package/es/components/RxButton/src/index.d.ts +0 -3
- package/es/components/RxButton/src/index.vue.d.ts +0 -10
- package/es/components/index.d.ts +0 -2
- package/lib/components/RxButton/index.d.ts +0 -3
- package/lib/components/RxButton/src/index.d.ts +0 -3
- package/lib/components/RxButton/src/index.vue.d.ts +0 -10
- package/lib/components/index.d.ts +0 -2
- package/types/components/RxButton/index.d.ts +0 -3
- package/types/components/RxButton/src/index.d.ts +0 -3
- package/types/components/RxButton/src/index.vue.d.ts +0 -10
- package/types/components/index.d.ts +0 -2
- package/types/utils/with-install.d.ts +0 -3
package/lib/components/index.js
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var RxButton = require('./RxButton');
|
|
6
|
+
var RxOption = require('./RxOption');
|
|
7
|
+
var RxSelect = require('./RxSelect');
|
|
8
|
+
var RxSelectPlus = require('./RxSelectPlus');
|
|
9
|
+
var RxTooltip = require('./RxTooltip');
|
|
10
|
+
var RxInput = require('./RxInput');
|
|
11
|
+
var RxCheckbox = require('./RxCheckbox');
|
|
12
|
+
var RxCheckboxGroup = require('./RxCheckboxGroup');
|
|
13
|
+
var RxSuperCondition = require('./RxSuperCondition');
|
|
14
|
+
var RxRadio = require('./RxRadio');
|
|
15
|
+
var RxRadioGroup = require('./RxRadioGroup');
|
|
16
|
+
var RxRadioButton = require('./RxRadioButton');
|
|
17
|
+
var RxScrollbar = require('./RxScrollbar');
|
|
18
|
+
var RxDatePicker = require('./RxDatePicker');
|
|
6
19
|
|
|
7
20
|
|
|
8
21
|
|
|
@@ -12,3 +25,81 @@ Object.keys(RxButton).forEach(function (k) {
|
|
|
12
25
|
get: function () { return RxButton[k]; }
|
|
13
26
|
});
|
|
14
27
|
});
|
|
28
|
+
Object.keys(RxOption).forEach(function (k) {
|
|
29
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return RxOption[k]; }
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
Object.keys(RxSelect).forEach(function (k) {
|
|
35
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return RxSelect[k]; }
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
Object.keys(RxSelectPlus).forEach(function (k) {
|
|
41
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () { return RxSelectPlus[k]; }
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
Object.keys(RxTooltip).forEach(function (k) {
|
|
47
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () { return RxTooltip[k]; }
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
Object.keys(RxInput).forEach(function (k) {
|
|
53
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function () { return RxInput[k]; }
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
Object.keys(RxCheckbox).forEach(function (k) {
|
|
59
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function () { return RxCheckbox[k]; }
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
Object.keys(RxCheckboxGroup).forEach(function (k) {
|
|
65
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () { return RxCheckboxGroup[k]; }
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
Object.keys(RxSuperCondition).forEach(function (k) {
|
|
71
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: function () { return RxSuperCondition[k]; }
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
Object.keys(RxRadio).forEach(function (k) {
|
|
77
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
78
|
+
enumerable: true,
|
|
79
|
+
get: function () { return RxRadio[k]; }
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
Object.keys(RxRadioGroup).forEach(function (k) {
|
|
83
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
84
|
+
enumerable: true,
|
|
85
|
+
get: function () { return RxRadioGroup[k]; }
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
Object.keys(RxRadioButton).forEach(function (k) {
|
|
89
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
90
|
+
enumerable: true,
|
|
91
|
+
get: function () { return RxRadioButton[k]; }
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
Object.keys(RxScrollbar).forEach(function (k) {
|
|
95
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
96
|
+
enumerable: true,
|
|
97
|
+
get: function () { return RxScrollbar[k]; }
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
Object.keys(RxDatePicker).forEach(function (k) {
|
|
101
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
102
|
+
enumerable: true,
|
|
103
|
+
get: function () { return RxDatePicker[k]; }
|
|
104
|
+
});
|
|
105
|
+
});
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
export interface CreateContextOptions {
|
|
3
|
+
readonly?: boolean;
|
|
4
|
+
createProvider?: boolean;
|
|
5
|
+
native?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function createContext<T>(context: any, key?: InjectionKey<T>, options?: CreateContextOptions): {
|
|
8
|
+
state: any;
|
|
9
|
+
};
|
|
10
|
+
export declare function useContext<T>(key: InjectionKey<T>, native?: boolean): T;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useContext = exports.createContext = void 0;
|
|
4
|
+
const vue_1 = require("vue");
|
|
5
|
+
function createContext(context, key = Symbol(), options = {}) {
|
|
6
|
+
const { readonly = true, createProvider = false, native = false } = options;
|
|
7
|
+
const state = (0, vue_1.reactive)(context);
|
|
8
|
+
const provideData = readonly ? (0, vue_1.readonly)(state) : state;
|
|
9
|
+
!createProvider && (0, vue_1.provide)(key, native ? context : provideData);
|
|
10
|
+
return {
|
|
11
|
+
state
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
exports.createContext = createContext;
|
|
15
|
+
function useContext(key = Symbol(), defaultValue) {
|
|
16
|
+
return (0, vue_1.inject)(key, defaultValue || {});
|
|
17
|
+
}
|
|
18
|
+
exports.useContext = useContext;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTextOverflow = void 0;
|
|
4
|
+
const vue_1 = require("vue");
|
|
5
|
+
function useTextOverflow(componentsName) {
|
|
6
|
+
const isOverflowed = (0, vue_1.ref)(false);
|
|
7
|
+
function checkOverflowCustom(node) {
|
|
8
|
+
switch (componentsName) {
|
|
9
|
+
case 'RxSelectPlus':
|
|
10
|
+
const textElement = node.getElementsByClassName('el-input__inner')[0];
|
|
11
|
+
isOverflowed.value = textElement.scrollWidth > textElement.offsetWidth;
|
|
12
|
+
break;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return { isOverflowed, checkOverflowCustom };
|
|
16
|
+
}
|
|
17
|
+
exports.useTextOverflow = useTextOverflow;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withInstall = void 0;
|
|
4
|
+
const withInstall = (comp) => {
|
|
5
|
+
;
|
|
6
|
+
comp.install = function (app) {
|
|
7
|
+
app.component(comp.name, comp);
|
|
8
|
+
};
|
|
9
|
+
return comp;
|
|
10
|
+
};
|
|
11
|
+
exports.withInstall = withInstall;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rx-compo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.54",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
"author": "",
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"
|
|
14
|
+
"@vueuse/core": "^10.2.1",
|
|
15
|
+
"element-plus": "^2.3.7",
|
|
16
|
+
"uuid": "^9.0.0"
|
|
15
17
|
}
|
|
16
18
|
}
|