@dfds-ui/storybook-design 2.2.1 → 3.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 (54) hide show
  1. package/cjs/components/ExampleContainer.d.ts +4 -4
  2. package/cjs/components/ExampleContainer.js +2 -3
  3. package/cjs/components/Paper.d.ts +3 -3
  4. package/cjs/components/Paper.js +2 -3
  5. package/cjs/components/Placeholder.d.ts +2 -1
  6. package/cjs/components/Placeholder.js +12 -14
  7. package/cjs/components/StoryPage.d.ts +2 -2
  8. package/cjs/components/StoryPage.js +3 -5
  9. package/cjs/components/index.d.ts +0 -2
  10. package/cjs/components/index.js +5 -19
  11. package/cjs/index.d.ts +0 -3
  12. package/cjs/index.js +3 -40
  13. package/cjs/markdown/Markdown.d.ts +2 -2
  14. package/cjs/markdown/Markdown.js +17 -51
  15. package/cjs/markdown/Md.d.ts +2 -1
  16. package/cjs/markdown/Md.js +6 -5
  17. package/cjs/markdown/index.js +3 -3
  18. package/components/ExampleContainer.d.ts +4 -4
  19. package/components/Paper.d.ts +3 -3
  20. package/components/Placeholder.d.ts +2 -1
  21. package/components/Placeholder.js +11 -6
  22. package/components/StoryPage.d.ts +2 -2
  23. package/components/StoryPage.js +1 -2
  24. package/components/index.d.ts +0 -2
  25. package/components/index.js +1 -3
  26. package/index.d.ts +0 -3
  27. package/index.js +1 -4
  28. package/markdown/Markdown.d.ts +2 -2
  29. package/markdown/Markdown.js +13 -50
  30. package/markdown/Md.d.ts +2 -1
  31. package/markdown/Md.js +4 -2
  32. package/package.json +6 -7
  33. package/cjs/components/GlobalStorybookStyles.d.ts +0 -2
  34. package/cjs/components/GlobalStorybookStyles.js +0 -28
  35. package/cjs/components/MarkdownStory.d.ts +0 -8
  36. package/cjs/components/MarkdownStory.js +0 -42
  37. package/cjs/createDfdsTheme.d.ts +0 -1
  38. package/cjs/createDfdsTheme.js +0 -14
  39. package/cjs/helpers/components.d.ts +0 -40
  40. package/cjs/helpers/components.js +0 -367
  41. package/cjs/helpers/decorators.d.ts +0 -3
  42. package/cjs/helpers/decorators.js +0 -27
  43. package/cjs/types/global.d.js +0 -1
  44. package/components/GlobalStorybookStyles.d.ts +0 -2
  45. package/components/GlobalStorybookStyles.js +0 -21
  46. package/components/MarkdownStory.d.ts +0 -8
  47. package/components/MarkdownStory.js +0 -33
  48. package/createDfdsTheme.d.ts +0 -1
  49. package/createDfdsTheme.js +0 -8
  50. package/helpers/components.d.ts +0 -40
  51. package/helpers/components.js +0 -349
  52. package/helpers/decorators.d.ts +0 -3
  53. package/helpers/decorators.js +0 -26
  54. package/types/global.d.js +0 -0
@@ -1,55 +1,18 @@
1
- var _excluded = ["children"];
2
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
5
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
10
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11
1
  import React from 'react';
12
- import ReactMarkdown from 'react-markdown';
13
- import renderers from 'react-markdown-github-renderers';
14
-
15
- // the ListItem renderer from react-markdown-github-renderers does not render checkboxes so we create our own
16
- import { jsx as ___EmotionJSX } from "@emotion/react";
17
- var ListItemRenderer = function ListItemRenderer(props) {
18
- var checkbox = null;
19
- if (props.checked !== null) {
20
- var checked = props.checked;
21
- checkbox = /*#__PURE__*/React.createElement('input', {
22
- type: 'checkbox',
23
- checked: checked,
24
- readOnly: true,
25
- style: {
26
- margin: '4px'
27
- }
28
- });
29
- }
30
- return /*#__PURE__*/React.createElement('li', {
31
- style: {
32
- marginTop: 4,
33
- lineHeight: 1.5
34
- }
35
- }, checkbox, props.children);
36
- };
37
- var TableRenderer = function TableRenderer(props) {
38
- return /*#__PURE__*/React.createElement('table', {
39
- className: 'markdown-table'
40
- }, props.children);
41
- };
42
- var customRenderers = _objectSpread(_objectSpread({}, renderers), {}, {
43
- listItem: ListItemRenderer,
44
- table: TableRenderer
2
+ import { marked } from 'marked';
3
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
4
+ marked.setOptions({
5
+ gfm: true,
6
+ breaks: false
45
7
  });
46
8
  var Markdown = function Markdown(_ref) {
47
- var children = _ref.children,
48
- rest = _objectWithoutProperties(_ref, _excluded);
49
- return ___EmotionJSX(ReactMarkdown, _extends({
50
- escapeHtml: false,
51
- source: children,
52
- renderers: customRenderers
53
- }, rest));
9
+ var children = _ref.children;
10
+ var html = marked.parse(children);
11
+ return _jsx("div", {
12
+ className: "markdown-body",
13
+ dangerouslySetInnerHTML: {
14
+ __html: html
15
+ }
16
+ });
54
17
  };
55
18
  export default Markdown;
package/markdown/Md.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export declare const Md: (strings: TemplateStringsArray, ...values: string[]) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const Md: (strings: TemplateStringsArray, ...values: string[]) => React.JSX.Element;
2
3
  export default Md;
package/markdown/Md.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import Markdown from './Markdown';
3
- import { jsx as ___EmotionJSX } from "@emotion/react";
3
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
4
4
  export var Md = function Md(strings) {
5
5
  for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
6
6
  values[_key - 1] = arguments[_key];
@@ -8,6 +8,8 @@ export var Md = function Md(strings) {
8
8
  var source = strings.reduce(function (res, str, i) {
9
9
  return "".concat(res).concat(str).concat(values[i] || '');
10
10
  });
11
- return ___EmotionJSX(Markdown, null, source);
11
+ return _jsx(Markdown, {
12
+ children: source
13
+ });
12
14
  };
13
15
  export default Md;
package/package.json CHANGED
@@ -3,22 +3,21 @@
3
3
  "description": "Components and utils for use with Storybook within DFDS",
4
4
  "license": "MIT",
5
5
  "private": false,
6
- "version": "2.2.1",
6
+ "version": "3.0.0",
7
7
  "sideEffects": false,
8
8
  "main": "./cjs/index.js",
9
9
  "module": "./index.js",
10
10
  "esnext": "./index.js",
11
11
  "typings": "./index.d.ts",
12
12
  "peerDependencies": {
13
- "@emotion/react": "11.11.4",
14
- "@emotion/styled": "11.11.5"
13
+ "@emotion/react": "11.14.0",
14
+ "@emotion/styled": "11.14.1"
15
15
  },
16
16
  "dependencies": {
17
- "@dfds-ui/icons": "2.2.1",
18
- "react-markdown": "^5.0.3",
19
- "react-markdown-github-renderers": "^1.0.3"
17
+ "@dfds-ui/icons": "3.0.0",
18
+ "marked": "18.0.3"
20
19
  },
21
- "gitHead": "ff968cd26c278c656e617042759efdea213c0661",
20
+ "gitHead": "35ec63ee8364ec7145ae710c4f0db9e1d602b05d",
22
21
  "publishConfig": {
23
22
  "access": "public"
24
23
  }
@@ -1,2 +0,0 @@
1
- declare const GlobalStorybookStyles: () => JSX.Element;
2
- export default GlobalStorybookStyles;
@@ -1,28 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _react2 = require("@emotion/react");
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
11
- var _ref = process.env.NODE_ENV === "production" ? {
12
- name: "ka24jl",
13
- styles: "html,body{font-size:16px;background-color:#fcfcfd;}.docblock-source{border-radius:0!important;background-color:#ffffff!important;box-shadow:none!important;}.docblock-propstable{margin:16px 0!important;th{padding:6px 13px!important;border:1px solid rgba(0, 0, 0, 0.1)!important;color:black!important;border-radius:0!important;}tr{background-color:#fff!important;}tbody{box-shadow:none!important;}td{background-color:transparent!important;padding:6px 13px!important;border:0!important;border-top:1px solid rgba(0, 0, 0, 0.1)!important;&:first-of-type{span:first-of-type{border:1px solid #eee;padding:3px 5px;background-color:#f8f8f8;font-family:monospace;font-weight:normal;}}&:nth-of-type(2){width:60%;& div:last-of-type{span{color:#0000ff;font-size:12px;}}}}}.markdown-table{border:1px solid #b0afaf;font-size:14px;thead{text-align:left;font-weight:bold;}tr:nth-of-type(even){background-color:#f8f8f8;}td,th{border:1px solid #b0afaf;padding:10px;code{padding:1px!important;}}}"
14
- } : {
15
- name: "1ooil5x-styles",
16
- styles: "html,body{font-size:16px;background-color:#fcfcfd;}.docblock-source{border-radius:0!important;background-color:#ffffff!important;box-shadow:none!important;}.docblock-propstable{margin:16px 0!important;th{padding:6px 13px!important;border:1px solid rgba(0, 0, 0, 0.1)!important;color:black!important;border-radius:0!important;}tr{background-color:#fff!important;}tbody{box-shadow:none!important;}td{background-color:transparent!important;padding:6px 13px!important;border:0!important;border-top:1px solid rgba(0, 0, 0, 0.1)!important;&:first-of-type{span:first-of-type{border:1px solid #eee;padding:3px 5px;background-color:#f8f8f8;font-family:monospace;font-weight:normal;}}&:nth-of-type(2){width:60%;& div:last-of-type{span{color:#0000ff;font-size:12px;}}}}}.markdown-table{border:1px solid #b0afaf;font-size:14px;thead{text-align:left;font-weight:bold;}tr:nth-of-type(even){background-color:#f8f8f8;}td,th{border:1px solid #b0afaf;padding:10px;code{padding:1px!important;}}};label:styles;",
17
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0dsb2JhbFN0b3J5Ym9va1N0eWxlcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSW9CIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0dsb2JhbFN0b3J5Ym9va1N0eWxlcy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnXG5pbXBvcnQgeyBHbG9iYWwsIGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG5jb25zdCBHbG9iYWxTdG9yeWJvb2tTdHlsZXMgPSAoKSA9PiB7XG4gIGNvbnN0IHN0eWxlcyA9IGNzc2BcbiAgICBodG1sLFxuICAgIGJvZHkge1xuICAgICAgZm9udC1zaXplOiAxNnB4O1xuICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZjZmNmZDtcbiAgICB9XG4gICAgLyogc3R5bGVsaW50LWRpc2FibGUgKi9cbiAgICAuZG9jYmxvY2stc291cmNlIHtcbiAgICAgIGJvcmRlci1yYWRpdXM6IDAgIWltcG9ydGFudDtcbiAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmZmZmYgIWltcG9ydGFudDtcbiAgICAgIGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcbiAgICB9XG5cbiAgICAuZG9jYmxvY2stcHJvcHN0YWJsZSB7XG4gICAgICBtYXJnaW46IDE2cHggMCAhaW1wb3J0YW50O1xuICAgICAgdGgge1xuICAgICAgICBwYWRkaW5nOiA2cHggMTNweCAhaW1wb3J0YW50O1xuICAgICAgICBib3JkZXI6IDFweCBzb2xpZCByZ2JhKDAsIDAsIDAsIDAuMSkgIWltcG9ydGFudDtcbiAgICAgICAgY29sb3I6IGJsYWNrICFpbXBvcnRhbnQ7XG4gICAgICAgIGJvcmRlci1yYWRpdXM6IDAgIWltcG9ydGFudDtcbiAgICAgIH1cbiAgICAgIHRyIHtcbiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZiAhaW1wb3J0YW50O1xuICAgICAgfVxuICAgICAgLyogdHI6bnRoLW9mLXR5cGUoZXZlbikge1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZjhmOGY4ICFpbXBvcnRhbnQ7XG4gICAgICB9ICovXG4gICAgICB0Ym9keSB7XG4gICAgICAgIGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcbiAgICAgIH1cbiAgICAgIHRkIHtcbiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQgIWltcG9ydGFudDtcbiAgICAgICAgcGFkZGluZzogNnB4IDEzcHggIWltcG9ydGFudDtcbiAgICAgICAgYm9yZGVyOiAwICFpbXBvcnRhbnQ7XG4gICAgICAgIGJvcmRlci10b3A6IDFweCBzb2xpZCByZ2JhKDAsIDAsIDAsIDAuMSkgIWltcG9ydGFudDtcbiAgICAgICAgJjpmaXJzdC1vZi10eXBlIHtcbiAgICAgICAgICBzcGFuOmZpcnN0LW9mLXR5cGUge1xuICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQgI2VlZTtcbiAgICAgICAgICAgIHBhZGRpbmc6IDNweCA1cHg7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZjhmOGY4O1xuICAgICAgICAgICAgZm9udC1mYW1pbHk6IG1vbm9zcGFjZTtcbiAgICAgICAgICAgIGZvbnQtd2VpZ2h0OiBub3JtYWw7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgICY6bnRoLW9mLXR5cGUoMikge1xuICAgICAgICAgIHdpZHRoOiA2MCU7XG4gICAgICAgICAgJiBkaXY6bGFzdC1vZi10eXBlIHtcbiAgICAgICAgICAgIHNwYW4ge1xuICAgICAgICAgICAgICBjb2xvcjogIzAwMDBmZjtcbiAgICAgICAgICAgICAgZm9udC1zaXplOiAxMnB4O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIC8qIHN0eWxlbGludC1lbmFibGUgKi9cblxuICAgIC5tYXJrZG93bi10YWJsZSB7XG4gICAgICBib3JkZXI6IDFweCBzb2xpZCAjYjBhZmFmO1xuICAgICAgZm9udC1zaXplOiAxNHB4O1xuXG4gICAgICB0aGVhZCB7XG4gICAgICAgIHRleHQtYWxpZ246IGxlZnQ7XG4gICAgICAgIGZvbnQtd2VpZ2h0OiBib2xkO1xuICAgICAgfVxuXG4gICAgICB0cjpudGgtb2YtdHlwZShldmVuKSB7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmOGY4Zjg7XG4gICAgICB9XG5cbiAgICAgIHRkLFxuICAgICAgdGgge1xuICAgICAgICBib3JkZXI6IDFweCBzb2xpZCAjYjBhZmFmO1xuICAgICAgICBwYWRkaW5nOiAxMHB4O1xuICAgICAgICBjb2RlIHtcbiAgICAgICAgICAvKiBzdHlsZWxpbnQtZGlzYWJsZSAqL1xuICAgICAgICAgIHBhZGRpbmc6IDFweCAhaW1wb3J0YW50O1xuICAgICAgICAgIC8qIHN0eWxlbGludC1lbmFibGUgKi9cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgYFxuICByZXR1cm4gPEdsb2JhbCBkYXRhLXRlc3Q9XCJ0ZXN0LXRoaW5nXCIgc3R5bGVzPXtzdHlsZXN9IC8+XG59XG5cbmV4cG9ydCBkZWZhdWx0IEdsb2JhbFN0b3J5Ym9va1N0eWxlc1xuIl19 */",
18
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
19
- };
20
- const GlobalStorybookStyles = () => {
21
- const styles = _ref;
22
- return (0, _react2.jsx)(_react2.Global, {
23
- "data-test": "test-thing",
24
- styles: styles
25
- });
26
- };
27
- var _default = GlobalStorybookStyles;
28
- exports.default = _default;
@@ -1,8 +0,0 @@
1
- declare type MarkdownStoryProps = {
2
- file: string;
3
- content: Promise<{
4
- default: string;
5
- }>;
6
- };
7
- declare const MarkdownStory: ({ file, content }: MarkdownStoryProps) => JSX.Element;
8
- export default MarkdownStory;
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _ = require("./");
9
- var _markdown = require("../markdown");
10
- var _react2 = require("@emotion/react");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
15
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
16
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
17
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
- const MarkdownStory = ({
19
- file,
20
- content
21
- }) => {
22
- const _React$useState = _react.default.useState(true),
23
- _React$useState2 = _slicedToArray(_React$useState, 2),
24
- loading = _React$useState2[0],
25
- setLoading = _React$useState2[1];
26
- const _React$useState3 = _react.default.useState(''),
27
- _React$useState4 = _slicedToArray(_React$useState3, 2),
28
- markdown = _React$useState4[0],
29
- setMarkdown = _React$useState4[1];
30
- _react.default.useEffect(() => {
31
- void content.then(c => {
32
- setMarkdown(c.default);
33
- setLoading(false);
34
- });
35
- // eslint-disable-next-line react-hooks/exhaustive-deps
36
- }, []);
37
- return (0, _react2.jsx)(_.StoryPage, null, (0, _react2.jsx)(_.ExampleContainer, {
38
- headline: file
39
- }, (0, _react2.jsx)(_markdown.Markdown, null, loading ? `loading...` : markdown)));
40
- };
41
- var _default = MarkdownStory;
42
- exports.default = _default;
@@ -1 +0,0 @@
1
- export default function createDfdsTheme(title: string, logo: string): import("@storybook/theming").ThemeVars;
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = createDfdsTheme;
7
- var _theming = require("@storybook/theming");
8
- function createDfdsTheme(title, logo) {
9
- return (0, _theming.create)({
10
- base: 'light',
11
- brandTitle: title,
12
- brandImage: logo
13
- });
14
- }
@@ -1,40 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- export declare type PreviewProps = {
3
- children: React.ReactNode;
4
- gray?: boolean;
5
- height?: string;
6
- width?: string;
7
- className?: string;
8
- mdxSource?: string;
9
- sourcePath?: string;
10
- };
11
- export declare const Canvas: ({ gray, height, width, ...rest }: PreviewProps) => JSX.Element;
12
- /** @deprecated use Canvas */
13
- export declare const Preview: ({ gray, height, width, ...rest }: PreviewProps) => JSX.Element;
14
- export declare const Source: (props: any) => JSX.Element;
15
- export declare const LabWarningBanner: () => JSX.Element;
16
- export declare const DeprecatedBanner: ({ headline, children }: {
17
- headline: string;
18
- children: ReactNode;
19
- }) => JSX.Element;
20
- export declare const Meta: ({ title, ...rest }: any) => JSX.Element;
21
- export declare const DocsContainer: ({ children, ...rest }: any) => JSX.Element;
22
- export declare const ArgsTable: (props: any) => JSX.Element;
23
- /** @deprecated use ArgsTable */
24
- export declare const Props: (props: any) => JSX.Element;
25
- export declare const Story: (props: any) => JSX.Element;
26
- export declare const Description: (props: any) => JSX.Element;
27
- declare type StoryLinkProps = {
28
- kind: string;
29
- name: string;
30
- mode?: 'docs' | 'canvas';
31
- target?: '_self' | '_blank';
32
- children?: React.ReactNode;
33
- };
34
- export declare const StoryLink: ({ kind, name, mode, target, children }: StoryLinkProps) => JSX.Element | null;
35
- export declare const DownloadButton: ({ children, href, className, }: {
36
- children: React.ReactNode;
37
- href: string;
38
- className?: string | undefined;
39
- }) => JSX.Element;
40
- export {};