@redocly/theme 0.6.3 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/lib/Button/Button.d.ts +3 -3
  2. package/lib/Feedback/Rating.d.ts +3 -0
  3. package/lib/Feedback/Rating.js +69 -0
  4. package/lib/Feedback/Sentiment.d.ts +3 -0
  5. package/lib/Feedback/Sentiment.js +55 -0
  6. package/lib/Feedback/Thumbs.d.ts +7 -0
  7. package/lib/Feedback/Thumbs.js +79 -0
  8. package/lib/Feedback/index.d.ts +3 -0
  9. package/lib/Feedback/index.js +23 -0
  10. package/lib/Feedback/types.d.ts +26 -0
  11. package/lib/Feedback/types.js +3 -0
  12. package/lib/Markdown/CodeSample/CodeSample.d.ts +1 -1
  13. package/lib/Markdown/Details.d.ts +1 -1
  14. package/lib/Markdown/MarkdownLayout.d.ts +3 -2
  15. package/lib/Markdown/MarkdownLayout.js +8 -2
  16. package/lib/Markdown/Mermaid.d.ts +1 -1
  17. package/lib/Markdown/Tabs/Tab.d.ts +1 -1
  18. package/lib/Markdown/Tabs/Tabs.d.ts +1 -1
  19. package/lib/Navbar/MobileNavbarMenu.d.ts +3 -2
  20. package/lib/Navbar/MobileNavbarMenu.js +16 -4
  21. package/lib/Navbar/Navbar.js +6 -3
  22. package/lib/NavbarLogo/NavbarLogo.d.ts +1 -1
  23. package/lib/Profile/LoginLink.d.ts +5 -0
  24. package/lib/Profile/LoginLink.js +30 -0
  25. package/lib/Profile/Profile.js +8 -1
  26. package/lib/Profile/UserProfile.d.ts +13 -0
  27. package/lib/Profile/UserProfile.js +82 -0
  28. package/lib/Profile/index.d.ts +4 -0
  29. package/lib/Profile/index.js +5 -1
  30. package/lib/Search/Autocomplete.js +1 -0
  31. package/lib/Search/Popover.js +9 -1
  32. package/lib/Search/Search.js +37 -4
  33. package/lib/Sidebar/ArrowBack.js +2 -2
  34. package/lib/Sidebar/SidebarLayout.d.ts +1 -5
  35. package/lib/Sidebar/SidebarLayout.js +1 -26
  36. package/lib/SourceCode/SourceCode.d.ts +1 -1
  37. package/lib/config.d.ts +55 -2
  38. package/lib/config.js +18 -0
  39. package/lib/globalStyle.js +6 -2
  40. package/lib/hooks/useActiveHeading.d.ts +1 -1
  41. package/lib/hooks/useActiveSectionId.d.ts +1 -1
  42. package/lib/hooks/useActiveSectionId.js +0 -3
  43. package/lib/hooks/useControl.d.ts +1 -1
  44. package/lib/hooks/useNavbarHeight.d.ts +1 -1
  45. package/lib/index.d.ts +1 -0
  46. package/lib/index.js +1 -0
  47. package/lib/mocks/hooks/index.js +6 -0
  48. package/lib/mocks/types/index.d.ts +1 -1
  49. package/lib/mocks/types.d.ts +3 -3
  50. package/lib/types/config.d.ts +1 -1
  51. package/lib/ui/Box.d.ts +2 -2
  52. package/lib/ui/Box.js +1 -0
  53. package/lib/ui/Burger.js +3 -2
  54. package/lib/ui/Dropdown.d.ts +1 -1
  55. package/lib/ui/Tiles/ThinTile.d.ts +1 -1
  56. package/lib/utils/jsonToHtml.d.ts +1 -1
  57. package/lib/utils/media-css.d.ts +1 -1
  58. package/package.json +7 -4
  59. package/src/Feedback/Rating.tsx +79 -0
  60. package/src/Feedback/Sentiment.tsx +36 -0
  61. package/src/Feedback/Thumbs.tsx +116 -0
  62. package/src/Feedback/index.ts +3 -0
  63. package/src/Feedback/types.ts +29 -0
  64. package/src/Markdown/MarkdownLayout.tsx +10 -1
  65. package/src/Navbar/MobileNavbarMenu.tsx +14 -0
  66. package/src/Navbar/Navbar.tsx +12 -3
  67. package/src/Profile/LoginLink.tsx +29 -0
  68. package/src/Profile/Profile.tsx +8 -1
  69. package/src/Profile/UserProfile.tsx +101 -0
  70. package/src/Profile/index.ts +4 -0
  71. package/src/Search/Autocomplete.tsx +1 -0
  72. package/src/Search/Popover.tsx +9 -1
  73. package/src/Search/Search.tsx +25 -15
  74. package/src/Sidebar/ArrowBack.tsx +2 -2
  75. package/src/Sidebar/SidebarLayout.tsx +1 -38
  76. package/src/config.ts +19 -0
  77. package/src/globalStyle.ts +7 -2
  78. package/src/hooks/useActiveSectionId.ts +0 -2
  79. package/src/index.ts +1 -0
  80. package/src/mocks/hooks/index.ts +6 -0
  81. package/src/settings.yaml +2 -0
  82. package/src/types/portal/index.d.ts +1 -1
  83. package/src/ui/Box.tsx +5 -2
  84. package/src/ui/Burger.tsx +3 -2
@@ -204,7 +204,7 @@ const headingsTypography = css`
204
204
  --h2-font-weight: var(--heading-font-weight); // @presenter FontWeight
205
205
  --h2-font-size: 28px; // @presenter FontSize
206
206
  --h2-line-height: 28px; // @presenter LineHeight
207
- --h2-margin-top: var(--heading-margin-top); // @presenter Spacing
207
+ --h2-margin-top: 0; // @presenter Spacing
208
208
  --h2-margin-bottom: var(--heading-margin-bottom); // @presenter Spacing
209
209
  --h2-text-color: var(--heading-text-color); // @presenter Color
210
210
 
@@ -517,7 +517,7 @@ const sidebar = css`
517
517
  --sidebar-back-button-font-family: var(--sidebar-item-font-family);
518
518
  --sidebar-back-button-font-size: var(--sidebar-item-font-size);
519
519
  --sidebar-back-button-transform: inherit;
520
- --sidebar-back-button-text-color: var(--link-text-color);
520
+ --sidebar-back-button-text-color: var(--sidebar-item-text-color);
521
521
  --sidebar-back-button-background-color: transparent;
522
522
  --sidebar-back-button-hover-text-color: var(--sidebar-item-active-color);
523
523
  --sidebar-back-button-hover-background-color: transparent;
@@ -1903,6 +1903,10 @@ const tile = css`
1903
1903
  --thin-tile-background-color: var(--color-secondary-50);
1904
1904
  `;
1905
1905
 
1906
+ const apiLogsTable = css`
1907
+ --api-logs-row-hover-background-color: var(--color-secondary-300)
1908
+ `
1909
+
1906
1910
  export const styles = css`
1907
1911
  :root {
1908
1912
  ${baseColors}
@@ -1931,6 +1935,7 @@ export const styles = css`
1931
1935
  ${lastUpdated}
1932
1936
  ${tile}
1933
1937
  ${loadProgressBar}
1938
+ ${apiLogsTable}
1934
1939
  }
1935
1940
 
1936
1941
  :root.dark {
@@ -32,8 +32,6 @@ export function useActiveSectionId(
32
32
  }
33
33
  if (hasOverviewPage) {
34
34
  setItemId('');
35
- } else {
36
- setItemId((sections[0] && sections[0].getAttribute('data-section-id')) || '');
37
35
  }
38
36
  }, 150),
39
37
  [navbarHeight, hasOverviewPage],
package/src/index.ts CHANGED
@@ -10,6 +10,7 @@ export * from './Tooltip';
10
10
  export * from './SourceCode';
11
11
  export * from './Panel';
12
12
  export * from './icons';
13
+ export * from './Feedback';
13
14
  export * from './hooks';
14
15
  export * from './utils';
15
16
  export * from './globalStyle';
@@ -32,6 +32,12 @@ export function useThemeConfig<T extends Record<string, unknown>>(): T & ThemeUI
32
32
  colorMode: {
33
33
  modes: ['light', 'dark'],
34
34
  },
35
+ feedback: {
36
+ type: 'sentiment',
37
+ },
38
+ userProfile: {
39
+ hide: false,
40
+ },
35
41
  } as ThemeUIConfig as T & ThemeUIConfig;
36
42
  }
37
43
 
package/src/settings.yaml CHANGED
@@ -25,3 +25,5 @@ colorMode:
25
25
  - 'dark'
26
26
  lastUpdatedBlock:
27
27
  hide: false
28
+ userProfile:
29
+ hide: false
@@ -1,2 +1,2 @@
1
1
  export * from './src/shared/types/nav';
2
- export type { MdHeading } from './src/shared/types/markdown';
2
+ export type { MdHeading } from './src/shared/types/markdown';
package/src/ui/Box.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { space, position, flex, textAlign, color, border, layout } from 'styled-system';
1
+ import { space, position, flex, textAlign, color, border, layout, grid } from 'styled-system';
2
2
  import styled from 'styled-components';
3
3
 
4
4
  import type {
@@ -9,6 +9,7 @@ import type {
9
9
  PositionProps,
10
10
  FlexProps,
11
11
  BordersProps,
12
+ GridProps,
12
13
  } from 'styled-system';
13
14
 
14
15
  export interface BoxProps
@@ -18,7 +19,8 @@ export interface BoxProps
18
19
  FlexProps,
19
20
  TextAlignProps,
20
21
  ColorProps,
21
- BordersProps {}
22
+ BordersProps,
23
+ GridProps {}
22
24
 
23
25
  export const Box = styled.div.attrs(() => ({
24
26
  'data-component-name': 'ui/Box',
@@ -31,4 +33,5 @@ export const Box = styled.div.attrs(() => ({
31
33
  ${textAlign}
32
34
  ${color}
33
35
  ${border}
36
+ ${grid}
34
37
  `;
package/src/ui/Burger.tsx CHANGED
@@ -20,7 +20,8 @@ function BurgerComponent({ onClick, className }: BurgerProps): JSX.Element {
20
20
 
21
21
  const Button = styled.button`
22
22
  all: unset;
23
- max-width: 30px;
23
+ max-width: 20px;
24
+ min-width: 20px;
24
25
  width: 100%;
25
26
  min-width: 10px;
26
27
  display: block;
@@ -31,7 +32,7 @@ const Line = styled.div`
31
32
  margin: 4px 0;
32
33
  width: 100%;
33
34
  height: 2px;
34
- background: #fff;
35
+ background: var(--text-color);
35
36
  border-radius: 1px;
36
37
  `;
37
38