@scm-manager/ui-components 2.28.1-20220006-094218 → 2.29.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scm-manager/ui-components",
3
- "version": "2.28.1-20220006-094218",
3
+ "version": "2.29.0",
4
4
  "description": "UI Components for SCM-Manager and its plugins",
5
5
  "main": "src/index.ts",
6
6
  "files": [
@@ -25,7 +25,7 @@
25
25
  "@scm-manager/jest-preset": "^2.13.0",
26
26
  "@scm-manager/prettier-config": "^2.10.1",
27
27
  "@scm-manager/tsconfig": "^2.12.0",
28
- "@scm-manager/ui-tests": "^2.28.1-20220006-094218",
28
+ "@scm-manager/ui-tests": "^2.29.0",
29
29
  "@storybook/addon-actions": "^6.3.12",
30
30
  "@storybook/addon-storyshots": "^6.3.12",
31
31
  "@storybook/builder-webpack5": "^6.3.12",
@@ -65,9 +65,9 @@
65
65
  "worker-plugin": "^3.2.0"
66
66
  },
67
67
  "dependencies": {
68
- "@scm-manager/ui-api": "^2.28.1-20220006-094218",
69
- "@scm-manager/ui-extensions": "^2.28.1-20220006-094218",
70
- "@scm-manager/ui-types": "^2.28.1-20220006-094218",
68
+ "@scm-manager/ui-api": "^2.29.0",
69
+ "@scm-manager/ui-extensions": "^2.29.0",
70
+ "@scm-manager/ui-types": "^2.29.0",
71
71
  "classnames": "^2.2.6",
72
72
  "date-fns": "^2.4.1",
73
73
  "deepmerge": "^4.2.2",
@@ -69,22 +69,15 @@ const BreadcrumbNav = styled.nav`
69
69
  width: 100%;
70
70
 
71
71
  /* move slash to end */
72
-
73
72
  li + li::before {
74
73
  content: none;
75
74
  }
76
75
 
77
- li:not(:last-child)::after {
78
- color: #b5b5b5; //$breadcrumb-item-separator-color
79
- content: "\\0002f";
80
- }
81
-
82
76
  li:first-child {
83
77
  margin-left: 0.75rem;
84
78
  }
85
79
 
86
80
  /* sizing of each item */
87
-
88
81
  li {
89
82
  max-width: 375px;
90
83
 
@@ -111,11 +104,6 @@ const ActionBar = styled.div`
111
104
  }
112
105
  `;
113
106
 
114
- // TODO ersetzen?
115
- const PrefixButton = styled.div`
116
- border-right: 1px solid lightgray;
117
- `;
118
-
119
107
  const BreadcrumbNode: FC<{ clickable: boolean; text: string; url: string; current?: boolean }> = ({
120
108
  clickable,
121
109
  text,
@@ -198,7 +186,7 @@ const Breadcrumb: FC<Props> = ({
198
186
  const renderBreadcrumbNav = () => {
199
187
  let prefixButtons = null;
200
188
  if (preButtons) {
201
- prefixButtons = <PrefixButton className="mr-2">{preButtons}</PrefixButton>;
189
+ prefixButtons = <div className="mr-2 prefix-button">{preButtons}</div>;
202
190
  }
203
191
 
204
192
  let homeUrl = baseUrl + "/";
@@ -26,7 +26,6 @@ import { storiesOf } from "@storybook/react";
26
26
  import styled from "styled-components";
27
27
  import Logo from "./Logo";
28
28
 
29
- // TODO Ersetzen?
30
29
  const Wrapper = styled.div`
31
30
  padding: 2em;
32
31
  background-color: black;
@@ -31,9 +31,21 @@ import { useLocation } from "react-router-dom";
31
31
  import { urls } from "@scm-manager/ui-api";
32
32
  import createSyntaxHighlighterRenderer from "./SyntaxHighlighterRenderer";
33
33
  import useScrollToElement from "./useScrollToElement";
34
+ import styled from "styled-components";
35
+ import { useTranslation } from "react-i18next";
36
+ import copyToClipboard from "./CopyToClipboard";
34
37
 
35
38
  const LINE_NUMBER_URL_HASH_REGEX = /^#line-(.*)$/;
36
39
 
40
+ const Container = styled.div`
41
+ position: relative;
42
+ `;
43
+ const TopRightButton = styled.button`
44
+ position: absolute;
45
+ top: 0;
46
+ right: 0;
47
+ `;
48
+
37
49
  type Props = {
38
50
  language?: string;
39
51
  value: string;
@@ -44,6 +56,8 @@ type Props = {
44
56
  const SyntaxHighlighter: FC<Props> = ({ language = defaultLanguage, showLineNumbers = true, value, permalink }) => {
45
57
  const location = useLocation();
46
58
  const [contentRef, setContentRef] = useState<HTMLElement | null>();
59
+ const [copied, setCopied] = useState(false);
60
+ const [t] = useTranslation("commons");
47
61
 
48
62
  useScrollToElement(
49
63
  contentRef,
@@ -56,6 +70,10 @@ const SyntaxHighlighter: FC<Props> = ({ language = defaultLanguage, showLineNumb
56
70
  value
57
71
  );
58
72
 
73
+ const copy = () => {
74
+ copyToClipboard(value).then(() => setCopied(true));
75
+ };
76
+
59
77
  const createLinePermaLink = (lineNumber: number) =>
60
78
  window.location.protocol +
61
79
  "//" +
@@ -64,17 +82,25 @@ const SyntaxHighlighter: FC<Props> = ({ language = defaultLanguage, showLineNumb
64
82
 
65
83
  const defaultRenderer = createSyntaxHighlighterRenderer(createLinePermaLink, showLineNumbers);
66
84
 
85
+ let valueWithoutTrailingLineBreak = value;
86
+ if (value && value.length > 1 && value.endsWith("\n")) {
87
+ valueWithoutTrailingLineBreak = value.substr(0, value.length - 1);
88
+ }
89
+
67
90
  return (
68
- <div ref={setContentRef}>
91
+ <Container ref={setContentRef}>
69
92
  <ReactSyntaxHighlighter
70
93
  showLineNumbers={false}
71
94
  language={determineLanguage(language)}
72
95
  style={highlightingTheme}
73
96
  renderer={defaultRenderer}
74
97
  >
75
- {value}
98
+ {valueWithoutTrailingLineBreak}
76
99
  </ReactSyntaxHighlighter>
77
- </div>
100
+ <TopRightButton title={t("syntaxHighlighting.copyButton")} onClick={copy}>
101
+ <i className={copied ? "fa fa-clipboard-check" : "fa fa-clipboard"} />
102
+ </TopRightButton>
103
+ </Container>
78
104
  );
79
105
  };
80
106
 
@@ -67,7 +67,7 @@ exports[`Storyshots BreadCrumb Default 1`] = `
67
67
  >
68
68
  <nav
69
69
  aria-label="breadcrumbs"
70
- className="Breadcrumb__BreadcrumbNav-zvtb4t-1 eupowG breadcrumb sources-breadcrumb mx-2 my-4"
70
+ className="Breadcrumb__BreadcrumbNav-zvtb4t-1 iPDJBY breadcrumb sources-breadcrumb mx-2 my-4"
71
71
  >
72
72
  <ul>
73
73
  <li>
@@ -176,7 +176,7 @@ exports[`Storyshots BreadCrumb Long path 1`] = `
176
176
  >
177
177
  <nav
178
178
  aria-label="breadcrumbs"
179
- className="Breadcrumb__BreadcrumbNav-zvtb4t-1 eupowG breadcrumb sources-breadcrumb mx-2 my-4"
179
+ className="Breadcrumb__BreadcrumbNav-zvtb4t-1 iPDJBY breadcrumb sources-breadcrumb mx-2 my-4"
180
180
  >
181
181
  <ul>
182
182
  <li>
@@ -335,7 +335,7 @@ exports[`Storyshots BreadCrumb Not clickable 1`] = `
335
335
  >
336
336
  <nav
337
337
  aria-label="breadcrumbs"
338
- className="Breadcrumb__BreadcrumbNav-zvtb4t-1 eupowG breadcrumb sources-breadcrumb mx-2 my-4"
338
+ className="Breadcrumb__BreadcrumbNav-zvtb4t-1 iPDJBY breadcrumb sources-breadcrumb mx-2 my-4"
339
339
  >
340
340
  <ul>
341
341
  <li>
@@ -425,10 +425,10 @@ exports[`Storyshots BreadCrumb With prefix button 1`] = `
425
425
  >
426
426
  <nav
427
427
  aria-label="breadcrumbs"
428
- className="Breadcrumb__BreadcrumbNav-zvtb4t-1 eupowG breadcrumb sources-breadcrumb mx-2 my-4"
428
+ className="Breadcrumb__BreadcrumbNav-zvtb4t-1 iPDJBY breadcrumb sources-breadcrumb mx-2 my-4"
429
429
  >
430
430
  <div
431
- className="Breadcrumb__PrefixButton-zvtb4t-4 fsMznZ mr-2"
431
+ className="mr-2 prefix-button"
432
432
  >
433
433
  <a
434
434
  href="#link"
@@ -4613,7 +4613,9 @@ exports[`Storyshots MarkdownView Code without Lang 1`] = `
4613
4613
  </p>
4614
4614
 
4615
4615
 
4616
- <div>
4616
+ <div
4617
+ className="SyntaxHighlighter__Container-ks8t62-0 icIltA"
4618
+ >
4617
4619
  <pre
4618
4620
  style={
4619
4621
  Object {
@@ -4694,41 +4696,20 @@ exports[`Storyshots MarkdownView Code without Lang 1`] = `
4694
4696
  style={Object {}}
4695
4697
  >
4696
4698
  Code without Language!
4697
-
4698
4699
  </span>
4699
4700
  </span>
4700
4701
  </div>
4701
- <div
4702
- className="SyntaxHighlighterRenderer__RowContainer-sc-12li0bg-0 dsgsZc"
4703
- id="line-2"
4704
- >
4705
- <span
4706
- aria-label="sources.content.copyPermalink"
4707
- className="tooltip has-tooltip-right"
4708
- data-tooltip="sources.content.copyPermalink"
4709
- >
4710
- <i
4711
- aria-label="sources.content.copyPermalink"
4712
- className="fas fa-fw fa-link has-text-secondary"
4713
- onClick={[Function]}
4714
- onKeyPress={[Function]}
4715
- />
4716
- </span>
4717
- <span
4718
- className="linenumber react-syntax-highlighter-line-number"
4719
- onClick={[Function]}
4720
- >
4721
- 2
4722
- </span>
4723
- <span
4724
- style={Object {}}
4725
- >
4726
-
4727
-
4728
- </span>
4729
- </div>
4730
4702
  </code>
4731
4703
  </pre>
4704
+ <button
4705
+ className="SyntaxHighlighter__TopRightButton-ks8t62-1 grhlRj"
4706
+ onClick={[Function]}
4707
+ title="syntaxHighlighting.copyButton"
4708
+ >
4709
+ <i
4710
+ className="fa fa-clipboard"
4711
+ />
4712
+ </button>
4732
4713
  </div>
4733
4714
  </div>
4734
4715
  </div>
@@ -5781,7 +5762,9 @@ Deserunt officia esse aliquip consectetur duis ut labore laborum commodo aliquip
5781
5762
  </p>
5782
5763
 
5783
5764
 
5784
- <div>
5765
+ <div
5766
+ className="SyntaxHighlighter__Container-ks8t62-0 icIltA"
5767
+ >
5785
5768
  <pre
5786
5769
  style={
5787
5770
  Object {
@@ -6929,45 +6912,19 @@ Deserunt officia esse aliquip consectetur duis ut labore laborum commodo aliquip
6929
6912
  >
6930
6913
  }
6931
6914
  </span>
6932
- <span
6933
- style={Object {}}
6934
- >
6935
-
6936
-
6937
- </span>
6938
- </span>
6939
- </div>
6940
- <div
6941
- className="SyntaxHighlighterRenderer__RowContainer-sc-12li0bg-0 dsgsZc"
6942
- id="line-16"
6943
- >
6944
- <span
6945
- aria-label="sources.content.copyPermalink"
6946
- className="tooltip has-tooltip-right"
6947
- data-tooltip="sources.content.copyPermalink"
6948
- >
6949
- <i
6950
- aria-label="sources.content.copyPermalink"
6951
- className="fas fa-fw fa-link has-text-secondary"
6952
- onClick={[Function]}
6953
- onKeyPress={[Function]}
6954
- />
6955
- </span>
6956
- <span
6957
- className="linenumber react-syntax-highlighter-line-number"
6958
- onClick={[Function]}
6959
- >
6960
- 16
6961
- </span>
6962
- <span
6963
- style={Object {}}
6964
- >
6965
-
6966
-
6967
6915
  </span>
6968
6916
  </div>
6969
6917
  </code>
6970
6918
  </pre>
6919
+ <button
6920
+ className="SyntaxHighlighter__TopRightButton-ks8t62-1 grhlRj"
6921
+ onClick={[Function]}
6922
+ title="syntaxHighlighting.copyButton"
6923
+ >
6924
+ <i
6925
+ className="fa fa-clipboard"
6926
+ />
6927
+ </button>
6971
6928
  </div>
6972
6929
 
6973
6930
 
@@ -14879,7 +14836,9 @@ exports[`Storyshots MarkdownView Inline Xml 1`] = `
14879
14836
 
14880
14837
 
14881
14838
 
14882
- <div>
14839
+ <div
14840
+ className="SyntaxHighlighter__Container-ks8t62-0 icIltA"
14841
+ >
14883
14842
  <pre
14884
14843
  style={
14885
14844
  Object {
@@ -15252,39 +15211,19 @@ exports[`Storyshots MarkdownView Inline Xml 1`] = `
15252
15211
  >
15253
15212
  &lt;/plugins&gt;
15254
15213
 
15255
- </span>
15256
- </div>
15257
- <div
15258
- className="SyntaxHighlighterRenderer__RowContainer-sc-12li0bg-0 dsgsZc"
15259
- id="line-12"
15260
- >
15261
- <span
15262
- aria-label="sources.content.copyPermalink"
15263
- className="tooltip has-tooltip-right"
15264
- data-tooltip="sources.content.copyPermalink"
15265
- >
15266
- <i
15267
- aria-label="sources.content.copyPermalink"
15268
- className="fas fa-fw fa-link has-text-secondary"
15269
- onClick={[Function]}
15270
- onKeyPress={[Function]}
15271
- />
15272
- </span>
15273
- <span
15274
- className="linenumber react-syntax-highlighter-line-number"
15275
- onClick={[Function]}
15276
- >
15277
- 12
15278
- </span>
15279
- <span
15280
- style={Object {}}
15281
- >
15282
-
15283
-
15284
15214
  </span>
15285
15215
  </div>
15286
15216
  </code>
15287
15217
  </pre>
15218
+ <button
15219
+ className="SyntaxHighlighter__TopRightButton-ks8t62-1 grhlRj"
15220
+ onClick={[Function]}
15221
+ title="syntaxHighlighting.copyButton"
15222
+ >
15223
+ <i
15224
+ className="fa fa-clipboard"
15225
+ />
15226
+ </button>
15288
15227
  </div>
15289
15228
 
15290
15229
 
@@ -16461,7 +16400,9 @@ Deserunt officia esse aliquip consectetur duis ut labore laborum commodo aliquip
16461
16400
  </p>
16462
16401
 
16463
16402
 
16464
- <div>
16403
+ <div
16404
+ className="SyntaxHighlighter__Container-ks8t62-0 icIltA"
16405
+ >
16465
16406
  <pre
16466
16407
  style={
16467
16408
  Object {
@@ -17609,45 +17550,19 @@ Deserunt officia esse aliquip consectetur duis ut labore laborum commodo aliquip
17609
17550
  >
17610
17551
  }
17611
17552
  </span>
17612
- <span
17613
- style={Object {}}
17614
- >
17615
-
17616
-
17617
- </span>
17618
- </span>
17619
- </div>
17620
- <div
17621
- className="SyntaxHighlighterRenderer__RowContainer-sc-12li0bg-0 dsgsZc"
17622
- id="line-16"
17623
- >
17624
- <span
17625
- aria-label="sources.content.copyPermalink"
17626
- className="tooltip has-tooltip-right"
17627
- data-tooltip="sources.content.copyPermalink"
17628
- >
17629
- <i
17630
- aria-label="sources.content.copyPermalink"
17631
- className="fas fa-fw fa-link has-text-secondary"
17632
- onClick={[Function]}
17633
- onKeyPress={[Function]}
17634
- />
17635
- </span>
17636
- <span
17637
- className="linenumber react-syntax-highlighter-line-number"
17638
- onClick={[Function]}
17639
- >
17640
- 16
17641
- </span>
17642
- <span
17643
- style={Object {}}
17644
- >
17645
-
17646
-
17647
17553
  </span>
17648
17554
  </div>
17649
17555
  </code>
17650
17556
  </pre>
17557
+ <button
17558
+ className="SyntaxHighlighter__TopRightButton-ks8t62-1 grhlRj"
17559
+ onClick={[Function]}
17560
+ title="syntaxHighlighting.copyButton"
17561
+ >
17562
+ <i
17563
+ className="fa fa-clipboard"
17564
+ />
17565
+ </button>
17651
17566
  </div>
17652
17567
 
17653
17568
 
@@ -17844,7 +17759,9 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
17844
17759
  </h1>
17845
17760
 
17846
17761
 
17847
- <div>
17762
+ <div
17763
+ className="SyntaxHighlighter__Container-ks8t62-0 icIltA"
17764
+ >
17848
17765
  <pre
17849
17766
  style={
17850
17767
  Object {
@@ -19256,45 +19173,19 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
19256
19173
  >
19257
19174
  &gt;
19258
19175
  </span>
19259
- <span
19260
- style={Object {}}
19261
- >
19262
-
19263
-
19264
- </span>
19265
- </span>
19266
- </div>
19267
- <div
19268
- className="SyntaxHighlighterRenderer__RowContainer-sc-12li0bg-0 dsgsZc"
19269
- id="line-24"
19270
- >
19271
- <span
19272
- aria-label="sources.content.copyPermalink"
19273
- className="tooltip has-tooltip-right"
19274
- data-tooltip="sources.content.copyPermalink"
19275
- >
19276
- <i
19277
- aria-label="sources.content.copyPermalink"
19278
- className="fas fa-fw fa-link has-text-secondary"
19279
- onClick={[Function]}
19280
- onKeyPress={[Function]}
19281
- />
19282
- </span>
19283
- <span
19284
- className="linenumber react-syntax-highlighter-line-number"
19285
- onClick={[Function]}
19286
- >
19287
- 24
19288
- </span>
19289
- <span
19290
- style={Object {}}
19291
- >
19292
-
19293
-
19294
19176
  </span>
19295
19177
  </div>
19296
19178
  </code>
19297
19179
  </pre>
19180
+ <button
19181
+ className="SyntaxHighlighter__TopRightButton-ks8t62-1 grhlRj"
19182
+ onClick={[Function]}
19183
+ title="syntaxHighlighting.copyButton"
19184
+ >
19185
+ <i
19186
+ className="fa fa-clipboard"
19187
+ />
19188
+ </button>
19298
19189
  </div>
19299
19190
  </div>
19300
19191
  </div>
@@ -75396,7 +75287,9 @@ exports[`Storyshots SyntaxHighlighter Go 1`] = `
75396
75287
  <div
75397
75288
  className="SyntaxHighlighterstories__Spacing-sc-1dcldp5-0 jbrCso"
75398
75289
  >
75399
- <div>
75290
+ <div
75291
+ className="SyntaxHighlighter__Container-ks8t62-0 icIltA"
75292
+ >
75400
75293
  <pre
75401
75294
  style={
75402
75295
  Object {
@@ -76757,45 +76650,19 @@ exports[`Storyshots SyntaxHighlighter Go 1`] = `
76757
76650
  >
76758
76651
  }
76759
76652
  </span>
76760
- <span
76761
- style={Object {}}
76762
- >
76763
-
76764
-
76765
- </span>
76766
- </span>
76767
- </div>
76768
- <div
76769
- className="SyntaxHighlighterRenderer__RowContainer-sc-12li0bg-0 dsgsZc"
76770
- id="line-18"
76771
- >
76772
- <span
76773
- aria-label="sources.content.copyPermalink"
76774
- className="tooltip has-tooltip-right"
76775
- data-tooltip="sources.content.copyPermalink"
76776
- >
76777
- <i
76778
- aria-label="sources.content.copyPermalink"
76779
- className="fas fa-fw fa-link has-text-secondary"
76780
- onClick={[Function]}
76781
- onKeyPress={[Function]}
76782
- />
76783
- </span>
76784
- <span
76785
- className="linenumber react-syntax-highlighter-line-number"
76786
- onClick={[Function]}
76787
- >
76788
- 18
76789
- </span>
76790
- <span
76791
- style={Object {}}
76792
- >
76793
-
76794
-
76795
76653
  </span>
76796
76654
  </div>
76797
76655
  </code>
76798
76656
  </pre>
76657
+ <button
76658
+ className="SyntaxHighlighter__TopRightButton-ks8t62-1 grhlRj"
76659
+ onClick={[Function]}
76660
+ title="syntaxHighlighting.copyButton"
76661
+ >
76662
+ <i
76663
+ className="fa fa-clipboard"
76664
+ />
76665
+ </button>
76799
76666
  </div>
76800
76667
  </div>
76801
76668
  `;
@@ -76804,7 +76671,9 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
76804
76671
  <div
76805
76672
  className="SyntaxHighlighterstories__Spacing-sc-1dcldp5-0 jbrCso"
76806
76673
  >
76807
- <div>
76674
+ <div
76675
+ className="SyntaxHighlighter__Container-ks8t62-0 icIltA"
76676
+ >
76808
76677
  <pre
76809
76678
  style={
76810
76679
  Object {
@@ -79709,45 +79578,19 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
79709
79578
  >
79710
79579
  }
79711
79580
  </span>
79712
- <span
79713
- style={Object {}}
79714
- >
79715
-
79716
-
79717
- </span>
79718
- </span>
79719
- </div>
79720
- <div
79721
- className="SyntaxHighlighterRenderer__RowContainer-sc-12li0bg-0 dsgsZc"
79722
- id="line-32"
79723
- >
79724
- <span
79725
- aria-label="sources.content.copyPermalink"
79726
- className="tooltip has-tooltip-right"
79727
- data-tooltip="sources.content.copyPermalink"
79728
- >
79729
- <i
79730
- aria-label="sources.content.copyPermalink"
79731
- className="fas fa-fw fa-link has-text-secondary"
79732
- onClick={[Function]}
79733
- onKeyPress={[Function]}
79734
- />
79735
- </span>
79736
- <span
79737
- className="linenumber react-syntax-highlighter-line-number"
79738
- onClick={[Function]}
79739
- >
79740
- 32
79741
- </span>
79742
- <span
79743
- style={Object {}}
79744
- >
79745
-
79746
-
79747
79581
  </span>
79748
79582
  </div>
79749
79583
  </code>
79750
79584
  </pre>
79585
+ <button
79586
+ className="SyntaxHighlighter__TopRightButton-ks8t62-1 grhlRj"
79587
+ onClick={[Function]}
79588
+ title="syntaxHighlighting.copyButton"
79589
+ >
79590
+ <i
79591
+ className="fa fa-clipboard"
79592
+ />
79593
+ </button>
79751
79594
  </div>
79752
79595
  </div>
79753
79596
  `;
@@ -79756,7 +79599,9 @@ exports[`Storyshots SyntaxHighlighter Javascript 1`] = `
79756
79599
  <div
79757
79600
  className="SyntaxHighlighterstories__Spacing-sc-1dcldp5-0 jbrCso"
79758
79601
  >
79759
- <div>
79602
+ <div
79603
+ className="SyntaxHighlighter__Container-ks8t62-0 icIltA"
79604
+ >
79760
79605
  <pre
79761
79606
  style={
79762
79607
  Object {
@@ -80556,45 +80401,19 @@ exports[`Storyshots SyntaxHighlighter Javascript 1`] = `
80556
80401
  >
80557
80402
  ;
80558
80403
  </span>
80559
- <span
80560
- style={Object {}}
80561
- >
80562
-
80563
-
80564
- </span>
80565
- </span>
80566
- </div>
80567
- <div
80568
- className="SyntaxHighlighterRenderer__RowContainer-sc-12li0bg-0 dsgsZc"
80569
- id="line-8"
80570
- >
80571
- <span
80572
- aria-label="sources.content.copyPermalink"
80573
- className="tooltip has-tooltip-right"
80574
- data-tooltip="sources.content.copyPermalink"
80575
- >
80576
- <i
80577
- aria-label="sources.content.copyPermalink"
80578
- className="fas fa-fw fa-link has-text-secondary"
80579
- onClick={[Function]}
80580
- onKeyPress={[Function]}
80581
- />
80582
- </span>
80583
- <span
80584
- className="linenumber react-syntax-highlighter-line-number"
80585
- onClick={[Function]}
80586
- >
80587
- 8
80588
- </span>
80589
- <span
80590
- style={Object {}}
80591
- >
80592
-
80593
-
80594
80404
  </span>
80595
80405
  </div>
80596
80406
  </code>
80597
80407
  </pre>
80408
+ <button
80409
+ className="SyntaxHighlighter__TopRightButton-ks8t62-1 grhlRj"
80410
+ onClick={[Function]}
80411
+ title="syntaxHighlighting.copyButton"
80412
+ >
80413
+ <i
80414
+ className="fa fa-clipboard"
80415
+ />
80416
+ </button>
80598
80417
  </div>
80599
80418
  </div>
80600
80419
  `;
@@ -80603,7 +80422,9 @@ exports[`Storyshots SyntaxHighlighter Markdown 1`] = `
80603
80422
  <div
80604
80423
  className="SyntaxHighlighterstories__Spacing-sc-1dcldp5-0 jbrCso"
80605
80424
  >
80606
- <div>
80425
+ <div
80426
+ className="SyntaxHighlighter__Container-ks8t62-0 icIltA"
80427
+ >
80607
80428
  <pre
80608
80429
  style={
80609
80430
  Object {
@@ -88564,41 +88385,20 @@ exports[`Storyshots SyntaxHighlighter Markdown 1`] = `
88564
88385
  style={Object {}}
88565
88386
  >
88566
88387
  dolore cillum. Esse laboris consequat dolor anim exercitation tempor aliqua deserunt velit magna laboris. Culpa culpa minim duis amet mollit do quis amet commodo nulla irure.
88567
-
88568
88388
  </span>
88569
88389
  </span>
88570
88390
  </div>
88571
- <div
88572
- className="SyntaxHighlighterRenderer__RowContainer-sc-12li0bg-0 dsgsZc"
88573
- id="line-172"
88574
- >
88575
- <span
88576
- aria-label="sources.content.copyPermalink"
88577
- className="tooltip has-tooltip-right"
88578
- data-tooltip="sources.content.copyPermalink"
88579
- >
88580
- <i
88581
- aria-label="sources.content.copyPermalink"
88582
- className="fas fa-fw fa-link has-text-secondary"
88583
- onClick={[Function]}
88584
- onKeyPress={[Function]}
88585
- />
88586
- </span>
88587
- <span
88588
- className="linenumber react-syntax-highlighter-line-number"
88589
- onClick={[Function]}
88590
- >
88591
- 172
88592
- </span>
88593
- <span
88594
- style={Object {}}
88595
- >
88596
-
88597
-
88598
- </span>
88599
- </div>
88600
88391
  </code>
88601
88392
  </pre>
88393
+ <button
88394
+ className="SyntaxHighlighter__TopRightButton-ks8t62-1 grhlRj"
88395
+ onClick={[Function]}
88396
+ title="syntaxHighlighting.copyButton"
88397
+ >
88398
+ <i
88399
+ className="fa fa-clipboard"
88400
+ />
88401
+ </button>
88602
88402
  </div>
88603
88403
  </div>
88604
88404
  `;
@@ -88607,7 +88407,9 @@ exports[`Storyshots SyntaxHighlighter Python 1`] = `
88607
88407
  <div
88608
88408
  className="SyntaxHighlighterstories__Spacing-sc-1dcldp5-0 jbrCso"
88609
88409
  >
88610
- <div>
88410
+ <div
88411
+ className="SyntaxHighlighter__Container-ks8t62-0 icIltA"
88412
+ >
88611
88413
  <pre
88612
88414
  style={
88613
88415
  Object {
@@ -90058,45 +89860,19 @@ exports[`Storyshots SyntaxHighlighter Python 1`] = `
90058
89860
  >
90059
89861
  )
90060
89862
  </span>
90061
- <span
90062
- style={Object {}}
90063
- >
90064
-
90065
-
90066
- </span>
90067
- </span>
90068
- </div>
90069
- <div
90070
- className="SyntaxHighlighterRenderer__RowContainer-sc-12li0bg-0 dsgsZc"
90071
- id="line-21"
90072
- >
90073
- <span
90074
- aria-label="sources.content.copyPermalink"
90075
- className="tooltip has-tooltip-right"
90076
- data-tooltip="sources.content.copyPermalink"
90077
- >
90078
- <i
90079
- aria-label="sources.content.copyPermalink"
90080
- className="fas fa-fw fa-link has-text-secondary"
90081
- onClick={[Function]}
90082
- onKeyPress={[Function]}
90083
- />
90084
- </span>
90085
- <span
90086
- className="linenumber react-syntax-highlighter-line-number"
90087
- onClick={[Function]}
90088
- >
90089
- 21
90090
- </span>
90091
- <span
90092
- style={Object {}}
90093
- >
90094
-
90095
-
90096
89863
  </span>
90097
89864
  </div>
90098
89865
  </code>
90099
89866
  </pre>
89867
+ <button
89868
+ className="SyntaxHighlighter__TopRightButton-ks8t62-1 grhlRj"
89869
+ onClick={[Function]}
89870
+ title="syntaxHighlighting.copyButton"
89871
+ >
89872
+ <i
89873
+ className="fa fa-clipboard"
89874
+ />
89875
+ </button>
90100
89876
  </div>
90101
89877
  </div>
90102
89878
  `;
@@ -90105,7 +89881,9 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
90105
89881
  <div
90106
89882
  className="SyntaxHighlighterstories__Spacing-sc-1dcldp5-0 jbrCso"
90107
89883
  >
90108
- <div>
89884
+ <div
89885
+ className="SyntaxHighlighter__Container-ks8t62-0 icIltA"
89886
+ >
90109
89887
  <pre
90110
89888
  style={
90111
89889
  Object {
@@ -92452,27 +92230,19 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
92452
92230
  >
92453
92231
  }
92454
92232
  </span>
92455
- <span
92456
- style={Object {}}
92457
- >
92458
-
92459
-
92460
- </span>
92461
- </span>
92462
- </div>
92463
- <div
92464
- className="SyntaxHighlighterRenderer__RowContainer-sc-12li0bg-0 dsgsZc"
92465
- id="line-32"
92466
- >
92467
- <span
92468
- style={Object {}}
92469
- >
92470
-
92471
-
92472
92233
  </span>
92473
92234
  </div>
92474
92235
  </code>
92475
92236
  </pre>
92237
+ <button
92238
+ className="SyntaxHighlighter__TopRightButton-ks8t62-1 grhlRj"
92239
+ onClick={[Function]}
92240
+ title="syntaxHighlighting.copyButton"
92241
+ >
92242
+ <i
92243
+ className="fa fa-clipboard"
92244
+ />
92245
+ </button>
92476
92246
  </div>
92477
92247
  </div>
92478
92248
  `;
@@ -113,7 +113,7 @@ const AnnotatePopover: FC<PopoverProps> = ({ annotation, offsetTop, repository,
113
113
  ref={ref}
114
114
  onMouseEnter={onMouseEnter}
115
115
  onMouseLeave={OnMouseLeave}
116
- className="box"
116
+ className="popover box"
117
117
  style={{ top: `${top}px` }}
118
118
  >
119
119
  <PopoverHeading className="is-clearfix">