Skip to content

Commit ad1c45e

Browse files
authored
Merge pull request #422 from GovAlta/alpha
Production Release - August 15 / 2025
2 parents 8c7e16b + c7821f2 commit ad1c45e

39 files changed

+1572
-1291
lines changed

package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"prettier": "npx prettier . --write"
1313
},
1414
"dependencies": {
15-
"@abgov/react-components": "6.6.1",
16-
"@abgov/ui-components-common": "1.6.0",
17-
"@abgov/web-components": "1.36.1",
15+
"@abgov/react-components": "6.7.0",
16+
"@abgov/ui-components-common": "1.7.0",
17+
"@abgov/web-components": "1.37.0",
1818
"@faker-js/faker": "^8.3.1",
1919
"highlight.js": "^11.8.0",
2020
"js-cookie": "^3.0.5",

src/components/sandbox/AngularReactiveSerializer.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const ReactiveComponents = [
99
"goab-checkbox",
1010
"goab-radio-group",
1111
"goab-date-picker",
12+
"goa-input"
1213
];
1314

1415
export class AngularReactiveSerializer extends BaseSerializer implements Serializer {
@@ -153,15 +154,17 @@ export class AngularReactiveSerializer extends BaseSerializer implements Seriali
153154
});
154155
}
155156

156-
if (children.startsWith("<goa-checkbox")) {
157+
const componentsToProcess = ["<goa-checkbox", "<goa-input"];
158+
159+
if (componentsToProcess.some(component => children.startsWith(component))) {
157160
if (this.version === "old") {
158161
if (children.includes("goaChecked") && children.includes("goaValue")) {
159162
children = children.replace(/\bgoaValue\b\s?/g, "");
160163
}
161164

162-
if (children.includes("disabled=true")) {
165+
if (children.includes('disabled="true"') || children.includes("disabled=true")) {
163166
children = children
164-
.replace(/disabled=true/g, '[attr.disabled]="true"')
167+
.replace(/disabled=(["']?)true\1/g, '[attr.disabled]="true"')
165168
.replace(/\bgoaValue\b\s?/g, "");
166169
}
167170
}

src/components/table-of-contents/TOC.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ export function TOC(props: TOCProps) {
120120
const currentHash = window.location.hash;
121121

122122
if (currentHash.includes('#tab-')) {
123-
// If URL contains #tab-, append our ID after it
124-
return `${currentHash}#${id}`;
123+
// If URL contains "#tab-" then append another hash after it
124+
return `#${currentHash.split('#')[1]}#${id}`;
125125
}
126126

127127
return `#${id}`;

src/components/version-language-switcher/HelpButton.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ export function HelpButton() {
2424
};
2525

2626
return (
27-
<GoabTooltip content="More information">
28-
<GoabIconButton ml={"s"}
29-
mr={"s"}
27+
<GoabTooltip content="Version and framework info">
28+
<GoabIconButton ml={"xs"}
29+
mb={"2xs"}
3030
variant="color"
3131
size="small"
3232
icon="help-circle"

src/components/version-language-switcher/VersionLanguageSwitcher.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {
22
GoabIcon,
3-
GoabPopover, GoabTooltip
3+
GoabPopover
44
} from "@abgov/react-components";
55
import {
66
ANGULAR_VERSIONS, getVersionedUrlPath, Language, LanguageVersion,
@@ -103,7 +103,7 @@ export const VersionLanguageSwitcher = () => {
103103

104104
return (
105105
<>
106-
<GoabTooltip content="Framework">
106+
<div className="version-language-switcher">
107107
<GoabPopover
108108
target={
109109
<a className="version-language-switcher__heading" href="#" id="language-switcher" onClick={e => openLanguagePopOver(e)}>
@@ -119,9 +119,7 @@ export const VersionLanguageSwitcher = () => {
119119
}
120120
</>
121121
</GoabPopover>
122-
</GoabTooltip>
123122

124-
<GoabTooltip content="Version">
125123
<GoabPopover target={
126124
<a className="version-language-switcher__heading" href="#"
127125
onClick={e => openVersionPopOver(e)}>
@@ -136,7 +134,7 @@ export const VersionLanguageSwitcher = () => {
136134
))}
137135
</>
138136
</GoabPopover>
139-
</GoabTooltip>
137+
</div>
140138
</>
141139
);
142140
}

src/components/version-language-switcher/version-language-switcher.css

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
align-items: center;
44
gap: var(--goa-space-2xs);
55
font-size: var(--goa-font-size-2);
6-
margin-left: var(--goa-space-m);
76
white-space: nowrap;
87
height: 20px;
98
}
@@ -30,13 +29,30 @@
3029
align-items: center; /* vertically align content */
3130
}
3231

32+
.version-language-switcher {
33+
height: 20px;
34+
display: flex;
35+
flex-direction: row;
36+
align-items: center; /* vertically align content */
37+
gap: var(--goa-space-s);
38+
margin-bottom: var(--goa-space-xs);
39+
}
40+
3341
@media (max-width: 623px) {
3442
[slot="version"] {
3543
display: flex; /* if needed to align items horizontally */
36-
flex-direction: column;
44+
flex-direction: row;
3745
align-items: flex-start;
38-
gap: 2px;
46+
gap: 0;
3947
margin-top: 0;
48+
height: auto;
49+
}
4050

51+
.version-language-switcher {
52+
height: auto;
53+
flex-direction: column;
54+
align-items: flex-start;
55+
gap: 0;
56+
margin-bottom: var(--goa-space-3xs);
4157
}
4258
}

src/examples/add-another-item-in-a-modal.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export const AddAnotherItemInAModal = () => {
4141

4242
<GoabModal
4343
heading="Add a new item"
44-
role="dialog"
4544
open={addItemModalOpen}
4645
actions={
4746
<GoabButtonGroup alignment="end">
@@ -143,7 +142,7 @@ export const AddAnotherItemInAModal = () => {
143142
allowCopy={true}
144143
code={`
145144
<goa-button type="tertiary" leadingicon="add" (_click)="toggleModal()">Add another item</goa-button>
146-
<goa-modal [open]="open" role="dialog"
145+
<goa-modal [open]="open"
147146
(_close)="toggleModal()" heading="Add a new item">
148147
<p>Fill in the information to create a new item</p>
149148
<goa-form-item label="Type" mt="xs">
@@ -174,7 +173,7 @@ export const AddAnotherItemInAModal = () => {
174173
allowCopy={true}
175174
code={`
176175
<goab-button type="tertiary" leadingIcon="add" (onClick)="toggleModal()">Add another item</goab-button>
177-
<goab-modal [open]="open" role="dialog"
176+
<goab-modal [open]="open"
178177
(onClose)="toggleModal()" heading="Add a new item" [actions]="actions">
179178
<p>Fill in the information to create a new item</p>
180179
<goab-form-item label="Type" mt="xs">
@@ -259,7 +258,6 @@ export const AddAnotherItemInAModal = () => {
259258
</GoAButton>
260259
<GoAModal
261260
heading="Add a new item"
262-
role="dialog"
263261
open={open}
264262
actions={
265263
<GoAButtonGroup alignment="end">
@@ -297,7 +295,6 @@ export const AddAnotherItemInAModal = () => {
297295
</GoabButton>
298296
<GoabModal
299297
heading="Add a new item"
300-
role="dialog"
301298
open={open}
302299
actions={
303300
<GoabButtonGroup alignment="end">

src/examples/badge/BadgeExamples.tsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
import {
2-
GoabBadge,
3-
GoabBlock,
4-
} from "@abgov/react-components";
5-
import { Sandbox } from "@components/sandbox";
61
import { ShowStatusInATable } from "@examples/show-status-in-a-table.tsx";
2+
import { ShowMultipleTagsTogether } from "@examples/show-multiple-tags-together.tsx";
73
import { ShowStatusOnACard } from "@examples/show-status-on-a-card.tsx";
84
import { SandboxHeader } from "@components/sandbox/sandbox-header/sandboxHeader.tsx";
95

106
export default function BadgeExamples() {
117
return (
128
<>
13-
149
<SandboxHeader
1510
exampleTitle="Show status in a table"
1611
figmaExample="https://www.figma.com/design/aIRjvBzpIUH0GbkffjbL04/%E2%9D%96-Patterns-library-%7C-DDD?node-id=6304-22364&t=X0IQW5flDDaj8Vyg-4">
@@ -21,13 +16,7 @@ export default function BadgeExamples() {
2116
exampleTitle="Show multiple tags together"
2217
figmaExample="https://www.figma.com/design/3pb2IK8s2QUqWieH79KdN7/%E2%9D%96-Component-library-%7C-DDD?node-id=60735-375622&t=tGwTYaG8Orm4iOm7-4">
2318
</SandboxHeader>
24-
<Sandbox>
25-
<GoabBlock gap="xs">
26-
<GoabBadge type="information" content="In progress" />
27-
<GoabBadge type="important" content="Priority" />
28-
<GoabBadge type="emergency" content="Past deadline" />
29-
</GoabBlock>
30-
</Sandbox>
19+
<ShowMultipleTagsTogether />
3120

3221
<SandboxHeader
3322
exampleTitle="Show a status on a card"
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
import { Sandbox } from "@components/sandbox";
2+
import { GoabButton, GoabModal } from "@abgov/react-components";
3+
import { CodeSnippet } from "@components/code-snippet/CodeSnippet.tsx";
4+
import { useContext, useState } from "react";
5+
import { LanguageVersionContext } from "@contexts/LanguageVersionContext.tsx";
6+
7+
export const BasicModalWithClose = () => {
8+
const {version} = useContext(LanguageVersionContext);
9+
const [basicModalOpen, setBasicModalOpen] = useState<boolean>();
10+
return (
11+
<Sandbox skipRender>
12+
<GoabButton onClick={() => setBasicModalOpen(true)}>Open Basic Modal</GoabButton>
13+
<GoabModal
14+
heading="Modal"
15+
open={basicModalOpen}
16+
onClose={() => setBasicModalOpen(false)}
17+
>
18+
<p>This modal uses an icon button to close it.</p>
19+
</GoabModal>
20+
{/*Angular*/}
21+
<CodeSnippet
22+
lang="typescript"
23+
tags="angular"
24+
allowCopy={true}
25+
code={`
26+
export class SomeOtherComponent {
27+
open = false;
28+
toggleModal() {
29+
this.open = !this.open;
30+
}
31+
}
32+
`}
33+
/>
34+
35+
{version === "old" && (
36+
<CodeSnippet
37+
lang="typescript"
38+
tags="angular"
39+
allowCopy={true}
40+
code={`
41+
<goa-button (_click)="toggleModal();">Open Basic Modal</goa-button>
42+
<goa-modal [open]="open" (_close)="toggleModal()" heading="Modal">
43+
<p>This modal uses an icon button to close it.</p>
44+
</goa-modal>
45+
`}
46+
/>
47+
)}
48+
49+
{version === "new" && (
50+
<CodeSnippet
51+
lang="typescript"
52+
tags="angular"
53+
allowCopy={true}
54+
code={`
55+
<goab-button (onClick)="toggleModal();">Open Basic Modal</goab-button>
56+
<goab-modal [open]="open" (close)="toggleModal()" heading="Modal" [actions]="actions">
57+
<p>This modal uses an icon button to close it.</p>
58+
</goab-modal>
59+
`}
60+
/>
61+
)}
62+
63+
{/*React code*/}
64+
<CodeSnippet
65+
lang="typescript"
66+
tags="react"
67+
allowCopy={true}
68+
code={`
69+
const [open, setOpen] = useState(false);
70+
`}
71+
/>
72+
73+
{version === "old" && (
74+
<CodeSnippet
75+
lang="typescript"
76+
tags="react"
77+
allowCopy={true}
78+
code={`
79+
<GoAButton onClick={() => setOpen(true)}>Open Basic Modal</GoAButton>
80+
<GoAModal
81+
heading="Modal"
82+
open={open}
83+
onClose={() => setOpen(false)}
84+
>
85+
<p>This modal uses an icon button to close it.</p>
86+
</GoAModal>
87+
`}
88+
/>
89+
)}
90+
91+
{version === "new" && (
92+
<CodeSnippet
93+
lang="typescript"
94+
tags="react"
95+
allowCopy={true}
96+
code={`
97+
<GoabButton onClick={() => setOpen(true)}>Open Basic Modal</GoabButton>
98+
<GoabModal
99+
heading="Modal"
100+
open={open}
101+
onClose={() => setOpen(false)}
102+
>
103+
<p>This modal uses an icon button to close it.</p>
104+
</GoabModal>
105+
`}
106+
/>
107+
)}
108+
</Sandbox>
109+
)
110+
}
111+
112+
export default BasicModalWithClose;

0 commit comments

Comments
 (0)