@bonniernews/dn-design-system-web 21.2.1-beta.0 → 22.0.1-beta.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/assets/teaser/teaser.scss +0 -25
  3. package/components/footer/README-NJK.md +75 -0
  4. package/components/footer/README.md +184 -71
  5. package/components/game-header/README.md +12 -36
  6. package/components/spinner/README-NJK.md +37 -0
  7. package/components/spinner/README.md +10 -33
  8. package/components/{teaser-breaking → teaser-centered}/README.md +7 -7
  9. package/components/{teaser-breaking/teaser-breaking.njk → teaser-centered/teaser-centered.njk} +8 -7
  10. package/components/{teaser-breaking/teaser-breaking.scss → teaser-centered/teaser-centered.scss} +4 -5
  11. package/components/teaser-large/README.md +0 -2
  12. package/components/teaser-large/teaser-large.njk +3 -11
  13. package/components/teaser-large/teaser-large.scss +0 -22
  14. package/components/teaser-package/teaser-package.scss +0 -10
  15. package/components/teaser-split/README.md +0 -1
  16. package/components/teaser-split/teaser-split.njk +1 -1
  17. package/components/teaser-standard/README.md +0 -1
  18. package/components/teaser-standard/teaser-standard.njk +1 -1
  19. package/foundations/helpers/README-links.md +1 -1
  20. package/foundations/helpers/README-spacing.md +1 -1
  21. package/foundations/variables/metrics.scss +2 -1
  22. package/foundations/variables/typographyTokensScreenExtraLarge.scss +1 -1
  23. package/foundations/variables/typographyTokensScreenLarge.scss +1 -1
  24. package/index.d.ts +4 -0
  25. package/package.json +4 -22
  26. package/preact/components/divider/divider.js +21 -0
  27. package/preact/components/divider/divider.js.map +7 -0
  28. package/preact/components/footer/footer.d.ts +33 -0
  29. package/preact/components/footer/footer.js +68 -0
  30. package/preact/components/footer/footer.js.map +7 -0
  31. package/preact/components/footer/logoWithPayoff.d.ts +1 -0
  32. package/preact/components/footer/logoWithPayoff.js +15 -0
  33. package/preact/components/footer/logoWithPayoff.js.map +7 -0
  34. package/preact/components/game-header/game-header.d.ts +18 -0
  35. package/preact/components/game-header/game-header.js +29 -0
  36. package/preact/components/game-header/game-header.js.map +7 -0
  37. package/preact/components/icon-sprite/icon-sprite.d.ts +18 -0
  38. package/preact/components/icon-sprite/icon-sprite.js +132 -0
  39. package/preact/components/icon-sprite/icon-sprite.js.map +7 -0
  40. package/preact/components/icon-with-wrapper/icon-with-wrapper.d.ts +23 -0
  41. package/{tokens-tmp/colors-css-variables.json → preact/components/icon-with-wrapper/icon-with-wrapper.js} +50 -2
  42. package/preact/components/icon-with-wrapper/icon-with-wrapper.js.map +7 -0
  43. package/preact/components/pictogram/pictogram.d.ts +17 -0
  44. package/preact/components/pictogram/pictogram.js +39 -0
  45. package/preact/components/pictogram/pictogram.js.map +7 -0
  46. package/preact/components/quote/quote.js +22 -0
  47. package/preact/components/quote/quote.js.map +7 -0
  48. package/preact/components/spinner/spinner.d.ts +16 -0
  49. package/preact/components/spinner/spinner.js +24 -0
  50. package/preact/components/spinner/spinner.js.map +7 -0
  51. package/preact/components/teaser-card/teaser-card.js +25 -0
  52. package/preact/components/teaser-card/teaser-card.js.map +7 -0
  53. package/preact/components/teaser-onsite/teaser-onsite.js +57 -0
  54. package/preact/components/teaser-onsite/teaser-onsite.js.map +7 -0
  55. package/preact/components/thematic-break/thematic-break.js +20 -0
  56. package/preact/components/thematic-break/thematic-break.js.map +7 -0
  57. package/preact/helpers/formatClassString.d.ts +1 -0
  58. package/tsconfig.json +3 -2
  59. package/types-lib/ds-color.d.ts +105 -0
  60. package/types-lib/ds-icon.d.ts +96 -0
  61. package/variables/colors-css-variables.json +18 -27
  62. package/.release-it-beta.cjs +0 -25
  63. package/.release-it.cjs +0 -39
  64. package/components/divider/divider.tsx +0 -28
  65. package/components/quote/quote.tsx +0 -34
  66. package/components/teaser-card/teaser-card.tsx +0 -44
  67. package/components/teaser-onsite/teaser-onsite.tsx +0 -43
  68. package/components/thematic-break/thematic-break.tsx +0 -27
  69. package/helpers/teaser.tsx +0 -32
  70. package/index.tsx +0 -8
  71. package/preact/components.cjs +0 -68
  72. package/preact/components.cjs.map +0 -7
  73. package/preact/components.esm.js +0 -45
  74. package/preact/components.esm.js.map +0 -7
  75. package/preact/index.d.ts +0 -6
  76. package/react/components/divider/divider.d.ts +0 -14
  77. package/react/components/quote/quote.d.ts +0 -16
  78. package/react/components/teaser-card/teaser-card.d.ts +0 -17
  79. package/react/components/teaser-onsite/teaser-onsite.d.ts +0 -23
  80. package/react/components/thematic-break/thematic-break.d.ts +0 -13
  81. package/react/components.cjs +0 -68
  82. package/react/components.cjs.map +0 -7
  83. package/react/components.esm.js +0 -45
  84. package/react/components.esm.js.map +0 -7
  85. package/react/index.d.ts +0 -6
  86. package/tokens-tmp/shadows-css-variables.json +0 -6
  87. package/tokens-tmp/spacing-base-list.json +0 -14
  88. package/tokens-tmp/spacing-detail-list.json +0 -18
  89. package/tsconfig-preact.json +0 -12
  90. package/tsconfig-react.json +0 -11
  91. /package/components/icon-sprite/{README.md → README-NJK.md} +0 -0
  92. /package/components/pictogram/{README.md → README-NJK.md} +0 -0
  93. /package/components/{teaser-breaking → teaser-centered}/README-UXD.md +0 -0
@@ -0,0 +1,20 @@
1
+ // ../src/helpers/formatClassString.ts
2
+ var formatClassString = (classesArray) => {
3
+ return classesArray.filter((x) => !!x).join(" ");
4
+ };
5
+
6
+ // ../src/components/thematic-break/thematic-break.tsx
7
+ import { jsx } from "preact/jsx-runtime";
8
+ var ThematicBreak = ({ classNames, attributes }) => {
9
+ const classes = formatClassString([
10
+ "ds-thematic-break",
11
+ classNames
12
+ ]);
13
+ return /* @__PURE__ */ jsx("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsx("hr", {}) });
14
+ };
15
+ var thematic_break_default = ThematicBreak;
16
+ export {
17
+ ThematicBreak,
18
+ thematic_break_default as default
19
+ };
20
+ //# sourceMappingURL=thematic-break.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../helpers/formatClassString.ts", "../../../components/thematic-break/thematic-break.tsx"],
4
+ "sourcesContent": ["export const formatClassString = (classesArray: (string|undefined|false)[]): string => {\n return classesArray.filter(x => !!x).join(' ');\n}\n", "import { formatClassString } from \"@bonniernews/dn-design-system-web/helpers/formatClassString.ts\";\n\nexport interface ThematicBreakProps {\n classNames?: string;\n attributes?: object;\n}\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/../web/src/components/thematic-break](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/thematic-break)\n * - Storybook: [ThematicBreak](https://designsystem.dn.se/?path=/docs/article-thematicbreak--docs)\n *\n * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:\n * `@use '@bonniernews/dn-design-system-web/components/thematic-break/thematic-break.scss'`\n */\n\nexport const ThematicBreak = ({ classNames, attributes }: ThematicBreakProps) => {\n const classes = formatClassString([\n 'ds-thematic-break',\n classNames\n ])\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default ThematicBreak;\n"],
5
+ "mappings": ";AAAO,IAAM,oBAAoB,CAAC,iBAAqD;AACrF,SAAO,aAAa,OAAO,OAAK,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG;AAC/C;;;ACoB6C;AAPtC,IAAM,gBAAgB,CAAC,EAAE,YAAY,WAAW,MAA0B;AAC/E,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE,oBAAC,SAAI,WAAW,SAAU,GAAG,YAAY,8BAAC,QAAG,GAAE;AAEnD;AAEA,IAAO,yBAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1 @@
1
+ export declare const formatClassString: (classesArray: (string | undefined | false)[]) => string;
package/tsconfig.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "extends": "@bonniernews/tsconfig",
3
- "include": ["index.tsx", "components/**/*.tsx"] ,
3
+ "include": ["components/**/*.tsx", "types-lib/**/*.ts", "index.d.ts"],
4
4
  "compilerOptions": {
5
5
  "moduleResolution": "Bundler",
6
6
  "allowJs": true,
@@ -9,7 +9,8 @@
9
9
  "rootDir": "./",
10
10
  "allowUmdGlobalAccess": true,
11
11
  "typeRoots": [
12
- "node_modules/@types"
12
+ "node_modules/@types",
13
+ "types-lib/*.ts"
13
14
  ],
14
15
  "jsx": "react-jsx",
15
16
  "jsxFactory": "",
@@ -0,0 +1,105 @@
1
+ export enum DsColorEnum {
2
+ "text-primary" = "text-primary",
3
+ "text-primary-02" = "text-primary-02",
4
+ "text-secondary" = "text-secondary",
5
+ "text-critical" = "text-critical",
6
+ "text-disabled" = "text-disabled",
7
+ "text-on-brand" = "text-on-brand",
8
+ "text-on-business" = "text-on-business",
9
+ "text-on-critical" = "text-on-critical",
10
+ "text-on-success" = "text-on-success",
11
+ "text-brand" = "text-brand",
12
+ "text-body-link" = "text-body-link",
13
+ "text-body-link-visited" = "text-body-link-visited",
14
+ "text-positive" = "text-positive",
15
+ "text-culture" = "text-culture",
16
+ "icon-primary" = "icon-primary",
17
+ "icon-primary-02" = "icon-primary-02",
18
+ "icon-secondary" = "icon-secondary",
19
+ "icon-critical" = "icon-critical",
20
+ "icon-disabled" = "icon-disabled",
21
+ "icon-on-brand" = "icon-on-brand",
22
+ "icon-on-business" = "icon-on-business",
23
+ "icon-brand" = "icon-brand",
24
+ "icon-on-critical" = "icon-on-critical",
25
+ "icon-on-success" = "icon-on-success",
26
+ "icon-culture" = "icon-culture",
27
+ "component-brand" = "component-brand",
28
+ "component-business" = "component-business",
29
+ "component-primary" = "component-primary",
30
+ "component-primary-overlay" = "component-primary-overlay",
31
+ "component-primary-overlay-02" = "component-primary-overlay-02",
32
+ "component-secondary" = "component-secondary",
33
+ "component-secondary-overlay" = "component-secondary-overlay",
34
+ "component-secondary-overlay-02" = "component-secondary-overlay-02",
35
+ "component-critical" = "component-critical",
36
+ "component-critical-overlay" = "component-critical-overlay",
37
+ "component-static-white" = "component-static-white",
38
+ "component-positive" = "component-positive",
39
+ "component-primary-02" = "component-primary-02",
40
+ "surface-below" = "surface-below",
41
+ "surface-native-article" = "surface-native-article",
42
+ "surface-background" = "surface-background",
43
+ "surface-raised" = "surface-raised",
44
+ "surface-elevated" = "surface-elevated",
45
+ "surface-overlay" = "surface-overlay",
46
+ "surface-quiz" = "surface-quiz",
47
+ "surface-korsord" = "surface-korsord",
48
+ "surface-sudoko" = "surface-sudoko",
49
+ "surface-brand" = "surface-brand",
50
+ "surface-inverted" = "surface-inverted",
51
+ "surface-breaking" = "surface-breaking",
52
+ "border-primary" = "border-primary",
53
+ "border-primary-02" = "border-primary-02",
54
+ "border-primary-03" = "border-primary-03",
55
+ "border-secondary" = "border-secondary",
56
+ "border-business" = "border-business",
57
+ "border-critical" = "border-critical",
58
+ "border-focus" = "border-focus",
59
+ "border-focus-02" = "border-focus-02",
60
+ "border-focus-03" = "border-focus-03",
61
+ "border-focus-04" = "border-focus-04",
62
+ "border-brand" = "border-brand",
63
+ "border-culture" = "border-culture",
64
+ "background-primary" = "background-primary",
65
+ "static-red-100" = "static-red-100",
66
+ "static-black" = "static-black",
67
+ "static-transparent-black" = "static-transparent-black",
68
+ "static-white" = "static-white",
69
+ "static-transparent-white" = "static-transparent-white",
70
+ "static-green-100" = "static-green-100",
71
+ "static-red-300" = "static-red-300",
72
+ "static-transparent-white-10" = "static-transparent-white-10",
73
+ "static-kultur" = "static-kultur",
74
+ "static-economy" = "static-economy",
75
+ "static-sport" = "static-sport",
76
+ "static-neutral-200" = "static-neutral-200",
77
+ "static-sthlm" = "static-sthlm",
78
+ "static-ad-yellow" = "static-ad-yellow",
79
+ "static-neutral-100" = "static-neutral-100",
80
+ "static-neutral-500" = "static-neutral-500",
81
+ "static-red-500" = "static-red-500",
82
+ "static-yellow" = "static-yellow",
83
+ "static-red-200" = "static-red-200",
84
+ "static-red-0" = "static-red-0",
85
+ "gradient-content-fade-left" = "gradient-content-fade-left",
86
+ "gradient-content-fade-right" = "gradient-content-fade-right",
87
+ "gradient-content-fade-up" = "gradient-content-fade-up",
88
+ "gradient-content-fade-down" = "gradient-content-fade-down"
89
+ }
90
+ export type DsColor = keyof typeof DsColorEnum;
91
+
92
+ export enum DsColorIconEnum {
93
+ "icon-primary" = "icon-primary",
94
+ "icon-primary-02" = "icon-primary-02",
95
+ "icon-secondary" = "icon-secondary",
96
+ "icon-critical" = "icon-critical",
97
+ "icon-disabled" = "icon-disabled",
98
+ "icon-on-brand" = "icon-on-brand",
99
+ "icon-on-business" = "icon-on-business",
100
+ "icon-brand" = "icon-brand",
101
+ "icon-on-critical" = "icon-on-critical",
102
+ "icon-on-success" = "icon-on-success",
103
+ "icon-culture" = "icon-culture"
104
+ }
105
+ export type DsColorIcon = keyof typeof DsColorIconEnum;
@@ -0,0 +1,96 @@
1
+ export enum DsIconEnum {
2
+ "add" = "add",
3
+ "arrow_back" = "arrow_back",
4
+ "arrow_forward" = "arrow_forward",
5
+ "arrow_outward" = "arrow_outward",
6
+ "arrow_upward" = "arrow_upward",
7
+ "bookmark-filled" = "bookmark-filled",
8
+ "bookmarked" = "bookmarked",
9
+ "campaign" = "campaign",
10
+ "cancel" = "cancel",
11
+ "celebration" = "celebration",
12
+ "check_box_outline_blank" = "check_box_outline_blank",
13
+ "check_box-filled" = "check_box-filled",
14
+ "check_circle" = "check_circle",
15
+ "check" = "check",
16
+ "chevron_down" = "chevron_down",
17
+ "chevron_left" = "chevron_left",
18
+ "chevron_right" = "chevron_right",
19
+ "close" = "close",
20
+ "comment" = "comment",
21
+ "delete" = "delete",
22
+ "download" = "download",
23
+ "edit" = "edit",
24
+ "expand_less" = "expand_less",
25
+ "expand_more" = "expand_more",
26
+ "facebook" = "facebook",
27
+ "favorite-filled" = "favorite-filled",
28
+ "favorite" = "favorite",
29
+ "feed" = "feed",
30
+ "feedback" = "feedback",
31
+ "filter_list" = "filter_list",
32
+ "filter_none" = "filter_none",
33
+ "format_size" = "format_size",
34
+ "forward_10" = "forward_10",
35
+ "forward_30" = "forward_30",
36
+ "grid_view" = "grid_view",
37
+ "headphones-filled" = "headphones-filled",
38
+ "headphones" = "headphones",
39
+ "history" = "history",
40
+ "home-filled" = "home-filled",
41
+ "home" = "home",
42
+ "info-filled" = "info-filled",
43
+ "info" = "info",
44
+ "instagram" = "instagram",
45
+ "integrity" = "integrity",
46
+ "ios_share" = "ios_share",
47
+ "link" = "link",
48
+ "lock" = "lock",
49
+ "login" = "login",
50
+ "logout" = "logout",
51
+ "mail" = "mail",
52
+ "manage_accounts-filled" = "manage_accounts-filled",
53
+ "manage_accounts" = "manage_accounts",
54
+ "mark_email_unread" = "mark_email_unread",
55
+ "memory" = "memory",
56
+ "menu-filled" = "menu-filled",
57
+ "menu" = "menu",
58
+ "mode_comment" = "mode_comment",
59
+ "more_horiz" = "more_horiz",
60
+ "mystery" = "mystery",
61
+ "newsmode" = "newsmode",
62
+ "notifications" = "notifications",
63
+ "pause" = "pause",
64
+ "person" = "person",
65
+ "play_arrow-filled" = "play_arrow-filled",
66
+ "play_arrow" = "play_arrow",
67
+ "print" = "print",
68
+ "priority_high" = "priority_high",
69
+ "push_pin" = "push_pin",
70
+ "queue_music" = "queue_music",
71
+ "quiz" = "quiz",
72
+ "radio_button_checked" = "radio_button_checked",
73
+ "radio_button_unchecked" = "radio_button_unchecked",
74
+ "redeem" = "redeem",
75
+ "refresh" = "refresh",
76
+ "replay_10" = "replay_10",
77
+ "replay_30" = "replay_30",
78
+ "schedule_filled" = "schedule_filled",
79
+ "schedule" = "schedule",
80
+ "search_off" = "search_off",
81
+ "search" = "search",
82
+ "share" = "share",
83
+ "support_agent" = "support_agent",
84
+ "system_update" = "system_update",
85
+ "twitter" = "twitter",
86
+ "user_policy" = "user_policy",
87
+ "view_list" = "view_list",
88
+ "vip" = "vip",
89
+ "visibility_off" = "visibility_off",
90
+ "visibility" = "visibility",
91
+ "volume_off" = "volume_off",
92
+ "volume_up" = "volume_up",
93
+ "wifi_off" = "wifi_off",
94
+ "x" = "x"
95
+ }
96
+ export type DsIcon = keyof typeof DsIconEnum;
@@ -7,15 +7,17 @@
7
7
  "surface-primaryinvert-raised": "var(--ds-color-surface-primaryinvert-raised)",
8
8
  "surface-primaryinvert-elevated": "var(--ds-color-surface-primaryinvert-elevated)",
9
9
  "surface-brand": "var(--ds-color-surface-brand)",
10
+ "surface-culture": "var(--ds-color-surface-culture)",
10
11
  "surface-breaking": "var(--ds-color-surface-breaking)",
11
12
  "surface-overlay": "var(--ds-color-surface-overlay)",
12
- "border-brand": "var(--ds-color-border-brand)",
13
13
  "border-primary": "var(--ds-color-border-primary)",
14
14
  "border-primary-strong": "var(--ds-color-border-primary-strong)",
15
15
  "border-primary-strongest": "var(--ds-color-border-primary-strongest)",
16
16
  "border-primaryinvert": "var(--ds-color-border-primaryinvert)",
17
17
  "border-primaryinvert-strong": "var(--ds-color-border-primaryinvert-strong)",
18
18
  "border-primaryinvert-strongest": "var(--ds-color-border-primaryinvert-strongest)",
19
+ "border-brand": "var(--ds-color-border-brand)",
20
+ "border-culture": "var(--ds-color-border-culture)",
19
21
  "text-primary": "var(--ds-color-text-primary)",
20
22
  "text-primary-subtle": "var(--ds-color-text-primary-subtle)",
21
23
  "text-primary-disabled": "var(--ds-color-text-primary-disabled)",
@@ -23,6 +25,7 @@
23
25
  "text-primaryinvert-subtle": "var(--ds-color-text-primaryinvert-subtle)",
24
26
  "text-primaryinvert-disabled": "var(--ds-color-text-primaryinvert-disabled)",
25
27
  "text-brand": "var(--ds-color-text-brand)",
28
+ "text-culture": "var(--ds-color-text-culture)",
26
29
  "text-critical": "var(--ds-color-text-critical)",
27
30
  "text-on-brand": "var(--ds-color-text-on-brand)",
28
31
  "text-body-link": "var(--ds-color-text-body-link)",
@@ -51,38 +54,26 @@
51
54
  "culture-900": "var(--ds-color-culture-900)",
52
55
  "culture-1000": "var(--ds-color-culture-1000)",
53
56
  "culture-1100": "var(--ds-color-culture-1100)",
54
- "sport-0": "var(--ds-color-sport-0)",
55
- "sport-100": "var(--ds-color-sport-100)",
56
- "sport-200": "var(--ds-color-sport-200)",
57
- "sport-300": "var(--ds-color-sport-300)",
58
- "sport-400": "var(--ds-color-sport-400)",
59
- "sport-500": "var(--ds-color-sport-500)",
60
- "sport-600": "var(--ds-color-sport-600)",
61
- "sport-700": "var(--ds-color-sport-700)",
62
- "sport-800": "var(--ds-color-sport-800)",
63
- "sport-900": "var(--ds-color-sport-900)",
64
- "sport-1000": "var(--ds-color-sport-1000)",
65
- "sport-1100": "var(--ds-color-sport-1100)",
66
- "bright-neutral-0": "var(--ds-color-bright-neutral-0)",
67
- "bright-neutral-100": "var(--ds-color-bright-neutral-100)",
68
- "bright-neutral-200": "var(--ds-color-bright-neutral-200)",
69
- "bright-neutral-300": "var(--ds-color-bright-neutral-300)",
70
- "bright-neutral-400": "var(--ds-color-bright-neutral-400)",
71
- "bright-neutral-500": "var(--ds-color-bright-neutral-500)",
72
- "bright-neutral-050": "var(--ds-color-bright-neutral-050)",
57
+ "neutral-100": "var(--ds-color-neutral-100)",
58
+ "neutral-200": "var(--ds-color-neutral-200)",
59
+ "neutral-300": "var(--ds-color-neutral-300)",
60
+ "neutral-400": "var(--ds-color-neutral-400)",
61
+ "neutral-500": "var(--ds-color-neutral-500)",
62
+ "neutral-600": "var(--ds-color-neutral-600)",
63
+ "neutral-700": "var(--ds-color-neutral-700)",
64
+ "neutral-800": "var(--ds-color-neutral-800)",
65
+ "neutral-900": "var(--ds-color-neutral-900)",
66
+ "neutral-1000": "var(--ds-color-neutral-1000)",
67
+ "neutral-1100": "var(--ds-color-neutral-1100)",
68
+ "neutral-white": "var(--ds-color-neutral-white)",
69
+ "neutral-050": "var(--ds-color-neutral-050)",
70
+ "neutral-black": "var(--ds-color-neutral-black)",
73
71
  "bright-neutral-alpha-100": "var(--ds-color-bright-neutral-alpha-100)",
74
72
  "bright-neutral-alpha-200": "var(--ds-color-bright-neutral-alpha-200)",
75
73
  "bright-neutral-alpha-300": "var(--ds-color-bright-neutral-alpha-300)",
76
74
  "bright-neutral-alpha-400": "var(--ds-color-bright-neutral-alpha-400)",
77
75
  "bright-neutral-alpha-500": "var(--ds-color-bright-neutral-alpha-500)",
78
76
  "bright-neutral-alpha-050": "var(--ds-color-bright-neutral-alpha-050)",
79
- "dark-neutral-0": "var(--ds-color-dark-neutral-0)",
80
- "dark-neutral-100": "var(--ds-color-dark-neutral-100)",
81
- "dark-neutral-200": "var(--ds-color-dark-neutral-200)",
82
- "dark-neutral-300": "var(--ds-color-dark-neutral-300)",
83
- "dark-neutral-400": "var(--ds-color-dark-neutral-400)",
84
- "dark-neutral-500": "var(--ds-color-dark-neutral-500)",
85
- "dark-neutral-050": "var(--ds-color-dark-neutral-050)",
86
77
  "dark-neutral-alpha-100": "var(--ds-color-dark-neutral-alpha-100)",
87
78
  "dark-neutral-alpha-200": "var(--ds-color-dark-neutral-alpha-200)",
88
79
  "dark-neutral-alpha-300": "var(--ds-color-dark-neutral-alpha-300)",
@@ -1,25 +0,0 @@
1
- const version = '${version}';
2
- const packageName = process.env.npm_package_name;
3
-
4
- module.exports = {
5
- plugins: {
6
- '@release-it/conventional-changelog': {
7
- path: '.',
8
- infile: false, // Disable changelog writes on beta releases
9
- },
10
- },
11
- git: {
12
- push: true,
13
- tagName: `@bonniernews/dn-design-system-web@${version}`,
14
- commitsPath: '.',
15
- commitMessage: `chore(web): released version v${version}`,
16
- requireCommits: false
17
- },
18
- github: {
19
- "tokenRef": "GITHUB_TOKEN"
20
- },
21
- npm: {
22
- publish: false,
23
- versionArgs: ['--workspaces false'],
24
- }
25
- };
package/.release-it.cjs DELETED
@@ -1,39 +0,0 @@
1
- const version = '${version}';
2
- const packageName = process.env.npm_package_name;
3
-
4
- module.exports = {
5
- plugins: {
6
- '@release-it/conventional-changelog': {
7
- path: '.',
8
- infile: 'CHANGELOG.md',
9
- header: `# Changelog\n\nAll changes to @bonniernews/dn-design-system-web will be documented in this file.\n\n`,
10
- preset: {
11
- name: 'conventionalcommits',
12
- types: [
13
- { type: "feat", "section": "Features" },
14
- { type: "fix", "section": "Bug Fixes" },
15
- { type: "chore", "section": "Maintenance", "hidden": false },
16
- { type: "docs", "section": "Maintenance", "hidden": false },
17
- { type: "style", "section": "Maintenance", "hidden": false },
18
- { type: "refactor", "section": "Maintenance", "hidden": false },
19
- { type: "perf", "section": "Maintenance", "hidden": false },
20
- { type: "test", "section": "Maintenance", "hidden": false }
21
- ]
22
- },
23
- },
24
- },
25
- git: {
26
- push: true,
27
- tagName: `@bonniernews/dn-design-system-web@${version}`,
28
- commitsPath: '.',
29
- commitMessage: `chore(web): released version v${version}`,
30
- requireCommits: false
31
- },
32
- github: {
33
- "tokenRef": "GITHUB_TOKEN"
34
- },
35
- npm: {
36
- publish: false,
37
- versionArgs: ['--workspaces false'],
38
- }
39
- };
@@ -1,28 +0,0 @@
1
- import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
2
-
3
- export interface DividerProps {
4
- variant?: 'soft' | 'medium' | 'hard';
5
- classNames?: string;
6
- attributes?: object;
7
- }
8
-
9
- /**
10
- * - GitHub: [BonnierNews/dn-design-system/../web/src/components/divider](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/divider)
11
- * - Storybook: [Divider](https://designsystem.dn.se/?path=/docs/basic-divider--docs)
12
- *
13
- * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:
14
- * `@use '@bonniernews/dn-design-system-web/components/divider/divider.scss'`
15
- */
16
- export const Divider = ({ variant = 'soft', classNames, attributes }: DividerProps) => {
17
- const classes = formatClassString([
18
- 'ds-divider',
19
- `ds-divider--${variant}`,
20
- classNames
21
- ])
22
-
23
- return (
24
- <div className={classes} {...attributes}><hr /></div>
25
- );
26
- };
27
-
28
- export default Divider;
@@ -1,34 +0,0 @@
1
- import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
2
-
3
- export interface QuoteProps {
4
- bodyHtml: string;
5
- theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
6
- classNames?: string;
7
- /** Ex. { target: "_blank", "data-test": "lorem ipsum" } */
8
- attributes?: object;
9
- forcePx?: boolean;
10
- }
11
-
12
- /**
13
- * - GitHub: [BonnierNews/dn-design-system/../web/src/components/quote](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/quote)
14
- * - Storybook: [Quote](https://designsystem.dn.se/?path=/docs/article-quote--docs)
15
- *
16
- * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:
17
- * `@use '@bonniernews/dn-design-system-web/components/quote/quote.scss'`
18
- */
19
- export const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {
20
- const componentClassName = 'ds-quote';
21
-
22
- const classes = formatClassString([
23
- componentClassName,
24
- `ds-theme--${theme}`,
25
- forcePx && 'ds-force-px',
26
- classNames,
27
- ])
28
-
29
- const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`
30
-
31
- return (
32
- <blockquote dangerouslySetInnerHTML={{ __html: quoteHtml }} className={classes} {...attributes} />
33
- );
34
- };
@@ -1,44 +0,0 @@
1
- import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
2
-
3
- export interface TeaserCardsProps {
4
- areaType?: 'right' | 'bauta' | 'bautaxl';
5
- targetLink?: string;
6
- theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
7
- classes?: string;
8
- /** Ex. { target: "_blank", "data-test": "lorem ipsum" } */
9
- attributes?: object;
10
- children: any;
11
- }
12
-
13
- /**
14
- * - GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-card](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-card)
15
- * - Storybook: [Subcomponents > TeaserCard](https://designsystem.dn.se/?path=/docs/section-subcomponents-teaserdot--docs)
16
- *
17
- * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:
18
- * `@use '@bonniernews/dn-design-system-web/assets/teaser/teaser.scss'`
19
- */
20
- export const TeaserCard = ({ areaType, targetLink, theme = 'nyheter', classes, attributes, children }: TeaserCardsProps) => {
21
- const componentClassName = 'ds-teaser';
22
-
23
- const classNames = formatClassString([
24
- componentClassName,
25
- areaType && `${componentClassName}--${areaType}`,
26
- areaType == 'bauta' && 'ds-dark',
27
- `ds-theme--${theme}`,
28
- classes,
29
- ])
30
-
31
- if (targetLink) {
32
- return (
33
- <a className={classNames} href={targetLink } {...attributes}>
34
- { children }
35
- </a>
36
- );
37
- }
38
-
39
- return (
40
- <div className={classNames}{...attributes}>
41
- { children }
42
- </div>
43
- );
44
- };
@@ -1,43 +0,0 @@
1
- import { TeaserCard } from "@bonniernews/dn-design-system-web/components/teaser-card/teaser-card.tsx";
2
- import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
3
- import { Body, Content, Media, Title } from "@bonniernews/dn-design-system-web/helpers/teaser.tsx";
4
- export interface TeaserOnSiteProps {
5
- areaType?: 'right' | 'bauta' | 'bautaxl';
6
- targetLink?: string;
7
- theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
8
- classNames?: string;
9
- /** Ex. { target: "_blank", "data-test": "lorem ipsum" } */
10
- attributes?: object;
11
- mediaHtml?: string;
12
- title?: string;
13
- text?: string;
14
- }
15
-
16
- /**
17
- * Also known as "På Plats-puffen".
18
- *
19
- * In the CMS title will be set to a location like "Kiev, Ukraina" or "USA" and text is usually set to some author names like "Jan Banan och Kalle Kula"
20
- *
21
- * - GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-onsite](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-onsite)
22
- * - Storybook: [TeaserOnSite](https://designsystem.dn.se/?path=/docs/section-teaseronsite--docs)
23
- *
24
- * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:
25
- * `@use '@bonniernews/dn-design-system-web/components/teaser-onsite/teaser-onsite.scss'`
26
- */
27
- export const TeaserOnSite = ({ areaType, targetLink, theme = 'nyheter', classNames, attributes, mediaHtml, title, text }: TeaserOnSiteProps) => {
28
-
29
- const classes = formatClassString([
30
- "ds-teaser--onsite",
31
- classNames,
32
- ])
33
-
34
- return (
35
- <TeaserCard { ...{ areaType, targetLink, theme, classes, attributes }}>
36
- <Media { ...{ mediaHtml, rounded: true }} />
37
- <Content>
38
- <Title title={`PÅ PLATS | ${title}`} />
39
- <Body { ...{ text }} />
40
- </Content>
41
- </TeaserCard>
42
- );
43
- };
@@ -1,27 +0,0 @@
1
- import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
2
-
3
- export interface ThematicBreakProps {
4
- classNames?: string;
5
- attributes?: object;
6
- }
7
-
8
- /**
9
- * - GitHub: [BonnierNews/dn-design-system/../web/src/components/thematic-break](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/thematic-break)
10
- * - Storybook: [ThematicBreak](https://designsystem.dn.se/?path=/docs/article-thematicbreak--docs)
11
- *
12
- * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:
13
- * `@use '@bonniernews/dn-design-system-web/components/thematic-break/thematic-break.scss'`
14
- */
15
-
16
- export const ThematicBreak = ({ classNames, attributes }: ThematicBreakProps) => {
17
- const classes = formatClassString([
18
- 'ds-thematic-break',
19
- classNames
20
- ])
21
-
22
- return (
23
- <div className={classes} {...attributes}><hr /></div>
24
- );
25
- };
26
-
27
- export default ThematicBreak;
@@ -1,32 +0,0 @@
1
- interface MediaProps {
2
- mediaHtml?: string;
3
- rounded?: boolean;
4
- }
5
-
6
- export const Media = ({ mediaHtml, rounded }: MediaProps) => {
7
- const classNames = 'ds-teaser__media' + (rounded ? ' ds-teaser__media--rounded' : '');
8
- return mediaHtml && (<div className={classNames} dangerouslySetInnerHTML={{ __html: mediaHtml }} />)
9
- }
10
-
11
- interface ContentProps {
12
- children: any;
13
- }
14
- export const Content = ({ children }: ContentProps) => {
15
- return (<div className="ds-teaser__content">
16
- {children}
17
- </div>)
18
- }
19
-
20
- interface TitleProps {
21
- title?: string;
22
- }
23
- export const Title = ({ title }: TitleProps) => {
24
- return title && (<h2 className="ds-teaser__title">{title}</h2>)
25
- }
26
-
27
- interface BodyProps {
28
- text?: string;
29
- }
30
- export const Body = ({ text }: BodyProps) => {
31
- return text && (<p className="ds-teaser__text">{text}</p>)
32
- }
package/index.tsx DELETED
@@ -1,8 +0,0 @@
1
- import { Divider } from "./components/divider/divider";
2
- export { Divider };
3
-
4
- import { ThematicBreak } from "./components/thematic-break/thematic-break";
5
- export { ThematicBreak };
6
-
7
- import { Quote } from "./components/quote/quote";
8
- export { Quote };