-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathselect-stories.8842fb9d.iframe.bundle.js
1 lines (1 loc) · 13.1 KB
/
select-stories.8842fb9d.iframe.bundle.js
1
"use strict";(self.webpackChunkwww=self.webpackChunkwww||[]).push([[651],{"./lib/utils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{cn:()=>cn});var clsx__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/clsx/dist/clsx.m.js"),tailwind_merge__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/tailwind-merge/dist/lib/tw-merge.mjs");__webpack_require__("../../node_modules/process/browser.js");function cn(){for(var _len=arguments.length,inputs=new Array(_len),_key=0;_key<_len;_key++)inputs[_key]=arguments[_key];return(0,tailwind_merge__WEBPACK_IMPORTED_MODULE_0__.m)((0,clsx__WEBPACK_IMPORTED_MODULE_1__.W)(inputs))}},"./registry/stories/select.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Base:()=>Base,default:()=>select_stories});var defineProperty=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"),react=__webpack_require__("../../node_modules/react/index.js"),esm_extends=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/extends.js"),objectWithoutProperties=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),dist=__webpack_require__("../../node_modules/@radix-ui/react-select/dist/index.mjs"),chevron_down=__webpack_require__("../../node_modules/lucide-react/dist/esm/icons/chevron-down.js"),check=__webpack_require__("../../node_modules/lucide-react/dist/esm/icons/check.js"),utils=__webpack_require__("./lib/utils.ts"),_excluded=["className","children"],_excluded2=["className","children","position"],_excluded3=["className"],_excluded4=["className","children"],_excluded5=["className"],__jsx=react.createElement,Select=dist.fC,SelectGroup=dist.ZA,SelectValue=dist.B4,SelectTrigger=react.forwardRef((function(_ref,ref){var className=_ref.className,children=_ref.children,props=(0,objectWithoutProperties.Z)(_ref,_excluded);return __jsx(dist.xz,(0,esm_extends.Z)({ref,className:(0,utils.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",className)},props),children,__jsx(dist.JO,{asChild:!0},__jsx(chevron_down.Z,{className:"h-4 w-4 opacity-50"})))}));SelectTrigger.displayName=dist.xz.displayName;var SelectContent=react.forwardRef((function(_ref2,ref){var className=_ref2.className,children=_ref2.children,_ref2$position=_ref2.position,position=void 0===_ref2$position?"popper":_ref2$position,props=(0,objectWithoutProperties.Z)(_ref2,_excluded2);return __jsx(dist.h_,null,__jsx(dist.VY,(0,esm_extends.Z)({ref,className:(0,utils.cn)("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===position&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",className),position},props),__jsx(dist.l_,{className:(0,utils.cn)("p-1","popper"===position&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},children)))}));SelectContent.displayName=dist.VY.displayName;var SelectLabel=react.forwardRef((function(_ref3,ref){var className=_ref3.className,props=(0,objectWithoutProperties.Z)(_ref3,_excluded3);return __jsx(dist.__,(0,esm_extends.Z)({ref,className:(0,utils.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",className)},props))}));SelectLabel.displayName=dist.__.displayName;var SelectItem=react.forwardRef((function(_ref4,ref){var className=_ref4.className,children=_ref4.children,props=(0,objectWithoutProperties.Z)(_ref4,_excluded4);return __jsx(dist.ck,(0,esm_extends.Z)({ref,className:(0,utils.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",className)},props),__jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},__jsx(dist.wU,null,__jsx(check.Z,{className:"h-4 w-4"}))),__jsx(dist.eT,null,children))}));SelectItem.displayName=dist.ck.displayName;var _Base$parameters,_Base$parameters2,SelectSeparator=react.forwardRef((function(_ref5,ref){var className=_ref5.className,props=(0,objectWithoutProperties.Z)(_ref5,_excluded5);return __jsx(dist.Z0,(0,esm_extends.Z)({ref,className:(0,utils.cn)("-mx-1 my-1 h-px bg-muted",className)},props))}));SelectSeparator.displayName=dist.Z0.displayName,SelectTrigger.__docgenInfo={description:"",methods:[]},SelectContent.__docgenInfo={description:"",methods:[],props:{position:{defaultValue:{value:'"popper"',computed:!1},required:!1}}},SelectLabel.__docgenInfo={description:"",methods:[]},SelectItem.__docgenInfo={description:"",methods:[]},SelectSeparator.__docgenInfo={description:"",methods:[]};try{Select.displayName="Select",Select.__docgenInfo={description:"",displayName:"Select",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["registry/default/ui/select.tsx#Select"]={docgenInfo:Select.__docgenInfo,name:"Select",path:"registry/default/ui/select.tsx#Select"})}catch(__react_docgen_typescript_loader_error){}try{SelectGroup.displayName="SelectGroup",SelectGroup.__docgenInfo={description:"",displayName:"SelectGroup",props:{asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["registry/default/ui/select.tsx#SelectGroup"]={docgenInfo:SelectGroup.__docgenInfo,name:"SelectGroup",path:"registry/default/ui/select.tsx#SelectGroup"})}catch(__react_docgen_typescript_loader_error){}try{SelectValue.displayName="SelectValue",SelectValue.__docgenInfo={description:"",displayName:"SelectValue",props:{asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["registry/default/ui/select.tsx#SelectValue"]={docgenInfo:SelectValue.__docgenInfo,name:"SelectValue",path:"registry/default/ui/select.tsx#SelectValue"})}catch(__react_docgen_typescript_loader_error){}try{SelectTrigger.displayName="SelectTrigger",SelectTrigger.__docgenInfo={description:"",displayName:"SelectTrigger",props:{asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["registry/default/ui/select.tsx#SelectTrigger"]={docgenInfo:SelectTrigger.__docgenInfo,name:"SelectTrigger",path:"registry/default/ui/select.tsx#SelectTrigger"})}catch(__react_docgen_typescript_loader_error){}try{SelectContent.displayName="SelectContent",SelectContent.__docgenInfo={description:"",displayName:"SelectContent",props:{asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["registry/default/ui/select.tsx#SelectContent"]={docgenInfo:SelectContent.__docgenInfo,name:"SelectContent",path:"registry/default/ui/select.tsx#SelectContent"})}catch(__react_docgen_typescript_loader_error){}try{SelectLabel.displayName="SelectLabel",SelectLabel.__docgenInfo={description:"",displayName:"SelectLabel",props:{asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["registry/default/ui/select.tsx#SelectLabel"]={docgenInfo:SelectLabel.__docgenInfo,name:"SelectLabel",path:"registry/default/ui/select.tsx#SelectLabel"})}catch(__react_docgen_typescript_loader_error){}try{SelectItem.displayName="SelectItem",SelectItem.__docgenInfo={description:"",displayName:"SelectItem",props:{asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["registry/default/ui/select.tsx#SelectItem"]={docgenInfo:SelectItem.__docgenInfo,name:"SelectItem",path:"registry/default/ui/select.tsx#SelectItem"})}catch(__react_docgen_typescript_loader_error){}try{SelectSeparator.displayName="SelectSeparator",SelectSeparator.__docgenInfo={description:"",displayName:"SelectSeparator",props:{asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["registry/default/ui/select.tsx#SelectSeparator"]={docgenInfo:SelectSeparator.__docgenInfo,name:"SelectSeparator",path:"registry/default/ui/select.tsx#SelectSeparator"})}catch(__react_docgen_typescript_loader_error){}var select_stories_jsx=react.createElement;function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach((function(key){(0,defineProperty.Z)(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}const select_stories={title:"ui/Select",component:Select,tags:["autodocs"],argTypes:{}};var Base={render:function render(args){return select_stories_jsx(Select,null,select_stories_jsx(SelectTrigger,{className:"w-[180px]"},select_stories_jsx(SelectValue,{placeholder:"Select a fruit"})),select_stories_jsx(SelectContent,null,select_stories_jsx(SelectGroup,null,select_stories_jsx(SelectLabel,null,"Fruits"),select_stories_jsx(SelectItem,{value:"apple"},"Apple"),select_stories_jsx(SelectItem,{value:"banana"},"Banana"),select_stories_jsx(SelectItem,{value:"blueberry"},"Blueberry"),select_stories_jsx(SelectItem,{value:"grapes"},"Grapes"),select_stories_jsx(SelectItem,{value:"pineapple"},"Pineapple")),select_stories_jsx(SelectSeparator,null),select_stories_jsx(SelectGroup,null,select_stories_jsx(SelectLabel,null,"Vegetables"),select_stories_jsx(SelectItem,{value:"aubergine"},"Aubergine"),select_stories_jsx(SelectItem,{value:"broccoli"},"Broccoli"),select_stories_jsx(SelectItem,{value:"carrot",disabled:!0},"Carrot"),select_stories_jsx(SelectItem,{value:"courgette"},"Courgette"),select_stories_jsx(SelectItem,{value:"leek"},"Leek")),select_stories_jsx(SelectSeparator,null),select_stories_jsx(SelectGroup,null,select_stories_jsx(SelectLabel,null,"Meat"),select_stories_jsx(SelectItem,{value:"beef"},"Beef"),select_stories_jsx(SelectItem,{value:"chicken"},"Chicken"),select_stories_jsx(SelectItem,{value:"lamb"},"Lamb"),select_stories_jsx(SelectItem,{value:"pork"},"Pork"))))},args:{}};Base.parameters=_objectSpread(_objectSpread({},Base.parameters),{},{docs:_objectSpread(_objectSpread({},null===(_Base$parameters=Base.parameters)||void 0===_Base$parameters?void 0:_Base$parameters.docs),{},{source:_objectSpread({originalSource:'{\n render: args => <Select>\n <SelectTrigger className="w-[180px]">\n <SelectValue placeholder="Select a fruit" />\n </SelectTrigger>\n <SelectContent>\n <SelectGroup>\n <SelectLabel>Fruits</SelectLabel>\n <SelectItem value="apple">Apple</SelectItem>\n <SelectItem value="banana">Banana</SelectItem>\n <SelectItem value="blueberry">Blueberry</SelectItem>\n <SelectItem value="grapes">Grapes</SelectItem>\n <SelectItem value="pineapple">Pineapple</SelectItem>\n </SelectGroup>\n <SelectSeparator />\n <SelectGroup>\n <SelectLabel>Vegetables</SelectLabel>\n <SelectItem value="aubergine">Aubergine</SelectItem>\n <SelectItem value="broccoli">Broccoli</SelectItem>\n <SelectItem value="carrot" disabled>\n Carrot\n </SelectItem>\n <SelectItem value="courgette">Courgette</SelectItem>\n <SelectItem value="leek">Leek</SelectItem>\n </SelectGroup>\n <SelectSeparator />\n <SelectGroup>\n <SelectLabel>Meat</SelectLabel>\n <SelectItem value="beef">Beef</SelectItem>\n <SelectItem value="chicken">Chicken</SelectItem>\n <SelectItem value="lamb">Lamb</SelectItem>\n <SelectItem value="pork">Pork</SelectItem>\n </SelectGroup>\n </SelectContent>\n </Select>,\n args: {}\n}'},null===(_Base$parameters2=Base.parameters)||void 0===_Base$parameters2||null===(_Base$parameters2=_Base$parameters2.docs)||void 0===_Base$parameters2?void 0:_Base$parameters2.source)})})}}]);