@aveonline/ui-react 1.0.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 (65) hide show
  1. package/README.md +13 -16
  2. package/dist/components/atoms/Avatar/Avatar.d.ts +7 -0
  3. package/dist/components/atoms/Avatar/IAvatar.d.ts +3 -0
  4. package/dist/components/atoms/Badge/Badge.d.ts +7 -0
  5. package/dist/components/atoms/Badge/IBadge.d.ts +6 -0
  6. package/dist/components/atoms/Button/Button.d.ts +7 -0
  7. package/dist/components/atoms/Button/IButton.d.ts +27 -0
  8. package/dist/components/atoms/Button/IsLoading.d.ts +3 -0
  9. package/dist/components/atoms/Heading/Heading.d.ts +8 -0
  10. package/dist/components/atoms/Heading/IHeading.d.ts +6 -0
  11. package/dist/components/atoms/Icon/IIcon.d.ts +18 -0
  12. package/dist/components/atoms/Icon/Icon.d.ts +2 -0
  13. package/dist/components/atoms/Icon/Svg.d.ts +3 -0
  14. package/dist/components/atoms/RadioButton/IRadioButton.d.ts +24 -0
  15. package/dist/components/atoms/RadioButton/RadioButton.d.ts +7 -0
  16. package/dist/components/atoms/Switch/ISwitch.d.ts +12 -0
  17. package/dist/components/atoms/Switch/Switch.d.ts +7 -0
  18. package/dist/components/atoms/Text/IText.d.ts +6 -0
  19. package/dist/components/atoms/Text/Text.d.ts +8 -0
  20. package/dist/components/atoms/Tooltip/Tooltip.d.ts +7 -0
  21. package/dist/components/atoms/Tooltip/TooltipAnchor.d.ts +8 -0
  22. package/dist/components/atoms/Tooltip/TooltipFloat.d.ts +8 -0
  23. package/dist/components/atoms/Tracker/Tracker.d.ts +7 -0
  24. package/dist/components/molecules/Card/Select/ISelect.d.ts +9 -0
  25. package/dist/components/molecules/Card/Select/Select.d.ts +7 -0
  26. package/dist/components/molecules/Dropdown/Dropdown.d.ts +8 -0
  27. package/dist/components/molecules/EmptyState/BoxSvg.d.ts +1 -0
  28. package/dist/components/molecules/EmptyState/EmptyState.d.ts +7 -0
  29. package/dist/components/molecules/EmptyState/PadlockSvg.d.ts +1 -0
  30. package/dist/components/molecules/Header/Header.d.ts +7 -0
  31. package/dist/components/molecules/InlineError/IInlineError.d.ts +9 -0
  32. package/dist/components/molecules/InlineError/InlineError.d.ts +7 -0
  33. package/dist/components/molecules/Modal/IModal.d.ts +24 -0
  34. package/dist/components/molecules/Modal/Modal.d.ts +7 -0
  35. package/dist/components/molecules/Selectable/AsyncSelect/AsyncSelect.d.ts +7 -0
  36. package/dist/components/molecules/Selectable/AsyncSelect/IAsyncSelect.d.ts +3 -0
  37. package/dist/components/molecules/Selectable/Select/ISelect.d.ts +36 -0
  38. package/dist/components/molecules/Selectable/Select/Select.d.ts +7 -0
  39. package/dist/components/molecules/Selectable/SelectButton/ISelectButton.d.ts +9 -0
  40. package/dist/components/molecules/Selectable/SelectButton/Option.d.ts +4 -0
  41. package/dist/components/molecules/Selectable/SelectButton/SelectButton.d.ts +7 -0
  42. package/dist/components/molecules/Selectable/SelectCountry/Option.d.ts +2 -0
  43. package/dist/components/molecules/Selectable/SelectCountry/Prefix.d.ts +3 -0
  44. package/dist/components/molecules/Selectable/SelectCountry/SelectCountry.d.ts +7 -0
  45. package/dist/components/molecules/Selectable/SelectCountry/SingleValue.d.ts +3 -0
  46. package/dist/components/molecules/Selectable/atoms/ClearIndicator.d.ts +2 -0
  47. package/dist/components/molecules/Selectable/atoms/Container.d.ts +7 -0
  48. package/dist/components/molecules/Selectable/atoms/DropdownIndicator.d.ts +2 -0
  49. package/dist/components/molecules/Selectable/atoms/Option.d.ts +2 -0
  50. package/dist/components/molecules/Selectable/atoms/Placeholder.d.ts +2 -0
  51. package/dist/components/molecules/Selectable/atoms/SingleValue.d.ts +3 -0
  52. package/dist/components/molecules/Summary/Summary.d.ts +16 -0
  53. package/dist/components/molecules/Tab/ITab.d.ts +6 -0
  54. package/dist/components/molecules/Tab/Tab.d.ts +7 -0
  55. package/dist/components/molecules/TabNav/TabNav.d.ts +6 -0
  56. package/dist/components/organisms/Navigation/Navigation.d.ts +6 -0
  57. package/dist/components/templates/Main/Main.d.ts +11 -0
  58. package/dist/components/templates/Shipment/Shipment.d.ts +13 -0
  59. package/dist/index.d.ts +2 -2
  60. package/dist/tailwind.css +1 -1
  61. package/dist/types/Template.d.ts +3 -0
  62. package/dist/types/Tokens.d.ts +24 -0
  63. package/dist/ui-react.mjs +2289 -2090
  64. package/dist/ui-react.umd.js +22 -22
  65. package/package.json +3 -3
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  For usage with tailwind config, install:
11
11
 
12
12
  ```shell
13
- npm i
13
+ npm i @tailwindcss/forms
14
14
  ```
15
15
 
16
16
  ## Getting started
@@ -32,24 +32,21 @@ import { Button } from '@aveonline/ui-react'
32
32
  `tailwind.config.js`
33
33
 
34
34
  ```ts
35
- const tailwindConfig = require('@aveonline/ui-react/tailwind.config.js')
36
- const config = { ...tailwindConfig }
37
- module.exports = config
38
- ```
39
-
40
- or
35
+ /** @type {import('tailwindcss').Config} */
41
36
 
42
- ```ts
43
- module.exports = {
44
- 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
45
48
  }
46
- ```
47
49
 
48
- `postcss.config.js`
49
-
50
- ```ts
51
- const postcssConfig = require('@aveonline/ui-react/postcss.config.js')
52
- const config = { ...postcssConfig }
53
50
  module.exports = config
54
51
  ```
55
52
 
@@ -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;
@@ -1,3 +1,6 @@
1
1
  export interface IAvatar {
2
+ /**
3
+ * Adjust size
4
+ */
2
5
  size: 'sm' | 'xs' | 'md' | 'lg';
3
6
  }
@@ -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;
@@ -1,5 +1,11 @@
1
1
  import { IChildren } from '../../../types';
2
2
  export interface IBadge extends IChildren {
3
+ /**
4
+ * Option list badges availables
5
+ */
3
6
  variant: 'neutral' | 'info' | 'success' | 'warning' | 'critical';
7
+ /**
8
+ * Sizes
9
+ */
4
10
  size?: 'sm' | 'md';
5
11
  }
@@ -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;
@@ -3,14 +3,41 @@ export declare type Variant = 'primary' | 'basic' | 'destructive' | 'plain' | 'p
3
3
  declare type Size = 'md' | 'sm';
4
4
  export declare type Align = 'start' | 'center' | 'end';
5
5
  interface IButton {
6
+ /**
7
+ * Is this the principal call to action on the page?
8
+ */
6
9
  variant?: Variant;
10
+ /**
11
+ * Button contents how label or label + icons
12
+ */
7
13
  children?: ReactNode;
14
+ /**
15
+ * Adjust size
16
+ */
8
17
  size?: Size;
18
+ /**
19
+ * How large should the button be?
20
+ */
9
21
  fullWidth?: boolean;
22
+ /**
23
+ * State load
24
+ */
10
25
  isLoading?: boolean;
26
+ /**
27
+ * State disabled
28
+ */
11
29
  isDisabled?: boolean;
30
+ /**
31
+ * Position align children elements
32
+ */
12
33
  align?: Align;
34
+ /**
35
+ * When only have one icon, not children string
36
+ */
13
37
  onlyOneIcon?: boolean;
38
+ /**
39
+ * Emit event handle click
40
+ */
14
41
  onClick?: MouseEventHandler<HTMLButtonElement | HTMLDivElement> | (() => void);
15
42
  }
16
43
  interface 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,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;
@@ -1,5 +1,11 @@
1
1
  import type { IColorText, IWeight, ILineHeightHeading, IFontSizeHeading, IClassName, IChildren } from '../../../types';
2
2
  export interface IHeading extends IChildren, IClassName, IWeight, ILineHeightHeading, IColorText, IFontSizeHeading {
3
+ /**
4
+ * Variant heading
5
+ */
3
6
  variant?: 'subheading' | 'heading' | 'sm' | 'md' | 'lg' | 'xl';
7
+ /**
8
+ * Tag html heading availables
9
+ */
4
10
  as?: Extract<keyof JSX.IntrinsicElements, 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;
5
11
  }
@@ -2,11 +2,29 @@ export declare type ISize = 'sm' | 'md' | 'lg';
2
2
  export declare type IColor = 'success' | 'warning' | 'disabled' | 'active' | 'hovered' | 'subdued' | 'default' | 'critical' | 'primary';
3
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
4
  interface IconProps {
5
+ /**
6
+ * Sizes availables
7
+ */
5
8
  size?: ISize;
9
+ /**
10
+ * Color icons
11
+ */
6
12
  color?: IColor;
13
+ /**
14
+ * Name icon svg
15
+ */
7
16
  kind?: IKind;
17
+ /**
18
+ * Type cursor
19
+ */
8
20
  cursor?: 'pointer' | 'default';
21
+ /**
22
+ * Optional event click
23
+ */
9
24
  onClick?: () => void;
25
+ /**
26
+ * More class optional container
27
+ */
10
28
  className?: string;
11
29
  }
12
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;
@@ -3,13 +3,37 @@ declare type Change = {
3
3
  checked: boolean;
4
4
  };
5
5
  declare type IPropsRadio = {
6
+ /**
7
+ * ID unique
8
+ */
6
9
  id?: string;
10
+ /**
11
+ * Name unique
12
+ */
7
13
  name?: string;
14
+ /**
15
+ * Control for disabled radio
16
+ */
8
17
  isDisabled?: boolean;
18
+ /**
19
+ * Value radio
20
+ */
9
21
  value?: string | number;
22
+ /**
23
+ * Option for checked default
24
+ */
10
25
  defaultChecked?: boolean;
26
+ /**
27
+ * Label string link with radio
28
+ */
11
29
  label?: string;
30
+ /**
31
+ * Help text for more info
32
+ */
12
33
  helpText?: string;
34
+ /**
35
+ * Event for control to checked and value
36
+ */
13
37
  onChange?: (value: Change) => void;
14
38
  [rest: string]: any;
15
39
  };
@@ -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;
@@ -1,7 +1,19 @@
1
1
  interface ISwitch {
2
+ /**
3
+ * Whether or not the switch is checked.
4
+ */
2
5
  isSelected: boolean;
6
+ /**
7
+ * Disabled switch.
8
+ */
3
9
  isDisabled?: boolean;
10
+ /**
11
+ * The name used when using this component inside a form.
12
+ */
4
13
  name?: string;
14
+ /**
15
+ * The function to call when the switch is toggled.
16
+ */
5
17
  onChange(checked: boolean): void;
6
18
  }
7
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;
@@ -1,6 +1,12 @@
1
1
  import type { IColorText, IWeight, ILineHeightText, IFontSizeText, IChildren, IClassName } from '../../../types';
2
2
  export interface IText extends IColorText, IWeight, ILineHeightText, IFontSizeText, IChildren, IClassName {
3
+ /**
4
+ * Variant heading
5
+ */
3
6
  variant?: 'button' | 'body' | 'highlight' | 'caption';
7
+ /**
8
+ * Tag html availables
9
+ */
4
10
  as?: Extract<keyof JSX.IntrinsicElements, 'span' | 'p' | 'label'>;
5
11
  [rest: string]: any;
6
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,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,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;
@@ -10,8 +10,17 @@ interface ICardSelect {
10
10
  error?: string;
11
11
  }
12
12
  declare type IPropsCardSelect = {
13
+ /**
14
+ * Array items with content for card
15
+ */
13
16
  items: ICardSelect[];
17
+ /**
18
+ * Checked item
19
+ */
14
20
  checkedItem: ICardSelect | undefined;
21
+ /**
22
+ * Event handler for change selection
23
+ */
15
24
  onChange: (value: ICardSelect) => void;
16
25
  };
17
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,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 @@
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 @@
1
+ export declare function PadlockSvg(): JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { IHeader } from './IHeader';
2
+ /**
3
+ * Atom: Header
4
+ * The top bar is a header component that allows merchants to access menus, and navigate by clicking on the logo. It’s always visible at the top of interfaces.
5
+ */
6
+ declare function Header({ hasLogo, className, ...rest }: IHeader): JSX.Element;
7
+ export default Header;
@@ -1,7 +1,16 @@
1
1
  import type { IChildren, IClassName } from '../../../types';
2
2
  import { IColor, IKind } from '../../atoms/Icon';
3
3
  export interface IInlineError extends IChildren, IClassName {
4
+ /**
5
+ * Sizes availables
6
+ */
4
7
  size?: 'lg' | 'sm';
8
+ /**
9
+ * Icons availables
10
+ */
5
11
  icon?: IKind;
12
+ /**
13
+ * Colors icons
14
+ */
6
15
  colorIcon?: IColor;
7
16
  }
@@ -0,0 +1,7 @@
1
+ import type { IInlineError } from './IInlineError';
2
+ /**
3
+ * Atom: InlineError
4
+ * Inline errors are brief, in-context messages that tell merchants something went wrong with a single or group of inputs in a form. Use inline errors to help merchants understand why a form input may not be valid and how to fix it.
5
+ */
6
+ declare function InlineError({ children, size, icon, colorIcon, className, ...props }: IInlineError): JSX.Element;
7
+ export default InlineError;
@@ -1,12 +1,36 @@
1
1
  import { IChildren } from '../../../types';
2
2
  interface IPropsModal extends IChildren {
3
+ /**
4
+ * Crontol open and close modal
5
+ */
3
6
  isOpen?: boolean;
7
+ /**
8
+ * Title main
9
+ */
4
10
  title?: string;
11
+ /**
12
+ * Reference to icon with onclick on the header
13
+ */
5
14
  iconTitle?: JSX.Element;
15
+ /**
16
+ * Subtitle secondary
17
+ */
6
18
  subtitle?: string;
19
+ /**
20
+ * Container for elements align to x end
21
+ */
7
22
  footer?: JSX.Element;
23
+ /**
24
+ * Control border for children
25
+ */
8
26
  hasBorder?: Array<'top' | 'bottom'>;
27
+ /**
28
+ * Show icon delete from header
29
+ */
9
30
  showClose?: boolean;
31
+ /**
32
+ * Event for close modal
33
+ */
10
34
  onClose?: (value: boolean) => void;
11
35
  }
12
36
  export type { IPropsModal };
@@ -0,0 +1,7 @@
1
+ import type { IPropsModal } from './IModal';
2
+ /**
3
+ * Molecule: Modal
4
+ * Modals are overlays that require merchants to take an action before they can continue interacting with the rest of Shopify. They can be disruptive and should be used thoughtfully and sparingly.
5
+ */
6
+ declare function Modal({ title, iconTitle, subtitle, footer, isOpen, hasBorder, showClose, onClose, children }: IPropsModal): JSX.Element;
7
+ export default Modal;
@@ -0,0 +1,7 @@
1
+ import type { IAsyncSelect } from './IAsyncSelect';
2
+ /**
3
+ * Molecule: AsyncSelect
4
+ * Async select lets merchants choose one option from an options menu. Consider select when you have 4 or more options, to avoid cluttering the interface. Data from network
5
+ */
6
+ declare function AsyncSelect({ placeholder, id, name, error, helpText, hasLabelPlaceholder, isDisabled, isClearable, defaultValue, onChange, loadOptions, ...props }: IAsyncSelect): JSX.Element;
7
+ export default AsyncSelect;
@@ -1,4 +1,7 @@
1
1
  import type { ISelect, IOption } from '../Select';
2
2
  export interface IAsyncSelect extends Omit<ISelect, 'options'> {
3
+ /**
4
+ * Handle change search async
5
+ */
3
6
  loadOptions?: (inputValue: string) => Promise<IOption[]> | undefined;
4
7
  }
@@ -3,16 +3,52 @@ export declare type IOption = {
3
3
  value: string | number;
4
4
  };
5
5
  export interface ISelect {
6
+ /**
7
+ * Array of options that populate the select menu
8
+ */
6
9
  options?: IOption[];
10
+ /**
11
+ * Is the select disabled
12
+ */
7
13
  isDisabled?: boolean;
14
+ /**
15
+ * Placeholder for the select value
16
+ */
8
17
  placeholder?: string;
18
+ /**
19
+ * Object default of options
20
+ */
9
21
  defaultValue?: IOption;
22
+ /**
23
+ * Message error
24
+ */
10
25
  error?: string;
26
+ /**
27
+ * The id to set on the SelectContainer component.
28
+ */
11
29
  id?: string;
30
+ /**
31
+ * Name of the HTML Input (optional - without this, no input will be rendered)
32
+ */
12
33
  name?: string;
34
+ /**
35
+ * Handle change events on the select
36
+ */
13
37
  onChange?: (value: IOption) => void;
38
+ /**
39
+ * Message for help human
40
+ */
14
41
  helpText?: string;
42
+ /**
43
+ * Placeholder to convert on label
44
+ */
15
45
  hasLabelPlaceholder?: boolean;
46
+ /**
47
+ * Whether to enable search functionality
48
+ */
16
49
  isSearchable?: boolean;
50
+ /**
51
+ * Is the select value clearable
52
+ */
17
53
  isClearable?: boolean;
18
54
  }
@@ -0,0 +1,7 @@
1
+ import type { ISelect } from './ISelect';
2
+ /**
3
+ * Atom: Select
4
+ * Select lets merchants choose one option from an options menu. Consider select when you have 4 or more options, to avoid cluttering the interface.
5
+ */
6
+ declare function Select({ options, placeholder, defaultValue, isDisabled, id, error, name, helpText, hasLabelPlaceholder, onChange, isSearchable, isClearable, ...props }: ISelect): JSX.Element;
7
+ export default Select;
@@ -10,7 +10,16 @@ export interface IOptionSelectButtonGroup {
10
10
  options: IOption[];
11
11
  }
12
12
  export interface ISelectButton extends Omit<ISelect, 'options'> {
13
+ /**
14
+ * Array of options that populate the select menu - two structures optionals
15
+ */
13
16
  options: IOptionSelectButton[] | IOptionSelectButtonGroup[];
17
+ /**
18
+ * Handle click for first element, options no selectable, only emit click
19
+ */
14
20
  onClickFirstItem?: (value: IOptionSelectButton) => void;
21
+ /**
22
+ * Position align children elements atom[Button]
23
+ */
15
24
  alignButton?: Align;
16
25
  }
@@ -0,0 +1,4 @@
1
+ import type { Align } from '../../../atoms/Button';
2
+ export declare const Option: ({ alignButton, ...allProps }: {
3
+ alignButton: Align;
4
+ }) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { ISelectButton } from './ISelectButton';
2
+ /**
3
+ * Molecule: SelectButton
4
+ * Select with button for first item lets merchants choose one option from an options menu. Consider select when you have 4 or more options, to avoid cluttering the interface.
5
+ */
6
+ declare function SelectButton({ options, placeholder, defaultValue, isDisabled, id, error, name, helpText, hasLabelPlaceholder, onChange, isSearchable, isClearable, alignButton, onClickFirstItem, ...props }: ISelectButton): JSX.Element;
7
+ export default SelectButton;
@@ -0,0 +1,2 @@
1
+ import type { OptionProps } from 'react-select';
2
+ export declare const Option: (props: OptionProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const Prefix: ({ isDisabled }: {
2
+ isDisabled?: boolean | undefined;
3
+ }) => JSX.Element;