@redocly/theme 0.59.0-next.0 → 0.59.0-next.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.
Files changed (76) hide show
  1. package/lib/components/Accordion/Accordion.d.ts +12 -0
  2. package/lib/components/Accordion/Accordion.js +75 -0
  3. package/lib/components/Accordion/AccordionBody.d.ts +8 -0
  4. package/lib/components/Accordion/AccordionBody.js +63 -0
  5. package/lib/components/Accordion/AccordionHeader.d.ts +10 -0
  6. package/lib/components/Accordion/AccordionHeader.js +37 -0
  7. package/lib/components/Accordion/AccordionTitle.d.ts +6 -0
  8. package/lib/components/Accordion/AccordionTitle.js +20 -0
  9. package/lib/components/Accordion/variables.d.ts +1 -0
  10. package/lib/components/Accordion/variables.js +59 -0
  11. package/lib/components/Buttons/AIAssistantButton.d.ts +2 -0
  12. package/lib/components/Buttons/AIAssistantButton.js +125 -0
  13. package/lib/components/Buttons/variables.d.ts +1 -0
  14. package/lib/components/Buttons/variables.dark.d.ts +1 -0
  15. package/lib/components/Buttons/variables.dark.js +10 -0
  16. package/lib/components/Buttons/variables.js +51 -0
  17. package/lib/components/Catalog/Catalog.js +3 -3
  18. package/lib/components/Catalog/CatalogFilter/CatalogFilter.d.ts +6 -0
  19. package/lib/components/Catalog/CatalogFilter/CatalogFilter.js +35 -0
  20. package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.d.ts +6 -0
  21. package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +142 -0
  22. package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.d.ts +13 -0
  23. package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.js +92 -0
  24. package/lib/components/Catalog/CatalogFilter/CatalogFilterDateRange.d.ts +6 -0
  25. package/lib/components/Catalog/CatalogFilter/CatalogFilterDateRange.js +111 -0
  26. package/lib/components/Catalog/CatalogFilter/CatalogFilterSelect.d.ts +6 -0
  27. package/lib/components/Catalog/CatalogFilter/CatalogFilterSelect.js +116 -0
  28. package/lib/components/Catalog/CatalogSelector.js +0 -1
  29. package/lib/components/Catalog/variables.js +0 -1
  30. package/lib/components/Filter/FilterInput.d.ts +1 -0
  31. package/lib/components/Filter/FilterInput.js +2 -2
  32. package/lib/components/Filter/FilterOptions.js +2 -0
  33. package/lib/components/Filter/variables.js +7 -4
  34. package/lib/components/Search/SearchAiDialog.js +2 -3
  35. package/lib/components/Search/SearchAiResponse.js +2 -3
  36. package/lib/components/Search/SearchDialog.d.ts +2 -1
  37. package/lib/components/Search/SearchDialog.js +2 -2
  38. package/lib/components/Tag/variables.dark.js +2 -2
  39. package/lib/core/styles/dark.js +29 -26
  40. package/lib/core/styles/global.js +64 -59
  41. package/lib/core/types/l10n.d.ts +1 -1
  42. package/lib/icons/RedoclyIcon/RedoclyIcon.d.ts +9 -0
  43. package/lib/icons/RedoclyIcon/RedoclyIcon.js +27 -0
  44. package/lib/index.d.ts +2 -0
  45. package/lib/index.js +2 -0
  46. package/lib/layouts/RootLayout.js +6 -1
  47. package/package.json +1 -1
  48. package/src/components/Accordion/Accordion.tsx +100 -0
  49. package/src/components/Accordion/AccordionBody.tsx +65 -0
  50. package/src/components/Accordion/AccordionHeader.tsx +68 -0
  51. package/src/components/Accordion/AccordionTitle.tsx +26 -0
  52. package/src/components/Accordion/variables.ts +56 -0
  53. package/src/components/Buttons/AIAssistantButton.tsx +141 -0
  54. package/src/components/Buttons/variables.dark.ts +7 -0
  55. package/src/components/Buttons/variables.ts +48 -0
  56. package/src/components/Catalog/Catalog.tsx +3 -2
  57. package/src/components/Catalog/CatalogFilter/CatalogFilter.tsx +56 -0
  58. package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +169 -0
  59. package/src/components/Catalog/CatalogFilter/CatalogFilterContent.tsx +121 -0
  60. package/src/components/Catalog/CatalogFilter/CatalogFilterDateRange.tsx +147 -0
  61. package/src/components/Catalog/CatalogFilter/CatalogFilterSelect.tsx +136 -0
  62. package/src/components/Catalog/CatalogSelector.tsx +0 -1
  63. package/src/components/Catalog/variables.ts +0 -1
  64. package/src/components/Filter/FilterInput.tsx +3 -2
  65. package/src/components/Filter/FilterOptions.tsx +2 -0
  66. package/src/components/Filter/variables.ts +7 -4
  67. package/src/components/Search/SearchAiDialog.tsx +2 -2
  68. package/src/components/Search/SearchAiResponse.tsx +2 -2
  69. package/src/components/Search/SearchDialog.tsx +7 -2
  70. package/src/components/Tag/variables.dark.ts +2 -2
  71. package/src/core/styles/dark.ts +11 -8
  72. package/src/core/styles/global.ts +7 -2
  73. package/src/core/types/l10n.ts +1 -0
  74. package/src/icons/RedoclyIcon/RedoclyIcon.tsx +44 -0
  75. package/src/index.ts +2 -0
  76. package/src/layouts/RootLayout.tsx +6 -0
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ import { getCssColorVariable } from '@redocly/theme/core/utils';
7
+
8
+ const Icon = (props: IconProps) => (
9
+ <svg
10
+ width="18"
11
+ height="18"
12
+ viewBox="0 0 18 18"
13
+ fill="none"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ {...props}
16
+ >
17
+ <g clipPath="url(#clip0_4053_1165)">
18
+ <path
19
+ d="M14.625 6.19973C14.625 8.69176 12.6173 10.712 10.1406 10.712H2.8125V10.2717C5.04753 10.2717 6.85938 8.44864 6.85938 6.19973C6.85938 3.95082 5.04753 2.12772 2.8125 2.12772V1.6875H10.1406C12.6173 1.6875 14.625 3.70769 14.625 6.19973Z"
20
+ fill="#2467F2"
21
+ />
22
+ <path
23
+ d="M14.625 16.875C14.625 14.383 12.6173 12.3628 10.1406 12.3628H2.8125V12.803C5.04753 12.803 6.85938 14.6261 6.85938 16.875H14.625Z"
24
+ fill="#2467F2"
25
+ />
26
+ </g>
27
+ <defs>
28
+ <clipPath id="clip0_4053_1165">
29
+ <rect width="18" height="18" fill="white" />
30
+ </clipPath>
31
+ </defs>
32
+ </svg>
33
+ );
34
+
35
+ export const RedoclyIcon = styled(Icon).attrs(() => ({
36
+ 'data-component-name': 'icons/RedoclyIcon/RedoclyIcon',
37
+ }))<IconProps>`
38
+ path {
39
+ fill: ${({ color }) => getCssColorVariable(color)};
40
+ }
41
+
42
+ height: ${({ size }) => size || '16px'};
43
+ width: ${({ size }) => size || '16px'};
44
+ `;
package/src/index.ts CHANGED
@@ -32,6 +32,7 @@ export * from '@redocly/theme/components/Buttons/CopyButton';
32
32
  export * from '@redocly/theme/components/Buttons/EditPageButton';
33
33
  export * from '@redocly/theme/components/Buttons/EmailButton';
34
34
  export * from '@redocly/theme/components/Buttons/NewTabButton';
35
+ export * from '@redocly/theme/components/Buttons/AIAssistantButton';
35
36
  /* Markdown */
36
37
  export * from '@redocly/theme/components/Markdown/Markdown';
37
38
  export * from '@redocly/theme/components/Markdown/styles/baseTable';
@@ -282,6 +283,7 @@ export * from '@redocly/theme/icons/RabbitMQIcon/RabbitMQIcon';
282
283
  export * from '@redocly/theme/icons/CurveAutoColonIcon/CurveAutoColonIcon';
283
284
  export * from '@redocly/theme/icons/AiStarsIcon/AiStarsIcon';
284
285
  export * from '@redocly/theme/icons/AiStarsGradientIcon/AiStarsGradientIcon';
286
+ export * from '@redocly/theme/icons/RedoclyIcon/RedoclyIcon';
285
287
  export * from '@redocly/theme/icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon';
286
288
  export * from '@redocly/theme/icons/GenericIcon/GenericIcon';
287
289
  export * from '@redocly/theme/icons/ShareIcon/ShareIcon';
@@ -5,18 +5,24 @@ import type { JSX } from 'react';
5
5
  import { Navbar } from '@redocly/theme/components/Navbar/Navbar';
6
6
  import { Footer } from '@redocly/theme/components/Footer/Footer';
7
7
  import { SkipContent } from '@redocly/theme/components/SkipContent/SkipContent';
8
+ import { AIAssistantButton } from '@redocly/theme/components/Buttons/AIAssistantButton';
9
+ import { useThemeHooks } from '@redocly/theme/core/hooks';
8
10
 
9
11
  export type LayoutConfig = {
10
12
  children: React.ReactNode;
11
13
  };
12
14
 
13
15
  export function RootLayout({ children }: LayoutConfig): JSX.Element {
16
+ const { useSearch } = useThemeHooks();
17
+ const { askAi } = useSearch();
18
+
14
19
  return (
15
20
  <div data-component-name="layouts/RootLayout">
16
21
  <SkipContent />
17
22
  <Navbar />
18
23
  {children}
19
24
  <Footer />
25
+ {askAi && <AIAssistantButton />}
20
26
  </div>
21
27
  );
22
28
  }