@beaubrain/web-design-system 0.1.1 → 0.1.3
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 +6 -28
- package/dist/assets/web-design-system.css +1 -1
- package/dist/components/Button/button.defs.d.ts +1 -3
- package/dist/components/Checkbox/checkbox.base.d.ts +42 -0
- package/dist/components/Checkbox/checkbox.defs.d.ts +15 -0
- package/dist/components/Checkbox/index.d.ts +23 -0
- package/dist/components/CheckboxGroup/checkboxGroup.base.d.ts +35 -0
- package/dist/components/CheckboxGroup/checkboxGroup.defs.d.ts +18 -0
- package/dist/components/CheckboxGroup/index.d.ts +16 -0
- package/dist/components/Flex/flex.defs.d.ts +2 -6
- package/dist/components/Flex/flex.helpers.d.ts +2 -0
- package/dist/components/Grid/grid.defs.d.ts +312 -0
- package/dist/components/Grid/grid.helpers.d.ts +4 -0
- package/dist/components/Grid/index.d.ts +15 -0
- package/dist/components/Radio/index.d.ts +12 -0
- package/dist/components/Radio/radio.base.d.ts +24 -0
- package/dist/components/Radio/radio.defs.d.ts +15 -0
- package/dist/components/RadioGroup/index.d.ts +21 -0
- package/dist/components/RadioGroup/radioGroup.base.d.ts +34 -0
- package/dist/components/RadioGroup/radioGroup.defs.d.ts +60 -0
- package/dist/components/Spinner/spinner.defs.d.ts +1 -2
- package/dist/components/Switch/index.d.ts +11 -0
- package/dist/components/Switch/switch.base.d.ts +17 -0
- package/dist/components/Switch/switch.defs.d.ts +51 -0
- package/dist/components/TextField/index.d.ts +19 -0
- package/dist/components/TextField/textField.defs.d.ts +87 -0
- package/dist/components/__internal/collection.d.ts +21 -0
- package/dist/components/__internal/index.d.ts +7 -0
- package/dist/components/__internal/remain.d.ts +12 -0
- package/dist/components/__internal/reset.d.ts +6 -0
- package/dist/components/__internal/roving-focus-group.d.ts +31 -0
- package/dist/components/index.d.ts +6 -3
- package/dist/core/native/compose-event-handlers.d.ts +6 -0
- package/dist/core/native/index.d.ts +1 -0
- package/dist/core/react/create-context.d.ts +20 -0
- package/dist/core/react/index.d.ts +10 -0
- package/dist/core/react/input-attributes.d.ts +6 -0
- package/dist/core/react/ref.d.ts +2 -1
- package/dist/core/react/require-react-element.d.ts +3 -0
- package/dist/core/react/use-callback-ref.d.ts +2 -0
- package/dist/core/react/use-controllable-state.d.ts +11 -0
- package/dist/core/react/use-finite-state-machine.d.ts +10 -0
- package/dist/core/react/use-previous.d.ts +2 -0
- package/dist/core/react/use-safe-id.d.ts +2 -0
- package/dist/core/react/use-safe-layout-effect.d.ts +3 -0
- package/dist/core/react/use-size.d.ts +5 -0
- package/dist/icons/CheckLineIcon.d.ts +4 -0
- package/dist/icons/IndeterminateLineIcon.d.ts +4 -0
- package/dist/icons/icon.props.d.ts +5 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1673 -299
- package/package.json +2 -2
- /package/dist/components/{Base/index.d.ts → __internal/base.d.ts} +0 -0
- /package/dist/components/{Outlet/index.d.ts → __internal/outlet.d.ts} +0 -0
- /package/dist/components/{Outlet/Outlet.test.d.ts → __internal/outlet.test.d.ts} +0 -0
- /package/dist/components/{VisuallyHidden/index.d.ts → __internal/visually-hidden.d.ts} +0 -0
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
declare const GridPropDefs: {
|
|
2
|
+
gap: {
|
|
3
|
+
type: "enum | string";
|
|
4
|
+
className: string;
|
|
5
|
+
customProperties: "--gap"[];
|
|
6
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
|
|
7
|
+
};
|
|
8
|
+
gapX: {
|
|
9
|
+
type: "enum | string";
|
|
10
|
+
className: string;
|
|
11
|
+
customProperties: "--col-gap"[];
|
|
12
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
|
|
13
|
+
};
|
|
14
|
+
gapY: {
|
|
15
|
+
type: "enum | string";
|
|
16
|
+
className: string;
|
|
17
|
+
customProperties: "--row-gap"[];
|
|
18
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
|
|
19
|
+
};
|
|
20
|
+
m: {
|
|
21
|
+
type: "enum | string";
|
|
22
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
23
|
+
className: string;
|
|
24
|
+
customProperties: "--m"[];
|
|
25
|
+
};
|
|
26
|
+
mx: {
|
|
27
|
+
type: "enum | string";
|
|
28
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
29
|
+
className: string;
|
|
30
|
+
customProperties: ("--ml" | "--mr")[];
|
|
31
|
+
};
|
|
32
|
+
my: {
|
|
33
|
+
type: "enum | string";
|
|
34
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
35
|
+
className: string;
|
|
36
|
+
customProperties: ("--mt" | "--mb")[];
|
|
37
|
+
};
|
|
38
|
+
mt: {
|
|
39
|
+
type: "enum | string";
|
|
40
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
41
|
+
className: string;
|
|
42
|
+
customProperties: "--mt"[];
|
|
43
|
+
};
|
|
44
|
+
mr: {
|
|
45
|
+
type: "enum | string";
|
|
46
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
47
|
+
className: string;
|
|
48
|
+
customProperties: "--mr"[];
|
|
49
|
+
};
|
|
50
|
+
mb: {
|
|
51
|
+
type: "enum | string";
|
|
52
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
53
|
+
className: string;
|
|
54
|
+
customProperties: "--mb"[];
|
|
55
|
+
};
|
|
56
|
+
ml: {
|
|
57
|
+
type: "enum | string";
|
|
58
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
59
|
+
className: string;
|
|
60
|
+
customProperties: "--ml"[];
|
|
61
|
+
};
|
|
62
|
+
position: {
|
|
63
|
+
type: "enum";
|
|
64
|
+
className: string;
|
|
65
|
+
values: readonly ["static", "relative", "absolute", "fixed", "sticky"];
|
|
66
|
+
};
|
|
67
|
+
inset: {
|
|
68
|
+
type: "enum | string";
|
|
69
|
+
className: string;
|
|
70
|
+
customProperties: "--inset"[];
|
|
71
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
72
|
+
};
|
|
73
|
+
top: {
|
|
74
|
+
type: "enum | string";
|
|
75
|
+
className: string;
|
|
76
|
+
customProperties: "--top"[];
|
|
77
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
78
|
+
};
|
|
79
|
+
right: {
|
|
80
|
+
type: "enum | string";
|
|
81
|
+
className: string;
|
|
82
|
+
customProperties: "--right"[];
|
|
83
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
84
|
+
};
|
|
85
|
+
bottom: {
|
|
86
|
+
type: "enum | string";
|
|
87
|
+
className: string;
|
|
88
|
+
customProperties: "--bottom"[];
|
|
89
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
90
|
+
};
|
|
91
|
+
left: {
|
|
92
|
+
type: "enum | string";
|
|
93
|
+
className: string;
|
|
94
|
+
customProperties: "--left"[];
|
|
95
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
96
|
+
};
|
|
97
|
+
overflow: {
|
|
98
|
+
type: "enum";
|
|
99
|
+
className: string;
|
|
100
|
+
values: readonly ["visible", "hidden", "clip", "scroll", "auto"];
|
|
101
|
+
};
|
|
102
|
+
overflowX: {
|
|
103
|
+
type: "enum";
|
|
104
|
+
className: string;
|
|
105
|
+
values: readonly ["visible", "hidden", "clip", "scroll", "auto"];
|
|
106
|
+
};
|
|
107
|
+
overflowY: {
|
|
108
|
+
type: "enum";
|
|
109
|
+
className: string;
|
|
110
|
+
values: readonly ["visible", "hidden", "clip", "scroll", "auto"];
|
|
111
|
+
};
|
|
112
|
+
flexBasis: {
|
|
113
|
+
type: "string";
|
|
114
|
+
className: string;
|
|
115
|
+
customProperties: "--flex-basis"[];
|
|
116
|
+
};
|
|
117
|
+
flexShrink: {
|
|
118
|
+
type: "enum | string";
|
|
119
|
+
className: string;
|
|
120
|
+
customProperties: "--flex-shrink"[];
|
|
121
|
+
values: readonly ["0", "1"];
|
|
122
|
+
};
|
|
123
|
+
flexGrow: {
|
|
124
|
+
type: "enum | string";
|
|
125
|
+
className: string;
|
|
126
|
+
customProperties: "--flex-grow"[];
|
|
127
|
+
values: readonly ["0", "1"];
|
|
128
|
+
};
|
|
129
|
+
gridArea: {
|
|
130
|
+
type: "string";
|
|
131
|
+
className: string;
|
|
132
|
+
customProperties: "--grid-area"[];
|
|
133
|
+
};
|
|
134
|
+
gridColumn: {
|
|
135
|
+
type: "string";
|
|
136
|
+
className: string;
|
|
137
|
+
customProperties: "--grid-column"[];
|
|
138
|
+
};
|
|
139
|
+
gridColumnStart: {
|
|
140
|
+
type: "string";
|
|
141
|
+
className: string;
|
|
142
|
+
customProperties: "--grid-column-start"[];
|
|
143
|
+
};
|
|
144
|
+
gridColumnEnd: {
|
|
145
|
+
type: "string";
|
|
146
|
+
className: string;
|
|
147
|
+
customProperties: "--grid-column-end"[];
|
|
148
|
+
};
|
|
149
|
+
gridRow: {
|
|
150
|
+
type: "string";
|
|
151
|
+
className: string;
|
|
152
|
+
customProperties: "--grid-row"[];
|
|
153
|
+
};
|
|
154
|
+
gridRowStart: {
|
|
155
|
+
type: "string";
|
|
156
|
+
className: string;
|
|
157
|
+
customProperties: "--grid-row-start"[];
|
|
158
|
+
};
|
|
159
|
+
gridRowEnd: {
|
|
160
|
+
type: "string";
|
|
161
|
+
className: string;
|
|
162
|
+
customProperties: "--grid-row-end"[];
|
|
163
|
+
};
|
|
164
|
+
alignSelf: {
|
|
165
|
+
type: "enum";
|
|
166
|
+
className: string;
|
|
167
|
+
values: readonly ["start", "center", "end", "baseline", "stretch"];
|
|
168
|
+
};
|
|
169
|
+
justifySelf: {
|
|
170
|
+
type: "enum";
|
|
171
|
+
className: string;
|
|
172
|
+
values: readonly ["start", "center", "end", "baseline", "stretch"];
|
|
173
|
+
};
|
|
174
|
+
p: {
|
|
175
|
+
type: "enum | string";
|
|
176
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
|
|
177
|
+
className: string;
|
|
178
|
+
customProperties: "--p"[];
|
|
179
|
+
};
|
|
180
|
+
px: {
|
|
181
|
+
type: "enum | string";
|
|
182
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
|
|
183
|
+
className: string;
|
|
184
|
+
customProperties: "--px"[];
|
|
185
|
+
};
|
|
186
|
+
py: {
|
|
187
|
+
type: "enum | string";
|
|
188
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
|
|
189
|
+
className: string;
|
|
190
|
+
customProperties: "--py"[];
|
|
191
|
+
};
|
|
192
|
+
pt: {
|
|
193
|
+
type: "enum | string";
|
|
194
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
|
|
195
|
+
className: string;
|
|
196
|
+
customProperties: "--pt"[];
|
|
197
|
+
};
|
|
198
|
+
pr: {
|
|
199
|
+
type: "enum | string";
|
|
200
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
|
|
201
|
+
className: string;
|
|
202
|
+
customProperties: "--pr"[];
|
|
203
|
+
};
|
|
204
|
+
pb: {
|
|
205
|
+
type: "enum | string";
|
|
206
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
|
|
207
|
+
className: string;
|
|
208
|
+
customProperties: "--pb"[];
|
|
209
|
+
};
|
|
210
|
+
pl: {
|
|
211
|
+
type: "enum | string";
|
|
212
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
|
|
213
|
+
className: string;
|
|
214
|
+
customProperties: "--pl"[];
|
|
215
|
+
};
|
|
216
|
+
height: {
|
|
217
|
+
type: "string";
|
|
218
|
+
className: string;
|
|
219
|
+
customProperties: "--height"[];
|
|
220
|
+
};
|
|
221
|
+
minHeight: {
|
|
222
|
+
type: "string";
|
|
223
|
+
className: string;
|
|
224
|
+
customProperties: "--min-height"[];
|
|
225
|
+
};
|
|
226
|
+
maxHeight: {
|
|
227
|
+
type: "string";
|
|
228
|
+
className: string;
|
|
229
|
+
customProperties: "--max-height"[];
|
|
230
|
+
};
|
|
231
|
+
width: {
|
|
232
|
+
type: "string";
|
|
233
|
+
className: string;
|
|
234
|
+
customProperties: "--width"[];
|
|
235
|
+
};
|
|
236
|
+
minWidth: {
|
|
237
|
+
type: "string";
|
|
238
|
+
className: string;
|
|
239
|
+
customProperties: "--min-width"[];
|
|
240
|
+
};
|
|
241
|
+
maxWidth: {
|
|
242
|
+
type: "string";
|
|
243
|
+
className: string;
|
|
244
|
+
customProperties: "--max-width"[];
|
|
245
|
+
};
|
|
246
|
+
display: {
|
|
247
|
+
type: "enum";
|
|
248
|
+
className: string;
|
|
249
|
+
values: readonly ["none", "inline-grid", "grid"];
|
|
250
|
+
default: "grid";
|
|
251
|
+
};
|
|
252
|
+
areas: {
|
|
253
|
+
type: "string";
|
|
254
|
+
className: string;
|
|
255
|
+
customProperties: "--grid-template-areas"[];
|
|
256
|
+
};
|
|
257
|
+
columns: {
|
|
258
|
+
type: "enum | string";
|
|
259
|
+
className: string;
|
|
260
|
+
customProperties: "--grid-template-columns"[];
|
|
261
|
+
values: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
262
|
+
parseValue: (value: string) => string;
|
|
263
|
+
};
|
|
264
|
+
rows: {
|
|
265
|
+
type: "enum | string";
|
|
266
|
+
className: string;
|
|
267
|
+
customProperties: "--grid-template-rows"[];
|
|
268
|
+
values: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
269
|
+
parseValue: (value: string) => string;
|
|
270
|
+
};
|
|
271
|
+
flow: {
|
|
272
|
+
type: "enum";
|
|
273
|
+
className: string;
|
|
274
|
+
values: readonly ["row", "column", "dense", "row-dense", "column-dense"];
|
|
275
|
+
default: "row";
|
|
276
|
+
};
|
|
277
|
+
align: {
|
|
278
|
+
type: "enum";
|
|
279
|
+
className: string;
|
|
280
|
+
values: readonly ["start", "center", "end", "baseline", "stretch"];
|
|
281
|
+
default: "start";
|
|
282
|
+
};
|
|
283
|
+
justify: {
|
|
284
|
+
type: "enum";
|
|
285
|
+
className: string;
|
|
286
|
+
values: readonly ["start", "center", "end", "between"];
|
|
287
|
+
parseValue: (value: string) => string;
|
|
288
|
+
default: "start";
|
|
289
|
+
};
|
|
290
|
+
alignContent: {
|
|
291
|
+
type: "enum";
|
|
292
|
+
className: string;
|
|
293
|
+
values: readonly ["start", "center", "end", "baseline", "between", "around", "evenly", "stretch"];
|
|
294
|
+
parseValue: (value: string) => string;
|
|
295
|
+
default: "start";
|
|
296
|
+
};
|
|
297
|
+
justifyItems: {
|
|
298
|
+
type: "enum";
|
|
299
|
+
className: string;
|
|
300
|
+
values: readonly ["start", "center", "end", "baseline", "stretch"];
|
|
301
|
+
default: "start";
|
|
302
|
+
};
|
|
303
|
+
asChild: {
|
|
304
|
+
type: "boolean";
|
|
305
|
+
};
|
|
306
|
+
as: {
|
|
307
|
+
type: "enum";
|
|
308
|
+
values: readonly ["div", "span"];
|
|
309
|
+
default: "div";
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
export { GridPropDefs };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentPropsWithout, DefaultRemovedProps } from '../../core/react';
|
|
2
|
+
import { GetPropDefTypes } from '../../core/defs';
|
|
3
|
+
import { GridPropDefs } from './grid.defs';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
type GridPropDefs = GetPropDefTypes<typeof GridPropDefs>;
|
|
6
|
+
type GridDivProps = {
|
|
7
|
+
as?: 'div';
|
|
8
|
+
} & ComponentPropsWithout<'div', DefaultRemovedProps>;
|
|
9
|
+
type GridSpanProps = {
|
|
10
|
+
as: 'span';
|
|
11
|
+
} & ComponentPropsWithout<'span', DefaultRemovedProps>;
|
|
12
|
+
type GridProps = GridPropDefs & (GridDivProps | GridSpanProps);
|
|
13
|
+
declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export default Grid;
|
|
15
|
+
export type { GridProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GetPropDefTypes } from '../../core/defs';
|
|
2
|
+
import { ComponentPropsWithout } from '../../core/react';
|
|
3
|
+
import { RadioPropDefs } from './radio.defs';
|
|
4
|
+
import { RadioBase } from './radio.base';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
type RadioPropDefsType = GetPropDefTypes<typeof RadioPropDefs>;
|
|
7
|
+
type RadioBaseProps = ComponentPropsWithout<typeof RadioBase, 'asChild' | 'color' | 'defaultValue' | 'children'>;
|
|
8
|
+
interface RadioProps extends RadioPropDefsType, RadioBaseProps {
|
|
9
|
+
}
|
|
10
|
+
declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export default Radio;
|
|
12
|
+
export type { RadioProps };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Base } from '../__internal';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const createRadioBaseScope: import('../../core/react').CreateScope;
|
|
4
|
+
type BaseButtonProps = React.ComponentPropsWithoutRef<typeof Base.button>;
|
|
5
|
+
interface RadioBaseProps extends BaseButtonProps {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
onCheck?(): void;
|
|
9
|
+
}
|
|
10
|
+
declare const RadioBase: React.ForwardRefExoticComponent<RadioBaseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
type BaseSpanProps = React.ComponentPropsWithoutRef<typeof Base.span>;
|
|
12
|
+
export interface RadioIndicatorProps extends BaseSpanProps {
|
|
13
|
+
forceMount?: true;
|
|
14
|
+
}
|
|
15
|
+
declare const RadioBaseIndicator: React.ForwardRefExoticComponent<RadioIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
16
|
+
type InputProps = React.ComponentPropsWithoutRef<typeof Base.input>;
|
|
17
|
+
interface RadioBubbleInputProps extends Omit<InputProps, 'checked'> {
|
|
18
|
+
checked: boolean;
|
|
19
|
+
control: HTMLElement | null;
|
|
20
|
+
bubbles: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const RadioBaseBubbleInput: React.ForwardRefExoticComponent<RadioBubbleInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
23
|
+
export { createRadioBaseScope, RadioBase, RadioBaseIndicator, RadioBaseBubbleInput };
|
|
24
|
+
export type { RadioBaseProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const RadioPropDefs: {
|
|
2
|
+
size: {
|
|
3
|
+
type: "enum";
|
|
4
|
+
className: string;
|
|
5
|
+
values: readonly ["1", "2", "3", "4"];
|
|
6
|
+
default: "2";
|
|
7
|
+
};
|
|
8
|
+
variant: {
|
|
9
|
+
type: "enum";
|
|
10
|
+
className: string;
|
|
11
|
+
values: readonly ["classic", "outline"];
|
|
12
|
+
default: "classic";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export { RadioPropDefs };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Scope, DefaultRemovedProps, ComponentPropsWithout } from '../../core/react';
|
|
2
|
+
import { GetPropDefTypes } from '../../core/defs';
|
|
3
|
+
import { RadioGroupBaseItem, RadioGroupBase } from './radioGroup.base';
|
|
4
|
+
import { RadioGroupRootPropDefs } from './radioGroup.defs';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
type RadioGroupRootPropDefsType = GetPropDefTypes<typeof RadioGroupRootPropDefs>;
|
|
7
|
+
interface RadioGroupRootProps extends ComponentPropsWithout<typeof RadioGroupBase, 'asChild' | 'color' | 'defaultChecked'>, RadioGroupRootPropDefsType {
|
|
8
|
+
}
|
|
9
|
+
interface RadioGroupItemProps extends ComponentPropsWithout<typeof RadioGroupItemRadio, DefaultRemovedProps> {
|
|
10
|
+
}
|
|
11
|
+
interface RadioGroupItemRadioProps extends React.ComponentPropsWithoutRef<typeof RadioGroupBaseItem> {
|
|
12
|
+
}
|
|
13
|
+
declare const RadioGroupItemRadio: React.ForwardRefExoticComponent<RadioGroupItemRadioProps & {
|
|
14
|
+
__scopeRadioGroup?: Scope;
|
|
15
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
declare const RadioGroup: {
|
|
17
|
+
Root: React.ForwardRefExoticComponent<RadioGroupRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
Item: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
};
|
|
20
|
+
export default RadioGroup;
|
|
21
|
+
export type { RadioGroupRootProps, RadioGroupItemProps };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { RadioBase, RadioBaseIndicator } from '../Radio/radio.base';
|
|
2
|
+
import { Base, RovingFocusGroup } from '../__internal';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const createRadioGroupBaseScope: import('../../core/react').CreateScope;
|
|
5
|
+
type RadioGroupBaseContextValue = {
|
|
6
|
+
name?: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
value: string | null;
|
|
10
|
+
onValueChange(value: string): void;
|
|
11
|
+
};
|
|
12
|
+
type RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup>;
|
|
13
|
+
type BaseDivProps = React.ComponentPropsWithoutRef<typeof Base.div>;
|
|
14
|
+
interface RadioGroupBaseProps extends BaseDivProps {
|
|
15
|
+
name?: RadioGroupBaseContextValue['name'];
|
|
16
|
+
required?: React.ComponentPropsWithoutRef<typeof RadioBase>['required'];
|
|
17
|
+
disabled?: React.ComponentPropsWithoutRef<typeof RadioBase>['disabled'];
|
|
18
|
+
orientation?: RovingFocusGroupProps['orientation'];
|
|
19
|
+
loop?: RovingFocusGroupProps['loop'];
|
|
20
|
+
defaultValue?: string;
|
|
21
|
+
value?: string | null;
|
|
22
|
+
onValueChange?: RadioGroupBaseContextValue['onValueChange'];
|
|
23
|
+
}
|
|
24
|
+
declare const RadioGroupBase: React.ForwardRefExoticComponent<RadioGroupBaseProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
type RadioBaseProps = React.ComponentPropsWithoutRef<typeof RadioBase>;
|
|
26
|
+
interface RadioGroupBaseItemProps extends Omit<RadioBaseProps, 'onCheck' | 'name'> {
|
|
27
|
+
value: string;
|
|
28
|
+
}
|
|
29
|
+
declare const RadioGroupBaseItem: React.ForwardRefExoticComponent<RadioGroupBaseItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
type RadioBaseIndicatorProps = React.ComponentPropsWithoutRef<typeof RadioBaseIndicator>;
|
|
31
|
+
interface RadioGroupBaseIndicatorProps extends RadioBaseIndicatorProps {
|
|
32
|
+
}
|
|
33
|
+
declare const RadioGroupBaseIndicator: React.ForwardRefExoticComponent<RadioGroupBaseIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
34
|
+
export { createRadioGroupBaseScope, RadioGroupBase, RadioGroupBaseItem, RadioGroupBaseIndicator };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
declare const RadioGroupRootPropDefs: {
|
|
2
|
+
m: {
|
|
3
|
+
type: "enum | string";
|
|
4
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
5
|
+
className: string;
|
|
6
|
+
customProperties: "--m"[];
|
|
7
|
+
};
|
|
8
|
+
mx: {
|
|
9
|
+
type: "enum | string";
|
|
10
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
11
|
+
className: string;
|
|
12
|
+
customProperties: ("--ml" | "--mr")[];
|
|
13
|
+
};
|
|
14
|
+
my: {
|
|
15
|
+
type: "enum | string";
|
|
16
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
17
|
+
className: string;
|
|
18
|
+
customProperties: ("--mt" | "--mb")[];
|
|
19
|
+
};
|
|
20
|
+
mt: {
|
|
21
|
+
type: "enum | string";
|
|
22
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
23
|
+
className: string;
|
|
24
|
+
customProperties: "--mt"[];
|
|
25
|
+
};
|
|
26
|
+
mr: {
|
|
27
|
+
type: "enum | string";
|
|
28
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
29
|
+
className: string;
|
|
30
|
+
customProperties: "--mr"[];
|
|
31
|
+
};
|
|
32
|
+
mb: {
|
|
33
|
+
type: "enum | string";
|
|
34
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
35
|
+
className: string;
|
|
36
|
+
customProperties: "--mb"[];
|
|
37
|
+
};
|
|
38
|
+
ml: {
|
|
39
|
+
type: "enum | string";
|
|
40
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
41
|
+
className: string;
|
|
42
|
+
customProperties: "--ml"[];
|
|
43
|
+
};
|
|
44
|
+
size: {
|
|
45
|
+
type: "enum";
|
|
46
|
+
className: string;
|
|
47
|
+
values: readonly ["1", "2", "3"];
|
|
48
|
+
default: "2";
|
|
49
|
+
};
|
|
50
|
+
variant: {
|
|
51
|
+
type: "enum";
|
|
52
|
+
className: string;
|
|
53
|
+
values: readonly ["classic", "outline"];
|
|
54
|
+
default: "classic";
|
|
55
|
+
};
|
|
56
|
+
asChild: {
|
|
57
|
+
type: "boolean";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export { RadioGroupRootPropDefs };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
declare const sizes: readonly ["1", "2", "3"];
|
|
2
1
|
declare const SpinnerPropDefs: {
|
|
3
2
|
m: {
|
|
4
3
|
type: "enum | string";
|
|
@@ -58,4 +57,4 @@ declare const SpinnerPropDefs: {
|
|
|
58
57
|
values: readonly ["gray50", "gray100", "gray200", "gray300", "gray400", "gray500", "gray600", "gray700", "gray800", "gray900", "gray1000", "gray1100", "gray1200", "gray1300", "gray1400", "gray1500", "blue50", "blue100", "blue200", "blue300", "blue400", "blue500", "blue600", "blue700", "blue800", "blue900", "blue1000", "blue1100", "blue1200", "blue1300", "blue1400", "green50", "green100", "green200", "green300", "green400", "green500", "green600", "green700", "green800", "green900", "green1000", "green1100", "green1200", "red50", "red100", "red200", "red300", "red400", "red500", "red600", "red700", "red800", "red900", "red1000", "red1100"];
|
|
59
58
|
};
|
|
60
59
|
};
|
|
61
|
-
export { SpinnerPropDefs
|
|
60
|
+
export { SpinnerPropDefs };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GetPropDefTypes } from '../../core/defs';
|
|
2
|
+
import { ComponentPropsWithout } from '../../core/react';
|
|
3
|
+
import { SwitchBase } from './switch.base';
|
|
4
|
+
import { SwitchPropDefs } from './switch.defs';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
type SwitchPropDefsType = GetPropDefTypes<typeof SwitchPropDefs>;
|
|
7
|
+
interface SwitchProps extends ComponentPropsWithout<typeof SwitchBase, 'asChild' | 'color' | 'defaultValue' | 'children'>, SwitchPropDefsType {
|
|
8
|
+
}
|
|
9
|
+
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export default Switch;
|
|
11
|
+
export type { SwitchProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Base } from '../__internal';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const createSwitchScope: import('../../core/react').CreateScope;
|
|
4
|
+
type BaseButtonProps = React.ComponentPropsWithoutRef<typeof Base.button>;
|
|
5
|
+
interface SwitchProps extends BaseButtonProps {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
defaultChecked?: boolean;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
onCheckedChange?(checked: boolean): void;
|
|
10
|
+
}
|
|
11
|
+
declare const SwitchBase: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
type BaseSpanProps = React.ComponentPropsWithoutRef<typeof Base.span>;
|
|
13
|
+
interface SwitchThumbProps extends BaseSpanProps {
|
|
14
|
+
}
|
|
15
|
+
declare const SwitchBaseThumb: React.ForwardRefExoticComponent<SwitchThumbProps & React.RefAttributes<HTMLSpanElement>>;
|
|
16
|
+
export { createSwitchScope, SwitchBase, SwitchBaseThumb };
|
|
17
|
+
export type { SwitchProps, SwitchThumbProps };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
declare const SwitchPropDefs: {
|
|
2
|
+
m: {
|
|
3
|
+
type: "enum | string";
|
|
4
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
5
|
+
className: string;
|
|
6
|
+
customProperties: "--m"[];
|
|
7
|
+
};
|
|
8
|
+
mx: {
|
|
9
|
+
type: "enum | string";
|
|
10
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
11
|
+
className: string;
|
|
12
|
+
customProperties: ("--ml" | "--mr")[];
|
|
13
|
+
};
|
|
14
|
+
my: {
|
|
15
|
+
type: "enum | string";
|
|
16
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
17
|
+
className: string;
|
|
18
|
+
customProperties: ("--mt" | "--mb")[];
|
|
19
|
+
};
|
|
20
|
+
mt: {
|
|
21
|
+
type: "enum | string";
|
|
22
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
23
|
+
className: string;
|
|
24
|
+
customProperties: "--mt"[];
|
|
25
|
+
};
|
|
26
|
+
mr: {
|
|
27
|
+
type: "enum | string";
|
|
28
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
29
|
+
className: string;
|
|
30
|
+
customProperties: "--mr"[];
|
|
31
|
+
};
|
|
32
|
+
mb: {
|
|
33
|
+
type: "enum | string";
|
|
34
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
35
|
+
className: string;
|
|
36
|
+
customProperties: "--mb"[];
|
|
37
|
+
};
|
|
38
|
+
ml: {
|
|
39
|
+
type: "enum | string";
|
|
40
|
+
values: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"];
|
|
41
|
+
className: string;
|
|
42
|
+
customProperties: "--ml"[];
|
|
43
|
+
};
|
|
44
|
+
size: {
|
|
45
|
+
type: "enum";
|
|
46
|
+
className: string;
|
|
47
|
+
values: readonly ["1", "2", "3"];
|
|
48
|
+
default: "2";
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export { SwitchPropDefs };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GetPropDefTypes } from '../../core/defs';
|
|
2
|
+
import { ComponentPropsWithout, DefaultRemovedProps, NotInputTextualAttributes } from '../../core/react';
|
|
3
|
+
import { TextFieldRootPropDefs, TextFieldSlotPropDefs } from './textField.defs';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
type TextFieldRootPropDefsType = GetPropDefTypes<typeof TextFieldRootPropDefs>;
|
|
6
|
+
type TextFieldInputProps = ComponentPropsWithout<'input', NotInputTextualAttributes | 'color' | 'defaultValue' | 'size' | 'type' | 'value'>;
|
|
7
|
+
interface TextFieldRootProps extends TextFieldInputProps, TextFieldRootPropDefsType {
|
|
8
|
+
defaultValue?: string | number;
|
|
9
|
+
value?: string | number;
|
|
10
|
+
type?: 'email' | 'hidden' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url';
|
|
11
|
+
}
|
|
12
|
+
type TextFieldSlotPropDefsType = GetPropDefTypes<typeof TextFieldSlotPropDefs>;
|
|
13
|
+
interface TextFieldSlotProps extends ComponentPropsWithout<'div', DefaultRemovedProps>, TextFieldSlotPropDefsType {
|
|
14
|
+
}
|
|
15
|
+
declare const TextField: React.ForwardRefExoticComponent<TextFieldRootProps & React.RefAttributes<HTMLInputElement>> & {
|
|
16
|
+
Slot: React.ForwardRefExoticComponent<TextFieldSlotProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
};
|
|
18
|
+
export default TextField;
|
|
19
|
+
export type { TextFieldRootProps, TextFieldSlotProps };
|