@bonniernews/dn-design-system-web 31.0.1-beta.3 → 31.0.1

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.
@@ -1,35 +1,35 @@
1
1
  {
2
- "content-fade-left": {
2
+ "content-fade-up": {
3
3
  "type": "linear",
4
- "angle": 270,
4
+ "angle": "180",
5
5
  "stops": [
6
6
  {
7
- "color": "#ffffff",
7
+ "color": "rgba(255, 255, 255, 0)",
8
8
  "position": 0
9
9
  },
10
10
  {
11
- "color": "rgba(255, 255, 255, 0)",
11
+ "color": "#ffffff",
12
12
  "position": 1
13
13
  }
14
14
  ]
15
15
  },
16
- "content-fade-right": {
16
+ "content-fade-left": {
17
17
  "type": "linear",
18
- "angle": 270,
18
+ "angle": "270",
19
19
  "stops": [
20
20
  {
21
- "color": "rgba(255, 255, 255, 0)",
21
+ "color": "#ffffff",
22
22
  "position": 0
23
23
  },
24
24
  {
25
- "color": "#ffffff",
25
+ "color": "rgba(255, 255, 255, 0)",
26
26
  "position": 1
27
27
  }
28
28
  ]
29
29
  },
30
- "content-fade-up": {
30
+ "content-fade-right": {
31
31
  "type": "linear",
32
- "angle": 180,
32
+ "angle": "270",
33
33
  "stops": [
34
34
  {
35
35
  "color": "rgba(255, 255, 255, 0)",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "content-fade-down": {
45
45
  "type": "linear",
46
- "angle": 180,
46
+ "angle": "180",
47
47
  "stops": [
48
48
  {
49
49
  "color": "#ffffff",
@@ -1,6 +1,6 @@
1
1
  {
2
+ "content-fade-up": "var(--ds-gradient-content-fade-up)",
2
3
  "content-fade-left": "var(--ds-gradient-content-fade-left)",
3
4
  "content-fade-right": "var(--ds-gradient-content-fade-right)",
4
- "content-fade-up": "var(--ds-gradient-content-fade-up)",
5
5
  "content-fade-down": "var(--ds-gradient-content-fade-down)"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "elevation-xs": "--ds-shadow-elevation-xs",
3
+ "elevation-lg": "--ds-shadow-elevation-lg",
3
4
  "elevation-sm": "--ds-shadow-elevation-sm",
4
- "elevation-md": "--ds-shadow-elevation-md",
5
- "elevation-lg": "--ds-shadow-elevation-lg"
5
+ "elevation-md": "--ds-shadow-elevation-md"
6
6
  }
@@ -1,56 +1,56 @@
1
1
  {
2
- "expressive-heading-xxs": "'expressive-heading-xxs'",
3
- "expressive-heading-xs": "'expressive-heading-xs'",
4
- "expressive-heading-sm": "'expressive-heading-sm'",
5
- "expressive-heading-md": "'expressive-heading-md'",
6
- "expressive-heading-lg": "'expressive-heading-lg'",
7
- "expressive-heading-xl": "'expressive-heading-xl'",
2
+ "expressive-ingress-md": "'expressive-ingress-md'",
8
3
  "expressive-body-sm": "'expressive-body-sm'",
9
- "expressive-body-md": "'expressive-body-md'",
10
4
  "expressive-body-lg": "'expressive-body-lg'",
5
+ "expressive-heading-xl": "'expressive-heading-xl'",
6
+ "expressive-heading-xs": "'expressive-heading-xs'",
7
+ "expressive-heading-lg": "'expressive-heading-lg'",
8
+ "expressive-heading-md": "'expressive-heading-md'",
11
9
  "expressive-ingress-sm": "'expressive-ingress-sm'",
12
- "expressive-ingress-md": "'expressive-ingress-md'",
10
+ "expressive-heading-xxs": "'expressive-heading-xxs'",
11
+ "expressive-heading-sm": "'expressive-heading-sm'",
12
+ "expressive-body-md": "'expressive-body-md'",
13
13
  "functional-heading-xxs": "'functional-heading-xxs'",
14
- "functional-heading-xs": "'functional-heading-xs'",
15
- "functional-heading-sm": "'functional-heading-sm'",
16
- "functional-heading-md": "'functional-heading-md'",
17
14
  "functional-heading-lg": "'functional-heading-lg'",
18
- "functional-heading-xl": "'functional-heading-xl'",
15
+ "functional-heading-xs": "'functional-heading-xs'",
16
+ "functional-meta-sm": "'functional-meta-sm'",
19
17
  "functional-label-sm": "'functional-label-sm'",
20
- "functional-label-md": "'functional-label-md'",
18
+ "functional-meta-md": "'functional-meta-md'",
19
+ "functional-heading-sm": "'functional-heading-sm'",
21
20
  "functional-body-sm": "'functional-body-sm'",
21
+ "functional-ingress-md": "'functional-ingress-md'",
22
22
  "functional-body-md": "'functional-body-md'",
23
+ "functional-heading-md": "'functional-heading-md'",
24
+ "functional-label-md": "'functional-label-md'",
25
+ "functional-heading-xl": "'functional-heading-xl'",
23
26
  "functional-body-lg": "'functional-body-lg'",
24
- "functional-meta-sm": "'functional-meta-sm'",
25
- "functional-meta-md": "'functional-meta-md'",
26
27
  "functional-ingress-sm": "'functional-ingress-sm'",
27
- "functional-ingress-md": "'functional-ingress-md'",
28
- "detail-dropcap": "'detail-dropcap'",
29
- "detail-gameheader": "'detail-gameheader'",
30
- "detail-medryckare": "'detail-medryckare'",
31
- "detail-mellanrubrik": "'detail-mellanrubrik'",
32
- "detail-direkt-header": "'detail-direkt-header'",
33
- "detail-teaser-standard": "'detail-teaser-standard'",
34
- "detail-teaser-standard-opinion": "'detail-teaser-standard-opinion'",
35
- "detail-teaser-standard-compact": "'detail-teaser-standard-compact'",
36
- "detail-teaser-standard-compact-opinion": "'detail-teaser-standard-compact-opinion'",
37
28
  "detail-teaser-large": "'detail-teaser-large'",
38
- "detail-teaser-large-compact": "'detail-teaser-large-compact'",
39
- "detail-teaser-storrubrik-opinion": "'detail-teaser-storrubrik-opinion'",
40
- "detail-teaser-storrubrik": "'detail-teaser-storrubrik'",
41
- "detail-teaser-twin": "'detail-teaser-twin'",
42
- "detail-teaser-tipsa": "'detail-teaser-tipsa'",
43
- "detail-teaser-baotaxl": "'detail-teaser-baotaxl'",
44
29
  "detail-teaser-longlife": "'detail-teaser-longlife'",
45
30
  "detail-teaser-centrerad": "'detail-teaser-centrerad'",
46
- "detail-teaser-large-opinion": "'detail-teaser-large-opinion'",
31
+ "detail-teaser-standard": "'detail-teaser-standard'",
32
+ "detail-teaser-large-compact": "'detail-teaser-large-compact'",
33
+ "detail-teaser-baotaxl": "'detail-teaser-baotaxl'",
47
34
  "detail-teaser-text-i-bild": "'detail-teaser-text-i-bild'",
35
+ "detail-teaser-large-opinion": "'detail-teaser-large-opinion'",
48
36
  "detail-teaser-large-rightcol": "'detail-teaser-large-rightcol'",
37
+ "detail-teaser-standard-compact-opinion": "'detail-teaser-standard-compact-opinion'",
38
+ "detail-teaser-twin": "'detail-teaser-twin'",
39
+ "detail-teaser-standard-opinion": "'detail-teaser-standard-opinion'",
40
+ "detail-teaser-tipsa": "'detail-teaser-tipsa'",
41
+ "detail-teaser-storrubrik": "'detail-teaser-storrubrik'",
42
+ "detail-teaser-standard-compact": "'detail-teaser-standard-compact'",
43
+ "detail-teaser-storrubrik-opinion": "'detail-teaser-storrubrik-opinion'",
44
+ "detail-medryckare": "'detail-medryckare'",
45
+ "detail-article-quote": "'detail-article-quote'",
49
46
  "detail-article-standard": "'detail-article-standard'",
50
- "detail-article-opinion": "'detail-article-opinion'",
47
+ "detail-article-direkt": "'detail-article-direkt'",
51
48
  "detail-article-longread": "'detail-article-longread'",
52
49
  "detail-article-longread-premium": "'detail-article-longread-premium'",
53
- "detail-article-direkt": "'detail-article-direkt'",
54
50
  "detail-article-direct-opinion": "'detail-article-direct-opinion'",
55
- "detail-article-quote": "'detail-article-quote'"
51
+ "detail-article-opinion": "'detail-article-opinion'",
52
+ "detail-mellanrubrik": "'detail-mellanrubrik'",
53
+ "detail-direkt-header": "'detail-direkt-header'",
54
+ "detail-gameheader": "'detail-gameheader'",
55
+ "detail-dropcap": "'detail-dropcap'"
56
56
  }
File without changes
@@ -1,41 +0,0 @@
1
- - GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-text-on-image](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-text-on-image)
2
- - Storybook: [TeaserTextOnImage](https://designsystem.dn.se/?path=/docs/section-teasertextonimage--docs)
3
- - Storybook (Latest): [TeaserTextOnImage](https://designsystem-latest.dn.se/?path=/docs/section-teasertextonimage--docs)
4
-
5
- ----
6
-
7
- # teaser-text-on-image
8
-
9
- ## Parameters
10
-
11
- |parameter | type | required | options | default | description |
12
- |:--- | :--- | :--- | :--- | :--- | :--- |
13
- |title | String | yes | | | Heading of the teaser |
14
- |targetLink | String | yes | | | Target URL for the teaser |
15
- |theme | String | no | nyheter, kultur | (empty) | The theme-class to apply to the teaser |
16
- |text | String | no | | | Teaser subtext |
17
- |vignette | String | no | | | Top text in the teaser |
18
- |mediaHtml | HTML String | yes | | | Main image or other media |
19
- |attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
20
- |classNames | String | no | | | Ex. "my-special-class" |
21
- |~forcePx~ | | | | | Not supported |
22
-
23
- ## Minimum requirement example
24
- These are copy paste friendly examples to quickliy get started using a component.
25
-
26
- ### Nunjucks
27
- ```html
28
- {% from '@bonniernews/dn-design-system-web/components/teaser-text-on-image/teaser-text-on-image.njk' import TeaserTextOnImage %}
29
-
30
- {{ TeaserTextOnImage({
31
- title: 'Ludmila Engquist: "Det skulle kännas fel att dö utan att ha förklarat sig"',
32
- targetLink: "https://www.dn.se/sport/ludmila-enguist-det-skulle-kannas-fel-att-do-utan-att-ha-forklarat-sig/",
33
- text: "Nu träder Ludmila Engquist fram och berättar sanningen – innan det är för sent.",
34
- mediaHtml: "text-on-image",
35
- })}}
36
- ```
37
-
38
- ### SCSS
39
- ```scss
40
- @use "@bonniernews/dn-design-system-web/components/teaser-text-on-image/teaser-text-on-image" as *;
41
- ```
@@ -1,47 +0,0 @@
1
- {% from '@bonniernews/dn-design-system-web/components/teaser-card/teaser-card.njk' import TeaserCard %}
2
- {% from '@bonniernews/dn-design-system-web/components/teaser-dot/teaser-dot.njk' import TeaserDot %}
3
- {% from '@bonniernews/dn-design-system-web/components/teaser-footer/teaser-footer.njk' import TeaserFooter %}
4
- {% from '@bonniernews/dn-design-system-web/components/icon-sprite/icon-sprite.njk' import IconUse %}
5
-
6
- {% macro TeaserTextOnImage(params) %}
7
- {% set componentClassName = "ds-teaser" %}
8
- {% set classNamePrefix = componentClassName + "--" %}
9
-
10
- {% set extraClasses = [
11
- "ds-teaser--text-on-image",
12
- params.classNames if params.classNames
13
- ] | join(" ") %}
14
-
15
- {% call TeaserCard({
16
- targetLink: params.targetLink,
17
- theme: params.theme,
18
- attributes: params.attributes,
19
- classNames: extraClasses
20
- }) %}
21
- <div class="{{ componentClassName + '__content'}}">
22
- {% if params.mediaHtml %}
23
- <div class="{{ componentClassName + '__media' }}">
24
- {{ params.mediaHtml }}
25
- </div>
26
- {% endif %}
27
-
28
- <div class="{{ componentClassName + '__text-content'}}">
29
- {% if params.vignette %}
30
- <p class="{{ componentClassName + '__vignette' }}">
31
- {{ params.vignette }}
32
- </p>
33
- {% endif %}
34
-
35
- <h2 class="{{ componentClassName + '__title'}} {{ componentClassName + '__title--italic' if params.isItalicHeadline}}">
36
- {{ params.title }}
37
- </h2>
38
-
39
- {% if params.text%}
40
- <p class="{{ componentClassName + '__text' }}">
41
- {{ params.text }}
42
- </p>
43
- {% endif %}
44
- </div>
45
- </div>
46
- {% endcall %}
47
- {% endmacro %}
@@ -1,73 +0,0 @@
1
- @use "../../foundations/helpers/forward.helpers.scss" as *;
2
- @use "../../assets/teaser/teaser.scss" as *;
3
-
4
- .ds-teaser.ds-teaser--text-on-image {
5
- overflow: hidden;
6
-
7
- .ds-teaser__vignette {
8
- color: $ds-color-neutral-white;
9
- }
10
-
11
- .ds-teaser__content {
12
- position: relative;
13
- color: $ds-color-neutral-white;
14
-
15
- &:after {
16
- content: "";
17
- position: absolute;
18
- top: 0;
19
- left: 0;
20
- width: 100%;
21
- height: 100%;
22
- background: linear-gradient(var(--ds-color-gradients-overlay-end), var(--ds-color-gradients-overlay-start));
23
- z-index: 2;
24
- }
25
- }
26
-
27
- .ds-teaser__title,
28
- .ds-teaser__text {
29
- position: relative;
30
- color: $ds-color-neutral-white;
31
- }
32
-
33
- .ds-teaser__text {
34
- margin-top: ds-spacing($ds-s-100);
35
- }
36
-
37
- .ds-teaser__title {
38
- margin-top: ds-spacing($ds-s-050);
39
-
40
- @include ds-typography($ds-typography-detail-teaser-text-i-bild, $forcePx: true);
41
-
42
- &--italic {
43
- @include ds-typography($ds-typography-detail-medryckare);
44
- }
45
- }
46
-
47
- .ds-teaser-image__byline,
48
- .ds-teaser__text-content {
49
- z-index: 3;
50
- }
51
-
52
- .ds-teaser__text-content {
53
- position: absolute;
54
- bottom: ds-spacing($ds-s-100);
55
- left: ds-spacing($ds-s-100);
56
- max-width: 90%;
57
-
58
- @include ds-mq-only-breakpoint(desktop) {
59
- max-width: 75%;
60
- }
61
- }
62
-
63
- .ds-teaser__media {
64
- .picture {
65
- width: 100%;
66
- height: 100%;
67
- }
68
-
69
- .ds-teaser-image__byline {
70
- @include ds-typography($ds-typography-functional-meta-sm, $forcePx: true, $lineHeight: $ds-lineheight-lg);
71
- }
72
- }
73
- }