skillgrid 0.0.31 → 0.0.35
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 +29 -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 +20 -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/SegmentedControl/SegmentedControl.type.d.ts +8 -4
- package/dist/components/SegmentedControl/index.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 +2591 -2025
- package/package.json +2 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HTMLProps, ReactNode } from 'react';
|
|
2
|
+
/** Размеры плейсхолдера */
|
|
3
|
+
export type PlaceholderSize = 'm' | 'l';
|
|
4
|
+
/** Свойства компонента Placeholder */
|
|
5
|
+
export interface PlaceholderProps extends Pick<HTMLProps<HTMLDivElement>, 'className' | 'style' | 'children'> {
|
|
6
|
+
/** Размер плейсхолдера */
|
|
7
|
+
size?: PlaceholderSize;
|
|
8
|
+
/** Иконка плейсхолдера */
|
|
9
|
+
iconSlot?: ReactNode;
|
|
10
|
+
/** Заголовок плейсхолдера */
|
|
11
|
+
title?: ReactNode;
|
|
12
|
+
/** Подзаголовок плейсхолдера */
|
|
13
|
+
subTitle?: ReactNode;
|
|
14
|
+
/** Дополнительные свойства для подзаголовка */
|
|
15
|
+
subTitleProps?: Pick<HTMLProps<HTMLParagraphElement>, 'className' | 'style'>;
|
|
16
|
+
/** Дополнительные свойства для заголовка */
|
|
17
|
+
titleProps?: Pick<HTMLProps<HTMLParagraphElement>, 'className' | 'style'>;
|
|
18
|
+
/** Идентификатор для тестирования */
|
|
19
|
+
'data-testid'?: string;
|
|
20
|
+
}
|
|
@@ -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';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
type Segment<T> = {
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export type Segment<T> = {
|
|
3
3
|
value: T;
|
|
4
4
|
label?: ReactNode;
|
|
5
|
+
containerProps?: ComponentPropsWithoutRef<'label'>;
|
|
5
6
|
};
|
|
6
|
-
export interface SegmentedControlProps<T> {
|
|
7
|
+
export interface SegmentedControlProps<T> extends Omit<ComponentPropsWithoutRef<'fieldset'>, 'defaultValue' | 'onChange'> {
|
|
7
8
|
className?: string;
|
|
8
9
|
/**
|
|
9
10
|
* Размер компонента
|
|
@@ -25,6 +26,10 @@ export interface SegmentedControlProps<T> {
|
|
|
25
26
|
* Значение по умолчанию
|
|
26
27
|
*/
|
|
27
28
|
defaultValue?: T;
|
|
29
|
+
/**
|
|
30
|
+
* Доступно ли изменение состояния компонента
|
|
31
|
+
*/
|
|
32
|
+
disabled?: boolean;
|
|
28
33
|
/** Режим отображения сегментов
|
|
29
34
|
* * icon - только иконка
|
|
30
35
|
* * text - текстовый лейбл
|
|
@@ -35,4 +40,3 @@ export interface SegmentedControlProps<T> {
|
|
|
35
40
|
*/
|
|
36
41
|
onChange?: (value: T) => void;
|
|
37
42
|
}
|
|
38
|
-
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { SegmentedControl } from './SegmentedControl';
|
|
2
|
-
export type
|
|
2
|
+
export { type SegmentedControlProps, type Segment } from './SegmentedControl.type';
|
|
@@ -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
|
};
|