skillgrid 0.0.31 → 0.0.34-dev-40511-42085-40506-alert-placeholder-modal-fix.1210374
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/dist/components/Alert/Alert.d.ts +9 -0
- package/dist/components/Alert/Alert.type.d.ts +25 -0
- package/dist/components/Alert/assets/index.d.ts +1 -0
- package/dist/components/Alert/assets/react-svg-icons.d.ts +6 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Alert/lib/constants.d.ts +7 -0
- package/dist/components/Alert/lib/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +4 -11
- package/dist/components/Button/Button.type.d.ts +184 -54
- package/dist/components/Button/assets/ArrowLeftIcon.d.ts +6 -0
- package/dist/components/Button/assets/CrossIcon.d.ts +2 -2
- package/dist/components/Button/assets/index.d.ts +1 -0
- package/dist/components/Button/assets/types.d.ts +2 -5
- package/dist/components/Button/lib/get-button-typography.d.ts +5 -0
- package/dist/components/Button/lib/get-button-typography.test.d.ts +1 -0
- package/dist/components/Button/lib/get-loader-variant.d.ts +7 -0
- package/dist/components/Button/lib/get-loader-variant.test.d.ts +1 -0
- package/dist/components/Button/lib/get-typography.d.ts +3 -3
- package/dist/components/Button/preview/index.d.ts +1 -0
- package/dist/components/Dialog/Dialog.d.ts +8 -0
- package/dist/components/Dialog/Dialog.type.d.ts +35 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/Dialog/lib/index.d.ts +1 -0
- package/dist/components/Dialog/lib/use-dialog.d.ts +43 -0
- package/dist/components/Dialog/lib/use-dialog.test.d.ts +1 -0
- package/dist/components/Loader/Loader.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts +7 -0
- package/dist/components/Modal/Modal.type.d.ts +34 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Placeholder/Placeholder.d.ts +14 -0
- package/dist/components/Placeholder/Placeholder.type.d.ts +23 -0
- package/dist/components/Placeholder/index.d.ts +2 -0
- package/dist/components/Placeholder/lib/get-typography-classes-from-placeholder-size.d.ts +13 -0
- package/dist/components/Placeholder/lib/get-typography-classes-from-placeholder-size.test.d.ts +1 -0
- package/dist/components/Placeholder/lib/index.d.ts +1 -0
- package/dist/components/Tabs/Tabs.type.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.type.d.ts +4 -1
- package/dist/components/Tooltip/utils/index.d.ts +1 -0
- package/dist/components/Tooltip/utils/merge-tooltip-button-props.d.ts +2 -0
- package/dist/components/Tooltip/utils/merge-tooltip-button-props.test.d.ts +1 -0
- package/dist/components/Typography/Typography.d.ts +2 -2
- package/dist/index.cjs.js +11 -11
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +2668 -2119
- package/package.json +3 -2
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HTMLProps, ReactNode } from 'react';
|
|
2
|
+
/** Размеры плейсхолдера */
|
|
3
|
+
export type PlaceholderSize = 'm' | 'l';
|
|
4
|
+
/** Поля плейсхолдера для стилизации. */
|
|
5
|
+
type PlaceholderFields = 'title' | 'subTitle' | 'iconSlot' | 'children' | 'textBlock' | 'container';
|
|
6
|
+
/** Свойства компонента Placeholder */
|
|
7
|
+
export interface PlaceholderProps extends Pick<HTMLProps<HTMLDivElement>, 'children'> {
|
|
8
|
+
/** Размер плейсхолдера */
|
|
9
|
+
size?: PlaceholderSize;
|
|
10
|
+
/** Иконка плейсхолдера */
|
|
11
|
+
iconSlot?: ReactNode;
|
|
12
|
+
/** Заголовок плейсхолдера */
|
|
13
|
+
title?: ReactNode;
|
|
14
|
+
/** Подзаголовок плейсхолдера */
|
|
15
|
+
subTitle?: ReactNode;
|
|
16
|
+
/** Inline-стили для отдельных частей плейсхолдера. */
|
|
17
|
+
styles?: Partial<Record<PlaceholderFields, HTMLProps<HTMLDivElement>['style']>>;
|
|
18
|
+
/** CSS-классы для отдельных частей плейсхолдера. */
|
|
19
|
+
classNames?: Partial<Record<PlaceholderFields, HTMLProps<HTMLDivElement>['className']>>;
|
|
20
|
+
/** Идентификатор для тестирования */
|
|
21
|
+
'data-testid'?: string;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as t } from '../../../styles/typography.module.css';
|
|
2
|
+
import { PlaceholderSize } from '../Placeholder.type';
|
|
3
|
+
type TypographyClassesType = keyof typeof t;
|
|
4
|
+
/**
|
|
5
|
+
* Возвращает класс типографики в зависимости от размера плейсхолдера.
|
|
6
|
+
* @param size - Размер плейсхолдера.
|
|
7
|
+
* @returns Класс типографики.
|
|
8
|
+
*/
|
|
9
|
+
declare function getTypographyClassFromPlaceholderSize(size: PlaceholderSize): {
|
|
10
|
+
title: TypographyClassesType;
|
|
11
|
+
subtitle: TypographyClassesType;
|
|
12
|
+
};
|
|
13
|
+
export { getTypographyClassFromPlaceholderSize };
|
package/dist/components/Placeholder/lib/get-typography-classes-from-placeholder-size.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getTypographyClassFromPlaceholderSize } from './get-typography-classes-from-placeholder-size';
|
|
@@ -12,7 +12,10 @@ export type TooltipContentClassNames = {
|
|
|
12
12
|
text?: string;
|
|
13
13
|
closeButton?: string;
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
type TooltipNativeButton = Extract<ButtonAsNativeButtonProps, {
|
|
16
|
+
displayAs?: 'button';
|
|
17
|
+
}>;
|
|
18
|
+
export type TooltipButtonConfig = TooltipNativeButton & {
|
|
16
19
|
closeOnClick?: boolean;
|
|
17
20
|
};
|
|
18
21
|
export interface TooltipCommonProps {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { mergeTooltipButtonProps } from './merge-tooltip-button-props';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -16,6 +16,6 @@ import * as React from 'react';
|
|
|
16
16
|
export declare const Typography: {
|
|
17
17
|
Title: React.ForwardRefExoticComponent<TypographyTitleProps & React.RefAttributes<HTMLHeadingElement | null>>;
|
|
18
18
|
Subtitle: React.ForwardRefExoticComponent<TypographyTitleProps & React.RefAttributes<HTMLHeadingElement | null>>;
|
|
19
|
-
Label: React.ForwardRefExoticComponent<TypographyTextProps & React.RefAttributes<
|
|
20
|
-
Paragraph: React.ForwardRefExoticComponent<TypographyTextProps & React.RefAttributes<
|
|
19
|
+
Label: React.ForwardRefExoticComponent<TypographyTextProps & React.RefAttributes<HTMLDivElement | HTMLSpanElement | HTMLLabelElement | HTMLParagraphElement | null>>;
|
|
20
|
+
Paragraph: React.ForwardRefExoticComponent<TypographyTextProps & React.RefAttributes<HTMLDivElement | HTMLSpanElement | HTMLLabelElement | HTMLParagraphElement | null>>;
|
|
21
21
|
};
|