1 line
14 KiB
JavaScript
1 line
14 KiB
JavaScript
"use strict";(self.webpackChunk_woocommerce_storybook=self.webpackChunk_woocommerce_storybook||[]).push([[4620],{"../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/index.js":()=>{},"../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/text-control/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js"),_wordpress_element__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js"),_base_control__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/base-control/index.js");const __WEBPACK_DEFAULT_EXPORT__=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((function TextControl(_ref,ref){let{label,hideLabelFromVision,value,help,className,onChange,type="text",...props}=_ref;const id=`inspector-text-control-${(0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__.A)(TextControl)}`;return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_base_control__WEBPACK_IMPORTED_MODULE_2__.Ay,{label,hideLabelFromVision,id,help,className},(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("input",(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__.A)({className:"components-text-control__input",type,id,value,onChange:event=>onChange(event.target.value),"aria-describedby":help?id+"__help":void 0,ref},props)))}))},"../../packages/js/components/src/experimental.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{E:()=>Text});var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/index.js"),_wordpress_components__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/text/component.js"),Text=_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Text||_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.A},"../../packages/js/components/src/pill/pill.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{a:()=>Pill});var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),classnames__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js"),classnames__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__),_experimental__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../packages/js/components/src/experimental.js");function Pill(_ref){var children=_ref.children,_ref$className=_ref.className,className=void 0===_ref$className?"":_ref$className;return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_experimental__WEBPACK_IMPORTED_MODULE_2__.E,{className:classnames__WEBPACK_IMPORTED_MODULE_0___default()("woocommerce-pill",className),variant:"caption",as:"span",size:"12",lineHeight:"16px"},children)}},"../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.description.js":(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{var $=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js"),DESCRIPTORS=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js"),global=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/global.js"),uncurryThis=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js"),hasOwn=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/has-own-property.js"),isCallable=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-callable.js"),isPrototypeOf=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-is-prototype-of.js"),toString=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-string.js"),defineBuiltInAccessor=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/define-built-in-accessor.js"),copyConstructorProperties=__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/copy-constructor-properties.js"),NativeSymbol=global.Symbol,SymbolPrototype=NativeSymbol&&NativeSymbol.prototype;if(DESCRIPTORS&&isCallable(NativeSymbol)&&(!("description"in SymbolPrototype)||void 0!==NativeSymbol().description)){var EmptyStringDescriptionStore={},SymbolWrapper=function Symbol(){var description=arguments.length<1||void 0===arguments[0]?void 0:toString(arguments[0]),result=isPrototypeOf(SymbolPrototype,this)?new NativeSymbol(description):void 0===description?NativeSymbol():NativeSymbol(description);return""===description&&(EmptyStringDescriptionStore[result]=!0),result};copyConstructorProperties(SymbolWrapper,NativeSymbol),SymbolWrapper.prototype=SymbolPrototype,SymbolPrototype.constructor=SymbolWrapper;var NATIVE_SYMBOL="Symbol(description detection)"===String(NativeSymbol("description detection")),thisSymbolValue=uncurryThis(SymbolPrototype.valueOf),symbolDescriptiveString=uncurryThis(SymbolPrototype.toString),regexp=/^Symbol\((.*)\)[^)]+$/,replace=uncurryThis("".replace),stringSlice=uncurryThis("".slice);defineBuiltInAccessor(SymbolPrototype,"description",{configurable:!0,get:function description(){var symbol=thisSymbolValue(this);if(hasOwn(EmptyStringDescriptionStore,symbol))return"";var string=symbolDescriptiveString(symbol),desc=NATIVE_SYMBOL?stringSlice(string,7,-1):replace(string,regexp,"$1");return""===desc?void 0:desc}}),$({global:!0,constructor:!0,forced:!0},{Symbol:SymbolWrapper})}},"../../packages/js/components/src/form-section/stories/form-section.story.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,CustomElements:()=>CustomElements,default:()=>form_section_story});var react=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),component=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/card/component.js"),card_body_component=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/card-body/component.js"),text_control=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/text-control/index.js"),build_module_button=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/button/index.js"),classnames=(__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js")),classnames_default=__webpack_require__.n(classnames),FormSection=function FormSection(_ref){var title=_ref.title,description=_ref.description,className=_ref.className,children=_ref.children;return(0,react.createElement)("div",{className:classnames_default()("woocommerce-form-section",className)},(0,react.createElement)("div",{className:"woocommerce-form-section__header"},(0,react.createElement)("h3",{className:"woocommerce-form-section__title"},title),(0,react.createElement)("div",{className:"woocommerce-form-section__description"},description)),(0,react.createElement)("div",{className:"woocommerce-form-section__content"},children))};try{FormSection.displayName="FormSection",FormSection.__docgenInfo={description:"",displayName:"FormSection",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string | Element"}},description:{defaultValue:null,description:"",name:"description",required:!0,type:{name:"string | Element"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../packages/js/components/src/form-section/form-section.tsx#FormSection"]={docgenInfo:FormSection.__docgenInfo,name:"FormSection",path:"../../packages/js/components/src/form-section/form-section.tsx#FormSection"})}catch(__react_docgen_typescript_loader_error){}var pill=__webpack_require__("../../packages/js/components/src/pill/pill.js"),Basic=function Basic(){return(0,react.createElement)(FormSection,{title:"My form section",description:"Some text to describe what this section covers"},(0,react.createElement)(component.A,null,(0,react.createElement)(card_body_component.A,null,(0,react.createElement)(text_control.A,{label:"My first field",onChange:function onChange(){},value:""}),(0,react.createElement)(text_control.A,{label:"My second field",onChange:function onChange(){},value:""}))),(0,react.createElement)(component.A,null,(0,react.createElement)(card_body_component.A,null,(0,react.createElement)(text_control.A,{label:"My third field",onChange:function onChange(){},value:""}))))},CustomElements=function CustomElements(){return(0,react.createElement)(FormSection,{title:(0,react.createElement)(react.Fragment,null,"Custom elements ",(0,react.createElement)(pill.a,null,"Cool")),description:(0,react.createElement)(react.Fragment,null,(0,react.createElement)("p",null,"Some text to describe what this section covers"),(0,react.createElement)(build_module_button.A,{variant:"link"},"Read more"))},(0,react.createElement)(component.A,null,(0,react.createElement)(card_body_component.A,null,(0,react.createElement)(text_control.A,{label:"My first field",onChange:function onChange(){},value:""}),(0,react.createElement)(text_control.A,{label:"My second field",onChange:function onChange(){},value:""}))))};const form_section_story={title:"WooCommerce Admin/components/FormSection",component:FormSection};Basic.parameters={...Basic.parameters,docs:{...Basic.parameters?.docs,source:{originalSource:'() => {\n return <FormSection title="My form section" description="Some text to describe what this section covers">\n <Card>\n <CardBody>\n <TextControl label="My first field" onChange={() => {}} value="" />\n <TextControl label="My second field" onChange={() => {}} value="" />\n </CardBody>\n </Card>\n\n <Card>\n <CardBody>\n <TextControl label="My third field" onChange={() => {}} value="" />\n </CardBody>\n </Card>\n </FormSection>;\n}',...Basic.parameters?.docs?.source}}},CustomElements.parameters={...CustomElements.parameters,docs:{...CustomElements.parameters?.docs,source:{originalSource:'() => {\n return <FormSection title={<>\n Custom elements <Pill>Cool</Pill>\n </>} description={<>\n <p>Some text to describe what this section covers</p>\n <Button variant="link">Read more</Button>\n </>}>\n <Card>\n <CardBody>\n <TextControl label="My first field" onChange={() => {}} value="" />\n <TextControl label="My second field" onChange={() => {}} value="" />\n </CardBody>\n </Card>\n </FormSection>;\n}',...CustomElements.parameters?.docs?.source}}};try{Basic.displayName="Basic",Basic.__docgenInfo={description:"",displayName:"Basic",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../packages/js/components/src/form-section/stories/form-section.story.tsx#Basic"]={docgenInfo:Basic.__docgenInfo,name:"Basic",path:"../../packages/js/components/src/form-section/stories/form-section.story.tsx#Basic"})}catch(__react_docgen_typescript_loader_error){}try{CustomElements.displayName="CustomElements",CustomElements.__docgenInfo={description:"",displayName:"CustomElements",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../packages/js/components/src/form-section/stories/form-section.story.tsx#CustomElements"]={docgenInfo:CustomElements.__docgenInfo,name:"CustomElements",path:"../../packages/js/components/src/form-section/stories/form-section.story.tsx#CustomElements"})}catch(__react_docgen_typescript_loader_error){}}}]); |