widenarrow-ui 0.1.16 → 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 (57) hide show
  1. package/lib/assets/svg/formatCode.d.ts +6 -0
  2. package/lib/components/Button/Button.d.ts +2 -2
  3. package/lib/components/Button/Button.stories.d.ts +1 -0
  4. package/lib/components/DropDown/DropDown.d.ts +27 -0
  5. package/lib/components/DropDown/DropDown.stories.d.ts +7 -0
  6. package/lib/components/DropDown/index.d.ts +1 -0
  7. package/lib/components/DropDown/useHandleClickOutside.d.ts +6 -0
  8. package/lib/components/DropDownItem/DropDownItem.d.ts +20 -0
  9. package/lib/components/DropDownItem/DropDownItem.stories.d.ts +7 -0
  10. package/lib/components/DropDownItem/index.d.ts +1 -0
  11. package/lib/components/FacetButton/FacetButton.d.ts +17 -0
  12. package/lib/components/FacetButton/FacetButton.stories.d.ts +7 -0
  13. package/lib/components/FacetButton/index.d.ts +1 -0
  14. package/lib/components/FormSkeleton/FormSkeleton.d.ts +10 -0
  15. package/lib/components/FormSkeleton/index.d.ts +1 -0
  16. package/lib/components/MultiActionButton/MultiActionButton.d.ts +23 -0
  17. package/lib/components/MultiActionButton/MultiActionButton.stories.d.ts +7 -0
  18. package/lib/components/MultiActionButton/index.d.ts +1 -0
  19. package/lib/constants.d.ts +1 -0
  20. package/lib/index.d.ts +5 -0
  21. package/lib/index.esm.js +514 -231
  22. package/lib/index.esm.js.map +1 -1
  23. package/lib/index.js +516 -228
  24. package/lib/index.js.map +1 -1
  25. package/lib/utils.d.ts +4 -0
  26. package/package.json +3 -1
  27. package/src/assets/svg/formatCode.tsx +13 -0
  28. package/src/components/Button/Button.module.scss +4 -61
  29. package/src/components/Button/Button.stories.tsx +7 -0
  30. package/src/components/Button/Button.tsx +7 -7
  31. package/src/components/Checkbox/Checkbox.module.scss +1 -0
  32. package/src/components/DropDown/DropDown.module.scss +170 -0
  33. package/src/components/DropDown/DropDown.stories.tsx +69 -0
  34. package/src/components/DropDown/DropDown.tsx +220 -0
  35. package/src/components/DropDown/index.tsx +1 -0
  36. package/src/components/DropDown/useHandleClickOutside.ts +24 -0
  37. package/src/components/DropDownItem/DropDownItem.module.scss +111 -0
  38. package/src/components/DropDownItem/DropDownItem.stories.tsx +27 -0
  39. package/src/components/DropDownItem/DropDownItem.tsx +166 -0
  40. package/src/components/DropDownItem/index.tsx +1 -0
  41. package/src/components/FacetButton/FacetButton.module.scss +115 -0
  42. package/src/components/FacetButton/FacetButton.stories.tsx +27 -0
  43. package/src/components/FacetButton/FacetButton.tsx +94 -0
  44. package/src/components/FacetButton/index.tsx +1 -0
  45. package/src/components/FormSkeleton/FormSkeleton.module.scss +21 -0
  46. package/src/components/FormSkeleton/FormSkeleton.tsx +28 -0
  47. package/src/components/FormSkeleton/index.tsx +1 -0
  48. package/src/components/Icon/Icon.module.scss +0 -8
  49. package/src/components/Icon/getIconFromConstant.tsx +3 -0
  50. package/src/components/MultiActionButton/MultiActionButton.module.scss +131 -0
  51. package/src/components/MultiActionButton/MultiActionButton.stories.tsx +27 -0
  52. package/src/components/MultiActionButton/MultiActionButton.tsx +108 -0
  53. package/src/components/MultiActionButton/index.tsx +1 -0
  54. package/src/constants.ts +1 -0
  55. package/src/index.ts +10 -0
  56. package/src/styles/mixins.scss +85 -0
  57. 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;
@@ -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';
@@ -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",
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';