skillgrid 0.0.31-dev-39184-segmented-control-and-tag-updates.1199645 → 0.0.34-dev-40511-42085-40506-alert-placeholder-modal-fix.1208465
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 +22 -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 +4 -8
- 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 +2565 -2050
- package/package.json +2 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HTMLProps, ReactNode } from 'react';
|
|
2
|
+
/** Размеры плейсхолдера */
|
|
3
|
+
export type PlaceholderSize = 'm' | 'l';
|
|
4
|
+
type PlaceholderFields = 'title' | 'subTitle' | 'iconSlot' | 'children' | 'textBlock' | 'container';
|
|
5
|
+
/** Свойства компонента Placeholder */
|
|
6
|
+
export interface PlaceholderProps extends Pick<HTMLProps<HTMLDivElement>, 'children'> {
|
|
7
|
+
/** Размер плейсхолдера */
|
|
8
|
+
size?: PlaceholderSize;
|
|
9
|
+
/** Иконка плейсхолдера */
|
|
10
|
+
iconSlot?: ReactNode;
|
|
11
|
+
/** Заголовок плейсхолдера */
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
/** Подзаголовок плейсхолдера */
|
|
14
|
+
subTitle?: ReactNode;
|
|
15
|
+
/** Inline-стили для отдельных частей модального окна. */
|
|
16
|
+
styles?: Partial<Record<PlaceholderFields, HTMLProps<HTMLDivElement>['style']>>;
|
|
17
|
+
/** CSS-классы для отдельных частей модального окна. */
|
|
18
|
+
classNames?: Partial<Record<PlaceholderFields, HTMLProps<HTMLDivElement>['className']>>;
|
|
19
|
+
/** Идентификатор для тестирования */
|
|
20
|
+
'data-testid'?: string;
|
|
21
|
+
}
|
|
22
|
+
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';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type Segment<T> = {
|
|
3
3
|
value: T;
|
|
4
4
|
label?: ReactNode;
|
|
5
|
-
containerProps?: ComponentPropsWithoutRef<'label'>;
|
|
6
5
|
};
|
|
7
|
-
export interface SegmentedControlProps<T>
|
|
6
|
+
export interface SegmentedControlProps<T> {
|
|
8
7
|
className?: string;
|
|
9
8
|
/**
|
|
10
9
|
* Размер компонента
|
|
@@ -26,10 +25,6 @@ export interface SegmentedControlProps<T> extends Omit<ComponentPropsWithoutRef<
|
|
|
26
25
|
* Значение по умолчанию
|
|
27
26
|
*/
|
|
28
27
|
defaultValue?: T;
|
|
29
|
-
/**
|
|
30
|
-
* Доступно ли изменение состояния компонента
|
|
31
|
-
*/
|
|
32
|
-
disabled?: boolean;
|
|
33
28
|
/** Режим отображения сегментов
|
|
34
29
|
* * icon - только иконка
|
|
35
30
|
* * text - текстовый лейбл
|
|
@@ -40,3 +35,4 @@ export interface SegmentedControlProps<T> extends Omit<ComponentPropsWithoutRef<
|
|
|
40
35
|
*/
|
|
41
36
|
onChange?: (value: T) => void;
|
|
42
37
|
}
|
|
38
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { SegmentedControl } from './SegmentedControl';
|
|
2
|
-
export {
|
|
2
|
+
export type { SegmentedControlProps } 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
|
};
|