@allurereport/web-awesome 3.0.0-beta.6 → 3.0.0-beta.8
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/.eslintrc.cjs +4 -1
- package/dist/multi/141.app-4375537b.js +1 -0
- package/dist/multi/222.app-4375537b.js +1 -0
- package/dist/multi/335.app-4375537b.js +1 -0
- package/dist/multi/34.app-4375537b.js +1 -0
- package/dist/multi/349.app-4375537b.js +1 -0
- package/dist/multi/378.app-4375537b.js +1 -0
- package/dist/multi/406.app-4375537b.js +1 -0
- package/dist/multi/476.app-4375537b.js +1 -0
- package/dist/multi/53.app-4375537b.js +1 -0
- package/dist/multi/584.app-4375537b.js +1 -0
- package/dist/multi/690.app-4375537b.js +1 -0
- package/dist/multi/747.app-4375537b.js +1 -0
- package/dist/multi/767.app-4375537b.js +1 -0
- package/dist/multi/83.app-4375537b.js +1 -0
- package/dist/multi/873.app-4375537b.js +1 -0
- package/dist/multi/920.app-4375537b.js +1 -0
- package/dist/multi/991.app-4375537b.js +1 -0
- package/dist/multi/app-4375537b.js +2 -0
- package/dist/multi/manifest.json +20 -20
- package/dist/multi/styles-4375537b.css +283 -0
- package/dist/single/app-f16f6693.js +2 -0
- package/dist/single/manifest.json +1 -1
- package/package.json +6 -4
- package/src/assets/scss/fonts.scss +2 -20
- package/src/components/{app/ArrowButton → ArrowButton}/index.tsx +3 -4
- package/src/components/{app/BaseLayout → BaseLayout}/index.tsx +17 -16
- package/src/components/{app/Footer → Footer}/FooterLogo.tsx +2 -2
- package/src/components/Footer/FooterVersion.tsx +33 -0
- package/src/components/Footer/index.tsx +13 -0
- package/src/components/Header/index.tsx +14 -0
- package/src/components/{app/LanguagePicker → LanguagePicker}/index.tsx +2 -3
- package/src/components/MainReport/index.tsx +19 -0
- package/src/components/{app/Metadata → Metadata}/index.tsx +23 -16
- package/src/components/{app/Metadata → Metadata}/styles.scss +1 -1
- package/src/components/{app/MetadataButton → MetadataButton}/index.tsx +3 -4
- package/src/components/{app/Modal → Modal}/index.tsx +9 -19
- package/src/components/{app/ReportBody → ReportBody}/Filters.tsx +7 -11
- package/src/components/{app/ReportBody → ReportBody}/HeaderActions.tsx +1 -1
- package/src/components/{app/ReportBody → ReportBody}/SortBy.tsx +12 -14
- package/src/components/{app/ReportBody → ReportBody}/index.tsx +2 -2
- package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderLabelList.tsx +2 -2
- package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderLogo.tsx +2 -2
- package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderPie.tsx +2 -2
- package/src/components/{app/ReportHeader → ReportHeader}/index.tsx +5 -5
- package/src/components/{app/ReportLogo → ReportLogo}/index.tsx +3 -4
- package/src/components/{app/ReportLogoFull → ReportLogoFull}/index.tsx +3 -4
- package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataItem.tsx +2 -2
- package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataSummary.tsx +8 -10
- package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataTestType.tsx +5 -5
- package/src/components/ReportMetadata/MetadataWithIcon.tsx +21 -0
- package/src/components/{app/ReportMetadata → ReportMetadata}/index.tsx +5 -5
- package/src/components/{app/ReportMetadata → ReportMetadata}/styles.scss +1 -1
- package/src/components/{app/Tabs → Tabs}/index.tsx +1 -1
- package/src/components/{app/TestResult → TestResult}/TestResultAttachmentsView/index.tsx +1 -1
- package/src/components/{app/TestResult → TestResult}/TestResultDescription/index.tsx +4 -4
- package/src/components/TestResult/TestResultDropdown/index.tsx +23 -0
- package/src/components/{app/TestResult → TestResult}/TestResultEmpty/index.tsx +5 -6
- package/src/components/TestResult/TestResultError/index.tsx +59 -0
- package/src/components/{app/TestResult → TestResult}/TestResultHeader/index.tsx +10 -10
- package/src/components/{app/TestResult → TestResult}/TestResultHistory/TestResultHistoryItem.tsx +16 -17
- package/src/components/{app/TestResult → TestResult}/TestResultHistory/index.tsx +2 -2
- package/src/components/{app/TestResult → TestResult}/TestResultInfo/TestResultInfoStatuses.tsx +8 -9
- package/src/components/{app/TestResult → TestResult}/TestResultInfo/index.tsx +8 -10
- package/src/components/{app/TestResult → TestResult}/TestResultLinks/index.tsx +12 -16
- package/src/components/{app/TestResult → TestResult}/TestResultMetadata/index.tsx +4 -4
- package/src/components/{app/TestResult → TestResult}/TestResultNavigation/index.tsx +7 -9
- package/src/components/{app/TestResult → TestResult}/TestResultOverview.tsx +13 -13
- package/src/components/{app/TestResult → TestResult}/TestResultParameters/index.tsx +4 -4
- package/src/components/{app/TestResult → TestResult}/TestResultPrevStatuses/index.tsx +6 -9
- package/src/components/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +52 -0
- package/src/components/TestResult/TestResultRetriesView/index.tsx +24 -0
- package/src/components/{app/TestResult → TestResult}/TestResultSetup/index.tsx +8 -9
- package/src/components/TestResult/TestResultSeverity/index.tsx +27 -0
- package/src/components/{app/TestResult → TestResult}/TestResultStatus/index.tsx +2 -2
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachment.tsx +10 -10
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachmentCode.tsx +7 -2
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachmentImage.tsx +6 -3
- package/src/components/TestResult/TestResultSteps/attachmentVideo.tsx +15 -0
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/index.tsx +5 -5
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultAttachment.tsx +25 -27
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultAttachmentInfo.tsx +8 -12
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultStep.tsx +25 -18
- package/src/components/TestResult/TestResultSteps/testResultStepInfo.tsx +30 -0
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/wrongAttachment.tsx +1 -1
- package/src/components/{app/TestResult → TestResult}/TestResultTabs/index.tsx +1 -1
- package/src/components/{app/TestResult → TestResult}/TestResultTeardown/index.tsx +6 -6
- package/src/components/{app/TestResult → TestResult}/index.tsx +10 -10
- package/src/components/{app/ThemeButton → ThemeButton}/ThemeButton.tsx +2 -4
- package/src/components/{app/Tree → Tree}/Tree.tsx +3 -10
- package/src/components/{app/Tree → Tree}/TreeHeader.tsx +3 -3
- package/src/components/{app/Tree → Tree}/TreeItem.tsx +2 -2
- package/src/components/Tree/TreeItemIcon.tsx +32 -0
- package/src/components/{app/Tree → Tree}/index.tsx +7 -7
- package/src/i18n/locales/en.json +1 -0
- package/src/index.tsx +2 -2
- package/src/stores/index.ts +1 -1
- package/src/stores/testResults.ts +7 -3
- package/src/stores/tree.ts +1 -1
- package/src/utils/isMac.ts +6 -5
- package/src/utils/treeFilters.ts +107 -58
- package/test/utils/treeFilters.test.ts +25 -1
- package/tsconfig.json +5 -3
- package/vitest.config.ts +7 -1
- package/webpack.config.js +2 -0
- package/dist/multi/141.app-07a6d2ea.js +0 -1
- package/dist/multi/222.app-07a6d2ea.js +0 -1
- package/dist/multi/335.app-07a6d2ea.js +0 -1
- package/dist/multi/34.app-07a6d2ea.js +0 -1
- package/dist/multi/349.app-07a6d2ea.js +0 -1
- package/dist/multi/378.app-07a6d2ea.js +0 -1
- package/dist/multi/406.app-07a6d2ea.js +0 -1
- package/dist/multi/476.app-07a6d2ea.js +0 -1
- package/dist/multi/53.app-07a6d2ea.js +0 -1
- package/dist/multi/584.app-07a6d2ea.js +0 -1
- package/dist/multi/690.app-07a6d2ea.js +0 -1
- package/dist/multi/747.app-07a6d2ea.js +0 -1
- package/dist/multi/767.app-07a6d2ea.js +0 -1
- package/dist/multi/83.app-07a6d2ea.js +0 -1
- package/dist/multi/873.app-07a6d2ea.js +0 -1
- package/dist/multi/920.app-07a6d2ea.js +0 -1
- package/dist/multi/991.app-07a6d2ea.js +0 -1
- package/dist/multi/app-07a6d2ea.js +0 -2
- package/dist/multi/styles-07a6d2ea.css +0 -363
- package/dist/single/app-c2627b69.js +0 -2
- package/src/assets/fonts/JetBrainsMono_vf.woff +0 -0
- package/src/assets/fonts/JetBrainsMono_vf.woff2 +0 -0
- package/src/assets/fonts/pt-root-ui_vf.woff +0 -0
- package/src/assets/fonts/pt-root-ui_vf.woff2 +0 -0
- package/src/assets/scss/mixins.scss +0 -26
- package/src/assets/svg/arrows-chevron-down.svg +0 -5
- package/src/assets/svg/github.svg +0 -5
- package/src/assets/svg/line-alerts-notification-box.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-down-double.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-down.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-right.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-up-double.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-up.svg +0 -3
- package/src/assets/svg/line-arrows-corner-down-right.svg +0 -3
- package/src/assets/svg/line-arrows-expand-3.svg +0 -3
- package/src/assets/svg/line-arrows-refresh-ccw-1.svg +0 -3
- package/src/assets/svg/line-arrows-sort-line-asc.svg +0 -3
- package/src/assets/svg/line-arrows-sort-line-desc.svg +0 -3
- package/src/assets/svg/line-arrows-switch-vertical-1.svg +0 -3
- package/src/assets/svg/line-dev-bug-2.svg +0 -3
- package/src/assets/svg/line-dev-code-square.svg +0 -3
- package/src/assets/svg/line-files-file-attachment-2.svg +0 -3
- package/src/assets/svg/line-general-check.svg +0 -3
- package/src/assets/svg/line-general-checklist3.svg +0 -3
- package/src/assets/svg/line-general-copy-3.svg +0 -3
- package/src/assets/svg/line-general-download-cloud.svg +0 -3
- package/src/assets/svg/line-general-equal.svg +0 -3
- package/src/assets/svg/line-general-home-line.svg +0 -3
- package/src/assets/svg/line-general-link-1.svg +0 -3
- package/src/assets/svg/line-general-link-external.svg +0 -3
- package/src/assets/svg/line-general-search-md.svg +0 -3
- package/src/assets/svg/line-general-settings-1.svg +0 -3
- package/src/assets/svg/line-general-x-close.svg +0 -3
- package/src/assets/svg/line-general-zap.svg +0 -3
- package/src/assets/svg/line-helpers-flag.svg +0 -4
- package/src/assets/svg/line-helpers-play-circle.svg +0 -4
- package/src/assets/svg/line-images-image.svg +0 -3
- package/src/assets/svg/line-security-key.svg +0 -3
- package/src/assets/svg/line-shapes-dot-circle.svg +0 -3
- package/src/assets/svg/line-shapes-moon.svg +0 -3
- package/src/assets/svg/line-shapes-sun.svg +0 -3
- package/src/assets/svg/line-time-clock-stopwatch.svg +0 -3
- package/src/assets/svg/report-logo.svg +0 -64
- package/src/assets/svg/solid-alert-circle.svg +0 -3
- package/src/assets/svg/solid-check-circle.svg +0 -3
- package/src/assets/svg/solid-help-circle.svg +0 -3
- package/src/assets/svg/solid-minus-circle.svg +0 -3
- package/src/assets/svg/solid-x-circle.svg +0 -3
- package/src/assets/svg/spinner.svg +0 -18
- package/src/assets/svg/view-off.svg +0 -12
- package/src/assets/svg/view.svg +0 -11
- package/src/components/app/Footer/FooterVersion.tsx +0 -27
- package/src/components/app/Footer/index.tsx +0 -13
- package/src/components/app/Header/index.tsx +0 -17
- package/src/components/app/MainReport/index.tsx +0 -19
- package/src/components/app/ReportMetadata/MetadataWithIcon.tsx +0 -25
- package/src/components/app/TestResult/TestResultDropdown/index.tsx +0 -19
- package/src/components/app/TestResult/TestResultError/index.tsx +0 -53
- package/src/components/app/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +0 -50
- package/src/components/app/TestResult/TestResultRetriesView/index.tsx +0 -24
- package/src/components/app/TestResult/TestResultSeverity/index.tsx +0 -34
- package/src/components/app/TestResult/TestResultSteps/attachmentVideo.tsx +0 -12
- package/src/components/app/TestResult/TestResultSteps/testResultStepInfo.tsx +0 -33
- package/src/components/app/Tree/TreeItemIcon.tsx +0 -35
- package/src/components/commons/Button/index.tsx +0 -176
- package/src/components/commons/Button/styles.scss +0 -560
- package/src/components/commons/Counter/index.tsx +0 -29
- package/src/components/commons/Counter/styles.scss +0 -21
- package/src/components/commons/Label/index.tsx +0 -11
- package/src/components/commons/Label/styles.scss +0 -7
- package/src/components/commons/Link/index.tsx +0 -20
- package/src/components/commons/Link/styles.scss +0 -46
- package/src/components/commons/Loadable/index.tsx +0 -32
- package/src/components/commons/Menu/index.tsx +0 -198
- package/src/components/commons/Menu/styles.scss +0 -94
- package/src/components/commons/PageLoader/index.tsx +0 -10
- package/src/components/commons/PageLoader/styles.scss +0 -29
- package/src/components/commons/SearchBox/index.tsx +0 -64
- package/src/components/commons/SearchBox/styles.scss +0 -58
- package/src/components/commons/Spinner/index.tsx +0 -8
- package/src/components/commons/SuccessRatePieChart/index.tsx +0 -52
- package/src/components/commons/SuccessRatePieChart/styles.scss +0 -11
- package/src/components/commons/SvgIcon/index.tsx +0 -46
- package/src/components/commons/SvgIcon/styles.scss +0 -26
- package/src/components/commons/Toggle/index.tsx +0 -30
- package/src/components/commons/Toggle/styles.scss +0 -48
- package/src/components/commons/Tooltip/index.tsx +0 -123
- package/src/components/commons/Tooltip/styles.scss +0 -38
- package/src/components/commons/Typography/index.tsx +0 -99
- package/src/hooks/useDebouncedCallback.ts +0 -31
- /package/dist/multi/{816.app-07a6d2ea.js → 816.app-4375537b.js} +0 -0
- /package/dist/multi/{app-07a6d2ea.js.LICENSE.txt → app-4375537b.js.LICENSE.txt} +0 -0
- /package/dist/single/{app-c2627b69.js.LICENSE.txt → app-f16f6693.js.LICENSE.txt} +0 -0
- /package/src/assets/scss/{code.css → code.scss} +0 -0
- /package/src/components/{app/ArrowButton → ArrowButton}/styles.scss +0 -0
- /package/src/components/{app/BaseLayout → BaseLayout}/styles.scss +0 -0
- /package/src/components/{app/Footer → Footer}/styles.scss +0 -0
- /package/src/components/{app/Header → Header}/styles.scss +0 -0
- /package/src/components/{app/MetadataButton → MetadataButton}/styles.scss +0 -0
- /package/src/components/{app/Modal → Modal}/styles.scss +0 -0
- /package/src/components/{app/ReportBody → ReportBody}/context.tsx +0 -0
- /package/src/components/{app/ReportBody → ReportBody}/styles.scss +0 -0
- /package/src/components/{app/ReportHeader → ReportHeader}/styles.scss +0 -0
- /package/src/components/{app/ReportLogo → ReportLogo}/styles.scss +0 -0
- /package/src/components/{app/ReportLogoFull → ReportLogoFull}/styles.scss +0 -0
- /package/src/components/{app/Tabs → Tabs}/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultAttachmentsView/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultDescription/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultDropdown/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultEmpty/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultError/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultHeader/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultHistory/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultInfo/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultLinks/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultMetadata/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultNavigation/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultParameters/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultPrevStatuses/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultRetriesView/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultSeverity/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultStatus/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultSteps/HtmlAttachmentPreview.tsx +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultSteps/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultTabs/styles.scss +0 -0
- /package/src/components/{app/Tree → Tree}/styles.scss +0 -0
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
.toggle {
|
|
2
|
-
padding: 0;
|
|
3
|
-
margin: 0;
|
|
4
|
-
appearance: none;
|
|
5
|
-
width: 28px;
|
|
6
|
-
height: 16px;
|
|
7
|
-
background-color: var(--bg-base-neutral);
|
|
8
|
-
position: relative;
|
|
9
|
-
border-radius: 9px;
|
|
10
|
-
padding: 2px;
|
|
11
|
-
transition: background-color var(--color-change-transition-duration);
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
|
|
14
|
-
&:hover {
|
|
15
|
-
background-color: var(--on-icon-secondary);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&:active {
|
|
19
|
-
background-color: var(--on-icon-primary);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&:checked {
|
|
23
|
-
background-color: var(--bg-support-aldebaran);
|
|
24
|
-
|
|
25
|
-
&:hover {
|
|
26
|
-
background-color: var(--bg-support-aldebaran-medium);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&:active {
|
|
30
|
-
background-color: var(--bg-support-aldebaran-heavy);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&::after {
|
|
34
|
-
transform: translateX(12px);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&::after {
|
|
39
|
-
content: "";
|
|
40
|
-
display: block;
|
|
41
|
-
width: 12px;
|
|
42
|
-
height: 12px;
|
|
43
|
-
border-radius: 100px;
|
|
44
|
-
background-color: var(--constant-on-icon-primary);
|
|
45
|
-
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);
|
|
46
|
-
transition: transform var(--interaction-transition-duration) ease-out;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { autoUpdate, computePosition, flip, offset, shift } from "@floating-ui/dom";
|
|
2
|
-
import { FunctionalComponent, VNode } from "preact";
|
|
3
|
-
import { useEffect, useRef, useState } from "preact/hooks";
|
|
4
|
-
import { Text } from "@/components/commons/Typography";
|
|
5
|
-
import * as styles from "./styles.scss";
|
|
6
|
-
|
|
7
|
-
interface TooltipWrapperProps {
|
|
8
|
-
tooltipText?: string;
|
|
9
|
-
tooltipTextAfterClick?: string;
|
|
10
|
-
tooltipComponent?: FunctionalComponent | VNode;
|
|
11
|
-
children: VNode;
|
|
12
|
-
placement?: "top" | "bottom" | "left" | "right";
|
|
13
|
-
triggerMode?: "hover" | "click";
|
|
14
|
-
autoHideDelay?: number;
|
|
15
|
-
isTriggerActive?: boolean;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const Tooltip = ({ children }) => (
|
|
19
|
-
<div className={styles[`custom-tooltip`]}>
|
|
20
|
-
<Text className="tooltip-content" size={"s"} bold>
|
|
21
|
-
{children}
|
|
22
|
-
</Text>
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
export const TooltipWrapper: FunctionalComponent<TooltipWrapperProps> = ({
|
|
27
|
-
tooltipText,
|
|
28
|
-
tooltipTextAfterClick,
|
|
29
|
-
tooltipComponent,
|
|
30
|
-
children,
|
|
31
|
-
placement = "top",
|
|
32
|
-
triggerMode = "hover",
|
|
33
|
-
autoHideDelay = 600,
|
|
34
|
-
isTriggerActive = true,
|
|
35
|
-
}) => {
|
|
36
|
-
const tooltipRef = useRef<HTMLDivElement | null>(null);
|
|
37
|
-
const triggerRef = useRef<HTMLDivElement | null>(null);
|
|
38
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
39
|
-
const [currentText, setCurrentText] = useState(tooltipText);
|
|
40
|
-
const hideTimer = useRef<number | null>(null);
|
|
41
|
-
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
setCurrentText(tooltipText);
|
|
44
|
-
const updatePosition = () => {
|
|
45
|
-
if (triggerRef.current && tooltipRef.current) {
|
|
46
|
-
computePosition(triggerRef.current, tooltipRef.current, {
|
|
47
|
-
placement,
|
|
48
|
-
middleware: [offset(6), flip(), shift({ padding: 5 })],
|
|
49
|
-
}).then(({ x, y }) => {
|
|
50
|
-
if (tooltipRef.current) {
|
|
51
|
-
Object.assign(tooltipRef.current.style, {
|
|
52
|
-
"left": `${x}px`,
|
|
53
|
-
"top": `${y}px`,
|
|
54
|
-
"position": "absolute",
|
|
55
|
-
"z-index": 100,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const cleanup = () =>
|
|
63
|
-
triggerRef.current && tooltipRef.current
|
|
64
|
-
? autoUpdate(triggerRef.current, tooltipRef.current, updatePosition)
|
|
65
|
-
: () => {};
|
|
66
|
-
|
|
67
|
-
if (isVisible) {
|
|
68
|
-
updatePosition();
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return cleanup();
|
|
72
|
-
}, [isVisible, placement, tooltipText]);
|
|
73
|
-
|
|
74
|
-
const onMouseEnter = () => {
|
|
75
|
-
if (triggerMode === "hover" && isTriggerActive) setIsVisible(true);
|
|
76
|
-
|
|
77
|
-
if (triggerMode === "click" && hideTimer.current) {
|
|
78
|
-
clearTimeout(hideTimer.current);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
const onMouseLeave = () => {
|
|
83
|
-
if (triggerMode === "hover") {
|
|
84
|
-
setIsVisible(false);
|
|
85
|
-
setCurrentText(tooltipText);
|
|
86
|
-
} else if (triggerMode === "click" && isVisible) {
|
|
87
|
-
hideTimer.current = window.setTimeout(() => {
|
|
88
|
-
setIsVisible(false);
|
|
89
|
-
}, autoHideDelay);
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
const onClick = () => {
|
|
94
|
-
if (triggerMode === "click") {
|
|
95
|
-
if (triggerRef.current && isTriggerActive) {
|
|
96
|
-
setIsVisible(true);
|
|
97
|
-
if (hideTimer.current) {
|
|
98
|
-
clearTimeout(hideTimer.current);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if (tooltipTextAfterClick) {
|
|
103
|
-
setCurrentText(tooltipTextAfterClick);
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
useEffect(() => {
|
|
108
|
-
return () => {
|
|
109
|
-
if (hideTimer.current) {
|
|
110
|
-
clearTimeout(hideTimer.current);
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
}, []);
|
|
114
|
-
|
|
115
|
-
const tooltipContent = tooltipComponent ? tooltipComponent : <Tooltip>{currentText}</Tooltip>;
|
|
116
|
-
|
|
117
|
-
return (
|
|
118
|
-
<div onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave} onClick={onClick}>
|
|
119
|
-
<div ref={triggerRef}>{children}</div>
|
|
120
|
-
<div ref={tooltipRef}>{isVisible && tooltipContent}</div>
|
|
121
|
-
</div>
|
|
122
|
-
);
|
|
123
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
.custom-tooltip {
|
|
2
|
-
z-index: 1000;
|
|
3
|
-
background-color: var(--constant-bg-base-modal);
|
|
4
|
-
color: var(--constant-on-text-primary);
|
|
5
|
-
padding: 2px 8px;
|
|
6
|
-
border-radius: 6px;
|
|
7
|
-
font-size: 12px;
|
|
8
|
-
max-width: 600px;
|
|
9
|
-
min-width: max-content;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.custom-tooltip--top {
|
|
13
|
-
bottom: 100%;
|
|
14
|
-
left: 50%;
|
|
15
|
-
transform: translateX(-50%);
|
|
16
|
-
margin-bottom: 4px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.custom-tooltip--bottom {
|
|
20
|
-
top: 100%;
|
|
21
|
-
left: 50%;
|
|
22
|
-
transform: translateX(-50%);
|
|
23
|
-
margin-top: 4px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.custom-tooltip--left {
|
|
27
|
-
right: 100%;
|
|
28
|
-
top: 50%;
|
|
29
|
-
transform: translateY(-50%);
|
|
30
|
-
margin-top: 4px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.custom-tooltip--right {
|
|
34
|
-
left: 100%;
|
|
35
|
-
top: 50%;
|
|
36
|
-
transform: translateY(-50%);
|
|
37
|
-
margin-top: 4px;
|
|
38
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { clsx } from "clsx";
|
|
2
|
-
import type { FunctionalComponent, JSX } from "preact";
|
|
3
|
-
|
|
4
|
-
export const Text: FunctionalComponent<
|
|
5
|
-
(
|
|
6
|
-
| {
|
|
7
|
-
type?: "paragraph";
|
|
8
|
-
size?: "s" | "m" | "l";
|
|
9
|
-
}
|
|
10
|
-
| {
|
|
11
|
-
type: "ui";
|
|
12
|
-
size: "s" | "m" | "l" | "xs";
|
|
13
|
-
}
|
|
14
|
-
) & {
|
|
15
|
-
/**
|
|
16
|
-
* Additional class name
|
|
17
|
-
*/
|
|
18
|
-
className?: string;
|
|
19
|
-
bold?: boolean;
|
|
20
|
-
tag?: keyof JSX.IntrinsicElements;
|
|
21
|
-
} & Omit<JSX.HTMLAttributes, "type" | "size" | "className" | "bold" | "tag">
|
|
22
|
-
> = (props) => {
|
|
23
|
-
const { size = "m", tag: Tag = "span", type = "paragraph", bold = false, className, children, ...rest } = props;
|
|
24
|
-
|
|
25
|
-
if (type === "paragraph") {
|
|
26
|
-
return (
|
|
27
|
-
// @ts-expect-error this is fine
|
|
28
|
-
<Tag {...rest} className={clsx(`paragraphs-text-${size}${bold ? "-bold" : ""}`, className)}>
|
|
29
|
-
{children}
|
|
30
|
-
</Tag>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (type === "ui") {
|
|
35
|
-
return (
|
|
36
|
-
// @ts-expect-error this is fine
|
|
37
|
-
<Tag {...rest} className={clsx(`ui-text-${size}-ui${bold ? "-bold" : ""}`, className)}>
|
|
38
|
-
{children}
|
|
39
|
-
</Tag>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return null;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export const Code: FunctionalComponent<
|
|
47
|
-
{
|
|
48
|
-
type?: "paragraph" | "ui";
|
|
49
|
-
size?: "s" | "m";
|
|
50
|
-
/**
|
|
51
|
-
* Additional class name
|
|
52
|
-
*/
|
|
53
|
-
className?: string;
|
|
54
|
-
bold?: boolean;
|
|
55
|
-
tag?: keyof JSX.IntrinsicElements;
|
|
56
|
-
} & Omit<JSX.HTMLAttributes, "type" | "size" | "className" | "bold" | "tag">
|
|
57
|
-
> = (props) => {
|
|
58
|
-
const { size = "m", tag: Tag = "span", type = "paragraph", bold = false, className, children, ...rest } = props;
|
|
59
|
-
|
|
60
|
-
if (type === "paragraph") {
|
|
61
|
-
return (
|
|
62
|
-
// @ts-expect-error this is fine
|
|
63
|
-
<Tag {...rest} className={clsx(`paragraphs-code-${size}${bold ? "-bold" : ""}`, className)}>
|
|
64
|
-
{children}
|
|
65
|
-
</Tag>
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if (type === "ui") {
|
|
70
|
-
return (
|
|
71
|
-
// @ts-expect-error this is fine
|
|
72
|
-
<Tag {...rest} className={clsx(`ui-code-${size}-ui${bold ? "-bold" : ""}`, className)}>
|
|
73
|
-
{children}
|
|
74
|
-
</Tag>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return null;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export const Heading: FunctionalComponent<
|
|
82
|
-
{
|
|
83
|
-
size?: "s" | "m" | "l";
|
|
84
|
-
/**
|
|
85
|
-
* Additional class name
|
|
86
|
-
*/
|
|
87
|
-
className?: string;
|
|
88
|
-
tag?: keyof JSX.IntrinsicElements;
|
|
89
|
-
} & Omit<JSX.HTMLAttributes, "size" | "className" | "tag">
|
|
90
|
-
> = (props) => {
|
|
91
|
-
const { size = "m", tag: Tag = "span", className, children, ...rest } = props;
|
|
92
|
-
|
|
93
|
-
return (
|
|
94
|
-
// @ts-expect-error this is fine
|
|
95
|
-
<Tag {...rest} className={clsx(`headings-head-${size}`, className)}>
|
|
96
|
-
{children}
|
|
97
|
-
</Tag>
|
|
98
|
-
);
|
|
99
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useCallback, useEffect, useRef } from "preact/hooks";
|
|
2
|
-
|
|
3
|
-
const DEFAULT_TIMEOUT = 300;
|
|
4
|
-
|
|
5
|
-
function debounce(cb: () => void, timeout = DEFAULT_TIMEOUT) {
|
|
6
|
-
let timer: ReturnType<typeof setTimeout>;
|
|
7
|
-
|
|
8
|
-
return (...args: unknown[]) => {
|
|
9
|
-
clearTimeout(timer);
|
|
10
|
-
timer = setTimeout(() => {
|
|
11
|
-
cb.apply(this, args);
|
|
12
|
-
}, timeout);
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function useDebouncedCallback<Callback extends (...args: unknown[]) => void>(
|
|
17
|
-
cb: Callback,
|
|
18
|
-
timeout = DEFAULT_TIMEOUT,
|
|
19
|
-
) {
|
|
20
|
-
const cbRef = useRef(cb);
|
|
21
|
-
|
|
22
|
-
cbRef.current = cb;
|
|
23
|
-
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
return () => {
|
|
26
|
-
cbRef.current = (() => {}) as Callback;
|
|
27
|
-
};
|
|
28
|
-
}, []);
|
|
29
|
-
|
|
30
|
-
return useCallback<Callback>(debounce((...args) => cbRef.current(...args), timeout) as Callback, [timeout]);
|
|
31
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/components/{app/TestResult → TestResult}/TestResultSteps/HtmlAttachmentPreview.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|