@7shifts/sous-chef 2.16.2 → 2.17.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 (35) hide show
  1. package/dist/actions/Button/Button.d.ts +12 -3
  2. package/dist/actions/Button/constants.d.ts +27 -0
  3. package/dist/actions/Button/types.d.ts +4 -0
  4. package/dist/core/DataTable/types.d.ts +3 -7
  5. package/dist/core/DataTableRow/DataTableRow.d.ts +1 -1
  6. package/dist/core/Flex/Flex.d.ts +1 -0
  7. package/dist/feedback/Spinner/constants.d.ts +6 -0
  8. package/dist/forms/Label/Label.d.ts +1 -0
  9. package/dist/forms/Label/useLabelTooltip.d.ts +1 -1
  10. package/dist/forms/RadioGroupBoxOption/RadioGroupBoxOption.d.ts +11 -0
  11. package/dist/forms/RadioGroupBoxOption/index.d.ts +1 -0
  12. package/dist/forms/RadioGroupField/BoxOptions/BoxOptions.d.ts +8 -0
  13. package/dist/forms/RadioGroupField/BoxOptions/index.d.ts +1 -0
  14. package/dist/forms/RadioGroupField/RadioGroupField.d.ts +11 -3
  15. package/dist/forms/RadioGroupField/RadioOptions/RadioOptions.d.ts +9 -0
  16. package/dist/forms/RadioGroupField/RadioOptions/index.d.ts +1 -0
  17. package/dist/forms/RadioGroupField/domain.d.ts +6 -0
  18. package/dist/forms/SelectField/CustomContainer/CustomContainer.d.ts +2 -0
  19. package/dist/forms/SelectField/CustomContainer/index.d.ts +1 -0
  20. package/dist/forms/SelectField/CustomControl/CustomControl.d.ts +3 -5
  21. package/dist/forms/SelectField/CustomOption/CustomOption.d.ts +2 -7
  22. package/dist/forms/SelectField/useSelectField.d.ts +5 -5
  23. package/dist/index.css +162 -7
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.js +386 -207
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.modern.js +386 -208
  28. package/dist/index.modern.js.map +1 -1
  29. package/dist/layout/Card/Card.d.ts +11 -0
  30. package/dist/layout/Card/index.d.ts +1 -0
  31. package/dist/layout/index.d.ts +2 -0
  32. package/dist/overlay/KebabMenu/KebabMenu.d.ts +6 -0
  33. package/dist/overlay/KebabMenu/index.d.ts +1 -0
  34. package/dist/overlay/Menu/types.d.ts +6 -0
  35. package/package.json +1 -1
@@ -1,20 +1,29 @@
1
1
  import React from 'react';
2
- declare type ButtonTheme = 'default' | 'primary' | 'danger' | 'upsell' | 'marketing' | 'hollow' | 'link-primary' | 'link-danger' | 'link-upsell' | 'link-toolbar' | 'link-contrast' | 'link-icon';
2
+ import type { ButtonTheme, ButtonSize, ButtonType, ButtonTarget } from './types';
3
3
  declare type Props = {
4
4
  children: React.ReactNode;
5
- type?: 'button' | 'submit' | 'reset';
5
+ type?: ButtonType;
6
6
  /** It controls the button theme */
7
7
  theme?: ButtonTheme;
8
8
  disabled?: boolean;
9
9
  onClick?: React.MouseEventHandler;
10
10
  id?: string;
11
+ /**
12
+ * @deprecated use the `size='min-width-100'` instead
13
+ */
11
14
  wide?: boolean;
12
15
  loading?: boolean;
13
16
  /** This will show a black tooltip when the user hover the button */
14
17
  title?: string;
15
18
  href?: string;
16
- target?: '_blank' | '_self';
19
+ target?: ButtonTarget;
17
20
  testId?: string;
21
+ /**
22
+ * This prop controls how the button grows having the following options:<br/>
23
+ * *full-width*: Will grow to fill the size of the container it is placed within.
24
+ * *min-width-100*: It will have a `min-width: 100` style. It is used for CTA buttons in forms and modals.
25
+ */
26
+ size?: ButtonSize;
18
27
  };
19
28
  declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
20
29
  export default _default;
@@ -0,0 +1,27 @@
1
+ export declare const BUTTON_SIZES: {
2
+ FULL_WIDTH: "full-width";
3
+ MIN_WIDTH_100: "min-width-100";
4
+ };
5
+ export declare const BUTTON_THEMES: {
6
+ DEFAULT: "default";
7
+ PRIMARY: "primary";
8
+ DANGER: "danger";
9
+ UPSELL: "upsell";
10
+ MARKETING: "marketing";
11
+ HOLLOW: "hollow";
12
+ LINK_PRIMARY: "link-primary";
13
+ LINK_DANGER: "link-danger";
14
+ LINK_UPSELL: "link-upsell";
15
+ LINK_TOOLBAR: "link-toolbar";
16
+ LINK_CONTRAST: "link-contrast";
17
+ LINK_ICON: "link-icon";
18
+ };
19
+ export declare const BUTTON_TYPES: {
20
+ BUTTON: "button";
21
+ SUBMIT: "submit";
22
+ RESET: "reset";
23
+ };
24
+ export declare const BUTTON_TARGETS: {
25
+ BLANK: "_blank";
26
+ SELF: "_self";
27
+ };
@@ -0,0 +1,4 @@
1
+ export declare type ButtonTheme = 'default' | 'primary' | 'danger' | 'upsell' | 'marketing' | 'hollow' | 'link-primary' | 'link-danger' | 'link-upsell' | 'link-toolbar' | 'link-contrast' | 'link-icon';
2
+ export declare type ButtonSize = 'full-width' | 'min-width-100';
3
+ export declare type ButtonType = 'button' | 'submit' | 'reset';
4
+ export declare type ButtonTarget = '_blank' | '_self';
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import Button from '../../actions/Button/Button';
3
+ import { MenuAction } from '../../overlay/Menu/types';
3
4
  export declare type Column = {
4
5
  name: string;
5
6
  label?: React.ReactNode;
@@ -22,17 +23,12 @@ export declare type CustomComponent<T> = {
22
23
  columnSizes?: number[];
23
24
  columns?: Column[];
24
25
  };
25
- declare type BaseAction = {
26
- action?: string;
27
- label: React.ReactNode;
28
- onAction: (e: React.MouseEvent | React.KeyboardEvent) => void;
29
- };
30
26
  declare type KebabAction = {
31
27
  showInKebab?: true;
32
- } & BaseAction;
28
+ } & MenuAction;
33
29
  declare type ButtonAction = {
34
30
  buttonProps?: Pick<React.ComponentPropsWithoutRef<typeof Button>, 'theme' | 'disabled' | 'loading' | 'title'>;
35
31
  showInKebab: false;
36
- } & BaseAction;
32
+ } & MenuAction;
37
33
  export declare type Action = KebabAction | ButtonAction;
38
34
  export {};
@@ -7,5 +7,5 @@ declare type Props = {
7
7
  actions?: Action[];
8
8
  hasDefaultPadding?: boolean;
9
9
  } & Omit<React.HTMLProps<HTMLDivElement>, 'css'>;
10
- declare const DataTableRow: React.ForwardRefExoticComponent<Pick<Props, "children" | "type" | "default" | "disabled" | "onClick" | "id" | "title" | "href" | "target" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "key" | "size" | "color" | "className" | "height" | "lang" | "max" | "media" | "method" | "min" | "name" | "width" | "role" | "tabIndex" | "crossOrigin" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "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-labelledby" | "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" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "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" | "contextMenu" | "list" | "start" | "wrap" | "dir" | "checked" | "value" | "placeholder" | "prefix" | "content" | "translate" | "hidden" | "open" | "multiple" | "autoFocus" | "defaultValue" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "minLength" | "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" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "draggable" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "isSelected" | "actions" | "hasDefaultPadding"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const DataTableRow: React.ForwardRefExoticComponent<Pick<Props, "children" | "type" | "default" | "disabled" | "onClick" | "id" | "title" | "href" | "target" | "size" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "key" | "color" | "className" | "height" | "lang" | "max" | "media" | "method" | "min" | "name" | "width" | "role" | "tabIndex" | "crossOrigin" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "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-labelledby" | "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" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "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" | "contextMenu" | "list" | "start" | "wrap" | "dir" | "checked" | "value" | "placeholder" | "prefix" | "content" | "translate" | "hidden" | "open" | "multiple" | "autoFocus" | "defaultValue" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "minLength" | "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" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "draggable" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "isSelected" | "actions" | "hasDefaultPadding"> & React.RefAttributes<HTMLDivElement>>;
11
11
  export default DataTableRow;
@@ -12,6 +12,7 @@ declare type Props = {
12
12
  flexItems?: boolean;
13
13
  flexWrap?: FlexWrap;
14
14
  testId?: string;
15
+ extraClass?: string;
15
16
  };
16
17
  /**
17
18
  * Flex is a internal component used by Stack and Inline. DON'T use this component outside of Sous Chef
@@ -0,0 +1,6 @@
1
+ export declare const SPINNER_THEMES: {
2
+ MINT: "mint";
3
+ DISABLED: "disabled";
4
+ CONTRAST: "contrast";
5
+ PRIDE: "pride";
6
+ };
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  declare type Props = {
3
3
  htmlFor: string;
4
4
  children: React.ReactNode;
5
+ truncate?: boolean;
5
6
  };
6
7
  declare const Label: React.FC<Props>;
7
8
  export default Label;
@@ -3,5 +3,5 @@ declare type UseLabelTooltip = {
3
3
  showTooltip: boolean;
4
4
  shouldTruncate: boolean;
5
5
  };
6
- export declare const useLabelTooltip: (labelId: string, tooltipContent: React.ReactNode) => UseLabelTooltip;
6
+ export declare const useLabelTooltip: (labelId: string, tooltipContent: React.ReactNode, truncate: boolean) => UseLabelTooltip;
7
7
  export {};
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ declare type Props = {
3
+ value: string | number;
4
+ id?: string;
5
+ label?: React.ReactNode;
6
+ caption?: React.ReactNode;
7
+ children?: React.ReactNode;
8
+ testId?: string;
9
+ };
10
+ declare const RadioGroupBoxOption: ({ value, id: inputId, label, caption, testId, children }: Props) => JSX.Element;
11
+ export default RadioGroupBoxOption;
@@ -0,0 +1 @@
1
+ export { default } from './RadioGroupBoxOption';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ declare type Props = {
3
+ children: React.ReactNode;
4
+ columns?: 2 | 3 | 4;
5
+ testId?: string;
6
+ };
7
+ declare const BoxOptions: ({ children, columns, testId }: Props) => JSX.Element;
8
+ export default BoxOptions;
@@ -0,0 +1 @@
1
+ export { default } from './BoxOptions';
@@ -1,17 +1,25 @@
1
1
  import React from 'react';
2
+ import RadioGroupOption from '../RadioGroupOption';
3
+ import RadioGroupBoxOption from '../RadioGroupBoxOption';
2
4
  declare type Props = {
3
5
  name: string;
4
6
  value?: string | number;
5
7
  onChange?: (e: string | number) => void;
6
8
  label?: React.ReactNode;
7
9
  error?: React.ReactNode;
8
- /** When true it will place the options on the same line up to 4 options per line. */
10
+ /**
11
+ * **DEPRECATED** *Use the `columns` prop instead.*<br/><br/>When true it will place the options on the same line up to 4 options per line. It only applies when using `RadioGroupOption` as children
12
+ *
13
+ * @deprecated use the `columns` prop to tell how many inline columns you want. This will signal you want inline radio options
14
+ */
9
15
  inline?: boolean;
10
16
  disabled?: boolean;
11
- children: React.ReactNode;
17
+ children: React.ReactElement<typeof RadioGroupOption> | React.ReactElement<typeof RadioGroupOption>[] | React.ReactElement<typeof RadioGroupBoxOption> | React.ReactElement<typeof RadioGroupBoxOption>[];
12
18
  /** This is used for setting the data-testid */
13
19
  testId?: string;
20
+ /** It states the radio options will be inline and defines how many columns it will have */
21
+ columns?: 2 | 3 | 4;
14
22
  };
15
23
  /** RadioGroupField form element. */
16
- declare const RadioGroupField: React.FC<Props>;
24
+ declare const RadioGroupField: ({ name, value, onChange, label, error, inline, disabled, children, testId, columns }: Props) => JSX.Element;
17
25
  export default RadioGroupField;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ declare type Props = {
3
+ children: React.ReactNode;
4
+ inline: boolean;
5
+ columns?: 2 | 3 | 4;
6
+ testId?: string;
7
+ };
8
+ declare const RadioOptions: ({ children, inline, columns, testId }: Props) => JSX.Element;
9
+ export default RadioOptions;
@@ -0,0 +1 @@
1
+ export { default } from './RadioOptions';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const OPTION_TYPES: {
3
+ BOX: "BOX";
4
+ RADIO: "RADIO";
5
+ };
6
+ export declare const getOptionsType: (children: React.ReactNode) => keyof typeof OPTION_TYPES;
@@ -0,0 +1,2 @@
1
+ declare const _default: typeof import("react-select/src/components/containers").SelectContainer;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default } from './CustomContainer';
@@ -1,7 +1,5 @@
1
- import React, { ComponentProps } from 'react';
1
+ import { ComponentProps } from 'react';
2
2
  import { components } from 'react-select';
3
- declare type Props = ComponentProps<typeof components.Control> & {
4
- CustomPrefixComponent: React.ElementType;
5
- };
6
- declare function CustomControl({ children, CustomPrefixComponent, ...props }: Props): JSX.Element;
3
+ declare type Props = ComponentProps<typeof components.Control>;
4
+ declare function CustomControl({ children, ...props }: Props): JSX.Element;
7
5
  export default CustomControl;
@@ -1,7 +1,2 @@
1
- import React, { ComponentProps } from 'react';
2
- import { components } from 'react-select';
3
- declare type Props = ComponentProps<typeof components.Option> & {
4
- CustomComponent: React.ElementType;
5
- };
6
- declare function CustomOption({ children, CustomComponent, ...props }: Props): JSX.Element;
7
- export default CustomOption;
1
+ declare const _default: typeof import("react-select/src/components/Option").default;
2
+ export default _default;
@@ -1,12 +1,12 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { Props } from './SelectField';
3
3
  export declare const useSelectField: <T extends unknown>({ asToolbarFilter, caption, disabled, error, id, isClearable, label, menuShouldScrollIntoView, name, noOptionsMessage, options, onBlur, onChange, placeholder, value, defaultValue, CustomOption: UserCustomOption, SelectedOptionPrefix, testId }: Props<T>) => {
4
- selectProps: Pick<import("react-select").Props<import("react-select").OptionTypeBase, boolean, import("react-select").GroupTypeBase<any>>, React.ReactText> & import("react-select/src/stateManager").Props<import("react-select").OptionTypeBase, boolean, import("react-select").GroupTypeBase<any>> & import("react-select").Props<import("react-select").OptionTypeBase, boolean, import("react-select").GroupTypeBase<any>>;
4
+ selectProps: Pick<import("react-select").Props<import("react-select").OptionTypeBase, boolean, import("react-select").GroupTypeBase<any>>, import("react").ReactText> & import("react-select/src/stateManager").Props<import("react-select").OptionTypeBase, boolean, import("react-select").GroupTypeBase<any>> & import("react-select").Props<import("react-select").OptionTypeBase, boolean, import("react-select").GroupTypeBase<any>>;
5
5
  fieldProps: {
6
- caption: React.ReactNode;
7
- error: React.ReactNode;
6
+ caption: import("react").ReactNode;
7
+ error: import("react").ReactNode;
8
8
  id: string;
9
- label: React.ReactNode;
9
+ label: import("react").ReactNode;
10
10
  name: string;
11
11
  };
12
12
  };
package/dist/index.css CHANGED
@@ -51,10 +51,6 @@ Please ask a designer if you have questions about which colours to use.
51
51
  margin: 0;
52
52
  }
53
53
 
54
- ._umc73 {
55
- min-width: 0;
56
- }
57
-
58
54
  ._kf0KG {
59
55
  align-items: center;
60
56
  }
@@ -330,10 +326,14 @@ Please ask a designer if you have questions about which colours to use.
330
326
  margin-top: 2px;
331
327
  }
332
328
 
333
- ._1R_gC {
329
+ ._3mZ7B {
334
330
  min-width: 100px;
335
331
  }
336
332
 
333
+ ._13ze_ {
334
+ min-width: 100%;
335
+ }
336
+
337
337
  ._3ig9y {
338
338
  padding: 8px;
339
339
  }
@@ -1907,6 +1907,9 @@ Please ask a designer if you have questions about which colours to use.
1907
1907
  ._3CaV0 {
1908
1908
  max-width: 500px;
1909
1909
  }
1910
+ ._2i-Ll > div {
1911
+ min-width: 0;
1912
+ }
1910
1913
  /*********************************
1911
1914
  For new colours, see _colors.scss.
1912
1915
  **********************************/
@@ -2211,6 +2214,83 @@ The smaller the number the lighter the color. So $eggplant-100 would be light pu
2211
2214
  The base colour is the default colour and is numbered with 400. If someone says "use Tangerine" they are referring to the base color.
2212
2215
  Please ask a designer if you have questions about which colours to use.
2213
2216
  */
2217
+ ._1Tw96 {
2218
+ line-height: normal;
2219
+ padding: 0;
2220
+ width: auto;
2221
+ float: none;
2222
+ color: #464646;
2223
+ font-family: "Proxima Nova", sans-serif;
2224
+ font-weight: 600;
2225
+ font-size: 14px;
2226
+ min-height: 16px;
2227
+ }
2228
+
2229
+ ._1o8rK {
2230
+ overflow: hidden;
2231
+ white-space: nowrap;
2232
+ text-overflow: ellipsis;
2233
+ }
2234
+
2235
+ ._2OGKE {
2236
+ display: block;
2237
+ text-align: center;
2238
+ height: 100%;
2239
+ color: #767676;
2240
+ }
2241
+ ._2OGKE input {
2242
+ border: 0px;
2243
+ clip: rect(0px, 0px, 0px, 0px);
2244
+ height: 1px;
2245
+ width: 1px;
2246
+ margin: -1px;
2247
+ padding: 0px;
2248
+ overflow: hidden;
2249
+ white-space: nowrap;
2250
+ position: absolute;
2251
+ }
2252
+ input:checked ~ ._23M9k {
2253
+ border-color: #a7b7ea;
2254
+ box-shadow: 0 0 8px #a7b7ea;
2255
+ cursor: default;
2256
+ }
2257
+ ._23M9k {
2258
+ border: 1px solid #D5D5D5;
2259
+ border-radius: 4px;
2260
+ padding: 16px;
2261
+ display: block;
2262
+ cursor: pointer;
2263
+ height: 100%;
2264
+ box-sizing: border-box;
2265
+ display: flex;
2266
+ justify-content: center;
2267
+ word-break: break-word;
2268
+ }
2269
+ ._23M9k:hover {
2270
+ box-shadow: 0 0 8px #D5D5D5;
2271
+ }
2272
+ ._1r-Wg {
2273
+ line-height: normal;
2274
+ padding: 0;
2275
+ width: auto;
2276
+ float: none;
2277
+ color: #464646;
2278
+ font-family: "Proxima Nova", sans-serif;
2279
+ font-weight: 600;
2280
+ font-size: 14px;
2281
+ min-height: 16px;
2282
+ }
2283
+ /*********************************
2284
+ For new colours, see _colors.scss.
2285
+ **********************************/
2286
+ /* stylelint-disable color-no-hex */
2287
+ /*
2288
+ These are the colour variables to be used around the webapp.
2289
+ The variables are set up to describe the color and number which represents the lightness of the color.
2290
+ The smaller the number the lighter the color. So $eggplant-100 would be light purple and $eggplant-600 would be dark purple.
2291
+ The base colour is the default colour and is numbered with 400. If someone says "use Tangerine" they are referring to the base color.
2292
+ Please ask a designer if you have questions about which colours to use.
2293
+ */
2214
2294
  ._1Clmp {
2215
2295
  position: relative;
2216
2296
  }
@@ -2780,8 +2860,7 @@ Please ask a designer if you have questions about which colours to use.
2780
2860
  ._vgLin {
2781
2861
  padding: 16px 12px 16px 12px;
2782
2862
  background: #F3F3F3;
2783
- margin-left: 1px;
2784
- margin-right: 1px;
2863
+ margin: 1px;
2785
2864
  position: relative;
2786
2865
  border-radius: 3px;
2787
2866
  box-shadow: 0 0 0 1px rgba(63, 63, 68, 0.05), 0 1px 3px 0 rgba(63, 63, 68, 0.15);
@@ -2800,6 +2879,14 @@ Please ask a designer if you have questions about which colours to use.
2800
2879
  flex-grow: 1;
2801
2880
  color: #464646;
2802
2881
  }
2882
+ ._3n6S7 a {
2883
+ text-decoration: underline;
2884
+ color: #464646;
2885
+ }
2886
+ ._3n6S7 a:hover {
2887
+ cursor: pointer;
2888
+ color: #323232;
2889
+ }
2803
2890
 
2804
2891
  ._2pMYs {
2805
2892
  margin-bottom: 4px;
@@ -3086,4 +3173,72 @@ Please ask a designer if you have questions about which colours to use.
3086
3173
  ._2G3ML {
3087
3174
  background-color: #ceecf5;
3088
3175
  color: #367385;
3176
+ }
3177
+ /*********************************
3178
+ For new colours, see _colors.scss.
3179
+ **********************************/
3180
+ /* stylelint-disable color-no-hex */
3181
+ /*
3182
+ These are the colour variables to be used around the webapp.
3183
+ The variables are set up to describe the color and number which represents the lightness of the color.
3184
+ The smaller the number the lighter the color. So $eggplant-100 would be light purple and $eggplant-600 would be dark purple.
3185
+ The base colour is the default colour and is numbered with 400. If someone says "use Tangerine" they are referring to the base color.
3186
+ Please ask a designer if you have questions about which colours to use.
3187
+ */
3188
+ /* stylelint-disable color-no-hex */
3189
+ /*
3190
+ These are the colour variables to be used around the webapp.
3191
+ The variables are set up to describe the color and number which represents the lightness of the color.
3192
+ The smaller the number the lighter the color. So $eggplant-100 would be light purple and $eggplant-600 would be dark purple.
3193
+ The base colour is the default colour and is numbered with 400. If someone says "use Tangerine" they are referring to the base color.
3194
+ Please ask a designer if you have questions about which colours to use.
3195
+ */
3196
+ ._29ZIp {
3197
+ position: relative;
3198
+ }
3199
+ ._3Q8NT {
3200
+ box-sizing: border-box;
3201
+ background: white;
3202
+ border: 1px solid #D5D5D5;
3203
+ border-radius: 8px;
3204
+ width: 100%;
3205
+ height: 100%;
3206
+ padding: 24px 20px;
3207
+ color: #464646;
3208
+ }
3209
+ ._2Fah6 {
3210
+ cursor: pointer;
3211
+ box-shadow: 0 0 1px rgba(0, 0, 0, 0.15), 0 3px 3px rgba(0, 0, 0, 0.05);
3212
+ transition: all ease-in-out 150ms;
3213
+ }
3214
+ ._2Fah6:not(._SGno0):hover {
3215
+ box-shadow: 0 0 1px rgba(0, 0, 0, 0.2), 0 3px 6px rgba(0, 0, 0, 0.2);
3216
+ background-color: #F3F3F3;
3217
+ }
3218
+ ._2Fah6:focus {
3219
+ box-shadow: 0 0 8px #a7b7ea;
3220
+ outline: none;
3221
+ }
3222
+ ._1zqRN {
3223
+ border-color: #6d87dd;
3224
+ box-shadow: 0 0 8px #a7b7ea;
3225
+ }
3226
+ ._3Hwms {
3227
+ min-height: 56px;
3228
+ }
3229
+ ._TmEUS {
3230
+ position: absolute;
3231
+ z-index: 1;
3232
+ right: 8px;
3233
+ top: 8px;
3234
+ }
3235
+
3236
+ button {
3237
+ background: none;
3238
+ color: inherit;
3239
+ border: none;
3240
+ padding: 0;
3241
+ font: inherit;
3242
+ cursor: pointer;
3243
+ text-align: inherit;
3089
3244
  }
package/dist/index.d.ts CHANGED
@@ -6,3 +6,4 @@ export * from './actions';
6
6
  export * from './overlay';
7
7
  export * from './media';
8
8
  export * from './icons';
9
+ export * from './layout';