@meduza/ui-kit-2 0.2.37 → 0.3.0

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 (61) hide show
  1. package/dist/Button/Button.d.ts +3 -0
  2. package/dist/Button/Button.types.d.ts +2 -0
  3. package/dist/Button/ButtonLoader.d.ts +2 -0
  4. package/dist/Button/index.d.ts +2 -3
  5. package/dist/SvgSymbol/SvgSymbol.types.d.ts +1 -1
  6. package/dist/SvgSymbol/icons.d.ts +5 -0
  7. package/dist/Toolbar/Toolbar.d.ts +3 -0
  8. package/dist/Toolbar/Toolbar.types.d.ts +3 -0
  9. package/dist/Toolbar/ToolbarItem.d.ts +3 -0
  10. package/dist/Toolbar/index.d.ts +2 -3
  11. package/dist/ToolbarButton/ToolbarButton.types.d.ts +4 -5
  12. package/dist/Tooltip/Tooltip.d.ts +3 -0
  13. package/dist/Tooltip/Tooltip.stories.d.ts +10 -0
  14. package/dist/Tooltip/Tooltip.types.d.ts +8 -0
  15. package/dist/Tooltip/TooltipFooter.d.ts +3 -0
  16. package/dist/Tooltip/index.d.ts +2 -0
  17. package/dist/constants.d.ts +2 -0
  18. package/dist/index.d.ts +1 -0
  19. package/dist/ui-kit-2.cjs.development.js +203 -162
  20. package/dist/ui-kit-2.cjs.development.js.map +1 -1
  21. package/dist/ui-kit-2.cjs.production.min.js +1 -1
  22. package/dist/ui-kit-2.cjs.production.min.js.map +1 -1
  23. package/dist/ui-kit-2.esm.js +200 -163
  24. package/dist/ui-kit-2.esm.js.map +1 -1
  25. package/dist/ui-kit.css +3390 -3305
  26. package/dist/utils/capitalizeFirstLetter.d.ts +1 -0
  27. package/package.json +1 -1
  28. package/src/BookmarkButton/BookmarkButton.css +0 -4
  29. package/src/BookmarkButton/BookmarkButton.module.css +0 -4
  30. package/src/Button/Button.module.css +13 -0
  31. package/src/Button/Button.stories.tsx +15 -1
  32. package/src/Button/Button.tsx +50 -0
  33. package/src/Button/Button.types.ts +3 -0
  34. package/src/Button/{loader.tsx → ButtonLoader.tsx} +1 -3
  35. package/src/Button/index.tsx +2 -48
  36. package/src/EmbedBlock/EmbedBlock.test.tsx +2 -6
  37. package/src/SvgSymbol/SvgSymbol.module.css +4 -0
  38. package/src/SvgSymbol/SvgSymbol.stories.tsx +1 -1
  39. package/src/SvgSymbol/SvgSymbol.types.ts +1 -0
  40. package/src/SvgSymbol/icons.ts +6 -0
  41. package/src/Toolbar/Toolbar.module.css +0 -5
  42. package/src/Toolbar/Toolbar.stories.tsx +17 -16
  43. package/src/Toolbar/Toolbar.tsx +20 -0
  44. package/src/Toolbar/Toolbar.types.ts +4 -0
  45. package/src/Toolbar/ToolbarItem.tsx +8 -0
  46. package/src/Toolbar/index.tsx +2 -20
  47. package/src/ToolbarButton/ToolbarButton.module.css +0 -14
  48. package/src/ToolbarButton/ToolbarButton.types.ts +4 -5
  49. package/src/ToolbarButton/index.tsx +14 -23
  50. package/src/Tooltip/Tooltip.module.css +91 -0
  51. package/src/Tooltip/Tooltip.stories.module.css +7 -0
  52. package/src/Tooltip/Tooltip.stories.tsx +69 -0
  53. package/src/Tooltip/Tooltip.test.tsx +16 -0
  54. package/src/Tooltip/Tooltip.tsx +24 -0
  55. package/src/Tooltip/Tooltip.types.ts +8 -0
  56. package/src/Tooltip/TooltipFooter.tsx +7 -0
  57. package/src/Tooltip/index.tsx +2 -0
  58. package/src/constants.ts +2 -0
  59. package/src/index.tsx +1 -0
  60. package/src/utils/capitalizeFirstLetter.ts +2 -0
  61. package/dist/Button/loader.d.ts +0 -3
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { ButtonProps } from './Button.types';
3
+ export declare const Button: FC<ButtonProps>;
@@ -3,8 +3,10 @@ export declare type ButtonThemes = 'sand' | 'gold' | 'light' | 'gray' | 'ghost'
3
3
  export declare type ButtonStates = 'isLoading' | 'isDefault';
4
4
  export declare type ButtonSizes = 'auto' | 'default';
5
5
  export declare type ButtonStyleContexts = 'isInToolbar' | 'isInSpoiler' | 'isInDropdown';
6
+ export declare type ButtonAppearance = 'isFancy' | 'isClassic';
6
7
  export interface ButtonProps {
7
8
  theme?: ButtonThemes;
9
+ appearance?: ButtonAppearance;
8
10
  size?: ButtonSizes;
9
11
  state?: ButtonStates;
10
12
  styleContext?: ButtonStyleContexts;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const ButtonLoader: React.FC;
@@ -1,3 +1,2 @@
1
- import { FC } from 'react';
2
- import { ButtonProps } from './Button.types';
3
- export declare const Button: FC<ButtonProps>;
1
+ export { Button } from './Button';
2
+ export { ButtonLoader } from './ButtonLoader';
@@ -1,5 +1,5 @@
1
1
  export declare type SvgSymbolStyleContexts = 'isInFeature' | 'isInCard' | 'isInTopicBlockItem' | 'isInPageStatic' | 'isInMaterialMeta' | 'isInToolbar' | 'isInEpisodeBlock' | 'isInAudioPlayer' | 'isInAudioPanel' | 'isInPlaylist' | 'PodcastMaterial' | 'isInHeader' | 'isInProfile' | 'isInBookmark';
2
- export declare type Icons = 'meduzaLogo' | 'meduzaSymbol' | 'menu' | 'fb' | 'tw' | 'vk' | 'ok' | 'tg' | 'chat' | 'backward' | 'forward' | 'download' | 'play' | 'pause' | 'shareBookmark' | 'speedHalf' | 'speedOne' | 'speedOneHalf' | 'speedTwo' | 'podcastBookmark' | 'reaction' | 'cross' | 'link' | 'search' | 'card' | 'podcast' | 'arrow' | 'brent' | 'user' | 'bookmark' | 'receipt' | 'read' | 'listened';
2
+ export declare type Icons = 'meduzaLogo' | 'meduzaSymbol' | 'menu' | 'fb' | 'tw' | 'vk' | 'ok' | 'tg' | 'chat' | 'magic' | 'backward' | 'forward' | 'download' | 'play' | 'pause' | 'shareBookmark' | 'speedHalf' | 'speedOne' | 'speedOneHalf' | 'speedTwo' | 'podcastBookmark' | 'reaction' | 'cross' | 'link' | 'search' | 'card' | 'podcast' | 'arrow' | 'brent' | 'user' | 'bookmark' | 'receipt' | 'read' | 'listened';
3
3
  export declare type Sizes = 'small' | 'normal' | 'medium' | 'large' | 'unset';
4
4
  export interface SvgSymbolProps {
5
5
  styleContext?: SvgSymbolStyleContexts;
@@ -159,4 +159,9 @@ export declare const icons: {
159
159
  height: number;
160
160
  content: string;
161
161
  };
162
+ magic: {
163
+ width: number;
164
+ height: number;
165
+ content: string;
166
+ };
162
167
  };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { ToolbarProps } from './Toolbar.types';
3
+ export declare const Toolbar: React.FC<ToolbarProps>;
@@ -3,3 +3,6 @@ export interface ToolbarProps {
3
3
  styleContext?: string | string[];
4
4
  children: JSX.Element[] | JSX.Element;
5
5
  }
6
+ export interface ToolbarItemProps {
7
+ children: JSX.Element[] | JSX.Element;
8
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { ToolbarItemProps } from './Toolbar.types';
3
+ export declare const ToolbarItem: React.FC<ToolbarItemProps>;
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
- import { ToolbarProps } from './Toolbar.types';
3
- export declare const Toolbar: React.FC<ToolbarProps>;
1
+ export { ToolbarItem } from './ToolbarItem';
2
+ export { Toolbar } from './Toolbar';
@@ -1,11 +1,10 @@
1
- import React from 'react';
2
- export declare type ToolbarButtonTypes = 'vk' | 'fb' | 'tw' | 'tg' | 'ok' | 'reaction' | 'pdf' | 'bookmark' | 'cross';
1
+ export declare type ToolbarButtonTypes = 'vk' | 'fb' | 'tw' | 'tg' | 'ok' | 'reaction' | 'pdf' | 'bookmark' | 'unblock' | 'cross';
3
2
  export interface ToolbarButtonProps {
4
3
  type: ToolbarButtonTypes;
5
4
  theme?: string;
6
- lang: 'ru' | 'en';
5
+ lang?: 'ru' | 'en';
6
+ text?: string;
7
7
  icon?: 'shareBookmark';
8
8
  isActive?: boolean;
9
- onClick: (type: string) => void;
10
- children?: React.ReactNode | JSX.Element[] | JSX.Element;
9
+ onClick: (event: any, type: string) => void;
11
10
  }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { TooltipProps } from './Tooltip.types';
3
+ export declare const Tooltip: React.FC<TooltipProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./Tooltip.types").TooltipProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export interface TooltipProps {
3
+ children: React.ReactNode;
4
+ position: ['left' | 'center', 'top' | 'bottom'];
5
+ }
6
+ export interface TooltipFooterProps {
7
+ children: React.ReactNode;
8
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { TooltipFooterProps } from './Tooltip.types';
3
+ export declare const TooltipFooter: React.FC<TooltipFooterProps>;
@@ -0,0 +1,2 @@
1
+ export { Tooltip } from './Tooltip';
2
+ export { TooltipFooter } from './TooltipFooter';
@@ -26,6 +26,7 @@ export declare const SocialLabels: {
26
26
  fb: string;
27
27
  tw: string;
28
28
  pdf: string;
29
+ unblock: string;
29
30
  bookmark: string;
30
31
  reaction: string;
31
32
  };
@@ -34,6 +35,7 @@ export declare const SocialLabels: {
34
35
  fb: string;
35
36
  tw: string;
36
37
  pdf: string;
38
+ unblock: string;
37
39
  bookmark: string;
38
40
  };
39
41
  };
package/dist/index.d.ts CHANGED
@@ -42,3 +42,4 @@ export * from './SensitiveBlock';
42
42
  export * from './DonatesTeaser';
43
43
  export * from './ShopRelatedBlock';
44
44
  export * from './AnnouncementInText';
45
+ export * from './Tooltip';