@nordicsemiconductor/pc-nrfconnect-shared 108.0.0 → 110.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.
- package/Changelog.md +16 -0
- package/coverage/cobertura-coverage.xml +41 -47
- package/nrfutil/sandbox.ts +22 -22
- package/package.json +1 -1
- package/src/MasonryLayout/MasonryLayout.tsx +31 -9
- package/src/Overlay/Overlay.tsx +71 -0
- package/src/Overlay/overlay.scss +66 -0
- package/src/index.ts +1 -0
- package/typings/generated/src/MasonryLayout/MasonryLayout.d.ts.map +1 -1
- package/typings/generated/src/Overlay/Overlay.d.ts +11 -0
- package/typings/generated/src/Overlay/Overlay.d.ts.map +1 -0
- package/typings/generated/src/index.d.ts +1 -0
- package/typings/generated/src/index.d.ts.map +1 -1
package/Changelog.md
CHANGED
|
@@ -7,6 +7,22 @@ This project does _not_ adhere to
|
|
|
7
7
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it
|
|
8
8
|
every new version is a new major version.
|
|
9
9
|
|
|
10
|
+
## 110 - 2023-09-22
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- `MasonryLayout` dropdown component forced cards on different row to shift.
|
|
15
|
+
|
|
16
|
+
## 109 - 2023-09-21
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Improve `Nrfutil Sandbox` error messages.
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- `Overlay` component.
|
|
25
|
+
|
|
10
26
|
## 108 - 2023-09-15
|
|
11
27
|
|
|
12
28
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" ?>
|
|
2
2
|
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
|
|
3
|
-
<coverage lines-valid="
|
|
3
|
+
<coverage lines-valid="3207" lines-covered="1788" line-rate="0.5575" branches-valid="1532" branches-covered="448" branch-rate="0.2924" timestamp="1695373602458" complexity="0" version="0.1">
|
|
4
4
|
<sources>
|
|
5
5
|
<source>/home/vsts/work/1/s</source>
|
|
6
6
|
</sources>
|
|
@@ -401,7 +401,7 @@
|
|
|
401
401
|
</class>
|
|
402
402
|
</classes>
|
|
403
403
|
</package>
|
|
404
|
-
<package name="nrfutil" line-rate="0.
|
|
404
|
+
<package name="nrfutil" line-rate="0.0877" branch-rate="0">
|
|
405
405
|
<classes>
|
|
406
406
|
<class name="moduleVersion.ts" filename="nrfutil/moduleVersion.ts" line-rate="0.29410000000000003" branch-rate="0">
|
|
407
407
|
<methods>
|
|
@@ -475,7 +475,7 @@
|
|
|
475
475
|
<line number="15" hits="3" branch="false"/>
|
|
476
476
|
</lines>
|
|
477
477
|
</class>
|
|
478
|
-
<class name="sandbox.ts" filename="nrfutil/sandbox.ts" line-rate="0.
|
|
478
|
+
<class name="sandbox.ts" filename="nrfutil/sandbox.ts" line-rate="0.0594" branch-rate="0">
|
|
479
479
|
<methods>
|
|
480
480
|
<method name="(anonymous_5)" hits="0" signature="()V">
|
|
481
481
|
<lines>
|
|
@@ -564,155 +564,150 @@
|
|
|
564
564
|
</method>
|
|
565
565
|
<method name="(anonymous_22)" hits="0" signature="()V">
|
|
566
566
|
<lines>
|
|
567
|
-
<line number="
|
|
567
|
+
<line number="232" hits="0"/>
|
|
568
568
|
</lines>
|
|
569
569
|
</method>
|
|
570
570
|
<method name="(anonymous_23)" hits="0" signature="()V">
|
|
571
571
|
<lines>
|
|
572
|
-
<line number="
|
|
572
|
+
<line number="240" hits="0"/>
|
|
573
573
|
</lines>
|
|
574
574
|
</method>
|
|
575
575
|
<method name="(anonymous_24)" hits="0" signature="()V">
|
|
576
576
|
<lines>
|
|
577
|
-
<line number="
|
|
577
|
+
<line number="248" hits="0"/>
|
|
578
578
|
</lines>
|
|
579
579
|
</method>
|
|
580
580
|
<method name="(anonymous_25)" hits="0" signature="()V">
|
|
581
581
|
<lines>
|
|
582
|
-
<line number="
|
|
582
|
+
<line number="249" hits="0"/>
|
|
583
583
|
</lines>
|
|
584
584
|
</method>
|
|
585
585
|
<method name="(anonymous_26)" hits="0" signature="()V">
|
|
586
|
-
<lines>
|
|
587
|
-
<line number="247" hits="0"/>
|
|
588
|
-
</lines>
|
|
589
|
-
</method>
|
|
590
|
-
<method name="(anonymous_27)" hits="0" signature="()V">
|
|
591
586
|
<lines>
|
|
592
587
|
<line number="263" hits="0"/>
|
|
593
588
|
</lines>
|
|
594
589
|
</method>
|
|
595
|
-
<method name="(
|
|
590
|
+
<method name="(anonymous_28)" hits="0" signature="()V">
|
|
596
591
|
<lines>
|
|
597
592
|
<line number="287" hits="0"/>
|
|
598
593
|
</lines>
|
|
599
594
|
</method>
|
|
600
|
-
<method name="(
|
|
595
|
+
<method name="(anonymous_29)" hits="0" signature="()V">
|
|
601
596
|
<lines>
|
|
602
597
|
<line number="304" hits="0"/>
|
|
603
598
|
</lines>
|
|
604
599
|
</method>
|
|
605
|
-
<method name="(
|
|
600
|
+
<method name="(anonymous_30)" hits="0" signature="()V">
|
|
606
601
|
<lines>
|
|
607
602
|
<line number="318" hits="0"/>
|
|
608
603
|
</lines>
|
|
609
604
|
</method>
|
|
610
|
-
<method name="(
|
|
605
|
+
<method name="(anonymous_31)" hits="0" signature="()V">
|
|
611
606
|
<lines>
|
|
612
607
|
<line number="330" hits="0"/>
|
|
613
608
|
</lines>
|
|
614
609
|
</method>
|
|
615
|
-
<method name="(
|
|
610
|
+
<method name="(anonymous_32)" hits="0" signature="()V">
|
|
616
611
|
<lines>
|
|
617
612
|
<line number="334" hits="0"/>
|
|
618
613
|
</lines>
|
|
619
614
|
</method>
|
|
620
|
-
<method name="(
|
|
615
|
+
<method name="(anonymous_33)" hits="0" signature="()V">
|
|
621
616
|
<lines>
|
|
622
617
|
<line number="353" hits="0"/>
|
|
623
618
|
</lines>
|
|
624
619
|
</method>
|
|
625
|
-
<method name="(
|
|
620
|
+
<method name="(anonymous_34)" hits="0" signature="()V">
|
|
626
621
|
<lines>
|
|
627
622
|
<line number="365" hits="0"/>
|
|
628
623
|
</lines>
|
|
629
624
|
</method>
|
|
630
|
-
<method name="(
|
|
625
|
+
<method name="(anonymous_35)" hits="0" signature="()V">
|
|
631
626
|
<lines>
|
|
632
627
|
<line number="373" hits="0"/>
|
|
633
628
|
</lines>
|
|
634
629
|
</method>
|
|
635
|
-
<method name="(
|
|
630
|
+
<method name="(anonymous_36)" hits="0" signature="()V">
|
|
636
631
|
<lines>
|
|
637
632
|
<line number="381" hits="0"/>
|
|
638
633
|
</lines>
|
|
639
634
|
</method>
|
|
640
|
-
<method name="(
|
|
635
|
+
<method name="(anonymous_37)" hits="0" signature="()V">
|
|
641
636
|
<lines>
|
|
642
637
|
<line number="388" hits="0"/>
|
|
643
638
|
</lines>
|
|
644
639
|
</method>
|
|
645
|
-
<method name="(
|
|
640
|
+
<method name="(anonymous_38)" hits="0" signature="()V">
|
|
646
641
|
<lines>
|
|
647
642
|
<line number="390" hits="0"/>
|
|
648
643
|
</lines>
|
|
649
644
|
</method>
|
|
650
|
-
<method name="(
|
|
645
|
+
<method name="(anonymous_39)" hits="0" signature="()V">
|
|
651
646
|
<lines>
|
|
652
647
|
<line number="392" hits="0"/>
|
|
653
648
|
</lines>
|
|
654
649
|
</method>
|
|
655
|
-
<method name="(
|
|
650
|
+
<method name="(anonymous_40)" hits="0" signature="()V">
|
|
656
651
|
<lines>
|
|
657
652
|
<line number="394" hits="0"/>
|
|
658
653
|
</lines>
|
|
659
654
|
</method>
|
|
660
|
-
<method name="(
|
|
655
|
+
<method name="(anonymous_41)" hits="0" signature="()V">
|
|
661
656
|
<lines>
|
|
662
657
|
<line number="398" hits="0"/>
|
|
663
658
|
</lines>
|
|
664
659
|
</method>
|
|
665
|
-
<method name="(
|
|
660
|
+
<method name="(anonymous_42)" hits="0" signature="()V">
|
|
666
661
|
<lines>
|
|
667
662
|
<line number="402" hits="0"/>
|
|
668
663
|
</lines>
|
|
669
664
|
</method>
|
|
670
|
-
<method name="(
|
|
665
|
+
<method name="(anonymous_43)" hits="0" signature="()V">
|
|
671
666
|
<lines>
|
|
672
667
|
<line number="403" hits="0"/>
|
|
673
668
|
</lines>
|
|
674
669
|
</method>
|
|
675
|
-
<method name="(
|
|
670
|
+
<method name="(anonymous_44)" hits="0" signature="()V">
|
|
676
671
|
<lines>
|
|
677
672
|
<line number="406" hits="0"/>
|
|
678
673
|
</lines>
|
|
679
674
|
</method>
|
|
680
|
-
<method name="(
|
|
675
|
+
<method name="(anonymous_45)" hits="0" signature="()V">
|
|
681
676
|
<lines>
|
|
682
677
|
<line number="412" hits="0"/>
|
|
683
678
|
</lines>
|
|
684
679
|
</method>
|
|
685
|
-
<method name="(
|
|
680
|
+
<method name="(anonymous_46)" hits="0" signature="()V">
|
|
686
681
|
<lines>
|
|
687
682
|
<line number="431" hits="0"/>
|
|
688
683
|
</lines>
|
|
689
684
|
</method>
|
|
690
|
-
<method name="(
|
|
685
|
+
<method name="(anonymous_47)" hits="0" signature="()V">
|
|
691
686
|
<lines>
|
|
692
687
|
<line number="452" hits="0"/>
|
|
693
688
|
</lines>
|
|
694
689
|
</method>
|
|
695
|
-
<method name="(
|
|
690
|
+
<method name="(anonymous_48)" hits="0" signature="()V">
|
|
696
691
|
<lines>
|
|
697
692
|
<line number="472" hits="0"/>
|
|
698
693
|
</lines>
|
|
699
694
|
</method>
|
|
700
|
-
<method name="(
|
|
695
|
+
<method name="(anonymous_49)" hits="0" signature="()V">
|
|
701
696
|
<lines>
|
|
702
697
|
<line number="475" hits="0"/>
|
|
703
698
|
</lines>
|
|
704
699
|
</method>
|
|
705
|
-
<method name="(
|
|
700
|
+
<method name="(anonymous_50)" hits="0" signature="()V">
|
|
706
701
|
<lines>
|
|
707
702
|
<line number="482" hits="0"/>
|
|
708
703
|
</lines>
|
|
709
704
|
</method>
|
|
710
|
-
<method name="(
|
|
705
|
+
<method name="(anonymous_51)" hits="0" signature="()V">
|
|
711
706
|
<lines>
|
|
712
707
|
<line number="487" hits="0"/>
|
|
713
708
|
</lines>
|
|
714
709
|
</method>
|
|
715
|
-
<method name="(
|
|
710
|
+
<method name="(anonymous_52)" hits="0" signature="()V">
|
|
716
711
|
<lines>
|
|
717
712
|
<line number="530" hits="0"/>
|
|
718
713
|
</lines>
|
|
@@ -812,18 +807,17 @@
|
|
|
812
807
|
<line number="220" hits="0" branch="false"/>
|
|
813
808
|
<line number="225" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
814
809
|
<line number="230" hits="0" branch="true" condition-coverage="0% (0/1)"/>
|
|
815
|
-
<line number="
|
|
816
|
-
<line number="233" hits="0" branch="false"/>
|
|
810
|
+
<line number="232" hits="0" branch="false"/>
|
|
817
811
|
<line number="234" hits="0" branch="false"/>
|
|
818
|
-
<line number="
|
|
819
|
-
<line number="
|
|
820
|
-
<line number="
|
|
821
|
-
<line number="
|
|
822
|
-
<line number="
|
|
823
|
-
<line number="
|
|
812
|
+
<line number="236" hits="0" branch="false"/>
|
|
813
|
+
<line number="238" hits="0" branch="false"/>
|
|
814
|
+
<line number="240" hits="0" branch="false"/>
|
|
815
|
+
<line number="241" hits="0" branch="true" condition-coverage="0% (0/2)"/>
|
|
816
|
+
<line number="243" hits="0" branch="true" condition-coverage="0% (0/1)"/>
|
|
817
|
+
<line number="244" hits="0" branch="false"/>
|
|
824
818
|
<line number="247" hits="0" branch="false"/>
|
|
825
|
-
<line number="
|
|
826
|
-
<line number="
|
|
819
|
+
<line number="248" hits="0" branch="true" condition-coverage="0% (0/2)"/>
|
|
820
|
+
<line number="250" hits="0" branch="true" condition-coverage="0% (0/2)"/>
|
|
827
821
|
<line number="254" hits="0" branch="true" condition-coverage="0% (0/1)"/>
|
|
828
822
|
<line number="255" hits="0" branch="false"/>
|
|
829
823
|
<line number="258" hits="0" branch="false"/>
|
package/nrfutil/sandbox.ts
CHANGED
|
@@ -227,35 +227,35 @@ export class NrfutilSandbox {
|
|
|
227
227
|
controller
|
|
228
228
|
);
|
|
229
229
|
|
|
230
|
-
if (
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
`error: Code '${end.error?.code}' ${end.error?.description}, message: ${end.message}`
|
|
238
|
-
)
|
|
239
|
-
.join('\n');
|
|
240
|
-
throw new Error(stdErr ?? errorMessage);
|
|
230
|
+
if (
|
|
231
|
+
stdErr ||
|
|
232
|
+
taskEnd.filter(end => end.result === 'fail').length > 0
|
|
233
|
+
)
|
|
234
|
+
throw new Error('Task failed.');
|
|
235
|
+
|
|
236
|
+
return { taskEnd, info };
|
|
241
237
|
} catch (e) {
|
|
242
238
|
const error = e as Error;
|
|
243
|
-
let msg = error.message;
|
|
244
239
|
|
|
245
|
-
const
|
|
246
|
-
.
|
|
247
|
-
.filter(message => !!message)
|
|
248
|
-
.join('\n');
|
|
240
|
+
const addPunctuation = (str: string) =>
|
|
241
|
+
str.endsWith('.') ? str.trim() : `${str.trim()}.`;
|
|
249
242
|
|
|
250
|
-
if (
|
|
251
|
-
|
|
243
|
+
if (stdErr) {
|
|
244
|
+
error.message += `\n${addPunctuation(stdErr)}`;
|
|
252
245
|
}
|
|
253
246
|
|
|
254
|
-
|
|
255
|
-
|
|
247
|
+
const taskEndErrorMsg = taskEnd
|
|
248
|
+
.filter(end => end.result === 'fail' && !!end.message)
|
|
249
|
+
.map(end =>
|
|
250
|
+
end.message ? `Message: ${addPunctuation(end.message)}` : ''
|
|
251
|
+
)
|
|
252
|
+
.join('\n');
|
|
253
|
+
|
|
254
|
+
if (taskEndErrorMsg) {
|
|
255
|
+
error.message += `\n${taskEndErrorMsg}`;
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
error.message =
|
|
258
|
+
error.message = error.message.replaceAll('Error: ', '');
|
|
259
259
|
throw error;
|
|
260
260
|
}
|
|
261
261
|
};
|
|
@@ -345,7 +345,7 @@ export class NrfutilSandbox {
|
|
|
345
345
|
if (code === 0) {
|
|
346
346
|
resolve();
|
|
347
347
|
} else {
|
|
348
|
-
reject(new Error(`Failed with exit code ${code}
|
|
348
|
+
reject(new Error(`Failed with exit code ${code}.`));
|
|
349
349
|
}
|
|
350
350
|
});
|
|
351
351
|
});
|
package/package.json
CHANGED
|
@@ -102,7 +102,8 @@ export default ({
|
|
|
102
102
|
|
|
103
103
|
const generateMetaData = (col: number) => {
|
|
104
104
|
let child = masonryLayoutRef.current?.firstElementChild;
|
|
105
|
-
const
|
|
105
|
+
const offsetHeightMatrix: number[][] = [];
|
|
106
|
+
const scrollHeightMatrix: number[][] = [];
|
|
106
107
|
const zeroHeightChildren: boolean[] = [];
|
|
107
108
|
|
|
108
109
|
let i = 0;
|
|
@@ -111,11 +112,14 @@ export default ({
|
|
|
111
112
|
if (!child.hasAttribute('data-filler')) {
|
|
112
113
|
const rowIndex = Math.floor(i / col);
|
|
113
114
|
|
|
114
|
-
if (
|
|
115
|
-
|
|
115
|
+
if (offsetHeightMatrix[rowIndex] === undefined) {
|
|
116
|
+
offsetHeightMatrix[rowIndex] = [];
|
|
117
|
+
scrollHeightMatrix[rowIndex] = [];
|
|
116
118
|
}
|
|
117
119
|
|
|
118
|
-
const
|
|
120
|
+
const offsetHeightRow = offsetHeightMatrix[rowIndex];
|
|
121
|
+
const scrollHeightRow = scrollHeightMatrix[rowIndex];
|
|
122
|
+
let scrollHeightRowDiff = 0;
|
|
119
123
|
const columnIndex = i % col;
|
|
120
124
|
|
|
121
125
|
i += 1;
|
|
@@ -123,19 +127,34 @@ export default ({
|
|
|
123
127
|
child.offsetHeight <=
|
|
124
128
|
Number.parseInt(styles.margin, 10)
|
|
125
129
|
) {
|
|
126
|
-
|
|
130
|
+
offsetHeightRow[columnIndex] = 0;
|
|
127
131
|
zeroHeightChildren.push(true);
|
|
128
132
|
} else {
|
|
129
|
-
|
|
133
|
+
offsetHeightRow[columnIndex] =
|
|
134
|
+
child.offsetHeight + 1; // 1px to round as value might be decimal
|
|
135
|
+
scrollHeightRowDiff =
|
|
136
|
+
child.scrollHeight +
|
|
137
|
+
9 -
|
|
138
|
+
offsetHeightRow[columnIndex]; // 8 border bottom + 1px to round as value might be decimal
|
|
130
139
|
zeroHeightChildren.push(false);
|
|
131
140
|
}
|
|
141
|
+
|
|
142
|
+
scrollHeightRow[columnIndex] =
|
|
143
|
+
offsetHeightMatrix.reduce(
|
|
144
|
+
(p, c) => p + c[columnIndex],
|
|
145
|
+
0
|
|
146
|
+
) + scrollHeightRowDiff;
|
|
132
147
|
}
|
|
133
148
|
|
|
134
149
|
child = child.nextElementSibling;
|
|
135
150
|
}
|
|
136
151
|
}
|
|
137
152
|
|
|
138
|
-
return {
|
|
153
|
+
return {
|
|
154
|
+
offsetHeightMatrix,
|
|
155
|
+
scrollHeightMatrix,
|
|
156
|
+
hiddenChildren: zeroHeightChildren,
|
|
157
|
+
};
|
|
139
158
|
};
|
|
140
159
|
|
|
141
160
|
const calcData = (col: number) => {
|
|
@@ -143,7 +162,7 @@ export default ({
|
|
|
143
162
|
const heights: number[] = Array(col).fill(0);
|
|
144
163
|
const newOrder: number[] = [];
|
|
145
164
|
|
|
146
|
-
metaData.
|
|
165
|
+
metaData.offsetHeightMatrix.forEach(row => {
|
|
147
166
|
row.forEach(itemHeight => {
|
|
148
167
|
const smallest =
|
|
149
168
|
heights.findIndex(h => h === Math.min(...heights)) ?? 0;
|
|
@@ -153,7 +172,10 @@ export default ({
|
|
|
153
172
|
});
|
|
154
173
|
|
|
155
174
|
return {
|
|
156
|
-
maxHeight: Math.max(
|
|
175
|
+
maxHeight: Math.max(
|
|
176
|
+
...heights,
|
|
177
|
+
...metaData.scrollHeightMatrix.flat()
|
|
178
|
+
),
|
|
157
179
|
order: newOrder,
|
|
158
180
|
columnHeights: heights,
|
|
159
181
|
columns: Math.min(
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2015 Nordic Semiconductor ASA
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React, { useState } from 'react';
|
|
8
|
+
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
|
|
9
|
+
import Tooltip from 'react-bootstrap/Tooltip';
|
|
10
|
+
|
|
11
|
+
import './overlay.scss';
|
|
12
|
+
|
|
13
|
+
export default ({
|
|
14
|
+
keepShowingOnHoverTooltip,
|
|
15
|
+
/*
|
|
16
|
+
* To show a tooltip when hovering over disabled elements,
|
|
17
|
+
* add `pointer-events: none;`
|
|
18
|
+
*/
|
|
19
|
+
children,
|
|
20
|
+
tooltipId,
|
|
21
|
+
placement = 'bottom-start',
|
|
22
|
+
tooltipChildren,
|
|
23
|
+
}: {
|
|
24
|
+
keepShowingOnHoverTooltip?: boolean;
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
tooltipId: string;
|
|
27
|
+
placement?:
|
|
28
|
+
| 'top-start'
|
|
29
|
+
| 'top'
|
|
30
|
+
| 'top-end'
|
|
31
|
+
| 'right-start'
|
|
32
|
+
| 'right'
|
|
33
|
+
| 'right-end'
|
|
34
|
+
| 'bottom-end'
|
|
35
|
+
| 'bottom'
|
|
36
|
+
| 'bottom-start'
|
|
37
|
+
| 'left-end'
|
|
38
|
+
| 'left'
|
|
39
|
+
| 'left-start';
|
|
40
|
+
tooltipChildren: React.ReactNode;
|
|
41
|
+
}) => {
|
|
42
|
+
const [show, setShow] = useState<boolean>();
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<OverlayTrigger
|
|
46
|
+
placement={placement}
|
|
47
|
+
show={show}
|
|
48
|
+
delay={500}
|
|
49
|
+
overlay={
|
|
50
|
+
<Tooltip
|
|
51
|
+
id={tooltipId}
|
|
52
|
+
show={show}
|
|
53
|
+
className="shared-tooltip"
|
|
54
|
+
onMouseEnter={() => {
|
|
55
|
+
if (keepShowingOnHoverTooltip) {
|
|
56
|
+
setShow(true);
|
|
57
|
+
}
|
|
58
|
+
}}
|
|
59
|
+
onMouseLeave={() => {
|
|
60
|
+
setShow(undefined);
|
|
61
|
+
}}
|
|
62
|
+
onClick={e => e.stopPropagation()}
|
|
63
|
+
>
|
|
64
|
+
{tooltipChildren}
|
|
65
|
+
</Tooltip>
|
|
66
|
+
}
|
|
67
|
+
>
|
|
68
|
+
<div className="tw-cursor-help">{children}</div>
|
|
69
|
+
</OverlayTrigger>
|
|
70
|
+
);
|
|
71
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2015 Nordic Semiconductor ASA
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
@import '../variables.scss';
|
|
8
|
+
|
|
9
|
+
.shared-tooltip {
|
|
10
|
+
div.arrow:first-child {
|
|
11
|
+
width: 20px;
|
|
12
|
+
height: 20px;
|
|
13
|
+
pointer-events: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&.bs-tooltip-top {
|
|
17
|
+
div.arrow:first-child {
|
|
18
|
+
bottom: -14px;
|
|
19
|
+
|
|
20
|
+
&::before {
|
|
21
|
+
border-top-color: $gray-900;
|
|
22
|
+
border-width: 6px 6px 0 6px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.bs-tooltip-right {
|
|
28
|
+
div.arrow:first-child {
|
|
29
|
+
left: -14px;
|
|
30
|
+
|
|
31
|
+
&::before {
|
|
32
|
+
border-right-color: $gray-900;
|
|
33
|
+
border-width: 6px 6px 6px 0;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.bs-tooltip-bottom {
|
|
39
|
+
div.arrow:first-child {
|
|
40
|
+
top: -14px;
|
|
41
|
+
|
|
42
|
+
&::before {
|
|
43
|
+
border-bottom-color: $gray-900;
|
|
44
|
+
border-width: 0 6px 6px 6px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.bs-tooltip-left {
|
|
50
|
+
div.arrow:first-child {
|
|
51
|
+
right: -14px;
|
|
52
|
+
|
|
53
|
+
&::before {
|
|
54
|
+
border-left-color: $gray-900;
|
|
55
|
+
border-width: 6px 0 6px 6px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.tooltip-inner {
|
|
61
|
+
background: $gray-900;
|
|
62
|
+
padding-top: 14px;
|
|
63
|
+
min-width: 240px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
package/src/index.ts
CHANGED
|
@@ -40,6 +40,7 @@ export { default as Stepper } from './Stepper/Stepper';
|
|
|
40
40
|
export type { Step } from './Stepper/Stepper';
|
|
41
41
|
export { default as ExternalLink } from './Link/ExternalLink';
|
|
42
42
|
export { default as FileLink } from './Link/FileLink';
|
|
43
|
+
export { default as Overlay } from './Overlay/Overlay';
|
|
43
44
|
|
|
44
45
|
export { default as SidePanel } from './SidePanel/SidePanel';
|
|
45
46
|
export { Group, CollapsibleGroup } from './SidePanel/Group';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MasonryLayout.d.ts","sourceRoot":"","sources":["../../../../src/MasonryLayout/MasonryLayout.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAE,iBAAiB,EAA+B,MAAM,OAAO,CAAC;AAM9E,UAAU,uBAAuB;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAiED;;;;;;GAMG;6DAKA,kBAAkB,uBAAuB,CAAC;AAJ7C,
|
|
1
|
+
{"version":3,"file":"MasonryLayout.d.ts","sourceRoot":"","sources":["../../../../src/MasonryLayout/MasonryLayout.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAE,iBAAiB,EAA+B,MAAM,OAAO,CAAC;AAM9E,UAAU,uBAAuB;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAiED;;;;;;GAMG;6DAKA,kBAAkB,uBAAuB,CAAC;AAJ7C,wBAiKE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './overlay.scss';
|
|
3
|
+
declare const _default: ({ keepShowingOnHoverTooltip, children, tooltipId, placement, tooltipChildren, }: {
|
|
4
|
+
keepShowingOnHoverTooltip?: boolean | undefined;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
tooltipId: string;
|
|
7
|
+
placement?: "bottom" | "right" | "top" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | undefined;
|
|
8
|
+
tooltipChildren: React.ReactNode;
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=Overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../src/Overlay/Overlay.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,OAAO,gBAAgB,CAAC;;;cAcV,MAAM,SAAS;eACd,MAAM;;qBAcA,MAAM,SAAS;;AA3BpC,wBA0DE"}
|
|
@@ -30,6 +30,7 @@ export { default as Stepper } from './Stepper/Stepper';
|
|
|
30
30
|
export type { Step } from './Stepper/Stepper';
|
|
31
31
|
export { default as ExternalLink } from './Link/ExternalLink';
|
|
32
32
|
export { default as FileLink } from './Link/FileLink';
|
|
33
|
+
export { default as Overlay } from './Overlay/Overlay';
|
|
33
34
|
export { default as SidePanel } from './SidePanel/SidePanel';
|
|
34
35
|
export { Group, CollapsibleGroup } from './SidePanel/Group';
|
|
35
36
|
export { default as InlineInput } from './InlineInput/InlineInput';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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