@allurereport/web-awesome 3.0.0-beta.3
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/.babelrc.js +46 -0
- package/.eslintrc.cjs +15 -0
- package/README.md +27 -0
- package/dist/multi/141.app-b6362ca0.js +1 -0
- package/dist/multi/222.app-b6362ca0.js +1 -0
- package/dist/multi/335.app-b6362ca0.js +1 -0
- package/dist/multi/34.app-b6362ca0.js +1 -0
- package/dist/multi/349.app-b6362ca0.js +1 -0
- package/dist/multi/378.app-b6362ca0.js +1 -0
- package/dist/multi/406.app-b6362ca0.js +1 -0
- package/dist/multi/476.app-b6362ca0.js +1 -0
- package/dist/multi/53.app-b6362ca0.js +1 -0
- package/dist/multi/584.app-b6362ca0.js +1 -0
- package/dist/multi/690.app-b6362ca0.js +1 -0
- package/dist/multi/747.app-b6362ca0.js +1 -0
- package/dist/multi/767.app-b6362ca0.js +1 -0
- package/dist/multi/816.app-b6362ca0.js +1 -0
- package/dist/multi/83.app-b6362ca0.js +1 -0
- package/dist/multi/873.app-b6362ca0.js +1 -0
- package/dist/multi/920.app-b6362ca0.js +1 -0
- package/dist/multi/991.app-b6362ca0.js +1 -0
- package/dist/multi/JetBrainsMono_vf-9e9649b6..woff2 +0 -0
- package/dist/multi/JetBrainsMono_vf-b9a9c326..woff +0 -0
- package/dist/multi/app-b6362ca0.js +2 -0
- package/dist/multi/app-b6362ca0.js.LICENSE.txt +16 -0
- package/dist/multi/manifest.json +26 -0
- package/dist/multi/pt-root-ui_vf-22fe60ca..woff +0 -0
- package/dist/multi/pt-root-ui_vf-9d251e8b..woff2 +0 -0
- package/dist/multi/styles-b6362ca0.css +363 -0
- package/dist/single/app-57ae0a60.js +2 -0
- package/dist/single/app-57ae0a60.js.LICENSE.txt +16 -0
- package/dist/single/manifest.json +3 -0
- package/package.json +93 -0
- package/postcss.config.js +5 -0
- 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/_common.scss +134 -0
- package/src/assets/scss/code.css +71 -0
- package/src/assets/scss/day.scss +51 -0
- package/src/assets/scss/fonts.scss +21 -0
- package/src/assets/scss/index.scss +9 -0
- package/src/assets/scss/mixins.scss +26 -0
- package/src/assets/scss/night.scss +61 -0
- package/src/assets/scss/palette.scss +393 -0
- package/src/assets/scss/theme.scss +117 -0
- package/src/assets/scss/typography.scss +218 -0
- package/src/assets/scss/vars.scss +8 -0
- package/src/assets/svg/arrows-chevron-down.svg +5 -0
- package/src/assets/svg/github.svg +5 -0
- package/src/assets/svg/line-alerts-notification-box.svg +3 -0
- package/src/assets/svg/line-arrows-chevron-down-double.svg +3 -0
- package/src/assets/svg/line-arrows-chevron-down.svg +3 -0
- package/src/assets/svg/line-arrows-chevron-right.svg +3 -0
- package/src/assets/svg/line-arrows-chevron-up-double.svg +3 -0
- package/src/assets/svg/line-arrows-chevron-up.svg +3 -0
- package/src/assets/svg/line-arrows-corner-down-right.svg +3 -0
- package/src/assets/svg/line-arrows-expand-3.svg +3 -0
- package/src/assets/svg/line-arrows-refresh-ccw-1.svg +3 -0
- package/src/assets/svg/line-arrows-sort-line-asc.svg +3 -0
- package/src/assets/svg/line-arrows-sort-line-desc.svg +3 -0
- package/src/assets/svg/line-arrows-switch-vertical-1.svg +3 -0
- package/src/assets/svg/line-dev-bug-2.svg +3 -0
- package/src/assets/svg/line-dev-code-square.svg +3 -0
- package/src/assets/svg/line-files-file-attachment-2.svg +3 -0
- package/src/assets/svg/line-general-check.svg +3 -0
- package/src/assets/svg/line-general-checklist3.svg +3 -0
- package/src/assets/svg/line-general-copy-3.svg +3 -0
- package/src/assets/svg/line-general-download-cloud.svg +3 -0
- package/src/assets/svg/line-general-equal.svg +3 -0
- package/src/assets/svg/line-general-home-line.svg +3 -0
- package/src/assets/svg/line-general-link-1.svg +3 -0
- package/src/assets/svg/line-general-link-external.svg +3 -0
- package/src/assets/svg/line-general-search-md.svg +3 -0
- package/src/assets/svg/line-general-settings-1.svg +3 -0
- package/src/assets/svg/line-general-x-close.svg +3 -0
- package/src/assets/svg/line-general-zap.svg +3 -0
- package/src/assets/svg/line-helpers-flag.svg +4 -0
- package/src/assets/svg/line-helpers-play-circle.svg +4 -0
- package/src/assets/svg/line-images-image.svg +3 -0
- package/src/assets/svg/line-security-key.svg +3 -0
- package/src/assets/svg/line-shapes-dot-circle.svg +3 -0
- package/src/assets/svg/line-shapes-moon.svg +3 -0
- package/src/assets/svg/line-shapes-sun.svg +3 -0
- package/src/assets/svg/line-time-clock-stopwatch.svg +3 -0
- package/src/assets/svg/report-logo.svg +64 -0
- package/src/assets/svg/solid-alert-circle.svg +3 -0
- package/src/assets/svg/solid-check-circle.svg +3 -0
- package/src/assets/svg/solid-help-circle.svg +3 -0
- package/src/assets/svg/solid-minus-circle.svg +3 -0
- package/src/assets/svg/solid-x-circle.svg +3 -0
- package/src/assets/svg/spinner.svg +18 -0
- package/src/assets/svg/view-off.svg +12 -0
- package/src/assets/svg/view.svg +11 -0
- package/src/components/app/ArrowButton/index.tsx +36 -0
- package/src/components/app/ArrowButton/styles.scss +32 -0
- package/src/components/app/BaseLayout/index.tsx +60 -0
- package/src/components/app/BaseLayout/styles.scss +60 -0
- package/src/components/app/Footer/FooterLogo.tsx +16 -0
- package/src/components/app/Footer/FooterVersion.tsx +27 -0
- package/src/components/app/Footer/index.tsx +13 -0
- package/src/components/app/Footer/styles.scss +14 -0
- package/src/components/app/Header/index.tsx +17 -0
- package/src/components/app/Header/styles.scss +26 -0
- package/src/components/app/LanguagePicker/index.tsx +41 -0
- package/src/components/app/MainReport/index.tsx +19 -0
- package/src/components/app/Metadata/index.tsx +114 -0
- package/src/components/app/Metadata/styles.scss +146 -0
- package/src/components/app/MetadataButton/index.tsx +33 -0
- package/src/components/app/MetadataButton/styles.scss +53 -0
- package/src/components/app/Modal/index.tsx +184 -0
- package/src/components/app/Modal/styles.scss +126 -0
- package/src/components/app/ReportBody/Filters.tsx +94 -0
- package/src/components/app/ReportBody/HeaderActions.tsx +21 -0
- package/src/components/app/ReportBody/SortBy.tsx +134 -0
- package/src/components/app/ReportBody/context.tsx +107 -0
- package/src/components/app/ReportBody/index.tsx +71 -0
- package/src/components/app/ReportBody/styles.scss +64 -0
- package/src/components/app/ReportHeader/ReportHeaderLabelList.tsx +12 -0
- package/src/components/app/ReportHeader/ReportHeaderLogo.tsx +10 -0
- package/src/components/app/ReportHeader/ReportHeaderPie.tsx +14 -0
- package/src/components/app/ReportHeader/index.tsx +33 -0
- package/src/components/app/ReportHeader/styles.scss +49 -0
- package/src/components/app/ReportLogo/index.tsx +17 -0
- package/src/components/app/ReportLogo/styles.scss +20 -0
- package/src/components/app/ReportLogoFull/index.tsx +21 -0
- package/src/components/app/ReportLogoFull/styles.scss +7 -0
- package/src/components/app/ReportMetadata/MetadataItem.tsx +45 -0
- package/src/components/app/ReportMetadata/MetadataSummary.tsx +79 -0
- package/src/components/app/ReportMetadata/MetadataTestType.tsx +16 -0
- package/src/components/app/ReportMetadata/MetadataWithIcon.tsx +25 -0
- package/src/components/app/ReportMetadata/index.tsx +46 -0
- package/src/components/app/ReportMetadata/styles.scss +99 -0
- package/src/components/app/Tabs/index.tsx +58 -0
- package/src/components/app/Tabs/styles.scss +56 -0
- package/src/components/app/TestResult/TestResultAttachmentsView/index.tsx +27 -0
- package/src/components/app/TestResult/TestResultAttachmentsView/styles.scss +12 -0
- package/src/components/app/TestResult/TestResultDescription/index.tsx +27 -0
- package/src/components/app/TestResult/TestResultDescription/styles.scss +12 -0
- package/src/components/app/TestResult/TestResultDropdown/index.tsx +19 -0
- package/src/components/app/TestResult/TestResultDropdown/styles.scss +34 -0
- package/src/components/app/TestResult/TestResultEmpty/index.tsx +34 -0
- package/src/components/app/TestResult/TestResultEmpty/styles.scss +25 -0
- package/src/components/app/TestResult/TestResultError/index.tsx +51 -0
- package/src/components/app/TestResult/TestResultError/styles.scss +40 -0
- package/src/components/app/TestResult/TestResultHeader/index.tsx +55 -0
- package/src/components/app/TestResult/TestResultHeader/styles.scss +43 -0
- package/src/components/app/TestResult/TestResultHistory/TestResultHistoryItem.tsx +57 -0
- package/src/components/app/TestResult/TestResultHistory/index.tsx +26 -0
- package/src/components/app/TestResult/TestResultHistory/styles.scss +63 -0
- package/src/components/app/TestResult/TestResultInfo/index.tsx +79 -0
- package/src/components/app/TestResult/TestResultInfo/styles.scss +33 -0
- package/src/components/app/TestResult/TestResultLinks/index.tsx +60 -0
- package/src/components/app/TestResult/TestResultLinks/styles.scss +30 -0
- package/src/components/app/TestResult/TestResultMetadata/index.tsx +27 -0
- package/src/components/app/TestResult/TestResultMetadata/styles.scss +8 -0
- package/src/components/app/TestResult/TestResultNavigation/index.tsx +89 -0
- package/src/components/app/TestResult/TestResultNavigation/styles.scss +48 -0
- package/src/components/app/TestResult/TestResultOverview.tsx +40 -0
- package/src/components/app/TestResult/TestResultParameters/index.tsx +30 -0
- package/src/components/app/TestResult/TestResultParameters/styles.scss +8 -0
- package/src/components/app/TestResult/TestResultPrevStatuses/index.tsx +52 -0
- package/src/components/app/TestResult/TestResultPrevStatuses/styles.scss +57 -0
- package/src/components/app/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +50 -0
- package/src/components/app/TestResult/TestResultRetriesView/index.tsx +24 -0
- package/src/components/app/TestResult/TestResultRetriesView/styles.scss +69 -0
- package/src/components/app/TestResult/TestResultSetup/index.tsx +50 -0
- package/src/components/app/TestResult/TestResultSeverity/index.tsx +34 -0
- package/src/components/app/TestResult/TestResultSeverity/styles.scss +29 -0
- package/src/components/app/TestResult/TestResultStatus/index.tsx +26 -0
- package/src/components/app/TestResult/TestResultStatus/styles.scss +36 -0
- package/src/components/app/TestResult/TestResultSteps/HtmlAttachmentPreview.tsx +12 -0
- package/src/components/app/TestResult/TestResultSteps/attachment.tsx +70 -0
- package/src/components/app/TestResult/TestResultSteps/attachmentCode.tsx +15 -0
- package/src/components/app/TestResult/TestResultSteps/attachmentImage.tsx +29 -0
- package/src/components/app/TestResult/TestResultSteps/attachmentVideo.tsx +12 -0
- package/src/components/app/TestResult/TestResultSteps/index.tsx +49 -0
- package/src/components/app/TestResult/TestResultSteps/styles.scss +225 -0
- package/src/components/app/TestResult/TestResultSteps/testResultAttachment.tsx +79 -0
- package/src/components/app/TestResult/TestResultSteps/testResultAttachmentInfo.tsx +87 -0
- package/src/components/app/TestResult/TestResultSteps/testResultStep.tsx +71 -0
- package/src/components/app/TestResult/TestResultSteps/testResultStepInfo.tsx +33 -0
- package/src/components/app/TestResult/TestResultSteps/wrongAttachment.tsx +8 -0
- package/src/components/app/TestResult/TestResultTabs/index.tsx +59 -0
- package/src/components/app/TestResult/TestResultTabs/styles.scss +76 -0
- package/src/components/app/TestResult/TestResultTeardown/index.tsx +49 -0
- package/src/components/app/TestResult/index.tsx +56 -0
- package/src/components/app/ThemeButton/ThemeButton.tsx +22 -0
- package/src/components/app/Tree/Tree.tsx +122 -0
- package/src/components/app/Tree/TreeHeader.tsx +81 -0
- package/src/components/app/Tree/TreeItem.tsx +31 -0
- package/src/components/app/Tree/TreeItemIcon.tsx +35 -0
- package/src/components/app/Tree/index.tsx +40 -0
- package/src/components/app/Tree/styles.scss +170 -0
- package/src/components/commons/Button/index.tsx +176 -0
- package/src/components/commons/Button/styles.scss +558 -0
- package/src/components/commons/Counter/index.tsx +29 -0
- package/src/components/commons/Counter/styles.scss +21 -0
- package/src/components/commons/Label/index.tsx +11 -0
- package/src/components/commons/Label/styles.scss +7 -0
- package/src/components/commons/Link/index.tsx +20 -0
- package/src/components/commons/Link/styles.scss +46 -0
- package/src/components/commons/Loadable/index.tsx +32 -0
- package/src/components/commons/Menu/index.tsx +173 -0
- package/src/components/commons/Menu/styles.scss +94 -0
- package/src/components/commons/PageLoader/index.tsx +10 -0
- package/src/components/commons/PageLoader/styles.scss +29 -0
- package/src/components/commons/SearchBox/index.tsx +61 -0
- package/src/components/commons/SearchBox/styles.scss +58 -0
- package/src/components/commons/Spinner/index.tsx +8 -0
- package/src/components/commons/SuccessRatePieChart/index.tsx +52 -0
- package/src/components/commons/SuccessRatePieChart/styles.scss +12 -0
- package/src/components/commons/SvgIcon/index.tsx +46 -0
- package/src/components/commons/SvgIcon/styles.scss +26 -0
- package/src/components/commons/Toggle/index.tsx +29 -0
- package/src/components/commons/Toggle/styles.scss +48 -0
- package/src/components/commons/Tooltip/index.tsx +123 -0
- package/src/components/commons/Tooltip/styles.scss +38 -0
- package/src/components/commons/Typography/index.tsx +99 -0
- package/src/hooks/useDebouncedCallback.ts +31 -0
- package/src/i18n/constants.ts +105 -0
- package/src/i18n/locales/am.json +115 -0
- package/src/i18n/locales/az.json +115 -0
- package/src/i18n/locales/de.json +115 -0
- package/src/i18n/locales/en.json +115 -0
- package/src/i18n/locales/es.json +114 -0
- package/src/i18n/locales/fr.json +115 -0
- package/src/i18n/locales/he.json +115 -0
- package/src/i18n/locales/it.json +115 -0
- package/src/i18n/locales/ja.json +115 -0
- package/src/i18n/locales/ka.json +115 -0
- package/src/i18n/locales/kr.json +115 -0
- package/src/i18n/locales/nl.json +115 -0
- package/src/i18n/locales/pl.json +113 -0
- package/src/i18n/locales/pt.json +115 -0
- package/src/i18n/locales/ru.json +113 -0
- package/src/i18n/locales/sv.json +115 -0
- package/src/i18n/locales/tr.json +115 -0
- package/src/i18n/locales/zh.json +115 -0
- package/src/index.html +35 -0
- package/src/index.tsx +48 -0
- package/src/stores/chart.ts +32 -0
- package/src/stores/envInfo.ts +34 -0
- package/src/stores/index.ts +4 -0
- package/src/stores/locale.ts +79 -0
- package/src/stores/stats.ts +36 -0
- package/src/stores/testResults.ts +40 -0
- package/src/stores/theme.ts +33 -0
- package/src/stores/tree.ts +33 -0
- package/src/stores/types.ts +5 -0
- package/src/types/globals.d.ts +8 -0
- package/src/types/window.d.ts +8 -0
- package/src/utils/attachments.ts +156 -0
- package/src/utils/capitalize.ts +4 -0
- package/src/utils/copyToClipboard.ts +3 -0
- package/src/utils/isMac.ts +7 -0
- package/src/utils/statuses.ts +55 -0
- package/src/utils/time.ts +17 -0
- package/src/utils/treeFilters.ts +150 -0
- package/tsconfig.json +25 -0
- package/types.d.ts +53 -0
- package/webpack.config.js +108 -0
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
.button {
|
|
2
|
+
--allure-btn-height: 0px;
|
|
3
|
+
--allure-btn-padding-horizontal: 0px;
|
|
4
|
+
--allure-btn-padding-vertical: 0px;
|
|
5
|
+
--allure-btn-radius: 0px;
|
|
6
|
+
--allure-btn-border: 0px;
|
|
7
|
+
--allure-btn-leading-icon-margin-right: 0px;
|
|
8
|
+
--allure-btn-dropdown-icon-margin-left: 0px;
|
|
9
|
+
--allure-btn-focus-ring-offset: 1px;
|
|
10
|
+
--allure-btn-bg-color: transparent;
|
|
11
|
+
--allure-btn-text-color: transparent;
|
|
12
|
+
--allure-btn-icon-color: transparent;
|
|
13
|
+
--allure-btn-border-color: transparent;
|
|
14
|
+
--allure-btn-icon-base-size: 16px;
|
|
15
|
+
--allure-btn-icon-size: var(--allure-btn-icon-base-size);
|
|
16
|
+
--allure-btn-pressed-scale: 0.96;
|
|
17
|
+
|
|
18
|
+
background-color: var(--allure-btn-bg-color);
|
|
19
|
+
border: var(--allure-btn-border) solid transparent;
|
|
20
|
+
border-color: var(--allure-btn-border-color);
|
|
21
|
+
border-radius: var(--allure-btn-radius);
|
|
22
|
+
padding: calc(var(--allure-btn-padding-vertical) - var(--allure-btn-border))
|
|
23
|
+
calc(var(--allure-btn-padding-horizontal) - var(--allure-btn-border));
|
|
24
|
+
max-height: var(--allure-btn-height);
|
|
25
|
+
height: var(--allure-btn-height);
|
|
26
|
+
max-width: max-content;
|
|
27
|
+
min-width: min-content;
|
|
28
|
+
margin: 0;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
transition:
|
|
32
|
+
transform var(--interaction-transition-duration) ease-out,
|
|
33
|
+
outline var(--interaction-transition-duration) ease-out,
|
|
34
|
+
background-color var(--color-change-transition-duration),
|
|
35
|
+
border-color var(--color-change-transition-duration);
|
|
36
|
+
transform: scale(1);
|
|
37
|
+
outline-offset: var(--allure-btn-focus-ring-offset);
|
|
38
|
+
outline: var(--allure-btn-focus-ring-offset) solid transparent;
|
|
39
|
+
|
|
40
|
+
&.fullWidth {
|
|
41
|
+
width: 100%;
|
|
42
|
+
max-width: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:disabled .contentIcon,
|
|
46
|
+
&:disabled .leadingIcon,
|
|
47
|
+
&:disabled .dropdownIcon {
|
|
48
|
+
user-select: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.buttonIcon {
|
|
52
|
+
max-height: var(--allure-btn-height);
|
|
53
|
+
min-height: var(--allure-btn-height);
|
|
54
|
+
height: var(--allure-btn-height);
|
|
55
|
+
max-width: var(--allure-btn-height);
|
|
56
|
+
min-width: var(--allure-btn-height);
|
|
57
|
+
width: var(--allure-btn-height);
|
|
58
|
+
padding: calc(
|
|
59
|
+
var(--allure-btn-padding-vertical) - var(--allure-btn-border) -
|
|
60
|
+
(var(--allure-btn-icon-size) - var(--allure-btn-icon-base-size))
|
|
61
|
+
)
|
|
62
|
+
calc(
|
|
63
|
+
var(--allure-btn-padding-horizontal) - var(--allure-btn-border) -
|
|
64
|
+
(var(--allure-btn-icon-size) - var(--allure-btn-icon-base-size))
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&:focus {
|
|
69
|
+
background-color: var(--allure-btn-bg-color);
|
|
70
|
+
outline: var(--allure-btn-focus-ring-offset) solid transparent;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Focus ring */
|
|
74
|
+
&:focus-visible {
|
|
75
|
+
outline: var(--allure-btn-focus-ring-offset) solid var(--ad-other-focus);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:disabled {
|
|
79
|
+
cursor: not-allowed;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&:active {
|
|
83
|
+
transform: scale(var(--allure-btn-pressed-scale));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.size_l {
|
|
87
|
+
--allure-btn-height: 40px;
|
|
88
|
+
--allure-btn-padding-horizontal: 12px;
|
|
89
|
+
--allure-btn-padding-vertical: 10px;
|
|
90
|
+
--allure-btn-pressed-scale: 0.96;
|
|
91
|
+
--allure-btn-radius: 6px;
|
|
92
|
+
--allure-btn-leading-icon-margin-right: 8px;
|
|
93
|
+
--allure-btn-dropdown-icon-margin-left: 4px;
|
|
94
|
+
--allure-btn-icon-size: 20px;
|
|
95
|
+
|
|
96
|
+
&.buttonIcon {
|
|
97
|
+
--allure-btn-padding-horizontal: 10px;
|
|
98
|
+
--allure-btn-padding-vertical: 10px;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.size_m {
|
|
103
|
+
--allure-btn-height: 32px;
|
|
104
|
+
--allure-btn-padding-horizontal: 8px;
|
|
105
|
+
--allure-btn-padding-vertical: 6px;
|
|
106
|
+
--allure-btn-pressed-scale: 0.94;
|
|
107
|
+
--allure-btn-radius: 6px;
|
|
108
|
+
--allure-btn-leading-icon-margin-right: 6px;
|
|
109
|
+
--allure-btn-dropdown-icon-margin-left: 4px;
|
|
110
|
+
--allure-btn-icon-size: 20px;
|
|
111
|
+
|
|
112
|
+
&.buttonIcon {
|
|
113
|
+
--allure-btn-padding-horizontal: 6px;
|
|
114
|
+
--allure-btn-padding-vertical: 6px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&.size_s {
|
|
119
|
+
--allure-btn-height: 24px;
|
|
120
|
+
--allure-btn-padding-horizontal: 6px;
|
|
121
|
+
--allure-btn-padding-vertical: 4px;
|
|
122
|
+
--allure-btn-pressed-scale: 0.94;
|
|
123
|
+
--allure-btn-radius: 4px;
|
|
124
|
+
--allure-btn-leading-icon-margin-right: 4px;
|
|
125
|
+
--allure-btn-dropdown-icon-margin-left: 2px;
|
|
126
|
+
--allure-btn-icon-size: 16px;
|
|
127
|
+
|
|
128
|
+
&.buttonIcon {
|
|
129
|
+
--allure-btn-padding-horizontal: 4px;
|
|
130
|
+
--allure-btn-padding-vertical: 4px;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&.icon_size_xs {
|
|
135
|
+
--allure-btn-icon-size: 12px;
|
|
136
|
+
|
|
137
|
+
&.buttonIcon {
|
|
138
|
+
--allure-btn-padding-horizontal: 0;
|
|
139
|
+
--allure-btn-icon-size: 12px;
|
|
140
|
+
--allure-btn-padding-vertical: 4px;
|
|
141
|
+
--allure-btn-height: 32px;
|
|
142
|
+
--allure-btn-width: 20px;
|
|
143
|
+
width: var(--allure-btn-width);
|
|
144
|
+
min-width: var(--allure-btn-width);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&.style_primary {
|
|
149
|
+
--allure-btn-border: 0px;
|
|
150
|
+
--allure-btn-border-color: transparent;
|
|
151
|
+
--allure-btn-bg-color: var(--bg-support-aldebaran);
|
|
152
|
+
--allure-btn-text-color: var(--constant-on-text-primary);
|
|
153
|
+
--allure-btn-icon-color: var(--constant-on-icon-primary);
|
|
154
|
+
|
|
155
|
+
&:hover {
|
|
156
|
+
--allure-btn-bg-color: var(--bg-support-aldebaran-medium);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&:focus-visible {
|
|
160
|
+
--allure-btn-bg-color: var(--bg-support-aldebaran-medium);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&:disabled {
|
|
164
|
+
--allure-btn-bg-color: var(--bg-control-secondary);
|
|
165
|
+
--allure-btn-text-color: var(--on-text-hint);
|
|
166
|
+
--allure-btn-icon-color: var(--on-icon-hint);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&:active,
|
|
170
|
+
.active {
|
|
171
|
+
--allure-btn-bg-color: var(--bg-support-aldebaran-heavy);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&.style_primary.danger {
|
|
176
|
+
--allure-btn-border-color: transparent;
|
|
177
|
+
--allure-btn-bg-color: var(--bg-support-capella);
|
|
178
|
+
--allure-btn-text-color: var(--constant-on-text-primary);
|
|
179
|
+
--allure-btn-icon-color: var(--constant-on-icon-primary);
|
|
180
|
+
|
|
181
|
+
&:hover {
|
|
182
|
+
--allure-btn-bg-color: var(--bg-support-capella-medium);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&:focus-visible {
|
|
186
|
+
--allure-btn-bg-color: var(--bg-support-capella-medium);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&:active,
|
|
190
|
+
.active {
|
|
191
|
+
--allure-btn-bg-color: var(--bg-support-capella-heavy);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&.style_primary.positive {
|
|
196
|
+
--allure-btn-border-color: transparent;
|
|
197
|
+
--allure-btn-bg-color: var(--bg-support-castor);
|
|
198
|
+
--allure-btn-text-color: var(--constant-on-text-primary);
|
|
199
|
+
--allure-btn-icon-color: var(--constant-on-icon-primary);
|
|
200
|
+
|
|
201
|
+
&:hover {
|
|
202
|
+
--allure-btn-bg-color: var(--bg-support-castor-medium);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&:focus-visible {
|
|
206
|
+
--allure-btn-bg-color: var(--bg-support-castor-medium);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&:active,
|
|
210
|
+
&.active {
|
|
211
|
+
--allure-btn-bg-color: var(--bg-support-castor-heavy);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&.style_outline {
|
|
216
|
+
--allure-btn-border: 1px;
|
|
217
|
+
--allure-btn-border-color: var(--on-border-control);
|
|
218
|
+
--allure-btn-bg-color: var(--bg-control-flat);
|
|
219
|
+
--allure-btn-text-color: var(--on-text-primary);
|
|
220
|
+
--allure-btn-icon-color: var(--on-icon-primary);
|
|
221
|
+
|
|
222
|
+
&:hover {
|
|
223
|
+
--allure-btn-bg-color: var(--bg-control-flat-medium);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
&:focus-visible {
|
|
227
|
+
--allure-btn-bg-color: var(--bg-control-flat-medium);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&:active,
|
|
231
|
+
&.active {
|
|
232
|
+
--allure-btn-bg-color: var(--bg-control-flat-heavy);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&:disabled {
|
|
236
|
+
--allure-btn-border: 0px;
|
|
237
|
+
--allure-btn-border-color: transparent;
|
|
238
|
+
--allure-btn-bg-color: var(--bg-control-secondary);
|
|
239
|
+
--allure-btn-text-color: var(--on-text-hint);
|
|
240
|
+
--allure-btn-icon-color: var(--on-icon-hint);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
&.style_outline.danger {
|
|
245
|
+
--allure-btn-border-color: var(--on-border-control);
|
|
246
|
+
--allure-btn-bg-color: var(--bg-control-flat);
|
|
247
|
+
--allure-btn-text-color: var(--on-support-capella);
|
|
248
|
+
--allure-btn-icon-color: var(--on-support-capella);
|
|
249
|
+
|
|
250
|
+
&:hover {
|
|
251
|
+
--allure-btn-bg-color: var(--bg-support-capella);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
&:focus-visible {
|
|
255
|
+
--allure-btn-bg-color: var(--bg-support-capella);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&:active,
|
|
259
|
+
&.active {
|
|
260
|
+
--allure-btn-bg-color: var(--bg-support-capella-medium);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&.style_outline.positive {
|
|
265
|
+
--allure-btn-border-color: var(--on-border-control);
|
|
266
|
+
--allure-btn-bg-color: var(--bg-control-flat);
|
|
267
|
+
--allure-btn-text-color: var(--on-support-castor);
|
|
268
|
+
--allure-btn-icon-color: var(--on-support-castor);
|
|
269
|
+
|
|
270
|
+
&:hover {
|
|
271
|
+
--allure-btn-bg-color: var(--bg-support-castor);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&:focus-visible {
|
|
275
|
+
--allure-btn-bg-color: var(--bg-support-castor);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
&:active,
|
|
279
|
+
&.active {
|
|
280
|
+
--allure-btn-bg-color: var(--bg-support-castor-medium);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
&.style_ghost {
|
|
285
|
+
--allure-btn-border: 0px;
|
|
286
|
+
--allure-btn-border-color: transparent;
|
|
287
|
+
--allure-btn-bg-color: var(--bg-control-flat);
|
|
288
|
+
--allure-btn-text-color: var(--on-text-primary);
|
|
289
|
+
--allure-btn-icon-color: var(--on-icon-primary);
|
|
290
|
+
|
|
291
|
+
&:hover {
|
|
292
|
+
--allure-btn-bg-color: var(--bg-control-flat-medium);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
&:active,
|
|
296
|
+
&.active {
|
|
297
|
+
--allure-btn-bg-color: var(--bg-control-flat-heavy);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
&:disabled {
|
|
301
|
+
--allure-btn-bg-color: transparent;
|
|
302
|
+
--allure-btn-text-color: var(--on-text-hint);
|
|
303
|
+
--allure-btn-icon-color: var(--on-icon-hint);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
&.style_ghost.danger {
|
|
308
|
+
--allure-btn-border: 0px;
|
|
309
|
+
--allure-btn-border-color: transparent;
|
|
310
|
+
--allure-btn-bg-color: transparent;
|
|
311
|
+
--allure-btn-text-color: var(--on-support-capella);
|
|
312
|
+
--allure-btn-icon-color: var(--on-support-capella);
|
|
313
|
+
|
|
314
|
+
&:hover {
|
|
315
|
+
--allure-btn-bg-color: var(--bg-support-capella);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
&:focus-visible {
|
|
319
|
+
--allure-btn-bg-color: var(--bg-support-capella);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
&:active,
|
|
323
|
+
&.active {
|
|
324
|
+
--allure-btn-bg-color: var(--bg-support-capella-medium);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
&.style_ghost.positive {
|
|
329
|
+
--allure-btn-border: 0px;
|
|
330
|
+
--allure-btn-border-color: transparent;
|
|
331
|
+
--allure-btn-bg-color: transparent;
|
|
332
|
+
--allure-btn-text-color: var(--on-support-castor);
|
|
333
|
+
--allure-btn-icon-color: var(--on-support-castor);
|
|
334
|
+
|
|
335
|
+
&:hover {
|
|
336
|
+
--allure-btn-bg-color: var(--bg-support-castor);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
&:focus-visible {
|
|
340
|
+
--allure-btn-bg-color: var(--bg-support-castor);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
&:active,
|
|
344
|
+
&.active {
|
|
345
|
+
--allure-btn-bg-color: var(--bg-support-castor-medium);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
&.style_flat {
|
|
350
|
+
--allure-btn-border: 0px;
|
|
351
|
+
--allure-btn-border-color: transparent;
|
|
352
|
+
--allure-btn-bg-color: var(--bg-control-secondary);
|
|
353
|
+
--allure-btn-text-color: var(--on-text-primary);
|
|
354
|
+
--allure-btn-icon-color: var(--on-icon-primary);
|
|
355
|
+
|
|
356
|
+
&:hover {
|
|
357
|
+
--allure-btn-bg-color: var(--bg-control-secondary-medium);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
&:focus-visible {
|
|
361
|
+
--allure-btn-bg-color: var(--bg-control-secondary-medium);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
&:active,
|
|
365
|
+
&.active {
|
|
366
|
+
--allure-btn-bg-color: var(--bg-control-secondary-heavy);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
&:disabled {
|
|
370
|
+
--allure-btn-bg-color: var(--bg-control-secondary);
|
|
371
|
+
--allure-btn-text-color: var(--on-text-hint);
|
|
372
|
+
--allure-btn-icon-color: var(--on-icon-hint);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
&.style_flat.danger {
|
|
377
|
+
--allure-btn-border-color: transparent;
|
|
378
|
+
--allure-btn-bg-color: var(--bg-support-capella);
|
|
379
|
+
--allure-btn-text-color: var(--on-support-capella);
|
|
380
|
+
--allure-btn-icon-color: var(--on-support-capella);
|
|
381
|
+
|
|
382
|
+
&:hover {
|
|
383
|
+
--allure-btn-bg-color: var(--bg-support-capella-medium);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
&:focus-visible {
|
|
387
|
+
--allure-btn-bg-color: var(--bg-support-capella-medium);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
&:active,
|
|
391
|
+
&.active {
|
|
392
|
+
--allure-btn-bg-color: var(--bg-alpha-capella-heavy);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
&.style_flat.positive {
|
|
397
|
+
--allure-btn-border-color: transparent;
|
|
398
|
+
--allure-btn-bg-color: var(--bg-support-castor);
|
|
399
|
+
--allure-btn-text-color: var(--on-support-castor);
|
|
400
|
+
--allure-btn-icon-color: var(--on-support-castor);
|
|
401
|
+
|
|
402
|
+
&:hover {
|
|
403
|
+
--allure-btn-bg-color: var(--bg-support-castor-medium);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
&:focus-visible {
|
|
407
|
+
--allure-btn-bg-color: var(--bg-support-castor-medium);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
&:active,
|
|
411
|
+
&.active {
|
|
412
|
+
--allure-btn-bg-color: var(--bg-alpha-castor-heavy);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
&.style_raised {
|
|
417
|
+
--allure-btn-border: 1px;
|
|
418
|
+
--allure-btn-border-color: var(--on-border-primary);
|
|
419
|
+
--allure-btn-bg-color: var(--bg-base-modal);
|
|
420
|
+
--allure-btn-text-color: var(--on-text-primary);
|
|
421
|
+
--allure-btn-icon-color: var(--on-icon-primary);
|
|
422
|
+
|
|
423
|
+
box-shadow: var(--shadow-raised);
|
|
424
|
+
|
|
425
|
+
&:hover {
|
|
426
|
+
--allure-btn-bg-color: var(--bg-control-flat-medium);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
&:focus-visible {
|
|
430
|
+
--allure-btn-bg-color: var(--bg-control-flat-medium);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
&:active,
|
|
434
|
+
&.active {
|
|
435
|
+
--allure-btn-bg-color: var(--bg-control-flat-heavy);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
&:disabled {
|
|
439
|
+
--allure-btn-border: 0px;
|
|
440
|
+
--allure-btn-border-color: transparent;
|
|
441
|
+
--allure-btn-bg-color: var(--bg-control-secondary);
|
|
442
|
+
--allure-btn-text-color: var(--on-text-hint);
|
|
443
|
+
--allure-btn-icon-color: var(--on-icon-hint);
|
|
444
|
+
|
|
445
|
+
box-shadow: none;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
&.style_raised.danger {
|
|
450
|
+
--allure-btn-text-color: var(--on-support-capella);
|
|
451
|
+
--allure-btn-icon-color: var(--on-support-capella);
|
|
452
|
+
|
|
453
|
+
&:hover {
|
|
454
|
+
--allure-btn-bg-color: var(--bg-support-capella);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
&:focus-visible {
|
|
458
|
+
--allure-btn-bg-color: var(--bg-support-capella);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
&:active,
|
|
462
|
+
&.active {
|
|
463
|
+
--allure-btn-bg-color: var(--bg-support-capella-medium);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
&.style_raised.positive {
|
|
468
|
+
--allure-btn-text-color: var(--on-support-castor);
|
|
469
|
+
--allure-btn-icon-color: var(--on-support-castor);
|
|
470
|
+
|
|
471
|
+
&:hover {
|
|
472
|
+
--allure-btn-bg-color: var(--bg-support-castor);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
&:focus-visible {
|
|
476
|
+
--allure-btn-bg-color: var(--bg-support-castor);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
&:active,
|
|
480
|
+
&.active {
|
|
481
|
+
--allure-btn-bg-color: var(--bg-support-castor-medium);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.text {
|
|
487
|
+
color: var(--allure-btn-text-color);
|
|
488
|
+
padding: 0;
|
|
489
|
+
margin: 0;
|
|
490
|
+
white-space: nowrap;
|
|
491
|
+
user-select: none;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.pending .text,
|
|
495
|
+
.pending .leadingIcon,
|
|
496
|
+
.pending .dropdownIcon,
|
|
497
|
+
.pending .contentIcon {
|
|
498
|
+
visibility: hidden;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.content {
|
|
502
|
+
display: flex;
|
|
503
|
+
flex-direction: row;
|
|
504
|
+
align-items: center;
|
|
505
|
+
justify-content: center;
|
|
506
|
+
position: relative;
|
|
507
|
+
user-select: none;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.leadingIcon {
|
|
511
|
+
margin-right: var(--allure-btn-leading-icon-margin-right);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.leadingIcon,
|
|
515
|
+
.contentIcon,
|
|
516
|
+
.dropdownIcon {
|
|
517
|
+
width: var(--allure-btn-icon-size) !important;
|
|
518
|
+
height: var(--allure-btn-icon-size) !important;
|
|
519
|
+
color: var(--on-icon-secondary);
|
|
520
|
+
transition: color var(--color-change-transition-duration);
|
|
521
|
+
user-select: none;
|
|
522
|
+
|
|
523
|
+
&:hover {
|
|
524
|
+
color: var(--allure-btn-icon-color);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
&:focus {
|
|
528
|
+
outline: none;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
&:focus-visible {
|
|
532
|
+
outline: none;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.dropdownIcon {
|
|
537
|
+
margin-left: var(--allure-btn-dropdown-icon-margin-left);
|
|
538
|
+
transition:
|
|
539
|
+
transform var(--interaction-transition-duration) ease-in,
|
|
540
|
+
color var(--color-change-transition-duration);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.button.active .dropdownIcon {
|
|
544
|
+
transform: rotate(180deg);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.pending .spinner {
|
|
548
|
+
display: flex;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.spinner {
|
|
552
|
+
position: absolute;
|
|
553
|
+
left: 50%;
|
|
554
|
+
transform: translateX(-50%);
|
|
555
|
+
user-select: none;
|
|
556
|
+
color: var(--allure-btn-icon-color);
|
|
557
|
+
display: none;
|
|
558
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { TestStatus } from "@allurereport/core-api";
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { Text } from "@/components/commons/Typography";
|
|
4
|
+
import * as styles from "./styles.scss";
|
|
5
|
+
|
|
6
|
+
type Props = {
|
|
7
|
+
size?: "s" | "m" | "l";
|
|
8
|
+
count: number;
|
|
9
|
+
truncateCount?: boolean;
|
|
10
|
+
status?: TestStatus;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const Counter = (props: Props) => {
|
|
14
|
+
const { count, size = "s", truncateCount = false, status } = props;
|
|
15
|
+
|
|
16
|
+
const displayedCount = truncateCount && count > 99 ? "99+" : count;
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<Text
|
|
20
|
+
tag="small"
|
|
21
|
+
size={size === "l" ? "m" : "s"}
|
|
22
|
+
type="ui"
|
|
23
|
+
bold
|
|
24
|
+
className={clsx(styles.counter, styles[`size-${size}`], status && styles[`status-${status}`])}
|
|
25
|
+
>
|
|
26
|
+
{displayedCount}
|
|
27
|
+
</Text>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@import "../../../assets/scss/mixins.scss";
|
|
2
|
+
|
|
3
|
+
.counter {
|
|
4
|
+
background-color: var(--bg-control-secondary);
|
|
5
|
+
color: var(--on-text-primary);
|
|
6
|
+
border-radius: 12px;
|
|
7
|
+
@include status-bg-and-text();
|
|
8
|
+
|
|
9
|
+
&.size-s {
|
|
10
|
+
padding-left: 8px;
|
|
11
|
+
padding-right: 8px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&.size-m {
|
|
15
|
+
padding: 10px 2px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&.size-l {
|
|
19
|
+
padding: 12px 4px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FunctionComponent } from "preact";
|
|
2
|
+
import * as styles from "@/components/commons/Label/styles.scss";
|
|
3
|
+
import { Text } from "@/components/commons/Typography";
|
|
4
|
+
|
|
5
|
+
export const Label: FunctionComponent = ({ children }) => (
|
|
6
|
+
<div className={styles.label}>
|
|
7
|
+
<Text size="s" bold type="ui">
|
|
8
|
+
{children}
|
|
9
|
+
</Text>
|
|
10
|
+
</div>
|
|
11
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentChildren } from "preact";
|
|
2
|
+
import * as styles from "./styles.scss";
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
href?: string;
|
|
6
|
+
children: ComponentChildren;
|
|
7
|
+
onClick?: (e: MouseEvent) => void;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const Link = (props: Props) => {
|
|
11
|
+
const { children, onClick, href } = props;
|
|
12
|
+
const isPseudoLink = href === undefined;
|
|
13
|
+
const Tag = isPseudoLink ? "button" : "a";
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<Tag href={href} onClick={onClick} className={styles.link}>
|
|
17
|
+
{children}
|
|
18
|
+
</Tag>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.link {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 4px;
|
|
5
|
+
font-size: inherit;
|
|
6
|
+
line-height: inherit;
|
|
7
|
+
font-weight: inherit;
|
|
8
|
+
letter-spacing: inherit;
|
|
9
|
+
font-family: inherit;
|
|
10
|
+
background-color: transparent;
|
|
11
|
+
padding: 0;
|
|
12
|
+
margin: 0;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
appearance: none;
|
|
15
|
+
border: none;
|
|
16
|
+
color: var(--on-support-aldebaran);
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
outline: 1px solid transparent;
|
|
19
|
+
outline-offset: 1px;
|
|
20
|
+
transition:
|
|
21
|
+
outline var(--interaction-transition-duration) ease-out,
|
|
22
|
+
border-color var(--color-change-transition-duration);
|
|
23
|
+
|
|
24
|
+
&:hover {
|
|
25
|
+
color: var(--on-support-aldebaran-medium);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:focus {
|
|
29
|
+
outline: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:focus-visible {
|
|
33
|
+
border-radius: 3px;
|
|
34
|
+
color: var(--on-support-aldebaran-medium);
|
|
35
|
+
outline: 1px solid var(--ad-other-focus);
|
|
36
|
+
outline-offset: 1px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:active {
|
|
40
|
+
color: var(--on-support-aldebaran-heavy);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:visited {
|
|
44
|
+
color: var(--on-support-aldebaran);
|
|
45
|
+
}
|
|
46
|
+
}
|