@redocly/theme 0.18.3-patch.0 → 0.18.3-patch.1
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 +3 -3
- 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.js +4 -1
- package/lib/components/Filter/FilterContent.js +10 -1
- 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/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 +2 -1
- package/lib/components/Tag/Tag.js +3 -3
- package/lib/components/Tag/styledVariables.js +30 -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 +76 -0
- package/lib/config.js +14 -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 +3 -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 +4 -1
- package/src/components/Filter/FilterContent.tsx +14 -3
- 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/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 +4 -3
- package/src/components/Tag/styledVariables.ts +30 -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 +18 -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
package/lib/globalStyle.js
CHANGED
|
@@ -24,6 +24,8 @@ const Profile_1 = require("./components/Profile");
|
|
|
24
24
|
const Dropdown_1 = require("./components/Dropdown");
|
|
25
25
|
const Markdown_1 = require("./components/Markdown");
|
|
26
26
|
const Tooltip_1 = require("./components/Tooltip");
|
|
27
|
+
const LastUpdated_1 = require("./components/LastUpdated");
|
|
28
|
+
const NavbarLogo_1 = require("./components/NavbarLogo");
|
|
27
29
|
const themeColors = (0, styled_components_1.css) `
|
|
28
30
|
/* === Palette === */
|
|
29
31
|
/**
|
|
@@ -206,16 +208,17 @@ const themeColors = (0, styled_components_1.css) `
|
|
|
206
208
|
--color-warning: var(--color-warning-base);
|
|
207
209
|
--color-success: var(--color-success-base);
|
|
208
210
|
--color-info: var(--color-info-base);
|
|
209
|
-
|
|
211
|
+
|
|
210
212
|
/**
|
|
211
213
|
* @tokens Elevation Colors
|
|
212
214
|
* @presenter Color
|
|
213
215
|
*/
|
|
214
216
|
|
|
215
|
-
--bg-sunken: #F1F1F1; // Sunken is the lowest elevation available.
|
|
216
217
|
--bg-base: #ffffff; // The default elevation is the baseline with respect to all other layers.
|
|
218
|
+
--bg-sunken: #f1f1f1; // Sunken is the lowest elevation available.
|
|
217
219
|
--bg-raised: #fafafa; // Cards, elements, inputs
|
|
218
220
|
--bg-overlay: #f2f2f2; // Overlay is the highest elevation available. Use for hovers
|
|
221
|
+
--bg-modal-overlay: #f2f2f2c2; // Overlay is the highest elevation available. Use for hovers
|
|
219
222
|
|
|
220
223
|
--bg-base-shadow: 0px 3px 5px rgba(51, 51, 51, 0.2), 0px 0px 1px rgba(51, 51, 51, 0.31); // Elements
|
|
221
224
|
--bg-raised-shadow: 0px 8px 12px rgba(51, 51, 51, 0.15), 0px 0px 1px rgba(51, 51, 51, 0.31); // Hovers for base. Menu
|
|
@@ -248,7 +251,7 @@ const typography = (0, styled_components_1.css) `
|
|
|
248
251
|
--text-description: #8d8d8d; // Caption, Description, Icon
|
|
249
252
|
--text-placeholder: #a8a8a8; // Placeholder text, Disabled text
|
|
250
253
|
--text-link: var(--color-blue-6);
|
|
251
|
-
|
|
254
|
+
|
|
252
255
|
/**
|
|
253
256
|
* @tokens Font Weights
|
|
254
257
|
* @presenter FontWeight
|
|
@@ -258,7 +261,7 @@ const typography = (0, styled_components_1.css) `
|
|
|
258
261
|
--font-weight-bold: 600; // All strong weights in the entire system.
|
|
259
262
|
--font-weight-bolder: 700;
|
|
260
263
|
--font-weight-italic: 'Regular Italic'; // All italic weights in the entire system.
|
|
261
|
-
|
|
264
|
+
|
|
262
265
|
/**
|
|
263
266
|
* @tokens Line Heights
|
|
264
267
|
* @presenter LineHeight
|
|
@@ -277,15 +280,10 @@ const typography = (0, styled_components_1.css) `
|
|
|
277
280
|
* @presenter FontSize
|
|
278
281
|
*/
|
|
279
282
|
|
|
280
|
-
--font-size-base:
|
|
281
|
-
--font-size-sm:
|
|
282
|
-
--font-size-lg:
|
|
283
|
-
--font-size-xl:
|
|
284
|
-
--font-size-heading-1: 38px;
|
|
285
|
-
--font-size-heading-2: 30px;
|
|
286
|
-
--font-size-heading-3: 24px;
|
|
287
|
-
--font-size-heading-4: 20px;
|
|
288
|
-
--font-size-heading-5: 16px;
|
|
283
|
+
--font-size-base: 16px; // Base font size of the entire system.
|
|
284
|
+
--font-size-sm: 14px;
|
|
285
|
+
--font-size-lg: 18px;
|
|
286
|
+
--font-size-xl: 22px;
|
|
289
287
|
|
|
290
288
|
/**
|
|
291
289
|
* @tokens Font Rendering
|
|
@@ -298,7 +296,7 @@ const typography = (0, styled_components_1.css) `
|
|
|
298
296
|
`;
|
|
299
297
|
const sizeAndSpace = (0, styled_components_1.css) `
|
|
300
298
|
/* === Size & Space === */
|
|
301
|
-
|
|
299
|
+
|
|
302
300
|
/**
|
|
303
301
|
* @tokens Size
|
|
304
302
|
* @presenter Spacing
|
|
@@ -312,7 +310,7 @@ const sizeAndSpace = (0, styled_components_1.css) `
|
|
|
312
310
|
*/
|
|
313
311
|
|
|
314
312
|
--spacing-unit: 4px;
|
|
315
|
-
|
|
313
|
+
|
|
316
314
|
--spacing-base: calc(var(--spacing-unit) * 4);
|
|
317
315
|
--spacing-xxs: var(--spacing-unit);
|
|
318
316
|
--spacing-xs: calc(var(--spacing-unit) * 2);
|
|
@@ -324,7 +322,7 @@ const sizeAndSpace = (0, styled_components_1.css) `
|
|
|
324
322
|
|
|
325
323
|
--spacing-horizontal: var(--spacing-xl);
|
|
326
324
|
--spacing-vertical: var(--spacing-base);
|
|
327
|
-
|
|
325
|
+
|
|
328
326
|
/**
|
|
329
327
|
* @tokens Height
|
|
330
328
|
* @presenter Spacing
|
|
@@ -427,26 +425,37 @@ const headingsTypography = (0, styled_components_1.css) `
|
|
|
427
425
|
* @tokens Heading level 4
|
|
428
426
|
*/
|
|
429
427
|
|
|
428
|
+
--h4-font-family: var(--heading-font-family); // @presenter FontFamily
|
|
430
429
|
--h4-font-weight: var(--heading-font-weight); // @presenter FontWeight
|
|
431
430
|
--h4-font-size: 16px; // @presenter FontSize
|
|
432
|
-
--h4-
|
|
431
|
+
--h4-line-height: 16px; // @presenter LineHeight
|
|
433
432
|
--h4-margin-top: var(--heading-margin-top); // @presenter Spacing
|
|
433
|
+
--h4-margin-bottom: var(--heading-margin-bottom); // @presenter Spacing
|
|
434
|
+
--h4-text-color: var(--heading-text-color); // @presenter Color
|
|
434
435
|
|
|
435
436
|
/**
|
|
436
437
|
* @tokens Heading level 5
|
|
437
438
|
*/
|
|
438
439
|
|
|
440
|
+
--h5-font-family: var(--heading-font-family); // @presenter FontFamily
|
|
441
|
+
--h5-font-weight: var(--heading-font-weight); // @presenter FontWeight
|
|
439
442
|
--h5-font-size: 14px; // @presenter FontSize
|
|
440
|
-
--h5-
|
|
443
|
+
--h5-line-height: 14px; // @presenter LineHeight
|
|
441
444
|
--h5-margin-top: var(--heading-margin-top); // @presenter Spacing
|
|
445
|
+
--h5-margin-bottom: var(--heading-margin-bottom); // @presenter Spacing
|
|
446
|
+
--h5-text-color: var(--heading-text-color); // @presenter Color
|
|
442
447
|
|
|
443
448
|
/**
|
|
444
449
|
* @tokens Heading level 6
|
|
445
450
|
*/
|
|
446
451
|
|
|
452
|
+
--h6-font-family: var(--heading-font-family); // @presenter FontFamily
|
|
453
|
+
--h6-font-weight: var(--heading-font-weight); // @presenter FontWeight
|
|
447
454
|
--h6-font-size: 12px; // @presenter FontSize
|
|
455
|
+
--h6-line-height: 12px; // @presenter LineHeight
|
|
448
456
|
--h6-margin-top: var(--heading-margin-top); // @presenter Spacing
|
|
449
457
|
--h6-margin-bottom: var(--heading-margin-bottom); // @presenter Spacing
|
|
458
|
+
--h6-text-color: var(--heading-text-color); // @presenter Color
|
|
450
459
|
|
|
451
460
|
// @tokens End
|
|
452
461
|
`;
|
|
@@ -500,7 +509,7 @@ const apiReferenceDocs = (0, styled_components_1.css) `
|
|
|
500
509
|
--schemas-mime-type-dropdown-padding: 0px 26px 0px 4px;
|
|
501
510
|
--schemas-mime-type-dropdown-border: var(--docs-dropdown-border); // @presenter Border
|
|
502
511
|
--schemas-mime-type-dropdown-font-size: var(--docs-dropdown-font-size); // @presenter FontSize
|
|
503
|
-
--schemas-mime-type-dropdown-text-color: var(--docs-dropdown-
|
|
512
|
+
--schemas-mime-type-dropdown-text-color: var(--docs-dropdown-text-color); // @presenter Color
|
|
504
513
|
|
|
505
514
|
/**
|
|
506
515
|
* @tokens API Reference Schemas Discriminator Dropdown
|
|
@@ -579,9 +588,9 @@ const apiReferenceDocs = (0, styled_components_1.css) `
|
|
|
579
588
|
* @presenter Color
|
|
580
589
|
*/
|
|
581
590
|
|
|
582
|
-
--schema-recursive-text-color: var(--color-warning);
|
|
583
|
-
--schema-recursive-background-color: var(--
|
|
584
|
-
--schema-recursive-border-color: var(--
|
|
591
|
+
--schema-recursive-text-color: var(--color-warning); // @presenter Color
|
|
592
|
+
--schema-recursive-background-color: var(--color-warning-bg); // @presenter Color
|
|
593
|
+
--schema-recursive-border-color: var(--color-warning-border); // @presenter Color
|
|
585
594
|
|
|
586
595
|
/**
|
|
587
596
|
* @tokens GraphQL Docs Reference Schema Non null label
|
|
@@ -591,7 +600,7 @@ const apiReferenceDocs = (0, styled_components_1.css) `
|
|
|
591
600
|
--schema-non-null-text-color: var(--schema-inline-code-text-color);
|
|
592
601
|
--schema-non-null-background-color: var(--schema-inline-background-color);
|
|
593
602
|
--schema-non-null-border-color: var(--schema-inline-border-color);
|
|
594
|
-
|
|
603
|
+
|
|
595
604
|
/**
|
|
596
605
|
* @tokens API Reference Schema Nested styles
|
|
597
606
|
*/
|
|
@@ -693,19 +702,6 @@ const badges = (0, styled_components_1.css) `
|
|
|
693
702
|
--badge-deprecated-border-radius: var(--border-radius); // @presenter BorderRadius
|
|
694
703
|
|
|
695
704
|
|
|
696
|
-
// @tokens End
|
|
697
|
-
`;
|
|
698
|
-
const logo = (0, styled_components_1.css) `
|
|
699
|
-
/**
|
|
700
|
-
* @tokens Logo
|
|
701
|
-
*/
|
|
702
|
-
|
|
703
|
-
--navbar-logo-height: 2rem; // @presenter Spacing
|
|
704
|
-
--navbar-logo-width: auto;
|
|
705
|
-
--navbar-logo-margin: 16px; // @presenter Spacing
|
|
706
|
-
--navbar-logo-max-width: 285px; // @presenter Spacing
|
|
707
|
-
--navbar-logo-max-height: 285px; // @presenter Spacing
|
|
708
|
-
|
|
709
705
|
// @tokens End
|
|
710
706
|
`;
|
|
711
707
|
const loadProgressBar = (0, styled_components_1.css) `
|
|
@@ -788,18 +784,12 @@ const docsDropdown = (0, styled_components_1.css) `
|
|
|
788
784
|
--docs-dropdown-font-size: var(--font-size-base);
|
|
789
785
|
--docs-dropdown-text-color: var(--text-secondary);
|
|
790
786
|
|
|
791
|
-
--docs-dropdown-padding-vertical:
|
|
787
|
+
--docs-dropdown-padding-vertical: 6px;
|
|
792
788
|
--docs-dropdown-padding-left: 10px;
|
|
793
789
|
--docs-dropdown-padding-right: 26px;
|
|
794
790
|
--docs-dropdown-padding: var(--docs-dropdown-padding-vertical) var(--docs-dropdown-padding-right) var(--docs-dropdown-padding-vertical) var(--docs-dropdown-padding-left);
|
|
795
791
|
--docs-dropdown-border: 1px solid var(--border-primary);
|
|
796
792
|
`;
|
|
797
|
-
const lastUpdated = (0, styled_components_1.css) `
|
|
798
|
-
--last-updated-text-color: var(--text-secondary);
|
|
799
|
-
--last-updated-font-size: var(--font-size-sm);
|
|
800
|
-
--last-updated-font-family: var(--font-family-base);
|
|
801
|
-
--last-updated-line-height: var(--line-height-base);
|
|
802
|
-
`;
|
|
803
793
|
const tile = (0, styled_components_1.css) `
|
|
804
794
|
--wide-tile-background-color: var(--bg-raised);
|
|
805
795
|
--thin-tile-background-color: var(--bg-raised);
|
|
@@ -861,18 +851,18 @@ const error = (0, styled_components_1.css) `
|
|
|
861
851
|
--error-bubble-gap: var(--spacing-base);
|
|
862
852
|
--error-bubble-font-family: var(--font-family-base);
|
|
863
853
|
--error-bubble-z-index: var(--z-index-popover);
|
|
864
|
-
|
|
854
|
+
|
|
865
855
|
--error-card-border-radius: calc(var(--spacing-xxs) * 1.5);
|
|
866
856
|
--error-card-background: var(--bg-raised);
|
|
867
857
|
--error-card-padding: var(--spacing-xs) var(--spacing-base);
|
|
868
858
|
--error-card-text-color: var(--text-primary);
|
|
869
859
|
--error-card-font-size: var(--font-size-base);
|
|
870
860
|
--error-card-font-style: normal;
|
|
871
|
-
--error-card-font-weight: var(--font-weight-
|
|
861
|
+
--error-card-font-weight: var(--font-weight-regular);
|
|
872
862
|
--error-card-line-height: var(--line-height-base);
|
|
873
863
|
--error-card-box-shadow: var(--bg-raised-shadow);
|
|
874
864
|
--error-card-icon-margin: 0 var(--spacing-xs) 0 0;
|
|
875
|
-
|
|
865
|
+
|
|
876
866
|
--detailed-error-overlay-background: #4f4f4f;
|
|
877
867
|
--detailed-error-overlay-opacity: 0.9;
|
|
878
868
|
--detailed-error-overlay-z-index: var(--z-index-raised);
|
|
@@ -889,13 +879,13 @@ const error = (0, styled_components_1.css) `
|
|
|
889
879
|
--detailed-error-modal-font-family: var(--font-family-base);
|
|
890
880
|
--detailed-error-modal-padding: var(--spacing-md);
|
|
891
881
|
--detailed-error-modal-wapper-text-align: right;
|
|
892
|
-
|
|
882
|
+
|
|
893
883
|
--detailed-error-content-margin-top: var(--spacing-md);
|
|
894
884
|
--detailed-error-content-height: 100%;
|
|
895
|
-
|
|
885
|
+
|
|
896
886
|
--detailed-error-close-button-color: var(--text-description);
|
|
897
887
|
--detailed-error-close-button-text-transform: uppercase;
|
|
898
|
-
|
|
888
|
+
|
|
899
889
|
--detailed-error-message-margin: var(--spacing-base) auto var(--spacing-lg);
|
|
900
890
|
--detailed-error-message-padding: var(--spacing-base);
|
|
901
891
|
--detailed-error-message-border-radius: var(--border-radius);
|
|
@@ -910,8 +900,8 @@ const modal = (0, styled_components_1.css) `
|
|
|
910
900
|
overflow: hidden;
|
|
911
901
|
}
|
|
912
902
|
|
|
913
|
-
--modal-box-shadow:
|
|
914
|
-
--modal-overlay-background-color:
|
|
903
|
+
--modal-box-shadow: var(--bg-overlay-shadow);
|
|
904
|
+
--modal-overlay-background-color: var(--bg-modal-overlay);
|
|
915
905
|
--modal-background-color: var(--bg-base);
|
|
916
906
|
`;
|
|
917
907
|
const zIndexDepth = (0, styled_components_1.css) `
|
|
@@ -939,10 +929,10 @@ exports.styles = (0, styled_components_1.css) `
|
|
|
939
929
|
${headingsTypography}
|
|
940
930
|
${inputs}
|
|
941
931
|
${I18n_1.languagePicker}
|
|
942
|
-
${lastUpdated}
|
|
932
|
+
${LastUpdated_1.lastUpdated}
|
|
943
933
|
${links}
|
|
944
934
|
${loadProgressBar}
|
|
945
|
-
${logo}
|
|
935
|
+
${NavbarLogo_1.logo}
|
|
946
936
|
${Markdown_1.markdown}
|
|
947
937
|
${Menu_1.menu}
|
|
948
938
|
${Menu_1.mobileMenu}
|
|
@@ -967,7 +957,6 @@ exports.styles = (0, styled_components_1.css) `
|
|
|
967
957
|
${Sidebar_1.versionPicker}
|
|
968
958
|
${zIndexDepth}
|
|
969
959
|
|
|
970
|
-
--api-onboarding-table-text-color: #4e5356;
|
|
971
960
|
--api-catalog-card-min-width: 250px;
|
|
972
961
|
|
|
973
962
|
background-color: var(--bg-base);
|
|
@@ -977,8 +966,6 @@ exports.styles = (0, styled_components_1.css) `
|
|
|
977
966
|
|
|
978
967
|
:root.dark {
|
|
979
968
|
${darkColors_1.darkMode};
|
|
980
|
-
|
|
981
|
-
--api-onboarding-table-text-color: #ffffff;
|
|
982
969
|
}
|
|
983
970
|
|
|
984
971
|
:root.notransition * {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.PlusIcon = exports.Icon = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const Icon = () => (react_1.default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "
|
|
9
|
+
const Icon = () => (react_1.default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" },
|
|
10
10
|
react_1.default.createElement("path", { d: "M7.53125 2.375H8.46875C8.55208 2.375 8.59375 2.41667 8.59375 2.5V13.5C8.59375 13.5833 8.55208 13.625 8.46875 13.625H7.53125C7.44792 13.625 7.40625 13.5833 7.40625 13.5V2.5C7.40625 2.41667 7.44792 2.375 7.53125 2.375Z", fill: "inherit" }),
|
|
11
11
|
react_1.default.createElement("path", { d: "M2.75 7.40625H13.25C13.3333 7.40625 13.375 7.44792 13.375 7.53125V8.46875C13.375 8.55208 13.3333 8.59375 13.25 8.59375H2.75C2.66667 8.59375 2.625 8.55208 2.625 8.46875V7.53125C2.625 7.44792 2.66667 7.40625 2.75 7.40625Z", fill: "inherit" })));
|
|
12
12
|
exports.Icon = Icon;
|
package/lib/ui/ArrowBack.js
CHANGED
|
@@ -12,7 +12,6 @@ const Arrow = ({ className, dataComponentName, }) => (react_1.default.createElem
|
|
|
12
12
|
react_1.default.createElement("path", { d: "M2 5a1 1 0 011-1h8a1 1 0 110 2H3a1 1 0 01-1-1z" }))));
|
|
13
13
|
exports.ArrowBack = (0, styled_components_1.default)(Arrow) `
|
|
14
14
|
fill: var(--sidebar-back-button-icon-color);
|
|
15
|
-
margin-right: calc(var(--sidebar-spacing-unit));
|
|
16
15
|
|
|
17
16
|
background-image: var(--sidebar-back-button-icon);
|
|
18
17
|
background-repeat: no-repeat;
|
package/lib/ui/darkColors.js
CHANGED
|
@@ -192,10 +192,10 @@ exports.darkMode = (0, styled_components_1.css) `
|
|
|
192
192
|
*/
|
|
193
193
|
--text-base: #ffffff; // The base color of the typography color tokens.
|
|
194
194
|
--text-light-solid: #ffffff; // The color of the objects that need to be white no matter what theme is enabled.
|
|
195
|
-
--text-primary: #
|
|
196
|
-
--text-secondary: #
|
|
197
|
-
--text-description: #
|
|
198
|
-
--text-placeholder: #
|
|
195
|
+
--text-primary: #ffffffde; // Headers, Icon hover
|
|
196
|
+
--text-secondary: #ffffff99; // Body text
|
|
197
|
+
--text-description: #ffffff61; // Caption, Description, Icon
|
|
198
|
+
--text-placeholder: #ffffff61; // Placeholder text, Disabled text
|
|
199
199
|
--text-link: var(--color-blue-6);
|
|
200
200
|
|
|
201
201
|
/**
|
|
@@ -207,6 +207,7 @@ exports.darkMode = (0, styled_components_1.css) `
|
|
|
207
207
|
--bg-base: #141414; // The default elevation is the baseline with respect to all other layers.
|
|
208
208
|
--bg-raised: #1f1f1f; // Cards, elements, inputs
|
|
209
209
|
--bg-overlay: #282828; // Overlay is the highest elevation available. Use for hovers
|
|
210
|
+
--bg-modal-overlay: #282828c2;
|
|
210
211
|
|
|
211
212
|
--bg-base-shadow: 0px 3px 5px rgba(0, 0, 0, 0.4), 0px 1px 4px rgba(0, 0, 0, 0.5); // Elements
|
|
212
213
|
--bg-raised-shadow: 0px 8px 12px rgba(0, 0, 0, 0.4), 0px 1px 4px rgba(0, 0, 0, 0.5); // Hovers for base. Menu
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.js
CHANGED
|
@@ -25,4 +25,5 @@ __exportStar(require("./args-typecheck"), exports);
|
|
|
25
25
|
__exportStar(require("./color"), exports);
|
|
26
26
|
__exportStar(require("./urls"), exports);
|
|
27
27
|
__exportStar(require("./jsUtils"), exports);
|
|
28
|
+
__exportStar(require("./tags-parser"), exports);
|
|
28
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const slug: (value: string) => string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.slug = void 0;
|
|
4
|
+
const slug = (value) => {
|
|
5
|
+
const matches = value.match(/[a-zA-Z0-9_-]*/g);
|
|
6
|
+
const result = matches === null || matches === void 0 ? void 0 : matches.filter((value) => value !== '').join('-').toLowerCase();
|
|
7
|
+
return result !== null && result !== void 0 ? result : value;
|
|
8
|
+
};
|
|
9
|
+
exports.slug = slug;
|
|
10
|
+
//# sourceMappingURL=tags-parser.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.18.3-patch.
|
|
3
|
+
"version": "0.18.3-patch.1",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"tsconfig-paths-webpack-plugin": "^3.5.2",
|
|
82
82
|
"typescript": "^4.8.4",
|
|
83
83
|
"webpack": "^5.72.0",
|
|
84
|
-
"@redocly/portal-types": "1.0.
|
|
84
|
+
"@redocly/portal-types": "1.0.2"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
87
|
"@redocly/ajv": "^8.11.0",
|
|
@@ -3,14 +3,20 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
import { Link } from '@portal/Link';
|
|
5
5
|
|
|
6
|
-
export const Breadcrumb = (props: {
|
|
7
|
-
|
|
6
|
+
export const Breadcrumb = (props: {
|
|
7
|
+
label: string;
|
|
8
|
+
link?: string;
|
|
9
|
+
isActive: boolean;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
}) => {
|
|
12
|
+
const { label, link, isActive, onClick } = props;
|
|
8
13
|
|
|
9
14
|
return (
|
|
10
15
|
<BreadcrumbWrapper
|
|
11
16
|
data-component-name="Breadcrumbs/Breadcrumb"
|
|
12
17
|
isLink={link != null}
|
|
13
18
|
isActive={isActive}
|
|
19
|
+
onClick={onClick}
|
|
14
20
|
>
|
|
15
21
|
{link ? (
|
|
16
22
|
<BreadcrumbLink to={link}>{label}</BreadcrumbLink>
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import { useBreadcrumbs } from '@portal/Sidebar/useBreadcrumbs';
|
|
5
|
+
import { telemetry } from '@portal/telemetry';
|
|
5
6
|
|
|
6
7
|
import { Breadcrumb } from './Breadcrumb';
|
|
7
8
|
|
|
@@ -18,7 +19,18 @@ export const Breadcrumbs = (props: { className?: string }) => {
|
|
|
18
19
|
const isLast = idx === breadcrumbs.length - 1;
|
|
19
20
|
return (
|
|
20
21
|
<React.Fragment key={idx}>
|
|
21
|
-
<Breadcrumb
|
|
22
|
+
<Breadcrumb
|
|
23
|
+
link={breadcrumb.link}
|
|
24
|
+
label={breadcrumb.label}
|
|
25
|
+
isActive={isLast}
|
|
26
|
+
onClick={() => {
|
|
27
|
+
telemetry.send('breadcrumb_clicked', {
|
|
28
|
+
link: breadcrumb.link,
|
|
29
|
+
position: idx + 1,
|
|
30
|
+
total_breadcrumbs: breadcrumbs.length,
|
|
31
|
+
});
|
|
32
|
+
}}
|
|
33
|
+
/>
|
|
22
34
|
{isLast ? null : <div>/</div>}
|
|
23
35
|
</React.Fragment>
|
|
24
36
|
);
|
|
@@ -102,12 +102,14 @@ const StyledButton = styled.button.attrs(
|
|
|
102
102
|
`
|
|
103
103
|
: variant === 'text'
|
|
104
104
|
? css`
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
color: var(--button-color);
|
|
106
|
+
border-color: var(--button-border-color);
|
|
107
|
+
background-color: var(--button-background-color);
|
|
107
108
|
|
|
108
109
|
&:hover {
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
color: var(--button-hover-color);
|
|
111
|
+
border-color: var(--button-hover-border-color);
|
|
112
|
+
background-color: var(--button-hover-background-color);
|
|
111
113
|
box-shadow: none;
|
|
112
114
|
}
|
|
113
115
|
`
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { css } from 'styled-components';
|
|
2
2
|
|
|
3
3
|
export const button = css`
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Static classnames that can be used to override styles for components:
|
|
6
|
+
* download-specification-button, next-section-button, button-base
|
|
7
|
+
*/
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
* @tokens Button borders
|
|
11
|
+
*/
|
|
12
12
|
|
|
13
13
|
--button-border-width: 1px; //@presenter Border
|
|
14
14
|
--button-border-style: solid; //@presenter Border
|
|
15
15
|
--button-border-radius: var(--border-radius-md); // @presenter BorderRadius
|
|
16
16
|
--button-margin: 5px; // @presenter Spacing
|
|
17
17
|
--button-box-shadow: none; // @presenter Shadow
|
|
18
|
-
--button-hover-box-shadow:
|
|
19
|
-
--button-active-box-shadow:
|
|
18
|
+
--button-hover-box-shadow: none; // @presenter Shadow
|
|
19
|
+
--button-active-box-shadow: none; // @presenter Shadow
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
* @tokens Button typography
|
|
23
|
+
*/
|
|
24
24
|
|
|
25
25
|
--button-font-size: var(--font-size-base); // @presenter FontSize
|
|
26
26
|
--button-font-family: inherit; // @presenter FontFamily
|
|
@@ -36,8 +36,8 @@ export const button = css`
|
|
|
36
36
|
--button-large-padding: 8px 16px;
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
* @tokens Button icon
|
|
40
|
+
*/
|
|
41
41
|
--button-icon-width: 1em; // @presenter Spacing
|
|
42
42
|
--button-icon-height: 1em; // @presenter Spacing
|
|
43
43
|
|
|
@@ -87,5 +87,18 @@ export const button = css`
|
|
|
87
87
|
--button-background-color: transparent; // @presenter Color
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
/**
|
|
91
|
+
* @tokens Button text
|
|
92
|
+
*/
|
|
93
|
+
.button-text {
|
|
94
|
+
--button-color: var(--text-secondary); // @presenter Color
|
|
95
|
+
--button-border-color: transparent; // @presenter Color
|
|
96
|
+
--button-background-color: transparent; // @presenter Color
|
|
97
|
+
|
|
98
|
+
--button-hover-color: var(--text-primary); // @presenter Color
|
|
99
|
+
--button-hover-background-color: transparent; // @presenter Color
|
|
100
|
+
--button-hover-border-color: transparent; // @presenter Color
|
|
101
|
+
}
|
|
102
|
+
|
|
90
103
|
// @tokens End
|
|
91
104
|
`;
|
|
@@ -53,12 +53,7 @@ export default function Catalog(props: {
|
|
|
53
53
|
isMobile={false}
|
|
54
54
|
/>
|
|
55
55
|
{isAddingFilter && (
|
|
56
|
-
<FilterPopover
|
|
57
|
-
setIsAddingFilter={setIsAddingFilter}
|
|
58
|
-
setFilterTerm={setFilterTerm}
|
|
59
|
-
filters={filters}
|
|
60
|
-
filterTerm={filterTerm}
|
|
61
|
-
/>
|
|
56
|
+
<FilterPopover setIsAddingFilter={setIsAddingFilter} filters={filters} />
|
|
62
57
|
)}
|
|
63
58
|
<CatalogPageContent>
|
|
64
59
|
<CatalogPageDescriptionWrapper>
|
|
@@ -162,7 +157,7 @@ const CatalogDescription = styled.p`
|
|
|
162
157
|
`;
|
|
163
158
|
|
|
164
159
|
const CatalogPageWrapper = styled.div`
|
|
165
|
-
--sidebar-width: var(--catalog-sidebar-width,
|
|
160
|
+
--sidebar-width: var(--catalog-sidebar-width, 285px);
|
|
166
161
|
|
|
167
162
|
display: flex;
|
|
168
163
|
flex-direction: column;
|
|
@@ -192,7 +187,7 @@ const CatalogPageWrapper = styled.div`
|
|
|
192
187
|
}
|
|
193
188
|
`;
|
|
194
189
|
|
|
195
|
-
const FilterTagsWrapper = styled.div`
|
|
190
|
+
const FilterTagsWrapper = styled.div.attrs({ 'data-cy': 'Catalog/FilterTags' })`
|
|
196
191
|
padding: var(--filter-tags-wrapper-padding);
|
|
197
192
|
display: flex;
|
|
198
193
|
overflow-x: scroll;
|
|
@@ -6,11 +6,13 @@ import { Link } from '@portal/Link';
|
|
|
6
6
|
import { Highlight } from '@theme/ui/Highlight';
|
|
7
7
|
import { Tag } from '@theme/components/Tag';
|
|
8
8
|
import { PointingArrowIcon } from '@theme/icons';
|
|
9
|
+
import { telemetry } from '@portal/telemetry';
|
|
10
|
+
import { slug } from '@theme/utils';
|
|
9
11
|
|
|
10
12
|
export function CatalogCard({ item }: { item: CatalogItem }): JSX.Element {
|
|
11
13
|
return (
|
|
12
14
|
<Link key={item.docsLink || item.link} to={item.docsLink || item.link}>
|
|
13
|
-
<StyledCard>
|
|
15
|
+
<StyledCard onClick={() => telemetry.send('catalog_item_clicked', {})}>
|
|
14
16
|
<CardTitle>
|
|
15
17
|
<Highlight>{item.title}</Highlight>
|
|
16
18
|
</CardTitle>
|
|
@@ -22,9 +24,9 @@ export function CatalogCard({ item }: { item: CatalogItem }): JSX.Element {
|
|
|
22
24
|
{item.tags && (
|
|
23
25
|
<CardTags>
|
|
24
26
|
{(item.tags as string[]).map((tag, index) => (
|
|
25
|
-
<
|
|
27
|
+
<CardTag key={tag + index} color={slug(tag)}>
|
|
26
28
|
<Highlight>{tag}</Highlight>
|
|
27
|
-
</
|
|
29
|
+
</CardTag>
|
|
28
30
|
))}
|
|
29
31
|
</CardTags>
|
|
30
32
|
)}
|
|
@@ -46,20 +48,21 @@ const SelectButton = styled.div`
|
|
|
46
48
|
display: flex;
|
|
47
49
|
align-items: center;
|
|
48
50
|
justify-content: center;
|
|
51
|
+
transition: all 0.2s ease-in-out;
|
|
49
52
|
|
|
50
53
|
svg {
|
|
51
54
|
fill: var(--catalog-card-icon-color);
|
|
52
55
|
}
|
|
53
56
|
`;
|
|
54
57
|
|
|
55
|
-
const StyledCard = styled.div`
|
|
58
|
+
const StyledCard = styled.div.attrs({ 'data-cy': 'Catalog/CatalogCard' })`
|
|
56
59
|
min-height: var(--catalog-card-min-height);
|
|
57
60
|
height: 100%;
|
|
58
61
|
color: var(--catalog-card-text-color);
|
|
59
62
|
font-size: var(--catalog-card-font-size);
|
|
60
63
|
font-weight: var(--catalog-card-font-weight);
|
|
61
64
|
background-color: var(--catalog-card-background-color);
|
|
62
|
-
border:
|
|
65
|
+
border: var(--catalog-card-border-width) var(--catalog-card-border-style) var(--catalog-card-border-color);
|
|
63
66
|
transition: all 0.2s ease-in-out;
|
|
64
67
|
border-radius: var(--catalog-card-border-radius);
|
|
65
68
|
cursor: pointer;
|
|
@@ -114,4 +117,12 @@ const CardFooter = styled.div`
|
|
|
114
117
|
justify-content: space-between;
|
|
115
118
|
`;
|
|
116
119
|
|
|
117
|
-
const CardTags = styled.div
|
|
120
|
+
const CardTags = styled.div`
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-wrap: wrap;
|
|
123
|
+
gap: var(--spacing-xxs);
|
|
124
|
+
`;
|
|
125
|
+
|
|
126
|
+
const CardTag = styled(Tag)`
|
|
127
|
+
margin: 0;
|
|
128
|
+
`;
|
|
@@ -41,7 +41,7 @@ export const catalog = css`
|
|
|
41
41
|
--catalog-separator-label-margin: 0 var(--spacing-xs);
|
|
42
42
|
--catalog-separator-count-height: var(--control-height-xs);
|
|
43
43
|
--catalog-separator-count-padding: 0 var(--spacing-xxs);
|
|
44
|
-
--catalog-separator-count-border-radius: var(--
|
|
44
|
+
--catalog-separator-count-border-radius: var(--border-radius-xlg);
|
|
45
45
|
--catalog-separator-count-border-color: var(--border-secondary);
|
|
46
46
|
--catalog-separator-count-background: var(--bg-raised);
|
|
47
47
|
|
|
@@ -54,8 +54,10 @@ export const catalog = css`
|
|
|
54
54
|
--catalog-card-font-weight: var(--font-weight-regular);
|
|
55
55
|
--catalog-card-background-color: var(--bg-raised);
|
|
56
56
|
--catalog-card-border-color: var(--border-secondary);
|
|
57
|
+
--catalog-card-border-width: var(--border-width);
|
|
58
|
+
--catalog-card-border-style: var(--border-style);
|
|
57
59
|
--catalog-card-hover-border-color: var(--border-primary);
|
|
58
|
-
--catalog-card-border-radius: var(--
|
|
60
|
+
--catalog-card-border-radius: var(--border-radius-lg);
|
|
59
61
|
|
|
60
62
|
/**
|
|
61
63
|
* @tokens Catalog card button
|
|
@@ -84,7 +86,7 @@ export const catalog = css`
|
|
|
84
86
|
--catalog-card-description-line-clamp: 3;
|
|
85
87
|
--catalog-card-description-margin-bottom: var(--spacing-base);
|
|
86
88
|
--catalog-card-content-background-color: var(--bg-base);
|
|
87
|
-
--catalog-card-content-border-radius: var(--
|
|
89
|
+
--catalog-card-content-border-radius: var(--border-radius-lg);
|
|
88
90
|
--catalog-card-content-padding: var(--spacing-base);
|
|
89
91
|
|
|
90
92
|
// @tokens End
|