generated from nl-design-system/example
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
193 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!-- | ||
@license EUPL-1.2 | ||
Copyright (c) 2021 Gemeente Utrecht | ||
--> | ||
|
||
# Lijsten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* @license EUPL-1.2 | ||
* Copyright (c) 2021 Robbert Broersma | ||
* Copyright (c) 2021 Gemeente Utrecht | ||
*/ | ||
|
||
.utrecht-ordered-list { | ||
font-family: var(--utrecht-document-font-family, inherit); | ||
} | ||
|
||
.utrecht-ordered-list--distanced { | ||
margin-block-end: var(--utrecht-ordered-list-margin-block-end); | ||
margin-block-start: var(--utrecht-ordered-list-margin-block-start); | ||
} | ||
|
||
.utrecht-ordered-list__item { | ||
margin-block-end: var(--utrecht-ordered-list-item-margin-block-end); | ||
margin-block-start: var(--utrecht-ordered-list-item-margin-block-start); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!-- | ||
@license EUPL-1.2 | ||
Copyright (c) 2021 Robbert Broersma | ||
--> | ||
|
||
import { Meta, Story, Canvas } from "@storybook/addon-docs"; | ||
import clsx from "clsx"; | ||
import "./bem.css"; | ||
import README from "./README.md"; | ||
|
||
export const Template = ({ distanced }) => | ||
`<ol class="${clsx("utrecht-ordered-list", distanced && "utrecht-ordered-list--distanced")}"> | ||
<li class="utrecht-ordered-list__item">Lorem</li> | ||
<li class="utrecht-ordered-list__item">Ipsum</li> | ||
<li class="utrecht-ordered-list__item">Dolor</li> | ||
</ol>`; | ||
|
||
<Meta | ||
title="Components/Ordered List" | ||
argTypes={{ | ||
distanced: { | ||
description: "Distance the element from adjacent content", | ||
control: "boolean", | ||
}, | ||
}} | ||
parameters={{ | ||
docs: { | ||
transformSource: (_src, { args }) => Template(args), | ||
}, | ||
status: "IN DEVELOPMENT", | ||
notes: { | ||
UX: README, | ||
}, | ||
}} | ||
/> | ||
|
||
# Ordered list | ||
|
||
<Canvas> | ||
<Story | ||
name="Ordered list" | ||
args={{ | ||
distanced: true, | ||
}} | ||
> | ||
{Template.bind({})} | ||
</Story> | ||
</Canvas> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"utrecht": { | ||
"ordered-list": { | ||
"margin-block-start": { | ||
"css": { | ||
"syntax": "<length>", | ||
"inherits": true | ||
} | ||
}, | ||
"margin-block-end": { | ||
"css": { | ||
"syntax": "<length>", | ||
"inherits": true | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"utrecht": { | ||
"ordered-list": { | ||
"item": { | ||
"margin-block-start": { | ||
"css": { | ||
"syntax": "<length>", | ||
"inherits": true | ||
} | ||
}, | ||
"margin-block-end": { | ||
"css": { | ||
"syntax": "<length>", | ||
"inherits": true | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* @license EUPL-1.2 | ||
* Copyright (c) 2021 Robbert Broersma | ||
*/ | ||
|
||
@import "./bem"; | ||
|
||
.utrecht-html ol { | ||
@extend .utrecht-ordered-list; | ||
@extend .utrecht-ordered-list--distanced; | ||
} | ||
|
||
.utrecht-html ol > li { | ||
@extend .utrecht-ordered-list__item; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!-- | ||
@license EUPL-1.2 | ||
Copyright (c) 2021 Robbert Broersma | ||
--> | ||
|
||
import { Meta, Story, Canvas } from "@storybook/addon-docs"; | ||
|
||
import "./html.scss"; | ||
|
||
import README from "./README.md"; | ||
|
||
export const Template = () => | ||
`<section class="utrecht-html"> | ||
<ol> | ||
<li>Lorem</li> | ||
<li>Ipsum</li> | ||
<li>Dolor</li> | ||
</ol> | ||
</section>`; | ||
|
||
<Meta | ||
title="Semantic HTML/Ordered List" | ||
argTypes={{}} | ||
parameters={{ | ||
docs: { | ||
transformSource: (_src, { args }) => Template(args), | ||
}, | ||
status: "IN DEVELOPMENT", | ||
notes: { | ||
UX: README, | ||
}, | ||
}} | ||
/> | ||
|
||
## Ordered list | ||
|
||
<Canvas> | ||
<Story name="Ordered list">{Template.bind({})}</Story> | ||
</Canvas> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
proprietary/design-tokens/src/component/utrecht/ordered-list/block.style-dictionary.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"utrecht": { | ||
"ordered-list": { | ||
"margin-block-start": { | ||
"value": "0" | ||
}, | ||
"margin-block-end": { | ||
"value": "1em" | ||
} | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
proprietary/design-tokens/src/component/utrecht/ordered-list/element.style-dictionary.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"utrecht": { | ||
"ordered-list": { | ||
"item": { | ||
"margin-block-start": { | ||
"value": "0.25em" | ||
}, | ||
"margin-block-end": { | ||
"value": "0.25em" | ||
} | ||
} | ||
} | ||
} | ||
} |