@abgov/react-components 4.0.0-alpha.13 → 4.0.0-alpha.14

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.
@@ -4,14 +4,16 @@ export * from './dropdown-option';
4
4
  interface WCProps {
5
5
  ref: React.MutableRefObject<HTMLElement | null>;
6
6
  name: string;
7
- values: string;
7
+ value: string;
8
8
  leadingicon?: string;
9
- maxheight?: number;
9
+ maxheight?: string;
10
10
  placeholder?: string;
11
11
  filterable?: boolean;
12
12
  disabled?: boolean;
13
13
  error?: boolean;
14
14
  multiselect?: boolean;
15
+ width?: string;
16
+ testid?: string;
15
17
  }
16
18
  declare global {
17
19
  namespace JSX {
@@ -22,16 +24,17 @@ declare global {
22
24
  }
23
25
  interface Props {
24
26
  name: string;
25
- values: string[];
27
+ value: string[];
26
28
  onChange: (name: string, values: string[]) => void;
27
29
  disabled?: boolean;
28
30
  filterable?: boolean;
29
31
  leadingIcon?: GoAIconType;
30
- maxHeight?: number;
32
+ maxHeight?: string;
31
33
  error?: boolean;
32
34
  multiselect?: boolean;
33
35
  placeholder?: string;
34
36
  testId?: string;
37
+ width?: string;
35
38
  }
36
39
  export declare const GoADropdown: FC<Props>;
37
40
  export default GoADropdown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "4.0.0-alpha.13",
3
+ "version": "4.0.0-alpha.14",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"
@@ -365,9 +365,9 @@ const GoADropdown = props => {
365
365
  const handler = state => {
366
366
  const {
367
367
  name,
368
- value
368
+ values
369
369
  } = state.detail;
370
- props.onChange(name, value);
370
+ props.onChange(name, values);
371
371
  };
372
372
 
373
373
  current.addEventListener('_change', handler);
@@ -378,7 +378,7 @@ const GoADropdown = props => {
378
378
  return jsx("goa-dropdown", Object.assign({
379
379
  ref: el,
380
380
  name: props.name,
381
- values: JSON.stringify(props.values),
381
+ value: JSON.stringify(props.value),
382
382
  leadingicon: props.leadingIcon,
383
383
  maxheight: props.maxHeight,
384
384
  placeholder: props.placeholder,
@@ -386,7 +386,8 @@ const GoADropdown = props => {
386
386
  disabled: props.disabled,
387
387
  multiselect: props.multiselect,
388
388
  error: props.error,
389
- "data-testid": props.testId
389
+ testid: props.testId,
390
+ width: props.width
390
391
  }, {
391
392
  children: props.children
392
393
  }), void 0);
@@ -398,8 +398,8 @@
398
398
  var handler = function handler(state) {
399
399
  var _a = state.detail,
400
400
  name = _a.name,
401
- value = _a.value;
402
- props.onChange(name, value);
401
+ values = _a.values;
402
+ props.onChange(name, values);
403
403
  };
404
404
 
405
405
  current.addEventListener('_change', handler);
@@ -410,7 +410,7 @@
410
410
  return jsxRuntime.jsx("goa-dropdown", __assign({
411
411
  ref: el,
412
412
  name: props.name,
413
- values: JSON.stringify(props.values),
413
+ value: JSON.stringify(props.value),
414
414
  leadingicon: props.leadingIcon,
415
415
  maxheight: props.maxHeight,
416
416
  placeholder: props.placeholder,
@@ -418,7 +418,8 @@
418
418
  disabled: props.disabled,
419
419
  multiselect: props.multiselect,
420
420
  error: props.error,
421
- "data-testid": props.testId
421
+ testid: props.testId,
422
+ width: props.width
422
423
  }, {
423
424
  children: props.children
424
425
  }), void 0);