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.
Files changed (46) 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 +35 -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 +23 -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/Tabs/Tabs.type.d.ts +1 -1
  37. package/dist/components/Tooltip/Tooltip.type.d.ts +4 -1
  38. package/dist/components/Tooltip/utils/index.d.ts +1 -0
  39. package/dist/components/Tooltip/utils/merge-tooltip-button-props.d.ts +2 -0
  40. package/dist/components/Tooltip/utils/merge-tooltip-button-props.test.d.ts +1 -0
  41. package/dist/components/Typography/Typography.d.ts +2 -2
  42. package/dist/index.cjs.js +11 -11
  43. package/dist/index.css +1 -1
  44. package/dist/index.d.ts +3 -0
  45. package/dist/index.es.js +2668 -2119
  46. 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,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,5 +1,5 @@
1
1
  import { ReactNode, HTMLAttributes } from 'react';
2
- import { Nullable } from '../../../../../../src/types';
2
+ import { Nullable } from '../../types';
3
3
  import { BadgeProps } from '../Badge';
4
4
  /**
5
5
  * Tabs визуальный режим табов
@@ -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
  };