neko-ui 2.0.0-beta.3 → 2.0.0-beta.4

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.
@@ -0,0 +1,52 @@
1
+ import { type JSXElement } from 'solid-js';
2
+ import { type ComponentSize } from '../index';
3
+ export type ButtonType = 'success' | 'error' | 'primary' | 'warning' | 'default';
4
+ export interface ButtonProps extends Partial<Omit<HTMLButtonElement, 'type' | 'children'>> {
5
+ /** 按钮类型 */
6
+ type?: ButtonType;
7
+ /** 透明背景 */
8
+ ghost?: boolean;
9
+ /** 实色背景 */
10
+ fill?: boolean;
11
+ /** 圆形按钮 */
12
+ circle?: boolean;
13
+ /** 虚线按钮 */
14
+ dashed?: boolean;
15
+ /** 扁平按钮 */
16
+ flat?: boolean;
17
+ /** 禁用按钮 */
18
+ disabled?: boolean;
19
+ /** 块按钮 */
20
+ block?: boolean;
21
+ /** 链接按钮 */
22
+ link?: boolean;
23
+ /** 危险按钮 */
24
+ danger?: boolean;
25
+ size?: ComponentSize;
26
+ onClick?: HTMLButtonElement['onclick'];
27
+ class?: string;
28
+ css?: string;
29
+ children?: JSXElement;
30
+ }
31
+ declare function Button(_: ButtonProps): import("solid-js").JSX.Element;
32
+ export interface ButtonElement extends ButtonProps {
33
+ ref?: ButtonElement | {
34
+ current: ButtonElement | null;
35
+ };
36
+ }
37
+ interface CustomElementTags {
38
+ 'n-button': ButtonElement;
39
+ }
40
+ declare module 'solid-js' {
41
+ namespace JSX {
42
+ interface IntrinsicElements extends HTMLElementTags, CustomElementTags {
43
+ }
44
+ }
45
+ }
46
+ declare global {
47
+ export namespace JSX {
48
+ interface IntrinsicElements extends CustomElementTags, CustomElementTags {
49
+ }
50
+ }
51
+ }
52
+ export default Button;
@@ -0,0 +1 @@
1
+ export declare const style: string;
package/lib/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from '@moneko/css';
2
2
  export { default as Prism } from './prism';
3
3
  export { default as getOptions, defaultFieldNames, type FieldNames, type BaseOption, } from './get-options';
4
+ export { default as Button, type ButtonType, type ButtonElement } from './button';
4
5
  export { default as Avatar, type AvatarElement, type AvatarProps } from './avatar';
5
6
  export { default as AvatarGroup, type AvatarGroupElement, type AvatarGroupProps, } from './avatar-group';
6
7
  export { default as Md, type MdElement, type MdProps } from './md';