woocommerce/search-stories-search-story...

1 line
8.8 KiB
JavaScript
Raw Permalink Normal View History

"use strict";(self.webpackChunk_woocommerce_storybook=self.webpackChunk_woocommerce_storybook||[]).push([[5072],{"../../packages/js/components/src/section/context.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{$:()=>Level});var Level=(0,__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js").createContext)(2)},"../../packages/js/components/src/section/header.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{H:()=>H});var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),_context__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../packages/js/components/src/section/context.tsx");function H(props){var level=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context__WEBPACK_IMPORTED_MODULE_1__.$),Heading="h"+Math.min(level,6);return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Heading,props)}try{H.displayName="H",H.__docgenInfo={description:'These components are used to frame out the page content for accessible heading hierarchy. Instead of defining fixed heading levels\n(`h2`, `h3`, …) you can use `<H />` to create "section headings", which look to the parent `<Section />`s for the appropriate\nheading level.',displayName:"H",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../packages/js/components/src/section/header.tsx#H"]={docgenInfo:H.__docgenInfo,name:"H",path:"../../packages/js/components/src/section/header.tsx#H"})}catch(__react_docgen_typescript_loader_error){}},"../../packages/js/components/src/section/section.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{w:()=>Section});var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),_wordpress_element__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),_context__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../packages/js/components/src/section/context.tsx"),_excluded=["component","children"],Section=function Section(_ref){var component=_ref.component,children=_ref.children,props=(0,_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__.A)(_ref,_excluded),Component=component||"div";return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_context__WEBPACK_IMPORTED_MODULE_2__.$.Consumer,null,(function(level){return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_context__WEBPACK_IMPORTED_MODULE_2__.$.Provider,{value:level+1},!1===component?children:(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Component,props,children))}))};try{Section.displayName="Section",Section.__docgenInfo={description:"The section wrapper, used to indicate a sub-section (and change the header level context).",displayName:"Section",props:{component:{defaultValue:null,description:"The wrapper component for this section. Optional, defaults to `div`. If passed false, no wrapper is used. Additional props passed to Section are passed on to the component.",name:"component",required:!1,type:{name:"string | false | ComponentType<{}>"}},className:{defaultValue:null,description:"Optional classname",name:"className",required:!1,type:{name:"string"}},children:{defaultValue:null,description:"The children inside this section, rendered in the `component`. This increases the context level for the next heading used.",name:"children",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../packages/js/components/src/section/section.tsx#Section"]={docgenInfo:Section.__docgenInfo,name:"Section",path:"../../packages/js/components/src/section/section.tsx#Section"})}cat