@ssa-ui-kit/core 0.0.1-alpha → 0.0.2-alpha

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 (37) hide show
  1. package/dist/components/AccordionGroup/index.d.ts +1 -0
  2. package/dist/components/AccordionGroup/types.d.ts +4 -1
  3. package/dist/components/Button/fixtures.d.ts +8 -8
  4. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  5. package/dist/components/Checkbox/types.d.ts +2 -2
  6. package/dist/components/Icon/icons/Chart.d.ts +2 -0
  7. package/dist/components/Icon/icons/Clock.d.ts +2 -0
  8. package/dist/components/Icon/icons/Email.d.ts +2 -0
  9. package/dist/components/Icon/icons/Lock.d.ts +2 -0
  10. package/dist/components/Icon/icons/LogIn.d.ts +2 -0
  11. package/dist/components/Icon/icons/Robot.d.ts +2 -0
  12. package/dist/components/Icon/icons/iconsList.d.ts +1 -1
  13. package/dist/components/Popover/types.d.ts +2 -0
  14. package/dist/components/TextField/types.d.ts +2 -10
  15. package/dist/index.d.ts +9 -0
  16. package/dist/index.js +1 -1
  17. package/dist/index.js.map +1 -1
  18. package/package.json +3 -3
  19. package/src/components/AccordionGroup/AccordionTitle.tsx +4 -2
  20. package/src/components/AccordionGroup/index.ts +1 -0
  21. package/src/components/AccordionGroup/types.ts +6 -1
  22. package/src/components/Checkbox/Checkbox.tsx +2 -0
  23. package/src/components/Checkbox/types.ts +8 -2
  24. package/src/components/Icon/icons/Chart.tsx +37 -0
  25. package/src/components/Icon/icons/Clock.tsx +31 -0
  26. package/src/components/Icon/icons/Email.tsx +19 -0
  27. package/src/components/Icon/icons/Lock.tsx +17 -0
  28. package/src/components/Icon/icons/LogIn.tsx +21 -0
  29. package/src/components/Icon/icons/Robot.tsx +18 -0
  30. package/src/components/Icon/icons/iconsList.tsx +6 -0
  31. package/src/components/Icon/icons/index.tsx +12 -0
  32. package/src/components/Popover/hooks/usePopover.tsx +24 -1
  33. package/src/components/Popover/types.ts +3 -0
  34. package/src/components/TextField/types.ts +3 -9
  35. package/src/index.ts +9 -0
  36. package/src/themes/main.ts +1 -1
  37. package/tsbuildcache +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssa-ui-kit/core",
3
- "version": "0.0.1-alpha",
3
+ "version": "0.0.2-alpha",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "private": false,
@@ -41,8 +41,8 @@
41
41
  "loose-envify": "^1.4.0",
42
42
  "scheduler": "^0.23.0",
43
43
  "uuid": "^9.0.0",
44
- "@ssa-ui-kit/utils": "^0.0.1-alpha",
45
- "@ssa-ui-kit/hooks": "^0.0.1-alpha"
44
+ "@ssa-ui-kit/hooks": "^0.0.1-alpha",
45
+ "@ssa-ui-kit/utils": "^0.0.1-alpha"
46
46
  },
47
47
  "browserslist": [
48
48
  ">0.1%",
@@ -1,8 +1,8 @@
1
1
  import { Fragment } from 'react';
2
- import CardHeaderBase from '@components/CardHeader/CardHeaderBase';
3
- import { AccordionProps } from './types';
4
2
  import { useTheme } from '@emotion/react';
3
+ import CardHeaderBase from '@components/CardHeader/CardHeaderBase';
5
4
  import Icon from '@components/Icon';
5
+ import { AccordionProps } from './types';
6
6
  import { createTitleStyles } from './styles';
7
7
 
8
8
  const CardHeaderBaseButton = CardHeaderBase.withComponent('button');
@@ -13,6 +13,7 @@ export const AccordionTitle: AccordionProps['renderTitle'] = ({
13
13
  id,
14
14
  isOpened,
15
15
  ariaControls,
16
+ className,
16
17
  onClick,
17
18
  }) => {
18
19
  const theme = useTheme();
@@ -22,6 +23,7 @@ export const AccordionTitle: AccordionProps['renderTitle'] = ({
22
23
  type="button"
23
24
  data-testid="accordion-title"
24
25
  css={styles[size]}
26
+ className={className}
25
27
  id={`${id}`}
26
28
  aria-expanded={isOpened}
27
29
  aria-controls={ariaControls}
@@ -6,3 +6,4 @@ export {
6
6
  } from './AccordionContext';
7
7
  export { AccordionTitle } from './AccordionTitle';
8
8
  export { Accordion } from './Accordion';
9
+ export * from './types';
@@ -7,11 +7,16 @@ export type SizeStyles = {
7
7
  [K in AccordionSize]: SerializedStyles;
8
8
  };
9
9
 
10
+ type AccordionGroupChildren = React.ReactElement<
11
+ React.PropsWithChildren<AccordionViewProps>
12
+ >;
13
+
10
14
  export interface AccordionGroupProps {
11
15
  id?: string;
12
- children: React.ReactElement<React.PropsWithChildren<AccordionViewProps>>[];
16
+ children: AccordionGroupChildren | AccordionGroupChildren[];
13
17
  size?: AccordionSize;
14
18
  accordionsStayOpen?: boolean;
19
+ className?: string;
15
20
  }
16
21
 
17
22
  export interface AccordionProps {
@@ -16,6 +16,7 @@ const Checkbox = ({
16
16
  name = '',
17
17
  isRequired = false,
18
18
  ref,
19
+ register,
19
20
  ...rest
20
21
  }: ICheckboxProps) => {
21
22
  const [isChecked, setIsChecked] = useState(Boolean(initialState));
@@ -61,6 +62,7 @@ const Checkbox = ({
61
62
  }}
62
63
  name={name}
63
64
  required={isRequired}
65
+ {...register}
64
66
  />
65
67
  <div>
66
68
  {isIndeterminate ? (
@@ -1,7 +1,13 @@
1
- import { Control, FieldPath, FieldValues } from 'react-hook-form';
1
+ import {
2
+ Control,
3
+ FieldPath,
4
+ FieldValues,
5
+ UseFormReturn,
6
+ } from 'react-hook-form';
2
7
  import { MutableRefObject } from 'react';
3
8
 
4
- export interface ICheckboxProps {
9
+ export interface ICheckboxProps
10
+ extends Partial<Pick<UseFormReturn, 'register'>> {
5
11
  text?: string;
6
12
  id?: string;
7
13
  onChange?: (newState: boolean) => void;
@@ -0,0 +1,37 @@
1
+ import { SVGProps } from '@components/Icon/types';
2
+
3
+ export const Chart = ({ fill = '#000', size = 15 }: SVGProps) => (
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width={`${size}px`}
7
+ height={`${size}px`}
8
+ viewBox="0 0 22 22"
9
+ fill="none">
10
+ <title>Chart</title>
11
+ <g clipPath="url(#clip0_2353_10249)">
12
+ <path
13
+ d="M15.9118 19.3153L15.9119 19.3152C16.1279 19.1374 16.1629 18.8202 15.9915 18.5992L15.9914 18.5991L10.2667 11.2396V2.24969C10.2667 1.96446 10.0352 1.73301 9.75 1.73301C4.8614 1.73301 0.9 6.08572 0.9 11.4163C0.9 16.7557 5.24395 21.0997 10.5833 21.0997C11.771 21.0997 12.6938 20.9922 13.526 20.7137C14.359 20.4349 15.0948 19.987 15.9118 19.3153ZM10.5833 20.0664C5.81355 20.0664 1.93332 16.1861 1.93332 11.4164C1.93332 6.83058 5.17123 3.0801 9.23332 2.78478V11.4164C9.23332 11.531 9.27152 11.6427 9.34279 11.7337C9.34284 11.7338 9.3429 11.7338 9.34295 11.7339L14.8604 18.8277C14.2411 19.2904 13.6698 19.5955 13.0225 19.7874C12.346 19.9879 11.5811 20.0664 10.5833 20.0664Z"
14
+ fill={fill}
15
+ stroke={fill}
16
+ strokeWidth="0.2"
17
+ />
18
+ <path
19
+ d="M11.4167 11.1H20.5834C20.8686 11.1 21.1 10.8685 21.1 10.5833C21.1 5.24395 16.756 0.9 11.4167 0.9C11.1315 0.9 10.9 1.13145 10.9 1.41668V10.5834C10.9 10.8686 11.1315 11.1 11.4167 11.1ZM11.9333 10.0666V1.94877C16.2925 2.20673 19.7933 5.70751 20.0512 10.0666H11.9333Z"
20
+ fill={fill}
21
+ stroke={fill}
22
+ strokeWidth="0.2"
23
+ />
24
+ <path
25
+ d="M18.0192 19.3336L18.0189 19.3339C17.9231 19.4225 17.7972 19.4721 17.6668 19.4721L18.0192 19.3336ZM18.0192 19.3336C19.9769 17.5072 21.1001 14.9258 21.1001 12.2497C21.1001 11.9645 20.8687 11.733 20.5835 11.733H12.2501M18.0192 19.3336L12.2501 11.733M12.2501 11.733C12.0517 11.733 11.8691 11.8475 11.7832 12.0274M12.2501 11.733L11.7832 12.0274M11.7832 12.0274C11.6974 12.2073 11.7232 12.4202 11.8482 12.5743M11.7832 12.0274L11.8482 12.5743M11.8482 12.5743C11.8483 12.5743 11.8483 12.5743 11.8483 12.5744M11.8482 12.5743L11.8483 12.5744M11.8483 12.5744L17.2645 19.2795C17.2645 19.2796 17.2646 19.2797 17.2647 19.2797C17.3549 19.3926 17.4872 19.4606 17.63 19.471C17.6298 19.471 17.6296 19.471 17.6295 19.471L11.8483 12.5744ZM20.0512 12.7664C19.9288 14.7847 19.0958 16.7118 17.7089 18.185L13.332 12.7664H20.0512Z"
26
+ fill={fill}
27
+ stroke={fill}
28
+ strokeWidth="0.2"
29
+ />
30
+ </g>
31
+ <defs>
32
+ <clipPath id="clip0_2353_10249">
33
+ <rect width="22" height="22" fill="white" />
34
+ </clipPath>
35
+ </defs>
36
+ </svg>
37
+ );
@@ -0,0 +1,31 @@
1
+ import { SVGProps } from '@components/Icon/types';
2
+
3
+ export const Clock = ({ fill = '#000', size = 15 }: SVGProps) => (
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width={`${size}px`}
7
+ height={`${size}px`}
8
+ viewBox="0 0 24 24"
9
+ fill="none">
10
+ <title>Clock</title>
11
+ <circle
12
+ cx="12.1001"
13
+ cy="12.1001"
14
+ r="11.1001"
15
+ stroke={fill}
16
+ strokeWidth="1.4"
17
+ />
18
+ <path
19
+ d="M11.4824 6.18066L11.4835 13.1411"
20
+ stroke={fill}
21
+ strokeWidth="1.4"
22
+ strokeLinecap="round"
23
+ />
24
+ <path
25
+ d="M18.8843 11.4834L11.4842 13.3334"
26
+ stroke={fill}
27
+ strokeWidth="1.4"
28
+ strokeLinecap="round"
29
+ />
30
+ </svg>
31
+ );
@@ -0,0 +1,19 @@
1
+ import { SVGProps } from '@components/Icon/types';
2
+
3
+ export const Email = ({ fill = '#000', size = 24 }: SVGProps) => (
4
+ <svg
5
+ width={`${size}px`}
6
+ height={`${size}px`}
7
+ fill="none"
8
+ viewBox="0 0 18 14"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ xmlnsXlink="http://www.w3.org/1999/xlink">
11
+ <title>Email</title>
12
+ <path
13
+ fillRule="evenodd"
14
+ clipRule="evenodd"
15
+ d="M0.718587 2.52762C0.823606 2.04828 1.08177 1.62029 1.4508 1.31376C1.81982 1.00722 2.27784 0.840299 2.74984 0.840332H15.2498C15.7218 0.840299 16.1799 1.00722 16.5489 1.31376C16.9179 1.62029 17.1761 2.04828 17.2811 2.52762L8.99984 7.79997L0.718587 2.52762ZM0.666504 3.76676V11.4751L6.7113 7.61442L0.666504 3.76676ZM7.70921 8.25136L0.865462 12.6209C1.03455 12.9923 1.30143 13.3061 1.63503 13.5256C1.96863 13.7452 2.35523 13.8616 2.74984 13.8612H15.2498C15.6444 13.8613 16.0308 13.7446 16.3642 13.5249C16.6977 13.3051 16.9643 12.9913 17.1332 12.6198L10.2894 8.25027L8.99984 9.07167L7.70921 8.25027V8.25136ZM11.2884 7.61551L17.3332 11.4751V3.76676L11.2884 7.61442V7.61551Z"
16
+ fill={fill}
17
+ />
18
+ </svg>
19
+ );
@@ -0,0 +1,17 @@
1
+ import { SVGProps } from '@components/Icon/types';
2
+
3
+ export const Lock = ({ fill = '#000', size = 24 }: SVGProps) => (
4
+ <svg
5
+ width={`${size}px`}
6
+ height={`${size}px`}
7
+ fill="none"
8
+ viewBox="0 0 16 21"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ xmlnsXlink="http://www.w3.org/1999/xlink">
11
+ <title>Lock</title>
12
+ <path
13
+ d="M13.625 8.41602H13V5.91602C13 3.15852 10.7575 0.916016 8 0.916016C5.2425 0.916016 3 3.15852 3 5.91602V8.41602H2.375C1.34167 8.41602 0.5 9.25685 0.5 10.291V19.041C0.5 20.0752 1.34167 20.916 2.375 20.916H13.625C14.6583 20.916 15.5 20.0752 15.5 19.041V10.291C15.5 9.25685 14.6583 8.41602 13.625 8.41602ZM4.66667 5.91602C4.66667 4.07768 6.16167 2.58268 8 2.58268C9.83833 2.58268 11.3333 4.07768 11.3333 5.91602V8.41602H4.66667V5.91602ZM8.83333 14.851V16.7493C8.83333 17.2093 8.46083 17.5827 8 17.5827C7.53917 17.5827 7.16667 17.2093 7.16667 16.7493V14.851C6.67083 14.5618 6.33333 14.0302 6.33333 13.416C6.33333 12.4968 7.08083 11.7493 8 11.7493C8.91917 11.7493 9.66667 12.4968 9.66667 13.416C9.66667 14.0302 9.32917 14.5618 8.83333 14.851Z"
14
+ fill={fill}
15
+ />
16
+ </svg>
17
+ );
@@ -0,0 +1,21 @@
1
+ import { SVGProps } from '@components/Icon/types';
2
+
3
+ export const LogIn = ({ fill = '#000', size = 24 }: SVGProps) => (
4
+ <svg
5
+ width={`${size}px`}
6
+ height={`${size}px`}
7
+ fill="none"
8
+ viewBox="0 0 15 20"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ xmlnsXlink="http://www.w3.org/1999/xlink">
11
+ <title>Log in</title>
12
+ <path
13
+ d="M7.39504 9.17067C8.58623 9.17067 9.61771 8.74344 10.4605 7.90051C11.3033 7.05773 11.7305 6.02652 11.7305 4.8352C11.7305 3.64428 11.3033 2.61294 10.4604 1.76988C9.61743 0.92723 8.58609 0.5 7.39504 0.5C6.20371 0.5 5.17251 0.92723 4.32972 1.77002C3.48694 2.6128 3.05957 3.64414 3.05957 4.8352C3.05957 6.02652 3.48694 7.05786 4.32986 7.90065C5.17279 8.7433 6.20413 9.17067 7.39504 9.17067Z"
14
+ fill={fill}
15
+ />
16
+ <path
17
+ d="M14.9811 14.341C14.9568 13.9902 14.9076 13.6076 14.8352 13.2036C14.7622 12.7966 14.6681 12.4118 14.5555 12.0601C14.4392 11.6966 14.281 11.3376 14.0854 10.9936C13.8824 10.6365 13.644 10.3256 13.3765 10.0698C13.0968 9.80212 12.7543 9.58693 12.3582 9.42996C11.9635 9.27382 11.5261 9.19472 11.0583 9.19472C10.8745 9.19472 10.6968 9.27011 10.3536 9.49354C10.1424 9.63129 9.89537 9.79059 9.61961 9.96678C9.38382 10.117 9.06439 10.2578 8.66985 10.3852C8.28491 10.5098 7.89407 10.5729 7.50832 10.5729C7.12256 10.5729 6.73186 10.5098 6.34652 10.3852C5.95238 10.2579 5.63296 10.1172 5.39744 9.96692C5.12429 9.79237 4.8771 9.63307 4.66273 9.49341C4.31995 9.26997 4.14211 9.19458 3.95837 9.19458C3.49035 9.19458 3.0531 9.27382 2.65855 9.4301C2.26277 9.58679 1.92013 9.80199 1.64012 10.0699C1.37274 10.3259 1.1342 10.6367 0.931502 10.9936C0.736083 11.3376 0.57788 11.6964 0.461425 12.0602C0.348953 12.4119 0.254882 12.7966 0.181823 13.2036C0.109451 13.6071 0.0602874 13.9898 0.0359802 14.3414C0.0120849 14.6858 0 15.0433 0 15.4043C0 16.3439 0.29869 17.1046 0.887694 17.6656C1.46942 18.2191 2.23915 18.5 3.17518 18.5H11.8423C12.7783 18.5 13.5478 18.2193 14.1296 17.6656C14.7188 17.105 15.0175 16.3442 15.0175 15.4042C15.0173 15.0415 15.0051 14.6838 14.9811 14.341Z"
18
+ fill={fill}
19
+ />
20
+ </svg>
21
+ );
@@ -0,0 +1,18 @@
1
+ import { SVGProps } from '@components/Icon/types';
2
+
3
+ export const Robot = ({ fill = '#000', size = 15 }: SVGProps) => (
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width={`${size}px`}
7
+ height={`${size}px`}
8
+ viewBox="0 0 24 24"
9
+ fill="none">
10
+ <title>Robot</title>
11
+ <path
12
+ d="M17.0001 4.4H17H12.6V3C12.6 2.84087 12.5368 2.68826 12.4243 2.57574C12.3117 2.46321 12.1591 2.4 12 2.4C11.8409 2.4 11.6883 2.46321 11.5757 2.57574C11.4632 2.68826 11.4 2.84087 11.4 3V4.4H7L6.99991 4.4C6.31056 4.40064 5.64964 4.67476 5.1622 5.1622C4.67476 5.64964 4.40064 6.31056 4.4 6.99991V7L4.4 16L4.4 16.0001C4.40064 16.6894 4.67476 17.3504 5.1622 17.8378C5.64964 18.3252 6.31056 18.5994 6.99991 18.6H7H9.6789L11.5008 21.3328L11.584 21.2773L11.5008 21.3328C11.5556 21.415 11.6298 21.4824 11.7169 21.529C11.804 21.5756 11.9012 21.6 12 21.6C12.0988 21.6 12.196 21.5756 12.2831 21.529C12.3702 21.4824 12.4444 21.415 12.4992 21.3328L12.416 21.2773L12.4992 21.3328L14.3211 18.6H17H17.0001C17.6894 18.5994 18.3504 18.3252 18.8378 17.8378C19.3252 17.3504 19.5994 16.6894 19.6 16.0001V16V7V6.99991C19.5994 6.31056 19.3252 5.64964 18.8378 5.1622C18.3504 4.67476 17.6894 4.40064 17.0001 4.4ZM17.9895 16.9895C17.727 17.252 17.3711 17.3996 16.9999 17.4L10.4992 17.6672L10.4991 17.667C10.4443 17.585 10.37 17.5177 10.283 17.4712C10.196 17.4246 10.0988 17.4001 10.0001 17.4H10H7.00011C6.6289 17.3996 6.27301 17.252 6.01053 16.9895C5.74805 16.727 5.6004 16.3711 5.6 15.9999V14.6H18.4V15.9999C18.3996 16.3711 18.252 16.727 17.9895 16.9895ZM5.6 13.4V7.00011C5.6004 6.6289 5.74805 6.27301 6.01053 6.01053C6.27301 5.74805 6.6289 5.60041 7.00011 5.6H16.9999C17.3711 5.60041 17.727 5.74805 17.9895 6.01053C18.252 6.27301 18.3996 6.6289 18.4 7.00011V13.4H5.6ZM9.91462 10.6111C10.0355 10.4302 10.1 10.2176 10.1 10C10.1 9.70826 9.98411 9.42847 9.77782 9.22218C9.57153 9.01589 9.29174 8.9 9 8.9C8.78244 8.9 8.56977 8.96451 8.38887 9.08538C8.20798 9.20625 8.06699 9.37805 7.98373 9.57905C7.90048 9.78005 7.87869 10.0012 7.92114 10.2146C7.96358 10.428 8.06835 10.624 8.22218 10.7778C8.37602 10.9317 8.57202 11.0364 8.7854 11.0789C8.99878 11.1213 9.21995 11.0995 9.42095 11.0163C9.62195 10.933 9.79375 10.792 9.91462 10.6111ZM15.9146 10.6111C16.0355 10.4302 16.1 10.2176 16.1 10C16.1 9.70826 15.9841 9.42847 15.7778 9.22218C15.5715 9.01589 15.2917 8.9 15 8.9C14.7824 8.9 14.5698 8.96451 14.3889 9.08538C14.208 9.20625 14.067 9.37805 13.9837 9.57905C13.9005 9.78005 13.8787 10.0012 13.9211 10.2146C13.9636 10.428 14.0683 10.624 14.2222 10.7778C14.376 10.9317 14.572 11.0364 14.7854 11.0789C14.9988 11.1213 15.22 11.0995 15.421 11.0163C15.622 10.933 15.7937 10.792 15.9146 10.6111ZM2.6 12V8C2.6 7.84087 2.53679 7.68826 2.42426 7.57574C2.31174 7.46321 2.15913 7.4 2 7.4C1.84087 7.4 1.68826 7.46321 1.57574 7.57574C1.46321 7.68826 1.4 7.84087 1.4 8V12C1.4 12.1591 1.46321 12.3117 1.57574 12.4243C1.68826 12.5368 1.84087 12.6 2 12.6C2.15913 12.6 2.31174 12.5368 2.42426 12.4243C2.53679 12.3117 2.6 12.1591 2.6 12ZM22.6 12V8C22.6 7.84087 22.5368 7.68826 22.4243 7.57574C22.3117 7.46321 22.1591 7.4 22 7.4C21.8409 7.4 21.6883 7.46321 21.5757 7.57574C21.4632 7.68826 21.4 7.84087 21.4 8V12C21.4 12.1591 21.4632 12.3117 21.5757 12.4243C21.6883 12.5368 21.8409 12.6 22 12.6C22.1591 12.6 22.3117 12.5368 22.4243 12.4243C22.5368 12.3117 22.6 12.1591 22.6 12Z"
13
+ fill={fill}
14
+ stroke={fill}
15
+ strokeWidth="0.2"
16
+ />
17
+ </svg>
18
+ );
@@ -32,6 +32,9 @@ export const iconsList = [
32
32
  'visible',
33
33
  'invisible',
34
34
  'log-out',
35
+ 'log-in',
36
+ 'email',
37
+ 'lock',
35
38
  'carrot-down',
36
39
  'carrot-up',
37
40
  'carrot-left',
@@ -46,4 +49,7 @@ export const iconsList = [
46
49
  'bin',
47
50
  'change',
48
51
  'copy',
52
+ 'robot',
53
+ 'chart',
54
+ 'clock',
49
55
  ] as const;
@@ -21,7 +21,10 @@ import { User } from './User';
21
21
  import { Union } from './Union';
22
22
  import { Visible } from './Visible';
23
23
  import { Invisible } from './Invisible';
24
+ import { LogIn } from './LogIn';
24
25
  import { LogOut } from './LogOut';
26
+ import { Email } from './Email';
27
+ import { Lock } from './Lock';
25
28
  import { Information } from './Information';
26
29
  import { Warning } from './Warning';
27
30
  import { Attention } from './Attention';
@@ -44,6 +47,9 @@ import { Archive } from './Archive';
44
47
  import { Bin } from './Bin';
45
48
  import { Change } from './Change';
46
49
  import { Copy } from './Copy';
50
+ import { Robot } from './Robot';
51
+ import { Chart } from './Chart';
52
+ import { Clock } from './Clock';
47
53
 
48
54
  const componentsList = [
49
55
  Diet,
@@ -70,6 +76,9 @@ const componentsList = [
70
76
  Visible,
71
77
  Invisible,
72
78
  LogOut,
79
+ LogIn,
80
+ Email,
81
+ Lock,
73
82
  CarrotDown,
74
83
  CarrotUp,
75
84
  CarrotLeft,
@@ -84,6 +93,9 @@ const componentsList = [
84
93
  Bin,
85
94
  Change,
86
95
  Copy,
96
+ Robot,
97
+ Chart,
98
+ Clock,
87
99
  ];
88
100
 
89
101
  const iconsMap: IMapIcons = iconsList.reduce((res, name, index) => {
@@ -9,6 +9,8 @@ import {
9
9
  useDismiss,
10
10
  useRole,
11
11
  useInteractions,
12
+ useHover,
13
+ safePolygon,
12
14
  } from '@floating-ui/react';
13
15
  import { PopoverOptions, UsePopover } from '../types';
14
16
 
@@ -19,6 +21,7 @@ export const usePopover: UsePopover = ({
19
21
  open: controlledOpen,
20
22
  onOpenChange: setControlledOpen,
21
23
  floatingOptions = {},
24
+ interactionsEnabled = 'click',
22
25
  }: PopoverOptions = {}) => {
23
26
  const [uncontrolledOpen, setUncontrolledOpen] = React.useState(initialOpen);
24
27
  const [labelId, setLabelId] = React.useState<string | undefined>();
@@ -52,8 +55,28 @@ export const usePopover: UsePopover = ({
52
55
  });
53
56
  const dismiss = useDismiss(context);
54
57
  const role = useRole(context);
58
+ const hover = useHover(context, {
59
+ enabled: controlledOpen == null,
60
+ handleClose: safePolygon(),
61
+ });
62
+
63
+ const interactionsHooks = [dismiss, role];
64
+
65
+ switch (interactionsEnabled) {
66
+ case 'click': {
67
+ interactionsHooks.push(click);
68
+ break;
69
+ }
70
+ case 'hover': {
71
+ interactionsHooks.push(hover);
72
+ break;
73
+ }
74
+ default: {
75
+ interactionsHooks.push(click, hover);
76
+ }
77
+ }
55
78
 
56
- const interactions = useInteractions([click, dismiss, role]);
79
+ const interactions = useInteractions(interactionsHooks);
57
80
 
58
81
  const result = React.useMemo(
59
82
  () => ({
@@ -5,12 +5,15 @@ import {
5
5
  UseFloatingOptions,
6
6
  } from '@floating-ui/react';
7
7
 
8
+ export type InteractionsEnabled = 'click' | 'hover' | 'both';
9
+
8
10
  export interface PopoverOptions {
9
11
  initialOpen?: boolean;
10
12
  placement?: Placement;
11
13
  modal?: boolean;
12
14
  open?: boolean;
13
15
  floatingOptions?: Partial<UseFloatingOptions>;
16
+ interactionsEnabled?: InteractionsEnabled;
14
17
  onOpenChange?: (open: boolean) => void;
15
18
  }
16
19
 
@@ -1,20 +1,14 @@
1
1
  import type { UseFormReturn, FieldError } from 'react-hook-form';
2
+ import { InputProps } from '@components/Input/types';
2
3
 
3
4
  export interface TextFieldProps
4
- extends Partial<Pick<UseFormReturn, 'register'>> {
5
- name: string;
6
- type?: string;
5
+ extends InputProps,
6
+ Partial<Pick<UseFormReturn, 'register'>> {
7
7
  label?: string;
8
- placeholder?: string;
9
- validationSchema?: Record<string, unknown>;
10
8
  errors?: FieldError;
11
9
  success?: boolean;
12
10
  helperText?: string;
13
- disabled?: boolean;
14
11
  rows?: number;
15
- endElement?: React.ReactElement;
16
12
  multirow?: boolean;
17
13
  maxLength?: number;
18
- className?: string;
19
- as?: React.ElementType;
20
14
  }
package/src/index.ts CHANGED
@@ -24,7 +24,11 @@ export * from './components/Checkbox';
24
24
  export { default as FormCheckbox } from './components/FormCheckbox';
25
25
  export * from './components/FormCheckbox';
26
26
  export { default as Dropdown } from './components/Dropdown';
27
+ export { default as DropdownArrow } from './components/DropdownArrow';
28
+ export { default as DropdownBase } from './components/DropdownBase';
27
29
  export { default as DropdownOption } from './components/DropdownOption';
30
+ export { default as DropdownOptions } from './components/DropdownOptions';
31
+ export { default as DropdownToggle } from './components/DropdownToggle';
28
32
  export type { IDropdownOption } from './components/DropdownOptions';
29
33
  export { default as Icon } from './components/Icon';
30
34
  export * from './components/Icon';
@@ -35,11 +39,13 @@ export { default as Modal } from './components/Modal';
35
39
  export { default as ModalDismissButton } from './components/ModalDismissButton';
36
40
  export { default as ModalContent } from './components/ModalContent';
37
41
  export { default as ModalOpenButton } from './components/ModalOpenButton';
42
+ export { default as ModalDialog } from './components/ModalDialog';
38
43
  export * from './components/Modal';
39
44
  export * from './components/Popover';
40
45
  export { default as MultipleDropdown } from './components/MultipleDropdown';
41
46
  export { default as MultipleDropdownNotification } from './components/MultipleDropdownNotification';
42
47
  export { default as MultipleDropdownOptions } from './components/MultipleDropdownOptions';
48
+ export { default as Progress } from './components/Progress';
43
49
  export { default as ProgressBar } from './components/ProgressBar';
44
50
  export { default as ProgressCircle } from './components/ProgressCircle';
45
51
  export { default as ProgressLegend } from './components/ProgressLegend';
@@ -47,6 +53,7 @@ export { default as ProgressLegendItem } from './components/ProgressLegendItem';
47
53
  export { default as ProgressVertical } from './components/ProgressVertical';
48
54
  export { default as Stepper } from './components/Stepper';
49
55
  export { default as Step } from './components/Step';
56
+ export { default as StepConnector } from './components/StepConnector';
50
57
  export { default as StepLabel } from './components/StepLabel';
51
58
  export { default as Switch } from './components/Switch';
52
59
  export * from './components/Switch';
@@ -81,5 +88,7 @@ export * from './components/ResponsiveImage';
81
88
  export { default as Form } from './components/Form';
82
89
  export { default as FormGroup } from './components/FormGroup';
83
90
  export { default as FormAction } from './components/FormAction';
91
+ export { default as FormHelperText } from './components/FormHelperText';
84
92
  export { default as Indicator } from './components/Indicator';
85
93
  export * from './components/ButtonGroup';
94
+ export { default as Link } from './components/Link';
@@ -105,7 +105,7 @@ const main: Theme = {
105
105
  blueRoyal: 'rgba(72, 125, 225, 1)', //#487de1
106
106
  },
107
107
  mediaQueries: {
108
- xs: '@media screen and (max-width: 390px)',
108
+ xs: '@media screen and (max-width: 389px)',
109
109
  sm: '@media screen and (min-width: 390px)',
110
110
  md: '@media screen and (min-width: 900px)',
111
111
  lg: '@media screen and (min-width: 1440px)',