@abgov/react-components 3.4.0-alpha.33 → 3.4.0-alpha.36

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/index.d.ts CHANGED
@@ -20,7 +20,7 @@ import { GoAModal } from './lib/modal/modal';
20
20
  import { GoANotification } from './lib/notification/notification';
21
21
  import { GoAPageBlock } from './lib/page-block/page-block';
22
22
  import { GoAPageLoader } from './lib/page-loader/page-loader';
23
- import { GoARadioGroup, GoARadio } from './lib/radio-group/radio-group';
23
+ import { GoARadioGroup, GoARadioItem } from './lib/radio-group/radio-group';
24
24
  import { GoAServiceLevelHeader } from './lib/service-level-header/service-level-header';
25
25
  import { GoATextArea } from './lib/textarea/textarea';
26
26
  import { GoASpinner } from './lib/spinner/spinner';
@@ -28,4 +28,4 @@ import type { GoAIconType } from './lib/icons';
28
28
  import type { GoABadgeType } from './lib/badge/badge';
29
29
  export type { GoAIconType };
30
30
  export type { GoABadgeType };
31
- export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAContainer, GoADropdown, GoADropdownOption, GoAEmergencyBadge, GoAFlexRow, GoAFormItem, GoAHeroBanner, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAModal, GoANotification, GoAPageBlock, GoAPageLoader, GoARadio, GoARadioGroup, GoAServiceLevelHeader, GoASuccessBadge, GoASpinner, GoATextArea, GoAWarningBadge, };
31
+ export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAContainer, GoADropdown, GoADropdownOption, GoAEmergencyBadge, GoAFlexRow, GoAFormItem, GoAHeroBanner, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAModal, GoANotification, GoAPageBlock, GoAPageLoader, GoARadioItem, GoARadioGroup, GoAServiceLevelHeader, GoASuccessBadge, GoASpinner, GoATextArea, GoAWarningBadge, };
@@ -1,6 +1,5 @@
1
1
  import React, { FC } from 'react';
2
2
  interface WCProps {
3
- name: string;
4
3
  label: string;
5
4
  optional?: boolean;
6
5
  error?: string;
@@ -14,7 +13,6 @@ declare global {
14
13
  }
15
14
  }
16
15
  interface GoAFormItemProps {
17
- name: string;
18
16
  label: string;
19
17
  optional?: boolean;
20
18
  error?: string;
@@ -5,6 +5,8 @@ interface RadioGroupProps {
5
5
  name: string;
6
6
  value?: string;
7
7
  orientation: string;
8
+ disabled: boolean;
9
+ error: boolean;
8
10
  }
9
11
  declare global {
10
12
  namespace JSX {
@@ -19,6 +21,7 @@ interface Props {
19
21
  disabled?: boolean;
20
22
  orientation?: 'horizontal' | 'vertical';
21
23
  testId?: string;
24
+ error?: boolean;
22
25
  onChange: (name: string, value: string) => void;
23
26
  }
24
27
  export declare const GoARadioGroup: FC<Props>;
@@ -23,5 +23,5 @@ interface Props {
23
23
  error?: boolean;
24
24
  testId?: string;
25
25
  }
26
- export declare const GoARadio: FC<Props>;
27
- export default GoARadio;
26
+ export declare const GoARadioItem: FC<Props>;
27
+ export default GoARadioItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "3.4.0-alpha.33",
3
+ "version": "3.4.0-alpha.36",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"
@@ -320,11 +320,9 @@ const GoAFormItem = ({
320
320
  helpText,
321
321
  error,
322
322
  optional,
323
- name,
324
323
  label
325
324
  }) => {
326
325
  return jsx("goa-form-item", Object.assign({
327
- name: name,
328
326
  label: label,
329
327
  error: error,
330
328
  optional: optional,
@@ -647,7 +645,7 @@ const GoAPageLoader = ({
647
645
  }, void 0);
648
646
  };
649
647
 
650
- const GoARadio = ({
648
+ const GoARadioItem = ({
651
649
  name,
652
650
  label,
653
651
  value,
@@ -675,6 +673,8 @@ const GoARadioGroup = ({
675
673
  value,
676
674
  children,
677
675
  orientation: _orientation = 'vertical',
676
+ disabled: _disabled = false,
677
+ error: _error = false,
678
678
  testId,
679
679
  onChange
680
680
  }) => {
@@ -699,7 +699,9 @@ const GoARadioGroup = ({
699
699
  ref: el,
700
700
  name: name,
701
701
  value: value,
702
- orientation: _orientation
702
+ orientation: _orientation,
703
+ disabled: _disabled,
704
+ error: _error
703
705
  }, {
704
706
  children: children
705
707
  }), void 0);
@@ -776,4 +778,4 @@ const GoASpinner = ({
776
778
  }, void 0);
777
779
  };
778
780
 
779
- export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAContainer, GoADropdown, GoADropdownOption, GoAEmergencyBadge, GoAFlexRow, GoAFormItem, GoAHeroBanner, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAModal, GoANotification, GoAPageBlock, GoAPageLoader, GoARadio, GoARadioGroup, GoAServiceLevelHeader, GoASpinner, GoASuccessBadge, GoATextArea, GoAWarningBadge };
781
+ export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAContainer, GoADropdown, GoADropdownOption, GoAEmergencyBadge, GoAFlexRow, GoAFormItem, GoAHeroBanner, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAModal, GoANotification, GoAPageBlock, GoAPageLoader, GoARadioGroup, GoARadioItem, GoAServiceLevelHeader, GoASpinner, GoASuccessBadge, GoATextArea, GoAWarningBadge };
@@ -357,10 +357,8 @@
357
357
  helpText = _a.helpText,
358
358
  error = _a.error,
359
359
  optional = _a.optional,
360
- name = _a.name,
361
360
  label = _a.label;
362
361
  return jsxRuntime.jsx("goa-form-item", __assign({
363
- name: name,
364
362
  label: label,
365
363
  error: error,
366
364
  optional: optional,
@@ -655,7 +653,7 @@
655
653
  }, void 0);
656
654
  };
657
655
 
658
- var GoARadio = function GoARadio(_a) {
656
+ var GoARadioItem = function GoARadioItem(_a) {
659
657
  var name = _a.name,
660
658
  label = _a.label,
661
659
  value = _a.value,
@@ -683,6 +681,10 @@
683
681
  children = _a.children,
684
682
  _b = _a.orientation,
685
683
  orientation = _b === void 0 ? 'vertical' : _b,
684
+ _c = _a.disabled,
685
+ disabled = _c === void 0 ? false : _c,
686
+ _d = _a.error,
687
+ error = _d === void 0 ? false : _d,
686
688
  testId = _a.testId,
687
689
  onChange = _a.onChange;
688
690
  var el = React.useRef(null);
@@ -706,7 +708,9 @@
706
708
  ref: el,
707
709
  name: name,
708
710
  value: value,
709
- orientation: orientation
711
+ orientation: orientation,
712
+ disabled: disabled,
713
+ error: error
710
714
  }, {
711
715
  children: children
712
716
  }), void 0);
@@ -814,8 +818,8 @@
814
818
  exports.GoANotification = GoANotification;
815
819
  exports.GoAPageBlock = GoAPageBlock;
816
820
  exports.GoAPageLoader = GoAPageLoader;
817
- exports.GoARadio = GoARadio;
818
821
  exports.GoARadioGroup = GoARadioGroup;
822
+ exports.GoARadioItem = GoARadioItem;
819
823
  exports.GoAServiceLevelHeader = GoAServiceLevelHeader;
820
824
  exports.GoASpinner = GoASpinner;
821
825
  exports.GoASuccessBadge = GoASuccessBadge;