@bonniernews/dn-design-system-web 21.2.1-beta.0 → 22.0.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 (112) hide show
  1. package/CHANGELOG.md +77 -29
  2. package/assets/teaser/teaser.scss +1 -32
  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/group-header/group-header.scss +1 -1
  7. package/components/spinner/README-NJK.md +37 -0
  8. package/components/spinner/README.md +10 -33
  9. package/components/teaser-image/teaser-image.scss +1 -1
  10. package/components/teaser-large/README.md +0 -1
  11. package/components/teaser-large/teaser-large.njk +4 -14
  12. package/components/teaser-large/teaser-large.scss +0 -16
  13. package/components/teaser-list-vertical/teaser-list-vertical.njk +1 -0
  14. package/components/teaser-native/teaser-native.njk +3 -5
  15. package/components/teaser-native/teaser-native.scss +6 -0
  16. package/components/teaser-onsite/README.md +8 -1
  17. package/components/teaser-onsite/teaser-onsite.njk +1 -5
  18. package/components/teaser-package/teaser-package.scss +6 -17
  19. package/components/teaser-slideshow/teaser-slideshow.scss +1 -1
  20. package/components/teaser-split/README.md +0 -1
  21. package/components/teaser-split/teaser-split.njk +3 -7
  22. package/components/teaser-split/teaser-split.scss +1 -3
  23. package/components/teaser-standard/README.md +0 -1
  24. package/components/teaser-standard/teaser-standard.njk +4 -8
  25. package/components/teaser-standard/teaser-standard.scss +6 -5
  26. package/foundations/helpers/colors.scss +6 -1
  27. package/foundations/variables/colorsCssVariables.scss +0 -4
  28. package/foundations/variables/colorsDnDarkTokens.scss +60 -64
  29. package/foundations/variables/colorsDnLightTokens.scss +51 -55
  30. package/foundations/variables/metrics.scss +1 -2
  31. package/foundations/variables/typographyFontWeight.scss +0 -1
  32. package/foundations/variables/typographyTokensList.scss +0 -1
  33. package/foundations/variables/typographyTokensScreenExtraLarge.scss +4 -11
  34. package/foundations/variables/typographyTokensScreenLarge.scss +3 -10
  35. package/foundations/variables/typographyTokensScreenSmall.scss +6 -13
  36. package/index.d.ts +4 -0
  37. package/package.json +4 -22
  38. package/preact/components/divider/divider.js +21 -0
  39. package/preact/components/divider/divider.js.map +7 -0
  40. package/preact/components/footer/footer.d.ts +33 -0
  41. package/preact/components/footer/footer.js +68 -0
  42. package/preact/components/footer/footer.js.map +7 -0
  43. package/preact/components/footer/logoWithPayoff.d.ts +1 -0
  44. package/preact/components/footer/logoWithPayoff.js +15 -0
  45. package/preact/components/footer/logoWithPayoff.js.map +7 -0
  46. package/preact/components/game-header/game-header.d.ts +18 -0
  47. package/preact/components/game-header/game-header.js +29 -0
  48. package/preact/components/game-header/game-header.js.map +7 -0
  49. package/preact/components/icon-sprite/icon-sprite.d.ts +18 -0
  50. package/preact/components/icon-sprite/icon-sprite.js +132 -0
  51. package/preact/components/icon-sprite/icon-sprite.js.map +7 -0
  52. package/preact/components/icon-with-wrapper/icon-with-wrapper.d.ts +23 -0
  53. package/{tokens-tmp/colors-css-variables.json → preact/components/icon-with-wrapper/icon-with-wrapper.js} +50 -6
  54. package/preact/components/icon-with-wrapper/icon-with-wrapper.js.map +7 -0
  55. package/preact/components/pictogram/pictogram.d.ts +17 -0
  56. package/preact/components/pictogram/pictogram.js +39 -0
  57. package/preact/components/pictogram/pictogram.js.map +7 -0
  58. package/preact/components/quote/quote.js +22 -0
  59. package/preact/components/quote/quote.js.map +7 -0
  60. package/preact/components/spinner/spinner.d.ts +16 -0
  61. package/preact/components/spinner/spinner.js +24 -0
  62. package/preact/components/spinner/spinner.js.map +7 -0
  63. package/preact/components/teaser-card/teaser-card.js +25 -0
  64. package/preact/components/teaser-card/teaser-card.js.map +7 -0
  65. package/preact/components/teaser-onsite/teaser-onsite.js +56 -0
  66. package/preact/components/teaser-onsite/teaser-onsite.js.map +7 -0
  67. package/preact/components/thematic-break/thematic-break.js +20 -0
  68. package/preact/components/thematic-break/thematic-break.js.map +7 -0
  69. package/preact/helpers/formatClassString.d.ts +1 -0
  70. package/tokens/colors-css-variables.json +1 -5
  71. package/tokens/colors-dark-mode.json +60 -64
  72. package/tokens/colors-light-mode.json +53 -57
  73. package/tokens/typography-list.json +0 -1
  74. package/tsconfig.json +3 -2
  75. package/types-lib/ds-color.d.ts +100 -0
  76. package/types-lib/ds-icon.d.ts +96 -0
  77. package/variables/colors-css-variables.json +18 -27
  78. package/.release-it-beta.cjs +0 -25
  79. package/.release-it.cjs +0 -39
  80. package/components/divider/divider.tsx +0 -28
  81. package/components/quote/quote.tsx +0 -34
  82. package/components/teaser-breaking/README-UXD.md +0 -0
  83. package/components/teaser-breaking/README.md +0 -46
  84. package/components/teaser-breaking/teaser-breaking.njk +0 -46
  85. package/components/teaser-breaking/teaser-breaking.scss +0 -52
  86. package/components/teaser-card/teaser-card.tsx +0 -44
  87. package/components/teaser-onsite/teaser-onsite.tsx +0 -43
  88. package/components/thematic-break/thematic-break.tsx +0 -27
  89. package/helpers/teaser.tsx +0 -32
  90. package/index.tsx +0 -8
  91. package/preact/components.cjs +0 -68
  92. package/preact/components.cjs.map +0 -7
  93. package/preact/components.esm.js +0 -45
  94. package/preact/components.esm.js.map +0 -7
  95. package/preact/index.d.ts +0 -6
  96. package/react/components/divider/divider.d.ts +0 -14
  97. package/react/components/quote/quote.d.ts +0 -16
  98. package/react/components/teaser-card/teaser-card.d.ts +0 -17
  99. package/react/components/teaser-onsite/teaser-onsite.d.ts +0 -23
  100. package/react/components/thematic-break/thematic-break.d.ts +0 -13
  101. package/react/components.cjs +0 -68
  102. package/react/components.cjs.map +0 -7
  103. package/react/components.esm.js +0 -45
  104. package/react/components.esm.js.map +0 -7
  105. package/react/index.d.ts +0 -6
  106. package/tokens-tmp/shadows-css-variables.json +0 -6
  107. package/tokens-tmp/spacing-base-list.json +0 -14
  108. package/tokens-tmp/spacing-detail-list.json +0 -18
  109. package/tsconfig-preact.json +0 -12
  110. package/tsconfig-react.json +0 -11
  111. /package/components/icon-sprite/{README.md → README-NJK.md} +0 -0
  112. /package/components/pictogram/{README.md → README-NJK.md} +0 -0
@@ -1,46 +0,0 @@
1
- {% from '@bonniernews/dn-design-system-web/components/teaser-card/teaser-card.njk' import TeaserCard %}
2
-
3
- {% macro TeaserBreaking(params) %}
4
- {% set componentClassName = "ds-teaser" %}
5
- {% set classNamePrefix = componentClassName + "--" %}
6
-
7
- {% set extraClasses = [
8
- "ds-teaser--breaking",
9
- params.classNames if params.classNames
10
- ] | join(" ") %}
11
-
12
- {% call TeaserCard({
13
- targetLink: params.targetLink,
14
- areaType: params.areaType,
15
- theme: params.theme,
16
- attributes: params.attributes,
17
- classNames: extraClasses
18
- }) %}
19
- <div class="{{ componentClassName + '__content'}}">
20
- <div class="ds-teaser__content-inner">
21
- {% if params.vignette %}
22
- <div class="ds-teaser__vignette">
23
- {{ params.vignette }}
24
- </div>
25
- {% endif %}
26
- <h2 class="ds-teaser__title">
27
- {% if params.highlight %}
28
- <span class="{{ componentClassName + '__highlight'}}">{{ params.highlight }}</span>
29
- {% endif %}
30
- {{ params.title }}
31
- </h2>
32
-
33
- {% if params.text %}
34
- <p class="{{ componentClassName + '__text' }}">
35
- {{ params.text }}
36
- </p>
37
- {% endif %}
38
- </div>
39
- </div>
40
- {% if params.mediaHtml %}
41
- <div class="{{ componentClassName + '__media'}}">
42
- {{ params.mediaHtml }}
43
- </div>
44
- {% endif %}
45
- {% endcall %}
46
- {% endmacro %}
@@ -1,52 +0,0 @@
1
- @use "../../foundations/helpers/forward.helpers.scss" as *;
2
- @use "../../assets/teaser/teaser.scss" as *;
3
-
4
- .ds-teaser.ds-teaser--breaking {
5
- display: flex;
6
- flex-direction: column;
7
- position: relative;
8
-
9
- .ds-teaser__media {
10
- padding: ds-spacing(0 0 $ds-s-100);
11
-
12
- video {
13
- max-width: 100%;
14
- }
15
- }
16
-
17
- .ds-teaser__content {
18
- display: flex;
19
- flex-direction: row;
20
- padding: ds-spacing($ds-s-075 $ds-s-100 $ds-s-100);
21
- text-align: center;
22
-
23
- .ds-teaser__content-inner {
24
- display: flex;
25
- flex-direction: column;
26
- flex: 1;
27
- }
28
- }
29
-
30
- &:focus-visible {
31
- outline: none !important; /* stylelint-disable-line declaration-no-important */
32
-
33
- .ds-teaser__content {
34
- @include ds-teaser-focus(-8px, false);
35
- }
36
- }
37
-
38
- .ds-teaser__vignette {
39
- margin-top: ds-spacing($ds-s-025);
40
- }
41
-
42
- .ds-teaser__title {
43
- @include ds-typography($ds-typography-detailteaser-breaking);
44
- text-align: center;
45
- }
46
-
47
- @include ds-hover(true) {
48
- .ds-teaser__title {
49
- @include ds-underline(3px);
50
- }
51
- }
52
- }
@@ -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 };
@@ -1,68 +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/helpers/formatClassString.ts
30
- var formatClassString = (classesArray) => {
31
- return classesArray.filter((x) => !!x).join(" ");
32
- };
33
-
34
- // ../src/components/divider/divider.tsx
35
- var import_jsx_runtime = require("preact/jsx-runtime");
36
- var Divider = ({ variant = "soft", classNames, attributes }) => {
37
- const classes = formatClassString([
38
- "ds-divider",
39
- `ds-divider--${variant}`,
40
- classNames
41
- ]);
42
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: classes, ...attributes, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("hr", {}) });
43
- };
44
-
45
- // ../src/components/thematic-break/thematic-break.tsx
46
- var import_jsx_runtime2 = require("preact/jsx-runtime");
47
- var ThematicBreak = ({ classNames, attributes }) => {
48
- const classes = formatClassString([
49
- "ds-thematic-break",
50
- classNames
51
- ]);
52
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: classes, ...attributes, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("hr", {}) });
53
- };
54
-
55
- // ../src/components/quote/quote.tsx
56
- var import_jsx_runtime3 = require("preact/jsx-runtime");
57
- var Quote = ({ bodyHtml, theme = "nyheter", classNames, attributes, forcePx }) => {
58
- const componentClassName = "ds-quote";
59
- const classes = formatClassString([
60
- componentClassName,
61
- `ds-theme--${theme}`,
62
- forcePx && "ds-force-px",
63
- classNames
64
- ]);
65
- const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`;
66
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("blockquote", { dangerouslySetInnerHTML: { __html: quoteHtml }, className: classes, ...attributes });
67
- };
68
- //# sourceMappingURL=components.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../index.tsx", "../helpers/formatClassString.ts", "../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 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 DividerProps {\n variant?: 'soft' | 'medium' | 'hard';\n classNames?: string;\n attributes?: object;\n}\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/../web/src/components/divider](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/divider)\n * - Storybook: [Divider](https://designsystem.dn.se/?path=/docs/basic-divider--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/divider/divider.scss'`\n */\nexport const Divider = ({ variant = 'soft', classNames, attributes }: DividerProps) => {\n const classes = formatClassString([\n 'ds-divider',\n `ds-divider--${variant}`,\n classNames\n ])\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default Divider;\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", "import { formatClassString } from \"@bonniernews/dn-design-system-web/helpers/formatClassString.ts\";\n\nexport interface QuoteProps {\n bodyHtml: string;\n theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';\n classNames?: string;\n /** Ex. { target: \"_blank\", \"data-test\": \"lorem ipsum\" } */\n attributes?: object;\n forcePx?: boolean;\n}\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/../web/src/components/quote](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/quote)\n * - Storybook: [Quote](https://designsystem.dn.se/?path=/docs/article-quote--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/quote/quote.scss'`\n */\nexport const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {\n const componentClassName = 'ds-quote';\n\n const classes = formatClassString([\n componentClassName,\n `ds-theme--${theme}`,\n forcePx && 'ds-force-px',\n classNames,\n ])\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;;;ACAO,IAAM,oBAAoB,CAAC,iBAAqD;AACrF,SAAO,aAAa,OAAO,OAAK,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG;AAC/C;;;ACqB6C;AARtC,IAAM,UAAU,CAAC,EAAE,UAAU,QAAQ,YAAY,WAAW,MAAoB;AACrF,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA,eAAe,OAAO;AAAA,IACtB;AAAA,EACF,CAAC;AAED,SACE,4CAAC,SAAI,WAAW,SAAU,GAAG,YAAY,sDAAC,QAAG,GAAE;AAEnD;;;ACH6C,IAAAA,sBAAA;AAPtC,IAAM,gBAAgB,CAAC,EAAE,YAAY,WAAW,MAA0B;AAC/E,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE,6CAAC,SAAI,WAAW,SAAU,GAAG,YAAY,uDAAC,QAAG,GAAE;AAEnD;;;ACOI,IAAAC,sBAAA;AAbG,IAAM,QAAQ,CAAC,EAAE,UAAU,QAAQ,WAAW,YAAY,YAAY,QAAQ,MAAkB;AACrG,QAAM,qBAAqB;AAE3B,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA,aAAa,KAAK;AAAA,IAClB,WAAW;AAAA,IACX;AAAA,EACF,CAAC;AAED,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
- }
@@ -1,45 +0,0 @@
1
- // ../src/helpers/formatClassString.ts
2
- var formatClassString = (classesArray) => {
3
- return classesArray.filter((x) => !!x).join(" ");
4
- };
5
-
6
- // ../src/components/divider/divider.tsx
7
- import { jsx } from "preact/jsx-runtime";
8
- var Divider = ({ variant = "soft", classNames, attributes }) => {
9
- const classes = formatClassString([
10
- "ds-divider",
11
- `ds-divider--${variant}`,
12
- classNames
13
- ]);
14
- return /* @__PURE__ */ jsx("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsx("hr", {}) });
15
- };
16
-
17
- // ../src/components/thematic-break/thematic-break.tsx
18
- import { jsx as jsx2 } from "preact/jsx-runtime";
19
- var ThematicBreak = ({ classNames, attributes }) => {
20
- const classes = formatClassString([
21
- "ds-thematic-break",
22
- classNames
23
- ]);
24
- return /* @__PURE__ */ jsx2("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsx2("hr", {}) });
25
- };
26
-
27
- // ../src/components/quote/quote.tsx
28
- import { jsx as jsx3 } from "preact/jsx-runtime";
29
- var Quote = ({ bodyHtml, theme = "nyheter", classNames, attributes, forcePx }) => {
30
- const componentClassName = "ds-quote";
31
- const classes = formatClassString([
32
- componentClassName,
33
- `ds-theme--${theme}`,
34
- forcePx && "ds-force-px",
35
- classNames
36
- ]);
37
- const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`;
38
- return /* @__PURE__ */ jsx3("blockquote", { dangerouslySetInnerHTML: { __html: quoteHtml }, className: classes, ...attributes });
39
- };
40
- export {
41
- Divider,
42
- Quote,
43
- ThematicBreak
44
- };
45
- //# sourceMappingURL=components.esm.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../helpers/formatClassString.ts", "../components/divider/divider.tsx", "../components/thematic-break/thematic-break.tsx", "../components/quote/quote.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 DividerProps {\n variant?: 'soft' | 'medium' | 'hard';\n classNames?: string;\n attributes?: object;\n}\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/../web/src/components/divider](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/divider)\n * - Storybook: [Divider](https://designsystem.dn.se/?path=/docs/basic-divider--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/divider/divider.scss'`\n */\nexport const Divider = ({ variant = 'soft', classNames, attributes }: DividerProps) => {\n const classes = formatClassString([\n 'ds-divider',\n `ds-divider--${variant}`,\n classNames\n ])\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default Divider;\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", "import { formatClassString } from \"@bonniernews/dn-design-system-web/helpers/formatClassString.ts\";\n\nexport interface QuoteProps {\n bodyHtml: string;\n theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';\n classNames?: string;\n /** Ex. { target: \"_blank\", \"data-test\": \"lorem ipsum\" } */\n attributes?: object;\n forcePx?: boolean;\n}\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/../web/src/components/quote](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/quote)\n * - Storybook: [Quote](https://designsystem.dn.se/?path=/docs/article-quote--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/quote/quote.scss'`\n */\nexport const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {\n const componentClassName = 'ds-quote';\n\n const classes = formatClassString([\n componentClassName,\n `ds-theme--${theme}`,\n forcePx && 'ds-force-px',\n classNames,\n ])\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": ";AAAO,IAAM,oBAAoB,CAAC,iBAAqD;AACrF,SAAO,aAAa,OAAO,OAAK,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG;AAC/C;;;ACqB6C;AARtC,IAAM,UAAU,CAAC,EAAE,UAAU,QAAQ,YAAY,WAAW,MAAoB;AACrF,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA,eAAe,OAAO;AAAA,IACtB;AAAA,EACF,CAAC;AAED,SACE,oBAAC,SAAI,WAAW,SAAU,GAAG,YAAY,8BAAC,QAAG,GAAE;AAEnD;;;ACH6C,gBAAAA,YAAA;AAPtC,IAAM,gBAAgB,CAAC,EAAE,YAAY,WAAW,MAA0B;AAC/E,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE,gBAAAA,KAAC,SAAI,WAAW,SAAU,GAAG,YAAY,0BAAAA,KAAC,QAAG,GAAE;AAEnD;;;ACOI,gBAAAC,YAAA;AAbG,IAAM,QAAQ,CAAC,EAAE,UAAU,QAAQ,WAAW,YAAY,YAAY,QAAQ,MAAkB;AACrG,QAAM,qBAAqB;AAE3B,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA,aAAa,KAAK;AAAA,IAClB,WAAW;AAAA,IACX;AAAA,EACF,CAAC;AAED,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,6 +0,0 @@
1
- import { Divider } from "./components/divider/divider";
2
- export { Divider };
3
- import { ThematicBreak } from "./components/thematic-break/thematic-break";
4
- export { ThematicBreak };
5
- import { Quote } from "./components/quote/quote";
6
- export { Quote };
@@ -1,14 +0,0 @@
1
- export interface DividerProps {
2
- variant?: 'soft' | 'medium' | 'hard';
3
- classNames?: string;
4
- attributes?: object;
5
- }
6
- /**
7
- * - GitHub: [BonnierNews/dn-design-system/../web/src/components/divider](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/divider)
8
- * - Storybook: [Divider](https://designsystem.dn.se/?path=/docs/basic-divider--docs)
9
- *
10
- * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:
11
- * `@use '@bonniernews/dn-design-system-web/components/divider/divider.scss'`
12
- */
13
- export declare const Divider: ({ variant, classNames, attributes }: DividerProps) => import("react/jsx-runtime").JSX.Element;
14
- export default Divider;
@@ -1,16 +0,0 @@
1
- export interface QuoteProps {
2
- bodyHtml: string;
3
- theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
4
- classNames?: string;
5
- /** Ex. { target: "_blank", "data-test": "lorem ipsum" } */
6
- attributes?: object;
7
- forcePx?: boolean;
8
- }
9
- /**
10
- * - GitHub: [BonnierNews/dn-design-system/../web/src/components/quote](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/quote)
11
- * - Storybook: [Quote](https://designsystem.dn.se/?path=/docs/article-quote--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/quote/quote.scss'`
15
- */
16
- export declare const Quote: ({ bodyHtml, theme, classNames, attributes, forcePx }: QuoteProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,17 +0,0 @@
1
- export interface TeaserCardsProps {
2
- areaType?: 'right' | 'bauta' | 'bautaxl';
3
- targetLink?: string;
4
- theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
5
- classes?: string;
6
- /** Ex. { target: "_blank", "data-test": "lorem ipsum" } */
7
- attributes?: object;
8
- children: any;
9
- }
10
- /**
11
- * - GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-card](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-card)
12
- * - Storybook: [Subcomponents > TeaserCard](https://designsystem.dn.se/?path=/docs/section-subcomponents-teaserdot--docs)
13
- *
14
- * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:
15
- * `@use '@bonniernews/dn-design-system-web/assets/teaser/teaser.scss'`
16
- */
17
- export declare const TeaserCard: ({ areaType, targetLink, theme, classes, attributes, children }: TeaserCardsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,23 +0,0 @@
1
- export interface TeaserOnSiteProps {
2
- areaType?: 'right' | 'bauta' | 'bautaxl';
3
- targetLink?: string;
4
- theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
5
- classNames?: string;
6
- /** Ex. { target: "_blank", "data-test": "lorem ipsum" } */
7
- attributes?: object;
8
- mediaHtml?: string;
9
- title?: string;
10
- text?: string;
11
- }
12
- /**
13
- * Also known as "På Plats-puffen".
14
- *
15
- * 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"
16
- *
17
- * - GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-onsite](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-onsite)
18
- * - Storybook: [TeaserOnSite](https://designsystem.dn.se/?path=/docs/section-teaseronsite--docs)
19
- *
20
- * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:
21
- * `@use '@bonniernews/dn-design-system-web/components/teaser-onsite/teaser-onsite.scss'`
22
- */
23
- export declare const TeaserOnSite: ({ areaType, targetLink, theme, classNames, attributes, mediaHtml, title, text }: TeaserOnSiteProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- export interface ThematicBreakProps {
2
- classNames?: string;
3
- attributes?: object;
4
- }
5
- /**
6
- * - GitHub: [BonnierNews/dn-design-system/../web/src/components/thematic-break](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/thematic-break)
7
- * - Storybook: [ThematicBreak](https://designsystem.dn.se/?path=/docs/article-thematicbreak--docs)
8
- *
9
- * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:
10
- * `@use '@bonniernews/dn-design-system-web/components/thematic-break/thematic-break.scss'`
11
- */
12
- export declare const ThematicBreak: ({ classNames, attributes }: ThematicBreakProps) => import("react/jsx-runtime").JSX.Element;
13
- export default ThematicBreak;
@@ -1,68 +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/helpers/formatClassString.ts
30
- var formatClassString = (classesArray) => {
31
- return classesArray.filter((x) => !!x).join(" ");
32
- };
33
-
34
- // ../src/components/divider/divider.tsx
35
- var import_jsx_runtime = require("react/jsx-runtime");
36
- var Divider = ({ variant = "soft", classNames, attributes }) => {
37
- const classes = formatClassString([
38
- "ds-divider",
39
- `ds-divider--${variant}`,
40
- classNames
41
- ]);
42
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: classes, ...attributes, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("hr", {}) });
43
- };
44
-
45
- // ../src/components/thematic-break/thematic-break.tsx
46
- var import_jsx_runtime2 = require("react/jsx-runtime");
47
- var ThematicBreak = ({ classNames, attributes }) => {
48
- const classes = formatClassString([
49
- "ds-thematic-break",
50
- classNames
51
- ]);
52
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: classes, ...attributes, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("hr", {}) });
53
- };
54
-
55
- // ../src/components/quote/quote.tsx
56
- var import_jsx_runtime3 = require("react/jsx-runtime");
57
- var Quote = ({ bodyHtml, theme = "nyheter", classNames, attributes, forcePx }) => {
58
- const componentClassName = "ds-quote";
59
- const classes = formatClassString([
60
- componentClassName,
61
- `ds-theme--${theme}`,
62
- forcePx && "ds-force-px",
63
- classNames
64
- ]);
65
- const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`;
66
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("blockquote", { dangerouslySetInnerHTML: { __html: quoteHtml }, className: classes, ...attributes });
67
- };
68
- //# sourceMappingURL=components.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../index.tsx", "../helpers/formatClassString.ts", "../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 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 DividerProps {\n variant?: 'soft' | 'medium' | 'hard';\n classNames?: string;\n attributes?: object;\n}\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/../web/src/components/divider](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/divider)\n * - Storybook: [Divider](https://designsystem.dn.se/?path=/docs/basic-divider--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/divider/divider.scss'`\n */\nexport const Divider = ({ variant = 'soft', classNames, attributes }: DividerProps) => {\n const classes = formatClassString([\n 'ds-divider',\n `ds-divider--${variant}`,\n classNames\n ])\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default Divider;\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", "import { formatClassString } from \"@bonniernews/dn-design-system-web/helpers/formatClassString.ts\";\n\nexport interface QuoteProps {\n bodyHtml: string;\n theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';\n classNames?: string;\n /** Ex. { target: \"_blank\", \"data-test\": \"lorem ipsum\" } */\n attributes?: object;\n forcePx?: boolean;\n}\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/../web/src/components/quote](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/quote)\n * - Storybook: [Quote](https://designsystem.dn.se/?path=/docs/article-quote--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/quote/quote.scss'`\n */\nexport const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {\n const componentClassName = 'ds-quote';\n\n const classes = formatClassString([\n componentClassName,\n `ds-theme--${theme}`,\n forcePx && 'ds-force-px',\n classNames,\n ])\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;;;ACAO,IAAM,oBAAoB,CAAC,iBAAqD;AACrF,SAAO,aAAa,OAAO,OAAK,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG;AAC/C;;;ACqB6C;AARtC,IAAM,UAAU,CAAC,EAAE,UAAU,QAAQ,YAAY,WAAW,MAAoB;AACrF,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA,eAAe,OAAO;AAAA,IACtB;AAAA,EACF,CAAC;AAED,SACE,4CAAC,SAAI,WAAW,SAAU,GAAG,YAAY,sDAAC,QAAG,GAAE;AAEnD;;;ACH6C,IAAAA,sBAAA;AAPtC,IAAM,gBAAgB,CAAC,EAAE,YAAY,WAAW,MAA0B;AAC/E,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE,6CAAC,SAAI,WAAW,SAAU,GAAG,YAAY,uDAAC,QAAG,GAAE;AAEnD;;;ACOI,IAAAC,sBAAA;AAbG,IAAM,QAAQ,CAAC,EAAE,UAAU,QAAQ,WAAW,YAAY,YAAY,QAAQ,MAAkB;AACrG,QAAM,qBAAqB;AAE3B,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA,aAAa,KAAK;AAAA,IAClB,WAAW;AAAA,IACX;AAAA,EACF,CAAC;AAED,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
- }
@@ -1,45 +0,0 @@
1
- // ../src/helpers/formatClassString.ts
2
- var formatClassString = (classesArray) => {
3
- return classesArray.filter((x) => !!x).join(" ");
4
- };
5
-
6
- // ../src/components/divider/divider.tsx
7
- import { jsx } from "react/jsx-runtime";
8
- var Divider = ({ variant = "soft", classNames, attributes }) => {
9
- const classes = formatClassString([
10
- "ds-divider",
11
- `ds-divider--${variant}`,
12
- classNames
13
- ]);
14
- return /* @__PURE__ */ jsx("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsx("hr", {}) });
15
- };
16
-
17
- // ../src/components/thematic-break/thematic-break.tsx
18
- import { jsx as jsx2 } from "react/jsx-runtime";
19
- var ThematicBreak = ({ classNames, attributes }) => {
20
- const classes = formatClassString([
21
- "ds-thematic-break",
22
- classNames
23
- ]);
24
- return /* @__PURE__ */ jsx2("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsx2("hr", {}) });
25
- };
26
-
27
- // ../src/components/quote/quote.tsx
28
- import { jsx as jsx3 } from "react/jsx-runtime";
29
- var Quote = ({ bodyHtml, theme = "nyheter", classNames, attributes, forcePx }) => {
30
- const componentClassName = "ds-quote";
31
- const classes = formatClassString([
32
- componentClassName,
33
- `ds-theme--${theme}`,
34
- forcePx && "ds-force-px",
35
- classNames
36
- ]);
37
- const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`;
38
- return /* @__PURE__ */ jsx3("blockquote", { dangerouslySetInnerHTML: { __html: quoteHtml }, className: classes, ...attributes });
39
- };
40
- export {
41
- Divider,
42
- Quote,
43
- ThematicBreak
44
- };
45
- //# sourceMappingURL=components.esm.js.map