@transferwise/components 40.2.2 → 40.2.3-beta-84f719e4cc.7

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.
@@ -1 +1 @@
1
- import classNames from"classnames";import PropTypes from"prop-types";import requiredIf from"react-required-if";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Option=function(a){var b=a["aria-label"],c=a.as,d=a.href,e=a.target,f=a.media,g=a.title,h=a.content,i=a.onClick,j=a.htmlFor,k=a.disabled,l=a.button,m=a.decision,n=a.complex,o=a.className,p=a.inverseMediaCircle,q=a.showMediaAtAllSizes,r=a.showMediaCircle;return/*#__PURE__*/_jsx(c,{className:classNames("np-option",o,{"decision-complex":n,decision:m,disabled:k,"np-option__sm-media":q}),href:d,htmlFor:j,target:e,disabled:k&&"button"===c,"aria-label":b,onClick:i,children:/*#__PURE__*/_jsxs("div",{className:"media",children:[f&&/*#__PURE__*/_jsx("div",{className:"media-left",children:r?/*#__PURE__*/_jsx("div",{className:classNames("circle circle-sm text-primary",{"circle-inverse":p}),children:f}):/*#__PURE__*/_jsx("div",{className:"np-option__no-media-circle",children:f})}),/*#__PURE__*/_jsxs("div",{className:"media-body",children:[/*#__PURE__*/_jsx("div",{className:"decision__title",children:g}),h&&/*#__PURE__*/_jsx("div",{className:"decision__content",children:h})]}),/*#__PURE__*/_jsx("div",{className:"media-right",children:l})]})})};Option.propTypes={"aria-label":PropTypes.string,media:PropTypes.node,htmlFor:PropTypes.string,title:PropTypes.node.isRequired,content:PropTypes.node,onClick:PropTypes.func,href:requiredIf(PropTypes.string,function(a){return"a"===a.as}),target:PropTypes.oneOf(["_self","_blank","_parent","_top"]),as:PropTypes.string,disabled:PropTypes.bool,button:PropTypes.node,decision:PropTypes.bool,complex:PropTypes.bool,inverseMediaCircle:PropTypes.bool,className:PropTypes.string,showMediaAtAllSizes:PropTypes.bool,showMediaCircle:PropTypes.bool},Option.defaultProps={"aria-label":void 0,as:"label",media:"",content:null,htmlFor:null,disabled:!1,button:null,onClick:null,href:null,target:void 0,decision:!0,complex:!1,inverseMediaCircle:!0,className:null,showMediaAtAllSizes:!1,showMediaCircle:!0};export default Option;
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["media","title","content","as","button","decision","disabled","complex","inverseMediaCircle","className","showMediaAtAllSizes","showMediaCircle"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import classNames from"classnames";import{forwardRef}from"react";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Option=/*#__PURE__*/forwardRef(function(a,b){var c,d=a.media,e=void 0===d?"":d,f=a.title,g=a.content,h=a.as,i=a.button,j=a.decision,k=a.disabled,l=void 0!==k&&k,m=a.complex,n=a.inverseMediaCircle,o=a.className,p=a.showMediaAtAllSizes,q=a.showMediaCircle,r=_objectWithoutProperties(a,_excluded),s=null!==(c=h)&&void 0!==c?c:"label";return/*#__PURE__*/_jsx(s,_objectSpread(_objectSpread({},r),{},{ref:b,className:classNames("np-option",o,{"decision-complex":m,decision:!(void 0!==j)||j,disabled:l,"np-option__sm-media":p}),disabled:l&&"button"===s,children:/*#__PURE__*/_jsxs("div",{className:"media",children:[e&&/*#__PURE__*/_jsx("div",{className:"media-left",children:!(void 0!==q)||q?/*#__PURE__*/_jsx("div",{className:classNames("circle circle-sm text-primary",{"circle-inverse":!(void 0!==n)||n}),children:e}):/*#__PURE__*/_jsx("div",{className:"np-option__no-media-circle",children:e})}),/*#__PURE__*/_jsxs("div",{className:"media-body",children:[/*#__PURE__*/_jsx("div",{className:"decision__title",children:f}),g&&/*#__PURE__*/_jsx("div",{className:"decision__content",children:g})]}),/*#__PURE__*/_jsx("div",{className:"media-right",children:i})]})}))});export default Option;
@@ -2,7 +2,7 @@
2
2
  * Types
3
3
  */ /**
4
4
  * Components
5
- */export{default as Accordion}from"./accordion";export{default as ActionButton}from"./actionButton";export{default as ActionOption}from"./actionOption";export{default as Alert}from"./alert";export{default as Avatar}from"./avatar";export{default as AvatarWrapper}from"./avatarWrapper";export{default as Badge}from"./badge";export{default as BottomSheet}from"./common/bottomSheet";export{default as Button}from"./button";export{default as Card}from"./card";export{default as Checkbox}from"./checkbox";export{default as CheckboxButton}from"./checkboxButton";export{default as CheckboxOption}from"./checkboxOption";export{default as Chevron}from"./chevron";export{default as Chips,Chip}from"./chips";export{default as CircularButton}from"./circularButton";export{default as DateInput}from"./dateInput";export{default as DateLookup}from"./dateLookup";export{default as Decision}from"./decision";export{default as DefinitionList}from"./definitionList";export{default as Dimmer}from"./dimmer";export{default as Drawer}from"./drawer";export{default as DropFade}from"./dropFade";export{default as DynamicFieldDefinitionList}from"./dynamicFieldDefinitionList";export{default as Emphasis}from"./emphasis";export{default as FlowNavigation}from"./flowNavigation";export{default as Header}from"./header";export{default as Image}from"./image";export{default as Info}from"./info";export{default as InlineAlert}from"./inlineAlert";export{default as InputWithDisplayFormat}from"./inputWithDisplayFormat";export{default as InstructionsList}from"./instructionsList";export{default as Link}from"./link";export{default as Loader}from"./loader";export{default as Logo}from"./logo";export{default as Markdown}from"./markdown";export{default as Modal}from"./modal";export{default as Money}from"./money";export{default as MoneyInput}from"./moneyInput";export{default as NavigationOption}from"./navigationOption";export{default as NavigationOptionsList}from"./navigationOptionsList";export{default as Nudge}from"./nudge";export{default as OverlayHeader}from"./overlayHeader";export{default as PhoneNumberInput}from"./phoneNumberInput";export{default as Popover}from"./popover";export{default as ProcessIndicator}from"./processIndicator";export{default as Provider,DirectionProvider}from"./provider";export{default as Radio}from"./radio";export{default as RadioGroup}from"./radioGroup";export{default as RadioOption}from"./radioOption";export{default as Section}from"./section";export{default as Select}from"./select";export{default as SlidingPanel}from"./slidingPanel";export{default as SnackbarPortal}from"./snackbar/Snackbar";export{default as SnackbarProvider}from"./snackbar/SnackbarProvider";export{default as Stepper}from"./stepper";export{default as Sticky}from"./sticky";export{default as Summary}from"./summary";export{default as Switch}from"./switch";export{default as SwitchOption}from"./switchOption";export{default as Tabs}from"./tabs";export{default as TextareaWithDisplayFormat}from"./textareaWithDisplayFormat";export{default as Tooltip}from"./tooltip";export{default as Typeahead}from"./typeahead";export{default as Upload}from"./upload";export{default as UploadInput}from"./uploadInput";export{SnackbarConsumer,SnackbarContext}from"./snackbar/SnackbarContext";/**
5
+ */export{default as Accordion}from"./accordion";export{default as ActionButton}from"./actionButton";export{default as ActionOption}from"./actionOption";export{default as Alert}from"./alert";export{default as Avatar}from"./avatar";export{default as AvatarWrapper}from"./avatarWrapper";export{default as Badge}from"./badge";export{default as BottomSheet}from"./common/bottomSheet";export{default as Button}from"./button";export{default as Card}from"./card";export{default as Checkbox}from"./checkbox";export{default as CheckboxButton}from"./checkboxButton";export{default as CheckboxOption}from"./checkboxOption";export{default as Chevron}from"./chevron";export{default as Chips,Chip}from"./chips";export{default as CircularButton}from"./circularButton";export{default as DateInput}from"./dateInput";export{default as DateLookup}from"./dateLookup";export{default as Decision}from"./decision";export{default as DefinitionList}from"./definitionList";export{default as Dimmer}from"./dimmer";export{default as Drawer}from"./drawer";export{default as DropFade}from"./dropFade";export{default as DynamicFieldDefinitionList}from"./dynamicFieldDefinitionList";export{default as Emphasis}from"./emphasis";export{default as FlowNavigation}from"./flowNavigation";export{default as Header}from"./header";export{default as Image}from"./image";export{default as Info}from"./info";export{default as InlineAlert}from"./inlineAlert";export{default as InputWithDisplayFormat}from"./inputWithDisplayFormat";export{default as InstructionsList}from"./instructionsList";export{default as Link}from"./link";export{default as Loader}from"./loader";export{default as Logo}from"./logo";export{default as Markdown}from"./markdown";export{default as Modal}from"./modal";export{default as Money}from"./money";export{default as MoneyInput}from"./moneyInput";export{default as NavigationOption}from"./navigationOption";export{default as NavigationOptionsList}from"./navigationOptionsList";export{default as Nudge}from"./nudge";export{default as Option}from"./common/Option";export{default as OverlayHeader}from"./overlayHeader";export{default as PhoneNumberInput}from"./phoneNumberInput";export{default as Popover}from"./popover";export{default as ProcessIndicator}from"./processIndicator";export{default as Provider,DirectionProvider}from"./provider";export{default as Radio}from"./radio";export{default as RadioGroup}from"./radioGroup";export{default as RadioOption}from"./radioOption";export{default as Section}from"./section";export{default as Select}from"./select";export{default as SlidingPanel}from"./slidingPanel";export{default as SnackbarPortal}from"./snackbar/Snackbar";export{default as SnackbarProvider}from"./snackbar/SnackbarProvider";export{default as Stepper}from"./stepper";export{default as Sticky}from"./sticky";export{default as Summary}from"./summary";export{default as Switch}from"./switch";export{default as SwitchOption}from"./switchOption";export{default as Tabs}from"./tabs";export{default as TextareaWithDisplayFormat}from"./textareaWithDisplayFormat";export{default as Tooltip}from"./tooltip";export{default as Typeahead}from"./typeahead";export{default as Upload}from"./upload";export{default as UploadInput}from"./uploadInput";export{SnackbarConsumer,SnackbarContext}from"./snackbar/SnackbarContext";/**
6
6
  * Hooks
7
7
  */export{default as useSnackbar}from"./snackbar/useSnackbar";export{useDirection,useLayout}from"./common/hooks";/**
8
8
  * Enums
@@ -1 +1 @@
1
- import _defineProperty from"@babel/runtime/helpers/defineProperty";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}/* eslint-disable jsx-a11y/control-has-associated-label */import classNames from"classnames";import PropTypes from"prop-types";import requiredIf from"react-required-if";import Chevron from"../chevron";import{Position}from"../common";import Option from"../common/Option";import{jsx as _jsx}from"react/jsx-runtime";var NavigationOption=function(a){var b=a["aria-label"],c=a.as,d=a.media,e=a.href,f=a.target,g=a.title,h=a.content,i=a.onClick,j=a.complex,k=a.disabled,l=a.showMediaAtAllSizes,m=a.showMediaCircle,n=a.className,o={ariaLabel:b,as:c,media:d,href:e,target:f,title:g,content:h,complex:j,disabled:k,showMediaAtAllSizes:l,showMediaCircle:m,className:classNames("np-navigation-option",n)};return e&&(o.as="a"),/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},o),{},{button:/*#__PURE__*/_jsx(Chevron,{orientation:Position.RIGHT,disabled:k,className:"d-block"}),onClick:function onClick(a){return k?void a.preventDefault():void i(a)}}))};NavigationOption.propTypes={"aria-label":PropTypes.string,as:PropTypes.string,media:PropTypes.node,title:PropTypes.node.isRequired,content:PropTypes.node,onClick:PropTypes.func,href:requiredIf(PropTypes.string,function(a){return"a"===a.as}),target:PropTypes.oneOf(["_self","_blank","_parent","_top"]),complex:PropTypes.bool,disabled:PropTypes.bool,showMediaAtAllSizes:PropTypes.bool,showMediaCircle:PropTypes.bool,className:PropTypes.string},NavigationOption.defaultProps={"aria-label":void 0,as:"button",media:null,content:null,complex:!1,onClick:null,href:void 0,target:void 0,disabled:!1,showMediaAtAllSizes:!1,showMediaCircle:!0,className:null};export default NavigationOption;
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["as","disabled","onClick","className"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import classNames from"classnames";import{forwardRef}from"react";import Chevron from"../chevron";import{Position}from"../common";import Option from"../common/Option";import{jsx as _jsx}from"react/jsx-runtime";var NavigationOption=/*#__PURE__*/forwardRef(function(a,b){var c=a.as,d=void 0===c?"button":c,e=a.disabled,f=void 0!==e&&e,g=a.onClick,h=a.className,i=_objectWithoutProperties(a,_excluded);return"href"in i&&(d="a"),/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},i),{},{ref:b,as:d,className:classNames("np-navigation-option",h),button:/*#__PURE__*/_jsx(Chevron,{orientation:Position.RIGHT,disabled:f,className:"d-block"}),disabled:f,onClick:function onClick(a){return f?void a.preventDefault():void(g&&g(a))}}))});export default NavigationOption;
@@ -1 +1 @@
1
- import classNames from"classnames";import PropTypes from"prop-types";import requiredIf from"react-required-if";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Option=function(a){var b=a["aria-label"],c=a.as,d=a.href,e=a.target,f=a.media,g=a.title,h=a.content,i=a.onClick,j=a.htmlFor,k=a.disabled,l=a.button,m=a.decision,n=a.complex,o=a.className,p=a.inverseMediaCircle,q=a.showMediaAtAllSizes,r=a.showMediaCircle;return/*#__PURE__*/_jsx(c,{className:classNames("np-option",o,{"decision-complex":n,decision:m,disabled:k,"np-option__sm-media":q}),href:d,htmlFor:j,target:e,disabled:k&&"button"===c,"aria-label":b,onClick:i,children:/*#__PURE__*/_jsxs("div",{className:"media",children:[f&&/*#__PURE__*/_jsx("div",{className:"media-left",children:r?/*#__PURE__*/_jsx("div",{className:classNames("circle circle-sm text-primary",{"circle-inverse":p}),children:f}):/*#__PURE__*/_jsx("div",{className:"np-option__no-media-circle",children:f})}),/*#__PURE__*/_jsxs("div",{className:"media-body",children:[/*#__PURE__*/_jsx("div",{className:"decision__title",children:g}),h&&/*#__PURE__*/_jsx("div",{className:"decision__content",children:h})]}),/*#__PURE__*/_jsx("div",{className:"media-right",children:l})]})})};Option.propTypes={"aria-label":PropTypes.string,media:PropTypes.node,htmlFor:PropTypes.string,title:PropTypes.node.isRequired,content:PropTypes.node,onClick:PropTypes.func,href:requiredIf(PropTypes.string,function(a){return"a"===a.as}),target:PropTypes.oneOf(["_self","_blank","_parent","_top"]),as:PropTypes.string,disabled:PropTypes.bool,button:PropTypes.node,decision:PropTypes.bool,complex:PropTypes.bool,inverseMediaCircle:PropTypes.bool,className:PropTypes.string,showMediaAtAllSizes:PropTypes.bool,showMediaCircle:PropTypes.bool},Option.defaultProps={"aria-label":void 0,as:"label",media:"",content:null,htmlFor:null,disabled:!1,button:null,onClick:null,href:null,target:void 0,decision:!0,complex:!1,inverseMediaCircle:!0,className:null,showMediaAtAllSizes:!1,showMediaCircle:!0};export default Option;
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["media","title","content","as","button","decision","disabled","complex","inverseMediaCircle","className","showMediaAtAllSizes","showMediaCircle"];import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import classNames from"classnames";import{forwardRef}from"react";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Option=/*#__PURE__*/forwardRef(function(a,b){var c,d=a.media,e=void 0===d?"":d,f=a.title,g=a.content,h=a.as,i=a.button,j=a.decision,k=a.disabled,l=void 0!==k&&k,m=a.complex,n=a.inverseMediaCircle,o=a.className,p=a.showMediaAtAllSizes,q=a.showMediaCircle,r=_objectWithoutProperties(a,_excluded),s=null!==(c=h)&&void 0!==c?c:"label";return/*#__PURE__*/_jsx(s,_objectSpread(_objectSpread({},r),{},{ref:b,className:classNames("np-option",o,{"decision-complex":m,decision:!(void 0!==j)||j,disabled:l,"np-option__sm-media":p}),disabled:l&&"button"===s,children:/*#__PURE__*/_jsxs("div",{className:"media",children:[e&&/*#__PURE__*/_jsx("div",{className:"media-left",children:!(void 0!==q)||q?/*#__PURE__*/_jsx("div",{className:classNames("circle circle-sm text-primary",{"circle-inverse":!(void 0!==n)||n}),children:e}):/*#__PURE__*/_jsx("div",{className:"np-option__no-media-circle",children:e})}),/*#__PURE__*/_jsxs("div",{className:"media-body",children:[/*#__PURE__*/_jsx("div",{className:"decision__title",children:f}),g&&/*#__PURE__*/_jsx("div",{className:"decision__content",children:g})]}),/*#__PURE__*/_jsx("div",{className:"media-right",children:i})]})}))});export default Option;
@@ -2,7 +2,7 @@
2
2
  * Types
3
3
  */ /**
4
4
  * Components
5
- */export{default as Accordion}from"./accordion";export{default as ActionButton}from"./actionButton";export{default as ActionOption}from"./actionOption";export{default as Alert}from"./alert";export{default as Avatar}from"./avatar";export{default as AvatarWrapper}from"./avatarWrapper";export{default as Badge}from"./badge";export{default as BottomSheet}from"./common/bottomSheet";export{default as Button}from"./button";export{default as Card}from"./card";export{default as Checkbox}from"./checkbox";export{default as CheckboxButton}from"./checkboxButton";export{default as CheckboxOption}from"./checkboxOption";export{default as Chevron}from"./chevron";export{default as Chips,Chip}from"./chips";export{default as CircularButton}from"./circularButton";export{default as DateInput}from"./dateInput";export{default as DateLookup}from"./dateLookup";export{default as Decision}from"./decision";export{default as DefinitionList}from"./definitionList";export{default as Dimmer}from"./dimmer";export{default as Drawer}from"./drawer";export{default as DropFade}from"./dropFade";export{default as DynamicFieldDefinitionList}from"./dynamicFieldDefinitionList";export{default as Emphasis}from"./emphasis";export{default as FlowNavigation}from"./flowNavigation";export{default as Header}from"./header";export{default as Image}from"./image";export{default as Info}from"./info";export{default as InlineAlert}from"./inlineAlert";export{default as InputWithDisplayFormat}from"./inputWithDisplayFormat";export{default as InstructionsList}from"./instructionsList";export{default as Link}from"./link";export{default as Loader}from"./loader";export{default as Logo}from"./logo";export{default as Markdown}from"./markdown";export{default as Modal}from"./modal";export{default as Money}from"./money";export{default as MoneyInput}from"./moneyInput";export{default as NavigationOption}from"./navigationOption";export{default as NavigationOptionsList}from"./navigationOptionsList";export{default as Nudge}from"./nudge";export{default as OverlayHeader}from"./overlayHeader";export{default as PhoneNumberInput}from"./phoneNumberInput";export{default as Popover}from"./popover";export{default as ProcessIndicator}from"./processIndicator";export{default as Provider,DirectionProvider}from"./provider";export{default as Radio}from"./radio";export{default as RadioGroup}from"./radioGroup";export{default as RadioOption}from"./radioOption";export{default as Section}from"./section";export{default as Select}from"./select";export{default as SlidingPanel}from"./slidingPanel";export{default as SnackbarPortal}from"./snackbar/Snackbar";export{default as SnackbarProvider}from"./snackbar/SnackbarProvider";export{default as Stepper}from"./stepper";export{default as Sticky}from"./sticky";export{default as Summary}from"./summary";export{default as Switch}from"./switch";export{default as SwitchOption}from"./switchOption";export{default as Tabs}from"./tabs";export{default as TextareaWithDisplayFormat}from"./textareaWithDisplayFormat";export{default as Tooltip}from"./tooltip";export{default as Typeahead}from"./typeahead";export{default as Upload}from"./upload";export{default as UploadInput}from"./uploadInput";export{SnackbarConsumer,SnackbarContext}from"./snackbar/SnackbarContext";/**
5
+ */export{default as Accordion}from"./accordion";export{default as ActionButton}from"./actionButton";export{default as ActionOption}from"./actionOption";export{default as Alert}from"./alert";export{default as Avatar}from"./avatar";export{default as AvatarWrapper}from"./avatarWrapper";export{default as Badge}from"./badge";export{default as BottomSheet}from"./common/bottomSheet";export{default as Button}from"./button";export{default as Card}from"./card";export{default as Checkbox}from"./checkbox";export{default as CheckboxButton}from"./checkboxButton";export{default as CheckboxOption}from"./checkboxOption";export{default as Chevron}from"./chevron";export{default as Chips,Chip}from"./chips";export{default as CircularButton}from"./circularButton";export{default as DateInput}from"./dateInput";export{default as DateLookup}from"./dateLookup";export{default as Decision}from"./decision";export{default as DefinitionList}from"./definitionList";export{default as Dimmer}from"./dimmer";export{default as Drawer}from"./drawer";export{default as DropFade}from"./dropFade";export{default as DynamicFieldDefinitionList}from"./dynamicFieldDefinitionList";export{default as Emphasis}from"./emphasis";export{default as FlowNavigation}from"./flowNavigation";export{default as Header}from"./header";export{default as Image}from"./image";export{default as Info}from"./info";export{default as InlineAlert}from"./inlineAlert";export{default as InputWithDisplayFormat}from"./inputWithDisplayFormat";export{default as InstructionsList}from"./instructionsList";export{default as Link}from"./link";export{default as Loader}from"./loader";export{default as Logo}from"./logo";export{default as Markdown}from"./markdown";export{default as Modal}from"./modal";export{default as Money}from"./money";export{default as MoneyInput}from"./moneyInput";export{default as NavigationOption}from"./navigationOption";export{default as NavigationOptionsList}from"./navigationOptionsList";export{default as Nudge}from"./nudge";export{default as Option}from"./common/Option";export{default as OverlayHeader}from"./overlayHeader";export{default as PhoneNumberInput}from"./phoneNumberInput";export{default as Popover}from"./popover";export{default as ProcessIndicator}from"./processIndicator";export{default as Provider,DirectionProvider}from"./provider";export{default as Radio}from"./radio";export{default as RadioGroup}from"./radioGroup";export{default as RadioOption}from"./radioOption";export{default as Section}from"./section";export{default as Select}from"./select";export{default as SlidingPanel}from"./slidingPanel";export{default as SnackbarPortal}from"./snackbar/Snackbar";export{default as SnackbarProvider}from"./snackbar/SnackbarProvider";export{default as Stepper}from"./stepper";export{default as Sticky}from"./sticky";export{default as Summary}from"./summary";export{default as Switch}from"./switch";export{default as SwitchOption}from"./switchOption";export{default as Tabs}from"./tabs";export{default as TextareaWithDisplayFormat}from"./textareaWithDisplayFormat";export{default as Tooltip}from"./tooltip";export{default as Typeahead}from"./typeahead";export{default as Upload}from"./upload";export{default as UploadInput}from"./uploadInput";export{SnackbarConsumer,SnackbarContext}from"./snackbar/SnackbarContext";/**
6
6
  * Hooks
7
7
  */export{default as useSnackbar}from"./snackbar/useSnackbar";export{useDirection,useLayout}from"./common/hooks";/**
8
8
  * Enums
@@ -1 +1 @@
1
- import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}/* eslint-disable jsx-a11y/control-has-associated-label */import classNames from"classnames";import PropTypes from"prop-types";import requiredIf from"react-required-if";import Chevron from"../chevron";import{Position}from"../common";import Option from"../common/Option";import{jsx as _jsx}from"react/jsx-runtime";var NavigationOption=function(a){var b=a["aria-label"],c=a.as,d=a.media,e=a.href,f=a.target,g=a.title,h=a.content,i=a.onClick,j=a.complex,k=a.disabled,l=a.showMediaAtAllSizes,m=a.showMediaCircle,n=a.className,o={ariaLabel:b,as:c,media:d,href:e,target:f,title:g,content:h,complex:j,disabled:k,showMediaAtAllSizes:l,showMediaCircle:m,className:classNames("np-navigation-option",n)};return e&&(o.as="a"),/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},o),{},{button:/*#__PURE__*/_jsx(Chevron,{orientation:Position.RIGHT,disabled:k,className:"d-block"}),onClick:function onClick(a){return k?void a.preventDefault():void i(a)}}))};NavigationOption.propTypes={"aria-label":PropTypes.string,as:PropTypes.string,media:PropTypes.node,title:PropTypes.node.isRequired,content:PropTypes.node,onClick:PropTypes.func,href:requiredIf(PropTypes.string,function(a){return"a"===a.as}),target:PropTypes.oneOf(["_self","_blank","_parent","_top"]),complex:PropTypes.bool,disabled:PropTypes.bool,showMediaAtAllSizes:PropTypes.bool,showMediaCircle:PropTypes.bool,className:PropTypes.string},NavigationOption.defaultProps={"aria-label":void 0,as:"button",media:null,content:null,complex:!1,onClick:null,href:void 0,target:void 0,disabled:!1,showMediaAtAllSizes:!1,showMediaCircle:!0,className:null};export default NavigationOption;
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["as","disabled","onClick","className"];import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import classNames from"classnames";import{forwardRef}from"react";import Chevron from"../chevron";import{Position}from"../common";import Option from"../common/Option";import{jsx as _jsx}from"react/jsx-runtime";var NavigationOption=/*#__PURE__*/forwardRef(function(a,b){var c=a.as,d=void 0===c?"button":c,e=a.disabled,f=void 0!==e&&e,g=a.onClick,h=a.className,i=_objectWithoutProperties(a,_excluded);return"href"in i&&(d="a"),/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},i),{},{ref:b,as:d,className:classNames("np-navigation-option",h),button:/*#__PURE__*/_jsx(Chevron,{orientation:Position.RIGHT,disabled:f,className:"d-block"}),disabled:f,onClick:function onClick(a){return f?void a.preventDefault():void(g&&g(a))}}))});export default NavigationOption;
@@ -1,60 +1,26 @@
1
- export default Option;
2
- declare function Option({ "aria-label": ariaLabel, as: Element, href, target, media, title, content, onClick, htmlFor, disabled, button, decision, complex, className, inverseMediaCircle, showMediaAtAllSizes, showMediaCircle, }: {
3
- "aria-label": any;
4
- as: any;
5
- href: any;
6
- target: any;
7
- media: any;
8
- title: any;
9
- content: any;
10
- onClick: any;
11
- htmlFor: any;
12
- disabled: any;
13
- button: any;
14
- decision: any;
15
- complex: any;
16
- className: any;
17
- inverseMediaCircle: any;
18
- showMediaAtAllSizes: any;
19
- showMediaCircle: any;
20
- }): JSX.Element;
21
- declare namespace Option {
22
- const propTypes: {
23
- 'aria-label': PropTypes.Requireable<string>;
24
- media: PropTypes.Requireable<PropTypes.ReactNodeLike>;
25
- htmlFor: PropTypes.Requireable<string>;
26
- title: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
27
- content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
28
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
29
- href: any;
30
- target: PropTypes.Requireable<string>;
31
- as: PropTypes.Requireable<string>;
32
- disabled: PropTypes.Requireable<boolean>;
33
- button: PropTypes.Requireable<PropTypes.ReactNodeLike>;
34
- decision: PropTypes.Requireable<boolean>;
35
- complex: PropTypes.Requireable<boolean>;
36
- inverseMediaCircle: PropTypes.Requireable<boolean>;
37
- className: PropTypes.Requireable<string>;
38
- showMediaAtAllSizes: PropTypes.Requireable<boolean>;
39
- showMediaCircle: PropTypes.Requireable<boolean>;
40
- };
41
- const defaultProps: {
42
- 'aria-label': undefined;
43
- as: string;
44
- media: string;
45
- content: null;
46
- htmlFor: null;
47
- disabled: boolean;
48
- button: null;
49
- onClick: null;
50
- href: null;
51
- target: undefined;
52
- decision: boolean;
53
- complex: boolean;
54
- inverseMediaCircle: boolean;
55
- className: null;
56
- showMediaAtAllSizes: boolean;
57
- showMediaCircle: boolean;
58
- };
1
+ import { MouseEvent, HTMLAttributes, ReactNode, ElementType } from 'react';
2
+ interface BaseOptionProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
3
+ 'aria-label'?: string;
4
+ media?: ReactNode;
5
+ htmlFor?: string;
6
+ title: ReactNode;
7
+ content?: ReactNode;
8
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
9
+ as?: ElementType;
10
+ disabled?: boolean;
11
+ button?: ReactNode;
12
+ decision?: boolean;
13
+ complex?: boolean;
14
+ inverseMediaCircle?: boolean;
15
+ className?: string;
16
+ showMediaAtAllSizes?: boolean;
17
+ showMediaCircle?: boolean;
18
+ }
19
+ interface AnchorOptionProps extends BaseOptionProps {
20
+ as: 'a';
21
+ href: string;
22
+ target: '_self' | '_blank' | '_parent' | '_top';
59
23
  }
60
- import PropTypes from "prop-types";
24
+ export declare type OptionProps = BaseOptionProps | AnchorOptionProps;
25
+ declare const Option: import("react").ForwardRefExoticComponent<OptionProps & import("react").RefAttributes<HTMLElement>>;
26
+ export default Option;
@@ -1 +1 @@
1
- export { default } from "./Option";
1
+ export { default } from './Option';
@@ -48,6 +48,7 @@ export { default as MoneyInput } from './moneyInput';
48
48
  export { default as NavigationOption } from './navigationOption';
49
49
  export { default as NavigationOptionsList } from './navigationOptionsList';
50
50
  export { default as Nudge } from './nudge';
51
+ export { default as Option } from './common/Option';
51
52
  export { default as OverlayHeader } from './overlayHeader';
52
53
  export { default as PhoneNumberInput } from './phoneNumberInput';
53
54
  export { default as Popover } from './popover';
@@ -1,24 +1,4 @@
1
- import * as React from 'react';
2
-
3
- export type NavigationOptionTarget = "_self" | "_blank" | "_parent" | "_top";
4
-
5
- export interface NavigationOptionProps {
6
- "aria-label"?: string;
7
- as?: string;
8
- media?: React.ReactNode;
9
- title: React.ReactNode;
10
- content?: React.ReactNode;
11
- onClick?: (...args: any[])=>any;
12
- href?: any;
13
- target?: NavigationOptionTarget;
14
- complex?: boolean;
15
- disabled?: boolean;
16
- showMediaAtAllSizes?: boolean;
17
- showMediaCircle?: boolean;
18
- className?: string;
19
- }
20
-
21
- declare const NavigationOption: React.FC<NavigationOptionProps>;
22
-
23
- export default NavigationOption;
24
-
1
+ /// <reference types="react" />
2
+ import { OptionProps } from '../common/Option/Option';
3
+ declare const NavigationOption: import("react").ForwardRefExoticComponent<OptionProps & import("react").RefAttributes<HTMLElement>>;
4
+ export default NavigationOption;
@@ -1 +1 @@
1
- export { default } from "./NavigationOption";
1
+ export { default } from './NavigationOption';