Skip to content

Commit

Permalink
feat(sdds): part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
shuga2704 committed Jul 23, 2024
1 parent 5810089 commit 5a7416c
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 36 deletions.
119 changes: 118 additions & 1 deletion packages/sdds-serv/api/sdds-serv.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

/// <reference types="react" />

import { AccordionItem } from '@salutejs/plasma-new-hope/styled-components';
import { addFocus } from '@salutejs/plasma-new-hope/styled-components';
import { addNotification } from '@salutejs/plasma-new-hope/styled-components';
import { AlignProp } from '@salutejs/plasma-new-hope/types/components/Cell/Cell.types';
import { AnchorHTMLAttributes } from 'react';
import { AsProps } from '@salutejs/plasma-new-hope/types/types';
Expand All @@ -28,6 +30,7 @@ import { bodyXSBold } from '@salutejs/sdds-themes/tokens';
import { bodyXXS } from '@salutejs/sdds-themes/tokens';
import { bodyXXSBold } from '@salutejs/sdds-themes/tokens';
import { BoldProps } from '@salutejs/plasma-new-hope/types/components/Typography/Typography.types';
import { ButtonBase } from '@salutejs/plasma-new-hope/styled-components';
import { ButtonGroupProps } from '@salutejs/plasma-new-hope/styled-components';
import { ButtonHTMLAttributes } from 'react';
import { Calendar as Calendar_2 } from '@salutejs/plasma-new-hope/types/components/Calendar/Calendar.types';
Expand All @@ -45,6 +48,7 @@ import { CellTextboxTitle } from '@salutejs/plasma-new-hope/styled-components';
import { ChangeEvent } from 'react';
import { CheckboxProps as CheckboxProps_2 } from '@salutejs/plasma-new-hope/types/components/Checkbox/Checkbox.types';
import { ChipProps } from '@salutejs/plasma-new-hope/styled-components';
import { closeNotification } from '@salutejs/plasma-new-hope/styled-components';
import { ClosePlacementType } from '@salutejs/plasma-new-hope/styled-components';
import { Col } from '@salutejs/plasma-new-hope/styled-components';
import { ColCount } from '@salutejs/plasma-new-hope/styled-components';
Expand Down Expand Up @@ -84,7 +88,7 @@ import { dsplM } from '@salutejs/sdds-themes/tokens';
import { dsplMBold } from '@salutejs/sdds-themes/tokens';
import { dsplS } from '@salutejs/sdds-themes/tokens';
import { dsplSBold } from '@salutejs/sdds-themes/tokens';
import type { FC } from 'react';
import { FC } from 'react';
import { Filter } from '@salutejs/plasma-new-hope/types/engines/types';
import { ForwardRefExoticComponent } from 'react';
import { FunctionComponent } from 'react';
Expand Down Expand Up @@ -112,6 +116,9 @@ import { mediaQuery } from '@salutejs/plasma-new-hope/styled-components';
import { modalClasses } from '@salutejs/plasma-new-hope/styled-components';
import { ModalProps } from '@salutejs/plasma-new-hope/styled-components';
import { MouseEvent as MouseEvent_2 } from 'react';
import { NotificationIconPlacement } from '@salutejs/plasma-new-hope/styled-components';
import { NotificationLayout } from '@salutejs/plasma-new-hope/styled-components';
import { NotificationProps } from '@salutejs/plasma-new-hope/styled-components';
import { Overlay } from '@salutejs/plasma-new-hope/styled-components';
import { OverlayProps } from '@salutejs/plasma-new-hope/styled-components';
import { PaginationProps } from '@salutejs/plasma-new-hope/styled-components';
Expand All @@ -135,10 +142,12 @@ import { RangeInputRefs } from '@salutejs/plasma-new-hope/styled-components';
import { RangeProps } from '@salutejs/plasma-new-hope/styled-components';
import { rangeTokens } from '@salutejs/plasma-new-hope/styled-components';
import { Ratio } from '@salutejs/plasma-new-hope/styled-components';
import { default as React_2 } from 'react';
import { ReactElement } from 'react';
import { ReactFragment } from 'react';
import { ReactNode } from 'react';
import { ReactPortal } from 'react';
import { RectSkeleton } from '@salutejs/plasma-new-hope/styled-components';
import { RefAttributes } from 'react';
import { RefObject } from 'react';
import { Row } from '@salutejs/plasma-new-hope/styled-components';
Expand All @@ -153,6 +162,8 @@ import { sheetClasses } from '@salutejs/plasma-new-hope/styled-components';
import { SheetProps } from '@salutejs/plasma-new-hope/styled-components';
import { ShowToastArgs } from '@salutejs/plasma-new-hope/styled-components';
import { SingleSliderProps } from '@salutejs/plasma-new-hope/styled-components';
import { SkeletonGradientProps } from '@salutejs/plasma-new-hope/styled-components';
import { SkeletonSizeProps } from '@salutejs/plasma-new-hope/types/components/Skeleton/Skeleton.types';
import { SliderProps } from '@salutejs/plasma-new-hope/styled-components';
import { SpacingProps } from '@salutejs/plasma-new-hope/styled-components';
import { SSRProvider } from '@salutejs/plasma-new-hope/styled-components';
Expand All @@ -177,6 +188,7 @@ import { textM } from '@salutejs/sdds-themes/tokens';
import { textMBold } from '@salutejs/sdds-themes/tokens';
import { textS } from '@salutejs/sdds-themes/tokens';
import { textSBold } from '@salutejs/sdds-themes/tokens';
import { TextSkeletonBaseProps } from '@salutejs/plasma-new-hope/types/components/Skeleton/TextSkeleton/TextSkeleton.types';
import { textXS } from '@salutejs/sdds-themes/tokens';
import { textXSBold } from '@salutejs/sdds-themes/tokens';
import { ToastPosition } from '@salutejs/plasma-new-hope/styled-components';
Expand All @@ -189,9 +201,38 @@ import { usePopupContext } from '@salutejs/plasma-new-hope/styled-components';
import { useSegment } from '@salutejs/plasma-new-hope/styled-components';
import { useToast } from '@salutejs/plasma-new-hope/styled-components';
import { Variants } from '@salutejs/plasma-new-hope/types/engines/types';
import { withSkeleton } from '@salutejs/plasma-new-hope/styled-components';

// @public (undocumented)
export const Accordion: FunctionComponent<PropsType< {
view: {
default: PolymorphicClassName;
clear: PolymorphicClassName;
};
size: {
l: PolymorphicClassName;
m: PolymorphicClassName;
s: PolymorphicClassName;
xs: PolymorphicClassName;
};
}> & {
view: string;
size?: string | undefined;
singleActive?: boolean | undefined;
defaultActiveEventKey?: number[] | undefined;
disabled?: boolean | undefined;
stretching?: "filled" | "fixed" | undefined;
onChange?: ((index?: number | undefined, value?: boolean | undefined) => void) | undefined;
children?: ReactNode;
className?: string | undefined;
} & RefAttributes<HTMLDivElement>>;

export { AccordionItem }

export { addFocus }

export { addNotification }

// @public (undocumented)
export const Autocomplete: FunctionComponent<PropsType< {
view: {
Expand Down Expand Up @@ -434,6 +475,8 @@ value?: undefined;
contentRight?: ReactNode;
} & RefAttributes<HTMLButtonElement>))>;

export { ButtonBase }

// @public
export const ButtonGroup: FunctionComponent<PropsType< {
view: {
Expand Down Expand Up @@ -636,6 +679,8 @@ true: PolymorphicClassName;

export { ChipProps }

export { closeNotification }

export { ClosePlacementType }

export { Col }
Expand Down Expand Up @@ -1140,6 +1185,32 @@ view: string;

export { IndicatorProps }

// @public (undocumented)
export const LineSkeleton: FunctionComponent<PropsType< {
size: {
bodyL: PolymorphicClassName;
bodyM: PolymorphicClassName;
bodyS: PolymorphicClassName;
bodyXS: PolymorphicClassName;
bodyXXS: PolymorphicClassName;
dsplL: PolymorphicClassName;
dsplM: PolymorphicClassName;
dsplS: PolymorphicClassName;
h1: PolymorphicClassName;
h2: PolymorphicClassName;
h3: PolymorphicClassName;
h4: PolymorphicClassName;
h5: PolymorphicClassName;
textL: PolymorphicClassName;
textM: PolymorphicClassName;
textS: PolymorphicClassName;
textXS: PolymorphicClassName;
};
}> & HTMLAttributes<HTMLDivElement> & SkeletonSizeProps & {
customGradientColor?: string | undefined;
roundness?: 0 | 8 | 12 | 14 | 16 | 18 | 20 | 24 | 28 | 32 | 250 | undefined;
} & SkeletonGradientProps & RefAttributes<HTMLDivElement>>;

// @public
export const Link: FunctionComponent<PropsType< {
view: {
Expand Down Expand Up @@ -1175,6 +1246,22 @@ export { modalClasses }

export { ModalProps }

// @public (undocumented)
const Notification_2: React_2.ForwardRefExoticComponent<NotificationProps & React_2.RefAttributes<HTMLDivElement>>;
export { Notification_2 as Notification }

export { NotificationIconPlacement }

export { NotificationLayout }

export { NotificationProps }

// @public (undocumented)
export const NotificationsProvider: React_2.FC<{
children: ReactNode;
frame?: string;
}>;

export { Overlay }

export { OverlayProps }
Expand Down Expand Up @@ -1418,6 +1505,8 @@ export { rangeTokens }

export { Ratio }

export { RectSkeleton }

export { Row }

export { ScreenConfig }
Expand Down Expand Up @@ -1806,6 +1895,32 @@ export { textS }

export { textSBold }

// @public (undocumented)
export const TextSkeleton: FC<PropsType< {
size: {
bodyL: PolymorphicClassName;
bodyM: PolymorphicClassName;
bodyS: PolymorphicClassName;
bodyXS: PolymorphicClassName;
bodyXXS: PolymorphicClassName;
dsplL: PolymorphicClassName;
dsplM: PolymorphicClassName;
dsplS: PolymorphicClassName;
h1: PolymorphicClassName;
h2: PolymorphicClassName;
h3: PolymorphicClassName;
h4: PolymorphicClassName;
h5: PolymorphicClassName;
textL: PolymorphicClassName;
textM: PolymorphicClassName;
textS: PolymorphicClassName;
textXS: PolymorphicClassName;
};
}> & HTMLAttributes<HTMLDivElement> & SkeletonSizeProps & {
customGradientColor?: string | undefined;
roundness?: 0 | 8 | 12 | 14 | 16 | 18 | 20 | 24 | 28 | 32 | 250 | undefined;
} & SkeletonGradientProps & RefAttributes<HTMLDivElement> & TextSkeletonBaseProps>;

// @public (undocumented)
export const TextXS: FunctionComponent<PropsType< {
size: {
Expand Down Expand Up @@ -1882,6 +1997,8 @@ export { useSegment }

export { useToast }

export { withSkeleton }


export * from "@salutejs/sdds-themes/tokens/sdds_serv";

Expand Down
31 changes: 0 additions & 31 deletions packages/sdds-serv/src/components/Calendar/Calendar.ts

This file was deleted.

11 changes: 7 additions & 4 deletions packages/sdds-serv/src/components/Calendar/Calendar.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import type { FC } from 'react';
import {
boundCalendar,
withRange,
component,
calendarBaseConfig,
calendarDoubleConfig,
component,
withRange,
mergeConfig,
boundCalendar,
CalendarStateType,
} from '@salutejs/plasma-new-hope/styled-components';
import type { CalendarBaseProps, CalendarDoubleProps } from '@salutejs/plasma-new-hope/styled-components';
import type { FC } from 'react';

import { config as baseConfig } from './CalendarBase.config';
import { config as doubleConfig } from './CalendarDouble.config';
Expand All @@ -26,3 +27,5 @@ export const Calendar = boundCalendar({
double: CalendarDouble as FC<CalendarDoubleProps>,
doubleRange: CalendarDoubleRange,
});

export type { CalendarStateType };

0 comments on commit 5a7416c

Please sign in to comment.