Skip to content

Commit e303af9

Browse files
Merge pull request #41 from a-ui/feature/cards
Feature/cards
2 parents 1b0bd6e + 2a8ba8a commit e303af9

File tree

19 files changed

+155
-70
lines changed

19 files changed

+155
-70
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 7.11.0 - 2025-10-09
9+
10+
### Added
11+
12+
- Added option to define border type for card
13+
- Added highlighted card option
14+
- Added option to add more classes to the card
15+
16+
### Fixed
17+
18+
- Fixed the alert close button that was sometimes overlapping with the title
19+
820
## 7.10.3 - 2025-09-25
921

1022
### Fixed

documentation/playground/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<title>Playground</title>
66
<base href="/" />
77
<meta name="viewport" content="width=device-width, initial-scale=1" />
8-
<link rel="stylesheet" href="https://cdn.antwerpen.be/core_branding_scss/6.6.6/main.min.css" />
9-
<link rel="" href="https://cdn.antwerpen.be/core_branding_scss/6.6.6/assets/images/ai.svg" />
8+
<link rel="stylesheet" href="https://cdn.antwerpen.be/core_branding_scss/7.1.1/main.min.css" />
9+
<link rel="" href="https://cdn.antwerpen.be/core_branding_scss/7.1.1/assets/images/ai.svg" />
1010
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
1111
</head>
1212
<body>

documentation/playground/src/molecules/CardExamples.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export function CardExamples() {
1313
<Copyright forImage sign="©" label="With link" link="https://www.google.be" qa="image copyright" />
1414
)
1515
}}
16+
highlighted
17+
border="none"
1618
title={{ label: 'Card Title', tag: 'h2' }}
1719
subTitle="May 4th 2021, 12:34"
1820
description="Arma virumque cano, Troiae qui primus ab oris Italiam, fato profugus, Laviniaque venit litora, multum ille et terris iactatus et alto vi superum saevae memorem Iunonis ob iram. Multa quoque et bello passus, dum conderet urbem, inferretque deos Latio, genus unde Latinum, Albanique patres, atque altae moenia Romae."

documentation/storybook/.storybook/branding-versions.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

documentation/storybook/.storybook/preview-head.html

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,45 +24,28 @@
2424
white-space: normal !important;
2525
}
2626
</style>
27-
<link rel="stylesheet" href="https://cdn.antwerpen.be/core_branding_scss/6.6.6/main.min.css" />
2827
<script type="application/javascript">
29-
function fetchBrandingVersions() {
30-
try {
31-
const xhr = new XMLHttpRequest();
32-
xhr.open('GET', './branding-versions.json', false); // false for synchronous
33-
xhr.send();
34-
if (xhr.status === 200) {
35-
const data = JSON.parse(xhr.responseText);
36-
return data;
37-
} else {
38-
console.error(
39-
`preview-head.html | fetchBrandingVersions - Error fetching branding data, status = "${xhr.status}"`
40-
);
41-
return null;
42-
}
43-
} catch (error) {
44-
console.error(
45-
`preview-head.html | fetchBrandingVersions - Error fetching branding data, message = "${error.message}"`
46-
);
47-
return null;
48-
}
49-
}
28+
async function main() {
29+
const params = new URLSearchParams(window.location.search);
30+
const coreVersion = params.get('coreVersion') || '7.1.1';
31+
const coreLink = document.createElement('link');
32+
coreLink.rel = 'stylesheet';
33+
coreLink.href = `https://cdn.antwerpen.be/core_branding_scss/${coreVersion}/main.min.css`;
34+
document.head.appendChild(coreLink);
5035

51-
function main() {
52-
try {
53-
const params = new URL(document.location).searchParams;
54-
if (params.get('branding') && params.get('file')) {
55-
const versions = fetchBrandingVersions();
56-
const version = params.get('version') || versions[params.get('branding')];
57-
document.write(
58-
`<link rel="stylesheet" href="https://cdn.antwerpen.be/${params.get('branding')}/${version}/${params.get(
59-
'file'
60-
)}.min.css" />`
61-
);
62-
}
63-
} catch (error) {
64-
console.error(`preview-head.html | main - Error settings branding styling, message = "${error.message}"`);
36+
const branding = params.get('branding');
37+
const file = params.get('file');
38+
if (branding && file) {
39+
const version = params.get('version') || '1.0.0';
40+
const variantLink = document.createElement('link');
41+
variantLink.rel = 'stylesheet';
42+
variantLink.href = `https://cdn.antwerpen.be/${branding}/${version}/${file}.min.css`;
43+
document.head.appendChild(variantLink);
44+
45+
console.log(`Loaded variant branding: ${variantLink.href}`);
6546
}
47+
48+
console.log(`Loaded core branding: ${coreLink.href}`);
6649
}
6750

6851
main();

packages/antwerp-ui/react-components/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A-UI React Components using Core Branding v6.
99
- `npm install @a-ui/react`
1010

1111
- Import the core branding to style the components:
12-
`@import url("https://cdn.antwerpen.be/core_branding_scss/6.6.6/main.min.css");`
12+
`@import url("https://cdn.antwerpen.be/core_branding_scss/7.1.1/main.min.css");`
1313

1414
## Links
1515

packages/antwerp-ui/react-components/src/constants/settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { nlBE } from 'date-fns/locale';
22

33
// BASE
4-
export const ICONS_URL = 'https://cdn.antwerpen.be/core_branding_scss/6.6.6/assets/images/ai.svg';
4+
export const ICONS_URL = 'https://cdn.antwerpen.be/core_branding_scss/7.1.1/assets/images/ai.svg';
55
export const ICONS_SVG_HTML_ID = 'ai-svg';
66

77
// ATOMS

packages/antwerp-ui/react-components/src/lib/atoms/button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ButtonProps } from './Button.types';
22
import { classNames } from '../../../utils/dom.utils';
33
import { DEFAULT_EMPHASIS, DEFAULT_SIZE, Emphasis, SIZE_MAP, Theme } from '../../../constants/layout.settings';
44
import { renderAddOn } from '../../../utils/render.utils';
5-
import React, { ReactNode, useEffect } from 'react';
5+
import { useEffect } from 'react';
66
import { logWarning } from '../../../utils/log.utils';
77

88
export function Button({

packages/antwerp-ui/react-components/src/lib/molecules/alert/Alert.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const renderModalAlert = (className: string, props: AlertProps) => {
3737
</span>
3838
)}
3939
{title?.label && (
40-
<HeaderTag id={titleId} className="u-margin-bottom-xs">
40+
<HeaderTag id={titleId} className="m-alert__title u-margin-bottom-xs">
4141
{title.label}
4242
</HeaderTag>
4343
)}

packages/antwerp-ui/react-components/src/lib/molecules/autocomplete/Autocomplete.stories.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,9 @@ export default {
154154
}
155155
};
156156

157-
const Template = (args) => <Autocomplete {...args} />;
157+
const Template = (args) => (
158+
<div style={{ minHeight: '18rem' }}>
159+
<Autocomplete {...args} />
160+
</div>
161+
);
158162
export const autocomplete = Template.bind({});

0 commit comments

Comments
 (0)