@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.
- package/lib/components/Accordion/Accordion.d.ts +12 -0
- package/lib/components/Accordion/Accordion.js +75 -0
- package/lib/components/Accordion/AccordionBody.d.ts +8 -0
- package/lib/components/Accordion/AccordionBody.js +63 -0
- package/lib/components/Accordion/AccordionHeader.d.ts +10 -0
- package/lib/components/Accordion/AccordionHeader.js +37 -0
- package/lib/components/Accordion/AccordionTitle.d.ts +6 -0
- package/lib/components/Accordion/AccordionTitle.js +20 -0
- package/lib/components/Accordion/variables.d.ts +1 -0
- package/lib/components/Accordion/variables.js +59 -0
- package/lib/components/Buttons/AIAssistantButton.d.ts +2 -0
- package/lib/components/Buttons/AIAssistantButton.js +125 -0
- package/lib/components/Buttons/variables.d.ts +1 -0
- package/lib/components/Buttons/variables.dark.d.ts +1 -0
- package/lib/components/Buttons/variables.dark.js +10 -0
- package/lib/components/Buttons/variables.js +51 -0
- package/lib/components/Catalog/Catalog.js +3 -3
- package/lib/components/Catalog/CatalogFilter/CatalogFilter.d.ts +6 -0
- package/lib/components/Catalog/CatalogFilter/CatalogFilter.js +35 -0
- package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.d.ts +6 -0
- package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +142 -0
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.d.ts +13 -0
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.js +92 -0
- package/lib/components/Catalog/CatalogFilter/CatalogFilterDateRange.d.ts +6 -0
- package/lib/components/Catalog/CatalogFilter/CatalogFilterDateRange.js +111 -0
- package/lib/components/Catalog/CatalogFilter/CatalogFilterSelect.d.ts +6 -0
- package/lib/components/Catalog/CatalogFilter/CatalogFilterSelect.js +116 -0
- package/lib/components/Catalog/CatalogSelector.js +0 -1
- package/lib/components/Catalog/variables.js +0 -1
- package/lib/components/Filter/FilterInput.d.ts +1 -0
- package/lib/components/Filter/FilterInput.js +2 -2
- package/lib/components/Filter/FilterOptions.js +2 -0
- package/lib/components/Filter/variables.js +7 -4
- package/lib/components/Search/SearchAiDialog.js +2 -3
- package/lib/components/Search/SearchAiResponse.js +2 -3
- package/lib/components/Search/SearchDialog.d.ts +2 -1
- package/lib/components/Search/SearchDialog.js +2 -2
- package/lib/components/Tag/variables.dark.js +2 -2
- package/lib/core/styles/dark.js +29 -26
- package/lib/core/styles/global.js +64 -59
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/icons/RedoclyIcon/RedoclyIcon.d.ts +9 -0
- package/lib/icons/RedoclyIcon/RedoclyIcon.js +27 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/layouts/RootLayout.js +6 -1
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.tsx +100 -0
- package/src/components/Accordion/AccordionBody.tsx +65 -0
- package/src/components/Accordion/AccordionHeader.tsx +68 -0
- package/src/components/Accordion/AccordionTitle.tsx +26 -0
- package/src/components/Accordion/variables.ts +56 -0
- package/src/components/Buttons/AIAssistantButton.tsx +141 -0
- package/src/components/Buttons/variables.dark.ts +7 -0
- package/src/components/Buttons/variables.ts +48 -0
- package/src/components/Catalog/Catalog.tsx +3 -2
- package/src/components/Catalog/CatalogFilter/CatalogFilter.tsx +56 -0
- package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +169 -0
- package/src/components/Catalog/CatalogFilter/CatalogFilterContent.tsx +121 -0
- package/src/components/Catalog/CatalogFilter/CatalogFilterDateRange.tsx +147 -0
- package/src/components/Catalog/CatalogFilter/CatalogFilterSelect.tsx +136 -0
- package/src/components/Catalog/CatalogSelector.tsx +0 -1
- package/src/components/Catalog/variables.ts +0 -1
- package/src/components/Filter/FilterInput.tsx +3 -2
- package/src/components/Filter/FilterOptions.tsx +2 -0
- package/src/components/Filter/variables.ts +7 -4
- package/src/components/Search/SearchAiDialog.tsx +2 -2
- package/src/components/Search/SearchAiResponse.tsx +2 -2
- package/src/components/Search/SearchDialog.tsx +7 -2
- package/src/components/Tag/variables.dark.ts +2 -2
- package/src/core/styles/dark.ts +11 -8
- package/src/core/styles/global.ts +7 -2
- package/src/core/types/l10n.ts +1 -0
- package/src/icons/RedoclyIcon/RedoclyIcon.tsx +44 -0
- package/src/index.ts +2 -0
- 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
|
}
|