@algolia/satellite 1.0.0-beta.134 → 1.0.0-beta.137

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 (246) hide show
  1. package/cjs/AnnouncementBadge/AnnouncementBadge.js +2 -2
  2. package/cjs/AutoComplete/AutoComplete.js +7 -5
  3. package/cjs/Avatars/ApplicationAvatar.js +4 -2
  4. package/cjs/Avatars/UserAvatar.js +7 -4
  5. package/cjs/Avatars/utils.js +12 -4
  6. package/cjs/Badge/Badge.js +7 -7
  7. package/cjs/Banners/Alert/Alert.js +3 -3
  8. package/cjs/Banners/Promote/Promote.js +2 -2
  9. package/cjs/Button/Button.js +7 -7
  10. package/cjs/Button/Button.tailwind.js +7 -7
  11. package/cjs/Button/ButtonGroup.js +2 -2
  12. package/cjs/Button/IconButton.js +3 -3
  13. package/cjs/Card/Card.js +2 -2
  14. package/cjs/Card/components/CardHeader.js +2 -2
  15. package/cjs/Card/components/CardTitle.js +2 -2
  16. package/cjs/Checkbox/Checkbox.d.ts +1 -1
  17. package/cjs/Checkbox/Checkbox.js +3 -3
  18. package/cjs/DatePicker/DatePicker.tailwind.js +13 -13
  19. package/cjs/DatePicker/components/Modal.js +7 -6
  20. package/cjs/DatePicker/components/NavBar.js +3 -3
  21. package/cjs/Dropdown/Dropdown.js +7 -6
  22. package/cjs/Dropdown/components/DropdownButtonItem.js +4 -4
  23. package/cjs/Dropdown/components/DropdownFooterItem.js +2 -2
  24. package/cjs/Dropdown/components/DropdownLinkItem.js +2 -3
  25. package/cjs/Dropdown/components/DropdownTitle.js +2 -2
  26. package/cjs/Dropdown/components/DropdownToggleItem.js +2 -2
  27. package/cjs/Dropdown/useDropdownItemProps.d.ts +9 -1
  28. package/cjs/Dropdown/useDropdownItemProps.js +18 -9
  29. package/cjs/Dropzone/Dropzone.js +2 -2
  30. package/cjs/EmptyState/EmptyState.js +5 -5
  31. package/cjs/Field/Field.js +3 -3
  32. package/cjs/Flag/Flag.js +3 -3
  33. package/cjs/Flag/Flags.d.ts +1 -1
  34. package/cjs/Flag/Flags.js +5 -4
  35. package/cjs/FlexGrid/FlexGrid.js +3 -3
  36. package/cjs/HelpUnderline/HelpUnderline.js +3 -3
  37. package/cjs/Input/Input.js +2 -2
  38. package/cjs/Insert/Insert.js +3 -0
  39. package/cjs/KeyboardKey/KeyboardKey.js +2 -2
  40. package/cjs/Link/ButtonLink.js +1 -10
  41. package/cjs/Link/Link.js +2 -2
  42. package/cjs/Medallion/Medallion.js +3 -2
  43. package/cjs/Modal/Modal.d.ts +1 -1
  44. package/cjs/Modal/Modal.js +7 -8
  45. package/cjs/Modal/components/ModalFooter.js +2 -2
  46. package/cjs/Modal/components/ModalSection.js +2 -2
  47. package/cjs/ProgressBar/ProgressBar.js +3 -3
  48. package/cjs/ProgressSpinner/ProgressSpinner.js +2 -2
  49. package/cjs/RadioGroup/RadioButton.js +2 -2
  50. package/cjs/RangeSlider/RangeSlider.js +2 -2
  51. package/cjs/Satellite/Satellite.d.ts +1 -0
  52. package/cjs/Satellite/Satellite.js +3 -1
  53. package/cjs/Satellite/SatelliteContext.d.ts +1 -0
  54. package/cjs/Satellite/index.d.ts +1 -0
  55. package/cjs/Satellite/index.js +14 -0
  56. package/cjs/Satellite/locale.d.ts +5 -3
  57. package/cjs/Satellite/useCreatePortal.d.ts +4 -0
  58. package/cjs/Satellite/useCreatePortal.js +29 -0
  59. package/cjs/ScrollIndicator/ScrollIndicator.js +5 -4
  60. package/cjs/Select/Select.js +2 -2
  61. package/cjs/Sidebar/Sidebar.d.ts +33 -12
  62. package/cjs/Sidebar/Sidebar.js +49 -39
  63. package/cjs/Sidebar/SidebarButtonLink.d.ts +14 -0
  64. package/cjs/Sidebar/SidebarButtonLink.js +110 -0
  65. package/cjs/Sidebar/SidebarContext.d.ts +7 -8
  66. package/cjs/Sidebar/SidebarContext.js +10 -11
  67. package/cjs/Sidebar/SidebarHeader.d.ts +6 -0
  68. package/cjs/Sidebar/SidebarHeader.js +29 -0
  69. package/cjs/Sidebar/SidebarHeading.d.ts +7 -0
  70. package/cjs/Sidebar/SidebarHeading.js +37 -0
  71. package/cjs/Sidebar/SidebarLink.d.ts +8 -0
  72. package/cjs/Sidebar/SidebarLink.js +58 -0
  73. package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +8 -0
  74. package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +47 -0
  75. package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +7 -0
  76. package/cjs/Sidebar/{components/SidebarHeader.js → SidebarLinksGroup/SidebarGroupLink.js} +14 -23
  77. package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +23 -0
  78. package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +120 -0
  79. package/cjs/Sidebar/SidebarLinksGroup/index.d.ts +2 -0
  80. package/cjs/Sidebar/SidebarLinksGroup/index.js +18 -0
  81. package/cjs/Sidebar/SidebarLinksGroup/types.d.ts +10 -0
  82. package/cjs/Sidebar/SidebarLinksGroup/types.js +5 -0
  83. package/cjs/Sidebar/SidebarNav.d.ts +10 -0
  84. package/cjs/Sidebar/SidebarNav.js +48 -0
  85. package/cjs/Sidebar/index.d.ts +7 -4
  86. package/cjs/Sidebar/index.js +61 -21
  87. package/cjs/Sidebar/types.d.ts +6 -2
  88. package/cjs/Switch/Switch.js +2 -2
  89. package/cjs/Tables/DataTable/DataTable.js +30 -21
  90. package/cjs/Tables/DataTable/DataTable.tailwind.js +3 -0
  91. package/cjs/Tables/DataTable/components/HeaderCell.d.ts +1 -0
  92. package/cjs/Tables/DataTable/components/HeaderCell.js +20 -10
  93. package/cjs/Tables/Table/Table.js +2 -2
  94. package/cjs/Tables/Table/components/Footer.js +2 -2
  95. package/cjs/Tabs/ContentTabs.js +3 -3
  96. package/cjs/Tabs/LinkTabs.js +2 -2
  97. package/cjs/Tabs/Tabs.tailwind.js +8 -8
  98. package/cjs/Tabs/components/LinkTab.js +9 -11
  99. package/cjs/Tag/Tag.js +5 -6
  100. package/cjs/TextArea/TextArea.js +2 -2
  101. package/cjs/Toggle/Toggle.js +2 -2
  102. package/cjs/Tooltip/OverflowTooltipWrapper.js +8 -7
  103. package/cjs/Tooltip/Tooltip.js +2 -2
  104. package/cjs/Tooltip/TooltipWrapper.js +8 -7
  105. package/cjs/UserContent/UserContent.js +2 -2
  106. package/cjs/UserContent/UserContent.tailwind.js +1 -1
  107. package/cjs/index.d.ts +0 -1
  108. package/cjs/index.js +0 -14
  109. package/cjs/styles/tailwind.config.js +1 -1
  110. package/cjs/utils/onlyText.d.ts +3 -0
  111. package/cjs/utils/onlyText.js +49 -0
  112. package/cjs/utils/useLinkProps.d.ts +5 -2
  113. package/cjs/utils/useLinkProps.js +9 -2
  114. package/esm/AnnouncementBadge/AnnouncementBadge.js +1 -1
  115. package/esm/AutoComplete/AutoComplete.js +4 -2
  116. package/esm/Avatars/ApplicationAvatar.js +3 -1
  117. package/esm/Avatars/UserAvatar.js +7 -4
  118. package/esm/Avatars/utils.js +12 -4
  119. package/esm/Badge/Badge.js +6 -6
  120. package/esm/Banners/Alert/Alert.js +1 -1
  121. package/esm/Banners/Promote/Promote.js +1 -1
  122. package/esm/Button/Button.js +1 -1
  123. package/esm/Button/Button.tailwind.js +7 -7
  124. package/esm/Button/ButtonGroup.js +1 -1
  125. package/esm/Button/IconButton.js +1 -1
  126. package/esm/Card/Card.js +1 -1
  127. package/esm/Card/components/CardHeader.js +1 -1
  128. package/esm/Card/components/CardTitle.js +1 -1
  129. package/esm/Checkbox/Checkbox.d.ts +1 -1
  130. package/esm/Checkbox/Checkbox.js +1 -1
  131. package/esm/DatePicker/DatePicker.tailwind.js +13 -13
  132. package/esm/DatePicker/components/Modal.js +5 -4
  133. package/esm/DatePicker/components/NavBar.js +2 -2
  134. package/esm/Dropdown/Dropdown.js +5 -4
  135. package/esm/Dropdown/components/DropdownButtonItem.js +3 -3
  136. package/esm/Dropdown/components/DropdownFooterItem.js +1 -1
  137. package/esm/Dropdown/components/DropdownLinkItem.js +1 -2
  138. package/esm/Dropdown/components/DropdownTitle.js +1 -1
  139. package/esm/Dropdown/components/DropdownToggleItem.js +1 -1
  140. package/esm/Dropdown/useDropdownItemProps.d.ts +9 -1
  141. package/esm/Dropdown/useDropdownItemProps.js +16 -8
  142. package/esm/Dropzone/Dropzone.js +2 -2
  143. package/esm/EmptyState/EmptyState.js +1 -1
  144. package/esm/Field/Field.js +1 -1
  145. package/esm/Flag/Flag.js +1 -1
  146. package/esm/Flag/Flags.d.ts +1 -1
  147. package/esm/Flag/Flags.js +4 -3
  148. package/esm/FlexGrid/FlexGrid.js +1 -1
  149. package/esm/HelpUnderline/HelpUnderline.js +1 -1
  150. package/esm/Input/Input.js +1 -1
  151. package/esm/Insert/Insert.js +2 -0
  152. package/esm/KeyboardKey/KeyboardKey.js +1 -1
  153. package/esm/Link/ButtonLink.js +1 -10
  154. package/esm/Link/Link.js +1 -1
  155. package/esm/Medallion/Medallion.js +2 -1
  156. package/esm/Modal/Modal.d.ts +1 -1
  157. package/esm/Modal/Modal.js +5 -5
  158. package/esm/Modal/components/ModalFooter.js +1 -1
  159. package/esm/Modal/components/ModalSection.js +1 -1
  160. package/esm/ProgressBar/ProgressBar.js +1 -1
  161. package/esm/ProgressSpinner/ProgressSpinner.js +1 -1
  162. package/esm/RadioGroup/RadioButton.js +1 -1
  163. package/esm/RangeSlider/RangeSlider.js +1 -1
  164. package/esm/Satellite/Satellite.d.ts +1 -0
  165. package/esm/Satellite/Satellite.js +3 -1
  166. package/esm/Satellite/SatelliteContext.d.ts +1 -0
  167. package/esm/Satellite/index.d.ts +1 -0
  168. package/esm/Satellite/index.js +1 -0
  169. package/esm/Satellite/locale.d.ts +5 -3
  170. package/esm/Satellite/useCreatePortal.d.ts +4 -0
  171. package/esm/Satellite/useCreatePortal.js +16 -0
  172. package/esm/ScrollIndicator/ScrollIndicator.js +3 -2
  173. package/esm/Select/Select.js +1 -1
  174. package/esm/Sidebar/Sidebar.d.ts +33 -12
  175. package/esm/Sidebar/Sidebar.js +45 -30
  176. package/esm/Sidebar/SidebarButtonLink.d.ts +14 -0
  177. package/esm/Sidebar/SidebarButtonLink.js +92 -0
  178. package/esm/Sidebar/SidebarContext.d.ts +7 -8
  179. package/esm/Sidebar/SidebarContext.js +9 -8
  180. package/esm/Sidebar/SidebarHeader.d.ts +6 -0
  181. package/esm/Sidebar/SidebarHeader.js +15 -0
  182. package/esm/Sidebar/SidebarHeading.d.ts +7 -0
  183. package/esm/Sidebar/SidebarHeading.js +22 -0
  184. package/esm/Sidebar/SidebarLink.d.ts +8 -0
  185. package/esm/Sidebar/SidebarLink.js +42 -0
  186. package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +8 -0
  187. package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +32 -0
  188. package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +7 -0
  189. package/esm/Sidebar/{components/SidebarHeader.js → SidebarLinksGroup/SidebarGroupLink.js} +13 -19
  190. package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +23 -0
  191. package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +100 -0
  192. package/esm/Sidebar/SidebarLinksGroup/index.d.ts +2 -0
  193. package/esm/Sidebar/SidebarLinksGroup/index.js +2 -0
  194. package/esm/Sidebar/SidebarLinksGroup/types.d.ts +10 -0
  195. package/esm/Sidebar/SidebarLinksGroup/types.js +1 -0
  196. package/esm/Sidebar/SidebarNav.d.ts +10 -0
  197. package/esm/Sidebar/SidebarNav.js +33 -0
  198. package/esm/Sidebar/index.d.ts +7 -4
  199. package/esm/Sidebar/index.js +7 -4
  200. package/esm/Sidebar/types.d.ts +6 -2
  201. package/esm/Switch/Switch.js +1 -1
  202. package/esm/Tables/DataTable/DataTable.js +29 -21
  203. package/esm/Tables/DataTable/DataTable.tailwind.js +3 -0
  204. package/esm/Tables/DataTable/components/HeaderCell.d.ts +1 -0
  205. package/esm/Tables/DataTable/components/HeaderCell.js +20 -10
  206. package/esm/Tables/Table/Table.js +1 -1
  207. package/esm/Tables/Table/components/Footer.js +1 -1
  208. package/esm/Tabs/ContentTabs.js +1 -1
  209. package/esm/Tabs/LinkTabs.js +1 -1
  210. package/esm/Tabs/Tabs.tailwind.js +8 -8
  211. package/esm/Tabs/components/LinkTab.js +8 -10
  212. package/esm/Tag/Tag.js +3 -4
  213. package/esm/TextArea/TextArea.js +1 -1
  214. package/esm/Toggle/Toggle.js +1 -1
  215. package/esm/Tooltip/OverflowTooltipWrapper.js +5 -4
  216. package/esm/Tooltip/Tooltip.js +1 -1
  217. package/esm/Tooltip/TooltipWrapper.js +5 -4
  218. package/esm/UserContent/UserContent.js +1 -1
  219. package/esm/UserContent/UserContent.tailwind.js +1 -1
  220. package/esm/index.d.ts +0 -1
  221. package/esm/index.js +0 -1
  222. package/esm/styles/tailwind.config.js +1 -1
  223. package/esm/utils/onlyText.d.ts +3 -0
  224. package/esm/utils/onlyText.js +41 -0
  225. package/esm/utils/useLinkProps.d.ts +5 -2
  226. package/esm/utils/useLinkProps.js +9 -2
  227. package/package.json +5 -4
  228. package/satellite.min.css +1 -1
  229. package/cjs/Banner/Banner.d.ts +0 -86
  230. package/cjs/Banner/Banner.js +0 -176
  231. package/cjs/Banner/index.d.ts +0 -2
  232. package/cjs/Banner/index.js +0 -32
  233. package/cjs/Sidebar/Sidebar.tailwind.d.ts +0 -5
  234. package/cjs/Sidebar/Sidebar.tailwind.js +0 -66
  235. package/cjs/Sidebar/components/SidebarHeader.d.ts +0 -5
  236. package/cjs/Sidebar/components/SidebarLink.d.ts +0 -10
  237. package/cjs/Sidebar/components/SidebarLink.js +0 -98
  238. package/esm/Banner/Banner.d.ts +0 -86
  239. package/esm/Banner/Banner.js +0 -161
  240. package/esm/Banner/index.d.ts +0 -2
  241. package/esm/Banner/index.js +0 -2
  242. package/esm/Sidebar/Sidebar.tailwind.d.ts +0 -5
  243. package/esm/Sidebar/Sidebar.tailwind.js +0 -64
  244. package/esm/Sidebar/components/SidebarHeader.d.ts +0 -5
  245. package/esm/Sidebar/components/SidebarLink.d.ts +0 -10
  246. package/esm/Sidebar/components/SidebarLink.js +0 -78
@@ -1,2 +0,0 @@
1
- export * from "./Banner";
2
- export { default } from "./Banner";
@@ -1,2 +0,0 @@
1
- export * from "./Banner";
2
- export { default } from "./Banner";
@@ -1,5 +0,0 @@
1
- export = sidebarPlugin;
2
- declare const sidebarPlugin: {
3
- handler: import("tailwindcss/types/config").PluginCreator;
4
- config?: import("tailwindcss").Config | undefined;
5
- };
@@ -1,64 +0,0 @@
1
- import _plugin from "tailwindcss/plugin";
2
- // @ts-check
3
- var plugin = _plugin;
4
- var sidebarPlugin = plugin(function (_ref) {
5
- var addComponents = _ref.addComponents,
6
- theme = _ref.theme;
7
-
8
- /**
9
- * Returns a left border built with a box-shadow
10
- * @param {string} color
11
- */
12
- var borderLeftInsetShadow = function borderLeftInsetShadow(color) {
13
- return "inset 3px 0 0 ".concat(color);
14
- };
15
-
16
- addComponents({
17
- ".sidebar": {
18
- backgroundColor: theme("colors.grey.900"),
19
- color: theme("colors.grey.200"),
20
- width: "256px"
21
- },
22
- ".sidebar-light": {
23
- backgroundColor: theme("colors.white"),
24
- boxShadow: "\n 0 0 0 1px ".concat(theme("colors.shadow.5"), ",\n 0 1px 3px 0 ").concat(theme("colors.shadow.15"), "\n ")
25
- },
26
- ".sidebar-collapsed": {
27
- width: "80px"
28
- }
29
- });
30
- addComponents({
31
- ".sidebar-link": {
32
- display: "flex",
33
- alignItems: "center",
34
- padding: "".concat(theme("spacing.2"), " ").concat(theme("spacing.6")),
35
- color: "inherit",
36
- height: "2.5rem",
37
- cursor: "pointer",
38
- transition: "background-color 100ms ease-in-out",
39
- "&, &:hover": {
40
- textDecoration: "none",
41
- outline: "none"
42
- },
43
- "&:hover, &:focus, &.sidebar-link-active": {
44
- backgroundColor: theme("colors.grey.950"),
45
- color: theme("colors.white")
46
- },
47
- "&.sidebar-link-active": {
48
- boxShadow: borderLeftInsetShadow(theme("colors.accent.500"))
49
- }
50
- },
51
- ".sidebar-link-light": {
52
- backgroundColor: "transparent",
53
- color: theme("colors.grey.600"),
54
- "&:hover, &:focus, &.sidebar-link-active": {
55
- backgroundColor: theme("colors.grey.100"),
56
- color: theme("colors.grey.900")
57
- },
58
- "&.sidebar-link-active": {
59
- boxShadow: borderLeftInsetShadow(theme("colors.accent.600"))
60
- }
61
- }
62
- });
63
- });
64
- export default sidebarPlugin;
@@ -1,5 +0,0 @@
1
- import type { DetailedHTMLProps, HTMLAttributes } from "react";
2
- export interface SidebarHeaderProps extends DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> {
3
- }
4
- export declare const SidebarHeader: ({ className, children, ...headingProps }: SidebarHeaderProps) => JSX.Element;
5
- export default SidebarHeader;
@@ -1,10 +0,0 @@
1
- import type { AnchorHTMLAttributes, DetailedHTMLProps, FunctionComponent, ReactNode } from "react";
2
- import type { IconComponentType } from "../../types";
3
- import matchLocation from "../../utils/matchLocation";
4
- export interface SidebarLinkProps extends DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> {
5
- icon?: IconComponentType;
6
- active?: typeof matchLocation | boolean;
7
- children: ReactNode;
8
- }
9
- export declare const SidebarLink: FunctionComponent<SidebarLinkProps>;
10
- export default SidebarLink;
@@ -1,78 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
-
5
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
6
-
7
- var _excluded = ["className", "children", "active", "icon"];
8
-
9
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
-
11
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
12
-
13
- import cx from "classnames";
14
- import { ExternalLink } from "react-feather";
15
- import useLocation from "react-use/lib/useLocation";
16
- import stl from "../../styles/helpers/satellitePrefixer";
17
- import { TooltipWrapper } from "../../Tooltip";
18
- import matchLocation from "../../utils/matchLocation";
19
- import useLinkProps from "../../utils/useLinkProps";
20
- import { useSidebarContext } from "../SidebarContext";
21
- import { Fragment as _Fragment } from "react/jsx-runtime";
22
- import { jsx as _jsx } from "react/jsx-runtime";
23
- import { jsxs as _jsxs } from "react/jsx-runtime";
24
-
25
- var IdentityWrapper = function IdentityWrapper(_ref) {
26
- var children = _ref.children;
27
- return /*#__PURE__*/_jsx(_Fragment, {
28
- children: children
29
- });
30
- };
31
-
32
- export var SidebarLink = function SidebarLink(_ref2) {
33
- var className = _ref2.className,
34
- children = _ref2.children,
35
- _ref2$active = _ref2.active,
36
- active = _ref2$active === void 0 ? matchLocation : _ref2$active,
37
- Icon = _ref2.icon,
38
- anchorProps = _objectWithoutProperties(_ref2, _excluded);
39
-
40
- var _useLocation = useLocation(),
41
- _useLocation$pathname = _useLocation.pathname,
42
- pathname = _useLocation$pathname === void 0 ? "" : _useLocation$pathname;
43
-
44
- var satelliteLinkProps = useLinkProps(anchorProps);
45
-
46
- var _useSidebarContext = useSidebarContext(),
47
- variant = _useSidebarContext.variant,
48
- collapsed = _useSidebarContext.collapsed;
49
-
50
- var showActive = Boolean(anchorProps.href && typeof active === "function" ? active(anchorProps.href, {
51
- pathname: pathname
52
- }) : active);
53
- var activeIconBackground = variant === "light" ? "bg-accent-200" : "bg-grey-800";
54
- var Wrapper = collapsed ? TooltipWrapper : IdentityWrapper;
55
- var isExternalLink = satelliteLinkProps.target === "_blank";
56
- return /*#__PURE__*/_jsx(Wrapper, {
57
- wrapperClassName: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["w-full"]))),
58
- content: children,
59
- tooltipVariant: "light",
60
- placement: "right",
61
- children: /*#__PURE__*/_jsxs("a", _objectSpread(_objectSpread(_objectSpread({}, anchorProps), satelliteLinkProps), {}, {
62
- className: cx(stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["sidebar-link display-body\n ", "\n ", "\n "])), variant === "light" && "sidebar-link-light", showActive && "sidebar-link-active"), className),
63
- children: [Icon && /*#__PURE__*/_jsx("span", {
64
- className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n shrink-0\n ml-1 mr-2 h-6 w-6\n flex items-center justify-center\n text-inherit rounded\n ", "\n "])), showActive && activeIconBackground),
65
- children: /*#__PURE__*/_jsx(Icon, {
66
- size: "1rem"
67
- })
68
- }), !collapsed && /*#__PURE__*/_jsx("span", {
69
- className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["flex-1 truncate ", ""])), !Icon && "ml-2"),
70
- children: children
71
- }), !collapsed && isExternalLink && /*#__PURE__*/_jsx(ExternalLink, {
72
- className: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["ml-1"]))),
73
- size: "1em"
74
- })]
75
- }))
76
- });
77
- };
78
- export default SidebarLink;