@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.
Files changed (263) hide show
  1. package/.babelrc.js +46 -0
  2. package/.eslintrc.cjs +15 -0
  3. package/README.md +27 -0
  4. package/dist/multi/141.app-b6362ca0.js +1 -0
  5. package/dist/multi/222.app-b6362ca0.js +1 -0
  6. package/dist/multi/335.app-b6362ca0.js +1 -0
  7. package/dist/multi/34.app-b6362ca0.js +1 -0
  8. package/dist/multi/349.app-b6362ca0.js +1 -0
  9. package/dist/multi/378.app-b6362ca0.js +1 -0
  10. package/dist/multi/406.app-b6362ca0.js +1 -0
  11. package/dist/multi/476.app-b6362ca0.js +1 -0
  12. package/dist/multi/53.app-b6362ca0.js +1 -0
  13. package/dist/multi/584.app-b6362ca0.js +1 -0
  14. package/dist/multi/690.app-b6362ca0.js +1 -0
  15. package/dist/multi/747.app-b6362ca0.js +1 -0
  16. package/dist/multi/767.app-b6362ca0.js +1 -0
  17. package/dist/multi/816.app-b6362ca0.js +1 -0
  18. package/dist/multi/83.app-b6362ca0.js +1 -0
  19. package/dist/multi/873.app-b6362ca0.js +1 -0
  20. package/dist/multi/920.app-b6362ca0.js +1 -0
  21. package/dist/multi/991.app-b6362ca0.js +1 -0
  22. package/dist/multi/JetBrainsMono_vf-9e9649b6..woff2 +0 -0
  23. package/dist/multi/JetBrainsMono_vf-b9a9c326..woff +0 -0
  24. package/dist/multi/app-b6362ca0.js +2 -0
  25. package/dist/multi/app-b6362ca0.js.LICENSE.txt +16 -0
  26. package/dist/multi/manifest.json +26 -0
  27. package/dist/multi/pt-root-ui_vf-22fe60ca..woff +0 -0
  28. package/dist/multi/pt-root-ui_vf-9d251e8b..woff2 +0 -0
  29. package/dist/multi/styles-b6362ca0.css +363 -0
  30. package/dist/single/app-57ae0a60.js +2 -0
  31. package/dist/single/app-57ae0a60.js.LICENSE.txt +16 -0
  32. package/dist/single/manifest.json +3 -0
  33. package/package.json +93 -0
  34. package/postcss.config.js +5 -0
  35. package/src/assets/fonts/JetBrainsMono_vf.woff +0 -0
  36. package/src/assets/fonts/JetBrainsMono_vf.woff2 +0 -0
  37. package/src/assets/fonts/pt-root-ui_vf.woff +0 -0
  38. package/src/assets/fonts/pt-root-ui_vf.woff2 +0 -0
  39. package/src/assets/scss/_common.scss +134 -0
  40. package/src/assets/scss/code.css +71 -0
  41. package/src/assets/scss/day.scss +51 -0
  42. package/src/assets/scss/fonts.scss +21 -0
  43. package/src/assets/scss/index.scss +9 -0
  44. package/src/assets/scss/mixins.scss +26 -0
  45. package/src/assets/scss/night.scss +61 -0
  46. package/src/assets/scss/palette.scss +393 -0
  47. package/src/assets/scss/theme.scss +117 -0
  48. package/src/assets/scss/typography.scss +218 -0
  49. package/src/assets/scss/vars.scss +8 -0
  50. package/src/assets/svg/arrows-chevron-down.svg +5 -0
  51. package/src/assets/svg/github.svg +5 -0
  52. package/src/assets/svg/line-alerts-notification-box.svg +3 -0
  53. package/src/assets/svg/line-arrows-chevron-down-double.svg +3 -0
  54. package/src/assets/svg/line-arrows-chevron-down.svg +3 -0
  55. package/src/assets/svg/line-arrows-chevron-right.svg +3 -0
  56. package/src/assets/svg/line-arrows-chevron-up-double.svg +3 -0
  57. package/src/assets/svg/line-arrows-chevron-up.svg +3 -0
  58. package/src/assets/svg/line-arrows-corner-down-right.svg +3 -0
  59. package/src/assets/svg/line-arrows-expand-3.svg +3 -0
  60. package/src/assets/svg/line-arrows-refresh-ccw-1.svg +3 -0
  61. package/src/assets/svg/line-arrows-sort-line-asc.svg +3 -0
  62. package/src/assets/svg/line-arrows-sort-line-desc.svg +3 -0
  63. package/src/assets/svg/line-arrows-switch-vertical-1.svg +3 -0
  64. package/src/assets/svg/line-dev-bug-2.svg +3 -0
  65. package/src/assets/svg/line-dev-code-square.svg +3 -0
  66. package/src/assets/svg/line-files-file-attachment-2.svg +3 -0
  67. package/src/assets/svg/line-general-check.svg +3 -0
  68. package/src/assets/svg/line-general-checklist3.svg +3 -0
  69. package/src/assets/svg/line-general-copy-3.svg +3 -0
  70. package/src/assets/svg/line-general-download-cloud.svg +3 -0
  71. package/src/assets/svg/line-general-equal.svg +3 -0
  72. package/src/assets/svg/line-general-home-line.svg +3 -0
  73. package/src/assets/svg/line-general-link-1.svg +3 -0
  74. package/src/assets/svg/line-general-link-external.svg +3 -0
  75. package/src/assets/svg/line-general-search-md.svg +3 -0
  76. package/src/assets/svg/line-general-settings-1.svg +3 -0
  77. package/src/assets/svg/line-general-x-close.svg +3 -0
  78. package/src/assets/svg/line-general-zap.svg +3 -0
  79. package/src/assets/svg/line-helpers-flag.svg +4 -0
  80. package/src/assets/svg/line-helpers-play-circle.svg +4 -0
  81. package/src/assets/svg/line-images-image.svg +3 -0
  82. package/src/assets/svg/line-security-key.svg +3 -0
  83. package/src/assets/svg/line-shapes-dot-circle.svg +3 -0
  84. package/src/assets/svg/line-shapes-moon.svg +3 -0
  85. package/src/assets/svg/line-shapes-sun.svg +3 -0
  86. package/src/assets/svg/line-time-clock-stopwatch.svg +3 -0
  87. package/src/assets/svg/report-logo.svg +64 -0
  88. package/src/assets/svg/solid-alert-circle.svg +3 -0
  89. package/src/assets/svg/solid-check-circle.svg +3 -0
  90. package/src/assets/svg/solid-help-circle.svg +3 -0
  91. package/src/assets/svg/solid-minus-circle.svg +3 -0
  92. package/src/assets/svg/solid-x-circle.svg +3 -0
  93. package/src/assets/svg/spinner.svg +18 -0
  94. package/src/assets/svg/view-off.svg +12 -0
  95. package/src/assets/svg/view.svg +11 -0
  96. package/src/components/app/ArrowButton/index.tsx +36 -0
  97. package/src/components/app/ArrowButton/styles.scss +32 -0
  98. package/src/components/app/BaseLayout/index.tsx +60 -0
  99. package/src/components/app/BaseLayout/styles.scss +60 -0
  100. package/src/components/app/Footer/FooterLogo.tsx +16 -0
  101. package/src/components/app/Footer/FooterVersion.tsx +27 -0
  102. package/src/components/app/Footer/index.tsx +13 -0
  103. package/src/components/app/Footer/styles.scss +14 -0
  104. package/src/components/app/Header/index.tsx +17 -0
  105. package/src/components/app/Header/styles.scss +26 -0
  106. package/src/components/app/LanguagePicker/index.tsx +41 -0
  107. package/src/components/app/MainReport/index.tsx +19 -0
  108. package/src/components/app/Metadata/index.tsx +114 -0
  109. package/src/components/app/Metadata/styles.scss +146 -0
  110. package/src/components/app/MetadataButton/index.tsx +33 -0
  111. package/src/components/app/MetadataButton/styles.scss +53 -0
  112. package/src/components/app/Modal/index.tsx +184 -0
  113. package/src/components/app/Modal/styles.scss +126 -0
  114. package/src/components/app/ReportBody/Filters.tsx +94 -0
  115. package/src/components/app/ReportBody/HeaderActions.tsx +21 -0
  116. package/src/components/app/ReportBody/SortBy.tsx +134 -0
  117. package/src/components/app/ReportBody/context.tsx +107 -0
  118. package/src/components/app/ReportBody/index.tsx +71 -0
  119. package/src/components/app/ReportBody/styles.scss +64 -0
  120. package/src/components/app/ReportHeader/ReportHeaderLabelList.tsx +12 -0
  121. package/src/components/app/ReportHeader/ReportHeaderLogo.tsx +10 -0
  122. package/src/components/app/ReportHeader/ReportHeaderPie.tsx +14 -0
  123. package/src/components/app/ReportHeader/index.tsx +33 -0
  124. package/src/components/app/ReportHeader/styles.scss +49 -0
  125. package/src/components/app/ReportLogo/index.tsx +17 -0
  126. package/src/components/app/ReportLogo/styles.scss +20 -0
  127. package/src/components/app/ReportLogoFull/index.tsx +21 -0
  128. package/src/components/app/ReportLogoFull/styles.scss +7 -0
  129. package/src/components/app/ReportMetadata/MetadataItem.tsx +45 -0
  130. package/src/components/app/ReportMetadata/MetadataSummary.tsx +79 -0
  131. package/src/components/app/ReportMetadata/MetadataTestType.tsx +16 -0
  132. package/src/components/app/ReportMetadata/MetadataWithIcon.tsx +25 -0
  133. package/src/components/app/ReportMetadata/index.tsx +46 -0
  134. package/src/components/app/ReportMetadata/styles.scss +99 -0
  135. package/src/components/app/Tabs/index.tsx +58 -0
  136. package/src/components/app/Tabs/styles.scss +56 -0
  137. package/src/components/app/TestResult/TestResultAttachmentsView/index.tsx +27 -0
  138. package/src/components/app/TestResult/TestResultAttachmentsView/styles.scss +12 -0
  139. package/src/components/app/TestResult/TestResultDescription/index.tsx +27 -0
  140. package/src/components/app/TestResult/TestResultDescription/styles.scss +12 -0
  141. package/src/components/app/TestResult/TestResultDropdown/index.tsx +19 -0
  142. package/src/components/app/TestResult/TestResultDropdown/styles.scss +34 -0
  143. package/src/components/app/TestResult/TestResultEmpty/index.tsx +34 -0
  144. package/src/components/app/TestResult/TestResultEmpty/styles.scss +25 -0
  145. package/src/components/app/TestResult/TestResultError/index.tsx +51 -0
  146. package/src/components/app/TestResult/TestResultError/styles.scss +40 -0
  147. package/src/components/app/TestResult/TestResultHeader/index.tsx +55 -0
  148. package/src/components/app/TestResult/TestResultHeader/styles.scss +43 -0
  149. package/src/components/app/TestResult/TestResultHistory/TestResultHistoryItem.tsx +57 -0
  150. package/src/components/app/TestResult/TestResultHistory/index.tsx +26 -0
  151. package/src/components/app/TestResult/TestResultHistory/styles.scss +63 -0
  152. package/src/components/app/TestResult/TestResultInfo/index.tsx +79 -0
  153. package/src/components/app/TestResult/TestResultInfo/styles.scss +33 -0
  154. package/src/components/app/TestResult/TestResultLinks/index.tsx +60 -0
  155. package/src/components/app/TestResult/TestResultLinks/styles.scss +30 -0
  156. package/src/components/app/TestResult/TestResultMetadata/index.tsx +27 -0
  157. package/src/components/app/TestResult/TestResultMetadata/styles.scss +8 -0
  158. package/src/components/app/TestResult/TestResultNavigation/index.tsx +89 -0
  159. package/src/components/app/TestResult/TestResultNavigation/styles.scss +48 -0
  160. package/src/components/app/TestResult/TestResultOverview.tsx +40 -0
  161. package/src/components/app/TestResult/TestResultParameters/index.tsx +30 -0
  162. package/src/components/app/TestResult/TestResultParameters/styles.scss +8 -0
  163. package/src/components/app/TestResult/TestResultPrevStatuses/index.tsx +52 -0
  164. package/src/components/app/TestResult/TestResultPrevStatuses/styles.scss +57 -0
  165. package/src/components/app/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +50 -0
  166. package/src/components/app/TestResult/TestResultRetriesView/index.tsx +24 -0
  167. package/src/components/app/TestResult/TestResultRetriesView/styles.scss +69 -0
  168. package/src/components/app/TestResult/TestResultSetup/index.tsx +50 -0
  169. package/src/components/app/TestResult/TestResultSeverity/index.tsx +34 -0
  170. package/src/components/app/TestResult/TestResultSeverity/styles.scss +29 -0
  171. package/src/components/app/TestResult/TestResultStatus/index.tsx +26 -0
  172. package/src/components/app/TestResult/TestResultStatus/styles.scss +36 -0
  173. package/src/components/app/TestResult/TestResultSteps/HtmlAttachmentPreview.tsx +12 -0
  174. package/src/components/app/TestResult/TestResultSteps/attachment.tsx +70 -0
  175. package/src/components/app/TestResult/TestResultSteps/attachmentCode.tsx +15 -0
  176. package/src/components/app/TestResult/TestResultSteps/attachmentImage.tsx +29 -0
  177. package/src/components/app/TestResult/TestResultSteps/attachmentVideo.tsx +12 -0
  178. package/src/components/app/TestResult/TestResultSteps/index.tsx +49 -0
  179. package/src/components/app/TestResult/TestResultSteps/styles.scss +225 -0
  180. package/src/components/app/TestResult/TestResultSteps/testResultAttachment.tsx +79 -0
  181. package/src/components/app/TestResult/TestResultSteps/testResultAttachmentInfo.tsx +87 -0
  182. package/src/components/app/TestResult/TestResultSteps/testResultStep.tsx +71 -0
  183. package/src/components/app/TestResult/TestResultSteps/testResultStepInfo.tsx +33 -0
  184. package/src/components/app/TestResult/TestResultSteps/wrongAttachment.tsx +8 -0
  185. package/src/components/app/TestResult/TestResultTabs/index.tsx +59 -0
  186. package/src/components/app/TestResult/TestResultTabs/styles.scss +76 -0
  187. package/src/components/app/TestResult/TestResultTeardown/index.tsx +49 -0
  188. package/src/components/app/TestResult/index.tsx +56 -0
  189. package/src/components/app/ThemeButton/ThemeButton.tsx +22 -0
  190. package/src/components/app/Tree/Tree.tsx +122 -0
  191. package/src/components/app/Tree/TreeHeader.tsx +81 -0
  192. package/src/components/app/Tree/TreeItem.tsx +31 -0
  193. package/src/components/app/Tree/TreeItemIcon.tsx +35 -0
  194. package/src/components/app/Tree/index.tsx +40 -0
  195. package/src/components/app/Tree/styles.scss +170 -0
  196. package/src/components/commons/Button/index.tsx +176 -0
  197. package/src/components/commons/Button/styles.scss +558 -0
  198. package/src/components/commons/Counter/index.tsx +29 -0
  199. package/src/components/commons/Counter/styles.scss +21 -0
  200. package/src/components/commons/Label/index.tsx +11 -0
  201. package/src/components/commons/Label/styles.scss +7 -0
  202. package/src/components/commons/Link/index.tsx +20 -0
  203. package/src/components/commons/Link/styles.scss +46 -0
  204. package/src/components/commons/Loadable/index.tsx +32 -0
  205. package/src/components/commons/Menu/index.tsx +173 -0
  206. package/src/components/commons/Menu/styles.scss +94 -0
  207. package/src/components/commons/PageLoader/index.tsx +10 -0
  208. package/src/components/commons/PageLoader/styles.scss +29 -0
  209. package/src/components/commons/SearchBox/index.tsx +61 -0
  210. package/src/components/commons/SearchBox/styles.scss +58 -0
  211. package/src/components/commons/Spinner/index.tsx +8 -0
  212. package/src/components/commons/SuccessRatePieChart/index.tsx +52 -0
  213. package/src/components/commons/SuccessRatePieChart/styles.scss +12 -0
  214. package/src/components/commons/SvgIcon/index.tsx +46 -0
  215. package/src/components/commons/SvgIcon/styles.scss +26 -0
  216. package/src/components/commons/Toggle/index.tsx +29 -0
  217. package/src/components/commons/Toggle/styles.scss +48 -0
  218. package/src/components/commons/Tooltip/index.tsx +123 -0
  219. package/src/components/commons/Tooltip/styles.scss +38 -0
  220. package/src/components/commons/Typography/index.tsx +99 -0
  221. package/src/hooks/useDebouncedCallback.ts +31 -0
  222. package/src/i18n/constants.ts +105 -0
  223. package/src/i18n/locales/am.json +115 -0
  224. package/src/i18n/locales/az.json +115 -0
  225. package/src/i18n/locales/de.json +115 -0
  226. package/src/i18n/locales/en.json +115 -0
  227. package/src/i18n/locales/es.json +114 -0
  228. package/src/i18n/locales/fr.json +115 -0
  229. package/src/i18n/locales/he.json +115 -0
  230. package/src/i18n/locales/it.json +115 -0
  231. package/src/i18n/locales/ja.json +115 -0
  232. package/src/i18n/locales/ka.json +115 -0
  233. package/src/i18n/locales/kr.json +115 -0
  234. package/src/i18n/locales/nl.json +115 -0
  235. package/src/i18n/locales/pl.json +113 -0
  236. package/src/i18n/locales/pt.json +115 -0
  237. package/src/i18n/locales/ru.json +113 -0
  238. package/src/i18n/locales/sv.json +115 -0
  239. package/src/i18n/locales/tr.json +115 -0
  240. package/src/i18n/locales/zh.json +115 -0
  241. package/src/index.html +35 -0
  242. package/src/index.tsx +48 -0
  243. package/src/stores/chart.ts +32 -0
  244. package/src/stores/envInfo.ts +34 -0
  245. package/src/stores/index.ts +4 -0
  246. package/src/stores/locale.ts +79 -0
  247. package/src/stores/stats.ts +36 -0
  248. package/src/stores/testResults.ts +40 -0
  249. package/src/stores/theme.ts +33 -0
  250. package/src/stores/tree.ts +33 -0
  251. package/src/stores/types.ts +5 -0
  252. package/src/types/globals.d.ts +8 -0
  253. package/src/types/window.d.ts +8 -0
  254. package/src/utils/attachments.ts +156 -0
  255. package/src/utils/capitalize.ts +4 -0
  256. package/src/utils/copyToClipboard.ts +3 -0
  257. package/src/utils/isMac.ts +7 -0
  258. package/src/utils/statuses.ts +55 -0
  259. package/src/utils/time.ts +17 -0
  260. package/src/utils/treeFilters.ts +150 -0
  261. package/tsconfig.json +25 -0
  262. package/types.d.ts +53 -0
  263. package/webpack.config.js +108 -0
@@ -0,0 +1,123 @@
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
+ };
@@ -0,0 +1,38 @@
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
+ }
@@ -0,0 +1,99 @@
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
+ };
@@ -0,0 +1,31 @@
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
+ }
@@ -0,0 +1,105 @@
1
+ export const AVAILABLE_LOCALES = ["en", "ru", "pl", "es", "pt", "de", "am", "az", "fr", "it", "ja", "he", "ka", "kr", "nl", "sv", "tr", "zh"] as const;
2
+
3
+ export const DEFAULT_LOCALE = "en";
4
+
5
+ export type LangLocale = (typeof AVAILABLE_LOCALES)[number];
6
+
7
+ export const LANG_LOCALE: Record<
8
+ LangLocale,
9
+ {
10
+ short: string;
11
+ full: string;
12
+ iso: string;
13
+ }
14
+ > = {
15
+ en: {
16
+ short: "Eng",
17
+ full: "English",
18
+ iso: "en-US",
19
+ },
20
+ ru: {
21
+ short: "Ру",
22
+ full: "Русский",
23
+ iso: "ru-RU",
24
+ },
25
+ pl: {
26
+ short: "Pl",
27
+ full: "Polski",
28
+ iso: "pl-PL",
29
+ },
30
+ es: {
31
+ short: "Es",
32
+ full: "Español",
33
+ iso: "es-ES",
34
+ },
35
+ pt: {
36
+ short: "Pt",
37
+ full: "Português",
38
+ iso: "pt-PT",
39
+ },
40
+ de: {
41
+ short: "De",
42
+ full: "Deutsch",
43
+ iso: "de-DE",
44
+ },
45
+ am: {
46
+ short: "Am",
47
+ full: "አማርኛ",
48
+ iso: "am-ET",
49
+ },
50
+ az: {
51
+ short: "Az",
52
+ full: "Azərbaycan",
53
+ iso: "az-AZ",
54
+ },
55
+ fr: {
56
+ short: "Fr",
57
+ full: "Français",
58
+ iso: "fr-FR",
59
+ },
60
+ it: {
61
+ short: "It",
62
+ full: "Italiano",
63
+ iso: "it-IT",
64
+ },
65
+ ja: {
66
+ short: "Ja",
67
+ full: "日本語",
68
+ iso: "ja-JP",
69
+ },
70
+ he: {
71
+ short: "He",
72
+ full: "עברית",
73
+ iso: "he-IL",
74
+ },
75
+ ka: {
76
+ short: "Ka",
77
+ full: "ქართული",
78
+ iso: "ka-GE",
79
+ },
80
+ kr: {
81
+ short: "Kr",
82
+ full: "한국어",
83
+ iso: "kr-KR",
84
+ },
85
+ nl: {
86
+ short: "Nl",
87
+ full: "Nederlands",
88
+ iso: "nl-NL",
89
+ },
90
+ sv: {
91
+ short: "Sv",
92
+ full: "Svenska",
93
+ iso: "sv-SE",
94
+ },
95
+ tr: {
96
+ short: "Tr",
97
+ full: "Türkçe",
98
+ iso: "tr-TR",
99
+ },
100
+ zh: {
101
+ short: "Zh",
102
+ full: "中文",
103
+ iso: "zh-CN",
104
+ }
105
+ };
@@ -0,0 +1,115 @@
1
+ {
2
+ "statuses": {
3
+ "passed": "անցած",
4
+ "failed": "ձախողված",
5
+ "broken": "կոտրված",
6
+ "skipped": "բաց թողնված",
7
+ "unknown": "անհայտ",
8
+ "total": "ընդհանուր",
9
+ "flakyTests": "անհուսալի",
10
+ "newTests": "նոր",
11
+ "retryTests": "կրկնություն"
12
+ },
13
+ "testSummary": {
14
+ "all": "Բոլոր թեստերը",
15
+ "flaky": "Անհուսալի թեստեր",
16
+ "retry": "Կրկնված թեստեր",
17
+ "new": "Նոր թեստեր"
18
+ },
19
+ "tabs": {
20
+ "total": "Բոլոր"
21
+ },
22
+ "search": {
23
+ "search": "Որոնում",
24
+ "search-placeholder": "Անվանում կամ ID"
25
+ },
26
+ "filters": {
27
+ "more-filters": "Լրացուցիչ ֆիլտրեր",
28
+ "enable-filter": "Միացնել \"{filter}\" ֆիլտրը",
29
+ "flaky": "Անհուսալի",
30
+ "retry": "Կրկնություն",
31
+ "new": "Նոր"
32
+ },
33
+ "sort-by": {
34
+ "sort-by-text": "Դասավորել ըստ:",
35
+ "sort-by-category": "Դասավորել ըստ",
36
+ "direction-category": "Ուղղություն"
37
+ },
38
+ "sort-by.values": {
39
+ "order": "Կարգ",
40
+ "alphabet": "Այբուբեն",
41
+ "duration": "Տևողություն",
42
+ "status": "Կարգավիճակ"
43
+ },
44
+ "sort-by.directions": {
45
+ "order-desc": "Վերջինը – Առաջինը",
46
+ "order-asc": "Առաջինը – Վերջինը",
47
+ "order-asc-short": "Առաջինը",
48
+ "order-desc-short": "Վերջինը",
49
+ "alphabet-asc": "Ա – Ֆ",
50
+ "alphabet-desc": "Ֆ – Ա",
51
+ "alphabet-asc-short": "Ա – Ֆ",
52
+ "alphabet-desc-short": "Ֆ – Ա",
53
+ "duration-asc": "1 – 9",
54
+ "duration-desc": "9 – 1",
55
+ "duration-asc-short": "1 – 9",
56
+ "duration-desc-short": "9 – 1",
57
+ "status-asc": "Ինչպես ֆիլտրերի ցանկում",
58
+ "status-desc": "Հակադարձված",
59
+ "status-asc-short": "Սովորական",
60
+ "status-desc-short": "Հակադարձված"
61
+ },
62
+ "empty": {
63
+ "no-results": "Արդյունքներ չեն գտնվել",
64
+ "no-attachments-results": "Կցորդների մասին տեղեկություններ չկան",
65
+ "no-history-results": "Պատմության մասին տեղեկություններ չկան",
66
+ "no-retries-results": "Կրկնությունների մասին տեղեկություններ չկան"
67
+ },
68
+ "severity": {
69
+ "blocker": "արգելափակում",
70
+ "critical": "կրիտիկական",
71
+ "normal": "նորմալ",
72
+ "minor": "աննշան",
73
+ "trivial": "աննշան"
74
+ },
75
+ "execution": {
76
+ "name": "Կատարում",
77
+ "body": "Թեստի մարմին",
78
+ "setup": "Պատրաստում",
79
+ "teardown": "Ավարտում"
80
+ },
81
+ "ui": {
82
+ "labels": "Պիտակներ",
83
+ "metadata": "Մետատվյալներ",
84
+ "parameters": "Պարամետրեր",
85
+ "description": "Նկարագրություն",
86
+ "links": "Հղումներ",
87
+ "overview": "Ակնարկ",
88
+ "history": "Պատմություն",
89
+ "attachments": "Կցորդներ",
90
+ "retries": "Կրկնություններ",
91
+ "error": "Սխալ",
92
+ "goToStep": "Գնալ քայլին",
93
+ "showLess": "Ցուցադրել պակաս",
94
+ "showMore": "Ցուցադրել ավելին",
95
+ "copy": "Պատճենել",
96
+ "at": "է"
97
+ },
98
+ "controls": {
99
+ "newTabAttachment": "Բացել նոր ներդիրում",
100
+ "nextTR": "Հաջորդ թեստի արդյունքը",
101
+ "prevTR": "Նախորդ թեստի արդյունքը",
102
+ "downloadAttachment": "Ներբեռնել կցորդը",
103
+ "backto": "Վերադառնալ",
104
+ "clipboard": "Պատճենել սեղմատախտակին",
105
+ "clipboardError": "Սխալ. Հավանաբար ձեր զննարկիչը չի աջակցում այս գործառույթին",
106
+ "clipboardSuccess": "Հաջողությամբ պատճենվեց",
107
+ "collapse": "Կծկել",
108
+ "expand": "Ընդլայնել",
109
+ "fullscreen": "Լրիվ էկրան",
110
+ "language": "Փոխել լեզուն"
111
+ },
112
+ "errors": {
113
+ "missedAttachment": "Կցորդը չի գտնվել"
114
+ }
115
+ }
@@ -0,0 +1,115 @@
1
+ {
2
+ "statuses": {
3
+ "passed": "keçdi",
4
+ "failed": "uğursuz",
5
+ "broken": "sınıq",
6
+ "skipped": "keçildi",
7
+ "unknown": "naməlum",
8
+ "total": "cəmi",
9
+ "flakyTests": "etibarsız",
10
+ "newTests": "yeni",
11
+ "retryTests": "təkrar"
12
+ },
13
+ "testSummary": {
14
+ "all": "Bütün testlər",
15
+ "flaky": "Etibarsız testlər",
16
+ "retry": "Təkrar testlər",
17
+ "new": "Yeni testlər"
18
+ },
19
+ "tabs": {
20
+ "total": "Bütün"
21
+ },
22
+ "search": {
23
+ "search": "Axtarış",
24
+ "search-placeholder": "Ad və ya ID"
25
+ },
26
+ "filters": {
27
+ "more-filters": "Daha çox filtr",
28
+ "enable-filter": "\"{filter}\" filtrlərini aktiv edin",
29
+ "flaky": "Etibarsız",
30
+ "retry": "Təkrar",
31
+ "new": "Yeni"
32
+ },
33
+ "sort-by": {
34
+ "sort-by-text": "Sıralamaq üzrə:",
35
+ "sort-by-category": "Sıralamaq üzrə",
36
+ "direction-category": "İstiqamət"
37
+ },
38
+ "sort-by.values": {
39
+ "order": "Sıra",
40
+ "alphabet": "Əlifba",
41
+ "duration": "Müddət",
42
+ "status": "Status"
43
+ },
44
+ "sort-by.directions": {
45
+ "order-desc": "Sonuncu – Birinci",
46
+ "order-asc": "Birinci – Sonuncu",
47
+ "order-asc-short": "Birinci",
48
+ "order-desc-short": "Sonuncu",
49
+ "alphabet-asc": "A – Z",
50
+ "alphabet-desc": "Z – A",
51
+ "alphabet-asc-short": "A – Z",
52
+ "alphabet-desc-short": "Z – A",
53
+ "duration-asc": "1 – 9",
54
+ "duration-desc": "9 – 1",
55
+ "duration-asc-short": "1 – 9",
56
+ "duration-desc-short": "9 – 1",
57
+ "status-asc": "Filtr siyahısına uyğun",
58
+ "status-desc": "Tərsinə çevrilmiş",
59
+ "status-asc-short": "Adi",
60
+ "status-desc-short": "Tərs"
61
+ },
62
+ "empty": {
63
+ "no-results": "Nəticə tapılmadı",
64
+ "no-attachments-results": "Əlavə məlumatı mövcud deyil",
65
+ "no-history-results": "Tarixçə məlumatı mövcud deyil",
66
+ "no-retries-results": "Təkrar məlumatı mövcud deyil"
67
+ },
68
+ "severity": {
69
+ "blocker": "bloklayıcı",
70
+ "critical": "kritik",
71
+ "normal": "normal",
72
+ "minor": "kiçik",
73
+ "trivial": "əhəmiyyətsiz"
74
+ },
75
+ "execution": {
76
+ "name": "İcra",
77
+ "body": "Test məzmunu",
78
+ "setup": "Hazırlıq",
79
+ "teardown": "Yekunlaşma"
80
+ },
81
+ "ui": {
82
+ "labels": "Etiketlər",
83
+ "metadata": "Metaməlumat",
84
+ "parameters": "Parametrlər",
85
+ "description": "Təsvir",
86
+ "links": "Keçidlər",
87
+ "overview": "Ümumi baxış",
88
+ "history": "Tarixçə",
89
+ "attachments": "Əlavələr",
90
+ "retries": "Təkrarlar",
91
+ "error": "Səhv",
92
+ "goToStep": "Addıma keç",
93
+ "showLess": "Daha az göstər",
94
+ "showMore": "Daha çox göstər",
95
+ "copy": "Kopyala",
96
+ "at": "üçün"
97
+ },
98
+ "controls": {
99
+ "newTabAttachment": "Yeni sekmede aç",
100
+ "nextTR": "Növbəti test nəticəsi",
101
+ "prevTR": "Əvvəlki test nəticəsi",
102
+ "downloadAttachment": "Əlavəni yüklə",
103
+ "backto": "Geri dön",
104
+ "clipboard": "Panoya kopyala",
105
+ "clipboardError": "Səhv. Görünür, bu xüsusiyyət brauzeriniz tərəfindən dəstəklənmir",
106
+ "clipboardSuccess": "Uğurla kopyalandı",
107
+ "collapse": "Daralt",
108
+ "expand": "Genişləndir",
109
+ "fullscreen": "Tam ekran",
110
+ "language": "Dili dəyiş"
111
+ },
112
+ "errors": {
113
+ "missedAttachment": "Əlavə tapılmadı"
114
+ }
115
+ }