@redocly/theme 0.1.33 → 0.2.0

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.
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { ActiveItem } from '../mocks/models';
2
+ import type { ActiveItem } from '../mocks/types';
3
3
  interface AutocompleteProps<T> {
4
4
  placeholder?: string;
5
5
  value: string;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { OperationParameter } from '../mocks/models';
2
+ import type { OperationParameter } from '../mocks/types';
3
3
  interface ParametersProps {
4
4
  parameters: OperationParameter[];
5
5
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ActiveItem, SearchDocument } from '../mocks/models';
2
+ import type { ActiveItem, SearchDocument } from '../mocks/types';
3
3
  interface SearchItemProps {
4
4
  item: ActiveItem<SearchDocument>;
5
5
  }
@@ -1,5 +1,5 @@
1
- import type { PropsWithChildren, ReactNode } from 'react';
2
1
  import React from 'react';
2
+ import type { PropsWithChildren, ReactNode } from 'react';
3
3
  export interface TooltipProps {
4
4
  tip: string | ReactNode;
5
5
  isOpen?: boolean;
@@ -10,4 +10,4 @@ export interface TooltipProps {
10
10
  dataTestId?: string;
11
11
  }
12
12
  export declare function TooltipComponent({ children, isOpen, tip, withArrow, placement, className, width, dataTestId, }: PropsWithChildren<TooltipProps>): JSX.Element;
13
- export declare const Tooltip: React.NamedExoticComponent<PropsWithChildren<TooltipProps>>;
13
+ export declare const Tooltip: React.NamedExoticComponent<React.PropsWithChildren<TooltipProps>>;
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.1.33",
3
+ "version": "0.2.0",
4
4
  "description": "Shared UI components",
5
5
  "author": "team@redocly.com",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
- import { Link } from '@portal/Link';
5
4
  import type { ResolvedNavItem, ResolvedNavLinkItem } from '@theme/types/portal';
6
5
 
6
+ import { Link } from '@portal/Link';
7
+
7
8
  interface CustomFooterNavItemProps {
8
9
  navItem: ResolvedNavItem;
9
10
  }
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
+ import type { NavGroupRecord, ResolvedNavItem } from '@theme/types/portal';
5
+
4
6
  import { FooterColumns } from '@theme/Footer/FooterColumns';
5
7
  import { FooterCopyright } from '@theme/Footer/FooterCopyright';
6
- import type { NavGroupRecord, ResolvedNavItem } from '@theme/types/portal';
7
8
  import { useThemeSettings } from '@portal/hooks';
8
9
  import { DEFAULT_THEME_NAME } from '@portal/constants';
9
10
  import { isEmptyArray } from '@theme/utils';
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
- import { Link } from '@portal/Link';
5
4
  import type { ResolvedNavItem } from '@theme/types/portal';
6
5
 
6
+ import { Link } from '@portal/Link';
7
+
7
8
  interface FooterColumnProps {
8
9
  column: ResolvedNavItem;
9
10
  }
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
- import { FooterColumn } from '@theme/Footer/FooterColumn';
5
4
  import type { ResolvedNavItem } from '@theme/types/portal';
6
5
 
6
+ import { FooterColumn } from '@theme/Footer/FooterColumn';
7
+
7
8
  interface FooterColumnsProps {
8
9
  columns: ResolvedNavItem[];
9
10
  }
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
4
  import type { ResolvedNavLinkItem } from '@theme/types/portal';
5
+
5
6
  import { Link } from '@portal/Link';
6
7
 
7
8
  interface NavbarDropdownProps {
@@ -7,6 +7,7 @@ import type {
7
7
  ResolvedNavLinkItem,
8
8
  ResolvedNavGroupItem,
9
9
  } from '@theme/types/portal';
10
+
10
11
  import { Link } from '@portal/Link';
11
12
  import { withPathPrefix } from '@portal/utils';
12
13
  import { MobileDropdownWrapper, MobileNavbarDropdown } from '@theme/Navbar/MobileNavbarDropdown';
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
+ import type { ResolvedConfigLinks, ResolvedNavItem } from '@theme/types/portal';
5
+
4
6
  import { NavMenuItem, NavMenuItemWithDropdownWrapper } from '@theme/Navbar/NavbarItem';
5
7
  import { MobileNavbarItem } from '@theme/Navbar/MobileNavbarItem';
6
8
  import { DropdownWrapper } from '@theme/Navbar/NavbarDropdown';
7
- import type { ResolvedConfigLinks, ResolvedNavItem } from '@theme/types/portal';
8
9
  import { isPrimitive, isEmptyArray } from '@theme/utils';
9
10
 
10
11
  export function MobileNavbarMenu({
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
4
  import type { ResolvedNavLinkItem } from '@theme/types/portal';
5
+
5
6
  import { Link } from '@portal/Link';
6
7
 
7
8
  interface NavbarDropdownProps {
@@ -7,6 +7,7 @@ import type {
7
7
  ResolvedNavLinkItem,
8
8
  ResolvedNavGroupItem,
9
9
  } from '@theme/types/portal';
10
+
10
11
  import { Link } from '@portal/Link';
11
12
  import { withPathPrefix } from '@portal/utils';
12
13
  import { NavbarDropdown, DropdownWrapper } from '@theme/Navbar/NavbarDropdown';
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
- import { NavbarItem } from '@theme/Navbar/NavbarItem';
5
4
  import type { ResolvedConfigLinks, ResolvedNavItem } from '@theme/types/portal';
5
+
6
+ import { NavbarItem } from '@theme/Navbar/NavbarItem';
6
7
  import { isPrimitive, isEmptyArray } from '@theme/utils';
7
8
 
8
9
  export function NavbarMenu({ menuItems }: { menuItems: ResolvedConfigLinks }): JSX.Element | null {
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
4
  import type { ResolvedNavItemWithLink } from '@theme/types/portal';
5
+
5
6
  import { useThemeSettings, useSidebarSiblingsData } from '@portal/hooks';
6
7
  import { DEFAULT_THEME_NAME } from '@portal/constants';
7
8
  import { Button } from '@theme/Button/Button';
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
4
  import type { ResolvedNavItemWithLink } from '@theme/types/portal';
5
+
5
6
  import { useThemeSettings, useSidebarSiblingsData } from '@portal/hooks';
6
7
  import { DEFAULT_THEME_NAME } from '@portal/constants';
7
8
  import { Button } from '@theme/Button/Button';
@@ -9,9 +9,10 @@ import React, {
9
9
  import { useLocation } from 'react-router-dom';
10
10
  import styled from 'styled-components';
11
11
 
12
+ import type { ActiveItem } from '@portal/types';
13
+
12
14
  import { FormInput } from '@theme/Search/Input';
13
15
  import { Popover } from '@theme/Search/Popover';
14
- import { ActiveItem } from '@shared/models';
15
16
 
16
17
  interface AutocompleteProps<T> {
17
18
  placeholder?: string;
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
- import { OperationParameter } from '@shared/models';
4
+ import type { OperationParameter } from '@portal/types';
5
+
5
6
  import { highlight } from '@theme/Search/utils';
6
7
 
7
8
  interface ParametersProps {
@@ -1,9 +1,10 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
+ import type { ActiveItem, SearchDocument } from '@portal/types';
5
+
4
6
  import { OperationBadge } from '@theme/OperationBadge';
5
7
  import { Link } from '@portal/Link';
6
- import { ActiveItem, SearchDocument } from '@shared/models';
7
8
  import { Parameters } from '@theme/Search/Parameters';
8
9
  import { highlight } from '@theme/Search/utils';
9
10
 
@@ -1,6 +1,6 @@
1
- import type { PropsWithChildren, ReactNode } from 'react';
2
1
  import React, { useEffect, memo, useRef } from 'react';
3
2
  import styled, { css } from 'styled-components';
3
+ import type { PropsWithChildren, ReactNode } from 'react';
4
4
 
5
5
  import { useControl, useOutsideClick } from '@theme/hooks';
6
6
 
@@ -1,6 +1,6 @@
1
- import type { Location } from 'history';
2
1
  import { useEffect, useState, useMemo } from 'react';
3
2
  import throttle from 'lodash.throttle';
3
+ import type { Location } from 'history';
4
4
 
5
5
  import { useNavbarHeight } from '@theme/hooks/useNavbarHeight';
6
6
 
File without changes
@@ -1,5 +1,5 @@
1
- import type { FlattenSimpleInterpolation } from 'styled-components';
2
1
  import { css } from 'styled-components';
2
+ import type { FlattenSimpleInterpolation } from 'styled-components';
3
3
 
4
4
  enum Token {
5
5
  Comment = 'comment',