neko-ui 2.0.0 → 2.0.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/README.md +33 -35
- package/lib/avatar/group.d.ts +1 -1
- package/lib/avatar/index.d.ts +1 -1
- package/lib/back-top/index.d.ts +0 -1
- package/lib/basic-config/index.d.ts +0 -18
- package/lib/button/index.d.ts +1 -1
- package/lib/capture-screen/index.d.ts +0 -1
- package/lib/carousel/index.d.ts +0 -1
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/code/index.d.ts +0 -1
- package/lib/color-palette/index.d.ts +0 -1
- package/lib/color-picker/index.d.ts +1 -1
- package/lib/cron/index.d.ts +0 -1
- package/lib/cron/style.d.ts +1 -0
- package/lib/dropdown/index.d.ts +1 -1
- package/lib/empty/index.d.ts +0 -1
- package/lib/highlight-text/index.d.ts +0 -1
- package/lib/img/index.d.ts +0 -1
- package/lib/index.d.ts +2 -6
- package/lib/index.js +1 -34
- package/lib/input/index.d.ts +1 -1
- package/lib/input-number/index.d.ts +0 -1
- package/lib/md/index.d.ts +0 -1
- package/lib/menu/index.d.ts +1 -1
- package/lib/popover/index.d.ts +1 -1
- package/lib/radio/index.d.ts +1 -1
- package/lib/segmented/index.d.ts +1 -1
- package/lib/select/index.d.ts +1 -1
- package/lib/skeleton/index.d.ts +0 -1
- package/lib/spin/index.d.ts +0 -1
- package/lib/switch/index.d.ts +0 -1
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tag/index.d.ts +0 -1
- package/lib/tree/index.d.ts +1 -1
- package/lib/typography/index.d.ts +0 -1
- package/package.json +5 -5
- package/lib/pkg.tsbuildinfo +0 -1
package/README.md
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[![download][download-tag]][npm-url]
|
|
8
|
-
|
|
9
|
-
## 使用
|
|
10
|
-
|
|
11
|
-
[![neko-ui][install-tag]][npm-url]
|
|
12
|
-
|
|
1
|
+
[home-url]: https://monako97.github.io/neko-ui
|
|
2
|
+
[home-tag]: https://cdn.staticaly.com/gh/monako97/cdn/main/image/202307281703208.svg
|
|
3
|
+
[jetbrains-tag]: https://cdn.staticaly.com/gh/monako97/cdn/main/image/202307281758090.svg
|
|
4
|
+
[jetbrains-url]: https://www.jetbrains.com/?from=monako
|
|
5
|
+
[docs-url]: https://monako97.github.io/neko-ui
|
|
6
|
+
[docs-tag]: https://cdn.staticaly.com/gh/monako97/cdn/main/image/202307281701250.svg
|
|
13
7
|
[npm-url]: https://npmjs.org/package/neko-ui
|
|
14
8
|
[install-tag]: https://nodei.co/npm/neko-ui.png
|
|
15
9
|
[version-tag]: https://img.shields.io/npm/v/neko-ui/latest.svg?logo=npm
|
|
@@ -17,40 +11,44 @@
|
|
|
17
11
|
[size-url]: https://packagephobia.com/result?p=neko-ui@latest
|
|
18
12
|
[download-tag]: https://img.shields.io/npm/dm/neko-ui.svg?logo=docusign
|
|
19
13
|
|
|
20
|
-
|
|
14
|
+
# Neko UI
|
|
21
15
|
|
|
22
|
-
|
|
16
|
+
> 这是一个适用于任何技术栈的 WebComponents UI组件库
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
# or
|
|
27
|
-
yarn install
|
|
28
|
-
```
|
|
18
|
+
[![neko-ui][home-tag]][home-url]
|
|
19
|
+
[![docs-ui][docs-tag]][docs-url]
|
|
29
20
|
|
|
30
|
-
|
|
21
|
+
[![version][version-tag]][npm-url]
|
|
22
|
+
[![install size][size-tag]][size-url]
|
|
23
|
+
[![download][download-tag]][npm-url]
|
|
31
24
|
|
|
32
|
-
|
|
33
|
-
npm start
|
|
34
|
-
# or
|
|
35
|
-
yarn start
|
|
36
|
-
```
|
|
25
|
+
[![neko-ui][install-tag]][npm-url]
|
|
37
26
|
|
|
38
|
-
##
|
|
27
|
+
## 安装
|
|
39
28
|
|
|
40
29
|
```shell
|
|
41
|
-
npm
|
|
30
|
+
npm install neko-ui -S
|
|
42
31
|
# or
|
|
43
|
-
yarn
|
|
32
|
+
yarn add neko-ui -S
|
|
44
33
|
```
|
|
45
34
|
|
|
46
|
-
|
|
35
|
+
### 使用
|
|
47
36
|
|
|
48
|
-
|
|
37
|
+
```html
|
|
38
|
+
<n-button>按钮</n-button>
|
|
39
|
+
```
|
|
49
40
|
|
|
50
|
-
|
|
41
|
+
## 在 html5 中使用
|
|
51
42
|
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
43
|
+
```html
|
|
44
|
+
<!-- 引入 CDN 资源 -->
|
|
45
|
+
<script src="https://cdn.jsdelivr.net/npm/neko-ui@2.0.1/lib/index.js"></script>
|
|
46
|
+
<!-- 使用 -->
|
|
47
|
+
<body>
|
|
48
|
+
<n-button>按钮</n-button>
|
|
49
|
+
</body>
|
|
56
50
|
```
|
|
51
|
+
|
|
52
|
+
## 感谢
|
|
53
|
+
|
|
54
|
+
[![jetbrains][jetbrains-tag]][jetbrains-url]
|
package/lib/avatar/group.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JSX } from 'solid-js';
|
|
2
2
|
import '../popover';
|
|
3
|
-
import type { BasicConfig
|
|
3
|
+
import type { BasicConfig } from '..';
|
|
4
4
|
import type { AvatarProps } from '../avatar';
|
|
5
5
|
export interface AvatarGroupProps extends Omit<JSX.ButtonHTMLAttributes<HTMLDivElement>, 'onChange' | 'ref'> {
|
|
6
6
|
/** 头像数据 */
|
package/lib/avatar/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JSX } from 'solid-js';
|
|
2
|
-
import type { BasicConfig
|
|
2
|
+
import type { BasicConfig } from '../index';
|
|
3
3
|
export interface AvatarProps extends Omit<JSX.ButtonHTMLAttributes<HTMLDivElement>, 'onChange' | 'ref' | 'children'> {
|
|
4
4
|
/** 头像 */
|
|
5
5
|
src?: string;
|
package/lib/back-top/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { JSXElement } from 'solid-js';
|
|
2
|
-
import type { ICustomElement } from 'component-register';
|
|
3
2
|
export interface BasicConfig {
|
|
4
3
|
/** 组件状态
|
|
5
4
|
* @default 'normal'
|
|
@@ -71,20 +70,3 @@ export declare enum FieldName {
|
|
|
71
70
|
/** 后缀图标 */
|
|
72
71
|
suffix = "suffix"
|
|
73
72
|
}
|
|
74
|
-
type IEvent<T> = (e: CustomEvent<T>) => void;
|
|
75
|
-
type ICustomEvent<T, K extends keyof T> = T extends {
|
|
76
|
-
[key in K]?: (v: infer V) => void;
|
|
77
|
-
} ? IEvent<V> : T extends {
|
|
78
|
-
[key in K]?: (...args: infer Args) => void;
|
|
79
|
-
} ? IEvent<Args> : never;
|
|
80
|
-
type IOmit<T, Keys extends keyof T> = Omit<T, Keys> & {
|
|
81
|
-
[K in Keys]?: ICustomEvent<T, K>;
|
|
82
|
-
};
|
|
83
|
-
export type CustomElement<T extends Partial<ICustomElement> = ICustomElement> = IOmit<T, 'onChange' | 'onOpenChange' | 'onErrorRecorder' | 'onStopRecorder' | 'onStartRecorder' | 'onRecorderDataAvailable' | 'onErrorCapture' | 'onStopCapture' | 'onStartCapture' | 'onSaveRecorder'> & {
|
|
84
|
-
ref?: CustomElement<T> | {
|
|
85
|
-
current: CustomElement<T> | null;
|
|
86
|
-
};
|
|
87
|
-
shadowRoot?: ShadowRoot | Element | null;
|
|
88
|
-
offsetWidth?: number;
|
|
89
|
-
};
|
|
90
|
-
export {};
|
package/lib/button/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JSX } from 'solid-js';
|
|
2
|
-
import type { BasicConfig
|
|
2
|
+
import type { BasicConfig } from '../index';
|
|
3
3
|
export interface ButtonProps extends Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'ref'> {
|
|
4
4
|
/** 自定义类名 */
|
|
5
5
|
class?: string;
|
package/lib/carousel/index.d.ts
CHANGED
package/lib/checkbox/index.d.ts
CHANGED
package/lib/code/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { type JSX } from 'solid-js';
|
|
|
2
2
|
import '../dropdown';
|
|
3
3
|
import '../input';
|
|
4
4
|
import '../input-number';
|
|
5
|
-
import type { CustomElement } from '../index';
|
|
6
5
|
export interface ColorPaletteProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
7
6
|
/** 自定义类名 */
|
|
8
7
|
class?: string;
|
package/lib/cron/index.d.ts
CHANGED
package/lib/cron/style.d.ts
CHANGED
package/lib/dropdown/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MenuMultipleProps, MenuProps, PopoverProps } from '..';
|
|
2
2
|
export interface BaseDropdownProps extends Omit<PopoverProps, 'content'> {
|
|
3
3
|
/** 打开内容气泡 */
|
|
4
4
|
open?: boolean | null;
|
package/lib/empty/index.d.ts
CHANGED
package/lib/img/index.d.ts
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -32,13 +32,9 @@ export { default as Tag, type TagProps, type TagElement } from './tag';
|
|
|
32
32
|
export { default as Menu, type MenuProps, type MenuMultipleProps, type MenuElement, type MenuMultipleElement, type MenuOption, } from './menu';
|
|
33
33
|
export { default as Cron, type CronProps, type CronElement } from './cron';
|
|
34
34
|
export { theme, setTheme, generateTheme, baseStyle, toneColor, type ThemeOption, ColorScheme, } from './theme';
|
|
35
|
-
export { FieldName, Size, Status, type BasicConfig, type BaseOption
|
|
35
|
+
export { FieldName, Size, Status, type BasicConfig, type BaseOption } from './basic-config';
|
|
36
36
|
export { default as fromSchema } from './from-schema';
|
|
37
|
-
import type { ICustomElement } from 'component-register';
|
|
38
37
|
import type { AvatarElement, AvatarGroupElement, BackTopElement, ButtonElement, CaptureScreenElement, CarouselElement, CheckboxBoolElement, CheckboxGroupElement, CodeElement, ColorPaletteElement, ColorPickerElement, CronElement, DropdownElement, DropdownMultipleElement, EmptyElement, HighlightTextElement, ImgElement, InputElement, InputNumberElement, MdElement, MenuElement, MenuMultipleElement, PopoverElement, RadioElement, SegmentedElement, SelectElement, SelectMultipleElement, SkeletonElement, SpinElement, SwitchElement, TabsElement, TagElement, TreeElement, TreeMultipleElement, TreeMultipleSchemaElement, TreeMultipleStringElement, TreeSchemaElement, TreeStringElement, TypographyElement } from 'neko-ui';
|
|
39
|
-
export interface ComponentOptions<T> {
|
|
40
|
-
element: T & ICustomElement;
|
|
41
|
-
}
|
|
42
38
|
interface CustomElementTags {
|
|
43
39
|
'n-avatar': AvatarElement;
|
|
44
40
|
'n-avatar-group': AvatarGroupElement;
|
|
@@ -81,7 +77,7 @@ declare module 'solid-js' {
|
|
|
81
77
|
}
|
|
82
78
|
declare global {
|
|
83
79
|
export namespace JSX {
|
|
84
|
-
interface IntrinsicElements extends CustomElementTags
|
|
80
|
+
interface IntrinsicElements extends CustomElementTags {
|
|
85
81
|
}
|
|
86
82
|
}
|
|
87
83
|
interface HTMLElementTagNameMap extends CustomElementTags {
|