-
Notifications
You must be signed in to change notification settings - Fork 31
/
15082.e09c7423.iframe.bundle.js
1 lines (1 loc) · 12.9 KB
/
15082.e09c7423.iframe.bundle.js
1
"use strict";(globalThis.webpackChunkmetamask_crx=globalThis.webpackChunkmetamask_crx||[]).push([[15082],{"./ui/components/ui/typography/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>_typography__WEBPACK_IMPORTED_MODULE_0__.Ay});var _typography__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./ui/components/ui/typography/typography.js")},"./ui/components/ui/typography/typography.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Ay:()=>Typography,Lp:()=>ValidColors,gn:()=>ValidTags});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),classnames__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/classnames/index.js"),classnames__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__),prop_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_box__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/ui/box/index.js");function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}var H6=_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.PT.H6,H7=_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.PT.H7,H8=_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.PT.H8,H9=_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.PT.H9,ValidColors=[_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.textDefault,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.textAlternative,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.textMuted,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.overlayInverse,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.primaryDefault,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.primaryInverse,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.errorDefault,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.errorInverse,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.successDefault,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.successInverse,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.sepoliaInverse,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.warningDefault,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.warningInverse,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.infoDefault,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.infoInverse,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.goerli,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.sepolia,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.goerliInverse,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.sepoliaInverse,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.lineaGoerli,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.lineaGoerliInverse,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.lineaSepolia,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.lineaSepoliaInverse,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.lineaMainnet,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.lineaMainnetInverse],ValidTags=["dd","div","dt","em","h1","h2","h3","h4","h5","h6","li","p","span","strong","ul","label"];function Typography(param){var strongTagFontWeight,_obj,_param_variant=param.variant,variant=void 0===_param_variant?_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.PT.paragraph:_param_variant,_param_color=param.color,color=void 0===_param_color?_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.textDefault:_param_color,_param_fontWeight=param.fontWeight,_param_fontStyle=param.fontStyle,align=param.align,overflowWrap=param.overflowWrap,title=param.title,as=param.as,margin=param.margin,_param_marginTop=param.marginTop,marginRight=param.marginRight,_param_marginBottom=param.marginBottom,marginLeft=param.marginLeft,_param_boxProps=param.boxProps,className=param.className,testId=param.testId,children=param.children,Tag=null!=as?as:variant;"strong"===Tag&&(strongTagFontWeight=_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.zN.BOLD);var computedClassName=classnames__WEBPACK_IMPORTED_MODULE_1___default()("typography",className,"typography--".concat(variant),"typography--weight-".concat(strongTagFontWeight||(void 0===_param_fontWeight?"normal":_param_fontWeight)),"typography--style-".concat(void 0===_param_fontStyle?"normal":_param_fontStyle),(_define_property(_obj={},"typography--align-".concat(align),!!align),_define_property(_obj,"typography--color-".concat(color),!!color),_define_property(_obj,"typography--overflowwrap-".concat(overflowWrap),!!overflowWrap),_obj));return Tag===_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.PT.paragraph?Tag="p":[H7,H8,H9].includes(Tag)&&(Tag=H6),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_box__WEBPACK_IMPORTED_MODULE_3__.Ay,_object_spread({margin:margin,marginTop:void 0===_param_marginTop?1:_param_marginTop,marginRight:marginRight,marginBottom:void 0===_param_marginBottom?1:_param_marginBottom,marginLeft:marginLeft},void 0===_param_boxProps?{}:_param_boxProps),function(boxClassName){return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Tag,{className:classnames__WEBPACK_IMPORTED_MODULE_1___default()(boxClassName,computedClassName),title:title,"data-testid":testId},children)})}Typography.propTypes={variant:prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOf(Object.values(_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.PT)),color:prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOf(ValidColors),fontWeight:prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOf(Object.values(_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.zN)),fontStyle:prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOf(Object.values(_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Ec)),align:prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOf(Object.values(_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.nO)),overflowWrap:prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOf(Object.values(_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.uU)),as:prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOf(ValidTags),margin:_box__WEBPACK_IMPORTED_MODULE_3__.Ve,marginTop:_box__WEBPACK_IMPORTED_MODULE_3__.Ve,marginBottom:_box__WEBPACK_IMPORTED_MODULE_3__.Ve,marginRight:_box__WEBPACK_IMPORTED_MODULE_3__.Ve,marginLeft:_box__WEBPACK_IMPORTED_MODULE_3__.Ve,boxProps:prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(_object_spread({},_box__WEBPACK_IMPORTED_MODULE_3__.Ay.propTypes)),className:prop_types__WEBPACK_IMPORTED_MODULE_4___default().string,title:prop_types__WEBPACK_IMPORTED_MODULE_4___default().string,testId:prop_types__WEBPACK_IMPORTED_MODULE_4___default().string,children:prop_types__WEBPACK_IMPORTED_MODULE_4___default().node.isRequired},Typography.__docgenInfo={description:"@deprecated `<Typography />` has been deprecated in favor of the `<Text />` component in ./ui/components/component-library/text/text.js\n\nSee storybook documentation for Text here https://metamask.github.io/metamask-storybook/?path=/docs/components-componentlibrary-text--default-story#text\n\nHelp to replace `Typography` with `Text` by submitting PRs against https://github.com/MetaMask/metamask-extension/issues/17670",methods:[],displayName:"Typography",props:{variant:{defaultValue:{value:"TypographyVariant.paragraph",computed:!0},description:"The variation of font sizes of the Typography component",type:{name:"enum",computed:!0,value:"Object.values(TypographyVariant)"},required:!1},color:{defaultValue:{value:"Color.textDefault",computed:!0},description:"The color of the Typography component Should use the COLOR object from\n./ui/helpers/constants/design-system.js",type:{name:"enum",value:[{value:"Color.textDefault",computed:!0},{value:"Color.textAlternative",computed:!0},{value:"Color.textMuted",computed:!0},{value:"Color.overlayInverse",computed:!0},{value:"Color.primaryDefault",computed:!0},{value:"Color.primaryInverse",computed:!0},{value:"Color.errorDefault",computed:!0},{value:"Color.errorInverse",computed:!0},{value:"Color.successDefault",computed:!0},{value:"Color.successInverse",computed:!0},{value:"Color.sepoliaInverse",computed:!0},{value:"Color.warningDefault",computed:!0},{value:"Color.warningInverse",computed:!0},{value:"Color.infoDefault",computed:!0},{value:"Color.infoInverse",computed:!0},{value:"Color.goerli",computed:!0},{value:"Color.sepolia",computed:!0},{value:"Color.goerliInverse",computed:!0},{value:"Color.sepoliaInverse",computed:!0},{value:"Color.lineaGoerli",computed:!0},{value:"Color.lineaGoerliInverse",computed:!0},{value:"Color.lineaSepolia",computed:!0},{value:"Color.lineaSepoliaInverse",computed:!0},{value:"Color.lineaMainnet",computed:!0},{value:"Color.lineaMainnetInverse",computed:!0}]},required:!1},fontWeight:{defaultValue:{value:"'normal'",computed:!1},description:"The font-weight of the Typography component. Should use the FONT_WEIGHT object from\n./ui/helpers/constants/design-system.js",type:{name:"enum",value:[{value:'"bold"',computed:!1},{value:'"medium"',computed:!1},{value:'"normal"',computed:!1}]},required:!1},fontStyle:{defaultValue:{value:"'normal'",computed:!1},description:"The font-style of the Typography component. Should use the FONT_STYLE object from\n./ui/helpers/constants/design-system.js",type:{name:"enum",value:[{value:'"italic"',computed:!1},{value:'"normal"',computed:!1}]},required:!1},marginTop:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"union",value:[{name:"custom",raw:"ValidSizeAndAuto"},{name:"custom",raw:"ArrayOfValidSizesAndAuto"}]},required:!1},marginBottom:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"union",value:[{name:"custom",raw:"ValidSizeAndAuto"},{name:"custom",raw:"ArrayOfValidSizesAndAuto"}]},required:!1},boxProps:{defaultValue:{value:"{}",computed:!1},description:"Used to pass any valid Box component props such as margin or padding\nto the Typography component",type:{name:"shape",value:{}},required:!1},align:{description:"The text-align of the Typography component. Should use the TextAlign enum from\n./ui/helpers/constants/design-system.js",type:{name:"enum",computed:!0,value:"Object.values(TextAlign)"},required:!1},overflowWrap:{description:"The overflow-wrap of the Typography component. Should use the OVERFLOW_WRAP object from\n./ui/helpers/constants/design-system.js",type:{name:"enum",value:[{value:'"break-word"',computed:!1},{value:'"anywhere"',computed:!1},{value:'"normal"',computed:!1}]},required:!1},as:{description:"Changes the root html element of the Typography component.",type:{name:"enum",value:[{value:"'dd'",computed:!1},{value:"'div'",computed:!1},{value:"'dt'",computed:!1},{value:"'em'",computed:!1},{value:"'h1'",computed:!1},{value:"'h2'",computed:!1},{value:"'h3'",computed:!1},{value:"'h4'",computed:!1},{value:"'h5'",computed:!1},{value:"'h6'",computed:!1},{value:"'li'",computed:!1},{value:"'p'",computed:!1},{value:"'span'",computed:!1},{value:"'strong'",computed:!1},{value:"'ul'",computed:!1},{value:"'label'",computed:!1}]},required:!1},margin:{description:"Adds margin to the Typography component should use valid size",type:{name:"union",value:[{name:"custom",raw:"ValidSizeAndAuto"},{name:"custom",raw:"ArrayOfValidSizesAndAuto"}]},required:!1},marginRight:{description:"",type:{name:"union",value:[{name:"custom",raw:"ValidSizeAndAuto"},{name:"custom",raw:"ArrayOfValidSizesAndAuto"}]},required:!1},marginLeft:{description:"",type:{name:"union",value:[{name:"custom",raw:"ValidSizeAndAuto"},{name:"custom",raw:"ArrayOfValidSizesAndAuto"}]},required:!1},className:{description:"Additional className to assign the Typography component",type:{name:"string"},required:!1},title:{description:"Title attribute to include on the element. Will show as tooltip on hover.",type:{name:"string"},required:!1},testId:{description:"Data test ID for the Tag component",type:{name:"string"},required:!1},children:{description:"The text content of the Typography component",type:{name:"node"},required:!0}}}}}]);