@abgov/react-components 5.0.0 → 5.3.0

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.
Files changed (79) hide show
  1. package/experimental/form/form-summary.d.ts +9 -0
  2. package/experimental/form/form.d.ts +35 -0
  3. package/experimental/form/task-list.d.ts +18 -0
  4. package/experimental/form/task.d.ts +18 -0
  5. package/experimental/form-hook.d.ts +8 -0
  6. package/experimental/index.d.ts +2 -0
  7. package/experimental/resizable-panel/ResizablePanel.d.ts +7 -0
  8. package/experimental/validators.d.ts +50 -0
  9. package/experimental.js +123 -0
  10. package/experimental.js.map +1 -0
  11. package/experimental.mjs +123 -0
  12. package/experimental.mjs.map +1 -0
  13. package/icon-1IRcN4Uf.js +38 -0
  14. package/icon-1IRcN4Uf.js.map +1 -0
  15. package/icon-DgSW1II3.mjs +39 -0
  16. package/icon-DgSW1II3.mjs.map +1 -0
  17. package/index.d.ts +4 -0
  18. package/index.js +229 -105
  19. package/index.js.map +1 -1
  20. package/index.mjs +217 -93
  21. package/index.mjs.map +1 -1
  22. package/lib/accordion/accordion.d.ts +5 -1
  23. package/lib/app-header/app-header.d.ts +5 -1
  24. package/lib/app-header-menu/app-header-menu.d.ts +1 -0
  25. package/lib/badge/badge.d.ts +1 -0
  26. package/lib/block/block.d.ts +1 -0
  27. package/lib/button/button.d.ts +1 -0
  28. package/lib/button-group/button-group.d.ts +1 -0
  29. package/lib/calendar/calendar.d.ts +1 -0
  30. package/lib/callout/callout.d.ts +5 -1
  31. package/lib/card/card-actions.d.ts +12 -0
  32. package/lib/card/card-content.d.ts +12 -0
  33. package/lib/card/card-group.d.ts +12 -0
  34. package/lib/card/card-image.d.ts +17 -0
  35. package/lib/card/card.d.ts +21 -0
  36. package/lib/card/index.d.ts +5 -0
  37. package/lib/checkbox/checkbox.d.ts +2 -1
  38. package/lib/chip/chip.d.ts +1 -0
  39. package/lib/circular-progress/circular-progress.d.ts +1 -0
  40. package/lib/container/container.d.ts +1 -0
  41. package/lib/date-picker/date-picker.d.ts +7 -2
  42. package/lib/details/details.d.ts +1 -0
  43. package/lib/divider/divider.d.ts +4 -1
  44. package/lib/drawer/drawer.d.ts +30 -0
  45. package/lib/dropdown/dropdown.d.ts +2 -1
  46. package/lib/fieldset/fieldset.d.ts +29 -0
  47. package/lib/file-upload-card/file-upload-card.d.ts +1 -0
  48. package/lib/file-upload-input/file-upload-input.d.ts +1 -0
  49. package/lib/footer/footer.d.ts +1 -0
  50. package/lib/footer-meta-section/footer-meta-section.d.ts +4 -1
  51. package/lib/footer-nav-section/footer-nav-section.d.ts +1 -0
  52. package/lib/form-item/form-item.d.ts +1 -0
  53. package/lib/form-stepper/form-stepper.d.ts +1 -0
  54. package/lib/grid/grid.d.ts +1 -0
  55. package/lib/hero-banner/hero-banner.d.ts +1 -0
  56. package/lib/icon-button/icon-button.d.ts +1 -0
  57. package/lib/input/input.d.ts +4 -3
  58. package/lib/link/link.d.ts +21 -0
  59. package/lib/link-button/link-button.d.ts +24 -0
  60. package/lib/microsite-header/microsite-header.d.ts +6 -2
  61. package/lib/modal/modal.d.ts +1 -0
  62. package/lib/notification/notification.d.ts +1 -0
  63. package/lib/page-block/page-block.d.ts +1 -0
  64. package/lib/pagination/pagination.d.ts +1 -0
  65. package/lib/popover/popover.d.ts +1 -0
  66. package/lib/radio-group/radio-group.d.ts +2 -1
  67. package/lib/side-menu/side-menu.d.ts +4 -1
  68. package/lib/side-menu-group/side-menu-group.d.ts +7 -2
  69. package/lib/side-menu-heading/side-menu-heading.d.ts +1 -0
  70. package/lib/skeleton/skeleton.d.ts +1 -0
  71. package/lib/spacer/spacer.d.ts +1 -0
  72. package/lib/spinner/spinner.d.ts +1 -0
  73. package/lib/table/table.d.ts +1 -0
  74. package/lib/tabs/tabs.d.ts +1 -0
  75. package/lib/text/text.d.ts +28 -0
  76. package/lib/textarea/textarea.d.ts +2 -1
  77. package/lib/tooltip/tooltip.d.ts +1 -0
  78. package/package.json +6 -1
  79. package/style.css +49 -0
@@ -1,8 +1,11 @@
1
1
  import { ReactNode } from "react";
2
+ interface WCProps {
3
+ testid?: string;
4
+ }
2
5
  declare global {
3
6
  namespace JSX {
4
7
  interface IntrinsicElements {
5
- "goa-side-menu": React.HTMLAttributes<HTMLElement>;
8
+ "goa-side-menu": WCProps & React.HTMLAttributes<HTMLElement>;
6
9
  }
7
10
  }
8
11
  }
@@ -1,6 +1,10 @@
1
1
  import { ReactNode } from "react";
2
- interface WCProps {
2
+ import { GoAIconType } from "../icon/icon";
3
+ import { Margins } from "../../common/styling";
4
+ interface WCProps extends Margins {
3
5
  heading: string;
6
+ icon?: GoAIconType;
7
+ testid?: string;
4
8
  }
5
9
  declare global {
6
10
  namespace JSX {
@@ -9,8 +13,9 @@ declare global {
9
13
  }
10
14
  }
11
15
  }
12
- export interface GoASideMenuGroupProps {
16
+ export interface GoASideMenuGroupProps extends Margins {
13
17
  heading: string;
18
+ icon?: GoAIconType;
14
19
  testId?: string;
15
20
  children?: ReactNode;
16
21
  }
@@ -2,6 +2,7 @@ import { ReactNode } from "react";
2
2
  import { GoAIconType } from "../icon/icon";
3
3
  interface WCProps {
4
4
  icon?: GoAIconType;
5
+ testid?: string;
5
6
  }
6
7
  declare global {
7
8
  namespace JSX {
@@ -7,6 +7,7 @@ interface WCProps extends Margins {
7
7
  size?: GoASkeletonSize;
8
8
  linecount?: number;
9
9
  type: GoASkeletonType;
10
+ testid?: string;
10
11
  }
11
12
  declare global {
12
13
  namespace JSX {
@@ -2,6 +2,7 @@ import { Spacing } from "../../common/styling";
2
2
  interface WCProps {
3
3
  hspacing?: Spacing | "fill";
4
4
  vspacing?: Spacing;
5
+ testid?: string;
5
6
  }
6
7
  declare global {
7
8
  namespace JSX {
@@ -5,6 +5,7 @@ interface WCProps {
5
5
  type: SpinnerType;
6
6
  invert?: boolean;
7
7
  progress?: number;
8
+ testid?: string;
8
9
  }
9
10
  declare global {
10
11
  namespace JSX {
@@ -7,6 +7,7 @@ interface WCProps extends Margins {
7
7
  width?: string;
8
8
  stickyheader?: boolean;
9
9
  variant?: GoATableVariant;
10
+ testid?: string;
10
11
  }
11
12
  declare global {
12
13
  namespace JSX {
@@ -3,6 +3,7 @@ interface WCProps {
3
3
  initialtab?: number;
4
4
  ref: React.RefObject<HTMLElement>;
5
5
  onChange?: (tab: number) => void;
6
+ testid?: string;
6
7
  }
7
8
  declare global {
8
9
  namespace JSX {
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from "react";
2
+ import { Margins } from "../../common/styling";
3
+ type MaxWidth = string | "none";
4
+ interface WCProps extends Margins {
5
+ as?: TextElement | HeadingElement;
6
+ size?: Size;
7
+ maxwidth?: MaxWidth;
8
+ }
9
+ declare global {
10
+ namespace JSX {
11
+ interface IntrinsicElements {
12
+ "goa-text": WCProps & React.HTMLAttributes<HTMLElement>;
13
+ }
14
+ }
15
+ }
16
+ export type HeadingElement = "h1" | "h2" | "h3" | "h4" | "h5";
17
+ export type TextElement = "span" | "div" | "p";
18
+ type HeadingSize = "heading-xl" | "heading-l" | "heading-m" | "heading-s" | "heading-xs";
19
+ type BodySize = "body-l" | "body-m" | "body-s" | "body-xs";
20
+ export type Size = HeadingSize | BodySize;
21
+ interface GoATextProps extends Margins {
22
+ as?: TextElement | HeadingElement;
23
+ size?: Size;
24
+ maxWidth?: MaxWidth;
25
+ children: ReactNode;
26
+ }
27
+ export declare function GoAText(props: GoATextProps): JSX.Element;
28
+ export default GoAText;
@@ -13,6 +13,7 @@ interface WCProps extends Margins {
13
13
  arialabel?: string;
14
14
  countby?: CountBy;
15
15
  maxcount?: number;
16
+ testid?: string;
16
17
  }
17
18
  declare global {
18
19
  namespace JSX {
@@ -35,7 +36,7 @@ export interface GoATextAreaProps extends Margins {
35
36
  ariaLabel?: string;
36
37
  countBy?: CountBy;
37
38
  maxCount?: number;
38
- onChange: (name: string, value: string) => void;
39
+ onChange?: (name: string, value: string) => void;
39
40
  onKeyPress?: (name: string, value: string, key: string) => void;
40
41
  }
41
42
  export declare function GoATextarea({ name, value, placeholder, rows, disabled, countBy, maxCount, width, maxWidth, testId, error, ariaLabel, mt, mr, mb, ml, onChange, onKeyPress, }: GoATextAreaProps): JSX.Element;
@@ -6,6 +6,7 @@ interface WCProps extends Margins {
6
6
  position?: GoATooltipPosition;
7
7
  content?: string;
8
8
  halign?: GoATooltipHorizontalAlignment;
9
+ testid?: string;
9
10
  }
10
11
  declare global {
11
12
  namespace JSX {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "5.0.0",
3
+ "version": "5.3.0",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"
@@ -29,6 +29,11 @@
29
29
  "import": "./index.mjs",
30
30
  "require": "./index.js",
31
31
  "types": "./index.d.ts"
32
+ },
33
+ "./experimental": {
34
+ "import": "./experimental.mjs",
35
+ "require": "./experimental.js",
36
+ "types": "./experimental/index.d.ts"
32
37
  }
33
38
  }
34
39
  }
package/style.css ADDED
@@ -0,0 +1,49 @@
1
+ ._panel_m3z4m_1 {
2
+ display: flex;
3
+ border: var(--goa-border-width-s) solid var(--goa-color-greyscale-200);
4
+ border-radius: var(--goa-border-radius-m);
5
+ background: var(--goa-color-greyscale-white);
6
+ }
7
+
8
+ ._panelBackground_m3z4m_8 {
9
+ background: #F8F8F8;
10
+ }
11
+
12
+ ._children_m3z4m_12 {
13
+ flex: 1 1 auto;
14
+ padding: 2rem;
15
+ }
16
+
17
+ ._handle_m3z4m_17 {
18
+ flex: 0 0 1rem;
19
+ top: 0;
20
+ bottom: 0;
21
+ right: 0;
22
+ width: 1rem;
23
+ background-color: var(--goa-color-greyscale-100);
24
+ border-left: var(--goa-border-width-s) solid var(--goa-color-greyscale-200);
25
+ cursor: col-resize;
26
+ overflow: hidden;
27
+ border-top-right-radius: calc(var(--goa-border-radius-m) - 1);
28
+ border-bottom-right-radius: calc(var(--goa-border-radius-m) - 1);
29
+ display: flex;
30
+ justify-content: center;
31
+ }
32
+
33
+ ._handle_m3z4m_17:active {
34
+ cursor: col-resize;
35
+ }
36
+
37
+ ._handle_m3z4m_17 goa-icon {
38
+ transform: rotate(90deg);
39
+ opacity: 0.8;
40
+ }
41
+
42
+ ._width_m3z4m_42 {
43
+ float: right;
44
+ position: relative;
45
+ top: -2rem;
46
+ color: var(--goa-color-greyscale-400);
47
+ font-family: var(--goa-font-family-number);
48
+ font-size: var(--goa-font-size-2);
49
+ }