ranui 0.1.8 → 0.1.9
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/dist/components/button/index.d.ts +33 -0
- package/dist/components/button/index.js +3 -2
- package/dist/components/icon/index.js +2 -2
- package/dist/components/image/index.js +1 -1
- package/dist/components/input/index.d.ts +183 -0
- package/dist/components/input/index.js +2 -1
- package/dist/components/message/index.js +1 -1
- package/dist/components/option/index.js +1 -1
- package/dist/components/player/index.d.ts +179 -490
- package/dist/components/player/index.js +6 -5
- package/dist/components/preview/index.js +4 -4
- package/dist/components/progress/index.js +2 -2
- package/dist/components/radar/index.js +2 -2
- package/dist/components/scratch/index.d.ts +19 -0
- package/dist/components/select/index.d.ts +5 -1
- package/dist/components/select/index.js +4 -4
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/tab/index.d.ts +5 -0
- package/dist/components/tab/index.js +2 -2
- package/dist/components/tabpane/index.d.ts +5 -0
- package/dist/components/tabpane/index.js +1 -1
- package/dist/{index-aea75a9f.js → index-01b17e26.js} +1 -1
- package/dist/{index-48653b79.js → index-0d5b9435.js} +1 -1
- package/dist/index-1048a998.js +447 -0
- package/dist/{index-f6d6982d.js → index-1b73beee.js} +65 -13
- package/dist/index-2d16a084.js +197 -0
- package/dist/{index-0e7229ea.js → index-3cf72afd.js} +8 -6
- package/dist/{index-a43b144f.js → index-4443363f.js} +1 -1
- package/dist/{index-a1a53af6.js → index-458debf7.js} +2 -2
- package/dist/{index-7f513a14.js → index-7216d6b0.js} +2 -2
- package/dist/index-73ce455b.js +264 -0
- package/dist/{index-d2d69b06.js → index-7913ec46.js} +27 -13
- package/dist/{index-5975bbc0.js → index-b7790662.js} +1 -1
- package/dist/{index-a216f328.js → index-c14450a9.js} +1 -1
- package/dist/{index-b90299ca.js → index-e03d23e7.js} +1 -1
- package/dist/{index-b2be6bef.js → index-e2e5d725.js} +1087 -1069
- package/dist/index.js +15 -15
- package/dist/style.css +1 -1
- package/dist/umd/components/button/index.d.ts +33 -0
- package/dist/umd/components/input/index.d.ts +183 -0
- package/dist/umd/components/player/index.d.ts +179 -490
- package/dist/umd/components/scratch/index.d.ts +19 -0
- package/dist/umd/components/select/index.d.ts +5 -1
- package/dist/umd/components/tab/index.d.ts +5 -0
- package/dist/umd/components/tabpane/index.d.ts +5 -0
- package/dist/umd/index.umd.cjs +6 -6
- package/dist/umd/style.css +1 -1
- package/package.json +5 -8
- package/dist/index-183517e7.js +0 -265
- package/dist/index-4d873a42.js +0 -195
- package/dist/index-ecaed5cc.js +0 -439
|
@@ -1,2 +1,35 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export declare class Button extends HTMLElement {
|
|
3
|
+
_btn: HTMLDivElement;
|
|
4
|
+
_btnContent: HTMLDivElement;
|
|
5
|
+
_iconElement?: HTMLElement;
|
|
6
|
+
_slot: HTMLSlotElement;
|
|
7
|
+
_shadowDom: ShadowRoot;
|
|
8
|
+
debounceTimeId?: NodeJS.Timeout;
|
|
9
|
+
static get observedAttributes(): string[];
|
|
10
|
+
constructor();
|
|
11
|
+
get sheet(): string;
|
|
12
|
+
set sheet(value: string);
|
|
13
|
+
get disabled(): boolean | string;
|
|
14
|
+
set disabled(value: boolean | string | undefined | null);
|
|
15
|
+
get iconSize(): string;
|
|
16
|
+
set iconSize(value: string | undefined | null);
|
|
17
|
+
get icon(): string;
|
|
18
|
+
set icon(value: string | null);
|
|
19
|
+
get effect(): string;
|
|
20
|
+
set effect(value: string | null);
|
|
21
|
+
/**
|
|
22
|
+
* @description: 设置button的icon
|
|
23
|
+
* @return {*}
|
|
24
|
+
*/
|
|
25
|
+
setIcon: () => void;
|
|
26
|
+
mousedown: (event: MouseEvent) => void;
|
|
27
|
+
mouseup: (event: MouseEvent) => void;
|
|
28
|
+
debounceMouseEvent: () => void;
|
|
29
|
+
handlerExternalCss: () => void;
|
|
30
|
+
connectedCallback(): void;
|
|
31
|
+
disconnectCallback(): void;
|
|
32
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
33
|
+
}
|
|
1
34
|
declare const _default: import('../../utils/index').CustomErrorType;
|
|
2
35
|
export default _default;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { a } from "../../index-
|
|
2
|
-
import "../../index-
|
|
1
|
+
import { B, a } from "../../index-2d16a084.js";
|
|
2
|
+
import "../../index-7913ec46.js";
|
|
3
3
|
import "../../index-57492b9b.js";
|
|
4
4
|
import "../../vendor-f71e6f68.js";
|
|
5
5
|
export {
|
|
6
|
+
B as Button,
|
|
6
7
|
a as default
|
|
7
8
|
};
|
|
@@ -1,2 +1,185 @@
|
|
|
1
|
+
export declare class Input extends HTMLElement {
|
|
2
|
+
static get observedAttributes(): string[];
|
|
3
|
+
_input: HTMLDivElement;
|
|
4
|
+
_label: HTMLLabelElement | undefined;
|
|
5
|
+
_inputContent: HTMLInputElement;
|
|
6
|
+
_icon: HTMLElement | undefined;
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* @description: 获取input的值
|
|
10
|
+
* @return {String}
|
|
11
|
+
*/
|
|
12
|
+
get value(): string | null;
|
|
13
|
+
/**
|
|
14
|
+
* @description: 设置input的值
|
|
15
|
+
* @param {String} value
|
|
16
|
+
*/
|
|
17
|
+
set value(value: string);
|
|
18
|
+
/**
|
|
19
|
+
* @description: 获取input的占位字符
|
|
20
|
+
* @return {String}
|
|
21
|
+
*/
|
|
22
|
+
get placeholder(): string | null;
|
|
23
|
+
/**
|
|
24
|
+
* @description: 设置input的占位字符
|
|
25
|
+
* @param {String} value
|
|
26
|
+
*/
|
|
27
|
+
set placeholder(value: string);
|
|
28
|
+
/**
|
|
29
|
+
* @description: input是否为必选
|
|
30
|
+
* @return {String}
|
|
31
|
+
*/
|
|
32
|
+
get required(): string | null;
|
|
33
|
+
/**
|
|
34
|
+
* @description: 设置input是否为必选,除非设置成false,否则都是必填
|
|
35
|
+
* @param {*} value
|
|
36
|
+
*/
|
|
37
|
+
set required(value: string);
|
|
38
|
+
/**
|
|
39
|
+
* @description: 获取input上disabled属性
|
|
40
|
+
* @return {String | null}
|
|
41
|
+
*/
|
|
42
|
+
get disabled(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* @description: 设置input的disabled属性
|
|
45
|
+
* @param {String} value
|
|
46
|
+
*/
|
|
47
|
+
set disabled(value: string);
|
|
48
|
+
/**
|
|
49
|
+
* @description: 获取类似于Metiral Design的输入体验。
|
|
50
|
+
*/
|
|
51
|
+
get label(): string;
|
|
52
|
+
/**
|
|
53
|
+
* @description: 设置类似于Metiral Design的输入体验。
|
|
54
|
+
*/
|
|
55
|
+
set label(value: string);
|
|
56
|
+
/**
|
|
57
|
+
* @description: 获取input框的状态
|
|
58
|
+
*/
|
|
59
|
+
get status(): string;
|
|
60
|
+
/**
|
|
61
|
+
* @description: 设置input框的状态
|
|
62
|
+
*/
|
|
63
|
+
set status(value: string);
|
|
64
|
+
/**
|
|
65
|
+
* @description: 与form组件联动时,收集的属性名
|
|
66
|
+
* @return {String}
|
|
67
|
+
*/
|
|
68
|
+
get name(): string;
|
|
69
|
+
/**
|
|
70
|
+
* @description: 设置name属性
|
|
71
|
+
* @param {string} value
|
|
72
|
+
*/
|
|
73
|
+
set name(value: string);
|
|
74
|
+
/**
|
|
75
|
+
* @description: 当input类型为number类型时,可以获取min属性
|
|
76
|
+
* @return {String}
|
|
77
|
+
*/
|
|
78
|
+
get min(): string;
|
|
79
|
+
/**
|
|
80
|
+
* @description: 当input类型为number类型时,设置min属性
|
|
81
|
+
* @param {string} value
|
|
82
|
+
*/
|
|
83
|
+
set min(value: string);
|
|
84
|
+
/**
|
|
85
|
+
* @description: 当input类型为number类型时,可以获取max属性
|
|
86
|
+
* @return {String}
|
|
87
|
+
*/
|
|
88
|
+
get max(): string;
|
|
89
|
+
/**
|
|
90
|
+
* @description: 当input类型为number类型时,设置max属性
|
|
91
|
+
* @param {string} value
|
|
92
|
+
*/
|
|
93
|
+
set max(value: string);
|
|
94
|
+
/**
|
|
95
|
+
* @description: 当input类型为number类型时,可以获取step属性
|
|
96
|
+
* @return {String}
|
|
97
|
+
*/
|
|
98
|
+
get step(): string;
|
|
99
|
+
/**
|
|
100
|
+
* @description: 当input类型为number类型时,设置step属性
|
|
101
|
+
* @param {string} value
|
|
102
|
+
*/
|
|
103
|
+
set step(value: string);
|
|
104
|
+
/**
|
|
105
|
+
* @description: 获取一个icon
|
|
106
|
+
* @return {String}
|
|
107
|
+
*/
|
|
108
|
+
get icon(): string | null;
|
|
109
|
+
/**
|
|
110
|
+
* @description: 设置icon来表示标识
|
|
111
|
+
* @param {string|null} value
|
|
112
|
+
*/
|
|
113
|
+
set icon(value: string);
|
|
114
|
+
/**
|
|
115
|
+
* @description: 获取input的类型
|
|
116
|
+
* @return {string|null}
|
|
117
|
+
*/
|
|
118
|
+
get type(): string | null;
|
|
119
|
+
/**
|
|
120
|
+
* @description: 设置input的类型
|
|
121
|
+
* @param {string|null} value
|
|
122
|
+
*/
|
|
123
|
+
set type(value: string);
|
|
124
|
+
/**
|
|
125
|
+
* @description: 原生的input方法
|
|
126
|
+
* @param {Event} event
|
|
127
|
+
*/
|
|
128
|
+
customInput: (event: Event) => void;
|
|
129
|
+
/**
|
|
130
|
+
* @description: 增加change方法,同时兼容大小写的情况
|
|
131
|
+
*/
|
|
132
|
+
customChange: () => void;
|
|
133
|
+
/**
|
|
134
|
+
* @description: 监听placeholder属性函数
|
|
135
|
+
* @param {string} name
|
|
136
|
+
* @param {string} value
|
|
137
|
+
*/
|
|
138
|
+
listenPlaceholder: (name: string, value: string) => void;
|
|
139
|
+
/**
|
|
140
|
+
* @description: 监听label属性函数
|
|
141
|
+
* @param {string} name
|
|
142
|
+
* @param {string} value
|
|
143
|
+
*/
|
|
144
|
+
listenLabel: (name: string, value: string) => void;
|
|
145
|
+
/**
|
|
146
|
+
* @description: 监听type属性
|
|
147
|
+
* @param {string} name
|
|
148
|
+
* @param {string} value
|
|
149
|
+
*/
|
|
150
|
+
listenType: (name: string, value: string) => void;
|
|
151
|
+
/**
|
|
152
|
+
* @description: 监听status属性
|
|
153
|
+
* @param {string} name
|
|
154
|
+
* @param {string} value
|
|
155
|
+
*/
|
|
156
|
+
listenStatus: (name: string, value: string) => void;
|
|
157
|
+
/**
|
|
158
|
+
* @description: 监听disabled属性
|
|
159
|
+
* @param {string} name
|
|
160
|
+
* @param {string} value
|
|
161
|
+
*/
|
|
162
|
+
listenDisabled: (name: string, value: string) => void;
|
|
163
|
+
/**
|
|
164
|
+
* @description: 监听icon属性
|
|
165
|
+
* @param {string} name
|
|
166
|
+
* @param {string} value
|
|
167
|
+
*/
|
|
168
|
+
listenIcon: (name: string, value: string, oldValue: string) => void;
|
|
169
|
+
/**
|
|
170
|
+
* @description: 处理icon属性的问题
|
|
171
|
+
*/
|
|
172
|
+
dealIcon: () => void;
|
|
173
|
+
/**
|
|
174
|
+
* @description: 聚合监听事件
|
|
175
|
+
* @param {string} name
|
|
176
|
+
* @param {string} oldValue
|
|
177
|
+
* @param {string} newValue
|
|
178
|
+
*/
|
|
179
|
+
listenEvent: (name: string, oldValue: string, newValue: string) => void;
|
|
180
|
+
connectedCallback(): void;
|
|
181
|
+
disconnectCallback(): void;
|
|
182
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
183
|
+
}
|
|
1
184
|
declare const _default: import('../../utils/index').CustomErrorType;
|
|
2
185
|
export default _default;
|
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import { c as createCustomError, i as isDisabled } from "../../index-57492b9b.js";
|
|
8
|
-
const f7170ee498e0dd32cbdcb63fba8f75cc = '@keyframes ranui-select-dropdown-down-in{0%{transform:scaleY(.8);transform-origin:100% 100%;opacity:0}to{transform:scaleY(1);transform-origin:100% 100%;opacity:1}}@keyframes ranui-select-dropdown-down-out{0%{transform:scaleY(1);transform-origin:100% 100%;opacity:1}to{transform:scaleY(.8);transform-origin:100% 100%;opacity:0}}@keyframes ranui-select-dropdown-up-in{0%{transform:scaleY(.8);transform-origin:0% 0%;opacity:0}to{transform:scaleY(1);transform-origin:0% 0%;opacity:1}}@keyframes ranui-select-dropdown-up-out{0%{transform:scaleY(1);transform-origin:0% 0%;opacity:1}to{transform:scaleY(.8);transform-origin:0% 0%;opacity:0}}.ran-select-dropdown-down-in{animation:ranui-select-dropdown-up-in .2s;animation-fill-mode:forwards}.ran-select-dropdown-down-out{animation:ranui-select-dropdown-up-out .2s;animation-fill-mode:forwards}.ran-select-dropdown-up-in{animation:ranui-select-dropdown-down-in .2s;animation-fill-mode:forwards}.ran-select-dropdown-up-out{animation:ranui-select-dropdown-down-out .2s;animation-fill-mode:forwards}.ranui-select-dropdown{position:absolute;transform-origin:var(--ran-x, 50%) var(--ran-y, 50%);box-sizing:border-box;margin:0;padding:4px;color:#000000e0;font-size:14px;list-style:none;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";z-index:1050;overflow:hidden;font-variant:initial;background:#ffffff;border-radius:8px;outline:none;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;cursor:pointer}.ranui-select-dropdown-option-item{position:relative;display:block;padding:5px 12px;color:#000000e0;font-weight:400;font-size:14px;transition:background .3s ease;border-radius:4px}.ranui-select-dropdown-option-item:hover{background-color:#0000000a}.ranui-select-dropdown-option-item-content{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#000000e0;font-size:14px;line-height:1.57142857;box-sizing:border-box;list-style:none;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-variant:initial}.ranui-select-dropdown-option-active{background-color:#e6f7ff;font-weight:700}.ranui-select-dropdown-option-active:hover{background-color:#e6f7ff}\n';
|
|
8
|
+
const f7170ee498e0dd32cbdcb63fba8f75cc = '.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}@keyframes ranui-select-dropdown-down-in{0%{transform:scaleY(.8);transform-origin:100% 100%;opacity:0}to{transform:scaleY(1);transform-origin:100% 100%;opacity:1}}@keyframes ranui-select-dropdown-down-out{0%{transform:scaleY(1);transform-origin:100% 100%;opacity:1}to{transform:scaleY(.8);transform-origin:100% 100%;opacity:0}}@keyframes ranui-select-dropdown-up-in{0%{transform:scaleY(.8);transform-origin:0% 0%;opacity:0}to{transform:scaleY(1);transform-origin:0% 0%;opacity:1}}@keyframes ranui-select-dropdown-up-out{0%{transform:scaleY(1);transform-origin:0% 0%;opacity:1}to{transform:scaleY(.8);transform-origin:0% 0%;opacity:0}}.ran-select-dropdown-down-in{animation:ranui-select-dropdown-up-in .2s;animation-fill-mode:forwards}.ran-select-dropdown-down-out{animation:ranui-select-dropdown-up-out .2s;animation-fill-mode:forwards}.ran-select-dropdown-up-in{animation:ranui-select-dropdown-down-in .2s;animation-fill-mode:forwards}.ran-select-dropdown-up-out{animation:ranui-select-dropdown-down-out .2s;animation-fill-mode:forwards}.ranui-select-dropdown{position:absolute;transform-origin:var(--ran-x, 50%) var(--ran-y, 50%);box-sizing:border-box;margin:0;padding:4px;color:#000000e0;font-size:14px;list-style:none;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";z-index:1050;overflow:hidden;font-variant:initial;background:#ffffff;border-radius:8px;outline:none;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;cursor:pointer}.ranui-select-dropdown-option-item{position:relative;display:block;padding:5px 12px;color:#000000e0;font-weight:400;font-size:14px;transition:background .3s ease;border-radius:4px}.ranui-select-dropdown-option-item:hover{background-color:#0000000a}.ranui-select-dropdown-option-item-content{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#000000e0;font-size:14px;line-height:1.57142857;box-sizing:border-box;list-style:none;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-variant:initial}.ranui-select-dropdown-option-active{background-color:#e6f7ff;font-weight:700}.ranui-select-dropdown-option-active:hover{background-color:#e6f7ff}\n';
|
|
9
9
|
const index$1 = "";
|
|
10
10
|
function Custom() {
|
|
11
11
|
if (typeof document !== "undefined" && !customElements.get("r-option")) {
|