@omniumretail/component-library 1.2.69 → 1.2.71

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 (184) hide show
  1. package/dist/component-library.umd.js +1154 -0
  2. package/dist/components/AnalyticsBar/AnalyticsBar.stories.d.ts +5 -0
  3. package/dist/{types/components → components}/AnalyticsBar/helpers/codeMutation.d.ts +2 -2
  4. package/dist/{types/components → components}/AnalyticsBar/index.d.ts +2 -1
  5. package/dist/components/BellNotifications/BellNotifications.stories.d.ts +5 -0
  6. package/dist/components/Button/Button.stories.d.ts +6 -0
  7. package/dist/{types/components → components}/Button/index.d.ts +2 -1
  8. package/dist/components/Category/Category.stories.d.ts +3 -0
  9. package/dist/{types/components → components}/Category/index.d.ts +2 -1
  10. package/dist/components/CategoryReadOnly/CategoryReadOnly.stories.d.ts +3 -0
  11. package/dist/{types/components → components}/CategoryReadOnly/index.d.ts +2 -1
  12. package/dist/components/CategoryResponse/CategoryResponse.stories.d.ts +3 -0
  13. package/dist/{types/components → components}/CategoryResponse/index.d.ts +3 -2
  14. package/dist/components/DatePicker/DatePicker.stories.d.ts +5 -0
  15. package/dist/{types/components → components}/DatePicker/index.d.ts +2 -1
  16. package/dist/components/DatePickerTag/DatePickerTag.stories.d.ts +5 -0
  17. package/dist/{types/components → components}/DatePickerTag/index.d.ts +2 -1
  18. package/dist/components/DropdownButton/DropdownButton.stories.d.ts +5 -0
  19. package/dist/{types/components → components}/DropdownButton/index.d.ts +3 -2
  20. package/dist/components/ExportTableData/ExportTableData.stories.d.ts +3 -0
  21. package/dist/components/Footer/Footer.stories.d.ts +5 -0
  22. package/dist/components/Footer2/Footer.stories.d.ts +6 -0
  23. package/dist/{types/components → components}/Footer2/index.d.ts +2 -1
  24. package/dist/{types/components → components}/Header/Header.data.d.ts +2 -1
  25. package/dist/components/Header/Header.stories.d.ts +5 -0
  26. package/dist/{types/components → components}/Header/Header.types.d.ts +2 -1
  27. package/dist/{types/components → components}/Header/index.d.ts +2 -1
  28. package/dist/components/Input/Input.stories.d.ts +5 -0
  29. package/dist/{types/components → components}/Input/index.d.ts +2 -1
  30. package/dist/{types/components → components}/InputCountryCode/index.d.ts +2 -1
  31. package/dist/components/InputCountryCode/inputCountryCode.stories.d.ts +5 -0
  32. package/dist/components/Label/Label.stories.d.ts +6 -0
  33. package/dist/components/Link/Link.stories.d.ts +7 -0
  34. package/dist/{types/components → components}/Link/index.d.ts +2 -1
  35. package/dist/components/Menu/Menu.stories.d.ts +5 -0
  36. package/dist/{types/components → components}/Menu/helpers/codeMutation.d.ts +2 -2
  37. package/dist/{types/components → components}/Menu/index.d.ts +2 -1
  38. package/dist/components/MobileTable/MobileTable.stories.d.ts +5 -0
  39. package/dist/{types/components → components}/MobileTable/index.d.ts +2 -1
  40. package/dist/components/ModalConfirmation/ModalConfirmation.stories.d.ts +5 -0
  41. package/dist/components/ModalWithTable/ModalWithTable.stories.d.ts +5 -0
  42. package/dist/{types/components → components}/ModalWithTable/index.d.ts +2 -1
  43. package/dist/components/Navigation/Navigation.stories.d.ts +5 -0
  44. package/dist/components/Notification/Notification.stories.d.ts +5 -0
  45. package/dist/{types/components → components}/Notification/index.d.ts +2 -1
  46. package/dist/components/Questions/Questions.stories.d.ts +3 -0
  47. package/dist/components/Radio/Radio.stories.d.ts +5 -0
  48. package/dist/{types/components → components}/Radio/index.d.ts +3 -2
  49. package/dist/components/ResponseType/ResponseType.stories.d.ts +3 -0
  50. package/dist/components/ResponsiveTable/ResponsiveTable.stories.d.ts +9 -0
  51. package/dist/{types/components → components}/ResponsiveTable/index.d.ts +2 -1
  52. package/dist/components/Select/Select.stories.d.ts +6 -0
  53. package/dist/{types/components → components}/Select/index.d.ts +2 -1
  54. package/dist/components/Separator/Separator.stories.d.ts +6 -0
  55. package/dist/components/Sidebar/Sidebar.stories.d.ts +6 -0
  56. package/dist/components/Switch/Switch.stories.d.ts +5 -0
  57. package/dist/{types/components → components}/Switch/index.d.ts +2 -1
  58. package/dist/components/Table/Table.stories.d.ts +9 -0
  59. package/dist/{types/components → components}/Table/index.d.ts +2 -1
  60. package/dist/components/Tag/Tag.stories.d.ts +5 -0
  61. package/dist/{types/components → components}/Tag/index.d.ts +3 -2
  62. package/dist/components/Upload/Upload.stories.d.ts +3 -0
  63. package/dist/{types/components → components}/Upload/index.d.ts +3 -2
  64. package/dist/components/UserInfo/UserInfo.stories.d.ts +3 -0
  65. package/dist/components/WebCam/WebCam.stories.d.ts +3 -0
  66. package/dist/{types/components → components}/WebCam/index.d.ts +2 -1
  67. package/dist/index.d.ts +3 -0
  68. package/dist/index.ts +0 -0
  69. package/dist/locales/en.json.d.ts +144 -0
  70. package/dist/locales/es.json.d.ts +144 -0
  71. package/dist/locales/pt.json.d.ts +145 -0
  72. package/dist/types/index.d.ts +2 -3
  73. package/package.json +24 -120
  74. package/src/components/AnalyticsBar/AnalyticsBar.stories.tsx +2 -2
  75. package/src/components/BellNotifications/BellNotifications.stories.tsx +2 -2
  76. package/src/components/Button/Button.stories.tsx +2 -2
  77. package/src/components/Category/Category.stories.tsx +2 -2
  78. package/src/components/CategoryReadOnly/CategoryReadOnly.stories.tsx +3 -3
  79. package/src/components/CategoryResponse/CategoryResponse.stories.tsx +4 -5
  80. package/src/components/DatePicker/DatePicker.stories.tsx +2 -2
  81. package/src/components/DatePickerTag/DatePickerTag.stories.tsx +2 -2
  82. package/src/components/DatePickerTag/index.tsx +3 -3
  83. package/src/components/DropdownButton/DropdownButton.stories.tsx +2 -2
  84. package/src/components/ExportTableData/ExportTableData.stories.tsx +2 -2
  85. package/src/components/Footer/Footer.stories.tsx +2 -2
  86. package/src/components/Footer/index.tsx +6 -6
  87. package/src/components/Footer2/Footer.stories.tsx +4 -4
  88. package/src/components/Footer2/index.tsx +6 -6
  89. package/src/components/Header/Header.stories.tsx +2 -2
  90. package/src/components/Header/Header.types.ts +1 -1
  91. package/src/components/Input/Input.stories.tsx +2 -2
  92. package/src/components/InputCountryCode/inputCountryCode.stories.tsx +2 -2
  93. package/src/components/Label/Label.stories.tsx +2 -2
  94. package/src/components/Link/Link.stories.tsx +2 -2
  95. package/src/components/Menu/Menu.stories.tsx +2 -2
  96. package/src/components/MobileTable/MobileTable.stories.tsx +2 -2
  97. package/src/components/ModalConfirmation/ModalConfirmation.stories.tsx +2 -2
  98. package/src/components/ModalWithTable/ModalWithTable.stories.tsx +2 -2
  99. package/src/components/Navigation/Navigation.stories.tsx +2 -2
  100. package/src/components/Notification/Notification.stories.tsx +3 -3
  101. package/src/components/Questions/Questions.stories.tsx +2 -2
  102. package/src/components/Questions/index.tsx +1 -1
  103. package/src/components/Radio/Radio.stories.tsx +2 -2
  104. package/src/components/ResponseType/ResponseType.stories.tsx +2 -2
  105. package/src/components/ResponsiveTable/ResponsiveTable.stories.tsx +2 -2
  106. package/src/components/Select/Select.stories.tsx +2 -2
  107. package/src/components/Separator/Separator.stories.tsx +2 -2
  108. package/src/components/Sidebar/Sidebar.stories.tsx +2 -2
  109. package/src/components/Switch/Switch.stories.tsx +2 -2
  110. package/src/components/Table/Table.stories.tsx +2 -2
  111. package/src/components/Tag/Tag.stories.tsx +2 -2
  112. package/src/components/Upload/Upload.stories.tsx +3 -3
  113. package/src/components/UserInfo/UserInfo.stories.tsx +2 -2
  114. package/src/components/WebCam/WebCam.stories.tsx +2 -2
  115. package/src/constants/i18n.ts +1 -1
  116. package/tsconfig.json +11 -16
  117. package/vite.config.js +51 -0
  118. package/dist/780.bundle.js +0 -1
  119. package/dist/838.bundle.js +0 -2
  120. package/dist/838.bundle.js.LICENSE.txt +0 -1
  121. package/dist/bundle.js +0 -2
  122. package/dist/bundle.js.LICENSE.txt +0 -461
  123. package/dist/main.css +0 -36
  124. package/dist/types/components/AnalyticsBar/AnalyticsBar.stories.d.ts +0 -5
  125. package/dist/types/components/BellNotifications/BellNotifications.stories.d.ts +0 -5
  126. package/dist/types/components/Button/Button.stories.d.ts +0 -6
  127. package/dist/types/components/Category/Category.stories.d.ts +0 -4
  128. package/dist/types/components/CategoryReadOnly/CategoryReadOnly.stories.d.ts +0 -4
  129. package/dist/types/components/CategoryResponse/CategoryResponse.stories.d.ts +0 -4
  130. package/dist/types/components/DatePicker/DatePicker.stories.d.ts +0 -5
  131. package/dist/types/components/DatePickerTag/DatePickerTag.stories.d.ts +0 -5
  132. package/dist/types/components/DropdownButton/DropdownButton.stories.d.ts +0 -5
  133. package/dist/types/components/ExportTableData/ExportTableData.stories.d.ts +0 -4
  134. package/dist/types/components/Footer/Footer.stories.d.ts +0 -5
  135. package/dist/types/components/Footer2/Footer.stories.d.ts +0 -6
  136. package/dist/types/components/Header/Header.stories.d.ts +0 -5
  137. package/dist/types/components/Input/Input.stories.d.ts +0 -5
  138. package/dist/types/components/InputCountryCode/inputCountryCode.stories.d.ts +0 -5
  139. package/dist/types/components/Label/Label.stories.d.ts +0 -6
  140. package/dist/types/components/Link/Link.stories.d.ts +0 -7
  141. package/dist/types/components/Menu/Menu.stories.d.ts +0 -5
  142. package/dist/types/components/MobileTable/MobileTable.stories.d.ts +0 -5
  143. package/dist/types/components/MobileTable/UserInfoTable/index.d.ts +0 -21
  144. package/dist/types/components/ModalConfirmation/ModalConfirmation.stories.d.ts +0 -5
  145. package/dist/types/components/ModalWithTable/ModalWithTable.stories.d.ts +0 -5
  146. package/dist/types/components/Navigation/Navigation.stories.d.ts +0 -5
  147. package/dist/types/components/Notification/Notification.stories.d.ts +0 -5
  148. package/dist/types/components/Questions/Questions.stories.d.ts +0 -4
  149. package/dist/types/components/Radio/Radio.stories.d.ts +0 -5
  150. package/dist/types/components/ResponseType/Category.stories.d.ts +0 -4
  151. package/dist/types/components/ResponseType/ResponseType.stories.d.ts +0 -4
  152. package/dist/types/components/ResponsiveTable/ResponsiveTable.stories.d.ts +0 -9
  153. package/dist/types/components/Select/Select.stories.d.ts +0 -6
  154. package/dist/types/components/Separator/Separator.stories.d.ts +0 -6
  155. package/dist/types/components/Sidebar/Sidebar.stories.d.ts +0 -6
  156. package/dist/types/components/Switch/Switch.stories.d.ts +0 -5
  157. package/dist/types/components/Table/Table.stories.d.ts +0 -9
  158. package/dist/types/components/Tag/Tag.stories.d.ts +0 -5
  159. package/dist/types/components/Upload/Upload.stories.d.ts +0 -4
  160. package/dist/types/components/UserInfo/UserInfo.stories.d.ts +0 -4
  161. package/dist/types/components/WebCam/WebCam.stories.d.ts +0 -4
  162. package/webpack.config.js +0 -51
  163. /package/dist/{types/components → components}/AnalyticsBar/interfaces/analyticsBar.d.ts +0 -0
  164. /package/dist/{types/components → components}/BellNotifications/index.d.ts +0 -0
  165. /package/dist/{types/components → components}/Category/CategoryContent/index.d.ts +0 -0
  166. /package/dist/{types/components → components}/Category/CategorySidebar/index.d.ts +0 -0
  167. /package/dist/{types/components → components}/CategoryReadOnly/evaluationOptions.d.ts +0 -0
  168. /package/dist/{types/components → components}/CategoryResponse/evaluationOptions.d.ts +0 -0
  169. /package/dist/{types/components → components}/ExportTableData/index.d.ts +0 -0
  170. /package/dist/{types/components → components}/Footer/index.d.ts +0 -0
  171. /package/dist/{types/components → components}/Label/index.d.ts +0 -0
  172. /package/dist/{types/components → components}/ModalConfirmation/ModalStatusList.d.ts +0 -0
  173. /package/dist/{types/components → components}/ModalConfirmation/index.d.ts +0 -0
  174. /package/dist/{types/components → components}/Navigation/index.d.ts +0 -0
  175. /package/dist/{types/components → components}/Questions/SingleQuestion/index.d.ts +0 -0
  176. /package/dist/{types/components → components}/Questions/index.d.ts +0 -0
  177. /package/dist/{types/components → components}/ResponseType/index.d.ts +0 -0
  178. /package/dist/{types/components → components}/Separator/index.d.ts +0 -0
  179. /package/dist/{types/components → components}/Sidebar/index.d.ts +0 -0
  180. /package/dist/{types/components → components}/UserInfo/index.d.ts +0 -0
  181. /package/dist/{types/components → components}/index.d.ts +0 -0
  182. /package/dist/{types/constants → constants}/i18n.d.ts +0 -0
  183. /package/dist/{types/constants → constants}/logoCompanyHelper.d.ts +0 -0
  184. /package/dist/{types/constants → constants}/translationHelper.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { Button, CustomButtonProps } from '.';
3
3
 
4
4
  export default {
@@ -6,7 +6,7 @@ export default {
6
6
  component: Button,
7
7
  } as Meta;
8
8
 
9
- const Template: Story<CustomButtonProps> = (args) => <Button {...args}>ola</Button>;
9
+ const Template: StoryFn<CustomButtonProps> = (args: any) => <Button {...args}>ola</Button>;
10
10
 
11
11
  export const Primary = Template.bind({});
12
12
  Primary.args = {
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { useEffect, useState } from "react";
3
3
  import { Category } from '.';
4
4
 
@@ -7,7 +7,7 @@ export default {
7
7
  component: Category,
8
8
  } as Meta;
9
9
 
10
- const Template: Story<any> = (args) => {
10
+ const Template: StoryFn<any> = (args: any) => {
11
11
  const [serverData, setServerData] = useState<any>();
12
12
 
13
13
  useEffect(() => {
@@ -1,5 +1,5 @@
1
- import { Meta, Story } from "@storybook/react";
2
- import { Button } from "components/Button";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
+ import { Button } from "../Button";
3
3
  import { useEffect, useRef, useState } from "react";
4
4
  import { CategoryReadOnly } from '.';
5
5
 
@@ -8,7 +8,7 @@ export default {
8
8
  component: CategoryReadOnly,
9
9
  } as Meta;
10
10
 
11
- const Template: Story<any> = (args) => {
11
+ const Template: StoryFn<any> = (args: any) => {
12
12
  const [serverData, setServerData] = useState<any>();
13
13
  const categoryResponseRef = useRef(null);
14
14
  const [hasNext, setHasNext] = useState(true);
@@ -1,16 +1,15 @@
1
- import { Meta, Story } from "@storybook/react";
2
- import { Button } from "components/Button";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
+ import { Button } from "../Button";
3
3
  import { useEffect, useRef, useState } from "react";
4
4
  import { CategoryResponse } from '.';
5
5
  import { UploadFile } from "antd";
6
- import moment from "moment";
7
6
 
8
7
  export default {
9
8
  title: 'CategoryResponse',
10
9
  component: CategoryResponse,
11
10
  } as Meta;
12
11
 
13
- const Template: Story<any> = (args) => {
12
+ const Template: StoryFn<any> = (args: any) => {
14
13
  const [serverData, setServerData] = useState<any>();
15
14
  const categoryResponseRef = useRef(null);
16
15
  const [hasNext, setHasNext] = useState(true);
@@ -143,7 +142,7 @@ Primary.args = {
143
142
  "Grade": "0",
144
143
  "Note": "asasas",
145
144
  "Disabled": true,
146
- "Answer": moment(),
145
+ "Answer": [],
147
146
  "IsDate": true
148
147
  },
149
148
  {
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { CustomDatePicker, CustomDatePickerProps } from '.';
3
3
 
4
4
  export default {
@@ -6,7 +6,7 @@ export default {
6
6
  component: CustomDatePicker,
7
7
  } as Meta;
8
8
 
9
- const Template: Story<CustomDatePickerProps> = (args) => <CustomDatePicker {...args}></CustomDatePicker>;
9
+ const Template: StoryFn<CustomDatePickerProps> = (args: any) => <CustomDatePicker {...args}></CustomDatePicker>;
10
10
 
11
11
  export const Primary = Template.bind({});
12
12
  Primary.args = {
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { DatePickerTag } from '.';
3
3
  import { TagProps } from 'antd';
4
4
  import { useState } from "react";
@@ -8,7 +8,7 @@ export default {
8
8
  component: DatePickerTag,
9
9
  } as Meta;
10
10
 
11
- const Template: Story<TagProps> = (args) => {
11
+ const Template: StoryFn<TagProps> = (args: any) => {
12
12
  const [tagsInfo, setTagsInfo] = useState<any>({});
13
13
 
14
14
  return <DatePickerTag {...args} tagsInfo={setTagsInfo}></DatePickerTag>;
@@ -4,14 +4,14 @@ import { DatePicker, Tag, TagProps } from 'antd';
4
4
  import { TweenOneGroup } from 'rc-tween-one';
5
5
  import styles from './styles.module.scss';
6
6
  import { t } from 'i18next';
7
- import moment, { Moment } from 'moment';
7
+ import dayjs from "dayjs";
8
8
  import locale from 'antd/es/date-picker/locale/pt_BR';
9
9
 
10
10
  export interface DatePickerTagProps extends TagProps {
11
11
  customTags?: any,
12
12
  tagsInfo?: any;
13
13
  }
14
-
14
+
15
15
  type DateValue = Dayjs | null;
16
16
 
17
17
  export const DatePickerTag = (props: DatePickerTagProps) => {
@@ -59,7 +59,7 @@ export const DatePickerTag = (props: DatePickerTagProps) => {
59
59
  return (
60
60
  <div className={styles.tagfield}>
61
61
  <DatePicker
62
- disabledDate={(current) => current && current < moment().endOf('day')}
62
+ disabledDate={(current) => current && current < dayjs().endOf("day")}
63
63
  value={dateValue}
64
64
  onChange={handleChange as any}
65
65
  className={styles.picker}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Meta, Story } from '@storybook/react';
2
+ import { Meta, StoryFn } from "@storybook/react-vite";
3
3
  import { DropdownButton, DropdownButtonProps } from '.';
4
4
 
5
5
  export default {
@@ -11,7 +11,7 @@ const onLeft = () => {
11
11
  console.log(9);
12
12
  };
13
13
 
14
- const Template: Story<DropdownButtonProps> = (args) => <DropdownButton {...args} />;
14
+ const Template: StoryFn<DropdownButtonProps> = (args: any) => <DropdownButton {...args} />;
15
15
 
16
16
  export const BasicDropdown = Template.bind({});
17
17
  BasicDropdown.args = {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Meta, Story } from '@storybook/react';
2
+ import { Meta, StoryFn } from "@storybook/react-vite";
3
3
  import { TableExportButton } from './index';
4
4
 
5
5
  export default {
@@ -14,7 +14,7 @@ const columnTranslations = {
14
14
  occupation: 'Ocupação'
15
15
  };
16
16
 
17
- const Template: Story<any> = (args) => <TableExportButton {...args} />;
17
+ const Template: StoryFn<any> = (args: any) => <TableExportButton {...args} />;
18
18
 
19
19
  export const ExportButton = Template.bind({});
20
20
  ExportButton.args = {
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { Footer, FooterProps } from '.';
3
3
 
4
4
  export default {
@@ -6,7 +6,7 @@ export default {
6
6
  component: Footer,
7
7
  } as Meta;
8
8
 
9
- const Template: Story<FooterProps> = (args) => <Footer {...args}></Footer>;
9
+ const Template: StoryFn<FooterProps> = (args: any) => <Footer {...args}></Footer>;
10
10
 
11
11
  export const Primary = Template.bind({});
12
12
  Primary.args = {
@@ -1,8 +1,8 @@
1
1
  import { useEffect, useState } from "react";
2
- import moment from 'moment';
3
2
  import styles from './styles.module.scss';
4
3
  import omniumLogo from '../../assets/images/omnium-retail-logo-white.png';
5
4
  import omniumIcon from '../../assets/images/omnium-retail_icon.png';
5
+ import dayjs from "dayjs";
6
6
 
7
7
  export interface FooterProps {
8
8
  storeName: string;
@@ -10,16 +10,16 @@ export interface FooterProps {
10
10
  }
11
11
 
12
12
  export const Footer = (props: FooterProps) => {
13
- const [date, setDate] = useState(moment());
13
+ const [date, setDate] = useState(dayjs());
14
14
  const { storeName = 'Missing Store Name' } = props;
15
15
 
16
16
  useEffect(() => {
17
17
  const time = (function updateDate() {
18
- const nextMinute = moment().add(1, 'minute');
18
+ const nextMinute = dayjs().add(1, "minute");
19
19
  return setTimeout(() => {
20
- setDate(moment());
20
+ setDate(dayjs());
21
21
  updateDate();
22
- }, nextMinute.valueOf() - moment().valueOf());
22
+ }, nextMinute.valueOf() - dayjs().valueOf());
23
23
  }());
24
24
 
25
25
  return () => clearTimeout(time);
@@ -29,7 +29,7 @@ export const Footer = (props: FooterProps) => {
29
29
  <div className={styles.footer}>
30
30
  <div className={styles.content}>
31
31
  <div className={styles.brand}>{storeName}</div>
32
- <div className={styles.date}>{date.format('DD/MM/yyyy')}</div>
32
+ <div className={styles.date}>{date.format('DD/MM/YYYY')}</div>
33
33
  <div className={styles.time}>{date.format('HH:mm')}</div>
34
34
  </div>
35
35
 
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { Footer2, Footer2Props, ActionType } from '.';
3
3
  import {
4
4
  SettingOutlined,
@@ -17,7 +17,7 @@ export default {
17
17
  component: Footer2,
18
18
  } as Meta;
19
19
 
20
- const Template: Story<Footer2Props> = (args) => <Footer2 {...args}></Footer2>;
20
+ const Template: StoryFn<Footer2Props> = (args: any) => <Footer2 {...args}></Footer2>;
21
21
 
22
22
  const notifications = [
23
23
  {
@@ -157,8 +157,8 @@ Primary.args = {
157
157
  companyName: 'a2ai',
158
158
  footerName: 'Minha Aplicação',
159
159
  onBackClick: () => console.log('Voltar'),
160
- onFilterChange: (filter) => console.log('Filtro:', filter),
161
- onNotificationClick: (id, url) => console.log('Notificação:', id, url),
160
+ onFilterChange: (filter: any) => console.log('Filtro:', filter),
161
+ onNotificationClick: (id: any, url: any) => console.log('Notificação:', id, url),
162
162
  handleMarkAllAsRead: () => console.log('Marcar todas como lidas'),
163
163
  };
164
164
 
@@ -11,7 +11,7 @@ import {
11
11
  RightOutlined,
12
12
  LeftCircleOutlined
13
13
  } from '@ant-design/icons';
14
- import moment from 'moment';
14
+ import dayjs from "dayjs";
15
15
  import React, { useEffect, useRef, useState } from 'react';
16
16
  import { useTranslation } from 'react-i18next';
17
17
  import { getCompanyLogos } from '../../constants/logoCompanyHelper';
@@ -96,7 +96,7 @@ export const Footer2 = (props: Footer2Props) => {
96
96
  companyName = 'omnium',
97
97
  } = props;
98
98
 
99
- const [date, setDate] = useState(moment());
99
+ const [date, setDate] = useState(dayjs());
100
100
  const [isMenuOpen, setIsMenuOpen] = useState(false);
101
101
  const [currentSubmenu, setCurrentSubmenu] = useState<string | null>(null);
102
102
  const menuRef = useRef<HTMLDivElement>(null);
@@ -116,11 +116,11 @@ export const Footer2 = (props: Footer2Props) => {
116
116
 
117
117
  useEffect(() => {
118
118
  const time = (function updateDate() {
119
- const nextMinute = moment().add(1, 'minute');
119
+ const nextMinute = dayjs().add(1, "minute");
120
120
  return setTimeout(() => {
121
- setDate(moment());
121
+ setDate(dayjs());
122
122
  updateDate();
123
- }, nextMinute.valueOf() - moment().valueOf());
123
+ }, nextMinute.valueOf() - dayjs().valueOf());
124
124
  }());
125
125
 
126
126
  return () => clearTimeout(time);
@@ -234,7 +234,7 @@ export const Footer2 = (props: Footer2Props) => {
234
234
  {!isMobile &&
235
235
  <div className={styles.content}>
236
236
  <div className={styles.brand}>{footerName}</div>
237
- <div className={styles.date}>{date.format('DD/MM/yyyy')}</div>
237
+ <div className={styles.date}>{date.format('DD/MM/YYYY')}</div>
238
238
  <div className={styles.time}>{date.format('HH:mm')}</div>
239
239
  </div>
240
240
  }
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { Header } from '.';
3
3
  import { HeaderProps } from './Header.types';
4
4
 
@@ -7,7 +7,7 @@ export default {
7
7
  component: Header,
8
8
  } as Meta;
9
9
 
10
- const Template: Story<HeaderProps> = (args) => <Header {...args}></Header>;
10
+ const Template: StoryFn<HeaderProps> = (args: any) => <Header {...args}></Header>;
11
11
 
12
12
  const mockAction = () => {
13
13
  console.log('action');
@@ -1,4 +1,4 @@
1
- import { BellNotification } from "components/BellNotifications";
1
+ import { BellNotification } from "../BellNotifications";
2
2
 
3
3
  export interface MenuItem {
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { FormInputField, FormInputFieldProps } from '.';
3
3
 
4
4
  export default {
@@ -6,7 +6,7 @@ export default {
6
6
  component: FormInputField,
7
7
  } as Meta;
8
8
 
9
- const Template: Story<FormInputFieldProps> = (args) => <FormInputField {...args}></FormInputField>;
9
+ const Template: StoryFn<FormInputFieldProps> = (args: any) => <FormInputField {...args}></FormInputField>;
10
10
 
11
11
  export const Primary = Template.bind({});
12
12
  Primary.args = {
@@ -1,5 +1,5 @@
1
1
  import { Form, Button } from 'antd';
2
- import { Meta, Story } from "@storybook/react";
2
+ import { Meta, StoryFn } from "@storybook/react-vite";
3
3
  import { InputCountryCode, FormInputCountryCodeProps } from '.';
4
4
 
5
5
  export default {
@@ -7,7 +7,7 @@ export default {
7
7
  component: InputCountryCode,
8
8
  } as Meta;
9
9
 
10
- const Template: Story<FormInputCountryCodeProps> = (args) => {
10
+ const Template: StoryFn<FormInputCountryCodeProps> = (args: any) => {
11
11
  return (
12
12
  <Form>
13
13
  <InputCountryCode {...args}></InputCountryCode>
@@ -1,4 +1,4 @@
1
- import {Meta, Story} from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { Label, LabelProps } from '.';
3
3
 
4
4
  export default {
@@ -6,7 +6,7 @@ export default {
6
6
  component: Label,
7
7
  } as Meta;
8
8
 
9
- const Template: Story<LabelProps> = (args) => <Label {...args}></Label>;
9
+ const Template: StoryFn<LabelProps> = (args: any) => <Label {...args}></Label>;
10
10
 
11
11
  export const Primary = Template.bind({});
12
12
  Primary.args = {
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { Link, CustomLinkProps } from '.';
3
3
  import { SearchOutlined } from '@ant-design/icons';
4
4
 
@@ -7,7 +7,7 @@ export default {
7
7
  component: Link,
8
8
  } as Meta;
9
9
 
10
- const Template: Story<CustomLinkProps> = (args) => <Link {...args}> this is a link </Link>;
10
+ const Template: StoryFn<CustomLinkProps> = (args: any) => <Link {...args}> this is a link </Link>;
11
11
 
12
12
  export const Primary = Template.bind({});
13
13
  Primary.args = {
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { Menu } from '.';
3
3
  import { MenuProps } from 'antd';
4
4
  import { getItem } from './helpers/codeMutation';
@@ -8,7 +8,7 @@ export default {
8
8
  component: Menu,
9
9
  } as Meta;
10
10
 
11
- const Template: Story<MenuProps> = (args) => {
11
+ const Template: StoryFn<MenuProps> = (args: any) => {
12
12
  const data = [
13
13
  {
14
14
  "Year": 2023,
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { useEffect, useState } from "react";
3
3
  import { MobileTable, MobileTableProps } from '.';
4
4
 
@@ -7,7 +7,7 @@ export default {
7
7
  component: MobileTable,
8
8
  } as Meta;
9
9
 
10
- const Template: Story<MobileTableProps> = (args) => {
10
+ const Template: StoryFn<MobileTableProps> = (args: any) => {
11
11
  const [modalData, setModalData] = useState<any>({});
12
12
  const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
13
13
 
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { useEffect, useState } from "react";
3
3
  import { ModalConfirmation, ModalConfirmationProps } from '.';
4
4
  import { ModalStatus } from './ModalStatusList';
@@ -8,7 +8,7 @@ export default {
8
8
  component: ModalConfirmation,
9
9
  } as Meta;
10
10
 
11
- const Template: Story<ModalConfirmationProps> = (args) => {
11
+ const Template: StoryFn<ModalConfirmationProps> = (args: any) => {
12
12
  const [modalData, setModalData] = useState<any>({});
13
13
  const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
14
14
 
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { useEffect, useState } from "react";
3
3
  import { ModalWithTable, ModalWithTableProps } from '.';
4
4
 
@@ -7,7 +7,7 @@ export default {
7
7
  component: ModalWithTable,
8
8
  } as Meta;
9
9
 
10
- const Template: Story<ModalWithTableProps> = (args) => {
10
+ const Template: StoryFn<ModalWithTableProps> = (args: any) => {
11
11
  const [modalData, setModalData] = useState<any>({});
12
12
  const [isFetching, setIsFetching] = useState<boolean>(false);
13
13
  const [tagsData, setTagsData] = useState<any>({});
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { Navigation, NavigationProps } from '.';
3
3
 
4
4
  export default {
@@ -6,7 +6,7 @@ export default {
6
6
  component: Navigation,
7
7
  } as Meta;
8
8
 
9
- const Template: Story<NavigationProps> = (args) => <Navigation {...args}></Navigation>;
9
+ const Template: StoryFn<NavigationProps> = (args: any) => <Navigation {...args}></Navigation>;
10
10
 
11
11
  export const Primary = Template.bind({});
12
12
  Primary.args = {
@@ -1,12 +1,12 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { StoryFn } from "@storybook/react-vite";
2
2
  import { Notification, ErrorNotificationProps } from '.';
3
3
 
4
4
  export default {
5
5
  title: 'Notification',
6
6
  component: Notification,
7
- } as unknown as Meta;
7
+ } as any;
8
8
 
9
- const Template: Story<ErrorNotificationProps> = (args) => {
9
+ const Template: StoryFn<ErrorNotificationProps> = (args: any) => {
10
10
 
11
11
  const { openNotificationWithIcon } = Notification({
12
12
  message: args.message,
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { Questions } from '.';
3
3
  import { SearchOutlined } from '@ant-design/icons';
4
4
  import { Button, Form, Input } from "antd";
@@ -9,7 +9,7 @@ export default {
9
9
  component: Questions,
10
10
  } as Meta;
11
11
 
12
- const Template: Story<any> = (args) => {
12
+ const Template: StoryFn<any> = (args: any) => {
13
13
  const [form] = useForm();
14
14
 
15
15
  const onFinish = (values: any) => {
@@ -1,6 +1,6 @@
1
1
  import { PlusOutlined } from '@ant-design/icons';
2
2
  import { Form } from 'antd';
3
- import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd";
3
+ import { DragDropContext, Droppable, Draggable } from '@hello-pangea/dnd';
4
4
  import { SingleQuestion } from "./SingleQuestion";
5
5
  import { Link } from '../Link';
6
6
  import { t } from 'i18next';
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { Radio as RadioAntd, RadioChangeEvent, RadioProps } from "antd";
3
3
  import { useState } from "react";
4
4
  import { Radio, RadioGroup } from '.';
@@ -8,7 +8,7 @@ export default {
8
8
  component: Radio,
9
9
  } as Meta;
10
10
 
11
- const Template: Story<RadioProps> = (args) => {
11
+ const Template: StoryFn<RadioProps> = (args: any) => {
12
12
  const [value, setValue] = useState();
13
13
 
14
14
  const onChange = (e: RadioChangeEvent) => {
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { useEffect, useState } from "react";
3
3
  import { ResponseType } from '.';
4
4
 
@@ -7,7 +7,7 @@ export default {
7
7
  component: ResponseType,
8
8
  } as Meta;
9
9
 
10
- const Template: Story<any> = (args) => {
10
+ const Template: StoryFn<any> = (args: any) => {
11
11
  const [categoryContentInfo, setCategoryContentInfo] = useState<any>();
12
12
 
13
13
  const getAnswer = {
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { ResponsiveTable, ResponsiveTableCustomProps } from '.';
3
3
  import { useState } from "react";
4
4
  import { useTranslation } from "react-i18next";
@@ -9,7 +9,7 @@ export default {
9
9
  component: ResponsiveTable,
10
10
  } as Meta;
11
11
 
12
- const Template: Story<ResponsiveTableCustomProps> = (args) => {
12
+ const Template: StoryFn<ResponsiveTableCustomProps> = (args: any) => {
13
13
  const { t } = useTranslation();
14
14
  const [pageInfo, setPageInfo] = useState<any>({});
15
15
  const [rowSelectionInfo, setRowSelectionInfo] = useState<any>({});
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { Select } from '.';
3
3
  import { SelectProps } from 'antd';
4
4
 
@@ -7,7 +7,7 @@ export default {
7
7
  component: Select,
8
8
  } as Meta;
9
9
 
10
- const Template: Story<SelectProps> = (args) => <Select {...args}></Select>;
10
+ const Template: StoryFn<SelectProps> = (args: any) => <Select {...args}></Select>;
11
11
 
12
12
  export const Primary = Template.bind({});
13
13
  Primary.args = {
@@ -1,4 +1,4 @@
1
- import {Meta, Story} from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { Separator, SeparatorProps, Spaces } from '.';
3
3
 
4
4
  export default {
@@ -6,7 +6,7 @@ export default {
6
6
  component: Separator,
7
7
  } as Meta;
8
8
 
9
- const Template: Story<SeparatorProps> = (args) => <Separator {...args}></Separator>;
9
+ const Template: StoryFn<SeparatorProps> = (args: any) => <Separator {...args}></Separator>;
10
10
 
11
11
  export const Primary = Template.bind({});
12
12
  Primary.args = {
@@ -1,5 +1,5 @@
1
1
  import { RightCircleOutlined } from "@ant-design/icons";
2
- import { Meta, Story } from "@storybook/react";
2
+ import { Meta, StoryFn } from "@storybook/react-vite";
3
3
  import { Sidebar, SidebarProps } from '.';
4
4
 
5
5
  export default {
@@ -7,7 +7,7 @@ export default {
7
7
  component: Sidebar,
8
8
  } as Meta;
9
9
 
10
- const Template: Story<SidebarProps> = (args) => {
10
+ const Template: StoryFn<SidebarProps> = (args: any) => {
11
11
  const navigate = (targetRoute: string) => {
12
12
  console.log(targetRoute);
13
13
  }
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { Switch } from '.';
3
3
  import { SwitchProps } from 'antd';
4
4
 
@@ -7,7 +7,7 @@ export default {
7
7
  component: Switch,
8
8
  } as Meta;
9
9
 
10
- const Template: Story<SwitchProps> = (args) => <Switch {...args}></Switch>;
10
+ const Template: StoryFn<SwitchProps> = (args: any) => <Switch {...args}></Switch>;
11
11
 
12
12
  export const Primary = Template.bind({});
13
13
  Primary.args = {
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { Table, TableCustomProps } from '.';
3
3
  import { useState } from "react";
4
4
  import { useTranslation } from "react-i18next";
@@ -8,7 +8,7 @@ export default {
8
8
  component: Table,
9
9
  } as Meta;
10
10
 
11
- const Template: Story<TableCustomProps> = (args) => {
11
+ const Template: StoryFn<TableCustomProps> = (args: any) => {
12
12
  const { t } = useTranslation();
13
13
  const [pageInfo, setPageInfo] = useState<any>({});
14
14
  const [rowSelectionInfo, setRowSelectionInfo] = useState<any>({});
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from "@storybook/react";
1
+ import { Meta, StoryFn } from "@storybook/react-vite";
2
2
  import { TagField } from '.';
3
3
  import { TagProps } from 'antd';
4
4
  import { useState } from "react";
@@ -9,7 +9,7 @@ export default {
9
9
  component: TagField,
10
10
  } as Meta;
11
11
 
12
- const Template: Story<TagProps> = (args) => {
12
+ const Template: StoryFn<TagProps> = (args: any) => {
13
13
  const [tagsInfo, setTagsInfo] = useState<any>({});
14
14
  const [advancedTagsInfo, setAdvancedTagsInfo] = useState<any>({});
15
15
  const advancedsFilters = [{ display: t('components.tag.State'), value: "State" }, { display: t('components.tag.1'), value: "Olaaaaaa" }];