@abgov/react-components 3.4.0-alpha.18 → 3.4.0-alpha.19

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
@@ -23,8 +23,9 @@ import { GoAPageLoader } from './lib/page-loader/page-loader';
23
23
  import { GoARadioGroup, GoARadio } 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
+ import { GoASpinner } from './lib/spinner/spinner';
26
27
  import type { GoAIconType } from './lib/icons';
27
28
  import type { GoABadgeType } from './lib/badge/badge';
28
29
  export type { GoAIconType };
29
30
  export type { GoABadgeType };
30
- export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAContainer, GoADropdown, GoADropdownOption, GoAEmergencyBadge, GoAFlexRow, GoAFormItem, GoAHeroBanner, GoAHeroBannerContent, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAModal, GoANotification, GoAPageLoader, GoARadio, GoARadioGroup, GoAServiceLevelHeader, GoASuccessBadge, GoATextArea, GoAWarningBadge, };
31
+ export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAContainer, GoADropdown, GoADropdownOption, GoAEmergencyBadge, GoAFlexRow, GoAFormItem, GoAHeroBanner, GoAHeroBannerContent, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAModal, GoANotification, GoAPageLoader, GoARadio, GoARadioGroup, GoAServiceLevelHeader, GoASuccessBadge, GoASpinner, GoATextArea, GoAWarningBadge, };
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
- declare type SpinnerType = "infinite" | "progress";
3
- declare type SpinnerSize = "small" | "medium" | "large" | "xlarge";
2
+ export declare type SpinnerType = "infinite" | "progress";
3
+ export declare type SpinnerSize = "small" | "medium" | "large" | "xlarge";
4
4
  interface WCProps {
5
5
  size: SpinnerSize;
6
6
  type: SpinnerType;
7
- invert: boolean;
8
- progress: number;
7
+ invert?: boolean;
8
+ progress?: number;
9
+ testid?: string;
9
10
  }
10
11
  declare global {
11
12
  namespace JSX {
@@ -16,9 +17,10 @@ declare global {
16
17
  }
17
18
  export interface SpinnerProps {
18
19
  type: SpinnerType;
19
- size?: SpinnerSize;
20
- invert: boolean;
21
- progress: number;
20
+ size: SpinnerSize;
21
+ invert?: boolean;
22
+ progress?: number;
23
+ testId?: string;
22
24
  }
23
- export declare const GoASpinner: ({ type, size, progress, invert }: SpinnerProps) => JSX.Element;
25
+ export declare const GoASpinner: ({ type, size, progress, invert, testId }: SpinnerProps) => JSX.Element;
24
26
  export default GoASpinner;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "3.4.0-alpha.18",
3
+ "version": "3.4.0-alpha.19",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"
@@ -485,7 +485,7 @@ const GoAInput = ({
485
485
  const {
486
486
  name,
487
487
  value
488
- } = e.detail.data;
488
+ } = e.detail;
489
489
  onChange(name, value);
490
490
  };
491
491
 
@@ -493,8 +493,7 @@ const GoAInput = ({
493
493
  onTrailingIconClick === null || onTrailingIconClick === void 0 ? void 0 : onTrailingIconClick();
494
494
  };
495
495
 
496
- current.addEventListener('_change', changeListener); // TODO: remove all the `on:` prefixes
497
-
496
+ current.addEventListener('_change', changeListener);
498
497
  current.addEventListener('_trailingIconClick', clickListener);
499
498
  return () => {
500
499
  current.removeEventListener('_change', changeListener);
@@ -763,4 +762,20 @@ const GoATextArea = ({
763
762
  }, void 0);
764
763
  };
765
764
 
766
- export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAContainer, GoADropdown, GoADropdownOption, GoAEmergencyBadge, row as GoAFlexRow, formItem as GoAFormItem, GoAHeroBanner, GoAHeroBannerActions, GoAHeroBannerContent, GoAIcon, GoAIconButton, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAModal, GoANotification, GoAPageLoader, GoARadio, GoARadioGroup, GoAServiceLevelHeader, GoASuccessBadge, GoATextArea, GoAWarningBadge };
765
+ const GoASpinner = ({
766
+ type,
767
+ size,
768
+ progress,
769
+ invert,
770
+ testId
771
+ }) => {
772
+ return jsx("goa-spinner", {
773
+ type: type,
774
+ size: size,
775
+ progress: progress,
776
+ invert: invert,
777
+ testid: testId
778
+ }, void 0);
779
+ };
780
+
781
+ export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAContainer, GoADropdown, GoADropdownOption, GoAEmergencyBadge, row as GoAFlexRow, formItem as GoAFormItem, GoAHeroBanner, GoAHeroBannerActions, GoAHeroBannerContent, GoAIcon, GoAIconButton, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAModal, GoANotification, GoAPageLoader, GoARadio, GoARadioGroup, GoAServiceLevelHeader, GoASpinner, GoASuccessBadge, GoATextArea, GoAWarningBadge };
@@ -491,7 +491,7 @@
491
491
  var current = ref.current;
492
492
 
493
493
  var changeListener = function changeListener(e) {
494
- var _a = e.detail.data,
494
+ var _a = e.detail,
495
495
  name = _a.name,
496
496
  value = _a.value;
497
497
  onChange(name, value);
@@ -501,8 +501,7 @@
501
501
  onTrailingIconClick === null || onTrailingIconClick === void 0 ? void 0 : onTrailingIconClick();
502
502
  };
503
503
 
504
- current.addEventListener('_change', changeListener); // TODO: remove all the `on:` prefixes
505
-
504
+ current.addEventListener('_change', changeListener);
506
505
  current.addEventListener('_trailingIconClick', clickListener);
507
506
  return function () {
508
507
  current.removeEventListener('_change', changeListener);
@@ -768,6 +767,21 @@
768
767
  }, void 0);
769
768
  };
770
769
 
770
+ var GoASpinner = function GoASpinner(_a) {
771
+ var type = _a.type,
772
+ size = _a.size,
773
+ progress = _a.progress,
774
+ invert = _a.invert,
775
+ testId = _a.testId;
776
+ return jsxRuntime.jsx("goa-spinner", {
777
+ type: type,
778
+ size: size,
779
+ progress: progress,
780
+ invert: invert,
781
+ testid: testId
782
+ }, void 0);
783
+ };
784
+
771
785
  exports.GoAAppHeader = GoAAppHeader;
772
786
  exports.GoABadge = GoABadge;
773
787
  exports.GoAButton = GoAButton;
@@ -806,6 +820,7 @@
806
820
  exports.GoARadio = GoARadio;
807
821
  exports.GoARadioGroup = GoARadioGroup;
808
822
  exports.GoAServiceLevelHeader = GoAServiceLevelHeader;
823
+ exports.GoASpinner = GoASpinner;
809
824
  exports.GoASuccessBadge = GoASuccessBadge;
810
825
  exports.GoATextArea = GoATextArea;
811
826
  exports.GoAWarningBadge = GoAWarningBadge;