widenarrow-ui 1.0.46 → 1.0.48

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 (62) hide show
  1. package/lib/components/Box/Box.stories.d.ts +1 -1
  2. package/lib/components/Button/Button.stories.d.ts +1 -1
  3. package/lib/components/Button/Button.types.d.ts +1 -1
  4. package/lib/components/Card/Card.stories.d.ts +1 -1
  5. package/lib/components/Checkbox/Checkbox.stories.d.ts +1 -1
  6. package/lib/components/DropDown/DropDown.stories.d.ts +1 -1
  7. package/lib/components/DropDown/useHandleClickOutside.d.ts +1 -1
  8. package/lib/components/DropDownItem/DropDownItem.stories.d.ts +1 -1
  9. package/lib/components/DropDownItem/DropDownItem.types.d.ts +1 -1
  10. package/lib/components/FacetButton/FacetButton.stories.d.ts +1 -1
  11. package/lib/components/Grid/Grid.stories.d.ts +1 -1
  12. package/lib/components/Icon/Icon.stories.d.ts +1 -1
  13. package/lib/components/IconButton/IconButton.stories.d.ts +1 -1
  14. package/lib/components/Image/Image.stories.d.ts +1 -1
  15. package/lib/components/InlineButton/InlineButton.stories.d.ts +1 -1
  16. package/lib/components/Input/Input.stories.d.ts +1 -1
  17. package/lib/components/ListItem/ListItem.stories.d.ts +1 -1
  18. package/lib/components/ListSkeleton/ListSkeleton.stories.d.ts +1 -1
  19. package/lib/components/MultiActionButton/MultiActionButton.stories.d.ts +1 -1
  20. package/lib/components/Pagination/Pagination.d.ts +4 -0
  21. package/lib/components/Pagination/Pagination.stories.d.ts +7 -0
  22. package/lib/components/Pagination/Pagination.types.d.ts +21 -0
  23. package/lib/components/Pagination/index.d.ts +1 -0
  24. package/lib/components/RadioButton/RadioButton.stories.d.ts +1 -1
  25. package/lib/components/SelectInput/SelectInput.stories.d.ts +1 -1
  26. package/lib/components/Separator/Separator.stories.d.ts +1 -1
  27. package/lib/components/SolidSpinner/SolidSpinner.stories.d.ts +1 -1
  28. package/lib/components/SortableTable/SortableTable.stories.d.ts +1 -1
  29. package/lib/components/SwitchButton/SwitchButton.stories.d.ts +1 -1
  30. package/lib/components/TextAreaInput/TextAreaInput.stories.d.ts +1 -1
  31. package/lib/components/Typography/Heading.stories.d.ts +1 -1
  32. package/lib/components/Typography/Label.stories.d.ts +1 -1
  33. package/lib/components/Typography/Paragraph.stories.d.ts +1 -1
  34. package/lib/components/Typography/Span.stories.d.ts +1 -1
  35. package/lib/components/index.d.ts +1 -0
  36. package/lib/constants.d.ts +6 -6
  37. package/lib/index.css +1 -1
  38. package/lib/index.d.ts +100 -61
  39. package/lib/index.esm.css +1 -1
  40. package/lib/index.esm.js +560 -445
  41. package/lib/index.esm.js.map +1 -1
  42. package/lib/index.js +559 -443
  43. package/lib/index.js.map +1 -1
  44. package/lib/types/common.types.d.ts +15 -0
  45. package/lib/types/styling.types.d.ts +4 -1
  46. package/lib/utils.d.ts +13 -3
  47. package/package.json +5 -5
  48. package/src/components/Button/Button.tsx +1 -1
  49. package/src/components/Button/Button.types.ts +1 -1
  50. package/src/components/Card/Card.stories.tsx +3 -3
  51. package/src/components/DropDown/DropDown.tsx +22 -10
  52. package/src/components/DropDownItem/DropDownItem.types.ts +1 -1
  53. package/src/components/Pagination/Pagination.module.scss +97 -0
  54. package/src/components/Pagination/Pagination.stories.tsx +50 -0
  55. package/src/components/Pagination/Pagination.tsx +209 -0
  56. package/src/components/Pagination/Pagination.types.ts +16 -0
  57. package/src/components/Pagination/index.ts +1 -0
  58. package/src/components/SortableTable/SortableTable.tsx +5 -1
  59. package/src/components/index.ts +1 -0
  60. package/src/types/common.types.ts +15 -0
  61. package/src/types/styling.types.ts +5 -1
  62. package/src/utils.ts +75 -16
@@ -2,6 +2,6 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Box } from 'src/components/Box';
3
3
  declare const meta: Meta<typeof Box>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Box>;
5
+ type Story = StoryObj<typeof Box>;
6
6
  export declare const Primary: Story;
7
7
  export declare const Secondary: Story;
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Button } from 'src/components/Button';
3
3
  declare const meta: Meta<typeof Button>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Button>;
5
+ type Story = StoryObj<typeof Button>;
6
6
  export declare const Primary: Story;
7
7
  export declare const Secondary: Story;
8
8
  export declare const Tertiary: Story;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, MouseEvent, ReactNode } from 'react';
2
- import { HierarchyTypes, IconTypes, SizeTypes } from 'src/constants';
2
+ import { HierarchyTypes, IconTypes, SizeTypes } from '../../constants';
3
3
  export interface ButtonProps {
4
4
  text?: string;
5
5
  onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
@@ -2,5 +2,5 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Card } from 'src/components/Card';
3
3
  declare const meta: Meta<typeof Card>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Card>;
5
+ type Story = StoryObj<typeof Card>;
6
6
  export declare const Default: Story;
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Checkbox } from 'src/components/Checkbox';
3
3
  declare const meta: Meta<typeof Checkbox>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Checkbox>;
5
+ type Story = StoryObj<typeof Checkbox>;
6
6
  export declare const Checked: Story;
7
7
  export declare const WithEllipsis: Story;
8
8
  export declare const Indeterminate: Story;
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { DropDown } from 'src/components/DropDown';
3
3
  declare const meta: Meta<typeof DropDown>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof DropDown>;
5
+ type Story = StoryObj<typeof DropDown>;
6
6
  export declare const Default: Story;
7
7
  export declare const WithActiveSelect: Story;
8
8
  export declare const Complex: Story;
@@ -1,5 +1,5 @@
1
1
  import { RefObject } from 'react';
2
- declare type UseHandleClickOutsideReturn = {
2
+ type UseHandleClickOutsideReturn = {
3
3
  ref: RefObject<HTMLDivElement>;
4
4
  };
5
5
  export default function useHandleClickOutside(callback: (...args: unknown[]) => void): UseHandleClickOutsideReturn;
@@ -2,5 +2,5 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { DropDownItem } from 'src/components/DropDownItem';
3
3
  declare const meta: Meta<typeof DropDownItem>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof DropDownItem>;
5
+ type Story = StoryObj<typeof DropDownItem>;
6
6
  export declare const Primary: Story;
@@ -1,5 +1,5 @@
1
1
  import { MouseEvent, ReactNode } from 'react';
2
- import { ColorTypes, HierarchyTypes, IconTypes, SizeTypes } from 'src/constants';
2
+ import { ColorTypes, HierarchyTypes, IconTypes, SizeTypes } from '../../constants';
3
3
  export interface DropDownItemProps {
4
4
  text?: string;
5
5
  onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
@@ -2,6 +2,6 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { FacetButton } from 'src/components/FacetButton';
3
3
  declare const meta: Meta<typeof FacetButton>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof FacetButton>;
5
+ type Story = StoryObj<typeof FacetButton>;
6
6
  export declare const Default: Story;
7
7
  export declare const Primary: Story;
@@ -2,5 +2,5 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { Grid } from 'src/components/Grid';
3
3
  declare const meta: Meta<typeof Grid>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Grid>;
5
+ type Story = StoryObj<typeof Grid>;
6
6
  export declare const CustomGrid: Story;
@@ -2,6 +2,6 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Icon } from 'src/components/Icon';
3
3
  declare const meta: Meta<typeof Icon>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Icon>;
5
+ type Story = StoryObj<typeof Icon>;
6
6
  export declare const Default: Story;
7
7
  export declare const Primary: Story;
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { IconButton } from 'src/components/IconButton';
3
3
  declare const meta: Meta<typeof IconButton>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof IconButton>;
5
+ type Story = StoryObj<typeof IconButton>;
6
6
  export declare const Default: Story;
7
7
  export declare const Primary: Story;
8
8
  export declare const Secondary: Story;
@@ -2,5 +2,5 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Image } from 'src/components/Image';
3
3
  declare const meta: Meta<typeof Image>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Image>;
5
+ type Story = StoryObj<typeof Image>;
6
6
  export declare const Default: Story;
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { InlineButton } from 'src/components/InlineButton';
3
3
  declare const meta: Meta<typeof InlineButton>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof InlineButton>;
5
+ type Story = StoryObj<typeof InlineButton>;
6
6
  export declare const Default: Story;
7
7
  export declare const Primary: Story;
8
8
  export declare const Secondary: Story;
@@ -2,5 +2,5 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Input } from 'src/components/Input';
3
3
  declare const meta: Meta<typeof Input>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Input>;
5
+ type Story = StoryObj<typeof Input>;
6
6
  export declare const Default: Story;
@@ -2,6 +2,6 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { ListItem } from 'src/components/ListItem';
3
3
  declare const meta: Meta<typeof ListItem>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof ListItem>;
5
+ type Story = StoryObj<typeof ListItem>;
6
6
  export declare const Default: Story;
7
7
  export declare const Primary: Story;
@@ -2,6 +2,6 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { ListSkeleton } from 'src/components/ListSkeleton';
3
3
  declare const meta: Meta<typeof ListSkeleton>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof ListSkeleton>;
5
+ type Story = StoryObj<typeof ListSkeleton>;
6
6
  export declare const Default: Story;
7
7
  export declare const Primary: Story;
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { MultiActionButton } from 'src/components/MultiActionButton';
3
3
  declare const meta: Meta<typeof MultiActionButton>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof MultiActionButton>;
5
+ type Story = StoryObj<typeof MultiActionButton>;
6
6
  export declare const Default: Story;
7
7
  export declare const Primary: Story;
8
8
  export declare const WithEllipsis: Story;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { PaginationProps } from './Pagination.types';
3
+ declare const Pagination: FC<PaginationProps>;
4
+ export { Pagination };
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Pagination } from 'src/components/Pagination';
3
+ declare const meta: Meta<typeof Pagination>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Pagination>;
6
+ export declare const Default: Story;
7
+ export declare const Primary: Story;
@@ -0,0 +1,21 @@
1
+ import { HierarchyTypes } from 'src/constants';
2
+ import { SearchResultInterface } from '../../types/common.types';
3
+ export interface PaginationProps {
4
+ pagination: SearchResultInterface;
5
+ onPaginate: (page: number) => void;
6
+ onPageSizeChange?: (pageSize: number) => void;
7
+ slim?: boolean;
8
+ tablePagination?: boolean;
9
+ buttonType?: HierarchyTypes.PRIMARY | HierarchyTypes.SECONDARY;
10
+ className?: string;
11
+ nextPageTitle?: string;
12
+ previousPageTitle?: string;
13
+ pageSizeTitleCallback?: (args: {
14
+ pageSize: number;
15
+ }) => string;
16
+ tableIntervalTitleCallback?: (args: {
17
+ start: number;
18
+ end: number;
19
+ total: number;
20
+ }) => string;
21
+ }
@@ -0,0 +1 @@
1
+ export * from './Pagination';
@@ -2,5 +2,5 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { RadioButton } from 'src/components/RadioButton';
3
3
  declare const meta: Meta<typeof RadioButton>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof RadioButton>;
5
+ type Story = StoryObj<typeof RadioButton>;
6
6
  export declare const Default: Story;
@@ -2,5 +2,5 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { SelectInput } from 'src/components/SelectInput';
3
3
  declare const meta: Meta<typeof SelectInput>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof SelectInput>;
5
+ type Story = StoryObj<typeof SelectInput>;
6
6
  export declare const Default: Story;
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Separator } from 'src/components/Separator';
3
3
  declare const meta: Meta<typeof Separator>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Separator>;
5
+ type Story = StoryObj<typeof Separator>;
6
6
  export declare const Auto: Story;
7
7
  export declare const SizeSmall: Story;
8
8
  export declare const SizeMedium: Story;
@@ -2,5 +2,5 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { SolidSpinner } from 'src/components/SolidSpinner';
3
3
  declare const meta: Meta<typeof SolidSpinner>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof SolidSpinner>;
5
+ type Story = StoryObj<typeof SolidSpinner>;
6
6
  export declare const Primary: Story;
@@ -2,6 +2,6 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { SortableTable } from 'src/components/SortableTable';
3
3
  declare const meta: Meta<typeof SortableTable>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof SortableTable>;
5
+ type Story = StoryObj<typeof SortableTable>;
6
6
  export declare const Default: Story;
7
7
  export declare const Custom: Story;
@@ -2,5 +2,5 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { SwitchButton } from 'src/components/SwitchButton';
3
3
  declare const meta: Meta<typeof SwitchButton>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof SwitchButton>;
5
+ type Story = StoryObj<typeof SwitchButton>;
6
6
  export declare const Default: Story;
@@ -2,5 +2,5 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { TextAreaInput } from 'src/components/TextAreaInput';
3
3
  declare const meta: Meta<typeof TextAreaInput>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof TextAreaInput>;
5
+ type Story = StoryObj<typeof TextAreaInput>;
6
6
  export declare const Default: Story;
@@ -2,6 +2,6 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Heading } from 'src/components/Typography/Typography';
3
3
  declare const meta: Meta<typeof Heading>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Heading>;
5
+ type Story = StoryObj<typeof Heading>;
6
6
  export declare const H1: Story;
7
7
  export declare const H2: Story;
@@ -2,5 +2,5 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Label } from './Typography';
3
3
  declare const meta: Meta<typeof Label>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Label>;
5
+ type Story = StoryObj<typeof Label>;
6
6
  export declare const Default: Story;
@@ -2,5 +2,5 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Paragraph } from './Typography';
3
3
  declare const meta: Meta<typeof Paragraph>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Paragraph>;
5
+ type Story = StoryObj<typeof Paragraph>;
6
6
  export declare const Default: Story;
@@ -2,5 +2,5 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Span } from './Typography';
3
3
  declare const meta: Meta<typeof Span>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Span>;
5
+ type Story = StoryObj<typeof Span>;
6
6
  export declare const Default: Story;
@@ -6,6 +6,7 @@ export * from './RadioButton';
6
6
  export * from './DropDown';
7
7
  export * from './DropDownItem';
8
8
  export * from './FacetButton';
9
+ export * from './Pagination';
9
10
  export * from './FormSkeleton';
10
11
  export * from './Grid';
11
12
  export * from './Icon';
@@ -196,12 +196,12 @@ export declare enum HierarchyTypes {
196
196
  QUATERNARY = "quaternary"
197
197
  }
198
198
  export declare enum AspectRatioTypes {
199
- ar4_1 = "ar4_1",
200
- ar3_1 = "ar3_1",
201
- ar21_9 = "ar21_9",
202
- ar16_9 = "ar16_9",
203
- ar21_13 = "ar21_13",
204
- ar4_3 = "ar4_3",
199
+ ar4_1 = "ar4_1",// 25 %
200
+ ar3_1 = "ar3_1",// 33 %
201
+ ar21_9 = "ar21_9",// 42.85 %
202
+ ar16_9 = "ar16_9",// 56.25 %
203
+ ar21_13 = "ar21_13",// '61.9%' "The golden ratio"
204
+ ar4_3 = "ar4_3",// 75%
205
205
  ar1_1 = "ar1_1"
206
206
  }
207
207
  export declare enum ColorTypes {