Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Amsterdam/design-system int…
Browse files Browse the repository at this point in the history
…o task/simplify-highlight-story
  • Loading branch information
alimpens committed Oct 27, 2023
2 parents db56c87 + 9762155 commit 690a4be
Show file tree
Hide file tree
Showing 69 changed files with 1,117 additions and 437 deletions.
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ We use [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-fl

Package versioning and publishing is done through Lerna, by the maintainers of the repository. Contributors do not need to increment versions. Contact the maintainers if you want to release a new version of a package.

## Adding a new component

Scaffold all necessary files for a new component at once through `npm plop`.
Enter the name of your component when prompted.
This will create files for the design tokens, CSS and React components, and React Stories.

## Publishing

You can only publish if you have access to the `@amsterdam` group on NPM. If you want to have rights to publish as well, contact one of the [maintainers](./documentation/maintainers.md). To publish these packages to NPM, follow these steps:
Expand Down
2 changes: 1 addition & 1 deletion packages/css/src/accordion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Het accordion component is een klikbare (verticaal gestapelde) lijst van koppen
Je kunt door een accordion navigeren met je toetsenbord:

| key | element |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| :------------------- | :--------------------------------------------------------------------------------------------------------------------------- |
| Enter of Space | Open of sluit de accordionsectie die de focus heeft |
| Tab | Ga naar het volgende element dat focus kan hebben |
| Shift + Tab | Ga naar het volgende element dat focus kan hebben |
Expand Down
2 changes: 1 addition & 1 deletion packages/css/src/accordion/accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
padding-inline: 1rem;
width: 100%;

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
font-size: var(--amsterdam-accordion-button-wide-font-size);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/css/src/alert/alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
font-weight: var(--amsterdam-alert-title-font-weight);
line-height: var(--amsterdam-alert-title-line-height);

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
font-size: var(--amsterdam-alert-title-wide-font-size);
}

Expand Down
12 changes: 6 additions & 6 deletions packages/css/src/aspect-ratio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ Aspect Ratio (in het Nederlands: beeldverhouding) koppelt de hoogte van een elem
Om de vormgeving consistent te houden gebruiken we een vaste set verhoudingen (breedte:hoogte):

| _keyword_ | verhouding |
| ------------ | ---------- |
| `extra-wide` | 16:9 |
| `wide` | 5:4 |
| `square` | 1:1 |
| `tall` | 4:5 |
| `extra-tall` | 9:16 |
| :----------- | ---------: |
| `extra-wide` | 16:9 |
| `wide` | 5:4 |
| `square` | 1:1 |
| `tall` | 4:5 |
| `extra-tall` | 9:16 |

## Richtlijnen

Expand Down
2 changes: 1 addition & 1 deletion packages/css/src/blockquote/blockquote.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
content: close-quote;
}

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
font-size: var(--amsterdam-blockquote-wide-font-size);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/css/src/breadcrumb/breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
font-weight: var(--amsterdam-breadcrumb-font-weight);
line-height: var(--amsterdam-breadcrumb-line-height);

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
font-size: var(--amsterdam-breadcrumb-wide-font-size);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/css/src/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.amsterdam-button {
font-size: var(--amsterdam-button-narrow-font-size);

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
font-size: var(--amsterdam-button-wide-font-size);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/checkbox/checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
width: 100%;
}

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
height: calc(var(--amsterdam-checkbox-checkmark-wide-size) * var(--amsterdam-checkbox-checkmark-multiplier));
}
}
Expand Down Expand Up @@ -65,7 +65,7 @@
}
}

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
font-size: var(--amsterdam-checkbox-wide-font-size);
}

Expand Down
14 changes: 0 additions & 14 deletions packages/css/src/footer/footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,8 @@
.amsterdam-footer__top {
background-color: var(--amsterdam-footer-top-background-color);
padding-block: 2.5rem;
padding-inline: 2rem; /* TODO: For now I've set a padding here, this should eventually be handled by PageGrid */
}

@media screen and (width > $amsterdam-breakpoint) {
.amsterdam-footer__top {
grid-template-columns: repeat(var(--amsterdam-page-grid-column-count-wide), 1fr);
}
}

.amsterdam-footer__column {
display: flex;
flex-direction: column;
gap: 2.5rem;
}

.amsterdam-footer__bottom {
padding-block: 0.5rem;
padding-inline: 2rem; /* TODO: For now I've set a padding here, this should eventually be handled by PageGrid */
}
2 changes: 1 addition & 1 deletion packages/css/src/form-label/form-label.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
font-weight: var(--amsterdam-form-label-font-weight);
line-height: var(--amsterdam-form-label-line-height);

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
font-size: var(--amsterdam-form-label-wide-font-size);
}

Expand Down
9 changes: 9 additions & 0 deletions packages/css/src/grid-cell/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Grid cell

Beslaat een aantal kolommen in een [Page Grid](?path=/docs/react_layout-page-grid--docs).

## Gebruik

Gebruik het `GridCell` component om een grid in cellen te verdelen.
Op de cel kun je aangeven hoeveel kolommen van het grid het element beslaat.
In elke cel plaats je vervolgens een component of element.
46 changes: 46 additions & 0 deletions packages/css/src/grid-cell/grid-cell.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* @license EUPL-1.2+
* Copyright (c) 2023 Gemeente Amsterdam
*/

@import "../../utils/breakpoint";

.amsterdam-page-grid > .amsterdam-grid-cell--full-width {
grid-column: 1 / -1;
}

// The order of the following declaration blocks ensures the intended specificity.

@for $i from 1 through 12 {
.amsterdam-page-grid > .amsterdam-grid-cell--span-#{$i} {
grid-column-end: span $i;
}

.amsterdam-page-grid > .amsterdam-grid-cell--start-#{$i} {
grid-column-start: $i;
}
}

@media screen and (min-width: $amsterdam-breakpoint-medium) {
@for $i from 1 through 12 {
.amsterdam-page-grid > .amsterdam-grid-cell--span-#{$i}-medium {
grid-column-end: span $i;
}

.amsterdam-page-grid > .amsterdam-grid-cell--start-#{$i}-medium {
grid-column-start: $i;
}
}
}

@media screen and (min-width: $amsterdam-breakpoint-wide) {
@for $i from 1 through 12 {
.amsterdam-page-grid > .amsterdam-grid-cell--span-#{$i}-wide {
grid-column-end: span $i;
}

.amsterdam-page-grid > .amsterdam-grid-cell--start-#{$i}-wide {
grid-column-start: $i;
}
}
}
11 changes: 0 additions & 11 deletions packages/css/src/grid/README.md

This file was deleted.

18 changes: 0 additions & 18 deletions packages/css/src/grid/grid-cell.scss

This file was deleted.

19 changes: 0 additions & 19 deletions packages/css/src/grid/page-grid.scss

This file was deleted.

8 changes: 4 additions & 4 deletions packages/css/src/heading/heading.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
font-size: var(--amsterdam-heading-1-narrow-font-size);
line-height: var(--amsterdam-heading-1-line-height);

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
font-size: var(--amsterdam-heading-1-wide-font-size);
}
}
Expand All @@ -34,7 +34,7 @@
font-size: var(--amsterdam-heading-2-narrow-font-size);
line-height: var(--amsterdam-heading-2-line-height);

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
font-size: var(--amsterdam-heading-2-wide-font-size);
}
}
Expand All @@ -43,7 +43,7 @@
font-size: var(--amsterdam-heading-3-narrow-font-size);
line-height: var(--amsterdam-heading-3-line-height);

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
font-size: var(--amsterdam-heading-3-wide-font-size);
}
}
Expand All @@ -52,7 +52,7 @@
font-size: var(--amsterdam-heading-4-narrow-font-size);
line-height: var(--amsterdam-heading-4-line-height);

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
font-size: var(--amsterdam-heading-4-wide-font-size);
}
}
Expand Down
20 changes: 10 additions & 10 deletions packages/css/src/icon/icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
.amsterdam-icon--size-3 {
height: calc(var(--amsterdam-icon-size-3-icon-size-narrow) * var(--amsterdam-icon-size-3-container-multiplier));

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
height: calc(var(--amsterdam-icon-size-3-icon-size-wide) * var(--amsterdam-icon-size-3-container-multiplier));
}
}
Expand All @@ -26,15 +26,15 @@
height: var(--amsterdam-icon-size-3-icon-size-narrow);
width: var(--amsterdam-icon-size-3-icon-size-narrow);

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
height: var(--amsterdam-icon-size-3-icon-size-wide);
width: var(--amsterdam-icon-size-3-icon-size-wide);
}
}
.amsterdam-icon--size-4 {
height: calc(var(--amsterdam-icon-size-4-icon-size-narrow) * var(--amsterdam-icon-size-4-container-multiplier));

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
height: calc(var(--amsterdam-icon-size-4-icon-size-wide) * var(--amsterdam-icon-size-4-container-multiplier));
}
}
Expand All @@ -43,7 +43,7 @@
height: var(--amsterdam-icon-size-4-icon-size-narrow);
width: var(--amsterdam-icon-size-4-icon-size-narrow);

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
height: var(--amsterdam-icon-size-4-icon-size-wide);
width: var(--amsterdam-icon-size-4-icon-size-wide);
}
Expand All @@ -52,7 +52,7 @@
.amsterdam-icon--size-5 {
height: calc(var(--amsterdam-icon-size-5-icon-size-narrow) * var(--amsterdam-icon-size-5-container-multiplier));

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
height: calc(var(--amsterdam-icon-size-5-icon-size-wide) * var(--amsterdam-icon-size-5-container-multiplier));
}
}
Expand All @@ -61,7 +61,7 @@
height: var(--amsterdam-icon-size-5-icon-size-narrow);
width: var(--amsterdam-icon-size-5-icon-size-narrow);

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
height: var(--amsterdam-icon-size-5-icon-size-wide);
width: var(--amsterdam-icon-size-5-icon-size-wide);
}
Expand All @@ -70,7 +70,7 @@
.amsterdam-icon--size-6 {
height: calc(var(--amsterdam-icon-size-6-icon-size-narrow) * var(--amsterdam-icon-size-6-container-multiplier));

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
height: calc(var(--amsterdam-icon-size-6-icon-size-wide) * var(--amsterdam-icon-size-6-container-multiplier));
}
}
Expand All @@ -79,7 +79,7 @@
height: var(--amsterdam-icon-size-6-icon-size-narrow);
width: var(--amsterdam-icon-size-6-icon-size-narrow);

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
height: var(--amsterdam-icon-size-6-icon-size-wide);
width: var(--amsterdam-icon-size-6-icon-size-wide);
}
Expand All @@ -88,7 +88,7 @@
.amsterdam-icon--size-7 {
height: calc(var(--amsterdam-icon-size-7-icon-size-narrow) * var(--amsterdam-icon-size-7-container-multiplier));

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
height: calc(var(--amsterdam-icon-size-7-icon-size-wide) * var(--amsterdam-icon-size-7-container-multiplier));
}
}
Expand All @@ -97,7 +97,7 @@
height: var(--amsterdam-icon-size-7-icon-size-narrow);
width: var(--amsterdam-icon-size-7-icon-size-narrow);

@media screen and (width > $amsterdam-breakpoint) {
@media screen and (width > $amsterdam-breakpoint-typography) {
height: var(--amsterdam-icon-size-7-icon-size-wide);
width: var(--amsterdam-icon-size-7-icon-size-wide);
}
Expand Down
7 changes: 4 additions & 3 deletions packages/css/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

/* Append here */
@import "./highlight/highlight";
@import "./accordion/accordion";
@import "./alert/alert";
@import "./aspect-ratio/aspect-ratio";
Expand All @@ -15,15 +14,17 @@
@import "./checkbox/checkbox";
@import "./footer/footer";
@import "./form-label/form-label";
@import "./grid/grid-cell";
@import "./grid/page-grid";
@import "./grid-cell/grid-cell";
@import "./heading/heading";
@import "./highlight/highlight";
@import "./icon/icon";
@import "./link/link";
@import "./ordered-list/ordered-list";
@import "./page-grid/page-grid";
@import "./page-heading/page-heading";
@import "./page-menu/page-menu";
@import "./paragraph/paragraph";
@import "./screen/screen";
@import "./switch/switch";
@import "./top-task-link/top-task-link";
@import "./unordered-list/unordered-list";
Expand Down
Loading

0 comments on commit 690a4be

Please sign in to comment.