@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.
- package/experimental/form/form-summary.d.ts +9 -0
- package/experimental/form/form.d.ts +35 -0
- package/experimental/form/task-list.d.ts +18 -0
- package/experimental/form/task.d.ts +18 -0
- package/experimental/form-hook.d.ts +8 -0
- package/experimental/index.d.ts +2 -0
- package/experimental/resizable-panel/ResizablePanel.d.ts +7 -0
- package/experimental/validators.d.ts +50 -0
- package/experimental.js +123 -0
- package/experimental.js.map +1 -0
- package/experimental.mjs +123 -0
- package/experimental.mjs.map +1 -0
- package/icon-1IRcN4Uf.js +38 -0
- package/icon-1IRcN4Uf.js.map +1 -0
- package/icon-DgSW1II3.mjs +39 -0
- package/icon-DgSW1II3.mjs.map +1 -0
- package/index.d.ts +4 -0
- package/index.js +229 -105
- package/index.js.map +1 -1
- package/index.mjs +217 -93
- package/index.mjs.map +1 -1
- package/lib/accordion/accordion.d.ts +5 -1
- package/lib/app-header/app-header.d.ts +5 -1
- package/lib/app-header-menu/app-header-menu.d.ts +1 -0
- package/lib/badge/badge.d.ts +1 -0
- package/lib/block/block.d.ts +1 -0
- package/lib/button/button.d.ts +1 -0
- package/lib/button-group/button-group.d.ts +1 -0
- package/lib/calendar/calendar.d.ts +1 -0
- package/lib/callout/callout.d.ts +5 -1
- package/lib/card/card-actions.d.ts +12 -0
- package/lib/card/card-content.d.ts +12 -0
- package/lib/card/card-group.d.ts +12 -0
- package/lib/card/card-image.d.ts +17 -0
- package/lib/card/card.d.ts +21 -0
- package/lib/card/index.d.ts +5 -0
- package/lib/checkbox/checkbox.d.ts +2 -1
- package/lib/chip/chip.d.ts +1 -0
- package/lib/circular-progress/circular-progress.d.ts +1 -0
- package/lib/container/container.d.ts +1 -0
- package/lib/date-picker/date-picker.d.ts +7 -2
- package/lib/details/details.d.ts +1 -0
- package/lib/divider/divider.d.ts +4 -1
- package/lib/drawer/drawer.d.ts +30 -0
- package/lib/dropdown/dropdown.d.ts +2 -1
- package/lib/fieldset/fieldset.d.ts +29 -0
- package/lib/file-upload-card/file-upload-card.d.ts +1 -0
- package/lib/file-upload-input/file-upload-input.d.ts +1 -0
- package/lib/footer/footer.d.ts +1 -0
- package/lib/footer-meta-section/footer-meta-section.d.ts +4 -1
- package/lib/footer-nav-section/footer-nav-section.d.ts +1 -0
- package/lib/form-item/form-item.d.ts +1 -0
- package/lib/form-stepper/form-stepper.d.ts +1 -0
- package/lib/grid/grid.d.ts +1 -0
- package/lib/hero-banner/hero-banner.d.ts +1 -0
- package/lib/icon-button/icon-button.d.ts +1 -0
- package/lib/input/input.d.ts +4 -3
- package/lib/link/link.d.ts +21 -0
- package/lib/link-button/link-button.d.ts +24 -0
- package/lib/microsite-header/microsite-header.d.ts +6 -2
- package/lib/modal/modal.d.ts +1 -0
- package/lib/notification/notification.d.ts +1 -0
- package/lib/page-block/page-block.d.ts +1 -0
- package/lib/pagination/pagination.d.ts +1 -0
- package/lib/popover/popover.d.ts +1 -0
- package/lib/radio-group/radio-group.d.ts +2 -1
- package/lib/side-menu/side-menu.d.ts +4 -1
- package/lib/side-menu-group/side-menu-group.d.ts +7 -2
- package/lib/side-menu-heading/side-menu-heading.d.ts +1 -0
- package/lib/skeleton/skeleton.d.ts +1 -0
- package/lib/spacer/spacer.d.ts +1 -0
- package/lib/spinner/spinner.d.ts +1 -0
- package/lib/table/table.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +1 -0
- package/lib/text/text.d.ts +28 -0
- package/lib/textarea/textarea.d.ts +2 -1
- package/lib/tooltip/tooltip.d.ts +1 -0
- package/package.json +6 -1
- 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
|
-
|
|
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
|
}
|
package/lib/spacer/spacer.d.ts
CHANGED
package/lib/spinner/spinner.d.ts
CHANGED
package/lib/table/table.d.ts
CHANGED
package/lib/tabs/tabs.d.ts
CHANGED
|
@@ -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
|
|
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;
|
package/lib/tooltip/tooltip.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/react-components",
|
|
3
|
-
"version": "5.
|
|
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
|
+
}
|