@utrecht/heading-3-css 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,19 @@
1
+ # @utrecht/heading-3-css
2
+
3
+ ## 1.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c022510: Added metadata for heading 1 to 6 tokens.
8
+
9
+ ## 1.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 62f1157: Add SCSS files to `src/` directory of CSS component packages.
14
+
15
+ ## 1.0.0
16
+
17
+ ### Major Changes
18
+
19
+ - 856d996: Switch from alpha releases to semantic versioning.
package/dist/index.css ADDED
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @license EUPL-1.2
3
+ * Copyright (c) 2021 Gemeente Utrecht
4
+ * Copyright (c) 2021 Robbert Broersma
5
+ * Copyright (c) 2021 The Knights Who Say NIH! B.V.
6
+ */
7
+ /**
8
+ * @license EUPL-1.2
9
+ * Copyright (c) 2021 Gemeente Utrecht
10
+ * Copyright (c) 2021 Robbert Broersma
11
+ * Copyright (c) 2021 The Knights Who Say NIH! B.V.
12
+ */
13
+ /**
14
+ * @license EUPL-1.2
15
+ * Copyright (c) 2021-2022 Frameless B.V.
16
+ */
17
+ .utrecht-heading-3 {
18
+ break-inside: avoid-column;
19
+ page-break-inside: avoid;
20
+ color: var(--utrecht-heading-3-color, var(--utrecht-heading-color, var(--utrecht-document-color, inherit)));
21
+ font-family: var(--utrecht-heading-3-font-family, var(--utrecht-heading-font-family, var(--utrecht-document-font-family)));
22
+ font-size: var(--utrecht-heading-3-font-size, revert);
23
+ font-weight: var(--utrecht-heading-3-font-weight, var(--utrecht-heading-font-weight, bold));
24
+ line-height: var(--utrecht-heading-3-line-height);
25
+ margin-block-end: calc(var(--utrecht-space-around, 0) * var(--utrecht-heading-3-margin-block-end, 0));
26
+ margin-block-start: calc(var(--utrecht-space-around, 0) * var(--utrecht-heading-3-margin-block-start, 0));
27
+ page-break-after: avoid;
28
+ }
29
+
30
+ .utrecht-heading-3--distanced {
31
+ --utrecht-space-around: 1;
32
+ }
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ var undefined$1 = undefined;export{undefined$1 as default};
package/package.json CHANGED
@@ -1,18 +1,33 @@
1
1
  {
2
- "version": "1.0.0",
2
+ "version": "1.2.0",
3
3
  "author": "Community for NL Design System",
4
4
  "description": "Heading 3 component for the Municipality of Utrecht based on the NL Design System architecture",
5
5
  "license": "EUPL-1.2",
6
6
  "name": "@utrecht/heading-3-css",
7
7
  "files": [
8
- "dist/"
8
+ "dist/",
9
+ "docs/",
10
+ "src/",
11
+ "*.md"
9
12
  ],
10
- "devDependencies": {},
13
+ "main": "dist/index.css",
14
+ "devDependencies": {
15
+ "rollup": "4.18.0",
16
+ "@utrecht/heading-css": "1.2.0"
17
+ },
11
18
  "keywords": [
12
19
  "nl-design-system"
13
20
  ],
14
21
  "publishConfig": {
15
22
  "access": "public"
16
23
  },
17
- "scripts": {}
24
+ "repository": {
25
+ "type": "git+ssh",
26
+ "url": "git@github.com:nl-design-system/utrecht.git",
27
+ "directory": "components/heading-3"
28
+ },
29
+ "scripts": {
30
+ "build": "rollup -c ../rollup.config.mjs",
31
+ "clean": "rimraf dist"
32
+ }
18
33
  }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license EUPL-1.2
3
+ * Copyright (c) 2021 Gemeente Utrecht
4
+ * Copyright (c) 2021 Robbert Broersma
5
+ * Copyright (c) 2021 The Knights Who Say NIH! B.V.
6
+ */
7
+
8
+ @import "~@utrecht/heading-css/src/mixin";
9
+
10
+ @mixin utrecht-heading-3 {
11
+ @include utrecht-heading;
12
+
13
+ color: var(--utrecht-heading-3-color, var(--utrecht-heading-color, var(--utrecht-document-color, inherit)));
14
+ font-family: var(
15
+ --utrecht-heading-3-font-family,
16
+ var(--utrecht-heading-font-family, var(--utrecht-document-font-family))
17
+ );
18
+ font-size: var(--utrecht-heading-3-font-size, revert);
19
+ font-weight: var(--utrecht-heading-3-font-weight, var(--utrecht-heading-font-weight, bold));
20
+ line-height: var(--utrecht-heading-3-line-height);
21
+ margin-block-end: calc(var(--utrecht-space-around, 0) * var(--utrecht-heading-3-margin-block-end, 0));
22
+ margin-block-start: calc(var(--utrecht-space-around, 0) * var(--utrecht-heading-3-margin-block-start, 0));
23
+ page-break-after: avoid;
24
+ }
25
+
26
+ @mixin utrecht-heading-3--distanced {
27
+ --utrecht-space-around: 1;
28
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license EUPL-1.2
3
+ * Copyright (c) 2021 Robbert Broersma
4
+ */
5
+
6
+ @import "../mixin";
7
+
8
+ @mixin utrecht-html-h3 {
9
+ h3 {
10
+ @include utrecht-heading-3;
11
+ @include utrecht-heading-3--distanced;
12
+ }
13
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license EUPL-1.2
3
+ * Copyright (c) 2021 Robbert Broersma
4
+ */
5
+
6
+ @import "./mixin";
7
+
8
+ @include utrecht-html-h3;
package/src/index.scss ADDED
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license EUPL-1.2
3
+ * Copyright (c) 2021 Gemeente Utrecht
4
+ * Copyright (c) 2021 Robbert Broersma
5
+ * Copyright (c) 2021 The Knights Who Say NIH! B.V.
6
+ */
7
+
8
+ @import "./mixin";
9
+
10
+ .utrecht-heading-3 {
11
+ @include utrecht-heading-3;
12
+ }
13
+
14
+ .utrecht-heading-3--distanced {
15
+ @include utrecht-heading-3--distanced;
16
+ }
@@ -0,0 +1,47 @@
1
+ /*
2
+ * @license EUPL-1.2
3
+ * Copyright (c) 2020-2022 Gemeente Utrecht
4
+ * Copyright (c) 2020-2022 Frameless B.V.
5
+ */
6
+
7
+ import clsx from 'clsx';
8
+ import React from 'react';
9
+
10
+ export const argTypes = {
11
+ textContent: {
12
+ description: 'De content van de header',
13
+ control: 'text',
14
+ },
15
+ distanced: {
16
+ description: 'Zet afstand tussen de header en nabije content',
17
+ control: 'boolean',
18
+ },
19
+ };
20
+
21
+ export const defaultArgs = {
22
+ textContent: '',
23
+ distanced: false,
24
+ };
25
+
26
+ export const exampleArgs = {
27
+ textContent: 'The Quick Brown Fox Jumps Over The Lazy Dog',
28
+ };
29
+
30
+ export const Heading3 = ({
31
+ children,
32
+ textContent = defaultArgs.textContent,
33
+ distanced = defaultArgs.distanced,
34
+ ...restProps
35
+ }) => (
36
+ <h3
37
+ className={clsx('utrecht-heading-3', {
38
+ 'utrecht-heading-3--distanced': distanced,
39
+ })}
40
+ {...restProps}
41
+ >
42
+ {children}
43
+ {textContent}
44
+ </h3>
45
+ );
46
+
47
+ export default Heading3;
@@ -0,0 +1,79 @@
1
+ {
2
+ "utrecht": {
3
+ "heading-3": {
4
+ "color": {
5
+ "$extensions": {
6
+ "nl.nldesignsystem.css.property": {
7
+ "syntax": "<color>",
8
+ "inherits": true
9
+ },
10
+ "nl.nldesignsystem.fallback": ["utrecht.heading.color", "utrecht.document.color"],
11
+ "nl.nldesignsystem.figma.supports-token": true
12
+ },
13
+ "type": "color"
14
+ },
15
+ "font-family": {
16
+ "$extensions": {
17
+ "nl.nldesignsystem.css.property": {
18
+ "syntax": "*",
19
+ "inherits": true
20
+ },
21
+ "nl.nldesignsystem.fallback": ["utrecht.heading.font-family", "utrecht.document.font-family"],
22
+ "nl.nldesignsystem.figma.supports-token": true
23
+ },
24
+ "type": "fontFamilies"
25
+ },
26
+ "font-size": {
27
+ "$extensions": {
28
+ "nl.nldesignsystem.css.property": {
29
+ "syntax": "<length>",
30
+ "inherits": true
31
+ },
32
+ "nl.nldesignsystem.figma.supports-token": true
33
+ },
34
+ "type": "fontSizes"
35
+ },
36
+ "font-weight": {
37
+ "$extensions": {
38
+ "nl.nldesignsystem.css.property": {
39
+ "syntax": "<number>",
40
+ "inherits": true
41
+ },
42
+ "nl.nldesignsystem.fallback": ["utrecht.heading.font-weight"],
43
+ "nl.nldesignsystem.figma.supports-token": true
44
+ },
45
+ "type": "fontWeights"
46
+ },
47
+ "line-height": {
48
+ "$extensions": {
49
+ "nl.nldesignsystem.css.property": {
50
+ "syntax": ["<length>", "<number>"],
51
+ "inherits": true
52
+ },
53
+ "nl.nldesignsystem.figma.supports-token": true
54
+ },
55
+ "type": "lineHeights"
56
+ },
57
+ "margin-block-end": {
58
+ "$extensions": {
59
+ "nl.nldesignsystem.css.property": {
60
+ "syntax": "<length>",
61
+ "inherits": true
62
+ },
63
+ "nl.nldesignsystem.figma.supports-token": false
64
+ },
65
+ "type": "spacing"
66
+ },
67
+ "margin-block-start": {
68
+ "$extensions": {
69
+ "nl.nldesignsystem.css.property": {
70
+ "syntax": "<length>",
71
+ "inherits": true
72
+ },
73
+ "nl.nldesignsystem.figma.supports-token": false
74
+ },
75
+ "type": "spacing"
76
+ }
77
+ }
78
+ }
79
+ }