@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.
- package/cjs/AnnouncementBadge/AnnouncementBadge.js +2 -2
- package/cjs/AutoComplete/AutoComplete.js +7 -5
- package/cjs/Avatars/ApplicationAvatar.js +4 -2
- package/cjs/Avatars/UserAvatar.js +7 -4
- package/cjs/Avatars/utils.js +12 -4
- package/cjs/Badge/Badge.js +7 -7
- package/cjs/Banners/Alert/Alert.js +3 -3
- package/cjs/Banners/Promote/Promote.js +2 -2
- package/cjs/Button/Button.js +7 -7
- package/cjs/Button/Button.tailwind.js +7 -7
- package/cjs/Button/ButtonGroup.js +2 -2
- package/cjs/Button/IconButton.js +3 -3
- package/cjs/Card/Card.js +2 -2
- package/cjs/Card/components/CardHeader.js +2 -2
- package/cjs/Card/components/CardTitle.js +2 -2
- package/cjs/Checkbox/Checkbox.d.ts +1 -1
- package/cjs/Checkbox/Checkbox.js +3 -3
- package/cjs/DatePicker/DatePicker.tailwind.js +13 -13
- package/cjs/DatePicker/components/Modal.js +7 -6
- package/cjs/DatePicker/components/NavBar.js +3 -3
- package/cjs/Dropdown/Dropdown.js +7 -6
- package/cjs/Dropdown/components/DropdownButtonItem.js +4 -4
- package/cjs/Dropdown/components/DropdownFooterItem.js +2 -2
- package/cjs/Dropdown/components/DropdownLinkItem.js +2 -3
- package/cjs/Dropdown/components/DropdownTitle.js +2 -2
- package/cjs/Dropdown/components/DropdownToggleItem.js +2 -2
- package/cjs/Dropdown/useDropdownItemProps.d.ts +9 -1
- package/cjs/Dropdown/useDropdownItemProps.js +18 -9
- package/cjs/Dropzone/Dropzone.js +2 -2
- package/cjs/EmptyState/EmptyState.js +5 -5
- package/cjs/Field/Field.js +3 -3
- package/cjs/Flag/Flag.js +3 -3
- package/cjs/Flag/Flags.d.ts +1 -1
- package/cjs/Flag/Flags.js +5 -4
- package/cjs/FlexGrid/FlexGrid.js +3 -3
- package/cjs/HelpUnderline/HelpUnderline.js +3 -3
- package/cjs/Input/Input.js +2 -2
- package/cjs/Insert/Insert.js +3 -0
- package/cjs/KeyboardKey/KeyboardKey.js +2 -2
- package/cjs/Link/ButtonLink.js +1 -10
- package/cjs/Link/Link.js +2 -2
- package/cjs/Medallion/Medallion.js +3 -2
- package/cjs/Modal/Modal.d.ts +1 -1
- package/cjs/Modal/Modal.js +7 -8
- package/cjs/Modal/components/ModalFooter.js +2 -2
- package/cjs/Modal/components/ModalSection.js +2 -2
- package/cjs/ProgressBar/ProgressBar.js +3 -3
- package/cjs/ProgressSpinner/ProgressSpinner.js +2 -2
- package/cjs/RadioGroup/RadioButton.js +2 -2
- package/cjs/RangeSlider/RangeSlider.js +2 -2
- package/cjs/Satellite/Satellite.d.ts +1 -0
- package/cjs/Satellite/Satellite.js +3 -1
- package/cjs/Satellite/SatelliteContext.d.ts +1 -0
- package/cjs/Satellite/index.d.ts +1 -0
- package/cjs/Satellite/index.js +14 -0
- package/cjs/Satellite/locale.d.ts +5 -3
- package/cjs/Satellite/useCreatePortal.d.ts +4 -0
- package/cjs/Satellite/useCreatePortal.js +29 -0
- package/cjs/ScrollIndicator/ScrollIndicator.js +5 -4
- package/cjs/Select/Select.js +2 -2
- package/cjs/Sidebar/Sidebar.d.ts +33 -12
- package/cjs/Sidebar/Sidebar.js +49 -39
- package/cjs/Sidebar/SidebarButtonLink.d.ts +14 -0
- package/cjs/Sidebar/SidebarButtonLink.js +110 -0
- package/cjs/Sidebar/SidebarContext.d.ts +7 -8
- package/cjs/Sidebar/SidebarContext.js +10 -11
- package/cjs/Sidebar/SidebarHeader.d.ts +6 -0
- package/cjs/Sidebar/SidebarHeader.js +29 -0
- package/cjs/Sidebar/SidebarHeading.d.ts +7 -0
- package/cjs/Sidebar/SidebarHeading.js +37 -0
- package/cjs/Sidebar/SidebarLink.d.ts +8 -0
- package/cjs/Sidebar/SidebarLink.js +58 -0
- package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +8 -0
- package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +47 -0
- package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +7 -0
- package/cjs/Sidebar/{components/SidebarHeader.js → SidebarLinksGroup/SidebarGroupLink.js} +14 -23
- package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +23 -0
- package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +120 -0
- package/cjs/Sidebar/SidebarLinksGroup/index.d.ts +2 -0
- package/cjs/Sidebar/SidebarLinksGroup/index.js +18 -0
- package/cjs/Sidebar/SidebarLinksGroup/types.d.ts +10 -0
- package/cjs/Sidebar/SidebarLinksGroup/types.js +5 -0
- package/cjs/Sidebar/SidebarNav.d.ts +10 -0
- package/cjs/Sidebar/SidebarNav.js +48 -0
- package/cjs/Sidebar/index.d.ts +7 -4
- package/cjs/Sidebar/index.js +61 -21
- package/cjs/Sidebar/types.d.ts +6 -2
- package/cjs/Switch/Switch.js +2 -2
- package/cjs/Tables/DataTable/DataTable.js +30 -21
- package/cjs/Tables/DataTable/DataTable.tailwind.js +3 -0
- package/cjs/Tables/DataTable/components/HeaderCell.d.ts +1 -0
- package/cjs/Tables/DataTable/components/HeaderCell.js +20 -10
- package/cjs/Tables/Table/Table.js +2 -2
- package/cjs/Tables/Table/components/Footer.js +2 -2
- package/cjs/Tabs/ContentTabs.js +3 -3
- package/cjs/Tabs/LinkTabs.js +2 -2
- package/cjs/Tabs/Tabs.tailwind.js +8 -8
- package/cjs/Tabs/components/LinkTab.js +9 -11
- package/cjs/Tag/Tag.js +5 -6
- package/cjs/TextArea/TextArea.js +2 -2
- package/cjs/Toggle/Toggle.js +2 -2
- package/cjs/Tooltip/OverflowTooltipWrapper.js +8 -7
- package/cjs/Tooltip/Tooltip.js +2 -2
- package/cjs/Tooltip/TooltipWrapper.js +8 -7
- package/cjs/UserContent/UserContent.js +2 -2
- package/cjs/UserContent/UserContent.tailwind.js +1 -1
- package/cjs/index.d.ts +0 -1
- package/cjs/index.js +0 -14
- package/cjs/styles/tailwind.config.js +1 -1
- package/cjs/utils/onlyText.d.ts +3 -0
- package/cjs/utils/onlyText.js +49 -0
- package/cjs/utils/useLinkProps.d.ts +5 -2
- package/cjs/utils/useLinkProps.js +9 -2
- package/esm/AnnouncementBadge/AnnouncementBadge.js +1 -1
- package/esm/AutoComplete/AutoComplete.js +4 -2
- package/esm/Avatars/ApplicationAvatar.js +3 -1
- package/esm/Avatars/UserAvatar.js +7 -4
- package/esm/Avatars/utils.js +12 -4
- package/esm/Badge/Badge.js +6 -6
- package/esm/Banners/Alert/Alert.js +1 -1
- package/esm/Banners/Promote/Promote.js +1 -1
- package/esm/Button/Button.js +1 -1
- package/esm/Button/Button.tailwind.js +7 -7
- package/esm/Button/ButtonGroup.js +1 -1
- package/esm/Button/IconButton.js +1 -1
- package/esm/Card/Card.js +1 -1
- package/esm/Card/components/CardHeader.js +1 -1
- package/esm/Card/components/CardTitle.js +1 -1
- package/esm/Checkbox/Checkbox.d.ts +1 -1
- package/esm/Checkbox/Checkbox.js +1 -1
- package/esm/DatePicker/DatePicker.tailwind.js +13 -13
- package/esm/DatePicker/components/Modal.js +5 -4
- package/esm/DatePicker/components/NavBar.js +2 -2
- package/esm/Dropdown/Dropdown.js +5 -4
- package/esm/Dropdown/components/DropdownButtonItem.js +3 -3
- package/esm/Dropdown/components/DropdownFooterItem.js +1 -1
- package/esm/Dropdown/components/DropdownLinkItem.js +1 -2
- package/esm/Dropdown/components/DropdownTitle.js +1 -1
- package/esm/Dropdown/components/DropdownToggleItem.js +1 -1
- package/esm/Dropdown/useDropdownItemProps.d.ts +9 -1
- package/esm/Dropdown/useDropdownItemProps.js +16 -8
- package/esm/Dropzone/Dropzone.js +2 -2
- package/esm/EmptyState/EmptyState.js +1 -1
- package/esm/Field/Field.js +1 -1
- package/esm/Flag/Flag.js +1 -1
- package/esm/Flag/Flags.d.ts +1 -1
- package/esm/Flag/Flags.js +4 -3
- package/esm/FlexGrid/FlexGrid.js +1 -1
- package/esm/HelpUnderline/HelpUnderline.js +1 -1
- package/esm/Input/Input.js +1 -1
- package/esm/Insert/Insert.js +2 -0
- package/esm/KeyboardKey/KeyboardKey.js +1 -1
- package/esm/Link/ButtonLink.js +1 -10
- package/esm/Link/Link.js +1 -1
- package/esm/Medallion/Medallion.js +2 -1
- package/esm/Modal/Modal.d.ts +1 -1
- package/esm/Modal/Modal.js +5 -5
- package/esm/Modal/components/ModalFooter.js +1 -1
- package/esm/Modal/components/ModalSection.js +1 -1
- package/esm/ProgressBar/ProgressBar.js +1 -1
- package/esm/ProgressSpinner/ProgressSpinner.js +1 -1
- package/esm/RadioGroup/RadioButton.js +1 -1
- package/esm/RangeSlider/RangeSlider.js +1 -1
- package/esm/Satellite/Satellite.d.ts +1 -0
- package/esm/Satellite/Satellite.js +3 -1
- package/esm/Satellite/SatelliteContext.d.ts +1 -0
- package/esm/Satellite/index.d.ts +1 -0
- package/esm/Satellite/index.js +1 -0
- package/esm/Satellite/locale.d.ts +5 -3
- package/esm/Satellite/useCreatePortal.d.ts +4 -0
- package/esm/Satellite/useCreatePortal.js +16 -0
- package/esm/ScrollIndicator/ScrollIndicator.js +3 -2
- package/esm/Select/Select.js +1 -1
- package/esm/Sidebar/Sidebar.d.ts +33 -12
- package/esm/Sidebar/Sidebar.js +45 -30
- package/esm/Sidebar/SidebarButtonLink.d.ts +14 -0
- package/esm/Sidebar/SidebarButtonLink.js +92 -0
- package/esm/Sidebar/SidebarContext.d.ts +7 -8
- package/esm/Sidebar/SidebarContext.js +9 -8
- package/esm/Sidebar/SidebarHeader.d.ts +6 -0
- package/esm/Sidebar/SidebarHeader.js +15 -0
- package/esm/Sidebar/SidebarHeading.d.ts +7 -0
- package/esm/Sidebar/SidebarHeading.js +22 -0
- package/esm/Sidebar/SidebarLink.d.ts +8 -0
- package/esm/Sidebar/SidebarLink.js +42 -0
- package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +8 -0
- package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +32 -0
- package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +7 -0
- package/esm/Sidebar/{components/SidebarHeader.js → SidebarLinksGroup/SidebarGroupLink.js} +13 -19
- package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +23 -0
- package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +100 -0
- package/esm/Sidebar/SidebarLinksGroup/index.d.ts +2 -0
- package/esm/Sidebar/SidebarLinksGroup/index.js +2 -0
- package/esm/Sidebar/SidebarLinksGroup/types.d.ts +10 -0
- package/esm/Sidebar/SidebarLinksGroup/types.js +1 -0
- package/esm/Sidebar/SidebarNav.d.ts +10 -0
- package/esm/Sidebar/SidebarNav.js +33 -0
- package/esm/Sidebar/index.d.ts +7 -4
- package/esm/Sidebar/index.js +7 -4
- package/esm/Sidebar/types.d.ts +6 -2
- package/esm/Switch/Switch.js +1 -1
- package/esm/Tables/DataTable/DataTable.js +29 -21
- package/esm/Tables/DataTable/DataTable.tailwind.js +3 -0
- package/esm/Tables/DataTable/components/HeaderCell.d.ts +1 -0
- package/esm/Tables/DataTable/components/HeaderCell.js +20 -10
- package/esm/Tables/Table/Table.js +1 -1
- package/esm/Tables/Table/components/Footer.js +1 -1
- package/esm/Tabs/ContentTabs.js +1 -1
- package/esm/Tabs/LinkTabs.js +1 -1
- package/esm/Tabs/Tabs.tailwind.js +8 -8
- package/esm/Tabs/components/LinkTab.js +8 -10
- package/esm/Tag/Tag.js +3 -4
- package/esm/TextArea/TextArea.js +1 -1
- package/esm/Toggle/Toggle.js +1 -1
- package/esm/Tooltip/OverflowTooltipWrapper.js +5 -4
- package/esm/Tooltip/Tooltip.js +1 -1
- package/esm/Tooltip/TooltipWrapper.js +5 -4
- package/esm/UserContent/UserContent.js +1 -1
- package/esm/UserContent/UserContent.tailwind.js +1 -1
- package/esm/index.d.ts +0 -1
- package/esm/index.js +0 -1
- package/esm/styles/tailwind.config.js +1 -1
- package/esm/utils/onlyText.d.ts +3 -0
- package/esm/utils/onlyText.js +41 -0
- package/esm/utils/useLinkProps.d.ts +5 -2
- package/esm/utils/useLinkProps.js +9 -2
- package/package.json +5 -4
- package/satellite.min.css +1 -1
- package/cjs/Banner/Banner.d.ts +0 -86
- package/cjs/Banner/Banner.js +0 -176
- package/cjs/Banner/index.d.ts +0 -2
- package/cjs/Banner/index.js +0 -32
- package/cjs/Sidebar/Sidebar.tailwind.d.ts +0 -5
- package/cjs/Sidebar/Sidebar.tailwind.js +0 -66
- package/cjs/Sidebar/components/SidebarHeader.d.ts +0 -5
- package/cjs/Sidebar/components/SidebarLink.d.ts +0 -10
- package/cjs/Sidebar/components/SidebarLink.js +0 -98
- package/esm/Banner/Banner.d.ts +0 -86
- package/esm/Banner/Banner.js +0 -161
- package/esm/Banner/index.d.ts +0 -2
- package/esm/Banner/index.js +0 -2
- package/esm/Sidebar/Sidebar.tailwind.d.ts +0 -5
- package/esm/Sidebar/Sidebar.tailwind.js +0 -64
- package/esm/Sidebar/components/SidebarHeader.d.ts +0 -5
- package/esm/Sidebar/components/SidebarLink.d.ts +0 -10
- package/esm/Sidebar/components/SidebarLink.js +0 -78
package/esm/Banner/index.d.ts
DELETED
package/esm/Banner/index.js
DELETED
@@ -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;
|