@abgov/react-components 3.4.0-alpha.46 → 3.4.0-alpha.49
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.
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare type CircularProgressType = 'infinite' | 'progress';
|
|
3
3
|
export declare type CircularProgressVariant = "fullscreen" | "inline";
|
|
4
|
+
export declare type CircularProgressSize = "small" | "large";
|
|
4
5
|
interface WCProps {
|
|
5
6
|
type?: CircularProgressType;
|
|
6
7
|
variant?: CircularProgressVariant;
|
|
8
|
+
size?: CircularProgressSize;
|
|
7
9
|
message?: string;
|
|
8
10
|
visible?: string;
|
|
9
11
|
progress?: number;
|
|
@@ -18,9 +20,10 @@ declare global {
|
|
|
18
20
|
export interface CircularProgressProps {
|
|
19
21
|
type?: CircularProgressType;
|
|
20
22
|
variant?: CircularProgressVariant;
|
|
23
|
+
size?: CircularProgressSize;
|
|
21
24
|
message?: string;
|
|
22
25
|
visible?: boolean;
|
|
23
26
|
progress?: number;
|
|
24
27
|
}
|
|
25
|
-
export declare const GoACircularProgress: ({ type, visible, message, progress, variant }: CircularProgressProps) => JSX.Element;
|
|
28
|
+
export declare const GoACircularProgress: ({ type, visible, message, progress, variant, size }: CircularProgressProps) => JSX.Element;
|
|
26
29
|
export default GoACircularProgress;
|
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import React, { FC } from "react";
|
|
2
2
|
import { GoAIconType } from "../icons";
|
|
3
3
|
export * from './dropdown-option';
|
|
4
|
-
interface
|
|
4
|
+
interface WCProps {
|
|
5
5
|
ref: React.MutableRefObject<HTMLElement | null>;
|
|
6
6
|
name: string;
|
|
7
7
|
values: string;
|
|
8
8
|
leadingicon?: string;
|
|
9
9
|
maxheight?: number;
|
|
10
10
|
placeholder?: string;
|
|
11
|
-
|
|
11
|
+
filterable?: boolean;
|
|
12
12
|
disabled?: boolean;
|
|
13
|
+
error?: boolean;
|
|
13
14
|
multiselect?: boolean;
|
|
14
15
|
}
|
|
15
16
|
declare global {
|
|
16
17
|
namespace JSX {
|
|
17
18
|
interface IntrinsicElements {
|
|
18
|
-
'goa-dropdown':
|
|
19
|
+
'goa-dropdown': WCProps & React.HTMLAttributes<HTMLElement>;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
interface Props {
|
|
23
24
|
name: string;
|
|
24
|
-
|
|
25
|
+
values: string[];
|
|
25
26
|
onChange: (name: string, values: string[]) => void;
|
|
26
27
|
disabled?: boolean;
|
|
27
|
-
|
|
28
|
+
filterable?: boolean;
|
|
28
29
|
leadingIcon?: GoAIconType;
|
|
29
30
|
maxHeight?: number;
|
|
30
|
-
|
|
31
|
+
error?: boolean;
|
|
32
|
+
multiselect?: boolean;
|
|
31
33
|
placeholder?: string;
|
|
32
34
|
testId?: string;
|
|
33
35
|
}
|
package/package.json
CHANGED
package/react-components.esm.js
CHANGED
|
@@ -217,14 +217,16 @@ const GoACircularProgress = ({
|
|
|
217
217
|
visible,
|
|
218
218
|
message,
|
|
219
219
|
progress,
|
|
220
|
-
variant
|
|
220
|
+
variant,
|
|
221
|
+
size
|
|
221
222
|
}) => {
|
|
222
223
|
return jsx("goa-circular-progress", {
|
|
223
224
|
type: type,
|
|
224
225
|
visible: visible ? "true" : "false",
|
|
225
226
|
message: message,
|
|
226
227
|
progress: progress,
|
|
227
|
-
variant: variant
|
|
228
|
+
variant: variant,
|
|
229
|
+
size: size
|
|
228
230
|
}, void 0);
|
|
229
231
|
};
|
|
230
232
|
|
|
@@ -275,7 +277,7 @@ const GoADropdown = props => {
|
|
|
275
277
|
const {
|
|
276
278
|
name,
|
|
277
279
|
value
|
|
278
|
-
} = state.detail
|
|
280
|
+
} = state.detail;
|
|
279
281
|
props.onChange(name, value);
|
|
280
282
|
};
|
|
281
283
|
|
|
@@ -287,13 +289,14 @@ const GoADropdown = props => {
|
|
|
287
289
|
return jsx("goa-dropdown", Object.assign({
|
|
288
290
|
ref: el,
|
|
289
291
|
name: props.name,
|
|
290
|
-
values: JSON.stringify(props.
|
|
292
|
+
values: JSON.stringify(props.values),
|
|
291
293
|
leadingicon: props.leadingIcon,
|
|
292
294
|
maxheight: props.maxHeight,
|
|
293
295
|
placeholder: props.placeholder,
|
|
294
|
-
|
|
296
|
+
filterable: props.filterable,
|
|
295
297
|
disabled: props.disabled,
|
|
296
|
-
multiselect: props.
|
|
298
|
+
multiselect: props.multiselect,
|
|
299
|
+
error: props.error,
|
|
297
300
|
"data-testid": props.testId
|
|
298
301
|
}, {
|
|
299
302
|
children: props.children
|
|
@@ -697,6 +700,11 @@ const GoARadioGroup = ({
|
|
|
697
700
|
}
|
|
698
701
|
|
|
699
702
|
const listener = e => {
|
|
703
|
+
if (!onChange) {
|
|
704
|
+
console.warn("Missing onChange function");
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
707
|
+
|
|
700
708
|
onChange(name, e.detail.value);
|
|
701
709
|
};
|
|
702
710
|
|
package/react-components.umd.js
CHANGED
|
@@ -256,13 +256,15 @@
|
|
|
256
256
|
visible = _a.visible,
|
|
257
257
|
message = _a.message,
|
|
258
258
|
progress = _a.progress,
|
|
259
|
-
variant = _a.variant
|
|
259
|
+
variant = _a.variant,
|
|
260
|
+
size = _a.size;
|
|
260
261
|
return jsxRuntime.jsx("goa-circular-progress", {
|
|
261
262
|
type: type,
|
|
262
263
|
visible: visible ? "true" : "false",
|
|
263
264
|
message: message,
|
|
264
265
|
progress: progress,
|
|
265
|
-
variant: variant
|
|
266
|
+
variant: variant,
|
|
267
|
+
size: size
|
|
266
268
|
}, void 0);
|
|
267
269
|
};
|
|
268
270
|
|
|
@@ -310,7 +312,7 @@
|
|
|
310
312
|
var current = el.current;
|
|
311
313
|
|
|
312
314
|
var handler = function handler(state) {
|
|
313
|
-
var _a = state.detail
|
|
315
|
+
var _a = state.detail,
|
|
314
316
|
name = _a.name,
|
|
315
317
|
value = _a.value;
|
|
316
318
|
props.onChange(name, value);
|
|
@@ -324,13 +326,14 @@
|
|
|
324
326
|
return jsxRuntime.jsx("goa-dropdown", __assign({
|
|
325
327
|
ref: el,
|
|
326
328
|
name: props.name,
|
|
327
|
-
values: JSON.stringify(props.
|
|
329
|
+
values: JSON.stringify(props.values),
|
|
328
330
|
leadingicon: props.leadingIcon,
|
|
329
331
|
maxheight: props.maxHeight,
|
|
330
332
|
placeholder: props.placeholder,
|
|
331
|
-
|
|
333
|
+
filterable: props.filterable,
|
|
332
334
|
disabled: props.disabled,
|
|
333
|
-
multiselect: props.
|
|
335
|
+
multiselect: props.multiselect,
|
|
336
|
+
error: props.error,
|
|
334
337
|
"data-testid": props.testId
|
|
335
338
|
}, {
|
|
336
339
|
children: props.children
|
|
@@ -705,6 +708,11 @@
|
|
|
705
708
|
}
|
|
706
709
|
|
|
707
710
|
var listener = function listener(e) {
|
|
711
|
+
if (!onChange) {
|
|
712
|
+
console.warn("Missing onChange function");
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
|
|
708
716
|
onChange(name, e.detail.value);
|
|
709
717
|
};
|
|
710
718
|
|