@bonniernews/dn-design-system-web 20.5.1-beta.2 → 20.5.2
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 +35 -3
- package/components/list-item/list-item.js +1 -1
- package/components/teaser-image/teaser-image.scss +3 -1
- package/foundations/variables/colorsDnDarkTokens.scss +1 -1
- package/package.json +3 -50
- package/tokens/colors-css-variables.json +1 -1
- package/tokens/colors-dark-mode.json +2 -2
- package/tokens-tmp/colors-css-variables.json +86 -0
- package/tokens-tmp/shadows-css-variables.json +6 -0
- package/tokens-tmp/spacing-base-list.json +14 -0
- package/tokens-tmp/spacing-detail-list.json +18 -0
- package/components/divider/divider.tsx +0 -21
- package/components/quote/quote.tsx +0 -23
- package/components/thematic-break/thematic-break.tsx +0 -18
- package/index.tsx +0 -8
- package/preact/components/divider/divider.d.ts +0 -7
- package/preact/components/quote/quote.d.ts +0 -8
- package/preact/components/thematic-break/thematic-break.d.ts +0 -6
- package/preact/components.cjs +0 -66
- package/preact/components.cjs.map +0 -7
- package/preact/components.esm.js +0 -43
- package/preact/components.esm.js.map +0 -7
- package/preact/index.d.ts +0 -6
- package/react/components/divider/divider.d.ts +0 -7
- package/react/components/quote/quote.d.ts +0 -8
- package/react/components/thematic-break/thematic-break.d.ts +0 -6
- package/react/components.cjs +0 -66
- package/react/components.cjs.map +0 -7
- package/react/components.esm.js +0 -43
- package/react/components.esm.js.map +0 -7
- package/react/index.d.ts +0 -6
- package/tsconfig-preact.json +0 -12
- package/tsconfig-react.json +0 -11
- package/tsconfig.json +0 -21
- /package/{.release-it.cjs → .release-it.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +4,43 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
## [20.5.
|
|
7
|
+
## [20.5.2](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@20.5.1...@bonniernews/dn-design-system-web@20.5.2) (2024-10-08)
|
|
8
8
|
|
|
9
|
-
## [20.5.1-beta.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@20.5.1-beta.0...@bonniernews/dn-design-system-web@20.5.1-beta.1) (2024-10-02)
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
### Maintenance
|
|
11
|
+
|
|
12
|
+
* **foundations:** update tokens from Figma ([#1420](https://github.com/BonnierNews/dn-design-system/issues/1420)) ([09bed27](https://github.com/BonnierNews/dn-design-system/commit/09bed27d5b9859dc7043aae93eedd498802f2082))
|
|
13
|
+
* **foundations:** update tokens from Figma ([#1423](https://github.com/BonnierNews/dn-design-system/issues/1423)) ([d8b68e0](https://github.com/BonnierNews/dn-design-system/commit/d8b68e05ad5a02b619b6f86d182bc0f30cc400bf))
|
|
14
|
+
* prerelease packages ([d264310](https://github.com/BonnierNews/dn-design-system/commit/d26431063ee3f86e03bc0f027c680f8fcd397f73))
|
|
15
|
+
* prerelease packages ([adc82e8](https://github.com/BonnierNews/dn-design-system/commit/adc82e84bd81599b993de929ed3af61f4cd8f7fe))
|
|
16
|
+
* **web:** disable token updates for web ([#1422](https://github.com/BonnierNews/dn-design-system/issues/1422)) ([4092eac](https://github.com/BonnierNews/dn-design-system/commit/4092eacab58a4246df8a54c40775dbe0e9911f04))
|
|
17
|
+
|
|
18
|
+
## [20.5.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@20.5.0...@bonniernews/dn-design-system-web@20.5.1) (2024-09-30)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### ⚠ BREAKING CHANGES
|
|
22
|
+
|
|
23
|
+
* remove ComponentSpacing and LayoutSpacing (#1416)
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **app:** use medium in Pill and BottomNavigationItem ([#1417](https://github.com/BonnierNews/dn-design-system/issues/1417)) ([49ff83e](https://github.com/BonnierNews/dn-design-system/commit/49ff83e4a9a90ed1fbb4976287e341edae264e6d))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* **web:** fix aspect-ratio in screenshot tests ([#1418](https://github.com/BonnierNews/dn-design-system/issues/1418)) ([7d35c42](https://github.com/BonnierNews/dn-design-system/commit/7d35c42e7485d019460c8343d8e7fc826351327f))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Maintenance
|
|
36
|
+
|
|
37
|
+
* **app:** remove all usage of component colors ([#1413](https://github.com/BonnierNews/dn-design-system/issues/1413)) ([45b4245](https://github.com/BonnierNews/dn-design-system/commit/45b4245e84ea04376345c71458285014c29e905f))
|
|
38
|
+
* **app:** remove all usage of deprecated typo ([#1415](https://github.com/BonnierNews/dn-design-system/issues/1415)) ([fc84e28](https://github.com/BonnierNews/dn-design-system/commit/fc84e288f9e71052b829dcb1398f648101640f5b))
|
|
39
|
+
* **foundations:** update tokens from Figma ([#1414](https://github.com/BonnierNews/dn-design-system/issues/1414)) ([dd13750](https://github.com/BonnierNews/dn-design-system/commit/dd13750a2e4a6d87af86f5e753667ffb254a0bbb))
|
|
40
|
+
* prerelease packages ([545aca7](https://github.com/BonnierNews/dn-design-system/commit/545aca73322361d810f17ffe4c535ff78ea920ae))
|
|
41
|
+
* prerelease packages ([f49d888](https://github.com/BonnierNews/dn-design-system/commit/f49d888f4053c4cc1e6e23c7150e59a2d2bd01e3))
|
|
42
|
+
* prerelease packages ([3cac536](https://github.com/BonnierNews/dn-design-system/commit/3cac536bc7ac07eca654b21acf6c82533c926448))
|
|
43
|
+
* remove ComponentSpacing and LayoutSpacing ([#1416](https://github.com/BonnierNews/dn-design-system/issues/1416)) ([61c46d6](https://github.com/BonnierNews/dn-design-system/commit/61c46d6fdff175339b124d6cf54753004be043b7))
|
|
12
44
|
|
|
13
45
|
## [20.5.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@20.4.5...@bonniernews/dn-design-system-web@20.5.0) (2024-09-26)
|
|
14
46
|
|
|
@@ -7,13 +7,15 @@
|
|
|
7
7
|
margin: 0;
|
|
8
8
|
|
|
9
9
|
.ds-teaser-image__byline {
|
|
10
|
-
@include ds-typography($ds-typography-functionalmeta01, $lineHeight: $ds-lineheight-l);
|
|
11
10
|
position: absolute;
|
|
12
11
|
bottom: 0;
|
|
13
12
|
right: 0;
|
|
14
13
|
padding: ds-spacing(0 $ds-s-025);
|
|
15
14
|
margin-left: ds-spacing($ds-s-050);
|
|
15
|
+
|
|
16
|
+
@include ds-typography($ds-typography-functionalmeta01, $lineHeight: $ds-lineheight-l);
|
|
16
17
|
color: $ds-color-static-white;
|
|
18
|
+
|
|
17
19
|
background-color: $ds-color-static-transparent-black;
|
|
18
20
|
z-index: 5;
|
|
19
21
|
}
|
|
@@ -39,12 +39,12 @@ $ds-hex-dark-surface-background: #050505;
|
|
|
39
39
|
$ds-hex-dark-surface-raised: #2B2B2B;
|
|
40
40
|
$ds-hex-dark-surface-native-article: #2B2B2B;
|
|
41
41
|
$ds-hex-dark-surface-elevated: #2B2B2B;
|
|
42
|
+
$ds-hex-dark-surface-inverted: #ffffff;
|
|
42
43
|
$ds-hex-dark-surface-overlay: #05050580;
|
|
43
44
|
$ds-hex-dark-surface-quiz: #EA3E3F;
|
|
44
45
|
$ds-hex-dark-surface-korsord: #8BB6E8;
|
|
45
46
|
$ds-hex-dark-surface-sudoko: #90D0BD;
|
|
46
47
|
$ds-hex-dark-surface-brand: #DA000D;
|
|
47
|
-
$ds-hex-dark-surface-inverted: #141414;
|
|
48
48
|
$ds-hex-dark-border-primary: #3B3B3B;
|
|
49
49
|
$ds-hex-dark-border-primary-02: #ffffff66;
|
|
50
50
|
$ds-hex-dark-border-primary-03: #EDEDED;
|
package/package.json
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonniernews/dn-design-system-web",
|
|
3
|
-
"version": "20.5.
|
|
3
|
+
"version": "20.5.2",
|
|
4
4
|
"description": "DN design system for web.",
|
|
5
|
-
"main": "index.
|
|
6
|
-
"type": "module",
|
|
7
|
-
"source": "index.tsx",
|
|
5
|
+
"main": "index.js",
|
|
8
6
|
"homepage": "https://github.com/BonnierNews/dn-design-system/tree/main/web/src#readme",
|
|
9
7
|
"repository": {
|
|
10
8
|
"type": "git",
|
|
@@ -16,63 +14,18 @@
|
|
|
16
14
|
"bugs": {
|
|
17
15
|
"url": "https://github.com/BonnierNews/dn-design-system/issues"
|
|
18
16
|
},
|
|
19
|
-
"exports": {
|
|
20
|
-
"./preact": {
|
|
21
|
-
"import": "./preact/components.esm.js",
|
|
22
|
-
"require": "./preact/components.cjs"
|
|
23
|
-
},
|
|
24
|
-
"./react": {
|
|
25
|
-
"import": "./react/components.esm.js",
|
|
26
|
-
"require": "./react/components.cjs"
|
|
27
|
-
},
|
|
28
|
-
"./assets/*.tsx": "./assets/*.tsx",
|
|
29
|
-
"./assets/*.njk": "./assets/*.njk",
|
|
30
|
-
"./assets/*.scss": "./assets/*.scss",
|
|
31
|
-
"./components/*.tsx": "./components/*.tsx",
|
|
32
|
-
"./components/*.njk": "./components/*.njk",
|
|
33
|
-
"./components/*.md": "./components/*.md",
|
|
34
|
-
"./components/*.js": "./components/*.js",
|
|
35
|
-
"./components/*.scss": "./components/*.scss",
|
|
36
|
-
"./components/*.css": "./components/*.css",
|
|
37
|
-
"./introduction/*.md": "./introduction/*.md",
|
|
38
|
-
"./foundations/*": "./foundations/*",
|
|
39
|
-
"./tokens/*.json": "./tokens/*.json",
|
|
40
|
-
"./package.json": "./package.json"
|
|
41
|
-
},
|
|
42
|
-
"peerDependencies": {
|
|
43
|
-
"preact": "^10.24.0",
|
|
44
|
-
"react": "^18.3.1",
|
|
45
|
-
"react-dom": "^18.3.1"
|
|
46
|
-
},
|
|
47
|
-
"peerDependenciesMeta": {
|
|
48
|
-
"preact": {
|
|
49
|
-
"optional": true
|
|
50
|
-
},
|
|
51
|
-
"react": {
|
|
52
|
-
"optional": true
|
|
53
|
-
},
|
|
54
|
-
"react-dom": {
|
|
55
|
-
"optional": true
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
17
|
"devDependencies": {
|
|
59
|
-
"@bonniernews/tsconfig": "^0.0.2",
|
|
60
18
|
"@commitlint/cli": "^18.4.3",
|
|
61
19
|
"@commitlint/config-conventional": "^18.4.3",
|
|
62
20
|
"@release-it/conventional-changelog": "^8.0.1",
|
|
63
21
|
"conventional-changelog-conventionalcommits": "^6.1.0",
|
|
64
|
-
"esbuild": "^0.24.0",
|
|
65
22
|
"postcss": "8.4.31",
|
|
66
|
-
"preact": "^10.24.0",
|
|
67
|
-
"react": "^18.3.1",
|
|
68
|
-
"react-dom": "^18.3.1",
|
|
69
23
|
"release-it": "^17.0.0",
|
|
70
24
|
"stylelint": "^15.11.0",
|
|
71
25
|
"stylelint-config-recommended-scss": "^13.1.0",
|
|
72
26
|
"stylelint-prettier": "^4.0.2",
|
|
73
27
|
"stylelint-sass-render-errors": "^3.0.1",
|
|
74
|
-
"stylelint-selector-bem-pattern": "^2.1.1"
|
|
75
|
-
"typescript": "^5.6.2"
|
|
28
|
+
"stylelint-selector-bem-pattern": "^2.1.1"
|
|
76
29
|
},
|
|
77
30
|
"scripts": {
|
|
78
31
|
"lint:styles": "yarn stylelint \"**/*.scss\" \"!node_modules/\"",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"raised": "#2B2B2B",
|
|
48
48
|
"native-article": "#2B2B2B",
|
|
49
49
|
"elevated": "#2B2B2B",
|
|
50
|
+
"inverted": "#ffffff",
|
|
50
51
|
"overlay": "#05050580",
|
|
51
52
|
"quiz": "#EA3E3F",
|
|
52
53
|
"korsord": "#8BB6E8",
|
|
53
54
|
"sudoko": "#90D0BD",
|
|
54
|
-
"brand": "#DA000D"
|
|
55
|
-
"inverted": "#141414"
|
|
55
|
+
"brand": "#DA000D"
|
|
56
56
|
},
|
|
57
57
|
"border": {
|
|
58
58
|
"primary": "#3B3B3B",
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"text-primary": "var(--ds-color-text-primary)",
|
|
3
|
+
"text-primary-02": "var(--ds-color-text-primary-02)",
|
|
4
|
+
"text-secondary": "var(--ds-color-text-secondary)",
|
|
5
|
+
"text-critical": "var(--ds-color-text-critical)",
|
|
6
|
+
"text-disabled": "var(--ds-color-text-disabled)",
|
|
7
|
+
"text-on-brand": "var(--ds-color-text-on-brand)",
|
|
8
|
+
"text-on-business": "var(--ds-color-text-on-business)",
|
|
9
|
+
"text-on-critical": "var(--ds-color-text-on-critical)",
|
|
10
|
+
"text-on-success": "var(--ds-color-text-on-success)",
|
|
11
|
+
"text-brand": "var(--ds-color-text-brand)",
|
|
12
|
+
"text-body-link": "var(--ds-color-text-body-link)",
|
|
13
|
+
"text-body-link-visited": "var(--ds-color-text-body-link-visited)",
|
|
14
|
+
"text-positive": "var(--ds-color-text-positive)",
|
|
15
|
+
"icon-primary": "var(--ds-color-icon-primary)",
|
|
16
|
+
"icon-primary-02": "var(--ds-color-icon-primary-02)",
|
|
17
|
+
"icon-secondary": "var(--ds-color-icon-secondary)",
|
|
18
|
+
"icon-critical": "var(--ds-color-icon-critical)",
|
|
19
|
+
"icon-disabled": "var(--ds-color-icon-disabled)",
|
|
20
|
+
"icon-on-brand": "var(--ds-color-icon-on-brand)",
|
|
21
|
+
"icon-on-business": "var(--ds-color-icon-on-business)",
|
|
22
|
+
"icon-brand": "var(--ds-color-icon-brand)",
|
|
23
|
+
"icon-on-critical": "var(--ds-color-icon-on-critical)",
|
|
24
|
+
"icon-on-success": "var(--ds-color-icon-on-success)",
|
|
25
|
+
"component-brand": "var(--ds-color-component-brand)",
|
|
26
|
+
"component-business": "var(--ds-color-component-business)",
|
|
27
|
+
"component-primary": "var(--ds-color-component-primary)",
|
|
28
|
+
"component-primary-overlay": "var(--ds-color-component-primary-overlay)",
|
|
29
|
+
"component-primary-overlay-02": "var(--ds-color-component-primary-overlay-02)",
|
|
30
|
+
"component-secondary": "var(--ds-color-component-secondary)",
|
|
31
|
+
"component-secondary-overlay": "var(--ds-color-component-secondary-overlay)",
|
|
32
|
+
"component-secondary-overlay-02": "var(--ds-color-component-secondary-overlay-02)",
|
|
33
|
+
"component-critical": "var(--ds-color-component-critical)",
|
|
34
|
+
"component-critical-overlay": "var(--ds-color-component-critical-overlay)",
|
|
35
|
+
"component-static-white": "var(--ds-color-component-static-white)",
|
|
36
|
+
"component-positive": "var(--ds-color-component-positive)",
|
|
37
|
+
"component-primary-02": "var(--ds-color-component-primary-02)",
|
|
38
|
+
"surface-below": "var(--ds-color-surface-below)",
|
|
39
|
+
"surface-native-article": "var(--ds-color-surface-native-article)",
|
|
40
|
+
"surface-background": "var(--ds-color-surface-background)",
|
|
41
|
+
"surface-raised": "var(--ds-color-surface-raised)",
|
|
42
|
+
"surface-elevated": "var(--ds-color-surface-elevated)",
|
|
43
|
+
"surface-overlay": "var(--ds-color-surface-overlay)",
|
|
44
|
+
"surface-quiz": "var(--ds-color-surface-quiz)",
|
|
45
|
+
"surface-korsord": "var(--ds-color-surface-korsord)",
|
|
46
|
+
"surface-sudoko": "var(--ds-color-surface-sudoko)",
|
|
47
|
+
"surface-brand": "var(--ds-color-surface-brand)",
|
|
48
|
+
"surface-inverted": "var(--ds-color-surface-inverted)",
|
|
49
|
+
"surface-breaking": "var(--ds-color-surface-breaking)",
|
|
50
|
+
"border-primary": "var(--ds-color-border-primary)",
|
|
51
|
+
"border-primary-02": "var(--ds-color-border-primary-02)",
|
|
52
|
+
"border-primary-03": "var(--ds-color-border-primary-03)",
|
|
53
|
+
"border-secondary": "var(--ds-color-border-secondary)",
|
|
54
|
+
"border-business": "var(--ds-color-border-business)",
|
|
55
|
+
"border-critical": "var(--ds-color-border-critical)",
|
|
56
|
+
"border-focus": "var(--ds-color-border-focus)",
|
|
57
|
+
"border-focus-02": "var(--ds-color-border-focus-02)",
|
|
58
|
+
"border-focus-03": "var(--ds-color-border-focus-03)",
|
|
59
|
+
"border-focus-04": "var(--ds-color-border-focus-04)",
|
|
60
|
+
"border-brand": "var(--ds-color-border-brand)",
|
|
61
|
+
"background-primary": "var(--ds-color-background-primary)",
|
|
62
|
+
"static-red-100": "var(--ds-color-static-red-100)",
|
|
63
|
+
"static-black": "var(--ds-color-static-black)",
|
|
64
|
+
"static-transparent-black": "var(--ds-color-static-transparent-black)",
|
|
65
|
+
"static-white": "var(--ds-color-static-white)",
|
|
66
|
+
"static-transparent-white": "var(--ds-color-static-transparent-white)",
|
|
67
|
+
"static-green-100": "var(--ds-color-static-green-100)",
|
|
68
|
+
"static-red-300": "var(--ds-color-static-red-300)",
|
|
69
|
+
"static-transparent-white-10": "var(--ds-color-static-transparent-white-10)",
|
|
70
|
+
"static-kultur": "var(--ds-color-static-kultur)",
|
|
71
|
+
"static-economy": "var(--ds-color-static-economy)",
|
|
72
|
+
"static-sport": "var(--ds-color-static-sport)",
|
|
73
|
+
"static-neutral-200": "var(--ds-color-static-neutral-200)",
|
|
74
|
+
"static-sthlm": "var(--ds-color-static-sthlm)",
|
|
75
|
+
"static-ad-yellow": "var(--ds-color-static-ad-yellow)",
|
|
76
|
+
"static-neutral-100": "var(--ds-color-static-neutral-100)",
|
|
77
|
+
"static-neutral-500": "var(--ds-color-static-neutral-500)",
|
|
78
|
+
"static-red-500": "var(--ds-color-static-red-500)",
|
|
79
|
+
"static-yellow": "var(--ds-color-static-yellow)",
|
|
80
|
+
"static-red-200": "var(--ds-color-static-red-200)",
|
|
81
|
+
"static-red-0": "var(--ds-color-static-red-0)",
|
|
82
|
+
"gradient-content-fade-left": "var(--ds-color-gradient-content-fade-left)",
|
|
83
|
+
"gradient-content-fade-right": "var(--ds-color-gradient-content-fade-right)",
|
|
84
|
+
"gradient-content-fade-up": "var(--ds-color-gradient-content-fade-up)",
|
|
85
|
+
"gradient-content-fade-down": "var(--ds-color-gradient-content-fade-down)"
|
|
86
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"outer": "outer",
|
|
3
|
+
"outer-negative": "outer-negative",
|
|
4
|
+
"page-horizontal": "page-horizontal",
|
|
5
|
+
"page-top-small": "page-top-small",
|
|
6
|
+
"gap-vertical-static-medium": "gap-vertical-static-medium",
|
|
7
|
+
"gap-vertical-medium": "gap-vertical-medium",
|
|
8
|
+
"gap-vertical-static-large": "gap-vertical-static-large",
|
|
9
|
+
"gap-vertical-static-small": "gap-vertical-static-small",
|
|
10
|
+
"page-top-xsmall": "page-top-xsmall",
|
|
11
|
+
"teaser-vertical-small": "teaser-vertical-small",
|
|
12
|
+
"teaser-horizontal": "teaser-horizontal",
|
|
13
|
+
"teaser-vertical-medium": "teaser-vertical-medium",
|
|
14
|
+
"direkt-header-bottom": "direkt-header-bottom",
|
|
15
|
+
"spacing-sm": "spacing-sm",
|
|
16
|
+
"spacing-md": "spacing-md",
|
|
17
|
+
"spacing-lg": "spacing-lg"
|
|
18
|
+
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface DividerProps {
|
|
2
|
-
variant?: 'soft' | 'medium' | 'hard';
|
|
3
|
-
classNames?: string;
|
|
4
|
-
attributes?: object;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export const Divider = ({ variant = 'soft', classNames, attributes }: DividerProps) => {
|
|
8
|
-
const componentClassName = 'ds-divider';
|
|
9
|
-
const classNamePrefix = `${componentClassName}--`;
|
|
10
|
-
const classes = [
|
|
11
|
-
componentClassName,
|
|
12
|
-
`${classNamePrefix}${variant}`,
|
|
13
|
-
classNames
|
|
14
|
-
].filter(Boolean).join(' ');
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<div className={classes} {...attributes}><hr /></div>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export default Divider;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface QuoteProps {
|
|
2
|
-
bodyHtml: string;
|
|
3
|
-
theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
|
|
4
|
-
classNames?: string;
|
|
5
|
-
attributes?: object;
|
|
6
|
-
forcePx?: boolean;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {
|
|
10
|
-
const componentClassName = 'ds-quote';
|
|
11
|
-
const classes = [
|
|
12
|
-
componentClassName,
|
|
13
|
-
`ds-theme--${theme}`,
|
|
14
|
-
forcePx && 'ds-force-px',
|
|
15
|
-
classNames
|
|
16
|
-
].filter(Boolean).join(' ');
|
|
17
|
-
|
|
18
|
-
const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<blockquote dangerouslySetInnerHTML={{ __html: quoteHtml }} className={classes} {...attributes} />
|
|
22
|
-
);
|
|
23
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface ThematicBreakProps {
|
|
2
|
-
classNames?: string;
|
|
3
|
-
attributes?: object;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export const ThematicBreak = ({ classNames, attributes }: ThematicBreakProps) => {
|
|
7
|
-
const componentClassName = 'ds-thematic-break';
|
|
8
|
-
const classes = [
|
|
9
|
-
componentClassName,
|
|
10
|
-
classNames
|
|
11
|
-
].filter(Boolean).join(' ');
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<div className={classes} {...attributes}><hr /></div>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default ThematicBreak;
|
package/index.tsx
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface QuoteProps {
|
|
2
|
-
bodyHtml: string;
|
|
3
|
-
theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
|
|
4
|
-
classNames?: string;
|
|
5
|
-
attributes?: object;
|
|
6
|
-
forcePx?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const Quote: ({ bodyHtml, theme, classNames, attributes, forcePx }: QuoteProps) => import("preact").JSX.Element;
|
package/preact/components.cjs
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// ../src/index.tsx
|
|
21
|
-
var src_exports = {};
|
|
22
|
-
__export(src_exports, {
|
|
23
|
-
Divider: () => Divider,
|
|
24
|
-
Quote: () => Quote,
|
|
25
|
-
ThematicBreak: () => ThematicBreak
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(src_exports);
|
|
28
|
-
|
|
29
|
-
// ../src/components/divider/divider.tsx
|
|
30
|
-
var import_jsx_runtime = require("preact/jsx-runtime");
|
|
31
|
-
var Divider = ({ variant = "soft", classNames, attributes }) => {
|
|
32
|
-
const componentClassName = "ds-divider";
|
|
33
|
-
const classNamePrefix = `${componentClassName}--`;
|
|
34
|
-
const classes = [
|
|
35
|
-
componentClassName,
|
|
36
|
-
`${classNamePrefix}${variant}`,
|
|
37
|
-
classNames
|
|
38
|
-
].filter(Boolean).join(" ");
|
|
39
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: classes, ...attributes, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("hr", {}) });
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// ../src/components/thematic-break/thematic-break.tsx
|
|
43
|
-
var import_jsx_runtime2 = require("preact/jsx-runtime");
|
|
44
|
-
var ThematicBreak = ({ classNames, attributes }) => {
|
|
45
|
-
const componentClassName = "ds-thematic-break";
|
|
46
|
-
const classes = [
|
|
47
|
-
componentClassName,
|
|
48
|
-
classNames
|
|
49
|
-
].filter(Boolean).join(" ");
|
|
50
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: classes, ...attributes, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("hr", {}) });
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
// ../src/components/quote/quote.tsx
|
|
54
|
-
var import_jsx_runtime3 = require("preact/jsx-runtime");
|
|
55
|
-
var Quote = ({ bodyHtml, theme = "nyheter", classNames, attributes, forcePx }) => {
|
|
56
|
-
const componentClassName = "ds-quote";
|
|
57
|
-
const classes = [
|
|
58
|
-
componentClassName,
|
|
59
|
-
`ds-theme--${theme}`,
|
|
60
|
-
forcePx && "ds-force-px",
|
|
61
|
-
classNames
|
|
62
|
-
].filter(Boolean).join(" ");
|
|
63
|
-
const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`;
|
|
64
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("blockquote", { dangerouslySetInnerHTML: { __html: quoteHtml }, className: classes, ...attributes });
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=components.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../index.tsx", "../components/divider/divider.tsx", "../components/thematic-break/thematic-break.tsx", "../components/quote/quote.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Divider } from \"./components/divider/divider\";\nexport { Divider };\n\nimport { ThematicBreak } from \"./components/thematic-break/thematic-break\";\nexport { ThematicBreak };\n\nimport { Quote } from \"./components/quote/quote\";\nexport { Quote };\n", "export interface DividerProps {\n variant?: 'soft' | 'medium' | 'hard';\n classNames?: string;\n attributes?: object;\n}\n\nexport const Divider = ({ variant = 'soft', classNames, attributes }: DividerProps) => {\n const componentClassName = 'ds-divider';\n const classNamePrefix = `${componentClassName}--`;\n const classes = [\n componentClassName,\n `${classNamePrefix}${variant}`,\n classNames\n ].filter(Boolean).join(' ');\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default Divider;\n", "export interface ThematicBreakProps {\n classNames?: string;\n attributes?: object;\n}\n\nexport const ThematicBreak = ({ classNames, attributes }: ThematicBreakProps) => {\n const componentClassName = 'ds-thematic-break';\n const classes = [\n componentClassName,\n classNames\n ].filter(Boolean).join(' ');\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default ThematicBreak;\n", "export interface QuoteProps {\n bodyHtml: string;\n theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';\n classNames?: string;\n attributes?: object;\n forcePx?: boolean;\n}\n\nexport const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {\n const componentClassName = 'ds-quote';\n const classes = [\n componentClassName,\n `ds-theme--${theme}`,\n forcePx && 'ds-force-px',\n classNames\n ].filter(Boolean).join(' ');\n\n const quoteHtml = `<span class=\"${componentClassName}__border\"></span> ${bodyHtml}`\n\n return (\n <blockquote dangerouslySetInnerHTML={{ __html: quoteHtml }} className={classes} {...attributes} />\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACgB6C;AAVtC,IAAM,UAAU,CAAC,EAAE,UAAU,QAAQ,YAAY,WAAW,MAAoB;AACrF,QAAM,qBAAqB;AAC3B,QAAM,kBAAkB,GAAG,kBAAkB;AAC7C,QAAM,UAAU;AAAA,IACd;AAAA,IACA,GAAG,eAAe,GAAG,OAAO;AAAA,IAC5B;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,SACE,4CAAC,SAAI,WAAW,SAAU,GAAG,YAAY,sDAAC,QAAG,GAAE;AAEnD;;;ACL6C,IAAAA,sBAAA;AARtC,IAAM,gBAAgB,CAAC,EAAE,YAAY,WAAW,MAA0B;AAC/E,QAAM,qBAAqB;AAC3B,QAAM,UAAU;AAAA,IACd;AAAA,IACA;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,SACE,6CAAC,SAAI,WAAW,SAAU,GAAG,YAAY,uDAAC,QAAG,GAAE;AAEnD;;;ACKI,IAAAC,sBAAA;AAZG,IAAM,QAAQ,CAAC,EAAE,UAAU,QAAQ,WAAW,YAAY,YAAY,QAAQ,MAAkB;AACrG,QAAM,qBAAqB;AAC3B,QAAM,UAAU;AAAA,IACd;AAAA,IACA,aAAa,KAAK;AAAA,IAClB,WAAW;AAAA,IACX;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,QAAM,YAAY,gBAAgB,kBAAkB,qBAAqB,QAAQ;AAEjF,SACE,6CAAC,gBAAW,yBAAyB,EAAE,QAAQ,UAAU,GAAG,WAAW,SAAU,GAAG,YAAY;AAEpG;",
|
|
6
|
-
"names": ["import_jsx_runtime", "import_jsx_runtime"]
|
|
7
|
-
}
|
package/preact/components.esm.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// ../src/components/divider/divider.tsx
|
|
2
|
-
import { jsx } from "preact/jsx-runtime";
|
|
3
|
-
var Divider = ({ variant = "soft", classNames, attributes }) => {
|
|
4
|
-
const componentClassName = "ds-divider";
|
|
5
|
-
const classNamePrefix = `${componentClassName}--`;
|
|
6
|
-
const classes = [
|
|
7
|
-
componentClassName,
|
|
8
|
-
`${classNamePrefix}${variant}`,
|
|
9
|
-
classNames
|
|
10
|
-
].filter(Boolean).join(" ");
|
|
11
|
-
return /* @__PURE__ */ jsx("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsx("hr", {}) });
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
// ../src/components/thematic-break/thematic-break.tsx
|
|
15
|
-
import { jsx as jsx2 } from "preact/jsx-runtime";
|
|
16
|
-
var ThematicBreak = ({ classNames, attributes }) => {
|
|
17
|
-
const componentClassName = "ds-thematic-break";
|
|
18
|
-
const classes = [
|
|
19
|
-
componentClassName,
|
|
20
|
-
classNames
|
|
21
|
-
].filter(Boolean).join(" ");
|
|
22
|
-
return /* @__PURE__ */ jsx2("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsx2("hr", {}) });
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// ../src/components/quote/quote.tsx
|
|
26
|
-
import { jsx as jsx3 } from "preact/jsx-runtime";
|
|
27
|
-
var Quote = ({ bodyHtml, theme = "nyheter", classNames, attributes, forcePx }) => {
|
|
28
|
-
const componentClassName = "ds-quote";
|
|
29
|
-
const classes = [
|
|
30
|
-
componentClassName,
|
|
31
|
-
`ds-theme--${theme}`,
|
|
32
|
-
forcePx && "ds-force-px",
|
|
33
|
-
classNames
|
|
34
|
-
].filter(Boolean).join(" ");
|
|
35
|
-
const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`;
|
|
36
|
-
return /* @__PURE__ */ jsx3("blockquote", { dangerouslySetInnerHTML: { __html: quoteHtml }, className: classes, ...attributes });
|
|
37
|
-
};
|
|
38
|
-
export {
|
|
39
|
-
Divider,
|
|
40
|
-
Quote,
|
|
41
|
-
ThematicBreak
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=components.esm.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../components/divider/divider.tsx", "../components/thematic-break/thematic-break.tsx", "../components/quote/quote.tsx"],
|
|
4
|
-
"sourcesContent": ["export interface DividerProps {\n variant?: 'soft' | 'medium' | 'hard';\n classNames?: string;\n attributes?: object;\n}\n\nexport const Divider = ({ variant = 'soft', classNames, attributes }: DividerProps) => {\n const componentClassName = 'ds-divider';\n const classNamePrefix = `${componentClassName}--`;\n const classes = [\n componentClassName,\n `${classNamePrefix}${variant}`,\n classNames\n ].filter(Boolean).join(' ');\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default Divider;\n", "export interface ThematicBreakProps {\n classNames?: string;\n attributes?: object;\n}\n\nexport const ThematicBreak = ({ classNames, attributes }: ThematicBreakProps) => {\n const componentClassName = 'ds-thematic-break';\n const classes = [\n componentClassName,\n classNames\n ].filter(Boolean).join(' ');\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default ThematicBreak;\n", "export interface QuoteProps {\n bodyHtml: string;\n theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';\n classNames?: string;\n attributes?: object;\n forcePx?: boolean;\n}\n\nexport const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {\n const componentClassName = 'ds-quote';\n const classes = [\n componentClassName,\n `ds-theme--${theme}`,\n forcePx && 'ds-force-px',\n classNames\n ].filter(Boolean).join(' ');\n\n const quoteHtml = `<span class=\"${componentClassName}__border\"></span> ${bodyHtml}`\n\n return (\n <blockquote dangerouslySetInnerHTML={{ __html: quoteHtml }} className={classes} {...attributes} />\n );\n};\n"],
|
|
5
|
-
"mappings": ";AAgB6C;AAVtC,IAAM,UAAU,CAAC,EAAE,UAAU,QAAQ,YAAY,WAAW,MAAoB;AACrF,QAAM,qBAAqB;AAC3B,QAAM,kBAAkB,GAAG,kBAAkB;AAC7C,QAAM,UAAU;AAAA,IACd;AAAA,IACA,GAAG,eAAe,GAAG,OAAO;AAAA,IAC5B;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,SACE,oBAAC,SAAI,WAAW,SAAU,GAAG,YAAY,8BAAC,QAAG,GAAE;AAEnD;;;ACL6C,gBAAAA,YAAA;AARtC,IAAM,gBAAgB,CAAC,EAAE,YAAY,WAAW,MAA0B;AAC/E,QAAM,qBAAqB;AAC3B,QAAM,UAAU;AAAA,IACd;AAAA,IACA;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,SACE,gBAAAA,KAAC,SAAI,WAAW,SAAU,GAAG,YAAY,0BAAAA,KAAC,QAAG,GAAE;AAEnD;;;ACKI,gBAAAC,YAAA;AAZG,IAAM,QAAQ,CAAC,EAAE,UAAU,QAAQ,WAAW,YAAY,YAAY,QAAQ,MAAkB;AACrG,QAAM,qBAAqB;AAC3B,QAAM,UAAU;AAAA,IACd;AAAA,IACA,aAAa,KAAK;AAAA,IAClB,WAAW;AAAA,IACX;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,QAAM,YAAY,gBAAgB,kBAAkB,qBAAqB,QAAQ;AAEjF,SACE,gBAAAA,KAAC,gBAAW,yBAAyB,EAAE,QAAQ,UAAU,GAAG,WAAW,SAAU,GAAG,YAAY;AAEpG;",
|
|
6
|
-
"names": ["jsx", "jsx"]
|
|
7
|
-
}
|
package/preact/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export interface DividerProps {
|
|
2
|
-
variant?: 'soft' | 'medium' | 'hard';
|
|
3
|
-
classNames?: string;
|
|
4
|
-
attributes?: object;
|
|
5
|
-
}
|
|
6
|
-
export declare const Divider: ({ variant, classNames, attributes }: DividerProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default Divider;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface QuoteProps {
|
|
2
|
-
bodyHtml: string;
|
|
3
|
-
theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
|
|
4
|
-
classNames?: string;
|
|
5
|
-
attributes?: object;
|
|
6
|
-
forcePx?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const Quote: ({ bodyHtml, theme, classNames, attributes, forcePx }: QuoteProps) => import("react/jsx-runtime").JSX.Element;
|
package/react/components.cjs
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// ../src/index.tsx
|
|
21
|
-
var src_exports = {};
|
|
22
|
-
__export(src_exports, {
|
|
23
|
-
Divider: () => Divider,
|
|
24
|
-
Quote: () => Quote,
|
|
25
|
-
ThematicBreak: () => ThematicBreak
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(src_exports);
|
|
28
|
-
|
|
29
|
-
// ../src/components/divider/divider.tsx
|
|
30
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
-
var Divider = ({ variant = "soft", classNames, attributes }) => {
|
|
32
|
-
const componentClassName = "ds-divider";
|
|
33
|
-
const classNamePrefix = `${componentClassName}--`;
|
|
34
|
-
const classes = [
|
|
35
|
-
componentClassName,
|
|
36
|
-
`${classNamePrefix}${variant}`,
|
|
37
|
-
classNames
|
|
38
|
-
].filter(Boolean).join(" ");
|
|
39
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: classes, ...attributes, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("hr", {}) });
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// ../src/components/thematic-break/thematic-break.tsx
|
|
43
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
44
|
-
var ThematicBreak = ({ classNames, attributes }) => {
|
|
45
|
-
const componentClassName = "ds-thematic-break";
|
|
46
|
-
const classes = [
|
|
47
|
-
componentClassName,
|
|
48
|
-
classNames
|
|
49
|
-
].filter(Boolean).join(" ");
|
|
50
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: classes, ...attributes, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("hr", {}) });
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
// ../src/components/quote/quote.tsx
|
|
54
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
55
|
-
var Quote = ({ bodyHtml, theme = "nyheter", classNames, attributes, forcePx }) => {
|
|
56
|
-
const componentClassName = "ds-quote";
|
|
57
|
-
const classes = [
|
|
58
|
-
componentClassName,
|
|
59
|
-
`ds-theme--${theme}`,
|
|
60
|
-
forcePx && "ds-force-px",
|
|
61
|
-
classNames
|
|
62
|
-
].filter(Boolean).join(" ");
|
|
63
|
-
const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`;
|
|
64
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("blockquote", { dangerouslySetInnerHTML: { __html: quoteHtml }, className: classes, ...attributes });
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=components.cjs.map
|
package/react/components.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../index.tsx", "../components/divider/divider.tsx", "../components/thematic-break/thematic-break.tsx", "../components/quote/quote.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Divider } from \"./components/divider/divider\";\nexport { Divider };\n\nimport { ThematicBreak } from \"./components/thematic-break/thematic-break\";\nexport { ThematicBreak };\n\nimport { Quote } from \"./components/quote/quote\";\nexport { Quote };\n", "export interface DividerProps {\n variant?: 'soft' | 'medium' | 'hard';\n classNames?: string;\n attributes?: object;\n}\n\nexport const Divider = ({ variant = 'soft', classNames, attributes }: DividerProps) => {\n const componentClassName = 'ds-divider';\n const classNamePrefix = `${componentClassName}--`;\n const classes = [\n componentClassName,\n `${classNamePrefix}${variant}`,\n classNames\n ].filter(Boolean).join(' ');\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default Divider;\n", "export interface ThematicBreakProps {\n classNames?: string;\n attributes?: object;\n}\n\nexport const ThematicBreak = ({ classNames, attributes }: ThematicBreakProps) => {\n const componentClassName = 'ds-thematic-break';\n const classes = [\n componentClassName,\n classNames\n ].filter(Boolean).join(' ');\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default ThematicBreak;\n", "export interface QuoteProps {\n bodyHtml: string;\n theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';\n classNames?: string;\n attributes?: object;\n forcePx?: boolean;\n}\n\nexport const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {\n const componentClassName = 'ds-quote';\n const classes = [\n componentClassName,\n `ds-theme--${theme}`,\n forcePx && 'ds-force-px',\n classNames\n ].filter(Boolean).join(' ');\n\n const quoteHtml = `<span class=\"${componentClassName}__border\"></span> ${bodyHtml}`\n\n return (\n <blockquote dangerouslySetInnerHTML={{ __html: quoteHtml }} className={classes} {...attributes} />\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACgB6C;AAVtC,IAAM,UAAU,CAAC,EAAE,UAAU,QAAQ,YAAY,WAAW,MAAoB;AACrF,QAAM,qBAAqB;AAC3B,QAAM,kBAAkB,GAAG,kBAAkB;AAC7C,QAAM,UAAU;AAAA,IACd;AAAA,IACA,GAAG,eAAe,GAAG,OAAO;AAAA,IAC5B;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,SACE,4CAAC,SAAI,WAAW,SAAU,GAAG,YAAY,sDAAC,QAAG,GAAE;AAEnD;;;ACL6C,IAAAA,sBAAA;AARtC,IAAM,gBAAgB,CAAC,EAAE,YAAY,WAAW,MAA0B;AAC/E,QAAM,qBAAqB;AAC3B,QAAM,UAAU;AAAA,IACd;AAAA,IACA;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,SACE,6CAAC,SAAI,WAAW,SAAU,GAAG,YAAY,uDAAC,QAAG,GAAE;AAEnD;;;ACKI,IAAAC,sBAAA;AAZG,IAAM,QAAQ,CAAC,EAAE,UAAU,QAAQ,WAAW,YAAY,YAAY,QAAQ,MAAkB;AACrG,QAAM,qBAAqB;AAC3B,QAAM,UAAU;AAAA,IACd;AAAA,IACA,aAAa,KAAK;AAAA,IAClB,WAAW;AAAA,IACX;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,QAAM,YAAY,gBAAgB,kBAAkB,qBAAqB,QAAQ;AAEjF,SACE,6CAAC,gBAAW,yBAAyB,EAAE,QAAQ,UAAU,GAAG,WAAW,SAAU,GAAG,YAAY;AAEpG;",
|
|
6
|
-
"names": ["import_jsx_runtime", "import_jsx_runtime"]
|
|
7
|
-
}
|
package/react/components.esm.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// ../src/components/divider/divider.tsx
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
var Divider = ({ variant = "soft", classNames, attributes }) => {
|
|
4
|
-
const componentClassName = "ds-divider";
|
|
5
|
-
const classNamePrefix = `${componentClassName}--`;
|
|
6
|
-
const classes = [
|
|
7
|
-
componentClassName,
|
|
8
|
-
`${classNamePrefix}${variant}`,
|
|
9
|
-
classNames
|
|
10
|
-
].filter(Boolean).join(" ");
|
|
11
|
-
return /* @__PURE__ */ jsx("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsx("hr", {}) });
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
// ../src/components/thematic-break/thematic-break.tsx
|
|
15
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
16
|
-
var ThematicBreak = ({ classNames, attributes }) => {
|
|
17
|
-
const componentClassName = "ds-thematic-break";
|
|
18
|
-
const classes = [
|
|
19
|
-
componentClassName,
|
|
20
|
-
classNames
|
|
21
|
-
].filter(Boolean).join(" ");
|
|
22
|
-
return /* @__PURE__ */ jsx2("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsx2("hr", {}) });
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// ../src/components/quote/quote.tsx
|
|
26
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
27
|
-
var Quote = ({ bodyHtml, theme = "nyheter", classNames, attributes, forcePx }) => {
|
|
28
|
-
const componentClassName = "ds-quote";
|
|
29
|
-
const classes = [
|
|
30
|
-
componentClassName,
|
|
31
|
-
`ds-theme--${theme}`,
|
|
32
|
-
forcePx && "ds-force-px",
|
|
33
|
-
classNames
|
|
34
|
-
].filter(Boolean).join(" ");
|
|
35
|
-
const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`;
|
|
36
|
-
return /* @__PURE__ */ jsx3("blockquote", { dangerouslySetInnerHTML: { __html: quoteHtml }, className: classes, ...attributes });
|
|
37
|
-
};
|
|
38
|
-
export {
|
|
39
|
-
Divider,
|
|
40
|
-
Quote,
|
|
41
|
-
ThematicBreak
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=components.esm.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../components/divider/divider.tsx", "../components/thematic-break/thematic-break.tsx", "../components/quote/quote.tsx"],
|
|
4
|
-
"sourcesContent": ["export interface DividerProps {\n variant?: 'soft' | 'medium' | 'hard';\n classNames?: string;\n attributes?: object;\n}\n\nexport const Divider = ({ variant = 'soft', classNames, attributes }: DividerProps) => {\n const componentClassName = 'ds-divider';\n const classNamePrefix = `${componentClassName}--`;\n const classes = [\n componentClassName,\n `${classNamePrefix}${variant}`,\n classNames\n ].filter(Boolean).join(' ');\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default Divider;\n", "export interface ThematicBreakProps {\n classNames?: string;\n attributes?: object;\n}\n\nexport const ThematicBreak = ({ classNames, attributes }: ThematicBreakProps) => {\n const componentClassName = 'ds-thematic-break';\n const classes = [\n componentClassName,\n classNames\n ].filter(Boolean).join(' ');\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default ThematicBreak;\n", "export interface QuoteProps {\n bodyHtml: string;\n theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';\n classNames?: string;\n attributes?: object;\n forcePx?: boolean;\n}\n\nexport const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {\n const componentClassName = 'ds-quote';\n const classes = [\n componentClassName,\n `ds-theme--${theme}`,\n forcePx && 'ds-force-px',\n classNames\n ].filter(Boolean).join(' ');\n\n const quoteHtml = `<span class=\"${componentClassName}__border\"></span> ${bodyHtml}`\n\n return (\n <blockquote dangerouslySetInnerHTML={{ __html: quoteHtml }} className={classes} {...attributes} />\n );\n};\n"],
|
|
5
|
-
"mappings": ";AAgB6C;AAVtC,IAAM,UAAU,CAAC,EAAE,UAAU,QAAQ,YAAY,WAAW,MAAoB;AACrF,QAAM,qBAAqB;AAC3B,QAAM,kBAAkB,GAAG,kBAAkB;AAC7C,QAAM,UAAU;AAAA,IACd;AAAA,IACA,GAAG,eAAe,GAAG,OAAO;AAAA,IAC5B;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,SACE,oBAAC,SAAI,WAAW,SAAU,GAAG,YAAY,8BAAC,QAAG,GAAE;AAEnD;;;ACL6C,gBAAAA,YAAA;AARtC,IAAM,gBAAgB,CAAC,EAAE,YAAY,WAAW,MAA0B;AAC/E,QAAM,qBAAqB;AAC3B,QAAM,UAAU;AAAA,IACd;AAAA,IACA;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,SACE,gBAAAA,KAAC,SAAI,WAAW,SAAU,GAAG,YAAY,0BAAAA,KAAC,QAAG,GAAE;AAEnD;;;ACKI,gBAAAC,YAAA;AAZG,IAAM,QAAQ,CAAC,EAAE,UAAU,QAAQ,WAAW,YAAY,YAAY,QAAQ,MAAkB;AACrG,QAAM,qBAAqB;AAC3B,QAAM,UAAU;AAAA,IACd;AAAA,IACA,aAAa,KAAK;AAAA,IAClB,WAAW;AAAA,IACX;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,QAAM,YAAY,gBAAgB,kBAAkB,qBAAqB,QAAQ;AAEjF,SACE,gBAAAA,KAAC,gBAAW,yBAAyB,EAAE,QAAQ,UAAU,GAAG,WAAW,SAAU,GAAG,YAAY;AAEpG;",
|
|
6
|
-
"names": ["jsx", "jsx"]
|
|
7
|
-
}
|
package/react/index.d.ts
DELETED
package/tsconfig-preact.json
DELETED
package/tsconfig-react.json
DELETED
package/tsconfig.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@bonniernews/tsconfig",
|
|
3
|
-
"include": ["index.tsx", "components/**/*.tsx"] ,
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"moduleResolution": "Bundler",
|
|
6
|
-
"allowJs": true,
|
|
7
|
-
"sourceMap": true,
|
|
8
|
-
"skipLibCheck": false,
|
|
9
|
-
"rootDir": "./",
|
|
10
|
-
"allowUmdGlobalAccess": true,
|
|
11
|
-
"typeRoots": [
|
|
12
|
-
"node_modules/@types"
|
|
13
|
-
],
|
|
14
|
-
"jsx": "react-jsx",
|
|
15
|
-
"jsxFactory": "",
|
|
16
|
-
"jsxFragmentFactory": "",
|
|
17
|
-
},
|
|
18
|
-
"lib": [
|
|
19
|
-
"ES2022"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
File without changes
|