Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add 4 new web components: root/body/page-layout/page-body #2656

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fair-impalas-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@utrecht/design-tokens": minor
---

Add design tokens for `body`, `nav-bar`, `page-body`, `page-footer`, `page-header` and `root`.
5 changes: 5 additions & 0 deletions .changeset/flat-spoons-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@utrecht/web-component-library-stencil": minor
---

Add 4 new web components: `<utrecht-root>`, `<utrecht-body>`, `<utrecht-page-layout>`, `<utrecht-nav-bar>`. Support new layout structure in existing components: `<utrecht-page-header>`, `<utrecht-page-footer>` and `<utrecht-page-content>`.
10 changes: 5 additions & 5 deletions apps/experiments/amsterdam-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
--utrecht-nav-bar-content-background-color: white;
--utrecht-nav-bar-content-color: white;
--utrecht-nav-bar-content-max-inline-size: var(--basis-page-max-inline-size);
--utrecht-page-content-content-background-color: white;
--utrecht-page-content-content-color: black;
--utrecht-page-content-content-max-inline-size: var(--basis-page-max-inline-size);
--utrecht-page-content-content-padding-inline: var(--basis-page-padding);
--utrecht-page-body-content-background-color: white;
--utrecht-page-body-content-color: black;
--utrecht-page-body-content-max-inline-size: var(--basis-page-max-inline-size);
--utrecht-page-body-content-padding-inline: var(--basis-page-padding);
--utrecht-page-footer-background-color: var(--ams-spotlight-dark-blue-background-color);
--utrecht-page-footer-color: white;
--utrecht-page-footer-content-max-inline-size: var(--basis-page-max-inline-size);
Expand All @@ -28,7 +28,7 @@
--utrecht-root-color: var(--utrecht-color-grey-10);
--utrecht-page-header-padding-inline: var(--basis-page-padding);
--utrecht-page-nav-bar-padding-inline: var(--basis-page-padding);
--utrecht-page-content-padding-inline: var(--basis-page-padding);
--utrecht-page-body-padding-inline: var(--basis-page-padding);
--utrecht-page-footer-padding-inline: 0;
--utrecht-root-font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Arial", sans-serif;
--utrecht-logo-min-block-size: 58.97px;
Expand Down
10 changes: 5 additions & 5 deletions apps/experiments/purmerend-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
--utrecht-nav-bar-content-background-color: white;
--utrecht-nav-bar-content-color: rgb(0 54 95);
--utrecht-nav-bar-content-max-inline-size: var(--basis-page-max-inline-size);
--utrecht-page-content-content-background-color: white;
--utrecht-page-content-content-color: rgb(0 54 95);
--utrecht-page-content-content-max-inline-size: var(--basis-page-max-inline-size);
--utrecht-page-content-content-padding-inline: 1em;
--utrecht-page-content-padding-inline: 1em;
--utrecht-page-body-content-background-color: white;
--utrecht-page-body-content-color: rgb(0 54 95);
--utrecht-page-body-content-max-inline-size: var(--basis-page-max-inline-size);
--utrecht-page-body-content-padding-inline: 1em;
--utrecht-page-body-padding-inline: 1em;
--utrecht-page-footer-background-color: rgb(0 54 95);
--utrecht-page-footer-color: white;
--utrecht-page-footer-content-max-inline-size: var(--basis-page-max-inline-size);
Expand Down
10 changes: 5 additions & 5 deletions apps/experiments/rijkshuisstijl-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

/* todo */
--utrecht-nav-bar-content-color: white;
--utrecht-page-content-content-background-color: white;
--utrecht-page-content-content-color: black;
--utrecht-page-content-content-max-inline-size: var(--basis-page-max-inline-size);
--utrecht-page-content-content-padding-inline: var(--basis-page-padding);
--utrecht-page-body-content-background-color: white;
--utrecht-page-body-content-color: black;
--utrecht-page-body-content-max-inline-size: var(--basis-page-max-inline-size);
--utrecht-page-body-content-padding-inline: var(--basis-page-padding);
--utrecht-page-footer-background-color: #01689b;
--utrecht-page-footer-color: white;
--utrecht-page-footer-content-max-inline-size: var(--basis-page-max-inline-size);
Expand All @@ -25,7 +25,7 @@
--utrecht-root-background-color: var(--utrecht-color-grey-95, hsl(0 0% 95%));
--utrecht-page-header-padding-inline: var(--basis-page-padding);
--utrecht-page-nav-bar-padding-inline: var(--basis-page-padding);
--utrecht-page-content-padding-inline: var(--basis-page-padding);
--utrecht-page-body-padding-inline: var(--basis-page-padding);
--utrecht-page-footer-padding-inline: 0;
--utrecht-root-font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Arial", sans-serif;
--utrecht-logo-min-block-size: 58.97px;
Expand Down
10 changes: 5 additions & 5 deletions apps/experiments/rods-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
--utrecht-nav-bar-content-max-inline-size: var(--basis-page-max-inline-size);

/* todo */
--utrecht-page-content-content-background-color: white;
--utrecht-page-content-content-color: black;
--utrecht-page-content-content-max-inline-size: var(--basis-page-max-inline-size);
--utrecht-page-content-content-padding-inline: var(--basis-page-padding);
--utrecht-page-body-content-background-color: white;
--utrecht-page-body-content-color: black;
--utrecht-page-body-content-max-inline-size: var(--basis-page-max-inline-size);
--utrecht-page-body-content-padding-inline: var(--basis-page-padding);
--utrecht-page-footer-background-color: #00811f;
--utrecht-page-footer-color: white;
--utrecht-page-footer-content-max-inline-size: var(--basis-page-max-inline-size);
Expand All @@ -32,7 +32,7 @@
--utrecht-root-color: var(--utrecht-color-grey-10);
--utrecht-page-header-padding-inline: var(--basis-page-padding);
--utrecht-page-nav-bar-padding-inline: var(--basis-page-padding);
--utrecht-page-content-padding-inline: var(--basis-page-padding);
--utrecht-page-body-padding-inline: var(--basis-page-padding);
--utrecht-page-footer-padding-inline: 0;
--utrecht-root-font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Arial", sans-serif;
}
107 changes: 0 additions & 107 deletions apps/experiments/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,117 +8,10 @@
}
}

.utrecht-body {
align-items: flex-start;
block-size: 100%;
margin-block-end: 0;
margin-block-start: 0;

/* reset `<body>` styles for `margin` and `padding` */

/* display: flex; */

/* flex-direction: column;
justify-content: flex-start; */
margin-inline-end: 0;
margin-inline-start: 0;
min-block-size: 100vb;
padding-block: 0;
}

.utrecht-page-layout {
align-items: flex-start;
block-size: 100%;
display: flex;
flex-direction: column;
inline-size: 100%;
justify-content: flex-start;
}

*[hidden] {
display: none !important;
}

.utrecht-page-header {
background-color: var(--utrecht-page-header-background-color);
border-block-end-color: var(--utrecht-page-header-border-block-end-color, currentColor);
border-block-end-style: solid;
border-block-end-width: var(--utrecht-page-header-border-block-end-width, 0);
box-sizing: border-box;
color: var(--utrecht-page-header-color);
display: flex;
inline-size: 100%;
justify-content: center;
}

.utrecht-page-header__content {
background-color: var(--utrecht-page-header-content-background-color);
box-sizing: border-box;
color: var(--utrecht-page-header-content-color);
inline-size: 100%;
max-inline-size: var(--utrecht-page-header-content-max-inline-size);
padding-block-end: var(--utrecht-page-header-content-padding-block-end);
padding-block-start: var(--utrecht-page-header-content-padding-block-start);
padding-inline: var(--utrecht-page-header-content-padding-inline);
}

.utrecht-nav-bar {
background-color: var(--utrecht-nav-bar-background-color);
box-sizing: border-box;
color: var(--utrecht-nav-bar-color);
display: flex;
inline-size: 100%;
justify-content: center;
min-block-size: 44px;
}

.utrecht-nav-bar__content {
background-color: var(--utrecht-nav-bar-content-background-color);
box-sizing: border-box;
color: var(--utrecht-nav-bar-content-color);
inline-size: 100%;
max-inline-size: var(--utrecht-nav-bar-content-max-inline-size);
}

.utrecht-page-content {
background-color: var(--utrecht-page-content-background-color);
box-sizing: border-box;
color: var(--utrecht-page-content-color);
display: flex;
flex-grow: 1;
inline-size: 100%;
justify-content: center;
}

.utrecht-page-content__content {
background-color: var(--utrecht-page-content-content-background-color);
box-sizing: border-box;
color: var(--utrecht-page-content-content-color);
inline-size: 100%;
max-inline-size: var(--utrecht-page-content-content-max-inline-size);
padding-inline: var(--utrecht-page-content-content-padding-inline);
}

.utrecht-page-footer {
background-color: var(--utrecht-page-footer-background-color);
box-sizing: border-box;
color: var(--utrecht-page-footer-color);
display: flex;
inline-size: 100%;
justify-content: center;
}

.utrecht-page-footer__content {
background-color: var(--utrecht-page-footer-content-background-color);
box-sizing: border-box;
color: var(--utrecht-page-footer-content-color);
inline-size: 100%;
max-inline-size: var(--utrecht-page-footer-content-max-inline-size);
padding-block-end: var(--utrecht-page-footer-content-padding-block-end);
padding-block-start: var(--utrecht-page-footer-content-padding-block-start);
padding-inline: var(--utrecht-page-footer-content-padding-inline);
}

.utrecht-text-content {
/* TODO: calculate based on font-family and font-size */
max-inline-size: 60em;
Expand Down
10 changes: 5 additions & 5 deletions apps/experiments/utrecht-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
--utrecht-nav-bar-content-background-color: black;
--utrecht-nav-bar-content-color: white;
--utrecht-nav-bar-content-max-inline-size: var(--basis-page-max-inline-size);
--utrecht-page-content-content-background-color: white;
--utrecht-page-content-content-color: black;
--utrecht-page-content-content-max-inline-size: var(--basis-page-max-inline-size);
--utrecht-page-content-content-padding-inline: var(--basis-page-padding);
--utrecht-page-body-content-background-color: white;
--utrecht-page-body-content-color: black;
--utrecht-page-body-content-max-inline-size: var(--basis-page-max-inline-size);
--utrecht-page-body-content-padding-inline: var(--basis-page-padding);
--utrecht-page-footer-background-color: hsl(0 100% 40%);
--utrecht-page-footer-color: white;
--utrecht-page-footer-content-max-inline-size: var(--basis-page-max-inline-size);
Expand All @@ -23,7 +23,7 @@
--utrecht-root-color: var(--utrecht-color-grey-10);
--utrecht-page-header-padding-inline: var(--basis-page-padding);
--utrecht-page-nav-bar-padding-inline: var(--basis-page-padding);
--utrecht-page-content-padding-inline: var(--basis-page-padding);
--utrecht-page-body-padding-inline: var(--basis-page-padding);
--utrecht-page-footer-padding-inline: 0;
--utrecht-root-font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Arial", sans-serif;
--utrecht-logo-min-block-size: 58.97px;
Expand Down
13 changes: 10 additions & 3 deletions apps/experiments/utrecht.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@
<link rel="stylesheet" href="rods-theme.css" />
<link rel="stylesheet" href="slideshow.css" />
<!-- <link rel="stylesheet" href="dist/theme.css" /> -->
<link rel="stylesheet" href="../../components/index.css" />
<!-- <link rel="stylesheet" href="../../components/index.css" /> -->
<link rel="stylesheet" href="../../components/logo/dist/index.css" />
<link rel="stylesheet" href="../../components/root/dist/index.css" />
<link rel="stylesheet" href="../../components/page-body/dist/index.css" />
<link rel="stylesheet" href="../../components/page-header/dist/index.css" />
<link rel="stylesheet" href="../../components/page-layout/dist/index.css" />
<link rel="stylesheet" href="../../components/page-footer/dist/index.css" />
<link rel="stylesheet" href="../../components/nav-bar/dist/index.css" />
<link rel="stylesheet" href="../../components/body/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@amsterdam/design-system-tokens@0.13.0/dist/index.css" />
<script type="module">
import { defineCustomElements } from '../../packages/web-component-library-stencil/loader/index.js';
Expand Down Expand Up @@ -47,8 +54,8 @@
<div class="utrecht-nav-bar">
<div class="utrecht-nav-bar__content">nav bar</div>
</div>
<div class="utrecht-page-content">
<div class="utrecht-page-content__content">
<div class="utrecht-page-body">
<div class="utrecht-page-body__content">
<div class="utrecht-text-content">
<div class="utrecht-html">
<h1>Wij doen mee met NL Design System</h1>
Expand Down
Loading
Loading