@redocly/theme 0.1.9 → 0.1.12

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 (259) hide show
  1. package/Button/index.d.ts +1 -1
  2. package/Button/index.js +1 -1
  3. package/CodeBlock/index.d.ts +1 -1
  4. package/CodeBlock/index.js +1 -1
  5. package/CopyButton/index.d.ts +2 -2
  6. package/CopyButton/index.js +2 -2
  7. package/Footer/Footer.d.ts +2 -2
  8. package/Footer/Footer.js +1 -1
  9. package/Footer/FooterColumn.js +6 -6
  10. package/Footer/FooterColumns.d.ts +3 -3
  11. package/Footer/FooterCopyright.d.ts +3 -3
  12. package/Footer/FooterCopyright.js +1 -1
  13. package/Footer/index.d.ts +4 -4
  14. package/Footer/index.js +4 -4
  15. package/Headings/index.d.ts +1 -1
  16. package/Headings/index.js +1 -1
  17. package/JsonViewer/index.d.ts +2 -2
  18. package/JsonViewer/index.js +2 -2
  19. package/Layout/index.d.ts +2 -2
  20. package/Layout/index.js +2 -2
  21. package/Markdown/Admonition.js +4 -4
  22. package/Markdown/CodeSample/index.d.ts +3 -3
  23. package/Markdown/CodeSample/index.js +3 -3
  24. package/Markdown/Heading.js +1 -1
  25. package/Markdown/MarkdownLayout.d.ts +2 -2
  26. package/Markdown/StyledMarkdown.js +2 -2
  27. package/Markdown/Tabs/index.d.ts +2 -2
  28. package/Markdown/Tabs/index.js +2 -2
  29. package/Markdown/index.d.ts +9 -9
  30. package/Markdown/index.js +9 -9
  31. package/Navbar/Navbar.d.ts +0 -1
  32. package/Navbar/Navbar.js +1 -1
  33. package/Navbar/NavbarItem.js +1 -1
  34. package/Navbar/NavbarMenu.js +1 -1
  35. package/Navbar/index.d.ts +3 -0
  36. package/Navbar/index.js +19 -0
  37. package/NavbarLogo/NavbarLogo.d.ts +6 -0
  38. package/{Logo/Logo.js → NavbarLogo/NavbarLogo.js} +8 -5
  39. package/NavbarLogo/index.d.ts +1 -0
  40. package/{Logo → NavbarLogo}/index.js +1 -1
  41. package/OperationBadge/index.d.ts +1 -1
  42. package/OperationBadge/index.js +1 -1
  43. package/PageNavigation/index.d.ts +3 -0
  44. package/PageNavigation/index.js +19 -0
  45. package/Panel/index.d.ts +8 -8
  46. package/Panel/index.js +8 -8
  47. package/REAMDE.md +1 -0
  48. package/SamplesPanelControls/index.d.ts +1 -1
  49. package/SamplesPanelControls/index.js +1 -1
  50. package/Search/Autocomplete.js +1 -1
  51. package/Search/ClearIcon.js +2 -2
  52. package/Search/Input.js +1 -1
  53. package/Search/Parameters.js +2 -2
  54. package/Search/Popover.js +1 -1
  55. package/Search/SearchIcon.js +2 -2
  56. package/Search/SearchItem.js +2 -2
  57. package/Search/index.d.ts +9 -9
  58. package/Search/index.js +9 -9
  59. package/Search/utils.js +1 -1
  60. package/Sidebar/ApiCallItem.js +1 -1
  61. package/Sidebar/BackButton.js +1 -1
  62. package/Sidebar/DrilldownMenuItem.js +3 -3
  63. package/Sidebar/Menu.js +1 -1
  64. package/Sidebar/MenuItemLabel.js +2 -2
  65. package/Sidebar/MenuLink.js +1 -1
  66. package/Sidebar/MobileSidebarButton.js +1 -1
  67. package/Sidebar/Sidebar.js +1 -1
  68. package/Sidebar/index.d.ts +19 -19
  69. package/Sidebar/index.js +19 -19
  70. package/Sidebar/types/index.d.ts +5 -5
  71. package/Sidebar/types/index.js +5 -5
  72. package/SidebarLogo/index.d.ts +1 -1
  73. package/SidebarLogo/index.js +1 -1
  74. package/SourceCode/index.d.ts +1 -1
  75. package/SourceCode/index.js +1 -1
  76. package/TableOfContent/TableOfContent.js +7 -8
  77. package/TableOfContent/index.d.ts +1 -1
  78. package/TableOfContent/index.js +1 -1
  79. package/Tooltip/index.d.ts +1 -1
  80. package/Tooltip/index.js +1 -1
  81. package/globalStyle.d.ts +1 -0
  82. package/globalStyle.js +25 -3
  83. package/hooks/index.d.ts +7 -7
  84. package/hooks/index.js +7 -7
  85. package/hooks/useActiveSectionId.d.ts +2 -2
  86. package/hooks/useActiveSectionId.js +1 -0
  87. package/icons/ShelfIcon/index.d.ts +2 -2
  88. package/icons/ShelfIcon/index.js +1 -1
  89. package/icons/index.d.ts +1 -1
  90. package/icons/index.js +1 -1
  91. package/mocks/Link.js +4 -1
  92. package/mocks/hooks/usePageData.js +4 -1
  93. package/package.json +1 -1
  94. package/src/Button/index.ts +1 -1
  95. package/src/CodeBlock/index.ts +1 -1
  96. package/src/CopyButton/index.ts +2 -2
  97. package/src/Footer/Footer.tsx +5 -8
  98. package/src/Footer/FooterColumn.tsx +7 -7
  99. package/src/Footer/FooterColumns.tsx +3 -1
  100. package/src/Footer/FooterCopyright.tsx +5 -3
  101. package/src/Footer/index.ts +4 -4
  102. package/src/Headings/index.ts +1 -1
  103. package/src/JsonViewer/index.ts +2 -2
  104. package/src/Layout/index.ts +2 -2
  105. package/src/Markdown/Admonition.tsx +15 -15
  106. package/src/Markdown/CodeSample/index.ts +3 -3
  107. package/src/Markdown/Heading.tsx +4 -1
  108. package/src/Markdown/MarkdownLayout.tsx +2 -2
  109. package/src/Markdown/StyledMarkdown.tsx +27 -27
  110. package/src/Markdown/Tabs/index.ts +2 -2
  111. package/src/Markdown/index.ts +9 -9
  112. package/src/Navbar/Navbar.tsx +2 -3
  113. package/src/Navbar/NavbarItem.tsx +1 -1
  114. package/src/Navbar/NavbarMenu.tsx +1 -1
  115. package/src/Navbar/index.ts +3 -0
  116. package/src/NavbarLogo/NavbarLogo.tsx +24 -0
  117. package/src/NavbarLogo/index.ts +1 -0
  118. package/src/OperationBadge/index.ts +1 -1
  119. package/src/PageNavigation/index.ts +3 -0
  120. package/src/Panel/index.ts +8 -8
  121. package/src/SamplesPanelControls/index.ts +1 -1
  122. package/src/Search/Autocomplete.tsx +1 -1
  123. package/src/Search/ClearIcon.tsx +12 -13
  124. package/src/Search/Input.tsx +7 -7
  125. package/src/Search/Parameters.tsx +2 -2
  126. package/src/Search/Popover.tsx +2 -2
  127. package/src/Search/SearchIcon.tsx +12 -13
  128. package/src/Search/SearchItem.tsx +2 -2
  129. package/src/Search/index.ts +9 -9
  130. package/src/Search/utils.tsx +1 -1
  131. package/src/Sidebar/ApiCallItem.tsx +1 -2
  132. package/src/Sidebar/BackButton.tsx +2 -2
  133. package/src/Sidebar/DrilldownMenuItem.tsx +4 -4
  134. package/src/Sidebar/Menu.tsx +1 -1
  135. package/src/Sidebar/MenuItemLabel.tsx +4 -4
  136. package/src/Sidebar/MenuLink.tsx +1 -1
  137. package/src/Sidebar/MobileSidebarButton.tsx +2 -2
  138. package/src/Sidebar/Sidebar.tsx +1 -1
  139. package/src/Sidebar/index.ts +19 -19
  140. package/src/Sidebar/types/index.ts +5 -5
  141. package/src/SidebarLogo/index.ts +1 -1
  142. package/src/SourceCode/index.ts +1 -1
  143. package/src/TableOfContent/TableOfContent.tsx +12 -10
  144. package/src/TableOfContent/index.ts +1 -1
  145. package/src/Tooltip/index.ts +1 -1
  146. package/src/globalStyle.ts +793 -441
  147. package/src/hooks/index.ts +7 -7
  148. package/src/hooks/useActiveSectionId.ts +3 -3
  149. package/src/icons/ShelfIcon/index.ts +2 -2
  150. package/src/icons/index.ts +1 -1
  151. package/src/mocks/Link.tsx +5 -2
  152. package/src/mocks/hooks/usePageData.ts +4 -1
  153. package/src/types/portal/index.d.ts +0 -1
  154. package/src/types/portal/src/client/app/Sidebar/types.d.ts +32 -41
  155. package/src/types/portal/src/client/app/media-css.d.ts +4 -4
  156. package/src/types/portal/src/client/styling/default.d.ts +585 -391
  157. package/src/types/portal/src/client/styling/index.d.ts +2 -6
  158. package/src/types/portal/src/server/constants.d.ts +5 -9
  159. package/src/types/portal/src/server/plugins/markdown/types.d.ts +14 -19
  160. package/src/types/portal/src/server/plugins/portal-config/types.d.ts +12 -12
  161. package/src/types/portal/src/server/plugins/types.d.ts +55 -0
  162. package/src/types/portal/src/server/store.d.ts +49 -97
  163. package/src/types/portal/src/server/utils/async.d.ts +1 -5
  164. package/src/types/portal/src/server/utils/content-provider.d.ts +51 -0
  165. package/src/types/portal/src/server/utils/index.d.ts +1 -1
  166. package/src/types/portal/src/server/utils/paths.d.ts +10 -13
  167. package/src/types/portal/src/server/utils/reporter/formatter.d.ts +8 -8
  168. package/src/types/portal/src/server/utils/reporter/reporter.d.ts +15 -15
  169. package/src/types/portal/src/server/version-store.d.ts +35 -0
  170. package/src/types/portal/src/shared/constants.d.ts +6 -6
  171. package/src/types/portal/src/shared/types.d.ts +97 -58
  172. package/src/types/portal/src/shared/urls.d.ts +2 -1
  173. package/src/ui/AlertIcon.tsx +8 -7
  174. package/src/ui/Background.tsx +3 -3
  175. package/src/ui/Dropdown.tsx +4 -4
  176. package/src/ui/Jumbotron.tsx +3 -3
  177. package/src/ui/Tiles/TileHeader.ts +1 -1
  178. package/src/ui/Tiles/TileText.tsx +2 -2
  179. package/src/ui/Tiles/index.ts +4 -4
  180. package/src/ui/Typography.tsx +27 -27
  181. package/src/ui/UniversalLink.tsx +3 -8
  182. package/src/utils/isUrl.ts +4 -4
  183. package/ui/AlertIcon.d.ts +3 -2
  184. package/ui/AlertIcon.js +2 -2
  185. package/ui/Background.js +1 -1
  186. package/ui/Dropdown.js +3 -3
  187. package/ui/Jumbotron.js +3 -3
  188. package/ui/Tiles/TileHeader.js +1 -1
  189. package/ui/Tiles/TileText.js +1 -1
  190. package/ui/Tiles/index.d.ts +4 -4
  191. package/ui/Tiles/index.js +4 -4
  192. package/ui/Typography.js +23 -23
  193. package/ui/UniversalLink.js +1 -5
  194. package/utils/isUrl.d.ts +2 -2
  195. package/utils/isUrl.js +4 -4
  196. package/Logo/Logo.d.ts +0 -5
  197. package/Logo/index.d.ts +0 -1
  198. package/src/Button/Button.stories.tsx +0 -74
  199. package/src/Button/__tests__/Button.test.tsx +0 -42
  200. package/src/Button/__tests__/__snapshots__/Button.test.tsx.snap +0 -274
  201. package/src/CodeBlock/__tests__/CodeBlock.test.tsx +0 -12
  202. package/src/CodeBlock/__tests__/__snapshots__/CodeBlock.test.tsx.snap +0 -140
  203. package/src/CopyButton/CopyButton.stories.tsx +0 -18
  204. package/src/CopyButton/__tests__/CopyButton.test.tsx +0 -35
  205. package/src/CopyButton/__tests__/CopyButtonWrapper.test.tsx +0 -17
  206. package/src/CopyButton/__tests__/__snapshots__/CopyButton.test.tsx.snap +0 -55
  207. package/src/CopyButton/__tests__/__snapshots__/CopyButtonWrapper.test.tsx.snap +0 -46
  208. package/src/Headings/Headings.stories.tsx +0 -36
  209. package/src/Headings/__tests__/Headings.test.tsx +0 -24
  210. package/src/Headings/__tests__/__snapshots__/Headings.test.tsx.snap +0 -57
  211. package/src/Introduction.stories.mdx +0 -7
  212. package/src/JsonViewer/JsonViewer.stories.tsx +0 -57
  213. package/src/JsonViewer/__tests__/JsonViewer.test.tsx +0 -83
  214. package/src/JsonViewer/__tests__/__snapshots__/JsonViewer.test.tsx.snap +0 -2728
  215. package/src/Logo/Logo.tsx +0 -17
  216. package/src/Logo/index.ts +0 -1
  217. package/src/Navbar/Navbar.stories.tsx +0 -28
  218. package/src/OperationBadge/OperationBadge.stories.tsx +0 -35
  219. package/src/OperationBadge/__tests__/OperationBadge.test.tsx +0 -59
  220. package/src/OperationBadge/__tests__/__snapshots__/OperationBadge.test.tsx.snap +0 -651
  221. package/src/Panel/CodePanel.stories.tsx +0 -26
  222. package/src/Panel/ContentPanel.stories.tsx +0 -26
  223. package/src/Panel/Panel.stories.tsx +0 -56
  224. package/src/Panel/__tests__/CodePanel.test.tsx +0 -26
  225. package/src/Panel/__tests__/ContentPanel.test.tsx +0 -26
  226. package/src/Panel/__tests__/Panel.test.tsx +0 -53
  227. package/src/Panel/__tests__/__snapshots__/CodePanel.test.tsx.snap +0 -258
  228. package/src/Panel/__tests__/__snapshots__/ContentPanel.test.tsx.snap +0 -278
  229. package/src/Panel/__tests__/__snapshots__/Panel.test.tsx.snap +0 -398
  230. package/src/SamplesPanelControls/SamplesControlButton.stories.tsx +0 -18
  231. package/src/SamplesPanelControls/__tests__/SamplesPanelControls.test.tsx +0 -36
  232. package/src/SamplesPanelControls/__tests__/__snapshots__/SamplesPanelControls.test.tsx.snap +0 -228
  233. package/src/SidebarLogo/SidebarLogo.stories.tsx +0 -21
  234. package/src/SidebarLogo/__tests__/SidebarLogo.test.tsx +0 -32
  235. package/src/SidebarLogo/__tests__/__snapshots__/SidebarLogo.test.tsx.snap +0 -62
  236. package/src/SourceCode/SourceCode.stories.tsx +0 -29
  237. package/src/SourceCode/__tests__/SourceCode.test.tsx +0 -48
  238. package/src/SourceCode/__tests__/__snapshots__/SourceCode.test.tsx.snap +0 -786
  239. package/src/TableOfContent/TableOfContent.stories.tsx +0 -39
  240. package/src/Tooltip/Tooltip.stories.tsx +0 -27
  241. package/src/Tooltip/__tests__/Tooltip.test.tsx +0 -41
  242. package/src/Tooltip/__tests__/__snapshots__/Tooltip.test.tsx.snap +0 -83
  243. package/src/icons/ShelfIcon/ShelfIcon.stories.tsx +0 -36
  244. package/src/icons/ShelfIcon/__tests__/ShelfIcon.test.tsx +0 -54
  245. package/src/icons/ShelfIcon/__tests__/__snapshots__/ShelfIcon.test.tsx.snap +0 -235
  246. package/src/types/portal/src/server/plugins/nav-utils.d.ts +0 -19
  247. package/src/types/portal/src/server/plugins/sidebars/index.d.ts +0 -16
  248. package/src/types/portal/src/server/plugins/versions/index.d.ts +0 -15
  249. package/src/types/portal/src/server/plugins/versions/types.d.ts +0 -23
  250. package/src/types/portal/src/server/plugins/versions/utils.d.ts +0 -10
  251. package/src/types/portal/src/server/utils/watcher.d.ts +0 -16
  252. package/src/utils/__tests__/ClipboardService.test.ts +0 -24
  253. package/src/utils/__tests__/__snapshots__/highlight.test.ts.snap +0 -5
  254. package/src/utils/__tests__/__snapshots__/jsonToHtml.test.ts.snap +0 -5
  255. package/src/utils/__tests__/css-variables.test.ts +0 -20
  256. package/src/utils/__tests__/highlight.test.ts +0 -51
  257. package/src/utils/__tests__/jsonToHtml.test.ts +0 -40
  258. package/src/utils/__tests__/media-css.test.ts +0 -20
  259. package/src/utils/__tests__/theme-helpers.test.ts +0 -25
package/ui/Typography.js CHANGED
@@ -33,33 +33,33 @@ var styled_system_1 = require("styled-system");
33
33
  exports.typographyTokens = {
34
34
  typography: {
35
35
  fontSize: 'var(--font-size-base)',
36
- fontFamily: 'var(--font-family-h)',
37
- lineHeight: 'var(--line-height-m)',
36
+ fontFamily: 'var(--h-font-family)',
37
+ lineHeight: 'var(--line-height-base)',
38
38
  },
39
39
  heading1: {
40
40
  fontSize: 'var(--h1-font-size)',
41
- fontFamily: 'var(--font-family-h)',
42
- fontWeight: 'var(--font-weight-bold)',
41
+ fontFamily: 'var(--h-font-family)',
42
+ fontWeight: 'var(--h1-font-weight, var(--h-font-weight))',
43
43
  lineHeight: 'var(--h1-line-height)',
44
- color: 'var(--color-text-main)',
44
+ color: 'var(--h-color)',
45
45
  marginTop: 'var(--h1-margin-top)',
46
46
  marginBottom: 'var(--h1-margin-bottom)',
47
47
  },
48
48
  heading2: {
49
49
  fontSize: 'var(--h2-font-size)',
50
- fontFamily: 'var(--font-family-h)',
51
- fontWeight: 'var(--font-weight-bold)',
50
+ fontFamily: 'var(--h-font-family)',
51
+ fontWeight: 'var(--h2-font-weight, var(--h-font-weight))',
52
52
  lineHeight: 'var(--h2-line-height)',
53
- color: 'var(--color-text-main)',
53
+ color: 'var(--h-color)',
54
54
  marginTop: 'var(--h2-margin-top)',
55
55
  marginBottom: 'var(--h2-margin-bottom)',
56
56
  },
57
57
  heading3: {
58
58
  fontSize: 'var(--h3-font-size)',
59
- fontFamily: 'var(--font-family-h)',
60
- fontWeight: 'var(--font-weight-bold)',
59
+ fontFamily: 'var(--h-font-family)',
60
+ fontWeight: 'var(--h3-font-weight, var(--h-font-weight))',
61
61
  lineHeight: 'var(--h3-line-height)',
62
- color: 'var(--color-text-main)',
62
+ color: 'var(--h-color)',
63
63
  marginTop: 'var(--h3-margin-top)',
64
64
  marginBottom: 'var(--h3-margin-bottom)',
65
65
  },
@@ -67,19 +67,19 @@ exports.typographyTokens = {
67
67
  heading5: {},
68
68
  heading6: {},
69
69
  blockquote: {
70
- color: 'var(--color-text-main)',
70
+ color: 'var(--color-content)',
71
71
  },
72
72
  alert: {
73
- fontSize: 'var(--alert-font-size)',
74
- fontWeight: 'var(--alert-font-weight)',
75
- lineHeight: 'var(--alert-line-height)',
76
- marginTop: 'var(--alert-margin-vertical)',
77
- marginBottom: 'var(-alert-margin-vartical)',
73
+ fontSize: 'var(--admonition-font-size)',
74
+ fontWeight: 'var(--admonition-font-weight)',
75
+ lineHeight: 'var(--admonition-line-height)',
76
+ marginTop: 'var(--admonition-margin-vertical)',
77
+ marginBottom: 'var(--admonition-margin-vertical)',
78
78
  heading: {
79
- fontSize: 'var(--alert-heading-font-size)',
80
- fontWeight: 'var(--alert-heading-font-weight)',
81
- lineHeight: 'var(--alert-line-height)',
82
- transform: 'var(--alert-heading-transform)',
79
+ fontSize: 'var(--admonition-heading-font-size)',
80
+ fontWeight: 'var(--admonition-heading-font-weight)',
81
+ lineHeight: 'var(--admonition-line-height)',
82
+ transform: 'var(--admonition-heading-transform)',
83
83
  },
84
84
  },
85
85
  };
@@ -119,10 +119,10 @@ exports.H3 = styled_components_1.default.h1.attrs(function () { return ({
119
119
  var mb = _a.mb;
120
120
  return mb && "margin-bottom: ".concat(mb, ";");
121
121
  }, styled_system_1.color, styled_system_1.typography);
122
- exports.SectionHeader = styled_components_1.default.h2(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: var(--color-primary-main);\n font-size: 1.75em;\n font-weight: var(--font-weight-light);\n text-align: center;\n margin: 2.65em 0;\n padding: 0px 20px;\n font-family: var(--font-family-h);\n"], ["\n color: var(--color-primary-main);\n font-size: 1.75em;\n font-weight: var(--font-weight-light);\n text-align: center;\n margin: 2.65em 0;\n padding: 0px 20px;\n font-family: var(--font-family-h);\n"])));
122
+ exports.SectionHeader = styled_components_1.default.h2(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: var(--h-color);\n font-size: 1.75em;\n font-weight: var(--font-weight-regular);\n text-align: center;\n margin: 2.65em 0;\n padding: 0 20px;\n font-family: var(--h-font-family);\n"], ["\n color: var(--h-color);\n font-size: 1.75em;\n font-weight: var(--font-weight-regular);\n text-align: center;\n margin: 2.65em 0;\n padding: 0 20px;\n font-family: var(--h-font-family);\n"])));
123
123
  exports.Typography = styled_components_1.default.p.attrs(function () { return ({
124
124
  'data-component-name': 'ui/Typography/Typography',
125
- }); })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", ";\n color: var(--color-text-main);\n ", "\n margin-top: ", ";\n margin-bottom: ", ";\n ", "\n"], ["\n ", ";\n color: var(--color-text-main);\n ", "\n margin-top: ", ";\n margin-bottom: ", ";\n ", "\n"])), typography(exports.typographyTokens.typography), styled_system_1.color, function (_a) {
125
+ }); })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", ";\n color: var(--color-content);\n ", ";\n margin-top: ", ";\n margin-bottom: ", ";\n ", "\n"], ["\n ", ";\n color: var(--color-content);\n ", ";\n margin-top: ", ";\n margin-bottom: ", ";\n ", "\n"])), typography(exports.typographyTokens.typography), styled_system_1.color, function (_a) {
126
126
  var mt = _a.mt;
127
127
  return mt || '1em';
128
128
  }, function (_a) {
@@ -23,12 +23,8 @@ var jsx_runtime_1 = require("react/jsx-runtime");
23
23
  var react_router_dom_1 = require("react-router-dom");
24
24
  var styled_components_1 = __importDefault(require("styled-components"));
25
25
  var isUrl_1 = require("../utils/isUrl");
26
- var replaceHashInColor_1 = require("../utils/replaceHashInColor");
27
26
  var Link_1 = require("../mocks/Link");
28
- var StyledExternalLink = styled_components_1.default.a(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &.external-url {\n position: relative;\n\n :after {\n content: '';\n display: inline-block;\n position: absolute;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' x='0' y='0' viewBox='0 0 100 125' enable-background='new 0 0 100 100' xml:space='preserve'%3E%3Cpath fill='", "' d='M-408.2-318.5 98.6 4.8c0-0.1 0-0.2-0.1-0.3 0-0.1-0.1-0.2-0.1-0.3 0-0.1 0-0.1-0.1-0.2 0 0 0-0.1 0-0.1 0-0.1-0.1-0.2-0.2-0.3 0-0.1-0.1-0.2-0.2-0.3 -0.1-0.1-0.1-0.2-0.2-0.3C97.7 2.9 97.6 2.8 97.5 2.7c-0.1-0.1-0.2-0.2-0.3-0.3 -0.1-0.1-0.1-0.1-0.2-0.2 -0.1-0.1-0.2-0.2-0.3-0.2 -0.1-0.1-0.2-0.1-0.2-0.2 -0.1-0.1-0.2-0.1-0.3-0.2 -0.1 0-0.2-0.1-0.3-0.1 0 0-0.1 0-0.1-0.1 -0.1 0-0.2 0-0.2-0.1 -0.1 0-0.2-0.1-0.3-0.1 -0.1 0-0.2-0.1-0.4-0.1 -0.1 0-0.2 0-0.3 0 -0.1 0-0.3 0-0.4 0 -0.1 0-0.1 0-0.2 0L63.8 1.3c-2.5 0-4.6 2.1-4.6 4.6 0 2.5 2.1 4.6 4.6 4.5l19.3-0.1 -29.8 30.2c-1.1 1.1-1.5 2.7-1.2 4.1 0.2 0.9 0.6 1.7 1.3 2.4 0.9 0.9 2.1 1.3 3.2 1.3 1.2 0 2.3-0.5 3.2-1.4l0 0 29.8-30.2 0.1 19.3c0 2.5 2.1 4.6 4.6 4.5 1.3 0 2.4-0.5 3.2-1.4 0.8-0.8 1.3-2 1.3-3.2L98.7 5.7c0-0.1 0-0.1 0-0.2 0-0.1 0-0.2 0-0.4C98.6 5 98.6 4.9 98.6 4.8zM6.5 83.3c0 5.7 4.6 10.4 10.4 10.4l55.6 0.1c5.7 0 10.4-4.6 10.4-10.4l-0.1-40.8h6.1v40.8c0 9-7.3 16.3-16.3 16.3l-56.4-0.1c-8.6 0-15.6-7-15.6-15.6L0.6 27.8c0-9 7.3-16.3 16.3-16.3l41.1-0.1v6.1L17 17.5c-5.7 0-10.4 4.6-10.4 10.4L6.5 83.3z'/%3E%3C/svg%3E\");\n width: 10px;\n height: 10px;\n background-repeat: no-repeat;\n top: 50%;\n right: -15px;\n transform: translateY(-50%);\n }\n }\n"], ["\n &.external-url {\n position: relative;\n\n :after {\n content: '';\n display: inline-block;\n position: absolute;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' x='0' y='0' viewBox='0 0 100 125' enable-background='new 0 0 100 100' xml:space='preserve'%3E%3Cpath fill='", "' d='M-408.2-318.5 98.6 4.8c0-0.1 0-0.2-0.1-0.3 0-0.1-0.1-0.2-0.1-0.3 0-0.1 0-0.1-0.1-0.2 0 0 0-0.1 0-0.1 0-0.1-0.1-0.2-0.2-0.3 0-0.1-0.1-0.2-0.2-0.3 -0.1-0.1-0.1-0.2-0.2-0.3C97.7 2.9 97.6 2.8 97.5 2.7c-0.1-0.1-0.2-0.2-0.3-0.3 -0.1-0.1-0.1-0.1-0.2-0.2 -0.1-0.1-0.2-0.2-0.3-0.2 -0.1-0.1-0.2-0.1-0.2-0.2 -0.1-0.1-0.2-0.1-0.3-0.2 -0.1 0-0.2-0.1-0.3-0.1 0 0-0.1 0-0.1-0.1 -0.1 0-0.2 0-0.2-0.1 -0.1 0-0.2-0.1-0.3-0.1 -0.1 0-0.2-0.1-0.4-0.1 -0.1 0-0.2 0-0.3 0 -0.1 0-0.3 0-0.4 0 -0.1 0-0.1 0-0.2 0L63.8 1.3c-2.5 0-4.6 2.1-4.6 4.6 0 2.5 2.1 4.6 4.6 4.5l19.3-0.1 -29.8 30.2c-1.1 1.1-1.5 2.7-1.2 4.1 0.2 0.9 0.6 1.7 1.3 2.4 0.9 0.9 2.1 1.3 3.2 1.3 1.2 0 2.3-0.5 3.2-1.4l0 0 29.8-30.2 0.1 19.3c0 2.5 2.1 4.6 4.6 4.5 1.3 0 2.4-0.5 3.2-1.4 0.8-0.8 1.3-2 1.3-3.2L98.7 5.7c0-0.1 0-0.1 0-0.2 0-0.1 0-0.2 0-0.4C98.6 5 98.6 4.9 98.6 4.8zM6.5 83.3c0 5.7 4.6 10.4 10.4 10.4l55.6 0.1c5.7 0 10.4-4.6 10.4-10.4l-0.1-40.8h6.1v40.8c0 9-7.3 16.3-16.3 16.3l-56.4-0.1c-8.6 0-15.6-7-15.6-15.6L0.6 27.8c0-9 7.3-16.3 16.3-16.3l41.1-0.1v6.1L17 17.5c-5.7 0-10.4 4.6-10.4 10.4L6.5 83.3z'/%3E%3C/svg%3E\");\n width: 10px;\n height: 10px;\n background-repeat: no-repeat;\n top: 50%;\n right: -15px;\n transform: translateY(-50%);\n }\n }\n"])), function (_a) {
29
- var theme = _a.theme;
30
- return (0, replaceHashInColor_1.replaceHashInColor)(theme.colors.text.primary);
31
- });
27
+ var StyledExternalLink = styled_components_1.default.a(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &.external-url {\n position: relative;\n\n :after {\n content: '';\n display: inline-block;\n position: absolute;\n background: var(--color-content);\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' x='0' y='0' viewBox='0 0 100 125' enable-background='new 0 0 100 100' xml:space='preserve'%3E%3Cpath d='M-408.2-318.5 98.6 4.8c0-0.1 0-0.2-0.1-0.3 0-0.1-0.1-0.2-0.1-0.3 0-0.1 0-0.1-0.1-0.2 0 0 0-0.1 0-0.1 0-0.1-0.1-0.2-0.2-0.3 0-0.1-0.1-0.2-0.2-0.3 -0.1-0.1-0.1-0.2-0.2-0.3C97.7 2.9 97.6 2.8 97.5 2.7c-0.1-0.1-0.2-0.2-0.3-0.3 -0.1-0.1-0.1-0.1-0.2-0.2 -0.1-0.1-0.2-0.2-0.3-0.2 -0.1-0.1-0.2-0.1-0.2-0.2 -0.1-0.1-0.2-0.1-0.3-0.2 -0.1 0-0.2-0.1-0.3-0.1 0 0-0.1 0-0.1-0.1 -0.1 0-0.2 0-0.2-0.1 -0.1 0-0.2-0.1-0.3-0.1 -0.1 0-0.2-0.1-0.4-0.1 -0.1 0-0.2 0-0.3 0 -0.1 0-0.3 0-0.4 0 -0.1 0-0.1 0-0.2 0L63.8 1.3c-2.5 0-4.6 2.1-4.6 4.6 0 2.5 2.1 4.6 4.6 4.5l19.3-0.1 -29.8 30.2c-1.1 1.1-1.5 2.7-1.2 4.1 0.2 0.9 0.6 1.7 1.3 2.4 0.9 0.9 2.1 1.3 3.2 1.3 1.2 0 2.3-0.5 3.2-1.4l0 0 29.8-30.2 0.1 19.3c0 2.5 2.1 4.6 4.6 4.5 1.3 0 2.4-0.5 3.2-1.4 0.8-0.8 1.3-2 1.3-3.2L98.7 5.7c0-0.1 0-0.1 0-0.2 0-0.1 0-0.2 0-0.4C98.6 5 98.6 4.9 98.6 4.8zM6.5 83.3c0 5.7 4.6 10.4 10.4 10.4l55.6 0.1c5.7 0 10.4-4.6 10.4-10.4l-0.1-40.8h6.1v40.8c0 9-7.3 16.3-16.3 16.3l-56.4-0.1c-8.6 0-15.6-7-15.6-15.6L0.6 27.8c0-9 7.3-16.3 16.3-16.3l41.1-0.1v6.1L17 17.5c-5.7 0-10.4 4.6-10.4 10.4L6.5 83.3z'/%3E%3C/svg%3E\");\n mask-repeat: no-repeat;\n width: 10px;\n height: 10px;\n top: 50%;\n right: -15px;\n transform: translateY(-50%);\n }\n }\n"], ["\n &.external-url {\n position: relative;\n\n :after {\n content: '';\n display: inline-block;\n position: absolute;\n background: var(--color-content);\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' x='0' y='0' viewBox='0 0 100 125' enable-background='new 0 0 100 100' xml:space='preserve'%3E%3Cpath d='M-408.2-318.5 98.6 4.8c0-0.1 0-0.2-0.1-0.3 0-0.1-0.1-0.2-0.1-0.3 0-0.1 0-0.1-0.1-0.2 0 0 0-0.1 0-0.1 0-0.1-0.1-0.2-0.2-0.3 0-0.1-0.1-0.2-0.2-0.3 -0.1-0.1-0.1-0.2-0.2-0.3C97.7 2.9 97.6 2.8 97.5 2.7c-0.1-0.1-0.2-0.2-0.3-0.3 -0.1-0.1-0.1-0.1-0.2-0.2 -0.1-0.1-0.2-0.2-0.3-0.2 -0.1-0.1-0.2-0.1-0.2-0.2 -0.1-0.1-0.2-0.1-0.3-0.2 -0.1 0-0.2-0.1-0.3-0.1 0 0-0.1 0-0.1-0.1 -0.1 0-0.2 0-0.2-0.1 -0.1 0-0.2-0.1-0.3-0.1 -0.1 0-0.2-0.1-0.4-0.1 -0.1 0-0.2 0-0.3 0 -0.1 0-0.3 0-0.4 0 -0.1 0-0.1 0-0.2 0L63.8 1.3c-2.5 0-4.6 2.1-4.6 4.6 0 2.5 2.1 4.6 4.6 4.5l19.3-0.1 -29.8 30.2c-1.1 1.1-1.5 2.7-1.2 4.1 0.2 0.9 0.6 1.7 1.3 2.4 0.9 0.9 2.1 1.3 3.2 1.3 1.2 0 2.3-0.5 3.2-1.4l0 0 29.8-30.2 0.1 19.3c0 2.5 2.1 4.6 4.6 4.5 1.3 0 2.4-0.5 3.2-1.4 0.8-0.8 1.3-2 1.3-3.2L98.7 5.7c0-0.1 0-0.1 0-0.2 0-0.1 0-0.2 0-0.4C98.6 5 98.6 4.9 98.6 4.8zM6.5 83.3c0 5.7 4.6 10.4 10.4 10.4l55.6 0.1c5.7 0 10.4-4.6 10.4-10.4l-0.1-40.8h6.1v40.8c0 9-7.3 16.3-16.3 16.3l-56.4-0.1c-8.6 0-15.6-7-15.6-15.6L0.6 27.8c0-9 7.3-16.3 16.3-16.3l41.1-0.1v6.1L17 17.5c-5.7 0-10.4 4.6-10.4 10.4L6.5 83.3z'/%3E%3C/svg%3E\");\n mask-repeat: no-repeat;\n width: 10px;\n height: 10px;\n top: 50%;\n right: -15px;\n transform: translateY(-50%);\n }\n }\n"])));
32
28
  // TODO: We're using our own Link component so probably filtering is not necessary here.
33
29
  // filter out unnecessary props
34
30
  var propsList = [
package/utils/isUrl.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * Loosely validate a URL `string`.
8
8
  *
9
- * @param {String} string
9
+ * @param {String} input
10
10
  * @return {Boolean}
11
11
  */
12
- export declare function isUrl(string: string): boolean;
12
+ export declare function isUrl(input: unknown): boolean;
package/utils/isUrl.js CHANGED
@@ -12,14 +12,14 @@ var nonLocalhostDomainRE = /^[^\s.]+\.\S{2,}$/;
12
12
  /**
13
13
  * Loosely validate a URL `string`.
14
14
  *
15
- * @param {String} string
15
+ * @param {String} input
16
16
  * @return {Boolean}
17
17
  */
18
- function isUrl(string) {
19
- if (typeof string !== 'string') {
18
+ function isUrl(input) {
19
+ if (typeof input !== 'string') {
20
20
  return false;
21
21
  }
22
- var match = string.match(protocolAndDomainRE);
22
+ var match = input.match(protocolAndDomainRE);
23
23
  if (!match) {
24
24
  return false;
25
25
  }
package/Logo/Logo.d.ts DELETED
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { LogoConfig } from '@theme/types/portal';
3
- export declare function Logo({ logo }: {
4
- logo: LogoConfig;
5
- }): JSX.Element | null;
package/Logo/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './Logo';
@@ -1,74 +0,0 @@
1
- import React from 'react';
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
-
4
- import { Button } from '@theme/Button';
5
-
6
- export default {
7
- title: 'Button',
8
- component: Button,
9
- argTypes: {
10
- size: {
11
- control: 'radio',
12
- options: ['small', 'medium', 'large', 'xlarge'],
13
- },
14
- color: {
15
- control: 'radio',
16
- options: ['primary', 'secondary', 'default'],
17
- },
18
- },
19
- } as ComponentMeta<typeof Button>;
20
-
21
- const Template: ComponentStory<typeof Button> = (args) => <Button {...args}>Click</Button>;
22
-
23
- export const Primary = Template.bind({});
24
- Primary.args = {
25
- color: 'primary',
26
- disabled: false,
27
- blinking: false,
28
- fullWidth: false,
29
- variant: 'contained',
30
- size: 'small',
31
- extraClass: 'test',
32
- };
33
-
34
- export const Secondary = Template.bind({});
35
- Secondary.args = {
36
- color: 'secondary',
37
- disabled: false,
38
- blinking: false,
39
- fullWidth: false,
40
- variant: 'contained',
41
- size: 'small',
42
- extraClass: 'test',
43
- };
44
-
45
- export const Outlined = Template.bind({});
46
- Outlined.args = {
47
- color: 'primary',
48
- disabled: false,
49
- blinking: false,
50
- fullWidth: false,
51
- variant: 'outlined',
52
- size: 'small',
53
- extraClass: 'test',
54
- };
55
-
56
- export const Disabled = Template.bind({});
57
- Disabled.args = {
58
- color: 'secondary',
59
- disabled: true,
60
- blinking: false,
61
- fullWidth: false,
62
- variant: 'contained',
63
- size: 'small',
64
- };
65
-
66
- export const Large = Template.bind({});
67
- Large.args = {
68
- color: 'default',
69
- disabled: false,
70
- blinking: false,
71
- fullWidth: false,
72
- variant: 'contained',
73
- size: 'large',
74
- };
@@ -1,42 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import { Button } from '@theme/Button';
5
-
6
- describe('Button', () => {
7
- it('renders', () => {
8
- const { container } = render(<Button>Test</Button>);
9
-
10
- expect(container.firstChild).toMatchSnapshot();
11
- });
12
-
13
- it('renders blinking', () => {
14
- const { container } = render(<Button blinking>Test</Button>);
15
-
16
- expect(container.firstChild).toMatchSnapshot();
17
- });
18
-
19
- it('renders with extra class', () => {
20
- const { container } = render(<Button extraClass="quick-fox">Test</Button>);
21
-
22
- expect(container.firstChild).toHaveClass('quick-fox');
23
- });
24
-
25
- it('renders disabled', () => {
26
- const { container } = render(<Button disabled>Test</Button>);
27
-
28
- expect(container.firstChild).toMatchSnapshot();
29
- });
30
-
31
- it('renders full width', () => {
32
- const { container } = render(<Button fullWidth>Test</Button>);
33
-
34
- expect(container.firstChild).toMatchSnapshot();
35
- });
36
-
37
- it('renders outlined', () => {
38
- const { container } = render(<Button variant="outlined">Test</Button>);
39
-
40
- expect(container.firstChild).toMatchSnapshot();
41
- });
42
- });
@@ -1,274 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Button renders 1`] = `
4
- .c1 {
5
- -webkit-text-decoration: none;
6
- text-decoration: none;
7
- text-align: center;
8
- width: auto;
9
- outline: none;
10
- border: none;
11
- border-radius: var(--button-border-radius);
12
- font-weight: var(--button-font-weight);
13
- font-size: 14px;
14
- padding: 2px 20px;
15
- cursor: pointer;
16
- -webkit-transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
17
- transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
18
- line-height: 1;
19
- font-family: var(--button-font-family);
20
- box-shadow: var(--button-box-shadow);
21
- color: var(--button-color);
22
- background-color: var(--button-background-color);
23
- font-size: var(--button-medium-font-size);
24
- padding: var(--button-medium-padding);
25
- min-width: var(--button-medium-min-width);
26
- }
27
-
28
- .c1:hover {
29
- box-shadow: var(--button-active-box-shadow);
30
- }
31
-
32
- .c1:active {
33
- box-shadow: var(--button-active-box-shadow);
34
- }
35
-
36
- .c1:hover {
37
- background-color: var(--button-hover-background-color);
38
- }
39
-
40
- .c1:active {
41
- background-color: var(--button-active-background-color);
42
- }
43
-
44
- .c0 + .c0 {
45
- margin-left: 0.85em;
46
- }
47
-
48
- <button
49
- class="c0 c1 button-color-default"
50
- >
51
- Test
52
- </button>
53
- `;
54
-
55
- exports[`Button renders blinking 1`] = `
56
- .c1 {
57
- -webkit-text-decoration: none;
58
- text-decoration: none;
59
- text-align: center;
60
- width: auto;
61
- outline: none;
62
- border: none;
63
- border-radius: var(--button-border-radius);
64
- font-weight: var(--button-font-weight);
65
- font-size: 14px;
66
- padding: 2px 20px;
67
- cursor: pointer;
68
- -webkit-transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
69
- transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
70
- line-height: 1;
71
- font-family: var(--button-font-family);
72
- box-shadow: var(--button-box-shadow);
73
- color: var(--button-color);
74
- background-color: var(--button-background-color);
75
- font-size: var(--button-medium-font-size);
76
- padding: var(--button-medium-padding);
77
- min-width: var(--button-medium-min-width);
78
- pointer-events: none;
79
- -webkit-animation: hiqtTO 1.2s infinite;
80
- animation: hiqtTO 1.2s infinite;
81
- }
82
-
83
- .c1:hover {
84
- box-shadow: var(--button-active-box-shadow);
85
- }
86
-
87
- .c1:active {
88
- box-shadow: var(--button-active-box-shadow);
89
- }
90
-
91
- .c1:hover {
92
- background-color: var(--button-hover-background-color);
93
- }
94
-
95
- .c1:active {
96
- background-color: var(--button-active-background-color);
97
- }
98
-
99
- .c0 + .c0 {
100
- margin-left: 0.85em;
101
- }
102
-
103
- <button
104
- class="c0 c1 button-color-default"
105
- >
106
- Test
107
- </button>
108
- `;
109
-
110
- exports[`Button renders disabled 1`] = `
111
- .c1 {
112
- -webkit-text-decoration: none;
113
- text-decoration: none;
114
- text-align: center;
115
- width: auto;
116
- outline: none;
117
- border: none;
118
- border-radius: var(--button-border-radius);
119
- font-weight: var(--button-font-weight);
120
- font-size: 14px;
121
- padding: 2px 20px;
122
- cursor: pointer;
123
- -webkit-transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
124
- transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
125
- line-height: 1;
126
- font-family: var(--button-font-family);
127
- box-shadow: var(--button-box-shadow);
128
- color: var(--button-color);
129
- background-color: var(--button-background-color);
130
- font-size: var(--button-medium-font-size);
131
- padding: var(--button-medium-padding);
132
- min-width: var(--button-medium-min-width);
133
- }
134
-
135
- .c1:hover {
136
- box-shadow: var(--button-active-box-shadow);
137
- }
138
-
139
- .c1:active {
140
- box-shadow: var(--button-active-box-shadow);
141
- }
142
-
143
- .c1:hover {
144
- background-color: var(--button-hover-background-color);
145
- }
146
-
147
- .c1:active {
148
- background-color: var(--button-active-background-color);
149
- }
150
-
151
- .c0 + .c0 {
152
- margin-left: 0.85em;
153
- }
154
-
155
- .c1,
156
- .c1:hover {
157
- cursor: default;
158
- color: #999999;
159
- pointer-events: none;
160
- }
161
-
162
- <button
163
- class="c0 c1 button-color-default"
164
- disabled=""
165
- >
166
- Test
167
- </button>
168
- `;
169
-
170
- exports[`Button renders full width 1`] = `
171
- .c1 {
172
- -webkit-text-decoration: none;
173
- text-decoration: none;
174
- text-align: center;
175
- width: 100%;
176
- outline: none;
177
- border: none;
178
- border-radius: var(--button-border-radius);
179
- font-weight: var(--button-font-weight);
180
- font-size: 14px;
181
- padding: 2px 20px;
182
- cursor: pointer;
183
- -webkit-transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
184
- transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
185
- line-height: 1;
186
- font-family: var(--button-font-family);
187
- box-shadow: var(--button-box-shadow);
188
- color: var(--button-color);
189
- background-color: var(--button-background-color);
190
- font-size: var(--button-medium-font-size);
191
- padding: var(--button-medium-padding);
192
- min-width: var(--button-medium-min-width);
193
- }
194
-
195
- .c1:hover {
196
- box-shadow: var(--button-active-box-shadow);
197
- }
198
-
199
- .c1:active {
200
- box-shadow: var(--button-active-box-shadow);
201
- }
202
-
203
- .c1:hover {
204
- background-color: var(--button-hover-background-color);
205
- }
206
-
207
- .c1:active {
208
- background-color: var(--button-active-background-color);
209
- }
210
-
211
- .c0 + .c0 {
212
- margin-left: 0.85em;
213
- }
214
-
215
- <button
216
- class="c0 c1 button-color-default"
217
- >
218
- Test
219
- </button>
220
- `;
221
-
222
- exports[`Button renders outlined 1`] = `
223
- .c1 {
224
- -webkit-text-decoration: none;
225
- text-decoration: none;
226
- text-align: center;
227
- width: auto;
228
- outline: none;
229
- border: none;
230
- border-radius: var(--button-border-radius);
231
- font-weight: var(--button-font-weight);
232
- font-size: 14px;
233
- padding: 2px 20px;
234
- cursor: pointer;
235
- -webkit-transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
236
- transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
237
- line-height: 1;
238
- font-family: var(--button-font-family);
239
- box-shadow: var(--button-box-shadow);
240
- color: var(--button-background-color);
241
- border: 2px solid var(--button-background-color);
242
- background-color: transparent;
243
- font-size: var(--button-medium-font-size);
244
- padding: var(--button-medium-padding);
245
- min-width: var(--button-medium-min-width);
246
- }
247
-
248
- .c1:hover {
249
- box-shadow: var(--button-active-box-shadow);
250
- }
251
-
252
- .c1:active {
253
- box-shadow: var(--button-active-box-shadow);
254
- }
255
-
256
- .c1:hover {
257
- border: 2px solid var(--button-active-background-color);
258
- background-color: transparent;
259
- }
260
-
261
- .c1:active {
262
- border: 2px solid var(--button-outlined-active-border-color);
263
- }
264
-
265
- .c0 + .c0 {
266
- margin-left: 0.85em;
267
- }
268
-
269
- <button
270
- class="c0 c1 button-color-default"
271
- >
272
- Test
273
- </button>
274
- `;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import { CodeBlock } from '@theme/CodeBlock';
5
-
6
- describe('CodeBlock', () => {
7
- it('renders', () => {
8
- const { container } = render(<CodeBlock>Test</CodeBlock>);
9
-
10
- expect(container.firstChild).toMatchSnapshot();
11
- });
12
- });