fiboui 1.0.0
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 +101 -0
- package/dist/content/Alert/index.d.ts +878 -0
- package/dist/content/Avatar/index.d.ts +886 -0
- package/dist/content/Badge/index.d.ts +887 -0
- package/dist/content/Image/index.d.ts +893 -0
- package/dist/content/Label/index.d.ts +879 -0
- package/dist/content/Progress/index.d.ts +898 -0
- package/dist/content/Skeleton/index.d.ts +879 -0
- package/dist/content/Spinner/index.d.ts +880 -0
- package/dist/content/Text/index.d.ts +878 -0
- package/dist/content/index.d.ts +9 -0
- package/dist/core/StateWrapper.d.ts +28 -0
- package/dist/core/builder.d.ts +50 -0
- package/dist/core/component.d.ts +7 -0
- package/dist/core/effects.d.ts +3 -0
- package/dist/core/icons.d.ts +11 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/state.d.ts +37 -0
- package/dist/core/types.d.ts +51 -0
- package/dist/demo.d.ts +7 -0
- package/dist/effects-Co9C_Dyx.mjs +9 -0
- package/dist/examples/ScaffoldExamples.d.ts +3 -0
- package/dist/examples/StateExamples.d.ts +5 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.esm.js +4622 -0
- package/dist/index.umd.js +251 -0
- package/dist/interactive/Button/index.d.ts +897 -0
- package/dist/interactive/Checkbox/index.d.ts +884 -0
- package/dist/interactive/Combobox/index.d.ts +898 -0
- package/dist/interactive/RadioGroup/index.d.ts +888 -0
- package/dist/interactive/Select/index.d.ts +895 -0
- package/dist/interactive/Switch/index.d.ts +881 -0
- package/dist/interactive/TextField/index.d.ts +892 -0
- package/dist/interactive/Textarea/index.d.ts +890 -0
- package/dist/interactive/index.d.ts +8 -0
- package/dist/layout/Center/index.d.ts +869 -0
- package/dist/layout/Column/index.d.ts +881 -0
- package/dist/layout/Container/index.d.ts +870 -0
- package/dist/layout/DashboardLayout/index.d.ts +870 -0
- package/dist/layout/Header/index.d.ts +870 -0
- package/dist/layout/Line/index.d.ts +872 -0
- package/dist/layout/Row/index.d.ts +879 -0
- package/dist/layout/Scaffold/index.d.ts +878 -0
- package/dist/layout/ScrollView/index.d.ts +879 -0
- package/dist/layout/Sidebar/index.d.ts +870 -0
- package/dist/layout/Spacer/index.d.ts +875 -0
- package/dist/layout/StakentComponents.d.ts +4 -0
- package/dist/layout/index.d.ts +11 -0
- package/dist/structure/Banner/index.d.ts +879 -0
- package/dist/structure/Box/index.d.ts +869 -0
- package/dist/structure/Card/index.d.ts +881 -0
- package/dist/structure/Collapse/index.d.ts +884 -0
- package/dist/structure/Grid/index.d.ts +1757 -0
- package/dist/structure/List/index.d.ts +888 -0
- package/dist/structure/Table/index.d.ts +895 -0
- package/dist/structure/Tags/index.d.ts +876 -0
- package/dist/structure/cards/AssetCard/index.d.ts +884 -0
- package/dist/structure/cards/CollectionCard/index.d.ts +880 -0
- package/dist/structure/cards/ContentCard/index.d.ts +884 -0
- package/dist/structure/cards/ProfileCard/index.d.ts +892 -0
- package/dist/structure/cards/index.d.ts +5 -0
- package/dist/structure/cards/variants/index.d.ts +3490 -0
- package/dist/structure/index.d.ts +9 -0
- package/dist/style.css +1 -0
- package/dist/theme/cupertino.d.ts +3 -0
- package/dist/theme/index.d.ts +5 -0
- package/dist/theme/material.d.ts +3 -0
- package/dist/theme/provider.d.ts +16 -0
- package/dist/theme/types.d.ts +57 -0
- package/dist/theme/web.d.ts +3 -0
- package/package.json +54 -0
- package/src/content/Alert/index.ts +110 -0
- package/src/content/Avatar/index.ts +116 -0
- package/src/content/Badge/index.ts +162 -0
- package/src/content/Image/index.ts +137 -0
- package/src/content/Label/index.ts +66 -0
- package/src/content/Progress/index.ts +378 -0
- package/src/content/Skeleton/index.ts +71 -0
- package/src/content/Spinner/index.ts +139 -0
- package/src/content/Text/index.ts +74 -0
- package/src/content/index.ts +9 -0
- package/src/core/StateWrapper.tsx +105 -0
- package/src/core/builder.ts +259 -0
- package/src/core/component.ts +49 -0
- package/src/core/effects.ts +27 -0
- package/src/core/icons.tsx +57 -0
- package/src/core/index.ts +5 -0
- package/src/core/state.ts +233 -0
- package/src/core/types.ts +62 -0
- package/src/demo.tsx +1045 -0
- package/src/examples/ScaffoldExamples.tsx +299 -0
- package/src/examples/StateExamples.tsx +149 -0
- package/src/index.ts +8 -0
- package/src/interactive/Button/index.ts +218 -0
- package/src/interactive/Checkbox/index.ts +145 -0
- package/src/interactive/Combobox/index.ts +278 -0
- package/src/interactive/RadioGroup/index.ts +124 -0
- package/src/interactive/Select/index.ts +227 -0
- package/src/interactive/Switch/index.ts +123 -0
- package/src/interactive/TextField/index.ts +200 -0
- package/src/interactive/Textarea/index.ts +129 -0
- package/src/interactive/index.ts +8 -0
- package/src/layout/Center/index.ts +34 -0
- package/src/layout/Column/index.ts +101 -0
- package/src/layout/Container/index.ts +28 -0
- package/src/layout/DashboardLayout/index.ts +106 -0
- package/src/layout/Header/index.ts +50 -0
- package/src/layout/Line/index.ts +41 -0
- package/src/layout/Row/index.ts +93 -0
- package/src/layout/Scaffold/index.ts +133 -0
- package/src/layout/ScrollView/index.ts +67 -0
- package/src/layout/Sidebar/index.ts +56 -0
- package/src/layout/Spacer/index.ts +46 -0
- package/src/layout/StakentComponents.tsx +57 -0
- package/src/layout/index.ts +11 -0
- package/src/structure/Banner/index.ts +92 -0
- package/src/structure/Box/index.ts +45 -0
- package/src/structure/Card/index.ts +113 -0
- package/src/structure/Collapse/index.ts +122 -0
- package/src/structure/Grid/index.ts +197 -0
- package/src/structure/List/index.ts +185 -0
- package/src/structure/Table/index.ts +165 -0
- package/src/structure/Tags/index.ts +69 -0
- package/src/structure/cards/AssetCard/index.ts +158 -0
- package/src/structure/cards/CollectionCard/index.ts +95 -0
- package/src/structure/cards/ContentCard/index.ts +127 -0
- package/src/structure/cards/ProfileCard/index.ts +152 -0
- package/src/structure/cards/index.ts +5 -0
- package/src/structure/cards/variants/index.ts +301 -0
- package/src/structure/index.ts +10 -0
- package/src/styles/base.css +186 -0
- package/src/styles/core.css +52 -0
- package/src/styles/themes/cupertino.css +197 -0
- package/src/styles/themes/material.css +322 -0
- package/src/styles/themes/web.css +196 -0
- package/src/theme/cupertino.ts +85 -0
- package/src/theme/index.ts +5 -0
- package/src/theme/material.ts +86 -0
- package/src/theme/provider.tsx +76 -0
- package/src/theme/types.ts +62 -0
- package/src/theme/web.ts +82 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import React, { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { FiboBuilder, createBuilder } from '../../core/builder';
|
|
3
|
+
import { BaseProps } from '../../core/types';
|
|
4
|
+
import { Box } from '../../structure/Box';
|
|
5
|
+
import { Text } from '../Text';
|
|
6
|
+
import { Row } from '../../layout/Row';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
type BadgeVariant = 'neutral' | 'accent' | 'outline' | 'glass' | 'solid' | 'dot';
|
|
10
|
+
type BadgeIntent = 'none' | 'success' | 'warning' | 'error' | 'info';
|
|
11
|
+
type BadgeShape = 'pill' | 'rounded';
|
|
12
|
+
|
|
13
|
+
const BadgeInner = React.memo((props: any) => {
|
|
14
|
+
const { text, icon, variant, intent, shape, className, style } = props;
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
const intentColors: Record<BadgeIntent, { bg: string, text: string, border?: string }> = {
|
|
18
|
+
none: { bg: '#F9FAFB', text: '#6B7280', border: '#E5E7EB' },
|
|
19
|
+
success: { bg: '#ECFDF5', text: '#059669', border: 'transparent' },
|
|
20
|
+
warning: { bg: '#FFFBEB', text: '#D97706', border: 'transparent' },
|
|
21
|
+
error: { bg: '#FFF1F2', text: '#E11D48', border: 'transparent' },
|
|
22
|
+
info: { bg: '#EFF6FF', text: '#2563EB', border: 'transparent' }
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
const variantStyles: Record<BadgeVariant, any> = {
|
|
27
|
+
neutral: { backgroundColor: '#F9FAFB', color: '#6B7280', border: '1px solid #E5E7EB' },
|
|
28
|
+
accent: { backgroundColor: '#EFF6FF', color: '#3B82F6', border: 'none' },
|
|
29
|
+
outline: { backgroundColor: 'transparent', color: '#FFFFFF', border: '1px solid rgba(255,255,255,0.3)' },
|
|
30
|
+
|
|
31
|
+
glass: {
|
|
32
|
+
backgroundColor: 'rgba(255, 255, 255, 0.85)',
|
|
33
|
+
backdropFilter: 'blur(12px)',
|
|
34
|
+
color: '#111827',
|
|
35
|
+
border: '1px solid rgba(255, 255, 255, 0.4)'
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
solid: { backgroundColor: '#111827', color: '#FFFFFF', border: 'none' },
|
|
40
|
+
dot: { backgroundColor: 'transparent', color: '#6B7280', border: '1px solid #E5E7EB', padding: '4px 10px' }
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
let finalStyle = { ...variantStyles[variant as BadgeVariant] };
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
if (intent !== 'none') {
|
|
47
|
+
const colors = intentColors[intent as BadgeIntent];
|
|
48
|
+
|
|
49
|
+
if (variant === 'solid') {
|
|
50
|
+
|
|
51
|
+
const solidIntentMap: Record<BadgeIntent, string> = {
|
|
52
|
+
none: '#111827', success: '#059669', warning: '#D97706', error: '#E11D48', info: '#2563EB'
|
|
53
|
+
};
|
|
54
|
+
finalStyle.backgroundColor = solidIntentMap[intent as BadgeIntent];
|
|
55
|
+
finalStyle.color = '#FFFFFF';
|
|
56
|
+
} else if (variant === 'dot') {
|
|
57
|
+
finalStyle.color = '#374151';
|
|
58
|
+
finalStyle.borderColor = '#E5E7EB';
|
|
59
|
+
} else {
|
|
60
|
+
|
|
61
|
+
finalStyle.backgroundColor = colors.bg;
|
|
62
|
+
finalStyle.color = colors.text;
|
|
63
|
+
if (colors.border) finalStyle.border = `1px solid ${colors.border}`;
|
|
64
|
+
else finalStyle.border = 'none';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const shapeRadius: Record<BadgeShape, string> = {
|
|
69
|
+
pill: '9999px',
|
|
70
|
+
rounded: '8px'
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
return Box()
|
|
74
|
+
.className(className)
|
|
75
|
+
.style({
|
|
76
|
+
...finalStyle,
|
|
77
|
+
borderRadius: shapeRadius[shape as BadgeShape],
|
|
78
|
+
padding: variant === 'dot' ? '4px 8px' : '4px 10px',
|
|
79
|
+
display: 'inline-flex',
|
|
80
|
+
alignItems: 'center',
|
|
81
|
+
justifyContent: 'center',
|
|
82
|
+
height: 'fit-content',
|
|
83
|
+
fontSize: '11px',
|
|
84
|
+
lineHeight: '1',
|
|
85
|
+
fontWeight: 600,
|
|
86
|
+
...style
|
|
87
|
+
})
|
|
88
|
+
.children(
|
|
89
|
+
Row().gap(6).alignItems("center").children([
|
|
90
|
+
|
|
91
|
+
variant === 'dot' && intent !== 'none' ?
|
|
92
|
+
Box().style({
|
|
93
|
+
width: '6px',
|
|
94
|
+
height: '6px',
|
|
95
|
+
borderRadius: '50%',
|
|
96
|
+
backgroundColor: intentColors[intent as BadgeIntent].text,
|
|
97
|
+
boxShadow: `0 0 6px ${intentColors[intent as BadgeIntent].text}66`
|
|
98
|
+
}).build() : null,
|
|
99
|
+
|
|
100
|
+
icon ? Box().classNames(['flex', 'items-center']).children(icon).build() : null,
|
|
101
|
+
Text(text).fontSize(12).fontWeight(600).style({ color: 'inherit' }).build()
|
|
102
|
+
]).build()
|
|
103
|
+
)
|
|
104
|
+
.build();
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
class BadgeBuilder extends FiboBuilder {
|
|
108
|
+
private _text: string = '';
|
|
109
|
+
private _icon?: ReactNode;
|
|
110
|
+
private _variant: BadgeVariant = 'neutral';
|
|
111
|
+
private _intent: BadgeIntent = 'none';
|
|
112
|
+
private _shape: BadgeShape = 'rounded';
|
|
113
|
+
|
|
114
|
+
text(value: string): this {
|
|
115
|
+
this._text = value;
|
|
116
|
+
return this;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
icon(icon: ReactNode): this {
|
|
120
|
+
this._icon = icon;
|
|
121
|
+
return this;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
variant(variant: BadgeVariant): this {
|
|
125
|
+
this._variant = variant;
|
|
126
|
+
return this;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
intent(intent: BadgeIntent): this {
|
|
130
|
+
this._intent = intent;
|
|
131
|
+
return this;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
shape(shape: BadgeShape): this {
|
|
135
|
+
this._shape = shape;
|
|
136
|
+
return this;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
build(): ReactElement {
|
|
140
|
+
const props = {
|
|
141
|
+
text: this._text,
|
|
142
|
+
icon: this._icon,
|
|
143
|
+
variant: this._variant,
|
|
144
|
+
intent: this._intent,
|
|
145
|
+
shape: this._shape,
|
|
146
|
+
className: this.getClassName(),
|
|
147
|
+
style: this.getStyle()
|
|
148
|
+
};
|
|
149
|
+
return React.createElement(BadgeInner, props);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
export const Badge = createBuilder(BadgeBuilder);
|
|
155
|
+
|
|
156
|
+
export interface BadgeProps extends BaseProps {
|
|
157
|
+
text: string;
|
|
158
|
+
icon?: ReactNode;
|
|
159
|
+
variant?: BadgeVariant;
|
|
160
|
+
intent?: BadgeIntent;
|
|
161
|
+
shape?: BadgeShape;
|
|
162
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import { FiboBuilder, createBuilder } from '../../core/builder';
|
|
3
|
+
import { BaseProps } from '../../core/types';
|
|
4
|
+
|
|
5
|
+
type ImageFit = 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
|
6
|
+
type ClipShape = 'circle' | 'rounded' | 'square';
|
|
7
|
+
|
|
8
|
+
const ImageInner = React.memo((props: any) => {
|
|
9
|
+
const {
|
|
10
|
+
src,
|
|
11
|
+
alt,
|
|
12
|
+
fit,
|
|
13
|
+
resizable,
|
|
14
|
+
clipShape,
|
|
15
|
+
frameWidth,
|
|
16
|
+
frameHeight,
|
|
17
|
+
className,
|
|
18
|
+
style,
|
|
19
|
+
...rest
|
|
20
|
+
} = props;
|
|
21
|
+
|
|
22
|
+
const finalStyle = { ...style };
|
|
23
|
+
|
|
24
|
+
finalStyle.objectFit = fit;
|
|
25
|
+
|
|
26
|
+
if (frameWidth) {
|
|
27
|
+
finalStyle.width = `${frameWidth}px`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (frameHeight) {
|
|
31
|
+
finalStyle.height = `${frameHeight}px`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (resizable) {
|
|
35
|
+
finalStyle.maxWidth = '100%';
|
|
36
|
+
finalStyle.height = 'auto';
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return React.createElement('img', {
|
|
40
|
+
src: src,
|
|
41
|
+
alt: alt,
|
|
42
|
+
className,
|
|
43
|
+
style: finalStyle,
|
|
44
|
+
...rest,
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
class ImageBuilder extends FiboBuilder {
|
|
49
|
+
private _src: string = '';
|
|
50
|
+
private _alt: string = '';
|
|
51
|
+
private _fit: ImageFit = 'cover';
|
|
52
|
+
private _resizable: boolean = false;
|
|
53
|
+
private _clipShape?: ClipShape;
|
|
54
|
+
private _frameWidth?: number;
|
|
55
|
+
private _frameHeight?: number;
|
|
56
|
+
|
|
57
|
+
constructor(src: string = '') {
|
|
58
|
+
super();
|
|
59
|
+
this._src = src;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
src(value: string): this {
|
|
63
|
+
this._src = value;
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
alt(value: string): this {
|
|
68
|
+
this._alt = value;
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
resizable(): this {
|
|
73
|
+
this._resizable = true;
|
|
74
|
+
return this;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
scaledToFit(): this {
|
|
78
|
+
this._fit = 'contain';
|
|
79
|
+
return this;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
scaledToFill(): this {
|
|
83
|
+
this._fit = 'cover';
|
|
84
|
+
return this;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
frame(dimensions: { width: number; height: number }): this {
|
|
88
|
+
this._frameWidth = dimensions.width;
|
|
89
|
+
this._frameHeight = dimensions.height;
|
|
90
|
+
return this;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
clipShape(shape: ClipShape): this {
|
|
94
|
+
this._clipShape = shape;
|
|
95
|
+
return this;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
foregroundStyle(_style: string): this {
|
|
99
|
+
return this;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
build(): ReactElement {
|
|
103
|
+
const classes = ['fibo-image', ...this._classNames];
|
|
104
|
+
|
|
105
|
+
if (this._clipShape === 'circle') {
|
|
106
|
+
classes.push('rounded-full');
|
|
107
|
+
} else if (this._clipShape === 'rounded') {
|
|
108
|
+
classes.push('rounded-lg');
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const className = classes.filter(Boolean).join(' ');
|
|
112
|
+
|
|
113
|
+
const props = {
|
|
114
|
+
src: this._src,
|
|
115
|
+
alt: this._alt,
|
|
116
|
+
fit: this._fit,
|
|
117
|
+
resizable: this._resizable,
|
|
118
|
+
clipShape: this._clipShape,
|
|
119
|
+
frameWidth: this._frameWidth,
|
|
120
|
+
frameHeight: this._frameHeight,
|
|
121
|
+
className: className,
|
|
122
|
+
style: this.getStyle(),
|
|
123
|
+
...this._props
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
return React.createElement(ImageInner, props);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
export const Image = createBuilder(ImageBuilder);
|
|
132
|
+
|
|
133
|
+
export interface ImageProps extends BaseProps {
|
|
134
|
+
src: string;
|
|
135
|
+
alt?: string;
|
|
136
|
+
fit?: ImageFit;
|
|
137
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import { FiboBuilder, createBuilder } from '../../core/builder';
|
|
3
|
+
import { BaseProps } from '../../core/types';
|
|
4
|
+
|
|
5
|
+
const LabelInner = React.memo((props: any) => {
|
|
6
|
+
const { text, htmlFor, required, className, style, ...rest } = props;
|
|
7
|
+
|
|
8
|
+
return React.createElement(
|
|
9
|
+
'label',
|
|
10
|
+
{
|
|
11
|
+
className: `fibo-label text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${className}`,
|
|
12
|
+
htmlFor: htmlFor,
|
|
13
|
+
style: style,
|
|
14
|
+
...rest,
|
|
15
|
+
},
|
|
16
|
+
text,
|
|
17
|
+
required && React.createElement('span', { className: 'text-red-500 ml-0.5' }, '*')
|
|
18
|
+
);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
class LabelBuilder extends FiboBuilder {
|
|
22
|
+
private _text: string = '';
|
|
23
|
+
private _htmlFor?: string;
|
|
24
|
+
private _required: boolean = false;
|
|
25
|
+
|
|
26
|
+
constructor(text: string = '') {
|
|
27
|
+
super();
|
|
28
|
+
this._text = text;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
text(value: string): this {
|
|
32
|
+
this._text = value;
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
htmlFor(id: string): this {
|
|
37
|
+
this._htmlFor = id;
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
required(val: boolean = true): this {
|
|
42
|
+
this._required = val;
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
build(): ReactElement {
|
|
47
|
+
const props = {
|
|
48
|
+
text: this._text,
|
|
49
|
+
htmlFor: this._htmlFor,
|
|
50
|
+
required: this._required,
|
|
51
|
+
className: this.getClassName(),
|
|
52
|
+
style: this.getStyle(),
|
|
53
|
+
...this._props
|
|
54
|
+
};
|
|
55
|
+
return React.createElement(LabelInner, props);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
export const Label = createBuilder(LabelBuilder);
|
|
61
|
+
|
|
62
|
+
export interface LabelProps extends BaseProps {
|
|
63
|
+
text: string;
|
|
64
|
+
htmlFor?: string;
|
|
65
|
+
required?: boolean;
|
|
66
|
+
}
|