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.
Files changed (47) hide show
  1. package/dist/components/Alert/Alert.d.ts +9 -0
  2. package/dist/components/Alert/Alert.type.d.ts +25 -0
  3. package/dist/components/Alert/assets/index.d.ts +1 -0
  4. package/dist/components/Alert/assets/react-svg-icons.d.ts +6 -0
  5. package/dist/components/Alert/index.d.ts +2 -0
  6. package/dist/components/Alert/lib/constants.d.ts +7 -0
  7. package/dist/components/Alert/lib/index.d.ts +1 -0
  8. package/dist/components/Button/Button.d.ts +4 -11
  9. package/dist/components/Button/Button.type.d.ts +184 -54
  10. package/dist/components/Button/assets/ArrowLeftIcon.d.ts +6 -0
  11. package/dist/components/Button/assets/CrossIcon.d.ts +2 -2
  12. package/dist/components/Button/assets/index.d.ts +1 -0
  13. package/dist/components/Button/assets/types.d.ts +2 -5
  14. package/dist/components/Button/lib/get-button-typography.d.ts +5 -0
  15. package/dist/components/Button/lib/get-button-typography.test.d.ts +1 -0
  16. package/dist/components/Button/lib/get-loader-variant.d.ts +7 -0
  17. package/dist/components/Button/lib/get-loader-variant.test.d.ts +1 -0
  18. package/dist/components/Button/lib/get-typography.d.ts +3 -3
  19. package/dist/components/Button/preview/index.d.ts +1 -0
  20. package/dist/components/Dialog/Dialog.d.ts +8 -0
  21. package/dist/components/Dialog/Dialog.type.d.ts +29 -0
  22. package/dist/components/Dialog/index.d.ts +2 -0
  23. package/dist/components/Dialog/lib/index.d.ts +1 -0
  24. package/dist/components/Dialog/lib/use-dialog.d.ts +43 -0
  25. package/dist/components/Dialog/lib/use-dialog.test.d.ts +1 -0
  26. package/dist/components/Loader/Loader.d.ts +1 -1
  27. package/dist/components/Modal/Modal.d.ts +7 -0
  28. package/dist/components/Modal/Modal.type.d.ts +34 -0
  29. package/dist/components/Modal/index.d.ts +2 -0
  30. package/dist/components/Placeholder/Placeholder.d.ts +14 -0
  31. package/dist/components/Placeholder/Placeholder.type.d.ts +20 -0
  32. package/dist/components/Placeholder/index.d.ts +2 -0
  33. package/dist/components/Placeholder/lib/get-typography-classes-from-placeholder-size.d.ts +13 -0
  34. package/dist/components/Placeholder/lib/get-typography-classes-from-placeholder-size.test.d.ts +1 -0
  35. package/dist/components/Placeholder/lib/index.d.ts +1 -0
  36. package/dist/components/SegmentedControl/SegmentedControl.type.d.ts +8 -4
  37. package/dist/components/SegmentedControl/index.d.ts +1 -1
  38. package/dist/components/Tooltip/Tooltip.type.d.ts +4 -1
  39. package/dist/components/Tooltip/utils/index.d.ts +1 -0
  40. package/dist/components/Tooltip/utils/merge-tooltip-button-props.d.ts +2 -0
  41. package/dist/components/Tooltip/utils/merge-tooltip-button-props.test.d.ts +1 -0
  42. package/dist/components/Typography/Typography.d.ts +2 -2
  43. package/dist/index.cjs.js +11 -11
  44. package/dist/index.css +1 -1
  45. package/dist/index.d.ts +3 -0
  46. package/dist/index.es.js +2591 -2025
  47. 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,2 @@
1
+ export { Placeholder } from './Placeholder';
2
+ export type { PlaceholderProps, PlaceholderSize } from './Placeholder.type';
@@ -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 };
@@ -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 { SegmentedControlProps } from './SegmentedControl.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
- export type TooltipButtonConfig = ButtonAsNativeButtonProps & {
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,2 @@
1
+ import { TooltipButtonConfig } from '../Tooltip.type';
2
+ export declare const mergeTooltipButtonProps: <T extends TooltipButtonConfig>(specific: T, defaults: TooltipButtonConfig, common?: Partial<TooltipButtonConfig>) => T;
@@ -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<HTMLSpanElement | HTMLDivElement | HTMLLabelElement | HTMLParagraphElement | null>>;
20
- Paragraph: React.ForwardRefExoticComponent<TypographyTextProps & React.RefAttributes<HTMLSpanElement | HTMLDivElement | HTMLLabelElement | HTMLParagraphElement | null>>;
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
  };