@aveonline/ui-react 0.0.2-alpha.0 → 1.0.1

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 (115) hide show
  1. package/README.md +30 -18
  2. package/dist/assets/index.91a8dfaf.css +1 -0
  3. package/dist/components/atoms/Avatar/Avatar.d.ts +7 -0
  4. package/dist/components/atoms/Avatar/IAvatar.d.ts +6 -0
  5. package/dist/components/atoms/Avatar/index.d.ts +1 -0
  6. package/dist/components/atoms/Badge/Badge.d.ts +7 -0
  7. package/dist/components/atoms/Badge/IBadge.d.ts +11 -0
  8. package/dist/components/atoms/Badge/index.d.ts +1 -0
  9. package/dist/components/atoms/Button/Button.d.ts +7 -0
  10. package/dist/components/atoms/Button/IButton.d.ts +47 -0
  11. package/dist/components/atoms/Button/IsLoading.d.ts +3 -0
  12. package/dist/components/atoms/Button/index.d.ts +2 -0
  13. package/dist/components/atoms/Button/useCSS.d.ts +4 -0
  14. package/dist/components/atoms/Heading/Heading.d.ts +8 -0
  15. package/dist/components/atoms/Heading/IHeading.d.ts +11 -0
  16. package/dist/components/atoms/Heading/index.d.ts +2 -0
  17. package/dist/components/atoms/Heading/useCSS.d.ts +4 -0
  18. package/dist/components/atoms/Icon/IIcon.d.ts +30 -0
  19. package/dist/components/atoms/Icon/Icon.d.ts +2 -0
  20. package/dist/components/atoms/Icon/Svg.d.ts +3 -0
  21. package/dist/components/atoms/Icon/index.d.ts +2 -0
  22. package/dist/components/atoms/RadioButton/IRadioButton.d.ts +40 -0
  23. package/dist/components/atoms/RadioButton/RadioButton.d.ts +7 -0
  24. package/dist/components/atoms/RadioButton/index.d.ts +1 -0
  25. package/dist/components/atoms/Switch/ISwitch.d.ts +19 -0
  26. package/dist/components/atoms/Switch/Switch.d.ts +7 -0
  27. package/dist/components/atoms/Switch/index.d.ts +1 -0
  28. package/dist/components/atoms/Text/IText.d.ts +12 -0
  29. package/dist/components/atoms/Text/Text.d.ts +8 -0
  30. package/dist/components/atoms/Text/index.d.ts +2 -0
  31. package/dist/components/atoms/Text/useCSS.d.ts +4 -0
  32. package/dist/components/atoms/Tooltip/ITooltip.d.ts +10 -0
  33. package/dist/components/atoms/Tooltip/Tooltip.d.ts +7 -0
  34. package/dist/components/atoms/Tooltip/TooltipAnchor.d.ts +8 -0
  35. package/dist/components/atoms/Tooltip/TooltipFloat.d.ts +8 -0
  36. package/dist/components/atoms/Tooltip/index.d.ts +2 -0
  37. package/dist/components/atoms/Tracker/ITracker.d.ts +8 -0
  38. package/dist/components/atoms/Tracker/Tracker.d.ts +7 -0
  39. package/dist/components/atoms/Tracker/index.d.ts +1 -0
  40. package/dist/components/index.d.ts +26 -2
  41. package/dist/components/molecules/Card/Select/ISelect.d.ts +26 -0
  42. package/dist/components/molecules/Card/Select/Select.d.ts +7 -0
  43. package/dist/components/molecules/Card/Select/index.d.ts +1 -0
  44. package/dist/components/molecules/Dropdown/Dropdown.d.ts +8 -0
  45. package/dist/components/molecules/Dropdown/IDropdown.d.ts +14 -0
  46. package/dist/components/molecules/Dropdown/index.d.ts +1 -0
  47. package/dist/components/molecules/EmptyState/BoxSvg.d.ts +1 -0
  48. package/dist/components/molecules/EmptyState/EmptyState.d.ts +7 -0
  49. package/dist/components/molecules/EmptyState/IEmptyState.d.ts +7 -0
  50. package/dist/components/molecules/EmptyState/PadlockSvg.d.ts +1 -0
  51. package/dist/components/molecules/EmptyState/index.d.ts +1 -0
  52. package/dist/components/molecules/Header/Header.d.ts +7 -0
  53. package/dist/components/molecules/Header/IHeader.d.ts +6 -0
  54. package/dist/components/molecules/Header/index.d.ts +1 -0
  55. package/dist/components/molecules/InlineError/IInlineError.d.ts +16 -0
  56. package/dist/components/molecules/InlineError/InlineError.d.ts +7 -0
  57. package/dist/components/molecules/InlineError/index.d.ts +1 -0
  58. package/dist/components/molecules/Modal/IModal.d.ts +36 -0
  59. package/dist/components/molecules/Modal/Modal.d.ts +7 -0
  60. package/dist/components/molecules/Modal/index.d.ts +1 -0
  61. package/dist/components/molecules/Selectable/AsyncSelect/AsyncSelect.d.ts +7 -0
  62. package/dist/components/molecules/Selectable/AsyncSelect/IAsyncSelect.d.ts +7 -0
  63. package/dist/components/molecules/Selectable/AsyncSelect/index.d.ts +1 -0
  64. package/dist/components/molecules/Selectable/Select/ISelect.d.ts +54 -0
  65. package/dist/components/molecules/Selectable/Select/Select.d.ts +7 -0
  66. package/dist/components/molecules/Selectable/Select/index.d.ts +2 -0
  67. package/dist/components/molecules/Selectable/SelectButton/ISelectButton.d.ts +25 -0
  68. package/dist/components/molecules/Selectable/SelectButton/Option.d.ts +4 -0
  69. package/dist/components/molecules/Selectable/SelectButton/SelectButton.d.ts +7 -0
  70. package/dist/components/molecules/Selectable/SelectButton/index.d.ts +1 -0
  71. package/dist/components/molecules/Selectable/SelectCountry/Option.d.ts +2 -0
  72. package/dist/components/molecules/Selectable/SelectCountry/Prefix.d.ts +3 -0
  73. package/dist/components/molecules/Selectable/SelectCountry/SelectCountry.d.ts +7 -0
  74. package/dist/components/molecules/Selectable/SelectCountry/SingleValue.d.ts +3 -0
  75. package/dist/components/molecules/Selectable/SelectCountry/index.d.ts +1 -0
  76. package/dist/components/molecules/Selectable/atoms/ClearIndicator.d.ts +2 -0
  77. package/dist/components/molecules/Selectable/atoms/Container.d.ts +7 -0
  78. package/dist/components/molecules/Selectable/atoms/DropdownIndicator.d.ts +2 -0
  79. package/dist/components/molecules/Selectable/atoms/Option.d.ts +2 -0
  80. package/dist/components/molecules/Selectable/atoms/Placeholder.d.ts +2 -0
  81. package/dist/components/molecules/Selectable/atoms/SingleValue.d.ts +3 -0
  82. package/dist/components/molecules/Selectable/atoms/index.d.ts +6 -0
  83. package/dist/components/molecules/Selectable/hooks/index.d.ts +1 -0
  84. package/dist/components/molecules/Selectable/hooks/useCSS.d.ts +5 -0
  85. package/dist/components/molecules/Summary/Summary.d.ts +16 -0
  86. package/dist/components/molecules/Summary/index.d.ts +1 -0
  87. package/dist/components/molecules/Tab/ITab.d.ts +19 -0
  88. package/dist/components/molecules/Tab/Tab.d.ts +7 -0
  89. package/dist/components/molecules/Tab/index.d.ts +2 -0
  90. package/dist/components/molecules/TabNav/ITabNav.d.ts +10 -0
  91. package/dist/components/molecules/TabNav/TabNav.d.ts +6 -0
  92. package/dist/components/molecules/TabNav/index.d.ts +1 -0
  93. package/dist/components/organisms/Navigation/INavigation.d.ts +8 -0
  94. package/dist/components/organisms/Navigation/Navigation.d.ts +6 -0
  95. package/dist/components/organisms/Navigation/index.d.ts +1 -0
  96. package/dist/components/templates/Main/Main.d.ts +11 -0
  97. package/dist/components/templates/Main/index.d.ts +1 -0
  98. package/dist/components/templates/Shipment/Shipment.d.ts +13 -0
  99. package/dist/components/templates/Shipment/index.d.ts +1 -0
  100. package/dist/hooks/index.d.ts +1 -0
  101. package/dist/hooks/useTokens.d.ts +10 -0
  102. package/dist/index.d.ts +2 -3
  103. package/dist/postcss.config.js +4 -5
  104. package/dist/tailwind.config.js +206 -192
  105. package/dist/tailwind.css +1 -1
  106. package/dist/tokens.css +76 -67
  107. package/dist/types/Template.d.ts +8 -0
  108. package/dist/types/Tokens.d.ts +50 -0
  109. package/dist/types/index.d.ts +2 -0
  110. package/dist/ui-react.mjs +10060 -407
  111. package/dist/ui-react.umd.js +48 -11
  112. package/package.json +34 -10
  113. package/dist/assets/index.53932362.css +0 -1
  114. package/dist/components/index.d.ts.map +0 -1
  115. package/dist/index.d.ts.map +0 -1
package/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
  <img height="100" src="https://user-images.githubusercontent.com/38017835/197309416-fd4390a0-cfb6-41f3-ac26-10d067d92a25.png">
3
3
  <h1 align="center">ui ecosystem react</h1>
4
4
  <p>The home base for Aveonline design system, ui-react provides essential design resources for our developers to use in the Aveonline-branded interfaces that they create.</p>
5
+ <a href="https://ui-aveonline.vercel.app/">Go Storybook</a>
5
6
  </div>
6
7
 
7
8
  ## Before started
@@ -9,7 +10,7 @@
9
10
  For usage with tailwind config, install:
10
11
 
11
12
  ```shell
12
- npm i autoprefixer cssnano postcss postcss-import tailwindcss @tailwindcss/forms -D
13
+ npm i @tailwindcss/forms
13
14
  ```
14
15
 
15
16
  ## Getting started
@@ -25,30 +26,27 @@ npm i @aveonline/ui-react
25
26
  Import things into your JS app from the `@aveonline/ui-react` package.
26
27
 
27
28
  ```ts
28
- import { Test } from '@aveonline/ui-react'
29
+ import { Button } from '@aveonline/ui-react'
29
30
  ```
30
31
 
31
32
  `tailwind.config.js`
32
33
 
33
34
  ```ts
34
- const tailwindConfig = require('@aveonline/ui-react/tailwind.config.js')
35
- const config = { ...tailwindConfig }
36
- module.exports = config
37
- ```
35
+ /** @type {import('tailwindcss').Config} */
38
36
 
39
- or
40
-
41
- ```ts
42
- module.exports = {
43
- content: ['./node_modules/@aveonline/ui-react/dist/*.{mjs,js}']
37
+ const tailwindConfig = require('@aveonline/ui-react/tailwind.config.js')
38
+ const { content, ...all } = tailwindConfig
39
+
40
+ const config = {
41
+ content: [
42
+ ...content,
43
+ './pages/**/*.{ts,tsx}',
44
+ './components/**/*.{ts,tsx}',
45
+ './node_modules/@aveonline/ui-react/dist/*.{mjs,js}'
46
+ ],
47
+ ...all
44
48
  }
45
- ```
46
49
 
47
- `postcss.config.js`
48
-
49
- ```ts
50
- const postcssConfig = require('@aveonline/ui-react/postcss.config.js')
51
- const config = { ...postcssConfig }
52
50
  module.exports = config
53
51
  ```
54
52
 
@@ -92,7 +90,7 @@ Tests
92
90
 
93
91
  Run `npm run test` to execute all unit test components.
94
92
 
95
- We use `vitest` and `testing-library/react` for unit/integration tests and will soon use [Chromatic](https://www.chromaticqa.com/) for visual regression testing.
93
+ We use `vitest` and `testing-library/react` for unit/integration tests and [Chromatic](https://www.chromaticqa.com/) for visual regression testing.
96
94
 
97
95
  Open Storybook
98
96
 
@@ -111,3 +109,17 @@ Storybook production
111
109
  ```shell
112
110
  npm run build:storybook
113
111
  ```
112
+
113
+ Run test
114
+
115
+ ```shell
116
+ npm run test
117
+ ```
118
+
119
+ Run regression testing
120
+
121
+ - [Join](https://www.chromatic.com/library?appId=6362f0c0f36774d17ed0c3a0&inviteToken=4adce6358a9b439f8b636d0599e6db4b)
122
+
123
+ ```shell
124
+ npm run chromatic
125
+ ```
@@ -0,0 +1 @@
1
+ [type=radio]:checked{background-image:url("data:image/svg+xml;utf8,%3Csvg%20viewBox%3D'0%200%2016%2016'%20fill%3D'%232C6ECB'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Ccircle%20cx%3D'8'%20cy%3D'8'%20r%3D'4'%2F%3E%3C%2Fsvg%3E")}[type=radio]:checked:disabled{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}
@@ -0,0 +1,7 @@
1
+ import { IAvatar } from './IAvatar';
2
+ /**
3
+ * Atoms: Avatar
4
+ * Are used to show a thumbnail representation of an individual or business in the interface
5
+ */
6
+ declare function Avatar({ size }: IAvatar): JSX.Element;
7
+ export default Avatar;
@@ -0,0 +1,6 @@
1
+ export interface IAvatar {
2
+ /**
3
+ * Adjust size
4
+ */
5
+ size: 'sm' | 'xs' | 'md' | 'lg';
6
+ }
@@ -0,0 +1 @@
1
+ export { default as Avatar } from './Avatar';
@@ -0,0 +1,7 @@
1
+ import { IBadge } from './IBadge';
2
+ /**
3
+ * Atoms: Badge
4
+ * Badges are used to inform merchants of the status of an object or of an action that’s been taken.
5
+ */
6
+ declare function Badge({ variant, children }: IBadge): JSX.Element;
7
+ export default Badge;
@@ -0,0 +1,11 @@
1
+ import { IChildren } from '../../../types';
2
+ export interface IBadge extends IChildren {
3
+ /**
4
+ * Option list badges availables
5
+ */
6
+ variant: 'neutral' | 'info' | 'success' | 'warning' | 'critical';
7
+ /**
8
+ * Sizes
9
+ */
10
+ size?: 'sm' | 'md';
11
+ }
@@ -0,0 +1 @@
1
+ export { default as Badge } from './Badge';
@@ -0,0 +1,7 @@
1
+ import type { IButton } from './IButton';
2
+ /**
3
+ * Atoms: Button
4
+ * Buttons are used primarily for actions, such as 'Add', 'Close', 'Cancel', or 'Save'. Plain buttons, which look similar to links, are used for less important or less commonly used actions, such as 'view shipping settings'.
5
+ */
6
+ declare function Button({ variant, size, fullWidth, isLoading, isDisabled, align, onlyOneIcon, children, ...allProps }: IButton): JSX.Element;
7
+ export default Button;
@@ -0,0 +1,47 @@
1
+ import type { ReactNode, MouseEventHandler } from 'react';
2
+ export declare type Variant = 'primary' | 'basic' | 'destructive' | 'plain' | 'plain-monochrome' | 'plain-destructive';
3
+ declare type Size = 'md' | 'sm';
4
+ export declare type Align = 'start' | 'center' | 'end';
5
+ interface IButton {
6
+ /**
7
+ * Is this the principal call to action on the page?
8
+ */
9
+ variant?: Variant;
10
+ /**
11
+ * Button contents how label or label + icons
12
+ */
13
+ children?: ReactNode;
14
+ /**
15
+ * Adjust size
16
+ */
17
+ size?: Size;
18
+ /**
19
+ * How large should the button be?
20
+ */
21
+ fullWidth?: boolean;
22
+ /**
23
+ * State load
24
+ */
25
+ isLoading?: boolean;
26
+ /**
27
+ * State disabled
28
+ */
29
+ isDisabled?: boolean;
30
+ /**
31
+ * Position align children elements
32
+ */
33
+ align?: Align;
34
+ /**
35
+ * When only have one icon, not children string
36
+ */
37
+ onlyOneIcon?: boolean;
38
+ /**
39
+ * Emit event handle click
40
+ */
41
+ onClick?: MouseEventHandler<HTMLButtonElement | HTMLDivElement> | (() => void);
42
+ }
43
+ interface ILoading {
44
+ variant?: Variant;
45
+ size?: Size;
46
+ }
47
+ export type { IButton, ILoading };
@@ -0,0 +1,3 @@
1
+ import { ILoading } from './IButton';
2
+ declare function IsLoading({ variant, size }: ILoading): JSX.Element;
3
+ export default IsLoading;
@@ -0,0 +1,2 @@
1
+ export { default as Button } from './Button';
2
+ export * from './IButton';
@@ -0,0 +1,4 @@
1
+ import { IButton } from './IButton';
2
+ export declare function useCSS({ variant, isLoading, size, fullWidth, align, onlyOneIcon }: IButton): {
3
+ getClass: () => string;
4
+ };
@@ -0,0 +1,8 @@
1
+ import type { IHeading } from './IHeading';
2
+ /**
3
+ * Atoms: Heading
4
+ * You can select the semantic html tag you need. h1, h2, h3, h4, h5, h6.
5
+ * Default h2
6
+ */
7
+ declare function Heading({ variant, children, lineHeight, weight, color, size, className, as: ElementHeading }: IHeading): JSX.Element;
8
+ export default Heading;
@@ -0,0 +1,11 @@
1
+ import type { IColorText, IWeight, ILineHeightHeading, IFontSizeHeading, IClassName, IChildren } from '../../../types';
2
+ export interface IHeading extends IChildren, IClassName, IWeight, ILineHeightHeading, IColorText, IFontSizeHeading {
3
+ /**
4
+ * Variant heading
5
+ */
6
+ variant?: 'subheading' | 'heading' | 'sm' | 'md' | 'lg' | 'xl';
7
+ /**
8
+ * Tag html heading availables
9
+ */
10
+ as?: Extract<keyof JSX.IntrinsicElements, 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;
11
+ }
@@ -0,0 +1,2 @@
1
+ export { default as Heading } from './Heading';
2
+ export * from './IHeading';
@@ -0,0 +1,4 @@
1
+ import { IHeading } from './IHeading';
2
+ export declare function useCSS({ variant, ...props }: IHeading): {
3
+ getClass: string;
4
+ };
@@ -0,0 +1,30 @@
1
+ export declare type ISize = 'sm' | 'md' | 'lg';
2
+ export declare type IColor = 'success' | 'warning' | 'disabled' | 'active' | 'hovered' | 'subdued' | 'default' | 'critical' | 'primary';
3
+ export declare type IKind = 'shipping' | 'home' | 'menu' | 'notifications' | 'novelty' | 'help' | 'see-more' | 'info' | 'alert' | 'eye' | 'date' | 'search' | 'delete' | 'more-less' | 'down' | 'up' | 'back' | 'front' | 'major-minor' | 'minor-major' | 'create' | 'success' | 'error' | 'more' | 'less' | undefined;
4
+ interface IconProps {
5
+ /**
6
+ * Sizes availables
7
+ */
8
+ size?: ISize;
9
+ /**
10
+ * Color icons
11
+ */
12
+ color?: IColor;
13
+ /**
14
+ * Name icon svg
15
+ */
16
+ kind?: IKind;
17
+ /**
18
+ * Type cursor
19
+ */
20
+ cursor?: 'pointer' | 'default';
21
+ /**
22
+ * Optional event click
23
+ */
24
+ onClick?: () => void;
25
+ /**
26
+ * More class optional container
27
+ */
28
+ className?: string;
29
+ }
30
+ export type { IconProps };
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from './IIcon';
2
+ export default function Icon({ kind, color, ...props }: IconProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from './IIcon';
2
+ import type { IChildren } from '../../../types';
3
+ export declare function Svg({ children, size, className, cursor, ...props }: IconProps & IChildren): JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default as Icon } from './Icon';
2
+ export * from './IIcon';
@@ -0,0 +1,40 @@
1
+ declare type Change = {
2
+ value: string | number;
3
+ checked: boolean;
4
+ };
5
+ declare type IPropsRadio = {
6
+ /**
7
+ * ID unique
8
+ */
9
+ id?: string;
10
+ /**
11
+ * Name unique
12
+ */
13
+ name?: string;
14
+ /**
15
+ * Control for disabled radio
16
+ */
17
+ isDisabled?: boolean;
18
+ /**
19
+ * Value radio
20
+ */
21
+ value?: string | number;
22
+ /**
23
+ * Option for checked default
24
+ */
25
+ defaultChecked?: boolean;
26
+ /**
27
+ * Label string link with radio
28
+ */
29
+ label?: string;
30
+ /**
31
+ * Help text for more info
32
+ */
33
+ helpText?: string;
34
+ /**
35
+ * Event for control to checked and value
36
+ */
37
+ onChange?: (value: Change) => void;
38
+ [rest: string]: any;
39
+ };
40
+ export type { IPropsRadio };
@@ -0,0 +1,7 @@
1
+ import type { IPropsRadio } from './IRadioButton';
2
+ /**
3
+ * Atom: RadioButton
4
+ * Use radio buttons to present each item in a list of options where merchants must make a single selection.
5
+ */
6
+ declare function RadioButton({ id, name, isDisabled, value, label, helpText, onChange, ...rest }: IPropsRadio): JSX.Element;
7
+ export default RadioButton;
@@ -0,0 +1 @@
1
+ export { default as RadioButton } from './RadioButton';
@@ -0,0 +1,19 @@
1
+ interface ISwitch {
2
+ /**
3
+ * Whether or not the switch is checked.
4
+ */
5
+ isSelected: boolean;
6
+ /**
7
+ * Disabled switch.
8
+ */
9
+ isDisabled?: boolean;
10
+ /**
11
+ * The name used when using this component inside a form.
12
+ */
13
+ name?: string;
14
+ /**
15
+ * The function to call when the switch is toggled.
16
+ */
17
+ onChange(checked: boolean): void;
18
+ }
19
+ export type { ISwitch };
@@ -0,0 +1,7 @@
1
+ import type { ISwitch } from './ISwitch';
2
+ /**
3
+ * Atoms: Switch
4
+ * Switches toggle the state of a single item on or off.
5
+ */
6
+ declare function Switch({ onChange, isSelected, isDisabled, name, ...props }: ISwitch): JSX.Element;
7
+ export default Switch;
@@ -0,0 +1 @@
1
+ export { default as Switch } from './Switch';
@@ -0,0 +1,12 @@
1
+ import type { IColorText, IWeight, ILineHeightText, IFontSizeText, IChildren, IClassName } from '../../../types';
2
+ export interface IText extends IColorText, IWeight, ILineHeightText, IFontSizeText, IChildren, IClassName {
3
+ /**
4
+ * Variant heading
5
+ */
6
+ variant?: 'button' | 'body' | 'highlight' | 'caption';
7
+ /**
8
+ * Tag html availables
9
+ */
10
+ as?: Extract<keyof JSX.IntrinsicElements, 'span' | 'p' | 'label'>;
11
+ [rest: string]: any;
12
+ }
@@ -0,0 +1,8 @@
1
+ import type { IText } from './IText';
2
+ /**
3
+ * Atoms: Text
4
+ * Paragraphs. Tags availables p, span.
5
+ * Default p
6
+ */
7
+ declare function Text({ variant, children, lineHeight, weight, color, size, className, as: ElementText, ...rest }: IText): JSX.Element;
8
+ export default Text;
@@ -0,0 +1,2 @@
1
+ export { default as Text } from './Text';
2
+ export * from './IText';
@@ -0,0 +1,4 @@
1
+ import type { IText } from './IText';
2
+ export declare function useCSS({ variant, ...props }: IText): {
3
+ getClass: string;
4
+ };
@@ -0,0 +1,10 @@
1
+ import { IChildren } from '../../../types';
2
+ import type { Placement } from '@floating-ui/react-dom-interactions';
3
+ import { useTooltip } from './useTooltip';
4
+ export declare type TooltipState = ReturnType<typeof useTooltip>;
5
+ export declare type ITooltipProps = {
6
+ placement?: Placement;
7
+ title?: string;
8
+ description?: string;
9
+ initialOpen?: boolean;
10
+ } & IChildren;
@@ -0,0 +1,7 @@
1
+ import { ITooltipProps } from './ITooltip';
2
+ /**
3
+ * Atom: Tooltip
4
+ * Tooltips are floating labels that briefly explain the function of a user interface element. They can be triggered when merchants hover.
5
+ */
6
+ declare function Tooltip({ placement, title, description, initialOpen, children }: ITooltipProps): JSX.Element;
7
+ export default Tooltip;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { TooltipState } from './ITooltip';
3
+ declare type PropsType = React.HTMLProps<HTMLElement> & {
4
+ state: TooltipState;
5
+ asChild?: boolean;
6
+ };
7
+ export declare const TooltipAnchor: React.ForwardRefExoticComponent<Pick<PropsType, "size" | "className" | "color" | "disabled" | "default" | "children" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "start" | "onClick" | "type" | "as" | "kind" | "id" | "name" | "value" | "defaultChecked" | "onChange" | "target" | "checked" | "hidden" | "htmlFor" | "role" | "tabIndex" | "aria-checked" | "aria-labelledby" | "aria-describedby" | "onKeyUp" | "onKeyPress" | "key" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "open" | "state" | "asChild" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "width" | "wmode" | "wrap"> & React.RefAttributes<HTMLElement>>;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { IChildren } from '../../../types';
3
+ import { TooltipState } from './ITooltip';
4
+ declare type PropsType = React.HTMLProps<HTMLDivElement> & {
5
+ state: TooltipState;
6
+ } & IChildren;
7
+ export declare const TooltipFloat: React.ForwardRefExoticComponent<Pick<PropsType, "size" | "className" | "color" | "disabled" | "default" | "children" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "start" | "onClick" | "type" | "as" | "kind" | "id" | "name" | "value" | "defaultChecked" | "onChange" | "target" | "checked" | "hidden" | "htmlFor" | "role" | "tabIndex" | "aria-checked" | "aria-labelledby" | "aria-describedby" | "onKeyUp" | "onKeyPress" | "key" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "open" | "state" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "width" | "wmode" | "wrap"> & React.RefAttributes<HTMLDivElement>>;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default as Tooltip } from './Tooltip';
2
+ export * from './ITooltip';
@@ -0,0 +1,8 @@
1
+ declare type IPropsTracker = {
2
+ track: string;
3
+ title?: string;
4
+ isDisabled?: boolean;
5
+ isSelected?: boolean;
6
+ [rest: string]: any;
7
+ };
8
+ export type { IPropsTracker };
@@ -0,0 +1,7 @@
1
+ import { IPropsTracker } from './ITracker';
2
+ /**
3
+ * Atom: Tracker
4
+ * Use in processes that have more than one step, so the user can know exactly how much is left.
5
+ */
6
+ declare function Tracker({ track, isDisabled, isSelected, title, ...rest }: IPropsTracker): JSX.Element;
7
+ export default Tracker;
@@ -0,0 +1 @@
1
+ export { default as Tracker } from './Tracker';
@@ -1,2 +1,26 @@
1
- export { default as Button } from './Button/Button';
2
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './atoms/Button';
2
+ export * from './atoms/Avatar';
3
+ export * from './atoms/Heading';
4
+ export * from './atoms/Text';
5
+ export * from './atoms/Badge';
6
+ export * from './atoms/Switch';
7
+ export * from './atoms/Icon';
8
+ export * from './atoms/Tooltip';
9
+ export * from './atoms/RadioButton';
10
+ export * from './atoms/Tracker';
11
+ export * from './molecules/Selectable/Select';
12
+ export * from './molecules/Selectable/AsyncSelect';
13
+ export * from './molecules/Selectable/SelectButton';
14
+ export * from './molecules/Selectable/SelectCountry';
15
+ export * from './molecules/Tab';
16
+ export * from './molecules/InlineError';
17
+ export * from './molecules/Modal';
18
+ export * from './molecules/Dropdown';
19
+ export * from './molecules/EmptyState';
20
+ export * from './molecules/TabNav';
21
+ export * from './molecules/Header';
22
+ export * from './molecules/Summary';
23
+ export * from './molecules/Card/Select';
24
+ export * from './organisms/Navigation';
25
+ export * from './templates/Main';
26
+ export * from './templates/Shipment';
@@ -0,0 +1,26 @@
1
+ interface ICardSelect {
2
+ id: string;
3
+ title: string;
4
+ subtitle?: string;
5
+ description?: string;
6
+ state?: string;
7
+ img?: JSX.Element;
8
+ hasRadio?: boolean;
9
+ isDisabled?: boolean;
10
+ error?: string;
11
+ }
12
+ declare type IPropsCardSelect = {
13
+ /**
14
+ * Array items with content for card
15
+ */
16
+ items: ICardSelect[];
17
+ /**
18
+ * Checked item
19
+ */
20
+ checkedItem: ICardSelect | undefined;
21
+ /**
22
+ * Event handler for change selection
23
+ */
24
+ onChange: (value: ICardSelect) => void;
25
+ };
26
+ export type { IPropsCardSelect, ICardSelect };
@@ -0,0 +1,7 @@
1
+ import { IPropsCardSelect } from './ISelect';
2
+ /**
3
+ * Molecule: CardSelect
4
+ * Use radio cards in items where users must make a single selection, and need of a visual element or more than one text to be explained.
5
+ */
6
+ declare function CardSelect({ items, checkedItem, onChange }: IPropsCardSelect): JSX.Element;
7
+ export default CardSelect;
@@ -0,0 +1 @@
1
+ export { default as CardSelect } from './Select';
@@ -0,0 +1,8 @@
1
+ import { IPropsDropdown } from './IDropdown';
2
+ import { IClassName } from '@/types';
3
+ /**
4
+ * Molecule: Dropdown
5
+ * Page actions let merchants take key actions at the bottom of specific pages in the interface. This is important because sometimes the primary call to action is hard to access when merchants are at the bottom of a page, that’s why this component is fixed.
6
+ */
7
+ declare function Dropdown({ title, subtitle, defaultOpen, isDisabled, content, className, children }: IPropsDropdown & IClassName): JSX.Element;
8
+ export default Dropdown;
@@ -0,0 +1,14 @@
1
+ import { IChildren } from '../../../types';
2
+ declare type IElement = string | JSX.Element;
3
+ declare type IContent = {
4
+ label: IElement;
5
+ value: IElement;
6
+ };
7
+ interface IPropsDropdown extends IChildren {
8
+ title?: IElement;
9
+ subtitle?: IElement[];
10
+ content?: IContent[];
11
+ defaultOpen?: boolean;
12
+ isDisabled?: boolean;
13
+ }
14
+ export type { IPropsDropdown, IElement, IContent };
@@ -0,0 +1 @@
1
+ export { default as Dropdown } from './Dropdown';
@@ -0,0 +1 @@
1
+ export declare function BoxSvg(): JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { IPropsEmptyState } from './IEmptyState';
2
+ /**
3
+ * Molecule: EmptyState
4
+ * Empty states are used when a list, table, or chart has no items or data to show. This is an opportunity to provide explanation or guidance to help merchants progress. The empty state component is intended for use when a full page in the admin is empty, and not for individual elements or areas in the interface.
5
+ */
6
+ declare function EmptyState({ title, description, img, className, children }: IPropsEmptyState): JSX.Element;
7
+ export default EmptyState;
@@ -0,0 +1,7 @@
1
+ import { IChildren, IClassName } from '../../../types';
2
+ interface IPropsEmptyState extends IChildren, IClassName {
3
+ title?: string;
4
+ description?: string;
5
+ img?: 'box' | 'padlock';
6
+ }
7
+ export type { IPropsEmptyState };
@@ -0,0 +1 @@
1
+ export declare function PadlockSvg(): JSX.Element;
@@ -0,0 +1 @@
1
+ export { default as EmptyState } from './EmptyState';