@ultraviolet/ui 3.0.0-beta.27 → 3.0.0-beta.29

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 (323) hide show
  1. package/README.md +47 -18
  2. package/dist/components/ActionBar/index.js +19 -7
  3. package/dist/components/Alert/index.d.ts +2 -1
  4. package/dist/components/Alert/index.js +98 -20
  5. package/dist/components/Alert/styles.css.d.ts +10 -1
  6. package/dist/components/Alert/styles.css.js +7 -5
  7. package/dist/components/Avatar/index.d.ts +1 -1
  8. package/dist/components/Avatar/index.js +46 -36
  9. package/dist/components/Avatar/styles.css.js +0 -1
  10. package/dist/components/Avatar/variables.css.js +1 -0
  11. package/dist/components/Badge/index.d.ts +1 -1
  12. package/dist/components/Badge/index.js +19 -8
  13. package/dist/components/Banner/index.d.ts +1 -1
  14. package/dist/components/Banner/index.js +87 -28
  15. package/dist/components/BarChart/Tooltip.d.ts +1 -1
  16. package/dist/components/BarChart/Tooltip.js +23 -10
  17. package/dist/components/BarChart/index.d.ts +1 -1
  18. package/dist/components/BarChart/index.js +51 -31
  19. package/dist/components/BarStack/index.d.ts +1 -1
  20. package/dist/components/BarStack/index.js +64 -19
  21. package/dist/components/Breadcrumbs/components/Item.d.ts +1 -1
  22. package/dist/components/Breadcrumbs/components/Item.js +48 -12
  23. package/dist/components/Breadcrumbs/index.js +11 -2
  24. package/dist/components/Bullet/index.d.ts +1 -1
  25. package/dist/components/Bullet/index.js +10 -7
  26. package/dist/components/Button/index.js +122 -72
  27. package/dist/components/Card/index.js +80 -20
  28. package/dist/components/Carousel/index.d.ts +3 -3
  29. package/dist/components/Carousel/index.js +72 -26
  30. package/dist/components/Checkbox/index.js +139 -43
  31. package/dist/components/CheckboxGroup/index.d.ts +3 -3
  32. package/dist/components/CheckboxGroup/index.js +77 -24
  33. package/dist/components/Chip/ChipIcon.d.ts +1 -1
  34. package/dist/components/Chip/ChipIcon.js +46 -12
  35. package/dist/components/Chip/index.d.ts +3 -3
  36. package/dist/components/Chip/index.js +36 -11
  37. package/dist/components/CopyButton/index.d.ts +1 -1
  38. package/dist/components/CopyButton/index.js +23 -8
  39. package/dist/components/DateInput/components/CalendarContent.d.ts +1 -1
  40. package/dist/components/DateInput/components/CalendarContent.js +61 -26
  41. package/dist/components/DateInput/components/CalendarDaily.d.ts +1 -1
  42. package/dist/components/DateInput/components/CalendarDaily.js +105 -62
  43. package/dist/components/DateInput/components/CalendarMonthly.d.ts +1 -1
  44. package/dist/components/DateInput/components/CalendarMonthly.js +62 -39
  45. package/dist/components/DateInput/components/Popup.d.ts +1 -1
  46. package/dist/components/DateInput/components/Popup.js +29 -6
  47. package/dist/components/DateInput/helpers.js +9 -2
  48. package/dist/components/DateInput/helpersLocale.js +3 -9
  49. package/dist/components/DateInput/index.d.ts +1 -1
  50. package/dist/components/DateInput/index.js +193 -62
  51. package/dist/components/Dialog/Context.js +3 -1
  52. package/dist/components/Dialog/components/Button.d.ts +1 -1
  53. package/dist/components/Dialog/components/Button.js +12 -2
  54. package/dist/components/Dialog/components/Buttons.d.ts +1 -1
  55. package/dist/components/Dialog/components/Buttons.js +1 -1
  56. package/dist/components/Dialog/components/CancelButton.d.ts +1 -1
  57. package/dist/components/Dialog/components/CancelButton.js +12 -2
  58. package/dist/components/Dialog/components/Stack.d.ts +1 -1
  59. package/dist/components/Dialog/components/Stack.js +2 -5
  60. package/dist/components/Dialog/components/Text.d.ts +1 -1
  61. package/dist/components/Dialog/components/Text.js +2 -5
  62. package/dist/components/Dialog/index.d.ts +7 -7
  63. package/dist/components/Dialog/index.js +43 -12
  64. package/dist/components/Drawer/index.d.ts +4 -4
  65. package/dist/components/Drawer/index.js +53 -15
  66. package/dist/components/EmptyState/index.d.ts +1 -1
  67. package/dist/components/EmptyState/index.js +63 -21
  68. package/dist/components/Expandable/index.d.ts +2 -2
  69. package/dist/components/Expandable/index.js +52 -15
  70. package/dist/components/ExpandableCard/components/Title.d.ts +1 -1
  71. package/dist/components/ExpandableCard/components/Title.js +12 -2
  72. package/dist/components/ExpandableCard/index.d.ts +1 -1
  73. package/dist/components/ExpandableCard/index.js +197 -96
  74. package/dist/components/GlobalAlert/GlobalAlertLink.d.ts +1 -1
  75. package/dist/components/GlobalAlert/GlobalAlertLink.js +21 -5
  76. package/dist/components/GlobalAlert/index.d.ts +2 -2
  77. package/dist/components/GlobalAlert/index.js +51 -11
  78. package/dist/components/InfiniteScroll/index.d.ts +1 -1
  79. package/dist/components/InfiniteScroll/index.js +40 -33
  80. package/dist/components/Key/index.d.ts +1 -1
  81. package/dist/components/Key/index.js +29 -8
  82. package/dist/components/Label/index.d.ts +1 -1
  83. package/dist/components/Label/index.js +67 -6
  84. package/dist/components/LineChart/CustomLegend.d.ts +1 -1
  85. package/dist/components/LineChart/CustomLegend.js +69 -45
  86. package/dist/components/LineChart/Tooltip.d.ts +1 -1
  87. package/dist/components/LineChart/Tooltip.js +31 -9
  88. package/dist/components/LineChart/helpers.js +13 -12
  89. package/dist/components/LineChart/index.d.ts +1 -1
  90. package/dist/components/LineChart/index.js +56 -40
  91. package/dist/components/Link/index.js +74 -57
  92. package/dist/components/List/Cell.js +24 -22
  93. package/dist/components/List/ColumnProvider.d.ts +1 -1
  94. package/dist/components/List/ColumnProvider.js +12 -6
  95. package/dist/components/List/HeaderCell.d.ts +1 -1
  96. package/dist/components/List/HeaderCell.js +36 -19
  97. package/dist/components/List/HeaderRow.d.ts +1 -1
  98. package/dist/components/List/HeaderRow.js +14 -12
  99. package/dist/components/List/ListContext.d.ts +1 -1
  100. package/dist/components/List/ListContext.js +128 -78
  101. package/dist/components/List/Row.js +166 -90
  102. package/dist/components/List/SelectBar.d.ts +1 -1
  103. package/dist/components/List/SelectBar.js +20 -10
  104. package/dist/components/List/SkeletonRows.d.ts +1 -1
  105. package/dist/components/List/SkeletonRows.js +26 -16
  106. package/dist/components/List/index.d.ts +1 -1
  107. package/dist/components/List/index.js +60 -22
  108. package/dist/components/Loader/index.d.ts +1 -1
  109. package/dist/components/Loader/index.js +47 -23
  110. package/dist/components/Menu/MenuContent.d.ts +1 -1
  111. package/dist/components/Menu/MenuContent.js +216 -162
  112. package/dist/components/Menu/MenuProvider.d.ts +1 -1
  113. package/dist/components/Menu/MenuProvider.js +26 -13
  114. package/dist/components/Menu/components/Group.d.ts +1 -1
  115. package/dist/components/Menu/components/Group.js +11 -2
  116. package/dist/components/Menu/components/Item.js +144 -82
  117. package/dist/components/Menu/helpers.js +3 -1
  118. package/dist/components/Menu/index.d.ts +2 -2
  119. package/dist/components/Menu/index.js +5 -11
  120. package/dist/components/Menu/types.d.ts +2 -2
  121. package/dist/components/Meter/index.d.ts +1 -1
  122. package/dist/components/Meter/index.js +43 -12
  123. package/dist/components/Modal/ModalContent.d.ts +1 -1
  124. package/dist/components/Modal/ModalContent.js +41 -11
  125. package/dist/components/Modal/ModalProvider.d.ts +1 -1
  126. package/dist/components/Modal/ModalProvider.js +14 -11
  127. package/dist/components/Modal/components/Dialog.js +91 -47
  128. package/dist/components/Modal/index.d.ts +1 -1
  129. package/dist/components/Modal/index.js +60 -3
  130. package/dist/components/Notice/index.d.ts +1 -1
  131. package/dist/components/Notice/index.js +24 -5
  132. package/dist/components/Notification/Notification.js +12 -2
  133. package/dist/components/Notification/NotificationContainer.d.ts +1 -1
  134. package/dist/components/Notification/NotificationContainer.js +18 -2
  135. package/dist/components/NumberInput/index.d.ts +1 -1
  136. package/dist/components/NumberInput/index.js +239 -130
  137. package/dist/components/Pagination/PaginationButtons.d.ts +1 -1
  138. package/dist/components/Pagination/PaginationButtons.js +75 -10
  139. package/dist/components/Pagination/PerPage.d.ts +1 -1
  140. package/dist/components/Pagination/PerPage.js +32 -17
  141. package/dist/components/Pagination/getPageNumbers.js +12 -13
  142. package/dist/components/Pagination/index.d.ts +1 -1
  143. package/dist/components/Pagination/index.js +26 -3
  144. package/dist/components/PasswordCheck/index.d.ts +1 -1
  145. package/dist/components/PasswordCheck/index.js +27 -5
  146. package/dist/components/PieChart/Legends.d.ts +1 -1
  147. package/dist/components/PieChart/Legends.js +52 -20
  148. package/dist/components/PieChart/Tooltip.d.ts +1 -1
  149. package/dist/components/PieChart/Tooltip.js +2 -4
  150. package/dist/components/PieChart/index.d.ts +1 -1
  151. package/dist/components/PieChart/index.js +80 -40
  152. package/dist/components/Popover/index.js +104 -46
  153. package/dist/components/Popup/helpers.d.ts +5 -1
  154. package/dist/components/Popup/helpers.js +49 -35
  155. package/dist/components/Popup/index.d.ts +2 -1
  156. package/dist/components/Popup/index.js +373 -255
  157. package/dist/components/Popup/styles.css.js +0 -1
  158. package/dist/components/Popup/variables.css.js +1 -0
  159. package/dist/components/ProgressBar/index.d.ts +1 -1
  160. package/dist/components/ProgressBar/index.js +74 -20
  161. package/dist/components/Radio/index.js +83 -51
  162. package/dist/components/RadioGroup/index.d.ts +2 -2
  163. package/dist/components/RadioGroup/index.js +74 -20
  164. package/dist/components/Row/index.d.ts +1 -1
  165. package/dist/components/Row/index.js +38 -27
  166. package/dist/components/Row/styles.css.d.ts +11 -0
  167. package/dist/components/Row/styles.css.js +2 -2
  168. package/dist/components/SearchInput/KeyGroup.d.ts +1 -1
  169. package/dist/components/SearchInput/KeyGroup.js +2 -6
  170. package/dist/components/SearchInput/index.js +232 -164
  171. package/dist/components/SelectInput/SelectInputProvider.d.ts +1 -1
  172. package/dist/components/SelectInput/SelectInputProvider.js +91 -55
  173. package/dist/components/SelectInput/components/Dropdown.d.ts +1 -1
  174. package/dist/components/SelectInput/components/Dropdown.js +442 -101
  175. package/dist/components/SelectInput/components/DropdownOption.d.ts +1 -1
  176. package/dist/components/SelectInput/components/DropdownOption.js +176 -27
  177. package/dist/components/SelectInput/components/SearchBarDropdown.d.ts +1 -1
  178. package/dist/components/SelectInput/components/SearchBarDropdown.js +40 -14
  179. package/dist/components/SelectInput/components/SelectBar.d.ts +1 -1
  180. package/dist/components/SelectInput/components/SelectBar.js +252 -97
  181. package/dist/components/SelectInput/index.d.ts +1 -1
  182. package/dist/components/SelectInput/index.js +102 -10
  183. package/dist/components/SelectableCard/index.js +200 -114
  184. package/dist/components/SelectableCardGroup/index.d.ts +2 -2
  185. package/dist/components/SelectableCardGroup/index.js +67 -25
  186. package/dist/components/SelectableCardOptionGroup/Provider.js +3 -1
  187. package/dist/components/SelectableCardOptionGroup/components/Image.d.ts +1 -1
  188. package/dist/components/SelectableCardOptionGroup/components/Image.js +12 -8
  189. package/dist/components/SelectableCardOptionGroup/components/Option.d.ts +1 -1
  190. package/dist/components/SelectableCardOptionGroup/components/Option.js +96 -19
  191. package/dist/components/SelectableCardOptionGroup/index.d.ts +2 -2
  192. package/dist/components/SelectableCardOptionGroup/index.js +53 -17
  193. package/dist/components/Separator/index.d.ts +1 -1
  194. package/dist/components/Separator/index.js +43 -26
  195. package/dist/components/Skeleton/Block.d.ts +1 -1
  196. package/dist/components/Skeleton/Block.js +2 -6
  197. package/dist/components/Skeleton/Blocks.d.ts +1 -1
  198. package/dist/components/Skeleton/Blocks.js +14 -9
  199. package/dist/components/Skeleton/BoxWithIcon.d.ts +1 -1
  200. package/dist/components/Skeleton/BoxWithIcon.js +14 -9
  201. package/dist/components/Skeleton/Donut.d.ts +1 -1
  202. package/dist/components/Skeleton/Donut.js +10 -2
  203. package/dist/components/Skeleton/IconSkeleton.d.ts +1 -1
  204. package/dist/components/Skeleton/IconSkeleton.js +1 -1
  205. package/dist/components/Skeleton/Line.d.ts +1 -1
  206. package/dist/components/Skeleton/Line.js +10 -4
  207. package/dist/components/Skeleton/List.d.ts +1 -1
  208. package/dist/components/Skeleton/List.js +3 -9
  209. package/dist/components/Skeleton/Slider.d.ts +1 -1
  210. package/dist/components/Skeleton/Slider.js +11 -8
  211. package/dist/components/Skeleton/Square.d.ts +1 -1
  212. package/dist/components/Skeleton/Square.js +1 -1
  213. package/dist/components/Skeleton/index.d.ts +9 -9
  214. package/dist/components/Skeleton/index.js +16 -5
  215. package/dist/components/Slider/components/DoubleSlider.d.ts +1 -1
  216. package/dist/components/Slider/components/DoubleSlider.js +191 -88
  217. package/dist/components/Slider/components/Options.d.ts +1 -1
  218. package/dist/components/Slider/components/Options.js +44 -28
  219. package/dist/components/Slider/components/SingleSlider.d.ts +1 -1
  220. package/dist/components/Slider/components/SingleSlider.js +133 -53
  221. package/dist/components/Slider/index.d.ts +1 -1
  222. package/dist/components/Slider/index.js +82 -12
  223. package/dist/components/Snippet/index.d.ts +1 -1
  224. package/dist/components/Snippet/index.js +103 -19
  225. package/dist/components/Stack/index.d.ts +1 -1
  226. package/dist/components/Stack/index.js +20 -24
  227. package/dist/components/Stack/styles.css.js +2 -2
  228. package/dist/components/Status/index.d.ts +1 -1
  229. package/dist/components/Status/index.js +13 -11
  230. package/dist/components/StepList/index.d.ts +2 -2
  231. package/dist/components/StepList/index.js +31 -10
  232. package/dist/components/Stepper/Step.d.ts +1 -1
  233. package/dist/components/Stepper/Step.js +65 -30
  234. package/dist/components/Stepper/StepperProvider.d.ts +1 -1
  235. package/dist/components/Stepper/StepperProvider.js +13 -10
  236. package/dist/components/Stepper/index.d.ts +2 -2
  237. package/dist/components/Stepper/index.js +46 -26
  238. package/dist/components/SwitchButton/FocusOverlay.d.ts +1 -1
  239. package/dist/components/SwitchButton/FocusOverlay.js +11 -5
  240. package/dist/components/SwitchButton/Option.d.ts +1 -1
  241. package/dist/components/SwitchButton/Option.js +20 -2
  242. package/dist/components/SwitchButton/index.d.ts +2 -2
  243. package/dist/components/SwitchButton/index.js +95 -48
  244. package/dist/components/Table/Body.d.ts +1 -1
  245. package/dist/components/Table/Body.js +2 -4
  246. package/dist/components/Table/Cell.d.ts +1 -1
  247. package/dist/components/Table/Cell.js +20 -17
  248. package/dist/components/Table/Header.d.ts +1 -1
  249. package/dist/components/Table/Header.js +2 -4
  250. package/dist/components/Table/HeaderCell.d.ts +1 -1
  251. package/dist/components/Table/HeaderCell.js +46 -22
  252. package/dist/components/Table/HeaderRow.d.ts +1 -1
  253. package/dist/components/Table/HeaderRow.js +21 -12
  254. package/dist/components/Table/Row.d.ts +1 -1
  255. package/dist/components/Table/Row.js +70 -14
  256. package/dist/components/Table/SelectBar.d.ts +1 -1
  257. package/dist/components/Table/SelectBar.js +20 -10
  258. package/dist/components/Table/SkeletonRows.d.ts +1 -1
  259. package/dist/components/Table/SkeletonRows.js +17 -16
  260. package/dist/components/Table/TableContext.d.ts +1 -1
  261. package/dist/components/Table/TableContext.js +22 -13
  262. package/dist/components/Table/index.d.ts +6 -6
  263. package/dist/components/Table/index.js +64 -23
  264. package/dist/components/Tabs/Tab.js +79 -41
  265. package/dist/components/Tabs/TabMenu.js +39 -23
  266. package/dist/components/Tabs/TabMenuItem.d.ts +1 -1
  267. package/dist/components/Tabs/TabMenuItem.js +20 -11
  268. package/dist/components/Tabs/TabsContext.js +3 -1
  269. package/dist/components/Tabs/index.d.ts +3 -3
  270. package/dist/components/Tabs/index.js +34 -14
  271. package/dist/components/Tag/index.d.ts +1 -1
  272. package/dist/components/Tag/index.js +45 -12
  273. package/dist/components/TagInput/index.d.ts +1 -1
  274. package/dist/components/TagInput/index.js +131 -52
  275. package/dist/components/TagInput/styles.css.d.ts +3 -0
  276. package/dist/components/TagList/index.d.ts +1 -1
  277. package/dist/components/TagList/index.js +132 -59
  278. package/dist/components/Text/index.d.ts +1 -1
  279. package/dist/components/Text/index.js +21 -17
  280. package/dist/components/TextArea/index.js +178 -103
  281. package/dist/components/TextInput/index.d.ts +1 -1
  282. package/dist/components/TextInput/index.js +286 -106
  283. package/dist/components/TimeInput/constants.js +1 -5
  284. package/dist/components/TimeInput/index.d.ts +1 -1
  285. package/dist/components/TimeInput/index.js +207 -118
  286. package/dist/components/Toaster/Toaster.js +1 -1
  287. package/dist/components/Toaster/ToasterContainer.d.ts +1 -1
  288. package/dist/components/Toaster/ToasterContainer.js +21 -2
  289. package/dist/components/Toaster/components/Button.d.ts +1 -1
  290. package/dist/components/Toaster/components/CloseButton.d.ts +1 -1
  291. package/dist/components/Toaster/components/CloseButton.js +12 -2
  292. package/dist/components/Toaster/components/Content.d.ts +1 -1
  293. package/dist/components/Toaster/components/Content.js +2 -4
  294. package/dist/components/Toaster/components/Link.d.ts +1 -1
  295. package/dist/components/Toaster/index.d.ts +2 -2
  296. package/dist/components/Toggle/index.js +101 -40
  297. package/dist/components/ToggleGroup/index.d.ts +3 -3
  298. package/dist/components/ToggleGroup/index.js +61 -22
  299. package/dist/components/Tooltip/index.d.ts +1 -1
  300. package/dist/components/Tooltip/index.js +42 -19
  301. package/dist/components/TreeMapChart/Tooltip.d.ts +1 -1
  302. package/dist/components/TreeMapChart/Tooltip.js +1 -1
  303. package/dist/components/TreeMapChart/index.d.ts +1 -1
  304. package/dist/components/TreeMapChart/index.js +33 -27
  305. package/dist/components/UnitInput/index.d.ts +1 -1
  306. package/dist/components/UnitInput/index.js +110 -29
  307. package/dist/components/VerificationCode/index.d.ts +1 -1
  308. package/dist/components/VerificationCode/index.js +80 -21
  309. package/dist/helpers/legend.js +4 -4
  310. package/dist/helpers/treeMap.d.ts +2 -1
  311. package/dist/index.d.ts +1 -1
  312. package/dist/index.js +2 -4
  313. package/dist/theme/ThemeProvider.d.ts +1 -1
  314. package/dist/theme/ThemeProvider.js +4 -2
  315. package/dist/theme/index.js +1 -8
  316. package/dist/ui.css +1 -1
  317. package/dist/utils/ids.js +1 -3
  318. package/dist/utils/index.d.ts +1 -1
  319. package/dist/utils/responsive/index.d.ts +0 -1
  320. package/dist/utils/responsive/style.css.d.ts +3 -0
  321. package/package.json +5 -10
  322. package/dist/utils/responsive/Breakpoint.d.ts +0 -9
  323. package/dist/utils/responsive/Breakpoint.js +0 -14
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
2
+ import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import { useMemo } from "react";
4
4
  import { Stack } from "../Stack/index.js";
5
5
  import { Text } from "../Text/index.js";
@@ -26,11 +26,46 @@ const LabelRequiredOrNot = ({
26
26
  }, [disabled, htmlFor]);
27
27
  if (required) {
28
28
  return /* @__PURE__ */ jsxs(Stack, { alignItems: "start", direction: "row", gap: "0.5", style, children: [
29
- /* @__PURE__ */ jsx(Text, { as: as === "label" ? "label" : "legend", className: textPointer[textPointerValue], disabled, htmlFor, id, sentiment, variant: size === "large" ? "bodyStrong" : "bodySmallStrong", children }),
30
- /* @__PURE__ */ jsx(Text, { "aria-label": "required", as: "span", disabled, sentiment: "danger", variant: size === "large" ? "bodyStrong" : "bodySmallStrong", children: "*" })
29
+ /* @__PURE__ */ jsx(
30
+ Text,
31
+ {
32
+ as: as === "label" ? "label" : "legend",
33
+ className: textPointer[textPointerValue],
34
+ disabled,
35
+ htmlFor,
36
+ id,
37
+ sentiment,
38
+ variant: size === "large" ? "bodyStrong" : "bodySmallStrong",
39
+ children
40
+ }
41
+ ),
42
+ /* @__PURE__ */ jsx(
43
+ Text,
44
+ {
45
+ "aria-label": "required",
46
+ as: "span",
47
+ disabled,
48
+ sentiment: "danger",
49
+ variant: size === "large" ? "bodyStrong" : "bodySmallStrong",
50
+ children: "*"
51
+ }
52
+ )
31
53
  ] });
32
54
  }
33
- return /* @__PURE__ */ jsx(Text, { as: as === "label" ? "label" : "legend", className: textPointer[textPointerValue], disabled, htmlFor, id, sentiment, style, variant: size === "large" ? "bodyStrong" : "bodySmallStrong", children });
55
+ return /* @__PURE__ */ jsx(
56
+ Text,
57
+ {
58
+ as: as === "label" ? "label" : "legend",
59
+ className: textPointer[textPointerValue],
60
+ disabled,
61
+ htmlFor,
62
+ id,
63
+ sentiment,
64
+ style,
65
+ variant: size === "large" ? "bodyStrong" : "bodySmallStrong",
66
+ children
67
+ }
68
+ );
34
69
  };
35
70
  const Label = ({
36
71
  as = "label",
@@ -44,9 +79,35 @@ const Label = ({
44
79
  disabled,
45
80
  style
46
81
  }) => labelDescription ? /* @__PURE__ */ jsxs(Stack, { alignItems: "center", direction: "row", gap: "1", children: [
47
- /* @__PURE__ */ jsx(LabelRequiredOrNot, { as, disabled, htmlFor, id, required, sentiment, size, style, children }),
82
+ /* @__PURE__ */ jsx(
83
+ LabelRequiredOrNot,
84
+ {
85
+ as,
86
+ disabled,
87
+ htmlFor,
88
+ id,
89
+ required,
90
+ sentiment,
91
+ size,
92
+ style,
93
+ children
94
+ }
95
+ ),
48
96
  typeof labelDescription === "string" ? /* @__PURE__ */ jsx(Text, { as: "span", variant: "bodySmall", children: labelDescription }) : labelDescription
49
- ] }) : /* @__PURE__ */ jsx(LabelRequiredOrNot, { as, disabled, htmlFor, id, required, sentiment, size, style, children });
97
+ ] }) : /* @__PURE__ */ jsx(
98
+ LabelRequiredOrNot,
99
+ {
100
+ as,
101
+ disabled,
102
+ htmlFor,
103
+ id,
104
+ required,
105
+ sentiment,
106
+ size,
107
+ style,
108
+ children
109
+ }
110
+ );
50
111
  export {
51
112
  Label
52
113
  };
@@ -9,5 +9,5 @@ type CustomLegendProps = {
9
9
  className?: string;
10
10
  'data-testid'?: string;
11
11
  };
12
- export declare const CustomLegend: ({ axisTransformer, data, selected, setSelected, className, "data-testid": dataTestId, }: CustomLegendProps) => import("@emotion/react/jsx-runtime").JSX.Element;
12
+ export declare const CustomLegend: ({ axisTransformer, data, selected, setSelected, className, "data-testid": dataTestId, }: CustomLegendProps) => import("react/jsx-runtime").JSX.Element;
13
13
  export {};
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
2
+ import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import { theme } from "@ultraviolet/themes";
4
4
  import { assignInlineVars } from "@vanilla-extract/dynamic";
5
5
  import { getLegendColor } from "../../helpers/legend.js";
@@ -7,10 +7,7 @@ import { Checkbox } from "../Checkbox/index.js";
7
7
  import { Text } from "../Text/index.js";
8
8
  import { getSelected, getMin, getMax, getAverage, getCurrent } from "./helpers.js";
9
9
  import { container, lineChartHead, longContainer, lineChartBody, lineChartRow, cellValueContainer, lineChartLegend, backgroundColorLegend, textLegend } from "./styles.css.js";
10
- const Cell = ({
11
- value,
12
- variant
13
- }) => /* @__PURE__ */ jsx(Text, { as: "span", className: textLegend, sentiment: "neutral", variant, children: value });
10
+ const Cell = ({ value, variant }) => /* @__PURE__ */ jsx(Text, { as: "span", className: textLegend, sentiment: "neutral", variant, children: value });
14
11
  const noop = (value) => value.toString();
15
12
  const CustomLegend = ({
16
13
  axisTransformer = noop,
@@ -19,46 +16,73 @@ const CustomLegend = ({
19
16
  setSelected,
20
17
  className,
21
18
  "data-testid": dataTestId
22
- }) => /* @__PURE__ */ jsxs("div", { className: `${className ? `${className} ` : ""}${container}`, "data-testid": dataTestId, children: [
23
- /* @__PURE__ */ jsxs("div", { className: lineChartHead, children: [
24
- /* @__PURE__ */ jsx("div", { className: longContainer, children: "Legend" }),
25
- /* @__PURE__ */ jsx(Cell, { value: "Minimum", variant: "body" }),
26
- /* @__PURE__ */ jsx(Cell, { value: "Maximum", variant: "body" }),
27
- /* @__PURE__ */ jsx(Cell, { value: "Average", variant: "body" }),
28
- /* @__PURE__ */ jsx(Cell, { value: "Current", variant: "body" })
29
- ] }),
30
- /* @__PURE__ */ jsx("div", { className: lineChartBody, children: data?.map((row, index) => {
31
- const values = row.data.map((val) => val.y);
32
- const labelIndexed = `${row.id}${index}`;
33
- const id = row.id.toString();
34
- return /* @__PURE__ */ jsxs(
35
- "div",
36
- {
37
- className: lineChartRow,
38
- children: [
39
- /* @__PURE__ */ jsx("div", { className: longContainer, children: /* @__PURE__ */ jsx(Checkbox, { checked: selected.includes(labelIndexed), name: id, onChange: () => setSelected([...getSelected(id, index, selected)]), children: /* @__PURE__ */ jsxs("div", { className: cellValueContainer, children: [
40
- /* @__PURE__ */ jsx(Text, { as: "span", sentiment: "neutral", variant: "bodySmall", children: row?.["label"] }),
41
- /* @__PURE__ */ jsx(
42
- "div",
43
- {
44
- className: lineChartLegend,
45
- "data-testid": `label-${id}`,
46
- style: assignInlineVars({
47
- [backgroundColorLegend]: getLegendColor(theme)[index]
48
- })
49
- }
50
- )
51
- ] }) }) }),
52
- /* @__PURE__ */ jsx(Cell, { value: axisTransformer(getMin(values)), variant: "bodySmall" }),
53
- /* @__PURE__ */ jsx(Cell, { value: axisTransformer(getMax(values)), variant: "bodySmall" }),
54
- /* @__PURE__ */ jsx(Cell, { value: axisTransformer(getAverage(values)), variant: "bodySmall" }),
55
- /* @__PURE__ */ jsx(Cell, { value: axisTransformer(getCurrent(values)), variant: "bodySmall" })
56
- ]
57
- },
58
- labelIndexed
59
- );
60
- }) })
61
- ] });
19
+ }) => /* @__PURE__ */ jsxs(
20
+ "div",
21
+ {
22
+ className: `${className ? `${className} ` : ""}${container}`,
23
+ "data-testid": dataTestId,
24
+ children: [
25
+ /* @__PURE__ */ jsxs("div", { className: lineChartHead, children: [
26
+ /* @__PURE__ */ jsx("div", { className: longContainer, children: "Legend" }),
27
+ /* @__PURE__ */ jsx(Cell, { value: "Minimum", variant: "body" }),
28
+ /* @__PURE__ */ jsx(Cell, { value: "Maximum", variant: "body" }),
29
+ /* @__PURE__ */ jsx(Cell, { value: "Average", variant: "body" }),
30
+ /* @__PURE__ */ jsx(Cell, { value: "Current", variant: "body" })
31
+ ] }),
32
+ /* @__PURE__ */ jsx("div", { className: lineChartBody, children: data?.map((row, index) => {
33
+ const values = row.data.map((val) => val.y);
34
+ const labelIndexed = `${row.id}${index}`;
35
+ const id = row.id.toString();
36
+ return /* @__PURE__ */ jsxs(
37
+ "div",
38
+ {
39
+ className: lineChartRow,
40
+ children: [
41
+ /* @__PURE__ */ jsx("div", { className: longContainer, children: /* @__PURE__ */ jsx(
42
+ Checkbox,
43
+ {
44
+ checked: selected.includes(labelIndexed),
45
+ name: id,
46
+ onChange: () => setSelected([...getSelected(id, index, selected)]),
47
+ children: /* @__PURE__ */ jsxs("div", { className: cellValueContainer, children: [
48
+ /* @__PURE__ */ jsx(Text, { as: "span", sentiment: "neutral", variant: "bodySmall", children: row?.["label"] }),
49
+ /* @__PURE__ */ jsx(
50
+ "div",
51
+ {
52
+ className: lineChartLegend,
53
+ "data-testid": `label-${id}`,
54
+ style: assignInlineVars({
55
+ [backgroundColorLegend]: getLegendColor(theme)[index]
56
+ })
57
+ }
58
+ )
59
+ ] })
60
+ }
61
+ ) }),
62
+ /* @__PURE__ */ jsx(Cell, { value: axisTransformer(getMin(values)), variant: "bodySmall" }),
63
+ /* @__PURE__ */ jsx(Cell, { value: axisTransformer(getMax(values)), variant: "bodySmall" }),
64
+ /* @__PURE__ */ jsx(
65
+ Cell,
66
+ {
67
+ value: axisTransformer(getAverage(values)),
68
+ variant: "bodySmall"
69
+ }
70
+ ),
71
+ /* @__PURE__ */ jsx(
72
+ Cell,
73
+ {
74
+ value: axisTransformer(getCurrent(values)),
75
+ variant: "bodySmall"
76
+ }
77
+ )
78
+ ]
79
+ },
80
+ labelIndexed
81
+ );
82
+ }) })
83
+ ]
84
+ }
85
+ );
62
86
  export {
63
87
  CustomLegend
64
88
  };
@@ -2,5 +2,5 @@ import type { Point } from '@nivo/line';
2
2
  type LineChartTooltipProps = {
3
3
  point: Point;
4
4
  };
5
- export declare const LineChartTooltip: ({ point }: LineChartTooltipProps) => import("@emotion/react/jsx-runtime").JSX.Element;
5
+ export declare const LineChartTooltip: ({ point }: LineChartTooltipProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,17 +1,39 @@
1
1
  "use client";
2
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
2
+ import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import { assignInlineVars } from "@vanilla-extract/dynamic";
4
4
  import { Text } from "../Text/index.js";
5
5
  import { lineTooltipContainer, lineColorSquare, colorLine } from "./styles.css.js";
6
- const LineChartTooltip = ({
7
- point
8
- }) => /* @__PURE__ */ jsxs("div", { className: lineTooltipContainer, children: [
9
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("span", { className: lineColorSquare, style: assignInlineVars({
10
- [colorLine]: point.serieColor
11
- }) }) }),
6
+ const LineChartTooltip = ({ point }) => /* @__PURE__ */ jsxs("div", { className: lineTooltipContainer, children: [
7
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
8
+ "span",
9
+ {
10
+ className: lineColorSquare,
11
+ style: assignInlineVars({
12
+ [colorLine]: point.serieColor
13
+ })
14
+ }
15
+ ) }),
12
16
  /* @__PURE__ */ jsxs("div", { children: [
13
- /* @__PURE__ */ jsx(Text, { as: "div", prominence: "stronger", sentiment: "neutral", variant: "bodyStronger", children: point.data.yFormatted }),
14
- /* @__PURE__ */ jsx(Text, { as: "div", prominence: "stronger", sentiment: "neutral", variant: "bodySmall", children: point.data.xFormatted })
17
+ /* @__PURE__ */ jsx(
18
+ Text,
19
+ {
20
+ as: "div",
21
+ prominence: "stronger",
22
+ sentiment: "neutral",
23
+ variant: "bodyStronger",
24
+ children: point.data.yFormatted
25
+ }
26
+ ),
27
+ /* @__PURE__ */ jsx(
28
+ Text,
29
+ {
30
+ as: "div",
31
+ prominence: "stronger",
32
+ sentiment: "neutral",
33
+ variant: "bodySmall",
34
+ children: point.data.xFormatted
35
+ }
36
+ )
15
37
  ] })
16
38
  ] });
17
39
  export {
@@ -12,30 +12,31 @@ const parse = (data) => {
12
12
  };
13
13
  const getMin = (values = []) => values.length > 0 ? Math.min(...values.map((data) => parse(data))) : 0;
14
14
  const getMax = (values = []) => values.length > 0 ? Math.max(...values.map((data) => parse(data))) : 0;
15
- const getAverage = (values = []) => values.length > 0 ? Math.round(values.reduce((sum, curr) => sum + parse(curr), 0) / values.length * 100) / 100 : 0;
15
+ const getAverage = (values = []) => values.length > 0 ? Math.round(
16
+ values.reduce((sum, curr) => sum + parse(curr), 0) / values.length * 100
17
+ ) / 100 : 0;
16
18
  const getMaxChartValue = (preppedData) => {
17
19
  if (!preppedData?.length) {
18
20
  return 0;
19
21
  }
20
- const maximum = Math.max(...preppedData.map(({
21
- data
22
- }) => getMax(data.map(({
23
- y
24
- }) => y || 0))));
22
+ const maximum = Math.max(
23
+ ...preppedData.map(({ data }) => getMax(data.map(({ y }) => y || 0)))
24
+ );
25
25
  return Math.ceil(maximum + maximum * 0.1);
26
26
  };
27
27
  const getMinChartValue = (preppedData) => {
28
28
  if (!preppedData?.length) {
29
29
  return 0;
30
30
  }
31
- const minimum = Math.min(...preppedData.map(({
32
- data
33
- }) => getMin(data.map(({
34
- y
35
- }) => y || 0))));
31
+ const minimum = Math.min(
32
+ ...preppedData.map(({ data }) => getMin(data.map(({ y }) => y || 0)))
33
+ );
36
34
  return Math.floor(minimum - minimum * 0.1);
37
35
  };
38
- const getCurrent = (values = []) => values.length > 0 ? values[values.length - 1] : 0;
36
+ const getCurrent = (values = []) => {
37
+ const val = values.at(-1);
38
+ return val ? val : 0;
39
+ };
39
40
  const getSelected = (label, index, selected = []) => {
40
41
  const labelIndexed = label + index.toString();
41
42
  const found = selected.indexOf(labelIndexed);
@@ -22,5 +22,5 @@ type LineChartProps = {
22
22
  * See https://nivo.rocks/line/ for more information.
23
23
  * @experimental This component is experimental and may be subject to breaking changes in the future.
24
24
  */
25
- export declare const LineChart: ({ height, margin, xScale, yScale, data, withLegend, axisFormatters, pointFormatters, tickValues, chartProps, style, "data-testid": dataTestId, }: LineChartProps) => import("@emotion/react/jsx-runtime").JSX.Element;
25
+ export declare const LineChart: ({ height, margin, xScale, yScale, data, withLegend, axisFormatters, pointFormatters, tickValues, chartProps, style, "data-testid": dataTestId, }: LineChartProps) => import("react/jsx-runtime").JSX.Element;
26
26
  export {};
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs, Fragment, jsx } from "@emotion/react/jsx-runtime";
2
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
3
  import { ResponsiveLine } from "@nivo/line";
4
4
  import { useTheme } from "@ultraviolet/themes";
5
5
  import { useState, useEffect } from "react";
@@ -8,12 +8,7 @@ import { getNivoTheme } from "../../helpers/nivoTheme.js";
8
8
  import { CustomLegend } from "./CustomLegend.js";
9
9
  import { getMinChartValue, getMaxChartValue } from "./helpers.js";
10
10
  import { LineChartTooltip } from "./Tooltip.js";
11
- const DEFAULT_MARGIN = {
12
- bottom: 50,
13
- left: 60,
14
- right: 25,
15
- top: 50
16
- };
11
+ const DEFAULT_MARGIN = { bottom: 50, left: 60, right: 25, top: 50 };
17
12
  const DEFAULT_XSCALE = {
18
13
  format: "%Y-%m-%dT%H:%M:%S%Z",
19
14
  // 2021-08-30T02:56:07Z
@@ -21,9 +16,7 @@ const DEFAULT_XSCALE = {
21
16
  type: "time",
22
17
  useUTC: false
23
18
  };
24
- const DEFAULT_YSCALE = {
25
- type: "linear"
26
- };
19
+ const DEFAULT_YSCALE = { type: "linear" };
27
20
  const DEFAULT_CHARTPROPS = {};
28
21
  const LineChart = ({
29
22
  height = "537px",
@@ -48,43 +41,66 @@ const LineChart = ({
48
41
  label: d?.["label"]
49
42
  }))
50
43
  };
51
- const [selected, setSelected] = useState(dataset.datasets?.map(({
52
- id
53
- }, index) => `${id}${index}`));
54
- const finalData = dataset.datasets?.filter(({
55
- id
56
- }, index) => selected ? selected.includes(`${id}${index}`) : false);
44
+ const [selected, setSelected] = useState(
45
+ dataset.datasets?.map(({ id }, index) => `${id}${index}`)
46
+ );
47
+ const finalData = dataset.datasets?.filter(
48
+ ({ id }, index) => selected ? selected.includes(`${id}${index}`) : false
49
+ );
57
50
  useEffect(() => {
58
51
  if (selected !== void 0) {
59
52
  return;
60
53
  }
61
- setSelected(dataset.datasets?.map(({
62
- id
63
- }, index) => `${id}${index}`));
54
+ setSelected(dataset.datasets?.map(({ id }, index) => `${id}${index}`));
64
55
  }, [dataset.datasets, selected]);
65
56
  const localColors = getLegendColor(theme);
66
57
  return /* @__PURE__ */ jsxs(Fragment, { children: [
67
- /* @__PURE__ */ jsx("div", { style: {
68
- height,
69
- ...style
70
- }, children: /* @__PURE__ */ jsx(ResponsiveLine, { axisBottom: {
71
- format: axisFormatters?.bottom,
72
- tickPadding: 5,
73
- tickRotation: 0,
74
- tickSize: 5,
75
- tickValues: tickValues?.bottom
76
- }, axisLeft: {
77
- format: axisFormatters?.left,
78
- tickPadding: 5,
79
- tickRotation: 0,
80
- tickSize: 5,
81
- tickValues: tickValues?.left
82
- }, colors: localColors, curve: "monotoneX", data: finalData ?? [], "data-testid": dataTestId, margin, pointSize: 10, theme: getNivoTheme(theme), tooltip: LineChartTooltip, useMesh: true, xFormat: pointFormatters?.x, xScale, yFormat: pointFormatters?.y, yScale: {
83
- max: getMaxChartValue(finalData),
84
- min: getMinChartValue(finalData),
85
- ...yScale
86
- }, ...chartProps }) }),
87
- withLegend && /* @__PURE__ */ jsx(CustomLegend, { axisTransformer: axisFormatters?.left, data: dataset.datasets, selected: selected ?? [], setSelected })
58
+ /* @__PURE__ */ jsx("div", { style: { height, ...style }, children: /* @__PURE__ */ jsx(
59
+ ResponsiveLine,
60
+ {
61
+ axisBottom: {
62
+ format: axisFormatters?.bottom,
63
+ tickPadding: 5,
64
+ tickRotation: 0,
65
+ tickSize: 5,
66
+ tickValues: tickValues?.bottom
67
+ },
68
+ axisLeft: {
69
+ format: axisFormatters?.left,
70
+ tickPadding: 5,
71
+ tickRotation: 0,
72
+ tickSize: 5,
73
+ tickValues: tickValues?.left
74
+ },
75
+ colors: localColors,
76
+ curve: "monotoneX",
77
+ data: finalData ?? [],
78
+ "data-testid": dataTestId,
79
+ margin,
80
+ pointSize: 10,
81
+ theme: getNivoTheme(theme),
82
+ tooltip: LineChartTooltip,
83
+ useMesh: true,
84
+ xFormat: pointFormatters?.x,
85
+ xScale,
86
+ yFormat: pointFormatters?.y,
87
+ yScale: {
88
+ max: getMaxChartValue(finalData),
89
+ min: getMinChartValue(finalData),
90
+ ...yScale
91
+ },
92
+ ...chartProps
93
+ }
94
+ ) }),
95
+ withLegend && /* @__PURE__ */ jsx(
96
+ CustomLegend,
97
+ {
98
+ axisTransformer: axisFormatters?.left,
99
+ data: dataset.datasets,
100
+ selected: selected ?? [],
101
+ setSelected
102
+ }
103
+ )
88
104
  ] });
89
105
  };
90
106
  export {
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx, jsxs } from "@emotion/react/jsx-runtime";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { ArrowLeftIcon, OpenInNewIcon, ArrowRightIcon } from "@ultraviolet/icons";
4
4
  import { forwardRef, useState, useRef, useMemo, useEffect } from "react";
5
5
  import recursivelyGetChildrenString from "../../helpers/recursivelyGetChildrenString.js";
@@ -7,63 +7,80 @@ import { Tooltip } from "../Tooltip/index.js";
7
7
  import { link, defaultLink, iconLeftLink, containerIconLink, iconRightLink } from "./styles.css.js";
8
8
  const ICON_SIZE = "small";
9
9
  const BLANK_TARGET_ICON_SIZE = "small";
10
- const Link = forwardRef(({
11
- children,
12
- href,
13
- target,
14
- download,
15
- sentiment = "info",
16
- prominence,
17
- size = "large",
18
- iconPosition,
19
- rel,
20
- className,
21
- onClick,
22
- "aria-label": ariaLabel,
23
- "aria-current": ariaCurrent,
24
- "aria-keyshortcuts": ariaKeyshortcuts,
25
- oneLine = false,
26
- "data-testid": dataTestId,
27
- variant = "standalone",
28
- style
29
- }, ref) => {
30
- const isBlank = target === "_blank";
31
- const computedRel = rel || (isBlank ? "noopener noreferrer" : void 0);
32
- const [isTruncated, setIsTruncated] = useState(false);
33
- const elementRef = useRef(null);
34
- const usedRef = ref ?? elementRef;
35
- const finalStringChildren = recursivelyGetChildrenString(children);
36
- const textVariant = useMemo(() => {
37
- if (size === "xsmall") {
38
- return "captionStrong";
39
- }
40
- if (size === "small") {
41
- return "bodySmallStrong";
42
- }
43
- return "bodyStrong";
44
- }, [size]);
45
- useEffect(() => {
46
- if (oneLine && usedRef?.current) {
47
- const {
48
- offsetWidth,
49
- scrollWidth
50
- } = usedRef.current;
51
- setIsTruncated(offsetWidth < scrollWidth);
52
- }
53
- }, [oneLine, ref, usedRef]);
54
- return /* @__PURE__ */ jsx(Tooltip, { text: oneLine && isTruncated ? finalStringChildren : "", children: /* @__PURE__ */ jsxs("a", { "aria-current": ariaCurrent, "aria-keyshortcuts": ariaKeyshortcuts, "aria-label": ariaLabel, className: `${className ? `${className} ` : ""}${link({
55
- oneLine,
56
- prominence,
57
- sentiment,
58
- type: variant,
59
- variant: textVariant
60
- })} ${defaultLink}`, "data-testid": dataTestId, "data-variant": variant, download, href, onClick, ref: usedRef, rel: computedRel, style, target, children: [
61
- !isBlank && iconPosition === "left" ? /* @__PURE__ */ jsx(ArrowLeftIcon, { className: iconLeftLink, size: ICON_SIZE }) : null,
10
+ const Link = forwardRef(
11
+ ({
62
12
  children,
63
- isBlank ? /* @__PURE__ */ jsx("span", { className: containerIconLink, children: /* @__PURE__ */ jsx(OpenInNewIcon, { className: iconRightLink, size: BLANK_TARGET_ICON_SIZE }) }) : null,
64
- !isBlank && iconPosition === "right" ? /* @__PURE__ */ jsx(ArrowRightIcon, { className: iconRightLink, size: ICON_SIZE }) : null
65
- ] }) });
66
- });
13
+ href,
14
+ target,
15
+ download,
16
+ sentiment = "info",
17
+ prominence,
18
+ size = "large",
19
+ iconPosition,
20
+ rel,
21
+ className,
22
+ onClick,
23
+ "aria-label": ariaLabel,
24
+ "aria-current": ariaCurrent,
25
+ "aria-keyshortcuts": ariaKeyshortcuts,
26
+ oneLine = false,
27
+ "data-testid": dataTestId,
28
+ variant = "standalone",
29
+ style
30
+ }, ref) => {
31
+ const isBlank = target === "_blank";
32
+ const computedRel = rel || (isBlank ? "noopener noreferrer" : void 0);
33
+ const [isTruncated, setIsTruncated] = useState(false);
34
+ const elementRef = useRef(null);
35
+ const usedRef = ref ?? elementRef;
36
+ const finalStringChildren = recursivelyGetChildrenString(children);
37
+ const textVariant = useMemo(() => {
38
+ if (size === "xsmall") {
39
+ return "captionStrong";
40
+ }
41
+ if (size === "small") {
42
+ return "bodySmallStrong";
43
+ }
44
+ return "bodyStrong";
45
+ }, [size]);
46
+ useEffect(() => {
47
+ if (oneLine && usedRef?.current) {
48
+ const { offsetWidth, scrollWidth } = usedRef.current;
49
+ setIsTruncated(offsetWidth < scrollWidth);
50
+ }
51
+ }, [oneLine, ref, usedRef]);
52
+ return /* @__PURE__ */ jsx(Tooltip, { text: oneLine && isTruncated ? finalStringChildren : "", children: /* @__PURE__ */ jsxs(
53
+ "a",
54
+ {
55
+ "aria-current": ariaCurrent,
56
+ "aria-keyshortcuts": ariaKeyshortcuts,
57
+ "aria-label": ariaLabel,
58
+ className: `${className ? `${className} ` : ""}${link({ oneLine, prominence, sentiment, type: variant, variant: textVariant })} ${defaultLink}`,
59
+ "data-testid": dataTestId,
60
+ "data-variant": variant,
61
+ download,
62
+ href,
63
+ onClick,
64
+ ref: usedRef,
65
+ rel: computedRel,
66
+ style,
67
+ target,
68
+ children: [
69
+ !isBlank && iconPosition === "left" ? /* @__PURE__ */ jsx(ArrowLeftIcon, { className: iconLeftLink, size: ICON_SIZE }) : null,
70
+ children,
71
+ isBlank ? /* @__PURE__ */ jsx("span", { className: containerIconLink, children: /* @__PURE__ */ jsx(
72
+ OpenInNewIcon,
73
+ {
74
+ className: iconRightLink,
75
+ size: BLANK_TARGET_ICON_SIZE
76
+ }
77
+ ) }) : null,
78
+ !isBlank && iconPosition === "right" ? /* @__PURE__ */ jsx(ArrowRightIcon, { className: iconRightLink, size: ICON_SIZE }) : null
79
+ ]
80
+ }
81
+ ) });
82
+ }
83
+ );
67
84
  export {
68
85
  Link
69
86
  };