-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathelements-paper-stories.2e83c891.iframe.bundle.js
2 lines (2 loc) · 12.6 KB
/
elements-paper-stories.2e83c891.iframe.bundle.js
1
2
/*! For license information please see elements-paper-stories.2e83c891.iframe.bundle.js.LICENSE.txt */
(globalThis.webpackChunk_yoast_ui_library=globalThis.webpackChunk_yoast_ui_library||[]).push([[9017],{"../../node_modules/@storybook/addon-docs/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H2:()=>_storybook_blocks__WEBPACK_IMPORTED_MODULE_1__.H2,Hl:()=>_storybook_blocks__WEBPACK_IMPORTED_MODULE_1__.Hl,Pd:()=>_storybook_blocks__WEBPACK_IMPORTED_MODULE_1__.Pd,Tn:()=>_storybook_blocks__WEBPACK_IMPORTED_MODULE_1__.Tn,VY:()=>_storybook_blocks__WEBPACK_IMPORTED_MODULE_1__.VY,W8:()=>_storybook_blocks__WEBPACK_IMPORTED_MODULE_1__.W8,fy:()=>_storybook_blocks__WEBPACK_IMPORTED_MODULE_1__.fy,gG:()=>_storybook_blocks__WEBPACK_IMPORTED_MODULE_1__.gG,hE:()=>_storybook_blocks__WEBPACK_IMPORTED_MODULE_1__.hE,oz:()=>_storybook_blocks__WEBPACK_IMPORTED_MODULE_1__.oz});__webpack_require__("../../node_modules/@storybook/addon-docs/dist/chunk-HLWAVYOI.mjs");var _storybook_blocks__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/@storybook/blocks/dist/index.mjs")},"./.storybook/interactive-docs-page.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{f:()=>InteractiveDocsPage});var _storybook_addon_docs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/@storybook/addon-docs/dist/index.mjs"),prop_types__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=(__webpack_require__("../../node_modules/react/index.js"),__webpack_require__("../../node_modules/react/jsx-runtime.js"));const InteractiveDocsPage=({stories})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs__WEBPACK_IMPORTED_MODULE_0__.hE,{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs__WEBPACK_IMPORTED_MODULE_0__.Pd,{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs__WEBPACK_IMPORTED_MODULE_0__.VY,{of:"meta"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs__WEBPACK_IMPORTED_MODULE_0__.VY,{of:"story"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs__WEBPACK_IMPORTED_MODULE_0__.Tn,{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs__WEBPACK_IMPORTED_MODULE_0__.H2,{}),stories.map(((story,index)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_storybook_addon_docs__WEBPACK_IMPORTED_MODULE_0__.fy,{of:story},(null==story?void 0:story.name)||`story-${index}`)))]});InteractiveDocsPage.propTypes={stories:prop_types__WEBPACK_IMPORTED_MODULE_3___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default().object,prop_types__WEBPACK_IMPORTED_MODULE_3___default().func]))},InteractiveDocsPage.defaultProps={stories:[]},InteractiveDocsPage.__docgenInfo={description:"An alternative version of the Storybook DocsPage component.\n\nReplacing the Stories component with individual DocsStory components.\nThis prevents Stories from passing `__forceInitialArgs` to the DocsStory components.\nWhich makes the stories are interactive on the docs page, making the `args` more like initial values.\n\n@param {(Object|function)[]} [stories] The stories to display.\n@returns {JSX.Element} The DocsPage component without stories.",methods:[],displayName:"InteractiveDocsPage",props:{stories:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"union",value:[{name:"object"},{name:"func"}]}},required:!1}}}},"./src/elements/paper/stories.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Factory:()=>Factory,WithHeaderAndContent:()=>WithHeaderAndContent,default:()=>stories});var react=__webpack_require__("../../node_modules/react/index.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js");const Content=({as:Component,className,children})=>(0,jsx_runtime.jsx)(Component,{className:classnames_default()("yst-paper__content",className),children});Content.displayName="Content",Content.propTypes={as:prop_types_default().node,className:prop_types_default().string,children:prop_types_default().node.isRequired},Content.defaultProps={as:"div",className:""};const content=Content;Content.__docgenInfo={description:'@param {React.ReactNode} [as="div"] What component to render as.\n@param {string} [className=""] Optional extra className.\n@param {React.ReactNode} children The content.\n@returns {React.ReactElement} The element.',methods:[],displayName:"Content",props:{as:{defaultValue:{value:'"div"',computed:!1},description:"",type:{name:"node"},required:!1},className:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},children:{description:"",type:{name:"node"},required:!0}}};const Header=({as:Component,className,children})=>(0,jsx_runtime.jsx)(Component,{className:classnames_default()("yst-paper__header",className),children});Header.displayName="Header",Header.propTypes={as:prop_types_default().node,className:prop_types_default().string,children:prop_types_default().node.isRequired},Header.defaultProps={as:"header",className:""};const header=Header;Header.__docgenInfo={description:'@param {React.ReactNode} [as="header"] What component to render as.\n@param {string} [className=""] Optional extra className.\n@param {React.ReactNode} children The content.\n@returns {React.ReactElement} The element.',methods:[],displayName:"Header",props:{as:{defaultValue:{value:'"header"',computed:!1},description:"",type:{name:"node"},required:!1},className:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},children:{description:"",type:{name:"node"},required:!0}}};const Paper=(0,react.forwardRef)((({as:Component="div",className="",children},ref)=>(0,jsx_runtime.jsx)(Component,{ref,className:classnames_default()("yst-paper",className),children})));Paper.displayName="Paper",Paper.propTypes={as:prop_types_default().node,className:prop_types_default().string,children:prop_types_default().node.isRequired},Paper.defaultProps={as:"div",className:""},Paper.Header=header,Paper.Header.displayName="Paper.Header",Paper.Content=content,Paper.Content.displayName="Paper.Content";const paper=Paper;Paper.__docgenInfo={description:'@param {React.ReactNode} [as="div"] What component to render as.\n@param {string} [className=""] Optional extra className.\n@param {React.ReactNode} children The content.\n@returns {React.ReactElement} The element.',methods:[{name:"Header",docblock:null,modifiers:["static"],params:[{name:"{ as: Component, className, children }",optional:!1,type:null}],returns:null},{name:"Content",docblock:null,modifiers:["static"],params:[{name:"{ as: Component, className, children }",optional:!1,type:null}],returns:null}],displayName:"Paper",props:{as:{defaultValue:{value:'"div"',computed:!1},description:"",type:{name:"node"},required:!1},className:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},children:{description:"",type:{name:"node"},required:!0}}};var interactive_docs_page=__webpack_require__("./.storybook/interactive-docs-page.js"),title=__webpack_require__("./src/elements/title/index.js");const Factory={parameters:{controls:{disable:!1}},args:{children:"Paper factory",className:"yst-p-6"}},WithHeaderAndContent={name:"With header and content",parameters:{docs:{description:{story:"Using the `Paper.Header` and `Paper.Content` to give the Paper structure.\n"}}},args:{children:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(paper.Header,{children:[(0,jsx_runtime.jsx)(title.A,{children:"Title"}),(0,jsx_runtime.jsx)("span",{children:"Description"})]}),(0,jsx_runtime.jsx)(paper.Content,{children:(0,jsx_runtime.jsx)("span",{children:"Content"})})]})}},stories={title:"1) Elements/Paper",component:paper,argTypes:{children:{control:"text"},as:{options:["div","main","section"]}},parameters:{backgrounds:{default:"medium"},docs:{description:{component:"Papers can be used as containers, serving as visual representations of physical sheets of paper. This imparts familiarity and intuitiveness for users, aiding in organizing and containing settings or form elements within a defined area. Papers offer structure and clarity, providing a clean, minimalistic look that enhances readability and visual appeal."},page:()=>(0,jsx_runtime.jsx)(interactive_docs_page.f,{stories:[WithHeaderAndContent]})}}}},"./src/elements/title/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__,_:()=>classNameMap});var classnames__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/classnames/index.js"),classnames__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/react/index.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/react/jsx-runtime.js");const classNameMap={size:{1:"yst-title--1",2:"yst-title--2",3:"yst-title--3",4:"yst-title--4",5:"yst-title--5"}},Title=(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((({children,as:Component,size,className,...props},ref)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Component,{ref,className:classnames__WEBPACK_IMPORTED_MODULE_0___default()("yst-title",classNameMap.size[size||Component[1]],className),...props,children})));Title.displayName="Title",Title.propTypes={children:prop_types__WEBPACK_IMPORTED_MODULE_3___default().node.isRequired,as:prop_types__WEBPACK_IMPORTED_MODULE_3___default().elementType,size:prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOf(Object.keys(classNameMap.size)),className:prop_types__WEBPACK_IMPORTED_MODULE_3___default().string},Title.defaultProps={as:"h1",size:void 0,className:""};const __WEBPACK_DEFAULT_EXPORT__=Title;Title.__docgenInfo={description:"@param {Object} props Props object.\n@returns {JSX.Element} Title component.",methods:[],displayName:"Title",props:{as:{defaultValue:{value:'"h1"',computed:!1},description:"",type:{name:"elementType"},required:!1},size:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"enum",value:[{value:'"1"',computed:!1},{value:'"2"',computed:!1},{value:'"3"',computed:!1},{value:'"4"',computed:!1},{value:'"5"',computed:!1}]},required:!1},className:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},children:{description:"",type:{name:"node"},required:!0}}}},"../../node_modules/memoizerific sync recursive":module=>{function webpackEmptyContext(req){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="../../node_modules/memoizerific sync recursive",module.exports=webpackEmptyContext},"./node_modules/classnames/index.js":(module,exports)=>{var __WEBPACK_AMD_DEFINE_RESULT__;!function(){"use strict";var hasOwn={}.hasOwnProperty;function classNames(){for(var classes=[],i=0;i<arguments.length;i++){var arg=arguments[i];if(arg){var argType=typeof arg;if("string"===argType||"number"===argType)classes.push(arg);else if(Array.isArray(arg)){if(arg.length){var inner=classNames.apply(null,arg);inner&&classes.push(inner)}}else if("object"===argType){if(arg.toString!==Object.prototype.toString&&!arg.toString.toString().includes("[native code]")){classes.push(arg.toString());continue}for(var key in arg)hasOwn.call(arg,key)&&arg[key]&&classes.push(key)}}}return classes.join(" ")}module.exports?(classNames.default=classNames,module.exports=classNames):void 0===(__WEBPACK_AMD_DEFINE_RESULT__=function(){return classNames}.apply(exports,[]))||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)}()}}]);