widenarrow-ui 0.1.15 → 0.1.17

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/lib/assets/svg/formatCode.d.ts +6 -0
  2. package/lib/assets/svg/notificationActive.d.ts +6 -0
  3. package/lib/components/Button/Button.d.ts +2 -2
  4. package/lib/components/Button/Button.stories.d.ts +1 -0
  5. package/lib/components/DropDown/DropDown.d.ts +27 -0
  6. package/lib/components/DropDown/DropDown.stories.d.ts +7 -0
  7. package/lib/components/DropDown/index.d.ts +1 -0
  8. package/lib/components/DropDown/useHandleClickOutside.d.ts +6 -0
  9. package/lib/components/DropDownItem/DropDownItem.d.ts +20 -0
  10. package/lib/components/DropDownItem/DropDownItem.stories.d.ts +7 -0
  11. package/lib/components/DropDownItem/index.d.ts +1 -0
  12. package/lib/components/FacetButton/FacetButton.d.ts +17 -0
  13. package/lib/components/FacetButton/FacetButton.stories.d.ts +7 -0
  14. package/lib/components/FacetButton/index.d.ts +1 -0
  15. package/lib/components/FormSkeleton/FormSkeleton.d.ts +10 -0
  16. package/lib/components/FormSkeleton/index.d.ts +1 -0
  17. package/lib/components/IconButton/IconButton.d.ts +2 -2
  18. package/lib/components/MultiActionButton/MultiActionButton.d.ts +23 -0
  19. package/lib/components/MultiActionButton/MultiActionButton.stories.d.ts +7 -0
  20. package/lib/components/MultiActionButton/index.d.ts +1 -0
  21. package/lib/constants.d.ts +2 -0
  22. package/lib/index.d.ts +5 -0
  23. package/lib/index.esm.js +610 -319
  24. package/lib/index.esm.js.map +1 -1
  25. package/lib/index.js +612 -316
  26. package/lib/index.js.map +1 -1
  27. package/lib/utils.d.ts +4 -0
  28. package/package.json +3 -1
  29. package/src/assets/svg/formatCode.tsx +13 -0
  30. package/src/assets/svg/notificationActive.tsx +13 -0
  31. package/src/components/Button/Button.module.scss +4 -61
  32. package/src/components/Button/Button.stories.tsx +7 -0
  33. package/src/components/Button/Button.tsx +7 -7
  34. package/src/components/Checkbox/Checkbox.module.scss +1 -0
  35. package/src/components/DropDown/DropDown.module.scss +170 -0
  36. package/src/components/DropDown/DropDown.stories.tsx +69 -0
  37. package/src/components/DropDown/DropDown.tsx +220 -0
  38. package/src/components/DropDown/index.tsx +1 -0
  39. package/src/components/DropDown/useHandleClickOutside.ts +24 -0
  40. package/src/components/DropDownItem/DropDownItem.module.scss +111 -0
  41. package/src/components/DropDownItem/DropDownItem.stories.tsx +27 -0
  42. package/src/components/DropDownItem/DropDownItem.tsx +166 -0
  43. package/src/components/DropDownItem/index.tsx +1 -0
  44. package/src/components/FacetButton/FacetButton.module.scss +115 -0
  45. package/src/components/FacetButton/FacetButton.stories.tsx +27 -0
  46. package/src/components/FacetButton/FacetButton.tsx +94 -0
  47. package/src/components/FacetButton/index.tsx +1 -0
  48. package/src/components/FormSkeleton/FormSkeleton.module.scss +21 -0
  49. package/src/components/FormSkeleton/FormSkeleton.tsx +28 -0
  50. package/src/components/FormSkeleton/index.tsx +1 -0
  51. package/src/components/Icon/Icon.module.scss +0 -8
  52. package/src/components/Icon/getIconFromConstant.tsx +6 -0
  53. package/src/components/IconButton/IconButton.tsx +5 -3
  54. package/src/components/MultiActionButton/MultiActionButton.module.scss +131 -0
  55. package/src/components/MultiActionButton/MultiActionButton.stories.tsx +27 -0
  56. package/src/components/MultiActionButton/MultiActionButton.tsx +108 -0
  57. package/src/components/MultiActionButton/index.tsx +1 -0
  58. package/src/constants.ts +2 -0
  59. package/src/index.ts +10 -0
  60. package/src/styles/mixins.scss +85 -0
  61. package/src/utils.ts +21 -0
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ interface Props {
3
+ className?: string;
4
+ }
5
+ declare const Icon: FC<Props>;
6
+ export default Icon;
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ interface Props {
3
+ className?: string;
4
+ }
5
+ declare const Icon: FC<Props>;
6
+ export default Icon;
@@ -3,7 +3,7 @@ import { HierarchyTypes, SizeTypes, IconTypes } from 'src/constants';
3
3
  interface Props {
4
4
  text?: string;
5
5
  onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
6
- type?: HierarchyTypes.PRIMARY | HierarchyTypes.SECONDARY;
6
+ type?: `${HierarchyTypes}`;
7
7
  size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
8
8
  icon?: `${IconTypes}`;
9
9
  withIconLeft?: boolean;
@@ -12,7 +12,7 @@ interface Props {
12
12
  toolTip?: string;
13
13
  style?: CSSProperties;
14
14
  withEllipsis?: boolean;
15
- rotateIcon?: boolean;
15
+ rotateIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
16
16
  id?: string | number;
17
17
  loading?: boolean;
18
18
  autoFocus?: boolean;
@@ -5,6 +5,7 @@ export default meta;
5
5
  type Story = StoryObj<typeof Button>;
6
6
  export declare const Primary: Story;
7
7
  export declare const Secondary: Story;
8
+ export declare const Tertiary: Story;
8
9
  export declare const WithIcon: Story;
9
10
  export declare const WithChildren: Story;
10
11
  export declare const LoadingState: Story;
@@ -0,0 +1,27 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { Placement, PositioningStrategy } from '@popperjs/core';
3
+ interface Props {
4
+ children: ReactNode[] | ReactNode;
5
+ buttonComponent: ReactNode;
6
+ buttonCallbackName?: string;
7
+ footerComponent?: ReactNode;
8
+ title?: string;
9
+ className?: string;
10
+ childrenClassName?: string;
11
+ dark?: boolean;
12
+ withArrow?: boolean;
13
+ loading?: boolean;
14
+ childrenIsList?: boolean;
15
+ withVisibleOverflow?: boolean;
16
+ placement?: Placement;
17
+ strategy?: PositioningStrategy;
18
+ offset?: {
19
+ horizontal: number;
20
+ vertical: number;
21
+ };
22
+ arrowPadding?: number;
23
+ onCloseCallback?: () => void;
24
+ onOpenCallback?: () => void;
25
+ }
26
+ declare const DropDown: FC<Props>;
27
+ export default DropDown;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import DropDown from 'src/components/DropDown';
3
+ declare const meta: Meta<typeof DropDown>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof DropDown>;
6
+ export declare const Primary: Story;
7
+ export declare const Secondary: Story;
@@ -0,0 +1 @@
1
+ export { default } from './DropDown';
@@ -0,0 +1,6 @@
1
+ import { RefObject } from 'react';
2
+ type UseHandleClickOutsideReturn = {
3
+ ref: RefObject<HTMLDivElement>;
4
+ };
5
+ export default function useHandleClickOutside(callback: (...args: unknown[]) => void): UseHandleClickOutsideReturn;
6
+ export {};
@@ -0,0 +1,20 @@
1
+ import { FC, MouseEvent } from 'react';
2
+ import { ColorTypes, IconTypes, SizeTypes, HierarchyTypes } from 'src/constants';
3
+ interface Props {
4
+ text: string;
5
+ onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
6
+ size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
7
+ active?: boolean;
8
+ withChevronRight?: boolean;
9
+ disabled?: boolean;
10
+ wrapperElement?: 'div' | 'li';
11
+ className?: string;
12
+ type?: HierarchyTypes.PRIMARY | HierarchyTypes.SECONDARY;
13
+ leftIcon?: `${IconTypes}`;
14
+ rightIcon?: `${IconTypes}`;
15
+ iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
16
+ iconColor: `${ColorTypes}`;
17
+ iconClassName?: string;
18
+ }
19
+ declare const DropDownItem: FC<Props>;
20
+ export default DropDownItem;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import DropDownItem from 'src/components/DropDownItem';
3
+ declare const meta: Meta<typeof DropDownItem>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof DropDownItem>;
6
+ export declare const Primary: Story;
7
+ export declare const Secondary: Story;
@@ -0,0 +1 @@
1
+ export { default } from './DropDownItem';
@@ -0,0 +1,17 @@
1
+ import { FC, MouseEvent, ReactNode } from 'react';
2
+ import { IconTypes } from 'src/constants';
3
+ interface Props {
4
+ text?: string;
5
+ id?: string | number;
6
+ onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
7
+ disabled?: boolean;
8
+ selected?: boolean;
9
+ truncateText?: boolean;
10
+ icon?: `${IconTypes}`;
11
+ children?: ReactNode;
12
+ className?: string;
13
+ toolTip?: string;
14
+ percent: number;
15
+ }
16
+ declare const FacetButton: FC<Props>;
17
+ export default FacetButton;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import FacetButton from 'src/components/FacetButton';
3
+ declare const meta: Meta<typeof FacetButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof FacetButton>;
6
+ export declare const Default: Story;
7
+ export declare const Primary: Story;
@@ -0,0 +1 @@
1
+ export { default } from './FacetButton';
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ interface Props {
3
+ className?: string;
4
+ block: Array<{
5
+ height: number;
6
+ col: number;
7
+ }>;
8
+ }
9
+ declare const FormSkeleton: FC<Props>;
10
+ export default FormSkeleton;
@@ -0,0 +1 @@
1
+ export { default } from './FormSkeleton';
@@ -1,7 +1,6 @@
1
1
  import { MouseEvent } from 'react';
2
- import { SizeTypes } from 'src/constants';
2
+ import { SizeTypes, HierarchyTypes, ColorTypes } from 'src/constants';
3
3
  import { SizeStyleInterface, IconStyleInterface } from 'src/types/styling';
4
- import { HierarchyTypes } from 'src/constants';
5
4
  interface Props extends IconStyleInterface, SizeStyleInterface {
6
5
  className?: string;
7
6
  rotateIcon?: boolean;
@@ -10,6 +9,7 @@ interface Props extends IconStyleInterface, SizeStyleInterface {
10
9
  type?: HierarchyTypes.PRIMARY | HierarchyTypes.SECONDARY;
11
10
  onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
12
11
  iconSize?: `${SizeTypes}`;
12
+ iconColor?: `${ColorTypes}`;
13
13
  href?: string;
14
14
  disabled?: boolean;
15
15
  toolTip?: string;
@@ -0,0 +1,23 @@
1
+ import { FC, MouseEvent } from 'react';
2
+ import { HierarchyTypes, SizeTypes, IconTypes } from 'src/constants';
3
+ interface Props {
4
+ text?: string;
5
+ OnLeftClickCallback: (e: MouseEvent<HTMLButtonElement>) => void;
6
+ onRightClickCallback: (e: MouseEvent<HTMLButtonElement>) => void;
7
+ type?: `${HierarchyTypes}`;
8
+ size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
9
+ iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
10
+ icon?: `${IconTypes}`;
11
+ rotateIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
12
+ disabled?: boolean;
13
+ className?: string;
14
+ iconClassName?: string;
15
+ toolTip?: string;
16
+ id?: string | number;
17
+ loading?: boolean;
18
+ autoFocus?: boolean;
19
+ ariaLabel?: string;
20
+ tabIndex?: number;
21
+ }
22
+ declare const MultiActionButton: FC<Props>;
23
+ export default MultiActionButton;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import MultiActionButton from 'src/components/MultiActionButton';
3
+ declare const meta: Meta<typeof MultiActionButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof MultiActionButton>;
6
+ export declare const Default: Story;
7
+ export declare const Primary: Story;
@@ -0,0 +1 @@
1
+ export { default } from './MultiActionButton';
@@ -86,6 +86,7 @@ export declare enum IconTypes {
86
86
  FORMAT_TEXT_ALIGN_CENTER = "iconFormatTextAlignCenter",
87
87
  FORMAT_TEXT_ALIGN_LEFT = "iconFormatTextAlignLeft",
88
88
  FORMAT_TEXT_ALIGN_RIGHT = "iconFormatTextAlignRight",
89
+ FORMAT_CODE = "iconFormatCode",
89
90
  GRID_MODE = "iconGridMode",
90
91
  HANDLEBAR = "iconHandleBar",
91
92
  HELP = "iconHelp",
@@ -114,6 +115,7 @@ export declare enum IconTypes {
114
115
  NEWSLETTER_OPENED = "iconNewsLetterOpened",
115
116
  NEWSLETTER_SENDER = "iconNewsLetterSender",
116
117
  NOTIFICATION = "iconNotification",
118
+ NOTIFICATION_ACTIVE = "iconNotificationActive",
117
119
  NO_CHANGE = "iconNoChange",
118
120
  NO_DIRECTION = "iconNoDirection",
119
121
  OPEN_IN_NEW = "iconOpenInNew",
package/lib/index.d.ts CHANGED
@@ -7,6 +7,11 @@ export { default as InlineButton } from 'src/components/InlineButton/InlineButto
7
7
  export { default as IconButton } from 'src/components/IconButton/IconButton';
8
8
  export { default as Separator } from 'src/components/Separator/Separator';
9
9
  export { default as Box } from 'src/components/Box/Box';
10
+ export { default as FormSkeleton } from 'src/components/FormSkeleton/FormSkeleton';
11
+ export { default as DropDown } from 'src/components/DropDown/DropDown';
12
+ export { default as DropDownItem } from 'src/components/DropDownItem/DropDownItem';
13
+ export { default as FacetButton } from 'src/components/FacetButton/FacetButton';
14
+ export { default as MultiActionButton } from 'src/components/MultiActionButton/MultiActionButton';
10
15
  export { default as Grid } from 'src/components/Grid/Grid';
11
16
  export { Heading, Label, Paragraph, Span } from 'src/components/Typography/Typography';
12
17
  export { AppColors, ColorTypes, HierarchyTypes, IconTypes, SizeTypes } from 'src/constants';