ranui 0.1.9 → 0.1.10-alpha.2
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/_commonjs-dynamic-modules-DLbDWi6a.js +12 -0
- package/dist/arrow-down-D4qr4m33.js +30 -0
- package/dist/button.js +7 -0
- package/dist/checkbox.js +7 -0
- package/dist/colorpicker.js +13 -0
- package/dist/{colz-746223ab.js → colz-CRDozfZA.js} +1 -5
- package/dist/content.js +6 -0
- package/dist/docx-CChZ5Ycr.js +3665 -0
- package/dist/global-DOOKQmNv.js +4 -0
- package/dist/icon.js +6 -0
- package/dist/iconShadowless.js +6 -0
- package/dist/image.js +4 -0
- package/dist/index-01Qfd9QI.js +207 -0
- package/dist/{index-2d16a084.js → index-B2yRe66F.js} +8 -10
- package/dist/{index-3cf72afd.js → index-B4bfIbdI.js} +9 -23
- package/dist/{index-458debf7.js → index-BF8tJ6rR.js} +7 -31
- package/dist/{index-7b8840f9.js → index-BHmWrPCW.js} +223 -1011
- package/dist/{index-e03d23e7.js → index-BpOERe9M.js} +1 -1
- package/dist/{index-e2e5d725.js → index-ByBbFhvo.js} +123 -323
- package/dist/index-C-p_Wpit.js +103 -0
- package/dist/{index-b7790662.js → index-C1x9Popy.js} +1 -1
- package/dist/index-C6wPL-2Y.js +298 -0
- package/dist/{index-1048a998.js → index-CFnsLnrb.js} +68 -19
- package/dist/{index-57492b9b.js → index-CSnBqUsQ.js} +48 -1
- package/dist/index-CWWI8SHO.js +206 -0
- package/dist/index-Cbp6LrE5.js +501 -0
- package/dist/index-CbyMC6Yz.js +59 -0
- package/dist/index-Cr9AYoGT.js +498 -0
- package/dist/index-DLB8VOy7.js +281 -0
- package/dist/index-DRWOSfdF.js +521 -0
- package/dist/{index-4443363f.js → index-DRi1ylHx.js} +29 -50
- package/dist/index-Dapt713u.js +65624 -0
- package/dist/{index-7216d6b0.js → index-DqtzBqPN.js} +11 -29
- package/dist/{index-1b73beee.js → index-DsIUhdNt.js} +55 -90
- package/dist/{index-01b17e26.js → index-Du-Biu-I.js} +1 -1
- package/dist/{index-0d5b9435.js → index-DytfjwBV.js} +2 -2
- package/dist/index.js +25 -19
- package/dist/info-circle-fill-CFeVMdci.js +4 -0
- package/dist/input.js +6 -0
- package/dist/inputShadowless.js +6 -0
- package/dist/jszip.min-DD9Dc6z4.js +2674 -0
- package/dist/loading.js +6 -0
- package/dist/message.js +5 -0
- package/dist/modal.js +4 -0
- package/dist/{components/option/index.js → option.js} +3 -6
- package/dist/{pdf-bdb7818a.js → pdf-DpNqCylD.js} +12 -4
- package/dist/player.js +8 -0
- package/dist/popover.js +6 -0
- package/dist/preview.js +7 -0
- package/dist/progress.js +7 -0
- package/dist/radar.js +6 -0
- package/dist/select.js +10 -0
- package/dist/selectShadowless.js +10 -0
- package/dist/shadowless/shadowless/index.js +14 -0
- package/dist/skeleton.js +4 -0
- package/dist/sprite-CH2zLtZy.js +141 -0
- package/dist/style.css +1 -1
- package/dist/tab.js +6 -0
- package/dist/tabpane.js +4 -0
- package/dist/tsconfig.json +29 -0
- package/dist/umd/index.umd.cjs +21 -32
- package/dist/umd/shadowless/shadowless.umd.cjs +1 -0
- package/dist/umd/shadowless/style.css +1 -0
- package/dist/umd/style.css +1 -1
- package/dist/utils-74Icp-PI.js +541 -0
- package/package.json +54 -24
- package/readme.md +18 -14
- package/typings.d.ts +101 -0
- package/dist/build/config.d.ts +0 -3
- package/dist/build/config.es.d.ts +0 -2
- package/dist/build/config.umd.d.ts +0 -2
- package/dist/components/button/index.d.ts +0 -35
- package/dist/components/button/index.js +0 -8
- package/dist/components/form/index.d.ts +0 -2
- package/dist/components/icon/index.d.ts +0 -2
- package/dist/components/icon/index.js +0 -6
- package/dist/components/image/index.d.ts +0 -2
- package/dist/components/image/index.js +0 -4
- package/dist/components/input/index.d.ts +0 -185
- package/dist/components/input/index.js +0 -6
- package/dist/components/message/index.d.ts +0 -14
- package/dist/components/message/index.js +0 -4
- package/dist/components/modal/index.d.ts +0 -2
- package/dist/components/modal/index.js +0 -4
- package/dist/components/option/index.d.ts +0 -2
- package/dist/components/player/index.d.ts +0 -213
- package/dist/components/player/index.js +0 -12
- package/dist/components/preview/colz.d.ts +0 -72
- package/dist/components/preview/docx.d.ts +0 -8
- package/dist/components/preview/excel/excel.d.ts +0 -2
- package/dist/components/preview/excel/index.d.ts +0 -1
- package/dist/components/preview/excel/media.d.ts +0 -37
- package/dist/components/preview/index.d.ts +0 -6
- package/dist/components/preview/index.js +0 -8
- package/dist/components/preview/pdf.d.ts +0 -1
- package/dist/components/preview/pptx/index.d.ts +0 -16
- package/dist/components/preview/pptx/process_pptx.d.ts +0 -23
- package/dist/components/preview/pptx/t_xml.d.ts +0 -1
- package/dist/components/preview/pptx/worker.d.ts +0 -1
- package/dist/components/progress/index.d.ts +0 -36
- package/dist/components/progress/index.js +0 -8
- package/dist/components/radar/index.d.ts +0 -2
- package/dist/components/radar/index.js +0 -7
- package/dist/components/scratch/index.d.ts +0 -19
- package/dist/components/select/index.d.ts +0 -105
- package/dist/components/select/index.js +0 -11
- package/dist/components/skeleton/index.d.ts +0 -2
- package/dist/components/skeleton/index.js +0 -4
- package/dist/components/tab/index.d.ts +0 -408
- package/dist/components/tab/index.js +0 -7
- package/dist/components/tabpane/index.d.ts +0 -352
- package/dist/components/tabpane/index.js +0 -4
- package/dist/docx-c5d02d8c.js +0 -21
- package/dist/index-73ce455b.js +0 -264
- package/dist/index-7913ec46.js +0 -239
- package/dist/index-c14450a9.js +0 -662
- package/dist/index.d.ts +0 -14
- package/dist/info-circle-fill-90ec9aa9.js +0 -14
- package/dist/playwright.config.d.ts +0 -9
- package/dist/plugins/auto-import-file.d.ts +0 -0
- package/dist/plugins/load-style.d.ts +0 -6
- package/dist/plugins/load-svg.d.ts +0 -9
- package/dist/tests/button.spec.d.ts +0 -1
- package/dist/umd/build/config.d.ts +0 -3
- package/dist/umd/build/config.es.d.ts +0 -2
- package/dist/umd/build/config.umd.d.ts +0 -2
- package/dist/umd/components/button/index.d.ts +0 -35
- package/dist/umd/components/form/index.d.ts +0 -2
- package/dist/umd/components/icon/index.d.ts +0 -2
- package/dist/umd/components/image/index.d.ts +0 -2
- package/dist/umd/components/input/index.d.ts +0 -185
- package/dist/umd/components/message/index.d.ts +0 -14
- package/dist/umd/components/modal/index.d.ts +0 -2
- package/dist/umd/components/option/index.d.ts +0 -2
- package/dist/umd/components/player/index.d.ts +0 -213
- package/dist/umd/components/preview/colz.d.ts +0 -72
- package/dist/umd/components/preview/docx.d.ts +0 -8
- package/dist/umd/components/preview/excel/excel.d.ts +0 -2
- package/dist/umd/components/preview/excel/index.d.ts +0 -1
- package/dist/umd/components/preview/excel/media.d.ts +0 -37
- package/dist/umd/components/preview/index.d.ts +0 -6
- package/dist/umd/components/preview/pdf.d.ts +0 -1
- package/dist/umd/components/preview/pptx/index.d.ts +0 -16
- package/dist/umd/components/preview/pptx/process_pptx.d.ts +0 -23
- package/dist/umd/components/preview/pptx/t_xml.d.ts +0 -1
- package/dist/umd/components/preview/pptx/worker.d.ts +0 -1
- package/dist/umd/components/progress/index.d.ts +0 -36
- package/dist/umd/components/radar/index.d.ts +0 -2
- package/dist/umd/components/scratch/index.d.ts +0 -19
- package/dist/umd/components/select/index.d.ts +0 -105
- package/dist/umd/components/skeleton/index.d.ts +0 -2
- package/dist/umd/components/tab/index.d.ts +0 -408
- package/dist/umd/components/tabpane/index.d.ts +0 -352
- package/dist/umd/index.d.ts +0 -14
- package/dist/umd/playwright.config.d.ts +0 -9
- package/dist/umd/plugins/auto-import-file.d.ts +0 -0
- package/dist/umd/plugins/load-style.d.ts +0 -6
- package/dist/umd/plugins/load-svg.d.ts +0 -9
- package/dist/umd/tests/button.spec.d.ts +0 -1
- package/dist/umd/utils/image.d.ts +0 -32
- package/dist/umd/utils/index.d.ts +0 -64
- package/dist/umd/utils/math.d.ts +0 -26
- package/dist/umd/utils/tween.d.ts +0 -21
- package/dist/umd/vite.config.d.ts +0 -6
- package/dist/utils/image.d.ts +0 -32
- package/dist/utils/index.d.ts +0 -64
- package/dist/utils/math.d.ts +0 -26
- package/dist/utils/tween.d.ts +0 -21
- package/dist/vendor-f71e6f68.js +0 -92126
- package/dist/vite.config.d.ts +0 -6
- /package/dist/{add-user-b2bed3e7.js → add-user-BN1JlY7e.js} +0 -0
- /package/dist/{book-b11a68eb.js → book-nTEFXU2x.js} +0 -0
- /package/dist/{check-circle-fill-dc284144.js → check-circle-fill-B_pd8ZSs.js} +0 -0
- /package/dist/{check-circle-74bd09c3.js → check-circle-szyAJiap.js} +0 -0
- /package/dist/{close-20925345.js → close-CFnkhudp.js} +0 -0
- /package/dist/{close-circle-720c18be.js → close-circle-CwmuN2C6.js} +0 -0
- /package/dist/{close-circle-fill-238a66b1.js → close-circle-fill-jSqPPw9i.js} +0 -0
- /package/dist/{eye-5e742329.js → eye-D_mEt17f.js} +0 -0
- /package/dist/{eye-close-3874f1ae.js → eye-close-BVr3NJtg.js} +0 -0
- /package/dist/{home-c4a05e8b.js → home-BUQ4USMk.js} +0 -0
- /package/dist/{index-8e1e2573.js → index-CQTJoWhb.js} +0 -0
- /package/dist/{info-circle-5826decc.js → info-circle-COnL5bTJ.js} +0 -0
- /package/dist/{loading-09ca52df.js → loading-Dcc5RApI.js} +0 -0
- /package/dist/{lock-1d2487c9.js → lock-Cr7BnmWN.js} +0 -0
- /package/dist/{message-b2bfdea7.js → message-D36_Zo2l.js} +0 -0
- /package/dist/{power-off-6ade5a91.js → power-off-lQRbiBak.js} +0 -0
- /package/dist/{preview-b291aea8.js → preview-CJbz9GjO.js} +0 -0
- /package/dist/{setting-1e5ccb6d.js → setting-DemlgzVC.js} +0 -0
- /package/dist/{team-ca6a12e1.js → team-tl4NJXPC.js} +0 -0
- /package/dist/{unlock-f56086fd.js → unlock-CeU74z9n.js} +0 -0
- /package/dist/{user-5c01e665.js → user-B-eVXwuk.js} +0 -0
- /package/dist/{warning-circle-035e025c.js → warning-circle-DDUgEDIv.js} +0 -0
- /package/dist/{warning-circle-fill-d17c37c9.js → warning-circle-fill-lODUKz0i.js} +0 -0
package/readme.md
CHANGED
|
@@ -7,14 +7,18 @@ UI Component library based on `Web Component`
|
|
|
7
7
|
<a href="https://github.com/chaxus/ran"><img src="https://img.shields.io/github/actions/workflow/status/chaxus/ran/ci.yml" alt="Build Status"></a>
|
|
8
8
|
<a href="https://github.com/chaxus/ran"><img src="https://img.shields.io/npm/v/ranui.svg" alt="npm-v"></a>
|
|
9
9
|
<a href="https://github.com/chaxus/ran"><img src="https://img.shields.io/npm/dt/ranui.svg" alt="npm-d"></a>
|
|
10
|
-
<a href="https://github.com/chaxus/ran"><img src="https://img.badgesize.io/https:/unpkg.com/ranui/dist/umd/
|
|
10
|
+
<a href="https://github.com/chaxus/ran"><img src="https://img.badgesize.io/https:/unpkg.com/ranui/dist/umd/shadowless/shadowless.umd.cjs?label=brotli&compression=brotli" alt="brotli"></a>
|
|
11
11
|
<a href="https://github.com/chaxus/ran"><img src="https://img.shields.io/badge/module%20formats-umd%2C%20esm-green.svg" alt="module formats: umd, esm"></a>
|
|
12
12
|
|
|
13
13
|
## Feature
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
1. **High Cross-Framework Compatibility**: Our solution seamlessly adapts to a wide array of leading front-end frameworks, including `React`, `Vue`, `Preact`, `SolidJS`, `Svelte`, and more. It also integrates smoothly with any project built on `JavaScript` and adhering to `W3C` standards. No matter your choice of technology stack, we guarantee consistent and reliable support.
|
|
16
|
+
2. **Pure Native Experience**: Our solution eliminates the need for dependencies on front-end frameworks like `npm`, `React`/`Vue`, or complex build tools such as `webpack`/`vite`. It truly embodies the essence of Web technology. You can get started effortlessly, just like manipulating native `div` tags, immediately experiencing the purity and intuitiveness of the technology. This design not only simplifies project structure but also reduces the cost of learning and usage, enabling every developer to appreciate the native charm of Web technology.
|
|
17
|
+
3. **Ultimate Modular Design**: Utilizing the principle of minimal modularization, we carefully dismantle large and complex systems or applications into extremely small, functionally independent, and easily reusable component units. This approach significantly enhances code maintainability, scalability, and reusability.
|
|
18
|
+
4. **Fully Open-Source for Free Learning**: Our project fully adheres to the `MIT` open-source license, granting unrestricted access to all source code. This means you are free to access, learn from, reference, and even modify our code, whether for personal development or commercial applications. We firmly believe that open-source is a vital pathway for technological advancement and innovation.
|
|
19
|
+
5. **Interactive and Comprehensive Documentation**: We provide detailed and highly interactive documentation, where all component examples are live and interactive. This allows you to directly experience the component functionality while reading, deepening your understanding and enabling quick hands-on learning. This design is aimed at providing you with the most intuitive and efficient learning experience possible.
|
|
20
|
+
6. **Type-Checking Support**: Our development environment is fully built on `TypeScript`, equipped with comprehensive declaration files and type definitions, ensuring smooth integration for both `JavaScript` and `TypeScript` projects. With powerful type-checking capabilities, we significantly enhance code readability, maintainability, and project robustness, bringing unprecedented convenience and peace of mind to development work.
|
|
21
|
+
7. **Enhanced Durability and Stability**: Our solution offers exceptional stability, eliminating concerns about disruptive updates encountered during version upgrades, such as `React` from version `15` to `16` (with `fiber`) or `Vue` from version `2` to `3` (with `hooks`). We ensure that your components won't be forced into unnecessary updates or redevelopments, thus avoiding potential project interruptions and additional workloads. This translates into a continuous and hassle-free project operation.
|
|
18
22
|
|
|
19
23
|
## Install
|
|
20
24
|
|
|
@@ -28,6 +32,10 @@ npm install ranui --save
|
|
|
28
32
|
|
|
29
33
|
[See components and use examples](https://chaxus.github.io/ran/src/ranui/)
|
|
30
34
|
|
|
35
|
+
## Example
|
|
36
|
+
|
|
37
|
+
<https://github.com/chaxus/ran/blob/main/packages/ranui/index.html>
|
|
38
|
+
|
|
31
39
|
## Import
|
|
32
40
|
|
|
33
41
|
Support for on-demand import, which can reduce the size of loaded js
|
|
@@ -188,16 +196,8 @@ interface RPreview {
|
|
|
188
196
|
|
|
189
197
|
declare namespace JSX {
|
|
190
198
|
interface IntrinsicElements {
|
|
191
|
-
'r-preview': React.DetailedHTMLProps<
|
|
192
|
-
|
|
193
|
-
HTMLDivElement
|
|
194
|
-
> &
|
|
195
|
-
RPreview;
|
|
196
|
-
'r-button': React.DetailedHTMLProps<
|
|
197
|
-
React.HTMLAttributes<HTMLDivElement>,
|
|
198
|
-
HTMLDivElement
|
|
199
|
-
> &
|
|
200
|
-
RButton;
|
|
199
|
+
'r-preview': React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & RPreview;
|
|
200
|
+
'r-button': React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & RButton;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
```
|
|
@@ -208,6 +208,10 @@ declare namespace JSX {
|
|
|
208
208
|
<img src="https://contrib.rocks/image?repo=chaxus/ran" />
|
|
209
209
|
</a>
|
|
210
210
|
|
|
211
|
+
## Visitors
|
|
212
|
+
|
|
213
|
+

|
|
214
|
+
|
|
211
215
|
## Meta
|
|
212
216
|
|
|
213
217
|
[LICENSE (MIT)](/LICENSE)
|
package/typings.d.ts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
declare module '*.less';
|
|
2
|
+
declare module '*.less?inline';
|
|
3
|
+
declare module '*.ts';
|
|
4
|
+
declare module '*.svg';
|
|
5
|
+
declare module 'docx-preview';
|
|
6
|
+
declare module 'exceljs/*';
|
|
7
|
+
declare module '@/assets/*';
|
|
8
|
+
declare module '@/components/*';
|
|
9
|
+
declare module '@/plugins/*';
|
|
10
|
+
declare module '@/utils/*';
|
|
11
|
+
declare module 'ranuts/*';
|
|
12
|
+
|
|
13
|
+
declare namespace Ran {
|
|
14
|
+
interface Prompt {
|
|
15
|
+
content: string;
|
|
16
|
+
duration?: number;
|
|
17
|
+
close?: () => void;
|
|
18
|
+
}
|
|
19
|
+
type Hint = (options: Prompt | string) => void;
|
|
20
|
+
|
|
21
|
+
interface Message {
|
|
22
|
+
info: Hint;
|
|
23
|
+
success: Hint;
|
|
24
|
+
error: Hint;
|
|
25
|
+
warning: Hint;
|
|
26
|
+
toast: Hint;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface Ranui {
|
|
31
|
+
message: Partial<Ran.Message>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface HlsPlayer {
|
|
35
|
+
off: (s: string, f: Function) => void;
|
|
36
|
+
on: (s: string, f: Function) => void;
|
|
37
|
+
loadSource: (s: string) => void;
|
|
38
|
+
attachMedia: (v: HTMLVideoElement) => void;
|
|
39
|
+
destroy: () => void;
|
|
40
|
+
startLoad(): () => void;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface Hls {
|
|
44
|
+
Events: {
|
|
45
|
+
MANIFEST_LOADED: 'hlsManifestLoaded';
|
|
46
|
+
ERROR: 'error';
|
|
47
|
+
};
|
|
48
|
+
isSupported: () => boolean;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
type HLS = Hls & (new () => HlsPlayer);
|
|
52
|
+
|
|
53
|
+
interface Viewport {
|
|
54
|
+
width: number;
|
|
55
|
+
height: number;
|
|
56
|
+
viewBox: Array<number>;
|
|
57
|
+
}
|
|
58
|
+
interface RenderContext {
|
|
59
|
+
canvasContext: CanvasRenderingContext2D | null;
|
|
60
|
+
transform: Array<number>;
|
|
61
|
+
viewport: Viewport;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface PDFPageProxy {
|
|
65
|
+
pageNumber: number;
|
|
66
|
+
getViewport: () => Viewport;
|
|
67
|
+
render: (options: RenderContext) => void;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface PDFDocumentProxy {
|
|
71
|
+
numPages: number;
|
|
72
|
+
getPage: (x: number) => Promise<PDFPageProxy>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
interface HTMLElement {
|
|
76
|
+
mozRequestFullScreen: (options?: FullscreenOptions) => Promise<void>;
|
|
77
|
+
msRequestFullscreen: (options?: FullscreenOptions) => Promise<void>;
|
|
78
|
+
oRequestFullscreen: (options?: FullscreenOptions) => Promise<void>;
|
|
79
|
+
webkitRequestFullscreen: (options?: FullscreenOptions) => Promise<void>;
|
|
80
|
+
webkitEnterFullscreen: (options?: FullscreenOptions) => Promise<void>;
|
|
81
|
+
}
|
|
82
|
+
declare interface Document {
|
|
83
|
+
msExitFullscreen: () => Promise<void>;
|
|
84
|
+
mozCancelFullScreen: () => Promise<void>;
|
|
85
|
+
oCancelFullScreen: () => Promise<void>;
|
|
86
|
+
webkitExitFullscreen: () => Promise<void>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
declare interface Window {
|
|
90
|
+
ranui: Partial<Ranui>;
|
|
91
|
+
message: Partial<Ran.Message>;
|
|
92
|
+
pdfjsLib: {
|
|
93
|
+
GlobalWorkerOptions: {
|
|
94
|
+
workerSrc: string;
|
|
95
|
+
};
|
|
96
|
+
getDocument: (x: string | ArrayBuffer) => {
|
|
97
|
+
promise: Promise<PDFDocumentProxy>;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
Hls: HLS;
|
|
101
|
+
}
|
package/dist/build/config.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
}
|
|
34
|
-
declare const _default: import('../../utils/index').CustomErrorType;
|
|
35
|
-
export default _default;
|
|
@@ -1,185 +0,0 @@
|
|
|
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
|
-
}
|
|
184
|
-
declare const _default: import('../../utils/index').CustomErrorType;
|
|
185
|
-
export default _default;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare const message: {
|
|
2
|
-
info: (options: Ran.Prompt | string | undefined | null) => void;
|
|
3
|
-
success: (options: Ran.Prompt | string | undefined | null) => void;
|
|
4
|
-
error: (options: Ran.Prompt | string | undefined | null) => void;
|
|
5
|
-
warning: (options: Ran.Prompt | string | undefined | null) => void;
|
|
6
|
-
toast: (options: Ran.Prompt | string | undefined | null) => void;
|
|
7
|
-
} | {
|
|
8
|
-
info?: undefined;
|
|
9
|
-
success?: undefined;
|
|
10
|
-
error?: undefined;
|
|
11
|
-
warning?: undefined;
|
|
12
|
-
toast?: undefined;
|
|
13
|
-
};
|
|
14
|
-
export default message;
|