@versaur/react 1.0.6 → 1.0.8
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/dist/blocks.d.ts +32 -0
- package/dist/blocks.js +448 -386
- package/dist/forms.d.ts +47 -100
- package/dist/forms.js +297 -400
- package/dist/primitive.d.ts +40 -0
- package/dist/primitive.js +127 -113
- package/package.json +2 -2
package/dist/forms.d.ts
CHANGED
|
@@ -5,8 +5,6 @@ import { InputHTMLAttributes } from 'react';
|
|
|
5
5
|
import { LabelHTMLAttributes } from 'react';
|
|
6
6
|
import { OptgroupHTMLAttributes } from 'react';
|
|
7
7
|
import { OptionHTMLAttributes } from 'react';
|
|
8
|
-
import { Radio as Radio_2 } from '@versaur/core/forms';
|
|
9
|
-
import { RadioGroup as RadioGroup_2 } from '@versaur/core/forms';
|
|
10
8
|
import { ReactNode } from 'react';
|
|
11
9
|
import { RefAttributes } from 'react';
|
|
12
10
|
import { SelectHTMLAttributes } from 'react';
|
|
@@ -43,10 +41,6 @@ export declare interface CheckboxGroupOptionProps extends Omit<InputHTMLAttribut
|
|
|
43
41
|
* Label text (children)
|
|
44
42
|
*/
|
|
45
43
|
children?: ReactNode;
|
|
46
|
-
/**
|
|
47
|
-
* Required indicator for this specific option
|
|
48
|
-
*/
|
|
49
|
-
required?: boolean;
|
|
50
44
|
/**
|
|
51
45
|
* Disabled state for this specific option
|
|
52
46
|
*/
|
|
@@ -98,10 +92,6 @@ export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInpu
|
|
|
98
92
|
* Label text (children)
|
|
99
93
|
*/
|
|
100
94
|
children?: ReactNode;
|
|
101
|
-
/**
|
|
102
|
-
* Invalid/error state
|
|
103
|
-
*/
|
|
104
|
-
invalid?: boolean;
|
|
105
95
|
/**
|
|
106
96
|
* Required field indicator
|
|
107
97
|
*/
|
|
@@ -109,36 +99,16 @@ export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInpu
|
|
|
109
99
|
}
|
|
110
100
|
|
|
111
101
|
/**
|
|
112
|
-
*
|
|
102
|
+
* ChipInput compound component with Option subcomponent
|
|
113
103
|
*/
|
|
114
|
-
export declare const
|
|
115
|
-
Option: ForwardRefExoticComponent<
|
|
104
|
+
export declare const ChipInput: ForwardRefExoticComponent<ChipInputRootProps & RefAttributes<HTMLDivElement>> & {
|
|
105
|
+
Option: ForwardRefExoticComponent<ChipInputOptionProps & RefAttributes<HTMLButtonElement>>;
|
|
116
106
|
};
|
|
117
107
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
value: string;
|
|
123
|
-
/**
|
|
124
|
-
* Label text (children)
|
|
125
|
-
*/
|
|
126
|
-
children?: ReactNode;
|
|
127
|
-
/**
|
|
128
|
-
* Disabled state for this specific chip
|
|
129
|
-
*/
|
|
130
|
-
disabled?: boolean;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export declare interface ChipMultipleInputRootProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
134
|
-
/**
|
|
135
|
-
* Array of selected chip values
|
|
136
|
-
*/
|
|
137
|
-
value: string[];
|
|
138
|
-
/**
|
|
139
|
-
* Change handler
|
|
140
|
-
*/
|
|
141
|
-
onChange: (value: string[]) => void;
|
|
108
|
+
/**
|
|
109
|
+
* Base props shared by both single and multiple ChipInput
|
|
110
|
+
*/
|
|
111
|
+
declare interface ChipInputBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
142
112
|
/**
|
|
143
113
|
* Name attribute for the input group
|
|
144
114
|
*/
|
|
@@ -176,70 +146,71 @@ export declare interface ChipMultipleInputRootProps extends Omit<HTMLAttributes<
|
|
|
176
146
|
}
|
|
177
147
|
|
|
178
148
|
/**
|
|
179
|
-
*
|
|
149
|
+
* Props for multiple-selection mode (multiple={true})
|
|
180
150
|
*/
|
|
181
|
-
|
|
182
|
-
Option: ForwardRefExoticComponent<ChipSingleInputOptionProps & RefAttributes<HTMLButtonElement>>;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
export declare interface ChipSingleInputOptionProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "value"> {
|
|
151
|
+
declare interface ChipInputMultipleProps extends ChipInputBaseProps {
|
|
186
152
|
/**
|
|
187
|
-
*
|
|
153
|
+
* Enable multiple selection
|
|
188
154
|
*/
|
|
189
|
-
|
|
155
|
+
multiple: true;
|
|
190
156
|
/**
|
|
191
|
-
*
|
|
157
|
+
* Array of selected chip values
|
|
192
158
|
*/
|
|
193
|
-
|
|
159
|
+
value: string[];
|
|
194
160
|
/**
|
|
195
|
-
*
|
|
161
|
+
* Change handler for array value
|
|
196
162
|
*/
|
|
197
|
-
|
|
163
|
+
onChange: (value: string[]) => void;
|
|
198
164
|
}
|
|
199
165
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
value: string | undefined;
|
|
205
|
-
/**
|
|
206
|
-
* Change handler
|
|
207
|
-
*/
|
|
208
|
-
onChange: (value: string) => void;
|
|
166
|
+
/**
|
|
167
|
+
* Props for ChipInput.Option subcomponent
|
|
168
|
+
*/
|
|
169
|
+
export declare interface ChipInputOptionProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "value"> {
|
|
209
170
|
/**
|
|
210
|
-
*
|
|
171
|
+
* Chip value
|
|
211
172
|
*/
|
|
212
|
-
|
|
173
|
+
value: string;
|
|
213
174
|
/**
|
|
214
|
-
* Label
|
|
175
|
+
* Label text (children)
|
|
215
176
|
*/
|
|
216
|
-
|
|
177
|
+
children?: ReactNode;
|
|
217
178
|
/**
|
|
218
|
-
*
|
|
179
|
+
* Disabled state for this specific chip
|
|
219
180
|
*/
|
|
220
|
-
|
|
181
|
+
disabled?: boolean;
|
|
221
182
|
/**
|
|
222
|
-
*
|
|
183
|
+
* Icon to display on the left side of the chip
|
|
223
184
|
*/
|
|
224
|
-
|
|
185
|
+
iconLeft?: ReactNode;
|
|
225
186
|
/**
|
|
226
|
-
*
|
|
187
|
+
* Icon to display on the right side of the chip
|
|
227
188
|
*/
|
|
228
|
-
|
|
189
|
+
iconRight?: ReactNode;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Discriminated union type for ChipInput root props
|
|
194
|
+
* Use multiple={false} (or omit it) for single selection, multiple={true} for multiple
|
|
195
|
+
*/
|
|
196
|
+
export declare type ChipInputRootProps = ChipInputSingleProps | ChipInputMultipleProps;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Props for single-selection mode (multiple={false} or omitted)
|
|
200
|
+
*/
|
|
201
|
+
declare interface ChipInputSingleProps extends ChipInputBaseProps {
|
|
229
202
|
/**
|
|
230
|
-
*
|
|
203
|
+
* Disable multiple selection (default)
|
|
231
204
|
*/
|
|
232
|
-
|
|
205
|
+
multiple?: false;
|
|
233
206
|
/**
|
|
234
|
-
*
|
|
235
|
-
* @default "2"
|
|
207
|
+
* Selected chip value
|
|
236
208
|
*/
|
|
237
|
-
|
|
209
|
+
value: string | undefined;
|
|
238
210
|
/**
|
|
239
|
-
*
|
|
240
|
-
* @default true
|
|
211
|
+
* Change handler for single value
|
|
241
212
|
*/
|
|
242
|
-
|
|
213
|
+
onChange: (value: string) => void;
|
|
243
214
|
}
|
|
244
215
|
|
|
245
216
|
/**
|
|
@@ -340,16 +311,6 @@ export declare interface RadioGroupRootProps extends Omit<HTMLAttributes<HTMLDiv
|
|
|
340
311
|
* Name attribute for all radio inputs
|
|
341
312
|
*/
|
|
342
313
|
name?: string;
|
|
343
|
-
/**
|
|
344
|
-
* Visual variant
|
|
345
|
-
* @default "outline"
|
|
346
|
-
*/
|
|
347
|
-
variant?: RadioGroup_2.Variant;
|
|
348
|
-
/**
|
|
349
|
-
* Size variant
|
|
350
|
-
* @default "medium"
|
|
351
|
-
*/
|
|
352
|
-
size?: RadioGroup_2.Size;
|
|
353
314
|
/**
|
|
354
315
|
* Label for the radio group
|
|
355
316
|
*/
|
|
@@ -378,24 +339,10 @@ export declare interface RadioGroupRootProps extends Omit<HTMLAttributes<HTMLDiv
|
|
|
378
339
|
}
|
|
379
340
|
|
|
380
341
|
export declare interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
|
|
381
|
-
/**
|
|
382
|
-
* Visual variant of the radio
|
|
383
|
-
* @default "outline"
|
|
384
|
-
*/
|
|
385
|
-
variant?: Radio_2.Variant;
|
|
386
|
-
/**
|
|
387
|
-
* Size of the radio
|
|
388
|
-
* @default "medium"
|
|
389
|
-
*/
|
|
390
|
-
size?: Radio_2.Size;
|
|
391
342
|
/**
|
|
392
343
|
* Label text (children)
|
|
393
344
|
*/
|
|
394
345
|
children?: ReactNode;
|
|
395
|
-
/**
|
|
396
|
-
* Invalid/error state
|
|
397
|
-
*/
|
|
398
|
-
invalid?: boolean;
|
|
399
346
|
}
|
|
400
347
|
|
|
401
348
|
export declare const Select: SelectComponent;
|