@abgov/react-components 3.4.0-alpha.29 → 3.4.0-alpha.31

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
@@ -18,6 +18,7 @@ import { GoAIcon, GoAIconButton } from './lib/icons';
18
18
  import { GoAInput, GoAInputText, GoAInputPassword, GoAInputDate, GoAInputTime, GoAInputDateTime, GoAInputEmail, GoAInputSearch, GoAInputUrl, GoAInputTel, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputRange } from './lib/input/input';
19
19
  import { GoAModal } from './lib/modal/modal';
20
20
  import { GoANotification } from './lib/notification/notification';
21
+ import { GoAPageBlock } from './lib/page-block/page-block';
21
22
  import { GoAPageLoader } from './lib/page-loader/page-loader';
22
23
  import { GoARadioGroup, GoARadio } from './lib/radio-group/radio-group';
23
24
  import { GoAServiceLevelHeader } from './lib/service-level-header/service-level-header';
@@ -27,4 +28,4 @@ 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, 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, };
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, };
@@ -1,7 +1,7 @@
1
1
  import React, { FC } from 'react';
2
2
  interface WCProps {
3
3
  title: string;
4
- url: string;
4
+ url?: string;
5
5
  }
6
6
  declare global {
7
7
  namespace JSX {
@@ -12,7 +12,7 @@ declare global {
12
12
  }
13
13
  interface Props {
14
14
  title: string;
15
- url: string;
15
+ url?: string;
16
16
  }
17
17
  export declare const GoAAppHeader: FC<Props>;
18
18
  export default GoAAppHeader;
@@ -24,7 +24,7 @@ declare type ButtonProps = {
24
24
  size?: ButtonSize;
25
25
  variant?: ButtonVariant;
26
26
  disabled?: boolean;
27
- onClick: () => void;
27
+ onClick: (e: any) => void;
28
28
  children: ReactNode;
29
29
  };
30
30
  export declare const GoAButton: FC<ButtonProps>;
@@ -8,19 +8,19 @@ declare global {
8
8
  }
9
9
  interface CheckboxProps {
10
10
  ref: React.RefObject<HTMLElement>;
11
+ id?: string;
11
12
  name: string;
12
13
  checked?: boolean;
13
14
  disabled?: boolean;
14
- indeterminate?: boolean;
15
15
  error?: boolean;
16
16
  text?: string;
17
17
  value?: string | number | boolean;
18
18
  }
19
19
  export interface Props {
20
+ id?: string;
20
21
  name: string;
21
22
  checked?: boolean;
22
23
  disabled?: boolean;
23
- indeterminate?: boolean;
24
24
  error?: boolean;
25
25
  text?: string;
26
26
  value?: string | number | boolean;
@@ -14,9 +14,9 @@ declare global {
14
14
  }
15
15
  interface Props {
16
16
  headingSize: HeadingSize;
17
- variant: ContainerVariant;
18
- title: ReactNode;
19
- actions: ReactNode;
17
+ variant?: ContainerVariant;
18
+ title?: ReactNode;
19
+ actions?: ReactNode;
20
20
  children: ReactNode;
21
21
  }
22
22
  export declare const GoAContainer: FC<Props>;
@@ -1 +1 @@
1
- export * as GoAFlexRow from './row';
1
+ export { GoAFlexRow } from './row';
@@ -1 +1 @@
1
- export * as GoAFormItem from './form-item';
1
+ export { GoAFormItem } from './form-item';
@@ -0,0 +1,9 @@
1
+ import React, { FC } from 'react';
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ 'goa-page-block': React.HTMLAttributes<HTMLElement>;
6
+ }
7
+ }
8
+ }
9
+ export declare const GoAPageBlock: FC;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "3.4.0-alpha.29",
3
+ "version": "3.4.0-alpha.31",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"
@@ -121,7 +121,7 @@ const GoAButton = ({
121
121
  const current = el.current;
122
122
 
123
123
  const listener = e => {
124
- onClick();
124
+ onClick(e);
125
125
  };
126
126
 
127
127
  current.addEventListener('_click', listener);
@@ -169,13 +169,13 @@ const GoACallout = ({
169
169
  };
170
170
 
171
171
  const GoACheckbox = ({
172
+ id,
172
173
  name,
173
174
  testId,
174
175
  error,
175
176
  disabled,
176
177
  checked,
177
- indeterminate,
178
- value: _value = true,
178
+ value,
179
179
  text,
180
180
  children,
181
181
  onChange
@@ -200,13 +200,13 @@ const GoACheckbox = ({
200
200
  return jsx("goa-checkbox", Object.assign({
201
201
  "data-testid": testId,
202
202
  ref: el,
203
+ id: id,
203
204
  name: name,
204
205
  error: error,
205
206
  checked: checked,
206
207
  disabled: disabled,
207
- indeterminate: indeterminate,
208
208
  text: text,
209
- value: _value
209
+ value: value
210
210
  }, {
211
211
  children: children
212
212
  }), void 0);
@@ -315,12 +315,6 @@ const GoAFlexRow = ({
315
315
  }), void 0);
316
316
  };
317
317
 
318
- var row = /*#__PURE__*/Object.freeze({
319
- __proto__: null,
320
- GoAFlexRow: GoAFlexRow,
321
- 'default': GoAFlexRow
322
- });
323
-
324
318
  const GoAFormItem = ({
325
319
  children,
326
320
  helpText,
@@ -340,12 +334,6 @@ const GoAFormItem = ({
340
334
  }), void 0);
341
335
  };
342
336
 
343
- var formItem = /*#__PURE__*/Object.freeze({
344
- __proto__: null,
345
- GoAFormItem: GoAFormItem,
346
- 'default': GoAFormItem
347
- });
348
-
349
337
  const GoAHeroBanner = ({
350
338
  title,
351
339
  backgroundUrl,
@@ -629,6 +617,14 @@ const GoANotification = ({
629
617
  }), void 0);
630
618
  };
631
619
 
620
+ const GoAPageBlock = ({
621
+ children
622
+ }) => {
623
+ return jsx("goa-page-block", {
624
+ children: children
625
+ }, void 0);
626
+ };
627
+
632
628
  const GoAPageLoader = ({
633
629
  type,
634
630
  visible,
@@ -772,4 +768,4 @@ const GoASpinner = ({
772
768
  }, void 0);
773
769
  };
774
770
 
775
- export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAContainer, GoADropdown, GoADropdownOption, GoAEmergencyBadge, row as GoAFlexRow, formItem as GoAFormItem, GoAHeroBanner, GoAHeroBannerActions, 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 };
771
+ 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 };
@@ -162,7 +162,7 @@
162
162
  var current = el.current;
163
163
 
164
164
  var listener = function listener(e) {
165
- onClick();
165
+ onClick(e);
166
166
  };
167
167
 
168
168
  current.addEventListener('_click', listener);
@@ -209,14 +209,13 @@
209
209
  };
210
210
 
211
211
  var GoACheckbox = function GoACheckbox(_a) {
212
- var name = _a.name,
212
+ var id = _a.id,
213
+ name = _a.name,
213
214
  testId = _a.testId,
214
215
  error = _a.error,
215
216
  disabled = _a.disabled,
216
217
  checked = _a.checked,
217
- indeterminate = _a.indeterminate,
218
- _b = _a.value,
219
- value = _b === void 0 ? true : _b,
218
+ value = _a.value,
220
219
  text = _a.text,
221
220
  children = _a.children,
222
221
  onChange = _a.onChange;
@@ -240,11 +239,11 @@
240
239
  return jsxRuntime.jsx("goa-checkbox", __assign({
241
240
  "data-testid": testId,
242
241
  ref: el,
242
+ id: id,
243
243
  name: name,
244
244
  error: error,
245
245
  checked: checked,
246
246
  disabled: disabled,
247
- indeterminate: indeterminate,
248
247
  text: text,
249
248
  value: value
250
249
  }, {
@@ -353,12 +352,6 @@
353
352
  }), void 0);
354
353
  };
355
354
 
356
- var row = /*#__PURE__*/Object.freeze({
357
- __proto__: null,
358
- GoAFlexRow: GoAFlexRow,
359
- 'default': GoAFlexRow
360
- });
361
-
362
355
  var GoAFormItem = function GoAFormItem(_a) {
363
356
  var children = _a.children,
364
357
  helpText = _a.helpText,
@@ -377,12 +370,6 @@
377
370
  }), void 0);
378
371
  };
379
372
 
380
- var formItem = /*#__PURE__*/Object.freeze({
381
- __proto__: null,
382
- GoAFormItem: GoAFormItem,
383
- 'default': GoAFormItem
384
- });
385
-
386
373
  var GoAHeroBanner = function GoAHeroBanner(_a) {
387
374
  var title = _a.title,
388
375
  backgroundUrl = _a.backgroundUrl,
@@ -640,6 +627,13 @@
640
627
  }), void 0);
641
628
  };
642
629
 
630
+ var GoAPageBlock = function GoAPageBlock(_a) {
631
+ var children = _a.children;
632
+ return jsxRuntime.jsx("goa-page-block", {
633
+ children: children
634
+ }, void 0);
635
+ };
636
+
643
637
  var GoAPageLoader = function GoAPageLoader(_a) {
644
638
  var type = _a.type,
645
639
  visible = _a.visible,
@@ -787,8 +781,8 @@
787
781
  exports.GoADropdown = GoADropdown;
788
782
  exports.GoADropdownOption = GoADropdownOption;
789
783
  exports.GoAEmergencyBadge = GoAEmergencyBadge;
790
- exports.GoAFlexRow = row;
791
- exports.GoAFormItem = formItem;
784
+ exports.GoAFlexRow = GoAFlexRow;
785
+ exports.GoAFormItem = GoAFormItem;
792
786
  exports.GoAHeroBanner = GoAHeroBanner;
793
787
  exports.GoAHeroBannerActions = GoAHeroBannerActions;
794
788
  exports.GoAIcon = GoAIcon;
@@ -810,6 +804,7 @@
810
804
  exports.GoAInputUrl = GoAInputUrl;
811
805
  exports.GoAModal = GoAModal;
812
806
  exports.GoANotification = GoANotification;
807
+ exports.GoAPageBlock = GoAPageBlock;
813
808
  exports.GoAPageLoader = GoAPageLoader;
814
809
  exports.GoARadio = GoARadio;
815
810
  exports.GoARadioGroup = GoARadioGroup;