@bonniernews/dn-design-system-web 20.5.1-beta.0 → 20.5.1-beta.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 +4 -0
- package/components/quote/quote.tsx +23 -0
- package/index.tsx +3 -0
- package/package.json +1 -1
- package/preact/components/quote/quote.d.ts +8 -0
- package/preact/components.cjs +15 -0
- package/preact/components.cjs.map +4 -4
- package/preact/components.esm.js +15 -0
- package/preact/components.esm.js.map +4 -4
- package/preact/index.d.ts +2 -0
- package/react/components/quote/quote.d.ts +8 -0
- package/react/components.cjs +15 -0
- package/react/components.cjs.map +4 -4
- package/react/components.esm.js +15 -0
- package/react/components.esm.js.map +4 -4
- package/react/index.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
## [20.5.1-beta.2](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@20.5.1-beta.1...@bonniernews/dn-design-system-web@20.5.1-beta.2) (2024-10-02)
|
|
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
|
+
|
|
7
11
|
## [20.5.1-beta.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@20.5.0...@bonniernews/dn-design-system-web@20.5.1-beta.0) (2024-10-02)
|
|
8
12
|
|
|
9
13
|
## [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)
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
};
|
package/index.tsx
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
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
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
23
|
Divider: () => Divider,
|
|
24
|
+
Quote: () => Quote,
|
|
24
25
|
ThematicBreak: () => ThematicBreak
|
|
25
26
|
});
|
|
26
27
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -48,4 +49,18 @@ var ThematicBreak = ({ classNames, attributes }) => {
|
|
|
48
49
|
].filter(Boolean).join(" ");
|
|
49
50
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: classes, ...attributes, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("hr", {}) });
|
|
50
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
|
+
};
|
|
51
66
|
//# sourceMappingURL=components.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../index.tsx", "../components/divider/divider.tsx", "../components/thematic-break/thematic-break.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Divider } from \"./components/divider/divider\";\nexport { Divider };\n\nimport { ThematicBreak } from \"./components/thematic-break/thematic-break\";\nexport { ThematicBreak };\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"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;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;",
|
|
6
|
-
"names": ["import_jsx_runtime"]
|
|
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
7
|
}
|
package/preact/components.esm.js
CHANGED
|
@@ -21,8 +21,23 @@ var ThematicBreak = ({ classNames, attributes }) => {
|
|
|
21
21
|
].filter(Boolean).join(" ");
|
|
22
22
|
return /* @__PURE__ */ jsx2("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsx2("hr", {}) });
|
|
23
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
|
+
};
|
|
24
38
|
export {
|
|
25
39
|
Divider,
|
|
40
|
+
Quote,
|
|
26
41
|
ThematicBreak
|
|
27
42
|
};
|
|
28
43
|
//# sourceMappingURL=components.esm.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../components/divider/divider.tsx", "../components/thematic-break/thematic-break.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"],
|
|
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;",
|
|
6
|
-
"names": ["jsx"]
|
|
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
7
|
}
|
package/preact/index.d.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
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
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
23
|
Divider: () => Divider,
|
|
24
|
+
Quote: () => Quote,
|
|
24
25
|
ThematicBreak: () => ThematicBreak
|
|
25
26
|
});
|
|
26
27
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -48,4 +49,18 @@ var ThematicBreak = ({ classNames, attributes }) => {
|
|
|
48
49
|
].filter(Boolean).join(" ");
|
|
49
50
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: classes, ...attributes, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("hr", {}) });
|
|
50
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
|
+
};
|
|
51
66
|
//# sourceMappingURL=components.cjs.map
|
package/react/components.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../index.tsx", "../components/divider/divider.tsx", "../components/thematic-break/thematic-break.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Divider } from \"./components/divider/divider\";\nexport { Divider };\n\nimport { ThematicBreak } from \"./components/thematic-break/thematic-break\";\nexport { ThematicBreak };\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"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;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;",
|
|
6
|
-
"names": ["import_jsx_runtime"]
|
|
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
7
|
}
|
package/react/components.esm.js
CHANGED
|
@@ -21,8 +21,23 @@ var ThematicBreak = ({ classNames, attributes }) => {
|
|
|
21
21
|
].filter(Boolean).join(" ");
|
|
22
22
|
return /* @__PURE__ */ jsx2("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsx2("hr", {}) });
|
|
23
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
|
+
};
|
|
24
38
|
export {
|
|
25
39
|
Divider,
|
|
40
|
+
Quote,
|
|
26
41
|
ThematicBreak
|
|
27
42
|
};
|
|
28
43
|
//# sourceMappingURL=components.esm.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../components/divider/divider.tsx", "../components/thematic-break/thematic-break.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"],
|
|
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;",
|
|
6
|
-
"names": ["jsx"]
|
|
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
7
|
}
|
package/react/index.d.ts
CHANGED