@redocly/theme 0.67.0-next.0 → 0.67.0-next.2
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/lib/components/Admonition/Admonition.js +9 -9
- package/lib/components/Badge/Badge.d.ts +1 -1
- package/lib/components/Badge/Badge.js +4 -4
- package/lib/components/Button/Button.d.ts +1 -1
- package/lib/components/Button/Button.js +16 -17
- package/lib/components/Buttons/AIAssistantButton.js +2 -0
- package/lib/components/Catalog/CatalogActionsRow.js +3 -1
- package/lib/components/Catalog/CatalogAvatar.d.ts +3 -1
- package/lib/components/Catalog/CatalogAvatar.js +3 -3
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +4 -4
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.js +7 -7
- package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +6 -6
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +4 -6
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +3 -5
- package/lib/components/Catalog/CatalogEntityTypeIcon.js +15 -11
- package/lib/components/Catalog/CatalogEntityTypeTag.js +5 -5
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +5 -3
- package/lib/components/CatalogClassic/CatalogClassic.d.ts +4 -2
- package/lib/components/CatalogClassic/CatalogClassic.js +3 -1
- package/lib/components/CodeBlock/CodeBlockContainer.js +16 -4
- package/lib/components/CodeBlock/CodeBlockControls.d.ts +2 -1
- package/lib/components/CodeBlock/CodeBlockControls.js +9 -7
- package/lib/components/CodeBlock/CodeBlockTabs.js +2 -2
- package/lib/components/Dropdown/Dropdown.js +6 -6
- package/lib/components/Dropdown/DropdownMenuItem.d.ts +1 -1
- package/lib/components/Feedback/Comment.js +3 -3
- package/lib/components/Feedback/Mood.js +3 -3
- package/lib/components/Filter/FilterContent.js +2 -2
- package/lib/components/Footer/Footer.js +2 -2
- package/lib/components/Footer/FooterColumn.js +2 -2
- package/lib/components/Footer/FooterItem.js +5 -5
- package/lib/components/Image/Image.js +2 -2
- package/lib/components/LastUpdated/LastUpdated.js +2 -2
- package/lib/components/Link/Link.d.ts +2 -19
- package/lib/components/Link/Link.js +2 -9
- package/lib/components/Loaders/Loading.js +2 -2
- package/lib/components/Loaders/SpinnerLoader.js +4 -4
- package/lib/components/Markdown/Markdown.d.ts +7 -10
- package/lib/components/Markdown/Markdown.js +6 -3
- package/lib/components/Marker/Marker.js +3 -3
- package/lib/components/Menu/MenuContainer.d.ts +2 -2
- package/lib/components/Menu/MenuContainer.js +9 -11
- package/lib/components/Menu/MenuItem.js +14 -14
- package/lib/components/Menu/MenuMobile.js +8 -8
- package/lib/components/Navbar/NavbarItem.js +7 -7
- package/lib/components/PageNavigation/NavigationButton.js +3 -3
- package/lib/components/Panel/PanelBody.d.ts +5 -5
- package/lib/components/Panel/PanelBody.js +6 -3
- package/lib/components/Panel/PanelHeader.d.ts +2 -5
- package/lib/components/Panel/PanelHeader.js +6 -2
- package/lib/components/Search/SearchAiMessage.js +10 -8
- package/lib/components/Search/SearchDialog.js +6 -0
- package/lib/components/Search/SearchSuggestedPages.js +2 -2
- package/lib/components/Select/Select.js +3 -1
- package/lib/components/Select/SelectInput.d.ts +1 -0
- package/lib/components/Select/SelectInput.js +8 -8
- package/lib/components/Sidebar/Sidebar.d.ts +4 -2
- package/lib/components/Sidebar/Sidebar.js +10 -8
- package/lib/components/SidebarActions/styled.d.ts +6 -6
- package/lib/components/SidebarActions/styled.js +12 -4
- package/lib/components/StatusCode/StatusCode.d.ts +6 -4
- package/lib/components/StatusCode/StatusCode.js +8 -2
- package/lib/components/Switch/Switch.js +13 -13
- package/lib/components/TableOfContent/TableOfContent.js +2 -2
- package/lib/components/Tag/Tag.js +11 -11
- package/lib/components/Tooltip/AnchorTooltip.js +26 -25
- package/lib/components/Tooltip/JsTooltip.js +5 -5
- package/lib/components/Typography/CompactTypography.d.ts +27 -11
- package/lib/components/Typography/CompactTypography.js +2 -2
- package/lib/components/Typography/Typography.d.ts +6 -2
- package/lib/components/Typography/Typography.js +18 -3
- package/lib/components/UserMenu/UserAvatar.js +5 -5
- package/lib/core/contexts/ThemeDataContext.d.ts +1 -1
- package/lib/core/hooks/feedback/use-report-dialog.d.ts +8 -5
- package/lib/core/styles/global.js +1 -0
- package/lib/core/templates/Markdown.js +5 -6
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/link.d.ts +19 -0
- package/lib/core/types/link.js +3 -0
- package/lib/core/utils/details.d.ts +1 -1
- package/lib/core/utils/details.js +3 -0
- package/lib/core/utils/dom.d.ts +0 -1
- package/lib/core/utils/dom.js +0 -9
- package/lib/core/utils/index.d.ts +0 -1
- package/lib/core/utils/index.js +0 -1
- package/lib/ext/configure-helpers.d.ts +35 -0
- package/lib/ext/configure-helpers.js +3 -0
- package/lib/ext/configure.d.ts +3 -25
- package/lib/ext/configure.js +16 -0
- package/lib/ext/helpers/is-direct-configure-request-values.d.ts +15 -0
- package/lib/ext/helpers/is-direct-configure-request-values.js +42 -0
- package/lib/ext/use-configure-replay.d.ts +1 -1
- package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.d.ts +1 -1
- package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.js +6 -1
- package/lib/icons/AiStarsIcon/AiStarsIcon.d.ts +1 -1
- package/lib/icons/AiStarsIcon/AiStarsIcon.js +6 -1
- package/lib/icons/MagicWandIcon/MagicWandIcon.d.ts +23 -0
- package/lib/icons/MagicWandIcon/MagicWandIcon.js +25 -0
- package/lib/icons/ReturnKeyIcon/ReturnKeyIcon.d.ts +25 -5
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/layouts/DocumentationLayout.js +2 -2
- package/lib/layouts/ThreePanelLayout.d.ts +27 -7
- package/lib/layouts/ThreePanelLayout.js +11 -8
- package/lib/markdoc/components/CodeWalkthrough/CodeContainer.js +2 -2
- package/lib/markdoc/components/CodeWalkthrough/CodePanelHeader.js +2 -2
- package/lib/markdoc/components/CodeWalkthrough/CodePanelPreview.js +2 -2
- package/lib/markdoc/components/CodeWalkthrough/CodeStep.d.ts +4 -2
- package/lib/markdoc/components/CodeWalkthrough/CodeStep.js +6 -2
- package/lib/markdoc/components/Image/Image.js +3 -3
- package/lib/markdoc/components/Tabs/TabItemFragment.d.ts +9 -0
- package/lib/markdoc/components/Tabs/TabItemFragment.js +11 -0
- package/lib/markdoc/components/Tabs/TabList.d.ts +7 -4
- package/lib/markdoc/components/Tabs/TabList.js +6 -4
- package/lib/markdoc/components/Tabs/Tabs.d.ts +3 -9
- package/lib/markdoc/components/Tabs/Tabs.js +12 -5
- package/lib/markdoc/components/default.d.ts +1 -0
- package/lib/markdoc/components/default.js +1 -0
- package/lib/markdoc/tags/tab.js +1 -1
- package/lib/markdoc/tags/tabs.js +1 -1
- package/package.json +2 -3
- package/src/components/Admonition/Admonition.tsx +11 -11
- package/src/components/Badge/Badge.tsx +11 -6
- package/src/components/Button/Button.tsx +51 -21
- package/src/components/Buttons/AIAssistantButton.tsx +2 -0
- package/src/components/Catalog/CatalogActionsRow.tsx +3 -1
- package/src/components/Catalog/CatalogAvatar.tsx +6 -10
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +6 -6
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.tsx +14 -14
- package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +11 -11
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +4 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +8 -11
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +10 -9
- package/src/components/Catalog/CatalogEntityTypeIcon.tsx +22 -16
- package/src/components/Catalog/CatalogEntityTypeTag.tsx +8 -8
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +8 -6
- package/src/components/CatalogClassic/CatalogClassic.tsx +3 -1
- package/src/components/CodeBlock/CodeBlockContainer.tsx +23 -7
- package/src/components/CodeBlock/CodeBlockControls.tsx +16 -10
- package/src/components/CodeBlock/CodeBlockTabs.tsx +4 -4
- package/src/components/Dropdown/Dropdown.tsx +9 -9
- package/src/components/Dropdown/DropdownMenuItem.tsx +1 -1
- package/src/components/Feedback/Comment.tsx +5 -5
- package/src/components/Feedback/Mood.tsx +5 -5
- package/src/components/Filter/FilterContent.tsx +4 -4
- package/src/components/Filter/FilterPopover.tsx +1 -1
- package/src/components/Footer/Footer.tsx +4 -4
- package/src/components/Footer/FooterColumn.tsx +3 -3
- package/src/components/Footer/FooterItem.tsx +9 -9
- package/src/components/Image/Image.tsx +3 -3
- package/src/components/LastUpdated/LastUpdated.tsx +4 -4
- package/src/components/Link/Link.tsx +6 -51
- package/src/components/Loaders/Loading.tsx +3 -3
- package/src/components/Loaders/SpinnerLoader.tsx +5 -5
- package/src/components/Markdown/Markdown.tsx +7 -7
- package/src/components/Marker/Marker.tsx +4 -4
- package/src/components/Menu/MenuContainer.tsx +32 -16
- package/src/components/Menu/MenuItem.tsx +34 -29
- package/src/components/Menu/MenuMobile.tsx +12 -12
- package/src/components/Navbar/NavbarItem.tsx +13 -13
- package/src/components/PageNavigation/NavigationButton.tsx +4 -4
- package/src/components/Panel/PanelBody.tsx +7 -4
- package/src/components/Panel/PanelHeader.tsx +9 -4
- package/src/components/Search/SearchAiMessage.tsx +17 -15
- package/src/components/Search/SearchDialog.tsx +6 -0
- package/src/components/Search/SearchSuggestedPages.tsx +20 -5
- package/src/components/Select/Select.tsx +3 -1
- package/src/components/Select/SelectInput.tsx +10 -9
- package/src/components/Sidebar/Sidebar.tsx +15 -13
- package/src/components/SidebarActions/styled.ts +12 -4
- package/src/components/StatusCode/StatusCode.tsx +12 -4
- package/src/components/Switch/Switch.tsx +21 -21
- package/src/components/TableOfContent/TableOfContent.tsx +3 -3
- package/src/components/Tag/Tag.tsx +34 -27
- package/src/components/Tooltip/AnchorTooltip.tsx +50 -42
- package/src/components/Tooltip/JsTooltip.tsx +14 -13
- package/src/components/Typography/CompactTypography.tsx +4 -4
- package/src/components/Typography/Typography.tsx +21 -5
- package/src/components/UserMenu/UserAvatar.tsx +7 -7
- package/src/core/contexts/ThemeDataContext.tsx +1 -1
- package/src/core/hooks/feedback/use-report-dialog.ts +1 -5
- package/src/core/styles/dark.ts +1 -1
- package/src/core/styles/global.ts +1 -0
- package/src/core/templates/Markdown.tsx +6 -7
- package/src/core/types/index.ts +1 -0
- package/src/core/types/link.ts +20 -0
- package/src/core/utils/details.ts +4 -0
- package/src/core/utils/dom.ts +0 -8
- package/src/core/utils/index.ts +0 -1
- package/src/ext/configure-helpers.ts +45 -0
- package/src/ext/configure.ts +6 -26
- package/src/ext/helpers/is-direct-configure-request-values.ts +53 -0
- package/src/ext/use-configure-replay.ts +3 -3
- package/src/icons/AiStarsGradientIcon/AiStarsGradientIcon.tsx +9 -3
- package/src/icons/AiStarsIcon/AiStarsIcon.tsx +9 -3
- package/src/icons/MagicWandIcon/MagicWandIcon.tsx +26 -0
- package/src/icons/ReturnKeyIcon/ReturnKeyIcon.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/layouts/DocumentationLayout.tsx +3 -3
- package/src/layouts/ThreePanelLayout.tsx +27 -14
- package/src/markdoc/components/CodeWalkthrough/CodeContainer.tsx +4 -4
- package/src/markdoc/components/CodeWalkthrough/CodePanelHeader.tsx +4 -4
- package/src/markdoc/components/CodeWalkthrough/CodePanelPreview.tsx +3 -3
- package/src/markdoc/components/CodeWalkthrough/CodeStep.tsx +6 -2
- package/src/markdoc/components/Image/Image.tsx +4 -4
- package/src/markdoc/components/Tabs/TabItemFragment.tsx +15 -0
- package/src/markdoc/components/Tabs/TabList.tsx +9 -6
- package/src/markdoc/components/Tabs/Tabs.tsx +21 -15
- package/src/markdoc/components/default.ts +1 -0
- package/src/markdoc/tags/tab.ts +1 -1
- package/src/markdoc/tags/tabs.ts +1 -1
|
@@ -7,7 +7,7 @@ import type { CodeBlockItems } from '@redocly/theme/components/CodeBlock/CodeBlo
|
|
|
7
7
|
import { CodeBlockTabs } from '@redocly/theme/components/CodeBlock/CodeBlockTabs';
|
|
8
8
|
import { CopyButton } from '@redocly/theme/components/Buttons/CopyButton';
|
|
9
9
|
import { Tooltip } from '@redocly/theme/components/Tooltip/Tooltip';
|
|
10
|
-
import { useThemeHooks, useThemeConfig } from '@redocly/theme/core/hooks';
|
|
10
|
+
import { useThemeHooks, useThemeConfig, ReportButtonProps } from '@redocly/theme/core/hooks';
|
|
11
11
|
import { DeselectIcon } from '@redocly/theme/icons/DeselectIcon/DeselectIcon';
|
|
12
12
|
import { MaximizeIcon } from '@redocly/theme/icons/MaximizeIcon/MaximizeIcon';
|
|
13
13
|
import { MinimizeIcon } from '@redocly/theme/icons/MinimizeIcon/MinimizeIcon';
|
|
@@ -39,8 +39,7 @@ type ControlProps = {
|
|
|
39
39
|
label?: string;
|
|
40
40
|
tooltipText?: string;
|
|
41
41
|
onClick?: () => void;
|
|
42
|
-
|
|
43
|
-
props?: Record<string, any>;
|
|
42
|
+
props?: ReportButtonProps;
|
|
44
43
|
};
|
|
45
44
|
|
|
46
45
|
type CopyControlProps = ControlProps & {
|
|
@@ -87,7 +86,10 @@ export function CodeBlockControls({
|
|
|
87
86
|
{dropdown && <CodeBlockDropdown {...dropdown} />}
|
|
88
87
|
{report && !report.hidden && !report?.props?.hide ? (
|
|
89
88
|
<Tooltip
|
|
90
|
-
tip={
|
|
89
|
+
tip={
|
|
90
|
+
report.props?.tooltip ||
|
|
91
|
+
translate('codeSnippet.report.tooltipText', 'Report a problem')
|
|
92
|
+
}
|
|
91
93
|
placement="top"
|
|
92
94
|
arrowPosition="right"
|
|
93
95
|
>
|
|
@@ -97,16 +99,15 @@ export function CodeBlockControls({
|
|
|
97
99
|
data-testid="report-button"
|
|
98
100
|
icon={controlsType === 'icon' ? <WarningSquareIcon size="18px" /> : undefined}
|
|
99
101
|
aria-label="Report a problem"
|
|
100
|
-
{
|
|
102
|
+
onClick={report.props?.onClick}
|
|
101
103
|
>
|
|
102
|
-
{controlsType
|
|
104
|
+
{controlsType !== 'icon' && (report.props?.buttonText || 'Report')}
|
|
103
105
|
</ControlButton>
|
|
104
106
|
</Tooltip>
|
|
105
107
|
) : null}
|
|
106
|
-
|
|
107
108
|
{expand && !codeSnippet?.expand?.hide ? (
|
|
108
109
|
<Tooltip
|
|
109
|
-
tip={translate('codeSnippet.expand.tooltipText', 'Expand all')}
|
|
110
|
+
tip={expand.props?.tooltip || translate('codeSnippet.expand.tooltipText', 'Expand all')}
|
|
110
111
|
placement="top"
|
|
111
112
|
arrowPosition="right"
|
|
112
113
|
>
|
|
@@ -125,7 +126,10 @@ export function CodeBlockControls({
|
|
|
125
126
|
|
|
126
127
|
{collapse && !codeSnippet?.collapse?.hide ? (
|
|
127
128
|
<Tooltip
|
|
128
|
-
tip={
|
|
129
|
+
tip={
|
|
130
|
+
collapse.props?.tooltip ||
|
|
131
|
+
translate('codeSnippet.collapse.tooltipText', 'Collapse all')
|
|
132
|
+
}
|
|
129
133
|
placement="top"
|
|
130
134
|
arrowPosition="right"
|
|
131
135
|
>
|
|
@@ -137,7 +141,7 @@ export function CodeBlockControls({
|
|
|
137
141
|
onClick={collapse?.onClick}
|
|
138
142
|
aria-label="Collapse all"
|
|
139
143
|
>
|
|
140
|
-
{controlsType !== 'icon' && (
|
|
144
|
+
{controlsType !== 'icon' && (collapse?.label || 'Collapse all')}
|
|
141
145
|
</ControlButton>
|
|
142
146
|
</Tooltip>
|
|
143
147
|
) : null}
|
|
@@ -149,6 +153,7 @@ export function CodeBlockControls({
|
|
|
149
153
|
data-testid="select-all"
|
|
150
154
|
icon={controlsType === 'icon' ? <SelectIcon /> : undefined}
|
|
151
155
|
onClick={select?.onClick}
|
|
156
|
+
aria-label="Select all"
|
|
152
157
|
>
|
|
153
158
|
{controlsType !== 'icon' && select?.label ? select.label : 'Select all'}
|
|
154
159
|
</ControlButton>
|
|
@@ -161,6 +166,7 @@ export function CodeBlockControls({
|
|
|
161
166
|
data-testid="clear-all"
|
|
162
167
|
icon={controlsType === 'icon' ? <DeselectIcon /> : undefined}
|
|
163
168
|
onClick={deselect?.onClick}
|
|
169
|
+
aria-label="Clear all"
|
|
164
170
|
>
|
|
165
171
|
{controlsType !== 'icon' && deselect?.label ? deselect.label : 'Clear all'}
|
|
166
172
|
</ControlButton>
|
|
@@ -49,7 +49,7 @@ export function CodeBlockTabs({ tabs }: CodeBlockTabsProps): JSX.Element {
|
|
|
49
49
|
tabRefs.current[i] = el as HTMLButtonElement;
|
|
50
50
|
}}
|
|
51
51
|
data-name={name}
|
|
52
|
-
active={id === tabs.value}
|
|
52
|
+
$active={id === tabs.value}
|
|
53
53
|
key={id}
|
|
54
54
|
onClick={() => tabs.onChange(id)}
|
|
55
55
|
>
|
|
@@ -118,7 +118,7 @@ const Tabs = styled.div`
|
|
|
118
118
|
}
|
|
119
119
|
`;
|
|
120
120
|
|
|
121
|
-
const Tab = styled.button<{ active: boolean }>`
|
|
121
|
+
const Tab = styled.button<{ $active: boolean }>`
|
|
122
122
|
--icon-size: 18px;
|
|
123
123
|
display: inline-flex;
|
|
124
124
|
align-items: center;
|
|
@@ -131,8 +131,8 @@ const Tab = styled.button<{ active: boolean }>`
|
|
|
131
131
|
gap: var(--spacing-xs);
|
|
132
132
|
color: var(--text-color-secondary);
|
|
133
133
|
|
|
134
|
-
${({ active }) =>
|
|
135
|
-
active
|
|
134
|
+
${({ $active }) =>
|
|
135
|
+
$active
|
|
136
136
|
? css`
|
|
137
137
|
color: var(--text-color-primary);
|
|
138
138
|
background-color: var(--tab-bg-color-filled);
|
|
@@ -104,9 +104,9 @@ export const Dropdown = forwardRef<HTMLDivElement, DropdownProps>(
|
|
|
104
104
|
{dropdownTrigger}
|
|
105
105
|
|
|
106
106
|
<ChildrenWrapper
|
|
107
|
-
placement={placement}
|
|
108
|
-
alignment={alignment}
|
|
109
|
-
isOpen={isOpen}
|
|
107
|
+
$placement={placement}
|
|
108
|
+
$alignment={alignment}
|
|
109
|
+
$isOpen={isOpen}
|
|
110
110
|
onClick={closeOnClick ? handleChildClick : undefined}
|
|
111
111
|
>
|
|
112
112
|
{children}
|
|
@@ -133,14 +133,14 @@ const DropdownWrapper = styled.div`
|
|
|
133
133
|
text-decoration: none;
|
|
134
134
|
`;
|
|
135
135
|
|
|
136
|
-
const ChildrenWrapper = styled.div<{ placement?: string; alignment?: string; isOpen?: boolean }>`
|
|
136
|
+
const ChildrenWrapper = styled.div<{ $placement?: string; $alignment?: string; $isOpen?: boolean }>`
|
|
137
137
|
padding-top: var(--dropdown-menu-padding-top);
|
|
138
138
|
position: absolute;
|
|
139
|
-
top: ${({ placement }) => (placement === 'top' ? 'auto' : '100%')};
|
|
140
|
-
bottom: ${({ placement }) => (placement === 'top' ? '100%' : 'auto')};
|
|
141
|
-
left: ${({ alignment }) => (alignment === 'start' ? '0' : 'auto')};
|
|
142
|
-
right: ${({ alignment }) => (alignment === 'end' ? '0' : 'auto')};
|
|
143
|
-
display: ${({ isOpen }) => (isOpen ? 'block' : 'none')};
|
|
139
|
+
top: ${({ $placement }) => ($placement === 'top' ? 'auto' : '100%')};
|
|
140
|
+
bottom: ${({ $placement }) => ($placement === 'top' ? '100%' : 'auto')};
|
|
141
|
+
left: ${({ $alignment }) => ($alignment === 'start' ? '0' : 'auto')};
|
|
142
|
+
right: ${({ $alignment }) => ($alignment === 'end' ? '0' : 'auto')};
|
|
143
|
+
display: ${({ $isOpen }) => ($isOpen ? 'block' : 'none')};
|
|
144
144
|
|
|
145
145
|
z-index: var(--dropdown-menu-z-index);
|
|
146
146
|
`;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import type { KeyboardEvent, CSSProperties, ReactNode, PropsWithChildren, JSX } from 'react';
|
|
5
|
-
import type { LinkProps } from '@redocly/theme/
|
|
5
|
+
import type { LinkProps } from '@redocly/theme/core/types';
|
|
6
6
|
|
|
7
7
|
import { Link } from '@redocly/theme/components/Link/Link';
|
|
8
8
|
|
|
@@ -60,7 +60,7 @@ export function Comment({
|
|
|
60
60
|
<StyledFormMandatoryFields>
|
|
61
61
|
<Label
|
|
62
62
|
data-translation-key="feedback.settings.comment.submitText"
|
|
63
|
-
standAlone={standAlone}
|
|
63
|
+
$standAlone={standAlone}
|
|
64
64
|
>
|
|
65
65
|
{submitText ||
|
|
66
66
|
translate(
|
|
@@ -81,7 +81,7 @@ export function Comment({
|
|
|
81
81
|
className={className}
|
|
82
82
|
style={standAlone ? { width: 'var(--feedback-report-dialog-width)' } : { width: 'auto' }}
|
|
83
83
|
>
|
|
84
|
-
<Label data-translation-key="feedback.settings.comment.label" standAlone={standAlone}>
|
|
84
|
+
<Label data-translation-key="feedback.settings.comment.label" $standAlone={standAlone}>
|
|
85
85
|
{label ||
|
|
86
86
|
translate('feedback.settings.comment.label', 'Please share your feedback with us.')}
|
|
87
87
|
</Label>
|
|
@@ -149,13 +149,13 @@ const StateWrapper = styled(CommentWrapper)`
|
|
|
149
149
|
gap: var(--spacing-xxs);
|
|
150
150
|
`;
|
|
151
151
|
|
|
152
|
-
const Label = styled.h4<{ standAlone: boolean }>`
|
|
152
|
+
const Label = styled.h4<{ $standAlone: boolean }>`
|
|
153
153
|
font-weight: var(--font-weight-regular);
|
|
154
154
|
font-size: var(--feedback-font-size);
|
|
155
155
|
line-height: var(--feedback-line-height);
|
|
156
156
|
|
|
157
|
-
${({ standAlone }) =>
|
|
158
|
-
standAlone &&
|
|
157
|
+
${({ $standAlone }) =>
|
|
158
|
+
$standAlone &&
|
|
159
159
|
css`
|
|
160
160
|
font-size: var(--feedback-header-font-size);
|
|
161
161
|
line-height: var(--feedback-header-line-height);
|
|
@@ -165,7 +165,7 @@ export function Mood({ settings, onSubmit, className }: MoodProps): JSX.Element
|
|
|
165
165
|
return (
|
|
166
166
|
<MoodWrapper data-component-name="Feedback/Mood">
|
|
167
167
|
<StyledFormMandatoryFields>
|
|
168
|
-
<Label standAlone={true} data-translation-key="feedback.settings.submitText">
|
|
168
|
+
<Label $standAlone={true} data-translation-key="feedback.settings.submitText">
|
|
169
169
|
{submitText ||
|
|
170
170
|
translate(
|
|
171
171
|
'feedback.settings.submitText',
|
|
@@ -182,7 +182,7 @@ export function Mood({ settings, onSubmit, className }: MoodProps): JSX.Element
|
|
|
182
182
|
<MoodWrapper data-component-name="Feedback/Mood" className={className}>
|
|
183
183
|
<StyledForm onSubmit={onSubmitMoodForm}>
|
|
184
184
|
<StyledFormMandatoryFields>
|
|
185
|
-
<Label standAlone={true} data-translation-key="feedback.settings.label">
|
|
185
|
+
<Label $standAlone={true} data-translation-key="feedback.settings.label">
|
|
186
186
|
{label || translate('feedback.settings.label', 'Was this helpful?')}
|
|
187
187
|
</Label>
|
|
188
188
|
<StyledMandatoryFieldContainer>
|
|
@@ -305,15 +305,15 @@ const MoodWrapper = styled.div`
|
|
|
305
305
|
align-items: center;
|
|
306
306
|
`;
|
|
307
307
|
|
|
308
|
-
const Label = styled.h4<{ standAlone
|
|
308
|
+
const Label = styled.h4<{ $standAlone: boolean }>`
|
|
309
309
|
font-family: var(--feedback-font-family);
|
|
310
310
|
font-weight: var(--font-weight-regular);
|
|
311
311
|
font-size: var(--feedback-font-size);
|
|
312
312
|
line-height: var(--feedback-line-height);
|
|
313
313
|
color: var(--feedback-text-color);
|
|
314
314
|
|
|
315
|
-
${({ standAlone = false }) =>
|
|
316
|
-
standAlone &&
|
|
315
|
+
${({ $standAlone = false }) =>
|
|
316
|
+
$standAlone &&
|
|
317
317
|
css`
|
|
318
318
|
font-size: var(--feedback-header-font-size);
|
|
319
319
|
line-height: var(--feedback-header-line-height);
|
|
@@ -70,7 +70,7 @@ export function FilterContent({
|
|
|
70
70
|
{!hideSearch && (
|
|
71
71
|
<FilterInput value={filterTerm} onChange={(updatedTerm) => setFilterTerm(updatedTerm)} />
|
|
72
72
|
)}
|
|
73
|
-
<FilterItems hideSearch={hideSearch}>
|
|
73
|
+
<FilterItems $hideSearch={hideSearch}>
|
|
74
74
|
{filters.map((filter, idx) => (
|
|
75
75
|
<Filter
|
|
76
76
|
filter={filter}
|
|
@@ -104,15 +104,15 @@ const FiltersTitle = styled.div`
|
|
|
104
104
|
line-height: var(--filter-content-title-line-height);
|
|
105
105
|
`;
|
|
106
106
|
|
|
107
|
-
const FilterItems = styled.div<{ hideSearch?: boolean }>`
|
|
107
|
+
const FilterItems = styled.div<{ $hideSearch?: boolean }>`
|
|
108
108
|
padding: var(--filter-content-items-padding);
|
|
109
109
|
height: 100%;
|
|
110
110
|
display: flex;
|
|
111
111
|
flex-direction: column;
|
|
112
112
|
gap: var(--spacing-base);
|
|
113
113
|
border-top: 1px solid var(--border-color-secondary);
|
|
114
|
-
${({ hideSearch }) =>
|
|
115
|
-
hideSearch &&
|
|
114
|
+
${({ $hideSearch }) =>
|
|
115
|
+
$hideSearch &&
|
|
116
116
|
css`
|
|
117
117
|
border-top: none;
|
|
118
118
|
`}
|
|
@@ -28,7 +28,7 @@ export function Footer({ className }: FooterProps): JSX.Element | null {
|
|
|
28
28
|
<FooterWrapper
|
|
29
29
|
data-component-name="Footer/Footer"
|
|
30
30
|
className={className}
|
|
31
|
-
withColumns={withColumns}
|
|
31
|
+
$withColumns={withColumns}
|
|
32
32
|
>
|
|
33
33
|
{!!items.length && (
|
|
34
34
|
<FooterColumnsSection>
|
|
@@ -83,7 +83,7 @@ const FooterColumnsSection = styled.div`
|
|
|
83
83
|
}
|
|
84
84
|
`;
|
|
85
85
|
|
|
86
|
-
const FooterWrapper = styled.footer<{ withColumns
|
|
86
|
+
const FooterWrapper = styled.footer<{ $withColumns: boolean }>`
|
|
87
87
|
padding: var(--mobile-footer-padding-vertical) var(--mobile-footer-padding-horizontal);
|
|
88
88
|
border-top: 1px solid var(--footer-border-color);
|
|
89
89
|
font-size: var(--footer-font-size);
|
|
@@ -100,8 +100,8 @@ const FooterWrapper = styled.footer<{ withColumns?: boolean }>`
|
|
|
100
100
|
@media screen and (min-width: ${breakpoints.small}) {
|
|
101
101
|
padding: var(--footer-padding-vertical) var(--footer-padding-horizontal);
|
|
102
102
|
flex-direction: row;
|
|
103
|
-
${({ withColumns }) =>
|
|
104
|
-
withColumns
|
|
103
|
+
${({ $withColumns }) =>
|
|
104
|
+
$withColumns
|
|
105
105
|
? `
|
|
106
106
|
flex-direction: column;
|
|
107
107
|
align-items: stretch;
|
|
@@ -23,7 +23,7 @@ export function FooterColumn({ column, className }: FooterColumnProps): JSX.Elem
|
|
|
23
23
|
return (
|
|
24
24
|
<FooterColumnWrapper data-component-name="Footer/FooterColumn" className={className}>
|
|
25
25
|
{!isNavLinkItem(column) && <FooterColumnTitle>{label}</FooterColumnTitle>}
|
|
26
|
-
<FooterColumnItems iconsOnly={isNavLinkItem(column) ? false : iconsOnly}>
|
|
26
|
+
<FooterColumnItems $iconsOnly={isNavLinkItem(column) ? false : iconsOnly}>
|
|
27
27
|
{isNavLinkItem(column) ? (
|
|
28
28
|
<NonGroupItem
|
|
29
29
|
item={column}
|
|
@@ -87,11 +87,11 @@ const FooterColumnTitle = styled.div`
|
|
|
87
87
|
}
|
|
88
88
|
`;
|
|
89
89
|
|
|
90
|
-
const FooterColumnItems = styled.div<{ iconsOnly
|
|
90
|
+
const FooterColumnItems = styled.div<{ $iconsOnly?: boolean }>`
|
|
91
91
|
display: flex;
|
|
92
92
|
flex-wrap: wrap;
|
|
93
93
|
justify-content: center;
|
|
94
|
-
flex-direction: ${(props) => (props
|
|
94
|
+
flex-direction: ${(props) => (props.$iconsOnly ? 'row' : 'column')};
|
|
95
95
|
|
|
96
96
|
@media screen and (min-width: ${breakpoints.small}) {
|
|
97
97
|
justify-content: flex-start;
|
|
@@ -31,8 +31,8 @@ export function FooterItem({ item, iconsOnly, className }: FooterItemProps): JSX
|
|
|
31
31
|
<FooterItemWrapper
|
|
32
32
|
className={className}
|
|
33
33
|
data-component-name="Footer/FooterItem"
|
|
34
|
-
iconsOnly={iconsOnly}
|
|
35
|
-
item={item}
|
|
34
|
+
$iconsOnly={iconsOnly}
|
|
35
|
+
$item={item}
|
|
36
36
|
>
|
|
37
37
|
{item.type === 'separator' ? (
|
|
38
38
|
<FooterSeparator data-translation-key={item.labelTranslationKey}>
|
|
@@ -48,7 +48,7 @@ export function FooterItem({ item, iconsOnly, className }: FooterItemProps): JSX
|
|
|
48
48
|
data-translation-key={item.labelTranslationKey}
|
|
49
49
|
>
|
|
50
50
|
{hasIcon ? (
|
|
51
|
-
<FooterLinkIcon iconsOnly={iconsOnly}>
|
|
51
|
+
<FooterLinkIcon $iconsOnly={iconsOnly}>
|
|
52
52
|
<GenericIcon icon={item.icon} srcSet={item.srcSet} />
|
|
53
53
|
</FooterLinkIcon>
|
|
54
54
|
) : null}
|
|
@@ -67,11 +67,11 @@ const FooterSeparator = styled.div`
|
|
|
67
67
|
opacity: var(--footer-separator-item-opacity);
|
|
68
68
|
`;
|
|
69
69
|
|
|
70
|
-
const FooterLinkIcon = styled.div<{ iconsOnly?: boolean }>`
|
|
70
|
+
const FooterLinkIcon = styled.div<{ $iconsOnly?: boolean }>`
|
|
71
71
|
--icon-width: var(--footer-item-icon-width);
|
|
72
72
|
--icon-height: var(--footer-item-icon-height);
|
|
73
73
|
display: inline-flex;
|
|
74
|
-
margin-right: ${({ iconsOnly }) => (iconsOnly ? '0' : 'var(--footer-item-icon-margin-right)')};
|
|
74
|
+
margin-right: ${({ $iconsOnly }) => ($iconsOnly ? '0' : 'var(--footer-item-icon-margin-right)')};
|
|
75
75
|
vertical-align: middle;
|
|
76
76
|
border: 1px solid var(--footer-item-icon-border-color);
|
|
77
77
|
border-radius: var(--footer-item-icon-border-radius);
|
|
@@ -91,11 +91,11 @@ const FooterLink = styled(Link)`
|
|
|
91
91
|
}
|
|
92
92
|
`;
|
|
93
93
|
|
|
94
|
-
const FooterItemWrapper = styled.div<{ iconsOnly?: boolean; item: ResolvedNavItem }>`
|
|
95
|
-
margin: ${({ iconsOnly, item }) =>
|
|
96
|
-
iconsOnly
|
|
94
|
+
const FooterItemWrapper = styled.div<{ $iconsOnly?: boolean; $item: ResolvedNavItem }>`
|
|
95
|
+
margin: ${({ $iconsOnly, $item }) =>
|
|
96
|
+
$iconsOnly
|
|
97
97
|
? '0 var(--footer-item-icon-margin-right) 0 0;'
|
|
98
|
-
: item.type === 'link'
|
|
98
|
+
: $item.type === 'link'
|
|
99
99
|
? 'var(--footer-link-padding-vertical) var(--footer-link-padding-horizontal);'
|
|
100
100
|
: '0'};
|
|
101
101
|
`;
|
|
@@ -93,7 +93,7 @@ export function Image(props: ImageProps): JSX.Element {
|
|
|
93
93
|
Array.from(parsedSourceSetMap).map(([key, value]) => (
|
|
94
94
|
<ColorModeAwareImage
|
|
95
95
|
key={key}
|
|
96
|
-
colorMode={key}
|
|
96
|
+
$colorMode={key}
|
|
97
97
|
src={value}
|
|
98
98
|
alt={alt}
|
|
99
99
|
className={className}
|
|
@@ -109,8 +109,8 @@ export function Image(props: ImageProps): JSX.Element {
|
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
const ColorModeAwareImage = styled.img<{ colorMode: string; $withLightbox?: boolean }>`
|
|
113
|
-
html:not(.${(props) => props
|
|
112
|
+
const ColorModeAwareImage = styled.img<{ $colorMode: string; $withLightbox?: boolean }>`
|
|
113
|
+
html:not(.${(props) => props.$colorMode}) && {
|
|
114
114
|
display: none;
|
|
115
115
|
}
|
|
116
116
|
${({ $withLightbox }) =>
|
|
@@ -59,7 +59,7 @@ export function LastUpdated(props: LastUpdatedProps): JSX.Element | null {
|
|
|
59
59
|
<LastUpdatedWrapper
|
|
60
60
|
className={props.className}
|
|
61
61
|
data-component-name="LastUpdated/LastUpdated"
|
|
62
|
-
rawOnPrint={format === 'timeago'}
|
|
62
|
+
$rawOnPrint={format === 'timeago'}
|
|
63
63
|
data-print-datetime={isoDate}
|
|
64
64
|
data-translation-key={translationKey}
|
|
65
65
|
>
|
|
@@ -70,15 +70,15 @@ export function LastUpdated(props: LastUpdatedProps): JSX.Element | null {
|
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
const LastUpdatedWrapper = styled.div<{ rawOnPrint
|
|
73
|
+
const LastUpdatedWrapper = styled.div<{ $rawOnPrint: boolean }>`
|
|
74
74
|
color: var(--last-updated-text-color);
|
|
75
75
|
font-size: var(--last-updated-font-size);
|
|
76
76
|
font-family: var(--last-updated-font-family);
|
|
77
77
|
line-height: var(--last-updated-line-height);
|
|
78
78
|
padding-bottom: 30px;
|
|
79
79
|
|
|
80
|
-
${({ rawOnPrint }) =>
|
|
81
|
-
rawOnPrint &&
|
|
80
|
+
${({ $rawOnPrint }) =>
|
|
81
|
+
$rawOnPrint &&
|
|
82
82
|
`@media print {
|
|
83
83
|
time {
|
|
84
84
|
display: none;
|
|
@@ -1,31 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useContext } from 'react';
|
|
3
3
|
import { Link as ReactLink } from 'react-router-dom';
|
|
4
|
-
import isPropValid from '@emotion/is-prop-valid';
|
|
5
4
|
|
|
6
5
|
import type { JSX } from 'react';
|
|
7
|
-
import type {
|
|
6
|
+
import type { LinkProps } from '@redocly/theme/core/types';
|
|
8
7
|
|
|
9
8
|
import { ThemeDataContext } from '@redocly/theme/core/contexts/ThemeDataContext';
|
|
10
9
|
|
|
11
|
-
export type LinkProps
|
|
12
|
-
to: string;
|
|
13
|
-
target?: '_self' | '_blank';
|
|
14
|
-
external?: boolean;
|
|
15
|
-
className?: string;
|
|
16
|
-
style?: React.CSSProperties;
|
|
17
|
-
innerRef?: React.Ref<HTMLAnchorElement>;
|
|
18
|
-
languageInsensitive?: boolean;
|
|
19
|
-
onClick?: () => void;
|
|
20
|
-
reloadDocument?: boolean;
|
|
21
|
-
replace?: boolean;
|
|
22
|
-
state?: unknown;
|
|
23
|
-
preventScrollReset?: boolean;
|
|
24
|
-
relative?: RelativeRoutingType;
|
|
25
|
-
viewTransition?: boolean;
|
|
26
|
-
[key: string]: unknown;
|
|
27
|
-
rel?: string;
|
|
28
|
-
};
|
|
10
|
+
export type { LinkProps };
|
|
29
11
|
|
|
30
12
|
export function Link(props: React.PropsWithChildren<LinkProps>): JSX.Element {
|
|
31
13
|
const context = useContext(ThemeDataContext);
|
|
@@ -33,36 +15,9 @@ export function Link(props: React.PropsWithChildren<LinkProps>): JSX.Element {
|
|
|
33
15
|
if (context?.components) {
|
|
34
16
|
const { LinkComponent } = context.components;
|
|
35
17
|
return <LinkComponent {...props} />;
|
|
36
|
-
} else {
|
|
37
|
-
const {
|
|
38
|
-
innerRef,
|
|
39
|
-
to,
|
|
40
|
-
external: _external,
|
|
41
|
-
languageInsensitive: _languageInsensitive,
|
|
42
|
-
reloadDocument,
|
|
43
|
-
replace,
|
|
44
|
-
state,
|
|
45
|
-
preventScrollReset,
|
|
46
|
-
relative,
|
|
47
|
-
viewTransition,
|
|
48
|
-
...restProps
|
|
49
|
-
} = props;
|
|
50
|
-
const linkProps = Object.fromEntries(
|
|
51
|
-
Object.entries(restProps).filter(([key, value]) => value !== undefined && isPropValid(key)),
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<ReactLink
|
|
56
|
-
ref={innerRef}
|
|
57
|
-
to={to}
|
|
58
|
-
reloadDocument={reloadDocument}
|
|
59
|
-
replace={replace}
|
|
60
|
-
state={state}
|
|
61
|
-
preventScrollReset={preventScrollReset}
|
|
62
|
-
relative={relative}
|
|
63
|
-
viewTransition={viewTransition}
|
|
64
|
-
{...linkProps}
|
|
65
|
-
/>
|
|
66
|
-
);
|
|
67
18
|
}
|
|
19
|
+
|
|
20
|
+
const { external: _1, languageInsensitive: _2, innerRef, ...filteredProps } = props;
|
|
21
|
+
|
|
22
|
+
return <ReactLink ref={innerRef} {...filteredProps} />;
|
|
68
23
|
}
|
|
@@ -7,13 +7,13 @@ import { getCssColorVariable } from '@redocly/theme/core/utils';
|
|
|
7
7
|
import { Spinner } from '@redocly/theme/icons/Spinner/Spinner';
|
|
8
8
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
9
9
|
|
|
10
|
-
const LoadingMessage = styled.div<{ color: string }>`
|
|
10
|
+
const LoadingMessage = styled.div<{ $color: string }>`
|
|
11
11
|
font-family: helvetica, sans, sans-serif;
|
|
12
12
|
width: 100%;
|
|
13
13
|
text-align: center;
|
|
14
14
|
font-size: 25px;
|
|
15
15
|
margin: 30px 0 20px 0;
|
|
16
|
-
color: ${({ color }) => getCssColorVariable(color)};
|
|
16
|
+
color: ${({ $color }) => getCssColorVariable($color)};
|
|
17
17
|
`;
|
|
18
18
|
|
|
19
19
|
export type LoadingProps = {
|
|
@@ -26,7 +26,7 @@ export function Loading({ color }: LoadingProps): JSX.Element {
|
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
28
|
<div style={{ textAlign: 'center' }}>
|
|
29
|
-
<LoadingMessage color={color}>{translate('loaders.loading', 'Loading...')}</LoadingMessage>
|
|
29
|
+
<LoadingMessage $color={color}>{translate('loaders.loading', 'Loading...')}</LoadingMessage>
|
|
30
30
|
<Spinner color={color} />
|
|
31
31
|
</div>
|
|
32
32
|
);
|
|
@@ -9,13 +9,13 @@ export type LoadingProps = {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export function SpinnerLoader({ color, size }: LoadingProps): JSX.Element {
|
|
12
|
-
return <Spinner color={color} size={size} />;
|
|
12
|
+
return <Spinner $color={color} $size={size} />;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const Spinner = styled.div<{ color: string; size: string }>`
|
|
16
|
-
width: ${({ size }) => size};
|
|
17
|
-
height: ${({ size }) => size};
|
|
18
|
-
border: 3px solid ${({ color }) => color};
|
|
15
|
+
const Spinner = styled.div<{ $color: string; $size: string }>`
|
|
16
|
+
width: ${({ $size }) => $size};
|
|
17
|
+
height: ${({ $size }) => $size};
|
|
18
|
+
border: 3px solid ${({ $color }) => $color};
|
|
19
19
|
border-bottom-color: transparent;
|
|
20
20
|
border-radius: 50%;
|
|
21
21
|
display: inline-block;
|
|
@@ -23,15 +23,15 @@ export type MarkdownProps = PropsWithChildren<{
|
|
|
23
23
|
compact?: boolean;
|
|
24
24
|
inline?: boolean;
|
|
25
25
|
base?: boolean;
|
|
26
|
-
ref?: (node: HTMLDivElement) => void;
|
|
27
26
|
}>;
|
|
28
27
|
|
|
29
|
-
export const Markdown = styled.main
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
export const Markdown = styled.main
|
|
29
|
+
.withConfig({
|
|
30
|
+
shouldForwardProp: (prop) => !['compact', 'inline', 'base'].includes(prop),
|
|
31
|
+
})
|
|
32
|
+
.attrs<{ 'data-component-name': string }>({
|
|
33
|
+
'data-component-name': 'Markdown/Markdown',
|
|
34
|
+
})<MarkdownProps>`
|
|
35
35
|
font-size: var(--md-content-font-size);
|
|
36
36
|
font-family: var(--md-content-font-family);
|
|
37
37
|
font-weight: var(--md-content-font-weight);
|
|
@@ -36,18 +36,18 @@ export const Marker = forwardRef<HTMLDivElement, MarkerProps>(
|
|
|
36
36
|
<StyledMarker
|
|
37
37
|
data-component-name="Marker/Marker"
|
|
38
38
|
ref={internalRef}
|
|
39
|
-
marker={marker}
|
|
39
|
+
$marker={marker}
|
|
40
40
|
{...(dataAttribures ?? {})}
|
|
41
41
|
/>
|
|
42
42
|
);
|
|
43
43
|
},
|
|
44
44
|
);
|
|
45
45
|
|
|
46
|
-
const StyledMarker = styled.div<{ marker: MarkerArea }>`
|
|
46
|
+
const StyledMarker = styled.div<{ $marker: MarkerArea }>`
|
|
47
47
|
position: absolute;
|
|
48
48
|
z-index: -1;
|
|
49
|
-
top: ${({ marker }) => marker.offset}px;
|
|
50
|
-
height: ${({ marker }) => marker.height}px;
|
|
49
|
+
top: ${({ $marker }) => $marker.offset}px;
|
|
50
|
+
height: ${({ $marker }) => $marker.height}px;
|
|
51
51
|
width: 100%;
|
|
52
52
|
left: 0;
|
|
53
53
|
`;
|