ripal-ui 1.1.2 → 1.1.32
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/index.d.ts +123 -0
- package/package.json +2 -1
package/index.d.ts
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// index.d.ts
|
|
2
|
+
declare module 'ripal-ui' {
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
type Size = 'sm' | 'md' | 'lg';
|
|
6
|
+
type Variant = 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
7
|
+
|
|
8
|
+
// Button
|
|
9
|
+
export interface ButtonProps {
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
variant?: Variant;
|
|
13
|
+
size?: Size;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export const Button: React.FC<ButtonProps>;
|
|
19
|
+
|
|
20
|
+
// Input
|
|
21
|
+
export interface InputProps {
|
|
22
|
+
value?: string;
|
|
23
|
+
onChange?: (value: string) => void;
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
type?: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export const Input: React.FC<InputProps>;
|
|
30
|
+
|
|
31
|
+
// Checkbox
|
|
32
|
+
export interface CheckboxProps {
|
|
33
|
+
checked?: boolean;
|
|
34
|
+
onChange?: (checked: boolean) => void;
|
|
35
|
+
label?: string;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export const Checkbox: React.FC<CheckboxProps>;
|
|
39
|
+
|
|
40
|
+
// Text
|
|
41
|
+
export interface TextProps {
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
size?: Size | number;
|
|
44
|
+
bold?: boolean;
|
|
45
|
+
color?: string;
|
|
46
|
+
center?: boolean;
|
|
47
|
+
className?: string;
|
|
48
|
+
}
|
|
49
|
+
export const Text: React.FC<TextProps>;
|
|
50
|
+
|
|
51
|
+
// Circle
|
|
52
|
+
export interface CircleProps {
|
|
53
|
+
size?: number;
|
|
54
|
+
color?: string;
|
|
55
|
+
children?: React.ReactNode;
|
|
56
|
+
}
|
|
57
|
+
export const Circle: React.FC<CircleProps>;
|
|
58
|
+
|
|
59
|
+
// Row
|
|
60
|
+
export interface RowProps {
|
|
61
|
+
children?: React.ReactNode;
|
|
62
|
+
justify?: 'start' | 'center' | 'end' | 'between' | 'around';
|
|
63
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
64
|
+
gap?: number;
|
|
65
|
+
className?: string;
|
|
66
|
+
}
|
|
67
|
+
export const Row: React.FC<RowProps>;
|
|
68
|
+
|
|
69
|
+
// Inline
|
|
70
|
+
export interface InlineProps {
|
|
71
|
+
children?: React.ReactNode;
|
|
72
|
+
wrap?: boolean;
|
|
73
|
+
gap?: number;
|
|
74
|
+
className?: string;
|
|
75
|
+
}
|
|
76
|
+
export const Inline: React.FC<InlineProps>;
|
|
77
|
+
|
|
78
|
+
// Cell
|
|
79
|
+
export interface CellProps {
|
|
80
|
+
children?: React.ReactNode;
|
|
81
|
+
width?: number | string;
|
|
82
|
+
}
|
|
83
|
+
export const Cell: React.FC<CellProps>;
|
|
84
|
+
|
|
85
|
+
// BottomSheet
|
|
86
|
+
export interface BottomSheetProps {
|
|
87
|
+
open: boolean;
|
|
88
|
+
onClose: () => void;
|
|
89
|
+
children?: React.ReactNode;
|
|
90
|
+
}
|
|
91
|
+
export const BottomSheet: React.FC<BottomSheetProps>;
|
|
92
|
+
|
|
93
|
+
// Skeleton
|
|
94
|
+
export interface SkeletonProps {
|
|
95
|
+
width?: number | string;
|
|
96
|
+
height?: number | string;
|
|
97
|
+
circle?: boolean;
|
|
98
|
+
}
|
|
99
|
+
export const Skeleton: React.FC<SkeletonProps>;
|
|
100
|
+
|
|
101
|
+
// Dialog
|
|
102
|
+
export interface DialogProps {
|
|
103
|
+
open: boolean;
|
|
104
|
+
title?: string;
|
|
105
|
+
content?: React.ReactNode;
|
|
106
|
+
onConfirm?: () => void;
|
|
107
|
+
onCancel?: () => void;
|
|
108
|
+
confirmText?: string;
|
|
109
|
+
cancelText?: string;
|
|
110
|
+
}
|
|
111
|
+
export const Dialog: React.FC<DialogProps>;
|
|
112
|
+
|
|
113
|
+
// Table
|
|
114
|
+
export interface TableProps<T = any> {
|
|
115
|
+
data: T[];
|
|
116
|
+
columns: {
|
|
117
|
+
title: string;
|
|
118
|
+
key: keyof T;
|
|
119
|
+
render?: (row: T) => React.ReactNode;
|
|
120
|
+
}[];
|
|
121
|
+
}
|
|
122
|
+
export const Table: React.FC<TableProps>;
|
|
123
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ripal-ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.32",
|
|
4
4
|
"description": "A collection of React elements and components",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"build": "babel elements components --out-dir dist",
|
|
8
9
|
"postinstall": "node ./scripts/generateConfig.js"
|