@redocly/theme 0.18.3-patch.0 → 0.18.3-patch.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/Breadcrumbs/Breadcrumb.d.ts +1 -0
- package/lib/components/Breadcrumbs/Breadcrumb.js +2 -2
- package/lib/components/Breadcrumbs/Breadcrumbs.js +8 -1
- package/lib/components/Button/Button.js +6 -4
- package/lib/components/Button/styledVariables.js +25 -12
- package/lib/components/Catalog/Catalog.js +4 -4
- package/lib/components/Catalog/CatalogCard.js +15 -5
- package/lib/components/Catalog/styledVariables.js +5 -3
- package/lib/components/Catalog/useCatalog.js +12 -1
- package/lib/components/CodeBlock/CodeBlockContainer.js +3 -2
- package/lib/components/CodeBlock/CodeBlockControls.js +6 -2
- package/lib/components/CodeBlock/styledVariables.js +6 -4
- package/lib/components/ColorModeSwitcher/ColorModeSwitcher.js +2 -0
- package/lib/components/Dropdown/Dropdown.d.ts +3 -2
- package/lib/components/Dropdown/Dropdown.js +2 -1
- package/lib/components/EditPageButton/EditPageButton.js +7 -2
- package/lib/components/Feedback/Comment.js +5 -0
- package/lib/components/Feedback/Feedback.js +13 -3
- package/lib/components/Feedback/Rating.js +5 -1
- package/lib/components/Feedback/Reasons.js +5 -0
- package/lib/components/Feedback/Sentiment.js +11 -2
- package/lib/components/Feedback/Thumbs.js +4 -4
- package/lib/components/Filter/Filter.d.ts +2 -1
- package/lib/components/Filter/Filter.js +14 -5
- package/lib/components/Filter/FilterContent.d.ts +2 -1
- package/lib/components/Filter/FilterContent.js +12 -3
- package/lib/components/Filter/FilterPopover.d.ts +4 -4
- package/lib/components/Filter/FilterPopover.js +14 -4
- package/lib/components/Filter/FilterTag.js +1 -1
- package/lib/components/Footer/FooterColumn.js +2 -1
- package/lib/components/LastUpdated/index.d.ts +1 -0
- package/lib/components/LastUpdated/index.js +18 -0
- package/lib/components/LastUpdated/styledVariables.d.ts +1 -0
- package/lib/components/LastUpdated/styledVariables.js +11 -0
- package/lib/components/Menu/MenuItemLabel.js +2 -0
- package/lib/components/Menu/MenuLinkItem.js +2 -1
- package/lib/components/Menu/MobileMenu.js +5 -5
- package/lib/components/Menu/styledVariables.js +18 -7
- package/lib/components/Navbar/NavbarItem.d.ts +1 -1
- package/lib/components/Navbar/NavbarItem.js +9 -3
- package/lib/components/Navbar/styledVariables.js +5 -2
- package/lib/components/NavbarLogo/NavbarLogo.js +2 -1
- package/lib/components/NavbarLogo/index.d.ts +1 -0
- package/lib/components/NavbarLogo/index.js +1 -0
- package/lib/components/NavbarLogo/styledVariables.d.ts +1 -0
- package/lib/components/NavbarLogo/styledVariables.js +18 -0
- package/lib/components/Panel/styledVariables.js +3 -11
- package/lib/components/Profile/LoginLink.js +4 -1
- package/lib/components/Profile/MobileUserProfile.js +16 -5
- package/lib/components/Profile/UserProfile.js +5 -1
- package/lib/components/Search/ProductTag.js +1 -1
- package/lib/components/Select/Select.d.ts +1 -3
- package/lib/components/Select/Select.js +5 -2
- package/lib/components/Separator/Separator.js +11 -3
- package/lib/components/Separator/SeparatorItem.js +1 -7
- package/lib/components/Separator/SeparatorLine.js +7 -3
- package/lib/components/Sidebar/ApiCallItem.js +5 -3
- package/lib/components/Sidebar/SidebarLayout.js +2 -1
- package/lib/components/Sidebar/styledVariables.js +12 -7
- package/lib/components/Sidebar/types.d.ts +1 -0
- package/lib/components/SidebarActions/CollapseSidebarButton.js +4 -0
- package/lib/components/SidebarActions/SidebarActions.js +15 -3
- package/lib/components/SidebarActions/styled.js +14 -8
- package/lib/components/TableOfContent/TableOfContent.js +2 -1
- package/lib/components/Tag/Tag.d.ts +3 -1
- package/lib/components/Tag/Tag.js +10 -4
- package/lib/components/Tag/styledVariables.js +35 -30
- package/lib/components/Tiles/ThinTile.js +7 -5
- package/lib/components/Tiles/WideTile.js +10 -8
- package/lib/components/Typography/SectionHeader.js +2 -2
- package/lib/config.d.ts +84 -0
- package/lib/config.js +15 -1
- package/lib/globalStyle.js +43 -56
- package/lib/icons/PlusIcon/PlusIcon.js +1 -1
- package/lib/ui/ArrowBack.js +0 -1
- package/lib/ui/darkColors.js +5 -4
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/tags-parser.d.ts +1 -0
- package/lib/utils/tags-parser.js +10 -0
- package/package.json +2 -2
- package/src/components/Breadcrumbs/Breadcrumb.tsx +8 -2
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +13 -1
- package/src/components/Button/Button.tsx +6 -4
- package/src/components/Button/styledVariables.ts +25 -12
- package/src/components/Catalog/Catalog.tsx +4 -8
- package/src/components/Catalog/CatalogCard.tsx +17 -6
- package/src/components/Catalog/styledVariables.ts +5 -3
- package/src/components/Catalog/useCatalog.ts +13 -1
- package/src/components/CodeBlock/CodeBlockContainer.tsx +3 -2
- package/src/components/CodeBlock/CodeBlockControls.tsx +6 -1
- package/src/components/CodeBlock/styledVariables.ts +6 -4
- package/src/components/ColorModeSwitcher/ColorModeSwitcher.tsx +3 -0
- package/src/components/Dropdown/Dropdown.tsx +4 -1
- package/src/components/EditPageButton/EditPageButton.tsx +7 -2
- package/src/components/Feedback/Comment.tsx +5 -0
- package/src/components/Feedback/Feedback.tsx +13 -3
- package/src/components/Feedback/Rating.tsx +5 -1
- package/src/components/Feedback/Reasons.tsx +5 -0
- package/src/components/Feedback/Sentiment.tsx +15 -2
- package/src/components/Feedback/Thumbs.tsx +4 -4
- package/src/components/Filter/Filter.tsx +25 -4
- package/src/components/Filter/FilterContent.tsx +21 -4
- package/src/components/Filter/FilterPopover.tsx +19 -11
- package/src/components/Filter/FilterTag.tsx +1 -1
- package/src/components/Footer/FooterColumn.tsx +2 -0
- package/src/components/LastUpdated/index.ts +1 -0
- package/src/components/LastUpdated/styledVariables.ts +8 -0
- package/src/components/Menu/MenuItemLabel.tsx +2 -0
- package/src/components/Menu/MenuLinkItem.tsx +6 -1
- package/src/components/Menu/MobileMenu.tsx +5 -5
- package/src/components/Menu/styledVariables.ts +18 -7
- package/src/components/Navbar/NavbarItem.tsx +10 -1
- package/src/components/Navbar/styledVariables.ts +5 -2
- package/src/components/NavbarLogo/NavbarLogo.tsx +12 -1
- package/src/components/NavbarLogo/index.ts +1 -0
- package/src/components/NavbarLogo/styledVariables.ts +15 -0
- package/src/components/Panel/styledVariables.ts +3 -11
- package/src/components/Profile/LoginLink.tsx +8 -1
- package/src/components/Profile/MobileUserProfile.tsx +22 -5
- package/src/components/Profile/UserProfile.tsx +5 -1
- package/src/components/Search/ProductTag.tsx +1 -1
- package/src/components/Select/Select.tsx +6 -5
- package/src/components/Separator/Separator.tsx +17 -3
- package/src/components/Separator/SeparatorItem.tsx +1 -7
- package/src/components/Separator/SeparatorLine.tsx +7 -3
- package/src/components/Sidebar/ApiCallItem.tsx +4 -2
- package/src/components/Sidebar/SidebarLayout.tsx +6 -1
- package/src/components/Sidebar/styledVariables.ts +12 -7
- package/src/components/Sidebar/types.ts +1 -0
- package/src/components/SidebarActions/CollapseSidebarButton.tsx +4 -0
- package/src/components/SidebarActions/SidebarActions.tsx +18 -3
- package/src/components/SidebarActions/styled.tsx +14 -8
- package/src/components/TableOfContent/TableOfContent.tsx +2 -0
- package/src/components/Tag/Tag.tsx +13 -4
- package/src/components/Tag/styledVariables.ts +35 -30
- package/src/components/Tiles/ThinTile.tsx +7 -5
- package/src/components/Tiles/WideTile.tsx +10 -8
- package/src/components/Typography/SectionHeader.ts +2 -2
- package/src/config.ts +19 -1
- package/src/globalStyle.ts +41 -57
- package/src/icons/PlusIcon/PlusIcon.tsx +7 -1
- package/src/ui/ArrowBack.tsx +0 -1
- package/src/ui/darkColors.tsx +5 -4
- package/src/utils/index.ts +1 -0
- package/src/utils/tags-parser.ts +8 -0
|
@@ -12,10 +12,10 @@ export function ApiCallItem({ item, className }: MenuItemProps): JSX.Element {
|
|
|
12
12
|
<Wrapper data-component-name="Sidebar/ApiCallItem" className={className}>
|
|
13
13
|
<MenuLinkItem item={item}>
|
|
14
14
|
<Label active={item.active}>
|
|
15
|
+
{item.label}
|
|
15
16
|
<HttpTag color={item.httpVerb || ''}>
|
|
16
17
|
{item.httpVerb === 'hook' ? 'event' : item.httpVerb}
|
|
17
18
|
</HttpTag>
|
|
18
|
-
{item.label}
|
|
19
19
|
</Label>
|
|
20
20
|
</MenuLinkItem>
|
|
21
21
|
|
|
@@ -25,6 +25,8 @@ export function ApiCallItem({ item, className }: MenuItemProps): JSX.Element {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const Label = styled(MenuItemLabel)`
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: space-between;
|
|
28
30
|
color: var(--mobile-menu-item-text-color);
|
|
29
31
|
|
|
30
32
|
${({ theme }) => theme.mediaQueries.medium} {
|
|
@@ -36,7 +38,7 @@ const Wrapper = styled.div``;
|
|
|
36
38
|
|
|
37
39
|
export const HttpTag = styled(Tag)`
|
|
38
40
|
flex-shrink: 0;
|
|
39
|
-
margin
|
|
41
|
+
margin: var(--sidebar-item-http-tag-margin);
|
|
40
42
|
text-transform: uppercase;
|
|
41
43
|
|
|
42
44
|
width: var(--sidebar-item-http-tag-width);
|
|
@@ -9,6 +9,7 @@ import { MobileSidebarButton } from '@theme/components/Sidebar/MobileSidebarButt
|
|
|
9
9
|
import { MenuContainer } from '@theme/components/Menu/MenuContainer';
|
|
10
10
|
import { SidebarSearch } from '@theme/components/Search/SidebarSearch';
|
|
11
11
|
import { useThemeConfig } from '@theme/hooks/useThemeConfig';
|
|
12
|
+
import { telemetry } from '@portal/telemetry';
|
|
12
13
|
|
|
13
14
|
import { MobileSidebarIcon } from './MobileSidebarIcon';
|
|
14
15
|
|
|
@@ -81,7 +82,11 @@ export function SidebarLayout({
|
|
|
81
82
|
<Wrapper data-component-name="Sidebar/SidebarLayout" className={className}>
|
|
82
83
|
{!search?.hide && search?.placement === 'sidebar' ? <SidebarSearch /> : null}
|
|
83
84
|
<Sidebar animate={true} opened={isOpen}>
|
|
84
|
-
{header ?
|
|
85
|
+
{header ? (
|
|
86
|
+
<HeaderWrapper onClick={() => telemetry.send('back_to_catalog_button_clicked', {})}>
|
|
87
|
+
{header}
|
|
88
|
+
</HeaderWrapper>
|
|
89
|
+
) : null}
|
|
85
90
|
{versions ? <>{versions}</> : null}
|
|
86
91
|
<MenuContainer growContent={growContent}>{menu}</MenuContainer>
|
|
87
92
|
{footer && !isOpen ? (
|
|
@@ -45,6 +45,7 @@ export const sidebar = css`
|
|
|
45
45
|
--sidebar-item-font-family: var(--font-family-base); // @presenter FontFamily
|
|
46
46
|
--sidebar-item-font-size: var(--font-size-base); // @presenter FontSize
|
|
47
47
|
--sidebar-item-font-weight: var(--font-weight-regular); // @presenter FontSize
|
|
48
|
+
--sidebar-item-line-height: var(--line-height-base); // @presenter LineHeight
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
51
|
* @tokens Sidebar item colors
|
|
@@ -54,8 +55,9 @@ export const sidebar = css`
|
|
|
54
55
|
--sidebar-item-background-color: transparent; // @presenter Color
|
|
55
56
|
|
|
56
57
|
--sidebar-item-active-color: var(--text-primary); // @presenter Color
|
|
57
|
-
--sidebar-item-active-background-color: var(--bg-
|
|
58
|
+
--sidebar-item-active-background-color: var(--bg-overlay); // @presenter Color
|
|
58
59
|
|
|
60
|
+
--sidebar-item-hover-background-color: var(--bg-raised); // @presenter Color
|
|
59
61
|
--sidebar-item-hover-color: var(--text-primary); // @presenter Color
|
|
60
62
|
|
|
61
63
|
/**
|
|
@@ -125,21 +127,24 @@ export const sidebar = css`
|
|
|
125
127
|
|
|
126
128
|
--sidebar-item-separator-background-color: var(--sidebar-background-color); // @presenter Color
|
|
127
129
|
--sidebar-item-separator-line-color: var(--border-primary); // @presenter Color
|
|
128
|
-
--sidebar-item-separator-offset: var(--spacing-
|
|
130
|
+
--sidebar-item-separator-offset: var(--spacing-sm); // @presenter Spacing
|
|
131
|
+
--sidebar-item-separator-line-offset: var(--spacing-xxs) var(--sidebar-margin-horizontal); // @presenter Spacing
|
|
132
|
+
--mobile-sidebar-item-separator-line-offset: var(--spacing-xxs) var(--spacing-xs); // @presenter Spacing
|
|
129
133
|
--sidebar-item-separator-border-width: 1px; // @presenter Spacing
|
|
130
134
|
--sidebar-item-separator-border-color: var(--border-primary); // @presenter Color
|
|
131
|
-
--sidebar-item-separator-padding
|
|
135
|
+
--sidebar-item-separator-padding: var(--spacing-xxs) var(--sidebar-item-padding-horizontal); // @presenter Spacing
|
|
132
136
|
|
|
133
137
|
/**
|
|
134
138
|
* @tokens Sidebar item http tag
|
|
135
139
|
*/
|
|
136
140
|
|
|
137
|
-
--sidebar-item-http-tag-width:
|
|
138
|
-
--sidebar-item-http-tag-height:
|
|
141
|
+
--sidebar-item-http-tag-width: auto;
|
|
142
|
+
--sidebar-item-http-tag-height: 20px;
|
|
139
143
|
--sidebar-item-http-tag-font-family: var(--code-font-family); // @presenter FontFamily
|
|
140
|
-
--sidebar-item-http-tag-font-size:
|
|
144
|
+
--sidebar-item-http-tag-font-size: var(--font-size-sm); // @presenter FontSize
|
|
141
145
|
--sidebar-item-http-tag-font-weight: normal; //@presenter FontWeight
|
|
142
|
-
--sidebar-item-http-tag-border-radius: var(--border-radius-
|
|
146
|
+
--sidebar-item-http-tag-border-radius: var(--border-radius-xlg); // @presenter BorderRadius
|
|
147
|
+
--sidebar-item-http-tag-margin: 0 0 0 5px;
|
|
143
148
|
|
|
144
149
|
/**
|
|
145
150
|
* @tokens Sidebar back button
|
|
@@ -31,6 +31,10 @@ const ToggleButton = styled(StyledToggleRightPanelButton)<{ collapsed?: boolean
|
|
|
31
31
|
fill: var(--sidebar-collapse-button-icon-color);
|
|
32
32
|
margin-right: ${({ collapsed }) => (collapsed ? 0 : 'calc(var(--spacing-unit) * -9)')};
|
|
33
33
|
border: 1px solid var(--sidebar-collapse-button-border-color);
|
|
34
|
+
border-radius: var(--border-radius-md);
|
|
35
|
+
padding: var(--spacing-xxs);
|
|
36
|
+
height: var(--control-height-sm);
|
|
37
|
+
width: var(--control-height-sm);
|
|
34
38
|
|
|
35
39
|
${({ collapsed }) =>
|
|
36
40
|
collapsed &&
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
ControlsWrap,
|
|
8
8
|
ControlsWrapChangeLayoutButtons,
|
|
9
9
|
} from '@theme/components/SidebarActions/styled';
|
|
10
|
+
import { telemetry } from '@portal/telemetry';
|
|
10
11
|
|
|
11
12
|
export enum LayoutVariant {
|
|
12
13
|
STACKED = 'stacked',
|
|
@@ -54,11 +55,20 @@ export const SidebarActions = ({
|
|
|
54
55
|
{initialShowRightPanelToggle && (
|
|
55
56
|
<ToggleRightPanelButton
|
|
56
57
|
showRightPanelToggle={showRightPanelToggle}
|
|
57
|
-
onClick={
|
|
58
|
+
onClick={() => {
|
|
59
|
+
onChangeRightPanelViewClick();
|
|
60
|
+
telemetry.send('sidebar_samples_button_clicked', {});
|
|
61
|
+
}}
|
|
58
62
|
/>
|
|
59
63
|
)}
|
|
60
64
|
{showChangeLayoutButton && showRightPanelToggle && (
|
|
61
|
-
<ChangeViewButton
|
|
65
|
+
<ChangeViewButton
|
|
66
|
+
layout={layout}
|
|
67
|
+
onClick={() => {
|
|
68
|
+
onChangeViewClick();
|
|
69
|
+
telemetry.send('change_layout_button_clicked', {});
|
|
70
|
+
}}
|
|
71
|
+
/>
|
|
62
72
|
)}
|
|
63
73
|
</ControlsWrapChangeLayoutButtons>
|
|
64
74
|
)}
|
|
@@ -66,7 +76,12 @@ export const SidebarActions = ({
|
|
|
66
76
|
{!hideCollapseSidebarButton && (
|
|
67
77
|
<CollapseSidebarButton
|
|
68
78
|
initialValue={collapsedSidebar}
|
|
69
|
-
onClick={
|
|
79
|
+
onClick={() => {
|
|
80
|
+
onChangeCollapseSidebarClick();
|
|
81
|
+
collapsedSidebar
|
|
82
|
+
? telemetry.send('sidebar_item_expanded', {})
|
|
83
|
+
: telemetry.send('sidebar_item_collapsed', {});
|
|
84
|
+
}}
|
|
70
85
|
/>
|
|
71
86
|
)}
|
|
72
87
|
</ControlsWrap>
|
|
@@ -30,11 +30,14 @@ export const StyledToggleRightPanelButton = styled.a`
|
|
|
30
30
|
cursor: pointer;
|
|
31
31
|
z-index: 1;
|
|
32
32
|
/* Rectangle 201 */
|
|
33
|
-
border-radius: var(--border-radius);
|
|
34
|
-
padding: var(--spacing-
|
|
33
|
+
border-radius: var(--border-radius-md);
|
|
34
|
+
padding: var(--spacing-xs);
|
|
35
|
+
height: var(--control-height-base);
|
|
36
|
+
width: var(--control-height-base);
|
|
37
|
+
border: 1px solid var(--border-primary);
|
|
35
38
|
|
|
36
39
|
&:hover {
|
|
37
|
-
background-color: var(--sidebar-item-
|
|
40
|
+
background-color: var(--sidebar-item-hover-background-color);
|
|
38
41
|
}
|
|
39
42
|
`;
|
|
40
43
|
|
|
@@ -66,13 +69,16 @@ export const StyledChangeViewButton = styled.a`
|
|
|
66
69
|
justify-content: center;
|
|
67
70
|
align-items: center;
|
|
68
71
|
cursor: pointer;
|
|
69
|
-
border-radius: var(--border-radius);
|
|
72
|
+
border-radius: var(--border-radius-md);
|
|
73
|
+
background: var(--bg-overlay);
|
|
70
74
|
z-index: 1;
|
|
71
75
|
/* Rectangle 201 */
|
|
72
|
-
padding: var(--spacing-
|
|
76
|
+
padding: var(--spacing-xs);
|
|
77
|
+
height: var(--control-height-base);
|
|
78
|
+
width: var(--control-height-base);
|
|
73
79
|
|
|
74
80
|
&:hover {
|
|
75
|
-
background-color: var(--sidebar-item-
|
|
81
|
+
background-color: var(--sidebar-item-hover-background-color);
|
|
76
82
|
}
|
|
77
83
|
`;
|
|
78
84
|
|
|
@@ -114,7 +120,7 @@ export const ControlsWrap = styled.span<{
|
|
|
114
120
|
justify-content: ${({ isOpenapiDocs }) => (isOpenapiDocs ? 'space-between' : 'flex-end')};
|
|
115
121
|
bottom: 0;
|
|
116
122
|
flex-direction: row;
|
|
117
|
-
gap: var(--spacing-
|
|
123
|
+
gap: var(--spacing-xs);
|
|
118
124
|
align-items: center;
|
|
119
125
|
margin-left: var(--sidebar-controls-margin-left);
|
|
120
126
|
z-index: 2;
|
|
@@ -145,6 +151,6 @@ export const ControlsWrapChangeLayoutButtons = styled.span<{ isCollapsed?: boole
|
|
|
145
151
|
display: flex;
|
|
146
152
|
bottom: 0;
|
|
147
153
|
flex-direction: ${({ isCollapsed }) => (isCollapsed ? 'column-reverse' : 'row')};
|
|
148
|
-
gap: ${({ isCollapsed }) => (isCollapsed ? '10px' : 'var(--spacing-
|
|
154
|
+
gap: ${({ isCollapsed }) => (isCollapsed ? '10px' : 'var(--spacing-xs)')};
|
|
149
155
|
align-items: center;
|
|
150
156
|
`;
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
getDisplayedHeadings,
|
|
12
12
|
getLeastDepth,
|
|
13
13
|
} from '@theme/components/TableOfContent/utils';
|
|
14
|
+
import { telemetry } from '@portal/telemetry';
|
|
14
15
|
|
|
15
16
|
interface TableOfContentProps {
|
|
16
17
|
headings?: Array<MdHeading | null> | null | undefined;
|
|
@@ -64,6 +65,7 @@ export function TableOfContent(props: TableOfContentProps): JSX.Element | null {
|
|
|
64
65
|
className={activeHeadingId === heading.id ? 'active' : ''}
|
|
65
66
|
dangerouslySetInnerHTML={{ __html: heading.value || '' }}
|
|
66
67
|
data-cy={`toc-${heading.value}`}
|
|
68
|
+
onClick={() => telemetry.send('toc_item_clicked', {})}
|
|
67
69
|
/>
|
|
68
70
|
);
|
|
69
71
|
})}
|
|
@@ -24,21 +24,25 @@ interface TagProps {
|
|
|
24
24
|
children?: React.ReactNode;
|
|
25
25
|
closable?: boolean;
|
|
26
26
|
color?: StatusColor | Color | string;
|
|
27
|
+
size?: string;
|
|
27
28
|
icon?: React.ReactNode;
|
|
29
|
+
onClick?: () => void;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
export function Tag({ children, className, color
|
|
32
|
+
export function Tag({ children, className, color, icon, onClick, size }: TagProps): JSX.Element {
|
|
31
33
|
return (
|
|
32
|
-
<TagContainer className={className} color={color}>
|
|
34
|
+
<TagContainer className={className} color={color} size={size} onClick={onClick}>
|
|
33
35
|
{icon ? icon : null}
|
|
34
36
|
{children}
|
|
35
37
|
</TagContainer>
|
|
36
38
|
);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
const TagContainer = styled.div.attrs(({ className, color }: TagProps) => ({
|
|
41
|
+
const TagContainer = styled.div.attrs(({ className, color, size }: TagProps) => ({
|
|
40
42
|
'data-component-name': 'Tag/Tag',
|
|
41
|
-
className:
|
|
43
|
+
className:
|
|
44
|
+
(className || '') +
|
|
45
|
+
` tag-default ${color ? `tag-${color}` : ''} ${size ? `tag-size-${size}` : ''}`,
|
|
42
46
|
}))<TagProps>`
|
|
43
47
|
display: inline-flex;
|
|
44
48
|
align-items: center;
|
|
@@ -47,6 +51,11 @@ const TagContainer = styled.div.attrs(({ className, color }: TagProps) => ({
|
|
|
47
51
|
|
|
48
52
|
padding: var(--tag-padding);
|
|
49
53
|
margin: var(--tag-margin);
|
|
54
|
+
|
|
55
|
+
&:last-child {
|
|
56
|
+
margin-right: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
50
59
|
gap: var(--tag-gap);
|
|
51
60
|
|
|
52
61
|
font-size: var(--tag-font-size);
|
|
@@ -38,12 +38,17 @@ export const tag = css`
|
|
|
38
38
|
* @tokens Tag colors
|
|
39
39
|
*/
|
|
40
40
|
|
|
41
|
+
.tag-size-large {
|
|
42
|
+
--tag-padding: 4px 16px;
|
|
43
|
+
--tag-font-size: var(--font-size-regular);
|
|
44
|
+
}
|
|
45
|
+
|
|
41
46
|
.tag-grey,
|
|
42
47
|
.tag-draft,
|
|
43
48
|
.tag-schema,
|
|
44
49
|
.tag-default {
|
|
45
50
|
--tag-color: var(--text-primary); // @presenter Color
|
|
46
|
-
--tag-background-color: var(--bg-
|
|
51
|
+
--tag-background-color: var(--bg-overlay); // @presenter Color
|
|
47
52
|
--tag-border-color: var(--border-primary); // @presenter Color
|
|
48
53
|
}
|
|
49
54
|
|
|
@@ -51,76 +56,76 @@ export const tag = css`
|
|
|
51
56
|
.tag-success,
|
|
52
57
|
.tag-approved,
|
|
53
58
|
.tag-get {
|
|
54
|
-
--tag-color: var(--color-success-
|
|
55
|
-
--tag-background-color:
|
|
56
|
-
--tag-border-color: var(--color-success-
|
|
59
|
+
--tag-color: var(--color-success-active); // @presenter Color
|
|
60
|
+
--tag-background-color: none; // @presenter Color
|
|
61
|
+
--tag-border-color: var(--color-success-active); // @presenter Color
|
|
57
62
|
}
|
|
58
63
|
|
|
59
64
|
.tag-red,
|
|
60
65
|
.tag-error,
|
|
61
66
|
.tag-declined,
|
|
62
67
|
.tag-delete {
|
|
63
|
-
--tag-color: var(--color-error-
|
|
68
|
+
--tag-color: var(--color-error-active); // @presenter Color
|
|
64
69
|
--tag-background-color: var(--color-error-bg); // @presenter Color
|
|
65
|
-
--tag-border-color: var(--color-error-
|
|
70
|
+
--tag-border-color: var(--color-error-active); // @presenter Color
|
|
66
71
|
}
|
|
67
72
|
|
|
68
73
|
.tag-gold,
|
|
69
74
|
.tag-warning,
|
|
70
75
|
.tag-deprecated,
|
|
71
76
|
.tag-put {
|
|
72
|
-
--tag-color: var(--color-warning-
|
|
73
|
-
--tag-background-color:
|
|
74
|
-
--tag-border-color: var(--color-warning-
|
|
77
|
+
--tag-color: var(--color-warning-active); // @presenter Color
|
|
78
|
+
--tag-background-color: none; // @presenter Color
|
|
79
|
+
--tag-border-color: var(--color-warning-active); // @presenter Color
|
|
75
80
|
}
|
|
76
81
|
|
|
77
82
|
.tag-blue,
|
|
78
83
|
.tag-processing,
|
|
79
84
|
.tag-post {
|
|
80
|
-
--tag-color: var(--color-info-
|
|
81
|
-
--tag-background-color:
|
|
82
|
-
--tag-border-color: var(--color-info-
|
|
85
|
+
--tag-color: var(--color-info-active); // @presenter Color
|
|
86
|
+
--tag-background-color: none; // @presenter Color
|
|
87
|
+
--tag-border-color: var(--color-info-active); // @presenter Color
|
|
83
88
|
}
|
|
84
89
|
|
|
85
90
|
.tag-purple,
|
|
86
91
|
.tag-head {
|
|
87
|
-
--tag-color: var(--color-purple-
|
|
88
|
-
--tag-background-color:
|
|
89
|
-
--tag-border-color: var(--color-purple-
|
|
92
|
+
--tag-color: var(--color-purple-7); // @presenter Color
|
|
93
|
+
--tag-background-color: none; // @presenter Color
|
|
94
|
+
--tag-border-color: var(--color-purple-7); // @presenter Color
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
.tag-cyan,
|
|
93
98
|
.tag-option {
|
|
94
|
-
--tag-color: var(--color-cyan-
|
|
95
|
-
--tag-background-color:
|
|
96
|
-
--tag-border-color: var(--color-cyan-
|
|
99
|
+
--tag-color: var(--color-cyan-7); // @presenter Color
|
|
100
|
+
--tag-background-color: none; // @presenter Color
|
|
101
|
+
--tag-border-color: var(--color-cyan-7); // @presenter Color
|
|
97
102
|
}
|
|
98
103
|
|
|
99
104
|
.tag-yellow,
|
|
100
105
|
.tag-patch {
|
|
101
|
-
--tag-color: var(--color-yellow-
|
|
102
|
-
--tag-background-color:
|
|
103
|
-
--tag-border-color: var(--color-yellow-
|
|
106
|
+
--tag-color: var(--color-yellow-7); // @presenter Color
|
|
107
|
+
--tag-background-color: none; // @presenter Color
|
|
108
|
+
--tag-border-color: var(--color-yellow-7); // @presenter Color
|
|
104
109
|
}
|
|
105
110
|
|
|
106
111
|
.tag-geekblue,
|
|
107
112
|
.tag-link {
|
|
108
|
-
--tag-color: var(--color-geekblue-
|
|
109
|
-
--tag-background-color:
|
|
110
|
-
--tag-border-color: var(--color-geekblue-
|
|
113
|
+
--tag-color: var(--color-geekblue-7); // @presenter Color
|
|
114
|
+
--tag-background-color: none; // @presenter Color
|
|
115
|
+
--tag-border-color: var(--color-geekblue-7); // @presenter Color
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
.tag-magneta,
|
|
114
119
|
.tag-hook {
|
|
115
|
-
--tag-color: var(--color-magneta-
|
|
116
|
-
--tag-background-color:
|
|
117
|
-
--tag-border-color: var(--color-magneta-
|
|
120
|
+
--tag-color: var(--color-magneta-7); // @presenter Color
|
|
121
|
+
--tag-background-color: none; // @presenter Color
|
|
122
|
+
--tag-border-color: var(--color-magneta-7); // @presenter Color
|
|
118
123
|
}
|
|
119
124
|
|
|
120
125
|
.tag-lime {
|
|
121
|
-
--tag-color: var(--color-lime-
|
|
122
|
-
--tag-background-color:
|
|
123
|
-
--tag-border-color: var(--color-lime-
|
|
126
|
+
--tag-color: var(--color-lime-7); // @presenter Color
|
|
127
|
+
--tag-background-color: none; // @presenter Color
|
|
128
|
+
--tag-border-color: var(--color-lime-7); // @presenter Color
|
|
124
129
|
}
|
|
125
130
|
|
|
126
131
|
// @tokens End
|
|
@@ -10,20 +10,20 @@ import type { TextAlign, TileProps } from '@theme/components/Tiles/types';
|
|
|
10
10
|
const ThinTileWrapper = styled(Link)<{ bgColor?: string; bgImage?: string }>`
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
13
|
-
border-radius:
|
|
14
|
-
box-shadow: 0 10px 30px 0 rgba(35, 35, 35, 0.1);
|
|
13
|
+
border-radius: var(--border-radius-lg);
|
|
15
14
|
box-sizing: border-box;
|
|
16
|
-
|
|
17
|
-
padding: 24px;
|
|
15
|
+
padding: var(--spacing-lg);
|
|
18
16
|
margin-bottom: 20px;
|
|
19
17
|
text-decoration: none;
|
|
20
18
|
width: 100%;
|
|
19
|
+
color: var(--text-primary);
|
|
20
|
+
border: 1px solid var(--border-secondary);
|
|
21
21
|
background-color: ${({ bgColor }) => bgColor || 'var(--thin-tile-background-color)'};
|
|
22
22
|
background-image: ${({ bgImage }) => (bgImage ? `url(${bgImage})` : 'none')};
|
|
23
23
|
background-repeat: no-repeat;
|
|
24
24
|
|
|
25
25
|
:hover {
|
|
26
|
-
|
|
26
|
+
border-color: var(--border-primary);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
${({ theme }) => theme.mediaQueries.small} {
|
|
@@ -57,10 +57,12 @@ const ThinTileIcon = styled.img`
|
|
|
57
57
|
|
|
58
58
|
const ThinTileHeader = styled(TileHeader)<{ align?: TextAlign }>`
|
|
59
59
|
font-size: 24px;
|
|
60
|
+
font-weight: var(--font-weight-bold);
|
|
60
61
|
text-align: ${({ align }) => align || 'center'};
|
|
61
62
|
`;
|
|
62
63
|
|
|
63
64
|
const ThinTileText = styled(TileText)<{ icon?: string; align?: TextAlign }>`
|
|
65
|
+
color: var(--text-secondary);
|
|
64
66
|
font-size: 18px;
|
|
65
67
|
line-height: 1.5;
|
|
66
68
|
flex-shrink: 0;
|
|
@@ -17,21 +17,21 @@ const WideTileWrapper = styled(Link)<{
|
|
|
17
17
|
}>`
|
|
18
18
|
display: inline-flex;
|
|
19
19
|
flex-direction: ${({ withIcon }) => (withIcon ? 'column' : 'row')};
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
color: var(--text-primary);
|
|
21
|
+
border: 1px solid var(--border-secondary);
|
|
22
|
+
border-radius: var(--border-radius-lg);
|
|
22
23
|
background-color: ${({ bgColor }) => bgColor || 'var(--wide-tile-background-color)'};
|
|
23
24
|
background-image: ${({ bgImage }) => (bgImage ? `url(${bgImage})` : 'none')};
|
|
24
25
|
background-repeat: no-repeat;
|
|
25
|
-
padding:
|
|
26
|
+
padding: var(--spacing-lg);
|
|
26
27
|
padding-right: ${({ disableArrow }) => (disableArrow ? '24px' : '56px')};
|
|
27
|
-
margin-bottom:
|
|
28
|
+
margin-bottom: var(--spacing-xl);
|
|
28
29
|
box-sizing: border-box;
|
|
29
30
|
position: relative;
|
|
30
31
|
text-decoration: none;
|
|
31
32
|
width: 100%;
|
|
32
|
-
transition: box-shadow 0.25s ease;
|
|
33
33
|
:hover {
|
|
34
|
-
|
|
34
|
+
border-color: var(--border-primary);
|
|
35
35
|
}
|
|
36
36
|
:before {
|
|
37
37
|
content: ${({ disableArrow }) => (disableArrow ? 'none' : '""')};
|
|
@@ -51,8 +51,8 @@ const WideTileWrapper = styled(Link)<{
|
|
|
51
51
|
|
|
52
52
|
${({ theme }) => theme.mediaQueries.medium} {
|
|
53
53
|
width: calc(50% - 2em);
|
|
54
|
-
padding:
|
|
55
|
-
padding-right: ${({ disableArrow }) => (disableArrow ? '
|
|
54
|
+
padding: var(--spacing-xl);
|
|
55
|
+
padding-right: ${({ disableArrow }) => (disableArrow ? 'var(--spacing-xl)' : '64px')};
|
|
56
56
|
flex-direction: row;
|
|
57
57
|
max-width: ${({ maxWidth }) => maxWidth};
|
|
58
58
|
}
|
|
@@ -60,9 +60,11 @@ const WideTileWrapper = styled(Link)<{
|
|
|
60
60
|
|
|
61
61
|
const WideTileHeader = styled(TileHeader)<{ align?: string }>`
|
|
62
62
|
font-size: 24px;
|
|
63
|
+
font-weight: var(--font-weight-bold);
|
|
63
64
|
text-align: ${({ align }) => align || 'left'};
|
|
64
65
|
`;
|
|
65
66
|
const WideTileText = styled(TileText)<{ align?: string }>`
|
|
67
|
+
color: var(--text-secondary);
|
|
66
68
|
font-size: 18px;
|
|
67
69
|
text-align: ${({ align }) => align || 'left'};
|
|
68
70
|
`;
|
|
@@ -4,9 +4,9 @@ export const SectionHeader = styled.h2.attrs<{ className?: string }>(({ classNam
|
|
|
4
4
|
'data-component-name': 'Typography/SectionHeader',
|
|
5
5
|
className,
|
|
6
6
|
}))`
|
|
7
|
-
color: var(--h2-color);
|
|
7
|
+
color: var(--h2-text-color);
|
|
8
8
|
font-size: var(--h2-font-size);
|
|
9
|
-
font-weight: var(--
|
|
9
|
+
font-weight: var(--font-weight-regular);
|
|
10
10
|
text-align: center;
|
|
11
11
|
margin: 2.65em 0;
|
|
12
12
|
padding: 0 20px;
|
package/src/config.ts
CHANGED
|
@@ -254,6 +254,11 @@ const navItemSchema = {
|
|
|
254
254
|
label: { type: 'string' },
|
|
255
255
|
separator: { type: 'string' },
|
|
256
256
|
separatorLine: { type: 'boolean' },
|
|
257
|
+
linePosition: {
|
|
258
|
+
type: 'string',
|
|
259
|
+
enum: ['top', 'bottom'],
|
|
260
|
+
default: 'top',
|
|
261
|
+
},
|
|
257
262
|
version: { type: 'string' },
|
|
258
263
|
menuStyle: { type: 'string', enum: ['drilldown' as MenuStyle] },
|
|
259
264
|
expanded: { type: 'string', const: 'always' },
|
|
@@ -368,6 +373,7 @@ const catalogSchema = {
|
|
|
368
373
|
slug: { type: 'string' },
|
|
369
374
|
filters: { type: 'array', items: catalogFilterSchema },
|
|
370
375
|
groupByFirstFilter: { type: 'boolean' },
|
|
376
|
+
filterValuesCasing: { type: 'string', enum: ['sentence'] },
|
|
371
377
|
items: navItemsSchema,
|
|
372
378
|
requiredPermission: { type: 'string' },
|
|
373
379
|
separateVersions: { type: 'boolean' },
|
|
@@ -415,7 +421,19 @@ export const themeConfigSchema = {
|
|
|
415
421
|
},
|
|
416
422
|
additionalProperties: false,
|
|
417
423
|
},
|
|
418
|
-
sidebar:
|
|
424
|
+
sidebar: {
|
|
425
|
+
type: 'object',
|
|
426
|
+
properties: {
|
|
427
|
+
separatorLine: { type: 'boolean' },
|
|
428
|
+
linePosition: {
|
|
429
|
+
type: 'string',
|
|
430
|
+
enum: ['top', 'bottom'],
|
|
431
|
+
default: 'bottom',
|
|
432
|
+
},
|
|
433
|
+
...hideConfigSchema.properties,
|
|
434
|
+
},
|
|
435
|
+
additionalProperties: false,
|
|
436
|
+
},
|
|
419
437
|
scripts: {
|
|
420
438
|
type: 'object',
|
|
421
439
|
properties: {
|